diff --git a/node_modules/.bin/_mocha b/node_modules/.bin/_mocha deleted file mode 120000 index f2a54ffd..00000000 --- a/node_modules/.bin/_mocha +++ /dev/null @@ -1 +0,0 @@ -../mocha/bin/_mocha \ No newline at end of file diff --git a/node_modules/.bin/flat b/node_modules/.bin/flat deleted file mode 120000 index 5fed16be..00000000 --- a/node_modules/.bin/flat +++ /dev/null @@ -1 +0,0 @@ -../flat/cli.js \ No newline at end of file diff --git a/node_modules/.bin/he b/node_modules/.bin/he deleted file mode 120000 index 2a8eb5e0..00000000 --- a/node_modules/.bin/he +++ /dev/null @@ -1 +0,0 @@ -../he/bin/he \ No newline at end of file diff --git a/node_modules/.bin/js-yaml b/node_modules/.bin/js-yaml index 9dbd010d..64024d5c 120000 --- a/node_modules/.bin/js-yaml +++ b/node_modules/.bin/js-yaml @@ -1 +1 @@ -../js-yaml/bin/js-yaml.js \ No newline at end of file +../js-yaml/bin/js-yaml.mjs \ No newline at end of file diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json index 3d663928..9fc81f99 100644 --- a/node_modules/.package-lock.json +++ b/node_modules/.package-lock.json @@ -49,143 +49,6 @@ "ms": "^2.1.1" } }, - "node_modules/@isaacs/balanced-match": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@isaacs/balanced-match/-/balanced-match-4.0.1.tgz", - "integrity": "sha512-yzMTt9lEb8Gv7zRioUilSglI0c0smZ9k5D65677DLWLtWJaXIS3CqcGyUFByYKlnUj6TkjLVs54fBl6+TiGQDQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": "20 || >=22" - } - }, - "node_modules/@isaacs/brace-expansion": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@isaacs/brace-expansion/-/brace-expansion-5.0.1.tgz", - "integrity": "sha512-WMz71T1JS624nWj2n2fnYAuPovhv7EUhk69R6i9dsVyzxt5eM3bjwvgk9L+APE1TRscGysAVMANkB0jh0LQZrQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@isaacs/balanced-match": "^4.0.1" - }, - "engines": { - "node": "20 || >=22" - } - }, - "node_modules/@isaacs/cliui": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", - "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", - "dev": true, - "license": "ISC", - "dependencies": { - "string-width": "^5.1.2", - "string-width-cjs": "npm:string-width@^4.2.0", - "strip-ansi": "^7.0.1", - "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", - "wrap-ansi": "^8.1.0", - "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@isaacs/cliui/node_modules/ansi-regex": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", - "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/@isaacs/cliui/node_modules/ansi-styles": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", - "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@isaacs/cliui/node_modules/emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "dev": true, - "license": "MIT" - }, - "node_modules/@isaacs/cliui/node_modules/string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", - "dev": true, - "license": "MIT", - "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@isaacs/cliui/node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", - "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^6.1.0", - "string-width": "^5.0.1", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/@pkgjs/parseargs": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", - "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", - "dev": true, - "license": "MIT", - "optional": true, - "engines": { - "node": ">=14" - } - }, "node_modules/@types/sinonjs__fake-timers": { "version": "8.1.1", "resolved": "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-8.1.1.tgz", @@ -263,7 +126,8 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true + "dev": true, + "license": "Python-2.0" }, "node_modules/asn1": { "version": "0.2.6", @@ -313,10 +177,14 @@ "license": "MIT" }, "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", + "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "18 || 20 || >=22" + } }, "node_modules/base64-js": { "version": "1.5.1", @@ -357,13 +225,16 @@ "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==" }, "node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.9.tgz", + "integrity": "sha512-ScQ4IuvIEF1TMlP7Zt+vjJ//9zlPb2SDcxWxM3bk8s6t6GGdJ7KO1dCcTidOPJKePW30LE/2cT7wCyPho9/Wxg==", "dev": true, "license": "MIT", "dependencies": { - "balanced-match": "^1.0.0" + "balanced-match": "^4.0.2" + }, + "engines": { + "node": "20 || >=22" } }, "node_modules/browser-stdout": { @@ -433,18 +304,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/camelcase": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", @@ -478,16 +337,16 @@ } }, "node_modules/chokidar": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", - "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-5.0.0.tgz", + "integrity": "sha512-TQMmc3w+5AxjpL8iIiwebF73dRDF4fBIieAqGn9RGCWaEVwQ6Fb2cGe31Yns0RRIzii5goJ1Y7xbMwo1TxMplw==", "dev": true, "license": "MIT", "dependencies": { - "readdirp": "^4.0.1" + "readdirp": "^5.0.0" }, "engines": { - "node": ">= 14.16.0" + "node": ">= 20.19.0" }, "funding": { "url": "https://paulmillr.com/funding/" @@ -711,9 +570,9 @@ } }, "node_modules/cypress": { - "version": "15.21.0", - "resolved": "https://registry.npmjs.org/cypress/-/cypress-15.21.0.tgz", - "integrity": "sha512-6uPy5GUjao97t/QDIwlPyJz4JUqPpFIPq5lNazN95LSA3ynJoYC1sHZ3W+aj4f+K1OFGbMfno0+OX2Gx0OmlPA==", + "version": "16.0.0", + "resolved": "https://registry.npmjs.org/cypress/-/cypress-16.0.0.tgz", + "integrity": "sha512-/H3zsayGwIGboFIiLWaXxy6ADmCdWy5QjjDBZgslCvjIgYAf1DkZerwAM7wXMPSpfpQ4w+lGjFlmwneRBpg27g==", "hasInstallScript": true, "license": "MIT", "dependencies": { @@ -733,7 +592,7 @@ "cli-table3": "0.6.1", "commander": "^6.2.1", "common-tags": "^1.8.0", - "dayjs": "^1.10.4", + "dayjs": "^1.11.23", "debug": "^4.3.4", "eventemitter2": "6.4.7", "execa": "4.1.0", @@ -761,7 +620,7 @@ "cypress": "bin/cypress" }, "engines": { - "node": "^20.1.0 || ^22.0.0 || >=24.0.0" + "node": "^22.0.0 || ^24.0.0 || >=26.0.0" } }, "node_modules/cypress-multi-reporters": { @@ -805,9 +664,10 @@ } }, "node_modules/dayjs": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.6.tgz", - "integrity": "sha512-zZbY5giJAinCG+7AGaw0wIhNZ6J8AhWuSXKvuc1KAyMiRsvGQWqh4L+MomvhdAYjN+lqvVCMq1I41e3YHvXkyQ==" + "version": "1.11.23", + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.23.tgz", + "integrity": "sha512-QDTCU0M0MxR3hQfnlDJfwekQiaanm1ubOD231u73WBckQ/fsamwRLiE2GBz6D3a/xF1NgfiDLJjXBa1hYOYTtQ==", + "license": "MIT" }, "node_modules/debug": { "version": "4.4.0", @@ -826,18 +686,6 @@ } } }, - "node_modules/decamelize": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", - "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -871,13 +719,6 @@ "node": ">= 0.4" } }, - "node_modules/eastasianwidth": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", - "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", - "dev": true, - "license": "MIT" - }, "node_modules/ecc-jsbn": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", @@ -1049,45 +890,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/flat": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", - "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", - "dev": true, - "bin": { - "flat": "cli.js" - } - }, - "node_modules/foreground-child": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.0.tgz", - "integrity": "sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==", - "dev": true, - "license": "ISC", - "dependencies": { - "cross-spawn": "^7.0.0", - "signal-exit": "^4.0.1" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/foreground-child/node_modules/signal-exit": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", - "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/forever-agent": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", @@ -1362,15 +1164,6 @@ "node": ">= 0.4" } }, - "node_modules/he": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", - "dev": true, - "bin": { - "he": "bin/he" - } - }, "node_modules/http-signature": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.4.0.tgz", @@ -1451,15 +1244,6 @@ "node": ">=8" } }, - "node_modules/is-plain-obj": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", - "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/is-stream": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", @@ -1499,22 +1283,6 @@ "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==", "license": "MIT" }, - "node_modules/jackspeak": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", - "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", - "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "@isaacs/cliui": "^8.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - }, - "optionalDependencies": { - "@pkgjs/parseargs": "^0.11.0" - } - }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -1523,15 +1291,26 @@ "license": "MIT" }, "node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-5.4.1.tgz", + "integrity": "sha512-28R/k+NAjeuf7+CKlTxWZVExJGwVVLwY06DgEnOMz2gEpfNkDcD7QvyiVPT0xy0XXhU8vHsd4Ot42OOPdJG7dQ==", "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/puzrin" + }, + { + "type": "github", + "url": "https://github.com/sponsors/nodeca" + } + ], + "license": "MIT", "dependencies": { "argparse": "^2.0.1" }, "bin": { - "js-yaml": "bin/js-yaml.js" + "js-yaml": "bin/js-yaml.mjs" } }, "node_modules/jsbn": { @@ -1929,16 +1708,16 @@ } }, "node_modules/minimatch": { - "version": "10.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.1.2.tgz", - "integrity": "sha512-fu656aJ0n2kcXwsnwnv9g24tkU5uSmOlTjd6WyyaKm2Z+h1qmY6bAjrcaIxF/BslFqbZ8UBtbJi7KgQOZD2PTw==", + "version": "10.2.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.6.tgz", + "integrity": "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==", "dev": true, "license": "BlueOak-1.0.0", "dependencies": { - "@isaacs/brace-expansion": "^5.0.1" + "brace-expansion": "^5.0.8" }, "engines": { - "node": "20 || >=22" + "node": "18 || 20 || >=22" }, "funding": { "url": "https://github.com/sponsors/isaacs" @@ -1963,101 +1742,46 @@ } }, "node_modules/mocha": { - "version": "11.8.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-11.8.0.tgz", - "integrity": "sha512-VyCeUdGN3A9lmCTTgG4yuvY9ixxaDk+xt2R/7/+1AP6EqNG+G9OKkzBwhVtVYoNX8YsxNSgAl8mOv3IAeOpFbw==", + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-12.0.0.tgz", + "integrity": "sha512-NYNh5IFt6WYqm9bi4601m7vix8MZdXC0DwS4gY6WhXO2RgJWhivhISVmq1oklCif18OSI9l+vx5Mdm5oh1XGiQ==", "dev": true, "license": "MIT", "dependencies": { "browser-stdout": "^1.3.1", - "chokidar": "^4.0.1", + "chokidar": "^5.0.0", "debug": "^4.3.5", - "diff": "^7.0.0", - "escape-string-regexp": "^4.0.0", + "diff": "^9.0.0", "find-up": "^5.0.0", - "glob": "^10.4.5", - "he": "^1.2.0", + "glob": "^13.0.0", "is-path-inside": "^3.0.3", - "js-yaml": "^4.1.0", - "log-symbols": "^4.1.0", - "minimatch": "^9.0.5", + "is-unicode-supported": "^0.1.0", + "js-yaml": "^5.0.0", + "minimatch": "^10.2.2", "ms": "^2.1.3", "picocolors": "^1.1.1", - "serialize-javascript": "^6.0.2", - "strip-json-comments": "^3.1.1", + "serialize-javascript": "^7.0.2", + "strip-json-comments": "^5.0.3", "supports-color": "^8.1.1", - "workerpool": "^9.2.0", - "yargs": "^17.7.2", - "yargs-parser": "^21.1.1", - "yargs-unparser": "^2.0.0" + "workerpool": "^10.0.0" }, "bin": { - "_mocha": "bin/_mocha", "mocha": "bin/mocha.js" }, "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + "node": "^20.19.0 || >=22.12.0" } }, "node_modules/mocha/node_modules/diff": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-7.0.0.tgz", - "integrity": "sha512-PJWHUb1RFevKCwaFA9RlG5tCd+FO5iRh9A8HEtkmBH2Li03iJriB6m6JIN4rGz3K3JLawI7/veA1xzRKP6ISBw==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-9.0.0.tgz", + "integrity": "sha512-svtcdpS8CgJyqAjEQIXdb3OjhFVVYjzGAPO8WGCmRbrml64SPw/jJD4GoE98aR7r25A0XcgrK3F02yw9R/vhQw==", "dev": true, "license": "BSD-3-Clause", "engines": { "node": ">=0.3.1" } }, - "node_modules/mocha/node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/mocha/node_modules/glob": { - "version": "10.4.5", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", - "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", - "dev": true, - "license": "ISC", - "dependencies": { - "foreground-child": "^3.1.0", - "jackspeak": "^3.1.2", - "minimatch": "^9.0.4", - "minipass": "^7.1.2", - "package-json-from-dist": "^1.0.0", - "path-scurry": "^1.11.1" - }, - "bin": { - "glob": "dist/esm/bin.mjs" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/mocha/node_modules/minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/mochawesome": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/mochawesome/-/mochawesome-8.0.1.tgz", @@ -2253,13 +1977,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/package-json-from-dist": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", - "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", - "dev": true, - "license": "BlueOak-1.0.0" - }, "node_modules/path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -2277,30 +1994,6 @@ "node": ">=8" } }, - "node_modules/path-scurry": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", - "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", - "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "lru-cache": "^10.2.0", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" - }, - "engines": { - "node": ">=16 || 14 >=14.18" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/path-scurry/node_modules/lru-cache": { - "version": "10.4.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", - "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", - "dev": true, - "license": "ISC" - }, "node_modules/pend": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", @@ -2388,16 +2081,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "safe-buffer": "^5.1.0" - } - }, "node_modules/react-is": { "version": "16.13.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", @@ -2406,13 +2089,13 @@ "license": "MIT" }, "node_modules/readdirp": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", - "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-5.1.1.tgz", + "integrity": "sha512-Kko+Y5XQ6fM+Ce3dq3m9YGxnacYZYl9cA1wZjaF3Vbry2L3i1qVg8+CAgNPsXRArPMUMCaOR7oa9Nqntc43JKA==", "dev": true, "license": "MIT", "engines": { - "node": ">= 14.18.0" + "node": ">= 20.19.0" }, "funding": { "type": "individual", @@ -2524,13 +2207,13 @@ } }, "node_modules/serialize-javascript": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", - "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-7.1.1.tgz", + "integrity": "sha512-k3CMsaIvvdSwm8oLB4MXSl0wH2/cwlH7xGcnRd2DaeRmBkbzYmyT8j0tsX60DwD1eRwHTpNpH8ljKu9oUT1MeQ==", "dev": true, "license": "BSD-3-Clause", - "dependencies": { - "randombytes": "^2.1.0" + "engines": { + "node": ">=20.0.0" } }, "node_modules/shebang-command": { @@ -2710,22 +2393,6 @@ "node": ">=8" } }, - "node_modules/string-width-cjs": { - "name": "string-width", - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", @@ -2737,20 +2404,6 @@ "node": ">=8" } }, - "node_modules/strip-ansi-cjs": { - "name": "strip-ansi", - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/strip-final-newline": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", @@ -2760,12 +2413,13 @@ } }, "node_modules/strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-5.0.3.tgz", + "integrity": "sha512-1tB5mhVo7U+ETBKNf92xT4hrQa3pm0MZ0PQvuDnWgAAGHDsfp4lPSpiS6psrSiet87wyGPh9ft6wmhOMQ0hDiw==", "dev": true, + "license": "MIT", "engines": { - "node": ">=8" + "node": ">=14.16" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -2944,9 +2598,9 @@ } }, "node_modules/workerpool": { - "version": "9.3.2", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-9.3.2.tgz", - "integrity": "sha512-Xz4Nm9c+LiBHhDR5bDLnNzmj6+5F+cyEAWPMkbs2awq/dYazR/efelZzUAjB/y3kNHL+uzkHvxVVpaOfGCPV7A==", + "version": "10.0.3", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-10.0.3.tgz", + "integrity": "sha512-6z2Iis68Wqth93/G/wJP9u+R3O+d2XTlgWChGCwuT1qLbBsOYueGRZuJ++v3mtDP5KjYdy+WzvWC+VWETSVXJA==", "dev": true, "license": "Apache-2.0" }, @@ -2967,25 +2621,6 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/wrap-ansi-cjs": { - "name": "wrap-ansi", - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", @@ -3050,21 +2685,6 @@ "node": ">=12" } }, - "node_modules/yargs-unparser": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", - "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", - "dev": true, - "dependencies": { - "camelcase": "^6.0.0", - "decamelize": "^4.0.0", - "flat": "^5.0.2", - "is-plain-obj": "^2.1.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/yauzl": { "version": "3.4.0", "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-3.4.0.tgz", diff --git a/node_modules/@isaacs/balanced-match/LICENSE.md b/node_modules/@isaacs/balanced-match/LICENSE.md deleted file mode 100644 index 61ece8cc..00000000 --- a/node_modules/@isaacs/balanced-match/LICENSE.md +++ /dev/null @@ -1,23 +0,0 @@ -(MIT) - -Original code Copyright Julian Gruber - -Port to TypeScript Copyright Isaac Z. Schlueter - -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/@isaacs/balanced-match/README.md b/node_modules/@isaacs/balanced-match/README.md deleted file mode 100644 index ed10c70a..00000000 --- a/node_modules/@isaacs/balanced-match/README.md +++ /dev/null @@ -1,60 +0,0 @@ -# @isaacs/balanced-match - -A hybrid CJS/ESM TypeScript fork of -[balanced-match](http://npm.im/balanced-match). - -Match balanced string pairs, like `{` and `}` or `` and ``. Supports regular expressions as well! - -[![CI](https://github.com/juliangruber/balanced-match/actions/workflows/ci.yml/badge.svg)](https://github.com/juliangruber/balanced-match/actions/workflows/ci.yml) -[![downloads](https://img.shields.io/npm/dm/balanced-match.svg)](https://www.npmjs.org/package/balanced-match) - -## Example - -Get the first matching pair of braces: - -```js -import { balanced } from '@isaacs/balanced-match' - -console.log(balanced('{', '}', 'pre{in{nested}}post')) -console.log(balanced('{', '}', 'pre{first}between{second}post')) -console.log(balanced(/\s+\{\s+/, /\s+\}\s+/, 'pre { in{nest} } post')) -``` - -The matches are: - -```bash -$ node example.js -{ start: 3, end: 14, pre: 'pre', body: 'in{nested}', post: 'post' } -{ start: 3, - end: 9, - pre: 'pre', - body: 'first', - post: 'between{second}post' } -{ start: 3, end: 17, pre: 'pre', body: 'in{nest}', post: 'post' } -``` - -## API - -### const m = balanced(a, b, str) - -For the first non-nested matching pair of `a` and `b` in `str`, return an -object with those keys: - -- **start** the index of the first match of `a` -- **end** the index of the matching `b` -- **pre** the preamble, `a` and `b` not included -- **body** the match, `a` and `b` not included -- **post** the postscript, `a` and `b` not included - -If there's no match, `undefined` will be returned. - -If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `['{', 'a', '']` and `{a}}` will match `['', 'a', '}']`. - -### const r = balanced.range(a, b, str) - -For the first non-nested matching pair of `a` and `b` in `str`, return an -array with indexes: `[ , ]`. - -If there's no match, `undefined` will be returned. - -If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `[ 1, 3 ]` and `{a}}` will match `[0, 2]`. diff --git a/node_modules/@isaacs/balanced-match/package.json b/node_modules/@isaacs/balanced-match/package.json deleted file mode 100644 index 49296e6a..00000000 --- a/node_modules/@isaacs/balanced-match/package.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "name": "@isaacs/balanced-match", - "description": "Match balanced character pairs, like \"{\" and \"}\"", - "version": "4.0.1", - "files": [ - "dist" - ], - "repository": { - "type": "git", - "url": "git://github.com/isaacs/balanced-match.git" - }, - "exports": { - "./package.json": "./package.json", - ".": { - "import": { - "types": "./dist/esm/index.d.ts", - "default": "./dist/esm/index.js" - }, - "require": { - "types": "./dist/commonjs/index.d.ts", - "default": "./dist/commonjs/index.js" - } - } - }, - "type": "module", - "scripts": { - "preversion": "npm test", - "postversion": "npm publish", - "prepublishOnly": "git push origin --follow-tags", - "prepare": "tshy", - "pretest": "npm run prepare", - "presnap": "npm run prepare", - "test": "tap", - "snap": "tap", - "format": "prettier --write . --loglevel warn", - "benchmark": "node benchmark/index.js", - "typedoc": "typedoc --tsconfig .tshy/esm.json ./src/*.ts" - }, - "prettier": { - "semi": false, - "printWidth": 80, - "tabWidth": 2, - "useTabs": false, - "singleQuote": true, - "jsxSingleQuote": false, - "bracketSameLine": true, - "arrowParens": "avoid", - "endOfLine": "lf" - }, - "devDependencies": { - "@types/brace-expansion": "^1.1.2", - "@types/node": "^24.0.0", - "mkdirp": "^3.0.1", - "prettier": "^3.3.2", - "tap": "^21.1.0", - "tshy": "^3.0.2", - "typedoc": "^0.28.5" - }, - "keywords": [ - "match", - "regexp", - "test", - "balanced", - "parse" - ], - "license": "MIT", - "engines": { - "node": "20 || >=22" - }, - "tshy": { - "exports": { - "./package.json": "./package.json", - ".": "./src/index.ts" - } - }, - "main": "./dist/commonjs/index.js", - "types": "./dist/commonjs/index.d.ts", - "module": "./dist/esm/index.js" -} diff --git a/node_modules/@isaacs/brace-expansion/LICENSE b/node_modules/@isaacs/brace-expansion/LICENSE deleted file mode 100644 index 46e7b75c..00000000 --- a/node_modules/@isaacs/brace-expansion/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -MIT License - -Copyright Julian Gruber - -TypeScript port Copyright Isaac Z. Schlueter - -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/@isaacs/brace-expansion/README.md b/node_modules/@isaacs/brace-expansion/README.md deleted file mode 100644 index e782af79..00000000 --- a/node_modules/@isaacs/brace-expansion/README.md +++ /dev/null @@ -1,97 +0,0 @@ -# @isaacs/brace-expansion - -A hybrid CJS/ESM TypeScript fork of -[brace-expansion](http://npm.im/brace-expansion). - -[Brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html), -as known from sh/bash, in JavaScript. - -[![CI](https://github.com/juliangruber/brace-expansion/actions/workflows/ci.yml/badge.svg)](https://github.com/juliangruber/brace-expansion/actions/workflows/ci.yml) -[![downloads](https://img.shields.io/npm/dm/brace-expansion.svg)](https://www.npmjs.org/package/brace-expansion) - -## Example - -```js -import { expand } from '@isaacs/brace-expansion' - -expand('file-{a,b,c}.jpg') -// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg'] - -expand('-v{,,}') -// => ['-v', '-v', '-v'] - -expand('file{0..2}.jpg') -// => ['file0.jpg', 'file1.jpg', 'file2.jpg'] - -expand('file-{a..c}.jpg') -// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg'] - -expand('file{2..0}.jpg') -// => ['file2.jpg', 'file1.jpg', 'file0.jpg'] - -expand('file{0..4..2}.jpg') -// => ['file0.jpg', 'file2.jpg', 'file4.jpg'] - -expand('file-{a..e..2}.jpg') -// => ['file-a.jpg', 'file-c.jpg', 'file-e.jpg'] - -expand('file{00..10..5}.jpg') -// => ['file00.jpg', 'file05.jpg', 'file10.jpg'] - -expand('{{A..C},{a..c}}') -// => ['A', 'B', 'C', 'a', 'b', 'c'] - -expand('ppp{,config,oe{,conf}}') -// => ['ppp', 'pppconfig', 'pppoe', 'pppoeconf'] -``` - -## API - -```js -import { expand } from '@isaacs/brace-expansion' -``` - -### const expanded = expand(str, [options]) - -Return an array of all possible and valid expansions of `str`. If -none are found, `[str]` is returned. - -The `options` object can provide a `max` value to cap the number -of expansions allowed. This is limited to `100_000` by default, -to prevent DoS attacks. - -```js -const expansions = expand('{1..100}'.repeat(5), { - max: 100, -}) -// expansions.length will be 100, not 100^5 -``` - -Valid expansions are: - -```js -;/^(.*,)+(.+)?$/ -// {a,b,...} -``` - -A comma separated list of options, like `{a,b}` or `{a,{b,c}}` or `{,a,}`. - -```js -;/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/ -// {x..y[..incr]} -``` - -A numeric sequence from `x` to `y` inclusive, with optional increment. -If `x` or `y` start with a leading `0`, all the numbers will be padded -to have equal length. Negative numbers and backwards iteration work too. - -```js -;/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/ -// {x..y[..incr]} -``` - -An alphabetic sequence from `x` to `y` inclusive, with optional increment. -`x` and `y` must be exactly one character, and if given, `incr` must be a -number. - -For compatibility reasons, the string `${` is not eligible for brace expansion. diff --git a/node_modules/@isaacs/brace-expansion/dist/commonjs/index.d.ts.map b/node_modules/@isaacs/brace-expansion/dist/commonjs/index.d.ts.map deleted file mode 100644 index a4f36aed..00000000 --- a/node_modules/@isaacs/brace-expansion/dist/commonjs/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAkBA,eAAO,MAAM,aAAa,SAAU,CAAA;AAwDpC,MAAM,MAAM,qBAAqB,GAAG;IAClC,GAAG,CAAC,EAAE,MAAM,CAAA;CACb,CAAA;AAED,wBAAgB,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,GAAE,qBAA0B,YAkBtE"} \ No newline at end of file diff --git a/node_modules/@isaacs/brace-expansion/dist/commonjs/index.js b/node_modules/@isaacs/brace-expansion/dist/commonjs/index.js deleted file mode 100644 index fafdb4b9..00000000 --- a/node_modules/@isaacs/brace-expansion/dist/commonjs/index.js +++ /dev/null @@ -1,199 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.EXPANSION_MAX = void 0; -exports.expand = expand; -const balanced_match_1 = require("@isaacs/balanced-match"); -const escSlash = '\0SLASH' + Math.random() + '\0'; -const escOpen = '\0OPEN' + Math.random() + '\0'; -const escClose = '\0CLOSE' + Math.random() + '\0'; -const escComma = '\0COMMA' + Math.random() + '\0'; -const escPeriod = '\0PERIOD' + Math.random() + '\0'; -const escSlashPattern = new RegExp(escSlash, 'g'); -const escOpenPattern = new RegExp(escOpen, 'g'); -const escClosePattern = new RegExp(escClose, 'g'); -const escCommaPattern = new RegExp(escComma, 'g'); -const escPeriodPattern = new RegExp(escPeriod, 'g'); -const slashPattern = /\\\\/g; -const openPattern = /\\{/g; -const closePattern = /\\}/g; -const commaPattern = /\\,/g; -const periodPattern = /\\./g; -exports.EXPANSION_MAX = 100_000; -function numeric(str) { - return !isNaN(str) ? parseInt(str, 10) : str.charCodeAt(0); -} -function escapeBraces(str) { - return str - .replace(slashPattern, escSlash) - .replace(openPattern, escOpen) - .replace(closePattern, escClose) - .replace(commaPattern, escComma) - .replace(periodPattern, escPeriod); -} -function unescapeBraces(str) { - return str - .replace(escSlashPattern, '\\') - .replace(escOpenPattern, '{') - .replace(escClosePattern, '}') - .replace(escCommaPattern, ',') - .replace(escPeriodPattern, '.'); -} -/** - * Basically just str.split(","), but handling cases - * where we have nested braced sections, which should be - * treated as individual members, like {a,{b,c},d} - */ -function parseCommaParts(str) { - if (!str) { - return ['']; - } - const parts = []; - const m = (0, balanced_match_1.balanced)('{', '}', str); - if (!m) { - return str.split(','); - } - const { pre, body, post } = m; - const p = pre.split(','); - p[p.length - 1] += '{' + body + '}'; - const postParts = parseCommaParts(post); - if (post.length) { - ; - p[p.length - 1] += postParts.shift(); - p.push.apply(p, postParts); - } - parts.push.apply(parts, p); - return parts; -} -function expand(str, options = {}) { - if (!str) { - return []; - } - const { max = exports.EXPANSION_MAX } = options; - // I don't know why Bash 4.3 does this, but it does. - // Anything starting with {} will have the first two bytes preserved - // but *only* at the top level, so {},a}b will not expand to anything, - // but a{},b}c will be expanded to [a}c,abc]. - // One could argue that this is a bug in Bash, but since the goal of - // this module is to match Bash's rules, we escape a leading {} - if (str.slice(0, 2) === '{}') { - str = '\\{\\}' + str.slice(2); - } - return expand_(escapeBraces(str), max, true).map(unescapeBraces); -} -function embrace(str) { - return '{' + str + '}'; -} -function isPadded(el) { - return /^-?0\d/.test(el); -} -function lte(i, y) { - return i <= y; -} -function gte(i, y) { - return i >= y; -} -function expand_(str, max, isTop) { - /** @type {string[]} */ - const expansions = []; - const m = (0, balanced_match_1.balanced)('{', '}', str); - if (!m) - return [str]; - // no need to expand pre, since it is guaranteed to be free of brace-sets - const pre = m.pre; - const post = m.post.length ? expand_(m.post, max, false) : ['']; - if (/\$$/.test(m.pre)) { - for (let k = 0; k < post.length && k < max; k++) { - const expansion = pre + '{' + m.body + '}' + post[k]; - expansions.push(expansion); - } - } - else { - const isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); - const isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); - const isSequence = isNumericSequence || isAlphaSequence; - const isOptions = m.body.indexOf(',') >= 0; - if (!isSequence && !isOptions) { - // {a},b} - if (m.post.match(/,(?!,).*\}/)) { - str = m.pre + '{' + m.body + escClose + m.post; - return expand_(str, max, true); - } - return [str]; - } - let n; - if (isSequence) { - n = m.body.split(/\.\./); - } - else { - n = parseCommaParts(m.body); - if (n.length === 1 && n[0] !== undefined) { - // x{{a,b}}y ==> x{a}y x{b}y - n = expand_(n[0], max, false).map(embrace); - //XXX is this necessary? Can't seem to hit it in tests. - /* c8 ignore start */ - if (n.length === 1) { - return post.map(p => m.pre + n[0] + p); - } - /* c8 ignore stop */ - } - } - // at this point, n is the parts, and we know it's not a comma set - // with a single entry. - let N; - if (isSequence && n[0] !== undefined && n[1] !== undefined) { - const x = numeric(n[0]); - const y = numeric(n[1]); - const width = Math.max(n[0].length, n[1].length); - let incr = n.length === 3 && n[2] !== undefined ? Math.abs(numeric(n[2])) : 1; - let test = lte; - const reverse = y < x; - if (reverse) { - incr *= -1; - test = gte; - } - const pad = n.some(isPadded); - N = []; - for (let i = x; test(i, y); i += incr) { - let c; - if (isAlphaSequence) { - c = String.fromCharCode(i); - if (c === '\\') { - c = ''; - } - } - else { - c = String(i); - if (pad) { - const need = width - c.length; - if (need > 0) { - const z = new Array(need + 1).join('0'); - if (i < 0) { - c = '-' + z + c.slice(1); - } - else { - c = z + c; - } - } - } - } - N.push(c); - } - } - else { - N = []; - for (let j = 0; j < n.length; j++) { - N.push.apply(N, expand_(n[j], max, false)); - } - } - for (let j = 0; j < N.length; j++) { - for (let k = 0; k < post.length && expansions.length < max; k++) { - const expansion = pre + N[j] + post[k]; - if (!isTop || isSequence || expansion) { - expansions.push(expansion); - } - } - } - } - return expansions; -} -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@isaacs/brace-expansion/dist/commonjs/index.js.map b/node_modules/@isaacs/brace-expansion/dist/commonjs/index.js.map deleted file mode 100644 index 7bdf62db..00000000 --- a/node_modules/@isaacs/brace-expansion/dist/commonjs/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AA8EA,wBAkBC;AAhGD,2DAAiD;AAEjD,MAAM,QAAQ,GAAG,SAAS,GAAG,IAAI,CAAC,MAAM,EAAE,GAAG,IAAI,CAAA;AACjD,MAAM,OAAO,GAAG,QAAQ,GAAG,IAAI,CAAC,MAAM,EAAE,GAAG,IAAI,CAAA;AAC/C,MAAM,QAAQ,GAAG,SAAS,GAAG,IAAI,CAAC,MAAM,EAAE,GAAG,IAAI,CAAA;AACjD,MAAM,QAAQ,GAAG,SAAS,GAAG,IAAI,CAAC,MAAM,EAAE,GAAG,IAAI,CAAA;AACjD,MAAM,SAAS,GAAG,UAAU,GAAG,IAAI,CAAC,MAAM,EAAE,GAAG,IAAI,CAAA;AACnD,MAAM,eAAe,GAAG,IAAI,MAAM,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAA;AACjD,MAAM,cAAc,GAAG,IAAI,MAAM,CAAC,OAAO,EAAE,GAAG,CAAC,CAAA;AAC/C,MAAM,eAAe,GAAG,IAAI,MAAM,CAAC,QAAQ,EAAE,GAAG,CAAC,CA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C,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAW,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC,CAAA;YACtD,CAAC;QACH,CAAC;QAED,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YAClC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,IAAI,UAAU,CAAC,MAAM,GAAG,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC;gBAChE,MAAM,SAAS,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAA;gBACtC,IAAI,CAAC,KAAK,IAAI,UAAU,IAAI,SAAS,EAAE,CAAC;oBACtC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;gBAC5B,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,UAAU,CAAA;AACnB,CAAC","sourcesContent":["import { balanced } from '@isaacs/balanced-match'\n\nconst escSlash = '\\0SLASH' + Math.random() + '\\0'\nconst escOpen = '\\0OPEN' + Math.random() + '\\0'\nconst escClose = '\\0CLOSE' + Math.random() + '\\0'\nconst escComma = '\\0COMMA' + Math.random() + '\\0'\nconst escPeriod = '\\0PERIOD' + Math.random() + '\\0'\nconst escSlashPattern = new RegExp(escSlash, 'g')\nconst escOpenPattern = new RegExp(escOpen, 'g')\nconst escClosePattern = new RegExp(escClose, 'g')\nconst escCommaPattern = new RegExp(escComma, 'g')\nconst escPeriodPattern = new RegExp(escPeriod, 'g')\nconst slashPattern = /\\\\\\\\/g\nconst openPattern = /\\\\{/g\nconst closePattern = /\\\\}/g\nconst commaPattern = /\\\\,/g\nconst periodPattern = /\\\\./g\n\nexport const EXPANSION_MAX = 100_000\n\nfunction numeric(str: string) {\n return !isNaN(str as any) ? parseInt(str, 10) : str.charCodeAt(0)\n}\n\nfunction escapeBraces(str: string) {\n return str\n .replace(slashPattern, escSlash)\n .replace(openPattern, escOpen)\n .replace(closePattern, escClose)\n .replace(commaPattern, escComma)\n .replace(periodPattern, escPeriod)\n}\n\nfunction unescapeBraces(str: string) {\n return str\n .replace(escSlashPattern, '\\\\')\n .replace(escOpenPattern, '{')\n .replace(escClosePattern, '}')\n .replace(escCommaPattern, ',')\n .replace(escPeriodPattern, '.')\n}\n\n/**\n * Basically just str.split(\",\"), but handling cases\n * where we have nested braced sections, which should be\n * treated as individual members, like {a,{b,c},d}\n */\nfunction parseCommaParts(str: string) {\n if (!str) {\n return ['']\n }\n\n const parts: string[] = []\n const m = balanced('{', '}', str)\n\n if (!m) {\n return str.split(',')\n }\n\n const { pre, body, post } = m\n const p = pre.split(',')\n\n p[p.length - 1] += '{' + body + '}'\n const postParts = parseCommaParts(post)\n if (post.length) {\n ;(p[p.length - 1] as string) += postParts.shift()\n p.push.apply(p, postParts)\n }\n\n parts.push.apply(parts, p)\n\n return parts\n}\n\nexport type BraceExpansionOptions = {\n max?: number\n}\n\nexport function expand(str: string, options: BraceExpansionOptions = {}) {\n if (!str) {\n return []\n }\n\n const { max = EXPANSION_MAX } = options\n\n // I don't know why Bash 4.3 does this, but it does.\n // Anything starting with {} will have the first two bytes preserved\n // but *only* at the top level, so {},a}b will not expand to anything,\n // but a{},b}c will be expanded to [a}c,abc].\n // One could argue that this is a bug in Bash, but since the goal of\n // this module is to match Bash's rules, we escape a leading {}\n if (str.slice(0, 2) === '{}') {\n str = '\\\\{\\\\}' + str.slice(2)\n }\n\n return expand_(escapeBraces(str), max, true).map(unescapeBraces)\n}\n\nfunction embrace(str: string) {\n return '{' + str + '}'\n}\n\nfunction isPadded(el: string) {\n return /^-?0\\d/.test(el)\n}\n\nfunction lte(i: number, y: number) {\n return i <= y\n}\n\nfunction gte(i: number, y: number) {\n return i >= y\n}\n\nfunction expand_(str: string, max: number, isTop: boolean): string[] {\n /** @type {string[]} */\n const expansions: string[] = []\n\n const m = balanced('{', '}', str)\n if (!m) return [str]\n\n // no need to expand pre, since it is guaranteed to be free of brace-sets\n const pre = m.pre\n const post: string[] = m.post.length ? expand_(m.post, max, false) : ['']\n\n if (/\\$$/.test(m.pre)) {\n for (let k = 0; k < post.length && k < max; k++) {\n const expansion = pre + '{' + m.body + '}' + post[k]\n expansions.push(expansion)\n }\n } else {\n const isNumericSequence = /^-?\\d+\\.\\.-?\\d+(?:\\.\\.-?\\d+)?$/.test(m.body)\n const isAlphaSequence = /^[a-zA-Z]\\.\\.[a-zA-Z](?:\\.\\.-?\\d+)?$/.test(\n m.body,\n )\n const isSequence = isNumericSequence || isAlphaSequence\n const isOptions = m.body.indexOf(',') >= 0\n if (!isSequence && !isOptions) {\n // {a},b}\n if (m.post.match(/,(?!,).*\\}/)) {\n str = m.pre + '{' + m.body + escClose + m.post\n return expand_(str, max, true)\n }\n return [str]\n }\n\n let n: string[]\n if (isSequence) {\n n = m.body.split(/\\.\\./)\n } else {\n n = parseCommaParts(m.body)\n if (n.length === 1 && n[0] !== undefined) {\n // x{{a,b}}y ==> x{a}y x{b}y\n n = expand_(n[0], max, false).map(embrace)\n //XXX is this necessary? Can't seem to hit it in tests.\n /* c8 ignore start */\n if (n.length === 1) {\n return post.map(p => m.pre + n[0] + p)\n }\n /* c8 ignore stop */\n }\n }\n\n // at this point, n is the parts, and we know it's not a comma set\n // with a single entry.\n let N: string[]\n\n if (isSequence && n[0] !== undefined && n[1] !== undefined) {\n const x = numeric(n[0])\n const y = numeric(n[1])\n const width = Math.max(n[0].length, n[1].length)\n let incr =\n n.length === 3 && n[2] !== undefined ? Math.abs(numeric(n[2])) : 1\n let test = lte\n const reverse = y < x\n if (reverse) {\n incr *= -1\n test = gte\n }\n const pad = n.some(isPadded)\n\n N = []\n\n for (let i = x; test(i, y); i += incr) {\n let c\n if (isAlphaSequence) {\n c = String.fromCharCode(i)\n if (c === '\\\\') {\n c = ''\n }\n } else {\n c = String(i)\n if (pad) {\n const need = width - c.length\n if (need > 0) {\n const z = new Array(need + 1).join('0')\n if (i < 0) {\n c = '-' + z + c.slice(1)\n } else {\n c = z + c\n }\n }\n }\n }\n N.push(c)\n }\n } else {\n N = []\n\n for (let j = 0; j < n.length; j++) {\n N.push.apply(N, expand_(n[j] as string, max, false))\n }\n }\n\n for (let j = 0; j < N.length; j++) {\n for (let k = 0; k < post.length && expansions.length < max; k++) {\n const expansion = pre + N[j] + post[k]\n if (!isTop || isSequence || expansion) {\n expansions.push(expansion)\n }\n }\n }\n }\n\n return expansions\n}\n"]} \ No newline at end of file diff --git a/node_modules/@isaacs/brace-expansion/dist/esm/index.d.ts.map b/node_modules/@isaacs/brace-expansion/dist/esm/index.d.ts.map deleted file mode 100644 index a4f36aed..00000000 --- a/node_modules/@isaacs/brace-expansion/dist/esm/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAkBA,eAAO,MAAM,aAAa,SAAU,CAAA;AAwDpC,MAAM,MAAM,qBAAqB,GAAG;IAClC,GAAG,CAAC,EAAE,MAAM,CAAA;CACb,CAAA;AAED,wBAAgB,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,GAAE,qBAA0B,YAkBtE"} \ No newline at end of file diff --git a/node_modules/@isaacs/brace-expansion/dist/esm/index.js b/node_modules/@isaacs/brace-expansion/dist/esm/index.js deleted file mode 100644 index 5c67f519..00000000 --- a/node_modules/@isaacs/brace-expansion/dist/esm/index.js +++ /dev/null @@ -1,195 +0,0 @@ -import { balanced } from '@isaacs/balanced-match'; -const escSlash = '\0SLASH' + Math.random() + '\0'; -const escOpen = '\0OPEN' + Math.random() + '\0'; -const escClose = '\0CLOSE' + Math.random() + '\0'; -const escComma = '\0COMMA' + Math.random() + '\0'; -const escPeriod = '\0PERIOD' + Math.random() + '\0'; -const escSlashPattern = new RegExp(escSlash, 'g'); -const escOpenPattern = new RegExp(escOpen, 'g'); -const escClosePattern = new RegExp(escClose, 'g'); -const escCommaPattern = new RegExp(escComma, 'g'); -const escPeriodPattern = new RegExp(escPeriod, 'g'); -const slashPattern = /\\\\/g; -const openPattern = /\\{/g; -const closePattern = /\\}/g; -const commaPattern = /\\,/g; -const periodPattern = /\\./g; -export const EXPANSION_MAX = 100_000; -function numeric(str) { - return !isNaN(str) ? parseInt(str, 10) : str.charCodeAt(0); -} -function escapeBraces(str) { - return str - .replace(slashPattern, escSlash) - .replace(openPattern, escOpen) - .replace(closePattern, escClose) - .replace(commaPattern, escComma) - .replace(periodPattern, escPeriod); -} -function unescapeBraces(str) { - return str - .replace(escSlashPattern, '\\') - .replace(escOpenPattern, '{') - .replace(escClosePattern, '}') - .replace(escCommaPattern, ',') - .replace(escPeriodPattern, '.'); -} -/** - * Basically just str.split(","), but handling cases - * where we have nested braced sections, which should be - * treated as individual members, like {a,{b,c},d} - */ -function parseCommaParts(str) { - if (!str) { - return ['']; - } - const parts = []; - const m = balanced('{', '}', str); - if (!m) { - return str.split(','); - } - const { pre, body, post } = m; - const p = pre.split(','); - p[p.length - 1] += '{' + body + '}'; - const postParts = parseCommaParts(post); - if (post.length) { - ; - p[p.length - 1] += postParts.shift(); - p.push.apply(p, postParts); - } - parts.push.apply(parts, p); - return parts; -} -export function expand(str, options = {}) { - if (!str) { - return []; - } - const { max = EXPANSION_MAX } = options; - // I don't know why Bash 4.3 does this, but it does. - // Anything starting with {} will have the first two bytes preserved - // but *only* at the top level, so {},a}b will not expand to anything, - // but a{},b}c will be expanded to [a}c,abc]. - // One could argue that this is a bug in Bash, but since the goal of - // this module is to match Bash's rules, we escape a leading {} - if (str.slice(0, 2) === '{}') { - str = '\\{\\}' + str.slice(2); - } - return expand_(escapeBraces(str), max, true).map(unescapeBraces); -} -function embrace(str) { - return '{' + str + '}'; -} -function isPadded(el) { - return /^-?0\d/.test(el); -} -function lte(i, y) { - return i <= y; -} -function gte(i, y) { - return i >= y; -} -function expand_(str, max, isTop) { - /** @type {string[]} */ - const expansions = []; - const m = balanced('{', '}', str); - if (!m) - return [str]; - // no need to expand pre, since it is guaranteed to be free of brace-sets - const pre = m.pre; - const post = m.post.length ? expand_(m.post, max, false) : ['']; - if (/\$$/.test(m.pre)) { - for (let k = 0; k < post.length && k < max; k++) { - const expansion = pre + '{' + m.body + '}' + post[k]; - expansions.push(expansion); - } - } - else { - const isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); - const isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); - const isSequence = isNumericSequence || isAlphaSequence; - const isOptions = m.body.indexOf(',') >= 0; - if (!isSequence && !isOptions) { - // {a},b} - if (m.post.match(/,(?!,).*\}/)) { - str = m.pre + '{' + m.body + escClose + m.post; - return expand_(str, max, true); - } - return [str]; - } - let n; - if (isSequence) { - n = m.body.split(/\.\./); - } - else { - n = parseCommaParts(m.body); - if (n.length === 1 && n[0] !== undefined) { - // x{{a,b}}y ==> x{a}y x{b}y - n = expand_(n[0], max, false).map(embrace); - //XXX is this necessary? Can't seem to hit it in tests. - /* c8 ignore start */ - if (n.length === 1) { - return post.map(p => m.pre + n[0] + p); - } - /* c8 ignore stop */ - } - } - // at this point, n is the parts, and we know it's not a comma set - // with a single entry. - let N; - if (isSequence && n[0] !== undefined && n[1] !== undefined) { - const x = numeric(n[0]); - const y = numeric(n[1]); - const width = Math.max(n[0].length, n[1].length); - let incr = n.length === 3 && n[2] !== undefined ? Math.abs(numeric(n[2])) : 1; - let test = lte; - const reverse = y < x; - if (reverse) { - incr *= -1; - test = gte; - } - const pad = n.some(isPadded); - N = []; - for (let i = x; test(i, y); i += incr) { - let c; - if (isAlphaSequence) { - c = String.fromCharCode(i); - if (c === '\\') { - c = ''; - } - } - else { - c = String(i); - if (pad) { - const need = width - c.length; - if (need > 0) { - const z = new Array(need + 1).join('0'); - if (i < 0) { - c = '-' + z + c.slice(1); - } - else { - c = z + c; - } - } - } - } - N.push(c); - } - } - else { - N = []; - for (let j = 0; j < n.length; j++) { - N.push.apply(N, expand_(n[j], max, false)); - } - } - for (let j = 0; j < N.length; j++) { - for (let k = 0; k < post.length && expansions.length < max; k++) { - const expansion = pre + N[j] + post[k]; - if (!isTop || isSequence || expansion) { - expansions.push(expansion); - } - } - } - } - return expansions; -} -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@isaacs/brace-expansion/dist/esm/index.js.map b/node_modules/@isaacs/brace-expansion/dist/esm/index.js.map deleted file mode 100644 index 747e9953..00000000 --- a/node_modules/@isaacs/brace-expansion/dist/esm/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAA;AAEjD,MAAM,QAAQ,GAAG,SAAS,GAAG,IAAI,CAAC,MAAM,EAAE,GAAG,IAAI,CAAA;AACjD,MAAM,OAAO,GAAG,QAAQ,GAAG,IAAI,CAAC,MAAM,EAAE,GAAG,IAAI,CAAA;AAC/C,MAAM,QAAQ,GAAG,SAAS,GAAG,IAAI,CAAC,MAAM,EAAE,GAAG,IAAI,CAAA;AACjD,MAAM,QAAQ,GAAG,SAAS,GAAG,IAAI,CAAC,MAAM,EAAE,GAAG,IAAI,CAAA;AACjD,MAAM,SAAS,GAAG,UAAU,GAAG,IAAI,CAAC,MAAM,EAAE,GAAG,IAAI,CAAA;AACnD,MAAM,eAAe,GAAG,IAAI,MAAM,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAA;AACjD,MAAM,cAAc,GAAG,IAAI,MAAM,CAAC,OAAO,EAAE,GAAG,CAAC,CAAA;AAC/C,MAAM,eAAe,GAAG,IAAI,MAAM,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAA;AACjD,MAAM,eAAe,GAAG,IAAI,MAAM,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAA;AAC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AW,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC,CAAA;YACtD,CAAC;QACH,CAAC;QAED,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YAClC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,IAAI,UAAU,CAAC,MAAM,GAAG,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC;gBAChE,MAAM,SAAS,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAA;gBACtC,IAAI,CAAC,KAAK,IAAI,UAAU,IAAI,SAAS,EAAE,CAAC;oBACtC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;gBAC5B,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,UAAU,CAAA;AACnB,CAAC","sourcesContent":["import { balanced } from '@isaacs/balanced-match'\n\nconst escSlash = '\\0SLASH' + Math.random() + '\\0'\nconst escOpen = '\\0OPEN' + Math.random() + '\\0'\nconst escClose = '\\0CLOSE' + Math.random() + '\\0'\nconst escComma = '\\0COMMA' + Math.random() + '\\0'\nconst escPeriod = '\\0PERIOD' + Math.random() + '\\0'\nconst escSlashPattern = new RegExp(escSlash, 'g')\nconst escOpenPattern = new RegExp(escOpen, 'g')\nconst escClosePattern = new RegExp(escClose, 'g')\nconst escCommaPattern = new RegExp(escComma, 'g')\nconst escPeriodPattern = new RegExp(escPeriod, 'g')\nconst slashPattern = /\\\\\\\\/g\nconst openPattern = /\\\\{/g\nconst closePattern = /\\\\}/g\nconst commaPattern = /\\\\,/g\nconst periodPattern = /\\\\./g\n\nexport const EXPANSION_MAX = 100_000\n\nfunction numeric(str: string) {\n return !isNaN(str as any) ? parseInt(str, 10) : str.charCodeAt(0)\n}\n\nfunction escapeBraces(str: string) {\n return str\n .replace(slashPattern, escSlash)\n .replace(openPattern, escOpen)\n .replace(closePattern, escClose)\n .replace(commaPattern, escComma)\n .replace(periodPattern, escPeriod)\n}\n\nfunction unescapeBraces(str: string) {\n return str\n .replace(escSlashPattern, '\\\\')\n .replace(escOpenPattern, '{')\n .replace(escClosePattern, '}')\n .replace(escCommaPattern, ',')\n .replace(escPeriodPattern, '.')\n}\n\n/**\n * Basically just str.split(\",\"), but handling cases\n * where we have nested braced sections, which should be\n * treated as individual members, like {a,{b,c},d}\n */\nfunction parseCommaParts(str: string) {\n if (!str) {\n return ['']\n }\n\n const parts: string[] = []\n const m = balanced('{', '}', str)\n\n if (!m) {\n return str.split(',')\n }\n\n const { pre, body, post } = m\n const p = pre.split(',')\n\n p[p.length - 1] += '{' + body + '}'\n const postParts = parseCommaParts(post)\n if (post.length) {\n ;(p[p.length - 1] as string) += postParts.shift()\n p.push.apply(p, postParts)\n }\n\n parts.push.apply(parts, p)\n\n return parts\n}\n\nexport type BraceExpansionOptions = {\n max?: number\n}\n\nexport function expand(str: string, options: BraceExpansionOptions = {}) {\n if (!str) {\n return []\n }\n\n const { max = EXPANSION_MAX } = options\n\n // I don't know why Bash 4.3 does this, but it does.\n // Anything starting with {} will have the first two bytes preserved\n // but *only* at the top level, so {},a}b will not expand to anything,\n // but a{},b}c will be expanded to [a}c,abc].\n // One could argue that this is a bug in Bash, but since the goal of\n // this module is to match Bash's rules, we escape a leading {}\n if (str.slice(0, 2) === '{}') {\n str = '\\\\{\\\\}' + str.slice(2)\n }\n\n return expand_(escapeBraces(str), max, true).map(unescapeBraces)\n}\n\nfunction embrace(str: string) {\n return '{' + str + '}'\n}\n\nfunction isPadded(el: string) {\n return /^-?0\\d/.test(el)\n}\n\nfunction lte(i: number, y: number) {\n return i <= y\n}\n\nfunction gte(i: number, y: number) {\n return i >= y\n}\n\nfunction expand_(str: string, max: number, isTop: boolean): string[] {\n /** @type {string[]} */\n const expansions: string[] = []\n\n const m = balanced('{', '}', str)\n if (!m) return [str]\n\n // no need to expand pre, since it is guaranteed to be free of brace-sets\n const pre = m.pre\n const post: string[] = m.post.length ? expand_(m.post, max, false) : ['']\n\n if (/\\$$/.test(m.pre)) {\n for (let k = 0; k < post.length && k < max; k++) {\n const expansion = pre + '{' + m.body + '}' + post[k]\n expansions.push(expansion)\n }\n } else {\n const isNumericSequence = /^-?\\d+\\.\\.-?\\d+(?:\\.\\.-?\\d+)?$/.test(m.body)\n const isAlphaSequence = /^[a-zA-Z]\\.\\.[a-zA-Z](?:\\.\\.-?\\d+)?$/.test(\n m.body,\n )\n const isSequence = isNumericSequence || isAlphaSequence\n const isOptions = m.body.indexOf(',') >= 0\n if (!isSequence && !isOptions) {\n // {a},b}\n if (m.post.match(/,(?!,).*\\}/)) {\n str = m.pre + '{' + m.body + escClose + m.post\n return expand_(str, max, true)\n }\n return [str]\n }\n\n let n: string[]\n if (isSequence) {\n n = m.body.split(/\\.\\./)\n } else {\n n = parseCommaParts(m.body)\n if (n.length === 1 && n[0] !== undefined) {\n // x{{a,b}}y ==> x{a}y x{b}y\n n = expand_(n[0], max, false).map(embrace)\n //XXX is this necessary? Can't seem to hit it in tests.\n /* c8 ignore start */\n if (n.length === 1) {\n return post.map(p => m.pre + n[0] + p)\n }\n /* c8 ignore stop */\n }\n }\n\n // at this point, n is the parts, and we know it's not a comma set\n // with a single entry.\n let N: string[]\n\n if (isSequence && n[0] !== undefined && n[1] !== undefined) {\n const x = numeric(n[0])\n const y = numeric(n[1])\n const width = Math.max(n[0].length, n[1].length)\n let incr =\n n.length === 3 && n[2] !== undefined ? Math.abs(numeric(n[2])) : 1\n let test = lte\n const reverse = y < x\n if (reverse) {\n incr *= -1\n test = gte\n }\n const pad = n.some(isPadded)\n\n N = []\n\n for (let i = x; test(i, y); i += incr) {\n let c\n if (isAlphaSequence) {\n c = String.fromCharCode(i)\n if (c === '\\\\') {\n c = ''\n }\n } else {\n c = String(i)\n if (pad) {\n const need = width - c.length\n if (need > 0) {\n const z = new Array(need + 1).join('0')\n if (i < 0) {\n c = '-' + z + c.slice(1)\n } else {\n c = z + c\n }\n }\n }\n }\n N.push(c)\n }\n } else {\n N = []\n\n for (let j = 0; j < n.length; j++) {\n N.push.apply(N, expand_(n[j] as string, max, false))\n }\n }\n\n for (let j = 0; j < N.length; j++) {\n for (let k = 0; k < post.length && expansions.length < max; k++) {\n const expansion = pre + N[j] + post[k]\n if (!isTop || isSequence || expansion) {\n expansions.push(expansion)\n }\n }\n }\n }\n\n return expansions\n}\n"]} \ No newline at end of file diff --git a/node_modules/@isaacs/brace-expansion/package.json b/node_modules/@isaacs/brace-expansion/package.json deleted file mode 100644 index 0356a292..00000000 --- a/node_modules/@isaacs/brace-expansion/package.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "name": "@isaacs/brace-expansion", - "description": "Brace expansion as known from sh/bash", - "version": "5.0.1", - "files": [ - "dist" - ], - "exports": { - "./package.json": "./package.json", - ".": { - "import": { - "types": "./dist/esm/index.d.ts", - "default": "./dist/esm/index.js" - }, - "require": { - "types": "./dist/commonjs/index.d.ts", - "default": "./dist/commonjs/index.js" - } - } - }, - "type": "module", - "scripts": { - "preversion": "npm test", - "postversion": "npm publish", - "prepublishOnly": "git push origin --follow-tags", - "prepare": "tshy", - "pretest": "npm run prepare", - "presnap": "npm run prepare", - "test": "tap", - "snap": "tap", - "format": "prettier --write .", - "benchmark": "node benchmark/index.js", - "typedoc": "typedoc --tsconfig .tshy/esm.json ./src/*.ts" - }, - "devDependencies": { - "@types/brace-expansion": "^1.1.2", - "@types/node": "^24.0.0", - "mkdirp": "^3.0.1", - "prettier": "^3.3.2", - "tap": "^21.5.0", - "tshy": "^3.0.2", - "typedoc": "^0.28.5" - }, - "dependencies": { - "@isaacs/balanced-match": "^4.0.1" - }, - "license": "MIT", - "engines": { - "node": "20 || >=22" - }, - "tshy": { - "exports": { - "./package.json": "./package.json", - ".": "./src/index.ts" - } - }, - "main": "./dist/commonjs/index.js", - "types": "./dist/commonjs/index.d.ts", - "module": "./dist/esm/index.js" -} diff --git a/node_modules/@isaacs/cliui/LICENSE.txt b/node_modules/@isaacs/cliui/LICENSE.txt deleted file mode 100644 index c7e27478..00000000 --- a/node_modules/@isaacs/cliui/LICENSE.txt +++ /dev/null @@ -1,14 +0,0 @@ -Copyright (c) 2015, 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/@isaacs/cliui/README.md b/node_modules/@isaacs/cliui/README.md deleted file mode 100644 index 48806426..00000000 --- a/node_modules/@isaacs/cliui/README.md +++ /dev/null @@ -1,143 +0,0 @@ -# @isaacs/cliui - -Temporary fork of [cliui](http://npm.im/cliui). - -![ci](https://github.com/yargs/cliui/workflows/ci/badge.svg) -[![NPM version](https://img.shields.io/npm/v/cliui.svg)](https://www.npmjs.com/package/cliui) -[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org) -![nycrc config on GitHub](https://img.shields.io/nycrc/yargs/cliui) - -easily create complex multi-column command-line-interfaces. - -## Example - -```js -const ui = require('cliui')() - -ui.div('Usage: $0 [command] [options]') - -ui.div({ - text: 'Options:', - padding: [2, 0, 1, 0] -}) - -ui.div( - { - text: "-f, --file", - width: 20, - padding: [0, 4, 0, 4] - }, - { - text: "the file to load." + - chalk.green("(if this description is long it wraps).") - , - width: 20 - }, - { - text: chalk.red("[required]"), - align: 'right' - } -) - -console.log(ui.toString()) -``` - -## Deno/ESM Support - -As of `v7` `cliui` supports [Deno](https://github.com/denoland/deno) and -[ESM](https://nodejs.org/api/esm.html#esm_ecmascript_modules): - -```typescript -import cliui from "https://deno.land/x/cliui/deno.ts"; - -const ui = cliui({}) - -ui.div('Usage: $0 [command] [options]') - -ui.div({ - text: 'Options:', - padding: [2, 0, 1, 0] -}) - -ui.div({ - text: "-f, --file", - width: 20, - padding: [0, 4, 0, 4] -}) - -console.log(ui.toString()) -``` - - - -## Layout DSL - -cliui exposes a simple layout DSL: - -If you create a single `ui.div`, passing a string rather than an -object: - -* `\n`: characters will be interpreted as new rows. -* `\t`: characters will be interpreted as new columns. -* `\s`: characters will be interpreted as padding. - -**as an example...** - -```js -var ui = require('./')({ - width: 60 -}) - -ui.div( - 'Usage: node ./bin/foo.js\n' + - ' \t provide a regex\n' + - ' \t provide a glob\t [required]' -) - -console.log(ui.toString()) -``` - -**will output:** - -```shell -Usage: node ./bin/foo.js - provide a regex - provide a glob [required] -``` - -## Methods - -```js -cliui = require('cliui') -``` - -### cliui({width: integer}) - -Specify the maximum width of the UI being generated. -If no width is provided, cliui will try to get the current window's width and use it, and if that doesn't work, width will be set to `80`. - -### cliui({wrap: boolean}) - -Enable or disable the wrapping of text in a column. - -### cliui.div(column, column, column) - -Create a row with any number of columns, a column -can either be a string, or an object with the following -options: - -* **text:** some text to place in the column. -* **width:** the width of a column. -* **align:** alignment, `right` or `center`. -* **padding:** `[top, right, bottom, left]`. -* **border:** should a border be placed around the div? - -### cliui.span(column, column, column) - -Similar to `div`, except the next row will be appended without -a new line being created. - -### cliui.resetOutput() - -Resets the UI elements of the current cliui instance, maintaining the values -set for `width` and `wrap`. diff --git a/node_modules/@isaacs/cliui/build/index.cjs b/node_modules/@isaacs/cliui/build/index.cjs deleted file mode 100644 index aca2b850..00000000 --- a/node_modules/@isaacs/cliui/build/index.cjs +++ /dev/null @@ -1,317 +0,0 @@ -'use strict'; - -const align = { - right: alignRight, - center: alignCenter -}; -const top = 0; -const right = 1; -const bottom = 2; -const left = 3; -class UI { - constructor(opts) { - var _a; - this.width = opts.width; - /* c8 ignore start */ - this.wrap = (_a = opts.wrap) !== null && _a !== void 0 ? _a : true; - /* c8 ignore stop */ - this.rows = []; - } - span(...args) { - const cols = this.div(...args); - cols.span = true; - } - resetOutput() { - this.rows = []; - } - div(...args) { - if (args.length === 0) { - this.div(''); - } - if (this.wrap && this.shouldApplyLayoutDSL(...args) && typeof args[0] === 'string') { - return this.applyLayoutDSL(args[0]); - } - const cols = args.map(arg => { - if (typeof arg === 'string') { - return this.colFromString(arg); - } - return arg; - }); - this.rows.push(cols); - return cols; - } - shouldApplyLayoutDSL(...args) { - return args.length === 1 && typeof args[0] === 'string' && - /[\t\n]/.test(args[0]); - } - applyLayoutDSL(str) { - const rows = str.split('\n').map(row => row.split('\t')); - let leftColumnWidth = 0; - // simple heuristic for layout, make sure the - // second column lines up along the left-hand. - // don't allow the first column to take up more - // than 50% of the screen. - rows.forEach(columns => { - if (columns.length > 1 && mixin.stringWidth(columns[0]) > leftColumnWidth) { - leftColumnWidth = Math.min(Math.floor(this.width * 0.5), mixin.stringWidth(columns[0])); - } - }); - // generate a table: - // replacing ' ' with padding calculations. - // using the algorithmically generated width. - rows.forEach(columns => { - this.div(...columns.map((r, i) => { - return { - text: r.trim(), - padding: this.measurePadding(r), - width: (i === 0 && columns.length > 1) ? leftColumnWidth : undefined - }; - })); - }); - return this.rows[this.rows.length - 1]; - } - colFromString(text) { - return { - text, - padding: this.measurePadding(text) - }; - } - measurePadding(str) { - // measure padding without ansi escape codes - const noAnsi = mixin.stripAnsi(str); - return [0, noAnsi.match(/\s*$/)[0].length, 0, noAnsi.match(/^\s*/)[0].length]; - } - toString() { - const lines = []; - this.rows.forEach(row => { - this.rowToString(row, lines); - }); - // don't display any lines with the - // hidden flag set. - return lines - .filter(line => !line.hidden) - .map(line => line.text) - .join('\n'); - } - rowToString(row, lines) { - this.rasterize(row).forEach((rrow, r) => { - let str = ''; - rrow.forEach((col, c) => { - const { width } = row[c]; // the width with padding. - const wrapWidth = this.negatePadding(row[c]); // the width without padding. - let ts = col; // temporary string used during alignment/padding. - if (wrapWidth > mixin.stringWidth(col)) { - ts += ' '.repeat(wrapWidth - mixin.stringWidth(col)); - } - // align the string within its column. - if (row[c].align && row[c].align !== 'left' && this.wrap) { - const fn = align[row[c].align]; - ts = fn(ts, wrapWidth); - if (mixin.stringWidth(ts) < wrapWidth) { - /* c8 ignore start */ - const w = width || 0; - /* c8 ignore stop */ - ts += ' '.repeat(w - mixin.stringWidth(ts) - 1); - } - } - // apply border and padding to string. - const padding = row[c].padding || [0, 0, 0, 0]; - if (padding[left]) { - str += ' '.repeat(padding[left]); - } - str += addBorder(row[c], ts, '| '); - str += ts; - str += addBorder(row[c], ts, ' |'); - if (padding[right]) { - str += ' '.repeat(padding[right]); - } - // if prior row is span, try to render the - // current row on the prior line. - if (r === 0 && lines.length > 0) { - str = this.renderInline(str, lines[lines.length - 1]); - } - }); - // remove trailing whitespace. - lines.push({ - text: str.replace(/ +$/, ''), - span: row.span - }); - }); - return lines; - } - // if the full 'source' can render in - // the target line, do so. - renderInline(source, previousLine) { - const match = source.match(/^ */); - /* c8 ignore start */ - const leadingWhitespace = match ? match[0].length : 0; - /* c8 ignore stop */ - const target = previousLine.text; - const targetTextWidth = mixin.stringWidth(target.trimEnd()); - if (!previousLine.span) { - return source; - } - // if we're not applying wrapping logic, - // just always append to the span. - if (!this.wrap) { - previousLine.hidden = true; - return target + source; - } - if (leadingWhitespace < targetTextWidth) { - return source; - } - previousLine.hidden = true; - return target.trimEnd() + ' '.repeat(leadingWhitespace - targetTextWidth) + source.trimStart(); - } - rasterize(row) { - const rrows = []; - const widths = this.columnWidths(row); - let wrapped; - // word wrap all columns, and create - // a data-structure that is easy to rasterize. - row.forEach((col, c) => { - // leave room for left and right padding. - col.width = widths[c]; - if (this.wrap) { - wrapped = mixin.wrap(col.text, this.negatePadding(col), { hard: true }).split('\n'); - } - else { - wrapped = col.text.split('\n'); - } - if (col.border) { - wrapped.unshift('.' + '-'.repeat(this.negatePadding(col) + 2) + '.'); - wrapped.push("'" + '-'.repeat(this.negatePadding(col) + 2) + "'"); - } - // add top and bottom padding. - if (col.padding) { - wrapped.unshift(...new Array(col.padding[top] || 0).fill('')); - wrapped.push(...new Array(col.padding[bottom] || 0).fill('')); - } - wrapped.forEach((str, r) => { - if (!rrows[r]) { - rrows.push([]); - } - const rrow = rrows[r]; - for (let i = 0; i < c; i++) { - if (rrow[i] === undefined) { - rrow.push(''); - } - } - rrow.push(str); - }); - }); - return rrows; - } - negatePadding(col) { - /* c8 ignore start */ - let wrapWidth = col.width || 0; - /* c8 ignore stop */ - if (col.padding) { - wrapWidth -= (col.padding[left] || 0) + (col.padding[right] || 0); - } - if (col.border) { - wrapWidth -= 4; - } - return wrapWidth; - } - columnWidths(row) { - if (!this.wrap) { - return row.map(col => { - return col.width || mixin.stringWidth(col.text); - }); - } - let unset = row.length; - let remainingWidth = this.width; - // column widths can be set in config. - const widths = row.map(col => { - if (col.width) { - unset--; - remainingWidth -= col.width; - return col.width; - } - return undefined; - }); - // any unset widths should be calculated. - /* c8 ignore start */ - const unsetWidth = unset ? Math.floor(remainingWidth / unset) : 0; - /* c8 ignore stop */ - return widths.map((w, i) => { - if (w === undefined) { - return Math.max(unsetWidth, _minWidth(row[i])); - } - return w; - }); - } -} -function addBorder(col, ts, style) { - if (col.border) { - if (/[.']-+[.']/.test(ts)) { - return ''; - } - if (ts.trim().length !== 0) { - return style; - } - return ' '; - } - return ''; -} -// calculates the minimum width of -// a column, based on padding preferences. -function _minWidth(col) { - const padding = col.padding || []; - const minWidth = 1 + (padding[left] || 0) + (padding[right] || 0); - if (col.border) { - return minWidth + 4; - } - return minWidth; -} -function getWindowWidth() { - /* c8 ignore start */ - if (typeof process === 'object' && process.stdout && process.stdout.columns) { - return process.stdout.columns; - } - return 80; -} -/* c8 ignore stop */ -function alignRight(str, width) { - str = str.trim(); - const strWidth = mixin.stringWidth(str); - if (strWidth < width) { - return ' '.repeat(width - strWidth) + str; - } - return str; -} -function alignCenter(str, width) { - str = str.trim(); - const strWidth = mixin.stringWidth(str); - /* c8 ignore start */ - if (strWidth >= width) { - return str; - } - /* c8 ignore stop */ - return ' '.repeat((width - strWidth) >> 1) + str; -} -let mixin; -function cliui(opts, _mixin) { - mixin = _mixin; - return new UI({ - /* c8 ignore start */ - width: (opts === null || opts === void 0 ? void 0 : opts.width) || getWindowWidth(), - wrap: opts === null || opts === void 0 ? void 0 : opts.wrap - /* c8 ignore stop */ - }); -} - -// Bootstrap cliui with CommonJS dependencies: -const stringWidth = require('string-width-cjs'); -const stripAnsi = require('strip-ansi-cjs'); -const wrap = require('wrap-ansi-cjs'); -function ui(opts) { - return cliui(opts, { - stringWidth, - stripAnsi, - wrap - }); -} - -module.exports = ui; diff --git a/node_modules/@isaacs/cliui/build/index.d.cts b/node_modules/@isaacs/cliui/build/index.d.cts deleted file mode 100644 index 4567f945..00000000 --- a/node_modules/@isaacs/cliui/build/index.d.cts +++ /dev/null @@ -1,43 +0,0 @@ -interface UIOptions { - width: number; - wrap?: boolean; - rows?: string[]; -} -interface Column { - text: string; - width?: number; - align?: "right" | "left" | "center"; - padding: number[]; - border?: boolean; -} -interface ColumnArray extends Array { - span: boolean; -} -interface Line { - hidden?: boolean; - text: string; - span?: boolean; -} -declare class UI { - width: number; - wrap: boolean; - rows: ColumnArray[]; - constructor(opts: UIOptions); - span(...args: ColumnArray): void; - resetOutput(): void; - div(...args: (Column | string)[]): ColumnArray; - private shouldApplyLayoutDSL; - private applyLayoutDSL; - private colFromString; - private measurePadding; - toString(): string; - rowToString(row: ColumnArray, lines: Line[]): Line[]; - // if the full 'source' can render in - // the target line, do so. - private renderInline; - private rasterize; - private negatePadding; - private columnWidths; -} -declare function ui(opts: UIOptions): UI; -export { ui as default }; diff --git a/node_modules/@isaacs/cliui/build/lib/index.js b/node_modules/@isaacs/cliui/build/lib/index.js deleted file mode 100644 index 587b5ecd..00000000 --- a/node_modules/@isaacs/cliui/build/lib/index.js +++ /dev/null @@ -1,302 +0,0 @@ -'use strict'; -const align = { - right: alignRight, - center: alignCenter -}; -const top = 0; -const right = 1; -const bottom = 2; -const left = 3; -export class UI { - constructor(opts) { - var _a; - this.width = opts.width; - /* c8 ignore start */ - this.wrap = (_a = opts.wrap) !== null && _a !== void 0 ? _a : true; - /* c8 ignore stop */ - this.rows = []; - } - span(...args) { - const cols = this.div(...args); - cols.span = true; - } - resetOutput() { - this.rows = []; - } - div(...args) { - if (args.length === 0) { - this.div(''); - } - if (this.wrap && this.shouldApplyLayoutDSL(...args) && typeof args[0] === 'string') { - return this.applyLayoutDSL(args[0]); - } - const cols = args.map(arg => { - if (typeof arg === 'string') { - return this.colFromString(arg); - } - return arg; - }); - this.rows.push(cols); - return cols; - } - shouldApplyLayoutDSL(...args) { - return args.length === 1 && typeof args[0] === 'string' && - /[\t\n]/.test(args[0]); - } - applyLayoutDSL(str) { - const rows = str.split('\n').map(row => row.split('\t')); - let leftColumnWidth = 0; - // simple heuristic for layout, make sure the - // second column lines up along the left-hand. - // don't allow the first column to take up more - // than 50% of the screen. - rows.forEach(columns => { - if (columns.length > 1 && mixin.stringWidth(columns[0]) > leftColumnWidth) { - leftColumnWidth = Math.min(Math.floor(this.width * 0.5), mixin.stringWidth(columns[0])); - } - }); - // generate a table: - // replacing ' ' with padding calculations. - // using the algorithmically generated width. - rows.forEach(columns => { - this.div(...columns.map((r, i) => { - return { - text: r.trim(), - padding: this.measurePadding(r), - width: (i === 0 && columns.length > 1) ? leftColumnWidth : undefined - }; - })); - }); - return this.rows[this.rows.length - 1]; - } - colFromString(text) { - return { - text, - padding: this.measurePadding(text) - }; - } - measurePadding(str) { - // measure padding without ansi escape codes - const noAnsi = mixin.stripAnsi(str); - return [0, noAnsi.match(/\s*$/)[0].length, 0, noAnsi.match(/^\s*/)[0].length]; - } - toString() { - const lines = []; - this.rows.forEach(row => { - this.rowToString(row, lines); - }); - // don't display any lines with the - // hidden flag set. - return lines - .filter(line => !line.hidden) - .map(line => line.text) - .join('\n'); - } - rowToString(row, lines) { - this.rasterize(row).forEach((rrow, r) => { - let str = ''; - rrow.forEach((col, c) => { - const { width } = row[c]; // the width with padding. - const wrapWidth = this.negatePadding(row[c]); // the width without padding. - let ts = col; // temporary string used during alignment/padding. - if (wrapWidth > mixin.stringWidth(col)) { - ts += ' '.repeat(wrapWidth - mixin.stringWidth(col)); - } - // align the string within its column. - if (row[c].align && row[c].align !== 'left' && this.wrap) { - const fn = align[row[c].align]; - ts = fn(ts, wrapWidth); - if (mixin.stringWidth(ts) < wrapWidth) { - /* c8 ignore start */ - const w = width || 0; - /* c8 ignore stop */ - ts += ' '.repeat(w - mixin.stringWidth(ts) - 1); - } - } - // apply border and padding to string. - const padding = row[c].padding || [0, 0, 0, 0]; - if (padding[left]) { - str += ' '.repeat(padding[left]); - } - str += addBorder(row[c], ts, '| '); - str += ts; - str += addBorder(row[c], ts, ' |'); - if (padding[right]) { - str += ' '.repeat(padding[right]); - } - // if prior row is span, try to render the - // current row on the prior line. - if (r === 0 && lines.length > 0) { - str = this.renderInline(str, lines[lines.length - 1]); - } - }); - // remove trailing whitespace. - lines.push({ - text: str.replace(/ +$/, ''), - span: row.span - }); - }); - return lines; - } - // if the full 'source' can render in - // the target line, do so. - renderInline(source, previousLine) { - const match = source.match(/^ */); - /* c8 ignore start */ - const leadingWhitespace = match ? match[0].length : 0; - /* c8 ignore stop */ - const target = previousLine.text; - const targetTextWidth = mixin.stringWidth(target.trimEnd()); - if (!previousLine.span) { - return source; - } - // if we're not applying wrapping logic, - // just always append to the span. - if (!this.wrap) { - previousLine.hidden = true; - return target + source; - } - if (leadingWhitespace < targetTextWidth) { - return source; - } - previousLine.hidden = true; - return target.trimEnd() + ' '.repeat(leadingWhitespace - targetTextWidth) + source.trimStart(); - } - rasterize(row) { - const rrows = []; - const widths = this.columnWidths(row); - let wrapped; - // word wrap all columns, and create - // a data-structure that is easy to rasterize. - row.forEach((col, c) => { - // leave room for left and right padding. - col.width = widths[c]; - if (this.wrap) { - wrapped = mixin.wrap(col.text, this.negatePadding(col), { hard: true }).split('\n'); - } - else { - wrapped = col.text.split('\n'); - } - if (col.border) { - wrapped.unshift('.' + '-'.repeat(this.negatePadding(col) + 2) + '.'); - wrapped.push("'" + '-'.repeat(this.negatePadding(col) + 2) + "'"); - } - // add top and bottom padding. - if (col.padding) { - wrapped.unshift(...new Array(col.padding[top] || 0).fill('')); - wrapped.push(...new Array(col.padding[bottom] || 0).fill('')); - } - wrapped.forEach((str, r) => { - if (!rrows[r]) { - rrows.push([]); - } - const rrow = rrows[r]; - for (let i = 0; i < c; i++) { - if (rrow[i] === undefined) { - rrow.push(''); - } - } - rrow.push(str); - }); - }); - return rrows; - } - negatePadding(col) { - /* c8 ignore start */ - let wrapWidth = col.width || 0; - /* c8 ignore stop */ - if (col.padding) { - wrapWidth -= (col.padding[left] || 0) + (col.padding[right] || 0); - } - if (col.border) { - wrapWidth -= 4; - } - return wrapWidth; - } - columnWidths(row) { - if (!this.wrap) { - return row.map(col => { - return col.width || mixin.stringWidth(col.text); - }); - } - let unset = row.length; - let remainingWidth = this.width; - // column widths can be set in config. - const widths = row.map(col => { - if (col.width) { - unset--; - remainingWidth -= col.width; - return col.width; - } - return undefined; - }); - // any unset widths should be calculated. - /* c8 ignore start */ - const unsetWidth = unset ? Math.floor(remainingWidth / unset) : 0; - /* c8 ignore stop */ - return widths.map((w, i) => { - if (w === undefined) { - return Math.max(unsetWidth, _minWidth(row[i])); - } - return w; - }); - } -} -function addBorder(col, ts, style) { - if (col.border) { - if (/[.']-+[.']/.test(ts)) { - return ''; - } - if (ts.trim().length !== 0) { - return style; - } - return ' '; - } - return ''; -} -// calculates the minimum width of -// a column, based on padding preferences. -function _minWidth(col) { - const padding = col.padding || []; - const minWidth = 1 + (padding[left] || 0) + (padding[right] || 0); - if (col.border) { - return minWidth + 4; - } - return minWidth; -} -function getWindowWidth() { - /* c8 ignore start */ - if (typeof process === 'object' && process.stdout && process.stdout.columns) { - return process.stdout.columns; - } - return 80; -} -/* c8 ignore stop */ -function alignRight(str, width) { - str = str.trim(); - const strWidth = mixin.stringWidth(str); - if (strWidth < width) { - return ' '.repeat(width - strWidth) + str; - } - return str; -} -function alignCenter(str, width) { - str = str.trim(); - const strWidth = mixin.stringWidth(str); - /* c8 ignore start */ - if (strWidth >= width) { - return str; - } - /* c8 ignore stop */ - return ' '.repeat((width - strWidth) >> 1) + str; -} -let mixin; -export function cliui(opts, _mixin) { - mixin = _mixin; - return new UI({ - /* c8 ignore start */ - width: (opts === null || opts === void 0 ? void 0 : opts.width) || getWindowWidth(), - wrap: opts === null || opts === void 0 ? void 0 : opts.wrap - /* c8 ignore stop */ - }); -} diff --git a/node_modules/@isaacs/cliui/index.mjs b/node_modules/@isaacs/cliui/index.mjs deleted file mode 100644 index 5177519a..00000000 --- a/node_modules/@isaacs/cliui/index.mjs +++ /dev/null @@ -1,14 +0,0 @@ -// Bootstrap cliui with ESM dependencies: -import { cliui } from './build/lib/index.js' - -import stringWidth from 'string-width' -import stripAnsi from 'strip-ansi' -import wrap from 'wrap-ansi' - -export default function ui (opts) { - return cliui(opts, { - stringWidth, - stripAnsi, - wrap - }) -} diff --git a/node_modules/@isaacs/cliui/node_modules/ansi-regex/index.d.ts b/node_modules/@isaacs/cliui/node_modules/ansi-regex/index.d.ts deleted file mode 100644 index 7d562e9c..00000000 --- a/node_modules/@isaacs/cliui/node_modules/ansi-regex/index.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -export type Options = { - /** - Match only the first ANSI escape. - - @default false - */ - readonly onlyFirst: boolean; -}; - -/** -Regular expression for matching ANSI escape codes. - -@example -``` -import ansiRegex from 'ansi-regex'; - -ansiRegex().test('\u001B[4mcake\u001B[0m'); -//=> true - -ansiRegex().test('cake'); -//=> false - -'\u001B[4mcake\u001B[0m'.match(ansiRegex()); -//=> ['\u001B[4m', '\u001B[0m'] - -'\u001B[4mcake\u001B[0m'.match(ansiRegex({onlyFirst: true})); -//=> ['\u001B[4m'] - -'\u001B]8;;https://github.com\u0007click\u001B]8;;\u0007'.match(ansiRegex()); -//=> ['\u001B]8;;https://github.com\u0007', '\u001B]8;;\u0007'] -``` -*/ -export default function ansiRegex(options?: Options): RegExp; diff --git a/node_modules/@isaacs/cliui/node_modules/ansi-regex/index.js b/node_modules/@isaacs/cliui/node_modules/ansi-regex/index.js deleted file mode 100644 index ddfdba39..00000000 --- a/node_modules/@isaacs/cliui/node_modules/ansi-regex/index.js +++ /dev/null @@ -1,10 +0,0 @@ -export default function ansiRegex({onlyFirst = false} = {}) { - // Valid string terminator sequences are BEL, ESC\, and 0x9c - const ST = '(?:\\u0007|\\u001B\\u005C|\\u009C)'; - const pattern = [ - `[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?${ST})`, - '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))', - ].join('|'); - - return new RegExp(pattern, onlyFirst ? undefined : 'g'); -} diff --git a/node_modules/@isaacs/cliui/node_modules/ansi-regex/license b/node_modules/@isaacs/cliui/node_modules/ansi-regex/license deleted file mode 100644 index fa7ceba3..00000000 --- a/node_modules/@isaacs/cliui/node_modules/ansi-regex/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (https://sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@isaacs/cliui/node_modules/ansi-regex/package.json b/node_modules/@isaacs/cliui/node_modules/ansi-regex/package.json deleted file mode 100644 index 49f3f610..00000000 --- a/node_modules/@isaacs/cliui/node_modules/ansi-regex/package.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "name": "ansi-regex", - "version": "6.1.0", - "description": "Regular expression for matching ANSI escape codes", - "license": "MIT", - "repository": "chalk/ansi-regex", - "funding": "https://github.com/chalk/ansi-regex?sponsor=1", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "https://sindresorhus.com" - }, - "type": "module", - "exports": "./index.js", - "types": "./index.d.ts", - "sideEffects": false, - "engines": { - "node": ">=12" - }, - "scripts": { - "test": "xo && ava && tsd", - "view-supported": "node fixtures/view-codes.js" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "keywords": [ - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "command-line", - "text", - "regex", - "regexp", - "re", - "match", - "test", - "find", - "pattern" - ], - "devDependencies": { - "ansi-escapes": "^5.0.0", - "ava": "^3.15.0", - "tsd": "^0.21.0", - "xo": "^0.54.2" - } -} diff --git a/node_modules/@isaacs/cliui/node_modules/ansi-regex/readme.md b/node_modules/@isaacs/cliui/node_modules/ansi-regex/readme.md deleted file mode 100644 index 1e91ee10..00000000 --- a/node_modules/@isaacs/cliui/node_modules/ansi-regex/readme.md +++ /dev/null @@ -1,60 +0,0 @@ -# ansi-regex - -> Regular expression for matching [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) - -## Install - -```sh -npm install ansi-regex -``` - -## Usage - -```js -import ansiRegex from 'ansi-regex'; - -ansiRegex().test('\u001B[4mcake\u001B[0m'); -//=> true - -ansiRegex().test('cake'); -//=> false - -'\u001B[4mcake\u001B[0m'.match(ansiRegex()); -//=> ['\u001B[4m', '\u001B[0m'] - -'\u001B[4mcake\u001B[0m'.match(ansiRegex({onlyFirst: true})); -//=> ['\u001B[4m'] - -'\u001B]8;;https://github.com\u0007click\u001B]8;;\u0007'.match(ansiRegex()); -//=> ['\u001B]8;;https://github.com\u0007', '\u001B]8;;\u0007'] -``` - -## API - -### ansiRegex(options?) - -Returns a regex for matching ANSI escape codes. - -#### options - -Type: `object` - -##### onlyFirst - -Type: `boolean`\ -Default: `false` *(Matches any ANSI escape codes in a string)* - -Match only the first ANSI escape. - -## FAQ - -### Why do you test for codes not in the ECMA 48 standard? - -Some of the codes we run as a test are codes that we acquired finding various lists of non-standard or manufacturer specific codes. We test for both standard and non-standard codes, as most of them follow the same or similar format and can be safely matched in strings without the risk of removing actual string content. There are a few non-standard control codes that do not follow the traditional format (i.e. they end in numbers) thus forcing us to exclude them from the test because we cannot reliably match them. - -On the historical side, those ECMA standards were established in the early 90's whereas the VT100, for example, was designed in the mid/late 70's. At that point in time, control codes were still pretty ungoverned and engineers used them for a multitude of things, namely to activate hardware ports that may have been proprietary. Somewhere else you see a similar 'anarchy' of codes is in the x86 architecture for processors; there are a ton of "interrupts" that can mean different things on certain brands of processors, most of which have been phased out. - -## Maintainers - -- [Sindre Sorhus](https://github.com/sindresorhus) -- [Josh Junon](https://github.com/qix-) diff --git a/node_modules/@isaacs/cliui/node_modules/ansi-styles/index.d.ts b/node_modules/@isaacs/cliui/node_modules/ansi-styles/index.d.ts deleted file mode 100644 index 58f133ab..00000000 --- a/node_modules/@isaacs/cliui/node_modules/ansi-styles/index.d.ts +++ /dev/null @@ -1,236 +0,0 @@ -export interface CSPair { // eslint-disable-line @typescript-eslint/naming-convention - /** - The ANSI terminal control sequence for starting this style. - */ - readonly open: string; - - /** - The ANSI terminal control sequence for ending this style. - */ - readonly close: string; -} - -export interface ColorBase { - /** - The ANSI terminal control sequence for ending this color. - */ - readonly close: string; - - ansi(code: number): string; - - ansi256(code: number): string; - - ansi16m(red: number, green: number, blue: number): string; -} - -export interface Modifier { - /** - Resets the current color chain. - */ - readonly reset: CSPair; - - /** - Make text bold. - */ - readonly bold: CSPair; - - /** - Emitting only a small amount of light. - */ - readonly dim: CSPair; - - /** - Make text italic. (Not widely supported) - */ - readonly italic: CSPair; - - /** - Make text underline. (Not widely supported) - */ - readonly underline: CSPair; - - /** - Make text overline. - - Supported on VTE-based terminals, the GNOME terminal, mintty, and Git Bash. - */ - readonly overline: CSPair; - - /** - Inverse background and foreground colors. - */ - readonly inverse: CSPair; - - /** - Prints the text, but makes it invisible. - */ - readonly hidden: CSPair; - - /** - Puts a horizontal line through the center of the text. (Not widely supported) - */ - readonly strikethrough: CSPair; -} - -export interface ForegroundColor { - readonly black: CSPair; - readonly red: CSPair; - readonly green: CSPair; - readonly yellow: CSPair; - readonly blue: CSPair; - readonly cyan: CSPair; - readonly magenta: CSPair; - readonly white: CSPair; - - /** - Alias for `blackBright`. - */ - readonly gray: CSPair; - - /** - Alias for `blackBright`. - */ - readonly grey: CSPair; - - readonly blackBright: CSPair; - readonly redBright: CSPair; - readonly greenBright: CSPair; - readonly yellowBright: CSPair; - readonly blueBright: CSPair; - readonly cyanBright: CSPair; - readonly magentaBright: CSPair; - readonly whiteBright: CSPair; -} - -export interface BackgroundColor { - readonly bgBlack: CSPair; - readonly bgRed: CSPair; - readonly bgGreen: CSPair; - readonly bgYellow: CSPair; - readonly bgBlue: CSPair; - readonly bgCyan: CSPair; - readonly bgMagenta: CSPair; - readonly bgWhite: CSPair; - - /** - Alias for `bgBlackBright`. - */ - readonly bgGray: CSPair; - - /** - Alias for `bgBlackBright`. - */ - readonly bgGrey: CSPair; - - readonly bgBlackBright: CSPair; - readonly bgRedBright: CSPair; - readonly bgGreenBright: CSPair; - readonly bgYellowBright: CSPair; - readonly bgBlueBright: CSPair; - readonly bgCyanBright: CSPair; - readonly bgMagentaBright: CSPair; - readonly bgWhiteBright: CSPair; -} - -export interface ConvertColor { - /** - Convert from the RGB color space to the ANSI 256 color space. - - @param red - (`0...255`) - @param green - (`0...255`) - @param blue - (`0...255`) - */ - rgbToAnsi256(red: number, green: number, blue: number): number; - - /** - Convert from the RGB HEX color space to the RGB color space. - - @param hex - A hexadecimal string containing RGB data. - */ - hexToRgb(hex: string): [red: number, green: number, blue: number]; - - /** - Convert from the RGB HEX color space to the ANSI 256 color space. - - @param hex - A hexadecimal string containing RGB data. - */ - hexToAnsi256(hex: string): number; - - /** - Convert from the ANSI 256 color space to the ANSI 16 color space. - - @param code - A number representing the ANSI 256 color. - */ - ansi256ToAnsi(code: number): number; - - /** - Convert from the RGB color space to the ANSI 16 color space. - - @param red - (`0...255`) - @param green - (`0...255`) - @param blue - (`0...255`) - */ - rgbToAnsi(red: number, green: number, blue: number): number; - - /** - Convert from the RGB HEX color space to the ANSI 16 color space. - - @param hex - A hexadecimal string containing RGB data. - */ - hexToAnsi(hex: string): number; -} - -/** -Basic modifier names. -*/ -export type ModifierName = keyof Modifier; - -/** -Basic foreground color names. - -[More colors here.](https://github.com/chalk/chalk/blob/main/readme.md#256-and-truecolor-color-support) -*/ -export type ForegroundColorName = keyof ForegroundColor; - -/** -Basic background color names. - -[More colors here.](https://github.com/chalk/chalk/blob/main/readme.md#256-and-truecolor-color-support) -*/ -export type BackgroundColorName = keyof BackgroundColor; - -/** -Basic color names. The combination of foreground and background color names. - -[More colors here.](https://github.com/chalk/chalk/blob/main/readme.md#256-and-truecolor-color-support) -*/ -export type ColorName = ForegroundColorName | BackgroundColorName; - -/** -Basic modifier names. -*/ -export const modifierNames: readonly ModifierName[]; - -/** -Basic foreground color names. -*/ -export const foregroundColorNames: readonly ForegroundColorName[]; - -/** -Basic background color names. -*/ -export const backgroundColorNames: readonly BackgroundColorName[]; - -/* -Basic color names. The combination of foreground and background color names. -*/ -export const colorNames: readonly ColorName[]; - -declare const ansiStyles: { - readonly modifier: Modifier; - readonly color: ColorBase & ForegroundColor; - readonly bgColor: ColorBase & BackgroundColor; - readonly codes: ReadonlyMap; -} & ForegroundColor & BackgroundColor & Modifier & ConvertColor; - -export default ansiStyles; diff --git a/node_modules/@isaacs/cliui/node_modules/ansi-styles/index.js b/node_modules/@isaacs/cliui/node_modules/ansi-styles/index.js deleted file mode 100644 index d7bede44..00000000 --- a/node_modules/@isaacs/cliui/node_modules/ansi-styles/index.js +++ /dev/null @@ -1,223 +0,0 @@ -const ANSI_BACKGROUND_OFFSET = 10; - -const wrapAnsi16 = (offset = 0) => code => `\u001B[${code + offset}m`; - -const wrapAnsi256 = (offset = 0) => code => `\u001B[${38 + offset};5;${code}m`; - -const wrapAnsi16m = (offset = 0) => (red, green, blue) => `\u001B[${38 + offset};2;${red};${green};${blue}m`; - -const styles = { - modifier: { - reset: [0, 0], - // 21 isn't widely supported and 22 does the same thing - bold: [1, 22], - dim: [2, 22], - italic: [3, 23], - underline: [4, 24], - overline: [53, 55], - inverse: [7, 27], - hidden: [8, 28], - strikethrough: [9, 29], - }, - color: { - black: [30, 39], - red: [31, 39], - green: [32, 39], - yellow: [33, 39], - blue: [34, 39], - magenta: [35, 39], - cyan: [36, 39], - white: [37, 39], - - // Bright color - blackBright: [90, 39], - gray: [90, 39], // Alias of `blackBright` - grey: [90, 39], // Alias of `blackBright` - redBright: [91, 39], - greenBright: [92, 39], - yellowBright: [93, 39], - blueBright: [94, 39], - magentaBright: [95, 39], - cyanBright: [96, 39], - whiteBright: [97, 39], - }, - bgColor: { - bgBlack: [40, 49], - bgRed: [41, 49], - bgGreen: [42, 49], - bgYellow: [43, 49], - bgBlue: [44, 49], - bgMagenta: [45, 49], - bgCyan: [46, 49], - bgWhite: [47, 49], - - // Bright color - bgBlackBright: [100, 49], - bgGray: [100, 49], // Alias of `bgBlackBright` - bgGrey: [100, 49], // Alias of `bgBlackBright` - bgRedBright: [101, 49], - bgGreenBright: [102, 49], - bgYellowBright: [103, 49], - bgBlueBright: [104, 49], - bgMagentaBright: [105, 49], - bgCyanBright: [106, 49], - bgWhiteBright: [107, 49], - }, -}; - -export const modifierNames = Object.keys(styles.modifier); -export const foregroundColorNames = Object.keys(styles.color); -export const backgroundColorNames = Object.keys(styles.bgColor); -export const colorNames = [...foregroundColorNames, ...backgroundColorNames]; - -function assembleStyles() { - const codes = new Map(); - - for (const [groupName, group] of Object.entries(styles)) { - for (const [styleName, style] of Object.entries(group)) { - styles[styleName] = { - open: `\u001B[${style[0]}m`, - close: `\u001B[${style[1]}m`, - }; - - group[styleName] = styles[styleName]; - - codes.set(style[0], style[1]); - } - - Object.defineProperty(styles, groupName, { - value: group, - enumerable: false, - }); - } - - Object.defineProperty(styles, 'codes', { - value: codes, - enumerable: false, - }); - - styles.color.close = '\u001B[39m'; - styles.bgColor.close = '\u001B[49m'; - - styles.color.ansi = wrapAnsi16(); - styles.color.ansi256 = wrapAnsi256(); - styles.color.ansi16m = wrapAnsi16m(); - styles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET); - styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET); - styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET); - - // From https://github.com/Qix-/color-convert/blob/3f0e0d4e92e235796ccb17f6e85c72094a651f49/conversions.js - Object.defineProperties(styles, { - rgbToAnsi256: { - value: (red, green, blue) => { - // We use the extended greyscale palette here, with the exception of - // black and white. normal palette only has 4 greyscale shades. - if (red === green && green === blue) { - if (red < 8) { - return 16; - } - - if (red > 248) { - return 231; - } - - return Math.round(((red - 8) / 247) * 24) + 232; - } - - return 16 - + (36 * Math.round(red / 255 * 5)) - + (6 * Math.round(green / 255 * 5)) - + Math.round(blue / 255 * 5); - }, - enumerable: false, - }, - hexToRgb: { - value: hex => { - const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16)); - if (!matches) { - return [0, 0, 0]; - } - - let [colorString] = matches; - - if (colorString.length === 3) { - colorString = [...colorString].map(character => character + character).join(''); - } - - const integer = Number.parseInt(colorString, 16); - - return [ - /* eslint-disable no-bitwise */ - (integer >> 16) & 0xFF, - (integer >> 8) & 0xFF, - integer & 0xFF, - /* eslint-enable no-bitwise */ - ]; - }, - enumerable: false, - }, - hexToAnsi256: { - value: hex => styles.rgbToAnsi256(...styles.hexToRgb(hex)), - enumerable: false, - }, - ansi256ToAnsi: { - value: code => { - if (code < 8) { - return 30 + code; - } - - if (code < 16) { - return 90 + (code - 8); - } - - let red; - let green; - let blue; - - if (code >= 232) { - red = (((code - 232) * 10) + 8) / 255; - green = red; - blue = red; - } else { - code -= 16; - - const remainder = code % 36; - - red = Math.floor(code / 36) / 5; - green = Math.floor(remainder / 6) / 5; - blue = (remainder % 6) / 5; - } - - const value = Math.max(red, green, blue) * 2; - - if (value === 0) { - return 30; - } - - // eslint-disable-next-line no-bitwise - let result = 30 + ((Math.round(blue) << 2) | (Math.round(green) << 1) | Math.round(red)); - - if (value === 2) { - result += 60; - } - - return result; - }, - enumerable: false, - }, - rgbToAnsi: { - value: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)), - enumerable: false, - }, - hexToAnsi: { - value: hex => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)), - enumerable: false, - }, - }); - - return styles; -} - -const ansiStyles = assembleStyles(); - -export default ansiStyles; diff --git a/node_modules/@isaacs/cliui/node_modules/ansi-styles/license b/node_modules/@isaacs/cliui/node_modules/ansi-styles/license deleted file mode 100644 index fa7ceba3..00000000 --- a/node_modules/@isaacs/cliui/node_modules/ansi-styles/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (https://sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@isaacs/cliui/node_modules/ansi-styles/package.json b/node_modules/@isaacs/cliui/node_modules/ansi-styles/package.json deleted file mode 100644 index 6cd3ca5b..00000000 --- a/node_modules/@isaacs/cliui/node_modules/ansi-styles/package.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "name": "ansi-styles", - "version": "6.2.1", - "description": "ANSI escape codes for styling strings in the terminal", - "license": "MIT", - "repository": "chalk/ansi-styles", - "funding": "https://github.com/chalk/ansi-styles?sponsor=1", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "https://sindresorhus.com" - }, - "type": "module", - "exports": "./index.js", - "engines": { - "node": ">=12" - }, - "scripts": { - "test": "xo && ava && tsd", - "screenshot": "svg-term --command='node screenshot' --out=screenshot.svg --padding=3 --width=55 --height=3 --at=1000 --no-cursor" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "keywords": [ - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "devDependencies": { - "ava": "^3.15.0", - "svg-term-cli": "^2.1.1", - "tsd": "^0.19.0", - "xo": "^0.47.0" - } -} diff --git a/node_modules/@isaacs/cliui/node_modules/ansi-styles/readme.md b/node_modules/@isaacs/cliui/node_modules/ansi-styles/readme.md deleted file mode 100644 index 6d04183f..00000000 --- a/node_modules/@isaacs/cliui/node_modules/ansi-styles/readme.md +++ /dev/null @@ -1,173 +0,0 @@ -# ansi-styles - -> [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) for styling strings in the terminal - -You probably want the higher-level [chalk](https://github.com/chalk/chalk) module for styling your strings. - -![](screenshot.png) - -## Install - -```sh -npm install ansi-styles -``` - -## Usage - -```js -import styles from 'ansi-styles'; - -console.log(`${styles.green.open}Hello world!${styles.green.close}`); - - -// Color conversion between 256/truecolor -// NOTE: When converting from truecolor to 256 colors, the original color -// may be degraded to fit the new color palette. This means terminals -// that do not support 16 million colors will best-match the -// original color. -console.log(`${styles.color.ansi(styles.rgbToAnsi(199, 20, 250))}Hello World${styles.color.close}`) -console.log(`${styles.color.ansi256(styles.rgbToAnsi256(199, 20, 250))}Hello World${styles.color.close}`) -console.log(`${styles.color.ansi16m(...styles.hexToRgb('#abcdef'))}Hello World${styles.color.close}`) -``` - -## API - -### `open` and `close` - -Each style has an `open` and `close` property. - -### `modifierNames`, `foregroundColorNames`, `backgroundColorNames`, and `colorNames` - -All supported style strings are exposed as an array of strings for convenience. `colorNames` is the combination of `foregroundColorNames` and `backgroundColorNames`. - -This can be useful if you need to validate input: - -```js -import {modifierNames, foregroundColorNames} from 'ansi-styles'; - -console.log(modifierNames.includes('bold')); -//=> true - -console.log(foregroundColorNames.includes('pink')); -//=> false -``` - -## Styles - -### Modifiers - -- `reset` -- `bold` -- `dim` -- `italic` *(Not widely supported)* -- `underline` -- `overline` *Supported on VTE-based terminals, the GNOME terminal, mintty, and Git Bash.* -- `inverse` -- `hidden` -- `strikethrough` *(Not widely supported)* - -### Colors - -- `black` -- `red` -- `green` -- `yellow` -- `blue` -- `magenta` -- `cyan` -- `white` -- `blackBright` (alias: `gray`, `grey`) -- `redBright` -- `greenBright` -- `yellowBright` -- `blueBright` -- `magentaBright` -- `cyanBright` -- `whiteBright` - -### Background colors - -- `bgBlack` -- `bgRed` -- `bgGreen` -- `bgYellow` -- `bgBlue` -- `bgMagenta` -- `bgCyan` -- `bgWhite` -- `bgBlackBright` (alias: `bgGray`, `bgGrey`) -- `bgRedBright` -- `bgGreenBright` -- `bgYellowBright` -- `bgBlueBright` -- `bgMagentaBright` -- `bgCyanBright` -- `bgWhiteBright` - -## Advanced usage - -By default, you get a map of styles, but the styles are also available as groups. They are non-enumerable so they don't show up unless you access them explicitly. This makes it easier to expose only a subset in a higher-level module. - -- `styles.modifier` -- `styles.color` -- `styles.bgColor` - -###### Example - -```js -import styles from 'ansi-styles'; - -console.log(styles.color.green.open); -``` - -Raw escape codes (i.e. without the CSI escape prefix `\u001B[` and render mode postfix `m`) are available under `styles.codes`, which returns a `Map` with the open codes as keys and close codes as values. - -###### Example - -```js -import styles from 'ansi-styles'; - -console.log(styles.codes.get(36)); -//=> 39 -``` - -## 16 / 256 / 16 million (TrueColor) support - -`ansi-styles` allows converting between various color formats and ANSI escapes, with support for 16, 256 and [16 million colors](https://gist.github.com/XVilka/8346728). - -The following color spaces are supported: - -- `rgb` -- `hex` -- `ansi256` -- `ansi` - -To use these, call the associated conversion function with the intended output, for example: - -```js -import styles from 'ansi-styles'; - -styles.color.ansi(styles.rgbToAnsi(100, 200, 15)); // RGB to 16 color ansi foreground code -styles.bgColor.ansi(styles.hexToAnsi('#C0FFEE')); // HEX to 16 color ansi foreground code - -styles.color.ansi256(styles.rgbToAnsi256(100, 200, 15)); // RGB to 256 color ansi foreground code -styles.bgColor.ansi256(styles.hexToAnsi256('#C0FFEE')); // HEX to 256 color ansi foreground code - -styles.color.ansi16m(100, 200, 15); // RGB to 16 million color foreground code -styles.bgColor.ansi16m(...styles.hexToRgb('#C0FFEE')); // Hex (RGB) to 16 million color foreground code -``` - -## Related - -- [ansi-escapes](https://github.com/sindresorhus/ansi-escapes) - ANSI escape codes for manipulating the terminal - -## Maintainers - -- [Sindre Sorhus](https://github.com/sindresorhus) -- [Josh Junon](https://github.com/qix-) - -## For enterprise - -Available as part of the Tidelift Subscription. - -The maintainers of `ansi-styles` and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-ansi-styles?utm_source=npm-ansi-styles&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) diff --git a/node_modules/@isaacs/cliui/node_modules/emoji-regex/LICENSE-MIT.txt b/node_modules/@isaacs/cliui/node_modules/emoji-regex/LICENSE-MIT.txt deleted file mode 100644 index a41e0a7e..00000000 --- a/node_modules/@isaacs/cliui/node_modules/emoji-regex/LICENSE-MIT.txt +++ /dev/null @@ -1,20 +0,0 @@ -Copyright Mathias Bynens - -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/@isaacs/cliui/node_modules/emoji-regex/README.md b/node_modules/@isaacs/cliui/node_modules/emoji-regex/README.md deleted file mode 100644 index 6d630827..00000000 --- a/node_modules/@isaacs/cliui/node_modules/emoji-regex/README.md +++ /dev/null @@ -1,137 +0,0 @@ -# emoji-regex [![Build status](https://travis-ci.org/mathiasbynens/emoji-regex.svg?branch=main)](https://travis-ci.org/mathiasbynens/emoji-regex) - -_emoji-regex_ offers a regular expression to match all emoji symbols and sequences (including textual representations of emoji) as per the Unicode Standard. - -This repository contains a script that generates this regular expression based on [Unicode data](https://github.com/node-unicode/node-unicode-data). Because of this, the regular expression can easily be updated whenever new emoji are added to the Unicode standard. - -## Installation - -Via [npm](https://www.npmjs.com/): - -```bash -npm install emoji-regex -``` - -In [Node.js](https://nodejs.org/): - -```js -const emojiRegex = require('emoji-regex/RGI_Emoji.js'); -// Note: because the regular expression has the global flag set, this module -// exports a function that returns the regex rather than exporting the regular -// expression itself, to make it impossible to (accidentally) mutate the -// original regular expression. - -const text = ` -\u{231A}: ⌚ default emoji presentation character (Emoji_Presentation) -\u{2194}\u{FE0F}: ↔️ default text presentation character rendered as emoji -\u{1F469}: 👩 emoji modifier base (Emoji_Modifier_Base) -\u{1F469}\u{1F3FF}: 👩🏿 emoji modifier base followed by a modifier -`; - -const regex = emojiRegex(); -let match; -while (match = regex.exec(text)) { - const emoji = match[0]; - console.log(`Matched sequence ${ emoji } — code points: ${ [...emoji].length }`); -} -``` - -Console output: - -``` -Matched sequence ⌚ — code points: 1 -Matched sequence ⌚ — code points: 1 -Matched sequence ↔️ — code points: 2 -Matched sequence ↔️ — code points: 2 -Matched sequence 👩 — code points: 1 -Matched sequence 👩 — code points: 1 -Matched sequence 👩🏿 — code points: 2 -Matched sequence 👩🏿 — code points: 2 -``` - -## Regular expression flavors - -The package comes with three distinct regular expressions: - -```js -// This is the recommended regular expression to use. It matches all -// emoji recommended for general interchange, as defined via the -// `RGI_Emoji` property in the Unicode Standard. -// https://unicode.org/reports/tr51/#def_rgi_set -// When in doubt, use this! -const emojiRegexRGI = require('emoji-regex/RGI_Emoji.js'); - -// This is the old regular expression, prior to `RGI_Emoji` being -// standardized. In addition to all `RGI_Emoji` sequences, it matches -// some emoji you probably don’t want to match (such as emoji component -// symbols that are not meant to be used separately). -const emojiRegex = require('emoji-regex/index.js'); - -// This regular expression matches even more emoji than the previous -// one, including emoji that render as text instead of icons (i.e. -// emoji that are not `Emoji_Presentation` symbols and that aren’t -// forced to render as emoji by a variation selector). -const emojiRegexText = require('emoji-regex/text.js'); -``` - -Additionally, in environments which support ES2015 Unicode escapes, you may `require` ES2015-style versions of the regexes: - -```js -const emojiRegexRGI = require('emoji-regex/es2015/RGI_Emoji.js'); -const emojiRegex = require('emoji-regex/es2015/index.js'); -const emojiRegexText = require('emoji-regex/es2015/text.js'); -``` - -## For maintainers - -### How to update emoji-regex after new Unicode Standard releases - -1. Update the Unicode data dependency in `package.json` by running the following commands: - - ```sh - # Example: updating from Unicode v12 to Unicode v13. - npm uninstall @unicode/unicode-12.0.0 - npm install @unicode/unicode-13.0.0 --save-dev - ```` - -1. Generate the new output: - - ```sh - npm run build - ``` - -1. Verify that tests still pass: - - ```sh - npm test - ``` - -1. Send a pull request with the changes, and get it reviewed & merged. - -1. On the `main` branch, bump the emoji-regex version number in `package.json`: - - ```sh - npm version patch -m 'Release v%s' - ``` - - Instead of `patch`, use `minor` or `major` [as needed](https://semver.org/). - - Note that this produces a Git commit + tag. - -1. Push the release commit and tag: - - ```sh - git push - ``` - - Our CI then automatically publishes the new release to npm. - -## Author - -| [![twitter/mathias](https://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---| -| [Mathias Bynens](https://mathiasbynens.be/) | - -## License - -_emoji-regex_ is available under the [MIT](https://mths.be/mit) license. diff --git a/node_modules/@isaacs/cliui/node_modules/emoji-regex/RGI_Emoji.d.ts b/node_modules/@isaacs/cliui/node_modules/emoji-regex/RGI_Emoji.d.ts deleted file mode 100644 index 89a651fb..00000000 --- a/node_modules/@isaacs/cliui/node_modules/emoji-regex/RGI_Emoji.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -declare module 'emoji-regex/RGI_Emoji' { - function emojiRegex(): RegExp; - - export = emojiRegex; -} diff --git a/node_modules/@isaacs/cliui/node_modules/emoji-regex/RGI_Emoji.js b/node_modules/@isaacs/cliui/node_modules/emoji-regex/RGI_Emoji.js deleted file mode 100644 index 3fbe9241..00000000 --- a/node_modules/@isaacs/cliui/node_modules/emoji-regex/RGI_Emoji.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; - -module.exports = function () { - // https://mths.be/emoji - return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB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C\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\u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\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]/g; -}; diff --git a/node_modules/@isaacs/cliui/node_modules/emoji-regex/es2015/RGI_Emoji.d.ts b/node_modules/@isaacs/cliui/node_modules/emoji-regex/es2015/RGI_Emoji.d.ts deleted file mode 100644 index bf0f154b..00000000 --- a/node_modules/@isaacs/cliui/node_modules/emoji-regex/es2015/RGI_Emoji.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -declare module 'emoji-regex/es2015/RGI_Emoji' { - function emojiRegex(): RegExp; - - export = emojiRegex; -} diff --git a/node_modules/@isaacs/cliui/node_modules/emoji-regex/es2015/RGI_Emoji.js b/node_modules/@isaacs/cliui/node_modules/emoji-regex/es2015/RGI_Emoji.js deleted file mode 100644 index ecf32f17..00000000 --- a/node_modules/@isaacs/cliui/node_modules/emoji-regex/es2015/RGI_Emoji.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; - -module.exports = () => { - // https://mths.be/emoji - return /\u{1F3F4}\u{E0067}\u{E0062}(?:\u{E0077}\u{E006C}\u{E0073}|\u{E0073}\u{E0063}\u{E0074}|\u{E0065}\u{E006E}\u{E0067})\u{E007F}|(?:\u{1F9D1}\u{1F3FF}\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F9D1}|\u{1F469}\u{1F3FF}\u200D\u{1F91D}\u200D[\u{1F468}\u{1F469}])[\u{1F3FB}-\u{1F3FE}]|(?:\u{1F9D1}\u{1F3FE}\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F9D1}|\u{1F469}\u{1F3FE}\u200D\u{1F91D}\u200D[\u{1F468}\u{1F469}])[\u{1F3FB}-\u{1F3FD}\u{1F3FF}]|(?:\u{1F9D1}\u{1F3FD}\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F9D1}|\u{1F469}\u{1F3FD}\u200D\u{1F91D}\u200D[\u{1F468}\u{1F469}])[\u{1F3FB}\u{1F3FC}\u{1F3FE}\u{1F3FF}]|(?:\u{1F9D1}\u{1F3FC}\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F9D1}|\u{1F469}\u{1F3FC}\u200D\u{1F91D}\u200D[\u{1F468}\u{1F469}])[\u{1F3FB}\u{1F3FD}-\u{1F3FF}]|(?:\u{1F9D1}\u{1F3FB}\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F9D1}|\u{1F469}\u{1F3FB}\u200D\u{1F91D}\u200D[\u{1F468}\u{1F469}])[\u{1F3FC}-\u{1F3FF}]|\u{1F468}(?:\u{1F3FB}(?:\u200D(?:\u2764\uFE0F\u200D(?:\u{1F48B}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FF}]|\u{1F468}[\u{1F3FB}-\u{1F3FF}])|\u{1F91D}\u200D\u{1F468}[\u{1F3FC}-\u{1F3FF}]|[\u2695\u2696\u2708]\uFE0F|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]))?|[\u{1F3FC}-\u{1F3FF}]\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FF}]|\u{1F468}[\u{1F3FB}-\u{1F3FF}])|\u200D(?:\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F468}|[\u{1F468}\u{1F469}]\u200D(?:\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}])|\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}]|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FF}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FE}]|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FE}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FD}\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FD}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}\u{1F3FC}\u{1F3FE}\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FC}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}\u{1F3FD}-\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|(?:\u{1F3FF}\u200D[\u2695\u2696\u2708]|\u{1F3FE}\u200D[\u2695\u2696\u2708]|\u{1F3FD}\u200D[\u2695\u2696\u2708]|\u{1F3FC}\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:[\u{1F468}\u{1F469}]\u200D[\u{1F466}\u{1F467}]|[\u{1F466}\u{1F467}])|\u{1F3FF}|\u{1F3FE}|\u{1F3FD}|\u{1F3FC})?|(?:\u{1F469}(?:\u{1F3FB}\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D[\u{1F468}\u{1F469}]|[\u{1F468}\u{1F469}])|[\u{1F3FC}-\u{1F3FF}]\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D[\u{1F468}\u{1F469}]|[\u{1F468}\u{1F469}]))|\u{1F9D1}[\u{1F3FB}-\u{1F3FF}]\u200D\u{1F91D}\u200D\u{1F9D1})[\u{1F3FB}-\u{1F3FF}]|\u{1F469}\u200D\u{1F469}\u200D(?:\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}])|\u{1F469}(?:\u200D(?:\u2764\uFE0F\u200D(?:\u{1F48B}\u200D[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}(?:\u200D(?:\u{1F91D}\u200D\u{1F9D1}|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F384}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FF}\u200D[\u{1F33E}\u{1F373}\u{1F37C}\u{1F384}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]|\u{1F3FE}\u200D[\u{1F33E}\u{1F373}\u{1F37C}\u{1F384}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]|\u{1F3FD}\u200D[\u{1F33E}\u{1F373}\u{1F37C}\u{1F384}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]|\u{1F3FC}\u200D[\u{1F33E}\u{1F373}\u{1F37C}\u{1F384}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]|\u{1F3FB}\u200D[\u{1F33E}\u{1F373}\u{1F37C}\u{1F384}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F469}\u200D\u{1F466}\u200D\u{1F466}|\u{1F469}\u200D\u{1F469}\u200D[\u{1F466}\u{1F467}]|\u{1F469}\u200D\u{1F467}\u200D[\u{1F466}\u{1F467}]|(?:\u{1F441}\uFE0F\u200D\u{1F5E8}|\u{1F9D1}(?:\u{1F3FF}\u200D[\u2695\u2696\u2708]|\u{1F3FE}\u200D[\u2695\u2696\u2708]|\u{1F3FD}\u200D[\u2695\u2696\u2708]|\u{1F3FC}\u200D[\u2695\u2696\u2708]|\u{1F3FB}\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\u{1F469}(?:\u{1F3FF}\u200D[\u2695\u2696\u2708]|\u{1F3FE}\u200D[\u2695\u2696\u2708]|\u{1F3FD}\u200D[\u2695\u2696\u2708]|\u{1F3FC}\u200D[\u2695\u2696\u2708]|\u{1F3FB}\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\u{1F636}\u200D\u{1F32B}|\u{1F3F3}\uFE0F\u200D\u26A7|\u{1F43B}\u200D\u2744|(?:[\u{1F3C3}\u{1F3C4}\u{1F3CA}\u{1F46E}\u{1F470}\u{1F471}\u{1F473}\u{1F477}\u{1F481}\u{1F482}\u{1F486}\u{1F487}\u{1F645}-\u{1F647}\u{1F64B}\u{1F64D}\u{1F64E}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F926}\u{1F935}\u{1F937}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B8}\u{1F9B9}\u{1F9CD}-\u{1F9CF}\u{1F9D4}\u{1F9D6}-\u{1F9DD}][\u{1F3FB}-\u{1F3FF}]|[\u{1F46F}\u{1F93C}\u{1F9DE}\u{1F9DF}])\u200D[\u2640\u2642]|[\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}][\uFE0F\u{1F3FB}-\u{1F3FF}]\u200D[\u2640\u2642]|\u{1F3F4}\u200D\u2620|[\u{1F3C3}\u{1F3C4}\u{1F3CA}\u{1F46E}\u{1F470}\u{1F471}\u{1F473}\u{1F477}\u{1F481}\u{1F482}\u{1F486}\u{1F487}\u{1F645}-\u{1F647}\u{1F64B}\u{1F64D}\u{1F64E}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F926}\u{1F935}\u{1F937}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B8}\u{1F9B9}\u{1F9CD}-\u{1F9CF}\u{1F9D4}\u{1F9D6}-\u{1F9DD}]\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299\u{1F170}\u{1F171}\u{1F17E}\u{1F17F}\u{1F202}\u{1F237}\u{1F321}\u{1F324}-\u{1F32C}\u{1F336}\u{1F37D}\u{1F396}\u{1F397}\u{1F399}-\u{1F39B}\u{1F39E}\u{1F39F}\u{1F3CD}\u{1F3CE}\u{1F3D4}-\u{1F3DF}\u{1F3F5}\u{1F3F7}\u{1F43F}\u{1F4FD}\u{1F549}\u{1F54A}\u{1F56F}\u{1F570}\u{1F573}\u{1F576}-\u{1F579}\u{1F587}\u{1F58A}-\u{1F58D}\u{1F5A5}\u{1F5A8}\u{1F5B1}\u{1F5B2}\u{1F5BC}\u{1F5C2}-\u{1F5C4}\u{1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\u{1F9B6}\u{1F9BB}\u{1F9D2}\u{1F9D3}\u{1F9D5}][\u{1F3FB}-\u{1F3FF}]|[\u261D\u270C\u270D\u{1F574}\u{1F590}][\uFE0F\u{1F3FB}-\u{1F3FF}]|[\u270A\u270B\u{1F385}\u{1F3C2}\u{1F3C7}\u{1F408}\u{1F415}\u{1F43B}\u{1F442}\u{1F443}\u{1F446}-\u{1F450}\u{1F466}\u{1F467}\u{1F46B}-\u{1F46D}\u{1F472}\u{1F474}-\u{1F476}\u{1F478}\u{1F47C}\u{1F483}\u{1F485}\u{1F48F}\u{1F491}\u{1F4AA}\u{1F57A}\u{1F595}\u{1F596}\u{1F62E}\u{1F635}\u{1F636}\u{1F64C}\u{1F64F}\u{1F6C0}\u{1F6CC}\u{1F90C}\u{1F90F}\u{1F918}-\u{1F91C}\u{1F91E}\u{1F91F}\u{1F930}-\u{1F934}\u{1F936}\u{1F977}\u{1F9B5}\u{1F9B6}\u{1F9BB}\u{1F9D2}\u{1F9D3}\u{1F9D5}]|[\u{1F3C3}\u{1F3C4}\u{1F3CA}\u{1F46E}\u{1F470}\u{1F471}\u{1F473}\u{1F477}\u{1F481}\u{1F482}\u{1F486}\u{1F487}\u{1F645}-\u{1F647}\u{1F64B}\u{1F64D}\u{1F64E}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F926}\u{1F935}\u{1F937}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B8}\u{1F9B9}\u{1F9CD}-\u{1F9CF}\u{1F9D4}\u{1F9D6}-\u{1F9DD}]|[\u{1F46F}\u{1F93C}\u{1F9DE}\u{1F9DF}]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55\u{1F004}\u{1F0CF}\u{1F18E}\u{1F191}-\u{1F19A}\u{1F201}\u{1F21A}\u{1F22F}\u{1F232}-\u{1F236}\u{1F238}-\u{1F23A}\u{1F250}\u{1F251}\u{1F300}-\u{1F320}\u{1F32D}-\u{1F335}\u{1F337}-\u{1F37C}\u{1F37E}-\u{1F384}\u{1F386}-\u{1F393}\u{1F3A0}-\u{1F3C1}\u{1F3C5}\u{1F3C6}\u{1F3C8}\u{1F3C9}\u{1F3CF}-\u{1F3D3}\u{1F3E0}-\u{1F3F0}\u{1F3F8}-\u{1F407}\u{1F409}-\u{1F414}\u{1F416}-\u{1F43A}\u{1F43C}-\u{1F43E}\u{1F440}\u{1F444}\u{1F445}\u{1F451}-\u{1F465}\u{1F46A}\u{1F479}-\u{1F47B}\u{1F47D}-\u{1F480}\u{1F484}\u{1F488}-\u{1F48E}\u{1F490}\u{1F492}-\u{1F4A9}\u{1F4AB}-\u{1F4FC}\u{1F4FF}-\u{1F53D}\u{1F54B}-\u{1F54E}\u{1F550}-\u{1F567}\u{1F5A4}\u{1F5FB}-\u{1F62D}\u{1F62F}-\u{1F634}\u{1F637}-\u{1F644}\u{1F648}-\u{1F64A}\u{1F680}-\u{1F6A2}\u{1F6A4}-\u{1F6B3}\u{1F6B7}-\u{1F6BF}\u{1F6C1}-\u{1F6C5}\u{1F6D0}-\u{1F6D2}\u{1F6D5}-\u{1F6D7}\u{1F6EB}\u{1F6EC}\u{1F6F4}-\u{1F6FC}\u{1F7E0}-\u{1F7EB}\u{1F90D}\u{1F90E}\u{1F910}-\u{1F917}\u{1F91D}\u{1F920}-\u{1F925}\u{1F927}-\u{1F92F}\u{1F93A}\u{1F93F}-\u{1F945}\u{1F947}-\u{1F976}\u{1F978}\u{1F97A}-\u{1F9B4}\u{1F9B7}\u{1F9BA}\u{1F9BC}-\u{1F9CB}\u{1F9D0}\u{1F9E0}-\u{1F9FF}\u{1FA70}-\u{1FA74}\u{1FA78}-\u{1FA7A}\u{1FA80}-\u{1FA86}\u{1FA90}-\u{1FAA8}\u{1FAB0}-\u{1FAB6}\u{1FAC0}-\u{1FAC2}\u{1FAD0}-\u{1FAD6}]/gu; -}; diff --git a/node_modules/@isaacs/cliui/node_modules/emoji-regex/es2015/index.d.ts b/node_modules/@isaacs/cliui/node_modules/emoji-regex/es2015/index.d.ts deleted file mode 100644 index 823dfa65..00000000 --- a/node_modules/@isaacs/cliui/node_modules/emoji-regex/es2015/index.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -declare module 'emoji-regex/es2015' { - function emojiRegex(): RegExp; - - export = emojiRegex; -} diff --git a/node_modules/@isaacs/cliui/node_modules/emoji-regex/es2015/index.js b/node_modules/@isaacs/cliui/node_modules/emoji-regex/es2015/index.js deleted file mode 100644 index 1a4fc8d0..00000000 --- a/node_modules/@isaacs/cliui/node_modules/emoji-regex/es2015/index.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; - -module.exports = () => { - // https://mths.be/emoji - return /\u{1F3F4}\u{E0067}\u{E0062}(?:\u{E0077}\u{E006C}\u{E0073}|\u{E0073}\u{E0063}\u{E0074}|\u{E0065}\u{E006E}\u{E0067})\u{E007F}|(?:\u{1F9D1}\u{1F3FF}\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F9D1}|\u{1F469}\u{1F3FF}\u200D\u{1F91D}\u200D[\u{1F468}\u{1F469}])[\u{1F3FB}-\u{1F3FE}]|(?:\u{1F9D1}\u{1F3FE}\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F9D1}|\u{1F469}\u{1F3FE}\u200D\u{1F91D}\u200D[\u{1F468}\u{1F469}])[\u{1F3FB}-\u{1F3FD}\u{1F3FF}]|(?:\u{1F9D1}\u{1F3FD}\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F9D1}|\u{1F469}\u{1F3FD}\u200D\u{1F91D}\u200D[\u{1F468}\u{1F469}])[\u{1F3FB}\u{1F3FC}\u{1F3FE}\u{1F3FF}]|(?:\u{1F9D1}\u{1F3FC}\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F9D1}|\u{1F469}\u{1F3FC}\u200D\u{1F91D}\u200D[\u{1F468}\u{1F469}])[\u{1F3FB}\u{1F3FD}-\u{1F3FF}]|(?:\u{1F9D1}\u{1F3FB}\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F9D1}|\u{1F469}\u{1F3FB}\u200D\u{1F91D}\u200D[\u{1F468}\u{1F469}])[\u{1F3FC}-\u{1F3FF}]|\u{1F468}(?:\u{1F3FB}(?:\u200D(?:\u2764\uFE0F\u200D(?:\u{1F48B}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FF}]|\u{1F468}[\u{1F3FB}-\u{1F3FF}])|\u{1F91D}\u200D\u{1F468}[\u{1F3FC}-\u{1F3FF}]|[\u2695\u2696\u2708]\uFE0F|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]))?|[\u{1F3FC}-\u{1F3FF}]\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FF}]|\u{1F468}[\u{1F3FB}-\u{1F3FF}])|\u200D(?:\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F468}|[\u{1F468}\u{1F469}]\u200D(?:\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}])|\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}]|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FF}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FE}]|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FE}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FD}\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FD}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}\u{1F3FC}\u{1F3FE}\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FC}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}\u{1F3FD}-\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|(?:\u{1F3FF}\u200D[\u2695\u2696\u2708]|\u{1F3FE}\u200D[\u2695\u2696\u2708]|\u{1F3FD}\u200D[\u2695\u2696\u2708]|\u{1F3FC}\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:[\u{1F468}\u{1F469}]\u200D[\u{1F466}\u{1F467}]|[\u{1F466}\u{1F467}])|\u{1F3FF}|\u{1F3FE}|\u{1F3FD}|\u{1F3FC})?|(?:\u{1F469}(?:\u{1F3FB}\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D[\u{1F468}\u{1F469}]|[\u{1F468}\u{1F469}])|[\u{1F3FC}-\u{1F3FF}]\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D[\u{1F468}\u{1F469}]|[\u{1F468}\u{1F469}]))|\u{1F9D1}[\u{1F3FB}-\u{1F3FF}]\u200D\u{1F91D}\u200D\u{1F9D1})[\u{1F3FB}-\u{1F3FF}]|\u{1F469}\u200D\u{1F469}\u200D(?:\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}])|\u{1F469}(?:\u200D(?:\u2764\uFE0F\u200D(?:\u{1F48B}\u200D[\u{1F468}\u{1F469}]|[\u{1F468}\u{1F469}])|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FF}\u200D[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]|\u{1F3FE}\u200D[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9B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F9B3}\u{1F9BC}\u{1F9BD}]|\u{1F3FD}\u200D[\u{1F33E}\u{1F373}\u{1F37C}\u{1F384}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]|\u{1F3FC}\u200D[\u{1F33E}\u{1F373}\u{1F37C}\u{1F384}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]|\u{1F3FB}\u200D[\u{1F33E}\u{1F373}\u{1F37C}\u{1F384}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F469}\u200D\u{1F466}\u200D\u{1F466}|\u{1F469}\u200D\u{1F469}\u200D[\u{1F466}\u{1F467}]|\u{1F469}\u200D\u{1F467}\u200D[\u{1F466}\u{1F467}]|(?:\u{1F441}\uFE0F\u200D\u{1F5E8}|\u{1F9D1}(?:\u{1F3FF}\u200D[\u2695\u2696\u2708]|\u{1F3FE}\u200D[\u2695\u2696\u2708]|\u{1F3FD}\u200D[\u2695\u2696\u2708]|\u{1F3FC}\u200D[\u2695\u2696\u2708]|\u{1F3FB}\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\u{1F469}(?:\u{1F3FF}\u200D[\u2695\u2696\u2708]|\u{1F3FE}\u200D[\u2695\u2696\u2708]|\u{1F3FD}\u200D[\u2695\u2696\u2708]|\u{1F3FC}\u200D[\u2695\u2696\u2708]|\u{1F3FB}\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\u{1F636}\u200D\u{1F32B}|\u{1F3F3}\uFE0F\u200D\u26A7|\u{1F43B}\u200D\u2744|(?:[\u{1F3C3}\u{1F3C4}\u{1F3CA}\u{1F46E}\u{1F470}\u{1F471}\u{1F473}\u{1F477}\u{1F481}\u{1F482}\u{1F486}\u{1F487}\u{1F645}-\u{1F647}\u{1F64B}\u{1F64D}\u{1F64E}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F926}\u{1F935}\u{1F937}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B8}\u{1F9B9}\u{1F9CD}-\u{1F9CF}\u{1F9D4}\u{1F9D6}-\u{1F9DD}][\u{1F3FB}-\u{1F3FF}]|[\u{1F46F}\u{1F93C}\u{1F9DE}\u{1F9DF}])\u200D[\u2640\u2642]|[\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}][\uFE0F\u{1F3FB}-\u{1F3FF}]\u200D[\u2640\u2642]|\u{1F3F4}\u200D\u2620|[\u{1F3C3}\u{1F3C4}\u{1F3CA}\u{1F46E}\u{1F470}\u{1F471}\u{1F473}\u{1F477}\u{1F481}\u{1F482}\u{1F486}\u{1F487}\u{1F645}-\u{1F647}\u{1F64B}\u{1F64D}\u{1F64E}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F926}\u{1F935}\u{1F937}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B8}\u{1F9B9}\u{1F9CD}-\u{1F9CF}\u{1F9D4}\u{1F9D6}-\u{1F9DD}]\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299\u{1F170}\u{1F171}\u{1F17E}\u{1F17F}\u{1F202}\u{1F237}\u{1F321}\u{1F324}-\u{1F32C}\u{1F336}\u{1F37D}\u{1F396}\u{1F397}\u{1F399}-\u{1F39B}\u{1F39E}\u{1F39F}\u{1F3CD}\u{1F3CE}\u{1F3D4}-\u{1F3DF}\u{1F3F5}\u{1F3F7}\u{1F43F}\u{1F4FD}\u{1F549}\u{1F54A}\u{1F56F}\u{1F570}\u{1F573}\u{1F576}-\u{1F579}\u{1F587}\u{1F58A}-\u{1F58D}\u{1F5A5}\u{1F5A8}\u{1F5B1}\u{1F5B2}\u{1F5BC}\u{1F5C2}-\u{1F5C4}\u{1F5D1}-\u{1F5D3}\u{1F5DC}-\u{1F5DE}\u{1F5E1}\u{1F5E3}\u{1F5E8}\u{1F5EF}\u{1F5F3}\u{1F5FA}\u{1F6CB}\u{1F6CD}-\u{1F6CF}\u{1F6E0}-\u{1F6E5}\u{1F6E9}\u{1F6F0}\u{1F6F3}])\uFE0F|\u{1F3F3}\uFE0F\u200D\u{1F308}|\u{1F469}\u200D\u{1F467}|\u{1F469}\u200D\u{1F466}|\u{1F635}\u200D\u{1F4AB}|\u{1F62E}\u200D\u{1F4A8}|\u{1F415}\u200D\u{1F9BA}|\u{1F9D1}(?:\u{1F3FF}|\u{1F3FE}|\u{1F3FD}|\u{1F3FC}|\u{1F3FB})?|\u{1F469}(?:\u{1F3FF}|\u{1F3FE}|\u{1F3FD}|\u{1F3FC}|\u{1F3FB})?|\u{1F1FD}\u{1F1F0}|\u{1F1F6}\u{1F1E6}|\u{1F1F4}\u{1F1F2}|\u{1F408}\u200D\u2B1B|\u2764\uFE0F\u200D[\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{1F926}\u{1F935}\u{1F937}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B8}\u{1F9B9}\u{1F9CD}-\u{1F9CF}\u{1F9D4}\u{1F9D6}-\u{1F9DD}][\u{1F3FB}-\u{1F3FF}]|[\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}][\uFE0F\u{1F3FB}-\u{1F3FF}]|\u{1F3F4}|[\u270A\u270B\u{1F385}\u{1F3C2}\u{1F3C7}\u{1F442}\u{1F443}\u{1F446}-\u{1F450}\u{1F466}\u{1F467}\u{1F46B}-\u{1F46D}\u{1F472}\u{1F474}-\u{1F476}\u{1F478}\u{1F47C}\u{1F483}\u{1F485}\u{1F48F}\u{1F491}\u{1F4AA}\u{1F57A}\u{1F595}\u{1F596}\u{1F64C}\u{1F64F}\u{1F6C0}\u{1F6CC}\u{1F90C}\u{1F90F}\u{1F918}-\u{1F91C}\u{1F91E}\u{1F91F}\u{1F930}-\u{1F934}\u{1F936}\u{1F977}\u{1F9B5}\u{1F9B6}\u{1F9BB}\u{1F9D2}\u{1F9D3}\u{1F9D5}][\u{1F3FB}-\u{1F3FF}]|[\u261D\u270C\u270D\u{1F574}\u{1F590}][\uFE0F\u{1F3FB}-\u{1F3FF}]|[\u270A\u270B\u{1F385}\u{1F3C2}\u{1F3C7}\u{1F408}\u{1F415}\u{1F43B}\u{1F442}\u{1F443}\u{1F446}-\u{1F450}\u{1F466}\u{1F467}\u{1F46B}-\u{1F46D}\u{1F472}\u{1F474}-\u{1F476}\u{1F478}\u{1F47C}\u{1F483}\u{1F485}\u{1F48F}\u{1F491}\u{1F4AA}\u{1F57A}\u{1F595}\u{1F596}\u{1F62E}\u{1F635}\u{1F636}\u{1F64C}\u{1F64F}\u{1F6C0}\u{1F6CC}\u{1F90C}\u{1F90F}\u{1F918}-\u{1F91C}\u{1F91E}\u{1F91F}\u{1F930}-\u{1F934}\u{1F936}\u{1F977}\u{1F9B5}\u{1F9B6}\u{1F9BB}\u{1F9D2}\u{1F9D3}\u{1F9D5}]|[\u{1F3C3}\u{1F3C4}\u{1F3CA}\u{1F46E}\u{1F470}\u{1F471}\u{1F473}\u{1F477}\u{1F481}\u{1F482}\u{1F486}\u{1F487}\u{1F645}-\u{1F647}\u{1F64B}\u{1F64D}\u{1F64E}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F926}\u{1F935}\u{1F937}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B8}\u{1F9B9}\u{1F9CD}-\u{1F9CF}\u{1F9D4}\u{1F9D6}-\u{1F9DD}]|[\u{1F46F}\u{1F93C}\u{1F9DE}\u{1F9DF}]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55\u{1F004}\u{1F0CF}\u{1F18E}\u{1F191}-\u{1F19A}\u{1F201}\u{1F21A}\u{1F22F}\u{1F232}-\u{1F236}\u{1F238}-\u{1F23A}\u{1F250}\u{1F251}\u{1F300}-\u{1F320}\u{1F32D}-\u{1F335}\u{1F337}-\u{1F37C}\u{1F37E}-\u{1F384}\u{1F386}-\u{1F393}\u{1F3A0}-\u{1F3C1}\u{1F3C5}\u{1F3C6}\u{1F3C8}\u{1F3C9}\u{1F3CF}-\u{1F3D3}\u{1F3E0}-\u{1F3F0}\u{1F3F8}-\u{1F407}\u{1F409}-\u{1F414}\u{1F416}-\u{1F43A}\u{1F43C}-\u{1F43E}\u{1F440}\u{1F444}\u{1F445}\u{1F451}-\u{1F465}\u{1F46A}\u{1F479}-\u{1F47B}\u{1F47D}-\u{1F480}\u{1F484}\u{1F488}-\u{1F48E}\u{1F490}\u{1F492}-\u{1F4A9}\u{1F4AB}-\u{1F4FC}\u{1F4FF}-\u{1F53D}\u{1F54B}-\u{1F54E}\u{1F550}-\u{1F567}\u{1F5A4}\u{1F5FB}-\u{1F62D}\u{1F62F}-\u{1F634}\u{1F637}-\u{1F644}\u{1F648}-\u{1F64A}\u{1F680}-\u{1F6A2}\u{1F6A4}-\u{1F6B3}\u{1F6B7}-\u{1F6BF}\u{1F6C1}-\u{1F6C5}\u{1F6D0}-\u{1F6D2}\u{1F6D5}-\u{1F6D7}\u{1F6EB}\u{1F6EC}\u{1F6F4}-\u{1F6FC}\u{1F7E0}-\u{1F7EB}\u{1F90D}\u{1F90E}\u{1F910}-\u{1F917}\u{1F91D}\u{1F920}-\u{1F925}\u{1F927}-\u{1F92F}\u{1F93A}\u{1F93F}-\u{1F945}\u{1F947}-\u{1F976}\u{1F978}\u{1F97A}-\u{1F9B4}\u{1F9B7}\u{1F9BA}\u{1F9BC}-\u{1F9CB}\u{1F9D0}\u{1F9E0}-\u{1F9FF}\u{1FA70}-\u{1FA74}\u{1FA78}-\u{1FA7A}\u{1FA80}-\u{1FA86}\u{1FA90}-\u{1FAA8}\u{1FAB0}-\u{1FAB6}\u{1FAC0}-\u{1FAC2}\u{1FAD0}-\u{1FAD6}]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55\u{1F004}\u{1F0CF}\u{1F18E}\u{1F191}-\u{1F19A}\u{1F1E6}-\u{1F1FF}\u{1F201}\u{1F21A}\u{1F22F}\u{1F232}-\u{1F236}\u{1F238}-\u{1F23A}\u{1F250}\u{1F251}\u{1F300}-\u{1F320}\u{1F32D}-\u{1F335}\u{1F337}-\u{1F37C}\u{1F37E}-\u{1F393}\u{1F3A0}-\u{1F3CA}\u{1F3CF}-\u{1F3D3}\u{1F3E0}-\u{1F3F0}\u{1F3F4}\u{1F3F8}-\u{1F43E}\u{1F440}\u{1F442}-\u{1F4FC}\u{1F4FF}-\u{1F53D}\u{1F54B}-\u{1F54E}\u{1F550}-\u{1F567}\u{1F57A}\u{1F595}\u{1F596}\u{1F5A4}\u{1F5FB}-\u{1F64F}\u{1F680}-\u{1F6C5}\u{1F6CC}\u{1F6D0}-\u{1F6D2}\u{1F6D5}-\u{1F6D7}\u{1F6EB}\u{1F6EC}\u{1F6F4}-\u{1F6FC}\u{1F7E0}-\u{1F7EB}\u{1F90C}-\u{1F93A}\u{1F93C}-\u{1F945}\u{1F947}-\u{1F978}\u{1F97A}-\u{1F9CB}\u{1F9CD}-\u{1F9FF}\u{1FA70}-\u{1FA74}\u{1FA78}-\u{1FA7A}\u{1FA80}-\u{1FA86}\u{1FA90}-\u{1FAA8}\u{1FAB0}-\u{1FAB6}\u{1FAC0}-\u{1FAC2}\u{1FAD0}-\u{1FAD6}]|[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299\u{1F004}\u{1F0CF}\u{1F170}\u{1F171}\u{1F17E}\u{1F17F}\u{1F18E}\u{1F191}-\u{1F19A}\u{1F1E6}-\u{1F1FF}\u{1F201}\u{1F202}\u{1F21A}\u{1F22F}\u{1F232}-\u{1F23A}\u{1F250}\u{1F251}\u{1F300}-\u{1F321}\u{1F324}-\u{1F393}\u{1F396}\u{1F397}\u{1F399}-\u{1F39B}\u{1F39E}-\u{1F3F0}\u{1F3F3}-\u{1F3F5}\u{1F3F7}-\u{1F4FD}\u{1F4FF}-\u{1F53D}\u{1F549}-\u{1F54E}\u{1F550}-\u{1F567}\u{1F56F}\u{1F570}\u{1F573}-\u{1F57A}\u{1F587}\u{1F58A}-\u{1F58D}\u{1F590}\u{1F595}\u{1F596}\u{1F5A4}\u{1F5A5}\u{1F5A8}\u{1F5B1}\u{1F5B2}\u{1F5BC}\u{1F5C2}-\u{1F5C4}\u{1F5D1}-\u{1F5D3}\u{1F5DC}-\u{1F5DE}\u{1F5E1}\u{1F5E3}\u{1F5E8}\u{1F5EF}\u{1F5F3}\u{1F5FA}-\u{1F64F}\u{1F680}-\u{1F6C5}\u{1F6CB}-\u{1F6D2}\u{1F6D5}-\u{1F6D7}\u{1F6E0}-\u{1F6E5}\u{1F6E9}\u{1F6EB}\u{1F6EC}\u{1F6F0}\u{1F6F3}-\u{1F6FC}\u{1F7E0}-\u{1F7EB}\u{1F90C}-\u{1F93A}\u{1F93C}-\u{1F945}\u{1F947}-\u{1F978}\u{1F97A}-\u{1F9CB}\u{1F9CD}-\u{1F9FF}\u{1FA70}-\u{1FA74}\u{1FA78}-\u{1FA7A}\u{1FA80}-\u{1FA86}\u{1FA90}-\u{1FAA8}\u{1FAB0}-\u{1FAB6}\u{1FAC0}-\u{1FAC2}\u{1FAD0}-\u{1FAD6}]\uFE0F|[\u261D\u26F9\u270A-\u270D\u{1F385}\u{1F3C2}-\u{1F3C4}\u{1F3C7}\u{1F3CA}-\u{1F3CC}\u{1F442}\u{1F443}\u{1F446}-\u{1F450}\u{1F466}-\u{1F478}\u{1F47C}\u{1F481}-\u{1F483}\u{1F485}-\u{1F487}\u{1F48F}\u{1F491}\u{1F4AA}\u{1F574}\u{1F575}\u{1F57A}\u{1F590}\u{1F595}\u{1F596}\u{1F645}-\u{1F647}\u{1F64B}-\u{1F64F}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F6C0}\u{1F6CC}\u{1F90C}\u{1F90F}\u{1F918}-\u{1F91F}\u{1F926}\u{1F930}-\u{1F939}\u{1F93C}-\u{1F93E}\u{1F977}\u{1F9B5}\u{1F9B6}\u{1F9B8}\u{1F9B9}\u{1F9BB}\u{1F9CD}-\u{1F9CF}\u{1F9D1}-\u{1F9DD}]/gu; -}; diff --git a/node_modules/@isaacs/cliui/node_modules/emoji-regex/es2015/text.d.ts b/node_modules/@isaacs/cliui/node_modules/emoji-regex/es2015/text.d.ts deleted file mode 100644 index ccc2f9ad..00000000 --- a/node_modules/@isaacs/cliui/node_modules/emoji-regex/es2015/text.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -declare module 'emoji-regex/es2015/text' { - function emojiRegex(): RegExp; - - export = emojiRegex; -} diff --git a/node_modules/@isaacs/cliui/node_modules/emoji-regex/es2015/text.js b/node_modules/@isaacs/cliui/node_modules/emoji-regex/es2015/text.js deleted file mode 100644 index 8e9f9857..00000000 --- a/node_modules/@isaacs/cliui/node_modules/emoji-regex/es2015/text.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; - -module.exports = () => { - // https://mths.be/emoji - return /\u{1F3F4}\u{E0067}\u{E0062}(?:\u{E0077}\u{E006C}\u{E0073}|\u{E0073}\u{E0063}\u{E0074}|\u{E0065}\u{E006E}\u{E0067})\u{E007F}|(?:\u{1F9D1}\u{1F3FF}\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F9D1}|\u{1F469}\u{1F3FF}\u200D\u{1F91D}\u200D[\u{1F468}\u{1F469}])[\u{1F3FB}-\u{1F3FE}]|(?:\u{1F9D1}\u{1F3FE}\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F9D1}|\u{1F469}\u{1F3FE}\u200D\u{1F91D}\u200D[\u{1F468}\u{1F469}])[\u{1F3FB}-\u{1F3FD}\u{1F3FF}]|(?:\u{1F9D1}\u{1F3FD}\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F9D1}|\u{1F469}\u{1F3FD}\u200D\u{1F91D}\u200D[\u{1F468}\u{1F469}])[\u{1F3FB}\u{1F3FC}\u{1F3FE}\u{1F3FF}]|(?:\u{1F9D1}\u{1F3FC}\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F9D1}|\u{1F469}\u{1F3FC}\u200D\u{1F91D}\u200D[\u{1F468}\u{1F469}])[\u{1F3FB}\u{1F3FD}-\u{1F3FF}]|(?:\u{1F9D1}\u{1F3FB}\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F9D1}|\u{1F469}\u{1F3FB}\u200D\u{1F91D}\u200D[\u{1F468}\u{1F469}])[\u{1F3FC}-\u{1F3FF}]|\u{1F468}(?:\u{1F3FB}(?:\u200D(?:\u2764\uFE0F\u200D(?:\u{1F48B}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FF}]|\u{1F468}[\u{1F3FB}-\u{1F3FF}])|\u{1F91D}\u200D\u{1F468}[\u{1F3FC}-\u{1F3FF}]|[\u2695\u2696\u2708]\uFE0F|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]))?|[\u{1F3FC}-\u{1F3FF}]\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FF}]|\u{1F468}[\u{1F3FB}-\u{1F3FF}])|\u200D(?:\u2764\uFE0F\u200D(?:\u{1F48B}\u200D)?\u{1F468}|[\u{1F468}\u{1F469}]\u200D(?:\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}])|\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}]|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FF}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FE}]|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FE}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}-\u{1F3FD}\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FD}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}\u{1F3FC}\u{1F3FE}\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FC}\u200D(?:\u{1F91D}\u200D\u{1F468}[\u{1F3FB}\u{1F3FD}-\u{1F3FF}]|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|(?:\u{1F3FF}\u200D[\u2695\u2696\u2708]|\u{1F3FE}\u200D[\u2695\u2696\u2708]|\u{1F3FD}\u200D[\u2695\u2696\u2708]|\u{1F3FC}\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:[\u{1F468}\u{1F469}]\u200D[\u{1F466}\u{1F467}]|[\u{1F466}\u{1F467}])|\u{1F3FF}|\u{1F3FE}|\u{1F3FD}|\u{1F3FC})?|(?:\u{1F469}(?:\u{1F3FB}\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D[\u{1F468}\u{1F469}]|[\u{1F468}\u{1F469}])|[\u{1F3FC}-\u{1F3FF}]\u200D\u2764\uFE0F\u200D(?:\u{1F48B}\u200D[\u{1F468}\u{1F469}]|[\u{1F468}\u{1F469}]))|\u{1F9D1}[\u{1F3FB}-\u{1F3FF}]\u200D\u{1F91D}\u200D\u{1F9D1})[\u{1F3FB}-\u{1F3FF}]|\u{1F469}\u200D\u{1F469}\u200D(?:\u{1F466}\u200D\u{1F466}|\u{1F467}\u200D[\u{1F466}\u{1F467}])|\u{1F469}(?:\u200D(?:\u2764\uFE0F\u200D(?:\u{1F48B}\u200D[\u{1F468}\u{1F469}]|[\u{1F468}\u{1F469}])|[\u{1F33E}\u{1F373}\u{1F37C}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u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F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F3FF}\u200D[\u{1F33E}\u{1F373}\u{1F37C}\u{1F384}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]|\u{1F3FE}\u200D[\u{1F33E}\u{1F373}\u{1F37C}\u{1F384}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]|\u{1F3FD}\u200D[\u{1F33E}\u{1F373}\u{1F37C}\u{1F384}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]|\u{1F3FC}\u200D[\u{1F33E}\u{1F373}\u{1F37C}\u{1F384}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}]|\u{1F3FB}\u200D[\u{1F33E}\u{1F373}\u{1F37C}\u{1F384}\u{1F393}\u{1F3A4}\u{1F3A8}\u{1F3EB}\u{1F3ED}\u{1F4BB}\u{1F4BC}\u{1F527}\u{1F52C}\u{1F680}\u{1F692}\u{1F9AF}-\u{1F9B3}\u{1F9BC}\u{1F9BD}])|\u{1F469}\u200D\u{1F466}\u200D\u{1F466}|\u{1F469}\u200D\u{1F469}\u200D[\u{1F466}\u{1F467}]|\u{1F469}\u200D\u{1F467}\u200D[\u{1F466}\u{1F467}]|(?:\u{1F441}\uFE0F\u200D\u{1F5E8}|\u{1F9D1}(?:\u{1F3FF}\u200D[\u2695\u2696\u2708]|\u{1F3FE}\u200D[\u2695\u2696\u2708]|\u{1F3FD}\u200D[\u2695\u2696\u2708]|\u{1F3FC}\u200D[\u2695\u2696\u2708]|\u{1F3FB}\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\u{1F469}(?:\u{1F3FF}\u200D[\u2695\u2696\u2708]|\u{1F3FE}\u200D[\u2695\u2696\u2708]|\u{1F3FD}\u200D[\u2695\u2696\u2708]|\u{1F3FC}\u200D[\u2695\u2696\u2708]|\u{1F3FB}\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\u{1F636}\u200D\u{1F32B}|\u{1F3F3}\uFE0F\u200D\u26A7|\u{1F43B}\u200D\u2744|(?:[\u{1F3C3}\u{1F3C4}\u{1F3CA}\u{1F46E}\u{1F470}\u{1F471}\u{1F473}\u{1F477}\u{1F481}\u{1F482}\u{1F486}\u{1F487}\u{1F645}-\u{1F647}\u{1F64B}\u{1F64D}\u{1F64E}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F926}\u{1F935}\u{1F937}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B8}\u{1F9B9}\u{1F9CD}-\u{1F9CF}\u{1F9D4}\u{1F9D6}-\u{1F9DD}][\u{1F3FB}-\u{1F3FF}]|[\u{1F46F}\u{1F93C}\u{1F9DE}\u{1F9DF}])\u200D[\u2640\u2642]|[\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}][\uFE0F\u{1F3FB}-\u{1F3FF}]\u200D[\u2640\u2642]|\u{1F3F4}\u200D\u2620|[\u{1F3C3}\u{1F3C4}\u{1F3CA}\u{1F46E}\u{1F470}\u{1F471}\u{1F473}\u{1F477}\u{1F481}\u{1F482}\u{1F486}\u{1F487}\u{1F645}-\u{1F647}\u{1F64B}\u{1F64D}\u{1F64E}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F926}\u{1F935}\u{1F937}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B8}\u{1F9B9}\u{1F9CD}-\u{1F9CF}\u{1F9D4}\u{1F9D6}-\u{1F9DD}]\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299\u{1F170}\u{1F171}\u{1F17E}\u{1F17F}\u{1F202}\u{1F237}\u{1F321}\u{1F324}-\u{1F32C}\u{1F336}\u{1F37D}\u{1F396}\u{1F397}\u{1F399}-\u{1F39B}\u{1F39E}\u{1F39F}\u{1F3CD}\u{1F3CE}\u{1F3D4}-\u{1F3DF}\u{1F3F5}\u{1F3F7}\u{1F43F}\u{1F4FD}\u{1F549}\u{1F54A}\u{1F56F}\u{1F570}\u{1F573}\u{1F576}-\u{1F579}\u{1F587}\u{1F58A}-\u{1F58D}\u{1F5A5}\u{1F5A8}\u{1F5B1}\u{1F5B2}\u{1F5BC}\u{1F5C2}-\u{1F5C4}\u{1F5D1}-\u{1F5D3}\u{1F5DC}-\u{1F5DE}\u{1F5E1}\u{1F5E3}\u{1F5E8}\u{1F5EF}\u{1F5F3}\u{1F5FA}\u{1F6CB}\u{1F6CD}-\u{1F6CF}\u{1F6E0}-\u{1F6E5}\u{1F6E9}\u{1F6F0}\u{1F6F3}])\uFE0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F9}\u{1F1FB}\u{1F1FC}\u{1F1FE}\u{1F1FF}]|\u{1F1E6}[\u{1F1E8}-\u{1F1EC}\u{1F1EE}\u{1F1F1}\u{1F1F2}\u{1F1F4}\u{1F1F6}-\u{1F1FA}\u{1F1FC}\u{1F1FD}\u{1F1FF}]|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|[\u{1F3C3}\u{1F3C4}\u{1F3CA}\u{1F46E}\u{1F470}\u{1F471}\u{1F473}\u{1F477}\u{1F481}\u{1F482}\u{1F486}\u{1F487}\u{1F645}-\u{1F647}\u{1F64B}\u{1F64D}\u{1F64E}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F926}\u{1F935}\u{1F937}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B8}\u{1F9B9}\u{1F9CD}-\u{1F9CF}\u{1F9D4}\u{1F9D6}-\u{1F9DD}][\u{1F3FB}-\u{1F3FF}]|[\u26F9\u{1F3CB}\u{1F3CC}\u{1F575}][\uFE0F\u{1F3FB}-\u{1F3FF}]|\u{1F3F4}|[\u270A\u270B\u{1F385}\u{1F3C2}\u{1F3C7}\u{1F442}\u{1F443}\u{1F446}-\u{1F450}\u{1F466}\u{1F467}\u{1F46B}-\u{1F46D}\u{1F472}\u{1F474}-\u{1F476}\u{1F478}\u{1F47C}\u{1F483}\u{1F485}\u{1F48F}\u{1F491}\u{1F4AA}\u{1F57A}\u{1F595}\u{1F596}\u{1F64C}\u{1F64F}\u{1F6C0}\u{1F6CC}\u{1F90C}\u{1F90F}\u{1F918}-\u{1F91C}\u{1F91E}\u{1F91F}\u{1F930}-\u{1F934}\u{1F936}\u{1F977}\u{1F9B5}\u{1F9B6}\u{1F9BB}\u{1F9D2}\u{1F9D3}\u{1F9D5}][\u{1F3FB}-\u{1F3FF}]|[\u261D\u270C\u270D\u{1F574}\u{1F590}][\uFE0F\u{1F3FB}-\u{1F3FF}]|[\u270A\u270B\u{1F385}\u{1F3C2}\u{1F3C7}\u{1F408}\u{1F415}\u{1F43B}\u{1F442}\u{1F443}\u{1F446}-\u{1F450}\u{1F466}\u{1F467}\u{1F46B}-\u{1F46D}\u{1F472}\u{1F474}-\u{1F476}\u{1F478}\u{1F47C}\u{1F483}\u{1F485}\u{1F48F}\u{1F491}\u{1F4AA}\u{1F57A}\u{1F595}\u{1F596}\u{1F62E}\u{1F635}\u{1F636}\u{1F64C}\u{1F64F}\u{1F6C0}\u{1F6CC}\u{1F90C}\u{1F90F}\u{1F918}-\u{1F91C}\u{1F91E}\u{1F91F}\u{1F930}-\u{1F934}\u{1F936}\u{1F977}\u{1F9B5}\u{1F9B6}\u{1F9BB}\u{1F9D2}\u{1F9D3}\u{1F9D5}]|[\u{1F3C3}\u{1F3C4}\u{1F3CA}\u{1F46E}\u{1F470}\u{1F471}\u{1F473}\u{1F477}\u{1F481}\u{1F482}\u{1F486}\u{1F487}\u{1F645}-\u{1F647}\u{1F64B}\u{1F64D}\u{1F64E}\u{1F6A3}\u{1F6B4}-\u{1F6B6}\u{1F926}\u{1F935}\u{1F937}-\u{1F939}\u{1F93D}\u{1F93E}\u{1F9B8}\u{1F9B9}\u{1F9CD}-\u{1F9CF}\u{1F9D4}\u{1F9D6}-\u{1F9DD}]|[\u{1F46F}\u{1F93C}\u{1F9DE}\u{1F9DF}]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55\u{1F004}\u{1F0CF}\u{1F18E}\u{1F191}-\u{1F19A}\u{1F201}\u{1F21A}\u{1F22F}\u{1F232}-\u{1F236}\u{1F238}-\u{1F23A}\u{1F250}\u{1F251}\u{1F300}-\u{1F320}\u{1F32D}-\u{1F335}\u{1F337}-\u{1F37C}\u{1F37E}-\u{1F384}\u{1F386}-\u{1F393}\u{1F3A0}-\u{1F3C1}\u{1F3C5}\u{1F3C6}\u{1F3C8}\u{1F3C9}\u{1F3CF}-\u{1F3D3}\u{1F3E0}-\u{1F3F0}\u{1F3F8}-\u{1F407}\u{1F409}-\u{1F414}\u{1F416}-\u{1F43A}\u{1F43C}-\u{1F43E}\u{1F440}\u{1F444}\u{1F445}\u{1F451}-\u{1F465}\u{1F46A}\u{1F479}-\u{1F47B}\u{1F47D}-\u{1F480}\u{1F484}\u{1F488}-\u{1F48E}\u{1F490}\u{1F492}-\u{1F4A9}\u{1F4AB}-\u{1F4FC}\u{1F4FF}-\u{1F53D}\u{1F54B}-\u{1F54E}\u{1F550}-\u{1F567}\u{1F5A4}\u{1F5FB}-\u{1F62D}\u{1F62F}-\u{1F634}\u{1F637}-\u{1F644}\u{1F648}-\u{1F64A}\u{1F680}-\u{1F6A2}\u{1F6A4}-\u{1F6B3}\u{1F6B7}-\u{1F6BF}\u{1F6C1}-\u{1F6C5}\u{1F6D0}-\u{1F6D2}\u{1F6D5}-\u{1F6D7}\u{1F6EB}\u{1F6EC}\u{1F6F4}-\u{1F6FC}\u{1F7E0}-\u{1F7EB}\u{1F90D}\u{1F90E}\u{1F910}-\u{1F917}\u{1F91D}\u{1F920}-\u{1F925}\u{1F927}-\u{1F92F}\u{1F93A}\u{1F93F}-\u{1F945}\u{1F947}-\u{1F976}\u{1F978}\u{1F97A}-\u{1F9B4}\u{1F9B7}\u{1F9BA}\u{1F9BC}-\u{1F9CB}\u{1F9D0}\u{1F9E0}-\u{1F9FF}\u{1FA70}-\u{1FA74}\u{1FA78}-\u{1FA7A}\u{1FA80}-\u{1FA86}\u{1FA90}-\u{1FAA8}\u{1FAB0}-\u{1FAB6}\u{1FAC0}-\u{1FAC2}\u{1FAD0}-\u{1FAD6}]|[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299\u{1F004}\u{1F0CF}\u{1F170}\u{1F171}\u{1F17E}\u{1F17F}\u{1F18E}\u{1F191}-\u{1F19A}\u{1F1E6}-\u{1F1FF}\u{1F201}\u{1F202}\u{1F21A}\u{1F22F}\u{1F232}-\u{1F23A}\u{1F250}\u{1F251}\u{1F300}-\u{1F321}\u{1F324}-\u{1F393}\u{1F396}\u{1F397}\u{1F399}-\u{1F39B}\u{1F39E}-\u{1F3F0}\u{1F3F3}-\u{1F3F5}\u{1F3F7}-\u{1F4FD}\u{1F4FF}-\u{1F53D}\u{1F549}-\u{1F54E}\u{1F550}-\u{1F567}\u{1F56F}\u{1F570}\u{1F573}-\u{1F57A}\u{1F587}\u{1F58A}-\u{1F58D}\u{1F590}\u{1F595}\u{1F596}\u{1F5A4}\u{1F5A5}\u{1F5A8}\u{1F5B1}\u{1F5B2}\u{1F5BC}\u{1F5C2}-\u{1F5C4}\u{1F5D1}-\u{1F5D3}\u{1F5DC}-\u{1F5DE}\u{1F5E1}\u{1F5E3}\u{1F5E8}\u{1F5EF}\u{1F5F3}\u{1F5FA}-\u{1F64F}\u{1F680}-\u{1F6C5}\u{1F6CB}-\u{1F6D2}\u{1F6D5}-\u{1F6D7}\u{1F6E0}-\u{1F6E5}\u{1F6E9}\u{1F6EB}\u{1F6EC}\u{1F6F0}\u{1F6F3}-\u{1F6FC}\u{1F7E0}-\u{1F7EB}\u{1F90C}-\u{1F93A}\u{1F93C}-\u{1F945}\u{1F947}-\u{1F978}\u{1F97A}-\u{1F9CB}\u{1F9CD}-\u{1F9FF}\u{1FA70}-\u{1FA74}\u{1FA78}-\u{1FA7A}\u{1FA80}-\u{1FA86}\u{1FA90}-\u{1FAA8}\u{1FAB0}-\u{1FAB6}\u{1FAC0}-\u{1FAC2}\u{1FAD0}-\u{1FAD6}]\uFE0F?/gu; -}; diff --git a/node_modules/@isaacs/cliui/node_modules/emoji-regex/index.d.ts b/node_modules/@isaacs/cliui/node_modules/emoji-regex/index.d.ts deleted file mode 100644 index 8f235c9a..00000000 --- a/node_modules/@isaacs/cliui/node_modules/emoji-regex/index.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -declare module 'emoji-regex' { - function emojiRegex(): RegExp; - - export = emojiRegex; -} diff --git a/node_modules/@isaacs/cliui/node_modules/emoji-regex/index.js b/node_modules/@isaacs/cliui/node_modules/emoji-regex/index.js deleted file mode 100644 index c0490d4c..00000000 --- a/node_modules/@isaacs/cliui/node_modules/emoji-regex/index.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; - -module.exports = function () { - // https://mths.be/emoji - return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\u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\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C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|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g; -}; diff --git a/node_modules/@isaacs/cliui/node_modules/emoji-regex/package.json b/node_modules/@isaacs/cliui/node_modules/emoji-regex/package.json deleted file mode 100644 index eac892a1..00000000 --- a/node_modules/@isaacs/cliui/node_modules/emoji-regex/package.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "name": "emoji-regex", - "version": "9.2.2", - "description": "A regular expression to match all Emoji-only symbols as per the Unicode Standard.", - "homepage": "https://mths.be/emoji-regex", - "main": "index.js", - "types": "index.d.ts", - "keywords": [ - "unicode", - "regex", - "regexp", - "regular expressions", - "code points", - "symbols", - "characters", - "emoji" - ], - "license": "MIT", - "author": { - "name": "Mathias Bynens", - "url": "https://mathiasbynens.be/" - }, - "repository": { - "type": "git", - "url": "https://github.com/mathiasbynens/emoji-regex.git" - }, - "bugs": "https://github.com/mathiasbynens/emoji-regex/issues", - "files": [ - "LICENSE-MIT.txt", - "index.js", - "index.d.ts", - "RGI_Emoji.js", - "RGI_Emoji.d.ts", - "text.js", - "text.d.ts", - "es2015" - ], - "scripts": { - "build": "rm -rf -- es2015; babel src -d .; NODE_ENV=es2015 babel src es2015_types -D -d ./es2015; node script/inject-sequences.js", - "test": "mocha", - "test:watch": "npm run test -- --watch" - }, - "devDependencies": { - "@babel/cli": "^7.4.4", - "@babel/core": "^7.4.4", - "@babel/plugin-proposal-unicode-property-regex": "^7.4.4", - "@babel/preset-env": "^7.4.4", - "@unicode/unicode-13.0.0": "^1.0.3", - "mocha": "^6.1.4", - "regexgen": "^1.3.0" - } -} diff --git a/node_modules/@isaacs/cliui/node_modules/emoji-regex/text.d.ts b/node_modules/@isaacs/cliui/node_modules/emoji-regex/text.d.ts deleted file mode 100644 index c3a01254..00000000 --- a/node_modules/@isaacs/cliui/node_modules/emoji-regex/text.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -declare module 'emoji-regex/text' { - function emojiRegex(): RegExp; - - export = emojiRegex; -} diff --git a/node_modules/@isaacs/cliui/node_modules/emoji-regex/text.js b/node_modules/@isaacs/cliui/node_modules/emoji-regex/text.js deleted file mode 100644 index 9bc63ce7..00000000 --- a/node_modules/@isaacs/cliui/node_modules/emoji-regex/text.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; - -module.exports = function () { - // https://mths.be/emoji - return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\u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DD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21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A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F?/g; -}; diff --git a/node_modules/@isaacs/cliui/node_modules/string-width/index.d.ts b/node_modules/@isaacs/cliui/node_modules/string-width/index.d.ts deleted file mode 100644 index aed9fdff..00000000 --- a/node_modules/@isaacs/cliui/node_modules/string-width/index.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -export interface Options { - /** - Count [ambiguous width characters](https://www.unicode.org/reports/tr11/#Ambiguous) as having narrow width (count of 1) instead of wide width (count of 2). - - @default true - */ - readonly ambiguousIsNarrow: boolean; -} - -/** -Get the visual width of a string - the number of columns required to display it. - -Some Unicode characters are [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms) and use double the normal width. [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) are stripped and doesn't affect the width. - -@example -``` -import stringWidth from 'string-width'; - -stringWidth('a'); -//=> 1 - -stringWidth('古'); -//=> 2 - -stringWidth('\u001B[1m古\u001B[22m'); -//=> 2 -``` -*/ -export default function stringWidth(string: string, options?: Options): number; diff --git a/node_modules/@isaacs/cliui/node_modules/string-width/index.js b/node_modules/@isaacs/cliui/node_modules/string-width/index.js deleted file mode 100644 index 9294488f..00000000 --- a/node_modules/@isaacs/cliui/node_modules/string-width/index.js +++ /dev/null @@ -1,54 +0,0 @@ -import stripAnsi from 'strip-ansi'; -import eastAsianWidth from 'eastasianwidth'; -import emojiRegex from 'emoji-regex'; - -export default function stringWidth(string, options = {}) { - if (typeof string !== 'string' || string.length === 0) { - return 0; - } - - options = { - ambiguousIsNarrow: true, - ...options - }; - - string = stripAnsi(string); - - if (string.length === 0) { - return 0; - } - - string = string.replace(emojiRegex(), ' '); - - const ambiguousCharacterWidth = options.ambiguousIsNarrow ? 1 : 2; - let width = 0; - - for (const character of string) { - const codePoint = character.codePointAt(0); - - // Ignore control characters - if (codePoint <= 0x1F || (codePoint >= 0x7F && codePoint <= 0x9F)) { - continue; - } - - // Ignore combining characters - if (codePoint >= 0x300 && codePoint <= 0x36F) { - continue; - } - - const code = eastAsianWidth.eastAsianWidth(character); - switch (code) { - case 'F': - case 'W': - width += 2; - break; - case 'A': - width += ambiguousCharacterWidth; - break; - default: - width += 1; - } - } - - return width; -} diff --git a/node_modules/@isaacs/cliui/node_modules/string-width/license b/node_modules/@isaacs/cliui/node_modules/string-width/license deleted file mode 100644 index fa7ceba3..00000000 --- a/node_modules/@isaacs/cliui/node_modules/string-width/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (https://sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@isaacs/cliui/node_modules/string-width/package.json b/node_modules/@isaacs/cliui/node_modules/string-width/package.json deleted file mode 100644 index f46d6770..00000000 --- a/node_modules/@isaacs/cliui/node_modules/string-width/package.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "name": "string-width", - "version": "5.1.2", - "description": "Get the visual width of a string - the number of columns required to display it", - "license": "MIT", - "repository": "sindresorhus/string-width", - "funding": "https://github.com/sponsors/sindresorhus", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "https://sindresorhus.com" - }, - "type": "module", - "exports": "./index.js", - "engines": { - "node": ">=12" - }, - "scripts": { - "test": "xo && ava && tsd" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "keywords": [ - "string", - "character", - "unicode", - "width", - "visual", - "column", - "columns", - "fullwidth", - "full-width", - "full", - "ansi", - "escape", - "codes", - "cli", - "command-line", - "terminal", - "console", - "cjk", - "chinese", - "japanese", - "korean", - "fixed-width" - ], - "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" - }, - "devDependencies": { - "ava": "^3.15.0", - "tsd": "^0.14.0", - "xo": "^0.38.2" - } -} diff --git a/node_modules/@isaacs/cliui/node_modules/string-width/readme.md b/node_modules/@isaacs/cliui/node_modules/string-width/readme.md deleted file mode 100644 index 52910df1..00000000 --- a/node_modules/@isaacs/cliui/node_modules/string-width/readme.md +++ /dev/null @@ -1,67 +0,0 @@ -# string-width - -> Get the visual width of a string - the number of columns required to display it - -Some Unicode characters are [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms) and use double the normal width. [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) are stripped and doesn't affect the width. - -Useful to be able to measure the actual width of command-line output. - -## Install - -``` -$ npm install string-width -``` - -## Usage - -```js -import stringWidth from 'string-width'; - -stringWidth('a'); -//=> 1 - -stringWidth('古'); -//=> 2 - -stringWidth('\u001B[1m古\u001B[22m'); -//=> 2 -``` - -## API - -### stringWidth(string, options?) - -#### string - -Type: `string` - -The string to be counted. - -#### options - -Type: `object` - -##### ambiguousIsNarrow - -Type: `boolean`\ -Default: `false` - -Count [ambiguous width characters](https://www.unicode.org/reports/tr11/#Ambiguous) as having narrow width (count of 1) instead of wide width (count of 2). - -## Related - -- [string-width-cli](https://github.com/sindresorhus/string-width-cli) - CLI for this module -- [string-length](https://github.com/sindresorhus/string-length) - Get the real length of a string -- [widest-line](https://github.com/sindresorhus/widest-line) - Get the visual width of the widest line in a string - ---- - - diff --git a/node_modules/@isaacs/cliui/node_modules/strip-ansi/index.d.ts b/node_modules/@isaacs/cliui/node_modules/strip-ansi/index.d.ts deleted file mode 100644 index 44e954d0..00000000 --- a/node_modules/@isaacs/cliui/node_modules/strip-ansi/index.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** -Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) from a string. - -@example -``` -import stripAnsi from 'strip-ansi'; - -stripAnsi('\u001B[4mUnicorn\u001B[0m'); -//=> 'Unicorn' - -stripAnsi('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007'); -//=> 'Click' -``` -*/ -export default function stripAnsi(string: string): string; diff --git a/node_modules/@isaacs/cliui/node_modules/strip-ansi/index.js b/node_modules/@isaacs/cliui/node_modules/strip-ansi/index.js deleted file mode 100644 index ba19750e..00000000 --- a/node_modules/@isaacs/cliui/node_modules/strip-ansi/index.js +++ /dev/null @@ -1,14 +0,0 @@ -import ansiRegex from 'ansi-regex'; - -const regex = ansiRegex(); - -export default function stripAnsi(string) { - if (typeof string !== 'string') { - throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``); - } - - // Even though the regex is global, we don't need to reset the `.lastIndex` - // because unlike `.exec()` and `.test()`, `.replace()` does it automatically - // and doing it manually has a performance penalty. - return string.replace(regex, ''); -} diff --git a/node_modules/@isaacs/cliui/node_modules/strip-ansi/license b/node_modules/@isaacs/cliui/node_modules/strip-ansi/license deleted file mode 100644 index fa7ceba3..00000000 --- a/node_modules/@isaacs/cliui/node_modules/strip-ansi/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (https://sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@isaacs/cliui/node_modules/strip-ansi/package.json b/node_modules/@isaacs/cliui/node_modules/strip-ansi/package.json deleted file mode 100644 index e1f455c3..00000000 --- a/node_modules/@isaacs/cliui/node_modules/strip-ansi/package.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "name": "strip-ansi", - "version": "7.1.0", - "description": "Strip ANSI escape codes from a string", - "license": "MIT", - "repository": "chalk/strip-ansi", - "funding": "https://github.com/chalk/strip-ansi?sponsor=1", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "https://sindresorhus.com" - }, - "type": "module", - "exports": "./index.js", - "engines": { - "node": ">=12" - }, - "scripts": { - "test": "xo && ava && tsd" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "keywords": [ - "strip", - "trim", - "remove", - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "devDependencies": { - "ava": "^3.15.0", - "tsd": "^0.17.0", - "xo": "^0.44.0" - } -} diff --git a/node_modules/@isaacs/cliui/node_modules/strip-ansi/readme.md b/node_modules/@isaacs/cliui/node_modules/strip-ansi/readme.md deleted file mode 100644 index 56278510..00000000 --- a/node_modules/@isaacs/cliui/node_modules/strip-ansi/readme.md +++ /dev/null @@ -1,41 +0,0 @@ -# strip-ansi - -> Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) from a string - -## Install - -``` -$ npm install strip-ansi -``` - -## Usage - -```js -import stripAnsi from 'strip-ansi'; - -stripAnsi('\u001B[4mUnicorn\u001B[0m'); -//=> 'Unicorn' - -stripAnsi('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007'); -//=> 'Click' -``` - -## strip-ansi for enterprise - -Available as part of the Tidelift Subscription. - -The maintainers of strip-ansi and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-strip-ansi?utm_source=npm-strip-ansi&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) - -## Related - -- [strip-ansi-cli](https://github.com/chalk/strip-ansi-cli) - CLI for this module -- [strip-ansi-stream](https://github.com/chalk/strip-ansi-stream) - Streaming version of this module -- [has-ansi](https://github.com/chalk/has-ansi) - Check if a string has ANSI escape codes -- [ansi-regex](https://github.com/chalk/ansi-regex) - Regular expression for matching ANSI escape codes -- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right - -## Maintainers - -- [Sindre Sorhus](https://github.com/sindresorhus) -- [Josh Junon](https://github.com/qix-) - diff --git a/node_modules/@isaacs/cliui/node_modules/wrap-ansi/index.d.ts b/node_modules/@isaacs/cliui/node_modules/wrap-ansi/index.d.ts deleted file mode 100644 index 95471cad..00000000 --- a/node_modules/@isaacs/cliui/node_modules/wrap-ansi/index.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -export type Options = { - /** - By default the wrap is soft, meaning long words may extend past the column width. Setting this to `true` will make it hard wrap at the column width. - - @default false - */ - readonly hard?: boolean; - - /** - By default, an attempt is made to split words at spaces, ensuring that they don't extend past the configured columns. If wordWrap is `false`, each column will instead be completely filled splitting words as necessary. - - @default true - */ - readonly wordWrap?: boolean; - - /** - Whitespace on all lines is removed by default. Set this option to `false` if you don't want to trim. - - @default true - */ - readonly trim?: boolean; -}; - -/** -Wrap words to the specified column width. - -@param string - String with ANSI escape codes. Like one styled by [`chalk`](https://github.com/chalk/chalk). Newline characters will be normalized to `\n`. -@param columns - Number of columns to wrap the text to. - -@example -``` -import chalk from 'chalk'; -import wrapAnsi from 'wrap-ansi'; - -const input = 'The quick brown ' + chalk.red('fox jumped over ') + - 'the lazy ' + chalk.green('dog and then ran away with the unicorn.'); - -console.log(wrapAnsi(input, 20)); -``` -*/ -export default function wrapAnsi(string: string, columns: number, options?: Options): string; diff --git a/node_modules/@isaacs/cliui/node_modules/wrap-ansi/index.js b/node_modules/@isaacs/cliui/node_modules/wrap-ansi/index.js deleted file mode 100755 index d80c74c1..00000000 --- a/node_modules/@isaacs/cliui/node_modules/wrap-ansi/index.js +++ /dev/null @@ -1,214 +0,0 @@ -import stringWidth from 'string-width'; -import stripAnsi from 'strip-ansi'; -import ansiStyles from 'ansi-styles'; - -const ESCAPES = new Set([ - '\u001B', - '\u009B', -]); - -const END_CODE = 39; -const ANSI_ESCAPE_BELL = '\u0007'; -const ANSI_CSI = '['; -const ANSI_OSC = ']'; -const ANSI_SGR_TERMINATOR = 'm'; -const ANSI_ESCAPE_LINK = `${ANSI_OSC}8;;`; - -const wrapAnsiCode = code => `${ESCAPES.values().next().value}${ANSI_CSI}${code}${ANSI_SGR_TERMINATOR}`; -const wrapAnsiHyperlink = uri => `${ESCAPES.values().next().value}${ANSI_ESCAPE_LINK}${uri}${ANSI_ESCAPE_BELL}`; - -// Calculate the length of words split on ' ', ignoring -// the extra characters added by ansi escape codes -const wordLengths = string => string.split(' ').map(character => stringWidth(character)); - -// Wrap a long word across multiple rows -// Ansi escape codes do not count towards length -const wrapWord = (rows, word, columns) => { - const characters = [...word]; - - let isInsideEscape = false; - let isInsideLinkEscape = false; - let visible = stringWidth(stripAnsi(rows[rows.length - 1])); - - for (const [index, character] of characters.entries()) { - const characterLength = stringWidth(character); - - if (visible + characterLength <= columns) { - rows[rows.length - 1] += character; - } else { - rows.push(character); - visible = 0; - } - - if (ESCAPES.has(character)) { - isInsideEscape = true; - isInsideLinkEscape = characters.slice(index + 1).join('').startsWith(ANSI_ESCAPE_LINK); - } - - if (isInsideEscape) { - if (isInsideLinkEscape) { - if (character === ANSI_ESCAPE_BELL) { - isInsideEscape = false; - isInsideLinkEscape = false; - } - } else if (character === ANSI_SGR_TERMINATOR) { - isInsideEscape = false; - } - - continue; - } - - visible += characterLength; - - if (visible === columns && index < characters.length - 1) { - rows.push(''); - visible = 0; - } - } - - // It's possible that the last row we copy over is only - // ansi escape characters, handle this edge-case - if (!visible && rows[rows.length - 1].length > 0 && rows.length > 1) { - rows[rows.length - 2] += rows.pop(); - } -}; - -// Trims spaces from a string ignoring invisible sequences -const stringVisibleTrimSpacesRight = string => { - const words = string.split(' '); - let last = words.length; - - while (last > 0) { - if (stringWidth(words[last - 1]) > 0) { - break; - } - - last--; - } - - if (last === words.length) { - return string; - } - - return words.slice(0, last).join(' ') + words.slice(last).join(''); -}; - -// The wrap-ansi module can be invoked in either 'hard' or 'soft' wrap mode -// -// 'hard' will never allow a string to take up more than columns characters -// -// 'soft' allows long words to expand past the column length -const exec = (string, columns, options = {}) => { - if (options.trim !== false && string.trim() === '') { - return ''; - } - - let returnValue = ''; - let escapeCode; - let escapeUrl; - - const lengths = wordLengths(string); - let rows = ['']; - - for (const [index, word] of string.split(' ').entries()) { - if (options.trim !== false) { - rows[rows.length - 1] = rows[rows.length - 1].trimStart(); - } - - let rowLength = stringWidth(rows[rows.length - 1]); - - if (index !== 0) { - if (rowLength >= columns && (options.wordWrap === false || options.trim === false)) { - // If we start with a new word but the current row length equals the length of the columns, add a new row - rows.push(''); - rowLength = 0; - } - - if (rowLength > 0 || options.trim === false) { - rows[rows.length - 1] += ' '; - rowLength++; - } - } - - // In 'hard' wrap mode, the length of a line is never allowed to extend past 'columns' - if (options.hard && lengths[index] > columns) { - const remainingColumns = (columns - rowLength); - const breaksStartingThisLine = 1 + Math.floor((lengths[index] - remainingColumns - 1) / columns); - const breaksStartingNextLine = Math.floor((lengths[index] - 1) / columns); - if (breaksStartingNextLine < breaksStartingThisLine) { - rows.push(''); - } - - wrapWord(rows, word, columns); - continue; - } - - if (rowLength + lengths[index] > columns && rowLength > 0 && lengths[index] > 0) { - if (options.wordWrap === false && rowLength < columns) { - wrapWord(rows, word, columns); - continue; - } - - rows.push(''); - } - - if (rowLength + lengths[index] > columns && options.wordWrap === false) { - wrapWord(rows, word, columns); - continue; - } - - rows[rows.length - 1] += word; - } - - if (options.trim !== false) { - rows = rows.map(row => stringVisibleTrimSpacesRight(row)); - } - - const pre = [...rows.join('\n')]; - - for (const [index, character] of pre.entries()) { - returnValue += character; - - if (ESCAPES.has(character)) { - const {groups} = new RegExp(`(?:\\${ANSI_CSI}(?\\d+)m|\\${ANSI_ESCAPE_LINK}(?.*)${ANSI_ESCAPE_BELL})`).exec(pre.slice(index).join('')) || {groups: {}}; - if (groups.code !== undefined) { - const code = Number.parseFloat(groups.code); - escapeCode = code === END_CODE ? undefined : code; - } else if (groups.uri !== undefined) { - escapeUrl = groups.uri.length === 0 ? undefined : groups.uri; - } - } - - const code = ansiStyles.codes.get(Number(escapeCode)); - - if (pre[index + 1] === '\n') { - if (escapeUrl) { - returnValue += wrapAnsiHyperlink(''); - } - - if (escapeCode && code) { - returnValue += wrapAnsiCode(code); - } - } else if (character === '\n') { - if (escapeCode && code) { - returnValue += wrapAnsiCode(escapeCode); - } - - if (escapeUrl) { - returnValue += wrapAnsiHyperlink(escapeUrl); - } - } - } - - return returnValue; -}; - -// For each newline, invoke the method separately -export default function wrapAnsi(string, columns, options) { - return String(string) - .normalize() - .replace(/\r\n/g, '\n') - .split('\n') - .map(line => exec(line, columns, options)) - .join('\n'); -} diff --git a/node_modules/@isaacs/cliui/node_modules/wrap-ansi/license b/node_modules/@isaacs/cliui/node_modules/wrap-ansi/license deleted file mode 100644 index fa7ceba3..00000000 --- a/node_modules/@isaacs/cliui/node_modules/wrap-ansi/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (https://sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@isaacs/cliui/node_modules/wrap-ansi/package.json b/node_modules/@isaacs/cliui/node_modules/wrap-ansi/package.json deleted file mode 100644 index 198a5dbc..00000000 --- a/node_modules/@isaacs/cliui/node_modules/wrap-ansi/package.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "name": "wrap-ansi", - "version": "8.1.0", - "description": "Wordwrap a string with ANSI escape codes", - "license": "MIT", - "repository": "chalk/wrap-ansi", - "funding": "https://github.com/chalk/wrap-ansi?sponsor=1", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "https://sindresorhus.com" - }, - "type": "module", - "exports": { - "types": "./index.d.ts", - "default": "./index.js" - }, - "engines": { - "node": ">=12" - }, - "scripts": { - "test": "xo && nyc ava && tsd" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "keywords": [ - "wrap", - "break", - "wordwrap", - "wordbreak", - "linewrap", - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "dependencies": { - "ansi-styles": "^6.1.0", - "string-width": "^5.0.1", - "strip-ansi": "^7.0.1" - }, - "devDependencies": { - "ava": "^3.15.0", - "chalk": "^4.1.2", - "coveralls": "^3.1.1", - "has-ansi": "^5.0.1", - "nyc": "^15.1.0", - "tsd": "^0.25.0", - "xo": "^0.44.0" - } -} diff --git a/node_modules/@isaacs/cliui/node_modules/wrap-ansi/readme.md b/node_modules/@isaacs/cliui/node_modules/wrap-ansi/readme.md deleted file mode 100644 index 21f6fed7..00000000 --- a/node_modules/@isaacs/cliui/node_modules/wrap-ansi/readme.md +++ /dev/null @@ -1,91 +0,0 @@ -# wrap-ansi - -> Wordwrap a string with [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) - -## Install - -``` -$ npm install wrap-ansi -``` - -## Usage - -```js -import chalk from 'chalk'; -import wrapAnsi from 'wrap-ansi'; - -const input = 'The quick brown ' + chalk.red('fox jumped over ') + - 'the lazy ' + chalk.green('dog and then ran away with the unicorn.'); - -console.log(wrapAnsi(input, 20)); -``` - - - -## API - -### wrapAnsi(string, columns, options?) - -Wrap words to the specified column width. - -#### string - -Type: `string` - -String with ANSI escape codes. Like one styled by [`chalk`](https://github.com/chalk/chalk). Newline characters will be normalized to `\n`. - -#### columns - -Type: `number` - -Number of columns to wrap the text to. - -#### options - -Type: `object` - -##### hard - -Type: `boolean`\ -Default: `false` - -By default the wrap is soft, meaning long words may extend past the column width. Setting this to `true` will make it hard wrap at the column width. - -##### wordWrap - -Type: `boolean`\ -Default: `true` - -By default, an attempt is made to split words at spaces, ensuring that they don't extend past the configured columns. If wordWrap is `false`, each column will instead be completely filled splitting words as necessary. - -##### trim - -Type: `boolean`\ -Default: `true` - -Whitespace on all lines is removed by default. Set this option to `false` if you don't want to trim. - -## Related - -- [slice-ansi](https://github.com/chalk/slice-ansi) - Slice a string with ANSI escape codes -- [cli-truncate](https://github.com/sindresorhus/cli-truncate) - Truncate a string to a specific width in the terminal -- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right -- [jsesc](https://github.com/mathiasbynens/jsesc) - Generate ASCII-only output from Unicode strings. Useful for creating test fixtures. - -## Maintainers - -- [Sindre Sorhus](https://github.com/sindresorhus) -- [Josh Junon](https://github.com/qix-) -- [Benjamin Coe](https://github.com/bcoe) - ---- - -
- - Get professional support for this package with a Tidelift subscription - -
- - Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. -
-
diff --git a/node_modules/@isaacs/cliui/package.json b/node_modules/@isaacs/cliui/package.json deleted file mode 100644 index 7a952532..00000000 --- a/node_modules/@isaacs/cliui/package.json +++ /dev/null @@ -1,86 +0,0 @@ -{ - "name": "@isaacs/cliui", - "version": "8.0.2", - "description": "easily create complex multi-column command-line-interfaces", - "main": "build/index.cjs", - "exports": { - ".": [ - { - "import": "./index.mjs", - "require": "./build/index.cjs" - }, - "./build/index.cjs" - ] - }, - "type": "module", - "module": "./index.mjs", - "scripts": { - "check": "standardx '**/*.ts' && standardx '**/*.js' && standardx '**/*.cjs'", - "fix": "standardx --fix '**/*.ts' && standardx --fix '**/*.js' && standardx --fix '**/*.cjs'", - "pretest": "rimraf build && tsc -p tsconfig.test.json && cross-env NODE_ENV=test npm run build:cjs", - "test": "c8 mocha ./test/*.cjs", - "test:esm": "c8 mocha ./test/**/*.mjs", - "postest": "check", - "coverage": "c8 report --check-coverage", - "precompile": "rimraf build", - "compile": "tsc", - "postcompile": "npm run build:cjs", - "build:cjs": "rollup -c", - "prepare": "npm run compile" - }, - "repository": "yargs/cliui", - "standard": { - "ignore": [ - "**/example/**" - ], - "globals": [ - "it" - ] - }, - "keywords": [ - "cli", - "command-line", - "layout", - "design", - "console", - "wrap", - "table" - ], - "author": "Ben Coe ", - "license": "ISC", - "dependencies": { - "string-width": "^5.1.2", - "string-width-cjs": "npm:string-width@^4.2.0", - "strip-ansi": "^7.0.1", - "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", - "wrap-ansi": "^8.1.0", - "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" - }, - "devDependencies": { - "@types/node": "^14.0.27", - "@typescript-eslint/eslint-plugin": "^4.0.0", - "@typescript-eslint/parser": "^4.0.0", - "c8": "^7.3.0", - "chai": "^4.2.0", - "chalk": "^4.1.0", - "cross-env": "^7.0.2", - "eslint": "^7.6.0", - "eslint-plugin-import": "^2.22.0", - "eslint-plugin-node": "^11.1.0", - "gts": "^3.0.0", - "mocha": "^10.0.0", - "rimraf": "^3.0.2", - "rollup": "^2.23.1", - "rollup-plugin-ts": "^3.0.2", - "standardx": "^7.0.0", - "typescript": "^4.0.0" - }, - "files": [ - "build", - "index.mjs", - "!*.d.ts" - ], - "engines": { - "node": ">=12" - } -} diff --git a/node_modules/@pkgjs/parseargs/.editorconfig b/node_modules/@pkgjs/parseargs/.editorconfig deleted file mode 100644 index b1401639..00000000 --- a/node_modules/@pkgjs/parseargs/.editorconfig +++ /dev/null @@ -1,14 +0,0 @@ -# EditorConfig is awesome: http://EditorConfig.org - -# top-most EditorConfig file -root = true - -# Copied from Node.js to ease compatibility in PR. -[*] -charset = utf-8 -end_of_line = lf -indent_size = 2 -indent_style = space -insert_final_newline = true -trim_trailing_whitespace = true -quote_type = single diff --git a/node_modules/@pkgjs/parseargs/CHANGELOG.md b/node_modules/@pkgjs/parseargs/CHANGELOG.md deleted file mode 100644 index 2adc7d32..00000000 --- a/node_modules/@pkgjs/parseargs/CHANGELOG.md +++ /dev/null @@ -1,147 +0,0 @@ -# Changelog - -## [0.11.0](https://github.com/pkgjs/parseargs/compare/v0.10.0...v0.11.0) (2022-10-08) - - -### Features - -* add `default` option parameter ([#142](https://github.com/pkgjs/parseargs/issues/142)) ([cd20847](https://github.com/pkgjs/parseargs/commit/cd20847a00b2f556aa9c085ac83b942c60868ec1)) - -## [0.10.0](https://github.com/pkgjs/parseargs/compare/v0.9.1...v0.10.0) (2022-07-21) - - -### Features - -* add parsed meta-data to returned properties ([#129](https://github.com/pkgjs/parseargs/issues/129)) ([91bfb4d](https://github.com/pkgjs/parseargs/commit/91bfb4d3f7b6937efab1b27c91c45d1205f1497e)) - -## [0.9.1](https://github.com/pkgjs/parseargs/compare/v0.9.0...v0.9.1) (2022-06-20) - - -### Bug Fixes - -* **runtime:** support node 14+ ([#135](https://github.com/pkgjs/parseargs/issues/135)) ([6a1c5a6](https://github.com/pkgjs/parseargs/commit/6a1c5a6f7cadf2f035e004027e2742e3c4ce554b)) - -## [0.9.0](https://github.com/pkgjs/parseargs/compare/v0.8.0...v0.9.0) (2022-05-23) - - -### ⚠ BREAKING CHANGES - -* drop handling of electron arguments (#121) - -### Code Refactoring - -* drop handling of electron arguments ([#121](https://github.com/pkgjs/parseargs/issues/121)) ([a2ffd53](https://github.com/pkgjs/parseargs/commit/a2ffd537c244a062371522b955acb45a404fc9f2)) - -## [0.8.0](https://github.com/pkgjs/parseargs/compare/v0.7.1...v0.8.0) (2022-05-16) - - -### ⚠ BREAKING CHANGES - -* switch type:string option arguments to greedy, but with error for suspect cases in strict mode (#88) -* positionals now opt-in when strict:true (#116) -* create result.values with null prototype (#111) - -### Features - -* create result.values with null prototype ([#111](https://github.com/pkgjs/parseargs/issues/111)) ([9d539c3](https://github.com/pkgjs/parseargs/commit/9d539c3d57f269c160e74e0656ad4fa84ff92ec2)) -* positionals now opt-in when strict:true ([#116](https://github.com/pkgjs/parseargs/issues/116)) ([3643338](https://github.com/pkgjs/parseargs/commit/364333826b746e8a7dc5505b4b22fd19ac51df3b)) -* switch type:string option arguments to greedy, but with error for suspect cases in strict mode ([#88](https://github.com/pkgjs/parseargs/issues/88)) ([c2b5e72](https://github.com/pkgjs/parseargs/commit/c2b5e72161991dfdc535909f1327cc9b970fe7e8)) - -### [0.7.1](https://github.com/pkgjs/parseargs/compare/v0.7.0...v0.7.1) (2022-04-15) - - -### Bug Fixes - -* resist pollution ([#106](https://github.com/pkgjs/parseargs/issues/106)) ([ecf2dec](https://github.com/pkgjs/parseargs/commit/ecf2dece0a9f2a76d789384d5d71c68ffe64022a)) - -## [0.7.0](https://github.com/pkgjs/parseargs/compare/v0.6.0...v0.7.0) (2022-04-13) - - -### Features - -* Add strict mode to parser ([#74](https://github.com/pkgjs/parseargs/issues/74)) ([8267d02](https://github.com/pkgjs/parseargs/commit/8267d02083a87b8b8a71fcce08348d1e031ea91c)) - -## [0.6.0](https://github.com/pkgjs/parseargs/compare/v0.5.0...v0.6.0) (2022-04-11) - - -### ⚠ BREAKING CHANGES - -* rework results to remove redundant `flags` property and store value true for boolean options (#83) -* switch to existing ERR_INVALID_ARG_VALUE (#97) - -### Code Refactoring - -* rework results to remove redundant `flags` property and store value true for boolean options ([#83](https://github.com/pkgjs/parseargs/issues/83)) ([be153db](https://github.com/pkgjs/parseargs/commit/be153dbed1d488cb7b6e27df92f601ba7337713d)) -* switch to existing ERR_INVALID_ARG_VALUE ([#97](https://github.com/pkgjs/parseargs/issues/97)) ([084a23f](https://github.com/pkgjs/parseargs/commit/084a23f9fde2da030b159edb1c2385f24579ce40)) - -## [0.5.0](https://github.com/pkgjs/parseargs/compare/v0.4.0...v0.5.0) (2022-04-10) - - -### ⚠ BREAKING CHANGES - -* Require type to be specified for each supplied option (#95) - -### Features - -* Require type to be specified for each supplied option ([#95](https://github.com/pkgjs/parseargs/issues/95)) ([02cd018](https://github.com/pkgjs/parseargs/commit/02cd01885b8aaa59f2db8308f2d4479e64340068)) - -## [0.4.0](https://github.com/pkgjs/parseargs/compare/v0.3.0...v0.4.0) (2022-03-12) - - -### ⚠ BREAKING CHANGES - -* parsing, revisit short option groups, add support for combined short and value (#75) -* restructure configuration to take options bag (#63) - -### Code Refactoring - -* parsing, revisit short option groups, add support for combined short and value ([#75](https://github.com/pkgjs/parseargs/issues/75)) ([a92600f](https://github.com/pkgjs/parseargs/commit/a92600fa6c214508ab1e016fa55879a314f541af)) -* restructure configuration to take options bag ([#63](https://github.com/pkgjs/parseargs/issues/63)) ([b412095](https://github.com/pkgjs/parseargs/commit/b4120957d90e809ee8b607b06e747d3e6a6b213e)) - -## [0.3.0](https://github.com/pkgjs/parseargs/compare/v0.2.0...v0.3.0) (2022-02-06) - - -### Features - -* **parser:** support short-option groups ([#59](https://github.com/pkgjs/parseargs/issues/59)) ([882067b](https://github.com/pkgjs/parseargs/commit/882067bc2d7cbc6b796f8e5a079a99bc99d4e6ba)) - -## [0.2.0](https://github.com/pkgjs/parseargs/compare/v0.1.1...v0.2.0) (2022-02-05) - - -### Features - -* basic support for shorts ([#50](https://github.com/pkgjs/parseargs/issues/50)) ([a2f36d7](https://github.com/pkgjs/parseargs/commit/a2f36d7da4145af1c92f76806b7fe2baf6beeceb)) - - -### Bug Fixes - -* always store value for a=b ([#43](https://github.com/pkgjs/parseargs/issues/43)) ([a85e8dc](https://github.com/pkgjs/parseargs/commit/a85e8dc06379fd2696ee195cc625de8fac6aee42)) -* support single dash as positional ([#49](https://github.com/pkgjs/parseargs/issues/49)) ([d795bf8](https://github.com/pkgjs/parseargs/commit/d795bf877d068fd67aec381f30b30b63f97109ad)) - -### [0.1.1](https://github.com/pkgjs/parseargs/compare/v0.1.0...v0.1.1) (2022-01-25) - - -### Bug Fixes - -* only use arrays in results for multiples ([#42](https://github.com/pkgjs/parseargs/issues/42)) ([c357584](https://github.com/pkgjs/parseargs/commit/c357584847912506319ed34a0840080116f4fd65)) - -## 0.1.0 (2022-01-22) - - -### Features - -* expand scenarios covered by default arguments for environments ([#20](https://github.com/pkgjs/parseargs/issues/20)) ([582ada7](https://github.com/pkgjs/parseargs/commit/582ada7be0eca3a73d6e0bd016e7ace43449fa4c)) -* update readme and include contributing guidelines ([8edd6fc](https://github.com/pkgjs/parseargs/commit/8edd6fc863cd705f6fac732724159ebe8065a2b0)) - - -### Bug Fixes - -* do not strip excess leading dashes on long option names ([#21](https://github.com/pkgjs/parseargs/issues/21)) ([f848590](https://github.com/pkgjs/parseargs/commit/f848590ebf3249ed5979ff47e003fa6e1a8ec5c0)) -* name & readme ([3f057c1](https://github.com/pkgjs/parseargs/commit/3f057c1b158a1bdbe878c64b57460c58e56e465f)) -* package.json values ([9bac300](https://github.com/pkgjs/parseargs/commit/9bac300e00cd76c77076bf9e75e44f8929512da9)) -* update readme name ([957d8d9](https://github.com/pkgjs/parseargs/commit/957d8d96e1dcb48297c0a14345d44c0123b2883e)) - - -### Build System - -* first release as minor ([421c6e2](https://github.com/pkgjs/parseargs/commit/421c6e2569a8668ad14fac5a5af5be60479a7571)) diff --git a/node_modules/@pkgjs/parseargs/LICENSE b/node_modules/@pkgjs/parseargs/LICENSE deleted file mode 100644 index 261eeb9e..00000000 --- a/node_modules/@pkgjs/parseargs/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/node_modules/@pkgjs/parseargs/README.md b/node_modules/@pkgjs/parseargs/README.md deleted file mode 100644 index 0a041927..00000000 --- a/node_modules/@pkgjs/parseargs/README.md +++ /dev/null @@ -1,413 +0,0 @@ - -# parseArgs - -[![Coverage][coverage-image]][coverage-url] - -Polyfill of `util.parseArgs()` - -## `util.parseArgs([config])` - - - -> Stability: 1 - Experimental - -* `config` {Object} Used to provide arguments for parsing and to configure - the parser. `config` supports the following properties: - * `args` {string\[]} array of argument strings. **Default:** `process.argv` - with `execPath` and `filename` removed. - * `options` {Object} Used to describe arguments known to the parser. - Keys of `options` are the long names of options and values are an - {Object} accepting the following properties: - * `type` {string} Type of argument, which must be either `boolean` or `string`. - * `multiple` {boolean} Whether this option can be provided multiple - times. If `true`, all values will be collected in an array. If - `false`, values for the option are last-wins. **Default:** `false`. - * `short` {string} A single character alias for the option. - * `default` {string | boolean | string\[] | boolean\[]} The default option - value when it is not set by args. It must be of the same type as the - the `type` property. When `multiple` is `true`, it must be an array. - * `strict` {boolean} Should an error be thrown when unknown arguments - are encountered, or when arguments are passed that do not match the - `type` configured in `options`. - **Default:** `true`. - * `allowPositionals` {boolean} Whether this command accepts positional - arguments. - **Default:** `false` if `strict` is `true`, otherwise `true`. - * `tokens` {boolean} Return the parsed tokens. This is useful for extending - the built-in behavior, from adding additional checks through to reprocessing - the tokens in different ways. - **Default:** `false`. - -* Returns: {Object} The parsed command line arguments: - * `values` {Object} A mapping of parsed option names with their {string} - or {boolean} values. - * `positionals` {string\[]} Positional arguments. - * `tokens` {Object\[] | undefined} See [parseArgs tokens](#parseargs-tokens) - section. Only returned if `config` includes `tokens: true`. - -Provides a higher level API for command-line argument parsing than interacting -with `process.argv` directly. Takes a specification for the expected arguments -and returns a structured object with the parsed options and positionals. - -```mjs -import { parseArgs } from 'node:util'; -const args = ['-f', '--bar', 'b']; -const options = { - foo: { - type: 'boolean', - short: 'f' - }, - bar: { - type: 'string' - } -}; -const { - values, - positionals -} = parseArgs({ args, options }); -console.log(values, positionals); -// Prints: [Object: null prototype] { foo: true, bar: 'b' } [] -``` - -```cjs -const { parseArgs } = require('node:util'); -const args = ['-f', '--bar', 'b']; -const options = { - foo: { - type: 'boolean', - short: 'f' - }, - bar: { - type: 'string' - } -}; -const { - values, - positionals -} = parseArgs({ args, options }); -console.log(values, positionals); -// Prints: [Object: null prototype] { foo: true, bar: 'b' } [] -``` - -`util.parseArgs` is experimental and behavior may change. Join the -conversation in [pkgjs/parseargs][] to contribute to the design. - -### `parseArgs` `tokens` - -Detailed parse information is available for adding custom behaviours by -specifying `tokens: true` in the configuration. -The returned tokens have properties describing: - -* all tokens - * `kind` {string} One of 'option', 'positional', or 'option-terminator'. - * `index` {number} Index of element in `args` containing token. So the - source argument for a token is `args[token.index]`. -* option tokens - * `name` {string} Long name of option. - * `rawName` {string} How option used in args, like `-f` of `--foo`. - * `value` {string | undefined} Option value specified in args. - Undefined for boolean options. - * `inlineValue` {boolean | undefined} Whether option value specified inline, - like `--foo=bar`. -* positional tokens - * `value` {string} The value of the positional argument in args (i.e. `args[index]`). -* option-terminator token - -The returned tokens are in the order encountered in the input args. Options -that appear more than once in args produce a token for each use. Short option -groups like `-xy` expand to a token for each option. So `-xxx` produces -three tokens. - -For example to use the returned tokens to add support for a negated option -like `--no-color`, the tokens can be reprocessed to change the value stored -for the negated option. - -```mjs -import { parseArgs } from 'node:util'; - -const options = { - 'color': { type: 'boolean' }, - 'no-color': { type: 'boolean' }, - 'logfile': { type: 'string' }, - 'no-logfile': { type: 'boolean' }, -}; -const { values, tokens } = parseArgs({ options, tokens: true }); - -// Reprocess the option tokens and overwrite the returned values. -tokens - .filter((token) => token.kind === 'option') - .forEach((token) => { - if (token.name.startsWith('no-')) { - // Store foo:false for --no-foo - const positiveName = token.name.slice(3); - values[positiveName] = false; - delete values[token.name]; - } else { - // Resave value so last one wins if both --foo and --no-foo. - values[token.name] = token.value ?? true; - } - }); - -const color = values.color; -const logfile = values.logfile ?? 'default.log'; - -console.log({ logfile, color }); -``` - -```cjs -const { parseArgs } = require('node:util'); - -const options = { - 'color': { type: 'boolean' }, - 'no-color': { type: 'boolean' }, - 'logfile': { type: 'string' }, - 'no-logfile': { type: 'boolean' }, -}; -const { values, tokens } = parseArgs({ options, tokens: true }); - -// Reprocess the option tokens and overwrite the returned values. -tokens - .filter((token) => token.kind === 'option') - .forEach((token) => { - if (token.name.startsWith('no-')) { - // Store foo:false for --no-foo - const positiveName = token.name.slice(3); - values[positiveName] = false; - delete values[token.name]; - } else { - // Resave value so last one wins if both --foo and --no-foo. - values[token.name] = token.value ?? true; - } - }); - -const color = values.color; -const logfile = values.logfile ?? 'default.log'; - -console.log({ logfile, color }); -``` - -Example usage showing negated options, and when an option is used -multiple ways then last one wins. - -```console -$ node negate.js -{ logfile: 'default.log', color: undefined } -$ node negate.js --no-logfile --no-color -{ logfile: false, color: false } -$ node negate.js --logfile=test.log --color -{ logfile: 'test.log', color: true } -$ node negate.js --no-logfile --logfile=test.log --color --no-color -{ logfile: 'test.log', color: false } -``` - ------ - - -## Table of Contents -- [`util.parseArgs([config])`](#utilparseargsconfig) -- [Scope](#scope) -- [Version Matchups](#version-matchups) -- [🚀 Getting Started](#-getting-started) -- [🙌 Contributing](#-contributing) -- [💡 `process.mainArgs` Proposal](#-processmainargs-proposal) - - [Implementation:](#implementation) -- [📃 Examples](#-examples) -- [F.A.Qs](#faqs) -- [Links & Resources](#links--resources) - ------ - -## Scope - -It is already possible to build great arg parsing modules on top of what Node.js provides; the prickly API is abstracted away by these modules. Thus, process.parseArgs() is not necessarily intended for library authors; it is intended for developers of simple CLI tools, ad-hoc scripts, deployed Node.js applications, and learning materials. - -It is exceedingly difficult to provide an API which would both be friendly to these Node.js users while being extensible enough for libraries to build upon. We chose to prioritize these use cases because these are currently not well-served by Node.js' API. - ----- - -## Version Matchups - -| Node.js | @pkgjs/parseArgs | -| -- | -- | -| [v18.3.0](https://nodejs.org/docs/latest-v18.x/api/util.html#utilparseargsconfig) | [v0.9.1](https://github.com/pkgjs/parseargs/tree/v0.9.1#utilparseargsconfig) | -| [v16.17.0](https://nodejs.org/dist/latest-v16.x/docs/api/util.html#utilparseargsconfig), [v18.7.0](https://nodejs.org/docs/latest-v18.x/api/util.html#utilparseargsconfig) | [0.10.0](https://github.com/pkgjs/parseargs/tree/v0.10.0#utilparseargsconfig) | - ----- - -## 🚀 Getting Started - -1. **Install dependencies.** - - ```bash - npm install - ``` - -2. **Open the index.js file and start editing!** - -3. **Test your code by calling parseArgs through our test file** - - ```bash - npm test - ``` - ----- - -## 🙌 Contributing - -Any person who wants to contribute to the initiative is welcome! Please first read the [Contributing Guide](CONTRIBUTING.md) - -Additionally, reading the [`Examples w/ Output`](#-examples-w-output) section of this document will be the best way to familiarize yourself with the target expected behavior for parseArgs() once it is fully implemented. - -This package was implemented using [tape](https://www.npmjs.com/package/tape) as its test harness. - ----- - -## 💡 `process.mainArgs` Proposal - -> Note: This can be moved forward independently of the `util.parseArgs()` proposal/work. - -### Implementation: - -```javascript -process.mainArgs = process.argv.slice(process._exec ? 1 : 2) -``` - ----- - -## 📃 Examples - -```js -const { parseArgs } = require('@pkgjs/parseargs'); -``` - -```js -const { parseArgs } = require('@pkgjs/parseargs'); -// specify the options that may be used -const options = { - foo: { type: 'string'}, - bar: { type: 'boolean' }, -}; -const args = ['--foo=a', '--bar']; -const { values, positionals } = parseArgs({ args, options }); -// values = { foo: 'a', bar: true } -// positionals = [] -``` - -```js -const { parseArgs } = require('@pkgjs/parseargs'); -// type:string & multiple -const options = { - foo: { - type: 'string', - multiple: true, - }, -}; -const args = ['--foo=a', '--foo', 'b']; -const { values, positionals } = parseArgs({ args, options }); -// values = { foo: [ 'a', 'b' ] } -// positionals = [] -``` - -```js -const { parseArgs } = require('@pkgjs/parseargs'); -// shorts -const options = { - foo: { - short: 'f', - type: 'boolean' - }, -}; -const args = ['-f', 'b']; -const { values, positionals } = parseArgs({ args, options, allowPositionals: true }); -// values = { foo: true } -// positionals = ['b'] -``` - -```js -const { parseArgs } = require('@pkgjs/parseargs'); -// unconfigured -const options = {}; -const args = ['-f', '--foo=a', '--bar', 'b']; -const { values, positionals } = parseArgs({ strict: false, args, options, allowPositionals: true }); -// values = { f: true, foo: 'a', bar: true } -// positionals = ['b'] -``` - ----- - -## F.A.Qs - -- Is `cmd --foo=bar baz` the same as `cmd baz --foo=bar`? - - yes -- Does the parser execute a function? - - no -- Does the parser execute one of several functions, depending on input? - - no -- Can subcommands take options that are distinct from the main command? - - no -- Does it output generated help when no options match? - - no -- Does it generated short usage? Like: `usage: ls [-ABCFGHLOPRSTUWabcdefghiklmnopqrstuwx1] [file ...]` - - no (no usage/help at all) -- Does the user provide the long usage text? For each option? For the whole command? - - no -- Do subcommands (if implemented) have their own usage output? - - no -- Does usage print if the user runs `cmd --help`? - - no -- Does it set `process.exitCode`? - - no -- Does usage print to stderr or stdout? - - N/A -- Does it check types? (Say, specify that an option is a boolean, number, etc.) - - no -- Can an option have more than one type? (string or false, for example) - - no -- Can the user define a type? (Say, `type: path` to call `path.resolve()` on the argument.) - - no -- Does a `--foo=0o22` mean 0, 22, 18, or "0o22"? - - `"0o22"` -- Does it coerce types? - - no -- Does `--no-foo` coerce to `--foo=false`? For all options? Only boolean options? - - no, it sets `{values:{'no-foo': true}}` -- Is `--foo` the same as `--foo=true`? Only for known booleans? Only at the end? - - no, they are not the same. There is no special handling of `true` as a value so it is just another string. -- Does it read environment variables? Ie, is `FOO=1 cmd` the same as `cmd --foo=1`? - - no -- Do unknown arguments raise an error? Are they parsed? Are they treated as positional arguments? - - no, they are parsed, not treated as positionals -- Does `--` signal the end of options? - - yes -- Is `--` included as a positional? - - no -- Is `program -- foo` the same as `program foo`? - - yes, both store `{positionals:['foo']}` -- Does the API specify whether a `--` was present/relevant? - - no -- Is `-bar` the same as `--bar`? - - no, `-bar` is a short option or options, with expansion logic that follows the - [Utility Syntax Guidelines in POSIX.1-2017](https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap12.html). `-bar` expands to `-b`, `-a`, `-r`. -- Is `---foo` the same as `--foo`? - - no - - the first is a long option named `'-foo'` - - the second is a long option named `'foo'` -- Is `-` a positional? ie, `bash some-test.sh | tap -` - - yes - -## Links & Resources - -* [Initial Tooling Issue](https://github.com/nodejs/tooling/issues/19) -* [Initial Proposal](https://github.com/nodejs/node/pull/35015) -* [parseArgs Proposal](https://github.com/nodejs/node/pull/42675) - -[coverage-image]: https://img.shields.io/nycrc/pkgjs/parseargs -[coverage-url]: https://github.com/pkgjs/parseargs/blob/main/.nycrc -[pkgjs/parseargs]: https://github.com/pkgjs/parseargs diff --git a/node_modules/@pkgjs/parseargs/examples/is-default-value.js b/node_modules/@pkgjs/parseargs/examples/is-default-value.js deleted file mode 100644 index 0a67972b..00000000 --- a/node_modules/@pkgjs/parseargs/examples/is-default-value.js +++ /dev/null @@ -1,25 +0,0 @@ -'use strict'; - -// This example shows how to understand if a default value is used or not. - -// 1. const { parseArgs } = require('node:util'); // from node -// 2. const { parseArgs } = require('@pkgjs/parseargs'); // from package -const { parseArgs } = require('..'); // in repo - -const options = { - file: { short: 'f', type: 'string', default: 'FOO' }, -}; - -const { values, tokens } = parseArgs({ options, tokens: true }); - -const isFileDefault = !tokens.some((token) => token.kind === 'option' && - token.name === 'file' -); - -console.log(values); -console.log(`Is the file option [${values.file}] the default value? ${isFileDefault}`); - -// Try the following: -// node is-default-value.js -// node is-default-value.js -f FILE -// node is-default-value.js --file FILE diff --git a/node_modules/@pkgjs/parseargs/examples/limit-long-syntax.js b/node_modules/@pkgjs/parseargs/examples/limit-long-syntax.js deleted file mode 100644 index 943e643e..00000000 --- a/node_modules/@pkgjs/parseargs/examples/limit-long-syntax.js +++ /dev/null @@ -1,35 +0,0 @@ -'use strict'; - -// This is an example of using tokens to add a custom behaviour. -// -// Require the use of `=` for long options and values by blocking -// the use of space separated values. -// So allow `--foo=bar`, and not allow `--foo bar`. -// -// Note: this is not a common behaviour, most CLIs allow both forms. - -// 1. const { parseArgs } = require('node:util'); // from node -// 2. const { parseArgs } = require('@pkgjs/parseargs'); // from package -const { parseArgs } = require('..'); // in repo - -const options = { - file: { short: 'f', type: 'string' }, - log: { type: 'string' }, -}; - -const { values, tokens } = parseArgs({ options, tokens: true }); - -const badToken = tokens.find((token) => token.kind === 'option' && - token.value != null && - token.rawName.startsWith('--') && - !token.inlineValue -); -if (badToken) { - throw new Error(`Option value for '${badToken.rawName}' must be inline, like '${badToken.rawName}=VALUE'`); -} - -console.log(values); - -// Try the following: -// node limit-long-syntax.js -f FILE --log=LOG -// node limit-long-syntax.js --file FILE diff --git a/node_modules/@pkgjs/parseargs/examples/negate.js b/node_modules/@pkgjs/parseargs/examples/negate.js deleted file mode 100644 index b6634690..00000000 --- a/node_modules/@pkgjs/parseargs/examples/negate.js +++ /dev/null @@ -1,43 +0,0 @@ -'use strict'; - -// This example is used in the documentation. - -// How might I add my own support for --no-foo? - -// 1. const { parseArgs } = require('node:util'); // from node -// 2. const { parseArgs } = require('@pkgjs/parseargs'); // from package -const { parseArgs } = require('..'); // in repo - -const options = { - 'color': { type: 'boolean' }, - 'no-color': { type: 'boolean' }, - 'logfile': { type: 'string' }, - 'no-logfile': { type: 'boolean' }, -}; -const { values, tokens } = parseArgs({ options, tokens: true }); - -// Reprocess the option tokens and overwrite the returned values. -tokens - .filter((token) => token.kind === 'option') - .forEach((token) => { - if (token.name.startsWith('no-')) { - // Store foo:false for --no-foo - const positiveName = token.name.slice(3); - values[positiveName] = false; - delete values[token.name]; - } else { - // Resave value so last one wins if both --foo and --no-foo. - values[token.name] = token.value ?? true; - } - }); - -const color = values.color; -const logfile = values.logfile ?? 'default.log'; - -console.log({ logfile, color }); - -// Try the following: -// node negate.js -// node negate.js --no-logfile --no-color -// negate.js --logfile=test.log --color -// node negate.js --no-logfile --logfile=test.log --color --no-color diff --git a/node_modules/@pkgjs/parseargs/examples/no-repeated-options.js b/node_modules/@pkgjs/parseargs/examples/no-repeated-options.js deleted file mode 100644 index 0c324688..00000000 --- a/node_modules/@pkgjs/parseargs/examples/no-repeated-options.js +++ /dev/null @@ -1,31 +0,0 @@ -'use strict'; - -// This is an example of using tokens to add a custom behaviour. -// -// Throw an error if an option is used more than once. - -// 1. const { parseArgs } = require('node:util'); // from node -// 2. const { parseArgs } = require('@pkgjs/parseargs'); // from package -const { parseArgs } = require('..'); // in repo - -const options = { - ding: { type: 'boolean', short: 'd' }, - beep: { type: 'boolean', short: 'b' } -}; -const { values, tokens } = parseArgs({ options, tokens: true }); - -const seenBefore = new Set(); -tokens.forEach((token) => { - if (token.kind !== 'option') return; - if (seenBefore.has(token.name)) { - throw new Error(`option '${token.name}' used multiple times`); - } - seenBefore.add(token.name); -}); - -console.log(values); - -// Try the following: -// node no-repeated-options --ding --beep -// node no-repeated-options --beep -b -// node no-repeated-options -ddd diff --git a/node_modules/@pkgjs/parseargs/examples/ordered-options.mjs b/node_modules/@pkgjs/parseargs/examples/ordered-options.mjs deleted file mode 100644 index 8ab7367b..00000000 --- a/node_modules/@pkgjs/parseargs/examples/ordered-options.mjs +++ /dev/null @@ -1,41 +0,0 @@ -// This is an example of using tokens to add a custom behaviour. -// -// This adds a option order check so that --some-unstable-option -// may only be used after --enable-experimental-options -// -// Note: this is not a common behaviour, the order of different options -// does not usually matter. - -import { parseArgs } from '../index.js'; - -function findTokenIndex(tokens, target) { - return tokens.findIndex((token) => token.kind === 'option' && - token.name === target - ); -} - -const experimentalName = 'enable-experimental-options'; -const unstableName = 'some-unstable-option'; - -const options = { - [experimentalName]: { type: 'boolean' }, - [unstableName]: { type: 'boolean' }, -}; - -const { values, tokens } = parseArgs({ options, tokens: true }); - -const experimentalIndex = findTokenIndex(tokens, experimentalName); -const unstableIndex = findTokenIndex(tokens, unstableName); -if (unstableIndex !== -1 && - ((experimentalIndex === -1) || (unstableIndex < experimentalIndex))) { - throw new Error(`'--${experimentalName}' must be specified before '--${unstableName}'`); -} - -console.log(values); - -/* eslint-disable max-len */ -// Try the following: -// node ordered-options.mjs -// node ordered-options.mjs --some-unstable-option -// node ordered-options.mjs --some-unstable-option --enable-experimental-options -// node ordered-options.mjs --enable-experimental-options --some-unstable-option diff --git a/node_modules/@pkgjs/parseargs/examples/simple-hard-coded.js b/node_modules/@pkgjs/parseargs/examples/simple-hard-coded.js deleted file mode 100644 index eff04c2a..00000000 --- a/node_modules/@pkgjs/parseargs/examples/simple-hard-coded.js +++ /dev/null @@ -1,26 +0,0 @@ -'use strict'; - -// This example is used in the documentation. - -// 1. const { parseArgs } = require('node:util'); // from node -// 2. const { parseArgs } = require('@pkgjs/parseargs'); // from package -const { parseArgs } = require('..'); // in repo - -const args = ['-f', '--bar', 'b']; -const options = { - foo: { - type: 'boolean', - short: 'f' - }, - bar: { - type: 'string' - } -}; -const { - values, - positionals -} = parseArgs({ args, options }); -console.log(values, positionals); - -// Try the following: -// node simple-hard-coded.js diff --git a/node_modules/@pkgjs/parseargs/index.js b/node_modules/@pkgjs/parseargs/index.js deleted file mode 100644 index b1004c7b..00000000 --- a/node_modules/@pkgjs/parseargs/index.js +++ /dev/null @@ -1,396 +0,0 @@ -'use strict'; - -const { - ArrayPrototypeForEach, - ArrayPrototypeIncludes, - ArrayPrototypeMap, - ArrayPrototypePush, - ArrayPrototypePushApply, - ArrayPrototypeShift, - ArrayPrototypeSlice, - ArrayPrototypeUnshiftApply, - ObjectEntries, - ObjectPrototypeHasOwnProperty: ObjectHasOwn, - StringPrototypeCharAt, - StringPrototypeIndexOf, - StringPrototypeSlice, - StringPrototypeStartsWith, -} = require('./internal/primordials'); - -const { - validateArray, - validateBoolean, - validateBooleanArray, - validateObject, - validateString, - validateStringArray, - validateUnion, -} = require('./internal/validators'); - -const { - kEmptyObject, -} = require('./internal/util'); - -const { - findLongOptionForShort, - isLoneLongOption, - isLoneShortOption, - isLongOptionAndValue, - isOptionValue, - isOptionLikeValue, - isShortOptionAndValue, - isShortOptionGroup, - useDefaultValueOption, - objectGetOwn, - optionsGetOwn, -} = require('./utils'); - -const { - codes: { - ERR_INVALID_ARG_VALUE, - ERR_PARSE_ARGS_INVALID_OPTION_VALUE, - ERR_PARSE_ARGS_UNKNOWN_OPTION, - ERR_PARSE_ARGS_UNEXPECTED_POSITIONAL, - }, -} = require('./internal/errors'); - -function getMainArgs() { - // Work out where to slice process.argv for user supplied arguments. - - // Check node options for scenarios where user CLI args follow executable. - const execArgv = process.execArgv; - if (ArrayPrototypeIncludes(execArgv, '-e') || - ArrayPrototypeIncludes(execArgv, '--eval') || - ArrayPrototypeIncludes(execArgv, '-p') || - ArrayPrototypeIncludes(execArgv, '--print')) { - return ArrayPrototypeSlice(process.argv, 1); - } - - // Normally first two arguments are executable and script, then CLI arguments - return ArrayPrototypeSlice(process.argv, 2); -} - -/** - * In strict mode, throw for possible usage errors like --foo --bar - * - * @param {object} token - from tokens as available from parseArgs - */ -function checkOptionLikeValue(token) { - if (!token.inlineValue && isOptionLikeValue(token.value)) { - // Only show short example if user used short option. - const example = StringPrototypeStartsWith(token.rawName, '--') ? - `'${token.rawName}=-XYZ'` : - `'--${token.name}=-XYZ' or '${token.rawName}-XYZ'`; - const errorMessage = `Option '${token.rawName}' argument is ambiguous. -Did you forget to specify the option argument for '${token.rawName}'? -To specify an option argument starting with a dash use ${example}.`; - throw new ERR_PARSE_ARGS_INVALID_OPTION_VALUE(errorMessage); - } -} - -/** - * In strict mode, throw for usage errors. - * - * @param {object} config - from config passed to parseArgs - * @param {object} token - from tokens as available from parseArgs - */ -function checkOptionUsage(config, token) { - if (!ObjectHasOwn(config.options, token.name)) { - throw new ERR_PARSE_ARGS_UNKNOWN_OPTION( - token.rawName, config.allowPositionals); - } - - const short = optionsGetOwn(config.options, token.name, 'short'); - const shortAndLong = `${short ? `-${short}, ` : ''}--${token.name}`; - const type = optionsGetOwn(config.options, token.name, 'type'); - if (type === 'string' && typeof token.value !== 'string') { - throw new ERR_PARSE_ARGS_INVALID_OPTION_VALUE(`Option '${shortAndLong} ' argument missing`); - } - // (Idiomatic test for undefined||null, expecting undefined.) - if (type === 'boolean' && token.value != null) { - throw new ERR_PARSE_ARGS_INVALID_OPTION_VALUE(`Option '${shortAndLong}' does not take an argument`); - } -} - - -/** - * Store the option value in `values`. - * - * @param {string} longOption - long option name e.g. 'foo' - * @param {string|undefined} optionValue - value from user args - * @param {object} options - option configs, from parseArgs({ options }) - * @param {object} values - option values returned in `values` by parseArgs - */ -function storeOption(longOption, optionValue, options, values) { - if (longOption === '__proto__') { - return; // No. Just no. - } - - // We store based on the option value rather than option type, - // preserving the users intent for author to deal with. - const newValue = optionValue ?? true; - if (optionsGetOwn(options, longOption, 'multiple')) { - // Always store value in array, including for boolean. - // values[longOption] starts out not present, - // first value is added as new array [newValue], - // subsequent values are pushed to existing array. - // (note: values has null prototype, so simpler usage) - if (values[longOption]) { - ArrayPrototypePush(values[longOption], newValue); - } else { - values[longOption] = [newValue]; - } - } else { - values[longOption] = newValue; - } -} - -/** - * Store the default option value in `values`. - * - * @param {string} longOption - long option name e.g. 'foo' - * @param {string - * | boolean - * | string[] - * | boolean[]} optionValue - default value from option config - * @param {object} values - option values returned in `values` by parseArgs - */ -function storeDefaultOption(longOption, optionValue, values) { - if (longOption === '__proto__') { - return; // No. Just no. - } - - values[longOption] = optionValue; -} - -/** - * Process args and turn into identified tokens: - * - option (along with value, if any) - * - positional - * - option-terminator - * - * @param {string[]} args - from parseArgs({ args }) or mainArgs - * @param {object} options - option configs, from parseArgs({ options }) - */ -function argsToTokens(args, options) { - const tokens = []; - let index = -1; - let groupCount = 0; - - const remainingArgs = ArrayPrototypeSlice(args); - while (remainingArgs.length > 0) { - const arg = ArrayPrototypeShift(remainingArgs); - const nextArg = remainingArgs[0]; - if (groupCount > 0) - groupCount--; - else - index++; - - // Check if `arg` is an options terminator. - // Guideline 10 in https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap12.html - if (arg === '--') { - // Everything after a bare '--' is considered a positional argument. - ArrayPrototypePush(tokens, { kind: 'option-terminator', index }); - ArrayPrototypePushApply( - tokens, ArrayPrototypeMap(remainingArgs, (arg) => { - return { kind: 'positional', index: ++index, value: arg }; - }) - ); - break; // Finished processing args, leave while loop. - } - - if (isLoneShortOption(arg)) { - // e.g. '-f' - const shortOption = StringPrototypeCharAt(arg, 1); - const longOption = findLongOptionForShort(shortOption, options); - let value; - let inlineValue; - if (optionsGetOwn(options, longOption, 'type') === 'string' && - isOptionValue(nextArg)) { - // e.g. '-f', 'bar' - value = ArrayPrototypeShift(remainingArgs); - inlineValue = false; - } - ArrayPrototypePush( - tokens, - { kind: 'option', name: longOption, rawName: arg, - index, value, inlineValue }); - if (value != null) ++index; - continue; - } - - if (isShortOptionGroup(arg, options)) { - // Expand -fXzy to -f -X -z -y - const expanded = []; - for (let index = 1; index < arg.length; index++) { - const shortOption = StringPrototypeCharAt(arg, index); - const longOption = findLongOptionForShort(shortOption, options); - if (optionsGetOwn(options, longOption, 'type') !== 'string' || - index === arg.length - 1) { - // Boolean option, or last short in group. Well formed. - ArrayPrototypePush(expanded, `-${shortOption}`); - } else { - // String option in middle. Yuck. - // Expand -abfFILE to -a -b -fFILE - ArrayPrototypePush(expanded, `-${StringPrototypeSlice(arg, index)}`); - break; // finished short group - } - } - ArrayPrototypeUnshiftApply(remainingArgs, expanded); - groupCount = expanded.length; - continue; - } - - if (isShortOptionAndValue(arg, options)) { - // e.g. -fFILE - const shortOption = StringPrototypeCharAt(arg, 1); - const longOption = findLongOptionForShort(shortOption, options); - const value = StringPrototypeSlice(arg, 2); - ArrayPrototypePush( - tokens, - { kind: 'option', name: longOption, rawName: `-${shortOption}`, - index, value, inlineValue: true }); - continue; - } - - if (isLoneLongOption(arg)) { - // e.g. '--foo' - const longOption = StringPrototypeSlice(arg, 2); - let value; - let inlineValue; - if (optionsGetOwn(options, longOption, 'type') === 'string' && - isOptionValue(nextArg)) { - // e.g. '--foo', 'bar' - value = ArrayPrototypeShift(remainingArgs); - inlineValue = false; - } - ArrayPrototypePush( - tokens, - { kind: 'option', name: longOption, rawName: arg, - index, value, inlineValue }); - if (value != null) ++index; - continue; - } - - if (isLongOptionAndValue(arg)) { - // e.g. --foo=bar - const equalIndex = StringPrototypeIndexOf(arg, '='); - const longOption = StringPrototypeSlice(arg, 2, equalIndex); - const value = StringPrototypeSlice(arg, equalIndex + 1); - ArrayPrototypePush( - tokens, - { kind: 'option', name: longOption, rawName: `--${longOption}`, - index, value, inlineValue: true }); - continue; - } - - ArrayPrototypePush(tokens, { kind: 'positional', index, value: arg }); - } - - return tokens; -} - -const parseArgs = (config = kEmptyObject) => { - const args = objectGetOwn(config, 'args') ?? getMainArgs(); - const strict = objectGetOwn(config, 'strict') ?? true; - const allowPositionals = objectGetOwn(config, 'allowPositionals') ?? !strict; - const returnTokens = objectGetOwn(config, 'tokens') ?? false; - const options = objectGetOwn(config, 'options') ?? { __proto__: null }; - // Bundle these up for passing to strict-mode checks. - const parseConfig = { args, strict, options, allowPositionals }; - - // Validate input configuration. - validateArray(args, 'args'); - validateBoolean(strict, 'strict'); - validateBoolean(allowPositionals, 'allowPositionals'); - validateBoolean(returnTokens, 'tokens'); - validateObject(options, 'options'); - ArrayPrototypeForEach( - ObjectEntries(options), - ({ 0: longOption, 1: optionConfig }) => { - validateObject(optionConfig, `options.${longOption}`); - - // type is required - const optionType = objectGetOwn(optionConfig, 'type'); - validateUnion(optionType, `options.${longOption}.type`, ['string', 'boolean']); - - if (ObjectHasOwn(optionConfig, 'short')) { - const shortOption = optionConfig.short; - validateString(shortOption, `options.${longOption}.short`); - if (shortOption.length !== 1) { - throw new ERR_INVALID_ARG_VALUE( - `options.${longOption}.short`, - shortOption, - 'must be a single character' - ); - } - } - - const multipleOption = objectGetOwn(optionConfig, 'multiple'); - if (ObjectHasOwn(optionConfig, 'multiple')) { - validateBoolean(multipleOption, `options.${longOption}.multiple`); - } - - const defaultValue = objectGetOwn(optionConfig, 'default'); - if (defaultValue !== undefined) { - let validator; - switch (optionType) { - case 'string': - validator = multipleOption ? validateStringArray : validateString; - break; - - case 'boolean': - validator = multipleOption ? validateBooleanArray : validateBoolean; - break; - } - validator(defaultValue, `options.${longOption}.default`); - } - } - ); - - // Phase 1: identify tokens - const tokens = argsToTokens(args, options); - - // Phase 2: process tokens into parsed option values and positionals - const result = { - values: { __proto__: null }, - positionals: [], - }; - if (returnTokens) { - result.tokens = tokens; - } - ArrayPrototypeForEach(tokens, (token) => { - if (token.kind === 'option') { - if (strict) { - checkOptionUsage(parseConfig, token); - checkOptionLikeValue(token); - } - storeOption(token.name, token.value, options, result.values); - } else if (token.kind === 'positional') { - if (!allowPositionals) { - throw new ERR_PARSE_ARGS_UNEXPECTED_POSITIONAL(token.value); - } - ArrayPrototypePush(result.positionals, token.value); - } - }); - - // Phase 3: fill in default values for missing args - ArrayPrototypeForEach(ObjectEntries(options), ({ 0: longOption, - 1: optionConfig }) => { - const mustSetDefault = useDefaultValueOption(longOption, - optionConfig, - result.values); - if (mustSetDefault) { - storeDefaultOption(longOption, - objectGetOwn(optionConfig, 'default'), - result.values); - } - }); - - - return result; -}; - -module.exports = { - parseArgs, -}; diff --git a/node_modules/@pkgjs/parseargs/internal/errors.js b/node_modules/@pkgjs/parseargs/internal/errors.js deleted file mode 100644 index e1b237b5..00000000 --- a/node_modules/@pkgjs/parseargs/internal/errors.js +++ /dev/null @@ -1,47 +0,0 @@ -'use strict'; - -class ERR_INVALID_ARG_TYPE extends TypeError { - constructor(name, expected, actual) { - super(`${name} must be ${expected} got ${actual}`); - this.code = 'ERR_INVALID_ARG_TYPE'; - } -} - -class ERR_INVALID_ARG_VALUE extends TypeError { - constructor(arg1, arg2, expected) { - super(`The property ${arg1} ${expected}. Received '${arg2}'`); - this.code = 'ERR_INVALID_ARG_VALUE'; - } -} - -class ERR_PARSE_ARGS_INVALID_OPTION_VALUE extends Error { - constructor(message) { - super(message); - this.code = 'ERR_PARSE_ARGS_INVALID_OPTION_VALUE'; - } -} - -class ERR_PARSE_ARGS_UNKNOWN_OPTION extends Error { - constructor(option, allowPositionals) { - const suggestDashDash = allowPositionals ? `. To specify a positional argument starting with a '-', place it at the end of the command after '--', as in '-- ${JSON.stringify(option)}` : ''; - super(`Unknown option '${option}'${suggestDashDash}`); - this.code = 'ERR_PARSE_ARGS_UNKNOWN_OPTION'; - } -} - -class ERR_PARSE_ARGS_UNEXPECTED_POSITIONAL extends Error { - constructor(positional) { - super(`Unexpected argument '${positional}'. This command does not take positional arguments`); - this.code = 'ERR_PARSE_ARGS_UNEXPECTED_POSITIONAL'; - } -} - -module.exports = { - codes: { - ERR_INVALID_ARG_TYPE, - ERR_INVALID_ARG_VALUE, - ERR_PARSE_ARGS_INVALID_OPTION_VALUE, - ERR_PARSE_ARGS_UNKNOWN_OPTION, - ERR_PARSE_ARGS_UNEXPECTED_POSITIONAL, - } -}; diff --git a/node_modules/@pkgjs/parseargs/internal/primordials.js b/node_modules/@pkgjs/parseargs/internal/primordials.js deleted file mode 100644 index 63e23ab1..00000000 --- a/node_modules/@pkgjs/parseargs/internal/primordials.js +++ /dev/null @@ -1,393 +0,0 @@ -/* -This file is copied from https://github.com/nodejs/node/blob/v14.19.3/lib/internal/per_context/primordials.js -under the following license: - -Copyright Node.js contributors. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. -*/ - -'use strict'; - -/* eslint-disable node-core/prefer-primordials */ - -// This file subclasses and stores the JS builtins that come from the VM -// so that Node.js's builtin modules do not need to later look these up from -// the global proxy, which can be mutated by users. - -// Use of primordials have sometimes a dramatic impact on performance, please -// benchmark all changes made in performance-sensitive areas of the codebase. -// See: https://github.com/nodejs/node/pull/38248 - -const primordials = {}; - -const { - defineProperty: ReflectDefineProperty, - getOwnPropertyDescriptor: ReflectGetOwnPropertyDescriptor, - ownKeys: ReflectOwnKeys, -} = Reflect; - -// `uncurryThis` is equivalent to `func => Function.prototype.call.bind(func)`. -// It is using `bind.bind(call)` to avoid using `Function.prototype.bind` -// and `Function.prototype.call` after it may have been mutated by users. -const { apply, bind, call } = Function.prototype; -const uncurryThis = bind.bind(call); -primordials.uncurryThis = uncurryThis; - -// `applyBind` is equivalent to `func => Function.prototype.apply.bind(func)`. -// It is using `bind.bind(apply)` to avoid using `Function.prototype.bind` -// and `Function.prototype.apply` after it may have been mutated by users. -const applyBind = bind.bind(apply); -primordials.applyBind = applyBind; - -// Methods that accept a variable number of arguments, and thus it's useful to -// also create `${prefix}${key}Apply`, which uses `Function.prototype.apply`, -// instead of `Function.prototype.call`, and thus doesn't require iterator -// destructuring. -const varargsMethods = [ - // 'ArrayPrototypeConcat' is omitted, because it performs the spread - // on its own for arrays and array-likes with a truthy - // @@isConcatSpreadable symbol property. - 'ArrayOf', - 'ArrayPrototypePush', - 'ArrayPrototypeUnshift', - // 'FunctionPrototypeCall' is omitted, since there's 'ReflectApply' - // and 'FunctionPrototypeApply'. - 'MathHypot', - 'MathMax', - 'MathMin', - 'StringPrototypeConcat', - 'TypedArrayOf', -]; - -function getNewKey(key) { - return typeof key === 'symbol' ? - `Symbol${key.description[7].toUpperCase()}${key.description.slice(8)}` : - `${key[0].toUpperCase()}${key.slice(1)}`; -} - -function copyAccessor(dest, prefix, key, { enumerable, get, set }) { - ReflectDefineProperty(dest, `${prefix}Get${key}`, { - value: uncurryThis(get), - enumerable - }); - if (set !== undefined) { - ReflectDefineProperty(dest, `${prefix}Set${key}`, { - value: uncurryThis(set), - enumerable - }); - } -} - -function copyPropsRenamed(src, dest, prefix) { - for (const key of ReflectOwnKeys(src)) { - const newKey = getNewKey(key); - const desc = ReflectGetOwnPropertyDescriptor(src, key); - if ('get' in desc) { - copyAccessor(dest, prefix, newKey, desc); - } else { - const name = `${prefix}${newKey}`; - ReflectDefineProperty(dest, name, desc); - if (varargsMethods.includes(name)) { - ReflectDefineProperty(dest, `${name}Apply`, { - // `src` is bound as the `this` so that the static `this` points - // to the object it was defined on, - // e.g.: `ArrayOfApply` gets a `this` of `Array`: - value: applyBind(desc.value, src), - }); - } - } - } -} - -function copyPropsRenamedBound(src, dest, prefix) { - for (const key of ReflectOwnKeys(src)) { - const newKey = getNewKey(key); - const desc = ReflectGetOwnPropertyDescriptor(src, key); - if ('get' in desc) { - copyAccessor(dest, prefix, newKey, desc); - } else { - const { value } = desc; - if (typeof value === 'function') { - desc.value = value.bind(src); - } - - const name = `${prefix}${newKey}`; - ReflectDefineProperty(dest, name, desc); - if (varargsMethods.includes(name)) { - ReflectDefineProperty(dest, `${name}Apply`, { - value: applyBind(value, src), - }); - } - } - } -} - -function copyPrototype(src, dest, prefix) { - for (const key of ReflectOwnKeys(src)) { - const newKey = getNewKey(key); - const desc = ReflectGetOwnPropertyDescriptor(src, key); - if ('get' in desc) { - copyAccessor(dest, prefix, newKey, desc); - } else { - const { value } = desc; - if (typeof value === 'function') { - desc.value = uncurryThis(value); - } - - const name = `${prefix}${newKey}`; - ReflectDefineProperty(dest, name, desc); - if (varargsMethods.includes(name)) { - ReflectDefineProperty(dest, `${name}Apply`, { - value: applyBind(value), - }); - } - } - } -} - -// Create copies of configurable value properties of the global object -[ - 'Proxy', - 'globalThis', -].forEach((name) => { - // eslint-disable-next-line no-restricted-globals - primordials[name] = globalThis[name]; -}); - -// Create copies of URI handling functions -[ - decodeURI, - decodeURIComponent, - encodeURI, - encodeURIComponent, -].forEach((fn) => { - primordials[fn.name] = fn; -}); - -// Create copies of the namespace objects -[ - 'JSON', - 'Math', - 'Proxy', - 'Reflect', -].forEach((name) => { - // eslint-disable-next-line no-restricted-globals - copyPropsRenamed(global[name], primordials, name); -}); - -// Create copies of intrinsic objects -[ - 'Array', - 'ArrayBuffer', - 'BigInt', - 'BigInt64Array', - 'BigUint64Array', - 'Boolean', - 'DataView', - 'Date', - 'Error', - 'EvalError', - 'Float32Array', - 'Float64Array', - 'Function', - 'Int16Array', - 'Int32Array', - 'Int8Array', - 'Map', - 'Number', - 'Object', - 'RangeError', - 'ReferenceError', - 'RegExp', - 'Set', - 'String', - 'Symbol', - 'SyntaxError', - 'TypeError', - 'URIError', - 'Uint16Array', - 'Uint32Array', - 'Uint8Array', - 'Uint8ClampedArray', - 'WeakMap', - 'WeakSet', -].forEach((name) => { - // eslint-disable-next-line no-restricted-globals - const original = global[name]; - primordials[name] = original; - copyPropsRenamed(original, primordials, name); - copyPrototype(original.prototype, primordials, `${name}Prototype`); -}); - -// Create copies of intrinsic objects that require a valid `this` to call -// static methods. -// Refs: https://www.ecma-international.org/ecma-262/#sec-promise.all -[ - 'Promise', -].forEach((name) => { - // eslint-disable-next-line no-restricted-globals - const original = global[name]; - primordials[name] = original; - copyPropsRenamedBound(original, primordials, name); - copyPrototype(original.prototype, primordials, `${name}Prototype`); -}); - -// Create copies of abstract intrinsic objects that are not directly exposed -// on the global object. -// Refs: https://tc39.es/ecma262/#sec-%typedarray%-intrinsic-object -[ - { name: 'TypedArray', original: Reflect.getPrototypeOf(Uint8Array) }, - { name: 'ArrayIterator', original: { - prototype: Reflect.getPrototypeOf(Array.prototype[Symbol.iterator]()), - } }, - { name: 'StringIterator', original: { - prototype: Reflect.getPrototypeOf(String.prototype[Symbol.iterator]()), - } }, -].forEach(({ name, original }) => { - primordials[name] = original; - // The static %TypedArray% methods require a valid `this`, but can't be bound, - // as they need a subclass constructor as the receiver: - copyPrototype(original, primordials, name); - copyPrototype(original.prototype, primordials, `${name}Prototype`); -}); - -/* eslint-enable node-core/prefer-primordials */ - -const { - ArrayPrototypeForEach, - FunctionPrototypeCall, - Map, - ObjectFreeze, - ObjectSetPrototypeOf, - Set, - SymbolIterator, - WeakMap, - WeakSet, -} = primordials; - -// Because these functions are used by `makeSafe`, which is exposed -// on the `primordials` object, it's important to use const references -// to the primordials that they use: -const createSafeIterator = (factory, next) => { - class SafeIterator { - constructor(iterable) { - this._iterator = factory(iterable); - } - next() { - return next(this._iterator); - } - [SymbolIterator]() { - return this; - } - } - ObjectSetPrototypeOf(SafeIterator.prototype, null); - ObjectFreeze(SafeIterator.prototype); - ObjectFreeze(SafeIterator); - return SafeIterator; -}; - -primordials.SafeArrayIterator = createSafeIterator( - primordials.ArrayPrototypeSymbolIterator, - primordials.ArrayIteratorPrototypeNext -); -primordials.SafeStringIterator = createSafeIterator( - primordials.StringPrototypeSymbolIterator, - primordials.StringIteratorPrototypeNext -); - -const copyProps = (src, dest) => { - ArrayPrototypeForEach(ReflectOwnKeys(src), (key) => { - if (!ReflectGetOwnPropertyDescriptor(dest, key)) { - ReflectDefineProperty( - dest, - key, - ReflectGetOwnPropertyDescriptor(src, key)); - } - }); -}; - -const makeSafe = (unsafe, safe) => { - if (SymbolIterator in unsafe.prototype) { - const dummy = new unsafe(); - let next; // We can reuse the same `next` method. - - ArrayPrototypeForEach(ReflectOwnKeys(unsafe.prototype), (key) => { - if (!ReflectGetOwnPropertyDescriptor(safe.prototype, key)) { - const desc = ReflectGetOwnPropertyDescriptor(unsafe.prototype, key); - if ( - typeof desc.value === 'function' && - desc.value.length === 0 && - SymbolIterator in (FunctionPrototypeCall(desc.value, dummy) ?? {}) - ) { - const createIterator = uncurryThis(desc.value); - next = next ?? uncurryThis(createIterator(dummy).next); - const SafeIterator = createSafeIterator(createIterator, next); - desc.value = function() { - return new SafeIterator(this); - }; - } - ReflectDefineProperty(safe.prototype, key, desc); - } - }); - } else { - copyProps(unsafe.prototype, safe.prototype); - } - copyProps(unsafe, safe); - - ObjectSetPrototypeOf(safe.prototype, null); - ObjectFreeze(safe.prototype); - ObjectFreeze(safe); - return safe; -}; -primordials.makeSafe = makeSafe; - -// Subclass the constructors because we need to use their prototype -// methods later. -// Defining the `constructor` is necessary here to avoid the default -// constructor which uses the user-mutable `%ArrayIteratorPrototype%.next`. -primordials.SafeMap = makeSafe( - Map, - class SafeMap extends Map { - constructor(i) { super(i); } // eslint-disable-line no-useless-constructor - } -); -primordials.SafeWeakMap = makeSafe( - WeakMap, - class SafeWeakMap extends WeakMap { - constructor(i) { super(i); } // eslint-disable-line no-useless-constructor - } -); -primordials.SafeSet = makeSafe( - Set, - class SafeSet extends Set { - constructor(i) { super(i); } // eslint-disable-line no-useless-constructor - } -); -primordials.SafeWeakSet = makeSafe( - WeakSet, - class SafeWeakSet extends WeakSet { - constructor(i) { super(i); } // eslint-disable-line no-useless-constructor - } -); - -ObjectSetPrototypeOf(primordials, null); -ObjectFreeze(primordials); - -module.exports = primordials; diff --git a/node_modules/@pkgjs/parseargs/internal/util.js b/node_modules/@pkgjs/parseargs/internal/util.js deleted file mode 100644 index b9b8fe5b..00000000 --- a/node_modules/@pkgjs/parseargs/internal/util.js +++ /dev/null @@ -1,14 +0,0 @@ -'use strict'; - -// This is a placeholder for util.js in node.js land. - -const { - ObjectCreate, - ObjectFreeze, -} = require('./primordials'); - -const kEmptyObject = ObjectFreeze(ObjectCreate(null)); - -module.exports = { - kEmptyObject, -}; diff --git a/node_modules/@pkgjs/parseargs/internal/validators.js b/node_modules/@pkgjs/parseargs/internal/validators.js deleted file mode 100644 index b5ac4fb5..00000000 --- a/node_modules/@pkgjs/parseargs/internal/validators.js +++ /dev/null @@ -1,89 +0,0 @@ -'use strict'; - -// This file is a proxy of the original file located at: -// https://github.com/nodejs/node/blob/main/lib/internal/validators.js -// Every addition or modification to this file must be evaluated -// during the PR review. - -const { - ArrayIsArray, - ArrayPrototypeIncludes, - ArrayPrototypeJoin, -} = require('./primordials'); - -const { - codes: { - ERR_INVALID_ARG_TYPE - } -} = require('./errors'); - -function validateString(value, name) { - if (typeof value !== 'string') { - throw new ERR_INVALID_ARG_TYPE(name, 'String', value); - } -} - -function validateUnion(value, name, union) { - if (!ArrayPrototypeIncludes(union, value)) { - throw new ERR_INVALID_ARG_TYPE(name, `('${ArrayPrototypeJoin(union, '|')}')`, value); - } -} - -function validateBoolean(value, name) { - if (typeof value !== 'boolean') { - throw new ERR_INVALID_ARG_TYPE(name, 'Boolean', value); - } -} - -function validateArray(value, name) { - if (!ArrayIsArray(value)) { - throw new ERR_INVALID_ARG_TYPE(name, 'Array', value); - } -} - -function validateStringArray(value, name) { - validateArray(value, name); - for (let i = 0; i < value.length; i++) { - validateString(value[i], `${name}[${i}]`); - } -} - -function validateBooleanArray(value, name) { - validateArray(value, name); - for (let i = 0; i < value.length; i++) { - validateBoolean(value[i], `${name}[${i}]`); - } -} - -/** - * @param {unknown} value - * @param {string} name - * @param {{ - * allowArray?: boolean, - * allowFunction?: boolean, - * nullable?: boolean - * }} [options] - */ -function validateObject(value, name, options) { - const useDefaultOptions = options == null; - const allowArray = useDefaultOptions ? false : options.allowArray; - const allowFunction = useDefaultOptions ? false : options.allowFunction; - const nullable = useDefaultOptions ? false : options.nullable; - if ((!nullable && value === null) || - (!allowArray && ArrayIsArray(value)) || - (typeof value !== 'object' && ( - !allowFunction || typeof value !== 'function' - ))) { - throw new ERR_INVALID_ARG_TYPE(name, 'Object', value); - } -} - -module.exports = { - validateArray, - validateObject, - validateString, - validateStringArray, - validateUnion, - validateBoolean, - validateBooleanArray, -}; diff --git a/node_modules/@pkgjs/parseargs/package.json b/node_modules/@pkgjs/parseargs/package.json deleted file mode 100644 index 0bcc05c0..00000000 --- a/node_modules/@pkgjs/parseargs/package.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "@pkgjs/parseargs", - "version": "0.11.0", - "description": "Polyfill of future proposal for `util.parseArgs()`", - "engines": { - "node": ">=14" - }, - "main": "index.js", - "exports": { - ".": "./index.js", - "./package.json": "./package.json" - }, - "scripts": { - "coverage": "c8 --check-coverage tape 'test/*.js'", - "test": "c8 tape 'test/*.js'", - "posttest": "eslint .", - "fix": "npm run posttest -- --fix" - }, - "repository": { - "type": "git", - "url": "git@github.com:pkgjs/parseargs.git" - }, - "keywords": [], - "author": "", - "license": "MIT", - "bugs": { - "url": "https://github.com/pkgjs/parseargs/issues" - }, - "homepage": "https://github.com/pkgjs/parseargs#readme", - "devDependencies": { - "c8": "^7.10.0", - "eslint": "^8.2.0", - "eslint-plugin-node-core": "iansu/eslint-plugin-node-core", - "tape": "^5.2.2" - } -} diff --git a/node_modules/@pkgjs/parseargs/utils.js b/node_modules/@pkgjs/parseargs/utils.js deleted file mode 100644 index d7f420a2..00000000 --- a/node_modules/@pkgjs/parseargs/utils.js +++ /dev/null @@ -1,198 +0,0 @@ -'use strict'; - -const { - ArrayPrototypeFind, - ObjectEntries, - ObjectPrototypeHasOwnProperty: ObjectHasOwn, - StringPrototypeCharAt, - StringPrototypeIncludes, - StringPrototypeStartsWith, -} = require('./internal/primordials'); - -const { - validateObject, -} = require('./internal/validators'); - -// These are internal utilities to make the parsing logic easier to read, and -// add lots of detail for the curious. They are in a separate file to allow -// unit testing, although that is not essential (this could be rolled into -// main file and just tested implicitly via API). -// -// These routines are for internal use, not for export to client. - -/** - * Return the named property, but only if it is an own property. - */ -function objectGetOwn(obj, prop) { - if (ObjectHasOwn(obj, prop)) - return obj[prop]; -} - -/** - * Return the named options property, but only if it is an own property. - */ -function optionsGetOwn(options, longOption, prop) { - if (ObjectHasOwn(options, longOption)) - return objectGetOwn(options[longOption], prop); -} - -/** - * Determines if the argument may be used as an option value. - * @example - * isOptionValue('V') // returns true - * isOptionValue('-v') // returns true (greedy) - * isOptionValue('--foo') // returns true (greedy) - * isOptionValue(undefined) // returns false - */ -function isOptionValue(value) { - if (value == null) return false; - - // Open Group Utility Conventions are that an option-argument - // is the argument after the option, and may start with a dash. - return true; // greedy! -} - -/** - * Detect whether there is possible confusion and user may have omitted - * the option argument, like `--port --verbose` when `port` of type:string. - * In strict mode we throw errors if value is option-like. - */ -function isOptionLikeValue(value) { - if (value == null) return false; - - return value.length > 1 && StringPrototypeCharAt(value, 0) === '-'; -} - -/** - * Determines if `arg` is just a short option. - * @example '-f' - */ -function isLoneShortOption(arg) { - return arg.length === 2 && - StringPrototypeCharAt(arg, 0) === '-' && - StringPrototypeCharAt(arg, 1) !== '-'; -} - -/** - * Determines if `arg` is a lone long option. - * @example - * isLoneLongOption('a') // returns false - * isLoneLongOption('-a') // returns false - * isLoneLongOption('--foo') // returns true - * isLoneLongOption('--foo=bar') // returns false - */ -function isLoneLongOption(arg) { - return arg.length > 2 && - StringPrototypeStartsWith(arg, '--') && - !StringPrototypeIncludes(arg, '=', 3); -} - -/** - * Determines if `arg` is a long option and value in the same argument. - * @example - * isLongOptionAndValue('--foo') // returns false - * isLongOptionAndValue('--foo=bar') // returns true - */ -function isLongOptionAndValue(arg) { - return arg.length > 2 && - StringPrototypeStartsWith(arg, '--') && - StringPrototypeIncludes(arg, '=', 3); -} - -/** - * Determines if `arg` is a short option group. - * - * See Guideline 5 of the [Open Group Utility Conventions](https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap12.html). - * One or more options without option-arguments, followed by at most one - * option that takes an option-argument, should be accepted when grouped - * behind one '-' delimiter. - * @example - * isShortOptionGroup('-a', {}) // returns false - * isShortOptionGroup('-ab', {}) // returns true - * // -fb is an option and a value, not a short option group - * isShortOptionGroup('-fb', { - * options: { f: { type: 'string' } } - * }) // returns false - * isShortOptionGroup('-bf', { - * options: { f: { type: 'string' } } - * }) // returns true - * // -bfb is an edge case, return true and caller sorts it out - * isShortOptionGroup('-bfb', { - * options: { f: { type: 'string' } } - * }) // returns true - */ -function isShortOptionGroup(arg, options) { - if (arg.length <= 2) return false; - if (StringPrototypeCharAt(arg, 0) !== '-') return false; - if (StringPrototypeCharAt(arg, 1) === '-') return false; - - const firstShort = StringPrototypeCharAt(arg, 1); - const longOption = findLongOptionForShort(firstShort, options); - return optionsGetOwn(options, longOption, 'type') !== 'string'; -} - -/** - * Determine if arg is a short string option followed by its value. - * @example - * isShortOptionAndValue('-a', {}); // returns false - * isShortOptionAndValue('-ab', {}); // returns false - * isShortOptionAndValue('-fFILE', { - * options: { foo: { short: 'f', type: 'string' }} - * }) // returns true - */ -function isShortOptionAndValue(arg, options) { - validateObject(options, 'options'); - - if (arg.length <= 2) return false; - if (StringPrototypeCharAt(arg, 0) !== '-') return false; - if (StringPrototypeCharAt(arg, 1) === '-') return false; - - const shortOption = StringPrototypeCharAt(arg, 1); - const longOption = findLongOptionForShort(shortOption, options); - return optionsGetOwn(options, longOption, 'type') === 'string'; -} - -/** - * Find the long option associated with a short option. Looks for a configured - * `short` and returns the short option itself if a long option is not found. - * @example - * findLongOptionForShort('a', {}) // returns 'a' - * findLongOptionForShort('b', { - * options: { bar: { short: 'b' } } - * }) // returns 'bar' - */ -function findLongOptionForShort(shortOption, options) { - validateObject(options, 'options'); - const longOptionEntry = ArrayPrototypeFind( - ObjectEntries(options), - ({ 1: optionConfig }) => objectGetOwn(optionConfig, 'short') === shortOption - ); - return longOptionEntry?.[0] ?? shortOption; -} - -/** - * Check if the given option includes a default value - * and that option has not been set by the input args. - * - * @param {string} longOption - long option name e.g. 'foo' - * @param {object} optionConfig - the option configuration properties - * @param {object} values - option values returned in `values` by parseArgs - */ -function useDefaultValueOption(longOption, optionConfig, values) { - return objectGetOwn(optionConfig, 'default') !== undefined && - values[longOption] === undefined; -} - -module.exports = { - findLongOptionForShort, - isLoneLongOption, - isLoneShortOption, - isLongOptionAndValue, - isOptionValue, - isOptionLikeValue, - isShortOptionAndValue, - isShortOptionGroup, - useDefaultValueOption, - objectGetOwn, - optionsGetOwn, -}; diff --git a/node_modules/balanced-match/.github/FUNDING.yml b/node_modules/balanced-match/.github/FUNDING.yml deleted file mode 100644 index cea8b16e..00000000 --- a/node_modules/balanced-match/.github/FUNDING.yml +++ /dev/null @@ -1,2 +0,0 @@ -tidelift: "npm/balanced-match" -patreon: juliangruber diff --git a/node_modules/balanced-match/LICENSE.md b/node_modules/balanced-match/LICENSE.md index 2cdc8e41..61ece8cc 100644 --- a/node_modules/balanced-match/LICENSE.md +++ b/node_modules/balanced-match/LICENSE.md @@ -1,6 +1,8 @@ (MIT) -Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> +Original code Copyright Julian Gruber + +Port to TypeScript Copyright Isaac Z. Schlueter 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 diff --git a/node_modules/balanced-match/README.md b/node_modules/balanced-match/README.md index d2a48b6b..f3bb3773 100644 --- a/node_modules/balanced-match/README.md +++ b/node_modules/balanced-match/README.md @@ -1,22 +1,20 @@ # balanced-match -Match balanced string pairs, like `{` and `}` or `` and ``. Supports regular expressions as well! - -[![build status](https://secure.travis-ci.org/juliangruber/balanced-match.svg)](http://travis-ci.org/juliangruber/balanced-match) -[![downloads](https://img.shields.io/npm/dm/balanced-match.svg)](https://www.npmjs.org/package/balanced-match) - -[![testling badge](https://ci.testling.com/juliangruber/balanced-match.png)](https://ci.testling.com/juliangruber/balanced-match) +Match balanced string pairs, like `{` and `}` or `` and +``. Supports regular expressions as well! ## Example Get the first matching pair of braces: ```js -var balanced = require('balanced-match'); +import { balanced } from 'balanced-match' -console.log(balanced('{', '}', 'pre{in{nested}}post')); -console.log(balanced('{', '}', 'pre{first}between{second}post')); -console.log(balanced(/\s+\{\s+/, /\s+\}\s+/, 'pre { in{nest} } post')); +console.log(balanced('{', '}', 'pre{in{nested}}post')) +console.log(balanced('{', '}', 'pre{first}between{second}post')) +console.log( + balanced(/\s+\{\s+/, /\s+\}\s+/, 'pre { in{nest} } post'), +) ``` The matches are: @@ -34,22 +32,22 @@ $ node example.js ## API -### var m = balanced(a, b, str) +### const m = balanced(a, b, str) For the first non-nested matching pair of `a` and `b` in `str`, return an object with those keys: -* **start** the index of the first match of `a` -* **end** the index of the matching `b` -* **pre** the preamble, `a` and `b` not included -* **body** the match, `a` and `b` not included -* **post** the postscript, `a` and `b` not included +- **start** the index of the first match of `a` +- **end** the index of the matching `b` +- **pre** the preamble, `a` and `b` not included +- **body** the match, `a` and `b` not included +- **post** the postscript, `a` and `b` not included If there's no match, `undefined` will be returned. If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `['{', 'a', '']` and `{a}}` will match `['', 'a', '}']`. -### var r = balanced.range(a, b, str) +### const r = balanced.range(a, b, str) For the first non-nested matching pair of `a` and `b` in `str`, return an array with indexes: `[ , ]`. @@ -57,41 +55,3 @@ array with indexes: `[ , ]`. If there's no match, `undefined` will be returned. If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `[ 1, 3 ]` and `{a}}` will match `[0, 2]`. - -## Installation - -With [npm](https://npmjs.org) do: - -```bash -npm install balanced-match -``` - -## Security contact information - -To report a security vulnerability, please use the -[Tidelift security contact](https://tidelift.com/security). -Tidelift will coordinate the fix and disclosure. - -## License - -(MIT) - -Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/@isaacs/balanced-match/dist/commonjs/index.d.ts b/node_modules/balanced-match/dist/commonjs/index.d.ts similarity index 100% rename from node_modules/@isaacs/balanced-match/dist/commonjs/index.d.ts rename to node_modules/balanced-match/dist/commonjs/index.d.ts diff --git a/node_modules/@isaacs/balanced-match/dist/commonjs/index.d.ts.map b/node_modules/balanced-match/dist/commonjs/index.d.ts.map similarity index 100% rename from node_modules/@isaacs/balanced-match/dist/commonjs/index.d.ts.map rename to node_modules/balanced-match/dist/commonjs/index.d.ts.map diff --git a/node_modules/@isaacs/balanced-match/dist/commonjs/index.js b/node_modules/balanced-match/dist/commonjs/index.js similarity index 100% rename from node_modules/@isaacs/balanced-match/dist/commonjs/index.js rename to node_modules/balanced-match/dist/commonjs/index.js diff --git a/node_modules/@isaacs/balanced-match/dist/commonjs/index.js.map b/node_modules/balanced-match/dist/commonjs/index.js.map similarity index 100% rename from node_modules/@isaacs/balanced-match/dist/commonjs/index.js.map rename to node_modules/balanced-match/dist/commonjs/index.js.map diff --git a/node_modules/@isaacs/balanced-match/dist/commonjs/package.json b/node_modules/balanced-match/dist/commonjs/package.json similarity index 100% rename from node_modules/@isaacs/balanced-match/dist/commonjs/package.json rename to node_modules/balanced-match/dist/commonjs/package.json diff --git a/node_modules/@isaacs/balanced-match/dist/esm/index.d.ts b/node_modules/balanced-match/dist/esm/index.d.ts similarity index 100% rename from node_modules/@isaacs/balanced-match/dist/esm/index.d.ts rename to node_modules/balanced-match/dist/esm/index.d.ts diff --git a/node_modules/@isaacs/balanced-match/dist/esm/index.d.ts.map b/node_modules/balanced-match/dist/esm/index.d.ts.map similarity index 100% rename from node_modules/@isaacs/balanced-match/dist/esm/index.d.ts.map rename to node_modules/balanced-match/dist/esm/index.d.ts.map diff --git a/node_modules/@isaacs/balanced-match/dist/esm/index.js b/node_modules/balanced-match/dist/esm/index.js similarity index 100% rename from node_modules/@isaacs/balanced-match/dist/esm/index.js rename to node_modules/balanced-match/dist/esm/index.js diff --git a/node_modules/@isaacs/balanced-match/dist/esm/index.js.map b/node_modules/balanced-match/dist/esm/index.js.map similarity index 100% rename from node_modules/@isaacs/balanced-match/dist/esm/index.js.map rename to node_modules/balanced-match/dist/esm/index.js.map diff --git a/node_modules/@isaacs/balanced-match/dist/esm/package.json b/node_modules/balanced-match/dist/esm/package.json similarity index 100% rename from node_modules/@isaacs/balanced-match/dist/esm/package.json rename to node_modules/balanced-match/dist/esm/package.json diff --git a/node_modules/balanced-match/index.js b/node_modules/balanced-match/index.js deleted file mode 100644 index c67a6460..00000000 --- a/node_modules/balanced-match/index.js +++ /dev/null @@ -1,62 +0,0 @@ -'use strict'; -module.exports = balanced; -function balanced(a, b, str) { - if (a instanceof RegExp) a = maybeMatch(a, str); - if (b instanceof RegExp) b = maybeMatch(b, str); - - var r = range(a, b, str); - - return r && { - start: r[0], - end: r[1], - pre: str.slice(0, r[0]), - body: str.slice(r[0] + a.length, r[1]), - post: str.slice(r[1] + b.length) - }; -} - -function maybeMatch(reg, str) { - var m = str.match(reg); - return m ? m[0] : null; -} - -balanced.range = range; -function range(a, b, str) { - var begs, beg, left, right, result; - var ai = str.indexOf(a); - var bi = str.indexOf(b, ai + 1); - var i = ai; - - if (ai >= 0 && bi > 0) { - if(a===b) { - return [ai, bi]; - } - begs = []; - left = str.length; - - while (i >= 0 && !result) { - if (i == ai) { - begs.push(i); - ai = str.indexOf(a, i + 1); - } else if (begs.length == 1) { - result = [ begs.pop(), bi ]; - } else { - beg = begs.pop(); - if (beg < left) { - left = beg; - right = bi; - } - - bi = str.indexOf(b, i + 1); - } - - i = ai < bi && ai >= 0 ? ai : bi; - } - - if (begs.length) { - result = [ left, right ]; - } - } - - return result; -} diff --git a/node_modules/balanced-match/package.json b/node_modules/balanced-match/package.json index ce6073e0..48f1a638 100644 --- a/node_modules/balanced-match/package.json +++ b/node_modules/balanced-match/package.json @@ -1,20 +1,49 @@ { "name": "balanced-match", "description": "Match balanced character pairs, like \"{\" and \"}\"", - "version": "1.0.2", + "version": "4.0.4", + "files": [ + "dist" + ], "repository": { "type": "git", "url": "git://github.com/juliangruber/balanced-match.git" }, - "homepage": "https://github.com/juliangruber/balanced-match", - "main": "index.js", + "exports": { + "./package.json": "./package.json", + ".": { + "import": { + "types": "./dist/esm/index.d.ts", + "default": "./dist/esm/index.js" + }, + "require": { + "types": "./dist/commonjs/index.d.ts", + "default": "./dist/commonjs/index.js" + } + } + }, + "type": "module", "scripts": { - "test": "tape test/test.js", - "bench": "matcha test/bench.js" + "preversion": "npm test", + "postversion": "npm publish", + "prepublishOnly": "git push origin --follow-tags", + "prepare": "tshy", + "pretest": "npm run prepare", + "presnap": "npm run prepare", + "test": "tap", + "snap": "tap", + "format": "prettier --write .", + "benchmark": "node benchmark/index.js", + "typedoc": "typedoc --tsconfig .tshy/esm.json ./src/*.ts" }, "devDependencies": { - "matcha": "^0.7.0", - "tape": "^4.6.0" + "@types/brace-expansion": "^1.1.2", + "@types/node": "^25.2.1", + "mkdirp": "^3.0.1", + "prettier": "^3.3.2", + "tap": "^21.6.2", + "tshy": "^3.0.2", + "typedoc": "^0.28.5" }, "keywords": [ "match", @@ -23,26 +52,17 @@ "balanced", "parse" ], - "author": { - "name": "Julian Gruber", - "email": "mail@juliangruber.com", - "url": "http://juliangruber.com" - }, "license": "MIT", - "testling": { - "files": "test/*.js", - "browsers": [ - "ie/8..latest", - "firefox/20..latest", - "firefox/nightly", - "chrome/25..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2..latest" - ] - } + "engines": { + "node": "18 || 20 || >=22" + }, + "tshy": { + "exports": { + "./package.json": "./package.json", + ".": "./src/index.ts" + } + }, + "main": "./dist/commonjs/index.js", + "types": "./dist/commonjs/index.d.ts", + "module": "./dist/esm/index.js" } diff --git a/node_modules/brace-expansion/.github/FUNDING.yml b/node_modules/brace-expansion/.github/FUNDING.yml deleted file mode 100644 index 79d1eafc..00000000 --- a/node_modules/brace-expansion/.github/FUNDING.yml +++ /dev/null @@ -1,2 +0,0 @@ -tidelift: "npm/brace-expansion" -patreon: juliangruber diff --git a/node_modules/brace-expansion/LICENSE b/node_modules/brace-expansion/LICENSE index de322667..46e7b75c 100644 --- a/node_modules/brace-expansion/LICENSE +++ b/node_modules/brace-expansion/LICENSE @@ -1,6 +1,8 @@ MIT License -Copyright (c) 2013 Julian Gruber +Copyright Julian Gruber + +TypeScript port Copyright Isaac Z. Schlueter 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/brace-expansion/README.md b/node_modules/brace-expansion/README.md index e55c583d..073aceb3 100644 --- a/node_modules/brace-expansion/README.md +++ b/node_modules/brace-expansion/README.md @@ -1,18 +1,15 @@ # brace-expansion -[Brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html), +[Brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html), as known from sh/bash, in JavaScript. -[![build status](https://secure.travis-ci.org/juliangruber/brace-expansion.svg)](http://travis-ci.org/juliangruber/brace-expansion) +[![CI](https://github.com/juliangruber/brace-expansion/actions/workflows/ci.yml/badge.svg)](https://github.com/juliangruber/brace-expansion/actions/workflows/ci.yml) [![downloads](https://img.shields.io/npm/dm/brace-expansion.svg)](https://www.npmjs.org/package/brace-expansion) -[![Greenkeeper badge](https://badges.greenkeeper.io/juliangruber/brace-expansion.svg)](https://greenkeeper.io/) - -[![testling badge](https://ci.testling.com/juliangruber/brace-expansion.png)](https://ci.testling.com/juliangruber/brace-expansion) ## Example ```js -var expand = require('brace-expansion'); +import { expand } from 'brace-expansion' expand('file-{a,b,c}.jpg') // => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg'] @@ -48,25 +45,47 @@ expand('ppp{,config,oe{,conf}}') ## API ```js -var expand = require('brace-expansion'); +import { expand } from 'brace-expansion' ``` -### var expanded = expand(str) +### const expanded = expand(str, [options]) + +Return an array of all possible and valid expansions of `str`. If +none are found, `[str]` is returned. -Return an array of all possible and valid expansions of `str`. If none are -found, `[str]` is returned. +The `options` object can provide a `max` value to cap the number +of expansions allowed. This is limited to `100_000` by default, +to prevent DoS attacks. + +```js +const expansions = expand('{1..100}'.repeat(5), { + max: 100, +}) +// expansions.length will be 100, not 100^5 +``` + +The `options` object can also provide a `maxLength` value to cap the +total number of characters across all expansions. This is limited to +`4_000_000` by default, to prevent memory exhaustion from inputs whose +result count stays under `max` while each result grows very long. + +```js +const expansions = expand('{a,b}'.repeat(1500), { + maxLength: 10_000, +}) +``` Valid expansions are: ```js -/^(.*,)+(.+)?$/ +;/^(.*,)+(.+)?$/ // {a,b,...} ``` A comma separated list of options, like `{a,b}` or `{a,{b,c}}` or `{,a,}`. ```js -/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/ +;/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/ // {x..y[..incr]} ``` @@ -75,7 +94,7 @@ If `x` or `y` start with a leading `0`, all the numbers will be padded to have equal length. Negative numbers and backwards iteration work too. ```js -/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/ +;/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/ // {x..y[..incr]} ``` @@ -84,52 +103,3 @@ An alphabetic sequence from `x` to `y` inclusive, with optional increment. number. For compatibility reasons, the string `${` is not eligible for brace expansion. - -## Installation - -With [npm](https://npmjs.org) do: - -```bash -npm install brace-expansion -``` - -## Contributors - -- [Julian Gruber](https://github.com/juliangruber) -- [Isaac Z. Schlueter](https://github.com/isaacs) - -## Sponsors - -This module is proudly supported by my [Sponsors](https://github.com/juliangruber/sponsors)! - -Do you want to support modules like this to improve their quality, stability and weigh in on new features? Then please consider donating to my [Patreon](https://www.patreon.com/juliangruber). Not sure how much of my modules you're using? Try [feross/thanks](https://github.com/feross/thanks)! - -## Security contact information - -To report a security vulnerability, please use the -[Tidelift security contact](https://tidelift.com/security). -Tidelift will coordinate the fix and disclosure. - -## License - -(MIT) - -Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/@isaacs/brace-expansion/dist/commonjs/index.d.ts b/node_modules/brace-expansion/dist/commonjs/index.d.ts similarity index 74% rename from node_modules/@isaacs/brace-expansion/dist/commonjs/index.d.ts rename to node_modules/brace-expansion/dist/commonjs/index.d.ts index 92b7a7f0..f3e2de9d 100644 --- a/node_modules/@isaacs/brace-expansion/dist/commonjs/index.d.ts +++ b/node_modules/brace-expansion/dist/commonjs/index.d.ts @@ -1,6 +1,8 @@ export declare const EXPANSION_MAX = 100000; +export declare const EXPANSION_MAX_LENGTH = 4000000; export type BraceExpansionOptions = { max?: number; + maxLength?: number; }; export declare function expand(str: string, options?: BraceExpansionOptions): string[]; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/brace-expansion/dist/commonjs/index.d.ts.map b/node_modules/brace-expansion/dist/commonjs/index.d.ts.map new file mode 100644 index 00000000..c0ff8dc1 --- /dev/null +++ b/node_modules/brace-expansion/dist/commonjs/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAkBA,eAAO,MAAM,aAAa,SAAU,CAAA;AAYpC,eAAO,MAAM,oBAAoB,UAAY,CAAA;AAwD7C,MAAM,MAAM,qBAAqB,GAAG;IAClC,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,wBAAgB,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,GAAE,qBAA0B,YAkBtE"} \ No newline at end of file diff --git a/node_modules/brace-expansion/dist/commonjs/index.js b/node_modules/brace-expansion/dist/commonjs/index.js new file mode 100644 index 00000000..869a6bee --- /dev/null +++ b/node_modules/brace-expansion/dist/commonjs/index.js @@ -0,0 +1,289 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.EXPANSION_MAX_LENGTH = exports.EXPANSION_MAX = void 0; +exports.expand = expand; +const balanced_match_1 = require("balanced-match"); +const escSlash = '\0SLASH' + Math.random() + '\0'; +const escOpen = '\0OPEN' + Math.random() + '\0'; +const escClose = '\0CLOSE' + Math.random() + '\0'; +const escComma = '\0COMMA' + Math.random() + '\0'; +const escPeriod = '\0PERIOD' + Math.random() + '\0'; +const escSlashPattern = new RegExp(escSlash, 'g'); +const escOpenPattern = new RegExp(escOpen, 'g'); +const escClosePattern = new RegExp(escClose, 'g'); +const escCommaPattern = new RegExp(escComma, 'g'); +const escPeriodPattern = new RegExp(escPeriod, 'g'); +const slashPattern = /\\\\/g; +const openPattern = /\\{/g; +const closePattern = /\\}/g; +const commaPattern = /\\,/g; +const periodPattern = /\\\./g; +exports.EXPANSION_MAX = 100_000; +// `EXPANSION_MAX` caps the *number* of expansions, but not their length. An +// input like `'{a,b}'.repeat(1500)` stays under that count - its output is +// truncated to 100k results - while making every result ~1500 characters +// long. The result set, and the intermediate arrays built while combining +// brace sets, then grow large enough to exhaust memory and crash the process +// (CVE-2026-14257). `EXPANSION_MAX_LENGTH` bounds the total number of +// characters the accumulator may hold at any point, so memory stays flat no +// matter how many brace groups are chained. The limit sits well above any +// realistic expansion (100k results hitting `EXPANSION_MAX` measure ~1M +// characters) so legitimate input is unaffected. +exports.EXPANSION_MAX_LENGTH = 4_000_000; +function numeric(str) { + return !isNaN(str) ? parseInt(str, 10) : str.charCodeAt(0); +} +function escapeBraces(str) { + return str + .replace(slashPattern, escSlash) + .replace(openPattern, escOpen) + .replace(closePattern, escClose) + .replace(commaPattern, escComma) + .replace(periodPattern, escPeriod); +} +function unescapeBraces(str) { + return str + .replace(escSlashPattern, '\\') + .replace(escOpenPattern, '{') + .replace(escClosePattern, '}') + .replace(escCommaPattern, ',') + .replace(escPeriodPattern, '.'); +} +/** + * Basically just str.split(","), but handling cases + * where we have nested braced sections, which should be + * treated as individual members, like {a,{b,c},d} + */ +function parseCommaParts(str) { + if (!str) { + return ['']; + } + const parts = []; + const m = (0, balanced_match_1.balanced)('{', '}', str); + if (!m) { + return str.split(','); + } + const { pre, body, post } = m; + const p = pre.split(','); + p[p.length - 1] += '{' + body + '}'; + const postParts = parseCommaParts(post); + if (post.length) { + ; + p[p.length - 1] += postParts.shift(); + p.push.apply(p, postParts); + } + parts.push.apply(parts, p); + return parts; +} +function expand(str, options = {}) { + if (!str) { + return []; + } + const { max = exports.EXPANSION_MAX, maxLength = exports.EXPANSION_MAX_LENGTH } = options; + // I don't know why Bash 4.3 does this, but it does. + // Anything starting with {} will have the first two bytes preserved + // but *only* at the top level, so {},a}b will not expand to anything, + // but a{},b}c will be expanded to [a}c,abc]. + // One could argue that this is a bug in Bash, but since the goal of + // this module is to match Bash's rules, we escape a leading {} + if (str.slice(0, 2) === '{}') { + str = '\\{\\}' + str.slice(2); + } + return expand_(escapeBraces(str), max, maxLength, true).map(unescapeBraces); +} +function embrace(str) { + return '{' + str + '}'; +} +function isPadded(el) { + return /^-?0\d/.test(el); +} +function lte(i, y) { + return i <= y; +} +function gte(i, y) { + return i >= y; +} +// Build `{ acc[a] + pre + values[v] }` for every combination, capping the +// number of results at `max` and the total number of characters at `maxLength`. +// This is the one place output grows, so bounding it here keeps the single +// accumulator - and therefore memory - flat regardless of how many brace groups +// are combined (CVE-2026-14257). +function combine(acc, pre, values, max, maxLength, dropEmpties) { + const out = []; + let length = 0; + for (let a = 0; a < acc.length; a++) { + for (let v = 0; v < values.length; v++) { + if (out.length >= max) + return out; + const expansion = acc[a] + pre + values[v]; + // Bash drops empty results at the top level. Skip them before they count + // against `max`, so `max` bounds the number of *kept* results. + if (dropEmpties && !expansion) + continue; + if (length + expansion.length > maxLength) + return out; + out.push(expansion); + length += expansion.length; + } + } + return out; +} +// The expansion values of a single numeric (`1..5`) or alphabetic (`a..e..2`) +// sequence body. +function expandSequence(body, isAlphaSequence, max, maxLength) { + const n = body.split(/\.\./); + const N = []; + // A sequence body always splits into two or three parts, but the compiler + // can't know that. + /* c8 ignore start */ + if (n[0] === undefined || n[1] === undefined) { + return N; + } + /* c8 ignore stop */ + const x = numeric(n[0]); + const y = numeric(n[1]); + const width = Math.max(n[0].length, n[1].length); + let incr = n.length === 3 && n[2] !== undefined ? + Math.max(Math.abs(numeric(n[2])), 1) + : 1; + let test = lte; + const reverse = y < x; + if (reverse) { + incr *= -1; + test = gte; + } + const pad = n.some(isPadded); + let length = 0; + for (let i = x; test(i, y) && N.length < max; i += incr) { + let c; + if (isAlphaSequence) { + c = String.fromCharCode(i); + if (c === '\\') { + c = ''; + } + } + else { + c = String(i); + if (pad) { + const need = width - c.length; + if (need > 0) { + const z = new Array(need + 1).join('0'); + if (i < 0) { + c = '-' + z + c.slice(1); + } + else { + c = z + c; + } + } + } + } + if (length + c.length > maxLength) + break; + N.push(c); + length += c.length; + } + return N; +} +function expand_(str, max, maxLength, isTop) { + // Consume the string's top-level brace groups left to right, threading a + // running set of combined prefixes (`acc`). Expanding the tail iteratively - + // rather than recursing on `m.post` once per group - keeps the native stack + // depth constant, so deeply chained input (`'{a,b}'.repeat(3000)`) can no + // longer overflow the stack, and leaves a single accumulator whose size + // `maxLength` bounds directly (CVE-2026-14257). + let acc = ['']; + // Bash drops empty results, but only when the *first* top-level group is a + // comma set - a sequence like `{a..\}` may legitimately yield ''. The drop + // is on the final strings, so it is applied to whichever `combine` produces + // them (the one with no brace set left in the tail). + let dropEmpties = false; + let firstGroup = true; + for (;;) { + const m = (0, balanced_match_1.balanced)('{', '}', str); + // No brace set left: the rest of the string is literal. + if (!m) { + return combine(acc, str, [''], max, maxLength, dropEmpties); + } + // no need to expand pre, since it is guaranteed to be free of brace-sets + const pre = m.pre; + if (/\$$/.test(pre)) { + acc = combine(acc, pre + '{' + m.body + '}', [''], max, maxLength, dropEmpties && !m.post.length); + firstGroup = false; + if (!m.post.length) + break; + str = m.post; + continue; + } + const isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); + const isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); + const isSequence = isNumericSequence || isAlphaSequence; + const isOptions = m.body.indexOf(',') >= 0; + if (!isSequence && !isOptions) { + // {a},b} + if (m.post.match(/,(?!,).*\}/)) { + str = m.pre + '{' + m.body + escClose + m.post; + isTop = true; + continue; + } + // Nothing here expands, so the whole remaining string is literal. + return combine(acc, pre + '{' + m.body + '}' + m.post, [''], max, maxLength, dropEmpties); + } + if (firstGroup) { + dropEmpties = isTop && !isSequence; + firstGroup = false; + } + let values; + if (isSequence) { + values = expandSequence(m.body, isAlphaSequence, max, maxLength); + } + else { + let n = parseCommaParts(m.body); + if (n.length === 1 && n[0] !== undefined) { + // x{{a,b}}y ==> x{a}y x{b}y + n = expand_(n[0], max, maxLength, false).map(embrace); + //XXX is this necessary? Can't seem to hit it in tests. + /* c8 ignore start */ + if (n.length === 1) { + acc = combine(acc, pre + n[0], [''], max, maxLength, dropEmpties && !m.post.length); + if (!m.post.length) + break; + str = m.post; + continue; + } + /* c8 ignore stop */ + } + // Values that `combine` is going to drop as empty produce no result, so + // they must not count against `max` - otherwise `{a,,b}` with `max: 2` + // would stop at `['a', '']` and yield one result instead of two. Skipping + // them outright keeps `values` bounded while leaving `max` a bound on + // *kept* results. + let dropsEmpties = dropEmpties && !m.post.length && !pre; + for (let d = 0; dropsEmpties && d < acc.length; d++) { + if (acc[d]) { + dropsEmpties = false; + } + } + values = []; + let valuesLength = 0; + outer: for (let j = 0; j < n.length; j++) { + const expanded = expand_(n[j], max, maxLength, false); + for (let k = 0; k < expanded.length; k++) { + const v = expanded[k]; + if (dropsEmpties && !v) + continue; + if (values.length >= max || valuesLength + v.length > maxLength) { + break outer; + } + values.push(v); + valuesLength += v.length; + } + } + } + acc = combine(acc, pre, values, max, maxLength, dropEmpties && !m.post.length); + if (!m.post.length) + break; + str = m.post; + } + return acc; +} +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/brace-expansion/dist/commonjs/index.js.map b/node_modules/brace-expansion/dist/commonjs/index.js.map new file mode 100644 index 00000000..658bba38 --- /dev/null +++ b/node_modules/brace-expansion/dist/commonjs/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AA2FA,wBAkBC;AA7GD,mDAAyC;AAEzC,MAAM,QAAQ,GAAG,SAAS,GAAG,IAAI,CAAC,MAAM,EAAE,GAAG,IAAI,CAAA;AACjD,MAAM,OAAO,GAAG,QAAQ,GAAG,IAAI,CAAC,MAAM,EAAE,GAAG,IAAI,CAAA;AAC/C,MAAM,QAAQ,GAAG,SAAS,GAAG,IAAI,CAAC,MAAM,EAAE,GAAG,IAAI,CAAA;AACjD,MAAM,QAAQ,GAAG,SAAS,GAAG,IAAI,CAAC,MAAM,EAAE,GAAG,IAAI,CAAA;AACjD,MAAM,SAAS,GAAG,UAAU,GAAG,IAAI,CAAC,MAAM,EAAE,GAAG,IAAI,CAAA;AACnD,MAAM,eAAe,GAAG,IAAI,MAAM,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAA;AACjD,MAAM,cAAc,GAAG,IAAI,MAAM,CAAC,OAAO,EAAE,GAAG,CAAC,CAAA;AAC/C,MAAM,eAAe,GAAG,IAAI,MAAM,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAA;AACjD,MAAM,eAAe,GAAG,IAAI,MAAM,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAA;AACjD,MAAM,gBAAgB,GAAG,IAAI,MAAM,CAAC,SAAS,EAAE,GAAG,CAAC,CAAA;AACnD,MAAM,YAAY,GAAG,OAAO,CAAA;AAC5B,MAAM,WAAW,GAAG,MAAM,CAAA;AAC1B,MAAM,YAAY,GAAG,MAAM,CAAA;AAC3B,MAAM,YAAY,GAAG,MAAM,CAAA;AAC3B,MAAM,aAAa,GAAG,OAAO,CAAA;AAEhB,QAAA,aAAa,GAAG,OAAO,CAAA;AAEpC,4EAA4E;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EAAE,EAAE,CAAC;oBACzC,MAAM,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAW,CAAA;oBAC/B,IAAI,YAAY,IAAI,CAAC,CAAC;wBAAE,SAAQ;oBAChC,IAAI,MAAM,CAAC,MAAM,IAAI,GAAG,IAAI,YAAY,GAAG,CAAC,CAAC,MAAM,GAAG,SAAS,EAAE,CAAC;wBAChE,MAAM,KAAK,CAAA;oBACb,CAAC;oBACD,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;oBACd,YAAY,IAAI,CAAC,CAAC,MAAM,CAAA;gBAC1B,CAAC;YACH,CAAC;QACH,CAAC;QAED,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,SAAS,EAAE,WAAW,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;QAC9E,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM;YAAE,MAAK;QACzB,GAAG,GAAG,CAAC,CAAC,IAAI,CAAA;IACd,CAAC;IAED,OAAO,GAAG,CAAA;AACZ,CAAC","sourcesContent":["import { balanced } from 'balanced-match'\n\nconst escSlash = '\\0SLASH' + Math.random() + '\\0'\nconst escOpen = '\\0OPEN' + Math.random() + '\\0'\nconst escClose = '\\0CLOSE' + Math.random() + '\\0'\nconst escComma = '\\0COMMA' + Math.random() + '\\0'\nconst escPeriod = '\\0PERIOD' + Math.random() + '\\0'\nconst escSlashPattern = new RegExp(escSlash, 'g')\nconst escOpenPattern = new RegExp(escOpen, 'g')\nconst escClosePattern = new RegExp(escClose, 'g')\nconst escCommaPattern = new RegExp(escComma, 'g')\nconst escPeriodPattern = new RegExp(escPeriod, 'g')\nconst slashPattern = /\\\\\\\\/g\nconst openPattern = /\\\\{/g\nconst closePattern = /\\\\}/g\nconst commaPattern = /\\\\,/g\nconst periodPattern = /\\\\\\./g\n\nexport const EXPANSION_MAX = 100_000\n\n// `EXPANSION_MAX` caps the *number* of expansions, but not their length. An\n// input like `'{a,b}'.repeat(1500)` stays under that count - its output is\n// truncated to 100k results - while making every result ~1500 characters\n// long. The result set, and the intermediate arrays built while combining\n// brace sets, then grow large enough to exhaust memory and crash the process\n// (CVE-2026-14257). `EXPANSION_MAX_LENGTH` bounds the total number of\n// characters the accumulator may hold at any point, so memory stays flat no\n// matter how many brace groups are chained. The limit sits well above any\n// realistic expansion (100k results hitting `EXPANSION_MAX` measure ~1M\n// characters) so legitimate input is unaffected.\nexport const EXPANSION_MAX_LENGTH = 4_000_000\n\nfunction numeric(str: string) {\n return !isNaN(str as any) ? parseInt(str, 10) : str.charCodeAt(0)\n}\n\nfunction escapeBraces(str: string) {\n return str\n .replace(slashPattern, escSlash)\n .replace(openPattern, escOpen)\n .replace(closePattern, escClose)\n .replace(commaPattern, escComma)\n .replace(periodPattern, escPeriod)\n}\n\nfunction unescapeBraces(str: string) {\n return str\n .replace(escSlashPattern, '\\\\')\n .replace(escOpenPattern, '{')\n .replace(escClosePattern, '}')\n .replace(escCommaPattern, ',')\n .replace(escPeriodPattern, '.')\n}\n\n/**\n * Basically just str.split(\",\"), but handling cases\n * where we have nested braced sections, which should be\n * treated as individual members, like {a,{b,c},d}\n */\nfunction parseCommaParts(str: string) {\n if (!str) {\n return ['']\n }\n\n const parts: string[] = []\n const m = balanced('{', '}', str)\n\n if (!m) {\n return str.split(',')\n }\n\n const { pre, body, post } = m\n const p = pre.split(',')\n\n p[p.length - 1] += '{' + body + '}'\n const postParts = parseCommaParts(post)\n if (post.length) {\n ;(p[p.length - 1] as string) += postParts.shift()\n p.push.apply(p, postParts)\n }\n\n parts.push.apply(parts, p)\n\n return parts\n}\n\nexport type BraceExpansionOptions = {\n max?: number\n maxLength?: number\n}\n\nexport function expand(str: string, options: BraceExpansionOptions = {}) {\n if (!str) {\n return []\n }\n\n const { max = EXPANSION_MAX, maxLength = EXPANSION_MAX_LENGTH } = options\n\n // I don't know why Bash 4.3 does this, but it does.\n // Anything starting with {} will have the first two bytes preserved\n // but *only* at the top level, so {},a}b will not expand to anything,\n // but a{},b}c will be expanded to [a}c,abc].\n // One could argue that this is a bug in Bash, but since the goal of\n // this module is to match Bash's rules, we escape a leading {}\n if (str.slice(0, 2) === '{}') {\n str = '\\\\{\\\\}' + str.slice(2)\n }\n\n return expand_(escapeBraces(str), max, maxLength, true).map(unescapeBraces)\n}\n\nfunction embrace(str: string) {\n return '{' + str + '}'\n}\n\nfunction isPadded(el: string) {\n return /^-?0\\d/.test(el)\n}\n\nfunction lte(i: number, y: number) {\n return i <= y\n}\n\nfunction gte(i: number, y: number) {\n return i >= y\n}\n\n// Build `{ acc[a] + pre + values[v] }` for every combination, capping the\n// number of results at `max` and the total number of characters at `maxLength`.\n// This is the one place output grows, so bounding it here keeps the single\n// accumulator - and therefore memory - flat regardless of how many brace groups\n// are combined (CVE-2026-14257).\nfunction combine(\n acc: string[],\n pre: string,\n values: string[],\n max: number,\n maxLength: number,\n dropEmpties: boolean,\n): string[] {\n const out: string[] = []\n let length = 0\n for (let a = 0; a < acc.length; a++) {\n for (let v = 0; v < values.length; v++) {\n if (out.length >= max) return out\n const expansion = (acc[a] as string) + pre + values[v]\n // Bash drops empty results at the top level. Skip them before they count\n // against `max`, so `max` bounds the number of *kept* results.\n if (dropEmpties && !expansion) continue\n if (length + expansion.length > maxLength) return out\n out.push(expansion)\n length += expansion.length\n }\n }\n return out\n}\n\n// The expansion values of a single numeric (`1..5`) or alphabetic (`a..e..2`)\n// sequence body.\nfunction expandSequence(\n body: string,\n isAlphaSequence: boolean,\n max: number,\n maxLength: number,\n): string[] {\n const n = body.split(/\\.\\./)\n const N: string[] = []\n // A sequence body always splits into two or three parts, but the compiler\n // can't know that.\n /* c8 ignore start */\n if (n[0] === undefined || n[1] === undefined) {\n return N\n }\n /* c8 ignore stop */\n const x = numeric(n[0])\n const y = numeric(n[1])\n const width = Math.max(n[0].length, n[1].length)\n let incr =\n n.length === 3 && n[2] !== undefined ?\n Math.max(Math.abs(numeric(n[2])), 1)\n : 1\n let test = lte\n const reverse = y < x\n if (reverse) {\n incr *= -1\n test = gte\n }\n const pad = n.some(isPadded)\n\n let length = 0\n for (let i = x; test(i, y) && N.length < max; i += incr) {\n let c\n if (isAlphaSequence) {\n c = String.fromCharCode(i)\n if (c === '\\\\') {\n c = ''\n }\n } else {\n c = String(i)\n if (pad) {\n const need = width - c.length\n if (need > 0) {\n const z = new Array(need + 1).join('0')\n if (i < 0) {\n c = '-' + z + c.slice(1)\n } else {\n c = z + c\n }\n }\n }\n }\n if (length + c.length > maxLength) break\n N.push(c)\n length += c.length\n }\n return N\n}\n\nfunction expand_(\n str: string,\n max: number,\n maxLength: number,\n isTop: boolean,\n): string[] {\n // Consume the string's top-level brace groups left to right, threading a\n // running set of combined prefixes (`acc`). Expanding the tail iteratively -\n // rather than recursing on `m.post` once per group - keeps the native stack\n // depth constant, so deeply chained input (`'{a,b}'.repeat(3000)`) can no\n // longer overflow the stack, and leaves a single accumulator whose size\n // `maxLength` bounds directly (CVE-2026-14257).\n let acc: string[] = ['']\n\n // Bash drops empty results, but only when the *first* top-level group is a\n // comma set - a sequence like `{a..\\}` may legitimately yield ''. The drop\n // is on the final strings, so it is applied to whichever `combine` produces\n // them (the one with no brace set left in the tail).\n let dropEmpties = false\n let firstGroup = true\n\n for (;;) {\n const m = balanced('{', '}', str)\n\n // No brace set left: the rest of the string is literal.\n if (!m) {\n return combine(acc, str, [''], max, maxLength, dropEmpties)\n }\n\n // no need to expand pre, since it is guaranteed to be free of brace-sets\n const pre = m.pre\n\n if (/\\$$/.test(pre)) {\n acc = combine(\n acc,\n pre + '{' + m.body + '}',\n [''],\n max,\n maxLength,\n dropEmpties && !m.post.length,\n )\n firstGroup = false\n if (!m.post.length) break\n str = m.post\n continue\n }\n\n const isNumericSequence = /^-?\\d+\\.\\.-?\\d+(?:\\.\\.-?\\d+)?$/.test(m.body)\n const isAlphaSequence = /^[a-zA-Z]\\.\\.[a-zA-Z](?:\\.\\.-?\\d+)?$/.test(\n m.body,\n )\n const isSequence = isNumericSequence || isAlphaSequence\n const isOptions = m.body.indexOf(',') >= 0\n if (!isSequence && !isOptions) {\n // {a},b}\n if (m.post.match(/,(?!,).*\\}/)) {\n str = m.pre + '{' + m.body + escClose + m.post\n isTop = true\n continue\n }\n // Nothing here expands, so the whole remaining string is literal.\n return combine(\n acc,\n pre + '{' + m.body + '}' + m.post,\n [''],\n max,\n maxLength,\n dropEmpties,\n )\n }\n\n if (firstGroup) {\n dropEmpties = isTop && !isSequence\n firstGroup = false\n }\n\n let values: string[]\n if (isSequence) {\n values = expandSequence(m.body, isAlphaSequence, max, maxLength)\n } else {\n let n = parseCommaParts(m.body)\n if (n.length === 1 && n[0] !== undefined) {\n // x{{a,b}}y ==> x{a}y x{b}y\n n = expand_(n[0], max, maxLength, false).map(embrace)\n //XXX is this necessary? Can't seem to hit it in tests.\n /* c8 ignore start */\n if (n.length === 1) {\n acc = combine(\n acc,\n pre + n[0],\n [''],\n max,\n maxLength,\n dropEmpties && !m.post.length,\n )\n if (!m.post.length) break\n str = m.post\n continue\n }\n /* c8 ignore stop */\n }\n\n // Values that `combine` is going to drop as empty produce no result, so\n // they must not count against `max` - otherwise `{a,,b}` with `max: 2`\n // would stop at `['a', '']` and yield one result instead of two. Skipping\n // them outright keeps `values` bounded while leaving `max` a bound on\n // *kept* results.\n let dropsEmpties = dropEmpties && !m.post.length && !pre\n for (let d = 0; dropsEmpties && d < acc.length; d++) {\n if (acc[d]) {\n dropsEmpties = false\n }\n }\n\n values = []\n let valuesLength = 0\n outer: for (let j = 0; j < n.length; j++) {\n const expanded = expand_(n[j] as string, max, maxLength, false)\n for (let k = 0; k < expanded.length; k++) {\n const v = expanded[k] as string\n if (dropsEmpties && !v) continue\n if (values.length >= max || valuesLength + v.length > maxLength) {\n break outer\n }\n values.push(v)\n valuesLength += v.length\n }\n }\n }\n\n acc = combine(acc, pre, values, max, maxLength, dropEmpties && !m.post.length)\n if (!m.post.length) break\n str = m.post\n }\n\n return acc\n}\n"]} \ No newline at end of file diff --git a/node_modules/@isaacs/brace-expansion/dist/commonjs/package.json b/node_modules/brace-expansion/dist/commonjs/package.json similarity index 100% rename from node_modules/@isaacs/brace-expansion/dist/commonjs/package.json rename to node_modules/brace-expansion/dist/commonjs/package.json diff --git a/node_modules/@isaacs/brace-expansion/dist/esm/index.d.ts b/node_modules/brace-expansion/dist/esm/index.d.ts similarity index 74% rename from node_modules/@isaacs/brace-expansion/dist/esm/index.d.ts rename to node_modules/brace-expansion/dist/esm/index.d.ts index 92b7a7f0..f3e2de9d 100644 --- a/node_modules/@isaacs/brace-expansion/dist/esm/index.d.ts +++ b/node_modules/brace-expansion/dist/esm/index.d.ts @@ -1,6 +1,8 @@ export declare const EXPANSION_MAX = 100000; +export declare const EXPANSION_MAX_LENGTH = 4000000; export type BraceExpansionOptions = { max?: number; + maxLength?: number; }; export declare function expand(str: string, options?: BraceExpansionOptions): string[]; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/brace-expansion/dist/esm/index.d.ts.map b/node_modules/brace-expansion/dist/esm/index.d.ts.map new file mode 100644 index 00000000..c0ff8dc1 --- /dev/null +++ b/node_modules/brace-expansion/dist/esm/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAkBA,eAAO,MAAM,aAAa,SAAU,CAAA;AAYpC,eAAO,MAAM,oBAAoB,UAAY,CAAA;AAwD7C,MAAM,MAAM,qBAAqB,GAAG;IAClC,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,wBAAgB,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,GAAE,qBAA0B,YAkBtE"} \ No newline at end of file diff --git a/node_modules/brace-expansion/dist/esm/index.js b/node_modules/brace-expansion/dist/esm/index.js new file mode 100644 index 00000000..fd68f570 --- /dev/null +++ b/node_modules/brace-expansion/dist/esm/index.js @@ -0,0 +1,285 @@ +import { balanced } from 'balanced-match'; +const escSlash = '\0SLASH' + Math.random() + '\0'; +const escOpen = '\0OPEN' + Math.random() + '\0'; +const escClose = '\0CLOSE' + Math.random() + '\0'; +const escComma = '\0COMMA' + Math.random() + '\0'; +const escPeriod = '\0PERIOD' + Math.random() + '\0'; +const escSlashPattern = new RegExp(escSlash, 'g'); +const escOpenPattern = new RegExp(escOpen, 'g'); +const escClosePattern = new RegExp(escClose, 'g'); +const escCommaPattern = new RegExp(escComma, 'g'); +const escPeriodPattern = new RegExp(escPeriod, 'g'); +const slashPattern = /\\\\/g; +const openPattern = /\\{/g; +const closePattern = /\\}/g; +const commaPattern = /\\,/g; +const periodPattern = /\\\./g; +export const EXPANSION_MAX = 100_000; +// `EXPANSION_MAX` caps the *number* of expansions, but not their length. An +// input like `'{a,b}'.repeat(1500)` stays under that count - its output is +// truncated to 100k results - while making every result ~1500 characters +// long. The result set, and the intermediate arrays built while combining +// brace sets, then grow large enough to exhaust memory and crash the process +// (CVE-2026-14257). `EXPANSION_MAX_LENGTH` bounds the total number of +// characters the accumulator may hold at any point, so memory stays flat no +// matter how many brace groups are chained. The limit sits well above any +// realistic expansion (100k results hitting `EXPANSION_MAX` measure ~1M +// characters) so legitimate input is unaffected. +export const EXPANSION_MAX_LENGTH = 4_000_000; +function numeric(str) { + return !isNaN(str) ? parseInt(str, 10) : str.charCodeAt(0); +} +function escapeBraces(str) { + return str + .replace(slashPattern, escSlash) + .replace(openPattern, escOpen) + .replace(closePattern, escClose) + .replace(commaPattern, escComma) + .replace(periodPattern, escPeriod); +} +function unescapeBraces(str) { + return str + .replace(escSlashPattern, '\\') + .replace(escOpenPattern, '{') + .replace(escClosePattern, '}') + .replace(escCommaPattern, ',') + .replace(escPeriodPattern, '.'); +} +/** + * Basically just str.split(","), but handling cases + * where we have nested braced sections, which should be + * treated as individual members, like {a,{b,c},d} + */ +function parseCommaParts(str) { + if (!str) { + return ['']; + } + const parts = []; + const m = balanced('{', '}', str); + if (!m) { + return str.split(','); + } + const { pre, body, post } = m; + const p = pre.split(','); + p[p.length - 1] += '{' + body + '}'; + const postParts = parseCommaParts(post); + if (post.length) { + ; + p[p.length - 1] += postParts.shift(); + p.push.apply(p, postParts); + } + parts.push.apply(parts, p); + return parts; +} +export function expand(str, options = {}) { + if (!str) { + return []; + } + const { max = EXPANSION_MAX, maxLength = EXPANSION_MAX_LENGTH } = options; + // I don't know why Bash 4.3 does this, but it does. + // Anything starting with {} will have the first two bytes preserved + // but *only* at the top level, so {},a}b will not expand to anything, + // but a{},b}c will be expanded to [a}c,abc]. + // One could argue that this is a bug in Bash, but since the goal of + // this module is to match Bash's rules, we escape a leading {} + if (str.slice(0, 2) === '{}') { + str = '\\{\\}' + str.slice(2); + } + return expand_(escapeBraces(str), max, maxLength, true).map(unescapeBraces); +} +function embrace(str) { + return '{' + str + '}'; +} +function isPadded(el) { + return /^-?0\d/.test(el); +} +function lte(i, y) { + return i <= y; +} +function gte(i, y) { + return i >= y; +} +// Build `{ acc[a] + pre + values[v] }` for every combination, capping the +// number of results at `max` and the total number of characters at `maxLength`. +// This is the one place output grows, so bounding it here keeps the single +// accumulator - and therefore memory - flat regardless of how many brace groups +// are combined (CVE-2026-14257). +function combine(acc, pre, values, max, maxLength, dropEmpties) { + const out = []; + let length = 0; + for (let a = 0; a < acc.length; a++) { + for (let v = 0; v < values.length; v++) { + if (out.length >= max) + return out; + const expansion = acc[a] + pre + values[v]; + // Bash drops empty results at the top level. Skip them before they count + // against `max`, so `max` bounds the number of *kept* results. + if (dropEmpties && !expansion) + continue; + if (length + expansion.length > maxLength) + return out; + out.push(expansion); + length += expansion.length; + } + } + return out; +} +// The expansion values of a single numeric (`1..5`) or alphabetic (`a..e..2`) +// sequence body. +function expandSequence(body, isAlphaSequence, max, maxLength) { + const n = body.split(/\.\./); + const N = []; + // A sequence body always splits into two or three parts, but the compiler + // can't know that. + /* c8 ignore start */ + if (n[0] === undefined || n[1] === undefined) { + return N; + } + /* c8 ignore stop */ + const x = numeric(n[0]); + const y = numeric(n[1]); + const width = Math.max(n[0].length, n[1].length); + let incr = n.length === 3 && n[2] !== undefined ? + Math.max(Math.abs(numeric(n[2])), 1) + : 1; + let test = lte; + const reverse = y < x; + if (reverse) { + incr *= -1; + test = gte; + } + const pad = n.some(isPadded); + let length = 0; + for (let i = x; test(i, y) && N.length < max; i += incr) { + let c; + if (isAlphaSequence) { + c = String.fromCharCode(i); + if (c === '\\') { + c = ''; + } + } + else { + c = String(i); + if (pad) { + const need = width - c.length; + if (need > 0) { + const z = new Array(need + 1).join('0'); + if (i < 0) { + c = '-' + z + c.slice(1); + } + else { + c = z + c; + } + } + } + } + if (length + c.length > maxLength) + break; + N.push(c); + length += c.length; + } + return N; +} +function expand_(str, max, maxLength, isTop) { + // Consume the string's top-level brace groups left to right, threading a + // running set of combined prefixes (`acc`). Expanding the tail iteratively - + // rather than recursing on `m.post` once per group - keeps the native stack + // depth constant, so deeply chained input (`'{a,b}'.repeat(3000)`) can no + // longer overflow the stack, and leaves a single accumulator whose size + // `maxLength` bounds directly (CVE-2026-14257). + let acc = ['']; + // Bash drops empty results, but only when the *first* top-level group is a + // comma set - a sequence like `{a..\}` may legitimately yield ''. The drop + // is on the final strings, so it is applied to whichever `combine` produces + // them (the one with no brace set left in the tail). + let dropEmpties = false; + let firstGroup = true; + for (;;) { + const m = balanced('{', '}', str); + // No brace set left: the rest of the string is literal. + if (!m) { + return combine(acc, str, [''], max, maxLength, dropEmpties); + } + // no need to expand pre, since it is guaranteed to be free of brace-sets + const pre = m.pre; + if (/\$$/.test(pre)) { + acc = combine(acc, pre + '{' + m.body + '}', [''], max, maxLength, dropEmpties && !m.post.length); + firstGroup = false; + if (!m.post.length) + break; + str = m.post; + continue; + } + const isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); + const isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); + const isSequence = isNumericSequence || isAlphaSequence; + const isOptions = m.body.indexOf(',') >= 0; + if (!isSequence && !isOptions) { + // {a},b} + if (m.post.match(/,(?!,).*\}/)) { + str = m.pre + '{' + m.body + escClose + m.post; + isTop = true; + continue; + } + // Nothing here expands, so the whole remaining string is literal. + return combine(acc, pre + '{' + m.body + '}' + m.post, [''], max, maxLength, dropEmpties); + } + if (firstGroup) { + dropEmpties = isTop && !isSequence; + firstGroup = false; + } + let values; + if (isSequence) { + values = expandSequence(m.body, isAlphaSequence, max, maxLength); + } + else { + let n = parseCommaParts(m.body); + if (n.length === 1 && n[0] !== undefined) { + // x{{a,b}}y ==> x{a}y x{b}y + n = expand_(n[0], max, maxLength, false).map(embrace); + //XXX is this necessary? Can't seem to hit it in tests. + /* c8 ignore start */ + if (n.length === 1) { + acc = combine(acc, pre + n[0], [''], max, maxLength, dropEmpties && !m.post.length); + if (!m.post.length) + break; + str = m.post; + continue; + } + /* c8 ignore stop */ + } + // Values that `combine` is going to drop as empty produce no result, so + // they must not count against `max` - otherwise `{a,,b}` with `max: 2` + // would stop at `['a', '']` and yield one result instead of two. Skipping + // them outright keeps `values` bounded while leaving `max` a bound on + // *kept* results. + let dropsEmpties = dropEmpties && !m.post.length && !pre; + for (let d = 0; dropsEmpties && d < acc.length; d++) { + if (acc[d]) { + dropsEmpties = false; + } + } + values = []; + let valuesLength = 0; + outer: for (let j = 0; j < n.length; j++) { + const expanded = expand_(n[j], max, maxLength, false); + for (let k = 0; k < expanded.length; k++) { + const v = expanded[k]; + if (dropsEmpties && !v) + continue; + if (values.length >= max || valuesLength + v.length > maxLength) { + break outer; + } + values.push(v); + valuesLength += v.length; + } + } + } + acc = combine(acc, pre, values, max, maxLength, dropEmpties && !m.post.length); + if (!m.post.length) + break; + str = m.post; + } + return acc; +} +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/brace-expansion/dist/esm/index.js.map b/node_modules/brace-expansion/dist/esm/index.js.map new file mode 100644 index 00000000..17b5e434 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AAQ,CAAC,CAAC,CAAW,CAAA;oBAC/B,IAAI,YAAY,IAAI,CAAC,CAAC;wBAAE,SAAQ;oBAChC,IAAI,MAAM,CAAC,MAAM,IAAI,GAAG,IAAI,YAAY,GAAG,CAAC,CAAC,MAAM,GAAG,SAAS,EAAE,CAAC;wBAChE,MAAM,KAAK,CAAA;oBACb,CAAC;oBACD,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;oBACd,YAAY,IAAI,CAAC,CAAC,MAAM,CAAA;gBAC1B,CAAC;YACH,CAAC;QACH,CAAC;QAED,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,SAAS,EAAE,WAAW,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;QAC9E,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM;YAAE,MAAK;QACzB,GAAG,GAAG,CAAC,CAAC,IAAI,CAAA;IACd,CAAC;IAED,OAAO,GAAG,CAAA;AACZ,CAAC","sourcesContent":["import { balanced } from 'balanced-match'\n\nconst escSlash = '\\0SLASH' + Math.random() + '\\0'\nconst escOpen = '\\0OPEN' + Math.random() + '\\0'\nconst escClose = '\\0CLOSE' + Math.random() + '\\0'\nconst escComma = '\\0COMMA' + Math.random() + '\\0'\nconst escPeriod = '\\0PERIOD' + Math.random() + '\\0'\nconst escSlashPattern = new RegExp(escSlash, 'g')\nconst escOpenPattern = new RegExp(escOpen, 'g')\nconst escClosePattern = new RegExp(escClose, 'g')\nconst escCommaPattern = new RegExp(escComma, 'g')\nconst escPeriodPattern = new RegExp(escPeriod, 'g')\nconst slashPattern = /\\\\\\\\/g\nconst openPattern = /\\\\{/g\nconst closePattern = /\\\\}/g\nconst commaPattern = /\\\\,/g\nconst periodPattern = /\\\\\\./g\n\nexport const EXPANSION_MAX = 100_000\n\n// `EXPANSION_MAX` caps the *number* of expansions, but not their length. An\n// input like `'{a,b}'.repeat(1500)` stays under that count - its output is\n// truncated to 100k results - while making every result ~1500 characters\n// long. The result set, and the intermediate arrays built while combining\n// brace sets, then grow large enough to exhaust memory and crash the process\n// (CVE-2026-14257). `EXPANSION_MAX_LENGTH` bounds the total number of\n// characters the accumulator may hold at any point, so memory stays flat no\n// matter how many brace groups are chained. The limit sits well above any\n// realistic expansion (100k results hitting `EXPANSION_MAX` measure ~1M\n// characters) so legitimate input is unaffected.\nexport const EXPANSION_MAX_LENGTH = 4_000_000\n\nfunction numeric(str: string) {\n return !isNaN(str as any) ? parseInt(str, 10) : str.charCodeAt(0)\n}\n\nfunction escapeBraces(str: string) {\n return str\n .replace(slashPattern, escSlash)\n .replace(openPattern, escOpen)\n .replace(closePattern, escClose)\n .replace(commaPattern, escComma)\n .replace(periodPattern, escPeriod)\n}\n\nfunction unescapeBraces(str: string) {\n return str\n .replace(escSlashPattern, '\\\\')\n .replace(escOpenPattern, '{')\n .replace(escClosePattern, '}')\n .replace(escCommaPattern, ',')\n .replace(escPeriodPattern, '.')\n}\n\n/**\n * Basically just str.split(\",\"), but handling cases\n * where we have nested braced sections, which should be\n * treated as individual members, like {a,{b,c},d}\n */\nfunction parseCommaParts(str: string) {\n if (!str) {\n return ['']\n }\n\n const parts: string[] = []\n const m = balanced('{', '}', str)\n\n if (!m) {\n return str.split(',')\n }\n\n const { pre, body, post } = m\n const p = pre.split(',')\n\n p[p.length - 1] += '{' + body + '}'\n const postParts = parseCommaParts(post)\n if (post.length) {\n ;(p[p.length - 1] as string) += postParts.shift()\n p.push.apply(p, postParts)\n }\n\n parts.push.apply(parts, p)\n\n return parts\n}\n\nexport type BraceExpansionOptions = {\n max?: number\n maxLength?: number\n}\n\nexport function expand(str: string, options: BraceExpansionOptions = {}) {\n if (!str) {\n return []\n }\n\n const { max = EXPANSION_MAX, maxLength = EXPANSION_MAX_LENGTH } = options\n\n // I don't know why Bash 4.3 does this, but it does.\n // Anything starting with {} will have the first two bytes preserved\n // but *only* at the top level, so {},a}b will not expand to anything,\n // but a{},b}c will be expanded to [a}c,abc].\n // One could argue that this is a bug in Bash, but since the goal of\n // this module is to match Bash's rules, we escape a leading {}\n if (str.slice(0, 2) === '{}') {\n str = '\\\\{\\\\}' + str.slice(2)\n }\n\n return expand_(escapeBraces(str), max, maxLength, true).map(unescapeBraces)\n}\n\nfunction embrace(str: string) {\n return '{' + str + '}'\n}\n\nfunction isPadded(el: string) {\n return /^-?0\\d/.test(el)\n}\n\nfunction lte(i: number, y: number) {\n return i <= y\n}\n\nfunction gte(i: number, y: number) {\n return i >= y\n}\n\n// Build `{ acc[a] + pre + values[v] }` for every combination, capping the\n// number of results at `max` and the total number of characters at `maxLength`.\n// This is the one place output grows, so bounding it here keeps the single\n// accumulator - and therefore memory - flat regardless of how many brace groups\n// are combined (CVE-2026-14257).\nfunction combine(\n acc: string[],\n pre: string,\n values: string[],\n max: number,\n maxLength: number,\n dropEmpties: boolean,\n): string[] {\n const out: string[] = []\n let length = 0\n for (let a = 0; a < acc.length; a++) {\n for (let v = 0; v < values.length; v++) {\n if (out.length >= max) return out\n const expansion = (acc[a] as string) + pre + values[v]\n // Bash drops empty results at the top level. Skip them before they count\n // against `max`, so `max` bounds the number of *kept* results.\n if (dropEmpties && !expansion) continue\n if (length + expansion.length > maxLength) return out\n out.push(expansion)\n length += expansion.length\n }\n }\n return out\n}\n\n// The expansion values of a single numeric (`1..5`) or alphabetic (`a..e..2`)\n// sequence body.\nfunction expandSequence(\n body: string,\n isAlphaSequence: boolean,\n max: number,\n maxLength: number,\n): string[] {\n const n = body.split(/\\.\\./)\n const N: string[] = []\n // A sequence body always splits into two or three parts, but the compiler\n // can't know that.\n /* c8 ignore start */\n if (n[0] === undefined || n[1] === undefined) {\n return N\n }\n /* c8 ignore stop */\n const x = numeric(n[0])\n const y = numeric(n[1])\n const width = Math.max(n[0].length, n[1].length)\n let incr =\n n.length === 3 && n[2] !== undefined ?\n Math.max(Math.abs(numeric(n[2])), 1)\n : 1\n let test = lte\n const reverse = y < x\n if (reverse) {\n incr *= -1\n test = gte\n }\n const pad = n.some(isPadded)\n\n let length = 0\n for (let i = x; test(i, y) && N.length < max; i += incr) {\n let c\n if (isAlphaSequence) {\n c = String.fromCharCode(i)\n if (c === '\\\\') {\n c = ''\n }\n } else {\n c = String(i)\n if (pad) {\n const need = width - c.length\n if (need > 0) {\n const z = new Array(need + 1).join('0')\n if (i < 0) {\n c = '-' + z + c.slice(1)\n } else {\n c = z + c\n }\n }\n }\n }\n if (length + c.length > maxLength) break\n N.push(c)\n length += c.length\n }\n return N\n}\n\nfunction expand_(\n str: string,\n max: number,\n maxLength: number,\n isTop: boolean,\n): string[] {\n // Consume the string's top-level brace groups left to right, threading a\n // running set of combined prefixes (`acc`). Expanding the tail iteratively -\n // rather than recursing on `m.post` once per group - keeps the native stack\n // depth constant, so deeply chained input (`'{a,b}'.repeat(3000)`) can no\n // longer overflow the stack, and leaves a single accumulator whose size\n // `maxLength` bounds directly (CVE-2026-14257).\n let acc: string[] = ['']\n\n // Bash drops empty results, but only when the *first* top-level group is a\n // comma set - a sequence like `{a..\\}` may legitimately yield ''. The drop\n // is on the final strings, so it is applied to whichever `combine` produces\n // them (the one with no brace set left in the tail).\n let dropEmpties = false\n let firstGroup = true\n\n for (;;) {\n const m = balanced('{', '}', str)\n\n // No brace set left: the rest of the string is literal.\n if (!m) {\n return combine(acc, str, [''], max, maxLength, dropEmpties)\n }\n\n // no need to expand pre, since it is guaranteed to be free of brace-sets\n const pre = m.pre\n\n if (/\\$$/.test(pre)) {\n acc = combine(\n acc,\n pre + '{' + m.body + '}',\n [''],\n max,\n maxLength,\n dropEmpties && !m.post.length,\n )\n firstGroup = false\n if (!m.post.length) break\n str = m.post\n continue\n }\n\n const isNumericSequence = /^-?\\d+\\.\\.-?\\d+(?:\\.\\.-?\\d+)?$/.test(m.body)\n const isAlphaSequence = /^[a-zA-Z]\\.\\.[a-zA-Z](?:\\.\\.-?\\d+)?$/.test(\n m.body,\n )\n const isSequence = isNumericSequence || isAlphaSequence\n const isOptions = m.body.indexOf(',') >= 0\n if (!isSequence && !isOptions) {\n // {a},b}\n if (m.post.match(/,(?!,).*\\}/)) {\n str = m.pre + '{' + m.body + escClose + m.post\n isTop = true\n continue\n }\n // Nothing here expands, so the whole remaining string is literal.\n return combine(\n acc,\n pre + '{' + m.body + '}' + m.post,\n [''],\n max,\n maxLength,\n dropEmpties,\n )\n }\n\n if (firstGroup) {\n dropEmpties = isTop && !isSequence\n firstGroup = false\n }\n\n let values: string[]\n if (isSequence) {\n values = expandSequence(m.body, isAlphaSequence, max, maxLength)\n } else {\n let n = parseCommaParts(m.body)\n if (n.length === 1 && n[0] !== undefined) {\n // x{{a,b}}y ==> x{a}y x{b}y\n n = expand_(n[0], max, maxLength, false).map(embrace)\n //XXX is this necessary? Can't seem to hit it in tests.\n /* c8 ignore start */\n if (n.length === 1) {\n acc = combine(\n acc,\n pre + n[0],\n [''],\n max,\n maxLength,\n dropEmpties && !m.post.length,\n )\n if (!m.post.length) break\n str = m.post\n continue\n }\n /* c8 ignore stop */\n }\n\n // Values that `combine` is going to drop as empty produce no result, so\n // they must not count against `max` - otherwise `{a,,b}` with `max: 2`\n // would stop at `['a', '']` and yield one result instead of two. Skipping\n // them outright keeps `values` bounded while leaving `max` a bound on\n // *kept* results.\n let dropsEmpties = dropEmpties && !m.post.length && !pre\n for (let d = 0; dropsEmpties && d < acc.length; d++) {\n if (acc[d]) {\n dropsEmpties = false\n }\n }\n\n values = []\n let valuesLength = 0\n outer: for (let j = 0; j < n.length; j++) {\n const expanded = expand_(n[j] as string, max, maxLength, false)\n for (let k = 0; k < expanded.length; k++) {\n const v = expanded[k] as string\n if (dropsEmpties && !v) continue\n if (values.length >= max || valuesLength + v.length > maxLength) {\n break outer\n }\n values.push(v)\n valuesLength += v.length\n }\n }\n }\n\n acc = combine(acc, pre, values, max, maxLength, dropEmpties && !m.post.length)\n if (!m.post.length) break\n str = m.post\n }\n\n return acc\n}\n"]} \ No newline at end of file diff --git a/node_modules/@isaacs/brace-expansion/dist/esm/package.json b/node_modules/brace-expansion/dist/esm/package.json similarity index 100% rename from node_modules/@isaacs/brace-expansion/dist/esm/package.json rename to node_modules/brace-expansion/dist/esm/package.json diff --git a/node_modules/brace-expansion/index.js b/node_modules/brace-expansion/index.js deleted file mode 100644 index 4af9ddee..00000000 --- a/node_modules/brace-expansion/index.js +++ /dev/null @@ -1,203 +0,0 @@ -var balanced = require('balanced-match'); - -module.exports = expandTop; - -var escSlash = '\0SLASH'+Math.random()+'\0'; -var escOpen = '\0OPEN'+Math.random()+'\0'; -var escClose = '\0CLOSE'+Math.random()+'\0'; -var escComma = '\0COMMA'+Math.random()+'\0'; -var escPeriod = '\0PERIOD'+Math.random()+'\0'; - -function numeric(str) { - return parseInt(str, 10) == str - ? parseInt(str, 10) - : str.charCodeAt(0); -} - -function escapeBraces(str) { - return str.split('\\\\').join(escSlash) - .split('\\{').join(escOpen) - .split('\\}').join(escClose) - .split('\\,').join(escComma) - .split('\\.').join(escPeriod); -} - -function unescapeBraces(str) { - return str.split(escSlash).join('\\') - .split(escOpen).join('{') - .split(escClose).join('}') - .split(escComma).join(',') - .split(escPeriod).join('.'); -} - - -// Basically just str.split(","), but handling cases -// where we have nested braced sections, which should be -// treated as individual members, like {a,{b,c},d} -function parseCommaParts(str) { - if (!str) - return ['']; - - var parts = []; - var m = balanced('{', '}', str); - - if (!m) - return str.split(','); - - var pre = m.pre; - var body = m.body; - var post = m.post; - var p = pre.split(','); - - p[p.length-1] += '{' + body + '}'; - var postParts = parseCommaParts(post); - if (post.length) { - p[p.length-1] += postParts.shift(); - p.push.apply(p, postParts); - } - - parts.push.apply(parts, p); - - return parts; -} - -function expandTop(str) { - if (!str) - return []; - - // I don't know why Bash 4.3 does this, but it does. - // Anything starting with {} will have the first two bytes preserved - // but *only* at the top level, so {},a}b will not expand to anything, - // but a{},b}c will be expanded to [a}c,abc]. - // One could argue that this is a bug in Bash, but since the goal of - // this module is to match Bash's rules, we escape a leading {} - if (str.substr(0, 2) === '{}') { - str = '\\{\\}' + str.substr(2); - } - - return expand(escapeBraces(str), true).map(unescapeBraces); -} - -function embrace(str) { - return '{' + str + '}'; -} -function isPadded(el) { - return /^-?0\d/.test(el); -} - -function lte(i, y) { - return i <= y; -} -function gte(i, y) { - return i >= y; -} - -function expand(str, isTop) { - var expansions = []; - - var m = balanced('{', '}', str); - if (!m) return [str]; - - // no need to expand pre, since it is guaranteed to be free of brace-sets - var pre = m.pre; - var post = m.post.length - ? expand(m.post, false) - : ['']; - - if (/\$$/.test(m.pre)) { - for (var k = 0; k < post.length; k++) { - var expansion = pre+ '{' + m.body + '}' + post[k]; - expansions.push(expansion); - } - } else { - var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); - var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); - var isSequence = isNumericSequence || isAlphaSequence; - var isOptions = m.body.indexOf(',') >= 0; - if (!isSequence && !isOptions) { - // {a},b} - if (m.post.match(/,.*\}/)) { - str = m.pre + '{' + m.body + escClose + m.post; - return expand(str); - } - return [str]; - } - - var n; - if (isSequence) { - n = m.body.split(/\.\./); - } else { - n = parseCommaParts(m.body); - if (n.length === 1) { - // x{{a,b}}y ==> x{a}y x{b}y - n = expand(n[0], false).map(embrace); - if (n.length === 1) { - return post.map(function(p) { - return m.pre + n[0] + p; - }); - } - } - } - - // at this point, n is the parts, and we know it's not a comma set - // with a single entry. - var N; - - if (isSequence) { - var x = numeric(n[0]); - var y = numeric(n[1]); - var width = Math.max(n[0].length, n[1].length) - var incr = n.length == 3 - ? Math.abs(numeric(n[2])) - : 1; - var test = lte; - var reverse = y < x; - if (reverse) { - incr *= -1; - test = gte; - } - var pad = n.some(isPadded); - - N = []; - - for (var i = x; test(i, y); i += incr) { - var c; - if (isAlphaSequence) { - c = String.fromCharCode(i); - if (c === '\\') - c = ''; - } else { - c = String(i); - if (pad) { - var need = width - c.length; - if (need > 0) { - var z = new Array(need + 1).join('0'); - if (i < 0) - c = '-' + z + c.slice(1); - else - c = z + c; - } - } - } - N.push(c); - } - } else { - N = []; - - for (var j = 0; j < n.length; j++) { - N.push.apply(N, expand(n[j], false)); - } - } - - for (var j = 0; j < N.length; j++) { - for (var k = 0; k < post.length; k++) { - var expansion = pre + N[j] + post[k]; - if (!isTop || isSequence || expansion) - expansions.push(expansion); - } - } - } - - return expansions; -} - diff --git a/node_modules/brace-expansion/package.json b/node_modules/brace-expansion/package.json index 7097d41e..43764007 100644 --- a/node_modules/brace-expansion/package.json +++ b/node_modules/brace-expansion/package.json @@ -1,46 +1,64 @@ { "name": "brace-expansion", "description": "Brace expansion as known from sh/bash", - "version": "2.0.1", - "repository": { - "type": "git", - "url": "git://github.com/juliangruber/brace-expansion.git" + "version": "5.0.9", + "files": [ + "dist" + ], + "exports": { + "./package.json": "./package.json", + ".": { + "import": { + "types": "./dist/esm/index.d.ts", + "default": "./dist/esm/index.js" + }, + "require": { + "types": "./dist/commonjs/index.d.ts", + "default": "./dist/commonjs/index.js" + } + } }, - "homepage": "https://github.com/juliangruber/brace-expansion", - "main": "index.js", + "type": "module", "scripts": { - "test": "tape test/*.js", - "gentest": "bash test/generate.sh", - "bench": "matcha test/perf/bench.js" - }, - "dependencies": { - "balanced-match": "^1.0.0" + "preversion": "npm test", + "postversion": "npm publish", + "prepublishOnly": "git push origin --follow-tags", + "prepare": "tshy", + "pretest": "npm run prepare", + "presnap": "npm run prepare", + "test": "tap", + "snap": "tap", + "format": "prettier --write .", + "benchmark": "node benchmark/index.js", + "typedoc": "typedoc --tsconfig .tshy/esm.json ./src/*.ts" }, "devDependencies": { - "@c4312/matcha": "^1.3.1", - "tape": "^4.6.0" + "@types/brace-expansion": "^1.1.2", + "@types/node": "^25.2.1", + "mkdirp": "^3.0.1", + "prettier": "^3.3.2", + "tap": "^21.6.2", + "tshy": "^3.0.2", + "typedoc": "^0.28.5" }, - "keywords": [], - "author": { - "name": "Julian Gruber", - "email": "mail@juliangruber.com", - "url": "http://juliangruber.com" + "dependencies": { + "balanced-match": "^4.0.2" }, "license": "MIT", - "testling": { - "files": "test/*.js", - "browsers": [ - "ie/8..latest", - "firefox/20..latest", - "firefox/nightly", - "chrome/25..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2..latest" - ] + "engines": { + "node": "20 || >=22" + }, + "tshy": { + "exports": { + "./package.json": "./package.json", + ".": "./src/index.ts" + } + }, + "main": "./dist/commonjs/index.js", + "types": "./dist/commonjs/index.d.ts", + "module": "./dist/esm/index.js", + "repository": { + "type": "git", + "url": "git+https://github.com/juliangruber/brace-expansion.git" } } diff --git a/node_modules/camelcase/index.d.ts b/node_modules/camelcase/index.d.ts deleted file mode 100644 index 9db94e53..00000000 --- a/node_modules/camelcase/index.d.ts +++ /dev/null @@ -1,103 +0,0 @@ -declare namespace camelcase { - interface Options { - /** - Uppercase the first character: `foo-bar` → `FooBar`. - - @default false - */ - readonly pascalCase?: boolean; - - /** - Preserve the consecutive uppercase characters: `foo-BAR` → `FooBAR`. - - @default false - */ - readonly preserveConsecutiveUppercase?: boolean; - - /** - The locale parameter indicates the locale to be used to convert to upper/lower case according to any locale-specific case mappings. If multiple locales are given in an array, the best available locale is used. - - Setting `locale: false` ignores the platform locale and uses the [Unicode Default Case Conversion](https://unicode-org.github.io/icu/userguide/transforms/casemappings.html#simple-single-character-case-mapping) algorithm. - - Default: The host environment’s current locale. - - @example - ``` - import camelCase = require('camelcase'); - - camelCase('lorem-ipsum', {locale: 'en-US'}); - //=> 'loremIpsum' - camelCase('lorem-ipsum', {locale: 'tr-TR'}); - //=> 'loremİpsum' - camelCase('lorem-ipsum', {locale: ['en-US', 'en-GB']}); - //=> 'loremIpsum' - camelCase('lorem-ipsum', {locale: ['tr', 'TR', 'tr-TR']}); - //=> 'loremİpsum' - ``` - */ - readonly locale?: false | string | readonly string[]; - } -} - -/** -Convert a dash/dot/underscore/space separated string to camelCase or PascalCase: `foo-bar` → `fooBar`. - -Correctly handles Unicode strings. - -@param input - String to convert to camel case. - -@example -``` -import camelCase = require('camelcase'); - -camelCase('foo-bar'); -//=> 'fooBar' - -camelCase('foo_bar'); -//=> 'fooBar' - -camelCase('Foo-Bar'); -//=> 'fooBar' - -camelCase('розовый_пушистый_единорог'); -//=> 'розовыйПушистыйЕдинорог' - -camelCase('Foo-Bar', {pascalCase: true}); -//=> 'FooBar' - -camelCase('--foo.bar', {pascalCase: false}); -//=> 'fooBar' - -camelCase('Foo-BAR', {preserveConsecutiveUppercase: true}); -//=> 'fooBAR' - -camelCase('fooBAR', {pascalCase: true, preserveConsecutiveUppercase: true})); -//=> 'FooBAR' - -camelCase('foo bar'); -//=> 'fooBar' - -console.log(process.argv[3]); -//=> '--foo-bar' -camelCase(process.argv[3]); -//=> 'fooBar' - -camelCase(['foo', 'bar']); -//=> 'fooBar' - -camelCase(['__foo__', '--bar'], {pascalCase: true}); -//=> 'FooBar' - -camelCase(['foo', 'BAR'], {pascalCase: true, preserveConsecutiveUppercase: true}) -//=> 'FooBAR' - -camelCase('lorem-ipsum', {locale: 'en-US'}); -//=> 'loremIpsum' -``` -*/ -declare function camelcase( - input: string | readonly string[], - options?: camelcase.Options -): string; - -export = camelcase; diff --git a/node_modules/camelcase/index.js b/node_modules/camelcase/index.js deleted file mode 100644 index 6ff4ee85..00000000 --- a/node_modules/camelcase/index.js +++ /dev/null @@ -1,113 +0,0 @@ -'use strict'; - -const UPPERCASE = /[\p{Lu}]/u; -const LOWERCASE = /[\p{Ll}]/u; -const LEADING_CAPITAL = /^[\p{Lu}](?![\p{Lu}])/gu; -const IDENTIFIER = /([\p{Alpha}\p{N}_]|$)/u; -const SEPARATORS = /[_.\- ]+/; - -const LEADING_SEPARATORS = new RegExp('^' + SEPARATORS.source); -const SEPARATORS_AND_IDENTIFIER = new RegExp(SEPARATORS.source + IDENTIFIER.source, 'gu'); -const NUMBERS_AND_IDENTIFIER = new RegExp('\\d+' + IDENTIFIER.source, 'gu'); - -const preserveCamelCase = (string, toLowerCase, toUpperCase) => { - let isLastCharLower = false; - let isLastCharUpper = false; - let isLastLastCharUpper = false; - - for (let i = 0; i < string.length; i++) { - const character = string[i]; - - if (isLastCharLower && UPPERCASE.test(character)) { - string = string.slice(0, i) + '-' + string.slice(i); - isLastCharLower = false; - isLastLastCharUpper = isLastCharUpper; - isLastCharUpper = true; - i++; - } else if (isLastCharUpper && isLastLastCharUpper && LOWERCASE.test(character)) { - string = string.slice(0, i - 1) + '-' + string.slice(i - 1); - isLastLastCharUpper = isLastCharUpper; - isLastCharUpper = false; - isLastCharLower = true; - } else { - isLastCharLower = toLowerCase(character) === character && toUpperCase(character) !== character; - isLastLastCharUpper = isLastCharUpper; - isLastCharUpper = toUpperCase(character) === character && toLowerCase(character) !== character; - } - } - - return string; -}; - -const preserveConsecutiveUppercase = (input, toLowerCase) => { - LEADING_CAPITAL.lastIndex = 0; - - return input.replace(LEADING_CAPITAL, m1 => toLowerCase(m1)); -}; - -const postProcess = (input, toUpperCase) => { - SEPARATORS_AND_IDENTIFIER.lastIndex = 0; - NUMBERS_AND_IDENTIFIER.lastIndex = 0; - - return input.replace(SEPARATORS_AND_IDENTIFIER, (_, identifier) => toUpperCase(identifier)) - .replace(NUMBERS_AND_IDENTIFIER, m => toUpperCase(m)); -}; - -const camelCase = (input, options) => { - if (!(typeof input === 'string' || Array.isArray(input))) { - throw new TypeError('Expected the input to be `string | string[]`'); - } - - options = { - pascalCase: false, - preserveConsecutiveUppercase: false, - ...options - }; - - if (Array.isArray(input)) { - input = input.map(x => x.trim()) - .filter(x => x.length) - .join('-'); - } else { - input = input.trim(); - } - - if (input.length === 0) { - return ''; - } - - const toLowerCase = options.locale === false ? - string => string.toLowerCase() : - string => string.toLocaleLowerCase(options.locale); - const toUpperCase = options.locale === false ? - string => string.toUpperCase() : - string => string.toLocaleUpperCase(options.locale); - - if (input.length === 1) { - return options.pascalCase ? toUpperCase(input) : toLowerCase(input); - } - - const hasUpperCase = input !== toLowerCase(input); - - if (hasUpperCase) { - input = preserveCamelCase(input, toLowerCase, toUpperCase); - } - - input = input.replace(LEADING_SEPARATORS, ''); - - if (options.preserveConsecutiveUppercase) { - input = preserveConsecutiveUppercase(input, toLowerCase); - } else { - input = toLowerCase(input); - } - - if (options.pascalCase) { - input = toUpperCase(input.charAt(0)) + input.slice(1); - } - - return postProcess(input, toUpperCase); -}; - -module.exports = camelCase; -// TODO: Remove this for the next major release -module.exports.default = camelCase; diff --git a/node_modules/camelcase/license b/node_modules/camelcase/license deleted file mode 100644 index fa7ceba3..00000000 --- a/node_modules/camelcase/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (https://sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/camelcase/package.json b/node_modules/camelcase/package.json deleted file mode 100644 index c4335792..00000000 --- a/node_modules/camelcase/package.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "name": "camelcase", - "version": "6.3.0", - "description": "Convert a dash/dot/underscore/space separated string to camelCase or PascalCase: `foo-bar` → `fooBar`", - "license": "MIT", - "repository": "sindresorhus/camelcase", - "funding": "https://github.com/sponsors/sindresorhus", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "https://sindresorhus.com" - }, - "engines": { - "node": ">=10" - }, - "scripts": { - "test": "xo && ava && tsd" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "keywords": [ - "camelcase", - "camel-case", - "camel", - "case", - "dash", - "hyphen", - "dot", - "underscore", - "separator", - "string", - "text", - "convert", - "pascalcase", - "pascal-case" - ], - "devDependencies": { - "ava": "^1.4.1", - "tsd": "^0.11.0", - "xo": "^0.28.3" - } -} diff --git a/node_modules/camelcase/readme.md b/node_modules/camelcase/readme.md deleted file mode 100644 index 0ff8f9e1..00000000 --- a/node_modules/camelcase/readme.md +++ /dev/null @@ -1,144 +0,0 @@ -# camelcase - -> Convert a dash/dot/underscore/space separated string to camelCase or PascalCase: `foo-bar` → `fooBar` - -Correctly handles Unicode strings. - -If you use this on untrusted user input, don't forget to limit the length to something reasonable. - -## Install - -``` -$ npm install camelcase -``` - -*If you need to support Firefox < 78, stay on version 5 as version 6 uses regex features not available in Firefox < 78.* - -## Usage - -```js -const camelCase = require('camelcase'); - -camelCase('foo-bar'); -//=> 'fooBar' - -camelCase('foo_bar'); -//=> 'fooBar' - -camelCase('Foo-Bar'); -//=> 'fooBar' - -camelCase('розовый_пушистый_единорог'); -//=> 'розовыйПушистыйЕдинорог' - -camelCase('Foo-Bar', {pascalCase: true}); -//=> 'FooBar' - -camelCase('--foo.bar', {pascalCase: false}); -//=> 'fooBar' - -camelCase('Foo-BAR', {preserveConsecutiveUppercase: true}); -//=> 'fooBAR' - -camelCase('fooBAR', {pascalCase: true, preserveConsecutiveUppercase: true})); -//=> 'FooBAR' - -camelCase('foo bar'); -//=> 'fooBar' - -console.log(process.argv[3]); -//=> '--foo-bar' -camelCase(process.argv[3]); -//=> 'fooBar' - -camelCase(['foo', 'bar']); -//=> 'fooBar' - -camelCase(['__foo__', '--bar'], {pascalCase: true}); -//=> 'FooBar' - -camelCase(['foo', 'BAR'], {pascalCase: true, preserveConsecutiveUppercase: true}) -//=> 'FooBAR' - -camelCase('lorem-ipsum', {locale: 'en-US'}); -//=> 'loremIpsum' -``` - -## API - -### camelCase(input, options?) - -#### input - -Type: `string | string[]` - -String to convert to camel case. - -#### options - -Type: `object` - -##### pascalCase - -Type: `boolean`\ -Default: `false` - -Uppercase the first character: `foo-bar` → `FooBar` - -##### preserveConsecutiveUppercase - -Type: `boolean`\ -Default: `false` - -Preserve the consecutive uppercase characters: `foo-BAR` → `FooBAR`. - -##### locale - -Type: `false | string | string[]`\ -Default: The host environment’s current locale. - -The locale parameter indicates the locale to be used to convert to upper/lower case according to any locale-specific case mappings. If multiple locales are given in an array, the best available locale is used. - -```js -const camelCase = require('camelcase'); - -camelCase('lorem-ipsum', {locale: 'en-US'}); -//=> 'loremIpsum' - -camelCase('lorem-ipsum', {locale: 'tr-TR'}); -//=> 'loremİpsum' - -camelCase('lorem-ipsum', {locale: ['en-US', 'en-GB']}); -//=> 'loremIpsum' - -camelCase('lorem-ipsum', {locale: ['tr', 'TR', 'tr-TR']}); -//=> 'loremİpsum' -``` - -Setting `locale: false` ignores the platform locale and uses the [Unicode Default Case Conversion](https://unicode-org.github.io/icu/userguide/transforms/casemappings.html#simple-single-character-case-mapping) algorithm: - -```js -const camelCase = require('camelcase'); - -// On a platform with 'tr-TR' - -camelCase('lorem-ipsum'); -//=> 'loremİpsum' - -camelCase('lorem-ipsum', {locale: false}); -//=> 'loremIpsum' -``` - -## camelcase for enterprise - -Available as part of the Tidelift Subscription. - -The maintainers of camelcase and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-camelcase?utm_source=npm-camelcase&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) - -## Related - -- [decamelize](https://github.com/sindresorhus/decamelize) - The inverse of this module -- [uppercamelcase](https://github.com/SamVerschueren/uppercamelcase) - Like this module, but to PascalCase instead of camelCase -- [titleize](https://github.com/sindresorhus/titleize) - Capitalize every word in string -- [humanize-string](https://github.com/sindresorhus/humanize-string) - Convert a camelized/dasherized/underscored string into a humanized one -- [camelcase-keys](https://github.com/sindresorhus/camelcase-keys) - Convert object keys to camel case diff --git a/node_modules/chokidar/README.md b/node_modules/chokidar/README.md index ca3bcbb0..fce5ba04 100644 --- a/node_modules/chokidar/README.md +++ b/node_modules/chokidar/README.md @@ -1,23 +1,23 @@ # Chokidar [![Weekly downloads](https://img.shields.io/npm/dw/chokidar.svg)](https://github.com/paulmillr/chokidar) -> Minimal and efficient cross-platform file watching library +Minimal and efficient cross-platform file watching library ## Why? -There are many reasons to prefer Chokidar to raw fs.watch / fs.watchFile in 2024: +There are many reasons to prefer Chokidar to raw fs.watch / fs.watchFile in 2026: - Events are properly reported - - macOS events report filenames - - events are not reported twice - - changes are reported as add / change / unlink instead of useless `rename` + - macOS events report filenames + - events are not reported twice + - changes are reported as add / change / unlink instead of useless `rename` - Atomic writes are supported, using `atomic` option - - Some file editors use them + - Some file editors use them - Chunked writes are supported, using `awaitWriteFinish` option - - Large files are commonly written in chunks + - Large files are commonly written in chunks - File / dir filtering is supported - Symbolic links are supported - Recursive watching is always supported, instead of partial when using raw events - - Includes a way to limit recursion depth + - Includes a way to limit recursion depth Chokidar relies on the Node.js core `fs` module, but when using `fs.watch` and `fs.watchFile` for watching, it normalizes the events it @@ -32,7 +32,8 @@ Made for [Brunch](https://brunch.io/) in 2012, it is now used in [~30 million repositories](https://www.npmjs.com/browse/depended/chokidar) and has proven itself in production environments. -**Sep 2024 update:** v4 is out! It decreases dependency count from 13 to 1, removes +- **Nov 2025 update:** v5 is out. Makes package ESM-only and increases minimum node.js requirement to v20. +- **Sep 2024 update:** v4 is out! It decreases dependency count from 13 to 1, removes support for globs, adds support for ESM / Common.js modules, and bumps minimum node.js version from v8 to v14. Check out [upgrading](#upgrading). @@ -54,31 +55,31 @@ chokidar.watch('.').on('all', (event, path) => { console.log(event, path); }); - // Extended options // ---------------- // Initialize watcher. const watcher = chokidar.watch('file, dir, or array', { ignored: (path, stats) => stats?.isFile() && !path.endsWith('.js'), // only watch js files - persistent: true + persistent: true, }); // Something to use when events are received. const log = console.log.bind(console); // Add event listeners. watcher - .on('add', path => log(`File ${path} has been added`)) - .on('change', path => log(`File ${path} has been changed`)) - .on('unlink', path => log(`File ${path} has been removed`)); + .on('add', (path) => log(`File ${path} has been added`)) + .on('change', (path) => log(`File ${path} has been changed`)) + .on('unlink', (path) => log(`File ${path} has been removed`)); // More possible events. watcher - .on('addDir', path => log(`Directory ${path} has been added`)) - .on('unlinkDir', path => log(`Directory ${path} has been removed`)) - .on('error', error => log(`Watcher error: ${error}`)) + .on('addDir', (path) => log(`Directory ${path} has been added`)) + .on('unlinkDir', (path) => log(`Directory ${path} has been removed`)) + .on('error', (error) => log(`Watcher error: ${error}`)) .on('ready', () => log('Initial scan complete. Ready for changes')) - .on('raw', (event, path, details) => { // internal + .on('raw', (event, path, details) => { + // internal log('Raw event info:', event, path, details); }); @@ -133,108 +134,107 @@ chokidar.watch('file', { usePolling: false, alwaysStat: false, }); - ``` `chokidar.watch(paths, [options])` -* `paths` (string or array of strings). Paths to files, dirs to be watched -recursively. -* `options` (object) Options object as defined below: +- `paths` (string or array of strings). Paths to files, dirs to be watched + recursively. +- `options` (object) Options object as defined below: #### Persistence -* `persistent` (default: `true`). Indicates whether the process -should continue to run as long as files are being watched. +- `persistent` (default: `true`). Indicates whether the process + should continue to run as long as files are being watched. #### Path filtering -* `ignored` function, regex, or path. Defines files/paths to be ignored. -The whole relative or absolute path is tested, not just filename. If a function with two arguments -is provided, it gets called twice per path - once with a single argument (the path), second -time with two arguments (the path and the -[`fs.Stats`](https://nodejs.org/api/fs.html#fs_class_fs_stats) -object of that path). -* `ignoreInitial` (default: `false`). If set to `false` then `add`/`addDir` events are also emitted for matching paths while -instantiating the watching as chokidar discovers these file paths (before the `ready` event). -* `followSymlinks` (default: `true`). When `false`, only the -symlinks themselves will be watched for changes instead of following -the link references and bubbling events through the link's path. -* `cwd` (no default). The base directory from which watch `paths` are to be -derived. Paths emitted with events will be relative to this. +- `ignored` function, regex, or path. Defines files/paths to be ignored. + The whole relative or absolute path is tested, not just filename. If a function with two arguments + is provided, it gets called twice per path - once with a single argument (the path), second + time with two arguments (the path and the + [`fs.Stats`](https://nodejs.org/api/fs.html#fs_class_fs_stats) + object of that path). +- `ignoreInitial` (default: `false`). If set to `false` then `add`/`addDir` events are also emitted for matching paths while + instantiating the watching as chokidar discovers these file paths (before the `ready` event). +- `followSymlinks` (default: `true`). When `false`, only the + symlinks themselves will be watched for changes instead of following + the link references and bubbling events through the link's path. +- `cwd` (no default). The base directory from which watch `paths` are to be + derived. Paths emitted with events will be relative to this. #### Performance -* `usePolling` (default: `false`). -Whether to use fs.watchFile (backed by polling), or fs.watch. If polling -leads to high CPU utilization, consider setting this to `false`. It is -typically necessary to **set this to `true` to successfully watch files over -a network**, and it may be necessary to successfully watch files in other -non-standard situations. Setting to `true` explicitly on MacOS overrides the -`useFsEvents` default. You may also set the CHOKIDAR_USEPOLLING env variable -to true (1) or false (0) in order to override this option. -* _Polling-specific settings_ (effective when `usePolling: true`) - * `interval` (default: `100`). Interval of file system polling, in milliseconds. You may also +- `usePolling` (default: `false`). + Whether to use fs.watchFile (backed by polling), or fs.watch. If polling + leads to high CPU utilization, consider setting this to `false`. It is + typically necessary to **set this to `true` to successfully watch files over + a network**, and it may be necessary to successfully watch files in other + non-standard situations. Setting to `true` explicitly on MacOS overrides the + `useFsEvents` default. You may also set the CHOKIDAR_USEPOLLING env variable + to true (1) or false (0) in order to override this option. +- _Polling-specific settings_ (effective when `usePolling: true`) + - `interval` (default: `100`). Interval of file system polling, in milliseconds. You may also set the CHOKIDAR_INTERVAL env variable to override this option. - * `binaryInterval` (default: `300`). Interval of file system - polling for binary files. - ([see list of binary extensions](https://github.com/sindresorhus/binary-extensions/blob/master/binary-extensions.json)) -* `alwaysStat` (default: `false`). If relying upon the -[`fs.Stats`](https://nodejs.org/api/fs.html#fs_class_fs_stats) -object that may get passed with `add`, `addDir`, and `change` events, set -this to `true` to ensure it is provided even in cases where it wasn't -already available from the underlying watch events. -* `depth` (default: `undefined`). If set, limits how many levels of -subdirectories will be traversed. -* `awaitWriteFinish` (default: `false`). -By default, the `add` event will fire when a file first appears on disk, before -the entire file has been written. Furthermore, in some cases some `change` -events will be emitted while the file is being written. In some cases, -especially when watching for large files there will be a need to wait for the -write operation to finish before responding to a file creation or modification. -Setting `awaitWriteFinish` to `true` (or a truthy value) will poll file size, -holding its `add` and `change` events until the size does not change for a -configurable amount of time. The appropriate duration setting is heavily -dependent on the OS and hardware. For accurate detection this parameter should -be relatively high, making file watching much less responsive. -Use with caution. - * *`options.awaitWriteFinish` can be set to an object in order to adjust - timing params:* - * `awaitWriteFinish.stabilityThreshold` (default: 2000). Amount of time in - milliseconds for a file size to remain constant before emitting its event. - * `awaitWriteFinish.pollInterval` (default: 100). File size polling interval, in milliseconds. + - `binaryInterval` (default: `300`). Interval of file system + polling for binary files. + ([see list of binary extensions](https://github.com/sindresorhus/binary-extensions/blob/master/binary-extensions.json)) +- `alwaysStat` (default: `false`). If relying upon the + [`fs.Stats`](https://nodejs.org/api/fs.html#fs_class_fs_stats) + object that may get passed with `add`, `addDir`, and `change` events, set + this to `true` to ensure it is provided even in cases where it wasn't + already available from the underlying watch events. +- `depth` (default: `undefined`). If set, limits how many levels of + subdirectories will be traversed. +- `awaitWriteFinish` (default: `false`). + By default, the `add` event will fire when a file first appears on disk, before + the entire file has been written. Furthermore, in some cases some `change` + events will be emitted while the file is being written. In some cases, + especially when watching for large files there will be a need to wait for the + write operation to finish before responding to a file creation or modification. + Setting `awaitWriteFinish` to `true` (or a truthy value) will poll file size, + holding its `add` and `change` events until the size does not change for a + configurable amount of time. The appropriate duration setting is heavily + dependent on the OS and hardware. For accurate detection this parameter should + be relatively high, making file watching much less responsive. + Use with caution. + - _`options.awaitWriteFinish` can be set to an object in order to adjust + timing params:_ + - `awaitWriteFinish.stabilityThreshold` (default: 2000). Amount of time in + milliseconds for a file size to remain constant before emitting its event. + - `awaitWriteFinish.pollInterval` (default: 100). File size polling interval, in milliseconds. #### Errors -* `ignorePermissionErrors` (default: `false`). Indicates whether to watch files -that don't have read permissions if possible. If watching fails due to `EPERM` -or `EACCES` with this set to `true`, the errors will be suppressed silently. -* `atomic` (default: `true` if `useFsEvents` and `usePolling` are `false`). -Automatically filters out artifacts that occur when using editors that use -"atomic writes" instead of writing directly to the source file. If a file is -re-added within 100 ms of being deleted, Chokidar emits a `change` event -rather than `unlink` then `add`. If the default of 100 ms does not work well -for you, you can override it by setting `atomic` to a custom value, in -milliseconds. +- `ignorePermissionErrors` (default: `false`). Indicates whether to watch files + that don't have read permissions if possible. If watching fails due to `EPERM` + or `EACCES` with this set to `true`, the errors will be suppressed silently. +- `atomic` (default: `true` if `useFsEvents` and `usePolling` are `false`). + Automatically filters out artifacts that occur when using editors that use + "atomic writes" instead of writing directly to the source file. If a file is + re-added within 100 ms of being deleted, Chokidar emits a `change` event + rather than `unlink` then `add`. If the default of 100 ms does not work well + for you, you can override it by setting `atomic` to a custom value, in + milliseconds. ### Methods & Events `chokidar.watch()` produces an instance of `FSWatcher`. Methods of `FSWatcher`: -* `.add(path / paths)`: Add files, directories for tracking. -Takes an array of strings or just one string. -* `.on(event, callback)`: Listen for an FS event. -Available events: `add`, `addDir`, `change`, `unlink`, `unlinkDir`, `ready`, -`raw`, `error`. -Additionally `all` is available which gets emitted with the underlying event -name and path for every event other than `ready`, `raw`, and `error`. `raw` is internal, use it carefully. -* `.unwatch(path / paths)`: Stop watching files or directories. -Takes an array of strings or just one string. -* `.close()`: **async** Removes all listeners from watched files. Asynchronous, returns Promise. Use with `await` to ensure bugs don't happen. -* `.getWatched()`: Returns an object representing all the paths on the file -system being watched by this `FSWatcher` instance. The object's keys are all the -directories (using absolute paths unless the `cwd` option was used), and the -values are arrays of the names of the items contained in each directory. +- `.add(path / paths)`: Add files, directories for tracking. + Takes an array of strings or just one string. +- `.on(event, callback)`: Listen for an FS event. + Available events: `add`, `addDir`, `change`, `unlink`, `unlinkDir`, `ready`, + `raw`, `error`. + Additionally `all` is available which gets emitted with the underlying event + name and path for every event other than `ready`, `raw`, and `error`. `raw` is internal, use it carefully. +- `.unwatch(path / paths)`: Stop watching files or directories. + Takes an array of strings or just one string. +- `.close()`: **async** Removes all listeners from watched files. Asynchronous, returns Promise. Use with `await` to ensure bugs don't happen. +- `.getWatched()`: Returns an object representing all the paths on the file + system being watched by this `FSWatcher` instance. The object's keys are all the + directories (using absolute paths unless the `cwd` option was used), and the + values are arrays of the names of the items contained in each directory. ### CLI @@ -245,18 +245,18 @@ which allows to execute a command on each change, or get a stdio stream of chang Sometimes, Chokidar runs out of file handles, causing `EMFILE` and `ENOSP` errors: -* `bash: cannot set terminal process group (-1): Inappropriate ioctl for device bash: no job control in this shell` -* `Error: watch /home/ ENOSPC` +- `bash: cannot set terminal process group (-1): Inappropriate ioctl for device bash: no job control in this shell` +- `Error: watch /home/ ENOSPC` There are two things that can cause it. 1. Exhausted file handles for generic fs operations - - Can be solved by using [graceful-fs](https://www.npmjs.com/package/graceful-fs), - which can monkey-patch native `fs` module used by chokidar: `let fs = require('fs'); let grfs = require('graceful-fs'); grfs.gracefulify(fs);` - - Can also be solved by tuning OS: `echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p`. + - Can be solved by using [graceful-fs](https://www.npmjs.com/package/graceful-fs), + which can monkey-patch native `fs` module used by chokidar: `let fs = require('fs'); let grfs = require('graceful-fs'); grfs.gracefulify(fs);` + - Can also be solved by tuning OS: `echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p`. 2. Exhausted file handles for `fs.watch` - - Can't seem to be solved by graceful-fs or OS tuning - - It's possible to start using `usePolling: true`, which will switch backend to resource-intensive `fs.watchFile` + - Can't seem to be solved by graceful-fs or OS tuning + - It's possible to start using `usePolling: true`, which will switch backend to resource-intensive `fs.watchFile` All fsevents-related issues (`WARN optional dep failed`, `fsevents is not a constructor`) are solved by upgrading to v4+. @@ -275,7 +275,7 @@ If you've used globs before and want do replicate the functionality with v4: ```js // v3 chok.watch('**/*.js'); -chok.watch("./directory/**/*"); +chok.watch('./directory/**/*'); // v4 chok.watch('.', { @@ -291,14 +291,14 @@ const watcher = watch(await Array.fromAsync(glob('**/*.js'))); // v3 chok.unwatch('**/*.js'); // v4 -chok.unwatch(await glob('**/*.js')); +chok.unwatch(await Array.fromAsync(glob('**/*.js'))); ``` ## Also Why was chokidar named this way? What's the meaning behind it? ->Chowkidar is a transliteration of a Hindi word meaning 'watchman, gatekeeper', चौकीदार. This ultimately comes from Sanskrit _ चतुष्क_ (crossway, quadrangle, consisting-of-four). This word is also used in other languages like Urdu as (چوکیدار) which is widely used in Pakistan and India. +> Chowkidar is a transliteration of a Hindi word meaning 'watchman, gatekeeper', चौकीदार. This ultimately comes from Sanskrit _ चतुष्क_ (crossway, quadrangle, consisting-of-four). This word is also used in other languages like Urdu as (چوکیدار) which is widely used in Pakistan and India. ## License diff --git a/node_modules/chokidar/esm/handler.d.ts b/node_modules/chokidar/esm/handler.d.ts deleted file mode 100644 index ea777d00..00000000 --- a/node_modules/chokidar/esm/handler.d.ts +++ /dev/null @@ -1,90 +0,0 @@ -import type { WatchEventType, Stats, FSWatcher as NativeFsWatcher } from 'fs'; -import type { FSWatcher, WatchHelper, Throttler } from './index.js'; -import type { EntryInfo } from 'readdirp'; -export type Path = string; -export declare const STR_DATA = "data"; -export declare const STR_END = "end"; -export declare const STR_CLOSE = "close"; -export declare const EMPTY_FN: () => void; -export declare const IDENTITY_FN: (val: unknown) => unknown; -export declare const isWindows: boolean; -export declare const isMacos: boolean; -export declare const isLinux: boolean; -export declare const isFreeBSD: boolean; -export declare const isIBMi: boolean; -export declare const EVENTS: { - readonly ALL: "all"; - readonly READY: "ready"; - readonly ADD: "add"; - readonly CHANGE: "change"; - readonly ADD_DIR: "addDir"; - readonly UNLINK: "unlink"; - readonly UNLINK_DIR: "unlinkDir"; - readonly RAW: "raw"; - readonly ERROR: "error"; -}; -export type EventName = (typeof EVENTS)[keyof typeof EVENTS]; -export type FsWatchContainer = { - listeners: (path: string) => void | Set; - errHandlers: (err: unknown) => void | Set; - rawEmitters: (ev: WatchEventType, path: string, opts: unknown) => void | Set; - watcher: NativeFsWatcher; - watcherUnusable?: boolean; -}; -export interface WatchHandlers { - listener: (path: string) => void; - errHandler: (err: unknown) => void; - rawEmitter: (ev: WatchEventType, path: string, opts: unknown) => void; -} -/** - * @mixin - */ -export declare class NodeFsHandler { - fsw: FSWatcher; - _boundHandleError: (error: unknown) => void; - constructor(fsW: FSWatcher); - /** - * Watch file for changes with fs_watchFile or fs_watch. - * @param path to file or dir - * @param listener on fs change - * @returns closer for the watcher instance - */ - _watchWithNodeFs(path: string, listener: (path: string, newStats?: any) => void | Promise): (() => void) | undefined; - /** - * Watch a file and emit add event if warranted. - * @returns closer for the watcher instance - */ - _handleFile(file: Path, stats: Stats, initialAdd: boolean): (() => void) | undefined; - /** - * Handle symlinks encountered while reading a dir. - * @param entry returned by readdirp - * @param directory path of dir being read - * @param path of this item - * @param item basename of this item - * @returns true if no more processing is needed for this entry. - */ - _handleSymlink(entry: EntryInfo, directory: string, path: Path, item: string): Promise; - _handleRead(directory: string, initialAdd: boolean, wh: WatchHelper, target: Path, dir: Path, depth: number, throttler: Throttler): Promise | undefined; - /** - * Read directory to add / remove files from `@watched` list and re-read it on change. - * @param dir fs path - * @param stats - * @param initialAdd - * @param depth relative to user-supplied path - * @param target child path targeted for watch - * @param wh Common watch helpers for this path - * @param realpath - * @returns closer for the watcher instance. - */ - _handleDir(dir: string, stats: Stats, initialAdd: boolean, depth: number, target: string, wh: WatchHelper, realpath: string): Promise<(() => void) | undefined>; - /** - * Handle added file, directory, or glob pattern. - * Delegates call to _handleFile / _handleDir after checks. - * @param path to file or ir - * @param initialAdd was the file added at watch instantiation? - * @param priorWh depth relative to user-supplied path - * @param depth Child path actually targeted for watch - * @param target Child path actually targeted for watch - */ - _addToNodeFs(path: string, initialAdd: boolean, priorWh: WatchHelper | undefined, depth: number, target?: string): Promise; -} diff --git a/node_modules/chokidar/esm/handler.js b/node_modules/chokidar/esm/handler.js deleted file mode 100644 index bbda0101..00000000 --- a/node_modules/chokidar/esm/handler.js +++ /dev/null @@ -1,629 +0,0 @@ -import { watchFile, unwatchFile, watch as fs_watch } from 'fs'; -import { open, stat, lstat, realpath as fsrealpath } from 'fs/promises'; -import * as sysPath from 'path'; -import { type as osType } from 'os'; -export const STR_DATA = 'data'; -export const STR_END = 'end'; -export const STR_CLOSE = 'close'; -export const EMPTY_FN = () => { }; -export const IDENTITY_FN = (val) => val; -const pl = process.platform; -export const isWindows = pl === 'win32'; -export const isMacos = pl === 'darwin'; -export const isLinux = pl === 'linux'; -export const isFreeBSD = pl === 'freebsd'; -export const isIBMi = osType() === 'OS400'; -export const EVENTS = { - ALL: 'all', - READY: 'ready', - ADD: 'add', - CHANGE: 'change', - ADD_DIR: 'addDir', - UNLINK: 'unlink', - UNLINK_DIR: 'unlinkDir', - RAW: 'raw', - ERROR: 'error', -}; -const EV = EVENTS; -const THROTTLE_MODE_WATCH = 'watch'; -const statMethods = { lstat, stat }; -const KEY_LISTENERS = 'listeners'; -const KEY_ERR = 'errHandlers'; -const KEY_RAW = 'rawEmitters'; -const HANDLER_KEYS = [KEY_LISTENERS, KEY_ERR, KEY_RAW]; -// prettier-ignore -const binaryExtensions = new Set([ - '3dm', '3ds', '3g2', '3gp', '7z', 'a', 'aac', 'adp', 'afdesign', 'afphoto', 'afpub', 'ai', - 'aif', 'aiff', 'alz', 'ape', 'apk', 'appimage', 'ar', 'arj', 'asf', 'au', 'avi', - 'bak', 'baml', 'bh', 'bin', 'bk', 'bmp', 'btif', 'bz2', 'bzip2', - 'cab', 'caf', 'cgm', 'class', 'cmx', 'cpio', 'cr2', 'cur', 'dat', 'dcm', 'deb', 'dex', 'djvu', - 'dll', 'dmg', 'dng', 'doc', 'docm', 'docx', 'dot', 'dotm', 'dra', 'DS_Store', 'dsk', 'dts', - 'dtshd', 'dvb', 'dwg', 'dxf', - 'ecelp4800', 'ecelp7470', 'ecelp9600', 'egg', 'eol', 'eot', 'epub', 'exe', - 'f4v', 'fbs', 'fh', 'fla', 'flac', 'flatpak', 'fli', 'flv', 'fpx', 'fst', 'fvt', - 'g3', 'gh', 'gif', 'graffle', 'gz', 'gzip', - 'h261', 'h263', 'h264', 'icns', 'ico', 'ief', 'img', 'ipa', 'iso', - 'jar', 'jpeg', 'jpg', 'jpgv', 'jpm', 'jxr', 'key', 'ktx', - 'lha', 'lib', 'lvp', 'lz', 'lzh', 'lzma', 'lzo', - 'm3u', 'm4a', 'm4v', 'mar', 'mdi', 'mht', 'mid', 'midi', 'mj2', 'mka', 'mkv', 'mmr', 'mng', - 'mobi', 'mov', 'movie', 'mp3', - 'mp4', 'mp4a', 'mpeg', 'mpg', 'mpga', 'mxu', - 'nef', 'npx', 'numbers', 'nupkg', - 'o', 'odp', 'ods', 'odt', 'oga', 'ogg', 'ogv', 'otf', 'ott', - 'pages', 'pbm', 'pcx', 'pdb', 'pdf', 'pea', 'pgm', 'pic', 'png', 'pnm', 'pot', 'potm', - 'potx', 'ppa', 'ppam', - 'ppm', 'pps', 'ppsm', 'ppsx', 'ppt', 'pptm', 'pptx', 'psd', 'pya', 'pyc', 'pyo', 'pyv', - 'qt', - 'rar', 'ras', 'raw', 'resources', 'rgb', 'rip', 'rlc', 'rmf', 'rmvb', 'rpm', 'rtf', 'rz', - 's3m', 's7z', 'scpt', 'sgi', 'shar', 'snap', 'sil', 'sketch', 'slk', 'smv', 'snk', 'so', - 'stl', 'suo', 'sub', 'swf', - 'tar', 'tbz', 'tbz2', 'tga', 'tgz', 'thmx', 'tif', 'tiff', 'tlz', 'ttc', 'ttf', 'txz', - 'udf', 'uvh', 'uvi', 'uvm', 'uvp', 'uvs', 'uvu', - 'viv', 'vob', - 'war', 'wav', 'wax', 'wbmp', 'wdp', 'weba', 'webm', 'webp', 'whl', 'wim', 'wm', 'wma', - 'wmv', 'wmx', 'woff', 'woff2', 'wrm', 'wvx', - 'xbm', 'xif', 'xla', 'xlam', 'xls', 'xlsb', 'xlsm', 'xlsx', 'xlt', 'xltm', 'xltx', 'xm', - 'xmind', 'xpi', 'xpm', 'xwd', 'xz', - 'z', 'zip', 'zipx', -]); -const isBinaryPath = (filePath) => binaryExtensions.has(sysPath.extname(filePath).slice(1).toLowerCase()); -// TODO: emit errors properly. Example: EMFILE on Macos. -const foreach = (val, fn) => { - if (val instanceof Set) { - val.forEach(fn); - } - else { - fn(val); - } -}; -const addAndConvert = (main, prop, item) => { - let container = main[prop]; - if (!(container instanceof Set)) { - main[prop] = container = new Set([container]); - } - container.add(item); -}; -const clearItem = (cont) => (key) => { - const set = cont[key]; - if (set instanceof Set) { - set.clear(); - } - else { - delete cont[key]; - } -}; -const delFromSet = (main, prop, item) => { - const container = main[prop]; - if (container instanceof Set) { - container.delete(item); - } - else if (container === item) { - delete main[prop]; - } -}; -const isEmptySet = (val) => (val instanceof Set ? val.size === 0 : !val); -const FsWatchInstances = new Map(); -/** - * Instantiates the fs_watch interface - * @param path to be watched - * @param options to be passed to fs_watch - * @param listener main event handler - * @param errHandler emits info about errors - * @param emitRaw emits raw event data - * @returns {NativeFsWatcher} - */ -function createFsWatchInstance(path, options, listener, errHandler, emitRaw) { - const handleEvent = (rawEvent, evPath) => { - listener(path); - emitRaw(rawEvent, evPath, { watchedPath: path }); - // emit based on events occurring for files from a directory's watcher in - // case the file's watcher misses it (and rely on throttling to de-dupe) - if (evPath && path !== evPath) { - fsWatchBroadcast(sysPath.resolve(path, evPath), KEY_LISTENERS, sysPath.join(path, evPath)); - } - }; - try { - return fs_watch(path, { - persistent: options.persistent, - }, handleEvent); - } - catch (error) { - errHandler(error); - return undefined; - } -} -/** - * Helper for passing fs_watch event data to a collection of listeners - * @param fullPath absolute path bound to fs_watch instance - */ -const fsWatchBroadcast = (fullPath, listenerType, val1, val2, val3) => { - const cont = FsWatchInstances.get(fullPath); - if (!cont) - return; - foreach(cont[listenerType], (listener) => { - listener(val1, val2, val3); - }); -}; -/** - * Instantiates the fs_watch interface or binds listeners - * to an existing one covering the same file system entry - * @param path - * @param fullPath absolute path - * @param options to be passed to fs_watch - * @param handlers container for event listener functions - */ -const setFsWatchListener = (path, fullPath, options, handlers) => { - const { listener, errHandler, rawEmitter } = handlers; - let cont = FsWatchInstances.get(fullPath); - let watcher; - if (!options.persistent) { - watcher = createFsWatchInstance(path, options, listener, errHandler, rawEmitter); - if (!watcher) - return; - return watcher.close.bind(watcher); - } - if (cont) { - addAndConvert(cont, KEY_LISTENERS, listener); - addAndConvert(cont, KEY_ERR, errHandler); - addAndConvert(cont, KEY_RAW, rawEmitter); - } - else { - watcher = createFsWatchInstance(path, options, fsWatchBroadcast.bind(null, fullPath, KEY_LISTENERS), errHandler, // no need to use broadcast here - fsWatchBroadcast.bind(null, fullPath, KEY_RAW)); - if (!watcher) - return; - watcher.on(EV.ERROR, async (error) => { - const broadcastErr = fsWatchBroadcast.bind(null, fullPath, KEY_ERR); - if (cont) - cont.watcherUnusable = true; // documented since Node 10.4.1 - // Workaround for https://github.com/joyent/node/issues/4337 - if (isWindows && error.code === 'EPERM') { - try { - const fd = await open(path, 'r'); - await fd.close(); - broadcastErr(error); - } - catch (err) { - // do nothing - } - } - else { - broadcastErr(error); - } - }); - cont = { - listeners: listener, - errHandlers: errHandler, - rawEmitters: rawEmitter, - watcher, - }; - FsWatchInstances.set(fullPath, cont); - } - // const index = cont.listeners.indexOf(listener); - // removes this instance's listeners and closes the underlying fs_watch - // instance if there are no more listeners left - return () => { - delFromSet(cont, KEY_LISTENERS, listener); - delFromSet(cont, KEY_ERR, errHandler); - delFromSet(cont, KEY_RAW, rawEmitter); - if (isEmptySet(cont.listeners)) { - // Check to protect against issue gh-730. - // if (cont.watcherUnusable) { - cont.watcher.close(); - // } - FsWatchInstances.delete(fullPath); - HANDLER_KEYS.forEach(clearItem(cont)); - // @ts-ignore - cont.watcher = undefined; - Object.freeze(cont); - } - }; -}; -// fs_watchFile helpers -// object to hold per-process fs_watchFile instances -// (may be shared across chokidar FSWatcher instances) -const FsWatchFileInstances = new Map(); -/** - * Instantiates the fs_watchFile interface or binds listeners - * to an existing one covering the same file system entry - * @param path to be watched - * @param fullPath absolute path - * @param options options to be passed to fs_watchFile - * @param handlers container for event listener functions - * @returns closer - */ -const setFsWatchFileListener = (path, fullPath, options, handlers) => { - const { listener, rawEmitter } = handlers; - let cont = FsWatchFileInstances.get(fullPath); - // let listeners = new Set(); - // let rawEmitters = new Set(); - const copts = cont && cont.options; - if (copts && (copts.persistent < options.persistent || copts.interval > options.interval)) { - // "Upgrade" the watcher to persistence or a quicker interval. - // This creates some unlikely edge case issues if the user mixes - // settings in a very weird way, but solving for those cases - // doesn't seem worthwhile for the added complexity. - // listeners = cont.listeners; - // rawEmitters = cont.rawEmitters; - unwatchFile(fullPath); - cont = undefined; - } - if (cont) { - addAndConvert(cont, KEY_LISTENERS, listener); - addAndConvert(cont, KEY_RAW, rawEmitter); - } - else { - // TODO - // listeners.add(listener); - // rawEmitters.add(rawEmitter); - cont = { - listeners: listener, - rawEmitters: rawEmitter, - options, - watcher: watchFile(fullPath, options, (curr, prev) => { - foreach(cont.rawEmitters, (rawEmitter) => { - rawEmitter(EV.CHANGE, fullPath, { curr, prev }); - }); - const currmtime = curr.mtimeMs; - if (curr.size !== prev.size || currmtime > prev.mtimeMs || currmtime === 0) { - foreach(cont.listeners, (listener) => listener(path, curr)); - } - }), - }; - FsWatchFileInstances.set(fullPath, cont); - } - // const index = cont.listeners.indexOf(listener); - // Removes this instance's listeners and closes the underlying fs_watchFile - // instance if there are no more listeners left. - return () => { - delFromSet(cont, KEY_LISTENERS, listener); - delFromSet(cont, KEY_RAW, rawEmitter); - if (isEmptySet(cont.listeners)) { - FsWatchFileInstances.delete(fullPath); - unwatchFile(fullPath); - cont.options = cont.watcher = undefined; - Object.freeze(cont); - } - }; -}; -/** - * @mixin - */ -export class NodeFsHandler { - constructor(fsW) { - this.fsw = fsW; - this._boundHandleError = (error) => fsW._handleError(error); - } - /** - * Watch file for changes with fs_watchFile or fs_watch. - * @param path to file or dir - * @param listener on fs change - * @returns closer for the watcher instance - */ - _watchWithNodeFs(path, listener) { - const opts = this.fsw.options; - const directory = sysPath.dirname(path); - const basename = sysPath.basename(path); - const parent = this.fsw._getWatchedDir(directory); - parent.add(basename); - const absolutePath = sysPath.resolve(path); - const options = { - persistent: opts.persistent, - }; - if (!listener) - listener = EMPTY_FN; - let closer; - if (opts.usePolling) { - const enableBin = opts.interval !== opts.binaryInterval; - options.interval = enableBin && isBinaryPath(basename) ? opts.binaryInterval : opts.interval; - closer = setFsWatchFileListener(path, absolutePath, options, { - listener, - rawEmitter: this.fsw._emitRaw, - }); - } - else { - closer = setFsWatchListener(path, absolutePath, options, { - listener, - errHandler: this._boundHandleError, - rawEmitter: this.fsw._emitRaw, - }); - } - return closer; - } - /** - * Watch a file and emit add event if warranted. - * @returns closer for the watcher instance - */ - _handleFile(file, stats, initialAdd) { - if (this.fsw.closed) { - return; - } - const dirname = sysPath.dirname(file); - const basename = sysPath.basename(file); - const parent = this.fsw._getWatchedDir(dirname); - // stats is always present - let prevStats = stats; - // if the file is already being watched, do nothing - if (parent.has(basename)) - return; - const listener = async (path, newStats) => { - if (!this.fsw._throttle(THROTTLE_MODE_WATCH, file, 5)) - return; - if (!newStats || newStats.mtimeMs === 0) { - try { - const newStats = await stat(file); - if (this.fsw.closed) - return; - // Check that change event was not fired because of changed only accessTime. - const at = newStats.atimeMs; - const mt = newStats.mtimeMs; - if (!at || at <= mt || mt !== prevStats.mtimeMs) { - this.fsw._emit(EV.CHANGE, file, newStats); - } - if ((isMacos || isLinux || isFreeBSD) && prevStats.ino !== newStats.ino) { - this.fsw._closeFile(path); - prevStats = newStats; - const closer = this._watchWithNodeFs(file, listener); - if (closer) - this.fsw._addPathCloser(path, closer); - } - else { - prevStats = newStats; - } - } - catch (error) { - // Fix issues where mtime is null but file is still present - this.fsw._remove(dirname, basename); - } - // add is about to be emitted if file not already tracked in parent - } - else if (parent.has(basename)) { - // Check that change event was not fired because of changed only accessTime. - const at = newStats.atimeMs; - const mt = newStats.mtimeMs; - if (!at || at <= mt || mt !== prevStats.mtimeMs) { - this.fsw._emit(EV.CHANGE, file, newStats); - } - prevStats = newStats; - } - }; - // kick off the watcher - const closer = this._watchWithNodeFs(file, listener); - // emit an add event if we're supposed to - if (!(initialAdd && this.fsw.options.ignoreInitial) && this.fsw._isntIgnored(file)) { - if (!this.fsw._throttle(EV.ADD, file, 0)) - return; - this.fsw._emit(EV.ADD, file, stats); - } - return closer; - } - /** - * Handle symlinks encountered while reading a dir. - * @param entry returned by readdirp - * @param directory path of dir being read - * @param path of this item - * @param item basename of this item - * @returns true if no more processing is needed for this entry. - */ - async _handleSymlink(entry, directory, path, item) { - if (this.fsw.closed) { - return; - } - const full = entry.fullPath; - const dir = this.fsw._getWatchedDir(directory); - if (!this.fsw.options.followSymlinks) { - // watch symlink directly (don't follow) and detect changes - this.fsw._incrReadyCount(); - let linkPath; - try { - linkPath = await fsrealpath(path); - } - catch (e) { - this.fsw._emitReady(); - return true; - } - if (this.fsw.closed) - return; - if (dir.has(item)) { - if (this.fsw._symlinkPaths.get(full) !== linkPath) { - this.fsw._symlinkPaths.set(full, linkPath); - this.fsw._emit(EV.CHANGE, path, entry.stats); - } - } - else { - dir.add(item); - this.fsw._symlinkPaths.set(full, linkPath); - this.fsw._emit(EV.ADD, path, entry.stats); - } - this.fsw._emitReady(); - return true; - } - // don't follow the same symlink more than once - if (this.fsw._symlinkPaths.has(full)) { - return true; - } - this.fsw._symlinkPaths.set(full, true); - } - _handleRead(directory, initialAdd, wh, target, dir, depth, throttler) { - // Normalize the directory name on Windows - directory = sysPath.join(directory, ''); - throttler = this.fsw._throttle('readdir', directory, 1000); - if (!throttler) - return; - const previous = this.fsw._getWatchedDir(wh.path); - const current = new Set(); - let stream = this.fsw._readdirp(directory, { - fileFilter: (entry) => wh.filterPath(entry), - directoryFilter: (entry) => wh.filterDir(entry), - }); - if (!stream) - return; - stream - .on(STR_DATA, async (entry) => { - if (this.fsw.closed) { - stream = undefined; - return; - } - const item = entry.path; - let path = sysPath.join(directory, item); - current.add(item); - if (entry.stats.isSymbolicLink() && - (await this._handleSymlink(entry, directory, path, item))) { - return; - } - if (this.fsw.closed) { - stream = undefined; - return; - } - // Files that present in current directory snapshot - // but absent in previous are added to watch list and - // emit `add` event. - if (item === target || (!target && !previous.has(item))) { - this.fsw._incrReadyCount(); - // ensure relativeness of path is preserved in case of watcher reuse - path = sysPath.join(dir, sysPath.relative(dir, path)); - this._addToNodeFs(path, initialAdd, wh, depth + 1); - } - }) - .on(EV.ERROR, this._boundHandleError); - return new Promise((resolve, reject) => { - if (!stream) - return reject(); - stream.once(STR_END, () => { - if (this.fsw.closed) { - stream = undefined; - return; - } - const wasThrottled = throttler ? throttler.clear() : false; - resolve(undefined); - // Files that absent in current directory snapshot - // but present in previous emit `remove` event - // and are removed from @watched[directory]. - previous - .getChildren() - .filter((item) => { - return item !== directory && !current.has(item); - }) - .forEach((item) => { - this.fsw._remove(directory, item); - }); - stream = undefined; - // one more time for any missed in case changes came in extremely quickly - if (wasThrottled) - this._handleRead(directory, false, wh, target, dir, depth, throttler); - }); - }); - } - /** - * Read directory to add / remove files from `@watched` list and re-read it on change. - * @param dir fs path - * @param stats - * @param initialAdd - * @param depth relative to user-supplied path - * @param target child path targeted for watch - * @param wh Common watch helpers for this path - * @param realpath - * @returns closer for the watcher instance. - */ - async _handleDir(dir, stats, initialAdd, depth, target, wh, realpath) { - const parentDir = this.fsw._getWatchedDir(sysPath.dirname(dir)); - const tracked = parentDir.has(sysPath.basename(dir)); - if (!(initialAdd && this.fsw.options.ignoreInitial) && !target && !tracked) { - this.fsw._emit(EV.ADD_DIR, dir, stats); - } - // ensure dir is tracked (harmless if redundant) - parentDir.add(sysPath.basename(dir)); - this.fsw._getWatchedDir(dir); - let throttler; - let closer; - const oDepth = this.fsw.options.depth; - if ((oDepth == null || depth <= oDepth) && !this.fsw._symlinkPaths.has(realpath)) { - if (!target) { - await this._handleRead(dir, initialAdd, wh, target, dir, depth, throttler); - if (this.fsw.closed) - return; - } - closer = this._watchWithNodeFs(dir, (dirPath, stats) => { - // if current directory is removed, do nothing - if (stats && stats.mtimeMs === 0) - return; - this._handleRead(dirPath, false, wh, target, dir, depth, throttler); - }); - } - return closer; - } - /** - * Handle added file, directory, or glob pattern. - * Delegates call to _handleFile / _handleDir after checks. - * @param path to file or ir - * @param initialAdd was the file added at watch instantiation? - * @param priorWh depth relative to user-supplied path - * @param depth Child path actually targeted for watch - * @param target Child path actually targeted for watch - */ - async _addToNodeFs(path, initialAdd, priorWh, depth, target) { - const ready = this.fsw._emitReady; - if (this.fsw._isIgnored(path) || this.fsw.closed) { - ready(); - return false; - } - const wh = this.fsw._getWatchHelpers(path); - if (priorWh) { - wh.filterPath = (entry) => priorWh.filterPath(entry); - wh.filterDir = (entry) => priorWh.filterDir(entry); - } - // evaluate what is at the path we're being asked to watch - try { - const stats = await statMethods[wh.statMethod](wh.watchPath); - if (this.fsw.closed) - return; - if (this.fsw._isIgnored(wh.watchPath, stats)) { - ready(); - return false; - } - const follow = this.fsw.options.followSymlinks; - let closer; - if (stats.isDirectory()) { - const absPath = sysPath.resolve(path); - const targetPath = follow ? await fsrealpath(path) : path; - if (this.fsw.closed) - return; - closer = await this._handleDir(wh.watchPath, stats, initialAdd, depth, target, wh, targetPath); - if (this.fsw.closed) - return; - // preserve this symlink's target path - if (absPath !== targetPath && targetPath !== undefined) { - this.fsw._symlinkPaths.set(absPath, targetPath); - } - } - else if (stats.isSymbolicLink()) { - const targetPath = follow ? await fsrealpath(path) : path; - if (this.fsw.closed) - return; - const parent = sysPath.dirname(wh.watchPath); - this.fsw._getWatchedDir(parent).add(wh.watchPath); - this.fsw._emit(EV.ADD, wh.watchPath, stats); - closer = await this._handleDir(parent, stats, initialAdd, depth, path, wh, targetPath); - if (this.fsw.closed) - return; - // preserve this symlink's target path - if (targetPath !== undefined) { - this.fsw._symlinkPaths.set(sysPath.resolve(path), targetPath); - } - } - else { - closer = this._handleFile(wh.watchPath, stats, initialAdd); - } - ready(); - if (closer) - this.fsw._addPathCloser(path, closer); - return false; - } - catch (error) { - if (this.fsw._handleError(error)) { - ready(); - return path; - } - } - } -} diff --git a/node_modules/chokidar/esm/index.d.ts b/node_modules/chokidar/esm/index.d.ts deleted file mode 100644 index ffeb1e72..00000000 --- a/node_modules/chokidar/esm/index.d.ts +++ /dev/null @@ -1,215 +0,0 @@ -/*! chokidar - MIT License (c) 2012 Paul Miller (paulmillr.com) */ -import { Stats } from 'fs'; -import { EventEmitter } from 'events'; -import { ReaddirpStream, ReaddirpOptions, EntryInfo } from 'readdirp'; -import { NodeFsHandler, EventName, Path, EVENTS as EV, WatchHandlers } from './handler.js'; -type AWF = { - stabilityThreshold: number; - pollInterval: number; -}; -type BasicOpts = { - persistent: boolean; - ignoreInitial: boolean; - followSymlinks: boolean; - cwd?: string; - usePolling: boolean; - interval: number; - binaryInterval: number; - alwaysStat?: boolean; - depth?: number; - ignorePermissionErrors: boolean; - atomic: boolean | number; -}; -export type Throttler = { - timeoutObject: NodeJS.Timeout; - clear: () => void; - count: number; -}; -export type ChokidarOptions = Partial; -}>; -export type FSWInstanceOptions = BasicOpts & { - ignored: Matcher[]; - awaitWriteFinish: false | AWF; -}; -export type ThrottleType = 'readdir' | 'watch' | 'add' | 'remove' | 'change'; -export type EmitArgs = [path: Path, stats?: Stats]; -export type EmitErrorArgs = [error: Error, stats?: Stats]; -export type EmitArgsWithName = [event: EventName, ...EmitArgs]; -export type MatchFunction = (val: string, stats?: Stats) => boolean; -export interface MatcherObject { - path: string; - recursive?: boolean; -} -export type Matcher = string | RegExp | MatchFunction | MatcherObject; -/** - * Directory entry. - */ -declare class DirEntry { - path: Path; - _removeWatcher: (dir: string, base: string) => void; - items: Set; - constructor(dir: Path, removeWatcher: (dir: string, base: string) => void); - add(item: string): void; - remove(item: string): Promise; - has(item: string): boolean | undefined; - getChildren(): string[]; - dispose(): void; -} -export declare class WatchHelper { - fsw: FSWatcher; - path: string; - watchPath: string; - fullWatchPath: string; - dirParts: string[][]; - followSymlinks: boolean; - statMethod: 'stat' | 'lstat'; - constructor(path: string, follow: boolean, fsw: FSWatcher); - entryPath(entry: EntryInfo): Path; - filterPath(entry: EntryInfo): boolean; - filterDir(entry: EntryInfo): boolean; -} -export interface FSWatcherKnownEventMap { - [EV.READY]: []; - [EV.RAW]: Parameters; - [EV.ERROR]: Parameters; - [EV.ALL]: [event: EventName, ...EmitArgs]; -} -export type FSWatcherEventMap = FSWatcherKnownEventMap & { - [k in Exclude]: EmitArgs; -}; -/** - * Watches files & directories for changes. Emitted events: - * `add`, `addDir`, `change`, `unlink`, `unlinkDir`, `all`, `error` - * - * new FSWatcher() - * .add(directories) - * .on('add', path => log('File', path, 'was added')) - */ -export declare class FSWatcher extends EventEmitter { - closed: boolean; - options: FSWInstanceOptions; - _closers: Map>; - _ignoredPaths: Set; - _throttled: Map>; - _streams: Set; - _symlinkPaths: Map; - _watched: Map; - _pendingWrites: Map; - _pendingUnlinks: Map; - _readyCount: number; - _emitReady: () => void; - _closePromise?: Promise; - _userIgnored?: MatchFunction; - _readyEmitted: boolean; - _emitRaw: WatchHandlers['rawEmitter']; - _boundRemove: (dir: string, item: string) => void; - _nodeFsHandler: NodeFsHandler; - constructor(_opts?: ChokidarOptions); - _addIgnoredPath(matcher: Matcher): void; - _removeIgnoredPath(matcher: Matcher): void; - /** - * Adds paths to be watched on an existing FSWatcher instance. - * @param paths_ file or file list. Other arguments are unused - */ - add(paths_: Path | Path[], _origAdd?: string, _internal?: boolean): FSWatcher; - /** - * Close watchers or start ignoring events from specified paths. - */ - unwatch(paths_: Path | Path[]): FSWatcher; - /** - * Close watchers and remove all listeners from watched paths. - */ - close(): Promise; - /** - * Expose list of watched paths - * @returns for chaining - */ - getWatched(): Record; - emitWithAll(event: EventName, args: EmitArgs): void; - /** - * Normalize and emit events. - * Calling _emit DOES NOT MEAN emit() would be called! - * @param event Type of event - * @param path File or directory path - * @param stats arguments to be passed with event - * @returns the error if defined, otherwise the value of the FSWatcher instance's `closed` flag - */ - _emit(event: EventName, path: Path, stats?: Stats): Promise; - /** - * Common handler for errors - * @returns The error if defined, otherwise the value of the FSWatcher instance's `closed` flag - */ - _handleError(error: Error): Error | boolean; - /** - * Helper utility for throttling - * @param actionType type being throttled - * @param path being acted upon - * @param timeout duration of time to suppress duplicate actions - * @returns tracking object or false if action should be suppressed - */ - _throttle(actionType: ThrottleType, path: Path, timeout: number): Throttler | false; - _incrReadyCount(): number; - /** - * Awaits write operation to finish. - * Polls a newly created file for size variations. When files size does not change for 'threshold' milliseconds calls callback. - * @param path being acted upon - * @param threshold Time in milliseconds a file size must be fixed before acknowledging write OP is finished - * @param event - * @param awfEmit Callback to be called when ready for event to be emitted. - */ - _awaitWriteFinish(path: Path, threshold: number, event: EventName, awfEmit: (err?: Error, stat?: Stats) => void): void; - /** - * Determines whether user has asked to ignore this path. - */ - _isIgnored(path: Path, stats?: Stats): boolean; - _isntIgnored(path: Path, stat?: Stats): boolean; - /** - * Provides a set of common helpers and properties relating to symlink handling. - * @param path file or directory pattern being watched - */ - _getWatchHelpers(path: Path): WatchHelper; - /** - * Provides directory tracking objects - * @param directory path of the directory - */ - _getWatchedDir(directory: string): DirEntry; - /** - * Check for read permissions: https://stackoverflow.com/a/11781404/1358405 - */ - _hasReadPermissions(stats: Stats): boolean; - /** - * Handles emitting unlink events for - * files and directories, and via recursion, for - * files and directories within directories that are unlinked - * @param directory within which the following item is located - * @param item base path of item/directory - */ - _remove(directory: string, item: string, isDirectory?: boolean): void; - /** - * Closes all watchers for a path - */ - _closePath(path: Path): void; - /** - * Closes only file-specific watchers - */ - _closeFile(path: Path): void; - _addPathCloser(path: Path, closer: () => void): void; - _readdirp(root: Path, opts?: Partial): ReaddirpStream | undefined; -} -/** - * Instantiates watcher with paths to be tracked. - * @param paths file / directory paths - * @param options opts, such as `atomic`, `awaitWriteFinish`, `ignored`, and others - * @returns an instance of FSWatcher for chaining. - * @example - * const watcher = watch('.').on('all', (event, path) => { console.log(event, path); }); - * watch('.', { atomic: true, awaitWriteFinish: true, ignored: (f, stats) => stats?.isFile() && !f.endsWith('.js') }) - */ -export declare function watch(paths: string | string[], options?: ChokidarOptions): FSWatcher; -declare const _default: { - watch: typeof watch; - FSWatcher: typeof FSWatcher; -}; -export default _default; diff --git a/node_modules/chokidar/esm/index.js b/node_modules/chokidar/esm/index.js deleted file mode 100644 index 1c80a40c..00000000 --- a/node_modules/chokidar/esm/index.js +++ /dev/null @@ -1,798 +0,0 @@ -/*! chokidar - MIT License (c) 2012 Paul Miller (paulmillr.com) */ -import { stat as statcb } from 'fs'; -import { stat, readdir } from 'fs/promises'; -import { EventEmitter } from 'events'; -import * as sysPath from 'path'; -import { readdirp } from 'readdirp'; -import { NodeFsHandler, EVENTS as EV, isWindows, isIBMi, EMPTY_FN, STR_CLOSE, STR_END, } from './handler.js'; -const SLASH = '/'; -const SLASH_SLASH = '//'; -const ONE_DOT = '.'; -const TWO_DOTS = '..'; -const STRING_TYPE = 'string'; -const BACK_SLASH_RE = /\\/g; -const DOUBLE_SLASH_RE = /\/\//; -const DOT_RE = /\..*\.(sw[px])$|~$|\.subl.*\.tmp/; -const REPLACER_RE = /^\.[/\\]/; -function arrify(item) { - return Array.isArray(item) ? item : [item]; -} -const isMatcherObject = (matcher) => typeof matcher === 'object' && matcher !== null && !(matcher instanceof RegExp); -function createPattern(matcher) { - if (typeof matcher === 'function') - return matcher; - if (typeof matcher === 'string') - return (string) => matcher === string; - if (matcher instanceof RegExp) - return (string) => matcher.test(string); - if (typeof matcher === 'object' && matcher !== null) { - return (string) => { - if (matcher.path === string) - return true; - if (matcher.recursive) { - const relative = sysPath.relative(matcher.path, string); - if (!relative) { - return false; - } - return !relative.startsWith('..') && !sysPath.isAbsolute(relative); - } - return false; - }; - } - return () => false; -} -function normalizePath(path) { - if (typeof path !== 'string') - throw new Error('string expected'); - path = sysPath.normalize(path); - path = path.replace(/\\/g, '/'); - let prepend = false; - if (path.startsWith('//')) - prepend = true; - const DOUBLE_SLASH_RE = /\/\//; - while (path.match(DOUBLE_SLASH_RE)) - path = path.replace(DOUBLE_SLASH_RE, '/'); - if (prepend) - path = '/' + path; - return path; -} -function matchPatterns(patterns, testString, stats) { - const path = normalizePath(testString); - for (let index = 0; index < patterns.length; index++) { - const pattern = patterns[index]; - if (pattern(path, stats)) { - return true; - } - } - return false; -} -function anymatch(matchers, testString) { - if (matchers == null) { - throw new TypeError('anymatch: specify first argument'); - } - // Early cache for matchers. - const matchersArray = arrify(matchers); - const patterns = matchersArray.map((matcher) => createPattern(matcher)); - if (testString == null) { - return (testString, stats) => { - return matchPatterns(patterns, testString, stats); - }; - } - return matchPatterns(patterns, testString); -} -const unifyPaths = (paths_) => { - const paths = arrify(paths_).flat(); - if (!paths.every((p) => typeof p === STRING_TYPE)) { - throw new TypeError(`Non-string provided as watch path: ${paths}`); - } - return paths.map(normalizePathToUnix); -}; -// If SLASH_SLASH occurs at the beginning of path, it is not replaced -// because "//StoragePC/DrivePool/Movies" is a valid network path -const toUnix = (string) => { - let str = string.replace(BACK_SLASH_RE, SLASH); - let prepend = false; - if (str.startsWith(SLASH_SLASH)) { - prepend = true; - } - while (str.match(DOUBLE_SLASH_RE)) { - str = str.replace(DOUBLE_SLASH_RE, SLASH); - } - if (prepend) { - str = SLASH + str; - } - return str; -}; -// Our version of upath.normalize -// TODO: this is not equal to path-normalize module - investigate why -const normalizePathToUnix = (path) => toUnix(sysPath.normalize(toUnix(path))); -// TODO: refactor -const normalizeIgnored = (cwd = '') => (path) => { - if (typeof path === 'string') { - return normalizePathToUnix(sysPath.isAbsolute(path) ? path : sysPath.join(cwd, path)); - } - else { - return path; - } -}; -const getAbsolutePath = (path, cwd) => { - if (sysPath.isAbsolute(path)) { - return path; - } - return sysPath.join(cwd, path); -}; -const EMPTY_SET = Object.freeze(new Set()); -/** - * Directory entry. - */ -class DirEntry { - constructor(dir, removeWatcher) { - this.path = dir; - this._removeWatcher = removeWatcher; - this.items = new Set(); - } - add(item) { - const { items } = this; - if (!items) - return; - if (item !== ONE_DOT && item !== TWO_DOTS) - items.add(item); - } - async remove(item) { - const { items } = this; - if (!items) - return; - items.delete(item); - if (items.size > 0) - return; - const dir = this.path; - try { - await readdir(dir); - } - catch (err) { - if (this._removeWatcher) { - this._removeWatcher(sysPath.dirname(dir), sysPath.basename(dir)); - } - } - } - has(item) { - const { items } = this; - if (!items) - return; - return items.has(item); - } - getChildren() { - const { items } = this; - if (!items) - return []; - return [...items.values()]; - } - dispose() { - this.items.clear(); - this.path = ''; - this._removeWatcher = EMPTY_FN; - this.items = EMPTY_SET; - Object.freeze(this); - } -} -const STAT_METHOD_F = 'stat'; -const STAT_METHOD_L = 'lstat'; -export class WatchHelper { - constructor(path, follow, fsw) { - this.fsw = fsw; - const watchPath = path; - this.path = path = path.replace(REPLACER_RE, ''); - this.watchPath = watchPath; - this.fullWatchPath = sysPath.resolve(watchPath); - this.dirParts = []; - this.dirParts.forEach((parts) => { - if (parts.length > 1) - parts.pop(); - }); - this.followSymlinks = follow; - this.statMethod = follow ? STAT_METHOD_F : STAT_METHOD_L; - } - entryPath(entry) { - return sysPath.join(this.watchPath, sysPath.relative(this.watchPath, entry.fullPath)); - } - filterPath(entry) { - const { stats } = entry; - if (stats && stats.isSymbolicLink()) - return this.filterDir(entry); - const resolvedPath = this.entryPath(entry); - // TODO: what if stats is undefined? remove ! - return this.fsw._isntIgnored(resolvedPath, stats) && this.fsw._hasReadPermissions(stats); - } - filterDir(entry) { - return this.fsw._isntIgnored(this.entryPath(entry), entry.stats); - } -} -/** - * Watches files & directories for changes. Emitted events: - * `add`, `addDir`, `change`, `unlink`, `unlinkDir`, `all`, `error` - * - * new FSWatcher() - * .add(directories) - * .on('add', path => log('File', path, 'was added')) - */ -export class FSWatcher extends EventEmitter { - // Not indenting methods for history sake; for now. - constructor(_opts = {}) { - super(); - this.closed = false; - this._closers = new Map(); - this._ignoredPaths = new Set(); - this._throttled = new Map(); - this._streams = new Set(); - this._symlinkPaths = new Map(); - this._watched = new Map(); - this._pendingWrites = new Map(); - this._pendingUnlinks = new Map(); - this._readyCount = 0; - this._readyEmitted = false; - const awf = _opts.awaitWriteFinish; - const DEF_AWF = { stabilityThreshold: 2000, pollInterval: 100 }; - const opts = { - // Defaults - persistent: true, - ignoreInitial: false, - ignorePermissionErrors: false, - interval: 100, - binaryInterval: 300, - followSymlinks: true, - usePolling: false, - // useAsync: false, - atomic: true, // NOTE: overwritten later (depends on usePolling) - ..._opts, - // Change format - ignored: _opts.ignored ? arrify(_opts.ignored) : arrify([]), - awaitWriteFinish: awf === true ? DEF_AWF : typeof awf === 'object' ? { ...DEF_AWF, ...awf } : false, - }; - // Always default to polling on IBM i because fs.watch() is not available on IBM i. - if (isIBMi) - opts.usePolling = true; - // Editor atomic write normalization enabled by default with fs.watch - if (opts.atomic === undefined) - opts.atomic = !opts.usePolling; - // opts.atomic = typeof _opts.atomic === 'number' ? _opts.atomic : 100; - // Global override. Useful for developers, who need to force polling for all - // instances of chokidar, regardless of usage / dependency depth - const envPoll = process.env.CHOKIDAR_USEPOLLING; - if (envPoll !== undefined) { - const envLower = envPoll.toLowerCase(); - if (envLower === 'false' || envLower === '0') - opts.usePolling = false; - else if (envLower === 'true' || envLower === '1') - opts.usePolling = true; - else - opts.usePolling = !!envLower; - } - const envInterval = process.env.CHOKIDAR_INTERVAL; - if (envInterval) - opts.interval = Number.parseInt(envInterval, 10); - // This is done to emit ready only once, but each 'add' will increase that? - let readyCalls = 0; - this._emitReady = () => { - readyCalls++; - if (readyCalls >= this._readyCount) { - this._emitReady = EMPTY_FN; - this._readyEmitted = true; - // use process.nextTick to allow time for listener to be bound - process.nextTick(() => this.emit(EV.READY)); - } - }; - this._emitRaw = (...args) => this.emit(EV.RAW, ...args); - this._boundRemove = this._remove.bind(this); - this.options = opts; - this._nodeFsHandler = new NodeFsHandler(this); - // You’re frozen when your heart’s not open. - Object.freeze(opts); - } - _addIgnoredPath(matcher) { - if (isMatcherObject(matcher)) { - // return early if we already have a deeply equal matcher object - for (const ignored of this._ignoredPaths) { - if (isMatcherObject(ignored) && - ignored.path === matcher.path && - ignored.recursive === matcher.recursive) { - return; - } - } - } - this._ignoredPaths.add(matcher); - } - _removeIgnoredPath(matcher) { - this._ignoredPaths.delete(matcher); - // now find any matcher objects with the matcher as path - if (typeof matcher === 'string') { - for (const ignored of this._ignoredPaths) { - // TODO (43081j): make this more efficient. - // probably just make a `this._ignoredDirectories` or some - // such thing. - if (isMatcherObject(ignored) && ignored.path === matcher) { - this._ignoredPaths.delete(ignored); - } - } - } - } - // Public methods - /** - * Adds paths to be watched on an existing FSWatcher instance. - * @param paths_ file or file list. Other arguments are unused - */ - add(paths_, _origAdd, _internal) { - const { cwd } = this.options; - this.closed = false; - this._closePromise = undefined; - let paths = unifyPaths(paths_); - if (cwd) { - paths = paths.map((path) => { - const absPath = getAbsolutePath(path, cwd); - // Check `path` instead of `absPath` because the cwd portion can't be a glob - return absPath; - }); - } - paths.forEach((path) => { - this._removeIgnoredPath(path); - }); - this._userIgnored = undefined; - if (!this._readyCount) - this._readyCount = 0; - this._readyCount += paths.length; - Promise.all(paths.map(async (path) => { - const res = await this._nodeFsHandler._addToNodeFs(path, !_internal, undefined, 0, _origAdd); - if (res) - this._emitReady(); - return res; - })).then((results) => { - if (this.closed) - return; - results.forEach((item) => { - if (item) - this.add(sysPath.dirname(item), sysPath.basename(_origAdd || item)); - }); - }); - return this; - } - /** - * Close watchers or start ignoring events from specified paths. - */ - unwatch(paths_) { - if (this.closed) - return this; - const paths = unifyPaths(paths_); - const { cwd } = this.options; - paths.forEach((path) => { - // convert to absolute path unless relative path already matches - if (!sysPath.isAbsolute(path) && !this._closers.has(path)) { - if (cwd) - path = sysPath.join(cwd, path); - path = sysPath.resolve(path); - } - this._closePath(path); - this._addIgnoredPath(path); - if (this._watched.has(path)) { - this._addIgnoredPath({ - path, - recursive: true, - }); - } - // reset the cached userIgnored anymatch fn - // to make ignoredPaths changes effective - this._userIgnored = undefined; - }); - return this; - } - /** - * Close watchers and remove all listeners from watched paths. - */ - close() { - if (this._closePromise) { - return this._closePromise; - } - this.closed = true; - // Memory management. - this.removeAllListeners(); - const closers = []; - this._closers.forEach((closerList) => closerList.forEach((closer) => { - const promise = closer(); - if (promise instanceof Promise) - closers.push(promise); - })); - this._streams.forEach((stream) => stream.destroy()); - this._userIgnored = undefined; - this._readyCount = 0; - this._readyEmitted = false; - this._watched.forEach((dirent) => dirent.dispose()); - this._closers.clear(); - this._watched.clear(); - this._streams.clear(); - this._symlinkPaths.clear(); - this._throttled.clear(); - this._closePromise = closers.length - ? Promise.all(closers).then(() => undefined) - : Promise.resolve(); - return this._closePromise; - } - /** - * Expose list of watched paths - * @returns for chaining - */ - getWatched() { - const watchList = {}; - this._watched.forEach((entry, dir) => { - const key = this.options.cwd ? sysPath.relative(this.options.cwd, dir) : dir; - const index = key || ONE_DOT; - watchList[index] = entry.getChildren().sort(); - }); - return watchList; - } - emitWithAll(event, args) { - this.emit(event, ...args); - if (event !== EV.ERROR) - this.emit(EV.ALL, event, ...args); - } - // Common helpers - // -------------- - /** - * Normalize and emit events. - * Calling _emit DOES NOT MEAN emit() would be called! - * @param event Type of event - * @param path File or directory path - * @param stats arguments to be passed with event - * @returns the error if defined, otherwise the value of the FSWatcher instance's `closed` flag - */ - async _emit(event, path, stats) { - if (this.closed) - return; - const opts = this.options; - if (isWindows) - path = sysPath.normalize(path); - if (opts.cwd) - path = sysPath.relative(opts.cwd, path); - const args = [path]; - if (stats != null) - args.push(stats); - const awf = opts.awaitWriteFinish; - let pw; - if (awf && (pw = this._pendingWrites.get(path))) { - pw.lastChange = new Date(); - return this; - } - if (opts.atomic) { - if (event === EV.UNLINK) { - this._pendingUnlinks.set(path, [event, ...args]); - setTimeout(() => { - this._pendingUnlinks.forEach((entry, path) => { - this.emit(...entry); - this.emit(EV.ALL, ...entry); - this._pendingUnlinks.delete(path); - }); - }, typeof opts.atomic === 'number' ? opts.atomic : 100); - return this; - } - if (event === EV.ADD && this._pendingUnlinks.has(path)) { - event = EV.CHANGE; - this._pendingUnlinks.delete(path); - } - } - if (awf && (event === EV.ADD || event === EV.CHANGE) && this._readyEmitted) { - const awfEmit = (err, stats) => { - if (err) { - event = EV.ERROR; - args[0] = err; - this.emitWithAll(event, args); - } - else if (stats) { - // if stats doesn't exist the file must have been deleted - if (args.length > 1) { - args[1] = stats; - } - else { - args.push(stats); - } - this.emitWithAll(event, args); - } - }; - this._awaitWriteFinish(path, awf.stabilityThreshold, event, awfEmit); - return this; - } - if (event === EV.CHANGE) { - const isThrottled = !this._throttle(EV.CHANGE, path, 50); - if (isThrottled) - return this; - } - if (opts.alwaysStat && - stats === undefined && - (event === EV.ADD || event === EV.ADD_DIR || event === EV.CHANGE)) { - const fullPath = opts.cwd ? sysPath.join(opts.cwd, path) : path; - let stats; - try { - stats = await stat(fullPath); - } - catch (err) { - // do nothing - } - // Suppress event when fs_stat fails, to avoid sending undefined 'stat' - if (!stats || this.closed) - return; - args.push(stats); - } - this.emitWithAll(event, args); - return this; - } - /** - * Common handler for errors - * @returns The error if defined, otherwise the value of the FSWatcher instance's `closed` flag - */ - _handleError(error) { - const code = error && error.code; - if (error && - code !== 'ENOENT' && - code !== 'ENOTDIR' && - (!this.options.ignorePermissionErrors || (code !== 'EPERM' && code !== 'EACCES'))) { - this.emit(EV.ERROR, error); - } - return error || this.closed; - } - /** - * Helper utility for throttling - * @param actionType type being throttled - * @param path being acted upon - * @param timeout duration of time to suppress duplicate actions - * @returns tracking object or false if action should be suppressed - */ - _throttle(actionType, path, timeout) { - if (!this._throttled.has(actionType)) { - this._throttled.set(actionType, new Map()); - } - const action = this._throttled.get(actionType); - if (!action) - throw new Error('invalid throttle'); - const actionPath = action.get(path); - if (actionPath) { - actionPath.count++; - return false; - } - // eslint-disable-next-line prefer-const - let timeoutObject; - const clear = () => { - const item = action.get(path); - const count = item ? item.count : 0; - action.delete(path); - clearTimeout(timeoutObject); - if (item) - clearTimeout(item.timeoutObject); - return count; - }; - timeoutObject = setTimeout(clear, timeout); - const thr = { timeoutObject, clear, count: 0 }; - action.set(path, thr); - return thr; - } - _incrReadyCount() { - return this._readyCount++; - } - /** - * Awaits write operation to finish. - * Polls a newly created file for size variations. When files size does not change for 'threshold' milliseconds calls callback. - * @param path being acted upon - * @param threshold Time in milliseconds a file size must be fixed before acknowledging write OP is finished - * @param event - * @param awfEmit Callback to be called when ready for event to be emitted. - */ - _awaitWriteFinish(path, threshold, event, awfEmit) { - const awf = this.options.awaitWriteFinish; - if (typeof awf !== 'object') - return; - const pollInterval = awf.pollInterval; - let timeoutHandler; - let fullPath = path; - if (this.options.cwd && !sysPath.isAbsolute(path)) { - fullPath = sysPath.join(this.options.cwd, path); - } - const now = new Date(); - const writes = this._pendingWrites; - function awaitWriteFinishFn(prevStat) { - statcb(fullPath, (err, curStat) => { - if (err || !writes.has(path)) { - if (err && err.code !== 'ENOENT') - awfEmit(err); - return; - } - const now = Number(new Date()); - if (prevStat && curStat.size !== prevStat.size) { - writes.get(path).lastChange = now; - } - const pw = writes.get(path); - const df = now - pw.lastChange; - if (df >= threshold) { - writes.delete(path); - awfEmit(undefined, curStat); - } - else { - timeoutHandler = setTimeout(awaitWriteFinishFn, pollInterval, curStat); - } - }); - } - if (!writes.has(path)) { - writes.set(path, { - lastChange: now, - cancelWait: () => { - writes.delete(path); - clearTimeout(timeoutHandler); - return event; - }, - }); - timeoutHandler = setTimeout(awaitWriteFinishFn, pollInterval); - } - } - /** - * Determines whether user has asked to ignore this path. - */ - _isIgnored(path, stats) { - if (this.options.atomic && DOT_RE.test(path)) - return true; - if (!this._userIgnored) { - const { cwd } = this.options; - const ign = this.options.ignored; - const ignored = (ign || []).map(normalizeIgnored(cwd)); - const ignoredPaths = [...this._ignoredPaths]; - const list = [...ignoredPaths.map(normalizeIgnored(cwd)), ...ignored]; - this._userIgnored = anymatch(list, undefined); - } - return this._userIgnored(path, stats); - } - _isntIgnored(path, stat) { - return !this._isIgnored(path, stat); - } - /** - * Provides a set of common helpers and properties relating to symlink handling. - * @param path file or directory pattern being watched - */ - _getWatchHelpers(path) { - return new WatchHelper(path, this.options.followSymlinks, this); - } - // Directory helpers - // ----------------- - /** - * Provides directory tracking objects - * @param directory path of the directory - */ - _getWatchedDir(directory) { - const dir = sysPath.resolve(directory); - if (!this._watched.has(dir)) - this._watched.set(dir, new DirEntry(dir, this._boundRemove)); - return this._watched.get(dir); - } - // File helpers - // ------------ - /** - * Check for read permissions: https://stackoverflow.com/a/11781404/1358405 - */ - _hasReadPermissions(stats) { - if (this.options.ignorePermissionErrors) - return true; - return Boolean(Number(stats.mode) & 0o400); - } - /** - * Handles emitting unlink events for - * files and directories, and via recursion, for - * files and directories within directories that are unlinked - * @param directory within which the following item is located - * @param item base path of item/directory - */ - _remove(directory, item, isDirectory) { - // if what is being deleted is a directory, get that directory's paths - // for recursive deleting and cleaning of watched object - // if it is not a directory, nestedDirectoryChildren will be empty array - const path = sysPath.join(directory, item); - const fullPath = sysPath.resolve(path); - isDirectory = - isDirectory != null ? isDirectory : this._watched.has(path) || this._watched.has(fullPath); - // prevent duplicate handling in case of arriving here nearly simultaneously - // via multiple paths (such as _handleFile and _handleDir) - if (!this._throttle('remove', path, 100)) - return; - // if the only watched file is removed, watch for its return - if (!isDirectory && this._watched.size === 1) { - this.add(directory, item, true); - } - // This will create a new entry in the watched object in either case - // so we got to do the directory check beforehand - const wp = this._getWatchedDir(path); - const nestedDirectoryChildren = wp.getChildren(); - // Recursively remove children directories / files. - nestedDirectoryChildren.forEach((nested) => this._remove(path, nested)); - // Check if item was on the watched list and remove it - const parent = this._getWatchedDir(directory); - const wasTracked = parent.has(item); - parent.remove(item); - // Fixes issue #1042 -> Relative paths were detected and added as symlinks - // (https://github.com/paulmillr/chokidar/blob/e1753ddbc9571bdc33b4a4af172d52cb6e611c10/lib/nodefs-handler.js#L612), - // but never removed from the map in case the path was deleted. - // This leads to an incorrect state if the path was recreated: - // https://github.com/paulmillr/chokidar/blob/e1753ddbc9571bdc33b4a4af172d52cb6e611c10/lib/nodefs-handler.js#L553 - if (this._symlinkPaths.has(fullPath)) { - this._symlinkPaths.delete(fullPath); - } - // If we wait for this file to be fully written, cancel the wait. - let relPath = path; - if (this.options.cwd) - relPath = sysPath.relative(this.options.cwd, path); - if (this.options.awaitWriteFinish && this._pendingWrites.has(relPath)) { - const event = this._pendingWrites.get(relPath).cancelWait(); - if (event === EV.ADD) - return; - } - // The Entry will either be a directory that just got removed - // or a bogus entry to a file, in either case we have to remove it - this._watched.delete(path); - this._watched.delete(fullPath); - const eventName = isDirectory ? EV.UNLINK_DIR : EV.UNLINK; - if (wasTracked && !this._isIgnored(path)) - this._emit(eventName, path); - // Avoid conflicts if we later create another file with the same name - this._closePath(path); - } - /** - * Closes all watchers for a path - */ - _closePath(path) { - this._closeFile(path); - const dir = sysPath.dirname(path); - this._getWatchedDir(dir).remove(sysPath.basename(path)); - } - /** - * Closes only file-specific watchers - */ - _closeFile(path) { - const closers = this._closers.get(path); - if (!closers) - return; - closers.forEach((closer) => closer()); - this._closers.delete(path); - } - _addPathCloser(path, closer) { - if (!closer) - return; - let list = this._closers.get(path); - if (!list) { - list = []; - this._closers.set(path, list); - } - list.push(closer); - } - _readdirp(root, opts) { - if (this.closed) - return; - const options = { type: EV.ALL, alwaysStat: true, lstat: true, ...opts, depth: 0 }; - let stream = readdirp(root, options); - this._streams.add(stream); - stream.once(STR_CLOSE, () => { - stream = undefined; - }); - stream.once(STR_END, () => { - if (stream) { - this._streams.delete(stream); - stream = undefined; - } - }); - return stream; - } -} -/** - * Instantiates watcher with paths to be tracked. - * @param paths file / directory paths - * @param options opts, such as `atomic`, `awaitWriteFinish`, `ignored`, and others - * @returns an instance of FSWatcher for chaining. - * @example - * const watcher = watch('.').on('all', (event, path) => { console.log(event, path); }); - * watch('.', { atomic: true, awaitWriteFinish: true, ignored: (f, stats) => stats?.isFile() && !f.endsWith('.js') }) - */ -export function watch(paths, options = {}) { - const watcher = new FSWatcher(options); - watcher.add(paths); - return watcher; -} -export default { watch, FSWatcher }; diff --git a/node_modules/chokidar/esm/package.json b/node_modules/chokidar/esm/package.json deleted file mode 100644 index 87696418..00000000 --- a/node_modules/chokidar/esm/package.json +++ /dev/null @@ -1 +0,0 @@ -{ "type": "module", "sideEffects": false } diff --git a/node_modules/chokidar/handler.d.ts b/node_modules/chokidar/handler.d.ts index ea777d00..520571aa 100644 --- a/node_modules/chokidar/handler.d.ts +++ b/node_modules/chokidar/handler.d.ts @@ -1,6 +1,6 @@ -import type { WatchEventType, Stats, FSWatcher as NativeFsWatcher } from 'fs'; -import type { FSWatcher, WatchHelper, Throttler } from './index.js'; +import type { FSWatcher as NativeFsWatcher, Stats, WatchEventType } from 'node:fs'; import type { EntryInfo } from 'readdirp'; +import type { FSWatcher, Throttler, WatchHelper } from './index.js'; export type Path = string; export declare const STR_DATA = "data"; export declare const STR_END = "end"; @@ -64,7 +64,7 @@ export declare class NodeFsHandler { * @returns true if no more processing is needed for this entry. */ _handleSymlink(entry: EntryInfo, directory: string, path: Path, item: string): Promise; - _handleRead(directory: string, initialAdd: boolean, wh: WatchHelper, target: Path, dir: Path, depth: number, throttler: Throttler): Promise | undefined; + _handleRead(directory: string, initialAdd: boolean, wh: WatchHelper, target: Path | undefined, dir: Path, depth: number, throttler: Throttler): Promise | undefined; /** * Read directory to add / remove files from `@watched` list and re-read it on change. * @param dir fs path @@ -76,7 +76,7 @@ export declare class NodeFsHandler { * @param realpath * @returns closer for the watcher instance. */ - _handleDir(dir: string, stats: Stats, initialAdd: boolean, depth: number, target: string, wh: WatchHelper, realpath: string): Promise<(() => void) | undefined>; + _handleDir(dir: string, stats: Stats, initialAdd: boolean, depth: number, target: string | undefined, wh: WatchHelper, realpath: string): Promise<(() => void) | undefined>; /** * Handle added file, directory, or glob pattern. * Delegates call to _handleFile / _handleDir after checks. diff --git a/node_modules/chokidar/handler.js b/node_modules/chokidar/handler.js index 9c2ef287..6b12880b 100644 --- a/node_modules/chokidar/handler.js +++ b/node_modules/chokidar/handler.js @@ -1,24 +1,19 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.NodeFsHandler = exports.EVENTS = exports.isIBMi = exports.isFreeBSD = exports.isLinux = exports.isMacos = exports.isWindows = exports.IDENTITY_FN = exports.EMPTY_FN = exports.STR_CLOSE = exports.STR_END = exports.STR_DATA = void 0; -const fs_1 = require("fs"); -const promises_1 = require("fs/promises"); -const sysPath = require("path"); -const os_1 = require("os"); -exports.STR_DATA = 'data'; -exports.STR_END = 'end'; -exports.STR_CLOSE = 'close'; -const EMPTY_FN = () => { }; -exports.EMPTY_FN = EMPTY_FN; -const IDENTITY_FN = (val) => val; -exports.IDENTITY_FN = IDENTITY_FN; +import { watch as fs_watch, unwatchFile, watchFile } from 'node:fs'; +import { realpath as fsrealpath, lstat, open, stat } from 'node:fs/promises'; +import { type as osType } from 'node:os'; +import * as sp from 'node:path'; +export const STR_DATA = 'data'; +export const STR_END = 'end'; +export const STR_CLOSE = 'close'; +export const EMPTY_FN = () => { }; +export const IDENTITY_FN = (val) => val; const pl = process.platform; -exports.isWindows = pl === 'win32'; -exports.isMacos = pl === 'darwin'; -exports.isLinux = pl === 'linux'; -exports.isFreeBSD = pl === 'freebsd'; -exports.isIBMi = (0, os_1.type)() === 'OS400'; -exports.EVENTS = { +export const isWindows = pl === 'win32'; +export const isMacos = pl === 'darwin'; +export const isLinux = pl === 'linux'; +export const isFreeBSD = pl === 'freebsd'; +export const isIBMi = osType() === 'OS400'; +export const EVENTS = { ALL: 'all', READY: 'ready', ADD: 'add', @@ -29,9 +24,9 @@ exports.EVENTS = { RAW: 'raw', ERROR: 'error', }; -const EV = exports.EVENTS; +const EV = EVENTS; const THROTTLE_MODE_WATCH = 'watch'; -const statMethods = { lstat: promises_1.lstat, stat: promises_1.stat }; +const statMethods = { lstat, stat }; const KEY_LISTENERS = 'listeners'; const KEY_ERR = 'errHandlers'; const KEY_RAW = 'rawEmitters'; @@ -71,7 +66,7 @@ const binaryExtensions = new Set([ 'xmind', 'xpi', 'xpm', 'xwd', 'xz', 'z', 'zip', 'zipx', ]); -const isBinaryPath = (filePath) => binaryExtensions.has(sysPath.extname(filePath).slice(1).toLowerCase()); +const isBinaryPath = (filePath) => binaryExtensions.has(sp.extname(filePath).slice(1).toLowerCase()); // TODO: emit errors properly. Example: EMFILE on Macos. const foreach = (val, fn) => { if (val instanceof Set) { @@ -124,11 +119,11 @@ function createFsWatchInstance(path, options, listener, errHandler, emitRaw) { // emit based on events occurring for files from a directory's watcher in // case the file's watcher misses it (and rely on throttling to de-dupe) if (evPath && path !== evPath) { - fsWatchBroadcast(sysPath.resolve(path, evPath), KEY_LISTENERS, sysPath.join(path, evPath)); + fsWatchBroadcast(sp.resolve(path, evPath), KEY_LISTENERS, sp.join(path, evPath)); } }; try { - return (0, fs_1.watch)(path, { + return fs_watch(path, { persistent: options.persistent, }, handleEvent); } @@ -182,9 +177,9 @@ const setFsWatchListener = (path, fullPath, options, handlers) => { if (cont) cont.watcherUnusable = true; // documented since Node 10.4.1 // Workaround for https://github.com/joyent/node/issues/4337 - if (exports.isWindows && error.code === 'EPERM') { + if (isWindows && error.code === 'EPERM') { try { - const fd = await (0, promises_1.open)(path, 'r'); + const fd = await open(path, 'r'); await fd.close(); broadcastErr(error); } @@ -250,7 +245,7 @@ const setFsWatchFileListener = (path, fullPath, options, handlers) => { // doesn't seem worthwhile for the added complexity. // listeners = cont.listeners; // rawEmitters = cont.rawEmitters; - (0, fs_1.unwatchFile)(fullPath); + unwatchFile(fullPath); cont = undefined; } if (cont) { @@ -265,7 +260,7 @@ const setFsWatchFileListener = (path, fullPath, options, handlers) => { listeners: listener, rawEmitters: rawEmitter, options, - watcher: (0, fs_1.watchFile)(fullPath, options, (curr, prev) => { + watcher: watchFile(fullPath, options, (curr, prev) => { foreach(cont.rawEmitters, (rawEmitter) => { rawEmitter(EV.CHANGE, fullPath, { curr, prev }); }); @@ -285,7 +280,7 @@ const setFsWatchFileListener = (path, fullPath, options, handlers) => { delFromSet(cont, KEY_RAW, rawEmitter); if (isEmptySet(cont.listeners)) { FsWatchFileInstances.delete(fullPath); - (0, fs_1.unwatchFile)(fullPath); + unwatchFile(fullPath); cont.options = cont.watcher = undefined; Object.freeze(cont); } @@ -294,7 +289,9 @@ const setFsWatchFileListener = (path, fullPath, options, handlers) => { /** * @mixin */ -class NodeFsHandler { +export class NodeFsHandler { + fsw; + _boundHandleError; constructor(fsW) { this.fsw = fsW; this._boundHandleError = (error) => fsW._handleError(error); @@ -307,16 +304,16 @@ class NodeFsHandler { */ _watchWithNodeFs(path, listener) { const opts = this.fsw.options; - const directory = sysPath.dirname(path); - const basename = sysPath.basename(path); + const directory = sp.dirname(path); + const basename = sp.basename(path); const parent = this.fsw._getWatchedDir(directory); parent.add(basename); - const absolutePath = sysPath.resolve(path); + const absolutePath = sp.resolve(path); const options = { persistent: opts.persistent, }; if (!listener) - listener = exports.EMPTY_FN; + listener = EMPTY_FN; let closer; if (opts.usePolling) { const enableBin = opts.interval !== opts.binaryInterval; @@ -343,8 +340,8 @@ class NodeFsHandler { if (this.fsw.closed) { return; } - const dirname = sysPath.dirname(file); - const basename = sysPath.basename(file); + const dirname = sp.dirname(file); + const basename = sp.basename(file); const parent = this.fsw._getWatchedDir(dirname); // stats is always present let prevStats = stats; @@ -356,7 +353,7 @@ class NodeFsHandler { return; if (!newStats || newStats.mtimeMs === 0) { try { - const newStats = await (0, promises_1.stat)(file); + const newStats = await stat(file); if (this.fsw.closed) return; // Check that change event was not fired because of changed only accessTime. @@ -365,7 +362,7 @@ class NodeFsHandler { if (!at || at <= mt || mt !== prevStats.mtimeMs) { this.fsw._emit(EV.CHANGE, file, newStats); } - if ((exports.isMacos || exports.isLinux || exports.isFreeBSD) && prevStats.ino !== newStats.ino) { + if ((isMacos || isLinux || isFreeBSD) && prevStats.ino !== newStats.ino) { this.fsw._closeFile(path); prevStats = newStats; const closer = this._watchWithNodeFs(file, listener); @@ -421,7 +418,7 @@ class NodeFsHandler { this.fsw._incrReadyCount(); let linkPath; try { - linkPath = await (0, promises_1.realpath)(path); + linkPath = await fsrealpath(path); } catch (e) { this.fsw._emitReady(); @@ -451,8 +448,9 @@ class NodeFsHandler { } _handleRead(directory, initialAdd, wh, target, dir, depth, throttler) { // Normalize the directory name on Windows - directory = sysPath.join(directory, ''); - throttler = this.fsw._throttle('readdir', directory, 1000); + directory = sp.join(directory, ''); + const throttleKey = target ? `${directory}:${target}` : directory; + throttler = this.fsw._throttle('readdir', throttleKey, 1000); if (!throttler) return; const previous = this.fsw._getWatchedDir(wh.path); @@ -464,13 +462,13 @@ class NodeFsHandler { if (!stream) return; stream - .on(exports.STR_DATA, async (entry) => { + .on(STR_DATA, async (entry) => { if (this.fsw.closed) { stream = undefined; return; } const item = entry.path; - let path = sysPath.join(directory, item); + let path = sp.join(directory, item); current.add(item); if (entry.stats.isSymbolicLink() && (await this._handleSymlink(entry, directory, path, item))) { @@ -486,7 +484,7 @@ class NodeFsHandler { if (item === target || (!target && !previous.has(item))) { this.fsw._incrReadyCount(); // ensure relativeness of path is preserved in case of watcher reuse - path = sysPath.join(dir, sysPath.relative(dir, path)); + path = sp.join(dir, sp.relative(dir, path)); this._addToNodeFs(path, initialAdd, wh, depth + 1); } }) @@ -494,7 +492,7 @@ class NodeFsHandler { return new Promise((resolve, reject) => { if (!stream) return reject(); - stream.once(exports.STR_END, () => { + stream.once(STR_END, () => { if (this.fsw.closed) { stream = undefined; return; @@ -531,13 +529,13 @@ class NodeFsHandler { * @returns closer for the watcher instance. */ async _handleDir(dir, stats, initialAdd, depth, target, wh, realpath) { - const parentDir = this.fsw._getWatchedDir(sysPath.dirname(dir)); - const tracked = parentDir.has(sysPath.basename(dir)); + const parentDir = this.fsw._getWatchedDir(sp.dirname(dir)); + const tracked = parentDir.has(sp.basename(dir)); if (!(initialAdd && this.fsw.options.ignoreInitial) && !target && !tracked) { this.fsw._emit(EV.ADD_DIR, dir, stats); } // ensure dir is tracked (harmless if redundant) - parentDir.add(sysPath.basename(dir)); + parentDir.add(sp.basename(dir)); this.fsw._getWatchedDir(dir); let throttler; let closer; @@ -589,8 +587,8 @@ class NodeFsHandler { const follow = this.fsw.options.followSymlinks; let closer; if (stats.isDirectory()) { - const absPath = sysPath.resolve(path); - const targetPath = follow ? await (0, promises_1.realpath)(path) : path; + const absPath = sp.resolve(path); + const targetPath = follow ? await fsrealpath(path) : path; if (this.fsw.closed) return; closer = await this._handleDir(wh.watchPath, stats, initialAdd, depth, target, wh, targetPath); @@ -602,10 +600,10 @@ class NodeFsHandler { } } else if (stats.isSymbolicLink()) { - const targetPath = follow ? await (0, promises_1.realpath)(path) : path; + const targetPath = follow ? await fsrealpath(path) : path; if (this.fsw.closed) return; - const parent = sysPath.dirname(wh.watchPath); + const parent = sp.dirname(wh.watchPath); this.fsw._getWatchedDir(parent).add(wh.watchPath); this.fsw._emit(EV.ADD, wh.watchPath, stats); closer = await this._handleDir(parent, stats, initialAdd, depth, path, wh, targetPath); @@ -613,7 +611,7 @@ class NodeFsHandler { return; // preserve this symlink's target path if (targetPath !== undefined) { - this.fsw._symlinkPaths.set(sysPath.resolve(path), targetPath); + this.fsw._symlinkPaths.set(sp.resolve(path), targetPath); } } else { @@ -632,4 +630,3 @@ class NodeFsHandler { } } } -exports.NodeFsHandler = NodeFsHandler; diff --git a/node_modules/chokidar/index.d.ts b/node_modules/chokidar/index.d.ts index ffeb1e72..edfe0df7 100644 --- a/node_modules/chokidar/index.d.ts +++ b/node_modules/chokidar/index.d.ts @@ -1,9 +1,9 @@ /*! chokidar - MIT License (c) 2012 Paul Miller (paulmillr.com) */ -import { Stats } from 'fs'; -import { EventEmitter } from 'events'; -import { ReaddirpStream, ReaddirpOptions, EntryInfo } from 'readdirp'; -import { NodeFsHandler, EventName, Path, EVENTS as EV, WatchHandlers } from './handler.js'; -type AWF = { +import { EventEmitter } from 'node:events'; +import { Stats } from 'node:fs'; +import { type EntryInfo, type ReaddirpOptions, ReaddirpStream } from 'readdirp'; +import { EVENTS as EV, type EventName, NodeFsHandler, type Path, type WatchHandlers } from './handler.js'; +export type AWF = { stabilityThreshold: number; pollInterval: number; }; @@ -70,15 +70,17 @@ export declare class WatchHelper { filterPath(entry: EntryInfo): boolean; filterDir(entry: EntryInfo): boolean; } -export interface FSWatcherKnownEventMap { +export interface FSWatcherEventMap { [EV.READY]: []; [EV.RAW]: Parameters; [EV.ERROR]: Parameters; [EV.ALL]: [event: EventName, ...EmitArgs]; + [EV.ADD]: EmitArgs; + [EV.CHANGE]: EmitArgs; + [EV.ADD_DIR]: EmitArgs; + [EV.UNLINK]: EmitArgs; + [EV.UNLINK_DIR]: EmitArgs; } -export type FSWatcherEventMap = FSWatcherKnownEventMap & { - [k in Exclude]: EmitArgs; -}; /** * Watches files & directories for changes. Emitted events: * `add`, `addDir`, `change`, `unlink`, `unlinkDir`, `all`, `error` diff --git a/node_modules/chokidar/index.js b/node_modules/chokidar/index.js index 79370ee8..f2648297 100644 --- a/node_modules/chokidar/index.js +++ b/node_modules/chokidar/index.js @@ -1,21 +1,17 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.FSWatcher = exports.WatchHelper = void 0; -exports.watch = watch; /*! chokidar - MIT License (c) 2012 Paul Miller (paulmillr.com) */ -const fs_1 = require("fs"); -const promises_1 = require("fs/promises"); -const events_1 = require("events"); -const sysPath = require("path"); -const readdirp_1 = require("readdirp"); -const handler_js_1 = require("./handler.js"); +import { EventEmitter } from 'node:events'; +import { stat as statcb, Stats } from 'node:fs'; +import { readdir, stat } from 'node:fs/promises'; +import * as sp from 'node:path'; +import { readdirp, ReaddirpStream } from 'readdirp'; +import { EMPTY_FN, EVENTS as EV, isIBMi, isWindows, NodeFsHandler, STR_CLOSE, STR_END, } from './handler.js'; const SLASH = '/'; const SLASH_SLASH = '//'; const ONE_DOT = '.'; const TWO_DOTS = '..'; const STRING_TYPE = 'string'; const BACK_SLASH_RE = /\\/g; -const DOUBLE_SLASH_RE = /\/\//; +const DOUBLE_SLASH_RE = /\/\//g; const DOT_RE = /\..*\.(sw[px])$|~$|\.subl.*\.tmp/; const REPLACER_RE = /^\.[/\\]/; function arrify(item) { @@ -34,11 +30,11 @@ function createPattern(matcher) { if (matcher.path === string) return true; if (matcher.recursive) { - const relative = sysPath.relative(matcher.path, string); + const relative = sp.relative(matcher.path, string); if (!relative) { return false; } - return !relative.startsWith('..') && !sysPath.isAbsolute(relative); + return !relative.startsWith('..') && !sp.isAbsolute(relative); } return false; }; @@ -48,14 +44,12 @@ function createPattern(matcher) { function normalizePath(path) { if (typeof path !== 'string') throw new Error('string expected'); - path = sysPath.normalize(path); + path = sp.normalize(path); path = path.replace(/\\/g, '/'); let prepend = false; if (path.startsWith('//')) prepend = true; - const DOUBLE_SLASH_RE = /\/\//; - while (path.match(DOUBLE_SLASH_RE)) - path = path.replace(DOUBLE_SLASH_RE, '/'); + path = path.replace(DOUBLE_SLASH_RE, '/'); if (prepend) path = '/' + path; return path; @@ -99,9 +93,7 @@ const toUnix = (string) => { if (str.startsWith(SLASH_SLASH)) { prepend = true; } - while (str.match(DOUBLE_SLASH_RE)) { - str = str.replace(DOUBLE_SLASH_RE, SLASH); - } + str = str.replace(DOUBLE_SLASH_RE, SLASH); if (prepend) { str = SLASH + str; } @@ -109,27 +101,30 @@ const toUnix = (string) => { }; // Our version of upath.normalize // TODO: this is not equal to path-normalize module - investigate why -const normalizePathToUnix = (path) => toUnix(sysPath.normalize(toUnix(path))); +const normalizePathToUnix = (path) => toUnix(sp.normalize(toUnix(path))); // TODO: refactor const normalizeIgnored = (cwd = '') => (path) => { if (typeof path === 'string') { - return normalizePathToUnix(sysPath.isAbsolute(path) ? path : sysPath.join(cwd, path)); + return normalizePathToUnix(sp.isAbsolute(path) ? path : sp.join(cwd, path)); } else { return path; } }; const getAbsolutePath = (path, cwd) => { - if (sysPath.isAbsolute(path)) { + if (sp.isAbsolute(path)) { return path; } - return sysPath.join(cwd, path); + return sp.join(cwd, path); }; const EMPTY_SET = Object.freeze(new Set()); /** * Directory entry. */ class DirEntry { + path; + _removeWatcher; + items; constructor(dir, removeWatcher) { this.path = dir; this._removeWatcher = removeWatcher; @@ -151,11 +146,11 @@ class DirEntry { return; const dir = this.path; try { - await (0, promises_1.readdir)(dir); + await readdir(dir); } catch (err) { if (this._removeWatcher) { - this._removeWatcher(sysPath.dirname(dir), sysPath.basename(dir)); + this._removeWatcher(sp.dirname(dir), sp.basename(dir)); } } } @@ -174,20 +169,27 @@ class DirEntry { dispose() { this.items.clear(); this.path = ''; - this._removeWatcher = handler_js_1.EMPTY_FN; + this._removeWatcher = EMPTY_FN; this.items = EMPTY_SET; Object.freeze(this); } } const STAT_METHOD_F = 'stat'; const STAT_METHOD_L = 'lstat'; -class WatchHelper { +export class WatchHelper { + fsw; + path; + watchPath; + fullWatchPath; + dirParts; + followSymlinks; + statMethod; constructor(path, follow, fsw) { this.fsw = fsw; const watchPath = path; this.path = path = path.replace(REPLACER_RE, ''); this.watchPath = watchPath; - this.fullWatchPath = sysPath.resolve(watchPath); + this.fullWatchPath = sp.resolve(watchPath); this.dirParts = []; this.dirParts.forEach((parts) => { if (parts.length > 1) @@ -197,7 +199,7 @@ class WatchHelper { this.statMethod = follow ? STAT_METHOD_F : STAT_METHOD_L; } entryPath(entry) { - return sysPath.join(this.watchPath, sysPath.relative(this.watchPath, entry.fullPath)); + return sp.join(this.watchPath, sp.relative(this.watchPath, entry.fullPath)); } filterPath(entry) { const { stats } = entry; @@ -211,7 +213,6 @@ class WatchHelper { return this.fsw._isntIgnored(this.entryPath(entry), entry.stats); } } -exports.WatchHelper = WatchHelper; /** * Watches files & directories for changes. Emitted events: * `add`, `addDir`, `change`, `unlink`, `unlinkDir`, `all`, `error` @@ -220,7 +221,25 @@ exports.WatchHelper = WatchHelper; * .add(directories) * .on('add', path => log('File', path, 'was added')) */ -class FSWatcher extends events_1.EventEmitter { +export class FSWatcher extends EventEmitter { + closed; + options; + _closers; + _ignoredPaths; + _throttled; + _streams; + _symlinkPaths; + _watched; + _pendingWrites; + _pendingUnlinks; + _readyCount; + _emitReady; + _closePromise; + _userIgnored; + _readyEmitted; + _emitRaw; + _boundRemove; + _nodeFsHandler; // Not indenting methods for history sake; for now. constructor(_opts = {}) { super(); @@ -254,7 +273,7 @@ class FSWatcher extends events_1.EventEmitter { awaitWriteFinish: awf === true ? DEF_AWF : typeof awf === 'object' ? { ...DEF_AWF, ...awf } : false, }; // Always default to polling on IBM i because fs.watch() is not available on IBM i. - if (handler_js_1.isIBMi) + if (isIBMi) opts.usePolling = true; // Editor atomic write normalization enabled by default with fs.watch if (opts.atomic === undefined) @@ -280,16 +299,16 @@ class FSWatcher extends events_1.EventEmitter { this._emitReady = () => { readyCalls++; if (readyCalls >= this._readyCount) { - this._emitReady = handler_js_1.EMPTY_FN; + this._emitReady = EMPTY_FN; this._readyEmitted = true; // use process.nextTick to allow time for listener to be bound - process.nextTick(() => this.emit(handler_js_1.EVENTS.READY)); + process.nextTick(() => this.emit(EV.READY)); } }; - this._emitRaw = (...args) => this.emit(handler_js_1.EVENTS.RAW, ...args); + this._emitRaw = (...args) => this.emit(EV.RAW, ...args); this._boundRemove = this._remove.bind(this); this.options = opts; - this._nodeFsHandler = new handler_js_1.NodeFsHandler(this); + this._nodeFsHandler = new NodeFsHandler(this); // You’re frozen when your heart’s not open. Object.freeze(opts); } @@ -354,7 +373,7 @@ class FSWatcher extends events_1.EventEmitter { return; results.forEach((item) => { if (item) - this.add(sysPath.dirname(item), sysPath.basename(_origAdd || item)); + this.add(sp.dirname(item), sp.basename(_origAdd || item)); }); }); return this; @@ -369,10 +388,10 @@ class FSWatcher extends events_1.EventEmitter { const { cwd } = this.options; paths.forEach((path) => { // convert to absolute path unless relative path already matches - if (!sysPath.isAbsolute(path) && !this._closers.has(path)) { + if (!sp.isAbsolute(path) && !this._closers.has(path)) { if (cwd) - path = sysPath.join(cwd, path); - path = sysPath.resolve(path); + path = sp.join(cwd, path); + path = sp.resolve(path); } this._closePath(path); this._addIgnoredPath(path); @@ -426,7 +445,7 @@ class FSWatcher extends events_1.EventEmitter { getWatched() { const watchList = {}; this._watched.forEach((entry, dir) => { - const key = this.options.cwd ? sysPath.relative(this.options.cwd, dir) : dir; + const key = this.options.cwd ? sp.relative(this.options.cwd, dir) : dir; const index = key || ONE_DOT; watchList[index] = entry.getChildren().sort(); }); @@ -434,8 +453,8 @@ class FSWatcher extends events_1.EventEmitter { } emitWithAll(event, args) { this.emit(event, ...args); - if (event !== handler_js_1.EVENTS.ERROR) - this.emit(handler_js_1.EVENTS.ALL, event, ...args); + if (event !== EV.ERROR) + this.emit(EV.ALL, event, ...args); } // Common helpers // -------------- @@ -451,10 +470,10 @@ class FSWatcher extends events_1.EventEmitter { if (this.closed) return; const opts = this.options; - if (handler_js_1.isWindows) - path = sysPath.normalize(path); + if (isWindows) + path = sp.normalize(path); if (opts.cwd) - path = sysPath.relative(opts.cwd, path); + path = sp.relative(opts.cwd, path); const args = [path]; if (stats != null) args.push(stats); @@ -465,26 +484,26 @@ class FSWatcher extends events_1.EventEmitter { return this; } if (opts.atomic) { - if (event === handler_js_1.EVENTS.UNLINK) { + if (event === EV.UNLINK) { this._pendingUnlinks.set(path, [event, ...args]); setTimeout(() => { this._pendingUnlinks.forEach((entry, path) => { this.emit(...entry); - this.emit(handler_js_1.EVENTS.ALL, ...entry); + this.emit(EV.ALL, ...entry); this._pendingUnlinks.delete(path); }); }, typeof opts.atomic === 'number' ? opts.atomic : 100); return this; } - if (event === handler_js_1.EVENTS.ADD && this._pendingUnlinks.has(path)) { - event = handler_js_1.EVENTS.CHANGE; + if (event === EV.ADD && this._pendingUnlinks.has(path)) { + event = EV.CHANGE; this._pendingUnlinks.delete(path); } } - if (awf && (event === handler_js_1.EVENTS.ADD || event === handler_js_1.EVENTS.CHANGE) && this._readyEmitted) { + if (awf && (event === EV.ADD || event === EV.CHANGE) && this._readyEmitted) { const awfEmit = (err, stats) => { if (err) { - event = handler_js_1.EVENTS.ERROR; + event = EV.ERROR; args[0] = err; this.emitWithAll(event, args); } @@ -502,18 +521,18 @@ class FSWatcher extends events_1.EventEmitter { this._awaitWriteFinish(path, awf.stabilityThreshold, event, awfEmit); return this; } - if (event === handler_js_1.EVENTS.CHANGE) { - const isThrottled = !this._throttle(handler_js_1.EVENTS.CHANGE, path, 50); + if (event === EV.CHANGE) { + const isThrottled = !this._throttle(EV.CHANGE, path, 50); if (isThrottled) return this; } if (opts.alwaysStat && stats === undefined && - (event === handler_js_1.EVENTS.ADD || event === handler_js_1.EVENTS.ADD_DIR || event === handler_js_1.EVENTS.CHANGE)) { - const fullPath = opts.cwd ? sysPath.join(opts.cwd, path) : path; + (event === EV.ADD || event === EV.ADD_DIR || event === EV.CHANGE)) { + const fullPath = opts.cwd ? sp.join(opts.cwd, path) : path; let stats; try { - stats = await (0, promises_1.stat)(fullPath); + stats = await stat(fullPath); } catch (err) { // do nothing @@ -536,7 +555,7 @@ class FSWatcher extends events_1.EventEmitter { code !== 'ENOENT' && code !== 'ENOTDIR' && (!this.options.ignorePermissionErrors || (code !== 'EPERM' && code !== 'EACCES'))) { - this.emit(handler_js_1.EVENTS.ERROR, error); + this.emit(EV.ERROR, error); } return error || this.closed; } @@ -593,13 +612,13 @@ class FSWatcher extends events_1.EventEmitter { const pollInterval = awf.pollInterval; let timeoutHandler; let fullPath = path; - if (this.options.cwd && !sysPath.isAbsolute(path)) { - fullPath = sysPath.join(this.options.cwd, path); + if (this.options.cwd && !sp.isAbsolute(path)) { + fullPath = sp.join(this.options.cwd, path); } const now = new Date(); const writes = this._pendingWrites; function awaitWriteFinishFn(prevStat) { - (0, fs_1.stat)(fullPath, (err, curStat) => { + statcb(fullPath, (err, curStat) => { if (err || !writes.has(path)) { if (err && err.code !== 'ENOENT') awfEmit(err); @@ -665,7 +684,7 @@ class FSWatcher extends events_1.EventEmitter { * @param directory path of the directory */ _getWatchedDir(directory) { - const dir = sysPath.resolve(directory); + const dir = sp.resolve(directory); if (!this._watched.has(dir)) this._watched.set(dir, new DirEntry(dir, this._boundRemove)); return this._watched.get(dir); @@ -691,8 +710,8 @@ class FSWatcher extends events_1.EventEmitter { // if what is being deleted is a directory, get that directory's paths // for recursive deleting and cleaning of watched object // if it is not a directory, nestedDirectoryChildren will be empty array - const path = sysPath.join(directory, item); - const fullPath = sysPath.resolve(path); + const path = sp.join(directory, item); + const fullPath = sp.resolve(path); isDirectory = isDirectory != null ? isDirectory : this._watched.has(path) || this._watched.has(fullPath); // prevent duplicate handling in case of arriving here nearly simultaneously @@ -724,17 +743,17 @@ class FSWatcher extends events_1.EventEmitter { // If we wait for this file to be fully written, cancel the wait. let relPath = path; if (this.options.cwd) - relPath = sysPath.relative(this.options.cwd, path); + relPath = sp.relative(this.options.cwd, path); if (this.options.awaitWriteFinish && this._pendingWrites.has(relPath)) { const event = this._pendingWrites.get(relPath).cancelWait(); - if (event === handler_js_1.EVENTS.ADD) + if (event === EV.ADD) return; } // The Entry will either be a directory that just got removed // or a bogus entry to a file, in either case we have to remove it this._watched.delete(path); this._watched.delete(fullPath); - const eventName = isDirectory ? handler_js_1.EVENTS.UNLINK_DIR : handler_js_1.EVENTS.UNLINK; + const eventName = isDirectory ? EV.UNLINK_DIR : EV.UNLINK; if (wasTracked && !this._isIgnored(path)) this._emit(eventName, path); // Avoid conflicts if we later create another file with the same name @@ -745,8 +764,8 @@ class FSWatcher extends events_1.EventEmitter { */ _closePath(path) { this._closeFile(path); - const dir = sysPath.dirname(path); - this._getWatchedDir(dir).remove(sysPath.basename(path)); + const dir = sp.dirname(path); + this._getWatchedDir(dir).remove(sp.basename(path)); } /** * Closes only file-specific watchers @@ -771,13 +790,13 @@ class FSWatcher extends events_1.EventEmitter { _readdirp(root, opts) { if (this.closed) return; - const options = { type: handler_js_1.EVENTS.ALL, alwaysStat: true, lstat: true, ...opts, depth: 0 }; - let stream = (0, readdirp_1.readdirp)(root, options); + const options = { type: EV.ALL, alwaysStat: true, lstat: true, ...opts, depth: 0 }; + let stream = readdirp(root, options); this._streams.add(stream); - stream.once(handler_js_1.STR_CLOSE, () => { + stream.once(STR_CLOSE, () => { stream = undefined; }); - stream.once(handler_js_1.STR_END, () => { + stream.once(STR_END, () => { if (stream) { this._streams.delete(stream); stream = undefined; @@ -786,7 +805,6 @@ class FSWatcher extends events_1.EventEmitter { return stream; } } -exports.FSWatcher = FSWatcher; /** * Instantiates watcher with paths to be tracked. * @param paths file / directory paths @@ -796,9 +814,9 @@ exports.FSWatcher = FSWatcher; * const watcher = watch('.').on('all', (event, path) => { console.log(event, path); }); * watch('.', { atomic: true, awaitWriteFinish: true, ignored: (f, stats) => stats?.isFile() && !f.endsWith('.js') }) */ -function watch(paths, options = {}) { +export function watch(paths, options = {}) { const watcher = new FSWatcher(options); watcher.add(paths); return watcher; } -exports.default = { watch, FSWatcher }; +export default { watch: watch, FSWatcher: FSWatcher }; diff --git a/node_modules/chokidar/package.json b/node_modules/chokidar/package.json index db792418..e7e0bcbf 100644 --- a/node_modules/chokidar/package.json +++ b/node_modules/chokidar/package.json @@ -1,46 +1,39 @@ { "name": "chokidar", "description": "Minimal and efficient cross-platform file watching library", - "version": "4.0.3", + "version": "5.0.0", + "type": "module", "homepage": "https://github.com/paulmillr/chokidar", "author": "Paul Miller (https://paulmillr.com)", "files": [ "index.js", "index.d.ts", "handler.js", - "handler.d.ts", - "esm" + "handler.d.ts" ], "main": "./index.js", - "module": "./esm/index.js", - "types": "./index.d.ts", "exports": { ".": { - "import": "./esm/index.js", - "require": "./index.js" + "default": "./index.js" }, "./handler.js": { - "import": "./esm/handler.js", - "require": "./handler.js" + "default": "./handler.js" } }, "dependencies": { - "readdirp": "^4.0.1" + "readdirp": "^5.0.0" }, "devDependencies": { - "@paulmillr/jsbt": "0.2.1", - "@types/node": "20.14.8", - "chai": "4.3.4", - "prettier": "3.1.1", - "rimraf": "5.0.5", - "sinon": "12.0.1", - "sinon-chai": "3.7.0", - "typescript": "5.5.2", + "@paulmillr/jsbt": "0.4.5", + "@types/node": "24.10.1", + "prettier": "3.5.2", + "tinyspy": "3.0.2", + "typescript": "5.9.2", "upath": "2.0.1" }, "sideEffects": false, "engines": { - "node": ">= 14.16.0" + "node": ">= 20.19.0" }, "repository": { "type": "git", @@ -51,10 +44,11 @@ }, "license": "MIT", "scripts": { - "build": "tsc && tsc -p tsconfig.esm.json", + "build": "tsc", "lint": "prettier --check src", "format": "prettier --write src", - "test": "node --test" + "test": "node index.test.js", + "test:bun1": "bun index.test.js" }, "keywords": [ "fs", diff --git a/node_modules/cypress/angular-zoneless/README.md b/node_modules/cypress/angular-zoneless/README.md deleted file mode 100644 index 733a6e77..00000000 --- a/node_modules/cypress/angular-zoneless/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# @cypress/angular-zoneless - -Mount Angular components in the open source [Cypress.io](https://www.cypress.io/) test runner without leveraging zone.js for change detection - -> **Note:** This package is bundled with the `cypress` package and should not need to be installed separately. See the [Angular Component Testing Docs](https://docs.cypress.io/guides/component-testing/angular/overview) for mounting Angular components. Installing and importing `mount` from `@cypress/angular-zoneless` should only be done for advanced use-cases. - -## Requirements - -- Angular 21.0.0 or Angular 20.0.0 with development preview of zoneless change detection - -## Development - -Run `yarn build` to compile and sync packages to the `cypress` cli package. - -## [Changelog](./CHANGELOG.md) diff --git a/node_modules/cypress/angular-zoneless/angular-zoneless/README.md b/node_modules/cypress/angular-zoneless/angular-zoneless/README.md deleted file mode 100644 index 733a6e77..00000000 --- a/node_modules/cypress/angular-zoneless/angular-zoneless/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# @cypress/angular-zoneless - -Mount Angular components in the open source [Cypress.io](https://www.cypress.io/) test runner without leveraging zone.js for change detection - -> **Note:** This package is bundled with the `cypress` package and should not need to be installed separately. See the [Angular Component Testing Docs](https://docs.cypress.io/guides/component-testing/angular/overview) for mounting Angular components. Installing and importing `mount` from `@cypress/angular-zoneless` should only be done for advanced use-cases. - -## Requirements - -- Angular 21.0.0 or Angular 20.0.0 with development preview of zoneless change detection - -## Development - -Run `yarn build` to compile and sync packages to the `cypress` cli package. - -## [Changelog](./CHANGELOG.md) diff --git a/node_modules/cypress/angular-zoneless/angular-zoneless/dist/index.d.ts b/node_modules/cypress/angular-zoneless/angular-zoneless/dist/index.d.ts deleted file mode 100644 index f5211540..00000000 --- a/node_modules/cypress/angular-zoneless/angular-zoneless/dist/index.d.ts +++ /dev/null @@ -1,119 +0,0 @@ -/// - -import { InputSignal, WritableSignal, Type } from '@angular/core'; -import { TestModuleMetadata, ComponentFixture, TestComponentRenderer } from '@angular/core/testing'; - -/** - * Additional module configurations needed while mounting the component, like - * providers, declarations, imports and even component @Inputs() - * - * @interface MountConfig - * @see https://angular.io/api/core/testing/TestModuleMetadata - */ -interface MountConfig extends TestModuleMetadata { - /** - * @memberof MountConfig - * @example - * import { ButtonComponent } from 'button/button.component' - * it('renders a button with Save text', () => { - * cy.mount(ButtonComponent, { componentProperties: { text: 'Save' }}) - * cy.get('button').contains('Save') - * }) - * - * it('renders a button with a cy.spy() replacing EventEmitter', () => { - * cy.mount(ButtonComponent, { - * componentProperties: { - * clicked: cy.spy().as('mySpy) - * } - * }) - * cy.get('button').click() - * cy.get('@mySpy').should('have.been.called') - * }) - */ - componentProperties?: Partial<{ - [P in keyof T]: T[P] extends InputSignal ? InputSignal | WritableSignal | V : T[P]; - }>; -} -/** - * Type that the `mount` function returns - * @type MountResponse - */ -type MountResponse = { - /** - * Fixture for debugging and testing a component. - * - * @memberof MountResponse - * @see https://angular.io/api/core/testing/ComponentFixture - */ - fixture: ComponentFixture; - /** - * The instance of the root component class - * - * @memberof MountResponse - * @see https://angular.io/api/core/testing/ComponentFixture#componentInstance - */ - component: T; -}; -declare class CypressTestComponentRenderer extends TestComponentRenderer { - insertRootElement(rootElId: string): void; - removeAllRootElements(): void; -} -/** - * Mounts an Angular component inside Cypress browser - * - * @param component Angular component being mounted or its template - * @param config configuration used to configure the TestBed - * @example - * import { mount } from '@cypress/angular' - * import { StepperComponent } from './stepper.component' - * import { MyService } from 'services/my.service' - * import { SharedModule } from 'shared/shared.module'; - * it('mounts', () => { - * mount(StepperComponent, { - * providers: [MyService], - * imports: [SharedModule] - * }) - * cy.get('[data-cy=increment]').click() - * cy.get('[data-cy=counter]').should('have.text', '1') - * }) - * - * // or - * - * it('mounts with template', () => { - * mount('', { - * declarations: [StepperComponent], - * }) - * }) - * - * @see {@link https://on.cypress.io/mounting-angular} for more details. - * - * @returns A component and component fixture - */ -declare function mount(component: Type | string, config?: MountConfig): Cypress.Chainable>; -/** - * Creates a new Event Emitter and then spies on it's `emit` method - * - * @param {string} alias name you want to use for your cy.spy() alias - * @returns EventEmitter - * @example - * import { StepperComponent } from './stepper.component' - * import { mount, createOutputSpy } from '@cypress/angular' - * - * it('Has spy', () => { - * mount(StepperComponent, { componentProperties: { change: createOutputSpy('changeSpy') } }) - * cy.get('[data-cy=increment]').click() - * cy.get('@changeSpy').should('have.been.called') - * }) - * - * // Or for use with Angular Signals following the output nomenclature. - * // see https://v17.angular.io/guide/model-inputs#differences-between-model-and-input/ - * - * it('Has spy', () => { - * mount(StepperComponent, { componentProperties: { count: signal(0), countChange: createOutputSpy('countChange') } }) - * cy.get('[data-cy=increment]').click() - * cy.get('@countChange').should('have.been.called') - * }) - */ -declare const createOutputSpy: (alias: string) => any; - -export { CypressTestComponentRenderer, MountConfig, MountResponse, createOutputSpy, mount }; diff --git a/node_modules/cypress/angular-zoneless/angular-zoneless/dist/index.js b/node_modules/cypress/angular-zoneless/angular-zoneless/dist/index.js deleted file mode 100644 index 99dd3c81..00000000 --- a/node_modules/cypress/angular-zoneless/angular-zoneless/dist/index.js +++ /dev/null @@ -1,482 +0,0 @@ - -/** - * @cypress/angular-zoneless v0.0.0-development - * (c) 2026 Cypress.io - * Released under the MIT License - */ - -import { CommonModule } from '@angular/common'; -import { Injectable, Component, EventEmitter, ErrorHandler, provideZonelessChangeDetection, SimpleChange } from '@angular/core'; -import { toObservable } from '@angular/core/rxjs-interop'; -import { getTestBed, TestComponentRenderer, TestBed } from '@angular/core/testing'; -import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing'; - -/****************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -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. -***************************************************************************** */ -/* global Reflect, Promise, SuppressedError, Symbol, Iterator */ - - -function __rest(s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; -} - -function __decorate(decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -} - -typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { - var e = new Error(message); - return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; -}; - -const ROOT_SELECTOR = '[data-cy-root]'; -/** - * Gets the root element used to mount the component. - * @returns {HTMLElement} The root element - * @throws {Error} If the root element is not found - */ -const getContainerEl = () => { - const el = document.querySelector(ROOT_SELECTOR); - if (el) { - return el; - } - throw Error(`No element found that matches selector ${ROOT_SELECTOR}. Please add a root element with data-cy-root attribute to your "component-index.html" file so that Cypress can attach your component to the DOM.`); -}; -/** - * Utility function to register CT side effects and run cleanup code during the "test:before:run" Cypress hook - * @param optionalCallback Callback to be called before the next test runs - */ -function setupHooks(optionalCallback) { - // We don't want CT side effects to run when e2e - // testing so we early return. - // System test to verify CT side effects do not pollute e2e: system-tests/test/e2e_with_mount_import_spec.ts - if (Cypress.testingType !== 'component') { - return; - } - // When running component specs, we cannot allow "cy.visit" - // because it will wipe out our preparation work, and does not make much sense - // thus we overwrite "cy.visit" to throw an error - Cypress.Commands.overwrite('visit', () => { - throw new Error('cy.visit from a component spec is not allowed'); - }); - Cypress.Commands.overwrite('session', () => { - throw new Error('cy.session from a component spec is not allowed'); - }); - Cypress.Commands.overwrite('origin', () => { - throw new Error('cy.origin from a component spec is not allowed'); - }); - // @ts-ignore - Cypress.on('test:before:after:run:async', () => { - optionalCallback === null || optionalCallback === void 0 ? void 0 : optionalCallback(); - }); -} - -let activeFixture = null; -let activeInternalSubscriptions = []; -function cleanup() { - // Not public, we need to call this to remove the last component from the DOM - try { - getTestBed().tearDownTestingModule(); - } - catch (e) { - const notSupportedError = new Error(`Failed to teardown component. The version of Angular you are using may not be officially supported.`); - notSupportedError.docsUrl = 'https://on.cypress.io/frameworks'; - throw notSupportedError; - } - // clean up internal subscriptions if any exist. We use this for two-way data binding for - // signal() models - activeInternalSubscriptions.forEach((subscription) => { - subscription.unsubscribe(); - }); - getTestBed().resetTestingModule(); - activeFixture = null; - activeInternalSubscriptions = []; -} -let CypressAngularErrorHandler = class CypressAngularErrorHandler { - handleError(error) { - throw error; - } -}; -CypressAngularErrorHandler = __decorate([ - Injectable() -], CypressAngularErrorHandler); -/** - * Bootstraps the TestModuleMetaData passed to the TestBed - * - * @param {Type} component Angular component being mounted - * @param {MountConfig} config TestBed configuration passed into the mount function - * @returns {MountConfig} MountConfig - */ -function bootstrapModule(component, config) { - var _a; - const { componentProperties } = config, testModuleMetaData = __rest(config, ["componentProperties"]); - if (!testModuleMetaData.declarations) { - testModuleMetaData.declarations = []; - } - if (!testModuleMetaData.imports) { - testModuleMetaData.imports = []; - } - if (!testModuleMetaData.providers) { - testModuleMetaData.providers = []; - } - // Replace default error handler since it will swallow uncaught exceptions. - // We want these to be uncaught so Cypress catches it and fails the test - testModuleMetaData.providers.push({ - provide: ErrorHandler, - useClass: CypressAngularErrorHandler, - }); - // allow for zoneless change detection inside the testing module. - // @see https://angular.dev/guide/zoneless#using-zoneless-in-testbed - testModuleMetaData.providers.push(provideZonelessChangeDetection()); - // check if the component is a standalone component - if ((_a = component.ɵcmp) === null || _a === void 0 ? void 0 : _a.standalone) { - testModuleMetaData.imports.push(component); - } - else { - testModuleMetaData.declarations.push(component); - } - if (!testModuleMetaData.imports.includes(CommonModule)) { - testModuleMetaData.imports.push(CommonModule); - } - return testModuleMetaData; -} -let CypressTestComponentRenderer = class CypressTestComponentRenderer extends TestComponentRenderer { - insertRootElement(rootElId) { - this.removeAllRootElements(); - const rootElement = getContainerEl(); - rootElement.setAttribute('id', rootElId); - } - removeAllRootElements() { - getContainerEl().innerHTML = ''; - } -}; -CypressTestComponentRenderer = __decorate([ - Injectable() -], CypressTestComponentRenderer); -/** - * Initializes the TestBed - * - * @param {Type | string} component Angular component being mounted or its template - * @param {MountConfig} config TestBed configuration passed into the mount function - * @returns {Type} componentFixture - */ -function initTestBed(component, config) { - const componentFixture = createComponentFixture(component); - getTestBed().configureTestingModule(Object.assign({}, bootstrapModule(componentFixture, config))); - getTestBed().overrideProvider(TestComponentRenderer, { useValue: new CypressTestComponentRenderer() }); - return componentFixture; -} -// if using the Wrapper Component (template strings), the component itself cannot be -// a standalone component -let WrapperComponent = class WrapperComponent { -}; -WrapperComponent = __decorate([ - Component({ selector: 'cy-wrapper-component', template: '', standalone: false }) -], WrapperComponent); -/** - * Returns the Component if Type or creates a WrapperComponent - * - * @param {Type | string} component The component you want to create a fixture of - * @returns {Type | WrapperComponent} - */ -function createComponentFixture(component) { - if (typeof component === 'string') { - // getTestBed().overrideTemplate is available in v14+ - // The static TestBed.overrideTemplate is available across versions - TestBed.overrideTemplate(WrapperComponent, component); - return WrapperComponent; - } - return component; -} -/** - * Creates the ComponentFixture - * - * @param {Type} component Angular component being mounted - * @param {MountConfig} config MountConfig - - * @returns {Promise>} ComponentFixture - */ -function setupFixture(component, config) { - const fixture = getTestBed().createComponent(component); - setupComponent(config, fixture); - return fixture; -} -// Best known way to currently detect whether or not a function is a signal is if the signal symbol exists. -// From there, we can take our best guess based on what exists on the object itself. -// @see https://github.com/cypress-io/cypress/issues/29731. -function isSignal(prop) { - try { - const symbol = Object.getOwnPropertySymbols(prop).find((symbol) => symbol.toString() === 'Symbol(SIGNAL)'); - return !!symbol; - } - catch (e) { - // likely a primitive type, object, array, or something else (i.e. not a signal). - // We can return false here. - return false; - } -} -// currently not a great way to detect if a function is an InputSignal. -// @see https://github.com/cypress-io/cypress/issues/29731. -function isInputSignal(prop) { - return isSignal(prop) && typeof prop === 'function' && prop['name'] === 'inputValueFn'; -} -// currently not a great way to detect if a function is a Model Signal. -// @see https://github.com/cypress-io/cypress/issues/29731. -function isModelSignal(prop) { - return isSignal(prop) && isWritableSignal(prop) && typeof prop.subscribe === 'function'; -} -// currently not a great way to detect if a function is a Writable Signal. -// @see https://github.com/cypress-io/cypress/issues/29731. -function isWritableSignal(prop) { - return isSignal(prop) && typeof prop === 'function' && typeof prop.set === 'function'; -} -function registerSignalEventsIfNeeded(propKey, propValue, componentValue, injector, fixture) { - const isPropValueASignal = isSignal(propValue); - if (isPropValueASignal) { - // propValue -> componentValue - const convertedToObservable = toObservable(propValue, { - // @ts-expect-error - monorepo clashing types between Angular 18 and Angular 21 - injector, - }); - // push the subscription into an array to be cleaned up at the end of the test - // to prevent a memory leak - activeInternalSubscriptions.push(convertedToObservable.subscribe((value) => { - // keep the component up to date as prop signal changes - fixture.componentRef.setInput(propKey, value); - })); - } - const isComponentValueAModelSignal = isModelSignal(componentValue); - if (isPropValueASignal && isComponentValueAModelSignal) { - // propValue <- componentValue - const modelChanged$ = toObservable(componentValue, { - // @ts-expect-error - monorepo clashing types between Angular 18 and Angular 21 - injector, - }); - activeInternalSubscriptions.push(modelChanged$.subscribe((value) => { - propValue.set(value); - })); - } -} -// In the case of signals, if we need to create an output spy, we need to check first whether or not a user has one defined first or has it created through -// autoSpyOutputs. If so, we need to subscribe to the writable signal to push updates into the event emitter. We do NOT observe input signals and output spies will not -// work for input signals. -function detectAndRegisterOutputSpyToSignal(config, component, key, injector) { - if (config.componentProperties) { - const expectedChangeKey = `${key}Change`; - let changeKeyIfExists = !!Object.keys(config.componentProperties).find((componentKey) => componentKey === expectedChangeKey); - if (changeKeyIfExists) { - component[expectedChangeKey] = - // @ts-expect-error - config.componentProperties[expectedChangeKey]; - } - if (changeKeyIfExists) { - const componentValue = component[key]; - // if the user passed in a change key or we created one due to config.autoSpyOutputs being set to true for a given signal, - // we will create a subscriber that will emit an event every time the value inside the signal changes. We only do this - // if the signal is writable and not an input signal. - if (isWritableSignal(componentValue) && !isInputSignal(componentValue)) { - activeInternalSubscriptions.push(toObservable(componentValue, { - // @ts-expect-error - monorepo clashing types between Angular 18 and Angular 21 - injector, - }).subscribe((value) => { - var _a; - (_a = component[expectedChangeKey]) === null || _a === void 0 ? void 0 : _a.emit(value); - })); - } - } - } -} -/** - * Gets the componentInstance and Object.assigns any componentProperties() passed in the MountConfig - * - * @param {MountConfig} config TestBed configuration passed into the mount function - * @param {ComponentFixture} fixture Fixture for debugging and testing a component. - * @returns {T} Component being mounted - */ -function setupComponent(config, fixture) { - let component = fixture.componentInstance; - const injector = fixture.componentRef.injector; - if (config === null || config === void 0 ? void 0 : config.componentProperties) { - if (component instanceof WrapperComponent) { - component = Object.assign(component, config.componentProperties); - } - getComponentInputs(fixture.componentRef.componentType).forEach((key) => { - var _a; - // only assign props if they are passed into the component - if ((_a = config === null || config === void 0 ? void 0 : config.componentProperties) === null || _a === void 0 ? void 0 : _a.hasOwnProperty(key)) { - // @ts-expect-error - const passedInValue = config === null || config === void 0 ? void 0 : config.componentProperties[key]; - registerSignalEventsIfNeeded(key, passedInValue, component[key], injector, fixture); - detectAndRegisterOutputSpyToSignal(config, component, key, injector); - fixture.componentRef.setInput(key, isSignal(passedInValue) ? passedInValue() : passedInValue); - } - }); - getComponentOutputs(fixture.componentRef.componentType).forEach((key) => { - var _a, _b; - const property = component[key]; - // With the introduction of https://github.com/cypress-io/cypress/pull/31993, we want to make sure that component inputs are reference safe inside cy.mount(). - // However, the exception to this is if the user passes in a Cypress output spy as a property in order to maintain backwards compatibility. - // @ts-expect-error - if (property instanceof EventEmitter || (((_a = config === null || config === void 0 ? void 0 : config.componentProperties) === null || _a === void 0 ? void 0 : _a.hasOwnProperty(key)) && (config === null || config === void 0 ? void 0 : config.componentProperties[key]) instanceof EventEmitter)) { - // only assign props if they are passed into the component - if ((_b = config === null || config === void 0 ? void 0 : config.componentProperties) === null || _b === void 0 ? void 0 : _b.hasOwnProperty(key)) { - // @ts-expect-error - const passedInValue = config === null || config === void 0 ? void 0 : config.componentProperties[key]; - component[key] = passedInValue; - } - } - }); - } - // Manually call ngOnChanges when mounting components using the class syntax. - // This is necessary because we are assigning input values to the class directly - // on mount and therefore the ngOnChanges() lifecycle is not triggered. - if (component.ngOnChanges && config.componentProperties) { - const { componentProperties } = config; - const simpleChanges = Object.entries(componentProperties).reduce((acc, [key, value]) => { - acc[key] = new SimpleChange(null, value, true); - return acc; - }, {}); - if (Object.keys(componentProperties).length > 0) { - component.ngOnChanges(simpleChanges); - } - } -} -/** - * Gets the input properties of a component - cannot rely on Object.keys() because inclusion of optional properties depends on useDefineForClassFields=true - * Since Angular 15, useDefineForClassFields=false - * @param componentType - * @returns array of input property names - */ -function getComponentInputs(componentType) { - var _a; - // Access Angular's metadata to get input properties - const propMetadata = ((_a = componentType.ɵcmp) === null || _a === void 0 ? void 0 : _a.inputs) || {}; - return Object.keys(propMetadata); -} -function getComponentOutputs(componentType) { - var _a; - // Access Angular's metadata to get output properties - const propMetadata = ((_a = componentType.ɵcmp) === null || _a === void 0 ? void 0 : _a.outputs) || {}; - return Object.keys(propMetadata); -} -/** - * Mounts an Angular component inside Cypress browser - * - * @param component Angular component being mounted or its template - * @param config configuration used to configure the TestBed - * @example - * import { mount } from '@cypress/angular' - * import { StepperComponent } from './stepper.component' - * import { MyService } from 'services/my.service' - * import { SharedModule } from 'shared/shared.module'; - * it('mounts', () => { - * mount(StepperComponent, { - * providers: [MyService], - * imports: [SharedModule] - * }) - * cy.get('[data-cy=increment]').click() - * cy.get('[data-cy=counter]').should('have.text', '1') - * }) - * - * // or - * - * it('mounts with template', () => { - * mount('', { - * declarations: [StepperComponent], - * }) - * }) - * - * @see {@link https://on.cypress.io/mounting-angular} for more details. - * - * @returns A component and component fixture - */ -function mount(component, config = {}) { - // Remove last mounted component if cy.mount is called more than once in a test - if (activeFixture) { - cleanup(); - } - const componentFixture = initTestBed(component, config); - let mountResponsePromiseResolver; - let mountResponsePromiseRejector; - let mountResponsePromise = new Promise((resolve, reject) => { - mountResponsePromiseResolver = resolve; - mountResponsePromiseRejector = reject; - }); - const fixture = setupFixture(componentFixture, config); - activeFixture = fixture; - fixture.whenStable().then(() => { - const mountResponse = { - fixture, - component: fixture.componentInstance, - }; - const logMessage = typeof component === 'string' ? 'Component' : componentFixture.name; - Cypress.log({ - name: 'mount', - message: logMessage, - consoleProps: () => ({ result: mountResponse }), - }); - mountResponsePromiseResolver(mountResponse); - }).catch((error) => { - mountResponsePromiseRejector(error); - }); - return cy.wrap(mountResponsePromise, { log: false }); -} -/** - * Creates a new Event Emitter and then spies on it's `emit` method - * - * @param {string} alias name you want to use for your cy.spy() alias - * @returns EventEmitter - * @example - * import { StepperComponent } from './stepper.component' - * import { mount, createOutputSpy } from '@cypress/angular' - * - * it('Has spy', () => { - * mount(StepperComponent, { componentProperties: { change: createOutputSpy('changeSpy') } }) - * cy.get('[data-cy=increment]').click() - * cy.get('@changeSpy').should('have.been.called') - * }) - * - * // Or for use with Angular Signals following the output nomenclature. - * // see https://v17.angular.io/guide/model-inputs#differences-between-model-and-input/ - * - * it('Has spy', () => { - * mount(StepperComponent, { componentProperties: { count: signal(0), countChange: createOutputSpy('countChange') } }) - * cy.get('[data-cy=increment]').click() - * cy.get('@countChange').should('have.been.called') - * }) - */ -const createOutputSpy = (alias) => { - const emitter = new EventEmitter(); - cy.spy(emitter, 'emit').as(alias); - return emitter; -}; -// Only needs to run once, we reset before each test -getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), { - teardown: { destroyAfterEach: false }, -}); -setupHooks(cleanup); - -export { CypressTestComponentRenderer, createOutputSpy, mount }; diff --git a/node_modules/cypress/angular-zoneless/angular-zoneless/package.json b/node_modules/cypress/angular-zoneless/angular-zoneless/package.json deleted file mode 100644 index a2c650ef..00000000 --- a/node_modules/cypress/angular-zoneless/angular-zoneless/package.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "name": "@cypress/angular-zoneless", - "version": "0.0.0-development", - "description": "Test Angular Components with Cypress without zone.js", - "main": "dist/index.js", - "scripts": { - "prebuild": "rimraf dist", - "build": "rollup -c rollup.config.mjs", - "postbuild": "node ../../scripts/sync-exported-npm-with-cli.js", - "check-ts": "tsc --noEmit", - "dev": "rollup -c rollup.config.mjs -w", - "lint": "eslint --ext .js,.ts,.json, ." - }, - "dependencies": {}, - "devDependencies": { - "@angular/common": "^21.0.0", - "@angular/core": "^21.0.0", - "@angular/platform-browser-dynamic": "^21.0.0", - "@cypress/mount-utils": "0.0.0-development", - "rollup": "^4.24.4", - "typescript": "~5.9.2" - }, - "peerDependencies": { - "@angular/common": ">=20.0.0", - "@angular/core": ">=20.0.0", - "@angular/platform-browser-dynamic": ">=20.0.0", - "rxjs": ">=7.8.0" - }, - "files": [ - "dist" - ], - "types": "dist/index.d.ts", - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/cypress-io/cypress.git" - }, - "homepage": "https://github.com/cypress-io/cypress/blob/develop/npm/angular-zoneless/#readme", - "bugs": "https://github.com/cypress-io/cypress/issues/new?assignees=&labels=npm%3A%20%40cypress%2Fangular-zoneless&template=1-bug-report.md&title=", - "keywords": [ - "angular", - "cypress", - "cypress-io", - "test", - "testing", - "zoneless" - ], - "contributors": [ - { - "name": "Bill Glesias", - "social": "@atofstryker" - } - ], - "module": "dist/index.js", - "publishConfig": { - "access": "public" - }, - "nx": { - "targets": { - "build": { - "outputs": [ - "{workspaceRoot}/cli/angular-zoneless" - ] - } - } - }, - "standard": { - "globals": [ - "Cypress", - "cy", - "expect" - ] - } -} diff --git a/node_modules/cypress/angular-zoneless/dist/index.d.ts b/node_modules/cypress/angular-zoneless/dist/index.d.ts deleted file mode 100644 index f5211540..00000000 --- a/node_modules/cypress/angular-zoneless/dist/index.d.ts +++ /dev/null @@ -1,119 +0,0 @@ -/// - -import { InputSignal, WritableSignal, Type } from '@angular/core'; -import { TestModuleMetadata, ComponentFixture, TestComponentRenderer } from '@angular/core/testing'; - -/** - * Additional module configurations needed while mounting the component, like - * providers, declarations, imports and even component @Inputs() - * - * @interface MountConfig - * @see https://angular.io/api/core/testing/TestModuleMetadata - */ -interface MountConfig extends TestModuleMetadata { - /** - * @memberof MountConfig - * @example - * import { ButtonComponent } from 'button/button.component' - * it('renders a button with Save text', () => { - * cy.mount(ButtonComponent, { componentProperties: { text: 'Save' }}) - * cy.get('button').contains('Save') - * }) - * - * it('renders a button with a cy.spy() replacing EventEmitter', () => { - * cy.mount(ButtonComponent, { - * componentProperties: { - * clicked: cy.spy().as('mySpy) - * } - * }) - * cy.get('button').click() - * cy.get('@mySpy').should('have.been.called') - * }) - */ - componentProperties?: Partial<{ - [P in keyof T]: T[P] extends InputSignal ? InputSignal | WritableSignal | V : T[P]; - }>; -} -/** - * Type that the `mount` function returns - * @type MountResponse - */ -type MountResponse = { - /** - * Fixture for debugging and testing a component. - * - * @memberof MountResponse - * @see https://angular.io/api/core/testing/ComponentFixture - */ - fixture: ComponentFixture; - /** - * The instance of the root component class - * - * @memberof MountResponse - * @see https://angular.io/api/core/testing/ComponentFixture#componentInstance - */ - component: T; -}; -declare class CypressTestComponentRenderer extends TestComponentRenderer { - insertRootElement(rootElId: string): void; - removeAllRootElements(): void; -} -/** - * Mounts an Angular component inside Cypress browser - * - * @param component Angular component being mounted or its template - * @param config configuration used to configure the TestBed - * @example - * import { mount } from '@cypress/angular' - * import { StepperComponent } from './stepper.component' - * import { MyService } from 'services/my.service' - * import { SharedModule } from 'shared/shared.module'; - * it('mounts', () => { - * mount(StepperComponent, { - * providers: [MyService], - * imports: [SharedModule] - * }) - * cy.get('[data-cy=increment]').click() - * cy.get('[data-cy=counter]').should('have.text', '1') - * }) - * - * // or - * - * it('mounts with template', () => { - * mount('', { - * declarations: [StepperComponent], - * }) - * }) - * - * @see {@link https://on.cypress.io/mounting-angular} for more details. - * - * @returns A component and component fixture - */ -declare function mount(component: Type | string, config?: MountConfig): Cypress.Chainable>; -/** - * Creates a new Event Emitter and then spies on it's `emit` method - * - * @param {string} alias name you want to use for your cy.spy() alias - * @returns EventEmitter - * @example - * import { StepperComponent } from './stepper.component' - * import { mount, createOutputSpy } from '@cypress/angular' - * - * it('Has spy', () => { - * mount(StepperComponent, { componentProperties: { change: createOutputSpy('changeSpy') } }) - * cy.get('[data-cy=increment]').click() - * cy.get('@changeSpy').should('have.been.called') - * }) - * - * // Or for use with Angular Signals following the output nomenclature. - * // see https://v17.angular.io/guide/model-inputs#differences-between-model-and-input/ - * - * it('Has spy', () => { - * mount(StepperComponent, { componentProperties: { count: signal(0), countChange: createOutputSpy('countChange') } }) - * cy.get('[data-cy=increment]').click() - * cy.get('@countChange').should('have.been.called') - * }) - */ -declare const createOutputSpy: (alias: string) => any; - -export { CypressTestComponentRenderer, MountConfig, MountResponse, createOutputSpy, mount }; diff --git a/node_modules/cypress/angular-zoneless/dist/index.js b/node_modules/cypress/angular-zoneless/dist/index.js deleted file mode 100644 index 99dd3c81..00000000 --- a/node_modules/cypress/angular-zoneless/dist/index.js +++ /dev/null @@ -1,482 +0,0 @@ - -/** - * @cypress/angular-zoneless v0.0.0-development - * (c) 2026 Cypress.io - * Released under the MIT License - */ - -import { CommonModule } from '@angular/common'; -import { Injectable, Component, EventEmitter, ErrorHandler, provideZonelessChangeDetection, SimpleChange } from '@angular/core'; -import { toObservable } from '@angular/core/rxjs-interop'; -import { getTestBed, TestComponentRenderer, TestBed } from '@angular/core/testing'; -import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing'; - -/****************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -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. -***************************************************************************** */ -/* global Reflect, Promise, SuppressedError, Symbol, Iterator */ - - -function __rest(s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; -} - -function __decorate(decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -} - -typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { - var e = new Error(message); - return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; -}; - -const ROOT_SELECTOR = '[data-cy-root]'; -/** - * Gets the root element used to mount the component. - * @returns {HTMLElement} The root element - * @throws {Error} If the root element is not found - */ -const getContainerEl = () => { - const el = document.querySelector(ROOT_SELECTOR); - if (el) { - return el; - } - throw Error(`No element found that matches selector ${ROOT_SELECTOR}. Please add a root element with data-cy-root attribute to your "component-index.html" file so that Cypress can attach your component to the DOM.`); -}; -/** - * Utility function to register CT side effects and run cleanup code during the "test:before:run" Cypress hook - * @param optionalCallback Callback to be called before the next test runs - */ -function setupHooks(optionalCallback) { - // We don't want CT side effects to run when e2e - // testing so we early return. - // System test to verify CT side effects do not pollute e2e: system-tests/test/e2e_with_mount_import_spec.ts - if (Cypress.testingType !== 'component') { - return; - } - // When running component specs, we cannot allow "cy.visit" - // because it will wipe out our preparation work, and does not make much sense - // thus we overwrite "cy.visit" to throw an error - Cypress.Commands.overwrite('visit', () => { - throw new Error('cy.visit from a component spec is not allowed'); - }); - Cypress.Commands.overwrite('session', () => { - throw new Error('cy.session from a component spec is not allowed'); - }); - Cypress.Commands.overwrite('origin', () => { - throw new Error('cy.origin from a component spec is not allowed'); - }); - // @ts-ignore - Cypress.on('test:before:after:run:async', () => { - optionalCallback === null || optionalCallback === void 0 ? void 0 : optionalCallback(); - }); -} - -let activeFixture = null; -let activeInternalSubscriptions = []; -function cleanup() { - // Not public, we need to call this to remove the last component from the DOM - try { - getTestBed().tearDownTestingModule(); - } - catch (e) { - const notSupportedError = new Error(`Failed to teardown component. The version of Angular you are using may not be officially supported.`); - notSupportedError.docsUrl = 'https://on.cypress.io/frameworks'; - throw notSupportedError; - } - // clean up internal subscriptions if any exist. We use this for two-way data binding for - // signal() models - activeInternalSubscriptions.forEach((subscription) => { - subscription.unsubscribe(); - }); - getTestBed().resetTestingModule(); - activeFixture = null; - activeInternalSubscriptions = []; -} -let CypressAngularErrorHandler = class CypressAngularErrorHandler { - handleError(error) { - throw error; - } -}; -CypressAngularErrorHandler = __decorate([ - Injectable() -], CypressAngularErrorHandler); -/** - * Bootstraps the TestModuleMetaData passed to the TestBed - * - * @param {Type} component Angular component being mounted - * @param {MountConfig} config TestBed configuration passed into the mount function - * @returns {MountConfig} MountConfig - */ -function bootstrapModule(component, config) { - var _a; - const { componentProperties } = config, testModuleMetaData = __rest(config, ["componentProperties"]); - if (!testModuleMetaData.declarations) { - testModuleMetaData.declarations = []; - } - if (!testModuleMetaData.imports) { - testModuleMetaData.imports = []; - } - if (!testModuleMetaData.providers) { - testModuleMetaData.providers = []; - } - // Replace default error handler since it will swallow uncaught exceptions. - // We want these to be uncaught so Cypress catches it and fails the test - testModuleMetaData.providers.push({ - provide: ErrorHandler, - useClass: CypressAngularErrorHandler, - }); - // allow for zoneless change detection inside the testing module. - // @see https://angular.dev/guide/zoneless#using-zoneless-in-testbed - testModuleMetaData.providers.push(provideZonelessChangeDetection()); - // check if the component is a standalone component - if ((_a = component.ɵcmp) === null || _a === void 0 ? void 0 : _a.standalone) { - testModuleMetaData.imports.push(component); - } - else { - testModuleMetaData.declarations.push(component); - } - if (!testModuleMetaData.imports.includes(CommonModule)) { - testModuleMetaData.imports.push(CommonModule); - } - return testModuleMetaData; -} -let CypressTestComponentRenderer = class CypressTestComponentRenderer extends TestComponentRenderer { - insertRootElement(rootElId) { - this.removeAllRootElements(); - const rootElement = getContainerEl(); - rootElement.setAttribute('id', rootElId); - } - removeAllRootElements() { - getContainerEl().innerHTML = ''; - } -}; -CypressTestComponentRenderer = __decorate([ - Injectable() -], CypressTestComponentRenderer); -/** - * Initializes the TestBed - * - * @param {Type | string} component Angular component being mounted or its template - * @param {MountConfig} config TestBed configuration passed into the mount function - * @returns {Type} componentFixture - */ -function initTestBed(component, config) { - const componentFixture = createComponentFixture(component); - getTestBed().configureTestingModule(Object.assign({}, bootstrapModule(componentFixture, config))); - getTestBed().overrideProvider(TestComponentRenderer, { useValue: new CypressTestComponentRenderer() }); - return componentFixture; -} -// if using the Wrapper Component (template strings), the component itself cannot be -// a standalone component -let WrapperComponent = class WrapperComponent { -}; -WrapperComponent = __decorate([ - Component({ selector: 'cy-wrapper-component', template: '', standalone: false }) -], WrapperComponent); -/** - * Returns the Component if Type or creates a WrapperComponent - * - * @param {Type | string} component The component you want to create a fixture of - * @returns {Type | WrapperComponent} - */ -function createComponentFixture(component) { - if (typeof component === 'string') { - // getTestBed().overrideTemplate is available in v14+ - // The static TestBed.overrideTemplate is available across versions - TestBed.overrideTemplate(WrapperComponent, component); - return WrapperComponent; - } - return component; -} -/** - * Creates the ComponentFixture - * - * @param {Type} component Angular component being mounted - * @param {MountConfig} config MountConfig - - * @returns {Promise>} ComponentFixture - */ -function setupFixture(component, config) { - const fixture = getTestBed().createComponent(component); - setupComponent(config, fixture); - return fixture; -} -// Best known way to currently detect whether or not a function is a signal is if the signal symbol exists. -// From there, we can take our best guess based on what exists on the object itself. -// @see https://github.com/cypress-io/cypress/issues/29731. -function isSignal(prop) { - try { - const symbol = Object.getOwnPropertySymbols(prop).find((symbol) => symbol.toString() === 'Symbol(SIGNAL)'); - return !!symbol; - } - catch (e) { - // likely a primitive type, object, array, or something else (i.e. not a signal). - // We can return false here. - return false; - } -} -// currently not a great way to detect if a function is an InputSignal. -// @see https://github.com/cypress-io/cypress/issues/29731. -function isInputSignal(prop) { - return isSignal(prop) && typeof prop === 'function' && prop['name'] === 'inputValueFn'; -} -// currently not a great way to detect if a function is a Model Signal. -// @see https://github.com/cypress-io/cypress/issues/29731. -function isModelSignal(prop) { - return isSignal(prop) && isWritableSignal(prop) && typeof prop.subscribe === 'function'; -} -// currently not a great way to detect if a function is a Writable Signal. -// @see https://github.com/cypress-io/cypress/issues/29731. -function isWritableSignal(prop) { - return isSignal(prop) && typeof prop === 'function' && typeof prop.set === 'function'; -} -function registerSignalEventsIfNeeded(propKey, propValue, componentValue, injector, fixture) { - const isPropValueASignal = isSignal(propValue); - if (isPropValueASignal) { - // propValue -> componentValue - const convertedToObservable = toObservable(propValue, { - // @ts-expect-error - monorepo clashing types between Angular 18 and Angular 21 - injector, - }); - // push the subscription into an array to be cleaned up at the end of the test - // to prevent a memory leak - activeInternalSubscriptions.push(convertedToObservable.subscribe((value) => { - // keep the component up to date as prop signal changes - fixture.componentRef.setInput(propKey, value); - })); - } - const isComponentValueAModelSignal = isModelSignal(componentValue); - if (isPropValueASignal && isComponentValueAModelSignal) { - // propValue <- componentValue - const modelChanged$ = toObservable(componentValue, { - // @ts-expect-error - monorepo clashing types between Angular 18 and Angular 21 - injector, - }); - activeInternalSubscriptions.push(modelChanged$.subscribe((value) => { - propValue.set(value); - })); - } -} -// In the case of signals, if we need to create an output spy, we need to check first whether or not a user has one defined first or has it created through -// autoSpyOutputs. If so, we need to subscribe to the writable signal to push updates into the event emitter. We do NOT observe input signals and output spies will not -// work for input signals. -function detectAndRegisterOutputSpyToSignal(config, component, key, injector) { - if (config.componentProperties) { - const expectedChangeKey = `${key}Change`; - let changeKeyIfExists = !!Object.keys(config.componentProperties).find((componentKey) => componentKey === expectedChangeKey); - if (changeKeyIfExists) { - component[expectedChangeKey] = - // @ts-expect-error - config.componentProperties[expectedChangeKey]; - } - if (changeKeyIfExists) { - const componentValue = component[key]; - // if the user passed in a change key or we created one due to config.autoSpyOutputs being set to true for a given signal, - // we will create a subscriber that will emit an event every time the value inside the signal changes. We only do this - // if the signal is writable and not an input signal. - if (isWritableSignal(componentValue) && !isInputSignal(componentValue)) { - activeInternalSubscriptions.push(toObservable(componentValue, { - // @ts-expect-error - monorepo clashing types between Angular 18 and Angular 21 - injector, - }).subscribe((value) => { - var _a; - (_a = component[expectedChangeKey]) === null || _a === void 0 ? void 0 : _a.emit(value); - })); - } - } - } -} -/** - * Gets the componentInstance and Object.assigns any componentProperties() passed in the MountConfig - * - * @param {MountConfig} config TestBed configuration passed into the mount function - * @param {ComponentFixture} fixture Fixture for debugging and testing a component. - * @returns {T} Component being mounted - */ -function setupComponent(config, fixture) { - let component = fixture.componentInstance; - const injector = fixture.componentRef.injector; - if (config === null || config === void 0 ? void 0 : config.componentProperties) { - if (component instanceof WrapperComponent) { - component = Object.assign(component, config.componentProperties); - } - getComponentInputs(fixture.componentRef.componentType).forEach((key) => { - var _a; - // only assign props if they are passed into the component - if ((_a = config === null || config === void 0 ? void 0 : config.componentProperties) === null || _a === void 0 ? void 0 : _a.hasOwnProperty(key)) { - // @ts-expect-error - const passedInValue = config === null || config === void 0 ? void 0 : config.componentProperties[key]; - registerSignalEventsIfNeeded(key, passedInValue, component[key], injector, fixture); - detectAndRegisterOutputSpyToSignal(config, component, key, injector); - fixture.componentRef.setInput(key, isSignal(passedInValue) ? passedInValue() : passedInValue); - } - }); - getComponentOutputs(fixture.componentRef.componentType).forEach((key) => { - var _a, _b; - const property = component[key]; - // With the introduction of https://github.com/cypress-io/cypress/pull/31993, we want to make sure that component inputs are reference safe inside cy.mount(). - // However, the exception to this is if the user passes in a Cypress output spy as a property in order to maintain backwards compatibility. - // @ts-expect-error - if (property instanceof EventEmitter || (((_a = config === null || config === void 0 ? void 0 : config.componentProperties) === null || _a === void 0 ? void 0 : _a.hasOwnProperty(key)) && (config === null || config === void 0 ? void 0 : config.componentProperties[key]) instanceof EventEmitter)) { - // only assign props if they are passed into the component - if ((_b = config === null || config === void 0 ? void 0 : config.componentProperties) === null || _b === void 0 ? void 0 : _b.hasOwnProperty(key)) { - // @ts-expect-error - const passedInValue = config === null || config === void 0 ? void 0 : config.componentProperties[key]; - component[key] = passedInValue; - } - } - }); - } - // Manually call ngOnChanges when mounting components using the class syntax. - // This is necessary because we are assigning input values to the class directly - // on mount and therefore the ngOnChanges() lifecycle is not triggered. - if (component.ngOnChanges && config.componentProperties) { - const { componentProperties } = config; - const simpleChanges = Object.entries(componentProperties).reduce((acc, [key, value]) => { - acc[key] = new SimpleChange(null, value, true); - return acc; - }, {}); - if (Object.keys(componentProperties).length > 0) { - component.ngOnChanges(simpleChanges); - } - } -} -/** - * Gets the input properties of a component - cannot rely on Object.keys() because inclusion of optional properties depends on useDefineForClassFields=true - * Since Angular 15, useDefineForClassFields=false - * @param componentType - * @returns array of input property names - */ -function getComponentInputs(componentType) { - var _a; - // Access Angular's metadata to get input properties - const propMetadata = ((_a = componentType.ɵcmp) === null || _a === void 0 ? void 0 : _a.inputs) || {}; - return Object.keys(propMetadata); -} -function getComponentOutputs(componentType) { - var _a; - // Access Angular's metadata to get output properties - const propMetadata = ((_a = componentType.ɵcmp) === null || _a === void 0 ? void 0 : _a.outputs) || {}; - return Object.keys(propMetadata); -} -/** - * Mounts an Angular component inside Cypress browser - * - * @param component Angular component being mounted or its template - * @param config configuration used to configure the TestBed - * @example - * import { mount } from '@cypress/angular' - * import { StepperComponent } from './stepper.component' - * import { MyService } from 'services/my.service' - * import { SharedModule } from 'shared/shared.module'; - * it('mounts', () => { - * mount(StepperComponent, { - * providers: [MyService], - * imports: [SharedModule] - * }) - * cy.get('[data-cy=increment]').click() - * cy.get('[data-cy=counter]').should('have.text', '1') - * }) - * - * // or - * - * it('mounts with template', () => { - * mount('', { - * declarations: [StepperComponent], - * }) - * }) - * - * @see {@link https://on.cypress.io/mounting-angular} for more details. - * - * @returns A component and component fixture - */ -function mount(component, config = {}) { - // Remove last mounted component if cy.mount is called more than once in a test - if (activeFixture) { - cleanup(); - } - const componentFixture = initTestBed(component, config); - let mountResponsePromiseResolver; - let mountResponsePromiseRejector; - let mountResponsePromise = new Promise((resolve, reject) => { - mountResponsePromiseResolver = resolve; - mountResponsePromiseRejector = reject; - }); - const fixture = setupFixture(componentFixture, config); - activeFixture = fixture; - fixture.whenStable().then(() => { - const mountResponse = { - fixture, - component: fixture.componentInstance, - }; - const logMessage = typeof component === 'string' ? 'Component' : componentFixture.name; - Cypress.log({ - name: 'mount', - message: logMessage, - consoleProps: () => ({ result: mountResponse }), - }); - mountResponsePromiseResolver(mountResponse); - }).catch((error) => { - mountResponsePromiseRejector(error); - }); - return cy.wrap(mountResponsePromise, { log: false }); -} -/** - * Creates a new Event Emitter and then spies on it's `emit` method - * - * @param {string} alias name you want to use for your cy.spy() alias - * @returns EventEmitter - * @example - * import { StepperComponent } from './stepper.component' - * import { mount, createOutputSpy } from '@cypress/angular' - * - * it('Has spy', () => { - * mount(StepperComponent, { componentProperties: { change: createOutputSpy('changeSpy') } }) - * cy.get('[data-cy=increment]').click() - * cy.get('@changeSpy').should('have.been.called') - * }) - * - * // Or for use with Angular Signals following the output nomenclature. - * // see https://v17.angular.io/guide/model-inputs#differences-between-model-and-input/ - * - * it('Has spy', () => { - * mount(StepperComponent, { componentProperties: { count: signal(0), countChange: createOutputSpy('countChange') } }) - * cy.get('[data-cy=increment]').click() - * cy.get('@countChange').should('have.been.called') - * }) - */ -const createOutputSpy = (alias) => { - const emitter = new EventEmitter(); - cy.spy(emitter, 'emit').as(alias); - return emitter; -}; -// Only needs to run once, we reset before each test -getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), { - teardown: { destroyAfterEach: false }, -}); -setupHooks(cleanup); - -export { CypressTestComponentRenderer, createOutputSpy, mount }; diff --git a/node_modules/cypress/angular-zoneless/package.json b/node_modules/cypress/angular-zoneless/package.json deleted file mode 100644 index a2c650ef..00000000 --- a/node_modules/cypress/angular-zoneless/package.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "name": "@cypress/angular-zoneless", - "version": "0.0.0-development", - "description": "Test Angular Components with Cypress without zone.js", - "main": "dist/index.js", - "scripts": { - "prebuild": "rimraf dist", - "build": "rollup -c rollup.config.mjs", - "postbuild": "node ../../scripts/sync-exported-npm-with-cli.js", - "check-ts": "tsc --noEmit", - "dev": "rollup -c rollup.config.mjs -w", - "lint": "eslint --ext .js,.ts,.json, ." - }, - "dependencies": {}, - "devDependencies": { - "@angular/common": "^21.0.0", - "@angular/core": "^21.0.0", - "@angular/platform-browser-dynamic": "^21.0.0", - "@cypress/mount-utils": "0.0.0-development", - "rollup": "^4.24.4", - "typescript": "~5.9.2" - }, - "peerDependencies": { - "@angular/common": ">=20.0.0", - "@angular/core": ">=20.0.0", - "@angular/platform-browser-dynamic": ">=20.0.0", - "rxjs": ">=7.8.0" - }, - "files": [ - "dist" - ], - "types": "dist/index.d.ts", - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/cypress-io/cypress.git" - }, - "homepage": "https://github.com/cypress-io/cypress/blob/develop/npm/angular-zoneless/#readme", - "bugs": "https://github.com/cypress-io/cypress/issues/new?assignees=&labels=npm%3A%20%40cypress%2Fangular-zoneless&template=1-bug-report.md&title=", - "keywords": [ - "angular", - "cypress", - "cypress-io", - "test", - "testing", - "zoneless" - ], - "contributors": [ - { - "name": "Bill Glesias", - "social": "@atofstryker" - } - ], - "module": "dist/index.js", - "publishConfig": { - "access": "public" - }, - "nx": { - "targets": { - "build": { - "outputs": [ - "{workspaceRoot}/cli/angular-zoneless" - ] - } - } - }, - "standard": { - "globals": [ - "Cypress", - "cy", - "expect" - ] - } -} diff --git a/node_modules/cypress/angular/README.md b/node_modules/cypress/angular/README.md index caf9b74a..d0ea5398 100644 --- a/node_modules/cypress/angular/README.md +++ b/node_modules/cypress/angular/README.md @@ -6,7 +6,10 @@ Mount Angular components in the open source [Cypress.io](https://www.cypress.io/ ## Requirements -- Angular 18.0.0+ (`@cypress/angular@2` supports Angular 13 - 16 and `@cypress/angular@3` supports Angular 17). +- Angular `>=21.0.0` + - `@cypress/angular@4` supports Angular 18 - 19 + - `@cypress/angular@3` supports Angular 17 + - `@cypress/angular@2` supports Angular 13 - 16 ## Development diff --git a/node_modules/cypress/angular/angular/README.md b/node_modules/cypress/angular/angular/README.md index caf9b74a..d0ea5398 100644 --- a/node_modules/cypress/angular/angular/README.md +++ b/node_modules/cypress/angular/angular/README.md @@ -6,7 +6,10 @@ Mount Angular components in the open source [Cypress.io](https://www.cypress.io/ ## Requirements -- Angular 18.0.0+ (`@cypress/angular@2` supports Angular 13 - 16 and `@cypress/angular@3` supports Angular 17). +- Angular `>=21.0.0` + - `@cypress/angular@4` supports Angular 18 - 19 + - `@cypress/angular@3` supports Angular 17 + - `@cypress/angular@2` supports Angular 13 - 16 ## Development diff --git a/node_modules/cypress/angular/angular/dist/index.d.ts b/node_modules/cypress/angular/angular/dist/index.d.ts index 8d19e626..60ae4cd8 100644 --- a/node_modules/cypress/angular/angular/dist/index.d.ts +++ b/node_modules/cypress/angular/angular/dist/index.d.ts @@ -1,7 +1,7 @@ /// import { InputSignal, WritableSignal, Type } from '@angular/core'; -import { TestModuleMetadata, ComponentFixture, TestComponentRenderer } from '@angular/core/testing'; +import { TestComponentRenderer, TestModuleMetadata, ComponentFixture } from '@angular/core/testing'; /** * Additional module configurations needed while mounting the component, like @@ -11,23 +11,6 @@ import { TestModuleMetadata, ComponentFixture, TestComponentRenderer } from '@an * @see https://angular.io/api/core/testing/TestModuleMetadata */ interface MountConfig extends TestModuleMetadata { - /** - * @memberof MountConfig - * @description flag to automatically create a cy.spy() for every component @Output() property - * @example - * export class ButtonComponent { - * @Output clicked = new EventEmitter() - * } - * - * cy.mount(ButtonComponent, { autoSpyOutputs: true }) - * cy.get('@clickedSpy).should('have.been.called') - */ - autoSpyOutputs?: boolean; - /** - * @memberof MountConfig - * @description flag defaulted to true to automatically detect changes in your components - */ - autoDetectChanges?: boolean; /** * @memberof MountConfig * @example @@ -133,4 +116,5 @@ declare function mount(component: Type | string, config?: MountConfig): */ declare const createOutputSpy: (alias: string) => any; -export { CypressTestComponentRenderer, MountConfig, MountResponse, createOutputSpy, mount }; +export { CypressTestComponentRenderer, createOutputSpy, mount }; +export type { MountConfig, MountResponse }; diff --git a/node_modules/cypress/angular/angular/dist/index.js b/node_modules/cypress/angular/angular/dist/index.js index 0fd6aa77..d65e4842 100644 --- a/node_modules/cypress/angular/angular/dist/index.js +++ b/node_modules/cypress/angular/angular/dist/index.js @@ -5,53 +5,51 @@ * Released under the MIT License */ -import 'zone.js'; -import 'zone.js/testing'; import { CommonModule } from '@angular/common'; -import { Injectable, Component, EventEmitter, ErrorHandler, SimpleChange } from '@angular/core'; +import { Injectable, Component, EventEmitter, ErrorHandler, provideZonelessChangeDetection, SimpleChange } from '@angular/core'; import { toObservable } from '@angular/core/rxjs-interop'; import { getTestBed, TestComponentRenderer, TestBed } from '@angular/core/testing'; -import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing'; +import { BrowserTestingModule, platformBrowserTesting } from '@angular/platform-browser/testing'; -/****************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -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. -***************************************************************************** */ -/* global Reflect, Promise, SuppressedError, Symbol, Iterator */ - - -function __rest(s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; -} - -function __decorate(decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -} - -typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { - var e = new Error(message); - return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; +/****************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +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. +***************************************************************************** */ +/* global Reflect, Promise, SuppressedError, Symbol, Iterator */ + + +function __rest(s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +} + +function __decorate(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +} + +typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { + var e = new Error(message); + return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; }; const ROOT_SELECTOR = '[data-cy-root]'; @@ -92,15 +90,10 @@ function setupHooks(optionalCallback) { }); // @ts-ignore Cypress.on('test:before:after:run:async', () => { - optionalCallback === null || optionalCallback === void 0 ? void 0 : optionalCallback(); + optionalCallback?.(); }); } -/** - * @hack fixes "Mocha has already been patched with Zone" error. - */ -// @ts-ignore -window.Mocha['__zone_patch__'] = false; let activeFixture = null; let activeInternalSubscriptions = []; function cleanup() { @@ -155,6 +148,9 @@ function bootstrapModule(component, config) { provide: ErrorHandler, useClass: CypressAngularErrorHandler, }); + // allow for zoneless change detection inside the testing module. + // @see https://angular.dev/guide/zoneless#using-zoneless-in-testbed + testModuleMetaData.providers.push(provideZonelessChangeDetection()); // check if the component is a standalone component if ((_a = component.ɵcmp) === null || _a === void 0 ? void 0 : _a.standalone) { testModuleMetaData.imports.push(component); @@ -221,20 +217,11 @@ function createComponentFixture(component) { * @param {Type} component Angular component being mounted * @param {MountConfig} config MountConfig - * @returns {ComponentFixture} ComponentFixture + * @returns {Promise>} ComponentFixture */ function setupFixture(component, config) { const fixture = getTestBed().createComponent(component); setupComponent(config, fixture); - fixture.whenStable().then(() => { - var _a; - fixture.autoDetectChanges((_a = config.autoDetectChanges) !== null && _a !== void 0 ? _a : true); - }).catch((e) => { - // If this promise does not settle in Angular 19 it is rejected - // https://github.com/angular/angular/blob/main/CHANGELOG.md#1900-2024-11-19 - // eslint-disable-next-line no-console - console.error(e); - }); return fixture; } // Best known way to currently detect whether or not a function is a signal is if the signal symbol exists. @@ -303,11 +290,6 @@ function detectAndRegisterOutputSpyToSignal(config, component, key, injector) { // @ts-expect-error config.componentProperties[expectedChangeKey]; } - // since spies do NOT make change handlers by default, similar to the Output() decorator, we need to create the spy and subscribe to the signal - if (!changeKeyIfExists && config.autoSpyOutputs) { - component[expectedChangeKey] = createOutputSpy(`${expectedChangeKey}Spy`); - changeKeyIfExists = true; - } if (changeKeyIfExists) { const componentValue = component[key]; // if the user passed in a change key or we created one due to config.autoSpyOutputs being set to true for a given signal, @@ -365,14 +347,6 @@ function setupComponent(config, fixture) { } }); } - if (config.autoSpyOutputs) { - Object.keys(component).forEach((key) => { - const property = component[key]; - if (property instanceof EventEmitter) { - component[key] = createOutputSpy(`${key}Spy`); - } - }); - } // Manually call ngOnChanges when mounting components using the class syntax. // This is necessary because we are assigning input values to the class directly // on mount and therefore the ngOnChanges() lifecycle is not triggered. @@ -442,18 +416,30 @@ function mount(component, config = {}) { cleanup(); } const componentFixture = initTestBed(component, config); - activeFixture = setupFixture(componentFixture, config); - const mountResponse = { - fixture: activeFixture, - component: activeFixture.componentInstance, - }; - const logMessage = typeof component === 'string' ? 'Component' : componentFixture.name; - Cypress.log({ - name: 'mount', - message: logMessage, - consoleProps: () => ({ result: mountResponse }), + let mountResponsePromiseResolver; + let mountResponsePromiseRejector; + let mountResponsePromise = new Promise((resolve, reject) => { + mountResponsePromiseResolver = resolve; + mountResponsePromiseRejector = reject; + }); + const fixture = setupFixture(componentFixture, config); + activeFixture = fixture; + fixture.whenStable().then(() => { + const mountResponse = { + fixture, + component: fixture.componentInstance, + }; + const logMessage = typeof component === 'string' ? 'Component' : componentFixture.name; + Cypress.log({ + name: 'mount', + message: logMessage, + consoleProps: () => ({ result: mountResponse }), + }); + mountResponsePromiseResolver(mountResponse); + }).catch((error) => { + mountResponsePromiseRejector(error); }); - return cy.wrap(mountResponse, { log: false }); + return cy.wrap(mountResponsePromise, { log: false }); } /** * Creates a new Event Emitter and then spies on it's `emit` method @@ -485,7 +471,7 @@ const createOutputSpy = (alias) => { return emitter; }; // Only needs to run once, we reset before each test -getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), { +getTestBed().initTestEnvironment(BrowserTestingModule, platformBrowserTesting(), { teardown: { destroyAfterEach: false }, }); setupHooks(cleanup); diff --git a/node_modules/cypress/angular/angular/package.json b/node_modules/cypress/angular/angular/package.json index fa600674..415de02f 100644 --- a/node_modules/cypress/angular/angular/package.json +++ b/node_modules/cypress/angular/angular/package.json @@ -13,20 +13,18 @@ }, "dependencies": {}, "devDependencies": { - "@angular/common": "^18.0.0", - "@angular/core": "^18.0.0", - "@angular/platform-browser-dynamic": "^18.0.0", + "@angular/common": "^21.0.0", + "@angular/core": "^21.0.0", + "@angular/platform-browser": "^21.0.0", "@cypress/mount-utils": "0.0.0-development", - "rollup": "^4.24.4", - "typescript": "~5.4.5", - "zone.js": "~0.14.6" + "rollup": "^4.60.2", + "typescript": "~5.9.2" }, "peerDependencies": { - "@angular/common": ">=18.0.0", - "@angular/core": ">=18.0.0", - "@angular/platform-browser-dynamic": ">=18.0.0", - "rxjs": ">=7.5.0", - "zone.js": ">=0.14.0" + "@angular/common": ">=21.0.0", + "@angular/core": ">=21.0.0", + "@angular/platform-browser": ">=21.0.0", + "rxjs": ">=7.8.0" }, "files": [ "dist" @@ -44,7 +42,8 @@ "cypress", "cypress-io", "test", - "testing" + "testing", + "zoneless" ], "contributors": [ { diff --git a/node_modules/cypress/angular/dist/index.d.ts b/node_modules/cypress/angular/dist/index.d.ts index 8d19e626..60ae4cd8 100644 --- a/node_modules/cypress/angular/dist/index.d.ts +++ b/node_modules/cypress/angular/dist/index.d.ts @@ -1,7 +1,7 @@ /// import { InputSignal, WritableSignal, Type } from '@angular/core'; -import { TestModuleMetadata, ComponentFixture, TestComponentRenderer } from '@angular/core/testing'; +import { TestComponentRenderer, TestModuleMetadata, ComponentFixture } from '@angular/core/testing'; /** * Additional module configurations needed while mounting the component, like @@ -11,23 +11,6 @@ import { TestModuleMetadata, ComponentFixture, TestComponentRenderer } from '@an * @see https://angular.io/api/core/testing/TestModuleMetadata */ interface MountConfig extends TestModuleMetadata { - /** - * @memberof MountConfig - * @description flag to automatically create a cy.spy() for every component @Output() property - * @example - * export class ButtonComponent { - * @Output clicked = new EventEmitter() - * } - * - * cy.mount(ButtonComponent, { autoSpyOutputs: true }) - * cy.get('@clickedSpy).should('have.been.called') - */ - autoSpyOutputs?: boolean; - /** - * @memberof MountConfig - * @description flag defaulted to true to automatically detect changes in your components - */ - autoDetectChanges?: boolean; /** * @memberof MountConfig * @example @@ -133,4 +116,5 @@ declare function mount(component: Type | string, config?: MountConfig): */ declare const createOutputSpy: (alias: string) => any; -export { CypressTestComponentRenderer, MountConfig, MountResponse, createOutputSpy, mount }; +export { CypressTestComponentRenderer, createOutputSpy, mount }; +export type { MountConfig, MountResponse }; diff --git a/node_modules/cypress/angular/dist/index.js b/node_modules/cypress/angular/dist/index.js index 0fd6aa77..d65e4842 100644 --- a/node_modules/cypress/angular/dist/index.js +++ b/node_modules/cypress/angular/dist/index.js @@ -5,53 +5,51 @@ * Released under the MIT License */ -import 'zone.js'; -import 'zone.js/testing'; import { CommonModule } from '@angular/common'; -import { Injectable, Component, EventEmitter, ErrorHandler, SimpleChange } from '@angular/core'; +import { Injectable, Component, EventEmitter, ErrorHandler, provideZonelessChangeDetection, SimpleChange } from '@angular/core'; import { toObservable } from '@angular/core/rxjs-interop'; import { getTestBed, TestComponentRenderer, TestBed } from '@angular/core/testing'; -import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing'; +import { BrowserTestingModule, platformBrowserTesting } from '@angular/platform-browser/testing'; -/****************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -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. -***************************************************************************** */ -/* global Reflect, Promise, SuppressedError, Symbol, Iterator */ - - -function __rest(s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; -} - -function __decorate(decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; -} - -typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { - var e = new Error(message); - return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; +/****************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +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. +***************************************************************************** */ +/* global Reflect, Promise, SuppressedError, Symbol, Iterator */ + + +function __rest(s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +} + +function __decorate(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +} + +typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { + var e = new Error(message); + return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; }; const ROOT_SELECTOR = '[data-cy-root]'; @@ -92,15 +90,10 @@ function setupHooks(optionalCallback) { }); // @ts-ignore Cypress.on('test:before:after:run:async', () => { - optionalCallback === null || optionalCallback === void 0 ? void 0 : optionalCallback(); + optionalCallback?.(); }); } -/** - * @hack fixes "Mocha has already been patched with Zone" error. - */ -// @ts-ignore -window.Mocha['__zone_patch__'] = false; let activeFixture = null; let activeInternalSubscriptions = []; function cleanup() { @@ -155,6 +148,9 @@ function bootstrapModule(component, config) { provide: ErrorHandler, useClass: CypressAngularErrorHandler, }); + // allow for zoneless change detection inside the testing module. + // @see https://angular.dev/guide/zoneless#using-zoneless-in-testbed + testModuleMetaData.providers.push(provideZonelessChangeDetection()); // check if the component is a standalone component if ((_a = component.ɵcmp) === null || _a === void 0 ? void 0 : _a.standalone) { testModuleMetaData.imports.push(component); @@ -221,20 +217,11 @@ function createComponentFixture(component) { * @param {Type} component Angular component being mounted * @param {MountConfig} config MountConfig - * @returns {ComponentFixture} ComponentFixture + * @returns {Promise>} ComponentFixture */ function setupFixture(component, config) { const fixture = getTestBed().createComponent(component); setupComponent(config, fixture); - fixture.whenStable().then(() => { - var _a; - fixture.autoDetectChanges((_a = config.autoDetectChanges) !== null && _a !== void 0 ? _a : true); - }).catch((e) => { - // If this promise does not settle in Angular 19 it is rejected - // https://github.com/angular/angular/blob/main/CHANGELOG.md#1900-2024-11-19 - // eslint-disable-next-line no-console - console.error(e); - }); return fixture; } // Best known way to currently detect whether or not a function is a signal is if the signal symbol exists. @@ -303,11 +290,6 @@ function detectAndRegisterOutputSpyToSignal(config, component, key, injector) { // @ts-expect-error config.componentProperties[expectedChangeKey]; } - // since spies do NOT make change handlers by default, similar to the Output() decorator, we need to create the spy and subscribe to the signal - if (!changeKeyIfExists && config.autoSpyOutputs) { - component[expectedChangeKey] = createOutputSpy(`${expectedChangeKey}Spy`); - changeKeyIfExists = true; - } if (changeKeyIfExists) { const componentValue = component[key]; // if the user passed in a change key or we created one due to config.autoSpyOutputs being set to true for a given signal, @@ -365,14 +347,6 @@ function setupComponent(config, fixture) { } }); } - if (config.autoSpyOutputs) { - Object.keys(component).forEach((key) => { - const property = component[key]; - if (property instanceof EventEmitter) { - component[key] = createOutputSpy(`${key}Spy`); - } - }); - } // Manually call ngOnChanges when mounting components using the class syntax. // This is necessary because we are assigning input values to the class directly // on mount and therefore the ngOnChanges() lifecycle is not triggered. @@ -442,18 +416,30 @@ function mount(component, config = {}) { cleanup(); } const componentFixture = initTestBed(component, config); - activeFixture = setupFixture(componentFixture, config); - const mountResponse = { - fixture: activeFixture, - component: activeFixture.componentInstance, - }; - const logMessage = typeof component === 'string' ? 'Component' : componentFixture.name; - Cypress.log({ - name: 'mount', - message: logMessage, - consoleProps: () => ({ result: mountResponse }), + let mountResponsePromiseResolver; + let mountResponsePromiseRejector; + let mountResponsePromise = new Promise((resolve, reject) => { + mountResponsePromiseResolver = resolve; + mountResponsePromiseRejector = reject; + }); + const fixture = setupFixture(componentFixture, config); + activeFixture = fixture; + fixture.whenStable().then(() => { + const mountResponse = { + fixture, + component: fixture.componentInstance, + }; + const logMessage = typeof component === 'string' ? 'Component' : componentFixture.name; + Cypress.log({ + name: 'mount', + message: logMessage, + consoleProps: () => ({ result: mountResponse }), + }); + mountResponsePromiseResolver(mountResponse); + }).catch((error) => { + mountResponsePromiseRejector(error); }); - return cy.wrap(mountResponse, { log: false }); + return cy.wrap(mountResponsePromise, { log: false }); } /** * Creates a new Event Emitter and then spies on it's `emit` method @@ -485,7 +471,7 @@ const createOutputSpy = (alias) => { return emitter; }; // Only needs to run once, we reset before each test -getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), { +getTestBed().initTestEnvironment(BrowserTestingModule, platformBrowserTesting(), { teardown: { destroyAfterEach: false }, }); setupHooks(cleanup); diff --git a/node_modules/cypress/angular/package.json b/node_modules/cypress/angular/package.json index fa600674..415de02f 100644 --- a/node_modules/cypress/angular/package.json +++ b/node_modules/cypress/angular/package.json @@ -13,20 +13,18 @@ }, "dependencies": {}, "devDependencies": { - "@angular/common": "^18.0.0", - "@angular/core": "^18.0.0", - "@angular/platform-browser-dynamic": "^18.0.0", + "@angular/common": "^21.0.0", + "@angular/core": "^21.0.0", + "@angular/platform-browser": "^21.0.0", "@cypress/mount-utils": "0.0.0-development", - "rollup": "^4.24.4", - "typescript": "~5.4.5", - "zone.js": "~0.14.6" + "rollup": "^4.60.2", + "typescript": "~5.9.2" }, "peerDependencies": { - "@angular/common": ">=18.0.0", - "@angular/core": ">=18.0.0", - "@angular/platform-browser-dynamic": ">=18.0.0", - "rxjs": ">=7.5.0", - "zone.js": ">=0.14.0" + "@angular/common": ">=21.0.0", + "@angular/core": ">=21.0.0", + "@angular/platform-browser": ">=21.0.0", + "rxjs": ">=7.8.0" }, "files": [ "dist" @@ -44,7 +42,8 @@ "cypress", "cypress-io", "test", - "testing" + "testing", + "zoneless" ], "contributors": [ { diff --git a/node_modules/cypress/dist/bin/cypress b/node_modules/cypress/dist/bin/cypress index a70302ca..69caac4c 100755 --- a/node_modules/cypress/dist/bin/cypress +++ b/node_modules/cypress/dist/bin/cypress @@ -1,7 +1,7 @@ #!/usr/bin/env node 'use strict'; -var cli = require('../cli-_xePNEPj.js'); +var cli = require('../cli-Dl3GL9Ov.js'); require('../xvfb-BKRGwxlS.js'); require('os'); require('bluebird'); @@ -32,7 +32,7 @@ require('commander'); require('cli-table3'); require('dayjs'); require('dayjs/plugin/relativeTime'); -require('../spawn-BkpC5qQ4.js'); +require('../spawn-DpvsyDKg.js'); require('child_process'); require('listr2'); require('readline'); diff --git a/node_modules/cypress/dist/cli-_xePNEPj.js b/node_modules/cypress/dist/cli-Dl3GL9Ov.js similarity index 90% rename from node_modules/cypress/dist/cli-_xePNEPj.js rename to node_modules/cypress/dist/cli-Dl3GL9Ov.js index 8db54fac..04269207 100644 --- a/node_modules/cypress/dist/cli-_xePNEPj.js +++ b/node_modules/cypress/dist/cli-Dl3GL9Ov.js @@ -13,7 +13,7 @@ var dayjs = require('dayjs'); var relativeTime = require('dayjs/plugin/relativeTime'); var chalk = require('chalk'); var Bluebird = require('bluebird'); -var spawn = require('./spawn-BkpC5qQ4.js'); +var spawn = require('./spawn-DpvsyDKg.js'); var os = require('os'); var listr2 = require('listr2'); var timers = require('timers/promises'); @@ -30,1211 +30,54 @@ var require$$0 = require('stream'); var readline = require('readline'); var prettyBytes = require('pretty-bytes'); -const debug$8 = Debug('cypress:cli'); -const defaultBaseUrl = 'https://download.cypress.io/'; -const defaultMaxRedirects = 10; -const getProxyForUrlWithNpmConfig = (url) => { - return proxyFromEnv.getProxyForUrl(url) || - process.env.npm_config_https_proxy || - process.env.npm_config_proxy || - null; -}; -const getBaseUrl = () => { - if (xvfb.util.getEnv('CYPRESS_DOWNLOAD_MIRROR')) { - let baseUrl = xvfb.util.getEnv('CYPRESS_DOWNLOAD_MIRROR'); - if (!(baseUrl === null || baseUrl === void 0 ? void 0 : baseUrl.endsWith('/'))) { - baseUrl += '/'; - } - return baseUrl || defaultBaseUrl; - } - return defaultBaseUrl; -}; -const getCA = () => xvfb.__awaiter(void 0, void 0, void 0, function* () { - if (process.env.npm_config_cafile) { - try { - const caFileContent = yield fs.readFile(process.env.npm_config_cafile, 'utf8'); - return caFileContent; - } - catch (error) { - debug$8('error reading ca file', error); - return; - } - } - if (process.env.npm_config_ca) { - return process.env.npm_config_ca; - } - return; -}); -const prepend = (arch, urlPath, version) => { - const endpoint = new URL(urlPath, getBaseUrl()).toString(); - const platform = os.platform(); - const pathTemplate = xvfb.util.getEnv('CYPRESS_DOWNLOAD_PATH_TEMPLATE', true); - if ((platform === 'win32') && (arch === 'arm64')) { - debug$8(`detected platform ${platform} architecture ${arch} combination`); - arch = 'x64'; - debug$8(`overriding to download ${platform}-${arch} instead`); - } - return pathTemplate - ? (pathTemplate - .replace(/\\?\$\{endpoint\}/g, endpoint) - .replace(/\\?\$\{platform\}/g, platform) - .replace(/\\?\$\{arch\}/g, arch) - .replace(/\\?\$\{version\}/g, version)) - : `${endpoint}?platform=${platform}&arch=${arch}`; -}; -const getUrl = (arch, version) => { - if (_.isString(version) && version.match(/^https?:\/\/.*$/)) { - debug$8('version is already an url', version); - return version; - } - const urlPath = version ? `desktop/${version}` : 'desktop'; - return prepend(arch, urlPath, version || ''); -}; -const statusMessage = (err) => { - return (err.statusCode - ? [err.statusCode, err.statusMessage].join(' - ') - : err.toString()); -}; -const prettyDownloadErr = (err, url) => { - const msg = commonTags.stripIndent ` - URL: ${url} - ${statusMessage(err)} - `; - debug$8(msg); - return xvfb.throwFormErrorText(xvfb.errors.failedDownload)(msg); -}; /** - * Checks checksum and file size for the given file. Allows both - * values or just one of them to be checked. + * Get the size of a folder or a file. + * + * This function returns the actual file size of the folder (size), not the allocated space on disk (size on disk). + * For more details between the difference, check this link: + * https://www.howtogeek.com/180369/why-is-there-a-big-difference-between-size-and-size-on-disk/ + * + * @param {string} path path to the file or the folder. */ -const verifyDownloadedFile = (filename, expectedSize, expectedChecksum) => xvfb.__awaiter(void 0, void 0, void 0, function* () { - if (expectedSize && expectedChecksum) { - debug$8('verifying checksum and file size'); - return Bluebird.join(xvfb.util.getFileChecksum(filename), xvfb.util.getFileSize(filename), (checksum, filesize) => { - if (checksum === expectedChecksum && filesize === expectedSize) { - debug$8('downloaded file has the expected checksum and size ✅'); - return; - } - debug$8('raising error: checksum or file size mismatch'); - const text = commonTags.stripIndent ` - Corrupted download +function getSize(path$1) { + return xvfb.__awaiter(this, void 0, void 0, function* () { + const stat = yield fs.lstat(path$1); + if (stat.isDirectory()) { + const list = yield fs.readdir(path$1); + return Bluebird.resolve(list).reduce((prev, curr) => xvfb.__awaiter(this, void 0, void 0, function* () { + const currPath = path.join(path$1, curr); + const s = yield fs.lstat(currPath); + if (s.isDirectory()) { + return prev + (yield getSize(currPath)); + } + return prev + s.size; + }), 0); + } + return stat.size; + }); +} - Expected downloaded file to have checksum: ${expectedChecksum} - Computed checksum: ${checksum} +var dist = {}; - Expected downloaded file to have size: ${expectedSize} - Computed size: ${filesize} - `; - debug$8(text); - throw new Error(text); - }); - } - if (expectedChecksum) { - debug$8('only checking expected file checksum %d', expectedChecksum); - const checksum = yield xvfb.util.getFileChecksum(filename); - if (checksum === expectedChecksum) { - debug$8('downloaded file has the expected checksum ✅'); - return; - } - debug$8('raising error: file checksum mismatch'); - const text = commonTags.stripIndent ` - Corrupted download +var tapContract = {}; - Expected downloaded file to have checksum: ${expectedChecksum} - Computed checksum: ${checksum} - `; - throw new Error(text); - } - if (expectedSize) { - // maybe we don't have a checksum, but at least CDN returns content length - // which we can check against the file size - debug$8('only checking expected file size %d', expectedSize); - const filesize = yield xvfb.util.getFileSize(filename); - if (filesize === expectedSize) { - debug$8('downloaded file has the expected size ✅'); - return; - } - debug$8('raising error: file size mismatch'); - const text = commonTags.stripIndent ` - Corrupted download - - Expected downloaded file to have size: ${expectedSize} - Computed size: ${filesize} - `; - throw new Error(text); - } - debug$8('downloaded file lacks checksum or size to verify'); - return; -}); -// downloads from given url -// return an object with -// {filename: ..., downloaded: true} -const downloadFromUrl = ({ url, downloadDestination, progress, ca, version, redirectTTL = defaultMaxRedirects }) => { - if (redirectTTL <= 0) { - return Promise.reject(new Error(commonTags.stripIndent ` - Failed downloading the Cypress binary. - There were too many redirects. The default allowance is ${defaultMaxRedirects}. - Maybe you got stuck in a redirect loop? - `)); - } - return new Bluebird((resolve, reject) => { - const proxy = getProxyForUrlWithNpmConfig(url); - debug$8('Downloading package', { - url, - proxy, - downloadDestination, - }); - if (ca) { - debug$8('using custom CA details from npm config'); - } - const reqOptions = Object.assign(Object.assign(Object.assign({ uri: url }, (proxy ? { proxy } : {})), (ca ? { agentOptions: { ca } } : {})), { method: 'GET', followRedirect: false }); - const req = request(reqOptions); - // closure - let started = null; - let expectedSize; - let expectedChecksum; - requestProgress(req, { - throttle: progress.throttle, - }) - .on('response', (response) => { - // we have computed checksum and filesize during test runner binary build - // and have set it on the S3 object as user meta data, available via - // these custom headers "x-amz-meta-..." - // see https://github.com/cypress-io/cypress/pull/4092 - expectedSize = response.headers['x-amz-meta-size'] || - response.headers['content-length']; - expectedChecksum = response.headers['x-amz-meta-checksum']; - if (expectedChecksum) { - debug$8('expected checksum %s', expectedChecksum); - } - if (expectedSize) { - // convert from string (all Amazon custom headers are strings) - expectedSize = Number(expectedSize); - debug$8('expected file size %d', expectedSize); - } - // start counting now once we've gotten - // response headers - started = new Date(); - if (/^3/.test(response.statusCode)) { - const redirectVersion = response.headers['x-version']; - const redirectUrl = response.headers.location; - debug$8('redirect version:', redirectVersion); - debug$8('redirect url:', redirectUrl); - downloadFromUrl({ url: redirectUrl, progress, ca, downloadDestination, version: redirectVersion, redirectTTL: redirectTTL - 1 }) - .then(resolve).catch(reject); - // if our status code does not start with 200 - } - else if (!/^2/.test(response.statusCode)) { - debug$8('response code %d', response.statusCode); - const err = new Error(commonTags.stripIndent ` - Failed downloading the Cypress binary. - Response code: ${response.statusCode} - Response message: ${response.statusMessage} - `); - reject(err); - // status codes here are all 2xx - } - else { - // We only enable this pipe connection when we know we've got a successful return - // and handle the completion with verify and resolve - // there was a possible race condition between end of request and close of writeStream - // that is made ordered with this Promise.all - Bluebird.all([new Bluebird((r) => { - return response.pipe(fs.createWriteStream(downloadDestination).on('close', r)); - }), new Bluebird((r) => response.on('end', r))]) - .then(() => { - debug$8('downloading finished'); - verifyDownloadedFile(downloadDestination, expectedSize, expectedChecksum) - .then(() => debug$8('verified')) - .then(() => resolve(version)) - .catch(reject); - }); - } - }) - .on('error', (e) => { - if (e.code === 'ECONNRESET') - return; // sometimes proxies give ECONNRESET but we don't care - reject(e); - }) - .on('progress', (state) => { - // total time we've elapsed - // starting on our first progress notification - const elapsed = +new Date() - +started; - // request-progress sends a value between 0 and 1 - const percentage = xvfb.util.convertPercentToPercentage(state.percent); - const eta = xvfb.util.calculateEta(percentage, elapsed); - // send up our percent and seconds remaining - progress.onProgress(percentage, xvfb.util.secsRemaining(eta)); - }); - }); -}; -/** - * Download Cypress.zip from external versionUrl to local file. - * @param [string] version Could be "3.3.0" or full URL - * @param [string] downloadDestination Local filename to save as - */ -const start$3 = (opts) => xvfb.__awaiter(void 0, void 0, void 0, function* () { - let { version, downloadDestination, progress, redirectTTL } = opts; - if (!downloadDestination) { - assert.ok(_.isString(downloadDestination) && !_.isEmpty(downloadDestination), 'missing download dir'); - } - if (!progress) { - progress = { onProgress: () => { - return {}; - } }; - } - const arch = yield xvfb.util.getRealArch(); - const versionUrl = getUrl(arch, version); - progress.throttle = 100; - debug$8('needed Cypress version: %s', version); - debug$8('source url %s', versionUrl); - debug$8(`downloading cypress.zip to "${downloadDestination}"`); - try { - // ensure download dir exists - yield fs.ensureDir(path.dirname(downloadDestination)); - const ca = yield getCA(); - return downloadFromUrl(Object.assign({ url: versionUrl, downloadDestination, progress, ca, version }, (redirectTTL ? { redirectTTL } : {}))); - } - catch (err) { - return prettyDownloadErr(err, versionUrl); - } -}); -const downloadModule = { - start: start$3, - getUrl, - getProxyForUrlWithNpmConfig, - getCA, -}; - -const pipelineAsync = util.promisify(require$$0.pipeline); -// Unix file mode masks for entries stored in zip's externalFileAttributes -// (the high 16 bits when the file was zipped on a Unix host). -const S_IFMT = 0o170000; -const S_IFDIR = 0o040000; -const S_IFLNK = 0o120000; -// PATH_MAX on Linux/macOS is 4096; symlink targets larger than this are not -// legal filesystem paths and almost certainly indicate a malformed or -// malicious archive. The cap also prevents reading an arbitrarily large -// "symlink" entry into memory. -const MAX_SYMLINK_TARGET_BYTES = 4096; -/** - * Extracts the contents of a zip archive into the given destination directory. - * Recreates directories, regular files, and symlinks while preserving Unix - * file modes encoded in each entry's external attributes. Calls `onEntry` once - * per archive entry processed. Refuses entries whose resolved path would - * escape the destination directory. - */ -const extractWithYauzl = (zipFilePath, destDir, onEntry) => xvfb.__awaiter(void 0, void 0, void 0, function* () { - const resolvedDest = path.resolve(destDir); - yield new Promise((resolve, reject) => { - // autoClose: false — `finish` below owns closing the zipfile, so we don't - // want yauzl's internal end-listener closing it first and tripping a - // double-close (EBADF) when we do. - yauzl.open(zipFilePath, { lazyEntries: true, autoClose: false }, (err, zipFile) => { - if (err) { - return reject(err); - } - // `settled` guards against an in-flight `handleEntry` calling - // `zipFile.readEntry()` on a now-closed handle when extraction has - // already failed (e.g. yauzl emitted 'error' while we were writing - // an entry to disk). - let settled = false; - const finish = _.once((err) => { - var _a, _b; - settled = true; - (_a = zipFile.removeAllListeners) === null || _a === void 0 ? void 0 : _a.call(zipFile); - (_b = zipFile.close) === null || _b === void 0 ? void 0 : _b.call(zipFile); - if (err) { - return reject(err); - } - return resolve(); - }); - // Normalize any thrown / emitted value into a real Error so that a - // falsy rejection (e.g. `Promise.reject(undefined)`) doesn't get - // misread by `finish` as a successful completion. - const fail = (err) => { - finish(err instanceof Error ? err : new Error(typeof err === 'string' && err ? err : 'zip extraction failed')); - }; - zipFile.on('error', fail); - zipFile.on('end', () => finish()); - zipFile.on('entry', (entry) => { - handleEntry(zipFile, entry, resolvedDest) - .then(() => { - if (settled) - return; - onEntry(); - zipFile.readEntry(); - }) - .catch(fail); - }); - zipFile.readEntry(); - }); - }); -}); -const handleEntry = (zipFile, entry, resolvedDest) => xvfb.__awaiter(void 0, void 0, void 0, function* () { - const fileDest = path.resolve(resolvedDest, entry.fileName); - // refuse anything that would write outside the install dir - if (fileDest !== resolvedDest && - !fileDest.startsWith(resolvedDest + path.sep)) { - throw new Error(`Refusing to extract entry outside of destination: ${entry.fileName}`); - } - const unixMode = (entry.externalFileAttributes >>> 16) & 0xffff; - // Some archivers mark directories by Unix mode bits instead of (or in - // addition to) a trailing slash; honor both so we don't extract a - // directory entry as a zero-byte file. - const isDir = /\/$/.test(entry.fileName) || (unixMode & S_IFMT) === S_IFDIR; - const isSymlink = (unixMode & S_IFMT) === S_IFLNK; - if (isDir) { - yield fsp.mkdir(fileDest, { recursive: true }); - return; - } - yield fsp.mkdir(path.dirname(fileDest), { recursive: true }); - if (isSymlink) { - if (entry.uncompressedSize > MAX_SYMLINK_TARGET_BYTES) { - throw new Error(`Refusing to extract symlink with target larger than ${MAX_SYMLINK_TARGET_BYTES} bytes: ${entry.fileName}`); - } - const linkTarget = yield readEntryAsString(zipFile, entry, MAX_SYMLINK_TARGET_BYTES); - const resolvedTarget = path.resolve(path.dirname(fileDest), linkTarget); - if (resolvedTarget !== resolvedDest && - !resolvedTarget.startsWith(resolvedDest + path.sep)) { - throw new Error(`Refusing to extract symlink pointing outside of destination: ${entry.fileName} -> ${linkTarget}`); - } - yield fsp.rm(fileDest, { recursive: true, force: true }); - yield fsp.symlink(linkTarget, fileDest); - return; - } - const readStream = yield new Promise((res, rej) => { - zipFile.openReadStream(entry, (err, rs) => { - if (err) { - return rej(err); - } - return res(rs); - }); - }); - // Preserve the Unix mode bits when present; otherwise fall back to a sane default. - const fileMode = (unixMode & 0o7777) || 0o644; - const writeStream = fs$1.createWriteStream(fileDest, { mode: fileMode }); - yield pipelineAsync(readStream, writeStream); -}); -const readEntryAsString = (zipFile, entry, maxBytes) => { - return new Promise((resolve, reject) => { - zipFile.openReadStream(entry, (err, rs) => { - if (err) { - return reject(err); - } - const chunks = []; - let received = 0; - let bailed = false; - const bail = (err) => { - var _a; - if (bailed) - return; - bailed = true; - (_a = rs.destroy) === null || _a === void 0 ? void 0 : _a.call(rs, err); - reject(err); - }; - rs.on('data', (chunk) => { - received += chunk.length; - if (received > maxBytes) { - bail(new Error(`Refusing to read entry body larger than ${maxBytes} bytes: ${entry.fileName}`)); - return; - } - chunks.push(chunk); - }); - rs.on('end', () => { - if (bailed) - return; - resolve(Buffer.concat(chunks).toString('utf8')); - }); - rs.on('error', bail); - }); - }); -}; - -const debug$7 = Debug('cypress:cli:unzip'); -const unzipTools = { - extractWithYauzl, -}; -// expose this function for simple testing -const unzip = (_a) => xvfb.__awaiter(void 0, [_a], void 0, function* ({ zipFilePath, installDir, progress }) { - debug$7('unzipping from %s', zipFilePath); - debug$7('into', installDir); - if (!zipFilePath) { - throw new Error('Missing zip filename'); - } - const startTime = Date.now(); - let yauzlDoneTime = 0; - yield fs.ensureDir(installDir); - yield new Promise((resolve, reject) => { - // Open with lazyEntries so yauzl doesn't auto-emit entries (which would - // require the fd to stay open for the duration of the OS-tool extraction). - // We only need the entryCount here for the progress calculation. - return yauzl.open(zipFilePath, { lazyEntries: true }, (err, zipFile) => { - yauzlDoneTime = Date.now(); - if (err) { - debug$7('error using yauzl %s', err.message); - return reject(err); - } - const total = zipFile.entryCount; - debug$7('zipFile entries count', total); - // Close the count-only handle — the Node fallback re-opens the zip for extraction. - zipFile.close(); - const started = new Date(); - let percent = 0; - let count = 0; - const notify = (percent) => { - const elapsed = +new Date() - +started; - const eta = xvfb.util.calculateEta(percent, elapsed); - progress.onProgress(percent, xvfb.util.secsRemaining(eta)); - }; - const tick = () => { - count += 1; - percent = ((count / total) * 100); - const displayPercent = percent.toFixed(0); - return notify(Number(displayPercent)); - }; - const unzipWithNode = () => xvfb.__awaiter(void 0, void 0, void 0, function* () { - debug$7('unzipping with node.js (slow)'); - try { - yield unzipTools.extractWithYauzl(zipFilePath, installDir, tick); - debug$7('node unzip finished'); - return resolve(); - } - catch (err) { - const error = err || new Error('Unknown error with Node extract tool'); - debug$7('error %s', error.message); - return reject(error); - } - }); - const unzipFallback = _.once(unzipWithNode); - const unzipWithUnzipTool = () => { - debug$7('unzipping via `unzip`'); - const inflatingRe = /inflating:/; - const sp = cp.spawn('unzip', ['-o', zipFilePath, '-d', installDir]); - sp.on('error', (err) => { - debug$7('unzip tool error: %s', err.message); - unzipFallback(); - }); - sp.on('close', (code) => { - debug$7('unzip tool close with code %d', code); - if (code === 0) { - percent = 100; - notify(percent); - return resolve(); - } - debug$7('`unzip` failed %o', { code }); - return unzipFallback(); - }); - sp.stdout.on('data', (data) => { - if (inflatingRe.test(data)) { - return tick(); - } - }); - sp.stderr.on('data', (data) => { - debug$7('`unzip` stderr %s', data); - }); - }; - // we attempt to first unzip with the native osx - // ditto because its less likely to have problems - // with corruption, symlinks, or icons causing failures - // and can handle resource forks - // http://automatica.com.au/2011/02/unzip-mac-os-x-zip-in-terminal/ - const unzipWithOsx = () => { - debug$7('unzipping via `ditto`'); - const copyingFileRe = /^copying file/; - const sp = cp.spawn('ditto', ['-xkV', zipFilePath, installDir]); - // f-it just unzip with node - sp.on('error', (err) => { - debug$7(err.message); - unzipFallback(); - }); - sp.on('close', (code) => { - if (code === 0) { - // make sure we get to 100% on the progress bar - // because reading in lines is not really accurate - percent = 100; - notify(percent); - return resolve(); - } - debug$7('`ditto` failed %o', { code }); - return unzipFallback(); - }); - return readline.createInterface({ - input: sp.stderr, - }) - .on('line', (line) => { - if (copyingFileRe.test(line)) { - return tick(); - } - }); - }; - switch (os.platform()) { - case 'darwin': - return unzipWithOsx(); - case 'linux': - return unzipWithUnzipTool(); - case 'win32': - return unzipWithNode(); - default: - return; - } - }); - }); - debug$7('unzip completed %o', { - yauzlMs: yauzlDoneTime - startTime, - unzipMs: Date.now() - yauzlDoneTime, - }); -}); -function isMaybeWindowsMaxPathLengthError(err) { - return os.platform() === 'win32' && err.code === 'ENOENT' && err.syscall === 'realpath'; -} -const start$2 = (_a) => xvfb.__awaiter(void 0, [_a], void 0, function* ({ zipFilePath, installDir, progress }) { - assert.ok(_.isString(installDir) && !_.isEmpty(installDir), 'missing installDir'); - if (!progress) { - progress = { onProgress: () => { - return {}; - } }; - } - try { - const installDirExists = yield fs.pathExists(installDir); - if (installDirExists) { - debug$7('removing existing unzipped binary', installDir); - yield fs.remove(installDir); - } - yield unzip({ zipFilePath, installDir, progress }); - } - catch (err) { - const errorTemplate = isMaybeWindowsMaxPathLengthError(err) ? - xvfb.errors.failedUnzipWindowsMaxPathLength - : xvfb.errors.failedUnzip; - yield xvfb.throwFormErrorText(errorTemplate)(err); - } -}); -const unzipModule = { - start: start$2, - utils: { - unzip, - unzipTools, - }, -}; - -const debug$6 = Debug('cypress:cli:install'); -function _getBinaryUrlFromBuildInfo(version, arch, { commitSha, commitBranch }) { - const platform = os.platform(); - if ((platform === 'win32') && (arch === 'arm64')) { - debug$6(`detected platform ${platform} architecture ${arch} combination`); - arch = 'x64'; - debug$6(`overriding to download ${platform}-${arch} pre-release binary instead`); - } - return `https://cdn.cypress.io/beta/binary/${version}/${platform}-${arch}/${commitBranch}-${commitSha}/cypress.zip`; -} -const alreadyInstalledMsg = () => { - if (!xvfb.util.isPostInstall()) { - xvfb.loggerModule.log(commonTags.stripIndent ` - Skipping installation: - - Pass the ${chalk.yellow('--force')} option if you'd like to reinstall anyway. - `); - } -}; -const displayCompletionMsg = () => { - xvfb.loggerModule.log(); - xvfb.loggerModule.log('You can now open Cypress by running one of the following, depending on your package manager:'); - xvfb.loggerModule.log(); - xvfb.loggerModule.log(chalk.cyan('- npx cypress open')); - xvfb.loggerModule.log(chalk.cyan('- yarn cypress open')); - xvfb.loggerModule.log(chalk.cyan('- pnpm cypress open')); - xvfb.loggerModule.log(); - xvfb.loggerModule.log(chalk.grey('https://on.cypress.io/opening-the-app')); - xvfb.loggerModule.log(); -}; -const validateOS = () => xvfb.__awaiter(void 0, void 0, void 0, function* () { - const platformInfo = yield xvfb.util.getPlatformInfo(); - return platformInfo.match(/(win32-x64|win32-arm64|linux-x64|linux-arm64|darwin-x64|darwin-arm64)/); -}); -/** - * Returns the version to install - either a string like `1.2.3` to be fetched - * from the download server or a file path or HTTP URL. - */ -function getVersionOverride(version, { arch, envVarVersion, buildInfo }) { - // let this environment variable reset the binary version we need - if (envVarVersion) { - return envVarVersion; - } - if (buildInfo && !buildInfo.stable) { - xvfb.loggerModule.log(chalk.yellow(commonTags.stripIndent ` - ${logSymbols.warning} Warning: You are installing a pre-release build of Cypress. - - Bugs may be present which do not exist in production builds. - - This build was created from: - * Commit SHA: ${buildInfo.commitSha} - * Commit Branch: ${buildInfo.commitBranch} - * Commit Timestamp: ${buildInfo.commitDate} - `)); - xvfb.loggerModule.log(); - return _getBinaryUrlFromBuildInfo(version, arch, buildInfo); - } -} -function getEnvVarVersion() { - if (!xvfb.util.getEnv('CYPRESS_INSTALL_BINARY')) - return; - // because passed file paths are often double quoted - // and might have extra whitespace around, be robust and trim the string - const trimAndRemoveDoubleQuotes = true; - const envVarVersion = xvfb.util.getEnv('CYPRESS_INSTALL_BINARY', trimAndRemoveDoubleQuotes); - debug$6('using environment variable CYPRESS_INSTALL_BINARY "%s"', envVarVersion); - return envVarVersion; -} -const start$1 = (...args_1) => xvfb.__awaiter(void 0, [...args_1], void 0, function* (options = {}) { - debug$6('installing with options %j', options); - const envVarVersion = getEnvVarVersion(); - if (envVarVersion === '0') { - debug$6('environment variable CYPRESS_INSTALL_BINARY = 0, skipping install'); - xvfb.loggerModule.log(commonTags.stripIndent ` - ${chalk.yellow('Note:')} Skipping binary installation: Environment variable CYPRESS_INSTALL_BINARY = 0.`); - xvfb.loggerModule.log(); - return; - } - const pkgPath = xvfb.relativeToRepoRoot('package.json'); - if (!pkgPath) { - return xvfb.throwFormErrorText('Could not find package.json for Cypress package to determine build information')(); - } - const { buildInfo, version } = JSON.parse(yield fsp.readFile(pkgPath, 'utf8')); - _.defaults(options, { - force: false, - buildInfo, - }); - if (xvfb.util.getEnv('CYPRESS_CACHE_FOLDER')) { - const envCache = xvfb.util.getEnv('CYPRESS_CACHE_FOLDER'); - xvfb.loggerModule.log(commonTags.stripIndent ` - ${chalk.yellow('Note:')} Overriding Cypress cache directory to: ${chalk.cyan(envCache)} - - Previous installs of Cypress may not be found. - `); - xvfb.loggerModule.log(); - } - const pkgVersion = xvfb.util.pkgVersion(); - const arch = yield xvfb.util.getRealArch(); - const versionOverride = getVersionOverride(version, { arch, envVarVersion, buildInfo: options.buildInfo }); - const versionToInstall = versionOverride || pkgVersion; - debug$6('version in package.json is %s, version to install is %s', pkgVersion, versionToInstall); - const installDir = xvfb.stateModule.getVersionDir(pkgVersion, options.buildInfo); - const cacheDir = xvfb.stateModule.getCacheDir(); - const binaryDir = xvfb.stateModule.getBinaryDir(pkgVersion); - if (!(yield validateOS())) { - return xvfb.throwFormErrorText(xvfb.errors.invalidOS)(); - } - try { - yield fs.ensureDir(cacheDir); - } - catch (err) { - if (err instanceof Error && 'code' in err && err.code === 'EACCES') { - return xvfb.throwFormErrorText(xvfb.errors.invalidCacheDirectory)(commonTags.stripIndent ` - Failed to access ${chalk.cyan(cacheDir)}: - - ${err.message} - `); - } - else { - throw err; - } - } - const binaryPkg = yield xvfb.stateModule.getBinaryPkgAsync(binaryDir); - const binaryVersion = yield xvfb.stateModule.getBinaryPkgVersion(binaryPkg); - const shouldInstall = () => { - if (!binaryVersion) { - debug$6('no binary installed under cli version'); - return true; - } - xvfb.loggerModule.log(); - xvfb.loggerModule.log(commonTags.stripIndent ` - Cypress ${chalk.green(binaryVersion)} is installed in ${chalk.cyan(installDir)} - `); - xvfb.loggerModule.log(); - if (options.force) { - debug$6('performing force install over existing binary'); - return true; - } - if ((binaryVersion === versionToInstall) || !xvfb.util.isSemver(versionToInstall)) { - // our version matches, tell the user this is a noop - alreadyInstalledMsg(); - return false; - } - return true; - }; - // noop if we've been told not to download - if (!shouldInstall()) { - return debug$6('Not downloading or installing binary'); - } - if (envVarVersion) { - xvfb.loggerModule.log(chalk.yellow(commonTags.stripIndent ` - ${logSymbols.warning} Warning: Forcing a binary version different than the default. - - The CLI expected to install version: ${chalk.green(pkgVersion)} - - Instead we will install version: ${chalk.green(versionToInstall)} - - These versions may not work properly together. - `)); - xvfb.loggerModule.log(); - } - const getLocalFilePath = () => xvfb.__awaiter(void 0, void 0, void 0, function* () { - // see if version supplied is a path to a binary - if (yield fs.pathExists(versionToInstall)) { - return path.extname(versionToInstall) === '.zip' ? versionToInstall : false; - } - const possibleFile = xvfb.util.formAbsolutePath(versionToInstall); - debug$6('checking local file', possibleFile, 'cwd', process.cwd()); - // if this exists return the path to it - // else false - if ((yield fs.pathExists(possibleFile)) && path.extname(possibleFile) === '.zip') { - return possibleFile; - } - return false; - }); - const pathToLocalFile = yield getLocalFilePath(); - const tasks = pathToLocalFile ? - installFromLocal(pathToLocalFile, installDir) : - installFromRemote(versionToInstall, installDir); - if (options.force) { - debug$6('Cypress already installed at', installDir); - debug$6('but the installation was forced'); - } - // let the user know what version of cypress we're downloading! - xvfb.loggerModule.log(`Installing Cypress ${chalk.gray(`(version: ${versionToInstall})`)}`); - xvfb.loggerModule.log(); - const taskRunner = new listr2.Listr(tasks, Object.assign(Object.assign({ - // In CI we want timestamped, line-per-event output. Locally, - // the default in-place spinner is the better experience. - renderer: xvfb.util.isCi() ? 'verbose' : 'default' }, (xvfb.util.isCi() && { rendererOptions: { timestamp: listr2.PRESET_TIMESTAMP } })), { silentRendererCondition: () => xvfb.loggerModule.logLevel() === 'silent' })); - yield taskRunner.run(); - // delay 1 sec for UX, unless we are testing - yield timers.setTimeout(1000); - displayCompletionMsg(); -}); -function downloadArchive(version, downloadDestination) { - const inProgressTitle = 'Downloading Cypress'; - const completedTitle = chalk.green('Downloaded Cypress'); - return { - title: xvfb.util.titleize(inProgressTitle), - task: (ctx, task) => xvfb.__awaiter(this, void 0, void 0, function* () { - yield downloadModule.start({ - version, - downloadDestination, - progress: { - throttle: 100, - onProgress: (percentComplete, remaining) => { - task.title = progressTitle(inProgressTitle, percentComplete, remaining); - }, - }, - }); - debug$6(`finished downloading file: ${downloadDestination}`); - task.title = xvfb.util.titleize(completedTitle); - }), - }; -} -function installFromLocal(pathToLocalFile, installDir) { - const zipFilePath = path.resolve(pathToLocalFile); - debug$6('found local file at', zipFilePath); - debug$6('skipping download'); - return [ - unzipArchive(zipFilePath, installDir), - ]; -} -function installFromRemote(version, installDir) { - const downloadDestination = path.join(os.tmpdir(), `cypress-${process.pid}.zip`); - debug$6('preparing to download and unzip version ', version, 'to path', installDir); - return [ - downloadArchive(version, downloadDestination), - unzipArchive(downloadDestination, installDir), - cleanup(downloadDestination, installDir), - ]; -} -function unzipArchive(zipFilePath, installDir) { - const inProgressTitle = 'Unzipping Cypress'; - const completedTitle = chalk.green('Unzipped Cypress'); - return { - title: xvfb.util.titleize(inProgressTitle), - task: (ctx, task) => xvfb.__awaiter(this, void 0, void 0, function* () { - yield unzipModule.start({ - zipFilePath, - installDir, - progress: { - onProgress: (percentComplete, remaining) => { - task.title = progressTitle(inProgressTitle, percentComplete, remaining); - }, - }, - }); - task.title = xvfb.util.titleize(completedTitle); - }), - }; -} -function cleanup(archiveLocation, installDir) { - return { - title: xvfb.util.titleize('Finishing Installation'), - task: (ctx, task) => xvfb.__awaiter(this, void 0, void 0, function* () { - debug$6('removing zip file %s', archiveLocation); - yield fs.remove(archiveLocation); - debug$6('finished installation in', installDir); - task.title = xvfb.util.titleize(chalk.green('Finished Installation'), chalk.gray(installDir)); - }), - }; -} -function progressTitle(title, percentComplete, remaining) { - return xvfb.util.titleize(title, chalk.white(` ${percentComplete}%`), chalk.gray(`${remaining}s`)); -} -var installModule = { - start: start$1, - _getBinaryUrlFromBuildInfo, -}; - -/** - * Throws an error with "details" property from - * "errors" object. - * @param {Object} details - Error details - */ -const throwInvalidOptionError = (details) => { - if (!details) { - details = xvfb.errors.unknownError; - } - // throw this error synchronously, it will be caught later on and - // the details will be propagated to the promise chain - const err = new Error(); - err.details = details; - throw err; -}; -/** - * Selects exec args based on the configured `testingType` - * @param {string} testingType The type of tests being executed - * @returns {string[]} The array of new exec arguments - */ -const processTestingType = (options) => { - if (options.e2e && options.component) { - return throwInvalidOptionError(xvfb.errors.incompatibleTestTypeFlags); - } - if (options.testingType && (options.component || options.e2e)) { - return throwInvalidOptionError(xvfb.errors.incompatibleTestTypeFlags); - } - if (options.testingType === 'component' || options.component || options.ct) { - return ['--testing-type', 'component']; - } - if (options.testingType === 'e2e' || options.e2e) { - return ['--testing-type', 'e2e']; - } - if (options.testingType) { - return throwInvalidOptionError(xvfb.errors.invalidTestingType); - } - return []; -}; -/** - * Throws an error if configFile is string 'false' or boolean false - * @param {*} options - */ -const checkConfigFile = (options) => { - // CLI will parse as string, module API can pass in boolean - if (options.configFile === 'false' || options.configFile === false) { - throwInvalidOptionError(xvfb.errors.invalidConfigFile); - } -}; - -const debug$5 = Debug('cypress:cli'); -/** - * Maps options collected by the CLI - * and forms list of CLI arguments to the server. - * - * Note: there is lightweight validation, with errors - * thrown synchronously. - * - * @returns {string[]} list of CLI arguments - */ -const processOpenOptions = (options = {}) => { - // In addition to setting the project directory, setting the project option - // here ultimately decides whether cypress is run in global mode or not. - // It's first based off whether it's installed globally by npm/yarn (-g). - // A global install can be overridden by the --project flag, putting Cypress - // in project mode. A non-global install can be overridden by the --global - // flag, putting it in global mode. - if (!xvfb.util.isInstalledGlobally() && !options.global && !options.project) { - options.project = process.cwd(); - } - const args = []; - if (options.config) { - args.push('--config', options.config); - } - if (options.configFile !== undefined) { - checkConfigFile(options); - args.push('--config-file', options.configFile); - } - if (options.browser) { - args.push('--browser', options.browser); - } - if (options.env) { - args.push('--env', options.env); - } - if (options.expose) { - args.push('--expose', options.expose); - } - if (options.port) { - args.push('--port', options.port); - } - if (options.project) { - args.push('--project', options.project); - } - if (options.global) { - args.push('--global', options.global); - } - if (options.inspect) { - args.push('--inspect'); - } - if (options.inspectBrk) { - args.push('--inspectBrk'); - } - args.push(...processTestingType(options)); - debug$5('opening from options %j', options); - debug$5('command line arguments %j', args); - return args; -}; -const start = (...args_1) => xvfb.__awaiter(void 0, [...args_1], void 0, function* (options = {}) { - function open() { - try { - const args = processOpenOptions(options); - return spawn.start$1(args, { - dev: options.dev, - detached: Boolean(options.detached), - }); - } - catch (err) { - if (err.details) { - return xvfb.exitWithError(err.details)(); - } - throw err; - } - } - if (options.dev) { - return open(); - } - yield spawn.start(); - return open(); -}); -var openModule = { - start, - processOpenOptions, -}; - -const debug$4 = Debug('cypress:cli:run'); -/** - * Typically a user passes a string path to the project. - * But "cypress open" allows using `false` to open in global mode, - * and the user can accidentally execute `cypress run --project false` - * which should be invalid. - */ -const isValidProject = (v) => { - if (typeof v === 'boolean') { - return false; - } - if (v === '' || v === 'false' || v === 'true') { - return false; - } - return true; -}; -/** - * Maps options collected by the CLI - * and forms list of CLI arguments to the server. - * - * Note: there is lightweight validation, with errors - * thrown synchronously. - * - * @returns {string[]} list of CLI arguments - */ -const processRunOptions = (options = {}) => { - debug$4('processing run options %o', options); - if (!isValidProject(options.project)) { - debug$4('invalid project option %o', { project: options.project }); - return throwInvalidOptionError(xvfb.errors.invalidRunProjectPath); - } - const args = ['--run-project', options.project]; - if (options.autoCancelAfterFailures || options.autoCancelAfterFailures === 0 || options.autoCancelAfterFailures === false) { - args.push('--auto-cancel-after-failures', options.autoCancelAfterFailures); - } - if (options.browser) { - args.push('--browser', options.browser); - } - if (options.ciBuildId) { - args.push('--ci-build-id', options.ciBuildId); - } - if (options.config) { - args.push('--config', options.config); - } - if (options.configFile !== undefined) { - checkConfigFile(options); - args.push('--config-file', options.configFile); - } - if (options.env) { - args.push('--env', options.env); - } - if (options.expose) { - args.push('--expose', options.expose); - } - if (options.exit === false) { - args.push('--no-exit'); - } - if (options.group) { - args.push('--group', options.group); - } - if (options.headed) { - args.push('--headed', options.headed); - } - if (options.headless) { - if (options.headed) { - return throwInvalidOptionError(xvfb.errors.incompatibleHeadlessFlags); - } - args.push('--headed', String(!options.headless)); - } - // if key is set use that - else attempt to find it by environment variable - if (options.key == null) { - debug$4('--key is not set, looking up environment variable CYPRESS_RECORD_KEY'); - options.key = xvfb.util.getEnv('CYPRESS_RECORD_KEY'); - } - // if we have a key assume we're in record mode - if (options.key) { - args.push('--key', options.key); - } - if (options.outputPath) { - args.push('--output-path', options.outputPath); - } - if (options.parallel) { - args.push('--parallel'); - } - if (options.passWithNoTests) { - args.push('--pass-with-no-tests'); - } - if (options.posixExitCodes) { - args.push('--posix-exit-codes'); - } - if (options.port) { - args.push('--port', options.port); - } - if (options.quiet) { - args.push('--quiet'); - } - // if record is defined and we're not - // already in ci mode, then send it up - if (options.record != null) { - args.push('--record', options.record); - } - // if we have a specific reporter push that into the args - if (options.reporter) { - args.push('--reporter', options.reporter); - } - // if we have a specific reporter push that into the args - if (options.reporterOptions) { - args.push('--reporter-options', options.reporterOptions); - } - if (options.runnerUi != null) { - args.push('--runner-ui', options.runnerUi); - } - // if we have specific spec(s) push that into the args - if (options.spec) { - args.push('--spec', options.spec); - } - if (options.tag) { - args.push('--tag', options.tag); - } - if (options.inspect) { - args.push('--inspect'); - } - if (options.inspectBrk) { - args.push('--inspectBrk'); - } - args.push(...processTestingType(options)); - return args; -}; -const runModule = { - processRunOptions, - isValidProject, - // resolves with the number of failed tests - start() { - return xvfb.__awaiter(this, arguments, void 0, function* (options = {}) { - _.defaults(options, { - key: null, - spec: null, - reporter: null, - reporterOptions: null, - project: process.cwd(), - }); - function run() { - try { - const args = processRunOptions(options); - debug$4('run to spawn.start args %j', args); - return spawn.start$1(args, { - dev: options.dev, - }); - } - catch (err) { - if (err.details) { - return xvfb.exitWithError(err.details)(); - } - throw err; - } - } - if (options.dev) { - return run(); - } - yield spawn.start(); - return run(); - }); - }, -}; - -/** - * Get the size of a folder or a file. - * - * This function returns the actual file size of the folder (size), not the allocated space on disk (size on disk). - * For more details between the difference, check this link: - * https://www.howtogeek.com/180369/why-is-there-a-big-difference-between-size-and-size-on-disk/ - * - * @param {string} path path to the file or the folder. - */ -function getSize(path$1) { - return xvfb.__awaiter(this, void 0, void 0, function* () { - const stat = yield fs.lstat(path$1); - if (stat.isDirectory()) { - const list = yield fs.readdir(path$1); - return Bluebird.resolve(list).reduce((prev, curr) => xvfb.__awaiter(this, void 0, void 0, function* () { - const currPath = path.join(path$1, curr); - const s = yield fs.lstat(currPath); - if (s.isDirectory()) { - return prev + (yield getSize(currPath)); - } - return prev + s.size; - }), 0); - } - return stat.size; - }); -} - -var dist = {}; - -var tapContract = {}; - -var tapErrors = {}; +var tapErrors = {}; var hasRequiredTapErrors; function requireTapErrors () { if (hasRequiredTapErrors) return tapErrors; hasRequiredTapErrors = 1; - (function (exports$1) { + (function (exports) { // The copy for every `cypress tap` failure, keyed by its code. Code is not usefacing and is // just used in debug logs and telemetry. - Object.defineProperty(exports$1, "__esModule", { value: true }); - exports$1.UnknownTapError = exports$1.SpecInProgressTapError = exports$1.VersionSkewTapError = exports$1.MissingOptionTapError = exports$1.MissingArgumentsTapError = exports$1.UnknownOptionTapError = exports$1.UnknownCommandTapError = exports$1.MissingCompanionOptionTapError = exports$1.SnapshotNotFoundTapError = exports$1.AttemptNotFoundTapError = exports$1.CommandNotFoundTapError = exports$1.TestNotFoundTapError = exports$1.SessionNotFoundTapError = exports$1.InvalidValueTapError = exports$1.isTapError = exports$1.TapError = exports$1.tapErrorCopy = exports$1.TAP_ERROR_COPY = exports$1.TAP_TARGET = void 0; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.UnknownTapError = exports.SpecInProgressTapError = exports.VersionSkewTapError = exports.MissingOptionTapError = exports.MissingArgumentsTapError = exports.UnknownOptionTapError = exports.UnknownCommandTapError = exports.MissingCompanionOptionTapError = exports.SnapshotNotFoundTapError = exports.AttemptNotFoundTapError = exports.CommandNotFoundTapError = exports.TestNotFoundTapError = exports.SessionNotFoundTapError = exports.InvalidValueTapError = exports.isTapError = exports.TapError = exports.tapErrorCopy = exports.TAP_ERROR_COPY = exports.TAP_TARGET = void 0; const UPDATE_COMMAND = '`npm install --save-dev cypress@latest`'; /** * What every failure calls the running Cypress a tap command targets. */ - exports$1.TAP_TARGET = 'Cypress session'; + exports.TAP_TARGET = 'Cypress session'; /** * Several codes stand for one thing a reader has to do about them, and saying it * four slightly different ways only reads as four different problems. Each keeps @@ -1243,14 +86,14 @@ function requireTapErrors () { * The jsdoc on each entry is where the condition it really stands for is written. */ const UNREACHABLE = { - description: `Could not reach the ${exports$1.TAP_TARGET}.`, + description: `Could not reach the ${exports.TAP_TARGET}.`, solution: 'Make sure Cypress is still open with a browser, then run the command again. If it was just started, it may still be loading.', }; // No "if it keeps failing" clause here: the entries that ask for a report already // open theirs with one, and saying it twice reads as two separate escalations. const COMMAND_FAILED = { - description: `The ${exports$1.TAP_TARGET} failed while running the command.`, - solution: `Check the ${exports$1.TAP_TARGET} with \`cypress tap status\`, then try again.`, + description: `The ${exports.TAP_TARGET} failed while running the command.`, + solution: `Check the ${exports.TAP_TARGET} with \`cypress tap status\`, then try again.`, }; /** * Nothing worth saying, for the conditions that should not arise: a failure with no @@ -1262,11 +105,11 @@ function requireTapErrors () { description: 'An error occurred.', solution: 'Try running the command again.', }; - exports$1.TAP_ERROR_COPY = { + exports.TAP_ERROR_COPY = { // Finding a session to drive /** Raised when discovery found no session record at all, and none was named. */ NO_SESSION: { - description: `Could not find a ${exports$1.TAP_TARGET} to tap into.`, + description: `Could not find a ${exports.TAP_TARGET} to tap into.`, solution: 'Start Cypress with `cypress open`, select a testing type and launch a browser, then try again.', }, /** @@ -1275,24 +118,24 @@ function requireTapErrors () { * @deprecated - raise it with new SessionNotFoundTapError(), which writes its detail */ SESSION_NOT_FOUND: { - description: `No ${exports$1.TAP_TARGET} matched the provided session id.`, - solution: `Run \`cypress tap sessions\` to list the ${exports$1.TAP_TARGET}s you can tap into.`, + description: `No ${exports.TAP_TARGET} matched the provided session id.`, + solution: `Run \`cypress tap sessions\` to list the ${exports.TAP_TARGET}s you can tap into.`, }, /** Raised when records matched, but none answered its liveness probe. */ STALE_SESSION: { ...UNREACHABLE }, /** Raised when the session is live, but has no browser open to drive. */ NO_BROWSER_ATTACHED: { - description: `The ${exports$1.TAP_TARGET} is running, but no test browser is open.`, + description: `The ${exports.TAP_TARGET} is running, but no test browser is open.`, solution: 'Open a Chromium-based browser in Cypress, then try again.', }, /** Raised when every live session has a browser open that tap cannot drive. */ UNSUPPORTED_BROWSER: { - description: `The ${exports$1.TAP_TARGET} is running an unsupported browser.`, + description: `The ${exports.TAP_TARGET} is running an unsupported browser.`, solution: '`cypress tap` drives Chromium-based browsers only. Reopen Cypress in a supported browser and try again.', }, /** Raised when a CDP call went unanswered until the timeout elapsed. */ RENDERER_UNRESPONSIVE: { - description: `The ${exports$1.TAP_TARGET} is reachable, but the page running it is not responding.`, + description: `The ${exports.TAP_TARGET} is reachable, but the page running it is not responding.`, solution: 'It may be paused in DevTools, stuck in a loop, or starved of memory. Pass `--timeout ` to wait longer.', }, // Connecting to it @@ -1324,12 +167,12 @@ function requireTapErrors () { }, /** Raised when the handshake reported a schema version newer than this CLI's. */ CLI_OUTDATED: { - description: `The targeted ${exports$1.TAP_TARGET} is newer than this CLI.`, + description: `The targeted ${exports.TAP_TARGET} is newer than this CLI.`, solution: `Update the CLI with ${UPDATE_COMMAND}, then try again.`, }, - /** Raised when the handshake reported an older schema version, or GraphQL redirected. */ + /** Raised when the handshake reported an older schema version, or the session does not serve the tap GraphQL route. */ SESSION_OUTDATED: { - description: `The targeted ${exports$1.TAP_TARGET} is older than this CLI.`, + description: `The targeted ${exports.TAP_TARGET} is older than this CLI.`, solution: `Update Cypress in the running project with ${UPDATE_COMMAND}, restart it, then try again.`, }, // Reading its data @@ -1356,17 +199,17 @@ function requireTapErrors () { }, /** Raised when the runSpec mutation failed, or answered with no result. */ SPEC_START_FAILED: { - description: `The ${exports$1.TAP_TARGET} could not start the spec.`, - solution: `Check the ${exports$1.TAP_TARGET} with \`cypress tap status\`, then try again.`, + description: `The ${exports.TAP_TARGET} could not start the spec.`, + solution: `Check the ${exports.TAP_TARGET} with \`cypress tap status\`, then try again.`, }, /** Raised when the given path matches no spec the session can run. */ SPEC_NOT_FOUND: { - description: `The ${exports$1.TAP_TARGET} has no spec matching that path.`, - solution: `\`cypress tap specs\` lists the specs the ${exports$1.TAP_TARGET} can run. If the spec exists but is not listed, widen \`specPattern\` in the Cypress configuration.`, + description: `The ${exports.TAP_TARGET} has no spec matching that path.`, + solution: `\`cypress tap specs\` lists the specs the ${exports.TAP_TARGET} can run. If the spec exists but is not listed, widen \`specPattern\` in the Cypress configuration.`, }, /** Raised when the session is running with no project open. */ NO_PROJECT: { - description: `The ${exports$1.TAP_TARGET} has no project open.`, + description: `The ${exports.TAP_TARGET} has no project open.`, solution: 'Open a project in Cypress, then try again.', }, /** Raised when the spec's testing type is not one this project configures. */ @@ -1378,7 +221,7 @@ function requireTapErrors () { // Reading the app under test /** Raised when the runner page holds no app-under-test frame to read. */ NO_AUT: { - description: `Failed to determine the app under test in the ${exports$1.TAP_TARGET}.`, + description: `Failed to determine the app under test in the ${exports.TAP_TARGET}.`, solution: 'Run the spec again with `cypress tap run `. To read the app as it was at an earlier command, pin that command with `cypress tap pin`.', }, /** Raised when an injected script threw inside the AUT frame. */ @@ -1490,19 +333,19 @@ function requireTapErrors () { // An unknown code is a protocol mismatch by definition: the session speaks of a // failure this CLI has no copy for, which is one more thing about its answer that // cannot be read. - const FALLBACK = exports$1.TAP_ERROR_COPY.PROTOCOL_MISMATCH; + const FALLBACK = exports.TAP_ERROR_COPY.PROTOCOL_MISMATCH; /** * Copy for a code, which arrives from the session over the wire — so anything that * is not a code we ship falls back rather than being trusted: a non-string, an * inherited name like `constructor`, or a code only a newer Cypress knows about. */ const tapErrorCopy = (code) => { - if (typeof code !== 'string' || !Object.prototype.hasOwnProperty.call(exports$1.TAP_ERROR_COPY, code)) { + if (typeof code !== 'string' || !Object.prototype.hasOwnProperty.call(exports.TAP_ERROR_COPY, code)) { return FALLBACK; } - return exports$1.TAP_ERROR_COPY[code]; + return exports.TAP_ERROR_COPY[code]; }; - exports$1.tapErrorCopy = tapErrorCopy; + exports.tapErrorCopy = tapErrorCopy; /** * The one error every tap failure is raised as, on both sides of the wire: the app * throws it from a command handler, the CLI throws it from discovery, transport, and @@ -1540,11 +383,11 @@ function requireTapErrors () { return { code: this.code, ...(this.detail !== undefined ? { detail: this.detail } : {}) }; } } - exports$1.TapError = TapError; + exports.TapError = TapError; const isTapError = (err) => { return err instanceof TapError; }; - exports$1.isTapError = isTapError; + exports.isTapError = isTapError; // The one door through the constructor's guard, so that every code it keeps out is // still built the same way — with the copy its class below writes. class DetailedTapError extends TapError { @@ -1562,7 +405,7 @@ function requireTapErrors () { super('INVALID_VALUE', `Expected \`${name}\` to be ${expected}.\n\nInstead the value was: ${JSON.stringify(value)}`); } } - exports$1.InvalidValueTapError = InvalidValueTapError; + exports.InvalidValueTapError = InvalidValueTapError; /** * A value that was read fine but matched nothing there is. Each entry states what * was being looked for and where the real ones are listed; this writes the one line @@ -1581,13 +424,13 @@ function requireTapErrors () { super('SESSION_NOT_FOUND', '--session', value); } } - exports$1.SessionNotFoundTapError = SessionNotFoundTapError; + exports.SessionNotFoundTapError = SessionNotFoundTapError; class TestNotFoundTapError extends NotFoundTapError { constructor(value) { super('TEST_NOT_FOUND', '--test-id', value); } } - exports$1.TestNotFoundTapError = TestNotFoundTapError; + exports.TestNotFoundTapError = TestNotFoundTapError; /** * The one lookup whose remedy names a value the caller gave: the test whose commands * to list. Which is why the test id is required rather than optional — the table @@ -1601,19 +444,19 @@ function requireTapErrors () { }); } } - exports$1.CommandNotFoundTapError = CommandNotFoundTapError; + exports.CommandNotFoundTapError = CommandNotFoundTapError; class AttemptNotFoundTapError extends NotFoundTapError { constructor(value, context) { super('ATTEMPT_NOT_FOUND', '--attempt', value, { context }); } } - exports$1.AttemptNotFoundTapError = AttemptNotFoundTapError; + exports.AttemptNotFoundTapError = AttemptNotFoundTapError; class SnapshotNotFoundTapError extends NotFoundTapError { constructor(value, context) { super('SNAPSHOT_NOT_FOUND', '--at', value, { context }); } } - exports$1.SnapshotNotFoundTapError = SnapshotNotFoundTapError; + exports.SnapshotNotFoundTapError = SnapshotNotFoundTapError; /** * A flag that only means something alongside another one. Both are named here; * `remedy` is the throw site's, because what dropping either one leaves you with @@ -1624,7 +467,7 @@ function requireTapErrors () { super('MISSING_COMPANION_OPTION', `You passed the \`${given}\` flag without also passing the \`${required}\` flag.\n\n${remedy}`); } } - exports$1.MissingCompanionOptionTapError = MissingCompanionOptionTapError; + exports.MissingCompanionOptionTapError = MissingCompanionOptionTapError; /** * A name no command answers to, and a flag no command declares: say which one was * given, then list the real ones. The listing is the remedy, which is why neither @@ -1637,13 +480,13 @@ function requireTapErrors () { super('UNKNOWN_COMMAND', listing ? `Unknown command "${name}"\n\n${listing}` : `Unknown command "${name}"`); } } - exports$1.UnknownCommandTapError = UnknownCommandTapError; + exports.UnknownCommandTapError = UnknownCommandTapError; class UnknownOptionTapError extends DetailedTapError { constructor(flag, listing) { super('UNKNOWN_OPTION', listing ? `Unknown option "${flag}"\n\n${listing}` : `Unknown option "${flag}"`); } } - exports$1.UnknownOptionTapError = UnknownOptionTapError; + exports.UnknownOptionTapError = UnknownOptionTapError; /** * A required input the invocation left out. Both sides raise these through here — * the CLI when its own grammar catches the omission, the session when a call @@ -1659,13 +502,13 @@ function requireTapErrors () { super('INVALID_ARGUMENTS', { detail: `"${command}" is missing the required ${named} ${noun}.` }); } } - exports$1.MissingArgumentsTapError = MissingArgumentsTapError; + exports.MissingArgumentsTapError = MissingArgumentsTapError; class MissingOptionTapError extends TapError { constructor(command, option) { super('INVALID_OPTIONS', { detail: `"${command}" is missing the required --${option} option.` }); } } - exports$1.MissingOptionTapError = MissingOptionTapError; + exports.MissingOptionTapError = MissingOptionTapError; /** * A CLI and a session that do not speak the same tap schema. Which of the two is * behind is decided here rather than at the throw site, so the code and the copy @@ -1680,12 +523,12 @@ function requireTapErrors () { class VersionSkewTapError extends TapError { constructor({ sessionSchema, cliSchema, sessionCypress, cliCypress }) { super(sessionSchema > cliSchema ? 'CLI_OUTDATED' : 'SESSION_OUTDATED', { - detail: `The ${exports$1.TAP_TARGET} is running Cypress v${sessionCypress}; this CLI is v${cliCypress}.`, - message: `the ${exports$1.TAP_TARGET} speaks tap schema v${sessionSchema}; this CLI speaks v${cliSchema}.`, + detail: `The ${exports.TAP_TARGET} is running Cypress v${sessionCypress}; this CLI is v${cliCypress}.`, + message: `the ${exports.TAP_TARGET} speaks tap schema v${sessionSchema}; this CLI speaks v${cliSchema}.`, }); } } - exports$1.VersionSkewTapError = VersionSkewTapError; + exports.VersionSkewTapError = VersionSkewTapError; /** * The spec that is mid-run, which is what makes the condition actionable: it names * what to wait on. Both sides raise it through here — the CLI from its run-state @@ -1697,7 +540,7 @@ function requireTapErrors () { super('SPEC_IN_PROGRESS', spec ? `The spec ${spec} is currently running.` : 'The spec is currently running.'); } } - exports$1.SpecInProgressTapError = SpecInProgressTapError; + exports.SpecInProgressTapError = SpecInProgressTapError; /** * Whatever reached the renderer without having been raised as a tap failure — a * TypeError from a command handler, an ENOTDIR from a read that should not have @@ -1711,7 +554,7 @@ function requireTapErrors () { super('UNKNOWN_ERROR', { message: String((_a = cause === null || cause === void 0 ? void 0 : cause.stack) !== null && _a !== void 0 ? _a : cause), cause }); } } - exports$1.UnknownTapError = UnknownTapError; + exports.UnknownTapError = UnknownTapError; } (tapErrors)); return tapErrors; @@ -1763,45 +606,392 @@ function requirePinned () { var pin = {}; -var hasRequiredPin; +var hasRequiredPin; + +function requirePin () { + if (hasRequiredPin) return pin; + hasRequiredPin = 1; + Object.defineProperty(pin, "__esModule", { value: true }); + + return pin; +} + +var resolveSelector = {}; + +var hasRequiredResolveSelector; + +function requireResolveSelector () { + if (hasRequiredResolveSelector) return resolveSelector; + hasRequiredResolveSelector = 1; + // The `resolve-selector` command's result contract. A command's result interface + // lives here in `contracts/`, next to the command metadata in `../tap-contract`, + // so the app-side command and the CLI-side rendering type against the same shape. + Object.defineProperty(resolveSelector, "__esModule", { value: true }); + resolveSelector.MAX_DERIVED_SELECTORS = void 0; + // Deriving a unique selector walks up from the element testing each candidate + // against the whole document, so deriving one per match for a selector as broad + // as `*` would hold the app's main thread for the size of the page. Past this + // many matches the list is no longer one a caller picks out of anyway — so the + // app derives up to here, and the CLI numbers up to here. + resolveSelector.MAX_DERIVED_SELECTORS = 10; + + return resolveSelector; +} + +var hasRequiredTapContract; + +function requireTapContract () { + if (hasRequiredTapContract) return tapContract; + hasRequiredTapContract = 1; + (function (exports) { + var __createBinding = (tapContract && tapContract.__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 = (tapContract && tapContract.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); + }; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.KNOWN_COMMANDS = exports.TAP_NATIVE_COMMANDS = exports.buildTapSchema = exports.TAP_COMMANDS = exports.TAP_EXEC_METHOD = exports.TAP_SCHEMA_METHOD = exports.TAP_BINDING_GLOBAL = exports.TAP_SCHEMA_VERSION = void 0; + exports.TAP_SCHEMA_VERSION = 1; + exports.TAP_BINDING_GLOBAL = '__CYPRESS_TAP_BINDING__'; + exports.TAP_SCHEMA_METHOD = 'getSchema'; + exports.TAP_EXEC_METHOD = 'exec'; + // Options that recur across commands, defined once so their name, type, and help + // text can't drift between the commands that expose them. `test-id` and + // `command-id` are required in some commands and optional in others, so each use + // spreads it and sets `required`; the rest are identical everywhere and used + // directly. + const testIdField = { name: 'test-id', alias: 't', type: 'string', description: 'test id, as listed by the reporter command' }; + const commandIdField = { name: 'command-id', alias: 'c', type: 'string', description: 'command id, as listed by the reporter command — a row number (test body first when duplicated), an e-prefixed event id, or hook-qualified like "h1:3"' }; + const attemptField = { name: 'attempt', alias: 'a', type: 'number', required: false, description: '1-based attempt (attempt 1 = first run); defaults to the latest' }; + const selectorField = { name: 'selector', alias: 'e', type: 'string', required: false, description: 'a CSS selector' }; + const commandMeta = { + name: 'command', + description: 'retrieve the reporter row, the pinnable DOM snapshots, and the console properties of a single command in a test', + details: `Retrieves a single command from a test's command log: its reporter row, the DOM +snapshots pinnable on it, and any associated console properties.`, + params: [], + options: [ + { ...testIdField, required: true }, + { ...commandIdField, required: true }, + // `--json` is the CLI's own flag, but this command declares it because it + // also changes what the command returns: nothing is withheld from a payload + // that is not being rendered for reading room. + { name: 'json', type: 'boolean', required: false, description: 'print the raw JSON result instead of the human-readable rendering. This will output every console property in full regardless of length.' }, + attemptField, + { name: 'depth', alias: 'd', type: 'string', required: false, description: 'how many levels of nested console properties to expand before summarizing the rest as "{n keys}" / "[n items]": a number or "all" (default 3, and a section over 8 rows folds at any depth unless this is passed)' }, + ], + }; + const reporterMeta = { + name: 'reporter', + description: 'retrieve the test runner reporter for the spec or a specific test', + details: `Shows test results the way the Cypress reporter panel does. + +By default, this will output the spec-level overview featuring the spec's +pass/fail stats and every suite's tests including their IDs. + +Provide a --test-id to see one test's full story: its routes, the hooks +that ran, the complete command log, and the failure output when something went +wrong. Add --attempt to view an earlier retry.`, + params: [], + options: [ + { ...testIdField, required: false }, + attemptField, + ], + }; + const pinMeta = { + name: 'pin', + description: 'pin a command’s DOM snapshot into the live application-under-test frame', + details: `Pins a command's DOM snapshot into the live application-under-test frame so the +dom/aria/inspect commands can read it. Pass --clear to release.`, + params: [], + options: [ + { ...testIdField, required: false }, + { ...commandIdField, required: false }, + attemptField, + { name: 'at', type: 'string', required: false, description: 'which snapshot to pin: a name like "before"/"after" or a 1-based index; defaults to the last (the command’s final state). Re-run on the pinned command to switch snapshots without releasing the pin' }, + { name: 'clear', type: 'boolean', required: false, description: 'release the current pin and restore the app to its pre-pin state' }, + ], + }; + const runStateMeta = { + name: 'run-state', + description: 'report where the Cypress session is in its run lifecycle', + params: [], + options: [], + hidden: true, + }; + const resolveSelectorMeta = { + name: 'resolve-selector', + description: 'list a unique CSS selector for each element a selector matches, null for any match none could be derived for', + params: [ + { name: 'selector', type: 'string', required: true, description: 'a CSS selector' }, + ], + options: [], + hidden: true, + }; + // The canonical command metadata, the single source both sides build a schema + // from: the running session advertises it over the binding (see the app's + // TapManager), and the CLI stamps it with its own version to render help with no + // session attached. Order here is the order commands list in help. + exports.TAP_COMMANDS = [ + commandMeta, + reporterMeta, + pinMeta, + runStateMeta, + resolveSelectorMeta, + ]; + const buildTapSchema = (cypressVersion) => { + const commands = exports.TAP_COMMANDS.map((command) => { + return { + name: command.name, + description: command.description, + ...('details' in command ? { details: command.details } : {}), + params: command.params.map((param) => ({ ...param })), + options: command.options.map((option) => ({ ...option })), + ...('hidden' in command && command.hidden ? { hidden: true } : {}), + }; + }); + return { + schemaVersion: exports.TAP_SCHEMA_VERSION, + cypressVersion, + commands, + }; + }; + exports.buildTapSchema = buildTapSchema; + const runMeta = { + name: 'run', + description: 'run (or rerun) a spec by its project-relative path', + details: `Runs (or reruns) a spec by its project-relative path, as listed by the specs +command. If no browser is open it launches one, switching to the spec's testing +type when needed, then requests the spec and returns immediately. This requests +the spec to begin, but completion of this command does not guarantee the spec +has started or finished. + +Poll the 'status' command for progress. Read status first and keep its +startedAt: a verdict still carrying that same startedAt describes the spec +before this one, so wait for a verdict whose startedAt differs.`, + params: [ + { name: 'spec', type: 'string', required: true, description: 'project-relative spec path, as listed by the specs command' }, + ], + }; + const sessionsMeta = { + name: 'sessions', + description: 'list the Cypress sessions this CLI can reach', + details: `Lists the Cypress sessions this CLI can reach. Cypress must be running locally, +support the \`tap\` command, and have an active Testing Type to be listed. A +session can be targeted by its PID in other commands using \`--session\`. + +tap only supports Chromium based browsers (Chrome, Chromium, Edge, Electron). +A session running any other browser is listed as unsupported, and every other +tap command refuses it.`, + }; + const statusMeta = { + name: 'status', + description: 'report where a Cypress session is in its lifecycle', + details: `Reports where a Cypress session is in its lifecycle, as JSON — for polling and +"where am I?" checks. Always exits 0 for a determinable stage (including "not +connected"); a poller branches on the \`status\` field. + +Stages: +- not connected: Cypress cannot be reached. +- browser not selected: Cypress does not have a supported browser open. +- spec not selected: Cypress has a browser open but no spec is selected. +- loading: Cypress is loading the spec. +- running: Cypress is running the spec. +- passed: Cypress has completed the spec and all executed tests passed. +- failed: Cypress failed to run the spec, or has completed the spec and at least + one test failed. + +Statuses other than passed and failed are intermediate states, indicating that +Cypress requires additional instruction or is still processing. Loading stays +loading for as long as the spec takes to build, so a poller needs its own +timeout; a spec whose build fails reports failed and carries the reason as +error — it ran no tests, so it reports no counts either. + +From loading onwards the output carries \`startedAt\`, the spec every other field +describes (null while loading). In the event of a rerun the previous spec's +verdict remains visible until the new one begins, identical on every other +field, so use \`startedAt\` to validate whether output describes the previous +spec or the new one.`, + }; + const specsMeta = { + name: 'specs', + description: 'list the specs the Cypress session can run, most recently modified first', + details: `Lists the specs the connected Cypress session can run, in descending order by +last modified. To find other testing types you must connect to a Cypress +session with that testing type active.`, + }; + // Every selector these three take must resolve to exactly one element, so a + // reader is never silently shown one of several matches. Their help says so in + // the same words, and names the remedy the ambiguity error offers. + const SINGLE_ELEMENT_SELECTOR = 'a CSS selector matching exactly one element'; + const AMBIGUOUS_SELECTOR_HELP = `The selector must match exactly one element. If it matches multiple elements +nothing is read: the command answers with a numbered list of the matches (up to +10), each with a unique selector. Re-run with --at to read one of them, +or with whichever selector you meant.`; + // Where `dom` and `aria` read from with no selector: the document element only + // adds a of script and style text; `--selector html` still reads it. + const TAP_DEFAULT_SELECTOR = 'body'; + // Shared by the three selector-taking reads, so the way you pick one match out + // of several is identical across them. + const atField = { + name: 'at', + type: 'number', + required: false, + description: 'When a selector matches multiple elements, the 0-based index of the match to read', + }; + const domMeta = { + name: 'dom', + description: 'read the application-under-test DOM as HTML: the page body, or a single element with its children by providing a CSS Selector', + details: `Reads the application-under-test DOM as HTML: a single element matching a CSS +Selector, and all of its children. Without --selector it reads the page body; +pass --selector html for the entire document. Output is capped browser-side so a +heavy page never ships megabytes at once. + +${AMBIGUOUS_SELECTOR_HELP}`, + params: [], + options: [ + { ...selectorField, defaultValue: TAP_DEFAULT_SELECTOR, description: SINGLE_ELEMENT_SELECTOR }, + { name: 'max-chars', alias: 'm', type: 'number', required: false, defaultValue: 30000, description: 'cap on returned HTML characters' }, + atField, + ], + }; + const ariaMeta = { + name: 'aria', + description: 'read the accessibility (ARIA) tree of the application-under-test page body, or the subtree at a selector', + details: `Reads the accessibility (ARIA) tree of the application under test, rooted at the +page body or at the element a CSS Selector matches. Structural and text-only +roles are dropped, leaving the compact role/name/state tree DevTools shows. + +${AMBIGUOUS_SELECTOR_HELP}`, + params: [], + options: [ + { ...selectorField, defaultValue: TAP_DEFAULT_SELECTOR, description: SINGLE_ELEMENT_SELECTOR }, + // The accessibility tree of a real app is deep; the cap keeps the projection + // affordable for an LLM. A selector roots it at a subtree for finer reads. + { name: 'max-nodes', alias: 'm', type: 'number', required: false, defaultValue: 200, description: 'cap on the number of accessibility nodes returned' }, + atField, + ], + }; + const inspectMeta = { + name: 'inspect', + description: 'retrieve the tag, attributes, computed styles, box model, and accessibility node of a specific element', + details: `Inspects a single element matching a CSS Selector: outputs the tag, attributes, +curated computed styles, box model, and that element's own accessibility node +— where \`aria\` reads the whole tree, this reads the one node. -function requirePin () { - if (hasRequiredPin) return pin; - hasRequiredPin = 1; - Object.defineProperty(pin, "__esModule", { value: true }); - - return pin; +${AMBIGUOUS_SELECTOR_HELP}`, + params: [], + options: [ + { ...selectorField, required: true, description: `${SINGLE_ELEMENT_SELECTOR}, identifying the element to inspect` }, + atField, + ], + }; + // CLI-native tap commands: implemented entirely in the CLI (session discovery + // over the filesystem, DOM/ARIA reads over CDP), so — unlike TAP_COMMANDS — they + // are never advertised by getSchema or exec'd on the session. Listed here in the + // order they appear in help, ahead of the schema-driven commands. + exports.TAP_NATIVE_COMMANDS = [ + sessionsMeta, + statusMeta, + specsMeta, + runMeta, + domMeta, + ariaMeta, + inspectMeta, + ]; + const allTapCommands = [...exports.TAP_NATIVE_COMMANDS, ...exports.TAP_COMMANDS]; + /** Every command name this CLI ships, whether it dispatches to the session or handles it itself. */ + exports.KNOWN_COMMANDS = new Set(allTapCommands.map(({ name }) => name)); + // The failure catalogue and the error both sides raise. Re-exported here for the + // same reason the result contracts are: this module is dependency-free, so the + // browser-side app can import it where it cannot import the package barrel. + __exportStar(requireTapErrors(), exports); + // Per-command result contracts live in `./contracts/`; re-exported here so the + // app's deep import of this module and the package barrel both reach them. + __exportStar(requireReporter(), exports); + __exportStar(requireCommand(), exports); + __exportStar(requirePinned(), exports); + __exportStar(requirePin(), exports); + __exportStar(requireResolveSelector(), exports); + + } (tapContract)); + return tapContract; } -var resolveSelector = {}; +var tapOperations = {}; -var hasRequiredResolveSelector; +var hasRequiredTapOperations; -function requireResolveSelector () { - if (hasRequiredResolveSelector) return resolveSelector; - hasRequiredResolveSelector = 1; - // The `resolve-selector` command's result contract. A command's result interface - // lives here in `contracts/`, next to the command metadata in `../tap-contract`, - // so the app-side command and the CLI-side rendering type against the same shape. - Object.defineProperty(resolveSelector, "__esModule", { value: true }); - resolveSelector.MAX_DERIVED_SELECTORS = void 0; - // Deriving a unique selector walks up from the element testing each candidate - // against the whole document, so deriving one per match for a selector as broad - // as `*` would hold the app's main thread for the size of the page. Past this - // many matches the list is no longer one a caller picks out of anyway — so the - // app derives up to here, and the CLI numbers up to here. - resolveSelector.MAX_DERIVED_SELECTORS = 10; +function requireTapOperations () { + if (hasRequiredTapOperations) return tapOperations; + hasRequiredTapOperations = 1; + Object.defineProperty(tapOperations, "__esModule", { value: true }); + tapOperations.tapRunSpecOperation = tapOperations.TapSpecsOperation = void 0; + tapOperations.TapSpecsOperation = { + operationName: 'TapSpecs', + query: /* GraphQL */ ` + query TapSpecs { + currentProject { + specs { + relative + absolute + gitInfo { + lastModifiedHumanReadable + lastModifiedTimestamp + } + } + } + } + `, + }; + const TAP_RUN_SPEC_QUERY = /* GraphQL */ ` + mutation TapRunSpec($specPath: String!) { + runSpec(specPath: $specPath) { + __typename + ... on RunSpecResponse { + testingType + browser { + displayName + } + spec { + relative + } + } + ... on RunSpecError { + code + detailMessage + } + } + } +`; + const tapRunSpecOperation = (specPath) => { + return { + operationName: 'TapRunSpec', + query: TAP_RUN_SPEC_QUERY, + variables: { specPath }, + }; + }; + tapOperations.tapRunSpecOperation = tapRunSpecOperation; - return resolveSelector; + return tapOperations; } -var hasRequiredTapContract; +var hasRequiredDist; -function requireTapContract () { - if (hasRequiredTapContract) return tapContract; - hasRequiredTapContract = 1; - (function (exports$1) { - var __createBinding = (tapContract && tapContract.__createBinding) || (Object.create ? (function(o, m, k, k2) { +function requireDist () { + if (hasRequiredDist) return dist; + hasRequiredDist = 1; + (function (exports) { + var __createBinding = (dist && dist.__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)) { @@ -1812,685 +1002,1506 @@ function requireTapContract () { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); - var __exportStar = (tapContract && tapContract.__exportStar) || function(m, exports$1) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$1, p)) __createBinding(exports$1, m, p); + var __exportStar = (dist && dist.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; - Object.defineProperty(exports$1, "__esModule", { value: true }); - exports$1.KNOWN_COMMANDS = exports$1.TAP_NATIVE_COMMANDS = exports$1.buildTapSchema = exports$1.TAP_COMMANDS = exports$1.TAP_EXEC_METHOD = exports$1.TAP_SCHEMA_METHOD = exports$1.TAP_BINDING_GLOBAL = exports$1.TAP_SCHEMA_VERSION = void 0; - exports$1.TAP_SCHEMA_VERSION = 1; - exports$1.TAP_BINDING_GLOBAL = '__CYPRESS_TAP_BINDING__'; - exports$1.TAP_SCHEMA_METHOD = 'getSchema'; - exports$1.TAP_EXEC_METHOD = 'exec'; - // Options that recur across commands, defined once so their name, type, and help - // text can't drift between the commands that expose them. `test-id` and - // `command-id` are required in some commands and optional in others, so each use - // spreads it and sets `required`; the rest are identical everywhere and used - // directly. - const testIdField = { name: 'test-id', alias: 't', type: 'string', description: 'test id, as listed by the reporter command' }; - const commandIdField = { name: 'command-id', alias: 'c', type: 'string', description: 'command id, as listed by the reporter command — a row number (test body first when duplicated), an e-prefixed event id, or hook-qualified like "h1:3"' }; - const attemptField = { name: 'attempt', alias: 'a', type: 'number', required: false, description: '1-based attempt (attempt 1 = first run); defaults to the latest' }; - const selectorField = { name: 'selector', alias: 'e', type: 'string', required: false, description: 'a CSS selector' }; - const commandMeta = { - name: 'command', - description: 'retrieve the reporter row, the pinnable DOM snapshots, and the console properties of a single command in a test', - details: `Retrieves a single command from a test's command log: its reporter row, the DOM -snapshots pinnable on it, and any associated console properties.`, - params: [], - options: [ - { ...testIdField, required: true }, - { ...commandIdField, required: true }, - // `--json` is the CLI's own flag, but this command declares it because it - // also changes what the command returns: nothing is withheld from a payload - // that is not being rendered for reading room. - { name: 'json', type: 'boolean', required: false, description: 'print the raw JSON result instead of the human-readable rendering. This will output every console property in full regardless of length.' }, - attemptField, - { name: 'depth', alias: 'd', type: 'string', required: false, description: 'how many levels of nested console properties to expand before summarizing the rest as "{n keys}" / "[n items]": a number or "all" (default 3, and a section over 8 rows folds at any depth unless this is passed)' }, - ], + var __importDefault = (dist && dist.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; }; - const reporterMeta = { - name: 'reporter', - description: 'retrieve the test runner reporter for the spec or a specific test', - details: `Shows test results the way the Cypress reporter panel does. - -By default, this will output the spec-level overview featuring the spec's -pass/fail stats and every suite's tests including their IDs. - -Provide a --test-id to see one test's full story: its routes, the hooks -that ran, the complete command log, and the failure output when something went -wrong. Add --attempt to view an earlier retry.`, - params: [], - options: [ - { ...testIdField, required: false }, - attemptField, - ], + Object.defineProperty(exports, "__esModule", { value: true }); + exports.isCompatibleRecord = exports.tapGraphqlPath = exports.sessionProbePath = exports.recordPath = exports.cypressSessionsDir = exports.parseRecordPid = exports.recordFileName = exports.isTapSupportedBrowser = exports.TAP_SUPPORTED_BROWSER_FAMILY = exports.LEGACY_TAP_GRAPHQL_PATH = exports.TAP_GRAPHQL_ROUTE_PREFIX = exports.SESSION_ID_HEADER = exports.SESSIONS_ROUTE_PREFIX = exports.SESSIONS_DIRNAME = exports.MIN_SCHEMA_VERSION = exports.SCHEMA_VERSION = void 0; + const path_1 = __importDefault(path); + __exportStar(requireTapContract(), exports); + __exportStar(requireTapOperations(), exports); + exports.SCHEMA_VERSION = 1; + exports.MIN_SCHEMA_VERSION = 1; + exports.SESSIONS_DIRNAME = 'sessions'; + const RECORD_EXTENSION = '.json'; + exports.SESSIONS_ROUTE_PREFIX = '/__cypress/sessions/'; + exports.SESSION_ID_HEADER = 'x-cypress-session-id'; + // Fixed rather than namespaced, as the sessions route is: the CLI has to find it + // knowing only the port from the record. + exports.TAP_GRAPHQL_ROUTE_PREFIX = '/__cypress/tap/graphql/'; + // Where tap GraphQL lived before the fixed route, under the default `namespace`. + // The CLI falls back to it to keep tapping sessions that predate the route, and it + // can go once those are no longer supported. + exports.LEGACY_TAP_GRAPHQL_PATH = '/__cypress/graphql'; + exports.TAP_SUPPORTED_BROWSER_FAMILY = 'chromium'; + // tap drives the browser over CDP, which only Chromium-based browsers speak. A + // null family means no browser is open yet — nothing to call unsupported. + const isTapSupportedBrowser = (browserFamily) => { + return browserFamily === null || browserFamily === exports.TAP_SUPPORTED_BROWSER_FAMILY; }; - const pinMeta = { - name: 'pin', - description: 'pin a command’s DOM snapshot into the live application-under-test frame', - details: `Pins a command's DOM snapshot into the live application-under-test frame so the -dom/aria/inspect commands can read it. Pass --clear to release.`, - params: [], - options: [ - { ...testIdField, required: false }, - { ...commandIdField, required: false }, - attemptField, - { name: 'at', type: 'string', required: false, description: 'which snapshot to pin: a name like "before"/"after" or a 1-based index; defaults to the last (the command’s final state). Re-run on the pinned command to switch snapshots without releasing the pin' }, - { name: 'clear', type: 'boolean', required: false, description: 'release the current pin and restore the app to its pre-pin state' }, - ], + exports.isTapSupportedBrowser = isTapSupportedBrowser; + const recordFileName = (pid) => { + return `${pid}${RECORD_EXTENSION}`; }; - const runStateMeta = { - name: 'run-state', - description: 'report where the Cypress session is in its run lifecycle', - params: [], - options: [], - hidden: true, + exports.recordFileName = recordFileName; + const parseRecordPid = (entry) => { + if (path_1.default.extname(entry) !== RECORD_EXTENSION) { + return null; + } + const pid = Number(path_1.default.basename(entry, RECORD_EXTENSION)); + return Number.isInteger(pid) ? pid : null; }; - const resolveSelectorMeta = { - name: 'resolve-selector', - description: 'list a unique CSS selector for each element a selector matches, null for any match none could be derived for', - params: [ - { name: 'selector', type: 'string', required: true, description: 'a CSS selector' }, - ], - options: [], - hidden: true, + exports.parseRecordPid = parseRecordPid; + const cypressSessionsDir = (cacheRoot) => { + return path_1.default.join(cacheRoot, exports.SESSIONS_DIRNAME); }; - // The canonical command metadata, the single source both sides build a schema - // from: the running session advertises it over the binding (see the app's - // TapManager), and the CLI stamps it with its own version to render help with no - // session attached. Order here is the order commands list in help. - exports$1.TAP_COMMANDS = [ - commandMeta, - reporterMeta, - pinMeta, - runStateMeta, - resolveSelectorMeta, - ]; - const buildTapSchema = (cypressVersion) => { - const commands = exports$1.TAP_COMMANDS.map((command) => { - return { - name: command.name, - description: command.description, - ...('details' in command ? { details: command.details } : {}), - params: command.params.map((param) => ({ ...param })), - options: command.options.map((option) => ({ ...option })), - ...('hidden' in command && command.hidden ? { hidden: true } : {}), - }; - }); - return { - schemaVersion: exports$1.TAP_SCHEMA_VERSION, - cypressVersion, - commands, - }; + exports.cypressSessionsDir = cypressSessionsDir; + const recordPath = (cacheRoot, pid) => { + return path_1.default.join((0, exports.cypressSessionsDir)(cacheRoot), (0, exports.recordFileName)(pid)); + }; + exports.recordPath = recordPath; + const sessionProbePath = (sessionId) => { + return `${exports.SESSIONS_ROUTE_PREFIX}${sessionId}`; + }; + exports.sessionProbePath = sessionProbePath; + const tapGraphqlPath = (operationName) => { + return `${exports.TAP_GRAPHQL_ROUTE_PREFIX}${operationName}`; + }; + exports.tapGraphqlPath = tapGraphqlPath; + const isValidTestingType = (value) => { + return value === 'e2e' || value === 'component' || value === null; + }; + const isCompatibleRecord = (record) => { + return Boolean(record) + && typeof record.schemaVersion === 'number' + && record.schemaVersion >= exports.MIN_SCHEMA_VERSION + && typeof record.pid === 'number' + && typeof record.projectRoot === 'string' + && Number.isInteger(record.serverPort) + && typeof record.sessionId === 'string' + && record.sessionId.length > 0 + && isValidTestingType(record.testingType); }; - exports$1.buildTapSchema = buildTapSchema; - const runMeta = { - name: 'run', - description: 'run (or rerun) a spec by its project-relative path', - details: `Runs (or reruns) a spec by its project-relative path, as listed by the specs -command. If no browser is open it launches one, switching to the spec's testing -type when needed, then requests the spec and returns immediately. This requests -the spec to begin, but completion of this command does not guarantee the spec -has started or finished. + exports.isCompatibleRecord = isCompatibleRecord; + + } (dist)); + return dist; +} -Poll the 'status' command for progress. Read status first and keep its -startedAt: a verdict still carrying that same startedAt describes the spec -before this one, so wait for a verdict whose startedAt differs.`, - params: [ - { name: 'spec', type: 'string', required: true, description: 'project-relative spec path, as listed by the specs command' }, - ], - }; - const sessionsMeta = { - name: 'sessions', - description: 'list the Cypress sessions this CLI can reach', - details: `Lists the Cypress sessions this CLI can reach. Cypress must be running locally, -support the \`tap\` command, and have an active Testing Type to be listed. A -session can be targeted by its PID in other commands using \`--session\`. +var distExports = requireDist(); -tap only supports Chromium based browsers (Chrome, Chromium, Edge, Electron). -A session running any other browser is listed as unsupported, and every other -tap command refuses it.`, - }; - const statusMeta = { - name: 'status', - description: 'report where a Cypress session is in its lifecycle', - details: `Reports where a Cypress session is in its lifecycle, as JSON — for polling and -"where am I?" checks. Always exits 0 for a determinable stage (including "not -connected"); a poller branches on the \`status\` field. +const debug$8 = Debug('cypress:cli:cypress-sessions'); +const PROBE_HOST = '127.0.0.1'; +const DEFAULT_PROBE_TIMEOUT_MS = 2000; +const isPidAlive = (pid) => { + try { + process.kill(pid, 0); + return true; + } + catch (err) { + return (err === null || err === void 0 ? void 0 : err.code) === 'EPERM'; + } +}; +// The server reports `cdpBrowserWsUrl` from in-memory state that it only clears +// when the browser *process* exits, so a closed browser window whose process +// lingers leaves the url stale. Hit the browser's own DevTools HTTP endpoint +// (Chromium exposes `/json/version` whenever the CDP port is open) to confirm +// the browser is really reachable before trusting the url. +const cdpEndpointReachable = (cdpBrowserWsUrl, timeoutMs) => xvfb.__awaiter(void 0, void 0, void 0, function* () { + let versionUrl; + try { + const { protocol, host } = new URL(cdpBrowserWsUrl); + versionUrl = `${protocol === 'wss:' ? 'https:' : 'http:'}//${host}/json/version`; + } + catch (err) { + debug$8('could not derive a CDP version url from %s: %o', cdpBrowserWsUrl, err); + return false; + } + try { + const response = yield fetch(versionUrl, { signal: AbortSignal.timeout(timeoutMs) }); + return response.ok; + } + catch (err) { + debug$8('CDP endpoint unreachable at %s: %o', versionUrl, err); + return false; + } +}); +const verifySessionRecord = (record_1, ...args_1) => xvfb.__awaiter(void 0, [record_1, ...args_1], void 0, function* (record, timeoutMs = DEFAULT_PROBE_TIMEOUT_MS) { + const url = `http://${PROBE_HOST}:${record.serverPort}${distExports.sessionProbePath(record.sessionId)}`; + try { + const response = yield fetch(url, { signal: AbortSignal.timeout(timeoutMs) }); + if (response.status !== 200) { + return null; + } + const live = yield response.json(); + if (live.sessionId !== record.sessionId) { + return null; + } + const cdpBrowserWsUrl = typeof live.cdpBrowserWsUrl === 'string' ? live.cdpBrowserWsUrl : null; + const attached = cdpBrowserWsUrl !== null && (yield cdpEndpointReachable(cdpBrowserWsUrl, timeoutMs)); + // The browser identity describes what the session has open, not what is + // reachable over CDP — a browser tap cannot drive still has to be nameable. + return Object.assign(Object.assign({}, record), { cdpBrowserWsUrl: attached ? cdpBrowserWsUrl : null, browserName: typeof live.browserName === 'string' ? live.browserName : null, browserFamily: typeof live.browserFamily === 'string' ? live.browserFamily : null, machineId: typeof live.machineId === 'string' ? live.machineId : null, userId: typeof live.userId === 'string' ? live.userId : null }); + } + catch (err) { + debug$8('liveness probe failed for pid %d on port %d: %o', record.pid, record.serverPort, err); + return null; + } +}); -Stages: -- not connected: Cypress cannot be reached. -- browser not selected: Cypress does not have a supported browser open. -- spec not selected: Cypress has a browser open but no spec is selected. -- loading: Cypress is loading the spec. -- running: Cypress is running the spec. -- passed: Cypress has completed the spec and all executed tests passed. -- failed: Cypress failed to run the spec, or has completed the spec and at least - one test failed. +const debug$7 = Debug('cypress:cli:cypress-sessions'); +const getSessionsDir = () => { + return distExports.cypressSessionsDir(xvfb.stateModule.getCacheDir()); +}; +const listRecordFiles = (dir) => xvfb.__awaiter(void 0, void 0, void 0, function* () { + let entries; + try { + entries = yield fs.readdir(dir); + } + catch (err) { + if (err.code === 'ENOENT') { + return []; + } + throw err; + } + const files = []; + for (const entry of entries) { + const pid = distExports.parseRecordPid(entry); + if (pid !== null) { + files.push({ path: path.join(dir, entry), pid }); + } + } + return files; +}); +const readCompatibleRecord = (filePath) => xvfb.__awaiter(void 0, void 0, void 0, function* () { + let record; + try { + record = yield fs.readJson(filePath); + } + catch (err) { + debug$7('could not read cypress sessions record %s: %o', filePath, err); + return null; + } + if (!distExports.isCompatibleRecord(record)) { + debug$7('incompatible cypress sessions record %s', filePath); + return null; + } + return record; +}); +// Reaps a record whose writer process is gone, returning whether it was dead. +// Removal is best-effort: a file we can't delete (permissions, a Windows lock) +// must not abort discovery of the other, live sessions, so the failure is +// swallowed and the record is still reported dead. +const reapIfDead = (file) => xvfb.__awaiter(void 0, void 0, void 0, function* () { + const { path, pid } = file; + if (isPidAlive(pid)) { + return false; + } + yield fs.remove(path).catch((err) => { + debug$7('failed to reap dead cypress sessions record %s: %o', path, err); + }); + return true; +}); +/** + * Reads all the current cypress session records that are still live (i.e. the writer process is still running). + * Reaps any dead records. + */ +const readLiveSessions = () => xvfb.__awaiter(void 0, void 0, void 0, function* () { + const files = yield listRecordFiles(getSessionsDir()); + const records = yield Promise.all(files.map((file) => xvfb.__awaiter(void 0, void 0, void 0, function* () { + const record = yield readCompatibleRecord(file.path); + if (!record) { + return null; + } + if (yield reapIfDead(file)) { + return null; + } + return record; + }))); + return records.filter((record) => record !== null); +}); +const pruneDeadSessionRecords = () => xvfb.__awaiter(void 0, void 0, void 0, function* () { + const files = yield listRecordFiles(getSessionsDir()); + const pruned = yield Promise.all(files.map((file) => reapIfDead(file))); + const removed = pruned.filter(Boolean).length; + debug$7('pruned %d dead cypress sessions record(s)', removed); + return removed; +}); -Statuses other than passed and failed are intermediate states, indicating that -Cypress requires additional instruction or is still processing. Loading stays -loading for as long as the spec takes to build, so a poller needs its own -timeout; a spec whose build fails reports failed and carries the reason as -error — it ran no tests, so it reports no counts either. +dayjs.extend(relativeTime); +// Subdirs under the cache root that are not binary version dirs. SESSIONS_DIRNAME +// is sourced from cypress-sessions so a rename there can't silently make prune +// treat the sessions dir as a stale binary cache and delete live records. +const EXTERNAL_CACHE_ENTRIES = new Set(['bundles', distExports.SESSIONS_DIRNAME]); +// output colors for the table +const colors = { + titles: chalk.white, + dates: chalk.cyan, + values: chalk.green, + size: chalk.gray, +}; +const logCachePath = () => { + xvfb.loggerModule.always(xvfb.stateModule.getCacheDir()); + return undefined; +}; +const clear = () => { + return fs.remove(xvfb.stateModule.getCacheDir()); +}; +const prune = () => xvfb.__awaiter(void 0, void 0, void 0, function* () { + const cacheDir = xvfb.stateModule.getCacheDir(); + const checkedInBinaryVersion = xvfb.util.pkgVersion(); + let deletedBinary = false; + try { + const versions = yield fs.readdir(cacheDir); + for (const version of versions) { + if (EXTERNAL_CACHE_ENTRIES.has(version)) + continue; + if (version !== checkedInBinaryVersion) { + deletedBinary = true; + const versionDir = path.join(cacheDir, version); + yield fs.remove(versionDir); + } + } + if (deletedBinary) { + xvfb.loggerModule.always(`Deleted all binary caches except for the ${checkedInBinaryVersion} binary cache.`); + } + else { + xvfb.loggerModule.always(`No binary caches found to prune.`); + } + yield pruneDeadSessionRecords(); + } + catch (e) { + if (e.code === 'ENOENT') { + xvfb.loggerModule.always(`No Cypress cache was found at ${cacheDir}. Nothing to prune.`); + return; + } + throw e; + } +}); +const fileSizeInMB = (size) => { + return `${(size / 1024 / 1024).toFixed(1)}MB`; +}; +/** + * Collects all cached versions, finds when each was used + * and prints a table with results to the terminal + */ +const list = (...args_1) => xvfb.__awaiter(void 0, [...args_1], void 0, function* (showSize = false) { + const binaries = yield getCachedVersions(showSize); + const head = [colors.titles('version'), colors.titles('last used')]; + if (showSize) { + head.push(colors.titles('size')); + } + const table = new Table({ + head, + }); + binaries.forEach((binary) => { + const versionString = colors.values(binary.version); + const lastUsed = binary.accessed ? colors.dates(binary.accessed) : 'unknown'; + const row = [versionString, lastUsed]; + if (showSize) { + const size = colors.size(fileSizeInMB(binary.size)); + row.push(size); + } + return table.push(row); + }); + xvfb.loggerModule.always(table.toString()); +}); +const getCachedVersions = (showSize) => xvfb.__awaiter(void 0, void 0, void 0, function* () { + const cacheDir = xvfb.stateModule.getCacheDir(); + const versions = yield fs.readdir(cacheDir); + const filteredVersions = versions.filter(xvfb.util.isSemver).map((version) => { + return { + version, + folderPath: path.join(cacheDir, version), + }; + }); + const binaries = []; + for (const binary of filteredVersions) { + const binaryDir = xvfb.stateModule.getBinaryDir(binary.version); + const executable = xvfb.stateModule.getPathToExecutable(binaryDir); + try { + const stat = yield fs.stat(executable); + const lastAccessedTime = _.get(stat, 'atime'); + if (lastAccessedTime) { + const accessed = dayjs(lastAccessedTime).fromNow(); + // @ts-expect-error - accessed is not defined in the type + binary.accessed = accessed; + } + // if no lastAccessedTime + // the test runner has never been opened + // or could be a test simulating missing timestamp + } + catch (e) { + // could not find the binary or gets its stats + // no-op + } + if (showSize) { + const binaryDir = xvfb.stateModule.getBinaryDir(binary.version); + const size = yield getSize(binaryDir); + binaries.push(Object.assign(Object.assign({}, binary), { size })); + } + else { + binaries.push(binary); + } + } + return binaries; +}); +const cacheModule = { + path: logCachePath, + clear, + prune, + list, + getCachedVersions, +}; -From loading onwards the output carries \`startedAt\`, the spec every other field -describes (null while loading). In the event of a rerun the previous spec's -verdict remains visible until the new one begins, identical on every other -field, so use \`startedAt\` to validate whether output describes the previous -spec or the new one.`, - }; - const specsMeta = { - name: 'specs', - description: 'list the specs the Cypress session can run, most recently modified first', - details: `Lists the specs the connected Cypress session can run, in descending order by -last modified. To find other testing types you must connect to a Cypress -session with that testing type active.`, - }; - // Every selector these three take must resolve to exactly one element, so a - // reader is never silently shown one of several matches. Their help says so in - // the same words, and names the remedy the ambiguity error offers. - const SINGLE_ELEMENT_SELECTOR = 'a CSS selector matching exactly one element'; - const AMBIGUOUS_SELECTOR_HELP = `The selector must match exactly one element. If it matches multiple elements -nothing is read: the command answers with a numbered list of the matches (up to -10), each with a unique selector. Re-run with --at to read one of them, -or with whichever selector you meant.`; - // Where `dom` and `aria` read from with no selector: the document element only - // adds a of script and style text; `--selector html` still reads it. - const TAP_DEFAULT_SELECTOR = 'body'; - // Shared by the three selector-taking reads, so the way you pick one match out - // of several is identical across them. - const atField = { - name: 'at', - type: 'number', - required: false, - description: 'When a selector matches multiple elements, the 0-based index of the match to read', - }; - const domMeta = { - name: 'dom', - description: 'read the application-under-test DOM as HTML: the page body, or a single element with its children by providing a CSS Selector', - details: `Reads the application-under-test DOM as HTML: a single element matching a CSS -Selector, and all of its children. Without --selector it reads the page body; -pass --selector html for the entire document. Output is capped browser-side so a -heavy page never ships megabytes at once. +/** + * Throws an error with "details" property from + * "errors" object. + * @param {Object} details - Error details + */ +const throwInvalidOptionError = (details) => { + if (!details) { + details = xvfb.errors.unknownError; + } + // throw this error synchronously, it will be caught later on and + // the details will be propagated to the promise chain + const err = new Error(); + err.details = details; + throw err; +}; +/** + * Selects exec args based on the configured `testingType` + * @param {string} testingType The type of tests being executed + * @returns {string[]} The array of new exec arguments + */ +const processTestingType = (options) => { + if (options.e2e && options.component) { + return throwInvalidOptionError(xvfb.errors.incompatibleTestTypeFlags); + } + if (options.testingType && (options.component || options.e2e)) { + return throwInvalidOptionError(xvfb.errors.incompatibleTestTypeFlags); + } + if (options.testingType === 'component' || options.component || options.ct) { + return ['--testing-type', 'component']; + } + if (options.testingType === 'e2e' || options.e2e) { + return ['--testing-type', 'e2e']; + } + if (options.testingType) { + return throwInvalidOptionError(xvfb.errors.invalidTestingType); + } + return []; +}; +/** + * Throws an error if configFile is string 'false' or boolean false + * @param {*} options + */ +const checkConfigFile = (options) => { + // CLI will parse as string, module API can pass in boolean + if (options.configFile === 'false' || options.configFile === false) { + throwInvalidOptionError(xvfb.errors.invalidConfigFile); + } +}; -${AMBIGUOUS_SELECTOR_HELP}`, - params: [], - options: [ - { ...selectorField, defaultValue: TAP_DEFAULT_SELECTOR, description: SINGLE_ELEMENT_SELECTOR }, - { name: 'max-chars', alias: 'm', type: 'number', required: false, defaultValue: 30000, description: 'cap on returned HTML characters' }, - atField, - ], - }; - const ariaMeta = { - name: 'aria', - description: 'read the accessibility (ARIA) tree of the application-under-test page body, or the subtree at a selector', - details: `Reads the accessibility (ARIA) tree of the application under test, rooted at the -page body or at the element a CSS Selector matches. Structural and text-only -roles are dropped, leaving the compact role/name/state tree DevTools shows. +const debug$6 = Debug('cypress:cli'); +/** + * Maps options collected by the CLI + * and forms list of CLI arguments to the server. + * + * Note: there is lightweight validation, with errors + * thrown synchronously. + * + * @returns {string[]} list of CLI arguments + */ +const processOpenOptions = (options = {}) => { + // In addition to setting the project directory, setting the project option + // here ultimately decides whether cypress is run in global mode or not. + // It's first based off whether it's installed globally by npm/yarn (-g). + // A global install can be overridden by the --project flag, putting Cypress + // in project mode. A non-global install can be overridden by the --global + // flag, putting it in global mode. + if (!xvfb.util.isInstalledGlobally() && !options.global && !options.project) { + options.project = process.cwd(); + } + const args = []; + if (options.config) { + args.push('--config', options.config); + } + if (options.configFile !== undefined) { + checkConfigFile(options); + args.push('--config-file', options.configFile); + } + if (options.browser) { + args.push('--browser', options.browser); + } + if (options.env) { + args.push('--env', options.env); + } + if (options.expose) { + args.push('--expose', options.expose); + } + if (options.port) { + args.push('--port', options.port); + } + if (options.project) { + args.push('--project', options.project); + } + if (options.global) { + args.push('--global', options.global); + } + if (options.inspect) { + args.push('--inspect'); + } + if (options.inspectBrk) { + args.push('--inspectBrk'); + } + args.push(...processTestingType(options)); + debug$6('opening from options %j', options); + debug$6('command line arguments %j', args); + return args; +}; +const start$3 = (...args_1) => xvfb.__awaiter(void 0, [...args_1], void 0, function* (options = {}) { + function open() { + try { + const args = processOpenOptions(options); + return spawn.start$1(args, { + dev: options.dev, + detached: Boolean(options.detached), + }); + } + catch (err) { + if (err.details) { + return xvfb.exitWithError(err.details)(); + } + throw err; + } + } + if (options.dev) { + return open(); + } + yield spawn.start(); + return open(); +}); +var openModule = { + start: start$3, + processOpenOptions, +}; -${AMBIGUOUS_SELECTOR_HELP}`, - params: [], - options: [ - { ...selectorField, defaultValue: TAP_DEFAULT_SELECTOR, description: SINGLE_ELEMENT_SELECTOR }, - // The accessibility tree of a real app is deep; the cap keeps the projection - // affordable for an LLM. A selector roots it at a subtree for finer reads. - { name: 'max-nodes', alias: 'm', type: 'number', required: false, defaultValue: 200, description: 'cap on the number of accessibility nodes returned' }, - atField, - ], - }; - const inspectMeta = { - name: 'inspect', - description: 'retrieve the tag, attributes, computed styles, box model, and accessibility node of a specific element', - details: `Inspects a single element matching a CSS Selector: outputs the tag, attributes, -curated computed styles, box model, and that element's own accessibility node -— where \`aria\` reads the whole tree, this reads the one node. +const debug$5 = Debug('cypress:cli:run'); +/** + * Typically a user passes a string path to the project. + * But "cypress open" allows using `false` to open in global mode, + * and the user can accidentally execute `cypress run --project false` + * which should be invalid. + */ +const isValidProject = (v) => { + if (typeof v === 'boolean') { + return false; + } + if (v === '' || v === 'false' || v === 'true') { + return false; + } + return true; +}; +/** + * Maps options collected by the CLI + * and forms list of CLI arguments to the server. + * + * Note: there is lightweight validation, with errors + * thrown synchronously. + * + * @returns {string[]} list of CLI arguments + */ +const processRunOptions = (options = {}) => { + debug$5('processing run options %o', options); + if (!isValidProject(options.project)) { + debug$5('invalid project option %o', { project: options.project }); + return throwInvalidOptionError(xvfb.errors.invalidRunProjectPath); + } + const args = ['--run-project', options.project]; + if (options.autoCancelAfterFailures || options.autoCancelAfterFailures === 0 || options.autoCancelAfterFailures === false) { + args.push('--auto-cancel-after-failures', options.autoCancelAfterFailures); + } + if (options.browser) { + args.push('--browser', options.browser); + } + if (options.ciBuildId) { + args.push('--ci-build-id', options.ciBuildId); + } + if (options.config) { + args.push('--config', options.config); + } + if (options.configFile !== undefined) { + checkConfigFile(options); + args.push('--config-file', options.configFile); + } + if (options.env) { + args.push('--env', options.env); + } + if (options.expose) { + args.push('--expose', options.expose); + } + if (options.exit === false) { + args.push('--no-exit'); + } + if (options.group) { + args.push('--group', options.group); + } + if (options.headed) { + args.push('--headed', options.headed); + } + if (options.headless) { + if (options.headed) { + return throwInvalidOptionError(xvfb.errors.incompatibleHeadlessFlags); + } + args.push('--headed', String(!options.headless)); + } + // if key is set use that - else attempt to find it by environment variable + if (options.key == null) { + debug$5('--key is not set, looking up environment variable CYPRESS_RECORD_KEY'); + options.key = xvfb.util.getEnv('CYPRESS_RECORD_KEY'); + } + // if we have a key assume we're in record mode + if (options.key) { + args.push('--key', options.key); + } + if (options.outputPath) { + args.push('--output-path', options.outputPath); + } + if (options.parallel) { + args.push('--parallel'); + } + if (options.passWithNoTests) { + args.push('--pass-with-no-tests'); + } + if (options.posixExitCodes) { + args.push('--posix-exit-codes'); + } + if (options.port) { + args.push('--port', options.port); + } + if (options.quiet) { + args.push('--quiet'); + } + // if record is defined and we're not + // already in ci mode, then send it up + if (options.record != null) { + args.push('--record', options.record); + } + // if we have a specific reporter push that into the args + if (options.reporter) { + args.push('--reporter', options.reporter); + } + // if we have a specific reporter push that into the args + if (options.reporterOptions) { + args.push('--reporter-options', options.reporterOptions); + } + if (options.runnerUi != null) { + args.push('--runner-ui', options.runnerUi); + } + // if we have specific spec(s) push that into the args + if (options.spec) { + args.push('--spec', options.spec); + } + if (options.tag) { + args.push('--tag', options.tag); + } + if (options.inspect) { + args.push('--inspect'); + } + if (options.inspectBrk) { + args.push('--inspectBrk'); + } + args.push(...processTestingType(options)); + return args; +}; +const runModule = { + processRunOptions, + isValidProject, + // resolves with the number of failed tests + start() { + return xvfb.__awaiter(this, arguments, void 0, function* (options = {}) { + _.defaults(options, { + key: null, + spec: null, + reporter: null, + reporterOptions: null, + project: process.cwd(), + }); + function run() { + try { + const args = processRunOptions(options); + debug$5('run to spawn.start args %j', args); + return spawn.start$1(args, { + dev: options.dev, + }); + } + catch (err) { + if (err.details) { + return xvfb.exitWithError(err.details)(); + } + throw err; + } + } + if (options.dev) { + return run(); + } + yield spawn.start(); + return run(); + }); + }, +}; -${AMBIGUOUS_SELECTOR_HELP}`, - params: [], - options: [ - { ...selectorField, required: true, description: `${SINGLE_ELEMENT_SELECTOR}, identifying the element to inspect` }, - atField, - ], - }; - // CLI-native tap commands: implemented entirely in the CLI (session discovery - // over the filesystem, DOM/ARIA reads over CDP), so — unlike TAP_COMMANDS — they - // are never advertised by getSchema or exec'd on the session. Listed here in the - // order they appear in help, ahead of the schema-driven commands. - exports$1.TAP_NATIVE_COMMANDS = [ - sessionsMeta, - statusMeta, - specsMeta, - runMeta, - domMeta, - ariaMeta, - inspectMeta, - ]; - const allTapCommands = [...exports$1.TAP_NATIVE_COMMANDS, ...exports$1.TAP_COMMANDS]; - /** Every command name this CLI ships, whether it dispatches to the session or handles it itself. */ - exports$1.KNOWN_COMMANDS = new Set(allTapCommands.map(({ name }) => name)); - // The failure catalogue and the error both sides raise. Re-exported here for the - // same reason the result contracts are: this module is dependency-free, so the - // browser-side app can import it where it cannot import the package barrel. - __exportStar(requireTapErrors(), exports$1); - // Per-command result contracts live in `./contracts/`; re-exported here so the - // app's deep import of this module and the package barrel both reach them. - __exportStar(requireReporter(), exports$1); - __exportStar(requireCommand(), exports$1); - __exportStar(requirePinned(), exports$1); - __exportStar(requirePin(), exports$1); - __exportStar(requireResolveSelector(), exports$1); - - } (tapContract)); - return tapContract; -} +const debug$4 = Debug('cypress:cli'); +const defaultBaseUrl = 'https://download.cypress.io/'; +const defaultMaxRedirects = 10; +const getProxyForUrlWithNpmConfig = (url) => { + return proxyFromEnv.getProxyForUrl(url) || + process.env.npm_config_https_proxy || + process.env.npm_config_proxy || + null; +}; +const getBaseUrl = () => { + if (xvfb.util.getEnv('CYPRESS_DOWNLOAD_MIRROR')) { + let baseUrl = xvfb.util.getEnv('CYPRESS_DOWNLOAD_MIRROR'); + if (!(baseUrl === null || baseUrl === void 0 ? void 0 : baseUrl.endsWith('/'))) { + baseUrl += '/'; + } + return baseUrl || defaultBaseUrl; + } + return defaultBaseUrl; +}; +const getCA = () => xvfb.__awaiter(void 0, void 0, void 0, function* () { + if (process.env.npm_config_cafile) { + try { + const caFileContent = yield fs.readFile(process.env.npm_config_cafile, 'utf8'); + return caFileContent; + } + catch (error) { + debug$4('error reading ca file', error); + return; + } + } + if (process.env.npm_config_ca) { + return process.env.npm_config_ca; + } + return; +}); +const prepend = (arch, urlPath, version) => { + const endpoint = new URL(urlPath, getBaseUrl()).toString(); + const platform = os.platform(); + const pathTemplate = xvfb.util.getEnv('CYPRESS_DOWNLOAD_PATH_TEMPLATE', true); + if ((platform === 'win32') && (arch === 'arm64')) { + debug$4(`detected platform ${platform} architecture ${arch} combination`); + arch = 'x64'; + debug$4(`overriding to download ${platform}-${arch} instead`); + } + return pathTemplate + ? (pathTemplate + .replace(/\\?\$\{endpoint\}/g, endpoint) + .replace(/\\?\$\{platform\}/g, platform) + .replace(/\\?\$\{arch\}/g, arch) + .replace(/\\?\$\{version\}/g, version)) + : `${endpoint}?platform=${platform}&arch=${arch}`; +}; +const getUrl = (arch, version) => { + if (_.isString(version) && version.match(/^https?:\/\/.*$/)) { + debug$4('version is already an url', version); + return version; + } + const urlPath = version ? `desktop/${version}` : 'desktop'; + return prepend(arch, urlPath, version || ''); +}; +const statusMessage = (err) => { + return (err.statusCode + ? [err.statusCode, err.statusMessage].join(' - ') + : err.toString()); +}; +const prettyDownloadErr = (err, url) => { + const msg = commonTags.stripIndent ` + URL: ${url} + ${statusMessage(err)} + `; + debug$4(msg); + return xvfb.throwFormErrorText(xvfb.errors.failedDownload)(msg); +}; +/** + * Checks checksum and file size for the given file. Allows both + * values or just one of them to be checked. + */ +const verifyDownloadedFile = (filename, expectedSize, expectedChecksum) => xvfb.__awaiter(void 0, void 0, void 0, function* () { + if (expectedSize && expectedChecksum) { + debug$4('verifying checksum and file size'); + return Bluebird.join(xvfb.util.getFileChecksum(filename), xvfb.util.getFileSize(filename), (checksum, filesize) => { + if (checksum === expectedChecksum && filesize === expectedSize) { + debug$4('downloaded file has the expected checksum and size ✅'); + return; + } + debug$4('raising error: checksum or file size mismatch'); + const text = commonTags.stripIndent ` + Corrupted download -var tapOperations = {}; + Expected downloaded file to have checksum: ${expectedChecksum} + Computed checksum: ${checksum} -var hasRequiredTapOperations; + Expected downloaded file to have size: ${expectedSize} + Computed size: ${filesize} + `; + debug$4(text); + throw new Error(text); + }); + } + if (expectedChecksum) { + debug$4('only checking expected file checksum %d', expectedChecksum); + const checksum = yield xvfb.util.getFileChecksum(filename); + if (checksum === expectedChecksum) { + debug$4('downloaded file has the expected checksum ✅'); + return; + } + debug$4('raising error: file checksum mismatch'); + const text = commonTags.stripIndent ` + Corrupted download -function requireTapOperations () { - if (hasRequiredTapOperations) return tapOperations; - hasRequiredTapOperations = 1; - Object.defineProperty(tapOperations, "__esModule", { value: true }); - tapOperations.tapRunSpecOperation = tapOperations.TapSpecsOperation = void 0; - tapOperations.TapSpecsOperation = { - operationName: 'TapSpecs', - query: /* GraphQL */ ` - query TapSpecs { - currentProject { - specs { - relative - absolute - gitInfo { - lastModifiedHumanReadable - lastModifiedTimestamp - } + Expected downloaded file to have checksum: ${expectedChecksum} + Computed checksum: ${checksum} + `; + throw new Error(text); + } + if (expectedSize) { + // maybe we don't have a checksum, but at least CDN returns content length + // which we can check against the file size + debug$4('only checking expected file size %d', expectedSize); + const filesize = yield xvfb.util.getFileSize(filename); + if (filesize === expectedSize) { + debug$4('downloaded file has the expected size ✅'); + return; } - } + debug$4('raising error: file size mismatch'); + const text = commonTags.stripIndent ` + Corrupted download + + Expected downloaded file to have size: ${expectedSize} + Computed size: ${filesize} + `; + throw new Error(text); + } + debug$4('downloaded file lacks checksum or size to verify'); + return; +}); +// downloads from given url +// return an object with +// {filename: ..., downloaded: true} +const downloadFromUrl = ({ url, downloadDestination, progress, ca, version, redirectTTL = defaultMaxRedirects }) => { + if (redirectTTL <= 0) { + return Promise.reject(new Error(commonTags.stripIndent ` + Failed downloading the Cypress binary. + There were too many redirects. The default allowance is ${defaultMaxRedirects}. + Maybe you got stuck in a redirect loop? + `)); + } + return new Bluebird((resolve, reject) => { + const proxy = getProxyForUrlWithNpmConfig(url); + debug$4('Downloading package', { + url, + proxy, + downloadDestination, + }); + if (ca) { + debug$4('using custom CA details from npm config'); + } + const reqOptions = Object.assign(Object.assign(Object.assign({ uri: url }, (proxy ? { proxy } : {})), (ca ? { agentOptions: { ca } } : {})), { method: 'GET', followRedirect: false }); + const req = request(reqOptions); + // closure + let started = null; + let expectedSize; + let expectedChecksum; + requestProgress(req, { + throttle: progress.throttle, + }) + .on('response', (response) => { + // we have computed checksum and filesize during test runner binary build + // and have set it on the S3 object as user meta data, available via + // these custom headers "x-amz-meta-..." + // see https://github.com/cypress-io/cypress/pull/4092 + expectedSize = response.headers['x-amz-meta-size'] || + response.headers['content-length']; + expectedChecksum = response.headers['x-amz-meta-checksum']; + if (expectedChecksum) { + debug$4('expected checksum %s', expectedChecksum); + } + if (expectedSize) { + // convert from string (all Amazon custom headers are strings) + expectedSize = Number(expectedSize); + debug$4('expected file size %d', expectedSize); + } + // start counting now once we've gotten + // response headers + started = new Date(); + if (/^3/.test(response.statusCode)) { + const redirectVersion = response.headers['x-version']; + const redirectUrl = response.headers.location; + debug$4('redirect version:', redirectVersion); + debug$4('redirect url:', redirectUrl); + downloadFromUrl({ url: redirectUrl, progress, ca, downloadDestination, version: redirectVersion, redirectTTL: redirectTTL - 1 }) + .then(resolve).catch(reject); + // if our status code does not start with 200 + } + else if (!/^2/.test(response.statusCode)) { + debug$4('response code %d', response.statusCode); + const err = new Error(commonTags.stripIndent ` + Failed downloading the Cypress binary. + Response code: ${response.statusCode} + Response message: ${response.statusMessage} + `); + reject(err); + // status codes here are all 2xx + } + else { + // We only enable this pipe connection when we know we've got a successful return + // and handle the completion with verify and resolve + // there was a possible race condition between end of request and close of writeStream + // that is made ordered with this Promise.all + Bluebird.all([new Bluebird((r) => { + return response.pipe(fs.createWriteStream(downloadDestination).on('close', r)); + }), new Bluebird((r) => response.on('end', r))]) + .then(() => { + debug$4('downloading finished'); + verifyDownloadedFile(downloadDestination, expectedSize, expectedChecksum) + .then(() => debug$4('verified')) + .then(() => resolve(version)) + .catch(reject); + }); + } + }) + .on('error', (e) => { + if (e.code === 'ECONNRESET') + return; // sometimes proxies give ECONNRESET but we don't care + reject(e); + }) + .on('progress', (state) => { + // total time we've elapsed + // starting on our first progress notification + const elapsed = +new Date() - +started; + // request-progress sends a value between 0 and 1 + const percentage = xvfb.util.convertPercentToPercentage(state.percent); + const eta = xvfb.util.calculateEta(percentage, elapsed); + // send up our percent and seconds remaining + progress.onProgress(percentage, xvfb.util.secsRemaining(eta)); + }); + }); +}; +/** + * Download Cypress.zip from external versionUrl to local file. + * @param [string] version Could be "3.3.0" or full URL + * @param [string] downloadDestination Local filename to save as + */ +const start$2 = (opts) => xvfb.__awaiter(void 0, void 0, void 0, function* () { + let { version, downloadDestination, progress, redirectTTL } = opts; + if (!downloadDestination) { + assert.ok(_.isString(downloadDestination) && !_.isEmpty(downloadDestination), 'missing download dir'); + } + if (!progress) { + progress = { onProgress: () => { + return {}; + } }; + } + const arch = yield xvfb.util.getRealArch(); + const versionUrl = getUrl(arch, version); + progress.throttle = 100; + debug$4('needed Cypress version: %s', version); + debug$4('source url %s', versionUrl); + debug$4(`downloading cypress.zip to "${downloadDestination}"`); + try { + // ensure download dir exists + yield fs.ensureDir(path.dirname(downloadDestination)); + const ca = yield getCA(); + return downloadFromUrl(Object.assign({ url: versionUrl, downloadDestination, progress, ca, version }, (redirectTTL ? { redirectTTL } : {}))); + } + catch (err) { + return prettyDownloadErr(err, versionUrl); + } +}); +const downloadModule = { + start: start$2, + getUrl, + getProxyForUrlWithNpmConfig, + getCA, +}; + +const pipelineAsync = util.promisify(require$$0.pipeline); +// Unix file mode masks for entries stored in zip's externalFileAttributes +// (the high 16 bits when the file was zipped on a Unix host). +const S_IFMT = 0o170000; +const S_IFDIR = 0o040000; +const S_IFLNK = 0o120000; +// PATH_MAX on Linux/macOS is 4096; symlink targets larger than this are not +// legal filesystem paths and almost certainly indicate a malformed or +// malicious archive. The cap also prevents reading an arbitrarily large +// "symlink" entry into memory. +const MAX_SYMLINK_TARGET_BYTES = 4096; +/** + * Extracts the contents of a zip archive into the given destination directory. + * Recreates directories, regular files, and symlinks while preserving Unix + * file modes encoded in each entry's external attributes. Calls `onEntry` once + * per archive entry processed. Refuses entries whose resolved path would + * escape the destination directory. + */ +const extractWithYauzl = (zipFilePath, destDir, onEntry) => xvfb.__awaiter(void 0, void 0, void 0, function* () { + const resolvedDest = path.resolve(destDir); + yield new Promise((resolve, reject) => { + // autoClose: false — `finish` below owns closing the zipfile, so we don't + // want yauzl's internal end-listener closing it first and tripping a + // double-close (EBADF) when we do. + yauzl.open(zipFilePath, { lazyEntries: true, autoClose: false }, (err, zipFile) => { + if (err) { + return reject(err); + } + // `settled` guards against an in-flight `handleEntry` calling + // `zipFile.readEntry()` on a now-closed handle when extraction has + // already failed (e.g. yauzl emitted 'error' while we were writing + // an entry to disk). + let settled = false; + const finish = _.once((err) => { + var _a, _b; + settled = true; + (_a = zipFile.removeAllListeners) === null || _a === void 0 ? void 0 : _a.call(zipFile); + (_b = zipFile.close) === null || _b === void 0 ? void 0 : _b.call(zipFile); + if (err) { + return reject(err); + } + return resolve(); + }); + // Normalize any thrown / emitted value into a real Error so that a + // falsy rejection (e.g. `Promise.reject(undefined)`) doesn't get + // misread by `finish` as a successful completion. + const fail = (err) => { + finish(err instanceof Error ? err : new Error(typeof err === 'string' && err ? err : 'zip extraction failed')); + }; + zipFile.on('error', fail); + zipFile.on('end', () => finish()); + zipFile.on('entry', (entry) => { + handleEntry(zipFile, entry, resolvedDest) + .then(() => { + if (settled) + return; + onEntry(); + zipFile.readEntry(); + }) + .catch(fail); + }); + zipFile.readEntry(); + }); + }); +}); +const handleEntry = (zipFile, entry, resolvedDest) => xvfb.__awaiter(void 0, void 0, void 0, function* () { + const fileDest = path.resolve(resolvedDest, entry.fileName); + // refuse anything that would write outside the install dir + if (fileDest !== resolvedDest && + !fileDest.startsWith(resolvedDest + path.sep)) { + throw new Error(`Refusing to extract entry outside of destination: ${entry.fileName}`); } - `, - }; - const TAP_RUN_SPEC_QUERY = /* GraphQL */ ` - mutation TapRunSpec($specPath: String!) { - runSpec(specPath: $specPath) { - __typename - ... on RunSpecResponse { - testingType - browser { - displayName + const unixMode = (entry.externalFileAttributes >>> 16) & 0xffff; + // Some archivers mark directories by Unix mode bits instead of (or in + // addition to) a trailing slash; honor both so we don't extract a + // directory entry as a zero-byte file. + const isDir = /\/$/.test(entry.fileName) || (unixMode & S_IFMT) === S_IFDIR; + const isSymlink = (unixMode & S_IFMT) === S_IFLNK; + if (isDir) { + yield fsp.mkdir(fileDest, { recursive: true }); + return; + } + yield fsp.mkdir(path.dirname(fileDest), { recursive: true }); + if (isSymlink) { + if (entry.uncompressedSize > MAX_SYMLINK_TARGET_BYTES) { + throw new Error(`Refusing to extract symlink with target larger than ${MAX_SYMLINK_TARGET_BYTES} bytes: ${entry.fileName}`); } - spec { - relative + const linkTarget = yield readEntryAsString(zipFile, entry, MAX_SYMLINK_TARGET_BYTES); + const resolvedTarget = path.resolve(path.dirname(fileDest), linkTarget); + if (resolvedTarget !== resolvedDest && + !resolvedTarget.startsWith(resolvedDest + path.sep)) { + throw new Error(`Refusing to extract symlink pointing outside of destination: ${entry.fileName} -> ${linkTarget}`); } - } - ... on RunSpecError { - code - detailMessage - } + yield fsp.rm(fileDest, { recursive: true, force: true }); + yield fsp.symlink(linkTarget, fileDest); + return; } - } -`; - const tapRunSpecOperation = (specPath) => { - return { - operationName: 'TapRunSpec', - query: TAP_RUN_SPEC_QUERY, - variables: { specPath }, - }; - }; - tapOperations.tapRunSpecOperation = tapRunSpecOperation; - - return tapOperations; -} - -var hasRequiredDist; + const readStream = yield new Promise((res, rej) => { + zipFile.openReadStream(entry, (err, rs) => { + if (err) { + return rej(err); + } + return res(rs); + }); + }); + // Preserve the Unix mode bits when present; otherwise fall back to a sane default. + const fileMode = (unixMode & 0o7777) || 0o644; + const writeStream = fs$1.createWriteStream(fileDest, { mode: fileMode }); + yield pipelineAsync(readStream, writeStream); +}); +const readEntryAsString = (zipFile, entry, maxBytes) => { + return new Promise((resolve, reject) => { + zipFile.openReadStream(entry, (err, rs) => { + if (err) { + return reject(err); + } + const chunks = []; + let received = 0; + let bailed = false; + const bail = (err) => { + var _a; + if (bailed) + return; + bailed = true; + (_a = rs.destroy) === null || _a === void 0 ? void 0 : _a.call(rs, err); + reject(err); + }; + rs.on('data', (chunk) => { + received += chunk.length; + if (received > maxBytes) { + bail(new Error(`Refusing to read entry body larger than ${maxBytes} bytes: ${entry.fileName}`)); + return; + } + chunks.push(chunk); + }); + rs.on('end', () => { + if (bailed) + return; + resolve(Buffer.concat(chunks).toString('utf8')); + }); + rs.on('error', bail); + }); + }); +}; -function requireDist () { - if (hasRequiredDist) return dist; - hasRequiredDist = 1; - (function (exports$1) { - var __createBinding = (dist && dist.__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 = (dist && dist.__exportStar) || function(m, exports$1) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$1, p)) __createBinding(exports$1, m, p); - }; - var __importDefault = (dist && dist.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; - }; - Object.defineProperty(exports$1, "__esModule", { value: true }); - exports$1.isCompatibleRecord = exports$1.sessionProbePath = exports$1.recordPath = exports$1.cypressSessionsDir = exports$1.parseRecordPid = exports$1.recordFileName = exports$1.isTapSupportedBrowser = exports$1.TAP_SUPPORTED_BROWSER_FAMILY = exports$1.SESSION_ID_HEADER = exports$1.SESSIONS_ROUTE_PREFIX = exports$1.SESSIONS_DIRNAME = exports$1.MIN_SCHEMA_VERSION = exports$1.SCHEMA_VERSION = void 0; - const path_1 = __importDefault(path); - __exportStar(requireTapContract(), exports$1); - __exportStar(requireTapOperations(), exports$1); - exports$1.SCHEMA_VERSION = 1; - exports$1.MIN_SCHEMA_VERSION = 1; - exports$1.SESSIONS_DIRNAME = 'sessions'; - const RECORD_EXTENSION = '.json'; - exports$1.SESSIONS_ROUTE_PREFIX = '/__cypress/sessions/'; - exports$1.SESSION_ID_HEADER = 'x-cypress-session-id'; - exports$1.TAP_SUPPORTED_BROWSER_FAMILY = 'chromium'; - // tap drives the browser over CDP, which only Chromium-based browsers speak. A - // null family means no browser is open yet — nothing to call unsupported. - const isTapSupportedBrowser = (browserFamily) => { - return browserFamily === null || browserFamily === exports$1.TAP_SUPPORTED_BROWSER_FAMILY; - }; - exports$1.isTapSupportedBrowser = isTapSupportedBrowser; - const recordFileName = (pid) => { - return `${pid}${RECORD_EXTENSION}`; - }; - exports$1.recordFileName = recordFileName; - const parseRecordPid = (entry) => { - if (path_1.default.extname(entry) !== RECORD_EXTENSION) { - return null; - } - const pid = Number(path_1.default.basename(entry, RECORD_EXTENSION)); - return Number.isInteger(pid) ? pid : null; - }; - exports$1.parseRecordPid = parseRecordPid; - const cypressSessionsDir = (cacheRoot) => { - return path_1.default.join(cacheRoot, exports$1.SESSIONS_DIRNAME); - }; - exports$1.cypressSessionsDir = cypressSessionsDir; - const recordPath = (cacheRoot, pid) => { - return path_1.default.join((0, exports$1.cypressSessionsDir)(cacheRoot), (0, exports$1.recordFileName)(pid)); - }; - exports$1.recordPath = recordPath; - const sessionProbePath = (sessionId) => { - return `${exports$1.SESSIONS_ROUTE_PREFIX}${sessionId}`; - }; - exports$1.sessionProbePath = sessionProbePath; - const isValidTestingType = (value) => { - return value === 'e2e' || value === 'component' || value === null; - }; - const isCompatibleRecord = (record) => { - return Boolean(record) - && typeof record.schemaVersion === 'number' - && record.schemaVersion >= exports$1.MIN_SCHEMA_VERSION - && typeof record.pid === 'number' - && typeof record.projectRoot === 'string' - && Number.isInteger(record.serverPort) - && typeof record.sessionId === 'string' - && record.sessionId.length > 0 - && isValidTestingType(record.testingType); - }; - exports$1.isCompatibleRecord = isCompatibleRecord; - - } (dist)); - return dist; +const debug$3 = Debug('cypress:cli:unzip'); +const unzipTools = { + extractWithYauzl, +}; +// expose this function for simple testing +const unzip = (_a) => xvfb.__awaiter(void 0, [_a], void 0, function* ({ zipFilePath, installDir, progress }) { + debug$3('unzipping from %s', zipFilePath); + debug$3('into', installDir); + if (!zipFilePath) { + throw new Error('Missing zip filename'); + } + const startTime = Date.now(); + let yauzlDoneTime = 0; + yield fs.ensureDir(installDir); + yield new Promise((resolve, reject) => { + // Open with lazyEntries so yauzl doesn't auto-emit entries (which would + // require the fd to stay open for the duration of the OS-tool extraction). + // We only need the entryCount here for the progress calculation. + return yauzl.open(zipFilePath, { lazyEntries: true }, (err, zipFile) => { + yauzlDoneTime = Date.now(); + if (err) { + debug$3('error using yauzl %s', err.message); + return reject(err); + } + const total = zipFile.entryCount; + debug$3('zipFile entries count', total); + // Close the count-only handle — the Node fallback re-opens the zip for extraction. + zipFile.close(); + const started = new Date(); + let percent = 0; + let count = 0; + const notify = (percent) => { + const elapsed = +new Date() - +started; + const eta = xvfb.util.calculateEta(percent, elapsed); + progress.onProgress(percent, xvfb.util.secsRemaining(eta)); + }; + const tick = () => { + count += 1; + percent = ((count / total) * 100); + const displayPercent = percent.toFixed(0); + return notify(Number(displayPercent)); + }; + const unzipWithNode = () => xvfb.__awaiter(void 0, void 0, void 0, function* () { + debug$3('unzipping with node.js (slow)'); + try { + yield unzipTools.extractWithYauzl(zipFilePath, installDir, tick); + debug$3('node unzip finished'); + return resolve(); + } + catch (err) { + const error = err || new Error('Unknown error with Node extract tool'); + debug$3('error %s', error.message); + return reject(error); + } + }); + const unzipFallback = _.once(unzipWithNode); + const unzipWithUnzipTool = () => { + debug$3('unzipping via `unzip`'); + const inflatingRe = /inflating:/; + const sp = cp.spawn('unzip', ['-o', zipFilePath, '-d', installDir]); + sp.on('error', (err) => { + debug$3('unzip tool error: %s', err.message); + unzipFallback(); + }); + sp.on('close', (code) => { + debug$3('unzip tool close with code %d', code); + if (code === 0) { + percent = 100; + notify(percent); + return resolve(); + } + debug$3('`unzip` failed %o', { code }); + return unzipFallback(); + }); + sp.stdout.on('data', (data) => { + if (inflatingRe.test(data)) { + return tick(); + } + }); + sp.stderr.on('data', (data) => { + debug$3('`unzip` stderr %s', data); + }); + }; + // we attempt to first unzip with the native osx + // ditto because its less likely to have problems + // with corruption, symlinks, or icons causing failures + // and can handle resource forks + // http://automatica.com.au/2011/02/unzip-mac-os-x-zip-in-terminal/ + const unzipWithOsx = () => { + debug$3('unzipping via `ditto`'); + const copyingFileRe = /^copying file/; + const sp = cp.spawn('ditto', ['-xkV', zipFilePath, installDir]); + // f-it just unzip with node + sp.on('error', (err) => { + debug$3(err.message); + unzipFallback(); + }); + sp.on('close', (code) => { + if (code === 0) { + // make sure we get to 100% on the progress bar + // because reading in lines is not really accurate + percent = 100; + notify(percent); + return resolve(); + } + debug$3('`ditto` failed %o', { code }); + return unzipFallback(); + }); + return readline.createInterface({ + input: sp.stderr, + }) + .on('line', (line) => { + if (copyingFileRe.test(line)) { + return tick(); + } + }); + }; + switch (os.platform()) { + case 'darwin': + return unzipWithOsx(); + case 'linux': + return unzipWithUnzipTool(); + case 'win32': + return unzipWithNode(); + default: + return; + } + }); + }); + debug$3('unzip completed %o', { + yauzlMs: yauzlDoneTime - startTime, + unzipMs: Date.now() - yauzlDoneTime, + }); +}); +function isMaybeWindowsMaxPathLengthError(err) { + return os.platform() === 'win32' && err.code === 'ENOENT' && err.syscall === 'realpath'; } - -var distExports = requireDist(); - -const debug$3 = Debug('cypress:cli:cypress-sessions'); -const PROBE_HOST = '127.0.0.1'; -const DEFAULT_PROBE_TIMEOUT_MS = 2000; -const isPidAlive = (pid) => { - try { - process.kill(pid, 0); - return true; - } - catch (err) { - return (err === null || err === void 0 ? void 0 : err.code) === 'EPERM'; - } -}; -// The server reports `cdpBrowserWsUrl` from in-memory state that it only clears -// when the browser *process* exits, so a closed browser window whose process -// lingers leaves the url stale. Hit the browser's own DevTools HTTP endpoint -// (Chromium exposes `/json/version` whenever the CDP port is open) to confirm -// the browser is really reachable before trusting the url. -const cdpEndpointReachable = (cdpBrowserWsUrl, timeoutMs) => xvfb.__awaiter(void 0, void 0, void 0, function* () { - let versionUrl; - try { - const { protocol, host } = new URL(cdpBrowserWsUrl); - versionUrl = `${protocol === 'wss:' ? 'https:' : 'http:'}//${host}/json/version`; - } - catch (err) { - debug$3('could not derive a CDP version url from %s: %o', cdpBrowserWsUrl, err); - return false; - } - try { - const response = yield fetch(versionUrl, { signal: AbortSignal.timeout(timeoutMs) }); - return response.ok; - } - catch (err) { - debug$3('CDP endpoint unreachable at %s: %o', versionUrl, err); - return false; +const start$1 = (_a) => xvfb.__awaiter(void 0, [_a], void 0, function* ({ zipFilePath, installDir, progress }) { + assert.ok(_.isString(installDir) && !_.isEmpty(installDir), 'missing installDir'); + if (!progress) { + progress = { onProgress: () => { + return {}; + } }; } -}); -const verifySessionRecord = (record_1, ...args_1) => xvfb.__awaiter(void 0, [record_1, ...args_1], void 0, function* (record, timeoutMs = DEFAULT_PROBE_TIMEOUT_MS) { - const url = `http://${PROBE_HOST}:${record.serverPort}${distExports.sessionProbePath(record.sessionId)}`; try { - const response = yield fetch(url, { signal: AbortSignal.timeout(timeoutMs) }); - if (response.status !== 200) { - return null; - } - const live = yield response.json(); - if (live.sessionId !== record.sessionId) { - return null; + const installDirExists = yield fs.pathExists(installDir); + if (installDirExists) { + debug$3('removing existing unzipped binary', installDir); + yield fs.remove(installDir); } - const cdpBrowserWsUrl = typeof live.cdpBrowserWsUrl === 'string' ? live.cdpBrowserWsUrl : null; - const attached = cdpBrowserWsUrl !== null && (yield cdpEndpointReachable(cdpBrowserWsUrl, timeoutMs)); - // The browser identity describes what the session has open, not what is - // reachable over CDP — a browser tap cannot drive still has to be nameable. - return Object.assign(Object.assign({}, record), { cdpBrowserWsUrl: attached ? cdpBrowserWsUrl : null, browserName: typeof live.browserName === 'string' ? live.browserName : null, browserFamily: typeof live.browserFamily === 'string' ? live.browserFamily : null, machineId: typeof live.machineId === 'string' ? live.machineId : null, userId: typeof live.userId === 'string' ? live.userId : null }); + yield unzip({ zipFilePath, installDir, progress }); } catch (err) { - debug$3('liveness probe failed for pid %d on port %d: %o', record.pid, record.serverPort, err); - return null; + const errorTemplate = isMaybeWindowsMaxPathLengthError(err) ? + xvfb.errors.failedUnzipWindowsMaxPathLength + : xvfb.errors.failedUnzip; + yield xvfb.throwFormErrorText(errorTemplate)(err); } }); - -const debug$2 = Debug('cypress:cli:cypress-sessions'); -const getSessionsDir = () => { - return distExports.cypressSessionsDir(xvfb.stateModule.getCacheDir()); +const unzipModule = { + start: start$1, + utils: { + unzip, + unzipTools, + }, }; -const listRecordFiles = (dir) => xvfb.__awaiter(void 0, void 0, void 0, function* () { - let entries; - try { - entries = yield fs.readdir(dir); - } - catch (err) { - if (err.code === 'ENOENT') { - return []; - } - throw err; + +const debug$2 = Debug('cypress:cli:install'); +function _getBinaryUrlFromBuildInfo(version, arch, { commitSha, commitBranch }) { + const platform = os.platform(); + if ((platform === 'win32') && (arch === 'arm64')) { + debug$2(`detected platform ${platform} architecture ${arch} combination`); + arch = 'x64'; + debug$2(`overriding to download ${platform}-${arch} pre-release binary instead`); } - const files = []; - for (const entry of entries) { - const pid = distExports.parseRecordPid(entry); - if (pid !== null) { - files.push({ path: path.join(dir, entry), pid }); - } + return `https://cdn.cypress.io/beta/binary/${version}/${platform}-${arch}/${commitBranch}-${commitSha}/cypress.zip`; +} +const alreadyInstalledMsg = () => { + if (!xvfb.util.isPostInstall()) { + xvfb.loggerModule.log(commonTags.stripIndent ` + Skipping installation: + + Pass the ${chalk.yellow('--force')} option if you'd like to reinstall anyway. + `); } - return files; +}; +const displayCompletionMsg = () => { + xvfb.loggerModule.log(); + xvfb.loggerModule.log('You can now open Cypress by running one of the following, depending on your package manager:'); + xvfb.loggerModule.log(); + xvfb.loggerModule.log(chalk.cyan('- npx cypress open')); + xvfb.loggerModule.log(chalk.cyan('- yarn cypress open')); + xvfb.loggerModule.log(chalk.cyan('- pnpm cypress open')); + xvfb.loggerModule.log(); + xvfb.loggerModule.log(chalk.grey('https://on.cypress.io/opening-the-app')); + xvfb.loggerModule.log(); +}; +const validateOS = () => xvfb.__awaiter(void 0, void 0, void 0, function* () { + const platformInfo = yield xvfb.util.getPlatformInfo(); + return platformInfo.match(/(win32-x64|win32-arm64|linux-x64|linux-arm64|darwin-x64|darwin-arm64)/); }); -const readCompatibleRecord = (filePath) => xvfb.__awaiter(void 0, void 0, void 0, function* () { - let record; - try { - record = yield fs.readJson(filePath); +/** + * Returns the version to install - either a string like `1.2.3` to be fetched + * from the download server or a file path or HTTP URL. + */ +function getVersionOverride(version, { arch, envVarVersion, buildInfo }) { + // let this environment variable reset the binary version we need + if (envVarVersion) { + return envVarVersion; } - catch (err) { - debug$2('could not read cypress sessions record %s: %o', filePath, err); - return null; + if (buildInfo && !buildInfo.stable) { + xvfb.loggerModule.log(chalk.yellow(commonTags.stripIndent ` + ${logSymbols.warning} Warning: You are installing a pre-release build of Cypress. + + Bugs may be present which do not exist in production builds. + + This build was created from: + * Commit SHA: ${buildInfo.commitSha} + * Commit Branch: ${buildInfo.commitBranch} + * Commit Timestamp: ${buildInfo.commitDate} + `)); + xvfb.loggerModule.log(); + return _getBinaryUrlFromBuildInfo(version, arch, buildInfo); } - if (!distExports.isCompatibleRecord(record)) { - debug$2('incompatible cypress sessions record %s', filePath); - return null; +} +function getEnvVarVersion() { + if (!xvfb.util.getEnv('CYPRESS_INSTALL_BINARY')) + return; + // because passed file paths are often double quoted + // and might have extra whitespace around, be robust and trim the string + const trimAndRemoveDoubleQuotes = true; + const envVarVersion = xvfb.util.getEnv('CYPRESS_INSTALL_BINARY', trimAndRemoveDoubleQuotes); + debug$2('using environment variable CYPRESS_INSTALL_BINARY "%s"', envVarVersion); + return envVarVersion; +} +const start = (...args_1) => xvfb.__awaiter(void 0, [...args_1], void 0, function* (options = {}) { + debug$2('installing with options %j', options); + const envVarVersion = getEnvVarVersion(); + if (envVarVersion === '0') { + debug$2('environment variable CYPRESS_INSTALL_BINARY = 0, skipping install'); + xvfb.loggerModule.log(commonTags.stripIndent ` + ${chalk.yellow('Note:')} Skipping binary installation: Environment variable CYPRESS_INSTALL_BINARY = 0.`); + xvfb.loggerModule.log(); + return; } - return record; -}); -// Reaps a record whose writer process is gone, returning whether it was dead. -// Removal is best-effort: a file we can't delete (permissions, a Windows lock) -// must not abort discovery of the other, live sessions, so the failure is -// swallowed and the record is still reported dead. -const reapIfDead = (file) => xvfb.__awaiter(void 0, void 0, void 0, function* () { - const { path, pid } = file; - if (isPidAlive(pid)) { - return false; + const pkgPath = xvfb.relativeToRepoRoot('package.json'); + if (!pkgPath) { + return xvfb.throwFormErrorText('Could not find package.json for Cypress package to determine build information')(); } - yield fs.remove(path).catch((err) => { - debug$2('failed to reap dead cypress sessions record %s: %o', path, err); + const { buildInfo, version } = JSON.parse(yield fsp.readFile(pkgPath, 'utf8')); + _.defaults(options, { + force: false, + buildInfo, }); - return true; -}); -/** - * Reads all the current cypress session records that are still live (i.e. the writer process is still running). - * Reaps any dead records. - */ -const readLiveSessions = () => xvfb.__awaiter(void 0, void 0, void 0, function* () { - const files = yield listRecordFiles(getSessionsDir()); - const records = yield Promise.all(files.map((file) => xvfb.__awaiter(void 0, void 0, void 0, function* () { - const record = yield readCompatibleRecord(file.path); - if (!record) { - return null; - } - if (yield reapIfDead(file)) { - return null; - } - return record; - }))); - return records.filter((record) => record !== null); -}); -const pruneDeadSessionRecords = () => xvfb.__awaiter(void 0, void 0, void 0, function* () { - const files = yield listRecordFiles(getSessionsDir()); - const pruned = yield Promise.all(files.map((file) => reapIfDead(file))); - const removed = pruned.filter(Boolean).length; - debug$2('pruned %d dead cypress sessions record(s)', removed); - return removed; -}); - -dayjs.extend(relativeTime); -// Subdirs under the cache root that are not binary version dirs. SESSIONS_DIRNAME -// is sourced from cypress-sessions so a rename there can't silently make prune -// treat the sessions dir as a stale binary cache and delete live records. -const EXTERNAL_CACHE_ENTRIES = new Set(['bundles', distExports.SESSIONS_DIRNAME]); -// output colors for the table -const colors = { - titles: chalk.white, - dates: chalk.cyan, - values: chalk.green, - size: chalk.gray, -}; -const logCachePath = () => { - xvfb.loggerModule.always(xvfb.stateModule.getCacheDir()); - return undefined; -}; -const clear = () => { - return fs.remove(xvfb.stateModule.getCacheDir()); -}; -const prune = () => xvfb.__awaiter(void 0, void 0, void 0, function* () { + if (xvfb.util.getEnv('CYPRESS_CACHE_FOLDER')) { + const envCache = xvfb.util.getEnv('CYPRESS_CACHE_FOLDER'); + xvfb.loggerModule.log(commonTags.stripIndent ` + ${chalk.yellow('Note:')} Overriding Cypress cache directory to: ${chalk.cyan(envCache)} + + Previous installs of Cypress may not be found. + `); + xvfb.loggerModule.log(); + } + const pkgVersion = xvfb.util.pkgVersion(); + const arch = yield xvfb.util.getRealArch(); + const versionOverride = getVersionOverride(version, { arch, envVarVersion, buildInfo: options.buildInfo }); + const versionToInstall = versionOverride || pkgVersion; + debug$2('version in package.json is %s, version to install is %s', pkgVersion, versionToInstall); + const installDir = xvfb.stateModule.getVersionDir(pkgVersion, options.buildInfo); const cacheDir = xvfb.stateModule.getCacheDir(); - const checkedInBinaryVersion = xvfb.util.pkgVersion(); - let deletedBinary = false; + const binaryDir = xvfb.stateModule.getBinaryDir(pkgVersion); + if (!(yield validateOS())) { + return xvfb.throwFormErrorText(xvfb.errors.invalidOS)(); + } try { - const versions = yield fs.readdir(cacheDir); - for (const version of versions) { - if (EXTERNAL_CACHE_ENTRIES.has(version)) - continue; - if (version !== checkedInBinaryVersion) { - deletedBinary = true; - const versionDir = path.join(cacheDir, version); - yield fs.remove(versionDir); - } - } - if (deletedBinary) { - xvfb.loggerModule.always(`Deleted all binary caches except for the ${checkedInBinaryVersion} binary cache.`); + yield fs.ensureDir(cacheDir); + } + catch (err) { + if (err instanceof Error && 'code' in err && err.code === 'EACCES') { + return xvfb.throwFormErrorText(xvfb.errors.invalidCacheDirectory)(commonTags.stripIndent ` + Failed to access ${chalk.cyan(cacheDir)}: + + ${err.message} + `); } else { - xvfb.loggerModule.always(`No binary caches found to prune.`); - } - yield pruneDeadSessionRecords(); - } - catch (e) { - if (e.code === 'ENOENT') { - xvfb.loggerModule.always(`No Cypress cache was found at ${cacheDir}. Nothing to prune.`); - return; + throw err; } - throw e; - } -}); -const fileSizeInMB = (size) => { - return `${(size / 1024 / 1024).toFixed(1)}MB`; -}; -/** - * Collects all cached versions, finds when each was used - * and prints a table with results to the terminal - */ -const list = (...args_1) => xvfb.__awaiter(void 0, [...args_1], void 0, function* (showSize = false) { - const binaries = yield getCachedVersions(showSize); - const head = [colors.titles('version'), colors.titles('last used')]; - if (showSize) { - head.push(colors.titles('size')); } - const table = new Table({ - head, - }); - binaries.forEach((binary) => { - const versionString = colors.values(binary.version); - const lastUsed = binary.accessed ? colors.dates(binary.accessed) : 'unknown'; - const row = [versionString, lastUsed]; - if (showSize) { - const size = colors.size(fileSizeInMB(binary.size)); - row.push(size); + const binaryPkg = yield xvfb.stateModule.getBinaryPkgAsync(binaryDir); + const binaryVersion = yield xvfb.stateModule.getBinaryPkgVersion(binaryPkg); + const shouldInstall = () => { + if (!binaryVersion) { + debug$2('no binary installed under cli version'); + return true; } - return table.push(row); - }); - xvfb.loggerModule.always(table.toString()); -}); -const getCachedVersions = (showSize) => xvfb.__awaiter(void 0, void 0, void 0, function* () { - const cacheDir = xvfb.stateModule.getCacheDir(); - const versions = yield fs.readdir(cacheDir); - const filteredVersions = versions.filter(xvfb.util.isSemver).map((version) => { - return { - version, - folderPath: path.join(cacheDir, version), - }; - }); - const binaries = []; - for (const binary of filteredVersions) { - const binaryDir = xvfb.stateModule.getBinaryDir(binary.version); - const executable = xvfb.stateModule.getPathToExecutable(binaryDir); - try { - const stat = yield fs.stat(executable); - const lastAccessedTime = _.get(stat, 'atime'); - if (lastAccessedTime) { - const accessed = dayjs(lastAccessedTime).fromNow(); - // @ts-expect-error - accessed is not defined in the type - binary.accessed = accessed; - } - // if no lastAccessedTime - // the test runner has never been opened - // or could be a test simulating missing timestamp + xvfb.loggerModule.log(); + xvfb.loggerModule.log(commonTags.stripIndent ` + Cypress ${chalk.green(binaryVersion)} is installed in ${chalk.cyan(installDir)} + `); + xvfb.loggerModule.log(); + if (options.force) { + debug$2('performing force install over existing binary'); + return true; } - catch (e) { - // could not find the binary or gets its stats - // no-op + if ((binaryVersion === versionToInstall) || !xvfb.util.isSemver(versionToInstall)) { + // our version matches, tell the user this is a noop + alreadyInstalledMsg(); + return false; } - if (showSize) { - const binaryDir = xvfb.stateModule.getBinaryDir(binary.version); - const size = yield getSize(binaryDir); - binaries.push(Object.assign(Object.assign({}, binary), { size })); + return true; + }; + // noop if we've been told not to download + if (!shouldInstall()) { + return debug$2('Not downloading or installing binary'); + } + if (envVarVersion) { + xvfb.loggerModule.log(chalk.yellow(commonTags.stripIndent ` + ${logSymbols.warning} Warning: Forcing a binary version different than the default. + + The CLI expected to install version: ${chalk.green(pkgVersion)} + + Instead we will install version: ${chalk.green(versionToInstall)} + + These versions may not work properly together. + `)); + xvfb.loggerModule.log(); + } + const getLocalFilePath = () => xvfb.__awaiter(void 0, void 0, void 0, function* () { + // see if version supplied is a path to a binary + if (yield fs.pathExists(versionToInstall)) { + return path.extname(versionToInstall) === '.zip' ? versionToInstall : false; } - else { - binaries.push(binary); + const possibleFile = xvfb.util.formAbsolutePath(versionToInstall); + debug$2('checking local file', possibleFile, 'cwd', process.cwd()); + // if this exists return the path to it + // else false + if ((yield fs.pathExists(possibleFile)) && path.extname(possibleFile) === '.zip') { + return possibleFile; } + return false; + }); + const pathToLocalFile = yield getLocalFilePath(); + const tasks = pathToLocalFile ? + installFromLocal(pathToLocalFile, installDir) : + installFromRemote(versionToInstall, installDir); + if (options.force) { + debug$2('Cypress already installed at', installDir); + debug$2('but the installation was forced'); } - return binaries; + // let the user know what version of cypress we're downloading! + xvfb.loggerModule.log(`Installing Cypress ${chalk.gray(`(version: ${versionToInstall})`)}`); + xvfb.loggerModule.log(); + const taskRunner = new listr2.Listr(tasks, Object.assign(Object.assign({ + // In CI we want timestamped, line-per-event output. Locally, + // the default in-place spinner is the better experience. + renderer: xvfb.util.isCi() ? 'verbose' : 'default' }, (xvfb.util.isCi() && { rendererOptions: { timestamp: listr2.PRESET_TIMESTAMP } })), { silentRendererCondition: () => xvfb.loggerModule.logLevel() === 'silent' })); + yield taskRunner.run(); + // delay 1 sec for UX, unless we are testing + yield timers.setTimeout(1000); + displayCompletionMsg(); }); -const cacheModule = { - path: logCachePath, - clear, - prune, - list, - getCachedVersions, +function downloadArchive(version, downloadDestination) { + const inProgressTitle = 'Downloading Cypress'; + const completedTitle = chalk.green('Downloaded Cypress'); + return { + title: xvfb.util.titleize(inProgressTitle), + task: (ctx, task) => xvfb.__awaiter(this, void 0, void 0, function* () { + yield downloadModule.start({ + version, + downloadDestination, + progress: { + throttle: 100, + onProgress: (percentComplete, remaining) => { + task.title = progressTitle(inProgressTitle, percentComplete, remaining); + }, + }, + }); + debug$2(`finished downloading file: ${downloadDestination}`); + task.title = xvfb.util.titleize(completedTitle); + }), + }; +} +function installFromLocal(pathToLocalFile, installDir) { + const zipFilePath = path.resolve(pathToLocalFile); + debug$2('found local file at', zipFilePath); + debug$2('skipping download'); + return [ + unzipArchive(zipFilePath, installDir), + ]; +} +function installFromRemote(version, installDir) { + const downloadDestination = path.join(os.tmpdir(), `cypress-${process.pid}.zip`); + debug$2('preparing to download and unzip version ', version, 'to path', installDir); + return [ + downloadArchive(version, downloadDestination), + unzipArchive(downloadDestination, installDir), + cleanup(downloadDestination, installDir), + ]; +} +function unzipArchive(zipFilePath, installDir) { + const inProgressTitle = 'Unzipping Cypress'; + const completedTitle = chalk.green('Unzipped Cypress'); + return { + title: xvfb.util.titleize(inProgressTitle), + task: (ctx, task) => xvfb.__awaiter(this, void 0, void 0, function* () { + yield unzipModule.start({ + zipFilePath, + installDir, + progress: { + onProgress: (percentComplete, remaining) => { + task.title = progressTitle(inProgressTitle, percentComplete, remaining); + }, + }, + }); + task.title = xvfb.util.titleize(completedTitle); + }), + }; +} +function cleanup(archiveLocation, installDir) { + return { + title: xvfb.util.titleize('Finishing Installation'), + task: (ctx, task) => xvfb.__awaiter(this, void 0, void 0, function* () { + debug$2('removing zip file %s', archiveLocation); + yield fs.remove(archiveLocation); + debug$2('finished installation in', installDir); + task.title = xvfb.util.titleize(chalk.green('Finished Installation'), chalk.gray(installDir)); + }), + }; +} +function progressTitle(title, percentComplete, remaining) { + return xvfb.util.titleize(title, chalk.white(` ${percentComplete}%`), chalk.gray(`${remaining}s`)); +} +var installModule = { + start, + _getBinaryUrlFromBuildInfo, }; const debug$1 = Debug('cypress:cli'); @@ -2546,58 +2557,14 @@ const g = chalk.green; // color for paths const p = chalk.cyan; const red = chalk.red; -// urls -const link = chalk.blue.underline; // to be exported const methods = {}; -methods.findProxyEnvironmentVariables = () => { - return _.pick(process.env, ['HTTP_PROXY', 'HTTPS_PROXY', 'NO_PROXY']); -}; -const maskSensitiveVariables = (obj) => { - const masked = Object.assign({}, obj); - if (masked.CYPRESS_RECORD_KEY) { - masked.CYPRESS_RECORD_KEY = ''; - } - return masked; -}; -methods.findCypressEnvironmentVariables = () => { - const isCyVariable = (val, key) => key.startsWith('CYPRESS_'); - return _.pickBy(process.env, isCyVariable); -}; -const formatCypressVariables = () => { - const vars = methods.findCypressEnvironmentVariables(); - return maskSensitiveVariables(vars); -}; methods.start = (...args_1) => xvfb.__awaiter(void 0, [...args_1], void 0, function* (options = {}) { const args = ['--mode=info']; yield spawn.start$1(args, { dev: options.dev, }); console.log(); - const proxyVars = methods.findProxyEnvironmentVariables(); - if (_.isEmpty(proxyVars)) { - console.log('Proxy Settings: none detected'); - } - else { - console.log('Proxy Settings:'); - _.forEach(proxyVars, (value, key) => { - console.log('%s: %s', key, g(value)); - }); - console.log(); - console.log('Learn More: %s', link('https://on.cypress.io/proxy-configuration')); - console.log(); - } - const cyVars = formatCypressVariables(); - if (_.isEmpty(cyVars)) { - console.log('Environment Variables: none detected'); - } - else { - console.log('Environment Variables:'); - _.forEach(cyVars, (value, key) => { - console.log('%s: %s', key, g(value)); - }); - } - console.log(); console.log('Application Data:', p(xvfb.util.getApplicationDataFolder())); console.log('Browser Profiles:', p(xvfb.util.getApplicationDataFolder('browsers'))); console.log('Binary Caches: %s', p(xvfb.stateModule.getCacheDir())); @@ -3121,7 +3088,7 @@ const cliModule = { .action(function (opts, args) { return xvfb.__awaiter(this, void 0, void 0, function* () { try { - const { default: tapModule } = yield Promise.resolve().then(function () { return require('./tap-BkTD6Abc.js'); }); + const { default: tapModule } = yield Promise.resolve().then(function () { return require('./tap-tSM1ve9x.js'); }); const code = yield tapModule.start(args || [], _.pick(opts, ['session', 'json', 'timeout'])); process.exit(code); } diff --git a/node_modules/cypress/dist/cli.js b/node_modules/cypress/dist/cli.js index 0c0b7814..f6b6819d 100644 --- a/node_modules/cypress/dist/cli.js +++ b/node_modules/cypress/dist/cli.js @@ -8,8 +8,8 @@ require('commander'); require('common-tags'); require('log-symbols'); require('debug'); -var cli = require('./cli-_xePNEPj.js'); -require('./spawn-BkpC5qQ4.js'); +var cli = require('./cli-Dl3GL9Ov.js'); +require('./spawn-DpvsyDKg.js'); require('os'); require('bluebird'); require('@cypress/xvfb'); diff --git a/node_modules/cypress/dist/cypress-DCSAOi2D.js b/node_modules/cypress/dist/cypress-BfVf5_hP.js similarity index 98% rename from node_modules/cypress/dist/cypress-DCSAOi2D.js rename to node_modules/cypress/dist/cypress-BfVf5_hP.js index 2e4c3b01..a3b9ab2b 100644 --- a/node_modules/cypress/dist/cypress-DCSAOi2D.js +++ b/node_modules/cypress/dist/cypress-BfVf5_hP.js @@ -3,7 +3,7 @@ var xvfb = require('./xvfb-BKRGwxlS.js'); var tmp = require('tmp'); var fs = require('fs-extra'); -var cli$1 = require('./cli-_xePNEPj.js'); +var cli$1 = require('./cli-Dl3GL9Ov.js'); /** * Opens Cypress GUI diff --git a/node_modules/cypress/dist/cypress.js b/node_modules/cypress/dist/cypress.js index 3f1b71f9..da43e29c 100644 --- a/node_modules/cypress/dist/cypress.js +++ b/node_modules/cypress/dist/cypress.js @@ -3,8 +3,8 @@ require('./xvfb-BKRGwxlS.js'); require('tmp'); require('fs-extra'); -require('./cli-_xePNEPj.js'); -var cypress = require('./cypress-DCSAOi2D.js'); +require('./cli-Dl3GL9Ov.js'); +var cypress = require('./cypress-BfVf5_hP.js'); require('os'); require('bluebird'); require('@cypress/xvfb'); @@ -33,7 +33,7 @@ require('commander'); require('cli-table3'); require('dayjs'); require('dayjs/plugin/relativeTime'); -require('./spawn-BkpC5qQ4.js'); +require('./spawn-DpvsyDKg.js'); require('child_process'); require('listr2'); require('readline'); diff --git a/node_modules/cypress/dist/exec/spawn.js b/node_modules/cypress/dist/exec/spawn.js index ce66b85f..6b7e5c5e 100644 --- a/node_modules/cypress/dist/exec/spawn.js +++ b/node_modules/cypress/dist/exec/spawn.js @@ -6,7 +6,7 @@ require('os'); require('child_process'); require('path'); require('debug'); -var spawn = require('../spawn-BkpC5qQ4.js'); +var spawn = require('../spawn-DpvsyDKg.js'); require('readline'); require('process'); require('stream'); diff --git a/node_modules/cypress/dist/index.js b/node_modules/cypress/dist/index.js index 00ac0012..991b7e43 100644 --- a/node_modules/cypress/dist/index.js +++ b/node_modules/cypress/dist/index.js @@ -5,9 +5,9 @@ Object.defineProperty(exports, '__esModule', { value: true }); var xvfb = require('./xvfb-BKRGwxlS.js'); var minimist = require('minimist'); var Debug = require('debug'); -var cli$1 = require('./cli-_xePNEPj.js'); -var spawn = require('./spawn-BkpC5qQ4.js'); -var cypress = require('./cypress-DCSAOi2D.js'); +var cli$1 = require('./cli-Dl3GL9Ov.js'); +var spawn = require('./spawn-DpvsyDKg.js'); +var cypress = require('./cypress-BfVf5_hP.js'); require('os'); require('bluebird'); require('@cypress/xvfb'); diff --git a/node_modules/cypress/dist/spawn-BkpC5qQ4.js b/node_modules/cypress/dist/spawn-DpvsyDKg.js similarity index 97% rename from node_modules/cypress/dist/spawn-BkpC5qQ4.js rename to node_modules/cypress/dist/spawn-DpvsyDKg.js index 0705bfb5..3e70eda9 100644 --- a/node_modules/cypress/dist/spawn-BkpC5qQ4.js +++ b/node_modules/cypress/dist/spawn-DpvsyDKg.js @@ -1027,25 +1027,25 @@ var hasRequiredDist; function requireDist () { if (hasRequiredDist) return dist; hasRequiredDist = 1; - (function (exports$1) { - Object.defineProperty(exports$1, "__esModule", { value: true }); - exports$1.DEBUG_PREFIX = exports$1.END_TAG = exports$1.START_TAG = exports$1.logError = exports$1.filter = exports$1.WriteToDebug = exports$1.TagStream = exports$1.FilterPrefixedContent = exports$1.FilterTaggedContent = void 0; + (function (exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.DEBUG_PREFIX = exports.END_TAG = exports.START_TAG = exports.logError = exports.filter = exports.WriteToDebug = exports.TagStream = exports.FilterPrefixedContent = exports.FilterTaggedContent = void 0; var FilterTaggedContent_1 = requireFilterTaggedContent(); - Object.defineProperty(exports$1, "FilterTaggedContent", { enumerable: true, get: function () { return FilterTaggedContent_1.FilterTaggedContent; } }); + Object.defineProperty(exports, "FilterTaggedContent", { enumerable: true, get: function () { return FilterTaggedContent_1.FilterTaggedContent; } }); var FilterPrefixedContent_1 = requireFilterPrefixedContent(); - Object.defineProperty(exports$1, "FilterPrefixedContent", { enumerable: true, get: function () { return FilterPrefixedContent_1.FilterPrefixedContent; } }); + Object.defineProperty(exports, "FilterPrefixedContent", { enumerable: true, get: function () { return FilterPrefixedContent_1.FilterPrefixedContent; } }); var TagStream_1 = requireTagStream(); - Object.defineProperty(exports$1, "TagStream", { enumerable: true, get: function () { return TagStream_1.TagStream; } }); + Object.defineProperty(exports, "TagStream", { enumerable: true, get: function () { return TagStream_1.TagStream; } }); var WriteToDebug_1 = requireWriteToDebug(); - Object.defineProperty(exports$1, "WriteToDebug", { enumerable: true, get: function () { return WriteToDebug_1.WriteToDebug; } }); + Object.defineProperty(exports, "WriteToDebug", { enumerable: true, get: function () { return WriteToDebug_1.WriteToDebug; } }); var Filter_1 = requireFilter(); - Object.defineProperty(exports$1, "filter", { enumerable: true, get: function () { return Filter_1.filter; } }); + Object.defineProperty(exports, "filter", { enumerable: true, get: function () { return Filter_1.filter; } }); var logError_1 = requireLogError(); - Object.defineProperty(exports$1, "logError", { enumerable: true, get: function () { return logError_1.logError; } }); + Object.defineProperty(exports, "logError", { enumerable: true, get: function () { return logError_1.logError; } }); var constants_1 = requireConstants(); - Object.defineProperty(exports$1, "START_TAG", { enumerable: true, get: function () { return constants_1.START_TAG; } }); - Object.defineProperty(exports$1, "END_TAG", { enumerable: true, get: function () { return constants_1.END_TAG; } }); - Object.defineProperty(exports$1, "DEBUG_PREFIX", { enumerable: true, get: function () { return constants_1.DEBUG_PREFIX; } }); + Object.defineProperty(exports, "START_TAG", { enumerable: true, get: function () { return constants_1.START_TAG; } }); + Object.defineProperty(exports, "END_TAG", { enumerable: true, get: function () { return constants_1.END_TAG; } }); + Object.defineProperty(exports, "DEBUG_PREFIX", { enumerable: true, get: function () { return constants_1.DEBUG_PREFIX; } }); } (dist)); return dist; diff --git a/node_modules/cypress/dist/tap-BkTD6Abc.js b/node_modules/cypress/dist/tap-tSM1ve9x.js similarity index 98% rename from node_modules/cypress/dist/tap-BkTD6Abc.js rename to node_modules/cypress/dist/tap-tSM1ve9x.js index dc058fe0..e1e5ad9c 100644 --- a/node_modules/cypress/dist/tap-BkTD6Abc.js +++ b/node_modules/cypress/dist/tap-tSM1ve9x.js @@ -4,7 +4,7 @@ var xvfb = require('./xvfb-BKRGwxlS.js'); var Debug = require('debug'); var commander = require('commander'); var path = require('path'); -var cli = require('./cli-_xePNEPj.js'); +var cli = require('./cli-Dl3GL9Ov.js'); var CRI = require('chrome-remote-interface'); var chalk = require('chalk'); var crypto = require('crypto'); @@ -33,7 +33,7 @@ require('untildify'); require('cli-table3'); require('dayjs'); require('dayjs/plugin/relativeTime'); -require('./spawn-BkpC5qQ4.js'); +require('./spawn-DpvsyDKg.js'); require('child_process'); require('listr2'); require('readline'); @@ -1559,9 +1559,9 @@ var hasRequiredDist; function requireDist () { if (hasRequiredDist) return dist; hasRequiredDist = 1; - (function (exports$1) { - Object.defineProperty(exports$1, "__esModule", { value: true }); - exports$1.isAgent = exports$1.detectAgent = void 0; + (function (exports) { + Object.defineProperty(exports, "__esModule", { value: true }); + exports.isAgent = exports.detectAgent = void 0; const envMatcher = (key, regex, opts = {}) => { return (env) => { var _a, _b; @@ -1612,11 +1612,11 @@ function requireDist () { } return env.AI_AGENT ? fromAiAgent(env.AI_AGENT) : undefined; }; - exports$1.detectAgent = detectAgent; + exports.detectAgent = detectAgent; const isAgent = (env = process.env) => { - return !!(0, exports$1.detectAgent)(env); + return !!(0, exports.detectAgent)(env); }; - exports$1.isAgent = isAgent; + exports.isAgent = isAgent; } (dist)); return dist; @@ -1954,7 +1954,6 @@ const statusCommand = defineNativeCommand('status', reportStatus); const debug$2 = Debug('cypress:cli:tap'); const GRAPHQL_HOST = '127.0.0.1'; -const GRAPHQL_PATH = '/__cypress/graphql'; const DEFAULT_QUERY_TIMEOUT_MS = 4000; const firstErrorMessage = (envelopeErrors) => { const first = Array.isArray(envelopeErrors) ? envelopeErrors[0] : undefined; @@ -1976,28 +1975,51 @@ const validateEnvelope = (operationName, envelope) => { } return envelope.data; }; +// Whether the session served this path at all. The force-proxy guard redirects an +// unrecognized path to the runner page while the MITM proxy is on, and Express 404s +// it when CDP owns browser traffic instead; graphql itself answers 400 or 500, so +// neither of these comes from the query. +const isUnservedPath = (response) => { + return response.redirected || response.status === 404; +}; +// A session serving neither path is the reason for the failure, so the fault lies with +// it rather than the request. Its liveness probe tells the two apart: the route is +// unnamespaced and present in every build that has tap, so an answer means a live +// session that simply predates the tap route, and silence means it is gone. +const throwForUnservedPaths = (session, operationName) => xvfb.__awaiter(void 0, void 0, void 0, function* () { + const live = yield cli.verifySessionRecord(session); + if (live === null) { + return throwTapError('STALE_SESSION', `The session stopped answering while running ${operationName}.`); + } + return throwTapError('SESSION_OUTDATED', `The session does not serve ${operationName} over tap GraphQL.`); +}); const querySessionGraphql = (session_1, operation_1, ...args_1) => xvfb.__awaiter(void 0, [session_1, operation_1, ...args_1], void 0, function* (session, operation, timeoutMs = DEFAULT_QUERY_TIMEOUT_MS) { const { operationName, query, variables } = operation; - const url = `http://${GRAPHQL_HOST}:${session.serverPort}${GRAPHQL_PATH}/${operationName}`; - let response; - try { - response = yield fetch(url, { + const post = (path) => { + return fetch(`http://${GRAPHQL_HOST}:${session.serverPort}${path}`, { method: 'POST', headers: { 'content-type': 'application/json', [cli.distExports.SESSION_ID_HEADER]: session.sessionId }, body: JSON.stringify({ operationName, query, variables: variables !== null && variables !== void 0 ? variables : {} }), signal: AbortSignal.timeout(timeoutMs), }); + }; + let response; + try { + response = yield post(cli.distExports.tapGraphqlPath(operationName)); + // Sessions that predate the fixed tap route only serve GraphQL under the project's + // `namespace`, so retry the default one — every such session that did not override + // it answers there. + if (isUnservedPath(response)) { + debug$2('graphql request %s to pid %d went unserved; retrying the legacy path', operationName, session.pid); + response = yield post(`${cli.distExports.LEGACY_TAP_GRAPHQL_PATH}/${operationName}`); + } } catch (err) { debug$2('graphql request %s to pid %d failed: %o', operationName, session.pid, err); return throwTapError('GRAPHQL_UNREACHABLE', `Could not reach the session to run ${operationName}: ${err.message}`, err); } - // A valid request passes the server's force-proxy guard untouched; a redirect - // means the guard sent us to the runner page because the session doesn't allow - // direct tap GraphQL — an older Cypress that predates it (or one that rejected - // our session-id). Report that instead of the runner HTML as a data error. - if (response.redirected) { - return throwTapError('SESSION_OUTDATED', `The session redirected the ${operationName} request instead of answering it, so it does not support direct tap GraphQL.`); + if (isUnservedPath(response)) { + return yield throwForUnservedPaths(session, operationName); } if (response.status !== 200) { // express-graphql answers parse/validation failures with 400 + { errors: [...] }; diff --git a/node_modules/cypress/mount-utils/dist/index.js b/node_modules/cypress/mount-utils/dist/index.js index 180ce7ae..e043994d 100644 --- a/node_modules/cypress/mount-utils/dist/index.js +++ b/node_modules/cypress/mount-utils/dist/index.js @@ -36,6 +36,6 @@ export function setupHooks(optionalCallback) { }); // @ts-ignore Cypress.on('test:before:after:run:async', () => { - optionalCallback === null || optionalCallback === void 0 ? void 0 : optionalCallback(); + optionalCallback?.(); }); } diff --git a/node_modules/cypress/mount-utils/mount-utils/dist/index.js b/node_modules/cypress/mount-utils/mount-utils/dist/index.js index 180ce7ae..e043994d 100644 --- a/node_modules/cypress/mount-utils/mount-utils/dist/index.js +++ b/node_modules/cypress/mount-utils/mount-utils/dist/index.js @@ -36,6 +36,6 @@ export function setupHooks(optionalCallback) { }); // @ts-ignore Cypress.on('test:before:after:run:async', () => { - optionalCallback === null || optionalCallback === void 0 ? void 0 : optionalCallback(); + optionalCallback?.(); }); } diff --git a/node_modules/cypress/mount-utils/mount-utils/package.json b/node_modules/cypress/mount-utils/mount-utils/package.json index 6dbcb08b..727ba9b6 100644 --- a/node_modules/cypress/mount-utils/mount-utils/package.json +++ b/node_modules/cypress/mount-utils/mount-utils/package.json @@ -13,13 +13,13 @@ "dependencies": {}, "devDependencies": { "@packages/eslint-config": "0.0.0-development", - "@rollup/plugin-commonjs": "^17.1.0", - "@rollup/plugin-node-resolve": "^11.2.1", + "@rollup/plugin-commonjs": "^29.0.2", + "@rollup/plugin-node-resolve": "^16.0.3", "eslint": "^9.31.0", "lodash": "^4.17.21", - "rollup": "3.29.5", - "rollup-plugin-dts": "5.0.0", - "rollup-plugin-typescript2": "^0.29.0", + "rollup": "4.60.2", + "rollup-plugin-dts": "6.4.1", + "rollup-plugin-typescript2": "^0.37.0", "typescript": "~5.4.5" }, "files": [ diff --git a/node_modules/cypress/mount-utils/package.json b/node_modules/cypress/mount-utils/package.json index 6dbcb08b..727ba9b6 100644 --- a/node_modules/cypress/mount-utils/package.json +++ b/node_modules/cypress/mount-utils/package.json @@ -13,13 +13,13 @@ "dependencies": {}, "devDependencies": { "@packages/eslint-config": "0.0.0-development", - "@rollup/plugin-commonjs": "^17.1.0", - "@rollup/plugin-node-resolve": "^11.2.1", + "@rollup/plugin-commonjs": "^29.0.2", + "@rollup/plugin-node-resolve": "^16.0.3", "eslint": "^9.31.0", "lodash": "^4.17.21", - "rollup": "3.29.5", - "rollup-plugin-dts": "5.0.0", - "rollup-plugin-typescript2": "^0.29.0", + "rollup": "4.60.2", + "rollup-plugin-dts": "6.4.1", + "rollup-plugin-typescript2": "^0.37.0", "typescript": "~5.4.5" }, "files": [ diff --git a/node_modules/cypress/package.json b/node_modules/cypress/package.json index 1ebc56cc..a394de78 100644 --- a/node_modules/cypress/package.json +++ b/node_modules/cypress/package.json @@ -1,6 +1,6 @@ { "name": "cypress", - "version": "15.21.0", + "version": "16.0.0", "main": "dist/index.js", "scripts": { "postinstall": "node dist/index.js --exec install", @@ -23,7 +23,7 @@ "cli-table3": "0.6.1", "commander": "^6.2.1", "common-tags": "^1.8.0", - "dayjs": "^1.10.4", + "dayjs": "^1.11.23", "debug": "^4.3.4", "eventemitter2": "6.4.7", "execa": "4.1.0", @@ -55,14 +55,13 @@ "vue", "react", "angular", - "angular-zoneless", "svelte" ], "bin": { "cypress": "bin/cypress" }, "engines": { - "node": "^20.1.0 || ^22.0.0 || >=24.0.0" + "node": "^22.0.0 || ^24.0.0 || >=26.0.0" }, "types": "types", "exports": { @@ -97,11 +96,6 @@ "import": "./angular/dist/index.js", "require": "./angular/dist/index.js" }, - "./angular-zoneless": { - "types": "./angular-zoneless/dist/index.d.ts", - "import": "./angular-zoneless/dist/index.js", - "require": "./angular-zoneless/dist/index.js" - }, "./svelte": { "types": "./svelte/dist/index.d.ts", "import": "./svelte/dist/cypress-svelte.esm-bundler.js", @@ -138,8 +132,8 @@ }, "buildInfo": { "commitBranch": "develop", - "commitSha": "f7281bae34c0895a29e67d1c6d87b8fe7d0f4e27", - "commitDate": "2026-08-18T16:13:49.000Z", + "commitSha": "9467a6e7f4645fe7a99a35fbc642d5e10d849cce", + "commitDate": "2026-08-31T19:15:10.000Z", "stable": true }, "description": "Cypress is a next generation front end testing tool built for the modern web", diff --git a/node_modules/cypress/react/dist/cypress-react.cjs.js b/node_modules/cypress/react/dist/cypress-react.cjs.js index c87695fa..0373b9fc 100644 --- a/node_modules/cypress/react/dist/cypress-react.cjs.js +++ b/node_modules/cypress/react/dist/cypress-react.cjs.js @@ -104,7 +104,7 @@ function setupHooks(optionalCallback) { }); // @ts-ignore Cypress.on('test:before:after:run:async', () => { - optionalCallback === null || optionalCallback === void 0 ? void 0 : optionalCallback(); + optionalCallback?.(); }); } diff --git a/node_modules/cypress/react/dist/cypress-react.esm-bundler.js b/node_modules/cypress/react/dist/cypress-react.esm-bundler.js index f84f9cff..1b7aac15 100644 --- a/node_modules/cypress/react/dist/cypress-react.esm-bundler.js +++ b/node_modules/cypress/react/dist/cypress-react.esm-bundler.js @@ -83,7 +83,7 @@ function setupHooks(optionalCallback) { }); // @ts-ignore Cypress.on('test:before:after:run:async', () => { - optionalCallback === null || optionalCallback === void 0 ? void 0 : optionalCallback(); + optionalCallback?.(); }); } diff --git a/node_modules/cypress/react/dist/index.d.ts b/node_modules/cypress/react/dist/index.d.ts index a1639ebe..0c25b5a4 100644 --- a/node_modules/cypress/react/dist/index.d.ts +++ b/node_modules/cypress/react/dist/index.d.ts @@ -91,4 +91,5 @@ declare const getContainerEl: () => HTMLElement; */ declare function mount(jsx: React__default.ReactNode, options?: MountOptions, rerenderKey?: string): Cypress.Chainable; -export { InternalMountOptions, MountOptions, MountReactComponentOptions, MountReturn, UnmountArgs, createMount, getContainerEl, makeMountFn, makeUnmountFn, mount }; +export { createMount, getContainerEl, makeMountFn, makeUnmountFn, mount }; +export type { InternalMountOptions, MountOptions, MountReactComponentOptions, MountReturn, UnmountArgs }; diff --git a/node_modules/cypress/react/package.json b/node_modules/cypress/react/package.json index 16c9c02f..1f234150 100644 --- a/node_modules/cypress/react/package.json +++ b/node_modules/cypress/react/package.json @@ -29,9 +29,9 @@ "react-dom": "18.3.1", "react-router": "6.28.0", "react-router-dom": "6.28.0", - "rollup": "3.29.5", + "rollup": "^4.60.2", "typescript": "~5.4.5", - "vite": "6.3.5" + "vite": "^8.0.9" }, "peerDependencies": { "@types/react": "^18 || ^19", diff --git a/node_modules/cypress/react/react/dist/cypress-react.cjs.js b/node_modules/cypress/react/react/dist/cypress-react.cjs.js index c87695fa..0373b9fc 100644 --- a/node_modules/cypress/react/react/dist/cypress-react.cjs.js +++ b/node_modules/cypress/react/react/dist/cypress-react.cjs.js @@ -104,7 +104,7 @@ function setupHooks(optionalCallback) { }); // @ts-ignore Cypress.on('test:before:after:run:async', () => { - optionalCallback === null || optionalCallback === void 0 ? void 0 : optionalCallback(); + optionalCallback?.(); }); } diff --git a/node_modules/cypress/react/react/dist/cypress-react.esm-bundler.js b/node_modules/cypress/react/react/dist/cypress-react.esm-bundler.js index f84f9cff..1b7aac15 100644 --- a/node_modules/cypress/react/react/dist/cypress-react.esm-bundler.js +++ b/node_modules/cypress/react/react/dist/cypress-react.esm-bundler.js @@ -83,7 +83,7 @@ function setupHooks(optionalCallback) { }); // @ts-ignore Cypress.on('test:before:after:run:async', () => { - optionalCallback === null || optionalCallback === void 0 ? void 0 : optionalCallback(); + optionalCallback?.(); }); } diff --git a/node_modules/cypress/react/react/dist/index.d.ts b/node_modules/cypress/react/react/dist/index.d.ts index a1639ebe..0c25b5a4 100644 --- a/node_modules/cypress/react/react/dist/index.d.ts +++ b/node_modules/cypress/react/react/dist/index.d.ts @@ -91,4 +91,5 @@ declare const getContainerEl: () => HTMLElement; */ declare function mount(jsx: React__default.ReactNode, options?: MountOptions, rerenderKey?: string): Cypress.Chainable; -export { InternalMountOptions, MountOptions, MountReactComponentOptions, MountReturn, UnmountArgs, createMount, getContainerEl, makeMountFn, makeUnmountFn, mount }; +export { createMount, getContainerEl, makeMountFn, makeUnmountFn, mount }; +export type { InternalMountOptions, MountOptions, MountReactComponentOptions, MountReturn, UnmountArgs }; diff --git a/node_modules/cypress/react/react/package.json b/node_modules/cypress/react/react/package.json index 16c9c02f..1f234150 100644 --- a/node_modules/cypress/react/react/package.json +++ b/node_modules/cypress/react/react/package.json @@ -29,9 +29,9 @@ "react-dom": "18.3.1", "react-router": "6.28.0", "react-router-dom": "6.28.0", - "rollup": "3.29.5", + "rollup": "^4.60.2", "typescript": "~5.4.5", - "vite": "6.3.5" + "vite": "^8.0.9" }, "peerDependencies": { "@types/react": "^18 || ^19", diff --git a/node_modules/cypress/svelte/dist/cypress-svelte.cjs.js b/node_modules/cypress/svelte/dist/cypress-svelte.cjs.js index d784fc5c..394a7b88 100644 --- a/node_modules/cypress/svelte/dist/cypress-svelte.cjs.js +++ b/node_modules/cypress/svelte/dist/cypress-svelte.cjs.js @@ -47,7 +47,7 @@ function setupHooks(optionalCallback) { }); // @ts-ignore Cypress.on('test:before:after:run:async', () => { - optionalCallback === null || optionalCallback === void 0 ? void 0 : optionalCallback(); + optionalCallback?.(); }); } diff --git a/node_modules/cypress/svelte/dist/cypress-svelte.esm-bundler.js b/node_modules/cypress/svelte/dist/cypress-svelte.esm-bundler.js index 913ea6d4..ab679e1c 100644 --- a/node_modules/cypress/svelte/dist/cypress-svelte.esm-bundler.js +++ b/node_modules/cypress/svelte/dist/cypress-svelte.esm-bundler.js @@ -45,7 +45,7 @@ function setupHooks(optionalCallback) { }); // @ts-ignore Cypress.on('test:before:after:run:async', () => { - optionalCallback === null || optionalCallback === void 0 ? void 0 : optionalCallback(); + optionalCallback?.(); }); } diff --git a/node_modules/cypress/svelte/dist/index.d.ts b/node_modules/cypress/svelte/dist/index.d.ts index 5c8dd61f..1e783c3f 100644 --- a/node_modules/cypress/svelte/dist/index.d.ts +++ b/node_modules/cypress/svelte/dist/index.d.ts @@ -27,4 +27,5 @@ declare function mount(Component: Component, Record; -export { MountReturn, mount }; +export { mount }; +export type { MountReturn }; diff --git a/node_modules/cypress/svelte/package.json b/node_modules/cypress/svelte/package.json index f195baa7..29abc2e1 100644 --- a/node_modules/cypress/svelte/package.json +++ b/node_modules/cypress/svelte/package.json @@ -15,7 +15,7 @@ "@cypress/mount-utils": "0.0.0-development", "eslint": "^9.31.0", "jiti": "^2.4.2", - "rollup": "3.29.5", + "rollup": "^4.60.2", "svelte": "^5.4.0", "typescript": "~5.4.5" }, diff --git a/node_modules/cypress/svelte/svelte/dist/cypress-svelte.cjs.js b/node_modules/cypress/svelte/svelte/dist/cypress-svelte.cjs.js index d784fc5c..394a7b88 100644 --- a/node_modules/cypress/svelte/svelte/dist/cypress-svelte.cjs.js +++ b/node_modules/cypress/svelte/svelte/dist/cypress-svelte.cjs.js @@ -47,7 +47,7 @@ function setupHooks(optionalCallback) { }); // @ts-ignore Cypress.on('test:before:after:run:async', () => { - optionalCallback === null || optionalCallback === void 0 ? void 0 : optionalCallback(); + optionalCallback?.(); }); } diff --git a/node_modules/cypress/svelte/svelte/dist/cypress-svelte.esm-bundler.js b/node_modules/cypress/svelte/svelte/dist/cypress-svelte.esm-bundler.js index 913ea6d4..ab679e1c 100644 --- a/node_modules/cypress/svelte/svelte/dist/cypress-svelte.esm-bundler.js +++ b/node_modules/cypress/svelte/svelte/dist/cypress-svelte.esm-bundler.js @@ -45,7 +45,7 @@ function setupHooks(optionalCallback) { }); // @ts-ignore Cypress.on('test:before:after:run:async', () => { - optionalCallback === null || optionalCallback === void 0 ? void 0 : optionalCallback(); + optionalCallback?.(); }); } diff --git a/node_modules/cypress/svelte/svelte/dist/index.d.ts b/node_modules/cypress/svelte/svelte/dist/index.d.ts index 5c8dd61f..1e783c3f 100644 --- a/node_modules/cypress/svelte/svelte/dist/index.d.ts +++ b/node_modules/cypress/svelte/svelte/dist/index.d.ts @@ -27,4 +27,5 @@ declare function mount(Component: Component, Record; -export { MountReturn, mount }; +export { mount }; +export type { MountReturn }; diff --git a/node_modules/cypress/svelte/svelte/package.json b/node_modules/cypress/svelte/svelte/package.json index f195baa7..29abc2e1 100644 --- a/node_modules/cypress/svelte/svelte/package.json +++ b/node_modules/cypress/svelte/svelte/package.json @@ -15,7 +15,7 @@ "@cypress/mount-utils": "0.0.0-development", "eslint": "^9.31.0", "jiti": "^2.4.2", - "rollup": "3.29.5", + "rollup": "^4.60.2", "svelte": "^5.4.0", "typescript": "~5.4.5" }, diff --git a/node_modules/cypress/types/cy-blob-util.d.ts b/node_modules/cypress/types/cy-blob-util.d.ts index e8fc6170..a28dbd75 100644 --- a/node_modules/cypress/types/cy-blob-util.d.ts +++ b/node_modules/cypress/types/cy-blob-util.d.ts @@ -3,7 +3,7 @@ // so that Cypress can get and use the Blob type // tslint:disable-next-line:no-implicit-dependencies -import * as blobUtil from 'blob-util' +import type * as blobUtil from 'blob-util' export = BlobUtil export as namespace BlobUtil diff --git a/node_modules/cypress/types/cypress.d.ts b/node_modules/cypress/types/cypress.d.ts index edb0bead..74ea2592 100644 --- a/node_modules/cypress/types/cypress.d.ts +++ b/node_modules/cypress/types/cypress.d.ts @@ -413,9 +413,9 @@ declare namespace Cypress { * ``` * Cypress.spec * // { - * // name: "config_passing_spec.coffee", - * // relative: "cypress/integration/config_passing_spec.coffee", - * // absolute: "/users/smith/projects/web/cypress/integration/config_passing_spec.coffee" + * // name: "config_passing.cy.ts", + * // relative: "cypress/e2e/config_passing.cy.ts", + * // absolute: "/users/smith/projects/web/cypress/e2e/config_passing.cy.ts" * // specType: "integration" * // } * ``` @@ -507,41 +507,6 @@ declare namespace Cypress { */ config(Object: TestConfigOverrides): void - // no real way to type without generics - /** - * Returns all environment variables set with CYPRESS_ prefix or in "env" object in "cypress.config.{js,ts,mjs,cjs}" - * - * @see https://on.cypress.io/env - * @deprecated Use {@linkcode Chainable.env cy.env()} or {@linkcode expose Cypress.expose()} instead. - */ - env(): ObjectLike - /** - * Returns specific environment variable or undefined - * @see https://on.cypress.io/env - * @example - * // cypress.config.js - * { "env": { "foo": "bar" } } - * Cypress.env("foo") // => bar - * @deprecated Use {@linkcode Chainable.env cy.env()} or {@linkcode expose Cypress.expose()} instead. - */ - env(key: string): any - /** - * Set value for a variable. - * Any value you change will be permanently changed for the remainder of your tests. - * @see https://on.cypress.io/env - * @example - * Cypress.env("host", "http://server.dev.local") - * @deprecated Use {@linkcode Chainable.env cy.env()} or {@linkcode expose Cypress.expose()} instead. - */ - env(key: string, value: any): void - /** - * Set values for multiple variables at once. Values are merged with existing values. - * @see https://on.cypress.io/env - * @example - * Cypress.env({ host: "http://server.dev.local", foo: "foo" }) - * @deprecated Use {@linkcode Chainable.env cy.env()} or {@linkcode expose Cypress.expose()} instead. - */ - env(object: ObjectLike): void /** * Returns all exposed public configuration variables set with --expose in the CLI or in "expose" object in "cypress.config.{js,ts,mjs,cjs}" * @@ -1021,7 +986,7 @@ declare namespace Cypress { * * @see https://on.cypress.io/getalllocalstorage */ - getAllLocalStorage(options?: Partial): Chainable + getAllLocalStorage(options?: Partial): Chainable /** * Clear local storage for all origins. @@ -1040,7 +1005,7 @@ declare namespace Cypress { * * @see https://on.cypress.io/getallsessionstorage */ - getAllSessionStorage(options?: Partial): Chainable + getAllSessionStorage(options?: Partial): Chainable /** * Clear session storage for all origins. @@ -1369,15 +1334,6 @@ declare namespace Cypress { each(fn: (element: JQuery, index: number, $list: E[]) => void): Chainable> // Can't properly infer type without breaking down Chainable each(fn: (item: any, index: number, $list: any[]) => void): Chainable - /** - * End a chain of commands - * - * @deprecated `cy.end()` has been deprecated and will be removed in a future release. - * Instead of using `.end()` to break a chain, start a new chain of commands off of `cy`. - * @see https://on.cypress.io/end - */ - end(): Chainable - /** * Get A DOM element at a specific index in an array of elements. * @@ -1390,16 +1346,6 @@ declare namespace Cypress { */ eq(index: number, options?: Partial): Chainable> - /** - * Execute a system command. - * - * @deprecated `cy.exec()` has been deprecated and will be removed in a future major release. - * Use {@linkcode Chainable.task cy.task()} instead, which runs in Node without depending on - * the operating system, shell, or terminal of the machine running Cypress. - * @see https://on.cypress.io/exec - */ - exec(command: string, options?: Partial): Chainable - /** * Get the DOM elements that match a specific selector. Opposite of `.not()` * @@ -3026,17 +2972,6 @@ declare namespace Cypress { */ baseUrl: string | null - /** - * Whether Cypress should allow [Cypress.env()](https://on.cypress.io/env) API to be available in the browser. - * - * Cypress recommends migrating to the cy.env() command and disabling this within your Cypress configuration. - * - * The use of Cypress.env() will warn and throw an error when this is set to false. - * - * This will be the default behavior in a future major version of Cypress and Cypress.env() will be removed. - * @default true - */ - allowCypressEnv: boolean /** * Any values to be set as [environment variables](https://on.cypress.io/environment-variables) * @default {} @@ -3057,6 +2992,11 @@ declare namespace Cypress { * @default 50 */ numTestsKeptInMemory: number + /** + * Enables improved memory management within Chromium-based browsers. + * @default true + */ + manageBrowserMemory: boolean /** * Port used to host Cypress. Normally this is a randomly generated port * @default null @@ -3087,14 +3027,6 @@ declare namespace Cypress { * @default 4000 */ defaultCommandTimeout: number - /** - * Time, in milliseconds, to wait for a system command to finish executing during a [cy.exec()](https://on.cypress.io/exec) command - * @default 60000 - * @deprecated `execTimeout` has been deprecated along with {@linkcode Chainable.exec cy.exec()} and will be - * removed in a future major release. Use {@linkcode ResolvedConfigOptions.taskTimeout taskTimeout} with - * {@linkcode Chainable.task cy.task()} instead. - */ - execTimeout: number /** * Time, in milliseconds, to wait for page transition events or [cy.visit()](https://on.cypress.io/visit), [cy.go()](https://on.cypress.io/go), [cy.reload()](https://on.cypress.io/reload) commands to fire their page load events * @default 60000 @@ -3122,7 +3054,7 @@ declare namespace Cypress { */ requestTimeout: number /** - * Time, in milliseconds, to wait for a response in a [cy.request()](https://on.cypress.io/request), [cy.wait()](https://on.cypress.io/wait), [cy.fixture()](https://on.cypress.io/fixture), [cy.getCookie()](https://on.cypress.io/getcookie), [cy.getCookies()](https://on.cypress.io/getcookies), [cy.setCookie()](https://on.cypress.io/setcookie), [cy.clearCookie()](https://on.cypress.io/clearcookie), [cy.clearCookies()](https://on.cypress.io/clearcookies), and [cy.screenshot()](https://on.cypress.io/screenshot) commands + * Time, in milliseconds, to wait for a response in a [cy.request()](https://on.cypress.io/request), [cy.wait()](https://on.cypress.io/wait), [cy.fixture()](https://on.cypress.io/fixture), [cy.setCookie()](https://on.cypress.io/setcookie), [cy.clearCookie()](https://on.cypress.io/clearcookie), [cy.clearCookies()](https://on.cypress.io/clearcookies), and [cy.screenshot()](https://on.cypress.io/screenshot) commands * @default 30000 */ responseTimeout: number @@ -3141,6 +3073,14 @@ declare namespace Cypress { * @default "cypress/fixtures" */ fixturesFolder: string | false + /** + * Routes Chrome, Chromium, and Edge through the legacy network path, which re-issues + * their connections over HTTP/1.1. Firefox, Electron, and WebKit always use it. + * + * @deprecated This option will be removed in a future version of Cypress. + * @default false + */ + forceHttp1: boolean /** * Path to folder where files downloaded during a test are saved * @default "cypress/downloads" @@ -3278,8 +3218,6 @@ declare namespace Cypress { * NOTE: Setting this flag to true removes Subresource Integrity (SRI) from third-party resources. * To strip SRI from first-party resources as well, use `removeSRIAttributes`. * Please see https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity. - * This option has no impact on experimentalSourceRewriting and is only used with the - * non-experimental source rewriter. * @see https://on.cypress.io/experiments#Configuration */ experimentalModifyObstructiveThirdPartyCode: boolean @@ -3299,11 +3237,6 @@ declare namespace Cypress { * @default false */ experimentalRunAllSpecs?: boolean - /** - * Enables AST-based JS/HTML rewriting. This may fix issues caused by the existing regex-based JS/HTML replacement algorithm. - * @default false - */ - experimentalSourceRewriting: boolean /** * Generate and save commands directly to your test suite by interacting with your app as an end user would. * @default false @@ -3315,15 +3248,15 @@ declare namespace Cypress { */ experimentalWebKitSupport: boolean /** - * Enables support for improved memory management within Chromium-based browsers. - * @default false - */ - experimentalMemoryManagement: boolean - /** - * Enables an alternative, performance-optimized visibility algorithm. - * @default false + * Determines which visibility algorithm Cypress uses to check element visibility. + * `'modern'` uses a performance-optimized algorithm based on `checkVisibility()`. + * `'legacy'` uses the traditional ancestor-walking algorithm. + * @default 'modern' + * @deprecated This option is deprecated. It exists only as a migration path + * for tests that still need the legacy algorithm. The `'legacy'` value and + * this entire option will be removed in a future version of Cypress. */ - experimentalFastVisibility: boolean + visibilityStrategy: 'legacy' | 'modern' /** * Allows for just-in-time compiling of a component test, which will only compile assets related to the component. * This results in a smaller bundle under test, reducing resource constraints on a given machine. This option is recommended @@ -3486,7 +3419,7 @@ declare namespace Cypress { } interface SuiteConfigOverrides extends Partial< - Pick + Pick >, Partial> { browser?: IsBrowserMatcher | IsBrowserMatcher[] keystrokeDelay?: number @@ -3494,7 +3427,7 @@ declare namespace Cypress { } interface TestConfigOverrides extends Partial< - Pick + Pick >, Partial> { browser?: IsBrowserMatcher | IsBrowserMatcher[] keystrokeDelay?: number @@ -3768,37 +3701,14 @@ declare namespace Cypress { verbose: boolean } - /** - * Options object to change the default behavior of cy.exec(). - * - * @deprecated `ExecOptions` has been deprecated along with {@linkcode Chainable.exec cy.exec()} and will be - * removed in a future major release. - */ - interface ExecOptions extends Loggable, Timeoutable { - /** - * Whether to fail if the command exits with a non-zero code - * - * @default true - */ - failOnNonZeroExit: boolean - /** - * Object of environment variables to set before the command executes - * (e.g. {USERNAME: 'johndoe'}). Will be merged with existing - * system environment variables - * - * @default {} - */ - env: object - } - /** * Options for Cypress.Keyboard.defaults() */ interface KeyboardDefaultsOptions { /** - * Time, in milliseconds, between each keystroke when typing. (Pass 0 to disable) + * Time, in milliseconds, between each keystroke when typing. * - * @default 10 + * @default 0 */ keystrokeDelay: number } @@ -6552,7 +6462,7 @@ declare namespace Cypress { (action: 'test:after:run', fn: (attributes: ObjectLike, test: Mocha.Test) => void): Cypress } - // $CommandQueue from `command_queue.coffee` - a lot to type. Might be more useful if it was written in TS + // $CommandQueue - a lot to type; implementation is not fully reflected here interface CommandQueue extends ObjectLike { logs(filters: any): any add(obj: any): any @@ -6641,18 +6551,6 @@ declare namespace Cypress { set(options: Partial): Log } - /** - * The result yielded by cy.exec(). - * - * @deprecated `Exec` has been deprecated along with {@linkcode Chainable.exec cy.exec()} and will be - * removed in a future major release. - */ - interface Exec { - exitCode: number - stdout: string - stderr: string - } - type TypedArray = | Int8Array | Uint8Array diff --git a/node_modules/cypress/vue/dist/cypress-vue.cjs.js b/node_modules/cypress/vue/dist/cypress-vue.cjs.js index 958c8756..4f768f04 100644 --- a/node_modules/cypress/vue/dist/cypress-vue.cjs.js +++ b/node_modules/cypress/vue/dist/cypress-vue.cjs.js @@ -12,56 +12,56 @@ var compilerDom = require('@vue/compiler-dom'); var serverRenderer = require('@vue/server-renderer'); function _interopNamespaceDefault(e) { - var n = Object.create(null); - if (e) { - Object.keys(e).forEach(function (k) { - if (k !== 'default') { - var d = Object.getOwnPropertyDescriptor(e, k); - Object.defineProperty(n, k, d.get ? d : { - enumerable: true, - get: function () { return e[k]; } + var n = Object.create(null); + if (e) { + Object.keys(e).forEach(function (k) { + if (k !== 'default') { + var d = Object.getOwnPropertyDescriptor(e, k); + Object.defineProperty(n, k, d.get ? d : { + enumerable: true, + get: function () { return e[k]; } + }); + } }); - } - }); - } - n.default = e; - return Object.freeze(n); + } + n.default = e; + return Object.freeze(n); } var Vue__namespace = /*#__PURE__*/_interopNamespaceDefault(Vue); -/****************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -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. -***************************************************************************** */ -/* global Reflect, Promise, SuppressedError, Symbol, Iterator */ - - -function __rest(s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; -} - -typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { - var e = new Error(message); - return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; +/****************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +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. +***************************************************************************** */ +/* global Reflect, Promise, SuppressedError, Symbol, Iterator */ + + +function __rest(s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +} + +typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { + var e = new Error(message); + return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; }; const ROOT_SELECTOR = '[data-cy-root]'; @@ -102,7 +102,7 @@ function setupHooks(optionalCallback) { }); // @ts-ignore Cypress.on('test:before:after:run:async', () => { - optionalCallback === null || optionalCallback === void 0 ? void 0 : optionalCallback(); + optionalCallback?.(); }); } @@ -8506,7 +8506,7 @@ function mount$1(inputComponent, options) { trackInstance(wrapper); return wrapper; } -var shallowMount$1 = function (component, options) { +var shallowMount = function (component, options) { return mount$1(component, __assign(__assign({}, options), { shallow: true })); }; @@ -8572,30 +8572,26 @@ function flushPromises() { } var _VueTestUtils = /*#__PURE__*/Object.freeze({ - __proto__: null, - BaseWrapper: BaseWrapper, - DOMWrapper: DOMWrapper, - RouterLinkStub: RouterLinkStub, - VueWrapper: VueWrapper, - config: config, - createWrapperError: createWrapperError, - disableAutoUnmount: disableAutoUnmount, - enableAutoUnmount: enableAutoUnmount, - flushPromises: flushPromises, - mount: mount$1, - renderToString: renderToString, - shallowMount: shallowMount$1 + __proto__: null, + BaseWrapper: BaseWrapper, + DOMWrapper: DOMWrapper, + RouterLinkStub: RouterLinkStub, + VueWrapper: VueWrapper, + config: config, + createWrapperError: createWrapperError, + disableAutoUnmount: disableAutoUnmount, + enableAutoUnmount: enableAutoUnmount, + flushPromises: flushPromises, + mount: mount$1, + renderToString: renderToString, + shallowMount: shallowMount }); const { // We do not expose the `mount` from VueTestUtils, instead, we wrap it and expose a // Cypress-compatible `mount` API. -mount: VTUmount, -// We do not expose shallowMount. It doesn't make much sense in the context of Cypress. -// It might be useful for people who like to migrate some Test Utils tests to Cypress, -// so if we decide it is useful to expose, just remove the next line, and it will be -// available on the `VueTestUtils` import. -shallowMount } = _VueTestUtils, VueTestUtils = __rest(_VueTestUtils, ["mount", "shallowMount"]); +mount: VTUmount} = _VueTestUtils, vueTestUtils = __rest(_VueTestUtils, ["mount", "shallowMount"]); +const VueTestUtils = vueTestUtils; const DEFAULT_COMP_NAME = 'unknown'; const VUE_ROOT = '__cy_vue_root'; const cleanup = () => { diff --git a/node_modules/cypress/vue/dist/cypress-vue.esm-bundler.js b/node_modules/cypress/vue/dist/cypress-vue.esm-bundler.js index a8f328ca..7686c3f5 100644 --- a/node_modules/cypress/vue/dist/cypress-vue.esm-bundler.js +++ b/node_modules/cypress/vue/dist/cypress-vue.esm-bundler.js @@ -6,42 +6,42 @@ */ import * as Vue from 'vue'; -import { nextTick, defineComponent, computed, h, shallowReactive, reactive, ref, createApp, transformVNodeArgs, setDevtoolsHook, Transition, BaseTransition, TransitionGroup, isRef } from 'vue'; +import { nextTick, defineComponent, computed, h, shallowReactive, reactive, ref, createApp, transformVNodeArgs, setDevtoolsHook, isRef, TransitionGroup, Transition, BaseTransition } from 'vue'; import { compile } from '@vue/compiler-dom'; import { renderToString as renderToString$1 } from '@vue/server-renderer'; -/****************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -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. -***************************************************************************** */ -/* global Reflect, Promise, SuppressedError, Symbol, Iterator */ - - -function __rest(s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; -} - -typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { - var e = new Error(message); - return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; +/****************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +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. +***************************************************************************** */ +/* global Reflect, Promise, SuppressedError, Symbol, Iterator */ + + +function __rest(s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +} + +typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { + var e = new Error(message); + return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; }; const ROOT_SELECTOR = '[data-cy-root]'; @@ -82,7 +82,7 @@ function setupHooks(optionalCallback) { }); // @ts-ignore Cypress.on('test:before:after:run:async', () => { - optionalCallback === null || optionalCallback === void 0 ? void 0 : optionalCallback(); + optionalCallback?.(); }); } @@ -8486,7 +8486,7 @@ function mount$1(inputComponent, options) { trackInstance(wrapper); return wrapper; } -var shallowMount$1 = function (component, options) { +var shallowMount = function (component, options) { return mount$1(component, __assign(__assign({}, options), { shallow: true })); }; @@ -8552,30 +8552,26 @@ function flushPromises() { } var _VueTestUtils = /*#__PURE__*/Object.freeze({ - __proto__: null, - BaseWrapper: BaseWrapper, - DOMWrapper: DOMWrapper, - RouterLinkStub: RouterLinkStub, - VueWrapper: VueWrapper, - config: config, - createWrapperError: createWrapperError, - disableAutoUnmount: disableAutoUnmount, - enableAutoUnmount: enableAutoUnmount, - flushPromises: flushPromises, - mount: mount$1, - renderToString: renderToString, - shallowMount: shallowMount$1 + __proto__: null, + BaseWrapper: BaseWrapper, + DOMWrapper: DOMWrapper, + RouterLinkStub: RouterLinkStub, + VueWrapper: VueWrapper, + config: config, + createWrapperError: createWrapperError, + disableAutoUnmount: disableAutoUnmount, + enableAutoUnmount: enableAutoUnmount, + flushPromises: flushPromises, + mount: mount$1, + renderToString: renderToString, + shallowMount: shallowMount }); const { // We do not expose the `mount` from VueTestUtils, instead, we wrap it and expose a // Cypress-compatible `mount` API. -mount: VTUmount, -// We do not expose shallowMount. It doesn't make much sense in the context of Cypress. -// It might be useful for people who like to migrate some Test Utils tests to Cypress, -// so if we decide it is useful to expose, just remove the next line, and it will be -// available on the `VueTestUtils` import. -shallowMount } = _VueTestUtils, VueTestUtils = __rest(_VueTestUtils, ["mount", "shallowMount"]); +mount: VTUmount} = _VueTestUtils, vueTestUtils = __rest(_VueTestUtils, ["mount", "shallowMount"]); +const VueTestUtils = vueTestUtils; const DEFAULT_COMP_NAME = 'unknown'; const VUE_ROOT = '__cy_vue_root'; const cleanup = () => { diff --git a/node_modules/cypress/vue/dist/index.d.ts b/node_modules/cypress/vue/dist/index.d.ts index 1039d47d..161e6eeb 100644 --- a/node_modules/cypress/vue/dist/index.d.ts +++ b/node_modules/cypress/vue/dist/index.d.ts @@ -1,7 +1,7 @@ /// import * as vue from 'vue'; -import { ComponentInternalInstance, FunctionalComponent, ComponentOptions, Component, Directive, Plugin as Plugin$1, AppConfig, VNode, VNodeProps, ComponentPublicInstance, ComputedOptions, MethodOptions, CreateComponentPublicInstance, App, ConcreteComponent, DefineComponent, Prop, EmitsOptions, ComponentOptionsMixin, ExtractPropTypes, ExtractDefaultPropTypes, ComponentOptionsWithoutProps, ComponentOptionsWithArrayProps, ComponentPropsOptions, ComponentOptionsWithObjectProps, AllowedComponentProps, ComponentCustomProps } from 'vue'; +import { ComponentInternalInstance, FunctionalComponent, ComponentOptions, VNodeProps, VNode, Component, Plugin as Plugin$1, AppConfig, Directive, ComponentPublicInstance, App, ComputedOptions, MethodOptions, CreateComponentPublicInstance, DefineComponent, ConcreteComponent, Prop, AllowedComponentProps, ComponentCustomProps, EmitsOptions, ComponentOptionsMixin, ExtractPropTypes, ExtractDefaultPropTypes, ComponentOptionsWithoutProps, ComponentOptionsWithArrayProps, ComponentPropsOptions, ComponentOptionsWithObjectProps } from 'vue'; interface RefSelector { ref: string; @@ -1037,21 +1037,33 @@ interface TriggerOptions { [custom: string]: any; } -declare class DOMWrapper extends BaseWrapper { - constructor(element: NodeType | null | undefined); - getRootNodes(): VueNode[]; - getCurrentComponent(): vue.ComponentInternalInstance | undefined; - find(selector: K): DOMWrapper; - find(selector: K): DOMWrapper; - find(selector: string): DOMWrapper; - find(selector: string | RefSelector): DOMWrapper; +declare class VueWrapper extends BaseWrapper { + private readonly componentVM; + private readonly rootVM; + private readonly __app; + private readonly __setProps; + private cleanUpCallbacks; + constructor(app: App | null, vm: T, setProps?: (props: Record) => void); + private get hasMultipleRoots(); + protected getRootNodes(): VueNode[]; + private get parentElement(); + getCurrentComponent(): vue.ComponentInternalInstance; + exists(): boolean; findAll(selector: K): DOMWrapper[]; findAll(selector: K): DOMWrapper[]; findAll(selector: string): DOMWrapper[]; - findAllComponents(selector: any): any; - private setChecked; - setValue(value?: any): Promise; - private setSelected; + private attachNativeEventListener; + get element(): T['$el']; + get vm(): T; + props(): T['$props']; + props(selector: Selector): T['$props'][Selector]; + emitted(): Record; + emitted(eventName: string): undefined | T[]; + isVisible(): boolean; + setData(data: Record): Promise; + setProps(props: Partial): Promise; + setValue(value: unknown, prop?: string): Promise; + unmount(): void; } interface WrapperLike { @@ -1164,35 +1176,84 @@ declare abstract class BaseWrapper implements WrapperL trigger(eventString: string, options?: TriggerOptions): Promise; } -declare class VueWrapper extends BaseWrapper { - private readonly componentVM; - private readonly rootVM; - private readonly __app; - private readonly __setProps; - private cleanUpCallbacks; - constructor(app: App | null, vm: T, setProps?: (props: Record) => void); - private get hasMultipleRoots(); - protected getRootNodes(): VueNode[]; - private get parentElement(); - getCurrentComponent(): vue.ComponentInternalInstance; - exists(): boolean; +declare class DOMWrapper extends BaseWrapper { + constructor(element: NodeType | null | undefined); + getRootNodes(): VueNode[]; + getCurrentComponent(): vue.ComponentInternalInstance | undefined; + find(selector: K): DOMWrapper; + find(selector: K): DOMWrapper; + find(selector: string): DOMWrapper; + find(selector: string | RefSelector): DOMWrapper; findAll(selector: K): DOMWrapper[]; findAll(selector: K): DOMWrapper[]; findAll(selector: string): DOMWrapper[]; - private attachNativeEventListener; - get element(): T['$el']; - get vm(): T; - props(): T['$props']; - props(selector: Selector): T['$props'][Selector]; - emitted(): Record; - emitted(eventName: string): undefined | T[]; - isVisible(): boolean; - setData(data: Record): Promise; - setProps(props: Partial): Promise; - setValue(value: unknown, prop?: string): Promise; - unmount(): void; + findAllComponents(selector: any): any; + private setChecked; + setValue(value?: any): Promise; + private setSelected; } +type ComponentProps = T extends new (...args: any) => { + $props: infer P; +} ? NonNullable

: T extends (props: infer P, ...args: any) => any ? P : {}; +type ComponentSlots = T extends new (...args: any) => { + $slots: infer S; +} ? NonNullable : T extends (props: any, ctx: { + slots: infer S; + attrs: any; + emit: any; +}, ...args: any) => any ? NonNullable : {}; +type ComponentExposed = T extends new (...args: any) => infer E ? E : T extends (props: any, ctx: any, expose: (exposed: infer E) => any, ...args: any) => any ? NonNullable : {}; + +type ShimSlotReturnType = T extends (...args: infer P) => any ? (...args: P) => any : never; +type WithArray = T | T[]; +type ComponentData = T extends { + data?(...args: any): infer D; +} ? D : {}; +type ComponentMountingOptions$1 = ComponentProps> = Omit>, 'slots'> & { + slots?: { + [K in keyof ComponentSlots]: WithArray[K]> | string | VNode | (new () => any) | { + template: string; + }>; + }; +} & Record; +declare function mount$1 any) | (new (...args: any) => any) ? T : T extends { + props?: infer Props; +} ? DefineComponent | (infer PropNames)[] ? { + [key in PropNames extends string ? PropNames : string]?: any; +} : Props> : DefineComponent, P extends ComponentProps = ComponentProps>(originalComponent: T, options?: ComponentMountingOptions$1): VueWrapper & ComponentData & ComponentExposed, ComponentPublicInstance, ComponentData & ComponentExposed & Omit>>>; +declare const shallowMount: typeof mount$1; + +declare function renderToString any) | (new (...args: any) => any) ? T : T extends { + props?: infer Props; +} ? DefineComponent | (infer PropNames)[] ? { + [key in PropNames extends string ? PropNames : string]?: any; +} : Props> : DefineComponent>(originalComponent: T, options?: ComponentMountingOptions$1 & Pick, 'attachTo'>): Promise; + +declare const RouterLinkStub: vue.DefineComponent<{ + to: { + type: (ObjectConstructor | StringConstructor)[]; + required: true; + }; + custom: { + type: BooleanConstructor; + default: boolean; + }; +}, unknown, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly>, { + custom: boolean; +}, {}>; + +declare function createWrapperError(wrapperType: 'DOMWrapper' | 'VueWrapper'): T; + type CustomCreateStub = (params: { name: string; component: ConcreteComponent; @@ -1229,57 +1290,33 @@ declare class Pluggable> { /** For testing */ reset(): void; } - -type ComponentProps = T extends new (...args: any) => { - $props: infer P; -} ? NonNullable

: T extends (props: infer P, ...args: any) => any ? P : {}; -type ComponentSlots = T extends new (...args: any) => { - $slots: infer S; -} ? NonNullable : T extends (props: any, ctx: { - slots: infer S; - attrs: any; - emit: any; -}, ...args: any) => any ? NonNullable : {}; - -type ShimSlotReturnType = T extends (...args: infer P) => any ? (...args: P) => any : never; -type WithArray = T | T[]; -type ComponentData = T extends { - data?(...args: any): infer D; -} ? D : {}; -type ComponentMountingOptions$1 = ComponentProps> = Omit>, 'slots'> & { - slots?: { - [K in keyof ComponentSlots]: WithArray[K]> | string | VNode | (new () => any) | { - template: string; - }>; - }; -} & Record; - -declare function renderToString any) | (new (...args: any) => any) ? T : T extends { - props?: infer Props; -} ? DefineComponent | (infer PropNames)[] ? { - [key in PropNames extends string ? PropNames : string]?: any; -} : Props> : DefineComponent>(originalComponent: T, options?: ComponentMountingOptions$1 & Pick, 'attachTo'>): Promise; - -declare function createWrapperError(wrapperType: 'DOMWrapper' | 'VueWrapper'): T; +declare const config: GlobalConfigOptions; declare function flushPromises(): Promise; declare function disableAutoUnmount(): void; declare function enableAutoUnmount(hook: (callback: () => void) => void): void; -declare const VueTestUtils: { - renderToString: typeof renderToString; - enableAutoUnmount: typeof enableAutoUnmount; - disableAutoUnmount: typeof disableAutoUnmount; - RouterLinkStub: any; - VueWrapper: typeof VueWrapper; - DOMWrapper: typeof DOMWrapper; - BaseWrapper: typeof BaseWrapper; - config: GlobalConfigOptions; - flushPromises: typeof flushPromises; - createWrapperError: typeof createWrapperError; -}; +type _VueTestUtils_BaseWrapper = BaseWrapper; +declare const _VueTestUtils_BaseWrapper: typeof BaseWrapper; +type _VueTestUtils_DOMWrapper = DOMWrapper; +declare const _VueTestUtils_DOMWrapper: typeof DOMWrapper; +declare const _VueTestUtils_RouterLinkStub: typeof RouterLinkStub; +type _VueTestUtils_VueWrapper = VueWrapper; +declare const _VueTestUtils_VueWrapper: typeof VueWrapper; +declare const _VueTestUtils_config: typeof config; +declare const _VueTestUtils_createWrapperError: typeof createWrapperError; +declare const _VueTestUtils_disableAutoUnmount: typeof disableAutoUnmount; +declare const _VueTestUtils_enableAutoUnmount: typeof enableAutoUnmount; +declare const _VueTestUtils_flushPromises: typeof flushPromises; +declare const _VueTestUtils_renderToString: typeof renderToString; +declare const _VueTestUtils_shallowMount: typeof shallowMount; +declare namespace _VueTestUtils { + export { _VueTestUtils_BaseWrapper as BaseWrapper, _VueTestUtils_DOMWrapper as DOMWrapper, _VueTestUtils_RouterLinkStub as RouterLinkStub, _VueTestUtils_VueWrapper as VueWrapper, _VueTestUtils_config as config, _VueTestUtils_createWrapperError as createWrapperError, _VueTestUtils_disableAutoUnmount as disableAutoUnmount, _VueTestUtils_enableAutoUnmount as enableAutoUnmount, _VueTestUtils_flushPromises as flushPromises, mount$1 as mount, _VueTestUtils_renderToString as renderToString, _VueTestUtils_shallowMount as shallowMount }; + export type { ComponentMountingOptions$1 as ComponentMountingOptions, MountingOptions$1 as MountingOptions }; +} +declare const VueTestUtils: Omit; type GlobalMountOptions = Required>['global']; declare global { namespace Cypress { @@ -1372,4 +1409,5 @@ declare function mount, Raw component: VueWrapper, RawBindings, D, C, M, E, VNodeProps & ExtractPropTypes>>['vm']; }>; -export { CyMountOptions, VueTestUtils, mount }; +export { VueTestUtils, mount }; +export type { CyMountOptions }; diff --git a/node_modules/cypress/vue/package.json b/node_modules/cypress/vue/package.json index 25bcc626..b2aebf5e 100644 --- a/node_modules/cypress/vue/package.json +++ b/node_modules/cypress/vue/package.json @@ -19,14 +19,14 @@ "@cypress/mount-utils": "0.0.0-development", "eslint": "^9.31.0", "jiti": "^2.4.2", - "@vitejs/plugin-vue": "6.0.3", + "@vitejs/plugin-vue": "6.0.6", "@vue/compiler-sfc": "3.2.47", "@vue/test-utils": "2.4.6", "axios": "^1.15.1", "cypress": "0.0.0-development", - "rollup": "3.29.5", + "rollup": "^4.60.2", "typescript": "~5.4.5", - "vite": "6.3.5", + "vite": "^8.0.9", "vue-eslint-parser": "^10.0.0", "vue": "3.2.47", "vue-i18n": "9.14.5", @@ -44,7 +44,7 @@ "src/**/*.js" ], "engines": { - "node": ">=18" + "node": "^22.0.0 || ^24.0.0 || >=26.0.0" }, "types": "dist/index.d.ts", "license": "MIT", diff --git a/node_modules/cypress/vue/vue/dist/cypress-vue.cjs.js b/node_modules/cypress/vue/vue/dist/cypress-vue.cjs.js index 958c8756..4f768f04 100644 --- a/node_modules/cypress/vue/vue/dist/cypress-vue.cjs.js +++ b/node_modules/cypress/vue/vue/dist/cypress-vue.cjs.js @@ -12,56 +12,56 @@ var compilerDom = require('@vue/compiler-dom'); var serverRenderer = require('@vue/server-renderer'); function _interopNamespaceDefault(e) { - var n = Object.create(null); - if (e) { - Object.keys(e).forEach(function (k) { - if (k !== 'default') { - var d = Object.getOwnPropertyDescriptor(e, k); - Object.defineProperty(n, k, d.get ? d : { - enumerable: true, - get: function () { return e[k]; } + var n = Object.create(null); + if (e) { + Object.keys(e).forEach(function (k) { + if (k !== 'default') { + var d = Object.getOwnPropertyDescriptor(e, k); + Object.defineProperty(n, k, d.get ? d : { + enumerable: true, + get: function () { return e[k]; } + }); + } }); - } - }); - } - n.default = e; - return Object.freeze(n); + } + n.default = e; + return Object.freeze(n); } var Vue__namespace = /*#__PURE__*/_interopNamespaceDefault(Vue); -/****************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -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. -***************************************************************************** */ -/* global Reflect, Promise, SuppressedError, Symbol, Iterator */ - - -function __rest(s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; -} - -typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { - var e = new Error(message); - return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; +/****************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +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. +***************************************************************************** */ +/* global Reflect, Promise, SuppressedError, Symbol, Iterator */ + + +function __rest(s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +} + +typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { + var e = new Error(message); + return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; }; const ROOT_SELECTOR = '[data-cy-root]'; @@ -102,7 +102,7 @@ function setupHooks(optionalCallback) { }); // @ts-ignore Cypress.on('test:before:after:run:async', () => { - optionalCallback === null || optionalCallback === void 0 ? void 0 : optionalCallback(); + optionalCallback?.(); }); } @@ -8506,7 +8506,7 @@ function mount$1(inputComponent, options) { trackInstance(wrapper); return wrapper; } -var shallowMount$1 = function (component, options) { +var shallowMount = function (component, options) { return mount$1(component, __assign(__assign({}, options), { shallow: true })); }; @@ -8572,30 +8572,26 @@ function flushPromises() { } var _VueTestUtils = /*#__PURE__*/Object.freeze({ - __proto__: null, - BaseWrapper: BaseWrapper, - DOMWrapper: DOMWrapper, - RouterLinkStub: RouterLinkStub, - VueWrapper: VueWrapper, - config: config, - createWrapperError: createWrapperError, - disableAutoUnmount: disableAutoUnmount, - enableAutoUnmount: enableAutoUnmount, - flushPromises: flushPromises, - mount: mount$1, - renderToString: renderToString, - shallowMount: shallowMount$1 + __proto__: null, + BaseWrapper: BaseWrapper, + DOMWrapper: DOMWrapper, + RouterLinkStub: RouterLinkStub, + VueWrapper: VueWrapper, + config: config, + createWrapperError: createWrapperError, + disableAutoUnmount: disableAutoUnmount, + enableAutoUnmount: enableAutoUnmount, + flushPromises: flushPromises, + mount: mount$1, + renderToString: renderToString, + shallowMount: shallowMount }); const { // We do not expose the `mount` from VueTestUtils, instead, we wrap it and expose a // Cypress-compatible `mount` API. -mount: VTUmount, -// We do not expose shallowMount. It doesn't make much sense in the context of Cypress. -// It might be useful for people who like to migrate some Test Utils tests to Cypress, -// so if we decide it is useful to expose, just remove the next line, and it will be -// available on the `VueTestUtils` import. -shallowMount } = _VueTestUtils, VueTestUtils = __rest(_VueTestUtils, ["mount", "shallowMount"]); +mount: VTUmount} = _VueTestUtils, vueTestUtils = __rest(_VueTestUtils, ["mount", "shallowMount"]); +const VueTestUtils = vueTestUtils; const DEFAULT_COMP_NAME = 'unknown'; const VUE_ROOT = '__cy_vue_root'; const cleanup = () => { diff --git a/node_modules/cypress/vue/vue/dist/cypress-vue.esm-bundler.js b/node_modules/cypress/vue/vue/dist/cypress-vue.esm-bundler.js index a8f328ca..7686c3f5 100644 --- a/node_modules/cypress/vue/vue/dist/cypress-vue.esm-bundler.js +++ b/node_modules/cypress/vue/vue/dist/cypress-vue.esm-bundler.js @@ -6,42 +6,42 @@ */ import * as Vue from 'vue'; -import { nextTick, defineComponent, computed, h, shallowReactive, reactive, ref, createApp, transformVNodeArgs, setDevtoolsHook, Transition, BaseTransition, TransitionGroup, isRef } from 'vue'; +import { nextTick, defineComponent, computed, h, shallowReactive, reactive, ref, createApp, transformVNodeArgs, setDevtoolsHook, isRef, TransitionGroup, Transition, BaseTransition } from 'vue'; import { compile } from '@vue/compiler-dom'; import { renderToString as renderToString$1 } from '@vue/server-renderer'; -/****************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -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. -***************************************************************************** */ -/* global Reflect, Promise, SuppressedError, Symbol, Iterator */ - - -function __rest(s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; -} - -typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { - var e = new Error(message); - return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; +/****************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +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. +***************************************************************************** */ +/* global Reflect, Promise, SuppressedError, Symbol, Iterator */ + + +function __rest(s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +} + +typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { + var e = new Error(message); + return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; }; const ROOT_SELECTOR = '[data-cy-root]'; @@ -82,7 +82,7 @@ function setupHooks(optionalCallback) { }); // @ts-ignore Cypress.on('test:before:after:run:async', () => { - optionalCallback === null || optionalCallback === void 0 ? void 0 : optionalCallback(); + optionalCallback?.(); }); } @@ -8486,7 +8486,7 @@ function mount$1(inputComponent, options) { trackInstance(wrapper); return wrapper; } -var shallowMount$1 = function (component, options) { +var shallowMount = function (component, options) { return mount$1(component, __assign(__assign({}, options), { shallow: true })); }; @@ -8552,30 +8552,26 @@ function flushPromises() { } var _VueTestUtils = /*#__PURE__*/Object.freeze({ - __proto__: null, - BaseWrapper: BaseWrapper, - DOMWrapper: DOMWrapper, - RouterLinkStub: RouterLinkStub, - VueWrapper: VueWrapper, - config: config, - createWrapperError: createWrapperError, - disableAutoUnmount: disableAutoUnmount, - enableAutoUnmount: enableAutoUnmount, - flushPromises: flushPromises, - mount: mount$1, - renderToString: renderToString, - shallowMount: shallowMount$1 + __proto__: null, + BaseWrapper: BaseWrapper, + DOMWrapper: DOMWrapper, + RouterLinkStub: RouterLinkStub, + VueWrapper: VueWrapper, + config: config, + createWrapperError: createWrapperError, + disableAutoUnmount: disableAutoUnmount, + enableAutoUnmount: enableAutoUnmount, + flushPromises: flushPromises, + mount: mount$1, + renderToString: renderToString, + shallowMount: shallowMount }); const { // We do not expose the `mount` from VueTestUtils, instead, we wrap it and expose a // Cypress-compatible `mount` API. -mount: VTUmount, -// We do not expose shallowMount. It doesn't make much sense in the context of Cypress. -// It might be useful for people who like to migrate some Test Utils tests to Cypress, -// so if we decide it is useful to expose, just remove the next line, and it will be -// available on the `VueTestUtils` import. -shallowMount } = _VueTestUtils, VueTestUtils = __rest(_VueTestUtils, ["mount", "shallowMount"]); +mount: VTUmount} = _VueTestUtils, vueTestUtils = __rest(_VueTestUtils, ["mount", "shallowMount"]); +const VueTestUtils = vueTestUtils; const DEFAULT_COMP_NAME = 'unknown'; const VUE_ROOT = '__cy_vue_root'; const cleanup = () => { diff --git a/node_modules/cypress/vue/vue/dist/index.d.ts b/node_modules/cypress/vue/vue/dist/index.d.ts index 1039d47d..161e6eeb 100644 --- a/node_modules/cypress/vue/vue/dist/index.d.ts +++ b/node_modules/cypress/vue/vue/dist/index.d.ts @@ -1,7 +1,7 @@ /// import * as vue from 'vue'; -import { ComponentInternalInstance, FunctionalComponent, ComponentOptions, Component, Directive, Plugin as Plugin$1, AppConfig, VNode, VNodeProps, ComponentPublicInstance, ComputedOptions, MethodOptions, CreateComponentPublicInstance, App, ConcreteComponent, DefineComponent, Prop, EmitsOptions, ComponentOptionsMixin, ExtractPropTypes, ExtractDefaultPropTypes, ComponentOptionsWithoutProps, ComponentOptionsWithArrayProps, ComponentPropsOptions, ComponentOptionsWithObjectProps, AllowedComponentProps, ComponentCustomProps } from 'vue'; +import { ComponentInternalInstance, FunctionalComponent, ComponentOptions, VNodeProps, VNode, Component, Plugin as Plugin$1, AppConfig, Directive, ComponentPublicInstance, App, ComputedOptions, MethodOptions, CreateComponentPublicInstance, DefineComponent, ConcreteComponent, Prop, AllowedComponentProps, ComponentCustomProps, EmitsOptions, ComponentOptionsMixin, ExtractPropTypes, ExtractDefaultPropTypes, ComponentOptionsWithoutProps, ComponentOptionsWithArrayProps, ComponentPropsOptions, ComponentOptionsWithObjectProps } from 'vue'; interface RefSelector { ref: string; @@ -1037,21 +1037,33 @@ interface TriggerOptions { [custom: string]: any; } -declare class DOMWrapper extends BaseWrapper { - constructor(element: NodeType | null | undefined); - getRootNodes(): VueNode[]; - getCurrentComponent(): vue.ComponentInternalInstance | undefined; - find(selector: K): DOMWrapper; - find(selector: K): DOMWrapper; - find(selector: string): DOMWrapper; - find(selector: string | RefSelector): DOMWrapper; +declare class VueWrapper extends BaseWrapper { + private readonly componentVM; + private readonly rootVM; + private readonly __app; + private readonly __setProps; + private cleanUpCallbacks; + constructor(app: App | null, vm: T, setProps?: (props: Record) => void); + private get hasMultipleRoots(); + protected getRootNodes(): VueNode[]; + private get parentElement(); + getCurrentComponent(): vue.ComponentInternalInstance; + exists(): boolean; findAll(selector: K): DOMWrapper[]; findAll(selector: K): DOMWrapper[]; findAll(selector: string): DOMWrapper[]; - findAllComponents(selector: any): any; - private setChecked; - setValue(value?: any): Promise; - private setSelected; + private attachNativeEventListener; + get element(): T['$el']; + get vm(): T; + props(): T['$props']; + props(selector: Selector): T['$props'][Selector]; + emitted(): Record; + emitted(eventName: string): undefined | T[]; + isVisible(): boolean; + setData(data: Record): Promise; + setProps(props: Partial): Promise; + setValue(value: unknown, prop?: string): Promise; + unmount(): void; } interface WrapperLike { @@ -1164,35 +1176,84 @@ declare abstract class BaseWrapper implements WrapperL trigger(eventString: string, options?: TriggerOptions): Promise; } -declare class VueWrapper extends BaseWrapper { - private readonly componentVM; - private readonly rootVM; - private readonly __app; - private readonly __setProps; - private cleanUpCallbacks; - constructor(app: App | null, vm: T, setProps?: (props: Record) => void); - private get hasMultipleRoots(); - protected getRootNodes(): VueNode[]; - private get parentElement(); - getCurrentComponent(): vue.ComponentInternalInstance; - exists(): boolean; +declare class DOMWrapper extends BaseWrapper { + constructor(element: NodeType | null | undefined); + getRootNodes(): VueNode[]; + getCurrentComponent(): vue.ComponentInternalInstance | undefined; + find(selector: K): DOMWrapper; + find(selector: K): DOMWrapper; + find(selector: string): DOMWrapper; + find(selector: string | RefSelector): DOMWrapper; findAll(selector: K): DOMWrapper[]; findAll(selector: K): DOMWrapper[]; findAll(selector: string): DOMWrapper[]; - private attachNativeEventListener; - get element(): T['$el']; - get vm(): T; - props(): T['$props']; - props(selector: Selector): T['$props'][Selector]; - emitted(): Record; - emitted(eventName: string): undefined | T[]; - isVisible(): boolean; - setData(data: Record): Promise; - setProps(props: Partial): Promise; - setValue(value: unknown, prop?: string): Promise; - unmount(): void; + findAllComponents(selector: any): any; + private setChecked; + setValue(value?: any): Promise; + private setSelected; } +type ComponentProps = T extends new (...args: any) => { + $props: infer P; +} ? NonNullable

: T extends (props: infer P, ...args: any) => any ? P : {}; +type ComponentSlots = T extends new (...args: any) => { + $slots: infer S; +} ? NonNullable : T extends (props: any, ctx: { + slots: infer S; + attrs: any; + emit: any; +}, ...args: any) => any ? NonNullable : {}; +type ComponentExposed = T extends new (...args: any) => infer E ? E : T extends (props: any, ctx: any, expose: (exposed: infer E) => any, ...args: any) => any ? NonNullable : {}; + +type ShimSlotReturnType = T extends (...args: infer P) => any ? (...args: P) => any : never; +type WithArray = T | T[]; +type ComponentData = T extends { + data?(...args: any): infer D; +} ? D : {}; +type ComponentMountingOptions$1 = ComponentProps> = Omit>, 'slots'> & { + slots?: { + [K in keyof ComponentSlots]: WithArray[K]> | string | VNode | (new () => any) | { + template: string; + }>; + }; +} & Record; +declare function mount$1 any) | (new (...args: any) => any) ? T : T extends { + props?: infer Props; +} ? DefineComponent | (infer PropNames)[] ? { + [key in PropNames extends string ? PropNames : string]?: any; +} : Props> : DefineComponent, P extends ComponentProps = ComponentProps>(originalComponent: T, options?: ComponentMountingOptions$1): VueWrapper & ComponentData & ComponentExposed, ComponentPublicInstance, ComponentData & ComponentExposed & Omit>>>; +declare const shallowMount: typeof mount$1; + +declare function renderToString any) | (new (...args: any) => any) ? T : T extends { + props?: infer Props; +} ? DefineComponent | (infer PropNames)[] ? { + [key in PropNames extends string ? PropNames : string]?: any; +} : Props> : DefineComponent>(originalComponent: T, options?: ComponentMountingOptions$1 & Pick, 'attachTo'>): Promise; + +declare const RouterLinkStub: vue.DefineComponent<{ + to: { + type: (ObjectConstructor | StringConstructor)[]; + required: true; + }; + custom: { + type: BooleanConstructor; + default: boolean; + }; +}, unknown, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly>, { + custom: boolean; +}, {}>; + +declare function createWrapperError(wrapperType: 'DOMWrapper' | 'VueWrapper'): T; + type CustomCreateStub = (params: { name: string; component: ConcreteComponent; @@ -1229,57 +1290,33 @@ declare class Pluggable> { /** For testing */ reset(): void; } - -type ComponentProps = T extends new (...args: any) => { - $props: infer P; -} ? NonNullable

: T extends (props: infer P, ...args: any) => any ? P : {}; -type ComponentSlots = T extends new (...args: any) => { - $slots: infer S; -} ? NonNullable : T extends (props: any, ctx: { - slots: infer S; - attrs: any; - emit: any; -}, ...args: any) => any ? NonNullable : {}; - -type ShimSlotReturnType = T extends (...args: infer P) => any ? (...args: P) => any : never; -type WithArray = T | T[]; -type ComponentData = T extends { - data?(...args: any): infer D; -} ? D : {}; -type ComponentMountingOptions$1 = ComponentProps> = Omit>, 'slots'> & { - slots?: { - [K in keyof ComponentSlots]: WithArray[K]> | string | VNode | (new () => any) | { - template: string; - }>; - }; -} & Record; - -declare function renderToString any) | (new (...args: any) => any) ? T : T extends { - props?: infer Props; -} ? DefineComponent | (infer PropNames)[] ? { - [key in PropNames extends string ? PropNames : string]?: any; -} : Props> : DefineComponent>(originalComponent: T, options?: ComponentMountingOptions$1 & Pick, 'attachTo'>): Promise; - -declare function createWrapperError(wrapperType: 'DOMWrapper' | 'VueWrapper'): T; +declare const config: GlobalConfigOptions; declare function flushPromises(): Promise; declare function disableAutoUnmount(): void; declare function enableAutoUnmount(hook: (callback: () => void) => void): void; -declare const VueTestUtils: { - renderToString: typeof renderToString; - enableAutoUnmount: typeof enableAutoUnmount; - disableAutoUnmount: typeof disableAutoUnmount; - RouterLinkStub: any; - VueWrapper: typeof VueWrapper; - DOMWrapper: typeof DOMWrapper; - BaseWrapper: typeof BaseWrapper; - config: GlobalConfigOptions; - flushPromises: typeof flushPromises; - createWrapperError: typeof createWrapperError; -}; +type _VueTestUtils_BaseWrapper = BaseWrapper; +declare const _VueTestUtils_BaseWrapper: typeof BaseWrapper; +type _VueTestUtils_DOMWrapper = DOMWrapper; +declare const _VueTestUtils_DOMWrapper: typeof DOMWrapper; +declare const _VueTestUtils_RouterLinkStub: typeof RouterLinkStub; +type _VueTestUtils_VueWrapper = VueWrapper; +declare const _VueTestUtils_VueWrapper: typeof VueWrapper; +declare const _VueTestUtils_config: typeof config; +declare const _VueTestUtils_createWrapperError: typeof createWrapperError; +declare const _VueTestUtils_disableAutoUnmount: typeof disableAutoUnmount; +declare const _VueTestUtils_enableAutoUnmount: typeof enableAutoUnmount; +declare const _VueTestUtils_flushPromises: typeof flushPromises; +declare const _VueTestUtils_renderToString: typeof renderToString; +declare const _VueTestUtils_shallowMount: typeof shallowMount; +declare namespace _VueTestUtils { + export { _VueTestUtils_BaseWrapper as BaseWrapper, _VueTestUtils_DOMWrapper as DOMWrapper, _VueTestUtils_RouterLinkStub as RouterLinkStub, _VueTestUtils_VueWrapper as VueWrapper, _VueTestUtils_config as config, _VueTestUtils_createWrapperError as createWrapperError, _VueTestUtils_disableAutoUnmount as disableAutoUnmount, _VueTestUtils_enableAutoUnmount as enableAutoUnmount, _VueTestUtils_flushPromises as flushPromises, mount$1 as mount, _VueTestUtils_renderToString as renderToString, _VueTestUtils_shallowMount as shallowMount }; + export type { ComponentMountingOptions$1 as ComponentMountingOptions, MountingOptions$1 as MountingOptions }; +} +declare const VueTestUtils: Omit; type GlobalMountOptions = Required>['global']; declare global { namespace Cypress { @@ -1372,4 +1409,5 @@ declare function mount, Raw component: VueWrapper, RawBindings, D, C, M, E, VNodeProps & ExtractPropTypes>>['vm']; }>; -export { CyMountOptions, VueTestUtils, mount }; +export { VueTestUtils, mount }; +export type { CyMountOptions }; diff --git a/node_modules/cypress/vue/vue/package.json b/node_modules/cypress/vue/vue/package.json index 25bcc626..b2aebf5e 100644 --- a/node_modules/cypress/vue/vue/package.json +++ b/node_modules/cypress/vue/vue/package.json @@ -19,14 +19,14 @@ "@cypress/mount-utils": "0.0.0-development", "eslint": "^9.31.0", "jiti": "^2.4.2", - "@vitejs/plugin-vue": "6.0.3", + "@vitejs/plugin-vue": "6.0.6", "@vue/compiler-sfc": "3.2.47", "@vue/test-utils": "2.4.6", "axios": "^1.15.1", "cypress": "0.0.0-development", - "rollup": "3.29.5", + "rollup": "^4.60.2", "typescript": "~5.4.5", - "vite": "6.3.5", + "vite": "^8.0.9", "vue-eslint-parser": "^10.0.0", "vue": "3.2.47", "vue-i18n": "9.14.5", @@ -44,7 +44,7 @@ "src/**/*.js" ], "engines": { - "node": ">=18" + "node": "^22.0.0 || ^24.0.0 || >=26.0.0" }, "types": "dist/index.d.ts", "license": "MIT", diff --git a/node_modules/dayjs/.editorconfig b/node_modules/dayjs/.editorconfig index 14c1d8c1..d4d73cf5 100644 --- a/node_modules/dayjs/.editorconfig +++ b/node_modules/dayjs/.editorconfig @@ -4,3 +4,4 @@ root = true charset = utf-8 end_of_line = lf insert_final_newline = true +indent_size = 2 diff --git a/node_modules/dayjs/CHANGELOG.md b/node_modules/dayjs/CHANGELOG.md index ab0380d1..3d7bd314 100644 --- a/node_modules/dayjs/CHANGELOG.md +++ b/node_modules/dayjs/CHANGELOG.md @@ -1,3 +1,156 @@ +## [1.11.23](https://github.com/iamkun/dayjs/compare/v1.11.22...v1.11.23) (2026-08-17) + + +### Bug Fixes + +* **plugin:** timezone plugin prevent RangeError for invalid Day.js values ([#3180](https://github.com/iamkun/dayjs/issues/3180)) ([dad46e6](https://github.com/iamkun/dayjs/commit/dad46e6fe5198d77d87ed3b121937f77adaee0a6)) +* **plugin:** timezone plugin prevent RangeError for invalid Day.js values ([#3180](https://github.com/iamkun/dayjs/issues/3180)) ([#3181](https://github.com/iamkun/dayjs/issues/3181)) ([2a3785f](https://github.com/iamkun/dayjs/commit/2a3785fd27084d6bb78dfe8c3d7320c736ef4862)) + +## [1.11.22](https://github.com/iamkun/dayjs/compare/v1.11.21...v1.11.22) (2026-08-16) + + +### Bug Fixes + +* **plugin:** timezone compute instance .tz() offset without host DST ([#3174](https://github.com/iamkun/dayjs/issues/3174)) ([e27ee80](https://github.com/iamkun/dayjs/commit/e27ee8021a512b5770ffe683e010830bb9b6fb6d)), closes [#3169](https://github.com/iamkun/dayjs/issues/3169) + +## [1.11.21](https://github.com/iamkun/dayjs/compare/v1.11.20...v1.11.21) (2026-05-26) + + +### Bug Fixes + +* preserve unsupported year tokens in format ([#3015](https://github.com/iamkun/dayjs/issues/3015)) ([#3016](https://github.com/iamkun/dayjs/issues/3016)) ([8fda602](https://github.com/iamkun/dayjs/commit/8fda602beac5abbc64230ddc49085aa532320f26)) + +## [1.11.20](https://github.com/iamkun/dayjs/compare/v1.11.19...v1.11.20) (2026-03-12) + + +### Bug Fixes + +* Update locale km.js to support meridiem ([#3017](https://github.com/iamkun/dayjs/issues/3017)) ([9d2b6a1](https://github.com/iamkun/dayjs/commit/9d2b6a1ec744ad5db13afd4d701f93349135dfec)) +* update updateLocale plugin to merge nested object properties instead of replacing ([#3012](https://github.com/iamkun/dayjs/issues/3012)) ([99691c5](https://github.com/iamkun/dayjs/commit/99691c5f3bd1371d3b763d5f9dfaed9a1945a477)), closes [#1118](https://github.com/iamkun/dayjs/issues/1118) + +## [1.11.19](https://github.com/iamkun/dayjs/compare/v1.11.18...v1.11.19) (2025-10-31) + + +### Bug Fixes + +* added usage warnings for diff + updated unit tests ([#2948](https://github.com/iamkun/dayjs/issues/2948)) ([269a7a9](https://github.com/iamkun/dayjs/commit/269a7a9cf3649b7a4b328e771173701764a8480d)) +* dont instantiate regexes within ar locale functions to avoid performance overhead ([#2898](https://github.com/iamkun/dayjs/issues/2898)) ([af5e9f0](https://github.com/iamkun/dayjs/commit/af5e9f0e7649cbd1ecf707daab8303f2733f2563)) +* replace italian locale "un' ora fa" with "un'ora fa", add tests for it ([#2930](https://github.com/iamkun/dayjs/issues/2930)) ([9e9f76c](https://github.com/iamkun/dayjs/commit/9e9f76cf117fa834260b30193434bc4481b4b6be)) +* Updated Belarusian locale with relative time ([#2656](https://github.com/iamkun/dayjs/issues/2656)) ([1d8746c](https://github.com/iamkun/dayjs/commit/1d8746c23bd667bde80ee627a915301ebd69e1a2)) + +## [1.11.18](https://github.com/iamkun/dayjs/compare/v1.11.17...v1.11.18) (2025-08-30) + + +### Bug Fixes + +* error semantic-release dependency ([8cfb313](https://github.com/iamkun/dayjs/commit/8cfb31386d840d31e9655870f4d8c01592eb753a)) + +## [1.11.17](https://github.com/iamkun/dayjs/compare/v1.11.16...v1.11.17) (2025-08-29) + + +### Bug Fixes + +* [en-AU] locale use the same ordinal as moment ([#2878](https://github.com/iamkun/dayjs/issues/2878)) ([1b95ecd](https://github.com/iamkun/dayjs/commit/1b95ecd21d4feafe7ab113a2d48d7d8d93bb95c9)) + +## [1.11.16](https://github.com/iamkun/dayjs/compare/v1.11.15...v1.11.16) (2025-08-29) + + +### Bug Fixes + +* test release workflow (no code changes) ([c38c428](https://github.com/iamkun/dayjs/commit/c38c428a78c344699eff373adfc8c007bb3a514f)) + +## [1.11.15](https://github.com/iamkun/dayjs/compare/v1.11.14...v1.11.15) (2025-08-28) + + +### Bug Fixes + +* Fix misspellings in Irish or Irish Gaelic [ga] ([#2861](https://github.com/iamkun/dayjs/issues/2861)) ([9c14a42](https://github.com/iamkun/dayjs/commit/9c14a4245a8e764ee3260ff17a7ff48dfd09d279)) + +## [1.11.14](https://github.com/iamkun/dayjs/compare/v1.11.13...v1.11.14) (2025-08-27) + + +### Bug Fixes + +* .utcOffset(0, true) result and its clone are different bug ([#2505](https://github.com/iamkun/dayjs/issues/2505)) ([fefdcd4](https://github.com/iamkun/dayjs/commit/fefdcd4b6b807786f65139b6dd801e0014d7dc6f)) + +## [1.11.13](https://github.com/iamkun/dayjs/compare/v1.11.12...v1.11.13) (2024-08-20) + + +### Bug Fixes + +* customParseFormat supports Q quter / w ww weekOfYear ([#2705](https://github.com/iamkun/dayjs/issues/2705)) ([8ca74f1](https://github.com/iamkun/dayjs/commit/8ca74f178eff4bb4eb686676cf35fe7edb815536)) + +## [1.11.12](https://github.com/iamkun/dayjs/compare/v1.11.11...v1.11.12) (2024-07-18) + + +### Bug Fixes + +* Add NegativeYear Plugin support ([#2640](https://github.com/iamkun/dayjs/issues/2640)) ([6a42e0d](https://github.com/iamkun/dayjs/commit/6a42e0d7398639238f575d51287daaf4d495a2a3)) +* add UTC support to negativeYear plugin ([#2692](https://github.com/iamkun/dayjs/issues/2692)) ([f3ef705](https://github.com/iamkun/dayjs/commit/f3ef705613af83333fe132b470896a65e12f31b0)) +* Fix zero offset issue when use tz with locale ([#2532](https://github.com/iamkun/dayjs/issues/2532)) ([d0e6738](https://github.com/iamkun/dayjs/commit/d0e6738a66e1b65d3706aad2f9168ebb43d4f887)) +* Improve typing for min/max plugin ([#2573](https://github.com/iamkun/dayjs/issues/2573)) ([4fbe94a](https://github.com/iamkun/dayjs/commit/4fbe94aaba8c815a42cf4d23dabac918ec50e68c)) +* timezone plugin correct parse UTC tz ([#2693](https://github.com/iamkun/dayjs/issues/2693)) ([b575c81](https://github.com/iamkun/dayjs/commit/b575c81a8c9c85c7a0baf6f608a12f9d3ba95bd1)) + +## [1.11.11](https://github.com/iamkun/dayjs/compare/v1.11.10...v1.11.11) (2024-04-28) + + +### Bug Fixes + +* day of week type literal ([#2630](https://github.com/iamkun/dayjs/issues/2630)) ([f68d73e](https://github.com/iamkun/dayjs/commit/f68d73efe562fdedd9e288ecb0ce6565e602f507)) +* improve locale "zh-hk" format and meridiem ([#2419](https://github.com/iamkun/dayjs/issues/2419)) ([a947a51](https://github.com/iamkun/dayjs/commit/a947a5171aad5695eaf593bc95fe073de0f0894a)) +* Update 'da' locale to match correct first week of year ([#2592](https://github.com/iamkun/dayjs/issues/2592)) ([44b0936](https://github.com/iamkun/dayjs/commit/44b0936ad709212b63e48672d8b9c225e2c3b830)) +* update locale Bulgarian monthsShort Jan ([#2538](https://github.com/iamkun/dayjs/issues/2538)) ([f0c9a41](https://github.com/iamkun/dayjs/commit/f0c9a41c6ec91528f3790e442b0c5dff15a4e640)) + +## [1.11.10](https://github.com/iamkun/dayjs/compare/v1.11.9...v1.11.10) (2023-09-19) + + +### Bug Fixes + +* Add Korean Day of Month with ordinal ([#2395](https://github.com/iamkun/dayjs/issues/2395)) ([dd55ee2](https://github.com/iamkun/dayjs/commit/dd55ee2aadd1009242235e47d558bbf028827896)) +* change back fa locale to the Gregorian calendar equivalent ([#2411](https://github.com/iamkun/dayjs/issues/2411)) ([95e9458](https://github.com/iamkun/dayjs/commit/95e9458b221fe35e59ee4a160a5db247313a68fb)) +* duration plugin - MILLISECONDS_A_MONTH const calculation ([#2362](https://github.com/iamkun/dayjs/issues/2362)) ([f0a0b54](https://github.com/iamkun/dayjs/commit/f0a0b546b074b3b511c2319a1ce83d412894b91f)) +* duration plugin getter get result 0 instead of undefined ([#2369](https://github.com/iamkun/dayjs/issues/2369)) ([061aa7e](https://github.com/iamkun/dayjs/commit/061aa7ed6c31696974665fc9b11a74d30841ebed)) +* fix isDayjs check logic ([#2383](https://github.com/iamkun/dayjs/issues/2383)) ([5f3f878](https://github.com/iamkun/dayjs/commit/5f3f8786c796cd432fe6bcb6966a810daea89203)) +* fix timezone plugin to get correct locale setting ([#2420](https://github.com/iamkun/dayjs/issues/2420)) ([4f45012](https://github.com/iamkun/dayjs/commit/4f4501256fa1bc72128aae1d841bbd782df86aed)) +* **locale:** add meridiem in `ar` locale ([#2418](https://github.com/iamkun/dayjs/issues/2418)) ([361be5c](https://github.com/iamkun/dayjs/commit/361be5c7c628614ee833d710acbe154a598b904d)) +* round durations to millisecond precision for ISO string ([#2367](https://github.com/iamkun/dayjs/issues/2367)) ([890a17a](https://github.com/iamkun/dayjs/commit/890a17a8d8ddd43c7c8b806e3afc7b27f3288d27)) +* sub-second precisions need to be rounded at the seconds field to avoid adding floats ([#2377](https://github.com/iamkun/dayjs/issues/2377)) ([a9d7d03](https://github.com/iamkun/dayjs/commit/a9d7d0398d22ebd4bfc3812ca0134a97606d54d9)) +* update $x logic to avoid plugin error ([#2429](https://github.com/iamkun/dayjs/issues/2429)) ([2254635](https://github.com/iamkun/dayjs/commit/22546357f30924fcff3b3ffa14fd04be21f97a5e)) +* Update Slovenian locale for relative time ([#2396](https://github.com/iamkun/dayjs/issues/2396)) ([5470a15](https://github.com/iamkun/dayjs/commit/5470a15e437fac803797363063b24f3ba3bd5299)) +* update uzbek language translation ([#2327](https://github.com/iamkun/dayjs/issues/2327)) ([0a91056](https://github.com/iamkun/dayjs/commit/0a910564d76dc7c128da8e0d85d8e11ebdb5660b)) + +## [1.11.9](https://github.com/iamkun/dayjs/compare/v1.11.8...v1.11.9) (2023-07-01) + + +### Bug Fixes + +* Add null to min and max plugin return type ([#2355](https://github.com/iamkun/dayjs/issues/2355)) ([62d9042](https://github.com/iamkun/dayjs/commit/62d9042eb84b78d78324694ccbeaad1679d37e68)) +* check if null passed to objectSupport parser ([#2175](https://github.com/iamkun/dayjs/issues/2175)) ([013968f](https://github.com/iamkun/dayjs/commit/013968f609c32e2269df69b4dd1feb2e8e1e035a)) +* dayjs.diff improve performance ([#2244](https://github.com/iamkun/dayjs/issues/2244)) ([33c80e1](https://github.com/iamkun/dayjs/commit/33c80e14cf14f70ceb4f54639e266cd70a3c3996)) +* dayjs(null) throws error, not return dayjs object as invalid date ([#2334](https://github.com/iamkun/dayjs/issues/2334)) ([c79e2f5](https://github.com/iamkun/dayjs/commit/c79e2f5d03eef5660b1f13385b69c0c9668d2f98)) +* objectSupport plugin causes an error when null is passed to dayjs function (closes [#2277](https://github.com/iamkun/dayjs/issues/2277)) ([#2342](https://github.com/iamkun/dayjs/issues/2342)) ([89bf31c](https://github.com/iamkun/dayjs/commit/89bf31ce0a36dcfc892029dc019d85d3654cf5fb)) +* Optimize format method ([#2313](https://github.com/iamkun/dayjs/issues/2313)) ([1fe1b1d](https://github.com/iamkun/dayjs/commit/1fe1b1d9a214d3b8c9f267b432801424a493f1c4)) +* update Duration plugin add/subtract take into account days in month ([#2337](https://github.com/iamkun/dayjs/issues/2337)) ([3b1060f](https://github.com/iamkun/dayjs/commit/3b1060f92183ab3a3c49289c2d87fbdd34c1eacc)) +* update MinMax plugin 1. ignore the 'null' in args 2. return the only one arg ([#2330](https://github.com/iamkun/dayjs/issues/2330)) ([3c2c6ee](https://github.com/iamkun/dayjs/commit/3c2c6ee4db00bbb43a7a3bb0b56bc0d0f03daddc)) + +## [1.11.8](https://github.com/iamkun/dayjs/compare/v1.11.7...v1.11.8) (2023-06-02) + + +### Bug Fixes + +* .format add padding to 'YYYY' ([#2231](https://github.com/iamkun/dayjs/issues/2231)) ([00c223b](https://github.com/iamkun/dayjs/commit/00c223b7e92970d07557133994fcb225a6d4c960)) +* Added .valueOf method to Duration class ([#2226](https://github.com/iamkun/dayjs/issues/2226)) ([9b4fcfd](https://github.com/iamkun/dayjs/commit/9b4fcfde35b39693894be1821b6c7222fac98657)) +* timezone type mark `date` parameter as optional ([#2222](https://github.com/iamkun/dayjs/issues/2222)) ([b87aa0e](https://github.com/iamkun/dayjs/commit/b87aa0ed9a748c478a66ef48230cd1d6350d7b8a)) +* type file first parameter date is optional in isSame(), isBefore(), isAfter() ([#2272](https://github.com/iamkun/dayjs/issues/2272)) ([4d56f3e](https://github.com/iamkun/dayjs/commit/4d56f3eb2b3770879d60f824590bf1b32f237d47)) + +## [1.11.7](https://github.com/iamkun/dayjs/compare/v1.11.6...v1.11.7) (2022-12-06) + + +### Bug Fixes + +* Add locale (zh-tw) meridiem ([#2149](https://github.com/iamkun/dayjs/issues/2149)) ([1e9ba76](https://github.com/iamkun/dayjs/commit/1e9ba761ff4e3f2759106dfe1aa9054d5826451c)) +* update fa locale ([#2151](https://github.com/iamkun/dayjs/issues/2151)) ([1c26732](https://github.com/iamkun/dayjs/commit/1c267321a1a01b4947e1482bac67d67ebc7c3dfa)) + ## [1.11.6](https://github.com/iamkun/dayjs/compare/v1.11.5...v1.11.6) (2022-10-21) diff --git a/node_modules/dayjs/README.md b/node_modules/dayjs/README.md index dc6ca105..66844adb 100644 --- a/node_modules/dayjs/README.md +++ b/node_modules/dayjs/README.md @@ -1,17 +1,17 @@ -English | [简体中文](./docs/zh-cn/README.zh-CN.md) | [日本語](./docs/ja/README-ja.md) | [Português Brasileiro](./docs/pt-br/README-pt-br.md) | [한국어](./docs/ko/README-ko.md) | [Español (España)](./docs/es-es/README-es-es.md) | [Русский](./docs/ru/README-ru.md) | [Türkçe](./docs/tr/README-tr.md) | [සිංහල](./docs/si/README-si.md) +English | [简体中文](./docs/zh-cn/README.zh-CN.md) | [日本語](./docs/ja/README-ja.md) | [Português Brasileiro](./docs/pt-br/README-pt-br.md) | [한국어](./docs/ko/README-ko.md) | [Español (España)](./docs/es-es/README-es-es.md) | [Русский](./docs/ru/README-ru.md) | [Türkçe](./docs/tr/README-tr.md) | [සිංහල](./docs/si/README-si.md) | [עברית](./docs/he/README-he.md)

+ alt="Day.js" />

Fast 2kB alternative to Moment.js with the same modern API

- Gzip Size NPM Version - Build Status + Build Status Codecov - + +          - - + +          - + + +          - + + +          - + + +          - + + Instagram Story Viewer +          - + + Sayfone Cheap international calls + +         + + + +         + + BestKru + +         + + + +         + + Route Optimizer and Route Planner Software + +         + + + +         + + + +         + + + +         + +         + + + + ## Contributors @@ -130,10 +179,6 @@ Please give us a 💖 star 💖 to support us. Thank you. And thank you to all our backers! 🙏 - - - - ## License diff --git a/node_modules/dayjs/dayjs.min.js b/node_modules/dayjs/dayjs.min.js index ba16e658..cfcd9845 100644 --- a/node_modules/dayjs/dayjs.min.js +++ b/node_modules/dayjs/dayjs.min.js @@ -1 +1 @@ -!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).dayjs=e()}(this,(function(){"use strict";var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",f="month",h="quarter",c="year",d="date",l="Invalid Date",$=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return"["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},m=function(t,e,n){var r=String(t);return!r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0")},m:function t(e,n){if(e.date()1)return t(u[0])}else{var a=e.name;D[a]=e,i=a}return!r&&i&&(g=i),i||!r&&g},w=function(t,e){if(p(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},O=v;O.l=S,O.i=p,O.w=function(t,e){return w(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=S(t.locale,null,!0),this.parse(t)}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(O.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.$x=t.x||{},this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return O},m.isValid=function(){return!(this.$d.toString()===l)},m.isSame=function(t,e){var n=w(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return w(t)=e?t:""+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0")},m:function t(e,n){if(e.date()1)return t(u[0])}else{var a=e.name;D[a]=e,i=a}return!r&&i&&(g=i),i||!r&&g},O=function(t,e){if(S(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},b=v;b.l=w,b.i=S,b.w=function(t,e){return O(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=w(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[p]=!0}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(b.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return b},m.isValid=function(){return!(this.$d.toString()===l)},m.isSame=function(t,e){var n=O(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return O(t) 12 ? 'م' : 'ص'; + }, relativeTime: { future: 'بعد %s', past: 'منذ %s', @@ -49,14 +56,14 @@ var locale = { yy: '%d أعوام' }, preparse: function preparse(string) { - return string.replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) { + return string.replace(fromArabNumeralsRegex, function (match) { return numberMap[match]; - }).replace(/،/g, ','); + }).replace(fromArabComaRegex, ','); }, postformat: function postformat(string) { - return string.replace(/\d/g, function (match) { + return string.replace(toArabNumeralsRegex, function (match) { return symbolMap[match]; - }).replace(/,/g, '،'); + }).replace(toArabComaRegex, '،'); }, ordinal: function ordinal(n) { return n; diff --git a/node_modules/dayjs/esm/locale/be.js b/node_modules/dayjs/esm/locale/be.js index 5642e397..0c4c643c 100644 --- a/node_modules/dayjs/esm/locale/be.js +++ b/node_modules/dayjs/esm/locale/be.js @@ -1,16 +1,65 @@ // Belarusian [be] import dayjs from '../index'; +var monthFormat = 'студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня'.split('_'); +var monthStandalone = 'студзень_лютый_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань'.split('_'); +var monthShortFormat = 'студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж.'.split('_'); +var monthShortStandalone = 'студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж'.split('_'); +var MONTHS_IN_FORMAT = /D[oD]?(\[[^[\]]*\]|\s)+MMMM?/; + +function plural(word, num) { + var forms = word.split('_'); + return num % 10 === 1 && num % 100 !== 11 ? forms[0] : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ? forms[1] : forms[2]; // eslint-disable-line +} + +function relativeTimeWithPlural(number, withoutSuffix, key) { + var format = { + ss: withoutSuffix ? 'секунда_секунды_секунд' : 'секунду_секунды_секунд', + mm: withoutSuffix ? 'хвіліна_хвіліны_хвілін' : 'хвіліну_хвіліны_хвілін', + hh: withoutSuffix ? 'гадзіна_гадзіны_гадзін' : 'гадзіну_гадзіны_гадзін', + dd: 'дзень_дні_дзён', + MM: 'месяц_месяцы_месяцаў', + yy: 'год_гады_гадоў' + }; + + if (key === 'm') { + return withoutSuffix ? 'хвіліна' : 'хвіліну'; + } else if (key === 'h') { + return withoutSuffix ? 'гадзіна' : 'гадзіну'; + } + + return number + " " + plural(format[key], +number); +} + +var months = function months(dayjsInstance, format) { + if (MONTHS_IN_FORMAT.test(format)) { + return monthFormat[dayjsInstance.month()]; + } + + return monthStandalone[dayjsInstance.month()]; +}; + +months.s = monthStandalone; +months.f = monthFormat; + +var monthsShort = function monthsShort(dayjsInstance, format) { + if (MONTHS_IN_FORMAT.test(format)) { + return monthShortFormat[dayjsInstance.month()]; + } + + return monthShortStandalone[dayjsInstance.month()]; +}; + +monthsShort.s = monthShortStandalone; +monthsShort.f = monthShortFormat; var locale = { name: 'be', - weekdays: 'нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу'.split('_'), - months: 'студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня'.split('_'), + weekdays: 'нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота'.split('_'), + weekdaysShort: 'няд_пнд_аўт_сер_чцв_пят_суб'.split('_'), + weekdaysMin: 'нд_пн_аў_ср_чц_пт_сб'.split('_'), + months: months, + monthsShort: monthsShort, weekStart: 1, - weekdaysShort: 'нд_пн_ат_ср_чц_пт_сб'.split('_'), - monthsShort: 'студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж'.split('_'), - weekdaysMin: 'нд_пн_ат_ср_чц_пт_сб'.split('_'), - ordinal: function ordinal(n) { - return n; - }, + yearStart: 4, formats: { LT: 'HH:mm', LTS: 'HH:mm:ss', @@ -18,6 +67,35 @@ var locale = { LL: 'D MMMM YYYY г.', LLL: 'D MMMM YYYY г., HH:mm', LLLL: 'dddd, D MMMM YYYY г., HH:mm' + }, + relativeTime: { + future: 'праз %s', + past: '%s таму', + s: 'некалькі секунд', + m: relativeTimeWithPlural, + mm: relativeTimeWithPlural, + h: relativeTimeWithPlural, + hh: relativeTimeWithPlural, + d: 'дзень', + dd: relativeTimeWithPlural, + M: 'месяц', + MM: relativeTimeWithPlural, + y: 'год', + yy: relativeTimeWithPlural + }, + ordinal: function ordinal(n) { + return n; + }, + meridiem: function meridiem(hour) { + if (hour < 4) { + return 'ночы'; + } else if (hour < 12) { + return 'раніцы'; + } else if (hour < 17) { + return 'дня'; + } + + return 'вечара'; } }; dayjs.locale(locale, null, true); diff --git a/node_modules/dayjs/esm/locale/bg.js b/node_modules/dayjs/esm/locale/bg.js index e60a2a33..e4e2a34a 100644 --- a/node_modules/dayjs/esm/locale/bg.js +++ b/node_modules/dayjs/esm/locale/bg.js @@ -6,7 +6,7 @@ var locale = { weekdaysShort: 'нед_пон_вто_сря_чет_пет_съб'.split('_'), weekdaysMin: 'нд_пн_вт_ср_чт_пт_сб'.split('_'), months: 'януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември'.split('_'), - monthsShort: 'янр_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек'.split('_'), + monthsShort: 'яну_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек'.split('_'), weekStart: 1, ordinal: function ordinal(n) { var last2Digits = n % 100; diff --git a/node_modules/dayjs/esm/locale/da.js b/node_modules/dayjs/esm/locale/da.js index 38fd1347..9c2d0489 100644 --- a/node_modules/dayjs/esm/locale/da.js +++ b/node_modules/dayjs/esm/locale/da.js @@ -8,6 +8,7 @@ var locale = { months: 'januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december'.split('_'), monthsShort: 'jan._feb._mar._apr._maj_juni_juli_aug._sept._okt._nov._dec.'.split('_'), weekStart: 1, + yearStart: 4, ordinal: function ordinal(n) { return n + "."; }, diff --git a/node_modules/dayjs/esm/locale/en-au.js b/node_modules/dayjs/esm/locale/en-au.js index f9dde034..fe54eaa1 100644 --- a/node_modules/dayjs/esm/locale/en-au.js +++ b/node_modules/dayjs/esm/locale/en-au.js @@ -8,9 +8,6 @@ var locale = { weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), - ordinal: function ordinal(n) { - return n; - }, formats: { LT: 'h:mm A', LTS: 'h:mm:ss A', @@ -33,6 +30,11 @@ var locale = { MM: '%d months', y: 'a year', yy: '%d years' + }, + ordinal: function ordinal(n) { + var s = ['th', 'st', 'nd', 'rd']; + var v = n % 100; + return "[" + n + (s[(v - 20) % 10] || s[v] || s[0]) + "]"; } }; dayjs.locale(locale, null, true); diff --git a/node_modules/dayjs/esm/locale/ga.js b/node_modules/dayjs/esm/locale/ga.js index 8cdfa9f1..3cf79a05 100644 --- a/node_modules/dayjs/esm/locale/ga.js +++ b/node_modules/dayjs/esm/locale/ga.js @@ -2,12 +2,12 @@ import dayjs from '../index'; var locale = { name: 'ga', - weekdays: 'Dé Domhnaigh_Dé Luain_Dé Máirt_Dé Céadaoin_Déardaoin_Dé hAoine_Dé Satharn'.split('_'), - months: 'Eanáir_Feabhra_Márta_Aibreán_Bealtaine_Méitheamh_Iúil_Lúnasa_Meán Fómhair_Deaireadh Fómhair_Samhain_Nollaig'.split('_'), + weekdays: 'Dé Domhnaigh_Dé Luain_Dé Máirt_Dé Céadaoin_Déardaoin_Dé hAoine_Dé Sathairn'.split('_'), + months: 'Eanáir_Feabhra_Márta_Aibreán_Bealtaine_Meitheamh_Iúil_Lúnasa_Meán Fómhair_Deireadh Fómhair_Samhain_Nollaig'.split('_'), weekStart: 1, - weekdaysShort: 'Dom_Lua_Mái_Céa_Déa_hAo_Sat'.split('_'), - monthsShort: 'Eaná_Feab_Márt_Aibr_Beal_Méit_Iúil_Lúna_Meán_Deai_Samh_Noll'.split('_'), - weekdaysMin: 'Do_Lu_Má_Ce_Dé_hA_Sa'.split('_'), + weekdaysShort: 'Dom_Lua_Mái_Céa_Déa_Aoi_Sat'.split('_'), + monthsShort: 'Ean_Fea_Már_Aib_Beal_Mei_Iúil_Lún_MFómh_DFómh_Samh_Noll'.split('_'), + weekdaysMin: 'Do_Lu_Má_Cé_Dé_Ao_Sa'.split('_'), ordinal: function ordinal(n) { return n; }, diff --git a/node_modules/dayjs/esm/locale/it.js b/node_modules/dayjs/esm/locale/it.js index e8d24905..54ba5852 100644 --- a/node_modules/dayjs/esm/locale/it.js +++ b/node_modules/dayjs/esm/locale/it.js @@ -22,7 +22,7 @@ var locale = { s: 'qualche secondo', m: 'un minuto', mm: '%d minuti', - h: 'un\' ora', + h: 'un\'ora', hh: '%d ore', d: 'un giorno', dd: '%d giorni', diff --git a/node_modules/dayjs/esm/locale/km.js b/node_modules/dayjs/esm/locale/km.js index 7fd185ba..ba9c81e3 100644 --- a/node_modules/dayjs/esm/locale/km.js +++ b/node_modules/dayjs/esm/locale/km.js @@ -33,6 +33,9 @@ var locale = { MM: '%d ខែ', y: 'មួយឆ្នាំ', yy: '%d ឆ្នាំ' + }, + meridiem: function meridiem(hour) { + return hour > 12 ? 'ល្ងាច' : 'ព្រឹក'; } }; dayjs.locale(locale, null, true); diff --git a/node_modules/dayjs/esm/locale/ko.js b/node_modules/dayjs/esm/locale/ko.js index 1caff278..cfad49de 100644 --- a/node_modules/dayjs/esm/locale/ko.js +++ b/node_modules/dayjs/esm/locale/ko.js @@ -8,7 +8,7 @@ var locale = { months: '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'), monthsShort: '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'), ordinal: function ordinal(n) { - return n; + return n + "\uC77C"; }, formats: { LT: 'A h:mm', diff --git a/node_modules/dayjs/esm/locale/sl.js b/node_modules/dayjs/esm/locale/sl.js index cfbe83da..e3c58393 100644 --- a/node_modules/dayjs/esm/locale/sl.js +++ b/node_modules/dayjs/esm/locale/sl.js @@ -1,5 +1,106 @@ // Slovenian [sl] import dayjs from '../index'; + +function dual(n) { + return n % 100 == 2; // eslint-disable-line +} + +function threeFour(n) { + return n % 100 == 3 || n % 100 == 4; // eslint-disable-line +} +/* eslint-disable */ + + +function translate(number, withoutSuffix, key, isFuture) { + var result = number + " "; + + switch (key) { + case 's': + // a few seconds / in a few seconds / a few seconds ago + return withoutSuffix || isFuture ? 'nekaj sekund' : 'nekaj sekundami'; + + case 'm': + // a minute / in a minute / a minute ago + return withoutSuffix ? 'ena minuta' : 'eno minuto'; + + case 'mm': + // 9 minutes / in 9 minutes / 9 minutes ago + if (dual(number)) { + return result + (withoutSuffix || isFuture ? 'minuti' : 'minutama'); + } + + if (threeFour(number)) { + return result + (withoutSuffix || isFuture ? 'minute' : 'minutami'); + } + + return result + (withoutSuffix || isFuture ? 'minut' : 'minutami'); + + case 'h': + // an hour / in an hour / an hour ago + return withoutSuffix ? 'ena ura' : isFuture ? 'eno uro' : 'eno uro'; + + case 'hh': + // 9 hours / in 9 hours / 9 hours ago + if (dual(number)) { + return result + (withoutSuffix || isFuture ? 'uri' : 'urama'); + } + + if (threeFour(number)) { + return result + (withoutSuffix || isFuture ? 'ure' : 'urami'); + } + + return result + (withoutSuffix || isFuture ? 'ur' : 'urami'); + + case 'd': + // a day / in a day / a day ago + return withoutSuffix || isFuture ? 'en dan' : 'enim dnem'; + + case 'dd': + // 9 days / in 9 days / 9 days ago + if (dual(number)) { + return result + (withoutSuffix || isFuture ? 'dneva' : 'dnevoma'); + } + + return result + (withoutSuffix || isFuture ? 'dni' : 'dnevi'); + + case 'M': + // a month / in a month / a month ago + return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem'; + + case 'MM': + // 9 months / in 9 months / 9 months ago + if (dual(number)) { + // 2 minutes / in 2 minutes + return result + (withoutSuffix || isFuture ? 'meseca' : 'mesecema'); + } + + if (threeFour(number)) { + return result + (withoutSuffix || isFuture ? 'mesece' : 'meseci'); + } + + return result + (withoutSuffix || isFuture ? 'mesecev' : 'meseci'); + + case 'y': + // a year / in a year / a year ago + return withoutSuffix || isFuture ? 'eno leto' : 'enim letom'; + + case 'yy': + // 9 years / in 9 years / 9 years ago + if (dual(number)) { + // 2 minutes / in 2 minutes + return result + (withoutSuffix || isFuture ? 'leti' : 'letoma'); + } + + if (threeFour(number)) { + return result + (withoutSuffix || isFuture ? 'leta' : 'leti'); + } + + return result + (withoutSuffix || isFuture ? 'let' : 'leti'); + } +} +/* eslint-enable */ + + var locale = { name: 'sl', weekdays: 'nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota'.split('_'), @@ -17,22 +118,23 @@ var locale = { L: 'DD.MM.YYYY', LL: 'D. MMMM YYYY', LLL: 'D. MMMM YYYY H:mm', - LLLL: 'dddd, D. MMMM YYYY H:mm' + LLLL: 'dddd, D. MMMM YYYY H:mm', + l: 'D. M. YYYY' }, relativeTime: { future: 'čez %s', past: 'pred %s', - s: 'nekaj sekund', - m: 'minuta', - mm: '%d minut', - h: 'ura', - hh: '%d ur', - d: 'dan', - dd: '%d dni', - M: 'mesec', - MM: '%d mesecev', - y: 'leto', - yy: '%d let' + s: translate, + m: translate, + mm: translate, + h: translate, + hh: translate, + d: translate, + dd: translate, + M: translate, + MM: translate, + y: translate, + yy: translate } }; dayjs.locale(locale, null, true); diff --git a/node_modules/dayjs/esm/locale/uz-latn.js b/node_modules/dayjs/esm/locale/uz-latn.js index 4dc2108a..befdfee4 100644 --- a/node_modules/dayjs/esm/locale/uz-latn.js +++ b/node_modules/dayjs/esm/locale/uz-latn.js @@ -21,7 +21,7 @@ var locale = { }, relativeTime: { future: 'Yaqin %s ichida', - past: 'Bir necha %s oldin', + past: '%s oldin', s: 'soniya', m: 'bir daqiqa', mm: '%d daqiqa', diff --git a/node_modules/dayjs/esm/locale/uz.js b/node_modules/dayjs/esm/locale/uz.js index 459fd588..44332637 100644 --- a/node_modules/dayjs/esm/locale/uz.js +++ b/node_modules/dayjs/esm/locale/uz.js @@ -21,7 +21,7 @@ var locale = { }, relativeTime: { future: 'Якин %s ичида', - past: 'Бир неча %s олдин', + past: '%s олдин', s: 'фурсат', m: 'бир дакика', mm: '%d дакика', diff --git a/node_modules/dayjs/esm/locale/zh-hk.js b/node_modules/dayjs/esm/locale/zh-hk.js index 38967475..8ada9a01 100644 --- a/node_modules/dayjs/esm/locale/zh-hk.js +++ b/node_modules/dayjs/esm/locale/zh-hk.js @@ -22,7 +22,11 @@ var locale = { L: 'YYYY/MM/DD', LL: 'YYYY年M月D日', LLL: 'YYYY年M月D日 HH:mm', - LLLL: 'YYYY年M月D日dddd HH:mm' + LLLL: 'YYYY年M月D日dddd HH:mm', + l: 'YYYY/M/D', + ll: 'YYYY年M月D日', + lll: 'YYYY年M月D日 HH:mm', + llll: 'YYYY年M月D日dddd HH:mm' }, relativeTime: { future: '%s內', @@ -38,6 +42,23 @@ var locale = { MM: '%d 個月', y: '一年', yy: '%d 年' + }, + meridiem: function meridiem(hour, minute) { + var hm = hour * 100 + minute; + + if (hm < 600) { + return '凌晨'; + } else if (hm < 900) { + return '早上'; + } else if (hm < 1100) { + return '上午'; + } else if (hm < 1300) { + return '中午'; + } else if (hm < 1800) { + return '下午'; + } + + return '晚上'; } }; dayjs.locale(locale, null, true); diff --git a/node_modules/dayjs/esm/locale/zh-tw.js b/node_modules/dayjs/esm/locale/zh-tw.js index 2d6b980a..ada89ee4 100644 --- a/node_modules/dayjs/esm/locale/zh-tw.js +++ b/node_modules/dayjs/esm/locale/zh-tw.js @@ -42,6 +42,23 @@ var locale = { MM: '%d 個月', y: '1 年', yy: '%d 年' + }, + meridiem: function meridiem(hour, minute) { + var hm = hour * 100 + minute; + + if (hm < 600) { + return '凌晨'; + } else if (hm < 900) { + return '早上'; + } else if (hm < 1100) { + return '上午'; + } else if (hm < 1300) { + return '中午'; + } else if (hm < 1800) { + return '下午'; + } + + return '晚上'; } }; dayjs.locale(locale, null, true); diff --git a/node_modules/dayjs/esm/plugin/customParseFormat/index.js b/node_modules/dayjs/esm/plugin/customParseFormat/index.js index 1fd59368..b5363f2a 100644 --- a/node_modules/dayjs/esm/plugin/customParseFormat/index.js +++ b/node_modules/dayjs/esm/plugin/customParseFormat/index.js @@ -1,5 +1,5 @@ import { u } from '../localizedFormat/utils'; -var formattingTokens = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g; +var formattingTokens = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g; var match1 = /\d/; // 0 - 9 var match2 = /\d\d/; // 00 - 99 @@ -74,6 +74,9 @@ var expressions = { a: [matchWord, function (input) { this.afternoon = meridiemMatch(input, true); }], + Q: [match1, function (input) { + this.month = (input - 1) * 3 + 1; + }], S: [match1, function (input) { this.milliseconds = +input * 100; }], @@ -108,6 +111,8 @@ var expressions = { } } }], + w: [match1to2, addInput('week')], + ww: [match2, addInput('week')], M: [match1to2, addInput('month')], MM: [match2, addInput('month')], MMM: [matchWord, function (input) { @@ -209,7 +214,7 @@ function makeParser(format) { }; } -var parseFormattedInput = function parseFormattedInput(input, format, utc) { +var parseFormattedInput = function parseFormattedInput(input, format, utc, dayjs) { try { if (['x', 'X'].indexOf(format) > -1) return new Date((format === 'X' ? 1000 : 1) * input); var parser = makeParser(format); @@ -222,7 +227,8 @@ var parseFormattedInput = function parseFormattedInput(input, format, utc) { minutes = _parser2.minutes, seconds = _parser2.seconds, milliseconds = _parser2.milliseconds, - zone = _parser2.zone; + zone = _parser2.zone, + week = _parser2.week; var now = new Date(); var d = day || (!year && !month ? now.getDate() : 1); @@ -246,7 +252,14 @@ var parseFormattedInput = function parseFormattedInput(input, format, utc) { return new Date(Date.UTC(y, M, d, h, m, s, ms)); } - return new Date(y, M, d, h, m, s, ms); + var newDate; + newDate = new Date(y, M, d, h, m, s, ms); + + if (week) { + newDate = dayjs(newDate).week(week).toDate(); + } + + return newDate; } catch (e) { return new Date(''); // Invalid Date } @@ -285,7 +298,7 @@ export default (function (o, C, d) { locale = d.Ls[pl]; } - this.$d = parseFormattedInput(date, format, utc); + this.$d = parseFormattedInput(date, format, utc, d); this.init(); if (pl && pl !== true) this.$L = this.locale(pl).$L; // use != to treat // input number 1410715640579 and format string '1410715640579' equal diff --git a/node_modules/dayjs/esm/plugin/devHelper/index.js b/node_modules/dayjs/esm/plugin/devHelper/index.js index 9e2af827..b29cacdb 100644 --- a/node_modules/dayjs/esm/plugin/devHelper/index.js +++ b/node_modules/dayjs/esm/plugin/devHelper/index.js @@ -34,5 +34,17 @@ export default (function (o, c, d) { return oldLocale(preset, object, isLocal); }; + + var oldDiff = proto.diff; + + proto.diff = function (date, unit, _float) { + var isInvalidDate = !date || !d(date).isValid(); + + if (isInvalidDate) { + console.warn('Invalid usage: diff() requires a valid comparison date as the first argument. https://day.js.org/docs/en/display/difference'); + } + + return oldDiff.call(this, date, unit, _float); + }; } }); \ No newline at end of file diff --git a/node_modules/dayjs/esm/plugin/duration/index.js b/node_modules/dayjs/esm/plugin/duration/index.js index 43a61554..16956a18 100644 --- a/node_modules/dayjs/esm/plugin/duration/index.js +++ b/node_modules/dayjs/esm/plugin/duration/index.js @@ -1,7 +1,8 @@ -import { MILLISECONDS_A_DAY, MILLISECONDS_A_HOUR, MILLISECONDS_A_MINUTE, MILLISECONDS_A_SECOND, MILLISECONDS_A_WEEK, REGEX_FORMAT } from '../../constant'; +import { MILLISECONDS_A_DAY, MILLISECONDS_A_HOUR, MILLISECONDS_A_MINUTE, MILLISECONDS_A_SECOND, MILLISECONDS_A_WEEK } from '../../constant'; var MILLISECONDS_A_YEAR = MILLISECONDS_A_DAY * 365; -var MILLISECONDS_A_MONTH = MILLISECONDS_A_DAY * 30; -var durationRegex = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/; +var MILLISECONDS_A_MONTH = MILLISECONDS_A_YEAR / 12; +var DURATION_REGEX_PARSE = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/; +var DURATION_REGEX_FORMAT = /\[([^\]]+)]|YYYY|YY|Y|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS/g; var unitToMS = { years: MILLISECONDS_A_YEAR, months: MILLISECONDS_A_MONTH, @@ -94,7 +95,7 @@ var Duration = /*#__PURE__*/function () { } if (typeof input === 'string') { - var d = input.match(durationRegex); + var d = input.match(DURATION_REGEX_PARSE); if (d) { var properties = d.slice(2); @@ -159,6 +160,7 @@ var Duration = /*#__PURE__*/function () { if (this.$d.milliseconds) { seconds += this.$d.milliseconds / 1000; + seconds = Math.round(seconds * 1000) / 1000; } var S = getNumberUnitFormat(seconds, 'S'); @@ -191,7 +193,7 @@ var Duration = /*#__PURE__*/function () { ss: $u.s(this.$d.seconds, 2, '0'), SSS: $u.s(this.$d.milliseconds, 3, '0') }; - return str.replace(REGEX_FORMAT, function (match, $1) { + return str.replace(DURATION_REGEX_FORMAT, function (match, $1) { return $1 || String(matches[match]); }); }; @@ -212,7 +214,7 @@ var Duration = /*#__PURE__*/function () { base = this.$d[pUnit]; } - return base === 0 ? 0 : base; // a === 0 will be true on both 0 and -0 + return base || 0; // a === 0 will be true on both 0 and -0 }; _proto.add = function add(input, unit, isSubtract) { @@ -247,6 +249,10 @@ var Duration = /*#__PURE__*/function () { return $d().add(this.$ms, 'ms').locale(this.$l).fromNow(!withSuffix); }; + _proto.valueOf = function valueOf() { + return this.asMilliseconds(); + }; + _proto.milliseconds = function milliseconds() { return this.get('milliseconds'); }; @@ -314,6 +320,10 @@ var Duration = /*#__PURE__*/function () { return Duration; }(); +var manipulateDuration = function manipulateDuration(date, duration, k) { + return date.add(duration.years() * k, 'y').add(duration.months() * k, 'M').add(duration.days() * k, 'd').add(duration.hours() * k, 'h').add(duration.minutes() * k, 'm').add(duration.seconds() * k, 's').add(duration.milliseconds() * k, 'ms'); +}; + export default (function (option, Dayjs, dayjs) { $d = dayjs; $u = dayjs().$utils(); @@ -330,12 +340,18 @@ export default (function (option, Dayjs, dayjs) { var oldSubtract = Dayjs.prototype.subtract; Dayjs.prototype.add = function (value, unit) { - if (isDuration(value)) value = value.asMilliseconds(); + if (isDuration(value)) { + return manipulateDuration(this, value, 1); + } + return oldAdd.bind(this)(value, unit); }; Dayjs.prototype.subtract = function (value, unit) { - if (isDuration(value)) value = value.asMilliseconds(); + if (isDuration(value)) { + return manipulateDuration(this, value, -1); + } + return oldSubtract.bind(this)(value, unit); }; }); \ No newline at end of file diff --git a/node_modules/dayjs/esm/plugin/isSameOrAfter/index.d.ts b/node_modules/dayjs/esm/plugin/isSameOrAfter/index.d.ts index b4bc2708..7b6d2396 100644 --- a/node_modules/dayjs/esm/plugin/isSameOrAfter/index.d.ts +++ b/node_modules/dayjs/esm/plugin/isSameOrAfter/index.d.ts @@ -5,6 +5,6 @@ export = plugin declare module 'dayjs/esm' { interface Dayjs { - isSameOrAfter(date: ConfigType, unit?: OpUnitType): boolean + isSameOrAfter(date?: ConfigType, unit?: OpUnitType): boolean } } diff --git a/node_modules/dayjs/esm/plugin/isSameOrBefore/index.d.ts b/node_modules/dayjs/esm/plugin/isSameOrBefore/index.d.ts index c0a6c94b..7ec009f4 100644 --- a/node_modules/dayjs/esm/plugin/isSameOrBefore/index.d.ts +++ b/node_modules/dayjs/esm/plugin/isSameOrBefore/index.d.ts @@ -5,6 +5,6 @@ export = plugin declare module 'dayjs/esm' { interface Dayjs { - isSameOrBefore(date: ConfigType, unit?: OpUnitType): boolean + isSameOrBefore(date?: ConfigType, unit?: OpUnitType): boolean } } diff --git a/node_modules/dayjs/esm/plugin/isoWeek/index.d.ts b/node_modules/dayjs/esm/plugin/isoWeek/index.d.ts index e3f83cfd..6e6a75a7 100644 --- a/node_modules/dayjs/esm/plugin/isoWeek/index.d.ts +++ b/node_modules/dayjs/esm/plugin/isoWeek/index.d.ts @@ -18,10 +18,10 @@ declare module 'dayjs/esm' { endOf(unit: ISOUnitType): Dayjs - isSame(date: ConfigType, unit?: ISOUnitType): boolean + isSame(date?: ConfigType, unit?: ISOUnitType): boolean - isBefore(date: ConfigType, unit?: ISOUnitType): boolean + isBefore(date?: ConfigType, unit?: ISOUnitType): boolean - isAfter(date: ConfigType, unit?: ISOUnitType): boolean + isAfter(date?: ConfigType, unit?: ISOUnitType): boolean } } diff --git a/node_modules/dayjs/esm/plugin/minMax/index.d.ts b/node_modules/dayjs/esm/plugin/minMax/index.d.ts index b2b2712f..9b2fb3f3 100644 --- a/node_modules/dayjs/esm/plugin/minMax/index.d.ts +++ b/node_modules/dayjs/esm/plugin/minMax/index.d.ts @@ -4,8 +4,19 @@ declare const plugin: PluginFunc export = plugin declare module 'dayjs/esm' { - export function max(dayjs: Dayjs[]): Dayjs - export function max(...dayjs: Dayjs[]): Dayjs - export function min(dayjs: Dayjs[]): Dayjs - export function min(...dayjs: Dayjs[]): Dayjs + export function max(dayjs: [Dayjs, ...Dayjs[]]): Dayjs + export function max(noDates: never[]): null + export function max(maybeDates: Dayjs[]): Dayjs | null + + export function max(...dayjs: [Dayjs, ...Dayjs[]]): Dayjs + export function max(...noDates: never[]): null + export function max(...maybeDates: Dayjs[]): Dayjs | null + + export function min(dayjs: [Dayjs, ...Dayjs[]]): Dayjs + export function min(noDates: never[]): null + export function min(maybeDates: Dayjs[]): Dayjs | null + + export function min(...dayjs: [Dayjs, ...Dayjs[]]): Dayjs + export function min(...noDates: never[]): null + export function min(...maybeDates: Dayjs[]): Dayjs | null } diff --git a/node_modules/dayjs/esm/plugin/minMax/index.js b/node_modules/dayjs/esm/plugin/minMax/index.js index 750bbbf2..0fd68e9c 100644 --- a/node_modules/dayjs/esm/plugin/minMax/index.js +++ b/node_modules/dayjs/esm/plugin/minMax/index.js @@ -1,6 +1,6 @@ export default (function (o, c, d) { var sortBy = function sortBy(method, dates) { - if (!dates || !dates.length || !dates[0] || dates.length === 1 && !dates[0].length) { + if (!dates || !dates.length || dates.length === 1 && !dates[0] || dates.length === 1 && Array.isArray(dates[0]) && !dates[0].length) { return null; } @@ -9,6 +9,9 @@ export default (function (o, c, d) { dates = _dates[0]; } + dates = dates.filter(function (date) { + return date; + }); var result; var _dates2 = dates; result = _dates2[0]; diff --git a/node_modules/dayjs/esm/plugin/negativeYear/index.d.ts b/node_modules/dayjs/esm/plugin/negativeYear/index.d.ts new file mode 100644 index 00000000..8112bdc1 --- /dev/null +++ b/node_modules/dayjs/esm/plugin/negativeYear/index.d.ts @@ -0,0 +1,4 @@ +import {PluginFunc} from 'dayjs/esm' + +declare const plugin: PluginFunc +export = plugin \ No newline at end of file diff --git a/node_modules/dayjs/esm/plugin/negativeYear/index.js b/node_modules/dayjs/esm/plugin/negativeYear/index.js new file mode 100644 index 00000000..5b83af39 --- /dev/null +++ b/node_modules/dayjs/esm/plugin/negativeYear/index.js @@ -0,0 +1,36 @@ +export default (function (_, c, dayjs) { + var proto = c.prototype; + + var parseDate = function parseDate(cfg) { + var date = cfg.date, + utc = cfg.utc; + + if (typeof date === 'string' && date.charAt(0) === '-') { + var normalData = date.slice(1); + var newDate = dayjs(normalData); + + if (utc) { + newDate = dayjs.utc(normalData); + } else { + newDate = dayjs(normalData); + } + + var fullYear = newDate.year(); + + if (date.indexOf("-" + fullYear) !== -1) { + return dayjs(newDate).subtract(fullYear * 2, 'year').toDate(); + } + + return date; + } + + return date; + }; + + var oldParse = proto.parse; + + proto.parse = function (cfg) { + cfg.date = parseDate.bind(this)(cfg); + oldParse.bind(this)(cfg); + }; +}); \ No newline at end of file diff --git a/node_modules/dayjs/esm/plugin/objectSupport/index.js b/node_modules/dayjs/esm/plugin/objectSupport/index.js index 9f81c749..61636e76 100644 --- a/node_modules/dayjs/esm/plugin/objectSupport/index.js +++ b/node_modules/dayjs/esm/plugin/objectSupport/index.js @@ -2,7 +2,7 @@ export default (function (o, c, dayjs) { var proto = c.prototype; var isObject = function isObject(obj) { - return !(obj instanceof Date) && !(obj instanceof Array) && !proto.$utils().u(obj) && obj.constructor.name === 'Object'; + return obj !== null && !(obj instanceof Date) && !(obj instanceof Array) && !proto.$utils().u(obj) && obj.constructor.name === 'Object'; }; var prettyUnit = function prettyUnit(u) { diff --git a/node_modules/dayjs/esm/plugin/quarterOfYear/index.d.ts b/node_modules/dayjs/esm/plugin/quarterOfYear/index.d.ts index c75dcfca..37691c11 100644 --- a/node_modules/dayjs/esm/plugin/quarterOfYear/index.d.ts +++ b/node_modules/dayjs/esm/plugin/quarterOfYear/index.d.ts @@ -17,10 +17,10 @@ declare module 'dayjs/esm' { endOf(unit: QUnitType | OpUnitType): Dayjs - isSame(date: ConfigType, unit?: QUnitType): boolean + isSame(date?: ConfigType, unit?: QUnitType): boolean - isBefore(date: ConfigType, unit?: QUnitType): boolean + isBefore(date?: ConfigType, unit?: QUnitType): boolean - isAfter(date: ConfigType, unit?: QUnitType): boolean + isAfter(date?: ConfigType, unit?: QUnitType): boolean } } diff --git a/node_modules/dayjs/esm/plugin/timezone/index.d.ts b/node_modules/dayjs/esm/plugin/timezone/index.d.ts index 8d903590..5a2d9f2d 100644 --- a/node_modules/dayjs/esm/plugin/timezone/index.d.ts +++ b/node_modules/dayjs/esm/plugin/timezone/index.d.ts @@ -10,7 +10,7 @@ declare module 'dayjs/esm' { } interface DayjsTimezone { - (date: ConfigType, timezone?: string): Dayjs + (date?: ConfigType, timezone?: string): Dayjs (date: ConfigType, format: string, timezone?: string): Dayjs guess(): string setDefault(timezone?: string): void diff --git a/node_modules/dayjs/esm/plugin/timezone/index.js b/node_modules/dayjs/esm/plugin/timezone/index.js index ca76720f..07e286f1 100644 --- a/node_modules/dayjs/esm/plugin/timezone/index.js +++ b/node_modules/dayjs/esm/plugin/timezone/index.js @@ -114,17 +114,28 @@ export default (function (o, c, d) { timezone = defaultTimezone; } + if (!this.isValid()) return this; var oldOffset = this.utcOffset(); var date = this.toDate(); var target = date.toLocaleString('en-US', { timeZone: timezone }); - var diff = Math.round((date - new Date(target)) / 1000 / 60); - var ins = d(target).$set(MS, this.$ms).utcOffset(-Math.round(date.getTimezoneOffset() / 15) * 15 - diff, true); - - if (keepLocalTime) { - var newOffset = ins.utcOffset(); - ins = ins.add(oldOffset - newOffset, MIN); + var offset = tzOffset(+date, timezone); + var isUTC = !Number(offset); + var ins; + + if (isUTC) { + // if utcOffset is 0, turn it to UTC mode + ins = this.utcOffset(0, keepLocalTime); + } else { + ins = d(target, { + locale: this.$L + }).$set(MS, this.$ms).utcOffset(offset, true); + + if (keepLocalTime) { + var newOffset = ins.utcOffset(); + ins = ins.add(oldOffset - newOffset, MIN); + } } ins.$x.$timezone = timezone; @@ -149,7 +160,9 @@ export default (function (o, c, d) { return oldStartOf.call(this, units, startOf); } - var withoutTz = d(this.format('YYYY-MM-DD HH:mm:ss:SSS')); + var withoutTz = d(this.format('YYYY-MM-DD HH:mm:ss:SSS'), { + locale: this.$L + }); var startOfWithoutTz = oldStartOf.call(withoutTz, units, startOf); return startOfWithoutTz.tz(this.$x.$timezone, true); }; @@ -166,6 +179,13 @@ export default (function (o, c, d) { var localTs = d.utc(input, parseFormat).valueOf(); + if (Number.isNaN(localTs)) { + var _ins = d(NaN); + + _ins.$x.$timezone = timezone; + return _ins; + } + var _fixOffset = fixOffset(localTs, previousOffset, timezone), targetTs = _fixOffset[0], targetOffset = _fixOffset[1]; diff --git a/node_modules/dayjs/esm/plugin/updateLocale/index.js b/node_modules/dayjs/esm/plugin/updateLocale/index.js index 1b9965cd..c9b21263 100644 --- a/node_modules/dayjs/esm/plugin/updateLocale/index.js +++ b/node_modules/dayjs/esm/plugin/updateLocale/index.js @@ -1,3 +1,5 @@ +function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } + export default (function (option, Dayjs, dayjs) { dayjs.updateLocale = function (locale, customConfig) { var localeList = dayjs.Ls; @@ -5,7 +7,11 @@ export default (function (option, Dayjs, dayjs) { if (!localeConfig) return; var customConfigKeys = customConfig ? Object.keys(customConfig) : []; customConfigKeys.forEach(function (c) { - localeConfig[c] = customConfig[c]; + if (localeConfig[c] && customConfig[c] && typeof localeConfig[c] === 'object' && typeof customConfig[c] === 'object' && !Array.isArray(localeConfig[c])) { + localeConfig[c] = _extends({}, localeConfig[c], customConfig[c]); + } else { + localeConfig[c] = customConfig[c]; + } }); return localeConfig; // eslint-disable-line consistent-return }; diff --git a/node_modules/dayjs/esm/plugin/utc/index.js b/node_modules/dayjs/esm/plugin/utc/index.js index a8a05f56..92241431 100644 --- a/node_modules/dayjs/esm/plugin/utc/index.js +++ b/node_modules/dayjs/esm/plugin/utc/index.js @@ -119,23 +119,23 @@ export default (function (option, Dayjs, dayjs) { } var offset = Math.abs(input) <= 16 ? input * 60 : input; - var ins = this; - if (keepLocalTime) { - ins.$offset = offset; - ins.$u = input === 0; - return ins; + if (offset === 0) { + return this.utc(keepLocalTime); } - if (input !== 0) { - var localTimezoneOffset = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset(); - ins = this.local().add(offset + localTimezoneOffset, MIN); + var ins = this.clone(); + + if (keepLocalTime) { ins.$offset = offset; - ins.$x.$localOffset = localTimezoneOffset; - } else { - ins = this.utc(); + ins.$u = false; + return ins; } + var localTimezoneOffset = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset(); + ins = this.local().add(offset + localTimezoneOffset, MIN); + ins.$offset = offset; + ins.$x.$localOffset = localTimezoneOffset; return ins; }; diff --git a/node_modules/dayjs/index.d.ts b/node_modules/dayjs/index.d.ts index 1ac6c8da..cd159dca 100644 --- a/node_modules/dayjs/index.d.ts +++ b/node_modules/dayjs/index.d.ts @@ -114,7 +114,7 @@ declare namespace dayjs { * ``` * Docs: https://day.js.org/docs/en/get-set/day */ - day(): number + day(): 0 | 1 | 2 | 3 | 4 | 5 | 6 /** * Set the day of the week. * @@ -382,7 +382,7 @@ declare namespace dayjs { * * Docs: https://day.js.org/docs/en/query/is-before */ - isBefore(date: ConfigType, unit?: OpUnitType): boolean + isBefore(date?: ConfigType, unit?: OpUnitType): boolean /** * This indicates whether the Day.js object is the same as the other supplied date-time. * ``` @@ -394,7 +394,7 @@ declare namespace dayjs { * ``` * Docs: https://day.js.org/docs/en/query/is-same */ - isSame(date: ConfigType, unit?: OpUnitType): boolean + isSame(date?: ConfigType, unit?: OpUnitType): boolean /** * This indicates whether the Day.js object is after the other supplied date-time. * ``` @@ -408,7 +408,7 @@ declare namespace dayjs { * * Docs: https://day.js.org/docs/en/query/is-after */ - isAfter(date: ConfigType, unit?: OpUnitType): boolean + isAfter(date?: ConfigType, unit?: OpUnitType): boolean locale(): string diff --git a/node_modules/dayjs/locale.json b/node_modules/dayjs/locale.json index 4e871576..15ce042b 100644 --- a/node_modules/dayjs/locale.json +++ b/node_modules/dayjs/locale.json @@ -1 +1 @@ -[{"key":"af","name":"Afrikaans"},{"key":"am","name":"Amharic"},{"key":"ar-dz","name":"Arabic (Algeria)"},{"key":"ar-iq","name":" Arabic (Iraq)"},{"key":"ar-kw","name":"Arabic (Kuwait)"},{"key":"ar-ly","name":"Arabic (Lybia)"},{"key":"ar-ma","name":"Arabic (Morocco)"},{"key":"ar-sa","name":"Arabic (Saudi Arabia)"},{"key":"ar-tn","name":" Arabic (Tunisia)"},{"key":"ar","name":"Arabic"},{"key":"az","name":"Azerbaijani"},{"key":"be","name":"Belarusian"},{"key":"bg","name":"Bulgarian"},{"key":"bi","name":"Bislama"},{"key":"bm","name":"Bambara"},{"key":"bn-bd","name":"Bengali (Bangladesh)"},{"key":"bn","name":"Bengali"},{"key":"bo","name":"Tibetan"},{"key":"br","name":"Breton"},{"key":"bs","name":"Bosnian"},{"key":"ca","name":"Catalan"},{"key":"cs","name":"Czech"},{"key":"cv","name":"Chuvash"},{"key":"cy","name":"Welsh"},{"key":"da","name":"Danish"},{"key":"de-at","name":"German (Austria)"},{"key":"de-ch","name":"German (Switzerland)"},{"key":"de","name":"German"},{"key":"dv","name":"Maldivian"},{"key":"el","name":"Greek"},{"key":"en-au","name":"English (Australia)"},{"key":"en-ca","name":"English (Canada)"},{"key":"en-gb","name":"English (United Kingdom)"},{"key":"en-ie","name":"English (Ireland)"},{"key":"en-il","name":"English (Israel)"},{"key":"en-in","name":"English (India)"},{"key":"en-nz","name":"English (New Zealand)"},{"key":"en-sg","name":"English (Singapore)"},{"key":"en-tt","name":"English (Trinidad & Tobago)"},{"key":"en","name":"English"},{"key":"eo","name":"Esperanto"},{"key":"es-do","name":"Spanish (Dominican Republic)"},{"key":"es-pr","name":"Spanish (Puerto Rico)"},{"key":"es","name":"Spanish"},{"key":"et","name":"Estonian"},{"key":"eu","name":"Basque"},{"key":"fa","name":"Persian"},{"key":"fi","name":"Finnish"},{"key":"fo","name":"Faroese"},{"key":"fr-ca","name":"French (Canada)"},{"key":"fr-ch","name":"French (Switzerland)"},{"key":"fr","name":"French"},{"key":"fy","name":"Frisian"},{"key":"ga","name":"Irish or Irish Gaelic"},{"key":"gd","name":"Scottish Gaelic"},{"key":"gl","name":"Galician"},{"key":"gom-latn","name":"Konkani Latin script"},{"key":"gu","name":"Gujarati"},{"key":"he","name":"Hebrew"},{"key":"hi","name":"Hindi"},{"key":"hr","name":"Croatian"},{"key":"ht","name":"Haitian Creole (Haiti)"},{"key":"hu","name":"Hungarian"},{"key":"hy-am","name":"Armenian"},{"key":"id","name":"Indonesian"},{"key":"it-ch","name":"Italian (Switzerland)"},{"key":"is","name":"Icelandic"},{"key":"it","name":"Italian"},{"key":"ja","name":"Japanese"},{"key":"jv","name":"Javanese"},{"key":"ka","name":"Georgian"},{"key":"kk","name":"Kazakh"},{"key":"km","name":"Cambodian"},{"key":"kn","name":"Kannada"},{"key":"ko","name":"Korean"},{"key":"ku","name":"Kurdish"},{"key":"ky","name":"Kyrgyz"},{"key":"lb","name":"Luxembourgish"},{"key":"lo","name":"Lao"},{"key":"lt","name":"Lithuanian"},{"key":"lv","name":"Latvian"},{"key":"mi","name":"Maori"},{"key":"me","name":"Montenegrin"},{"key":"mk","name":"Macedonian"},{"key":"ml","name":"Malayalam"},{"key":"mn","name":"Mongolian"},{"key":"mr","name":"Marathi"},{"key":"ms-my","name":"Malay"},{"key":"ms","name":"Malay"},{"key":"mt","name":"Maltese (Malta)"},{"key":"my","name":"Burmese"},{"key":"nb","name":"Norwegian Bokmål"},{"key":"ne","name":"Nepalese"},{"key":"nl-be","name":"Dutch (Belgium)"},{"key":"nl","name":"Dutch"},{"key":"nn","name":"Nynorsk"},{"key":"oc-lnc","name":"Occitan, lengadocian dialecte"},{"key":"pa-in","name":"Punjabi (India)"},{"key":"pl","name":"Polish"},{"key":"pt-br","name":"Portuguese (Brazil)"},{"key":"rn","name":"Kirundi"},{"key":"pt","name":"Portuguese"},{"key":"ro","name":"Romanian"},{"key":"ru","name":"Russian"},{"key":"rw","name":"Kinyarwanda (Rwanda)"},{"key":"sd","name":"Sindhi"},{"key":"si","name":"Sinhalese"},{"key":"sk","name":"Slovak"},{"key":"sl","name":"Slovenian"},{"key":"sq","name":"Albanian"},{"key":"sr-cyrl","name":"Serbian Cyrillic"},{"key":"sr","name":"Serbian"},{"key":"ss","name":"siSwati"},{"key":"sv-fi","name":"Finland Swedish"},{"key":"sv","name":"Swedish"},{"key":"sw","name":"Swahili"},{"key":"ta","name":"Tamil"},{"key":"te","name":"Telugu"},{"key":"tet","name":"Tetun Dili (East Timor)"},{"key":"tg","name":"Tajik"},{"key":"th","name":"Thai"},{"key":"tk","name":"Turkmen"},{"key":"tl-ph","name":"Tagalog (Philippines)"},{"key":"tlh","name":"Klingon"},{"key":"tr","name":"Turkish"},{"key":"tzl","name":"Talossan"},{"key":"tzm-latn","name":"Central Atlas Tamazight Latin"},{"key":"tzm","name":"Central Atlas Tamazight"},{"key":"ug-cn","name":"Uyghur (China)"},{"key":"uk","name":"Ukrainian"},{"key":"ur","name":"Urdu"},{"key":"uz-latn","name":"Uzbek Latin"},{"key":"uz","name":"Uzbek"},{"key":"vi","name":"Vietnamese"},{"key":"x-pseudo","name":"Pseudo"},{"key":"yo","name":"Yoruba Nigeria"},{"key":"zh-cn","name":"Chinese (China)"},{"key":"zh-hk","name":"Chinese (Hong Kong)"},{"key":"zh-tw","name":"Chinese (Taiwan)"},{"key":"zh","name":"Chinese"},{"key":"es-mx","name":"Spanish (Mexico)"},{"key":"es-us","name":"Spanish (United States)"},{"key":"se","name":"Northern Sami"}] \ No newline at end of file +[{"key":"af","name":"Afrikaans"},{"key":"am","name":"Amharic"},{"key":"ar-iq","name":" Arabic (Iraq)"},{"key":"ar-dz","name":"Arabic (Algeria)"},{"key":"ar-kw","name":"Arabic (Kuwait)"},{"key":"ar-ly","name":"Arabic (Lybia)"},{"key":"ar-ma","name":"Arabic (Morocco)"},{"key":"ar-sa","name":"Arabic (Saudi Arabia)"},{"key":"ar-tn","name":" Arabic (Tunisia)"},{"key":"ar","name":"Arabic"},{"key":"az","name":"Azerbaijani"},{"key":"be","name":"Belarusian"},{"key":"bg","name":"Bulgarian"},{"key":"bi","name":"Bislama"},{"key":"bm","name":"Bambara"},{"key":"bn-bd","name":"Bengali (Bangladesh)"},{"key":"bn","name":"Bengali"},{"key":"bo","name":"Tibetan"},{"key":"br","name":"Breton"},{"key":"bs","name":"Bosnian"},{"key":"ca","name":"Catalan"},{"key":"cs","name":"Czech"},{"key":"cv","name":"Chuvash"},{"key":"cy","name":"Welsh"},{"key":"da","name":"Danish"},{"key":"de-at","name":"German (Austria)"},{"key":"de-ch","name":"German (Switzerland)"},{"key":"de","name":"German"},{"key":"dv","name":"Maldivian"},{"key":"en-au","name":"English (Australia)"},{"key":"el","name":"Greek"},{"key":"en-gb","name":"English (United Kingdom)"},{"key":"en-ie","name":"English (Ireland)"},{"key":"en-il","name":"English (Israel)"},{"key":"en-in","name":"English (India)"},{"key":"en-nz","name":"English (New Zealand)"},{"key":"en-sg","name":"English (Singapore)"},{"key":"en-tt","name":"English (Trinidad & Tobago)"},{"key":"en-ca","name":"English (Canada)"},{"key":"en","name":"English"},{"key":"eo","name":"Esperanto"},{"key":"es-mx","name":"Spanish (Mexico)"},{"key":"es-pr","name":"Spanish (Puerto Rico)"},{"key":"es-us","name":"Spanish (United States)"},{"key":"es-do","name":"Spanish (Dominican Republic)"},{"key":"et","name":"Estonian"},{"key":"eu","name":"Basque"},{"key":"fa","name":"Persian"},{"key":"fi","name":"Finnish"},{"key":"fr-ca","name":"French (Canada)"},{"key":"fr-ch","name":"French (Switzerland)"},{"key":"fr","name":"French"},{"key":"fo","name":"Faroese"},{"key":"fy","name":"Frisian"},{"key":"ga","name":"Irish or Irish Gaelic"},{"key":"gd","name":"Scottish Gaelic"},{"key":"gl","name":"Galician"},{"key":"gom-latn","name":"Konkani Latin script"},{"key":"gu","name":"Gujarati"},{"key":"he","name":"Hebrew"},{"key":"hi","name":"Hindi"},{"key":"hr","name":"Croatian"},{"key":"ht","name":"Haitian Creole (Haiti)"},{"key":"hu","name":"Hungarian"},{"key":"hy-am","name":"Armenian"},{"key":"id","name":"Indonesian"},{"key":"is","name":"Icelandic"},{"key":"it-ch","name":"Italian (Switzerland)"},{"key":"it","name":"Italian"},{"key":"jv","name":"Javanese"},{"key":"ka","name":"Georgian"},{"key":"kk","name":"Kazakh"},{"key":"km","name":"Cambodian"},{"key":"ko","name":"Korean"},{"key":"ku","name":"Kurdish"},{"key":"ky","name":"Kyrgyz"},{"key":"kn","name":"Kannada"},{"key":"lb","name":"Luxembourgish"},{"key":"ja","name":"Japanese"},{"key":"lt","name":"Lithuanian"},{"key":"lv","name":"Latvian"},{"key":"me","name":"Montenegrin"},{"key":"mi","name":"Maori"},{"key":"mk","name":"Macedonian"},{"key":"ml","name":"Malayalam"},{"key":"mn","name":"Mongolian"},{"key":"mr","name":"Marathi"},{"key":"ms-my","name":"Malay"},{"key":"ms","name":"Malay"},{"key":"mt","name":"Maltese (Malta)"},{"key":"lo","name":"Lao"},{"key":"my","name":"Burmese"},{"key":"nb","name":"Norwegian Bokmål"},{"key":"ne","name":"Nepalese"},{"key":"nl","name":"Dutch"},{"key":"nl-be","name":"Dutch (Belgium)"},{"key":"nn","name":"Nynorsk"},{"key":"pa-in","name":"Punjabi (India)"},{"key":"pl","name":"Polish"},{"key":"pt-br","name":"Portuguese (Brazil)"},{"key":"pt","name":"Portuguese"},{"key":"rn","name":"Kirundi"},{"key":"ro","name":"Romanian"},{"key":"es","name":"Spanish"},{"key":"ru","name":"Russian"},{"key":"rw","name":"Kinyarwanda (Rwanda)"},{"key":"sd","name":"Sindhi"},{"key":"se","name":"Northern Sami"},{"key":"si","name":"Sinhalese"},{"key":"sk","name":"Slovak"},{"key":"sl","name":"Slovenian"},{"key":"oc-lnc","name":"Occitan, lengadocian dialecte"},{"key":"sq","name":"Albanian"},{"key":"sr-cyrl","name":"Serbian Cyrillic"},{"key":"sr","name":"Serbian"},{"key":"ss","name":"siSwati"},{"key":"sv-fi","name":"Finland Swedish"},{"key":"sv","name":"Swedish"},{"key":"sw","name":"Swahili"},{"key":"ta","name":"Tamil"},{"key":"te","name":"Telugu"},{"key":"tet","name":"Tetun Dili (East Timor)"},{"key":"tg","name":"Tajik"},{"key":"th","name":"Thai"},{"key":"tl-ph","name":"Tagalog (Philippines)"},{"key":"tlh","name":"Klingon"},{"key":"tr","name":"Turkish"},{"key":"tzl","name":"Talossan"},{"key":"tzm","name":"Central Atlas Tamazight"},{"key":"ug-cn","name":"Uyghur (China)"},{"key":"uk","name":"Ukrainian"},{"key":"tk","name":"Turkmen"},{"key":"ur","name":"Urdu"},{"key":"uz-latn","name":"Uzbek Latin"},{"key":"uz","name":"Uzbek"},{"key":"vi","name":"Vietnamese"},{"key":"x-pseudo","name":"Pseudo"},{"key":"tzm-latn","name":"Central Atlas Tamazight Latin"},{"key":"yo","name":"Yoruba Nigeria"},{"key":"zh-cn","name":"Chinese (China)"},{"key":"zh-hk","name":"Chinese (Hong Kong)"},{"key":"zh-tw","name":"Chinese (Taiwan)"},{"key":"zh","name":"Chinese"}] \ No newline at end of file diff --git a/node_modules/dayjs/locale/ar.js b/node_modules/dayjs/locale/ar.js index 87b99b32..12e27fdb 100644 --- a/node_modules/dayjs/locale/ar.js +++ b/node_modules/dayjs/locale/ar.js @@ -1 +1 @@ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_ar=t(e.dayjs)}(this,(function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),r="يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),_={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},d={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"},o={name:"ar",weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),months:r,monthsShort:r,weekStart:6,relativeTime:{future:"بعد %s",past:"منذ %s",s:"ثانية واحدة",m:"دقيقة واحدة",mm:"%d دقائق",h:"ساعة واحدة",hh:"%d ساعات",d:"يوم واحد",dd:"%d أيام",M:"شهر واحد",MM:"%d أشهر",y:"عام واحد",yy:"%d أعوام"},preparse:function(e){return e.replace(/[١٢٣٤٥٦٧٨٩٠]/g,(function(e){return d[e]})).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return _[e]})).replace(/,/g,"،")},ordinal:function(e){return e},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/‏M/‏YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"}};return n.default.locale(o,null,!0),o})); \ No newline at end of file +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_ar=t(e.dayjs)}(this,(function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),r="يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),d={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},_={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"},o=/[١٢٣٤٥٦٧٨٩٠]/g,i=/،/g,a=/\d/g,s=/,/g,u={name:"ar",weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),months:r,monthsShort:r,weekStart:6,meridiem:function(e){return e>12?"م":"ص"},relativeTime:{future:"بعد %s",past:"منذ %s",s:"ثانية واحدة",m:"دقيقة واحدة",mm:"%d دقائق",h:"ساعة واحدة",hh:"%d ساعات",d:"يوم واحد",dd:"%d أيام",M:"شهر واحد",MM:"%d أشهر",y:"عام واحد",yy:"%d أعوام"},preparse:function(e){return e.replace(o,(function(e){return _[e]})).replace(i,",")},postformat:function(e){return e.replace(a,(function(e){return d[e]})).replace(s,"،")},ordinal:function(e){return e},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/‏M/‏YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"}};return n.default.locale(u,null,!0),u})); \ No newline at end of file diff --git a/node_modules/dayjs/locale/be.js b/node_modules/dayjs/locale/be.js index 704a87de..45a5cfcd 100644 --- a/node_modules/dayjs/locale/be.js +++ b/node_modules/dayjs/locale/be.js @@ -1 +1 @@ -!function(_,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],e):(_="undefined"!=typeof globalThis?globalThis:_||self).dayjs_locale_be=e(_.dayjs)}(this,(function(_){"use strict";function e(_){return _&&"object"==typeof _&&"default"in _?_:{default:_}}var t=e(_),n={name:"be",weekdays:"нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу".split("_"),months:"студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня".split("_"),weekStart:1,weekdaysShort:"нд_пн_ат_ср_чц_пт_сб".split("_"),monthsShort:"студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж".split("_"),weekdaysMin:"нд_пн_ат_ср_чц_пт_сб".split("_"),ordinal:function(_){return _},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., HH:mm",LLLL:"dddd, D MMMM YYYY г., HH:mm"}};return t.default.locale(n,null,!0),n})); \ No newline at end of file +!function(_,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],t):(_="undefined"!=typeof globalThis?globalThis:_||self).dayjs_locale_be=t(_.dayjs)}(this,(function(_){"use strict";function t(_){return _&&"object"==typeof _&&"default"in _?_:{default:_}}var e=t(_),n="студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня".split("_"),s="студзень_лютый_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань".split("_"),o="студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж.".split("_"),i="студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж".split("_"),r=/D[oD]?(\[[^[\]]*\]|\s)+MMMM?/;function d(_,t,e){var n,s;return"m"===e?t?"хвіліна":"хвіліну":"h"===e?t?"гадзіна":"гадзіну":_+" "+(n=+_,s={ss:t?"секунда_секунды_секунд":"секунду_секунды_секунд",mm:t?"хвіліна_хвіліны_хвілін":"хвіліну_хвіліны_хвілін",hh:t?"гадзіна_гадзіны_гадзін":"гадзіну_гадзіны_гадзін",dd:"дзень_дні_дзён",MM:"месяц_месяцы_месяцаў",yy:"год_гады_гадоў"}[e].split("_"),n%10==1&&n%100!=11?s[0]:n%10>=2&&n%10<=4&&(n%100<10||n%100>=20)?s[1]:s[2])}var a=function(_,t){return r.test(t)?n[_.month()]:s[_.month()]};a.s=s,a.f=n;var m=function(_,t){return r.test(t)?o[_.month()]:i[_.month()]};m.s=i,m.f=o;var u={name:"be",weekdays:"нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота".split("_"),weekdaysShort:"няд_пнд_аўт_сер_чцв_пят_суб".split("_"),weekdaysMin:"нд_пн_аў_ср_чц_пт_сб".split("_"),months:a,monthsShort:m,weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., HH:mm",LLLL:"dddd, D MMMM YYYY г., HH:mm"},relativeTime:{future:"праз %s",past:"%s таму",s:"некалькі секунд",m:d,mm:d,h:d,hh:d,d:"дзень",dd:d,M:"месяц",MM:d,y:"год",yy:d},ordinal:function(_){return _},meridiem:function(_){return _<4?"ночы":_<12?"раніцы":_<17?"дня":"вечара"}};return e.default.locale(u,null,!0),u})); \ No newline at end of file diff --git a/node_modules/dayjs/locale/bg.js b/node_modules/dayjs/locale/bg.js index 4a3d316a..89ddeffe 100644 --- a/node_modules/dayjs/locale/bg.js +++ b/node_modules/dayjs/locale/bg.js @@ -1 +1 @@ -!function(e,_){"object"==typeof exports&&"undefined"!=typeof module?module.exports=_(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],_):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_bg=_(e.dayjs)}(this,(function(e){"use strict";function _(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t=_(e),d={name:"bg",weekdays:"неделя_понеделник_вторник_сряда_четвъртък_петък_събота".split("_"),weekdaysShort:"нед_пон_вто_сря_чет_пет_съб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),months:"януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември".split("_"),monthsShort:"янр_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек".split("_"),weekStart:1,ordinal:function(e){var _=e%100;if(_>10&&_<20)return e+"-ти";var t=e%10;return 1===t?e+"-ви":2===t?e+"-ри":7===t||8===t?e+"-ми":e+"-ти"},formats:{LT:"H:mm",LTS:"H:mm:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},relativeTime:{future:"след %s",past:"преди %s",s:"няколко секунди",m:"минута",mm:"%d минути",h:"час",hh:"%d часа",d:"ден",dd:"%d дена",M:"месец",MM:"%d месеца",y:"година",yy:"%d години"}};return t.default.locale(d,null,!0),d})); \ No newline at end of file +!function(e,_){"object"==typeof exports&&"undefined"!=typeof module?module.exports=_(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],_):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_bg=_(e.dayjs)}(this,(function(e){"use strict";function _(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t=_(e),d={name:"bg",weekdays:"неделя_понеделник_вторник_сряда_четвъртък_петък_събота".split("_"),weekdaysShort:"нед_пон_вто_сря_чет_пет_съб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),months:"януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември".split("_"),monthsShort:"яну_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек".split("_"),weekStart:1,ordinal:function(e){var _=e%100;if(_>10&&_<20)return e+"-ти";var t=e%10;return 1===t?e+"-ви":2===t?e+"-ри":7===t||8===t?e+"-ми":e+"-ти"},formats:{LT:"H:mm",LTS:"H:mm:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},relativeTime:{future:"след %s",past:"преди %s",s:"няколко секунди",m:"минута",mm:"%d минути",h:"час",hh:"%d часа",d:"ден",dd:"%d дена",M:"месец",MM:"%d месеца",y:"година",yy:"%d години"}};return t.default.locale(d,null,!0),d})); \ No newline at end of file diff --git a/node_modules/dayjs/locale/da.js b/node_modules/dayjs/locale/da.js index fd45a45c..f196072b 100644 --- a/node_modules/dayjs/locale/da.js +++ b/node_modules/dayjs/locale/da.js @@ -1 +1 @@ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_da=t(e.dayjs)}(this,(function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=t(e),n={name:"da",weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"søn._man._tirs._ons._tors._fre._lør.".split("_"),weekdaysMin:"sø._ma._ti._on._to._fr._lø.".split("_"),months:"januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december".split("_"),monthsShort:"jan._feb._mar._apr._maj_juni_juli_aug._sept._okt._nov._dec.".split("_"),weekStart:1,ordinal:function(e){return e+"."},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd [d.] D. MMMM YYYY [kl.] HH:mm"},relativeTime:{future:"om %s",past:"%s siden",s:"få sekunder",m:"et minut",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dage",M:"en måned",MM:"%d måneder",y:"et år",yy:"%d år"}};return d.default.locale(n,null,!0),n})); \ No newline at end of file +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_da=t(e.dayjs)}(this,(function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=t(e),a={name:"da",weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"søn._man._tirs._ons._tors._fre._lør.".split("_"),weekdaysMin:"sø._ma._ti._on._to._fr._lø.".split("_"),months:"januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december".split("_"),monthsShort:"jan._feb._mar._apr._maj_juni_juli_aug._sept._okt._nov._dec.".split("_"),weekStart:1,yearStart:4,ordinal:function(e){return e+"."},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd [d.] D. MMMM YYYY [kl.] HH:mm"},relativeTime:{future:"om %s",past:"%s siden",s:"få sekunder",m:"et minut",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dage",M:"en måned",MM:"%d måneder",y:"et år",yy:"%d år"}};return d.default.locale(a,null,!0),a})); \ No newline at end of file diff --git a/node_modules/dayjs/locale/en-au.js b/node_modules/dayjs/locale/en-au.js index b952cdbf..a14c890c 100644 --- a/node_modules/dayjs/locale/en-au.js +++ b/node_modules/dayjs/locale/en-au.js @@ -1 +1 @@ -!function(e,a){"object"==typeof exports&&"undefined"!=typeof module?module.exports=a(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],a):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_en_au=a(e.dayjs)}(this,(function(e){"use strict";function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t=a(e),_={name:"en-au",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),weekStart:1,weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),ordinal:function(e){return e},formats:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"}};return t.default.locale(_,null,!0),_})); \ No newline at end of file +!function(e,a){"object"==typeof exports&&"undefined"!=typeof module?module.exports=a(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],a):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_en_au=a(e.dayjs)}(this,(function(e){"use strict";function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t=a(e),_={name:"en-au",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),weekStart:1,weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),formats:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},ordinal:function(e){var a=["th","st","nd","rd"],t=e%100;return"["+e+(a[(t-20)%10]||a[t]||a[0])+"]"}};return t.default.locale(_,null,!0),_})); \ No newline at end of file diff --git a/node_modules/dayjs/locale/ga.js b/node_modules/dayjs/locale/ga.js index 0b2489f4..2f28861c 100644 --- a/node_modules/dayjs/locale/ga.js +++ b/node_modules/dayjs/locale/ga.js @@ -1 +1 @@ -!function(a,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],e):(a="undefined"!=typeof globalThis?globalThis:a||self).dayjs_locale_ga=e(a.dayjs)}(this,(function(a){"use strict";function e(a){return a&&"object"==typeof a&&"default"in a?a:{default:a}}var i=e(a),n={name:"ga",weekdays:"Dé Domhnaigh_Dé Luain_Dé Máirt_Dé Céadaoin_Déardaoin_Dé hAoine_Dé Satharn".split("_"),months:"Eanáir_Feabhra_Márta_Aibreán_Bealtaine_Méitheamh_Iúil_Lúnasa_Meán Fómhair_Deaireadh Fómhair_Samhain_Nollaig".split("_"),weekStart:1,weekdaysShort:"Dom_Lua_Mái_Céa_Déa_hAo_Sat".split("_"),monthsShort:"Eaná_Feab_Márt_Aibr_Beal_Méit_Iúil_Lúna_Meán_Deai_Samh_Noll".split("_"),weekdaysMin:"Do_Lu_Má_Ce_Dé_hA_Sa".split("_"),ordinal:function(a){return a},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},relativeTime:{future:"i %s",past:"%s ó shin",s:"cúpla soicind",m:"nóiméad",mm:"%d nóiméad",h:"uair an chloig",hh:"%d uair an chloig",d:"lá",dd:"%d lá",M:"mí",MM:"%d mí",y:"bliain",yy:"%d bliain"}};return i.default.locale(n,null,!0),n})); \ No newline at end of file +!function(a,i){"object"==typeof exports&&"undefined"!=typeof module?module.exports=i(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],i):(a="undefined"!=typeof globalThis?globalThis:a||self).dayjs_locale_ga=i(a.dayjs)}(this,(function(a){"use strict";function i(a){return a&&"object"==typeof a&&"default"in a?a:{default:a}}var e=i(a),n={name:"ga",weekdays:"Dé Domhnaigh_Dé Luain_Dé Máirt_Dé Céadaoin_Déardaoin_Dé hAoine_Dé Sathairn".split("_"),months:"Eanáir_Feabhra_Márta_Aibreán_Bealtaine_Meitheamh_Iúil_Lúnasa_Meán Fómhair_Deireadh Fómhair_Samhain_Nollaig".split("_"),weekStart:1,weekdaysShort:"Dom_Lua_Mái_Céa_Déa_Aoi_Sat".split("_"),monthsShort:"Ean_Fea_Már_Aib_Beal_Mei_Iúil_Lún_MFómh_DFómh_Samh_Noll".split("_"),weekdaysMin:"Do_Lu_Má_Cé_Dé_Ao_Sa".split("_"),ordinal:function(a){return a},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},relativeTime:{future:"i %s",past:"%s ó shin",s:"cúpla soicind",m:"nóiméad",mm:"%d nóiméad",h:"uair an chloig",hh:"%d uair an chloig",d:"lá",dd:"%d lá",M:"mí",MM:"%d mí",y:"bliain",yy:"%d bliain"}};return e.default.locale(n,null,!0),n})); \ No newline at end of file diff --git a/node_modules/dayjs/locale/it.js b/node_modules/dayjs/locale/it.js index 2ddf44b7..85b84ce6 100644 --- a/node_modules/dayjs/locale/it.js +++ b/node_modules/dayjs/locale/it.js @@ -1 +1 @@ -!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],o):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_it=o(e.dayjs)}(this,(function(e){"use strict";function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t=o(e),n={name:"it",weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),weekStart:1,monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"tra %s",past:"%s fa",s:"qualche secondo",m:"un minuto",mm:"%d minuti",h:"un' ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},ordinal:function(e){return e+"º"}};return t.default.locale(n,null,!0),n})); \ No newline at end of file +!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],o):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_it=o(e.dayjs)}(this,(function(e){"use strict";function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t=o(e),n={name:"it",weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),weekStart:1,monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"tra %s",past:"%s fa",s:"qualche secondo",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},ordinal:function(e){return e+"º"}};return t.default.locale(n,null,!0),n})); \ No newline at end of file diff --git a/node_modules/dayjs/locale/km.js b/node_modules/dayjs/locale/km.js index 528923e7..11086719 100644 --- a/node_modules/dayjs/locale/km.js +++ b/node_modules/dayjs/locale/km.js @@ -1 +1 @@ -!function(_,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],e):(_="undefined"!=typeof globalThis?globalThis:_||self).dayjs_locale_km=e(_.dayjs)}(this,(function(_){"use strict";function e(_){return _&&"object"==typeof _&&"default"in _?_:{default:_}}var t=e(_),d={name:"km",weekdays:"អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍".split("_"),months:"មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ".split("_"),weekStart:1,weekdaysShort:"អា_ច_អ_ព_ព្រ_សុ_ស".split("_"),monthsShort:"មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ".split("_"),weekdaysMin:"អា_ច_អ_ព_ព្រ_សុ_ស".split("_"),ordinal:function(_){return _},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},relativeTime:{future:"%sទៀត",past:"%sមុន",s:"ប៉ុន្មានវិនាទី",m:"មួយនាទី",mm:"%d នាទី",h:"មួយម៉ោង",hh:"%d ម៉ោង",d:"មួយថ្ងៃ",dd:"%d ថ្ងៃ",M:"មួយខែ",MM:"%d ខែ",y:"មួយឆ្នាំ",yy:"%d ឆ្នាំ"}};return t.default.locale(d,null,!0),d})); \ No newline at end of file +!function(e,_){"object"==typeof exports&&"undefined"!=typeof module?module.exports=_(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],_):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_km=_(e.dayjs)}(this,(function(e){"use strict";function _(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t=_(e),d={name:"km",weekdays:"អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍".split("_"),months:"មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ".split("_"),weekStart:1,weekdaysShort:"អា_ច_អ_ព_ព្រ_សុ_ស".split("_"),monthsShort:"មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ".split("_"),weekdaysMin:"អា_ច_អ_ព_ព្រ_សុ_ស".split("_"),ordinal:function(e){return e},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},relativeTime:{future:"%sទៀត",past:"%sមុន",s:"ប៉ុន្មានវិនាទី",m:"មួយនាទី",mm:"%d នាទី",h:"មួយម៉ោង",hh:"%d ម៉ោង",d:"មួយថ្ងៃ",dd:"%d ថ្ងៃ",M:"មួយខែ",MM:"%d ខែ",y:"មួយឆ្នាំ",yy:"%d ឆ្នាំ"},meridiem:function(e){return e>12?"ល្ងាច":"ព្រឹក"}};return t.default.locale(d,null,!0),d})); \ No newline at end of file diff --git a/node_modules/dayjs/locale/ko.js b/node_modules/dayjs/locale/ko.js index 88d89129..cfe8b379 100644 --- a/node_modules/dayjs/locale/ko.js +++ b/node_modules/dayjs/locale/ko.js @@ -1 +1 @@ -!function(e,_){"object"==typeof exports&&"undefined"!=typeof module?module.exports=_(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],_):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_ko=_(e.dayjs)}(this,(function(e){"use strict";function _(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=_(e),t={name:"ko",weekdays:"일요일_월요일_화요일_수요일_목요일_금요일_토요일".split("_"),weekdaysShort:"일_월_화_수_목_금_토".split("_"),weekdaysMin:"일_월_화_수_목_금_토".split("_"),months:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),monthsShort:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),ordinal:function(e){return e},formats:{LT:"A h:mm",LTS:"A h:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY년 MMMM D일",LLL:"YYYY년 MMMM D일 A h:mm",LLLL:"YYYY년 MMMM D일 dddd A h:mm",l:"YYYY.MM.DD.",ll:"YYYY년 MMMM D일",lll:"YYYY년 MMMM D일 A h:mm",llll:"YYYY년 MMMM D일 dddd A h:mm"},meridiem:function(e){return e<12?"오전":"오후"},relativeTime:{future:"%s 후",past:"%s 전",s:"몇 초",m:"1분",mm:"%d분",h:"한 시간",hh:"%d시간",d:"하루",dd:"%d일",M:"한 달",MM:"%d달",y:"일 년",yy:"%d년"}};return d.default.locale(t,null,!0),t})); \ No newline at end of file +!function(e,_){"object"==typeof exports&&"undefined"!=typeof module?module.exports=_(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],_):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_ko=_(e.dayjs)}(this,(function(e){"use strict";function _(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=_(e),t={name:"ko",weekdays:"일요일_월요일_화요일_수요일_목요일_금요일_토요일".split("_"),weekdaysShort:"일_월_화_수_목_금_토".split("_"),weekdaysMin:"일_월_화_수_목_금_토".split("_"),months:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),monthsShort:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),ordinal:function(e){return e+"일"},formats:{LT:"A h:mm",LTS:"A h:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY년 MMMM D일",LLL:"YYYY년 MMMM D일 A h:mm",LLLL:"YYYY년 MMMM D일 dddd A h:mm",l:"YYYY.MM.DD.",ll:"YYYY년 MMMM D일",lll:"YYYY년 MMMM D일 A h:mm",llll:"YYYY년 MMMM D일 dddd A h:mm"},meridiem:function(e){return e<12?"오전":"오후"},relativeTime:{future:"%s 후",past:"%s 전",s:"몇 초",m:"1분",mm:"%d분",h:"한 시간",hh:"%d시간",d:"하루",dd:"%d일",M:"한 달",MM:"%d달",y:"일 년",yy:"%d년"}};return d.default.locale(t,null,!0),t})); \ No newline at end of file diff --git a/node_modules/dayjs/locale/sl.js b/node_modules/dayjs/locale/sl.js index b503c139..162d2ecd 100644 --- a/node_modules/dayjs/locale/sl.js +++ b/node_modules/dayjs/locale/sl.js @@ -1 +1 @@ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_sl=t(e.dayjs)}(this,(function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var _=t(e),n={name:"sl",weekdays:"nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota".split("_"),months:"januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december".split("_"),weekStart:1,weekdaysShort:"ned._pon._tor._sre._čet._pet._sob.".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.".split("_"),weekdaysMin:"ne_po_to_sr_če_pe_so".split("_"),ordinal:function(e){return e+"."},formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},relativeTime:{future:"čez %s",past:"pred %s",s:"nekaj sekund",m:"minuta",mm:"%d minut",h:"ura",hh:"%d ur",d:"dan",dd:"%d dni",M:"mesec",MM:"%d mesecev",y:"leto",yy:"%d let"}};return _.default.locale(n,null,!0),n})); \ No newline at end of file +!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],n):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_sl=n(e.dayjs)}(this,(function(e){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t=n(e);function r(e){return e%100==2}function a(e){return e%100==3||e%100==4}function s(e,n,t,s){var m=e+" ";switch(t){case"s":return n||s?"nekaj sekund":"nekaj sekundami";case"m":return n?"ena minuta":"eno minuto";case"mm":return r(e)?m+(n||s?"minuti":"minutama"):a(e)?m+(n||s?"minute":"minutami"):m+(n||s?"minut":"minutami");case"h":return n?"ena ura":"eno uro";case"hh":return r(e)?m+(n||s?"uri":"urama"):a(e)?m+(n||s?"ure":"urami"):m+(n||s?"ur":"urami");case"d":return n||s?"en dan":"enim dnem";case"dd":return r(e)?m+(n||s?"dneva":"dnevoma"):m+(n||s?"dni":"dnevi");case"M":return n||s?"en mesec":"enim mesecem";case"MM":return r(e)?m+(n||s?"meseca":"mesecema"):a(e)?m+(n||s?"mesece":"meseci"):m+(n||s?"mesecev":"meseci");case"y":return n||s?"eno leto":"enim letom";case"yy":return r(e)?m+(n||s?"leti":"letoma"):a(e)?m+(n||s?"leta":"leti"):m+(n||s?"let":"leti")}}var m={name:"sl",weekdays:"nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota".split("_"),months:"januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december".split("_"),weekStart:1,weekdaysShort:"ned._pon._tor._sre._čet._pet._sob.".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.".split("_"),weekdaysMin:"ne_po_to_sr_če_pe_so".split("_"),ordinal:function(e){return e+"."},formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm",l:"D. M. YYYY"},relativeTime:{future:"čez %s",past:"pred %s",s:s,m:s,mm:s,h:s,hh:s,d:s,dd:s,M:s,MM:s,y:s,yy:s}};return t.default.locale(m,null,!0),m})); \ No newline at end of file diff --git a/node_modules/dayjs/locale/uz-latn.js b/node_modules/dayjs/locale/uz-latn.js index 85506ecf..a8ebab49 100644 --- a/node_modules/dayjs/locale/uz-latn.js +++ b/node_modules/dayjs/locale/uz-latn.js @@ -1 +1 @@ -!function(a,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],e):(a="undefined"!=typeof globalThis?globalThis:a||self).dayjs_locale_uz_latn=e(a.dayjs)}(this,(function(a){"use strict";function e(a){return a&&"object"==typeof a&&"default"in a?a:{default:a}}var n=e(a),_={name:"uz-latn",weekdays:"Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba".split("_"),months:"Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr".split("_"),weekStart:1,weekdaysShort:"Yak_Dush_Sesh_Chor_Pay_Jum_Shan".split("_"),monthsShort:"Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek".split("_"),weekdaysMin:"Ya_Du_Se_Cho_Pa_Ju_Sha".split("_"),ordinal:function(a){return a},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"D MMMM YYYY, dddd HH:mm"},relativeTime:{future:"Yaqin %s ichida",past:"Bir necha %s oldin",s:"soniya",m:"bir daqiqa",mm:"%d daqiqa",h:"bir soat",hh:"%d soat",d:"bir kun",dd:"%d kun",M:"bir oy",MM:"%d oy",y:"bir yil",yy:"%d yil"}};return n.default.locale(_,null,!0),_})); \ No newline at end of file +!function(a,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],e):(a="undefined"!=typeof globalThis?globalThis:a||self).dayjs_locale_uz_latn=e(a.dayjs)}(this,(function(a){"use strict";function e(a){return a&&"object"==typeof a&&"default"in a?a:{default:a}}var _=e(a),n={name:"uz-latn",weekdays:"Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba".split("_"),months:"Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr".split("_"),weekStart:1,weekdaysShort:"Yak_Dush_Sesh_Chor_Pay_Jum_Shan".split("_"),monthsShort:"Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek".split("_"),weekdaysMin:"Ya_Du_Se_Cho_Pa_Ju_Sha".split("_"),ordinal:function(a){return a},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"D MMMM YYYY, dddd HH:mm"},relativeTime:{future:"Yaqin %s ichida",past:"%s oldin",s:"soniya",m:"bir daqiqa",mm:"%d daqiqa",h:"bir soat",hh:"%d soat",d:"bir kun",dd:"%d kun",M:"bir oy",MM:"%d oy",y:"bir yil",yy:"%d yil"}};return _.default.locale(n,null,!0),n})); \ No newline at end of file diff --git a/node_modules/dayjs/locale/uz.js b/node_modules/dayjs/locale/uz.js index aec69eea..f6992b1a 100644 --- a/node_modules/dayjs/locale/uz.js +++ b/node_modules/dayjs/locale/uz.js @@ -1 +1 @@ -!function(_,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],e):(_="undefined"!=typeof globalThis?globalThis:_||self).dayjs_locale_uz=e(_.dayjs)}(this,(function(_){"use strict";function e(_){return _&&"object"==typeof _&&"default"in _?_:{default:_}}var t=e(_),d={name:"uz",weekdays:"Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба".split("_"),months:"январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр".split("_"),weekStart:1,weekdaysShort:"Якш_Душ_Сеш_Чор_Пай_Жум_Шан".split("_"),monthsShort:"янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек".split("_"),weekdaysMin:"Як_Ду_Се_Чо_Па_Жу_Ша".split("_"),ordinal:function(_){return _},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"D MMMM YYYY, dddd HH:mm"},relativeTime:{future:"Якин %s ичида",past:"Бир неча %s олдин",s:"фурсат",m:"бир дакика",mm:"%d дакика",h:"бир соат",hh:"%d соат",d:"бир кун",dd:"%d кун",M:"бир ой",MM:"%d ой",y:"бир йил",yy:"%d йил"}};return t.default.locale(d,null,!0),d})); \ No newline at end of file +!function(_,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],e):(_="undefined"!=typeof globalThis?globalThis:_||self).dayjs_locale_uz=e(_.dayjs)}(this,(function(_){"use strict";function e(_){return _&&"object"==typeof _&&"default"in _?_:{default:_}}var t=e(_),d={name:"uz",weekdays:"Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба".split("_"),months:"январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр".split("_"),weekStart:1,weekdaysShort:"Якш_Душ_Сеш_Чор_Пай_Жум_Шан".split("_"),monthsShort:"янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек".split("_"),weekdaysMin:"Як_Ду_Се_Чо_Па_Жу_Ша".split("_"),ordinal:function(_){return _},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"D MMMM YYYY, dddd HH:mm"},relativeTime:{future:"Якин %s ичида",past:"%s олдин",s:"фурсат",m:"бир дакика",mm:"%d дакика",h:"бир соат",hh:"%d соат",d:"бир кун",dd:"%d кун",M:"бир ой",MM:"%d ой",y:"бир йил",yy:"%d йил"}};return t.default.locale(d,null,!0),d})); \ No newline at end of file diff --git a/node_modules/dayjs/locale/zh-hk.js b/node_modules/dayjs/locale/zh-hk.js index f4b220d1..dd389f98 100644 --- a/node_modules/dayjs/locale/zh-hk.js +++ b/node_modules/dayjs/locale/zh-hk.js @@ -1 +1 @@ -!function(_,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],e):(_="undefined"!=typeof globalThis?globalThis:_||self).dayjs_locale_zh_hk=e(_.dayjs)}(this,(function(_){"use strict";function e(_){return _&&"object"==typeof _&&"default"in _?_:{default:_}}var t=e(_),d={name:"zh-hk",months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),ordinal:function(_,e){return"W"===e?_+"週":_+"日"},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",m:"一分鐘",mm:"%d 分鐘",h:"一小時",hh:"%d 小時",d:"一天",dd:"%d 天",M:"一個月",MM:"%d 個月",y:"一年",yy:"%d 年"}};return t.default.locale(d,null,!0),d})); \ No newline at end of file +!function(_,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],e):(_="undefined"!=typeof globalThis?globalThis:_||self).dayjs_locale_zh_hk=e(_.dayjs)}(this,(function(_){"use strict";function e(_){return _&&"object"==typeof _&&"default"in _?_:{default:_}}var d=e(_),t={name:"zh-hk",months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),ordinal:function(_,e){return"W"===e?_+"週":_+"日"},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",m:"一分鐘",mm:"%d 分鐘",h:"一小時",hh:"%d 小時",d:"一天",dd:"%d 天",M:"一個月",MM:"%d 個月",y:"一年",yy:"%d 年"},meridiem:function(_,e){var d=100*_+e;return d<600?"凌晨":d<900?"早上":d<1100?"上午":d<1300?"中午":d<1800?"下午":"晚上"}};return d.default.locale(t,null,!0),t})); \ No newline at end of file diff --git a/node_modules/dayjs/locale/zh-tw.js b/node_modules/dayjs/locale/zh-tw.js index 23ff95be..5970f17d 100644 --- a/node_modules/dayjs/locale/zh-tw.js +++ b/node_modules/dayjs/locale/zh-tw.js @@ -1 +1 @@ -!function(_,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],e):(_="undefined"!=typeof globalThis?globalThis:_||self).dayjs_locale_zh_tw=e(_.dayjs)}(this,(function(_){"use strict";function e(_){return _&&"object"==typeof _&&"default"in _?_:{default:_}}var t=e(_),d={name:"zh-tw",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(_,e){return"W"===e?_+"週":_+"日"},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}};return t.default.locale(d,null,!0),d})); \ No newline at end of file +!function(_,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],e):(_="undefined"!=typeof globalThis?globalThis:_||self).dayjs_locale_zh_tw=e(_.dayjs)}(this,(function(_){"use strict";function e(_){return _&&"object"==typeof _&&"default"in _?_:{default:_}}var t=e(_),d={name:"zh-tw",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(_,e){return"W"===e?_+"週":_+"日"},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"},meridiem:function(_,e){var t=100*_+e;return t<600?"凌晨":t<900?"早上":t<1100?"上午":t<1300?"中午":t<1800?"下午":"晚上"}};return t.default.locale(d,null,!0),d})); \ No newline at end of file diff --git a/node_modules/dayjs/package.json b/node_modules/dayjs/package.json index 113f7a30..95f77a36 100644 --- a/node_modules/dayjs/package.json +++ b/node_modules/dayjs/package.json @@ -1,12 +1,13 @@ { "name": "dayjs", - "version": "1.11.6", + "version": "1.11.23", "description": "2KB immutable date time library alternative to Moment.js with the same modern API ", "main": "dayjs.min.js", "types": "index.d.ts", "scripts": { - "test": "TZ=Pacific/Auckland npm run test-tz && TZ=Europe/London npm run test-tz && TZ=America/Whitehorse npm run test-tz && npm run test-tz && jest", + "test": "cross-env TZ=Pacific/Auckland npm run test-tz && cross-env TZ=Europe/London npm run test-tz && cross-env TZ=America/Whitehorse npm run test-tz && npm run test-tz && cross-env TZ=Europe/Paris npm run test-tz-plugin && cross-env TZ=Europe/London npm run test-tz-plugin && cross-env TZ=America/New_York npm run test-tz-plugin && cross-env TZ=Pacific/Auckland npm run test-tz-plugin && jest --coverage --coverageThreshold=\"{ \\\"global\\\": { \\\"lines\\\": 100} }\"", "test-tz": "date && jest test/timezone.test --coverage=false", + "test-tz-plugin": "date && jest test/plugin/timezone.test --coverage=false", "lint": "./node_modules/.bin/eslint src/* test/* build/*", "prettier": "prettier --write \"docs/**/*.md\"", "babel": "cross-env BABEL_ENV=build babel src --out-dir esm --copy-files && node build/esm", @@ -36,21 +37,6 @@ "src/**/*" ] }, - "release": { - "prepare": [ - { - "path": "@semantic-release/changelog" - }, - [ - "@semantic-release/git", - { - "assets": [ - "CHANGELOG.md" - ] - } - ] - ] - }, "keywords": [ "dayjs", "date", @@ -70,6 +56,7 @@ "@babel/core": "^7.0.0-beta.44", "@babel/node": "^7.0.0-beta.44", "@babel/preset-env": "^7.0.0-beta.44", + "@semantic-release/github": "^11.0.4", "babel-core": "^7.0.0-bridge.0", "babel-jest": "^22.4.3", "babel-plugin-external-helpers": "^6.22.0", diff --git a/node_modules/dayjs/plugin/customParseFormat.js b/node_modules/dayjs/plugin/customParseFormat.js index 66d60895..10a806e7 100644 --- a/node_modules/dayjs/plugin/customParseFormat.js +++ b/node_modules/dayjs/plugin/customParseFormat.js @@ -1 +1 @@ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_plugin_customParseFormat=t()}(this,(function(){"use strict";var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d\d/,r=/\d\d?/,i=/\d*[^-_:/,()\s\d]+/,o={},s=function(e){return(e=+e)+(e>68?1900:2e3)};var a=function(e){return function(t){this[e]=+t}},f=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e)return 0;if("Z"===e)return 0;var t=e.match(/([+-]|\d\d)/g),n=60*t[1]+(+t[2]||0);return 0===n?0:"+"===t[0]?-n:n}(e)}],h=function(e){var t=o[e];return t&&(t.indexOf?t:t.s.concat(t.f))},u=function(e,t){var n,r=o.meridiem;if(r){for(var i=1;i<=24;i+=1)if(e.indexOf(r(i,0,t))>-1){n=i>12;break}}else n=e===(t?"pm":"PM");return n},d={A:[i,function(e){this.afternoon=u(e,!1)}],a:[i,function(e){this.afternoon=u(e,!0)}],S:[/\d/,function(e){this.milliseconds=100*+e}],SS:[n,function(e){this.milliseconds=10*+e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[r,a("seconds")],ss:[r,a("seconds")],m:[r,a("minutes")],mm:[r,a("minutes")],H:[r,a("hours")],h:[r,a("hours")],HH:[r,a("hours")],hh:[r,a("hours")],D:[r,a("day")],DD:[n,a("day")],Do:[i,function(e){var t=o.ordinal,n=e.match(/\d+/);if(this.day=n[0],t)for(var r=1;r<=31;r+=1)t(r).replace(/\[|\]/g,"")===e&&(this.day=r)}],M:[r,a("month")],MM:[n,a("month")],MMM:[i,function(e){var t=h("months"),n=(h("monthsShort")||t.map((function(e){return e.slice(0,3)}))).indexOf(e)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[i,function(e){var t=h("months").indexOf(e)+1;if(t<1)throw new Error;this.month=t%12||t}],Y:[/[+-]?\d+/,a("year")],YY:[n,function(e){this.year=s(e)}],YYYY:[/\d{4}/,a("year")],Z:f,ZZ:f};function c(n){var r,i;r=n,i=o&&o.formats;for(var s=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var o=r&&r.toUpperCase();return n||i[r]||e[r]||i[o].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))).match(t),a=s.length,f=0;f-1)return new Date(("X"===t?1e3:1)*e);var r=c(t)(e),i=r.year,o=r.month,s=r.day,a=r.hours,f=r.minutes,h=r.seconds,u=r.milliseconds,d=r.zone,l=new Date,m=s||(i||o?1:l.getDate()),M=i||l.getFullYear(),Y=0;i&&!o||(Y=o>0?o-1:l.getMonth());var p=a||0,v=f||0,D=h||0,g=u||0;return d?new Date(Date.UTC(M,Y,m,p,v,D,g+60*d.offset*1e3)):n?new Date(Date.UTC(M,Y,m,p,v,D,g)):new Date(M,Y,m,p,v,D,g)}catch(e){return new Date("")}}(t,a,r),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),u&&t!=this.format(a)&&(this.$d=new Date("")),o={}}else if(a instanceof Array)for(var l=a.length,m=1;m<=l;m+=1){s[1]=a[m-1];var M=n.apply(this,s);if(M.isValid()){this.$d=M.$d,this.$L=M.$L,this.init();break}m===l&&(this.$d=new Date(""))}else i.call(this,e)}}})); \ No newline at end of file +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_plugin_customParseFormat=t()}(this,(function(){"use strict";var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,r=/\d\d/,i=/\d\d?/,o=/\d*[^-_:/,()\s\d]+/,s={},a=function(e){return(e=+e)+(e>68?1900:2e3)};var f=function(e){return function(t){this[e]=+t}},h=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e)return 0;if("Z"===e)return 0;var t=e.match(/([+-]|\d\d)/g),n=60*t[1]+(+t[2]||0);return 0===n?0:"+"===t[0]?-n:n}(e)}],u=function(e){var t=s[e];return t&&(t.indexOf?t:t.s.concat(t.f))},d=function(e,t){var n,r=s.meridiem;if(r){for(var i=1;i<=24;i+=1)if(e.indexOf(r(i,0,t))>-1){n=i>12;break}}else n=e===(t?"pm":"PM");return n},c={A:[o,function(e){this.afternoon=d(e,!1)}],a:[o,function(e){this.afternoon=d(e,!0)}],Q:[n,function(e){this.month=3*(e-1)+1}],S:[n,function(e){this.milliseconds=100*+e}],SS:[r,function(e){this.milliseconds=10*+e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[i,f("seconds")],ss:[i,f("seconds")],m:[i,f("minutes")],mm:[i,f("minutes")],H:[i,f("hours")],h:[i,f("hours")],HH:[i,f("hours")],hh:[i,f("hours")],D:[i,f("day")],DD:[r,f("day")],Do:[o,function(e){var t=s.ordinal,n=e.match(/\d+/);if(this.day=n[0],t)for(var r=1;r<=31;r+=1)t(r).replace(/\[|\]/g,"")===e&&(this.day=r)}],w:[i,f("week")],ww:[r,f("week")],M:[i,f("month")],MM:[r,f("month")],MMM:[o,function(e){var t=u("months"),n=(u("monthsShort")||t.map((function(e){return e.slice(0,3)}))).indexOf(e)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[o,function(e){var t=u("months").indexOf(e)+1;if(t<1)throw new Error;this.month=t%12||t}],Y:[/[+-]?\d+/,f("year")],YY:[r,function(e){this.year=a(e)}],YYYY:[/\d{4}/,f("year")],Z:h,ZZ:h};function l(n){var r,i;r=n,i=s&&s.formats;for(var o=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var o=r&&r.toUpperCase();return n||i[r]||e[r]||i[o].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))).match(t),a=o.length,f=0;f-1)return new Date(("X"===t?1e3:1)*e);var i=l(t)(e),o=i.year,s=i.month,a=i.day,f=i.hours,h=i.minutes,u=i.seconds,d=i.milliseconds,c=i.zone,m=i.week,M=new Date,Y=a||(o||s?1:M.getDate()),p=o||M.getFullYear(),v=0;o&&!s||(v=s>0?s-1:M.getMonth());var D,w=f||0,g=h||0,y=u||0,L=d||0;return c?new Date(Date.UTC(p,v,Y,w,g,y,L+60*c.offset*1e3)):n?new Date(Date.UTC(p,v,Y,w,g,y,L)):(D=new Date(p,v,Y,w,g,y,L),m&&(D=r(D).week(m).toDate()),D)}catch(e){return new Date("")}}(t,a,r,n),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),u&&t!=this.format(a)&&(this.$d=new Date("")),s={}}else if(a instanceof Array)for(var c=a.length,m=1;m<=c;m+=1){o[1]=a[m-1];var M=n.apply(this,o);if(M.isValid()){this.$d=M.$d,this.$L=M.$L,this.init();break}m===c&&(this.$d=new Date(""))}else i.call(this,e)}}})); \ No newline at end of file diff --git a/node_modules/dayjs/plugin/devHelper.js b/node_modules/dayjs/plugin/devHelper.js index a3f6daff..7aaa87a5 100644 --- a/node_modules/dayjs/plugin/devHelper.js +++ b/node_modules/dayjs/plugin/devHelper.js @@ -1 +1 @@ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_plugin_devHelper=t()}(this,(function(){"use strict";return function(e,t,o){if(!process||"production"!==process.env.NODE_ENV){var s=t.prototype,n=s.parse;s.parse=function(e){var t=e.date;return"string"==typeof t&&13===t.length&&console.warn("To parse a Unix timestamp like "+t+", you should pass it as a Number. https://day.js.org/docs/en/parse/unix-timestamp-milliseconds"),"number"==typeof t&&4===String(t).length&&console.warn("Guessing you may want to parse the Year "+t+", you should pass it as a String "+t+", not a Number. Otherwise, "+t+" will be treated as a Unix timestamp"),e.args.length>=2&&!o.p.customParseFormat&&console.warn("To parse a date-time string like "+t+" using the given format, you should enable customParseFormat plugin first. https://day.js.org/docs/en/parse/string-format"),n.bind(this)(e)};var a=o.locale;o.locale=function(e,t,s){return void 0===t&&"string"==typeof e&&(o.Ls[e]||console.warn("Guessing you may want to use locale "+e+", you have to load it before using it. https://day.js.org/docs/en/i18n/loading-into-nodejs")),a(e,t,s)}}}})); \ No newline at end of file +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_plugin_devHelper=t()}(this,(function(){"use strict";return function(e,t,s){if(!process||"production"!==process.env.NODE_ENV){var o=t.prototype,n=o.parse;o.parse=function(e){var t=e.date;return"string"==typeof t&&13===t.length&&console.warn("To parse a Unix timestamp like "+t+", you should pass it as a Number. https://day.js.org/docs/en/parse/unix-timestamp-milliseconds"),"number"==typeof t&&4===String(t).length&&console.warn("Guessing you may want to parse the Year "+t+", you should pass it as a String "+t+", not a Number. Otherwise, "+t+" will be treated as a Unix timestamp"),e.args.length>=2&&!s.p.customParseFormat&&console.warn("To parse a date-time string like "+t+" using the given format, you should enable customParseFormat plugin first. https://day.js.org/docs/en/parse/string-format"),n.bind(this)(e)};var a=s.locale;s.locale=function(e,t,o){return void 0===t&&"string"==typeof e&&(s.Ls[e]||console.warn("Guessing you may want to use locale "+e+", you have to load it before using it. https://day.js.org/docs/en/i18n/loading-into-nodejs")),a(e,t,o)};var i=o.diff;o.diff=function(e,t,o){return(!e||!s(e).isValid())&&console.warn("Invalid usage: diff() requires a valid comparison date as the first argument. https://day.js.org/docs/en/display/difference"),i.call(this,e,t,o)}}}})); \ No newline at end of file diff --git a/node_modules/dayjs/plugin/duration.js b/node_modules/dayjs/plugin/duration.js index bd1c1a21..e9d5a488 100644 --- a/node_modules/dayjs/plugin/duration.js +++ b/node_modules/dayjs/plugin/duration.js @@ -1 +1 @@ -!function(t,s){"object"==typeof exports&&"undefined"!=typeof module?module.exports=s():"function"==typeof define&&define.amd?define(s):(t="undefined"!=typeof globalThis?globalThis:t||self).dayjs_plugin_duration=s()}(this,(function(){"use strict";var t,s,n=1e3,i=6e4,e=36e5,r=864e5,o=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,u=31536e6,h=2592e6,a=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,d={years:u,months:h,days:r,hours:e,minutes:i,seconds:n,milliseconds:1,weeks:6048e5},c=function(t){return t instanceof p},f=function(t,s,n){return new p(t,n,s.$l)},m=function(t){return s.p(t)+"s"},l=function(t){return t<0},$=function(t){return l(t)?Math.ceil(t):Math.floor(t)},y=function(t){return Math.abs(t)},g=function(t,s){return t?l(t)?{negative:!0,format:""+y(t)+s}:{negative:!1,format:""+t+s}:{negative:!1,format:""}},p=function(){function l(t,s,n){var i=this;if(this.$d={},this.$l=n,void 0===t&&(this.$ms=0,this.parseFromMilliseconds()),s)return f(t*d[m(s)],this);if("number"==typeof t)return this.$ms=t,this.parseFromMilliseconds(),this;if("object"==typeof t)return Object.keys(t).forEach((function(s){i.$d[m(s)]=t[s]})),this.calMilliseconds(),this;if("string"==typeof t){var e=t.match(a);if(e){var r=e.slice(2).map((function(t){return null!=t?Number(t):0}));return this.$d.years=r[0],this.$d.months=r[1],this.$d.weeks=r[2],this.$d.days=r[3],this.$d.hours=r[4],this.$d.minutes=r[5],this.$d.seconds=r[6],this.calMilliseconds(),this}}return this}var y=l.prototype;return y.calMilliseconds=function(){var t=this;this.$ms=Object.keys(this.$d).reduce((function(s,n){return s+(t.$d[n]||0)*d[n]}),0)},y.parseFromMilliseconds=function(){var t=this.$ms;this.$d.years=$(t/u),t%=u,this.$d.months=$(t/h),t%=h,this.$d.days=$(t/r),t%=r,this.$d.hours=$(t/e),t%=e,this.$d.minutes=$(t/i),t%=i,this.$d.seconds=$(t/n),t%=n,this.$d.milliseconds=t},y.toISOString=function(){var t=g(this.$d.years,"Y"),s=g(this.$d.months,"M"),n=+this.$d.days||0;this.$d.weeks&&(n+=7*this.$d.weeks);var i=g(n,"D"),e=g(this.$d.hours,"H"),r=g(this.$d.minutes,"M"),o=this.$d.seconds||0;this.$d.milliseconds&&(o+=this.$d.milliseconds/1e3);var u=g(o,"S"),h=t.negative||s.negative||i.negative||e.negative||r.negative||u.negative,a=e.format||r.format||u.format?"T":"",d=(h?"-":"")+"P"+t.format+s.format+i.format+a+e.format+r.format+u.format;return"P"===d||"-P"===d?"P0D":d},y.toJSON=function(){return this.toISOString()},y.format=function(t){var n=t||"YYYY-MM-DDTHH:mm:ss",i={Y:this.$d.years,YY:s.s(this.$d.years,2,"0"),YYYY:s.s(this.$d.years,4,"0"),M:this.$d.months,MM:s.s(this.$d.months,2,"0"),D:this.$d.days,DD:s.s(this.$d.days,2,"0"),H:this.$d.hours,HH:s.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:s.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:s.s(this.$d.seconds,2,"0"),SSS:s.s(this.$d.milliseconds,3,"0")};return n.replace(o,(function(t,s){return s||String(i[t])}))},y.as=function(t){return this.$ms/d[m(t)]},y.get=function(t){var s=this.$ms,n=m(t);return"milliseconds"===n?s%=1e3:s="weeks"===n?$(s/d[n]):this.$d[n],0===s?0:s},y.add=function(t,s,n){var i;return i=s?t*d[m(s)]:c(t)?t.$ms:f(t,this).$ms,f(this.$ms+i*(n?-1:1),this)},y.subtract=function(t,s){return this.add(t,s,!0)},y.locale=function(t){var s=this.clone();return s.$l=t,s},y.clone=function(){return f(this.$ms,this)},y.humanize=function(s){return t().add(this.$ms,"ms").locale(this.$l).fromNow(!s)},y.milliseconds=function(){return this.get("milliseconds")},y.asMilliseconds=function(){return this.as("milliseconds")},y.seconds=function(){return this.get("seconds")},y.asSeconds=function(){return this.as("seconds")},y.minutes=function(){return this.get("minutes")},y.asMinutes=function(){return this.as("minutes")},y.hours=function(){return this.get("hours")},y.asHours=function(){return this.as("hours")},y.days=function(){return this.get("days")},y.asDays=function(){return this.as("days")},y.weeks=function(){return this.get("weeks")},y.asWeeks=function(){return this.as("weeks")},y.months=function(){return this.get("months")},y.asMonths=function(){return this.as("months")},y.years=function(){return this.get("years")},y.asYears=function(){return this.as("years")},l}();return function(n,i,e){t=e,s=e().$utils(),e.duration=function(t,s){var n=e.locale();return f(t,{$l:n},s)},e.isDuration=c;var r=i.prototype.add,o=i.prototype.subtract;i.prototype.add=function(t,s){return c(t)&&(t=t.asMilliseconds()),r.bind(this)(t,s)},i.prototype.subtract=function(t,s){return c(t)&&(t=t.asMilliseconds()),o.bind(this)(t,s)}}})); \ No newline at end of file +!function(t,s){"object"==typeof exports&&"undefined"!=typeof module?module.exports=s():"function"==typeof define&&define.amd?define(s):(t="undefined"!=typeof globalThis?globalThis:t||self).dayjs_plugin_duration=s()}(this,(function(){"use strict";var t,s,n=1e3,i=6e4,e=36e5,r=864e5,o=31536e6,u=2628e6,d=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,a=/\[([^\]]+)]|YYYY|YY|Y|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS/g,h={years:o,months:u,days:r,hours:e,minutes:i,seconds:n,milliseconds:1,weeks:6048e5},c=function(t){return t instanceof g},f=function(t,s,n){return new g(t,n,s.$l)},m=function(t){return s.p(t)+"s"},l=function(t){return t<0},$=function(t){return l(t)?Math.ceil(t):Math.floor(t)},y=function(t){return Math.abs(t)},v=function(t,s){return t?l(t)?{negative:!0,format:""+y(t)+s}:{negative:!1,format:""+t+s}:{negative:!1,format:""}},g=function(){function l(t,s,n){var i=this;if(this.$d={},this.$l=n,void 0===t&&(this.$ms=0,this.parseFromMilliseconds()),s)return f(t*h[m(s)],this);if("number"==typeof t)return this.$ms=t,this.parseFromMilliseconds(),this;if("object"==typeof t)return Object.keys(t).forEach((function(s){i.$d[m(s)]=t[s]})),this.calMilliseconds(),this;if("string"==typeof t){var e=t.match(d);if(e){var r=e.slice(2).map((function(t){return null!=t?Number(t):0}));return this.$d.years=r[0],this.$d.months=r[1],this.$d.weeks=r[2],this.$d.days=r[3],this.$d.hours=r[4],this.$d.minutes=r[5],this.$d.seconds=r[6],this.calMilliseconds(),this}}return this}var y=l.prototype;return y.calMilliseconds=function(){var t=this;this.$ms=Object.keys(this.$d).reduce((function(s,n){return s+(t.$d[n]||0)*h[n]}),0)},y.parseFromMilliseconds=function(){var t=this.$ms;this.$d.years=$(t/o),t%=o,this.$d.months=$(t/u),t%=u,this.$d.days=$(t/r),t%=r,this.$d.hours=$(t/e),t%=e,this.$d.minutes=$(t/i),t%=i,this.$d.seconds=$(t/n),t%=n,this.$d.milliseconds=t},y.toISOString=function(){var t=v(this.$d.years,"Y"),s=v(this.$d.months,"M"),n=+this.$d.days||0;this.$d.weeks&&(n+=7*this.$d.weeks);var i=v(n,"D"),e=v(this.$d.hours,"H"),r=v(this.$d.minutes,"M"),o=this.$d.seconds||0;this.$d.milliseconds&&(o+=this.$d.milliseconds/1e3,o=Math.round(1e3*o)/1e3);var u=v(o,"S"),d=t.negative||s.negative||i.negative||e.negative||r.negative||u.negative,a=e.format||r.format||u.format?"T":"",h=(d?"-":"")+"P"+t.format+s.format+i.format+a+e.format+r.format+u.format;return"P"===h||"-P"===h?"P0D":h},y.toJSON=function(){return this.toISOString()},y.format=function(t){var n=t||"YYYY-MM-DDTHH:mm:ss",i={Y:this.$d.years,YY:s.s(this.$d.years,2,"0"),YYYY:s.s(this.$d.years,4,"0"),M:this.$d.months,MM:s.s(this.$d.months,2,"0"),D:this.$d.days,DD:s.s(this.$d.days,2,"0"),H:this.$d.hours,HH:s.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:s.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:s.s(this.$d.seconds,2,"0"),SSS:s.s(this.$d.milliseconds,3,"0")};return n.replace(a,(function(t,s){return s||String(i[t])}))},y.as=function(t){return this.$ms/h[m(t)]},y.get=function(t){var s=this.$ms,n=m(t);return"milliseconds"===n?s%=1e3:s="weeks"===n?$(s/h[n]):this.$d[n],s||0},y.add=function(t,s,n){var i;return i=s?t*h[m(s)]:c(t)?t.$ms:f(t,this).$ms,f(this.$ms+i*(n?-1:1),this)},y.subtract=function(t,s){return this.add(t,s,!0)},y.locale=function(t){var s=this.clone();return s.$l=t,s},y.clone=function(){return f(this.$ms,this)},y.humanize=function(s){return t().add(this.$ms,"ms").locale(this.$l).fromNow(!s)},y.valueOf=function(){return this.asMilliseconds()},y.milliseconds=function(){return this.get("milliseconds")},y.asMilliseconds=function(){return this.as("milliseconds")},y.seconds=function(){return this.get("seconds")},y.asSeconds=function(){return this.as("seconds")},y.minutes=function(){return this.get("minutes")},y.asMinutes=function(){return this.as("minutes")},y.hours=function(){return this.get("hours")},y.asHours=function(){return this.as("hours")},y.days=function(){return this.get("days")},y.asDays=function(){return this.as("days")},y.weeks=function(){return this.get("weeks")},y.asWeeks=function(){return this.as("weeks")},y.months=function(){return this.get("months")},y.asMonths=function(){return this.as("months")},y.years=function(){return this.get("years")},y.asYears=function(){return this.as("years")},l}(),p=function(t,s,n){return t.add(s.years()*n,"y").add(s.months()*n,"M").add(s.days()*n,"d").add(s.hours()*n,"h").add(s.minutes()*n,"m").add(s.seconds()*n,"s").add(s.milliseconds()*n,"ms")};return function(n,i,e){t=e,s=e().$utils(),e.duration=function(t,s){var n=e.locale();return f(t,{$l:n},s)},e.isDuration=c;var r=i.prototype.add,o=i.prototype.subtract;i.prototype.add=function(t,s){return c(t)?p(this,t,1):r.bind(this)(t,s)},i.prototype.subtract=function(t,s){return c(t)?p(this,t,-1):o.bind(this)(t,s)}}})); \ No newline at end of file diff --git a/node_modules/dayjs/plugin/isSameOrAfter.d.ts b/node_modules/dayjs/plugin/isSameOrAfter.d.ts index 1c8c2649..916bc801 100644 --- a/node_modules/dayjs/plugin/isSameOrAfter.d.ts +++ b/node_modules/dayjs/plugin/isSameOrAfter.d.ts @@ -5,6 +5,6 @@ export = plugin declare module 'dayjs' { interface Dayjs { - isSameOrAfter(date: ConfigType, unit?: OpUnitType): boolean + isSameOrAfter(date?: ConfigType, unit?: OpUnitType): boolean } } diff --git a/node_modules/dayjs/plugin/isSameOrBefore.d.ts b/node_modules/dayjs/plugin/isSameOrBefore.d.ts index 1df5492c..d52b0955 100644 --- a/node_modules/dayjs/plugin/isSameOrBefore.d.ts +++ b/node_modules/dayjs/plugin/isSameOrBefore.d.ts @@ -5,6 +5,6 @@ export = plugin declare module 'dayjs' { interface Dayjs { - isSameOrBefore(date: ConfigType, unit?: OpUnitType): boolean + isSameOrBefore(date?: ConfigType, unit?: OpUnitType): boolean } } diff --git a/node_modules/dayjs/plugin/isoWeek.d.ts b/node_modules/dayjs/plugin/isoWeek.d.ts index 26c591ba..3f4d88f6 100644 --- a/node_modules/dayjs/plugin/isoWeek.d.ts +++ b/node_modules/dayjs/plugin/isoWeek.d.ts @@ -18,10 +18,10 @@ declare module 'dayjs' { endOf(unit: ISOUnitType): Dayjs - isSame(date: ConfigType, unit?: ISOUnitType): boolean + isSame(date?: ConfigType, unit?: ISOUnitType): boolean - isBefore(date: ConfigType, unit?: ISOUnitType): boolean + isBefore(date?: ConfigType, unit?: ISOUnitType): boolean - isAfter(date: ConfigType, unit?: ISOUnitType): boolean + isAfter(date?: ConfigType, unit?: ISOUnitType): boolean } } diff --git a/node_modules/dayjs/plugin/minMax.d.ts b/node_modules/dayjs/plugin/minMax.d.ts index f1673500..7d0827f1 100644 --- a/node_modules/dayjs/plugin/minMax.d.ts +++ b/node_modules/dayjs/plugin/minMax.d.ts @@ -4,8 +4,19 @@ declare const plugin: PluginFunc export = plugin declare module 'dayjs' { - export function max(dayjs: Dayjs[]): Dayjs - export function max(...dayjs: Dayjs[]): Dayjs - export function min(dayjs: Dayjs[]): Dayjs - export function min(...dayjs: Dayjs[]): Dayjs + export function max(dayjs: [Dayjs, ...Dayjs[]]): Dayjs + export function max(noDates: never[]): null + export function max(maybeDates: Dayjs[]): Dayjs | null + + export function max(...dayjs: [Dayjs, ...Dayjs[]]): Dayjs + export function max(...noDates: never[]): null + export function max(...maybeDates: Dayjs[]): Dayjs | null + + export function min(dayjs: [Dayjs, ...Dayjs[]]): Dayjs + export function min(noDates: never[]): null + export function min(maybeDates: Dayjs[]): Dayjs | null + + export function min(...dayjs: [Dayjs, ...Dayjs[]]): Dayjs + export function min(...noDates: never[]): null + export function min(...maybeDates: Dayjs[]): Dayjs | null } diff --git a/node_modules/dayjs/plugin/minMax.js b/node_modules/dayjs/plugin/minMax.js index ef427f91..ce063146 100644 --- a/node_modules/dayjs/plugin/minMax.js +++ b/node_modules/dayjs/plugin/minMax.js @@ -1 +1 @@ -!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_plugin_minMax=n()}(this,(function(){"use strict";return function(e,n,t){var i=function(e,n){if(!n||!n.length||!n[0]||1===n.length&&!n[0].length)return null;var t;1===n.length&&n[0].length>0&&(n=n[0]);t=n[0];for(var i=1;i0&&(n=n[0]);t=(n=n.filter((function(e){return e})))[0];for(var i=1;i=0?1:u.date()),s=a.year||u.year(),d=a.month>=0?a.month:a.year||a.day?0:u.month(),f=a.hour||0,b=a.minute||0,h=a.second||0,y=a.millisecond||0;return o?new Date(Date.UTC(s,d,c,f,b,h,y)):new Date(s,d,c,f,b,h,y)}return r},o=i.parse;i.parse=function(t){t.date=r.bind(this)(t),o.bind(this)(t)};var a=i.set,u=i.add,c=i.subtract,s=function(t,n,e,i){void 0===i&&(i=1);var r=Object.keys(n),o=this;return r.forEach((function(e){o=t.bind(o)(n[e]*i,e)})),o};i.set=function(t,n){return n=void 0===n?t:n,"Object"===t.constructor.name?s.bind(this)((function(t,n){return a.bind(this)(n,t)}),n,t):a.bind(this)(t,n)},i.add=function(t,n){return"Object"===t.constructor.name?s.bind(this)(u,t,n):u.bind(this)(t,n)},i.subtract=function(t,n){return"Object"===t.constructor.name?s.bind(this)(u,t,n,-1):c.bind(this)(t,n)}}})); \ No newline at end of file +!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(t="undefined"!=typeof globalThis?globalThis:t||self).dayjs_plugin_objectSupport=n()}(this,(function(){"use strict";return function(t,n,e){var i=n.prototype,r=function(t){var n,r=t.date,o=t.utc,u={};if(!(null===(n=r)||n instanceof Date||n instanceof Array||i.$utils().u(n)||"Object"!==n.constructor.name)){if(!Object.keys(r).length)return new Date;var a=o?e.utc():e();Object.keys(r).forEach((function(t){var n,e;u[(n=t,e=i.$utils().p(n),"date"===e?"day":e)]=r[t]}));var c=u.day||(u.year||u.month>=0?1:a.date()),s=u.year||a.year(),d=u.month>=0?u.month:u.year||u.day?0:a.month(),f=u.hour||0,b=u.minute||0,h=u.second||0,y=u.millisecond||0;return o?new Date(Date.UTC(s,d,c,f,b,h,y)):new Date(s,d,c,f,b,h,y)}return r},o=i.parse;i.parse=function(t){t.date=r.bind(this)(t),o.bind(this)(t)};var u=i.set,a=i.add,c=i.subtract,s=function(t,n,e,i){void 0===i&&(i=1);var r=Object.keys(n),o=this;return r.forEach((function(e){o=t.bind(o)(n[e]*i,e)})),o};i.set=function(t,n){return n=void 0===n?t:n,"Object"===t.constructor.name?s.bind(this)((function(t,n){return u.bind(this)(n,t)}),n,t):u.bind(this)(t,n)},i.add=function(t,n){return"Object"===t.constructor.name?s.bind(this)(a,t,n):a.bind(this)(t,n)},i.subtract=function(t,n){return"Object"===t.constructor.name?s.bind(this)(a,t,n,-1):c.bind(this)(t,n)}}})); \ No newline at end of file diff --git a/node_modules/dayjs/plugin/quarterOfYear.d.ts b/node_modules/dayjs/plugin/quarterOfYear.d.ts index 8a9cc1e3..317e0ad2 100644 --- a/node_modules/dayjs/plugin/quarterOfYear.d.ts +++ b/node_modules/dayjs/plugin/quarterOfYear.d.ts @@ -17,10 +17,10 @@ declare module 'dayjs' { endOf(unit: QUnitType | OpUnitType): Dayjs - isSame(date: ConfigType, unit?: QUnitType): boolean + isSame(date?: ConfigType, unit?: QUnitType): boolean - isBefore(date: ConfigType, unit?: QUnitType): boolean + isBefore(date?: ConfigType, unit?: QUnitType): boolean - isAfter(date: ConfigType, unit?: QUnitType): boolean + isAfter(date?: ConfigType, unit?: QUnitType): boolean } } diff --git a/node_modules/dayjs/plugin/timezone.d.ts b/node_modules/dayjs/plugin/timezone.d.ts index d504f692..049bb087 100644 --- a/node_modules/dayjs/plugin/timezone.d.ts +++ b/node_modules/dayjs/plugin/timezone.d.ts @@ -10,7 +10,7 @@ declare module 'dayjs' { } interface DayjsTimezone { - (date: ConfigType, timezone?: string): Dayjs + (date?: ConfigType, timezone?: string): Dayjs (date: ConfigType, format: string, timezone?: string): Dayjs guess(): string setDefault(timezone?: string): void diff --git a/node_modules/dayjs/plugin/timezone.js b/node_modules/dayjs/plugin/timezone.js index fb6112a9..90f8fe70 100644 --- a/node_modules/dayjs/plugin/timezone.js +++ b/node_modules/dayjs/plugin/timezone.js @@ -1 +1 @@ -!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).dayjs_plugin_timezone=e()}(this,(function(){"use strict";var t={year:0,month:1,day:2,hour:3,minute:4,second:5},e={};return function(n,i,o){var r,a=function(t,n,i){void 0===i&&(i={});var o=new Date(t),r=function(t,n){void 0===n&&(n={});var i=n.timeZoneName||"short",o=t+"|"+i,r=e[o];return r||(r=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:i}),e[o]=r),r}(n,i);return r.formatToParts(o)},u=function(e,n){for(var i=a(e,n),r=[],u=0;u=0&&(r[c]=parseInt(m,10))}var d=r[3],l=24===d?0:d,v=r[0]+"-"+r[1]+"-"+r[2]+" "+l+":"+r[4]+":"+r[5]+":000",h=+e;return(o.utc(v).valueOf()-(h-=h%1e3))/6e4},f=i.prototype;f.tz=function(t,e){void 0===t&&(t=r);var n=this.utcOffset(),i=this.toDate(),a=i.toLocaleString("en-US",{timeZone:t}),u=Math.round((i-new Date(a))/1e3/60),f=o(a).$set("millisecond",this.$ms).utcOffset(15*-Math.round(i.getTimezoneOffset()/15)-u,!0);if(e){var s=f.utcOffset();f=f.add(n-s,"minute")}return f.$x.$timezone=t,f},f.offsetName=function(t){var e=this.$x.$timezone||o.tz.guess(),n=a(this.valueOf(),e,{timeZoneName:t}).find((function(t){return"timezonename"===t.type.toLowerCase()}));return n&&n.value};var s=f.startOf;f.startOf=function(t,e){if(!this.$x||!this.$x.$timezone)return s.call(this,t,e);var n=o(this.format("YYYY-MM-DD HH:mm:ss:SSS"));return s.call(n,t,e).tz(this.$x.$timezone,!0)},o.tz=function(t,e,n){var i=n&&e,a=n||e||r,f=u(+o(),a);if("string"!=typeof t)return o(t).tz(a);var s=function(t,e,n){var i=t-60*e*1e3,o=u(i,n);if(e===o)return[i,e];var r=u(i-=60*(o-e)*1e3,n);return o===r?[i,o]:[t-60*Math.min(o,r)*1e3,Math.max(o,r)]}(o.utc(t,i).valueOf(),f,a),m=s[0],c=s[1],d=o(m).utcOffset(c);return d.$x.$timezone=a,d},o.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},o.tz.setDefault=function(t){r=t}}})); \ No newline at end of file +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).dayjs_plugin_timezone=e()}(this,(function(){"use strict";var t={year:0,month:1,day:2,hour:3,minute:4,second:5},e={};return function(n,i,r){var o,a=function(t,n,i){void 0===i&&(i={});var r=new Date(t),o=function(t,n){void 0===n&&(n={});var i=n.timeZoneName||"short",r=t+"|"+i,o=e[r];return o||(o=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:i}),e[r]=o),o}(n,i);return o.formatToParts(r)},u=function(e,n){for(var i=a(e,n),o=[],u=0;u=0&&(o[c]=parseInt(m,10))}var l=o[3],d=24===l?0:l,h=o[0]+"-"+o[1]+"-"+o[2]+" "+d+":"+o[4]+":"+o[5]+":000",v=+e;return(r.utc(h).valueOf()-(v-=v%1e3))/6e4},f=i.prototype;f.tz=function(t,e){if(void 0===t&&(t=o),!this.isValid())return this;var n,i=this.utcOffset(),a=this.toDate(),f=a.toLocaleString("en-US",{timeZone:t}),s=u(+a,t);if(!Number(s))n=this.utcOffset(0,e);else if(n=r(f,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(s,!0),e){var m=n.utcOffset();n=n.add(i-m,"minute")}return n.$x.$timezone=t,n},f.offsetName=function(t){var e=this.$x.$timezone||r.tz.guess(),n=a(this.valueOf(),e,{timeZoneName:t}).find((function(t){return"timezonename"===t.type.toLowerCase()}));return n&&n.value};var s=f.startOf;f.startOf=function(t,e){if(!this.$x||!this.$x.$timezone)return s.call(this,t,e);var n=r(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return s.call(n,t,e).tz(this.$x.$timezone,!0)},r.tz=function(t,e,n){var i=n&&e,a=n||e||o,f=u(+r(),a);if("string"!=typeof t)return r(t).tz(a);var s=r.utc(t,i).valueOf();if(Number.isNaN(s)){var m=r(NaN);return m.$x.$timezone=a,m}var c=function(t,e,n){var i=t-60*e*1e3,r=u(i,n);if(e===r)return[i,e];var o=u(i-=60*(r-e)*1e3,n);return r===o?[i,r]:[t-60*Math.min(r,o)*1e3,Math.max(r,o)]}(s,f,a),l=c[0],d=c[1],h=r(l).utcOffset(d);return h.$x.$timezone=a,h},r.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},r.tz.setDefault=function(t){o=t}}})); \ No newline at end of file diff --git a/node_modules/dayjs/plugin/updateLocale.js b/node_modules/dayjs/plugin/updateLocale.js index 811d9e91..03d1d158 100644 --- a/node_modules/dayjs/plugin/updateLocale.js +++ b/node_modules/dayjs/plugin/updateLocale.js @@ -1 +1 @@ -!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_plugin_updateLocale=n()}(this,(function(){"use strict";return function(e,n,t){t.updateLocale=function(e,n){var o=t.Ls[e];if(o)return(n?Object.keys(n):[]).forEach((function(e){o[e]=n[e]})),o}}})); \ No newline at end of file +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_plugin_updateLocale=t()}(this,(function(){"use strict";function e(){return e=Object.assign||function(e){for(var t=1;t 'unicorn_rainbow' - -decamelize('unicornRainbow', '-'); -//=> 'unicorn-rainbow' -``` -*/ -declare function decamelize(string: string, separator?: string): string; - -export = decamelize; diff --git a/node_modules/decamelize/index.js b/node_modules/decamelize/index.js deleted file mode 100644 index 702e270e..00000000 --- a/node_modules/decamelize/index.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -module.exports = (text, separator = '_') => { - if (!(typeof text === 'string' && typeof separator === 'string')) { - throw new TypeError('The `text` and `separator` arguments should be of type `string`'); - } - - return text - .replace(/([\p{Lowercase_Letter}\d])(\p{Uppercase_Letter})/gu, `$1${separator}$2`) - .replace(/(\p{Uppercase_Letter}+)(\p{Uppercase_Letter}\p{Lowercase_Letter}+)/gu, `$1${separator}$2`) - .toLowerCase(); -}; diff --git a/node_modules/decamelize/license b/node_modules/decamelize/license deleted file mode 100644 index e7af2f77..00000000 --- a/node_modules/decamelize/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/decamelize/package.json b/node_modules/decamelize/package.json deleted file mode 100644 index 116ae7a8..00000000 --- a/node_modules/decamelize/package.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "decamelize", - "version": "4.0.0", - "description": "Convert a camelized string into a lowercased one with a custom separator: unicornRainbow → unicorn_rainbow", - "license": "MIT", - "repository": "sindresorhus/decamelize", - "funding": "https://github.com/sponsors/sindresorhus", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=10" - }, - "scripts": { - "test": "xo && ava && tsd" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "keywords": [ - "decamelize", - "decamelcase", - "camelcase", - "lowercase", - "case", - "dash", - "hyphen", - "string", - "text", - "convert" - ], - "devDependencies": { - "ava": "^2.4.0", - "tsd": "^0.11.0", - "xo": "^0.24.0" - } -} diff --git a/node_modules/decamelize/readme.md b/node_modules/decamelize/readme.md deleted file mode 100644 index 4fd4e2c7..00000000 --- a/node_modules/decamelize/readme.md +++ /dev/null @@ -1,51 +0,0 @@ -# decamelize [![Build Status](https://travis-ci.org/sindresorhus/decamelize.svg?branch=master)](https://travis-ci.org/sindresorhus/decamelize) - -> Convert a camelized string into a lowercased one with a custom separator
-> Example: `unicornRainbow` → `unicorn_rainbow` - -## Install - -``` -$ npm install decamelize -``` - -## Usage - -```js -const decamelize = require('decamelize'); - -decamelize('unicornRainbow'); -//=> 'unicorn_rainbow' - -decamelize('unicornRainbow', '-'); -//=> 'unicorn-rainbow' -``` - -## API - -### decamelize(input, separator?) - -#### input - -Type: `string` - -#### separator - -Type: `string`\ -Default: `'_'` - -## Related - -See [`camelcase`](https://github.com/sindresorhus/camelcase) for the inverse. - ---- - -

- - Get professional support for this package with a Tidelift subscription - -
- - Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. -
-
diff --git a/node_modules/eastasianwidth/README.md b/node_modules/eastasianwidth/README.md deleted file mode 100644 index a8b71ee5..00000000 --- a/node_modules/eastasianwidth/README.md +++ /dev/null @@ -1,32 +0,0 @@ -# East Asian Width - -Get [East Asian Width](http://www.unicode.org/reports/tr11/) from a character. - -'F'(Fullwidth), 'H'(Halfwidth), 'W'(Wide), 'Na'(Narrow), 'A'(Ambiguous) or 'N'(Natural). - -Original Code is [東アジアの文字幅 (East Asian Width) の判定 - 中途](http://d.hatena.ne.jp/takenspc/20111126#1322252878). - -## Install - - $ npm install eastasianwidth - -## Usage - - var eaw = require('eastasianwidth'); - console.log(eaw.eastAsianWidth('₩')) // 'F' - console.log(eaw.eastAsianWidth('。')) // 'H' - console.log(eaw.eastAsianWidth('뀀')) // 'W' - console.log(eaw.eastAsianWidth('a')) // 'Na' - console.log(eaw.eastAsianWidth('①')) // 'A' - console.log(eaw.eastAsianWidth('ف')) // 'N' - - console.log(eaw.characterLength('₩')) // 2 - console.log(eaw.characterLength('。')) // 1 - console.log(eaw.characterLength('뀀')) // 2 - console.log(eaw.characterLength('a')) // 1 - console.log(eaw.characterLength('①')) // 2 - console.log(eaw.characterLength('ف')) // 1 - - console.log(eaw.length('あいうえお')) // 10 - console.log(eaw.length('abcdefg')) // 7 - console.log(eaw.length('¢₩。ᅵㄅ뀀¢⟭a⊙①بف')) // 19 diff --git a/node_modules/eastasianwidth/eastasianwidth.js b/node_modules/eastasianwidth/eastasianwidth.js deleted file mode 100644 index 7d0aa0f6..00000000 --- a/node_modules/eastasianwidth/eastasianwidth.js +++ /dev/null @@ -1,311 +0,0 @@ -var eaw = {}; - -if ('undefined' == typeof module) { - window.eastasianwidth = eaw; -} else { - module.exports = eaw; -} - -eaw.eastAsianWidth = function(character) { - var x = character.charCodeAt(0); - var y = (character.length == 2) ? character.charCodeAt(1) : 0; - var codePoint = x; - if ((0xD800 <= x && x <= 0xDBFF) && (0xDC00 <= y && y <= 0xDFFF)) { - x &= 0x3FF; - y &= 0x3FF; - codePoint = (x << 10) | y; - codePoint += 0x10000; - } - - if ((0x3000 == codePoint) || - (0xFF01 <= codePoint && codePoint <= 0xFF60) || - (0xFFE0 <= codePoint && codePoint <= 0xFFE6)) { - return 'F'; - } - if ((0x20A9 == codePoint) || - (0xFF61 <= codePoint && codePoint <= 0xFFBE) || - (0xFFC2 <= codePoint && codePoint <= 0xFFC7) || - (0xFFCA <= codePoint && codePoint <= 0xFFCF) || - (0xFFD2 <= codePoint && codePoint <= 0xFFD7) || - (0xFFDA <= codePoint && codePoint <= 0xFFDC) || - (0xFFE8 <= codePoint && codePoint <= 0xFFEE)) { - return 'H'; - } - if ((0x1100 <= codePoint && codePoint <= 0x115F) || - (0x11A3 <= codePoint && codePoint <= 0x11A7) || - (0x11FA <= codePoint && codePoint <= 0x11FF) || - (0x2329 <= codePoint && codePoint <= 0x232A) || - (0x2E80 <= codePoint && codePoint <= 0x2E99) || - (0x2E9B <= codePoint && codePoint <= 0x2EF3) || - (0x2F00 <= codePoint && codePoint <= 0x2FD5) || - (0x2FF0 <= codePoint && codePoint <= 0x2FFB) || - (0x3001 <= codePoint && codePoint <= 0x303E) || - (0x3041 <= codePoint && codePoint <= 0x3096) || - (0x3099 <= codePoint && codePoint <= 0x30FF) || - (0x3105 <= codePoint && codePoint <= 0x312D) || - (0x3131 <= codePoint && codePoint <= 0x318E) || - (0x3190 <= codePoint && codePoint <= 0x31BA) || - (0x31C0 <= codePoint && codePoint <= 0x31E3) || - (0x31F0 <= codePoint && codePoint <= 0x321E) || - (0x3220 <= codePoint && codePoint <= 0x3247) || - (0x3250 <= codePoint && codePoint <= 0x32FE) || - (0x3300 <= codePoint && codePoint <= 0x4DBF) || - (0x4E00 <= codePoint && codePoint <= 0xA48C) || - (0xA490 <= codePoint && codePoint <= 0xA4C6) || - (0xA960 <= codePoint && codePoint <= 0xA97C) || - (0xAC00 <= codePoint && codePoint <= 0xD7A3) || - (0xD7B0 <= codePoint && codePoint <= 0xD7C6) || - (0xD7CB <= codePoint && codePoint <= 0xD7FB) || - (0xF900 <= codePoint && codePoint <= 0xFAFF) || - (0xFE10 <= codePoint && codePoint <= 0xFE19) || - (0xFE30 <= codePoint && codePoint <= 0xFE52) || - (0xFE54 <= codePoint && codePoint <= 0xFE66) || - (0xFE68 <= codePoint && codePoint <= 0xFE6B) || - (0x1B000 <= codePoint && codePoint <= 0x1B001) || - (0x1F200 <= codePoint && codePoint <= 0x1F202) || - (0x1F210 <= codePoint && codePoint <= 0x1F23A) || - (0x1F240 <= codePoint && codePoint <= 0x1F248) || - (0x1F250 <= codePoint && codePoint <= 0x1F251) || - (0x20000 <= codePoint && codePoint <= 0x2F73F) || - (0x2B740 <= codePoint && codePoint <= 0x2FFFD) || - (0x30000 <= codePoint && codePoint <= 0x3FFFD)) { - return 'W'; - } - if ((0x0020 <= codePoint && codePoint <= 0x007E) || - (0x00A2 <= codePoint && codePoint <= 0x00A3) || - (0x00A5 <= codePoint && codePoint <= 0x00A6) || - (0x00AC == codePoint) || - (0x00AF == codePoint) || - (0x27E6 <= codePoint && codePoint <= 0x27ED) || - (0x2985 <= codePoint && codePoint <= 0x2986)) { - return 'Na'; - } - if ((0x00A1 == codePoint) || - (0x00A4 == codePoint) || - (0x00A7 <= codePoint && codePoint <= 0x00A8) || - (0x00AA == codePoint) || - (0x00AD <= codePoint && codePoint <= 0x00AE) || - (0x00B0 <= codePoint && codePoint <= 0x00B4) || - (0x00B6 <= codePoint && codePoint <= 0x00BA) || - (0x00BC <= codePoint && codePoint <= 0x00BF) || - (0x00C6 == codePoint) || - (0x00D0 == codePoint) || - (0x00D7 <= codePoint && codePoint <= 0x00D8) || - (0x00DE <= codePoint && codePoint <= 0x00E1) || - (0x00E6 == codePoint) || - (0x00E8 <= codePoint && codePoint <= 0x00EA) || - (0x00EC <= codePoint && codePoint <= 0x00ED) || - (0x00F0 == codePoint) || - (0x00F2 <= codePoint && codePoint <= 0x00F3) || - (0x00F7 <= codePoint && codePoint <= 0x00FA) || - (0x00FC == codePoint) || - (0x00FE == codePoint) || - (0x0101 == codePoint) || - (0x0111 == codePoint) || - (0x0113 == codePoint) || - (0x011B == codePoint) || - (0x0126 <= codePoint && codePoint <= 0x0127) || - (0x012B == codePoint) || - (0x0131 <= codePoint && codePoint <= 0x0133) || - (0x0138 == codePoint) || - (0x013F <= codePoint && codePoint <= 0x0142) || - (0x0144 == codePoint) || - (0x0148 <= codePoint && codePoint <= 0x014B) || - (0x014D == codePoint) || - (0x0152 <= codePoint && codePoint <= 0x0153) || - (0x0166 <= codePoint && codePoint <= 0x0167) || - (0x016B == codePoint) || - (0x01CE == codePoint) || - (0x01D0 == codePoint) || - (0x01D2 == codePoint) || - (0x01D4 == codePoint) || - (0x01D6 == codePoint) || - (0x01D8 == codePoint) || - (0x01DA == codePoint) || - (0x01DC == codePoint) || - (0x0251 == codePoint) || - (0x0261 == codePoint) || - (0x02C4 == codePoint) || - (0x02C7 == codePoint) || - (0x02C9 <= codePoint && codePoint <= 0x02CB) || - (0x02CD == codePoint) || - (0x02D0 == codePoint) || - (0x02D8 <= codePoint && codePoint <= 0x02DB) || - (0x02DD == codePoint) || - (0x02DF == codePoint) || - (0x0300 <= codePoint && codePoint <= 0x036F) || - (0x0391 <= codePoint && codePoint <= 0x03A1) || - (0x03A3 <= codePoint && codePoint <= 0x03A9) || - (0x03B1 <= codePoint && codePoint <= 0x03C1) || - (0x03C3 <= codePoint && codePoint <= 0x03C9) || - (0x0401 == codePoint) || - (0x0410 <= codePoint && codePoint <= 0x044F) || - (0x0451 == codePoint) || - (0x2010 == codePoint) || - (0x2013 <= codePoint && codePoint <= 0x2016) || - (0x2018 <= codePoint && codePoint <= 0x2019) || - (0x201C <= codePoint && codePoint <= 0x201D) || - (0x2020 <= codePoint && codePoint <= 0x2022) || - (0x2024 <= codePoint && codePoint <= 0x2027) || - (0x2030 == codePoint) || - (0x2032 <= codePoint && codePoint <= 0x2033) || - (0x2035 == codePoint) || - (0x203B == codePoint) || - (0x203E == codePoint) || - (0x2074 == codePoint) || - (0x207F == codePoint) || - (0x2081 <= codePoint && codePoint <= 0x2084) || - (0x20AC == codePoint) || - (0x2103 == codePoint) || - (0x2105 == codePoint) || - (0x2109 == codePoint) || - (0x2113 == codePoint) || - (0x2116 == codePoint) || - (0x2121 <= codePoint && codePoint <= 0x2122) || - (0x2126 == codePoint) || - (0x212B == codePoint) || - (0x2153 <= codePoint && codePoint <= 0x2154) || - (0x215B <= codePoint && codePoint <= 0x215E) || - (0x2160 <= codePoint && codePoint <= 0x216B) || - (0x2170 <= codePoint && codePoint <= 0x2179) || - (0x2189 == codePoint) || - (0x2190 <= codePoint && codePoint <= 0x2199) || - (0x21B8 <= codePoint && codePoint <= 0x21B9) || - (0x21D2 == codePoint) || - (0x21D4 == codePoint) || - (0x21E7 == codePoint) || - (0x2200 == codePoint) || - (0x2202 <= codePoint && codePoint <= 0x2203) || - (0x2207 <= codePoint && codePoint <= 0x2208) || - (0x220B == codePoint) || - (0x220F == codePoint) || - (0x2211 == codePoint) || - (0x2215 == codePoint) || - (0x221A == codePoint) || - (0x221D <= codePoint && codePoint <= 0x2220) || - (0x2223 == codePoint) || - (0x2225 == codePoint) || - (0x2227 <= codePoint && codePoint <= 0x222C) || - (0x222E == codePoint) || - (0x2234 <= codePoint && codePoint <= 0x2237) || - (0x223C <= codePoint && codePoint <= 0x223D) || - (0x2248 == codePoint) || - (0x224C == codePoint) || - (0x2252 == codePoint) || - (0x2260 <= codePoint && codePoint <= 0x2261) || - (0x2264 <= codePoint && codePoint <= 0x2267) || - (0x226A <= codePoint && codePoint <= 0x226B) || - (0x226E <= codePoint && codePoint <= 0x226F) || - (0x2282 <= codePoint && codePoint <= 0x2283) || - (0x2286 <= codePoint && codePoint <= 0x2287) || - (0x2295 == codePoint) || - (0x2299 == codePoint) || - (0x22A5 == codePoint) || - (0x22BF == codePoint) || - (0x2312 == codePoint) || - (0x2460 <= codePoint && codePoint <= 0x24E9) || - (0x24EB <= codePoint && codePoint <= 0x254B) || - (0x2550 <= codePoint && codePoint <= 0x2573) || - (0x2580 <= codePoint && codePoint <= 0x258F) || - (0x2592 <= codePoint && codePoint <= 0x2595) || - (0x25A0 <= codePoint && codePoint <= 0x25A1) || - (0x25A3 <= codePoint && codePoint <= 0x25A9) || - (0x25B2 <= codePoint && codePoint <= 0x25B3) || - (0x25B6 <= codePoint && codePoint <= 0x25B7) || - (0x25BC <= codePoint && codePoint <= 0x25BD) || - (0x25C0 <= codePoint && codePoint <= 0x25C1) || - (0x25C6 <= codePoint && codePoint <= 0x25C8) || - (0x25CB == codePoint) || - (0x25CE <= codePoint && codePoint <= 0x25D1) || - (0x25E2 <= codePoint && codePoint <= 0x25E5) || - (0x25EF == codePoint) || - (0x2605 <= codePoint && codePoint <= 0x2606) || - (0x2609 == codePoint) || - (0x260E <= codePoint && codePoint <= 0x260F) || - (0x2614 <= codePoint && codePoint <= 0x2615) || - (0x261C == codePoint) || - (0x261E == codePoint) || - (0x2640 == codePoint) || - (0x2642 == codePoint) || - (0x2660 <= codePoint && codePoint <= 0x2661) || - (0x2663 <= codePoint && codePoint <= 0x2665) || - (0x2667 <= codePoint && codePoint <= 0x266A) || - (0x266C <= codePoint && codePoint <= 0x266D) || - (0x266F == codePoint) || - (0x269E <= codePoint && codePoint <= 0x269F) || - (0x26BE <= codePoint && codePoint <= 0x26BF) || - (0x26C4 <= codePoint && codePoint <= 0x26CD) || - (0x26CF <= codePoint && codePoint <= 0x26E1) || - (0x26E3 == codePoint) || - (0x26E8 <= codePoint && codePoint <= 0x26FF) || - (0x273D == codePoint) || - (0x2757 == codePoint) || - (0x2776 <= codePoint && codePoint <= 0x277F) || - (0x2B55 <= codePoint && codePoint <= 0x2B59) || - (0x3248 <= codePoint && codePoint <= 0x324F) || - (0xE000 <= codePoint && codePoint <= 0xF8FF) || - (0xFE00 <= codePoint && codePoint <= 0xFE0F) || - (0xFFFD == codePoint) || - (0x1F100 <= codePoint && codePoint <= 0x1F10A) || - (0x1F110 <= codePoint && codePoint <= 0x1F12D) || - (0x1F130 <= codePoint && codePoint <= 0x1F169) || - (0x1F170 <= codePoint && codePoint <= 0x1F19A) || - (0xE0100 <= codePoint && codePoint <= 0xE01EF) || - (0xF0000 <= codePoint && codePoint <= 0xFFFFD) || - (0x100000 <= codePoint && codePoint <= 0x10FFFD)) { - return 'A'; - } - - return 'N'; -}; - -eaw.characterLength = function(character) { - var code = this.eastAsianWidth(character); - if (code == 'F' || code == 'W' || code == 'A') { - return 2; - } else { - return 1; - } -}; - -// Split a string considering surrogate-pairs. -function stringToArray(string) { - return string.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g) || []; -} - -eaw.length = function(string) { - var characters = stringToArray(string); - var len = 0; - for (var i = 0; i < characters.length; i++) { - len = len + this.characterLength(characters[i]); - } - return len; -}; - -eaw.slice = function(text, start, end) { - textLen = eaw.length(text) - start = start ? start : 0; - end = end ? end : 1; - if (start < 0) { - start = textLen + start; - } - if (end < 0) { - end = textLen + end; - } - var result = ''; - var eawLen = 0; - var chars = stringToArray(text); - for (var i = 0; i < chars.length; i++) { - var char = chars[i]; - var charLen = eaw.length(char); - if (eawLen >= start - (charLen == 2 ? 1 : 0)) { - if (eawLen + charLen <= end) { - result += char; - } else { - break; - } - } - eawLen += charLen; - } - return result; -}; diff --git a/node_modules/eastasianwidth/package.json b/node_modules/eastasianwidth/package.json deleted file mode 100644 index cb7ac6ab..00000000 --- a/node_modules/eastasianwidth/package.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "eastasianwidth", - "version": "0.2.0", - "description": "Get East Asian Width from a character.", - "main": "eastasianwidth.js", - "files": [ - "eastasianwidth.js" - ], - "scripts": { - "test": "mocha" - }, - "repository": "git://github.com/komagata/eastasianwidth.git", - "author": "Masaki Komagata", - "license": "MIT", - "devDependencies": { - "mocha": "~1.9.0" - } -} diff --git a/node_modules/flat/.travis.yml b/node_modules/flat/.travis.yml deleted file mode 100644 index f35768a9..00000000 --- a/node_modules/flat/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: node_js -node_js: - - "6" - - "7" - - "8" - - "10" - - "12" - - "14" diff --git a/node_modules/flat/LICENSE b/node_modules/flat/LICENSE deleted file mode 100644 index d99b6554..00000000 --- a/node_modules/flat/LICENSE +++ /dev/null @@ -1,12 +0,0 @@ -Copyright (c) 2014, Hugh Kennedy -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - -3. Neither the name of the nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/flat/README.md b/node_modules/flat/README.md deleted file mode 100644 index a036a9f2..00000000 --- a/node_modules/flat/README.md +++ /dev/null @@ -1,236 +0,0 @@ -# flat [![Build Status](https://secure.travis-ci.org/hughsk/flat.png?branch=master)](http://travis-ci.org/hughsk/flat) - -Take a nested Javascript object and flatten it, or unflatten an object with -delimited keys. - -## Installation - -``` bash -$ npm install flat -``` - -## Methods - -### flatten(original, options) - -Flattens the object - it'll return an object one level deep, regardless of how -nested the original object was: - -``` javascript -var flatten = require('flat') - -flatten({ - key1: { - keyA: 'valueI' - }, - key2: { - keyB: 'valueII' - }, - key3: { a: { b: { c: 2 } } } -}) - -// { -// 'key1.keyA': 'valueI', -// 'key2.keyB': 'valueII', -// 'key3.a.b.c': 2 -// } -``` - -### unflatten(original, options) - -Flattening is reversible too, you can call `flatten.unflatten()` on an object: - -``` javascript -var unflatten = require('flat').unflatten - -unflatten({ - 'three.levels.deep': 42, - 'three.levels': { - nested: true - } -}) - -// { -// three: { -// levels: { -// deep: 42, -// nested: true -// } -// } -// } -``` - -## Options - -### delimiter - -Use a custom delimiter for (un)flattening your objects, instead of `.`. - -### safe - -When enabled, both `flat` and `unflatten` will preserve arrays and their -contents. This is disabled by default. - -``` javascript -var flatten = require('flat') - -flatten({ - this: [ - { contains: 'arrays' }, - { preserving: { - them: 'for you' - }} - ] -}, { - safe: true -}) - -// { -// 'this': [ -// { contains: 'arrays' }, -// { preserving: { -// them: 'for you' -// }} -// ] -// } -``` - -### object - -When enabled, arrays will not be created automatically when calling unflatten, like so: - -``` javascript -unflatten({ - 'hello.you.0': 'ipsum', - 'hello.you.1': 'lorem', - 'hello.other.world': 'foo' -}, { object: true }) - -// hello: { -// you: { -// 0: 'ipsum', -// 1: 'lorem', -// }, -// other: { world: 'foo' } -// } -``` - -### overwrite - -When enabled, existing keys in the unflattened object may be overwritten if they cannot hold a newly encountered nested value: - -```javascript -unflatten({ - 'TRAVIS': 'true', - 'TRAVIS.DIR': '/home/travis/build/kvz/environmental' -}, { overwrite: true }) - -// TRAVIS: { -// DIR: '/home/travis/build/kvz/environmental' -// } -``` - -Without `overwrite` set to `true`, the `TRAVIS` key would already have been set to a string, thus could not accept the nested `DIR` element. - -This only makes sense on ordered arrays, and since we're overwriting data, should be used with care. - - -### maxDepth - -Maximum number of nested objects to flatten. - -``` javascript -var flatten = require('flat') - -flatten({ - key1: { - keyA: 'valueI' - }, - key2: { - keyB: 'valueII' - }, - key3: { a: { b: { c: 2 } } } -}, { maxDepth: 2 }) - -// { -// 'key1.keyA': 'valueI', -// 'key2.keyB': 'valueII', -// 'key3.a': { b: { c: 2 } } -// } -``` - -### transformKey - -Transform each part of a flat key before and after flattening. - -```javascript -var flatten = require('flat') -var unflatten = require('flat').unflatten - -flatten({ - key1: { - keyA: 'valueI' - }, - key2: { - keyB: 'valueII' - }, - key3: { a: { b: { c: 2 } } } -}, { - transformKey: function(key){ - return '__' + key + '__'; - } -}) - -// { -// '__key1__.__keyA__': 'valueI', -// '__key2__.__keyB__': 'valueII', -// '__key3__.__a__.__b__.__c__': 2 -// } - -unflatten({ - '__key1__.__keyA__': 'valueI', - '__key2__.__keyB__': 'valueII', - '__key3__.__a__.__b__.__c__': 2 -}, { - transformKey: function(key){ - return key.substring(2, key.length - 2) - } -}) - -// { -// key1: { -// keyA: 'valueI' -// }, -// key2: { -// keyB: 'valueII' -// }, -// key3: { a: { b: { c: 2 } } } -// } -``` - -## Command Line Usage - -`flat` is also available as a command line tool. You can run it with -[`npx`](https://ghub.io/npx): - -```sh -npx flat foo.json -``` - -Or install the `flat` command globally: - -```sh -npm i -g flat && flat foo.json -``` - -Accepts a filename as an argument: - -```sh -flat foo.json -``` - -Also accepts JSON on stdin: - -```sh -cat foo.json | flat -``` diff --git a/node_modules/flat/cli.js b/node_modules/flat/cli.js deleted file mode 100755 index e4f96b37..00000000 --- a/node_modules/flat/cli.js +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/env node - -const fs = require('fs') -const path = require('path') -const readline = require('readline') - -const flat = require('./index') - -const filepath = process.argv.slice(2)[0] -if (filepath) { - // Read from file - const file = path.resolve(process.cwd(), filepath) - fs.accessSync(file, fs.constants.R_OK) // allow to throw if not readable - out(require(file)) -} else if (process.stdin.isTTY) { - usage(0) -} else { - // Read from newline-delimited STDIN - const lines = [] - readline.createInterface({ - input: process.stdin, - output: process.stdout, - terminal: false - }) - .on('line', line => lines.push(line)) - .on('close', () => out(JSON.parse(lines.join('\n')))) -} - -function out (data) { - process.stdout.write(JSON.stringify(flat(data), null, 2)) -} - -function usage (code) { - console.log(` -Usage: - -flat foo.json -cat foo.json | flat -`) - - process.exit(code || 0) -} diff --git a/node_modules/flat/index.js b/node_modules/flat/index.js deleted file mode 100644 index 2a5d7ca0..00000000 --- a/node_modules/flat/index.js +++ /dev/null @@ -1,158 +0,0 @@ -module.exports = flatten -flatten.flatten = flatten -flatten.unflatten = unflatten - -function isBuffer (obj) { - return obj && - obj.constructor && - (typeof obj.constructor.isBuffer === 'function') && - obj.constructor.isBuffer(obj) -} - -function keyIdentity (key) { - return key -} - -function flatten (target, opts) { - opts = opts || {} - - const delimiter = opts.delimiter || '.' - const maxDepth = opts.maxDepth - const transformKey = opts.transformKey || keyIdentity - const output = {} - - function step (object, prev, currentDepth) { - currentDepth = currentDepth || 1 - Object.keys(object).forEach(function (key) { - const value = object[key] - const isarray = opts.safe && Array.isArray(value) - const type = Object.prototype.toString.call(value) - const isbuffer = isBuffer(value) - const isobject = ( - type === '[object Object]' || - type === '[object Array]' - ) - - const newKey = prev - ? prev + delimiter + transformKey(key) - : transformKey(key) - - if (!isarray && !isbuffer && isobject && Object.keys(value).length && - (!opts.maxDepth || currentDepth < maxDepth)) { - return step(value, newKey, currentDepth + 1) - } - - output[newKey] = value - }) - } - - step(target) - - return output -} - -function unflatten (target, opts) { - opts = opts || {} - - const delimiter = opts.delimiter || '.' - const overwrite = opts.overwrite || false - const transformKey = opts.transformKey || keyIdentity - const result = {} - - const isbuffer = isBuffer(target) - if (isbuffer || Object.prototype.toString.call(target) !== '[object Object]') { - return target - } - - // safely ensure that the key is - // an integer. - function getkey (key) { - const parsedKey = Number(key) - - return ( - isNaN(parsedKey) || - key.indexOf('.') !== -1 || - opts.object - ) ? key - : parsedKey - } - - function addKeys (keyPrefix, recipient, target) { - return Object.keys(target).reduce(function (result, key) { - result[keyPrefix + delimiter + key] = target[key] - - return result - }, recipient) - } - - function isEmpty (val) { - const type = Object.prototype.toString.call(val) - const isArray = type === '[object Array]' - const isObject = type === '[object Object]' - - if (!val) { - return true - } else if (isArray) { - return !val.length - } else if (isObject) { - return !Object.keys(val).length - } - } - - target = Object.keys(target).reduce(function (result, key) { - const type = Object.prototype.toString.call(target[key]) - const isObject = (type === '[object Object]' || type === '[object Array]') - if (!isObject || isEmpty(target[key])) { - result[key] = target[key] - return result - } else { - return addKeys( - key, - result, - flatten(target[key], opts) - ) - } - }, {}) - - Object.keys(target).forEach(function (key) { - const split = key.split(delimiter).map(transformKey) - let key1 = getkey(split.shift()) - let key2 = getkey(split[0]) - let recipient = result - - while (key2 !== undefined) { - if (key1 === '__proto__') { - return - } - - const type = Object.prototype.toString.call(recipient[key1]) - const isobject = ( - type === '[object Object]' || - type === '[object Array]' - ) - - // do not write over falsey, non-undefined values if overwrite is false - if (!overwrite && !isobject && typeof recipient[key1] !== 'undefined') { - return - } - - if ((overwrite && !isobject) || (!overwrite && recipient[key1] == null)) { - recipient[key1] = ( - typeof key2 === 'number' && - !opts.object ? [] : {} - ) - } - - recipient = recipient[key1] - if (split.length > 0) { - key1 = getkey(split.shift()) - key2 = getkey(split[0]) - } - } - - // unflatten again for 'messy objects' - recipient[key1] = unflatten(target[key], opts) - }) - - return result -} diff --git a/node_modules/flat/package.json b/node_modules/flat/package.json deleted file mode 100644 index c2fbc963..00000000 --- a/node_modules/flat/package.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "flat", - "version": "5.0.2", - "main": "index.js", - "bin": "cli.js", - "scripts": { - "test": "mocha -u tdd --reporter spec && standard cli.js index.js test/index.js" - }, - "license": "BSD-3-Clause", - "description": "Take a nested Javascript object and flatten it, or unflatten an object with delimited keys", - "devDependencies": { - "mocha": "~8.1.1", - "standard": "^14.3.4" - }, - "directories": { - "test": "test" - }, - "dependencies": {}, - "repository": { - "type": "git", - "url": "git://github.com/hughsk/flat.git" - }, - "keywords": [ - "flat", - "json", - "flatten", - "unflatten", - "split", - "object", - "nested" - ], - "author": "Hugh Kennedy (http://hughskennedy.com)", - "bugs": { - "url": "https://github.com/hughsk/flat/issues" - }, - "homepage": "https://github.com/hughsk/flat" -} diff --git a/node_modules/flat/test/test.js b/node_modules/flat/test/test.js deleted file mode 100644 index 7f4ee3df..00000000 --- a/node_modules/flat/test/test.js +++ /dev/null @@ -1,643 +0,0 @@ -/* globals suite test */ - -const assert = require('assert') -const path = require('path') -const { exec } = require('child_process') -const pkg = require('../package.json') -const flat = require('../index') - -const flatten = flat.flatten -const unflatten = flat.unflatten - -const primitives = { - String: 'good morning', - Number: 1234.99, - Boolean: true, - Date: new Date(), - null: null, - undefined: undefined -} - -suite('Flatten Primitives', function () { - Object.keys(primitives).forEach(function (key) { - const value = primitives[key] - - test(key, function () { - assert.deepStrictEqual(flatten({ - hello: { - world: value - } - }), { - 'hello.world': value - }) - }) - }) -}) - -suite('Unflatten Primitives', function () { - Object.keys(primitives).forEach(function (key) { - const value = primitives[key] - - test(key, function () { - assert.deepStrictEqual(unflatten({ - 'hello.world': value - }), { - hello: { - world: value - } - }) - }) - }) -}) - -suite('Flatten', function () { - test('Nested once', function () { - assert.deepStrictEqual(flatten({ - hello: { - world: 'good morning' - } - }), { - 'hello.world': 'good morning' - }) - }) - - test('Nested twice', function () { - assert.deepStrictEqual(flatten({ - hello: { - world: { - again: 'good morning' - } - } - }), { - 'hello.world.again': 'good morning' - }) - }) - - test('Multiple Keys', function () { - assert.deepStrictEqual(flatten({ - hello: { - lorem: { - ipsum: 'again', - dolor: 'sit' - } - }, - world: { - lorem: { - ipsum: 'again', - dolor: 'sit' - } - } - }), { - 'hello.lorem.ipsum': 'again', - 'hello.lorem.dolor': 'sit', - 'world.lorem.ipsum': 'again', - 'world.lorem.dolor': 'sit' - }) - }) - - test('Custom Delimiter', function () { - assert.deepStrictEqual(flatten({ - hello: { - world: { - again: 'good morning' - } - } - }, { - delimiter: ':' - }), { - 'hello:world:again': 'good morning' - }) - }) - - test('Empty Objects', function () { - assert.deepStrictEqual(flatten({ - hello: { - empty: { - nested: {} - } - } - }), { - 'hello.empty.nested': {} - }) - }) - - if (typeof Buffer !== 'undefined') { - test('Buffer', function () { - assert.deepStrictEqual(flatten({ - hello: { - empty: { - nested: Buffer.from('test') - } - } - }), { - 'hello.empty.nested': Buffer.from('test') - }) - }) - } - - if (typeof Uint8Array !== 'undefined') { - test('typed arrays', function () { - assert.deepStrictEqual(flatten({ - hello: { - empty: { - nested: new Uint8Array([1, 2, 3, 4]) - } - } - }), { - 'hello.empty.nested': new Uint8Array([1, 2, 3, 4]) - }) - }) - } - - test('Custom Depth', function () { - assert.deepStrictEqual(flatten({ - hello: { - world: { - again: 'good morning' - } - }, - lorem: { - ipsum: { - dolor: 'good evening' - } - } - }, { - maxDepth: 2 - }), { - 'hello.world': { - again: 'good morning' - }, - 'lorem.ipsum': { - dolor: 'good evening' - } - }) - }) - - test('Transformed Keys', function () { - assert.deepStrictEqual(flatten({ - hello: { - world: { - again: 'good morning' - } - }, - lorem: { - ipsum: { - dolor: 'good evening' - } - } - }, { - transformKey: function (key) { - return '__' + key + '__' - } - }), { - '__hello__.__world__.__again__': 'good morning', - '__lorem__.__ipsum__.__dolor__': 'good evening' - }) - }) - - test('Should keep number in the left when object', function () { - assert.deepStrictEqual(flatten({ - hello: { - '0200': 'world', - '0500': 'darkness my old friend' - } - }), { - 'hello.0200': 'world', - 'hello.0500': 'darkness my old friend' - }) - }) -}) - -suite('Unflatten', function () { - test('Nested once', function () { - assert.deepStrictEqual({ - hello: { - world: 'good morning' - } - }, unflatten({ - 'hello.world': 'good morning' - })) - }) - - test('Nested twice', function () { - assert.deepStrictEqual({ - hello: { - world: { - again: 'good morning' - } - } - }, unflatten({ - 'hello.world.again': 'good morning' - })) - }) - - test('Multiple Keys', function () { - assert.deepStrictEqual({ - hello: { - lorem: { - ipsum: 'again', - dolor: 'sit' - } - }, - world: { - greet: 'hello', - lorem: { - ipsum: 'again', - dolor: 'sit' - } - } - }, unflatten({ - 'hello.lorem.ipsum': 'again', - 'hello.lorem.dolor': 'sit', - 'world.lorem.ipsum': 'again', - 'world.lorem.dolor': 'sit', - world: { greet: 'hello' } - })) - }) - - test('nested objects do not clobber each other when a.b inserted before a', function () { - const x = {} - x['foo.bar'] = { t: 123 } - x.foo = { p: 333 } - assert.deepStrictEqual(unflatten(x), { - foo: { - bar: { - t: 123 - }, - p: 333 - } - }) - }) - - test('Custom Delimiter', function () { - assert.deepStrictEqual({ - hello: { - world: { - again: 'good morning' - } - } - }, unflatten({ - 'hello world again': 'good morning' - }, { - delimiter: ' ' - })) - }) - - test('Overwrite', function () { - assert.deepStrictEqual({ - travis: { - build: { - dir: '/home/travis/build/kvz/environmental' - } - } - }, unflatten({ - travis: 'true', - travis_build_dir: '/home/travis/build/kvz/environmental' - }, { - delimiter: '_', - overwrite: true - })) - }) - - test('Transformed Keys', function () { - assert.deepStrictEqual(unflatten({ - '__hello__.__world__.__again__': 'good morning', - '__lorem__.__ipsum__.__dolor__': 'good evening' - }, { - transformKey: function (key) { - return key.substring(2, key.length - 2) - } - }), { - hello: { - world: { - again: 'good morning' - } - }, - lorem: { - ipsum: { - dolor: 'good evening' - } - } - }) - }) - - test('Messy', function () { - assert.deepStrictEqual({ - hello: { world: 'again' }, - lorem: { ipsum: 'another' }, - good: { - morning: { - hash: { - key: { - nested: { - deep: { - and: { - even: { - deeper: { still: 'hello' } - } - } - } - } - } - }, - again: { testing: { this: 'out' } } - } - } - }, unflatten({ - 'hello.world': 'again', - 'lorem.ipsum': 'another', - 'good.morning': { - 'hash.key': { - 'nested.deep': { - 'and.even.deeper.still': 'hello' - } - } - }, - 'good.morning.again': { - 'testing.this': 'out' - } - })) - }) - - suite('Overwrite + non-object values in key positions', function () { - test('non-object keys + overwrite should be overwritten', function () { - assert.deepStrictEqual(flat.unflatten({ a: null, 'a.b': 'c' }, { overwrite: true }), { a: { b: 'c' } }) - assert.deepStrictEqual(flat.unflatten({ a: 0, 'a.b': 'c' }, { overwrite: true }), { a: { b: 'c' } }) - assert.deepStrictEqual(flat.unflatten({ a: 1, 'a.b': 'c' }, { overwrite: true }), { a: { b: 'c' } }) - assert.deepStrictEqual(flat.unflatten({ a: '', 'a.b': 'c' }, { overwrite: true }), { a: { b: 'c' } }) - }) - - test('overwrite value should not affect undefined keys', function () { - assert.deepStrictEqual(flat.unflatten({ a: undefined, 'a.b': 'c' }, { overwrite: true }), { a: { b: 'c' } }) - assert.deepStrictEqual(flat.unflatten({ a: undefined, 'a.b': 'c' }, { overwrite: false }), { a: { b: 'c' } }) - }) - - test('if no overwrite, should ignore nested values under non-object key', function () { - assert.deepStrictEqual(flat.unflatten({ a: null, 'a.b': 'c' }), { a: null }) - assert.deepStrictEqual(flat.unflatten({ a: 0, 'a.b': 'c' }), { a: 0 }) - assert.deepStrictEqual(flat.unflatten({ a: 1, 'a.b': 'c' }), { a: 1 }) - assert.deepStrictEqual(flat.unflatten({ a: '', 'a.b': 'c' }), { a: '' }) - }) - }) - - suite('.safe', function () { - test('Should protect arrays when true', function () { - assert.deepStrictEqual(flatten({ - hello: [ - { world: { again: 'foo' } }, - { lorem: 'ipsum' } - ], - another: { - nested: [{ array: { too: 'deep' } }] - }, - lorem: { - ipsum: 'whoop' - } - }, { - safe: true - }), { - hello: [ - { world: { again: 'foo' } }, - { lorem: 'ipsum' } - ], - 'lorem.ipsum': 'whoop', - 'another.nested': [{ array: { too: 'deep' } }] - }) - }) - - test('Should not protect arrays when false', function () { - assert.deepStrictEqual(flatten({ - hello: [ - { world: { again: 'foo' } }, - { lorem: 'ipsum' } - ] - }, { - safe: false - }), { - 'hello.0.world.again': 'foo', - 'hello.1.lorem': 'ipsum' - }) - }) - - test('Empty objects should not be removed', function () { - assert.deepStrictEqual(unflatten({ - foo: [], - bar: {} - }), { foo: [], bar: {} }) - }) - }) - - suite('.object', function () { - test('Should create object instead of array when true', function () { - const unflattened = unflatten({ - 'hello.you.0': 'ipsum', - 'hello.you.1': 'lorem', - 'hello.other.world': 'foo' - }, { - object: true - }) - assert.deepStrictEqual({ - hello: { - you: { - 0: 'ipsum', - 1: 'lorem' - }, - other: { world: 'foo' } - } - }, unflattened) - assert(!Array.isArray(unflattened.hello.you)) - }) - - test('Should create object instead of array when nested', function () { - const unflattened = unflatten({ - hello: { - 'you.0': 'ipsum', - 'you.1': 'lorem', - 'other.world': 'foo' - } - }, { - object: true - }) - assert.deepStrictEqual({ - hello: { - you: { - 0: 'ipsum', - 1: 'lorem' - }, - other: { world: 'foo' } - } - }, unflattened) - assert(!Array.isArray(unflattened.hello.you)) - }) - - test('Should keep the zero in the left when object is true', function () { - const unflattened = unflatten({ - 'hello.0200': 'world', - 'hello.0500': 'darkness my old friend' - }, { - object: true - }) - - assert.deepStrictEqual({ - hello: { - '0200': 'world', - '0500': 'darkness my old friend' - } - }, unflattened) - }) - - test('Should not create object when false', function () { - const unflattened = unflatten({ - 'hello.you.0': 'ipsum', - 'hello.you.1': 'lorem', - 'hello.other.world': 'foo' - }, { - object: false - }) - assert.deepStrictEqual({ - hello: { - you: ['ipsum', 'lorem'], - other: { world: 'foo' } - } - }, unflattened) - assert(Array.isArray(unflattened.hello.you)) - }) - }) - - if (typeof Buffer !== 'undefined') { - test('Buffer', function () { - assert.deepStrictEqual(unflatten({ - 'hello.empty.nested': Buffer.from('test') - }), { - hello: { - empty: { - nested: Buffer.from('test') - } - } - }) - }) - } - - if (typeof Uint8Array !== 'undefined') { - test('typed arrays', function () { - assert.deepStrictEqual(unflatten({ - 'hello.empty.nested': new Uint8Array([1, 2, 3, 4]) - }), { - hello: { - empty: { - nested: new Uint8Array([1, 2, 3, 4]) - } - } - }) - }) - } - - test('should not pollute prototype', function () { - unflatten({ - '__proto__.polluted': true - }) - unflatten({ - 'prefix.__proto__.polluted': true - }) - unflatten({ - 'prefix.0.__proto__.polluted': true - }) - - assert.notStrictEqual({}.polluted, true) - }) -}) - -suite('Arrays', function () { - test('Should be able to flatten arrays properly', function () { - assert.deepStrictEqual({ - 'a.0': 'foo', - 'a.1': 'bar' - }, flatten({ - a: ['foo', 'bar'] - })) - }) - - test('Should be able to revert and reverse array serialization via unflatten', function () { - assert.deepStrictEqual({ - a: ['foo', 'bar'] - }, unflatten({ - 'a.0': 'foo', - 'a.1': 'bar' - })) - }) - - test('Array typed objects should be restored by unflatten', function () { - assert.strictEqual( - Object.prototype.toString.call(['foo', 'bar']) - , Object.prototype.toString.call(unflatten({ - 'a.0': 'foo', - 'a.1': 'bar' - }).a) - ) - }) - - test('Do not include keys with numbers inside them', function () { - assert.deepStrictEqual(unflatten({ - '1key.2_key': 'ok' - }), { - '1key': { - '2_key': 'ok' - } - }) - }) -}) - -suite('Order of Keys', function () { - test('Order of keys should not be changed after round trip flatten/unflatten', function () { - const obj = { - b: 1, - abc: { - c: [{ - d: 1, - bca: 1, - a: 1 - }] - }, - a: 1 - } - const result = unflatten( - flatten(obj) - ) - - assert.deepStrictEqual(Object.keys(obj), Object.keys(result)) - assert.deepStrictEqual(Object.keys(obj.abc), Object.keys(result.abc)) - assert.deepStrictEqual(Object.keys(obj.abc.c[0]), Object.keys(result.abc.c[0])) - }) -}) - -suite('CLI', function () { - test('can take filename', function (done) { - const cli = path.resolve(__dirname, '..', pkg.bin) - const pkgJSON = path.resolve(__dirname, '..', 'package.json') - exec(`${cli} ${pkgJSON}`, (err, stdout, stderr) => { - assert.ifError(err) - assert.strictEqual(stdout.trim(), JSON.stringify(flatten(pkg), null, 2)) - done() - }) - }) - - test('exits with usage if no file', function (done) { - const cli = path.resolve(__dirname, '..', pkg.bin) - const pkgJSON = path.resolve(__dirname, '..', 'package.json') - exec(`${cli} ${pkgJSON}`, (err, stdout, stderr) => { - assert.ifError(err) - assert.strictEqual(stdout.trim(), JSON.stringify(flatten(pkg), null, 2)) - done() - }) - }) - - test('can take piped file', function (done) { - const cli = path.resolve(__dirname, '..', pkg.bin) - const pkgJSON = path.resolve(__dirname, '..', 'package.json') - exec(`cat ${pkgJSON} | ${cli}`, (err, stdout, stderr) => { - assert.ifError(err) - assert.strictEqual(stdout.trim(), JSON.stringify(flatten(pkg), null, 2)) - done() - }) - }) -}) diff --git a/node_modules/foreground-child/LICENSE b/node_modules/foreground-child/LICENSE deleted file mode 100644 index 2d80720f..00000000 --- a/node_modules/foreground-child/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) 2015-2023 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/foreground-child/README.md b/node_modules/foreground-child/README.md deleted file mode 100644 index 477ca571..00000000 --- a/node_modules/foreground-child/README.md +++ /dev/null @@ -1,128 +0,0 @@ -# foreground-child - -Run a child as if it's the foreground process. Give it stdio. Exit -when it exits. - -Mostly this module is here to support some use cases around -wrapping child processes for test coverage and such. But it's -also generally useful any time you want one program to execute -another as if it's the "main" process, for example, if a program -takes a `--cmd` argument to execute in some way. - -## USAGE - -```js -import { foregroundChild } from 'foreground-child' -// hybrid module, this also works: -// const { foregroundChild } = require('foreground-child') - -// cats out this file -const child = foregroundChild('cat', [__filename]) - -// At this point, it's best to just do nothing else. -// return or whatever. -// If the child gets a signal, or just exits, then this -// parent process will exit in the same way. -``` - -You can provide custom spawn options by passing an object after -the program and arguments: - -```js -const child = foregroundChild(`cat ${__filename}`, { shell: true }) -``` - -A callback can optionally be provided, if you want to perform an -action before your foreground-child exits: - -```js -const child = foregroundChild('cat', [__filename], spawnOptions, () => { - doSomeActions() -}) -``` - -The callback can return a Promise in order to perform -asynchronous actions. If the callback does not return a promise, -then it must complete its actions within a single JavaScript -tick. - -```js -const child = foregroundChild('cat', [__filename], async () => { - await doSomeAsyncActions() -}) -``` - -If the callback throws or rejects, then it will be unhandled, and -node will exit in error. - -If the callback returns a string value, then that will be used as -the signal to exit the parent process. If it returns a number, -then that number will be used as the parent exit status code. If -it returns boolean `false`, then the parent process will not be -terminated. If it returns `undefined`, then it will exit with the -same signal/code as the child process. - -## Caveats - -The "normal" standard IO file descriptors (0, 1, and 2 for stdin, -stdout, and stderr respectively) are shared with the child process. -Additionally, if there is an IPC channel set up in the parent, then -messages are proxied to the child on file descriptor 3. - -In Node, it's possible to also map arbitrary file descriptors -into a child process. In these cases, foreground-child will not -map the file descriptors into the child. If file descriptors 0, -1, or 2 are used for the IPC channel, then strange behavior may -happen (like printing IPC messages to stderr, for example). - -Note that a SIGKILL will always kill the parent process, but -will not proxy the signal to the child process, because SIGKILL -cannot be caught. In order to address this, a special "watchdog" -child process is spawned which will send a SIGKILL to the child -process if it does not terminate within half a second after the -watchdog receives a SIGHUP due to its parent terminating. - -On Windows, issuing a `process.kill(process.pid, signal)` with a -fatal termination signal may cause the process to exit with a `1` -status code rather than reporting the signal properly. This -module tries to do the right thing, but on Windows systems, you -may see that incorrect result. There is as far as I'm aware no -workaround for this. - -## util: `foreground-child/proxy-signals` - -If you just want to proxy the signals to a child process that the -main process receives, you can use the `proxy-signals` export -from this package. - -```js -import { proxySignals } from 'foreground-child/proxy-signals' - -const childProcess = spawn('command', ['some', 'args']) -proxySignals(childProcess) -``` - -Now, any fatal signal received by the current process will be -proxied to the child process. - -It doesn't go in the other direction; ie, signals sent to the -child process will not affect the parent. For that, listen to the -child `exit` or `close` events, and handle them appropriately. - -## util: `foreground-child/watchdog` - -If you are spawning a child process, and want to ensure that it -isn't left dangling if the parent process exits, you can use the -watchdog utility exported by this module. - -```js -import { watchdog } from 'foreground-child/watchdog' - -const childProcess = spawn('command', ['some', 'args']) -const watchdogProcess = watchdog(childProcess) - -// watchdogProcess is a reference to the process monitoring the -// parent and child. There's usually no reason to do anything -// with it, as it's silent and will terminate -// automatically when it's no longer needed. -``` diff --git a/node_modules/foreground-child/dist/commonjs/all-signals.d.ts b/node_modules/foreground-child/dist/commonjs/all-signals.d.ts deleted file mode 100644 index 13c5af46..00000000 --- a/node_modules/foreground-child/dist/commonjs/all-signals.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -export declare const allSignals: NodeJS.Signals[]; -//# sourceMappingURL=all-signals.d.ts.map \ No newline at end of file diff --git a/node_modules/foreground-child/dist/commonjs/all-signals.d.ts.map b/node_modules/foreground-child/dist/commonjs/all-signals.d.ts.map deleted file mode 100644 index 400ce7bd..00000000 --- a/node_modules/foreground-child/dist/commonjs/all-signals.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"all-signals.d.ts","sourceRoot":"","sources":["../../src/all-signals.ts"],"names":[],"mappings":";AACA,eAAO,MAAM,UAAU,kBASA,CAAA"} \ No newline at end of file diff --git a/node_modules/foreground-child/dist/commonjs/all-signals.js b/node_modules/foreground-child/dist/commonjs/all-signals.js deleted file mode 100644 index 1692af01..00000000 --- a/node_modules/foreground-child/dist/commonjs/all-signals.js +++ /dev/null @@ -1,58 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.allSignals = void 0; -const node_constants_1 = __importDefault(require("node:constants")); -exports.allSignals = -// this is the full list of signals that Node will let us do anything with -Object.keys(node_constants_1.default).filter(k => k.startsWith('SIG') && - // https://github.com/tapjs/signal-exit/issues/21 - k !== 'SIGPROF' && - // no sense trying to listen for SIGKILL, it's impossible - k !== 'SIGKILL'); -// These are some obscure signals that are reported by kill -l -// on macOS, Linux, or Windows, but which don't have any mapping -// in Node.js. No sense trying if they're just going to throw -// every time on every platform. -// -// 'SIGEMT', -// 'SIGLOST', -// 'SIGPOLL', -// 'SIGRTMAX', -// 'SIGRTMAX-1', -// 'SIGRTMAX-10', -// 'SIGRTMAX-11', -// 'SIGRTMAX-12', -// 'SIGRTMAX-13', -// 'SIGRTMAX-14', -// 'SIGRTMAX-15', -// 'SIGRTMAX-2', -// 'SIGRTMAX-3', -// 'SIGRTMAX-4', -// 'SIGRTMAX-5', -// 'SIGRTMAX-6', -// 'SIGRTMAX-7', -// 'SIGRTMAX-8', -// 'SIGRTMAX-9', -// 'SIGRTMIN', -// 'SIGRTMIN+1', -// 'SIGRTMIN+10', -// 'SIGRTMIN+11', -// 'SIGRTMIN+12', -// 'SIGRTMIN+13', -// 'SIGRTMIN+14', -// 'SIGRTMIN+15', -// 'SIGRTMIN+16', -// 'SIGRTMIN+2', -// 'SIGRTMIN+3', -// 'SIGRTMIN+4', -// 'SIGRTMIN+5', -// 'SIGRTMIN+6', -// 'SIGRTMIN+7', -// 'SIGRTMIN+8', -// 'SIGRTMIN+9', -// 'SIGSTKFLT', -// 'SIGUNUSED', -//# sourceMappingURL=all-signals.js.map \ No newline at end of file diff --git a/node_modules/foreground-child/dist/commonjs/all-signals.js.map b/node_modules/foreground-child/dist/commonjs/all-signals.js.map deleted file mode 100644 index 51c056d7..00000000 --- a/node_modules/foreground-child/dist/commonjs/all-signals.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"all-signals.js","sourceRoot":"","sources":["../../src/all-signals.ts"],"names":[],"mappings":";;;;;;AAAA,oEAAsC;AACzB,QAAA,UAAU;AACrB,0EAA0E;AAC1E,MAAM,CAAC,IAAI,CAAC,wBAAS,CAAC,CAAC,MAAM,CAC3B,CAAC,CAAC,EAAE,CACF,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC;IACnB,iDAAiD;IACjD,CAAC,KAAK,SAAS;IACf,yDAAyD;IACzD,CAAC,KAAK,SAAS,CACE,CAAA;AAEvB,8DAA8D;AAC9D,gEAAgE;AAChE,6DAA6D;AAC7D,gCAAgC;AAChC,EAAE;AACF,YAAY;AACZ,aAAa;AACb,aAAa;AACb,cAAc;AACd,gBAAgB;AAChB,iBAAiB;AACjB,iBAAiB;AACjB,iBAAiB;AACjB,iBAAiB;AACjB,iBAAiB;AACjB,iBAAiB;AACjB,gBAAgB;AAChB,gBAAgB;AAChB,gBAAgB;AAChB,gBAAgB;AAChB,gBAAgB;AAChB,gBAAgB;AAChB,gBAAgB;AAChB,gBAAgB;AAChB,cAAc;AACd,gBAAgB;AAChB,iBAAiB;AACjB,iBAAiB;AACjB,iBAAiB;AACjB,iBAAiB;AACjB,iBAAiB;AACjB,iBAAiB;AACjB,iBAAiB;AACjB,gBAAgB;AAChB,gBAAgB;AAChB,gBAAgB;AAChB,gBAAgB;AAChB,gBAAgB;AAChB,gBAAgB;AAChB,gBAAgB;AAChB,gBAAgB;AAChB,eAAe;AACf,eAAe","sourcesContent":["import constants from 'node:constants'\nexport const allSignals =\n // this is the full list of signals that Node will let us do anything with\n Object.keys(constants).filter(\n k =>\n k.startsWith('SIG') &&\n // https://github.com/tapjs/signal-exit/issues/21\n k !== 'SIGPROF' &&\n // no sense trying to listen for SIGKILL, it's impossible\n k !== 'SIGKILL',\n ) as NodeJS.Signals[]\n\n// These are some obscure signals that are reported by kill -l\n// on macOS, Linux, or Windows, but which don't have any mapping\n// in Node.js. No sense trying if they're just going to throw\n// every time on every platform.\n//\n// 'SIGEMT',\n// 'SIGLOST',\n// 'SIGPOLL',\n// 'SIGRTMAX',\n// 'SIGRTMAX-1',\n// 'SIGRTMAX-10',\n// 'SIGRTMAX-11',\n// 'SIGRTMAX-12',\n// 'SIGRTMAX-13',\n// 'SIGRTMAX-14',\n// 'SIGRTMAX-15',\n// 'SIGRTMAX-2',\n// 'SIGRTMAX-3',\n// 'SIGRTMAX-4',\n// 'SIGRTMAX-5',\n// 'SIGRTMAX-6',\n// 'SIGRTMAX-7',\n// 'SIGRTMAX-8',\n// 'SIGRTMAX-9',\n// 'SIGRTMIN',\n// 'SIGRTMIN+1',\n// 'SIGRTMIN+10',\n// 'SIGRTMIN+11',\n// 'SIGRTMIN+12',\n// 'SIGRTMIN+13',\n// 'SIGRTMIN+14',\n// 'SIGRTMIN+15',\n// 'SIGRTMIN+16',\n// 'SIGRTMIN+2',\n// 'SIGRTMIN+3',\n// 'SIGRTMIN+4',\n// 'SIGRTMIN+5',\n// 'SIGRTMIN+6',\n// 'SIGRTMIN+7',\n// 'SIGRTMIN+8',\n// 'SIGRTMIN+9',\n// 'SIGSTKFLT',\n// 'SIGUNUSED',\n"]} \ No newline at end of file diff --git a/node_modules/foreground-child/dist/commonjs/index.d.ts b/node_modules/foreground-child/dist/commonjs/index.d.ts deleted file mode 100644 index d0feeae1..00000000 --- a/node_modules/foreground-child/dist/commonjs/index.d.ts +++ /dev/null @@ -1,65 +0,0 @@ -/// -/// -import { ChildProcessByStdio, SpawnOptions, ChildProcess } from 'child_process'; -/** - * The signature for the cleanup method. - * - * Arguments indicate the exit status of the child process. - * - * If a Promise is returned, then the process is not terminated - * until it resolves, and the resolution value is treated as the - * exit status (if a number) or signal exit (if a signal string). - * - * If `undefined` is returned, then no change is made, and the parent - * exits in the same way that the child exited. - * - * If boolean `false` is returned, then the parent's exit is canceled. - * - * If a number is returned, then the parent process exits with the number - * as its exitCode. - * - * If a signal string is returned, then the parent process is killed with - * the same signal that caused the child to exit. - */ -export type Cleanup = (code: number | null, signal: null | NodeJS.Signals, processInfo: { - watchdogPid?: ChildProcess['pid']; -}) => void | undefined | number | NodeJS.Signals | false | Promise; -export type FgArgs = [program: string | [cmd: string, ...args: string[]], cleanup?: Cleanup] | [ - program: [cmd: string, ...args: string[]], - opts?: SpawnOptions, - cleanup?: Cleanup -] | [program: string, cleanup?: Cleanup] | [program: string, opts?: SpawnOptions, cleanup?: Cleanup] | [program: string, args?: string[], cleanup?: Cleanup] | [ - program: string, - args?: string[], - opts?: SpawnOptions, - cleanup?: Cleanup -]; -/** - * Normalizes the arguments passed to `foregroundChild`. - * - * Exposed for testing. - * - * @internal - */ -export declare const normalizeFgArgs: (fgArgs: FgArgs) => [ - program: string, - args: string[], - spawnOpts: SpawnOptions, - cleanup: Cleanup -]; -/** - * Spawn the specified program as a "foreground" process, or at least as - * close as is possible given node's lack of exec-without-fork. - * - * Cleanup method may be used to modify or ignore the result of the child's - * exit code or signal. If cleanup returns undefined (or a Promise that - * resolves to undefined), then the parent will exit in the same way that - * the child did. - * - * Return boolean `false` to prevent the parent's exit entirely. - */ -export declare function foregroundChild(cmd: string | [cmd: string, ...args: string[]], cleanup?: Cleanup): ChildProcessByStdio; -export declare function foregroundChild(program: string, args?: string[], cleanup?: Cleanup): ChildProcessByStdio; -export declare function foregroundChild(program: string, spawnOpts?: SpawnOptions, cleanup?: Cleanup): ChildProcessByStdio; -export declare function foregroundChild(program: string, args?: string[], spawnOpts?: SpawnOptions, cleanup?: Cleanup): ChildProcessByStdio; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/foreground-child/dist/commonjs/index.d.ts.map b/node_modules/foreground-child/dist/commonjs/index.d.ts.map deleted file mode 100644 index 6248fb71..00000000 --- a/node_modules/foreground-child/dist/commonjs/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;AAAA,OAAO,EACL,mBAAmB,EAInB,YAAY,EACZ,YAAY,EACb,MAAM,eAAe,CAAA;AAUtB;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,MAAM,OAAO,GAAG,CACpB,IAAI,EAAE,MAAM,GAAG,IAAI,EACnB,MAAM,EAAE,IAAI,GAAG,MAAM,CAAC,OAAO,EAC7B,WAAW,EAAE;IACX,WAAW,CAAC,EAAE,YAAY,CAAC,KAAK,CAAC,CAAA;CAClC,KAEC,IAAI,GACJ,SAAS,GACT,MAAM,GACN,MAAM,CAAC,OAAO,GACd,KAAK,GACL,OAAO,CAAC,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,CAAC,OAAO,GAAG,KAAK,CAAC,CAAA;AAE/D,MAAM,MAAM,MAAM,GACd,CAAC,OAAO,EAAE,MAAM,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,GACvE;IACE,OAAO,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,CAAC;IACzC,IAAI,CAAC,EAAE,YAAY;IACnB,OAAO,CAAC,EAAE,OAAO;CAClB,GACD,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,GACpC,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,YAAY,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,GACzD,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,EAAE,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,GACrD;IACE,OAAO,EAAE,MAAM;IACf,IAAI,CAAC,EAAE,MAAM,EAAE;IACf,IAAI,CAAC,EAAE,YAAY;IACnB,OAAO,CAAC,EAAE,OAAO;CAClB,CAAA;AAEL;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,WAClB,MAAM,KACb;IACD,OAAO,EAAE,MAAM;IACf,IAAI,EAAE,MAAM,EAAE;IACd,SAAS,EAAE,YAAY;IACvB,OAAO,EAAE,OAAO;CAqBjB,CAAA;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAC7B,GAAG,EAAE,MAAM,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,CAAC,EAC9C,OAAO,CAAC,EAAE,OAAO,GAChB,mBAAmB,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;AACxC,wBAAgB,eAAe,CAC7B,OAAO,EAAE,MAAM,EACf,IAAI,CAAC,EAAE,MAAM,EAAE,EACf,OAAO,CAAC,EAAE,OAAO,GAChB,mBAAmB,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;AACxC,wBAAgB,eAAe,CAC7B,OAAO,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,YAAY,EACxB,OAAO,CAAC,EAAE,OAAO,GAChB,mBAAmB,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;AACxC,wBAAgB,eAAe,CAC7B,OAAO,EAAE,MAAM,EACf,IAAI,CAAC,EAAE,MAAM,EAAE,EACf,SAAS,CAAC,EAAE,YAAY,EACxB,OAAO,CAAC,EAAE,OAAO,GAChB,mBAAmB,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA"} \ No newline at end of file diff --git a/node_modules/foreground-child/dist/commonjs/index.js b/node_modules/foreground-child/dist/commonjs/index.js deleted file mode 100644 index 07a01c58..00000000 --- a/node_modules/foreground-child/dist/commonjs/index.js +++ /dev/null @@ -1,123 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.foregroundChild = exports.normalizeFgArgs = void 0; -const child_process_1 = require("child_process"); -const cross_spawn_1 = __importDefault(require("cross-spawn")); -const signal_exit_1 = require("signal-exit"); -const proxy_signals_js_1 = require("./proxy-signals.js"); -const watchdog_js_1 = require("./watchdog.js"); -/* c8 ignore start */ -const spawn = process?.platform === 'win32' ? cross_spawn_1.default : child_process_1.spawn; -/** - * Normalizes the arguments passed to `foregroundChild`. - * - * Exposed for testing. - * - * @internal - */ -const normalizeFgArgs = (fgArgs) => { - let [program, args = [], spawnOpts = {}, cleanup = () => { }] = fgArgs; - if (typeof args === 'function') { - cleanup = args; - spawnOpts = {}; - args = []; - } - else if (!!args && typeof args === 'object' && !Array.isArray(args)) { - if (typeof spawnOpts === 'function') - cleanup = spawnOpts; - spawnOpts = args; - args = []; - } - else if (typeof spawnOpts === 'function') { - cleanup = spawnOpts; - spawnOpts = {}; - } - if (Array.isArray(program)) { - const [pp, ...pa] = program; - program = pp; - args = pa; - } - return [program, args, { ...spawnOpts }, cleanup]; -}; -exports.normalizeFgArgs = normalizeFgArgs; -function foregroundChild(...fgArgs) { - const [program, args, spawnOpts, cleanup] = (0, exports.normalizeFgArgs)(fgArgs); - spawnOpts.stdio = [0, 1, 2]; - if (process.send) { - spawnOpts.stdio.push('ipc'); - } - const child = spawn(program, args, spawnOpts); - const childHangup = () => { - try { - child.kill('SIGHUP'); - /* c8 ignore start */ - } - catch (_) { - // SIGHUP is weird on windows - child.kill('SIGTERM'); - } - /* c8 ignore stop */ - }; - const removeOnExit = (0, signal_exit_1.onExit)(childHangup); - (0, proxy_signals_js_1.proxySignals)(child); - const dog = (0, watchdog_js_1.watchdog)(child); - let done = false; - child.on('close', async (code, signal) => { - /* c8 ignore start */ - if (done) - return; - /* c8 ignore stop */ - done = true; - const result = cleanup(code, signal, { - watchdogPid: dog.pid, - }); - const res = isPromise(result) ? await result : result; - removeOnExit(); - if (res === false) - return; - else if (typeof res === 'string') { - signal = res; - code = null; - } - else if (typeof res === 'number') { - code = res; - signal = null; - } - if (signal) { - // If there is nothing else keeping the event loop alive, - // then there's a race between a graceful exit and getting - // the signal to this process. Put this timeout here to - // make sure we're still alive to get the signal, and thus - // exit with the intended signal code. - /* istanbul ignore next */ - setTimeout(() => { }, 2000); - try { - process.kill(process.pid, signal); - /* c8 ignore start */ - } - catch (_) { - process.kill(process.pid, 'SIGTERM'); - } - /* c8 ignore stop */ - } - else { - process.exit(code || 0); - } - }); - if (process.send) { - process.removeAllListeners('message'); - child.on('message', (message, sendHandle) => { - process.send?.(message, sendHandle); - }); - process.on('message', (message, sendHandle) => { - child.send(message, sendHandle); - }); - } - return child; -} -exports.foregroundChild = foregroundChild; -const isPromise = (o) => !!o && typeof o === 'object' && typeof o.then === 'function'; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/foreground-child/dist/commonjs/index.js.map b/node_modules/foreground-child/dist/commonjs/index.js.map deleted file mode 100644 index f45654e1..00000000 --- a/node_modules/foreground-child/dist/commonjs/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;AAAA,iDAOsB;AACtB,8DAAoC;AACpC,6CAAoC;AACpC,yDAAiD;AACjD,+CAAwC;AAExC,qBAAqB;AACrB,MAAM,KAAK,GAAG,OAAO,EAAE,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,qBAAU,CAAC,CAAC,CAAC,qBAAS,CAAA;AAsDpE;;;;;;GAMG;AACI,MAAM,eAAe,GAAG,CAC7B,MAAc,EAMd,EAAE;IACF,IAAI,CAAC,OAAO,EAAE,IAAI,GAAG,EAAE,EAAE,SAAS,GAAG,EAAE,EAAE,OAA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AA","sourcesContent":["import {\n ChildProcessByStdio,\n SendHandle,\n Serializable,\n spawn as nodeSpawn,\n SpawnOptions,\n ChildProcess,\n} from 'child_process'\nimport crossSpawn from 'cross-spawn'\nimport { onExit } from 'signal-exit'\nimport { proxySignals } from './proxy-signals.js'\nimport { watchdog } from './watchdog.js'\n\n/* c8 ignore start */\nconst spawn = process?.platform === 'win32' ? crossSpawn : nodeSpawn\n/* c8 ignore stop */\n\n/**\n * The signature for the cleanup method.\n *\n * Arguments indicate the exit status of the child process.\n *\n * If a Promise is returned, then the process is not terminated\n * until it resolves, and the resolution value is treated as the\n * exit status (if a number) or signal exit (if a signal string).\n *\n * If `undefined` is returned, then no change is made, and the parent\n * exits in the same way that the child exited.\n *\n * If boolean `false` is returned, then the parent's exit is canceled.\n *\n * If a number is returned, then the parent process exits with the number\n * as its exitCode.\n *\n * If a signal string is returned, then the parent process is killed with\n * the same signal that caused the child to exit.\n */\nexport type Cleanup = (\n code: number | null,\n signal: null | NodeJS.Signals,\n processInfo: {\n watchdogPid?: ChildProcess['pid']\n },\n) =>\n | void\n | undefined\n | number\n | NodeJS.Signals\n | false\n | Promise\n\nexport type FgArgs =\n | [program: string | [cmd: string, ...args: string[]], cleanup?: Cleanup]\n | [\n program: [cmd: string, ...args: string[]],\n opts?: SpawnOptions,\n cleanup?: Cleanup,\n ]\n | [program: string, cleanup?: Cleanup]\n | [program: string, opts?: SpawnOptions, cleanup?: Cleanup]\n | [program: string, args?: string[], cleanup?: Cleanup]\n | [\n program: string,\n args?: string[],\n opts?: SpawnOptions,\n cleanup?: Cleanup,\n ]\n\n/**\n * Normalizes the arguments passed to `foregroundChild`.\n *\n * Exposed for testing.\n *\n * @internal\n */\nexport const normalizeFgArgs = (\n fgArgs: FgArgs,\n): [\n program: string,\n args: string[],\n spawnOpts: SpawnOptions,\n cleanup: Cleanup,\n] => {\n let [program, args = [], spawnOpts = {}, cleanup = () => {}] = fgArgs\n if (typeof args === 'function') {\n cleanup = args\n spawnOpts = {}\n args = []\n } else if (!!args && typeof args === 'object' && !Array.isArray(args)) {\n if (typeof spawnOpts === 'function') cleanup = spawnOpts\n spawnOpts = args\n args = []\n } else if (typeof spawnOpts === 'function') {\n cleanup = spawnOpts\n spawnOpts = {}\n }\n if (Array.isArray(program)) {\n const [pp, ...pa] = program\n program = pp\n args = pa\n }\n return [program, args, { ...spawnOpts }, cleanup]\n}\n\n/**\n * Spawn the specified program as a \"foreground\" process, or at least as\n * close as is possible given node's lack of exec-without-fork.\n *\n * Cleanup method may be used to modify or ignore the result of the child's\n * exit code or signal. If cleanup returns undefined (or a Promise that\n * resolves to undefined), then the parent will exit in the same way that\n * the child did.\n *\n * Return boolean `false` to prevent the parent's exit entirely.\n */\nexport function foregroundChild(\n cmd: string | [cmd: string, ...args: string[]],\n cleanup?: Cleanup,\n): ChildProcessByStdio\nexport function foregroundChild(\n program: string,\n args?: string[],\n cleanup?: Cleanup,\n): ChildProcessByStdio\nexport function foregroundChild(\n program: string,\n spawnOpts?: SpawnOptions,\n cleanup?: Cleanup,\n): ChildProcessByStdio\nexport function foregroundChild(\n program: string,\n args?: string[],\n spawnOpts?: SpawnOptions,\n cleanup?: Cleanup,\n): ChildProcessByStdio\nexport function foregroundChild(\n ...fgArgs: FgArgs\n): ChildProcessByStdio {\n const [program, args, spawnOpts, cleanup] = normalizeFgArgs(fgArgs)\n\n spawnOpts.stdio = [0, 1, 2]\n if (process.send) {\n spawnOpts.stdio.push('ipc')\n }\n\n const child = spawn(program, args, spawnOpts) as ChildProcessByStdio<\n null,\n null,\n null\n >\n\n const childHangup = () => {\n try {\n child.kill('SIGHUP')\n\n /* c8 ignore start */\n } catch (_) {\n // SIGHUP is weird on windows\n child.kill('SIGTERM')\n }\n /* c8 ignore stop */\n }\n const removeOnExit = onExit(childHangup)\n\n proxySignals(child)\n const dog = watchdog(child)\n\n let done = false\n child.on('close', async (code, signal) => {\n /* c8 ignore start */\n if (done) return\n /* c8 ignore stop */\n done = true\n const result = cleanup(code, signal, {\n watchdogPid: dog.pid,\n })\n const res = isPromise(result) ? await result : result\n removeOnExit()\n\n if (res === false) return\n else if (typeof res === 'string') {\n signal = res\n code = null\n } else if (typeof res === 'number') {\n code = res\n signal = null\n }\n\n if (signal) {\n // If there is nothing else keeping the event loop alive,\n // then there's a race between a graceful exit and getting\n // the signal to this process. Put this timeout here to\n // make sure we're still alive to get the signal, and thus\n // exit with the intended signal code.\n /* istanbul ignore next */\n setTimeout(() => {}, 2000)\n try {\n process.kill(process.pid, signal)\n /* c8 ignore start */\n } catch (_) {\n process.kill(process.pid, 'SIGTERM')\n }\n /* c8 ignore stop */\n } else {\n process.exit(code || 0)\n }\n })\n\n if (process.send) {\n process.removeAllListeners('message')\n\n child.on('message', (message, sendHandle) => {\n process.send?.(message, sendHandle)\n })\n\n process.on('message', (message, sendHandle) => {\n child.send(\n message as Serializable,\n sendHandle as SendHandle | undefined,\n )\n })\n }\n\n return child\n}\n\nconst isPromise = (o: any): o is Promise =>\n !!o && typeof o === 'object' && typeof o.then === 'function'\n"]} \ No newline at end of file diff --git a/node_modules/foreground-child/dist/commonjs/package.json b/node_modules/foreground-child/dist/commonjs/package.json deleted file mode 100644 index 5bbefffb..00000000 --- a/node_modules/foreground-child/dist/commonjs/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "type": "commonjs" -} diff --git a/node_modules/foreground-child/dist/commonjs/proxy-signals.d.ts b/node_modules/foreground-child/dist/commonjs/proxy-signals.d.ts deleted file mode 100644 index 66090fd8..00000000 --- a/node_modules/foreground-child/dist/commonjs/proxy-signals.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -/// -import { type ChildProcess } from 'child_process'; -/** - * Starts forwarding signals to `child` through `parent`. - */ -export declare const proxySignals: (child: ChildProcess) => () => void; -//# sourceMappingURL=proxy-signals.d.ts.map \ No newline at end of file diff --git a/node_modules/foreground-child/dist/commonjs/proxy-signals.d.ts.map b/node_modules/foreground-child/dist/commonjs/proxy-signals.d.ts.map deleted file mode 100644 index 9c98b7fc..00000000 --- a/node_modules/foreground-child/dist/commonjs/proxy-signals.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"proxy-signals.d.ts","sourceRoot":"","sources":["../../src/proxy-signals.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,eAAe,CAAA;AAGjD;;GAEG;AACH,eAAO,MAAM,YAAY,UAAW,YAAY,eA4B/C,CAAA"} \ No newline at end of file diff --git a/node_modules/foreground-child/dist/commonjs/proxy-signals.js b/node_modules/foreground-child/dist/commonjs/proxy-signals.js deleted file mode 100644 index 3913e7b4..00000000 --- a/node_modules/foreground-child/dist/commonjs/proxy-signals.js +++ /dev/null @@ -1,38 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.proxySignals = void 0; -const all_signals_js_1 = require("./all-signals.js"); -/** - * Starts forwarding signals to `child` through `parent`. - */ -const proxySignals = (child) => { - const listeners = new Map(); - for (const sig of all_signals_js_1.allSignals) { - const listener = () => { - // some signals can only be received, not sent - try { - child.kill(sig); - /* c8 ignore start */ - } - catch (_) { } - /* c8 ignore stop */ - }; - try { - // if it's a signal this system doesn't recognize, skip it - process.on(sig, listener); - listeners.set(sig, listener); - /* c8 ignore start */ - } - catch (_) { } - /* c8 ignore stop */ - } - const unproxy = () => { - for (const [sig, listener] of listeners) { - process.removeListener(sig, listener); - } - }; - child.on('exit', unproxy); - return unproxy; -}; -exports.proxySignals = proxySignals; -//# sourceMappingURL=proxy-signals.js.map \ No newline at end of file diff --git a/node_modules/foreground-child/dist/commonjs/proxy-signals.js.map b/node_modules/foreground-child/dist/commonjs/proxy-signals.js.map deleted file mode 100644 index 19958227..00000000 --- a/node_modules/foreground-child/dist/commonjs/proxy-signals.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"proxy-signals.js","sourceRoot":"","sources":["../../src/proxy-signals.ts"],"names":[],"mappings":";;;AACA,qDAA6C;AAE7C;;GAEG;AACI,MAAM,YAAY,GAAG,CAAC,KAAmB,EAAE,EAAE;IAClD,MAAM,SAAS,GAAG,IAAI,GAAG,EAAE,CAAA;IAE3B,KAAK,MAAM,GAAG,IAAI,2BAAU,EAAE,CAAC;QAC7B,MAAM,QAAQ,GAAG,GAAG,EAAE;YACpB,8CAA8C;YAC9C,IAAI,CAAC;gBACH,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;gBACf,qBAAqB;YACvB,CAAC;YAAC,OAAO,CAAC,EAAE,CAAC,CAAA,CAAC;YACd,oBAAoB;QACtB,CAAC,CAAA;QACD,IAAI,CAAC;YACH,0DAA0D;YAC1D,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAA;YACzB,SAAS,CAAC,GAAG,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAA;YAC5B,qBAAqB;QACvB,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC,CAAA,CAAC;QACd,oBAAoB;IACtB,CAAC;IAED,MAAM,OAAO,GAAG,GAAG,EAAE;QACnB,KAAK,MAAM,CAAC,GAAG,EAAE,QAAQ,CAAC,IAAI,SAAS,EAAE,CAAC;YACxC,OAAO,CAAC,cAAc,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAA;QACvC,CAAC;IACH,CAAC,CAAA;IACD,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACzB,OAAO,OAAO,CAAA;AAChB,CAAC,CAAA;AA5BY,QAAA,YAAY,gBA4BxB","sourcesContent":["import { type ChildProcess } from 'child_process'\nimport { allSignals } from './all-signals.js'\n\n/**\n * Starts forwarding signals to `child` through `parent`.\n */\nexport const proxySignals = (child: ChildProcess) => {\n const listeners = new Map()\n\n for (const sig of allSignals) {\n const listener = () => {\n // some signals can only be received, not sent\n try {\n child.kill(sig)\n /* c8 ignore start */\n } catch (_) {}\n /* c8 ignore stop */\n }\n try {\n // if it's a signal this system doesn't recognize, skip it\n process.on(sig, listener)\n listeners.set(sig, listener)\n /* c8 ignore start */\n } catch (_) {}\n /* c8 ignore stop */\n }\n\n const unproxy = () => {\n for (const [sig, listener] of listeners) {\n process.removeListener(sig, listener)\n }\n }\n child.on('exit', unproxy)\n return unproxy\n}\n"]} \ No newline at end of file diff --git a/node_modules/foreground-child/dist/commonjs/watchdog.d.ts b/node_modules/foreground-child/dist/commonjs/watchdog.d.ts deleted file mode 100644 index 6038d39a..00000000 --- a/node_modules/foreground-child/dist/commonjs/watchdog.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -/// -import { ChildProcess } from 'child_process'; -/** - * Pass in a ChildProcess, and this will spawn a watchdog process that - * will make sure it exits if the parent does, thus preventing any - * dangling detached zombie processes. - * - * If the child ends before the parent, then the watchdog will terminate. - */ -export declare const watchdog: (child: ChildProcess) => ChildProcess; -//# sourceMappingURL=watchdog.d.ts.map \ No newline at end of file diff --git a/node_modules/foreground-child/dist/commonjs/watchdog.d.ts.map b/node_modules/foreground-child/dist/commonjs/watchdog.d.ts.map deleted file mode 100644 index cc6a668f..00000000 --- a/node_modules/foreground-child/dist/commonjs/watchdog.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"watchdog.d.ts","sourceRoot":"","sources":["../../src/watchdog.ts"],"names":[],"mappings":";AAIA,OAAO,EAAE,YAAY,EAAS,MAAM,eAAe,CAAA;AAyBnD;;;;;;GAMG;AACH,eAAO,MAAM,QAAQ,UAAW,YAAY,iBAc3C,CAAA"} \ No newline at end of file diff --git a/node_modules/foreground-child/dist/commonjs/watchdog.js b/node_modules/foreground-child/dist/commonjs/watchdog.js deleted file mode 100644 index 514e234c..00000000 --- a/node_modules/foreground-child/dist/commonjs/watchdog.js +++ /dev/null @@ -1,50 +0,0 @@ -"use strict"; -// this spawns a child process that listens for SIGHUP when the -// parent process exits, and after 200ms, sends a SIGKILL to the -// child, in case it did not terminate. -Object.defineProperty(exports, "__esModule", { value: true }); -exports.watchdog = void 0; -const child_process_1 = require("child_process"); -const watchdogCode = String.raw ` -const pid = parseInt(process.argv[1], 10) -process.title = 'node (foreground-child watchdog pid=' + pid + ')' -if (!isNaN(pid)) { - let barked = false - // keepalive - const interval = setInterval(() => {}, 60000) - const bark = () => { - clearInterval(interval) - if (barked) return - barked = true - process.removeListener('SIGHUP', bark) - setTimeout(() => { - try { - process.kill(pid, 'SIGKILL') - setTimeout(() => process.exit(), 200) - } catch (_) {} - }, 500) - }) - process.on('SIGHUP', bark) -} -`; -/** - * Pass in a ChildProcess, and this will spawn a watchdog process that - * will make sure it exits if the parent does, thus preventing any - * dangling detached zombie processes. - * - * If the child ends before the parent, then the watchdog will terminate. - */ -const watchdog = (child) => { - let dogExited = false; - const dog = (0, child_process_1.spawn)(process.execPath, ['-e', watchdogCode, String(child.pid)], { - stdio: 'ignore', - }); - dog.on('exit', () => (dogExited = true)); - child.on('exit', () => { - if (!dogExited) - dog.kill('SIGKILL'); - }); - return dog; -}; -exports.watchdog = watchdog; -//# sourceMappingURL=watchdog.js.map \ No newline at end of file diff --git a/node_modules/foreground-child/dist/commonjs/watchdog.js.map b/node_modules/foreground-child/dist/commonjs/watchdog.js.map deleted file mode 100644 index d486c97a..00000000 --- a/node_modules/foreground-child/dist/commonjs/watchdog.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"watchdog.js","sourceRoot":"","sources":["../../src/watchdog.ts"],"names":[],"mappings":";AAAA,+DAA+D;AAC/D,gEAAgE;AAChE,uCAAuC;;;AAEvC,iDAAmD;AAEnD,MAAM,YAAY,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;CAqB9B,CAAA;AAED;;;;;;GAMG;AACI,MAAM,QAAQ,GAAG,CAAC,KAAmB,EAAE,EAAE;IAC9C,IAAI,SAAS,GAAG,KAAK,CAAA;IACrB,MAAM,GAAG,GAAG,IAAA,qBAAK,EACf,OAAO,CAAC,QAAQ,EAChB,CAAC,IAAI,EAAE,YAAY,EAAE,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,EACvC;QACE,KAAK,EAAE,QAAQ;KAChB,CACF,CAAA;IACD,GAAG,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC,SAAS,GAAG,IAAI,CAAC,CAAC,CAAA;IACxC,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE;QACpB,IAAI,CAAC,SAAS;YAAE,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;IACrC,CAAC,CAAC,CAAA;IACF,OAAO,GAAG,CAAA;AACZ,CAAC,CAAA;AAdY,QAAA,QAAQ,YAcpB","sourcesContent":["// this spawns a child process that listens for SIGHUP when the\n// parent process exits, and after 200ms, sends a SIGKILL to the\n// child, in case it did not terminate.\n\nimport { ChildProcess, spawn } from 'child_process'\n\nconst watchdogCode = String.raw`\nconst pid = parseInt(process.argv[1], 10)\nprocess.title = 'node (foreground-child watchdog pid=' + pid + ')'\nif (!isNaN(pid)) {\n let barked = false\n // keepalive\n const interval = setInterval(() => {}, 60000)\n const bark = () => {\n clearInterval(interval)\n if (barked) return\n barked = true\n process.removeListener('SIGHUP', bark)\n setTimeout(() => {\n try {\n process.kill(pid, 'SIGKILL')\n setTimeout(() => process.exit(), 200)\n } catch (_) {}\n }, 500)\n })\n process.on('SIGHUP', bark)\n}\n`\n\n/**\n * Pass in a ChildProcess, and this will spawn a watchdog process that\n * will make sure it exits if the parent does, thus preventing any\n * dangling detached zombie processes.\n *\n * If the child ends before the parent, then the watchdog will terminate.\n */\nexport const watchdog = (child: ChildProcess) => {\n let dogExited = false\n const dog = spawn(\n process.execPath,\n ['-e', watchdogCode, String(child.pid)],\n {\n stdio: 'ignore',\n },\n )\n dog.on('exit', () => (dogExited = true))\n child.on('exit', () => {\n if (!dogExited) dog.kill('SIGKILL')\n })\n return dog\n}\n"]} \ No newline at end of file diff --git a/node_modules/foreground-child/dist/esm/all-signals.d.ts b/node_modules/foreground-child/dist/esm/all-signals.d.ts deleted file mode 100644 index eefd0d2c..00000000 --- a/node_modules/foreground-child/dist/esm/all-signals.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -export declare const allSignals: NodeJS.Signals[]; -//# sourceMappingURL=all-signals.d.ts.map \ No newline at end of file diff --git a/node_modules/foreground-child/dist/esm/all-signals.d.ts.map b/node_modules/foreground-child/dist/esm/all-signals.d.ts.map deleted file mode 100644 index 400ce7bd..00000000 --- a/node_modules/foreground-child/dist/esm/all-signals.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"all-signals.d.ts","sourceRoot":"","sources":["../../src/all-signals.ts"],"names":[],"mappings":";AACA,eAAO,MAAM,UAAU,kBASA,CAAA"} \ No newline at end of file diff --git a/node_modules/foreground-child/dist/esm/all-signals.js b/node_modules/foreground-child/dist/esm/all-signals.js deleted file mode 100644 index 7e8d54d5..00000000 --- a/node_modules/foreground-child/dist/esm/all-signals.js +++ /dev/null @@ -1,52 +0,0 @@ -import constants from 'node:constants'; -export const allSignals = -// this is the full list of signals that Node will let us do anything with -Object.keys(constants).filter(k => k.startsWith('SIG') && - // https://github.com/tapjs/signal-exit/issues/21 - k !== 'SIGPROF' && - // no sense trying to listen for SIGKILL, it's impossible - k !== 'SIGKILL'); -// These are some obscure signals that are reported by kill -l -// on macOS, Linux, or Windows, but which don't have any mapping -// in Node.js. No sense trying if they're just going to throw -// every time on every platform. -// -// 'SIGEMT', -// 'SIGLOST', -// 'SIGPOLL', -// 'SIGRTMAX', -// 'SIGRTMAX-1', -// 'SIGRTMAX-10', -// 'SIGRTMAX-11', -// 'SIGRTMAX-12', -// 'SIGRTMAX-13', -// 'SIGRTMAX-14', -// 'SIGRTMAX-15', -// 'SIGRTMAX-2', -// 'SIGRTMAX-3', -// 'SIGRTMAX-4', -// 'SIGRTMAX-5', -// 'SIGRTMAX-6', -// 'SIGRTMAX-7', -// 'SIGRTMAX-8', -// 'SIGRTMAX-9', -// 'SIGRTMIN', -// 'SIGRTMIN+1', -// 'SIGRTMIN+10', -// 'SIGRTMIN+11', -// 'SIGRTMIN+12', -// 'SIGRTMIN+13', -// 'SIGRTMIN+14', -// 'SIGRTMIN+15', -// 'SIGRTMIN+16', -// 'SIGRTMIN+2', -// 'SIGRTMIN+3', -// 'SIGRTMIN+4', -// 'SIGRTMIN+5', -// 'SIGRTMIN+6', -// 'SIGRTMIN+7', -// 'SIGRTMIN+8', -// 'SIGRTMIN+9', -// 'SIGSTKFLT', -// 'SIGUNUSED', -//# sourceMappingURL=all-signals.js.map \ No newline at end of file diff --git a/node_modules/foreground-child/dist/esm/all-signals.js.map b/node_modules/foreground-child/dist/esm/all-signals.js.map deleted file mode 100644 index 1c63c6b9..00000000 --- a/node_modules/foreground-child/dist/esm/all-signals.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"all-signals.js","sourceRoot":"","sources":["../../src/all-signals.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,gBAAgB,CAAA;AACtC,MAAM,CAAC,MAAM,UAAU;AACrB,0EAA0E;AAC1E,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,MAAM,CAC3B,CAAC,CAAC,EAAE,CACF,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC;IACnB,iDAAiD;IACjD,CAAC,KAAK,SAAS;IACf,yDAAyD;IACzD,CAAC,KAAK,SAAS,CACE,CAAA;AAEvB,8DAA8D;AAC9D,gEAAgE;AAChE,6DAA6D;AAC7D,gCAAgC;AAChC,EAAE;AACF,YAAY;AACZ,aAAa;AACb,aAAa;AACb,cAAc;AACd,gBAAgB;AAChB,iBAAiB;AACjB,iBAAiB;AACjB,iBAAiB;AACjB,iBAAiB;AACjB,iBAAiB;AACjB,iBAAiB;AACjB,gBAAgB;AAChB,gBAAgB;AAChB,gBAAgB;AAChB,gBAAgB;AAChB,gBAAgB;AAChB,gBAAgB;AAChB,gBAAgB;AAChB,gBAAgB;AAChB,cAAc;AACd,gBAAgB;AAChB,iBAAiB;AACjB,iBAAiB;AACjB,iBAAiB;AACjB,iBAAiB;AACjB,iBAAiB;AACjB,iBAAiB;AACjB,iBAAiB;AACjB,gBAAgB;AAChB,gBAAgB;AAChB,gBAAgB;AAChB,gBAAgB;AAChB,gBAAgB;AAChB,gBAAgB;AAChB,gBAAgB;AAChB,gBAAgB;AAChB,eAAe;AACf,eAAe","sourcesContent":["import constants from 'node:constants'\nexport const allSignals =\n // this is the full list of signals that Node will let us do anything with\n Object.keys(constants).filter(\n k =>\n k.startsWith('SIG') &&\n // https://github.com/tapjs/signal-exit/issues/21\n k !== 'SIGPROF' &&\n // no sense trying to listen for SIGKILL, it's impossible\n k !== 'SIGKILL',\n ) as NodeJS.Signals[]\n\n// These are some obscure signals that are reported by kill -l\n// on macOS, Linux, or Windows, but which don't have any mapping\n// in Node.js. No sense trying if they're just going to throw\n// every time on every platform.\n//\n// 'SIGEMT',\n// 'SIGLOST',\n// 'SIGPOLL',\n// 'SIGRTMAX',\n// 'SIGRTMAX-1',\n// 'SIGRTMAX-10',\n// 'SIGRTMAX-11',\n// 'SIGRTMAX-12',\n// 'SIGRTMAX-13',\n// 'SIGRTMAX-14',\n// 'SIGRTMAX-15',\n// 'SIGRTMAX-2',\n// 'SIGRTMAX-3',\n// 'SIGRTMAX-4',\n// 'SIGRTMAX-5',\n// 'SIGRTMAX-6',\n// 'SIGRTMAX-7',\n// 'SIGRTMAX-8',\n// 'SIGRTMAX-9',\n// 'SIGRTMIN',\n// 'SIGRTMIN+1',\n// 'SIGRTMIN+10',\n// 'SIGRTMIN+11',\n// 'SIGRTMIN+12',\n// 'SIGRTMIN+13',\n// 'SIGRTMIN+14',\n// 'SIGRTMIN+15',\n// 'SIGRTMIN+16',\n// 'SIGRTMIN+2',\n// 'SIGRTMIN+3',\n// 'SIGRTMIN+4',\n// 'SIGRTMIN+5',\n// 'SIGRTMIN+6',\n// 'SIGRTMIN+7',\n// 'SIGRTMIN+8',\n// 'SIGRTMIN+9',\n// 'SIGSTKFLT',\n// 'SIGUNUSED',\n"]} \ No newline at end of file diff --git a/node_modules/foreground-child/dist/esm/index.d.ts b/node_modules/foreground-child/dist/esm/index.d.ts deleted file mode 100644 index 6d079ebc..00000000 --- a/node_modules/foreground-child/dist/esm/index.d.ts +++ /dev/null @@ -1,65 +0,0 @@ -/// -/// -import { ChildProcessByStdio, SpawnOptions, ChildProcess } from 'child_process'; -/** - * The signature for the cleanup method. - * - * Arguments indicate the exit status of the child process. - * - * If a Promise is returned, then the process is not terminated - * until it resolves, and the resolution value is treated as the - * exit status (if a number) or signal exit (if a signal string). - * - * If `undefined` is returned, then no change is made, and the parent - * exits in the same way that the child exited. - * - * If boolean `false` is returned, then the parent's exit is canceled. - * - * If a number is returned, then the parent process exits with the number - * as its exitCode. - * - * If a signal string is returned, then the parent process is killed with - * the same signal that caused the child to exit. - */ -export type Cleanup = (code: number | null, signal: null | NodeJS.Signals, processInfo: { - watchdogPid?: ChildProcess['pid']; -}) => void | undefined | number | NodeJS.Signals | false | Promise; -export type FgArgs = [program: string | [cmd: string, ...args: string[]], cleanup?: Cleanup] | [ - program: [cmd: string, ...args: string[]], - opts?: SpawnOptions, - cleanup?: Cleanup -] | [program: string, cleanup?: Cleanup] | [program: string, opts?: SpawnOptions, cleanup?: Cleanup] | [program: string, args?: string[], cleanup?: Cleanup] | [ - program: string, - args?: string[], - opts?: SpawnOptions, - cleanup?: Cleanup -]; -/** - * Normalizes the arguments passed to `foregroundChild`. - * - * Exposed for testing. - * - * @internal - */ -export declare const normalizeFgArgs: (fgArgs: FgArgs) => [ - program: string, - args: string[], - spawnOpts: SpawnOptions, - cleanup: Cleanup -]; -/** - * Spawn the specified program as a "foreground" process, or at least as - * close as is possible given node's lack of exec-without-fork. - * - * Cleanup method may be used to modify or ignore the result of the child's - * exit code or signal. If cleanup returns undefined (or a Promise that - * resolves to undefined), then the parent will exit in the same way that - * the child did. - * - * Return boolean `false` to prevent the parent's exit entirely. - */ -export declare function foregroundChild(cmd: string | [cmd: string, ...args: string[]], cleanup?: Cleanup): ChildProcessByStdio; -export declare function foregroundChild(program: string, args?: string[], cleanup?: Cleanup): ChildProcessByStdio; -export declare function foregroundChild(program: string, spawnOpts?: SpawnOptions, cleanup?: Cleanup): ChildProcessByStdio; -export declare function foregroundChild(program: string, args?: string[], spawnOpts?: SpawnOptions, cleanup?: Cleanup): ChildProcessByStdio; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/foreground-child/dist/esm/index.d.ts.map b/node_modules/foreground-child/dist/esm/index.d.ts.map deleted file mode 100644 index 6248fb71..00000000 --- a/node_modules/foreground-child/dist/esm/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;AAAA,OAAO,EACL,mBAAmB,EAInB,YAAY,EACZ,YAAY,EACb,MAAM,eAAe,CAAA;AAUtB;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,MAAM,OAAO,GAAG,CACpB,IAAI,EAAE,MAAM,GAAG,IAAI,EACnB,MAAM,EAAE,IAAI,GAAG,MAAM,CAAC,OAAO,EAC7B,WAAW,EAAE;IACX,WAAW,CAAC,EAAE,YAAY,CAAC,KAAK,CAAC,CAAA;CAClC,KAEC,IAAI,GACJ,SAAS,GACT,MAAM,GACN,MAAM,CAAC,OAAO,GACd,KAAK,GACL,OAAO,CAAC,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,CAAC,OAAO,GAAG,KAAK,CAAC,CAAA;AAE/D,MAAM,MAAM,MAAM,GACd,CAAC,OAAO,EAAE,MAAM,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,GACvE;IACE,OAAO,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,CAAC;IACzC,IAAI,CAAC,EAAE,YAAY;IACnB,OAAO,CAAC,EAAE,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,EACf,SAAS,CAAC,EAAE,YAAY,EACxB,OAAO,CAAC,EAAE,OAAO,GAChB,mBAAmB,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA"} \ No newline at end of file diff --git a/node_modules/foreground-child/dist/esm/index.js b/node_modules/foreground-child/dist/esm/index.js deleted file mode 100644 index 6266b584..00000000 --- a/node_modules/foreground-child/dist/esm/index.js +++ /dev/null @@ -1,115 +0,0 @@ -import { spawn as nodeSpawn, } from 'child_process'; -import crossSpawn from 'cross-spawn'; -import { onExit } from 'signal-exit'; -import { proxySignals } from './proxy-signals.js'; -import { watchdog } from './watchdog.js'; -/* c8 ignore start */ -const spawn = process?.platform === 'win32' ? crossSpawn : nodeSpawn; -/** - * Normalizes the arguments passed to `foregroundChild`. - * - * Exposed for testing. - * - * @internal - */ -export const normalizeFgArgs = (fgArgs) => { - let [program, args = [], spawnOpts = {}, cleanup = () => { }] = fgArgs; - if (typeof args === 'function') { - cleanup = args; - spawnOpts = {}; - args = []; - } - else if (!!args && typeof args === 'object' && !Array.isArray(args)) { - if (typeof spawnOpts === 'function') - cleanup = spawnOpts; - spawnOpts = args; - args = []; - } - else if (typeof spawnOpts === 'function') { - cleanup = spawnOpts; - spawnOpts = {}; - } - if (Array.isArray(program)) { - const [pp, ...pa] = program; - program = pp; - args = pa; - } - return [program, args, { ...spawnOpts }, cleanup]; -}; -export function foregroundChild(...fgArgs) { - const [program, args, spawnOpts, cleanup] = normalizeFgArgs(fgArgs); - spawnOpts.stdio = [0, 1, 2]; - if (process.send) { - spawnOpts.stdio.push('ipc'); - } - const child = spawn(program, args, spawnOpts); - const childHangup = () => { - try { - child.kill('SIGHUP'); - /* c8 ignore start */ - } - catch (_) { - // SIGHUP is weird on windows - child.kill('SIGTERM'); - } - /* c8 ignore stop */ - }; - const removeOnExit = onExit(childHangup); - proxySignals(child); - const dog = watchdog(child); - let done = false; - child.on('close', async (code, signal) => { - /* c8 ignore start */ - if (done) - return; - /* c8 ignore stop */ - done = true; - const result = cleanup(code, signal, { - watchdogPid: dog.pid, - }); - const res = isPromise(result) ? await result : result; - removeOnExit(); - if (res === false) - return; - else if (typeof res === 'string') { - signal = res; - code = null; - } - else if (typeof res === 'number') { - code = res; - signal = null; - } - if (signal) { - // If there is nothing else keeping the event loop alive, - // then there's a race between a graceful exit and getting - // the signal to this process. Put this timeout here to - // make sure we're still alive to get the signal, and thus - // exit with the intended signal code. - /* istanbul ignore next */ - setTimeout(() => { }, 2000); - try { - process.kill(process.pid, signal); - /* c8 ignore start */ - } - catch (_) { - process.kill(process.pid, 'SIGTERM'); - } - /* c8 ignore stop */ - } - else { - process.exit(code || 0); - } - }); - if (process.send) { - process.removeAllListeners('message'); - child.on('message', (message, sendHandle) => { - process.send?.(message, sendHandle); - }); - process.on('message', (message, sendHandle) => { - child.send(message, sendHandle); - }); - } - return child; -} -const isPromise = (o) => !!o && typeof o === 'object' && typeof o.then === 'function'; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/foreground-child/dist/esm/index.js.map b/node_modules/foreground-child/dist/esm/index.js.map deleted file mode 100644 index 7d9d1bd0..00000000 --- a/node_modules/foreground-child/dist/esm/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,IAAI,SAAS,GAGnB,MAAM,eAAe,CAAA;AACtB,OAAO,UAAU,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAExC,qBAAqB;AACrB,MAAM,KAAK,GAAG,OAAO,EAAE,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,CAAA;AAsDpE;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,eAA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,IAAI,OAAO,CAAC,CAAC,IAAI,KAAK,UAAU,CAAA","sourcesContent":["import {\n ChildProcessByStdio,\n SendHandle,\n Serializable,\n spawn as nodeSpawn,\n SpawnOptions,\n ChildProcess,\n} from 'child_process'\nimport crossSpawn from 'cross-spawn'\nimport { onExit } from 'signal-exit'\nimport { proxySignals } from './proxy-signals.js'\nimport { watchdog } from './watchdog.js'\n\n/* c8 ignore start */\nconst spawn = process?.platform === 'win32' ? crossSpawn : nodeSpawn\n/* c8 ignore stop */\n\n/**\n * The signature for the cleanup method.\n *\n * Arguments indicate the exit status of the child process.\n *\n * If a Promise is returned, then the process is not terminated\n * until it resolves, and the resolution value is treated as the\n * exit status (if a number) or signal exit (if a signal string).\n *\n * If `undefined` is returned, then no change is made, and the parent\n * exits in the same way that the child exited.\n *\n * If boolean `false` is returned, then the parent's exit is canceled.\n *\n * If a number is returned, then the parent process exits with the number\n * as its exitCode.\n *\n * If a signal string is returned, then the parent process is killed with\n * the same signal that caused the child to exit.\n */\nexport type Cleanup = (\n code: number | null,\n signal: null | NodeJS.Signals,\n processInfo: {\n watchdogPid?: ChildProcess['pid']\n },\n) =>\n | void\n | undefined\n | number\n | NodeJS.Signals\n | false\n | Promise\n\nexport type FgArgs =\n | [program: string | [cmd: string, ...args: string[]], cleanup?: Cleanup]\n | [\n program: [cmd: string, ...args: string[]],\n opts?: SpawnOptions,\n cleanup?: Cleanup,\n ]\n | [program: string, cleanup?: Cleanup]\n | [program: string, opts?: SpawnOptions, cleanup?: Cleanup]\n | [program: string, args?: string[], cleanup?: Cleanup]\n | [\n program: string,\n args?: string[],\n opts?: SpawnOptions,\n cleanup?: Cleanup,\n ]\n\n/**\n * Normalizes the arguments passed to `foregroundChild`.\n *\n * Exposed for testing.\n *\n * @internal\n */\nexport const normalizeFgArgs = (\n fgArgs: FgArgs,\n): [\n program: string,\n args: string[],\n spawnOpts: SpawnOptions,\n cleanup: Cleanup,\n] => {\n let [program, args = [], spawnOpts = {}, cleanup = () => {}] = fgArgs\n if (typeof args === 'function') {\n cleanup = args\n spawnOpts = {}\n args = []\n } else if (!!args && typeof args === 'object' && !Array.isArray(args)) {\n if (typeof spawnOpts === 'function') cleanup = spawnOpts\n spawnOpts = args\n args = []\n } else if (typeof spawnOpts === 'function') {\n cleanup = spawnOpts\n spawnOpts = {}\n }\n if (Array.isArray(program)) {\n const [pp, ...pa] = program\n program = pp\n args = pa\n }\n return [program, args, { ...spawnOpts }, cleanup]\n}\n\n/**\n * Spawn the specified program as a \"foreground\" process, or at least as\n * close as is possible given node's lack of exec-without-fork.\n *\n * Cleanup method may be used to modify or ignore the result of the child's\n * exit code or signal. If cleanup returns undefined (or a Promise that\n * resolves to undefined), then the parent will exit in the same way that\n * the child did.\n *\n * Return boolean `false` to prevent the parent's exit entirely.\n */\nexport function foregroundChild(\n cmd: string | [cmd: string, ...args: string[]],\n cleanup?: Cleanup,\n): ChildProcessByStdio\nexport function foregroundChild(\n program: string,\n args?: string[],\n cleanup?: Cleanup,\n): ChildProcessByStdio\nexport function foregroundChild(\n program: string,\n spawnOpts?: SpawnOptions,\n cleanup?: Cleanup,\n): ChildProcessByStdio\nexport function foregroundChild(\n program: string,\n args?: string[],\n spawnOpts?: SpawnOptions,\n cleanup?: Cleanup,\n): ChildProcessByStdio\nexport function foregroundChild(\n ...fgArgs: FgArgs\n): ChildProcessByStdio {\n const [program, args, spawnOpts, cleanup] = normalizeFgArgs(fgArgs)\n\n spawnOpts.stdio = [0, 1, 2]\n if (process.send) {\n spawnOpts.stdio.push('ipc')\n }\n\n const child = spawn(program, args, spawnOpts) as ChildProcessByStdio<\n null,\n null,\n null\n >\n\n const childHangup = () => {\n try {\n child.kill('SIGHUP')\n\n /* c8 ignore start */\n } catch (_) {\n // SIGHUP is weird on windows\n child.kill('SIGTERM')\n }\n /* c8 ignore stop */\n }\n const removeOnExit = onExit(childHangup)\n\n proxySignals(child)\n const dog = watchdog(child)\n\n let done = false\n child.on('close', async (code, signal) => {\n /* c8 ignore start */\n if (done) return\n /* c8 ignore stop */\n done = true\n const result = cleanup(code, signal, {\n watchdogPid: dog.pid,\n })\n const res = isPromise(result) ? await result : result\n removeOnExit()\n\n if (res === false) return\n else if (typeof res === 'string') {\n signal = res\n code = null\n } else if (typeof res === 'number') {\n code = res\n signal = null\n }\n\n if (signal) {\n // If there is nothing else keeping the event loop alive,\n // then there's a race between a graceful exit and getting\n // the signal to this process. Put this timeout here to\n // make sure we're still alive to get the signal, and thus\n // exit with the intended signal code.\n /* istanbul ignore next */\n setTimeout(() => {}, 2000)\n try {\n process.kill(process.pid, signal)\n /* c8 ignore start */\n } catch (_) {\n process.kill(process.pid, 'SIGTERM')\n }\n /* c8 ignore stop */\n } else {\n process.exit(code || 0)\n }\n })\n\n if (process.send) {\n process.removeAllListeners('message')\n\n child.on('message', (message, sendHandle) => {\n process.send?.(message, sendHandle)\n })\n\n process.on('message', (message, sendHandle) => {\n child.send(\n message as Serializable,\n sendHandle as SendHandle | undefined,\n )\n })\n }\n\n return child\n}\n\nconst isPromise = (o: any): o is Promise =>\n !!o && typeof o === 'object' && typeof o.then === 'function'\n"]} \ No newline at end of file diff --git a/node_modules/foreground-child/dist/esm/package.json b/node_modules/foreground-child/dist/esm/package.json deleted file mode 100644 index 3dbc1ca5..00000000 --- a/node_modules/foreground-child/dist/esm/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "type": "module" -} diff --git a/node_modules/foreground-child/dist/esm/proxy-signals.d.ts b/node_modules/foreground-child/dist/esm/proxy-signals.d.ts deleted file mode 100644 index aadb9f64..00000000 --- a/node_modules/foreground-child/dist/esm/proxy-signals.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -/// -import { type ChildProcess } from 'child_process'; -/** - * Starts forwarding signals to `child` through `parent`. - */ -export declare const proxySignals: (child: ChildProcess) => () => void; -//# sourceMappingURL=proxy-signals.d.ts.map \ No newline at end of file diff --git a/node_modules/foreground-child/dist/esm/proxy-signals.d.ts.map b/node_modules/foreground-child/dist/esm/proxy-signals.d.ts.map deleted file mode 100644 index 9c98b7fc..00000000 --- a/node_modules/foreground-child/dist/esm/proxy-signals.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"proxy-signals.d.ts","sourceRoot":"","sources":["../../src/proxy-signals.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,eAAe,CAAA;AAGjD;;GAEG;AACH,eAAO,MAAM,YAAY,UAAW,YAAY,eA4B/C,CAAA"} \ No newline at end of file diff --git a/node_modules/foreground-child/dist/esm/proxy-signals.js b/node_modules/foreground-child/dist/esm/proxy-signals.js deleted file mode 100644 index 8e1efe3e..00000000 --- a/node_modules/foreground-child/dist/esm/proxy-signals.js +++ /dev/null @@ -1,34 +0,0 @@ -import { allSignals } from './all-signals.js'; -/** - * Starts forwarding signals to `child` through `parent`. - */ -export const proxySignals = (child) => { - const listeners = new Map(); - for (const sig of allSignals) { - const listener = () => { - // some signals can only be received, not sent - try { - child.kill(sig); - /* c8 ignore start */ - } - catch (_) { } - /* c8 ignore stop */ - }; - try { - // if it's a signal this system doesn't recognize, skip it - process.on(sig, listener); - listeners.set(sig, listener); - /* c8 ignore start */ - } - catch (_) { } - /* c8 ignore stop */ - } - const unproxy = () => { - for (const [sig, listener] of listeners) { - process.removeListener(sig, listener); - } - }; - child.on('exit', unproxy); - return unproxy; -}; -//# sourceMappingURL=proxy-signals.js.map \ No newline at end of file diff --git a/node_modules/foreground-child/dist/esm/proxy-signals.js.map b/node_modules/foreground-child/dist/esm/proxy-signals.js.map deleted file mode 100644 index 978750fc..00000000 --- a/node_modules/foreground-child/dist/esm/proxy-signals.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"proxy-signals.js","sourceRoot":"","sources":["../../src/proxy-signals.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAE7C;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,KAAmB,EAAE,EAAE;IAClD,MAAM,SAAS,GAAG,IAAI,GAAG,EAAE,CAAA;IAE3B,KAAK,MAAM,GAAG,IAAI,UAAU,EAAE,CAAC;QAC7B,MAAM,QAAQ,GAAG,GAAG,EAAE;YACpB,8CAA8C;YAC9C,IAAI,CAAC;gBACH,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;gBACf,qBAAqB;YACvB,CAAC;YAAC,OAAO,CAAC,EAAE,CAAC,CAAA,CAAC;YACd,oBAAoB;QACtB,CAAC,CAAA;QACD,IAAI,CAAC;YACH,0DAA0D;YAC1D,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAA;YACzB,SAAS,CAAC,GAAG,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAA;YAC5B,qBAAqB;QACvB,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC,CAAA,CAAC;QACd,oBAAoB;IACtB,CAAC;IAED,MAAM,OAAO,GAAG,GAAG,EAAE;QACnB,KAAK,MAAM,CAAC,GAAG,EAAE,QAAQ,CAAC,IAAI,SAAS,EAAE,CAAC;YACxC,OAAO,CAAC,cAAc,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAA;QACvC,CAAC;IACH,CAAC,CAAA;IACD,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACzB,OAAO,OAAO,CAAA;AAChB,CAAC,CAAA","sourcesContent":["import { type ChildProcess } from 'child_process'\nimport { allSignals } from './all-signals.js'\n\n/**\n * Starts forwarding signals to `child` through `parent`.\n */\nexport const proxySignals = (child: ChildProcess) => {\n const listeners = new Map()\n\n for (const sig of allSignals) {\n const listener = () => {\n // some signals can only be received, not sent\n try {\n child.kill(sig)\n /* c8 ignore start */\n } catch (_) {}\n /* c8 ignore stop */\n }\n try {\n // if it's a signal this system doesn't recognize, skip it\n process.on(sig, listener)\n listeners.set(sig, listener)\n /* c8 ignore start */\n } catch (_) {}\n /* c8 ignore stop */\n }\n\n const unproxy = () => {\n for (const [sig, listener] of listeners) {\n process.removeListener(sig, listener)\n }\n }\n child.on('exit', unproxy)\n return unproxy\n}\n"]} \ No newline at end of file diff --git a/node_modules/foreground-child/dist/esm/watchdog.d.ts b/node_modules/foreground-child/dist/esm/watchdog.d.ts deleted file mode 100644 index edfdf4de..00000000 --- a/node_modules/foreground-child/dist/esm/watchdog.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -/// -import { ChildProcess } from 'child_process'; -/** - * Pass in a ChildProcess, and this will spawn a watchdog process that - * will make sure it exits if the parent does, thus preventing any - * dangling detached zombie processes. - * - * If the child ends before the parent, then the watchdog will terminate. - */ -export declare const watchdog: (child: ChildProcess) => ChildProcess; -//# sourceMappingURL=watchdog.d.ts.map \ No newline at end of file diff --git a/node_modules/foreground-child/dist/esm/watchdog.d.ts.map b/node_modules/foreground-child/dist/esm/watchdog.d.ts.map deleted file mode 100644 index cc6a668f..00000000 --- a/node_modules/foreground-child/dist/esm/watchdog.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"watchdog.d.ts","sourceRoot":"","sources":["../../src/watchdog.ts"],"names":[],"mappings":";AAIA,OAAO,EAAE,YAAY,EAAS,MAAM,eAAe,CAAA;AAyBnD;;;;;;GAMG;AACH,eAAO,MAAM,QAAQ,UAAW,YAAY,iBAc3C,CAAA"} \ No newline at end of file diff --git a/node_modules/foreground-child/dist/esm/watchdog.js b/node_modules/foreground-child/dist/esm/watchdog.js deleted file mode 100644 index 7aa184ed..00000000 --- a/node_modules/foreground-child/dist/esm/watchdog.js +++ /dev/null @@ -1,46 +0,0 @@ -// this spawns a child process that listens for SIGHUP when the -// parent process exits, and after 200ms, sends a SIGKILL to the -// child, in case it did not terminate. -import { spawn } from 'child_process'; -const watchdogCode = String.raw ` -const pid = parseInt(process.argv[1], 10) -process.title = 'node (foreground-child watchdog pid=' + pid + ')' -if (!isNaN(pid)) { - let barked = false - // keepalive - const interval = setInterval(() => {}, 60000) - const bark = () => { - clearInterval(interval) - if (barked) return - barked = true - process.removeListener('SIGHUP', bark) - setTimeout(() => { - try { - process.kill(pid, 'SIGKILL') - setTimeout(() => process.exit(), 200) - } catch (_) {} - }, 500) - }) - process.on('SIGHUP', bark) -} -`; -/** - * Pass in a ChildProcess, and this will spawn a watchdog process that - * will make sure it exits if the parent does, thus preventing any - * dangling detached zombie processes. - * - * If the child ends before the parent, then the watchdog will terminate. - */ -export const watchdog = (child) => { - let dogExited = false; - const dog = spawn(process.execPath, ['-e', watchdogCode, String(child.pid)], { - stdio: 'ignore', - }); - dog.on('exit', () => (dogExited = true)); - child.on('exit', () => { - if (!dogExited) - dog.kill('SIGKILL'); - }); - return dog; -}; -//# sourceMappingURL=watchdog.js.map \ No newline at end of file diff --git a/node_modules/foreground-child/dist/esm/watchdog.js.map b/node_modules/foreground-child/dist/esm/watchdog.js.map deleted file mode 100644 index 6f4e39fb..00000000 --- a/node_modules/foreground-child/dist/esm/watchdog.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"watchdog.js","sourceRoot":"","sources":["../../src/watchdog.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,gEAAgE;AAChE,uCAAuC;AAEvC,OAAO,EAAgB,KAAK,EAAE,MAAM,eAAe,CAAA;AAEnD,MAAM,YAAY,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;CAqB9B,CAAA;AAED;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,KAAmB,EAAE,EAAE;IAC9C,IAAI,SAAS,GAAG,KAAK,CAAA;IACrB,MAAM,GAAG,GAAG,KAAK,CACf,OAAO,CAAC,QAAQ,EAChB,CAAC,IAAI,EAAE,YAAY,EAAE,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,EACvC;QACE,KAAK,EAAE,QAAQ;KAChB,CACF,CAAA;IACD,GAAG,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC,SAAS,GAAG,IAAI,CAAC,CAAC,CAAA;IACxC,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE;QACpB,IAAI,CAAC,SAAS;YAAE,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;IACrC,CAAC,CAAC,CAAA;IACF,OAAO,GAAG,CAAA;AACZ,CAAC,CAAA","sourcesContent":["// this spawns a child process that listens for SIGHUP when the\n// parent process exits, and after 200ms, sends a SIGKILL to the\n// child, in case it did not terminate.\n\nimport { ChildProcess, spawn } from 'child_process'\n\nconst watchdogCode = String.raw`\nconst pid = parseInt(process.argv[1], 10)\nprocess.title = 'node (foreground-child watchdog pid=' + pid + ')'\nif (!isNaN(pid)) {\n let barked = false\n // keepalive\n const interval = setInterval(() => {}, 60000)\n const bark = () => {\n clearInterval(interval)\n if (barked) return\n barked = true\n process.removeListener('SIGHUP', bark)\n setTimeout(() => {\n try {\n process.kill(pid, 'SIGKILL')\n setTimeout(() => process.exit(), 200)\n } catch (_) {}\n }, 500)\n })\n process.on('SIGHUP', bark)\n}\n`\n\n/**\n * Pass in a ChildProcess, and this will spawn a watchdog process that\n * will make sure it exits if the parent does, thus preventing any\n * dangling detached zombie processes.\n *\n * If the child ends before the parent, then the watchdog will terminate.\n */\nexport const watchdog = (child: ChildProcess) => {\n let dogExited = false\n const dog = spawn(\n process.execPath,\n ['-e', watchdogCode, String(child.pid)],\n {\n stdio: 'ignore',\n },\n )\n dog.on('exit', () => (dogExited = true))\n child.on('exit', () => {\n if (!dogExited) dog.kill('SIGKILL')\n })\n return dog\n}\n"]} \ No newline at end of file diff --git a/node_modules/foreground-child/node_modules/signal-exit/LICENSE.txt b/node_modules/foreground-child/node_modules/signal-exit/LICENSE.txt deleted file mode 100644 index 954f2fa8..00000000 --- a/node_modules/foreground-child/node_modules/signal-exit/LICENSE.txt +++ /dev/null @@ -1,16 +0,0 @@ -The ISC License - -Copyright (c) 2015-2023 Benjamin Coe, 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/foreground-child/node_modules/signal-exit/README.md b/node_modules/foreground-child/node_modules/signal-exit/README.md deleted file mode 100644 index c55cd45e..00000000 --- a/node_modules/foreground-child/node_modules/signal-exit/README.md +++ /dev/null @@ -1,74 +0,0 @@ -# signal-exit - -When you want to fire an event no matter how a process exits: - -- reaching the end of execution. -- explicitly having `process.exit(code)` called. -- having `process.kill(pid, sig)` called. -- receiving a fatal signal from outside the process - -Use `signal-exit`. - -```js -// Hybrid module, either works -import { onExit } from 'signal-exit' -// or: -// const { onExit } = require('signal-exit') - -onExit((code, signal) => { - console.log('process exited!', code, signal) -}) -``` - -## API - -`remove = onExit((code, signal) => {}, options)` - -The return value of the function is a function that will remove -the handler. - -Note that the function _only_ fires for signals if the signal -would cause the process to exit. That is, there are no other -listeners, and it is a fatal signal. - -If the global `process` object is not suitable for this purpose -(ie, it's unset, or doesn't have an `emit` method, etc.) then the -`onExit` function is a no-op that returns a no-op `remove` method. - -### Options - -- `alwaysLast`: Run this handler after any other signal or exit - handlers. This causes `process.emit` to be monkeypatched. - -### Capturing Signal Exits - -If the handler returns an exact boolean `true`, and the exit is a -due to signal, then the signal will be considered handled, and -will _not_ trigger a synthetic `process.kill(process.pid, -signal)` after firing the `onExit` handlers. - -In this case, it your responsibility as the caller to exit with a -signal (for example, by calling `process.kill()`) if you wish to -preserve the same exit status that would otherwise have occurred. -If you do not, then the process will likely exit gracefully with -status 0 at some point, assuming that no other terminating signal -or other exit trigger occurs. - -Prior to calling handlers, the `onExit` machinery is unloaded, so -any subsequent exits or signals will not be handled, even if the -signal is captured and the exit is thus prevented. - -Note that numeric code exits may indicate that the process is -already committed to exiting, for example due to a fatal -exception or unhandled promise rejection, and so there is no way to -prevent it safely. - -### Browser Fallback - -The `'signal-exit/browser'` module is the same fallback shim that -just doesn't do anything, but presents the same function -interface. - -Patches welcome to add something that hooks onto -`window.onbeforeunload` or similar, but it might just not be a -thing that makes sense there. diff --git a/node_modules/foreground-child/node_modules/signal-exit/dist/cjs/browser.d.ts b/node_modules/foreground-child/node_modules/signal-exit/dist/cjs/browser.d.ts deleted file mode 100644 index 90f2e3f1..00000000 --- a/node_modules/foreground-child/node_modules/signal-exit/dist/cjs/browser.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * This is a browser shim that provides the same functional interface - * as the main node export, but it does nothing. - * @module - */ -import type { Handler } from './index.js'; -export declare const onExit: (cb: Handler, opts: { - alwaysLast?: boolean; -}) => () => void; -export declare const load: () => void; -export declare const unload: () => void; -//# sourceMappingURL=browser.d.ts.map \ No newline at end of file diff --git a/node_modules/foreground-child/node_modules/signal-exit/dist/cjs/browser.d.ts.map b/node_modules/foreground-child/node_modules/signal-exit/dist/cjs/browser.d.ts.map deleted file mode 100644 index aacc1d3b..00000000 --- a/node_modules/foreground-child/node_modules/signal-exit/dist/cjs/browser.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../../src/browser.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AACzC,eAAO,MAAM,MAAM,EAAE,CACnB,EAAE,EAAE,OAAO,EACX,IAAI,EAAE;IAAE,UAAU,CAAC,EAAE,OAAO,CAAA;CAAE,KAC3B,MAAM,IAAqB,CAAA;AAChC,eAAO,MAAM,IAAI,YAAW,CAAA;AAC5B,eAAO,MAAM,MAAM,YAAW,CAAA"} \ No newline at end of file diff --git a/node_modules/foreground-child/node_modules/signal-exit/dist/cjs/browser.js b/node_modules/foreground-child/node_modules/signal-exit/dist/cjs/browser.js deleted file mode 100644 index 614fbf01..00000000 --- a/node_modules/foreground-child/node_modules/signal-exit/dist/cjs/browser.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.unload = exports.load = exports.onExit = void 0; -const onExit = () => () => { }; -exports.onExit = onExit; -const load = () => { }; -exports.load = load; -const unload = () => { }; -exports.unload = unload; -//# sourceMappingURL=browser.js.map \ No newline at end of file diff --git a/node_modules/foreground-child/node_modules/signal-exit/dist/cjs/browser.js.map b/node_modules/foreground-child/node_modules/signal-exit/dist/cjs/browser.js.map deleted file mode 100644 index 342cf2e2..00000000 --- a/node_modules/foreground-child/node_modules/signal-exit/dist/cjs/browser.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"browser.js","sourceRoot":"","sources":["../../src/browser.ts"],"names":[],"mappings":";;;AAMO,MAAM,MAAM,GAGD,GAAG,EAAE,CAAC,GAAG,EAAE,GAAE,CAAC,CAAA;AAHnB,QAAA,MAAM,UAGa;AACzB,MAAM,IAAI,GAAG,GAAG,EAAE,GAAE,CAAC,CAAA;AAAf,QAAA,IAAI,QAAW;AACrB,MAAM,MAAM,GAAG,GAAG,EAAE,GAAE,CAAC,CAAA;AAAjB,QAAA,MAAM,UAAW","sourcesContent":["/**\n * This is a browser shim that provides the same functional interface\n * as the main node export, but it does nothing.\n * @module\n */\nimport type { Handler } from './index.js'\nexport const onExit: (\n cb: Handler,\n opts: { alwaysLast?: boolean }\n) => () => void = () => () => {}\nexport const load = () => {}\nexport const unload = () => {}\n"]} \ No newline at end of file diff --git a/node_modules/foreground-child/node_modules/signal-exit/dist/cjs/index.d.ts b/node_modules/foreground-child/node_modules/signal-exit/dist/cjs/index.d.ts deleted file mode 100644 index cabe9cfc..00000000 --- a/node_modules/foreground-child/node_modules/signal-exit/dist/cjs/index.d.ts +++ /dev/null @@ -1,48 +0,0 @@ -/// -import { signals } from './signals.js'; -export { signals }; -/** - * A function that takes an exit code and signal as arguments - * - * In the case of signal exits *only*, a return value of true - * will indicate that the signal is being handled, and we should - * not synthetically exit with the signal we received. Regardless - * of the handler return value, the handler is unloaded when an - * otherwise fatal signal is received, so you get exactly 1 shot - * at it, unless you add another onExit handler at that point. - * - * In the case of numeric code exits, we may already have committed - * to exiting the process, for example via a fatal exception or - * unhandled promise rejection, so it is impossible to stop safely. - */ -export type Handler = (code: number | null | undefined, signal: NodeJS.Signals | null) => true | void; -export declare const -/** - * Called when the process is exiting, whether via signal, explicit - * exit, or running out of stuff to do. - * - * If the global process object is not suitable for instrumentation, - * then this will be a no-op. - * - * Returns a function that may be used to unload signal-exit. - */ -onExit: (cb: Handler, opts?: { - alwaysLast?: boolean | undefined; -} | undefined) => () => void, -/** - * Load the listeners. Likely you never need to call this, unless - * doing a rather deep integration with signal-exit functionality. - * Mostly exposed for the benefit of testing. - * - * @internal - */ -load: () => void, -/** - * Unload the listeners. Likely you never need to call this, unless - * doing a rather deep integration with signal-exit functionality. - * Mostly exposed for the benefit of testing. - * - * @internal - */ -unload: () => void; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/foreground-child/node_modules/signal-exit/dist/cjs/index.d.ts.map b/node_modules/foreground-child/node_modules/signal-exit/dist/cjs/index.d.ts.map deleted file mode 100644 index f84594e2..00000000 --- a/node_modules/foreground-child/node_modules/signal-exit/dist/cjs/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACtC,OAAO,EAAE,OAAO,EAAE,CAAA;AAuBlB;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,OAAO,GAAG,CACpB,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAC/B,MAAM,EAAE,MAAM,CAAC,OAAO,GAAG,IAAI,KAC1B,IAAI,GAAG,IAAI,CAAA;AA8QhB,eAAO;AACL;;;;;;;;GAQG;AACH,MAAM,OAzMO,OAAO;;wBAPiD,IAAI;AAkNzE;;;;;;GAMG;AACH,IAAI;AAEJ;;;;;;GAMG;AACH,MAAM,YAGP,CAAA"} \ No newline at end of file diff --git a/node_modules/foreground-child/node_modules/signal-exit/dist/cjs/index.js b/node_modules/foreground-child/node_modules/signal-exit/dist/cjs/index.js deleted file mode 100644 index 797e6743..00000000 --- a/node_modules/foreground-child/node_modules/signal-exit/dist/cjs/index.js +++ /dev/null @@ -1,279 +0,0 @@ -"use strict"; -var _a; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.unload = exports.load = exports.onExit = exports.signals = void 0; -// Note: since nyc uses this module to output coverage, any lines -// that are in the direct sync flow of nyc's outputCoverage are -// ignored, since we can never get coverage for them. -// grab a reference to node's real process object right away -const signals_js_1 = require("./signals.js"); -Object.defineProperty(exports, "signals", { enumerable: true, get: function () { return signals_js_1.signals; } }); -const processOk = (process) => !!process && - typeof process === 'object' && - typeof process.removeListener === 'function' && - typeof process.emit === 'function' && - typeof process.reallyExit === 'function' && - typeof process.listeners === 'function' && - typeof process.kill === 'function' && - typeof process.pid === 'number' && - typeof process.on === 'function'; -const kExitEmitter = Symbol.for('signal-exit emitter'); -const global = globalThis; -const ObjectDefineProperty = Object.defineProperty.bind(Object); -// teeny special purpose ee -class Emitter { - emitted = { - afterExit: false, - exit: false, - }; - listeners = { - afterExit: [], - exit: [], - }; - count = 0; - id = Math.random(); - constructor() { - if (global[kExitEmitter]) { - return global[kExitEmitter]; - } - ObjectDefineProperty(global, kExitEmitter, { - value: this, - writable: false, - enumerable: false, - configurable: false, - }); - } - on(ev, fn) { - this.listeners[ev].push(fn); - } - removeListener(ev, fn) { - const list = this.listeners[ev]; - const i = list.indexOf(fn); - /* c8 ignore start */ - if (i === -1) { - return; - } - /* c8 ignore stop */ - if (i === 0 && list.length === 1) { - list.length = 0; - } - else { - list.splice(i, 1); - } - } - emit(ev, code, signal) { - if (this.emitted[ev]) { - return false; - } - this.emitted[ev] = true; - let ret = false; - for (const fn of this.listeners[ev]) { - ret = fn(code, signal) === true || ret; - } - if (ev === 'exit') { - ret = this.emit('afterExit', code, signal) || ret; - } - return ret; - } -} -class SignalExitBase { -} -const signalExitWrap = (handler) => { - return { - onExit(cb, opts) { - return handler.onExit(cb, opts); - }, - load() { - return handler.load(); - }, - unload() { - return handler.unload(); - }, - }; -}; -class SignalExitFallback extends SignalExitBase { - onExit() { - return () => { }; - } - load() { } - unload() { } -} -class SignalExit extends SignalExitBase { - // "SIGHUP" throws an `ENOSYS` error on Windows, - // so use a supported signal instead - /* c8 ignore start */ - #hupSig = process.platform === 'win32' ? 'SIGINT' : 'SIGHUP'; - /* c8 ignore stop */ - #emitter = new Emitter(); - #process; - #originalProcessEmit; - #originalProcessReallyExit; - #sigListeners = {}; - #loaded = false; - constructor(process) { - super(); - this.#process = process; - // { : , ... } - this.#sigListeners = {}; - for (const sig of signals_js_1.signals) { - this.#sigListeners[sig] = () => { - // If there are no other listeners, an exit is coming! - // Simplest way: remove us and then re-send the signal. - // We know that this will kill the process, so we can - // safely emit now. - const listeners = this.#process.listeners(sig); - let { count } = this.#emitter; - // This is a workaround for the fact that signal-exit v3 and signal - // exit v4 are not aware of each other, and each will attempt to let - // the other handle it, so neither of them do. To correct this, we - // detect if we're the only handler *except* for previous versions - // of signal-exit, and increment by the count of listeners it has - // created. - /* c8 ignore start */ - const p = process; - if (typeof p.__signal_exit_emitter__ === 'object' && - typeof p.__signal_exit_emitter__.count === 'number') { - count += p.__signal_exit_emitter__.count; - } - /* c8 ignore stop */ - if (listeners.length === count) { - this.unload(); - const ret = this.#emitter.emit('exit', null, sig); - /* c8 ignore start */ - const s = sig === 'SIGHUP' ? this.#hupSig : sig; - if (!ret) - process.kill(process.pid, s); - /* c8 ignore stop */ - } - }; - } - this.#originalProcessReallyExit = process.reallyExit; - this.#originalProcessEmit = process.emit; - } - onExit(cb, opts) { - /* c8 ignore start */ - if (!processOk(this.#process)) { - return () => { }; - } - /* c8 ignore stop */ - if (this.#loaded === false) { - this.load(); - } - const ev = opts?.alwaysLast ? 'afterExit' : 'exit'; - this.#emitter.on(ev, cb); - return () => { - this.#emitter.removeListener(ev, cb); - if (this.#emitter.listeners['exit'].length === 0 && - this.#emitter.listeners['afterExit'].length === 0) { - this.unload(); - } - }; - } - load() { - if (this.#loaded) { - return; - } - this.#loaded = true; - // This is the number of onSignalExit's that are in play. - // It's important so that we can count the correct number of - // listeners on signals, and don't wait for the other one to - // handle it instead of us. - this.#emitter.count += 1; - for (const sig of signals_js_1.signals) { - try { - const fn = this.#sigListeners[sig]; - if (fn) - this.#process.on(sig, fn); - } - catch (_) { } - } - this.#process.emit = (ev, ...a) => { - return this.#processEmit(ev, ...a); - }; - this.#process.reallyExit = (code) => { - return this.#processReallyExit(code); - }; - } - unload() { - if (!this.#loaded) { - return; - } - this.#loaded = false; - signals_js_1.signals.forEach(sig => { - const listener = this.#sigListeners[sig]; - /* c8 ignore start */ - if (!listener) { - throw new Error('Listener not defined for signal: ' + sig); - } - /* c8 ignore stop */ - try { - this.#process.removeListener(sig, listener); - /* c8 ignore start */ - } - catch (_) { } - /* c8 ignore stop */ - }); - this.#process.emit = this.#originalProcessEmit; - this.#process.reallyExit = this.#originalProcessReallyExit; - this.#emitter.count -= 1; - } - #processReallyExit(code) { - /* c8 ignore start */ - if (!processOk(this.#process)) { - return 0; - } - this.#process.exitCode = code || 0; - /* c8 ignore stop */ - this.#emitter.emit('exit', this.#process.exitCode, null); - return this.#originalProcessReallyExit.call(this.#process, this.#process.exitCode); - } - #processEmit(ev, ...args) { - const og = this.#originalProcessEmit; - if (ev === 'exit' && processOk(this.#process)) { - if (typeof args[0] === 'number') { - this.#process.exitCode = args[0]; - /* c8 ignore start */ - } - /* c8 ignore start */ - const ret = og.call(this.#process, ev, ...args); - /* c8 ignore start */ - this.#emitter.emit('exit', this.#process.exitCode, null); - /* c8 ignore stop */ - return ret; - } - else { - return og.call(this.#process, ev, ...args); - } - } -} -const process = globalThis.process; -// wrap so that we call the method on the actual handler, without -// exporting it directly. -_a = signalExitWrap(processOk(process) ? new SignalExit(process) : new SignalExitFallback()), -/** - * Called when the process is exiting, whether via signal, explicit - * exit, or running out of stuff to do. - * - * If the global process object is not suitable for instrumentation, - * then this will be a no-op. - * - * Returns a function that may be used to unload signal-exit. - */ -exports.onExit = _a.onExit, -/** - * Load the listeners. Likely you never need to call this, unless - * doing a rather deep integration with signal-exit functionality. - * Mostly exposed for the benefit of testing. - * - * @internal - */ -exports.load = _a.load, -/** - * Unload the listeners. Likely you never need to call this, unless - * doing a rather deep integration with signal-exit functionality. - * Mostly exposed for the benefit of testing. - * - * @internal - */ -exports.unload = _a.unload; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/foreground-child/node_modules/signal-exit/dist/cjs/index.js.map b/node_modules/foreground-child/node_modules/signal-exit/dist/cjs/index.js.map deleted file mode 100644 index 528e3cc9..00000000 --- a/node_modules/foreground-child/node_modules/signal-exit/dist/cjs/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;AAAA,iEAAiE;AACjE,+DAA+D;AAC/D,qDAAqD;AACrD,4DAA4D;AAC5D,6CAAsC;AAC7B,wFADA,oBAAO,OACA;AAQhB,MAAM,SAAS,GAAG,CAAC,OAAY,EAAwB,EAAE,CACvD,CAAC,CAAC,OAAO;IACT,OAAO,OAAO,KAAK,QAAQ;IAC3B,OAAO,OAAO,CAAC,cAAc,KAAK,UAAU;IAC5C,OAAO,OAAO,CAA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CAAC,QAAQ,CAAC,QAAQ,GAAG,IAAI,CAAC,CAAC,CAAC,CAAA;gBAChC,qBAAqB;aACtB;YACD,qBAAqB;YACrB,MAAM,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,EAAE,GAAG,IAAI,CAAC,CAAA;YAC/C,qBAAqB;YACrB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAA;YACxD,oBAAoB;YACpB,OAAO,GAAG,CAAA;SACX;aAAM;YACL,OAAO,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,EAAE,GAAG,IAAI,CAAC,CAAA;SAC3C;IACH,CAAC;CACF;AAED,MAAM,OAAO,GAAG,UAAU,CAAC,OAAO,CAAA;AAClC,iEAAiE;AACjE,yBAAyB;AACZ,KA6BT,cAAc,CAChB,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,kBAAkB,EAAE,CACxE;AA9BC;;;;;;;;GAQG;AACH,cAAM;AAEN;;;;;;GAMG;AACH,YAAI;AAEJ;;;;;;GAMG;AACH,cAAM,aAGP","sourcesContent":["// Note: since nyc uses this module to output coverage, any lines\n// that are in the direct sync flow of nyc's outputCoverage are\n// ignored, since we can never get coverage for them.\n// grab a reference to node's real process object right away\nimport { signals } from './signals.js'\nexport { signals }\n\n// just a loosened process type so we can do some evil things\ntype ProcessRE = NodeJS.Process & {\n reallyExit: (code?: number | undefined | null) => any\n emit: (ev: string, ...a: any[]) => any\n}\n\nconst processOk = (process: any): process is ProcessRE =>\n !!process &&\n typeof process === 'object' &&\n typeof process.removeListener === 'function' &&\n typeof process.emit === 'function' &&\n typeof process.reallyExit === 'function' &&\n typeof process.listeners === 'function' &&\n typeof process.kill === 'function' &&\n typeof process.pid === 'number' &&\n typeof process.on === 'function'\n\nconst kExitEmitter = Symbol.for('signal-exit emitter')\nconst global: typeof globalThis & { [kExitEmitter]?: Emitter } = globalThis\nconst ObjectDefineProperty = Object.defineProperty.bind(Object)\n\n/**\n * A function that takes an exit code and signal as arguments\n *\n * In the case of signal exits *only*, a return value of true\n * will indicate that the signal is being handled, and we should\n * not synthetically exit with the signal we received. Regardless\n * of the handler return value, the handler is unloaded when an\n * otherwise fatal signal is received, so you get exactly 1 shot\n * at it, unless you add another onExit handler at that point.\n *\n * In the case of numeric code exits, we may already have committed\n * to exiting the process, for example via a fatal exception or\n * unhandled promise rejection, so it is impossible to stop safely.\n */\nexport type Handler = (\n code: number | null | undefined,\n signal: NodeJS.Signals | null\n) => true | void\ntype ExitEvent = 'afterExit' | 'exit'\ntype Emitted = { [k in ExitEvent]: boolean }\ntype Listeners = { [k in ExitEvent]: Handler[] }\n\n// teeny special purpose ee\nclass Emitter {\n emitted: Emitted = {\n afterExit: false,\n exit: false,\n }\n\n listeners: Listeners = {\n afterExit: [],\n exit: [],\n }\n\n count: number = 0\n id: number = Math.random()\n\n constructor() {\n if (global[kExitEmitter]) {\n return global[kExitEmitter]\n }\n ObjectDefineProperty(global, kExitEmitter, {\n value: this,\n writable: false,\n enumerable: false,\n configurable: false,\n })\n }\n\n on(ev: ExitEvent, fn: Handler) {\n this.listeners[ev].push(fn)\n }\n\n removeListener(ev: ExitEvent, fn: Handler) {\n const list = this.listeners[ev]\n const i = list.indexOf(fn)\n /* c8 ignore start */\n if (i === -1) {\n return\n }\n /* c8 ignore stop */\n if (i === 0 && list.length === 1) {\n list.length = 0\n } else {\n list.splice(i, 1)\n }\n }\n\n emit(\n ev: ExitEvent,\n code: number | null | undefined,\n signal: NodeJS.Signals | null\n ): boolean {\n if (this.emitted[ev]) {\n return false\n }\n this.emitted[ev] = true\n let ret: boolean = false\n for (const fn of this.listeners[ev]) {\n ret = fn(code, signal) === true || ret\n }\n if (ev === 'exit') {\n ret = this.emit('afterExit', code, signal) || ret\n }\n return ret\n }\n}\n\nabstract class SignalExitBase {\n abstract onExit(cb: Handler, opts?: { alwaysLast?: boolean }): () => void\n abstract load(): void\n abstract unload(): void\n}\n\nconst signalExitWrap = (handler: T) => {\n return {\n onExit(cb: Handler, opts?: { alwaysLast?: boolean }) {\n return handler.onExit(cb, opts)\n },\n load() {\n return handler.load()\n },\n unload() {\n return handler.unload()\n },\n }\n}\n\nclass SignalExitFallback extends SignalExitBase {\n onExit() {\n return () => {}\n }\n load() {}\n unload() {}\n}\n\nclass SignalExit extends SignalExitBase {\n // \"SIGHUP\" throws an `ENOSYS` error on Windows,\n // so use a supported signal instead\n /* c8 ignore start */\n #hupSig = process.platform === 'win32' ? 'SIGINT' : 'SIGHUP'\n /* c8 ignore stop */\n #emitter = new Emitter()\n #process: ProcessRE\n #originalProcessEmit: ProcessRE['emit']\n #originalProcessReallyExit: ProcessRE['reallyExit']\n\n #sigListeners: { [k in NodeJS.Signals]?: () => void } = {}\n #loaded: boolean = false\n\n constructor(process: ProcessRE) {\n super()\n this.#process = process\n // { : , ... }\n this.#sigListeners = {}\n for (const sig of signals) {\n this.#sigListeners[sig] = () => {\n // If there are no other listeners, an exit is coming!\n // Simplest way: remove us and then re-send the signal.\n // We know that this will kill the process, so we can\n // safely emit now.\n const listeners = this.#process.listeners(sig)\n let { count } = this.#emitter\n // This is a workaround for the fact that signal-exit v3 and signal\n // exit v4 are not aware of each other, and each will attempt to let\n // the other handle it, so neither of them do. To correct this, we\n // detect if we're the only handler *except* for previous versions\n // of signal-exit, and increment by the count of listeners it has\n // created.\n /* c8 ignore start */\n const p = process as unknown as {\n __signal_exit_emitter__?: { count: number }\n }\n if (\n typeof p.__signal_exit_emitter__ === 'object' &&\n typeof p.__signal_exit_emitter__.count === 'number'\n ) {\n count += p.__signal_exit_emitter__.count\n }\n /* c8 ignore stop */\n if (listeners.length === count) {\n this.unload()\n const ret = this.#emitter.emit('exit', null, sig)\n /* c8 ignore start */\n const s = sig === 'SIGHUP' ? this.#hupSig : sig\n if (!ret) process.kill(process.pid, s)\n /* c8 ignore stop */\n }\n }\n }\n\n this.#originalProcessReallyExit = process.reallyExit\n this.#originalProcessEmit = process.emit\n }\n\n onExit(cb: Handler, opts?: { alwaysLast?: boolean }) {\n /* c8 ignore start */\n if (!processOk(this.#process)) {\n return () => {}\n }\n /* c8 ignore stop */\n\n if (this.#loaded === false) {\n this.load()\n }\n\n const ev = opts?.alwaysLast ? 'afterExit' : 'exit'\n this.#emitter.on(ev, cb)\n return () => {\n this.#emitter.removeListener(ev, cb)\n if (\n this.#emitter.listeners['exit'].length === 0 &&\n this.#emitter.listeners['afterExit'].length === 0\n ) {\n this.unload()\n }\n }\n }\n\n load() {\n if (this.#loaded) {\n return\n }\n this.#loaded = true\n\n // This is the number of onSignalExit's that are in play.\n // It's important so that we can count the correct number of\n // listeners on signals, and don't wait for the other one to\n // handle it instead of us.\n this.#emitter.count += 1\n\n for (const sig of signals) {\n try {\n const fn = this.#sigListeners[sig]\n if (fn) this.#process.on(sig, fn)\n } catch (_) {}\n }\n\n this.#process.emit = (ev: string, ...a: any[]) => {\n return this.#processEmit(ev, ...a)\n }\n this.#process.reallyExit = (code?: number | null | undefined) => {\n return this.#processReallyExit(code)\n }\n }\n\n unload() {\n if (!this.#loaded) {\n return\n }\n this.#loaded = false\n\n signals.forEach(sig => {\n const listener = this.#sigListeners[sig]\n /* c8 ignore start */\n if (!listener) {\n throw new Error('Listener not defined for signal: ' + sig)\n }\n /* c8 ignore stop */\n try {\n this.#process.removeListener(sig, listener)\n /* c8 ignore start */\n } catch (_) {}\n /* c8 ignore stop */\n })\n this.#process.emit = this.#originalProcessEmit\n this.#process.reallyExit = this.#originalProcessReallyExit\n this.#emitter.count -= 1\n }\n\n #processReallyExit(code?: number | null | undefined) {\n /* c8 ignore start */\n if (!processOk(this.#process)) {\n return 0\n }\n this.#process.exitCode = code || 0\n /* c8 ignore stop */\n\n this.#emitter.emit('exit', this.#process.exitCode, null)\n return this.#originalProcessReallyExit.call(\n this.#process,\n this.#process.exitCode\n )\n }\n\n #processEmit(ev: string, ...args: any[]): any {\n const og = this.#originalProcessEmit\n if (ev === 'exit' && processOk(this.#process)) {\n if (typeof args[0] === 'number') {\n this.#process.exitCode = args[0]\n /* c8 ignore start */\n }\n /* c8 ignore start */\n const ret = og.call(this.#process, ev, ...args)\n /* c8 ignore start */\n this.#emitter.emit('exit', this.#process.exitCode, null)\n /* c8 ignore stop */\n return ret\n } else {\n return og.call(this.#process, ev, ...args)\n }\n }\n}\n\nconst process = globalThis.process\n// wrap so that we call the method on the actual handler, without\n// exporting it directly.\nexport const {\n /**\n * Called when the process is exiting, whether via signal, explicit\n * exit, or running out of stuff to do.\n *\n * If the global process object is not suitable for instrumentation,\n * then this will be a no-op.\n *\n * Returns a function that may be used to unload signal-exit.\n */\n onExit,\n\n /**\n * Load the listeners. Likely you never need to call this, unless\n * doing a rather deep integration with signal-exit functionality.\n * Mostly exposed for the benefit of testing.\n *\n * @internal\n */\n load,\n\n /**\n * Unload the listeners. Likely you never need to call this, unless\n * doing a rather deep integration with signal-exit functionality.\n * Mostly exposed for the benefit of testing.\n *\n * @internal\n */\n unload,\n} = signalExitWrap(\n processOk(process) ? new SignalExit(process) : new SignalExitFallback()\n)\n"]} \ No newline at end of file diff --git a/node_modules/foreground-child/node_modules/signal-exit/dist/cjs/package.json b/node_modules/foreground-child/node_modules/signal-exit/dist/cjs/package.json deleted file mode 100644 index 5bbefffb..00000000 --- a/node_modules/foreground-child/node_modules/signal-exit/dist/cjs/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "type": "commonjs" -} diff --git a/node_modules/foreground-child/node_modules/signal-exit/dist/cjs/signals.d.ts b/node_modules/foreground-child/node_modules/signal-exit/dist/cjs/signals.d.ts deleted file mode 100644 index 3f01ef00..00000000 --- a/node_modules/foreground-child/node_modules/signal-exit/dist/cjs/signals.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -/// -/** - * This is not the set of all possible signals. - * - * It IS, however, the set of all signals that trigger - * an exit on either Linux or BSD systems. Linux is a - * superset of the signal names supported on BSD, and - * the unknown signals just fail to register, so we can - * catch that easily enough. - * - * Windows signals are a different set, since there are - * signals that terminate Windows processes, but don't - * terminate (or don't even exist) on Posix systems. - * - * Don't bother with SIGKILL. It's uncatchable, which - * means that we can't fire any callbacks anyway. - * - * If a user does happen to register a handler on a non- - * fatal signal like SIGWINCH or something, and then - * exit, it'll end up firing `process.emit('exit')`, so - * the handler will be fired anyway. - * - * SIGBUS, SIGFPE, SIGSEGV and SIGILL, when not raised - * artificially, inherently leave the process in a - * state from which it is not safe to try and enter JS - * listeners. - */ -export declare const signals: NodeJS.Signals[]; -//# sourceMappingURL=signals.d.ts.map \ No newline at end of file diff --git a/node_modules/foreground-child/node_modules/signal-exit/dist/cjs/signals.d.ts.map b/node_modules/foreground-child/node_modules/signal-exit/dist/cjs/signals.d.ts.map deleted file mode 100644 index 891fe1e6..00000000 --- a/node_modules/foreground-child/node_modules/signal-exit/dist/cjs/signals.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"signals.d.ts","sourceRoot":"","sources":["../../src/signals.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,OAAO,EAAE,MAAM,CAAC,OAAO,EAAO,CAAA"} \ No newline at end of file diff --git a/node_modules/foreground-child/node_modules/signal-exit/dist/cjs/signals.js b/node_modules/foreground-child/node_modules/signal-exit/dist/cjs/signals.js deleted file mode 100644 index 28afc502..00000000 --- a/node_modules/foreground-child/node_modules/signal-exit/dist/cjs/signals.js +++ /dev/null @@ -1,42 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.signals = void 0; -/** - * This is not the set of all possible signals. - * - * It IS, however, the set of all signals that trigger - * an exit on either Linux or BSD systems. Linux is a - * superset of the signal names supported on BSD, and - * the unknown signals just fail to register, so we can - * catch that easily enough. - * - * Windows signals are a different set, since there are - * signals that terminate Windows processes, but don't - * terminate (or don't even exist) on Posix systems. - * - * Don't bother with SIGKILL. It's uncatchable, which - * means that we can't fire any callbacks anyway. - * - * If a user does happen to register a handler on a non- - * fatal signal like SIGWINCH or something, and then - * exit, it'll end up firing `process.emit('exit')`, so - * the handler will be fired anyway. - * - * SIGBUS, SIGFPE, SIGSEGV and SIGILL, when not raised - * artificially, inherently leave the process in a - * state from which it is not safe to try and enter JS - * listeners. - */ -exports.signals = []; -exports.signals.push('SIGHUP', 'SIGINT', 'SIGTERM'); -if (process.platform !== 'win32') { - exports.signals.push('SIGALRM', 'SIGABRT', 'SIGVTALRM', 'SIGXCPU', 'SIGXFSZ', 'SIGUSR2', 'SIGTRAP', 'SIGSYS', 'SIGQUIT', 'SIGIOT' - // should detect profiler and enable/disable accordingly. - // see #21 - // 'SIGPROF' - ); -} -if (process.platform === 'linux') { - exports.signals.push('SIGIO', 'SIGPOLL', 'SIGPWR', 'SIGSTKFLT'); -} -//# sourceMappingURL=signals.js.map \ No newline at end of file diff --git a/node_modules/foreground-child/node_modules/signal-exit/dist/cjs/signals.js.map b/node_modules/foreground-child/node_modules/signal-exit/dist/cjs/signals.js.map deleted file mode 100644 index 78c613f6..00000000 --- a/node_modules/foreground-child/node_modules/signal-exit/dist/cjs/signals.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"signals.js","sourceRoot":"","sources":["../../src/signals.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACU,QAAA,OAAO,GAAqB,EAAE,CAAA;AAC3C,eAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAA;AAE3C,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO,EAAE;IAChC,eAAO,CAAC,IAAI,CACV,SAAS,EACT,SAAS,EACT,WAAW,EACX,SAAS,EACT,SAAS,EACT,SAAS,EACT,SAAS,EACT,QAAQ,EACR,SAAS,EACT,QAAQ;IACR,yDAAyD;IACzD,UAAU;IACV,YAAY;KACb,CAAA;CACF;AAED,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO,EAAE;IAChC,eAAO,CAAC,IAAI,CAAC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAA;CACxD","sourcesContent":["/**\n * This is not the set of all possible signals.\n *\n * It IS, however, the set of all signals that trigger\n * an exit on either Linux or BSD systems. Linux is a\n * superset of the signal names supported on BSD, and\n * the unknown signals just fail to register, so we can\n * catch that easily enough.\n *\n * Windows signals are a different set, since there are\n * signals that terminate Windows processes, but don't\n * terminate (or don't even exist) on Posix systems.\n *\n * Don't bother with SIGKILL. It's uncatchable, which\n * means that we can't fire any callbacks anyway.\n *\n * If a user does happen to register a handler on a non-\n * fatal signal like SIGWINCH or something, and then\n * exit, it'll end up firing `process.emit('exit')`, so\n * the handler will be fired anyway.\n *\n * SIGBUS, SIGFPE, SIGSEGV and SIGILL, when not raised\n * artificially, inherently leave the process in a\n * state from which it is not safe to try and enter JS\n * listeners.\n */\nexport const signals: NodeJS.Signals[] = []\nsignals.push('SIGHUP', 'SIGINT', 'SIGTERM')\n\nif (process.platform !== 'win32') {\n signals.push(\n 'SIGALRM',\n 'SIGABRT',\n 'SIGVTALRM',\n 'SIGXCPU',\n 'SIGXFSZ',\n 'SIGUSR2',\n 'SIGTRAP',\n 'SIGSYS',\n 'SIGQUIT',\n 'SIGIOT'\n // should detect profiler and enable/disable accordingly.\n // see #21\n // 'SIGPROF'\n )\n}\n\nif (process.platform === 'linux') {\n signals.push('SIGIO', 'SIGPOLL', 'SIGPWR', 'SIGSTKFLT')\n}\n"]} \ No newline at end of file diff --git a/node_modules/foreground-child/node_modules/signal-exit/dist/mjs/browser.d.ts b/node_modules/foreground-child/node_modules/signal-exit/dist/mjs/browser.d.ts deleted file mode 100644 index 90f2e3f1..00000000 --- a/node_modules/foreground-child/node_modules/signal-exit/dist/mjs/browser.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * This is a browser shim that provides the same functional interface - * as the main node export, but it does nothing. - * @module - */ -import type { Handler } from './index.js'; -export declare const onExit: (cb: Handler, opts: { - alwaysLast?: boolean; -}) => () => void; -export declare const load: () => void; -export declare const unload: () => void; -//# sourceMappingURL=browser.d.ts.map \ No newline at end of file diff --git a/node_modules/foreground-child/node_modules/signal-exit/dist/mjs/browser.d.ts.map b/node_modules/foreground-child/node_modules/signal-exit/dist/mjs/browser.d.ts.map deleted file mode 100644 index aacc1d3b..00000000 --- a/node_modules/foreground-child/node_modules/signal-exit/dist/mjs/browser.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../../src/browser.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AACzC,eAAO,MAAM,MAAM,EAAE,CACnB,EAAE,EAAE,OAAO,EACX,IAAI,EAAE;IAAE,UAAU,CAAC,EAAE,OAAO,CAAA;CAAE,KAC3B,MAAM,IAAqB,CAAA;AAChC,eAAO,MAAM,IAAI,YAAW,CAAA;AAC5B,eAAO,MAAM,MAAM,YAAW,CAAA"} \ No newline at end of file diff --git a/node_modules/foreground-child/node_modules/signal-exit/dist/mjs/browser.js b/node_modules/foreground-child/node_modules/signal-exit/dist/mjs/browser.js deleted file mode 100644 index 9c5f9b9e..00000000 --- a/node_modules/foreground-child/node_modules/signal-exit/dist/mjs/browser.js +++ /dev/null @@ -1,4 +0,0 @@ -export const onExit = () => () => { }; -export const load = () => { }; -export const unload = () => { }; -//# sourceMappingURL=browser.js.map \ No newline at end of file diff --git a/node_modules/foreground-child/node_modules/signal-exit/dist/mjs/browser.js.map b/node_modules/foreground-child/node_modules/signal-exit/dist/mjs/browser.js.map deleted file mode 100644 index b3ff303a..00000000 --- a/node_modules/foreground-child/node_modules/signal-exit/dist/mjs/browser.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"browser.js","sourceRoot":"","sources":["../../src/browser.ts"],"names":[],"mappings":"AAMA,MAAM,CAAC,MAAM,MAAM,GAGD,GAAG,EAAE,CAAC,GAAG,EAAE,GAAE,CAAC,CAAA;AAChC,MAAM,CAAC,MAAM,IAAI,GAAG,GAAG,EAAE,GAAE,CAAC,CAAA;AAC5B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,EAAE,GAAE,CAAC,CAAA","sourcesContent":["/**\n * This is a browser shim that provides the same functional interface\n * as the main node export, but it does nothing.\n * @module\n */\nimport type { Handler } from './index.js'\nexport const onExit: (\n cb: Handler,\n opts: { alwaysLast?: boolean }\n) => () => void = () => () => {}\nexport const load = () => {}\nexport const unload = () => {}\n"]} \ No newline at end of file diff --git a/node_modules/foreground-child/node_modules/signal-exit/dist/mjs/index.d.ts b/node_modules/foreground-child/node_modules/signal-exit/dist/mjs/index.d.ts deleted file mode 100644 index cabe9cfc..00000000 --- a/node_modules/foreground-child/node_modules/signal-exit/dist/mjs/index.d.ts +++ /dev/null @@ -1,48 +0,0 @@ -/// -import { signals } from './signals.js'; -export { signals }; -/** - * A function that takes an exit code and signal as arguments - * - * In the case of signal exits *only*, a return value of true - * will indicate that the signal is being handled, and we should - * not synthetically exit with the signal we received. Regardless - * of the handler return value, the handler is unloaded when an - * otherwise fatal signal is received, so you get exactly 1 shot - * at it, unless you add another onExit handler at that point. - * - * In the case of numeric code exits, we may already have committed - * to exiting the process, for example via a fatal exception or - * unhandled promise rejection, so it is impossible to stop safely. - */ -export type Handler = (code: number | null | undefined, signal: NodeJS.Signals | null) => true | void; -export declare const -/** - * Called when the process is exiting, whether via signal, explicit - * exit, or running out of stuff to do. - * - * If the global process object is not suitable for instrumentation, - * then this will be a no-op. - * - * Returns a function that may be used to unload signal-exit. - */ -onExit: (cb: Handler, opts?: { - alwaysLast?: boolean | undefined; -} | undefined) => () => void, -/** - * Load the listeners. Likely you never need to call this, unless - * doing a rather deep integration with signal-exit functionality. - * Mostly exposed for the benefit of testing. - * - * @internal - */ -load: () => void, -/** - * Unload the listeners. Likely you never need to call this, unless - * doing a rather deep integration with signal-exit functionality. - * Mostly exposed for the benefit of testing. - * - * @internal - */ -unload: () => void; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/foreground-child/node_modules/signal-exit/dist/mjs/index.d.ts.map b/node_modules/foreground-child/node_modules/signal-exit/dist/mjs/index.d.ts.map deleted file mode 100644 index f84594e2..00000000 --- a/node_modules/foreground-child/node_modules/signal-exit/dist/mjs/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACtC,OAAO,EAAE,OAAO,EAAE,CAAA;AAuBlB;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,OAAO,GAAG,CACpB,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAC/B,MAAM,EAAE,MAAM,CAAC,OAAO,GAAG,IAAI,KAC1B,IAAI,GAAG,IAAI,CAAA;AA8QhB,eAAO;AACL;;;;;;;;GAQG;AACH,MAAM,OAzMO,OAAO;;wBAPiD,IAAI;AAkNzE;;;;;;GAMG;AACH,IAAI;AAEJ;;;;;;GAMG;AACH,MAAM,YAGP,CAAA"} \ No newline at end of file diff --git a/node_modules/foreground-child/node_modules/signal-exit/dist/mjs/index.js b/node_modules/foreground-child/node_modules/signal-exit/dist/mjs/index.js deleted file mode 100644 index 4a78bad8..00000000 --- a/node_modules/foreground-child/node_modules/signal-exit/dist/mjs/index.js +++ /dev/null @@ -1,275 +0,0 @@ -// Note: since nyc uses this module to output coverage, any lines -// that are in the direct sync flow of nyc's outputCoverage are -// ignored, since we can never get coverage for them. -// grab a reference to node's real process object right away -import { signals } from './signals.js'; -export { signals }; -const processOk = (process) => !!process && - typeof process === 'object' && - typeof process.removeListener === 'function' && - typeof process.emit === 'function' && - typeof process.reallyExit === 'function' && - typeof process.listeners === 'function' && - typeof process.kill === 'function' && - typeof process.pid === 'number' && - typeof process.on === 'function'; -const kExitEmitter = Symbol.for('signal-exit emitter'); -const global = globalThis; -const ObjectDefineProperty = Object.defineProperty.bind(Object); -// teeny special purpose ee -class Emitter { - emitted = { - afterExit: false, - exit: false, - }; - listeners = { - afterExit: [], - exit: [], - }; - count = 0; - id = Math.random(); - constructor() { - if (global[kExitEmitter]) { - return global[kExitEmitter]; - } - ObjectDefineProperty(global, kExitEmitter, { - value: this, - writable: false, - enumerable: false, - configurable: false, - }); - } - on(ev, fn) { - this.listeners[ev].push(fn); - } - removeListener(ev, fn) { - const list = this.listeners[ev]; - const i = list.indexOf(fn); - /* c8 ignore start */ - if (i === -1) { - return; - } - /* c8 ignore stop */ - if (i === 0 && list.length === 1) { - list.length = 0; - } - else { - list.splice(i, 1); - } - } - emit(ev, code, signal) { - if (this.emitted[ev]) { - return false; - } - this.emitted[ev] = true; - let ret = false; - for (const fn of this.listeners[ev]) { - ret = fn(code, signal) === true || ret; - } - if (ev === 'exit') { - ret = this.emit('afterExit', code, signal) || ret; - } - return ret; - } -} -class SignalExitBase { -} -const signalExitWrap = (handler) => { - return { - onExit(cb, opts) { - return handler.onExit(cb, opts); - }, - load() { - return handler.load(); - }, - unload() { - return handler.unload(); - }, - }; -}; -class SignalExitFallback extends SignalExitBase { - onExit() { - return () => { }; - } - load() { } - unload() { } -} -class SignalExit extends SignalExitBase { - // "SIGHUP" throws an `ENOSYS` error on Windows, - // so use a supported signal instead - /* c8 ignore start */ - #hupSig = process.platform === 'win32' ? 'SIGINT' : 'SIGHUP'; - /* c8 ignore stop */ - #emitter = new Emitter(); - #process; - #originalProcessEmit; - #originalProcessReallyExit; - #sigListeners = {}; - #loaded = false; - constructor(process) { - super(); - this.#process = process; - // { : , ... } - this.#sigListeners = {}; - for (const sig of signals) { - this.#sigListeners[sig] = () => { - // If there are no other listeners, an exit is coming! - // Simplest way: remove us and then re-send the signal. - // We know that this will kill the process, so we can - // safely emit now. - const listeners = this.#process.listeners(sig); - let { count } = this.#emitter; - // This is a workaround for the fact that signal-exit v3 and signal - // exit v4 are not aware of each other, and each will attempt to let - // the other handle it, so neither of them do. To correct this, we - // detect if we're the only handler *except* for previous versions - // of signal-exit, and increment by the count of listeners it has - // created. - /* c8 ignore start */ - const p = process; - if (typeof p.__signal_exit_emitter__ === 'object' && - typeof p.__signal_exit_emitter__.count === 'number') { - count += p.__signal_exit_emitter__.count; - } - /* c8 ignore stop */ - if (listeners.length === count) { - this.unload(); - const ret = this.#emitter.emit('exit', null, sig); - /* c8 ignore start */ - const s = sig === 'SIGHUP' ? this.#hupSig : sig; - if (!ret) - process.kill(process.pid, s); - /* c8 ignore stop */ - } - }; - } - this.#originalProcessReallyExit = process.reallyExit; - this.#originalProcessEmit = process.emit; - } - onExit(cb, opts) { - /* c8 ignore start */ - if (!processOk(this.#process)) { - return () => { }; - } - /* c8 ignore stop */ - if (this.#loaded === false) { - this.load(); - } - const ev = opts?.alwaysLast ? 'afterExit' : 'exit'; - this.#emitter.on(ev, cb); - return () => { - this.#emitter.removeListener(ev, cb); - if (this.#emitter.listeners['exit'].length === 0 && - this.#emitter.listeners['afterExit'].length === 0) { - this.unload(); - } - }; - } - load() { - if (this.#loaded) { - return; - } - this.#loaded = true; - // This is the number of onSignalExit's that are in play. - // It's important so that we can count the correct number of - // listeners on signals, and don't wait for the other one to - // handle it instead of us. - this.#emitter.count += 1; - for (const sig of signals) { - try { - const fn = this.#sigListeners[sig]; - if (fn) - this.#process.on(sig, fn); - } - catch (_) { } - } - this.#process.emit = (ev, ...a) => { - return this.#processEmit(ev, ...a); - }; - this.#process.reallyExit = (code) => { - return this.#processReallyExit(code); - }; - } - unload() { - if (!this.#loaded) { - return; - } - this.#loaded = false; - signals.forEach(sig => { - const listener = this.#sigListeners[sig]; - /* c8 ignore start */ - if (!listener) { - throw new Error('Listener not defined for signal: ' + sig); - } - /* c8 ignore stop */ - try { - this.#process.removeListener(sig, listener); - /* c8 ignore start */ - } - catch (_) { } - /* c8 ignore stop */ - }); - this.#process.emit = this.#originalProcessEmit; - this.#process.reallyExit = this.#originalProcessReallyExit; - this.#emitter.count -= 1; - } - #processReallyExit(code) { - /* c8 ignore start */ - if (!processOk(this.#process)) { - return 0; - } - this.#process.exitCode = code || 0; - /* c8 ignore stop */ - this.#emitter.emit('exit', this.#process.exitCode, null); - return this.#originalProcessReallyExit.call(this.#process, this.#process.exitCode); - } - #processEmit(ev, ...args) { - const og = this.#originalProcessEmit; - if (ev === 'exit' && processOk(this.#process)) { - if (typeof args[0] === 'number') { - this.#process.exitCode = args[0]; - /* c8 ignore start */ - } - /* c8 ignore start */ - const ret = og.call(this.#process, ev, ...args); - /* c8 ignore start */ - this.#emitter.emit('exit', this.#process.exitCode, null); - /* c8 ignore stop */ - return ret; - } - else { - return og.call(this.#process, ev, ...args); - } - } -} -const process = globalThis.process; -// wrap so that we call the method on the actual handler, without -// exporting it directly. -export const { -/** - * Called when the process is exiting, whether via signal, explicit - * exit, or running out of stuff to do. - * - * If the global process object is not suitable for instrumentation, - * then this will be a no-op. - * - * Returns a function that may be used to unload signal-exit. - */ -onExit, -/** - * Load the listeners. Likely you never need to call this, unless - * doing a rather deep integration with signal-exit functionality. - * Mostly exposed for the benefit of testing. - * - * @internal - */ -load, -/** - * Unload the listeners. Likely you never need to call this, unless - * doing a rather deep integration with signal-exit functionality. - * Mostly exposed for the benefit of testing. - * - * @internal - */ -unload, } = signalExitWrap(processOk(process) ? new SignalExit(process) : new SignalExitFallback()); -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/foreground-child/node_modules/signal-exit/dist/mjs/index.js.map b/node_modules/foreground-child/node_modules/signal-exit/dist/mjs/index.js.map deleted file mode 100644 index 3a7b76d6..00000000 --- a/node_modules/foreground-child/node_modules/signal-exit/dist/mjs/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings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AAQ,EACb,IAAI,CAAC,QAAQ,CAAC,QAAQ,CACvB,CAAA;IACH,CAAC;IAED,YAAY,CAAC,EAAU,EAAE,GAAG,IAAW;QACrC,MAAM,EAAE,GAAG,IAAI,CAAC,oBAAoB,CAAA;QACpC,IAAI,EAAE,KAAK,MAAM,IAAI,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE;YAC7C,IAAI,OAAO,IAAI,CAAC,CAAC,CAAC,KAAK,QAAQ,EAAE;gBAC/B,IAAI,CAAC,QAAQ,CAAC,QAAQ,GAAG,IAAI,CAAC,CAAC,CAAC,CAAA;gBAChC,qBAAqB;aACtB;YACD,qBAAqB;YACrB,MAAM,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,EAAE,GAAG,IAAI,CAAC,CAAA;YAC/C,qBAAqB;YACrB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAA;YACxD,oBAAoB;YACpB,OAAO,GAAG,CAAA;SACX;aAAM;YACL,OAAO,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,EAAE,GAAG,IAAI,CAAC,CAAA;SAC3C;IACH,CAAC;CACF;AAED,MAAM,OAAO,GAAG,UAAU,CAAC,OAAO,CAAA;AAClC,iEAAiE;AACjE,yBAAyB;AACzB,MAAM,CAAC,MAAM;AACX;;;;;;;;GAQG;AACH,MAAM;AAEN;;;;;;GAMG;AACH,IAAI;AAEJ;;;;;;GAMG;AACH,MAAM,GACP,GAAG,cAAc,CAChB,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,kBAAkB,EAAE,CACxE,CAAA","sourcesContent":["// Note: since nyc uses this module to output coverage, any lines\n// that are in the direct sync flow of nyc's outputCoverage are\n// ignored, since we can never get coverage for them.\n// grab a reference to node's real process object right away\nimport { signals } from './signals.js'\nexport { signals }\n\n// just a loosened process type so we can do some evil things\ntype ProcessRE = NodeJS.Process & {\n reallyExit: (code?: number | undefined | null) => any\n emit: (ev: string, ...a: any[]) => any\n}\n\nconst processOk = (process: any): process is ProcessRE =>\n !!process &&\n typeof process === 'object' &&\n typeof process.removeListener === 'function' &&\n typeof process.emit === 'function' &&\n typeof process.reallyExit === 'function' &&\n typeof process.listeners === 'function' &&\n typeof process.kill === 'function' &&\n typeof process.pid === 'number' &&\n typeof process.on === 'function'\n\nconst kExitEmitter = Symbol.for('signal-exit emitter')\nconst global: typeof globalThis & { [kExitEmitter]?: Emitter } = globalThis\nconst ObjectDefineProperty = Object.defineProperty.bind(Object)\n\n/**\n * A function that takes an exit code and signal as arguments\n *\n * In the case of signal exits *only*, a return value of true\n * will indicate that the signal is being handled, and we should\n * not synthetically exit with the signal we received. Regardless\n * of the handler return value, the handler is unloaded when an\n * otherwise fatal signal is received, so you get exactly 1 shot\n * at it, unless you add another onExit handler at that point.\n *\n * In the case of numeric code exits, we may already have committed\n * to exiting the process, for example via a fatal exception or\n * unhandled promise rejection, so it is impossible to stop safely.\n */\nexport type Handler = (\n code: number | null | undefined,\n signal: NodeJS.Signals | null\n) => true | void\ntype ExitEvent = 'afterExit' | 'exit'\ntype Emitted = { [k in ExitEvent]: boolean }\ntype Listeners = { [k in ExitEvent]: Handler[] }\n\n// teeny special purpose ee\nclass Emitter {\n emitted: Emitted = {\n afterExit: false,\n exit: false,\n }\n\n listeners: Listeners = {\n afterExit: [],\n exit: [],\n }\n\n count: number = 0\n id: number = Math.random()\n\n constructor() {\n if (global[kExitEmitter]) {\n return global[kExitEmitter]\n }\n ObjectDefineProperty(global, kExitEmitter, {\n value: this,\n writable: false,\n enumerable: false,\n configurable: false,\n })\n }\n\n on(ev: ExitEvent, fn: Handler) {\n this.listeners[ev].push(fn)\n }\n\n removeListener(ev: ExitEvent, fn: Handler) {\n const list = this.listeners[ev]\n const i = list.indexOf(fn)\n /* c8 ignore start */\n if (i === -1) {\n return\n }\n /* c8 ignore stop */\n if (i === 0 && list.length === 1) {\n list.length = 0\n } else {\n list.splice(i, 1)\n }\n }\n\n emit(\n ev: ExitEvent,\n code: number | null | undefined,\n signal: NodeJS.Signals | null\n ): boolean {\n if (this.emitted[ev]) {\n return false\n }\n this.emitted[ev] = true\n let ret: boolean = false\n for (const fn of this.listeners[ev]) {\n ret = fn(code, signal) === true || ret\n }\n if (ev === 'exit') {\n ret = this.emit('afterExit', code, signal) || ret\n }\n return ret\n }\n}\n\nabstract class SignalExitBase {\n abstract onExit(cb: Handler, opts?: { alwaysLast?: boolean }): () => void\n abstract load(): void\n abstract unload(): void\n}\n\nconst signalExitWrap = (handler: T) => {\n return {\n onExit(cb: Handler, opts?: { alwaysLast?: boolean }) {\n return handler.onExit(cb, opts)\n },\n load() {\n return handler.load()\n },\n unload() {\n return handler.unload()\n },\n }\n}\n\nclass SignalExitFallback extends SignalExitBase {\n onExit() {\n return () => {}\n }\n load() {}\n unload() {}\n}\n\nclass SignalExit extends SignalExitBase {\n // \"SIGHUP\" throws an `ENOSYS` error on Windows,\n // so use a supported signal instead\n /* c8 ignore start */\n #hupSig = process.platform === 'win32' ? 'SIGINT' : 'SIGHUP'\n /* c8 ignore stop */\n #emitter = new Emitter()\n #process: ProcessRE\n #originalProcessEmit: ProcessRE['emit']\n #originalProcessReallyExit: ProcessRE['reallyExit']\n\n #sigListeners: { [k in NodeJS.Signals]?: () => void } = {}\n #loaded: boolean = false\n\n constructor(process: ProcessRE) {\n super()\n this.#process = process\n // { : , ... }\n this.#sigListeners = {}\n for (const sig of signals) {\n this.#sigListeners[sig] = () => {\n // If there are no other listeners, an exit is coming!\n // Simplest way: remove us and then re-send the signal.\n // We know that this will kill the process, so we can\n // safely emit now.\n const listeners = this.#process.listeners(sig)\n let { count } = this.#emitter\n // This is a workaround for the fact that signal-exit v3 and signal\n // exit v4 are not aware of each other, and each will attempt to let\n // the other handle it, so neither of them do. To correct this, we\n // detect if we're the only handler *except* for previous versions\n // of signal-exit, and increment by the count of listeners it has\n // created.\n /* c8 ignore start */\n const p = process as unknown as {\n __signal_exit_emitter__?: { count: number }\n }\n if (\n typeof p.__signal_exit_emitter__ === 'object' &&\n typeof p.__signal_exit_emitter__.count === 'number'\n ) {\n count += p.__signal_exit_emitter__.count\n }\n /* c8 ignore stop */\n if (listeners.length === count) {\n this.unload()\n const ret = this.#emitter.emit('exit', null, sig)\n /* c8 ignore start */\n const s = sig === 'SIGHUP' ? this.#hupSig : sig\n if (!ret) process.kill(process.pid, s)\n /* c8 ignore stop */\n }\n }\n }\n\n this.#originalProcessReallyExit = process.reallyExit\n this.#originalProcessEmit = process.emit\n }\n\n onExit(cb: Handler, opts?: { alwaysLast?: boolean }) {\n /* c8 ignore start */\n if (!processOk(this.#process)) {\n return () => {}\n }\n /* c8 ignore stop */\n\n if (this.#loaded === false) {\n this.load()\n }\n\n const ev = opts?.alwaysLast ? 'afterExit' : 'exit'\n this.#emitter.on(ev, cb)\n return () => {\n this.#emitter.removeListener(ev, cb)\n if (\n this.#emitter.listeners['exit'].length === 0 &&\n this.#emitter.listeners['afterExit'].length === 0\n ) {\n this.unload()\n }\n }\n }\n\n load() {\n if (this.#loaded) {\n return\n }\n this.#loaded = true\n\n // This is the number of onSignalExit's that are in play.\n // It's important so that we can count the correct number of\n // listeners on signals, and don't wait for the other one to\n // handle it instead of us.\n this.#emitter.count += 1\n\n for (const sig of signals) {\n try {\n const fn = this.#sigListeners[sig]\n if (fn) this.#process.on(sig, fn)\n } catch (_) {}\n }\n\n this.#process.emit = (ev: string, ...a: any[]) => {\n return this.#processEmit(ev, ...a)\n }\n this.#process.reallyExit = (code?: number | null | undefined) => {\n return this.#processReallyExit(code)\n }\n }\n\n unload() {\n if (!this.#loaded) {\n return\n }\n this.#loaded = false\n\n signals.forEach(sig => {\n const listener = this.#sigListeners[sig]\n /* c8 ignore start */\n if (!listener) {\n throw new Error('Listener not defined for signal: ' + sig)\n }\n /* c8 ignore stop */\n try {\n this.#process.removeListener(sig, listener)\n /* c8 ignore start */\n } catch (_) {}\n /* c8 ignore stop */\n })\n this.#process.emit = this.#originalProcessEmit\n this.#process.reallyExit = this.#originalProcessReallyExit\n this.#emitter.count -= 1\n }\n\n #processReallyExit(code?: number | null | undefined) {\n /* c8 ignore start */\n if (!processOk(this.#process)) {\n return 0\n }\n this.#process.exitCode = code || 0\n /* c8 ignore stop */\n\n this.#emitter.emit('exit', this.#process.exitCode, null)\n return this.#originalProcessReallyExit.call(\n this.#process,\n this.#process.exitCode\n )\n }\n\n #processEmit(ev: string, ...args: any[]): any {\n const og = this.#originalProcessEmit\n if (ev === 'exit' && processOk(this.#process)) {\n if (typeof args[0] === 'number') {\n this.#process.exitCode = args[0]\n /* c8 ignore start */\n }\n /* c8 ignore start */\n const ret = og.call(this.#process, ev, ...args)\n /* c8 ignore start */\n this.#emitter.emit('exit', this.#process.exitCode, null)\n /* c8 ignore stop */\n return ret\n } else {\n return og.call(this.#process, ev, ...args)\n }\n }\n}\n\nconst process = globalThis.process\n// wrap so that we call the method on the actual handler, without\n// exporting it directly.\nexport const {\n /**\n * Called when the process is exiting, whether via signal, explicit\n * exit, or running out of stuff to do.\n *\n * If the global process object is not suitable for instrumentation,\n * then this will be a no-op.\n *\n * Returns a function that may be used to unload signal-exit.\n */\n onExit,\n\n /**\n * Load the listeners. Likely you never need to call this, unless\n * doing a rather deep integration with signal-exit functionality.\n * Mostly exposed for the benefit of testing.\n *\n * @internal\n */\n load,\n\n /**\n * Unload the listeners. Likely you never need to call this, unless\n * doing a rather deep integration with signal-exit functionality.\n * Mostly exposed for the benefit of testing.\n *\n * @internal\n */\n unload,\n} = signalExitWrap(\n processOk(process) ? new SignalExit(process) : new SignalExitFallback()\n)\n"]} \ No newline at end of file diff --git a/node_modules/foreground-child/node_modules/signal-exit/dist/mjs/package.json b/node_modules/foreground-child/node_modules/signal-exit/dist/mjs/package.json deleted file mode 100644 index 3dbc1ca5..00000000 --- a/node_modules/foreground-child/node_modules/signal-exit/dist/mjs/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "type": "module" -} diff --git a/node_modules/foreground-child/node_modules/signal-exit/dist/mjs/signals.d.ts b/node_modules/foreground-child/node_modules/signal-exit/dist/mjs/signals.d.ts deleted file mode 100644 index 3f01ef00..00000000 --- a/node_modules/foreground-child/node_modules/signal-exit/dist/mjs/signals.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -/// -/** - * This is not the set of all possible signals. - * - * It IS, however, the set of all signals that trigger - * an exit on either Linux or BSD systems. Linux is a - * superset of the signal names supported on BSD, and - * the unknown signals just fail to register, so we can - * catch that easily enough. - * - * Windows signals are a different set, since there are - * signals that terminate Windows processes, but don't - * terminate (or don't even exist) on Posix systems. - * - * Don't bother with SIGKILL. It's uncatchable, which - * means that we can't fire any callbacks anyway. - * - * If a user does happen to register a handler on a non- - * fatal signal like SIGWINCH or something, and then - * exit, it'll end up firing `process.emit('exit')`, so - * the handler will be fired anyway. - * - * SIGBUS, SIGFPE, SIGSEGV and SIGILL, when not raised - * artificially, inherently leave the process in a - * state from which it is not safe to try and enter JS - * listeners. - */ -export declare const signals: NodeJS.Signals[]; -//# sourceMappingURL=signals.d.ts.map \ No newline at end of file diff --git a/node_modules/foreground-child/node_modules/signal-exit/dist/mjs/signals.d.ts.map b/node_modules/foreground-child/node_modules/signal-exit/dist/mjs/signals.d.ts.map deleted file mode 100644 index 891fe1e6..00000000 --- a/node_modules/foreground-child/node_modules/signal-exit/dist/mjs/signals.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"signals.d.ts","sourceRoot":"","sources":["../../src/signals.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,OAAO,EAAE,MAAM,CAAC,OAAO,EAAO,CAAA"} \ No newline at end of file diff --git a/node_modules/foreground-child/node_modules/signal-exit/dist/mjs/signals.js b/node_modules/foreground-child/node_modules/signal-exit/dist/mjs/signals.js deleted file mode 100644 index 7dbf15a5..00000000 --- a/node_modules/foreground-child/node_modules/signal-exit/dist/mjs/signals.js +++ /dev/null @@ -1,39 +0,0 @@ -/** - * This is not the set of all possible signals. - * - * It IS, however, the set of all signals that trigger - * an exit on either Linux or BSD systems. Linux is a - * superset of the signal names supported on BSD, and - * the unknown signals just fail to register, so we can - * catch that easily enough. - * - * Windows signals are a different set, since there are - * signals that terminate Windows processes, but don't - * terminate (or don't even exist) on Posix systems. - * - * Don't bother with SIGKILL. It's uncatchable, which - * means that we can't fire any callbacks anyway. - * - * If a user does happen to register a handler on a non- - * fatal signal like SIGWINCH or something, and then - * exit, it'll end up firing `process.emit('exit')`, so - * the handler will be fired anyway. - * - * SIGBUS, SIGFPE, SIGSEGV and SIGILL, when not raised - * artificially, inherently leave the process in a - * state from which it is not safe to try and enter JS - * listeners. - */ -export const signals = []; -signals.push('SIGHUP', 'SIGINT', 'SIGTERM'); -if (process.platform !== 'win32') { - signals.push('SIGALRM', 'SIGABRT', 'SIGVTALRM', 'SIGXCPU', 'SIGXFSZ', 'SIGUSR2', 'SIGTRAP', 'SIGSYS', 'SIGQUIT', 'SIGIOT' - // should detect profiler and enable/disable accordingly. - // see #21 - // 'SIGPROF' - ); -} -if (process.platform === 'linux') { - signals.push('SIGIO', 'SIGPOLL', 'SIGPWR', 'SIGSTKFLT'); -} -//# sourceMappingURL=signals.js.map \ No newline at end of file diff --git a/node_modules/foreground-child/node_modules/signal-exit/dist/mjs/signals.js.map b/node_modules/foreground-child/node_modules/signal-exit/dist/mjs/signals.js.map deleted file mode 100644 index 91008c91..00000000 --- a/node_modules/foreground-child/node_modules/signal-exit/dist/mjs/signals.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"signals.js","sourceRoot":"","sources":["../../src/signals.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,CAAC,MAAM,OAAO,GAAqB,EAAE,CAAA;AAC3C,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAA;AAE3C,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO,EAAE;IAChC,OAAO,CAAC,IAAI,CACV,SAAS,EACT,SAAS,EACT,WAAW,EACX,SAAS,EACT,SAAS,EACT,SAAS,EACT,SAAS,EACT,QAAQ,EACR,SAAS,EACT,QAAQ;IACR,yDAAyD;IACzD,UAAU;IACV,YAAY;KACb,CAAA;CACF;AAED,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO,EAAE;IAChC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAA;CACxD","sourcesContent":["/**\n * This is not the set of all possible signals.\n *\n * It IS, however, the set of all signals that trigger\n * an exit on either Linux or BSD systems. Linux is a\n * superset of the signal names supported on BSD, and\n * the unknown signals just fail to register, so we can\n * catch that easily enough.\n *\n * Windows signals are a different set, since there are\n * signals that terminate Windows processes, but don't\n * terminate (or don't even exist) on Posix systems.\n *\n * Don't bother with SIGKILL. It's uncatchable, which\n * means that we can't fire any callbacks anyway.\n *\n * If a user does happen to register a handler on a non-\n * fatal signal like SIGWINCH or something, and then\n * exit, it'll end up firing `process.emit('exit')`, so\n * the handler will be fired anyway.\n *\n * SIGBUS, SIGFPE, SIGSEGV and SIGILL, when not raised\n * artificially, inherently leave the process in a\n * state from which it is not safe to try and enter JS\n * listeners.\n */\nexport const signals: NodeJS.Signals[] = []\nsignals.push('SIGHUP', 'SIGINT', 'SIGTERM')\n\nif (process.platform !== 'win32') {\n signals.push(\n 'SIGALRM',\n 'SIGABRT',\n 'SIGVTALRM',\n 'SIGXCPU',\n 'SIGXFSZ',\n 'SIGUSR2',\n 'SIGTRAP',\n 'SIGSYS',\n 'SIGQUIT',\n 'SIGIOT'\n // should detect profiler and enable/disable accordingly.\n // see #21\n // 'SIGPROF'\n )\n}\n\nif (process.platform === 'linux') {\n signals.push('SIGIO', 'SIGPOLL', 'SIGPWR', 'SIGSTKFLT')\n}\n"]} \ No newline at end of file diff --git a/node_modules/foreground-child/node_modules/signal-exit/package.json b/node_modules/foreground-child/node_modules/signal-exit/package.json deleted file mode 100644 index ac176cec..00000000 --- a/node_modules/foreground-child/node_modules/signal-exit/package.json +++ /dev/null @@ -1,106 +0,0 @@ -{ - "name": "signal-exit", - "version": "4.1.0", - "description": "when you want to fire an event no matter how a process exits.", - "main": "./dist/cjs/index.js", - "module": "./dist/mjs/index.js", - "browser": "./dist/mjs/browser.js", - "types": "./dist/mjs/index.d.ts", - "exports": { - ".": { - "import": { - "types": "./dist/mjs/index.d.ts", - "default": "./dist/mjs/index.js" - }, - "require": { - "types": "./dist/cjs/index.d.ts", - "default": "./dist/cjs/index.js" - } - }, - "./signals": { - "import": { - "types": "./dist/mjs/signals.d.ts", - "default": "./dist/mjs/signals.js" - }, - "require": { - "types": "./dist/cjs/signals.d.ts", - "default": "./dist/cjs/signals.js" - } - }, - "./browser": { - "import": { - "types": "./dist/mjs/browser.d.ts", - "default": "./dist/mjs/browser.js" - }, - "require": { - "types": "./dist/cjs/browser.d.ts", - "default": "./dist/cjs/browser.js" - } - } - }, - "files": [ - "dist" - ], - "engines": { - "node": ">=14" - }, - "repository": { - "type": "git", - "url": "https://github.com/tapjs/signal-exit.git" - }, - "keywords": [ - "signal", - "exit" - ], - "author": "Ben Coe ", - "license": "ISC", - "devDependencies": { - "@types/cross-spawn": "^6.0.2", - "@types/node": "^18.15.11", - "@types/signal-exit": "^3.0.1", - "@types/tap": "^15.0.8", - "c8": "^7.13.0", - "prettier": "^2.8.6", - "tap": "^16.3.4", - "ts-node": "^10.9.1", - "typedoc": "^0.23.28", - "typescript": "^5.0.2" - }, - "scripts": { - "preversion": "npm test", - "postversion": "npm publish", - "prepublishOnly": "git push origin --follow-tags", - "preprepare": "rm -rf dist", - "prepare": "tsc -p tsconfig.json && tsc -p tsconfig-esm.json && bash ./scripts/fixup.sh", - "pretest": "npm run prepare", - "presnap": "npm run prepare", - "test": "c8 tap", - "snap": "c8 tap", - "format": "prettier --write . --loglevel warn", - "typedoc": "typedoc --tsconfig tsconfig-esm.json ./src/*.ts" - }, - "prettier": { - "semi": false, - "printWidth": 75, - "tabWidth": 2, - "useTabs": false, - "singleQuote": true, - "jsxSingleQuote": false, - "bracketSameLine": true, - "arrowParens": "avoid", - "endOfLine": "lf" - }, - "tap": { - "coverage": false, - "jobs": 1, - "node-arg": [ - "--no-warnings", - "--loader", - "ts-node/esm" - ], - "ts": false - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } -} diff --git a/node_modules/foreground-child/package.json b/node_modules/foreground-child/package.json deleted file mode 100644 index 980b7e85..00000000 --- a/node_modules/foreground-child/package.json +++ /dev/null @@ -1,111 +0,0 @@ -{ - "name": "foreground-child", - "version": "3.3.0", - "description": "Run a child as if it's the foreground process. Give it stdio. Exit when it exits.", - "main": "./dist/commonjs/index.js", - "types": "./dist/commonjs/index.d.ts", - "exports": { - "./watchdog": { - "import": { - "source": "./src/watchdog.ts", - "types": "./dist/esm/watchdog.d.ts", - "default": "./dist/esm/watchdog.js" - }, - "require": { - "source": "./src/watchdog.ts", - "types": "./dist/commonjs/watchdog.d.ts", - "default": "./dist/commonjs/watchdog.js" - } - }, - "./proxy-signals": { - "import": { - "source": "./src/proxy-signals.ts", - "types": "./dist/esm/proxy-signals.d.ts", - "default": "./dist/esm/proxy-signals.js" - }, - "require": { - "source": "./src/proxy-signals.ts", - "types": "./dist/commonjs/proxy-signals.d.ts", - "default": "./dist/commonjs/proxy-signals.js" - } - }, - "./package.json": "./package.json", - ".": { - "import": { - "source": "./src/index.ts", - "types": "./dist/esm/index.d.ts", - "default": "./dist/esm/index.js" - }, - "require": { - "source": "./src/index.ts", - "types": "./dist/commonjs/index.d.ts", - "default": "./dist/commonjs/index.js" - } - } - }, - "files": [ - "dist" - ], - "engines": { - "node": ">=14" - }, - "dependencies": { - "cross-spawn": "^7.0.0", - "signal-exit": "^4.0.1" - }, - "scripts": { - "preversion": "npm test", - "postversion": "npm publish", - "prepublishOnly": "git push origin --follow-tags", - "prepare": "tshy", - "pretest": "npm run prepare", - "presnap": "npm run prepare", - "test": "tap", - "snap": "tap", - "format": "prettier --write . --log-level warn", - "typedoc": "typedoc --tsconfig .tshy/esm.json ./src/*.ts" - }, - "prettier": { - "experimentalTernaries": true, - "semi": false, - "printWidth": 75, - "tabWidth": 2, - "useTabs": false, - "singleQuote": true, - "jsxSingleQuote": false, - "bracketSameLine": true, - "arrowParens": "avoid", - "endOfLine": "lf" - }, - "tap": { - "typecheck": true - }, - "repository": { - "type": "git", - "url": "git+https://github.com/tapjs/foreground-child.git" - }, - "author": "Isaac Z. Schlueter (http://blog.izs.me/)", - "license": "ISC", - "devDependencies": { - "@types/cross-spawn": "^6.0.2", - "@types/node": "^18.15.11", - "@types/tap": "^15.0.8", - "prettier": "^3.3.2", - "tap": "^19.2.5", - "tshy": "^1.15.1", - "typedoc": "^0.24.2", - "typescript": "^5.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - }, - "tshy": { - "exports": { - "./watchdog": "./src/watchdog.ts", - "./proxy-signals": "./src/proxy-signals.ts", - "./package.json": "./package.json", - ".": "./src/index.ts" - } - }, - "type": "module" -} diff --git a/node_modules/he/LICENSE-MIT.txt b/node_modules/he/LICENSE-MIT.txt deleted file mode 100644 index a41e0a7e..00000000 --- a/node_modules/he/LICENSE-MIT.txt +++ /dev/null @@ -1,20 +0,0 @@ -Copyright Mathias Bynens - -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/he/README.md b/node_modules/he/README.md deleted file mode 100644 index b2223a91..00000000 --- a/node_modules/he/README.md +++ /dev/null @@ -1,379 +0,0 @@ -# he [![Build status](https://travis-ci.org/mathiasbynens/he.svg?branch=master)](https://travis-ci.org/mathiasbynens/he) [![Code coverage status](https://codecov.io/github/mathiasbynens/he/coverage.svg?branch=master)](https://codecov.io/github/mathiasbynens/he?branch=master) [![Dependency status](https://gemnasium.com/mathiasbynens/he.svg)](https://gemnasium.com/mathiasbynens/he) - -_he_ (for “HTML entities”) is a robust HTML entity encoder/decoder written in JavaScript. It supports [all standardized named character references as per HTML](https://html.spec.whatwg.org/multipage/syntax.html#named-character-references), handles [ambiguous ampersands](https://mathiasbynens.be/notes/ambiguous-ampersands) and other edge cases [just like a browser would](https://html.spec.whatwg.org/multipage/syntax.html#tokenizing-character-references), has an extensive test suite, and — contrary to many other JavaScript solutions — _he_ handles astral Unicode symbols just fine. [An online demo is available.](https://mothereff.in/html-entities) - -## Installation - -Via [npm](https://www.npmjs.com/): - -```bash -npm install he -``` - -Via [Bower](http://bower.io/): - -```bash -bower install he -``` - -Via [Component](https://github.com/component/component): - -```bash -component install mathiasbynens/he -``` - -In a browser: - -```html - -``` - -In [Node.js](https://nodejs.org/), [io.js](https://iojs.org/), [Narwhal](http://narwhaljs.org/), and [RingoJS](http://ringojs.org/): - -```js -var he = require('he'); -``` - -In [Rhino](http://www.mozilla.org/rhino/): - -```js -load('he.js'); -``` - -Using an AMD loader like [RequireJS](http://requirejs.org/): - -```js -require( - { - 'paths': { - 'he': 'path/to/he' - } - }, - ['he'], - function(he) { - console.log(he); - } -); -``` - -## API - -### `he.version` - -A string representing the semantic version number. - -### `he.encode(text, options)` - -This function takes a string of text and encodes (by default) any symbols that aren’t printable ASCII symbols and `&`, `<`, `>`, `"`, `'`, and `` ` ``, replacing them with character references. - -```js -he.encode('foo © bar ≠ baz 𝌆 qux'); -// → 'foo © bar ≠ baz 𝌆 qux' -``` - -As long as the input string contains [allowed code points](https://html.spec.whatwg.org/multipage/parsing.html#preprocessing-the-input-stream) only, the return value of this function is always valid HTML. Any [(invalid) code points that cannot be represented using a character reference](https://html.spec.whatwg.org/multipage/syntax.html#table-charref-overrides) in the input are not encoded: - -```js -he.encode('foo \0 bar'); -// → 'foo \0 bar' -``` - -However, enabling [the `strict` option](https://github.com/mathiasbynens/he#strict) causes invalid code points to throw an exception. With `strict` enabled, `he.encode` either throws (if the input contains invalid code points) or returns a string of valid HTML. - -The `options` object is optional. It recognizes the following properties: - -#### `useNamedReferences` - -The default value for the `useNamedReferences` option is `false`. This means that `encode()` will not use any named character references (e.g. `©`) in the output — hexadecimal escapes (e.g. `©`) will be used instead. Set it to `true` to enable the use of named references. - -**Note that if compatibility with older browsers is a concern, this option should remain disabled.** - -```js -// Using the global default setting (defaults to `false`): -he.encode('foo © bar ≠ baz 𝌆 qux'); -// → 'foo © bar ≠ baz 𝌆 qux' - -// Passing an `options` object to `encode`, to explicitly disallow named references: -he.encode('foo © bar ≠ baz 𝌆 qux', { - 'useNamedReferences': false -}); -// → 'foo © bar ≠ baz 𝌆 qux' - -// Passing an `options` object to `encode`, to explicitly allow named references: -he.encode('foo © bar ≠ baz 𝌆 qux', { - 'useNamedReferences': true -}); -// → 'foo © bar ≠ baz 𝌆 qux' -``` - -#### `decimal` - -The default value for the `decimal` option is `false`. If the option is enabled, `encode` will generally use decimal escapes (e.g. `©`) rather than hexadecimal escapes (e.g. `©`). Beside of this replacement, the basic behavior remains the same when combined with other options. For example: if both options `useNamedReferences` and `decimal` are enabled, named references (e.g. `©`) are used over decimal escapes. HTML entities without a named reference are encoded using decimal escapes. - -```js -// Using the global default setting (defaults to `false`): -he.encode('foo © bar ≠ baz 𝌆 qux'); -// → 'foo © bar ≠ baz 𝌆 qux' - -// Passing an `options` object to `encode`, to explicitly disable decimal escapes: -he.encode('foo © bar ≠ baz 𝌆 qux', { - 'decimal': false -}); -// → 'foo © bar ≠ baz 𝌆 qux' - -// Passing an `options` object to `encode`, to explicitly enable decimal escapes: -he.encode('foo © bar ≠ baz 𝌆 qux', { - 'decimal': true -}); -// → 'foo © bar ≠ baz 𝌆 qux' - -// Passing an `options` object to `encode`, to explicitly allow named references and decimal escapes: -he.encode('foo © bar ≠ baz 𝌆 qux', { - 'useNamedReferences': true, - 'decimal': true -}); -// → 'foo © bar ≠ baz 𝌆 qux' -``` - -#### `encodeEverything` - -The default value for the `encodeEverything` option is `false`. This means that `encode()` will not use any character references for printable ASCII symbols that don’t need escaping. Set it to `true` to encode every symbol in the input string. When set to `true`, this option takes precedence over `allowUnsafeSymbols` (i.e. setting the latter to `true` in such a case has no effect). - -```js -// Using the global default setting (defaults to `false`): -he.encode('foo © bar ≠ baz 𝌆 qux'); -// → 'foo © bar ≠ baz 𝌆 qux' - -// Passing an `options` object to `encode`, to explicitly encode all symbols: -he.encode('foo © bar ≠ baz 𝌆 qux', { - 'encodeEverything': true -}); -// → 'foo © bar ≠ baz 𝌆 qux' - -// This setting can be combined with the `useNamedReferences` option: -he.encode('foo © bar ≠ baz 𝌆 qux', { - 'encodeEverything': true, - 'useNamedReferences': true -}); -// → 'foo © bar ≠ baz 𝌆 qux' -``` - -#### `strict` - -The default value for the `strict` option is `false`. This means that `encode()` will encode any HTML text content you feed it, even if it contains any symbols that cause [parse errors](https://html.spec.whatwg.org/multipage/parsing.html#preprocessing-the-input-stream). To throw an error when such invalid HTML is encountered, set the `strict` option to `true`. This option makes it possible to use _he_ as part of HTML parsers and HTML validators. - -```js -// Using the global default setting (defaults to `false`, i.e. error-tolerant mode): -he.encode('\x01'); -// → '' - -// Passing an `options` object to `encode`, to explicitly enable error-tolerant mode: -he.encode('\x01', { - 'strict': false -}); -// → '' - -// Passing an `options` object to `encode`, to explicitly enable strict mode: -he.encode('\x01', { - 'strict': true -}); -// → Parse error -``` - -#### `allowUnsafeSymbols` - -The default value for the `allowUnsafeSymbols` option is `false`. This means that characters that are unsafe for use in HTML content (`&`, `<`, `>`, `"`, `'`, and `` ` ``) will be encoded. When set to `true`, only non-ASCII characters will be encoded. If the `encodeEverything` option is set to `true`, this option will be ignored. - -```js -he.encode('foo © and & ampersand', { - 'allowUnsafeSymbols': true -}); -// → 'foo © and & ampersand' -``` - -#### Overriding default `encode` options globally - -The global default setting can be overridden by modifying the `he.encode.options` object. This saves you from passing in an `options` object for every call to `encode` if you want to use the non-default setting. - -```js -// Read the global default setting: -he.encode.options.useNamedReferences; -// → `false` by default - -// Override the global default setting: -he.encode.options.useNamedReferences = true; - -// Using the global default setting, which is now `true`: -he.encode('foo © bar ≠ baz 𝌆 qux'); -// → 'foo © bar ≠ baz 𝌆 qux' -``` - -### `he.decode(html, options)` - -This function takes a string of HTML and decodes any named and numerical character references in it using [the algorithm described in section 12.2.4.69 of the HTML spec](https://html.spec.whatwg.org/multipage/syntax.html#tokenizing-character-references). - -```js -he.decode('foo © bar ≠ baz 𝌆 qux'); -// → 'foo © bar ≠ baz 𝌆 qux' -``` - -The `options` object is optional. It recognizes the following properties: - -#### `isAttributeValue` - -The default value for the `isAttributeValue` option is `false`. This means that `decode()` will decode the string as if it were used in [a text context in an HTML document](https://html.spec.whatwg.org/multipage/syntax.html#data-state). HTML has different rules for [parsing character references in attribute values](https://html.spec.whatwg.org/multipage/syntax.html#character-reference-in-attribute-value-state) — set this option to `true` to treat the input string as if it were used as an attribute value. - -```js -// Using the global default setting (defaults to `false`, i.e. HTML text context): -he.decode('foo&bar'); -// → 'foo&bar' - -// Passing an `options` object to `decode`, to explicitly assume an HTML text context: -he.decode('foo&bar', { - 'isAttributeValue': false -}); -// → 'foo&bar' - -// Passing an `options` object to `decode`, to explicitly assume an HTML attribute value context: -he.decode('foo&bar', { - 'isAttributeValue': true -}); -// → 'foo&bar' -``` - -#### `strict` - -The default value for the `strict` option is `false`. This means that `decode()` will decode any HTML text content you feed it, even if it contains any entities that cause [parse errors](https://html.spec.whatwg.org/multipage/syntax.html#tokenizing-character-references). To throw an error when such invalid HTML is encountered, set the `strict` option to `true`. This option makes it possible to use _he_ as part of HTML parsers and HTML validators. - -```js -// Using the global default setting (defaults to `false`, i.e. error-tolerant mode): -he.decode('foo&bar'); -// → 'foo&bar' - -// Passing an `options` object to `decode`, to explicitly enable error-tolerant mode: -he.decode('foo&bar', { - 'strict': false -}); -// → 'foo&bar' - -// Passing an `options` object to `decode`, to explicitly enable strict mode: -he.decode('foo&bar', { - 'strict': true -}); -// → Parse error -``` - -#### Overriding default `decode` options globally - -The global default settings for the `decode` function can be overridden by modifying the `he.decode.options` object. This saves you from passing in an `options` object for every call to `decode` if you want to use a non-default setting. - -```js -// Read the global default setting: -he.decode.options.isAttributeValue; -// → `false` by default - -// Override the global default setting: -he.decode.options.isAttributeValue = true; - -// Using the global default setting, which is now `true`: -he.decode('foo&bar'); -// → 'foo&bar' -``` - -### `he.escape(text)` - -This function takes a string of text and escapes it for use in text contexts in XML or HTML documents. Only the following characters are escaped: `&`, `<`, `>`, `"`, `'`, and `` ` ``. - -```js -he.escape(''); -// → '<img src='x' onerror="prompt(1)">' -``` - -### `he.unescape(html, options)` - -`he.unescape` is an alias for `he.decode`. It takes a string of HTML and decodes any named and numerical character references in it. - -### Using the `he` binary - -To use the `he` binary in your shell, simply install _he_ globally using npm: - -```bash -npm install -g he -``` - -After that you will be able to encode/decode HTML entities from the command line: - -```bash -$ he --encode 'föo ♥ bår 𝌆 baz' -föo ♥ bår 𝌆 baz - -$ he --encode --use-named-refs 'föo ♥ bår 𝌆 baz' -föo ♥ bår 𝌆 baz - -$ he --decode 'föo ♥ bår 𝌆 baz' -föo ♥ bår 𝌆 baz -``` - -Read a local text file, encode it for use in an HTML text context, and save the result to a new file: - -```bash -$ he --encode < foo.txt > foo-escaped.html -``` - -Or do the same with an online text file: - -```bash -$ curl -sL "http://git.io/HnfEaw" | he --encode > escaped.html -``` - -Or, the opposite — read a local file containing a snippet of HTML in a text context, decode it back to plain text, and save the result to a new file: - -```bash -$ he --decode < foo-escaped.html > foo.txt -``` - -Or do the same with an online HTML snippet: - -```bash -$ curl -sL "http://git.io/HnfEaw" | he --decode > decoded.txt -``` - -See `he --help` for the full list of options. - -## Support - -_he_ has been tested in at least: - -* Chrome 27-50 -* Firefox 3-45 -* Safari 4-9 -* Opera 10-12, 15–37 -* IE 6–11 -* Edge -* Narwhal 0.3.2 -* Node.js v0.10, v0.12, v4, v5 -* PhantomJS 1.9.0 -* Rhino 1.7RC4 -* RingoJS 0.8-0.11 - -## Unit tests & code coverage - -After cloning this repository, run `npm install` to install the dependencies needed for he development and testing. You may want to install Istanbul _globally_ using `npm install istanbul -g`. - -Once that’s done, you can run the unit tests in Node using `npm test` or `node tests/tests.js`. To run the tests in Rhino, Ringo, Narwhal, and web browsers as well, use `grunt test`. - -To generate the code coverage report, use `grunt cover`. - -## Acknowledgements - -Thanks to [Simon Pieters](https://simon.html5.org/) ([@zcorpan](https://twitter.com/zcorpan)) for the many suggestions. - -## Author - -| [![twitter/mathias](https://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | -|---| -| [Mathias Bynens](https://mathiasbynens.be/) | - -## License - -_he_ is available under the [MIT](https://mths.be/mit) license. diff --git a/node_modules/he/bin/he b/node_modules/he/bin/he deleted file mode 100755 index cfdfd6c3..00000000 --- a/node_modules/he/bin/he +++ /dev/null @@ -1,148 +0,0 @@ -#!/usr/bin/env node -(function() { - - var fs = require('fs'); - var he = require('../he.js'); - var strings = process.argv.splice(2); - var stdin = process.stdin; - var data; - var timeout; - var action; - var options = {}; - var log = console.log; - - var main = function() { - var option = strings[0]; - var count = 0; - - if (/^(?:-h|--help|undefined)$/.test(option)) { - log( - 'he v%s - https://mths.be/he', - he.version - ); - log([ - '\nUsage:\n', - '\the [--escape] string', - '\the [--encode] [--use-named-refs] [--everything] [--allow-unsafe] [--decimal] string', - '\the [--decode] [--attribute] [--strict] string', - '\the [-v | --version]', - '\the [-h | --help]', - '\nExamples:\n', - '\the --escape \\', - '\techo \'© 𝌆\' | he --decode' - ].join('\n')); - return process.exit(option ? 0 : 1); - } - - if (/^(?:-v|--version)$/.test(option)) { - log('v%s', he.version); - return process.exit(0); - } - - strings.forEach(function(string) { - // Process options - if (string == '--escape') { - action = 'escape'; - return; - } - if (string == '--encode') { - action = 'encode'; - return; - } - if (string == '--use-named-refs') { - action = 'encode'; - options.useNamedReferences = true; - return; - } - if (string == '--everything') { - action = 'encode'; - options.encodeEverything = true; - return; - } - if (string == '--allow-unsafe') { - action = 'encode'; - options.allowUnsafeSymbols = true; - return; - } - if (string == '--decimal') { - action = 'encode'; - options.decimal = true; - return; - } - if (string == '--decode') { - action = 'decode'; - return; - } - if (string == '--attribute') { - action = 'decode'; - options.isAttributeValue = true; - return; - } - if (string == '--strict') { - action = 'decode'; - options.strict = true; - return; - } - // Process string(s) - var result; - if (!action) { - log('Error: he requires at least one option and a string argument.'); - log('Try `he --help` for more information.'); - return process.exit(1); - } - try { - result = he[action](string, options); - log(result); - count++; - } catch(error) { - log(error.message + '\n'); - log('Error: failed to %s.', action); - log('If you think this is a bug in he, please report it:'); - log('https://github.com/mathiasbynens/he/issues/new'); - log( - '\nStack trace using he@%s:\n', - he.version - ); - log(error.stack); - return process.exit(1); - } - }); - if (!count) { - log('Error: he requires a string argument.'); - log('Try `he --help` for more information.'); - return process.exit(1); - } - // Return with exit status 0 outside of the `forEach` loop, in case - // multiple strings were passed in. - return process.exit(0); - }; - - if (stdin.isTTY) { - // handle shell arguments - main(); - } else { - // Either the script is called from within a non-TTY context, or `stdin` - // content is being piped in. - if (!process.stdout.isTTY) { - // The script was called from a non-TTY context. This is a rather uncommon - // use case we don’t actively support. However, we don’t want the script - // to wait forever in such cases, so… - timeout = setTimeout(function() { - // …if no piped data arrived after a whole minute, handle shell - // arguments instead. - main(); - }, 60000); - } - data = ''; - stdin.on('data', function(chunk) { - clearTimeout(timeout); - data += chunk; - }); - stdin.on('end', function() { - strings.push(data.trim()); - main(); - }); - stdin.resume(); - } - -}()); diff --git a/node_modules/he/he.js b/node_modules/he/he.js deleted file mode 100644 index 14a58e9d..00000000 --- a/node_modules/he/he.js +++ /dev/null @@ -1,345 +0,0 @@ -/*! https://mths.be/he v1.2.0 by @mathias | MIT license */ -;(function(root) { - - // Detect free variables `exports`. - var freeExports = typeof exports == 'object' && exports; - - // Detect free variable `module`. - var freeModule = typeof module == 'object' && module && - module.exports == freeExports && module; - - // Detect free variable `global`, from Node.js or Browserified code, - // and use it as `root`. - var freeGlobal = typeof global == 'object' && global; - if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) { - root = freeGlobal; - } - - /*--------------------------------------------------------------------------*/ - - // All astral symbols. - var regexAstralSymbols = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g; - // All ASCII symbols (not just printable ASCII) except those listed in the - // first column of the overrides table. - // https://html.spec.whatwg.org/multipage/syntax.html#table-charref-overrides - var regexAsciiWhitelist = /[\x01-\x7F]/g; - // All BMP symbols that are not ASCII newlines, printable ASCII symbols, or - // code points listed in the first column of the overrides table on - // https://html.spec.whatwg.org/multipage/syntax.html#table-charref-overrides. - var regexBmpWhitelist = /[\x01-\t\x0B\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g; - - var regexEncodeNonAscii = /<\u20D2|=\u20E5|>\u20D2|\u205F\u200A|\u219D\u0338|\u2202\u0338|\u2220\u20D2|\u2229\uFE00|\u222A\uFE00|\u223C\u20D2|\u223D\u0331|\u223E\u0333|\u2242\u0338|\u224B\u0338|\u224D\u20D2|\u224E\u0338|\u224F\u0338|\u2250\u0338|\u2261\u20E5|\u2264\u20D2|\u2265\u20D2|\u2266\u0338|\u2267\u0338|\u2268\uFE00|\u2269\uFE00|\u226A\u0338|\u226A\u20D2|\u226B\u0338|\u226B\u20D2|\u227F\u0338|\u2282\u20D2|\u2283\u20D2|\u228A\uFE00|\u228B\uFE00|\u228F\u0338|\u2290\u0338|\u2293\uFE00|\u2294\uFE00|\u22B4\u20D2|\u22B5\u20D2|\u22D8\u0338|\u22D9\u0338|\u22DA\uFE00|\u22DB\uFE00|\u22F5\u0338|\u22F9\u0338|\u2933\u0338|\u29CF\u0338|\u29D0\u0338|\u2A6D\u0338|\u2A70\u0338|\u2A7D\u0338|\u2A7E\u0338|\u2AA1\u0338|\u2AA2\u0338|\u2AAC\uFE00|\u2AAD\uFE00|\u2AAF\u0338|\u2AB0\u0338|\u2AC5\u0338|\u2AC6\u0338|\u2ACB\uFE00|\u2ACC\uFE00|\u2AFD\u20E5|[\xA0-\u0113\u0116-\u0122\u0124-\u012B\u012E-\u014D\u0150-\u017E\u0192\u01B5\u01F5\u0237\u02C6\u02C7\u02D8-\u02DD\u0311\u0391-\u03A1\u03A3-\u03A9\u03B1-\u03C9\u03D1\u03D2\u03D5\u03D6\u03DC\u03DD\u03F0\u03F1\u03F5\u03F6\u0401-\u040C\u040E-\u044F\u0451-\u045C\u045E\u045F\u2002-\u2005\u2007-\u2010\u2013-\u2016\u2018-\u201A\u201C-\u201E\u2020-\u2022\u2025\u2026\u2030-\u2035\u2039\u203A\u203E\u2041\u2043\u2044\u204F\u2057\u205F-\u2063\u20AC\u20DB\u20DC\u2102\u2105\u210A-\u2113\u2115-\u211E\u2122\u2124\u2127-\u2129\u212C\u212D\u212F-\u2131\u2133-\u2138\u2145-\u2148\u2153-\u215E\u2190-\u219B\u219D-\u21A7\u21A9-\u21AE\u21B0-\u21B3\u21B5-\u21B7\u21BA-\u21DB\u21DD\u21E4\u21E5\u21F5\u21FD-\u2205\u2207-\u2209\u220B\u220C\u220F-\u2214\u2216-\u2218\u221A\u221D-\u2238\u223A-\u2257\u2259\u225A\u225C\u225F-\u2262\u2264-\u228B\u228D-\u229B\u229D-\u22A5\u22A7-\u22B0\u22B2-\u22BB\u22BD-\u22DB\u22DE-\u22E3\u22E6-\u22F7\u22F9-\u22FE\u2305\u2306\u2308-\u2310\u2312\u2313\u2315\u2316\u231C-\u231F\u2322\u2323\u232D\u232E\u2336\u233D\u233F\u237C\u23B0\u23B1\u23B4-\u23B6\u23DC-\u23DF\u23E2\u23E7\u2423\u24C8\u2500\u2502\u250C\u2510\u2514\u2518\u251C\u2524\u252C\u2534\u253C\u2550-\u256C\u2580\u2584\u2588\u2591-\u2593\u25A1\u25AA\u25AB\u25AD\u25AE\u25B1\u25B3-\u25B5\u25B8\u25B9\u25BD-\u25BF\u25C2\u25C3\u25CA\u25CB\u25EC\u25EF\u25F8-\u25FC\u2605\u2606\u260E\u2640\u2642\u2660\u2663\u2665\u2666\u266A\u266D-\u266F\u2713\u2717\u2720\u2736\u2758\u2772\u2773\u27C8\u27C9\u27E6-\u27ED\u27F5-\u27FA\u27FC\u27FF\u2902-\u2905\u290C-\u2913\u2916\u2919-\u2920\u2923-\u292A\u2933\u2935-\u2939\u293C\u293D\u2945\u2948-\u294B\u294E-\u2976\u2978\u2979\u297B-\u297F\u2985\u2986\u298B-\u2996\u299A\u299C\u299D\u29A4-\u29B7\u29B9\u29BB\u29BC\u29BE-\u29C5\u29C9\u29CD-\u29D0\u29DC-\u29DE\u29E3-\u29E5\u29EB\u29F4\u29F6\u2A00-\u2A02\u2A04\u2A06\u2A0C\u2A0D\u2A10-\u2A17\u2A22-\u2A27\u2A29\u2A2A\u2A2D-\u2A31\u2A33-\u2A3C\u2A3F\u2A40\u2A42-\u2A4D\u2A50\u2A53-\u2A58\u2A5A-\u2A5D\u2A5F\u2A66\u2A6A\u2A6D-\u2A75\u2A77-\u2A9A\u2A9D-\u2AA2\u2AA4-\u2AB0\u2AB3-\u2AC8\u2ACB\u2ACC\u2ACF-\u2ADB\u2AE4\u2AE6-\u2AE9\u2AEB-\u2AF3\u2AFD\uFB00-\uFB04]|\uD835[\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDCCF\uDD04\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDD6B]/g; - var encodeMap = {'\xAD':'shy','\u200C':'zwnj','\u200D':'zwj','\u200E':'lrm','\u2063':'ic','\u2062':'it','\u2061':'af','\u200F':'rlm','\u200B':'ZeroWidthSpace','\u2060':'NoBreak','\u0311':'DownBreve','\u20DB':'tdot','\u20DC':'DotDot','\t':'Tab','\n':'NewLine','\u2008':'puncsp','\u205F':'MediumSpace','\u2009':'thinsp','\u200A':'hairsp','\u2004':'emsp13','\u2002':'ensp','\u2005':'emsp14','\u2003':'emsp','\u2007':'numsp','\xA0':'nbsp','\u205F\u200A':'ThickSpace','\u203E':'oline','_':'lowbar','\u2010':'dash','\u2013':'ndash','\u2014':'mdash','\u2015':'horbar',',':'comma',';':'semi','\u204F':'bsemi',':':'colon','\u2A74':'Colone','!':'excl','\xA1':'iexcl','?':'quest','\xBF':'iquest','.':'period','\u2025':'nldr','\u2026':'mldr','\xB7':'middot','\'':'apos','\u2018':'lsquo','\u2019':'rsquo','\u201A':'sbquo','\u2039':'lsaquo','\u203A':'rsaquo','"':'quot','\u201C':'ldquo','\u201D':'rdquo','\u201E':'bdquo','\xAB':'laquo','\xBB':'raquo','(':'lpar',')':'rpar','[':'lsqb',']':'rsqb','{':'lcub','}':'rcub','\u2308':'lceil','\u2309':'rceil','\u230A':'lfloor','\u230B':'rfloor','\u2985':'lopar','\u2986':'ropar','\u298B':'lbrke','\u298C':'rbrke','\u298D':'lbrkslu','\u298E':'rbrksld','\u298F':'lbrksld','\u2990':'rbrkslu','\u2991':'langd','\u2992':'rangd','\u2993':'lparlt','\u2994':'rpargt','\u2995':'gtlPar','\u2996':'ltrPar','\u27E6':'lobrk','\u27E7':'robrk','\u27E8':'lang','\u27E9':'rang','\u27EA':'Lang','\u27EB':'Rang','\u27EC':'loang','\u27ED':'roang','\u2772':'lbbrk','\u2773':'rbbrk','\u2016':'Vert','\xA7':'sect','\xB6':'para','@':'commat','*':'ast','/':'sol','undefined':null,'&':'amp','#':'num','%':'percnt','\u2030':'permil','\u2031':'pertenk','\u2020':'dagger','\u2021':'Dagger','\u2022':'bull','\u2043':'hybull','\u2032':'prime','\u2033':'Prime','\u2034':'tprime','\u2057':'qprime','\u2035':'bprime','\u2041':'caret','`':'grave','\xB4':'acute','\u02DC':'tilde','^':'Hat','\xAF':'macr','\u02D8':'breve','\u02D9':'dot','\xA8':'die','\u02DA':'ring','\u02DD':'dblac','\xB8':'cedil','\u02DB':'ogon','\u02C6':'circ','\u02C7':'caron','\xB0':'deg','\xA9':'copy','\xAE':'reg','\u2117':'copysr','\u2118':'wp','\u211E':'rx','\u2127':'mho','\u2129':'iiota','\u2190':'larr','\u219A':'nlarr','\u2192':'rarr','\u219B':'nrarr','\u2191':'uarr','\u2193':'darr','\u2194':'harr','\u21AE':'nharr','\u2195':'varr','\u2196':'nwarr','\u2197':'nearr','\u2198':'searr','\u2199':'swarr','\u219D':'rarrw','\u219D\u0338':'nrarrw','\u219E':'Larr','\u219F':'Uarr','\u21A0':'Rarr','\u21A1':'Darr','\u21A2':'larrtl','\u21A3':'rarrtl','\u21A4':'mapstoleft','\u21A5':'mapstoup','\u21A6':'map','\u21A7':'mapstodown','\u21A9':'larrhk','\u21AA':'rarrhk','\u21AB':'larrlp','\u21AC':'rarrlp','\u21AD':'harrw','\u21B0':'lsh','\u21B1':'rsh','\u21B2':'ldsh','\u21B3':'rdsh','\u21B5':'crarr','\u21B6':'cularr','\u21B7':'curarr','\u21BA':'olarr','\u21BB':'orarr','\u21BC':'lharu','\u21BD':'lhard','\u21BE':'uharr','\u21BF':'uharl','\u21C0':'rharu','\u21C1':'rhard','\u21C2':'dharr','\u21C3':'dharl','\u21C4':'rlarr','\u21C5':'udarr','\u21C6':'lrarr','\u21C7':'llarr','\u21C8':'uuarr','\u21C9':'rrarr','\u21CA':'ddarr','\u21CB':'lrhar','\u21CC':'rlhar','\u21D0':'lArr','\u21CD':'nlArr','\u21D1':'uArr','\u21D2':'rArr','\u21CF':'nrArr','\u21D3':'dArr','\u21D4':'iff','\u21CE':'nhArr','\u21D5':'vArr','\u21D6':'nwArr','\u21D7':'neArr','\u21D8':'seArr','\u21D9':'swArr','\u21DA':'lAarr','\u21DB':'rAarr','\u21DD':'zigrarr','\u21E4':'larrb','\u21E5':'rarrb','\u21F5':'duarr','\u21FD':'loarr','\u21FE':'roarr','\u21FF':'hoarr','\u2200':'forall','\u2201':'comp','\u2202':'part','\u2202\u0338':'npart','\u2203':'exist','\u2204':'nexist','\u2205':'empty','\u2207':'Del','\u2208':'in','\u2209':'notin','\u220B':'ni','\u220C':'notni','\u03F6':'bepsi','\u220F':'prod','\u2210':'coprod','\u2211':'sum','+':'plus','\xB1':'pm','\xF7':'div','\xD7':'times','<':'lt','\u226E':'nlt','<\u20D2':'nvlt','=':'equals','\u2260':'ne','=\u20E5':'bne','\u2A75':'Equal','>':'gt','\u226F':'ngt','>\u20D2':'nvgt','\xAC':'not','|':'vert','\xA6':'brvbar','\u2212':'minus','\u2213':'mp','\u2214':'plusdo','\u2044':'frasl','\u2216':'setmn','\u2217':'lowast','\u2218':'compfn','\u221A':'Sqrt','\u221D':'prop','\u221E':'infin','\u221F':'angrt','\u2220':'ang','\u2220\u20D2':'nang','\u2221':'angmsd','\u2222':'angsph','\u2223':'mid','\u2224':'nmid','\u2225':'par','\u2226':'npar','\u2227':'and','\u2228':'or','\u2229':'cap','\u2229\uFE00':'caps','\u222A':'cup','\u222A\uFE00':'cups','\u222B':'int','\u222C':'Int','\u222D':'tint','\u2A0C':'qint','\u222E':'oint','\u222F':'Conint','\u2230':'Cconint','\u2231':'cwint','\u2232':'cwconint','\u2233':'awconint','\u2234':'there4','\u2235':'becaus','\u2236':'ratio','\u2237':'Colon','\u2238':'minusd','\u223A':'mDDot','\u223B':'homtht','\u223C':'sim','\u2241':'nsim','\u223C\u20D2':'nvsim','\u223D':'bsim','\u223D\u0331':'race','\u223E':'ac','\u223E\u0333':'acE','\u223F':'acd','\u2240':'wr','\u2242':'esim','\u2242\u0338':'nesim','\u2243':'sime','\u2244':'nsime','\u2245':'cong','\u2247':'ncong','\u2246':'simne','\u2248':'ap','\u2249':'nap','\u224A':'ape','\u224B':'apid','\u224B\u0338':'napid','\u224C':'bcong','\u224D':'CupCap','\u226D':'NotCupCap','\u224D\u20D2':'nvap','\u224E':'bump','\u224E\u0338':'nbump','\u224F':'bumpe','\u224F\u0338':'nbumpe','\u2250':'doteq','\u2250\u0338':'nedot','\u2251':'eDot','\u2252':'efDot','\u2253':'erDot','\u2254':'colone','\u2255':'ecolon','\u2256':'ecir','\u2257':'cire','\u2259':'wedgeq','\u225A':'veeeq','\u225C':'trie','\u225F':'equest','\u2261':'equiv','\u2262':'nequiv','\u2261\u20E5':'bnequiv','\u2264':'le','\u2270':'nle','\u2264\u20D2':'nvle','\u2265':'ge','\u2271':'nge','\u2265\u20D2':'nvge','\u2266':'lE','\u2266\u0338':'nlE','\u2267':'gE','\u2267\u0338':'ngE','\u2268\uFE00':'lvnE','\u2268':'lnE','\u2269':'gnE','\u2269\uFE00':'gvnE','\u226A':'ll','\u226A\u0338':'nLtv','\u226A\u20D2':'nLt','\u226B':'gg','\u226B\u0338':'nGtv','\u226B\u20D2':'nGt','\u226C':'twixt','\u2272':'lsim','\u2274':'nlsim','\u2273':'gsim','\u2275':'ngsim','\u2276':'lg','\u2278':'ntlg','\u2277':'gl','\u2279':'ntgl','\u227A':'pr','\u2280':'npr','\u227B':'sc','\u2281':'nsc','\u227C':'prcue','\u22E0':'nprcue','\u227D':'sccue','\u22E1':'nsccue','\u227E':'prsim','\u227F':'scsim','\u227F\u0338':'NotSucceedsTilde','\u2282':'sub','\u2284':'nsub','\u2282\u20D2':'vnsub','\u2283':'sup','\u2285':'nsup','\u2283\u20D2':'vnsup','\u2286':'sube','\u2288':'nsube','\u2287':'supe','\u2289':'nsupe','\u228A\uFE00':'vsubne','\u228A':'subne','\u228B\uFE00':'vsupne','\u228B':'supne','\u228D':'cupdot','\u228E':'uplus','\u228F':'sqsub','\u228F\u0338':'NotSquareSubset','\u2290':'sqsup','\u2290\u0338':'NotSquareSuperset','\u2291':'sqsube','\u22E2':'nsqsube','\u2292':'sqsupe','\u22E3':'nsqsupe','\u2293':'sqcap','\u2293\uFE00':'sqcaps','\u2294':'sqcup','\u2294\uFE00':'sqcups','\u2295':'oplus','\u2296':'ominus','\u2297':'otimes','\u2298':'osol','\u2299':'odot','\u229A':'ocir','\u229B':'oast','\u229D':'odash','\u229E':'plusb','\u229F':'minusb','\u22A0':'timesb','\u22A1':'sdotb','\u22A2':'vdash','\u22AC':'nvdash','\u22A3':'dashv','\u22A4':'top','\u22A5':'bot','\u22A7':'models','\u22A8':'vDash','\u22AD':'nvDash','\u22A9':'Vdash','\u22AE':'nVdash','\u22AA':'Vvdash','\u22AB':'VDash','\u22AF':'nVDash','\u22B0':'prurel','\u22B2':'vltri','\u22EA':'nltri','\u22B3':'vrtri','\u22EB':'nrtri','\u22B4':'ltrie','\u22EC':'nltrie','\u22B4\u20D2':'nvltrie','\u22B5':'rtrie','\u22ED':'nrtrie','\u22B5\u20D2':'nvrtrie','\u22B6':'origof','\u22B7':'imof','\u22B8':'mumap','\u22B9':'hercon','\u22BA':'intcal','\u22BB':'veebar','\u22BD':'barvee','\u22BE':'angrtvb','\u22BF':'lrtri','\u22C0':'Wedge','\u22C1':'Vee','\u22C2':'xcap','\u22C3':'xcup','\u22C4':'diam','\u22C5':'sdot','\u22C6':'Star','\u22C7':'divonx','\u22C8':'bowtie','\u22C9':'ltimes','\u22CA':'rtimes','\u22CB':'lthree','\u22CC':'rthree','\u22CD':'bsime','\u22CE':'cuvee','\u22CF':'cuwed','\u22D0':'Sub','\u22D1':'Sup','\u22D2':'Cap','\u22D3':'Cup','\u22D4':'fork','\u22D5':'epar','\u22D6':'ltdot','\u22D7':'gtdot','\u22D8':'Ll','\u22D8\u0338':'nLl','\u22D9':'Gg','\u22D9\u0338':'nGg','\u22DA\uFE00':'lesg','\u22DA':'leg','\u22DB':'gel','\u22DB\uFE00':'gesl','\u22DE':'cuepr','\u22DF':'cuesc','\u22E6':'lnsim','\u22E7':'gnsim','\u22E8':'prnsim','\u22E9':'scnsim','\u22EE':'vellip','\u22EF':'ctdot','\u22F0':'utdot','\u22F1':'dtdot','\u22F2':'disin','\u22F3':'isinsv','\u22F4':'isins','\u22F5':'isindot','\u22F5\u0338':'notindot','\u22F6':'notinvc','\u22F7':'notinvb','\u22F9':'isinE','\u22F9\u0338':'notinE','\u22FA':'nisd','\u22FB':'xnis','\u22FC':'nis','\u22FD':'notnivc','\u22FE':'notnivb','\u2305':'barwed','\u2306':'Barwed','\u230C':'drcrop','\u230D':'dlcrop','\u230E':'urcrop','\u230F':'ulcrop','\u2310':'bnot','\u2312':'profline','\u2313':'profsurf','\u2315':'telrec','\u2316':'target','\u231C':'ulcorn','\u231D':'urcorn','\u231E':'dlcorn','\u231F':'drcorn','\u2322':'frown','\u2323':'smile','\u232D':'cylcty','\u232E':'profalar','\u2336':'topbot','\u233D':'ovbar','\u233F':'solbar','\u237C':'angzarr','\u23B0':'lmoust','\u23B1':'rmoust','\u23B4':'tbrk','\u23B5':'bbrk','\u23B6':'bbrktbrk','\u23DC':'OverParenthesis','\u23DD':'UnderParenthesis','\u23DE':'OverBrace','\u23DF':'UnderBrace','\u23E2':'trpezium','\u23E7':'elinters','\u2423':'blank','\u2500':'boxh','\u2502':'boxv','\u250C':'boxdr','\u2510':'boxdl','\u2514':'boxur','\u2518':'boxul','\u251C':'boxvr','\u2524':'boxvl','\u252C':'boxhd','\u2534':'boxhu','\u253C':'boxvh','\u2550':'boxH','\u2551':'boxV','\u2552':'boxdR','\u2553':'boxDr','\u2554':'boxDR','\u2555':'boxdL','\u2556':'boxDl','\u2557':'boxDL','\u2558':'boxuR','\u2559':'boxUr','\u255A':'boxUR','\u255B':'boxuL','\u255C':'boxUl','\u255D':'boxUL','\u255E':'boxvR','\u255F':'boxVr','\u2560':'boxVR','\u2561':'boxvL','\u2562':'boxVl','\u2563':'boxVL','\u2564':'boxHd','\u2565':'boxhD','\u2566':'boxHD','\u2567':'boxHu','\u2568':'boxhU','\u2569':'boxHU','\u256A':'boxvH','\u256B':'boxVh','\u256C':'boxVH','\u2580':'uhblk','\u2584':'lhblk','\u2588':'block','\u2591':'blk14','\u2592':'blk12','\u2593':'blk34','\u25A1':'squ','\u25AA':'squf','\u25AB':'EmptyVerySmallSquare','\u25AD':'rect','\u25AE':'marker','\u25B1':'fltns','\u25B3':'xutri','\u25B4':'utrif','\u25B5':'utri','\u25B8':'rtrif','\u25B9':'rtri','\u25BD':'xdtri','\u25BE':'dtrif','\u25BF':'dtri','\u25C2':'ltrif','\u25C3':'ltri','\u25CA':'loz','\u25CB':'cir','\u25EC':'tridot','\u25EF':'xcirc','\u25F8':'ultri','\u25F9':'urtri','\u25FA':'lltri','\u25FB':'EmptySmallSquare','\u25FC':'FilledSmallSquare','\u2605':'starf','\u2606':'star','\u260E':'phone','\u2640':'female','\u2642':'male','\u2660':'spades','\u2663':'clubs','\u2665':'hearts','\u2666':'diams','\u266A':'sung','\u2713':'check','\u2717':'cross','\u2720':'malt','\u2736':'sext','\u2758':'VerticalSeparator','\u27C8':'bsolhsub','\u27C9':'suphsol','\u27F5':'xlarr','\u27F6':'xrarr','\u27F7':'xharr','\u27F8':'xlArr','\u27F9':'xrArr','\u27FA':'xhArr','\u27FC':'xmap','\u27FF':'dzigrarr','\u2902':'nvlArr','\u2903':'nvrArr','\u2904':'nvHarr','\u2905':'Map','\u290C':'lbarr','\u290D':'rbarr','\u290E':'lBarr','\u290F':'rBarr','\u2910':'RBarr','\u2911':'DDotrahd','\u2912':'UpArrowBar','\u2913':'DownArrowBar','\u2916':'Rarrtl','\u2919':'latail','\u291A':'ratail','\u291B':'lAtail','\u291C':'rAtail','\u291D':'larrfs','\u291E':'rarrfs','\u291F':'larrbfs','\u2920':'rarrbfs','\u2923':'nwarhk','\u2924':'nearhk','\u2925':'searhk','\u2926':'swarhk','\u2927':'nwnear','\u2928':'toea','\u2929':'tosa','\u292A':'swnwar','\u2933':'rarrc','\u2933\u0338':'nrarrc','\u2935':'cudarrr','\u2936':'ldca','\u2937':'rdca','\u2938':'cudarrl','\u2939':'larrpl','\u293C':'curarrm','\u293D':'cularrp','\u2945':'rarrpl','\u2948':'harrcir','\u2949':'Uarrocir','\u294A':'lurdshar','\u294B':'ldrushar','\u294E':'LeftRightVector','\u294F':'RightUpDownVector','\u2950':'DownLeftRightVector','\u2951':'LeftUpDownVector','\u2952':'LeftVectorBar','\u2953':'RightVectorBar','\u2954':'RightUpVectorBar','\u2955':'RightDownVectorBar','\u2956':'DownLeftVectorBar','\u2957':'DownRightVectorBar','\u2958':'LeftUpVectorBar','\u2959':'LeftDownVectorBar','\u295A':'LeftTeeVector','\u295B':'RightTeeVector','\u295C':'RightUpTeeVector','\u295D':'RightDownTeeVector','\u295E':'DownLeftTeeVector','\u295F':'DownRightTeeVector','\u2960':'LeftUpTeeVector','\u2961':'LeftDownTeeVector','\u2962':'lHar','\u2963':'uHar','\u2964':'rHar','\u2965':'dHar','\u2966':'luruhar','\u2967':'ldrdhar','\u2968':'ruluhar','\u2969':'rdldhar','\u296A':'lharul','\u296B':'llhard','\u296C':'rharul','\u296D':'lrhard','\u296E':'udhar','\u296F':'duhar','\u2970':'RoundImplies','\u2971':'erarr','\u2972':'simrarr','\u2973':'larrsim','\u2974':'rarrsim','\u2975':'rarrap','\u2976':'ltlarr','\u2978':'gtrarr','\u2979':'subrarr','\u297B':'suplarr','\u297C':'lfisht','\u297D':'rfisht','\u297E':'ufisht','\u297F':'dfisht','\u299A':'vzigzag','\u299C':'vangrt','\u299D':'angrtvbd','\u29A4':'ange','\u29A5':'range','\u29A6':'dwangle','\u29A7':'uwangle','\u29A8':'angmsdaa','\u29A9':'angmsdab','\u29AA':'angmsdac','\u29AB':'angmsdad','\u29AC':'angmsdae','\u29AD':'angmsdaf','\u29AE':'angmsdag','\u29AF':'angmsdah','\u29B0':'bemptyv','\u29B1':'demptyv','\u29B2':'cemptyv','\u29B3':'raemptyv','\u29B4':'laemptyv','\u29B5':'ohbar','\u29B6':'omid','\u29B7':'opar','\u29B9':'operp','\u29BB':'olcross','\u29BC':'odsold','\u29BE':'olcir','\u29BF':'ofcir','\u29C0':'olt','\u29C1':'ogt','\u29C2':'cirscir','\u29C3':'cirE','\u29C4':'solb','\u29C5':'bsolb','\u29C9':'boxbox','\u29CD':'trisb','\u29CE':'rtriltri','\u29CF':'LeftTriangleBar','\u29CF\u0338':'NotLeftTriangleBar','\u29D0':'RightTriangleBar','\u29D0\u0338':'NotRightTriangleBar','\u29DC':'iinfin','\u29DD':'infintie','\u29DE':'nvinfin','\u29E3':'eparsl','\u29E4':'smeparsl','\u29E5':'eqvparsl','\u29EB':'lozf','\u29F4':'RuleDelayed','\u29F6':'dsol','\u2A00':'xodot','\u2A01':'xoplus','\u2A02':'xotime','\u2A04':'xuplus','\u2A06':'xsqcup','\u2A0D':'fpartint','\u2A10':'cirfnint','\u2A11':'awint','\u2A12':'rppolint','\u2A13':'scpolint','\u2A14':'npolint','\u2A15':'pointint','\u2A16':'quatint','\u2A17':'intlarhk','\u2A22':'pluscir','\u2A23':'plusacir','\u2A24':'simplus','\u2A25':'plusdu','\u2A26':'plussim','\u2A27':'plustwo','\u2A29':'mcomma','\u2A2A':'minusdu','\u2A2D':'loplus','\u2A2E':'roplus','\u2A2F':'Cross','\u2A30':'timesd','\u2A31':'timesbar','\u2A33':'smashp','\u2A34':'lotimes','\u2A35':'rotimes','\u2A36':'otimesas','\u2A37':'Otimes','\u2A38':'odiv','\u2A39':'triplus','\u2A3A':'triminus','\u2A3B':'tritime','\u2A3C':'iprod','\u2A3F':'amalg','\u2A40':'capdot','\u2A42':'ncup','\u2A43':'ncap','\u2A44':'capand','\u2A45':'cupor','\u2A46':'cupcap','\u2A47':'capcup','\u2A48':'cupbrcap','\u2A49':'capbrcup','\u2A4A':'cupcup','\u2A4B':'capcap','\u2A4C':'ccups','\u2A4D':'ccaps','\u2A50':'ccupssm','\u2A53':'And','\u2A54':'Or','\u2A55':'andand','\u2A56':'oror','\u2A57':'orslope','\u2A58':'andslope','\u2A5A':'andv','\u2A5B':'orv','\u2A5C':'andd','\u2A5D':'ord','\u2A5F':'wedbar','\u2A66':'sdote','\u2A6A':'simdot','\u2A6D':'congdot','\u2A6D\u0338':'ncongdot','\u2A6E':'easter','\u2A6F':'apacir','\u2A70':'apE','\u2A70\u0338':'napE','\u2A71':'eplus','\u2A72':'pluse','\u2A73':'Esim','\u2A77':'eDDot','\u2A78':'equivDD','\u2A79':'ltcir','\u2A7A':'gtcir','\u2A7B':'ltquest','\u2A7C':'gtquest','\u2A7D':'les','\u2A7D\u0338':'nles','\u2A7E':'ges','\u2A7E\u0338':'nges','\u2A7F':'lesdot','\u2A80':'gesdot','\u2A81':'lesdoto','\u2A82':'gesdoto','\u2A83':'lesdotor','\u2A84':'gesdotol','\u2A85':'lap','\u2A86':'gap','\u2A87':'lne','\u2A88':'gne','\u2A89':'lnap','\u2A8A':'gnap','\u2A8B':'lEg','\u2A8C':'gEl','\u2A8D':'lsime','\u2A8E':'gsime','\u2A8F':'lsimg','\u2A90':'gsiml','\u2A91':'lgE','\u2A92':'glE','\u2A93':'lesges','\u2A94':'gesles','\u2A95':'els','\u2A96':'egs','\u2A97':'elsdot','\u2A98':'egsdot','\u2A99':'el','\u2A9A':'eg','\u2A9D':'siml','\u2A9E':'simg','\u2A9F':'simlE','\u2AA0':'simgE','\u2AA1':'LessLess','\u2AA1\u0338':'NotNestedLessLess','\u2AA2':'GreaterGreater','\u2AA2\u0338':'NotNestedGreaterGreater','\u2AA4':'glj','\u2AA5':'gla','\u2AA6':'ltcc','\u2AA7':'gtcc','\u2AA8':'lescc','\u2AA9':'gescc','\u2AAA':'smt','\u2AAB':'lat','\u2AAC':'smte','\u2AAC\uFE00':'smtes','\u2AAD':'late','\u2AAD\uFE00':'lates','\u2AAE':'bumpE','\u2AAF':'pre','\u2AAF\u0338':'npre','\u2AB0':'sce','\u2AB0\u0338':'nsce','\u2AB3':'prE','\u2AB4':'scE','\u2AB5':'prnE','\u2AB6':'scnE','\u2AB7':'prap','\u2AB8':'scap','\u2AB9':'prnap','\u2ABA':'scnap','\u2ABB':'Pr','\u2ABC':'Sc','\u2ABD':'subdot','\u2ABE':'supdot','\u2ABF':'subplus','\u2AC0':'supplus','\u2AC1':'submult','\u2AC2':'supmult','\u2AC3':'subedot','\u2AC4':'supedot','\u2AC5':'subE','\u2AC5\u0338':'nsubE','\u2AC6':'supE','\u2AC6\u0338':'nsupE','\u2AC7':'subsim','\u2AC8':'supsim','\u2ACB\uFE00':'vsubnE','\u2ACB':'subnE','\u2ACC\uFE00':'vsupnE','\u2ACC':'supnE','\u2ACF':'csub','\u2AD0':'csup','\u2AD1':'csube','\u2AD2':'csupe','\u2AD3':'subsup','\u2AD4':'supsub','\u2AD5':'subsub','\u2AD6':'supsup','\u2AD7':'suphsub','\u2AD8':'supdsub','\u2AD9':'forkv','\u2ADA':'topfork','\u2ADB':'mlcp','\u2AE4':'Dashv','\u2AE6':'Vdashl','\u2AE7':'Barv','\u2AE8':'vBar','\u2AE9':'vBarv','\u2AEB':'Vbar','\u2AEC':'Not','\u2AED':'bNot','\u2AEE':'rnmid','\u2AEF':'cirmid','\u2AF0':'midcir','\u2AF1':'topcir','\u2AF2':'nhpar','\u2AF3':'parsim','\u2AFD':'parsl','\u2AFD\u20E5':'nparsl','\u266D':'flat','\u266E':'natur','\u266F':'sharp','\xA4':'curren','\xA2':'cent','$':'dollar','\xA3':'pound','\xA5':'yen','\u20AC':'euro','\xB9':'sup1','\xBD':'half','\u2153':'frac13','\xBC':'frac14','\u2155':'frac15','\u2159':'frac16','\u215B':'frac18','\xB2':'sup2','\u2154':'frac23','\u2156':'frac25','\xB3':'sup3','\xBE':'frac34','\u2157':'frac35','\u215C':'frac38','\u2158':'frac45','\u215A':'frac56','\u215D':'frac58','\u215E':'frac78','\uD835\uDCB6':'ascr','\uD835\uDD52':'aopf','\uD835\uDD1E':'afr','\uD835\uDD38':'Aopf','\uD835\uDD04':'Afr','\uD835\uDC9C':'Ascr','\xAA':'ordf','\xE1':'aacute','\xC1':'Aacute','\xE0':'agrave','\xC0':'Agrave','\u0103':'abreve','\u0102':'Abreve','\xE2':'acirc','\xC2':'Acirc','\xE5':'aring','\xC5':'angst','\xE4':'auml','\xC4':'Auml','\xE3':'atilde','\xC3':'Atilde','\u0105':'aogon','\u0104':'Aogon','\u0101':'amacr','\u0100':'Amacr','\xE6':'aelig','\xC6':'AElig','\uD835\uDCB7':'bscr','\uD835\uDD53':'bopf','\uD835\uDD1F':'bfr','\uD835\uDD39':'Bopf','\u212C':'Bscr','\uD835\uDD05':'Bfr','\uD835\uDD20':'cfr','\uD835\uDCB8':'cscr','\uD835\uDD54':'copf','\u212D':'Cfr','\uD835\uDC9E':'Cscr','\u2102':'Copf','\u0107':'cacute','\u0106':'Cacute','\u0109':'ccirc','\u0108':'Ccirc','\u010D':'ccaron','\u010C':'Ccaron','\u010B':'cdot','\u010A':'Cdot','\xE7':'ccedil','\xC7':'Ccedil','\u2105':'incare','\uD835\uDD21':'dfr','\u2146':'dd','\uD835\uDD55':'dopf','\uD835\uDCB9':'dscr','\uD835\uDC9F':'Dscr','\uD835\uDD07':'Dfr','\u2145':'DD','\uD835\uDD3B':'Dopf','\u010F':'dcaron','\u010E':'Dcaron','\u0111':'dstrok','\u0110':'Dstrok','\xF0':'eth','\xD0':'ETH','\u2147':'ee','\u212F':'escr','\uD835\uDD22':'efr','\uD835\uDD56':'eopf','\u2130':'Escr','\uD835\uDD08':'Efr','\uD835\uDD3C':'Eopf','\xE9':'eacute','\xC9':'Eacute','\xE8':'egrave','\xC8':'Egrave','\xEA':'ecirc','\xCA':'Ecirc','\u011B':'ecaron','\u011A':'Ecaron','\xEB':'euml','\xCB':'Euml','\u0117':'edot','\u0116':'Edot','\u0119':'eogon','\u0118':'Eogon','\u0113':'emacr','\u0112':'Emacr','\uD835\uDD23':'ffr','\uD835\uDD57':'fopf','\uD835\uDCBB':'fscr','\uD835\uDD09':'Ffr','\uD835\uDD3D':'Fopf','\u2131':'Fscr','\uFB00':'fflig','\uFB03':'ffilig','\uFB04':'ffllig','\uFB01':'filig','fj':'fjlig','\uFB02':'fllig','\u0192':'fnof','\u210A':'gscr','\uD835\uDD58':'gopf','\uD835\uDD24':'gfr','\uD835\uDCA2':'Gscr','\uD835\uDD3E':'Gopf','\uD835\uDD0A':'Gfr','\u01F5':'gacute','\u011F':'gbreve','\u011E':'Gbreve','\u011D':'gcirc','\u011C':'Gcirc','\u0121':'gdot','\u0120':'Gdot','\u0122':'Gcedil','\uD835\uDD25':'hfr','\u210E':'planckh','\uD835\uDCBD':'hscr','\uD835\uDD59':'hopf','\u210B':'Hscr','\u210C':'Hfr','\u210D':'Hopf','\u0125':'hcirc','\u0124':'Hcirc','\u210F':'hbar','\u0127':'hstrok','\u0126':'Hstrok','\uD835\uDD5A':'iopf','\uD835\uDD26':'ifr','\uD835\uDCBE':'iscr','\u2148':'ii','\uD835\uDD40':'Iopf','\u2110':'Iscr','\u2111':'Im','\xED':'iacute','\xCD':'Iacute','\xEC':'igrave','\xCC':'Igrave','\xEE':'icirc','\xCE':'Icirc','\xEF':'iuml','\xCF':'Iuml','\u0129':'itilde','\u0128':'Itilde','\u0130':'Idot','\u012F':'iogon','\u012E':'Iogon','\u012B':'imacr','\u012A':'Imacr','\u0133':'ijlig','\u0132':'IJlig','\u0131':'imath','\uD835\uDCBF':'jscr','\uD835\uDD5B':'jopf','\uD835\uDD27':'jfr','\uD835\uDCA5':'Jscr','\uD835\uDD0D':'Jfr','\uD835\uDD41':'Jopf','\u0135':'jcirc','\u0134':'Jcirc','\u0237':'jmath','\uD835\uDD5C':'kopf','\uD835\uDCC0':'kscr','\uD835\uDD28':'kfr','\uD835\uDCA6':'Kscr','\uD835\uDD42':'Kopf','\uD835\uDD0E':'Kfr','\u0137':'kcedil','\u0136':'Kcedil','\uD835\uDD29':'lfr','\uD835\uDCC1':'lscr','\u2113':'ell','\uD835\uDD5D':'lopf','\u2112':'Lscr','\uD835\uDD0F':'Lfr','\uD835\uDD43':'Lopf','\u013A':'lacute','\u0139':'Lacute','\u013E':'lcaron','\u013D':'Lcaron','\u013C':'lcedil','\u013B':'Lcedil','\u0142':'lstrok','\u0141':'Lstrok','\u0140':'lmidot','\u013F':'Lmidot','\uD835\uDD2A':'mfr','\uD835\uDD5E':'mopf','\uD835\uDCC2':'mscr','\uD835\uDD10':'Mfr','\uD835\uDD44':'Mopf','\u2133':'Mscr','\uD835\uDD2B':'nfr','\uD835\uDD5F':'nopf','\uD835\uDCC3':'nscr','\u2115':'Nopf','\uD835\uDCA9':'Nscr','\uD835\uDD11':'Nfr','\u0144':'nacute','\u0143':'Nacute','\u0148':'ncaron','\u0147':'Ncaron','\xF1':'ntilde','\xD1':'Ntilde','\u0146':'ncedil','\u0145':'Ncedil','\u2116':'numero','\u014B':'eng','\u014A':'ENG','\uD835\uDD60':'oopf','\uD835\uDD2C':'ofr','\u2134':'oscr','\uD835\uDCAA':'Oscr','\uD835\uDD12':'Ofr','\uD835\uDD46':'Oopf','\xBA':'ordm','\xF3':'oacute','\xD3':'Oacute','\xF2':'ograve','\xD2':'Ograve','\xF4':'ocirc','\xD4':'Ocirc','\xF6':'ouml','\xD6':'Ouml','\u0151':'odblac','\u0150':'Odblac','\xF5':'otilde','\xD5':'Otilde','\xF8':'oslash','\xD8':'Oslash','\u014D':'omacr','\u014C':'Omacr','\u0153':'oelig','\u0152':'OElig','\uD835\uDD2D':'pfr','\uD835\uDCC5':'pscr','\uD835\uDD61':'popf','\u2119':'Popf','\uD835\uDD13':'Pfr','\uD835\uDCAB':'Pscr','\uD835\uDD62':'qopf','\uD835\uDD2E':'qfr','\uD835\uDCC6':'qscr','\uD835\uDCAC':'Qscr','\uD835\uDD14':'Qfr','\u211A':'Qopf','\u0138':'kgreen','\uD835\uDD2F':'rfr','\uD835\uDD63':'ropf','\uD835\uDCC7':'rscr','\u211B':'Rscr','\u211C':'Re','\u211D':'Ropf','\u0155':'racute','\u0154':'Racute','\u0159':'rcaron','\u0158':'Rcaron','\u0157':'rcedil','\u0156':'Rcedil','\uD835\uDD64':'sopf','\uD835\uDCC8':'sscr','\uD835\uDD30':'sfr','\uD835\uDD4A':'Sopf','\uD835\uDD16':'Sfr','\uD835\uDCAE':'Sscr','\u24C8':'oS','\u015B':'sacute','\u015A':'Sacute','\u015D':'scirc','\u015C':'Scirc','\u0161':'scaron','\u0160':'Scaron','\u015F':'scedil','\u015E':'Scedil','\xDF':'szlig','\uD835\uDD31':'tfr','\uD835\uDCC9':'tscr','\uD835\uDD65':'topf','\uD835\uDCAF':'Tscr','\uD835\uDD17':'Tfr','\uD835\uDD4B':'Topf','\u0165':'tcaron','\u0164':'Tcaron','\u0163':'tcedil','\u0162':'Tcedil','\u2122':'trade','\u0167':'tstrok','\u0166':'Tstrok','\uD835\uDCCA':'uscr','\uD835\uDD66':'uopf','\uD835\uDD32':'ufr','\uD835\uDD4C':'Uopf','\uD835\uDD18':'Ufr','\uD835\uDCB0':'Uscr','\xFA':'uacute','\xDA':'Uacute','\xF9':'ugrave','\xD9':'Ugrave','\u016D':'ubreve','\u016C':'Ubreve','\xFB':'ucirc','\xDB':'Ucirc','\u016F':'uring','\u016E':'Uring','\xFC':'uuml','\xDC':'Uuml','\u0171':'udblac','\u0170':'Udblac','\u0169':'utilde','\u0168':'Utilde','\u0173':'uogon','\u0172':'Uogon','\u016B':'umacr','\u016A':'Umacr','\uD835\uDD33':'vfr','\uD835\uDD67':'vopf','\uD835\uDCCB':'vscr','\uD835\uDD19':'Vfr','\uD835\uDD4D':'Vopf','\uD835\uDCB1':'Vscr','\uD835\uDD68':'wopf','\uD835\uDCCC':'wscr','\uD835\uDD34':'wfr','\uD835\uDCB2':'Wscr','\uD835\uDD4E':'Wopf','\uD835\uDD1A':'Wfr','\u0175':'wcirc','\u0174':'Wcirc','\uD835\uDD35':'xfr','\uD835\uDCCD':'xscr','\uD835\uDD69':'xopf','\uD835\uDD4F':'Xopf','\uD835\uDD1B':'Xfr','\uD835\uDCB3':'Xscr','\uD835\uDD36':'yfr','\uD835\uDCCE':'yscr','\uD835\uDD6A':'yopf','\uD835\uDCB4':'Yscr','\uD835\uDD1C':'Yfr','\uD835\uDD50':'Yopf','\xFD':'yacute','\xDD':'Yacute','\u0177':'ycirc','\u0176':'Ycirc','\xFF':'yuml','\u0178':'Yuml','\uD835\uDCCF':'zscr','\uD835\uDD37':'zfr','\uD835\uDD6B':'zopf','\u2128':'Zfr','\u2124':'Zopf','\uD835\uDCB5':'Zscr','\u017A':'zacute','\u0179':'Zacute','\u017E':'zcaron','\u017D':'Zcaron','\u017C':'zdot','\u017B':'Zdot','\u01B5':'imped','\xFE':'thorn','\xDE':'THORN','\u0149':'napos','\u03B1':'alpha','\u0391':'Alpha','\u03B2':'beta','\u0392':'Beta','\u03B3':'gamma','\u0393':'Gamma','\u03B4':'delta','\u0394':'Delta','\u03B5':'epsi','\u03F5':'epsiv','\u0395':'Epsilon','\u03DD':'gammad','\u03DC':'Gammad','\u03B6':'zeta','\u0396':'Zeta','\u03B7':'eta','\u0397':'Eta','\u03B8':'theta','\u03D1':'thetav','\u0398':'Theta','\u03B9':'iota','\u0399':'Iota','\u03BA':'kappa','\u03F0':'kappav','\u039A':'Kappa','\u03BB':'lambda','\u039B':'Lambda','\u03BC':'mu','\xB5':'micro','\u039C':'Mu','\u03BD':'nu','\u039D':'Nu','\u03BE':'xi','\u039E':'Xi','\u03BF':'omicron','\u039F':'Omicron','\u03C0':'pi','\u03D6':'piv','\u03A0':'Pi','\u03C1':'rho','\u03F1':'rhov','\u03A1':'Rho','\u03C3':'sigma','\u03A3':'Sigma','\u03C2':'sigmaf','\u03C4':'tau','\u03A4':'Tau','\u03C5':'upsi','\u03A5':'Upsilon','\u03D2':'Upsi','\u03C6':'phi','\u03D5':'phiv','\u03A6':'Phi','\u03C7':'chi','\u03A7':'Chi','\u03C8':'psi','\u03A8':'Psi','\u03C9':'omega','\u03A9':'ohm','\u0430':'acy','\u0410':'Acy','\u0431':'bcy','\u0411':'Bcy','\u0432':'vcy','\u0412':'Vcy','\u0433':'gcy','\u0413':'Gcy','\u0453':'gjcy','\u0403':'GJcy','\u0434':'dcy','\u0414':'Dcy','\u0452':'djcy','\u0402':'DJcy','\u0435':'iecy','\u0415':'IEcy','\u0451':'iocy','\u0401':'IOcy','\u0454':'jukcy','\u0404':'Jukcy','\u0436':'zhcy','\u0416':'ZHcy','\u0437':'zcy','\u0417':'Zcy','\u0455':'dscy','\u0405':'DScy','\u0438':'icy','\u0418':'Icy','\u0456':'iukcy','\u0406':'Iukcy','\u0457':'yicy','\u0407':'YIcy','\u0439':'jcy','\u0419':'Jcy','\u0458':'jsercy','\u0408':'Jsercy','\u043A':'kcy','\u041A':'Kcy','\u045C':'kjcy','\u040C':'KJcy','\u043B':'lcy','\u041B':'Lcy','\u0459':'ljcy','\u0409':'LJcy','\u043C':'mcy','\u041C':'Mcy','\u043D':'ncy','\u041D':'Ncy','\u045A':'njcy','\u040A':'NJcy','\u043E':'ocy','\u041E':'Ocy','\u043F':'pcy','\u041F':'Pcy','\u0440':'rcy','\u0420':'Rcy','\u0441':'scy','\u0421':'Scy','\u0442':'tcy','\u0422':'Tcy','\u045B':'tshcy','\u040B':'TSHcy','\u0443':'ucy','\u0423':'Ucy','\u045E':'ubrcy','\u040E':'Ubrcy','\u0444':'fcy','\u0424':'Fcy','\u0445':'khcy','\u0425':'KHcy','\u0446':'tscy','\u0426':'TScy','\u0447':'chcy','\u0427':'CHcy','\u045F':'dzcy','\u040F':'DZcy','\u0448':'shcy','\u0428':'SHcy','\u0449':'shchcy','\u0429':'SHCHcy','\u044A':'hardcy','\u042A':'HARDcy','\u044B':'ycy','\u042B':'Ycy','\u044C':'softcy','\u042C':'SOFTcy','\u044D':'ecy','\u042D':'Ecy','\u044E':'yucy','\u042E':'YUcy','\u044F':'yacy','\u042F':'YAcy','\u2135':'aleph','\u2136':'beth','\u2137':'gimel','\u2138':'daleth'}; - - var regexEscape = /["&'<>`]/g; - var escapeMap = { - '"': '"', - '&': '&', - '\'': ''', - '<': '<', - // See https://mathiasbynens.be/notes/ambiguous-ampersands: in HTML, the - // following is not strictly necessary unless it’s part of a tag or an - // unquoted attribute value. We’re only escaping it to support those - // situations, and for XML support. - '>': '>', - // In Internet Explorer ≤ 8, the backtick character can be used - // to break out of (un)quoted attribute values or HTML comments. - // See http://html5sec.org/#102, http://html5sec.org/#108, and - // http://html5sec.org/#133. - '`': '`' - }; - - var regexInvalidEntity = /&#(?:[xX][^a-fA-F0-9]|[^0-9xX])/; - var regexInvalidRawCodePoint = /[\0-\x08\x0B\x0E-\x1F\x7F-\x9F\uFDD0-\uFDEF\uFFFE\uFFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F\uDBBF\uDBFF][\uDFFE\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; - var regexDecode = /&(CounterClockwiseContourIntegral|DoubleLongLeftRightArrow|ClockwiseContourIntegral|NotNestedGreaterGreater|NotSquareSupersetEqual|DiacriticalDoubleAcute|NotRightTriangleEqual|NotSucceedsSlantEqual|NotPrecedesSlantEqual|CloseCurlyDoubleQuote|NegativeVeryThinSpace|DoubleContourIntegral|FilledVerySmallSquare|CapitalDifferentialD|OpenCurlyDoubleQuote|EmptyVerySmallSquare|NestedGreaterGreater|DoubleLongRightArrow|NotLeftTriangleEqual|NotGreaterSlantEqual|ReverseUpEquilibrium|DoubleLeftRightArrow|NotSquareSubsetEqual|NotDoubleVerticalBar|RightArrowLeftArrow|NotGreaterFullEqual|NotRightTriangleBar|SquareSupersetEqual|DownLeftRightVector|DoubleLongLeftArrow|leftrightsquigarrow|LeftArrowRightArrow|NegativeMediumSpace|blacktriangleright|RightDownVectorBar|PrecedesSlantEqual|RightDoubleBracket|SucceedsSlantEqual|NotLeftTriangleBar|RightTriangleEqual|SquareIntersection|RightDownTeeVector|ReverseEquilibrium|NegativeThickSpace|longleftrightarrow|Longleftrightarrow|LongLeftRightArrow|DownRightTeeVector|DownRightVectorBar|GreaterSlantEqual|SquareSubsetEqual|LeftDownVectorBar|LeftDoubleBracket|VerticalSeparator|rightleftharpoons|NotGreaterGreater|NotSquareSuperset|blacktriangleleft|blacktriangledown|NegativeThinSpace|LeftDownTeeVector|NotLessSlantEqual|leftrightharpoons|DoubleUpDownArrow|DoubleVerticalBar|LeftTriangleEqual|FilledSmallSquare|twoheadrightarrow|NotNestedLessLess|DownLeftTeeVector|DownLeftVectorBar|RightAngleBracket|NotTildeFullEqual|NotReverseElement|RightUpDownVector|DiacriticalTilde|NotSucceedsTilde|circlearrowright|NotPrecedesEqual|rightharpoondown|DoubleRightArrow|NotSucceedsEqual|NonBreakingSpace|NotRightTriangle|LessEqualGreater|RightUpTeeVector|LeftAngleBracket|GreaterFullEqual|DownArrowUpArrow|RightUpVectorBar|twoheadleftarrow|GreaterEqualLess|downharpoonright|RightTriangleBar|ntrianglerighteq|NotSupersetEqual|LeftUpDownVector|DiacriticalAcute|rightrightarrows|vartriangleright|UpArrowDownArrow|DiacriticalGrave|UnderParenthesis|EmptySmallSquare|LeftUpVectorBar|leftrightarrows|DownRightVector|downharpoonleft|trianglerighteq|ShortRightArrow|OverParenthesis|DoubleLeftArrow|DoubleDownArrow|NotSquareSubset|bigtriangledown|ntrianglelefteq|UpperRightArrow|curvearrowright|vartriangleleft|NotLeftTriangle|nleftrightarrow|LowerRightArrow|NotHumpDownHump|NotGreaterTilde|rightthreetimes|LeftUpTeeVector|NotGreaterEqual|straightepsilon|LeftTriangleBar|rightsquigarrow|ContourIntegral|rightleftarrows|CloseCurlyQuote|RightDownVector|LeftRightVector|nLeftrightarrow|leftharpoondown|circlearrowleft|SquareSuperset|OpenCurlyQuote|hookrightarrow|HorizontalLine|DiacriticalDot|NotLessGreater|ntriangleright|DoubleRightTee|InvisibleComma|InvisibleTimes|LowerLeftArrow|DownLeftVector|NotSubsetEqual|curvearrowleft|trianglelefteq|NotVerticalBar|TildeFullEqual|downdownarrows|NotGreaterLess|RightTeeVector|ZeroWidthSpace|looparrowright|LongRightArrow|doublebarwedge|ShortLeftArrow|ShortDownArrow|RightVectorBar|GreaterGreater|ReverseElement|rightharpoonup|LessSlantEqual|leftthreetimes|upharpoonright|rightarrowtail|LeftDownVector|Longrightarrow|NestedLessLess|UpperLeftArrow|nshortparallel|leftleftarrows|leftrightarrow|Leftrightarrow|LeftRightArrow|longrightarrow|upharpoonleft|RightArrowBar|ApplyFunction|LeftTeeVector|leftarrowtail|NotEqualTilde|varsubsetneqq|varsupsetneqq|RightTeeArrow|SucceedsEqual|SucceedsTilde|LeftVectorBar|SupersetEqual|hookleftarrow|DifferentialD|VerticalTilde|VeryThinSpace|blacktriangle|bigtriangleup|LessFullEqual|divideontimes|leftharpoonup|UpEquilibrium|ntriangleleft|RightTriangle|measuredangle|shortparallel|longleftarrow|Longleftarrow|LongLeftArrow|DoubleLeftTee|Poincareplane|PrecedesEqual|triangleright|DoubleUpArrow|RightUpVector|fallingdotseq|looparrowleft|PrecedesTilde|NotTildeEqual|NotTildeTilde|smallsetminus|Proportional|triangleleft|triangledown|UnderBracket|NotHumpEqual|exponentiale|ExponentialE|NotLessTilde|HilbertSpace|RightCeiling|blacklozenge|varsupsetneq|HumpDownHump|GreaterEqual|VerticalLine|LeftTeeArrow|NotLessEqual|DownTeeArrow|LeftTriangle|varsubsetneq|Intersection|NotCongruent|DownArrowBar|LeftUpVector|LeftArrowBar|risingdotseq|GreaterTilde|RoundImplies|SquareSubset|ShortUpArrow|NotSuperset|quaternions|precnapprox|backepsilon|preccurlyeq|OverBracket|blacksquare|MediumSpace|VerticalBar|circledcirc|circleddash|CircleMinus|CircleTimes|LessGreater|curlyeqprec|curlyeqsucc|diamondsuit|UpDownArrow|Updownarrow|RuleDelayed|Rrightarrow|updownarrow|RightVector|nRightarrow|nrightarrow|eqslantless|LeftCeiling|Equilibrium|SmallCircle|expectation|NotSucceeds|thickapprox|GreaterLess|SquareUnion|NotPrecedes|NotLessLess|straightphi|succnapprox|succcurlyeq|SubsetEqual|sqsupseteq|Proportion|Laplacetrf|ImaginaryI|supsetneqq|NotGreater|gtreqqless|NotElement|ThickSpace|TildeEqual|TildeTilde|Fouriertrf|rmoustache|EqualTilde|eqslantgtr|UnderBrace|LeftVector|UpArrowBar|nLeftarrow|nsubseteqq|subsetneqq|nsupseteqq|nleftarrow|succapprox|lessapprox|UpTeeArrow|upuparrows|curlywedge|lesseqqgtr|varepsilon|varnothing|RightFloor|complement|CirclePlus|sqsubseteq|Lleftarrow|circledast|RightArrow|Rightarrow|rightarrow|lmoustache|Bernoullis|precapprox|mapstoleft|mapstodown|longmapsto|dotsquare|downarrow|DoubleDot|nsubseteq|supsetneq|leftarrow|nsupseteq|subsetneq|ThinSpace|ngeqslant|subseteqq|HumpEqual|NotSubset|triangleq|NotCupCap|lesseqgtr|heartsuit|TripleDot|Leftarrow|Coproduct|Congruent|varpropto|complexes|gvertneqq|LeftArrow|LessTilde|supseteqq|MinusPlus|CircleDot|nleqslant|NotExists|gtreqless|nparallel|UnionPlus|LeftFloor|checkmark|CenterDot|centerdot|Mellintrf|gtrapprox|bigotimes|OverBrace|spadesuit|therefore|pitchfork|rationals|PlusMinus|Backslash|Therefore|DownBreve|backsimeq|backprime|DownArrow|nshortmid|Downarrow|lvertneqq|eqvparsl|imagline|imagpart|infintie|integers|Integral|intercal|LessLess|Uarrocir|intlarhk|sqsupset|angmsdaf|sqsubset|llcorner|vartheta|cupbrcap|lnapprox|Superset|SuchThat|succnsim|succneqq|angmsdag|biguplus|curlyvee|trpezium|Succeeds|NotTilde|bigwedge|angmsdah|angrtvbd|triminus|cwconint|fpartint|lrcorner|smeparsl|subseteq|urcorner|lurdshar|laemptyv|DDotrahd|approxeq|ldrushar|awconint|mapstoup|backcong|shortmid|triangle|geqslant|gesdotol|timesbar|circledR|circledS|setminus|multimap|naturals|scpolint|ncongdot|RightTee|boxminus|gnapprox|boxtimes|andslope|thicksim|angmsdaa|varsigma|cirfnint|rtriltri|angmsdab|rppolint|angmsdac|barwedge|drbkarow|clubsuit|thetasym|bsolhsub|capbrcup|dzigrarr|doteqdot|DotEqual|dotminus|UnderBar|NotEqual|realpart|otimesas|ulcorner|hksearow|hkswarow|parallel|PartialD|elinters|emptyset|plusacir|bbrktbrk|angmsdad|pointint|bigoplus|angmsdae|Precedes|bigsqcup|varkappa|notindot|supseteq|precneqq|precnsim|profalar|profline|profsurf|leqslant|lesdotor|raemptyv|subplus|notnivb|notnivc|subrarr|zigrarr|vzigzag|submult|subedot|Element|between|cirscir|larrbfs|larrsim|lotimes|lbrksld|lbrkslu|lozenge|ldrdhar|dbkarow|bigcirc|epsilon|simrarr|simplus|ltquest|Epsilon|luruhar|gtquest|maltese|npolint|eqcolon|npreceq|bigodot|ddagger|gtrless|bnequiv|harrcir|ddotseq|equivDD|backsim|demptyv|nsqsube|nsqsupe|Upsilon|nsubset|upsilon|minusdu|nsucceq|swarrow|nsupset|coloneq|searrow|boxplus|napprox|natural|asympeq|alefsym|congdot|nearrow|bigstar|diamond|supplus|tritime|LeftTee|nvinfin|triplus|NewLine|nvltrie|nvrtrie|nwarrow|nexists|Diamond|ruluhar|Implies|supmult|angzarr|suplarr|suphsub|questeq|because|digamma|Because|olcross|bemptyv|omicron|Omicron|rotimes|NoBreak|intprod|angrtvb|orderof|uwangle|suphsol|lesdoto|orslope|DownTee|realine|cudarrl|rdldhar|OverBar|supedot|lessdot|supdsub|topfork|succsim|rbrkslu|rbrksld|pertenk|cudarrr|isindot|planckh|lessgtr|pluscir|gesdoto|plussim|plustwo|lesssim|cularrp|rarrsim|Cayleys|notinva|notinvb|notinvc|UpArrow|Uparrow|uparrow|NotLess|dwangle|precsim|Product|curarrm|Cconint|dotplus|rarrbfs|ccupssm|Cedilla|cemptyv|notniva|quatint|frac35|frac38|frac45|frac56|frac58|frac78|tridot|xoplus|gacute|gammad|Gammad|lfisht|lfloor|bigcup|sqsupe|gbreve|Gbreve|lharul|sqsube|sqcups|Gcedil|apacir|llhard|lmidot|Lmidot|lmoust|andand|sqcaps|approx|Abreve|spades|circeq|tprime|divide|topcir|Assign|topbot|gesdot|divonx|xuplus|timesd|gesles|atilde|solbar|SOFTcy|loplus|timesb|lowast|lowbar|dlcorn|dlcrop|softcy|dollar|lparlt|thksim|lrhard|Atilde|lsaquo|smashp|bigvee|thinsp|wreath|bkarow|lsquor|lstrok|Lstrok|lthree|ltimes|ltlarr|DotDot|simdot|ltrPar|weierp|xsqcup|angmsd|sigmav|sigmaf|zeetrf|Zcaron|zcaron|mapsto|vsupne|thetav|cirmid|marker|mcomma|Zacute|vsubnE|there4|gtlPar|vsubne|bottom|gtrarr|SHCHcy|shchcy|midast|midcir|middot|minusb|minusd|gtrdot|bowtie|sfrown|mnplus|models|colone|seswar|Colone|mstpos|searhk|gtrsim|nacute|Nacute|boxbox|telrec|hairsp|Tcedil|nbumpe|scnsim|ncaron|Ncaron|ncedil|Ncedil|hamilt|Scedil|nearhk|hardcy|HARDcy|tcedil|Tcaron|commat|nequiv|nesear|tcaron|target|hearts|nexist|varrho|scedil|Scaron|scaron|hellip|Sacute|sacute|hercon|swnwar|compfn|rtimes|rthree|rsquor|rsaquo|zacute|wedgeq|homtht|barvee|barwed|Barwed|rpargt|horbar|conint|swarhk|roplus|nltrie|hslash|hstrok|Hstrok|rmoust|Conint|bprime|hybull|hyphen|iacute|Iacute|supsup|supsub|supsim|varphi|coprod|brvbar|agrave|Supset|supset|igrave|Igrave|notinE|Agrave|iiiint|iinfin|copysr|wedbar|Verbar|vangrt|becaus|incare|verbar|inodot|bullet|drcorn|intcal|drcrop|cularr|vellip|Utilde|bumpeq|cupcap|dstrok|Dstrok|CupCap|cupcup|cupdot|eacute|Eacute|supdot|iquest|easter|ecaron|Ecaron|ecolon|isinsv|utilde|itilde|Itilde|curarr|succeq|Bumpeq|cacute|ulcrop|nparsl|Cacute|nprcue|egrave|Egrave|nrarrc|nrarrw|subsup|subsub|nrtrie|jsercy|nsccue|Jsercy|kappav|kcedil|Kcedil|subsim|ulcorn|nsimeq|egsdot|veebar|kgreen|capand|elsdot|Subset|subset|curren|aacute|lacute|Lacute|emptyv|ntilde|Ntilde|lagran|lambda|Lambda|capcap|Ugrave|langle|subdot|emsp13|numero|emsp14|nvdash|nvDash|nVdash|nVDash|ugrave|ufisht|nvHarr|larrfs|nvlArr|larrhk|larrlp|larrpl|nvrArr|Udblac|nwarhk|larrtl|nwnear|oacute|Oacute|latail|lAtail|sstarf|lbrace|odblac|Odblac|lbrack|udblac|odsold|eparsl|lcaron|Lcaron|ograve|Ograve|lcedil|Lcedil|Aacute|ssmile|ssetmn|squarf|ldquor|capcup|ominus|cylcty|rharul|eqcirc|dagger|rfloor|rfisht|Dagger|daleth|equals|origof|capdot|equest|dcaron|Dcaron|rdquor|oslash|Oslash|otilde|Otilde|otimes|Otimes|urcrop|Ubreve|ubreve|Yacute|Uacute|uacute|Rcedil|rcedil|urcorn|parsim|Rcaron|Vdashl|rcaron|Tstrok|percnt|period|permil|Exists|yacute|rbrack|rbrace|phmmat|ccaron|Ccaron|planck|ccedil|plankv|tstrok|female|plusdo|plusdu|ffilig|plusmn|ffllig|Ccedil|rAtail|dfisht|bernou|ratail|Rarrtl|rarrtl|angsph|rarrpl|rarrlp|rarrhk|xwedge|xotime|forall|ForAll|Vvdash|vsupnE|preceq|bigcap|frac12|frac13|frac14|primes|rarrfs|prnsim|frac15|Square|frac16|square|lesdot|frac18|frac23|propto|prurel|rarrap|rangle|puncsp|frac25|Racute|qprime|racute|lesges|frac34|abreve|AElig|eqsim|utdot|setmn|urtri|Equal|Uring|seArr|uring|searr|dashv|Dashv|mumap|nabla|iogon|Iogon|sdote|sdotb|scsim|napid|napos|equiv|natur|Acirc|dblac|erarr|nbump|iprod|erDot|ucirc|awint|esdot|angrt|ncong|isinE|scnap|Scirc|scirc|ndash|isins|Ubrcy|nearr|neArr|isinv|nedot|ubrcy|acute|Ycirc|iukcy|Iukcy|xutri|nesim|caret|jcirc|Jcirc|caron|twixt|ddarr|sccue|exist|jmath|sbquo|ngeqq|angst|ccaps|lceil|ngsim|UpTee|delta|Delta|rtrif|nharr|nhArr|nhpar|rtrie|jukcy|Jukcy|kappa|rsquo|Kappa|nlarr|nlArr|TSHcy|rrarr|aogon|Aogon|fflig|xrarr|tshcy|ccirc|nleqq|filig|upsih|nless|dharl|nlsim|fjlig|ropar|nltri|dharr|robrk|roarr|fllig|fltns|roang|rnmid|subnE|subne|lAarr|trisb|Ccirc|acirc|ccups|blank|VDash|forkv|Vdash|langd|cedil|blk12|blk14|laquo|strns|diams|notin|vDash|larrb|blk34|block|disin|uplus|vdash|vBarv|aelig|starf|Wedge|check|xrArr|lates|lbarr|lBarr|notni|lbbrk|bcong|frasl|lbrke|frown|vrtri|vprop|vnsup|gamma|Gamma|wedge|xodot|bdquo|srarr|doteq|ldquo|boxdl|boxdL|gcirc|Gcirc|boxDl|boxDL|boxdr|boxdR|boxDr|TRADE|trade|rlhar|boxDR|vnsub|npart|vltri|rlarr|boxhd|boxhD|nprec|gescc|nrarr|nrArr|boxHd|boxHD|boxhu|boxhU|nrtri|boxHu|clubs|boxHU|times|colon|Colon|gimel|xlArr|Tilde|nsime|tilde|nsmid|nspar|THORN|thorn|xlarr|nsube|nsubE|thkap|xhArr|comma|nsucc|boxul|boxuL|nsupe|nsupE|gneqq|gnsim|boxUl|boxUL|grave|boxur|boxuR|boxUr|boxUR|lescc|angle|bepsi|boxvh|varpi|boxvH|numsp|Theta|gsime|gsiml|theta|boxVh|boxVH|boxvl|gtcir|gtdot|boxvL|boxVl|boxVL|crarr|cross|Cross|nvsim|boxvr|nwarr|nwArr|sqsup|dtdot|Uogon|lhard|lharu|dtrif|ocirc|Ocirc|lhblk|duarr|odash|sqsub|Hacek|sqcup|llarr|duhar|oelig|OElig|ofcir|boxvR|uogon|lltri|boxVr|csube|uuarr|ohbar|csupe|ctdot|olarr|olcir|harrw|oline|sqcap|omacr|Omacr|omega|Omega|boxVR|aleph|lneqq|lnsim|loang|loarr|rharu|lobrk|hcirc|operp|oplus|rhard|Hcirc|orarr|Union|order|ecirc|Ecirc|cuepr|szlig|cuesc|breve|reals|eDDot|Breve|hoarr|lopar|utrif|rdquo|Umacr|umacr|efDot|swArr|ultri|alpha|rceil|ovbar|swarr|Wcirc|wcirc|smtes|smile|bsemi|lrarr|aring|parsl|lrhar|bsime|uhblk|lrtri|cupor|Aring|uharr|uharl|slarr|rbrke|bsolb|lsime|rbbrk|RBarr|lsimg|phone|rBarr|rbarr|icirc|lsquo|Icirc|emacr|Emacr|ratio|simne|plusb|simlE|simgE|simeq|pluse|ltcir|ltdot|empty|xharr|xdtri|iexcl|Alpha|ltrie|rarrw|pound|ltrif|xcirc|bumpe|prcue|bumpE|asymp|amacr|cuvee|Sigma|sigma|iiint|udhar|iiota|ijlig|IJlig|supnE|imacr|Imacr|prime|Prime|image|prnap|eogon|Eogon|rarrc|mdash|mDDot|cuwed|imath|supne|imped|Amacr|udarr|prsim|micro|rarrb|cwint|raquo|infin|eplus|range|rangd|Ucirc|radic|minus|amalg|veeeq|rAarr|epsiv|ycirc|quest|sharp|quot|zwnj|Qscr|race|qscr|Qopf|qopf|qint|rang|Rang|Zscr|zscr|Zopf|zopf|rarr|rArr|Rarr|Pscr|pscr|prop|prod|prnE|prec|ZHcy|zhcy|prap|Zeta|zeta|Popf|popf|Zdot|plus|zdot|Yuml|yuml|phiv|YUcy|yucy|Yscr|yscr|perp|Yopf|yopf|part|para|YIcy|Ouml|rcub|yicy|YAcy|rdca|ouml|osol|Oscr|rdsh|yacy|real|oscr|xvee|andd|rect|andv|Xscr|oror|ordm|ordf|xscr|ange|aopf|Aopf|rHar|Xopf|opar|Oopf|xopf|xnis|rhov|oopf|omid|xmap|oint|apid|apos|ogon|ascr|Ascr|odot|odiv|xcup|xcap|ocir|oast|nvlt|nvle|nvgt|nvge|nvap|Wscr|wscr|auml|ntlg|ntgl|nsup|nsub|nsim|Nscr|nscr|nsce|Wopf|ring|npre|wopf|npar|Auml|Barv|bbrk|Nopf|nopf|nmid|nLtv|beta|ropf|Ropf|Beta|beth|nles|rpar|nleq|bnot|bNot|nldr|NJcy|rscr|Rscr|Vscr|vscr|rsqb|njcy|bopf|nisd|Bopf|rtri|Vopf|nGtv|ngtr|vopf|boxh|boxH|boxv|nges|ngeq|boxV|bscr|scap|Bscr|bsim|Vert|vert|bsol|bull|bump|caps|cdot|ncup|scnE|ncap|nbsp|napE|Cdot|cent|sdot|Vbar|nang|vBar|chcy|Mscr|mscr|sect|semi|CHcy|Mopf|mopf|sext|circ|cire|mldr|mlcp|cirE|comp|shcy|SHcy|vArr|varr|cong|copf|Copf|copy|COPY|malt|male|macr|lvnE|cscr|ltri|sime|ltcc|simg|Cscr|siml|csub|Uuml|lsqb|lsim|uuml|csup|Lscr|lscr|utri|smid|lpar|cups|smte|lozf|darr|Lopf|Uscr|solb|lopf|sopf|Sopf|lneq|uscr|spar|dArr|lnap|Darr|dash|Sqrt|LJcy|ljcy|lHar|dHar|Upsi|upsi|diam|lesg|djcy|DJcy|leqq|dopf|Dopf|dscr|Dscr|dscy|ldsh|ldca|squf|DScy|sscr|Sscr|dsol|lcub|late|star|Star|Uopf|Larr|lArr|larr|uopf|dtri|dzcy|sube|subE|Lang|lang|Kscr|kscr|Kopf|kopf|KJcy|kjcy|KHcy|khcy|DZcy|ecir|edot|eDot|Jscr|jscr|succ|Jopf|jopf|Edot|uHar|emsp|ensp|Iuml|iuml|eopf|isin|Iscr|iscr|Eopf|epar|sung|epsi|escr|sup1|sup2|sup3|Iota|iota|supe|supE|Iopf|iopf|IOcy|iocy|Escr|esim|Esim|imof|Uarr|QUOT|uArr|uarr|euml|IEcy|iecy|Idot|Euml|euro|excl|Hscr|hscr|Hopf|hopf|TScy|tscy|Tscr|hbar|tscr|flat|tbrk|fnof|hArr|harr|half|fopf|Fopf|tdot|gvnE|fork|trie|gtcc|fscr|Fscr|gdot|gsim|Gscr|gscr|Gopf|gopf|gneq|Gdot|tosa|gnap|Topf|topf|geqq|toea|GJcy|gjcy|tint|gesl|mid|Sfr|ggg|top|ges|gla|glE|glj|geq|gne|gEl|gel|gnE|Gcy|gcy|gap|Tfr|tfr|Tcy|tcy|Hat|Tau|Ffr|tau|Tab|hfr|Hfr|ffr|Fcy|fcy|icy|Icy|iff|ETH|eth|ifr|Ifr|Eta|eta|int|Int|Sup|sup|ucy|Ucy|Sum|sum|jcy|ENG|ufr|Ufr|eng|Jcy|jfr|els|ell|egs|Efr|efr|Jfr|uml|kcy|Kcy|Ecy|ecy|kfr|Kfr|lap|Sub|sub|lat|lcy|Lcy|leg|Dot|dot|lEg|leq|les|squ|div|die|lfr|Lfr|lgE|Dfr|dfr|Del|deg|Dcy|dcy|lne|lnE|sol|loz|smt|Cup|lrm|cup|lsh|Lsh|sim|shy|map|Map|mcy|Mcy|mfr|Mfr|mho|gfr|Gfr|sfr|cir|Chi|chi|nap|Cfr|vcy|Vcy|cfr|Scy|scy|ncy|Ncy|vee|Vee|Cap|cap|nfr|scE|sce|Nfr|nge|ngE|nGg|vfr|Vfr|ngt|bot|nGt|nis|niv|Rsh|rsh|nle|nlE|bne|Bfr|bfr|nLl|nlt|nLt|Bcy|bcy|not|Not|rlm|wfr|Wfr|npr|nsc|num|ocy|ast|Ocy|ofr|xfr|Xfr|Ofr|ogt|ohm|apE|olt|Rho|ape|rho|Rfr|rfr|ord|REG|ang|reg|orv|And|and|AMP|Rcy|amp|Afr|ycy|Ycy|yen|yfr|Yfr|rcy|par|pcy|Pcy|pfr|Pfr|phi|Phi|afr|Acy|acy|zcy|Zcy|piv|acE|acd|zfr|Zfr|pre|prE|psi|Psi|qfr|Qfr|zwj|Or|ge|Gg|gt|gg|el|oS|lt|Lt|LT|Re|lg|gl|eg|ne|Im|it|le|DD|wp|wr|nu|Nu|dd|lE|Sc|sc|pi|Pi|ee|af|ll|Ll|rx|gE|xi|pm|Xi|ic|pr|Pr|in|ni|mp|mu|ac|Mu|or|ap|Gt|GT|ii);|&(Aacute|Agrave|Atilde|Ccedil|Eacute|Egrave|Iacute|Igrave|Ntilde|Oacute|Ograve|Oslash|Otilde|Uacute|Ugrave|Yacute|aacute|agrave|atilde|brvbar|ccedil|curren|divide|eacute|egrave|frac12|frac14|frac34|iacute|igrave|iquest|middot|ntilde|oacute|ograve|oslash|otilde|plusmn|uacute|ugrave|yacute|AElig|Acirc|Aring|Ecirc|Icirc|Ocirc|THORN|Ucirc|acirc|acute|aelig|aring|cedil|ecirc|icirc|iexcl|laquo|micro|ocirc|pound|raquo|szlig|thorn|times|ucirc|Auml|COPY|Euml|Iuml|Ouml|QUOT|Uuml|auml|cent|copy|euml|iuml|macr|nbsp|ordf|ordm|ouml|para|quot|sect|sup1|sup2|sup3|uuml|yuml|AMP|ETH|REG|amp|deg|eth|not|reg|shy|uml|yen|GT|LT|gt|lt)(?!;)([=a-zA-Z0-9]?)|&#([0-9]+)(;?)|&#[xX]([a-fA-F0-9]+)(;?)|&([0-9a-zA-Z]+)/g; - var decodeMap = {'aacute':'\xE1','Aacute':'\xC1','abreve':'\u0103','Abreve':'\u0102','ac':'\u223E','acd':'\u223F','acE':'\u223E\u0333','acirc':'\xE2','Acirc':'\xC2','acute':'\xB4','acy':'\u0430','Acy':'\u0410','aelig':'\xE6','AElig':'\xC6','af':'\u2061','afr':'\uD835\uDD1E','Afr':'\uD835\uDD04','agrave':'\xE0','Agrave':'\xC0','alefsym':'\u2135','aleph':'\u2135','alpha':'\u03B1','Alpha':'\u0391','amacr':'\u0101','Amacr':'\u0100','amalg':'\u2A3F','amp':'&','AMP':'&','and':'\u2227','And':'\u2A53','andand':'\u2A55','andd':'\u2A5C','andslope':'\u2A58','andv':'\u2A5A','ang':'\u2220','ange':'\u29A4','angle':'\u2220','angmsd':'\u2221','angmsdaa':'\u29A8','angmsdab':'\u29A9','angmsdac':'\u29AA','angmsdad':'\u29AB','angmsdae':'\u29AC','angmsdaf':'\u29AD','angmsdag':'\u29AE','angmsdah':'\u29AF','angrt':'\u221F','angrtvb':'\u22BE','angrtvbd':'\u299D','angsph':'\u2222','angst':'\xC5','angzarr':'\u237C','aogon':'\u0105','Aogon':'\u0104','aopf':'\uD835\uDD52','Aopf':'\uD835\uDD38','ap':'\u2248','apacir':'\u2A6F','ape':'\u224A','apE':'\u2A70','apid':'\u224B','apos':'\'','ApplyFunction':'\u2061','approx':'\u2248','approxeq':'\u224A','aring':'\xE5','Aring':'\xC5','ascr':'\uD835\uDCB6','Ascr':'\uD835\uDC9C','Assign':'\u2254','ast':'*','asymp':'\u2248','asympeq':'\u224D','atilde':'\xE3','Atilde':'\xC3','auml':'\xE4','Auml':'\xC4','awconint':'\u2233','awint':'\u2A11','backcong':'\u224C','backepsilon':'\u03F6','backprime':'\u2035','backsim':'\u223D','backsimeq':'\u22CD','Backslash':'\u2216','Barv':'\u2AE7','barvee':'\u22BD','barwed':'\u2305','Barwed':'\u2306','barwedge':'\u2305','bbrk':'\u23B5','bbrktbrk':'\u23B6','bcong':'\u224C','bcy':'\u0431','Bcy':'\u0411','bdquo':'\u201E','becaus':'\u2235','because':'\u2235','Because':'\u2235','bemptyv':'\u29B0','bepsi':'\u03F6','bernou':'\u212C','Bernoullis':'\u212C','beta':'\u03B2','Beta':'\u0392','beth':'\u2136','between':'\u226C','bfr':'\uD835\uDD1F','Bfr':'\uD835\uDD05','bigcap':'\u22C2','bigcirc':'\u25EF','bigcup':'\u22C3','bigodot':'\u2A00','bigoplus':'\u2A01','bigotimes':'\u2A02','bigsqcup':'\u2A06','bigstar':'\u2605','bigtriangledown':'\u25BD','bigtriangleup':'\u25B3','biguplus':'\u2A04','bigvee':'\u22C1','bigwedge':'\u22C0','bkarow':'\u290D','blacklozenge':'\u29EB','blacksquare':'\u25AA','blacktriangle':'\u25B4','blacktriangledown':'\u25BE','blacktriangleleft':'\u25C2','blacktriangleright':'\u25B8','blank':'\u2423','blk12':'\u2592','blk14':'\u2591','blk34':'\u2593','block':'\u2588','bne':'=\u20E5','bnequiv':'\u2261\u20E5','bnot':'\u2310','bNot':'\u2AED','bopf':'\uD835\uDD53','Bopf':'\uD835\uDD39','bot':'\u22A5','bottom':'\u22A5','bowtie':'\u22C8','boxbox':'\u29C9','boxdl':'\u2510','boxdL':'\u2555','boxDl':'\u2556','boxDL':'\u2557','boxdr':'\u250C','boxdR':'\u2552','boxDr':'\u2553','boxDR':'\u2554','boxh':'\u2500','boxH':'\u2550','boxhd':'\u252C','boxhD':'\u2565','boxHd':'\u2564','boxHD':'\u2566','boxhu':'\u2534','boxhU':'\u2568','boxHu':'\u2567','boxHU':'\u2569','boxminus':'\u229F','boxplus':'\u229E','boxtimes':'\u22A0','boxul':'\u2518','boxuL':'\u255B','boxUl':'\u255C','boxUL':'\u255D','boxur':'\u2514','boxuR':'\u2558','boxUr':'\u2559','boxUR':'\u255A','boxv':'\u2502','boxV':'\u2551','boxvh':'\u253C','boxvH':'\u256A','boxVh':'\u256B','boxVH':'\u256C','boxvl':'\u2524','boxvL':'\u2561','boxVl':'\u2562','boxVL':'\u2563','boxvr':'\u251C','boxvR':'\u255E','boxVr':'\u255F','boxVR':'\u2560','bprime':'\u2035','breve':'\u02D8','Breve':'\u02D8','brvbar':'\xA6','bscr':'\uD835\uDCB7','Bscr':'\u212C','bsemi':'\u204F','bsim':'\u223D','bsime':'\u22CD','bsol':'\\','bsolb':'\u29C5','bsolhsub':'\u27C8','bull':'\u2022','bullet':'\u2022','bump':'\u224E','bumpe':'\u224F','bumpE':'\u2AAE','bumpeq':'\u224F','Bumpeq':'\u224E','cacute':'\u0107','Cacute':'\u0106','cap':'\u2229','Cap':'\u22D2','capand':'\u2A44','capbrcup':'\u2A49','capcap':'\u2A4B','capcup':'\u2A47','capdot':'\u2A40','CapitalDifferentialD':'\u2145','caps':'\u2229\uFE00','caret':'\u2041','caron':'\u02C7','Cayleys':'\u212D','ccaps':'\u2A4D','ccaron':'\u010D','Ccaron':'\u010C','ccedil':'\xE7','Ccedil':'\xC7','ccirc':'\u0109','Ccirc':'\u0108','Cconint':'\u2230','ccups':'\u2A4C','ccupssm':'\u2A50','cdot':'\u010B','Cdot':'\u010A','cedil':'\xB8','Cedilla':'\xB8','cemptyv':'\u29B2','cent':'\xA2','centerdot':'\xB7','CenterDot':'\xB7','cfr':'\uD835\uDD20','Cfr':'\u212D','chcy':'\u0447','CHcy':'\u0427','check':'\u2713','checkmark':'\u2713','chi':'\u03C7','Chi':'\u03A7','cir':'\u25CB','circ':'\u02C6','circeq':'\u2257','circlearrowleft':'\u21BA','circlearrowright':'\u21BB','circledast':'\u229B','circledcirc':'\u229A','circleddash':'\u229D','CircleDot':'\u2299','circledR':'\xAE','circledS':'\u24C8','CircleMinus':'\u2296','CirclePlus':'\u2295','CircleTimes':'\u2297','cire':'\u2257','cirE':'\u29C3','cirfnint':'\u2A10','cirmid':'\u2AEF','cirscir':'\u29C2','ClockwiseContourIntegral':'\u2232','CloseCurlyDoubleQuote':'\u201D','CloseCurlyQuote':'\u2019','clubs':'\u2663','clubsuit':'\u2663','colon':':','Colon':'\u2237','colone':'\u2254','Colone':'\u2A74','coloneq':'\u2254','comma':',','commat':'@','comp':'\u2201','compfn':'\u2218','complement':'\u2201','complexes':'\u2102','cong':'\u2245','congdot':'\u2A6D','Congruent':'\u2261','conint':'\u222E','Conint':'\u222F','ContourIntegral':'\u222E','copf':'\uD835\uDD54','Copf':'\u2102','coprod':'\u2210','Coproduct':'\u2210','copy':'\xA9','COPY':'\xA9','copysr':'\u2117','CounterClockwiseContourIntegral':'\u2233','crarr':'\u21B5','cross':'\u2717','Cross':'\u2A2F','cscr':'\uD835\uDCB8','Cscr':'\uD835\uDC9E','csub':'\u2ACF','csube':'\u2AD1','csup':'\u2AD0','csupe':'\u2AD2','ctdot':'\u22EF','cudarrl':'\u2938','cudarrr':'\u2935','cuepr':'\u22DE','cuesc':'\u22DF','cularr':'\u21B6','cularrp':'\u293D','cup':'\u222A','Cup':'\u22D3','cupbrcap':'\u2A48','cupcap':'\u2A46','CupCap':'\u224D','cupcup':'\u2A4A','cupdot':'\u228D','cupor':'\u2A45','cups':'\u222A\uFE00','curarr':'\u21B7','curarrm':'\u293C','curlyeqprec':'\u22DE','curlyeqsucc':'\u22DF','curlyvee':'\u22CE','curlywedge':'\u22CF','curren':'\xA4','curvearrowleft':'\u21B6','curvearrowright':'\u21B7','cuvee':'\u22CE','cuwed':'\u22CF','cwconint':'\u2232','cwint':'\u2231','cylcty':'\u232D','dagger':'\u2020','Dagger':'\u2021','daleth':'\u2138','darr':'\u2193','dArr':'\u21D3','Darr':'\u21A1','dash':'\u2010','dashv':'\u22A3','Dashv':'\u2AE4','dbkarow':'\u290F','dblac':'\u02DD','dcaron':'\u010F','Dcaron':'\u010E','dcy':'\u0434','Dcy':'\u0414','dd':'\u2146','DD':'\u2145','ddagger':'\u2021','ddarr':'\u21CA','DDotrahd':'\u2911','ddotseq':'\u2A77','deg':'\xB0','Del':'\u2207','delta':'\u03B4','Delta':'\u0394','demptyv':'\u29B1','dfisht':'\u297F','dfr':'\uD835\uDD21','Dfr':'\uD835\uDD07','dHar':'\u2965','dharl':'\u21C3','dharr':'\u21C2','DiacriticalAcute':'\xB4','DiacriticalDot':'\u02D9','DiacriticalDoubleAcute':'\u02DD','DiacriticalGrave':'`','DiacriticalTilde':'\u02DC','diam':'\u22C4','diamond':'\u22C4','Diamond':'\u22C4','diamondsuit':'\u2666','diams':'\u2666','die':'\xA8','DifferentialD':'\u2146','digamma':'\u03DD','disin':'\u22F2','div':'\xF7','divide':'\xF7','divideontimes':'\u22C7','divonx':'\u22C7','djcy':'\u0452','DJcy':'\u0402','dlcorn':'\u231E','dlcrop':'\u230D','dollar':'$','dopf':'\uD835\uDD55','Dopf':'\uD835\uDD3B','dot':'\u02D9','Dot':'\xA8','DotDot':'\u20DC','doteq':'\u2250','doteqdot':'\u2251','DotEqual':'\u2250','dotminus':'\u2238','dotplus':'\u2214','dotsquare':'\u22A1','doublebarwedge':'\u2306','DoubleContourIntegral':'\u222F','DoubleDot':'\xA8','DoubleDownArrow':'\u21D3','DoubleLeftArrow':'\u21D0','DoubleLeftRightArrow':'\u21D4','DoubleLeftTee':'\u2AE4','DoubleLongLeftArrow':'\u27F8','DoubleLongLeftRightArrow':'\u27FA','DoubleLongRightArrow':'\u27F9','DoubleRightArrow':'\u21D2','DoubleRightTee':'\u22A8','DoubleUpArrow':'\u21D1','DoubleUpDownArrow':'\u21D5','DoubleVerticalBar':'\u2225','downarrow':'\u2193','Downarrow':'\u21D3','DownArrow':'\u2193','DownArrowBar':'\u2913','DownArrowUpArrow':'\u21F5','DownBreve':'\u0311','downdownarrows':'\u21CA','downharpoonleft':'\u21C3','downharpoonright':'\u21C2','DownLeftRightVector':'\u2950','DownLeftTeeVector':'\u295E','DownLeftVector':'\u21BD','DownLeftVectorBar':'\u2956','DownRightTeeVector':'\u295F','DownRightVector':'\u21C1','DownRightVectorBar':'\u2957','DownTee':'\u22A4','DownTeeArrow':'\u21A7','drbkarow':'\u2910','drcorn':'\u231F','drcrop':'\u230C','dscr':'\uD835\uDCB9','Dscr':'\uD835\uDC9F','dscy':'\u0455','DScy':'\u0405','dsol':'\u29F6','dstrok':'\u0111','Dstrok':'\u0110','dtdot':'\u22F1','dtri':'\u25BF','dtrif':'\u25BE','duarr':'\u21F5','duhar':'\u296F','dwangle':'\u29A6','dzcy':'\u045F','DZcy':'\u040F','dzigrarr':'\u27FF','eacute':'\xE9','Eacute':'\xC9','easter':'\u2A6E','ecaron':'\u011B','Ecaron':'\u011A','ecir':'\u2256','ecirc':'\xEA','Ecirc':'\xCA','ecolon':'\u2255','ecy':'\u044D','Ecy':'\u042D','eDDot':'\u2A77','edot':'\u0117','eDot':'\u2251','Edot':'\u0116','ee':'\u2147','efDot':'\u2252','efr':'\uD835\uDD22','Efr':'\uD835\uDD08','eg':'\u2A9A','egrave':'\xE8','Egrave':'\xC8','egs':'\u2A96','egsdot':'\u2A98','el':'\u2A99','Element':'\u2208','elinters':'\u23E7','ell':'\u2113','els':'\u2A95','elsdot':'\u2A97','emacr':'\u0113','Emacr':'\u0112','empty':'\u2205','emptyset':'\u2205','EmptySmallSquare':'\u25FB','emptyv':'\u2205','EmptyVerySmallSquare':'\u25AB','emsp':'\u2003','emsp13':'\u2004','emsp14':'\u2005','eng':'\u014B','ENG':'\u014A','ensp':'\u2002','eogon':'\u0119','Eogon':'\u0118','eopf':'\uD835\uDD56','Eopf':'\uD835\uDD3C','epar':'\u22D5','eparsl':'\u29E3','eplus':'\u2A71','epsi':'\u03B5','epsilon':'\u03B5','Epsilon':'\u0395','epsiv':'\u03F5','eqcirc':'\u2256','eqcolon':'\u2255','eqsim':'\u2242','eqslantgtr':'\u2A96','eqslantless':'\u2A95','Equal':'\u2A75','equals':'=','EqualTilde':'\u2242','equest':'\u225F','Equilibrium':'\u21CC','equiv':'\u2261','equivDD':'\u2A78','eqvparsl':'\u29E5','erarr':'\u2971','erDot':'\u2253','escr':'\u212F','Escr':'\u2130','esdot':'\u2250','esim':'\u2242','Esim':'\u2A73','eta':'\u03B7','Eta':'\u0397','eth':'\xF0','ETH':'\xD0','euml':'\xEB','Euml':'\xCB','euro':'\u20AC','excl':'!','exist':'\u2203','Exists':'\u2203','expectation':'\u2130','exponentiale':'\u2147','ExponentialE':'\u2147','fallingdotseq':'\u2252','fcy':'\u0444','Fcy':'\u0424','female':'\u2640','ffilig':'\uFB03','fflig':'\uFB00','ffllig':'\uFB04','ffr':'\uD835\uDD23','Ffr':'\uD835\uDD09','filig':'\uFB01','FilledSmallSquare':'\u25FC','FilledVerySmallSquare':'\u25AA','fjlig':'fj','flat':'\u266D','fllig':'\uFB02','fltns':'\u25B1','fnof':'\u0192','fopf':'\uD835\uDD57','Fopf':'\uD835\uDD3D','forall':'\u2200','ForAll':'\u2200','fork':'\u22D4','forkv':'\u2AD9','Fouriertrf':'\u2131','fpartint':'\u2A0D','frac12':'\xBD','frac13':'\u2153','frac14':'\xBC','frac15':'\u2155','frac16':'\u2159','frac18':'\u215B','frac23':'\u2154','frac25':'\u2156','frac34':'\xBE','frac35':'\u2157','frac38':'\u215C','frac45':'\u2158','frac56':'\u215A','frac58':'\u215D','frac78':'\u215E','frasl':'\u2044','frown':'\u2322','fscr':'\uD835\uDCBB','Fscr':'\u2131','gacute':'\u01F5','gamma':'\u03B3','Gamma':'\u0393','gammad':'\u03DD','Gammad':'\u03DC','gap':'\u2A86','gbreve':'\u011F','Gbreve':'\u011E','Gcedil':'\u0122','gcirc':'\u011D','Gcirc':'\u011C','gcy':'\u0433','Gcy':'\u0413','gdot':'\u0121','Gdot':'\u0120','ge':'\u2265','gE':'\u2267','gel':'\u22DB','gEl':'\u2A8C','geq':'\u2265','geqq':'\u2267','geqslant':'\u2A7E','ges':'\u2A7E','gescc':'\u2AA9','gesdot':'\u2A80','gesdoto':'\u2A82','gesdotol':'\u2A84','gesl':'\u22DB\uFE00','gesles':'\u2A94','gfr':'\uD835\uDD24','Gfr':'\uD835\uDD0A','gg':'\u226B','Gg':'\u22D9','ggg':'\u22D9','gimel':'\u2137','gjcy':'\u0453','GJcy':'\u0403','gl':'\u2277','gla':'\u2AA5','glE':'\u2A92','glj':'\u2AA4','gnap':'\u2A8A','gnapprox':'\u2A8A','gne':'\u2A88','gnE':'\u2269','gneq':'\u2A88','gneqq':'\u2269','gnsim':'\u22E7','gopf':'\uD835\uDD58','Gopf':'\uD835\uDD3E','grave':'`','GreaterEqual':'\u2265','GreaterEqualLess':'\u22DB','GreaterFullEqual':'\u2267','GreaterGreater':'\u2AA2','GreaterLess':'\u2277','GreaterSlantEqual':'\u2A7E','GreaterTilde':'\u2273','gscr':'\u210A','Gscr':'\uD835\uDCA2','gsim':'\u2273','gsime':'\u2A8E','gsiml':'\u2A90','gt':'>','Gt':'\u226B','GT':'>','gtcc':'\u2AA7','gtcir':'\u2A7A','gtdot':'\u22D7','gtlPar':'\u2995','gtquest':'\u2A7C','gtrapprox':'\u2A86','gtrarr':'\u2978','gtrdot':'\u22D7','gtreqless':'\u22DB','gtreqqless':'\u2A8C','gtrless':'\u2277','gtrsim':'\u2273','gvertneqq':'\u2269\uFE00','gvnE':'\u2269\uFE00','Hacek':'\u02C7','hairsp':'\u200A','half':'\xBD','hamilt':'\u210B','hardcy':'\u044A','HARDcy':'\u042A','harr':'\u2194','hArr':'\u21D4','harrcir':'\u2948','harrw':'\u21AD','Hat':'^','hbar':'\u210F','hcirc':'\u0125','Hcirc':'\u0124','hearts':'\u2665','heartsuit':'\u2665','hellip':'\u2026','hercon':'\u22B9','hfr':'\uD835\uDD25','Hfr':'\u210C','HilbertSpace':'\u210B','hksearow':'\u2925','hkswarow':'\u2926','hoarr':'\u21FF','homtht':'\u223B','hookleftarrow':'\u21A9','hookrightarrow':'\u21AA','hopf':'\uD835\uDD59','Hopf':'\u210D','horbar':'\u2015','HorizontalLine':'\u2500','hscr':'\uD835\uDCBD','Hscr':'\u210B','hslash':'\u210F','hstrok':'\u0127','Hstrok':'\u0126','HumpDownHump':'\u224E','HumpEqual':'\u224F','hybull':'\u2043','hyphen':'\u2010','iacute':'\xED','Iacute':'\xCD','ic':'\u2063','icirc':'\xEE','Icirc':'\xCE','icy':'\u0438','Icy':'\u0418','Idot':'\u0130','iecy':'\u0435','IEcy':'\u0415','iexcl':'\xA1','iff':'\u21D4','ifr':'\uD835\uDD26','Ifr':'\u2111','igrave':'\xEC','Igrave':'\xCC','ii':'\u2148','iiiint':'\u2A0C','iiint':'\u222D','iinfin':'\u29DC','iiota':'\u2129','ijlig':'\u0133','IJlig':'\u0132','Im':'\u2111','imacr':'\u012B','Imacr':'\u012A','image':'\u2111','ImaginaryI':'\u2148','imagline':'\u2110','imagpart':'\u2111','imath':'\u0131','imof':'\u22B7','imped':'\u01B5','Implies':'\u21D2','in':'\u2208','incare':'\u2105','infin':'\u221E','infintie':'\u29DD','inodot':'\u0131','int':'\u222B','Int':'\u222C','intcal':'\u22BA','integers':'\u2124','Integral':'\u222B','intercal':'\u22BA','Intersection':'\u22C2','intlarhk':'\u2A17','intprod':'\u2A3C','InvisibleComma':'\u2063','InvisibleTimes':'\u2062','iocy':'\u0451','IOcy':'\u0401','iogon':'\u012F','Iogon':'\u012E','iopf':'\uD835\uDD5A','Iopf':'\uD835\uDD40','iota':'\u03B9','Iota':'\u0399','iprod':'\u2A3C','iquest':'\xBF','iscr':'\uD835\uDCBE','Iscr':'\u2110','isin':'\u2208','isindot':'\u22F5','isinE':'\u22F9','isins':'\u22F4','isinsv':'\u22F3','isinv':'\u2208','it':'\u2062','itilde':'\u0129','Itilde':'\u0128','iukcy':'\u0456','Iukcy':'\u0406','iuml':'\xEF','Iuml':'\xCF','jcirc':'\u0135','Jcirc':'\u0134','jcy':'\u0439','Jcy':'\u0419','jfr':'\uD835\uDD27','Jfr':'\uD835\uDD0D','jmath':'\u0237','jopf':'\uD835\uDD5B','Jopf':'\uD835\uDD41','jscr':'\uD835\uDCBF','Jscr':'\uD835\uDCA5','jsercy':'\u0458','Jsercy':'\u0408','jukcy':'\u0454','Jukcy':'\u0404','kappa':'\u03BA','Kappa':'\u039A','kappav':'\u03F0','kcedil':'\u0137','Kcedil':'\u0136','kcy':'\u043A','Kcy':'\u041A','kfr':'\uD835\uDD28','Kfr':'\uD835\uDD0E','kgreen':'\u0138','khcy':'\u0445','KHcy':'\u0425','kjcy':'\u045C','KJcy':'\u040C','kopf':'\uD835\uDD5C','Kopf':'\uD835\uDD42','kscr':'\uD835\uDCC0','Kscr':'\uD835\uDCA6','lAarr':'\u21DA','lacute':'\u013A','Lacute':'\u0139','laemptyv':'\u29B4','lagran':'\u2112','lambda':'\u03BB','Lambda':'\u039B','lang':'\u27E8','Lang':'\u27EA','langd':'\u2991','langle':'\u27E8','lap':'\u2A85','Laplacetrf':'\u2112','laquo':'\xAB','larr':'\u2190','lArr':'\u21D0','Larr':'\u219E','larrb':'\u21E4','larrbfs':'\u291F','larrfs':'\u291D','larrhk':'\u21A9','larrlp':'\u21AB','larrpl':'\u2939','larrsim':'\u2973','larrtl':'\u21A2','lat':'\u2AAB','latail':'\u2919','lAtail':'\u291B','late':'\u2AAD','lates':'\u2AAD\uFE00','lbarr':'\u290C','lBarr':'\u290E','lbbrk':'\u2772','lbrace':'{','lbrack':'[','lbrke':'\u298B','lbrksld':'\u298F','lbrkslu':'\u298D','lcaron':'\u013E','Lcaron':'\u013D','lcedil':'\u013C','Lcedil':'\u013B','lceil':'\u2308','lcub':'{','lcy':'\u043B','Lcy':'\u041B','ldca':'\u2936','ldquo':'\u201C','ldquor':'\u201E','ldrdhar':'\u2967','ldrushar':'\u294B','ldsh':'\u21B2','le':'\u2264','lE':'\u2266','LeftAngleBracket':'\u27E8','leftarrow':'\u2190','Leftarrow':'\u21D0','LeftArrow':'\u2190','LeftArrowBar':'\u21E4','LeftArrowRightArrow':'\u21C6','leftarrowtail':'\u21A2','LeftCeiling':'\u2308','LeftDoubleBracket':'\u27E6','LeftDownTeeVector':'\u2961','LeftDownVector':'\u21C3','LeftDownVectorBar':'\u2959','LeftFloor':'\u230A','leftharpoondown':'\u21BD','leftharpoonup':'\u21BC','leftleftarrows':'\u21C7','leftrightarrow':'\u2194','Leftrightarrow':'\u21D4','LeftRightArrow':'\u2194','leftrightarrows':'\u21C6','leftrightharpoons':'\u21CB','leftrightsquigarrow':'\u21AD','LeftRightVector':'\u294E','LeftTee':'\u22A3','LeftTeeArrow':'\u21A4','LeftTeeVector':'\u295A','leftthreetimes':'\u22CB','LeftTriangle':'\u22B2','LeftTriangleBar':'\u29CF','LeftTriangleEqual':'\u22B4','LeftUpDownVector':'\u2951','LeftUpTeeVector':'\u2960','LeftUpVector':'\u21BF','LeftUpVectorBar':'\u2958','LeftVector':'\u21BC','LeftVectorBar':'\u2952','leg':'\u22DA','lEg':'\u2A8B','leq':'\u2264','leqq':'\u2266','leqslant':'\u2A7D','les':'\u2A7D','lescc':'\u2AA8','lesdot':'\u2A7F','lesdoto':'\u2A81','lesdotor':'\u2A83','lesg':'\u22DA\uFE00','lesges':'\u2A93','lessapprox':'\u2A85','lessdot':'\u22D6','lesseqgtr':'\u22DA','lesseqqgtr':'\u2A8B','LessEqualGreater':'\u22DA','LessFullEqual':'\u2266','LessGreater':'\u2276','lessgtr':'\u2276','LessLess':'\u2AA1','lesssim':'\u2272','LessSlantEqual':'\u2A7D','LessTilde':'\u2272','lfisht':'\u297C','lfloor':'\u230A','lfr':'\uD835\uDD29','Lfr':'\uD835\uDD0F','lg':'\u2276','lgE':'\u2A91','lHar':'\u2962','lhard':'\u21BD','lharu':'\u21BC','lharul':'\u296A','lhblk':'\u2584','ljcy':'\u0459','LJcy':'\u0409','ll':'\u226A','Ll':'\u22D8','llarr':'\u21C7','llcorner':'\u231E','Lleftarrow':'\u21DA','llhard':'\u296B','lltri':'\u25FA','lmidot':'\u0140','Lmidot':'\u013F','lmoust':'\u23B0','lmoustache':'\u23B0','lnap':'\u2A89','lnapprox':'\u2A89','lne':'\u2A87','lnE':'\u2268','lneq':'\u2A87','lneqq':'\u2268','lnsim':'\u22E6','loang':'\u27EC','loarr':'\u21FD','lobrk':'\u27E6','longleftarrow':'\u27F5','Longleftarrow':'\u27F8','LongLeftArrow':'\u27F5','longleftrightarrow':'\u27F7','Longleftrightarrow':'\u27FA','LongLeftRightArrow':'\u27F7','longmapsto':'\u27FC','longrightarrow':'\u27F6','Longrightarrow':'\u27F9','LongRightArrow':'\u27F6','looparrowleft':'\u21AB','looparrowright':'\u21AC','lopar':'\u2985','lopf':'\uD835\uDD5D','Lopf':'\uD835\uDD43','loplus':'\u2A2D','lotimes':'\u2A34','lowast':'\u2217','lowbar':'_','LowerLeftArrow':'\u2199','LowerRightArrow':'\u2198','loz':'\u25CA','lozenge':'\u25CA','lozf':'\u29EB','lpar':'(','lparlt':'\u2993','lrarr':'\u21C6','lrcorner':'\u231F','lrhar':'\u21CB','lrhard':'\u296D','lrm':'\u200E','lrtri':'\u22BF','lsaquo':'\u2039','lscr':'\uD835\uDCC1','Lscr':'\u2112','lsh':'\u21B0','Lsh':'\u21B0','lsim':'\u2272','lsime':'\u2A8D','lsimg':'\u2A8F','lsqb':'[','lsquo':'\u2018','lsquor':'\u201A','lstrok':'\u0142','Lstrok':'\u0141','lt':'<','Lt':'\u226A','LT':'<','ltcc':'\u2AA6','ltcir':'\u2A79','ltdot':'\u22D6','lthree':'\u22CB','ltimes':'\u22C9','ltlarr':'\u2976','ltquest':'\u2A7B','ltri':'\u25C3','ltrie':'\u22B4','ltrif':'\u25C2','ltrPar':'\u2996','lurdshar':'\u294A','luruhar':'\u2966','lvertneqq':'\u2268\uFE00','lvnE':'\u2268\uFE00','macr':'\xAF','male':'\u2642','malt':'\u2720','maltese':'\u2720','map':'\u21A6','Map':'\u2905','mapsto':'\u21A6','mapstodown':'\u21A7','mapstoleft':'\u21A4','mapstoup':'\u21A5','marker':'\u25AE','mcomma':'\u2A29','mcy':'\u043C','Mcy':'\u041C','mdash':'\u2014','mDDot':'\u223A','measuredangle':'\u2221','MediumSpace':'\u205F','Mellintrf':'\u2133','mfr':'\uD835\uDD2A','Mfr':'\uD835\uDD10','mho':'\u2127','micro':'\xB5','mid':'\u2223','midast':'*','midcir':'\u2AF0','middot':'\xB7','minus':'\u2212','minusb':'\u229F','minusd':'\u2238','minusdu':'\u2A2A','MinusPlus':'\u2213','mlcp':'\u2ADB','mldr':'\u2026','mnplus':'\u2213','models':'\u22A7','mopf':'\uD835\uDD5E','Mopf':'\uD835\uDD44','mp':'\u2213','mscr':'\uD835\uDCC2','Mscr':'\u2133','mstpos':'\u223E','mu':'\u03BC','Mu':'\u039C','multimap':'\u22B8','mumap':'\u22B8','nabla':'\u2207','nacute':'\u0144','Nacute':'\u0143','nang':'\u2220\u20D2','nap':'\u2249','napE':'\u2A70\u0338','napid':'\u224B\u0338','napos':'\u0149','napprox':'\u2249','natur':'\u266E','natural':'\u266E','naturals':'\u2115','nbsp':'\xA0','nbump':'\u224E\u0338','nbumpe':'\u224F\u0338','ncap':'\u2A43','ncaron':'\u0148','Ncaron':'\u0147','ncedil':'\u0146','Ncedil':'\u0145','ncong':'\u2247','ncongdot':'\u2A6D\u0338','ncup':'\u2A42','ncy':'\u043D','Ncy':'\u041D','ndash':'\u2013','ne':'\u2260','nearhk':'\u2924','nearr':'\u2197','neArr':'\u21D7','nearrow':'\u2197','nedot':'\u2250\u0338','NegativeMediumSpace':'\u200B','NegativeThickSpace':'\u200B','NegativeThinSpace':'\u200B','NegativeVeryThinSpace':'\u200B','nequiv':'\u2262','nesear':'\u2928','nesim':'\u2242\u0338','NestedGreaterGreater':'\u226B','NestedLessLess':'\u226A','NewLine':'\n','nexist':'\u2204','nexists':'\u2204','nfr':'\uD835\uDD2B','Nfr':'\uD835\uDD11','nge':'\u2271','ngE':'\u2267\u0338','ngeq':'\u2271','ngeqq':'\u2267\u0338','ngeqslant':'\u2A7E\u0338','nges':'\u2A7E\u0338','nGg':'\u22D9\u0338','ngsim':'\u2275','ngt':'\u226F','nGt':'\u226B\u20D2','ngtr':'\u226F','nGtv':'\u226B\u0338','nharr':'\u21AE','nhArr':'\u21CE','nhpar':'\u2AF2','ni':'\u220B','nis':'\u22FC','nisd':'\u22FA','niv':'\u220B','njcy':'\u045A','NJcy':'\u040A','nlarr':'\u219A','nlArr':'\u21CD','nldr':'\u2025','nle':'\u2270','nlE':'\u2266\u0338','nleftarrow':'\u219A','nLeftarrow':'\u21CD','nleftrightarrow':'\u21AE','nLeftrightarrow':'\u21CE','nleq':'\u2270','nleqq':'\u2266\u0338','nleqslant':'\u2A7D\u0338','nles':'\u2A7D\u0338','nless':'\u226E','nLl':'\u22D8\u0338','nlsim':'\u2274','nlt':'\u226E','nLt':'\u226A\u20D2','nltri':'\u22EA','nltrie':'\u22EC','nLtv':'\u226A\u0338','nmid':'\u2224','NoBreak':'\u2060','NonBreakingSpace':'\xA0','nopf':'\uD835\uDD5F','Nopf':'\u2115','not':'\xAC','Not':'\u2AEC','NotCongruent':'\u2262','NotCupCap':'\u226D','NotDoubleVerticalBar':'\u2226','NotElement':'\u2209','NotEqual':'\u2260','NotEqualTilde':'\u2242\u0338','NotExists':'\u2204','NotGreater':'\u226F','NotGreaterEqual':'\u2271','NotGreaterFullEqual':'\u2267\u0338','NotGreaterGreater':'\u226B\u0338','NotGreaterLess':'\u2279','NotGreaterSlantEqual':'\u2A7E\u0338','NotGreaterTilde':'\u2275','NotHumpDownHump':'\u224E\u0338','NotHumpEqual':'\u224F\u0338','notin':'\u2209','notindot':'\u22F5\u0338','notinE':'\u22F9\u0338','notinva':'\u2209','notinvb':'\u22F7','notinvc':'\u22F6','NotLeftTriangle':'\u22EA','NotLeftTriangleBar':'\u29CF\u0338','NotLeftTriangleEqual':'\u22EC','NotLess':'\u226E','NotLessEqual':'\u2270','NotLessGreater':'\u2278','NotLessLess':'\u226A\u0338','NotLessSlantEqual':'\u2A7D\u0338','NotLessTilde':'\u2274','NotNestedGreaterGreater':'\u2AA2\u0338','NotNestedLessLess':'\u2AA1\u0338','notni':'\u220C','notniva':'\u220C','notnivb':'\u22FE','notnivc':'\u22FD','NotPrecedes':'\u2280','NotPrecedesEqual':'\u2AAF\u0338','NotPrecedesSlantEqual':'\u22E0','NotReverseElement':'\u220C','NotRightTriangle':'\u22EB','NotRightTriangleBar':'\u29D0\u0338','NotRightTriangleEqual':'\u22ED','NotSquareSubset':'\u228F\u0338','NotSquareSubsetEqual':'\u22E2','NotSquareSuperset':'\u2290\u0338','NotSquareSupersetEqual':'\u22E3','NotSubset':'\u2282\u20D2','NotSubsetEqual':'\u2288','NotSucceeds':'\u2281','NotSucceedsEqual':'\u2AB0\u0338','NotSucceedsSlantEqual':'\u22E1','NotSucceedsTilde':'\u227F\u0338','NotSuperset':'\u2283\u20D2','NotSupersetEqual':'\u2289','NotTilde':'\u2241','NotTildeEqual':'\u2244','NotTildeFullEqual':'\u2247','NotTildeTilde':'\u2249','NotVerticalBar':'\u2224','npar':'\u2226','nparallel':'\u2226','nparsl':'\u2AFD\u20E5','npart':'\u2202\u0338','npolint':'\u2A14','npr':'\u2280','nprcue':'\u22E0','npre':'\u2AAF\u0338','nprec':'\u2280','npreceq':'\u2AAF\u0338','nrarr':'\u219B','nrArr':'\u21CF','nrarrc':'\u2933\u0338','nrarrw':'\u219D\u0338','nrightarrow':'\u219B','nRightarrow':'\u21CF','nrtri':'\u22EB','nrtrie':'\u22ED','nsc':'\u2281','nsccue':'\u22E1','nsce':'\u2AB0\u0338','nscr':'\uD835\uDCC3','Nscr':'\uD835\uDCA9','nshortmid':'\u2224','nshortparallel':'\u2226','nsim':'\u2241','nsime':'\u2244','nsimeq':'\u2244','nsmid':'\u2224','nspar':'\u2226','nsqsube':'\u22E2','nsqsupe':'\u22E3','nsub':'\u2284','nsube':'\u2288','nsubE':'\u2AC5\u0338','nsubset':'\u2282\u20D2','nsubseteq':'\u2288','nsubseteqq':'\u2AC5\u0338','nsucc':'\u2281','nsucceq':'\u2AB0\u0338','nsup':'\u2285','nsupe':'\u2289','nsupE':'\u2AC6\u0338','nsupset':'\u2283\u20D2','nsupseteq':'\u2289','nsupseteqq':'\u2AC6\u0338','ntgl':'\u2279','ntilde':'\xF1','Ntilde':'\xD1','ntlg':'\u2278','ntriangleleft':'\u22EA','ntrianglelefteq':'\u22EC','ntriangleright':'\u22EB','ntrianglerighteq':'\u22ED','nu':'\u03BD','Nu':'\u039D','num':'#','numero':'\u2116','numsp':'\u2007','nvap':'\u224D\u20D2','nvdash':'\u22AC','nvDash':'\u22AD','nVdash':'\u22AE','nVDash':'\u22AF','nvge':'\u2265\u20D2','nvgt':'>\u20D2','nvHarr':'\u2904','nvinfin':'\u29DE','nvlArr':'\u2902','nvle':'\u2264\u20D2','nvlt':'<\u20D2','nvltrie':'\u22B4\u20D2','nvrArr':'\u2903','nvrtrie':'\u22B5\u20D2','nvsim':'\u223C\u20D2','nwarhk':'\u2923','nwarr':'\u2196','nwArr':'\u21D6','nwarrow':'\u2196','nwnear':'\u2927','oacute':'\xF3','Oacute':'\xD3','oast':'\u229B','ocir':'\u229A','ocirc':'\xF4','Ocirc':'\xD4','ocy':'\u043E','Ocy':'\u041E','odash':'\u229D','odblac':'\u0151','Odblac':'\u0150','odiv':'\u2A38','odot':'\u2299','odsold':'\u29BC','oelig':'\u0153','OElig':'\u0152','ofcir':'\u29BF','ofr':'\uD835\uDD2C','Ofr':'\uD835\uDD12','ogon':'\u02DB','ograve':'\xF2','Ograve':'\xD2','ogt':'\u29C1','ohbar':'\u29B5','ohm':'\u03A9','oint':'\u222E','olarr':'\u21BA','olcir':'\u29BE','olcross':'\u29BB','oline':'\u203E','olt':'\u29C0','omacr':'\u014D','Omacr':'\u014C','omega':'\u03C9','Omega':'\u03A9','omicron':'\u03BF','Omicron':'\u039F','omid':'\u29B6','ominus':'\u2296','oopf':'\uD835\uDD60','Oopf':'\uD835\uDD46','opar':'\u29B7','OpenCurlyDoubleQuote':'\u201C','OpenCurlyQuote':'\u2018','operp':'\u29B9','oplus':'\u2295','or':'\u2228','Or':'\u2A54','orarr':'\u21BB','ord':'\u2A5D','order':'\u2134','orderof':'\u2134','ordf':'\xAA','ordm':'\xBA','origof':'\u22B6','oror':'\u2A56','orslope':'\u2A57','orv':'\u2A5B','oS':'\u24C8','oscr':'\u2134','Oscr':'\uD835\uDCAA','oslash':'\xF8','Oslash':'\xD8','osol':'\u2298','otilde':'\xF5','Otilde':'\xD5','otimes':'\u2297','Otimes':'\u2A37','otimesas':'\u2A36','ouml':'\xF6','Ouml':'\xD6','ovbar':'\u233D','OverBar':'\u203E','OverBrace':'\u23DE','OverBracket':'\u23B4','OverParenthesis':'\u23DC','par':'\u2225','para':'\xB6','parallel':'\u2225','parsim':'\u2AF3','parsl':'\u2AFD','part':'\u2202','PartialD':'\u2202','pcy':'\u043F','Pcy':'\u041F','percnt':'%','period':'.','permil':'\u2030','perp':'\u22A5','pertenk':'\u2031','pfr':'\uD835\uDD2D','Pfr':'\uD835\uDD13','phi':'\u03C6','Phi':'\u03A6','phiv':'\u03D5','phmmat':'\u2133','phone':'\u260E','pi':'\u03C0','Pi':'\u03A0','pitchfork':'\u22D4','piv':'\u03D6','planck':'\u210F','planckh':'\u210E','plankv':'\u210F','plus':'+','plusacir':'\u2A23','plusb':'\u229E','pluscir':'\u2A22','plusdo':'\u2214','plusdu':'\u2A25','pluse':'\u2A72','PlusMinus':'\xB1','plusmn':'\xB1','plussim':'\u2A26','plustwo':'\u2A27','pm':'\xB1','Poincareplane':'\u210C','pointint':'\u2A15','popf':'\uD835\uDD61','Popf':'\u2119','pound':'\xA3','pr':'\u227A','Pr':'\u2ABB','prap':'\u2AB7','prcue':'\u227C','pre':'\u2AAF','prE':'\u2AB3','prec':'\u227A','precapprox':'\u2AB7','preccurlyeq':'\u227C','Precedes':'\u227A','PrecedesEqual':'\u2AAF','PrecedesSlantEqual':'\u227C','PrecedesTilde':'\u227E','preceq':'\u2AAF','precnapprox':'\u2AB9','precneqq':'\u2AB5','precnsim':'\u22E8','precsim':'\u227E','prime':'\u2032','Prime':'\u2033','primes':'\u2119','prnap':'\u2AB9','prnE':'\u2AB5','prnsim':'\u22E8','prod':'\u220F','Product':'\u220F','profalar':'\u232E','profline':'\u2312','profsurf':'\u2313','prop':'\u221D','Proportion':'\u2237','Proportional':'\u221D','propto':'\u221D','prsim':'\u227E','prurel':'\u22B0','pscr':'\uD835\uDCC5','Pscr':'\uD835\uDCAB','psi':'\u03C8','Psi':'\u03A8','puncsp':'\u2008','qfr':'\uD835\uDD2E','Qfr':'\uD835\uDD14','qint':'\u2A0C','qopf':'\uD835\uDD62','Qopf':'\u211A','qprime':'\u2057','qscr':'\uD835\uDCC6','Qscr':'\uD835\uDCAC','quaternions':'\u210D','quatint':'\u2A16','quest':'?','questeq':'\u225F','quot':'"','QUOT':'"','rAarr':'\u21DB','race':'\u223D\u0331','racute':'\u0155','Racute':'\u0154','radic':'\u221A','raemptyv':'\u29B3','rang':'\u27E9','Rang':'\u27EB','rangd':'\u2992','range':'\u29A5','rangle':'\u27E9','raquo':'\xBB','rarr':'\u2192','rArr':'\u21D2','Rarr':'\u21A0','rarrap':'\u2975','rarrb':'\u21E5','rarrbfs':'\u2920','rarrc':'\u2933','rarrfs':'\u291E','rarrhk':'\u21AA','rarrlp':'\u21AC','rarrpl':'\u2945','rarrsim':'\u2974','rarrtl':'\u21A3','Rarrtl':'\u2916','rarrw':'\u219D','ratail':'\u291A','rAtail':'\u291C','ratio':'\u2236','rationals':'\u211A','rbarr':'\u290D','rBarr':'\u290F','RBarr':'\u2910','rbbrk':'\u2773','rbrace':'}','rbrack':']','rbrke':'\u298C','rbrksld':'\u298E','rbrkslu':'\u2990','rcaron':'\u0159','Rcaron':'\u0158','rcedil':'\u0157','Rcedil':'\u0156','rceil':'\u2309','rcub':'}','rcy':'\u0440','Rcy':'\u0420','rdca':'\u2937','rdldhar':'\u2969','rdquo':'\u201D','rdquor':'\u201D','rdsh':'\u21B3','Re':'\u211C','real':'\u211C','realine':'\u211B','realpart':'\u211C','reals':'\u211D','rect':'\u25AD','reg':'\xAE','REG':'\xAE','ReverseElement':'\u220B','ReverseEquilibrium':'\u21CB','ReverseUpEquilibrium':'\u296F','rfisht':'\u297D','rfloor':'\u230B','rfr':'\uD835\uDD2F','Rfr':'\u211C','rHar':'\u2964','rhard':'\u21C1','rharu':'\u21C0','rharul':'\u296C','rho':'\u03C1','Rho':'\u03A1','rhov':'\u03F1','RightAngleBracket':'\u27E9','rightarrow':'\u2192','Rightarrow':'\u21D2','RightArrow':'\u2192','RightArrowBar':'\u21E5','RightArrowLeftArrow':'\u21C4','rightarrowtail':'\u21A3','RightCeiling':'\u2309','RightDoubleBracket':'\u27E7','RightDownTeeVector':'\u295D','RightDownVector':'\u21C2','RightDownVectorBar':'\u2955','RightFloor':'\u230B','rightharpoondown':'\u21C1','rightharpoonup':'\u21C0','rightleftarrows':'\u21C4','rightleftharpoons':'\u21CC','rightrightarrows':'\u21C9','rightsquigarrow':'\u219D','RightTee':'\u22A2','RightTeeArrow':'\u21A6','RightTeeVector':'\u295B','rightthreetimes':'\u22CC','RightTriangle':'\u22B3','RightTriangleBar':'\u29D0','RightTriangleEqual':'\u22B5','RightUpDownVector':'\u294F','RightUpTeeVector':'\u295C','RightUpVector':'\u21BE','RightUpVectorBar':'\u2954','RightVector':'\u21C0','RightVectorBar':'\u2953','ring':'\u02DA','risingdotseq':'\u2253','rlarr':'\u21C4','rlhar':'\u21CC','rlm':'\u200F','rmoust':'\u23B1','rmoustache':'\u23B1','rnmid':'\u2AEE','roang':'\u27ED','roarr':'\u21FE','robrk':'\u27E7','ropar':'\u2986','ropf':'\uD835\uDD63','Ropf':'\u211D','roplus':'\u2A2E','rotimes':'\u2A35','RoundImplies':'\u2970','rpar':')','rpargt':'\u2994','rppolint':'\u2A12','rrarr':'\u21C9','Rrightarrow':'\u21DB','rsaquo':'\u203A','rscr':'\uD835\uDCC7','Rscr':'\u211B','rsh':'\u21B1','Rsh':'\u21B1','rsqb':']','rsquo':'\u2019','rsquor':'\u2019','rthree':'\u22CC','rtimes':'\u22CA','rtri':'\u25B9','rtrie':'\u22B5','rtrif':'\u25B8','rtriltri':'\u29CE','RuleDelayed':'\u29F4','ruluhar':'\u2968','rx':'\u211E','sacute':'\u015B','Sacute':'\u015A','sbquo':'\u201A','sc':'\u227B','Sc':'\u2ABC','scap':'\u2AB8','scaron':'\u0161','Scaron':'\u0160','sccue':'\u227D','sce':'\u2AB0','scE':'\u2AB4','scedil':'\u015F','Scedil':'\u015E','scirc':'\u015D','Scirc':'\u015C','scnap':'\u2ABA','scnE':'\u2AB6','scnsim':'\u22E9','scpolint':'\u2A13','scsim':'\u227F','scy':'\u0441','Scy':'\u0421','sdot':'\u22C5','sdotb':'\u22A1','sdote':'\u2A66','searhk':'\u2925','searr':'\u2198','seArr':'\u21D8','searrow':'\u2198','sect':'\xA7','semi':';','seswar':'\u2929','setminus':'\u2216','setmn':'\u2216','sext':'\u2736','sfr':'\uD835\uDD30','Sfr':'\uD835\uDD16','sfrown':'\u2322','sharp':'\u266F','shchcy':'\u0449','SHCHcy':'\u0429','shcy':'\u0448','SHcy':'\u0428','ShortDownArrow':'\u2193','ShortLeftArrow':'\u2190','shortmid':'\u2223','shortparallel':'\u2225','ShortRightArrow':'\u2192','ShortUpArrow':'\u2191','shy':'\xAD','sigma':'\u03C3','Sigma':'\u03A3','sigmaf':'\u03C2','sigmav':'\u03C2','sim':'\u223C','simdot':'\u2A6A','sime':'\u2243','simeq':'\u2243','simg':'\u2A9E','simgE':'\u2AA0','siml':'\u2A9D','simlE':'\u2A9F','simne':'\u2246','simplus':'\u2A24','simrarr':'\u2972','slarr':'\u2190','SmallCircle':'\u2218','smallsetminus':'\u2216','smashp':'\u2A33','smeparsl':'\u29E4','smid':'\u2223','smile':'\u2323','smt':'\u2AAA','smte':'\u2AAC','smtes':'\u2AAC\uFE00','softcy':'\u044C','SOFTcy':'\u042C','sol':'/','solb':'\u29C4','solbar':'\u233F','sopf':'\uD835\uDD64','Sopf':'\uD835\uDD4A','spades':'\u2660','spadesuit':'\u2660','spar':'\u2225','sqcap':'\u2293','sqcaps':'\u2293\uFE00','sqcup':'\u2294','sqcups':'\u2294\uFE00','Sqrt':'\u221A','sqsub':'\u228F','sqsube':'\u2291','sqsubset':'\u228F','sqsubseteq':'\u2291','sqsup':'\u2290','sqsupe':'\u2292','sqsupset':'\u2290','sqsupseteq':'\u2292','squ':'\u25A1','square':'\u25A1','Square':'\u25A1','SquareIntersection':'\u2293','SquareSubset':'\u228F','SquareSubsetEqual':'\u2291','SquareSuperset':'\u2290','SquareSupersetEqual':'\u2292','SquareUnion':'\u2294','squarf':'\u25AA','squf':'\u25AA','srarr':'\u2192','sscr':'\uD835\uDCC8','Sscr':'\uD835\uDCAE','ssetmn':'\u2216','ssmile':'\u2323','sstarf':'\u22C6','star':'\u2606','Star':'\u22C6','starf':'\u2605','straightepsilon':'\u03F5','straightphi':'\u03D5','strns':'\xAF','sub':'\u2282','Sub':'\u22D0','subdot':'\u2ABD','sube':'\u2286','subE':'\u2AC5','subedot':'\u2AC3','submult':'\u2AC1','subne':'\u228A','subnE':'\u2ACB','subplus':'\u2ABF','subrarr':'\u2979','subset':'\u2282','Subset':'\u22D0','subseteq':'\u2286','subseteqq':'\u2AC5','SubsetEqual':'\u2286','subsetneq':'\u228A','subsetneqq':'\u2ACB','subsim':'\u2AC7','subsub':'\u2AD5','subsup':'\u2AD3','succ':'\u227B','succapprox':'\u2AB8','succcurlyeq':'\u227D','Succeeds':'\u227B','SucceedsEqual':'\u2AB0','SucceedsSlantEqual':'\u227D','SucceedsTilde':'\u227F','succeq':'\u2AB0','succnapprox':'\u2ABA','succneqq':'\u2AB6','succnsim':'\u22E9','succsim':'\u227F','SuchThat':'\u220B','sum':'\u2211','Sum':'\u2211','sung':'\u266A','sup':'\u2283','Sup':'\u22D1','sup1':'\xB9','sup2':'\xB2','sup3':'\xB3','supdot':'\u2ABE','supdsub':'\u2AD8','supe':'\u2287','supE':'\u2AC6','supedot':'\u2AC4','Superset':'\u2283','SupersetEqual':'\u2287','suphsol':'\u27C9','suphsub':'\u2AD7','suplarr':'\u297B','supmult':'\u2AC2','supne':'\u228B','supnE':'\u2ACC','supplus':'\u2AC0','supset':'\u2283','Supset':'\u22D1','supseteq':'\u2287','supseteqq':'\u2AC6','supsetneq':'\u228B','supsetneqq':'\u2ACC','supsim':'\u2AC8','supsub':'\u2AD4','supsup':'\u2AD6','swarhk':'\u2926','swarr':'\u2199','swArr':'\u21D9','swarrow':'\u2199','swnwar':'\u292A','szlig':'\xDF','Tab':'\t','target':'\u2316','tau':'\u03C4','Tau':'\u03A4','tbrk':'\u23B4','tcaron':'\u0165','Tcaron':'\u0164','tcedil':'\u0163','Tcedil':'\u0162','tcy':'\u0442','Tcy':'\u0422','tdot':'\u20DB','telrec':'\u2315','tfr':'\uD835\uDD31','Tfr':'\uD835\uDD17','there4':'\u2234','therefore':'\u2234','Therefore':'\u2234','theta':'\u03B8','Theta':'\u0398','thetasym':'\u03D1','thetav':'\u03D1','thickapprox':'\u2248','thicksim':'\u223C','ThickSpace':'\u205F\u200A','thinsp':'\u2009','ThinSpace':'\u2009','thkap':'\u2248','thksim':'\u223C','thorn':'\xFE','THORN':'\xDE','tilde':'\u02DC','Tilde':'\u223C','TildeEqual':'\u2243','TildeFullEqual':'\u2245','TildeTilde':'\u2248','times':'\xD7','timesb':'\u22A0','timesbar':'\u2A31','timesd':'\u2A30','tint':'\u222D','toea':'\u2928','top':'\u22A4','topbot':'\u2336','topcir':'\u2AF1','topf':'\uD835\uDD65','Topf':'\uD835\uDD4B','topfork':'\u2ADA','tosa':'\u2929','tprime':'\u2034','trade':'\u2122','TRADE':'\u2122','triangle':'\u25B5','triangledown':'\u25BF','triangleleft':'\u25C3','trianglelefteq':'\u22B4','triangleq':'\u225C','triangleright':'\u25B9','trianglerighteq':'\u22B5','tridot':'\u25EC','trie':'\u225C','triminus':'\u2A3A','TripleDot':'\u20DB','triplus':'\u2A39','trisb':'\u29CD','tritime':'\u2A3B','trpezium':'\u23E2','tscr':'\uD835\uDCC9','Tscr':'\uD835\uDCAF','tscy':'\u0446','TScy':'\u0426','tshcy':'\u045B','TSHcy':'\u040B','tstrok':'\u0167','Tstrok':'\u0166','twixt':'\u226C','twoheadleftarrow':'\u219E','twoheadrightarrow':'\u21A0','uacute':'\xFA','Uacute':'\xDA','uarr':'\u2191','uArr':'\u21D1','Uarr':'\u219F','Uarrocir':'\u2949','ubrcy':'\u045E','Ubrcy':'\u040E','ubreve':'\u016D','Ubreve':'\u016C','ucirc':'\xFB','Ucirc':'\xDB','ucy':'\u0443','Ucy':'\u0423','udarr':'\u21C5','udblac':'\u0171','Udblac':'\u0170','udhar':'\u296E','ufisht':'\u297E','ufr':'\uD835\uDD32','Ufr':'\uD835\uDD18','ugrave':'\xF9','Ugrave':'\xD9','uHar':'\u2963','uharl':'\u21BF','uharr':'\u21BE','uhblk':'\u2580','ulcorn':'\u231C','ulcorner':'\u231C','ulcrop':'\u230F','ultri':'\u25F8','umacr':'\u016B','Umacr':'\u016A','uml':'\xA8','UnderBar':'_','UnderBrace':'\u23DF','UnderBracket':'\u23B5','UnderParenthesis':'\u23DD','Union':'\u22C3','UnionPlus':'\u228E','uogon':'\u0173','Uogon':'\u0172','uopf':'\uD835\uDD66','Uopf':'\uD835\uDD4C','uparrow':'\u2191','Uparrow':'\u21D1','UpArrow':'\u2191','UpArrowBar':'\u2912','UpArrowDownArrow':'\u21C5','updownarrow':'\u2195','Updownarrow':'\u21D5','UpDownArrow':'\u2195','UpEquilibrium':'\u296E','upharpoonleft':'\u21BF','upharpoonright':'\u21BE','uplus':'\u228E','UpperLeftArrow':'\u2196','UpperRightArrow':'\u2197','upsi':'\u03C5','Upsi':'\u03D2','upsih':'\u03D2','upsilon':'\u03C5','Upsilon':'\u03A5','UpTee':'\u22A5','UpTeeArrow':'\u21A5','upuparrows':'\u21C8','urcorn':'\u231D','urcorner':'\u231D','urcrop':'\u230E','uring':'\u016F','Uring':'\u016E','urtri':'\u25F9','uscr':'\uD835\uDCCA','Uscr':'\uD835\uDCB0','utdot':'\u22F0','utilde':'\u0169','Utilde':'\u0168','utri':'\u25B5','utrif':'\u25B4','uuarr':'\u21C8','uuml':'\xFC','Uuml':'\xDC','uwangle':'\u29A7','vangrt':'\u299C','varepsilon':'\u03F5','varkappa':'\u03F0','varnothing':'\u2205','varphi':'\u03D5','varpi':'\u03D6','varpropto':'\u221D','varr':'\u2195','vArr':'\u21D5','varrho':'\u03F1','varsigma':'\u03C2','varsubsetneq':'\u228A\uFE00','varsubsetneqq':'\u2ACB\uFE00','varsupsetneq':'\u228B\uFE00','varsupsetneqq':'\u2ACC\uFE00','vartheta':'\u03D1','vartriangleleft':'\u22B2','vartriangleright':'\u22B3','vBar':'\u2AE8','Vbar':'\u2AEB','vBarv':'\u2AE9','vcy':'\u0432','Vcy':'\u0412','vdash':'\u22A2','vDash':'\u22A8','Vdash':'\u22A9','VDash':'\u22AB','Vdashl':'\u2AE6','vee':'\u2228','Vee':'\u22C1','veebar':'\u22BB','veeeq':'\u225A','vellip':'\u22EE','verbar':'|','Verbar':'\u2016','vert':'|','Vert':'\u2016','VerticalBar':'\u2223','VerticalLine':'|','VerticalSeparator':'\u2758','VerticalTilde':'\u2240','VeryThinSpace':'\u200A','vfr':'\uD835\uDD33','Vfr':'\uD835\uDD19','vltri':'\u22B2','vnsub':'\u2282\u20D2','vnsup':'\u2283\u20D2','vopf':'\uD835\uDD67','Vopf':'\uD835\uDD4D','vprop':'\u221D','vrtri':'\u22B3','vscr':'\uD835\uDCCB','Vscr':'\uD835\uDCB1','vsubne':'\u228A\uFE00','vsubnE':'\u2ACB\uFE00','vsupne':'\u228B\uFE00','vsupnE':'\u2ACC\uFE00','Vvdash':'\u22AA','vzigzag':'\u299A','wcirc':'\u0175','Wcirc':'\u0174','wedbar':'\u2A5F','wedge':'\u2227','Wedge':'\u22C0','wedgeq':'\u2259','weierp':'\u2118','wfr':'\uD835\uDD34','Wfr':'\uD835\uDD1A','wopf':'\uD835\uDD68','Wopf':'\uD835\uDD4E','wp':'\u2118','wr':'\u2240','wreath':'\u2240','wscr':'\uD835\uDCCC','Wscr':'\uD835\uDCB2','xcap':'\u22C2','xcirc':'\u25EF','xcup':'\u22C3','xdtri':'\u25BD','xfr':'\uD835\uDD35','Xfr':'\uD835\uDD1B','xharr':'\u27F7','xhArr':'\u27FA','xi':'\u03BE','Xi':'\u039E','xlarr':'\u27F5','xlArr':'\u27F8','xmap':'\u27FC','xnis':'\u22FB','xodot':'\u2A00','xopf':'\uD835\uDD69','Xopf':'\uD835\uDD4F','xoplus':'\u2A01','xotime':'\u2A02','xrarr':'\u27F6','xrArr':'\u27F9','xscr':'\uD835\uDCCD','Xscr':'\uD835\uDCB3','xsqcup':'\u2A06','xuplus':'\u2A04','xutri':'\u25B3','xvee':'\u22C1','xwedge':'\u22C0','yacute':'\xFD','Yacute':'\xDD','yacy':'\u044F','YAcy':'\u042F','ycirc':'\u0177','Ycirc':'\u0176','ycy':'\u044B','Ycy':'\u042B','yen':'\xA5','yfr':'\uD835\uDD36','Yfr':'\uD835\uDD1C','yicy':'\u0457','YIcy':'\u0407','yopf':'\uD835\uDD6A','Yopf':'\uD835\uDD50','yscr':'\uD835\uDCCE','Yscr':'\uD835\uDCB4','yucy':'\u044E','YUcy':'\u042E','yuml':'\xFF','Yuml':'\u0178','zacute':'\u017A','Zacute':'\u0179','zcaron':'\u017E','Zcaron':'\u017D','zcy':'\u0437','Zcy':'\u0417','zdot':'\u017C','Zdot':'\u017B','zeetrf':'\u2128','ZeroWidthSpace':'\u200B','zeta':'\u03B6','Zeta':'\u0396','zfr':'\uD835\uDD37','Zfr':'\u2128','zhcy':'\u0436','ZHcy':'\u0416','zigrarr':'\u21DD','zopf':'\uD835\uDD6B','Zopf':'\u2124','zscr':'\uD835\uDCCF','Zscr':'\uD835\uDCB5','zwj':'\u200D','zwnj':'\u200C'}; - var decodeMapLegacy = {'aacute':'\xE1','Aacute':'\xC1','acirc':'\xE2','Acirc':'\xC2','acute':'\xB4','aelig':'\xE6','AElig':'\xC6','agrave':'\xE0','Agrave':'\xC0','amp':'&','AMP':'&','aring':'\xE5','Aring':'\xC5','atilde':'\xE3','Atilde':'\xC3','auml':'\xE4','Auml':'\xC4','brvbar':'\xA6','ccedil':'\xE7','Ccedil':'\xC7','cedil':'\xB8','cent':'\xA2','copy':'\xA9','COPY':'\xA9','curren':'\xA4','deg':'\xB0','divide':'\xF7','eacute':'\xE9','Eacute':'\xC9','ecirc':'\xEA','Ecirc':'\xCA','egrave':'\xE8','Egrave':'\xC8','eth':'\xF0','ETH':'\xD0','euml':'\xEB','Euml':'\xCB','frac12':'\xBD','frac14':'\xBC','frac34':'\xBE','gt':'>','GT':'>','iacute':'\xED','Iacute':'\xCD','icirc':'\xEE','Icirc':'\xCE','iexcl':'\xA1','igrave':'\xEC','Igrave':'\xCC','iquest':'\xBF','iuml':'\xEF','Iuml':'\xCF','laquo':'\xAB','lt':'<','LT':'<','macr':'\xAF','micro':'\xB5','middot':'\xB7','nbsp':'\xA0','not':'\xAC','ntilde':'\xF1','Ntilde':'\xD1','oacute':'\xF3','Oacute':'\xD3','ocirc':'\xF4','Ocirc':'\xD4','ograve':'\xF2','Ograve':'\xD2','ordf':'\xAA','ordm':'\xBA','oslash':'\xF8','Oslash':'\xD8','otilde':'\xF5','Otilde':'\xD5','ouml':'\xF6','Ouml':'\xD6','para':'\xB6','plusmn':'\xB1','pound':'\xA3','quot':'"','QUOT':'"','raquo':'\xBB','reg':'\xAE','REG':'\xAE','sect':'\xA7','shy':'\xAD','sup1':'\xB9','sup2':'\xB2','sup3':'\xB3','szlig':'\xDF','thorn':'\xFE','THORN':'\xDE','times':'\xD7','uacute':'\xFA','Uacute':'\xDA','ucirc':'\xFB','Ucirc':'\xDB','ugrave':'\xF9','Ugrave':'\xD9','uml':'\xA8','uuml':'\xFC','Uuml':'\xDC','yacute':'\xFD','Yacute':'\xDD','yen':'\xA5','yuml':'\xFF'}; - var decodeMapNumeric = {'0':'\uFFFD','128':'\u20AC','130':'\u201A','131':'\u0192','132':'\u201E','133':'\u2026','134':'\u2020','135':'\u2021','136':'\u02C6','137':'\u2030','138':'\u0160','139':'\u2039','140':'\u0152','142':'\u017D','145':'\u2018','146':'\u2019','147':'\u201C','148':'\u201D','149':'\u2022','150':'\u2013','151':'\u2014','152':'\u02DC','153':'\u2122','154':'\u0161','155':'\u203A','156':'\u0153','158':'\u017E','159':'\u0178'}; - var invalidReferenceCodePoints = [1,2,3,4,5,6,7,8,11,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,64976,64977,64978,64979,64980,64981,64982,64983,64984,64985,64986,64987,64988,64989,64990,64991,64992,64993,64994,64995,64996,64997,64998,64999,65000,65001,65002,65003,65004,65005,65006,65007,65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]; - - /*--------------------------------------------------------------------------*/ - - var stringFromCharCode = String.fromCharCode; - - var object = {}; - var hasOwnProperty = object.hasOwnProperty; - var has = function(object, propertyName) { - return hasOwnProperty.call(object, propertyName); - }; - - var contains = function(array, value) { - var index = -1; - var length = array.length; - while (++index < length) { - if (array[index] == value) { - return true; - } - } - return false; - }; - - var merge = function(options, defaults) { - if (!options) { - return defaults; - } - var result = {}; - var key; - for (key in defaults) { - // A `hasOwnProperty` check is not needed here, since only recognized - // option names are used anyway. Any others are ignored. - result[key] = has(options, key) ? options[key] : defaults[key]; - } - return result; - }; - - // Modified version of `ucs2encode`; see https://mths.be/punycode. - var codePointToSymbol = function(codePoint, strict) { - var output = ''; - if ((codePoint >= 0xD800 && codePoint <= 0xDFFF) || codePoint > 0x10FFFF) { - // See issue #4: - // “Otherwise, if the number is in the range 0xD800 to 0xDFFF or is - // greater than 0x10FFFF, then this is a parse error. Return a U+FFFD - // REPLACEMENT CHARACTER.” - if (strict) { - parseError('character reference outside the permissible Unicode range'); - } - return '\uFFFD'; - } - if (has(decodeMapNumeric, codePoint)) { - if (strict) { - parseError('disallowed character reference'); - } - return decodeMapNumeric[codePoint]; - } - if (strict && contains(invalidReferenceCodePoints, codePoint)) { - parseError('disallowed character reference'); - } - if (codePoint > 0xFFFF) { - codePoint -= 0x10000; - output += stringFromCharCode(codePoint >>> 10 & 0x3FF | 0xD800); - codePoint = 0xDC00 | codePoint & 0x3FF; - } - output += stringFromCharCode(codePoint); - return output; - }; - - var hexEscape = function(codePoint) { - return '&#x' + codePoint.toString(16).toUpperCase() + ';'; - }; - - var decEscape = function(codePoint) { - return '&#' + codePoint + ';'; - }; - - var parseError = function(message) { - throw Error('Parse error: ' + message); - }; - - /*--------------------------------------------------------------------------*/ - - var encode = function(string, options) { - options = merge(options, encode.options); - var strict = options.strict; - if (strict && regexInvalidRawCodePoint.test(string)) { - parseError('forbidden code point'); - } - var encodeEverything = options.encodeEverything; - var useNamedReferences = options.useNamedReferences; - var allowUnsafeSymbols = options.allowUnsafeSymbols; - var escapeCodePoint = options.decimal ? decEscape : hexEscape; - - var escapeBmpSymbol = function(symbol) { - return escapeCodePoint(symbol.charCodeAt(0)); - }; - - if (encodeEverything) { - // Encode ASCII symbols. - string = string.replace(regexAsciiWhitelist, function(symbol) { - // Use named references if requested & possible. - if (useNamedReferences && has(encodeMap, symbol)) { - return '&' + encodeMap[symbol] + ';'; - } - return escapeBmpSymbol(symbol); - }); - // Shorten a few escapes that represent two symbols, of which at least one - // is within the ASCII range. - if (useNamedReferences) { - string = string - .replace(/>\u20D2/g, '>⃒') - .replace(/<\u20D2/g, '<⃒') - .replace(/fj/g, 'fj'); - } - // Encode non-ASCII symbols. - if (useNamedReferences) { - // Encode non-ASCII symbols that can be replaced with a named reference. - string = string.replace(regexEncodeNonAscii, function(string) { - // Note: there is no need to check `has(encodeMap, string)` here. - return '&' + encodeMap[string] + ';'; - }); - } - // Note: any remaining non-ASCII symbols are handled outside of the `if`. - } else if (useNamedReferences) { - // Apply named character references. - // Encode `<>"'&` using named character references. - if (!allowUnsafeSymbols) { - string = string.replace(regexEscape, function(string) { - return '&' + encodeMap[string] + ';'; // no need to check `has()` here - }); - } - // Shorten escapes that represent two symbols, of which at least one is - // `<>"'&`. - string = string - .replace(/>\u20D2/g, '>⃒') - .replace(/<\u20D2/g, '<⃒'); - // Encode non-ASCII symbols that can be replaced with a named reference. - string = string.replace(regexEncodeNonAscii, function(string) { - // Note: there is no need to check `has(encodeMap, string)` here. - return '&' + encodeMap[string] + ';'; - }); - } else if (!allowUnsafeSymbols) { - // Encode `<>"'&` using hexadecimal escapes, now that they’re not handled - // using named character references. - string = string.replace(regexEscape, escapeBmpSymbol); - } - return string - // Encode astral symbols. - .replace(regexAstralSymbols, function($0) { - // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae - var high = $0.charCodeAt(0); - var low = $0.charCodeAt(1); - var codePoint = (high - 0xD800) * 0x400 + low - 0xDC00 + 0x10000; - return escapeCodePoint(codePoint); - }) - // Encode any remaining BMP symbols that are not printable ASCII symbols - // using a hexadecimal escape. - .replace(regexBmpWhitelist, escapeBmpSymbol); - }; - // Expose default options (so they can be overridden globally). - encode.options = { - 'allowUnsafeSymbols': false, - 'encodeEverything': false, - 'strict': false, - 'useNamedReferences': false, - 'decimal' : false - }; - - var decode = function(html, options) { - options = merge(options, decode.options); - var strict = options.strict; - if (strict && regexInvalidEntity.test(html)) { - parseError('malformed character reference'); - } - return html.replace(regexDecode, function($0, $1, $2, $3, $4, $5, $6, $7, $8) { - var codePoint; - var semicolon; - var decDigits; - var hexDigits; - var reference; - var next; - - if ($1) { - reference = $1; - // Note: there is no need to check `has(decodeMap, reference)`. - return decodeMap[reference]; - } - - if ($2) { - // Decode named character references without trailing `;`, e.g. `&`. - // This is only a parse error if it gets converted to `&`, or if it is - // followed by `=` in an attribute context. - reference = $2; - next = $3; - if (next && options.isAttributeValue) { - if (strict && next == '=') { - parseError('`&` did not start a character reference'); - } - return $0; - } else { - if (strict) { - parseError( - 'named character reference was not terminated by a semicolon' - ); - } - // Note: there is no need to check `has(decodeMapLegacy, reference)`. - return decodeMapLegacy[reference] + (next || ''); - } - } - - if ($4) { - // Decode decimal escapes, e.g. `𝌆`. - decDigits = $4; - semicolon = $5; - if (strict && !semicolon) { - parseError('character reference was not terminated by a semicolon'); - } - codePoint = parseInt(decDigits, 10); - return codePointToSymbol(codePoint, strict); - } - - if ($6) { - // Decode hexadecimal escapes, e.g. `𝌆`. - hexDigits = $6; - semicolon = $7; - if (strict && !semicolon) { - parseError('character reference was not terminated by a semicolon'); - } - codePoint = parseInt(hexDigits, 16); - return codePointToSymbol(codePoint, strict); - } - - // If we’re still here, `if ($7)` is implied; it’s an ambiguous - // ampersand for sure. https://mths.be/notes/ambiguous-ampersands - if (strict) { - parseError( - 'named character reference was not terminated by a semicolon' - ); - } - return $0; - }); - }; - // Expose default options (so they can be overridden globally). - decode.options = { - 'isAttributeValue': false, - 'strict': false - }; - - var escape = function(string) { - return string.replace(regexEscape, function($0) { - // Note: there is no need to check `has(escapeMap, $0)` here. - return escapeMap[$0]; - }); - }; - - /*--------------------------------------------------------------------------*/ - - var he = { - 'version': '1.2.0', - 'encode': encode, - 'decode': decode, - 'escape': escape, - 'unescape': decode - }; - - // Some AMD build optimizers, like r.js, check for specific condition patterns - // like the following: - if ( - typeof define == 'function' && - typeof define.amd == 'object' && - define.amd - ) { - define(function() { - return he; - }); - } else if (freeExports && !freeExports.nodeType) { - if (freeModule) { // in Node.js, io.js, or RingoJS v0.8.0+ - freeModule.exports = he; - } else { // in Narwhal or RingoJS v0.7.0- - for (var key in he) { - has(he, key) && (freeExports[key] = he[key]); - } - } - } else { // in Rhino or a web browser - root.he = he; - } - -}(this)); diff --git a/node_modules/he/man/he.1 b/node_modules/he/man/he.1 deleted file mode 100644 index 7696628a..00000000 --- a/node_modules/he/man/he.1 +++ /dev/null @@ -1,78 +0,0 @@ -.Dd April 5, 2016 -.Dt he 1 -.Sh NAME -.Nm he -.Nd encode/decode HTML entities just like a browser would -.Sh SYNOPSIS -.Nm -.Op Fl -escape Ar string -.br -.Op Fl -encode Ar string -.br -.Op Fl -encode Fl -use-named-refs Fl -everything Fl -allow-unsafe Ar string -.br -.Op Fl -decode Ar string -.br -.Op Fl -decode Fl -attribute Ar string -.br -.Op Fl -decode Fl -strict Ar string -.br -.Op Fl v | -version -.br -.Op Fl h | -help -.Sh DESCRIPTION -.Nm -encodes/decodes HTML entities in strings just like a browser would. -.Sh OPTIONS -.Bl -ohang -offset -.It Sy "--escape" -Take a string of text and escape it for use in text contexts in XML or HTML documents. Only the following characters are escaped: `&`, `<`, `>`, `"`, and `'`. -.It Sy "--encode" -Take a string of text and encode any symbols that aren't printable ASCII symbols and that can be replaced with character references. For example, it would turn `©` into `©`, but it wouldn't turn `+` into `+` since there is no point in doing so. Additionally, it replaces any remaining non-ASCII symbols with a hexadecimal escape sequence (e.g. `𝌆`). The return value of this function is always valid HTML. -.It Sy "--encode --use-named-refs" -Enable the use of named character references (like `©`) in the output. If compatibility with older browsers is a concern, don't use this option. -.It Sy "--encode --everything" -Encode every symbol in the input string, even safe printable ASCII symbols. -.It Sy "--encode --allow-unsafe" -Encode non-ASCII characters only. This leaves unsafe HTML/XML symbols like `&`, `<`, `>`, `"`, and `'` intact. -.It Sy "--encode --decimal" -Use decimal digits rather than hexadecimal digits for encoded character references, e.g. output `©` instead of `©`. -.It Sy "--decode" -Takes a string of HTML and decode any named and numerical character references in it using the algorithm described in the HTML spec. -.It Sy "--decode --attribute" -Parse the input as if it was an HTML attribute value rather than a string in an HTML text content. -.It Sy "--decode --strict" -Throw an error if an invalid character reference is encountered. -.It Sy "-v, --version" -Print he's version. -.It Sy "-h, --help" -Show the help screen. -.El -.Sh EXIT STATUS -The -.Nm he -utility exits with one of the following values: -.Pp -.Bl -tag -width flag -compact -.It Li 0 -.Nm -did what it was instructed to do successfully; either it encoded/decoded the input and printed the result, or it printed the version or usage message. -.It Li 1 -.Nm -encountered an error. -.El -.Sh EXAMPLES -.Bl -ohang -offset -.It Sy "he --escape ''" -Print an escaped version of the given string that is safe for use in HTML text contexts, escaping only `&`, `<`, `>`, `"`, and `'`. -.It Sy "he --decode '©𝌆'" -Print the decoded version of the given HTML string. -.It Sy "echo\ '©𝌆'\ |\ he --decode" -Print the decoded version of the HTML string that gets piped in. -.El -.Sh BUGS -he's bug tracker is located at . -.Sh AUTHOR -Mathias Bynens -.Sh WWW - diff --git a/node_modules/he/package.json b/node_modules/he/package.json deleted file mode 100644 index 76eff317..00000000 --- a/node_modules/he/package.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "name": "he", - "version": "1.2.0", - "description": "A robust HTML entities encoder/decoder with full Unicode support.", - "homepage": "https://mths.be/he", - "main": "he.js", - "bin": "bin/he", - "keywords": [ - "string", - "entities", - "entity", - "html", - "encode", - "decode", - "unicode" - ], - "license": "MIT", - "author": { - "name": "Mathias Bynens", - "url": "https://mathiasbynens.be/" - }, - "repository": { - "type": "git", - "url": "https://github.com/mathiasbynens/he.git" - }, - "bugs": "https://github.com/mathiasbynens/he/issues", - "files": [ - "LICENSE-MIT.txt", - "he.js", - "bin/", - "man/" - ], - "directories": { - "bin": "bin", - "man": "man", - "test": "tests" - }, - "scripts": { - "test": "node tests/tests.js", - "build": "grunt build" - }, - "devDependencies": { - "codecov.io": "^0.1.6", - "grunt": "^0.4.5", - "grunt-cli": "^1.3.1", - "grunt-shell": "^1.1.1", - "grunt-template": "^0.2.3", - "istanbul": "^0.4.2", - "jsesc": "^1.0.0", - "lodash": "^4.8.2", - "qunit-extras": "^1.4.5", - "qunitjs": "~1.11.0", - "regenerate": "^1.2.1", - "regexgen": "^1.3.0", - "requirejs": "^2.1.22", - "sort-object": "^3.0.2" - } -} diff --git a/node_modules/is-plain-obj/index.d.ts b/node_modules/is-plain-obj/index.d.ts deleted file mode 100644 index ac2614d7..00000000 --- a/node_modules/is-plain-obj/index.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -/** -Check if a value is a plain object. - -An object is plain if it's created by either `{}`, `new Object()`, or `Object.create(null)`. - -@example -``` -import isPlainObject = require('is-plain-obj'); - -isPlainObject({foo: 'bar'}); -//=> true - -isPlainObject(new Object()); -//=> true - -isPlainObject(Object.create(null)); -//=> true - -isPlainObject([1, 2, 3]); -//=> false - -class Unicorn {} -isPlainObject(new Unicorn()); -//=> false -``` -*/ -declare function isPlainObj(value: unknown): value is object; - -export = isPlainObj; diff --git a/node_modules/is-plain-obj/index.js b/node_modules/is-plain-obj/index.js deleted file mode 100644 index 95079ec6..00000000 --- a/node_modules/is-plain-obj/index.js +++ /dev/null @@ -1,10 +0,0 @@ -'use strict'; - -module.exports = value => { - if (Object.prototype.toString.call(value) !== '[object Object]') { - return false; - } - - const prototype = Object.getPrototypeOf(value); - return prototype === null || prototype === Object.prototype; -}; diff --git a/node_modules/is-plain-obj/license b/node_modules/is-plain-obj/license deleted file mode 100644 index e7af2f77..00000000 --- a/node_modules/is-plain-obj/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/is-plain-obj/package.json b/node_modules/is-plain-obj/package.json deleted file mode 100644 index 87512f17..00000000 --- a/node_modules/is-plain-obj/package.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "is-plain-obj", - "version": "2.1.0", - "description": "Check if a value is a plain object", - "license": "MIT", - "repository": "sindresorhus/is-plain-obj", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=8" - }, - "scripts": { - "test": "xo && ava && tsd" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "keywords": [ - "object", - "is", - "check", - "test", - "type", - "plain", - "vanilla", - "pure", - "simple" - ], - "devDependencies": { - "ava": "^1.4.1", - "tsd": "^0.7.2", - "xo": "^0.24.0" - } -} diff --git a/node_modules/is-plain-obj/readme.md b/node_modules/is-plain-obj/readme.md deleted file mode 100644 index 13571a87..00000000 --- a/node_modules/is-plain-obj/readme.md +++ /dev/null @@ -1,54 +0,0 @@ -# is-plain-obj [![Build Status](https://travis-ci.org/sindresorhus/is-plain-obj.svg?branch=master)](https://travis-ci.org/sindresorhus/is-plain-obj) - -> Check if a value is a plain object - -An object is plain if it's created by either `{}`, `new Object()`, or `Object.create(null)`. - - -## Install - -``` -$ npm install is-plain-obj -``` - - -## Usage - -```js -const isPlainObject = require('is-plain-obj'); - -isPlainObject({foo: 'bar'}); -//=> true - -isPlainObject(new Object()); -//=> true - -isPlainObject(Object.create(null)); -//=> true - -isPlainObject([1, 2, 3]); -//=> false - -class Unicorn {} -isPlainObject(new Unicorn()); -//=> false -``` - - -## Related - -- [is-obj](https://github.com/sindresorhus/is-obj) - Check if a value is an object -- [is](https://github.com/sindresorhus/is) - Type check values - - ---- - -
- - Get professional support for this package with a Tidelift subscription - -
- - Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. -
-
diff --git a/node_modules/jackspeak/LICENSE.md b/node_modules/jackspeak/LICENSE.md deleted file mode 100644 index 8cb5cc6e..00000000 --- a/node_modules/jackspeak/LICENSE.md +++ /dev/null @@ -1,55 +0,0 @@ -# Blue Oak Model License - -Version 1.0.0 - -## Purpose - -This license gives everyone as much permission to work with -this software as possible, while protecting contributors -from liability. - -## Acceptance - -In order to receive this license, you must agree to its -rules. The rules of this license are both obligations -under that agreement and conditions to your license. -You must not do anything with this software that triggers -a rule that you cannot or will not follow. - -## Copyright - -Each contributor licenses you to do everything with this -software that would otherwise infringe that contributor's -copyright in it. - -## Notices - -You must ensure that everyone who gets a copy of -any part of this software from you, with or without -changes, also gets the text of this license or a link to -. - -## Excuse - -If anyone notifies you in writing that you have not -complied with [Notices](#notices), you can keep your -license by taking all practical steps to comply within 30 -days after the notice. If you do not do so, your license -ends immediately. - -## Patent - -Each contributor licenses you to do everything with this -software that would otherwise infringe any patent claims -they can license or become able to license. - -## Reliability - -No contributor can revoke this license. - -## No Liability - -**_As far as the law allows, this software comes as is, -without any warranty or condition, and no contributor -will be liable to anyone for any damages related to this -software or this license, under any kind of legal claim._** diff --git a/node_modules/jackspeak/README.md b/node_modules/jackspeak/README.md deleted file mode 100644 index 4ffea4b3..00000000 --- a/node_modules/jackspeak/README.md +++ /dev/null @@ -1,357 +0,0 @@ -# jackspeak - -A very strict and proper argument parser. - -Validate string, boolean, and number options, from the command -line and the environment. - -Call the `jack` method with a config object, and then chain -methods off of it. - -At the end, call the `.parse()` method, and you'll get an object -with `positionals` and `values` members. - -Any unrecognized configs or invalid values will throw an error. - -As long as you define configs using object literals, types will -be properly inferred and TypeScript will know what kinds of -things you got. - -If you give it a prefix for environment variables, then defaults -will be read from the environment, and parsed values written back -to it, so you can easily pass configs through to child processes. - -Automatically generates a `usage`/`help` banner by calling the -`.usage()` method. - -Unless otherwise noted, all methods return the object itself. - -## USAGE - -```js -import { jack } from 'jackspeak' -// this works too: -// const { jack } = require('jackspeak') - -const { positionals, values } = jack({ envPrefix: 'FOO' }) - .flag({ - asdf: { description: 'sets the asfd flag', short: 'a', default: true }, - 'no-asdf': { description: 'unsets the asdf flag', short: 'A' }, - foo: { description: 'another boolean', short: 'f' }, - }) - .optList({ - 'ip-addrs': { - description: 'addresses to ip things', - delim: ',', // defaults to '\n' - default: ['127.0.0.1'], - }, - }) - .parse([ - 'some', - 'positional', - '--ip-addrs', - '192.168.0.1', - '--ip-addrs', - '1.1.1.1', - 'args', - '--foo', // sets the foo flag - '-A', // short for --no-asdf, sets asdf flag to false - ]) - -console.log(process.env.FOO_ASDF) // '0' -console.log(process.env.FOO_FOO) // '1' -console.log(values) // { -// 'ip-addrs': ['192.168.0.1', '1.1.1.1'], -// foo: true, -// asdf: false, -// } -console.log(process.env.FOO_IP_ADDRS) // '192.168.0.1,1.1.1.1' -console.log(positionals) // ['some', 'positional', 'args'] -``` - -## `jack(options: JackOptions = {}) => Jack` - -Returns a `Jack` object that can be used to chain and add -field definitions. The other methods (apart from `validate()`, -`parse()`, and `usage()` obviously) return the same Jack object, -updated with the new types, so they can be chained together as -shown in the code examples. - -Options: - -- `allowPositionals` Defaults to true. Set to `false` to not - allow any positional arguments. - -- `envPrefix` Set to a string to write configs to and read - configs from the environment. For example, if set to `MY_APP` - then the `foo-bar` config will default based on the value of - `env.MY_APP_FOO_BAR` and will write back to that when parsed. - - Boolean values are written as `'1'` and `'0'`, and will be - treated as `true` if they're `'1'` or false otherwise. - - Number values are written with their `toString()` - representation. - - Strings are just strings. - - Any value with `multiple: true` will be represented in the - environment split by a delimiter, which defaults to `\n`. - -- `env` The place to read/write environment variables. Defaults - to `process.env`. - -- `usage` A short usage string to print at the top of the help - banner. - -- `stopAtPositional` Boolean, default false. Stop parsing opts - and flags at the first positional argument. This is useful if - you want to pass certain options to subcommands, like some - programs do, so you can stop parsing and pass the positionals - to the subcommand to parse. - -- `stopAtPositionalTest` Conditional `stopAtPositional`. Provide - a function that takes a positional argument string and returns - boolean. If it returns `true`, then parsing will stop. Useful - when _some_ subcommands should parse the rest of the command - line options, and others should not. - -### `Jack.heading(text: string, level?: 1 | 2 | 3 | 4 | 5 | 6)` - -Define a short string heading, used in the `usage()` output. - -Indentation of the heading and subsequent description/config -usage entries (up until the next heading) is set by the heading -level. - -If the first usage item defined is a heading, it is always -treated as level 1, regardless of the argument provided. - -Headings level 1 and 2 will have a line of padding underneath -them. Headings level 3 through 6 will not. - -### `Jack.description(text: string, { pre?: boolean } = {})` - -Define a long string description, used in the `usage()` output. - -If the `pre` option is set to `true`, then whitespace will not be -normalized. However, if any line is too long for the width -allotted, it will still be wrapped. - -## Option Definitions - -Configs are defined by calling the appropriate field definition -method with an object where the keys are the long option name, -and the value defines the config. - -Options: - -- `type` Only needed for the `addFields` method, as the others - set it implicitly. Can be `'string'`, `'boolean'`, or - `'number'`. -- `multiple` Only needed for the `addFields` method, as the - others set it implicitly. Set to `true` to define an array - type. This means that it can be set on the CLI multiple times, - set as an array in the `values` - and it is represented in the environment as a delimited string. -- `short` A one-character shorthand for the option. -- `description` Some words to describe what this option is and - why you'd set it. -- `hint` (Only relevant for non-boolean types) The thing to show - in the usage output, like `--option=` -- `validate` A function that returns false (or throws) if an - option value is invalid. -- `validOptions` An array of strings or numbers that define the - valid values that can be set. This is not allowed on `boolean` - (flag) options. May be used along with a `validate()` method. -- `default` A default value for the field. Note that this may be - overridden by an environment variable, if present. - -### `Jack.flag({ [option: string]: definition, ... })` - -Define one or more boolean fields. - -Boolean options may be set to `false` by using a -`--no-${optionName}` argument, which will be implicitly created -if it's not defined to be something else. - -If a boolean option named `no-${optionName}` with the same -`multiple` setting is in the configuration, then that will be -treated as a negating flag. - -### `Jack.flagList({ [option: string]: definition, ... })` - -Define one or more boolean array fields. - -### `Jack.num({ [option: string]: definition, ... })` - -Define one or more number fields. These will be set in the -environment as a stringified number, and included in the `values` -object as a number. - -### `Jack.numList({ [option: string]: definition, ... })` - -Define one or more number list fields. These will be set in the -environment as a delimited set of stringified numbers, and -included in the `values` as a number array. - -### `Jack.opt({ [option: string]: definition, ... })` - -Define one or more string option fields. - -### `Jack.optList({ [option: string]: definition, ... })` - -Define one or more string list fields. - -### `Jack.addFields({ [option: string]: definition, ... })` - -Define one or more fields of any type. Note that `type` and -`multiple` must be set explicitly on each definition when using -this method. - -## Actions - -Use these methods on a Jack object that's already had its config -fields defined. - -### `Jack.parse(args: string[] = process.argv): { positionals: string[], values: OptionsResults }` - -Parse the arguments list, write to the environment if `envPrefix` -is set, and returned the parsed values and remaining positional -arguments. - -### `Jack.validate(o: any): asserts o is OptionsResults` - -Throws an error if the object provided is not a valid result set, -for the configurations defined thusfar. - -### `Jack.usage(): string` - -Returns the compiled `usage` string, with all option descriptions -and heading/description text, wrapped to the appropriate width -for the terminal. - -### `Jack.setConfigValues(options: OptionsResults, src?: string)` - -Validate the `options` argument, and set the default value for -each field that appears in the options. - -Values provided will be overridden by environment variables or -command line arguments. - -### `Jack.usageMarkdown(): string` - -Returns the compiled `usage` string, with all option descriptions -and heading/description text, but as markdown instead of -formatted for a terminal, for generating HTML documentation for -your CLI. - -## Some Example Code - -Also see [the examples -folder](https://github.com/isaacs/jackspeak/tree/master/examples) - -```js -import { jack } from 'jackspeak' - -const j = jack({ - // Optional - // This will be auto-generated from the descriptions if not supplied - // top level usage line, printed by -h - // will be auto-generated if not specified - usage: 'foo [options] ', -}) - .heading('The best Foo that ever Fooed') - .description( - ` - Executes all the files and interprets their output as - TAP formatted test result data. - - To parse TAP data from stdin, specify "-" as a filename. - `, - ) - - // flags don't take a value, they're boolean on or off, and can be - // turned off by prefixing with `--no-` - // so this adds support for -b to mean --bail, or -B to mean --no-bail - .flag({ - flag: { - // specify a short value if you like. this must be a single char - short: 'f', - // description is optional as well. - description: `Make the flags wave`, - // default value for flags is 'false', unless you change it - default: true, - }, - 'no-flag': { - // you can can always negate a flag with `--no-flag` - // specifying a negate option will let you define a short - // single-char option for negation. - short: 'F', - description: `Do not wave the flags`, - }, - }) - - // Options that take a value are specified with `opt()` - .opt({ - reporter: { - short: 'R', - description: 'the style of report to display', - }, - }) - - // if you want a number, say so, and jackspeak will enforce it - .num({ - jobs: { - short: 'j', - description: 'how many jobs to run in parallel', - default: 1, - }, - }) - - // A list is an option that can be specified multiple times, - // to expand into an array of all the settings. Normal opts - // will just give you the last value specified. - .optList({ - 'node-arg': {}, - }) - - // a flagList is an array of booleans, so `-ddd` is [true, true, true] - // count the `true` values to treat it as a counter. - .flagList({ - debug: { short: 'd' }, - }) - - // opts take a value, and is set to the string in the results - // you can combine multiple short-form flags together, but - // an opt will end the combine chain, posix-style. So, - // -bofilename would be like --bail --output-file=filename - .opt({ - 'output-file': { - short: 'o', - // optional: make it -o in the help output insead of -o - hint: 'file', - description: `Send the raw output to the specified file.`, - }, - }) - -// now we can parse argv like this: -const { values, positionals } = j.parse(process.argv) - -// or decide to show the usage banner -console.log(j.usage()) - -// or validate an object config we got from somewhere else -try { - j.validate(someConfig) -} catch (er) { - console.error('someConfig is not valid!', er) -} -``` - -## Name - -The inspiration for this module is [yargs](http://npm.im/yargs), which -is pirate talk themed. Yargs has all the features, and is infinitely -flexible. "Jackspeak" is the slang of the royal navy. This module -does not have all the features. It is declarative and rigid by design. diff --git a/node_modules/jackspeak/dist/commonjs/index.d.ts b/node_modules/jackspeak/dist/commonjs/index.d.ts deleted file mode 100644 index d28bcc18..00000000 --- a/node_modules/jackspeak/dist/commonjs/index.d.ts +++ /dev/null @@ -1,315 +0,0 @@ -/// -export type ConfigType = 'number' | 'string' | 'boolean'; -/** - * Given a Jack object, get the typeof its ConfigSet - */ -export type Unwrap = J extends Jack ? C : never; -import { inspect, InspectOptions } from 'node:util'; -/** - * Defines the type of value that is valid, given a config definition's - * {@link ConfigType} and boolean multiple setting - */ -export type ValidValue = [ - T, - M -] extends ['number', true] ? number[] : [T, M] extends ['string', true] ? string[] : [T, M] extends ['boolean', true] ? boolean[] : [T, M] extends ['number', false] ? number : [T, M] extends ['string', false] ? string : [T, M] extends ['boolean', false] ? boolean : [T, M] extends ['string', boolean] ? string | string[] : [T, M] extends ['boolean', boolean] ? boolean | boolean[] : [T, M] extends ['number', boolean] ? number | number[] : [T, M] extends [ConfigType, false] ? string | number | boolean : [T, M] extends [ConfigType, true] ? string[] | number[] | boolean[] : string | number | boolean | string[] | number[] | boolean[]; -/** - * The meta information for a config option definition, when the - * type and multiple values can be inferred by the method being used - */ -export type ConfigOptionMeta = { - default?: undefined | (ValidValue & (O extends number[] | string[] ? M extends false ? O[number] : O[number][] : unknown)); - validOptions?: O; - description?: string; - validate?: ((v: unknown) => v is ValidValue) | ((v: unknown) => boolean); - short?: string | undefined; - type?: T; - hint?: T extends 'boolean' ? never : string; - delim?: M extends true ? string : never; -} & (M extends false ? { - multiple?: false | undefined; -} : M extends true ? { - multiple: true; -} : { - multiple?: boolean; -}); -/** - * A set of {@link ConfigOptionMeta} fields, referenced by their longOption - * string values. - */ -export type ConfigMetaSet = { - [longOption: string]: ConfigOptionMeta; -}; -/** - * Infer {@link ConfigSet} fields from a given {@link ConfigMetaSet} - */ -export type ConfigSetFromMetaSet> = { - [longOption in keyof S]: ConfigOptionBase; -}; -/** - * Fields that can be set on a {@link ConfigOptionBase} or - * {@link ConfigOptionMeta} based on whether or not the field is known to be - * multiple. - */ -export type MultiType = M extends true ? { - multiple: true; - delim?: string | undefined; -} : M extends false ? { - multiple?: false | undefined; - delim?: undefined; -} : { - multiple?: boolean | undefined; - delim?: string | undefined; -}; -/** - * A config field definition, in its full representation. - */ -export type ConfigOptionBase = { - type: T; - short?: string | undefined; - default?: ValidValue | undefined; - description?: string; - hint?: T extends 'boolean' ? undefined : string | undefined; - validate?: (v: unknown) => v is ValidValue; - validOptions?: T extends 'boolean' ? undefined : T extends 'string' ? readonly string[] : T extends 'number' ? readonly number[] : readonly number[] | readonly string[]; -} & MultiType; -export declare const isConfigType: (t: string) => t is ConfigType; -export declare const isConfigOption: (o: any, type: T, multi: M) => o is ConfigOptionBase; -/** - * A set of {@link ConfigOptionBase} objects, referenced by their longOption - * string values. - */ -export type ConfigSet = { - [longOption: string]: ConfigOptionBase; -}; -/** - * The 'values' field returned by {@link Jack#parse} - */ -export type OptionsResults = { - [k in keyof T]?: T[k]['validOptions'] extends (readonly string[] | readonly number[]) ? T[k] extends ConfigOptionBase<'string' | 'number', false> ? T[k]['validOptions'][number] : T[k] extends ConfigOptionBase<'string' | 'number', true> ? T[k]['validOptions'][number][] : never : T[k] extends ConfigOptionBase<'string', false> ? string : T[k] extends ConfigOptionBase<'string', true> ? string[] : T[k] extends ConfigOptionBase<'number', false> ? number : T[k] extends ConfigOptionBase<'number', true> ? number[] : T[k] extends ConfigOptionBase<'boolean', false> ? boolean : T[k] extends ConfigOptionBase<'boolean', true> ? boolean[] : never; -}; -/** - * The object retured by {@link Jack#parse} - */ -export type Parsed = { - values: OptionsResults; - positionals: string[]; -}; -/** - * A row used when generating the {@link Jack#usage} string - */ -export interface Row { - left?: string; - text: string; - skipLine?: boolean; - type?: string; -} -/** - * A heading for a section in the usage, created by the jack.heading() - * method. - * - * First heading is always level 1, subsequent headings default to 2. - * - * The level of the nearest heading level sets the indentation of the - * description that follows. - */ -export interface Heading extends Row { - type: 'heading'; - text: string; - left?: ''; - skipLine?: boolean; - level: number; - pre?: boolean; -} -/** - * An arbitrary blob of text describing some stuff, set by the - * jack.description() method. - * - * Indentation determined by level of the nearest header. - */ -export interface Description extends Row { - type: 'description'; - text: string; - left?: ''; - skipLine?: boolean; - pre?: boolean; -} -/** - * A heading or description row used when generating the {@link Jack#usage} - * string - */ -export type TextRow = Heading | Description; -/** - * Either a {@link TextRow} or a reference to a {@link ConfigOptionBase} - */ -export type UsageField = TextRow | { - type: 'config'; - name: string; - value: ConfigOptionBase; -}; -/** - * Options provided to the {@link Jack} constructor - */ -export interface JackOptions { - /** - * Whether to allow positional arguments - * - * @default true - */ - allowPositionals?: boolean; - /** - * Prefix to use when reading/writing the environment variables - * - * If not specified, environment behavior will not be available. - */ - envPrefix?: string; - /** - * Environment object to read/write. Defaults `process.env`. - * No effect if `envPrefix` is not set. - */ - env?: { - [k: string]: string | undefined; - }; - /** - * A short usage string. If not provided, will be generated from the - * options provided, but that can of course be rather verbose if - * there are a lot of options. - */ - usage?: string; - /** - * Stop parsing flags and opts at the first positional argument. - * This is to support cases like `cmd [flags] [options]`, where - * each subcommand may have different options. This effectively treats - * any positional as a `--` argument. Only relevant if `allowPositionals` - * is true. - * - * To do subcommands, set this option, look at the first positional, and - * parse the remaining positionals as appropriate. - * - * @default false - */ - stopAtPositional?: boolean; - /** - * Conditional `stopAtPositional`. If set to a `(string)=>boolean` function, - * will be called with each positional argument encountered. If the function - * returns true, then parsing will stop at that point. - */ - stopAtPositionalTest?: (arg: string) => boolean; -} -/** - * Class returned by the {@link jack} function and all configuration - * definition methods. This is what gets chained together. - */ -export declare class Jack { - #private; - constructor(options?: JackOptions); - /** - * Set the default value (which will still be overridden by env or cli) - * as if from a parsed config file. The optional `source` param, if - * provided, will be included in error messages if a value is invalid or - * unknown. - */ - setConfigValues(values: OptionsResults, source?: string): this; - /** - * Parse a string of arguments, and return the resulting - * `{ values, positionals }` object. - * - * If an {@link JackOptions#envPrefix} is set, then it will read default - * values from the environment, and write the resulting values back - * to the environment as well. - * - * Environment values always take precedence over any other value, except - * an explicit CLI setting. - */ - parse(args?: string[]): Parsed; - loadEnvDefaults(): void; - applyDefaults(p: Parsed): void; - /** - * Only parse the command line arguments passed in. - * Does not strip off the `node script.js` bits, so it must be just the - * arguments you wish to have parsed. - * Does not read from or write to the environment, or set defaults. - */ - parseRaw(args: string[]): Parsed; - /** - * Validate that any arbitrary object is a valid configuration `values` - * object. Useful when loading config files or other sources. - */ - validate(o: unknown): asserts o is Parsed['values']; - writeEnv(p: Parsed): void; - /** - * Add a heading to the usage output banner - */ - heading(text: string, level?: 1 | 2 | 3 | 4 | 5 | 6, { pre }?: { - pre?: boolean; - }): Jack; - /** - * Add a long-form description to the usage output at this position. - */ - description(text: string, { pre }?: { - pre?: boolean; - }): Jack; - /** - * Add one or more number fields. - */ - num>(fields: F): Jack>; - /** - * Add one or more multiple number fields. - */ - numList>(fields: F): Jack>; - /** - * Add one or more string option fields. - */ - opt>(fields: F): Jack>; - /** - * Add one or more multiple string option fields. - */ - optList>(fields: F): Jack>; - /** - * Add one or more flag fields. - */ - flag>(fields: F): Jack>; - /** - * Add one or more multiple flag fields. - */ - flagList>(fields: F): Jack>; - /** - * Generic field definition method. Similar to flag/flagList/number/etc, - * but you must specify the `type` (and optionally `multiple` and `delim`) - * fields on each one, or Jack won't know how to define them. - */ - addFields(fields: F): Jack; - /** - * Return the usage banner for the given configuration - */ - usage(): string; - /** - * Return the usage banner markdown for the given configuration - */ - usageMarkdown(): string; - /** - * Return the configuration options as a plain object - */ - toJSON(): { - [k: string]: { - hint?: string | undefined; - default?: string | number | boolean | string[] | number[] | boolean[] | undefined; - validOptions?: readonly number[] | readonly string[] | undefined; - validate?: ((v: unknown) => v is string | number | boolean | string[] | number[] | boolean[]) | undefined; - description?: string | undefined; - short?: string | undefined; - delim?: string | undefined; - multiple?: boolean | undefined; - type: ConfigType; - }; - }; - /** - * Custom printer for `util.inspect` - */ - [inspect.custom](_: number, options: InspectOptions): string; -} -/** - * Main entry point. Create and return a {@link Jack} object. - */ -export declare const jack: (options?: JackOptions) => Jack<{}>; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/jackspeak/dist/commonjs/index.d.ts.map b/node_modules/jackspeak/dist/commonjs/index.d.ts.map deleted file mode 100644 index faf9ddd0..00000000 --- a/node_modules/jackspeak/dist/commonjs/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAA;AAExD;;GAEG;AACH,MAAM,MAAM,MAAM,CAAC,CAAC,IAAI,CAAC,SAAS,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK,CAAA;AAE3D,OAAO,EAAE,OAAO,EAAE,cAAc,EAAmB,MAAM,WAAW,CAAA;AA2DpE;;;GAGG;AACH,MAAM,MAAM,UAAU,CACpB,CAAC,SAAS,UAAU,GAAG,UAAU,EACjC,CAAC,SAAS,OAAO,GAAG,OAAO,IAE3B;IAAC,CAAC;IAAE,CAAC;CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,CAAC,GAAG,MAAM,EAAE,GACxC,CAAC,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,QAAQ,EAAE,I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ACvC,MAAM,EAAE,CAAC,GACR,IAAI,CAAC,CAAC,GAAG,oBAAoB,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IAIpD;;OAEG;IACH,IAAI,CAAC,CAAC,SAAS,aAAa,CAAC,SAAS,EAAE,KAAK,CAAC,EAC5C,MAAM,EAAE,CAAC,GACR,IAAI,CAAC,CAAC,GAAG,oBAAoB,CAAC,SAAS,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;IAItD;;OAEG;IACH,QAAQ,CAAC,CAAC,SAAS,aAAa,CAAC,SAAS,CAAC,EACzC,MAAM,EAAE,CAAC,GACR,IAAI,CAAC,CAAC,GAAG,oBAAoB,CAAC,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IAIrD;;;;OAIG;IACH,SAAS,CAAC,CAAC,SAAS,SAAS,EAAE,MAAM,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;IA4EtD;;OAEG;IACH,KAAK,IAAI,MAAM;IAgGf;;OAEG;IACH,aAAa,IAAI,MAAM;IAgIvB;;OAEG;IACH,MAAM;;;;;;;;;;;;;IAqBN;;OAEG;IACH,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc;CAGpD;AAsED;;GAEG;AACH,eAAO,MAAM,IAAI,aAAa,WAAW,aAA2B,CAAA"} \ No newline at end of file diff --git a/node_modules/jackspeak/dist/commonjs/index.js b/node_modules/jackspeak/dist/commonjs/index.js deleted file mode 100644 index f7fc9cb6..00000000 --- a/node_modules/jackspeak/dist/commonjs/index.js +++ /dev/null @@ -1,1010 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.jack = exports.Jack = exports.isConfigOption = exports.isConfigType = void 0; -const node_util_1 = require("node:util"); -const parse_args_js_1 = require("./parse-args.js"); -// it's a tiny API, just cast it inline, it's fine -//@ts-ignore -const cliui_1 = __importDefault(require("@isaacs/cliui")); -const node_path_1 = require("node:path"); -const width = Math.min((process && process.stdout && process.stdout.columns) || 80, 80); -// indentation spaces from heading level -const indent = (n) => (n - 1) * 2; -const toEnvKey = (pref, key) => { - return [pref, key.replace(/[^a-zA-Z0-9]+/g, ' ')] - .join(' ') - .trim() - .toUpperCase() - .replace(/ /g, '_'); -}; -const toEnvVal = (value, delim = '\n') => { - const str = typeof value === 'string' ? value - : typeof value === 'boolean' ? - value ? '1' - : '0' - : typeof value === 'number' ? String(value) - : Array.isArray(value) ? - value.map((v) => toEnvVal(v)).join(delim) - : /* c8 ignore start */ undefined; - if (typeof str !== 'string') { - throw new Error(`could not serialize value to environment: ${JSON.stringify(value)}`); - } - /* c8 ignore stop */ - return str; -}; -const fromEnvVal = (env, type, multiple, delim = '\n') => (multiple ? - env ? env.split(delim).map(v => fromEnvVal(v, type, false)) - : [] - : type === 'string' ? env - : type === 'boolean' ? env === '1' - : +env.trim()); -const isConfigType = (t) => typeof t === 'string' && - (t === 'string' || t === 'number' || t === 'boolean'); -exports.isConfigType = isConfigType; -const undefOrType = (v, t) => v === undefined || typeof v === t; -const undefOrTypeArray = (v, t) => v === undefined || (Array.isArray(v) && v.every(x => typeof x === t)); -const isValidOption = (v, vo) => Array.isArray(v) ? v.every(x => isValidOption(x, vo)) : vo.includes(v); -// print the value type, for error message reporting -const valueType = (v) => typeof v === 'string' ? 'string' - : typeof v === 'boolean' ? 'boolean' - : typeof v === 'number' ? 'number' - : Array.isArray(v) ? - joinTypes([...new Set(v.map(v => valueType(v)))]) + '[]' - : `${v.type}${v.multiple ? '[]' : ''}`; -const joinTypes = (types) => types.length === 1 && typeof types[0] === 'string' ? - types[0] - : `(${types.join('|')})`; -const isValidValue = (v, type, multi) => { - if (multi) { - if (!Array.isArray(v)) - return false; - return !v.some((v) => !isValidValue(v, type, false)); - } - if (Array.isArray(v)) - return false; - return typeof v === type; -}; -const isConfigOption = (o, type, multi) => !!o && - typeof o === 'object' && - (0, exports.isConfigType)(o.type) && - o.type === type && - undefOrType(o.short, 'string') && - undefOrType(o.description, 'string') && - undefOrType(o.hint, 'string') && - undefOrType(o.validate, 'function') && - (o.type === 'boolean' ? - o.validOptions === undefined - : undefOrTypeArray(o.validOptions, o.type)) && - (o.default === undefined || isValidValue(o.default, type, multi)) && - !!o.multiple === multi; -exports.isConfigOption = isConfigOption; -function num(o = {}) { - const { default: def, validate: val, validOptions, ...rest } = o; - if (def !== undefined && !isValidValue(def, 'number', false)) { - throw new TypeError('invalid default value', { - cause: { - found: def, - wanted: 'number', - }, - }); - } - if (!undefOrTypeArray(validOptions, 'number')) { - throw new TypeError('invalid validOptions', { - cause: { - found: validOptions, - wanted: 'number[]', - }, - }); - } - const validate = val ? - val - : undefined; - return { - ...rest, - default: def, - validate, - validOptions, - type: 'number', - multiple: false, - }; -} -function numList(o = {}) { - const { default: def, validate: val, validOptions, ...rest } = o; - if (def !== undefined && !isValidValue(def, 'number', true)) { - throw new TypeError('invalid default value', { - cause: { - found: def, - wanted: 'number[]', - }, - }); - } - if (!undefOrTypeArray(validOptions, 'number')) { - throw new TypeError('invalid validOptions', { - cause: { - found: validOptions, - wanted: 'number[]', - }, - }); - } - const validate = val ? - val - : undefined; - return { - ...rest, - default: def, - validate, - validOptions, - type: 'number', - multiple: true, - }; -} -function opt(o = {}) { - const { default: def, validate: val, validOptions, ...rest } = o; - if (def !== undefined && !isValidValue(def, 'string', false)) { - throw new TypeError('invalid default value', { - cause: { - found: def, - wanted: 'string', - }, - }); - } - if (!undefOrTypeArray(validOptions, 'string')) { - throw new TypeError('invalid validOptions', { - cause: { - found: validOptions, - wanted: 'string[]', - }, - }); - } - const validate = val ? - val - : undefined; - return { - ...rest, - default: def, - validate, - validOptions, - type: 'string', - multiple: false, - }; -} -function optList(o = {}) { - const { default: def, validate: val, validOptions, ...rest } = o; - if (def !== undefined && !isValidValue(def, 'string', true)) { - throw new TypeError('invalid default value', { - cause: { - found: def, - wanted: 'string[]', - }, - }); - } - if (!undefOrTypeArray(validOptions, 'string')) { - throw new TypeError('invalid validOptions', { - cause: { - found: validOptions, - wanted: 'string[]', - }, - }); - } - const validate = val ? - val - : undefined; - return { - ...rest, - default: def, - validate, - validOptions, - type: 'string', - multiple: true, - }; -} -function flag(o = {}) { - const { hint, default: def, validate: val, ...rest } = o; - delete rest.validOptions; - if (def !== undefined && !isValidValue(def, 'boolean', false)) { - throw new TypeError('invalid default value'); - } - const validate = val ? - val - : undefined; - if (hint !== undefined) { - throw new TypeError('cannot provide hint for flag'); - } - return { - ...rest, - default: def, - validate, - type: 'boolean', - multiple: false, - }; -} -function flagList(o = {}) { - const { hint, default: def, validate: val, ...rest } = o; - delete rest.validOptions; - if (def !== undefined && !isValidValue(def, 'boolean', true)) { - throw new TypeError('invalid default value'); - } - const validate = val ? - val - : undefined; - if (hint !== undefined) { - throw new TypeError('cannot provide hint for flag list'); - } - return { - ...rest, - default: def, - validate, - type: 'boolean', - multiple: true, - }; -} -const toParseArgsOptionsConfig = (options) => { - const c = {}; - for (const longOption in options) { - const config = options[longOption]; - /* c8 ignore start */ - if (!config) { - throw new Error('config must be an object: ' + longOption); - } - /* c8 ignore start */ - if ((0, exports.isConfigOption)(config, 'number', true)) { - c[longOption] = { - type: 'string', - multiple: true, - default: config.default?.map(c => String(c)), - }; - } - else if ((0, exports.isConfigOption)(config, 'number', false)) { - c[longOption] = { - type: 'string', - multiple: false, - default: config.default === undefined ? - undefined - : String(config.default), - }; - } - else { - const conf = config; - c[longOption] = { - type: conf.type, - multiple: !!conf.multiple, - default: conf.default, - }; - } - const clo = c[longOption]; - if (typeof config.short === 'string') { - clo.short = config.short; - } - if (config.type === 'boolean' && - !longOption.startsWith('no-') && - !options[`no-${longOption}`]) { - c[`no-${longOption}`] = { - type: 'boolean', - multiple: config.multiple, - }; - } - } - return c; -}; -const isHeading = (r) => r.type === 'heading'; -const isDescription = (r) => r.type === 'description'; -/** - * Class returned by the {@link jack} function and all configuration - * definition methods. This is what gets chained together. - */ -class Jack { - #configSet; - #shorts; - #options; - #fields = []; - #env; - #envPrefix; - #allowPositionals; - #usage; - #usageMarkdown; - constructor(options = {}) { - this.#options = options; - this.#allowPositionals = options.allowPositionals !== false; - this.#env = - this.#options.env === undefined ? process.env : this.#options.env; - this.#envPrefix = options.envPrefix; - // We need to fib a little, because it's always the same object, but it - // starts out as having an empty config set. Then each method that adds - // fields returns `this as Jack` - this.#configSet = Object.create(null); - this.#shorts = Object.create(null); - } - /** - * Set the default value (which will still be overridden by env or cli) - * as if from a parsed config file. The optional `source` param, if - * provided, will be included in error messages if a value is invalid or - * unknown. - */ - setConfigValues(values, source = '') { - try { - this.validate(values); - } - catch (er) { - const e = er; - if (source && e && typeof e === 'object') { - if (e.cause && typeof e.cause === 'object') { - Object.assign(e.cause, { path: source }); - } - else { - e.cause = { path: source }; - } - } - throw e; - } - for (const [field, value] of Object.entries(values)) { - const my = this.#configSet[field]; - // already validated, just for TS's benefit - /* c8 ignore start */ - if (!my) { - throw new Error('unexpected field in config set: ' + field, { - cause: { found: field }, - }); - } - /* c8 ignore stop */ - my.default = value; - } - return this; - } - /** - * Parse a string of arguments, and return the resulting - * `{ values, positionals }` object. - * - * If an {@link JackOptions#envPrefix} is set, then it will read default - * values from the environment, and write the resulting values back - * to the environment as well. - * - * Environment values always take precedence over any other value, except - * an explicit CLI setting. - */ - parse(args = process.argv) { - this.loadEnvDefaults(); - const p = this.parseRaw(args); - this.applyDefaults(p); - this.writeEnv(p); - return p; - } - loadEnvDefaults() { - if (this.#envPrefix) { - for (const [field, my] of Object.entries(this.#configSet)) { - const ek = toEnvKey(this.#envPrefix, field); - const env = this.#env[ek]; - if (env !== undefined) { - my.default = fromEnvVal(env, my.type, !!my.multiple, my.delim); - } - } - } - } - applyDefaults(p) { - for (const [field, c] of Object.entries(this.#configSet)) { - if (c.default !== undefined && !(field in p.values)) { - //@ts-ignore - p.values[field] = c.default; - } - } - } - /** - * Only parse the command line arguments passed in. - * Does not strip off the `node script.js` bits, so it must be just the - * arguments you wish to have parsed. - * Does not read from or write to the environment, or set defaults. - */ - parseRaw(args) { - if (args === process.argv) { - args = args.slice(process._eval !== undefined ? 1 : 2); - } - const options = toParseArgsOptionsConfig(this.#configSet); - const result = (0, parse_args_js_1.parseArgs)({ - args, - options, - // always strict, but using our own logic - strict: false, - allowPositionals: this.#allowPositionals, - tokens: true, - }); - const p = { - values: {}, - positionals: [], - }; - for (const token of result.tokens) { - if (token.kind === 'positional') { - p.positionals.push(token.value); - if (this.#options.stopAtPositional || - this.#options.stopAtPositionalTest?.(token.value)) { - p.positionals.push(...args.slice(token.index + 1)); - break; - } - } - else if (token.kind === 'option') { - let value = undefined; - if (token.name.startsWith('no-')) { - const my = this.#configSet[token.name]; - const pname = token.name.substring('no-'.length); - const pos = this.#configSet[pname]; - if (pos && - pos.type === 'boolean' && - (!my || - (my.type === 'boolean' && !!my.multiple === !!pos.multiple))) { - value = false; - token.name = pname; - } - } - const my = this.#configSet[token.name]; - if (!my) { - throw new Error(`Unknown option '${token.rawName}'. ` + - `To specify a positional argument starting with a '-', ` + - `place it at the end of the command after '--', as in ` + - `'-- ${token.rawName}'`, { - cause: { - found: token.rawName + (token.value ? `=${token.value}` : ''), - }, - }); - } - if (value === undefined) { - if (token.value === undefined) { - if (my.type !== 'boolean') { - throw new Error(`No value provided for ${token.rawName}, expected ${my.type}`, { - cause: { - name: token.rawName, - wanted: valueType(my), - }, - }); - } - value = true; - } - else { - if (my.type === 'boolean') { - throw new Error(`Flag ${token.rawName} does not take a value, received '${token.value}'`, { cause: { found: token } }); - } - if (my.type === 'string') { - value = token.value; - } - else { - value = +token.value; - if (value !== value) { - throw new Error(`Invalid value '${token.value}' provided for ` + - `'${token.rawName}' option, expected number`, { - cause: { - name: token.rawName, - found: token.value, - wanted: 'number', - }, - }); - } - } - } - } - if (my.multiple) { - const pv = p.values; - const tn = pv[token.name] ?? []; - pv[token.name] = tn; - tn.push(value); - } - else { - const pv = p.values; - pv[token.name] = value; - } - } - } - for (const [field, value] of Object.entries(p.values)) { - const valid = this.#configSet[field]?.validate; - const validOptions = this.#configSet[field]?.validOptions; - let cause; - if (validOptions && !isValidOption(value, validOptions)) { - cause = { name: field, found: value, validOptions: validOptions }; - } - if (valid && !valid(value)) { - cause = cause || { name: field, found: value }; - } - if (cause) { - throw new Error(`Invalid value provided for --${field}: ${JSON.stringify(value)}`, { cause }); - } - } - return p; - } - /** - * do not set fields as 'no-foo' if 'foo' exists and both are bools - * just set foo. - */ - #noNoFields(f, val, s = f) { - if (!f.startsWith('no-') || typeof val !== 'boolean') - return; - const yes = f.substring('no-'.length); - // recurse so we get the core config key we care about. - this.#noNoFields(yes, val, s); - if (this.#configSet[yes]?.type === 'boolean') { - throw new Error(`do not set '${s}', instead set '${yes}' as desired.`, { cause: { found: s, wanted: yes } }); - } - } - /** - * Validate that any arbitrary object is a valid configuration `values` - * object. Useful when loading config files or other sources. - */ - validate(o) { - if (!o || typeof o !== 'object') { - throw new Error('Invalid config: not an object', { - cause: { found: o }, - }); - } - const opts = o; - for (const field in o) { - const value = opts[field]; - /* c8 ignore next - for TS */ - if (value === undefined) - continue; - this.#noNoFields(field, value); - const config = this.#configSet[field]; - if (!config) { - throw new Error(`Unknown config option: ${field}`, { - cause: { found: field }, - }); - } - if (!isValidValue(value, config.type, !!config.multiple)) { - throw new Error(`Invalid value ${valueType(value)} for ${field}, expected ${valueType(config)}`, { - cause: { - name: field, - found: value, - wanted: valueType(config), - }, - }); - } - let cause; - if (config.validOptions && - !isValidOption(value, config.validOptions)) { - cause = { - name: field, - found: value, - validOptions: config.validOptions, - }; - } - if (config.validate && !config.validate(value)) { - cause = cause || { name: field, found: value }; - } - if (cause) { - throw new Error(`Invalid config value for ${field}: ${value}`, { - cause, - }); - } - } - } - writeEnv(p) { - if (!this.#env || !this.#envPrefix) - return; - for (const [field, value] of Object.entries(p.values)) { - const my = this.#configSet[field]; - this.#env[toEnvKey(this.#envPrefix, field)] = toEnvVal(value, my?.delim); - } - } - /** - * Add a heading to the usage output banner - */ - heading(text, level, { pre = false } = {}) { - if (level === undefined) { - level = this.#fields.some(r => isHeading(r)) ? 2 : 1; - } - this.#fields.push({ type: 'heading', text, level, pre }); - return this; - } - /** - * Add a long-form description to the usage output at this position. - */ - description(text, { pre } = {}) { - this.#fields.push({ type: 'description', text, pre }); - return this; - } - /** - * Add one or more number fields. - */ - num(fields) { - return this.#addFields(fields, num); - } - /** - * Add one or more multiple number fields. - */ - numList(fields) { - return this.#addFields(fields, numList); - } - /** - * Add one or more string option fields. - */ - opt(fields) { - return this.#addFields(fields, opt); - } - /** - * Add one or more multiple string option fields. - */ - optList(fields) { - return this.#addFields(fields, optList); - } - /** - * Add one or more flag fields. - */ - flag(fields) { - return this.#addFields(fields, flag); - } - /** - * Add one or more multiple flag fields. - */ - flagList(fields) { - return this.#addFields(fields, flagList); - } - /** - * Generic field definition method. Similar to flag/flagList/number/etc, - * but you must specify the `type` (and optionally `multiple` and `delim`) - * fields on each one, or Jack won't know how to define them. - */ - addFields(fields) { - const next = this; - for (const [name, field] of Object.entries(fields)) { - this.#validateName(name, field); - next.#fields.push({ - type: 'config', - name, - value: field, - }); - } - Object.assign(next.#configSet, fields); - return next; - } - #addFields(fields, fn) { - const next = this; - Object.assign(next.#configSet, Object.fromEntries(Object.entries(fields).map(([name, field]) => { - this.#validateName(name, field); - const option = fn(field); - next.#fields.push({ - type: 'config', - name, - value: option, - }); - return [name, option]; - }))); - return next; - } - #validateName(name, field) { - if (!/^[a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?$/.test(name)) { - throw new TypeError(`Invalid option name: ${name}, ` + - `must be '-' delimited ASCII alphanumeric`); - } - if (this.#configSet[name]) { - throw new TypeError(`Cannot redefine option ${field}`); - } - if (this.#shorts[name]) { - throw new TypeError(`Cannot redefine option ${name}, already ` + - `in use for ${this.#shorts[name]}`); - } - if (field.short) { - if (!/^[a-zA-Z0-9]$/.test(field.short)) { - throw new TypeError(`Invalid ${name} short option: ${field.short}, ` + - 'must be 1 ASCII alphanumeric character'); - } - if (this.#shorts[field.short]) { - throw new TypeError(`Invalid ${name} short option: ${field.short}, ` + - `already in use for ${this.#shorts[field.short]}`); - } - this.#shorts[field.short] = name; - this.#shorts[name] = name; - } - } - /** - * Return the usage banner for the given configuration - */ - usage() { - if (this.#usage) - return this.#usage; - let headingLevel = 1; - const ui = (0, cliui_1.default)({ width }); - const first = this.#fields[0]; - let start = first?.type === 'heading' ? 1 : 0; - if (first?.type === 'heading') { - ui.div({ - padding: [0, 0, 0, 0], - text: normalize(first.text), - }); - } - ui.div({ padding: [0, 0, 0, 0], text: 'Usage:' }); - if (this.#options.usage) { - ui.div({ - text: this.#options.usage, - padding: [0, 0, 0, 2], - }); - } - else { - const cmd = (0, node_path_1.basename)(String(process.argv[1])); - const shortFlags = []; - const shorts = []; - const flags = []; - const opts = []; - for (const [field, config] of Object.entries(this.#configSet)) { - if (config.short) { - if (config.type === 'boolean') - shortFlags.push(config.short); - else - shorts.push([config.short, config.hint || field]); - } - else { - if (config.type === 'boolean') - flags.push(field); - else - opts.push([field, config.hint || field]); - } - } - const sf = shortFlags.length ? ' -' + shortFlags.join('') : ''; - const so = shorts.map(([k, v]) => ` --${k}=<${v}>`).join(''); - const lf = flags.map(k => ` --${k}`).join(''); - const lo = opts.map(([k, v]) => ` --${k}=<${v}>`).join(''); - const usage = `${cmd}${sf}${so}${lf}${lo}`.trim(); - ui.div({ - text: usage, - padding: [0, 0, 0, 2], - }); - } - ui.div({ padding: [0, 0, 0, 0], text: '' }); - const maybeDesc = this.#fields[start]; - if (maybeDesc && isDescription(maybeDesc)) { - const print = normalize(maybeDesc.text, maybeDesc.pre); - start++; - ui.div({ padding: [0, 0, 0, 0], text: print }); - ui.div({ padding: [0, 0, 0, 0], text: '' }); - } - const { rows, maxWidth } = this.#usageRows(start); - // every heading/description after the first gets indented by 2 - // extra spaces. - for (const row of rows) { - if (row.left) { - // If the row is too long, don't wrap it - // Bump the right-hand side down a line to make room - const configIndent = indent(Math.max(headingLevel, 2)); - if (row.left.length > maxWidth - 3) { - ui.div({ text: row.left, padding: [0, 0, 0, configIndent] }); - ui.div({ text: row.text, padding: [0, 0, 0, maxWidth] }); - } - else { - ui.div({ - text: row.left, - padding: [0, 1, 0, configIndent], - width: maxWidth, - }, { padding: [0, 0, 0, 0], text: row.text }); - } - if (row.skipLine) { - ui.div({ padding: [0, 0, 0, 0], text: '' }); - } - } - else { - if (isHeading(row)) { - const { level } = row; - headingLevel = level; - // only h1 and h2 have bottom padding - // h3-h6 do not - const b = level <= 2 ? 1 : 0; - ui.div({ ...row, padding: [0, 0, b, indent(level)] }); - } - else { - ui.div({ ...row, padding: [0, 0, 1, indent(headingLevel + 1)] }); - } - } - } - return (this.#usage = ui.toString()); - } - /** - * Return the usage banner markdown for the given configuration - */ - usageMarkdown() { - if (this.#usageMarkdown) - return this.#usageMarkdown; - const out = []; - let headingLevel = 1; - const first = this.#fields[0]; - let start = first?.type === 'heading' ? 1 : 0; - if (first?.type === 'heading') { - out.push(`# ${normalizeOneLine(first.text)}`); - } - out.push('Usage:'); - if (this.#options.usage) { - out.push(normalizeMarkdown(this.#options.usage, true)); - } - else { - const cmd = (0, node_path_1.basename)(String(process.argv[1])); - const shortFlags = []; - const shorts = []; - const flags = []; - const opts = []; - for (const [field, config] of Object.entries(this.#configSet)) { - if (config.short) { - if (config.type === 'boolean') - shortFlags.push(config.short); - else - shorts.push([config.short, config.hint || field]); - } - else { - if (config.type === 'boolean') - flags.push(field); - else - opts.push([field, config.hint || field]); - } - } - const sf = shortFlags.length ? ' -' + shortFlags.join('') : ''; - const so = shorts.map(([k, v]) => ` --${k}=<${v}>`).join(''); - const lf = flags.map(k => ` --${k}`).join(''); - const lo = opts.map(([k, v]) => ` --${k}=<${v}>`).join(''); - const usage = `${cmd}${sf}${so}${lf}${lo}`.trim(); - out.push(normalizeMarkdown(usage, true)); - } - const maybeDesc = this.#fields[start]; - if (maybeDesc && isDescription(maybeDesc)) { - out.push(normalizeMarkdown(maybeDesc.text, maybeDesc.pre)); - start++; - } - const { rows } = this.#usageRows(start); - // heading level in markdown is number of # ahead of text - for (const row of rows) { - if (row.left) { - out.push('#'.repeat(headingLevel + 1) + - ' ' + - normalizeOneLine(row.left, true)); - if (row.text) - out.push(normalizeMarkdown(row.text)); - } - else if (isHeading(row)) { - const { level } = row; - headingLevel = level; - out.push(`${'#'.repeat(headingLevel)} ${normalizeOneLine(row.text, row.pre)}`); - } - else { - out.push(normalizeMarkdown(row.text, !!row.pre)); - } - } - return (this.#usageMarkdown = out.join('\n\n') + '\n'); - } - #usageRows(start) { - // turn each config type into a row, and figure out the width of the - // left hand indentation for the option descriptions. - let maxMax = Math.max(12, Math.min(26, Math.floor(width / 3))); - let maxWidth = 8; - let prev = undefined; - const rows = []; - for (const field of this.#fields.slice(start)) { - if (field.type !== 'config') { - if (prev?.type === 'config') - prev.skipLine = true; - prev = undefined; - field.text = normalize(field.text, !!field.pre); - rows.push(field); - continue; - } - const { value } = field; - const desc = value.description || ''; - const mult = value.multiple ? 'Can be set multiple times' : ''; - const opts = value.validOptions?.length ? - `Valid options:${value.validOptions.map(v => ` ${JSON.stringify(v)}`)}` - : ''; - const dmDelim = desc.includes('\n') ? '\n\n' : '\n'; - const extra = [opts, mult].join(dmDelim).trim(); - const text = (normalize(desc) + dmDelim + extra).trim(); - const hint = value.hint || - (value.type === 'number' ? 'n' - : value.type === 'string' ? field.name - : undefined); - const short = !value.short ? '' - : value.type === 'boolean' ? `-${value.short} ` - : `-${value.short}<${hint}> `; - const left = value.type === 'boolean' ? - `${short}--${field.name}` - : `${short}--${field.name}=<${hint}>`; - const row = { text, left, type: 'config' }; - if (text.length > width - maxMax) { - row.skipLine = true; - } - if (prev && left.length > maxMax) - prev.skipLine = true; - prev = row; - const len = left.length + 4; - if (len > maxWidth && len < maxMax) { - maxWidth = len; - } - rows.push(row); - } - return { rows, maxWidth }; - } - /** - * Return the configuration options as a plain object - */ - toJSON() { - return Object.fromEntries(Object.entries(this.#configSet).map(([field, def]) => [ - field, - { - type: def.type, - ...(def.multiple ? { multiple: true } : {}), - ...(def.delim ? { delim: def.delim } : {}), - ...(def.short ? { short: def.short } : {}), - ...(def.description ? - { description: normalize(def.description) } - : {}), - ...(def.validate ? { validate: def.validate } : {}), - ...(def.validOptions ? { validOptions: def.validOptions } : {}), - ...(def.default !== undefined ? { default: def.default } : {}), - ...(def.hint ? { hint: def.hint } : {}), - }, - ])); - } - /** - * Custom printer for `util.inspect` - */ - [node_util_1.inspect.custom](_, options) { - return `Jack ${(0, node_util_1.inspect)(this.toJSON(), options)}`; - } -} -exports.Jack = Jack; -// Unwrap and un-indent, so we can wrap description -// strings however makes them look nice in the code. -const normalize = (s, pre = false) => { - if (pre) - // prepend a ZWSP to each line so cliui doesn't strip it. - return s - .split('\n') - .map(l => `\u200b${l}`) - .join('\n'); - return s - .split(/^\s*```\s*$/gm) - .map((s, i) => { - if (i % 2 === 1) { - if (!s.trim()) { - return `\`\`\`\n\`\`\`\n`; - } - // outdent the ``` blocks, but preserve whitespace otherwise. - const split = s.split('\n'); - // throw out the \n at the start and end - split.pop(); - split.shift(); - const si = split.reduce((shortest, l) => { - /* c8 ignore next */ - const ind = l.match(/^\s*/)?.[0] ?? ''; - if (ind.length) - return Math.min(ind.length, shortest); - else - return shortest; - }, Infinity); - /* c8 ignore next */ - const i = isFinite(si) ? si : 0; - return ('\n```\n' + - split.map(s => `\u200b${s.substring(i)}`).join('\n') + - '\n```\n'); - } - return (s - // remove single line breaks, except for lists - .replace(/([^\n])\n[ \t]*([^\n])/g, (_, $1, $2) => !/^[-*]/.test($2) ? `${$1} ${$2}` : `${$1}\n${$2}`) - // normalize mid-line whitespace - .replace(/([^\n])[ \t]+([^\n])/g, '$1 $2') - // two line breaks are enough - .replace(/\n{3,}/g, '\n\n') - // remove any spaces at the start of a line - .replace(/\n[ \t]+/g, '\n') - .trim()); - }) - .join('\n'); -}; -// normalize for markdown printing, remove leading spaces on lines -const normalizeMarkdown = (s, pre = false) => { - const n = normalize(s, pre).replace(/\\/g, '\\\\'); - return pre ? - `\`\`\`\n${n.replace(/\u200b/g, '')}\n\`\`\`` - : n.replace(/\n +/g, '\n').trim(); -}; -const normalizeOneLine = (s, pre = false) => { - const n = normalize(s, pre) - .replace(/[\s\u200b]+/g, ' ') - .trim(); - return pre ? `\`${n}\`` : n; -}; -/** - * Main entry point. Create and return a {@link Jack} object. - */ -const jack = (options = {}) => new Jack(options); -exports.jack = jack; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/jackspeak/dist/commonjs/index.js.map b/node_modules/jackspeak/dist/commonjs/index.js.map deleted file mode 100644 index 4b2d1f66..00000000 --- a/node_modules/jackspeak/dist/commonjs/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;AAOA,yCAAoE;AACpE,mDAA2C;AAE3C,kDAAkD;AAClD,YAAY;AACZ,0DAAiC;AACjC,yCAAoC;AAEpC,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CACpB,CAAC,OAAO,IAAI,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,EAC3D,EAAE,CACH,CAAA;AAED,wCAAwC;AACxC,MAAM,MAAM,GAAG,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAA;AAEzC,MAAM,QAAQ,GAAG,CAAC,IAAY,EAAE,GAAW,EAAU,EAAE;IACrD,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,OAAO,CAAC,gBAAgB,EAAE,GAAG,CAAC,CAAC;SAC9C,IAAI,CAAC,GAAG,CAAC;SACT,IAAI,EAAE;SACN,WAAW,EAAE;SACb,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;AACvB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f,CAAC,CAAA;AAED,kEAAkE;AAClE,MAAM,iBAAiB,GAAG,CAAC,CAAS,EAAE,MAAe,KAAK,EAAU,EAAE;IACpE,MAAM,CAAC,GAAG,SAAS,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,CAAA;IAClD,OAAO,GAAG,CAAC,CAAC;QACR,WAAW,CAAC,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,UAAU;QAC/C,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,IAAI,EAAE,CAAA;AACrC,CAAC,CAAA;AAED,MAAM,gBAAgB,GAAG,CAAC,CAAS,EAAE,MAAe,KAAK,EAAE,EAAE;IAC3D,MAAM,CAAC,GAAG,SAAS,CAAC,CAAC,EAAE,GAAG,CAAC;SACxB,OAAO,CAAC,cAAc,EAAE,GAAG,CAAC;SAC5B,IAAI,EAAE,CAAA;IACT,OAAO,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAA;AAC7B,CAAC,CAAA;AAED;;GAEG;AACI,MAAM,IAAI,GAAG,CAAC,UAAuB,EAAE,EAAE,EAAE,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,CAAA;AAAvD,QAAA,IAAI,QAAmD","sourcesContent":["export type ConfigType = 'number' | 'string' | 'boolean'\n\n/**\n * Given a Jack object, get the typeof its ConfigSet\n */\nexport type Unwrap = J extends Jack ? C : never\n\nimport { inspect, InspectOptions, ParseArgsConfig } from 'node:util'\nimport { parseArgs } from './parse-args.js'\n\n// it's a tiny API, just cast it inline, it's fine\n//@ts-ignore\nimport cliui from '@isaacs/cliui'\nimport { basename } from 'node:path'\n\nconst width = Math.min(\n (process && process.stdout && process.stdout.columns) || 80,\n 80,\n)\n\n// indentation spaces from heading level\nconst indent = (n: number) => (n - 1) * 2\n\nconst toEnvKey = (pref: string, key: string): string => {\n return [pref, key.replace(/[^a-zA-Z0-9]+/g, ' ')]\n .join(' ')\n .trim()\n .toUpperCase()\n .replace(/ /g, '_')\n}\n\nconst toEnvVal = (\n value: string | boolean | number | string[] | boolean[] | number[],\n delim: string = '\\n',\n): string => {\n const str =\n typeof value === 'string' ? value\n : typeof value === 'boolean' ?\n value ? '1'\n : '0'\n : typeof value === 'number' ? String(value)\n : Array.isArray(value) ?\n value.map((v: string | number | boolean) => toEnvVal(v)).join(delim)\n : /* c8 ignore start */ undefined\n if (typeof str !== 'string') {\n throw new Error(\n `could not serialize value to environment: ${JSON.stringify(value)}`,\n )\n }\n /* c8 ignore stop */\n return str\n}\n\nconst fromEnvVal = (\n env: string,\n type: T,\n multiple: M,\n delim: string = '\\n',\n): ValidValue =>\n (multiple ?\n env ? env.split(delim).map(v => fromEnvVal(v, type, false))\n : []\n : type === 'string' ? env\n : type === 'boolean' ? env === '1'\n : +env.trim()) as ValidValue\n\n/**\n * Defines the type of value that is valid, given a config definition's\n * {@link ConfigType} and boolean multiple setting\n */\nexport type ValidValue<\n T extends ConfigType = ConfigType,\n M extends boolean = boolean,\n> =\n [T, M] extends ['number', true] ? number[]\n : [T, M] extends ['string', true] ? string[]\n : [T, M] extends ['boolean', true] ? boolean[]\n : [T, M] extends ['number', false] ? number\n : [T, M] extends ['string', false] ? string\n : [T, M] extends ['boolean', false] ? boolean\n : [T, M] extends ['string', boolean] ? string | string[]\n : [T, M] extends ['boolean', boolean] ? boolean | boolean[]\n : [T, M] extends ['number', boolean] ? number | number[]\n : [T, M] extends [ConfigType, false] ? string | number | boolean\n : [T, M] extends [ConfigType, true] ? string[] | number[] | boolean[]\n : string | number | boolean | string[] | number[] | boolean[]\n\n/**\n * The meta information for a config option definition, when the\n * type and multiple values can be inferred by the method being used\n */\nexport type ConfigOptionMeta<\n T extends ConfigType,\n M extends boolean = boolean,\n O extends\n | undefined\n | (T extends 'boolean' ? never\n : T extends 'string' ? readonly string[]\n : T extends 'number' ? readonly number[]\n : readonly number[] | readonly string[]) =\n | undefined\n | (T extends 'boolean' ? never\n : T extends 'string' ? readonly string[]\n : T extends 'number' ? readonly number[]\n : readonly number[] | readonly string[]),\n> = {\n default?:\n | undefined\n | (ValidValue &\n (O extends number[] | string[] ?\n M extends false ?\n O[number]\n : O[number][]\n : unknown))\n validOptions?: O\n description?: string\n validate?:\n | ((v: unknown) => v is ValidValue)\n | ((v: unknown) => boolean)\n short?: string | undefined\n type?: T\n hint?: T extends 'boolean' ? never : string\n delim?: M extends true ? string : never\n} & (M extends false ? { multiple?: false | undefined }\n: M extends true ? { multiple: true }\n: { multiple?: boolean })\n\n/**\n * A set of {@link ConfigOptionMeta} fields, referenced by their longOption\n * string values.\n */\nexport type ConfigMetaSet<\n T extends ConfigType,\n M extends boolean = boolean,\n> = {\n [longOption: string]: ConfigOptionMeta\n}\n\n/**\n * Infer {@link ConfigSet} fields from a given {@link ConfigMetaSet}\n */\nexport type ConfigSetFromMetaSet<\n T extends ConfigType,\n M extends boolean,\n S extends ConfigMetaSet,\n> = {\n [longOption in keyof S]: ConfigOptionBase\n}\n\n/**\n * Fields that can be set on a {@link ConfigOptionBase} or\n * {@link ConfigOptionMeta} based on whether or not the field is known to be\n * multiple.\n */\nexport type MultiType =\n M extends true ?\n {\n multiple: true\n delim?: string | undefined\n }\n : M extends false ?\n {\n multiple?: false | undefined\n delim?: undefined\n }\n : {\n multiple?: boolean | undefined\n delim?: string | undefined\n }\n\n/**\n * A config field definition, in its full representation.\n */\nexport type ConfigOptionBase<\n T extends ConfigType,\n M extends boolean = boolean,\n> = {\n type: T\n short?: string | undefined\n default?: ValidValue | undefined\n description?: string\n hint?: T extends 'boolean' ? undefined : string | undefined\n validate?: (v: unknown) => v is ValidValue\n validOptions?: T extends 'boolean' ? undefined\n : T extends 'string' ? readonly string[]\n : T extends 'number' ? readonly number[]\n : readonly number[] | readonly string[]\n} & MultiType\n\nexport const isConfigType = (t: string): t is ConfigType =>\n typeof t === 'string' &&\n (t === 'string' || t === 'number' || t === 'boolean')\n\nconst undefOrType = (v: unknown, t: string): boolean =>\n v === undefined || typeof v === t\nconst undefOrTypeArray = (v: unknown, t: string): boolean =>\n v === undefined || (Array.isArray(v) && v.every(x => typeof x === t))\n\nconst isValidOption = (v: unknown, vo: readonly unknown[]): boolean =>\n Array.isArray(v) ? v.every(x => isValidOption(x, vo)) : vo.includes(v)\n\n// print the value type, for error message reporting\nconst valueType = (\n v:\n | string\n | number\n | boolean\n | string[]\n | number[]\n | boolean[]\n | { type: ConfigType; multiple?: boolean },\n): string =>\n typeof v === 'string' ? 'string'\n : typeof v === 'boolean' ? 'boolean'\n : typeof v === 'number' ? 'number'\n : Array.isArray(v) ?\n joinTypes([...new Set(v.map(v => valueType(v)))]) + '[]'\n : `${v.type}${v.multiple ? '[]' : ''}`\n\nconst joinTypes = (types: string[]): string =>\n types.length === 1 && typeof types[0] === 'string' ?\n types[0]\n : `(${types.join('|')})`\n\nconst isValidValue = (\n v: unknown,\n type: T,\n multi: M,\n): v is ValidValue => {\n if (multi) {\n if (!Array.isArray(v)) return false\n return !v.some((v: unknown) => !isValidValue(v, type, false))\n }\n if (Array.isArray(v)) return false\n return typeof v === type\n}\n\nexport const isConfigOption = (\n o: any,\n type: T,\n multi: M,\n): o is ConfigOptionBase =>\n !!o &&\n typeof o === 'object' &&\n isConfigType(o.type) &&\n o.type === type &&\n undefOrType(o.short, 'string') &&\n undefOrType(o.description, 'string') &&\n undefOrType(o.hint, 'string') &&\n undefOrType(o.validate, 'function') &&\n (o.type === 'boolean' ?\n o.validOptions === undefined\n : undefOrTypeArray(o.validOptions, o.type)) &&\n (o.default === undefined || isValidValue(o.default, type, multi)) &&\n !!o.multiple === multi\n\n/**\n * A set of {@link ConfigOptionBase} objects, referenced by their longOption\n * string values.\n */\nexport type ConfigSet = {\n [longOption: string]: ConfigOptionBase\n}\n\n/**\n * The 'values' field returned by {@link Jack#parse}\n */\nexport type OptionsResults = {\n [k in keyof T]?: T[k]['validOptions'] extends (\n readonly string[] | readonly number[]\n ) ?\n T[k] extends ConfigOptionBase<'string' | 'number', false> ?\n T[k]['validOptions'][number]\n : T[k] extends ConfigOptionBase<'string' | 'number', true> ?\n T[k]['validOptions'][number][]\n : never\n : T[k] extends ConfigOptionBase<'string', false> ? string\n : T[k] extends ConfigOptionBase<'string', true> ? string[]\n : T[k] extends ConfigOptionBase<'number', false> ? number\n : T[k] extends ConfigOptionBase<'number', true> ? number[]\n : T[k] extends ConfigOptionBase<'boolean', false> ? boolean\n : T[k] extends ConfigOptionBase<'boolean', true> ? boolean[]\n : never\n}\n\n/**\n * The object retured by {@link Jack#parse}\n */\nexport type Parsed = {\n values: OptionsResults\n positionals: string[]\n}\n\nfunction num(\n o: ConfigOptionMeta<'number', false> = {},\n): ConfigOptionBase<'number', false> {\n const { default: def, validate: val, validOptions, ...rest } = o\n if (def !== undefined && !isValidValue(def, 'number', false)) {\n throw new TypeError('invalid default value', {\n cause: {\n found: def,\n wanted: 'number',\n },\n })\n }\n if (!undefOrTypeArray(validOptions, 'number')) {\n throw new TypeError('invalid validOptions', {\n cause: {\n found: validOptions,\n wanted: 'number[]',\n },\n })\n }\n const validate =\n val ?\n (val as (v: unknown) => v is ValidValue<'number', false>)\n : undefined\n return {\n ...rest,\n default: def,\n validate,\n validOptions,\n type: 'number',\n multiple: false,\n }\n}\n\nfunction numList(\n o: ConfigOptionMeta<'number'> = {},\n): ConfigOptionBase<'number', true> {\n const { default: def, validate: val, validOptions, ...rest } = o\n if (def !== undefined && !isValidValue(def, 'number', true)) {\n throw new TypeError('invalid default value', {\n cause: {\n found: def,\n wanted: 'number[]',\n },\n })\n }\n if (!undefOrTypeArray(validOptions, 'number')) {\n throw new TypeError('invalid validOptions', {\n cause: {\n found: validOptions,\n wanted: 'number[]',\n },\n })\n }\n const validate =\n val ?\n (val as (v: unknown) => v is ValidValue<'number', true>)\n : undefined\n return {\n ...rest,\n default: def,\n validate,\n validOptions,\n type: 'number',\n multiple: true,\n }\n}\n\nfunction opt(\n o: ConfigOptionMeta<'string', false> = {},\n): ConfigOptionBase<'string', false> {\n const { default: def, validate: val, validOptions, ...rest } = o\n if (def !== undefined && !isValidValue(def, 'string', false)) {\n throw new TypeError('invalid default value', {\n cause: {\n found: def,\n wanted: 'string',\n },\n })\n }\n if (!undefOrTypeArray(validOptions, 'string')) {\n throw new TypeError('invalid validOptions', {\n cause: {\n found: validOptions,\n wanted: 'string[]',\n },\n })\n }\n const validate =\n val ?\n (val as (v: unknown) => v is ValidValue<'string', false>)\n : undefined\n return {\n ...rest,\n default: def,\n validate,\n validOptions,\n type: 'string',\n multiple: false,\n }\n}\n\nfunction optList(\n o: ConfigOptionMeta<'string'> = {},\n): ConfigOptionBase<'string', true> {\n const { default: def, validate: val, validOptions, ...rest } = o\n if (def !== undefined && !isValidValue(def, 'string', true)) {\n throw new TypeError('invalid default value', {\n cause: {\n found: def,\n wanted: 'string[]',\n },\n })\n }\n if (!undefOrTypeArray(validOptions, 'string')) {\n throw new TypeError('invalid validOptions', {\n cause: {\n found: validOptions,\n wanted: 'string[]',\n },\n })\n }\n const validate =\n val ?\n (val as (v: unknown) => v is ValidValue<'string', true>)\n : undefined\n return {\n ...rest,\n default: def,\n validate,\n validOptions,\n type: 'string',\n multiple: true,\n }\n}\n\nfunction flag(\n o: ConfigOptionMeta<'boolean', false> = {},\n): ConfigOptionBase<'boolean', false> {\n const {\n hint,\n default: def,\n validate: val,\n ...rest\n } = o as ConfigOptionMeta<'boolean', false>\n delete (rest as ConfigOptionMeta<'string', false>).validOptions\n if (def !== undefined && !isValidValue(def, 'boolean', false)) {\n throw new TypeError('invalid default value')\n }\n const validate =\n val ?\n (val as (v: unknown) => v is ValidValue<'boolean', false>)\n : undefined\n if (hint !== undefined) {\n throw new TypeError('cannot provide hint for flag')\n }\n return {\n ...rest,\n default: def,\n validate,\n type: 'boolean',\n multiple: false,\n }\n}\n\nfunction flagList(\n o: ConfigOptionMeta<'boolean'> = {},\n): ConfigOptionBase<'boolean', true> {\n const {\n hint,\n default: def,\n validate: val,\n ...rest\n } = o as ConfigOptionMeta<'boolean', false>\n delete (rest as ConfigOptionMeta<'string', false>).validOptions\n if (def !== undefined && !isValidValue(def, 'boolean', true)) {\n throw new TypeError('invalid default value')\n }\n const validate =\n val ?\n (val as (v: unknown) => v is ValidValue<'boolean', true>)\n : undefined\n if (hint !== undefined) {\n throw new TypeError('cannot provide hint for flag list')\n }\n return {\n ...rest,\n default: def,\n validate,\n type: 'boolean',\n multiple: true,\n }\n}\nconst toParseArgsOptionsConfig = (\n options: ConfigSet,\n): Exclude => {\n const c: Exclude = {}\n for (const longOption in options) {\n const config = options[longOption]\n /* c8 ignore start */\n if (!config) {\n throw new Error('config must be an object: ' + longOption)\n }\n /* c8 ignore start */\n if (isConfigOption(config, 'number', true)) {\n c[longOption] = {\n type: 'string',\n multiple: true,\n default: config.default?.map(c => String(c)),\n }\n } else if (isConfigOption(config, 'number', false)) {\n c[longOption] = {\n type: 'string',\n multiple: false,\n default:\n config.default === undefined ?\n undefined\n : String(config.default),\n }\n } else {\n const conf = config as\n | ConfigOptionBase<'string'>\n | ConfigOptionBase<'boolean'>\n c[longOption] = {\n type: conf.type,\n multiple: !!conf.multiple,\n default: conf.default,\n }\n }\n const clo = c[longOption] as ConfigOptionBase\n if (typeof config.short === 'string') {\n clo.short = config.short\n }\n\n if (\n config.type === 'boolean' &&\n !longOption.startsWith('no-') &&\n !options[`no-${longOption}`]\n ) {\n c[`no-${longOption}`] = {\n type: 'boolean',\n multiple: config.multiple,\n }\n }\n }\n return c\n}\n\n/**\n * A row used when generating the {@link Jack#usage} string\n */\nexport interface Row {\n left?: string\n text: string\n skipLine?: boolean\n type?: string\n}\n\n/**\n * A heading for a section in the usage, created by the jack.heading()\n * method.\n *\n * First heading is always level 1, subsequent headings default to 2.\n *\n * The level of the nearest heading level sets the indentation of the\n * description that follows.\n */\nexport interface Heading extends Row {\n type: 'heading'\n text: string\n left?: ''\n skipLine?: boolean\n level: number\n pre?: boolean\n}\nconst isHeading = (r: { type?: string }): r is Heading =>\n r.type === 'heading'\n\n/**\n * An arbitrary blob of text describing some stuff, set by the\n * jack.description() method.\n *\n * Indentation determined by level of the nearest header.\n */\nexport interface Description extends Row {\n type: 'description'\n text: string\n left?: ''\n skipLine?: boolean\n pre?: boolean\n}\n\nconst isDescription = (r: { type?: string }): r is Description =>\n r.type === 'description'\n\n/**\n * A heading or description row used when generating the {@link Jack#usage}\n * string\n */\nexport type TextRow = Heading | Description\n\n/**\n * Either a {@link TextRow} or a reference to a {@link ConfigOptionBase}\n */\nexport type UsageField =\n | TextRow\n | {\n type: 'config'\n name: string\n value: ConfigOptionBase\n }\n\n/**\n * Options provided to the {@link Jack} constructor\n */\nexport interface JackOptions {\n /**\n * Whether to allow positional arguments\n *\n * @default true\n */\n allowPositionals?: boolean\n\n /**\n * Prefix to use when reading/writing the environment variables\n *\n * If not specified, environment behavior will not be available.\n */\n envPrefix?: string\n\n /**\n * Environment object to read/write. Defaults `process.env`.\n * No effect if `envPrefix` is not set.\n */\n env?: { [k: string]: string | undefined }\n\n /**\n * A short usage string. If not provided, will be generated from the\n * options provided, but that can of course be rather verbose if\n * there are a lot of options.\n */\n usage?: string\n\n /**\n * Stop parsing flags and opts at the first positional argument.\n * This is to support cases like `cmd [flags] [options]`, where\n * each subcommand may have different options. This effectively treats\n * any positional as a `--` argument. Only relevant if `allowPositionals`\n * is true.\n *\n * To do subcommands, set this option, look at the first positional, and\n * parse the remaining positionals as appropriate.\n *\n * @default false\n */\n stopAtPositional?: boolean\n\n /**\n * Conditional `stopAtPositional`. If set to a `(string)=>boolean` function,\n * will be called with each positional argument encountered. If the function\n * returns true, then parsing will stop at that point.\n */\n stopAtPositionalTest?: (arg: string) => boolean\n}\n\n/**\n * Class returned by the {@link jack} function and all configuration\n * definition methods. This is what gets chained together.\n */\nexport class Jack {\n #configSet: C\n #shorts: { [k: string]: string }\n #options: JackOptions\n #fields: UsageField[] = []\n #env: { [k: string]: string | undefined }\n #envPrefix?: string\n #allowPositionals: boolean\n #usage?: string\n #usageMarkdown?: string\n\n constructor(options: JackOptions = {}) {\n this.#options = options\n this.#allowPositionals = options.allowPositionals !== false\n this.#env =\n this.#options.env === undefined ? process.env : this.#options.env\n this.#envPrefix = options.envPrefix\n // We need to fib a little, because it's always the same object, but it\n // starts out as having an empty config set. Then each method that adds\n // fields returns `this as Jack`\n this.#configSet = Object.create(null) as C\n this.#shorts = Object.create(null)\n }\n\n /**\n * Set the default value (which will still be overridden by env or cli)\n * as if from a parsed config file. The optional `source` param, if\n * provided, will be included in error messages if a value is invalid or\n * unknown.\n */\n setConfigValues(values: OptionsResults, source = '') {\n try {\n this.validate(values)\n } catch (er) {\n const e = er as Error\n if (source && e && typeof e === 'object') {\n if (e.cause && typeof e.cause === 'object') {\n Object.assign(e.cause, { path: source })\n } else {\n e.cause = { path: source }\n }\n }\n throw e\n }\n for (const [field, value] of Object.entries(values)) {\n const my = this.#configSet[field]\n // already validated, just for TS's benefit\n /* c8 ignore start */\n if (!my) {\n throw new Error('unexpected field in config set: ' + field, {\n cause: { found: field },\n })\n }\n /* c8 ignore stop */\n my.default = value\n }\n return this\n }\n\n /**\n * Parse a string of arguments, and return the resulting\n * `{ values, positionals }` object.\n *\n * If an {@link JackOptions#envPrefix} is set, then it will read default\n * values from the environment, and write the resulting values back\n * to the environment as well.\n *\n * Environment values always take precedence over any other value, except\n * an explicit CLI setting.\n */\n parse(args: string[] = process.argv): Parsed {\n this.loadEnvDefaults()\n const p = this.parseRaw(args)\n this.applyDefaults(p)\n this.writeEnv(p)\n return p\n }\n\n loadEnvDefaults() {\n if (this.#envPrefix) {\n for (const [field, my] of Object.entries(this.#configSet)) {\n const ek = toEnvKey(this.#envPrefix, field)\n const env = this.#env[ek]\n if (env !== undefined) {\n my.default = fromEnvVal(env, my.type, !!my.multiple, my.delim)\n }\n }\n }\n }\n\n applyDefaults(p: Parsed) {\n for (const [field, c] of Object.entries(this.#configSet)) {\n if (c.default !== undefined && !(field in p.values)) {\n //@ts-ignore\n p.values[field] = c.default\n }\n }\n }\n\n /**\n * Only parse the command line arguments passed in.\n * Does not strip off the `node script.js` bits, so it must be just the\n * arguments you wish to have parsed.\n * Does not read from or write to the environment, or set defaults.\n */\n parseRaw(args: string[]): Parsed {\n if (args === process.argv) {\n args = args.slice(\n (process as { _eval?: string })._eval !== undefined ? 1 : 2,\n )\n }\n\n const options = toParseArgsOptionsConfig(this.#configSet)\n const result = parseArgs({\n args,\n options,\n // always strict, but using our own logic\n strict: false,\n allowPositionals: this.#allowPositionals,\n tokens: true,\n })\n\n const p: Parsed = {\n values: {},\n positionals: [],\n }\n for (const token of result.tokens) {\n if (token.kind === 'positional') {\n p.positionals.push(token.value)\n if (\n this.#options.stopAtPositional ||\n this.#options.stopAtPositionalTest?.(token.value)\n ) {\n p.positionals.push(...args.slice(token.index + 1))\n break\n }\n } else if (token.kind === 'option') {\n let value: string | number | boolean | undefined = undefined\n if (token.name.startsWith('no-')) {\n const my = this.#configSet[token.name]\n const pname = token.name.substring('no-'.length)\n const pos = this.#configSet[pname]\n if (\n pos &&\n pos.type === 'boolean' &&\n (!my ||\n (my.type === 'boolean' && !!my.multiple === !!pos.multiple))\n ) {\n value = false\n token.name = pname\n }\n }\n const my = this.#configSet[token.name]\n if (!my) {\n throw new Error(\n `Unknown option '${token.rawName}'. ` +\n `To specify a positional argument starting with a '-', ` +\n `place it at the end of the command after '--', as in ` +\n `'-- ${token.rawName}'`,\n {\n cause: {\n found:\n token.rawName + (token.value ? `=${token.value}` : ''),\n },\n },\n )\n }\n if (value === undefined) {\n if (token.value === undefined) {\n if (my.type !== 'boolean') {\n throw new Error(\n `No value provided for ${token.rawName}, expected ${my.type}`,\n {\n cause: {\n name: token.rawName,\n wanted: valueType(my),\n },\n },\n )\n }\n value = true\n } else {\n if (my.type === 'boolean') {\n throw new Error(\n `Flag ${token.rawName} does not take a value, received '${token.value}'`,\n { cause: { found: token } },\n )\n }\n if (my.type === 'string') {\n value = token.value\n } else {\n value = +token.value\n if (value !== value) {\n throw new Error(\n `Invalid value '${token.value}' provided for ` +\n `'${token.rawName}' option, expected number`,\n {\n cause: {\n name: token.rawName,\n found: token.value,\n wanted: 'number',\n },\n },\n )\n }\n }\n }\n }\n if (my.multiple) {\n const pv = p.values as {\n [k: string]: (string | number | boolean)[]\n }\n const tn = pv[token.name] ?? []\n pv[token.name] = tn\n tn.push(value)\n } else {\n const pv = p.values as { [k: string]: string | number | boolean }\n pv[token.name] = value\n }\n }\n }\n\n for (const [field, value] of Object.entries(p.values)) {\n const valid = this.#configSet[field]?.validate\n const validOptions = this.#configSet[field]?.validOptions\n let cause:\n | undefined\n | {\n name: string\n found: unknown\n validOptions?: readonly string[] | readonly number[]\n }\n if (validOptions && !isValidOption(value, validOptions)) {\n cause = { name: field, found: value, validOptions: validOptions }\n }\n if (valid && !valid(value)) {\n cause = cause || { name: field, found: value }\n }\n if (cause) {\n throw new Error(\n `Invalid value provided for --${field}: ${JSON.stringify(\n value,\n )}`,\n { cause },\n )\n }\n }\n\n return p\n }\n\n /**\n * do not set fields as 'no-foo' if 'foo' exists and both are bools\n * just set foo.\n */\n #noNoFields(f: string, val: unknown, s: string = f) {\n if (!f.startsWith('no-') || typeof val !== 'boolean') return\n const yes = f.substring('no-'.length)\n // recurse so we get the core config key we care about.\n this.#noNoFields(yes, val, s)\n if (this.#configSet[yes]?.type === 'boolean') {\n throw new Error(\n `do not set '${s}', instead set '${yes}' as desired.`,\n { cause: { found: s, wanted: yes } },\n )\n }\n }\n\n /**\n * Validate that any arbitrary object is a valid configuration `values`\n * object. Useful when loading config files or other sources.\n */\n validate(o: unknown): asserts o is Parsed['values'] {\n if (!o || typeof o !== 'object') {\n throw new Error('Invalid config: not an object', {\n cause: { found: o },\n })\n }\n const opts = o as Record\n for (const field in o) {\n const value = opts[field]\n /* c8 ignore next - for TS */\n if (value === undefined) continue\n this.#noNoFields(field, value)\n const config = this.#configSet[field]\n if (!config) {\n throw new Error(`Unknown config option: ${field}`, {\n cause: { found: field },\n })\n }\n if (!isValidValue(value, config.type, !!config.multiple)) {\n throw new Error(\n `Invalid value ${valueType(\n value,\n )} for ${field}, expected ${valueType(config)}`,\n {\n cause: {\n name: field,\n found: value,\n wanted: valueType(config),\n },\n },\n )\n }\n let cause:\n | undefined\n | {\n name: string\n found: any\n validOptions?: readonly string[] | readonly number[]\n }\n if (\n config.validOptions &&\n !isValidOption(value, config.validOptions)\n ) {\n cause = {\n name: field,\n found: value,\n validOptions: config.validOptions,\n }\n }\n if (config.validate && !config.validate(value)) {\n cause = cause || { name: field, found: value }\n }\n if (cause) {\n throw new Error(`Invalid config value for ${field}: ${value}`, {\n cause,\n })\n }\n }\n }\n\n writeEnv(p: Parsed) {\n if (!this.#env || !this.#envPrefix) return\n for (const [field, value] of Object.entries(p.values)) {\n const my = this.#configSet[field]\n this.#env[toEnvKey(this.#envPrefix, field)] = toEnvVal(\n value,\n my?.delim,\n )\n }\n }\n\n /**\n * Add a heading to the usage output banner\n */\n heading(\n text: string,\n level?: 1 | 2 | 3 | 4 | 5 | 6,\n { pre = false }: { pre?: boolean } = {},\n ): Jack {\n if (level === undefined) {\n level = this.#fields.some(r => isHeading(r)) ? 2 : 1\n }\n this.#fields.push({ type: 'heading', text, level, pre })\n return this\n }\n\n /**\n * Add a long-form description to the usage output at this position.\n */\n description(text: string, { pre }: { pre?: boolean } = {}): Jack {\n this.#fields.push({ type: 'description', text, pre })\n return this\n }\n\n /**\n * Add one or more number fields.\n */\n num>(\n fields: F,\n ): Jack> {\n return this.#addFields(fields, num)\n }\n\n /**\n * Add one or more multiple number fields.\n */\n numList>(\n fields: F,\n ): Jack> {\n return this.#addFields(fields, numList)\n }\n\n /**\n * Add one or more string option fields.\n */\n opt>(\n fields: F,\n ): Jack> {\n return this.#addFields(fields, opt)\n }\n\n /**\n * Add one or more multiple string option fields.\n */\n optList>(\n fields: F,\n ): Jack> {\n return this.#addFields(fields, optList)\n }\n\n /**\n * Add one or more flag fields.\n */\n flag>(\n fields: F,\n ): Jack> {\n return this.#addFields(fields, flag)\n }\n\n /**\n * Add one or more multiple flag fields.\n */\n flagList>(\n fields: F,\n ): Jack> {\n return this.#addFields(fields, flagList)\n }\n\n /**\n * Generic field definition method. Similar to flag/flagList/number/etc,\n * but you must specify the `type` (and optionally `multiple` and `delim`)\n * fields on each one, or Jack won't know how to define them.\n */\n addFields(fields: F): Jack {\n const next = this as unknown as Jack\n for (const [name, field] of Object.entries(fields)) {\n this.#validateName(name, field)\n next.#fields.push({\n type: 'config',\n name,\n value: field as ConfigOptionBase,\n })\n }\n Object.assign(next.#configSet, fields)\n return next\n }\n\n #addFields<\n T extends ConfigType,\n M extends boolean,\n F extends ConfigMetaSet,\n >(\n fields: F,\n fn: (m: ConfigOptionMeta) => ConfigOptionBase,\n ): Jack> {\n type NextC = C & ConfigSetFromMetaSet\n const next = this as unknown as Jack\n Object.assign(\n next.#configSet,\n Object.fromEntries(\n Object.entries(fields).map(([name, field]) => {\n this.#validateName(name, field)\n const option = fn(field)\n next.#fields.push({\n type: 'config',\n name,\n value: option as ConfigOptionBase,\n })\n return [name, option]\n }),\n ),\n )\n return next\n }\n\n #validateName(name: string, field: { short?: string }) {\n if (!/^[a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?$/.test(name)) {\n throw new TypeError(\n `Invalid option name: ${name}, ` +\n `must be '-' delimited ASCII alphanumeric`,\n )\n }\n if (this.#configSet[name]) {\n throw new TypeError(`Cannot redefine option ${field}`)\n }\n if (this.#shorts[name]) {\n throw new TypeError(\n `Cannot redefine option ${name}, already ` +\n `in use for ${this.#shorts[name]}`,\n )\n }\n if (field.short) {\n if (!/^[a-zA-Z0-9]$/.test(field.short)) {\n throw new TypeError(\n `Invalid ${name} short option: ${field.short}, ` +\n 'must be 1 ASCII alphanumeric character',\n )\n }\n if (this.#shorts[field.short]) {\n throw new TypeError(\n `Invalid ${name} short option: ${field.short}, ` +\n `already in use for ${this.#shorts[field.short]}`,\n )\n }\n this.#shorts[field.short] = name\n this.#shorts[name] = name\n }\n }\n\n /**\n * Return the usage banner for the given configuration\n */\n usage(): string {\n if (this.#usage) return this.#usage\n\n let headingLevel = 1\n const ui = cliui({ width })\n const first = this.#fields[0]\n let start = first?.type === 'heading' ? 1 : 0\n if (first?.type === 'heading') {\n ui.div({\n padding: [0, 0, 0, 0],\n text: normalize(first.text),\n })\n }\n ui.div({ padding: [0, 0, 0, 0], text: 'Usage:' })\n if (this.#options.usage) {\n ui.div({\n text: this.#options.usage,\n padding: [0, 0, 0, 2],\n })\n } else {\n const cmd = basename(String(process.argv[1]))\n const shortFlags: string[] = []\n const shorts: string[][] = []\n const flags: string[] = []\n const opts: string[][] = []\n for (const [field, config] of Object.entries(this.#configSet)) {\n if (config.short) {\n if (config.type === 'boolean') shortFlags.push(config.short)\n else shorts.push([config.short, config.hint || field])\n } else {\n if (config.type === 'boolean') flags.push(field)\n else opts.push([field, config.hint || field])\n }\n }\n const sf = shortFlags.length ? ' -' + shortFlags.join('') : ''\n const so = shorts.map(([k, v]) => ` --${k}=<${v}>`).join('')\n const lf = flags.map(k => ` --${k}`).join('')\n const lo = opts.map(([k, v]) => ` --${k}=<${v}>`).join('')\n const usage = `${cmd}${sf}${so}${lf}${lo}`.trim()\n ui.div({\n text: usage,\n padding: [0, 0, 0, 2],\n })\n }\n\n ui.div({ padding: [0, 0, 0, 0], text: '' })\n const maybeDesc = this.#fields[start]\n if (maybeDesc && isDescription(maybeDesc)) {\n const print = normalize(maybeDesc.text, maybeDesc.pre)\n start++\n ui.div({ padding: [0, 0, 0, 0], text: print })\n ui.div({ padding: [0, 0, 0, 0], text: '' })\n }\n\n const { rows, maxWidth } = this.#usageRows(start)\n\n // every heading/description after the first gets indented by 2\n // extra spaces.\n for (const row of rows) {\n if (row.left) {\n // If the row is too long, don't wrap it\n // Bump the right-hand side down a line to make room\n const configIndent = indent(Math.max(headingLevel, 2))\n if (row.left.length > maxWidth - 3) {\n ui.div({ text: row.left, padding: [0, 0, 0, configIndent] })\n ui.div({ text: row.text, padding: [0, 0, 0, maxWidth] })\n } else {\n ui.div(\n {\n text: row.left,\n padding: [0, 1, 0, configIndent],\n width: maxWidth,\n },\n { padding: [0, 0, 0, 0], text: row.text },\n )\n }\n if (row.skipLine) {\n ui.div({ padding: [0, 0, 0, 0], text: '' })\n }\n } else {\n if (isHeading(row)) {\n const { level } = row\n headingLevel = level\n // only h1 and h2 have bottom padding\n // h3-h6 do not\n const b = level <= 2 ? 1 : 0\n ui.div({ ...row, padding: [0, 0, b, indent(level)] })\n } else {\n ui.div({ ...row, padding: [0, 0, 1, indent(headingLevel + 1)] })\n }\n }\n }\n\n return (this.#usage = ui.toString())\n }\n\n /**\n * Return the usage banner markdown for the given configuration\n */\n usageMarkdown(): string {\n if (this.#usageMarkdown) return this.#usageMarkdown\n\n const out: string[] = []\n\n let headingLevel = 1\n const first = this.#fields[0]\n let start = first?.type === 'heading' ? 1 : 0\n if (first?.type === 'heading') {\n out.push(`# ${normalizeOneLine(first.text)}`)\n }\n out.push('Usage:')\n if (this.#options.usage) {\n out.push(normalizeMarkdown(this.#options.usage, true))\n } else {\n const cmd = basename(String(process.argv[1]))\n const shortFlags: string[] = []\n const shorts: string[][] = []\n const flags: string[] = []\n const opts: string[][] = []\n for (const [field, config] of Object.entries(this.#configSet)) {\n if (config.short) {\n if (config.type === 'boolean') shortFlags.push(config.short)\n else shorts.push([config.short, config.hint || field])\n } else {\n if (config.type === 'boolean') flags.push(field)\n else opts.push([field, config.hint || field])\n }\n }\n const sf = shortFlags.length ? ' -' + shortFlags.join('') : ''\n const so = shorts.map(([k, v]) => ` --${k}=<${v}>`).join('')\n const lf = flags.map(k => ` --${k}`).join('')\n const lo = opts.map(([k, v]) => ` --${k}=<${v}>`).join('')\n const usage = `${cmd}${sf}${so}${lf}${lo}`.trim()\n out.push(normalizeMarkdown(usage, true))\n }\n\n const maybeDesc = this.#fields[start]\n if (maybeDesc && isDescription(maybeDesc)) {\n out.push(normalizeMarkdown(maybeDesc.text, maybeDesc.pre))\n start++\n }\n\n const { rows } = this.#usageRows(start)\n\n // heading level in markdown is number of # ahead of text\n for (const row of rows) {\n if (row.left) {\n out.push(\n '#'.repeat(headingLevel + 1) +\n ' ' +\n normalizeOneLine(row.left, true),\n )\n if (row.text) out.push(normalizeMarkdown(row.text))\n } else if (isHeading(row)) {\n const { level } = row\n headingLevel = level\n out.push(\n `${'#'.repeat(headingLevel)} ${normalizeOneLine(\n row.text,\n row.pre,\n )}`,\n )\n } else {\n out.push(normalizeMarkdown(row.text, !!(row as Description).pre))\n }\n }\n\n return (this.#usageMarkdown = out.join('\\n\\n') + '\\n')\n }\n\n #usageRows(start: number) {\n // turn each config type into a row, and figure out the width of the\n // left hand indentation for the option descriptions.\n let maxMax = Math.max(12, Math.min(26, Math.floor(width / 3)))\n let maxWidth = 8\n let prev: Row | TextRow | undefined = undefined\n const rows: (Row | TextRow)[] = []\n for (const field of this.#fields.slice(start)) {\n if (field.type !== 'config') {\n if (prev?.type === 'config') prev.skipLine = true\n prev = undefined\n field.text = normalize(field.text, !!field.pre)\n rows.push(field)\n continue\n }\n const { value } = field\n const desc = value.description || ''\n const mult = value.multiple ? 'Can be set multiple times' : ''\n const opts =\n value.validOptions?.length ?\n `Valid options:${value.validOptions.map(\n v => ` ${JSON.stringify(v)}`,\n )}`\n : ''\n const dmDelim = desc.includes('\\n') ? '\\n\\n' : '\\n'\n const extra = [opts, mult].join(dmDelim).trim()\n const text = (normalize(desc) + dmDelim + extra).trim()\n const hint =\n value.hint ||\n (value.type === 'number' ? 'n'\n : value.type === 'string' ? field.name\n : undefined)\n const short =\n !value.short ? ''\n : value.type === 'boolean' ? `-${value.short} `\n : `-${value.short}<${hint}> `\n const left =\n value.type === 'boolean' ?\n `${short}--${field.name}`\n : `${short}--${field.name}=<${hint}>`\n const row: Row = { text, left, type: 'config' }\n if (text.length > width - maxMax) {\n row.skipLine = true\n }\n if (prev && left.length > maxMax) prev.skipLine = true\n prev = row\n const len = left.length + 4\n if (len > maxWidth && len < maxMax) {\n maxWidth = len\n }\n\n rows.push(row)\n }\n\n return { rows, maxWidth }\n }\n\n /**\n * Return the configuration options as a plain object\n */\n toJSON() {\n return Object.fromEntries(\n Object.entries(this.#configSet).map(([field, def]) => [\n field,\n {\n type: def.type,\n ...(def.multiple ? { multiple: true } : {}),\n ...(def.delim ? { delim: def.delim } : {}),\n ...(def.short ? { short: def.short } : {}),\n ...(def.description ?\n { description: normalize(def.description) }\n : {}),\n ...(def.validate ? { validate: def.validate } : {}),\n ...(def.validOptions ? { validOptions: def.validOptions } : {}),\n ...(def.default !== undefined ? { default: def.default } : {}),\n ...(def.hint ? { hint: def.hint } : {}),\n },\n ]),\n )\n }\n\n /**\n * Custom printer for `util.inspect`\n */\n [inspect.custom](_: number, options: InspectOptions) {\n return `Jack ${inspect(this.toJSON(), options)}`\n }\n}\n\n// Unwrap and un-indent, so we can wrap description\n// strings however makes them look nice in the code.\nconst normalize = (s: string, pre = false) => {\n if (pre)\n // prepend a ZWSP to each line so cliui doesn't strip it.\n return s\n .split('\\n')\n .map(l => `\\u200b${l}`)\n .join('\\n')\n return s\n .split(/^\\s*```\\s*$/gm)\n .map((s, i) => {\n if (i % 2 === 1) {\n if (!s.trim()) {\n return `\\`\\`\\`\\n\\`\\`\\`\\n`\n }\n // outdent the ``` blocks, but preserve whitespace otherwise.\n const split = s.split('\\n')\n // throw out the \\n at the start and end\n split.pop()\n split.shift()\n const si = split.reduce((shortest, l) => {\n /* c8 ignore next */\n const ind = l.match(/^\\s*/)?.[0] ?? ''\n if (ind.length) return Math.min(ind.length, shortest)\n else return shortest\n }, Infinity)\n /* c8 ignore next */\n const i = isFinite(si) ? si : 0\n return (\n '\\n```\\n' +\n split.map(s => `\\u200b${s.substring(i)}`).join('\\n') +\n '\\n```\\n'\n )\n }\n return (\n s\n // remove single line breaks, except for lists\n .replace(/([^\\n])\\n[ \\t]*([^\\n])/g, (_, $1, $2) =>\n !/^[-*]/.test($2) ? `${$1} ${$2}` : `${$1}\\n${$2}`,\n )\n // normalize mid-line whitespace\n .replace(/([^\\n])[ \\t]+([^\\n])/g, '$1 $2')\n // two line breaks are enough\n .replace(/\\n{3,}/g, '\\n\\n')\n // remove any spaces at the start of a line\n .replace(/\\n[ \\t]+/g, '\\n')\n .trim()\n )\n })\n .join('\\n')\n}\n\n// normalize for markdown printing, remove leading spaces on lines\nconst normalizeMarkdown = (s: string, pre: boolean = false): string => {\n const n = normalize(s, pre).replace(/\\\\/g, '\\\\\\\\')\n return pre ?\n `\\`\\`\\`\\n${n.replace(/\\u200b/g, '')}\\n\\`\\`\\``\n : n.replace(/\\n +/g, '\\n').trim()\n}\n\nconst normalizeOneLine = (s: string, pre: boolean = false) => {\n const n = normalize(s, pre)\n .replace(/[\\s\\u200b]+/g, ' ')\n .trim()\n return pre ? `\\`${n}\\`` : n\n}\n\n/**\n * Main entry point. Create and return a {@link Jack} object.\n */\nexport const jack = (options: JackOptions = {}) => new Jack(options)\n"]} \ No newline at end of file diff --git a/node_modules/jackspeak/dist/commonjs/package.json b/node_modules/jackspeak/dist/commonjs/package.json deleted file mode 100644 index 5bbefffb..00000000 --- a/node_modules/jackspeak/dist/commonjs/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "type": "commonjs" -} diff --git a/node_modules/jackspeak/dist/commonjs/parse-args-cjs.cjs.map b/node_modules/jackspeak/dist/commonjs/parse-args-cjs.cjs.map deleted file mode 100644 index 0a4a3695..00000000 --- a/node_modules/jackspeak/dist/commonjs/parse-args-cjs.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"parse-args-cjs.cjs","sourceRoot":"","sources":["../../src/parse-args-cjs.cts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA4B;AAE5B,MAAM,EAAE,GACN,CACE,OAAO,OAAO,KAAK,QAAQ;IAC3B,CAAC,CAAC,OAAO;IACT,OAAO,OAAO,CAAC,OAAO,KAAK,QAAQ,CACpC,CAAC,CAAC;IACD,OAAO,CAAC,OAAO;IACjB,CAAC,CAAC,QAAQ,CAAA;AACZ,MAAM,GAAG,GAAG,EAAE;KACX,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC;KACjB,KAAK,CAAC,GAAG,CAAC;KACV,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAA;AAE5B,qBAAqB;AACrB,MAAM,CAAC,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,CAAC,CAAC,GAAG,GAAG,CAAA;AAClC,oBAAoB;AAEpB,IAAI,EAAE,SAAS,EAAE,EAAE,EAAE,GAAG,IAAI,CAAA;AAC5B,qBAAqB;AACrB,IACE,CAAC,EAAE;IACH,KAAK,GAAG,EAAE;IACV,CAAC,KAAK,KAAK,EAAE,IAAI,KAAK,GAAG,EAAE,CAAC;IAC5B,CAAC,KAAK,KAAK,EAAE,IAAI,KAAK,GAAG,EAAE,CAAC,EAC5B,CAAC;IACD,oBAAoB;IACpB,EAAE,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC,SAAS,CAAA;AAC5C,CAAC;AAEY,QAAA,SAAS,GAAG,EAAE,CAAA","sourcesContent":["import * as util from 'util'\n\nconst pv =\n (\n typeof process === 'object' &&\n !!process &&\n typeof process.version === 'string'\n ) ?\n process.version\n : 'v0.0.0'\nconst pvs = pv\n .replace(/^v/, '')\n .split('.')\n .map(s => parseInt(s, 10))\n\n/* c8 ignore start */\nconst [major = 0, minor = 0] = pvs\n/* c8 ignore stop */\n\nlet { parseArgs: pa } = util\n/* c8 ignore start */\nif (\n !pa ||\n major < 16 ||\n (major === 18 && minor < 11) ||\n (major === 16 && minor < 19)\n) {\n /* c8 ignore stop */\n pa = require('@pkgjs/parseargs').parseArgs\n}\n\nexport const parseArgs = pa\n"]} \ No newline at end of file diff --git a/node_modules/jackspeak/dist/commonjs/parse-args-cjs.d.cts.map b/node_modules/jackspeak/dist/commonjs/parse-args-cjs.d.cts.map deleted file mode 100644 index 066287c8..00000000 --- a/node_modules/jackspeak/dist/commonjs/parse-args-cjs.d.cts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"parse-args-cjs.d.cts","sourceRoot":"","sources":["../../src/parse-args-cjs.cts"],"names":[],"mappings":";AAAA,OAAO,KAAK,IAAI,MAAM,MAAM,CAAA;AA+B5B,eAAO,MAAM,SAAS,uBAAK,CAAA"} \ No newline at end of file diff --git a/node_modules/jackspeak/dist/commonjs/parse-args.d.ts b/node_modules/jackspeak/dist/commonjs/parse-args.d.ts deleted file mode 100644 index 07f995cd..00000000 --- a/node_modules/jackspeak/dist/commonjs/parse-args.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -/// -import * as util from 'util'; -export declare const parseArgs: typeof util.parseArgs; -//# sourceMappingURL=parse-args-cjs.d.cts.map \ No newline at end of file diff --git a/node_modules/jackspeak/dist/commonjs/parse-args.js b/node_modules/jackspeak/dist/commonjs/parse-args.js deleted file mode 100644 index fc918a41..00000000 --- a/node_modules/jackspeak/dist/commonjs/parse-args.js +++ /dev/null @@ -1,50 +0,0 @@ -"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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.parseArgs = void 0; -const util = __importStar(require("util")); -const pv = (typeof process === 'object' && - !!process && - typeof process.version === 'string') ? - process.version - : 'v0.0.0'; -const pvs = pv - .replace(/^v/, '') - .split('.') - .map(s => parseInt(s, 10)); -/* c8 ignore start */ -const [major = 0, minor = 0] = pvs; -/* c8 ignore stop */ -let { parseArgs: pa } = util; -/* c8 ignore start */ -if (!pa || - major < 16 || - (major === 18 && minor < 11) || - (major === 16 && minor < 19)) { - /* c8 ignore stop */ - pa = require('@pkgjs/parseargs').parseArgs; -} -exports.parseArgs = pa; -//# sourceMappingURL=parse-args-cjs.cjs.map \ No newline at end of file diff --git a/node_modules/jackspeak/dist/esm/index.d.ts b/node_modules/jackspeak/dist/esm/index.d.ts deleted file mode 100644 index 214a1773..00000000 --- a/node_modules/jackspeak/dist/esm/index.d.ts +++ /dev/null @@ -1,315 +0,0 @@ -/// -export type ConfigType = 'number' | 'string' | 'boolean'; -/** - * Given a Jack object, get the typeof its ConfigSet - */ -export type Unwrap = J extends Jack ? C : never; -import { inspect, InspectOptions } from 'node:util'; -/** - * Defines the type of value that is valid, given a config definition's - * {@link ConfigType} and boolean multiple setting - */ -export type ValidValue = [ - T, - M -] extends ['number', true] ? number[] : [T, M] extends ['string', true] ? string[] : [T, M] extends ['boolean', true] ? boolean[] : [T, M] extends ['number', false] ? number : [T, M] extends ['string', false] ? string : [T, M] extends ['boolean', false] ? boolean : [T, M] extends ['string', boolean] ? string | string[] : [T, M] extends ['boolean', boolean] ? boolean | boolean[] : [T, M] extends ['number', boolean] ? number | number[] : [T, M] extends [ConfigType, false] ? string | number | boolean : [T, M] extends [ConfigType, true] ? string[] | number[] | boolean[] : string | number | boolean | string[] | number[] | boolean[]; -/** - * The meta information for a config option definition, when the - * type and multiple values can be inferred by the method being used - */ -export type ConfigOptionMeta = { - default?: undefined | (ValidValue & (O extends number[] | string[] ? M extends false ? O[number] : O[number][] : unknown)); - validOptions?: O; - description?: string; - validate?: ((v: unknown) => v is ValidValue) | ((v: unknown) => boolean); - short?: string | undefined; - type?: T; - hint?: T extends 'boolean' ? never : string; - delim?: M extends true ? string : never; -} & (M extends false ? { - multiple?: false | undefined; -} : M extends true ? { - multiple: true; -} : { - multiple?: boolean; -}); -/** - * A set of {@link ConfigOptionMeta} fields, referenced by their longOption - * string values. - */ -export type ConfigMetaSet = { - [longOption: string]: ConfigOptionMeta; -}; -/** - * Infer {@link ConfigSet} fields from a given {@link ConfigMetaSet} - */ -export type ConfigSetFromMetaSet> = { - [longOption in keyof S]: ConfigOptionBase; -}; -/** - * Fields that can be set on a {@link ConfigOptionBase} or - * {@link ConfigOptionMeta} based on whether or not the field is known to be - * multiple. - */ -export type MultiType = M extends true ? { - multiple: true; - delim?: string | undefined; -} : M extends false ? { - multiple?: false | undefined; - delim?: undefined; -} : { - multiple?: boolean | undefined; - delim?: string | undefined; -}; -/** - * A config field definition, in its full representation. - */ -export type ConfigOptionBase = { - type: T; - short?: string | undefined; - default?: ValidValue | undefined; - description?: string; - hint?: T extends 'boolean' ? undefined : string | undefined; - validate?: (v: unknown) => v is ValidValue; - validOptions?: T extends 'boolean' ? undefined : T extends 'string' ? readonly string[] : T extends 'number' ? readonly number[] : readonly number[] | readonly string[]; -} & MultiType; -export declare const isConfigType: (t: string) => t is ConfigType; -export declare const isConfigOption: (o: any, type: T, multi: M) => o is ConfigOptionBase; -/** - * A set of {@link ConfigOptionBase} objects, referenced by their longOption - * string values. - */ -export type ConfigSet = { - [longOption: string]: ConfigOptionBase; -}; -/** - * The 'values' field returned by {@link Jack#parse} - */ -export type OptionsResults = { - [k in keyof T]?: T[k]['validOptions'] extends (readonly string[] | readonly number[]) ? T[k] extends ConfigOptionBase<'string' | 'number', false> ? T[k]['validOptions'][number] : T[k] extends ConfigOptionBase<'string' | 'number', true> ? T[k]['validOptions'][number][] : never : T[k] extends ConfigOptionBase<'string', false> ? string : T[k] extends ConfigOptionBase<'string', true> ? string[] : T[k] extends ConfigOptionBase<'number', false> ? number : T[k] extends ConfigOptionBase<'number', true> ? number[] : T[k] extends ConfigOptionBase<'boolean', false> ? boolean : T[k] extends ConfigOptionBase<'boolean', true> ? boolean[] : never; -}; -/** - * The object retured by {@link Jack#parse} - */ -export type Parsed = { - values: OptionsResults; - positionals: string[]; -}; -/** - * A row used when generating the {@link Jack#usage} string - */ -export interface Row { - left?: string; - text: string; - skipLine?: boolean; - type?: string; -} -/** - * A heading for a section in the usage, created by the jack.heading() - * method. - * - * First heading is always level 1, subsequent headings default to 2. - * - * The level of the nearest heading level sets the indentation of the - * description that follows. - */ -export interface Heading extends Row { - type: 'heading'; - text: string; - left?: ''; - skipLine?: boolean; - level: number; - pre?: boolean; -} -/** - * An arbitrary blob of text describing some stuff, set by the - * jack.description() method. - * - * Indentation determined by level of the nearest header. - */ -export interface Description extends Row { - type: 'description'; - text: string; - left?: ''; - skipLine?: boolean; - pre?: boolean; -} -/** - * A heading or description row used when generating the {@link Jack#usage} - * string - */ -export type TextRow = Heading | Description; -/** - * Either a {@link TextRow} or a reference to a {@link ConfigOptionBase} - */ -export type UsageField = TextRow | { - type: 'config'; - name: string; - value: ConfigOptionBase; -}; -/** - * Options provided to the {@link Jack} constructor - */ -export interface JackOptions { - /** - * Whether to allow positional arguments - * - * @default true - */ - allowPositionals?: boolean; - /** - * Prefix to use when reading/writing the environment variables - * - * If not specified, environment behavior will not be available. - */ - envPrefix?: string; - /** - * Environment object to read/write. Defaults `process.env`. - * No effect if `envPrefix` is not set. - */ - env?: { - [k: string]: string | undefined; - }; - /** - * A short usage string. If not provided, will be generated from the - * options provided, but that can of course be rather verbose if - * there are a lot of options. - */ - usage?: string; - /** - * Stop parsing flags and opts at the first positional argument. - * This is to support cases like `cmd [flags] [options]`, where - * each subcommand may have different options. This effectively treats - * any positional as a `--` argument. Only relevant if `allowPositionals` - * is true. - * - * To do subcommands, set this option, look at the first positional, and - * parse the remaining positionals as appropriate. - * - * @default false - */ - stopAtPositional?: boolean; - /** - * Conditional `stopAtPositional`. If set to a `(string)=>boolean` function, - * will be called with each positional argument encountered. If the function - * returns true, then parsing will stop at that point. - */ - stopAtPositionalTest?: (arg: string) => boolean; -} -/** - * Class returned by the {@link jack} function and all configuration - * definition methods. This is what gets chained together. - */ -export declare class Jack { - #private; - constructor(options?: JackOptions); - /** - * Set the default value (which will still be overridden by env or cli) - * as if from a parsed config file. The optional `source` param, if - * provided, will be included in error messages if a value is invalid or - * unknown. - */ - setConfigValues(values: OptionsResults, source?: string): this; - /** - * Parse a string of arguments, and return the resulting - * `{ values, positionals }` object. - * - * If an {@link JackOptions#envPrefix} is set, then it will read default - * values from the environment, and write the resulting values back - * to the environment as well. - * - * Environment values always take precedence over any other value, except - * an explicit CLI setting. - */ - parse(args?: string[]): Parsed; - loadEnvDefaults(): void; - applyDefaults(p: Parsed): void; - /** - * Only parse the command line arguments passed in. - * Does not strip off the `node script.js` bits, so it must be just the - * arguments you wish to have parsed. - * Does not read from or write to the environment, or set defaults. - */ - parseRaw(args: string[]): Parsed; - /** - * Validate that any arbitrary object is a valid configuration `values` - * object. Useful when loading config files or other sources. - */ - validate(o: unknown): asserts o is Parsed['values']; - writeEnv(p: Parsed): void; - /** - * Add a heading to the usage output banner - */ - heading(text: string, level?: 1 | 2 | 3 | 4 | 5 | 6, { pre }?: { - pre?: boolean; - }): Jack; - /** - * Add a long-form description to the usage output at this position. - */ - description(text: string, { pre }?: { - pre?: boolean; - }): Jack; - /** - * Add one or more number fields. - */ - num>(fields: F): Jack>; - /** - * Add one or more multiple number fields. - */ - numList>(fields: F): Jack>; - /** - * Add one or more string option fields. - */ - opt>(fields: F): Jack>; - /** - * Add one or more multiple string option fields. - */ - optList>(fields: F): Jack>; - /** - * Add one or more flag fields. - */ - flag>(fields: F): Jack>; - /** - * Add one or more multiple flag fields. - */ - flagList>(fields: F): Jack>; - /** - * Generic field definition method. Similar to flag/flagList/number/etc, - * but you must specify the `type` (and optionally `multiple` and `delim`) - * fields on each one, or Jack won't know how to define them. - */ - addFields(fields: F): Jack; - /** - * Return the usage banner for the given configuration - */ - usage(): string; - /** - * Return the usage banner markdown for the given configuration - */ - usageMarkdown(): string; - /** - * Return the configuration options as a plain object - */ - toJSON(): { - [k: string]: { - hint?: string | undefined; - default?: string | number | boolean | string[] | number[] | boolean[] | undefined; - validOptions?: readonly number[] | readonly string[] | undefined; - validate?: ((v: unknown) => v is string | number | boolean | string[] | number[] | boolean[]) | undefined; - description?: string | undefined; - short?: string | undefined; - delim?: string | undefined; - multiple?: boolean | undefined; - type: ConfigType; - }; - }; - /** - * Custom printer for `util.inspect` - */ - [inspect.custom](_: number, options: InspectOptions): string; -} -/** - * Main entry point. Create and return a {@link Jack} object. - */ -export declare const jack: (options?: JackOptions) => Jack<{}>; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/jackspeak/dist/esm/index.d.ts.map b/node_modules/jackspeak/dist/esm/index.d.ts.map deleted file mode 100644 index faf9ddd0..00000000 --- a/node_modules/jackspeak/dist/esm/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAA;AAExD;;GAEG;AACH,MAAM,MAAM,MAAM,CAAC,CAAC,IAAI,CAAC,SAAS,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK,CAAA;AAE3D,OAAO,EAAE,OAAO,EAAE,cAAc,EAAmB,MAAM,WAAW,CAAA;AA2DpE;;;GAGG;AACH,MAAM,MAAM,UAAU,CACpB,CAAC,SAAS,UAAU,GAAG,UAAU,EACjC,CAAC,SAAS,OAAO,GAAG,OAAO,IAE3B;IAAC,CAAC;IAAE,CAAC;CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,CAAC,GAAG,MAAM,EAAE,GACxC,CAAC,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,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QAAQ,CAAC,EACvC,MAAM,EAAE,CAAC,GACR,IAAI,CAAC,CAAC,GAAG,oBAAoB,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IAIpD;;OAEG;IACH,IAAI,CAAC,CAAC,SAAS,aAAa,CAAC,SAAS,EAAE,KAAK,CAAC,EAC5C,MAAM,EAAE,CAAC,GACR,IAAI,CAAC,CAAC,GAAG,oBAAoB,CAAC,SAAS,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;IAItD;;OAEG;IACH,QAAQ,CAAC,CAAC,SAAS,aAAa,CAAC,SAAS,CAAC,EACzC,MAAM,EAAE,CAAC,GACR,IAAI,CAAC,CAAC,GAAG,oBAAoB,CAAC,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IAIrD;;;;OAIG;IACH,SAAS,CAAC,CAAC,SAAS,SAAS,EAAE,MAAM,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;IA4EtD;;OAEG;IACH,KAAK,IAAI,MAAM;IAgGf;;OAEG;IACH,aAAa,IAAI,MAAM;IAgIvB;;OAEG;IACH,MAAM;;;;;;;;;;;;;IAqBN;;OAEG;IACH,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc;CAGpD;AAsED;;GAEG;AACH,eAAO,MAAM,IAAI,aAAa,WAAW,aAA2B,CAAA"} \ No newline at end of file diff --git a/node_modules/jackspeak/dist/esm/index.js b/node_modules/jackspeak/dist/esm/index.js deleted file mode 100644 index 78fdfa81..00000000 --- a/node_modules/jackspeak/dist/esm/index.js +++ /dev/null @@ -1,1000 +0,0 @@ -import { inspect } from 'node:util'; -import { parseArgs } from './parse-args.js'; -// it's a tiny API, just cast it inline, it's fine -//@ts-ignore -import cliui from '@isaacs/cliui'; -import { basename } from 'node:path'; -const width = Math.min((process && process.stdout && process.stdout.columns) || 80, 80); -// indentation spaces from heading level -const indent = (n) => (n - 1) * 2; -const toEnvKey = (pref, key) => { - return [pref, key.replace(/[^a-zA-Z0-9]+/g, ' ')] - .join(' ') - .trim() - .toUpperCase() - .replace(/ /g, '_'); -}; -const toEnvVal = (value, delim = '\n') => { - const str = typeof value === 'string' ? value - : typeof value === 'boolean' ? - value ? '1' - : '0' - : typeof value === 'number' ? String(value) - : Array.isArray(value) ? - value.map((v) => toEnvVal(v)).join(delim) - : /* c8 ignore start */ undefined; - if (typeof str !== 'string') { - throw new Error(`could not serialize value to environment: ${JSON.stringify(value)}`); - } - /* c8 ignore stop */ - return str; -}; -const fromEnvVal = (env, type, multiple, delim = '\n') => (multiple ? - env ? env.split(delim).map(v => fromEnvVal(v, type, false)) - : [] - : type === 'string' ? env - : type === 'boolean' ? env === '1' - : +env.trim()); -export const isConfigType = (t) => typeof t === 'string' && - (t === 'string' || t === 'number' || t === 'boolean'); -const undefOrType = (v, t) => v === undefined || typeof v === t; -const undefOrTypeArray = (v, t) => v === undefined || (Array.isArray(v) && v.every(x => typeof x === t)); -const isValidOption = (v, vo) => Array.isArray(v) ? v.every(x => isValidOption(x, vo)) : vo.includes(v); -// print the value type, for error message reporting -const valueType = (v) => typeof v === 'string' ? 'string' - : typeof v === 'boolean' ? 'boolean' - : typeof v === 'number' ? 'number' - : Array.isArray(v) ? - joinTypes([...new Set(v.map(v => valueType(v)))]) + '[]' - : `${v.type}${v.multiple ? '[]' : ''}`; -const joinTypes = (types) => types.length === 1 && typeof types[0] === 'string' ? - types[0] - : `(${types.join('|')})`; -const isValidValue = (v, type, multi) => { - if (multi) { - if (!Array.isArray(v)) - return false; - return !v.some((v) => !isValidValue(v, type, false)); - } - if (Array.isArray(v)) - return false; - return typeof v === type; -}; -export const isConfigOption = (o, type, multi) => !!o && - typeof o === 'object' && - isConfigType(o.type) && - o.type === type && - undefOrType(o.short, 'string') && - undefOrType(o.description, 'string') && - undefOrType(o.hint, 'string') && - undefOrType(o.validate, 'function') && - (o.type === 'boolean' ? - o.validOptions === undefined - : undefOrTypeArray(o.validOptions, o.type)) && - (o.default === undefined || isValidValue(o.default, type, multi)) && - !!o.multiple === multi; -function num(o = {}) { - const { default: def, validate: val, validOptions, ...rest } = o; - if (def !== undefined && !isValidValue(def, 'number', false)) { - throw new TypeError('invalid default value', { - cause: { - found: def, - wanted: 'number', - }, - }); - } - if (!undefOrTypeArray(validOptions, 'number')) { - throw new TypeError('invalid validOptions', { - cause: { - found: validOptions, - wanted: 'number[]', - }, - }); - } - const validate = val ? - val - : undefined; - return { - ...rest, - default: def, - validate, - validOptions, - type: 'number', - multiple: false, - }; -} -function numList(o = {}) { - const { default: def, validate: val, validOptions, ...rest } = o; - if (def !== undefined && !isValidValue(def, 'number', true)) { - throw new TypeError('invalid default value', { - cause: { - found: def, - wanted: 'number[]', - }, - }); - } - if (!undefOrTypeArray(validOptions, 'number')) { - throw new TypeError('invalid validOptions', { - cause: { - found: validOptions, - wanted: 'number[]', - }, - }); - } - const validate = val ? - val - : undefined; - return { - ...rest, - default: def, - validate, - validOptions, - type: 'number', - multiple: true, - }; -} -function opt(o = {}) { - const { default: def, validate: val, validOptions, ...rest } = o; - if (def !== undefined && !isValidValue(def, 'string', false)) { - throw new TypeError('invalid default value', { - cause: { - found: def, - wanted: 'string', - }, - }); - } - if (!undefOrTypeArray(validOptions, 'string')) { - throw new TypeError('invalid validOptions', { - cause: { - found: validOptions, - wanted: 'string[]', - }, - }); - } - const validate = val ? - val - : undefined; - return { - ...rest, - default: def, - validate, - validOptions, - type: 'string', - multiple: false, - }; -} -function optList(o = {}) { - const { default: def, validate: val, validOptions, ...rest } = o; - if (def !== undefined && !isValidValue(def, 'string', true)) { - throw new TypeError('invalid default value', { - cause: { - found: def, - wanted: 'string[]', - }, - }); - } - if (!undefOrTypeArray(validOptions, 'string')) { - throw new TypeError('invalid validOptions', { - cause: { - found: validOptions, - wanted: 'string[]', - }, - }); - } - const validate = val ? - val - : undefined; - return { - ...rest, - default: def, - validate, - validOptions, - type: 'string', - multiple: true, - }; -} -function flag(o = {}) { - const { hint, default: def, validate: val, ...rest } = o; - delete rest.validOptions; - if (def !== undefined && !isValidValue(def, 'boolean', false)) { - throw new TypeError('invalid default value'); - } - const validate = val ? - val - : undefined; - if (hint !== undefined) { - throw new TypeError('cannot provide hint for flag'); - } - return { - ...rest, - default: def, - validate, - type: 'boolean', - multiple: false, - }; -} -function flagList(o = {}) { - const { hint, default: def, validate: val, ...rest } = o; - delete rest.validOptions; - if (def !== undefined && !isValidValue(def, 'boolean', true)) { - throw new TypeError('invalid default value'); - } - const validate = val ? - val - : undefined; - if (hint !== undefined) { - throw new TypeError('cannot provide hint for flag list'); - } - return { - ...rest, - default: def, - validate, - type: 'boolean', - multiple: true, - }; -} -const toParseArgsOptionsConfig = (options) => { - const c = {}; - for (const longOption in options) { - const config = options[longOption]; - /* c8 ignore start */ - if (!config) { - throw new Error('config must be an object: ' + longOption); - } - /* c8 ignore start */ - if (isConfigOption(config, 'number', true)) { - c[longOption] = { - type: 'string', - multiple: true, - default: config.default?.map(c => String(c)), - }; - } - else if (isConfigOption(config, 'number', false)) { - c[longOption] = { - type: 'string', - multiple: false, - default: config.default === undefined ? - undefined - : String(config.default), - }; - } - else { - const conf = config; - c[longOption] = { - type: conf.type, - multiple: !!conf.multiple, - default: conf.default, - }; - } - const clo = c[longOption]; - if (typeof config.short === 'string') { - clo.short = config.short; - } - if (config.type === 'boolean' && - !longOption.startsWith('no-') && - !options[`no-${longOption}`]) { - c[`no-${longOption}`] = { - type: 'boolean', - multiple: config.multiple, - }; - } - } - return c; -}; -const isHeading = (r) => r.type === 'heading'; -const isDescription = (r) => r.type === 'description'; -/** - * Class returned by the {@link jack} function and all configuration - * definition methods. This is what gets chained together. - */ -export class Jack { - #configSet; - #shorts; - #options; - #fields = []; - #env; - #envPrefix; - #allowPositionals; - #usage; - #usageMarkdown; - constructor(options = {}) { - this.#options = options; - this.#allowPositionals = options.allowPositionals !== false; - this.#env = - this.#options.env === undefined ? process.env : this.#options.env; - this.#envPrefix = options.envPrefix; - // We need to fib a little, because it's always the same object, but it - // starts out as having an empty config set. Then each method that adds - // fields returns `this as Jack` - this.#configSet = Object.create(null); - this.#shorts = Object.create(null); - } - /** - * Set the default value (which will still be overridden by env or cli) - * as if from a parsed config file. The optional `source` param, if - * provided, will be included in error messages if a value is invalid or - * unknown. - */ - setConfigValues(values, source = '') { - try { - this.validate(values); - } - catch (er) { - const e = er; - if (source && e && typeof e === 'object') { - if (e.cause && typeof e.cause === 'object') { - Object.assign(e.cause, { path: source }); - } - else { - e.cause = { path: source }; - } - } - throw e; - } - for (const [field, value] of Object.entries(values)) { - const my = this.#configSet[field]; - // already validated, just for TS's benefit - /* c8 ignore start */ - if (!my) { - throw new Error('unexpected field in config set: ' + field, { - cause: { found: field }, - }); - } - /* c8 ignore stop */ - my.default = value; - } - return this; - } - /** - * Parse a string of arguments, and return the resulting - * `{ values, positionals }` object. - * - * If an {@link JackOptions#envPrefix} is set, then it will read default - * values from the environment, and write the resulting values back - * to the environment as well. - * - * Environment values always take precedence over any other value, except - * an explicit CLI setting. - */ - parse(args = process.argv) { - this.loadEnvDefaults(); - const p = this.parseRaw(args); - this.applyDefaults(p); - this.writeEnv(p); - return p; - } - loadEnvDefaults() { - if (this.#envPrefix) { - for (const [field, my] of Object.entries(this.#configSet)) { - const ek = toEnvKey(this.#envPrefix, field); - const env = this.#env[ek]; - if (env !== undefined) { - my.default = fromEnvVal(env, my.type, !!my.multiple, my.delim); - } - } - } - } - applyDefaults(p) { - for (const [field, c] of Object.entries(this.#configSet)) { - if (c.default !== undefined && !(field in p.values)) { - //@ts-ignore - p.values[field] = c.default; - } - } - } - /** - * Only parse the command line arguments passed in. - * Does not strip off the `node script.js` bits, so it must be just the - * arguments you wish to have parsed. - * Does not read from or write to the environment, or set defaults. - */ - parseRaw(args) { - if (args === process.argv) { - args = args.slice(process._eval !== undefined ? 1 : 2); - } - const options = toParseArgsOptionsConfig(this.#configSet); - const result = parseArgs({ - args, - options, - // always strict, but using our own logic - strict: false, - allowPositionals: this.#allowPositionals, - tokens: true, - }); - const p = { - values: {}, - positionals: [], - }; - for (const token of result.tokens) { - if (token.kind === 'positional') { - p.positionals.push(token.value); - if (this.#options.stopAtPositional || - this.#options.stopAtPositionalTest?.(token.value)) { - p.positionals.push(...args.slice(token.index + 1)); - break; - } - } - else if (token.kind === 'option') { - let value = undefined; - if (token.name.startsWith('no-')) { - const my = this.#configSet[token.name]; - const pname = token.name.substring('no-'.length); - const pos = this.#configSet[pname]; - if (pos && - pos.type === 'boolean' && - (!my || - (my.type === 'boolean' && !!my.multiple === !!pos.multiple))) { - value = false; - token.name = pname; - } - } - const my = this.#configSet[token.name]; - if (!my) { - throw new Error(`Unknown option '${token.rawName}'. ` + - `To specify a positional argument starting with a '-', ` + - `place it at the end of the command after '--', as in ` + - `'-- ${token.rawName}'`, { - cause: { - found: token.rawName + (token.value ? `=${token.value}` : ''), - }, - }); - } - if (value === undefined) { - if (token.value === undefined) { - if (my.type !== 'boolean') { - throw new Error(`No value provided for ${token.rawName}, expected ${my.type}`, { - cause: { - name: token.rawName, - wanted: valueType(my), - }, - }); - } - value = true; - } - else { - if (my.type === 'boolean') { - throw new Error(`Flag ${token.rawName} does not take a value, received '${token.value}'`, { cause: { found: token } }); - } - if (my.type === 'string') { - value = token.value; - } - else { - value = +token.value; - if (value !== value) { - throw new Error(`Invalid value '${token.value}' provided for ` + - `'${token.rawName}' option, expected number`, { - cause: { - name: token.rawName, - found: token.value, - wanted: 'number', - }, - }); - } - } - } - } - if (my.multiple) { - const pv = p.values; - const tn = pv[token.name] ?? []; - pv[token.name] = tn; - tn.push(value); - } - else { - const pv = p.values; - pv[token.name] = value; - } - } - } - for (const [field, value] of Object.entries(p.values)) { - const valid = this.#configSet[field]?.validate; - const validOptions = this.#configSet[field]?.validOptions; - let cause; - if (validOptions && !isValidOption(value, validOptions)) { - cause = { name: field, found: value, validOptions: validOptions }; - } - if (valid && !valid(value)) { - cause = cause || { name: field, found: value }; - } - if (cause) { - throw new Error(`Invalid value provided for --${field}: ${JSON.stringify(value)}`, { cause }); - } - } - return p; - } - /** - * do not set fields as 'no-foo' if 'foo' exists and both are bools - * just set foo. - */ - #noNoFields(f, val, s = f) { - if (!f.startsWith('no-') || typeof val !== 'boolean') - return; - const yes = f.substring('no-'.length); - // recurse so we get the core config key we care about. - this.#noNoFields(yes, val, s); - if (this.#configSet[yes]?.type === 'boolean') { - throw new Error(`do not set '${s}', instead set '${yes}' as desired.`, { cause: { found: s, wanted: yes } }); - } - } - /** - * Validate that any arbitrary object is a valid configuration `values` - * object. Useful when loading config files or other sources. - */ - validate(o) { - if (!o || typeof o !== 'object') { - throw new Error('Invalid config: not an object', { - cause: { found: o }, - }); - } - const opts = o; - for (const field in o) { - const value = opts[field]; - /* c8 ignore next - for TS */ - if (value === undefined) - continue; - this.#noNoFields(field, value); - const config = this.#configSet[field]; - if (!config) { - throw new Error(`Unknown config option: ${field}`, { - cause: { found: field }, - }); - } - if (!isValidValue(value, config.type, !!config.multiple)) { - throw new Error(`Invalid value ${valueType(value)} for ${field}, expected ${valueType(config)}`, { - cause: { - name: field, - found: value, - wanted: valueType(config), - }, - }); - } - let cause; - if (config.validOptions && - !isValidOption(value, config.validOptions)) { - cause = { - name: field, - found: value, - validOptions: config.validOptions, - }; - } - if (config.validate && !config.validate(value)) { - cause = cause || { name: field, found: value }; - } - if (cause) { - throw new Error(`Invalid config value for ${field}: ${value}`, { - cause, - }); - } - } - } - writeEnv(p) { - if (!this.#env || !this.#envPrefix) - return; - for (const [field, value] of Object.entries(p.values)) { - const my = this.#configSet[field]; - this.#env[toEnvKey(this.#envPrefix, field)] = toEnvVal(value, my?.delim); - } - } - /** - * Add a heading to the usage output banner - */ - heading(text, level, { pre = false } = {}) { - if (level === undefined) { - level = this.#fields.some(r => isHeading(r)) ? 2 : 1; - } - this.#fields.push({ type: 'heading', text, level, pre }); - return this; - } - /** - * Add a long-form description to the usage output at this position. - */ - description(text, { pre } = {}) { - this.#fields.push({ type: 'description', text, pre }); - return this; - } - /** - * Add one or more number fields. - */ - num(fields) { - return this.#addFields(fields, num); - } - /** - * Add one or more multiple number fields. - */ - numList(fields) { - return this.#addFields(fields, numList); - } - /** - * Add one or more string option fields. - */ - opt(fields) { - return this.#addFields(fields, opt); - } - /** - * Add one or more multiple string option fields. - */ - optList(fields) { - return this.#addFields(fields, optList); - } - /** - * Add one or more flag fields. - */ - flag(fields) { - return this.#addFields(fields, flag); - } - /** - * Add one or more multiple flag fields. - */ - flagList(fields) { - return this.#addFields(fields, flagList); - } - /** - * Generic field definition method. Similar to flag/flagList/number/etc, - * but you must specify the `type` (and optionally `multiple` and `delim`) - * fields on each one, or Jack won't know how to define them. - */ - addFields(fields) { - const next = this; - for (const [name, field] of Object.entries(fields)) { - this.#validateName(name, field); - next.#fields.push({ - type: 'config', - name, - value: field, - }); - } - Object.assign(next.#configSet, fields); - return next; - } - #addFields(fields, fn) { - const next = this; - Object.assign(next.#configSet, Object.fromEntries(Object.entries(fields).map(([name, field]) => { - this.#validateName(name, field); - const option = fn(field); - next.#fields.push({ - type: 'config', - name, - value: option, - }); - return [name, option]; - }))); - return next; - } - #validateName(name, field) { - if (!/^[a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?$/.test(name)) { - throw new TypeError(`Invalid option name: ${name}, ` + - `must be '-' delimited ASCII alphanumeric`); - } - if (this.#configSet[name]) { - throw new TypeError(`Cannot redefine option ${field}`); - } - if (this.#shorts[name]) { - throw new TypeError(`Cannot redefine option ${name}, already ` + - `in use for ${this.#shorts[name]}`); - } - if (field.short) { - if (!/^[a-zA-Z0-9]$/.test(field.short)) { - throw new TypeError(`Invalid ${name} short option: ${field.short}, ` + - 'must be 1 ASCII alphanumeric character'); - } - if (this.#shorts[field.short]) { - throw new TypeError(`Invalid ${name} short option: ${field.short}, ` + - `already in use for ${this.#shorts[field.short]}`); - } - this.#shorts[field.short] = name; - this.#shorts[name] = name; - } - } - /** - * Return the usage banner for the given configuration - */ - usage() { - if (this.#usage) - return this.#usage; - let headingLevel = 1; - const ui = cliui({ width }); - const first = this.#fields[0]; - let start = first?.type === 'heading' ? 1 : 0; - if (first?.type === 'heading') { - ui.div({ - padding: [0, 0, 0, 0], - text: normalize(first.text), - }); - } - ui.div({ padding: [0, 0, 0, 0], text: 'Usage:' }); - if (this.#options.usage) { - ui.div({ - text: this.#options.usage, - padding: [0, 0, 0, 2], - }); - } - else { - const cmd = basename(String(process.argv[1])); - const shortFlags = []; - const shorts = []; - const flags = []; - const opts = []; - for (const [field, config] of Object.entries(this.#configSet)) { - if (config.short) { - if (config.type === 'boolean') - shortFlags.push(config.short); - else - shorts.push([config.short, config.hint || field]); - } - else { - if (config.type === 'boolean') - flags.push(field); - else - opts.push([field, config.hint || field]); - } - } - const sf = shortFlags.length ? ' -' + shortFlags.join('') : ''; - const so = shorts.map(([k, v]) => ` --${k}=<${v}>`).join(''); - const lf = flags.map(k => ` --${k}`).join(''); - const lo = opts.map(([k, v]) => ` --${k}=<${v}>`).join(''); - const usage = `${cmd}${sf}${so}${lf}${lo}`.trim(); - ui.div({ - text: usage, - padding: [0, 0, 0, 2], - }); - } - ui.div({ padding: [0, 0, 0, 0], text: '' }); - const maybeDesc = this.#fields[start]; - if (maybeDesc && isDescription(maybeDesc)) { - const print = normalize(maybeDesc.text, maybeDesc.pre); - start++; - ui.div({ padding: [0, 0, 0, 0], text: print }); - ui.div({ padding: [0, 0, 0, 0], text: '' }); - } - const { rows, maxWidth } = this.#usageRows(start); - // every heading/description after the first gets indented by 2 - // extra spaces. - for (const row of rows) { - if (row.left) { - // If the row is too long, don't wrap it - // Bump the right-hand side down a line to make room - const configIndent = indent(Math.max(headingLevel, 2)); - if (row.left.length > maxWidth - 3) { - ui.div({ text: row.left, padding: [0, 0, 0, configIndent] }); - ui.div({ text: row.text, padding: [0, 0, 0, maxWidth] }); - } - else { - ui.div({ - text: row.left, - padding: [0, 1, 0, configIndent], - width: maxWidth, - }, { padding: [0, 0, 0, 0], text: row.text }); - } - if (row.skipLine) { - ui.div({ padding: [0, 0, 0, 0], text: '' }); - } - } - else { - if (isHeading(row)) { - const { level } = row; - headingLevel = level; - // only h1 and h2 have bottom padding - // h3-h6 do not - const b = level <= 2 ? 1 : 0; - ui.div({ ...row, padding: [0, 0, b, indent(level)] }); - } - else { - ui.div({ ...row, padding: [0, 0, 1, indent(headingLevel + 1)] }); - } - } - } - return (this.#usage = ui.toString()); - } - /** - * Return the usage banner markdown for the given configuration - */ - usageMarkdown() { - if (this.#usageMarkdown) - return this.#usageMarkdown; - const out = []; - let headingLevel = 1; - const first = this.#fields[0]; - let start = first?.type === 'heading' ? 1 : 0; - if (first?.type === 'heading') { - out.push(`# ${normalizeOneLine(first.text)}`); - } - out.push('Usage:'); - if (this.#options.usage) { - out.push(normalizeMarkdown(this.#options.usage, true)); - } - else { - const cmd = basename(String(process.argv[1])); - const shortFlags = []; - const shorts = []; - const flags = []; - const opts = []; - for (const [field, config] of Object.entries(this.#configSet)) { - if (config.short) { - if (config.type === 'boolean') - shortFlags.push(config.short); - else - shorts.push([config.short, config.hint || field]); - } - else { - if (config.type === 'boolean') - flags.push(field); - else - opts.push([field, config.hint || field]); - } - } - const sf = shortFlags.length ? ' -' + shortFlags.join('') : ''; - const so = shorts.map(([k, v]) => ` --${k}=<${v}>`).join(''); - const lf = flags.map(k => ` --${k}`).join(''); - const lo = opts.map(([k, v]) => ` --${k}=<${v}>`).join(''); - const usage = `${cmd}${sf}${so}${lf}${lo}`.trim(); - out.push(normalizeMarkdown(usage, true)); - } - const maybeDesc = this.#fields[start]; - if (maybeDesc && isDescription(maybeDesc)) { - out.push(normalizeMarkdown(maybeDesc.text, maybeDesc.pre)); - start++; - } - const { rows } = this.#usageRows(start); - // heading level in markdown is number of # ahead of text - for (const row of rows) { - if (row.left) { - out.push('#'.repeat(headingLevel + 1) + - ' ' + - normalizeOneLine(row.left, true)); - if (row.text) - out.push(normalizeMarkdown(row.text)); - } - else if (isHeading(row)) { - const { level } = row; - headingLevel = level; - out.push(`${'#'.repeat(headingLevel)} ${normalizeOneLine(row.text, row.pre)}`); - } - else { - out.push(normalizeMarkdown(row.text, !!row.pre)); - } - } - return (this.#usageMarkdown = out.join('\n\n') + '\n'); - } - #usageRows(start) { - // turn each config type into a row, and figure out the width of the - // left hand indentation for the option descriptions. - let maxMax = Math.max(12, Math.min(26, Math.floor(width / 3))); - let maxWidth = 8; - let prev = undefined; - const rows = []; - for (const field of this.#fields.slice(start)) { - if (field.type !== 'config') { - if (prev?.type === 'config') - prev.skipLine = true; - prev = undefined; - field.text = normalize(field.text, !!field.pre); - rows.push(field); - continue; - } - const { value } = field; - const desc = value.description || ''; - const mult = value.multiple ? 'Can be set multiple times' : ''; - const opts = value.validOptions?.length ? - `Valid options:${value.validOptions.map(v => ` ${JSON.stringify(v)}`)}` - : ''; - const dmDelim = desc.includes('\n') ? '\n\n' : '\n'; - const extra = [opts, mult].join(dmDelim).trim(); - const text = (normalize(desc) + dmDelim + extra).trim(); - const hint = value.hint || - (value.type === 'number' ? 'n' - : value.type === 'string' ? field.name - : undefined); - const short = !value.short ? '' - : value.type === 'boolean' ? `-${value.short} ` - : `-${value.short}<${hint}> `; - const left = value.type === 'boolean' ? - `${short}--${field.name}` - : `${short}--${field.name}=<${hint}>`; - const row = { text, left, type: 'config' }; - if (text.length > width - maxMax) { - row.skipLine = true; - } - if (prev && left.length > maxMax) - prev.skipLine = true; - prev = row; - const len = left.length + 4; - if (len > maxWidth && len < maxMax) { - maxWidth = len; - } - rows.push(row); - } - return { rows, maxWidth }; - } - /** - * Return the configuration options as a plain object - */ - toJSON() { - return Object.fromEntries(Object.entries(this.#configSet).map(([field, def]) => [ - field, - { - type: def.type, - ...(def.multiple ? { multiple: true } : {}), - ...(def.delim ? { delim: def.delim } : {}), - ...(def.short ? { short: def.short } : {}), - ...(def.description ? - { description: normalize(def.description) } - : {}), - ...(def.validate ? { validate: def.validate } : {}), - ...(def.validOptions ? { validOptions: def.validOptions } : {}), - ...(def.default !== undefined ? { default: def.default } : {}), - ...(def.hint ? { hint: def.hint } : {}), - }, - ])); - } - /** - * Custom printer for `util.inspect` - */ - [inspect.custom](_, options) { - return `Jack ${inspect(this.toJSON(), options)}`; - } -} -// Unwrap and un-indent, so we can wrap description -// strings however makes them look nice in the code. -const normalize = (s, pre = false) => { - if (pre) - // prepend a ZWSP to each line so cliui doesn't strip it. - return s - .split('\n') - .map(l => `\u200b${l}`) - .join('\n'); - return s - .split(/^\s*```\s*$/gm) - .map((s, i) => { - if (i % 2 === 1) { - if (!s.trim()) { - return `\`\`\`\n\`\`\`\n`; - } - // outdent the ``` blocks, but preserve whitespace otherwise. - const split = s.split('\n'); - // throw out the \n at the start and end - split.pop(); - split.shift(); - const si = split.reduce((shortest, l) => { - /* c8 ignore next */ - const ind = l.match(/^\s*/)?.[0] ?? ''; - if (ind.length) - return Math.min(ind.length, shortest); - else - return shortest; - }, Infinity); - /* c8 ignore next */ - const i = isFinite(si) ? si : 0; - return ('\n```\n' + - split.map(s => `\u200b${s.substring(i)}`).join('\n') + - '\n```\n'); - } - return (s - // remove single line breaks, except for lists - .replace(/([^\n])\n[ \t]*([^\n])/g, (_, $1, $2) => !/^[-*]/.test($2) ? `${$1} ${$2}` : `${$1}\n${$2}`) - // normalize mid-line whitespace - .replace(/([^\n])[ \t]+([^\n])/g, '$1 $2') - // two line breaks are enough - .replace(/\n{3,}/g, '\n\n') - // remove any spaces at the start of a line - .replace(/\n[ \t]+/g, '\n') - .trim()); - }) - .join('\n'); -}; -// normalize for markdown printing, remove leading spaces on lines -const normalizeMarkdown = (s, pre = false) => { - const n = normalize(s, pre).replace(/\\/g, '\\\\'); - return pre ? - `\`\`\`\n${n.replace(/\u200b/g, '')}\n\`\`\`` - : n.replace(/\n +/g, '\n').trim(); -}; -const normalizeOneLine = (s, pre = false) => { - const n = normalize(s, pre) - .replace(/[\s\u200b]+/g, ' ') - .trim(); - return pre ? `\`${n}\`` : n; -}; -/** - * Main entry point. Create and return a {@link Jack} object. - */ -export const jack = (options = {}) => new Jack(options); -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/jackspeak/dist/esm/index.js.map b/node_modules/jackspeak/dist/esm/index.js.map deleted file mode 100644 index 1ca796a2..00000000 --- a/node_modules/jackspeak/dist/esm/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,OAAO,EAAmC,MAAM,WAAW,CAAA;AACpE,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAE3C,kDAAkD;AAClD,YAAY;AACZ,OAAO,KAAK,MAAM,eAAe,CAAA;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AAEpC,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CACpB,CAAC,OAAO,IAAI,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,EAC3D,EAAE,CACH,CAAA;AAED,wCAAwC;AACxC,MAAM,MAAM,GAAG,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAA;AAEzC,MAAM,QAAQ,GAAG,CAAC,IAAY,EAAE,GAAW,EAAU,EAAE;IACrD,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,OAAO,CAAC,gBAAgB,EAAE,GAAG,CAAC,CAAC;SAC9C,IAAI,CAAC,GAAG,CAAC;SACT,IAAI,EAAE;SACN,WAAW,EAAE;SACb,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;AACvB,CAAC,CAAA;AAED,MAAM,QAAQ,GAAG,CACf,KAAkE,EAClE,QAAgB,IAAI,EACZ,EAAE;IACV,MAAM,GAAG,GACP,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK;QACjC,CAAC,CAAC,OAAO,KAAK,KAAK,SAAS,CAAC,CAAC;YA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C,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,IAAI,EAAE,CAAA;AACrC,CAAC,CAAA;AAED,MAAM,gBAAgB,GAAG,CAAC,CAAS,EAAE,MAAe,KAAK,EAAE,EAAE;IAC3D,MAAM,CAAC,GAAG,SAAS,CAAC,CAAC,EAAE,GAAG,CAAC;SACxB,OAAO,CAAC,cAAc,EAAE,GAAG,CAAC;SAC5B,IAAI,EAAE,CAAA;IACT,OAAO,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAA;AAC7B,CAAC,CAAA;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,UAAuB,EAAE,EAAE,EAAE,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,CAAA","sourcesContent":["export type ConfigType = 'number' | 'string' | 'boolean'\n\n/**\n * Given a Jack object, get the typeof its ConfigSet\n */\nexport type Unwrap = J extends Jack ? C : never\n\nimport { inspect, InspectOptions, ParseArgsConfig } from 'node:util'\nimport { parseArgs } from './parse-args.js'\n\n// it's a tiny API, just cast it inline, it's fine\n//@ts-ignore\nimport cliui from '@isaacs/cliui'\nimport { basename } from 'node:path'\n\nconst width = Math.min(\n (process && process.stdout && process.stdout.columns) || 80,\n 80,\n)\n\n// indentation spaces from heading level\nconst indent = (n: number) => (n - 1) * 2\n\nconst toEnvKey = (pref: string, key: string): string => {\n return [pref, key.replace(/[^a-zA-Z0-9]+/g, ' ')]\n .join(' ')\n .trim()\n .toUpperCase()\n .replace(/ /g, '_')\n}\n\nconst toEnvVal = (\n value: string | boolean | number | string[] | boolean[] | number[],\n delim: string = '\\n',\n): string => {\n const str =\n typeof value === 'string' ? value\n : typeof value === 'boolean' ?\n value ? '1'\n : '0'\n : typeof value === 'number' ? String(value)\n : Array.isArray(value) ?\n value.map((v: string | number | boolean) => toEnvVal(v)).join(delim)\n : /* c8 ignore start */ undefined\n if (typeof str !== 'string') {\n throw new Error(\n `could not serialize value to environment: ${JSON.stringify(value)}`,\n )\n }\n /* c8 ignore stop */\n return str\n}\n\nconst fromEnvVal = (\n env: string,\n type: T,\n multiple: M,\n delim: string = '\\n',\n): ValidValue =>\n (multiple ?\n env ? env.split(delim).map(v => fromEnvVal(v, type, false))\n : []\n : type === 'string' ? env\n : type === 'boolean' ? env === '1'\n : +env.trim()) as ValidValue\n\n/**\n * Defines the type of value that is valid, given a config definition's\n * {@link ConfigType} and boolean multiple setting\n */\nexport type ValidValue<\n T extends ConfigType = ConfigType,\n M extends boolean = boolean,\n> =\n [T, M] extends ['number', true] ? number[]\n : [T, M] extends ['string', true] ? string[]\n : [T, M] extends ['boolean', true] ? boolean[]\n : [T, M] extends ['number', false] ? number\n : [T, M] extends ['string', false] ? string\n : [T, M] extends ['boolean', false] ? boolean\n : [T, M] extends ['string', boolean] ? string | string[]\n : [T, M] extends ['boolean', boolean] ? boolean | boolean[]\n : [T, M] extends ['number', boolean] ? number | number[]\n : [T, M] extends [ConfigType, false] ? string | number | boolean\n : [T, M] extends [ConfigType, true] ? string[] | number[] | boolean[]\n : string | number | boolean | string[] | number[] | boolean[]\n\n/**\n * The meta information for a config option definition, when the\n * type and multiple values can be inferred by the method being used\n */\nexport type ConfigOptionMeta<\n T extends ConfigType,\n M extends boolean = boolean,\n O extends\n | undefined\n | (T extends 'boolean' ? never\n : T extends 'string' ? readonly string[]\n : T extends 'number' ? readonly number[]\n : readonly number[] | readonly string[]) =\n | undefined\n | (T extends 'boolean' ? never\n : T extends 'string' ? readonly string[]\n : T extends 'number' ? readonly number[]\n : readonly number[] | readonly string[]),\n> = {\n default?:\n | undefined\n | (ValidValue &\n (O extends number[] | string[] ?\n M extends false ?\n O[number]\n : O[number][]\n : unknown))\n validOptions?: O\n description?: string\n validate?:\n | ((v: unknown) => v is ValidValue)\n | ((v: unknown) => boolean)\n short?: string | undefined\n type?: T\n hint?: T extends 'boolean' ? never : string\n delim?: M extends true ? string : never\n} & (M extends false ? { multiple?: false | undefined }\n: M extends true ? { multiple: true }\n: { multiple?: boolean })\n\n/**\n * A set of {@link ConfigOptionMeta} fields, referenced by their longOption\n * string values.\n */\nexport type ConfigMetaSet<\n T extends ConfigType,\n M extends boolean = boolean,\n> = {\n [longOption: string]: ConfigOptionMeta\n}\n\n/**\n * Infer {@link ConfigSet} fields from a given {@link ConfigMetaSet}\n */\nexport type ConfigSetFromMetaSet<\n T extends ConfigType,\n M extends boolean,\n S extends ConfigMetaSet,\n> = {\n [longOption in keyof S]: ConfigOptionBase\n}\n\n/**\n * Fields that can be set on a {@link ConfigOptionBase} or\n * {@link ConfigOptionMeta} based on whether or not the field is known to be\n * multiple.\n */\nexport type MultiType =\n M extends true ?\n {\n multiple: true\n delim?: string | undefined\n }\n : M extends false ?\n {\n multiple?: false | undefined\n delim?: undefined\n }\n : {\n multiple?: boolean | undefined\n delim?: string | undefined\n }\n\n/**\n * A config field definition, in its full representation.\n */\nexport type ConfigOptionBase<\n T extends ConfigType,\n M extends boolean = boolean,\n> = {\n type: T\n short?: string | undefined\n default?: ValidValue | undefined\n description?: string\n hint?: T extends 'boolean' ? undefined : string | undefined\n validate?: (v: unknown) => v is ValidValue\n validOptions?: T extends 'boolean' ? undefined\n : T extends 'string' ? readonly string[]\n : T extends 'number' ? readonly number[]\n : readonly number[] | readonly string[]\n} & MultiType\n\nexport const isConfigType = (t: string): t is ConfigType =>\n typeof t === 'string' &&\n (t === 'string' || t === 'number' || t === 'boolean')\n\nconst undefOrType = (v: unknown, t: string): boolean =>\n v === undefined || typeof v === t\nconst undefOrTypeArray = (v: unknown, t: string): boolean =>\n v === undefined || (Array.isArray(v) && v.every(x => typeof x === t))\n\nconst isValidOption = (v: unknown, vo: readonly unknown[]): boolean =>\n Array.isArray(v) ? v.every(x => isValidOption(x, vo)) : vo.includes(v)\n\n// print the value type, for error message reporting\nconst valueType = (\n v:\n | string\n | number\n | boolean\n | string[]\n | number[]\n | boolean[]\n | { type: ConfigType; multiple?: boolean },\n): string =>\n typeof v === 'string' ? 'string'\n : typeof v === 'boolean' ? 'boolean'\n : typeof v === 'number' ? 'number'\n : Array.isArray(v) ?\n joinTypes([...new Set(v.map(v => valueType(v)))]) + '[]'\n : `${v.type}${v.multiple ? '[]' : ''}`\n\nconst joinTypes = (types: string[]): string =>\n types.length === 1 && typeof types[0] === 'string' ?\n types[0]\n : `(${types.join('|')})`\n\nconst isValidValue = (\n v: unknown,\n type: T,\n multi: M,\n): v is ValidValue => {\n if (multi) {\n if (!Array.isArray(v)) return false\n return !v.some((v: unknown) => !isValidValue(v, type, false))\n }\n if (Array.isArray(v)) return false\n return typeof v === type\n}\n\nexport const isConfigOption = (\n o: any,\n type: T,\n multi: M,\n): o is ConfigOptionBase =>\n !!o &&\n typeof o === 'object' &&\n isConfigType(o.type) &&\n o.type === type &&\n undefOrType(o.short, 'string') &&\n undefOrType(o.description, 'string') &&\n undefOrType(o.hint, 'string') &&\n undefOrType(o.validate, 'function') &&\n (o.type === 'boolean' ?\n o.validOptions === undefined\n : undefOrTypeArray(o.validOptions, o.type)) &&\n (o.default === undefined || isValidValue(o.default, type, multi)) &&\n !!o.multiple === multi\n\n/**\n * A set of {@link ConfigOptionBase} objects, referenced by their longOption\n * string values.\n */\nexport type ConfigSet = {\n [longOption: string]: ConfigOptionBase\n}\n\n/**\n * The 'values' field returned by {@link Jack#parse}\n */\nexport type OptionsResults = {\n [k in keyof T]?: T[k]['validOptions'] extends (\n readonly string[] | readonly number[]\n ) ?\n T[k] extends ConfigOptionBase<'string' | 'number', false> ?\n T[k]['validOptions'][number]\n : T[k] extends ConfigOptionBase<'string' | 'number', true> ?\n T[k]['validOptions'][number][]\n : never\n : T[k] extends ConfigOptionBase<'string', false> ? string\n : T[k] extends ConfigOptionBase<'string', true> ? string[]\n : T[k] extends ConfigOptionBase<'number', false> ? number\n : T[k] extends ConfigOptionBase<'number', true> ? number[]\n : T[k] extends ConfigOptionBase<'boolean', false> ? boolean\n : T[k] extends ConfigOptionBase<'boolean', true> ? boolean[]\n : never\n}\n\n/**\n * The object retured by {@link Jack#parse}\n */\nexport type Parsed = {\n values: OptionsResults\n positionals: string[]\n}\n\nfunction num(\n o: ConfigOptionMeta<'number', false> = {},\n): ConfigOptionBase<'number', false> {\n const { default: def, validate: val, validOptions, ...rest } = o\n if (def !== undefined && !isValidValue(def, 'number', false)) {\n throw new TypeError('invalid default value', {\n cause: {\n found: def,\n wanted: 'number',\n },\n })\n }\n if (!undefOrTypeArray(validOptions, 'number')) {\n throw new TypeError('invalid validOptions', {\n cause: {\n found: validOptions,\n wanted: 'number[]',\n },\n })\n }\n const validate =\n val ?\n (val as (v: unknown) => v is ValidValue<'number', false>)\n : undefined\n return {\n ...rest,\n default: def,\n validate,\n validOptions,\n type: 'number',\n multiple: false,\n }\n}\n\nfunction numList(\n o: ConfigOptionMeta<'number'> = {},\n): ConfigOptionBase<'number', true> {\n const { default: def, validate: val, validOptions, ...rest } = o\n if (def !== undefined && !isValidValue(def, 'number', true)) {\n throw new TypeError('invalid default value', {\n cause: {\n found: def,\n wanted: 'number[]',\n },\n })\n }\n if (!undefOrTypeArray(validOptions, 'number')) {\n throw new TypeError('invalid validOptions', {\n cause: {\n found: validOptions,\n wanted: 'number[]',\n },\n })\n }\n const validate =\n val ?\n (val as (v: unknown) => v is ValidValue<'number', true>)\n : undefined\n return {\n ...rest,\n default: def,\n validate,\n validOptions,\n type: 'number',\n multiple: true,\n }\n}\n\nfunction opt(\n o: ConfigOptionMeta<'string', false> = {},\n): ConfigOptionBase<'string', false> {\n const { default: def, validate: val, validOptions, ...rest } = o\n if (def !== undefined && !isValidValue(def, 'string', false)) {\n throw new TypeError('invalid default value', {\n cause: {\n found: def,\n wanted: 'string',\n },\n })\n }\n if (!undefOrTypeArray(validOptions, 'string')) {\n throw new TypeError('invalid validOptions', {\n cause: {\n found: validOptions,\n wanted: 'string[]',\n },\n })\n }\n const validate =\n val ?\n (val as (v: unknown) => v is ValidValue<'string', false>)\n : undefined\n return {\n ...rest,\n default: def,\n validate,\n validOptions,\n type: 'string',\n multiple: false,\n }\n}\n\nfunction optList(\n o: ConfigOptionMeta<'string'> = {},\n): ConfigOptionBase<'string', true> {\n const { default: def, validate: val, validOptions, ...rest } = o\n if (def !== undefined && !isValidValue(def, 'string', true)) {\n throw new TypeError('invalid default value', {\n cause: {\n found: def,\n wanted: 'string[]',\n },\n })\n }\n if (!undefOrTypeArray(validOptions, 'string')) {\n throw new TypeError('invalid validOptions', {\n cause: {\n found: validOptions,\n wanted: 'string[]',\n },\n })\n }\n const validate =\n val ?\n (val as (v: unknown) => v is ValidValue<'string', true>)\n : undefined\n return {\n ...rest,\n default: def,\n validate,\n validOptions,\n type: 'string',\n multiple: true,\n }\n}\n\nfunction flag(\n o: ConfigOptionMeta<'boolean', false> = {},\n): ConfigOptionBase<'boolean', false> {\n const {\n hint,\n default: def,\n validate: val,\n ...rest\n } = o as ConfigOptionMeta<'boolean', false>\n delete (rest as ConfigOptionMeta<'string', false>).validOptions\n if (def !== undefined && !isValidValue(def, 'boolean', false)) {\n throw new TypeError('invalid default value')\n }\n const validate =\n val ?\n (val as (v: unknown) => v is ValidValue<'boolean', false>)\n : undefined\n if (hint !== undefined) {\n throw new TypeError('cannot provide hint for flag')\n }\n return {\n ...rest,\n default: def,\n validate,\n type: 'boolean',\n multiple: false,\n }\n}\n\nfunction flagList(\n o: ConfigOptionMeta<'boolean'> = {},\n): ConfigOptionBase<'boolean', true> {\n const {\n hint,\n default: def,\n validate: val,\n ...rest\n } = o as ConfigOptionMeta<'boolean', false>\n delete (rest as ConfigOptionMeta<'string', false>).validOptions\n if (def !== undefined && !isValidValue(def, 'boolean', true)) {\n throw new TypeError('invalid default value')\n }\n const validate =\n val ?\n (val as (v: unknown) => v is ValidValue<'boolean', true>)\n : undefined\n if (hint !== undefined) {\n throw new TypeError('cannot provide hint for flag list')\n }\n return {\n ...rest,\n default: def,\n validate,\n type: 'boolean',\n multiple: true,\n }\n}\nconst toParseArgsOptionsConfig = (\n options: ConfigSet,\n): Exclude => {\n const c: Exclude = {}\n for (const longOption in options) {\n const config = options[longOption]\n /* c8 ignore start */\n if (!config) {\n throw new Error('config must be an object: ' + longOption)\n }\n /* c8 ignore start */\n if (isConfigOption(config, 'number', true)) {\n c[longOption] = {\n type: 'string',\n multiple: true,\n default: config.default?.map(c => String(c)),\n }\n } else if (isConfigOption(config, 'number', false)) {\n c[longOption] = {\n type: 'string',\n multiple: false,\n default:\n config.default === undefined ?\n undefined\n : String(config.default),\n }\n } else {\n const conf = config as\n | ConfigOptionBase<'string'>\n | ConfigOptionBase<'boolean'>\n c[longOption] = {\n type: conf.type,\n multiple: !!conf.multiple,\n default: conf.default,\n }\n }\n const clo = c[longOption] as ConfigOptionBase\n if (typeof config.short === 'string') {\n clo.short = config.short\n }\n\n if (\n config.type === 'boolean' &&\n !longOption.startsWith('no-') &&\n !options[`no-${longOption}`]\n ) {\n c[`no-${longOption}`] = {\n type: 'boolean',\n multiple: config.multiple,\n }\n }\n }\n return c\n}\n\n/**\n * A row used when generating the {@link Jack#usage} string\n */\nexport interface Row {\n left?: string\n text: string\n skipLine?: boolean\n type?: string\n}\n\n/**\n * A heading for a section in the usage, created by the jack.heading()\n * method.\n *\n * First heading is always level 1, subsequent headings default to 2.\n *\n * The level of the nearest heading level sets the indentation of the\n * description that follows.\n */\nexport interface Heading extends Row {\n type: 'heading'\n text: string\n left?: ''\n skipLine?: boolean\n level: number\n pre?: boolean\n}\nconst isHeading = (r: { type?: string }): r is Heading =>\n r.type === 'heading'\n\n/**\n * An arbitrary blob of text describing some stuff, set by the\n * jack.description() method.\n *\n * Indentation determined by level of the nearest header.\n */\nexport interface Description extends Row {\n type: 'description'\n text: string\n left?: ''\n skipLine?: boolean\n pre?: boolean\n}\n\nconst isDescription = (r: { type?: string }): r is Description =>\n r.type === 'description'\n\n/**\n * A heading or description row used when generating the {@link Jack#usage}\n * string\n */\nexport type TextRow = Heading | Description\n\n/**\n * Either a {@link TextRow} or a reference to a {@link ConfigOptionBase}\n */\nexport type UsageField =\n | TextRow\n | {\n type: 'config'\n name: string\n value: ConfigOptionBase\n }\n\n/**\n * Options provided to the {@link Jack} constructor\n */\nexport interface JackOptions {\n /**\n * Whether to allow positional arguments\n *\n * @default true\n */\n allowPositionals?: boolean\n\n /**\n * Prefix to use when reading/writing the environment variables\n *\n * If not specified, environment behavior will not be available.\n */\n envPrefix?: string\n\n /**\n * Environment object to read/write. Defaults `process.env`.\n * No effect if `envPrefix` is not set.\n */\n env?: { [k: string]: string | undefined }\n\n /**\n * A short usage string. If not provided, will be generated from the\n * options provided, but that can of course be rather verbose if\n * there are a lot of options.\n */\n usage?: string\n\n /**\n * Stop parsing flags and opts at the first positional argument.\n * This is to support cases like `cmd [flags] [options]`, where\n * each subcommand may have different options. This effectively treats\n * any positional as a `--` argument. Only relevant if `allowPositionals`\n * is true.\n *\n * To do subcommands, set this option, look at the first positional, and\n * parse the remaining positionals as appropriate.\n *\n * @default false\n */\n stopAtPositional?: boolean\n\n /**\n * Conditional `stopAtPositional`. If set to a `(string)=>boolean` function,\n * will be called with each positional argument encountered. If the function\n * returns true, then parsing will stop at that point.\n */\n stopAtPositionalTest?: (arg: string) => boolean\n}\n\n/**\n * Class returned by the {@link jack} function and all configuration\n * definition methods. This is what gets chained together.\n */\nexport class Jack {\n #configSet: C\n #shorts: { [k: string]: string }\n #options: JackOptions\n #fields: UsageField[] = []\n #env: { [k: string]: string | undefined }\n #envPrefix?: string\n #allowPositionals: boolean\n #usage?: string\n #usageMarkdown?: string\n\n constructor(options: JackOptions = {}) {\n this.#options = options\n this.#allowPositionals = options.allowPositionals !== false\n this.#env =\n this.#options.env === undefined ? process.env : this.#options.env\n this.#envPrefix = options.envPrefix\n // We need to fib a little, because it's always the same object, but it\n // starts out as having an empty config set. Then each method that adds\n // fields returns `this as Jack`\n this.#configSet = Object.create(null) as C\n this.#shorts = Object.create(null)\n }\n\n /**\n * Set the default value (which will still be overridden by env or cli)\n * as if from a parsed config file. The optional `source` param, if\n * provided, will be included in error messages if a value is invalid or\n * unknown.\n */\n setConfigValues(values: OptionsResults, source = '') {\n try {\n this.validate(values)\n } catch (er) {\n const e = er as Error\n if (source && e && typeof e === 'object') {\n if (e.cause && typeof e.cause === 'object') {\n Object.assign(e.cause, { path: source })\n } else {\n e.cause = { path: source }\n }\n }\n throw e\n }\n for (const [field, value] of Object.entries(values)) {\n const my = this.#configSet[field]\n // already validated, just for TS's benefit\n /* c8 ignore start */\n if (!my) {\n throw new Error('unexpected field in config set: ' + field, {\n cause: { found: field },\n })\n }\n /* c8 ignore stop */\n my.default = value\n }\n return this\n }\n\n /**\n * Parse a string of arguments, and return the resulting\n * `{ values, positionals }` object.\n *\n * If an {@link JackOptions#envPrefix} is set, then it will read default\n * values from the environment, and write the resulting values back\n * to the environment as well.\n *\n * Environment values always take precedence over any other value, except\n * an explicit CLI setting.\n */\n parse(args: string[] = process.argv): Parsed {\n this.loadEnvDefaults()\n const p = this.parseRaw(args)\n this.applyDefaults(p)\n this.writeEnv(p)\n return p\n }\n\n loadEnvDefaults() {\n if (this.#envPrefix) {\n for (const [field, my] of Object.entries(this.#configSet)) {\n const ek = toEnvKey(this.#envPrefix, field)\n const env = this.#env[ek]\n if (env !== undefined) {\n my.default = fromEnvVal(env, my.type, !!my.multiple, my.delim)\n }\n }\n }\n }\n\n applyDefaults(p: Parsed) {\n for (const [field, c] of Object.entries(this.#configSet)) {\n if (c.default !== undefined && !(field in p.values)) {\n //@ts-ignore\n p.values[field] = c.default\n }\n }\n }\n\n /**\n * Only parse the command line arguments passed in.\n * Does not strip off the `node script.js` bits, so it must be just the\n * arguments you wish to have parsed.\n * Does not read from or write to the environment, or set defaults.\n */\n parseRaw(args: string[]): Parsed {\n if (args === process.argv) {\n args = args.slice(\n (process as { _eval?: string })._eval !== undefined ? 1 : 2,\n )\n }\n\n const options = toParseArgsOptionsConfig(this.#configSet)\n const result = parseArgs({\n args,\n options,\n // always strict, but using our own logic\n strict: false,\n allowPositionals: this.#allowPositionals,\n tokens: true,\n })\n\n const p: Parsed = {\n values: {},\n positionals: [],\n }\n for (const token of result.tokens) {\n if (token.kind === 'positional') {\n p.positionals.push(token.value)\n if (\n this.#options.stopAtPositional ||\n this.#options.stopAtPositionalTest?.(token.value)\n ) {\n p.positionals.push(...args.slice(token.index + 1))\n break\n }\n } else if (token.kind === 'option') {\n let value: string | number | boolean | undefined = undefined\n if (token.name.startsWith('no-')) {\n const my = this.#configSet[token.name]\n const pname = token.name.substring('no-'.length)\n const pos = this.#configSet[pname]\n if (\n pos &&\n pos.type === 'boolean' &&\n (!my ||\n (my.type === 'boolean' && !!my.multiple === !!pos.multiple))\n ) {\n value = false\n token.name = pname\n }\n }\n const my = this.#configSet[token.name]\n if (!my) {\n throw new Error(\n `Unknown option '${token.rawName}'. ` +\n `To specify a positional argument starting with a '-', ` +\n `place it at the end of the command after '--', as in ` +\n `'-- ${token.rawName}'`,\n {\n cause: {\n found:\n token.rawName + (token.value ? `=${token.value}` : ''),\n },\n },\n )\n }\n if (value === undefined) {\n if (token.value === undefined) {\n if (my.type !== 'boolean') {\n throw new Error(\n `No value provided for ${token.rawName}, expected ${my.type}`,\n {\n cause: {\n name: token.rawName,\n wanted: valueType(my),\n },\n },\n )\n }\n value = true\n } else {\n if (my.type === 'boolean') {\n throw new Error(\n `Flag ${token.rawName} does not take a value, received '${token.value}'`,\n { cause: { found: token } },\n )\n }\n if (my.type === 'string') {\n value = token.value\n } else {\n value = +token.value\n if (value !== value) {\n throw new Error(\n `Invalid value '${token.value}' provided for ` +\n `'${token.rawName}' option, expected number`,\n {\n cause: {\n name: token.rawName,\n found: token.value,\n wanted: 'number',\n },\n },\n )\n }\n }\n }\n }\n if (my.multiple) {\n const pv = p.values as {\n [k: string]: (string | number | boolean)[]\n }\n const tn = pv[token.name] ?? []\n pv[token.name] = tn\n tn.push(value)\n } else {\n const pv = p.values as { [k: string]: string | number | boolean }\n pv[token.name] = value\n }\n }\n }\n\n for (const [field, value] of Object.entries(p.values)) {\n const valid = this.#configSet[field]?.validate\n const validOptions = this.#configSet[field]?.validOptions\n let cause:\n | undefined\n | {\n name: string\n found: unknown\n validOptions?: readonly string[] | readonly number[]\n }\n if (validOptions && !isValidOption(value, validOptions)) {\n cause = { name: field, found: value, validOptions: validOptions }\n }\n if (valid && !valid(value)) {\n cause = cause || { name: field, found: value }\n }\n if (cause) {\n throw new Error(\n `Invalid value provided for --${field}: ${JSON.stringify(\n value,\n )}`,\n { cause },\n )\n }\n }\n\n return p\n }\n\n /**\n * do not set fields as 'no-foo' if 'foo' exists and both are bools\n * just set foo.\n */\n #noNoFields(f: string, val: unknown, s: string = f) {\n if (!f.startsWith('no-') || typeof val !== 'boolean') return\n const yes = f.substring('no-'.length)\n // recurse so we get the core config key we care about.\n this.#noNoFields(yes, val, s)\n if (this.#configSet[yes]?.type === 'boolean') {\n throw new Error(\n `do not set '${s}', instead set '${yes}' as desired.`,\n { cause: { found: s, wanted: yes } },\n )\n }\n }\n\n /**\n * Validate that any arbitrary object is a valid configuration `values`\n * object. Useful when loading config files or other sources.\n */\n validate(o: unknown): asserts o is Parsed['values'] {\n if (!o || typeof o !== 'object') {\n throw new Error('Invalid config: not an object', {\n cause: { found: o },\n })\n }\n const opts = o as Record\n for (const field in o) {\n const value = opts[field]\n /* c8 ignore next - for TS */\n if (value === undefined) continue\n this.#noNoFields(field, value)\n const config = this.#configSet[field]\n if (!config) {\n throw new Error(`Unknown config option: ${field}`, {\n cause: { found: field },\n })\n }\n if (!isValidValue(value, config.type, !!config.multiple)) {\n throw new Error(\n `Invalid value ${valueType(\n value,\n )} for ${field}, expected ${valueType(config)}`,\n {\n cause: {\n name: field,\n found: value,\n wanted: valueType(config),\n },\n },\n )\n }\n let cause:\n | undefined\n | {\n name: string\n found: any\n validOptions?: readonly string[] | readonly number[]\n }\n if (\n config.validOptions &&\n !isValidOption(value, config.validOptions)\n ) {\n cause = {\n name: field,\n found: value,\n validOptions: config.validOptions,\n }\n }\n if (config.validate && !config.validate(value)) {\n cause = cause || { name: field, found: value }\n }\n if (cause) {\n throw new Error(`Invalid config value for ${field}: ${value}`, {\n cause,\n })\n }\n }\n }\n\n writeEnv(p: Parsed) {\n if (!this.#env || !this.#envPrefix) return\n for (const [field, value] of Object.entries(p.values)) {\n const my = this.#configSet[field]\n this.#env[toEnvKey(this.#envPrefix, field)] = toEnvVal(\n value,\n my?.delim,\n )\n }\n }\n\n /**\n * Add a heading to the usage output banner\n */\n heading(\n text: string,\n level?: 1 | 2 | 3 | 4 | 5 | 6,\n { pre = false }: { pre?: boolean } = {},\n ): Jack {\n if (level === undefined) {\n level = this.#fields.some(r => isHeading(r)) ? 2 : 1\n }\n this.#fields.push({ type: 'heading', text, level, pre })\n return this\n }\n\n /**\n * Add a long-form description to the usage output at this position.\n */\n description(text: string, { pre }: { pre?: boolean } = {}): Jack {\n this.#fields.push({ type: 'description', text, pre })\n return this\n }\n\n /**\n * Add one or more number fields.\n */\n num>(\n fields: F,\n ): Jack> {\n return this.#addFields(fields, num)\n }\n\n /**\n * Add one or more multiple number fields.\n */\n numList>(\n fields: F,\n ): Jack> {\n return this.#addFields(fields, numList)\n }\n\n /**\n * Add one or more string option fields.\n */\n opt>(\n fields: F,\n ): Jack> {\n return this.#addFields(fields, opt)\n }\n\n /**\n * Add one or more multiple string option fields.\n */\n optList>(\n fields: F,\n ): Jack> {\n return this.#addFields(fields, optList)\n }\n\n /**\n * Add one or more flag fields.\n */\n flag>(\n fields: F,\n ): Jack> {\n return this.#addFields(fields, flag)\n }\n\n /**\n * Add one or more multiple flag fields.\n */\n flagList>(\n fields: F,\n ): Jack> {\n return this.#addFields(fields, flagList)\n }\n\n /**\n * Generic field definition method. Similar to flag/flagList/number/etc,\n * but you must specify the `type` (and optionally `multiple` and `delim`)\n * fields on each one, or Jack won't know how to define them.\n */\n addFields(fields: F): Jack {\n const next = this as unknown as Jack\n for (const [name, field] of Object.entries(fields)) {\n this.#validateName(name, field)\n next.#fields.push({\n type: 'config',\n name,\n value: field as ConfigOptionBase,\n })\n }\n Object.assign(next.#configSet, fields)\n return next\n }\n\n #addFields<\n T extends ConfigType,\n M extends boolean,\n F extends ConfigMetaSet,\n >(\n fields: F,\n fn: (m: ConfigOptionMeta) => ConfigOptionBase,\n ): Jack> {\n type NextC = C & ConfigSetFromMetaSet\n const next = this as unknown as Jack\n Object.assign(\n next.#configSet,\n Object.fromEntries(\n Object.entries(fields).map(([name, field]) => {\n this.#validateName(name, field)\n const option = fn(field)\n next.#fields.push({\n type: 'config',\n name,\n value: option as ConfigOptionBase,\n })\n return [name, option]\n }),\n ),\n )\n return next\n }\n\n #validateName(name: string, field: { short?: string }) {\n if (!/^[a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?$/.test(name)) {\n throw new TypeError(\n `Invalid option name: ${name}, ` +\n `must be '-' delimited ASCII alphanumeric`,\n )\n }\n if (this.#configSet[name]) {\n throw new TypeError(`Cannot redefine option ${field}`)\n }\n if (this.#shorts[name]) {\n throw new TypeError(\n `Cannot redefine option ${name}, already ` +\n `in use for ${this.#shorts[name]}`,\n )\n }\n if (field.short) {\n if (!/^[a-zA-Z0-9]$/.test(field.short)) {\n throw new TypeError(\n `Invalid ${name} short option: ${field.short}, ` +\n 'must be 1 ASCII alphanumeric character',\n )\n }\n if (this.#shorts[field.short]) {\n throw new TypeError(\n `Invalid ${name} short option: ${field.short}, ` +\n `already in use for ${this.#shorts[field.short]}`,\n )\n }\n this.#shorts[field.short] = name\n this.#shorts[name] = name\n }\n }\n\n /**\n * Return the usage banner for the given configuration\n */\n usage(): string {\n if (this.#usage) return this.#usage\n\n let headingLevel = 1\n const ui = cliui({ width })\n const first = this.#fields[0]\n let start = first?.type === 'heading' ? 1 : 0\n if (first?.type === 'heading') {\n ui.div({\n padding: [0, 0, 0, 0],\n text: normalize(first.text),\n })\n }\n ui.div({ padding: [0, 0, 0, 0], text: 'Usage:' })\n if (this.#options.usage) {\n ui.div({\n text: this.#options.usage,\n padding: [0, 0, 0, 2],\n })\n } else {\n const cmd = basename(String(process.argv[1]))\n const shortFlags: string[] = []\n const shorts: string[][] = []\n const flags: string[] = []\n const opts: string[][] = []\n for (const [field, config] of Object.entries(this.#configSet)) {\n if (config.short) {\n if (config.type === 'boolean') shortFlags.push(config.short)\n else shorts.push([config.short, config.hint || field])\n } else {\n if (config.type === 'boolean') flags.push(field)\n else opts.push([field, config.hint || field])\n }\n }\n const sf = shortFlags.length ? ' -' + shortFlags.join('') : ''\n const so = shorts.map(([k, v]) => ` --${k}=<${v}>`).join('')\n const lf = flags.map(k => ` --${k}`).join('')\n const lo = opts.map(([k, v]) => ` --${k}=<${v}>`).join('')\n const usage = `${cmd}${sf}${so}${lf}${lo}`.trim()\n ui.div({\n text: usage,\n padding: [0, 0, 0, 2],\n })\n }\n\n ui.div({ padding: [0, 0, 0, 0], text: '' })\n const maybeDesc = this.#fields[start]\n if (maybeDesc && isDescription(maybeDesc)) {\n const print = normalize(maybeDesc.text, maybeDesc.pre)\n start++\n ui.div({ padding: [0, 0, 0, 0], text: print })\n ui.div({ padding: [0, 0, 0, 0], text: '' })\n }\n\n const { rows, maxWidth } = this.#usageRows(start)\n\n // every heading/description after the first gets indented by 2\n // extra spaces.\n for (const row of rows) {\n if (row.left) {\n // If the row is too long, don't wrap it\n // Bump the right-hand side down a line to make room\n const configIndent = indent(Math.max(headingLevel, 2))\n if (row.left.length > maxWidth - 3) {\n ui.div({ text: row.left, padding: [0, 0, 0, configIndent] })\n ui.div({ text: row.text, padding: [0, 0, 0, maxWidth] })\n } else {\n ui.div(\n {\n text: row.left,\n padding: [0, 1, 0, configIndent],\n width: maxWidth,\n },\n { padding: [0, 0, 0, 0], text: row.text },\n )\n }\n if (row.skipLine) {\n ui.div({ padding: [0, 0, 0, 0], text: '' })\n }\n } else {\n if (isHeading(row)) {\n const { level } = row\n headingLevel = level\n // only h1 and h2 have bottom padding\n // h3-h6 do not\n const b = level <= 2 ? 1 : 0\n ui.div({ ...row, padding: [0, 0, b, indent(level)] })\n } else {\n ui.div({ ...row, padding: [0, 0, 1, indent(headingLevel + 1)] })\n }\n }\n }\n\n return (this.#usage = ui.toString())\n }\n\n /**\n * Return the usage banner markdown for the given configuration\n */\n usageMarkdown(): string {\n if (this.#usageMarkdown) return this.#usageMarkdown\n\n const out: string[] = []\n\n let headingLevel = 1\n const first = this.#fields[0]\n let start = first?.type === 'heading' ? 1 : 0\n if (first?.type === 'heading') {\n out.push(`# ${normalizeOneLine(first.text)}`)\n }\n out.push('Usage:')\n if (this.#options.usage) {\n out.push(normalizeMarkdown(this.#options.usage, true))\n } else {\n const cmd = basename(String(process.argv[1]))\n const shortFlags: string[] = []\n const shorts: string[][] = []\n const flags: string[] = []\n const opts: string[][] = []\n for (const [field, config] of Object.entries(this.#configSet)) {\n if (config.short) {\n if (config.type === 'boolean') shortFlags.push(config.short)\n else shorts.push([config.short, config.hint || field])\n } else {\n if (config.type === 'boolean') flags.push(field)\n else opts.push([field, config.hint || field])\n }\n }\n const sf = shortFlags.length ? ' -' + shortFlags.join('') : ''\n const so = shorts.map(([k, v]) => ` --${k}=<${v}>`).join('')\n const lf = flags.map(k => ` --${k}`).join('')\n const lo = opts.map(([k, v]) => ` --${k}=<${v}>`).join('')\n const usage = `${cmd}${sf}${so}${lf}${lo}`.trim()\n out.push(normalizeMarkdown(usage, true))\n }\n\n const maybeDesc = this.#fields[start]\n if (maybeDesc && isDescription(maybeDesc)) {\n out.push(normalizeMarkdown(maybeDesc.text, maybeDesc.pre))\n start++\n }\n\n const { rows } = this.#usageRows(start)\n\n // heading level in markdown is number of # ahead of text\n for (const row of rows) {\n if (row.left) {\n out.push(\n '#'.repeat(headingLevel + 1) +\n ' ' +\n normalizeOneLine(row.left, true),\n )\n if (row.text) out.push(normalizeMarkdown(row.text))\n } else if (isHeading(row)) {\n const { level } = row\n headingLevel = level\n out.push(\n `${'#'.repeat(headingLevel)} ${normalizeOneLine(\n row.text,\n row.pre,\n )}`,\n )\n } else {\n out.push(normalizeMarkdown(row.text, !!(row as Description).pre))\n }\n }\n\n return (this.#usageMarkdown = out.join('\\n\\n') + '\\n')\n }\n\n #usageRows(start: number) {\n // turn each config type into a row, and figure out the width of the\n // left hand indentation for the option descriptions.\n let maxMax = Math.max(12, Math.min(26, Math.floor(width / 3)))\n let maxWidth = 8\n let prev: Row | TextRow | undefined = undefined\n const rows: (Row | TextRow)[] = []\n for (const field of this.#fields.slice(start)) {\n if (field.type !== 'config') {\n if (prev?.type === 'config') prev.skipLine = true\n prev = undefined\n field.text = normalize(field.text, !!field.pre)\n rows.push(field)\n continue\n }\n const { value } = field\n const desc = value.description || ''\n const mult = value.multiple ? 'Can be set multiple times' : ''\n const opts =\n value.validOptions?.length ?\n `Valid options:${value.validOptions.map(\n v => ` ${JSON.stringify(v)}`,\n )}`\n : ''\n const dmDelim = desc.includes('\\n') ? '\\n\\n' : '\\n'\n const extra = [opts, mult].join(dmDelim).trim()\n const text = (normalize(desc) + dmDelim + extra).trim()\n const hint =\n value.hint ||\n (value.type === 'number' ? 'n'\n : value.type === 'string' ? field.name\n : undefined)\n const short =\n !value.short ? ''\n : value.type === 'boolean' ? `-${value.short} `\n : `-${value.short}<${hint}> `\n const left =\n value.type === 'boolean' ?\n `${short}--${field.name}`\n : `${short}--${field.name}=<${hint}>`\n const row: Row = { text, left, type: 'config' }\n if (text.length > width - maxMax) {\n row.skipLine = true\n }\n if (prev && left.length > maxMax) prev.skipLine = true\n prev = row\n const len = left.length + 4\n if (len > maxWidth && len < maxMax) {\n maxWidth = len\n }\n\n rows.push(row)\n }\n\n return { rows, maxWidth }\n }\n\n /**\n * Return the configuration options as a plain object\n */\n toJSON() {\n return Object.fromEntries(\n Object.entries(this.#configSet).map(([field, def]) => [\n field,\n {\n type: def.type,\n ...(def.multiple ? { multiple: true } : {}),\n ...(def.delim ? { delim: def.delim } : {}),\n ...(def.short ? { short: def.short } : {}),\n ...(def.description ?\n { description: normalize(def.description) }\n : {}),\n ...(def.validate ? { validate: def.validate } : {}),\n ...(def.validOptions ? { validOptions: def.validOptions } : {}),\n ...(def.default !== undefined ? { default: def.default } : {}),\n ...(def.hint ? { hint: def.hint } : {}),\n },\n ]),\n )\n }\n\n /**\n * Custom printer for `util.inspect`\n */\n [inspect.custom](_: number, options: InspectOptions) {\n return `Jack ${inspect(this.toJSON(), options)}`\n }\n}\n\n// Unwrap and un-indent, so we can wrap description\n// strings however makes them look nice in the code.\nconst normalize = (s: string, pre = false) => {\n if (pre)\n // prepend a ZWSP to each line so cliui doesn't strip it.\n return s\n .split('\\n')\n .map(l => `\\u200b${l}`)\n .join('\\n')\n return s\n .split(/^\\s*```\\s*$/gm)\n .map((s, i) => {\n if (i % 2 === 1) {\n if (!s.trim()) {\n return `\\`\\`\\`\\n\\`\\`\\`\\n`\n }\n // outdent the ``` blocks, but preserve whitespace otherwise.\n const split = s.split('\\n')\n // throw out the \\n at the start and end\n split.pop()\n split.shift()\n const si = split.reduce((shortest, l) => {\n /* c8 ignore next */\n const ind = l.match(/^\\s*/)?.[0] ?? ''\n if (ind.length) return Math.min(ind.length, shortest)\n else return shortest\n }, Infinity)\n /* c8 ignore next */\n const i = isFinite(si) ? si : 0\n return (\n '\\n```\\n' +\n split.map(s => `\\u200b${s.substring(i)}`).join('\\n') +\n '\\n```\\n'\n )\n }\n return (\n s\n // remove single line breaks, except for lists\n .replace(/([^\\n])\\n[ \\t]*([^\\n])/g, (_, $1, $2) =>\n !/^[-*]/.test($2) ? `${$1} ${$2}` : `${$1}\\n${$2}`,\n )\n // normalize mid-line whitespace\n .replace(/([^\\n])[ \\t]+([^\\n])/g, '$1 $2')\n // two line breaks are enough\n .replace(/\\n{3,}/g, '\\n\\n')\n // remove any spaces at the start of a line\n .replace(/\\n[ \\t]+/g, '\\n')\n .trim()\n )\n })\n .join('\\n')\n}\n\n// normalize for markdown printing, remove leading spaces on lines\nconst normalizeMarkdown = (s: string, pre: boolean = false): string => {\n const n = normalize(s, pre).replace(/\\\\/g, '\\\\\\\\')\n return pre ?\n `\\`\\`\\`\\n${n.replace(/\\u200b/g, '')}\\n\\`\\`\\``\n : n.replace(/\\n +/g, '\\n').trim()\n}\n\nconst normalizeOneLine = (s: string, pre: boolean = false) => {\n const n = normalize(s, pre)\n .replace(/[\\s\\u200b]+/g, ' ')\n .trim()\n return pre ? `\\`${n}\\`` : n\n}\n\n/**\n * Main entry point. Create and return a {@link Jack} object.\n */\nexport const jack = (options: JackOptions = {}) => new Jack(options)\n"]} \ No newline at end of file diff --git a/node_modules/jackspeak/dist/esm/package.json b/node_modules/jackspeak/dist/esm/package.json deleted file mode 100644 index 3dbc1ca5..00000000 --- a/node_modules/jackspeak/dist/esm/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "type": "module" -} diff --git a/node_modules/jackspeak/dist/esm/parse-args.d.ts b/node_modules/jackspeak/dist/esm/parse-args.d.ts deleted file mode 100644 index 498d114c..00000000 --- a/node_modules/jackspeak/dist/esm/parse-args.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -/// -import * as util from 'util'; -export declare const parseArgs: typeof util.parseArgs; -//# sourceMappingURL=parse-args.d.ts.map \ No newline at end of file diff --git a/node_modules/jackspeak/dist/esm/parse-args.d.ts.map b/node_modules/jackspeak/dist/esm/parse-args.d.ts.map deleted file mode 100644 index d56cb699..00000000 --- a/node_modules/jackspeak/dist/esm/parse-args.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"parse-args.d.ts","sourceRoot":"","sources":["../../src/parse-args.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,IAAI,MAAM,MAAM,CAAA;AAoC5B,eAAO,MAAM,SAAS,uBAA6C,CAAA"} \ No newline at end of file diff --git a/node_modules/jackspeak/dist/esm/parse-args.js b/node_modules/jackspeak/dist/esm/parse-args.js deleted file mode 100644 index a4be7153..00000000 --- a/node_modules/jackspeak/dist/esm/parse-args.js +++ /dev/null @@ -1,26 +0,0 @@ -import * as util from 'util'; -const pv = (typeof process === 'object' && - !!process && - typeof process.version === 'string') ? - process.version - : 'v0.0.0'; -const pvs = pv - .replace(/^v/, '') - .split('.') - .map(s => parseInt(s, 10)); -/* c8 ignore start */ -const [major = 0, minor = 0] = pvs; -/* c8 ignore stop */ -let { parseArgs: pa, } = util; -/* c8 ignore start - version specific */ -if (!pa || - major < 16 || - (major === 18 && minor < 11) || - (major === 16 && minor < 19)) { - // Ignore because we will clobber it for commonjs - //@ts-ignore - pa = (await import('@pkgjs/parseargs')).parseArgs; -} -/* c8 ignore stop */ -export const parseArgs = pa; -//# sourceMappingURL=parse-args.js.map \ No newline at end of file diff --git a/node_modules/jackspeak/dist/esm/parse-args.js.map b/node_modules/jackspeak/dist/esm/parse-args.js.map deleted file mode 100644 index 48017f0c..00000000 --- a/node_modules/jackspeak/dist/esm/parse-args.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"parse-args.js","sourceRoot":"","sources":["../../src/parse-args.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,MAAM,CAAA;AAE5B,MAAM,EAAE,GACN,CACE,OAAO,OAAO,KAAK,QAAQ;IAC3B,CAAC,CAAC,OAAO;IACT,OAAO,OAAO,CAAC,OAAO,KAAK,QAAQ,CACpC,CAAC,CAAC;IACD,OAAO,CAAC,OAAO;IACjB,CAAC,CAAC,QAAQ,CAAA;AACZ,MAAM,GAAG,GAAG,EAAE;KACX,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC;KACjB,KAAK,CAAC,GAAG,CAAC;KACV,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAA;AAE5B,qBAAqB;AACrB,MAAM,CAAC,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,CAAC,CAAC,GAAG,GAAG,CAAA;AAClC,oBAAoB;AAEpB,IAAI,EACF,SAAS,EAAE,EAAE,GACd,GAA8D,IAAI,CAAA;AAEnE,wCAAwC;AACxC,IACE,CAAC,EAAE;IACH,KAAK,GAAG,EAAE;IACV,CAAC,KAAK,KAAK,EAAE,IAAI,KAAK,GAAG,EAAE,CAAC;IAC5B,CAAC,KAAK,KAAK,EAAE,IAAI,KAAK,GAAG,EAAE,CAAC,EAC5B,CAAC;IACD,iDAAiD;IACjD,YAAY;IACZ,EAAE,GAAG,CAAC,MAAM,MAAM,CAAC,kBAAkB,CAAC,CAAC,CAAC,SAAS,CAAA;AACnD,CAAC;AACD,oBAAoB;AAEpB,MAAM,CAAC,MAAM,SAAS,GAAG,EAA0C,CAAA","sourcesContent":["import * as util from 'util'\n\nconst pv =\n (\n typeof process === 'object' &&\n !!process &&\n typeof process.version === 'string'\n ) ?\n process.version\n : 'v0.0.0'\nconst pvs = pv\n .replace(/^v/, '')\n .split('.')\n .map(s => parseInt(s, 10))\n\n/* c8 ignore start */\nconst [major = 0, minor = 0] = pvs\n/* c8 ignore stop */\n\nlet {\n parseArgs: pa,\n}: typeof import('util') | typeof import('@pkgjs/parseargs') = util\n\n/* c8 ignore start - version specific */\nif (\n !pa ||\n major < 16 ||\n (major === 18 && minor < 11) ||\n (major === 16 && minor < 19)\n) {\n // Ignore because we will clobber it for commonjs\n //@ts-ignore\n pa = (await import('@pkgjs/parseargs')).parseArgs\n}\n/* c8 ignore stop */\n\nexport const parseArgs = pa as (typeof import('util'))['parseArgs']\n"]} \ No newline at end of file diff --git a/node_modules/jackspeak/package.json b/node_modules/jackspeak/package.json deleted file mode 100644 index 51eaabdf..00000000 --- a/node_modules/jackspeak/package.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "name": "jackspeak", - "publishConfig": { - "tag": "v3-legacy" - }, - "version": "3.4.3", - "description": "A very strict and proper argument parser.", - "tshy": { - "main": true, - "exports": { - "./package.json": "./package.json", - ".": "./src/index.js" - } - }, - "main": "./dist/commonjs/index.js", - "types": "./dist/commonjs/index.d.ts", - "type": "module", - "exports": { - "./package.json": "./package.json", - ".": { - "import": { - "types": "./dist/esm/index.d.ts", - "default": "./dist/esm/index.js" - }, - "require": { - "types": "./dist/commonjs/index.d.ts", - "default": "./dist/commonjs/index.js" - } - } - }, - "files": [ - "dist" - ], - "scripts": { - "build-examples": "for i in examples/*.js ; do node $i -h > ${i/.js/.txt}; done", - "preversion": "npm test", - "postversion": "npm publish", - "prepublishOnly": "git push origin --follow-tags", - "prepare": "tshy", - "pretest": "npm run prepare", - "presnap": "npm run prepare", - "test": "tap", - "snap": "tap", - "format": "prettier --write . --log-level warn", - "typedoc": "typedoc --tsconfig .tshy/esm.json ./src/*.ts" - }, - "license": "BlueOak-1.0.0", - "prettier": { - "experimentalTernaries": true, - "semi": false, - "printWidth": 75, - "tabWidth": 2, - "useTabs": false, - "singleQuote": true, - "jsxSingleQuote": false, - "bracketSameLine": true, - "arrowParens": "avoid", - "endOfLine": "lf" - }, - "devDependencies": { - "@types/node": "^20.7.0", - "@types/pkgjs__parseargs": "^0.10.1", - "prettier": "^3.2.5", - "tap": "^18.8.0", - "tshy": "^1.14.0", - "typedoc": "^0.25.1", - "typescript": "^5.2.2" - }, - "dependencies": { - "@isaacs/cliui": "^8.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/isaacs/jackspeak.git" - }, - "keywords": [ - "argument", - "parser", - "args", - "option", - "flag", - "cli", - "command", - "line", - "parse", - "parsing" - ], - "author": "Isaac Z. Schlueter ", - "optionalDependencies": { - "@pkgjs/parseargs": "^0.11.0" - } -} diff --git a/node_modules/js-yaml/CHANGELOG.md b/node_modules/js-yaml/CHANGELOG.md deleted file mode 100644 index ff2375e0..00000000 --- a/node_modules/js-yaml/CHANGELOG.md +++ /dev/null @@ -1,616 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - - -## [4.1.0] - 2021-04-15 -### Added -- Types are now exported as `yaml.types.XXX`. -- Every type now has `options` property with original arguments kept as they were - (see `yaml.types.int.options` as an example). - -### Changed -- `Schema.extend()` now keeps old type order in case of conflicts - (e.g. Schema.extend([ a, b, c ]).extend([ b, a, d ]) is now ordered as `abcd` instead of `cbad`). - - -## [4.0.0] - 2021-01-03 -### Changed -- Check [migration guide](migrate_v3_to_v4.md) to see details for all breaking changes. -- Breaking: "unsafe" tags `!!js/function`, `!!js/regexp`, `!!js/undefined` are - moved to [js-yaml-js-types](https://github.com/nodeca/js-yaml-js-types) package. -- Breaking: removed `safe*` functions. Use `load`, `loadAll`, `dump` - instead which are all now safe by default. -- `yaml.DEFAULT_SAFE_SCHEMA` and `yaml.DEFAULT_FULL_SCHEMA` are removed, use - `yaml.DEFAULT_SCHEMA` instead. -- `yaml.Schema.create(schema, tags)` is removed, use `schema.extend(tags)` instead. -- `!!binary` now always mapped to `Uint8Array` on load. -- Reduced nesting of `/lib` folder. -- Parse numbers according to YAML 1.2 instead of YAML 1.1 (`01234` is now decimal, - `0o1234` is octal, `1:23` is parsed as string instead of base60). -- `dump()` no longer quotes `:`, `[`, `]`, `(`, `)` except when necessary, #470, #557. -- Line and column in exceptions are now formatted as `(X:Y)` instead of - `at line X, column Y` (also present in compact format), #332. -- Code snippet created in exceptions now contains multiple lines with line numbers. -- `dump()` now serializes `undefined` as `null` in collections and removes keys with - `undefined` in mappings, #571. -- `dump()` with `skipInvalid=true` now serializes invalid items in collections as null. -- Custom tags starting with `!` are now dumped as `!tag` instead of `!`, #576. -- Custom tags starting with `tag:yaml.org,2002:` are now shorthanded using `!!`, #258. - -### Added -- Added `.mjs` (es modules) support. -- Added `quotingType` and `forceQuotes` options for dumper to configure - string literal style, #290, #529. -- Added `styles: { '!!null': 'empty' }` option for dumper - (serializes `{ foo: null }` as "`foo: `"), #570. -- Added `replacer` option (similar to option in JSON.stringify), #339. -- Custom `Tag` can now handle all tags or multiple tags with the same prefix, #385. - -### Fixed -- Astral characters are no longer encoded by `dump()`, #587. -- "duplicate mapping key" exception now points at the correct column, #452. -- Extra commas in flow collections (e.g. `[foo,,bar]`) now throw an exception - instead of producing null, #321. -- `__proto__` key no longer overrides object prototype, #164. -- Removed `bower.json`. -- Tags are now url-decoded in `load()` and url-encoded in `dump()` - (previously usage of custom non-ascii tags may have led to invalid YAML that can't be parsed). -- Anchors now work correctly with empty nodes, #301. -- Fix incorrect parsing of invalid block mapping syntax, #418. -- Throw an error if block sequence/mapping indent contains a tab, #80. - - -## [3.14.1] - 2020-12-07 -### Security -- Fix possible code execution in (already unsafe) `.load()` (in &anchor). - - -## [3.14.0] - 2020-05-22 -### Changed -- Support `safe/loadAll(input, options)` variant of call. -- CI: drop outdated nodejs versions. -- Dev deps bump. - -### Fixed -- Quote `=` in plain scalars #519. -- Check the node type for `!` tag in case user manually specifies it. -- Verify that there are no null-bytes in input. -- Fix wrong quote position when writing condensed flow, #526. - - -## [3.13.1] - 2019-04-05 -### Security -- Fix possible code execution in (already unsafe) `.load()`, #480. - - -## [3.13.0] - 2019-03-20 -### Security -- Security fix: `safeLoad()` can hang when arrays with nested refs - used as key. Now throws exception for nested arrays. #475. - - -## [3.12.2] - 2019-02-26 -### Fixed -- Fix `noArrayIndent` option for root level, #468. - - -## [3.12.1] - 2019-01-05 -### Added -- Added `noArrayIndent` option, #432. - - -## [3.12.0] - 2018-06-02 -### Changed -- Support arrow functions without a block statement, #421. - - -## [3.11.0] - 2018-03-05 -### Added -- Add arrow functions suport for `!!js/function`. - -### Fixed -- Fix dump in bin/octal/hex formats for negative integers, #399. - - -## [3.10.0] - 2017-09-10 -### Fixed -- Fix `condenseFlow` output (quote keys for sure, instead of spaces), #371, #370. -- Dump astrals as codepoints instead of surrogate pair, #368. - - -## [3.9.1] - 2017-07-08 -### Fixed -- Ensure stack is present for custom errors in node 7.+, #351. - - -## [3.9.0] - 2017-07-08 -### Added -- Add `condenseFlow` option (to create pretty URL query params), #346. - -### Fixed -- Support array return from safeLoadAll/loadAll, #350. - - -## [3.8.4] - 2017-05-08 -### Fixed -- Dumper: prevent space after dash for arrays that wrap, #343. - - -## [3.8.3] - 2017-04-05 -### Fixed -- Should not allow numbers to begin and end with underscore, #335. - - -## [3.8.2] - 2017-03-02 -### Fixed -- Fix `!!float 123` (integers) parse, #333. -- Don't allow leading zeros in floats (except 0, 0.xxx). -- Allow positive exponent without sign in floats. - - -## [3.8.1] - 2017-02-07 -### Changed -- Maintenance: update browserified build. - - -## [3.8.0] - 2017-02-07 -### Fixed -- Fix reported position for `duplicated mapping key` errors. - Now points to block start instead of block end. - (#243, thanks to @shockey). - - -## [3.7.0] - 2016-11-12 -### Added -- Support polymorphism for tags (#300, thanks to @monken). - -### Fixed -- Fix parsing of quotes followed by newlines (#304, thanks to @dplepage). - - -## [3.6.1] - 2016-05-11 -### Fixed -- Fix output cut on a pipe, #286. - - -## [3.6.0] - 2016-04-16 -### Fixed -- Dumper rewrite, fix multiple bugs with trailing `\n`. - Big thanks to @aepsilon! -- Loader: fix leading/trailing newlines in block scalars, @aepsilon. - - -## [3.5.5] - 2016-03-17 -### Fixed -- Date parse fix: don't allow dates with on digit in month and day, #268. - - -## [3.5.4] - 2016-03-09 -### Added -- `noCompatMode` for dumper, to disable quoting YAML 1.1 values. - - -## [3.5.3] - 2016-02-11 -### Changed -- Maintenance release. - - -## [3.5.2] - 2016-01-11 -### Changed -- Maintenance: missed comma in bower config. - - -## [3.5.1] - 2016-01-11 -### Changed -- Removed `inherit` dependency, #239. -- Better browserify workaround for esprima load. -- Demo rewrite. - - -## [3.5.0] - 2016-01-10 -### Fixed -- Dumper. Fold strings only, #217. -- Dumper. `norefs` option, to clone linked objects, #229. -- Loader. Throw a warning for duplicate keys, #166. -- Improved browserify support (mark `esprima` & `Buffer` excluded). - - -## [3.4.6] - 2015-11-26 -### Changed -- Use standalone `inherit` to keep browserified files clear. - - -## [3.4.5] - 2015-11-23 -### Added -- Added `lineWidth` option to dumper. - - -## [3.4.4] - 2015-11-21 -### Fixed -- Fixed floats dump (missed dot for scientific format), #220. -- Allow non-printable characters inside quoted scalars, #192. - - -## [3.4.3] - 2015-10-10 -### Changed -- Maintenance release - deps bump (esprima, argparse). - - -## [3.4.2] - 2015-09-09 -### Fixed -- Fixed serialization of duplicated entries in sequences, #205. - Thanks to @vogelsgesang. - - -## [3.4.1] - 2015-09-05 -### Fixed -- Fixed stacktrace handling in generated errors, for browsers (FF/IE). - - -## [3.4.0] - 2015-08-23 -### Changed -- Don't throw on warnings anymore. Use `onWarning` option to catch. -- Throw error on unknown tags (was warning before). -- Reworked internals of error class. - -### Fixed -- Fixed multiline keys dump, #197. Thanks to @tcr. -- Fixed heading line breaks in some scalars (regression). - - -## [3.3.1] - 2015-05-13 -### Added -- Added `.sortKeys` dumper option, thanks to @rjmunro. - -### Fixed -- Fixed astral characters support, #191. - - -## [3.3.0] - 2015-04-26 -### Changed -- Significantly improved long strings formatting in dumper, thanks to @isaacs. -- Strip BOM if exists. - - -## [3.2.7] - 2015-02-19 -### Changed -- Maintenance release. -- Updated dependencies. -- HISTORY.md -> CHANGELOG.md - - -## [3.2.6] - 2015-02-07 -### Fixed -- Fixed encoding of UTF-16 surrogate pairs. (e.g. "\U0001F431" CAT FACE). -- Fixed demo dates dump (#113, thanks to @Hypercubed). - - -## [3.2.5] - 2014-12-28 -### Fixed -- Fixed resolving of all built-in types on empty nodes. -- Fixed invalid warning on empty lines within quoted scalars and flow collections. -- Fixed bug: Tag on an empty node didn't resolve in some cases. - - -## [3.2.4] - 2014-12-19 -### Fixed -- Fixed resolving of !!null tag on an empty node. - - -## [3.2.3] - 2014-11-08 -### Fixed -- Implemented dumping of objects with circular and cross references. -- Partially fixed aliasing of constructed objects. (see issue #141 for details) - - -## [3.2.2] - 2014-09-07 -### Fixed -- Fixed infinite loop on unindented block scalars. -- Rewritten base64 encode/decode in binary type, to keep code licence clear. - - -## [3.2.1] - 2014-08-24 -### Fixed -- Nothig new. Just fix npm publish error. - - -## [3.2.0] - 2014-08-24 -### Added -- Added input piping support to CLI. - -### Fixed -- Fixed typo, that could cause hand on initial indent (#139). - - -## [3.1.0] - 2014-07-07 -### Changed -- 1.5x-2x speed boost. -- Removed deprecated `require('xxx.yml')` support. -- Significant code cleanup and refactoring. -- Internal API changed. If you used custom types - see updated examples. - Others are not affected. -- Even if the input string has no trailing line break character, - it will be parsed as if it has one. -- Added benchmark scripts. -- Moved bower files to /dist folder -- Bugfixes. - - -## [3.0.2] - 2014-02-27 -### Fixed -- Fixed bug: "constructor" string parsed as `null`. - - -## [3.0.1] - 2013-12-22 -### Fixed -- Fixed parsing of literal scalars. (issue #108) -- Prevented adding unnecessary spaces in object dumps. (issue #68) -- Fixed dumping of objects with very long (> 1024 in length) keys. - - -## [3.0.0] - 2013-12-16 -### Changed -- Refactored code. Changed API for custom types. -- Removed output colors in CLI, dump json by default. -- Removed big dependencies from browser version (esprima, buffer). Load `esprima` manually, if `!!js/function` needed. `!!bin` now returns Array in browser -- AMD support. -- Don't quote dumped strings because of `-` & `?` (if not first char). -- __Deprecated__ loading yaml files via `require()`, as not recommended - behaviour for node. - - -## [2.1.3] - 2013-10-16 -### Fixed -- Fix wrong loading of empty block scalars. - - -## [2.1.2] - 2013-10-07 -### Fixed -- Fix unwanted line breaks in folded scalars. - - -## [2.1.1] - 2013-10-02 -### Fixed -- Dumper now respects deprecated booleans syntax from YAML 1.0/1.1 -- Fixed reader bug in JSON-like sequences/mappings. - - -## [2.1.0] - 2013-06-05 -### Added -- Add standard YAML schemas: Failsafe (`FAILSAFE_SCHEMA`), - JSON (`JSON_SCHEMA`) and Core (`CORE_SCHEMA`). -- Add `skipInvalid` dumper option. - -### Changed -- Rename `DEFAULT_SCHEMA` to `DEFAULT_FULL_SCHEMA` - and `SAFE_SCHEMA` to `DEFAULT_SAFE_SCHEMA`. -- Use `safeLoad` for `require` extension. - -### Fixed -- Bug fix: export `NIL` constant from the public interface. - - -## [2.0.5] - 2013-04-26 -### Security -- Close security issue in !!js/function constructor. - Big thanks to @nealpoole for security audit. - - -## [2.0.4] - 2013-04-08 -### Changed -- Updated .npmignore to reduce package size - - -## [2.0.3] - 2013-02-26 -### Fixed -- Fixed dumping of empty arrays ans objects. ([] and {} instead of null) - - -## [2.0.2] - 2013-02-15 -### Fixed -- Fixed input validation: tabs are printable characters. - - -## [2.0.1] - 2013-02-09 -### Fixed -- Fixed error, when options not passed to function cass - - -## [2.0.0] - 2013-02-09 -### Changed -- Full rewrite. New architecture. Fast one-stage parsing. -- Changed custom types API. -- Added YAML dumper. - - -## [1.0.3] - 2012-11-05 -### Fixed -- Fixed utf-8 files loading. - - -## [1.0.2] - 2012-08-02 -### Fixed -- Pull out hand-written shims. Use ES5-Shims for old browsers support. See #44. -- Fix timstamps incorectly parsed in local time when no time part specified. - - -## [1.0.1] - 2012-07-07 -### Fixed -- Fixes `TypeError: 'undefined' is not an object` under Safari. Thanks Phuong. -- Fix timestamps incorrectly parsed in local time. Thanks @caolan. Closes #46. - - -## [1.0.0] - 2012-07-01 -### Changed -- `y`, `yes`, `n`, `no`, `on`, `off` are not converted to Booleans anymore. - Fixes #42. -- `require(filename)` now returns a single document and throws an Error if - file contains more than one document. -- CLI was merged back from js-yaml.bin - - -## [0.3.7] - 2012-02-28 -### Fixed -- Fix export of `addConstructor()`. Closes #39. - - -## [0.3.6] - 2012-02-22 -### Changed -- Removed AMD parts - too buggy to use. Need help to rewrite from scratch - -### Fixed -- Removed YUI compressor warning (renamed `double` variable). Closes #40. - - -## [0.3.5] - 2012-01-10 -### Fixed -- Workagound for .npmignore fuckup under windows. Thanks to airportyh. - - -## [0.3.4] - 2011-12-24 -### Fixed -- Fixes str[] for oldIEs support. -- Adds better has change support for browserified demo. -- improves compact output of Error. Closes #33. - - -## [0.3.3] - 2011-12-20 -### Added -- adds `compact` stringification of Errors. - -### Changed -- jsyaml executable moved to separate module. - - -## [0.3.2] - 2011-12-16 -### Added -- Added jsyaml executable. -- Added !!js/function support. Closes #12. - -### Fixed -- Fixes ug with block style scalars. Closes #26. -- All sources are passing JSLint now. -- Fixes bug in Safari. Closes #28. -- Fixes bug in Opers. Closes #29. -- Improves browser support. Closes #20. - - -## [0.3.1] - 2011-11-18 -### Added -- Added AMD support for browserified version. -- Added permalinks for online demo YAML snippets. Now we have YPaste service, lol. -- Added !!js/regexp and !!js/undefined types. Partially solves #12. - -### Changed -- Wrapped browserified js-yaml into closure. - -### Fixed -- Fixed the resolvement of non-specific tags. Closes #17. -- Fixed !!set mapping. -- Fixed month parse in dates. Closes #19. - - -## [0.3.0] - 2011-11-09 -### Added -- Added browserified version. Closes #13. -- Added live demo of browserified version. -- Ported some of the PyYAML tests. See #14. - -### Fixed -- Removed JS.Class dependency. Closes #3. -- Fixed timestamp bug when fraction was given. - - -## [0.2.2] - 2011-11-06 -### Fixed -- Fixed crash on docs without ---. Closes #8. -- Fixed multiline string parse -- Fixed tests/comments for using array as key - - -## [0.2.1] - 2011-11-02 -### Fixed -- Fixed short file read (<4k). Closes #9. - - -## [0.2.0] - 2011-11-02 -### Changed -- First public release - - -[4.1.0]: https://github.com/nodeca/js-yaml/compare/4.0.0...4.1.0 -[4.0.0]: https://github.com/nodeca/js-yaml/compare/3.14.0...4.0.0 -[3.14.0]: https://github.com/nodeca/js-yaml/compare/3.13.1...3.14.0 -[3.13.1]: https://github.com/nodeca/js-yaml/compare/3.13.0...3.13.1 -[3.13.0]: https://github.com/nodeca/js-yaml/compare/3.12.2...3.13.0 -[3.12.2]: https://github.com/nodeca/js-yaml/compare/3.12.1...3.12.2 -[3.12.1]: https://github.com/nodeca/js-yaml/compare/3.12.0...3.12.1 -[3.12.0]: https://github.com/nodeca/js-yaml/compare/3.11.0...3.12.0 -[3.11.0]: https://github.com/nodeca/js-yaml/compare/3.10.0...3.11.0 -[3.10.0]: https://github.com/nodeca/js-yaml/compare/3.9.1...3.10.0 -[3.9.1]: https://github.com/nodeca/js-yaml/compare/3.9.0...3.9.1 -[3.9.0]: https://github.com/nodeca/js-yaml/compare/3.8.4...3.9.0 -[3.8.4]: https://github.com/nodeca/js-yaml/compare/3.8.3...3.8.4 -[3.8.3]: https://github.com/nodeca/js-yaml/compare/3.8.2...3.8.3 -[3.8.2]: https://github.com/nodeca/js-yaml/compare/3.8.1...3.8.2 -[3.8.1]: https://github.com/nodeca/js-yaml/compare/3.8.0...3.8.1 -[3.8.0]: https://github.com/nodeca/js-yaml/compare/3.7.0...3.8.0 -[3.7.0]: https://github.com/nodeca/js-yaml/compare/3.6.1...3.7.0 -[3.6.1]: https://github.com/nodeca/js-yaml/compare/3.6.0...3.6.1 -[3.6.0]: https://github.com/nodeca/js-yaml/compare/3.5.5...3.6.0 -[3.5.5]: https://github.com/nodeca/js-yaml/compare/3.5.4...3.5.5 -[3.5.4]: https://github.com/nodeca/js-yaml/compare/3.5.3...3.5.4 -[3.5.3]: https://github.com/nodeca/js-yaml/compare/3.5.2...3.5.3 -[3.5.2]: https://github.com/nodeca/js-yaml/compare/3.5.1...3.5.2 -[3.5.1]: https://github.com/nodeca/js-yaml/compare/3.5.0...3.5.1 -[3.5.0]: https://github.com/nodeca/js-yaml/compare/3.4.6...3.5.0 -[3.4.6]: https://github.com/nodeca/js-yaml/compare/3.4.5...3.4.6 -[3.4.5]: https://github.com/nodeca/js-yaml/compare/3.4.4...3.4.5 -[3.4.4]: https://github.com/nodeca/js-yaml/compare/3.4.3...3.4.4 -[3.4.3]: https://github.com/nodeca/js-yaml/compare/3.4.2...3.4.3 -[3.4.2]: https://github.com/nodeca/js-yaml/compare/3.4.1...3.4.2 -[3.4.1]: https://github.com/nodeca/js-yaml/compare/3.4.0...3.4.1 -[3.4.0]: https://github.com/nodeca/js-yaml/compare/3.3.1...3.4.0 -[3.3.1]: https://github.com/nodeca/js-yaml/compare/3.3.0...3.3.1 -[3.3.0]: https://github.com/nodeca/js-yaml/compare/3.2.7...3.3.0 -[3.2.7]: https://github.com/nodeca/js-yaml/compare/3.2.6...3.2.7 -[3.2.6]: https://github.com/nodeca/js-yaml/compare/3.2.5...3.2.6 -[3.2.5]: https://github.com/nodeca/js-yaml/compare/3.2.4...3.2.5 -[3.2.4]: https://github.com/nodeca/js-yaml/compare/3.2.3...3.2.4 -[3.2.3]: https://github.com/nodeca/js-yaml/compare/3.2.2...3.2.3 -[3.2.2]: https://github.com/nodeca/js-yaml/compare/3.2.1...3.2.2 -[3.2.1]: https://github.com/nodeca/js-yaml/compare/3.2.0...3.2.1 -[3.2.0]: https://github.com/nodeca/js-yaml/compare/3.1.0...3.2.0 -[3.1.0]: https://github.com/nodeca/js-yaml/compare/3.0.2...3.1.0 -[3.0.2]: https://github.com/nodeca/js-yaml/compare/3.0.1...3.0.2 -[3.0.1]: https://github.com/nodeca/js-yaml/compare/3.0.0...3.0.1 -[3.0.0]: https://github.com/nodeca/js-yaml/compare/2.1.3...3.0.0 -[2.1.3]: https://github.com/nodeca/js-yaml/compare/2.1.2...2.1.3 -[2.1.2]: https://github.com/nodeca/js-yaml/compare/2.1.1...2.1.2 -[2.1.1]: https://github.com/nodeca/js-yaml/compare/2.1.0...2.1.1 -[2.1.0]: https://github.com/nodeca/js-yaml/compare/2.0.5...2.1.0 -[2.0.5]: https://github.com/nodeca/js-yaml/compare/2.0.4...2.0.5 -[2.0.4]: https://github.com/nodeca/js-yaml/compare/2.0.3...2.0.4 -[2.0.3]: https://github.com/nodeca/js-yaml/compare/2.0.2...2.0.3 -[2.0.2]: https://github.com/nodeca/js-yaml/compare/2.0.1...2.0.2 -[2.0.1]: https://github.com/nodeca/js-yaml/compare/2.0.0...2.0.1 -[2.0.0]: https://github.com/nodeca/js-yaml/compare/1.0.3...2.0.0 -[1.0.3]: https://github.com/nodeca/js-yaml/compare/1.0.2...1.0.3 -[1.0.2]: https://github.com/nodeca/js-yaml/compare/1.0.1...1.0.2 -[1.0.1]: https://github.com/nodeca/js-yaml/compare/1.0.0...1.0.1 -[1.0.0]: https://github.com/nodeca/js-yaml/compare/0.3.7...1.0.0 -[0.3.7]: https://github.com/nodeca/js-yaml/compare/0.3.6...0.3.7 -[0.3.6]: https://github.com/nodeca/js-yaml/compare/0.3.5...0.3.6 -[0.3.5]: https://github.com/nodeca/js-yaml/compare/0.3.4...0.3.5 -[0.3.4]: https://github.com/nodeca/js-yaml/compare/0.3.3...0.3.4 -[0.3.3]: https://github.com/nodeca/js-yaml/compare/0.3.2...0.3.3 -[0.3.2]: https://github.com/nodeca/js-yaml/compare/0.3.1...0.3.2 -[0.3.1]: https://github.com/nodeca/js-yaml/compare/0.3.0...0.3.1 -[0.3.0]: https://github.com/nodeca/js-yaml/compare/0.2.2...0.3.0 -[0.2.2]: https://github.com/nodeca/js-yaml/compare/0.2.1...0.2.2 -[0.2.1]: https://github.com/nodeca/js-yaml/compare/0.2.0...0.2.1 -[0.2.0]: https://github.com/nodeca/js-yaml/releases/tag/0.2.0 diff --git a/node_modules/js-yaml/README.md b/node_modules/js-yaml/README.md index 3cbc4bd2..b7bfb846 100644 --- a/node_modules/js-yaml/README.md +++ b/node_modules/js-yaml/README.md @@ -1,246 +1,44 @@ -JS-YAML - YAML 1.2 parser / writer for JavaScript -================================================= +# js-yaml -[![CI](https://github.com/nodeca/js-yaml/workflows/CI/badge.svg?branch=master)](https://github.com/nodeca/js-yaml/actions) +[![CI](https://github.com/nodeca/js-yaml/actions/workflows/ci.yml/badge.svg)](https://github.com/nodeca/js-yaml/actions/workflows/ci.yml) [![NPM version](https://img.shields.io/npm/v/js-yaml.svg)](https://www.npmjs.org/package/js-yaml) -__[Online Demo](http://nodeca.github.com/js-yaml/)__ +> YAML 1.2 parser and serializer for JavaScript. +__[Online demo](https://nodeca.github.io/js-yaml/)__ -This is an implementation of [YAML](http://yaml.org/), a human-friendly data -serialization language. Started as [PyYAML](http://pyyaml.org/) port, it was -completely rewritten from scratch. Now it's very fast, and supports 1.2 spec. +- Supports the YAML 1.2 and YAML 1.1 specifications. +- Passes the entire [YAML Test Suite](https://github.com/yaml/yaml-test-suite). -Installation ------------- +### [Documentation >>](https://nodeca.github.io/js-yaml/doc/) -### YAML module for node.js -``` -npm install js-yaml -``` - - -### CLI executable - -If you want to inspect your YAML files from CLI, install js-yaml globally: - -``` -npm install -g js-yaml -``` - -#### Usage - -``` -usage: js-yaml [-h] [-v] [-c] [-t] file - -Positional arguments: - file File with YAML document(s) +##### Install -Optional arguments: - -h, --help Show this help message and exit. - -v, --version Show program's version number and exit. - -c, --compact Display errors in compact mode - -t, --trace Show stack trace on error +```bash +npm install js-yaml ``` -API ---- - -Here we cover the most 'useful' methods. If you need advanced details (creating -your own tags), see [examples](https://github.com/nodeca/js-yaml/tree/master/examples) -for more info. +##### Usage -``` javascript -const yaml = require('js-yaml'); -const fs = require('fs'); +```js +import { load } from 'js-yaml' -// Get document, or throw exception on error try { - const doc = yaml.load(fs.readFileSync('/home/ixti/example.yml', 'utf8')); - console.log(doc); + const document = load('greeting: hello') + console.log(document.greeting) } catch (e) { - console.log(e); + console.error(e) } ``` +```js +import { dump } from 'js-yaml' -### load (string [ , options ]) - -Parses `string` as single YAML document. Returns either a -plain object, a string, a number, `null` or `undefined`, or throws `YAMLException` on error. By default, does -not support regexps, functions and undefined. - -options: - -- `filename` _(default: null)_ - string to be used as a file path in - error/warning messages. -- `onWarning` _(default: null)_ - function to call on warning messages. - Loader will call this function with an instance of `YAMLException` for each warning. -- `schema` _(default: `DEFAULT_SCHEMA`)_ - specifies a schema to use. - - `FAILSAFE_SCHEMA` - only strings, arrays and plain objects: - http://www.yaml.org/spec/1.2/spec.html#id2802346 - - `JSON_SCHEMA` - all JSON-supported types: - http://www.yaml.org/spec/1.2/spec.html#id2803231 - - `CORE_SCHEMA` - same as `JSON_SCHEMA`: - http://www.yaml.org/spec/1.2/spec.html#id2804923 - - `DEFAULT_SCHEMA` - all supported YAML types. -- `json` _(default: false)_ - compatibility with JSON.parse behaviour. If true, then duplicate keys in a mapping will override values rather than throwing an error. - -NOTE: This function **does not** understand multi-document sources, it throws -exception on those. - -NOTE: JS-YAML **does not** support schema-specific tag resolution restrictions. -So, the JSON schema is not as strictly defined in the YAML specification. -It allows numbers in any notation, use `Null` and `NULL` as `null`, etc. -The core schema also has no such restrictions. It allows binary notation for integers. - - -### loadAll (string [, iterator] [, options ]) - -Same as `load()`, but understands multi-document sources. Applies -`iterator` to each document if specified, or returns array of documents. - -``` javascript -const yaml = require('js-yaml'); - -yaml.loadAll(data, function (doc) { - console.log(doc); -}); +const source = dump({ greeting: 'hello' }) +console.log(source) ``` - -### dump (object [ , options ]) - -Serializes `object` as a YAML document. Uses `DEFAULT_SCHEMA`, so it will -throw an exception if you try to dump regexps or functions. However, you can -disable exceptions by setting the `skipInvalid` option to `true`. - -options: - -- `indent` _(default: 2)_ - indentation width to use (in spaces). -- `noArrayIndent` _(default: false)_ - when true, will not add an indentation level to array elements -- `skipInvalid` _(default: false)_ - do not throw on invalid types (like function - in the safe schema) and skip pairs and single values with such types. -- `flowLevel` _(default: -1)_ - specifies level of nesting, when to switch from - block to flow style for collections. -1 means block style everwhere -- `styles` - "tag" => "style" map. Each tag may have own set of styles. -- `schema` _(default: `DEFAULT_SCHEMA`)_ specifies a schema to use. -- `sortKeys` _(default: `false`)_ - if `true`, sort keys when dumping YAML. If a - function, use the function to sort the keys. -- `lineWidth` _(default: `80`)_ - set max line width. Set `-1` for unlimited width. -- `noRefs` _(default: `false`)_ - if `true`, don't convert duplicate objects into references -- `noCompatMode` _(default: `false`)_ - if `true` don't try to be compatible with older - yaml versions. Currently: don't quote "yes", "no" and so on, as required for YAML 1.1 -- `condenseFlow` _(default: `false`)_ - if `true` flow sequences will be condensed, omitting the space between `a, b`. Eg. `'[a,b]'`, and omitting the space between `key: value` and quoting the key. Eg. `'{"a":b}'` Can be useful when using yaml for pretty URL query params as spaces are %-encoded. -- `quotingType` _(`'` or `"`, default: `'`)_ - strings will be quoted using this quoting style. If you specify single quotes, double quotes will still be used for non-printable characters. -- `forceQuotes` _(default: `false`)_ - if `true`, all non-key strings will be quoted even if they normally don't need to. -- `replacer` - callback `function (key, value)` called recursively on each key/value in source object (see `replacer` docs for `JSON.stringify`). - -The following table show availlable styles (e.g. "canonical", -"binary"...) available for each tag (.e.g. !!null, !!int ...). Yaml -output is shown on the right side after `=>` (default setting) or `->`: - -``` none -!!null - "canonical" -> "~" - "lowercase" => "null" - "uppercase" -> "NULL" - "camelcase" -> "Null" - -!!int - "binary" -> "0b1", "0b101010", "0b1110001111010" - "octal" -> "0o1", "0o52", "0o16172" - "decimal" => "1", "42", "7290" - "hexadecimal" -> "0x1", "0x2A", "0x1C7A" - -!!bool - "lowercase" => "true", "false" - "uppercase" -> "TRUE", "FALSE" - "camelcase" -> "True", "False" - -!!float - "lowercase" => ".nan", '.inf' - "uppercase" -> ".NAN", '.INF' - "camelcase" -> ".NaN", '.Inf' -``` - -Example: - -``` javascript -dump(object, { - 'styles': { - '!!null': 'canonical' // dump null as ~ - }, - 'sortKeys': true // sort object keys -}); -``` - -Supported YAML types --------------------- - -The list of standard YAML tags and corresponding JavaScript types. See also -[YAML tag discussion](http://pyyaml.org/wiki/YAMLTagDiscussion) and -[YAML types repository](http://yaml.org/type/). - -``` -!!null '' # null -!!bool 'yes' # bool -!!int '3...' # number -!!float '3.14...' # number -!!binary '...base64...' # buffer -!!timestamp 'YYYY-...' # date -!!omap [ ... ] # array of key-value pairs -!!pairs [ ... ] # array or array pairs -!!set { ... } # array of objects with given keys and null values -!!str '...' # string -!!seq [ ... ] # array -!!map { ... } # object -``` - -**JavaScript-specific tags** - -See [js-yaml-js-types](https://github.com/nodeca/js-yaml-js-types) for -extra types. - - -Caveats -------- - -Note, that you use arrays or objects as key in JS-YAML. JS does not allow objects -or arrays as keys, and stringifies (by calling `toString()` method) them at the -moment of adding them. - -``` yaml ---- -? [ foo, bar ] -: - baz -? { foo: bar } -: - baz - - baz -``` - -``` javascript -{ "foo,bar": ["baz"], "[object Object]": ["baz", "baz"] } -``` - -Also, reading of properties on implicit block mapping keys is not supported yet. -So, the following YAML document cannot be loaded. - -``` yaml -&anchor foo: - foo: bar - *anchor: duplicate key - baz: bat - *anchor: duplicate key -``` - - -js-yaml for enterprise ----------------------- - -Available as part of the Tidelift Subscription - -The maintainers of js-yaml and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-js-yaml?utm_source=npm-js-yaml&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) +[More usage examples](docs/usage.md). diff --git a/node_modules/js-yaml/bin/js-yaml.js b/node_modules/js-yaml/bin/js-yaml.js deleted file mode 100755 index a182f1af..00000000 --- a/node_modules/js-yaml/bin/js-yaml.js +++ /dev/null @@ -1,126 +0,0 @@ -#!/usr/bin/env node - - -'use strict'; - -/*eslint-disable no-console*/ - - -var fs = require('fs'); -var argparse = require('argparse'); -var yaml = require('..'); - - -//////////////////////////////////////////////////////////////////////////////// - - -var cli = new argparse.ArgumentParser({ - prog: 'js-yaml', - add_help: true -}); - -cli.add_argument('-v', '--version', { - action: 'version', - version: require('../package.json').version -}); - -cli.add_argument('-c', '--compact', { - help: 'Display errors in compact mode', - action: 'store_true' -}); - -// deprecated (not needed after we removed output colors) -// option suppressed, but not completely removed for compatibility -cli.add_argument('-j', '--to-json', { - help: argparse.SUPPRESS, - dest: 'json', - action: 'store_true' -}); - -cli.add_argument('-t', '--trace', { - help: 'Show stack trace on error', - action: 'store_true' -}); - -cli.add_argument('file', { - help: 'File to read, utf-8 encoded without BOM', - nargs: '?', - default: '-' -}); - - -//////////////////////////////////////////////////////////////////////////////// - - -var options = cli.parse_args(); - - -//////////////////////////////////////////////////////////////////////////////// - -function readFile(filename, encoding, callback) { - if (options.file === '-') { - // read from stdin - - var chunks = []; - - process.stdin.on('data', function (chunk) { - chunks.push(chunk); - }); - - process.stdin.on('end', function () { - return callback(null, Buffer.concat(chunks).toString(encoding)); - }); - } else { - fs.readFile(filename, encoding, callback); - } -} - -readFile(options.file, 'utf8', function (error, input) { - var output, isYaml; - - if (error) { - if (error.code === 'ENOENT') { - console.error('File not found: ' + options.file); - process.exit(2); - } - - console.error( - options.trace && error.stack || - error.message || - String(error)); - - process.exit(1); - } - - try { - output = JSON.parse(input); - isYaml = false; - } catch (err) { - if (err instanceof SyntaxError) { - try { - output = []; - yaml.loadAll(input, function (doc) { output.push(doc); }, {}); - isYaml = true; - - if (output.length === 0) output = null; - else if (output.length === 1) output = output[0]; - - } catch (e) { - if (options.trace && err.stack) console.error(e.stack); - else console.error(e.toString(options.compact)); - - process.exit(1); - } - } else { - console.error( - options.trace && err.stack || - err.message || - String(err)); - - process.exit(1); - } - } - - if (isYaml) console.log(JSON.stringify(output, null, ' ')); - else console.log(yaml.dump(output)); -}); diff --git a/node_modules/js-yaml/bin/js-yaml.mjs b/node_modules/js-yaml/bin/js-yaml.mjs new file mode 100755 index 00000000..fe265981 --- /dev/null +++ b/node_modules/js-yaml/bin/js-yaml.mjs @@ -0,0 +1,107 @@ +#!/usr/bin/env node + +import { readFileSync } from 'node:fs' +import argparse from 'argparse' +import { loadAll, dump } from 'js-yaml' + +const pkg = JSON.parse(readFileSync(new URL('../package.json', import.meta.url))) + +/// ///////////////////////////////////////////////////////////////////////////// + +const cli = new argparse.ArgumentParser({ + prog: 'js-yaml', + add_help: true +}) + +cli.add_argument('-v', '--version', { + action: 'version', + version: pkg.version +}) + +cli.add_argument('-c', '--compact', { + help: 'Display errors in compact mode', + action: 'store_true' +}) + +// deprecated (not needed after we removed output colors) +// option suppressed, but not completely removed for compatibility +cli.add_argument('-j', '--to-json', { + help: argparse.SUPPRESS, + dest: 'json', + action: 'store_true' +}) + +cli.add_argument('-t', '--trace', { + help: 'Show stack trace on error', + action: 'store_true' +}) + +cli.add_argument('file', { + help: 'File to read, utf-8 encoded without BOM', + nargs: '?', + default: '-' +}) + +/// ///////////////////////////////////////////////////////////////////////////// + +const options = cli.parse_args() + +/// ///////////////////////////////////////////////////////////////////////////// + +// '-' means stdin (fd 0); a terminal there => nothing piped in, show help +if (options.file === '-' && process.stdin.isTTY) { + cli.print_help() + process.exit(1) +} + +let input + +try { + input = readFileSync(options.file === '-' ? 0 : options.file, 'utf8') +} catch (error) { + if (error.code === 'ENOENT') { + console.error(`File not found: ${options.file}`) + process.exit(2) + } + + console.error( + (options.trace && error.stack) || + error.message || + String(error)) + + process.exit(1) +} + +let output +let isYaml + +try { + output = JSON.parse(input) + isYaml = false +} catch (err) { + if (err instanceof SyntaxError) { + try { + output = [] + loadAll(input, (doc) => { output.push(doc) }, {}) + isYaml = true + + if (output.length === 0) output = null + else if (output.length === 1) output = output[0] + } catch (e) { + if (options.trace && err.stack) console.error(e.stack) + else console.error(e.toString(options.compact)) + + process.exit(1) + } + } else { + console.error( + (options.trace && err.stack) || + err.message || + String(err)) + + process.exit(1) + } +} + +if (isYaml) console.log(JSON.stringify(output, null, ' ')) +else console.log(dump(output)) diff --git a/node_modules/js-yaml/dist/browser/js-yaml.esm.min.mjs b/node_modules/js-yaml/dist/browser/js-yaml.esm.min.mjs new file mode 100644 index 00000000..79c6226a --- /dev/null +++ b/node_modules/js-yaml/dist/browser/js-yaml.esm.min.mjs @@ -0,0 +1,2295 @@ +/*! js-yaml 5.4.1 https://github.com/nodeca/js-yaml @license MIT */ +//#region src/tag.ts +var e = Symbol("NOT_RESOLVED"); +function t(e, t) { + var n, r, i, a, o; + return { + tagName: e, + nodeKind: "scalar", + implicit: (n = t.implicit) == null ? !1 : n, + matchByTagPrefix: (r = t.matchByTagPrefix) == null ? !1 : r, + implicitFirstChars: (i = t.implicitFirstChars) == null ? null : i, + resolve: t.resolve, + identify: t.identify, + represent: (a = t.represent) == null ? ((e) => String(e)) : a, + representTagName: (o = t.representTagName) == null ? (() => e) : o + }; +} +function n(e, t) { + var n, r, i, a; + let o = t.finalize === void 0; + return { + tagName: e, + nodeKind: "sequence", + implicit: !1, + matchByTagPrefix: (n = t.matchByTagPrefix) == null ? !1 : n, + create: t.create, + addItem: t.addItem, + finalize: (r = t.finalize) == null ? ((e) => e) : r, + carrierIsResult: o, + identify: t.identify, + represent: (i = t.represent) == null ? ((e) => e) : i, + representTagName: (a = t.representTagName) == null ? (() => e) : a + }; +} +function r(e, t) { + var n, r, i, a; + let o = t.finalize === void 0; + return { + tagName: e, + nodeKind: "mapping", + implicit: !1, + matchByTagPrefix: (n = t.matchByTagPrefix) == null ? !1 : n, + create: t.create, + addPair: t.addPair, + has: t.has, + keys: t.keys, + get: t.get, + finalize: (r = t.finalize) == null ? ((e) => e) : r, + carrierIsResult: o, + identify: t.identify, + represent: (i = t.represent) == null ? ((e) => e) : i, + representTagName: (a = t.representTagName) == null ? (() => e) : a + }; +} +//#endregion +//#region src/tag/scalar/str.ts +var i = t("tag:yaml.org,2002:str", { + resolve: (e) => e, + identify: (e) => typeof e == "string" +}), a = [ + "", + "~", + "null", + "Null", + "NULL" +], o = t("tag:yaml.org,2002:null", { + implicit: !0, + implicitFirstChars: [ + "", + "~", + "n", + "N" + ], + resolve: (t) => a.indexOf(t) === -1 ? e : null, + identify: (e) => e === null, + represent: () => "null" +}), s = t("tag:yaml.org,2002:null", { + implicit: !0, + implicitFirstChars: ["n"], + resolve: (t, n) => t === "null" || n && t === "" ? null : e, + identify: (e) => e === null, + represent: () => "null" +}), c = [ + "", + "~", + "null", + "Null", + "NULL" +], l = t("tag:yaml.org,2002:null", { + implicit: !0, + implicitFirstChars: [ + "", + "~", + "n", + "N" + ], + resolve: (t) => c.indexOf(t) === -1 ? e : null, + identify: (e) => e === null, + represent: () => "null" +}), u = [ + "true", + "True", + "TRUE" +], d = [ + "false", + "False", + "FALSE" +], f = t("tag:yaml.org,2002:bool", { + implicit: !0, + implicitFirstChars: [ + "t", + "T", + "f", + "F" + ], + resolve: (t) => u.indexOf(t) === -1 ? d.indexOf(t) === -1 ? e : !1 : !0, + identify: (e) => Object.prototype.toString.call(e) === "[object Boolean]", + represent: (e) => e ? "true" : "false" +}), p = ["true"], m = ["false"], h = t("tag:yaml.org,2002:bool", { + implicit: !0, + implicitFirstChars: ["t", "f"], + resolve: (t) => p.indexOf(t) === -1 ? m.indexOf(t) === -1 ? e : !1 : !0, + identify: (e) => Object.prototype.toString.call(e) === "[object Boolean]", + represent: (e) => e ? "true" : "false" +}), ee = [ + "true", + "True", + "TRUE", + "y", + "Y", + "yes", + "Yes", + "YES", + "on", + "On", + "ON" +], te = [ + "false", + "False", + "FALSE", + "n", + "N", + "no", + "No", + "NO", + "off", + "Off", + "OFF" +], ne = t("tag:yaml.org,2002:bool", { + implicit: !0, + implicitFirstChars: [ + "y", + "Y", + "n", + "N", + "t", + "T", + "f", + "F", + "o", + "O" + ], + resolve: (t) => ee.indexOf(t) === -1 ? te.indexOf(t) === -1 ? e : !1 : !0, + identify: (e) => Object.prototype.toString.call(e) === "[object Boolean]", + represent: (e) => e ? "true" : "false" +}), re = /* @__PURE__ */ RegExp("^(?:0o[0-7]+|0x[0-9a-fA-F]+|[-+]?[0-9]+)$"), ie = /* @__PURE__ */ RegExp("^(?:[-+]?0b[0-1]+|[-+]?0o[0-7]+|[-+]?0x[0-9a-fA-F]+|[-+]?[0-9]+)$"); +function ae(e) { + let t = e, n = 1; + return (t[0] === "-" || t[0] === "+") && (t[0] === "-" && (n = -1), t = t.slice(1)), t.startsWith("0b") ? n * parseInt(t.slice(2), 2) : t.startsWith("0o") ? n * parseInt(t.slice(2), 8) : t.startsWith("0x") ? n * parseInt(t.slice(2), 16) : n * parseInt(t, 10); +} +function oe(t, n) { + if (n) { + if (!ie.test(t)) return e; + } else if (!re.test(t)) return e; + let r = ae(t); + return Number.isFinite(r) ? r : e; +} +var se = t("tag:yaml.org,2002:int", { + implicit: !0, + implicitFirstChars: [ + "-", + "+", + ..."0123456789" + ], + resolve: oe, + identify: (e) => Number.isInteger(e) && !Object.is(e, -0) && e.toString(10).indexOf("e") < 0, + represent: (e) => e.toString(10) +}), ce = /* @__PURE__ */ RegExp("^-?(?:0|[1-9][0-9]*)$"), le = /* @__PURE__ */ RegExp("^(?:[-+]?0b[0-1]+|[-+]?0o[0-7]+|[-+]?0x[0-9a-fA-F]+|[-+]?[0-9]+)$"); +function ue(e) { + let t = e, n = 1; + return (t[0] === "-" || t[0] === "+") && (t[0] === "-" && (n = -1), t = t.slice(1)), t.startsWith("0b") ? n * parseInt(t.slice(2), 2) : t.startsWith("0o") ? n * parseInt(t.slice(2), 8) : t.startsWith("0x") ? n * parseInt(t.slice(2), 16) : n * parseInt(t, 10); +} +function de(t, n) { + if (n) { + if (!le.test(t)) return e; + } else if (!ce.test(t)) return e; + let r = ue(t); + return Number.isFinite(r) ? r : e; +} +var fe = t("tag:yaml.org,2002:int", { + implicit: !0, + implicitFirstChars: ["-", ..."0123456789"], + resolve: de, + identify: (e) => Number.isInteger(e) && !Object.is(e, -0) && e.toString(10).indexOf("e") < 0, + represent: (e) => e.toString(10) +}), pe = /* @__PURE__ */ RegExp("^(?:[-+]?0b[0-1_]+|[-+]?0[0-7_]+|[-+]?0x[0-9a-fA-F_]+|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+|[-+]?(?:0|[1-9][0-9_]*))$"); +function me(e) { + let t = e.replace(/_/g, ""), n = 1; + if ((t[0] === "-" || t[0] === "+") && (t[0] === "-" && (n = -1), t = t.slice(1)), t.startsWith("0b")) return n * parseInt(t.slice(2), 2); + if (t.startsWith("0x")) return n * parseInt(t.slice(2), 16); + if (t.includes(":")) { + let e = 0; + for (let n of t.split(":")) e = e * 60 + Number(n); + return n * e; + } + return t !== "0" && t[0] === "0" ? n * parseInt(t, 8) : n * parseInt(t, 10); +} +function he(t) { + if (!pe.test(t)) return e; + let n = me(t); + return Number.isFinite(n) ? n : e; +} +var g = t("tag:yaml.org,2002:int", { + implicit: !0, + implicitFirstChars: [ + "-", + "+", + ..."0123456789" + ], + resolve: he, + identify: (e) => Number.isInteger(e) && !Object.is(e, -0) && e.toString(10).indexOf("e") < 0, + represent: (e) => e.toString(10) +}), ge = /* @__PURE__ */ RegExp("^(?:[-+]?[0-9]+(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|[-+]?\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"), _e = /* @__PURE__ */ RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"); +function ve(t) { + if (!ge.test(t)) return e; + let n = t.toLowerCase(), r = n[0] === "-" ? -1 : 1; + if ("+-".includes(n[0]) && (n = n.slice(1)), n === ".inf") return r === 1 ? Infinity : -Infinity; + if (n === ".nan") return NaN; + let i = r * parseFloat(n); + return Number.isFinite(i) || _e.test(t) ? i : e; +} +function ye(e) { + if (isNaN(e)) return ".nan"; + if (e === Infinity) return ".inf"; + if (e === -Infinity) return "-.inf"; + if (Object.is(e, -0)) return "-0.0"; + let t = e.toString(10); + return /^[-+]?[0-9]+e/.test(t) ? t.replace("e", ".e") : t; +} +var be = t("tag:yaml.org,2002:float", { + implicit: !0, + implicitFirstChars: [ + "-", + "+", + ".", + ..."0123456789" + ], + resolve: ve, + identify: (e) => typeof e == "number" && (!Number.isInteger(e) || Object.is(e, -0) || e.toString(10).indexOf("e") >= 0), + represent: ye +}), xe = /* @__PURE__ */ RegExp("^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$"), Se = /* @__PURE__ */ RegExp("^(?:[-+]?[0-9]+(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|[-+]?\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"); +function Ce(t, n) { + if (n) { + if (!Se.test(t)) return e; + let n = t.toLowerCase(), r = n[0] === "-" ? -1 : 1; + if ("+-".includes(n[0]) && (n = n.slice(1)), n === ".inf") return r === 1 ? Infinity : -Infinity; + if (n === ".nan") return NaN; + let i = r * parseFloat(n); + return Number.isFinite(i) ? i : e; + } + if (!xe.test(t)) return e; + let r = Number(t); + return Number.isFinite(r) ? r : e; +} +function we(e) { + if (isNaN(e)) return ".nan"; + if (e === Infinity) return ".inf"; + if (e === -Infinity) return "-.inf"; + if (Object.is(e, -0)) return "-0.0"; + let t = e.toString(10); + return /^[-+]?[0-9]+e/.test(t) ? t.replace("e", ".e") : t; +} +var Te = t("tag:yaml.org,2002:float", { + implicit: !0, + implicitFirstChars: ["-", ..."0123456789"], + resolve: Ce, + identify: (e) => typeof e == "number" && (!Number.isInteger(e) || Object.is(e, -0) || e.toString(10).indexOf("e") >= 0), + represent: we +}), Ee = /* @__PURE__ */ RegExp("^(?:[-+]?(?:(?:[0-9][0-9_]*)?\\.[0-9_]*)(?:[eE][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"), De = /* @__PURE__ */ RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"); +function Oe(t) { + if (!Ee.test(t)) return e; + let n = t.toLowerCase().replace(/_/g, ""), r = n[0] === "-" ? -1 : 1; + if ("+-".includes(n[0]) && (n = n.slice(1)), n === ".inf") return r === 1 ? Infinity : -Infinity; + if (n === ".nan") return NaN; + let i = 0; + if (n.includes(":")) { + for (let e of n.split(":")) i = i * 60 + Number(e); + i *= r; + } else i = r * parseFloat(n); + return Number.isFinite(i) || De.test(t) ? i : e; +} +function ke(e) { + if (isNaN(e)) return ".nan"; + if (e === Infinity) return ".inf"; + if (e === -Infinity) return "-.inf"; + if (Object.is(e, -0)) return "-0.0"; + let t = e.toString(10); + return /^[-+]?[0-9]+e/.test(t) ? t.replace("e", ".e") : t; +} +var _ = t("tag:yaml.org,2002:float", { + implicit: !0, + implicitFirstChars: [ + "-", + "+", + ".", + ..."0123456789" + ], + resolve: Oe, + identify: (e) => typeof e == "number" && (!Number.isInteger(e) || Object.is(e, -0) || e.toString(10).indexOf("e") >= 0), + represent: ke +}), Ae = t("tag:yaml.org,2002:merge", { + implicit: !0, + implicitFirstChars: ["<"], + resolve: (t, n) => t === "<<" || n && t === "" ? "<<" : e, + identify: () => !1 +}), je = /^[A-Za-z0-9+/]*={0,2}$/; +function Me(t) { + let n = t.replace(/\s/g, ""); + if (n.length % 4 != 0 || !je.test(n)) return e; + let r = atob(n), i = new Uint8Array(r.length); + for (let e = 0; e < r.length; e++) i[e] = r.charCodeAt(e); + return i; +} +function Ne(e) { + let t = ""; + for (let n = 0; n < e.length; n++) t += String.fromCharCode(e[n]); + return btoa(t); +} +var Pe = t("tag:yaml.org,2002:binary", { + resolve: Me, + identify: (e) => Object.prototype.toString.call(e) === "[object Uint8Array]", + represent: Ne +}), Fe = /* @__PURE__ */ RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"), Ie = /* @__PURE__ */ RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$"); +function Le(e, t, n, r = 0, i = 0, a = 0, o = 0) { + let s = new Date(Date.UTC(e, t, n, r, i, a, o)); + return s.setUTCFullYear(e, t, n), s; +} +function Re(t) { + let n = Fe.exec(t); + if (n === null && (n = Ie.exec(t)), n === null) return e; + let r = +n[1], i = n[2] - 1, a = +n[3]; + if (!n[4]) { + let t = Le(r, i, a); + return t.getUTCFullYear() !== r || t.getUTCMonth() !== i || t.getUTCDate() !== a ? e : t; + } + let o = +n[4], s = +n[5], c = +n[6], l = 0; + if (o > 23 || s > 59 || c > 59) return e; + if (n[7]) { + let e = n[7].slice(0, 3); + for (; e.length < 3;) e += "0"; + l = +e; + } + let u = Le(r, i, a, o, s, c, l); + if (u.getUTCFullYear() !== r || u.getUTCMonth() !== i || u.getUTCDate() !== a) return e; + if (n[9]) { + let t = +n[10], r = +(n[11] || 0); + if (t > 23 || r > 59) return e; + let i = (t * 60 + r) * 6e4; + u.setTime(u.getTime() - (n[9] === "-" ? -i : i)); + } + return u; +} +var ze = t("tag:yaml.org,2002:timestamp", { + implicit: !0, + implicitFirstChars: [..."0123456789"], + resolve: Re, + identify: (e) => e instanceof Date, + represent: (e) => e.toISOString() +}), Be = n("tag:yaml.org,2002:seq", { + create: () => [], + addItem: (e, t) => { + e.push(t); + }, + identify: Array.isArray +}); +//#endregion +//#region src/common/object.ts +function v(e) { + if (typeof e != "object" || !e || Array.isArray(e)) return !1; + let t = Object.getPrototypeOf(e); + return t === null || t === Object.prototype; +} +function Ve(e, t) { + let n = {}; + for (let r of t) e[r] !== void 0 && (n[r] = e[r]); + return n; +} +//#endregion +//#region src/tag/sequence/omap.ts +var He = n("tag:yaml.org,2002:omap", { + create: () => ({ + list: [], + seen: /* @__PURE__ */ new Set() + }), + addItem: (e, t) => { + let n; + if (t instanceof Map) { + if (t.size !== 1) return "cannot resolve an ordered map item"; + n = t.keys().next().value; + } else if (v(t)) { + let e = Object.keys(t); + if (e.length !== 1) return "cannot resolve an ordered map item"; + n = e[0]; + } else return "cannot resolve an ordered map item"; + return e.seen.has(n) ? "duplicate key in ordered map" : (e.seen.add(n), e.list.push(t), ""); + }, + finalize: (e) => e.list, + identify: () => !1 +}), Ue = n("tag:yaml.org,2002:pairs", { + create: () => [], + addItem: (e, t) => { + if (t instanceof Map) return t.size === 1 ? (e.push(t.entries().next().value), "") : "cannot resolve a pairs item"; + if (Object.prototype.toString.call(t) !== "[object Object]") return "cannot resolve a pairs item"; + let n = t, r = Object.keys(n); + return r.length === 1 ? (e.push([r[0], n[r[0]]]), "") : "cannot resolve a pairs item"; + }, + identify: () => !1 +}), We = r("tag:yaml.org,2002:map", { + create: () => ({}), + identify: v, + represent: (e) => { + let t = /* @__PURE__ */ new Map(); + for (let n of Object.keys(e)) t.set(n, e[n]); + return t; + }, + addPair: (e, t, n) => { + if (typeof t == "object" && t) return "object-based map does not support complex keys"; + let r = String(t); + return r === "__proto__" ? Object.defineProperty(e, r, { + value: n, + enumerable: !0, + configurable: !0, + writable: !0 + }) : e[r] = n, ""; + }, + has: (e, t) => typeof t == "object" && t ? !1 : Object.prototype.hasOwnProperty.call(e, String(t)), + keys: (e) => Object.keys(e), + get: (e, t) => { + let n = String(t); + return Object.prototype.hasOwnProperty.call(e, n) ? e[n] : null; + } +}), Ge = r("tag:yaml.org,2002:set", { + create: () => /* @__PURE__ */ new Set(), + identify: (e) => e instanceof Set, + represent: (e) => { + let t = /* @__PURE__ */ new Map(); + for (let n of e) t.set(n, null); + return t; + }, + addPair: (e, t, n) => n === null ? (e.add(t), "") : "cannot resolve a set item", + has: (e, t) => e.has(t), + keys: (e) => e.keys(), + get: () => null +}); +//#endregion +//#region \0@oxc-project+runtime@0.137.0/helpers/esm/typeof.js +function y(e) { + "@babel/helpers - typeof"; + return y = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) { + return typeof e; + } : function(e) { + return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e; + }, y(e); +} +//#endregion +//#region \0@oxc-project+runtime@0.137.0/helpers/esm/toPrimitive.js +function Ke(e, t) { + if (y(e) != "object" || !e) return e; + var n = e[Symbol.toPrimitive]; + if (n !== void 0) { + var r = n.call(e, t || "default"); + if (y(r) != "object") return r; + throw TypeError("@@toPrimitive must return a primitive value."); + } + return (t === "string" ? String : Number)(e); +} +//#endregion +//#region \0@oxc-project+runtime@0.137.0/helpers/esm/toPropertyKey.js +function qe(e) { + var t = Ke(e, "string"); + return y(t) == "symbol" ? t : t + ""; +} +//#endregion +//#region \0@oxc-project+runtime@0.137.0/helpers/esm/defineProperty.js +function b(e, t, n) { + return (t = qe(t)) in e ? Object.defineProperty(e, t, { + value: n, + enumerable: !0, + configurable: !0, + writable: !0 + }) : e[t] = n, e; +} +//#endregion +//#region \0@oxc-project+runtime@0.137.0/helpers/esm/objectSpread2.js +function Je(e, t) { + var n = Object.keys(e); + if (Object.getOwnPropertySymbols) { + var r = Object.getOwnPropertySymbols(e); + t && (r = r.filter(function(t) { + return Object.getOwnPropertyDescriptor(e, t).enumerable; + })), n.push.apply(n, r); + } + return n; +} +function x(e) { + for (var t = 1; t < arguments.length; t++) { + var n = arguments[t] == null ? {} : arguments[t]; + t % 2 ? Je(Object(n), !0).forEach(function(t) { + b(e, t, n[t]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Je(Object(n)).forEach(function(t) { + Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t)); + }); + } + return e; +} +//#endregion +//#region src/schema.ts +function Ye() { + return { + scalar: Object.create(null), + sequence: Object.create(null), + mapping: Object.create(null) + }; +} +function Xe() { + return { + scalar: [], + sequence: [], + mapping: [] + }; +} +function Ze(e) { + let t = []; + for (let n of e) { + let e = t.length; + for (let r = 0; r < t.length; r++) { + let i = t[r]; + if (i.nodeKind === n.nodeKind && i.tagName === n.tagName && i.matchByTagPrefix === n.matchByTagPrefix) { + e = r; + break; + } + } + t[e] = n; + } + return t; +} +var S = class t { + constructor(e) { + b(this, "tags", void 0), b(this, "implicitScalarTags", void 0), b(this, "implicitScalarByFirstChar", void 0), b(this, "implicitScalarAnyFirstChar", void 0), b(this, "defaultScalarTag", void 0), b(this, "defaultSequenceTag", void 0), b(this, "defaultMappingTag", void 0), b(this, "exact", void 0), b(this, "prefix", void 0); + let t = Ze(e), n = [], r = Ye(), i = Xe(); + for (let e of t) { + if (e.nodeKind === "scalar" && e.implicit) { + if (e.matchByTagPrefix) throw Error("Implicit scalar tags cannot match by tag prefix"); + n.push(e); + } + switch (e.nodeKind) { + case "scalar": + e.matchByTagPrefix ? i.scalar.push(e) : r.scalar[e.tagName] = e; + break; + case "sequence": + e.matchByTagPrefix ? i.sequence.push(e) : r.sequence[e.tagName] = e; + break; + case "mapping": + e.matchByTagPrefix ? i.mapping.push(e) : r.mapping[e.tagName] = e; + break; + } + } + let a = n.filter((e) => e.implicitFirstChars === null), o = /* @__PURE__ */ new Set(); + for (let e of n) if (e.implicitFirstChars !== null) for (let t of e.implicitFirstChars) o.add(t); + let s = /* @__PURE__ */ new Map(); + for (let e of o) s.set(e, n.filter((t) => t.implicitFirstChars === null || t.implicitFirstChars.indexOf(e) !== -1)); + let c = r.scalar["tag:yaml.org,2002:str"]; + if (!c) throw Error("schema does not define the default scalar tag (tag:yaml.org,2002:str)"); + this.tags = t, this.implicitScalarTags = n, this.implicitScalarByFirstChar = s, this.implicitScalarAnyFirstChar = a, this.defaultScalarTag = c, this.defaultSequenceTag = r.sequence["tag:yaml.org,2002:seq"], this.defaultMappingTag = r.mapping["tag:yaml.org,2002:map"], this.exact = r, this.prefix = i; + } + lookupScalarTag(e) { + let t = this.exact.scalar[e]; + if (t) return t; + for (let t of this.prefix.scalar) if (e.startsWith(t.tagName)) return t; + } + lookupSequenceTag(e) { + let t = this.exact.sequence[e]; + if (t) return t; + for (let t of this.prefix.sequence) if (e.startsWith(t.tagName)) return t; + } + lookupMappingTag(e) { + let t = this.exact.mapping[e]; + if (t) return t; + for (let t of this.prefix.mapping) if (e.startsWith(t.tagName)) return t; + } + resolveImplicitScalarTag(t) { + var n; + let r = (n = this.implicitScalarByFirstChar.get(t.charAt(0))) == null ? this.implicitScalarAnyFirstChar : n; + for (let n of r) { + let r = n.resolve(t, !1, n.tagName); + if (r !== e) return { + value: r, + tag: n + }; + } + let i = this.defaultScalarTag; + return { + value: i.resolve(t, !1, i.tagName), + tag: i + }; + } + withTags(...e) { + let n = []; + for (let t of e) n = n.concat(t); + return new t([...this.tags, ...n]); + } +}, C = new S([ + i, + Be, + We +]), Qe = new S([ + ...C.tags, + s, + h, + fe, + Te +]), $e = new S([ + ...C.tags, + o, + f, + se, + be +]), et = new S([ + ...C.tags, + l, + ne, + g, + _, + ze, + Ae, + Pe, + He, + Ue, + Ge +]), tt = et.withTags(x(x({}, g), {}, { resolve: (t, n, r) => { + let i = g.resolve(t, n, r); + return i === e ? se.resolve(t, n, r) : i; +} }), x(x({}, _), {}, { resolve: (t, n, r) => { + let i = _.resolve(t, n, r); + return i === e ? be.resolve(t, n, r) : i; +} })), nt = r("tag:yaml.org,2002:map", { + create: () => /* @__PURE__ */ new Map(), + addPair: (e, t, n) => (e.set(t, n), ""), + has: (e, t) => e.has(t), + keys: (e) => e.keys(), + get: (e, t) => e.get(t), + identify: (e) => e instanceof Map || v(e), + represent: (e) => { + if (e instanceof Map) return e; + let t = /* @__PURE__ */ new Map(), n = e; + for (let e of Object.keys(n)) t.set(e, n[e]); + return t; + } +}); +//#endregion +//#region src/tag/mapping/legacy_map.ts +function rt(e) { + if (Array.isArray(e)) { + let t = Array.prototype.slice.call(e); + for (let e = 0; e < t.length; e++) { + if (Array.isArray(t[e])) return null; + typeof t[e] == "object" && Object.prototype.toString.call(t[e]) === "[object Object]" && (t[e] = "[object Object]"); + } + return String(t); + } + return typeof e == "object" && Object.prototype.toString.call(e) === "[object Object]" ? "[object Object]" : String(e); +} +var it = r("tag:yaml.org,2002:map", { + create: () => ({}), + identify: v, + represent: (e) => { + let t = /* @__PURE__ */ new Map(); + for (let n of Object.keys(e)) t.set(n, e[n]); + return t; + }, + addPair: (e, t, n) => { + let r = rt(t); + return r === null ? "nested arrays are not supported inside keys" : (r === "__proto__" ? Object.defineProperty(e, r, { + value: n, + enumerable: !0, + configurable: !0, + writable: !0 + }) : e[r] = n, ""); + }, + has: (e, t) => { + let n = rt(t); + return n !== null && Object.prototype.hasOwnProperty.call(e, n); + }, + keys: (e) => Object.keys(e), + get: (e, t) => { + let n = String(t); + return Object.prototype.hasOwnProperty.call(e, n) ? e[n] : null; + } +}), at = { + maxLength: 79, + indent: 1, + linesBefore: 3, + linesAfter: 2 +}; +function ot(e, t, n, r, i) { + let a = "", o = "", s = Math.floor(i / 2) - 1; + return r - t > s && (a = " ... ", t = r - s + a.length), n - r > s && (o = " ...", n = r + s - o.length), { + str: a + e.slice(t, n).replace(/\t/g, "→") + o, + pos: r - t + a.length + }; +} +function st(e, t) { + return " ".repeat(Math.max(t - e.length, 0)) + e; +} +function ct(e, t) { + if (!e.buffer) return null; + let n = x(x({}, at), t), r = /\r?\n|\r|\0/g, i = [0], a = [], o, s = -1; + for (; o = r.exec(e.buffer);) a.push(o.index), i.push(o.index + o[0].length), e.position <= o.index && s < 0 && (s = i.length - 2); + s < 0 && (s = i.length - 1); + let c = "", l = Math.min(e.line + n.linesAfter, a.length).toString().length, u = n.maxLength - (n.indent + l + 3); + for (let t = 1; t <= n.linesBefore && !(s - t < 0); t++) { + let r = ot(e.buffer, i[s - t], a[s - t], e.position - (i[s] - i[s - t]), u); + c = `${" ".repeat(n.indent)}${st((e.line - t + 1).toString(), l)} | ${r.str}\n${c}`; + } + let d = ot(e.buffer, i[s], a[s], e.position, u); + c += `${" ".repeat(n.indent)}${st((e.line + 1).toString(), l)} | ${d.str}\n`, c += `${"-".repeat(n.indent + l + 3 + d.pos)}^\n`; + for (let t = 1; t <= n.linesAfter && !(s + t >= a.length); t++) { + let r = ot(e.buffer, i[s + t], a[s + t], e.position - (i[s] - i[s + t]), u); + c += `${" ".repeat(n.indent)}${st((e.line + t + 1).toString(), l)} | ${r.str}\n`; + } + return c.replace(/\n$/, ""); +} +//#endregion +//#region src/common/exception.ts +function lt(e, t) { + let n = ""; + return e.mark ? (e.mark.name && (n += `in "${e.mark.name}" `), n += `(${e.mark.line + 1}:${e.mark.column + 1})`, !t && e.mark.snippet && (n += `\n\n${e.mark.snippet}`), `${e.reason} ${n}`) : e.reason; +} +var w = class e extends Error { + constructor(e, t) { + super(), b(this, "reason", void 0), b(this, "mark", void 0), this.name = "YAMLException", this.reason = e, this.mark = t, this.message = lt(this, !1), Error.captureStackTrace && Error.captureStackTrace(this, this.constructor); + } + toString(e) { + return `${this.name}: ${lt(this, e)}`; + } + static throwAt(t, n, r, i = "") { + let a = 0, o = 0; + for (let e = 0; e < n; e++) { + let n = t.charCodeAt(e); + n === 10 ? (a++, o = e + 1) : n === 13 && (a++, t.charCodeAt(e + 1) === 10 && e++, o = e + 1); + } + let s = { + name: i, + buffer: t, + position: n, + line: a, + column: n - o + }; + throw s.snippet = ct(s), new e(r, s); + } +}, T = { + DOCUMENT: 1, + SEQUENCE: 2, + MAPPING: 3, + SCALAR: 4, + ALIAS: 5, + POP: 6 +}, E = { + PLAIN: 1, + SINGLE_QUOTED: 2, + DOUBLE_QUOTED: 3, + LITERAL_BLOCK: 4, + FOLDED_BLOCK: 5 +}, D = { + BLOCK: 1, + FLOW: 2 +}, O = { + CLIP: 1, + STRIP: 2, + KEEP: 3 +}, ut = -1; +function dt(e) { + switch (e) { + case 48: return "\0"; + case 97: return "\x07"; + case 98: return "\b"; + case 116: return " "; + case 9: return " "; + case 110: return "\n"; + case 118: return "\v"; + case 102: return "\f"; + case 114: return "\r"; + case 101: return "\x1B"; + case 32: return " "; + case 34: return "\""; + case 47: return "/"; + case 92: return "\\"; + case 78: return "…"; + case 95: return "\xA0"; + case 76: return "\u2028"; + case 80: return "\u2029"; + default: return ""; + } +} +var ft = Array(256), pt = Array(256); +for (let e = 0; e < 256; e++) ft[e] = +!!dt(e), pt[e] = dt(e); +function mt(e) { + return e <= 65535 ? String.fromCharCode(e) : String.fromCharCode((e - 65536 >> 10) + 55296, (e - 65536 & 1023) + 56320); +} +function ht(e) { + return e >= 48 && e <= 57 ? e - 48 : (e | 32) - 97 + 10; +} +function gt(e) { + return e === 120 ? 2 : e === 117 ? 4 : 8; +} +function _t(e, t, n) { + let r = 0; + for (; t < n;) { + let n = e.charCodeAt(t); + if (n === 10) r++, t++; + else if (n === 13) r++, t++, e.charCodeAt(t) === 10 && t++; + else if (n === 32 || n === 9) t++; + else break; + } + return { + position: t, + breaks: r + }; +} +function vt(e) { + return e === 1 ? " " : "\n".repeat(e - 1); +} +function yt(e, t, n) { + let r = "", i = t, a = t, o = t; + for (; i < n;) { + let t = e.charCodeAt(i); + if (t === 10 || t === 13) { + r += e.slice(a, o); + let t = _t(e, i, n); + r += vt(t.breaks), i = a = o = t.position; + } else i++, t !== 32 && t !== 9 && (o = i); + } + return r + e.slice(a, o); +} +function bt(e, t, n) { + let r = "", i = t, a = t, o = t; + for (; i < n;) { + let t = e.charCodeAt(i); + if (t === 39) r += e.slice(a, i) + "'", i += 2, a = o = i; + else if (t === 10 || t === 13) { + r += e.slice(a, o); + let t = _t(e, i, n); + r += vt(t.breaks), i = a = o = t.position; + } else i++, t !== 32 && t !== 9 && (o = i); + } + return r + e.slice(a, n); +} +function xt(e, t, n) { + let r = "", i = t, a = t, o = t; + for (; i < n;) { + let t = e.charCodeAt(i); + if (t === 92) { + r += e.slice(a, i), i++; + let t = e.charCodeAt(i); + if (t === 10 || t === 13) i = _t(e, i, n).position; + else if (t < 256 && ft[t]) r += pt[t], i++; + else { + let n = gt(t), a = 0; + for (; n > 0; n--) { + i++; + let t = ht(e.charCodeAt(i)); + a = (a << 4) + t; + } + r += mt(a), i++; + } + a = o = i; + } else if (t === 10 || t === 13) { + r += e.slice(a, o); + let t = _t(e, i, n); + r += vt(t.breaks), i = a = o = t.position; + } else i++, t !== 32 && t !== 9 && (o = i); + } + return r + e.slice(a, n); +} +function St(e, t, n, r, i, a) { + let o = r < 0 ? 0 : r, s = e.slice(t, n).replace(/\r\n?/g, "\n"), c = s === "" ? [] : (s.endsWith("\n") ? s.slice(0, -1) : s).split("\n"), l = "", u = !1, d = 0, f = !1; + for (let e of c) { + let t = 0; + for (; t < o && e.charCodeAt(t) === 32;) t++; + if (r < 0 || t >= e.length) { + d++; + continue; + } + let n = e.slice(o), i = n.charCodeAt(0); + a ? i === 32 || i === 9 ? (f = !0, l += "\n".repeat(u ? 1 + d : d)) : f ? (f = !1, l += "\n".repeat(d + 1)) : d === 0 ? u && (l += " ") : l += "\n".repeat(d) : l += "\n".repeat(u ? 1 + d : d), l += n, u = !0, d = 0; + } + return i === O.KEEP ? l += "\n".repeat(u ? 1 + d : d) : i !== O.STRIP && u && (l += "\n"), l; +} +function Ct(e, t) { + if (t.valueStart === ut) return ""; + let { valueStart: n, valueEnd: r } = t; + if (t.fast) return e.slice(n, r); + switch (t.style) { + case E.SINGLE_QUOTED: return bt(e, n, r); + case E.DOUBLE_QUOTED: return xt(e, n, r); + case E.LITERAL_BLOCK: return St(e, n, r, t.indent, t.chomping, !1); + case E.FOLDED_BLOCK: return St(e, n, r, t.indent, t.chomping, !0); + default: return yt(e, n, r); + } +} +//#endregion +//#region src/common/tagname.ts +var wt = Object.assign(Object.create(null), { + "!": "!", + "!!": "tag:yaml.org,2002:" +}); +function Tt(e) { + return encodeURI(e).replace(/!/g, "%21"); +} +function Et(e, t) { + var n, r; + if (e.startsWith("!<") && e.endsWith(">")) return decodeURIComponent(e.slice(2, -1)); + let i = e.indexOf("!", 1), a = i === -1 ? "!" : e.slice(0, i + 1), o = (n = (r = t == null ? void 0 : t[a]) == null ? wt[a] : r) == null ? a : n; + return decodeURIComponent(o) + decodeURIComponent(e.slice(a.length)); +} +function Dt(e) { + let t = e; + return t.charCodeAt(0) === 33 ? (t = t.slice(1), `!${Tt(t)}`) : t.slice(0, 18) === "tag:yaml.org,2002:" ? `!!${Tt(t.slice(18))}` : `!<${Tt(t)}>`; +} +//#endregion +//#region src/parser/constructor.ts +var k = -1, Ot = "tag:yaml.org,2002:merge", kt = { + filename: "", + schema: $e, + json: !1, + maxTotalMergeKeys: 1e4, + maxAliases: -1 +}; +function At(e) { + return "tagStart" in e && e.tagStart !== k ? e.tagStart : "anchorStart" in e && e.anchorStart !== k ? e.anchorStart : "valueStart" in e && e.valueStart !== k ? e.valueStart : "start" in e ? e.start : 0; +} +function A(e, t) { + w.throwAt(e.source, e.position, t, e.filename); +} +function jt(e, t, n, r) { + try { + return n.finalize(r); + } catch (n) { + if (n instanceof w) throw n; + w.throwAt(e.source, t, n instanceof Error ? n.message : String(n), e.filename); + } +} +function Mt(t, n) { + let r = Ct(t.source, n), i = n.tagStart === k ? "" : t.source.slice(n.tagStart, n.tagEnd), a = t.schema.defaultScalarTag; + if (i !== "") { + var o; + if (i === "!") return { + value: r, + tag: a + }; + let n = Et(i, t.tagHandlers), s = t.schema.lookupScalarTag(n); + if (s) { + let i = s.resolve(r, !0, n); + return i === e && A(t, `cannot resolve a node with !<${n}> explicit tag`), { + value: i, + tag: s + }; + } + let c = (o = t.schema.lookupMappingTag(n)) == null ? t.schema.lookupSequenceTag(n) : o; + if (c) { + r !== "" && A(t, `cannot resolve a node with !<${n}> explicit tag`); + let e = c.create(n); + return { + value: c.carrierIsResult ? e : jt(t, t.position, c, e), + tag: c + }; + } + A(t, `unknown scalar tag !<${n}>`); + } + return n.style === E.PLAIN ? t.schema.resolveImplicitScalarTag(r) : { + value: a.resolve(r, !1, a.tagName), + tag: a + }; +} +function Nt(e, t, n) { + let r = t.tagStart === k ? "" : e.source.slice(t.tagStart, t.tagEnd); + return r === "" || r === "!" ? n : Et(r, e.tagHandlers); +} +function Pt(e) { + return e.nodeKind === "mapping"; +} +function Ft(e) { + e.totalMergeKeys++, e.maxTotalMergeKeys !== -1 && e.totalMergeKeys > e.maxTotalMergeKeys && A(e, `merge keys exceeded maxTotalMergeKeys (${e.maxTotalMergeKeys})`); +} +function It(e, t, n, r) { + Ft(e); + for (let i of r.keys(n)) { + if (Ft(e), t.tag.has(t.value, i)) continue; + let a = t.tag.addPair(t.value, i, r.get(n, i)); + a && A(e, a), t.overridable != null || (t.overridable = /* @__PURE__ */ new Set()), t.overridable.add(i); + } +} +function Lt(e, t, n, r) { + if (e.position = t.keyPosition, Pt(r)) It(e, t, n, r); + else if (r.nodeKind === "sequence" && Array.isArray(n)) { + n.length > 100 && A(e, "abnormal merge sequence size"); + for (let r of n) { + let n = e.nodeTags.get(r); + n || A(e, "cannot merge mappings; the provided source object is unacceptable"), It(e, t, r, n); + } + } else A(e, "cannot merge mappings; the provided source object is unacceptable"); +} +function Rt(e, t, n, r, i) { + var a, o; + if (e.position = t.keyPosition, t.keyIsMerge) { + Lt(e, t, r, i); + return; + } + !e.json && t.tag.has(t.value, n) && !((a = t.overridable) != null && a.has(n)) && A(e, "duplicated mapping key"); + let s = t.tag.addPair(t.value, n, r); + s && A(e, s), (o = t.overridable) == null || o.delete(n); +} +function zt(e, t, n) { + let r = e.frames[e.frames.length - 1]; + if (r.kind === "document") r.value = t, r.hasValue = !0; + else if (r.kind === "sequence") { + Pt(n) && e.nodeTags.set(t, n); + let i = r.tag.addItem(r.value, t, r.index++); + i && A(e, i); + } else if (r.hasKey) { + let i = r.key; + r.key = void 0, r.hasKey = !1, Rt(e, r, i, t, n); + } else r.key = t, r.keyPosition = e.position, r.hasKey = !0, r.keyIsMerge = n.tagName === Ot; +} +function Bt(e, t, n, r, i) { + if (t.anchorStart !== k) { + let a = { + value: n, + tag: r, + isValueFinal: i + }; + return e.anchors.set(e.source.slice(t.anchorStart, t.anchorEnd), a), a; + } + return null; +} +function Vt(e, t) { + let n = x(x(x({}, kt), t), {}, { + events: e, + documents: [], + eventIndex: 0, + position: 0, + frames: [], + anchors: /* @__PURE__ */ new Map(), + nodeTags: /* @__PURE__ */ new Map(), + tagHandlers: Object.create(null), + totalMergeKeys: 0, + aliasCount: 0 + }); + for (; n.eventIndex < n.events.length;) { + let e = n.events[n.eventIndex++]; + switch (n.position = At(e), e.type) { + case T.DOCUMENT: + n.anchors = /* @__PURE__ */ new Map(), n.nodeTags = /* @__PURE__ */ new Map(), n.aliasCount = 0, n.tagHandlers = Object.create(null); + for (let t of e.directives) t.kind === "tag" && (n.tagHandlers[t.handle] = t.prefix); + n.frames.push({ + kind: "document", + position: n.position, + value: void 0, + hasValue: !1 + }); + break; + case T.SCALAR: { + let { value: t, tag: r } = Mt(n, e); + Bt(n, e, t, r, !0), zt(n, t, r); + break; + } + case T.SEQUENCE: { + let t = Nt(n, e, "tag:yaml.org,2002:seq"), r = n.schema.lookupSequenceTag(t); + r || A(n, `unknown sequence tag !<${t}>`); + let i = r.create(t), a = Bt(n, e, i, r, r.carrierIsResult); + n.frames.push({ + kind: "sequence", + position: n.position, + value: i, + tag: r, + anchor: a, + index: 0 + }); + break; + } + case T.MAPPING: { + let t = Nt(n, e, "tag:yaml.org,2002:map"), r = n.schema.lookupMappingTag(t); + r || A(n, `unknown mapping tag !<${t}>`); + let i = r.create(t), a = Bt(n, e, i, r, r.carrierIsResult); + n.frames.push({ + kind: "mapping", + position: n.position, + value: i, + tag: r, + anchor: a, + key: void 0, + keyPosition: n.position, + hasKey: !1, + keyIsMerge: !1, + overridable: null + }); + break; + } + case T.ALIAS: { + n.maxAliases !== -1 && ++n.aliasCount > n.maxAliases && A(n, `aliases exceeded maxAliases (${n.maxAliases})`); + let t = n.source.slice(e.anchorStart, e.anchorEnd), r = n.anchors.get(t); + r || A(n, `unidentified alias "${t}"`), r.isValueFinal || A(n, `recursive alias "${t}" is not supported for tag ${r.tag.tagName} because it uses finalize()`), zt(n, r.value, r.tag); + break; + } + case T.POP: { + let e = n.frames.pop(); + if (e.kind === "mapping" && e.hasKey && (n.position = e.keyPosition, A(n, "incomplete mapping pair in event stream")), e.kind === "document") n.documents.push(e.value); + else { + let t = e.tag.carrierIsResult ? e.value : jt(n, e.position, e.tag, e.value); + e.anchor && (e.anchor.value = t, e.anchor.isValueFinal = !0), zt(n, t, e.tag); + } + break; + } + } + } + return n.documents; +} +//#endregion +//#region src/parser/parser.ts +var j = -1, Ht = Object.prototype.hasOwnProperty, M = 1, Ut = 2, Wt = 3, Gt = 4, Kt = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, qt = /[,\[\]{}]/, Jt = /^(?:!|!!|![0-9A-Za-z-]+!)$/, Yt = String.raw`(?:%[0-9A-Fa-f]{2}|[0-9A-Za-z\-#;/?:@&=+$,_.!~*'()\[\]])`, Xt = String.raw`(?:%[0-9A-Fa-f]{2}|[0-9A-Za-z\-#;/?:@&=+$.~*'()_])`, Zt = RegExp(`^(?:${Yt})*$`), Qt = RegExp(`^(?:${Xt})+$`), $t = RegExp(`^(?:!(?:${Yt})*|${Xt}(?:${Yt})*)$`), en = { + filename: "", + maxDepth: 100 +}; +function tn(e, t, n) { + e.events.push({ + type: T.DOCUMENT, + explicitStart: t, + explicitEnd: n, + directives: e.directives + }); +} +function nn(e, t, n, r, i, a, o) { + e.events.push({ + type: T.SEQUENCE, + start: t, + anchorStart: n, + anchorEnd: r, + tagStart: i, + tagEnd: a, + style: o + }); +} +function rn(e, t, n, r, i, a, o) { + e.events.push({ + type: T.MAPPING, + start: t, + anchorStart: n, + anchorEnd: r, + tagStart: i, + tagEnd: a, + style: o + }); +} +function an(e, t) { + e.events.splice(t.eventsLength, 0, { + type: T.MAPPING, + start: t.position, + anchorStart: j, + anchorEnd: j, + tagStart: j, + tagEnd: j, + style: D.FLOW + }); +} +function N(e, t, n, r, i, a, o, s, c = O.CLIP, l = -1, u = !1) { + e.events.push({ + type: T.SCALAR, + valueStart: t, + valueEnd: n, + anchorStart: r, + anchorEnd: i, + tagStart: a, + tagEnd: o, + style: s, + chomping: c, + indent: l, + fast: u + }); +} +function on(e, t, n) { + e.events.push({ + type: T.ALIAS, + anchorStart: t, + anchorEnd: n + }); +} +function P(e) { + e.events.push({ type: T.POP }); +} +function F(e) { + N(e, j, j, j, j, j, j, E.PLAIN); +} +function sn() { + return { + anchorStart: j, + anchorEnd: j, + tagStart: j, + tagEnd: j + }; +} +function I(e) { + return { + position: e.position, + line: e.line, + lineStart: e.lineStart, + lineIndent: e.lineIndent, + firstTabInLine: e.firstTabInLine, + eventsLength: e.events.length + }; +} +function L(e, t) { + e.position = t.position, e.line = t.line, e.lineStart = t.lineStart, e.lineIndent = t.lineIndent, e.firstTabInLine = t.firstTabInLine, e.events.length = t.eventsLength; +} +function R(e, t) { + w.throwAt(e.input.slice(0, e.length), e.position, t, e.filename); +} +function z(e) { + return e === 10 || e === 13; +} +function B(e) { + return e === 9 || e === 32; +} +function V(e) { + return B(e) || z(e); +} +function H(e) { + return e === 0 || V(e); +} +function U(e) { + return e === 44 || e === 91 || e === 93 || e === 123 || e === 125; +} +function cn(e) { + return e >= 48 && e <= 57 ? e - 48 : -1; +} +function ln(e) { + if (e >= 48 && e <= 57) return e - 48; + let t = e | 32; + return t >= 97 && t <= 102 ? t - 97 + 10 : -1; +} +function un(e) { + return e === 120 ? 2 : e === 117 ? 4 : e === 85 ? 8 : 0; +} +function dn(e) { + return e === 48 || e === 97 || e === 98 || e === 116 || e === 9 || e === 110 || e === 118 || e === 102 || e === 114 || e === 101 || e === 32 || e === 34 || e === 47 || e === 92 || e === 78 || e === 95 || e === 76 || e === 80; +} +function fn(e) { + e.input.charCodeAt(e.position) === 10 ? e.position++ : (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++), e.line++, e.lineStart = e.position, e.lineIndent = 0, e.firstTabInLine = -1; +} +function W(e, t) { + let n = 0, r = e.input.charCodeAt(e.position), i = e.position === e.lineStart || V(e.input.charCodeAt(e.position - 1)); + for (; r !== 0;) { + for (; B(r);) i = !0, r === 9 && e.firstTabInLine === -1 && (e.firstTabInLine = e.position), r = e.input.charCodeAt(++e.position); + if (t && i && r === 35) do + r = e.input.charCodeAt(++e.position); + while (!z(r) && r !== 0); + if (!z(r)) break; + for (fn(e), n++, i = !0, r = e.input.charCodeAt(e.position); r === 32;) e.lineIndent++, r = e.input.charCodeAt(++e.position); + } + return n; +} +function G(e, t = e.position) { + let n = e.input.charCodeAt(t); + if ((n === 45 || n === 46) && n === e.input.charCodeAt(t + 1) && n === e.input.charCodeAt(t + 2)) { + let n = e.input.charCodeAt(t + 3); + return n === 0 || V(n); + } + return !1; +} +function pn(e) { + e.position === e.lineStart && e.input.charCodeAt(e.position) === 65279 && (e.position++, e.lineStart = e.position); +} +function mn(e) { + if (e.position !== e.lineStart) return !1; + if (G(e)) return !0; + if (e.input.charCodeAt(e.position) !== 65279) return !1; + let t = I(e); + pn(e), W(e, !0); + let n = e.input.charCodeAt(e.position), r = e.position === e.lineStart && (n === 37 || n === 45 && G(e)); + return L(e, t), r; +} +function hn(e) { + let t = e.input.charCodeAt(e.position); + for (; t !== 0 && !z(t);) t = e.input.charCodeAt(++e.position); +} +function gn(e, t, n) { + Kt.test(e.input.slice(t, n)) && R(e, "the stream contains non-printable characters"); +} +function _n(e, t, n) { + if (e.input.charCodeAt(e.position) !== 33) return !1; + t.tagStart !== j && R(e, "duplication of a tag property"); + let r = e.position, i = !1, a = !1, o = "!", s = e.input.charCodeAt(++e.position); + s === 60 ? (i = !0, s = e.input.charCodeAt(++e.position)) : s === 33 && (a = !0, o = "!!", s = e.input.charCodeAt(++e.position)); + let c = e.position, l; + if (i) { + for (; s !== 0 && s !== 62;) s = e.input.charCodeAt(++e.position); + s !== 62 && R(e, "unexpected end of the stream within a verbatim tag"), l = e.input.slice(c, e.position), e.position++; + } else { + for (; s !== 0 && !V(s) && !(n && U(s));) s === 33 && (a ? R(e, "tag suffix cannot contain exclamation marks") : (o = e.input.slice(c - 1, e.position + 1), Jt.test(o) || R(e, "named tag handle cannot contain such characters"), a = !0, c = e.position + 1)), s = e.input.charCodeAt(++e.position); + l = e.input.slice(c, e.position), qt.test(l) && R(e, "tag suffix cannot contain flow indicator characters"); + } + return l && !(i ? Zt.test(l) : Qt.test(l)) && R(e, `tag name cannot contain such characters: ${l}`), !i && o !== "!" && o !== "!!" && !Ht.call(e.tagHandlers, o) && R(e, `undeclared tag handle "${o}"`), t.tagStart = r, t.tagEnd = e.position, !0; +} +function vn(e, t) { + if (e.input.charCodeAt(e.position) !== 38) return !1; + t.anchorStart !== j && R(e, "duplication of an anchor property"), e.position++; + let n = e.position; + for (; e.input.charCodeAt(e.position) !== 0 && !V(e.input.charCodeAt(e.position)) && !U(e.input.charCodeAt(e.position));) e.position++; + return e.position === n && R(e, "name of an anchor node must contain at least one character"), t.anchorStart = n, t.anchorEnd = e.position, !0; +} +function yn(e, t) { + if (e.input.charCodeAt(e.position) !== 42) return !1; + (t.anchorStart !== j || t.tagStart !== j) && R(e, "alias node should not have any properties"), e.position++; + let n = e.position; + for (; e.input.charCodeAt(e.position) !== 0 && !V(e.input.charCodeAt(e.position)) && !U(e.input.charCodeAt(e.position));) e.position++; + return e.position === n && R(e, "name of an alias node must contain at least one character"), on(e, n, e.position), !0; +} +function bn(e, t) { + W(e, !1), e.lineIndent < t && R(e, "deficient indentation"); +} +function xn(e, t, n) { + if (e.input.charCodeAt(e.position) !== 39) return !1; + e.position++; + let r = e.position, i = !0; + for (; e.input.charCodeAt(e.position) !== 0;) { + let a = e.input.charCodeAt(e.position); + if (a === 39) { + if (e.input.charCodeAt(e.position + 1) === 39) { + i = !1, e.position += 2; + continue; + } + let t = e.position; + return e.position++, N(e, r, t, n.anchorStart, n.anchorEnd, n.tagStart, n.tagEnd, E.SINGLE_QUOTED, O.CLIP, -1, i), !0; + } + z(a) ? (i = !1, bn(e, t)) : e.position === e.lineStart && G(e) ? R(e, "unexpected end of the document within a single quoted scalar") : a !== 9 && a < 32 ? R(e, "expected valid JSON character") : e.position++; + } + R(e, "unexpected end of the stream within a single quoted scalar"); +} +function Sn(e, t, n) { + if (e.input.charCodeAt(e.position) !== 34) return !1; + e.position++; + let r = e.position, i = !0; + for (; e.input.charCodeAt(e.position) !== 0;) { + let a = e.input.charCodeAt(e.position); + if (a === 34) { + let t = e.position; + return e.position++, N(e, r, t, n.anchorStart, n.anchorEnd, n.tagStart, n.tagEnd, E.DOUBLE_QUOTED, O.CLIP, -1, i), !0; + } + if (a === 92) { + i = !1; + let n = e.input.charCodeAt(++e.position); + if (z(n)) bn(e, t); + else if (dn(n)) e.position++; + else { + let t = un(n); + for (t === 0 && R(e, "unknown escape sequence"); t-- > 0;) e.position++, ln(e.input.charCodeAt(e.position)) < 0 && R(e, "expected hexadecimal character"); + e.position++; + } + } else z(a) ? (i = !1, bn(e, t)) : e.position === e.lineStart && G(e) ? R(e, "unexpected end of the document within a double quoted scalar") : a !== 9 && a < 32 ? R(e, "expected valid JSON character") : e.position++; + } + R(e, "unexpected end of the stream within a double quoted scalar"); +} +function Cn(e, t, n) { + let r = e.input.charCodeAt(e.position), i = O.CLIP, a = -1, o = !1; + if (r !== 124 && r !== 62) return !1; + let s = r === 124 ? E.LITERAL_BLOCK : E.FOLDED_BLOCK; + for (e.position++; e.input.charCodeAt(e.position) !== 0;) { + let n = e.input.charCodeAt(e.position), r = cn(n); + if (n === 43 || n === 45) i !== O.CLIP && R(e, "repeat of a chomping mode identifier"), i = n === 43 ? O.KEEP : O.STRIP, e.position++; + else if (r >= 0) r === 0 && R(e, "bad explicit indentation width of a block scalar; it cannot be less than one"), o && R(e, "repeat of an indentation width identifier"), a = t + r - 1, o = !0, e.position++; + else break; + } + let c = !1; + for (; B(e.input.charCodeAt(e.position));) c = !0, e.position++; + c && e.input.charCodeAt(e.position) === 35 && hn(e), z(e.input.charCodeAt(e.position)) ? fn(e) : e.input.charCodeAt(e.position) !== 0 && R(e, "a line break is expected"); + let l = o ? a : -1, u = 0, d = e.position, f = e.position; + for (; e.input.charCodeAt(e.position) !== 0;) { + let n = e.position, r = 0; + for (; e.input.charCodeAt(n + r) === 32;) r++; + let i = e.input.charCodeAt(n + r); + if (i === 0) { + l >= 0 ? r > l && (f = n + r) : r > 0 && (f = n + r); + break; + } + if (mn(e)) break; + if (!o && l === -1 && z(i) && (u = Math.max(u, r)), !o && l === -1 && !z(i) && (i === 9 && r < t && (e.position = n + r, R(e, "tab characters must not be used in indentation")), r < u && (e.position = n + r, R(e, "bad indentation of a mapping entry"))), l === -1 && i !== 0 && !z(i) && r < t) { + e.lineIndent = r, e.position = n + r; + break; + } + !o && i !== 0 && !z(i) && l === -1 && (l = r); + let a = l === -1 ? t + 1 : l; + if (i !== 0 && !z(i) && r < a) { + e.lineIndent = r, e.position = n + r; + break; + } + hn(e), f = e.position, z(e.input.charCodeAt(e.position)) && (fn(e), f = e.position); + } + return gn(e, d, f), N(e, d, f, n.anchorStart, n.anchorEnd, n.tagStart, n.tagEnd, s, i, l), !0; +} +function wn(e, t) { + let n = e.input.charCodeAt(e.position), r = t === M; + if (n === 0 || V(n) || n === 35 || n === 38 || n === 42 || n === 33 || n === 124 || n === 62 || n === 39 || n === 34 || n === 37 || n === 64 || n === 96 || r && U(n)) return !1; + if (n === 63 || n === 45) { + let t = e.input.charCodeAt(e.position + 1); + if (H(t) || r && U(t)) return !1; + } + return !0; +} +function Tn(e, t, n, r) { + if (!wn(e, n)) return !1; + let i = e.position, a = e.position, o = e.input.charCodeAt(e.position), s = n === M, c = !1; + for (; o !== 0 && !mn(e);) { + if (o === 58) { + let t = e.input.charCodeAt(e.position + 1); + if (H(t) || s && U(t)) break; + } else if (o === 35) { + if (V(e.input.charCodeAt(e.position - 1))) break; + } else if (s && U(o)) break; + else if (z(o)) { + let n = e.position, r = e.line, i = e.lineStart, a = e.lineIndent; + if (W(e, !1), e.lineIndent >= t) { + c = !0, o = e.input.charCodeAt(e.position); + continue; + } + e.position = n, e.line = r, e.lineStart = i, e.lineIndent = a; + break; + } + B(o) || (a = e.position + 1), o = e.input.charCodeAt(++e.position); + } + return a === i ? !1 : (gn(e, i, a), N(e, i, a, r.anchorStart, r.anchorEnd, r.tagStart, r.tagEnd, E.PLAIN, O.CLIP, -1, !c), !0); +} +function K(e, t) { + let n = e.line; + W(e, !0), (e.line > n && e.lineIndent < t || e.firstTabInLine !== -1 && e.lineIndent < t) && R(e, "deficient indentation"); +} +function En(e, t, n) { + let r = e.input.charCodeAt(e.position), i = r === 123, a = e.position, o = !0; + if (r !== 91 && r !== 123) return !1; + let s = i ? 125 : 93; + for (i ? rn(e, a, n.anchorStart, n.anchorEnd, n.tagStart, n.tagEnd, D.FLOW) : nn(e, a, n.anchorStart, n.anchorEnd, n.tagStart, n.tagEnd, D.FLOW), e.position++; e.input.charCodeAt(e.position) !== 0;) { + K(e, t); + let n = e.input.charCodeAt(e.position); + if (n === s) return e.position++, P(e), !0; + o ? n === 44 && R(e, "expected the node content, but found ','") : R(e, "missed comma between flow collection entries"); + let r = !1, a = !1; + n === 63 && V(e.input.charCodeAt(e.position + 1)) && (r = a = !0, e.position += 1, K(e, t)); + let c = e.line, l = I(e), u = q(e, t, M, !1, !0); + K(e, t), n = e.input.charCodeAt(e.position), (i || a || e.line === c) && n === 58 ? (r = !0, e.position++, K(e, t), i || an(e, l), u || F(e), q(e, t, M, !1, !0) || F(e), K(e, t), i || P(e)) : i && r ? (u || F(e), F(e)) : i ? F(e) : r && (an(e, l), u || F(e), F(e), P(e)), n = e.input.charCodeAt(e.position), n === 44 ? (o = !0, e.position++) : o = !1; + } + R(e, "unexpected end of the stream within a flow collection"); +} +function Dn(e, t, n) { + if (e.firstTabInLine !== -1 || e.input.charCodeAt(e.position) !== 45 || !H(e.input.charCodeAt(e.position + 1))) return !1; + for (nn(e, e.position, n.anchorStart, n.anchorEnd, n.tagStart, n.tagEnd, D.BLOCK); e.input.charCodeAt(e.position) === 45 && H(e.input.charCodeAt(e.position + 1));) { + e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, R(e, "tab characters must not be used in indentation")); + let n = e.line; + e.position++; + let r = W(e, !0) > 0; + if (e.firstTabInLine !== -1 && e.input.charCodeAt(e.position) === 45 && H(e.input.charCodeAt(e.position + 1)) && R(e, "bad indentation of a sequence entry"), r && e.lineIndent <= t ? F(e) : q(e, t, Wt, !1, !0), W(e, !0), e.lineIndent < t || e.position >= e.length) break; + e.lineIndent > t && R(e, "bad indentation of a sequence entry"), e.line === n && e.input.charCodeAt(e.position) === 45 && H(e.input.charCodeAt(e.position + 1)) && R(e, "bad indentation of a sequence entry"); + } + return P(e), !0; +} +function On(e, t, n, r) { + let i = !1, a = !1, o = !1, s = !1; + if (e.firstTabInLine !== -1) return !1; + let c = e.input.charCodeAt(e.position); + for (; c !== 0;) { + !i && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, R(e, "tab characters must not be used in indentation")); + let l = e.input.charCodeAt(e.position + 1), u = e.line; + if ((c === 63 || c === 58) && H(l)) o || (rn(e, e.position, r.anchorStart, r.anchorEnd, r.tagStart, r.tagEnd, D.BLOCK), o = !0), c === 63 ? (i && F(e), a = !0, i = !0) : i ? i = !1 : (F(e), a = !0, i = !1), e.position += 1, s = !0; + else { + i && (F(e), i = !1); + let t = I(e); + if (!q(e, n, Ut, !1, !0)) break; + if (e.line === u) { + for (c = e.input.charCodeAt(e.position); B(c);) c = e.input.charCodeAt(++e.position); + if (c === 58) { + if (c = e.input.charCodeAt(++e.position), H(c) || R(e, "a whitespace character is expected after the key-value separator within a block mapping"), !o) { + for (L(e, t), rn(e, t.position, r.anchorStart, r.anchorEnd, r.tagStart, r.tagEnd, D.BLOCK), o = !0, q(e, n, Ut, !1, !0), c = e.input.charCodeAt(e.position); B(c);) c = e.input.charCodeAt(++e.position); + e.position++; + } + a = !0, i = !1, s = !1; + } else if (a) R(e, "expected ':' after a mapping key"); + else return r.anchorStart !== j || r.tagStart !== j ? (L(e, t), !1) : !0; + } else if (a) R(e, "can not read a block mapping entry; a multiline key may not be an implicit key"); + else return r.anchorStart !== j || r.tagStart !== j ? (L(e, t), !1) : !0; + } + if (q(e, t, Gt, !0, s) && (s = !1), i || s && (F(e), s = !1), W(e, !0), c = e.input.charCodeAt(e.position), (e.line === u || e.lineIndent > t) && c !== 0) R(e, "bad indentation of a mapping entry"); + else if (e.lineIndent < t) break; + } + return a ? (i && F(e), o && P(e), !0) : !1; +} +function q(e, t, n, r, i, a = !0) { + e.depth >= e.maxDepth && R(e, `nesting exceeded maxDepth (${e.maxDepth})`), e.depth++; + let o = 1, s = !1, c = !1, l = null, u = sn(), d = n === Gt || n === Wt, f = d, p = d; + if (r && W(e, !0) && (s = !0, o = e.lineIndent > t ? 1 : e.lineIndent === t ? 0 : -1), o === 1) for (;;) { + let r = e.input.charCodeAt(e.position), i = I(e); + if (s && o !== 1 && (r === 33 || r === 38)) break; + if (s && p && (u.tagStart !== j || u.anchorStart !== j) && (r === 33 || r === 38)) { + var m; + let n = I(e), r = t + 1; + if (On(e, e.position - e.lineStart, r, u) && ((m = e.events[n.eventsLength]) == null ? void 0 : m.type) === T.MAPPING) return e.depth--, !0; + L(e, n); + } + if (s && (r === 33 && u.tagStart !== j || r === 38 && u.anchorStart !== j) || !_n(e, u, n === M) && !vn(e, u)) break; + l === null && (l = i), W(e, !0) ? (s = !0, f = p, o = e.lineIndent > t ? 1 : e.lineIndent === t ? 0 : -1) : f = !1; + } + if (f && (f = s || i), o === 1 || n === Gt) { + let r = n === M || n === Ut ? t : t + 1, i = e.position - e.lineStart; + if (o === 1) if (f && (Dn(e, i, u) || On(e, i, r, u)) || En(e, r, u)) c = !0; + else { + let t = e.input.charCodeAt(e.position); + if (l !== null && a && p && !f && t !== 124 && t !== 62) { + var h; + let t = I(e), n = l.position - l.lineStart; + L(e, l), On(e, n, r, sn()) && ((h = e.events[t.eventsLength]) == null ? void 0 : h.type) === T.MAPPING ? c = !0 : L(e, t); + } + !c && (d && Cn(e, r, u) || xn(e, r, u) || Sn(e, r, u) || yn(e, u) || Tn(e, r, n, u)) && (c = !0); + } + else o === 0 && (c = f && Dn(e, i, u)); + } + return d = d && !c, !c && (u.anchorStart !== j || u.tagStart !== j || d) && (N(e, j, j, u.anchorStart, u.anchorEnd, u.tagStart, u.tagEnd, E.PLAIN), c = !0), e.depth--, c || u.anchorStart !== j || u.tagStart !== j; +} +function kn(e) { + if (e.lineIndent > 0 || e.input.charCodeAt(e.position) !== 37) return !1; + e.position++; + let t = e.position; + for (; e.input.charCodeAt(e.position) !== 0 && !V(e.input.charCodeAt(e.position));) e.position++; + let n = e.input.slice(t, e.position), r = []; + for (n.length === 0 && R(e, "directive name must not be less than one character in length"); e.input.charCodeAt(e.position) !== 0 && !z(e.input.charCodeAt(e.position));) { + for (; B(e.input.charCodeAt(e.position));) e.position++; + if (e.input.charCodeAt(e.position) === 35 || z(e.input.charCodeAt(e.position)) || e.input.charCodeAt(e.position) === 0) break; + let t = e.position; + for (; e.input.charCodeAt(e.position) !== 0 && !V(e.input.charCodeAt(e.position));) e.position++; + r.push(e.input.slice(t, e.position)); + } + if (z(e.input.charCodeAt(e.position)) && fn(e), n === "YAML") { + e.directives.some((e) => e.kind === "yaml") && R(e, "duplication of %YAML directive"), r.length !== 1 && R(e, "YAML directive accepts exactly one argument"); + let t = /^([0-9]+)\.([0-9]+)$/.exec(r[0]); + t === null && R(e, "ill-formed argument of the YAML directive"), parseInt(t[1], 10) !== 1 && R(e, "unacceptable YAML version of the document"), e.directives.push({ + kind: "yaml", + version: r[0] + }); + } else if (n === "TAG") { + r.length !== 2 && R(e, "TAG directive accepts exactly two arguments"); + let [t, n] = r; + Jt.test(t) || R(e, "ill-formed tag handle (first argument) of the TAG directive"), Ht.call(e.tagHandlers, t) && R(e, `there is a previously declared suffix for "${t}" tag handle`), $t.test(n) || R(e, "ill-formed tag prefix (second argument) of the TAG directive"), e.tagHandlers[t] = n, e.directives.push({ + kind: "tag", + handle: t, + prefix: n + }); + } + return !0; +} +function An(e) { + e.directives = [], e.tagHandlers = Object.create(null); + let t = !1; + for (W(e, !0); kn(e);) t = !0, W(e, !0); + let n = !1, r = !1, i = !0; + if (e.lineIndent === 0 && e.input.charCodeAt(e.position) === 45 && e.input.charCodeAt(e.position + 1) === 45 && e.input.charCodeAt(e.position + 2) === 45 && H(e.input.charCodeAt(e.position + 3))) { + n = !0; + let t = e.line; + e.position += 3, W(e, !0), i = e.line > t; + } else t && R(e, "directives end mark is expected"); + let a = e.events.length; + if (!n && e.position === e.lineStart && e.input.charCodeAt(e.position) === 46 && G(e)) { + e.position += 3, W(e, !0); + return; + } + if (tn(e, n, !1), q(e, e.lineIndent - 1, Gt, !1, i, i) || F(e), W(e, !0), e.position === e.lineStart && G(e) && (r = e.input.charCodeAt(e.position) === 46, r)) { + let t = e.line; + e.position += 3, W(e, !0), e.line === t && e.position < e.length && R(e, "end of the stream or a document separator is expected"); + } + let o = e.events[a]; + (o == null ? void 0 : o.type) === T.DOCUMENT && (o.explicitEnd = r), P(e), !r && e.position < e.length && !mn(e) && R(e, "end of the stream or a document separator is expected"); +} +function jn(e, t) { + let n = e.length, r = x(x(x({}, en), t), {}, { + input: `${e}\0`, + length: n, + position: 0, + line: 0, + lineStart: 0, + lineIndent: 0, + firstTabInLine: -1, + depth: 0, + directives: [], + tagHandlers: Object.create(null), + events: [] + }), i = e.indexOf("\0"); + for (i !== -1 && w.throwAt(e, i, "null byte is not allowed in input", r.filename); r.position < r.length && (pn(r), W(r, !0), !(r.position >= r.length));) { + let e = r.position; + An(r), r.position === e && R(r, "can not read a document"); + } + return r.events; +} +//#endregion +//#region src/load.ts +var Mn = x(x({}, en), kt); +function Nn(e, t = {}) { + let n = x(x({}, Mn), t), r = String(e), i = Object.keys(en), a = Object.keys(kt); + return Vt(jn(r, Ve(n, i)), x(x({}, Ve(n, a)), {}, { source: r })); +} +function Pn(e, t, n) { + let r = null; + typeof t == "function" ? r = t : typeof t == "object" && t && (n = t); + let i = Nn(e, n); + if (r === null) return i; + for (let e of i) r(e); +} +function Fn(e, t) { + let n = Nn(e, t); + if (n.length === 0) throw new w("expected a document, but the input is empty"); + if (n.length === 1) return n[0]; + throw new w("expected a single document in the stream, but found more"); +} +//#endregion +//#region src/ast/from_js.ts +var J = Symbol("INVALID"); +function In(e) { + let t = new Set([ + e.defaultScalarTag, + e.defaultSequenceTag, + e.defaultMappingTag + ].filter((e) => e !== void 0)), n = e.implicitScalarTags, r = e.tags.filter((e) => !(e.nodeKind === "scalar" && e.implicit) && !t.has(e)), i = e.tags.filter((e) => t.has(e)); + return [ + ...n.map((e) => ({ + tag: e, + implicitTag: !0 + })), + ...r.map((e) => ({ + tag: e, + implicitTag: !1 + })), + ...i.map((e) => ({ + tag: e, + implicitTag: !0 + })) + ]; +} +function Ln(e, t) { + for (let n = 0, r = e.representTypes.length; n < r; n += 1) { + let { tag: r, implicitTag: i } = e.representTypes[n]; + if (r.identify(t)) { + let e; + return e = r.matchByTagPrefix ? r.representTagName(t) : r.tagName, { + tag: r, + tagName: e, + implicitTag: i + }; + } + } + return null; +} +function Y(e, t) { + if (!e.noRefs && typeof t == "object" && t) { + let n = e.refs.get(t); + if (n) return n.anchor === void 0 && (n.anchor = `ref_${e.refCounter++}`), { + kind: "alias", + anchor: n.anchor + }; + } + let n = Ln(e, t); + if (!n) { + if (t === void 0 || e.skipInvalid) return J; + throw new w(`unacceptable kind of an object to dump ${Object.prototype.toString.call(t)}`); + } + let { tag: r, tagName: i, implicitTag: a } = n, o = a ? i : Dt(i); + if (r.nodeKind === "scalar") return { + kind: "scalar", + tag: o, + tagged: !a, + style: E.PLAIN, + value: r.represent(t) + }; + if (r.nodeKind === "sequence") { + let n = r.represent(t), i = { + kind: "sequence", + tag: o, + tagged: !a, + style: D.BLOCK, + items: [] + }; + e.noRefs || e.refs.set(t, i); + for (let t = 0, r = n.length; t < r; t += 1) { + let r = Y(e, n[t]); + r === J && n[t] === void 0 && (r = Y(e, null)), r !== J && i.items.push(r); + } + return i; + } + let s = r.represent(t), c = { + kind: "mapping", + tag: o, + tagged: !a, + style: D.BLOCK, + items: [] + }; + e.noRefs || e.refs.set(t, c); + for (let [t, n] of s) { + let r = Y(e, t); + if (r === J) continue; + let i = Y(e, n); + i !== J && c.items.push({ + key: r, + value: i + }); + } + return c; +} +function Rn(e, t, n = {}) { + var r, i; + let a = Y({ + representTypes: In(t), + noRefs: (r = n.noRefs) == null ? !1 : r, + skipInvalid: (i = n.skipInvalid) == null ? !1 : i, + refs: /* @__PURE__ */ new Map(), + refCounter: 0 + }, e); + return [{ + contents: a === J ? null : a, + directives: [] + }]; +} +//#endregion +//#region src/ast/visit.ts +var zn = Symbol("visit:break"), Bn = Symbol("visit:skip"); +function Vn(e, t, n) { + let r = t(e, n); + if (r === zn) return !0; + if (r === Bn) return !1; + let i = n.depth + 1; + switch (e.kind) { + case "sequence": + for (let n of e.items) if (Vn(n, t, { + depth: i, + parent: e, + isKey: !1 + })) return !0; + break; + case "mapping": + for (let { key: n, value: r } of e.items) if (Vn(n, t, { + depth: i, + parent: e, + isKey: !0 + }) || Vn(r, t, { + depth: i, + parent: e, + isKey: !1 + })) return !0; + break; + } + return !1; +} +function Hn(e, t) { + for (let n of e) if (n.contents && Vn(n.contents, t, { + depth: 0, + parent: null, + isKey: !1 + })) return; +} +//#endregion +//#region src/ast/styler_defaults.ts +function Un(e, t) { + return (e & 1 << t) != 0; +} +var Wn = { + applyQuoteFlowKeysOption: Kn, + doubleQuoteForInvisibles: qn, + doubleQuoteWhitespaceOnly: Jn, + applyForceQuotesOption: Yn, + tryLongOrMultilineAsBlock: Xn, + quoteInvalidPlain: Zn, + fallbackToDoubleQuoted: Qn +}; +function Gn(e) { + return e.presenterOptions.quoteStyle === "single" && Un(e.allowedStylesMask, E.SINGLE_QUOTED) ? E.SINGLE_QUOTED : E.DOUBLE_QUOTED; +} +function Kn(e) { + e.presenterOptions.quoteFlowKeys && (!e.isKey || !e.flowOnly || e.style !== E.PLAIN || (e.style = E.DOUBLE_QUOTED)); +} +function qn(e) { + e.style === E.PLAIN && /[\t\x7F-\xA0\u2028\u2029\uFEFF\uFFFE\uFFFF]/.test(e.node.value) && (e.style = E.DOUBLE_QUOTED); +} +function Jn(e) { + e.style === E.PLAIN && /^\s+$/.test(e.node.value) && (e.style = E.DOUBLE_QUOTED); +} +function Yn(e) { + e.presenterOptions.forceQuotes && (e.isKey || e.style !== E.PLAIN || (e.style = e.node.value.includes("\n") ? E.DOUBLE_QUOTED : Gn(e))); +} +function Xn(e) { + if (e.style !== E.PLAIN || e.isKey) return; + let t = e.node.value, n = t.indexOf("\n") !== -1; + if (!Un(e.allowedStylesMask, E.LITERAL_BLOCK)) { + n && (e.style = E.DOUBLE_QUOTED); + return; + } + let r = e.presenterOptions.lineWidth; + if (r === -1) { + n && (e.style = E.LITERAL_BLOCK); + return; + } + let i = Math.max(Math.min(r, 40), r - e.shiftOfContent), a = 0, o = !1; + for (; a <= t.length;) { + let e = t.length, n = t.indexOf("\n", a); + n !== -1 && (e = n); + let r = t.slice(a, e); + if (r.length > i && r[0] !== " " && / [^ \t]/.test(r) && (o = !0), n === -1) break; + a = n + 1; + } + o ? e.style = E.FOLDED_BLOCK : n && (e.style = E.LITERAL_BLOCK); +} +function Zn(e) { + e.style === E.PLAIN && !Un(e.allowedStylesMask, E.PLAIN) && (e.style = Gn(e)); +} +function Qn(e) { + Un(e.allowedStylesMask, e.style) || (e.style = E.DOUBLE_QUOTED); +} +//#endregion +//#region src/ast/scalar_styler.ts +function X(e, t) { + return e | 1 << t; +} +var $n = "[\\x09\\x0A\\x0D\\x20-\\x7E\\x85\\xA0-\\uD7FF\\uE000-\\uFFFD\\u{10000}-\\u{10FFFF}]", er = "[\\n\\r]", tr = "\\uFEFF", nr = "[ \\t]", rr = `(?:(?!(?:${er}|${tr}))${$n})`, ir = `(?:(?!${nr})${rr})`, ar = "[\\x09\\x20-\\uD7FF\\uE000-\\uFFFF\\u{10000}-\\u{10FFFF}]", or = "[-?:,\\[\\]{}#&*!|>'\"%@`]", sr = "[,\\[\\]{}]", cr = ir, lr = `(?:(?!${sr})${ir})`, ur = `(?:(?:(?!${or})${ir})|[?:-](?=${cr}))`, dr = `(?:(?:(?!${or})${ir})|[?:-](?=${lr}))`, fr = `(?:(?:(?![:#])${cr})|:(?=${cr}))#*`, pr = `(?:(?:(?![:#])${lr})|:(?=${lr}))#*`, mr = `(?:${nr}*${fr})*`, hr = `(?:${nr}*${pr})*`, gr = `${ur}#*${mr}`, _r = `${dr}#*${hr}`, vr = gr, yr = _r, br = `\\n+${fr}${mr}`, xr = `\\n+${pr}${hr}`, Sr = `${gr}(?:${br})*`, Cr = `${_r}(?:${xr})*`, wr = RegExp(`^(?:${Sr})$`, "u"), Tr = RegExp(`^(?:${Cr})$`, "u"), Er = RegExp(`^(?:${vr})$`, "u"), Dr = RegExp(`^(?:${yr})$`, "u"), Or = RegExp(`^(?:${ar})*$`, "u"), kr = RegExp(`^(?:${ar}|\\n)*$`, "u"), Ar = RegExp(`^(?:${rr}|\\n)*$`, "u"), jr = /^(?:---|\.\.\.)(?=$|[ \t\n\r])/, Mr = /^(?:---|\.\.\.)(?=$|[ \t\n\r])/m; +function Nr(e) { + let t = e.node.value; + if (t !== "") { + if (!(e.isKey ? e.flowOnly ? Dr : Er : e.flowOnly ? Tr : wr).test(t) || e.shiftOfFirstLine === 0 && jr.test(t)) return !1; + if (e.shiftOfContent === 0) { + let e = t.indexOf("\n"); + if (e !== -1) { + let n = t.slice(e + 1); + if (Mr.test(n)) return !1; + } + } + } + let n = e.presenterOptions.schema.resolveImplicitScalarTag(t).tag.tagName; + return !(!e.node.tagged && n !== e.node.tag || !e.node.tagged && t === "=" && n === e.presenterOptions.schema.defaultScalarTag.tagName); +} +function Pr(e) { + let t = e.node.value; + if (!(e.isKey ? Or : kr).test(t) || /[ \t]\n|\n[ \t]/.test(t)) return !1; + if (!e.isKey && e.shiftOfContent === 0) { + let e = t.indexOf("\n"); + if (e !== -1 && Mr.test(t.slice(e + 1))) return !1; + } + return !0; +} +function Fr(e) { + if (e.flowOnly || !Ar.test(e.node.value)) return !1; + let t = e.shiftOfContent - e.shiftOfParent; + return !(t < 1 || t > 9 && /^\n* /.test(e.node.value) || e.shiftOfContent === 0 && Mr.test(e.node.value)); +} +function Ir(e) { + let t = X(0, E.DOUBLE_QUOTED); + Nr(e) && (t = X(t, E.PLAIN)), Pr(e) && (t = X(t, E.SINGLE_QUOTED)), Fr(e) && (t = X(X(t, E.LITERAL_BLOCK), E.FOLDED_BLOCK)), e.allowedStylesMask = t; +} +function Lr(e) { + switch (e.style) { + case E.PLAIN: return Rr(e); + case E.SINGLE_QUOTED: return zr(e); + case E.LITERAL_BLOCK: return Br(e); + case E.FOLDED_BLOCK: return Vr(e); + case E.DOUBLE_QUOTED: return Hr(e); + } +} +function Rr(e) { + return Ur(e.node.value, e.shiftOfContent); +} +function zr(e) { + return `'${Ur(e.node.value, e.shiftOfContent).replace(/'/g, "''")}'`; +} +function Br(e) { + let t = e.node.value; + return "|" + Kr(t, e.shiftOfParent, e.shiftOfContent) + qr(Wr(t, e.shiftOfContent)); +} +function Vr(e) { + let t = e.node.value, n = e.presenterOptions.lineWidth, r = Infinity; + return n !== -1 && (r = Math.max(Math.min(n, 40), n - e.shiftOfContent)), ">" + Kr(t, e.shiftOfParent, e.shiftOfContent) + qr(Wr(Xr(t, r), e.shiftOfContent)); +} +function Hr(e) { + return `"${$r(e.node.value)}"`; +} +function Ur(e, t) { + let n = e.indexOf("\n"); + if (n === -1) return e; + let r = " ".repeat(t), i = e.slice(0, n), a = /(\n+)([^\n]*)/g; + a.lastIndex = n; + let o; + for (; o = a.exec(e);) { + let e = o[1].length, t = o[2]; + i += "\n".repeat(e + 1) + r + t; + } + return i; +} +function Wr(e, t) { + let n = " ".repeat(t), r = 0, i = "", a = e.length; + for (; r < a;) { + let t, o = e.indexOf("\n", r); + o === -1 ? (t = e.slice(r), r = a) : (t = e.slice(r, o + 1), r = o + 1), t.length && t !== "\n" && (i += n), i += t; + } + return i; +} +function Gr(e) { + return /^\n* /.test(e); +} +function Kr(e, t, n) { + let r = Gr(e) ? String(n - t) : "", i = e[e.length - 1] === "\n"; + return `${r}${i && (e[e.length - 2] === "\n" || e === "\n") ? "+" : i ? "" : "-"}\n`; +} +function qr(e) { + return e[e.length - 1] === "\n" ? e.slice(0, -1) : e; +} +function Jr(e) { + return e === " " || e === " "; +} +function Yr(e, t) { + if (e === "" || Jr(e[0])) return e; + let n = / [^ \t]/g, r, i = 0, a, o = 0, s = 0, c = ""; + for (; r = n.exec(e);) s = r.index, s - i > t && (a = o > i ? o : s, c += `\n${e.slice(i, a)}`, i = a + 1), o = s; + return c += "\n", e.length - i > t && o > i ? c += `${e.slice(i, o)}\n${e.slice(o + 1)}` : c += e.slice(i), c.slice(1); +} +function Xr(e, t) { + let n = /(\n+)([^\n]*)/g, r = e.indexOf("\n"); + r === -1 && (r = e.length), n.lastIndex = r; + let i = Yr(e.slice(0, r), t), a = e[0] === "\n" || Jr(e[0]), o, s; + for (; s = n.exec(e);) { + let e = s[1], n = s[2]; + o = n !== "" && Jr(n[0]), i += e + (!a && !o && n !== "" ? "\n" : "") + Yr(n, t), a = o; + } + return i; +} +var Zr = /["\\\x00-\x1F\x7F-\xA0\u2028\u2029\uD800-\uDFFF\uFEFF\uFFFE\uFFFF]/gu; +function Qr(e) { + switch (e) { + case "\0": return "\\0"; + case "\x07": return "\\a"; + case "\b": return "\\b"; + case " ": return "\\t"; + case "\n": return "\\n"; + case "\v": return "\\v"; + case "\f": return "\\f"; + case "\r": return "\\r"; + case "\x1B": return "\\e"; + case "\"": return "\\\""; + case "\\": return "\\\\"; + case "…": return "\\N"; + case "\xA0": return "\\_"; + case "\u2028": return "\\L"; + case "\u2029": return "\\P"; + } + let t = e.charCodeAt(0), n = t.toString(16).toUpperCase(); + return t <= 255 ? `\\x${"0".repeat(2 - n.length)}${n}` : `\\u${"0".repeat(4 - n.length)}${n}`; +} +function $r(e) { + return e.replace(Zr, Qr); +} +//#endregion +//#region src/ast/presenter.ts +var Z = 10, ei = { + indent: 2, + seqNoIndent: !1, + seqInlineFirst: !0, + lineWidth: 80, + flowBracketPadding: !1, + flowSkipCommaSpace: !1, + flowSkipColonSpace: !1, + quoteFlowKeys: !1, + quoteStyle: "single", + forceQuotes: !1, + scalarStyleRules: Object.keys(Wn).map((e) => Reflect.get(Wn, e)), + tagBeforeAnchor: !1 +}; +function ti(e) { + return e.tagged ? e.tag : Dt(e.tag); +} +function ni(e) { + let t = x(x({}, ei), e); + return t.flowSkipColonSpace && (t.quoteFlowKeys = !0), x(x({}, t), {}, { + defaultScalarTagName: t.schema.defaultScalarTag.tagName, + openEnded: !1 + }); +} +function ri(e, t) { + return `\n${" ".repeat(e.indent * t)}`; +} +function ii(e, t, n, r, i, a) { + return { + node: t, + parent: n, + level: r, + isKey: i, + flowOnly: a, + shiftOfParent: r === 0 ? -1 : e.indent * (r - 1), + shiftOfContent: e.indent * Math.max(1, r), + shiftOfFirstLine: r === 0 ? 0 : e.indent * r, + presenterOptions: e, + allowedStylesMask: 0, + style: t.style + }; +} +function ai(e, t, n) { + let r = ""; + for (let i = 0, a = n.items.length; i < a; i += 1) { + let a = Q(e, t, n.items[i], n, {}).text; + i > 0 && (r += `,${e.flowSkipCommaSpace ? "" : " "}`), r += a; + } + let i = e.flowBracketPadding && n.items.length > 0 ? " " : ""; + return `[${i}${r}${i}]`; +} +function oi(e, t, n, r) { + let i = ""; + for (let a = 0, o = n.items.length; a < o; a += 1) { + let o = Q(e, t + 1, n.items[a], n, { + block: !0, + compact: e.seqInlineFirst, + isblockseq: !0 + }).text; + (!r || i !== "") && (i += ri(e, t)), o === "" || Z === o.charCodeAt(0) ? i += "-" : i += "- ", i += o; + } + return i; +} +function si(e, t, n) { + let r = ""; + for (let { key: i, value: a } of n.items) { + let o = ""; + r !== "" && (o += `,${e.flowSkipCommaSpace ? "" : " "}`); + let s = Q(e, t, i, n, { iskey: !0 }), c = s.text, l = Q(e, t, a, n, {}).text, u = e.flowSkipColonSpace || l === "" ? "" : " ", d = i.kind === "scalar" && s.noBody && (i.tagged || i.anchor !== void 0), f = i.kind === "alias" || d ? " " : ""; + o += `${c}${f}:${u}${l}`, r += o; + } + let i = e.flowBracketPadding && r !== "" ? " " : ""; + return `{${i}${r}${i}}`; +} +function ci(e, t, n, r) { + let i = ""; + for (let a = 0, o = n.items.length; a < o; a += 1) { + let o = ""; + (!r || i !== "") && (o += ri(e, t)); + let { key: s, value: c } = n.items[a], l = (s.kind === "mapping" || s.kind === "sequence") && s.style === D.BLOCK && s.items.length !== 0 || s.kind === "scalar" && (s.style === E.LITERAL_BLOCK || s.style === E.FOLDED_BLOCK), u = l ? Q(e, t + 1, s, n, { + block: !0, + compact: !0, + isblockseq: !li(e, s, t + 1) + }) : Q(e, t + 1, s, n, { + block: !0, + compact: !0, + iskey: !0 + }), d = u.text, f = s.kind === "scalar" && s.value.indexOf("\n") !== -1, p = d.length > 1024 && /^[\s\S]{1025}/u.test(d), m = l || f || p; + m && (d && Z === d.charCodeAt(0) ? o += "?" : o += "? "), o += d, m && (o += ri(e, t)); + let h = Q(e, t + 1, c, n, { + block: !0, + compact: m, + isblockseq: m && !li(e, c, t + 1) + }).text, ee = s.kind === "scalar" && u.noBody && (s.tagged || s.anchor !== void 0), te = !m && (s.kind === "alias" || ee) ? " " : ""; + h === "" || Z === h.charCodeAt(0) ? o += `${te}:` : o += `${te}: `, o += h, i += o; + } + return i; +} +function li(e, t, n) { + return t.kind === "alias" ? !0 : t.tagged || t.anchor !== void 0 || e.indent < 2 && n > 0; +} +function Q(e, t, n, r, i) { + var a; + if (n.kind === "alias") return e.openEnded = !1, { + text: `*${n.anchor}`, + noBody: !1 + }; + let { block: o = !1, iskey: s = !1, isblockseq: c = !1 } = i, l = (a = i.compact) == null ? !1 : a, u = n.anchor !== void 0; + li(e, n, t) && (l = !1); + let d, f = n.tagged, p = o && (n.kind === "mapping" || n.kind === "sequence") && n.style === D.BLOCK && n.items.length !== 0; + if (n.kind === "mapping") d = p ? ci(e, t, n, l) : si(e, t, n); + else if (n.kind === "sequence") d = p ? e.seqNoIndent && !c && t > 0 ? oi(e, t - 1, n, l) : oi(e, t, n, l) : ai(e, t, n); + else { + let i = ii(e, n, r, t, s, !o); + Ir(i); + for (let t of e.scalarStyleRules) t(i); + d = Lr(i), e.openEnded = (i.style === E.LITERAL_BLOCK || i.style === E.FOLDED_BLOCK) && (n.value === "\n" || n.value.endsWith("\n\n")), f = n.tagged || d === "" && i.flowOnly && (r == null ? void 0 : r.kind) === "sequence" && !u || i.style !== E.PLAIN && n.tag !== e.defaultScalarTagName; + } + (n.kind === "mapping" || n.kind === "sequence") && !p && (e.openEnded = !1), p && l && t > 0 && e.indent > 2 && (d = `${" ".repeat(e.indent - 2)}${d}`); + let m = d === "", h = d; + if (f || u) { + let t = [], r = f ? ti(n) : null, i = u ? `&${n.anchor}` : null; + e.tagBeforeAnchor ? (r !== null && t.push(r), i !== null && t.push(i)) : (i !== null && t.push(i), r !== null && t.push(r)); + let a = d === "" || d.charCodeAt(0) === Z ? "" : " "; + h = `${t.join(" ")}${a}${d}`; + } + return { + text: h, + noBody: m + }; +} +function ui(e) { + return (e.kind === "sequence" || e.kind === "mapping") && e.style === D.BLOCK && e.items.length !== 0 && !e.tagged && e.anchor === void 0; +} +function di(e) { + let t = ""; + for (let n of e.directives) { + if (n.kind === "yaml") { + t += `%YAML ${n.version}\n`; + continue; + } + let { handle: e, prefix: r } = n; + t += `%TAG ${e} ${r}\n`; + } + return t; +} +function fi(e, t) { + let n = ni(t), r = "", i = !1; + for (let t = 0; t < e.length; t += 1) { + let a = e[t]; + n.openEnded = !1; + let o = di(a), s = o !== "", c = a.explicitStart || s || t > 0 && !i; + if (r += o, a.contents === null) c && (r += "---\n"); + else if (c) { + let e = Q(n, 0, a.contents, null, { + block: !0, + compact: !0 + }).text, t = e === "" ? "" : s || ui(a.contents) ? "\n" : " "; + r += `---${t}${e}\n`; + } else r += Q(n, 0, a.contents, null, { + block: !0, + compact: !0 + }).text + "\n"; + i = a.explicitEnd || n.openEnded, i && (r += "...\n"); + } + return r; +} +//#endregion +//#region src/dump.ts +var pi = x(x({}, ei), {}, { + schema: tt, + skipInvalid: !1, + noRefs: !1, + flowLevel: -1, + sortKeys: !1, + transform: () => {} +}); +function mi(e, t) { + let n = String(e), r = String(t); + return n < r ? -1 : +(n > r); +} +function hi(e, t = {}) { + let n = x(x({}, pi), t), r = Rn(e, n.schema, { + noRefs: n.noRefs, + skipInvalid: n.skipInvalid + }); + if (n.flowLevel >= 0 && Hn(r, (e, t) => { + if (!(t.depth < n.flowLevel)) return (e.kind === "sequence" || e.kind === "mapping") && (e.style = D.FLOW), Bn; + }), n.sortKeys) { + let e = n.sortKeys === !0 ? mi : n.sortKeys; + Hn(r, (t) => { + t.kind === "mapping" && t.items.sort((t, n) => e(t.key.kind === "scalar" ? t.key.value : "", n.key.kind === "scalar" ? n.key.value : "")); + }); + } + return n.transform(r), fi(r, x(x({}, Ve(n, Object.keys(ei))), {}, { schema: n.schema })); +} +//#endregion +//#region src/ast/from_events.ts +var $ = -1; +function gi(e) { + return "tagStart" in e && e.tagStart !== $ ? e.tagStart : "anchorStart" in e && e.anchorStart !== $ ? e.anchorStart : "valueStart" in e && e.valueStart !== $ ? e.valueStart : "start" in e ? e.start : 0; +} +function _i(e, t) { + return t.tagStart === $ ? "" : e.source.slice(t.tagStart, t.tagEnd); +} +function vi(e, t) { + return t.anchorStart === $ ? void 0 : e.source.slice(t.anchorStart, t.anchorEnd); +} +function yi(e, t) { + let n = Ct(e.source, t), r = _i(e, t), i, a = !1; + return r === "" ? i = t.style === E.PLAIN ? e.schema.resolveImplicitScalarTag(n).tag.tagName : e.schema.defaultScalarTag.tagName : (a = !0, i = r), { + kind: "scalar", + tag: i, + tagged: a, + style: t.style, + anchor: vi(e, t), + value: n + }; +} +function bi(e, t, n) { + let r = _i(e, t), i, a = !1; + return r === "" ? i = n : (i = r, a = !0), { + tag: i, + tagged: a, + style: t.style, + anchor: vi(e, t) + }; +} +function xi(e, t) { + let n = e.frames[e.frames.length - 1]; + n.kind === "document" ? n.doc.contents = t : n.kind === "sequence" ? n.node.items.push(t) : n.key ? (n.node.items.push({ + key: n.key, + value: t + }), n.key = null) : n.key = t; +} +function Si(e, t) { + let n = { + source: t.source, + schema: t.schema, + eventIndex: 0, + position: 0, + frames: [], + documents: [] + }; + for (; n.eventIndex < e.length;) { + let t = e[n.eventIndex++]; + switch (n.position = gi(t), t.type) { + case T.DOCUMENT: { + let e = { + contents: null, + explicitStart: t.explicitStart, + explicitEnd: t.explicitEnd, + directives: t.directives + }; + n.frames.push({ + kind: "document", + doc: e + }); + break; + } + case T.SCALAR: + xi(n, yi(n, t)); + break; + case T.SEQUENCE: { + let { tag: e, tagged: r, style: i, anchor: a } = bi(n, t, "tag:yaml.org,2002:seq"), o = { + kind: "sequence", + tag: e, + tagged: r, + style: i, + anchor: a, + items: [] + }; + n.frames.push({ + kind: "sequence", + node: o + }); + break; + } + case T.MAPPING: { + let { tag: e, tagged: r, style: i, anchor: a } = bi(n, t, "tag:yaml.org,2002:map"), o = { + kind: "mapping", + tag: e, + tagged: r, + style: i, + anchor: a, + items: [] + }; + n.frames.push({ + kind: "mapping", + node: o, + key: null + }); + break; + } + case T.ALIAS: + xi(n, { + kind: "alias", + anchor: n.source.slice(t.anchorStart, t.anchorEnd) + }); + break; + case T.POP: { + let e = n.frames.pop(); + if (e.kind === "mapping" && e.key) throw Error("incomplete mapping pair in event stream"); + e.kind === "document" ? n.documents.push(e.doc) : xi(n, e.node); + break; + } + } + } + return n.documents; +} +//#endregion +//#region src/index.ts +var Ci = T.DOCUMENT, wi = T.SEQUENCE, Ti = T.MAPPING, Ei = T.SCALAR, Di = T.ALIAS, Oi = T.POP, ki = E.PLAIN, Ai = E.SINGLE_QUOTED, ji = E.DOUBLE_QUOTED, Mi = E.LITERAL_BLOCK, Ni = E.FOLDED_BLOCK, Pi = D.BLOCK, Fi = D.FLOW, Ii = O.CLIP, Li = O.STRIP, Ri = O.KEEP; +//#endregion +export { Ii as CHOMPING_CLIP, Ri as CHOMPING_KEEP, O as CHOMPING_MODE, Li as CHOMPING_STRIP, D as COLLECTION_STYLE, Pi as COLLECTION_STYLE_BLOCK, Fi as COLLECTION_STYLE_FLOW, $e as CORE_SCHEMA, Wn as DEFAULT_SCALAR_STYLE_RULES, tt as DUMP_SCHEMA, Di as EVENT_ALIAS, Ci as EVENT_DOCUMENT, T as EVENT_ID, Ti as EVENT_MAPPING, Oi as EVENT_POP, Ei as EVENT_SCALAR, wi as EVENT_SEQUENCE, C as FAILSAFE_SCHEMA, Qe as JSON_SCHEMA, e as NOT_RESOLVED, E as SCALAR_STYLE, ji as SCALAR_STYLE_DOUBLE_QUOTED, Ni as SCALAR_STYLE_FOLDED_BLOCK, Mi as SCALAR_STYLE_LITERAL_BLOCK, ki as SCALAR_STYLE_PLAIN, Ai as SCALAR_STYLE_SINGLE_QUOTED, S as Schema, zn as VISIT_BREAK, Bn as VISIT_SKIP, et as YAML11_SCHEMA, w as YAMLException, Pe as binaryTag, f as boolCoreTag, h as boolJsonTag, ne as boolYaml11Tag, Vt as constructFromEvents, r as defineMappingTag, t as defineScalarTag, n as defineSequenceTag, hi as dump, Si as eventsToAst, be as floatCoreTag, Te as floatJsonTag, _ as floatYaml11Tag, Ct as getScalarValue, se as intCoreTag, fe as intJsonTag, g as intYaml11Tag, Rn as jsToAst, it as legacyMapTag, Fn as load, Pn as loadAll, We as mapTag, Ae as mergeTag, o as nullCoreTag, s as nullJsonTag, l as nullYaml11Tag, He as omapTag, Ue as pairsTag, jn as parseEvents, fi as present, nt as realMapTag, Be as seqTag, Ge as setTag, i as strTag, ze as timestampTag, Hn as visit }; + +//# sourceMappingURL=js-yaml.esm.min.mjs.map \ No newline at end of file diff --git a/node_modules/js-yaml/dist/browser/js-yaml.esm.min.mjs.map b/node_modules/js-yaml/dist/browser/js-yaml.esm.min.mjs.map new file mode 100644 index 00000000..858600bb --- /dev/null +++ b/node_modules/js-yaml/dist/browser/js-yaml.esm.min.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"js-yaml.esm.min.mjs","names":[],"sources":["../../src/tag.ts","../../src/tag/scalar/str.ts","../../src/tag/scalar/null_core.ts","../../src/tag/scalar/null_json.ts","../../src/tag/scalar/null_yaml11.ts","../../src/tag/scalar/bool_core.ts","../../src/tag/scalar/bool_json.ts","../../src/tag/scalar/bool_yaml11.ts","../../src/tag/scalar/int_core.ts","../../src/tag/scalar/int_json.ts","../../src/tag/scalar/int_yaml11.ts","../../src/tag/scalar/float_core.ts","../../src/tag/scalar/float_json.ts","../../src/tag/scalar/float_yaml11.ts","../../src/tag/scalar/merge.ts","../../src/tag/scalar/binary.ts","../../src/tag/scalar/timestamp.ts","../../src/tag/sequence/seq.ts","../../src/common/object.ts","../../src/tag/sequence/omap.ts","../../src/tag/sequence/pairs.ts","../../src/tag/mapping/map.ts","../../src/tag/mapping/set.ts","../../src/schema.ts","../../src/tag/mapping/real_map.ts","../../src/tag/mapping/legacy_map.ts","../../src/common/snippet.ts","../../src/common/exception.ts","../../src/parser/events.ts","../../src/parser/parser_scalar.ts","../../src/common/tagname.ts","../../src/parser/constructor.ts","../../src/parser/parser.ts","../../src/load.ts","../../src/ast/from_js.ts","../../src/ast/visit.ts","../../src/ast/styler_defaults.ts","../../src/ast/scalar_styler.ts","../../src/ast/presenter.ts","../../src/dump.ts","../../src/ast/from_events.ts","../../src/index.ts"],"sourcesContent":["/**\n * Returned by a scalar resolver when the source does not match its tag.\n *\n * @category Tags\n */\nconst NOT_RESOLVED: unique symbol = Symbol('NOT_RESOLVED')\n\n/**\n * Options for {@link defineScalarTag}.\n *\n * @category Tags\n */\ninterface ScalarTagOptions {\n /**\n * Whether this tag participates in resolving plain scalars without an\n * explicit tag. Default: `false`.\n */\n implicit?: boolean\n\n /**\n * Whether explicit tag names are matched by prefix instead of exact equality.\n * Default: `false`.\n */\n matchByTagPrefix?: boolean\n\n /**\n * Set of `source.charAt(0)` keys for which `resolve` may succeed (a superset\n * of what it really matches). A key is either a single character or '' (empty\n * source). `null` means \"no constraint, always try\". Used by the composer to\n * dispatch implicit scalars by first character without running every resolver.\n */\n implicitFirstChars?: readonly string[] | null\n\n /**\n * Construct a value from scalar text, or return {@link NOT_RESOLVED} when it\n * is invalid for this tag. `isExplicit` is true for an explicit tag and\n * `tagName` is the actual matched name.\n */\n resolve: (source: string, isExplicit: boolean, tagName: string) => Result | typeof NOT_RESOLVED\n\n /**\n * Selects this tag for a JavaScript value when dumping. Use `() => false`\n * for load-only tags.\n */\n identify: (data: any) => boolean\n\n /**\n * A scalar's printed form is text, so `represent` always yields a string.\n * The factory supplies a `String(data)` default when a tag omits it.\n */\n represent?: (data: any) => string\n\n /** Return the tag name to emit for a prefix-matching tag. Defaults to `tagName`. */\n representTagName?: (data: any) => string\n}\n\n/**\n * Normalized scalar tag returned by {@link defineScalarTag}.\n *\n * @category Tags\n */\ninterface ScalarTagDefinition extends Required> {\n /** Tag name used for schema lookup. */\n tagName: string\n\n /** YAML node kind handled by this tag. */\n nodeKind: 'scalar'\n}\n\n/**\n * Options for {@link defineSequenceTag}.\n *\n * @category Tags\n */\ninterface SequenceTagOptions {\n /**\n * Whether explicit tag names are matched by prefix instead of exact equality.\n * Default: `false`.\n */\n matchByTagPrefix?: boolean\n\n /** Create the carrier used while constructing a sequence. */\n create: (tagName: string) => Carrier\n\n /** Add an item to the carrier. Return a non-empty error message to reject it. */\n addItem: (carrier: Carrier, item: unknown, index: number) => void | string\n\n /** Convert the completed carrier to the result. Defaults to the identity function. */\n finalize?: (carrier: Carrier) => Result\n\n /**\n * Selects this tag for a JavaScript value when dumping. Use `() => false`\n * for load-only tags.\n */\n identify: (data: any) => boolean\n\n /** Return the array-like contents to dump. Defaults to the identity function. */\n represent?: (data: any) => ArrayLike\n\n /** Return the tag name to emit for a prefix-matching tag. Defaults to `tagName`. */\n representTagName?: (data: any) => string\n}\n\n/**\n * Normalized sequence tag returned by {@link defineSequenceTag}.\n *\n * @category Tags\n */\ninterface SequenceTagDefinition extends Required> {\n /** Tag name used for schema lookup. */\n tagName: string\n\n /** YAML node kind handled by this tag. */\n nodeKind: 'sequence'\n\n /** Sequence tags do not participate in implicit scalar resolution. */\n implicit: false\n\n /** Whether the carrier is also the final result (`finalize` was omitted). */\n carrierIsResult: boolean\n}\n\n/**\n * Options for {@link defineMappingTag}.\n *\n * @category Tags\n */\ninterface MappingTagOptions {\n /**\n * Whether explicit tag names are matched by prefix instead of exact equality.\n * Default: `false`.\n */\n matchByTagPrefix?: boolean\n\n /** Create the carrier used while constructing a mapping. */\n create: (tagName: string) => Carrier\n\n /**\n * Writes a pair. Returns '' on success, a non-empty error message otherwise\n * (key does not fit the representation, value rejected, ...). Always a string\n * so the hot path never allocates an exception wrapper.\n */\n addPair: (carrier: Carrier, key: unknown, value: unknown) => string\n\n /** Return whether the carrier contains a key, for duplicate and merge checks. */\n has: (carrier: Carrier, key: unknown) => boolean\n\n /** Return the keys of a completed result for YAML merge processing. */\n keys: (result: Result) => Iterable\n\n /** Return a value from a completed result for YAML merge processing. */\n get: (result: Result, key: unknown) => unknown\n\n /** Convert the completed carrier to the result. Defaults to the identity function. */\n finalize?: (carrier: Carrier) => Result\n\n /**\n * Selects this tag for a JavaScript value when dumping. Use `() => false`\n * for load-only tags.\n */\n identify: (data: any) => boolean\n\n /** Return the mapping entries to dump. Defaults to the identity function. */\n represent?: (data: any) => Map\n\n /** Return the tag name to emit for a prefix-matching tag. Defaults to `tagName`. */\n representTagName?: (data: any) => string\n}\n\n/**\n * Normalized mapping tag returned by {@link defineMappingTag}.\n *\n * @category Tags\n */\ninterface MappingTagDefinition extends Required> {\n /** Tag name used for schema lookup. */\n tagName: string\n\n /** YAML node kind handled by this tag. */\n nodeKind: 'mapping'\n\n /** Mapping tags do not participate in implicit scalar resolution. */\n implicit: false\n\n /** Whether the carrier is also the final result (`finalize` was omitted). */\n carrierIsResult: boolean\n}\n\n/**\n * Any normalized tag definition accepted by {@link Schema}.\n *\n * @category Tags\n */\ntype TagDefinition =\n | ScalarTagDefinition\n | SequenceTagDefinition\n | MappingTagDefinition\n\n/**\n * Create a normalized scalar tag definition.\n *\n * @category Tags\n */\nfunction defineScalarTag (tagName: string, options: ScalarTagOptions): ScalarTagDefinition {\n return {\n tagName,\n nodeKind: 'scalar',\n implicit: options.implicit ?? false,\n matchByTagPrefix: options.matchByTagPrefix ?? false,\n implicitFirstChars: options.implicitFirstChars ?? null,\n resolve: options.resolve,\n identify: options.identify,\n represent: options.represent ?? (data => String(data)),\n representTagName: options.representTagName ?? (() => tagName)\n }\n}\n\n/**\n * Create a normalized sequence tag definition.\n *\n * @category Tags\n */\nfunction defineSequenceTag (tagName: string, options: SequenceTagOptions): SequenceTagDefinition {\n const carrierIsResult = options.finalize === undefined\n\n return {\n tagName,\n nodeKind: 'sequence',\n implicit: false,\n matchByTagPrefix: options.matchByTagPrefix ?? false,\n create: options.create,\n addItem: options.addItem,\n finalize: options.finalize ?? (carrier => carrier as unknown as Result),\n carrierIsResult,\n identify: options.identify,\n represent: options.represent ?? (data => data as ArrayLike),\n representTagName: options.representTagName ?? (() => tagName)\n }\n}\n\n/**\n * Create a normalized mapping tag definition.\n *\n * @category Tags\n */\nfunction defineMappingTag (tagName: string, options: MappingTagOptions): MappingTagDefinition {\n const carrierIsResult = options.finalize === undefined\n\n return {\n tagName,\n nodeKind: 'mapping',\n implicit: false,\n matchByTagPrefix: options.matchByTagPrefix ?? false,\n create: options.create,\n addPair: options.addPair,\n has: options.has,\n keys: options.keys,\n get: options.get,\n finalize: options.finalize ?? (carrier => carrier as unknown as Result),\n carrierIsResult,\n identify: options.identify,\n represent: options.represent ?? (data => data as Map),\n representTagName: options.representTagName ?? (() => tagName)\n }\n}\n\nexport {\n NOT_RESOLVED,\n defineScalarTag,\n defineSequenceTag,\n defineMappingTag,\n\n type ScalarTagDefinition,\n type SequenceTagDefinition,\n type MappingTagDefinition,\n type TagDefinition,\n type ScalarTagOptions,\n type SequenceTagOptions,\n type MappingTagOptions\n}\n","import { defineScalarTag } from '../../tag.ts'\n\n/** @category Tags */\nconst strTag = defineScalarTag('tag:yaml.org,2002:str', {\n resolve: (source) => source,\n identify: (data) => typeof data === 'string'\n})\n\nexport { strTag }\n","import { defineScalarTag, NOT_RESOLVED } from '../../tag.ts'\n\nconst NULL_VALUES = ['', '~', 'null', 'Null', 'NULL']\n\n/** @category Tags */\nconst nullCoreTag = defineScalarTag('tag:yaml.org,2002:null', {\n implicit: true,\n // Superset of source.charAt(0) over all matched inputs: '' (empty), '~', 'null'/'Null'/'NULL'.\n implicitFirstChars: ['', '~', 'n', 'N'],\n resolve: (source) => {\n if (NULL_VALUES.indexOf(source) !== -1) return null\n\n return NOT_RESOLVED\n },\n identify: (object) => object === null,\n represent: () => 'null'\n})\n\nexport { nullCoreTag }\n","import { defineScalarTag, NOT_RESOLVED } from '../../tag.ts'\n\n/** @category Tags */\nconst nullJsonTag = defineScalarTag('tag:yaml.org,2002:null', {\n implicit: true,\n // Superset of source.charAt(0) over all matched inputs: null.\n implicitFirstChars: ['n'],\n resolve: (source, isExplicit) => {\n if (source === 'null' || (isExplicit && source === '')) return null\n\n return NOT_RESOLVED\n },\n identify: (object) => object === null,\n represent: () => 'null'\n})\n\nexport { nullJsonTag }\n","import { defineScalarTag, NOT_RESOLVED } from '../../tag.ts'\n\nconst NULL_VALUES = ['', '~', 'null', 'Null', 'NULL']\n\n/** @category Tags */\nconst nullYaml11Tag = defineScalarTag('tag:yaml.org,2002:null', {\n implicit: true,\n // Superset of source.charAt(0) over all matched inputs: '' (empty), '~', 'null'/'Null'/'NULL'.\n implicitFirstChars: ['', '~', 'n', 'N'],\n resolve: (source) => {\n if (NULL_VALUES.indexOf(source) !== -1) return null\n\n return NOT_RESOLVED\n },\n identify: (object) => object === null,\n represent: () => 'null'\n})\n\nexport { nullYaml11Tag }\n","import { defineScalarTag, NOT_RESOLVED } from '../../tag.ts'\n\nconst TRUE_VALUES = ['true', 'True', 'TRUE']\nconst FALSE_VALUES = ['false', 'False', 'FALSE']\n\n/** @category Tags */\nconst boolCoreTag = defineScalarTag('tag:yaml.org,2002:bool', {\n implicit: true,\n // Superset of source.charAt(0) over all matched inputs: true/True/TRUE, false/False/FALSE.\n implicitFirstChars: ['t', 'T', 'f', 'F'],\n resolve: (source) => {\n if (TRUE_VALUES.indexOf(source) !== -1) return true\n if (FALSE_VALUES.indexOf(source) !== -1) return false\n\n return NOT_RESOLVED\n },\n identify: (object) => Object.prototype.toString.call(object) === '[object Boolean]',\n represent: (object) => object ? 'true' : 'false'\n})\n\nexport { boolCoreTag }\n","import { defineScalarTag, NOT_RESOLVED } from '../../tag.ts'\n\nconst TRUE_VALUES = ['true']\nconst FALSE_VALUES = ['false']\n\n/** @category Tags */\nconst boolJsonTag = defineScalarTag('tag:yaml.org,2002:bool', {\n implicit: true,\n // Superset of source.charAt(0) over all matched inputs: true, false.\n implicitFirstChars: ['t', 'f'],\n resolve: (source) => {\n if (TRUE_VALUES.indexOf(source) !== -1) return true\n if (FALSE_VALUES.indexOf(source) !== -1) return false\n\n return NOT_RESOLVED\n },\n identify: (object) => Object.prototype.toString.call(object) === '[object Boolean]',\n represent: (object) => object ? 'true' : 'false'\n})\n\nexport { boolJsonTag }\n","import { defineScalarTag, NOT_RESOLVED } from '../../tag.ts'\n\nconst TRUE_VALUES = ['true', 'True', 'TRUE', 'y', 'Y', 'yes', 'Yes', 'YES', 'on', 'On', 'ON']\nconst FALSE_VALUES = ['false', 'False', 'FALSE', 'n', 'N', 'no', 'No', 'NO', 'off', 'Off', 'OFF']\n\n/** @category Tags */\nconst boolYaml11Tag = defineScalarTag('tag:yaml.org,2002:bool', {\n implicit: true,\n // Superset of source.charAt(0) over all matched inputs.\n implicitFirstChars: ['y', 'Y', 'n', 'N', 't', 'T', 'f', 'F', 'o', 'O'],\n resolve: (source) => {\n if (TRUE_VALUES.indexOf(source) !== -1) return true\n if (FALSE_VALUES.indexOf(source) !== -1) return false\n\n return NOT_RESOLVED\n },\n identify: (object) => Object.prototype.toString.call(object) === '[object Boolean]',\n represent: (object) => object ? 'true' : 'false'\n})\n\nexport { boolYaml11Tag }\n","import { defineScalarTag, NOT_RESOLVED } from '../../tag.ts'\n\n// YAML 1.2 Core schema implicit resolution:\n// [-+]? [0-9]+ | 0o [0-7]+ | 0x [0-9a-fA-F]+\nconst YAML_INTEGER_IMPLICIT_PATTERN = new RegExp(\n // 0o123\n '^(?:0o[0-7]+' +\n // 0x1A\n '|0x[0-9a-fA-F]+' +\n // 12345\n '|[-+]?[0-9]+)$')\n\n// Explicit `!!int` validation is separate from Core implicit resolution.\nconst YAML_INTEGER_EXPLICIT_PATTERN = new RegExp(\n // 0b1010\n '^(?:[-+]?0b[0-1]+' +\n // 0o123\n '|[-+]?0o[0-7]+' +\n // 0x1A\n '|[-+]?0x[0-9a-fA-F]+' +\n // 12345\n '|[-+]?[0-9]+)$')\n\nfunction parseYamlInteger (source: string) {\n let value = source\n let sign = 1\n\n if (value[0] === '-' || value[0] === '+') {\n if (value[0] === '-') sign = -1\n value = value.slice(1)\n }\n\n if (value.startsWith('0b')) return sign * parseInt(value.slice(2), 2)\n if (value.startsWith('0o')) return sign * parseInt(value.slice(2), 8)\n if (value.startsWith('0x')) return sign * parseInt(value.slice(2), 16)\n\n return sign * parseInt(value, 10)\n}\n\nfunction resolveYamlInteger (source: string, isExplicit: boolean) {\n if (isExplicit) {\n if (!YAML_INTEGER_EXPLICIT_PATTERN.test(source)) return NOT_RESOLVED\n } else if (!YAML_INTEGER_IMPLICIT_PATTERN.test(source)) {\n return NOT_RESOLVED\n }\n\n const result = parseYamlInteger(source)\n return Number.isFinite(result) ? result : NOT_RESOLVED\n}\n\n/** @category Tags */\nconst intCoreTag = defineScalarTag('tag:yaml.org,2002:int', {\n implicit: true,\n // Superset of source.charAt(0) over all matched inputs: optional sign + decimal digit.\n implicitFirstChars: ['-', '+', ...'0123456789'],\n resolve: resolveYamlInteger,\n identify: (object) =>\n // No ancient boxed numbers support\n Number.isInteger(object) &&\n // Negative zero => !!float\n !Object.is(object, -0) &&\n // Exponential form => !!float, round-trip for !!int 1e21 will be broken\n object.toString(10).indexOf('e') < 0,\n represent: (object: number) => object.toString(10)\n})\n\nexport { intCoreTag }\n","import { defineScalarTag, NOT_RESOLVED } from '../../tag.ts'\n\n// YAML 1.2 JSON schema implicit resolution:\n// -? ( 0 | [1-9] [0-9]* )\nconst YAML_INTEGER_IMPLICIT_PATTERN = new RegExp(\n '^-?(?:0|[1-9][0-9]*)$')\n\n// Explicit `!!int` validation is separate from JSON implicit resolution.\nconst YAML_INTEGER_EXPLICIT_PATTERN = new RegExp(\n // 0b1010\n '^(?:[-+]?0b[0-1]+' +\n // 0o123\n '|[-+]?0o[0-7]+' +\n // 0x1A\n '|[-+]?0x[0-9a-fA-F]+' +\n // 12345\n '|[-+]?[0-9]+)$')\n\nfunction parseYamlInteger (source: string) {\n let value = source\n let sign = 1\n\n if (value[0] === '-' || value[0] === '+') {\n if (value[0] === '-') sign = -1\n value = value.slice(1)\n }\n\n if (value.startsWith('0b')) return sign * parseInt(value.slice(2), 2)\n if (value.startsWith('0o')) return sign * parseInt(value.slice(2), 8)\n if (value.startsWith('0x')) return sign * parseInt(value.slice(2), 16)\n\n return sign * parseInt(value, 10)\n}\n\nfunction resolveYamlInteger (source: string, isExplicit: boolean) {\n if (isExplicit) {\n if (!YAML_INTEGER_EXPLICIT_PATTERN.test(source)) return NOT_RESOLVED\n } else if (!YAML_INTEGER_IMPLICIT_PATTERN.test(source)) {\n return NOT_RESOLVED\n }\n\n const result = parseYamlInteger(source)\n return Number.isFinite(result) ? result : NOT_RESOLVED\n}\n\n/** @category Tags */\nconst intJsonTag = defineScalarTag('tag:yaml.org,2002:int', {\n implicit: true,\n // Superset of source.charAt(0) over all matched inputs: optional '-' or digit.\n implicitFirstChars: ['-', ...'0123456789'],\n resolve: resolveYamlInteger,\n identify: (object) =>\n // No ancient boxed numbers support\n Number.isInteger(object) &&\n // Negative zero => !!float\n !Object.is(object, -0) &&\n // Exponential form => !!float, round-trip for !!int 1e21 will be broken\n object.toString(10).indexOf('e') < 0,\n represent: (object: number) => object.toString(10)\n})\n\nexport { intJsonTag }\n","import { defineScalarTag, NOT_RESOLVED } from '../../tag.ts'\n\nconst YAML_INTEGER_PATTERN = new RegExp(\n // 0b1010\n '^(?:[-+]?0b[0-1_]+' +\n // 0123\n '|[-+]?0[0-7_]+' +\n // 0x1A\n '|[-+]?0x[0-9a-fA-F_]+' +\n // 1:23\n '|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+' +\n // 12345\n '|[-+]?(?:0|[1-9][0-9_]*))$')\n\nfunction parseYamlInteger (source: string) {\n let value = source.replace(/_/g, '')\n let sign = 1\n\n if (value[0] === '-' || value[0] === '+') {\n if (value[0] === '-') sign = -1\n value = value.slice(1)\n }\n\n if (value.startsWith('0b')) return sign * parseInt(value.slice(2), 2)\n if (value.startsWith('0x')) return sign * parseInt(value.slice(2), 16)\n\n if (value.includes(':')) {\n let result = 0\n for (const part of value.split(':')) result = result * 60 + Number(part)\n return sign * result\n }\n\n if (value !== '0' && value[0] === '0') return sign * parseInt(value, 8)\n\n return sign * parseInt(value, 10)\n}\n\nfunction resolveYamlInteger (source: string) {\n if (!YAML_INTEGER_PATTERN.test(source)) return NOT_RESOLVED\n\n const result = parseYamlInteger(source)\n return Number.isFinite(result) ? result : NOT_RESOLVED\n}\n\n/** @category Tags */\nconst intYaml11Tag = defineScalarTag('tag:yaml.org,2002:int', {\n implicit: true,\n // Superset of source.charAt(0) over all matched inputs: optional sign + decimal digit.\n implicitFirstChars: ['-', '+', ...'0123456789'],\n resolve: resolveYamlInteger,\n identify: (object) =>\n // No ancient boxed numbers support\n Number.isInteger(object) &&\n // Negative zero => !!float\n !Object.is(object, -0) &&\n // Exponential form => !!float, round-trip for !!int 1e21 will be broken\n object.toString(10).indexOf('e') < 0,\n represent: (object: number) => object.toString(10)\n})\n\nexport { intYaml11Tag }\n","import { defineScalarTag, NOT_RESOLVED } from '../../tag.ts'\n\nconst YAML_FLOAT_PATTERN = new RegExp(\n // 2.5e4, 2.5 and integers\n '^(?:[-+]?[0-9]+(?:\\\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?' +\n // .2e4, .2\n '|[-+]?\\\\.[0-9]+(?:[eE][-+]?[0-9]+)?' +\n // .inf\n '|[-+]?\\\\.(?:inf|Inf|INF)' +\n // .nan\n '|\\\\.(?:nan|NaN|NAN))$')\n\nconst YAML_FLOAT_SPECIAL_PATTERN = new RegExp(\n '^(?:' +\n // .inf\n '[-+]?\\\\.(?:inf|Inf|INF)' +\n // .nan\n '|\\\\.(?:nan|NaN|NAN))$')\n\nfunction resolveYamlFloat (source: string) {\n if (!YAML_FLOAT_PATTERN.test(source)) return NOT_RESOLVED\n\n let value = source.toLowerCase()\n const sign = value[0] === '-' ? -1 : 1\n\n if ('+-'.includes(value[0])) value = value.slice(1)\n\n if (value === '.inf') return sign === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY\n if (value === '.nan') return NaN\n\n const result = sign * parseFloat(value)\n\n if (Number.isFinite(result) || YAML_FLOAT_SPECIAL_PATTERN.test(source)) return result\n return NOT_RESOLVED\n}\n\nfunction representYamlFloat (object: number) {\n if (isNaN(object)) return '.nan'\n if (object === Number.POSITIVE_INFINITY) return '.inf'\n if (object === Number.NEGATIVE_INFINITY) return '-.inf'\n if (Object.is(object, -0)) return '-0.0'\n\n const result = object.toString(10)\n return /^[-+]?[0-9]+e/.test(result) ? result.replace('e', '.e') : result\n}\n\n/** @category Tags */\nconst floatCoreTag = defineScalarTag('tag:yaml.org,2002:float', {\n implicit: true,\n // Superset of source.charAt(0) over all matched inputs: optional sign, '.', or digit\n // ('.inf'/'.nan' start with '.').\n implicitFirstChars: ['-', '+', '.', ...'0123456789'],\n resolve: resolveYamlFloat,\n identify: (object) =>\n // No ancient boxed numbers support\n typeof object === 'number' &&\n (\n // We land here all numbers, not handled (declined) by !!int `.identify`\n // The same condition as for !!int, but reversed.\n\n // Filter out integers...\n !Number.isInteger(object) ||\n // but allow negative zero\n Object.is(object, -0) ||\n // and integers with exponential form\n object.toString(10).indexOf('e') >= 0\n ),\n represent: representYamlFloat\n})\n\nexport { floatCoreTag }\n","import { defineScalarTag, NOT_RESOLVED } from '../../tag.ts'\n\n// YAML 1.2 JSON schema implicit resolution:\n// -? ( 0 | [1-9] [0-9]* ) ( \\. [0-9]* )? ( [eE] [-+]? [0-9]+ )?\nconst YAML_FLOAT_IMPLICIT_PATTERN = new RegExp(\n // 2.5e4, 2.5 and integers\n '^-?(?:0|[1-9][0-9]*)(?:\\\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$')\n\n// Explicit `!!float` validation is separate from JSON implicit resolution.\nconst YAML_FLOAT_EXPLICIT_PATTERN = new RegExp(\n // 2.5e4, 2.5 and integers\n '^(?:[-+]?[0-9]+(?:\\\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?' +\n // .2e4, .2\n '|[-+]?\\\\.[0-9]+(?:[eE][-+]?[0-9]+)?' +\n // .inf\n '|[-+]?\\\\.(?:inf|Inf|INF)' +\n // .nan\n '|\\\\.(?:nan|NaN|NAN))$')\n\nfunction resolveYamlFloat (source: string, isExplicit: boolean) {\n if (isExplicit) {\n if (!YAML_FLOAT_EXPLICIT_PATTERN.test(source)) return NOT_RESOLVED\n\n let value = source.toLowerCase()\n const sign = value[0] === '-' ? -1 : 1\n\n if ('+-'.includes(value[0])) value = value.slice(1)\n\n if (value === '.inf') return sign === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY\n if (value === '.nan') return NaN\n\n const result = sign * parseFloat(value)\n return Number.isFinite(result) ? result : NOT_RESOLVED\n }\n\n if (!YAML_FLOAT_IMPLICIT_PATTERN.test(source)) return NOT_RESOLVED\n\n const result = Number(source)\n\n if (Number.isFinite(result)) return result\n return NOT_RESOLVED\n}\n\nfunction representYamlFloat (object: number) {\n if (isNaN(object)) return '.nan'\n if (object === Number.POSITIVE_INFINITY) return '.inf'\n if (object === Number.NEGATIVE_INFINITY) return '-.inf'\n if (Object.is(object, -0)) return '-0.0'\n\n const result = object.toString(10)\n return /^[-+]?[0-9]+e/.test(result) ? result.replace('e', '.e') : result\n}\n\n/** @category Tags */\nconst floatJsonTag = defineScalarTag('tag:yaml.org,2002:float', {\n implicit: true,\n // Superset of source.charAt(0) over all matched inputs: optional '-' or digit.\n implicitFirstChars: ['-', ...'0123456789'],\n resolve: resolveYamlFloat,\n identify: (object) =>\n // No ancient boxed numbers support\n typeof object === 'number' &&\n (\n // We land here all numbers, not handled (declined) by !!int `.identify`\n // The same condition as for !!int, but reversed.\n\n // Filter out integers...\n !Number.isInteger(object) ||\n // but allow negative zero\n Object.is(object, -0) ||\n // and integers with exponential form\n object.toString(10).indexOf('e') >= 0\n ),\n represent: representYamlFloat\n})\n\nexport { floatJsonTag }\n","import { defineScalarTag, NOT_RESOLVED } from '../../tag.ts'\n\nconst YAML_FLOAT_PATTERN = new RegExp(\n // 2.5e4, 2.5 and integers\n '^(?:[-+]?(?:(?:[0-9][0-9_]*)?\\\\.[0-9_]*)(?:[eE][-+][0-9]+)?' +\n // 190:20:30.15\n '|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\\\.[0-9_]*' +\n // .inf\n '|[-+]?\\\\.(?:inf|Inf|INF)' +\n // .nan\n '|\\\\.(?:nan|NaN|NAN))$')\n\nconst YAML_FLOAT_SPECIAL_PATTERN = new RegExp(\n '^(?:' +\n // .inf\n '[-+]?\\\\.(?:inf|Inf|INF)' +\n // .nan\n '|\\\\.(?:nan|NaN|NAN))$')\n\nfunction resolveYamlFloat (source: string) {\n if (!YAML_FLOAT_PATTERN.test(source)) return NOT_RESOLVED\n\n let value = source.toLowerCase().replace(/_/g, '')\n const sign = value[0] === '-' ? -1 : 1\n\n if ('+-'.includes(value[0])) value = value.slice(1)\n\n if (value === '.inf') return sign === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY\n if (value === '.nan') return NaN\n\n let result = 0\n\n if (value.includes(':')) {\n for (const part of value.split(':')) result = result * 60 + Number(part)\n result *= sign\n } else {\n result = sign * parseFloat(value)\n }\n\n if (Number.isFinite(result) || YAML_FLOAT_SPECIAL_PATTERN.test(source)) return result\n return NOT_RESOLVED\n}\n\nfunction representYamlFloat (object: number) {\n if (isNaN(object)) return '.nan'\n if (object === Number.POSITIVE_INFINITY) return '.inf'\n if (object === Number.NEGATIVE_INFINITY) return '-.inf'\n if (Object.is(object, -0)) return '-0.0'\n\n const result = object.toString(10)\n return /^[-+]?[0-9]+e/.test(result) ? result.replace('e', '.e') : result\n}\n\n/** @category Tags */\nconst floatYaml11Tag = defineScalarTag('tag:yaml.org,2002:float', {\n implicit: true,\n // Superset of source.charAt(0) over all matched inputs: optional sign, '.', or digit\n // ('.inf'/'.nan' start with '.').\n implicitFirstChars: ['-', '+', '.', ...'0123456789'],\n resolve: resolveYamlFloat,\n identify: (object) =>\n // No ancient boxed numbers support\n typeof object === 'number' &&\n (\n // We land here all numbers, not handled (declined) by !!int `.identify`\n // The same condition as for !!int, but reversed.\n\n // Filter out integers...\n !Number.isInteger(object) ||\n // but allow negative zero\n Object.is(object, -0) ||\n // and integers with exponential form\n object.toString(10).indexOf('e') >= 0\n ),\n represent: representYamlFloat\n})\n\nexport { floatYaml11Tag }\n","import { defineScalarTag, NOT_RESOLVED } from '../../tag.ts'\n\n/**\n * Enables merge keys in {@link CORE_SCHEMA} when added with\n * {@link Schema.withTags}.\n *\n * @category Tags\n */\nconst mergeTag = defineScalarTag('tag:yaml.org,2002:merge', {\n implicit: true,\n // source.charAt(0) over matched implicit inputs: '<' ('<<').\n implicitFirstChars: ['<'],\n // Merge semantics live in the tag, not in the value: the constructor acts on\n // a key tagged `!!merge`, so `<<` anywhere else is just this string.\n resolve: (source, isExplicit) => {\n if (source === '<<' || (isExplicit && source === '')) return '<<'\n return NOT_RESOLVED\n },\n identify: () => false\n})\n\nexport { mergeTag }\n","import { defineScalarTag, NOT_RESOLVED } from '../../tag.ts'\n\nconst BASE64_PATTERN = /^[A-Za-z0-9+/]*={0,2}$/\n\nfunction resolveYamlBinary (source: string) {\n // Strip allowed whitespace first, so validation stays a plain base64 check.\n const input = source.replace(/\\s/g, '')\n if (input.length % 4 !== 0 || !BASE64_PATTERN.test(input)) return NOT_RESOLVED\n\n const binary = atob(input)\n const result = new Uint8Array(binary.length)\n for (let index = 0; index < binary.length; index++) {\n result[index] = binary.charCodeAt(index)\n }\n return result\n}\n\nfunction representYamlBinary (object: Uint8Array) {\n let binary = ''\n for (let index = 0; index < object.length; index++) {\n binary += String.fromCharCode(object[index])\n }\n return btoa(binary)\n}\n\n/**\n * The `!!binary` tag, represented as a `Uint8Array`.\n *\n * @category Tags\n */\nconst binaryTag = defineScalarTag('tag:yaml.org,2002:binary', {\n resolve: resolveYamlBinary,\n identify: (object) => Object.prototype.toString.call(object) === '[object Uint8Array]',\n represent: representYamlBinary\n})\n\nexport { binaryTag }\n","import { defineScalarTag, NOT_RESOLVED } from '../../tag.ts'\n\nconst YAML_DATE_REGEXP = new RegExp(\n '^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$')\n\nconst YAML_TIMESTAMP_REGEXP = new RegExp(\n '^([0-9][0-9][0-9][0-9])' +\n '-([0-9][0-9]?)' +\n '-([0-9][0-9]?)' +\n '(?:[Tt]|[ \\\\t]+)' +\n '([0-9][0-9]?)' +\n ':([0-9][0-9])' +\n ':([0-9][0-9])' +\n '(?:\\\\.([0-9]*))?' +\n '(?:[ \\\\t]*(Z|([-+])([0-9][0-9]?)' +\n '(?::([0-9][0-9]))?))?$')\n\nfunction makeUtcDate (\n year: number,\n month: number,\n day: number,\n hour = 0,\n minute = 0,\n second = 0,\n fraction = 0\n) {\n const date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction))\n\n // Date.UTC() treats years 0..99 as 1900..1999. Restore the parsed YAML year\n // before validating calendar normalization, e.g. reject 0001-02-29.\n date.setUTCFullYear(year, month, day)\n\n return date\n}\n\nfunction resolveYamlTimestamp (source: string) {\n let match = YAML_DATE_REGEXP.exec(source)\n if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(source)\n if (match === null) return NOT_RESOLVED\n\n const year = +(match[1])\n const month = +(match[2]) - 1\n const day = +(match[3])\n\n // Date-only form (`YYYY-MM-DD`) has no time captures.\n if (!match[4]) {\n const date = makeUtcDate(year, month, day)\n // Reject dates that JS would normalize, e.g. 2023-02-29 -> 2023-03-01.\n if (date.getUTCFullYear() !== year || date.getUTCMonth() !== month || date.getUTCDate() !== day) {\n return NOT_RESOLVED\n }\n return date\n }\n\n const hour = +(match[4])\n const minute = +(match[5])\n const second = +(match[6])\n let fraction = 0\n\n // Reject times that JS would normalize into the next minute/hour/day.\n if (hour > 23 || minute > 59 || second > 59) return NOT_RESOLVED\n\n if (match[7]) {\n let value = match[7].slice(0, 3)\n while (value.length < 3) value += '0'\n fraction = +value\n }\n\n const date = makeUtcDate(year, month, day, hour, minute, second, fraction)\n\n // Reject invalid calendar dates before applying timezone offset.\n if (date.getUTCFullYear() !== year || date.getUTCMonth() !== month || date.getUTCDate() !== day) {\n return NOT_RESOLVED\n }\n\n if (match[9]) {\n const offsetHour = +(match[10])\n const offsetMinute = +(match[11] || 0)\n // Reject timezone offsets that JS date arithmetic would otherwise accept.\n if (offsetHour > 23 || offsetMinute > 59) return NOT_RESOLVED\n\n const offset = (offsetHour * 60 + offsetMinute) * 60000\n date.setTime(date.getTime() - (match[9] === '-' ? -offset : offset))\n }\n\n return date\n}\n\n/**\n * The YAML 1.1 `!!timestamp` tag, represented as a JavaScript `Date`.\n *\n * @category Tags\n */\nconst timestampTag = defineScalarTag('tag:yaml.org,2002:timestamp', {\n implicit: true,\n // Both patterns start with a 4-digit year, so source.charAt(0) is always a digit.\n implicitFirstChars: [...'0123456789'],\n resolve: resolveYamlTimestamp,\n identify: (object) => object instanceof Date,\n represent: (object: Date) => object.toISOString()\n})\n\nexport { timestampTag }\n","import { defineSequenceTag } from '../../tag.ts'\n\n/** @category Tags */\nconst seqTag = defineSequenceTag('tag:yaml.org,2002:seq', {\n create: () => [] as unknown[],\n addItem: (container, item) => {\n container.push(item)\n },\n identify: Array.isArray\n})\n\nexport { seqTag }\n","function isPlainObject (data: unknown): boolean {\n if (data === null || typeof data !== 'object' || Array.isArray(data)) return false\n const prototype = Object.getPrototypeOf(data)\n return prototype === null || prototype === Object.prototype\n}\n\n// Project `object` onto `keys`. Absent keys are skipped (so the result can be\n// safely spread over defaults without clobbering them with `undefined`), hence\n// the `Partial` return.\nfunction pick (object: T, keys: readonly K[]): Partial> {\n const result: Partial> = {}\n for (const key of keys) {\n if (object[key] !== undefined) result[key] = object[key]\n }\n return result\n}\n\nexport {\n isPlainObject,\n pick\n}\n","import { defineSequenceTag } from '../../tag.ts'\nimport { isPlainObject } from '../../common/object.ts'\n\n/**\n * Provided only for YAML 1.1 compatibility and supported by the loader only.\n * JavaScript has no dedicated class to represent this type, so it cannot be\n * identified and dumped.\n *\n * ```yaml\n * !!omap\n * - one: 1\n * - two: 2\n * ```\n *\n * is loaded as\n *\n * ```javascript\n * [\n * { one: 1 },\n * { two: 2 }\n * ]\n * ```\n *\n * @category Tags\n */\nconst omapTag = defineSequenceTag('tag:yaml.org,2002:omap', {\n create: (): { list: unknown[]; seen: Set } => ({ list: [], seen: new Set() }),\n addItem: (carrier, item) => {\n let key: unknown\n\n if (item instanceof Map) {\n if (item.size !== 1) return 'cannot resolve an ordered map item'\n key = item.keys().next().value\n } else if (isPlainObject(item)) {\n const itemKeys = Object.keys(item as Record)\n if (itemKeys.length !== 1) return 'cannot resolve an ordered map item'\n key = itemKeys[0]\n } else {\n return 'cannot resolve an ordered map item'\n }\n\n if (carrier.seen.has(key)) return 'duplicate key in ordered map'\n carrier.seen.add(key)\n carrier.list.push(item)\n return ''\n },\n finalize: (carrier): unknown[] => carrier.list,\n identify: () => false\n})\n\nexport { omapTag }\n","import { defineSequenceTag } from '../../tag.ts'\n\n/**\n * Provided only for YAML 1.1 compatibility and supported by the loader only.\n * JavaScript has no dedicated class to represent this type, so it cannot be\n * identified and dumped.\n *\n * ```yaml\n * !!pairs\n * - one: 1\n * - two: 2\n * ```\n *\n * is loaded as\n *\n * ```javascript\n * [\n * ['one', 1],\n * ['two', 2]\n * ]\n * ```\n *\n * @category Tags\n */\nconst pairsTag = defineSequenceTag('tag:yaml.org,2002:pairs', {\n create: () => [] as [unknown, unknown][],\n addItem: (container, item) => {\n if (item instanceof Map) {\n if (item.size !== 1) return 'cannot resolve a pairs item'\n\n container.push(item.entries().next().value!)\n return ''\n }\n\n if (Object.prototype.toString.call(item) !== '[object Object]') {\n return 'cannot resolve a pairs item'\n }\n\n const object = item as Record\n const keys = Object.keys(object)\n\n if (keys.length !== 1) return 'cannot resolve a pairs item'\n\n container.push([keys[0], object[keys[0]]])\n return ''\n },\n identify: () => false\n})\n\nexport { pairsTag }\n","import { defineMappingTag } from '../../tag.ts'\nimport { isPlainObject } from '../../common/object.ts'\n\n/**\n * This is the default mapping implementation. It uses `{}` objects and has only\n * partial functionality due to language limitations. This choice was made\n * because users expect to get JavaScript objects, and it was left unchanged to\n * avoid too many breaking changes in the v5 release.\n *\n * Side effects:\n *\n * - `Object.hasOwn()` checks or `for...of` loops are required for safe use (to\n * avoid falling through to prototypes).\n * - Only scalar string keys are supported properly.\n * - Other scalar keys, such as `null` and numbers, are converted to strings.\n * This is historical behaviour, and it can cause side effects such as\n * problems with `!!merge`.\n *\n * Note that non-string scalar keys may be deprecated in future versions.\n *\n * Ideally, use {@link realMapTag} instead.\n *\n * @category Tags\n */\nconst mapTag = defineMappingTag('tag:yaml.org,2002:map', {\n create: (): Record => ({}),\n identify: isPlainObject,\n // Dump side: wrap the plain object into the canonical `Map` form the writer\n // walks. Shallow — keys/values stay references to the originals.\n represent: (o: Record) => {\n const map = new Map()\n for (const key of Object.keys(o)) map.set(key, o[key])\n return map\n },\n addPair: (container, key, value) => {\n if (key !== null && typeof key === 'object') {\n return 'object-based map does not support complex keys'\n }\n const normalizedKey = String(key)\n if (normalizedKey === '__proto__') {\n // Define as an own data property so a literal `__proto__` key stays data\n // and never invokes the prototype setter.\n Object.defineProperty(container, normalizedKey, {\n value, enumerable: true, configurable: true, writable: true\n })\n } else {\n container[normalizedKey] = value\n }\n return ''\n },\n // hasOwn, not `in`: a plain object inherits `toString` and friends.\n has: (container, key) => {\n if (key !== null && typeof key === 'object') return false\n return Object.prototype.hasOwnProperty.call(container, String(key))\n },\n keys: (container) => Object.keys(container),\n get: (container, key) => {\n const normalizedKey = String(key)\n // key is from `keys()` only. Strong check is not needed, but leave for sure.\n if (!Object.prototype.hasOwnProperty.call(container, normalizedKey)) return null\n return container[normalizedKey]\n }\n})\n\nexport { mapTag, isPlainObject }\n","import { defineMappingTag } from '../../tag.ts'\n\n/**\n * The YAML 1.1 `!!set` tag, represented as a JavaScript `Set`.\n *\n * @category Tags\n */\nconst setTag = defineMappingTag('tag:yaml.org,2002:set', {\n create: () => new Set(),\n identify: (data) => data instanceof Set,\n represent: (data: Set) => {\n const map = new Map()\n for (const key of data) map.set(key, null)\n return map\n },\n addPair: (container, key, value) => {\n if (value !== null) return 'cannot resolve a set item'\n container.add(key)\n return ''\n },\n has: (container, key) => container.has(key),\n keys: (container) => container.keys(),\n get: () => null\n})\n\nexport { setTag }\n","import {\n NOT_RESOLVED,\n type MappingTagDefinition,\n type ScalarTagDefinition,\n type SequenceTagDefinition,\n type TagDefinition\n} from './tag.ts'\nimport { strTag } from './tag/scalar/str.ts'\nimport { nullCoreTag } from './tag/scalar/null_core.ts'\nimport { nullJsonTag } from './tag/scalar/null_json.ts'\nimport { nullYaml11Tag } from './tag/scalar/null_yaml11.ts'\nimport { boolCoreTag } from './tag/scalar/bool_core.ts'\nimport { boolJsonTag } from './tag/scalar/bool_json.ts'\nimport { boolYaml11Tag } from './tag/scalar/bool_yaml11.ts'\nimport { intCoreTag } from './tag/scalar/int_core.ts'\nimport { intJsonTag } from './tag/scalar/int_json.ts'\nimport { intYaml11Tag } from './tag/scalar/int_yaml11.ts'\nimport { floatCoreTag } from './tag/scalar/float_core.ts'\nimport { floatJsonTag } from './tag/scalar/float_json.ts'\nimport { floatYaml11Tag } from './tag/scalar/float_yaml11.ts'\nimport { mergeTag } from './tag/scalar/merge.ts'\nimport { binaryTag } from './tag/scalar/binary.ts'\nimport { timestampTag } from './tag/scalar/timestamp.ts'\nimport { seqTag } from './tag/sequence/seq.ts'\nimport { omapTag } from './tag/sequence/omap.ts'\nimport { pairsTag } from './tag/sequence/pairs.ts'\nimport { mapTag } from './tag/mapping/map.ts'\nimport { setTag } from './tag/mapping/set.ts'\n\ninterface TagDefinitionMap {\n scalar: Record\n sequence: Record\n mapping: Record\n}\n\ninterface TagDefinitionListMap {\n scalar: ScalarTagDefinition[]\n sequence: SequenceTagDefinition[]\n mapping: MappingTagDefinition[]\n}\n\nfunction createTagDefinitionMap (): TagDefinitionMap {\n return {\n scalar: Object.create(null),\n sequence: Object.create(null),\n mapping: Object.create(null)\n }\n}\n\nfunction createTagDefinitionListMap (): TagDefinitionListMap {\n return {\n scalar: [],\n sequence: [],\n mapping: []\n }\n}\n\nfunction compileTags (tags: readonly TagDefinition[]) {\n const result: TagDefinition[] = []\n\n for (const tag of tags) {\n let index = result.length\n\n for (let previousIndex = 0; previousIndex < result.length; previousIndex++) {\n const previous = result[previousIndex]\n\n if (previous.nodeKind === tag.nodeKind &&\n previous.tagName === tag.tagName &&\n previous.matchByTagPrefix === tag.matchByTagPrefix) {\n index = previousIndex\n break\n }\n }\n\n result[index] = tag\n }\n\n return result\n}\n\n/**\n * Controls tag resolution when loading and type selection when dumping.\n *\n * @category Schemas\n */\nclass Schema {\n readonly tags: readonly TagDefinition[]\n /** @internal */\n readonly implicitScalarTags: readonly ScalarTagDefinition[]\n\n /**\n * Dispatch implicit scalar resolvers by `source.charAt(0)`. Each bucket holds\n * the resolvers that may match that key, in schema order; a key absent from\n * the map uses\n * {@link Schema.implicitScalarAnyFirstChar}\n * (resolvers that declared no first-char constraint, so they apply to any\n * first character).\n */\n private readonly implicitScalarByFirstChar: ReadonlyMap\n private readonly implicitScalarAnyFirstChar: readonly ScalarTagDefinition[]\n\n /**\n * The default scalar tag (`!!str`), resolved once so the composer's fallback\n * for unresolved plain scalars avoids a keyed lookup per scalar.\n *\n * @internal\n */\n readonly defaultScalarTag: ScalarTagDefinition\n\n /**\n * The default container tags (`!!seq` / `!!map`), used by the dumper: when a\n * value is identified by its default tag, the tag is implicit and not\n * printed. Undefined if the schema does not define them (then such values\n * can't be dumped).\n *\n * @internal\n */\n readonly defaultSequenceTag: SequenceTagDefinition | undefined\n /** @internal */\n readonly defaultMappingTag: MappingTagDefinition | undefined\n private readonly exact: TagDefinitionMap\n private readonly prefix: TagDefinitionListMap\n\n constructor (tags: readonly TagDefinition[]) {\n const compiledTags = compileTags(tags)\n const implicitScalarTags: ScalarTagDefinition[] = []\n const exact = createTagDefinitionMap()\n const prefix = createTagDefinitionListMap()\n\n for (const tag of compiledTags) {\n if (tag.nodeKind === 'scalar' && tag.implicit) {\n if (tag.matchByTagPrefix) {\n throw new Error('Implicit scalar tags cannot match by tag prefix')\n }\n\n implicitScalarTags.push(tag)\n }\n\n switch (tag.nodeKind) {\n case 'scalar':\n if (tag.matchByTagPrefix) prefix.scalar.push(tag)\n else exact.scalar[tag.tagName] = tag\n break\n case 'sequence':\n if (tag.matchByTagPrefix) prefix.sequence.push(tag)\n else exact.sequence[tag.tagName] = tag\n break\n case 'mapping':\n if (tag.matchByTagPrefix) prefix.mapping.push(tag)\n else exact.mapping[tag.tagName] = tag\n break\n }\n }\n\n const implicitScalarAnyFirstChar = implicitScalarTags.filter(tag => tag.implicitFirstChars === null)\n\n const keys = new Set()\n for (const tag of implicitScalarTags) {\n if (tag.implicitFirstChars !== null) {\n for (const key of tag.implicitFirstChars) keys.add(key)\n }\n }\n\n const implicitScalarByFirstChar = new Map()\n for (const key of keys) {\n implicitScalarByFirstChar.set(key, implicitScalarTags.filter(tag =>\n tag.implicitFirstChars === null || tag.implicitFirstChars.indexOf(key) !== -1))\n }\n\n const defaultScalarTag = exact.scalar['tag:yaml.org,2002:str']\n if (!defaultScalarTag) throw new Error('schema does not define the default scalar tag (tag:yaml.org,2002:str)')\n\n this.tags = compiledTags\n this.implicitScalarTags = implicitScalarTags\n this.implicitScalarByFirstChar = implicitScalarByFirstChar\n this.implicitScalarAnyFirstChar = implicitScalarAnyFirstChar\n this.defaultScalarTag = defaultScalarTag\n this.defaultSequenceTag = exact.sequence['tag:yaml.org,2002:seq']\n this.defaultMappingTag = exact.mapping['tag:yaml.org,2002:map']\n this.exact = exact\n this.prefix = prefix\n }\n\n /** @internal */\n lookupScalarTag (tagName: string): ScalarTagDefinition | undefined {\n const exactTag = this.exact.scalar[tagName]\n if (exactTag) return exactTag\n\n for (const tag of this.prefix.scalar) {\n if (tagName.startsWith(tag.tagName)) return tag\n }\n\n return undefined\n }\n\n /** @internal */\n lookupSequenceTag (tagName: string): SequenceTagDefinition | undefined {\n const exactTag = this.exact.sequence[tagName]\n if (exactTag) return exactTag\n\n for (const tag of this.prefix.sequence) {\n if (tagName.startsWith(tag.tagName)) return tag\n }\n\n return undefined\n }\n\n /** @internal */\n lookupMappingTag (tagName: string): MappingTagDefinition | undefined {\n const exactTag = this.exact.mapping[tagName]\n if (exactTag) return exactTag\n\n for (const tag of this.prefix.mapping) {\n if (tagName.startsWith(tag.tagName)) return tag\n }\n\n return undefined\n }\n\n /** @internal */\n resolveImplicitScalarTag (source: string): { value: unknown, tag: ScalarTagDefinition } {\n const candidates = this.implicitScalarByFirstChar.get(source.charAt(0)) ??\n this.implicitScalarAnyFirstChar\n\n for (const tag of candidates) {\n const value = tag.resolve(source, false, tag.tagName)\n if (value !== NOT_RESOLVED) return { value, tag }\n }\n\n const tag = this.defaultScalarTag\n return { value: tag.resolve(source, false, tag.tagName), tag }\n }\n\n /**\n * Creates a new schema with the specified tags added. If a tag already\n * exists, it is replaced by the specified tag.\n *\n * @example\n *\n * ```javascript\n * import { CORE_SCHEMA, mergeTag, realMapTag } from 'js-yaml'\n *\n * const schema = CORE_SCHEMA.withTags(mergeTag, realMapTag)\n * ```\n */\n withTags (...tags: Array): Schema {\n let flatTags: TagDefinition[] = []\n for (const tag of tags) flatTags = flatTags.concat(tag)\n\n return new Schema([...this.tags, ...flatTags])\n }\n}\n\n/**\n * The YAML 1.2 Failsafe Schema: strings, sequences, and mappings.\n *\n * @category Schemas\n */\nconst FAILSAFE_SCHEMA = new Schema([\n strTag,\n seqTag,\n mapTag\n])\n\n/**\n * The YAML 1.2 JSON Schema. It uses JSON scalar forms while retaining YAML\n * collection syntax.\n *\n * @category Schemas\n */\nconst JSON_SCHEMA = new Schema([\n ...FAILSAFE_SCHEMA.tags,\n nullJsonTag,\n boolJsonTag,\n intJsonTag,\n floatJsonTag\n])\n\n/**\n * The default schema for the loaders. Note, {@link CORE_SCHEMA} comes\n * without the `!!merge` tag. You can easily enable it if needed.\n *\n * @example\n * Enable {@link mergeTag}:\n *\n * ```javascript\n * import { load, CORE_SCHEMA, mergeTag } from 'js-yaml'\n *\n * try {\n * load(data, { schema: CORE_SCHEMA.withTags(mergeTag) })\n * } catch (e) {\n * console.error(e)\n * }\n * ```\n *\n * @category Schemas\n */\nconst CORE_SCHEMA = new Schema([\n ...FAILSAFE_SCHEMA.tags,\n nullCoreTag,\n boolCoreTag,\n intCoreTag,\n floatCoreTag\n])\n\n/**\n * YAML 1.1-compatible schema.\n *\n * @category Schemas\n */\nconst YAML11_SCHEMA = new Schema([\n ...FAILSAFE_SCHEMA.tags,\n nullYaml11Tag,\n boolYaml11Tag,\n intYaml11Tag,\n floatYaml11Tag,\n timestampTag,\n mergeTag,\n binaryTag,\n omapTag,\n pairsTag,\n setTag\n])\n\n/**\n * The dumper schema for maximum compatibility. It combines all supported type\n * variants from YAML 1.1 and YAML 1.2 so strings matching any of them are\n * quoted. This makes the generated YAML more compatible with other parsers.\n *\n * The schema is based on YAML 1.1, but extends `!!int` and `!!float` to accept\n * both YAML 1.1 and Core Schema forms, since Core Schema supports some forms\n * that YAML 1.1 does not.\n *\n * @category Schemas\n */\nconst DUMP_SCHEMA = YAML11_SCHEMA.withTags(\n {\n ...intYaml11Tag,\n resolve: (source, isExplicit, tagName) => {\n const result = intYaml11Tag.resolve(source, isExplicit, tagName)\n return result === NOT_RESOLVED ? intCoreTag.resolve(source, isExplicit, tagName) : result\n }\n },\n {\n ...floatYaml11Tag,\n resolve: (source, isExplicit, tagName) => {\n const result = floatYaml11Tag.resolve(source, isExplicit, tagName)\n return result === NOT_RESOLVED ? floatCoreTag.resolve(source, isExplicit, tagName) : result\n }\n }\n)\n\nexport {\n Schema,\n FAILSAFE_SCHEMA,\n JSON_SCHEMA,\n CORE_SCHEMA,\n YAML11_SCHEMA,\n DUMP_SCHEMA\n}\n","import { defineMappingTag } from '../../tag.ts'\nimport { isPlainObject } from '../../common/object.ts'\n\n/**\n * Recommended when non-string keys are actually needed. It uses native\n * JavaScript `Map` objects, so keys keep their constructed types instead of\n * being converted to strings.\n *\n * It is not the default to avoid widespread breaking changes in existing\n * projects. `Map` has a different access API and does not pass deep equality\n * checks against `{}`-based fixtures. Alongside the other changes in v5,\n * making it the default was considered too disruptive.\n *\n * If these differences are acceptable for your project, we recommend using\n * {@link realMapTag} to guarantee the absence of problems and side effects.\n *\n * @example\n * Enable {@link realMapTag}:\n *\n * ```javascript\n * import { load, CORE_SCHEMA, realMapTag } from 'js-yaml'\n *\n * try {\n * load(data, { schema: CORE_SCHEMA.withTags(realMapTag) })\n * } catch (e) {\n * console.error(e)\n * }\n * ```\n *\n * @category Tags\n */\nconst realMapTag = defineMappingTag('tag:yaml.org,2002:map', {\n create: () => new Map(),\n addPair: (container: Map, key, value) => {\n container.set(key, value)\n return ''\n },\n has: (container: Map, key) => container.has(key),\n keys: (container: Map) => container.keys(),\n get: (container: Map, key) => container.get(key),\n // Dump side: handle both a real `Map` and a plain object, so this tag fully\n // replaces the default map representation when dumping too.\n identify: (data) => data instanceof Map || isPlainObject(data),\n // Dump side: the canonical mapping form is a `Map`. A real `Map` passes\n // through untouched (keys keep their type); a plain object is wrapped\n // shallowly. Lossless — nothing is stringified.\n represent: (data) => {\n if (data instanceof Map) return data\n const map = new Map()\n const obj = data as Record\n for (const key of Object.keys(obj)) map.set(key, obj[key])\n return map\n }\n})\n\nexport { realMapTag }\n","import { defineMappingTag } from '../../tag.ts'\nimport { isPlainObject } from '../../common/object.ts'\n\n// Coerce a constructed key into the string identity a `{}` representation uses.\n// Returns null for a nested array key (an array element that is itself an\n// array), which would otherwise blow up exponentially when stringified via\n// aliases.\nfunction normalizeKey (key: unknown): string | null {\n if (Array.isArray(key)) {\n const array = Array.prototype.slice.call(key) as unknown[]\n\n for (let index = 0; index < array.length; index++) {\n if (Array.isArray(array[index])) return null\n\n if (typeof array[index] === 'object' &&\n Object.prototype.toString.call(array[index]) === '[object Object]') {\n array[index] = '[object Object]'\n }\n }\n\n return String(array)\n }\n\n if (typeof key === 'object' &&\n Object.prototype.toString.call(key) === '[object Object]') {\n return '[object Object]'\n }\n\n return String(key)\n}\n\n/**\n * This implementation exists solely to reproduce v4 behavior exactly. Its use\n * is strongly discouraged. If complex or non-string keys are needed, use\n * {@link realMapTag} instead.\n *\n * @category Tags\n */\nconst legacyMapTag = defineMappingTag('tag:yaml.org,2002:map', {\n create: (): Record => ({}),\n identify: isPlainObject,\n // Dump side: wrap the plain object into the canonical `Map` form the writer\n // walks. Shallow — keys/values stay references to the originals.\n represent: (o: Record) => {\n const map = new Map()\n for (const key of Object.keys(o)) map.set(key, o[key])\n return map\n },\n addPair: (container, key, value) => {\n const normalizedKey = normalizeKey(key)\n if (normalizedKey === null) return 'nested arrays are not supported inside keys'\n if (normalizedKey === '__proto__') {\n // Define as an own data property so a literal `__proto__` key stays data\n // and never invokes the prototype setter.\n Object.defineProperty(container, normalizedKey, {\n value, enumerable: true, configurable: true, writable: true\n })\n } else {\n container[normalizedKey] = value\n }\n return ''\n },\n // hasOwn, not `in`: a plain object inherits `toString` and friends.\n has: (container, key) => {\n const normalizedKey = normalizeKey(key)\n return normalizedKey !== null && Object.prototype.hasOwnProperty.call(container, normalizedKey)\n },\n keys: (container) => Object.keys(container),\n get: (container, key) => {\n const normalizedKey = String(key)\n // key is from `keys()` only. Strong check is not needed, but leave for sure.\n if (!Object.prototype.hasOwnProperty.call(container, normalizedKey)) return null\n return container[normalizedKey]\n }\n})\n\nexport { legacyMapTag, isPlainObject }\n","export interface SnippetMark {\n name?: string | null\n buffer: string\n position: number\n line: number\n column: number\n snippet?: string | null\n}\n\ninterface SnippetOptions {\n maxLength?: number\n indent?: number\n linesBefore?: number\n linesAfter?: number\n}\n\nconst DEFAULT_SNIPPET_OPTIONS: Required = {\n maxLength: 79,\n indent: 1,\n linesBefore: 3,\n linesAfter: 2\n}\n\n// get snippet for a single line, respecting maxLength\nfunction getLine (buffer: string, lineStart: number, lineEnd: number, position: number, maxLineLength: number) {\n let head = ''\n let tail = ''\n const maxHalfLength = Math.floor(maxLineLength / 2) - 1\n\n if (position - lineStart > maxHalfLength) {\n head = ' ... '\n lineStart = position - maxHalfLength + head.length\n }\n\n if (lineEnd - position > maxHalfLength) {\n tail = ' ...'\n lineEnd = position + maxHalfLength - tail.length\n }\n\n return {\n str: head + buffer.slice(lineStart, lineEnd).replace(/\\t/g, '→') + tail,\n pos: position - lineStart + head.length // relative position\n }\n}\n\nfunction padStart (string: string, max: number) {\n // max() protects from negativa value, to avoid exception.\n return ' '.repeat(Math.max(max - string.length, 0)) + string\n}\n\nfunction makeSnippet (mark: SnippetMark, options?: SnippetOptions) {\n if (!mark.buffer) return null\n\n const opts = { ...DEFAULT_SNIPPET_OPTIONS, ...options }\n\n const re = /\\r?\\n|\\r|\\0/g\n const lineStarts = [0]\n const lineEnds: number[] = []\n let match: RegExpExecArray | null\n let foundLineNo = -1\n\n while ((match = re.exec(mark.buffer))) {\n lineEnds.push(match.index)\n lineStarts.push(match.index + match[0].length)\n\n if (mark.position <= match.index && foundLineNo < 0) {\n foundLineNo = lineStarts.length - 2\n }\n }\n\n if (foundLineNo < 0) foundLineNo = lineStarts.length - 1\n\n let result = ''\n const lineNoLength = Math.min(mark.line + opts.linesAfter, lineEnds.length).toString().length\n const maxLineLength = opts.maxLength - (opts.indent + lineNoLength + 3)\n\n for (let i = 1; i <= opts.linesBefore; i++) {\n if (foundLineNo - i < 0) break\n const line = getLine(\n mark.buffer,\n lineStarts[foundLineNo - i],\n lineEnds[foundLineNo - i],\n mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo - i]),\n maxLineLength\n )\n result = `${' '.repeat(opts.indent)}${padStart((mark.line - i + 1).toString(), lineNoLength)} | ${line.str}\\n${result}`\n }\n\n const line = getLine(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength)\n result += `${' '.repeat(opts.indent)}${padStart((mark.line + 1).toString(), lineNoLength)} | ${line.str}\\n`\n result += `${'-'.repeat(opts.indent + lineNoLength + 3 + line.pos)}^\\n`\n\n for (let i = 1; i <= opts.linesAfter; i++) {\n if (foundLineNo + i >= lineEnds.length) break\n const line = getLine(\n mark.buffer,\n lineStarts[foundLineNo + i],\n lineEnds[foundLineNo + i],\n mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo + i]),\n maxLineLength\n )\n result += `${' '.repeat(opts.indent)}${padStart((mark.line + i + 1).toString(), lineNoLength)} | ${line.str}\\n`\n }\n\n return result.replace(/\\n$/, '')\n}\n\nexport default makeSnippet\n","import makeSnippet, { type SnippetMark } from './snippet.ts'\n\n// YAML error class. http://stackoverflow.com/questions/8458984\n//\nfunction formatError (exception: YAMLException, compact?: boolean) {\n let where = ''\n\n if (!exception.mark) return exception.reason\n\n if (exception.mark.name) {\n where += `in \"${exception.mark.name}\" `\n }\n\n where += `(${exception.mark.line + 1}:${exception.mark.column + 1})`\n\n if (!compact && exception.mark.snippet) {\n where += `\\n\\n${exception.mark.snippet}`\n }\n\n return `${exception.reason} ${where}`\n}\n\n/**\n * A YAML error. Unlike an ordinary `Error`, it adds a source snippet showing\n * the location of the problem to the error message, when available.\n *\n * @category Main\n */\nclass YAMLException extends Error {\n reason: string\n mark?: SnippetMark\n\n /**\n * Optional `mark` contains source snippet data. Usually, use\n * {@link YAMLException.throwAt} instead of passing it directly.\n */\n constructor (reason: string, mark?: SnippetMark) {\n super()\n\n this.name = 'YAMLException'\n this.reason = reason\n this.mark = mark\n this.message = formatError(this, false)\n\n // Guard for ancient browsers\n if (Error.captureStackTrace) {\n // Include stack trace in error object,\n Error.captureStackTrace(this, this.constructor)\n }\n }\n\n /**\n * Returns the formatted error, omitting the source snippet in compact mode.\n */\n toString (compact?: boolean) {\n return `${this.name}: ${formatError(this, compact)}`\n }\n\n /**\n * Builds a YAMLException with a source snippet and throws it. `source` is\n * the raw input text; `position` is an offset into it.\n */\n static throwAt (source: string, position: number, message: string, filename = ''): never {\n let line = 0\n let lineStart = 0\n\n for (let index = 0; index < position; index++) {\n const ch = source.charCodeAt(index)\n\n if (ch === 0x0A/* LF */) {\n line++\n lineStart = index + 1\n } else if (ch === 0x0D/* CR */) {\n line++\n if (source.charCodeAt(index + 1) === 0x0A/* LF */) index++\n lineStart = index + 1\n }\n }\n\n const mark: SnippetMark = {\n name: filename,\n buffer: source,\n position,\n line,\n column: position - lineStart\n }\n\n mark.snippet = makeSnippet(mark)\n throw new YAMLException(message, mark)\n }\n}\n\nexport { YAMLException }\n","/** @category Events */\nconst EVENT_ID = {\n DOCUMENT: 1,\n SEQUENCE: 2,\n MAPPING: 3,\n SCALAR: 4,\n ALIAS: 5,\n POP: 6\n} as const\n\n/** @category Events */\ntype EventId = typeof EVENT_ID[keyof typeof EVENT_ID]\n\n/** @category Nodes */\nconst SCALAR_STYLE = {\n PLAIN: 1,\n SINGLE_QUOTED: 2,\n DOUBLE_QUOTED: 3,\n LITERAL_BLOCK: 4,\n FOLDED_BLOCK: 5\n} as const\n\n/** @category Nodes */\ntype ScalarStyle = typeof SCALAR_STYLE[keyof typeof SCALAR_STYLE]\n\n/** @category Nodes */\nconst COLLECTION_STYLE = {\n BLOCK: 1,\n FLOW: 2\n} as const\n\n/** @category Nodes */\ntype CollectionStyle = typeof COLLECTION_STYLE[keyof typeof COLLECTION_STYLE]\n\n/** @category Nodes */\nconst CHOMPING_MODE = {\n CLIP: 1,\n STRIP: 2,\n KEEP: 3\n} as const\n\n/** @category Nodes */\ntype ChompingMode = typeof CHOMPING_MODE[keyof typeof CHOMPING_MODE]\n\n/** @category Events */\ntype DocumentDirective =\n { kind: 'yaml', version: string } |\n { kind: 'tag', handle: string, prefix: string }\n\ntype TagHandlers = Record\n\n/** @category Events */\ninterface DocumentEvent {\n type: typeof EVENT_ID.DOCUMENT\n explicitStart: boolean\n explicitEnd: boolean\n directives: DocumentDirective[]\n}\n\n/** @category Events */\ninterface SequenceEvent {\n type: typeof EVENT_ID.SEQUENCE\n start: number\n anchorStart: number\n anchorEnd: number\n tagStart: number\n tagEnd: number\n style: CollectionStyle\n}\n\n/** @category Events */\ninterface MappingEvent {\n type: typeof EVENT_ID.MAPPING\n start: number\n anchorStart: number\n anchorEnd: number\n tagStart: number\n tagEnd: number\n style: CollectionStyle\n}\n\n/**\n * A scalar whose decoded value can be read with {@link getScalarValue}.\n *\n * @category Events\n */\ninterface ScalarEvent {\n type: typeof EVENT_ID.SCALAR\n valueStart: number\n valueEnd: number\n anchorStart: number\n anchorEnd: number\n tagStart: number\n tagEnd: number\n style: ScalarStyle\n chomping: ChompingMode\n indent: number\n fast: boolean\n}\n\n/** @category Events */\ninterface AliasEvent {\n type: typeof EVENT_ID.ALIAS\n anchorStart: number\n anchorEnd: number\n}\n\n/**\n * Closes the most recently opened document, sequence, or mapping.\n *\n * @category Events\n */\ninterface PopEvent {\n type: typeof EVENT_ID.POP\n}\n\n/**\n * Source ranges are zero-based and end-exclusive; `-1` means absent.\n *\n * @category Events\n */\ntype Event =\n DocumentEvent |\n SequenceEvent |\n MappingEvent |\n ScalarEvent |\n AliasEvent |\n PopEvent\n\nexport {\n EVENT_ID,\n SCALAR_STYLE,\n COLLECTION_STYLE,\n CHOMPING_MODE,\n\n type EventId,\n type ScalarStyle,\n type CollectionStyle,\n type ChompingMode,\n\n type DocumentDirective,\n type TagHandlers,\n type DocumentEvent,\n type SequenceEvent,\n type MappingEvent,\n type ScalarEvent,\n type AliasEvent,\n type PopEvent,\n type Event\n}\n","import {\n SCALAR_STYLE,\n CHOMPING_MODE,\n type ScalarEvent\n} from './events.ts'\n\nconst NO_RANGE = -1\n\n// --- character helpers (mirrors src/loader.ts, kept self-contained here) ---\n\nfunction simpleEscapeSequence (c: number) {\n switch (c) {\n case 0x30/* 0 */: return '\\x00'\n case 0x61/* a */: return '\\x07'\n case 0x62/* b */: return '\\x08'\n case 0x74/* t */: return '\\x09'\n case 0x09/* Tab */: return '\\x09'\n case 0x6E/* n */: return '\\x0A'\n case 0x76/* v */: return '\\x0B'\n case 0x66/* f */: return '\\x0C'\n case 0x72/* r */: return '\\x0D'\n case 0x65/* e */: return '\\x1B'\n case 0x20/* Space */: return ' '\n case 0x22/* \" */: return '\\x22'\n case 0x2F/* / */: return '/'\n case 0x5C/* \\ */: return '\\x5C'\n case 0x4E/* N */: return '\\x85'\n case 0x5F/* _ */: return '\\xA0'\n case 0x4C/* L */: return '\\u2028'\n case 0x50/* P */: return '\\u2029'\n default: return ''\n }\n}\n\nconst simpleEscapeCheck = new Array(256)\nconst simpleEscapeMap = new Array(256)\nfor (let i = 0; i < 256; i++) {\n simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0\n simpleEscapeMap[i] = simpleEscapeSequence(i)\n}\n\nfunction charFromCodepoint (c: number) {\n if (c <= 0xFFFF) {\n return String.fromCharCode(c)\n }\n return String.fromCharCode(\n ((c - 0x010000) >> 10) + 0xD800,\n ((c - 0x010000) & 0x03FF) + 0xDC00\n )\n}\n\nfunction fromHexCode (c: number) {\n if (c >= 0x30/* 0 */ && c <= 0x39/* 9 */) return c - 0x30\n const lc = c | 0x20\n // Double-quoted scalar ranges are validated by parser.ts before cooking.\n return lc - 0x61 + 10\n}\n\nfunction escapedHexLen (c: number) {\n if (c === 0x78/* x */) return 2\n if (c === 0x75/* u */) return 4\n // Double-quoted scalar ranges are validated by parser.ts before cooking.\n return 8\n}\n\n// --- line folding helpers ---\n\n// Skip a run of line breaks plus the leading whitespace of the following\n// lines, returning the number of line breaks consumed and the new position.\nfunction skipFoldedBreaks (input: string, position: number, end: number) {\n let breaks = 0\n\n while (position < end) {\n const ch = input.charCodeAt(position)\n\n if (ch === 0x0A/* LF */) {\n breaks++\n position++\n } else if (ch === 0x0D/* CR */) {\n breaks++\n position++\n if (input.charCodeAt(position) === 0x0A/* LF */) position++\n } else if (ch === 0x20/* Space */ || ch === 0x09/* Tab */) {\n position++\n } else {\n break\n }\n }\n\n return { position, breaks }\n}\n\n// Folding of line breaks between content chunks: a single break becomes a\n// space, several breaks become (count - 1) newlines.\nfunction foldedBreaks (count: number) {\n if (count === 1) return ' '\n // Called only after skipFoldedBreaks() consumed at least one line break.\n return '\\n'.repeat(count - 1)\n}\n\n// --- per-style extractors ---\n\nfunction getPlainValue (input: string, start: number, end: number) {\n let result = ''\n let position = start\n let captureStart = start\n let captureEnd = start\n\n while (position < end) {\n const ch = input.charCodeAt(position)\n\n if (ch === 0x0A/* LF */ || ch === 0x0D/* CR */) {\n result += input.slice(captureStart, captureEnd)\n const fold = skipFoldedBreaks(input, position, end)\n result += foldedBreaks(fold.breaks)\n position = captureStart = captureEnd = fold.position\n } else {\n position++\n if (ch !== 0x20/* Space */ && ch !== 0x09/* Tab */) captureEnd = position\n }\n }\n\n return result + input.slice(captureStart, captureEnd)\n}\n\nfunction getSingleQuotedValue (input: string, start: number, end: number) {\n let result = ''\n let position = start\n let captureStart = start\n let captureEnd = start\n\n while (position < end) {\n const ch = input.charCodeAt(position)\n\n if (ch === 0x27/* ' */) {\n // Within the stored range every quote is part of an escaped '' pair.\n result += input.slice(captureStart, position) + \"'\"\n position += 2\n captureStart = captureEnd = position\n } else if (ch === 0x0A/* LF */ || ch === 0x0D/* CR */) {\n result += input.slice(captureStart, captureEnd)\n const fold = skipFoldedBreaks(input, position, end)\n result += foldedBreaks(fold.breaks)\n position = captureStart = captureEnd = fold.position\n } else {\n position++\n if (ch !== 0x20/* Space */ && ch !== 0x09/* Tab */) captureEnd = position\n }\n }\n\n // Whitespace right before the closing quote is significant (it is only\n // stripped when followed by a line break).\n return result + input.slice(captureStart, end)\n}\n\nfunction getDoubleQuotedValue (input: string, start: number, end: number) {\n let result = ''\n let position = start\n let captureStart = start\n let captureEnd = start\n\n while (position < end) {\n const ch = input.charCodeAt(position)\n\n if (ch === 0x5C/* \\ */) {\n result += input.slice(captureStart, position)\n position++\n const escaped = input.charCodeAt(position)\n\n if (escaped === 0x0A/* LF */ || escaped === 0x0D/* CR */) {\n // Escaped line break: a line continuation that joins with nothing.\n position = skipFoldedBreaks(input, position, end).position\n } else if (escaped < 256 && simpleEscapeCheck[escaped]) {\n result += simpleEscapeMap[escaped]\n position++\n } else {\n // parser.ts has already rejected unknown escapes and invalid hex digits.\n let hexLength = escapedHexLen(escaped)\n let hexResult = 0\n\n for (; hexLength > 0; hexLength--) {\n position++\n const digit = fromHexCode(input.charCodeAt(position))\n hexResult = (hexResult << 4) + digit\n }\n\n result += charFromCodepoint(hexResult)\n position++\n }\n\n captureStart = captureEnd = position\n } else if (ch === 0x0A/* LF */ || ch === 0x0D/* CR */) {\n result += input.slice(captureStart, captureEnd)\n const fold = skipFoldedBreaks(input, position, end)\n result += foldedBreaks(fold.breaks)\n position = captureStart = captureEnd = fold.position\n } else {\n position++\n if (ch !== 0x20/* Space */ && ch !== 0x09/* Tab */) captureEnd = position\n }\n }\n\n return result + input.slice(captureStart, end)\n}\n\nfunction getBlockValue (\n input: string,\n start: number,\n end: number,\n indent: number,\n chomping: number,\n folded: boolean\n) {\n const textIndent = indent < 0 ? 0 : indent\n // The range starts at column 0 of the first line and includes every line\n // break, including those of trailing blank lines.\n const region = input.slice(start, end).replace(/\\r\\n?/g, '\\n')\n // An empty range is a block with no lines at all (e.g. an empty `|+`) and\n // must stay empty; a naive split would invent a phantom blank line. Otherwise\n // a trailing line break leaves a trailing '' from split() that is not a real\n // line (just the terminator of the last one), so drop it. Interior blank\n // lines are kept.\n const lines = region === ''\n ? []\n : (region.endsWith('\\n') ? region.slice(0, -1) : region).split('\\n')\n\n let result = ''\n let didReadContent = false\n let emptyLines = 0\n let atMoreIndented = false\n\n for (const line of lines) {\n // Whitespace beyond the content indentation is part of the content, so the\n // indentation scan stops at textIndent. A line is empty only when nothing\n // remains after the (capped) indentation.\n // indent < 0 means no content line was detected (a wholly blank block), so\n // every line is an empty line.\n let column = 0\n while (column < textIndent && line.charCodeAt(column) === 0x20/* Space */) column++\n\n if (indent < 0 || column >= line.length) {\n emptyLines++\n continue\n }\n\n const content = line.slice(textIndent)\n const first = content.charCodeAt(0)\n\n if (folded) {\n if (first === 0x20/* Space */ || first === 0x09/* Tab */) {\n // More-indented lines are not folded.\n atMoreIndented = true\n result += '\\n'.repeat(didReadContent ? 1 + emptyLines : emptyLines)\n } else if (atMoreIndented) {\n atMoreIndented = false\n result += '\\n'.repeat(emptyLines + 1)\n } else if (emptyLines === 0) {\n if (didReadContent) result += ' '\n } else {\n result += '\\n'.repeat(emptyLines)\n }\n } else {\n result += '\\n'.repeat(didReadContent ? 1 + emptyLines : emptyLines)\n }\n\n result += content\n didReadContent = true\n emptyLines = 0\n }\n\n if (chomping === CHOMPING_MODE.KEEP) {\n result += '\\n'.repeat(didReadContent ? 1 + emptyLines : emptyLines)\n } else if (chomping !== CHOMPING_MODE.STRIP) {\n if (didReadContent) result += '\\n'\n }\n\n return result\n}\n\n/**\n * Decodes the scalar referenced by event offsets in `input`.\n *\n * @category Events\n */\nfunction getScalarValue (input: string, scalar: ScalarEvent): string {\n if (scalar.valueStart === NO_RANGE) return ''\n\n const { valueStart, valueEnd } = scalar\n\n // Fast path: the parser marked this scalar as a verbatim slice of the input\n // (single-line plain / quoted with no escapes or folded breaks), so the\n // per-style char loop below would just reproduce the slice.\n if (scalar.fast) return input.slice(valueStart, valueEnd)\n\n switch (scalar.style) {\n case SCALAR_STYLE.SINGLE_QUOTED:\n return getSingleQuotedValue(input, valueStart, valueEnd)\n case SCALAR_STYLE.DOUBLE_QUOTED:\n return getDoubleQuotedValue(input, valueStart, valueEnd)\n case SCALAR_STYLE.LITERAL_BLOCK:\n return getBlockValue(input, valueStart, valueEnd, scalar.indent, scalar.chomping, false)\n case SCALAR_STYLE.FOLDED_BLOCK:\n return getBlockValue(input, valueStart, valueEnd, scalar.indent, scalar.chomping, true)\n default:\n return getPlainValue(input, valueStart, valueEnd)\n }\n}\n\nexport {\n getScalarValue\n}\n","const DEFAULT_TAG_HANDLERS: Readonly> = Object.assign(\n Object.create(null),\n {\n '!': '!',\n '!!': 'tag:yaml.org,2002:'\n }\n)\n\nfunction tagPercentEncode (source: string) {\n return encodeURI(source).replace(/!/g, '%21')\n}\n\nfunction tagNameFull (rawTag: string, tagHandlers?: Readonly>) {\n if (rawTag.startsWith('!<') && rawTag.endsWith('>')) {\n return decodeURIComponent(rawTag.slice(2, -1))\n }\n\n const handleEnd = rawTag.indexOf('!', 1)\n const handle = handleEnd === -1 ? '!' : rawTag.slice(0, handleEnd + 1)\n const prefix = tagHandlers?.[handle] ?? DEFAULT_TAG_HANDLERS[handle] ?? handle\n\n return decodeURIComponent(prefix) + decodeURIComponent(rawTag.slice(handle.length))\n}\n\nfunction tagNameShort (fullTag: string) {\n let tag = fullTag\n\n if (tag.charCodeAt(0) === 0x21) {\n tag = tag.slice(1)\n return `!${tagPercentEncode(tag)}`\n }\n\n if (tag.slice(0, 18) === 'tag:yaml.org,2002:') {\n return `!!${tagPercentEncode(tag.slice(18))}`\n }\n\n return `!<${tagPercentEncode(tag)}>`\n}\n\nexport {\n tagNameFull,\n tagNameShort\n}\n","import {\n EVENT_ID,\n SCALAR_STYLE,\n type Event,\n type TagHandlers,\n type MappingEvent,\n type ScalarEvent,\n type SequenceEvent\n} from './events.ts'\nimport { getScalarValue } from './parser_scalar.ts'\nimport { CORE_SCHEMA, type Schema } from '../schema.ts'\nimport {\n NOT_RESOLVED,\n type MappingTagDefinition,\n type ScalarTagDefinition,\n type SequenceTagDefinition\n} from '../tag.ts'\nimport { YAMLException } from '../common/exception.ts'\nimport { tagNameFull } from '../common/tagname.ts'\n\nconst NO_RANGE = -1\n\nconst MERGE_TAG_NAME = 'tag:yaml.org,2002:merge'\n\ninterface DocumentFrame {\n kind: 'document'\n position: number\n value: unknown\n hasValue: boolean\n}\n\ninterface SequenceFrame {\n kind: 'sequence'\n position: number\n value: any\n tag: SequenceTagDefinition\n anchor: Anchor | null\n index: number\n}\n\ninterface MappingFrame {\n kind: 'mapping'\n position: number\n value: any\n tag: MappingTagDefinition\n anchor: Anchor | null\n key: unknown\n keyPosition: number\n hasKey: boolean\n // The key slot drops its tag, but `<<` is recognized by tag, not by value.\n keyIsMerge: boolean\n // Keys brought in by a merge that an explicit pair is still allowed to\n // override. Lazily allocated: stays null for mappings without `<<`.\n overridable: Set | null\n}\n\ntype Frame = DocumentFrame | SequenceFrame | MappingFrame\n\ntype AnyTag = ScalarTagDefinition | SequenceTagDefinition | MappingTagDefinition\n\ninterface ValueAndTag {\n value: unknown\n tag: AnyTag\n}\n\ninterface Anchor {\n value: unknown\n tag: AnyTag\n isValueFinal: boolean\n}\n\n/** @category Events */\ninterface ConstructorOptions {\n /** Source text referenced by offsets in `events`. */\n source: string\n filename?: string\n\n /**\n * Schema to use.\n *\n * @defaultValue {@link CORE_SCHEMA}\n */\n schema?: Schema\n\n /**\n * Enables compatibility with `JSON.parse` behavior. Duplicate keys in a\n * mapping override values instead of throwing an error.\n *\n * @defaultValue `false`\n */\n json?: boolean\n\n /**\n * Maximum total number of keys processed by merge (`<<`) across one load\n * call. Each member of a merge sequence also counts as one key. Set to `-1`\n * to disable the limit.\n *\n * @defaultValue `10000`\n */\n maxTotalMergeKeys?: number\n\n /**\n * Maximum number of alias nodes (`*ref`) per document. Set to `0` to reject\n * all aliases, or to `-1` for no limit.\n *\n * @defaultValue `-1`\n */\n maxAliases?: number\n}\n\n// `source` is input data, not config — so it has no default here.\nconst DEFAULT_CONSTRUCTOR_OPTIONS: Required> = {\n filename: '',\n schema: CORE_SCHEMA,\n json: false,\n maxTotalMergeKeys: 10000,\n maxAliases: -1\n}\n\ninterface ConstructorState extends Required {\n events: Event[]\n documents: unknown[]\n eventIndex: number\n position: number\n frames: Frame[]\n anchors: Map\n // Mapping tag each sequence element was built with, keyed by the element\n // itself. Needed by `<<` merge, which sees only the finished element values.\n nodeTags: Map>\n tagHandlers: TagHandlers\n totalMergeKeys: number\n aliasCount: number\n}\n\nfunction eventPosition (event: Event) {\n if ('tagStart' in event && event.tagStart !== NO_RANGE) return event.tagStart\n if ('anchorStart' in event && event.anchorStart !== NO_RANGE) return event.anchorStart\n if ('valueStart' in event && event.valueStart !== NO_RANGE) return event.valueStart\n if ('start' in event) return event.start\n return 0\n}\n\nfunction throwError (state: ConstructorState, message: string): never {\n YAMLException.throwAt(state.source, state.position, message, state.filename)\n}\n\nfunction finalizeCollection (\n state: ConstructorState,\n position: number,\n tag: SequenceTagDefinition | MappingTagDefinition,\n carrier: unknown\n) {\n try {\n return tag.finalize(carrier)\n } catch (error) {\n if (error instanceof YAMLException) throw error\n YAMLException.throwAt(\n state.source,\n position,\n error instanceof Error ? error.message : String(error),\n state.filename\n )\n }\n}\n\nfunction constructScalar (\n state: ConstructorState,\n event: ScalarEvent\n): ValueAndTag {\n const source = getScalarValue(state.source, event)\n const rawTag = event.tagStart === NO_RANGE\n ? ''\n : state.source.slice(event.tagStart, event.tagEnd)\n const strTag = state.schema.defaultScalarTag\n\n if (rawTag !== '') {\n if (rawTag === '!') return { value: source, tag: strTag }\n\n const tagName = tagNameFull(rawTag, state.tagHandlers)\n const scalarTag = state.schema.lookupScalarTag(tagName)\n\n if (scalarTag) {\n const result = scalarTag.resolve(source, true, tagName)\n\n if (result === NOT_RESOLVED) {\n throwError(state, `cannot resolve a node with !<${tagName}> explicit tag`)\n }\n\n return { value: result, tag: scalarTag }\n }\n\n // An empty node carrying a collection tag (e.g. `!!map`, `!!seq`) is emitted\n // by the parser as a scalar event, since there is no collection syntax to key\n // off. Resolve it here by the explicit tag's kind into an empty collection.\n const collectionTagDef =\n state.schema.lookupMappingTag(tagName) ??\n state.schema.lookupSequenceTag(tagName)\n\n if (collectionTagDef) {\n if (source !== '') {\n throwError(state, `cannot resolve a node with !<${tagName}> explicit tag`)\n }\n\n const carrier = collectionTagDef.create(tagName)\n const value = collectionTagDef.carrierIsResult\n ? carrier\n : finalizeCollection(state, state.position, collectionTagDef, carrier)\n return { value, tag: collectionTagDef }\n }\n\n throwError(state, `unknown scalar tag !<${tagName}>`)\n }\n\n if (event.style === SCALAR_STYLE.PLAIN) {\n return state.schema.resolveImplicitScalarTag(source)\n }\n\n return { value: strTag.resolve(source, false, strTag.tagName), tag: strTag }\n}\n\nfunction collectionTagName (\n state: ConstructorState,\n event: SequenceEvent | MappingEvent,\n defaultTagName: string\n) {\n const rawTag = event.tagStart === NO_RANGE\n ? ''\n : state.source.slice(event.tagStart, event.tagEnd)\n const tagName = rawTag === '' || rawTag === '!'\n ? defaultTagName\n : tagNameFull(rawTag, state.tagHandlers)\n\n return tagName\n}\n\n// A merge source must be a mapping; every mapping tag exposes the read side.\nfunction isMappingTag (tag: AnyTag): tag is MappingTagDefinition {\n return tag.nodeKind === 'mapping'\n}\n\nfunction chargeMergeWork (state: ConstructorState) {\n state.totalMergeKeys++\n\n if (state.maxTotalMergeKeys !== -1 && state.totalMergeKeys > state.maxTotalMergeKeys) {\n throwError(state, `merge keys exceeded maxTotalMergeKeys (${state.maxTotalMergeKeys})`)\n }\n}\n\n// Fold the keys of one mapping source into the target frame, honoring merge\n// precedence: an already-present key (explicit or from an earlier source) wins.\nfunction mergeKeys (state: ConstructorState, frame: MappingFrame, source: unknown, sourceTag: MappingTagDefinition) {\n // Count the source mapping itself to bound sequences of empty mappings.\n chargeMergeWork(state)\n\n for (const sourceKey of sourceTag.keys(source)) {\n chargeMergeWork(state)\n\n if (frame.tag.has(frame.value, sourceKey)) continue\n\n const err = frame.tag.addPair(frame.value, sourceKey, sourceTag.get(source, sourceKey))\n if (err) throwError(state, err)\n\n frame.overridable ??= new Set()\n frame.overridable.add(sourceKey)\n }\n}\n\n// The value of a `<<` key: either a mapping (fold its keys) or a sequence of\n// mappings (fold each). Sequence elements arrive as bare values, so the tag each\n// was built with comes from `nodeTags`; a miss means it is not a mapping (a\n// scalar, a nested sequence, or a value some sequence tag synthesized itself).\nfunction mergeSource (state: ConstructorState, frame: MappingFrame, source: unknown, sourceTag: AnyTag) {\n state.position = frame.keyPosition\n\n if (isMappingTag(sourceTag)) {\n mergeKeys(state, frame, source, sourceTag)\n } else if (sourceTag.nodeKind === 'sequence' && Array.isArray(source)) {\n // The current merge budget is sufficient; this hard cap only further limits\n // the attack vector, so there is no reason to expose it as a public option.\n if (source.length > 100) {\n throwError(state, 'abnormal merge sequence size')\n }\n\n for (const element of source) {\n const elementTag = state.nodeTags.get(element)\n if (!elementTag) {\n throwError(state, 'cannot merge mappings; the provided source object is unacceptable')\n }\n mergeKeys(state, frame, element, elementTag)\n }\n } else {\n throwError(state, 'cannot merge mappings; the provided source object is unacceptable')\n }\n}\n\nfunction addMappingValue (state: ConstructorState, frame: MappingFrame, key: unknown, value: unknown, tag: AnyTag) {\n state.position = frame.keyPosition\n\n // `<<` is intercepted before dedup, so a repeated merge key is allowed.\n if (frame.keyIsMerge) {\n mergeSource(state, frame, value, tag)\n return\n }\n\n if (!state.json && frame.tag.has(frame.value, key) && !frame.overridable?.has(key)) {\n throwError(state, 'duplicated mapping key')\n }\n\n const err = frame.tag.addPair(frame.value, key, value)\n if (err) throwError(state, err)\n frame.overridable?.delete(key)\n}\n\nfunction addValue (state: ConstructorState, value: unknown, tag: AnyTag) {\n const frame = state.frames[state.frames.length - 1]!\n\n if (frame.kind === 'document') {\n frame.value = value\n frame.hasValue = true\n } else if (frame.kind === 'sequence') {\n // Any element may later be folded in by a `<<` merge, which by then has no\n // way to tell what built it.\n if (isMappingTag(tag)) state.nodeTags.set(value, tag)\n const err = frame.tag.addItem(frame.value, value, frame.index++)\n if (err) throwError(state, err)\n } else if (frame.hasKey) {\n const key = frame.key\n frame.key = undefined\n frame.hasKey = false\n addMappingValue(state, frame, key, value, tag)\n } else {\n frame.key = value\n frame.keyPosition = state.position\n frame.hasKey = true\n frame.keyIsMerge = tag.tagName === MERGE_TAG_NAME\n }\n}\n\nfunction storeAnchor (\n state: ConstructorState,\n event: ScalarEvent | SequenceEvent | MappingEvent,\n value: unknown,\n tag: AnyTag,\n isValueFinal: boolean\n): Anchor | null {\n if (event.anchorStart !== NO_RANGE) {\n const anchor = {\n value,\n tag,\n isValueFinal\n }\n state.anchors.set(state.source.slice(event.anchorStart, event.anchorEnd), anchor)\n return anchor\n }\n\n return null\n}\n\n/**\n * Constructs JavaScript documents directly from parser events, without an\n * intermediate AST.\n *\n * @category Events\n */\nfunction constructFromEvents (events: Event[], options: ConstructorOptions): unknown[] {\n const state: ConstructorState = {\n ...DEFAULT_CONSTRUCTOR_OPTIONS,\n ...options,\n events,\n documents: [],\n eventIndex: 0,\n position: 0,\n frames: [],\n anchors: new Map(),\n nodeTags: new Map(),\n tagHandlers: Object.create(null),\n totalMergeKeys: 0,\n aliasCount: 0\n }\n\n while (state.eventIndex < state.events.length) {\n const event = state.events[state.eventIndex++]\n state.position = eventPosition(event)\n\n switch (event.type) {\n case EVENT_ID.DOCUMENT:\n state.anchors = new Map()\n state.nodeTags = new Map()\n state.aliasCount = 0\n state.tagHandlers = Object.create(null)\n for (const directive of event.directives) {\n if (directive.kind === 'tag') state.tagHandlers[directive.handle] = directive.prefix\n }\n state.frames.push({ kind: 'document', position: state.position, value: undefined, hasValue: false })\n break\n\n case EVENT_ID.SCALAR: {\n const { value, tag } = constructScalar(state, event)\n storeAnchor(state, event, value, tag, true)\n addValue(state, value, tag)\n break\n }\n\n case EVENT_ID.SEQUENCE: {\n const tagName = collectionTagName(state, event, 'tag:yaml.org,2002:seq')\n const tag = state.schema.lookupSequenceTag(tagName)\n if (!tag) throwError(state, `unknown sequence tag !<${tagName}>`)\n\n const value = tag.create(tagName)\n const anchor = storeAnchor(state, event, value, tag, tag.carrierIsResult)\n\n state.frames.push({\n kind: 'sequence', position: state.position, value, tag, anchor, index: 0\n })\n break\n }\n\n case EVENT_ID.MAPPING: {\n const tagName = collectionTagName(state, event, 'tag:yaml.org,2002:map')\n const tag = state.schema.lookupMappingTag(tagName)\n if (!tag) throwError(state, `unknown mapping tag !<${tagName}>`)\n\n const value = tag.create(tagName)\n const anchor = storeAnchor(state, event, value, tag, tag.carrierIsResult)\n state.frames.push({\n kind: 'mapping',\n position: state.position,\n value,\n tag,\n anchor,\n key: undefined,\n keyPosition: state.position,\n hasKey: false,\n keyIsMerge: false,\n overridable: null\n })\n break\n }\n\n case EVENT_ID.ALIAS: {\n if (state.maxAliases !== -1 && ++state.aliasCount > state.maxAliases) {\n throwError(state, `aliases exceeded maxAliases (${state.maxAliases})`)\n }\n\n const name = state.source.slice(event.anchorStart, event.anchorEnd)\n const anchor = state.anchors.get(name)\n if (!anchor) {\n throwError(state, `unidentified alias \"${name}\"`)\n }\n if (!anchor.isValueFinal) {\n throwError(state, `recursive alias \"${name}\" is not supported for tag ${anchor.tag.tagName} because it uses finalize()`)\n }\n addValue(state, anchor.value, anchor.tag)\n break\n }\n\n case EVENT_ID.POP: {\n const frame = state.frames.pop()!\n\n if (frame.kind === 'mapping' && frame.hasKey) {\n state.position = frame.keyPosition\n throwError(state, 'incomplete mapping pair in event stream')\n }\n\n if (frame.kind === 'document') {\n state.documents.push(frame.value)\n } else {\n const value = frame.tag.carrierIsResult\n ? frame.value\n : finalizeCollection(state, frame.position, frame.tag, frame.value)\n if (frame.anchor) {\n frame.anchor.value = value\n frame.anchor.isValueFinal = true\n }\n addValue(state, value, frame.tag)\n }\n break\n }\n }\n }\n\n return state.documents\n}\n\nexport {\n constructFromEvents,\n DEFAULT_CONSTRUCTOR_OPTIONS,\n type ConstructorOptions\n}\n","import {\n EVENT_ID,\n SCALAR_STYLE,\n COLLECTION_STYLE,\n CHOMPING_MODE,\n type Event,\n type ScalarStyle,\n type CollectionStyle,\n type ChompingMode,\n type DocumentDirective,\n type TagHandlers\n} from './events.ts'\nimport { YAMLException } from '../common/exception.ts'\n\nconst NO_RANGE = -1\nconst HAS_OWN = Object.prototype.hasOwnProperty\n\nconst CONTEXT_FLOW_IN = 1\nconst CONTEXT_FLOW_OUT = 2\nconst CONTEXT_BLOCK_IN = 3\nconst CONTEXT_BLOCK_OUT = 4\n\n// eslint-disable-next-line no-control-regex\nconst PATTERN_NON_PRINTABLE = /[\\x00-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7F-\\x84\\x86-\\x9F\\uFFFE\\uFFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]/\n// eslint-disable-next-line no-useless-escape\nconst PATTERN_FLOW_INDICATORS = /[,\\[\\]{}]/\n// YAML 1.2.2, [91] c-tag-handle.\n// eslint-disable-next-line no-useless-escape\nconst PATTERN_TAG_HANDLE = /^(?:!|!!|![0-9A-Za-z-]+!)$/\n// YAML 1.2.2, [39] ns-uri-char.\n// eslint-disable-next-line no-useless-escape\nconst NS_URI_CHAR = String.raw`(?:%[0-9A-Fa-f]{2}|[0-9A-Za-z\\-#;/?:@&=+$,_.!~*'()\\[\\]])`\n// YAML 1.2.2, [40] ns-tag-char = ns-uri-char - \"!\" - c-flow-indicator.\n// eslint-disable-next-line no-useless-escape\nconst NS_TAG_CHAR = String.raw`(?:%[0-9A-Fa-f]{2}|[0-9A-Za-z\\-#;/?:@&=+$.~*'()_])`\nconst PATTERN_TAG_URI = new RegExp(`^(?:${NS_URI_CHAR})*$`)\n// YAML 1.2.2, [99] c-ns-shorthand-tag suffix part.\nconst PATTERN_TAG_SUFFIX = new RegExp(`^(?:${NS_TAG_CHAR})+$`)\n// YAML 1.2.2, [93] ns-tag-prefix.\nconst PATTERN_TAG_PREFIX = new RegExp(`^(?:!(?:${NS_URI_CHAR})*|${NS_TAG_CHAR}(?:${NS_URI_CHAR})*)$`)\n\ntype NodeContext =\n typeof CONTEXT_FLOW_IN | typeof CONTEXT_FLOW_OUT |\n typeof CONTEXT_BLOCK_IN | typeof CONTEXT_BLOCK_OUT\n\ninterface NodeProperties {\n anchorStart: number\n anchorEnd: number\n tagStart: number\n tagEnd: number\n}\n\ninterface ParserSnapshot {\n position: number\n line: number\n lineStart: number\n lineIndent: number\n firstTabInLine: number\n eventsLength: number\n}\n\n/** @category Events */\ninterface ParserOptions {\n /**\n * File path used in error messages.\n *\n * @defaultValue `null`\n */\n filename?: string\n\n /**\n * Maximum nesting depth for collections. Aliases are not taken into account.\n *\n * @defaultValue `100`\n */\n maxDepth?: number\n}\n\nconst DEFAULT_PARSER_OPTIONS: Required = {\n filename: '',\n maxDepth: 100\n}\n\ninterface ParserState extends Required {\n input: string\n length: number\n position: number\n line: number\n lineStart: number\n lineIndent: number\n firstTabInLine: number\n depth: number\n directives: DocumentDirective[]\n tagHandlers: TagHandlers\n events: Event[]\n}\n\nfunction addDocumentEvent (\n state: ParserState,\n explicitStart: boolean,\n explicitEnd: boolean\n) {\n state.events.push({\n type: EVENT_ID.DOCUMENT,\n explicitStart,\n explicitEnd,\n directives: state.directives\n })\n}\n\nfunction addSequenceEvent (\n state: ParserState,\n start: number,\n anchorStart: number,\n anchorEnd: number,\n tagStart: number,\n tagEnd: number,\n style: CollectionStyle\n) {\n state.events.push({\n type: EVENT_ID.SEQUENCE,\n start,\n anchorStart,\n anchorEnd,\n tagStart,\n tagEnd,\n style\n })\n}\n\nfunction addMappingEvent (\n state: ParserState,\n start: number,\n anchorStart: number,\n anchorEnd: number,\n tagStart: number,\n tagEnd: number,\n style: CollectionStyle\n) {\n state.events.push({\n type: EVENT_ID.MAPPING,\n start,\n anchorStart,\n anchorEnd,\n tagStart,\n tagEnd,\n style\n })\n}\n\nfunction insertFlowPairMappingEvent (state: ParserState, snapshot: ParserSnapshot) {\n state.events.splice(snapshot.eventsLength, 0, {\n type: EVENT_ID.MAPPING,\n start: snapshot.position,\n anchorStart: NO_RANGE,\n anchorEnd: NO_RANGE,\n tagStart: NO_RANGE,\n tagEnd: NO_RANGE,\n style: COLLECTION_STYLE.FLOW\n })\n}\n\nfunction addScalarEvent (\n state: ParserState,\n valueStart: number,\n valueEnd: number,\n anchorStart: number,\n anchorEnd: number,\n tagStart: number,\n tagEnd: number,\n style: ScalarStyle,\n chomping: ChompingMode = CHOMPING_MODE.CLIP,\n indent = -1,\n fast = false\n) {\n state.events.push({\n type: EVENT_ID.SCALAR,\n valueStart,\n valueEnd,\n anchorStart,\n anchorEnd,\n tagStart,\n tagEnd,\n style,\n chomping,\n indent,\n fast\n })\n}\n\nfunction addAliasEvent (\n state: ParserState,\n anchorStart: number,\n anchorEnd: number\n) {\n state.events.push({\n type: EVENT_ID.ALIAS,\n anchorStart,\n anchorEnd\n })\n}\n\nfunction addPopEvent (state: ParserState) {\n state.events.push({ type: EVENT_ID.POP })\n}\n\nfunction addEmptyScalarEvent (state: ParserState) {\n addScalarEvent(\n state,\n NO_RANGE,\n NO_RANGE,\n NO_RANGE,\n NO_RANGE,\n NO_RANGE,\n NO_RANGE,\n SCALAR_STYLE.PLAIN\n )\n}\n\nfunction emptyProperties (): NodeProperties {\n return {\n anchorStart: NO_RANGE,\n anchorEnd: NO_RANGE,\n tagStart: NO_RANGE,\n tagEnd: NO_RANGE\n }\n}\n\nfunction snapshotState (state: ParserState): ParserSnapshot {\n return {\n position: state.position,\n line: state.line,\n lineStart: state.lineStart,\n lineIndent: state.lineIndent,\n firstTabInLine: state.firstTabInLine,\n eventsLength: state.events.length\n }\n}\n\nfunction restoreState (state: ParserState, snapshot: ParserSnapshot) {\n state.position = snapshot.position\n state.line = snapshot.line\n state.lineStart = snapshot.lineStart\n state.lineIndent = snapshot.lineIndent\n state.firstTabInLine = snapshot.firstTabInLine\n state.events.length = snapshot.eventsLength\n}\n\nfunction throwError (state: ParserState, message: string): never {\n YAMLException.throwAt(state.input.slice(0, state.length), state.position, message, state.filename)\n}\n\nfunction isEol (c: number) {\n return c === 0x0A/* LF */ || c === 0x0D/* CR */\n}\n\nfunction isWhiteSpace (c: number) {\n return c === 0x09/* Tab */ || c === 0x20/* Space */\n}\n\nfunction isWsOrEol (c: number) {\n return isWhiteSpace(c) || isEol(c)\n}\n\nfunction isWsOrEolOrEnd (c: number) {\n return c === 0 || isWsOrEol(c)\n}\n\nfunction isFlowIndicator (c: number) {\n return c === 0x2C/* , */ ||\n c === 0x5B/* [ */ ||\n c === 0x5D/* ] */ ||\n c === 0x7B/* { */ ||\n c === 0x7D/* } */\n}\n\nfunction fromDecimalCode (c: number) {\n return c >= 0x30/* 0 */ && c <= 0x39/* 9 */ ? c - 0x30 : -1\n}\n\nfunction fromHexCode (c: number) {\n if (c >= 0x30/* 0 */ && c <= 0x39/* 9 */) return c - 0x30\n const lc = c | 0x20\n if (lc >= 0x61/* a */ && lc <= 0x66/* f */) return lc - 0x61 + 10\n return -1\n}\n\nfunction escapedHexLen (c: number) {\n if (c === 0x78/* x */) return 2\n if (c === 0x75/* u */) return 4\n if (c === 0x55/* U */) return 8\n return 0\n}\n\nfunction isSimpleEscape (c: number) {\n return c === 0x30/* 0 */ ||\n c === 0x61/* a */ ||\n c === 0x62/* b */ ||\n c === 0x74/* t */ ||\n c === 0x09/* Tab */ ||\n c === 0x6E/* n */ ||\n c === 0x76/* v */ ||\n c === 0x66/* f */ ||\n c === 0x72/* r */ ||\n c === 0x65/* e */ ||\n c === 0x20/* Space */ ||\n c === 0x22/* \" */ ||\n c === 0x2F/* / */ ||\n c === 0x5C/* \\ */ ||\n c === 0x4E/* N */ ||\n c === 0x5F/* _ */ ||\n c === 0x4C/* L */ ||\n c === 0x50/* P */\n}\n\n// Precondition: state.position points at LF or CR.\nfunction consumeLineBreak (state: ParserState) {\n const ch = state.input.charCodeAt(state.position)\n\n if (ch === 0x0A/* LF */) {\n state.position++\n } else {\n state.position++\n if (state.input.charCodeAt(state.position) === 0x0A/* LF */) state.position++\n }\n\n state.line++\n state.lineStart = state.position\n state.lineIndent = 0\n state.firstTabInLine = -1\n}\n\nfunction skipSeparationSpace (state: ParserState, allowComments: boolean) {\n let lineBreaks = 0\n let ch = state.input.charCodeAt(state.position)\n let hasSeparation = state.position === state.lineStart ||\n isWsOrEol(state.input.charCodeAt(state.position - 1))\n\n while (ch !== 0) {\n while (isWhiteSpace(ch)) {\n hasSeparation = true\n if (ch === 0x09/* Tab */ && state.firstTabInLine === -1) {\n state.firstTabInLine = state.position\n }\n ch = state.input.charCodeAt(++state.position)\n }\n\n if (allowComments && hasSeparation && ch === 0x23/* # */) {\n do { ch = state.input.charCodeAt(++state.position) }\n while (!isEol(ch) && ch !== 0)\n }\n\n if (!isEol(ch)) break\n\n consumeLineBreak(state)\n lineBreaks++\n hasSeparation = true\n ch = state.input.charCodeAt(state.position)\n\n while (ch === 0x20/* Space */) {\n state.lineIndent++\n ch = state.input.charCodeAt(++state.position)\n }\n }\n\n return lineBreaks\n}\n\nfunction testDocumentSeparator (state: ParserState, position = state.position) {\n const ch = state.input.charCodeAt(position)\n\n if ((ch === 0x2D/* - */ || ch === 0x2E/* . */) &&\n ch === state.input.charCodeAt(position + 1) &&\n ch === state.input.charCodeAt(position + 2)) {\n const following = state.input.charCodeAt(position + 3)\n return following === 0 || isWsOrEol(following)\n }\n\n return false\n}\n\nfunction skipByteOrderMark (state: ParserState) {\n if (state.position === state.lineStart &&\n state.input.charCodeAt(state.position) === 0xFEFF) {\n state.position++\n state.lineStart = state.position\n }\n}\n\nfunction testDocumentBoundary (state: ParserState) {\n if (state.position !== state.lineStart) return false\n\n // Fast path: most document boundaries do not have a BOM.\n if (testDocumentSeparator(state)) return true\n if (state.input.charCodeAt(state.position) !== 0xFEFF) return false\n\n // BOM-prefixed boundaries are rare, so snapshot/restore overhead is negligible.\n const snapshot = snapshotState(state)\n\n skipByteOrderMark(state)\n skipSeparationSpace(state, true)\n\n const ch = state.input.charCodeAt(state.position)\n const result = state.position === state.lineStart &&\n (ch === 0x25/* % */ || (ch === 0x2D/* - */ && testDocumentSeparator(state)))\n\n restoreState(state, snapshot)\n return result\n}\n\nfunction skipUntilLineEnd (state: ParserState) {\n let ch = state.input.charCodeAt(state.position)\n\n while (ch !== 0 && !isEol(ch)) {\n ch = state.input.charCodeAt(++state.position)\n }\n}\n\nfunction checkPrintable (state: ParserState, start: number, end: number) {\n if (PATTERN_NON_PRINTABLE.test(state.input.slice(start, end))) {\n throwError(state, 'the stream contains non-printable characters')\n }\n}\n\nfunction readTagProperty (state: ParserState, props: NodeProperties, inFlow: boolean) {\n if (state.input.charCodeAt(state.position) !== 0x21/* ! */) return false\n if (props.tagStart !== NO_RANGE) throwError(state, 'duplication of a tag property')\n\n const start = state.position\n let isVerbatim = false\n let isNamed = false\n let tagHandle = '!'\n let ch = state.input.charCodeAt(++state.position)\n\n if (ch === 0x3C/* < */) {\n isVerbatim = true\n ch = state.input.charCodeAt(++state.position)\n } else if (ch === 0x21/* ! */) {\n isNamed = true\n tagHandle = '!!'\n ch = state.input.charCodeAt(++state.position)\n }\n\n let suffixStart = state.position\n let tagName\n\n if (isVerbatim) {\n while (ch !== 0 && ch !== 0x3E/* > */) ch = state.input.charCodeAt(++state.position)\n if (ch !== 0x3E/* > */) throwError(state, 'unexpected end of the stream within a verbatim tag')\n tagName = state.input.slice(suffixStart, state.position)\n state.position++\n } else {\n while (ch !== 0 && !isWsOrEol(ch) && !(inFlow && isFlowIndicator(ch))) {\n if (ch === 0x21/* ! */) {\n if (!isNamed) {\n tagHandle = state.input.slice(suffixStart - 1, state.position + 1)\n if (!PATTERN_TAG_HANDLE.test(tagHandle)) throwError(state, 'named tag handle cannot contain such characters')\n isNamed = true\n suffixStart = state.position + 1\n } else {\n throwError(state, 'tag suffix cannot contain exclamation marks')\n }\n }\n\n ch = state.input.charCodeAt(++state.position)\n }\n\n tagName = state.input.slice(suffixStart, state.position)\n if (PATTERN_FLOW_INDICATORS.test(tagName)) throwError(state, 'tag suffix cannot contain flow indicator characters')\n }\n\n if (tagName && !(isVerbatim ? PATTERN_TAG_URI.test(tagName) : PATTERN_TAG_SUFFIX.test(tagName))) {\n throwError(state, `tag name cannot contain such characters: ${tagName}`)\n }\n try {\n decodeURIComponent(tagName)\n } catch {\n throwError(state, `tag name is malformed: ${tagName}`)\n }\n\n if (!isVerbatim && tagHandle !== '!' && tagHandle !== '!!' && !HAS_OWN.call(state.tagHandlers, tagHandle)) {\n throwError(state, `undeclared tag handle \"${tagHandle}\"`)\n }\n\n props.tagStart = start\n props.tagEnd = state.position\n return true\n}\n\nfunction readAnchorProperty (state: ParserState, props: NodeProperties) {\n if (state.input.charCodeAt(state.position) !== 0x26/* & */) return false\n if (props.anchorStart !== NO_RANGE) throwError(state, 'duplication of an anchor property')\n\n state.position++\n const start = state.position\n\n while (state.input.charCodeAt(state.position) !== 0 && !isWsOrEol(state.input.charCodeAt(state.position)) && !isFlowIndicator(state.input.charCodeAt(state.position))) {\n state.position++\n }\n\n if (state.position === start) throwError(state, 'name of an anchor node must contain at least one character')\n\n props.anchorStart = start\n props.anchorEnd = state.position\n return true\n}\n\nfunction readAlias (state: ParserState, props: NodeProperties) {\n if (state.input.charCodeAt(state.position) !== 0x2A/* * */) return false\n if (props.anchorStart !== NO_RANGE || props.tagStart !== NO_RANGE) {\n throwError(state, 'alias node should not have any properties')\n }\n\n state.position++\n const start = state.position\n\n while (state.input.charCodeAt(state.position) !== 0 && !isWsOrEol(state.input.charCodeAt(state.position)) && !isFlowIndicator(state.input.charCodeAt(state.position))) {\n state.position++\n }\n\n if (state.position === start) throwError(state, 'name of an alias node must contain at least one character')\n\n addAliasEvent(state, start, state.position)\n return true\n}\n\nfunction readFlowScalarBreak (state: ParserState, nodeIndent: number) {\n skipSeparationSpace(state, false)\n\n if (state.lineIndent < nodeIndent) {\n throwError(state, 'deficient indentation')\n }\n}\n\nfunction readSingleQuotedScalar (state: ParserState, nodeIndent: number, props: NodeProperties) {\n if (state.input.charCodeAt(state.position) !== 0x27/* ' */) return false\n\n state.position++\n const start = state.position\n // A single-quoted scalar is sliceable verbatim when it has no '' escape pairs\n // and no folded line breaks (see getScalarValue fast path).\n let simple = true\n\n while (state.input.charCodeAt(state.position) !== 0) {\n const ch = state.input.charCodeAt(state.position)\n\n if (ch === 0x27/* ' */) {\n if (state.input.charCodeAt(state.position + 1) === 0x27/* ' */) {\n simple = false\n state.position += 2\n continue\n }\n\n const end = state.position\n state.position++\n addScalarEvent(state, start, end, props.anchorStart, props.anchorEnd, props.tagStart, props.tagEnd, SCALAR_STYLE.SINGLE_QUOTED, CHOMPING_MODE.CLIP, -1, simple)\n return true\n }\n\n if (isEol(ch)) {\n simple = false\n readFlowScalarBreak(state, nodeIndent)\n } else if (state.position === state.lineStart && testDocumentSeparator(state)) {\n throwError(state, 'unexpected end of the document within a single quoted scalar')\n } else if (ch !== 0x09/* Tab */ && ch < 0x20) {\n throwError(state, 'expected valid JSON character')\n } else {\n state.position++\n }\n }\n\n throwError(state, 'unexpected end of the stream within a single quoted scalar')\n}\n\nfunction readDoubleQuotedScalar (state: ParserState, nodeIndent: number, props: NodeProperties) {\n if (state.input.charCodeAt(state.position) !== 0x22/* \" */) return false\n\n state.position++\n const start = state.position\n // A double-quoted scalar is sliceable verbatim when it has no \\ escapes and\n // no folded line breaks (see getScalarValue fast path).\n let simple = true\n\n while (state.input.charCodeAt(state.position) !== 0) {\n const ch = state.input.charCodeAt(state.position)\n\n if (ch === 0x22/* \" */) {\n const end = state.position\n state.position++\n addScalarEvent(state, start, end, props.anchorStart, props.anchorEnd, props.tagStart, props.tagEnd, SCALAR_STYLE.DOUBLE_QUOTED, CHOMPING_MODE.CLIP, -1, simple)\n return true\n }\n\n if (ch === 0x5C/* \\ */) {\n simple = false\n const escaped = state.input.charCodeAt(++state.position)\n\n if (isEol(escaped)) {\n readFlowScalarBreak(state, nodeIndent)\n } else if (isSimpleEscape(escaped)) {\n state.position++\n } else {\n let hexLength = escapedHexLen(escaped)\n\n if (hexLength === 0) throwError(state, 'unknown escape sequence')\n\n while (hexLength-- > 0) {\n state.position++\n if (fromHexCode(state.input.charCodeAt(state.position)) < 0) {\n throwError(state, 'expected hexadecimal character')\n }\n }\n state.position++\n }\n } else if (isEol(ch)) {\n simple = false\n readFlowScalarBreak(state, nodeIndent)\n } else if (state.position === state.lineStart && testDocumentSeparator(state)) {\n throwError(state, 'unexpected end of the document within a double quoted scalar')\n } else if (ch !== 0x09/* Tab */ && ch < 0x20) {\n throwError(state, 'expected valid JSON character')\n } else {\n state.position++\n }\n }\n\n throwError(state, 'unexpected end of the stream within a double quoted scalar')\n}\n\nfunction readBlockScalar (state: ParserState, parentIndent: number, props: NodeProperties) {\n const ch = state.input.charCodeAt(state.position)\n let chomping: ChompingMode = CHOMPING_MODE.CLIP\n let indent = -1\n let detectedIndent = false\n\n if (ch !== 0x7C/* | */ && ch !== 0x3E/* > */) return false\n\n const style = ch === 0x7C/* | */ ? SCALAR_STYLE.LITERAL_BLOCK : SCALAR_STYLE.FOLDED_BLOCK\n state.position++\n\n while (state.input.charCodeAt(state.position) !== 0) {\n const current = state.input.charCodeAt(state.position)\n const digit = fromDecimalCode(current)\n\n if (current === 0x2B/* + */ || current === 0x2D/* - */) {\n if (chomping !== CHOMPING_MODE.CLIP) throwError(state, 'repeat of a chomping mode identifier')\n chomping = current === 0x2B/* + */ ? CHOMPING_MODE.KEEP : CHOMPING_MODE.STRIP\n state.position++\n } else if (digit >= 0) {\n if (digit === 0) {\n throwError(state, 'bad explicit indentation width of a block scalar; it cannot be less than one')\n }\n if (detectedIndent) throwError(state, 'repeat of an indentation width identifier')\n indent = parentIndent + digit - 1\n detectedIndent = true\n state.position++\n } else {\n break\n }\n }\n\n let hadWhitespace = false\n while (isWhiteSpace(state.input.charCodeAt(state.position))) {\n hadWhitespace = true\n state.position++\n }\n if (hadWhitespace && state.input.charCodeAt(state.position) === 0x23/* # */) skipUntilLineEnd(state)\n\n if (isEol(state.input.charCodeAt(state.position))) {\n consumeLineBreak(state)\n } else if (state.input.charCodeAt(state.position) !== 0) {\n throwError(state, 'a line break is expected')\n }\n\n let contentIndent = detectedIndent ? indent : -1\n let maxLeadingIndent = 0\n const valueStart = state.position\n let valueEnd = state.position\n\n while (state.input.charCodeAt(state.position) !== 0) {\n const linePosition = state.position\n let column = 0\n\n while (state.input.charCodeAt(linePosition + column) === 0x20/* Space */) column++\n\n const first = state.input.charCodeAt(linePosition + column)\n if (first === 0) {\n // End of input acts as a line terminator, but there is no line break to\n // include here. A final all-spaces line still counts: when the block has a\n // content indent, the spaces beyond it are real content; in a wholly blank\n // block (contentIndent < 0) the spaces form a blank line that chomping must\n // see, exactly as it would if the line ended with a break. Capture the line\n // in both cases; otherwise the block ends at the start of this empty line.\n if (contentIndent >= 0) {\n if (column > contentIndent) valueEnd = linePosition + column\n } else if (column > 0) {\n valueEnd = linePosition + column\n }\n break\n }\n if (testDocumentBoundary(state)) break\n\n if (!detectedIndent && contentIndent === -1 && isEol(first)) {\n maxLeadingIndent = Math.max(maxLeadingIndent, column)\n }\n\n if (!detectedIndent && contentIndent === -1 && !isEol(first)) {\n if (first === 0x09/* Tab */ && column < parentIndent) {\n state.position = linePosition + column\n throwError(state, 'tab characters must not be used in indentation')\n }\n if (column < maxLeadingIndent) {\n state.position = linePosition + column\n throwError(state, 'bad indentation of a mapping entry')\n }\n }\n\n if (contentIndent === -1 && first !== 0 && !isEol(first) && column < parentIndent) {\n state.lineIndent = column\n state.position = linePosition + column\n break\n }\n\n if (!detectedIndent && first !== 0 && !isEol(first) && contentIndent === -1) {\n contentIndent = column\n }\n\n const requiredIndent = contentIndent === -1 ? parentIndent + 1 : contentIndent\n if (first !== 0 && !isEol(first) && column < requiredIndent) {\n state.lineIndent = column\n state.position = linePosition + column\n break\n }\n\n skipUntilLineEnd(state)\n valueEnd = state.position\n if (isEol(state.input.charCodeAt(state.position))) {\n consumeLineBreak(state)\n // Include the line break in the range so trailing blank lines are\n // preserved. This is what lets cook tell apart an empty `|+` (range \"\",\n // value \"\") from a `|+` with one blank line (range \"\\n\", value \"\\n\").\n // De-indent and chomping are applied later in getScalarValue.\n valueEnd = state.position\n }\n }\n\n checkPrintable(state, valueStart, valueEnd)\n addScalarEvent(\n state,\n valueStart,\n valueEnd,\n props.anchorStart,\n props.anchorEnd,\n props.tagStart,\n props.tagEnd,\n style,\n chomping,\n contentIndent\n )\n return true\n}\n\nfunction canStartPlainScalar (state: ParserState, nodeContext: NodeContext) {\n const ch = state.input.charCodeAt(state.position)\n const inFlow = nodeContext === CONTEXT_FLOW_IN\n\n if (ch === 0 ||\n isWsOrEol(ch) ||\n ch === 0x23/* # */ ||\n ch === 0x26/* & */ ||\n ch === 0x2A/* * */ ||\n ch === 0x21/* ! */ ||\n ch === 0x7C/* | */ ||\n ch === 0x3E/* > */ ||\n ch === 0x27/* ' */ ||\n ch === 0x22/* \" */ ||\n ch === 0x25/* % */ ||\n ch === 0x40/* @ */ ||\n ch === 0x60/* ` */ ||\n (inFlow && isFlowIndicator(ch))) {\n return false\n }\n\n if (ch === 0x3F/* ? */ || ch === 0x2D/* - */) {\n const following = state.input.charCodeAt(state.position + 1)\n if (isWsOrEolOrEnd(following) || (inFlow && isFlowIndicator(following))) return false\n }\n\n return true\n}\n\nfunction readPlainScalar (state: ParserState, nodeIndent: number, nodeContext: NodeContext, props: NodeProperties) {\n if (!canStartPlainScalar(state, nodeContext)) return false\n\n const start = state.position\n let end = state.position\n let ch = state.input.charCodeAt(state.position)\n const inFlow = nodeContext === CONTEXT_FLOW_IN\n // A single-line plain scalar is sliceable verbatim: the parser already trims\n // trailing whitespace from the range, so no folding is needed (see\n // getScalarValue fast path). Folded line breaks make it non-simple.\n let multiline = false\n\n while (ch !== 0) {\n if (testDocumentBoundary(state)) break\n\n if (ch === 0x3A/* : */) {\n const following = state.input.charCodeAt(state.position + 1)\n if (isWsOrEolOrEnd(following) || (inFlow && isFlowIndicator(following))) break\n } else if (ch === 0x23/* # */) {\n const preceding = state.input.charCodeAt(state.position - 1)\n if (isWsOrEol(preceding)) break\n } else if (inFlow && isFlowIndicator(ch)) {\n break\n } else if (isEol(ch)) {\n const savedPosition = state.position\n const savedLine = state.line\n const savedLineStart = state.lineStart\n const savedLineIndent = state.lineIndent\n\n skipSeparationSpace(state, false)\n\n if (state.lineIndent >= nodeIndent) {\n multiline = true\n ch = state.input.charCodeAt(state.position)\n continue\n }\n\n state.position = savedPosition\n state.line = savedLine\n state.lineStart = savedLineStart\n state.lineIndent = savedLineIndent\n break\n }\n\n if (!isWhiteSpace(ch)) end = state.position + 1\n ch = state.input.charCodeAt(++state.position)\n }\n\n if (end === start) return false\n\n checkPrintable(state, start, end)\n addScalarEvent(state, start, end, props.anchorStart, props.anchorEnd, props.tagStart, props.tagEnd, SCALAR_STYLE.PLAIN, CHOMPING_MODE.CLIP, -1, !multiline)\n return true\n}\n\nfunction findBlockMappingColon (state: ParserState) {\n let position = state.position\n let flowLevel = 0\n\n while (position < state.length) {\n const ch = state.input.charCodeAt(position)\n\n if (isEol(ch)) return -1\n if (ch === 0x23/* # */ && isWsOrEol(state.input.charCodeAt(position - 1))) return -1\n\n if ((ch === 0x2A/* * */ || ch === 0x26/* & */) && position === state.position) {\n do { position++ }\n while (state.input.charCodeAt(position) !== 0 &&\n !isWsOrEol(state.input.charCodeAt(position)) &&\n !isFlowIndicator(state.input.charCodeAt(position)))\n continue\n }\n\n if (ch === 0x5B/* [ */ || ch === 0x7B/* { */) {\n flowLevel++\n } else if (ch === 0x5D/* ] */ || ch === 0x7D/* } */) {\n if (flowLevel > 0) flowLevel--\n } else if (flowLevel === 0 && ch === 0x3A/* : */ && isWsOrEol(state.input.charCodeAt(position + 1))) {\n return position\n }\n\n if ((flowLevel > 0 || position === state.position) &&\n (ch === 0x27/* ' */ || ch === 0x22/* \" */)) {\n const quote = ch\n position++\n\n while (position < state.length && state.input.charCodeAt(position) !== quote) {\n if (state.input.charCodeAt(position) === 0x5C/* \\ */ && quote === 0x22/* \" */) position++\n position++\n }\n }\n\n position++\n }\n\n return -1\n}\n\nfunction skipFlowSeparationSpace (state: ParserState, nodeIndent: number) {\n const startLine = state.line\n skipSeparationSpace(state, true)\n\n if ((state.line > startLine && state.lineIndent < nodeIndent) ||\n (state.firstTabInLine !== -1 && state.lineIndent < nodeIndent)) {\n throwError(state, 'deficient indentation')\n }\n}\n\nfunction readFlowCollection (state: ParserState, nodeIndent: number, props: NodeProperties) {\n const ch = state.input.charCodeAt(state.position)\n const isMapping = ch === 0x7B/* { */\n const start = state.position\n let readNext = true\n\n if (ch !== 0x5B/* [ */ && ch !== 0x7B/* { */) return false\n\n const terminator = isMapping ? 0x7D/* } */ : 0x5D/* ] */\n\n if (isMapping) {\n addMappingEvent(state, start, props.anchorStart, props.anchorEnd, props.tagStart, props.tagEnd, COLLECTION_STYLE.FLOW)\n } else {\n addSequenceEvent(state, start, props.anchorStart, props.anchorEnd, props.tagStart, props.tagEnd, COLLECTION_STYLE.FLOW)\n }\n\n state.position++\n\n while (state.input.charCodeAt(state.position) !== 0) {\n skipFlowSeparationSpace(state, nodeIndent)\n\n let ch = state.input.charCodeAt(state.position)\n\n if (ch === terminator) {\n state.position++\n addPopEvent(state)\n return true\n } else if (!readNext) {\n throwError(state, 'missed comma between flow collection entries')\n } else if (ch === 0x2C/* , */) {\n throwError(state, \"expected the node content, but found ','\")\n }\n\n let isPair = false\n let isExplicitPair = false\n\n if (ch === 0x3F/* ? */ && isWsOrEol(state.input.charCodeAt(state.position + 1))) {\n isPair = isExplicitPair = true\n state.position += 1\n skipFlowSeparationSpace(state, nodeIndent)\n }\n\n const entryLine = state.line\n const entryStart = snapshotState(state)\n\n const keyWasRead = parseNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true)\n skipFlowSeparationSpace(state, nodeIndent)\n\n ch = state.input.charCodeAt(state.position)\n\n if ((isMapping || isExplicitPair || state.line === entryLine) && ch === 0x3A/* : */) {\n isPair = true\n state.position++\n skipFlowSeparationSpace(state, nodeIndent)\n if (!isMapping) {\n insertFlowPairMappingEvent(state, entryStart)\n if (!keyWasRead) addEmptyScalarEvent(state)\n } else if (!keyWasRead) {\n addEmptyScalarEvent(state)\n }\n if (!parseNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true)) {\n addEmptyScalarEvent(state)\n }\n skipFlowSeparationSpace(state, nodeIndent)\n if (!isMapping) addPopEvent(state)\n } else if (isMapping && isPair) {\n if (!keyWasRead) addEmptyScalarEvent(state)\n addEmptyScalarEvent(state)\n } else if (isMapping) {\n addEmptyScalarEvent(state)\n } else if (isPair) {\n insertFlowPairMappingEvent(state, entryStart)\n if (!keyWasRead) addEmptyScalarEvent(state)\n addEmptyScalarEvent(state)\n addPopEvent(state)\n }\n\n ch = state.input.charCodeAt(state.position)\n\n if (ch === 0x2C/* , */) {\n readNext = true\n state.position++\n } else {\n readNext = false\n }\n }\n\n throwError(state, 'unexpected end of the stream within a flow collection')\n}\n\nfunction readBlockSequence (state: ParserState, nodeIndent: number, props: NodeProperties) {\n if (state.firstTabInLine !== -1 || state.input.charCodeAt(state.position) !== 0x2D/* - */ || !isWsOrEolOrEnd(state.input.charCodeAt(state.position + 1))) {\n return false\n }\n\n addSequenceEvent(state, state.position, props.anchorStart, props.anchorEnd, props.tagStart, props.tagEnd, COLLECTION_STYLE.BLOCK)\n\n while (state.input.charCodeAt(state.position) === 0x2D/* - */ && isWsOrEolOrEnd(state.input.charCodeAt(state.position + 1))) {\n if (state.firstTabInLine !== -1) {\n state.position = state.firstTabInLine\n throwError(state, 'tab characters must not be used in indentation')\n }\n\n const entryLine = state.line\n state.position++\n\n const hadBreak = skipSeparationSpace(state, true) > 0\n if (state.firstTabInLine !== -1 &&\n state.input.charCodeAt(state.position) === 0x2D/* - */ &&\n isWsOrEolOrEnd(state.input.charCodeAt(state.position + 1))) {\n throwError(state, 'bad indentation of a sequence entry')\n }\n\n if (hadBreak && state.lineIndent <= nodeIndent) {\n addEmptyScalarEvent(state)\n } else {\n parseNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true)\n }\n\n skipSeparationSpace(state, true)\n\n if (state.lineIndent < nodeIndent || state.position >= state.length) break\n if (state.lineIndent > nodeIndent) throwError(state, 'bad indentation of a sequence entry')\n if (state.line === entryLine &&\n state.input.charCodeAt(state.position) === 0x2D/* - */ &&\n isWsOrEolOrEnd(state.input.charCodeAt(state.position + 1))) {\n throwError(state, 'bad indentation of a sequence entry')\n }\n }\n\n addPopEvent(state)\n return true\n}\n\nfunction readBlockMapping (state: ParserState, nodeIndent: number, flowIndent: number, props: NodeProperties) {\n let atExplicitKey = false\n let detected = false\n let mappingOpened = false\n let pendingExplicitKey = false\n\n if (state.firstTabInLine !== -1) return false\n\n let ch = state.input.charCodeAt(state.position)\n\n while (ch !== 0) {\n if (!atExplicitKey && state.firstTabInLine !== -1) {\n state.position = state.firstTabInLine\n throwError(state, 'tab characters must not be used in indentation')\n }\n\n const following = state.input.charCodeAt(state.position + 1)\n const entryLine = state.line\n\n if ((ch === 0x3F/* ? */ || ch === 0x3A/* : */) && isWsOrEolOrEnd(following)) {\n if (!mappingOpened) {\n addMappingEvent(state, state.position, props.anchorStart, props.anchorEnd, props.tagStart, props.tagEnd, COLLECTION_STYLE.BLOCK)\n mappingOpened = true\n }\n\n if (ch === 0x3F/* ? */) {\n if (atExplicitKey) addEmptyScalarEvent(state)\n detected = true\n atExplicitKey = true\n } else if (atExplicitKey) {\n atExplicitKey = false\n } else {\n addEmptyScalarEvent(state)\n detected = true\n atExplicitKey = false\n }\n\n state.position += 1\n pendingExplicitKey = true\n } else {\n // An explicit key awaiting its value, followed by an implicit key, means\n // the explicit key's value is empty. Emit it now (append-only) so it is\n // ordered before the implicit key node read just below.\n if (atExplicitKey) {\n addEmptyScalarEvent(state)\n atExplicitKey = false\n }\n\n const beforeKey = snapshotState(state)\n\n if (!parseNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) {\n break\n }\n\n if (state.line === entryLine) {\n ch = state.input.charCodeAt(state.position)\n\n while (isWhiteSpace(ch)) {\n ch = state.input.charCodeAt(++state.position)\n }\n\n if (ch === 0x3A/* : */) {\n ch = state.input.charCodeAt(++state.position)\n\n if (!isWsOrEolOrEnd(ch)) {\n throwError(state, 'a whitespace character is expected after the key-value separator within a block mapping')\n }\n\n if (!mappingOpened) {\n restoreState(state, beforeKey)\n addMappingEvent(state, beforeKey.position, props.anchorStart, props.anchorEnd, props.tagStart, props.tagEnd, COLLECTION_STYLE.BLOCK)\n mappingOpened = true\n // The key, the `:` and the space after it were already validated\n // above, before the rollback. Re-reading the same input cannot\n // fail, so just consume it again without error checks.\n parseNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)\n\n ch = state.input.charCodeAt(state.position)\n while (isWhiteSpace(ch)) {\n ch = state.input.charCodeAt(++state.position)\n }\n\n state.position++\n }\n\n detected = true\n atExplicitKey = false\n pendingExplicitKey = false\n } else if (detected) {\n throwError(state, \"expected ':' after a mapping key\")\n } else {\n // Not a mapping. If outer properties are pending, roll back so the\n // caller re-reads this node with them attached (events are append-only).\n if (props.anchorStart !== NO_RANGE || props.tagStart !== NO_RANGE) {\n restoreState(state, beforeKey)\n return false\n }\n return true\n }\n } else if (detected) {\n throwError(state, 'can not read a block mapping entry; a multiline key may not be an implicit key')\n } else {\n if (props.anchorStart !== NO_RANGE || props.tagStart !== NO_RANGE) {\n restoreState(state, beforeKey)\n return false\n }\n return true\n }\n }\n\n if (parseNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, pendingExplicitKey)) {\n pendingExplicitKey = false\n }\n\n if (!atExplicitKey) {\n if (pendingExplicitKey) {\n addEmptyScalarEvent(state)\n pendingExplicitKey = false\n }\n }\n\n skipSeparationSpace(state, true)\n ch = state.input.charCodeAt(state.position)\n\n if ((state.line === entryLine || state.lineIndent > nodeIndent) && ch !== 0) {\n throwError(state, 'bad indentation of a mapping entry')\n } else if (state.lineIndent < nodeIndent) {\n break\n }\n }\n\n if (!detected) return false\n if (atExplicitKey) addEmptyScalarEvent(state)\n if (mappingOpened) addPopEvent(state)\n return true\n}\n\nfunction parseNode (\n state: ParserState,\n parentIndent: number,\n nodeContext: NodeContext,\n allowToSeek: boolean,\n allowCompact: boolean,\n allowPropertyMapping = true\n): boolean {\n if (state.depth >= state.maxDepth) {\n throwError(state, `nesting exceeded maxDepth (${state.maxDepth})`)\n }\n\n state.depth++\n\n let indentStatus = 1\n let atNewLine = false\n let hasContent = false\n let propertyStart: ParserSnapshot | null = null\n const props = emptyProperties()\n\n let allowBlockScalars = nodeContext === CONTEXT_BLOCK_OUT || nodeContext === CONTEXT_BLOCK_IN\n let allowBlockCollections = allowBlockScalars\n const allowBlockStyles = allowBlockScalars\n\n if (allowToSeek && skipSeparationSpace(state, true)) {\n atNewLine = true\n\n if (state.lineIndent > parentIndent) {\n indentStatus = 1\n } else if (state.lineIndent === parentIndent) {\n indentStatus = 0\n } else {\n indentStatus = -1\n }\n }\n\n if (indentStatus === 1) {\n while (true) {\n const ch = state.input.charCodeAt(state.position)\n const propertyState = snapshotState(state)\n\n if (atNewLine &&\n indentStatus !== 1 &&\n (ch === 0x21/* ! */ || ch === 0x26/* & */)) {\n break\n }\n\n if (atNewLine &&\n allowBlockStyles &&\n (props.tagStart !== NO_RANGE || props.anchorStart !== NO_RANGE) &&\n (ch === 0x21/* ! */ || ch === 0x26/* & */)) {\n const fallbackState = snapshotState(state)\n const flowIndent = parentIndent + 1\n const mappingIndent = state.position - state.lineStart\n\n if (readBlockMapping(state, mappingIndent, flowIndent, props) &&\n state.events[fallbackState.eventsLength]?.type === EVENT_ID.MAPPING) {\n state.depth--\n return true\n }\n\n restoreState(state, fallbackState)\n }\n\n if (atNewLine &&\n ((ch === 0x21/* ! */ && props.tagStart !== NO_RANGE) ||\n (ch === 0x26/* & */ && props.anchorStart !== NO_RANGE))) {\n break\n }\n\n if (!readTagProperty(state, props, nodeContext === CONTEXT_FLOW_IN) && !readAnchorProperty(state, props)) {\n break\n }\n\n if (propertyStart === null) propertyStart = propertyState\n\n if (skipSeparationSpace(state, true)) {\n atNewLine = true\n allowBlockCollections = allowBlockStyles\n\n if (state.lineIndent > parentIndent) {\n indentStatus = 1\n } else if (state.lineIndent === parentIndent) {\n indentStatus = 0\n } else {\n indentStatus = -1\n }\n } else {\n allowBlockCollections = false\n }\n }\n }\n\n if (allowBlockCollections) {\n allowBlockCollections = atNewLine || allowCompact\n }\n\n if (indentStatus === 1 || nodeContext === CONTEXT_BLOCK_OUT) {\n const flowIndent = nodeContext === CONTEXT_FLOW_IN || nodeContext === CONTEXT_FLOW_OUT\n ? parentIndent\n : parentIndent + 1\n const blockIndent = state.position - state.lineStart\n\n if (indentStatus === 1) {\n if ((allowBlockCollections &&\n (readBlockSequence(state, blockIndent, props) ||\n readBlockMapping(state, blockIndent, flowIndent, props))) ||\n readFlowCollection(state, flowIndent, props)) {\n hasContent = true\n } else {\n const ch = state.input.charCodeAt(state.position)\n\n if (propertyStart !== null && allowPropertyMapping && allowBlockStyles && !allowBlockCollections &&\n ch !== 0x7C/* | */ && ch !== 0x3E/* > */) {\n const fallbackState = snapshotState(state)\n const propertyIndent = propertyStart.position - propertyStart.lineStart\n\n restoreState(state, propertyStart)\n\n if (readBlockMapping(state, propertyIndent, flowIndent, emptyProperties()) &&\n state.events[fallbackState.eventsLength]?.type === EVENT_ID.MAPPING) {\n hasContent = true\n } else {\n restoreState(state, fallbackState)\n }\n }\n\n if (!hasContent &&\n ((allowBlockScalars && readBlockScalar(state, flowIndent, props)) ||\n readSingleQuotedScalar(state, flowIndent, props) ||\n readDoubleQuotedScalar(state, flowIndent, props) ||\n readAlias(state, props) ||\n readPlainScalar(state, flowIndent, nodeContext, props))) {\n hasContent = true\n }\n }\n } else if (indentStatus === 0) {\n hasContent = allowBlockCollections && readBlockSequence(state, blockIndent, props)\n }\n }\n\n allowBlockScalars = allowBlockScalars && !hasContent\n\n if (!hasContent && (props.anchorStart !== NO_RANGE || props.tagStart !== NO_RANGE || allowBlockScalars)) {\n addScalarEvent(\n state,\n NO_RANGE,\n NO_RANGE,\n props.anchorStart,\n props.anchorEnd,\n props.tagStart,\n props.tagEnd,\n SCALAR_STYLE.PLAIN\n )\n hasContent = true\n }\n\n state.depth--\n return hasContent || props.anchorStart !== NO_RANGE || props.tagStart !== NO_RANGE\n}\n\nfunction readDirective (state: ParserState) {\n if (state.lineIndent > 0 || state.input.charCodeAt(state.position) !== 0x25/* % */) return false\n\n state.position++\n const nameStart = state.position\n\n while (state.input.charCodeAt(state.position) !== 0 && !isWsOrEol(state.input.charCodeAt(state.position))) state.position++\n\n const name = state.input.slice(nameStart, state.position)\n const args: string[] = []\n\n if (name.length === 0) throwError(state, 'directive name must not be less than one character in length')\n\n while (state.input.charCodeAt(state.position) !== 0 && !isEol(state.input.charCodeAt(state.position))) {\n while (isWhiteSpace(state.input.charCodeAt(state.position))) state.position++\n if (state.input.charCodeAt(state.position) === 0x23/* # */ || isEol(state.input.charCodeAt(state.position)) || state.input.charCodeAt(state.position) === 0) break\n\n const start = state.position\n while (state.input.charCodeAt(state.position) !== 0 && !isWsOrEol(state.input.charCodeAt(state.position))) state.position++\n args.push(state.input.slice(start, state.position))\n }\n\n if (isEol(state.input.charCodeAt(state.position))) consumeLineBreak(state)\n\n if (name === 'YAML') {\n if (state.directives.some(directive => directive.kind === 'yaml')) throwError(state, 'duplication of %YAML directive')\n if (args.length !== 1) throwError(state, 'YAML directive accepts exactly one argument')\n\n const match = /^([0-9]+)\\.([0-9]+)$/.exec(args[0])\n if (match === null) throwError(state, 'ill-formed argument of the YAML directive')\n if (parseInt(match[1], 10) !== 1) throwError(state, 'unacceptable YAML version of the document')\n\n state.directives.push({ kind: 'yaml', version: args[0] })\n } else if (name === 'TAG') {\n if (args.length !== 2) throwError(state, 'TAG directive accepts exactly two arguments')\n\n const [handle, prefix] = args\n if (!PATTERN_TAG_HANDLE.test(handle)) throwError(state, 'ill-formed tag handle (first argument) of the TAG directive')\n if (HAS_OWN.call(state.tagHandlers, handle)) throwError(state, `there is a previously declared suffix for \"${handle}\" tag handle`)\n if (!PATTERN_TAG_PREFIX.test(prefix)) throwError(state, 'ill-formed tag prefix (second argument) of the TAG directive')\n try {\n decodeURIComponent(prefix)\n } catch {\n throwError(state, `tag prefix is malformed: ${prefix}`)\n }\n\n state.tagHandlers[handle] = prefix\n state.directives.push({ kind: 'tag', handle, prefix })\n }\n\n return true\n}\n\nfunction readDocument (state: ParserState) {\n state.directives = []\n state.tagHandlers = Object.create(null)\n let hasDirectives = false\n\n skipSeparationSpace(state, true)\n\n while (readDirective(state)) {\n hasDirectives = true\n skipSeparationSpace(state, true)\n }\n\n let explicitStart = false\n let explicitEnd = false\n let allowCompact = true\n\n if (state.lineIndent === 0 &&\n state.input.charCodeAt(state.position) === 0x2D/* - */ &&\n state.input.charCodeAt(state.position + 1) === 0x2D/* - */ &&\n state.input.charCodeAt(state.position + 2) === 0x2D/* - */ &&\n isWsOrEolOrEnd(state.input.charCodeAt(state.position + 3))) {\n explicitStart = true\n const markerLine = state.line\n state.position += 3\n skipSeparationSpace(state, true)\n allowCompact = state.line > markerLine\n } else if (hasDirectives) {\n throwError(state, 'directives end mark is expected')\n }\n\n const documentEventIndex = state.events.length\n if (!explicitStart &&\n state.position === state.lineStart &&\n state.input.charCodeAt(state.position) === 0x2E/* . */ &&\n testDocumentSeparator(state)) {\n state.position += 3\n skipSeparationSpace(state, true)\n return\n }\n\n addDocumentEvent(state, explicitStart, false)\n if (!parseNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, allowCompact, allowCompact)) {\n addEmptyScalarEvent(state)\n }\n skipSeparationSpace(state, true)\n\n if (state.position === state.lineStart && testDocumentSeparator(state)) {\n explicitEnd = state.input.charCodeAt(state.position) === 0x2E/* . */\n if (explicitEnd) {\n const markerLine = state.line\n state.position += 3\n skipSeparationSpace(state, true)\n if (state.line === markerLine && state.position < state.length) {\n throwError(state, 'end of the stream or a document separator is expected')\n }\n }\n }\n\n const documentEvent = state.events[documentEventIndex]\n if (documentEvent?.type === EVENT_ID.DOCUMENT) documentEvent.explicitEnd = explicitEnd\n\n addPopEvent(state)\n\n if (!explicitEnd &&\n state.position < state.length &&\n !testDocumentBoundary(state)) {\n throwError(state, 'end of the stream or a document separator is expected')\n }\n}\n\n/**\n * Parses YAML into a flat event stream referencing source text by offsets.\n *\n * @category Events\n */\nfunction parseEvents (input: string, options: ParserOptions): Event[] {\n const length = input.length\n const state: ParserState = {\n ...DEFAULT_PARSER_OPTIONS,\n ...options,\n input: `${input}\\0`,\n length,\n position: 0,\n line: 0,\n lineStart: 0,\n lineIndent: 0,\n firstTabInLine: -1,\n depth: 0,\n directives: [],\n tagHandlers: Object.create(null),\n events: []\n }\n\n const nullpos = input.indexOf('\\0')\n if (nullpos !== -1) YAMLException.throwAt(input, nullpos, 'null byte is not allowed in input', state.filename)\n\n while (state.position < state.length) {\n skipByteOrderMark(state)\n skipSeparationSpace(state, true)\n if (state.position >= state.length) break\n const documentStart = state.position\n readDocument(state)\n if (state.position === documentStart) {\n // Internal progress guard: if readDocument() ever returns without\n // consuming input, stop here instead of looping forever.\n /* c8 ignore next */\n throwError(state, 'can not read a document')\n }\n }\n\n return state.events\n}\n\nexport {\n parseEvents,\n DEFAULT_PARSER_OPTIONS,\n type ParserOptions\n}\n","import { YAMLException } from './common/exception.ts'\nimport { pick } from './common/object.ts'\nimport {\n constructFromEvents,\n DEFAULT_CONSTRUCTOR_OPTIONS,\n type ConstructorOptions\n} from './parser/constructor.ts'\nimport {\n parseEvents,\n DEFAULT_PARSER_OPTIONS,\n type ParserOptions\n} from './parser/parser.ts'\n\n// `source` is supplied by `loadDocuments` itself, not by the public caller.\n/** @category Main */\ninterface LoadOptions extends ParserOptions, Omit {}\n\n/** @inline */\ntype LoadAllIterator = (document: unknown) => void\n\nconst DEFAULT_LOAD_OPTIONS: Required = {\n ...DEFAULT_PARSER_OPTIONS,\n ...DEFAULT_CONSTRUCTOR_OPTIONS\n}\n\nfunction loadDocuments (input: string, options: LoadOptions = {}) {\n const opts = { ...DEFAULT_LOAD_OPTIONS, ...options }\n const source = String(input)\n\n const PARSER_OPT_KEYS = Object.keys(DEFAULT_PARSER_OPTIONS) as\n (keyof typeof DEFAULT_PARSER_OPTIONS)[]\n const CONSTRUCTOR_OPT_KEYS = Object.keys(DEFAULT_CONSTRUCTOR_OPTIONS) as\n (keyof typeof DEFAULT_CONSTRUCTOR_OPTIONS)[]\n\n const events = parseEvents(source, pick(opts, PARSER_OPT_KEYS))\n return constructFromEvents(events, { ...pick(opts, CONSTRUCTOR_OPT_KEYS), source })\n}\n\n/**\n * Same as {@link load}, but understands multi-document sources.\n * Returns an array of documents.\n *\n * @category Main\n */\nfunction loadAll (input: string, options?: LoadOptions): unknown[]\n\n/**\n * @deprecated Iterator is not supported.\n */\nfunction loadAll (input: string, iterator: null, options?: LoadOptions): unknown[]\n\n/**\n * @deprecated Iterator is not supported.\n */\nfunction loadAll (input: string, iterator: LoadAllIterator, options?: LoadOptions): void\nfunction loadAll (\n input: string,\n iteratorOrOptions?: LoadAllIterator | LoadOptions | null,\n options?: LoadOptions\n) {\n let iterator: LoadAllIterator | null = null\n\n if (typeof iteratorOrOptions === 'function') {\n iterator = iteratorOrOptions\n } else if (iteratorOrOptions !== null && typeof iteratorOrOptions === 'object') {\n options = iteratorOrOptions\n }\n\n const documents = loadDocuments(input, options)\n\n if (iterator === null) return documents\n for (const document of documents) iterator(document)\n}\n\n/**\n * Parses `string` as a single YAML document. Throws {@link YAMLException} on\n * error. This function does not understand multi-document or empty sources; it\n * throws an exception on those.\n *\n * > [!NOTE]\n * > 1. When processing untrusted input, see the\n * > [security considerations](../docs/safety.md).\n * > 2. All exceptions MUST be caught, not just {@link YAMLException}.\n * > 3. The default {@link CORE_SCHEMA} comes without the `!!merge` tag. You can\n * > easily enable it if needed.\n * > 4. The default {@link mapTag} is `{}`-object based, with known limitations\n * > (see description). For full compatibility use {@link realMapTag}\n * > instead (it uses native JS `Map`).\n *\n * @example\n * Enable {@link mergeTag} and {@link realMapTag}:\n *\n * ```javascript\n * import { load, CORE_SCHEMA, mergeTag, realMapTag } from 'js-yaml'\n *\n * try {\n * load(data, { schema: CORE_SCHEMA.withTags(mergeTag, realMapTag) })\n * } catch (e) {\n * console.error(e)\n * }\n * ```\n *\n * @category Main\n */\nfunction load (input: string, options?: LoadOptions) {\n const documents = loadDocuments(input, options)\n\n if (documents.length === 0) throw new YAMLException('expected a document, but the input is empty')\n if (documents.length === 1) return documents[0]\n\n throw new YAMLException('expected a single document in the stream, but found more')\n}\n\nexport {\n load,\n loadAll,\n type LoadOptions\n}\n","// JS value graph → AST. Knows tags (`identify` / `represent`). A single\n// identity-`Map` walk handles dedup: a repeat occurrence of an object (including\n// a cycle) becomes an `alias`, and the first occurrence gets an `anchor`.\n\nimport { YAMLException } from '../common/exception.ts'\nimport { type Schema } from '../schema.ts'\nimport { type TagDefinition } from '../tag.ts'\nimport { tagNameShort } from '../common/tagname.ts'\nimport { COLLECTION_STYLE, SCALAR_STYLE } from '../parser/events.ts'\nimport {\n type Document,\n type Node,\n type ScalarNode,\n type SequenceNode,\n type MappingNode\n} from './nodes.ts'\n\n/** @category AST */\ninterface FromJsOptions {\n /** Inlines duplicate objects instead of converting them into references. */\n noRefs?: boolean\n\n /**\n * Skips unrepresentable values instead of throwing. Invalid mapping pairs\n * and sequence items are skipped; `undefined` sequence items become `null`.\n */\n skipInvalid?: boolean\n}\n\n// A match candidate. `implicitTag` means the tag is not printed (implicit\n// scalars and the default str/seq/map tags).\ninterface RepresentType {\n tag: TagDefinition\n implicitTag: boolean\n}\n\n// Returned by `build` when no tag matched.\nconst INVALID = Symbol('INVALID')\n\ninterface FromJsState {\n representTypes: RepresentType[]\n noRefs: boolean\n skipInvalid: boolean\n\n // Already-built collection values → their node, for anchor/alias dedup.\n refs: Map\n refCounter: number\n}\n\nfunction buildRepresentTypes (schema: Schema): RepresentType[] {\n const defaultTags = new Set([\n schema.defaultScalarTag,\n schema.defaultSequenceTag,\n schema.defaultMappingTag\n ].filter((t): t is TagDefinition => t !== undefined))\n\n // Default container/str tags go last so a more specific tag identifying the\n // same JS value (e.g. a custom tag on a plain object) wins.\n const implicitScalars = schema.implicitScalarTags\n const explicitTags = schema.tags.filter(t =>\n !(t.nodeKind === 'scalar' && t.implicit) && !defaultTags.has(t))\n const defaultTagsLast = schema.tags.filter(t => defaultTags.has(t))\n\n return [\n ...implicitScalars.map(tag => ({ tag, implicitTag: true })),\n ...explicitTags.map(tag => ({ tag, implicitTag: false })),\n ...defaultTagsLast.map(tag => ({ tag, implicitTag: true }))\n ]\n}\n\n// First tag whose `identify` accepts `object`.\nfunction matchTag (state: FromJsState, object: unknown): { tag: TagDefinition, tagName: string, implicitTag: boolean } | null {\n for (let index = 0, length = state.representTypes.length; index < length; index += 1) {\n const { tag, implicitTag } = state.representTypes[index]\n\n if (tag.identify(object)) {\n let tagName: string\n if (tag.matchByTagPrefix) {\n tagName = tag.representTagName(object)\n } else {\n tagName = tag.tagName\n }\n return { tag, tagName, implicitTag }\n }\n }\n\n return null\n}\n\n// Build a node for `object`, or INVALID when no tag matches. `undefined` never\n// throws (caller decides: null in a sequence, skip in a mapping, '' at root);\n// any other unrepresentable value throws unless `skipInvalid`.\nfunction build (state: FromJsState, object: unknown): Node | typeof INVALID {\n if (!state.noRefs && object !== null && typeof object === 'object') {\n const existing = state.refs.get(object)\n if (existing) {\n if (existing.anchor === undefined) existing.anchor = `ref_${state.refCounter++}`\n return { kind: 'alias', anchor: existing.anchor }\n }\n }\n\n const matched = matchTag(state, object)\n\n if (!matched) {\n if (object === undefined) return INVALID\n if (state.skipInvalid) return INVALID\n throw new YAMLException(`unacceptable kind of an object to dump ${Object.prototype.toString.call(object)}`)\n }\n\n const { tag, tagName, implicitTag } = matched\n const nodeTagName = implicitTag ? tagName : tagNameShort(tagName)\n\n if (tag.nodeKind === 'scalar') {\n const node: ScalarNode = {\n kind: 'scalar',\n tag: nodeTagName,\n tagged: !implicitTag,\n style: SCALAR_STYLE.PLAIN,\n value: tag.represent(object)\n }\n return node\n }\n\n if (tag.nodeKind === 'sequence') {\n const container = tag.represent(object)\n const node: SequenceNode = {\n kind: 'sequence',\n tag: nodeTagName,\n tagged: !implicitTag,\n style: COLLECTION_STYLE.BLOCK,\n items: []\n }\n if (!state.noRefs) state.refs.set(object, node)\n\n for (let index = 0, length = container.length; index < length; index += 1) {\n let item = build(state, container[index])\n // An invalid element becomes null; a still-invalid null then skips/throws.\n if (item === INVALID && container[index] === undefined) item = build(state, null)\n if (item === INVALID) continue\n node.items.push(item)\n }\n return node\n }\n\n // mapping — the canonical form is always a `Map`.\n const map = tag.represent(object)\n const node: MappingNode = {\n kind: 'mapping',\n tag: nodeTagName,\n tagged: !implicitTag,\n style: COLLECTION_STYLE.BLOCK,\n items: []\n }\n if (!state.noRefs) state.refs.set(object, node)\n\n for (const [objectKey, objectValue] of map) {\n const key = build(state, objectKey)\n if (key === INVALID) continue // invalid key skips the pair\n const value = build(state, objectValue)\n if (value === INVALID) continue // invalid value skips the pair\n node.items.push({ key, value })\n }\n return node\n}\n\n/**\n * Convert JS object to AST. A JS value is one YAML document. An unrepresentable\n * root becomes an empty document, which the presenter renders as an empty\n * string.\n *\n * @category AST\n */\nfunction jsToAst (input: unknown, schema: Schema, options: FromJsOptions = {}): Document[] {\n const state: FromJsState = {\n representTypes: buildRepresentTypes(schema),\n noRefs: options.noRefs ?? false,\n skipInvalid: options.skipInvalid ?? false,\n refs: new Map(),\n refCounter: 0\n }\n\n const root = build(state, input)\n return [{ contents: root === INVALID ? null : root, directives: [] }]\n}\n\nexport {\n jsToAst,\n type FromJsOptions\n}\n","// Depth-first AST traversal. Mirrors the `kind` walk of the presenter and the\n// `from_*` builders, but stays read-oriented: nodes are plain objects, so a\n// visitor mutates them in place. Control signals let it prune or stop the walk.\n\nimport {\n type Node,\n type Document\n} from './nodes.ts'\n\n// Returned by a visitor to control the walk; anything else (incl. `undefined`)\n// descends as usual.\n/**\n * Return from a visitor to stop the whole traversal.\n *\n * @category AST\n */\nconst VISIT_BREAK = Symbol('visit:break')\n\n/**\n * Return from a visitor to skip the current node's children.\n *\n * @category AST\n */\nconst VISIT_SKIP = Symbol('visit:skip')\n\n/** @inline */\ntype VisitControl = typeof VISIT_BREAK | typeof VISIT_SKIP | undefined | void\n\n/**\n * Traversal-derived position of the current node. Kept off the node itself: a\n * node may sit in several places (alias/dedup reuse), so depth/role belong to\n * the walk, not the node. {@link VisitContext.parent} `kind` +\n * {@link VisitContext.isKey} pin the exact slot.\n *\n * @category AST\n */\ninterface VisitContext {\n /** 0 = document content root */\n depth: number\n\n /** Enclosing sequence/mapping, null at the root */\n parent: Node | null\n\n /** Node sits in a mapping key position */\n isKey: boolean\n}\n\n/** @category AST */\ntype Visitor = (node: Node, ctx: VisitContext) => VisitControl\n\n// Returns `true` once `VISIT_BREAK` was seen, so callers can unwind the walk.\nfunction visitNode (node: Node, visitor: Visitor, ctx: VisitContext): boolean {\n const control = visitor(node, ctx)\n if (control === VISIT_BREAK) return true\n if (control === VISIT_SKIP) return false\n\n const depth = ctx.depth + 1\n\n switch (node.kind) {\n case 'sequence':\n for (const item of node.items) {\n if (visitNode(item, visitor, { depth, parent: node, isKey: false })) return true\n }\n break\n case 'mapping':\n for (const { key, value } of node.items) {\n if (visitNode(key, visitor, { depth, parent: node, isKey: true })) return true\n if (visitNode(value, visitor, { depth, parent: node, isKey: false })) return true\n }\n break\n }\n\n return false\n}\n\n/**\n * Walk every node in the documents, calling {@link Visitor} once per\n * node (pre-order).\n *\n * @category AST\n */\nfunction visit (documents: Document[], visitor: Visitor): void {\n for (const doc of documents) {\n if (doc.contents && visitNode(doc.contents, visitor, { depth: 0, parent: null, isKey: false })) return\n }\n}\n\nexport {\n visit,\n VISIT_BREAK,\n VISIT_SKIP,\n type Visitor,\n type VisitContext\n}\n","import { SCALAR_STYLE, type ScalarStyle } from '../parser/events.ts'\nimport { type ScalarLayout } from './scalar_styler.ts'\n\nfunction hasBit (mask: number, bit: number): boolean { return (mask & (1 << bit)) !== 0 }\n\n// This should eventually be a presenter option, but collection styling,\n// especially key layout, must be designed first to decide whether scalar and\n// collection width limits should share an option or be configured separately.\nconst MIN_SCALAR_CONTENT_WIDTH = 40\n\n/**\n * Default scalar styling rules in application order.\n * See [Scalar styling](../../docs/scalar_styling.md) for usage details.\n *\n * @category AST\n */\nconst DEFAULT_SCALAR_STYLE_RULES = {\n applyQuoteFlowKeysOption,\n doubleQuoteForInvisibles,\n doubleQuoteWhitespaceOnly,\n applyForceQuotesOption,\n tryLongOrMultilineAsBlock,\n quoteInvalidPlain,\n fallbackToDoubleQuoted\n} as const\n\nfunction _preferredQuotedStyle (layout: ScalarLayout): ScalarStyle {\n if (layout.presenterOptions.quoteStyle === 'single' &&\n hasBit(layout.allowedStylesMask, SCALAR_STYLE.SINGLE_QUOTED)) {\n return SCALAR_STYLE.SINGLE_QUOTED\n }\n\n return SCALAR_STYLE.DOUBLE_QUOTED\n}\n\nfunction applyQuoteFlowKeysOption (layout: ScalarLayout): void {\n if (!layout.presenterOptions.quoteFlowKeys) return\n\n // quoteFlowKeys applies only to plain scalar keys in flow mappings.\n if (!layout.isKey || !layout.flowOnly || layout.style !== SCALAR_STYLE.PLAIN) return\n\n layout.style = SCALAR_STYLE.DOUBLE_QUOTED\n}\n\nfunction doubleQuoteForInvisibles (layout: ScalarLayout): void {\n if (layout.style === SCALAR_STYLE.PLAIN &&\n /[\\t\\x7F-\\xA0\\u2028\\u2029\\uFEFF\\uFFFE\\uFFFF]/.test(layout.node.value)) {\n layout.style = SCALAR_STYLE.DOUBLE_QUOTED\n }\n}\n\nfunction doubleQuoteWhitespaceOnly (layout: ScalarLayout): void {\n // Block styles normally make multiline structure easier to see, but\n // whitespace-only content turns that structure into visually empty lines,\n // so force double quotes for this special case.\n if (layout.style === SCALAR_STYLE.PLAIN && /^\\s+$/.test(layout.node.value)) {\n layout.style = SCALAR_STYLE.DOUBLE_QUOTED\n }\n}\n\nfunction applyForceQuotesOption (layout: ScalarLayout): void {\n if (!layout.presenterOptions.forceQuotes) return\n\n // forceQuotes applies only to plain values, not to mapping keys.\n if (layout.isKey || layout.style !== SCALAR_STYLE.PLAIN) return\n\n layout.style = layout.node.value.includes('\\n')\n ? SCALAR_STYLE.DOUBLE_QUOTED\n : _preferredQuotedStyle(layout)\n}\n\nfunction tryLongOrMultilineAsBlock (layout: ScalarLayout): void {\n if (layout.style !== SCALAR_STYLE.PLAIN || layout.isKey) return\n\n const value = layout.node.value\n const multiline = value.indexOf('\\n') !== -1\n\n // Literal and folded block style bits are always set together, so checking\n // either one is sufficient.\n if (!hasBit(layout.allowedStylesMask, SCALAR_STYLE.LITERAL_BLOCK)) {\n if (multiline) layout.style = SCALAR_STYLE.DOUBLE_QUOTED\n return\n }\n\n const w = layout.presenterOptions.lineWidth\n\n if (w === -1) {\n if (multiline) layout.style = SCALAR_STYLE.LITERAL_BLOCK\n return\n }\n\n const availableWidth = Math.max(\n Math.min(w, MIN_SCALAR_CONTENT_WIDTH),\n w - layout.shiftOfContent\n )\n\n let position = 0\n let shouldFold = false\n\n // Check whether at least one line exceeds the width budget\n // and can be split at a space.\n while (position <= value.length) {\n let lineEnd = value.length\n\n const nextLineBreak = value.indexOf('\\n', position)\n\n if (nextLineBreak !== -1) lineEnd = nextLineBreak\n\n const line = value.slice(position, lineEnd)\n\n if (line.length > availableWidth &&\n line[0] !== ' ' &&\n / [^ \\t]/.test(line)) {\n shouldFold = true\n }\n\n if (nextLineBreak === -1) break\n position = nextLineBreak + 1\n }\n\n if (shouldFold) {\n layout.style = SCALAR_STYLE.FOLDED_BLOCK\n } else if (multiline) {\n layout.style = SCALAR_STYLE.LITERAL_BLOCK\n }\n}\n\nfunction quoteInvalidPlain (layout: ScalarLayout): void {\n if (layout.style === SCALAR_STYLE.PLAIN &&\n !hasBit(layout.allowedStylesMask, SCALAR_STYLE.PLAIN)) {\n layout.style = _preferredQuotedStyle(layout)\n }\n}\n\nfunction fallbackToDoubleQuoted (layout: ScalarLayout): void {\n if (!hasBit(layout.allowedStylesMask, layout.style)) {\n layout.style = SCALAR_STYLE.DOUBLE_QUOTED\n }\n}\n\nexport { MIN_SCALAR_CONTENT_WIDTH, DEFAULT_SCALAR_STYLE_RULES }\n","import { SCALAR_STYLE, type ScalarStyle } from '../parser/events.ts'\nimport { type Node, type ScalarNode } from './nodes.ts'\nimport { type PresenterOptions } from './presenter.ts'\nimport { MIN_SCALAR_CONTENT_WIDTH } from './styler_defaults.ts'\n\n/** Scalar presentation state passed to styling rules. @category AST */\ninterface ScalarLayout {\n readonly node: Readonly\n readonly parent: Readonly | null\n readonly level: number\n readonly isKey: boolean\n readonly flowOnly: boolean\n readonly shiftOfParent: number\n readonly shiftOfContent: number\n readonly shiftOfFirstLine: number\n readonly presenterOptions: Readonly>\n /**\n * Bit mask of allowed styles; each bit corresponds to a {@link SCALAR_STYLE}\n * value.\n */\n allowedStylesMask: number\n /**\n * Selected output style, which styling rules may modify. To avoid overriding\n * earlier decisions, a rule should normally modify it only while it is\n * {@link SCALAR_STYLE.PLAIN}.\n */\n style: ScalarStyle\n}\n\n/** Function signature for scalar styling rules. @category AST */\ntype ScalarStyleRule = (layout: ScalarLayout) => void\n\nfunction setBit (mask: number, bit: number): number { return mask | (1 << bit) }\n\n// YAML 1.2.2 character productions.\n// https://yaml.org/spec/1.2.2/#51-character-set\nconst SRC_C_PRINTABLE = '[\\\\x09\\\\x0A\\\\x0D\\\\x20-\\\\x7E\\\\x85\\\\xA0-\\\\uD7FF\\\\uE000-\\\\uFFFD\\\\u{10000}-\\\\u{10FFFF}]'\nconst SRC_B_CHAR = '[\\\\n\\\\r]'\nconst SRC_C_BYTE_ORDER_MARK = '\\\\uFEFF'\nconst SRC_S_WHITE = '[ \\\\t]'\nconst SRC_NB_CHAR = `(?:(?!(?:${SRC_B_CHAR}|${SRC_C_BYTE_ORDER_MARK}))${SRC_C_PRINTABLE})`\nconst SRC_NS_CHAR = `(?:(?!${SRC_S_WHITE})${SRC_NB_CHAR})`\n\n// YAML 1.2.2 [2] nb-json.\nconst SRC_NB_JSON = '[\\\\x09\\\\x20-\\\\uD7FF\\\\uE000-\\\\uFFFF\\\\u{10000}-\\\\u{10FFFF}]'\n\n// YAML 1.2.2 indicator productions.\n// https://yaml.org/spec/1.2.2/#54-indicator-characters\nconst SRC_C_INDICATOR = '[-?:,\\\\[\\\\]{}#&*!|>\\'\"%@`]'\nconst SRC_C_FLOW_INDICATOR = '[,\\\\[\\\\]{}]'\n\n// YAML 1.2.2 [127]-[129] ns-plain-safe(c).\n// https://yaml.org/spec/1.2.2/#733-plain-style\nconst SRC_NS_PLAIN_SAFE_FLOW_OUT = SRC_NS_CHAR\nconst SRC_NS_PLAIN_SAFE_FLOW_IN = `(?:(?!${SRC_C_FLOW_INDICATOR})${SRC_NS_CHAR})`\n\n// YAML 1.2.2 [126] ns-plain-first(c).\nconst SRC_NS_PLAIN_FIRST_FLOW_OUT =\n `(?:(?:(?!${SRC_C_INDICATOR})${SRC_NS_CHAR})|[?:-](?=${SRC_NS_PLAIN_SAFE_FLOW_OUT}))`\nconst SRC_NS_PLAIN_FIRST_FLOW_IN =\n `(?:(?:(?!${SRC_C_INDICATOR})${SRC_NS_CHAR})|[?:-](?=${SRC_NS_PLAIN_SAFE_FLOW_IN}))`\n\n// YAML 1.2.2 [130] ns-plain-char(c).\n// The production itself requires lookbehind, so these regexps require ES2018 lookbehind support.\n// const SRC_NS_PLAIN_CHAR_FLOW_OUT =\n// `(?:(?:(?![:#])${SRC_NS_PLAIN_SAFE_FLOW_OUT})|(?<=${SRC_NS_CHAR})#|:(?=${SRC_NS_PLAIN_SAFE_FLOW_OUT}))`\n// const SRC_NS_PLAIN_CHAR_FLOW_IN =\n// `(?:(?:(?![:#])${SRC_NS_PLAIN_SAFE_FLOW_IN})|(?<=${SRC_NS_CHAR})#|:(?=${SRC_NS_PLAIN_SAFE_FLOW_IN}))`\n\n// ES2015-compatible alternative without lookbehind: consume each run of hashes\n// together with the preceding non-hash ns-plain-char.\nconst SRC_NS_PLAIN_CHAR_FLOW_OUT =\n `(?:(?:(?![:#])${SRC_NS_PLAIN_SAFE_FLOW_OUT})|:(?=${SRC_NS_PLAIN_SAFE_FLOW_OUT}))#*`\nconst SRC_NS_PLAIN_CHAR_FLOW_IN =\n `(?:(?:(?![:#])${SRC_NS_PLAIN_SAFE_FLOW_IN})|:(?=${SRC_NS_PLAIN_SAFE_FLOW_IN}))#*`\n\n// YAML 1.2.2 [132] nb-ns-plain-in-line(c).\nconst SRC_NB_NS_PLAIN_IN_LINE_FLOW_OUT = `(?:${SRC_S_WHITE}*${SRC_NS_PLAIN_CHAR_FLOW_OUT})*`\nconst SRC_NB_NS_PLAIN_IN_LINE_FLOW_IN = `(?:${SRC_S_WHITE}*${SRC_NS_PLAIN_CHAR_FLOW_IN})*`\n\n// YAML 1.2.2 [133] ns-plain-one-line(c).\nconst SRC_NS_PLAIN_ONE_LINE_FLOW_OUT =\n `${SRC_NS_PLAIN_FIRST_FLOW_OUT}#*${SRC_NB_NS_PLAIN_IN_LINE_FLOW_OUT}`\nconst SRC_NS_PLAIN_ONE_LINE_FLOW_IN =\n `${SRC_NS_PLAIN_FIRST_FLOW_IN}#*${SRC_NB_NS_PLAIN_IN_LINE_FLOW_IN}`\nconst SRC_NS_PLAIN_ONE_LINE_BLOCK_KEY = SRC_NS_PLAIN_ONE_LINE_FLOW_OUT\nconst SRC_NS_PLAIN_ONE_LINE_FLOW_KEY = SRC_NS_PLAIN_ONE_LINE_FLOW_IN\n\n// YAML 1.2.2 [134] s-ns-plain-next-line(n,c).\n// ScalarNode.value contains the folded value, not the source text: one source\n// line break became a space, while k > 1 breaks became k - 1 LF characters.\n// The space case is already accepted by [132]; each remaining run of LFs\n// therefore represents a transition to the next non-empty content line in [134].\nconst SRC_S_NS_PLAIN_NEXT_LINE_FLOW_OUT =\n `\\\\n+${SRC_NS_PLAIN_CHAR_FLOW_OUT}${SRC_NB_NS_PLAIN_IN_LINE_FLOW_OUT}`\nconst SRC_S_NS_PLAIN_NEXT_LINE_FLOW_IN =\n `\\\\n+${SRC_NS_PLAIN_CHAR_FLOW_IN}${SRC_NB_NS_PLAIN_IN_LINE_FLOW_IN}`\n\n// YAML 1.2.2 [135] ns-plain-multi-line(n,c).\nconst SRC_NS_PLAIN_MULTI_LINE_FLOW_OUT =\n `${SRC_NS_PLAIN_ONE_LINE_FLOW_OUT}(?:${SRC_S_NS_PLAIN_NEXT_LINE_FLOW_OUT})*`\nconst SRC_NS_PLAIN_MULTI_LINE_FLOW_IN =\n `${SRC_NS_PLAIN_ONE_LINE_FLOW_IN}(?:${SRC_S_NS_PLAIN_NEXT_LINE_FLOW_IN})*`\n\n// YAML 1.2.2 [131] ns-plain(n,c).\nconst NS_PLAIN_FLOW_OUT = new RegExp(`^(?:${SRC_NS_PLAIN_MULTI_LINE_FLOW_OUT})$`, 'u')\nconst NS_PLAIN_FLOW_IN = new RegExp(`^(?:${SRC_NS_PLAIN_MULTI_LINE_FLOW_IN})$`, 'u')\nconst NS_PLAIN_BLOCK_KEY = new RegExp(`^(?:${SRC_NS_PLAIN_ONE_LINE_BLOCK_KEY})$`, 'u')\nconst NS_PLAIN_FLOW_KEY = new RegExp(`^(?:${SRC_NS_PLAIN_ONE_LINE_FLOW_KEY})$`, 'u')\n\n// YAML 1.2.2 [118]-[125], projected to ScalarNode.value: doubled quotes\n// are already decoded, and flow folding represents content line feeds as LF.\nconst NB_SINGLE_ONE_LINE = new RegExp(`^(?:${SRC_NB_JSON})*$`, 'u')\nconst NB_SINGLE_MULTI_LINE = new RegExp(`^(?:${SRC_NB_JSON}|\\\\n)*$`, 'u')\n\n// YAML 1.2.2 [170]-[182], projected to ScalarNode.value: source line breaks\n// are normalized to LF; every other content character must be nb-char.\nconst BLOCK_SCALAR_CONTENT = new RegExp(`^(?:${SRC_NB_CHAR}|\\\\n)*$`, 'u')\n\n// YAML 1.2.2 [206] c-forbidden.\n// https://yaml.org/spec/1.2.2/#912-document-markers\nconst C_FORBIDDEN_FIRST_LINE = /^(?:---|\\.\\.\\.)(?=$|[ \\t\\n\\r])/\nconst C_FORBIDDEN_CONTENT = /^(?:---|\\.\\.\\.)(?=$|[ \\t\\n\\r])/m\n\nfunction canUsePlain (layout: ScalarLayout): boolean {\n const str = layout.node.value\n\n // Allow null to be rendered as an empty scalar; its tag is checked below.\n if (str !== '') {\n const nsPlain = layout.isKey\n ? (layout.flowOnly ? NS_PLAIN_FLOW_KEY : NS_PLAIN_BLOCK_KEY)\n : (layout.flowOnly ? NS_PLAIN_FLOW_IN : NS_PLAIN_FLOW_OUT)\n\n if (!nsPlain.test(str)) return false\n if (layout.shiftOfFirstLine === 0 && C_FORBIDDEN_FIRST_LINE.test(str)) return false\n\n if (layout.shiftOfContent === 0) {\n const firstLineBreak = str.indexOf('\\n')\n\n if (firstLineBreak !== -1) {\n const content = str.slice(firstLineBreak + 1)\n\n if (C_FORBIDDEN_CONTENT.test(content)) return false\n }\n }\n }\n\n // Outside the plain-syntax BNF: preserve the node tag under implicit resolution.\n const resolvedTag = layout.presenterOptions.schema.resolveImplicitScalarTag(str).tag.tagName\n\n if (!layout.node.tagged && resolvedTag !== layout.node.tag) return false\n\n // Outside YAML 1.2.2: preserve YAML 1.1 !!value semantics.\n // https://yaml.org/type/value.html\n if (!layout.node.tagged && str === '=' &&\n resolvedTag === layout.presenterOptions.schema.defaultScalarTag.tagName) return false\n\n return true\n}\n\nfunction canUseSingleQuoted (layout: ScalarLayout): boolean {\n const str = layout.node.value\n const nbSingleText = layout.isKey ? NB_SINGLE_ONE_LINE : NB_SINGLE_MULTI_LINE\n\n if (!nbSingleText.test(str)) return false\n\n // [123]-[125] exclude trailing and leading s-white around a folded break;\n // single-quoted style has no escape that could preserve it.\n if (/[ \\t]\\n|\\n[ \\t]/.test(str)) return false\n\n // A decoded LF is rendered through flow folding. At zero continuation\n // indentation, c-forbidden would terminate the quoted scalar.\n if (!layout.isKey && layout.shiftOfContent === 0) {\n const firstLineBreak = str.indexOf('\\n')\n\n if (firstLineBreak !== -1 &&\n C_FORBIDDEN_CONTENT.test(str.slice(firstLineBreak + 1))) return false\n }\n\n return true\n}\n\nfunction canUseBlock (layout: ScalarLayout): boolean {\n if (layout.flowOnly || !BLOCK_SCALAR_CONTENT.test(layout.node.value)) return false\n\n const contentIndent = layout.shiftOfContent - layout.shiftOfParent\n\n if (contentIndent < 1) return false\n\n // A leading space requires [163] c-indentation-indicator. Its value is 1-9.\n if (contentIndent > 9 && /^\\n* /.test(layout.node.value)) return false\n\n // Block content starts on its own line, so every zero-indented content line\n // is subject to [206] c-forbidden.\n if (layout.shiftOfContent === 0 && C_FORBIDDEN_CONTENT.test(layout.node.value)) return false\n\n return true\n}\n\nfunction detectAllowedStyles (layout: ScalarLayout): void {\n // [107] Double-quoted style can express arbitrary strings through escape sequences.\n let mask = setBit(0, SCALAR_STYLE.DOUBLE_QUOTED)\n\n if (canUsePlain(layout)) mask = setBit(mask, SCALAR_STYLE.PLAIN)\n if (canUseSingleQuoted(layout)) mask = setBit(mask, SCALAR_STYLE.SINGLE_QUOTED)\n\n if (canUseBlock(layout)) {\n mask = setBit(setBit(mask, SCALAR_STYLE.LITERAL_BLOCK), SCALAR_STYLE.FOLDED_BLOCK)\n }\n\n layout.allowedStylesMask = mask\n}\n\nfunction renderScalar (layout: ScalarLayout): string {\n switch (layout.style) {\n case SCALAR_STYLE.PLAIN:\n return renderPlain(layout)\n case SCALAR_STYLE.SINGLE_QUOTED:\n return renderSingleQuoted(layout)\n case SCALAR_STYLE.LITERAL_BLOCK:\n return renderLiteralBlock(layout)\n case SCALAR_STYLE.FOLDED_BLOCK:\n return renderFoldedBlock(layout)\n case SCALAR_STYLE.DOUBLE_QUOTED:\n return renderDoubleQuoted(layout)\n }\n}\n\nfunction renderPlain (layout: ScalarLayout): string {\n return encodeFlowBreaks(layout.node.value, layout.shiftOfContent)\n}\n\nfunction renderSingleQuoted (layout: ScalarLayout): string {\n const value = encodeFlowBreaks(layout.node.value, layout.shiftOfContent)\n return `'${value.replace(/'/g, \"''\")}'`\n}\n\nfunction renderLiteralBlock (layout: ScalarLayout): string {\n const value = layout.node.value\n\n return '|' + blockHeader(value, layout.shiftOfParent, layout.shiftOfContent) +\n dropEndingNewline(indentString(value, layout.shiftOfContent))\n}\n\nfunction renderFoldedBlock (layout: ScalarLayout): string {\n const value = layout.node.value\n const w = layout.presenterOptions.lineWidth\n let availableWidth = Infinity\n\n if (w !== -1) {\n availableWidth = Math.max(\n Math.min(w, MIN_SCALAR_CONTENT_WIDTH),\n w - layout.shiftOfContent\n )\n }\n\n return '>' + blockHeader(value, layout.shiftOfParent, layout.shiftOfContent) +\n dropEndingNewline(indentString(\n foldBlockScalar(value, availableWidth),\n layout.shiftOfContent\n ))\n}\n\nfunction renderDoubleQuoted (layout: ScalarLayout): string {\n return `\"${escapeString(layout.node.value)}\"`\n}\n\n// Flow scalars fold line breaks: a run of k source line breaks reparses to k-1\n// literal LF characters. Encode each run of p literal LF characters as p+1\n// breaks and indent the following content line.\nfunction encodeFlowBreaks (string: string, shiftOfContent: number): string {\n let nextLF = string.indexOf('\\n')\n if (nextLF === -1) return string\n\n const pad = ' '.repeat(shiftOfContent)\n let result = string.slice(0, nextLF)\n\n const lineRe = /(\\n+)([^\\n]*)/g\n lineRe.lastIndex = nextLF\n let match\n\n while ((match = lineRe.exec(string))) {\n const breaks = match[1].length\n const line = match[2]\n result += '\\n'.repeat(breaks + 1) + pad + line\n }\n\n return result\n}\n\n// Indents every line in a string. Empty lines (\\n only) are not indented.\nfunction indentString (string: string, spaces: number): string {\n const indent = ' '.repeat(spaces)\n let position = 0\n let result = ''\n const length = string.length\n\n while (position < length) {\n let line\n const next = string.indexOf('\\n', position)\n\n if (next === -1) {\n line = string.slice(position)\n position = length\n } else {\n line = string.slice(position, next + 1)\n position = next + 1\n }\n\n if (line.length && line !== '\\n') result += indent\n\n result += line\n }\n\n return result\n}\n\nfunction needIndentIndicator (string: string): boolean {\n return /^\\n* /.test(string)\n}\n\nfunction blockHeader (string: string, shiftOfParent: number, shiftOfContent: number): string {\n const indentIndicator = needIndentIndicator(string)\n ? String(shiftOfContent - shiftOfParent)\n : ''\n\n // The string '\\n' counts as a trailing empty line.\n const clip = string[string.length - 1] === '\\n'\n const keep = clip && (string[string.length - 2] === '\\n' || string === '\\n')\n const chomp = keep ? '+' : (clip ? '' : '-')\n\n return `${indentIndicator}${chomp}\\n`\n}\n\n// The presenter adds its own trailing newline.\nfunction dropEndingNewline (string: string): string {\n return string[string.length - 1] === '\\n' ? string.slice(0, -1) : string\n}\n\nfunction isMoreIndented (char: string): boolean {\n return char === ' ' || char === '\\t'\n}\n\nfunction foldLine (line: string, width: number): string {\n if (line === '' || isMoreIndented(line[0])) return line\n\n const breakRe = / [^ \\t]/g\n let match\n let start = 0\n let end\n let curr = 0\n let next = 0\n let result = ''\n\n while ((match = breakRe.exec(line))) {\n next = match.index\n\n if (next - start > width) {\n end = (curr > start) ? curr : next\n result += `\\n${line.slice(start, end)}`\n start = end + 1\n }\n\n curr = next\n }\n\n result += '\\n'\n\n if (line.length - start > width && curr > start) {\n result += `${line.slice(start, curr)}\\n${line.slice(curr + 1)}`\n } else {\n result += line.slice(start)\n }\n\n return result.slice(1)\n}\n\nfunction foldBlockScalar (string: string, width: number): string {\n const lineRe = /(\\n+)([^\\n]*)/g\n\n let nextLF = string.indexOf('\\n')\n if (nextLF === -1) nextLF = string.length\n lineRe.lastIndex = nextLF\n\n let result = foldLine(string.slice(0, nextLF), width)\n let prevMoreIndented = string[0] === '\\n' || isMoreIndented(string[0])\n let moreIndented\n let match\n\n while ((match = lineRe.exec(string))) {\n const prefix = match[1]\n const line = match[2]\n\n moreIndented = line !== '' && isMoreIndented(line[0])\n result += prefix +\n ((!prevMoreIndented && !moreIndented && line !== '') ? '\\n' : '') +\n foldLine(line, width)\n prevMoreIndented = moreIndented\n }\n\n return result\n}\n\n// Characters escaped in Double-Quoted Style:\n//\n// - the inverse of YAML 1.2.2 [1] c-printable;\n// - TAB, LF and CR, which c-printable includes;\n// - NEL, NBSP, LS, PS and BOM, which are escaped to make invisible content\n// visible;\n// - double quote and backslash, which must be escaped because they have\n// syntactic meaning.\n//\n// In Unicode mode, the surrogate range matches unpaired surrogates but does not\n// match either code unit of a valid surrogate pair.\n// https://yaml.org/spec/1.2.2/#rule-c-printable\nconst CHARACTERS_TO_ESCAPE =\n /[\"\\\\\\x00-\\x1F\\x7F-\\xA0\\u2028\\u2029\\uD800-\\uDFFF\\uFEFF\\uFFFE\\uFFFF]/gu\n\nfunction escapeCharacter (character: string): string {\n switch (character) {\n case '\\x00': return '\\\\0'\n case '\\x07': return '\\\\a'\n case '\\x08': return '\\\\b'\n case '\\x09': return '\\\\t'\n case '\\x0A': return '\\\\n'\n case '\\x0B': return '\\\\v'\n case '\\x0C': return '\\\\f'\n case '\\x0D': return '\\\\r'\n case '\\x1B': return '\\\\e'\n case '\"': return '\\\\\"'\n case '\\\\': return '\\\\\\\\'\n case '\\x85': return '\\\\N'\n case '\\xA0': return '\\\\_'\n case '\\u2028': return '\\\\L'\n case '\\u2029': return '\\\\P'\n }\n\n const code = character.charCodeAt(0)\n const hex = code.toString(16).toUpperCase()\n\n if (code <= 0xFF) return `\\\\x${'0'.repeat(2 - hex.length)}${hex}`\n\n return `\\\\u${'0'.repeat(4 - hex.length)}${hex}`\n}\n\nfunction escapeString (string: string): string {\n return string.replace(CHARACTERS_TO_ESCAPE, escapeCharacter)\n}\n\nexport {\n detectAllowedStyles,\n renderScalar,\n type ScalarLayout,\n type ScalarStyleRule\n}\n","// AST → text. Walks the node `kind`; the scalar machinery (style selection,\n// quoting, folding) is driven by node text, not by sniffing a JS value.\n\nimport { YAMLException } from '../common/exception.ts'\nimport { tagNameShort } from '../common/tagname.ts'\nimport { COLLECTION_STYLE, SCALAR_STYLE } from '../parser/events.ts'\nimport { type Schema } from '../schema.ts'\nimport {\n type Node,\n type Document,\n type ScalarNode,\n type SequenceNode,\n type MappingNode\n} from './nodes.ts'\nimport {\n detectAllowedStyles,\n renderScalar,\n type ScalarLayout,\n type ScalarStyleRule\n} from './scalar_styler.ts'\nimport { DEFAULT_SCALAR_STYLE_RULES } from './styler_defaults.ts'\n\nconst CHAR_LINE_FEED = 0x0A /* LF */\n\n/** @category AST */\ninterface PresenterOptions {\n /** Schema used when selecting a safe scalar style. */\n schema: Schema\n\n /**\n * Indentation width in spaces.\n *\n * @defaultValue `2`\n */\n indent?: number\n\n /**\n * Does not add an indentation level to array elements when enabled.\n *\n * @defaultValue `false`\n */\n seqNoIndent?: boolean\n\n /**\n * Allows a nested collection to start on the same line after `-`.\n *\n * @defaultValue `true`\n */\n seqInlineFirst?: boolean\n\n /**\n * Preferred line width for folding. Unbreakable and more-indented lines may\n * exceed it. Set to `-1` for unlimited width.\n *\n * @defaultValue `80`\n */\n lineWidth?: number\n\n /**\n * Adds spaces inside flow collection brackets: `{a: 1}` becomes `{ a: 1 }`.\n *\n * @defaultValue `false`\n */\n flowBracketPadding?: boolean\n\n /**\n * Omits the space after commas in flow collections: `[1, 2]` becomes\n * `[1,2]`.\n *\n * @defaultValue `false`\n */\n flowSkipCommaSpace?: boolean\n\n /**\n * Omits the space after `:` in flow mappings: `{\"a\": 1}` becomes `{\"a\":1}`.\n *\n * This forces `quoteFlowKeys`; otherwise `a:1` would be parsed as a single\n * plain scalar instead of a mapping entry.\n *\n * @defaultValue `false`\n */\n flowSkipColonSpace?: boolean\n\n /**\n * Quotes flow mapping keys: `{a: 1}` becomes `{\"a\": 1}`.\n *\n * @defaultValue `false`\n */\n quoteFlowKeys?: boolean\n\n /**\n * Quoting style to use when a string needs quotes.\n *\n * @defaultValue `'single'`\n */\n quoteStyle?: 'single' | 'double'\n\n /**\n * Quotes all non-key strings using {@link quoteStyle}.\n *\n * @defaultValue `false`\n */\n forceQuotes?: boolean\n\n /**\n * Customizes how strings are rendered as plain, quoted, literal, or folded\n * scalars. Rules are applied in array order; providing this option replaces\n * the {@link DEFAULT_SCALAR_STYLE_RULES default rules}.\n *\n * @defaultValue `Object.values(DEFAULT_SCALAR_STYLE_RULES)`\n */\n scalarStyleRules?: readonly ScalarStyleRule[]\n\n /**\n * Prints an explicit tag before an anchor: `&ref_0 !!set` becomes\n * `!!set &ref_0`.\n *\n * @defaultValue `false`\n */\n tagBeforeAnchor?: boolean\n}\n\nconst DEFAULT_PRESENTER_OPTIONS: Required> = {\n indent: 2,\n seqNoIndent: false,\n seqInlineFirst: true,\n lineWidth: 80,\n flowBracketPadding: false,\n flowSkipCommaSpace: false,\n flowSkipColonSpace: false,\n quoteFlowKeys: false,\n quoteStyle: 'single',\n forceQuotes: false,\n scalarStyleRules: Object.keys(DEFAULT_SCALAR_STYLE_RULES)\n .map(name => Reflect.get(DEFAULT_SCALAR_STYLE_RULES, name)),\n tagBeforeAnchor: false\n}\n\ninterface PresenterState extends Required {\n defaultScalarTagName: string\n openEnded: boolean\n}\n\nfunction nodeTagShort (node: ScalarNode | SequenceNode | MappingNode) {\n return node.tagged ? node.tag : tagNameShort(node.tag)\n}\n\nfunction createPresenterState (options: PresenterOptions): PresenterState {\n const opts = {\n ...DEFAULT_PRESENTER_OPTIONS,\n ...options\n }\n\n if (opts.flowSkipColonSpace) {\n opts.quoteFlowKeys = true\n }\n\n return {\n ...opts,\n defaultScalarTagName: opts.schema.defaultScalarTag.tagName,\n openEnded: false\n }\n}\n\nfunction generateNextLine (state: PresenterState, level: number) {\n return `\\n${' '.repeat(state.indent * level)}`\n}\n\nfunction scalarLayout (state: PresenterState, node: ScalarNode, parent: Readonly | null, level: number,\n isKey: boolean, flowOnly: boolean): ScalarLayout {\n const shiftOfParent = level === 0 ? -1 : state.indent * (level - 1)\n const shiftOfContent = state.indent * Math.max(1, level)\n\n return {\n node,\n parent,\n level,\n isKey,\n flowOnly,\n shiftOfParent,\n shiftOfContent,\n shiftOfFirstLine: level === 0 ? 0 : state.indent * level,\n presenterOptions: state,\n allowedStylesMask: 0,\n style: node.style\n }\n}\n\nfunction writeFlowSequence (state: PresenterState, level: number, node: SequenceNode) {\n let result = ''\n\n for (let index = 0, length = node.items.length; index < length; index += 1) {\n const item = writeNode(state, level, node.items[index], node, {}).text\n if (index > 0) result += `,${!state.flowSkipCommaSpace ? ' ' : ''}`\n result += item\n }\n\n const pad = state.flowBracketPadding && node.items.length > 0 ? ' ' : ''\n return `[${pad}${result}${pad}]`\n}\n\nfunction writeBlockSequence (state: PresenterState, level: number, node: SequenceNode, compact: boolean) {\n let result = ''\n\n for (let index = 0, length = node.items.length; index < length; index += 1) {\n const item = writeNode(state, level + 1, node.items[index], node,\n { block: true, compact: state.seqInlineFirst, isblockseq: true }).text\n\n if (!compact || result !== '') {\n result += generateNextLine(state, level)\n }\n\n // No trailing space when the value renders empty (e.g. null → '').\n if (item === '' || CHAR_LINE_FEED === item.charCodeAt(0)) {\n result += '-'\n } else {\n result += '- '\n }\n\n result += item\n }\n\n return result\n}\n\nfunction writeFlowMapping (state: PresenterState, level: number, node: MappingNode) {\n let result = ''\n\n for (const { key, value } of node.items) {\n let pairBuffer = ''\n if (result !== '') pairBuffer += `,${!state.flowSkipCommaSpace ? ' ' : ''}`\n\n const keyRender = writeNode(state, level, key, node, { iskey: true })\n const keyText = keyRender.text\n\n const valueText = writeNode(state, level, value, node, {}).text\n // No separating space when the value renders empty (e.g. null → '').\n const sep = state.flowSkipColonSpace || valueText === '' ? '' : ' '\n\n // An alias or a property-only scalar must be separated from `:` because the\n // colon can otherwise be consumed as part of the alias/anchor/tag name.\n const keyIsBareProps = key.kind === 'scalar' && keyRender.noBody &&\n (key.tagged || key.anchor !== undefined)\n const keyColonSep = key.kind === 'alias' || keyIsBareProps ? ' ' : ''\n\n pairBuffer += `${keyText}${keyColonSep}:${sep}${valueText}`\n\n result += pairBuffer\n }\n\n const pad = state.flowBracketPadding && result !== '' ? ' ' : ''\n return `{${pad}${result}${pad}}`\n}\n\nfunction writeBlockMapping (state: PresenterState, level: number, node: MappingNode, compact: boolean) {\n let result = ''\n\n for (let index = 0, length = node.items.length; index < length; index += 1) {\n let pairBuffer = ''\n\n if (!compact || result !== '') {\n pairBuffer += generateNextLine(state, level)\n }\n\n const { key, value } = node.items[index]\n\n // A block key — a block collection (mapping/sequence) or a block scalar\n // (literal/folded) — can't sit on a `key:` line, so it's written with block\n // context and the pair takes the explicit `? key / : value` form. A simple\n // scalar key stays inline (flow-vs-block is invisible there).\n const keyIsBlock =\n ((key.kind === 'mapping' || key.kind === 'sequence') &&\n key.style === COLLECTION_STYLE.BLOCK && key.items.length !== 0) ||\n (key.kind === 'scalar' &&\n (key.style === SCALAR_STYLE.LITERAL_BLOCK || key.style === SCALAR_STYLE.FOLDED_BLOCK))\n\n // The `?`/`:` indicators shift content right like a `-`, so a block key or\n // value that stays on the indicator line keeps its indentation under\n // seqNoIndent (`isblockseq`). One that drops to its own line (tag/anchor)\n // collapses to the parent indent, so leave the flag off there.\n const keyRender = keyIsBlock\n ? writeNode(state, level + 1, key, node,\n { block: true, compact: true, isblockseq: !cannotBeCompact(state, key, level + 1) })\n : writeNode(state, level + 1, key, node, { block: true, compact: true, iskey: true })\n const keyText = keyRender.text\n\n // Block key, over-long key, or multiline scalar key forces explicit form.\n // Multiline isn't a spec requirement — just matches pyyaml's simple-key rule.\n const keyHasLineBreak = key.kind === 'scalar' && key.value.indexOf('\\n') !== -1\n\n // YAML limits an implicit key to 1024 Unicode code points. `length` counts\n // UTF-16 code units, never fewer than code points, so it is a cheap safe\n // precheck. The `u` regexp then counts each [\\s\\S] match as one code point.\n const keyIsTooLong = keyText.length > 1024 && /^[\\s\\S]{1025}/u.test(keyText)\n const explicitPair = keyIsBlock || keyHasLineBreak || keyIsTooLong\n\n if (explicitPair) {\n if (keyText && CHAR_LINE_FEED === keyText.charCodeAt(0)) {\n pairBuffer += '?'\n } else {\n pairBuffer += '? '\n }\n }\n\n pairBuffer += keyText\n\n if (explicitPair) {\n pairBuffer += generateNextLine(state, level)\n }\n\n const valueText = writeNode(state, level + 1, value, node,\n { block: true, compact: explicitPair, isblockseq: explicitPair && !cannotBeCompact(state, value, level + 1) }).text\n\n // Keep a space before the colon when the key text ends in a leading\n // property rather than scalar content, so the colon can't be read as part\n // of it. Two cases: an inline alias key (`*b : v`), and an empty scalar key\n // whose whole text is its anchor/tag (`&a :`, `!!str :`) — without the\n // space `&a:` reparses as an anchored value, dropping the null key.\n const keyIsBareProps = key.kind === 'scalar' && keyRender.noBody &&\n (key.tagged || key.anchor !== undefined)\n const keyColonSep = !explicitPair && (key.kind === 'alias' || keyIsBareProps) ? ' ' : ''\n\n // No trailing space when the value renders empty (e.g. null → '').\n if (valueText === '' || CHAR_LINE_FEED === valueText.charCodeAt(0)) {\n pairBuffer += `${keyColonSep}:`\n } else {\n pairBuffer += `${keyColonSep}: `\n }\n\n pairBuffer += valueText\n\n result += pairBuffer\n }\n\n return result\n}\n\n// Where a node sits relative to its parent — drives layout/style decisions.\n// All flags default to false (the flow-context, non-key, non-compact case).\ninterface NodeContext {\n block?: boolean // block context (vs flow); propagates downward\n compact?: boolean // may start on the current line (no leading newline)\n iskey?: boolean // node is a mapping key\n isblockseq?: boolean // content follows an indicator (`-`, or `?`/`:` in an\n // explicit pair) that already shifted it right; keeps\n // its indentation under seqNoIndent\n}\n\ninterface NodeRender {\n text: string\n noBody: boolean\n}\n\n// A node can't sit compact on its parent's indicator (`-`/`?`/`:`) line when it\n// carries leading props (tag/anchor) that would collide with the indicator, or\n// when the indent step is too narrow for the 2-char indicator. Such a node drops\n// to its own line; a block collection that does so also collapses its seqNoIndent\n// indentation back to the parent.\nfunction cannotBeCompact (state: PresenterState, node: Node, level: number) {\n if (node.kind === 'alias') return true\n return node.tagged || node.anchor !== undefined || (state.indent < 2 && level > 0)\n}\n\nfunction writeNode (state: PresenterState, level: number, node: Node,\n parent: Readonly | null, ctx: NodeContext): NodeRender {\n if (node.kind === 'alias') {\n state.openEnded = false\n return { text: `*${node.anchor}`, noBody: false }\n }\n\n const { block = false, iskey = false, isblockseq = false } = ctx\n let compact = ctx.compact ?? false\n\n const hasAnchor = node.anchor !== undefined\n\n if (cannotBeCompact(state, node, level)) {\n compact = false\n }\n\n let body: string\n let shouldPrintTag = node.tagged\n const useBlockCollection = block &&\n (node.kind === 'mapping' || node.kind === 'sequence') &&\n node.style === COLLECTION_STYLE.BLOCK && node.items.length !== 0\n\n if (node.kind === 'mapping') {\n if (useBlockCollection) {\n body = writeBlockMapping(state, level, node, compact)\n } else {\n body = writeFlowMapping(state, level, node)\n }\n } else if (node.kind === 'sequence') {\n if (useBlockCollection) {\n if (state.seqNoIndent && !isblockseq && level > 0) {\n body = writeBlockSequence(state, level - 1, node, compact)\n } else {\n body = writeBlockSequence(state, level, node, compact)\n }\n } else {\n body = writeFlowSequence(state, level, node)\n }\n } else {\n const layout = scalarLayout(state, node, parent, level, iskey, !block)\n\n detectAllowedStyles(layout)\n for (const rule of state.scalarStyleRules) rule(layout)\n\n body = renderScalar(layout)\n state.openEnded =\n (layout.style === SCALAR_STYLE.LITERAL_BLOCK || layout.style === SCALAR_STYLE.FOLDED_BLOCK) &&\n (node.value === '\\n' || node.value.endsWith('\\n\\n'))\n\n // A flow sequence entry cannot be completely empty. Print the semantic tag\n // as the node property that explicitly indicates the entry's existence.\n shouldPrintTag = node.tagged ||\n (body === '' && layout.flowOnly && parent?.kind === 'sequence' && !hasAnchor) ||\n (layout.style !== SCALAR_STYLE.PLAIN && node.tag !== state.defaultScalarTagName)\n }\n\n // A flow collection ends with its closing indicator, not with its last child.\n if ((node.kind === 'mapping' || node.kind === 'sequence') && !useBlockCollection) {\n state.openEnded = false\n }\n\n // An indicator plus its mandatory separator occupies 2 columns. For wider\n // indentation, pad a compact block collection so its first item starts at\n // the same column as the following items.\n if (useBlockCollection && compact && level > 0 && state.indent > 2) {\n body = `${' '.repeat(state.indent - 2)}${body}`\n }\n\n const noBody = body === ''\n let text = body\n\n if (shouldPrintTag || hasAnchor) {\n const props: string[] = []\n const tag = shouldPrintTag ? nodeTagShort(node) : null\n const anchor = hasAnchor ? `&${node.anchor}` : null\n\n if (state.tagBeforeAnchor) {\n if (tag !== null) props.push(tag)\n if (anchor !== null) props.push(anchor)\n } else {\n if (anchor !== null) props.push(anchor)\n if (tag !== null) props.push(tag)\n }\n\n // No separator when the body is empty (e.g. `&anchor` on a null node) or\n // already starts on its own line.\n const sep = body === '' || body.charCodeAt(0) === CHAR_LINE_FEED ? '' : ' '\n text = `${props.join(' ')}${sep}${body}`\n }\n\n return { text, noBody }\n}\n\n// A bare (untagged, unanchored) non-empty block collection: writeNode renders it\n// in compact form with its first item on the opening line. That works mid-stream,\n// but right after a `---` the first item must drop to the next line. A tag/anchor\n// already forces the body onto its own line, so those stay on the `---` line.\nfunction rootStartsOwnLine (node: Node) {\n return (node.kind === 'sequence' || node.kind === 'mapping') &&\n node.style === COLLECTION_STYLE.BLOCK &&\n node.items.length !== 0 &&\n !node.tagged &&\n node.anchor === undefined\n}\n\nfunction writeDocumentDirectives (doc: Document) {\n let result = ''\n\n for (const directive of doc.directives) {\n if (directive.kind === 'yaml') {\n result += `%YAML ${directive.version}\\n`\n continue\n }\n\n const { handle, prefix } = directive\n result += `%TAG ${handle} ${prefix}\\n`\n }\n\n return result\n}\n\n/**\n * Build YAML from AST.\n *\n * @category AST\n */\nfunction present (documents: Document[], options: PresenterOptions): string {\n const state = createPresenterState(options)\n let result = ''\n let previousEnded = false\n\n for (let index = 0; index < documents.length; index += 1) {\n const doc = documents[index]\n state.openEnded = false\n const directives = writeDocumentDirectives(doc)\n const hasDirectives = directives !== ''\n const marker = doc.explicitStart || hasDirectives || (index > 0 && !previousEnded)\n\n result += directives\n\n if (doc.contents === null) {\n if (marker) result += '---\\n'\n } else if (marker) {\n const body = writeNode(state, 0, doc.contents, null, { block: true, compact: true }).text\n // Content shares the `---` line, except: an empty render (no separator at\n // all), a bare block collection (wraps to the next line), or directives\n // forcing `---` onto its own line.\n const sep = body === '' ? '' : (hasDirectives || rootStartsOwnLine(doc.contents) ? '\\n' : ' ')\n result += `---${sep}${body}\\n`\n } else {\n result += writeNode(state, 0, doc.contents, null, { block: true, compact: true }).text + '\\n'\n }\n\n previousEnded = doc.explicitEnd || state.openEnded\n if (previousEnded) {\n result += '...\\n'\n }\n }\n\n return result\n}\n\nexport {\n DEFAULT_PRESENTER_OPTIONS,\n present,\n type PresenterOptions\n}\n","import { DUMP_SCHEMA, type Schema } from './schema.ts'\nimport { COLLECTION_STYLE } from './parser/events.ts'\nimport { jsToAst } from './ast/from_js.ts'\nimport { visit, VISIT_SKIP } from './ast/visit.ts'\nimport { type Document } from './ast/nodes.ts'\nimport {\n DEFAULT_PRESENTER_OPTIONS,\n present,\n type PresenterOptions\n} from './ast/presenter.ts'\nimport { pick } from './common/object.ts'\n\n/** @category Main */\ninterface DumpOptions extends Omit {\n /**\n * Schema to use.\n *\n * @defaultValue {@link DUMP_SCHEMA}\n */\n schema?: Schema\n\n /**\n * Skips invalid types instead of throwing. Invalid mapping pairs and sequence\n * items are skipped; `undefined` sequence items are serialized as `null`.\n *\n * @defaultValue `false`\n */\n skipInvalid?: boolean\n\n /**\n * Inlines duplicate objects instead of converting them into references.\n *\n * @defaultValue `false`\n */\n noRefs?: boolean\n\n /**\n * Nesting level at which collections switch from block to flow style. Set to\n * `-1` to never switch automatically.\n *\n * @defaultValue `-1`\n */\n flowLevel?: number\n\n /**\n * Sorts mapping keys when `true`. A function can be provided to define the\n * sort order.\n *\n * @defaultValue `false`\n * @deprecated Use {@link transform} to reorder mapping items.\n */\n sortKeys?: boolean | ((a: any, b: any) => number)\n\n /**\n * Mutates the generated AST before it is rendered.\n *\n * @example Sort mapping keys:\n *\n * ```typescript\n * import { dump, visit } from 'js-yaml'\n *\n * dump(value, {\n * transform: documents => visit(documents, node => {\n * if (node.kind === 'mapping') node.items.sort((a, b) => {\n * const x = a.key.kind === 'scalar' ? a.key.value : ''\n * const y = b.key.kind === 'scalar' ? b.key.value : ''\n * return x.localeCompare(y)\n * })\n * })\n * })\n * ```\n */\n transform?: (documents: Document[]) => void\n}\n\nconst DEFAULT_DUMP_OPTIONS: Required = {\n ...DEFAULT_PRESENTER_OPTIONS,\n schema: DUMP_SCHEMA,\n skipInvalid: false,\n noRefs: false,\n flowLevel: -1,\n sortKeys: false,\n transform: () => {}\n}\n\nfunction defaultCompareFn (a: any, b: any) {\n const x = String(a)\n const y = String(b)\n\n if (x < y) return -1\n if (x > y) return 1\n return 0\n}\n\n/**\n * Serializes JS object as a YAML document. By default it can dump every\n * supported YAML type, so it throws an exception if you try to dump regexps or\n * functions. However, you can disable exceptions by setting the\n * {@link DumpOptions.skipInvalid} option to `true`.\n *\n * @category Main\n */\nfunction dump (input: any, options: DumpOptions = {}) {\n const opts = { ...DEFAULT_DUMP_OPTIONS, ...options }\n\n const documents = jsToAst(input, opts.schema, {\n noRefs: opts.noRefs,\n skipInvalid: opts.skipInvalid\n })\n\n // flowLevel: every node at this depth switches to flow; the presenter forces\n // everything below into flow too, so the walk stops there.\n if (opts.flowLevel >= 0) {\n visit(documents, (node, ctx) => {\n if (ctx.depth < opts.flowLevel) return\n if (node.kind === 'sequence' || node.kind === 'mapping') {\n node.style = COLLECTION_STYLE.FLOW\n }\n return VISIT_SKIP\n })\n }\n\n if (opts.sortKeys) {\n const compareFn = opts.sortKeys === true ? defaultCompareFn : opts.sortKeys\n\n visit(documents, node => {\n if (node.kind !== 'mapping') return\n\n node.items.sort((a, b) => compareFn(\n a.key.kind === 'scalar' ? a.key.value : '',\n b.key.kind === 'scalar' ? b.key.value : ''\n ))\n })\n }\n\n opts.transform(documents)\n\n const PRESENTER_OPT_KEYS = Object.keys(DEFAULT_PRESENTER_OPTIONS) as\n (keyof typeof DEFAULT_PRESENTER_OPTIONS)[]\n\n return present(documents, { ...pick(opts, PRESENTER_OPT_KEYS), schema: opts.schema })\n}\n\nexport {\n dump,\n\n type DumpOptions\n}\n","// Parser events → AST. The second entry into the AST world (the first being\n// `jsToAst`): instead of building JS values like the constructor, it mirrors the\n// same document/sequence/mapping frame walk and emits `Node`s that keep the\n// original styles, tags and anchors, so parsed YAML can be re-dumped faithfully.\n\nimport {\n EVENT_ID,\n SCALAR_STYLE,\n type CollectionStyle,\n type Event,\n type MappingEvent,\n type ScalarEvent,\n type SequenceEvent\n} from '../parser/events.ts'\nimport { getScalarValue } from '../parser/parser_scalar.ts'\nimport { type Schema } from '../schema.ts'\nimport {\n type Node,\n type Document,\n type ScalarNode,\n type SequenceNode,\n type MappingNode,\n type AliasNode\n} from './nodes.ts'\n\nconst NO_RANGE = -1\n\ninterface DocumentFrame {\n kind: 'document'\n doc: Document\n}\n\ninterface SequenceFrame {\n kind: 'sequence'\n node: SequenceNode\n}\n\ninterface MappingFrame {\n kind: 'mapping'\n node: MappingNode\n key: Node | null\n}\n\ntype Frame = DocumentFrame | SequenceFrame | MappingFrame\n\n/** @category AST */\ninterface FromEventsOptions {\n /** Source text referenced by offsets in `events`. */\n source: string\n\n /** Schema used to resolve implicit scalar tags. */\n schema: Schema\n}\n\ninterface FromEventsState {\n source: string\n schema: Schema\n eventIndex: number\n position: number\n frames: Frame[]\n documents: Document[]\n}\n\nfunction eventPosition (event: Event) {\n if ('tagStart' in event && event.tagStart !== NO_RANGE) return event.tagStart\n if ('anchorStart' in event && event.anchorStart !== NO_RANGE) return event.anchorStart\n if ('valueStart' in event && event.valueStart !== NO_RANGE) return event.valueStart\n if ('start' in event) return event.start\n return 0\n}\n\nfunction rawTag (state: FromEventsState, event: ScalarEvent | SequenceEvent | MappingEvent) {\n return event.tagStart === NO_RANGE\n ? ''\n : state.source.slice(event.tagStart, event.tagEnd)\n}\n\nfunction anchorName (state: FromEventsState, event: ScalarEvent | SequenceEvent | MappingEvent) {\n return event.anchorStart === NO_RANGE\n ? undefined\n : state.source.slice(event.anchorStart, event.anchorEnd)\n}\n\nfunction buildScalar (state: FromEventsState, event: ScalarEvent): ScalarNode {\n const value = getScalarValue(state.source, event)\n const raw = rawTag(state, event)\n\n let tag: string\n let tagged = false\n if (raw !== '') {\n tagged = true\n tag = raw\n } else if (event.style === SCALAR_STYLE.PLAIN) {\n tag = state.schema.resolveImplicitScalarTag(value).tag.tagName\n } else {\n tag = state.schema.defaultScalarTag.tagName\n }\n\n return { kind: 'scalar', tag, tagged, style: event.style, anchor: anchorName(state, event), value }\n}\n\nfunction buildCollection (\n state: FromEventsState,\n event: SequenceEvent | MappingEvent,\n defaultTagName: string\n): { tag: string, tagged: boolean, style: CollectionStyle, anchor?: string } {\n const raw = rawTag(state, event)\n\n let tag: string\n let tagged = false\n if (raw === '') {\n tag = defaultTagName\n } else {\n tag = raw\n tagged = true\n }\n\n return { tag, tagged, style: event.style, anchor: anchorName(state, event) }\n}\n\nfunction addNode (state: FromEventsState, node: Node) {\n const frame = state.frames[state.frames.length - 1]\n\n if (frame.kind === 'document') {\n frame.doc.contents = node\n } else if (frame.kind === 'sequence') {\n frame.node.items.push(node)\n } else if (frame.key) {\n frame.node.items.push({ key: frame.key, value: node })\n frame.key = null\n } else {\n frame.key = node\n }\n}\n\n/**\n * Builds an AST from parser events\n *\n * @category AST\n */\nfunction eventsToAst (events: Event[], options: FromEventsOptions): Document[] {\n const state: FromEventsState = {\n source: options.source,\n schema: options.schema,\n eventIndex: 0,\n position: 0,\n frames: [],\n documents: []\n }\n\n while (state.eventIndex < events.length) {\n const event = events[state.eventIndex++]\n state.position = eventPosition(event)\n\n switch (event.type) {\n case EVENT_ID.DOCUMENT: {\n const doc: Document = {\n contents: null,\n explicitStart: event.explicitStart,\n explicitEnd: event.explicitEnd,\n directives: event.directives\n }\n state.frames.push({ kind: 'document', doc })\n break\n }\n\n case EVENT_ID.SCALAR:\n addNode(state, buildScalar(state, event))\n break\n\n case EVENT_ID.SEQUENCE: {\n const { tag, tagged, style, anchor } = buildCollection(state, event, 'tag:yaml.org,2002:seq')\n const node: SequenceNode = { kind: 'sequence', tag, tagged, style, anchor, items: [] }\n state.frames.push({ kind: 'sequence', node })\n break\n }\n\n case EVENT_ID.MAPPING: {\n const { tag, tagged, style, anchor } = buildCollection(state, event, 'tag:yaml.org,2002:map')\n const node: MappingNode = { kind: 'mapping', tag, tagged, style, anchor, items: [] }\n state.frames.push({ kind: 'mapping', node, key: null })\n break\n }\n\n case EVENT_ID.ALIAS: {\n const name = state.source.slice(event.anchorStart, event.anchorEnd)\n const node: AliasNode = { kind: 'alias', anchor: name }\n addNode(state, node)\n break\n }\n\n case EVENT_ID.POP: {\n const frame = state.frames.pop()!\n if (frame.kind === 'mapping' && frame.key) {\n throw new Error('incomplete mapping pair in event stream')\n }\n if (frame.kind === 'document') {\n state.documents.push(frame.doc)\n } else {\n addNode(state, frame.node)\n }\n break\n }\n }\n }\n\n return state.documents\n}\n\nexport {\n eventsToAst,\n type FromEventsOptions\n}\n","export {\n Schema,\n FAILSAFE_SCHEMA,\n JSON_SCHEMA,\n CORE_SCHEMA,\n YAML11_SCHEMA,\n DUMP_SCHEMA\n} from './schema.ts'\n\nexport {\n NOT_RESOLVED,\n defineScalarTag,\n defineSequenceTag,\n defineMappingTag,\n type ScalarTagDefinition,\n type SequenceTagDefinition,\n type MappingTagDefinition,\n type TagDefinition,\n type ScalarTagOptions,\n type SequenceTagOptions,\n type MappingTagOptions\n} from './tag.ts'\n\nexport { strTag } from './tag/scalar/str.ts'\nexport { nullCoreTag } from './tag/scalar/null_core.ts'\nexport { nullJsonTag } from './tag/scalar/null_json.ts'\nexport { nullYaml11Tag } from './tag/scalar/null_yaml11.ts'\nexport { boolCoreTag } from './tag/scalar/bool_core.ts'\nexport { boolJsonTag } from './tag/scalar/bool_json.ts'\nexport { boolYaml11Tag } from './tag/scalar/bool_yaml11.ts'\nexport { intCoreTag } from './tag/scalar/int_core.ts'\nexport { intJsonTag } from './tag/scalar/int_json.ts'\nexport { intYaml11Tag } from './tag/scalar/int_yaml11.ts'\nexport { floatCoreTag } from './tag/scalar/float_core.ts'\nexport { floatJsonTag } from './tag/scalar/float_json.ts'\nexport { floatYaml11Tag } from './tag/scalar/float_yaml11.ts'\nexport { mergeTag } from './tag/scalar/merge.ts'\nexport { binaryTag } from './tag/scalar/binary.ts'\nexport { timestampTag } from './tag/scalar/timestamp.ts'\n\nexport { seqTag } from './tag/sequence/seq.ts'\nexport { omapTag } from './tag/sequence/omap.ts'\nexport { pairsTag } from './tag/sequence/pairs.ts'\n\nexport { mapTag } from './tag/mapping/map.ts'\nexport { realMapTag } from './tag/mapping/real_map.ts'\nexport { legacyMapTag } from './tag/mapping/legacy_map.ts'\nexport { setTag } from './tag/mapping/set.ts'\n\nexport { load, loadAll, type LoadOptions } from './load.ts'\nexport { dump, type DumpOptions } from './dump.ts'\nexport { YAMLException } from './common/exception.ts'\n\nexport {\n EVENT_ID,\n SCALAR_STYLE,\n COLLECTION_STYLE,\n CHOMPING_MODE,\n type EventId,\n type ScalarStyle,\n type CollectionStyle,\n type ChompingMode,\n\n type DocumentDirective,\n type DocumentEvent,\n type SequenceEvent,\n type MappingEvent,\n type ScalarEvent,\n type AliasEvent,\n type PopEvent,\n type Event\n} from './parser/events.ts'\n\nexport {\n parseEvents,\n type ParserOptions\n} from './parser/parser.ts'\n\nexport { getScalarValue } from './parser/parser_scalar.ts'\n\nexport {\n constructFromEvents,\n type ConstructorOptions\n} from './parser/constructor.ts'\n\nexport { eventsToAst, type FromEventsOptions } from './ast/from_events.ts'\nexport { jsToAst, type FromJsOptions } from './ast/from_js.ts'\nexport { present, type PresenterOptions } from './ast/presenter.ts'\nexport { type ScalarLayout, type ScalarStyleRule } from './ast/scalar_styler.ts'\nexport { DEFAULT_SCALAR_STYLE_RULES } from './ast/styler_defaults.ts'\n\nexport {\n visit,\n VISIT_BREAK,\n VISIT_SKIP,\n type Visitor,\n type VisitContext\n} from './ast/visit.ts'\n\nexport {\n type Node,\n type Document,\n type NodeBase,\n type ScalarNode,\n type SequenceNode,\n type MappingNode,\n type AliasNode\n} from './ast/nodes.ts'\n\n// Deprecated compatibility exports\n\nimport { EVENT_ID, SCALAR_STYLE, COLLECTION_STYLE, CHOMPING_MODE } from './parser/events.ts'\n\n/** @deprecated Use `EVENT_ID.DOCUMENT` instead. @internal */\nexport const EVENT_DOCUMENT = EVENT_ID.DOCUMENT\n/** @deprecated Use `EVENT_ID.SEQUENCE` instead. @internal */\nexport const EVENT_SEQUENCE = EVENT_ID.SEQUENCE\n/** @deprecated Use `EVENT_ID.MAPPING` instead. @internal */\nexport const EVENT_MAPPING = EVENT_ID.MAPPING\n/** @deprecated Use `EVENT_ID.SCALAR` instead. @internal */\nexport const EVENT_SCALAR = EVENT_ID.SCALAR\n/** @deprecated Use `EVENT_ID.ALIAS` instead. @internal */\nexport const EVENT_ALIAS = EVENT_ID.ALIAS\n/** @deprecated Use `EVENT_ID.POP` instead. @internal */\nexport const EVENT_POP = EVENT_ID.POP\n/** @deprecated Use `SCALAR_STYLE.PLAIN` instead. @internal */\nexport const SCALAR_STYLE_PLAIN = SCALAR_STYLE.PLAIN\n/** @deprecated Use `SCALAR_STYLE.SINGLE_QUOTED` instead. @internal */\nexport const SCALAR_STYLE_SINGLE_QUOTED = SCALAR_STYLE.SINGLE_QUOTED\n/** @deprecated Use `SCALAR_STYLE.DOUBLE_QUOTED` instead. @internal */\nexport const SCALAR_STYLE_DOUBLE_QUOTED = SCALAR_STYLE.DOUBLE_QUOTED\n/** @deprecated Use `SCALAR_STYLE.LITERAL_BLOCK` instead. @internal */\nexport const SCALAR_STYLE_LITERAL_BLOCK = SCALAR_STYLE.LITERAL_BLOCK\n/** @deprecated Use `SCALAR_STYLE.FOLDED_BLOCK` instead. @internal */\nexport const SCALAR_STYLE_FOLDED_BLOCK = SCALAR_STYLE.FOLDED_BLOCK\n/** @deprecated Use `COLLECTION_STYLE.BLOCK` instead. @internal */\nexport const COLLECTION_STYLE_BLOCK = COLLECTION_STYLE.BLOCK\n/** @deprecated Use `COLLECTION_STYLE.FLOW` instead. @internal */\nexport const COLLECTION_STYLE_FLOW = COLLECTION_STYLE.FLOW\n/** @deprecated Use `CHOMPING_MODE.CLIP` instead. @internal */\nexport const CHOMPING_CLIP = CHOMPING_MODE.CLIP\n/** @deprecated Use `CHOMPING_MODE.STRIP` instead. @internal */\nexport const CHOMPING_STRIP = CHOMPING_MODE.STRIP\n/** @deprecated Use `CHOMPING_MODE.KEEP` instead. @internal */\nexport const CHOMPING_KEEP = CHOMPING_MODE.KEEP\n"],"mappings":";;AAKA,IAAM,IAA8B,OAAO,cAAc;AAsMzD,SAAS,EAAyB,GAAiB,GAAgE;;CACjH,OAAO;EACL;EACA,UAAU;EACV,WAAA,IAAU,EAAQ,aAAA,OAAY,KAAZ;EAClB,mBAAA,IAAkB,EAAQ,qBAAA,OAAoB,KAApB;EAC1B,qBAAA,IAAoB,EAAQ,uBAAA,OAAsB,OAAtB;EAC5B,SAAS,EAAQ;EACjB,UAAU,EAAQ;EAClB,YAAA,IAAW,EAAQ,cAAA,SAAc,MAAQ,OAAO,CAAI,KAAjC;EACnB,mBAAA,IAAkB,EAAQ,qBAAA,cAA2B,KAA3B;CAC5B;AACF;AAOA,SAAS,EAA8C,GAAiB,GAAsF;;CAC5J,IAAM,IAAkB,EAAQ,aAAa,KAAA;CAE7C,OAAO;EACL;EACA,UAAU;EACV,UAAU;EACV,mBAAA,IAAkB,EAAQ,qBAAA,OAAoB,KA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GACtF,IAAqB;KAAE,MAAM;KAAY;KAAK;KAAQ;KAAO;KAAQ,OAAO,CAAC;IAAE;IACrF,EAAM,OAAO,KAAK;KAAE,MAAM;KAAY;IAAK,CAAC;IAC5C;GACF;GAEA,KAAK,EAAS,SAAS;IACrB,IAAM,EAAE,QAAK,WAAQ,UAAO,cAAW,GAAgB,GAAO,GAAO,uBAAuB,GACtF,IAAoB;KAAE,MAAM;KAAW;KAAK;KAAQ;KAAO;KAAQ,OAAO,CAAC;IAAE;IACnF,EAAM,OAAO,KAAK;KAAE,MAAM;KAAW;KAAM,KAAK;IAAK,CAAC;IACtD;GACF;GAEA,KAAK,EAAS;IAGZ,GAAQ,GAAO;KADW,MAAM;KAAS,QAD5B,EAAM,OAAO,MAAM,EAAM,aAAa,EAAM,SACR;IAClC,CAAI;IACnB;GAGF,KAAK,EAAS,KAAK;IACjB,IAAM,IAAQ,EAAM,OAAO,IAAI;IAC/B,IAAI,EAAM,SAAS,aAAa,EAAM,KACpC,MAAU,MAAM,yCAAyC;IAE3D,AAAI,EAAM,SAAS,aACjB,EAAM,UAAU,KAAK,EAAM,GAAG,IAE9B,GAAQ,GAAO,EAAM,IAAI;IAE3B;GACF;EACF;CACF;CAEA,OAAO,EAAM;AACf;;;AC7FA,IAAa,KAAiB,EAAS,UAE1B,KAAiB,EAAS,UAE1B,KAAgB,EAAS,SAEzB,KAAe,EAAS,QAExB,KAAc,EAAS,OAEvB,KAAY,EAAS,KAErB,KAAqB,EAAa,OAElC,KAA6B,EAAa,eAE1C,KAA6B,EAAa,eAE1C,KAA6B,EAAa,eAE1C,KAA4B,EAAa,cAEzC,KAAyB,EAAiB,OAE1C,KAAwB,EAAiB,MAEzC,KAAgB,EAAc,MAE9B,KAAiB,EAAc,OAE/B,KAAgB,EAAc"} \ No newline at end of file diff --git a/node_modules/js-yaml/dist/browser/js-yaml.umd.min.js b/node_modules/js-yaml/dist/browser/js-yaml.umd.min.js new file mode 100644 index 00000000..26300eb2 --- /dev/null +++ b/node_modules/js-yaml/dist/browser/js-yaml.umd.min.js @@ -0,0 +1,39 @@ +(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports):typeof define==`function`&&define.amd?define([`exports`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.jsyaml={}))})(this,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=Symbol(`NOT_RESOLVED`);function n(e,t){var n,r,i,a,o;return{tagName:e,nodeKind:`scalar`,implicit:(n=t.implicit)==null?!1:n,matchByTagPrefix:(r=t.matchByTagPrefix)==null?!1:r,implicitFirstChars:(i=t.implicitFirstChars)==null?null:i,resolve:t.resolve,identify:t.identify,represent:(a=t.represent)==null?(e=>String(e)):a,representTagName:(o=t.representTagName)==null?(()=>e):o}}function r(e,t){var n,r,i,a;let o=t.finalize===void 0;return{tagName:e,nodeKind:`sequence`,implicit:!1,matchByTagPrefix:(n=t.matchByTagPrefix)==null?!1:n,create:t.create,addItem:t.addItem,finalize:(r=t.finalize)==null?(e=>e):r,carrierIsResult:o,identify:t.identify,represent:(i=t.represent)==null?(e=>e):i,representTagName:(a=t.representTagName)==null?(()=>e):a}}function i(e,t){var n,r,i,a;let o=t.finalize===void 0;return{tagName:e,nodeKind:`mapping`,implicit:!1,matchByTagPrefix:(n=t.matchByTagPrefix)==null?!1:n,create:t.create,addPair:t.addPair,has:t.has,keys:t.keys,get:t.get,finalize:(r=t.finalize)==null?(e=>e):r,carrierIsResult:o,identify:t.identify,represent:(i=t.represent)==null?(e=>e):i,representTagName:(a=t.representTagName)==null?(()=>e):a}}var a=n(`tag:yaml.org,2002:str`,{resolve:e=>e,identify:e=>typeof e==`string`}),o=[``,`~`,`null`,`Null`,`NULL`],s=n(`tag:yaml.org,2002:null`,{implicit:!0,implicitFirstChars:[``,`~`,`n`,`N`],resolve:e=>o.indexOf(e)===-1?t:null,identify:e=>e===null,represent:()=>`null`}),c=n(`tag:yaml.org,2002:null`,{implicit:!0,implicitFirstChars:[`n`],resolve:(e,n)=>e===`null`||n&&e===``?null:t,identify:e=>e===null,represent:()=>`null`}),l=[``,`~`,`null`,`Null`,`NULL`],u=n(`tag:yaml.org,2002:null`,{implicit:!0,implicitFirstChars:[``,`~`,`n`,`N`],resolve:e=>l.indexOf(e)===-1?t:null,identify:e=>e===null,represent:()=>`null`}),d=[`true`,`True`,`TRUE`],f=[`false`,`False`,`FALSE`],p=n(`tag:yaml.org,2002:bool`,{implicit:!0,implicitFirstChars:[`t`,`T`,`f`,`F`],resolve:e=>d.indexOf(e)===-1?f.indexOf(e)===-1?t:!1:!0,identify:e=>Object.prototype.toString.call(e)===`[object Boolean]`,represent:e=>e?`true`:`false`}),m=[`true`],h=[`false`],ee=n(`tag:yaml.org,2002:bool`,{implicit:!0,implicitFirstChars:[`t`,`f`],resolve:e=>m.indexOf(e)===-1?h.indexOf(e)===-1?t:!1:!0,identify:e=>Object.prototype.toString.call(e)===`[object Boolean]`,represent:e=>e?`true`:`false`}),te=[`true`,`True`,`TRUE`,`y`,`Y`,`yes`,`Yes`,`YES`,`on`,`On`,`ON`],ne=[`false`,`False`,`FALSE`,`n`,`N`,`no`,`No`,`NO`,`off`,`Off`,`OFF`],re=n(`tag:yaml.org,2002:bool`,{implicit:!0,implicitFirstChars:[`y`,`Y`,`n`,`N`,`t`,`T`,`f`,`F`,`o`,`O`],resolve:e=>te.indexOf(e)===-1?ne.indexOf(e)===-1?t:!1:!0,identify:e=>Object.prototype.toString.call(e)===`[object Boolean]`,represent:e=>e?`true`:`false`}),ie=RegExp(`^(?:0o[0-7]+|0x[0-9a-fA-F]+|[-+]?[0-9]+)$`),ae=RegExp(`^(?:[-+]?0b[0-1]+|[-+]?0o[0-7]+|[-+]?0x[0-9a-fA-F]+|[-+]?[0-9]+)$`);function oe(e){let t=e,n=1;return(t[0]===`-`||t[0]===`+`)&&(t[0]===`-`&&(n=-1),t=t.slice(1)),t.startsWith(`0b`)?n*parseInt(t.slice(2),2):t.startsWith(`0o`)?n*parseInt(t.slice(2),8):t.startsWith(`0x`)?n*parseInt(t.slice(2),16):n*parseInt(t,10)}function se(e,n){if(n){if(!ae.test(e))return t}else if(!ie.test(e))return t;let r=oe(e);return Number.isFinite(r)?r:t}var ce=n(`tag:yaml.org,2002:int`,{implicit:!0,implicitFirstChars:[`-`,`+`,...`0123456789`],resolve:se,identify:e=>Number.isInteger(e)&&!Object.is(e,-0)&&e.toString(10).indexOf(`e`)<0,represent:e=>e.toString(10)}),le=RegExp(`^-?(?:0|[1-9][0-9]*)$`),ue=RegExp(`^(?:[-+]?0b[0-1]+|[-+]?0o[0-7]+|[-+]?0x[0-9a-fA-F]+|[-+]?[0-9]+)$`);function de(e){let t=e,n=1;return(t[0]===`-`||t[0]===`+`)&&(t[0]===`-`&&(n=-1),t=t.slice(1)),t.startsWith(`0b`)?n*parseInt(t.slice(2),2):t.startsWith(`0o`)?n*parseInt(t.slice(2),8):t.startsWith(`0x`)?n*parseInt(t.slice(2),16):n*parseInt(t,10)}function fe(e,n){if(n){if(!ue.test(e))return t}else if(!le.test(e))return t;let r=de(e);return Number.isFinite(r)?r:t}var pe=n(`tag:yaml.org,2002:int`,{implicit:!0,implicitFirstChars:[`-`,...`0123456789`],resolve:fe,identify:e=>Number.isInteger(e)&&!Object.is(e,-0)&&e.toString(10).indexOf(`e`)<0,represent:e=>e.toString(10)}),me=RegExp(`^(?:[-+]?0b[0-1_]+|[-+]?0[0-7_]+|[-+]?0x[0-9a-fA-F_]+|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+|[-+]?(?:0|[1-9][0-9_]*))$`);function he(e){let t=e.replace(/_/g,``),n=1;if((t[0]===`-`||t[0]===`+`)&&(t[0]===`-`&&(n=-1),t=t.slice(1)),t.startsWith(`0b`))return n*parseInt(t.slice(2),2);if(t.startsWith(`0x`))return n*parseInt(t.slice(2),16);if(t.includes(`:`)){let e=0;for(let n of t.split(`:`))e=e*60+Number(n);return n*e}return t!==`0`&&t[0]===`0`?n*parseInt(t,8):n*parseInt(t,10)}function ge(e){if(!me.test(e))return t;let n=he(e);return Number.isFinite(n)?n:t}var g=n(`tag:yaml.org,2002:int`,{implicit:!0,implicitFirstChars:[`-`,`+`,...`0123456789`],resolve:ge,identify:e=>Number.isInteger(e)&&!Object.is(e,-0)&&e.toString(10).indexOf(`e`)<0,represent:e=>e.toString(10)}),_e=RegExp(`^(?:[-+]?[0-9]+(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|[-+]?\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$`),ve=RegExp(`^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$`);function ye(e){if(!_e.test(e))return t;let n=e.toLowerCase(),r=n[0]===`-`?-1:1;if(`+-`.includes(n[0])&&(n=n.slice(1)),n===`.inf`)return r===1?1/0:-1/0;if(n===`.nan`)return NaN;let i=r*parseFloat(n);return Number.isFinite(i)||ve.test(e)?i:t}function be(e){if(isNaN(e))return`.nan`;if(e===1/0)return`.inf`;if(e===-1/0)return`-.inf`;if(Object.is(e,-0))return`-0.0`;let t=e.toString(10);return/^[-+]?[0-9]+e/.test(t)?t.replace(`e`,`.e`):t}var xe=n(`tag:yaml.org,2002:float`,{implicit:!0,implicitFirstChars:[`-`,`+`,`.`,...`0123456789`],resolve:ye,identify:e=>typeof e==`number`&&(!Number.isInteger(e)||Object.is(e,-0)||e.toString(10).indexOf(`e`)>=0),represent:be}),Se=RegExp(`^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$`),Ce=RegExp(`^(?:[-+]?[0-9]+(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|[-+]?\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$`);function we(e,n){if(n){if(!Ce.test(e))return t;let n=e.toLowerCase(),r=n[0]===`-`?-1:1;if(`+-`.includes(n[0])&&(n=n.slice(1)),n===`.inf`)return r===1?1/0:-1/0;if(n===`.nan`)return NaN;let i=r*parseFloat(n);return Number.isFinite(i)?i:t}if(!Se.test(e))return t;let r=Number(e);return Number.isFinite(r)?r:t}function Te(e){if(isNaN(e))return`.nan`;if(e===1/0)return`.inf`;if(e===-1/0)return`-.inf`;if(Object.is(e,-0))return`-0.0`;let t=e.toString(10);return/^[-+]?[0-9]+e/.test(t)?t.replace(`e`,`.e`):t}var Ee=n(`tag:yaml.org,2002:float`,{implicit:!0,implicitFirstChars:[`-`,...`0123456789`],resolve:we,identify:e=>typeof e==`number`&&(!Number.isInteger(e)||Object.is(e,-0)||e.toString(10).indexOf(`e`)>=0),represent:Te}),De=RegExp(`^(?:[-+]?(?:(?:[0-9][0-9_]*)?\\.[0-9_]*)(?:[eE][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$`),Oe=RegExp(`^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$`);function ke(e){if(!De.test(e))return t;let n=e.toLowerCase().replace(/_/g,``),r=n[0]===`-`?-1:1;if(`+-`.includes(n[0])&&(n=n.slice(1)),n===`.inf`)return r===1?1/0:-1/0;if(n===`.nan`)return NaN;let i=0;if(n.includes(`:`)){for(let e of n.split(`:`))i=i*60+Number(e);i*=r}else i=r*parseFloat(n);return Number.isFinite(i)||Oe.test(e)?i:t}function Ae(e){if(isNaN(e))return`.nan`;if(e===1/0)return`.inf`;if(e===-1/0)return`-.inf`;if(Object.is(e,-0))return`-0.0`;let t=e.toString(10);return/^[-+]?[0-9]+e/.test(t)?t.replace(`e`,`.e`):t}var _=n(`tag:yaml.org,2002:float`,{implicit:!0,implicitFirstChars:[`-`,`+`,`.`,...`0123456789`],resolve:ke,identify:e=>typeof e==`number`&&(!Number.isInteger(e)||Object.is(e,-0)||e.toString(10).indexOf(`e`)>=0),represent:Ae}),je=n(`tag:yaml.org,2002:merge`,{implicit:!0,implicitFirstChars:[`<`],resolve:(e,n)=>e===`<<`||n&&e===``?`<<`:t,identify:()=>!1}),Me=/^[A-Za-z0-9+/]*={0,2}$/;function Ne(e){let n=e.replace(/\s/g,``);if(n.length%4!=0||!Me.test(n))return t;let r=atob(n),i=new Uint8Array(r.length);for(let e=0;eObject.prototype.toString.call(e)===`[object Uint8Array]`,represent:Pe}),Ie=RegExp(`^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$`),Le=RegExp(`^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$`);function Re(e,t,n,r=0,i=0,a=0,o=0){let s=new Date(Date.UTC(e,t,n,r,i,a,o));return s.setUTCFullYear(e,t,n),s}function ze(e){let n=Ie.exec(e);if(n===null&&(n=Le.exec(e)),n===null)return t;let r=+n[1],i=n[2]-1,a=+n[3];if(!n[4]){let e=Re(r,i,a);return e.getUTCFullYear()!==r||e.getUTCMonth()!==i||e.getUTCDate()!==a?t:e}let o=+n[4],s=+n[5],c=+n[6],l=0;if(o>23||s>59||c>59)return t;if(n[7]){let e=n[7].slice(0,3);for(;e.length<3;)e+=`0`;l=+e}let u=Re(r,i,a,o,s,c,l);if(u.getUTCFullYear()!==r||u.getUTCMonth()!==i||u.getUTCDate()!==a)return t;if(n[9]){let e=+n[10],r=+(n[11]||0);if(e>23||r>59)return t;let i=(e*60+r)*6e4;u.setTime(u.getTime()-(n[9]===`-`?-i:i))}return u}var Be=n(`tag:yaml.org,2002:timestamp`,{implicit:!0,implicitFirstChars:[...`0123456789`],resolve:ze,identify:e=>e instanceof Date,represent:e=>e.toISOString()}),Ve=r(`tag:yaml.org,2002:seq`,{create:()=>[],addItem:(e,t)=>{e.push(t)},identify:Array.isArray});function v(e){if(typeof e!=`object`||!e||Array.isArray(e))return!1;let t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function He(e,t){let n={};for(let r of t)e[r]!==void 0&&(n[r]=e[r]);return n}var Ue=r(`tag:yaml.org,2002:omap`,{create:()=>({list:[],seen:new Set}),addItem:(e,t)=>{let n;if(t instanceof Map){if(t.size!==1)return`cannot resolve an ordered map item`;n=t.keys().next().value}else if(v(t)){let e=Object.keys(t);if(e.length!==1)return`cannot resolve an ordered map item`;n=e[0]}else return`cannot resolve an ordered map item`;return e.seen.has(n)?`duplicate key in ordered map`:(e.seen.add(n),e.list.push(t),``)},finalize:e=>e.list,identify:()=>!1}),We=r(`tag:yaml.org,2002:pairs`,{create:()=>[],addItem:(e,t)=>{if(t instanceof Map)return t.size===1?(e.push(t.entries().next().value),``):`cannot resolve a pairs item`;if(Object.prototype.toString.call(t)!==`[object Object]`)return`cannot resolve a pairs item`;let n=t,r=Object.keys(n);return r.length===1?(e.push([r[0],n[r[0]]]),``):`cannot resolve a pairs item`},identify:()=>!1}),Ge=i(`tag:yaml.org,2002:map`,{create:()=>({}),identify:v,represent:e=>{let t=new Map;for(let n of Object.keys(e))t.set(n,e[n]);return t},addPair:(e,t,n)=>{if(typeof t==`object`&&t)return`object-based map does not support complex keys`;let r=String(t);return r===`__proto__`?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,``},has:(e,t)=>typeof t==`object`&&t?!1:Object.prototype.hasOwnProperty.call(e,String(t)),keys:e=>Object.keys(e),get:(e,t)=>{let n=String(t);return Object.prototype.hasOwnProperty.call(e,n)?e[n]:null}}),Ke=i(`tag:yaml.org,2002:set`,{create:()=>new Set,identify:e=>e instanceof Set,represent:e=>{let t=new Map;for(let n of e)t.set(n,null);return t},addPair:(e,t,n)=>n===null?(e.add(t),``):`cannot resolve a set item`,has:(e,t)=>e.has(t),keys:e=>e.keys(),get:()=>null});function y(e){"@babel/helpers - typeof";return y=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},y(e)}function qe(e,t){if(y(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(y(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Je(e){var t=qe(e,`string`);return y(t)==`symbol`?t:t+``}function b(e,t,n){return(t=Je(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ye(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function x(e){for(var t=1;te.implicitFirstChars===null),o=new Set;for(let e of n)if(e.implicitFirstChars!==null)for(let t of e.implicitFirstChars)o.add(t);let s=new Map;for(let e of o)s.set(e,n.filter(t=>t.implicitFirstChars===null||t.implicitFirstChars.indexOf(e)!==-1));let c=r.scalar[`tag:yaml.org,2002:str`];if(!c)throw Error(`schema does not define the default scalar tag (tag:yaml.org,2002:str)`);this.tags=t,this.implicitScalarTags=n,this.implicitScalarByFirstChar=s,this.implicitScalarAnyFirstChar=a,this.defaultScalarTag=c,this.defaultSequenceTag=r.sequence[`tag:yaml.org,2002:seq`],this.defaultMappingTag=r.mapping[`tag:yaml.org,2002:map`],this.exact=r,this.prefix=i}lookupScalarTag(e){let t=this.exact.scalar[e];if(t)return t;for(let t of this.prefix.scalar)if(e.startsWith(t.tagName))return t}lookupSequenceTag(e){let t=this.exact.sequence[e];if(t)return t;for(let t of this.prefix.sequence)if(e.startsWith(t.tagName))return t}lookupMappingTag(e){let t=this.exact.mapping[e];if(t)return t;for(let t of this.prefix.mapping)if(e.startsWith(t.tagName))return t}resolveImplicitScalarTag(e){var n;let r=(n=this.implicitScalarByFirstChar.get(e.charAt(0)))==null?this.implicitScalarAnyFirstChar:n;for(let n of r){let r=n.resolve(e,!1,n.tagName);if(r!==t)return{value:r,tag:n}}let i=this.defaultScalarTag;return{value:i.resolve(e,!1,i.tagName),tag:i}}withTags(...t){let n=[];for(let e of t)n=n.concat(e);return new e([...this.tags,...n])}},$e=new S([a,Ve,Ge]),et=new S([...$e.tags,c,ee,pe,Ee]),tt=new S([...$e.tags,s,p,ce,xe]),nt=new S([...$e.tags,u,re,g,_,Be,je,Fe,Ue,We,Ke]),rt=nt.withTags(x(x({},g),{},{resolve:(e,n,r)=>{let i=g.resolve(e,n,r);return i===t?ce.resolve(e,n,r):i}}),x(x({},_),{},{resolve:(e,n,r)=>{let i=_.resolve(e,n,r);return i===t?xe.resolve(e,n,r):i}})),it=i(`tag:yaml.org,2002:map`,{create:()=>new Map,addPair:(e,t,n)=>(e.set(t,n),``),has:(e,t)=>e.has(t),keys:e=>e.keys(),get:(e,t)=>e.get(t),identify:e=>e instanceof Map||v(e),represent:e=>{if(e instanceof Map)return e;let t=new Map,n=e;for(let e of Object.keys(n))t.set(e,n[e]);return t}});function at(e){if(Array.isArray(e)){let t=Array.prototype.slice.call(e);for(let e=0;e({}),identify:v,represent:e=>{let t=new Map;for(let n of Object.keys(e))t.set(n,e[n]);return t},addPair:(e,t,n)=>{let r=at(t);return r===null?`nested arrays are not supported inside keys`:(r===`__proto__`?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,``)},has:(e,t)=>{let n=at(t);return n!==null&&Object.prototype.hasOwnProperty.call(e,n)},keys:e=>Object.keys(e),get:(e,t)=>{let n=String(t);return Object.prototype.hasOwnProperty.call(e,n)?e[n]:null}}),st={maxLength:79,indent:1,linesBefore:3,linesAfter:2};function ct(e,t,n,r,i){let a=``,o=``,s=Math.floor(i/2)-1;return r-t>s&&(a=` ... `,t=r-s+a.length),n-r>s&&(o=` ...`,n=r+s-o.length),{str:a+e.slice(t,n).replace(/\t/g,`→`)+o,pos:r-t+a.length}}function lt(e,t){return` `.repeat(Math.max(t-e.length,0))+e}function ut(e,t){if(!e.buffer)return null;let n=x(x({},st),t),r=/\r?\n|\r|\0/g,i=[0],a=[],o,s=-1;for(;o=r.exec(e.buffer);)a.push(o.index),i.push(o.index+o[0].length),e.position<=o.index&&s<0&&(s=i.length-2);s<0&&(s=i.length-1);let c=``,l=Math.min(e.line+n.linesAfter,a.length).toString().length,u=n.maxLength-(n.indent+l+3);for(let t=1;t<=n.linesBefore&&!(s-t<0);t++){let r=ct(e.buffer,i[s-t],a[s-t],e.position-(i[s]-i[s-t]),u);c=`${` `.repeat(n.indent)}${lt((e.line-t+1).toString(),l)} | ${r.str}\n${c}`}let d=ct(e.buffer,i[s],a[s],e.position,u);c+=`${` `.repeat(n.indent)}${lt((e.line+1).toString(),l)} | ${d.str}\n`,c+=`${`-`.repeat(n.indent+l+3+d.pos)}^\n`;for(let t=1;t<=n.linesAfter&&!(s+t>=a.length);t++){let r=ct(e.buffer,i[s+t],a[s+t],e.position-(i[s]-i[s+t]),u);c+=`${` `.repeat(n.indent)}${lt((e.line+t+1).toString(),l)} | ${r.str}\n`}return c.replace(/\n$/,``)}function dt(e,t){let n=``;return e.mark?(e.mark.name&&(n+=`in "${e.mark.name}" `),n+=`(${e.mark.line+1}:${e.mark.column+1})`,!t&&e.mark.snippet&&(n+=`\n\n${e.mark.snippet}`),`${e.reason} ${n}`):e.reason}var C=class e extends Error{constructor(e,t){super(),b(this,`reason`,void 0),b(this,`mark`,void 0),this.name=`YAMLException`,this.reason=e,this.mark=t,this.message=dt(this,!1),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}toString(e){return`${this.name}: ${dt(this,e)}`}static throwAt(t,n,r,i=``){let a=0,o=0;for(let e=0;e>10)+55296,(e-65536&1023)+56320)}function _t(e){return e>=48&&e<=57?e-48:(e|32)-97+10}function vt(e){return e===120?2:e===117?4:8}function O(e,t,n){let r=0;for(;t0;n--){i++;let t=_t(e.charCodeAt(i));a=(a<<4)+t}r+=gt(a),i++}a=o=i}else if(t===10||t===13){r+=e.slice(a,o);let t=O(e,i,n);r+=yt(t.breaks),i=a=o=t.position}else i++,t!==32&&t!==9&&(o=i)}return r+e.slice(a,n)}function Ct(e,t,n,r,i,a){let o=r<0?0:r,s=e.slice(t,n).replace(/\r\n?/g,` +`),c=s===``?[]:(s.endsWith(` +`)?s.slice(0,-1):s).split(` +`),l=``,u=!1,d=0,f=!1;for(let e of c){let t=0;for(;t=e.length){d++;continue}let n=e.slice(o),i=n.charCodeAt(0);a?i===32||i===9?(f=!0,l+=` +`.repeat(u?1+d:d)):f?(f=!1,l+=` +`.repeat(d+1)):d===0?u&&(l+=` `):l+=` +`.repeat(d):l+=` +`.repeat(u?1+d:d),l+=n,u=!0,d=0}return i===D.KEEP?l+=` +`.repeat(u?1+d:d):i!==D.STRIP&&u&&(l+=` +`),l}function wt(e,t){if(t.valueStart===ft)return``;let{valueStart:n,valueEnd:r}=t;if(t.fast)return e.slice(n,r);switch(t.style){case T.SINGLE_QUOTED:return xt(e,n,r);case T.DOUBLE_QUOTED:return St(e,n,r);case T.LITERAL_BLOCK:return Ct(e,n,r,t.indent,t.chomping,!1);case T.FOLDED_BLOCK:return Ct(e,n,r,t.indent,t.chomping,!0);default:return bt(e,n,r)}}var Tt=Object.assign(Object.create(null),{"!":`!`,"!!":`tag:yaml.org,2002:`});function Et(e){return encodeURI(e).replace(/!/g,`%21`)}function Dt(e,t){var n,r;if(e.startsWith(`!<`)&&e.endsWith(`>`))return decodeURIComponent(e.slice(2,-1));let i=e.indexOf(`!`,1),a=i===-1?`!`:e.slice(0,i+1),o=(n=(r=t==null?void 0:t[a])==null?Tt[a]:r)==null?a:n;return decodeURIComponent(o)+decodeURIComponent(e.slice(a.length))}function Ot(e){let t=e;return t.charCodeAt(0)===33?(t=t.slice(1),`!${Et(t)}`):t.slice(0,18)===`tag:yaml.org,2002:`?`!!${Et(t.slice(18))}`:`!<${Et(t)}>`}var k=-1,kt=`tag:yaml.org,2002:merge`,At={filename:``,schema:tt,json:!1,maxTotalMergeKeys:1e4,maxAliases:-1};function jt(e){return`tagStart`in e&&e.tagStart!==k?e.tagStart:`anchorStart`in e&&e.anchorStart!==k?e.anchorStart:`valueStart`in e&&e.valueStart!==k?e.valueStart:`start`in e?e.start:0}function A(e,t){C.throwAt(e.source,e.position,t,e.filename)}function Mt(e,t,n,r){try{return n.finalize(r)}catch(n){if(n instanceof C)throw n;C.throwAt(e.source,t,n instanceof Error?n.message:String(n),e.filename)}}function Nt(e,n){let r=wt(e.source,n),i=n.tagStart===k?``:e.source.slice(n.tagStart,n.tagEnd),a=e.schema.defaultScalarTag;if(i!==``){var o;if(i===`!`)return{value:r,tag:a};let n=Dt(i,e.tagHandlers),s=e.schema.lookupScalarTag(n);if(s){let i=s.resolve(r,!0,n);return i===t&&A(e,`cannot resolve a node with !<${n}> explicit tag`),{value:i,tag:s}}let c=(o=e.schema.lookupMappingTag(n))==null?e.schema.lookupSequenceTag(n):o;if(c){r!==``&&A(e,`cannot resolve a node with !<${n}> explicit tag`);let t=c.create(n);return{value:c.carrierIsResult?t:Mt(e,e.position,c,t),tag:c}}A(e,`unknown scalar tag !<${n}>`)}return n.style===T.PLAIN?e.schema.resolveImplicitScalarTag(r):{value:a.resolve(r,!1,a.tagName),tag:a}}function Pt(e,t,n){let r=t.tagStart===k?``:e.source.slice(t.tagStart,t.tagEnd);return r===``||r===`!`?n:Dt(r,e.tagHandlers)}function Ft(e){return e.nodeKind===`mapping`}function It(e){e.totalMergeKeys++,e.maxTotalMergeKeys!==-1&&e.totalMergeKeys>e.maxTotalMergeKeys&&A(e,`merge keys exceeded maxTotalMergeKeys (${e.maxTotalMergeKeys})`)}function Lt(e,t,n,r){It(e);for(let i of r.keys(n)){if(It(e),t.tag.has(t.value,i))continue;let a=t.tag.addPair(t.value,i,r.get(n,i));a&&A(e,a),t.overridable!=null||(t.overridable=new Set),t.overridable.add(i)}}function Rt(e,t,n,r){if(e.position=t.keyPosition,Ft(r))Lt(e,t,n,r);else if(r.nodeKind===`sequence`&&Array.isArray(n)){n.length>100&&A(e,`abnormal merge sequence size`);for(let r of n){let n=e.nodeTags.get(r);n||A(e,`cannot merge mappings; the provided source object is unacceptable`),Lt(e,t,r,n)}}else A(e,`cannot merge mappings; the provided source object is unacceptable`)}function zt(e,t,n,r,i){var a,o;if(e.position=t.keyPosition,t.keyIsMerge){Rt(e,t,r,i);return}!e.json&&t.tag.has(t.value,n)&&!((a=t.overridable)!=null&&a.has(n))&&A(e,`duplicated mapping key`);let s=t.tag.addPair(t.value,n,r);s&&A(e,s),(o=t.overridable)==null||o.delete(n)}function Bt(e,t,n){let r=e.frames[e.frames.length-1];if(r.kind===`document`)r.value=t,r.hasValue=!0;else if(r.kind===`sequence`){Ft(n)&&e.nodeTags.set(t,n);let i=r.tag.addItem(r.value,t,r.index++);i&&A(e,i)}else if(r.hasKey){let i=r.key;r.key=void 0,r.hasKey=!1,zt(e,r,i,t,n)}else r.key=t,r.keyPosition=e.position,r.hasKey=!0,r.keyIsMerge=n.tagName===kt}function Vt(e,t,n,r,i){if(t.anchorStart!==k){let a={value:n,tag:r,isValueFinal:i};return e.anchors.set(e.source.slice(t.anchorStart,t.anchorEnd),a),a}return null}function Ht(e,t){let n=x(x(x({},At),t),{},{events:e,documents:[],eventIndex:0,position:0,frames:[],anchors:new Map,nodeTags:new Map,tagHandlers:Object.create(null),totalMergeKeys:0,aliasCount:0});for(;n.eventIndex`);let i=r.create(t),a=Vt(n,e,i,r,r.carrierIsResult);n.frames.push({kind:`sequence`,position:n.position,value:i,tag:r,anchor:a,index:0});break}case w.MAPPING:{let t=Pt(n,e,`tag:yaml.org,2002:map`),r=n.schema.lookupMappingTag(t);r||A(n,`unknown mapping tag !<${t}>`);let i=r.create(t),a=Vt(n,e,i,r,r.carrierIsResult);n.frames.push({kind:`mapping`,position:n.position,value:i,tag:r,anchor:a,key:void 0,keyPosition:n.position,hasKey:!1,keyIsMerge:!1,overridable:null});break}case w.ALIAS:{n.maxAliases!==-1&&++n.aliasCount>n.maxAliases&&A(n,`aliases exceeded maxAliases (${n.maxAliases})`);let t=n.source.slice(e.anchorStart,e.anchorEnd),r=n.anchors.get(t);r||A(n,`unidentified alias "${t}"`),r.isValueFinal||A(n,`recursive alias "${t}" is not supported for tag ${r.tag.tagName} because it uses finalize()`),Bt(n,r.value,r.tag);break}case w.POP:{let e=n.frames.pop();if(e.kind===`mapping`&&e.hasKey&&(n.position=e.keyPosition,A(n,`incomplete mapping pair in event stream`)),e.kind===`document`)n.documents.push(e.value);else{let t=e.tag.carrierIsResult?e.value:Mt(n,e.position,e.tag,e.value);e.anchor&&(e.anchor.value=t,e.anchor.isValueFinal=!0),Bt(n,t,e.tag)}break}}}return n.documents}var j=-1,Ut=Object.prototype.hasOwnProperty,M=1,Wt=2,Gt=3,N=4,Kt=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,qt=/[,\[\]{}]/,Jt=/^(?:!|!!|![0-9A-Za-z-]+!)$/,Yt=String.raw`(?:%[0-9A-Fa-f]{2}|[0-9A-Za-z\-#;/?:@&=+$,_.!~*'()\[\]])`,Xt=String.raw`(?:%[0-9A-Fa-f]{2}|[0-9A-Za-z\-#;/?:@&=+$.~*'()_])`,Zt=RegExp(`^(?:${Yt})*$`),Qt=RegExp(`^(?:${Xt})+$`),$t=RegExp(`^(?:!(?:${Yt})*|${Xt}(?:${Yt})*)$`),en={filename:``,maxDepth:100};function tn(e,t,n){e.events.push({type:w.DOCUMENT,explicitStart:t,explicitEnd:n,directives:e.directives})}function nn(e,t,n,r,i,a,o){e.events.push({type:w.SEQUENCE,start:t,anchorStart:n,anchorEnd:r,tagStart:i,tagEnd:a,style:o})}function rn(e,t,n,r,i,a,o){e.events.push({type:w.MAPPING,start:t,anchorStart:n,anchorEnd:r,tagStart:i,tagEnd:a,style:o})}function an(e,t){e.events.splice(t.eventsLength,0,{type:w.MAPPING,start:t.position,anchorStart:j,anchorEnd:j,tagStart:j,tagEnd:j,style:E.FLOW})}function P(e,t,n,r,i,a,o,s,c=D.CLIP,l=-1,u=!1){e.events.push({type:w.SCALAR,valueStart:t,valueEnd:n,anchorStart:r,anchorEnd:i,tagStart:a,tagEnd:o,style:s,chomping:c,indent:l,fast:u})}function on(e,t,n){e.events.push({type:w.ALIAS,anchorStart:t,anchorEnd:n})}function F(e){e.events.push({type:w.POP})}function I(e){P(e,j,j,j,j,j,j,T.PLAIN)}function sn(){return{anchorStart:j,anchorEnd:j,tagStart:j,tagEnd:j}}function L(e){return{position:e.position,line:e.line,lineStart:e.lineStart,lineIndent:e.lineIndent,firstTabInLine:e.firstTabInLine,eventsLength:e.events.length}}function R(e,t){e.position=t.position,e.line=t.line,e.lineStart=t.lineStart,e.lineIndent=t.lineIndent,e.firstTabInLine=t.firstTabInLine,e.events.length=t.eventsLength}function z(e,t){C.throwAt(e.input.slice(0,e.length),e.position,t,e.filename)}function B(e){return e===10||e===13}function V(e){return e===9||e===32}function H(e){return V(e)||B(e)}function U(e){return e===0||H(e)}function W(e){return e===44||e===91||e===93||e===123||e===125}function cn(e){return e>=48&&e<=57?e-48:-1}function ln(e){if(e>=48&&e<=57)return e-48;let t=e|32;return t>=97&&t<=102?t-97+10:-1}function un(e){return e===120?2:e===117?4:e===85?8:0}function dn(e){return e===48||e===97||e===98||e===116||e===9||e===110||e===118||e===102||e===114||e===101||e===32||e===34||e===47||e===92||e===78||e===95||e===76||e===80}function fn(e){e.input.charCodeAt(e.position)===10?e.position++:(e.position++,e.input.charCodeAt(e.position)===10&&e.position++),e.line++,e.lineStart=e.position,e.lineIndent=0,e.firstTabInLine=-1}function G(e,t){let n=0,r=e.input.charCodeAt(e.position),i=e.position===e.lineStart||H(e.input.charCodeAt(e.position-1));for(;r!==0;){for(;V(r);)i=!0,r===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),r=e.input.charCodeAt(++e.position);if(t&&i&&r===35)do r=e.input.charCodeAt(++e.position);while(!B(r)&&r!==0);if(!B(r))break;for(fn(e),n++,i=!0,r=e.input.charCodeAt(e.position);r===32;)e.lineIndent++,r=e.input.charCodeAt(++e.position)}return n}function K(e,t=e.position){let n=e.input.charCodeAt(t);if((n===45||n===46)&&n===e.input.charCodeAt(t+1)&&n===e.input.charCodeAt(t+2)){let n=e.input.charCodeAt(t+3);return n===0||H(n)}return!1}function pn(e){e.position===e.lineStart&&e.input.charCodeAt(e.position)===65279&&(e.position++,e.lineStart=e.position)}function mn(e){if(e.position!==e.lineStart)return!1;if(K(e))return!0;if(e.input.charCodeAt(e.position)!==65279)return!1;let t=L(e);pn(e),G(e,!0);let n=e.input.charCodeAt(e.position),r=e.position===e.lineStart&&(n===37||n===45&&K(e));return R(e,t),r}function hn(e){let t=e.input.charCodeAt(e.position);for(;t!==0&&!B(t);)t=e.input.charCodeAt(++e.position)}function gn(e,t,n){Kt.test(e.input.slice(t,n))&&z(e,`the stream contains non-printable characters`)}function _n(e,t,n){if(e.input.charCodeAt(e.position)!==33)return!1;t.tagStart!==j&&z(e,`duplication of a tag property`);let r=e.position,i=!1,a=!1,o=`!`,s=e.input.charCodeAt(++e.position);s===60?(i=!0,s=e.input.charCodeAt(++e.position)):s===33&&(a=!0,o=`!!`,s=e.input.charCodeAt(++e.position));let c=e.position,l;if(i){for(;s!==0&&s!==62;)s=e.input.charCodeAt(++e.position);s!==62&&z(e,`unexpected end of the stream within a verbatim tag`),l=e.input.slice(c,e.position),e.position++}else{for(;s!==0&&!H(s)&&!(n&&W(s));)s===33&&(a?z(e,`tag suffix cannot contain exclamation marks`):(o=e.input.slice(c-1,e.position+1),Jt.test(o)||z(e,`named tag handle cannot contain such characters`),a=!0,c=e.position+1)),s=e.input.charCodeAt(++e.position);l=e.input.slice(c,e.position),qt.test(l)&&z(e,`tag suffix cannot contain flow indicator characters`)}return l&&!(i?Zt.test(l):Qt.test(l))&&z(e,`tag name cannot contain such characters: ${l}`),!i&&o!==`!`&&o!==`!!`&&!Ut.call(e.tagHandlers,o)&&z(e,`undeclared tag handle "${o}"`),t.tagStart=r,t.tagEnd=e.position,!0}function vn(e,t){if(e.input.charCodeAt(e.position)!==38)return!1;t.anchorStart!==j&&z(e,`duplication of an anchor property`),e.position++;let n=e.position;for(;e.input.charCodeAt(e.position)!==0&&!H(e.input.charCodeAt(e.position))&&!W(e.input.charCodeAt(e.position));)e.position++;return e.position===n&&z(e,`name of an anchor node must contain at least one character`),t.anchorStart=n,t.anchorEnd=e.position,!0}function yn(e,t){if(e.input.charCodeAt(e.position)!==42)return!1;(t.anchorStart!==j||t.tagStart!==j)&&z(e,`alias node should not have any properties`),e.position++;let n=e.position;for(;e.input.charCodeAt(e.position)!==0&&!H(e.input.charCodeAt(e.position))&&!W(e.input.charCodeAt(e.position));)e.position++;return e.position===n&&z(e,`name of an alias node must contain at least one character`),on(e,n,e.position),!0}function bn(e,t){G(e,!1),e.lineIndent0;)e.position++,ln(e.input.charCodeAt(e.position))<0&&z(e,`expected hexadecimal character`);e.position++}}else B(a)?(i=!1,bn(e,t)):e.position===e.lineStart&&K(e)?z(e,`unexpected end of the document within a double quoted scalar`):a!==9&&a<32?z(e,`expected valid JSON character`):e.position++}z(e,`unexpected end of the stream within a double quoted scalar`)}function Cn(e,t,n){let r=e.input.charCodeAt(e.position),i=D.CLIP,a=-1,o=!1;if(r!==124&&r!==62)return!1;let s=r===124?T.LITERAL_BLOCK:T.FOLDED_BLOCK;for(e.position++;e.input.charCodeAt(e.position)!==0;){let n=e.input.charCodeAt(e.position),r=cn(n);if(n===43||n===45)i!==D.CLIP&&z(e,`repeat of a chomping mode identifier`),i=n===43?D.KEEP:D.STRIP,e.position++;else if(r>=0)r===0&&z(e,`bad explicit indentation width of a block scalar; it cannot be less than one`),o&&z(e,`repeat of an indentation width identifier`),a=t+r-1,o=!0,e.position++;else break}let c=!1;for(;V(e.input.charCodeAt(e.position));)c=!0,e.position++;c&&e.input.charCodeAt(e.position)===35&&hn(e),B(e.input.charCodeAt(e.position))?fn(e):e.input.charCodeAt(e.position)!==0&&z(e,`a line break is expected`);let l=o?a:-1,u=0,d=e.position,f=e.position;for(;e.input.charCodeAt(e.position)!==0;){let n=e.position,r=0;for(;e.input.charCodeAt(n+r)===32;)r++;let i=e.input.charCodeAt(n+r);if(i===0){l>=0?r>l&&(f=n+r):r>0&&(f=n+r);break}if(mn(e))break;if(!o&&l===-1&&B(i)&&(u=Math.max(u,r)),!o&&l===-1&&!B(i)&&(i===9&&r=t){c=!0,o=e.input.charCodeAt(e.position);continue}e.position=n,e.line=r,e.lineStart=i,e.lineIndent=a;break}V(o)||(a=e.position+1),o=e.input.charCodeAt(++e.position)}return a===i?!1:(gn(e,i,a),P(e,i,a,r.anchorStart,r.anchorEnd,r.tagStart,r.tagEnd,T.PLAIN,D.CLIP,-1,!c),!0)}function q(e,t){let n=e.line;G(e,!0),(e.line>n&&e.lineIndent0;if(e.firstTabInLine!==-1&&e.input.charCodeAt(e.position)===45&&U(e.input.charCodeAt(e.position+1))&&z(e,`bad indentation of a sequence entry`),r&&e.lineIndent<=t?I(e):J(e,t,Gt,!1,!0),G(e,!0),e.lineIndent=e.length)break;e.lineIndent>t&&z(e,`bad indentation of a sequence entry`),e.line===n&&e.input.charCodeAt(e.position)===45&&U(e.input.charCodeAt(e.position+1))&&z(e,`bad indentation of a sequence entry`)}return F(e),!0}function On(e,t,n,r){let i=!1,a=!1,o=!1,s=!1;if(e.firstTabInLine!==-1)return!1;let c=e.input.charCodeAt(e.position);for(;c!==0;){!i&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,z(e,`tab characters must not be used in indentation`));let l=e.input.charCodeAt(e.position+1),u=e.line;if((c===63||c===58)&&U(l))o||(rn(e,e.position,r.anchorStart,r.anchorEnd,r.tagStart,r.tagEnd,E.BLOCK),o=!0),c===63?(i&&I(e),a=!0,i=!0):i?i=!1:(I(e),a=!0,i=!1),e.position+=1,s=!0;else{i&&(I(e),i=!1);let t=L(e);if(!J(e,n,Wt,!1,!0))break;if(e.line===u){for(c=e.input.charCodeAt(e.position);V(c);)c=e.input.charCodeAt(++e.position);if(c===58){if(c=e.input.charCodeAt(++e.position),U(c)||z(e,`a whitespace character is expected after the key-value separator within a block mapping`),!o){for(R(e,t),rn(e,t.position,r.anchorStart,r.anchorEnd,r.tagStart,r.tagEnd,E.BLOCK),o=!0,J(e,n,Wt,!1,!0),c=e.input.charCodeAt(e.position);V(c);)c=e.input.charCodeAt(++e.position);e.position++}a=!0,i=!1,s=!1}else if(a)z(e,`expected ':' after a mapping key`);else return r.anchorStart!==j||r.tagStart!==j?(R(e,t),!1):!0}else if(a)z(e,`can not read a block mapping entry; a multiline key may not be an implicit key`);else return r.anchorStart!==j||r.tagStart!==j?(R(e,t),!1):!0}if(J(e,t,N,!0,s)&&(s=!1),i||s&&(I(e),s=!1),G(e,!0),c=e.input.charCodeAt(e.position),(e.line===u||e.lineIndent>t)&&c!==0)z(e,`bad indentation of a mapping entry`);else if(e.lineIndent=e.maxDepth&&z(e,`nesting exceeded maxDepth (${e.maxDepth})`),e.depth++;let o=1,s=!1,c=!1,l=null,u=sn(),d=n===N||n===Gt,f=d,p=d;if(r&&G(e,!0)&&(s=!0,o=e.lineIndent>t?1:e.lineIndent===t?0:-1),o===1)for(;;){let r=e.input.charCodeAt(e.position),i=L(e);if(s&&o!==1&&(r===33||r===38))break;if(s&&p&&(u.tagStart!==j||u.anchorStart!==j)&&(r===33||r===38)){var m;let n=L(e),r=t+1;if(On(e,e.position-e.lineStart,r,u)&&((m=e.events[n.eventsLength])==null?void 0:m.type)===w.MAPPING)return e.depth--,!0;R(e,n)}if(s&&(r===33&&u.tagStart!==j||r===38&&u.anchorStart!==j)||!_n(e,u,n===M)&&!vn(e,u))break;l===null&&(l=i),G(e,!0)?(s=!0,f=p,o=e.lineIndent>t?1:e.lineIndent===t?0:-1):f=!1}if(f&&(f=s||i),o===1||n===N){let r=n===M||n===Wt?t:t+1,i=e.position-e.lineStart;if(o===1)if(f&&(Dn(e,i,u)||On(e,i,r,u))||En(e,r,u))c=!0;else{let t=e.input.charCodeAt(e.position);if(l!==null&&a&&p&&!f&&t!==124&&t!==62){var h;let t=L(e),n=l.position-l.lineStart;R(e,l),On(e,n,r,sn())&&((h=e.events[t.eventsLength])==null?void 0:h.type)===w.MAPPING?c=!0:R(e,t)}!c&&(d&&Cn(e,r,u)||xn(e,r,u)||Sn(e,r,u)||yn(e,u)||Tn(e,r,n,u))&&(c=!0)}else o===0&&(c=f&&Dn(e,i,u))}return d=d&&!c,!c&&(u.anchorStart!==j||u.tagStart!==j||d)&&(P(e,j,j,u.anchorStart,u.anchorEnd,u.tagStart,u.tagEnd,T.PLAIN),c=!0),e.depth--,c||u.anchorStart!==j||u.tagStart!==j}function kn(e){if(e.lineIndent>0||e.input.charCodeAt(e.position)!==37)return!1;e.position++;let t=e.position;for(;e.input.charCodeAt(e.position)!==0&&!H(e.input.charCodeAt(e.position));)e.position++;let n=e.input.slice(t,e.position),r=[];for(n.length===0&&z(e,`directive name must not be less than one character in length`);e.input.charCodeAt(e.position)!==0&&!B(e.input.charCodeAt(e.position));){for(;V(e.input.charCodeAt(e.position));)e.position++;if(e.input.charCodeAt(e.position)===35||B(e.input.charCodeAt(e.position))||e.input.charCodeAt(e.position)===0)break;let t=e.position;for(;e.input.charCodeAt(e.position)!==0&&!H(e.input.charCodeAt(e.position));)e.position++;r.push(e.input.slice(t,e.position))}if(B(e.input.charCodeAt(e.position))&&fn(e),n===`YAML`){e.directives.some(e=>e.kind===`yaml`)&&z(e,`duplication of %YAML directive`),r.length!==1&&z(e,`YAML directive accepts exactly one argument`);let t=/^([0-9]+)\.([0-9]+)$/.exec(r[0]);t===null&&z(e,`ill-formed argument of the YAML directive`),parseInt(t[1],10)!==1&&z(e,`unacceptable YAML version of the document`),e.directives.push({kind:`yaml`,version:r[0]})}else if(n===`TAG`){r.length!==2&&z(e,`TAG directive accepts exactly two arguments`);let[t,n]=r;Jt.test(t)||z(e,`ill-formed tag handle (first argument) of the TAG directive`),Ut.call(e.tagHandlers,t)&&z(e,`there is a previously declared suffix for "${t}" tag handle`),$t.test(n)||z(e,`ill-formed tag prefix (second argument) of the TAG directive`),e.tagHandlers[t]=n,e.directives.push({kind:`tag`,handle:t,prefix:n})}return!0}function An(e){e.directives=[],e.tagHandlers=Object.create(null);let t=!1;for(G(e,!0);kn(e);)t=!0,G(e,!0);let n=!1,r=!1,i=!0;if(e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45&&U(e.input.charCodeAt(e.position+3))){n=!0;let t=e.line;e.position+=3,G(e,!0),i=e.line>t}else t&&z(e,`directives end mark is expected`);let a=e.events.length;if(!n&&e.position===e.lineStart&&e.input.charCodeAt(e.position)===46&&K(e)){e.position+=3,G(e,!0);return}if(tn(e,n,!1),J(e,e.lineIndent-1,N,!1,i,i)||I(e),G(e,!0),e.position===e.lineStart&&K(e)&&(r=e.input.charCodeAt(e.position)===46,r)){let t=e.line;e.position+=3,G(e,!0),e.line===t&&e.position=r.length));){let e=r.position;An(r),r.position===e&&z(r,`can not read a document`)}return r.events}var Mn=x(x({},en),At);function Nn(e,t={}){let n=x(x({},Mn),t),r=String(e),i=Object.keys(en),a=Object.keys(At);return Ht(jn(r,He(n,i)),x(x({},He(n,a)),{},{source:r}))}function Pn(e,t,n){let r=null;typeof t==`function`?r=t:typeof t==`object`&&t&&(n=t);let i=Nn(e,n);if(r===null)return i;for(let e of i)r(e)}function Fn(e,t){let n=Nn(e,t);if(n.length===0)throw new C(`expected a document, but the input is empty`);if(n.length===1)return n[0];throw new C(`expected a single document in the stream, but found more`)}var Y=Symbol(`INVALID`);function In(e){let t=new Set([e.defaultScalarTag,e.defaultSequenceTag,e.defaultMappingTag].filter(e=>e!==void 0)),n=e.implicitScalarTags,r=e.tags.filter(e=>!(e.nodeKind===`scalar`&&e.implicit)&&!t.has(e)),i=e.tags.filter(e=>t.has(e));return[...n.map(e=>({tag:e,implicitTag:!0})),...r.map(e=>({tag:e,implicitTag:!1})),...i.map(e=>({tag:e,implicitTag:!0}))]}function Ln(e,t){for(let n=0,r=e.representTypes.length;ni&&r[0]!==` `&&/ [^ \t]/.test(r)&&(o=!0),n===-1)break;a=n+1}o?e.style=T.FOLDED_BLOCK:n&&(e.style=T.LITERAL_BLOCK)}function Zn(e){e.style===T.PLAIN&&!Un(e.allowedStylesMask,T.PLAIN)&&(e.style=Gn(e))}function Qn(e){Un(e.allowedStylesMask,e.style)||(e.style=T.DOUBLE_QUOTED)}function Z(e,t){return e|1<'"%@\`]`,sr=`[,\\[\\]{}]`,cr=ir,lr=`(?:(?!${sr})${ir})`,ur=`(?:(?:(?!${or})${ir})|[?:-](?=${cr}))`,dr=`(?:(?:(?!${or})${ir})|[?:-](?=${lr}))`,fr=`(?:(?:(?![:#])${cr})|:(?=${cr}))#*`,pr=`(?:(?:(?![:#])${lr})|:(?=${lr}))#*`,mr=`(?:${nr}*${fr})*`,hr=`(?:${nr}*${pr})*`,gr=`${ur}#*${mr}`,_r=`${dr}#*${hr}`,vr=gr,yr=_r,br=`\\n+${fr}${mr}`,xr=`\\n+${pr}${hr}`,Sr=`${gr}(?:${br})*`,Cr=`${_r}(?:${xr})*`,wr=RegExp(`^(?:${Sr})$`,`u`),Tr=RegExp(`^(?:${Cr})$`,`u`),Er=RegExp(`^(?:${vr})$`,`u`),Dr=RegExp(`^(?:${yr})$`,`u`),Or=RegExp(`^(?:${ar})*$`,`u`),kr=RegExp(`^(?:${ar}|\\n)*$`,`u`),Ar=RegExp(`^(?:${rr}|\\n)*$`,`u`),jr=/^(?:---|\.\.\.)(?=$|[ \t\n\r])/,Mr=/^(?:---|\.\.\.)(?=$|[ \t\n\r])/m;function Nr(e){let t=e.node.value;if(t!==``){if(!(e.isKey?e.flowOnly?Dr:Er:e.flowOnly?Tr:wr).test(t)||e.shiftOfFirstLine===0&&jr.test(t))return!1;if(e.shiftOfContent===0){let e=t.indexOf(` +`);if(e!==-1){let n=t.slice(e+1);if(Mr.test(n))return!1}}}let n=e.presenterOptions.schema.resolveImplicitScalarTag(t).tag.tagName;return!(!e.node.tagged&&n!==e.node.tag||!e.node.tagged&&t===`=`&&n===e.presenterOptions.schema.defaultScalarTag.tagName)}function Pr(e){let t=e.node.value;if(!(e.isKey?Or:kr).test(t)||/[ \t]\n|\n[ \t]/.test(t))return!1;if(!e.isKey&&e.shiftOfContent===0){let e=t.indexOf(` +`);if(e!==-1&&Mr.test(t.slice(e+1)))return!1}return!0}function Fr(e){if(e.flowOnly||!Ar.test(e.node.value))return!1;let t=e.shiftOfContent-e.shiftOfParent;return!(t<1||t>9&&/^\n* /.test(e.node.value)||e.shiftOfContent===0&&Mr.test(e.node.value))}function Ir(e){let t=Z(0,T.DOUBLE_QUOTED);Nr(e)&&(t=Z(t,T.PLAIN)),Pr(e)&&(t=Z(t,T.SINGLE_QUOTED)),Fr(e)&&(t=Z(Z(t,T.LITERAL_BLOCK),T.FOLDED_BLOCK)),e.allowedStylesMask=t}function Lr(e){switch(e.style){case T.PLAIN:return Rr(e);case T.SINGLE_QUOTED:return zr(e);case T.LITERAL_BLOCK:return Br(e);case T.FOLDED_BLOCK:return Vr(e);case T.DOUBLE_QUOTED:return Hr(e)}}function Rr(e){return Ur(e.node.value,e.shiftOfContent)}function zr(e){return`'${Ur(e.node.value,e.shiftOfContent).replace(/'/g,`''`)}'`}function Br(e){let t=e.node.value;return`|`+Kr(t,e.shiftOfParent,e.shiftOfContent)+qr(Wr(t,e.shiftOfContent))}function Vr(e){let t=e.node.value,n=e.presenterOptions.lineWidth,r=1/0;return n!==-1&&(r=Math.max(Math.min(n,40),n-e.shiftOfContent)),`>`+Kr(t,e.shiftOfParent,e.shiftOfContent)+qr(Wr(Xr(t,r),e.shiftOfContent))}function Hr(e){return`"${$r(e.node.value)}"`}function Ur(e,t){let n=e.indexOf(` +`);if(n===-1)return e;let r=` `.repeat(t),i=e.slice(0,n),a=/(\n+)([^\n]*)/g;a.lastIndex=n;let o;for(;o=a.exec(e);){let e=o[1].length,t=o[2];i+=` +`.repeat(e+1)+r+t}return i}function Wr(e,t){let n=` `.repeat(t),r=0,i=``,a=e.length;for(;rt&&(a=o>i?o:s,c+=`\n${e.slice(i,a)}`,i=a+1),o=s;return c+=` +`,e.length-i>t&&o>i?c+=`${e.slice(i,o)}\n${e.slice(o+1)}`:c+=e.slice(i),c.slice(1)}function Xr(e,t){let n=/(\n+)([^\n]*)/g,r=e.indexOf(` +`);r===-1&&(r=e.length),n.lastIndex=r;let i=Yr(e.slice(0,r),t),a=e[0]===` +`||Jr(e[0]),o,s;for(;s=n.exec(e);){let e=s[1],n=s[2];o=n!==``&&Jr(n[0]),i+=e+(!a&&!o&&n!==``?` +`:``)+Yr(n,t),a=o}return i}var Zr=/["\\\x00-\x1F\x7F-\xA0\u2028\u2029\uD800-\uDFFF\uFEFF\uFFFE\uFFFF]/gu;function Qr(e){switch(e){case`\0`:return`\\0`;case`\x07`:return`\\a`;case`\b`:return`\\b`;case` `:return`\\t`;case` +`:return`\\n`;case`\v`:return`\\v`;case`\f`:return`\\f`;case`\r`:return`\\r`;case`\x1B`:return`\\e`;case`"`:return`\\"`;case`\\`:return`\\\\`;case`…`:return`\\N`;case`\xA0`:return`\\_`;case`\u2028`:return`\\L`;case`\u2029`:return`\\P`}let t=e.charCodeAt(0),n=t.toString(16).toUpperCase();return t<=255?`\\x${`0`.repeat(2-n.length)}${n}`:`\\u${`0`.repeat(4-n.length)}${n}`}function $r(e){return e.replace(Zr,Qr)}var ei=10,ti={indent:2,seqNoIndent:!1,seqInlineFirst:!0,lineWidth:80,flowBracketPadding:!1,flowSkipCommaSpace:!1,flowSkipColonSpace:!1,quoteFlowKeys:!1,quoteStyle:`single`,forceQuotes:!1,scalarStyleRules:Object.keys(Wn).map(e=>Reflect.get(Wn,e)),tagBeforeAnchor:!1};function ni(e){return e.tagged?e.tag:Ot(e.tag)}function ri(e){let t=x(x({},ti),e);return t.flowSkipColonSpace&&(t.quoteFlowKeys=!0),x(x({},t),{},{defaultScalarTagName:t.schema.defaultScalarTag.tagName,openEnded:!1})}function ii(e,t){return`\n${` `.repeat(e.indent*t)}`}function ai(e,t,n,r,i,a){return{node:t,parent:n,level:r,isKey:i,flowOnly:a,shiftOfParent:r===0?-1:e.indent*(r-1),shiftOfContent:e.indent*Math.max(1,r),shiftOfFirstLine:r===0?0:e.indent*r,presenterOptions:e,allowedStylesMask:0,style:t.style}}function oi(e,t,n){let r=``;for(let i=0,a=n.items.length;i0&&(r+=`,${e.flowSkipCommaSpace?``:` `}`),r+=a}let i=e.flowBracketPadding&&n.items.length>0?` `:``;return`[${i}${r}${i}]`}function si(e,t,n,r){let i=``;for(let a=0,o=n.items.length;a1024&&/^[\s\S]{1025}/u.test(d),m=l||f||p;m&&(d&&ei===d.charCodeAt(0)?o+=`?`:o+=`? `),o+=d,m&&(o+=ii(e,t));let h=Q(e,t+1,c,n,{block:!0,compact:m,isblockseq:m&&!ui(e,c,t+1)}).text,ee=s.kind===`scalar`&&u.noBody&&(s.tagged||s.anchor!==void 0),te=!m&&(s.kind===`alias`||ee)?` `:``;h===``||ei===h.charCodeAt(0)?o+=`${te}:`:o+=`${te}: `,o+=h,i+=o}return i}function ui(e,t,n){return t.kind===`alias`?!0:t.tagged||t.anchor!==void 0||e.indent<2&&n>0}function Q(e,t,n,r,i){var a;if(n.kind===`alias`)return e.openEnded=!1,{text:`*${n.anchor}`,noBody:!1};let{block:o=!1,iskey:s=!1,isblockseq:c=!1}=i,l=(a=i.compact)==null?!1:a,u=n.anchor!==void 0;ui(e,n,t)&&(l=!1);let d,f=n.tagged,p=o&&(n.kind===`mapping`||n.kind===`sequence`)&&n.style===E.BLOCK&&n.items.length!==0;if(n.kind===`mapping`)d=p?li(e,t,n,l):ci(e,t,n);else if(n.kind===`sequence`)d=p?e.seqNoIndent&&!c&&t>0?si(e,t-1,n,l):si(e,t,n,l):oi(e,t,n);else{let i=ai(e,n,r,t,s,!o);Ir(i);for(let t of e.scalarStyleRules)t(i);d=Lr(i),e.openEnded=(i.style===T.LITERAL_BLOCK||i.style===T.FOLDED_BLOCK)&&(n.value===` +`||n.value.endsWith(` + +`)),f=n.tagged||d===``&&i.flowOnly&&(r==null?void 0:r.kind)===`sequence`&&!u||i.style!==T.PLAIN&&n.tag!==e.defaultScalarTagName}(n.kind===`mapping`||n.kind===`sequence`)&&!p&&(e.openEnded=!1),p&&l&&t>0&&e.indent>2&&(d=`${` `.repeat(e.indent-2)}${d}`);let m=d===``,h=d;if(f||u){let t=[],r=f?ni(n):null,i=u?`&${n.anchor}`:null;e.tagBeforeAnchor?(r!==null&&t.push(r),i!==null&&t.push(i)):(i!==null&&t.push(i),r!==null&&t.push(r));let a=d===``||d.charCodeAt(0)===ei?``:` `;h=`${t.join(` `)}${a}${d}`}return{text:h,noBody:m}}function di(e){return(e.kind===`sequence`||e.kind===`mapping`)&&e.style===E.BLOCK&&e.items.length!==0&&!e.tagged&&e.anchor===void 0}function fi(e){let t=``;for(let n of e.directives){if(n.kind===`yaml`){t+=`%YAML ${n.version}\n`;continue}let{handle:e,prefix:r}=n;t+=`%TAG ${e} ${r}\n`}return t}function pi(e,t){let n=ri(t),r=``,i=!1;for(let t=0;t0&&!i;if(r+=o,a.contents===null)c&&(r+=`--- +`);else if(c){let e=Q(n,0,a.contents,null,{block:!0,compact:!0}).text,t=e===``?``:s||di(a.contents)?` +`:` `;r+=`---${t}${e}\n`}else r+=Q(n,0,a.contents,null,{block:!0,compact:!0}).text+` +`;i=a.explicitEnd||n.openEnded,i&&(r+=`... +`)}return r}var mi=x(x({},ti),{},{schema:rt,skipInvalid:!1,noRefs:!1,flowLevel:-1,sortKeys:!1,transform:()=>{}});function hi(e,t){let n=String(e),r=String(t);return nr)}function gi(e,t={}){let n=x(x({},mi),t),r=Rn(e,n.schema,{noRefs:n.noRefs,skipInvalid:n.skipInvalid});if(n.flowLevel>=0&&Hn(r,(e,t)=>{if(!(t.depth{t.kind===`mapping`&&t.items.sort((t,n)=>e(t.key.kind===`scalar`?t.key.value:``,n.key.kind===`scalar`?n.key.value:``))})}return n.transform(r),pi(r,x(x({},He(n,Object.keys(ti))),{},{schema:n.schema}))}var $=-1;function _i(e){return`tagStart`in e&&e.tagStart!==$?e.tagStart:`anchorStart`in e&&e.anchorStart!==$?e.anchorStart:`valueStart`in e&&e.valueStart!==$?e.valueStart:`start`in e?e.start:0}function vi(e,t){return t.tagStart===$?``:e.source.slice(t.tagStart,t.tagEnd)}function yi(e,t){return t.anchorStart===$?void 0:e.source.slice(t.anchorStart,t.anchorEnd)}function bi(e,t){let n=wt(e.source,t),r=vi(e,t),i,a=!1;return r===``?i=t.style===T.PLAIN?e.schema.resolveImplicitScalarTag(n).tag.tagName:e.schema.defaultScalarTag.tagName:(a=!0,i=r),{kind:`scalar`,tag:i,tagged:a,style:t.style,anchor:yi(e,t),value:n}}function xi(e,t,n){let r=vi(e,t),i,a=!1;return r===``?i=n:(i=r,a=!0),{tag:i,tagged:a,style:t.style,anchor:yi(e,t)}}function Si(e,t){let n=e.frames[e.frames.length-1];n.kind===`document`?n.doc.contents=t:n.kind===`sequence`?n.node.items.push(t):n.key?(n.node.items.push({key:n.key,value:t}),n.key=null):n.key=t}function Ci(e,t){let n={source:t.source,schema:t.schema,eventIndex:0,position:0,frames:[],documents:[]};for(;n.eventIndex {\n /**\n * Whether this tag participates in resolving plain scalars without an\n * explicit tag. Default: `false`.\n */\n implicit?: boolean\n\n /**\n * Whether explicit tag names are matched by prefix instead of exact equality.\n * Default: `false`.\n */\n matchByTagPrefix?: boolean\n\n /**\n * Set of `source.charAt(0)` keys for which `resolve` may succeed (a superset\n * of what it really matches). A key is either a single character or '' (empty\n * source). `null` means \"no constraint, always try\". Used by the composer to\n * dispatch implicit scalars by first character without running every resolver.\n */\n implicitFirstChars?: readonly string[] | null\n\n /**\n * Construct a value from scalar text, or return {@link NOT_RESOLVED} when it\n * is invalid for this tag. `isExplicit` is true for an explicit tag and\n * `tagName` is the actual matched name.\n */\n resolve: (source: string, isExplicit: boolean, tagName: string) => Result | typeof NOT_RESOLVED\n\n /**\n * Selects this tag for a JavaScript value when dumping. Use `() => false`\n * for load-only tags.\n */\n identify: (data: any) => boolean\n\n /**\n * A scalar's printed form is text, so `represent` always yields a string.\n * The factory supplies a `String(data)` default when a tag omits it.\n */\n represent?: (data: any) => string\n\n /** Return the tag name to emit for a prefix-matching tag. Defaults to `tagName`. */\n representTagName?: (data: any) => string\n}\n\n/**\n * Normalized scalar tag returned by {@link defineScalarTag}.\n *\n * @category Tags\n */\ninterface ScalarTagDefinition extends Required> {\n /** Tag name used for schema lookup. */\n tagName: string\n\n /** YAML node kind handled by this tag. */\n nodeKind: 'scalar'\n}\n\n/**\n * Options for {@link defineSequenceTag}.\n *\n * @category Tags\n */\ninterface SequenceTagOptions {\n /**\n * Whether explicit tag names are matched by prefix instead of exact equality.\n * Default: `false`.\n */\n matchByTagPrefix?: boolean\n\n /** Create the carrier used while constructing a sequence. */\n create: (tagName: string) => Carrier\n\n /** Add an item to the carrier. Return a non-empty error message to reject it. */\n addItem: (carrier: Carrier, item: unknown, index: number) => void | string\n\n /** Convert the completed carrier to the result. Defaults to the identity function. */\n finalize?: (carrier: Carrier) => Result\n\n /**\n * Selects this tag for a JavaScript value when dumping. Use `() => false`\n * for load-only tags.\n */\n identify: (data: any) => boolean\n\n /** Return the array-like contents to dump. Defaults to the identity function. */\n represent?: (data: any) => ArrayLike\n\n /** Return the tag name to emit for a prefix-matching tag. Defaults to `tagName`. */\n representTagName?: (data: any) => string\n}\n\n/**\n * Normalized sequence tag returned by {@link defineSequenceTag}.\n *\n * @category Tags\n */\ninterface SequenceTagDefinition extends Required> {\n /** Tag name used for schema lookup. */\n tagName: string\n\n /** YAML node kind handled by this tag. */\n nodeKind: 'sequence'\n\n /** Sequence tags do not participate in implicit scalar resolution. */\n implicit: false\n\n /** Whether the carrier is also the final result (`finalize` was omitted). */\n carrierIsResult: boolean\n}\n\n/**\n * Options for {@link defineMappingTag}.\n *\n * @category Tags\n */\ninterface MappingTagOptions {\n /**\n * Whether explicit tag names are matched by prefix instead of exact equality.\n * Default: `false`.\n */\n matchByTagPrefix?: boolean\n\n /** Create the carrier used while constructing a mapping. */\n create: (tagName: string) => Carrier\n\n /**\n * Writes a pair. Returns '' on success, a non-empty error message otherwise\n * (key does not fit the representation, value rejected, ...). Always a string\n * so the hot path never allocates an exception wrapper.\n */\n addPair: (carrier: Carrier, key: unknown, value: unknown) => string\n\n /** Return whether the carrier contains a key, for duplicate and merge checks. */\n has: (carrier: Carrier, key: unknown) => boolean\n\n /** Return the keys of a completed result for YAML merge processing. */\n keys: (result: Result) => Iterable\n\n /** Return a value from a completed result for YAML merge processing. */\n get: (result: Result, key: unknown) => unknown\n\n /** Convert the completed carrier to the result. Defaults to the identity function. */\n finalize?: (carrier: Carrier) => Result\n\n /**\n * Selects this tag for a JavaScript value when dumping. Use `() => false`\n * for load-only tags.\n */\n identify: (data: any) => boolean\n\n /** Return the mapping entries to dump. Defaults to the identity function. */\n represent?: (data: any) => Map\n\n /** Return the tag name to emit for a prefix-matching tag. Defaults to `tagName`. */\n representTagName?: (data: any) => string\n}\n\n/**\n * Normalized mapping tag returned by {@link defineMappingTag}.\n *\n * @category Tags\n */\ninterface MappingTagDefinition extends Required> {\n /** Tag name used for schema lookup. */\n tagName: string\n\n /** YAML node kind handled by this tag. */\n nodeKind: 'mapping'\n\n /** Mapping tags do not participate in implicit scalar resolution. */\n implicit: false\n\n /** Whether the carrier is also the final result (`finalize` was omitted). */\n carrierIsResult: boolean\n}\n\n/**\n * Any normalized tag definition accepted by {@link Schema}.\n *\n * @category Tags\n */\ntype TagDefinition =\n | ScalarTagDefinition\n | SequenceTagDefinition\n | MappingTagDefinition\n\n/**\n * Create a normalized scalar tag definition.\n *\n * @category Tags\n */\nfunction defineScalarTag (tagName: string, options: ScalarTagOptions): ScalarTagDefinition {\n return {\n tagName,\n nodeKind: 'scalar',\n implicit: options.implicit ?? false,\n matchByTagPrefix: options.matchByTagPrefix ?? false,\n implicitFirstChars: options.implicitFirstChars ?? null,\n resolve: options.resolve,\n identify: options.identify,\n represent: options.represent ?? (data => String(data)),\n representTagName: options.representTagName ?? (() => tagName)\n }\n}\n\n/**\n * Create a normalized sequence tag definition.\n *\n * @category Tags\n */\nfunction defineSequenceTag (tagName: string, options: SequenceTagOptions): SequenceTagDefinition {\n const carrierIsResult = options.finalize === undefined\n\n return {\n tagName,\n nodeKind: 'sequence',\n implicit: false,\n matchByTagPrefix: options.matchByTagPrefix ?? false,\n create: options.create,\n addItem: options.addItem,\n finalize: options.finalize ?? (carrier => carrier as unknown as Result),\n carrierIsResult,\n identify: options.identify,\n represent: options.represent ?? (data => data as ArrayLike),\n representTagName: options.representTagName ?? (() => tagName)\n }\n}\n\n/**\n * Create a normalized mapping tag definition.\n *\n * @category Tags\n */\nfunction defineMappingTag (tagName: string, options: MappingTagOptions): MappingTagDefinition {\n const carrierIsResult = options.finalize === undefined\n\n return {\n tagName,\n nodeKind: 'mapping',\n implicit: false,\n matchByTagPrefix: options.matchByTagPrefix ?? false,\n create: options.create,\n addPair: options.addPair,\n has: options.has,\n keys: options.keys,\n get: options.get,\n finalize: options.finalize ?? (carrier => carrier as unknown as Result),\n carrierIsResult,\n identify: options.identify,\n represent: options.represent ?? (data => data as Map),\n representTagName: options.representTagName ?? (() => tagName)\n }\n}\n\nexport {\n NOT_RESOLVED,\n defineScalarTag,\n defineSequenceTag,\n defineMappingTag,\n\n type ScalarTagDefinition,\n type SequenceTagDefinition,\n type MappingTagDefinition,\n type TagDefinition,\n type ScalarTagOptions,\n type SequenceTagOptions,\n type MappingTagOptions\n}\n","import { defineScalarTag } from '../../tag.ts'\n\n/** @category Tags */\nconst strTag = defineScalarTag('tag:yaml.org,2002:str', {\n resolve: (source) => source,\n identify: (data) => typeof data === 'string'\n})\n\nexport { strTag }\n","import { defineScalarTag, NOT_RESOLVED } from '../../tag.ts'\n\nconst NULL_VALUES = ['', '~', 'null', 'Null', 'NULL']\n\n/** @category Tags */\nconst nullCoreTag = defineScalarTag('tag:yaml.org,2002:null', {\n implicit: true,\n // Superset of source.charAt(0) over all matched inputs: '' (empty), '~', 'null'/'Null'/'NULL'.\n implicitFirstChars: ['', '~', 'n', 'N'],\n resolve: (source) => {\n if (NULL_VALUES.indexOf(source) !== -1) return null\n\n return NOT_RESOLVED\n },\n identify: (object) => object === null,\n represent: () => 'null'\n})\n\nexport { nullCoreTag }\n","import { defineScalarTag, NOT_RESOLVED } from '../../tag.ts'\n\n/** @category Tags */\nconst nullJsonTag = defineScalarTag('tag:yaml.org,2002:null', {\n implicit: true,\n // Superset of source.charAt(0) over all matched inputs: null.\n implicitFirstChars: ['n'],\n resolve: (source, isExplicit) => {\n if (source === 'null' || (isExplicit && source === '')) return null\n\n return NOT_RESOLVED\n },\n identify: (object) => object === null,\n represent: () => 'null'\n})\n\nexport { nullJsonTag }\n","import { defineScalarTag, NOT_RESOLVED } from '../../tag.ts'\n\nconst NULL_VALUES = ['', '~', 'null', 'Null', 'NULL']\n\n/** @category Tags */\nconst nullYaml11Tag = defineScalarTag('tag:yaml.org,2002:null', {\n implicit: true,\n // Superset of source.charAt(0) over all matched inputs: '' (empty), '~', 'null'/'Null'/'NULL'.\n implicitFirstChars: ['', '~', 'n', 'N'],\n resolve: (source) => {\n if (NULL_VALUES.indexOf(source) !== -1) return null\n\n return NOT_RESOLVED\n },\n identify: (object) => object === null,\n represent: () => 'null'\n})\n\nexport { nullYaml11Tag }\n","import { defineScalarTag, NOT_RESOLVED } from '../../tag.ts'\n\nconst TRUE_VALUES = ['true', 'True', 'TRUE']\nconst FALSE_VALUES = ['false', 'False', 'FALSE']\n\n/** @category Tags */\nconst boolCoreTag = defineScalarTag('tag:yaml.org,2002:bool', {\n implicit: true,\n // Superset of source.charAt(0) over all matched inputs: true/True/TRUE, false/False/FALSE.\n implicitFirstChars: ['t', 'T', 'f', 'F'],\n resolve: (source) => {\n if (TRUE_VALUES.indexOf(source) !== -1) return true\n if (FALSE_VALUES.indexOf(source) !== -1) return false\n\n return NOT_RESOLVED\n },\n identify: (object) => Object.prototype.toString.call(object) === '[object Boolean]',\n represent: (object) => object ? 'true' : 'false'\n})\n\nexport { boolCoreTag }\n","import { defineScalarTag, NOT_RESOLVED } from '../../tag.ts'\n\nconst TRUE_VALUES = ['true']\nconst FALSE_VALUES = ['false']\n\n/** @category Tags */\nconst boolJsonTag = defineScalarTag('tag:yaml.org,2002:bool', {\n implicit: true,\n // Superset of source.charAt(0) over all matched inputs: true, false.\n implicitFirstChars: ['t', 'f'],\n resolve: (source) => {\n if (TRUE_VALUES.indexOf(source) !== -1) return true\n if (FALSE_VALUES.indexOf(source) !== -1) return false\n\n return NOT_RESOLVED\n },\n identify: (object) => Object.prototype.toString.call(object) === '[object Boolean]',\n represent: (object) => object ? 'true' : 'false'\n})\n\nexport { boolJsonTag }\n","import { defineScalarTag, NOT_RESOLVED } from '../../tag.ts'\n\nconst TRUE_VALUES = ['true', 'True', 'TRUE', 'y', 'Y', 'yes', 'Yes', 'YES', 'on', 'On', 'ON']\nconst FALSE_VALUES = ['false', 'False', 'FALSE', 'n', 'N', 'no', 'No', 'NO', 'off', 'Off', 'OFF']\n\n/** @category Tags */\nconst boolYaml11Tag = defineScalarTag('tag:yaml.org,2002:bool', {\n implicit: true,\n // Superset of source.charAt(0) over all matched inputs.\n implicitFirstChars: ['y', 'Y', 'n', 'N', 't', 'T', 'f', 'F', 'o', 'O'],\n resolve: (source) => {\n if (TRUE_VALUES.indexOf(source) !== -1) return true\n if (FALSE_VALUES.indexOf(source) !== -1) return false\n\n return NOT_RESOLVED\n },\n identify: (object) => Object.prototype.toString.call(object) === '[object Boolean]',\n represent: (object) => object ? 'true' : 'false'\n})\n\nexport { boolYaml11Tag }\n","import { defineScalarTag, NOT_RESOLVED } from '../../tag.ts'\n\n// YAML 1.2 Core schema implicit resolution:\n// [-+]? [0-9]+ | 0o [0-7]+ | 0x [0-9a-fA-F]+\nconst YAML_INTEGER_IMPLICIT_PATTERN = new RegExp(\n // 0o123\n '^(?:0o[0-7]+' +\n // 0x1A\n '|0x[0-9a-fA-F]+' +\n // 12345\n '|[-+]?[0-9]+)$')\n\n// Explicit `!!int` validation is separate from Core implicit resolution.\nconst YAML_INTEGER_EXPLICIT_PATTERN = new RegExp(\n // 0b1010\n '^(?:[-+]?0b[0-1]+' +\n // 0o123\n '|[-+]?0o[0-7]+' +\n // 0x1A\n '|[-+]?0x[0-9a-fA-F]+' +\n // 12345\n '|[-+]?[0-9]+)$')\n\nfunction parseYamlInteger (source: string) {\n let value = source\n let sign = 1\n\n if (value[0] === '-' || value[0] === '+') {\n if (value[0] === '-') sign = -1\n value = value.slice(1)\n }\n\n if (value.startsWith('0b')) return sign * parseInt(value.slice(2), 2)\n if (value.startsWith('0o')) return sign * parseInt(value.slice(2), 8)\n if (value.startsWith('0x')) return sign * parseInt(value.slice(2), 16)\n\n return sign * parseInt(value, 10)\n}\n\nfunction resolveYamlInteger (source: string, isExplicit: boolean) {\n if (isExplicit) {\n if (!YAML_INTEGER_EXPLICIT_PATTERN.test(source)) return NOT_RESOLVED\n } else if (!YAML_INTEGER_IMPLICIT_PATTERN.test(source)) {\n return NOT_RESOLVED\n }\n\n const result = parseYamlInteger(source)\n return Number.isFinite(result) ? result : NOT_RESOLVED\n}\n\n/** @category Tags */\nconst intCoreTag = defineScalarTag('tag:yaml.org,2002:int', {\n implicit: true,\n // Superset of source.charAt(0) over all matched inputs: optional sign + decimal digit.\n implicitFirstChars: ['-', '+', ...'0123456789'],\n resolve: resolveYamlInteger,\n identify: (object) =>\n // No ancient boxed numbers support\n Number.isInteger(object) &&\n // Negative zero => !!float\n !Object.is(object, -0) &&\n // Exponential form => !!float, round-trip for !!int 1e21 will be broken\n object.toString(10).indexOf('e') < 0,\n represent: (object: number) => object.toString(10)\n})\n\nexport { intCoreTag }\n","import { defineScalarTag, NOT_RESOLVED } from '../../tag.ts'\n\n// YAML 1.2 JSON schema implicit resolution:\n// -? ( 0 | [1-9] [0-9]* )\nconst YAML_INTEGER_IMPLICIT_PATTERN = new RegExp(\n '^-?(?:0|[1-9][0-9]*)$')\n\n// Explicit `!!int` validation is separate from JSON implicit resolution.\nconst YAML_INTEGER_EXPLICIT_PATTERN = new RegExp(\n // 0b1010\n '^(?:[-+]?0b[0-1]+' +\n // 0o123\n '|[-+]?0o[0-7]+' +\n // 0x1A\n '|[-+]?0x[0-9a-fA-F]+' +\n // 12345\n '|[-+]?[0-9]+)$')\n\nfunction parseYamlInteger (source: string) {\n let value = source\n let sign = 1\n\n if (value[0] === '-' || value[0] === '+') {\n if (value[0] === '-') sign = -1\n value = value.slice(1)\n }\n\n if (value.startsWith('0b')) return sign * parseInt(value.slice(2), 2)\n if (value.startsWith('0o')) return sign * parseInt(value.slice(2), 8)\n if (value.startsWith('0x')) return sign * parseInt(value.slice(2), 16)\n\n return sign * parseInt(value, 10)\n}\n\nfunction resolveYamlInteger (source: string, isExplicit: boolean) {\n if (isExplicit) {\n if (!YAML_INTEGER_EXPLICIT_PATTERN.test(source)) return NOT_RESOLVED\n } else if (!YAML_INTEGER_IMPLICIT_PATTERN.test(source)) {\n return NOT_RESOLVED\n }\n\n const result = parseYamlInteger(source)\n return Number.isFinite(result) ? result : NOT_RESOLVED\n}\n\n/** @category Tags */\nconst intJsonTag = defineScalarTag('tag:yaml.org,2002:int', {\n implicit: true,\n // Superset of source.charAt(0) over all matched inputs: optional '-' or digit.\n implicitFirstChars: ['-', ...'0123456789'],\n resolve: resolveYamlInteger,\n identify: (object) =>\n // No ancient boxed numbers support\n Number.isInteger(object) &&\n // Negative zero => !!float\n !Object.is(object, -0) &&\n // Exponential form => !!float, round-trip for !!int 1e21 will be broken\n object.toString(10).indexOf('e') < 0,\n represent: (object: number) => object.toString(10)\n})\n\nexport { intJsonTag }\n","import { defineScalarTag, NOT_RESOLVED } from '../../tag.ts'\n\nconst YAML_INTEGER_PATTERN = new RegExp(\n // 0b1010\n '^(?:[-+]?0b[0-1_]+' +\n // 0123\n '|[-+]?0[0-7_]+' +\n // 0x1A\n '|[-+]?0x[0-9a-fA-F_]+' +\n // 1:23\n '|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+' +\n // 12345\n '|[-+]?(?:0|[1-9][0-9_]*))$')\n\nfunction parseYamlInteger (source: string) {\n let value = source.replace(/_/g, '')\n let sign = 1\n\n if (value[0] === '-' || value[0] === '+') {\n if (value[0] === '-') sign = -1\n value = value.slice(1)\n }\n\n if (value.startsWith('0b')) return sign * parseInt(value.slice(2), 2)\n if (value.startsWith('0x')) return sign * parseInt(value.slice(2), 16)\n\n if (value.includes(':')) {\n let result = 0\n for (const part of value.split(':')) result = result * 60 + Number(part)\n return sign * result\n }\n\n if (value !== '0' && value[0] === '0') return sign * parseInt(value, 8)\n\n return sign * parseInt(value, 10)\n}\n\nfunction resolveYamlInteger (source: string) {\n if (!YAML_INTEGER_PATTERN.test(source)) return NOT_RESOLVED\n\n const result = parseYamlInteger(source)\n return Number.isFinite(result) ? result : NOT_RESOLVED\n}\n\n/** @category Tags */\nconst intYaml11Tag = defineScalarTag('tag:yaml.org,2002:int', {\n implicit: true,\n // Superset of source.charAt(0) over all matched inputs: optional sign + decimal digit.\n implicitFirstChars: ['-', '+', ...'0123456789'],\n resolve: resolveYamlInteger,\n identify: (object) =>\n // No ancient boxed numbers support\n Number.isInteger(object) &&\n // Negative zero => !!float\n !Object.is(object, -0) &&\n // Exponential form => !!float, round-trip for !!int 1e21 will be broken\n object.toString(10).indexOf('e') < 0,\n represent: (object: number) => object.toString(10)\n})\n\nexport { intYaml11Tag }\n","import { defineScalarTag, NOT_RESOLVED } from '../../tag.ts'\n\nconst YAML_FLOAT_PATTERN = new RegExp(\n // 2.5e4, 2.5 and integers\n '^(?:[-+]?[0-9]+(?:\\\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?' +\n // .2e4, .2\n '|[-+]?\\\\.[0-9]+(?:[eE][-+]?[0-9]+)?' +\n // .inf\n '|[-+]?\\\\.(?:inf|Inf|INF)' +\n // .nan\n '|\\\\.(?:nan|NaN|NAN))$')\n\nconst YAML_FLOAT_SPECIAL_PATTERN = new RegExp(\n '^(?:' +\n // .inf\n '[-+]?\\\\.(?:inf|Inf|INF)' +\n // .nan\n '|\\\\.(?:nan|NaN|NAN))$')\n\nfunction resolveYamlFloat (source: string) {\n if (!YAML_FLOAT_PATTERN.test(source)) return NOT_RESOLVED\n\n let value = source.toLowerCase()\n const sign = value[0] === '-' ? -1 : 1\n\n if ('+-'.includes(value[0])) value = value.slice(1)\n\n if (value === '.inf') return sign === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY\n if (value === '.nan') return NaN\n\n const result = sign * parseFloat(value)\n\n if (Number.isFinite(result) || YAML_FLOAT_SPECIAL_PATTERN.test(source)) return result\n return NOT_RESOLVED\n}\n\nfunction representYamlFloat (object: number) {\n if (isNaN(object)) return '.nan'\n if (object === Number.POSITIVE_INFINITY) return '.inf'\n if (object === Number.NEGATIVE_INFINITY) return '-.inf'\n if (Object.is(object, -0)) return '-0.0'\n\n const result = object.toString(10)\n return /^[-+]?[0-9]+e/.test(result) ? result.replace('e', '.e') : result\n}\n\n/** @category Tags */\nconst floatCoreTag = defineScalarTag('tag:yaml.org,2002:float', {\n implicit: true,\n // Superset of source.charAt(0) over all matched inputs: optional sign, '.', or digit\n // ('.inf'/'.nan' start with '.').\n implicitFirstChars: ['-', '+', '.', ...'0123456789'],\n resolve: resolveYamlFloat,\n identify: (object) =>\n // No ancient boxed numbers support\n typeof object === 'number' &&\n (\n // We land here all numbers, not handled (declined) by !!int `.identify`\n // The same condition as for !!int, but reversed.\n\n // Filter out integers...\n !Number.isInteger(object) ||\n // but allow negative zero\n Object.is(object, -0) ||\n // and integers with exponential form\n object.toString(10).indexOf('e') >= 0\n ),\n represent: representYamlFloat\n})\n\nexport { floatCoreTag }\n","import { defineScalarTag, NOT_RESOLVED } from '../../tag.ts'\n\n// YAML 1.2 JSON schema implicit resolution:\n// -? ( 0 | [1-9] [0-9]* ) ( \\. [0-9]* )? ( [eE] [-+]? [0-9]+ )?\nconst YAML_FLOAT_IMPLICIT_PATTERN = new RegExp(\n // 2.5e4, 2.5 and integers\n '^-?(?:0|[1-9][0-9]*)(?:\\\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$')\n\n// Explicit `!!float` validation is separate from JSON implicit resolution.\nconst YAML_FLOAT_EXPLICIT_PATTERN = new RegExp(\n // 2.5e4, 2.5 and integers\n '^(?:[-+]?[0-9]+(?:\\\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?' +\n // .2e4, .2\n '|[-+]?\\\\.[0-9]+(?:[eE][-+]?[0-9]+)?' +\n // .inf\n '|[-+]?\\\\.(?:inf|Inf|INF)' +\n // .nan\n '|\\\\.(?:nan|NaN|NAN))$')\n\nfunction resolveYamlFloat (source: string, isExplicit: boolean) {\n if (isExplicit) {\n if (!YAML_FLOAT_EXPLICIT_PATTERN.test(source)) return NOT_RESOLVED\n\n let value = source.toLowerCase()\n const sign = value[0] === '-' ? -1 : 1\n\n if ('+-'.includes(value[0])) value = value.slice(1)\n\n if (value === '.inf') return sign === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY\n if (value === '.nan') return NaN\n\n const result = sign * parseFloat(value)\n return Number.isFinite(result) ? result : NOT_RESOLVED\n }\n\n if (!YAML_FLOAT_IMPLICIT_PATTERN.test(source)) return NOT_RESOLVED\n\n const result = Number(source)\n\n if (Number.isFinite(result)) return result\n return NOT_RESOLVED\n}\n\nfunction representYamlFloat (object: number) {\n if (isNaN(object)) return '.nan'\n if (object === Number.POSITIVE_INFINITY) return '.inf'\n if (object === Number.NEGATIVE_INFINITY) return '-.inf'\n if (Object.is(object, -0)) return '-0.0'\n\n const result = object.toString(10)\n return /^[-+]?[0-9]+e/.test(result) ? result.replace('e', '.e') : result\n}\n\n/** @category Tags */\nconst floatJsonTag = defineScalarTag('tag:yaml.org,2002:float', {\n implicit: true,\n // Superset of source.charAt(0) over all matched inputs: optional '-' or digit.\n implicitFirstChars: ['-', ...'0123456789'],\n resolve: resolveYamlFloat,\n identify: (object) =>\n // No ancient boxed numbers support\n typeof object === 'number' &&\n (\n // We land here all numbers, not handled (declined) by !!int `.identify`\n // The same condition as for !!int, but reversed.\n\n // Filter out integers...\n !Number.isInteger(object) ||\n // but allow negative zero\n Object.is(object, -0) ||\n // and integers with exponential form\n object.toString(10).indexOf('e') >= 0\n ),\n represent: representYamlFloat\n})\n\nexport { floatJsonTag }\n","import { defineScalarTag, NOT_RESOLVED } from '../../tag.ts'\n\nconst YAML_FLOAT_PATTERN = new RegExp(\n // 2.5e4, 2.5 and integers\n '^(?:[-+]?(?:(?:[0-9][0-9_]*)?\\\\.[0-9_]*)(?:[eE][-+][0-9]+)?' +\n // 190:20:30.15\n '|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\\\.[0-9_]*' +\n // .inf\n '|[-+]?\\\\.(?:inf|Inf|INF)' +\n // .nan\n '|\\\\.(?:nan|NaN|NAN))$')\n\nconst YAML_FLOAT_SPECIAL_PATTERN = new RegExp(\n '^(?:' +\n // .inf\n '[-+]?\\\\.(?:inf|Inf|INF)' +\n // .nan\n '|\\\\.(?:nan|NaN|NAN))$')\n\nfunction resolveYamlFloat (source: string) {\n if (!YAML_FLOAT_PATTERN.test(source)) return NOT_RESOLVED\n\n let value = source.toLowerCase().replace(/_/g, '')\n const sign = value[0] === '-' ? -1 : 1\n\n if ('+-'.includes(value[0])) value = value.slice(1)\n\n if (value === '.inf') return sign === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY\n if (value === '.nan') return NaN\n\n let result = 0\n\n if (value.includes(':')) {\n for (const part of value.split(':')) result = result * 60 + Number(part)\n result *= sign\n } else {\n result = sign * parseFloat(value)\n }\n\n if (Number.isFinite(result) || YAML_FLOAT_SPECIAL_PATTERN.test(source)) return result\n return NOT_RESOLVED\n}\n\nfunction representYamlFloat (object: number) {\n if (isNaN(object)) return '.nan'\n if (object === Number.POSITIVE_INFINITY) return '.inf'\n if (object === Number.NEGATIVE_INFINITY) return '-.inf'\n if (Object.is(object, -0)) return '-0.0'\n\n const result = object.toString(10)\n return /^[-+]?[0-9]+e/.test(result) ? result.replace('e', '.e') : result\n}\n\n/** @category Tags */\nconst floatYaml11Tag = defineScalarTag('tag:yaml.org,2002:float', {\n implicit: true,\n // Superset of source.charAt(0) over all matched inputs: optional sign, '.', or digit\n // ('.inf'/'.nan' start with '.').\n implicitFirstChars: ['-', '+', '.', ...'0123456789'],\n resolve: resolveYamlFloat,\n identify: (object) =>\n // No ancient boxed numbers support\n typeof object === 'number' &&\n (\n // We land here all numbers, not handled (declined) by !!int `.identify`\n // The same condition as for !!int, but reversed.\n\n // Filter out integers...\n !Number.isInteger(object) ||\n // but allow negative zero\n Object.is(object, -0) ||\n // and integers with exponential form\n object.toString(10).indexOf('e') >= 0\n ),\n represent: representYamlFloat\n})\n\nexport { floatYaml11Tag }\n","import { defineScalarTag, NOT_RESOLVED } from '../../tag.ts'\n\n/**\n * Enables merge keys in {@link CORE_SCHEMA} when added with\n * {@link Schema.withTags}.\n *\n * @category Tags\n */\nconst mergeTag = defineScalarTag('tag:yaml.org,2002:merge', {\n implicit: true,\n // source.charAt(0) over matched implicit inputs: '<' ('<<').\n implicitFirstChars: ['<'],\n // Merge semantics live in the tag, not in the value: the constructor acts on\n // a key tagged `!!merge`, so `<<` anywhere else is just this string.\n resolve: (source, isExplicit) => {\n if (source === '<<' || (isExplicit && source === '')) return '<<'\n return NOT_RESOLVED\n },\n identify: () => false\n})\n\nexport { mergeTag }\n","import { defineScalarTag, NOT_RESOLVED } from '../../tag.ts'\n\nconst BASE64_PATTERN = /^[A-Za-z0-9+/]*={0,2}$/\n\nfunction resolveYamlBinary (source: string) {\n // Strip allowed whitespace first, so validation stays a plain base64 check.\n const input = source.replace(/\\s/g, '')\n if (input.length % 4 !== 0 || !BASE64_PATTERN.test(input)) return NOT_RESOLVED\n\n const binary = atob(input)\n const result = new Uint8Array(binary.length)\n for (let index = 0; index < binary.length; index++) {\n result[index] = binary.charCodeAt(index)\n }\n return result\n}\n\nfunction representYamlBinary (object: Uint8Array) {\n let binary = ''\n for (let index = 0; index < object.length; index++) {\n binary += String.fromCharCode(object[index])\n }\n return btoa(binary)\n}\n\n/**\n * The `!!binary` tag, represented as a `Uint8Array`.\n *\n * @category Tags\n */\nconst binaryTag = defineScalarTag('tag:yaml.org,2002:binary', {\n resolve: resolveYamlBinary,\n identify: (object) => Object.prototype.toString.call(object) === '[object Uint8Array]',\n represent: representYamlBinary\n})\n\nexport { binaryTag }\n","import { defineScalarTag, NOT_RESOLVED } from '../../tag.ts'\n\nconst YAML_DATE_REGEXP = new RegExp(\n '^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$')\n\nconst YAML_TIMESTAMP_REGEXP = new RegExp(\n '^([0-9][0-9][0-9][0-9])' +\n '-([0-9][0-9]?)' +\n '-([0-9][0-9]?)' +\n '(?:[Tt]|[ \\\\t]+)' +\n '([0-9][0-9]?)' +\n ':([0-9][0-9])' +\n ':([0-9][0-9])' +\n '(?:\\\\.([0-9]*))?' +\n '(?:[ \\\\t]*(Z|([-+])([0-9][0-9]?)' +\n '(?::([0-9][0-9]))?))?$')\n\nfunction makeUtcDate (\n year: number,\n month: number,\n day: number,\n hour = 0,\n minute = 0,\n second = 0,\n fraction = 0\n) {\n const date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction))\n\n // Date.UTC() treats years 0..99 as 1900..1999. Restore the parsed YAML year\n // before validating calendar normalization, e.g. reject 0001-02-29.\n date.setUTCFullYear(year, month, day)\n\n return date\n}\n\nfunction resolveYamlTimestamp (source: string) {\n let match = YAML_DATE_REGEXP.exec(source)\n if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(source)\n if (match === null) return NOT_RESOLVED\n\n const year = +(match[1])\n const month = +(match[2]) - 1\n const day = +(match[3])\n\n // Date-only form (`YYYY-MM-DD`) has no time captures.\n if (!match[4]) {\n const date = makeUtcDate(year, month, day)\n // Reject dates that JS would normalize, e.g. 2023-02-29 -> 2023-03-01.\n if (date.getUTCFullYear() !== year || date.getUTCMonth() !== month || date.getUTCDate() !== day) {\n return NOT_RESOLVED\n }\n return date\n }\n\n const hour = +(match[4])\n const minute = +(match[5])\n const second = +(match[6])\n let fraction = 0\n\n // Reject times that JS would normalize into the next minute/hour/day.\n if (hour > 23 || minute > 59 || second > 59) return NOT_RESOLVED\n\n if (match[7]) {\n let value = match[7].slice(0, 3)\n while (value.length < 3) value += '0'\n fraction = +value\n }\n\n const date = makeUtcDate(year, month, day, hour, minute, second, fraction)\n\n // Reject invalid calendar dates before applying timezone offset.\n if (date.getUTCFullYear() !== year || date.getUTCMonth() !== month || date.getUTCDate() !== day) {\n return NOT_RESOLVED\n }\n\n if (match[9]) {\n const offsetHour = +(match[10])\n const offsetMinute = +(match[11] || 0)\n // Reject timezone offsets that JS date arithmetic would otherwise accept.\n if (offsetHour > 23 || offsetMinute > 59) return NOT_RESOLVED\n\n const offset = (offsetHour * 60 + offsetMinute) * 60000\n date.setTime(date.getTime() - (match[9] === '-' ? -offset : offset))\n }\n\n return date\n}\n\n/**\n * The YAML 1.1 `!!timestamp` tag, represented as a JavaScript `Date`.\n *\n * @category Tags\n */\nconst timestampTag = defineScalarTag('tag:yaml.org,2002:timestamp', {\n implicit: true,\n // Both patterns start with a 4-digit year, so source.charAt(0) is always a digit.\n implicitFirstChars: [...'0123456789'],\n resolve: resolveYamlTimestamp,\n identify: (object) => object instanceof Date,\n represent: (object: Date) => object.toISOString()\n})\n\nexport { timestampTag }\n","import { defineSequenceTag } from '../../tag.ts'\n\n/** @category Tags */\nconst seqTag = defineSequenceTag('tag:yaml.org,2002:seq', {\n create: () => [] as unknown[],\n addItem: (container, item) => {\n container.push(item)\n },\n identify: Array.isArray\n})\n\nexport { seqTag }\n","function isPlainObject (data: unknown): boolean {\n if (data === null || typeof data !== 'object' || Array.isArray(data)) return false\n const prototype = Object.getPrototypeOf(data)\n return prototype === null || prototype === Object.prototype\n}\n\n// Project `object` onto `keys`. Absent keys are skipped (so the result can be\n// safely spread over defaults without clobbering them with `undefined`), hence\n// the `Partial` return.\nfunction pick (object: T, keys: readonly K[]): Partial> {\n const result: Partial> = {}\n for (const key of keys) {\n if (object[key] !== undefined) result[key] = object[key]\n }\n return result\n}\n\nexport {\n isPlainObject,\n pick\n}\n","import { defineSequenceTag } from '../../tag.ts'\nimport { isPlainObject } from '../../common/object.ts'\n\n/**\n * Provided only for YAML 1.1 compatibility and supported by the loader only.\n * JavaScript has no dedicated class to represent this type, so it cannot be\n * identified and dumped.\n *\n * ```yaml\n * !!omap\n * - one: 1\n * - two: 2\n * ```\n *\n * is loaded as\n *\n * ```javascript\n * [\n * { one: 1 },\n * { two: 2 }\n * ]\n * ```\n *\n * @category Tags\n */\nconst omapTag = defineSequenceTag('tag:yaml.org,2002:omap', {\n create: (): { list: unknown[]; seen: Set } => ({ list: [], seen: new Set() }),\n addItem: (carrier, item) => {\n let key: unknown\n\n if (item instanceof Map) {\n if (item.size !== 1) return 'cannot resolve an ordered map item'\n key = item.keys().next().value\n } else if (isPlainObject(item)) {\n const itemKeys = Object.keys(item as Record)\n if (itemKeys.length !== 1) return 'cannot resolve an ordered map item'\n key = itemKeys[0]\n } else {\n return 'cannot resolve an ordered map item'\n }\n\n if (carrier.seen.has(key)) return 'duplicate key in ordered map'\n carrier.seen.add(key)\n carrier.list.push(item)\n return ''\n },\n finalize: (carrier): unknown[] => carrier.list,\n identify: () => false\n})\n\nexport { omapTag }\n","import { defineSequenceTag } from '../../tag.ts'\n\n/**\n * Provided only for YAML 1.1 compatibility and supported by the loader only.\n * JavaScript has no dedicated class to represent this type, so it cannot be\n * identified and dumped.\n *\n * ```yaml\n * !!pairs\n * - one: 1\n * - two: 2\n * ```\n *\n * is loaded as\n *\n * ```javascript\n * [\n * ['one', 1],\n * ['two', 2]\n * ]\n * ```\n *\n * @category Tags\n */\nconst pairsTag = defineSequenceTag('tag:yaml.org,2002:pairs', {\n create: () => [] as [unknown, unknown][],\n addItem: (container, item) => {\n if (item instanceof Map) {\n if (item.size !== 1) return 'cannot resolve a pairs item'\n\n container.push(item.entries().next().value!)\n return ''\n }\n\n if (Object.prototype.toString.call(item) !== '[object Object]') {\n return 'cannot resolve a pairs item'\n }\n\n const object = item as Record\n const keys = Object.keys(object)\n\n if (keys.length !== 1) return 'cannot resolve a pairs item'\n\n container.push([keys[0], object[keys[0]]])\n return ''\n },\n identify: () => false\n})\n\nexport { pairsTag }\n","import { defineMappingTag } from '../../tag.ts'\nimport { isPlainObject } from '../../common/object.ts'\n\n/**\n * This is the default mapping implementation. It uses `{}` objects and has only\n * partial functionality due to language limitations. This choice was made\n * because users expect to get JavaScript objects, and it was left unchanged to\n * avoid too many breaking changes in the v5 release.\n *\n * Side effects:\n *\n * - `Object.hasOwn()` checks or `for...of` loops are required for safe use (to\n * avoid falling through to prototypes).\n * - Only scalar string keys are supported properly.\n * - Other scalar keys, such as `null` and numbers, are converted to strings.\n * This is historical behaviour, and it can cause side effects such as\n * problems with `!!merge`.\n *\n * Note that non-string scalar keys may be deprecated in future versions.\n *\n * Ideally, use {@link realMapTag} instead.\n *\n * @category Tags\n */\nconst mapTag = defineMappingTag('tag:yaml.org,2002:map', {\n create: (): Record => ({}),\n identify: isPlainObject,\n // Dump side: wrap the plain object into the canonical `Map` form the writer\n // walks. Shallow — keys/values stay references to the originals.\n represent: (o: Record) => {\n const map = new Map()\n for (const key of Object.keys(o)) map.set(key, o[key])\n return map\n },\n addPair: (container, key, value) => {\n if (key !== null && typeof key === 'object') {\n return 'object-based map does not support complex keys'\n }\n const normalizedKey = String(key)\n if (normalizedKey === '__proto__') {\n // Define as an own data property so a literal `__proto__` key stays data\n // and never invokes the prototype setter.\n Object.defineProperty(container, normalizedKey, {\n value, enumerable: true, configurable: true, writable: true\n })\n } else {\n container[normalizedKey] = value\n }\n return ''\n },\n // hasOwn, not `in`: a plain object inherits `toString` and friends.\n has: (container, key) => {\n if (key !== null && typeof key === 'object') return false\n return Object.prototype.hasOwnProperty.call(container, String(key))\n },\n keys: (container) => Object.keys(container),\n get: (container, key) => {\n const normalizedKey = String(key)\n // key is from `keys()` only. Strong check is not needed, but leave for sure.\n if (!Object.prototype.hasOwnProperty.call(container, normalizedKey)) return null\n return container[normalizedKey]\n }\n})\n\nexport { mapTag, isPlainObject }\n","import { defineMappingTag } from '../../tag.ts'\n\n/**\n * The YAML 1.1 `!!set` tag, represented as a JavaScript `Set`.\n *\n * @category Tags\n */\nconst setTag = defineMappingTag('tag:yaml.org,2002:set', {\n create: () => new Set(),\n identify: (data) => data instanceof Set,\n represent: (data: Set) => {\n const map = new Map()\n for (const key of data) map.set(key, null)\n return map\n },\n addPair: (container, key, value) => {\n if (value !== null) return 'cannot resolve a set item'\n container.add(key)\n return ''\n },\n has: (container, key) => container.has(key),\n keys: (container) => container.keys(),\n get: () => null\n})\n\nexport { setTag }\n","import {\n NOT_RESOLVED,\n type MappingTagDefinition,\n type ScalarTagDefinition,\n type SequenceTagDefinition,\n type TagDefinition\n} from './tag.ts'\nimport { strTag } from './tag/scalar/str.ts'\nimport { nullCoreTag } from './tag/scalar/null_core.ts'\nimport { nullJsonTag } from './tag/scalar/null_json.ts'\nimport { nullYaml11Tag } from './tag/scalar/null_yaml11.ts'\nimport { boolCoreTag } from './tag/scalar/bool_core.ts'\nimport { boolJsonTag } from './tag/scalar/bool_json.ts'\nimport { boolYaml11Tag } from './tag/scalar/bool_yaml11.ts'\nimport { intCoreTag } from './tag/scalar/int_core.ts'\nimport { intJsonTag } from './tag/scalar/int_json.ts'\nimport { intYaml11Tag } from './tag/scalar/int_yaml11.ts'\nimport { floatCoreTag } from './tag/scalar/float_core.ts'\nimport { floatJsonTag } from './tag/scalar/float_json.ts'\nimport { floatYaml11Tag } from './tag/scalar/float_yaml11.ts'\nimport { mergeTag } from './tag/scalar/merge.ts'\nimport { binaryTag } from './tag/scalar/binary.ts'\nimport { timestampTag } from './tag/scalar/timestamp.ts'\nimport { seqTag } from './tag/sequence/seq.ts'\nimport { omapTag } from './tag/sequence/omap.ts'\nimport { pairsTag } from './tag/sequence/pairs.ts'\nimport { mapTag } from './tag/mapping/map.ts'\nimport { setTag } from './tag/mapping/set.ts'\n\ninterface TagDefinitionMap {\n scalar: Record\n sequence: Record\n mapping: Record\n}\n\ninterface TagDefinitionListMap {\n scalar: ScalarTagDefinition[]\n sequence: SequenceTagDefinition[]\n mapping: MappingTagDefinition[]\n}\n\nfunction createTagDefinitionMap (): TagDefinitionMap {\n return {\n scalar: Object.create(null),\n sequence: Object.create(null),\n mapping: Object.create(null)\n }\n}\n\nfunction createTagDefinitionListMap (): TagDefinitionListMap {\n return {\n scalar: [],\n sequence: [],\n mapping: []\n }\n}\n\nfunction compileTags (tags: readonly TagDefinition[]) {\n const result: TagDefinition[] = []\n\n for (const tag of tags) {\n let index = result.length\n\n for (let previousIndex = 0; previousIndex < result.length; previousIndex++) {\n const previous = result[previousIndex]\n\n if (previous.nodeKind === tag.nodeKind &&\n previous.tagName === tag.tagName &&\n previous.matchByTagPrefix === tag.matchByTagPrefix) {\n index = previousIndex\n break\n }\n }\n\n result[index] = tag\n }\n\n return result\n}\n\n/**\n * Controls tag resolution when loading and type selection when dumping.\n *\n * @category Schemas\n */\nclass Schema {\n readonly tags: readonly TagDefinition[]\n /** @internal */\n readonly implicitScalarTags: readonly ScalarTagDefinition[]\n\n /**\n * Dispatch implicit scalar resolvers by `source.charAt(0)`. Each bucket holds\n * the resolvers that may match that key, in schema order; a key absent from\n * the map uses\n * {@link Schema.implicitScalarAnyFirstChar}\n * (resolvers that declared no first-char constraint, so they apply to any\n * first character).\n */\n private readonly implicitScalarByFirstChar: ReadonlyMap\n private readonly implicitScalarAnyFirstChar: readonly ScalarTagDefinition[]\n\n /**\n * The default scalar tag (`!!str`), resolved once so the composer's fallback\n * for unresolved plain scalars avoids a keyed lookup per scalar.\n *\n * @internal\n */\n readonly defaultScalarTag: ScalarTagDefinition\n\n /**\n * The default container tags (`!!seq` / `!!map`), used by the dumper: when a\n * value is identified by its default tag, the tag is implicit and not\n * printed. Undefined if the schema does not define them (then such values\n * can't be dumped).\n *\n * @internal\n */\n readonly defaultSequenceTag: SequenceTagDefinition | undefined\n /** @internal */\n readonly defaultMappingTag: MappingTagDefinition | undefined\n private readonly exact: TagDefinitionMap\n private readonly prefix: TagDefinitionListMap\n\n constructor (tags: readonly TagDefinition[]) {\n const compiledTags = compileTags(tags)\n const implicitScalarTags: ScalarTagDefinition[] = []\n const exact = createTagDefinitionMap()\n const prefix = createTagDefinitionListMap()\n\n for (const tag of compiledTags) {\n if (tag.nodeKind === 'scalar' && tag.implicit) {\n if (tag.matchByTagPrefix) {\n throw new Error('Implicit scalar tags cannot match by tag prefix')\n }\n\n implicitScalarTags.push(tag)\n }\n\n switch (tag.nodeKind) {\n case 'scalar':\n if (tag.matchByTagPrefix) prefix.scalar.push(tag)\n else exact.scalar[tag.tagName] = tag\n break\n case 'sequence':\n if (tag.matchByTagPrefix) prefix.sequence.push(tag)\n else exact.sequence[tag.tagName] = tag\n break\n case 'mapping':\n if (tag.matchByTagPrefix) prefix.mapping.push(tag)\n else exact.mapping[tag.tagName] = tag\n break\n }\n }\n\n const implicitScalarAnyFirstChar = implicitScalarTags.filter(tag => tag.implicitFirstChars === null)\n\n const keys = new Set()\n for (const tag of implicitScalarTags) {\n if (tag.implicitFirstChars !== null) {\n for (const key of tag.implicitFirstChars) keys.add(key)\n }\n }\n\n const implicitScalarByFirstChar = new Map()\n for (const key of keys) {\n implicitScalarByFirstChar.set(key, implicitScalarTags.filter(tag =>\n tag.implicitFirstChars === null || tag.implicitFirstChars.indexOf(key) !== -1))\n }\n\n const defaultScalarTag = exact.scalar['tag:yaml.org,2002:str']\n if (!defaultScalarTag) throw new Error('schema does not define the default scalar tag (tag:yaml.org,2002:str)')\n\n this.tags = compiledTags\n this.implicitScalarTags = implicitScalarTags\n this.implicitScalarByFirstChar = implicitScalarByFirstChar\n this.implicitScalarAnyFirstChar = implicitScalarAnyFirstChar\n this.defaultScalarTag = defaultScalarTag\n this.defaultSequenceTag = exact.sequence['tag:yaml.org,2002:seq']\n this.defaultMappingTag = exact.mapping['tag:yaml.org,2002:map']\n this.exact = exact\n this.prefix = prefix\n }\n\n /** @internal */\n lookupScalarTag (tagName: string): ScalarTagDefinition | undefined {\n const exactTag = this.exact.scalar[tagName]\n if (exactTag) return exactTag\n\n for (const tag of this.prefix.scalar) {\n if (tagName.startsWith(tag.tagName)) return tag\n }\n\n return undefined\n }\n\n /** @internal */\n lookupSequenceTag (tagName: string): SequenceTagDefinition | undefined {\n const exactTag = this.exact.sequence[tagName]\n if (exactTag) return exactTag\n\n for (const tag of this.prefix.sequence) {\n if (tagName.startsWith(tag.tagName)) return tag\n }\n\n return undefined\n }\n\n /** @internal */\n lookupMappingTag (tagName: string): MappingTagDefinition | undefined {\n const exactTag = this.exact.mapping[tagName]\n if (exactTag) return exactTag\n\n for (const tag of this.prefix.mapping) {\n if (tagName.startsWith(tag.tagName)) return tag\n }\n\n return undefined\n }\n\n /** @internal */\n resolveImplicitScalarTag (source: string): { value: unknown, tag: ScalarTagDefinition } {\n const candidates = this.implicitScalarByFirstChar.get(source.charAt(0)) ??\n this.implicitScalarAnyFirstChar\n\n for (const tag of candidates) {\n const value = tag.resolve(source, false, tag.tagName)\n if (value !== NOT_RESOLVED) return { value, tag }\n }\n\n const tag = this.defaultScalarTag\n return { value: tag.resolve(source, false, tag.tagName), tag }\n }\n\n /**\n * Creates a new schema with the specified tags added. If a tag already\n * exists, it is replaced by the specified tag.\n *\n * @example\n *\n * ```javascript\n * import { CORE_SCHEMA, mergeTag, realMapTag } from 'js-yaml'\n *\n * const schema = CORE_SCHEMA.withTags(mergeTag, realMapTag)\n * ```\n */\n withTags (...tags: Array): Schema {\n let flatTags: TagDefinition[] = []\n for (const tag of tags) flatTags = flatTags.concat(tag)\n\n return new Schema([...this.tags, ...flatTags])\n }\n}\n\n/**\n * The YAML 1.2 Failsafe Schema: strings, sequences, and mappings.\n *\n * @category Schemas\n */\nconst FAILSAFE_SCHEMA = new Schema([\n strTag,\n seqTag,\n mapTag\n])\n\n/**\n * The YAML 1.2 JSON Schema. It uses JSON scalar forms while retaining YAML\n * collection syntax.\n *\n * @category Schemas\n */\nconst JSON_SCHEMA = new Schema([\n ...FAILSAFE_SCHEMA.tags,\n nullJsonTag,\n boolJsonTag,\n intJsonTag,\n floatJsonTag\n])\n\n/**\n * The default schema for the loaders. Note, {@link CORE_SCHEMA} comes\n * without the `!!merge` tag. You can easily enable it if needed.\n *\n * @example\n * Enable {@link mergeTag}:\n *\n * ```javascript\n * import { load, CORE_SCHEMA, mergeTag } from 'js-yaml'\n *\n * try {\n * load(data, { schema: CORE_SCHEMA.withTags(mergeTag) })\n * } catch (e) {\n * console.error(e)\n * }\n * ```\n *\n * @category Schemas\n */\nconst CORE_SCHEMA = new Schema([\n ...FAILSAFE_SCHEMA.tags,\n nullCoreTag,\n boolCoreTag,\n intCoreTag,\n floatCoreTag\n])\n\n/**\n * YAML 1.1-compatible schema.\n *\n * @category Schemas\n */\nconst YAML11_SCHEMA = new Schema([\n ...FAILSAFE_SCHEMA.tags,\n nullYaml11Tag,\n boolYaml11Tag,\n intYaml11Tag,\n floatYaml11Tag,\n timestampTag,\n mergeTag,\n binaryTag,\n omapTag,\n pairsTag,\n setTag\n])\n\n/**\n * The dumper schema for maximum compatibility. It combines all supported type\n * variants from YAML 1.1 and YAML 1.2 so strings matching any of them are\n * quoted. This makes the generated YAML more compatible with other parsers.\n *\n * The schema is based on YAML 1.1, but extends `!!int` and `!!float` to accept\n * both YAML 1.1 and Core Schema forms, since Core Schema supports some forms\n * that YAML 1.1 does not.\n *\n * @category Schemas\n */\nconst DUMP_SCHEMA = YAML11_SCHEMA.withTags(\n {\n ...intYaml11Tag,\n resolve: (source, isExplicit, tagName) => {\n const result = intYaml11Tag.resolve(source, isExplicit, tagName)\n return result === NOT_RESOLVED ? intCoreTag.resolve(source, isExplicit, tagName) : result\n }\n },\n {\n ...floatYaml11Tag,\n resolve: (source, isExplicit, tagName) => {\n const result = floatYaml11Tag.resolve(source, isExplicit, tagName)\n return result === NOT_RESOLVED ? floatCoreTag.resolve(source, isExplicit, tagName) : result\n }\n }\n)\n\nexport {\n Schema,\n FAILSAFE_SCHEMA,\n JSON_SCHEMA,\n CORE_SCHEMA,\n YAML11_SCHEMA,\n DUMP_SCHEMA\n}\n","import { defineMappingTag } from '../../tag.ts'\nimport { isPlainObject } from '../../common/object.ts'\n\n/**\n * Recommended when non-string keys are actually needed. It uses native\n * JavaScript `Map` objects, so keys keep their constructed types instead of\n * being converted to strings.\n *\n * It is not the default to avoid widespread breaking changes in existing\n * projects. `Map` has a different access API and does not pass deep equality\n * checks against `{}`-based fixtures. Alongside the other changes in v5,\n * making it the default was considered too disruptive.\n *\n * If these differences are acceptable for your project, we recommend using\n * {@link realMapTag} to guarantee the absence of problems and side effects.\n *\n * @example\n * Enable {@link realMapTag}:\n *\n * ```javascript\n * import { load, CORE_SCHEMA, realMapTag } from 'js-yaml'\n *\n * try {\n * load(data, { schema: CORE_SCHEMA.withTags(realMapTag) })\n * } catch (e) {\n * console.error(e)\n * }\n * ```\n *\n * @category Tags\n */\nconst realMapTag = defineMappingTag('tag:yaml.org,2002:map', {\n create: () => new Map(),\n addPair: (container: Map, key, value) => {\n container.set(key, value)\n return ''\n },\n has: (container: Map, key) => container.has(key),\n keys: (container: Map) => container.keys(),\n get: (container: Map, key) => container.get(key),\n // Dump side: handle both a real `Map` and a plain object, so this tag fully\n // replaces the default map representation when dumping too.\n identify: (data) => data instanceof Map || isPlainObject(data),\n // Dump side: the canonical mapping form is a `Map`. A real `Map` passes\n // through untouched (keys keep their type); a plain object is wrapped\n // shallowly. Lossless — nothing is stringified.\n represent: (data) => {\n if (data instanceof Map) return data\n const map = new Map()\n const obj = data as Record\n for (const key of Object.keys(obj)) map.set(key, obj[key])\n return map\n }\n})\n\nexport { realMapTag }\n","import { defineMappingTag } from '../../tag.ts'\nimport { isPlainObject } from '../../common/object.ts'\n\n// Coerce a constructed key into the string identity a `{}` representation uses.\n// Returns null for a nested array key (an array element that is itself an\n// array), which would otherwise blow up exponentially when stringified via\n// aliases.\nfunction normalizeKey (key: unknown): string | null {\n if (Array.isArray(key)) {\n const array = Array.prototype.slice.call(key) as unknown[]\n\n for (let index = 0; index < array.length; index++) {\n if (Array.isArray(array[index])) return null\n\n if (typeof array[index] === 'object' &&\n Object.prototype.toString.call(array[index]) === '[object Object]') {\n array[index] = '[object Object]'\n }\n }\n\n return String(array)\n }\n\n if (typeof key === 'object' &&\n Object.prototype.toString.call(key) === '[object Object]') {\n return '[object Object]'\n }\n\n return String(key)\n}\n\n/**\n * This implementation exists solely to reproduce v4 behavior exactly. Its use\n * is strongly discouraged. If complex or non-string keys are needed, use\n * {@link realMapTag} instead.\n *\n * @category Tags\n */\nconst legacyMapTag = defineMappingTag('tag:yaml.org,2002:map', {\n create: (): Record => ({}),\n identify: isPlainObject,\n // Dump side: wrap the plain object into the canonical `Map` form the writer\n // walks. Shallow — keys/values stay references to the originals.\n represent: (o: Record) => {\n const map = new Map()\n for (const key of Object.keys(o)) map.set(key, o[key])\n return map\n },\n addPair: (container, key, value) => {\n const normalizedKey = normalizeKey(key)\n if (normalizedKey === null) return 'nested arrays are not supported inside keys'\n if (normalizedKey === '__proto__') {\n // Define as an own data property so a literal `__proto__` key stays data\n // and never invokes the prototype setter.\n Object.defineProperty(container, normalizedKey, {\n value, enumerable: true, configurable: true, writable: true\n })\n } else {\n container[normalizedKey] = value\n }\n return ''\n },\n // hasOwn, not `in`: a plain object inherits `toString` and friends.\n has: (container, key) => {\n const normalizedKey = normalizeKey(key)\n return normalizedKey !== null && Object.prototype.hasOwnProperty.call(container, normalizedKey)\n },\n keys: (container) => Object.keys(container),\n get: (container, key) => {\n const normalizedKey = String(key)\n // key is from `keys()` only. Strong check is not needed, but leave for sure.\n if (!Object.prototype.hasOwnProperty.call(container, normalizedKey)) return null\n return container[normalizedKey]\n }\n})\n\nexport { legacyMapTag, isPlainObject }\n","export interface SnippetMark {\n name?: string | null\n buffer: string\n position: number\n line: number\n column: number\n snippet?: string | null\n}\n\ninterface SnippetOptions {\n maxLength?: number\n indent?: number\n linesBefore?: number\n linesAfter?: number\n}\n\nconst DEFAULT_SNIPPET_OPTIONS: Required = {\n maxLength: 79,\n indent: 1,\n linesBefore: 3,\n linesAfter: 2\n}\n\n// get snippet for a single line, respecting maxLength\nfunction getLine (buffer: string, lineStart: number, lineEnd: number, position: number, maxLineLength: number) {\n let head = ''\n let tail = ''\n const maxHalfLength = Math.floor(maxLineLength / 2) - 1\n\n if (position - lineStart > maxHalfLength) {\n head = ' ... '\n lineStart = position - maxHalfLength + head.length\n }\n\n if (lineEnd - position > maxHalfLength) {\n tail = ' ...'\n lineEnd = position + maxHalfLength - tail.length\n }\n\n return {\n str: head + buffer.slice(lineStart, lineEnd).replace(/\\t/g, '→') + tail,\n pos: position - lineStart + head.length // relative position\n }\n}\n\nfunction padStart (string: string, max: number) {\n // max() protects from negativa value, to avoid exception.\n return ' '.repeat(Math.max(max - string.length, 0)) + string\n}\n\nfunction makeSnippet (mark: SnippetMark, options?: SnippetOptions) {\n if (!mark.buffer) return null\n\n const opts = { ...DEFAULT_SNIPPET_OPTIONS, ...options }\n\n const re = /\\r?\\n|\\r|\\0/g\n const lineStarts = [0]\n const lineEnds: number[] = []\n let match: RegExpExecArray | null\n let foundLineNo = -1\n\n while ((match = re.exec(mark.buffer))) {\n lineEnds.push(match.index)\n lineStarts.push(match.index + match[0].length)\n\n if (mark.position <= match.index && foundLineNo < 0) {\n foundLineNo = lineStarts.length - 2\n }\n }\n\n if (foundLineNo < 0) foundLineNo = lineStarts.length - 1\n\n let result = ''\n const lineNoLength = Math.min(mark.line + opts.linesAfter, lineEnds.length).toString().length\n const maxLineLength = opts.maxLength - (opts.indent + lineNoLength + 3)\n\n for (let i = 1; i <= opts.linesBefore; i++) {\n if (foundLineNo - i < 0) break\n const line = getLine(\n mark.buffer,\n lineStarts[foundLineNo - i],\n lineEnds[foundLineNo - i],\n mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo - i]),\n maxLineLength\n )\n result = `${' '.repeat(opts.indent)}${padStart((mark.line - i + 1).toString(), lineNoLength)} | ${line.str}\\n${result}`\n }\n\n const line = getLine(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength)\n result += `${' '.repeat(opts.indent)}${padStart((mark.line + 1).toString(), lineNoLength)} | ${line.str}\\n`\n result += `${'-'.repeat(opts.indent + lineNoLength + 3 + line.pos)}^\\n`\n\n for (let i = 1; i <= opts.linesAfter; i++) {\n if (foundLineNo + i >= lineEnds.length) break\n const line = getLine(\n mark.buffer,\n lineStarts[foundLineNo + i],\n lineEnds[foundLineNo + i],\n mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo + i]),\n maxLineLength\n )\n result += `${' '.repeat(opts.indent)}${padStart((mark.line + i + 1).toString(), lineNoLength)} | ${line.str}\\n`\n }\n\n return result.replace(/\\n$/, '')\n}\n\nexport default makeSnippet\n","import makeSnippet, { type SnippetMark } from './snippet.ts'\n\n// YAML error class. http://stackoverflow.com/questions/8458984\n//\nfunction formatError (exception: YAMLException, compact?: boolean) {\n let where = ''\n\n if (!exception.mark) return exception.reason\n\n if (exception.mark.name) {\n where += `in \"${exception.mark.name}\" `\n }\n\n where += `(${exception.mark.line + 1}:${exception.mark.column + 1})`\n\n if (!compact && exception.mark.snippet) {\n where += `\\n\\n${exception.mark.snippet}`\n }\n\n return `${exception.reason} ${where}`\n}\n\n/**\n * A YAML error. Unlike an ordinary `Error`, it adds a source snippet showing\n * the location of the problem to the error message, when available.\n *\n * @category Main\n */\nclass YAMLException extends Error {\n reason: string\n mark?: SnippetMark\n\n /**\n * Optional `mark` contains source snippet data. Usually, use\n * {@link YAMLException.throwAt} instead of passing it directly.\n */\n constructor (reason: string, mark?: SnippetMark) {\n super()\n\n this.name = 'YAMLException'\n this.reason = reason\n this.mark = mark\n this.message = formatError(this, false)\n\n // Guard for ancient browsers\n if (Error.captureStackTrace) {\n // Include stack trace in error object,\n Error.captureStackTrace(this, this.constructor)\n }\n }\n\n /**\n * Returns the formatted error, omitting the source snippet in compact mode.\n */\n toString (compact?: boolean) {\n return `${this.name}: ${formatError(this, compact)}`\n }\n\n /**\n * Builds a YAMLException with a source snippet and throws it. `source` is\n * the raw input text; `position` is an offset into it.\n */\n static throwAt (source: string, position: number, message: string, filename = ''): never {\n let line = 0\n let lineStart = 0\n\n for (let index = 0; index < position; index++) {\n const ch = source.charCodeAt(index)\n\n if (ch === 0x0A/* LF */) {\n line++\n lineStart = index + 1\n } else if (ch === 0x0D/* CR */) {\n line++\n if (source.charCodeAt(index + 1) === 0x0A/* LF */) index++\n lineStart = index + 1\n }\n }\n\n const mark: SnippetMark = {\n name: filename,\n buffer: source,\n position,\n line,\n column: position - lineStart\n }\n\n mark.snippet = makeSnippet(mark)\n throw new YAMLException(message, mark)\n }\n}\n\nexport { YAMLException }\n","/** @category Events */\nconst EVENT_ID = {\n DOCUMENT: 1,\n SEQUENCE: 2,\n MAPPING: 3,\n SCALAR: 4,\n ALIAS: 5,\n POP: 6\n} as const\n\n/** @category Events */\ntype EventId = typeof EVENT_ID[keyof typeof EVENT_ID]\n\n/** @category Nodes */\nconst SCALAR_STYLE = {\n PLAIN: 1,\n SINGLE_QUOTED: 2,\n DOUBLE_QUOTED: 3,\n LITERAL_BLOCK: 4,\n FOLDED_BLOCK: 5\n} as const\n\n/** @category Nodes */\ntype ScalarStyle = typeof SCALAR_STYLE[keyof typeof SCALAR_STYLE]\n\n/** @category Nodes */\nconst COLLECTION_STYLE = {\n BLOCK: 1,\n FLOW: 2\n} as const\n\n/** @category Nodes */\ntype CollectionStyle = typeof COLLECTION_STYLE[keyof typeof COLLECTION_STYLE]\n\n/** @category Nodes */\nconst CHOMPING_MODE = {\n CLIP: 1,\n STRIP: 2,\n KEEP: 3\n} as const\n\n/** @category Nodes */\ntype ChompingMode = typeof CHOMPING_MODE[keyof typeof CHOMPING_MODE]\n\n/** @category Events */\ntype DocumentDirective =\n { kind: 'yaml', version: string } |\n { kind: 'tag', handle: string, prefix: string }\n\ntype TagHandlers = Record\n\n/** @category Events */\ninterface DocumentEvent {\n type: typeof EVENT_ID.DOCUMENT\n explicitStart: boolean\n explicitEnd: boolean\n directives: DocumentDirective[]\n}\n\n/** @category Events */\ninterface SequenceEvent {\n type: typeof EVENT_ID.SEQUENCE\n start: number\n anchorStart: number\n anchorEnd: number\n tagStart: number\n tagEnd: number\n style: CollectionStyle\n}\n\n/** @category Events */\ninterface MappingEvent {\n type: typeof EVENT_ID.MAPPING\n start: number\n anchorStart: number\n anchorEnd: number\n tagStart: number\n tagEnd: number\n style: CollectionStyle\n}\n\n/**\n * A scalar whose decoded value can be read with {@link getScalarValue}.\n *\n * @category Events\n */\ninterface ScalarEvent {\n type: typeof EVENT_ID.SCALAR\n valueStart: number\n valueEnd: number\n anchorStart: number\n anchorEnd: number\n tagStart: number\n tagEnd: number\n style: ScalarStyle\n chomping: ChompingMode\n indent: number\n fast: boolean\n}\n\n/** @category Events */\ninterface AliasEvent {\n type: typeof EVENT_ID.ALIAS\n anchorStart: number\n anchorEnd: number\n}\n\n/**\n * Closes the most recently opened document, sequence, or mapping.\n *\n * @category Events\n */\ninterface PopEvent {\n type: typeof EVENT_ID.POP\n}\n\n/**\n * Source ranges are zero-based and end-exclusive; `-1` means absent.\n *\n * @category Events\n */\ntype Event =\n DocumentEvent |\n SequenceEvent |\n MappingEvent |\n ScalarEvent |\n AliasEvent |\n PopEvent\n\nexport {\n EVENT_ID,\n SCALAR_STYLE,\n COLLECTION_STYLE,\n CHOMPING_MODE,\n\n type EventId,\n type ScalarStyle,\n type CollectionStyle,\n type ChompingMode,\n\n type DocumentDirective,\n type TagHandlers,\n type DocumentEvent,\n type SequenceEvent,\n type MappingEvent,\n type ScalarEvent,\n type AliasEvent,\n type PopEvent,\n type Event\n}\n","import {\n SCALAR_STYLE,\n CHOMPING_MODE,\n type ScalarEvent\n} from './events.ts'\n\nconst NO_RANGE = -1\n\n// --- character helpers (mirrors src/loader.ts, kept self-contained here) ---\n\nfunction simpleEscapeSequence (c: number) {\n switch (c) {\n case 0x30/* 0 */: return '\\x00'\n case 0x61/* a */: return '\\x07'\n case 0x62/* b */: return '\\x08'\n case 0x74/* t */: return '\\x09'\n case 0x09/* Tab */: return '\\x09'\n case 0x6E/* n */: return '\\x0A'\n case 0x76/* v */: return '\\x0B'\n case 0x66/* f */: return '\\x0C'\n case 0x72/* r */: return '\\x0D'\n case 0x65/* e */: return '\\x1B'\n case 0x20/* Space */: return ' '\n case 0x22/* \" */: return '\\x22'\n case 0x2F/* / */: return '/'\n case 0x5C/* \\ */: return '\\x5C'\n case 0x4E/* N */: return '\\x85'\n case 0x5F/* _ */: return '\\xA0'\n case 0x4C/* L */: return '\\u2028'\n case 0x50/* P */: return '\\u2029'\n default: return ''\n }\n}\n\nconst simpleEscapeCheck = new Array(256)\nconst simpleEscapeMap = new Array(256)\nfor (let i = 0; i < 256; i++) {\n simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0\n simpleEscapeMap[i] = simpleEscapeSequence(i)\n}\n\nfunction charFromCodepoint (c: number) {\n if (c <= 0xFFFF) {\n return String.fromCharCode(c)\n }\n return String.fromCharCode(\n ((c - 0x010000) >> 10) + 0xD800,\n ((c - 0x010000) & 0x03FF) + 0xDC00\n )\n}\n\nfunction fromHexCode (c: number) {\n if (c >= 0x30/* 0 */ && c <= 0x39/* 9 */) return c - 0x30\n const lc = c | 0x20\n // Double-quoted scalar ranges are validated by parser.ts before cooking.\n return lc - 0x61 + 10\n}\n\nfunction escapedHexLen (c: number) {\n if (c === 0x78/* x */) return 2\n if (c === 0x75/* u */) return 4\n // Double-quoted scalar ranges are validated by parser.ts before cooking.\n return 8\n}\n\n// --- line folding helpers ---\n\n// Skip a run of line breaks plus the leading whitespace of the following\n// lines, returning the number of line breaks consumed and the new position.\nfunction skipFoldedBreaks (input: string, position: number, end: number) {\n let breaks = 0\n\n while (position < end) {\n const ch = input.charCodeAt(position)\n\n if (ch === 0x0A/* LF */) {\n breaks++\n position++\n } else if (ch === 0x0D/* CR */) {\n breaks++\n position++\n if (input.charCodeAt(position) === 0x0A/* LF */) position++\n } else if (ch === 0x20/* Space */ || ch === 0x09/* Tab */) {\n position++\n } else {\n break\n }\n }\n\n return { position, breaks }\n}\n\n// Folding of line breaks between content chunks: a single break becomes a\n// space, several breaks become (count - 1) newlines.\nfunction foldedBreaks (count: number) {\n if (count === 1) return ' '\n // Called only after skipFoldedBreaks() consumed at least one line break.\n return '\\n'.repeat(count - 1)\n}\n\n// --- per-style extractors ---\n\nfunction getPlainValue (input: string, start: number, end: number) {\n let result = ''\n let position = start\n let captureStart = start\n let captureEnd = start\n\n while (position < end) {\n const ch = input.charCodeAt(position)\n\n if (ch === 0x0A/* LF */ || ch === 0x0D/* CR */) {\n result += input.slice(captureStart, captureEnd)\n const fold = skipFoldedBreaks(input, position, end)\n result += foldedBreaks(fold.breaks)\n position = captureStart = captureEnd = fold.position\n } else {\n position++\n if (ch !== 0x20/* Space */ && ch !== 0x09/* Tab */) captureEnd = position\n }\n }\n\n return result + input.slice(captureStart, captureEnd)\n}\n\nfunction getSingleQuotedValue (input: string, start: number, end: number) {\n let result = ''\n let position = start\n let captureStart = start\n let captureEnd = start\n\n while (position < end) {\n const ch = input.charCodeAt(position)\n\n if (ch === 0x27/* ' */) {\n // Within the stored range every quote is part of an escaped '' pair.\n result += input.slice(captureStart, position) + \"'\"\n position += 2\n captureStart = captureEnd = position\n } else if (ch === 0x0A/* LF */ || ch === 0x0D/* CR */) {\n result += input.slice(captureStart, captureEnd)\n const fold = skipFoldedBreaks(input, position, end)\n result += foldedBreaks(fold.breaks)\n position = captureStart = captureEnd = fold.position\n } else {\n position++\n if (ch !== 0x20/* Space */ && ch !== 0x09/* Tab */) captureEnd = position\n }\n }\n\n // Whitespace right before the closing quote is significant (it is only\n // stripped when followed by a line break).\n return result + input.slice(captureStart, end)\n}\n\nfunction getDoubleQuotedValue (input: string, start: number, end: number) {\n let result = ''\n let position = start\n let captureStart = start\n let captureEnd = start\n\n while (position < end) {\n const ch = input.charCodeAt(position)\n\n if (ch === 0x5C/* \\ */) {\n result += input.slice(captureStart, position)\n position++\n const escaped = input.charCodeAt(position)\n\n if (escaped === 0x0A/* LF */ || escaped === 0x0D/* CR */) {\n // Escaped line break: a line continuation that joins with nothing.\n position = skipFoldedBreaks(input, position, end).position\n } else if (escaped < 256 && simpleEscapeCheck[escaped]) {\n result += simpleEscapeMap[escaped]\n position++\n } else {\n // parser.ts has already rejected unknown escapes and invalid hex digits.\n let hexLength = escapedHexLen(escaped)\n let hexResult = 0\n\n for (; hexLength > 0; hexLength--) {\n position++\n const digit = fromHexCode(input.charCodeAt(position))\n hexResult = (hexResult << 4) + digit\n }\n\n result += charFromCodepoint(hexResult)\n position++\n }\n\n captureStart = captureEnd = position\n } else if (ch === 0x0A/* LF */ || ch === 0x0D/* CR */) {\n result += input.slice(captureStart, captureEnd)\n const fold = skipFoldedBreaks(input, position, end)\n result += foldedBreaks(fold.breaks)\n position = captureStart = captureEnd = fold.position\n } else {\n position++\n if (ch !== 0x20/* Space */ && ch !== 0x09/* Tab */) captureEnd = position\n }\n }\n\n return result + input.slice(captureStart, end)\n}\n\nfunction getBlockValue (\n input: string,\n start: number,\n end: number,\n indent: number,\n chomping: number,\n folded: boolean\n) {\n const textIndent = indent < 0 ? 0 : indent\n // The range starts at column 0 of the first line and includes every line\n // break, including those of trailing blank lines.\n const region = input.slice(start, end).replace(/\\r\\n?/g, '\\n')\n // An empty range is a block with no lines at all (e.g. an empty `|+`) and\n // must stay empty; a naive split would invent a phantom blank line. Otherwise\n // a trailing line break leaves a trailing '' from split() that is not a real\n // line (just the terminator of the last one), so drop it. Interior blank\n // lines are kept.\n const lines = region === ''\n ? []\n : (region.endsWith('\\n') ? region.slice(0, -1) : region).split('\\n')\n\n let result = ''\n let didReadContent = false\n let emptyLines = 0\n let atMoreIndented = false\n\n for (const line of lines) {\n // Whitespace beyond the content indentation is part of the content, so the\n // indentation scan stops at textIndent. A line is empty only when nothing\n // remains after the (capped) indentation.\n // indent < 0 means no content line was detected (a wholly blank block), so\n // every line is an empty line.\n let column = 0\n while (column < textIndent && line.charCodeAt(column) === 0x20/* Space */) column++\n\n if (indent < 0 || column >= line.length) {\n emptyLines++\n continue\n }\n\n const content = line.slice(textIndent)\n const first = content.charCodeAt(0)\n\n if (folded) {\n if (first === 0x20/* Space */ || first === 0x09/* Tab */) {\n // More-indented lines are not folded.\n atMoreIndented = true\n result += '\\n'.repeat(didReadContent ? 1 + emptyLines : emptyLines)\n } else if (atMoreIndented) {\n atMoreIndented = false\n result += '\\n'.repeat(emptyLines + 1)\n } else if (emptyLines === 0) {\n if (didReadContent) result += ' '\n } else {\n result += '\\n'.repeat(emptyLines)\n }\n } else {\n result += '\\n'.repeat(didReadContent ? 1 + emptyLines : emptyLines)\n }\n\n result += content\n didReadContent = true\n emptyLines = 0\n }\n\n if (chomping === CHOMPING_MODE.KEEP) {\n result += '\\n'.repeat(didReadContent ? 1 + emptyLines : emptyLines)\n } else if (chomping !== CHOMPING_MODE.STRIP) {\n if (didReadContent) result += '\\n'\n }\n\n return result\n}\n\n/**\n * Decodes the scalar referenced by event offsets in `input`.\n *\n * @category Events\n */\nfunction getScalarValue (input: string, scalar: ScalarEvent): string {\n if (scalar.valueStart === NO_RANGE) return ''\n\n const { valueStart, valueEnd } = scalar\n\n // Fast path: the parser marked this scalar as a verbatim slice of the input\n // (single-line plain / quoted with no escapes or folded breaks), so the\n // per-style char loop below would just reproduce the slice.\n if (scalar.fast) return input.slice(valueStart, valueEnd)\n\n switch (scalar.style) {\n case SCALAR_STYLE.SINGLE_QUOTED:\n return getSingleQuotedValue(input, valueStart, valueEnd)\n case SCALAR_STYLE.DOUBLE_QUOTED:\n return getDoubleQuotedValue(input, valueStart, valueEnd)\n case SCALAR_STYLE.LITERAL_BLOCK:\n return getBlockValue(input, valueStart, valueEnd, scalar.indent, scalar.chomping, false)\n case SCALAR_STYLE.FOLDED_BLOCK:\n return getBlockValue(input, valueStart, valueEnd, scalar.indent, scalar.chomping, true)\n default:\n return getPlainValue(input, valueStart, valueEnd)\n }\n}\n\nexport {\n getScalarValue\n}\n","const DEFAULT_TAG_HANDLERS: Readonly> = Object.assign(\n Object.create(null),\n {\n '!': '!',\n '!!': 'tag:yaml.org,2002:'\n }\n)\n\nfunction tagPercentEncode (source: string) {\n return encodeURI(source).replace(/!/g, '%21')\n}\n\nfunction tagNameFull (rawTag: string, tagHandlers?: Readonly>) {\n if (rawTag.startsWith('!<') && rawTag.endsWith('>')) {\n return decodeURIComponent(rawTag.slice(2, -1))\n }\n\n const handleEnd = rawTag.indexOf('!', 1)\n const handle = handleEnd === -1 ? '!' : rawTag.slice(0, handleEnd + 1)\n const prefix = tagHandlers?.[handle] ?? DEFAULT_TAG_HANDLERS[handle] ?? handle\n\n return decodeURIComponent(prefix) + decodeURIComponent(rawTag.slice(handle.length))\n}\n\nfunction tagNameShort (fullTag: string) {\n let tag = fullTag\n\n if (tag.charCodeAt(0) === 0x21) {\n tag = tag.slice(1)\n return `!${tagPercentEncode(tag)}`\n }\n\n if (tag.slice(0, 18) === 'tag:yaml.org,2002:') {\n return `!!${tagPercentEncode(tag.slice(18))}`\n }\n\n return `!<${tagPercentEncode(tag)}>`\n}\n\nexport {\n tagNameFull,\n tagNameShort\n}\n","import {\n EVENT_ID,\n SCALAR_STYLE,\n type Event,\n type TagHandlers,\n type MappingEvent,\n type ScalarEvent,\n type SequenceEvent\n} from './events.ts'\nimport { getScalarValue } from './parser_scalar.ts'\nimport { CORE_SCHEMA, type Schema } from '../schema.ts'\nimport {\n NOT_RESOLVED,\n type MappingTagDefinition,\n type ScalarTagDefinition,\n type SequenceTagDefinition\n} from '../tag.ts'\nimport { YAMLException } from '../common/exception.ts'\nimport { tagNameFull } from '../common/tagname.ts'\n\nconst NO_RANGE = -1\n\nconst MERGE_TAG_NAME = 'tag:yaml.org,2002:merge'\n\ninterface DocumentFrame {\n kind: 'document'\n position: number\n value: unknown\n hasValue: boolean\n}\n\ninterface SequenceFrame {\n kind: 'sequence'\n position: number\n value: any\n tag: SequenceTagDefinition\n anchor: Anchor | null\n index: number\n}\n\ninterface MappingFrame {\n kind: 'mapping'\n position: number\n value: any\n tag: MappingTagDefinition\n anchor: Anchor | null\n key: unknown\n keyPosition: number\n hasKey: boolean\n // The key slot drops its tag, but `<<` is recognized by tag, not by value.\n keyIsMerge: boolean\n // Keys brought in by a merge that an explicit pair is still allowed to\n // override. Lazily allocated: stays null for mappings without `<<`.\n overridable: Set | null\n}\n\ntype Frame = DocumentFrame | SequenceFrame | MappingFrame\n\ntype AnyTag = ScalarTagDefinition | SequenceTagDefinition | MappingTagDefinition\n\ninterface ValueAndTag {\n value: unknown\n tag: AnyTag\n}\n\ninterface Anchor {\n value: unknown\n tag: AnyTag\n isValueFinal: boolean\n}\n\n/** @category Events */\ninterface ConstructorOptions {\n /** Source text referenced by offsets in `events`. */\n source: string\n filename?: string\n\n /**\n * Schema to use.\n *\n * @defaultValue {@link CORE_SCHEMA}\n */\n schema?: Schema\n\n /**\n * Enables compatibility with `JSON.parse` behavior. Duplicate keys in a\n * mapping override values instead of throwing an error.\n *\n * @defaultValue `false`\n */\n json?: boolean\n\n /**\n * Maximum total number of keys processed by merge (`<<`) across one load\n * call. Each member of a merge sequence also counts as one key. Set to `-1`\n * to disable the limit.\n *\n * @defaultValue `10000`\n */\n maxTotalMergeKeys?: number\n\n /**\n * Maximum number of alias nodes (`*ref`) per document. Set to `0` to reject\n * all aliases, or to `-1` for no limit.\n *\n * @defaultValue `-1`\n */\n maxAliases?: number\n}\n\n// `source` is input data, not config — so it has no default here.\nconst DEFAULT_CONSTRUCTOR_OPTIONS: Required> = {\n filename: '',\n schema: CORE_SCHEMA,\n json: false,\n maxTotalMergeKeys: 10000,\n maxAliases: -1\n}\n\ninterface ConstructorState extends Required {\n events: Event[]\n documents: unknown[]\n eventIndex: number\n position: number\n frames: Frame[]\n anchors: Map\n // Mapping tag each sequence element was built with, keyed by the element\n // itself. Needed by `<<` merge, which sees only the finished element values.\n nodeTags: Map>\n tagHandlers: TagHandlers\n totalMergeKeys: number\n aliasCount: number\n}\n\nfunction eventPosition (event: Event) {\n if ('tagStart' in event && event.tagStart !== NO_RANGE) return event.tagStart\n if ('anchorStart' in event && event.anchorStart !== NO_RANGE) return event.anchorStart\n if ('valueStart' in event && event.valueStart !== NO_RANGE) return event.valueStart\n if ('start' in event) return event.start\n return 0\n}\n\nfunction throwError (state: ConstructorState, message: string): never {\n YAMLException.throwAt(state.source, state.position, message, state.filename)\n}\n\nfunction finalizeCollection (\n state: ConstructorState,\n position: number,\n tag: SequenceTagDefinition | MappingTagDefinition,\n carrier: unknown\n) {\n try {\n return tag.finalize(carrier)\n } catch (error) {\n if (error instanceof YAMLException) throw error\n YAMLException.throwAt(\n state.source,\n position,\n error instanceof Error ? error.message : String(error),\n state.filename\n )\n }\n}\n\nfunction constructScalar (\n state: ConstructorState,\n event: ScalarEvent\n): ValueAndTag {\n const source = getScalarValue(state.source, event)\n const rawTag = event.tagStart === NO_RANGE\n ? ''\n : state.source.slice(event.tagStart, event.tagEnd)\n const strTag = state.schema.defaultScalarTag\n\n if (rawTag !== '') {\n if (rawTag === '!') return { value: source, tag: strTag }\n\n const tagName = tagNameFull(rawTag, state.tagHandlers)\n const scalarTag = state.schema.lookupScalarTag(tagName)\n\n if (scalarTag) {\n const result = scalarTag.resolve(source, true, tagName)\n\n if (result === NOT_RESOLVED) {\n throwError(state, `cannot resolve a node with !<${tagName}> explicit tag`)\n }\n\n return { value: result, tag: scalarTag }\n }\n\n // An empty node carrying a collection tag (e.g. `!!map`, `!!seq`) is emitted\n // by the parser as a scalar event, since there is no collection syntax to key\n // off. Resolve it here by the explicit tag's kind into an empty collection.\n const collectionTagDef =\n state.schema.lookupMappingTag(tagName) ??\n state.schema.lookupSequenceTag(tagName)\n\n if (collectionTagDef) {\n if (source !== '') {\n throwError(state, `cannot resolve a node with !<${tagName}> explicit tag`)\n }\n\n const carrier = collectionTagDef.create(tagName)\n const value = collectionTagDef.carrierIsResult\n ? carrier\n : finalizeCollection(state, state.position, collectionTagDef, carrier)\n return { value, tag: collectionTagDef }\n }\n\n throwError(state, `unknown scalar tag !<${tagName}>`)\n }\n\n if (event.style === SCALAR_STYLE.PLAIN) {\n return state.schema.resolveImplicitScalarTag(source)\n }\n\n return { value: strTag.resolve(source, false, strTag.tagName), tag: strTag }\n}\n\nfunction collectionTagName (\n state: ConstructorState,\n event: SequenceEvent | MappingEvent,\n defaultTagName: string\n) {\n const rawTag = event.tagStart === NO_RANGE\n ? ''\n : state.source.slice(event.tagStart, event.tagEnd)\n const tagName = rawTag === '' || rawTag === '!'\n ? defaultTagName\n : tagNameFull(rawTag, state.tagHandlers)\n\n return tagName\n}\n\n// A merge source must be a mapping; every mapping tag exposes the read side.\nfunction isMappingTag (tag: AnyTag): tag is MappingTagDefinition {\n return tag.nodeKind === 'mapping'\n}\n\nfunction chargeMergeWork (state: ConstructorState) {\n state.totalMergeKeys++\n\n if (state.maxTotalMergeKeys !== -1 && state.totalMergeKeys > state.maxTotalMergeKeys) {\n throwError(state, `merge keys exceeded maxTotalMergeKeys (${state.maxTotalMergeKeys})`)\n }\n}\n\n// Fold the keys of one mapping source into the target frame, honoring merge\n// precedence: an already-present key (explicit or from an earlier source) wins.\nfunction mergeKeys (state: ConstructorState, frame: MappingFrame, source: unknown, sourceTag: MappingTagDefinition) {\n // Count the source mapping itself to bound sequences of empty mappings.\n chargeMergeWork(state)\n\n for (const sourceKey of sourceTag.keys(source)) {\n chargeMergeWork(state)\n\n if (frame.tag.has(frame.value, sourceKey)) continue\n\n const err = frame.tag.addPair(frame.value, sourceKey, sourceTag.get(source, sourceKey))\n if (err) throwError(state, err)\n\n frame.overridable ??= new Set()\n frame.overridable.add(sourceKey)\n }\n}\n\n// The value of a `<<` key: either a mapping (fold its keys) or a sequence of\n// mappings (fold each). Sequence elements arrive as bare values, so the tag each\n// was built with comes from `nodeTags`; a miss means it is not a mapping (a\n// scalar, a nested sequence, or a value some sequence tag synthesized itself).\nfunction mergeSource (state: ConstructorState, frame: MappingFrame, source: unknown, sourceTag: AnyTag) {\n state.position = frame.keyPosition\n\n if (isMappingTag(sourceTag)) {\n mergeKeys(state, frame, source, sourceTag)\n } else if (sourceTag.nodeKind === 'sequence' && Array.isArray(source)) {\n // The current merge budget is sufficient; this hard cap only further limits\n // the attack vector, so there is no reason to expose it as a public option.\n if (source.length > 100) {\n throwError(state, 'abnormal merge sequence size')\n }\n\n for (const element of source) {\n const elementTag = state.nodeTags.get(element)\n if (!elementTag) {\n throwError(state, 'cannot merge mappings; the provided source object is unacceptable')\n }\n mergeKeys(state, frame, element, elementTag)\n }\n } else {\n throwError(state, 'cannot merge mappings; the provided source object is unacceptable')\n }\n}\n\nfunction addMappingValue (state: ConstructorState, frame: MappingFrame, key: unknown, value: unknown, tag: AnyTag) {\n state.position = frame.keyPosition\n\n // `<<` is intercepted before dedup, so a repeated merge key is allowed.\n if (frame.keyIsMerge) {\n mergeSource(state, frame, value, tag)\n return\n }\n\n if (!state.json && frame.tag.has(frame.value, key) && !frame.overridable?.has(key)) {\n throwError(state, 'duplicated mapping key')\n }\n\n const err = frame.tag.addPair(frame.value, key, value)\n if (err) throwError(state, err)\n frame.overridable?.delete(key)\n}\n\nfunction addValue (state: ConstructorState, value: unknown, tag: AnyTag) {\n const frame = state.frames[state.frames.length - 1]!\n\n if (frame.kind === 'document') {\n frame.value = value\n frame.hasValue = true\n } else if (frame.kind === 'sequence') {\n // Any element may later be folded in by a `<<` merge, which by then has no\n // way to tell what built it.\n if (isMappingTag(tag)) state.nodeTags.set(value, tag)\n const err = frame.tag.addItem(frame.value, value, frame.index++)\n if (err) throwError(state, err)\n } else if (frame.hasKey) {\n const key = frame.key\n frame.key = undefined\n frame.hasKey = false\n addMappingValue(state, frame, key, value, tag)\n } else {\n frame.key = value\n frame.keyPosition = state.position\n frame.hasKey = true\n frame.keyIsMerge = tag.tagName === MERGE_TAG_NAME\n }\n}\n\nfunction storeAnchor (\n state: ConstructorState,\n event: ScalarEvent | SequenceEvent | MappingEvent,\n value: unknown,\n tag: AnyTag,\n isValueFinal: boolean\n): Anchor | null {\n if (event.anchorStart !== NO_RANGE) {\n const anchor = {\n value,\n tag,\n isValueFinal\n }\n state.anchors.set(state.source.slice(event.anchorStart, event.anchorEnd), anchor)\n return anchor\n }\n\n return null\n}\n\n/**\n * Constructs JavaScript documents directly from parser events, without an\n * intermediate AST.\n *\n * @category Events\n */\nfunction constructFromEvents (events: Event[], options: ConstructorOptions): unknown[] {\n const state: ConstructorState = {\n ...DEFAULT_CONSTRUCTOR_OPTIONS,\n ...options,\n events,\n documents: [],\n eventIndex: 0,\n position: 0,\n frames: [],\n anchors: new Map(),\n nodeTags: new Map(),\n tagHandlers: Object.create(null),\n totalMergeKeys: 0,\n aliasCount: 0\n }\n\n while (state.eventIndex < state.events.length) {\n const event = state.events[state.eventIndex++]\n state.position = eventPosition(event)\n\n switch (event.type) {\n case EVENT_ID.DOCUMENT:\n state.anchors = new Map()\n state.nodeTags = new Map()\n state.aliasCount = 0\n state.tagHandlers = Object.create(null)\n for (const directive of event.directives) {\n if (directive.kind === 'tag') state.tagHandlers[directive.handle] = directive.prefix\n }\n state.frames.push({ kind: 'document', position: state.position, value: undefined, hasValue: false })\n break\n\n case EVENT_ID.SCALAR: {\n const { value, tag } = constructScalar(state, event)\n storeAnchor(state, event, value, tag, true)\n addValue(state, value, tag)\n break\n }\n\n case EVENT_ID.SEQUENCE: {\n const tagName = collectionTagName(state, event, 'tag:yaml.org,2002:seq')\n const tag = state.schema.lookupSequenceTag(tagName)\n if (!tag) throwError(state, `unknown sequence tag !<${tagName}>`)\n\n const value = tag.create(tagName)\n const anchor = storeAnchor(state, event, value, tag, tag.carrierIsResult)\n\n state.frames.push({\n kind: 'sequence', position: state.position, value, tag, anchor, index: 0\n })\n break\n }\n\n case EVENT_ID.MAPPING: {\n const tagName = collectionTagName(state, event, 'tag:yaml.org,2002:map')\n const tag = state.schema.lookupMappingTag(tagName)\n if (!tag) throwError(state, `unknown mapping tag !<${tagName}>`)\n\n const value = tag.create(tagName)\n const anchor = storeAnchor(state, event, value, tag, tag.carrierIsResult)\n state.frames.push({\n kind: 'mapping',\n position: state.position,\n value,\n tag,\n anchor,\n key: undefined,\n keyPosition: state.position,\n hasKey: false,\n keyIsMerge: false,\n overridable: null\n })\n break\n }\n\n case EVENT_ID.ALIAS: {\n if (state.maxAliases !== -1 && ++state.aliasCount > state.maxAliases) {\n throwError(state, `aliases exceeded maxAliases (${state.maxAliases})`)\n }\n\n const name = state.source.slice(event.anchorStart, event.anchorEnd)\n const anchor = state.anchors.get(name)\n if (!anchor) {\n throwError(state, `unidentified alias \"${name}\"`)\n }\n if (!anchor.isValueFinal) {\n throwError(state, `recursive alias \"${name}\" is not supported for tag ${anchor.tag.tagName} because it uses finalize()`)\n }\n addValue(state, anchor.value, anchor.tag)\n break\n }\n\n case EVENT_ID.POP: {\n const frame = state.frames.pop()!\n\n if (frame.kind === 'mapping' && frame.hasKey) {\n state.position = frame.keyPosition\n throwError(state, 'incomplete mapping pair in event stream')\n }\n\n if (frame.kind === 'document') {\n state.documents.push(frame.value)\n } else {\n const value = frame.tag.carrierIsResult\n ? frame.value\n : finalizeCollection(state, frame.position, frame.tag, frame.value)\n if (frame.anchor) {\n frame.anchor.value = value\n frame.anchor.isValueFinal = true\n }\n addValue(state, value, frame.tag)\n }\n break\n }\n }\n }\n\n return state.documents\n}\n\nexport {\n constructFromEvents,\n DEFAULT_CONSTRUCTOR_OPTIONS,\n type ConstructorOptions\n}\n","import {\n EVENT_ID,\n SCALAR_STYLE,\n COLLECTION_STYLE,\n CHOMPING_MODE,\n type Event,\n type ScalarStyle,\n type CollectionStyle,\n type ChompingMode,\n type DocumentDirective,\n type TagHandlers\n} from './events.ts'\nimport { YAMLException } from '../common/exception.ts'\n\nconst NO_RANGE = -1\nconst HAS_OWN = Object.prototype.hasOwnProperty\n\nconst CONTEXT_FLOW_IN = 1\nconst CONTEXT_FLOW_OUT = 2\nconst CONTEXT_BLOCK_IN = 3\nconst CONTEXT_BLOCK_OUT = 4\n\n// eslint-disable-next-line no-control-regex\nconst PATTERN_NON_PRINTABLE = /[\\x00-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7F-\\x84\\x86-\\x9F\\uFFFE\\uFFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]/\n// eslint-disable-next-line no-useless-escape\nconst PATTERN_FLOW_INDICATORS = /[,\\[\\]{}]/\n// YAML 1.2.2, [91] c-tag-handle.\n// eslint-disable-next-line no-useless-escape\nconst PATTERN_TAG_HANDLE = /^(?:!|!!|![0-9A-Za-z-]+!)$/\n// YAML 1.2.2, [39] ns-uri-char.\n// eslint-disable-next-line no-useless-escape\nconst NS_URI_CHAR = String.raw`(?:%[0-9A-Fa-f]{2}|[0-9A-Za-z\\-#;/?:@&=+$,_.!~*'()\\[\\]])`\n// YAML 1.2.2, [40] ns-tag-char = ns-uri-char - \"!\" - c-flow-indicator.\n// eslint-disable-next-line no-useless-escape\nconst NS_TAG_CHAR = String.raw`(?:%[0-9A-Fa-f]{2}|[0-9A-Za-z\\-#;/?:@&=+$.~*'()_])`\nconst PATTERN_TAG_URI = new RegExp(`^(?:${NS_URI_CHAR})*$`)\n// YAML 1.2.2, [99] c-ns-shorthand-tag suffix part.\nconst PATTERN_TAG_SUFFIX = new RegExp(`^(?:${NS_TAG_CHAR})+$`)\n// YAML 1.2.2, [93] ns-tag-prefix.\nconst PATTERN_TAG_PREFIX = new RegExp(`^(?:!(?:${NS_URI_CHAR})*|${NS_TAG_CHAR}(?:${NS_URI_CHAR})*)$`)\n\ntype NodeContext =\n typeof CONTEXT_FLOW_IN | typeof CONTEXT_FLOW_OUT |\n typeof CONTEXT_BLOCK_IN | typeof CONTEXT_BLOCK_OUT\n\ninterface NodeProperties {\n anchorStart: number\n anchorEnd: number\n tagStart: number\n tagEnd: number\n}\n\ninterface ParserSnapshot {\n position: number\n line: number\n lineStart: number\n lineIndent: number\n firstTabInLine: number\n eventsLength: number\n}\n\n/** @category Events */\ninterface ParserOptions {\n /**\n * File path used in error messages.\n *\n * @defaultValue `null`\n */\n filename?: string\n\n /**\n * Maximum nesting depth for collections. Aliases are not taken into account.\n *\n * @defaultValue `100`\n */\n maxDepth?: number\n}\n\nconst DEFAULT_PARSER_OPTIONS: Required = {\n filename: '',\n maxDepth: 100\n}\n\ninterface ParserState extends Required {\n input: string\n length: number\n position: number\n line: number\n lineStart: number\n lineIndent: number\n firstTabInLine: number\n depth: number\n directives: DocumentDirective[]\n tagHandlers: TagHandlers\n events: Event[]\n}\n\nfunction addDocumentEvent (\n state: ParserState,\n explicitStart: boolean,\n explicitEnd: boolean\n) {\n state.events.push({\n type: EVENT_ID.DOCUMENT,\n explicitStart,\n explicitEnd,\n directives: state.directives\n })\n}\n\nfunction addSequenceEvent (\n state: ParserState,\n start: number,\n anchorStart: number,\n anchorEnd: number,\n tagStart: number,\n tagEnd: number,\n style: CollectionStyle\n) {\n state.events.push({\n type: EVENT_ID.SEQUENCE,\n start,\n anchorStart,\n anchorEnd,\n tagStart,\n tagEnd,\n style\n })\n}\n\nfunction addMappingEvent (\n state: ParserState,\n start: number,\n anchorStart: number,\n anchorEnd: number,\n tagStart: number,\n tagEnd: number,\n style: CollectionStyle\n) {\n state.events.push({\n type: EVENT_ID.MAPPING,\n start,\n anchorStart,\n anchorEnd,\n tagStart,\n tagEnd,\n style\n })\n}\n\nfunction insertFlowPairMappingEvent (state: ParserState, snapshot: ParserSnapshot) {\n state.events.splice(snapshot.eventsLength, 0, {\n type: EVENT_ID.MAPPING,\n start: snapshot.position,\n anchorStart: NO_RANGE,\n anchorEnd: NO_RANGE,\n tagStart: NO_RANGE,\n tagEnd: NO_RANGE,\n style: COLLECTION_STYLE.FLOW\n })\n}\n\nfunction addScalarEvent (\n state: ParserState,\n valueStart: number,\n valueEnd: number,\n anchorStart: number,\n anchorEnd: number,\n tagStart: number,\n tagEnd: number,\n style: ScalarStyle,\n chomping: ChompingMode = CHOMPING_MODE.CLIP,\n indent = -1,\n fast = false\n) {\n state.events.push({\n type: EVENT_ID.SCALAR,\n valueStart,\n valueEnd,\n anchorStart,\n anchorEnd,\n tagStart,\n tagEnd,\n style,\n chomping,\n indent,\n fast\n })\n}\n\nfunction addAliasEvent (\n state: ParserState,\n anchorStart: number,\n anchorEnd: number\n) {\n state.events.push({\n type: EVENT_ID.ALIAS,\n anchorStart,\n anchorEnd\n })\n}\n\nfunction addPopEvent (state: ParserState) {\n state.events.push({ type: EVENT_ID.POP })\n}\n\nfunction addEmptyScalarEvent (state: ParserState) {\n addScalarEvent(\n state,\n NO_RANGE,\n NO_RANGE,\n NO_RANGE,\n NO_RANGE,\n NO_RANGE,\n NO_RANGE,\n SCALAR_STYLE.PLAIN\n )\n}\n\nfunction emptyProperties (): NodeProperties {\n return {\n anchorStart: NO_RANGE,\n anchorEnd: NO_RANGE,\n tagStart: NO_RANGE,\n tagEnd: NO_RANGE\n }\n}\n\nfunction snapshotState (state: ParserState): ParserSnapshot {\n return {\n position: state.position,\n line: state.line,\n lineStart: state.lineStart,\n lineIndent: state.lineIndent,\n firstTabInLine: state.firstTabInLine,\n eventsLength: state.events.length\n }\n}\n\nfunction restoreState (state: ParserState, snapshot: ParserSnapshot) {\n state.position = snapshot.position\n state.line = snapshot.line\n state.lineStart = snapshot.lineStart\n state.lineIndent = snapshot.lineIndent\n state.firstTabInLine = snapshot.firstTabInLine\n state.events.length = snapshot.eventsLength\n}\n\nfunction throwError (state: ParserState, message: string): never {\n YAMLException.throwAt(state.input.slice(0, state.length), state.position, message, state.filename)\n}\n\nfunction isEol (c: number) {\n return c === 0x0A/* LF */ || c === 0x0D/* CR */\n}\n\nfunction isWhiteSpace (c: number) {\n return c === 0x09/* Tab */ || c === 0x20/* Space */\n}\n\nfunction isWsOrEol (c: number) {\n return isWhiteSpace(c) || isEol(c)\n}\n\nfunction isWsOrEolOrEnd (c: number) {\n return c === 0 || isWsOrEol(c)\n}\n\nfunction isFlowIndicator (c: number) {\n return c === 0x2C/* , */ ||\n c === 0x5B/* [ */ ||\n c === 0x5D/* ] */ ||\n c === 0x7B/* { */ ||\n c === 0x7D/* } */\n}\n\nfunction fromDecimalCode (c: number) {\n return c >= 0x30/* 0 */ && c <= 0x39/* 9 */ ? c - 0x30 : -1\n}\n\nfunction fromHexCode (c: number) {\n if (c >= 0x30/* 0 */ && c <= 0x39/* 9 */) return c - 0x30\n const lc = c | 0x20\n if (lc >= 0x61/* a */ && lc <= 0x66/* f */) return lc - 0x61 + 10\n return -1\n}\n\nfunction escapedHexLen (c: number) {\n if (c === 0x78/* x */) return 2\n if (c === 0x75/* u */) return 4\n if (c === 0x55/* U */) return 8\n return 0\n}\n\nfunction isSimpleEscape (c: number) {\n return c === 0x30/* 0 */ ||\n c === 0x61/* a */ ||\n c === 0x62/* b */ ||\n c === 0x74/* t */ ||\n c === 0x09/* Tab */ ||\n c === 0x6E/* n */ ||\n c === 0x76/* v */ ||\n c === 0x66/* f */ ||\n c === 0x72/* r */ ||\n c === 0x65/* e */ ||\n c === 0x20/* Space */ ||\n c === 0x22/* \" */ ||\n c === 0x2F/* / */ ||\n c === 0x5C/* \\ */ ||\n c === 0x4E/* N */ ||\n c === 0x5F/* _ */ ||\n c === 0x4C/* L */ ||\n c === 0x50/* P */\n}\n\n// Precondition: state.position points at LF or CR.\nfunction consumeLineBreak (state: ParserState) {\n const ch = state.input.charCodeAt(state.position)\n\n if (ch === 0x0A/* LF */) {\n state.position++\n } else {\n state.position++\n if (state.input.charCodeAt(state.position) === 0x0A/* LF */) state.position++\n }\n\n state.line++\n state.lineStart = state.position\n state.lineIndent = 0\n state.firstTabInLine = -1\n}\n\nfunction skipSeparationSpace (state: ParserState, allowComments: boolean) {\n let lineBreaks = 0\n let ch = state.input.charCodeAt(state.position)\n let hasSeparation = state.position === state.lineStart ||\n isWsOrEol(state.input.charCodeAt(state.position - 1))\n\n while (ch !== 0) {\n while (isWhiteSpace(ch)) {\n hasSeparation = true\n if (ch === 0x09/* Tab */ && state.firstTabInLine === -1) {\n state.firstTabInLine = state.position\n }\n ch = state.input.charCodeAt(++state.position)\n }\n\n if (allowComments && hasSeparation && ch === 0x23/* # */) {\n do { ch = state.input.charCodeAt(++state.position) }\n while (!isEol(ch) && ch !== 0)\n }\n\n if (!isEol(ch)) break\n\n consumeLineBreak(state)\n lineBreaks++\n hasSeparation = true\n ch = state.input.charCodeAt(state.position)\n\n while (ch === 0x20/* Space */) {\n state.lineIndent++\n ch = state.input.charCodeAt(++state.position)\n }\n }\n\n return lineBreaks\n}\n\nfunction testDocumentSeparator (state: ParserState, position = state.position) {\n const ch = state.input.charCodeAt(position)\n\n if ((ch === 0x2D/* - */ || ch === 0x2E/* . */) &&\n ch === state.input.charCodeAt(position + 1) &&\n ch === state.input.charCodeAt(position + 2)) {\n const following = state.input.charCodeAt(position + 3)\n return following === 0 || isWsOrEol(following)\n }\n\n return false\n}\n\nfunction skipByteOrderMark (state: ParserState) {\n if (state.position === state.lineStart &&\n state.input.charCodeAt(state.position) === 0xFEFF) {\n state.position++\n state.lineStart = state.position\n }\n}\n\nfunction testDocumentBoundary (state: ParserState) {\n if (state.position !== state.lineStart) return false\n\n // Fast path: most document boundaries do not have a BOM.\n if (testDocumentSeparator(state)) return true\n if (state.input.charCodeAt(state.position) !== 0xFEFF) return false\n\n // BOM-prefixed boundaries are rare, so snapshot/restore overhead is negligible.\n const snapshot = snapshotState(state)\n\n skipByteOrderMark(state)\n skipSeparationSpace(state, true)\n\n const ch = state.input.charCodeAt(state.position)\n const result = state.position === state.lineStart &&\n (ch === 0x25/* % */ || (ch === 0x2D/* - */ && testDocumentSeparator(state)))\n\n restoreState(state, snapshot)\n return result\n}\n\nfunction skipUntilLineEnd (state: ParserState) {\n let ch = state.input.charCodeAt(state.position)\n\n while (ch !== 0 && !isEol(ch)) {\n ch = state.input.charCodeAt(++state.position)\n }\n}\n\nfunction checkPrintable (state: ParserState, start: number, end: number) {\n if (PATTERN_NON_PRINTABLE.test(state.input.slice(start, end))) {\n throwError(state, 'the stream contains non-printable characters')\n }\n}\n\nfunction readTagProperty (state: ParserState, props: NodeProperties, inFlow: boolean) {\n if (state.input.charCodeAt(state.position) !== 0x21/* ! */) return false\n if (props.tagStart !== NO_RANGE) throwError(state, 'duplication of a tag property')\n\n const start = state.position\n let isVerbatim = false\n let isNamed = false\n let tagHandle = '!'\n let ch = state.input.charCodeAt(++state.position)\n\n if (ch === 0x3C/* < */) {\n isVerbatim = true\n ch = state.input.charCodeAt(++state.position)\n } else if (ch === 0x21/* ! */) {\n isNamed = true\n tagHandle = '!!'\n ch = state.input.charCodeAt(++state.position)\n }\n\n let suffixStart = state.position\n let tagName\n\n if (isVerbatim) {\n while (ch !== 0 && ch !== 0x3E/* > */) ch = state.input.charCodeAt(++state.position)\n if (ch !== 0x3E/* > */) throwError(state, 'unexpected end of the stream within a verbatim tag')\n tagName = state.input.slice(suffixStart, state.position)\n state.position++\n } else {\n while (ch !== 0 && !isWsOrEol(ch) && !(inFlow && isFlowIndicator(ch))) {\n if (ch === 0x21/* ! */) {\n if (!isNamed) {\n tagHandle = state.input.slice(suffixStart - 1, state.position + 1)\n if (!PATTERN_TAG_HANDLE.test(tagHandle)) throwError(state, 'named tag handle cannot contain such characters')\n isNamed = true\n suffixStart = state.position + 1\n } else {\n throwError(state, 'tag suffix cannot contain exclamation marks')\n }\n }\n\n ch = state.input.charCodeAt(++state.position)\n }\n\n tagName = state.input.slice(suffixStart, state.position)\n if (PATTERN_FLOW_INDICATORS.test(tagName)) throwError(state, 'tag suffix cannot contain flow indicator characters')\n }\n\n if (tagName && !(isVerbatim ? PATTERN_TAG_URI.test(tagName) : PATTERN_TAG_SUFFIX.test(tagName))) {\n throwError(state, `tag name cannot contain such characters: ${tagName}`)\n }\n try {\n decodeURIComponent(tagName)\n } catch {\n throwError(state, `tag name is malformed: ${tagName}`)\n }\n\n if (!isVerbatim && tagHandle !== '!' && tagHandle !== '!!' && !HAS_OWN.call(state.tagHandlers, tagHandle)) {\n throwError(state, `undeclared tag handle \"${tagHandle}\"`)\n }\n\n props.tagStart = start\n props.tagEnd = state.position\n return true\n}\n\nfunction readAnchorProperty (state: ParserState, props: NodeProperties) {\n if (state.input.charCodeAt(state.position) !== 0x26/* & */) return false\n if (props.anchorStart !== NO_RANGE) throwError(state, 'duplication of an anchor property')\n\n state.position++\n const start = state.position\n\n while (state.input.charCodeAt(state.position) !== 0 && !isWsOrEol(state.input.charCodeAt(state.position)) && !isFlowIndicator(state.input.charCodeAt(state.position))) {\n state.position++\n }\n\n if (state.position === start) throwError(state, 'name of an anchor node must contain at least one character')\n\n props.anchorStart = start\n props.anchorEnd = state.position\n return true\n}\n\nfunction readAlias (state: ParserState, props: NodeProperties) {\n if (state.input.charCodeAt(state.position) !== 0x2A/* * */) return false\n if (props.anchorStart !== NO_RANGE || props.tagStart !== NO_RANGE) {\n throwError(state, 'alias node should not have any properties')\n }\n\n state.position++\n const start = state.position\n\n while (state.input.charCodeAt(state.position) !== 0 && !isWsOrEol(state.input.charCodeAt(state.position)) && !isFlowIndicator(state.input.charCodeAt(state.position))) {\n state.position++\n }\n\n if (state.position === start) throwError(state, 'name of an alias node must contain at least one character')\n\n addAliasEvent(state, start, state.position)\n return true\n}\n\nfunction readFlowScalarBreak (state: ParserState, nodeIndent: number) {\n skipSeparationSpace(state, false)\n\n if (state.lineIndent < nodeIndent) {\n throwError(state, 'deficient indentation')\n }\n}\n\nfunction readSingleQuotedScalar (state: ParserState, nodeIndent: number, props: NodeProperties) {\n if (state.input.charCodeAt(state.position) !== 0x27/* ' */) return false\n\n state.position++\n const start = state.position\n // A single-quoted scalar is sliceable verbatim when it has no '' escape pairs\n // and no folded line breaks (see getScalarValue fast path).\n let simple = true\n\n while (state.input.charCodeAt(state.position) !== 0) {\n const ch = state.input.charCodeAt(state.position)\n\n if (ch === 0x27/* ' */) {\n if (state.input.charCodeAt(state.position + 1) === 0x27/* ' */) {\n simple = false\n state.position += 2\n continue\n }\n\n const end = state.position\n state.position++\n addScalarEvent(state, start, end, props.anchorStart, props.anchorEnd, props.tagStart, props.tagEnd, SCALAR_STYLE.SINGLE_QUOTED, CHOMPING_MODE.CLIP, -1, simple)\n return true\n }\n\n if (isEol(ch)) {\n simple = false\n readFlowScalarBreak(state, nodeIndent)\n } else if (state.position === state.lineStart && testDocumentSeparator(state)) {\n throwError(state, 'unexpected end of the document within a single quoted scalar')\n } else if (ch !== 0x09/* Tab */ && ch < 0x20) {\n throwError(state, 'expected valid JSON character')\n } else {\n state.position++\n }\n }\n\n throwError(state, 'unexpected end of the stream within a single quoted scalar')\n}\n\nfunction readDoubleQuotedScalar (state: ParserState, nodeIndent: number, props: NodeProperties) {\n if (state.input.charCodeAt(state.position) !== 0x22/* \" */) return false\n\n state.position++\n const start = state.position\n // A double-quoted scalar is sliceable verbatim when it has no \\ escapes and\n // no folded line breaks (see getScalarValue fast path).\n let simple = true\n\n while (state.input.charCodeAt(state.position) !== 0) {\n const ch = state.input.charCodeAt(state.position)\n\n if (ch === 0x22/* \" */) {\n const end = state.position\n state.position++\n addScalarEvent(state, start, end, props.anchorStart, props.anchorEnd, props.tagStart, props.tagEnd, SCALAR_STYLE.DOUBLE_QUOTED, CHOMPING_MODE.CLIP, -1, simple)\n return true\n }\n\n if (ch === 0x5C/* \\ */) {\n simple = false\n const escaped = state.input.charCodeAt(++state.position)\n\n if (isEol(escaped)) {\n readFlowScalarBreak(state, nodeIndent)\n } else if (isSimpleEscape(escaped)) {\n state.position++\n } else {\n let hexLength = escapedHexLen(escaped)\n\n if (hexLength === 0) throwError(state, 'unknown escape sequence')\n\n while (hexLength-- > 0) {\n state.position++\n if (fromHexCode(state.input.charCodeAt(state.position)) < 0) {\n throwError(state, 'expected hexadecimal character')\n }\n }\n state.position++\n }\n } else if (isEol(ch)) {\n simple = false\n readFlowScalarBreak(state, nodeIndent)\n } else if (state.position === state.lineStart && testDocumentSeparator(state)) {\n throwError(state, 'unexpected end of the document within a double quoted scalar')\n } else if (ch !== 0x09/* Tab */ && ch < 0x20) {\n throwError(state, 'expected valid JSON character')\n } else {\n state.position++\n }\n }\n\n throwError(state, 'unexpected end of the stream within a double quoted scalar')\n}\n\nfunction readBlockScalar (state: ParserState, parentIndent: number, props: NodeProperties) {\n const ch = state.input.charCodeAt(state.position)\n let chomping: ChompingMode = CHOMPING_MODE.CLIP\n let indent = -1\n let detectedIndent = false\n\n if (ch !== 0x7C/* | */ && ch !== 0x3E/* > */) return false\n\n const style = ch === 0x7C/* | */ ? SCALAR_STYLE.LITERAL_BLOCK : SCALAR_STYLE.FOLDED_BLOCK\n state.position++\n\n while (state.input.charCodeAt(state.position) !== 0) {\n const current = state.input.charCodeAt(state.position)\n const digit = fromDecimalCode(current)\n\n if (current === 0x2B/* + */ || current === 0x2D/* - */) {\n if (chomping !== CHOMPING_MODE.CLIP) throwError(state, 'repeat of a chomping mode identifier')\n chomping = current === 0x2B/* + */ ? CHOMPING_MODE.KEEP : CHOMPING_MODE.STRIP\n state.position++\n } else if (digit >= 0) {\n if (digit === 0) {\n throwError(state, 'bad explicit indentation width of a block scalar; it cannot be less than one')\n }\n if (detectedIndent) throwError(state, 'repeat of an indentation width identifier')\n indent = parentIndent + digit - 1\n detectedIndent = true\n state.position++\n } else {\n break\n }\n }\n\n let hadWhitespace = false\n while (isWhiteSpace(state.input.charCodeAt(state.position))) {\n hadWhitespace = true\n state.position++\n }\n if (hadWhitespace && state.input.charCodeAt(state.position) === 0x23/* # */) skipUntilLineEnd(state)\n\n if (isEol(state.input.charCodeAt(state.position))) {\n consumeLineBreak(state)\n } else if (state.input.charCodeAt(state.position) !== 0) {\n throwError(state, 'a line break is expected')\n }\n\n let contentIndent = detectedIndent ? indent : -1\n let maxLeadingIndent = 0\n const valueStart = state.position\n let valueEnd = state.position\n\n while (state.input.charCodeAt(state.position) !== 0) {\n const linePosition = state.position\n let column = 0\n\n while (state.input.charCodeAt(linePosition + column) === 0x20/* Space */) column++\n\n const first = state.input.charCodeAt(linePosition + column)\n if (first === 0) {\n // End of input acts as a line terminator, but there is no line break to\n // include here. A final all-spaces line still counts: when the block has a\n // content indent, the spaces beyond it are real content; in a wholly blank\n // block (contentIndent < 0) the spaces form a blank line that chomping must\n // see, exactly as it would if the line ended with a break. Capture the line\n // in both cases; otherwise the block ends at the start of this empty line.\n if (contentIndent >= 0) {\n if (column > contentIndent) valueEnd = linePosition + column\n } else if (column > 0) {\n valueEnd = linePosition + column\n }\n break\n }\n if (testDocumentBoundary(state)) break\n\n if (!detectedIndent && contentIndent === -1 && isEol(first)) {\n maxLeadingIndent = Math.max(maxLeadingIndent, column)\n }\n\n if (!detectedIndent && contentIndent === -1 && !isEol(first)) {\n if (first === 0x09/* Tab */ && column < parentIndent) {\n state.position = linePosition + column\n throwError(state, 'tab characters must not be used in indentation')\n }\n if (column < maxLeadingIndent) {\n state.position = linePosition + column\n throwError(state, 'bad indentation of a mapping entry')\n }\n }\n\n if (contentIndent === -1 && first !== 0 && !isEol(first) && column < parentIndent) {\n state.lineIndent = column\n state.position = linePosition + column\n break\n }\n\n if (!detectedIndent && first !== 0 && !isEol(first) && contentIndent === -1) {\n contentIndent = column\n }\n\n const requiredIndent = contentIndent === -1 ? parentIndent + 1 : contentIndent\n if (first !== 0 && !isEol(first) && column < requiredIndent) {\n state.lineIndent = column\n state.position = linePosition + column\n break\n }\n\n skipUntilLineEnd(state)\n valueEnd = state.position\n if (isEol(state.input.charCodeAt(state.position))) {\n consumeLineBreak(state)\n // Include the line break in the range so trailing blank lines are\n // preserved. This is what lets cook tell apart an empty `|+` (range \"\",\n // value \"\") from a `|+` with one blank line (range \"\\n\", value \"\\n\").\n // De-indent and chomping are applied later in getScalarValue.\n valueEnd = state.position\n }\n }\n\n checkPrintable(state, valueStart, valueEnd)\n addScalarEvent(\n state,\n valueStart,\n valueEnd,\n props.anchorStart,\n props.anchorEnd,\n props.tagStart,\n props.tagEnd,\n style,\n chomping,\n contentIndent\n )\n return true\n}\n\nfunction canStartPlainScalar (state: ParserState, nodeContext: NodeContext) {\n const ch = state.input.charCodeAt(state.position)\n const inFlow = nodeContext === CONTEXT_FLOW_IN\n\n if (ch === 0 ||\n isWsOrEol(ch) ||\n ch === 0x23/* # */ ||\n ch === 0x26/* & */ ||\n ch === 0x2A/* * */ ||\n ch === 0x21/* ! */ ||\n ch === 0x7C/* | */ ||\n ch === 0x3E/* > */ ||\n ch === 0x27/* ' */ ||\n ch === 0x22/* \" */ ||\n ch === 0x25/* % */ ||\n ch === 0x40/* @ */ ||\n ch === 0x60/* ` */ ||\n (inFlow && isFlowIndicator(ch))) {\n return false\n }\n\n if (ch === 0x3F/* ? */ || ch === 0x2D/* - */) {\n const following = state.input.charCodeAt(state.position + 1)\n if (isWsOrEolOrEnd(following) || (inFlow && isFlowIndicator(following))) return false\n }\n\n return true\n}\n\nfunction readPlainScalar (state: ParserState, nodeIndent: number, nodeContext: NodeContext, props: NodeProperties) {\n if (!canStartPlainScalar(state, nodeContext)) return false\n\n const start = state.position\n let end = state.position\n let ch = state.input.charCodeAt(state.position)\n const inFlow = nodeContext === CONTEXT_FLOW_IN\n // A single-line plain scalar is sliceable verbatim: the parser already trims\n // trailing whitespace from the range, so no folding is needed (see\n // getScalarValue fast path). Folded line breaks make it non-simple.\n let multiline = false\n\n while (ch !== 0) {\n if (testDocumentBoundary(state)) break\n\n if (ch === 0x3A/* : */) {\n const following = state.input.charCodeAt(state.position + 1)\n if (isWsOrEolOrEnd(following) || (inFlow && isFlowIndicator(following))) break\n } else if (ch === 0x23/* # */) {\n const preceding = state.input.charCodeAt(state.position - 1)\n if (isWsOrEol(preceding)) break\n } else if (inFlow && isFlowIndicator(ch)) {\n break\n } else if (isEol(ch)) {\n const savedPosition = state.position\n const savedLine = state.line\n const savedLineStart = state.lineStart\n const savedLineIndent = state.lineIndent\n\n skipSeparationSpace(state, false)\n\n if (state.lineIndent >= nodeIndent) {\n multiline = true\n ch = state.input.charCodeAt(state.position)\n continue\n }\n\n state.position = savedPosition\n state.line = savedLine\n state.lineStart = savedLineStart\n state.lineIndent = savedLineIndent\n break\n }\n\n if (!isWhiteSpace(ch)) end = state.position + 1\n ch = state.input.charCodeAt(++state.position)\n }\n\n if (end === start) return false\n\n checkPrintable(state, start, end)\n addScalarEvent(state, start, end, props.anchorStart, props.anchorEnd, props.tagStart, props.tagEnd, SCALAR_STYLE.PLAIN, CHOMPING_MODE.CLIP, -1, !multiline)\n return true\n}\n\nfunction findBlockMappingColon (state: ParserState) {\n let position = state.position\n let flowLevel = 0\n\n while (position < state.length) {\n const ch = state.input.charCodeAt(position)\n\n if (isEol(ch)) return -1\n if (ch === 0x23/* # */ && isWsOrEol(state.input.charCodeAt(position - 1))) return -1\n\n if ((ch === 0x2A/* * */ || ch === 0x26/* & */) && position === state.position) {\n do { position++ }\n while (state.input.charCodeAt(position) !== 0 &&\n !isWsOrEol(state.input.charCodeAt(position)) &&\n !isFlowIndicator(state.input.charCodeAt(position)))\n continue\n }\n\n if (ch === 0x5B/* [ */ || ch === 0x7B/* { */) {\n flowLevel++\n } else if (ch === 0x5D/* ] */ || ch === 0x7D/* } */) {\n if (flowLevel > 0) flowLevel--\n } else if (flowLevel === 0 && ch === 0x3A/* : */ && isWsOrEol(state.input.charCodeAt(position + 1))) {\n return position\n }\n\n if ((flowLevel > 0 || position === state.position) &&\n (ch === 0x27/* ' */ || ch === 0x22/* \" */)) {\n const quote = ch\n position++\n\n while (position < state.length && state.input.charCodeAt(position) !== quote) {\n if (state.input.charCodeAt(position) === 0x5C/* \\ */ && quote === 0x22/* \" */) position++\n position++\n }\n }\n\n position++\n }\n\n return -1\n}\n\nfunction skipFlowSeparationSpace (state: ParserState, nodeIndent: number) {\n const startLine = state.line\n skipSeparationSpace(state, true)\n\n if ((state.line > startLine && state.lineIndent < nodeIndent) ||\n (state.firstTabInLine !== -1 && state.lineIndent < nodeIndent)) {\n throwError(state, 'deficient indentation')\n }\n}\n\nfunction readFlowCollection (state: ParserState, nodeIndent: number, props: NodeProperties) {\n const ch = state.input.charCodeAt(state.position)\n const isMapping = ch === 0x7B/* { */\n const start = state.position\n let readNext = true\n\n if (ch !== 0x5B/* [ */ && ch !== 0x7B/* { */) return false\n\n const terminator = isMapping ? 0x7D/* } */ : 0x5D/* ] */\n\n if (isMapping) {\n addMappingEvent(state, start, props.anchorStart, props.anchorEnd, props.tagStart, props.tagEnd, COLLECTION_STYLE.FLOW)\n } else {\n addSequenceEvent(state, start, props.anchorStart, props.anchorEnd, props.tagStart, props.tagEnd, COLLECTION_STYLE.FLOW)\n }\n\n state.position++\n\n while (state.input.charCodeAt(state.position) !== 0) {\n skipFlowSeparationSpace(state, nodeIndent)\n\n let ch = state.input.charCodeAt(state.position)\n\n if (ch === terminator) {\n state.position++\n addPopEvent(state)\n return true\n } else if (!readNext) {\n throwError(state, 'missed comma between flow collection entries')\n } else if (ch === 0x2C/* , */) {\n throwError(state, \"expected the node content, but found ','\")\n }\n\n let isPair = false\n let isExplicitPair = false\n\n if (ch === 0x3F/* ? */ && isWsOrEol(state.input.charCodeAt(state.position + 1))) {\n isPair = isExplicitPair = true\n state.position += 1\n skipFlowSeparationSpace(state, nodeIndent)\n }\n\n const entryLine = state.line\n const entryStart = snapshotState(state)\n\n const keyWasRead = parseNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true)\n skipFlowSeparationSpace(state, nodeIndent)\n\n ch = state.input.charCodeAt(state.position)\n\n if ((isMapping || isExplicitPair || state.line === entryLine) && ch === 0x3A/* : */) {\n isPair = true\n state.position++\n skipFlowSeparationSpace(state, nodeIndent)\n if (!isMapping) {\n insertFlowPairMappingEvent(state, entryStart)\n if (!keyWasRead) addEmptyScalarEvent(state)\n } else if (!keyWasRead) {\n addEmptyScalarEvent(state)\n }\n if (!parseNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true)) {\n addEmptyScalarEvent(state)\n }\n skipFlowSeparationSpace(state, nodeIndent)\n if (!isMapping) addPopEvent(state)\n } else if (isMapping && isPair) {\n if (!keyWasRead) addEmptyScalarEvent(state)\n addEmptyScalarEvent(state)\n } else if (isMapping) {\n addEmptyScalarEvent(state)\n } else if (isPair) {\n insertFlowPairMappingEvent(state, entryStart)\n if (!keyWasRead) addEmptyScalarEvent(state)\n addEmptyScalarEvent(state)\n addPopEvent(state)\n }\n\n ch = state.input.charCodeAt(state.position)\n\n if (ch === 0x2C/* , */) {\n readNext = true\n state.position++\n } else {\n readNext = false\n }\n }\n\n throwError(state, 'unexpected end of the stream within a flow collection')\n}\n\nfunction readBlockSequence (state: ParserState, nodeIndent: number, props: NodeProperties) {\n if (state.firstTabInLine !== -1 || state.input.charCodeAt(state.position) !== 0x2D/* - */ || !isWsOrEolOrEnd(state.input.charCodeAt(state.position + 1))) {\n return false\n }\n\n addSequenceEvent(state, state.position, props.anchorStart, props.anchorEnd, props.tagStart, props.tagEnd, COLLECTION_STYLE.BLOCK)\n\n while (state.input.charCodeAt(state.position) === 0x2D/* - */ && isWsOrEolOrEnd(state.input.charCodeAt(state.position + 1))) {\n if (state.firstTabInLine !== -1) {\n state.position = state.firstTabInLine\n throwError(state, 'tab characters must not be used in indentation')\n }\n\n const entryLine = state.line\n state.position++\n\n const hadBreak = skipSeparationSpace(state, true) > 0\n if (state.firstTabInLine !== -1 &&\n state.input.charCodeAt(state.position) === 0x2D/* - */ &&\n isWsOrEolOrEnd(state.input.charCodeAt(state.position + 1))) {\n throwError(state, 'bad indentation of a sequence entry')\n }\n\n if (hadBreak && state.lineIndent <= nodeIndent) {\n addEmptyScalarEvent(state)\n } else {\n parseNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true)\n }\n\n skipSeparationSpace(state, true)\n\n if (state.lineIndent < nodeIndent || state.position >= state.length) break\n if (state.lineIndent > nodeIndent) throwError(state, 'bad indentation of a sequence entry')\n if (state.line === entryLine &&\n state.input.charCodeAt(state.position) === 0x2D/* - */ &&\n isWsOrEolOrEnd(state.input.charCodeAt(state.position + 1))) {\n throwError(state, 'bad indentation of a sequence entry')\n }\n }\n\n addPopEvent(state)\n return true\n}\n\nfunction readBlockMapping (state: ParserState, nodeIndent: number, flowIndent: number, props: NodeProperties) {\n let atExplicitKey = false\n let detected = false\n let mappingOpened = false\n let pendingExplicitKey = false\n\n if (state.firstTabInLine !== -1) return false\n\n let ch = state.input.charCodeAt(state.position)\n\n while (ch !== 0) {\n if (!atExplicitKey && state.firstTabInLine !== -1) {\n state.position = state.firstTabInLine\n throwError(state, 'tab characters must not be used in indentation')\n }\n\n const following = state.input.charCodeAt(state.position + 1)\n const entryLine = state.line\n\n if ((ch === 0x3F/* ? */ || ch === 0x3A/* : */) && isWsOrEolOrEnd(following)) {\n if (!mappingOpened) {\n addMappingEvent(state, state.position, props.anchorStart, props.anchorEnd, props.tagStart, props.tagEnd, COLLECTION_STYLE.BLOCK)\n mappingOpened = true\n }\n\n if (ch === 0x3F/* ? */) {\n if (atExplicitKey) addEmptyScalarEvent(state)\n detected = true\n atExplicitKey = true\n } else if (atExplicitKey) {\n atExplicitKey = false\n } else {\n addEmptyScalarEvent(state)\n detected = true\n atExplicitKey = false\n }\n\n state.position += 1\n pendingExplicitKey = true\n } else {\n // An explicit key awaiting its value, followed by an implicit key, means\n // the explicit key's value is empty. Emit it now (append-only) so it is\n // ordered before the implicit key node read just below.\n if (atExplicitKey) {\n addEmptyScalarEvent(state)\n atExplicitKey = false\n }\n\n const beforeKey = snapshotState(state)\n\n if (!parseNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) {\n break\n }\n\n if (state.line === entryLine) {\n ch = state.input.charCodeAt(state.position)\n\n while (isWhiteSpace(ch)) {\n ch = state.input.charCodeAt(++state.position)\n }\n\n if (ch === 0x3A/* : */) {\n ch = state.input.charCodeAt(++state.position)\n\n if (!isWsOrEolOrEnd(ch)) {\n throwError(state, 'a whitespace character is expected after the key-value separator within a block mapping')\n }\n\n if (!mappingOpened) {\n restoreState(state, beforeKey)\n addMappingEvent(state, beforeKey.position, props.anchorStart, props.anchorEnd, props.tagStart, props.tagEnd, COLLECTION_STYLE.BLOCK)\n mappingOpened = true\n // The key, the `:` and the space after it were already validated\n // above, before the rollback. Re-reading the same input cannot\n // fail, so just consume it again without error checks.\n parseNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)\n\n ch = state.input.charCodeAt(state.position)\n while (isWhiteSpace(ch)) {\n ch = state.input.charCodeAt(++state.position)\n }\n\n state.position++\n }\n\n detected = true\n atExplicitKey = false\n pendingExplicitKey = false\n } else if (detected) {\n throwError(state, \"expected ':' after a mapping key\")\n } else {\n // Not a mapping. If outer properties are pending, roll back so the\n // caller re-reads this node with them attached (events are append-only).\n if (props.anchorStart !== NO_RANGE || props.tagStart !== NO_RANGE) {\n restoreState(state, beforeKey)\n return false\n }\n return true\n }\n } else if (detected) {\n throwError(state, 'can not read a block mapping entry; a multiline key may not be an implicit key')\n } else {\n if (props.anchorStart !== NO_RANGE || props.tagStart !== NO_RANGE) {\n restoreState(state, beforeKey)\n return false\n }\n return true\n }\n }\n\n if (parseNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, pendingExplicitKey)) {\n pendingExplicitKey = false\n }\n\n if (!atExplicitKey) {\n if (pendingExplicitKey) {\n addEmptyScalarEvent(state)\n pendingExplicitKey = false\n }\n }\n\n skipSeparationSpace(state, true)\n ch = state.input.charCodeAt(state.position)\n\n if ((state.line === entryLine || state.lineIndent > nodeIndent) && ch !== 0) {\n throwError(state, 'bad indentation of a mapping entry')\n } else if (state.lineIndent < nodeIndent) {\n break\n }\n }\n\n if (!detected) return false\n if (atExplicitKey) addEmptyScalarEvent(state)\n if (mappingOpened) addPopEvent(state)\n return true\n}\n\nfunction parseNode (\n state: ParserState,\n parentIndent: number,\n nodeContext: NodeContext,\n allowToSeek: boolean,\n allowCompact: boolean,\n allowPropertyMapping = true\n): boolean {\n if (state.depth >= state.maxDepth) {\n throwError(state, `nesting exceeded maxDepth (${state.maxDepth})`)\n }\n\n state.depth++\n\n let indentStatus = 1\n let atNewLine = false\n let hasContent = false\n let propertyStart: ParserSnapshot | null = null\n const props = emptyProperties()\n\n let allowBlockScalars = nodeContext === CONTEXT_BLOCK_OUT || nodeContext === CONTEXT_BLOCK_IN\n let allowBlockCollections = allowBlockScalars\n const allowBlockStyles = allowBlockScalars\n\n if (allowToSeek && skipSeparationSpace(state, true)) {\n atNewLine = true\n\n if (state.lineIndent > parentIndent) {\n indentStatus = 1\n } else if (state.lineIndent === parentIndent) {\n indentStatus = 0\n } else {\n indentStatus = -1\n }\n }\n\n if (indentStatus === 1) {\n while (true) {\n const ch = state.input.charCodeAt(state.position)\n const propertyState = snapshotState(state)\n\n if (atNewLine &&\n indentStatus !== 1 &&\n (ch === 0x21/* ! */ || ch === 0x26/* & */)) {\n break\n }\n\n if (atNewLine &&\n allowBlockStyles &&\n (props.tagStart !== NO_RANGE || props.anchorStart !== NO_RANGE) &&\n (ch === 0x21/* ! */ || ch === 0x26/* & */)) {\n const fallbackState = snapshotState(state)\n const flowIndent = parentIndent + 1\n const mappingIndent = state.position - state.lineStart\n\n if (readBlockMapping(state, mappingIndent, flowIndent, props) &&\n state.events[fallbackState.eventsLength]?.type === EVENT_ID.MAPPING) {\n state.depth--\n return true\n }\n\n restoreState(state, fallbackState)\n }\n\n if (atNewLine &&\n ((ch === 0x21/* ! */ && props.tagStart !== NO_RANGE) ||\n (ch === 0x26/* & */ && props.anchorStart !== NO_RANGE))) {\n break\n }\n\n if (!readTagProperty(state, props, nodeContext === CONTEXT_FLOW_IN) && !readAnchorProperty(state, props)) {\n break\n }\n\n if (propertyStart === null) propertyStart = propertyState\n\n if (skipSeparationSpace(state, true)) {\n atNewLine = true\n allowBlockCollections = allowBlockStyles\n\n if (state.lineIndent > parentIndent) {\n indentStatus = 1\n } else if (state.lineIndent === parentIndent) {\n indentStatus = 0\n } else {\n indentStatus = -1\n }\n } else {\n allowBlockCollections = false\n }\n }\n }\n\n if (allowBlockCollections) {\n allowBlockCollections = atNewLine || allowCompact\n }\n\n if (indentStatus === 1 || nodeContext === CONTEXT_BLOCK_OUT) {\n const flowIndent = nodeContext === CONTEXT_FLOW_IN || nodeContext === CONTEXT_FLOW_OUT\n ? parentIndent\n : parentIndent + 1\n const blockIndent = state.position - state.lineStart\n\n if (indentStatus === 1) {\n if ((allowBlockCollections &&\n (readBlockSequence(state, blockIndent, props) ||\n readBlockMapping(state, blockIndent, flowIndent, props))) ||\n readFlowCollection(state, flowIndent, props)) {\n hasContent = true\n } else {\n const ch = state.input.charCodeAt(state.position)\n\n if (propertyStart !== null && allowPropertyMapping && allowBlockStyles && !allowBlockCollections &&\n ch !== 0x7C/* | */ && ch !== 0x3E/* > */) {\n const fallbackState = snapshotState(state)\n const propertyIndent = propertyStart.position - propertyStart.lineStart\n\n restoreState(state, propertyStart)\n\n if (readBlockMapping(state, propertyIndent, flowIndent, emptyProperties()) &&\n state.events[fallbackState.eventsLength]?.type === EVENT_ID.MAPPING) {\n hasContent = true\n } else {\n restoreState(state, fallbackState)\n }\n }\n\n if (!hasContent &&\n ((allowBlockScalars && readBlockScalar(state, flowIndent, props)) ||\n readSingleQuotedScalar(state, flowIndent, props) ||\n readDoubleQuotedScalar(state, flowIndent, props) ||\n readAlias(state, props) ||\n readPlainScalar(state, flowIndent, nodeContext, props))) {\n hasContent = true\n }\n }\n } else if (indentStatus === 0) {\n hasContent = allowBlockCollections && readBlockSequence(state, blockIndent, props)\n }\n }\n\n allowBlockScalars = allowBlockScalars && !hasContent\n\n if (!hasContent && (props.anchorStart !== NO_RANGE || props.tagStart !== NO_RANGE || allowBlockScalars)) {\n addScalarEvent(\n state,\n NO_RANGE,\n NO_RANGE,\n props.anchorStart,\n props.anchorEnd,\n props.tagStart,\n props.tagEnd,\n SCALAR_STYLE.PLAIN\n )\n hasContent = true\n }\n\n state.depth--\n return hasContent || props.anchorStart !== NO_RANGE || props.tagStart !== NO_RANGE\n}\n\nfunction readDirective (state: ParserState) {\n if (state.lineIndent > 0 || state.input.charCodeAt(state.position) !== 0x25/* % */) return false\n\n state.position++\n const nameStart = state.position\n\n while (state.input.charCodeAt(state.position) !== 0 && !isWsOrEol(state.input.charCodeAt(state.position))) state.position++\n\n const name = state.input.slice(nameStart, state.position)\n const args: string[] = []\n\n if (name.length === 0) throwError(state, 'directive name must not be less than one character in length')\n\n while (state.input.charCodeAt(state.position) !== 0 && !isEol(state.input.charCodeAt(state.position))) {\n while (isWhiteSpace(state.input.charCodeAt(state.position))) state.position++\n if (state.input.charCodeAt(state.position) === 0x23/* # */ || isEol(state.input.charCodeAt(state.position)) || state.input.charCodeAt(state.position) === 0) break\n\n const start = state.position\n while (state.input.charCodeAt(state.position) !== 0 && !isWsOrEol(state.input.charCodeAt(state.position))) state.position++\n args.push(state.input.slice(start, state.position))\n }\n\n if (isEol(state.input.charCodeAt(state.position))) consumeLineBreak(state)\n\n if (name === 'YAML') {\n if (state.directives.some(directive => directive.kind === 'yaml')) throwError(state, 'duplication of %YAML directive')\n if (args.length !== 1) throwError(state, 'YAML directive accepts exactly one argument')\n\n const match = /^([0-9]+)\\.([0-9]+)$/.exec(args[0])\n if (match === null) throwError(state, 'ill-formed argument of the YAML directive')\n if (parseInt(match[1], 10) !== 1) throwError(state, 'unacceptable YAML version of the document')\n\n state.directives.push({ kind: 'yaml', version: args[0] })\n } else if (name === 'TAG') {\n if (args.length !== 2) throwError(state, 'TAG directive accepts exactly two arguments')\n\n const [handle, prefix] = args\n if (!PATTERN_TAG_HANDLE.test(handle)) throwError(state, 'ill-formed tag handle (first argument) of the TAG directive')\n if (HAS_OWN.call(state.tagHandlers, handle)) throwError(state, `there is a previously declared suffix for \"${handle}\" tag handle`)\n if (!PATTERN_TAG_PREFIX.test(prefix)) throwError(state, 'ill-formed tag prefix (second argument) of the TAG directive')\n try {\n decodeURIComponent(prefix)\n } catch {\n throwError(state, `tag prefix is malformed: ${prefix}`)\n }\n\n state.tagHandlers[handle] = prefix\n state.directives.push({ kind: 'tag', handle, prefix })\n }\n\n return true\n}\n\nfunction readDocument (state: ParserState) {\n state.directives = []\n state.tagHandlers = Object.create(null)\n let hasDirectives = false\n\n skipSeparationSpace(state, true)\n\n while (readDirective(state)) {\n hasDirectives = true\n skipSeparationSpace(state, true)\n }\n\n let explicitStart = false\n let explicitEnd = false\n let allowCompact = true\n\n if (state.lineIndent === 0 &&\n state.input.charCodeAt(state.position) === 0x2D/* - */ &&\n state.input.charCodeAt(state.position + 1) === 0x2D/* - */ &&\n state.input.charCodeAt(state.position + 2) === 0x2D/* - */ &&\n isWsOrEolOrEnd(state.input.charCodeAt(state.position + 3))) {\n explicitStart = true\n const markerLine = state.line\n state.position += 3\n skipSeparationSpace(state, true)\n allowCompact = state.line > markerLine\n } else if (hasDirectives) {\n throwError(state, 'directives end mark is expected')\n }\n\n const documentEventIndex = state.events.length\n if (!explicitStart &&\n state.position === state.lineStart &&\n state.input.charCodeAt(state.position) === 0x2E/* . */ &&\n testDocumentSeparator(state)) {\n state.position += 3\n skipSeparationSpace(state, true)\n return\n }\n\n addDocumentEvent(state, explicitStart, false)\n if (!parseNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, allowCompact, allowCompact)) {\n addEmptyScalarEvent(state)\n }\n skipSeparationSpace(state, true)\n\n if (state.position === state.lineStart && testDocumentSeparator(state)) {\n explicitEnd = state.input.charCodeAt(state.position) === 0x2E/* . */\n if (explicitEnd) {\n const markerLine = state.line\n state.position += 3\n skipSeparationSpace(state, true)\n if (state.line === markerLine && state.position < state.length) {\n throwError(state, 'end of the stream or a document separator is expected')\n }\n }\n }\n\n const documentEvent = state.events[documentEventIndex]\n if (documentEvent?.type === EVENT_ID.DOCUMENT) documentEvent.explicitEnd = explicitEnd\n\n addPopEvent(state)\n\n if (!explicitEnd &&\n state.position < state.length &&\n !testDocumentBoundary(state)) {\n throwError(state, 'end of the stream or a document separator is expected')\n }\n}\n\n/**\n * Parses YAML into a flat event stream referencing source text by offsets.\n *\n * @category Events\n */\nfunction parseEvents (input: string, options: ParserOptions): Event[] {\n const length = input.length\n const state: ParserState = {\n ...DEFAULT_PARSER_OPTIONS,\n ...options,\n input: `${input}\\0`,\n length,\n position: 0,\n line: 0,\n lineStart: 0,\n lineIndent: 0,\n firstTabInLine: -1,\n depth: 0,\n directives: [],\n tagHandlers: Object.create(null),\n events: []\n }\n\n const nullpos = input.indexOf('\\0')\n if (nullpos !== -1) YAMLException.throwAt(input, nullpos, 'null byte is not allowed in input', state.filename)\n\n while (state.position < state.length) {\n skipByteOrderMark(state)\n skipSeparationSpace(state, true)\n if (state.position >= state.length) break\n const documentStart = state.position\n readDocument(state)\n if (state.position === documentStart) {\n // Internal progress guard: if readDocument() ever returns without\n // consuming input, stop here instead of looping forever.\n /* c8 ignore next */\n throwError(state, 'can not read a document')\n }\n }\n\n return state.events\n}\n\nexport {\n parseEvents,\n DEFAULT_PARSER_OPTIONS,\n type ParserOptions\n}\n","import { YAMLException } from './common/exception.ts'\nimport { pick } from './common/object.ts'\nimport {\n constructFromEvents,\n DEFAULT_CONSTRUCTOR_OPTIONS,\n type ConstructorOptions\n} from './parser/constructor.ts'\nimport {\n parseEvents,\n DEFAULT_PARSER_OPTIONS,\n type ParserOptions\n} from './parser/parser.ts'\n\n// `source` is supplied by `loadDocuments` itself, not by the public caller.\n/** @category Main */\ninterface LoadOptions extends ParserOptions, Omit {}\n\n/** @inline */\ntype LoadAllIterator = (document: unknown) => void\n\nconst DEFAULT_LOAD_OPTIONS: Required = {\n ...DEFAULT_PARSER_OPTIONS,\n ...DEFAULT_CONSTRUCTOR_OPTIONS\n}\n\nfunction loadDocuments (input: string, options: LoadOptions = {}) {\n const opts = { ...DEFAULT_LOAD_OPTIONS, ...options }\n const source = String(input)\n\n const PARSER_OPT_KEYS = Object.keys(DEFAULT_PARSER_OPTIONS) as\n (keyof typeof DEFAULT_PARSER_OPTIONS)[]\n const CONSTRUCTOR_OPT_KEYS = Object.keys(DEFAULT_CONSTRUCTOR_OPTIONS) as\n (keyof typeof DEFAULT_CONSTRUCTOR_OPTIONS)[]\n\n const events = parseEvents(source, pick(opts, PARSER_OPT_KEYS))\n return constructFromEvents(events, { ...pick(opts, CONSTRUCTOR_OPT_KEYS), source })\n}\n\n/**\n * Same as {@link load}, but understands multi-document sources.\n * Returns an array of documents.\n *\n * @category Main\n */\nfunction loadAll (input: string, options?: LoadOptions): unknown[]\n\n/**\n * @deprecated Iterator is not supported.\n */\nfunction loadAll (input: string, iterator: null, options?: LoadOptions): unknown[]\n\n/**\n * @deprecated Iterator is not supported.\n */\nfunction loadAll (input: string, iterator: LoadAllIterator, options?: LoadOptions): void\nfunction loadAll (\n input: string,\n iteratorOrOptions?: LoadAllIterator | LoadOptions | null,\n options?: LoadOptions\n) {\n let iterator: LoadAllIterator | null = null\n\n if (typeof iteratorOrOptions === 'function') {\n iterator = iteratorOrOptions\n } else if (iteratorOrOptions !== null && typeof iteratorOrOptions === 'object') {\n options = iteratorOrOptions\n }\n\n const documents = loadDocuments(input, options)\n\n if (iterator === null) return documents\n for (const document of documents) iterator(document)\n}\n\n/**\n * Parses `string` as a single YAML document. Throws {@link YAMLException} on\n * error. This function does not understand multi-document or empty sources; it\n * throws an exception on those.\n *\n * > [!NOTE]\n * > 1. When processing untrusted input, see the\n * > [security considerations](../docs/safety.md).\n * > 2. All exceptions MUST be caught, not just {@link YAMLException}.\n * > 3. The default {@link CORE_SCHEMA} comes without the `!!merge` tag. You can\n * > easily enable it if needed.\n * > 4. The default {@link mapTag} is `{}`-object based, with known limitations\n * > (see description). For full compatibility use {@link realMapTag}\n * > instead (it uses native JS `Map`).\n *\n * @example\n * Enable {@link mergeTag} and {@link realMapTag}:\n *\n * ```javascript\n * import { load, CORE_SCHEMA, mergeTag, realMapTag } from 'js-yaml'\n *\n * try {\n * load(data, { schema: CORE_SCHEMA.withTags(mergeTag, realMapTag) })\n * } catch (e) {\n * console.error(e)\n * }\n * ```\n *\n * @category Main\n */\nfunction load (input: string, options?: LoadOptions) {\n const documents = loadDocuments(input, options)\n\n if (documents.length === 0) throw new YAMLException('expected a document, but the input is empty')\n if (documents.length === 1) return documents[0]\n\n throw new YAMLException('expected a single document in the stream, but found more')\n}\n\nexport {\n load,\n loadAll,\n type LoadOptions\n}\n","// JS value graph → AST. Knows tags (`identify` / `represent`). A single\n// identity-`Map` walk handles dedup: a repeat occurrence of an object (including\n// a cycle) becomes an `alias`, and the first occurrence gets an `anchor`.\n\nimport { YAMLException } from '../common/exception.ts'\nimport { type Schema } from '../schema.ts'\nimport { type TagDefinition } from '../tag.ts'\nimport { tagNameShort } from '../common/tagname.ts'\nimport { COLLECTION_STYLE, SCALAR_STYLE } from '../parser/events.ts'\nimport {\n type Document,\n type Node,\n type ScalarNode,\n type SequenceNode,\n type MappingNode\n} from './nodes.ts'\n\n/** @category AST */\ninterface FromJsOptions {\n /** Inlines duplicate objects instead of converting them into references. */\n noRefs?: boolean\n\n /**\n * Skips unrepresentable values instead of throwing. Invalid mapping pairs\n * and sequence items are skipped; `undefined` sequence items become `null`.\n */\n skipInvalid?: boolean\n}\n\n// A match candidate. `implicitTag` means the tag is not printed (implicit\n// scalars and the default str/seq/map tags).\ninterface RepresentType {\n tag: TagDefinition\n implicitTag: boolean\n}\n\n// Returned by `build` when no tag matched.\nconst INVALID = Symbol('INVALID')\n\ninterface FromJsState {\n representTypes: RepresentType[]\n noRefs: boolean\n skipInvalid: boolean\n\n // Already-built collection values → their node, for anchor/alias dedup.\n refs: Map\n refCounter: number\n}\n\nfunction buildRepresentTypes (schema: Schema): RepresentType[] {\n const defaultTags = new Set([\n schema.defaultScalarTag,\n schema.defaultSequenceTag,\n schema.defaultMappingTag\n ].filter((t): t is TagDefinition => t !== undefined))\n\n // Default container/str tags go last so a more specific tag identifying the\n // same JS value (e.g. a custom tag on a plain object) wins.\n const implicitScalars = schema.implicitScalarTags\n const explicitTags = schema.tags.filter(t =>\n !(t.nodeKind === 'scalar' && t.implicit) && !defaultTags.has(t))\n const defaultTagsLast = schema.tags.filter(t => defaultTags.has(t))\n\n return [\n ...implicitScalars.map(tag => ({ tag, implicitTag: true })),\n ...explicitTags.map(tag => ({ tag, implicitTag: false })),\n ...defaultTagsLast.map(tag => ({ tag, implicitTag: true }))\n ]\n}\n\n// First tag whose `identify` accepts `object`.\nfunction matchTag (state: FromJsState, object: unknown): { tag: TagDefinition, tagName: string, implicitTag: boolean } | null {\n for (let index = 0, length = state.representTypes.length; index < length; index += 1) {\n const { tag, implicitTag } = state.representTypes[index]\n\n if (tag.identify(object)) {\n let tagName: string\n if (tag.matchByTagPrefix) {\n tagName = tag.representTagName(object)\n } else {\n tagName = tag.tagName\n }\n return { tag, tagName, implicitTag }\n }\n }\n\n return null\n}\n\n// Build a node for `object`, or INVALID when no tag matches. `undefined` never\n// throws (caller decides: null in a sequence, skip in a mapping, '' at root);\n// any other unrepresentable value throws unless `skipInvalid`.\nfunction build (state: FromJsState, object: unknown): Node | typeof INVALID {\n if (!state.noRefs && object !== null && typeof object === 'object') {\n const existing = state.refs.get(object)\n if (existing) {\n if (existing.anchor === undefined) existing.anchor = `ref_${state.refCounter++}`\n return { kind: 'alias', anchor: existing.anchor }\n }\n }\n\n const matched = matchTag(state, object)\n\n if (!matched) {\n if (object === undefined) return INVALID\n if (state.skipInvalid) return INVALID\n throw new YAMLException(`unacceptable kind of an object to dump ${Object.prototype.toString.call(object)}`)\n }\n\n const { tag, tagName, implicitTag } = matched\n const nodeTagName = implicitTag ? tagName : tagNameShort(tagName)\n\n if (tag.nodeKind === 'scalar') {\n const node: ScalarNode = {\n kind: 'scalar',\n tag: nodeTagName,\n tagged: !implicitTag,\n style: SCALAR_STYLE.PLAIN,\n value: tag.represent(object)\n }\n return node\n }\n\n if (tag.nodeKind === 'sequence') {\n const container = tag.represent(object)\n const node: SequenceNode = {\n kind: 'sequence',\n tag: nodeTagName,\n tagged: !implicitTag,\n style: COLLECTION_STYLE.BLOCK,\n items: []\n }\n if (!state.noRefs) state.refs.set(object, node)\n\n for (let index = 0, length = container.length; index < length; index += 1) {\n let item = build(state, container[index])\n // An invalid element becomes null; a still-invalid null then skips/throws.\n if (item === INVALID && container[index] === undefined) item = build(state, null)\n if (item === INVALID) continue\n node.items.push(item)\n }\n return node\n }\n\n // mapping — the canonical form is always a `Map`.\n const map = tag.represent(object)\n const node: MappingNode = {\n kind: 'mapping',\n tag: nodeTagName,\n tagged: !implicitTag,\n style: COLLECTION_STYLE.BLOCK,\n items: []\n }\n if (!state.noRefs) state.refs.set(object, node)\n\n for (const [objectKey, objectValue] of map) {\n const key = build(state, objectKey)\n if (key === INVALID) continue // invalid key skips the pair\n const value = build(state, objectValue)\n if (value === INVALID) continue // invalid value skips the pair\n node.items.push({ key, value })\n }\n return node\n}\n\n/**\n * Convert JS object to AST. A JS value is one YAML document. An unrepresentable\n * root becomes an empty document, which the presenter renders as an empty\n * string.\n *\n * @category AST\n */\nfunction jsToAst (input: unknown, schema: Schema, options: FromJsOptions = {}): Document[] {\n const state: FromJsState = {\n representTypes: buildRepresentTypes(schema),\n noRefs: options.noRefs ?? false,\n skipInvalid: options.skipInvalid ?? false,\n refs: new Map(),\n refCounter: 0\n }\n\n const root = build(state, input)\n return [{ contents: root === INVALID ? null : root, directives: [] }]\n}\n\nexport {\n jsToAst,\n type FromJsOptions\n}\n","// Depth-first AST traversal. Mirrors the `kind` walk of the presenter and the\n// `from_*` builders, but stays read-oriented: nodes are plain objects, so a\n// visitor mutates them in place. Control signals let it prune or stop the walk.\n\nimport {\n type Node,\n type Document\n} from './nodes.ts'\n\n// Returned by a visitor to control the walk; anything else (incl. `undefined`)\n// descends as usual.\n/**\n * Return from a visitor to stop the whole traversal.\n *\n * @category AST\n */\nconst VISIT_BREAK = Symbol('visit:break')\n\n/**\n * Return from a visitor to skip the current node's children.\n *\n * @category AST\n */\nconst VISIT_SKIP = Symbol('visit:skip')\n\n/** @inline */\ntype VisitControl = typeof VISIT_BREAK | typeof VISIT_SKIP | undefined | void\n\n/**\n * Traversal-derived position of the current node. Kept off the node itself: a\n * node may sit in several places (alias/dedup reuse), so depth/role belong to\n * the walk, not the node. {@link VisitContext.parent} `kind` +\n * {@link VisitContext.isKey} pin the exact slot.\n *\n * @category AST\n */\ninterface VisitContext {\n /** 0 = document content root */\n depth: number\n\n /** Enclosing sequence/mapping, null at the root */\n parent: Node | null\n\n /** Node sits in a mapping key position */\n isKey: boolean\n}\n\n/** @category AST */\ntype Visitor = (node: Node, ctx: VisitContext) => VisitControl\n\n// Returns `true` once `VISIT_BREAK` was seen, so callers can unwind the walk.\nfunction visitNode (node: Node, visitor: Visitor, ctx: VisitContext): boolean {\n const control = visitor(node, ctx)\n if (control === VISIT_BREAK) return true\n if (control === VISIT_SKIP) return false\n\n const depth = ctx.depth + 1\n\n switch (node.kind) {\n case 'sequence':\n for (const item of node.items) {\n if (visitNode(item, visitor, { depth, parent: node, isKey: false })) return true\n }\n break\n case 'mapping':\n for (const { key, value } of node.items) {\n if (visitNode(key, visitor, { depth, parent: node, isKey: true })) return true\n if (visitNode(value, visitor, { depth, parent: node, isKey: false })) return true\n }\n break\n }\n\n return false\n}\n\n/**\n * Walk every node in the documents, calling {@link Visitor} once per\n * node (pre-order).\n *\n * @category AST\n */\nfunction visit (documents: Document[], visitor: Visitor): void {\n for (const doc of documents) {\n if (doc.contents && visitNode(doc.contents, visitor, { depth: 0, parent: null, isKey: false })) return\n }\n}\n\nexport {\n visit,\n VISIT_BREAK,\n VISIT_SKIP,\n type Visitor,\n type VisitContext\n}\n","import { SCALAR_STYLE, type ScalarStyle } from '../parser/events.ts'\nimport { type ScalarLayout } from './scalar_styler.ts'\n\nfunction hasBit (mask: number, bit: number): boolean { return (mask & (1 << bit)) !== 0 }\n\n// This should eventually be a presenter option, but collection styling,\n// especially key layout, must be designed first to decide whether scalar and\n// collection width limits should share an option or be configured separately.\nconst MIN_SCALAR_CONTENT_WIDTH = 40\n\n/**\n * Default scalar styling rules in application order.\n * See [Scalar styling](../../docs/scalar_styling.md) for usage details.\n *\n * @category AST\n */\nconst DEFAULT_SCALAR_STYLE_RULES = {\n applyQuoteFlowKeysOption,\n doubleQuoteForInvisibles,\n doubleQuoteWhitespaceOnly,\n applyForceQuotesOption,\n tryLongOrMultilineAsBlock,\n quoteInvalidPlain,\n fallbackToDoubleQuoted\n} as const\n\nfunction _preferredQuotedStyle (layout: ScalarLayout): ScalarStyle {\n if (layout.presenterOptions.quoteStyle === 'single' &&\n hasBit(layout.allowedStylesMask, SCALAR_STYLE.SINGLE_QUOTED)) {\n return SCALAR_STYLE.SINGLE_QUOTED\n }\n\n return SCALAR_STYLE.DOUBLE_QUOTED\n}\n\nfunction applyQuoteFlowKeysOption (layout: ScalarLayout): void {\n if (!layout.presenterOptions.quoteFlowKeys) return\n\n // quoteFlowKeys applies only to plain scalar keys in flow mappings.\n if (!layout.isKey || !layout.flowOnly || layout.style !== SCALAR_STYLE.PLAIN) return\n\n layout.style = SCALAR_STYLE.DOUBLE_QUOTED\n}\n\nfunction doubleQuoteForInvisibles (layout: ScalarLayout): void {\n if (layout.style === SCALAR_STYLE.PLAIN &&\n /[\\t\\x7F-\\xA0\\u2028\\u2029\\uFEFF\\uFFFE\\uFFFF]/.test(layout.node.value)) {\n layout.style = SCALAR_STYLE.DOUBLE_QUOTED\n }\n}\n\nfunction doubleQuoteWhitespaceOnly (layout: ScalarLayout): void {\n // Block styles normally make multiline structure easier to see, but\n // whitespace-only content turns that structure into visually empty lines,\n // so force double quotes for this special case.\n if (layout.style === SCALAR_STYLE.PLAIN && /^\\s+$/.test(layout.node.value)) {\n layout.style = SCALAR_STYLE.DOUBLE_QUOTED\n }\n}\n\nfunction applyForceQuotesOption (layout: ScalarLayout): void {\n if (!layout.presenterOptions.forceQuotes) return\n\n // forceQuotes applies only to plain values, not to mapping keys.\n if (layout.isKey || layout.style !== SCALAR_STYLE.PLAIN) return\n\n layout.style = layout.node.value.includes('\\n')\n ? SCALAR_STYLE.DOUBLE_QUOTED\n : _preferredQuotedStyle(layout)\n}\n\nfunction tryLongOrMultilineAsBlock (layout: ScalarLayout): void {\n if (layout.style !== SCALAR_STYLE.PLAIN || layout.isKey) return\n\n const value = layout.node.value\n const multiline = value.indexOf('\\n') !== -1\n\n // Literal and folded block style bits are always set together, so checking\n // either one is sufficient.\n if (!hasBit(layout.allowedStylesMask, SCALAR_STYLE.LITERAL_BLOCK)) {\n if (multiline) layout.style = SCALAR_STYLE.DOUBLE_QUOTED\n return\n }\n\n const w = layout.presenterOptions.lineWidth\n\n if (w === -1) {\n if (multiline) layout.style = SCALAR_STYLE.LITERAL_BLOCK\n return\n }\n\n const availableWidth = Math.max(\n Math.min(w, MIN_SCALAR_CONTENT_WIDTH),\n w - layout.shiftOfContent\n )\n\n let position = 0\n let shouldFold = false\n\n // Check whether at least one line exceeds the width budget\n // and can be split at a space.\n while (position <= value.length) {\n let lineEnd = value.length\n\n const nextLineBreak = value.indexOf('\\n', position)\n\n if (nextLineBreak !== -1) lineEnd = nextLineBreak\n\n const line = value.slice(position, lineEnd)\n\n if (line.length > availableWidth &&\n line[0] !== ' ' &&\n / [^ \\t]/.test(line)) {\n shouldFold = true\n }\n\n if (nextLineBreak === -1) break\n position = nextLineBreak + 1\n }\n\n if (shouldFold) {\n layout.style = SCALAR_STYLE.FOLDED_BLOCK\n } else if (multiline) {\n layout.style = SCALAR_STYLE.LITERAL_BLOCK\n }\n}\n\nfunction quoteInvalidPlain (layout: ScalarLayout): void {\n if (layout.style === SCALAR_STYLE.PLAIN &&\n !hasBit(layout.allowedStylesMask, SCALAR_STYLE.PLAIN)) {\n layout.style = _preferredQuotedStyle(layout)\n }\n}\n\nfunction fallbackToDoubleQuoted (layout: ScalarLayout): void {\n if (!hasBit(layout.allowedStylesMask, layout.style)) {\n layout.style = SCALAR_STYLE.DOUBLE_QUOTED\n }\n}\n\nexport { MIN_SCALAR_CONTENT_WIDTH, DEFAULT_SCALAR_STYLE_RULES }\n","import { SCALAR_STYLE, type ScalarStyle } from '../parser/events.ts'\nimport { type Node, type ScalarNode } from './nodes.ts'\nimport { type PresenterOptions } from './presenter.ts'\nimport { MIN_SCALAR_CONTENT_WIDTH } from './styler_defaults.ts'\n\n/** Scalar presentation state passed to styling rules. @category AST */\ninterface ScalarLayout {\n readonly node: Readonly\n readonly parent: Readonly | null\n readonly level: number\n readonly isKey: boolean\n readonly flowOnly: boolean\n readonly shiftOfParent: number\n readonly shiftOfContent: number\n readonly shiftOfFirstLine: number\n readonly presenterOptions: Readonly>\n /**\n * Bit mask of allowed styles; each bit corresponds to a {@link SCALAR_STYLE}\n * value.\n */\n allowedStylesMask: number\n /**\n * Selected output style, which styling rules may modify. To avoid overriding\n * earlier decisions, a rule should normally modify it only while it is\n * {@link SCALAR_STYLE.PLAIN}.\n */\n style: ScalarStyle\n}\n\n/** Function signature for scalar styling rules. @category AST */\ntype ScalarStyleRule = (layout: ScalarLayout) => void\n\nfunction setBit (mask: number, bit: number): number { return mask | (1 << bit) }\n\n// YAML 1.2.2 character productions.\n// https://yaml.org/spec/1.2.2/#51-character-set\nconst SRC_C_PRINTABLE = '[\\\\x09\\\\x0A\\\\x0D\\\\x20-\\\\x7E\\\\x85\\\\xA0-\\\\uD7FF\\\\uE000-\\\\uFFFD\\\\u{10000}-\\\\u{10FFFF}]'\nconst SRC_B_CHAR = '[\\\\n\\\\r]'\nconst SRC_C_BYTE_ORDER_MARK = '\\\\uFEFF'\nconst SRC_S_WHITE = '[ \\\\t]'\nconst SRC_NB_CHAR = `(?:(?!(?:${SRC_B_CHAR}|${SRC_C_BYTE_ORDER_MARK}))${SRC_C_PRINTABLE})`\nconst SRC_NS_CHAR = `(?:(?!${SRC_S_WHITE})${SRC_NB_CHAR})`\n\n// YAML 1.2.2 [2] nb-json.\nconst SRC_NB_JSON = '[\\\\x09\\\\x20-\\\\uD7FF\\\\uE000-\\\\uFFFF\\\\u{10000}-\\\\u{10FFFF}]'\n\n// YAML 1.2.2 indicator productions.\n// https://yaml.org/spec/1.2.2/#54-indicator-characters\nconst SRC_C_INDICATOR = '[-?:,\\\\[\\\\]{}#&*!|>\\'\"%@`]'\nconst SRC_C_FLOW_INDICATOR = '[,\\\\[\\\\]{}]'\n\n// YAML 1.2.2 [127]-[129] ns-plain-safe(c).\n// https://yaml.org/spec/1.2.2/#733-plain-style\nconst SRC_NS_PLAIN_SAFE_FLOW_OUT = SRC_NS_CHAR\nconst SRC_NS_PLAIN_SAFE_FLOW_IN = `(?:(?!${SRC_C_FLOW_INDICATOR})${SRC_NS_CHAR})`\n\n// YAML 1.2.2 [126] ns-plain-first(c).\nconst SRC_NS_PLAIN_FIRST_FLOW_OUT =\n `(?:(?:(?!${SRC_C_INDICATOR})${SRC_NS_CHAR})|[?:-](?=${SRC_NS_PLAIN_SAFE_FLOW_OUT}))`\nconst SRC_NS_PLAIN_FIRST_FLOW_IN =\n `(?:(?:(?!${SRC_C_INDICATOR})${SRC_NS_CHAR})|[?:-](?=${SRC_NS_PLAIN_SAFE_FLOW_IN}))`\n\n// YAML 1.2.2 [130] ns-plain-char(c).\n// The production itself requires lookbehind, so these regexps require ES2018 lookbehind support.\n// const SRC_NS_PLAIN_CHAR_FLOW_OUT =\n// `(?:(?:(?![:#])${SRC_NS_PLAIN_SAFE_FLOW_OUT})|(?<=${SRC_NS_CHAR})#|:(?=${SRC_NS_PLAIN_SAFE_FLOW_OUT}))`\n// const SRC_NS_PLAIN_CHAR_FLOW_IN =\n// `(?:(?:(?![:#])${SRC_NS_PLAIN_SAFE_FLOW_IN})|(?<=${SRC_NS_CHAR})#|:(?=${SRC_NS_PLAIN_SAFE_FLOW_IN}))`\n\n// ES2015-compatible alternative without lookbehind: consume each run of hashes\n// together with the preceding non-hash ns-plain-char.\nconst SRC_NS_PLAIN_CHAR_FLOW_OUT =\n `(?:(?:(?![:#])${SRC_NS_PLAIN_SAFE_FLOW_OUT})|:(?=${SRC_NS_PLAIN_SAFE_FLOW_OUT}))#*`\nconst SRC_NS_PLAIN_CHAR_FLOW_IN =\n `(?:(?:(?![:#])${SRC_NS_PLAIN_SAFE_FLOW_IN})|:(?=${SRC_NS_PLAIN_SAFE_FLOW_IN}))#*`\n\n// YAML 1.2.2 [132] nb-ns-plain-in-line(c).\nconst SRC_NB_NS_PLAIN_IN_LINE_FLOW_OUT = `(?:${SRC_S_WHITE}*${SRC_NS_PLAIN_CHAR_FLOW_OUT})*`\nconst SRC_NB_NS_PLAIN_IN_LINE_FLOW_IN = `(?:${SRC_S_WHITE}*${SRC_NS_PLAIN_CHAR_FLOW_IN})*`\n\n// YAML 1.2.2 [133] ns-plain-one-line(c).\nconst SRC_NS_PLAIN_ONE_LINE_FLOW_OUT =\n `${SRC_NS_PLAIN_FIRST_FLOW_OUT}#*${SRC_NB_NS_PLAIN_IN_LINE_FLOW_OUT}`\nconst SRC_NS_PLAIN_ONE_LINE_FLOW_IN =\n `${SRC_NS_PLAIN_FIRST_FLOW_IN}#*${SRC_NB_NS_PLAIN_IN_LINE_FLOW_IN}`\nconst SRC_NS_PLAIN_ONE_LINE_BLOCK_KEY = SRC_NS_PLAIN_ONE_LINE_FLOW_OUT\nconst SRC_NS_PLAIN_ONE_LINE_FLOW_KEY = SRC_NS_PLAIN_ONE_LINE_FLOW_IN\n\n// YAML 1.2.2 [134] s-ns-plain-next-line(n,c).\n// ScalarNode.value contains the folded value, not the source text: one source\n// line break became a space, while k > 1 breaks became k - 1 LF characters.\n// The space case is already accepted by [132]; each remaining run of LFs\n// therefore represents a transition to the next non-empty content line in [134].\nconst SRC_S_NS_PLAIN_NEXT_LINE_FLOW_OUT =\n `\\\\n+${SRC_NS_PLAIN_CHAR_FLOW_OUT}${SRC_NB_NS_PLAIN_IN_LINE_FLOW_OUT}`\nconst SRC_S_NS_PLAIN_NEXT_LINE_FLOW_IN =\n `\\\\n+${SRC_NS_PLAIN_CHAR_FLOW_IN}${SRC_NB_NS_PLAIN_IN_LINE_FLOW_IN}`\n\n// YAML 1.2.2 [135] ns-plain-multi-line(n,c).\nconst SRC_NS_PLAIN_MULTI_LINE_FLOW_OUT =\n `${SRC_NS_PLAIN_ONE_LINE_FLOW_OUT}(?:${SRC_S_NS_PLAIN_NEXT_LINE_FLOW_OUT})*`\nconst SRC_NS_PLAIN_MULTI_LINE_FLOW_IN =\n `${SRC_NS_PLAIN_ONE_LINE_FLOW_IN}(?:${SRC_S_NS_PLAIN_NEXT_LINE_FLOW_IN})*`\n\n// YAML 1.2.2 [131] ns-plain(n,c).\nconst NS_PLAIN_FLOW_OUT = new RegExp(`^(?:${SRC_NS_PLAIN_MULTI_LINE_FLOW_OUT})$`, 'u')\nconst NS_PLAIN_FLOW_IN = new RegExp(`^(?:${SRC_NS_PLAIN_MULTI_LINE_FLOW_IN})$`, 'u')\nconst NS_PLAIN_BLOCK_KEY = new RegExp(`^(?:${SRC_NS_PLAIN_ONE_LINE_BLOCK_KEY})$`, 'u')\nconst NS_PLAIN_FLOW_KEY = new RegExp(`^(?:${SRC_NS_PLAIN_ONE_LINE_FLOW_KEY})$`, 'u')\n\n// YAML 1.2.2 [118]-[125], projected to ScalarNode.value: doubled quotes\n// are already decoded, and flow folding represents content line feeds as LF.\nconst NB_SINGLE_ONE_LINE = new RegExp(`^(?:${SRC_NB_JSON})*$`, 'u')\nconst NB_SINGLE_MULTI_LINE = new RegExp(`^(?:${SRC_NB_JSON}|\\\\n)*$`, 'u')\n\n// YAML 1.2.2 [170]-[182], projected to ScalarNode.value: source line breaks\n// are normalized to LF; every other content character must be nb-char.\nconst BLOCK_SCALAR_CONTENT = new RegExp(`^(?:${SRC_NB_CHAR}|\\\\n)*$`, 'u')\n\n// YAML 1.2.2 [206] c-forbidden.\n// https://yaml.org/spec/1.2.2/#912-document-markers\nconst C_FORBIDDEN_FIRST_LINE = /^(?:---|\\.\\.\\.)(?=$|[ \\t\\n\\r])/\nconst C_FORBIDDEN_CONTENT = /^(?:---|\\.\\.\\.)(?=$|[ \\t\\n\\r])/m\n\nfunction canUsePlain (layout: ScalarLayout): boolean {\n const str = layout.node.value\n\n // Allow null to be rendered as an empty scalar; its tag is checked below.\n if (str !== '') {\n const nsPlain = layout.isKey\n ? (layout.flowOnly ? NS_PLAIN_FLOW_KEY : NS_PLAIN_BLOCK_KEY)\n : (layout.flowOnly ? NS_PLAIN_FLOW_IN : NS_PLAIN_FLOW_OUT)\n\n if (!nsPlain.test(str)) return false\n if (layout.shiftOfFirstLine === 0 && C_FORBIDDEN_FIRST_LINE.test(str)) return false\n\n if (layout.shiftOfContent === 0) {\n const firstLineBreak = str.indexOf('\\n')\n\n if (firstLineBreak !== -1) {\n const content = str.slice(firstLineBreak + 1)\n\n if (C_FORBIDDEN_CONTENT.test(content)) return false\n }\n }\n }\n\n // Outside the plain-syntax BNF: preserve the node tag under implicit resolution.\n const resolvedTag = layout.presenterOptions.schema.resolveImplicitScalarTag(str).tag.tagName\n\n if (!layout.node.tagged && resolvedTag !== layout.node.tag) return false\n\n // Outside YAML 1.2.2: preserve YAML 1.1 !!value semantics.\n // https://yaml.org/type/value.html\n if (!layout.node.tagged && str === '=' &&\n resolvedTag === layout.presenterOptions.schema.defaultScalarTag.tagName) return false\n\n return true\n}\n\nfunction canUseSingleQuoted (layout: ScalarLayout): boolean {\n const str = layout.node.value\n const nbSingleText = layout.isKey ? NB_SINGLE_ONE_LINE : NB_SINGLE_MULTI_LINE\n\n if (!nbSingleText.test(str)) return false\n\n // [123]-[125] exclude trailing and leading s-white around a folded break;\n // single-quoted style has no escape that could preserve it.\n if (/[ \\t]\\n|\\n[ \\t]/.test(str)) return false\n\n // A decoded LF is rendered through flow folding. At zero continuation\n // indentation, c-forbidden would terminate the quoted scalar.\n if (!layout.isKey && layout.shiftOfContent === 0) {\n const firstLineBreak = str.indexOf('\\n')\n\n if (firstLineBreak !== -1 &&\n C_FORBIDDEN_CONTENT.test(str.slice(firstLineBreak + 1))) return false\n }\n\n return true\n}\n\nfunction canUseBlock (layout: ScalarLayout): boolean {\n if (layout.flowOnly || !BLOCK_SCALAR_CONTENT.test(layout.node.value)) return false\n\n const contentIndent = layout.shiftOfContent - layout.shiftOfParent\n\n if (contentIndent < 1) return false\n\n // A leading space requires [163] c-indentation-indicator. Its value is 1-9.\n if (contentIndent > 9 && /^\\n* /.test(layout.node.value)) return false\n\n // Block content starts on its own line, so every zero-indented content line\n // is subject to [206] c-forbidden.\n if (layout.shiftOfContent === 0 && C_FORBIDDEN_CONTENT.test(layout.node.value)) return false\n\n return true\n}\n\nfunction detectAllowedStyles (layout: ScalarLayout): void {\n // [107] Double-quoted style can express arbitrary strings through escape sequences.\n let mask = setBit(0, SCALAR_STYLE.DOUBLE_QUOTED)\n\n if (canUsePlain(layout)) mask = setBit(mask, SCALAR_STYLE.PLAIN)\n if (canUseSingleQuoted(layout)) mask = setBit(mask, SCALAR_STYLE.SINGLE_QUOTED)\n\n if (canUseBlock(layout)) {\n mask = setBit(setBit(mask, SCALAR_STYLE.LITERAL_BLOCK), SCALAR_STYLE.FOLDED_BLOCK)\n }\n\n layout.allowedStylesMask = mask\n}\n\nfunction renderScalar (layout: ScalarLayout): string {\n switch (layout.style) {\n case SCALAR_STYLE.PLAIN:\n return renderPlain(layout)\n case SCALAR_STYLE.SINGLE_QUOTED:\n return renderSingleQuoted(layout)\n case SCALAR_STYLE.LITERAL_BLOCK:\n return renderLiteralBlock(layout)\n case SCALAR_STYLE.FOLDED_BLOCK:\n return renderFoldedBlock(layout)\n case SCALAR_STYLE.DOUBLE_QUOTED:\n return renderDoubleQuoted(layout)\n }\n}\n\nfunction renderPlain (layout: ScalarLayout): string {\n return encodeFlowBreaks(layout.node.value, layout.shiftOfContent)\n}\n\nfunction renderSingleQuoted (layout: ScalarLayout): string {\n const value = encodeFlowBreaks(layout.node.value, layout.shiftOfContent)\n return `'${value.replace(/'/g, \"''\")}'`\n}\n\nfunction renderLiteralBlock (layout: ScalarLayout): string {\n const value = layout.node.value\n\n return '|' + blockHeader(value, layout.shiftOfParent, layout.shiftOfContent) +\n dropEndingNewline(indentString(value, layout.shiftOfContent))\n}\n\nfunction renderFoldedBlock (layout: ScalarLayout): string {\n const value = layout.node.value\n const w = layout.presenterOptions.lineWidth\n let availableWidth = Infinity\n\n if (w !== -1) {\n availableWidth = Math.max(\n Math.min(w, MIN_SCALAR_CONTENT_WIDTH),\n w - layout.shiftOfContent\n )\n }\n\n return '>' + blockHeader(value, layout.shiftOfParent, layout.shiftOfContent) +\n dropEndingNewline(indentString(\n foldBlockScalar(value, availableWidth),\n layout.shiftOfContent\n ))\n}\n\nfunction renderDoubleQuoted (layout: ScalarLayout): string {\n return `\"${escapeString(layout.node.value)}\"`\n}\n\n// Flow scalars fold line breaks: a run of k source line breaks reparses to k-1\n// literal LF characters. Encode each run of p literal LF characters as p+1\n// breaks and indent the following content line.\nfunction encodeFlowBreaks (string: string, shiftOfContent: number): string {\n let nextLF = string.indexOf('\\n')\n if (nextLF === -1) return string\n\n const pad = ' '.repeat(shiftOfContent)\n let result = string.slice(0, nextLF)\n\n const lineRe = /(\\n+)([^\\n]*)/g\n lineRe.lastIndex = nextLF\n let match\n\n while ((match = lineRe.exec(string))) {\n const breaks = match[1].length\n const line = match[2]\n result += '\\n'.repeat(breaks + 1) + pad + line\n }\n\n return result\n}\n\n// Indents every line in a string. Empty lines (\\n only) are not indented.\nfunction indentString (string: string, spaces: number): string {\n const indent = ' '.repeat(spaces)\n let position = 0\n let result = ''\n const length = string.length\n\n while (position < length) {\n let line\n const next = string.indexOf('\\n', position)\n\n if (next === -1) {\n line = string.slice(position)\n position = length\n } else {\n line = string.slice(position, next + 1)\n position = next + 1\n }\n\n if (line.length && line !== '\\n') result += indent\n\n result += line\n }\n\n return result\n}\n\nfunction needIndentIndicator (string: string): boolean {\n return /^\\n* /.test(string)\n}\n\nfunction blockHeader (string: string, shiftOfParent: number, shiftOfContent: number): string {\n const indentIndicator = needIndentIndicator(string)\n ? String(shiftOfContent - shiftOfParent)\n : ''\n\n // The string '\\n' counts as a trailing empty line.\n const clip = string[string.length - 1] === '\\n'\n const keep = clip && (string[string.length - 2] === '\\n' || string === '\\n')\n const chomp = keep ? '+' : (clip ? '' : '-')\n\n return `${indentIndicator}${chomp}\\n`\n}\n\n// The presenter adds its own trailing newline.\nfunction dropEndingNewline (string: string): string {\n return string[string.length - 1] === '\\n' ? string.slice(0, -1) : string\n}\n\nfunction isMoreIndented (char: string): boolean {\n return char === ' ' || char === '\\t'\n}\n\nfunction foldLine (line: string, width: number): string {\n if (line === '' || isMoreIndented(line[0])) return line\n\n const breakRe = / [^ \\t]/g\n let match\n let start = 0\n let end\n let curr = 0\n let next = 0\n let result = ''\n\n while ((match = breakRe.exec(line))) {\n next = match.index\n\n if (next - start > width) {\n end = (curr > start) ? curr : next\n result += `\\n${line.slice(start, end)}`\n start = end + 1\n }\n\n curr = next\n }\n\n result += '\\n'\n\n if (line.length - start > width && curr > start) {\n result += `${line.slice(start, curr)}\\n${line.slice(curr + 1)}`\n } else {\n result += line.slice(start)\n }\n\n return result.slice(1)\n}\n\nfunction foldBlockScalar (string: string, width: number): string {\n const lineRe = /(\\n+)([^\\n]*)/g\n\n let nextLF = string.indexOf('\\n')\n if (nextLF === -1) nextLF = string.length\n lineRe.lastIndex = nextLF\n\n let result = foldLine(string.slice(0, nextLF), width)\n let prevMoreIndented = string[0] === '\\n' || isMoreIndented(string[0])\n let moreIndented\n let match\n\n while ((match = lineRe.exec(string))) {\n const prefix = match[1]\n const line = match[2]\n\n moreIndented = line !== '' && isMoreIndented(line[0])\n result += prefix +\n ((!prevMoreIndented && !moreIndented && line !== '') ? '\\n' : '') +\n foldLine(line, width)\n prevMoreIndented = moreIndented\n }\n\n return result\n}\n\n// Characters escaped in Double-Quoted Style:\n//\n// - the inverse of YAML 1.2.2 [1] c-printable;\n// - TAB, LF and CR, which c-printable includes;\n// - NEL, NBSP, LS, PS and BOM, which are escaped to make invisible content\n// visible;\n// - double quote and backslash, which must be escaped because they have\n// syntactic meaning.\n//\n// In Unicode mode, the surrogate range matches unpaired surrogates but does not\n// match either code unit of a valid surrogate pair.\n// https://yaml.org/spec/1.2.2/#rule-c-printable\nconst CHARACTERS_TO_ESCAPE =\n /[\"\\\\\\x00-\\x1F\\x7F-\\xA0\\u2028\\u2029\\uD800-\\uDFFF\\uFEFF\\uFFFE\\uFFFF]/gu\n\nfunction escapeCharacter (character: string): string {\n switch (character) {\n case '\\x00': return '\\\\0'\n case '\\x07': return '\\\\a'\n case '\\x08': return '\\\\b'\n case '\\x09': return '\\\\t'\n case '\\x0A': return '\\\\n'\n case '\\x0B': return '\\\\v'\n case '\\x0C': return '\\\\f'\n case '\\x0D': return '\\\\r'\n case '\\x1B': return '\\\\e'\n case '\"': return '\\\\\"'\n case '\\\\': return '\\\\\\\\'\n case '\\x85': return '\\\\N'\n case '\\xA0': return '\\\\_'\n case '\\u2028': return '\\\\L'\n case '\\u2029': return '\\\\P'\n }\n\n const code = character.charCodeAt(0)\n const hex = code.toString(16).toUpperCase()\n\n if (code <= 0xFF) return `\\\\x${'0'.repeat(2 - hex.length)}${hex}`\n\n return `\\\\u${'0'.repeat(4 - hex.length)}${hex}`\n}\n\nfunction escapeString (string: string): string {\n return string.replace(CHARACTERS_TO_ESCAPE, escapeCharacter)\n}\n\nexport {\n detectAllowedStyles,\n renderScalar,\n type ScalarLayout,\n type ScalarStyleRule\n}\n","// AST → text. Walks the node `kind`; the scalar machinery (style selection,\n// quoting, folding) is driven by node text, not by sniffing a JS value.\n\nimport { YAMLException } from '../common/exception.ts'\nimport { tagNameShort } from '../common/tagname.ts'\nimport { COLLECTION_STYLE, SCALAR_STYLE } from '../parser/events.ts'\nimport { type Schema } from '../schema.ts'\nimport {\n type Node,\n type Document,\n type ScalarNode,\n type SequenceNode,\n type MappingNode\n} from './nodes.ts'\nimport {\n detectAllowedStyles,\n renderScalar,\n type ScalarLayout,\n type ScalarStyleRule\n} from './scalar_styler.ts'\nimport { DEFAULT_SCALAR_STYLE_RULES } from './styler_defaults.ts'\n\nconst CHAR_LINE_FEED = 0x0A /* LF */\n\n/** @category AST */\ninterface PresenterOptions {\n /** Schema used when selecting a safe scalar style. */\n schema: Schema\n\n /**\n * Indentation width in spaces.\n *\n * @defaultValue `2`\n */\n indent?: number\n\n /**\n * Does not add an indentation level to array elements when enabled.\n *\n * @defaultValue `false`\n */\n seqNoIndent?: boolean\n\n /**\n * Allows a nested collection to start on the same line after `-`.\n *\n * @defaultValue `true`\n */\n seqInlineFirst?: boolean\n\n /**\n * Preferred line width for folding. Unbreakable and more-indented lines may\n * exceed it. Set to `-1` for unlimited width.\n *\n * @defaultValue `80`\n */\n lineWidth?: number\n\n /**\n * Adds spaces inside flow collection brackets: `{a: 1}` becomes `{ a: 1 }`.\n *\n * @defaultValue `false`\n */\n flowBracketPadding?: boolean\n\n /**\n * Omits the space after commas in flow collections: `[1, 2]` becomes\n * `[1,2]`.\n *\n * @defaultValue `false`\n */\n flowSkipCommaSpace?: boolean\n\n /**\n * Omits the space after `:` in flow mappings: `{\"a\": 1}` becomes `{\"a\":1}`.\n *\n * This forces `quoteFlowKeys`; otherwise `a:1` would be parsed as a single\n * plain scalar instead of a mapping entry.\n *\n * @defaultValue `false`\n */\n flowSkipColonSpace?: boolean\n\n /**\n * Quotes flow mapping keys: `{a: 1}` becomes `{\"a\": 1}`.\n *\n * @defaultValue `false`\n */\n quoteFlowKeys?: boolean\n\n /**\n * Quoting style to use when a string needs quotes.\n *\n * @defaultValue `'single'`\n */\n quoteStyle?: 'single' | 'double'\n\n /**\n * Quotes all non-key strings using {@link quoteStyle}.\n *\n * @defaultValue `false`\n */\n forceQuotes?: boolean\n\n /**\n * Customizes how strings are rendered as plain, quoted, literal, or folded\n * scalars. Rules are applied in array order; providing this option replaces\n * the {@link DEFAULT_SCALAR_STYLE_RULES default rules}.\n *\n * @defaultValue `Object.values(DEFAULT_SCALAR_STYLE_RULES)`\n */\n scalarStyleRules?: readonly ScalarStyleRule[]\n\n /**\n * Prints an explicit tag before an anchor: `&ref_0 !!set` becomes\n * `!!set &ref_0`.\n *\n * @defaultValue `false`\n */\n tagBeforeAnchor?: boolean\n}\n\nconst DEFAULT_PRESENTER_OPTIONS: Required> = {\n indent: 2,\n seqNoIndent: false,\n seqInlineFirst: true,\n lineWidth: 80,\n flowBracketPadding: false,\n flowSkipCommaSpace: false,\n flowSkipColonSpace: false,\n quoteFlowKeys: false,\n quoteStyle: 'single',\n forceQuotes: false,\n scalarStyleRules: Object.keys(DEFAULT_SCALAR_STYLE_RULES)\n .map(name => Reflect.get(DEFAULT_SCALAR_STYLE_RULES, name)),\n tagBeforeAnchor: false\n}\n\ninterface PresenterState extends Required {\n defaultScalarTagName: string\n openEnded: boolean\n}\n\nfunction nodeTagShort (node: ScalarNode | SequenceNode | MappingNode) {\n return node.tagged ? node.tag : tagNameShort(node.tag)\n}\n\nfunction createPresenterState (options: PresenterOptions): PresenterState {\n const opts = {\n ...DEFAULT_PRESENTER_OPTIONS,\n ...options\n }\n\n if (opts.flowSkipColonSpace) {\n opts.quoteFlowKeys = true\n }\n\n return {\n ...opts,\n defaultScalarTagName: opts.schema.defaultScalarTag.tagName,\n openEnded: false\n }\n}\n\nfunction generateNextLine (state: PresenterState, level: number) {\n return `\\n${' '.repeat(state.indent * level)}`\n}\n\nfunction scalarLayout (state: PresenterState, node: ScalarNode, parent: Readonly | null, level: number,\n isKey: boolean, flowOnly: boolean): ScalarLayout {\n const shiftOfParent = level === 0 ? -1 : state.indent * (level - 1)\n const shiftOfContent = state.indent * Math.max(1, level)\n\n return {\n node,\n parent,\n level,\n isKey,\n flowOnly,\n shiftOfParent,\n shiftOfContent,\n shiftOfFirstLine: level === 0 ? 0 : state.indent * level,\n presenterOptions: state,\n allowedStylesMask: 0,\n style: node.style\n }\n}\n\nfunction writeFlowSequence (state: PresenterState, level: number, node: SequenceNode) {\n let result = ''\n\n for (let index = 0, length = node.items.length; index < length; index += 1) {\n const item = writeNode(state, level, node.items[index], node, {}).text\n if (index > 0) result += `,${!state.flowSkipCommaSpace ? ' ' : ''}`\n result += item\n }\n\n const pad = state.flowBracketPadding && node.items.length > 0 ? ' ' : ''\n return `[${pad}${result}${pad}]`\n}\n\nfunction writeBlockSequence (state: PresenterState, level: number, node: SequenceNode, compact: boolean) {\n let result = ''\n\n for (let index = 0, length = node.items.length; index < length; index += 1) {\n const item = writeNode(state, level + 1, node.items[index], node,\n { block: true, compact: state.seqInlineFirst, isblockseq: true }).text\n\n if (!compact || result !== '') {\n result += generateNextLine(state, level)\n }\n\n // No trailing space when the value renders empty (e.g. null → '').\n if (item === '' || CHAR_LINE_FEED === item.charCodeAt(0)) {\n result += '-'\n } else {\n result += '- '\n }\n\n result += item\n }\n\n return result\n}\n\nfunction writeFlowMapping (state: PresenterState, level: number, node: MappingNode) {\n let result = ''\n\n for (const { key, value } of node.items) {\n let pairBuffer = ''\n if (result !== '') pairBuffer += `,${!state.flowSkipCommaSpace ? ' ' : ''}`\n\n const keyRender = writeNode(state, level, key, node, { iskey: true })\n const keyText = keyRender.text\n\n const valueText = writeNode(state, level, value, node, {}).text\n // No separating space when the value renders empty (e.g. null → '').\n const sep = state.flowSkipColonSpace || valueText === '' ? '' : ' '\n\n // An alias or a property-only scalar must be separated from `:` because the\n // colon can otherwise be consumed as part of the alias/anchor/tag name.\n const keyIsBareProps = key.kind === 'scalar' && keyRender.noBody &&\n (key.tagged || key.anchor !== undefined)\n const keyColonSep = key.kind === 'alias' || keyIsBareProps ? ' ' : ''\n\n pairBuffer += `${keyText}${keyColonSep}:${sep}${valueText}`\n\n result += pairBuffer\n }\n\n const pad = state.flowBracketPadding && result !== '' ? ' ' : ''\n return `{${pad}${result}${pad}}`\n}\n\nfunction writeBlockMapping (state: PresenterState, level: number, node: MappingNode, compact: boolean) {\n let result = ''\n\n for (let index = 0, length = node.items.length; index < length; index += 1) {\n let pairBuffer = ''\n\n if (!compact || result !== '') {\n pairBuffer += generateNextLine(state, level)\n }\n\n const { key, value } = node.items[index]\n\n // A block key — a block collection (mapping/sequence) or a block scalar\n // (literal/folded) — can't sit on a `key:` line, so it's written with block\n // context and the pair takes the explicit `? key / : value` form. A simple\n // scalar key stays inline (flow-vs-block is invisible there).\n const keyIsBlock =\n ((key.kind === 'mapping' || key.kind === 'sequence') &&\n key.style === COLLECTION_STYLE.BLOCK && key.items.length !== 0) ||\n (key.kind === 'scalar' &&\n (key.style === SCALAR_STYLE.LITERAL_BLOCK || key.style === SCALAR_STYLE.FOLDED_BLOCK))\n\n // The `?`/`:` indicators shift content right like a `-`, so a block key or\n // value that stays on the indicator line keeps its indentation under\n // seqNoIndent (`isblockseq`). One that drops to its own line (tag/anchor)\n // collapses to the parent indent, so leave the flag off there.\n const keyRender = keyIsBlock\n ? writeNode(state, level + 1, key, node,\n { block: true, compact: true, isblockseq: !cannotBeCompact(state, key, level + 1) })\n : writeNode(state, level + 1, key, node, { block: true, compact: true, iskey: true })\n const keyText = keyRender.text\n\n // Block key, over-long key, or multiline scalar key forces explicit form.\n // Multiline isn't a spec requirement — just matches pyyaml's simple-key rule.\n const keyHasLineBreak = key.kind === 'scalar' && key.value.indexOf('\\n') !== -1\n\n // YAML limits an implicit key to 1024 Unicode code points. `length` counts\n // UTF-16 code units, never fewer than code points, so it is a cheap safe\n // precheck. The `u` regexp then counts each [\\s\\S] match as one code point.\n const keyIsTooLong = keyText.length > 1024 && /^[\\s\\S]{1025}/u.test(keyText)\n const explicitPair = keyIsBlock || keyHasLineBreak || keyIsTooLong\n\n if (explicitPair) {\n if (keyText && CHAR_LINE_FEED === keyText.charCodeAt(0)) {\n pairBuffer += '?'\n } else {\n pairBuffer += '? '\n }\n }\n\n pairBuffer += keyText\n\n if (explicitPair) {\n pairBuffer += generateNextLine(state, level)\n }\n\n const valueText = writeNode(state, level + 1, value, node,\n { block: true, compact: explicitPair, isblockseq: explicitPair && !cannotBeCompact(state, value, level + 1) }).text\n\n // Keep a space before the colon when the key text ends in a leading\n // property rather than scalar content, so the colon can't be read as part\n // of it. Two cases: an inline alias key (`*b : v`), and an empty scalar key\n // whose whole text is its anchor/tag (`&a :`, `!!str :`) — without the\n // space `&a:` reparses as an anchored value, dropping the null key.\n const keyIsBareProps = key.kind === 'scalar' && keyRender.noBody &&\n (key.tagged || key.anchor !== undefined)\n const keyColonSep = !explicitPair && (key.kind === 'alias' || keyIsBareProps) ? ' ' : ''\n\n // No trailing space when the value renders empty (e.g. null → '').\n if (valueText === '' || CHAR_LINE_FEED === valueText.charCodeAt(0)) {\n pairBuffer += `${keyColonSep}:`\n } else {\n pairBuffer += `${keyColonSep}: `\n }\n\n pairBuffer += valueText\n\n result += pairBuffer\n }\n\n return result\n}\n\n// Where a node sits relative to its parent — drives layout/style decisions.\n// All flags default to false (the flow-context, non-key, non-compact case).\ninterface NodeContext {\n block?: boolean // block context (vs flow); propagates downward\n compact?: boolean // may start on the current line (no leading newline)\n iskey?: boolean // node is a mapping key\n isblockseq?: boolean // content follows an indicator (`-`, or `?`/`:` in an\n // explicit pair) that already shifted it right; keeps\n // its indentation under seqNoIndent\n}\n\ninterface NodeRender {\n text: string\n noBody: boolean\n}\n\n// A node can't sit compact on its parent's indicator (`-`/`?`/`:`) line when it\n// carries leading props (tag/anchor) that would collide with the indicator, or\n// when the indent step is too narrow for the 2-char indicator. Such a node drops\n// to its own line; a block collection that does so also collapses its seqNoIndent\n// indentation back to the parent.\nfunction cannotBeCompact (state: PresenterState, node: Node, level: number) {\n if (node.kind === 'alias') return true\n return node.tagged || node.anchor !== undefined || (state.indent < 2 && level > 0)\n}\n\nfunction writeNode (state: PresenterState, level: number, node: Node,\n parent: Readonly | null, ctx: NodeContext): NodeRender {\n if (node.kind === 'alias') {\n state.openEnded = false\n return { text: `*${node.anchor}`, noBody: false }\n }\n\n const { block = false, iskey = false, isblockseq = false } = ctx\n let compact = ctx.compact ?? false\n\n const hasAnchor = node.anchor !== undefined\n\n if (cannotBeCompact(state, node, level)) {\n compact = false\n }\n\n let body: string\n let shouldPrintTag = node.tagged\n const useBlockCollection = block &&\n (node.kind === 'mapping' || node.kind === 'sequence') &&\n node.style === COLLECTION_STYLE.BLOCK && node.items.length !== 0\n\n if (node.kind === 'mapping') {\n if (useBlockCollection) {\n body = writeBlockMapping(state, level, node, compact)\n } else {\n body = writeFlowMapping(state, level, node)\n }\n } else if (node.kind === 'sequence') {\n if (useBlockCollection) {\n if (state.seqNoIndent && !isblockseq && level > 0) {\n body = writeBlockSequence(state, level - 1, node, compact)\n } else {\n body = writeBlockSequence(state, level, node, compact)\n }\n } else {\n body = writeFlowSequence(state, level, node)\n }\n } else {\n const layout = scalarLayout(state, node, parent, level, iskey, !block)\n\n detectAllowedStyles(layout)\n for (const rule of state.scalarStyleRules) rule(layout)\n\n body = renderScalar(layout)\n state.openEnded =\n (layout.style === SCALAR_STYLE.LITERAL_BLOCK || layout.style === SCALAR_STYLE.FOLDED_BLOCK) &&\n (node.value === '\\n' || node.value.endsWith('\\n\\n'))\n\n // A flow sequence entry cannot be completely empty. Print the semantic tag\n // as the node property that explicitly indicates the entry's existence.\n shouldPrintTag = node.tagged ||\n (body === '' && layout.flowOnly && parent?.kind === 'sequence' && !hasAnchor) ||\n (layout.style !== SCALAR_STYLE.PLAIN && node.tag !== state.defaultScalarTagName)\n }\n\n // A flow collection ends with its closing indicator, not with its last child.\n if ((node.kind === 'mapping' || node.kind === 'sequence') && !useBlockCollection) {\n state.openEnded = false\n }\n\n // An indicator plus its mandatory separator occupies 2 columns. For wider\n // indentation, pad a compact block collection so its first item starts at\n // the same column as the following items.\n if (useBlockCollection && compact && level > 0 && state.indent > 2) {\n body = `${' '.repeat(state.indent - 2)}${body}`\n }\n\n const noBody = body === ''\n let text = body\n\n if (shouldPrintTag || hasAnchor) {\n const props: string[] = []\n const tag = shouldPrintTag ? nodeTagShort(node) : null\n const anchor = hasAnchor ? `&${node.anchor}` : null\n\n if (state.tagBeforeAnchor) {\n if (tag !== null) props.push(tag)\n if (anchor !== null) props.push(anchor)\n } else {\n if (anchor !== null) props.push(anchor)\n if (tag !== null) props.push(tag)\n }\n\n // No separator when the body is empty (e.g. `&anchor` on a null node) or\n // already starts on its own line.\n const sep = body === '' || body.charCodeAt(0) === CHAR_LINE_FEED ? '' : ' '\n text = `${props.join(' ')}${sep}${body}`\n }\n\n return { text, noBody }\n}\n\n// A bare (untagged, unanchored) non-empty block collection: writeNode renders it\n// in compact form with its first item on the opening line. That works mid-stream,\n// but right after a `---` the first item must drop to the next line. A tag/anchor\n// already forces the body onto its own line, so those stay on the `---` line.\nfunction rootStartsOwnLine (node: Node) {\n return (node.kind === 'sequence' || node.kind === 'mapping') &&\n node.style === COLLECTION_STYLE.BLOCK &&\n node.items.length !== 0 &&\n !node.tagged &&\n node.anchor === undefined\n}\n\nfunction writeDocumentDirectives (doc: Document) {\n let result = ''\n\n for (const directive of doc.directives) {\n if (directive.kind === 'yaml') {\n result += `%YAML ${directive.version}\\n`\n continue\n }\n\n const { handle, prefix } = directive\n result += `%TAG ${handle} ${prefix}\\n`\n }\n\n return result\n}\n\n/**\n * Build YAML from AST.\n *\n * @category AST\n */\nfunction present (documents: Document[], options: PresenterOptions): string {\n const state = createPresenterState(options)\n let result = ''\n let previousEnded = false\n\n for (let index = 0; index < documents.length; index += 1) {\n const doc = documents[index]\n state.openEnded = false\n const directives = writeDocumentDirectives(doc)\n const hasDirectives = directives !== ''\n const marker = doc.explicitStart || hasDirectives || (index > 0 && !previousEnded)\n\n result += directives\n\n if (doc.contents === null) {\n if (marker) result += '---\\n'\n } else if (marker) {\n const body = writeNode(state, 0, doc.contents, null, { block: true, compact: true }).text\n // Content shares the `---` line, except: an empty render (no separator at\n // all), a bare block collection (wraps to the next line), or directives\n // forcing `---` onto its own line.\n const sep = body === '' ? '' : (hasDirectives || rootStartsOwnLine(doc.contents) ? '\\n' : ' ')\n result += `---${sep}${body}\\n`\n } else {\n result += writeNode(state, 0, doc.contents, null, { block: true, compact: true }).text + '\\n'\n }\n\n previousEnded = doc.explicitEnd || state.openEnded\n if (previousEnded) {\n result += '...\\n'\n }\n }\n\n return result\n}\n\nexport {\n DEFAULT_PRESENTER_OPTIONS,\n present,\n type PresenterOptions\n}\n","import { DUMP_SCHEMA, type Schema } from './schema.ts'\nimport { COLLECTION_STYLE } from './parser/events.ts'\nimport { jsToAst } from './ast/from_js.ts'\nimport { visit, VISIT_SKIP } from './ast/visit.ts'\nimport { type Document } from './ast/nodes.ts'\nimport {\n DEFAULT_PRESENTER_OPTIONS,\n present,\n type PresenterOptions\n} from './ast/presenter.ts'\nimport { pick } from './common/object.ts'\n\n/** @category Main */\ninterface DumpOptions extends Omit {\n /**\n * Schema to use.\n *\n * @defaultValue {@link DUMP_SCHEMA}\n */\n schema?: Schema\n\n /**\n * Skips invalid types instead of throwing. Invalid mapping pairs and sequence\n * items are skipped; `undefined` sequence items are serialized as `null`.\n *\n * @defaultValue `false`\n */\n skipInvalid?: boolean\n\n /**\n * Inlines duplicate objects instead of converting them into references.\n *\n * @defaultValue `false`\n */\n noRefs?: boolean\n\n /**\n * Nesting level at which collections switch from block to flow style. Set to\n * `-1` to never switch automatically.\n *\n * @defaultValue `-1`\n */\n flowLevel?: number\n\n /**\n * Sorts mapping keys when `true`. A function can be provided to define the\n * sort order.\n *\n * @defaultValue `false`\n * @deprecated Use {@link transform} to reorder mapping items.\n */\n sortKeys?: boolean | ((a: any, b: any) => number)\n\n /**\n * Mutates the generated AST before it is rendered.\n *\n * @example Sort mapping keys:\n *\n * ```typescript\n * import { dump, visit } from 'js-yaml'\n *\n * dump(value, {\n * transform: documents => visit(documents, node => {\n * if (node.kind === 'mapping') node.items.sort((a, b) => {\n * const x = a.key.kind === 'scalar' ? a.key.value : ''\n * const y = b.key.kind === 'scalar' ? b.key.value : ''\n * return x.localeCompare(y)\n * })\n * })\n * })\n * ```\n */\n transform?: (documents: Document[]) => void\n}\n\nconst DEFAULT_DUMP_OPTIONS: Required = {\n ...DEFAULT_PRESENTER_OPTIONS,\n schema: DUMP_SCHEMA,\n skipInvalid: false,\n noRefs: false,\n flowLevel: -1,\n sortKeys: false,\n transform: () => {}\n}\n\nfunction defaultCompareFn (a: any, b: any) {\n const x = String(a)\n const y = String(b)\n\n if (x < y) return -1\n if (x > y) return 1\n return 0\n}\n\n/**\n * Serializes JS object as a YAML document. By default it can dump every\n * supported YAML type, so it throws an exception if you try to dump regexps or\n * functions. However, you can disable exceptions by setting the\n * {@link DumpOptions.skipInvalid} option to `true`.\n *\n * @category Main\n */\nfunction dump (input: any, options: DumpOptions = {}) {\n const opts = { ...DEFAULT_DUMP_OPTIONS, ...options }\n\n const documents = jsToAst(input, opts.schema, {\n noRefs: opts.noRefs,\n skipInvalid: opts.skipInvalid\n })\n\n // flowLevel: every node at this depth switches to flow; the presenter forces\n // everything below into flow too, so the walk stops there.\n if (opts.flowLevel >= 0) {\n visit(documents, (node, ctx) => {\n if (ctx.depth < opts.flowLevel) return\n if (node.kind === 'sequence' || node.kind === 'mapping') {\n node.style = COLLECTION_STYLE.FLOW\n }\n return VISIT_SKIP\n })\n }\n\n if (opts.sortKeys) {\n const compareFn = opts.sortKeys === true ? defaultCompareFn : opts.sortKeys\n\n visit(documents, node => {\n if (node.kind !== 'mapping') return\n\n node.items.sort((a, b) => compareFn(\n a.key.kind === 'scalar' ? a.key.value : '',\n b.key.kind === 'scalar' ? b.key.value : ''\n ))\n })\n }\n\n opts.transform(documents)\n\n const PRESENTER_OPT_KEYS = Object.keys(DEFAULT_PRESENTER_OPTIONS) as\n (keyof typeof DEFAULT_PRESENTER_OPTIONS)[]\n\n return present(documents, { ...pick(opts, PRESENTER_OPT_KEYS), schema: opts.schema })\n}\n\nexport {\n dump,\n\n type DumpOptions\n}\n","// Parser events → AST. The second entry into the AST world (the first being\n// `jsToAst`): instead of building JS values like the constructor, it mirrors the\n// same document/sequence/mapping frame walk and emits `Node`s that keep the\n// original styles, tags and anchors, so parsed YAML can be re-dumped faithfully.\n\nimport {\n EVENT_ID,\n SCALAR_STYLE,\n type CollectionStyle,\n type Event,\n type MappingEvent,\n type ScalarEvent,\n type SequenceEvent\n} from '../parser/events.ts'\nimport { getScalarValue } from '../parser/parser_scalar.ts'\nimport { type Schema } from '../schema.ts'\nimport {\n type Node,\n type Document,\n type ScalarNode,\n type SequenceNode,\n type MappingNode,\n type AliasNode\n} from './nodes.ts'\n\nconst NO_RANGE = -1\n\ninterface DocumentFrame {\n kind: 'document'\n doc: Document\n}\n\ninterface SequenceFrame {\n kind: 'sequence'\n node: SequenceNode\n}\n\ninterface MappingFrame {\n kind: 'mapping'\n node: MappingNode\n key: Node | null\n}\n\ntype Frame = DocumentFrame | SequenceFrame | MappingFrame\n\n/** @category AST */\ninterface FromEventsOptions {\n /** Source text referenced by offsets in `events`. */\n source: string\n\n /** Schema used to resolve implicit scalar tags. */\n schema: Schema\n}\n\ninterface FromEventsState {\n source: string\n schema: Schema\n eventIndex: number\n position: number\n frames: Frame[]\n documents: Document[]\n}\n\nfunction eventPosition (event: Event) {\n if ('tagStart' in event && event.tagStart !== NO_RANGE) return event.tagStart\n if ('anchorStart' in event && event.anchorStart !== NO_RANGE) return event.anchorStart\n if ('valueStart' in event && event.valueStart !== NO_RANGE) return event.valueStart\n if ('start' in event) return event.start\n return 0\n}\n\nfunction rawTag (state: FromEventsState, event: ScalarEvent | SequenceEvent | MappingEvent) {\n return event.tagStart === NO_RANGE\n ? ''\n : state.source.slice(event.tagStart, event.tagEnd)\n}\n\nfunction anchorName (state: FromEventsState, event: ScalarEvent | SequenceEvent | MappingEvent) {\n return event.anchorStart === NO_RANGE\n ? undefined\n : state.source.slice(event.anchorStart, event.anchorEnd)\n}\n\nfunction buildScalar (state: FromEventsState, event: ScalarEvent): ScalarNode {\n const value = getScalarValue(state.source, event)\n const raw = rawTag(state, event)\n\n let tag: string\n let tagged = false\n if (raw !== '') {\n tagged = true\n tag = raw\n } else if (event.style === SCALAR_STYLE.PLAIN) {\n tag = state.schema.resolveImplicitScalarTag(value).tag.tagName\n } else {\n tag = state.schema.defaultScalarTag.tagName\n }\n\n return { kind: 'scalar', tag, tagged, style: event.style, anchor: anchorName(state, event), value }\n}\n\nfunction buildCollection (\n state: FromEventsState,\n event: SequenceEvent | MappingEvent,\n defaultTagName: string\n): { tag: string, tagged: boolean, style: CollectionStyle, anchor?: string } {\n const raw = rawTag(state, event)\n\n let tag: string\n let tagged = false\n if (raw === '') {\n tag = defaultTagName\n } else {\n tag = raw\n tagged = true\n }\n\n return { tag, tagged, style: event.style, anchor: anchorName(state, event) }\n}\n\nfunction addNode (state: FromEventsState, node: Node) {\n const frame = state.frames[state.frames.length - 1]\n\n if (frame.kind === 'document') {\n frame.doc.contents = node\n } else if (frame.kind === 'sequence') {\n frame.node.items.push(node)\n } else if (frame.key) {\n frame.node.items.push({ key: frame.key, value: node })\n frame.key = null\n } else {\n frame.key = node\n }\n}\n\n/**\n * Builds an AST from parser events\n *\n * @category AST\n */\nfunction eventsToAst (events: Event[], options: FromEventsOptions): Document[] {\n const state: FromEventsState = {\n source: options.source,\n schema: options.schema,\n eventIndex: 0,\n position: 0,\n frames: [],\n documents: []\n }\n\n while (state.eventIndex < events.length) {\n const event = events[state.eventIndex++]\n state.position = eventPosition(event)\n\n switch (event.type) {\n case EVENT_ID.DOCUMENT: {\n const doc: Document = {\n contents: null,\n explicitStart: event.explicitStart,\n explicitEnd: event.explicitEnd,\n directives: event.directives\n }\n state.frames.push({ kind: 'document', doc })\n break\n }\n\n case EVENT_ID.SCALAR:\n addNode(state, buildScalar(state, event))\n break\n\n case EVENT_ID.SEQUENCE: {\n const { tag, tagged, style, anchor } = buildCollection(state, event, 'tag:yaml.org,2002:seq')\n const node: SequenceNode = { kind: 'sequence', tag, tagged, style, anchor, items: [] }\n state.frames.push({ kind: 'sequence', node })\n break\n }\n\n case EVENT_ID.MAPPING: {\n const { tag, tagged, style, anchor } = buildCollection(state, event, 'tag:yaml.org,2002:map')\n const node: MappingNode = { kind: 'mapping', tag, tagged, style, anchor, items: [] }\n state.frames.push({ kind: 'mapping', node, key: null })\n break\n }\n\n case EVENT_ID.ALIAS: {\n const name = state.source.slice(event.anchorStart, event.anchorEnd)\n const node: AliasNode = { kind: 'alias', anchor: name }\n addNode(state, node)\n break\n }\n\n case EVENT_ID.POP: {\n const frame = state.frames.pop()!\n if (frame.kind === 'mapping' && frame.key) {\n throw new Error('incomplete mapping pair in event stream')\n }\n if (frame.kind === 'document') {\n state.documents.push(frame.doc)\n } else {\n addNode(state, frame.node)\n }\n break\n }\n }\n }\n\n return state.documents\n}\n\nexport {\n eventsToAst,\n type FromEventsOptions\n}\n","export {\n Schema,\n FAILSAFE_SCHEMA,\n JSON_SCHEMA,\n CORE_SCHEMA,\n YAML11_SCHEMA,\n DUMP_SCHEMA\n} from './schema.ts'\n\nexport {\n NOT_RESOLVED,\n defineScalarTag,\n defineSequenceTag,\n defineMappingTag,\n type ScalarTagDefinition,\n type SequenceTagDefinition,\n type MappingTagDefinition,\n type TagDefinition,\n type ScalarTagOptions,\n type SequenceTagOptions,\n type MappingTagOptions\n} from './tag.ts'\n\nexport { strTag } from './tag/scalar/str.ts'\nexport { nullCoreTag } from './tag/scalar/null_core.ts'\nexport { nullJsonTag } from './tag/scalar/null_json.ts'\nexport { nullYaml11Tag } from './tag/scalar/null_yaml11.ts'\nexport { boolCoreTag } from './tag/scalar/bool_core.ts'\nexport { boolJsonTag } from './tag/scalar/bool_json.ts'\nexport { boolYaml11Tag } from './tag/scalar/bool_yaml11.ts'\nexport { intCoreTag } from './tag/scalar/int_core.ts'\nexport { intJsonTag } from './tag/scalar/int_json.ts'\nexport { intYaml11Tag } from './tag/scalar/int_yaml11.ts'\nexport { floatCoreTag } from './tag/scalar/float_core.ts'\nexport { floatJsonTag } from './tag/scalar/float_json.ts'\nexport { floatYaml11Tag } from './tag/scalar/float_yaml11.ts'\nexport { mergeTag } from './tag/scalar/merge.ts'\nexport { binaryTag } from './tag/scalar/binary.ts'\nexport { timestampTag } from './tag/scalar/timestamp.ts'\n\nexport { seqTag } from './tag/sequence/seq.ts'\nexport { omapTag } from './tag/sequence/omap.ts'\nexport { pairsTag } from './tag/sequence/pairs.ts'\n\nexport { mapTag } from './tag/mapping/map.ts'\nexport { realMapTag } from './tag/mapping/real_map.ts'\nexport { legacyMapTag } from './tag/mapping/legacy_map.ts'\nexport { setTag } from './tag/mapping/set.ts'\n\nexport { load, loadAll, type LoadOptions } from './load.ts'\nexport { dump, type DumpOptions } from './dump.ts'\nexport { YAMLException } from './common/exception.ts'\n\nexport {\n EVENT_ID,\n SCALAR_STYLE,\n COLLECTION_STYLE,\n CHOMPING_MODE,\n type EventId,\n type ScalarStyle,\n type CollectionStyle,\n type ChompingMode,\n\n type DocumentDirective,\n type DocumentEvent,\n type SequenceEvent,\n type MappingEvent,\n type ScalarEvent,\n type AliasEvent,\n type PopEvent,\n type Event\n} from './parser/events.ts'\n\nexport {\n parseEvents,\n type ParserOptions\n} from './parser/parser.ts'\n\nexport { getScalarValue } from './parser/parser_scalar.ts'\n\nexport {\n constructFromEvents,\n type ConstructorOptions\n} from './parser/constructor.ts'\n\nexport { eventsToAst, type FromEventsOptions } from './ast/from_events.ts'\nexport { jsToAst, type FromJsOptions } from './ast/from_js.ts'\nexport { present, type PresenterOptions } from './ast/presenter.ts'\nexport { type ScalarLayout, type ScalarStyleRule } from './ast/scalar_styler.ts'\nexport { DEFAULT_SCALAR_STYLE_RULES } from './ast/styler_defaults.ts'\n\nexport {\n visit,\n VISIT_BREAK,\n VISIT_SKIP,\n type Visitor,\n type VisitContext\n} from './ast/visit.ts'\n\nexport {\n type Node,\n type Document,\n type NodeBase,\n type ScalarNode,\n type SequenceNode,\n type MappingNode,\n type AliasNode\n} from './ast/nodes.ts'\n\n// Deprecated compatibility exports\n\nimport { EVENT_ID, SCALAR_STYLE, COLLECTION_STYLE, CHOMPING_MODE } from './parser/events.ts'\n\n/** @deprecated Use `EVENT_ID.DOCUMENT` instead. @internal */\nexport const EVENT_DOCUMENT = EVENT_ID.DOCUMENT\n/** @deprecated Use `EVENT_ID.SEQUENCE` instead. @internal */\nexport const EVENT_SEQUENCE = EVENT_ID.SEQUENCE\n/** @deprecated Use `EVENT_ID.MAPPING` instead. @internal */\nexport const EVENT_MAPPING = EVENT_ID.MAPPING\n/** @deprecated Use `EVENT_ID.SCALAR` instead. @internal */\nexport const EVENT_SCALAR = EVENT_ID.SCALAR\n/** @deprecated Use `EVENT_ID.ALIAS` instead. @internal */\nexport const EVENT_ALIAS = EVENT_ID.ALIAS\n/** @deprecated Use `EVENT_ID.POP` instead. @internal */\nexport const EVENT_POP = EVENT_ID.POP\n/** @deprecated Use `SCALAR_STYLE.PLAIN` instead. @internal */\nexport const SCALAR_STYLE_PLAIN = SCALAR_STYLE.PLAIN\n/** @deprecated Use `SCALAR_STYLE.SINGLE_QUOTED` instead. @internal */\nexport const SCALAR_STYLE_SINGLE_QUOTED = SCALAR_STYLE.SINGLE_QUOTED\n/** @deprecated Use `SCALAR_STYLE.DOUBLE_QUOTED` instead. @internal */\nexport const SCALAR_STYLE_DOUBLE_QUOTED = SCALAR_STYLE.DOUBLE_QUOTED\n/** @deprecated Use `SCALAR_STYLE.LITERAL_BLOCK` instead. @internal */\nexport const SCALAR_STYLE_LITERAL_BLOCK = SCALAR_STYLE.LITERAL_BLOCK\n/** @deprecated Use `SCALAR_STYLE.FOLDED_BLOCK` instead. @internal */\nexport const SCALAR_STYLE_FOLDED_BLOCK = SCALAR_STYLE.FOLDED_BLOCK\n/** @deprecated Use `COLLECTION_STYLE.BLOCK` instead. @internal */\nexport const COLLECTION_STYLE_BLOCK = COLLECTION_STYLE.BLOCK\n/** @deprecated Use `COLLECTION_STYLE.FLOW` instead. @internal */\nexport const COLLECTION_STYLE_FLOW = COLLECTION_STYLE.FLOW\n/** @deprecated Use `CHOMPING_MODE.CLIP` instead. @internal */\nexport const CHOMPING_CLIP = CHOMPING_MODE.CLIP\n/** @deprecated Use `CHOMPING_MODE.STRIP` instead. @internal */\nexport const CHOMPING_STRIP = CHOMPING_MODE.STRIP\n/** @deprecated Use `CHOMPING_MODE.K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AAK,CACjB,IAAM,EAAQ,EAAM,OAAO,IAAI,EAC/B,GAAI,EAAM,OAAS,WAAa,EAAM,IACpC,MAAU,MAAM,yCAAyC,EAEvD,EAAM,OAAS,WACjB,EAAM,UAAU,KAAK,EAAM,GAAG,EAE9B,GAAQ,EAAO,EAAM,IAAI,EAE3B,KACF,CACF,CACF,CAEA,OAAO,EAAM,SACf,CC7FA,IAAa,GAAiB,EAAS,SAE1B,GAAiB,EAAS,SAE1B,GAAgB,EAAS,QAEzB,GAAe,EAAS,OAExB,GAAc,EAAS,MAEvB,GAAY,EAAS,IAErB,GAAqB,EAAa,MAElC,GAA6B,EAAa,cAE1C,GAA6B,EAAa,cAE1C,GAA6B,EAAa,cAE1C,GAA4B,EAAa,aAEzC,GAAyB,EAAiB,MAE1C,GAAwB,EAAiB,KAEzC,GAAgB,EAAc,KAE9B,GAAiB,EAAc,MAE/B,GAAgB,EAAc"} \ No newline at end of file diff --git a/node_modules/js-yaml/dist/js-yaml.cjs.js b/node_modules/js-yaml/dist/js-yaml.cjs.js new file mode 100644 index 00000000..f0beb48e --- /dev/null +++ b/node_modules/js-yaml/dist/js-yaml.cjs.js @@ -0,0 +1,3725 @@ +/*! js-yaml 5.4.1 https://github.com/nodeca/js-yaml @license MIT */ +Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" }); +//#region src/tag.ts +/** +* Returned by a scalar resolver when the source does not match its tag. +* +* @category Tags +*/ +var NOT_RESOLVED = Symbol("NOT_RESOLVED"); +/** +* Create a normalized scalar tag definition. +* +* @category Tags +*/ +function defineScalarTag(tagName, options) { + var _options$implicit, _options$matchByTagPr, _options$implicitFirs, _options$represent, _options$representTag; + return { + tagName, + nodeKind: "scalar", + implicit: (_options$implicit = options.implicit) !== null && _options$implicit !== void 0 ? _options$implicit : false, + matchByTagPrefix: (_options$matchByTagPr = options.matchByTagPrefix) !== null && _options$matchByTagPr !== void 0 ? _options$matchByTagPr : false, + implicitFirstChars: (_options$implicitFirs = options.implicitFirstChars) !== null && _options$implicitFirs !== void 0 ? _options$implicitFirs : null, + resolve: options.resolve, + identify: options.identify, + represent: (_options$represent = options.represent) !== null && _options$represent !== void 0 ? _options$represent : ((data) => String(data)), + representTagName: (_options$representTag = options.representTagName) !== null && _options$representTag !== void 0 ? _options$representTag : (() => tagName) + }; +} +/** +* Create a normalized sequence tag definition. +* +* @category Tags +*/ +function defineSequenceTag(tagName, options) { + var _options$matchByTagPr2, _options$finalize, _options$represent2, _options$representTag2; + const carrierIsResult = options.finalize === void 0; + return { + tagName, + nodeKind: "sequence", + implicit: false, + matchByTagPrefix: (_options$matchByTagPr2 = options.matchByTagPrefix) !== null && _options$matchByTagPr2 !== void 0 ? _options$matchByTagPr2 : false, + create: options.create, + addItem: options.addItem, + finalize: (_options$finalize = options.finalize) !== null && _options$finalize !== void 0 ? _options$finalize : ((carrier) => carrier), + carrierIsResult, + identify: options.identify, + represent: (_options$represent2 = options.represent) !== null && _options$represent2 !== void 0 ? _options$represent2 : ((data) => data), + representTagName: (_options$representTag2 = options.representTagName) !== null && _options$representTag2 !== void 0 ? _options$representTag2 : (() => tagName) + }; +} +/** +* Create a normalized mapping tag definition. +* +* @category Tags +*/ +function defineMappingTag(tagName, options) { + var _options$matchByTagPr3, _options$finalize2, _options$represent3, _options$representTag3; + const carrierIsResult = options.finalize === void 0; + return { + tagName, + nodeKind: "mapping", + implicit: false, + matchByTagPrefix: (_options$matchByTagPr3 = options.matchByTagPrefix) !== null && _options$matchByTagPr3 !== void 0 ? _options$matchByTagPr3 : false, + create: options.create, + addPair: options.addPair, + has: options.has, + keys: options.keys, + get: options.get, + finalize: (_options$finalize2 = options.finalize) !== null && _options$finalize2 !== void 0 ? _options$finalize2 : ((carrier) => carrier), + carrierIsResult, + identify: options.identify, + represent: (_options$represent3 = options.represent) !== null && _options$represent3 !== void 0 ? _options$represent3 : ((data) => data), + representTagName: (_options$representTag3 = options.representTagName) !== null && _options$representTag3 !== void 0 ? _options$representTag3 : (() => tagName) + }; +} +//#endregion +//#region src/tag/scalar/str.ts +/** @category Tags */ +var strTag = defineScalarTag("tag:yaml.org,2002:str", { + resolve: (source) => source, + identify: (data) => typeof data === "string" +}); +//#endregion +//#region src/tag/scalar/null_core.ts +var NULL_VALUES$1 = [ + "", + "~", + "null", + "Null", + "NULL" +]; +/** @category Tags */ +var nullCoreTag = defineScalarTag("tag:yaml.org,2002:null", { + implicit: true, + implicitFirstChars: [ + "", + "~", + "n", + "N" + ], + resolve: (source) => { + if (NULL_VALUES$1.indexOf(source) !== -1) return null; + return NOT_RESOLVED; + }, + identify: (object) => object === null, + represent: () => "null" +}); +//#endregion +//#region src/tag/scalar/null_json.ts +/** @category Tags */ +var nullJsonTag = defineScalarTag("tag:yaml.org,2002:null", { + implicit: true, + implicitFirstChars: ["n"], + resolve: (source, isExplicit) => { + if (source === "null" || isExplicit && source === "") return null; + return NOT_RESOLVED; + }, + identify: (object) => object === null, + represent: () => "null" +}); +//#endregion +//#region src/tag/scalar/null_yaml11.ts +var NULL_VALUES = [ + "", + "~", + "null", + "Null", + "NULL" +]; +/** @category Tags */ +var nullYaml11Tag = defineScalarTag("tag:yaml.org,2002:null", { + implicit: true, + implicitFirstChars: [ + "", + "~", + "n", + "N" + ], + resolve: (source) => { + if (NULL_VALUES.indexOf(source) !== -1) return null; + return NOT_RESOLVED; + }, + identify: (object) => object === null, + represent: () => "null" +}); +//#endregion +//#region src/tag/scalar/bool_core.ts +var TRUE_VALUES$2 = [ + "true", + "True", + "TRUE" +]; +var FALSE_VALUES$2 = [ + "false", + "False", + "FALSE" +]; +/** @category Tags */ +var boolCoreTag = defineScalarTag("tag:yaml.org,2002:bool", { + implicit: true, + implicitFirstChars: [ + "t", + "T", + "f", + "F" + ], + resolve: (source) => { + if (TRUE_VALUES$2.indexOf(source) !== -1) return true; + if (FALSE_VALUES$2.indexOf(source) !== -1) return false; + return NOT_RESOLVED; + }, + identify: (object) => Object.prototype.toString.call(object) === "[object Boolean]", + represent: (object) => object ? "true" : "false" +}); +//#endregion +//#region src/tag/scalar/bool_json.ts +var TRUE_VALUES$1 = ["true"]; +var FALSE_VALUES$1 = ["false"]; +/** @category Tags */ +var boolJsonTag = defineScalarTag("tag:yaml.org,2002:bool", { + implicit: true, + implicitFirstChars: ["t", "f"], + resolve: (source) => { + if (TRUE_VALUES$1.indexOf(source) !== -1) return true; + if (FALSE_VALUES$1.indexOf(source) !== -1) return false; + return NOT_RESOLVED; + }, + identify: (object) => Object.prototype.toString.call(object) === "[object Boolean]", + represent: (object) => object ? "true" : "false" +}); +//#endregion +//#region src/tag/scalar/bool_yaml11.ts +var TRUE_VALUES = [ + "true", + "True", + "TRUE", + "y", + "Y", + "yes", + "Yes", + "YES", + "on", + "On", + "ON" +]; +var FALSE_VALUES = [ + "false", + "False", + "FALSE", + "n", + "N", + "no", + "No", + "NO", + "off", + "Off", + "OFF" +]; +/** @category Tags */ +var boolYaml11Tag = defineScalarTag("tag:yaml.org,2002:bool", { + implicit: true, + implicitFirstChars: [ + "y", + "Y", + "n", + "N", + "t", + "T", + "f", + "F", + "o", + "O" + ], + resolve: (source) => { + if (TRUE_VALUES.indexOf(source) !== -1) return true; + if (FALSE_VALUES.indexOf(source) !== -1) return false; + return NOT_RESOLVED; + }, + identify: (object) => Object.prototype.toString.call(object) === "[object Boolean]", + represent: (object) => object ? "true" : "false" +}); +//#endregion +//#region src/tag/scalar/int_core.ts +var YAML_INTEGER_IMPLICIT_PATTERN$1 = /* @__PURE__ */ new RegExp("^(?:0o[0-7]+|0x[0-9a-fA-F]+|[-+]?[0-9]+)$"); +var YAML_INTEGER_EXPLICIT_PATTERN$1 = /* @__PURE__ */ new RegExp("^(?:[-+]?0b[0-1]+|[-+]?0o[0-7]+|[-+]?0x[0-9a-fA-F]+|[-+]?[0-9]+)$"); +function parseYamlInteger$2(source) { + let value = source; + let sign = 1; + if (value[0] === "-" || value[0] === "+") { + if (value[0] === "-") sign = -1; + value = value.slice(1); + } + if (value.startsWith("0b")) return sign * parseInt(value.slice(2), 2); + if (value.startsWith("0o")) return sign * parseInt(value.slice(2), 8); + if (value.startsWith("0x")) return sign * parseInt(value.slice(2), 16); + return sign * parseInt(value, 10); +} +function resolveYamlInteger$2(source, isExplicit) { + if (isExplicit) { + if (!YAML_INTEGER_EXPLICIT_PATTERN$1.test(source)) return NOT_RESOLVED; + } else if (!YAML_INTEGER_IMPLICIT_PATTERN$1.test(source)) return NOT_RESOLVED; + const result = parseYamlInteger$2(source); + return Number.isFinite(result) ? result : NOT_RESOLVED; +} +/** @category Tags */ +var intCoreTag = defineScalarTag("tag:yaml.org,2002:int", { + implicit: true, + implicitFirstChars: [ + "-", + "+", + ..."0123456789" + ], + resolve: resolveYamlInteger$2, + identify: (object) => Number.isInteger(object) && !Object.is(object, -0) && object.toString(10).indexOf("e") < 0, + represent: (object) => object.toString(10) +}); +//#endregion +//#region src/tag/scalar/int_json.ts +var YAML_INTEGER_IMPLICIT_PATTERN = /* @__PURE__ */ new RegExp("^-?(?:0|[1-9][0-9]*)$"); +var YAML_INTEGER_EXPLICIT_PATTERN = /* @__PURE__ */ new RegExp("^(?:[-+]?0b[0-1]+|[-+]?0o[0-7]+|[-+]?0x[0-9a-fA-F]+|[-+]?[0-9]+)$"); +function parseYamlInteger$1(source) { + let value = source; + let sign = 1; + if (value[0] === "-" || value[0] === "+") { + if (value[0] === "-") sign = -1; + value = value.slice(1); + } + if (value.startsWith("0b")) return sign * parseInt(value.slice(2), 2); + if (value.startsWith("0o")) return sign * parseInt(value.slice(2), 8); + if (value.startsWith("0x")) return sign * parseInt(value.slice(2), 16); + return sign * parseInt(value, 10); +} +function resolveYamlInteger$1(source, isExplicit) { + if (isExplicit) { + if (!YAML_INTEGER_EXPLICIT_PATTERN.test(source)) return NOT_RESOLVED; + } else if (!YAML_INTEGER_IMPLICIT_PATTERN.test(source)) return NOT_RESOLVED; + const result = parseYamlInteger$1(source); + return Number.isFinite(result) ? result : NOT_RESOLVED; +} +/** @category Tags */ +var intJsonTag = defineScalarTag("tag:yaml.org,2002:int", { + implicit: true, + implicitFirstChars: ["-", ..."0123456789"], + resolve: resolveYamlInteger$1, + identify: (object) => Number.isInteger(object) && !Object.is(object, -0) && object.toString(10).indexOf("e") < 0, + represent: (object) => object.toString(10) +}); +//#endregion +//#region src/tag/scalar/int_yaml11.ts +var YAML_INTEGER_PATTERN = /* @__PURE__ */ new RegExp("^(?:[-+]?0b[0-1_]+|[-+]?0[0-7_]+|[-+]?0x[0-9a-fA-F_]+|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+|[-+]?(?:0|[1-9][0-9_]*))$"); +function parseYamlInteger(source) { + let value = source.replace(/_/g, ""); + let sign = 1; + if (value[0] === "-" || value[0] === "+") { + if (value[0] === "-") sign = -1; + value = value.slice(1); + } + if (value.startsWith("0b")) return sign * parseInt(value.slice(2), 2); + if (value.startsWith("0x")) return sign * parseInt(value.slice(2), 16); + if (value.includes(":")) { + let result = 0; + for (const part of value.split(":")) result = result * 60 + Number(part); + return sign * result; + } + if (value !== "0" && value[0] === "0") return sign * parseInt(value, 8); + return sign * parseInt(value, 10); +} +function resolveYamlInteger(source) { + if (!YAML_INTEGER_PATTERN.test(source)) return NOT_RESOLVED; + const result = parseYamlInteger(source); + return Number.isFinite(result) ? result : NOT_RESOLVED; +} +/** @category Tags */ +var intYaml11Tag = defineScalarTag("tag:yaml.org,2002:int", { + implicit: true, + implicitFirstChars: [ + "-", + "+", + ..."0123456789" + ], + resolve: resolveYamlInteger, + identify: (object) => Number.isInteger(object) && !Object.is(object, -0) && object.toString(10).indexOf("e") < 0, + represent: (object) => object.toString(10) +}); +//#endregion +//#region src/tag/scalar/float_core.ts +var YAML_FLOAT_PATTERN$1 = /* @__PURE__ */ new RegExp("^(?:[-+]?[0-9]+(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|[-+]?\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"); +var YAML_FLOAT_SPECIAL_PATTERN$1 = /* @__PURE__ */ new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"); +function resolveYamlFloat$2(source) { + if (!YAML_FLOAT_PATTERN$1.test(source)) return NOT_RESOLVED; + let value = source.toLowerCase(); + const sign = value[0] === "-" ? -1 : 1; + if ("+-".includes(value[0])) value = value.slice(1); + if (value === ".inf") return sign === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY; + if (value === ".nan") return NaN; + const result = sign * parseFloat(value); + if (Number.isFinite(result) || YAML_FLOAT_SPECIAL_PATTERN$1.test(source)) return result; + return NOT_RESOLVED; +} +function representYamlFloat$2(object) { + if (isNaN(object)) return ".nan"; + if (object === Number.POSITIVE_INFINITY) return ".inf"; + if (object === Number.NEGATIVE_INFINITY) return "-.inf"; + if (Object.is(object, -0)) return "-0.0"; + const result = object.toString(10); + return /^[-+]?[0-9]+e/.test(result) ? result.replace("e", ".e") : result; +} +/** @category Tags */ +var floatCoreTag = defineScalarTag("tag:yaml.org,2002:float", { + implicit: true, + implicitFirstChars: [ + "-", + "+", + ".", + ..."0123456789" + ], + resolve: resolveYamlFloat$2, + identify: (object) => typeof object === "number" && (!Number.isInteger(object) || Object.is(object, -0) || object.toString(10).indexOf("e") >= 0), + represent: representYamlFloat$2 +}); +//#endregion +//#region src/tag/scalar/float_json.ts +var YAML_FLOAT_IMPLICIT_PATTERN = /* @__PURE__ */ new RegExp("^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$"); +var YAML_FLOAT_EXPLICIT_PATTERN = /* @__PURE__ */ new RegExp("^(?:[-+]?[0-9]+(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|[-+]?\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"); +function resolveYamlFloat$1(source, isExplicit) { + if (isExplicit) { + if (!YAML_FLOAT_EXPLICIT_PATTERN.test(source)) return NOT_RESOLVED; + let value = source.toLowerCase(); + const sign = value[0] === "-" ? -1 : 1; + if ("+-".includes(value[0])) value = value.slice(1); + if (value === ".inf") return sign === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY; + if (value === ".nan") return NaN; + const result = sign * parseFloat(value); + return Number.isFinite(result) ? result : NOT_RESOLVED; + } + if (!YAML_FLOAT_IMPLICIT_PATTERN.test(source)) return NOT_RESOLVED; + const result = Number(source); + if (Number.isFinite(result)) return result; + return NOT_RESOLVED; +} +function representYamlFloat$1(object) { + if (isNaN(object)) return ".nan"; + if (object === Number.POSITIVE_INFINITY) return ".inf"; + if (object === Number.NEGATIVE_INFINITY) return "-.inf"; + if (Object.is(object, -0)) return "-0.0"; + const result = object.toString(10); + return /^[-+]?[0-9]+e/.test(result) ? result.replace("e", ".e") : result; +} +/** @category Tags */ +var floatJsonTag = defineScalarTag("tag:yaml.org,2002:float", { + implicit: true, + implicitFirstChars: ["-", ..."0123456789"], + resolve: resolveYamlFloat$1, + identify: (object) => typeof object === "number" && (!Number.isInteger(object) || Object.is(object, -0) || object.toString(10).indexOf("e") >= 0), + represent: representYamlFloat$1 +}); +//#endregion +//#region src/tag/scalar/float_yaml11.ts +var YAML_FLOAT_PATTERN = /* @__PURE__ */ new RegExp("^(?:[-+]?(?:(?:[0-9][0-9_]*)?\\.[0-9_]*)(?:[eE][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"); +var YAML_FLOAT_SPECIAL_PATTERN = /* @__PURE__ */ new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"); +function resolveYamlFloat(source) { + if (!YAML_FLOAT_PATTERN.test(source)) return NOT_RESOLVED; + let value = source.toLowerCase().replace(/_/g, ""); + const sign = value[0] === "-" ? -1 : 1; + if ("+-".includes(value[0])) value = value.slice(1); + if (value === ".inf") return sign === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY; + if (value === ".nan") return NaN; + let result = 0; + if (value.includes(":")) { + for (const part of value.split(":")) result = result * 60 + Number(part); + result *= sign; + } else result = sign * parseFloat(value); + if (Number.isFinite(result) || YAML_FLOAT_SPECIAL_PATTERN.test(source)) return result; + return NOT_RESOLVED; +} +function representYamlFloat(object) { + if (isNaN(object)) return ".nan"; + if (object === Number.POSITIVE_INFINITY) return ".inf"; + if (object === Number.NEGATIVE_INFINITY) return "-.inf"; + if (Object.is(object, -0)) return "-0.0"; + const result = object.toString(10); + return /^[-+]?[0-9]+e/.test(result) ? result.replace("e", ".e") : result; +} +/** @category Tags */ +var floatYaml11Tag = defineScalarTag("tag:yaml.org,2002:float", { + implicit: true, + implicitFirstChars: [ + "-", + "+", + ".", + ..."0123456789" + ], + resolve: resolveYamlFloat, + identify: (object) => typeof object === "number" && (!Number.isInteger(object) || Object.is(object, -0) || object.toString(10).indexOf("e") >= 0), + represent: representYamlFloat +}); +//#endregion +//#region src/tag/scalar/merge.ts +/** +* Enables merge keys in {@link CORE_SCHEMA} when added with +* {@link Schema.withTags}. +* +* @category Tags +*/ +var mergeTag = defineScalarTag("tag:yaml.org,2002:merge", { + implicit: true, + implicitFirstChars: ["<"], + resolve: (source, isExplicit) => { + if (source === "<<" || isExplicit && source === "") return "<<"; + return NOT_RESOLVED; + }, + identify: () => false +}); +//#endregion +//#region src/tag/scalar/binary.ts +var BASE64_PATTERN = /^[A-Za-z0-9+/]*={0,2}$/; +function resolveYamlBinary(source) { + const input = source.replace(/\s/g, ""); + if (input.length % 4 !== 0 || !BASE64_PATTERN.test(input)) return NOT_RESOLVED; + const binary = atob(input); + const result = new Uint8Array(binary.length); + for (let index = 0; index < binary.length; index++) result[index] = binary.charCodeAt(index); + return result; +} +function representYamlBinary(object) { + let binary = ""; + for (let index = 0; index < object.length; index++) binary += String.fromCharCode(object[index]); + return btoa(binary); +} +/** +* The `!!binary` tag, represented as a `Uint8Array`. +* +* @category Tags +*/ +var binaryTag = defineScalarTag("tag:yaml.org,2002:binary", { + resolve: resolveYamlBinary, + identify: (object) => Object.prototype.toString.call(object) === "[object Uint8Array]", + represent: representYamlBinary +}); +//#endregion +//#region src/tag/scalar/timestamp.ts +var YAML_DATE_REGEXP = /* @__PURE__ */ new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"); +var YAML_TIMESTAMP_REGEXP = /* @__PURE__ */ new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$"); +function makeUtcDate(year, month, day, hour = 0, minute = 0, second = 0, fraction = 0) { + const date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction)); + date.setUTCFullYear(year, month, day); + return date; +} +function resolveYamlTimestamp(source) { + let match = YAML_DATE_REGEXP.exec(source); + if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(source); + if (match === null) return NOT_RESOLVED; + const year = +match[1]; + const month = +match[2] - 1; + const day = +match[3]; + if (!match[4]) { + const date = makeUtcDate(year, month, day); + if (date.getUTCFullYear() !== year || date.getUTCMonth() !== month || date.getUTCDate() !== day) return NOT_RESOLVED; + return date; + } + const hour = +match[4]; + const minute = +match[5]; + const second = +match[6]; + let fraction = 0; + if (hour > 23 || minute > 59 || second > 59) return NOT_RESOLVED; + if (match[7]) { + let value = match[7].slice(0, 3); + while (value.length < 3) value += "0"; + fraction = +value; + } + const date = makeUtcDate(year, month, day, hour, minute, second, fraction); + if (date.getUTCFullYear() !== year || date.getUTCMonth() !== month || date.getUTCDate() !== day) return NOT_RESOLVED; + if (match[9]) { + const offsetHour = +match[10]; + const offsetMinute = +(match[11] || 0); + if (offsetHour > 23 || offsetMinute > 59) return NOT_RESOLVED; + const offset = (offsetHour * 60 + offsetMinute) * 6e4; + date.setTime(date.getTime() - (match[9] === "-" ? -offset : offset)); + } + return date; +} +/** +* The YAML 1.1 `!!timestamp` tag, represented as a JavaScript `Date`. +* +* @category Tags +*/ +var timestampTag = defineScalarTag("tag:yaml.org,2002:timestamp", { + implicit: true, + implicitFirstChars: [..."0123456789"], + resolve: resolveYamlTimestamp, + identify: (object) => object instanceof Date, + represent: (object) => object.toISOString() +}); +//#endregion +//#region src/tag/sequence/seq.ts +/** @category Tags */ +var seqTag = defineSequenceTag("tag:yaml.org,2002:seq", { + create: () => [], + addItem: (container, item) => { + container.push(item); + }, + identify: Array.isArray +}); +//#endregion +//#region src/common/object.ts +function isPlainObject(data) { + if (data === null || typeof data !== "object" || Array.isArray(data)) return false; + const prototype = Object.getPrototypeOf(data); + return prototype === null || prototype === Object.prototype; +} +function pick(object, keys) { + const result = {}; + for (const key of keys) if (object[key] !== void 0) result[key] = object[key]; + return result; +} +//#endregion +//#region src/tag/sequence/omap.ts +/** +* Provided only for YAML 1.1 compatibility and supported by the loader only. +* JavaScript has no dedicated class to represent this type, so it cannot be +* identified and dumped. +* +* ```yaml +* !!omap +* - one: 1 +* - two: 2 +* ``` +* +* is loaded as +* +* ```javascript +* [ +* { one: 1 }, +* { two: 2 } +* ] +* ``` +* +* @category Tags +*/ +var omapTag = defineSequenceTag("tag:yaml.org,2002:omap", { + create: () => ({ + list: [], + seen: /* @__PURE__ */ new Set() + }), + addItem: (carrier, item) => { + let key; + if (item instanceof Map) { + if (item.size !== 1) return "cannot resolve an ordered map item"; + key = item.keys().next().value; + } else if (isPlainObject(item)) { + const itemKeys = Object.keys(item); + if (itemKeys.length !== 1) return "cannot resolve an ordered map item"; + key = itemKeys[0]; + } else return "cannot resolve an ordered map item"; + if (carrier.seen.has(key)) return "duplicate key in ordered map"; + carrier.seen.add(key); + carrier.list.push(item); + return ""; + }, + finalize: (carrier) => carrier.list, + identify: () => false +}); +//#endregion +//#region src/tag/sequence/pairs.ts +/** +* Provided only for YAML 1.1 compatibility and supported by the loader only. +* JavaScript has no dedicated class to represent this type, so it cannot be +* identified and dumped. +* +* ```yaml +* !!pairs +* - one: 1 +* - two: 2 +* ``` +* +* is loaded as +* +* ```javascript +* [ +* ['one', 1], +* ['two', 2] +* ] +* ``` +* +* @category Tags +*/ +var pairsTag = defineSequenceTag("tag:yaml.org,2002:pairs", { + create: () => [], + addItem: (container, item) => { + if (item instanceof Map) { + if (item.size !== 1) return "cannot resolve a pairs item"; + container.push(item.entries().next().value); + return ""; + } + if (Object.prototype.toString.call(item) !== "[object Object]") return "cannot resolve a pairs item"; + const object = item; + const keys = Object.keys(object); + if (keys.length !== 1) return "cannot resolve a pairs item"; + container.push([keys[0], object[keys[0]]]); + return ""; + }, + identify: () => false +}); +//#endregion +//#region src/tag/mapping/map.ts +/** +* This is the default mapping implementation. It uses `{}` objects and has only +* partial functionality due to language limitations. This choice was made +* because users expect to get JavaScript objects, and it was left unchanged to +* avoid too many breaking changes in the v5 release. +* +* Side effects: +* +* - `Object.hasOwn()` checks or `for...of` loops are required for safe use (to +* avoid falling through to prototypes). +* - Only scalar string keys are supported properly. +* - Other scalar keys, such as `null` and numbers, are converted to strings. +* This is historical behaviour, and it can cause side effects such as +* problems with `!!merge`. +* +* Note that non-string scalar keys may be deprecated in future versions. +* +* Ideally, use {@link realMapTag} instead. +* +* @category Tags +*/ +var mapTag = defineMappingTag("tag:yaml.org,2002:map", { + create: () => ({}), + identify: isPlainObject, + represent: (o) => { + const map = /* @__PURE__ */ new Map(); + for (const key of Object.keys(o)) map.set(key, o[key]); + return map; + }, + addPair: (container, key, value) => { + if (key !== null && typeof key === "object") return "object-based map does not support complex keys"; + const normalizedKey = String(key); + if (normalizedKey === "__proto__") Object.defineProperty(container, normalizedKey, { + value, + enumerable: true, + configurable: true, + writable: true + }); + else container[normalizedKey] = value; + return ""; + }, + has: (container, key) => { + if (key !== null && typeof key === "object") return false; + return Object.prototype.hasOwnProperty.call(container, String(key)); + }, + keys: (container) => Object.keys(container), + get: (container, key) => { + const normalizedKey = String(key); + if (!Object.prototype.hasOwnProperty.call(container, normalizedKey)) return null; + return container[normalizedKey]; + } +}); +//#endregion +//#region src/tag/mapping/set.ts +/** +* The YAML 1.1 `!!set` tag, represented as a JavaScript `Set`. +* +* @category Tags +*/ +var setTag = defineMappingTag("tag:yaml.org,2002:set", { + create: () => /* @__PURE__ */ new Set(), + identify: (data) => data instanceof Set, + represent: (data) => { + const map = /* @__PURE__ */ new Map(); + for (const key of data) map.set(key, null); + return map; + }, + addPair: (container, key, value) => { + if (value !== null) return "cannot resolve a set item"; + container.add(key); + return ""; + }, + has: (container, key) => container.has(key), + keys: (container) => container.keys(), + get: () => null +}); +//#endregion +//#region \0@oxc-project+runtime@0.137.0/helpers/esm/typeof.js +function _typeof(o) { + "@babel/helpers - typeof"; + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) { + return typeof o; + } : function(o) { + return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; + }, _typeof(o); +} +//#endregion +//#region \0@oxc-project+runtime@0.137.0/helpers/esm/toPrimitive.js +function toPrimitive(t, r) { + if ("object" != _typeof(t) || !t) return t; + var e = t[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t, r || "default"); + if ("object" != _typeof(i)) return i; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return ("string" === r ? String : Number)(t); +} +//#endregion +//#region \0@oxc-project+runtime@0.137.0/helpers/esm/toPropertyKey.js +function toPropertyKey(t) { + var i = toPrimitive(t, "string"); + return "symbol" == _typeof(i) ? i : i + ""; +} +//#endregion +//#region \0@oxc-project+runtime@0.137.0/helpers/esm/defineProperty.js +function _defineProperty(e, r, t) { + return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, { + value: t, + enumerable: !0, + configurable: !0, + writable: !0 + }) : e[r] = t, e; +} +//#endregion +//#region \0@oxc-project+runtime@0.137.0/helpers/esm/objectSpread2.js +function ownKeys(e, r) { + var t = Object.keys(e); + if (Object.getOwnPropertySymbols) { + var o = Object.getOwnPropertySymbols(e); + r && (o = o.filter(function(r) { + return Object.getOwnPropertyDescriptor(e, r).enumerable; + })), t.push.apply(t, o); + } + return t; +} +function _objectSpread2(e) { + for (var r = 1; r < arguments.length; r++) { + var t = null != arguments[r] ? arguments[r] : {}; + r % 2 ? ownKeys(Object(t), !0).forEach(function(r) { + _defineProperty(e, r, t[r]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r) { + Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); + }); + } + return e; +} +//#endregion +//#region src/schema.ts +function createTagDefinitionMap() { + return { + scalar: Object.create(null), + sequence: Object.create(null), + mapping: Object.create(null) + }; +} +function createTagDefinitionListMap() { + return { + scalar: [], + sequence: [], + mapping: [] + }; +} +function compileTags(tags) { + const result = []; + for (const tag of tags) { + let index = result.length; + for (let previousIndex = 0; previousIndex < result.length; previousIndex++) { + const previous = result[previousIndex]; + if (previous.nodeKind === tag.nodeKind && previous.tagName === tag.tagName && previous.matchByTagPrefix === tag.matchByTagPrefix) { + index = previousIndex; + break; + } + } + result[index] = tag; + } + return result; +} +/** +* Controls tag resolution when loading and type selection when dumping. +* +* @category Schemas +*/ +var Schema = class Schema { + constructor(tags) { + _defineProperty(this, "tags", void 0); + _defineProperty( + this, + /** @internal */ + "implicitScalarTags", + void 0 + ); + _defineProperty( + this, + /** + * Dispatch implicit scalar resolvers by `source.charAt(0)`. Each bucket holds + * the resolvers that may match that key, in schema order; a key absent from + * the map uses + * {@link Schema.implicitScalarAnyFirstChar} + * (resolvers that declared no first-char constraint, so they apply to any + * first character). + */ + "implicitScalarByFirstChar", + void 0 + ); + _defineProperty(this, "implicitScalarAnyFirstChar", void 0); + _defineProperty( + this, + /** + * The default scalar tag (`!!str`), resolved once so the composer's fallback + * for unresolved plain scalars avoids a keyed lookup per scalar. + * + * @internal + */ + "defaultScalarTag", + void 0 + ); + _defineProperty( + this, + /** + * The default container tags (`!!seq` / `!!map`), used by the dumper: when a + * value is identified by its default tag, the tag is implicit and not + * printed. Undefined if the schema does not define them (then such values + * can't be dumped). + * + * @internal + */ + "defaultSequenceTag", + void 0 + ); + _defineProperty( + this, + /** @internal */ + "defaultMappingTag", + void 0 + ); + _defineProperty(this, "exact", void 0); + _defineProperty(this, "prefix", void 0); + const compiledTags = compileTags(tags); + const implicitScalarTags = []; + const exact = createTagDefinitionMap(); + const prefix = createTagDefinitionListMap(); + for (const tag of compiledTags) { + if (tag.nodeKind === "scalar" && tag.implicit) { + if (tag.matchByTagPrefix) throw new Error("Implicit scalar tags cannot match by tag prefix"); + implicitScalarTags.push(tag); + } + switch (tag.nodeKind) { + case "scalar": + if (tag.matchByTagPrefix) prefix.scalar.push(tag); + else exact.scalar[tag.tagName] = tag; + break; + case "sequence": + if (tag.matchByTagPrefix) prefix.sequence.push(tag); + else exact.sequence[tag.tagName] = tag; + break; + case "mapping": + if (tag.matchByTagPrefix) prefix.mapping.push(tag); + else exact.mapping[tag.tagName] = tag; + break; + } + } + const implicitScalarAnyFirstChar = implicitScalarTags.filter((tag) => tag.implicitFirstChars === null); + const keys = /* @__PURE__ */ new Set(); + for (const tag of implicitScalarTags) if (tag.implicitFirstChars !== null) for (const key of tag.implicitFirstChars) keys.add(key); + const implicitScalarByFirstChar = /* @__PURE__ */ new Map(); + for (const key of keys) implicitScalarByFirstChar.set(key, implicitScalarTags.filter((tag) => tag.implicitFirstChars === null || tag.implicitFirstChars.indexOf(key) !== -1)); + const defaultScalarTag = exact.scalar["tag:yaml.org,2002:str"]; + if (!defaultScalarTag) throw new Error("schema does not define the default scalar tag (tag:yaml.org,2002:str)"); + this.tags = compiledTags; + this.implicitScalarTags = implicitScalarTags; + this.implicitScalarByFirstChar = implicitScalarByFirstChar; + this.implicitScalarAnyFirstChar = implicitScalarAnyFirstChar; + this.defaultScalarTag = defaultScalarTag; + this.defaultSequenceTag = exact.sequence["tag:yaml.org,2002:seq"]; + this.defaultMappingTag = exact.mapping["tag:yaml.org,2002:map"]; + this.exact = exact; + this.prefix = prefix; + } + /** @internal */ + lookupScalarTag(tagName) { + const exactTag = this.exact.scalar[tagName]; + if (exactTag) return exactTag; + for (const tag of this.prefix.scalar) if (tagName.startsWith(tag.tagName)) return tag; + } + /** @internal */ + lookupSequenceTag(tagName) { + const exactTag = this.exact.sequence[tagName]; + if (exactTag) return exactTag; + for (const tag of this.prefix.sequence) if (tagName.startsWith(tag.tagName)) return tag; + } + /** @internal */ + lookupMappingTag(tagName) { + const exactTag = this.exact.mapping[tagName]; + if (exactTag) return exactTag; + for (const tag of this.prefix.mapping) if (tagName.startsWith(tag.tagName)) return tag; + } + /** @internal */ + resolveImplicitScalarTag(source) { + var _this$implicitScalarB; + const candidates = (_this$implicitScalarB = this.implicitScalarByFirstChar.get(source.charAt(0))) !== null && _this$implicitScalarB !== void 0 ? _this$implicitScalarB : this.implicitScalarAnyFirstChar; + for (const tag of candidates) { + const value = tag.resolve(source, false, tag.tagName); + if (value !== NOT_RESOLVED) return { + value, + tag + }; + } + const tag = this.defaultScalarTag; + return { + value: tag.resolve(source, false, tag.tagName), + tag + }; + } + /** + * Creates a new schema with the specified tags added. If a tag already + * exists, it is replaced by the specified tag. + * + * @example + * + * ```javascript + * import { CORE_SCHEMA, mergeTag, realMapTag } from 'js-yaml' + * + * const schema = CORE_SCHEMA.withTags(mergeTag, realMapTag) + * ``` + */ + withTags(...tags) { + let flatTags = []; + for (const tag of tags) flatTags = flatTags.concat(tag); + return new Schema([...this.tags, ...flatTags]); + } +}; +/** +* The YAML 1.2 Failsafe Schema: strings, sequences, and mappings. +* +* @category Schemas +*/ +var FAILSAFE_SCHEMA = new Schema([ + strTag, + seqTag, + mapTag +]); +/** +* The YAML 1.2 JSON Schema. It uses JSON scalar forms while retaining YAML +* collection syntax. +* +* @category Schemas +*/ +var JSON_SCHEMA = new Schema([ + ...FAILSAFE_SCHEMA.tags, + nullJsonTag, + boolJsonTag, + intJsonTag, + floatJsonTag +]); +/** +* The default schema for the loaders. Note, {@link CORE_SCHEMA} comes +* without the `!!merge` tag. You can easily enable it if needed. +* +* @example +* Enable {@link mergeTag}: +* +* ```javascript +* import { load, CORE_SCHEMA, mergeTag } from 'js-yaml' +* +* try { +* load(data, { schema: CORE_SCHEMA.withTags(mergeTag) }) +* } catch (e) { +* console.error(e) +* } +* ``` +* +* @category Schemas +*/ +var CORE_SCHEMA = new Schema([ + ...FAILSAFE_SCHEMA.tags, + nullCoreTag, + boolCoreTag, + intCoreTag, + floatCoreTag +]); +/** +* YAML 1.1-compatible schema. +* +* @category Schemas +*/ +var YAML11_SCHEMA = new Schema([ + ...FAILSAFE_SCHEMA.tags, + nullYaml11Tag, + boolYaml11Tag, + intYaml11Tag, + floatYaml11Tag, + timestampTag, + mergeTag, + binaryTag, + omapTag, + pairsTag, + setTag +]); +/** +* The dumper schema for maximum compatibility. It combines all supported type +* variants from YAML 1.1 and YAML 1.2 so strings matching any of them are +* quoted. This makes the generated YAML more compatible with other parsers. +* +* The schema is based on YAML 1.1, but extends `!!int` and `!!float` to accept +* both YAML 1.1 and Core Schema forms, since Core Schema supports some forms +* that YAML 1.1 does not. +* +* @category Schemas +*/ +var DUMP_SCHEMA = YAML11_SCHEMA.withTags(_objectSpread2(_objectSpread2({}, intYaml11Tag), {}, { resolve: (source, isExplicit, tagName) => { + const result = intYaml11Tag.resolve(source, isExplicit, tagName); + return result === NOT_RESOLVED ? intCoreTag.resolve(source, isExplicit, tagName) : result; +} }), _objectSpread2(_objectSpread2({}, floatYaml11Tag), {}, { resolve: (source, isExplicit, tagName) => { + const result = floatYaml11Tag.resolve(source, isExplicit, tagName); + return result === NOT_RESOLVED ? floatCoreTag.resolve(source, isExplicit, tagName) : result; +} })); +//#endregion +//#region src/tag/mapping/real_map.ts +/** +* Recommended when non-string keys are actually needed. It uses native +* JavaScript `Map` objects, so keys keep their constructed types instead of +* being converted to strings. +* +* It is not the default to avoid widespread breaking changes in existing +* projects. `Map` has a different access API and does not pass deep equality +* checks against `{}`-based fixtures. Alongside the other changes in v5, +* making it the default was considered too disruptive. +* +* If these differences are acceptable for your project, we recommend using +* {@link realMapTag} to guarantee the absence of problems and side effects. +* +* @example +* Enable {@link realMapTag}: +* +* ```javascript +* import { load, CORE_SCHEMA, realMapTag } from 'js-yaml' +* +* try { +* load(data, { schema: CORE_SCHEMA.withTags(realMapTag) }) +* } catch (e) { +* console.error(e) +* } +* ``` +* +* @category Tags +*/ +var realMapTag = defineMappingTag("tag:yaml.org,2002:map", { + create: () => /* @__PURE__ */ new Map(), + addPair: (container, key, value) => { + container.set(key, value); + return ""; + }, + has: (container, key) => container.has(key), + keys: (container) => container.keys(), + get: (container, key) => container.get(key), + identify: (data) => data instanceof Map || isPlainObject(data), + represent: (data) => { + if (data instanceof Map) return data; + const map = /* @__PURE__ */ new Map(); + const obj = data; + for (const key of Object.keys(obj)) map.set(key, obj[key]); + return map; + } +}); +//#endregion +//#region src/tag/mapping/legacy_map.ts +function normalizeKey(key) { + if (Array.isArray(key)) { + const array = Array.prototype.slice.call(key); + for (let index = 0; index < array.length; index++) { + if (Array.isArray(array[index])) return null; + if (typeof array[index] === "object" && Object.prototype.toString.call(array[index]) === "[object Object]") array[index] = "[object Object]"; + } + return String(array); + } + if (typeof key === "object" && Object.prototype.toString.call(key) === "[object Object]") return "[object Object]"; + return String(key); +} +/** +* This implementation exists solely to reproduce v4 behavior exactly. Its use +* is strongly discouraged. If complex or non-string keys are needed, use +* {@link realMapTag} instead. +* +* @category Tags +*/ +var legacyMapTag = defineMappingTag("tag:yaml.org,2002:map", { + create: () => ({}), + identify: isPlainObject, + represent: (o) => { + const map = /* @__PURE__ */ new Map(); + for (const key of Object.keys(o)) map.set(key, o[key]); + return map; + }, + addPair: (container, key, value) => { + const normalizedKey = normalizeKey(key); + if (normalizedKey === null) return "nested arrays are not supported inside keys"; + if (normalizedKey === "__proto__") Object.defineProperty(container, normalizedKey, { + value, + enumerable: true, + configurable: true, + writable: true + }); + else container[normalizedKey] = value; + return ""; + }, + has: (container, key) => { + const normalizedKey = normalizeKey(key); + return normalizedKey !== null && Object.prototype.hasOwnProperty.call(container, normalizedKey); + }, + keys: (container) => Object.keys(container), + get: (container, key) => { + const normalizedKey = String(key); + if (!Object.prototype.hasOwnProperty.call(container, normalizedKey)) return null; + return container[normalizedKey]; + } +}); +//#endregion +//#region src/common/snippet.ts +var DEFAULT_SNIPPET_OPTIONS = { + maxLength: 79, + indent: 1, + linesBefore: 3, + linesAfter: 2 +}; +function getLine(buffer, lineStart, lineEnd, position, maxLineLength) { + let head = ""; + let tail = ""; + const maxHalfLength = Math.floor(maxLineLength / 2) - 1; + if (position - lineStart > maxHalfLength) { + head = " ... "; + lineStart = position - maxHalfLength + head.length; + } + if (lineEnd - position > maxHalfLength) { + tail = " ..."; + lineEnd = position + maxHalfLength - tail.length; + } + return { + str: head + buffer.slice(lineStart, lineEnd).replace(/\t/g, "→") + tail, + pos: position - lineStart + head.length + }; +} +function padStart(string, max) { + return " ".repeat(Math.max(max - string.length, 0)) + string; +} +function makeSnippet(mark, options) { + if (!mark.buffer) return null; + const opts = _objectSpread2(_objectSpread2({}, DEFAULT_SNIPPET_OPTIONS), options); + const re = /\r?\n|\r|\0/g; + const lineStarts = [0]; + const lineEnds = []; + let match; + let foundLineNo = -1; + while (match = re.exec(mark.buffer)) { + lineEnds.push(match.index); + lineStarts.push(match.index + match[0].length); + if (mark.position <= match.index && foundLineNo < 0) foundLineNo = lineStarts.length - 2; + } + if (foundLineNo < 0) foundLineNo = lineStarts.length - 1; + let result = ""; + const lineNoLength = Math.min(mark.line + opts.linesAfter, lineEnds.length).toString().length; + const maxLineLength = opts.maxLength - (opts.indent + lineNoLength + 3); + for (let i = 1; i <= opts.linesBefore; i++) { + if (foundLineNo - i < 0) break; + const line = getLine(mark.buffer, lineStarts[foundLineNo - i], lineEnds[foundLineNo - i], mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo - i]), maxLineLength); + result = `${" ".repeat(opts.indent)}${padStart((mark.line - i + 1).toString(), lineNoLength)} | ${line.str}\n${result}`; + } + const line = getLine(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength); + result += `${" ".repeat(opts.indent)}${padStart((mark.line + 1).toString(), lineNoLength)} | ${line.str}\n`; + result += `${"-".repeat(opts.indent + lineNoLength + 3 + line.pos)}^\n`; + for (let i = 1; i <= opts.linesAfter; i++) { + if (foundLineNo + i >= lineEnds.length) break; + const line = getLine(mark.buffer, lineStarts[foundLineNo + i], lineEnds[foundLineNo + i], mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo + i]), maxLineLength); + result += `${" ".repeat(opts.indent)}${padStart((mark.line + i + 1).toString(), lineNoLength)} | ${line.str}\n`; + } + return result.replace(/\n$/, ""); +} +//#endregion +//#region src/common/exception.ts +function formatError(exception, compact) { + let where = ""; + if (!exception.mark) return exception.reason; + if (exception.mark.name) where += `in "${exception.mark.name}" `; + where += `(${exception.mark.line + 1}:${exception.mark.column + 1})`; + if (!compact && exception.mark.snippet) where += `\n\n${exception.mark.snippet}`; + return `${exception.reason} ${where}`; +} +/** +* A YAML error. Unlike an ordinary `Error`, it adds a source snippet showing +* the location of the problem to the error message, when available. +* +* @category Main +*/ +var YAMLException = class YAMLException extends Error { + /** + * Optional `mark` contains source snippet data. Usually, use + * {@link YAMLException.throwAt} instead of passing it directly. + */ + constructor(reason, mark) { + super(); + _defineProperty(this, "reason", void 0); + _defineProperty(this, "mark", void 0); + this.name = "YAMLException"; + this.reason = reason; + this.mark = mark; + this.message = formatError(this, false); + if (Error.captureStackTrace) Error.captureStackTrace(this, this.constructor); + } + /** + * Returns the formatted error, omitting the source snippet in compact mode. + */ + toString(compact) { + return `${this.name}: ${formatError(this, compact)}`; + } + /** + * Builds a YAMLException with a source snippet and throws it. `source` is + * the raw input text; `position` is an offset into it. + */ + static throwAt(source, position, message, filename = "") { + let line = 0; + let lineStart = 0; + for (let index = 0; index < position; index++) { + const ch = source.charCodeAt(index); + if (ch === 10) { + line++; + lineStart = index + 1; + } else if (ch === 13) { + line++; + if (source.charCodeAt(index + 1) === 10) index++; + lineStart = index + 1; + } + } + const mark = { + name: filename, + buffer: source, + position, + line, + column: position - lineStart + }; + mark.snippet = makeSnippet(mark); + throw new YAMLException(message, mark); + } +}; +//#endregion +//#region src/parser/events.ts +/** @category Events */ +var EVENT_ID = { + DOCUMENT: 1, + SEQUENCE: 2, + MAPPING: 3, + SCALAR: 4, + ALIAS: 5, + POP: 6 +}; +/** @category Nodes */ +var SCALAR_STYLE = { + PLAIN: 1, + SINGLE_QUOTED: 2, + DOUBLE_QUOTED: 3, + LITERAL_BLOCK: 4, + FOLDED_BLOCK: 5 +}; +/** @category Nodes */ +var COLLECTION_STYLE = { + BLOCK: 1, + FLOW: 2 +}; +/** @category Nodes */ +var CHOMPING_MODE = { + CLIP: 1, + STRIP: 2, + KEEP: 3 +}; +//#endregion +//#region src/parser/parser_scalar.ts +var NO_RANGE$3 = -1; +function simpleEscapeSequence(c) { + switch (c) { + case 48: return "\0"; + case 97: return "\x07"; + case 98: return "\b"; + case 116: return " "; + case 9: return " "; + case 110: return "\n"; + case 118: return "\v"; + case 102: return "\f"; + case 114: return "\r"; + case 101: return "\x1B"; + case 32: return " "; + case 34: return "\""; + case 47: return "/"; + case 92: return "\\"; + case 78: return "…"; + case 95: return "\xA0"; + case 76: return "\u2028"; + case 80: return "\u2029"; + default: return ""; + } +} +var simpleEscapeCheck = new Array(256); +var simpleEscapeMap = new Array(256); +for (let i = 0; i < 256; i++) { + simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0; + simpleEscapeMap[i] = simpleEscapeSequence(i); +} +function charFromCodepoint(c) { + if (c <= 65535) return String.fromCharCode(c); + return String.fromCharCode((c - 65536 >> 10) + 55296, (c - 65536 & 1023) + 56320); +} +function fromHexCode$1(c) { + if (c >= 48 && c <= 57) return c - 48; + return (c | 32) - 97 + 10; +} +function escapedHexLen$1(c) { + if (c === 120) return 2; + if (c === 117) return 4; + return 8; +} +function skipFoldedBreaks(input, position, end) { + let breaks = 0; + while (position < end) { + const ch = input.charCodeAt(position); + if (ch === 10) { + breaks++; + position++; + } else if (ch === 13) { + breaks++; + position++; + if (input.charCodeAt(position) === 10) position++; + } else if (ch === 32 || ch === 9) position++; + else break; + } + return { + position, + breaks + }; +} +function foldedBreaks(count) { + if (count === 1) return " "; + return "\n".repeat(count - 1); +} +function getPlainValue(input, start, end) { + let result = ""; + let position = start; + let captureStart = start; + let captureEnd = start; + while (position < end) { + const ch = input.charCodeAt(position); + if (ch === 10 || ch === 13) { + result += input.slice(captureStart, captureEnd); + const fold = skipFoldedBreaks(input, position, end); + result += foldedBreaks(fold.breaks); + position = captureStart = captureEnd = fold.position; + } else { + position++; + if (ch !== 32 && ch !== 9) captureEnd = position; + } + } + return result + input.slice(captureStart, captureEnd); +} +function getSingleQuotedValue(input, start, end) { + let result = ""; + let position = start; + let captureStart = start; + let captureEnd = start; + while (position < end) { + const ch = input.charCodeAt(position); + if (ch === 39) { + result += input.slice(captureStart, position) + "'"; + position += 2; + captureStart = captureEnd = position; + } else if (ch === 10 || ch === 13) { + result += input.slice(captureStart, captureEnd); + const fold = skipFoldedBreaks(input, position, end); + result += foldedBreaks(fold.breaks); + position = captureStart = captureEnd = fold.position; + } else { + position++; + if (ch !== 32 && ch !== 9) captureEnd = position; + } + } + return result + input.slice(captureStart, end); +} +function getDoubleQuotedValue(input, start, end) { + let result = ""; + let position = start; + let captureStart = start; + let captureEnd = start; + while (position < end) { + const ch = input.charCodeAt(position); + if (ch === 92) { + result += input.slice(captureStart, position); + position++; + const escaped = input.charCodeAt(position); + if (escaped === 10 || escaped === 13) position = skipFoldedBreaks(input, position, end).position; + else if (escaped < 256 && simpleEscapeCheck[escaped]) { + result += simpleEscapeMap[escaped]; + position++; + } else { + let hexLength = escapedHexLen$1(escaped); + let hexResult = 0; + for (; hexLength > 0; hexLength--) { + position++; + const digit = fromHexCode$1(input.charCodeAt(position)); + hexResult = (hexResult << 4) + digit; + } + result += charFromCodepoint(hexResult); + position++; + } + captureStart = captureEnd = position; + } else if (ch === 10 || ch === 13) { + result += input.slice(captureStart, captureEnd); + const fold = skipFoldedBreaks(input, position, end); + result += foldedBreaks(fold.breaks); + position = captureStart = captureEnd = fold.position; + } else { + position++; + if (ch !== 32 && ch !== 9) captureEnd = position; + } + } + return result + input.slice(captureStart, end); +} +function getBlockValue(input, start, end, indent, chomping, folded) { + const textIndent = indent < 0 ? 0 : indent; + const region = input.slice(start, end).replace(/\r\n?/g, "\n"); + const lines = region === "" ? [] : (region.endsWith("\n") ? region.slice(0, -1) : region).split("\n"); + let result = ""; + let didReadContent = false; + let emptyLines = 0; + let atMoreIndented = false; + for (const line of lines) { + let column = 0; + while (column < textIndent && line.charCodeAt(column) === 32) column++; + if (indent < 0 || column >= line.length) { + emptyLines++; + continue; + } + const content = line.slice(textIndent); + const first = content.charCodeAt(0); + if (folded) if (first === 32 || first === 9) { + atMoreIndented = true; + result += "\n".repeat(didReadContent ? 1 + emptyLines : emptyLines); + } else if (atMoreIndented) { + atMoreIndented = false; + result += "\n".repeat(emptyLines + 1); + } else if (emptyLines === 0) { + if (didReadContent) result += " "; + } else result += "\n".repeat(emptyLines); + else result += "\n".repeat(didReadContent ? 1 + emptyLines : emptyLines); + result += content; + didReadContent = true; + emptyLines = 0; + } + if (chomping === CHOMPING_MODE.KEEP) result += "\n".repeat(didReadContent ? 1 + emptyLines : emptyLines); + else if (chomping !== CHOMPING_MODE.STRIP) { + if (didReadContent) result += "\n"; + } + return result; +} +/** +* Decodes the scalar referenced by event offsets in `input`. +* +* @category Events +*/ +function getScalarValue(input, scalar) { + if (scalar.valueStart === NO_RANGE$3) return ""; + const { valueStart, valueEnd } = scalar; + if (scalar.fast) return input.slice(valueStart, valueEnd); + switch (scalar.style) { + case SCALAR_STYLE.SINGLE_QUOTED: return getSingleQuotedValue(input, valueStart, valueEnd); + case SCALAR_STYLE.DOUBLE_QUOTED: return getDoubleQuotedValue(input, valueStart, valueEnd); + case SCALAR_STYLE.LITERAL_BLOCK: return getBlockValue(input, valueStart, valueEnd, scalar.indent, scalar.chomping, false); + case SCALAR_STYLE.FOLDED_BLOCK: return getBlockValue(input, valueStart, valueEnd, scalar.indent, scalar.chomping, true); + default: return getPlainValue(input, valueStart, valueEnd); + } +} +//#endregion +//#region src/common/tagname.ts +var DEFAULT_TAG_HANDLERS = Object.assign(Object.create(null), { + "!": "!", + "!!": "tag:yaml.org,2002:" +}); +function tagPercentEncode(source) { + return encodeURI(source).replace(/!/g, "%21"); +} +function tagNameFull(rawTag, tagHandlers) { + var _ref, _tagHandlers$handle; + if (rawTag.startsWith("!<") && rawTag.endsWith(">")) return decodeURIComponent(rawTag.slice(2, -1)); + const handleEnd = rawTag.indexOf("!", 1); + const handle = handleEnd === -1 ? "!" : rawTag.slice(0, handleEnd + 1); + const prefix = (_ref = (_tagHandlers$handle = tagHandlers === null || tagHandlers === void 0 ? void 0 : tagHandlers[handle]) !== null && _tagHandlers$handle !== void 0 ? _tagHandlers$handle : DEFAULT_TAG_HANDLERS[handle]) !== null && _ref !== void 0 ? _ref : handle; + return decodeURIComponent(prefix) + decodeURIComponent(rawTag.slice(handle.length)); +} +function tagNameShort(fullTag) { + let tag = fullTag; + if (tag.charCodeAt(0) === 33) { + tag = tag.slice(1); + return `!${tagPercentEncode(tag)}`; + } + if (tag.slice(0, 18) === "tag:yaml.org,2002:") return `!!${tagPercentEncode(tag.slice(18))}`; + return `!<${tagPercentEncode(tag)}>`; +} +//#endregion +//#region src/parser/constructor.ts +var NO_RANGE$2 = -1; +var MERGE_TAG_NAME = "tag:yaml.org,2002:merge"; +var DEFAULT_CONSTRUCTOR_OPTIONS = { + filename: "", + schema: CORE_SCHEMA, + json: false, + maxTotalMergeKeys: 1e4, + maxAliases: -1 +}; +function eventPosition$1(event) { + if ("tagStart" in event && event.tagStart !== NO_RANGE$2) return event.tagStart; + if ("anchorStart" in event && event.anchorStart !== NO_RANGE$2) return event.anchorStart; + if ("valueStart" in event && event.valueStart !== NO_RANGE$2) return event.valueStart; + if ("start" in event) return event.start; + return 0; +} +function throwError$1(state, message) { + YAMLException.throwAt(state.source, state.position, message, state.filename); +} +function finalizeCollection(state, position, tag, carrier) { + try { + return tag.finalize(carrier); + } catch (error) { + if (error instanceof YAMLException) throw error; + YAMLException.throwAt(state.source, position, error instanceof Error ? error.message : String(error), state.filename); + } +} +function constructScalar(state, event) { + const source = getScalarValue(state.source, event); + const rawTag = event.tagStart === NO_RANGE$2 ? "" : state.source.slice(event.tagStart, event.tagEnd); + const strTag = state.schema.defaultScalarTag; + if (rawTag !== "") { + var _state$schema$lookupM; + if (rawTag === "!") return { + value: source, + tag: strTag + }; + const tagName = tagNameFull(rawTag, state.tagHandlers); + const scalarTag = state.schema.lookupScalarTag(tagName); + if (scalarTag) { + const result = scalarTag.resolve(source, true, tagName); + if (result === NOT_RESOLVED) throwError$1(state, `cannot resolve a node with !<${tagName}> explicit tag`); + return { + value: result, + tag: scalarTag + }; + } + const collectionTagDef = (_state$schema$lookupM = state.schema.lookupMappingTag(tagName)) !== null && _state$schema$lookupM !== void 0 ? _state$schema$lookupM : state.schema.lookupSequenceTag(tagName); + if (collectionTagDef) { + if (source !== "") throwError$1(state, `cannot resolve a node with !<${tagName}> explicit tag`); + const carrier = collectionTagDef.create(tagName); + return { + value: collectionTagDef.carrierIsResult ? carrier : finalizeCollection(state, state.position, collectionTagDef, carrier), + tag: collectionTagDef + }; + } + throwError$1(state, `unknown scalar tag !<${tagName}>`); + } + if (event.style === SCALAR_STYLE.PLAIN) return state.schema.resolveImplicitScalarTag(source); + return { + value: strTag.resolve(source, false, strTag.tagName), + tag: strTag + }; +} +function collectionTagName(state, event, defaultTagName) { + const rawTag = event.tagStart === NO_RANGE$2 ? "" : state.source.slice(event.tagStart, event.tagEnd); + return rawTag === "" || rawTag === "!" ? defaultTagName : tagNameFull(rawTag, state.tagHandlers); +} +function isMappingTag(tag) { + return tag.nodeKind === "mapping"; +} +function chargeMergeWork(state) { + state.totalMergeKeys++; + if (state.maxTotalMergeKeys !== -1 && state.totalMergeKeys > state.maxTotalMergeKeys) throwError$1(state, `merge keys exceeded maxTotalMergeKeys (${state.maxTotalMergeKeys})`); +} +function mergeKeys(state, frame, source, sourceTag) { + chargeMergeWork(state); + for (const sourceKey of sourceTag.keys(source)) { + var _frame$overridable; + chargeMergeWork(state); + if (frame.tag.has(frame.value, sourceKey)) continue; + const err = frame.tag.addPair(frame.value, sourceKey, sourceTag.get(source, sourceKey)); + if (err) throwError$1(state, err); + (_frame$overridable = frame.overridable) !== null && _frame$overridable !== void 0 || (frame.overridable = /* @__PURE__ */ new Set()); + frame.overridable.add(sourceKey); + } +} +function mergeSource(state, frame, source, sourceTag) { + state.position = frame.keyPosition; + if (isMappingTag(sourceTag)) mergeKeys(state, frame, source, sourceTag); + else if (sourceTag.nodeKind === "sequence" && Array.isArray(source)) { + if (source.length > 100) throwError$1(state, "abnormal merge sequence size"); + for (const element of source) { + const elementTag = state.nodeTags.get(element); + if (!elementTag) throwError$1(state, "cannot merge mappings; the provided source object is unacceptable"); + mergeKeys(state, frame, element, elementTag); + } + } else throwError$1(state, "cannot merge mappings; the provided source object is unacceptable"); +} +function addMappingValue(state, frame, key, value, tag) { + var _frame$overridable2, _frame$overridable3; + state.position = frame.keyPosition; + if (frame.keyIsMerge) { + mergeSource(state, frame, value, tag); + return; + } + if (!state.json && frame.tag.has(frame.value, key) && !((_frame$overridable2 = frame.overridable) === null || _frame$overridable2 === void 0 ? void 0 : _frame$overridable2.has(key))) throwError$1(state, "duplicated mapping key"); + const err = frame.tag.addPair(frame.value, key, value); + if (err) throwError$1(state, err); + (_frame$overridable3 = frame.overridable) === null || _frame$overridable3 === void 0 || _frame$overridable3.delete(key); +} +function addValue(state, value, tag) { + const frame = state.frames[state.frames.length - 1]; + if (frame.kind === "document") { + frame.value = value; + frame.hasValue = true; + } else if (frame.kind === "sequence") { + if (isMappingTag(tag)) state.nodeTags.set(value, tag); + const err = frame.tag.addItem(frame.value, value, frame.index++); + if (err) throwError$1(state, err); + } else if (frame.hasKey) { + const key = frame.key; + frame.key = void 0; + frame.hasKey = false; + addMappingValue(state, frame, key, value, tag); + } else { + frame.key = value; + frame.keyPosition = state.position; + frame.hasKey = true; + frame.keyIsMerge = tag.tagName === MERGE_TAG_NAME; + } +} +function storeAnchor(state, event, value, tag, isValueFinal) { + if (event.anchorStart !== NO_RANGE$2) { + const anchor = { + value, + tag, + isValueFinal + }; + state.anchors.set(state.source.slice(event.anchorStart, event.anchorEnd), anchor); + return anchor; + } + return null; +} +/** +* Constructs JavaScript documents directly from parser events, without an +* intermediate AST. +* +* @category Events +*/ +function constructFromEvents(events, options) { + const state = _objectSpread2(_objectSpread2(_objectSpread2({}, DEFAULT_CONSTRUCTOR_OPTIONS), options), {}, { + events, + documents: [], + eventIndex: 0, + position: 0, + frames: [], + anchors: /* @__PURE__ */ new Map(), + nodeTags: /* @__PURE__ */ new Map(), + tagHandlers: Object.create(null), + totalMergeKeys: 0, + aliasCount: 0 + }); + while (state.eventIndex < state.events.length) { + const event = state.events[state.eventIndex++]; + state.position = eventPosition$1(event); + switch (event.type) { + case EVENT_ID.DOCUMENT: + state.anchors = /* @__PURE__ */ new Map(); + state.nodeTags = /* @__PURE__ */ new Map(); + state.aliasCount = 0; + state.tagHandlers = Object.create(null); + for (const directive of event.directives) if (directive.kind === "tag") state.tagHandlers[directive.handle] = directive.prefix; + state.frames.push({ + kind: "document", + position: state.position, + value: void 0, + hasValue: false + }); + break; + case EVENT_ID.SCALAR: { + const { value, tag } = constructScalar(state, event); + storeAnchor(state, event, value, tag, true); + addValue(state, value, tag); + break; + } + case EVENT_ID.SEQUENCE: { + const tagName = collectionTagName(state, event, "tag:yaml.org,2002:seq"); + const tag = state.schema.lookupSequenceTag(tagName); + if (!tag) throwError$1(state, `unknown sequence tag !<${tagName}>`); + const value = tag.create(tagName); + const anchor = storeAnchor(state, event, value, tag, tag.carrierIsResult); + state.frames.push({ + kind: "sequence", + position: state.position, + value, + tag, + anchor, + index: 0 + }); + break; + } + case EVENT_ID.MAPPING: { + const tagName = collectionTagName(state, event, "tag:yaml.org,2002:map"); + const tag = state.schema.lookupMappingTag(tagName); + if (!tag) throwError$1(state, `unknown mapping tag !<${tagName}>`); + const value = tag.create(tagName); + const anchor = storeAnchor(state, event, value, tag, tag.carrierIsResult); + state.frames.push({ + kind: "mapping", + position: state.position, + value, + tag, + anchor, + key: void 0, + keyPosition: state.position, + hasKey: false, + keyIsMerge: false, + overridable: null + }); + break; + } + case EVENT_ID.ALIAS: { + if (state.maxAliases !== -1 && ++state.aliasCount > state.maxAliases) throwError$1(state, `aliases exceeded maxAliases (${state.maxAliases})`); + const name = state.source.slice(event.anchorStart, event.anchorEnd); + const anchor = state.anchors.get(name); + if (!anchor) throwError$1(state, `unidentified alias "${name}"`); + if (!anchor.isValueFinal) throwError$1(state, `recursive alias "${name}" is not supported for tag ${anchor.tag.tagName} because it uses finalize()`); + addValue(state, anchor.value, anchor.tag); + break; + } + case EVENT_ID.POP: { + const frame = state.frames.pop(); + if (frame.kind === "mapping" && frame.hasKey) { + state.position = frame.keyPosition; + throwError$1(state, "incomplete mapping pair in event stream"); + } + if (frame.kind === "document") state.documents.push(frame.value); + else { + const value = frame.tag.carrierIsResult ? frame.value : finalizeCollection(state, frame.position, frame.tag, frame.value); + if (frame.anchor) { + frame.anchor.value = value; + frame.anchor.isValueFinal = true; + } + addValue(state, value, frame.tag); + } + break; + } + } + } + return state.documents; +} +//#endregion +//#region src/parser/parser.ts +var NO_RANGE$1 = -1; +var HAS_OWN = Object.prototype.hasOwnProperty; +var CONTEXT_FLOW_IN = 1; +var CONTEXT_FLOW_OUT = 2; +var CONTEXT_BLOCK_IN = 3; +var CONTEXT_BLOCK_OUT = 4; +var PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; +var PATTERN_FLOW_INDICATORS = /[,\[\]{}]/; +var PATTERN_TAG_HANDLE = /^(?:!|!!|![0-9A-Za-z-]+!)$/; +var NS_URI_CHAR = String.raw`(?:%[0-9A-Fa-f]{2}|[0-9A-Za-z\-#;/?:@&=+$,_.!~*'()\[\]])`; +var NS_TAG_CHAR = String.raw`(?:%[0-9A-Fa-f]{2}|[0-9A-Za-z\-#;/?:@&=+$.~*'()_])`; +var PATTERN_TAG_URI = new RegExp(`^(?:${NS_URI_CHAR})*$`); +var PATTERN_TAG_SUFFIX = new RegExp(`^(?:${NS_TAG_CHAR})+$`); +var PATTERN_TAG_PREFIX = new RegExp(`^(?:!(?:${NS_URI_CHAR})*|${NS_TAG_CHAR}(?:${NS_URI_CHAR})*)$`); +var DEFAULT_PARSER_OPTIONS = { + filename: "", + maxDepth: 100 +}; +function addDocumentEvent(state, explicitStart, explicitEnd) { + state.events.push({ + type: EVENT_ID.DOCUMENT, + explicitStart, + explicitEnd, + directives: state.directives + }); +} +function addSequenceEvent(state, start, anchorStart, anchorEnd, tagStart, tagEnd, style) { + state.events.push({ + type: EVENT_ID.SEQUENCE, + start, + anchorStart, + anchorEnd, + tagStart, + tagEnd, + style + }); +} +function addMappingEvent(state, start, anchorStart, anchorEnd, tagStart, tagEnd, style) { + state.events.push({ + type: EVENT_ID.MAPPING, + start, + anchorStart, + anchorEnd, + tagStart, + tagEnd, + style + }); +} +function insertFlowPairMappingEvent(state, snapshot) { + state.events.splice(snapshot.eventsLength, 0, { + type: EVENT_ID.MAPPING, + start: snapshot.position, + anchorStart: NO_RANGE$1, + anchorEnd: NO_RANGE$1, + tagStart: NO_RANGE$1, + tagEnd: NO_RANGE$1, + style: COLLECTION_STYLE.FLOW + }); +} +function addScalarEvent(state, valueStart, valueEnd, anchorStart, anchorEnd, tagStart, tagEnd, style, chomping = CHOMPING_MODE.CLIP, indent = -1, fast = false) { + state.events.push({ + type: EVENT_ID.SCALAR, + valueStart, + valueEnd, + anchorStart, + anchorEnd, + tagStart, + tagEnd, + style, + chomping, + indent, + fast + }); +} +function addAliasEvent(state, anchorStart, anchorEnd) { + state.events.push({ + type: EVENT_ID.ALIAS, + anchorStart, + anchorEnd + }); +} +function addPopEvent(state) { + state.events.push({ type: EVENT_ID.POP }); +} +function addEmptyScalarEvent(state) { + addScalarEvent(state, NO_RANGE$1, NO_RANGE$1, NO_RANGE$1, NO_RANGE$1, NO_RANGE$1, NO_RANGE$1, SCALAR_STYLE.PLAIN); +} +function emptyProperties() { + return { + anchorStart: NO_RANGE$1, + anchorEnd: NO_RANGE$1, + tagStart: NO_RANGE$1, + tagEnd: NO_RANGE$1 + }; +} +function snapshotState(state) { + return { + position: state.position, + line: state.line, + lineStart: state.lineStart, + lineIndent: state.lineIndent, + firstTabInLine: state.firstTabInLine, + eventsLength: state.events.length + }; +} +function restoreState(state, snapshot) { + state.position = snapshot.position; + state.line = snapshot.line; + state.lineStart = snapshot.lineStart; + state.lineIndent = snapshot.lineIndent; + state.firstTabInLine = snapshot.firstTabInLine; + state.events.length = snapshot.eventsLength; +} +function throwError(state, message) { + YAMLException.throwAt(state.input.slice(0, state.length), state.position, message, state.filename); +} +function isEol(c) { + return c === 10 || c === 13; +} +function isWhiteSpace(c) { + return c === 9 || c === 32; +} +function isWsOrEol(c) { + return isWhiteSpace(c) || isEol(c); +} +function isWsOrEolOrEnd(c) { + return c === 0 || isWsOrEol(c); +} +function isFlowIndicator(c) { + return c === 44 || c === 91 || c === 93 || c === 123 || c === 125; +} +function fromDecimalCode(c) { + return c >= 48 && c <= 57 ? c - 48 : -1; +} +function fromHexCode(c) { + if (c >= 48 && c <= 57) return c - 48; + const lc = c | 32; + if (lc >= 97 && lc <= 102) return lc - 97 + 10; + return -1; +} +function escapedHexLen(c) { + if (c === 120) return 2; + if (c === 117) return 4; + if (c === 85) return 8; + return 0; +} +function isSimpleEscape(c) { + return c === 48 || c === 97 || c === 98 || c === 116 || c === 9 || c === 110 || c === 118 || c === 102 || c === 114 || c === 101 || c === 32 || c === 34 || c === 47 || c === 92 || c === 78 || c === 95 || c === 76 || c === 80; +} +function consumeLineBreak(state) { + if (state.input.charCodeAt(state.position) === 10) state.position++; + else { + state.position++; + if (state.input.charCodeAt(state.position) === 10) state.position++; + } + state.line++; + state.lineStart = state.position; + state.lineIndent = 0; + state.firstTabInLine = -1; +} +function skipSeparationSpace(state, allowComments) { + let lineBreaks = 0; + let ch = state.input.charCodeAt(state.position); + let hasSeparation = state.position === state.lineStart || isWsOrEol(state.input.charCodeAt(state.position - 1)); + while (ch !== 0) { + while (isWhiteSpace(ch)) { + hasSeparation = true; + if (ch === 9 && state.firstTabInLine === -1) state.firstTabInLine = state.position; + ch = state.input.charCodeAt(++state.position); + } + if (allowComments && hasSeparation && ch === 35) do + ch = state.input.charCodeAt(++state.position); + while (!isEol(ch) && ch !== 0); + if (!isEol(ch)) break; + consumeLineBreak(state); + lineBreaks++; + hasSeparation = true; + ch = state.input.charCodeAt(state.position); + while (ch === 32) { + state.lineIndent++; + ch = state.input.charCodeAt(++state.position); + } + } + return lineBreaks; +} +function testDocumentSeparator(state, position = state.position) { + const ch = state.input.charCodeAt(position); + if ((ch === 45 || ch === 46) && ch === state.input.charCodeAt(position + 1) && ch === state.input.charCodeAt(position + 2)) { + const following = state.input.charCodeAt(position + 3); + return following === 0 || isWsOrEol(following); + } + return false; +} +function skipByteOrderMark(state) { + if (state.position === state.lineStart && state.input.charCodeAt(state.position) === 65279) { + state.position++; + state.lineStart = state.position; + } +} +function testDocumentBoundary(state) { + if (state.position !== state.lineStart) return false; + if (testDocumentSeparator(state)) return true; + if (state.input.charCodeAt(state.position) !== 65279) return false; + const snapshot = snapshotState(state); + skipByteOrderMark(state); + skipSeparationSpace(state, true); + const ch = state.input.charCodeAt(state.position); + const result = state.position === state.lineStart && (ch === 37 || ch === 45 && testDocumentSeparator(state)); + restoreState(state, snapshot); + return result; +} +function skipUntilLineEnd(state) { + let ch = state.input.charCodeAt(state.position); + while (ch !== 0 && !isEol(ch)) ch = state.input.charCodeAt(++state.position); +} +function checkPrintable(state, start, end) { + if (PATTERN_NON_PRINTABLE.test(state.input.slice(start, end))) throwError(state, "the stream contains non-printable characters"); +} +function readTagProperty(state, props, inFlow) { + if (state.input.charCodeAt(state.position) !== 33) return false; + if (props.tagStart !== NO_RANGE$1) throwError(state, "duplication of a tag property"); + const start = state.position; + let isVerbatim = false; + let isNamed = false; + let tagHandle = "!"; + let ch = state.input.charCodeAt(++state.position); + if (ch === 60) { + isVerbatim = true; + ch = state.input.charCodeAt(++state.position); + } else if (ch === 33) { + isNamed = true; + tagHandle = "!!"; + ch = state.input.charCodeAt(++state.position); + } + let suffixStart = state.position; + let tagName; + if (isVerbatim) { + while (ch !== 0 && ch !== 62) ch = state.input.charCodeAt(++state.position); + if (ch !== 62) throwError(state, "unexpected end of the stream within a verbatim tag"); + tagName = state.input.slice(suffixStart, state.position); + state.position++; + } else { + while (ch !== 0 && !isWsOrEol(ch) && !(inFlow && isFlowIndicator(ch))) { + if (ch === 33) if (!isNamed) { + tagHandle = state.input.slice(suffixStart - 1, state.position + 1); + if (!PATTERN_TAG_HANDLE.test(tagHandle)) throwError(state, "named tag handle cannot contain such characters"); + isNamed = true; + suffixStart = state.position + 1; + } else throwError(state, "tag suffix cannot contain exclamation marks"); + ch = state.input.charCodeAt(++state.position); + } + tagName = state.input.slice(suffixStart, state.position); + if (PATTERN_FLOW_INDICATORS.test(tagName)) throwError(state, "tag suffix cannot contain flow indicator characters"); + } + if (tagName && !(isVerbatim ? PATTERN_TAG_URI.test(tagName) : PATTERN_TAG_SUFFIX.test(tagName))) throwError(state, `tag name cannot contain such characters: ${tagName}`); + if (!isVerbatim && tagHandle !== "!" && tagHandle !== "!!" && !HAS_OWN.call(state.tagHandlers, tagHandle)) throwError(state, `undeclared tag handle "${tagHandle}"`); + props.tagStart = start; + props.tagEnd = state.position; + return true; +} +function readAnchorProperty(state, props) { + if (state.input.charCodeAt(state.position) !== 38) return false; + if (props.anchorStart !== NO_RANGE$1) throwError(state, "duplication of an anchor property"); + state.position++; + const start = state.position; + while (state.input.charCodeAt(state.position) !== 0 && !isWsOrEol(state.input.charCodeAt(state.position)) && !isFlowIndicator(state.input.charCodeAt(state.position))) state.position++; + if (state.position === start) throwError(state, "name of an anchor node must contain at least one character"); + props.anchorStart = start; + props.anchorEnd = state.position; + return true; +} +function readAlias(state, props) { + if (state.input.charCodeAt(state.position) !== 42) return false; + if (props.anchorStart !== NO_RANGE$1 || props.tagStart !== NO_RANGE$1) throwError(state, "alias node should not have any properties"); + state.position++; + const start = state.position; + while (state.input.charCodeAt(state.position) !== 0 && !isWsOrEol(state.input.charCodeAt(state.position)) && !isFlowIndicator(state.input.charCodeAt(state.position))) state.position++; + if (state.position === start) throwError(state, "name of an alias node must contain at least one character"); + addAliasEvent(state, start, state.position); + return true; +} +function readFlowScalarBreak(state, nodeIndent) { + skipSeparationSpace(state, false); + if (state.lineIndent < nodeIndent) throwError(state, "deficient indentation"); +} +function readSingleQuotedScalar(state, nodeIndent, props) { + if (state.input.charCodeAt(state.position) !== 39) return false; + state.position++; + const start = state.position; + let simple = true; + while (state.input.charCodeAt(state.position) !== 0) { + const ch = state.input.charCodeAt(state.position); + if (ch === 39) { + if (state.input.charCodeAt(state.position + 1) === 39) { + simple = false; + state.position += 2; + continue; + } + const end = state.position; + state.position++; + addScalarEvent(state, start, end, props.anchorStart, props.anchorEnd, props.tagStart, props.tagEnd, SCALAR_STYLE.SINGLE_QUOTED, CHOMPING_MODE.CLIP, -1, simple); + return true; + } + if (isEol(ch)) { + simple = false; + readFlowScalarBreak(state, nodeIndent); + } else if (state.position === state.lineStart && testDocumentSeparator(state)) throwError(state, "unexpected end of the document within a single quoted scalar"); + else if (ch !== 9 && ch < 32) throwError(state, "expected valid JSON character"); + else state.position++; + } + throwError(state, "unexpected end of the stream within a single quoted scalar"); +} +function readDoubleQuotedScalar(state, nodeIndent, props) { + if (state.input.charCodeAt(state.position) !== 34) return false; + state.position++; + const start = state.position; + let simple = true; + while (state.input.charCodeAt(state.position) !== 0) { + const ch = state.input.charCodeAt(state.position); + if (ch === 34) { + const end = state.position; + state.position++; + addScalarEvent(state, start, end, props.anchorStart, props.anchorEnd, props.tagStart, props.tagEnd, SCALAR_STYLE.DOUBLE_QUOTED, CHOMPING_MODE.CLIP, -1, simple); + return true; + } + if (ch === 92) { + simple = false; + const escaped = state.input.charCodeAt(++state.position); + if (isEol(escaped)) readFlowScalarBreak(state, nodeIndent); + else if (isSimpleEscape(escaped)) state.position++; + else { + let hexLength = escapedHexLen(escaped); + if (hexLength === 0) throwError(state, "unknown escape sequence"); + while (hexLength-- > 0) { + state.position++; + if (fromHexCode(state.input.charCodeAt(state.position)) < 0) throwError(state, "expected hexadecimal character"); + } + state.position++; + } + } else if (isEol(ch)) { + simple = false; + readFlowScalarBreak(state, nodeIndent); + } else if (state.position === state.lineStart && testDocumentSeparator(state)) throwError(state, "unexpected end of the document within a double quoted scalar"); + else if (ch !== 9 && ch < 32) throwError(state, "expected valid JSON character"); + else state.position++; + } + throwError(state, "unexpected end of the stream within a double quoted scalar"); +} +function readBlockScalar(state, parentIndent, props) { + const ch = state.input.charCodeAt(state.position); + let chomping = CHOMPING_MODE.CLIP; + let indent = -1; + let detectedIndent = false; + if (ch !== 124 && ch !== 62) return false; + const style = ch === 124 ? SCALAR_STYLE.LITERAL_BLOCK : SCALAR_STYLE.FOLDED_BLOCK; + state.position++; + while (state.input.charCodeAt(state.position) !== 0) { + const current = state.input.charCodeAt(state.position); + const digit = fromDecimalCode(current); + if (current === 43 || current === 45) { + if (chomping !== CHOMPING_MODE.CLIP) throwError(state, "repeat of a chomping mode identifier"); + chomping = current === 43 ? CHOMPING_MODE.KEEP : CHOMPING_MODE.STRIP; + state.position++; + } else if (digit >= 0) { + if (digit === 0) throwError(state, "bad explicit indentation width of a block scalar; it cannot be less than one"); + if (detectedIndent) throwError(state, "repeat of an indentation width identifier"); + indent = parentIndent + digit - 1; + detectedIndent = true; + state.position++; + } else break; + } + let hadWhitespace = false; + while (isWhiteSpace(state.input.charCodeAt(state.position))) { + hadWhitespace = true; + state.position++; + } + if (hadWhitespace && state.input.charCodeAt(state.position) === 35) skipUntilLineEnd(state); + if (isEol(state.input.charCodeAt(state.position))) consumeLineBreak(state); + else if (state.input.charCodeAt(state.position) !== 0) throwError(state, "a line break is expected"); + let contentIndent = detectedIndent ? indent : -1; + let maxLeadingIndent = 0; + const valueStart = state.position; + let valueEnd = state.position; + while (state.input.charCodeAt(state.position) !== 0) { + const linePosition = state.position; + let column = 0; + while (state.input.charCodeAt(linePosition + column) === 32) column++; + const first = state.input.charCodeAt(linePosition + column); + if (first === 0) { + if (contentIndent >= 0) { + if (column > contentIndent) valueEnd = linePosition + column; + } else if (column > 0) valueEnd = linePosition + column; + break; + } + if (testDocumentBoundary(state)) break; + if (!detectedIndent && contentIndent === -1 && isEol(first)) maxLeadingIndent = Math.max(maxLeadingIndent, column); + if (!detectedIndent && contentIndent === -1 && !isEol(first)) { + if (first === 9 && column < parentIndent) { + state.position = linePosition + column; + throwError(state, "tab characters must not be used in indentation"); + } + if (column < maxLeadingIndent) { + state.position = linePosition + column; + throwError(state, "bad indentation of a mapping entry"); + } + } + if (contentIndent === -1 && first !== 0 && !isEol(first) && column < parentIndent) { + state.lineIndent = column; + state.position = linePosition + column; + break; + } + if (!detectedIndent && first !== 0 && !isEol(first) && contentIndent === -1) contentIndent = column; + const requiredIndent = contentIndent === -1 ? parentIndent + 1 : contentIndent; + if (first !== 0 && !isEol(first) && column < requiredIndent) { + state.lineIndent = column; + state.position = linePosition + column; + break; + } + skipUntilLineEnd(state); + valueEnd = state.position; + if (isEol(state.input.charCodeAt(state.position))) { + consumeLineBreak(state); + valueEnd = state.position; + } + } + checkPrintable(state, valueStart, valueEnd); + addScalarEvent(state, valueStart, valueEnd, props.anchorStart, props.anchorEnd, props.tagStart, props.tagEnd, style, chomping, contentIndent); + return true; +} +function canStartPlainScalar(state, nodeContext) { + const ch = state.input.charCodeAt(state.position); + const inFlow = nodeContext === CONTEXT_FLOW_IN; + if (ch === 0 || isWsOrEol(ch) || ch === 35 || ch === 38 || ch === 42 || ch === 33 || ch === 124 || ch === 62 || ch === 39 || ch === 34 || ch === 37 || ch === 64 || ch === 96 || inFlow && isFlowIndicator(ch)) return false; + if (ch === 63 || ch === 45) { + const following = state.input.charCodeAt(state.position + 1); + if (isWsOrEolOrEnd(following) || inFlow && isFlowIndicator(following)) return false; + } + return true; +} +function readPlainScalar(state, nodeIndent, nodeContext, props) { + if (!canStartPlainScalar(state, nodeContext)) return false; + const start = state.position; + let end = state.position; + let ch = state.input.charCodeAt(state.position); + const inFlow = nodeContext === CONTEXT_FLOW_IN; + let multiline = false; + while (ch !== 0) { + if (testDocumentBoundary(state)) break; + if (ch === 58) { + const following = state.input.charCodeAt(state.position + 1); + if (isWsOrEolOrEnd(following) || inFlow && isFlowIndicator(following)) break; + } else if (ch === 35) { + if (isWsOrEol(state.input.charCodeAt(state.position - 1))) break; + } else if (inFlow && isFlowIndicator(ch)) break; + else if (isEol(ch)) { + const savedPosition = state.position; + const savedLine = state.line; + const savedLineStart = state.lineStart; + const savedLineIndent = state.lineIndent; + skipSeparationSpace(state, false); + if (state.lineIndent >= nodeIndent) { + multiline = true; + ch = state.input.charCodeAt(state.position); + continue; + } + state.position = savedPosition; + state.line = savedLine; + state.lineStart = savedLineStart; + state.lineIndent = savedLineIndent; + break; + } + if (!isWhiteSpace(ch)) end = state.position + 1; + ch = state.input.charCodeAt(++state.position); + } + if (end === start) return false; + checkPrintable(state, start, end); + addScalarEvent(state, start, end, props.anchorStart, props.anchorEnd, props.tagStart, props.tagEnd, SCALAR_STYLE.PLAIN, CHOMPING_MODE.CLIP, -1, !multiline); + return true; +} +function skipFlowSeparationSpace(state, nodeIndent) { + const startLine = state.line; + skipSeparationSpace(state, true); + if (state.line > startLine && state.lineIndent < nodeIndent || state.firstTabInLine !== -1 && state.lineIndent < nodeIndent) throwError(state, "deficient indentation"); +} +function readFlowCollection(state, nodeIndent, props) { + const ch = state.input.charCodeAt(state.position); + const isMapping = ch === 123; + const start = state.position; + let readNext = true; + if (ch !== 91 && ch !== 123) return false; + const terminator = isMapping ? 125 : 93; + if (isMapping) addMappingEvent(state, start, props.anchorStart, props.anchorEnd, props.tagStart, props.tagEnd, COLLECTION_STYLE.FLOW); + else addSequenceEvent(state, start, props.anchorStart, props.anchorEnd, props.tagStart, props.tagEnd, COLLECTION_STYLE.FLOW); + state.position++; + while (state.input.charCodeAt(state.position) !== 0) { + skipFlowSeparationSpace(state, nodeIndent); + let ch = state.input.charCodeAt(state.position); + if (ch === terminator) { + state.position++; + addPopEvent(state); + return true; + } else if (!readNext) throwError(state, "missed comma between flow collection entries"); + else if (ch === 44) throwError(state, "expected the node content, but found ','"); + let isPair = false; + let isExplicitPair = false; + if (ch === 63 && isWsOrEol(state.input.charCodeAt(state.position + 1))) { + isPair = isExplicitPair = true; + state.position += 1; + skipFlowSeparationSpace(state, nodeIndent); + } + const entryLine = state.line; + const entryStart = snapshotState(state); + const keyWasRead = parseNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); + skipFlowSeparationSpace(state, nodeIndent); + ch = state.input.charCodeAt(state.position); + if ((isMapping || isExplicitPair || state.line === entryLine) && ch === 58) { + isPair = true; + state.position++; + skipFlowSeparationSpace(state, nodeIndent); + if (!isMapping) { + insertFlowPairMappingEvent(state, entryStart); + if (!keyWasRead) addEmptyScalarEvent(state); + } else if (!keyWasRead) addEmptyScalarEvent(state); + if (!parseNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true)) addEmptyScalarEvent(state); + skipFlowSeparationSpace(state, nodeIndent); + if (!isMapping) addPopEvent(state); + } else if (isMapping && isPair) { + if (!keyWasRead) addEmptyScalarEvent(state); + addEmptyScalarEvent(state); + } else if (isMapping) addEmptyScalarEvent(state); + else if (isPair) { + insertFlowPairMappingEvent(state, entryStart); + if (!keyWasRead) addEmptyScalarEvent(state); + addEmptyScalarEvent(state); + addPopEvent(state); + } + ch = state.input.charCodeAt(state.position); + if (ch === 44) { + readNext = true; + state.position++; + } else readNext = false; + } + throwError(state, "unexpected end of the stream within a flow collection"); +} +function readBlockSequence(state, nodeIndent, props) { + if (state.firstTabInLine !== -1 || state.input.charCodeAt(state.position) !== 45 || !isWsOrEolOrEnd(state.input.charCodeAt(state.position + 1))) return false; + addSequenceEvent(state, state.position, props.anchorStart, props.anchorEnd, props.tagStart, props.tagEnd, COLLECTION_STYLE.BLOCK); + while (state.input.charCodeAt(state.position) === 45 && isWsOrEolOrEnd(state.input.charCodeAt(state.position + 1))) { + if (state.firstTabInLine !== -1) { + state.position = state.firstTabInLine; + throwError(state, "tab characters must not be used in indentation"); + } + const entryLine = state.line; + state.position++; + const hadBreak = skipSeparationSpace(state, true) > 0; + if (state.firstTabInLine !== -1 && state.input.charCodeAt(state.position) === 45 && isWsOrEolOrEnd(state.input.charCodeAt(state.position + 1))) throwError(state, "bad indentation of a sequence entry"); + if (hadBreak && state.lineIndent <= nodeIndent) addEmptyScalarEvent(state); + else parseNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true); + skipSeparationSpace(state, true); + if (state.lineIndent < nodeIndent || state.position >= state.length) break; + if (state.lineIndent > nodeIndent) throwError(state, "bad indentation of a sequence entry"); + if (state.line === entryLine && state.input.charCodeAt(state.position) === 45 && isWsOrEolOrEnd(state.input.charCodeAt(state.position + 1))) throwError(state, "bad indentation of a sequence entry"); + } + addPopEvent(state); + return true; +} +function readBlockMapping(state, nodeIndent, flowIndent, props) { + let atExplicitKey = false; + let detected = false; + let mappingOpened = false; + let pendingExplicitKey = false; + if (state.firstTabInLine !== -1) return false; + let ch = state.input.charCodeAt(state.position); + while (ch !== 0) { + if (!atExplicitKey && state.firstTabInLine !== -1) { + state.position = state.firstTabInLine; + throwError(state, "tab characters must not be used in indentation"); + } + const following = state.input.charCodeAt(state.position + 1); + const entryLine = state.line; + if ((ch === 63 || ch === 58) && isWsOrEolOrEnd(following)) { + if (!mappingOpened) { + addMappingEvent(state, state.position, props.anchorStart, props.anchorEnd, props.tagStart, props.tagEnd, COLLECTION_STYLE.BLOCK); + mappingOpened = true; + } + if (ch === 63) { + if (atExplicitKey) addEmptyScalarEvent(state); + detected = true; + atExplicitKey = true; + } else if (atExplicitKey) atExplicitKey = false; + else { + addEmptyScalarEvent(state); + detected = true; + atExplicitKey = false; + } + state.position += 1; + pendingExplicitKey = true; + } else { + if (atExplicitKey) { + addEmptyScalarEvent(state); + atExplicitKey = false; + } + const beforeKey = snapshotState(state); + if (!parseNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) break; + if (state.line === entryLine) { + ch = state.input.charCodeAt(state.position); + while (isWhiteSpace(ch)) ch = state.input.charCodeAt(++state.position); + if (ch === 58) { + ch = state.input.charCodeAt(++state.position); + if (!isWsOrEolOrEnd(ch)) throwError(state, "a whitespace character is expected after the key-value separator within a block mapping"); + if (!mappingOpened) { + restoreState(state, beforeKey); + addMappingEvent(state, beforeKey.position, props.anchorStart, props.anchorEnd, props.tagStart, props.tagEnd, COLLECTION_STYLE.BLOCK); + mappingOpened = true; + parseNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true); + ch = state.input.charCodeAt(state.position); + while (isWhiteSpace(ch)) ch = state.input.charCodeAt(++state.position); + state.position++; + } + detected = true; + atExplicitKey = false; + pendingExplicitKey = false; + } else if (detected) throwError(state, "expected ':' after a mapping key"); + else { + if (props.anchorStart !== NO_RANGE$1 || props.tagStart !== NO_RANGE$1) { + restoreState(state, beforeKey); + return false; + } + return true; + } + } else if (detected) throwError(state, "can not read a block mapping entry; a multiline key may not be an implicit key"); + else { + if (props.anchorStart !== NO_RANGE$1 || props.tagStart !== NO_RANGE$1) { + restoreState(state, beforeKey); + return false; + } + return true; + } + } + if (parseNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, pendingExplicitKey)) pendingExplicitKey = false; + if (!atExplicitKey) { + if (pendingExplicitKey) { + addEmptyScalarEvent(state); + pendingExplicitKey = false; + } + } + skipSeparationSpace(state, true); + ch = state.input.charCodeAt(state.position); + if ((state.line === entryLine || state.lineIndent > nodeIndent) && ch !== 0) throwError(state, "bad indentation of a mapping entry"); + else if (state.lineIndent < nodeIndent) break; + } + if (!detected) return false; + if (atExplicitKey) addEmptyScalarEvent(state); + if (mappingOpened) addPopEvent(state); + return true; +} +function parseNode(state, parentIndent, nodeContext, allowToSeek, allowCompact, allowPropertyMapping = true) { + if (state.depth >= state.maxDepth) throwError(state, `nesting exceeded maxDepth (${state.maxDepth})`); + state.depth++; + let indentStatus = 1; + let atNewLine = false; + let hasContent = false; + let propertyStart = null; + const props = emptyProperties(); + let allowBlockScalars = nodeContext === CONTEXT_BLOCK_OUT || nodeContext === CONTEXT_BLOCK_IN; + let allowBlockCollections = allowBlockScalars; + const allowBlockStyles = allowBlockScalars; + if (allowToSeek && skipSeparationSpace(state, true)) { + atNewLine = true; + if (state.lineIndent > parentIndent) indentStatus = 1; + else if (state.lineIndent === parentIndent) indentStatus = 0; + else indentStatus = -1; + } + if (indentStatus === 1) while (true) { + const ch = state.input.charCodeAt(state.position); + const propertyState = snapshotState(state); + if (atNewLine && indentStatus !== 1 && (ch === 33 || ch === 38)) break; + if (atNewLine && allowBlockStyles && (props.tagStart !== NO_RANGE$1 || props.anchorStart !== NO_RANGE$1) && (ch === 33 || ch === 38)) { + var _state$events$fallbac; + const fallbackState = snapshotState(state); + const flowIndent = parentIndent + 1; + if (readBlockMapping(state, state.position - state.lineStart, flowIndent, props) && ((_state$events$fallbac = state.events[fallbackState.eventsLength]) === null || _state$events$fallbac === void 0 ? void 0 : _state$events$fallbac.type) === EVENT_ID.MAPPING) { + state.depth--; + return true; + } + restoreState(state, fallbackState); + } + if (atNewLine && (ch === 33 && props.tagStart !== NO_RANGE$1 || ch === 38 && props.anchorStart !== NO_RANGE$1)) break; + if (!readTagProperty(state, props, nodeContext === CONTEXT_FLOW_IN) && !readAnchorProperty(state, props)) break; + if (propertyStart === null) propertyStart = propertyState; + if (skipSeparationSpace(state, true)) { + atNewLine = true; + allowBlockCollections = allowBlockStyles; + if (state.lineIndent > parentIndent) indentStatus = 1; + else if (state.lineIndent === parentIndent) indentStatus = 0; + else indentStatus = -1; + } else allowBlockCollections = false; + } + if (allowBlockCollections) allowBlockCollections = atNewLine || allowCompact; + if (indentStatus === 1 || nodeContext === CONTEXT_BLOCK_OUT) { + const flowIndent = nodeContext === CONTEXT_FLOW_IN || nodeContext === CONTEXT_FLOW_OUT ? parentIndent : parentIndent + 1; + const blockIndent = state.position - state.lineStart; + if (indentStatus === 1) if (allowBlockCollections && (readBlockSequence(state, blockIndent, props) || readBlockMapping(state, blockIndent, flowIndent, props)) || readFlowCollection(state, flowIndent, props)) hasContent = true; + else { + const ch = state.input.charCodeAt(state.position); + if (propertyStart !== null && allowPropertyMapping && allowBlockStyles && !allowBlockCollections && ch !== 124 && ch !== 62) { + var _state$events$fallbac2; + const fallbackState = snapshotState(state); + const propertyIndent = propertyStart.position - propertyStart.lineStart; + restoreState(state, propertyStart); + if (readBlockMapping(state, propertyIndent, flowIndent, emptyProperties()) && ((_state$events$fallbac2 = state.events[fallbackState.eventsLength]) === null || _state$events$fallbac2 === void 0 ? void 0 : _state$events$fallbac2.type) === EVENT_ID.MAPPING) hasContent = true; + else restoreState(state, fallbackState); + } + if (!hasContent && (allowBlockScalars && readBlockScalar(state, flowIndent, props) || readSingleQuotedScalar(state, flowIndent, props) || readDoubleQuotedScalar(state, flowIndent, props) || readAlias(state, props) || readPlainScalar(state, flowIndent, nodeContext, props))) hasContent = true; + } + else if (indentStatus === 0) hasContent = allowBlockCollections && readBlockSequence(state, blockIndent, props); + } + allowBlockScalars = allowBlockScalars && !hasContent; + if (!hasContent && (props.anchorStart !== NO_RANGE$1 || props.tagStart !== NO_RANGE$1 || allowBlockScalars)) { + addScalarEvent(state, NO_RANGE$1, NO_RANGE$1, props.anchorStart, props.anchorEnd, props.tagStart, props.tagEnd, SCALAR_STYLE.PLAIN); + hasContent = true; + } + state.depth--; + return hasContent || props.anchorStart !== NO_RANGE$1 || props.tagStart !== NO_RANGE$1; +} +function readDirective(state) { + if (state.lineIndent > 0 || state.input.charCodeAt(state.position) !== 37) return false; + state.position++; + const nameStart = state.position; + while (state.input.charCodeAt(state.position) !== 0 && !isWsOrEol(state.input.charCodeAt(state.position))) state.position++; + const name = state.input.slice(nameStart, state.position); + const args = []; + if (name.length === 0) throwError(state, "directive name must not be less than one character in length"); + while (state.input.charCodeAt(state.position) !== 0 && !isEol(state.input.charCodeAt(state.position))) { + while (isWhiteSpace(state.input.charCodeAt(state.position))) state.position++; + if (state.input.charCodeAt(state.position) === 35 || isEol(state.input.charCodeAt(state.position)) || state.input.charCodeAt(state.position) === 0) break; + const start = state.position; + while (state.input.charCodeAt(state.position) !== 0 && !isWsOrEol(state.input.charCodeAt(state.position))) state.position++; + args.push(state.input.slice(start, state.position)); + } + if (isEol(state.input.charCodeAt(state.position))) consumeLineBreak(state); + if (name === "YAML") { + if (state.directives.some((directive) => directive.kind === "yaml")) throwError(state, "duplication of %YAML directive"); + if (args.length !== 1) throwError(state, "YAML directive accepts exactly one argument"); + const match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]); + if (match === null) throwError(state, "ill-formed argument of the YAML directive"); + if (parseInt(match[1], 10) !== 1) throwError(state, "unacceptable YAML version of the document"); + state.directives.push({ + kind: "yaml", + version: args[0] + }); + } else if (name === "TAG") { + if (args.length !== 2) throwError(state, "TAG directive accepts exactly two arguments"); + const [handle, prefix] = args; + if (!PATTERN_TAG_HANDLE.test(handle)) throwError(state, "ill-formed tag handle (first argument) of the TAG directive"); + if (HAS_OWN.call(state.tagHandlers, handle)) throwError(state, `there is a previously declared suffix for "${handle}" tag handle`); + if (!PATTERN_TAG_PREFIX.test(prefix)) throwError(state, "ill-formed tag prefix (second argument) of the TAG directive"); + state.tagHandlers[handle] = prefix; + state.directives.push({ + kind: "tag", + handle, + prefix + }); + } + return true; +} +function readDocument(state) { + state.directives = []; + state.tagHandlers = Object.create(null); + let hasDirectives = false; + skipSeparationSpace(state, true); + while (readDirective(state)) { + hasDirectives = true; + skipSeparationSpace(state, true); + } + let explicitStart = false; + let explicitEnd = false; + let allowCompact = true; + if (state.lineIndent === 0 && state.input.charCodeAt(state.position) === 45 && state.input.charCodeAt(state.position + 1) === 45 && state.input.charCodeAt(state.position + 2) === 45 && isWsOrEolOrEnd(state.input.charCodeAt(state.position + 3))) { + explicitStart = true; + const markerLine = state.line; + state.position += 3; + skipSeparationSpace(state, true); + allowCompact = state.line > markerLine; + } else if (hasDirectives) throwError(state, "directives end mark is expected"); + const documentEventIndex = state.events.length; + if (!explicitStart && state.position === state.lineStart && state.input.charCodeAt(state.position) === 46 && testDocumentSeparator(state)) { + state.position += 3; + skipSeparationSpace(state, true); + return; + } + addDocumentEvent(state, explicitStart, false); + if (!parseNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, allowCompact, allowCompact)) addEmptyScalarEvent(state); + skipSeparationSpace(state, true); + if (state.position === state.lineStart && testDocumentSeparator(state)) { + explicitEnd = state.input.charCodeAt(state.position) === 46; + if (explicitEnd) { + const markerLine = state.line; + state.position += 3; + skipSeparationSpace(state, true); + if (state.line === markerLine && state.position < state.length) throwError(state, "end of the stream or a document separator is expected"); + } + } + const documentEvent = state.events[documentEventIndex]; + if ((documentEvent === null || documentEvent === void 0 ? void 0 : documentEvent.type) === EVENT_ID.DOCUMENT) documentEvent.explicitEnd = explicitEnd; + addPopEvent(state); + if (!explicitEnd && state.position < state.length && !testDocumentBoundary(state)) throwError(state, "end of the stream or a document separator is expected"); +} +/** +* Parses YAML into a flat event stream referencing source text by offsets. +* +* @category Events +*/ +function parseEvents(input, options) { + const length = input.length; + const state = _objectSpread2(_objectSpread2(_objectSpread2({}, DEFAULT_PARSER_OPTIONS), options), {}, { + input: `${input}\0`, + length, + position: 0, + line: 0, + lineStart: 0, + lineIndent: 0, + firstTabInLine: -1, + depth: 0, + directives: [], + tagHandlers: Object.create(null), + events: [] + }); + const nullpos = input.indexOf("\0"); + if (nullpos !== -1) YAMLException.throwAt(input, nullpos, "null byte is not allowed in input", state.filename); + while (state.position < state.length) { + skipByteOrderMark(state); + skipSeparationSpace(state, true); + if (state.position >= state.length) break; + const documentStart = state.position; + readDocument(state); + if (state.position === documentStart) + /* c8 ignore next */ + throwError(state, "can not read a document"); + } + return state.events; +} +//#endregion +//#region src/load.ts +var DEFAULT_LOAD_OPTIONS = _objectSpread2(_objectSpread2({}, DEFAULT_PARSER_OPTIONS), DEFAULT_CONSTRUCTOR_OPTIONS); +function loadDocuments(input, options = {}) { + const opts = _objectSpread2(_objectSpread2({}, DEFAULT_LOAD_OPTIONS), options); + const source = String(input); + const PARSER_OPT_KEYS = Object.keys(DEFAULT_PARSER_OPTIONS); + const CONSTRUCTOR_OPT_KEYS = Object.keys(DEFAULT_CONSTRUCTOR_OPTIONS); + return constructFromEvents(parseEvents(source, pick(opts, PARSER_OPT_KEYS)), _objectSpread2(_objectSpread2({}, pick(opts, CONSTRUCTOR_OPT_KEYS)), {}, { source })); +} +function loadAll(input, iteratorOrOptions, options) { + let iterator = null; + if (typeof iteratorOrOptions === "function") iterator = iteratorOrOptions; + else if (iteratorOrOptions !== null && typeof iteratorOrOptions === "object") options = iteratorOrOptions; + const documents = loadDocuments(input, options); + if (iterator === null) return documents; + for (const document of documents) iterator(document); +} +/** +* Parses `string` as a single YAML document. Throws {@link YAMLException} on +* error. This function does not understand multi-document or empty sources; it +* throws an exception on those. +* +* > [!NOTE] +* > 1. When processing untrusted input, see the +* > [security considerations](../docs/safety.md). +* > 2. All exceptions MUST be caught, not just {@link YAMLException}. +* > 3. The default {@link CORE_SCHEMA} comes without the `!!merge` tag. You can +* > easily enable it if needed. +* > 4. The default {@link mapTag} is `{}`-object based, with known limitations +* > (see description). For full compatibility use {@link realMapTag} +* > instead (it uses native JS `Map`). +* +* @example +* Enable {@link mergeTag} and {@link realMapTag}: +* +* ```javascript +* import { load, CORE_SCHEMA, mergeTag, realMapTag } from 'js-yaml' +* +* try { +* load(data, { schema: CORE_SCHEMA.withTags(mergeTag, realMapTag) }) +* } catch (e) { +* console.error(e) +* } +* ``` +* +* @category Main +*/ +function load(input, options) { + const documents = loadDocuments(input, options); + if (documents.length === 0) throw new YAMLException("expected a document, but the input is empty"); + if (documents.length === 1) return documents[0]; + throw new YAMLException("expected a single document in the stream, but found more"); +} +//#endregion +//#region src/ast/from_js.ts +var INVALID = Symbol("INVALID"); +function buildRepresentTypes(schema) { + const defaultTags = new Set([ + schema.defaultScalarTag, + schema.defaultSequenceTag, + schema.defaultMappingTag + ].filter((t) => t !== void 0)); + const implicitScalars = schema.implicitScalarTags; + const explicitTags = schema.tags.filter((t) => !(t.nodeKind === "scalar" && t.implicit) && !defaultTags.has(t)); + const defaultTagsLast = schema.tags.filter((t) => defaultTags.has(t)); + return [ + ...implicitScalars.map((tag) => ({ + tag, + implicitTag: true + })), + ...explicitTags.map((tag) => ({ + tag, + implicitTag: false + })), + ...defaultTagsLast.map((tag) => ({ + tag, + implicitTag: true + })) + ]; +} +function matchTag(state, object) { + for (let index = 0, length = state.representTypes.length; index < length; index += 1) { + const { tag, implicitTag } = state.representTypes[index]; + if (tag.identify(object)) { + let tagName; + if (tag.matchByTagPrefix) tagName = tag.representTagName(object); + else tagName = tag.tagName; + return { + tag, + tagName, + implicitTag + }; + } + } + return null; +} +function build(state, object) { + if (!state.noRefs && object !== null && typeof object === "object") { + const existing = state.refs.get(object); + if (existing) { + if (existing.anchor === void 0) existing.anchor = `ref_${state.refCounter++}`; + return { + kind: "alias", + anchor: existing.anchor + }; + } + } + const matched = matchTag(state, object); + if (!matched) { + if (object === void 0) return INVALID; + if (state.skipInvalid) return INVALID; + throw new YAMLException(`unacceptable kind of an object to dump ${Object.prototype.toString.call(object)}`); + } + const { tag, tagName, implicitTag } = matched; + const nodeTagName = implicitTag ? tagName : tagNameShort(tagName); + if (tag.nodeKind === "scalar") return { + kind: "scalar", + tag: nodeTagName, + tagged: !implicitTag, + style: SCALAR_STYLE.PLAIN, + value: tag.represent(object) + }; + if (tag.nodeKind === "sequence") { + const container = tag.represent(object); + const node = { + kind: "sequence", + tag: nodeTagName, + tagged: !implicitTag, + style: COLLECTION_STYLE.BLOCK, + items: [] + }; + if (!state.noRefs) state.refs.set(object, node); + for (let index = 0, length = container.length; index < length; index += 1) { + let item = build(state, container[index]); + if (item === INVALID && container[index] === void 0) item = build(state, null); + if (item === INVALID) continue; + node.items.push(item); + } + return node; + } + const map = tag.represent(object); + const node = { + kind: "mapping", + tag: nodeTagName, + tagged: !implicitTag, + style: COLLECTION_STYLE.BLOCK, + items: [] + }; + if (!state.noRefs) state.refs.set(object, node); + for (const [objectKey, objectValue] of map) { + const key = build(state, objectKey); + if (key === INVALID) continue; + const value = build(state, objectValue); + if (value === INVALID) continue; + node.items.push({ + key, + value + }); + } + return node; +} +/** +* Convert JS object to AST. A JS value is one YAML document. An unrepresentable +* root becomes an empty document, which the presenter renders as an empty +* string. +* +* @category AST +*/ +function jsToAst(input, schema, options = {}) { + var _options$noRefs, _options$skipInvalid; + const root = build({ + representTypes: buildRepresentTypes(schema), + noRefs: (_options$noRefs = options.noRefs) !== null && _options$noRefs !== void 0 ? _options$noRefs : false, + skipInvalid: (_options$skipInvalid = options.skipInvalid) !== null && _options$skipInvalid !== void 0 ? _options$skipInvalid : false, + refs: /* @__PURE__ */ new Map(), + refCounter: 0 + }, input); + return [{ + contents: root === INVALID ? null : root, + directives: [] + }]; +} +//#endregion +//#region src/ast/visit.ts +/** +* Return from a visitor to stop the whole traversal. +* +* @category AST +*/ +var VISIT_BREAK = Symbol("visit:break"); +/** +* Return from a visitor to skip the current node's children. +* +* @category AST +*/ +var VISIT_SKIP = Symbol("visit:skip"); +function visitNode(node, visitor, ctx) { + const control = visitor(node, ctx); + if (control === VISIT_BREAK) return true; + if (control === VISIT_SKIP) return false; + const depth = ctx.depth + 1; + switch (node.kind) { + case "sequence": + for (const item of node.items) if (visitNode(item, visitor, { + depth, + parent: node, + isKey: false + })) return true; + break; + case "mapping": + for (const { key, value } of node.items) { + if (visitNode(key, visitor, { + depth, + parent: node, + isKey: true + })) return true; + if (visitNode(value, visitor, { + depth, + parent: node, + isKey: false + })) return true; + } + break; + } + return false; +} +/** +* Walk every node in the documents, calling {@link Visitor} once per +* node (pre-order). +* +* @category AST +*/ +function visit(documents, visitor) { + for (const doc of documents) if (doc.contents && visitNode(doc.contents, visitor, { + depth: 0, + parent: null, + isKey: false + })) return; +} +//#endregion +//#region src/ast/styler_defaults.ts +function hasBit(mask, bit) { + return (mask & 1 << bit) !== 0; +} +/** +* Default scalar styling rules in application order. +* See [Scalar styling](../../docs/scalar_styling.md) for usage details. +* +* @category AST +*/ +var DEFAULT_SCALAR_STYLE_RULES = { + applyQuoteFlowKeysOption, + doubleQuoteForInvisibles, + doubleQuoteWhitespaceOnly, + applyForceQuotesOption, + tryLongOrMultilineAsBlock, + quoteInvalidPlain, + fallbackToDoubleQuoted +}; +function _preferredQuotedStyle(layout) { + if (layout.presenterOptions.quoteStyle === "single" && hasBit(layout.allowedStylesMask, SCALAR_STYLE.SINGLE_QUOTED)) return SCALAR_STYLE.SINGLE_QUOTED; + return SCALAR_STYLE.DOUBLE_QUOTED; +} +function applyQuoteFlowKeysOption(layout) { + if (!layout.presenterOptions.quoteFlowKeys) return; + if (!layout.isKey || !layout.flowOnly || layout.style !== SCALAR_STYLE.PLAIN) return; + layout.style = SCALAR_STYLE.DOUBLE_QUOTED; +} +function doubleQuoteForInvisibles(layout) { + if (layout.style === SCALAR_STYLE.PLAIN && /[\t\x7F-\xA0\u2028\u2029\uFEFF\uFFFE\uFFFF]/.test(layout.node.value)) layout.style = SCALAR_STYLE.DOUBLE_QUOTED; +} +function doubleQuoteWhitespaceOnly(layout) { + if (layout.style === SCALAR_STYLE.PLAIN && /^\s+$/.test(layout.node.value)) layout.style = SCALAR_STYLE.DOUBLE_QUOTED; +} +function applyForceQuotesOption(layout) { + if (!layout.presenterOptions.forceQuotes) return; + if (layout.isKey || layout.style !== SCALAR_STYLE.PLAIN) return; + layout.style = layout.node.value.includes("\n") ? SCALAR_STYLE.DOUBLE_QUOTED : _preferredQuotedStyle(layout); +} +function tryLongOrMultilineAsBlock(layout) { + if (layout.style !== SCALAR_STYLE.PLAIN || layout.isKey) return; + const value = layout.node.value; + const multiline = value.indexOf("\n") !== -1; + if (!hasBit(layout.allowedStylesMask, SCALAR_STYLE.LITERAL_BLOCK)) { + if (multiline) layout.style = SCALAR_STYLE.DOUBLE_QUOTED; + return; + } + const w = layout.presenterOptions.lineWidth; + if (w === -1) { + if (multiline) layout.style = SCALAR_STYLE.LITERAL_BLOCK; + return; + } + const availableWidth = Math.max(Math.min(w, 40), w - layout.shiftOfContent); + let position = 0; + let shouldFold = false; + while (position <= value.length) { + let lineEnd = value.length; + const nextLineBreak = value.indexOf("\n", position); + if (nextLineBreak !== -1) lineEnd = nextLineBreak; + const line = value.slice(position, lineEnd); + if (line.length > availableWidth && line[0] !== " " && / [^ \t]/.test(line)) shouldFold = true; + if (nextLineBreak === -1) break; + position = nextLineBreak + 1; + } + if (shouldFold) layout.style = SCALAR_STYLE.FOLDED_BLOCK; + else if (multiline) layout.style = SCALAR_STYLE.LITERAL_BLOCK; +} +function quoteInvalidPlain(layout) { + if (layout.style === SCALAR_STYLE.PLAIN && !hasBit(layout.allowedStylesMask, SCALAR_STYLE.PLAIN)) layout.style = _preferredQuotedStyle(layout); +} +function fallbackToDoubleQuoted(layout) { + if (!hasBit(layout.allowedStylesMask, layout.style)) layout.style = SCALAR_STYLE.DOUBLE_QUOTED; +} +//#endregion +//#region src/ast/scalar_styler.ts +function setBit(mask, bit) { + return mask | 1 << bit; +} +var SRC_C_PRINTABLE = "[\\x09\\x0A\\x0D\\x20-\\x7E\\x85\\xA0-\\uD7FF\\uE000-\\uFFFD\\u{10000}-\\u{10FFFF}]"; +var SRC_B_CHAR = "[\\n\\r]"; +var SRC_C_BYTE_ORDER_MARK = "\\uFEFF"; +var SRC_S_WHITE = "[ \\t]"; +var SRC_NB_CHAR = `(?:(?!(?:${SRC_B_CHAR}|${SRC_C_BYTE_ORDER_MARK}))${SRC_C_PRINTABLE})`; +var SRC_NS_CHAR = `(?:(?!${SRC_S_WHITE})${SRC_NB_CHAR})`; +var SRC_NB_JSON = "[\\x09\\x20-\\uD7FF\\uE000-\\uFFFF\\u{10000}-\\u{10FFFF}]"; +var SRC_C_INDICATOR = "[-?:,\\[\\]{}#&*!|>'\"%@`]"; +var SRC_C_FLOW_INDICATOR = "[,\\[\\]{}]"; +var SRC_NS_PLAIN_SAFE_FLOW_OUT = SRC_NS_CHAR; +var SRC_NS_PLAIN_SAFE_FLOW_IN = `(?:(?!${SRC_C_FLOW_INDICATOR})${SRC_NS_CHAR})`; +var SRC_NS_PLAIN_FIRST_FLOW_OUT = `(?:(?:(?!${SRC_C_INDICATOR})${SRC_NS_CHAR})|[?:-](?=${SRC_NS_PLAIN_SAFE_FLOW_OUT}))`; +var SRC_NS_PLAIN_FIRST_FLOW_IN = `(?:(?:(?!${SRC_C_INDICATOR})${SRC_NS_CHAR})|[?:-](?=${SRC_NS_PLAIN_SAFE_FLOW_IN}))`; +var SRC_NS_PLAIN_CHAR_FLOW_OUT = `(?:(?:(?![:#])${SRC_NS_PLAIN_SAFE_FLOW_OUT})|:(?=${SRC_NS_PLAIN_SAFE_FLOW_OUT}))#*`; +var SRC_NS_PLAIN_CHAR_FLOW_IN = `(?:(?:(?![:#])${SRC_NS_PLAIN_SAFE_FLOW_IN})|:(?=${SRC_NS_PLAIN_SAFE_FLOW_IN}))#*`; +var SRC_NB_NS_PLAIN_IN_LINE_FLOW_OUT = `(?:${SRC_S_WHITE}*${SRC_NS_PLAIN_CHAR_FLOW_OUT})*`; +var SRC_NB_NS_PLAIN_IN_LINE_FLOW_IN = `(?:${SRC_S_WHITE}*${SRC_NS_PLAIN_CHAR_FLOW_IN})*`; +var SRC_NS_PLAIN_ONE_LINE_FLOW_OUT = `${SRC_NS_PLAIN_FIRST_FLOW_OUT}#*${SRC_NB_NS_PLAIN_IN_LINE_FLOW_OUT}`; +var SRC_NS_PLAIN_ONE_LINE_FLOW_IN = `${SRC_NS_PLAIN_FIRST_FLOW_IN}#*${SRC_NB_NS_PLAIN_IN_LINE_FLOW_IN}`; +var SRC_NS_PLAIN_ONE_LINE_BLOCK_KEY = SRC_NS_PLAIN_ONE_LINE_FLOW_OUT; +var SRC_NS_PLAIN_ONE_LINE_FLOW_KEY = SRC_NS_PLAIN_ONE_LINE_FLOW_IN; +var SRC_S_NS_PLAIN_NEXT_LINE_FLOW_OUT = `\\n+${SRC_NS_PLAIN_CHAR_FLOW_OUT}${SRC_NB_NS_PLAIN_IN_LINE_FLOW_OUT}`; +var SRC_S_NS_PLAIN_NEXT_LINE_FLOW_IN = `\\n+${SRC_NS_PLAIN_CHAR_FLOW_IN}${SRC_NB_NS_PLAIN_IN_LINE_FLOW_IN}`; +var SRC_NS_PLAIN_MULTI_LINE_FLOW_OUT = `${SRC_NS_PLAIN_ONE_LINE_FLOW_OUT}(?:${SRC_S_NS_PLAIN_NEXT_LINE_FLOW_OUT})*`; +var SRC_NS_PLAIN_MULTI_LINE_FLOW_IN = `${SRC_NS_PLAIN_ONE_LINE_FLOW_IN}(?:${SRC_S_NS_PLAIN_NEXT_LINE_FLOW_IN})*`; +var NS_PLAIN_FLOW_OUT = new RegExp(`^(?:${SRC_NS_PLAIN_MULTI_LINE_FLOW_OUT})$`, "u"); +var NS_PLAIN_FLOW_IN = new RegExp(`^(?:${SRC_NS_PLAIN_MULTI_LINE_FLOW_IN})$`, "u"); +var NS_PLAIN_BLOCK_KEY = new RegExp(`^(?:${SRC_NS_PLAIN_ONE_LINE_BLOCK_KEY})$`, "u"); +var NS_PLAIN_FLOW_KEY = new RegExp(`^(?:${SRC_NS_PLAIN_ONE_LINE_FLOW_KEY})$`, "u"); +var NB_SINGLE_ONE_LINE = new RegExp(`^(?:${SRC_NB_JSON})*$`, "u"); +var NB_SINGLE_MULTI_LINE = new RegExp(`^(?:${SRC_NB_JSON}|\\n)*$`, "u"); +var BLOCK_SCALAR_CONTENT = new RegExp(`^(?:${SRC_NB_CHAR}|\\n)*$`, "u"); +var C_FORBIDDEN_FIRST_LINE = /^(?:---|\.\.\.)(?=$|[ \t\n\r])/; +var C_FORBIDDEN_CONTENT = /^(?:---|\.\.\.)(?=$|[ \t\n\r])/m; +function canUsePlain(layout) { + const str = layout.node.value; + if (str !== "") { + if (!(layout.isKey ? layout.flowOnly ? NS_PLAIN_FLOW_KEY : NS_PLAIN_BLOCK_KEY : layout.flowOnly ? NS_PLAIN_FLOW_IN : NS_PLAIN_FLOW_OUT).test(str)) return false; + if (layout.shiftOfFirstLine === 0 && C_FORBIDDEN_FIRST_LINE.test(str)) return false; + if (layout.shiftOfContent === 0) { + const firstLineBreak = str.indexOf("\n"); + if (firstLineBreak !== -1) { + const content = str.slice(firstLineBreak + 1); + if (C_FORBIDDEN_CONTENT.test(content)) return false; + } + } + } + const resolvedTag = layout.presenterOptions.schema.resolveImplicitScalarTag(str).tag.tagName; + if (!layout.node.tagged && resolvedTag !== layout.node.tag) return false; + if (!layout.node.tagged && str === "=" && resolvedTag === layout.presenterOptions.schema.defaultScalarTag.tagName) return false; + return true; +} +function canUseSingleQuoted(layout) { + const str = layout.node.value; + if (!(layout.isKey ? NB_SINGLE_ONE_LINE : NB_SINGLE_MULTI_LINE).test(str)) return false; + if (/[ \t]\n|\n[ \t]/.test(str)) return false; + if (!layout.isKey && layout.shiftOfContent === 0) { + const firstLineBreak = str.indexOf("\n"); + if (firstLineBreak !== -1 && C_FORBIDDEN_CONTENT.test(str.slice(firstLineBreak + 1))) return false; + } + return true; +} +function canUseBlock(layout) { + if (layout.flowOnly || !BLOCK_SCALAR_CONTENT.test(layout.node.value)) return false; + const contentIndent = layout.shiftOfContent - layout.shiftOfParent; + if (contentIndent < 1) return false; + if (contentIndent > 9 && /^\n* /.test(layout.node.value)) return false; + if (layout.shiftOfContent === 0 && C_FORBIDDEN_CONTENT.test(layout.node.value)) return false; + return true; +} +function detectAllowedStyles(layout) { + let mask = setBit(0, SCALAR_STYLE.DOUBLE_QUOTED); + if (canUsePlain(layout)) mask = setBit(mask, SCALAR_STYLE.PLAIN); + if (canUseSingleQuoted(layout)) mask = setBit(mask, SCALAR_STYLE.SINGLE_QUOTED); + if (canUseBlock(layout)) mask = setBit(setBit(mask, SCALAR_STYLE.LITERAL_BLOCK), SCALAR_STYLE.FOLDED_BLOCK); + layout.allowedStylesMask = mask; +} +function renderScalar(layout) { + switch (layout.style) { + case SCALAR_STYLE.PLAIN: return renderPlain(layout); + case SCALAR_STYLE.SINGLE_QUOTED: return renderSingleQuoted(layout); + case SCALAR_STYLE.LITERAL_BLOCK: return renderLiteralBlock(layout); + case SCALAR_STYLE.FOLDED_BLOCK: return renderFoldedBlock(layout); + case SCALAR_STYLE.DOUBLE_QUOTED: return renderDoubleQuoted(layout); + } +} +function renderPlain(layout) { + return encodeFlowBreaks(layout.node.value, layout.shiftOfContent); +} +function renderSingleQuoted(layout) { + return `'${encodeFlowBreaks(layout.node.value, layout.shiftOfContent).replace(/'/g, "''")}'`; +} +function renderLiteralBlock(layout) { + const value = layout.node.value; + return "|" + blockHeader(value, layout.shiftOfParent, layout.shiftOfContent) + dropEndingNewline(indentString(value, layout.shiftOfContent)); +} +function renderFoldedBlock(layout) { + const value = layout.node.value; + const w = layout.presenterOptions.lineWidth; + let availableWidth = Infinity; + if (w !== -1) availableWidth = Math.max(Math.min(w, 40), w - layout.shiftOfContent); + return ">" + blockHeader(value, layout.shiftOfParent, layout.shiftOfContent) + dropEndingNewline(indentString(foldBlockScalar(value, availableWidth), layout.shiftOfContent)); +} +function renderDoubleQuoted(layout) { + return `"${escapeString(layout.node.value)}"`; +} +function encodeFlowBreaks(string, shiftOfContent) { + let nextLF = string.indexOf("\n"); + if (nextLF === -1) return string; + const pad = " ".repeat(shiftOfContent); + let result = string.slice(0, nextLF); + const lineRe = /(\n+)([^\n]*)/g; + lineRe.lastIndex = nextLF; + let match; + while (match = lineRe.exec(string)) { + const breaks = match[1].length; + const line = match[2]; + result += "\n".repeat(breaks + 1) + pad + line; + } + return result; +} +function indentString(string, spaces) { + const indent = " ".repeat(spaces); + let position = 0; + let result = ""; + const length = string.length; + while (position < length) { + let line; + const next = string.indexOf("\n", position); + if (next === -1) { + line = string.slice(position); + position = length; + } else { + line = string.slice(position, next + 1); + position = next + 1; + } + if (line.length && line !== "\n") result += indent; + result += line; + } + return result; +} +function needIndentIndicator(string) { + return /^\n* /.test(string); +} +function blockHeader(string, shiftOfParent, shiftOfContent) { + const indentIndicator = needIndentIndicator(string) ? String(shiftOfContent - shiftOfParent) : ""; + const clip = string[string.length - 1] === "\n"; + return `${indentIndicator}${clip && (string[string.length - 2] === "\n" || string === "\n") ? "+" : clip ? "" : "-"}\n`; +} +function dropEndingNewline(string) { + return string[string.length - 1] === "\n" ? string.slice(0, -1) : string; +} +function isMoreIndented(char) { + return char === " " || char === " "; +} +function foldLine(line, width) { + if (line === "" || isMoreIndented(line[0])) return line; + const breakRe = / [^ \t]/g; + let match; + let start = 0; + let end; + let curr = 0; + let next = 0; + let result = ""; + while (match = breakRe.exec(line)) { + next = match.index; + if (next - start > width) { + end = curr > start ? curr : next; + result += `\n${line.slice(start, end)}`; + start = end + 1; + } + curr = next; + } + result += "\n"; + if (line.length - start > width && curr > start) result += `${line.slice(start, curr)}\n${line.slice(curr + 1)}`; + else result += line.slice(start); + return result.slice(1); +} +function foldBlockScalar(string, width) { + const lineRe = /(\n+)([^\n]*)/g; + let nextLF = string.indexOf("\n"); + if (nextLF === -1) nextLF = string.length; + lineRe.lastIndex = nextLF; + let result = foldLine(string.slice(0, nextLF), width); + let prevMoreIndented = string[0] === "\n" || isMoreIndented(string[0]); + let moreIndented; + let match; + while (match = lineRe.exec(string)) { + const prefix = match[1]; + const line = match[2]; + moreIndented = line !== "" && isMoreIndented(line[0]); + result += prefix + (!prevMoreIndented && !moreIndented && line !== "" ? "\n" : "") + foldLine(line, width); + prevMoreIndented = moreIndented; + } + return result; +} +var CHARACTERS_TO_ESCAPE = /["\\\x00-\x1F\x7F-\xA0\u2028\u2029\uD800-\uDFFF\uFEFF\uFFFE\uFFFF]/gu; +function escapeCharacter(character) { + switch (character) { + case "\0": return "\\0"; + case "\x07": return "\\a"; + case "\b": return "\\b"; + case " ": return "\\t"; + case "\n": return "\\n"; + case "\v": return "\\v"; + case "\f": return "\\f"; + case "\r": return "\\r"; + case "\x1B": return "\\e"; + case "\"": return "\\\""; + case "\\": return "\\\\"; + case "…": return "\\N"; + case "\xA0": return "\\_"; + case "\u2028": return "\\L"; + case "\u2029": return "\\P"; + } + const code = character.charCodeAt(0); + const hex = code.toString(16).toUpperCase(); + if (code <= 255) return `\\x${"0".repeat(2 - hex.length)}${hex}`; + return `\\u${"0".repeat(4 - hex.length)}${hex}`; +} +function escapeString(string) { + return string.replace(CHARACTERS_TO_ESCAPE, escapeCharacter); +} +//#endregion +//#region src/ast/presenter.ts +var CHAR_LINE_FEED = 10; +var DEFAULT_PRESENTER_OPTIONS = { + indent: 2, + seqNoIndent: false, + seqInlineFirst: true, + lineWidth: 80, + flowBracketPadding: false, + flowSkipCommaSpace: false, + flowSkipColonSpace: false, + quoteFlowKeys: false, + quoteStyle: "single", + forceQuotes: false, + scalarStyleRules: Object.keys(DEFAULT_SCALAR_STYLE_RULES).map((name) => Reflect.get(DEFAULT_SCALAR_STYLE_RULES, name)), + tagBeforeAnchor: false +}; +function nodeTagShort(node) { + return node.tagged ? node.tag : tagNameShort(node.tag); +} +function createPresenterState(options) { + const opts = _objectSpread2(_objectSpread2({}, DEFAULT_PRESENTER_OPTIONS), options); + if (opts.flowSkipColonSpace) opts.quoteFlowKeys = true; + return _objectSpread2(_objectSpread2({}, opts), {}, { + defaultScalarTagName: opts.schema.defaultScalarTag.tagName, + openEnded: false + }); +} +function generateNextLine(state, level) { + return `\n${" ".repeat(state.indent * level)}`; +} +function scalarLayout(state, node, parent, level, isKey, flowOnly) { + return { + node, + parent, + level, + isKey, + flowOnly, + shiftOfParent: level === 0 ? -1 : state.indent * (level - 1), + shiftOfContent: state.indent * Math.max(1, level), + shiftOfFirstLine: level === 0 ? 0 : state.indent * level, + presenterOptions: state, + allowedStylesMask: 0, + style: node.style + }; +} +function writeFlowSequence(state, level, node) { + let result = ""; + for (let index = 0, length = node.items.length; index < length; index += 1) { + const item = writeNode(state, level, node.items[index], node, {}).text; + if (index > 0) result += `,${!state.flowSkipCommaSpace ? " " : ""}`; + result += item; + } + const pad = state.flowBracketPadding && node.items.length > 0 ? " " : ""; + return `[${pad}${result}${pad}]`; +} +function writeBlockSequence(state, level, node, compact) { + let result = ""; + for (let index = 0, length = node.items.length; index < length; index += 1) { + const item = writeNode(state, level + 1, node.items[index], node, { + block: true, + compact: state.seqInlineFirst, + isblockseq: true + }).text; + if (!compact || result !== "") result += generateNextLine(state, level); + if (item === "" || CHAR_LINE_FEED === item.charCodeAt(0)) result += "-"; + else result += "- "; + result += item; + } + return result; +} +function writeFlowMapping(state, level, node) { + let result = ""; + for (const { key, value } of node.items) { + let pairBuffer = ""; + if (result !== "") pairBuffer += `,${!state.flowSkipCommaSpace ? " " : ""}`; + const keyRender = writeNode(state, level, key, node, { iskey: true }); + const keyText = keyRender.text; + const valueText = writeNode(state, level, value, node, {}).text; + const sep = state.flowSkipColonSpace || valueText === "" ? "" : " "; + const keyIsBareProps = key.kind === "scalar" && keyRender.noBody && (key.tagged || key.anchor !== void 0); + const keyColonSep = key.kind === "alias" || keyIsBareProps ? " " : ""; + pairBuffer += `${keyText}${keyColonSep}:${sep}${valueText}`; + result += pairBuffer; + } + const pad = state.flowBracketPadding && result !== "" ? " " : ""; + return `{${pad}${result}${pad}}`; +} +function writeBlockMapping(state, level, node, compact) { + let result = ""; + for (let index = 0, length = node.items.length; index < length; index += 1) { + let pairBuffer = ""; + if (!compact || result !== "") pairBuffer += generateNextLine(state, level); + const { key, value } = node.items[index]; + const keyIsBlock = (key.kind === "mapping" || key.kind === "sequence") && key.style === COLLECTION_STYLE.BLOCK && key.items.length !== 0 || key.kind === "scalar" && (key.style === SCALAR_STYLE.LITERAL_BLOCK || key.style === SCALAR_STYLE.FOLDED_BLOCK); + const keyRender = keyIsBlock ? writeNode(state, level + 1, key, node, { + block: true, + compact: true, + isblockseq: !cannotBeCompact(state, key, level + 1) + }) : writeNode(state, level + 1, key, node, { + block: true, + compact: true, + iskey: true + }); + const keyText = keyRender.text; + const keyHasLineBreak = key.kind === "scalar" && key.value.indexOf("\n") !== -1; + const keyIsTooLong = keyText.length > 1024 && /^[\s\S]{1025}/u.test(keyText); + const explicitPair = keyIsBlock || keyHasLineBreak || keyIsTooLong; + if (explicitPair) if (keyText && CHAR_LINE_FEED === keyText.charCodeAt(0)) pairBuffer += "?"; + else pairBuffer += "? "; + pairBuffer += keyText; + if (explicitPair) pairBuffer += generateNextLine(state, level); + const valueText = writeNode(state, level + 1, value, node, { + block: true, + compact: explicitPair, + isblockseq: explicitPair && !cannotBeCompact(state, value, level + 1) + }).text; + const keyIsBareProps = key.kind === "scalar" && keyRender.noBody && (key.tagged || key.anchor !== void 0); + const keyColonSep = !explicitPair && (key.kind === "alias" || keyIsBareProps) ? " " : ""; + if (valueText === "" || CHAR_LINE_FEED === valueText.charCodeAt(0)) pairBuffer += `${keyColonSep}:`; + else pairBuffer += `${keyColonSep}: `; + pairBuffer += valueText; + result += pairBuffer; + } + return result; +} +function cannotBeCompact(state, node, level) { + if (node.kind === "alias") return true; + return node.tagged || node.anchor !== void 0 || state.indent < 2 && level > 0; +} +function writeNode(state, level, node, parent, ctx) { + var _ctx$compact; + if (node.kind === "alias") { + state.openEnded = false; + return { + text: `*${node.anchor}`, + noBody: false + }; + } + const { block = false, iskey = false, isblockseq = false } = ctx; + let compact = (_ctx$compact = ctx.compact) !== null && _ctx$compact !== void 0 ? _ctx$compact : false; + const hasAnchor = node.anchor !== void 0; + if (cannotBeCompact(state, node, level)) compact = false; + let body; + let shouldPrintTag = node.tagged; + const useBlockCollection = block && (node.kind === "mapping" || node.kind === "sequence") && node.style === COLLECTION_STYLE.BLOCK && node.items.length !== 0; + if (node.kind === "mapping") if (useBlockCollection) body = writeBlockMapping(state, level, node, compact); + else body = writeFlowMapping(state, level, node); + else if (node.kind === "sequence") if (useBlockCollection) if (state.seqNoIndent && !isblockseq && level > 0) body = writeBlockSequence(state, level - 1, node, compact); + else body = writeBlockSequence(state, level, node, compact); + else body = writeFlowSequence(state, level, node); + else { + const layout = scalarLayout(state, node, parent, level, iskey, !block); + detectAllowedStyles(layout); + for (const rule of state.scalarStyleRules) rule(layout); + body = renderScalar(layout); + state.openEnded = (layout.style === SCALAR_STYLE.LITERAL_BLOCK || layout.style === SCALAR_STYLE.FOLDED_BLOCK) && (node.value === "\n" || node.value.endsWith("\n\n")); + shouldPrintTag = node.tagged || body === "" && layout.flowOnly && (parent === null || parent === void 0 ? void 0 : parent.kind) === "sequence" && !hasAnchor || layout.style !== SCALAR_STYLE.PLAIN && node.tag !== state.defaultScalarTagName; + } + if ((node.kind === "mapping" || node.kind === "sequence") && !useBlockCollection) state.openEnded = false; + if (useBlockCollection && compact && level > 0 && state.indent > 2) body = `${" ".repeat(state.indent - 2)}${body}`; + const noBody = body === ""; + let text = body; + if (shouldPrintTag || hasAnchor) { + const props = []; + const tag = shouldPrintTag ? nodeTagShort(node) : null; + const anchor = hasAnchor ? `&${node.anchor}` : null; + if (state.tagBeforeAnchor) { + if (tag !== null) props.push(tag); + if (anchor !== null) props.push(anchor); + } else { + if (anchor !== null) props.push(anchor); + if (tag !== null) props.push(tag); + } + const sep = body === "" || body.charCodeAt(0) === CHAR_LINE_FEED ? "" : " "; + text = `${props.join(" ")}${sep}${body}`; + } + return { + text, + noBody + }; +} +function rootStartsOwnLine(node) { + return (node.kind === "sequence" || node.kind === "mapping") && node.style === COLLECTION_STYLE.BLOCK && node.items.length !== 0 && !node.tagged && node.anchor === void 0; +} +function writeDocumentDirectives(doc) { + let result = ""; + for (const directive of doc.directives) { + if (directive.kind === "yaml") { + result += `%YAML ${directive.version}\n`; + continue; + } + const { handle, prefix } = directive; + result += `%TAG ${handle} ${prefix}\n`; + } + return result; +} +/** +* Build YAML from AST. +* +* @category AST +*/ +function present(documents, options) { + const state = createPresenterState(options); + let result = ""; + let previousEnded = false; + for (let index = 0; index < documents.length; index += 1) { + const doc = documents[index]; + state.openEnded = false; + const directives = writeDocumentDirectives(doc); + const hasDirectives = directives !== ""; + const marker = doc.explicitStart || hasDirectives || index > 0 && !previousEnded; + result += directives; + if (doc.contents === null) { + if (marker) result += "---\n"; + } else if (marker) { + const body = writeNode(state, 0, doc.contents, null, { + block: true, + compact: true + }).text; + const sep = body === "" ? "" : hasDirectives || rootStartsOwnLine(doc.contents) ? "\n" : " "; + result += `---${sep}${body}\n`; + } else result += writeNode(state, 0, doc.contents, null, { + block: true, + compact: true + }).text + "\n"; + previousEnded = doc.explicitEnd || state.openEnded; + if (previousEnded) result += "...\n"; + } + return result; +} +//#endregion +//#region src/dump.ts +var DEFAULT_DUMP_OPTIONS = _objectSpread2(_objectSpread2({}, DEFAULT_PRESENTER_OPTIONS), {}, { + schema: DUMP_SCHEMA, + skipInvalid: false, + noRefs: false, + flowLevel: -1, + sortKeys: false, + transform: () => {} +}); +function defaultCompareFn(a, b) { + const x = String(a); + const y = String(b); + if (x < y) return -1; + if (x > y) return 1; + return 0; +} +/** +* Serializes JS object as a YAML document. By default it can dump every +* supported YAML type, so it throws an exception if you try to dump regexps or +* functions. However, you can disable exceptions by setting the +* {@link DumpOptions.skipInvalid} option to `true`. +* +* @category Main +*/ +function dump(input, options = {}) { + const opts = _objectSpread2(_objectSpread2({}, DEFAULT_DUMP_OPTIONS), options); + const documents = jsToAst(input, opts.schema, { + noRefs: opts.noRefs, + skipInvalid: opts.skipInvalid + }); + if (opts.flowLevel >= 0) visit(documents, (node, ctx) => { + if (ctx.depth < opts.flowLevel) return; + if (node.kind === "sequence" || node.kind === "mapping") node.style = COLLECTION_STYLE.FLOW; + return VISIT_SKIP; + }); + if (opts.sortKeys) { + const compareFn = opts.sortKeys === true ? defaultCompareFn : opts.sortKeys; + visit(documents, (node) => { + if (node.kind !== "mapping") return; + node.items.sort((a, b) => compareFn(a.key.kind === "scalar" ? a.key.value : "", b.key.kind === "scalar" ? b.key.value : "")); + }); + } + opts.transform(documents); + return present(documents, _objectSpread2(_objectSpread2({}, pick(opts, Object.keys(DEFAULT_PRESENTER_OPTIONS))), {}, { schema: opts.schema })); +} +//#endregion +//#region src/ast/from_events.ts +var NO_RANGE = -1; +function eventPosition(event) { + if ("tagStart" in event && event.tagStart !== NO_RANGE) return event.tagStart; + if ("anchorStart" in event && event.anchorStart !== NO_RANGE) return event.anchorStart; + if ("valueStart" in event && event.valueStart !== NO_RANGE) return event.valueStart; + if ("start" in event) return event.start; + return 0; +} +function rawTag(state, event) { + return event.tagStart === NO_RANGE ? "" : state.source.slice(event.tagStart, event.tagEnd); +} +function anchorName(state, event) { + return event.anchorStart === NO_RANGE ? void 0 : state.source.slice(event.anchorStart, event.anchorEnd); +} +function buildScalar(state, event) { + const value = getScalarValue(state.source, event); + const raw = rawTag(state, event); + let tag; + let tagged = false; + if (raw !== "") { + tagged = true; + tag = raw; + } else if (event.style === SCALAR_STYLE.PLAIN) tag = state.schema.resolveImplicitScalarTag(value).tag.tagName; + else tag = state.schema.defaultScalarTag.tagName; + return { + kind: "scalar", + tag, + tagged, + style: event.style, + anchor: anchorName(state, event), + value + }; +} +function buildCollection(state, event, defaultTagName) { + const raw = rawTag(state, event); + let tag; + let tagged = false; + if (raw === "") tag = defaultTagName; + else { + tag = raw; + tagged = true; + } + return { + tag, + tagged, + style: event.style, + anchor: anchorName(state, event) + }; +} +function addNode(state, node) { + const frame = state.frames[state.frames.length - 1]; + if (frame.kind === "document") frame.doc.contents = node; + else if (frame.kind === "sequence") frame.node.items.push(node); + else if (frame.key) { + frame.node.items.push({ + key: frame.key, + value: node + }); + frame.key = null; + } else frame.key = node; +} +/** +* Builds an AST from parser events +* +* @category AST +*/ +function eventsToAst(events, options) { + const state = { + source: options.source, + schema: options.schema, + eventIndex: 0, + position: 0, + frames: [], + documents: [] + }; + while (state.eventIndex < events.length) { + const event = events[state.eventIndex++]; + state.position = eventPosition(event); + switch (event.type) { + case EVENT_ID.DOCUMENT: { + const doc = { + contents: null, + explicitStart: event.explicitStart, + explicitEnd: event.explicitEnd, + directives: event.directives + }; + state.frames.push({ + kind: "document", + doc + }); + break; + } + case EVENT_ID.SCALAR: + addNode(state, buildScalar(state, event)); + break; + case EVENT_ID.SEQUENCE: { + const { tag, tagged, style, anchor } = buildCollection(state, event, "tag:yaml.org,2002:seq"); + const node = { + kind: "sequence", + tag, + tagged, + style, + anchor, + items: [] + }; + state.frames.push({ + kind: "sequence", + node + }); + break; + } + case EVENT_ID.MAPPING: { + const { tag, tagged, style, anchor } = buildCollection(state, event, "tag:yaml.org,2002:map"); + const node = { + kind: "mapping", + tag, + tagged, + style, + anchor, + items: [] + }; + state.frames.push({ + kind: "mapping", + node, + key: null + }); + break; + } + case EVENT_ID.ALIAS: + addNode(state, { + kind: "alias", + anchor: state.source.slice(event.anchorStart, event.anchorEnd) + }); + break; + case EVENT_ID.POP: { + const frame = state.frames.pop(); + if (frame.kind === "mapping" && frame.key) throw new Error("incomplete mapping pair in event stream"); + if (frame.kind === "document") state.documents.push(frame.doc); + else addNode(state, frame.node); + break; + } + } + } + return state.documents; +} +//#endregion +//#region src/index.ts +/** @deprecated Use `EVENT_ID.DOCUMENT` instead. @internal */ +var EVENT_DOCUMENT = EVENT_ID.DOCUMENT; +/** @deprecated Use `EVENT_ID.SEQUENCE` instead. @internal */ +var EVENT_SEQUENCE = EVENT_ID.SEQUENCE; +/** @deprecated Use `EVENT_ID.MAPPING` instead. @internal */ +var EVENT_MAPPING = EVENT_ID.MAPPING; +/** @deprecated Use `EVENT_ID.SCALAR` instead. @internal */ +var EVENT_SCALAR = EVENT_ID.SCALAR; +/** @deprecated Use `EVENT_ID.ALIAS` instead. @internal */ +var EVENT_ALIAS = EVENT_ID.ALIAS; +/** @deprecated Use `EVENT_ID.POP` instead. @internal */ +var EVENT_POP = EVENT_ID.POP; +/** @deprecated Use `SCALAR_STYLE.PLAIN` instead. @internal */ +var SCALAR_STYLE_PLAIN = SCALAR_STYLE.PLAIN; +/** @deprecated Use `SCALAR_STYLE.SINGLE_QUOTED` instead. @internal */ +var SCALAR_STYLE_SINGLE_QUOTED = SCALAR_STYLE.SINGLE_QUOTED; +/** @deprecated Use `SCALAR_STYLE.DOUBLE_QUOTED` instead. @internal */ +var SCALAR_STYLE_DOUBLE_QUOTED = SCALAR_STYLE.DOUBLE_QUOTED; +/** @deprecated Use `SCALAR_STYLE.LITERAL_BLOCK` instead. @internal */ +var SCALAR_STYLE_LITERAL_BLOCK = SCALAR_STYLE.LITERAL_BLOCK; +/** @deprecated Use `SCALAR_STYLE.FOLDED_BLOCK` instead. @internal */ +var SCALAR_STYLE_FOLDED_BLOCK = SCALAR_STYLE.FOLDED_BLOCK; +/** @deprecated Use `COLLECTION_STYLE.BLOCK` instead. @internal */ +var COLLECTION_STYLE_BLOCK = COLLECTION_STYLE.BLOCK; +/** @deprecated Use `COLLECTION_STYLE.FLOW` instead. @internal */ +var COLLECTION_STYLE_FLOW = COLLECTION_STYLE.FLOW; +/** @deprecated Use `CHOMPING_MODE.CLIP` instead. @internal */ +var CHOMPING_CLIP = CHOMPING_MODE.CLIP; +/** @deprecated Use `CHOMPING_MODE.STRIP` instead. @internal */ +var CHOMPING_STRIP = CHOMPING_MODE.STRIP; +/** @deprecated Use `CHOMPING_MODE.KEEP` instead. @internal */ +var CHOMPING_KEEP = CHOMPING_MODE.KEEP; +//#endregion +exports.CHOMPING_CLIP = CHOMPING_CLIP; +exports.CHOMPING_KEEP = CHOMPING_KEEP; +exports.CHOMPING_MODE = CHOMPING_MODE; +exports.CHOMPING_STRIP = CHOMPING_STRIP; +exports.COLLECTION_STYLE = COLLECTION_STYLE; +exports.COLLECTION_STYLE_BLOCK = COLLECTION_STYLE_BLOCK; +exports.COLLECTION_STYLE_FLOW = COLLECTION_STYLE_FLOW; +exports.CORE_SCHEMA = CORE_SCHEMA; +exports.DEFAULT_SCALAR_STYLE_RULES = DEFAULT_SCALAR_STYLE_RULES; +exports.DUMP_SCHEMA = DUMP_SCHEMA; +exports.EVENT_ALIAS = EVENT_ALIAS; +exports.EVENT_DOCUMENT = EVENT_DOCUMENT; +exports.EVENT_ID = EVENT_ID; +exports.EVENT_MAPPING = EVENT_MAPPING; +exports.EVENT_POP = EVENT_POP; +exports.EVENT_SCALAR = EVENT_SCALAR; +exports.EVENT_SEQUENCE = EVENT_SEQUENCE; +exports.FAILSAFE_SCHEMA = FAILSAFE_SCHEMA; +exports.JSON_SCHEMA = JSON_SCHEMA; +exports.NOT_RESOLVED = NOT_RESOLVED; +exports.SCALAR_STYLE = SCALAR_STYLE; +exports.SCALAR_STYLE_DOUBLE_QUOTED = SCALAR_STYLE_DOUBLE_QUOTED; +exports.SCALAR_STYLE_FOLDED_BLOCK = SCALAR_STYLE_FOLDED_BLOCK; +exports.SCALAR_STYLE_LITERAL_BLOCK = SCALAR_STYLE_LITERAL_BLOCK; +exports.SCALAR_STYLE_PLAIN = SCALAR_STYLE_PLAIN; +exports.SCALAR_STYLE_SINGLE_QUOTED = SCALAR_STYLE_SINGLE_QUOTED; +exports.Schema = Schema; +exports.VISIT_BREAK = VISIT_BREAK; +exports.VISIT_SKIP = VISIT_SKIP; +exports.YAML11_SCHEMA = YAML11_SCHEMA; +exports.YAMLException = YAMLException; +exports.binaryTag = binaryTag; +exports.boolCoreTag = boolCoreTag; +exports.boolJsonTag = boolJsonTag; +exports.boolYaml11Tag = boolYaml11Tag; +exports.constructFromEvents = constructFromEvents; +exports.defineMappingTag = defineMappingTag; +exports.defineScalarTag = defineScalarTag; +exports.defineSequenceTag = defineSequenceTag; +exports.dump = dump; +exports.eventsToAst = eventsToAst; +exports.floatCoreTag = floatCoreTag; +exports.floatJsonTag = floatJsonTag; +exports.floatYaml11Tag = floatYaml11Tag; +exports.getScalarValue = getScalarValue; +exports.intCoreTag = intCoreTag; +exports.intJsonTag = intJsonTag; +exports.intYaml11Tag = intYaml11Tag; +exports.jsToAst = jsToAst; +exports.legacyMapTag = legacyMapTag; +exports.load = load; +exports.loadAll = loadAll; +exports.mapTag = mapTag; +exports.mergeTag = mergeTag; +exports.nullCoreTag = nullCoreTag; +exports.nullJsonTag = nullJsonTag; +exports.nullYaml11Tag = nullYaml11Tag; +exports.omapTag = omapTag; +exports.pairsTag = pairsTag; +exports.parseEvents = parseEvents; +exports.present = present; +exports.realMapTag = realMapTag; +exports.seqTag = seqTag; +exports.setTag = setTag; +exports.strTag = strTag; +exports.timestampTag = timestampTag; +exports.visit = visit; + +//# sourceMappingURL=js-yaml.cjs.js.map \ No newline at end of file diff --git a/node_modules/js-yaml/dist/js-yaml.cjs.js.map b/node_modules/js-yaml/dist/js-yaml.cjs.js.map new file mode 100644 index 00000000..876a80ab --- /dev/null +++ b/node_modules/js-yaml/dist/js-yaml.cjs.js.map @@ -0,0 +1 @@ +{"version":3,"file":"js-yaml.cjs.js","names":[],"sources":["../src/tag.ts","../src/tag/scalar/str.ts","../src/tag/scalar/null_core.ts","../src/tag/scalar/null_json.ts","../src/tag/scalar/null_yaml11.ts","../src/tag/scalar/bool_core.ts","../src/tag/scalar/bool_json.ts","../src/tag/scalar/bool_yaml11.ts","../src/tag/scalar/int_core.ts","../src/tag/scalar/int_json.ts","../src/tag/scalar/int_yaml11.ts","../src/tag/scalar/float_core.ts","../src/tag/scalar/float_json.ts","../src/tag/scalar/float_yaml11.ts","../src/tag/scalar/merge.ts","../src/tag/scalar/binary.ts","../src/tag/scalar/timestamp.ts","../src/tag/sequence/seq.ts","../src/common/object.ts","../src/tag/sequence/omap.ts","../src/tag/sequence/pairs.ts","../src/tag/mapping/map.ts","../src/tag/mapping/set.ts","../src/schema.ts","../src/tag/mapping/real_map.ts","../src/tag/mapping/legacy_map.ts","../src/common/snippet.ts","../src/common/exception.ts","../src/parser/events.ts","../src/parser/parser_scalar.ts","../src/common/tagname.ts","../src/parser/constructor.ts","../src/parser/parser.ts","../src/load.ts","../src/ast/from_js.ts","../src/ast/visit.ts","../src/ast/styler_defaults.ts","../src/ast/scalar_styler.ts","../src/ast/presenter.ts","../src/dump.ts","../src/ast/from_events.ts","../src/index.ts"],"sourcesContent":["/**\n * Returned by a scalar resolver when the source does not match its tag.\n *\n * @category Tags\n */\nconst NOT_RESOLVED: unique symbol = Symbol('NOT_RESOLVED')\n\n/**\n * Options for {@link defineScalarTag}.\n *\n * @category Tags\n */\ninterface ScalarTagOptions {\n /**\n * Whether this tag participates in resolving plain scalars without an\n * explicit tag. Default: `false`.\n */\n implicit?: boolean\n\n /**\n * Whether explicit tag names are matched by prefix instead of exact equality.\n * Default: `false`.\n */\n matchByTagPrefix?: boolean\n\n /**\n * Set of `source.charAt(0)` keys for which `resolve` may succeed (a superset\n * of what it really matches). A key is either a single character or '' (empty\n * source). `null` means \"no constraint, always try\". Used by the composer to\n * dispatch implicit scalars by first character without running every resolver.\n */\n implicitFirstChars?: readonly string[] | null\n\n /**\n * Construct a value from scalar text, or return {@link NOT_RESOLVED} when it\n * is invalid for this tag. `isExplicit` is true for an explicit tag and\n * `tagName` is the actual matched name.\n */\n resolve: (source: string, isExplicit: boolean, tagName: string) => Result | typeof NOT_RESOLVED\n\n /**\n * Selects this tag for a JavaScript value when dumping. Use `() => false`\n * for load-only tags.\n */\n identify: (data: any) => boolean\n\n /**\n * A scalar's printed form is text, so `represent` always yields a string.\n * The factory supplies a `String(data)` default when a tag omits it.\n */\n represent?: (data: any) => string\n\n /** Return the tag name to emit for a prefix-matching tag. Defaults to `tagName`. */\n representTagName?: (data: any) => string\n}\n\n/**\n * Normalized scalar tag returned by {@link defineScalarTag}.\n *\n * @category Tags\n */\ninterface ScalarTagDefinition extends Required> {\n /** Tag name used for schema lookup. */\n tagName: string\n\n /** YAML node kind handled by this tag. */\n nodeKind: 'scalar'\n}\n\n/**\n * Options for {@link defineSequenceTag}.\n *\n * @category Tags\n */\ninterface SequenceTagOptions {\n /**\n * Whether explicit tag names are matched by prefix instead of exact equality.\n * Default: `false`.\n */\n matchByTagPrefix?: boolean\n\n /** Create the carrier used while constructing a sequence. */\n create: (tagName: string) => Carrier\n\n /** Add an item to the carrier. Return a non-empty error message to reject it. */\n addItem: (carrier: Carrier, item: unknown, index: number) => void | string\n\n /** Convert the completed carrier to the result. Defaults to the identity function. */\n finalize?: (carrier: Carrier) => Result\n\n /**\n * Selects this tag for a JavaScript value when dumping. Use `() => false`\n * for load-only tags.\n */\n identify: (data: any) => boolean\n\n /** Return the array-like contents to dump. Defaults to the identity function. */\n represent?: (data: any) => ArrayLike\n\n /** Return the tag name to emit for a prefix-matching tag. Defaults to `tagName`. */\n representTagName?: (data: any) => string\n}\n\n/**\n * Normalized sequence tag returned by {@link defineSequenceTag}.\n *\n * @category Tags\n */\ninterface SequenceTagDefinition extends Required> {\n /** Tag name used for schema lookup. */\n tagName: string\n\n /** YAML node kind handled by this tag. */\n nodeKind: 'sequence'\n\n /** Sequence tags do not participate in implicit scalar resolution. */\n implicit: false\n\n /** Whether the carrier is also the final result (`finalize` was omitted). */\n carrierIsResult: boolean\n}\n\n/**\n * Options for {@link defineMappingTag}.\n *\n * @category Tags\n */\ninterface MappingTagOptions {\n /**\n * Whether explicit tag names are matched by prefix instead of exact equality.\n * Default: `false`.\n */\n matchByTagPrefix?: boolean\n\n /** Create the carrier used while constructing a mapping. */\n create: (tagName: string) => Carrier\n\n /**\n * Writes a pair. Returns '' on success, a non-empty error message otherwise\n * (key does not fit the representation, value rejected, ...). Always a string\n * so the hot path never allocates an exception wrapper.\n */\n addPair: (carrier: Carrier, key: unknown, value: unknown) => string\n\n /** Return whether the carrier contains a key, for duplicate and merge checks. */\n has: (carrier: Carrier, key: unknown) => boolean\n\n /** Return the keys of a completed result for YAML merge processing. */\n keys: (result: Result) => Iterable\n\n /** Return a value from a completed result for YAML merge processing. */\n get: (result: Result, key: unknown) => unknown\n\n /** Convert the completed carrier to the result. Defaults to the identity function. */\n finalize?: (carrier: Carrier) => Result\n\n /**\n * Selects this tag for a JavaScript value when dumping. Use `() => false`\n * for load-only tags.\n */\n identify: (data: any) => boolean\n\n /** Return the mapping entries to dump. Defaults to the identity function. */\n represent?: (data: any) => Map\n\n /** Return the tag name to emit for a prefix-matching tag. Defaults to `tagName`. */\n representTagName?: (data: any) => string\n}\n\n/**\n * Normalized mapping tag returned by {@link defineMappingTag}.\n *\n * @category Tags\n */\ninterface MappingTagDefinition extends Required> {\n /** Tag name used for schema lookup. */\n tagName: string\n\n /** YAML node kind handled by this tag. */\n nodeKind: 'mapping'\n\n /** Mapping tags do not participate in implicit scalar resolution. */\n implicit: false\n\n /** Whether the carrier is also the final result (`finalize` was omitted). */\n carrierIsResult: boolean\n}\n\n/**\n * Any normalized tag definition accepted by {@link Schema}.\n *\n * @category Tags\n */\ntype TagDefinition =\n | ScalarTagDefinition\n | SequenceTagDefinition\n | MappingTagDefinition\n\n/**\n * Create a normalized scalar tag definition.\n *\n * @category Tags\n */\nfunction defineScalarTag (tagName: string, options: ScalarTagOptions): ScalarTagDefinition {\n return {\n tagName,\n nodeKind: 'scalar',\n implicit: options.implicit ?? false,\n matchByTagPrefix: options.matchByTagPrefix ?? false,\n implicitFirstChars: options.implicitFirstChars ?? null,\n resolve: options.resolve,\n identify: options.identify,\n represent: options.represent ?? (data => String(data)),\n representTagName: options.representTagName ?? (() => tagName)\n }\n}\n\n/**\n * Create a normalized sequence tag definition.\n *\n * @category Tags\n */\nfunction defineSequenceTag (tagName: string, options: SequenceTagOptions): SequenceTagDefinition {\n const carrierIsResult = options.finalize === undefined\n\n return {\n tagName,\n nodeKind: 'sequence',\n implicit: false,\n matchByTagPrefix: options.matchByTagPrefix ?? false,\n create: options.create,\n addItem: options.addItem,\n finalize: options.finalize ?? (carrier => carrier as unknown as Result),\n carrierIsResult,\n identify: options.identify,\n represent: options.represent ?? (data => data as ArrayLike),\n representTagName: options.representTagName ?? (() => tagName)\n }\n}\n\n/**\n * Create a normalized mapping tag definition.\n *\n * @category Tags\n */\nfunction defineMappingTag (tagName: string, options: MappingTagOptions): MappingTagDefinition {\n const carrierIsResult = options.finalize === undefined\n\n return {\n tagName,\n nodeKind: 'mapping',\n implicit: false,\n matchByTagPrefix: options.matchByTagPrefix ?? false,\n create: options.create,\n addPair: options.addPair,\n has: options.has,\n keys: options.keys,\n get: options.get,\n finalize: options.finalize ?? (carrier => carrier as unknown as Result),\n carrierIsResult,\n identify: options.identify,\n represent: options.represent ?? (data => data as Map),\n representTagName: options.representTagName ?? (() => tagName)\n }\n}\n\nexport {\n NOT_RESOLVED,\n defineScalarTag,\n defineSequenceTag,\n defineMappingTag,\n\n type ScalarTagDefinition,\n type SequenceTagDefinition,\n type MappingTagDefinition,\n type TagDefinition,\n type ScalarTagOptions,\n type SequenceTagOptions,\n type MappingTagOptions\n}\n","import { defineScalarTag } from '../../tag.ts'\n\n/** @category Tags */\nconst strTag = defineScalarTag('tag:yaml.org,2002:str', {\n resolve: (source) => source,\n identify: (data) => typeof data === 'string'\n})\n\nexport { strTag }\n","import { defineScalarTag, NOT_RESOLVED } from '../../tag.ts'\n\nconst NULL_VALUES = ['', '~', 'null', 'Null', 'NULL']\n\n/** @category Tags */\nconst nullCoreTag = defineScalarTag('tag:yaml.org,2002:null', {\n implicit: true,\n // Superset of source.charAt(0) over all matched inputs: '' (empty), '~', 'null'/'Null'/'NULL'.\n implicitFirstChars: ['', '~', 'n', 'N'],\n resolve: (source) => {\n if (NULL_VALUES.indexOf(source) !== -1) return null\n\n return NOT_RESOLVED\n },\n identify: (object) => object === null,\n represent: () => 'null'\n})\n\nexport { nullCoreTag }\n","import { defineScalarTag, NOT_RESOLVED } from '../../tag.ts'\n\n/** @category Tags */\nconst nullJsonTag = defineScalarTag('tag:yaml.org,2002:null', {\n implicit: true,\n // Superset of source.charAt(0) over all matched inputs: null.\n implicitFirstChars: ['n'],\n resolve: (source, isExplicit) => {\n if (source === 'null' || (isExplicit && source === '')) return null\n\n return NOT_RESOLVED\n },\n identify: (object) => object === null,\n represent: () => 'null'\n})\n\nexport { nullJsonTag }\n","import { defineScalarTag, NOT_RESOLVED } from '../../tag.ts'\n\nconst NULL_VALUES = ['', '~', 'null', 'Null', 'NULL']\n\n/** @category Tags */\nconst nullYaml11Tag = defineScalarTag('tag:yaml.org,2002:null', {\n implicit: true,\n // Superset of source.charAt(0) over all matched inputs: '' (empty), '~', 'null'/'Null'/'NULL'.\n implicitFirstChars: ['', '~', 'n', 'N'],\n resolve: (source) => {\n if (NULL_VALUES.indexOf(source) !== -1) return null\n\n return NOT_RESOLVED\n },\n identify: (object) => object === null,\n represent: () => 'null'\n})\n\nexport { nullYaml11Tag }\n","import { defineScalarTag, NOT_RESOLVED } from '../../tag.ts'\n\nconst TRUE_VALUES = ['true', 'True', 'TRUE']\nconst FALSE_VALUES = ['false', 'False', 'FALSE']\n\n/** @category Tags */\nconst boolCoreTag = defineScalarTag('tag:yaml.org,2002:bool', {\n implicit: true,\n // Superset of source.charAt(0) over all matched inputs: true/True/TRUE, false/False/FALSE.\n implicitFirstChars: ['t', 'T', 'f', 'F'],\n resolve: (source) => {\n if (TRUE_VALUES.indexOf(source) !== -1) return true\n if (FALSE_VALUES.indexOf(source) !== -1) return false\n\n return NOT_RESOLVED\n },\n identify: (object) => Object.prototype.toString.call(object) === '[object Boolean]',\n represent: (object) => object ? 'true' : 'false'\n})\n\nexport { boolCoreTag }\n","import { defineScalarTag, NOT_RESOLVED } from '../../tag.ts'\n\nconst TRUE_VALUES = ['true']\nconst FALSE_VALUES = ['false']\n\n/** @category Tags */\nconst boolJsonTag = defineScalarTag('tag:yaml.org,2002:bool', {\n implicit: true,\n // Superset of source.charAt(0) over all matched inputs: true, false.\n implicitFirstChars: ['t', 'f'],\n resolve: (source) => {\n if (TRUE_VALUES.indexOf(source) !== -1) return true\n if (FALSE_VALUES.indexOf(source) !== -1) return false\n\n return NOT_RESOLVED\n },\n identify: (object) => Object.prototype.toString.call(object) === '[object Boolean]',\n represent: (object) => object ? 'true' : 'false'\n})\n\nexport { boolJsonTag }\n","import { defineScalarTag, NOT_RESOLVED } from '../../tag.ts'\n\nconst TRUE_VALUES = ['true', 'True', 'TRUE', 'y', 'Y', 'yes', 'Yes', 'YES', 'on', 'On', 'ON']\nconst FALSE_VALUES = ['false', 'False', 'FALSE', 'n', 'N', 'no', 'No', 'NO', 'off', 'Off', 'OFF']\n\n/** @category Tags */\nconst boolYaml11Tag = defineScalarTag('tag:yaml.org,2002:bool', {\n implicit: true,\n // Superset of source.charAt(0) over all matched inputs.\n implicitFirstChars: ['y', 'Y', 'n', 'N', 't', 'T', 'f', 'F', 'o', 'O'],\n resolve: (source) => {\n if (TRUE_VALUES.indexOf(source) !== -1) return true\n if (FALSE_VALUES.indexOf(source) !== -1) return false\n\n return NOT_RESOLVED\n },\n identify: (object) => Object.prototype.toString.call(object) === '[object Boolean]',\n represent: (object) => object ? 'true' : 'false'\n})\n\nexport { boolYaml11Tag }\n","import { defineScalarTag, NOT_RESOLVED } from '../../tag.ts'\n\n// YAML 1.2 Core schema implicit resolution:\n// [-+]? [0-9]+ | 0o [0-7]+ | 0x [0-9a-fA-F]+\nconst YAML_INTEGER_IMPLICIT_PATTERN = new RegExp(\n // 0o123\n '^(?:0o[0-7]+' +\n // 0x1A\n '|0x[0-9a-fA-F]+' +\n // 12345\n '|[-+]?[0-9]+)$')\n\n// Explicit `!!int` validation is separate from Core implicit resolution.\nconst YAML_INTEGER_EXPLICIT_PATTERN = new RegExp(\n // 0b1010\n '^(?:[-+]?0b[0-1]+' +\n // 0o123\n '|[-+]?0o[0-7]+' +\n // 0x1A\n '|[-+]?0x[0-9a-fA-F]+' +\n // 12345\n '|[-+]?[0-9]+)$')\n\nfunction parseYamlInteger (source: string) {\n let value = source\n let sign = 1\n\n if (value[0] === '-' || value[0] === '+') {\n if (value[0] === '-') sign = -1\n value = value.slice(1)\n }\n\n if (value.startsWith('0b')) return sign * parseInt(value.slice(2), 2)\n if (value.startsWith('0o')) return sign * parseInt(value.slice(2), 8)\n if (value.startsWith('0x')) return sign * parseInt(value.slice(2), 16)\n\n return sign * parseInt(value, 10)\n}\n\nfunction resolveYamlInteger (source: string, isExplicit: boolean) {\n if (isExplicit) {\n if (!YAML_INTEGER_EXPLICIT_PATTERN.test(source)) return NOT_RESOLVED\n } else if (!YAML_INTEGER_IMPLICIT_PATTERN.test(source)) {\n return NOT_RESOLVED\n }\n\n const result = parseYamlInteger(source)\n return Number.isFinite(result) ? result : NOT_RESOLVED\n}\n\n/** @category Tags */\nconst intCoreTag = defineScalarTag('tag:yaml.org,2002:int', {\n implicit: true,\n // Superset of source.charAt(0) over all matched inputs: optional sign + decimal digit.\n implicitFirstChars: ['-', '+', ...'0123456789'],\n resolve: resolveYamlInteger,\n identify: (object) =>\n // No ancient boxed numbers support\n Number.isInteger(object) &&\n // Negative zero => !!float\n !Object.is(object, -0) &&\n // Exponential form => !!float, round-trip for !!int 1e21 will be broken\n object.toString(10).indexOf('e') < 0,\n represent: (object: number) => object.toString(10)\n})\n\nexport { intCoreTag }\n","import { defineScalarTag, NOT_RESOLVED } from '../../tag.ts'\n\n// YAML 1.2 JSON schema implicit resolution:\n// -? ( 0 | [1-9] [0-9]* )\nconst YAML_INTEGER_IMPLICIT_PATTERN = new RegExp(\n '^-?(?:0|[1-9][0-9]*)$')\n\n// Explicit `!!int` validation is separate from JSON implicit resolution.\nconst YAML_INTEGER_EXPLICIT_PATTERN = new RegExp(\n // 0b1010\n '^(?:[-+]?0b[0-1]+' +\n // 0o123\n '|[-+]?0o[0-7]+' +\n // 0x1A\n '|[-+]?0x[0-9a-fA-F]+' +\n // 12345\n '|[-+]?[0-9]+)$')\n\nfunction parseYamlInteger (source: string) {\n let value = source\n let sign = 1\n\n if (value[0] === '-' || value[0] === '+') {\n if (value[0] === '-') sign = -1\n value = value.slice(1)\n }\n\n if (value.startsWith('0b')) return sign * parseInt(value.slice(2), 2)\n if (value.startsWith('0o')) return sign * parseInt(value.slice(2), 8)\n if (value.startsWith('0x')) return sign * parseInt(value.slice(2), 16)\n\n return sign * parseInt(value, 10)\n}\n\nfunction resolveYamlInteger (source: string, isExplicit: boolean) {\n if (isExplicit) {\n if (!YAML_INTEGER_EXPLICIT_PATTERN.test(source)) return NOT_RESOLVED\n } else if (!YAML_INTEGER_IMPLICIT_PATTERN.test(source)) {\n return NOT_RESOLVED\n }\n\n const result = parseYamlInteger(source)\n return Number.isFinite(result) ? result : NOT_RESOLVED\n}\n\n/** @category Tags */\nconst intJsonTag = defineScalarTag('tag:yaml.org,2002:int', {\n implicit: true,\n // Superset of source.charAt(0) over all matched inputs: optional '-' or digit.\n implicitFirstChars: ['-', ...'0123456789'],\n resolve: resolveYamlInteger,\n identify: (object) =>\n // No ancient boxed numbers support\n Number.isInteger(object) &&\n // Negative zero => !!float\n !Object.is(object, -0) &&\n // Exponential form => !!float, round-trip for !!int 1e21 will be broken\n object.toString(10).indexOf('e') < 0,\n represent: (object: number) => object.toString(10)\n})\n\nexport { intJsonTag }\n","import { defineScalarTag, NOT_RESOLVED } from '../../tag.ts'\n\nconst YAML_INTEGER_PATTERN = new RegExp(\n // 0b1010\n '^(?:[-+]?0b[0-1_]+' +\n // 0123\n '|[-+]?0[0-7_]+' +\n // 0x1A\n '|[-+]?0x[0-9a-fA-F_]+' +\n // 1:23\n '|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+' +\n // 12345\n '|[-+]?(?:0|[1-9][0-9_]*))$')\n\nfunction parseYamlInteger (source: string) {\n let value = source.replace(/_/g, '')\n let sign = 1\n\n if (value[0] === '-' || value[0] === '+') {\n if (value[0] === '-') sign = -1\n value = value.slice(1)\n }\n\n if (value.startsWith('0b')) return sign * parseInt(value.slice(2), 2)\n if (value.startsWith('0x')) return sign * parseInt(value.slice(2), 16)\n\n if (value.includes(':')) {\n let result = 0\n for (const part of value.split(':')) result = result * 60 + Number(part)\n return sign * result\n }\n\n if (value !== '0' && value[0] === '0') return sign * parseInt(value, 8)\n\n return sign * parseInt(value, 10)\n}\n\nfunction resolveYamlInteger (source: string) {\n if (!YAML_INTEGER_PATTERN.test(source)) return NOT_RESOLVED\n\n const result = parseYamlInteger(source)\n return Number.isFinite(result) ? result : NOT_RESOLVED\n}\n\n/** @category Tags */\nconst intYaml11Tag = defineScalarTag('tag:yaml.org,2002:int', {\n implicit: true,\n // Superset of source.charAt(0) over all matched inputs: optional sign + decimal digit.\n implicitFirstChars: ['-', '+', ...'0123456789'],\n resolve: resolveYamlInteger,\n identify: (object) =>\n // No ancient boxed numbers support\n Number.isInteger(object) &&\n // Negative zero => !!float\n !Object.is(object, -0) &&\n // Exponential form => !!float, round-trip for !!int 1e21 will be broken\n object.toString(10).indexOf('e') < 0,\n represent: (object: number) => object.toString(10)\n})\n\nexport { intYaml11Tag }\n","import { defineScalarTag, NOT_RESOLVED } from '../../tag.ts'\n\nconst YAML_FLOAT_PATTERN = new RegExp(\n // 2.5e4, 2.5 and integers\n '^(?:[-+]?[0-9]+(?:\\\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?' +\n // .2e4, .2\n '|[-+]?\\\\.[0-9]+(?:[eE][-+]?[0-9]+)?' +\n // .inf\n '|[-+]?\\\\.(?:inf|Inf|INF)' +\n // .nan\n '|\\\\.(?:nan|NaN|NAN))$')\n\nconst YAML_FLOAT_SPECIAL_PATTERN = new RegExp(\n '^(?:' +\n // .inf\n '[-+]?\\\\.(?:inf|Inf|INF)' +\n // .nan\n '|\\\\.(?:nan|NaN|NAN))$')\n\nfunction resolveYamlFloat (source: string) {\n if (!YAML_FLOAT_PATTERN.test(source)) return NOT_RESOLVED\n\n let value = source.toLowerCase()\n const sign = value[0] === '-' ? -1 : 1\n\n if ('+-'.includes(value[0])) value = value.slice(1)\n\n if (value === '.inf') return sign === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY\n if (value === '.nan') return NaN\n\n const result = sign * parseFloat(value)\n\n if (Number.isFinite(result) || YAML_FLOAT_SPECIAL_PATTERN.test(source)) return result\n return NOT_RESOLVED\n}\n\nfunction representYamlFloat (object: number) {\n if (isNaN(object)) return '.nan'\n if (object === Number.POSITIVE_INFINITY) return '.inf'\n if (object === Number.NEGATIVE_INFINITY) return '-.inf'\n if (Object.is(object, -0)) return '-0.0'\n\n const result = object.toString(10)\n return /^[-+]?[0-9]+e/.test(result) ? result.replace('e', '.e') : result\n}\n\n/** @category Tags */\nconst floatCoreTag = defineScalarTag('tag:yaml.org,2002:float', {\n implicit: true,\n // Superset of source.charAt(0) over all matched inputs: optional sign, '.', or digit\n // ('.inf'/'.nan' start with '.').\n implicitFirstChars: ['-', '+', '.', ...'0123456789'],\n resolve: resolveYamlFloat,\n identify: (object) =>\n // No ancient boxed numbers support\n typeof object === 'number' &&\n (\n // We land here all numbers, not handled (declined) by !!int `.identify`\n // The same condition as for !!int, but reversed.\n\n // Filter out integers...\n !Number.isInteger(object) ||\n // but allow negative zero\n Object.is(object, -0) ||\n // and integers with exponential form\n object.toString(10).indexOf('e') >= 0\n ),\n represent: representYamlFloat\n})\n\nexport { floatCoreTag }\n","import { defineScalarTag, NOT_RESOLVED } from '../../tag.ts'\n\n// YAML 1.2 JSON schema implicit resolution:\n// -? ( 0 | [1-9] [0-9]* ) ( \\. [0-9]* )? ( [eE] [-+]? [0-9]+ )?\nconst YAML_FLOAT_IMPLICIT_PATTERN = new RegExp(\n // 2.5e4, 2.5 and integers\n '^-?(?:0|[1-9][0-9]*)(?:\\\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$')\n\n// Explicit `!!float` validation is separate from JSON implicit resolution.\nconst YAML_FLOAT_EXPLICIT_PATTERN = new RegExp(\n // 2.5e4, 2.5 and integers\n '^(?:[-+]?[0-9]+(?:\\\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?' +\n // .2e4, .2\n '|[-+]?\\\\.[0-9]+(?:[eE][-+]?[0-9]+)?' +\n // .inf\n '|[-+]?\\\\.(?:inf|Inf|INF)' +\n // .nan\n '|\\\\.(?:nan|NaN|NAN))$')\n\nfunction resolveYamlFloat (source: string, isExplicit: boolean) {\n if (isExplicit) {\n if (!YAML_FLOAT_EXPLICIT_PATTERN.test(source)) return NOT_RESOLVED\n\n let value = source.toLowerCase()\n const sign = value[0] === '-' ? -1 : 1\n\n if ('+-'.includes(value[0])) value = value.slice(1)\n\n if (value === '.inf') return sign === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY\n if (value === '.nan') return NaN\n\n const result = sign * parseFloat(value)\n return Number.isFinite(result) ? result : NOT_RESOLVED\n }\n\n if (!YAML_FLOAT_IMPLICIT_PATTERN.test(source)) return NOT_RESOLVED\n\n const result = Number(source)\n\n if (Number.isFinite(result)) return result\n return NOT_RESOLVED\n}\n\nfunction representYamlFloat (object: number) {\n if (isNaN(object)) return '.nan'\n if (object === Number.POSITIVE_INFINITY) return '.inf'\n if (object === Number.NEGATIVE_INFINITY) return '-.inf'\n if (Object.is(object, -0)) return '-0.0'\n\n const result = object.toString(10)\n return /^[-+]?[0-9]+e/.test(result) ? result.replace('e', '.e') : result\n}\n\n/** @category Tags */\nconst floatJsonTag = defineScalarTag('tag:yaml.org,2002:float', {\n implicit: true,\n // Superset of source.charAt(0) over all matched inputs: optional '-' or digit.\n implicitFirstChars: ['-', ...'0123456789'],\n resolve: resolveYamlFloat,\n identify: (object) =>\n // No ancient boxed numbers support\n typeof object === 'number' &&\n (\n // We land here all numbers, not handled (declined) by !!int `.identify`\n // The same condition as for !!int, but reversed.\n\n // Filter out integers...\n !Number.isInteger(object) ||\n // but allow negative zero\n Object.is(object, -0) ||\n // and integers with exponential form\n object.toString(10).indexOf('e') >= 0\n ),\n represent: representYamlFloat\n})\n\nexport { floatJsonTag }\n","import { defineScalarTag, NOT_RESOLVED } from '../../tag.ts'\n\nconst YAML_FLOAT_PATTERN = new RegExp(\n // 2.5e4, 2.5 and integers\n '^(?:[-+]?(?:(?:[0-9][0-9_]*)?\\\\.[0-9_]*)(?:[eE][-+][0-9]+)?' +\n // 190:20:30.15\n '|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\\\.[0-9_]*' +\n // .inf\n '|[-+]?\\\\.(?:inf|Inf|INF)' +\n // .nan\n '|\\\\.(?:nan|NaN|NAN))$')\n\nconst YAML_FLOAT_SPECIAL_PATTERN = new RegExp(\n '^(?:' +\n // .inf\n '[-+]?\\\\.(?:inf|Inf|INF)' +\n // .nan\n '|\\\\.(?:nan|NaN|NAN))$')\n\nfunction resolveYamlFloat (source: string) {\n if (!YAML_FLOAT_PATTERN.test(source)) return NOT_RESOLVED\n\n let value = source.toLowerCase().replace(/_/g, '')\n const sign = value[0] === '-' ? -1 : 1\n\n if ('+-'.includes(value[0])) value = value.slice(1)\n\n if (value === '.inf') return sign === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY\n if (value === '.nan') return NaN\n\n let result = 0\n\n if (value.includes(':')) {\n for (const part of value.split(':')) result = result * 60 + Number(part)\n result *= sign\n } else {\n result = sign * parseFloat(value)\n }\n\n if (Number.isFinite(result) || YAML_FLOAT_SPECIAL_PATTERN.test(source)) return result\n return NOT_RESOLVED\n}\n\nfunction representYamlFloat (object: number) {\n if (isNaN(object)) return '.nan'\n if (object === Number.POSITIVE_INFINITY) return '.inf'\n if (object === Number.NEGATIVE_INFINITY) return '-.inf'\n if (Object.is(object, -0)) return '-0.0'\n\n const result = object.toString(10)\n return /^[-+]?[0-9]+e/.test(result) ? result.replace('e', '.e') : result\n}\n\n/** @category Tags */\nconst floatYaml11Tag = defineScalarTag('tag:yaml.org,2002:float', {\n implicit: true,\n // Superset of source.charAt(0) over all matched inputs: optional sign, '.', or digit\n // ('.inf'/'.nan' start with '.').\n implicitFirstChars: ['-', '+', '.', ...'0123456789'],\n resolve: resolveYamlFloat,\n identify: (object) =>\n // No ancient boxed numbers support\n typeof object === 'number' &&\n (\n // We land here all numbers, not handled (declined) by !!int `.identify`\n // The same condition as for !!int, but reversed.\n\n // Filter out integers...\n !Number.isInteger(object) ||\n // but allow negative zero\n Object.is(object, -0) ||\n // and integers with exponential form\n object.toString(10).indexOf('e') >= 0\n ),\n represent: representYamlFloat\n})\n\nexport { floatYaml11Tag }\n","import { defineScalarTag, NOT_RESOLVED } from '../../tag.ts'\n\n/**\n * Enables merge keys in {@link CORE_SCHEMA} when added with\n * {@link Schema.withTags}.\n *\n * @category Tags\n */\nconst mergeTag = defineScalarTag('tag:yaml.org,2002:merge', {\n implicit: true,\n // source.charAt(0) over matched implicit inputs: '<' ('<<').\n implicitFirstChars: ['<'],\n // Merge semantics live in the tag, not in the value: the constructor acts on\n // a key tagged `!!merge`, so `<<` anywhere else is just this string.\n resolve: (source, isExplicit) => {\n if (source === '<<' || (isExplicit && source === '')) return '<<'\n return NOT_RESOLVED\n },\n identify: () => false\n})\n\nexport { mergeTag }\n","import { defineScalarTag, NOT_RESOLVED } from '../../tag.ts'\n\nconst BASE64_PATTERN = /^[A-Za-z0-9+/]*={0,2}$/\n\nfunction resolveYamlBinary (source: string) {\n // Strip allowed whitespace first, so validation stays a plain base64 check.\n const input = source.replace(/\\s/g, '')\n if (input.length % 4 !== 0 || !BASE64_PATTERN.test(input)) return NOT_RESOLVED\n\n const binary = atob(input)\n const result = new Uint8Array(binary.length)\n for (let index = 0; index < binary.length; index++) {\n result[index] = binary.charCodeAt(index)\n }\n return result\n}\n\nfunction representYamlBinary (object: Uint8Array) {\n let binary = ''\n for (let index = 0; index < object.length; index++) {\n binary += String.fromCharCode(object[index])\n }\n return btoa(binary)\n}\n\n/**\n * The `!!binary` tag, represented as a `Uint8Array`.\n *\n * @category Tags\n */\nconst binaryTag = defineScalarTag('tag:yaml.org,2002:binary', {\n resolve: resolveYamlBinary,\n identify: (object) => Object.prototype.toString.call(object) === '[object Uint8Array]',\n represent: representYamlBinary\n})\n\nexport { binaryTag }\n","import { defineScalarTag, NOT_RESOLVED } from '../../tag.ts'\n\nconst YAML_DATE_REGEXP = new RegExp(\n '^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$')\n\nconst YAML_TIMESTAMP_REGEXP = new RegExp(\n '^([0-9][0-9][0-9][0-9])' +\n '-([0-9][0-9]?)' +\n '-([0-9][0-9]?)' +\n '(?:[Tt]|[ \\\\t]+)' +\n '([0-9][0-9]?)' +\n ':([0-9][0-9])' +\n ':([0-9][0-9])' +\n '(?:\\\\.([0-9]*))?' +\n '(?:[ \\\\t]*(Z|([-+])([0-9][0-9]?)' +\n '(?::([0-9][0-9]))?))?$')\n\nfunction makeUtcDate (\n year: number,\n month: number,\n day: number,\n hour = 0,\n minute = 0,\n second = 0,\n fraction = 0\n) {\n const date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction))\n\n // Date.UTC() treats years 0..99 as 1900..1999. Restore the parsed YAML year\n // before validating calendar normalization, e.g. reject 0001-02-29.\n date.setUTCFullYear(year, month, day)\n\n return date\n}\n\nfunction resolveYamlTimestamp (source: string) {\n let match = YAML_DATE_REGEXP.exec(source)\n if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(source)\n if (match === null) return NOT_RESOLVED\n\n const year = +(match[1])\n const month = +(match[2]) - 1\n const day = +(match[3])\n\n // Date-only form (`YYYY-MM-DD`) has no time captures.\n if (!match[4]) {\n const date = makeUtcDate(year, month, day)\n // Reject dates that JS would normalize, e.g. 2023-02-29 -> 2023-03-01.\n if (date.getUTCFullYear() !== year || date.getUTCMonth() !== month || date.getUTCDate() !== day) {\n return NOT_RESOLVED\n }\n return date\n }\n\n const hour = +(match[4])\n const minute = +(match[5])\n const second = +(match[6])\n let fraction = 0\n\n // Reject times that JS would normalize into the next minute/hour/day.\n if (hour > 23 || minute > 59 || second > 59) return NOT_RESOLVED\n\n if (match[7]) {\n let value = match[7].slice(0, 3)\n while (value.length < 3) value += '0'\n fraction = +value\n }\n\n const date = makeUtcDate(year, month, day, hour, minute, second, fraction)\n\n // Reject invalid calendar dates before applying timezone offset.\n if (date.getUTCFullYear() !== year || date.getUTCMonth() !== month || date.getUTCDate() !== day) {\n return NOT_RESOLVED\n }\n\n if (match[9]) {\n const offsetHour = +(match[10])\n const offsetMinute = +(match[11] || 0)\n // Reject timezone offsets that JS date arithmetic would otherwise accept.\n if (offsetHour > 23 || offsetMinute > 59) return NOT_RESOLVED\n\n const offset = (offsetHour * 60 + offsetMinute) * 60000\n date.setTime(date.getTime() - (match[9] === '-' ? -offset : offset))\n }\n\n return date\n}\n\n/**\n * The YAML 1.1 `!!timestamp` tag, represented as a JavaScript `Date`.\n *\n * @category Tags\n */\nconst timestampTag = defineScalarTag('tag:yaml.org,2002:timestamp', {\n implicit: true,\n // Both patterns start with a 4-digit year, so source.charAt(0) is always a digit.\n implicitFirstChars: [...'0123456789'],\n resolve: resolveYamlTimestamp,\n identify: (object) => object instanceof Date,\n represent: (object: Date) => object.toISOString()\n})\n\nexport { timestampTag }\n","import { defineSequenceTag } from '../../tag.ts'\n\n/** @category Tags */\nconst seqTag = defineSequenceTag('tag:yaml.org,2002:seq', {\n create: () => [] as unknown[],\n addItem: (container, item) => {\n container.push(item)\n },\n identify: Array.isArray\n})\n\nexport { seqTag }\n","function isPlainObject (data: unknown): boolean {\n if (data === null || typeof data !== 'object' || Array.isArray(data)) return false\n const prototype = Object.getPrototypeOf(data)\n return prototype === null || prototype === Object.prototype\n}\n\n// Project `object` onto `keys`. Absent keys are skipped (so the result can be\n// safely spread over defaults without clobbering them with `undefined`), hence\n// the `Partial` return.\nfunction pick (object: T, keys: readonly K[]): Partial> {\n const result: Partial> = {}\n for (const key of keys) {\n if (object[key] !== undefined) result[key] = object[key]\n }\n return result\n}\n\nexport {\n isPlainObject,\n pick\n}\n","import { defineSequenceTag } from '../../tag.ts'\nimport { isPlainObject } from '../../common/object.ts'\n\n/**\n * Provided only for YAML 1.1 compatibility and supported by the loader only.\n * JavaScript has no dedicated class to represent this type, so it cannot be\n * identified and dumped.\n *\n * ```yaml\n * !!omap\n * - one: 1\n * - two: 2\n * ```\n *\n * is loaded as\n *\n * ```javascript\n * [\n * { one: 1 },\n * { two: 2 }\n * ]\n * ```\n *\n * @category Tags\n */\nconst omapTag = defineSequenceTag('tag:yaml.org,2002:omap', {\n create: (): { list: unknown[]; seen: Set } => ({ list: [], seen: new Set() }),\n addItem: (carrier, item) => {\n let key: unknown\n\n if (item instanceof Map) {\n if (item.size !== 1) return 'cannot resolve an ordered map item'\n key = item.keys().next().value\n } else if (isPlainObject(item)) {\n const itemKeys = Object.keys(item as Record)\n if (itemKeys.length !== 1) return 'cannot resolve an ordered map item'\n key = itemKeys[0]\n } else {\n return 'cannot resolve an ordered map item'\n }\n\n if (carrier.seen.has(key)) return 'duplicate key in ordered map'\n carrier.seen.add(key)\n carrier.list.push(item)\n return ''\n },\n finalize: (carrier): unknown[] => carrier.list,\n identify: () => false\n})\n\nexport { omapTag }\n","import { defineSequenceTag } from '../../tag.ts'\n\n/**\n * Provided only for YAML 1.1 compatibility and supported by the loader only.\n * JavaScript has no dedicated class to represent this type, so it cannot be\n * identified and dumped.\n *\n * ```yaml\n * !!pairs\n * - one: 1\n * - two: 2\n * ```\n *\n * is loaded as\n *\n * ```javascript\n * [\n * ['one', 1],\n * ['two', 2]\n * ]\n * ```\n *\n * @category Tags\n */\nconst pairsTag = defineSequenceTag('tag:yaml.org,2002:pairs', {\n create: () => [] as [unknown, unknown][],\n addItem: (container, item) => {\n if (item instanceof Map) {\n if (item.size !== 1) return 'cannot resolve a pairs item'\n\n container.push(item.entries().next().value!)\n return ''\n }\n\n if (Object.prototype.toString.call(item) !== '[object Object]') {\n return 'cannot resolve a pairs item'\n }\n\n const object = item as Record\n const keys = Object.keys(object)\n\n if (keys.length !== 1) return 'cannot resolve a pairs item'\n\n container.push([keys[0], object[keys[0]]])\n return ''\n },\n identify: () => false\n})\n\nexport { pairsTag }\n","import { defineMappingTag } from '../../tag.ts'\nimport { isPlainObject } from '../../common/object.ts'\n\n/**\n * This is the default mapping implementation. It uses `{}` objects and has only\n * partial functionality due to language limitations. This choice was made\n * because users expect to get JavaScript objects, and it was left unchanged to\n * avoid too many breaking changes in the v5 release.\n *\n * Side effects:\n *\n * - `Object.hasOwn()` checks or `for...of` loops are required for safe use (to\n * avoid falling through to prototypes).\n * - Only scalar string keys are supported properly.\n * - Other scalar keys, such as `null` and numbers, are converted to strings.\n * This is historical behaviour, and it can cause side effects such as\n * problems with `!!merge`.\n *\n * Note that non-string scalar keys may be deprecated in future versions.\n *\n * Ideally, use {@link realMapTag} instead.\n *\n * @category Tags\n */\nconst mapTag = defineMappingTag('tag:yaml.org,2002:map', {\n create: (): Record => ({}),\n identify: isPlainObject,\n // Dump side: wrap the plain object into the canonical `Map` form the writer\n // walks. Shallow — keys/values stay references to the originals.\n represent: (o: Record) => {\n const map = new Map()\n for (const key of Object.keys(o)) map.set(key, o[key])\n return map\n },\n addPair: (container, key, value) => {\n if (key !== null && typeof key === 'object') {\n return 'object-based map does not support complex keys'\n }\n const normalizedKey = String(key)\n if (normalizedKey === '__proto__') {\n // Define as an own data property so a literal `__proto__` key stays data\n // and never invokes the prototype setter.\n Object.defineProperty(container, normalizedKey, {\n value, enumerable: true, configurable: true, writable: true\n })\n } else {\n container[normalizedKey] = value\n }\n return ''\n },\n // hasOwn, not `in`: a plain object inherits `toString` and friends.\n has: (container, key) => {\n if (key !== null && typeof key === 'object') return false\n return Object.prototype.hasOwnProperty.call(container, String(key))\n },\n keys: (container) => Object.keys(container),\n get: (container, key) => {\n const normalizedKey = String(key)\n // key is from `keys()` only. Strong check is not needed, but leave for sure.\n if (!Object.prototype.hasOwnProperty.call(container, normalizedKey)) return null\n return container[normalizedKey]\n }\n})\n\nexport { mapTag, isPlainObject }\n","import { defineMappingTag } from '../../tag.ts'\n\n/**\n * The YAML 1.1 `!!set` tag, represented as a JavaScript `Set`.\n *\n * @category Tags\n */\nconst setTag = defineMappingTag('tag:yaml.org,2002:set', {\n create: () => new Set(),\n identify: (data) => data instanceof Set,\n represent: (data: Set) => {\n const map = new Map()\n for (const key of data) map.set(key, null)\n return map\n },\n addPair: (container, key, value) => {\n if (value !== null) return 'cannot resolve a set item'\n container.add(key)\n return ''\n },\n has: (container, key) => container.has(key),\n keys: (container) => container.keys(),\n get: () => null\n})\n\nexport { setTag }\n","import {\n NOT_RESOLVED,\n type MappingTagDefinition,\n type ScalarTagDefinition,\n type SequenceTagDefinition,\n type TagDefinition\n} from './tag.ts'\nimport { strTag } from './tag/scalar/str.ts'\nimport { nullCoreTag } from './tag/scalar/null_core.ts'\nimport { nullJsonTag } from './tag/scalar/null_json.ts'\nimport { nullYaml11Tag } from './tag/scalar/null_yaml11.ts'\nimport { boolCoreTag } from './tag/scalar/bool_core.ts'\nimport { boolJsonTag } from './tag/scalar/bool_json.ts'\nimport { boolYaml11Tag } from './tag/scalar/bool_yaml11.ts'\nimport { intCoreTag } from './tag/scalar/int_core.ts'\nimport { intJsonTag } from './tag/scalar/int_json.ts'\nimport { intYaml11Tag } from './tag/scalar/int_yaml11.ts'\nimport { floatCoreTag } from './tag/scalar/float_core.ts'\nimport { floatJsonTag } from './tag/scalar/float_json.ts'\nimport { floatYaml11Tag } from './tag/scalar/float_yaml11.ts'\nimport { mergeTag } from './tag/scalar/merge.ts'\nimport { binaryTag } from './tag/scalar/binary.ts'\nimport { timestampTag } from './tag/scalar/timestamp.ts'\nimport { seqTag } from './tag/sequence/seq.ts'\nimport { omapTag } from './tag/sequence/omap.ts'\nimport { pairsTag } from './tag/sequence/pairs.ts'\nimport { mapTag } from './tag/mapping/map.ts'\nimport { setTag } from './tag/mapping/set.ts'\n\ninterface TagDefinitionMap {\n scalar: Record\n sequence: Record\n mapping: Record\n}\n\ninterface TagDefinitionListMap {\n scalar: ScalarTagDefinition[]\n sequence: SequenceTagDefinition[]\n mapping: MappingTagDefinition[]\n}\n\nfunction createTagDefinitionMap (): TagDefinitionMap {\n return {\n scalar: Object.create(null),\n sequence: Object.create(null),\n mapping: Object.create(null)\n }\n}\n\nfunction createTagDefinitionListMap (): TagDefinitionListMap {\n return {\n scalar: [],\n sequence: [],\n mapping: []\n }\n}\n\nfunction compileTags (tags: readonly TagDefinition[]) {\n const result: TagDefinition[] = []\n\n for (const tag of tags) {\n let index = result.length\n\n for (let previousIndex = 0; previousIndex < result.length; previousIndex++) {\n const previous = result[previousIndex]\n\n if (previous.nodeKind === tag.nodeKind &&\n previous.tagName === tag.tagName &&\n previous.matchByTagPrefix === tag.matchByTagPrefix) {\n index = previousIndex\n break\n }\n }\n\n result[index] = tag\n }\n\n return result\n}\n\n/**\n * Controls tag resolution when loading and type selection when dumping.\n *\n * @category Schemas\n */\nclass Schema {\n readonly tags: readonly TagDefinition[]\n /** @internal */\n readonly implicitScalarTags: readonly ScalarTagDefinition[]\n\n /**\n * Dispatch implicit scalar resolvers by `source.charAt(0)`. Each bucket holds\n * the resolvers that may match that key, in schema order; a key absent from\n * the map uses\n * {@link Schema.implicitScalarAnyFirstChar}\n * (resolvers that declared no first-char constraint, so they apply to any\n * first character).\n */\n private readonly implicitScalarByFirstChar: ReadonlyMap\n private readonly implicitScalarAnyFirstChar: readonly ScalarTagDefinition[]\n\n /**\n * The default scalar tag (`!!str`), resolved once so the composer's fallback\n * for unresolved plain scalars avoids a keyed lookup per scalar.\n *\n * @internal\n */\n readonly defaultScalarTag: ScalarTagDefinition\n\n /**\n * The default container tags (`!!seq` / `!!map`), used by the dumper: when a\n * value is identified by its default tag, the tag is implicit and not\n * printed. Undefined if the schema does not define them (then such values\n * can't be dumped).\n *\n * @internal\n */\n readonly defaultSequenceTag: SequenceTagDefinition | undefined\n /** @internal */\n readonly defaultMappingTag: MappingTagDefinition | undefined\n private readonly exact: TagDefinitionMap\n private readonly prefix: TagDefinitionListMap\n\n constructor (tags: readonly TagDefinition[]) {\n const compiledTags = compileTags(tags)\n const implicitScalarTags: ScalarTagDefinition[] = []\n const exact = createTagDefinitionMap()\n const prefix = createTagDefinitionListMap()\n\n for (const tag of compiledTags) {\n if (tag.nodeKind === 'scalar' && tag.implicit) {\n if (tag.matchByTagPrefix) {\n throw new Error('Implicit scalar tags cannot match by tag prefix')\n }\n\n implicitScalarTags.push(tag)\n }\n\n switch (tag.nodeKind) {\n case 'scalar':\n if (tag.matchByTagPrefix) prefix.scalar.push(tag)\n else exact.scalar[tag.tagName] = tag\n break\n case 'sequence':\n if (tag.matchByTagPrefix) prefix.sequence.push(tag)\n else exact.sequence[tag.tagName] = tag\n break\n case 'mapping':\n if (tag.matchByTagPrefix) prefix.mapping.push(tag)\n else exact.mapping[tag.tagName] = tag\n break\n }\n }\n\n const implicitScalarAnyFirstChar = implicitScalarTags.filter(tag => tag.implicitFirstChars === null)\n\n const keys = new Set()\n for (const tag of implicitScalarTags) {\n if (tag.implicitFirstChars !== null) {\n for (const key of tag.implicitFirstChars) keys.add(key)\n }\n }\n\n const implicitScalarByFirstChar = new Map()\n for (const key of keys) {\n implicitScalarByFirstChar.set(key, implicitScalarTags.filter(tag =>\n tag.implicitFirstChars === null || tag.implicitFirstChars.indexOf(key) !== -1))\n }\n\n const defaultScalarTag = exact.scalar['tag:yaml.org,2002:str']\n if (!defaultScalarTag) throw new Error('schema does not define the default scalar tag (tag:yaml.org,2002:str)')\n\n this.tags = compiledTags\n this.implicitScalarTags = implicitScalarTags\n this.implicitScalarByFirstChar = implicitScalarByFirstChar\n this.implicitScalarAnyFirstChar = implicitScalarAnyFirstChar\n this.defaultScalarTag = defaultScalarTag\n this.defaultSequenceTag = exact.sequence['tag:yaml.org,2002:seq']\n this.defaultMappingTag = exact.mapping['tag:yaml.org,2002:map']\n this.exact = exact\n this.prefix = prefix\n }\n\n /** @internal */\n lookupScalarTag (tagName: string): ScalarTagDefinition | undefined {\n const exactTag = this.exact.scalar[tagName]\n if (exactTag) return exactTag\n\n for (const tag of this.prefix.scalar) {\n if (tagName.startsWith(tag.tagName)) return tag\n }\n\n return undefined\n }\n\n /** @internal */\n lookupSequenceTag (tagName: string): SequenceTagDefinition | undefined {\n const exactTag = this.exact.sequence[tagName]\n if (exactTag) return exactTag\n\n for (const tag of this.prefix.sequence) {\n if (tagName.startsWith(tag.tagName)) return tag\n }\n\n return undefined\n }\n\n /** @internal */\n lookupMappingTag (tagName: string): MappingTagDefinition | undefined {\n const exactTag = this.exact.mapping[tagName]\n if (exactTag) return exactTag\n\n for (const tag of this.prefix.mapping) {\n if (tagName.startsWith(tag.tagName)) return tag\n }\n\n return undefined\n }\n\n /** @internal */\n resolveImplicitScalarTag (source: string): { value: unknown, tag: ScalarTagDefinition } {\n const candidates = this.implicitScalarByFirstChar.get(source.charAt(0)) ??\n this.implicitScalarAnyFirstChar\n\n for (const tag of candidates) {\n const value = tag.resolve(source, false, tag.tagName)\n if (value !== NOT_RESOLVED) return { value, tag }\n }\n\n const tag = this.defaultScalarTag\n return { value: tag.resolve(source, false, tag.tagName), tag }\n }\n\n /**\n * Creates a new schema with the specified tags added. If a tag already\n * exists, it is replaced by the specified tag.\n *\n * @example\n *\n * ```javascript\n * import { CORE_SCHEMA, mergeTag, realMapTag } from 'js-yaml'\n *\n * const schema = CORE_SCHEMA.withTags(mergeTag, realMapTag)\n * ```\n */\n withTags (...tags: Array): Schema {\n let flatTags: TagDefinition[] = []\n for (const tag of tags) flatTags = flatTags.concat(tag)\n\n return new Schema([...this.tags, ...flatTags])\n }\n}\n\n/**\n * The YAML 1.2 Failsafe Schema: strings, sequences, and mappings.\n *\n * @category Schemas\n */\nconst FAILSAFE_SCHEMA = new Schema([\n strTag,\n seqTag,\n mapTag\n])\n\n/**\n * The YAML 1.2 JSON Schema. It uses JSON scalar forms while retaining YAML\n * collection syntax.\n *\n * @category Schemas\n */\nconst JSON_SCHEMA = new Schema([\n ...FAILSAFE_SCHEMA.tags,\n nullJsonTag,\n boolJsonTag,\n intJsonTag,\n floatJsonTag\n])\n\n/**\n * The default schema for the loaders. Note, {@link CORE_SCHEMA} comes\n * without the `!!merge` tag. You can easily enable it if needed.\n *\n * @example\n * Enable {@link mergeTag}:\n *\n * ```javascript\n * import { load, CORE_SCHEMA, mergeTag } from 'js-yaml'\n *\n * try {\n * load(data, { schema: CORE_SCHEMA.withTags(mergeTag) })\n * } catch (e) {\n * console.error(e)\n * }\n * ```\n *\n * @category Schemas\n */\nconst CORE_SCHEMA = new Schema([\n ...FAILSAFE_SCHEMA.tags,\n nullCoreTag,\n boolCoreTag,\n intCoreTag,\n floatCoreTag\n])\n\n/**\n * YAML 1.1-compatible schema.\n *\n * @category Schemas\n */\nconst YAML11_SCHEMA = new Schema([\n ...FAILSAFE_SCHEMA.tags,\n nullYaml11Tag,\n boolYaml11Tag,\n intYaml11Tag,\n floatYaml11Tag,\n timestampTag,\n mergeTag,\n binaryTag,\n omapTag,\n pairsTag,\n setTag\n])\n\n/**\n * The dumper schema for maximum compatibility. It combines all supported type\n * variants from YAML 1.1 and YAML 1.2 so strings matching any of them are\n * quoted. This makes the generated YAML more compatible with other parsers.\n *\n * The schema is based on YAML 1.1, but extends `!!int` and `!!float` to accept\n * both YAML 1.1 and Core Schema forms, since Core Schema supports some forms\n * that YAML 1.1 does not.\n *\n * @category Schemas\n */\nconst DUMP_SCHEMA = YAML11_SCHEMA.withTags(\n {\n ...intYaml11Tag,\n resolve: (source, isExplicit, tagName) => {\n const result = intYaml11Tag.resolve(source, isExplicit, tagName)\n return result === NOT_RESOLVED ? intCoreTag.resolve(source, isExplicit, tagName) : result\n }\n },\n {\n ...floatYaml11Tag,\n resolve: (source, isExplicit, tagName) => {\n const result = floatYaml11Tag.resolve(source, isExplicit, tagName)\n return result === NOT_RESOLVED ? floatCoreTag.resolve(source, isExplicit, tagName) : result\n }\n }\n)\n\nexport {\n Schema,\n FAILSAFE_SCHEMA,\n JSON_SCHEMA,\n CORE_SCHEMA,\n YAML11_SCHEMA,\n DUMP_SCHEMA\n}\n","import { defineMappingTag } from '../../tag.ts'\nimport { isPlainObject } from '../../common/object.ts'\n\n/**\n * Recommended when non-string keys are actually needed. It uses native\n * JavaScript `Map` objects, so keys keep their constructed types instead of\n * being converted to strings.\n *\n * It is not the default to avoid widespread breaking changes in existing\n * projects. `Map` has a different access API and does not pass deep equality\n * checks against `{}`-based fixtures. Alongside the other changes in v5,\n * making it the default was considered too disruptive.\n *\n * If these differences are acceptable for your project, we recommend using\n * {@link realMapTag} to guarantee the absence of problems and side effects.\n *\n * @example\n * Enable {@link realMapTag}:\n *\n * ```javascript\n * import { load, CORE_SCHEMA, realMapTag } from 'js-yaml'\n *\n * try {\n * load(data, { schema: CORE_SCHEMA.withTags(realMapTag) })\n * } catch (e) {\n * console.error(e)\n * }\n * ```\n *\n * @category Tags\n */\nconst realMapTag = defineMappingTag('tag:yaml.org,2002:map', {\n create: () => new Map(),\n addPair: (container: Map, key, value) => {\n container.set(key, value)\n return ''\n },\n has: (container: Map, key) => container.has(key),\n keys: (container: Map) => container.keys(),\n get: (container: Map, key) => container.get(key),\n // Dump side: handle both a real `Map` and a plain object, so this tag fully\n // replaces the default map representation when dumping too.\n identify: (data) => data instanceof Map || isPlainObject(data),\n // Dump side: the canonical mapping form is a `Map`. A real `Map` passes\n // through untouched (keys keep their type); a plain object is wrapped\n // shallowly. Lossless — nothing is stringified.\n represent: (data) => {\n if (data instanceof Map) return data\n const map = new Map()\n const obj = data as Record\n for (const key of Object.keys(obj)) map.set(key, obj[key])\n return map\n }\n})\n\nexport { realMapTag }\n","import { defineMappingTag } from '../../tag.ts'\nimport { isPlainObject } from '../../common/object.ts'\n\n// Coerce a constructed key into the string identity a `{}` representation uses.\n// Returns null for a nested array key (an array element that is itself an\n// array), which would otherwise blow up exponentially when stringified via\n// aliases.\nfunction normalizeKey (key: unknown): string | null {\n if (Array.isArray(key)) {\n const array = Array.prototype.slice.call(key) as unknown[]\n\n for (let index = 0; index < array.length; index++) {\n if (Array.isArray(array[index])) return null\n\n if (typeof array[index] === 'object' &&\n Object.prototype.toString.call(array[index]) === '[object Object]') {\n array[index] = '[object Object]'\n }\n }\n\n return String(array)\n }\n\n if (typeof key === 'object' &&\n Object.prototype.toString.call(key) === '[object Object]') {\n return '[object Object]'\n }\n\n return String(key)\n}\n\n/**\n * This implementation exists solely to reproduce v4 behavior exactly. Its use\n * is strongly discouraged. If complex or non-string keys are needed, use\n * {@link realMapTag} instead.\n *\n * @category Tags\n */\nconst legacyMapTag = defineMappingTag('tag:yaml.org,2002:map', {\n create: (): Record => ({}),\n identify: isPlainObject,\n // Dump side: wrap the plain object into the canonical `Map` form the writer\n // walks. Shallow — keys/values stay references to the originals.\n represent: (o: Record) => {\n const map = new Map()\n for (const key of Object.keys(o)) map.set(key, o[key])\n return map\n },\n addPair: (container, key, value) => {\n const normalizedKey = normalizeKey(key)\n if (normalizedKey === null) return 'nested arrays are not supported inside keys'\n if (normalizedKey === '__proto__') {\n // Define as an own data property so a literal `__proto__` key stays data\n // and never invokes the prototype setter.\n Object.defineProperty(container, normalizedKey, {\n value, enumerable: true, configurable: true, writable: true\n })\n } else {\n container[normalizedKey] = value\n }\n return ''\n },\n // hasOwn, not `in`: a plain object inherits `toString` and friends.\n has: (container, key) => {\n const normalizedKey = normalizeKey(key)\n return normalizedKey !== null && Object.prototype.hasOwnProperty.call(container, normalizedKey)\n },\n keys: (container) => Object.keys(container),\n get: (container, key) => {\n const normalizedKey = String(key)\n // key is from `keys()` only. Strong check is not needed, but leave for sure.\n if (!Object.prototype.hasOwnProperty.call(container, normalizedKey)) return null\n return container[normalizedKey]\n }\n})\n\nexport { legacyMapTag, isPlainObject }\n","export interface SnippetMark {\n name?: string | null\n buffer: string\n position: number\n line: number\n column: number\n snippet?: string | null\n}\n\ninterface SnippetOptions {\n maxLength?: number\n indent?: number\n linesBefore?: number\n linesAfter?: number\n}\n\nconst DEFAULT_SNIPPET_OPTIONS: Required = {\n maxLength: 79,\n indent: 1,\n linesBefore: 3,\n linesAfter: 2\n}\n\n// get snippet for a single line, respecting maxLength\nfunction getLine (buffer: string, lineStart: number, lineEnd: number, position: number, maxLineLength: number) {\n let head = ''\n let tail = ''\n const maxHalfLength = Math.floor(maxLineLength / 2) - 1\n\n if (position - lineStart > maxHalfLength) {\n head = ' ... '\n lineStart = position - maxHalfLength + head.length\n }\n\n if (lineEnd - position > maxHalfLength) {\n tail = ' ...'\n lineEnd = position + maxHalfLength - tail.length\n }\n\n return {\n str: head + buffer.slice(lineStart, lineEnd).replace(/\\t/g, '→') + tail,\n pos: position - lineStart + head.length // relative position\n }\n}\n\nfunction padStart (string: string, max: number) {\n // max() protects from negativa value, to avoid exception.\n return ' '.repeat(Math.max(max - string.length, 0)) + string\n}\n\nfunction makeSnippet (mark: SnippetMark, options?: SnippetOptions) {\n if (!mark.buffer) return null\n\n const opts = { ...DEFAULT_SNIPPET_OPTIONS, ...options }\n\n const re = /\\r?\\n|\\r|\\0/g\n const lineStarts = [0]\n const lineEnds: number[] = []\n let match: RegExpExecArray | null\n let foundLineNo = -1\n\n while ((match = re.exec(mark.buffer))) {\n lineEnds.push(match.index)\n lineStarts.push(match.index + match[0].length)\n\n if (mark.position <= match.index && foundLineNo < 0) {\n foundLineNo = lineStarts.length - 2\n }\n }\n\n if (foundLineNo < 0) foundLineNo = lineStarts.length - 1\n\n let result = ''\n const lineNoLength = Math.min(mark.line + opts.linesAfter, lineEnds.length).toString().length\n const maxLineLength = opts.maxLength - (opts.indent + lineNoLength + 3)\n\n for (let i = 1; i <= opts.linesBefore; i++) {\n if (foundLineNo - i < 0) break\n const line = getLine(\n mark.buffer,\n lineStarts[foundLineNo - i],\n lineEnds[foundLineNo - i],\n mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo - i]),\n maxLineLength\n )\n result = `${' '.repeat(opts.indent)}${padStart((mark.line - i + 1).toString(), lineNoLength)} | ${line.str}\\n${result}`\n }\n\n const line = getLine(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength)\n result += `${' '.repeat(opts.indent)}${padStart((mark.line + 1).toString(), lineNoLength)} | ${line.str}\\n`\n result += `${'-'.repeat(opts.indent + lineNoLength + 3 + line.pos)}^\\n`\n\n for (let i = 1; i <= opts.linesAfter; i++) {\n if (foundLineNo + i >= lineEnds.length) break\n const line = getLine(\n mark.buffer,\n lineStarts[foundLineNo + i],\n lineEnds[foundLineNo + i],\n mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo + i]),\n maxLineLength\n )\n result += `${' '.repeat(opts.indent)}${padStart((mark.line + i + 1).toString(), lineNoLength)} | ${line.str}\\n`\n }\n\n return result.replace(/\\n$/, '')\n}\n\nexport default makeSnippet\n","import makeSnippet, { type SnippetMark } from './snippet.ts'\n\n// YAML error class. http://stackoverflow.com/questions/8458984\n//\nfunction formatError (exception: YAMLException, compact?: boolean) {\n let where = ''\n\n if (!exception.mark) return exception.reason\n\n if (exception.mark.name) {\n where += `in \"${exception.mark.name}\" `\n }\n\n where += `(${exception.mark.line + 1}:${exception.mark.column + 1})`\n\n if (!compact && exception.mark.snippet) {\n where += `\\n\\n${exception.mark.snippet}`\n }\n\n return `${exception.reason} ${where}`\n}\n\n/**\n * A YAML error. Unlike an ordinary `Error`, it adds a source snippet showing\n * the location of the problem to the error message, when available.\n *\n * @category Main\n */\nclass YAMLException extends Error {\n reason: string\n mark?: SnippetMark\n\n /**\n * Optional `mark` contains source snippet data. Usually, use\n * {@link YAMLException.throwAt} instead of passing it directly.\n */\n constructor (reason: string, mark?: SnippetMark) {\n super()\n\n this.name = 'YAMLException'\n this.reason = reason\n this.mark = mark\n this.message = formatError(this, false)\n\n // Guard for ancient browsers\n if (Error.captureStackTrace) {\n // Include stack trace in error object,\n Error.captureStackTrace(this, this.constructor)\n }\n }\n\n /**\n * Returns the formatted error, omitting the source snippet in compact mode.\n */\n toString (compact?: boolean) {\n return `${this.name}: ${formatError(this, compact)}`\n }\n\n /**\n * Builds a YAMLException with a source snippet and throws it. `source` is\n * the raw input text; `position` is an offset into it.\n */\n static throwAt (source: string, position: number, message: string, filename = ''): never {\n let line = 0\n let lineStart = 0\n\n for (let index = 0; index < position; index++) {\n const ch = source.charCodeAt(index)\n\n if (ch === 0x0A/* LF */) {\n line++\n lineStart = index + 1\n } else if (ch === 0x0D/* CR */) {\n line++\n if (source.charCodeAt(index + 1) === 0x0A/* LF */) index++\n lineStart = index + 1\n }\n }\n\n const mark: SnippetMark = {\n name: filename,\n buffer: source,\n position,\n line,\n column: position - lineStart\n }\n\n mark.snippet = makeSnippet(mark)\n throw new YAMLException(message, mark)\n }\n}\n\nexport { YAMLException }\n","/** @category Events */\nconst EVENT_ID = {\n DOCUMENT: 1,\n SEQUENCE: 2,\n MAPPING: 3,\n SCALAR: 4,\n ALIAS: 5,\n POP: 6\n} as const\n\n/** @category Events */\ntype EventId = typeof EVENT_ID[keyof typeof EVENT_ID]\n\n/** @category Nodes */\nconst SCALAR_STYLE = {\n PLAIN: 1,\n SINGLE_QUOTED: 2,\n DOUBLE_QUOTED: 3,\n LITERAL_BLOCK: 4,\n FOLDED_BLOCK: 5\n} as const\n\n/** @category Nodes */\ntype ScalarStyle = typeof SCALAR_STYLE[keyof typeof SCALAR_STYLE]\n\n/** @category Nodes */\nconst COLLECTION_STYLE = {\n BLOCK: 1,\n FLOW: 2\n} as const\n\n/** @category Nodes */\ntype CollectionStyle = typeof COLLECTION_STYLE[keyof typeof COLLECTION_STYLE]\n\n/** @category Nodes */\nconst CHOMPING_MODE = {\n CLIP: 1,\n STRIP: 2,\n KEEP: 3\n} as const\n\n/** @category Nodes */\ntype ChompingMode = typeof CHOMPING_MODE[keyof typeof CHOMPING_MODE]\n\n/** @category Events */\ntype DocumentDirective =\n { kind: 'yaml', version: string } |\n { kind: 'tag', handle: string, prefix: string }\n\ntype TagHandlers = Record\n\n/** @category Events */\ninterface DocumentEvent {\n type: typeof EVENT_ID.DOCUMENT\n explicitStart: boolean\n explicitEnd: boolean\n directives: DocumentDirective[]\n}\n\n/** @category Events */\ninterface SequenceEvent {\n type: typeof EVENT_ID.SEQUENCE\n start: number\n anchorStart: number\n anchorEnd: number\n tagStart: number\n tagEnd: number\n style: CollectionStyle\n}\n\n/** @category Events */\ninterface MappingEvent {\n type: typeof EVENT_ID.MAPPING\n start: number\n anchorStart: number\n anchorEnd: number\n tagStart: number\n tagEnd: number\n style: CollectionStyle\n}\n\n/**\n * A scalar whose decoded value can be read with {@link getScalarValue}.\n *\n * @category Events\n */\ninterface ScalarEvent {\n type: typeof EVENT_ID.SCALAR\n valueStart: number\n valueEnd: number\n anchorStart: number\n anchorEnd: number\n tagStart: number\n tagEnd: number\n style: ScalarStyle\n chomping: ChompingMode\n indent: number\n fast: boolean\n}\n\n/** @category Events */\ninterface AliasEvent {\n type: typeof EVENT_ID.ALIAS\n anchorStart: number\n anchorEnd: number\n}\n\n/**\n * Closes the most recently opened document, sequence, or mapping.\n *\n * @category Events\n */\ninterface PopEvent {\n type: typeof EVENT_ID.POP\n}\n\n/**\n * Source ranges are zero-based and end-exclusive; `-1` means absent.\n *\n * @category Events\n */\ntype Event =\n DocumentEvent |\n SequenceEvent |\n MappingEvent |\n ScalarEvent |\n AliasEvent |\n PopEvent\n\nexport {\n EVENT_ID,\n SCALAR_STYLE,\n COLLECTION_STYLE,\n CHOMPING_MODE,\n\n type EventId,\n type ScalarStyle,\n type CollectionStyle,\n type ChompingMode,\n\n type DocumentDirective,\n type TagHandlers,\n type DocumentEvent,\n type SequenceEvent,\n type MappingEvent,\n type ScalarEvent,\n type AliasEvent,\n type PopEvent,\n type Event\n}\n","import {\n SCALAR_STYLE,\n CHOMPING_MODE,\n type ScalarEvent\n} from './events.ts'\n\nconst NO_RANGE = -1\n\n// --- character helpers (mirrors src/loader.ts, kept self-contained here) ---\n\nfunction simpleEscapeSequence (c: number) {\n switch (c) {\n case 0x30/* 0 */: return '\\x00'\n case 0x61/* a */: return '\\x07'\n case 0x62/* b */: return '\\x08'\n case 0x74/* t */: return '\\x09'\n case 0x09/* Tab */: return '\\x09'\n case 0x6E/* n */: return '\\x0A'\n case 0x76/* v */: return '\\x0B'\n case 0x66/* f */: return '\\x0C'\n case 0x72/* r */: return '\\x0D'\n case 0x65/* e */: return '\\x1B'\n case 0x20/* Space */: return ' '\n case 0x22/* \" */: return '\\x22'\n case 0x2F/* / */: return '/'\n case 0x5C/* \\ */: return '\\x5C'\n case 0x4E/* N */: return '\\x85'\n case 0x5F/* _ */: return '\\xA0'\n case 0x4C/* L */: return '\\u2028'\n case 0x50/* P */: return '\\u2029'\n default: return ''\n }\n}\n\nconst simpleEscapeCheck = new Array(256)\nconst simpleEscapeMap = new Array(256)\nfor (let i = 0; i < 256; i++) {\n simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0\n simpleEscapeMap[i] = simpleEscapeSequence(i)\n}\n\nfunction charFromCodepoint (c: number) {\n if (c <= 0xFFFF) {\n return String.fromCharCode(c)\n }\n return String.fromCharCode(\n ((c - 0x010000) >> 10) + 0xD800,\n ((c - 0x010000) & 0x03FF) + 0xDC00\n )\n}\n\nfunction fromHexCode (c: number) {\n if (c >= 0x30/* 0 */ && c <= 0x39/* 9 */) return c - 0x30\n const lc = c | 0x20\n // Double-quoted scalar ranges are validated by parser.ts before cooking.\n return lc - 0x61 + 10\n}\n\nfunction escapedHexLen (c: number) {\n if (c === 0x78/* x */) return 2\n if (c === 0x75/* u */) return 4\n // Double-quoted scalar ranges are validated by parser.ts before cooking.\n return 8\n}\n\n// --- line folding helpers ---\n\n// Skip a run of line breaks plus the leading whitespace of the following\n// lines, returning the number of line breaks consumed and the new position.\nfunction skipFoldedBreaks (input: string, position: number, end: number) {\n let breaks = 0\n\n while (position < end) {\n const ch = input.charCodeAt(position)\n\n if (ch === 0x0A/* LF */) {\n breaks++\n position++\n } else if (ch === 0x0D/* CR */) {\n breaks++\n position++\n if (input.charCodeAt(position) === 0x0A/* LF */) position++\n } else if (ch === 0x20/* Space */ || ch === 0x09/* Tab */) {\n position++\n } else {\n break\n }\n }\n\n return { position, breaks }\n}\n\n// Folding of line breaks between content chunks: a single break becomes a\n// space, several breaks become (count - 1) newlines.\nfunction foldedBreaks (count: number) {\n if (count === 1) return ' '\n // Called only after skipFoldedBreaks() consumed at least one line break.\n return '\\n'.repeat(count - 1)\n}\n\n// --- per-style extractors ---\n\nfunction getPlainValue (input: string, start: number, end: number) {\n let result = ''\n let position = start\n let captureStart = start\n let captureEnd = start\n\n while (position < end) {\n const ch = input.charCodeAt(position)\n\n if (ch === 0x0A/* LF */ || ch === 0x0D/* CR */) {\n result += input.slice(captureStart, captureEnd)\n const fold = skipFoldedBreaks(input, position, end)\n result += foldedBreaks(fold.breaks)\n position = captureStart = captureEnd = fold.position\n } else {\n position++\n if (ch !== 0x20/* Space */ && ch !== 0x09/* Tab */) captureEnd = position\n }\n }\n\n return result + input.slice(captureStart, captureEnd)\n}\n\nfunction getSingleQuotedValue (input: string, start: number, end: number) {\n let result = ''\n let position = start\n let captureStart = start\n let captureEnd = start\n\n while (position < end) {\n const ch = input.charCodeAt(position)\n\n if (ch === 0x27/* ' */) {\n // Within the stored range every quote is part of an escaped '' pair.\n result += input.slice(captureStart, position) + \"'\"\n position += 2\n captureStart = captureEnd = position\n } else if (ch === 0x0A/* LF */ || ch === 0x0D/* CR */) {\n result += input.slice(captureStart, captureEnd)\n const fold = skipFoldedBreaks(input, position, end)\n result += foldedBreaks(fold.breaks)\n position = captureStart = captureEnd = fold.position\n } else {\n position++\n if (ch !== 0x20/* Space */ && ch !== 0x09/* Tab */) captureEnd = position\n }\n }\n\n // Whitespace right before the closing quote is significant (it is only\n // stripped when followed by a line break).\n return result + input.slice(captureStart, end)\n}\n\nfunction getDoubleQuotedValue (input: string, start: number, end: number) {\n let result = ''\n let position = start\n let captureStart = start\n let captureEnd = start\n\n while (position < end) {\n const ch = input.charCodeAt(position)\n\n if (ch === 0x5C/* \\ */) {\n result += input.slice(captureStart, position)\n position++\n const escaped = input.charCodeAt(position)\n\n if (escaped === 0x0A/* LF */ || escaped === 0x0D/* CR */) {\n // Escaped line break: a line continuation that joins with nothing.\n position = skipFoldedBreaks(input, position, end).position\n } else if (escaped < 256 && simpleEscapeCheck[escaped]) {\n result += simpleEscapeMap[escaped]\n position++\n } else {\n // parser.ts has already rejected unknown escapes and invalid hex digits.\n let hexLength = escapedHexLen(escaped)\n let hexResult = 0\n\n for (; hexLength > 0; hexLength--) {\n position++\n const digit = fromHexCode(input.charCodeAt(position))\n hexResult = (hexResult << 4) + digit\n }\n\n result += charFromCodepoint(hexResult)\n position++\n }\n\n captureStart = captureEnd = position\n } else if (ch === 0x0A/* LF */ || ch === 0x0D/* CR */) {\n result += input.slice(captureStart, captureEnd)\n const fold = skipFoldedBreaks(input, position, end)\n result += foldedBreaks(fold.breaks)\n position = captureStart = captureEnd = fold.position\n } else {\n position++\n if (ch !== 0x20/* Space */ && ch !== 0x09/* Tab */) captureEnd = position\n }\n }\n\n return result + input.slice(captureStart, end)\n}\n\nfunction getBlockValue (\n input: string,\n start: number,\n end: number,\n indent: number,\n chomping: number,\n folded: boolean\n) {\n const textIndent = indent < 0 ? 0 : indent\n // The range starts at column 0 of the first line and includes every line\n // break, including those of trailing blank lines.\n const region = input.slice(start, end).replace(/\\r\\n?/g, '\\n')\n // An empty range is a block with no lines at all (e.g. an empty `|+`) and\n // must stay empty; a naive split would invent a phantom blank line. Otherwise\n // a trailing line break leaves a trailing '' from split() that is not a real\n // line (just the terminator of the last one), so drop it. Interior blank\n // lines are kept.\n const lines = region === ''\n ? []\n : (region.endsWith('\\n') ? region.slice(0, -1) : region).split('\\n')\n\n let result = ''\n let didReadContent = false\n let emptyLines = 0\n let atMoreIndented = false\n\n for (const line of lines) {\n // Whitespace beyond the content indentation is part of the content, so the\n // indentation scan stops at textIndent. A line is empty only when nothing\n // remains after the (capped) indentation.\n // indent < 0 means no content line was detected (a wholly blank block), so\n // every line is an empty line.\n let column = 0\n while (column < textIndent && line.charCodeAt(column) === 0x20/* Space */) column++\n\n if (indent < 0 || column >= line.length) {\n emptyLines++\n continue\n }\n\n const content = line.slice(textIndent)\n const first = content.charCodeAt(0)\n\n if (folded) {\n if (first === 0x20/* Space */ || first === 0x09/* Tab */) {\n // More-indented lines are not folded.\n atMoreIndented = true\n result += '\\n'.repeat(didReadContent ? 1 + emptyLines : emptyLines)\n } else if (atMoreIndented) {\n atMoreIndented = false\n result += '\\n'.repeat(emptyLines + 1)\n } else if (emptyLines === 0) {\n if (didReadContent) result += ' '\n } else {\n result += '\\n'.repeat(emptyLines)\n }\n } else {\n result += '\\n'.repeat(didReadContent ? 1 + emptyLines : emptyLines)\n }\n\n result += content\n didReadContent = true\n emptyLines = 0\n }\n\n if (chomping === CHOMPING_MODE.KEEP) {\n result += '\\n'.repeat(didReadContent ? 1 + emptyLines : emptyLines)\n } else if (chomping !== CHOMPING_MODE.STRIP) {\n if (didReadContent) result += '\\n'\n }\n\n return result\n}\n\n/**\n * Decodes the scalar referenced by event offsets in `input`.\n *\n * @category Events\n */\nfunction getScalarValue (input: string, scalar: ScalarEvent): string {\n if (scalar.valueStart === NO_RANGE) return ''\n\n const { valueStart, valueEnd } = scalar\n\n // Fast path: the parser marked this scalar as a verbatim slice of the input\n // (single-line plain / quoted with no escapes or folded breaks), so the\n // per-style char loop below would just reproduce the slice.\n if (scalar.fast) return input.slice(valueStart, valueEnd)\n\n switch (scalar.style) {\n case SCALAR_STYLE.SINGLE_QUOTED:\n return getSingleQuotedValue(input, valueStart, valueEnd)\n case SCALAR_STYLE.DOUBLE_QUOTED:\n return getDoubleQuotedValue(input, valueStart, valueEnd)\n case SCALAR_STYLE.LITERAL_BLOCK:\n return getBlockValue(input, valueStart, valueEnd, scalar.indent, scalar.chomping, false)\n case SCALAR_STYLE.FOLDED_BLOCK:\n return getBlockValue(input, valueStart, valueEnd, scalar.indent, scalar.chomping, true)\n default:\n return getPlainValue(input, valueStart, valueEnd)\n }\n}\n\nexport {\n getScalarValue\n}\n","const DEFAULT_TAG_HANDLERS: Readonly> = Object.assign(\n Object.create(null),\n {\n '!': '!',\n '!!': 'tag:yaml.org,2002:'\n }\n)\n\nfunction tagPercentEncode (source: string) {\n return encodeURI(source).replace(/!/g, '%21')\n}\n\nfunction tagNameFull (rawTag: string, tagHandlers?: Readonly>) {\n if (rawTag.startsWith('!<') && rawTag.endsWith('>')) {\n return decodeURIComponent(rawTag.slice(2, -1))\n }\n\n const handleEnd = rawTag.indexOf('!', 1)\n const handle = handleEnd === -1 ? '!' : rawTag.slice(0, handleEnd + 1)\n const prefix = tagHandlers?.[handle] ?? DEFAULT_TAG_HANDLERS[handle] ?? handle\n\n return decodeURIComponent(prefix) + decodeURIComponent(rawTag.slice(handle.length))\n}\n\nfunction tagNameShort (fullTag: string) {\n let tag = fullTag\n\n if (tag.charCodeAt(0) === 0x21) {\n tag = tag.slice(1)\n return `!${tagPercentEncode(tag)}`\n }\n\n if (tag.slice(0, 18) === 'tag:yaml.org,2002:') {\n return `!!${tagPercentEncode(tag.slice(18))}`\n }\n\n return `!<${tagPercentEncode(tag)}>`\n}\n\nexport {\n tagNameFull,\n tagNameShort\n}\n","import {\n EVENT_ID,\n SCALAR_STYLE,\n type Event,\n type TagHandlers,\n type MappingEvent,\n type ScalarEvent,\n type SequenceEvent\n} from './events.ts'\nimport { getScalarValue } from './parser_scalar.ts'\nimport { CORE_SCHEMA, type Schema } from '../schema.ts'\nimport {\n NOT_RESOLVED,\n type MappingTagDefinition,\n type ScalarTagDefinition,\n type SequenceTagDefinition\n} from '../tag.ts'\nimport { YAMLException } from '../common/exception.ts'\nimport { tagNameFull } from '../common/tagname.ts'\n\nconst NO_RANGE = -1\n\nconst MERGE_TAG_NAME = 'tag:yaml.org,2002:merge'\n\ninterface DocumentFrame {\n kind: 'document'\n position: number\n value: unknown\n hasValue: boolean\n}\n\ninterface SequenceFrame {\n kind: 'sequence'\n position: number\n value: any\n tag: SequenceTagDefinition\n anchor: Anchor | null\n index: number\n}\n\ninterface MappingFrame {\n kind: 'mapping'\n position: number\n value: any\n tag: MappingTagDefinition\n anchor: Anchor | null\n key: unknown\n keyPosition: number\n hasKey: boolean\n // The key slot drops its tag, but `<<` is recognized by tag, not by value.\n keyIsMerge: boolean\n // Keys brought in by a merge that an explicit pair is still allowed to\n // override. Lazily allocated: stays null for mappings without `<<`.\n overridable: Set | null\n}\n\ntype Frame = DocumentFrame | SequenceFrame | MappingFrame\n\ntype AnyTag = ScalarTagDefinition | SequenceTagDefinition | MappingTagDefinition\n\ninterface ValueAndTag {\n value: unknown\n tag: AnyTag\n}\n\ninterface Anchor {\n value: unknown\n tag: AnyTag\n isValueFinal: boolean\n}\n\n/** @category Events */\ninterface ConstructorOptions {\n /** Source text referenced by offsets in `events`. */\n source: string\n filename?: string\n\n /**\n * Schema to use.\n *\n * @defaultValue {@link CORE_SCHEMA}\n */\n schema?: Schema\n\n /**\n * Enables compatibility with `JSON.parse` behavior. Duplicate keys in a\n * mapping override values instead of throwing an error.\n *\n * @defaultValue `false`\n */\n json?: boolean\n\n /**\n * Maximum total number of keys processed by merge (`<<`) across one load\n * call. Each member of a merge sequence also counts as one key. Set to `-1`\n * to disable the limit.\n *\n * @defaultValue `10000`\n */\n maxTotalMergeKeys?: number\n\n /**\n * Maximum number of alias nodes (`*ref`) per document. Set to `0` to reject\n * all aliases, or to `-1` for no limit.\n *\n * @defaultValue `-1`\n */\n maxAliases?: number\n}\n\n// `source` is input data, not config — so it has no default here.\nconst DEFAULT_CONSTRUCTOR_OPTIONS: Required> = {\n filename: '',\n schema: CORE_SCHEMA,\n json: false,\n maxTotalMergeKeys: 10000,\n maxAliases: -1\n}\n\ninterface ConstructorState extends Required {\n events: Event[]\n documents: unknown[]\n eventIndex: number\n position: number\n frames: Frame[]\n anchors: Map\n // Mapping tag each sequence element was built with, keyed by the element\n // itself. Needed by `<<` merge, which sees only the finished element values.\n nodeTags: Map>\n tagHandlers: TagHandlers\n totalMergeKeys: number\n aliasCount: number\n}\n\nfunction eventPosition (event: Event) {\n if ('tagStart' in event && event.tagStart !== NO_RANGE) return event.tagStart\n if ('anchorStart' in event && event.anchorStart !== NO_RANGE) return event.anchorStart\n if ('valueStart' in event && event.valueStart !== NO_RANGE) return event.valueStart\n if ('start' in event) return event.start\n return 0\n}\n\nfunction throwError (state: ConstructorState, message: string): never {\n YAMLException.throwAt(state.source, state.position, message, state.filename)\n}\n\nfunction finalizeCollection (\n state: ConstructorState,\n position: number,\n tag: SequenceTagDefinition | MappingTagDefinition,\n carrier: unknown\n) {\n try {\n return tag.finalize(carrier)\n } catch (error) {\n if (error instanceof YAMLException) throw error\n YAMLException.throwAt(\n state.source,\n position,\n error instanceof Error ? error.message : String(error),\n state.filename\n )\n }\n}\n\nfunction constructScalar (\n state: ConstructorState,\n event: ScalarEvent\n): ValueAndTag {\n const source = getScalarValue(state.source, event)\n const rawTag = event.tagStart === NO_RANGE\n ? ''\n : state.source.slice(event.tagStart, event.tagEnd)\n const strTag = state.schema.defaultScalarTag\n\n if (rawTag !== '') {\n if (rawTag === '!') return { value: source, tag: strTag }\n\n const tagName = tagNameFull(rawTag, state.tagHandlers)\n const scalarTag = state.schema.lookupScalarTag(tagName)\n\n if (scalarTag) {\n const result = scalarTag.resolve(source, true, tagName)\n\n if (result === NOT_RESOLVED) {\n throwError(state, `cannot resolve a node with !<${tagName}> explicit tag`)\n }\n\n return { value: result, tag: scalarTag }\n }\n\n // An empty node carrying a collection tag (e.g. `!!map`, `!!seq`) is emitted\n // by the parser as a scalar event, since there is no collection syntax to key\n // off. Resolve it here by the explicit tag's kind into an empty collection.\n const collectionTagDef =\n state.schema.lookupMappingTag(tagName) ??\n state.schema.lookupSequenceTag(tagName)\n\n if (collectionTagDef) {\n if (source !== '') {\n throwError(state, `cannot resolve a node with !<${tagName}> explicit tag`)\n }\n\n const carrier = collectionTagDef.create(tagName)\n const value = collectionTagDef.carrierIsResult\n ? carrier\n : finalizeCollection(state, state.position, collectionTagDef, carrier)\n return { value, tag: collectionTagDef }\n }\n\n throwError(state, `unknown scalar tag !<${tagName}>`)\n }\n\n if (event.style === SCALAR_STYLE.PLAIN) {\n return state.schema.resolveImplicitScalarTag(source)\n }\n\n return { value: strTag.resolve(source, false, strTag.tagName), tag: strTag }\n}\n\nfunction collectionTagName (\n state: ConstructorState,\n event: SequenceEvent | MappingEvent,\n defaultTagName: string\n) {\n const rawTag = event.tagStart === NO_RANGE\n ? ''\n : state.source.slice(event.tagStart, event.tagEnd)\n const tagName = rawTag === '' || rawTag === '!'\n ? defaultTagName\n : tagNameFull(rawTag, state.tagHandlers)\n\n return tagName\n}\n\n// A merge source must be a mapping; every mapping tag exposes the read side.\nfunction isMappingTag (tag: AnyTag): tag is MappingTagDefinition {\n return tag.nodeKind === 'mapping'\n}\n\nfunction chargeMergeWork (state: ConstructorState) {\n state.totalMergeKeys++\n\n if (state.maxTotalMergeKeys !== -1 && state.totalMergeKeys > state.maxTotalMergeKeys) {\n throwError(state, `merge keys exceeded maxTotalMergeKeys (${state.maxTotalMergeKeys})`)\n }\n}\n\n// Fold the keys of one mapping source into the target frame, honoring merge\n// precedence: an already-present key (explicit or from an earlier source) wins.\nfunction mergeKeys (state: ConstructorState, frame: MappingFrame, source: unknown, sourceTag: MappingTagDefinition) {\n // Count the source mapping itself to bound sequences of empty mappings.\n chargeMergeWork(state)\n\n for (const sourceKey of sourceTag.keys(source)) {\n chargeMergeWork(state)\n\n if (frame.tag.has(frame.value, sourceKey)) continue\n\n const err = frame.tag.addPair(frame.value, sourceKey, sourceTag.get(source, sourceKey))\n if (err) throwError(state, err)\n\n frame.overridable ??= new Set()\n frame.overridable.add(sourceKey)\n }\n}\n\n// The value of a `<<` key: either a mapping (fold its keys) or a sequence of\n// mappings (fold each). Sequence elements arrive as bare values, so the tag each\n// was built with comes from `nodeTags`; a miss means it is not a mapping (a\n// scalar, a nested sequence, or a value some sequence tag synthesized itself).\nfunction mergeSource (state: ConstructorState, frame: MappingFrame, source: unknown, sourceTag: AnyTag) {\n state.position = frame.keyPosition\n\n if (isMappingTag(sourceTag)) {\n mergeKeys(state, frame, source, sourceTag)\n } else if (sourceTag.nodeKind === 'sequence' && Array.isArray(source)) {\n // The current merge budget is sufficient; this hard cap only further limits\n // the attack vector, so there is no reason to expose it as a public option.\n if (source.length > 100) {\n throwError(state, 'abnormal merge sequence size')\n }\n\n for (const element of source) {\n const elementTag = state.nodeTags.get(element)\n if (!elementTag) {\n throwError(state, 'cannot merge mappings; the provided source object is unacceptable')\n }\n mergeKeys(state, frame, element, elementTag)\n }\n } else {\n throwError(state, 'cannot merge mappings; the provided source object is unacceptable')\n }\n}\n\nfunction addMappingValue (state: ConstructorState, frame: MappingFrame, key: unknown, value: unknown, tag: AnyTag) {\n state.position = frame.keyPosition\n\n // `<<` is intercepted before dedup, so a repeated merge key is allowed.\n if (frame.keyIsMerge) {\n mergeSource(state, frame, value, tag)\n return\n }\n\n if (!state.json && frame.tag.has(frame.value, key) && !frame.overridable?.has(key)) {\n throwError(state, 'duplicated mapping key')\n }\n\n const err = frame.tag.addPair(frame.value, key, value)\n if (err) throwError(state, err)\n frame.overridable?.delete(key)\n}\n\nfunction addValue (state: ConstructorState, value: unknown, tag: AnyTag) {\n const frame = state.frames[state.frames.length - 1]!\n\n if (frame.kind === 'document') {\n frame.value = value\n frame.hasValue = true\n } else if (frame.kind === 'sequence') {\n // Any element may later be folded in by a `<<` merge, which by then has no\n // way to tell what built it.\n if (isMappingTag(tag)) state.nodeTags.set(value, tag)\n const err = frame.tag.addItem(frame.value, value, frame.index++)\n if (err) throwError(state, err)\n } else if (frame.hasKey) {\n const key = frame.key\n frame.key = undefined\n frame.hasKey = false\n addMappingValue(state, frame, key, value, tag)\n } else {\n frame.key = value\n frame.keyPosition = state.position\n frame.hasKey = true\n frame.keyIsMerge = tag.tagName === MERGE_TAG_NAME\n }\n}\n\nfunction storeAnchor (\n state: ConstructorState,\n event: ScalarEvent | SequenceEvent | MappingEvent,\n value: unknown,\n tag: AnyTag,\n isValueFinal: boolean\n): Anchor | null {\n if (event.anchorStart !== NO_RANGE) {\n const anchor = {\n value,\n tag,\n isValueFinal\n }\n state.anchors.set(state.source.slice(event.anchorStart, event.anchorEnd), anchor)\n return anchor\n }\n\n return null\n}\n\n/**\n * Constructs JavaScript documents directly from parser events, without an\n * intermediate AST.\n *\n * @category Events\n */\nfunction constructFromEvents (events: Event[], options: ConstructorOptions): unknown[] {\n const state: ConstructorState = {\n ...DEFAULT_CONSTRUCTOR_OPTIONS,\n ...options,\n events,\n documents: [],\n eventIndex: 0,\n position: 0,\n frames: [],\n anchors: new Map(),\n nodeTags: new Map(),\n tagHandlers: Object.create(null),\n totalMergeKeys: 0,\n aliasCount: 0\n }\n\n while (state.eventIndex < state.events.length) {\n const event = state.events[state.eventIndex++]\n state.position = eventPosition(event)\n\n switch (event.type) {\n case EVENT_ID.DOCUMENT:\n state.anchors = new Map()\n state.nodeTags = new Map()\n state.aliasCount = 0\n state.tagHandlers = Object.create(null)\n for (const directive of event.directives) {\n if (directive.kind === 'tag') state.tagHandlers[directive.handle] = directive.prefix\n }\n state.frames.push({ kind: 'document', position: state.position, value: undefined, hasValue: false })\n break\n\n case EVENT_ID.SCALAR: {\n const { value, tag } = constructScalar(state, event)\n storeAnchor(state, event, value, tag, true)\n addValue(state, value, tag)\n break\n }\n\n case EVENT_ID.SEQUENCE: {\n const tagName = collectionTagName(state, event, 'tag:yaml.org,2002:seq')\n const tag = state.schema.lookupSequenceTag(tagName)\n if (!tag) throwError(state, `unknown sequence tag !<${tagName}>`)\n\n const value = tag.create(tagName)\n const anchor = storeAnchor(state, event, value, tag, tag.carrierIsResult)\n\n state.frames.push({\n kind: 'sequence', position: state.position, value, tag, anchor, index: 0\n })\n break\n }\n\n case EVENT_ID.MAPPING: {\n const tagName = collectionTagName(state, event, 'tag:yaml.org,2002:map')\n const tag = state.schema.lookupMappingTag(tagName)\n if (!tag) throwError(state, `unknown mapping tag !<${tagName}>`)\n\n const value = tag.create(tagName)\n const anchor = storeAnchor(state, event, value, tag, tag.carrierIsResult)\n state.frames.push({\n kind: 'mapping',\n position: state.position,\n value,\n tag,\n anchor,\n key: undefined,\n keyPosition: state.position,\n hasKey: false,\n keyIsMerge: false,\n overridable: null\n })\n break\n }\n\n case EVENT_ID.ALIAS: {\n if (state.maxAliases !== -1 && ++state.aliasCount > state.maxAliases) {\n throwError(state, `aliases exceeded maxAliases (${state.maxAliases})`)\n }\n\n const name = state.source.slice(event.anchorStart, event.anchorEnd)\n const anchor = state.anchors.get(name)\n if (!anchor) {\n throwError(state, `unidentified alias \"${name}\"`)\n }\n if (!anchor.isValueFinal) {\n throwError(state, `recursive alias \"${name}\" is not supported for tag ${anchor.tag.tagName} because it uses finalize()`)\n }\n addValue(state, anchor.value, anchor.tag)\n break\n }\n\n case EVENT_ID.POP: {\n const frame = state.frames.pop()!\n\n if (frame.kind === 'mapping' && frame.hasKey) {\n state.position = frame.keyPosition\n throwError(state, 'incomplete mapping pair in event stream')\n }\n\n if (frame.kind === 'document') {\n state.documents.push(frame.value)\n } else {\n const value = frame.tag.carrierIsResult\n ? frame.value\n : finalizeCollection(state, frame.position, frame.tag, frame.value)\n if (frame.anchor) {\n frame.anchor.value = value\n frame.anchor.isValueFinal = true\n }\n addValue(state, value, frame.tag)\n }\n break\n }\n }\n }\n\n return state.documents\n}\n\nexport {\n constructFromEvents,\n DEFAULT_CONSTRUCTOR_OPTIONS,\n type ConstructorOptions\n}\n","import {\n EVENT_ID,\n SCALAR_STYLE,\n COLLECTION_STYLE,\n CHOMPING_MODE,\n type Event,\n type ScalarStyle,\n type CollectionStyle,\n type ChompingMode,\n type DocumentDirective,\n type TagHandlers\n} from './events.ts'\nimport { YAMLException } from '../common/exception.ts'\n\nconst NO_RANGE = -1\nconst HAS_OWN = Object.prototype.hasOwnProperty\n\nconst CONTEXT_FLOW_IN = 1\nconst CONTEXT_FLOW_OUT = 2\nconst CONTEXT_BLOCK_IN = 3\nconst CONTEXT_BLOCK_OUT = 4\n\n// eslint-disable-next-line no-control-regex\nconst PATTERN_NON_PRINTABLE = /[\\x00-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7F-\\x84\\x86-\\x9F\\uFFFE\\uFFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]/\n// eslint-disable-next-line no-useless-escape\nconst PATTERN_FLOW_INDICATORS = /[,\\[\\]{}]/\n// YAML 1.2.2, [91] c-tag-handle.\n// eslint-disable-next-line no-useless-escape\nconst PATTERN_TAG_HANDLE = /^(?:!|!!|![0-9A-Za-z-]+!)$/\n// YAML 1.2.2, [39] ns-uri-char.\n// eslint-disable-next-line no-useless-escape\nconst NS_URI_CHAR = String.raw`(?:%[0-9A-Fa-f]{2}|[0-9A-Za-z\\-#;/?:@&=+$,_.!~*'()\\[\\]])`\n// YAML 1.2.2, [40] ns-tag-char = ns-uri-char - \"!\" - c-flow-indicator.\n// eslint-disable-next-line no-useless-escape\nconst NS_TAG_CHAR = String.raw`(?:%[0-9A-Fa-f]{2}|[0-9A-Za-z\\-#;/?:@&=+$.~*'()_])`\nconst PATTERN_TAG_URI = new RegExp(`^(?:${NS_URI_CHAR})*$`)\n// YAML 1.2.2, [99] c-ns-shorthand-tag suffix part.\nconst PATTERN_TAG_SUFFIX = new RegExp(`^(?:${NS_TAG_CHAR})+$`)\n// YAML 1.2.2, [93] ns-tag-prefix.\nconst PATTERN_TAG_PREFIX = new RegExp(`^(?:!(?:${NS_URI_CHAR})*|${NS_TAG_CHAR}(?:${NS_URI_CHAR})*)$`)\n\ntype NodeContext =\n typeof CONTEXT_FLOW_IN | typeof CONTEXT_FLOW_OUT |\n typeof CONTEXT_BLOCK_IN | typeof CONTEXT_BLOCK_OUT\n\ninterface NodeProperties {\n anchorStart: number\n anchorEnd: number\n tagStart: number\n tagEnd: number\n}\n\ninterface ParserSnapshot {\n position: number\n line: number\n lineStart: number\n lineIndent: number\n firstTabInLine: number\n eventsLength: number\n}\n\n/** @category Events */\ninterface ParserOptions {\n /**\n * File path used in error messages.\n *\n * @defaultValue `null`\n */\n filename?: string\n\n /**\n * Maximum nesting depth for collections. Aliases are not taken into account.\n *\n * @defaultValue `100`\n */\n maxDepth?: number\n}\n\nconst DEFAULT_PARSER_OPTIONS: Required = {\n filename: '',\n maxDepth: 100\n}\n\ninterface ParserState extends Required {\n input: string\n length: number\n position: number\n line: number\n lineStart: number\n lineIndent: number\n firstTabInLine: number\n depth: number\n directives: DocumentDirective[]\n tagHandlers: TagHandlers\n events: Event[]\n}\n\nfunction addDocumentEvent (\n state: ParserState,\n explicitStart: boolean,\n explicitEnd: boolean\n) {\n state.events.push({\n type: EVENT_ID.DOCUMENT,\n explicitStart,\n explicitEnd,\n directives: state.directives\n })\n}\n\nfunction addSequenceEvent (\n state: ParserState,\n start: number,\n anchorStart: number,\n anchorEnd: number,\n tagStart: number,\n tagEnd: number,\n style: CollectionStyle\n) {\n state.events.push({\n type: EVENT_ID.SEQUENCE,\n start,\n anchorStart,\n anchorEnd,\n tagStart,\n tagEnd,\n style\n })\n}\n\nfunction addMappingEvent (\n state: ParserState,\n start: number,\n anchorStart: number,\n anchorEnd: number,\n tagStart: number,\n tagEnd: number,\n style: CollectionStyle\n) {\n state.events.push({\n type: EVENT_ID.MAPPING,\n start,\n anchorStart,\n anchorEnd,\n tagStart,\n tagEnd,\n style\n })\n}\n\nfunction insertFlowPairMappingEvent (state: ParserState, snapshot: ParserSnapshot) {\n state.events.splice(snapshot.eventsLength, 0, {\n type: EVENT_ID.MAPPING,\n start: snapshot.position,\n anchorStart: NO_RANGE,\n anchorEnd: NO_RANGE,\n tagStart: NO_RANGE,\n tagEnd: NO_RANGE,\n style: COLLECTION_STYLE.FLOW\n })\n}\n\nfunction addScalarEvent (\n state: ParserState,\n valueStart: number,\n valueEnd: number,\n anchorStart: number,\n anchorEnd: number,\n tagStart: number,\n tagEnd: number,\n style: ScalarStyle,\n chomping: ChompingMode = CHOMPING_MODE.CLIP,\n indent = -1,\n fast = false\n) {\n state.events.push({\n type: EVENT_ID.SCALAR,\n valueStart,\n valueEnd,\n anchorStart,\n anchorEnd,\n tagStart,\n tagEnd,\n style,\n chomping,\n indent,\n fast\n })\n}\n\nfunction addAliasEvent (\n state: ParserState,\n anchorStart: number,\n anchorEnd: number\n) {\n state.events.push({\n type: EVENT_ID.ALIAS,\n anchorStart,\n anchorEnd\n })\n}\n\nfunction addPopEvent (state: ParserState) {\n state.events.push({ type: EVENT_ID.POP })\n}\n\nfunction addEmptyScalarEvent (state: ParserState) {\n addScalarEvent(\n state,\n NO_RANGE,\n NO_RANGE,\n NO_RANGE,\n NO_RANGE,\n NO_RANGE,\n NO_RANGE,\n SCALAR_STYLE.PLAIN\n )\n}\n\nfunction emptyProperties (): NodeProperties {\n return {\n anchorStart: NO_RANGE,\n anchorEnd: NO_RANGE,\n tagStart: NO_RANGE,\n tagEnd: NO_RANGE\n }\n}\n\nfunction snapshotState (state: ParserState): ParserSnapshot {\n return {\n position: state.position,\n line: state.line,\n lineStart: state.lineStart,\n lineIndent: state.lineIndent,\n firstTabInLine: state.firstTabInLine,\n eventsLength: state.events.length\n }\n}\n\nfunction restoreState (state: ParserState, snapshot: ParserSnapshot) {\n state.position = snapshot.position\n state.line = snapshot.line\n state.lineStart = snapshot.lineStart\n state.lineIndent = snapshot.lineIndent\n state.firstTabInLine = snapshot.firstTabInLine\n state.events.length = snapshot.eventsLength\n}\n\nfunction throwError (state: ParserState, message: string): never {\n YAMLException.throwAt(state.input.slice(0, state.length), state.position, message, state.filename)\n}\n\nfunction isEol (c: number) {\n return c === 0x0A/* LF */ || c === 0x0D/* CR */\n}\n\nfunction isWhiteSpace (c: number) {\n return c === 0x09/* Tab */ || c === 0x20/* Space */\n}\n\nfunction isWsOrEol (c: number) {\n return isWhiteSpace(c) || isEol(c)\n}\n\nfunction isWsOrEolOrEnd (c: number) {\n return c === 0 || isWsOrEol(c)\n}\n\nfunction isFlowIndicator (c: number) {\n return c === 0x2C/* , */ ||\n c === 0x5B/* [ */ ||\n c === 0x5D/* ] */ ||\n c === 0x7B/* { */ ||\n c === 0x7D/* } */\n}\n\nfunction fromDecimalCode (c: number) {\n return c >= 0x30/* 0 */ && c <= 0x39/* 9 */ ? c - 0x30 : -1\n}\n\nfunction fromHexCode (c: number) {\n if (c >= 0x30/* 0 */ && c <= 0x39/* 9 */) return c - 0x30\n const lc = c | 0x20\n if (lc >= 0x61/* a */ && lc <= 0x66/* f */) return lc - 0x61 + 10\n return -1\n}\n\nfunction escapedHexLen (c: number) {\n if (c === 0x78/* x */) return 2\n if (c === 0x75/* u */) return 4\n if (c === 0x55/* U */) return 8\n return 0\n}\n\nfunction isSimpleEscape (c: number) {\n return c === 0x30/* 0 */ ||\n c === 0x61/* a */ ||\n c === 0x62/* b */ ||\n c === 0x74/* t */ ||\n c === 0x09/* Tab */ ||\n c === 0x6E/* n */ ||\n c === 0x76/* v */ ||\n c === 0x66/* f */ ||\n c === 0x72/* r */ ||\n c === 0x65/* e */ ||\n c === 0x20/* Space */ ||\n c === 0x22/* \" */ ||\n c === 0x2F/* / */ ||\n c === 0x5C/* \\ */ ||\n c === 0x4E/* N */ ||\n c === 0x5F/* _ */ ||\n c === 0x4C/* L */ ||\n c === 0x50/* P */\n}\n\n// Precondition: state.position points at LF or CR.\nfunction consumeLineBreak (state: ParserState) {\n const ch = state.input.charCodeAt(state.position)\n\n if (ch === 0x0A/* LF */) {\n state.position++\n } else {\n state.position++\n if (state.input.charCodeAt(state.position) === 0x0A/* LF */) state.position++\n }\n\n state.line++\n state.lineStart = state.position\n state.lineIndent = 0\n state.firstTabInLine = -1\n}\n\nfunction skipSeparationSpace (state: ParserState, allowComments: boolean) {\n let lineBreaks = 0\n let ch = state.input.charCodeAt(state.position)\n let hasSeparation = state.position === state.lineStart ||\n isWsOrEol(state.input.charCodeAt(state.position - 1))\n\n while (ch !== 0) {\n while (isWhiteSpace(ch)) {\n hasSeparation = true\n if (ch === 0x09/* Tab */ && state.firstTabInLine === -1) {\n state.firstTabInLine = state.position\n }\n ch = state.input.charCodeAt(++state.position)\n }\n\n if (allowComments && hasSeparation && ch === 0x23/* # */) {\n do { ch = state.input.charCodeAt(++state.position) }\n while (!isEol(ch) && ch !== 0)\n }\n\n if (!isEol(ch)) break\n\n consumeLineBreak(state)\n lineBreaks++\n hasSeparation = true\n ch = state.input.charCodeAt(state.position)\n\n while (ch === 0x20/* Space */) {\n state.lineIndent++\n ch = state.input.charCodeAt(++state.position)\n }\n }\n\n return lineBreaks\n}\n\nfunction testDocumentSeparator (state: ParserState, position = state.position) {\n const ch = state.input.charCodeAt(position)\n\n if ((ch === 0x2D/* - */ || ch === 0x2E/* . */) &&\n ch === state.input.charCodeAt(position + 1) &&\n ch === state.input.charCodeAt(position + 2)) {\n const following = state.input.charCodeAt(position + 3)\n return following === 0 || isWsOrEol(following)\n }\n\n return false\n}\n\nfunction skipByteOrderMark (state: ParserState) {\n if (state.position === state.lineStart &&\n state.input.charCodeAt(state.position) === 0xFEFF) {\n state.position++\n state.lineStart = state.position\n }\n}\n\nfunction testDocumentBoundary (state: ParserState) {\n if (state.position !== state.lineStart) return false\n\n // Fast path: most document boundaries do not have a BOM.\n if (testDocumentSeparator(state)) return true\n if (state.input.charCodeAt(state.position) !== 0xFEFF) return false\n\n // BOM-prefixed boundaries are rare, so snapshot/restore overhead is negligible.\n const snapshot = snapshotState(state)\n\n skipByteOrderMark(state)\n skipSeparationSpace(state, true)\n\n const ch = state.input.charCodeAt(state.position)\n const result = state.position === state.lineStart &&\n (ch === 0x25/* % */ || (ch === 0x2D/* - */ && testDocumentSeparator(state)))\n\n restoreState(state, snapshot)\n return result\n}\n\nfunction skipUntilLineEnd (state: ParserState) {\n let ch = state.input.charCodeAt(state.position)\n\n while (ch !== 0 && !isEol(ch)) {\n ch = state.input.charCodeAt(++state.position)\n }\n}\n\nfunction checkPrintable (state: ParserState, start: number, end: number) {\n if (PATTERN_NON_PRINTABLE.test(state.input.slice(start, end))) {\n throwError(state, 'the stream contains non-printable characters')\n }\n}\n\nfunction readTagProperty (state: ParserState, props: NodeProperties, inFlow: boolean) {\n if (state.input.charCodeAt(state.position) !== 0x21/* ! */) return false\n if (props.tagStart !== NO_RANGE) throwError(state, 'duplication of a tag property')\n\n const start = state.position\n let isVerbatim = false\n let isNamed = false\n let tagHandle = '!'\n let ch = state.input.charCodeAt(++state.position)\n\n if (ch === 0x3C/* < */) {\n isVerbatim = true\n ch = state.input.charCodeAt(++state.position)\n } else if (ch === 0x21/* ! */) {\n isNamed = true\n tagHandle = '!!'\n ch = state.input.charCodeAt(++state.position)\n }\n\n let suffixStart = state.position\n let tagName\n\n if (isVerbatim) {\n while (ch !== 0 && ch !== 0x3E/* > */) ch = state.input.charCodeAt(++state.position)\n if (ch !== 0x3E/* > */) throwError(state, 'unexpected end of the stream within a verbatim tag')\n tagName = state.input.slice(suffixStart, state.position)\n state.position++\n } else {\n while (ch !== 0 && !isWsOrEol(ch) && !(inFlow && isFlowIndicator(ch))) {\n if (ch === 0x21/* ! */) {\n if (!isNamed) {\n tagHandle = state.input.slice(suffixStart - 1, state.position + 1)\n if (!PATTERN_TAG_HANDLE.test(tagHandle)) throwError(state, 'named tag handle cannot contain such characters')\n isNamed = true\n suffixStart = state.position + 1\n } else {\n throwError(state, 'tag suffix cannot contain exclamation marks')\n }\n }\n\n ch = state.input.charCodeAt(++state.position)\n }\n\n tagName = state.input.slice(suffixStart, state.position)\n if (PATTERN_FLOW_INDICATORS.test(tagName)) throwError(state, 'tag suffix cannot contain flow indicator characters')\n }\n\n if (tagName && !(isVerbatim ? PATTERN_TAG_URI.test(tagName) : PATTERN_TAG_SUFFIX.test(tagName))) {\n throwError(state, `tag name cannot contain such characters: ${tagName}`)\n }\n try {\n decodeURIComponent(tagName)\n } catch {\n throwError(state, `tag name is malformed: ${tagName}`)\n }\n\n if (!isVerbatim && tagHandle !== '!' && tagHandle !== '!!' && !HAS_OWN.call(state.tagHandlers, tagHandle)) {\n throwError(state, `undeclared tag handle \"${tagHandle}\"`)\n }\n\n props.tagStart = start\n props.tagEnd = state.position\n return true\n}\n\nfunction readAnchorProperty (state: ParserState, props: NodeProperties) {\n if (state.input.charCodeAt(state.position) !== 0x26/* & */) return false\n if (props.anchorStart !== NO_RANGE) throwError(state, 'duplication of an anchor property')\n\n state.position++\n const start = state.position\n\n while (state.input.charCodeAt(state.position) !== 0 && !isWsOrEol(state.input.charCodeAt(state.position)) && !isFlowIndicator(state.input.charCodeAt(state.position))) {\n state.position++\n }\n\n if (state.position === start) throwError(state, 'name of an anchor node must contain at least one character')\n\n props.anchorStart = start\n props.anchorEnd = state.position\n return true\n}\n\nfunction readAlias (state: ParserState, props: NodeProperties) {\n if (state.input.charCodeAt(state.position) !== 0x2A/* * */) return false\n if (props.anchorStart !== NO_RANGE || props.tagStart !== NO_RANGE) {\n throwError(state, 'alias node should not have any properties')\n }\n\n state.position++\n const start = state.position\n\n while (state.input.charCodeAt(state.position) !== 0 && !isWsOrEol(state.input.charCodeAt(state.position)) && !isFlowIndicator(state.input.charCodeAt(state.position))) {\n state.position++\n }\n\n if (state.position === start) throwError(state, 'name of an alias node must contain at least one character')\n\n addAliasEvent(state, start, state.position)\n return true\n}\n\nfunction readFlowScalarBreak (state: ParserState, nodeIndent: number) {\n skipSeparationSpace(state, false)\n\n if (state.lineIndent < nodeIndent) {\n throwError(state, 'deficient indentation')\n }\n}\n\nfunction readSingleQuotedScalar (state: ParserState, nodeIndent: number, props: NodeProperties) {\n if (state.input.charCodeAt(state.position) !== 0x27/* ' */) return false\n\n state.position++\n const start = state.position\n // A single-quoted scalar is sliceable verbatim when it has no '' escape pairs\n // and no folded line breaks (see getScalarValue fast path).\n let simple = true\n\n while (state.input.charCodeAt(state.position) !== 0) {\n const ch = state.input.charCodeAt(state.position)\n\n if (ch === 0x27/* ' */) {\n if (state.input.charCodeAt(state.position + 1) === 0x27/* ' */) {\n simple = false\n state.position += 2\n continue\n }\n\n const end = state.position\n state.position++\n addScalarEvent(state, start, end, props.anchorStart, props.anchorEnd, props.tagStart, props.tagEnd, SCALAR_STYLE.SINGLE_QUOTED, CHOMPING_MODE.CLIP, -1, simple)\n return true\n }\n\n if (isEol(ch)) {\n simple = false\n readFlowScalarBreak(state, nodeIndent)\n } else if (state.position === state.lineStart && testDocumentSeparator(state)) {\n throwError(state, 'unexpected end of the document within a single quoted scalar')\n } else if (ch !== 0x09/* Tab */ && ch < 0x20) {\n throwError(state, 'expected valid JSON character')\n } else {\n state.position++\n }\n }\n\n throwError(state, 'unexpected end of the stream within a single quoted scalar')\n}\n\nfunction readDoubleQuotedScalar (state: ParserState, nodeIndent: number, props: NodeProperties) {\n if (state.input.charCodeAt(state.position) !== 0x22/* \" */) return false\n\n state.position++\n const start = state.position\n // A double-quoted scalar is sliceable verbatim when it has no \\ escapes and\n // no folded line breaks (see getScalarValue fast path).\n let simple = true\n\n while (state.input.charCodeAt(state.position) !== 0) {\n const ch = state.input.charCodeAt(state.position)\n\n if (ch === 0x22/* \" */) {\n const end = state.position\n state.position++\n addScalarEvent(state, start, end, props.anchorStart, props.anchorEnd, props.tagStart, props.tagEnd, SCALAR_STYLE.DOUBLE_QUOTED, CHOMPING_MODE.CLIP, -1, simple)\n return true\n }\n\n if (ch === 0x5C/* \\ */) {\n simple = false\n const escaped = state.input.charCodeAt(++state.position)\n\n if (isEol(escaped)) {\n readFlowScalarBreak(state, nodeIndent)\n } else if (isSimpleEscape(escaped)) {\n state.position++\n } else {\n let hexLength = escapedHexLen(escaped)\n\n if (hexLength === 0) throwError(state, 'unknown escape sequence')\n\n while (hexLength-- > 0) {\n state.position++\n if (fromHexCode(state.input.charCodeAt(state.position)) < 0) {\n throwError(state, 'expected hexadecimal character')\n }\n }\n state.position++\n }\n } else if (isEol(ch)) {\n simple = false\n readFlowScalarBreak(state, nodeIndent)\n } else if (state.position === state.lineStart && testDocumentSeparator(state)) {\n throwError(state, 'unexpected end of the document within a double quoted scalar')\n } else if (ch !== 0x09/* Tab */ && ch < 0x20) {\n throwError(state, 'expected valid JSON character')\n } else {\n state.position++\n }\n }\n\n throwError(state, 'unexpected end of the stream within a double quoted scalar')\n}\n\nfunction readBlockScalar (state: ParserState, parentIndent: number, props: NodeProperties) {\n const ch = state.input.charCodeAt(state.position)\n let chomping: ChompingMode = CHOMPING_MODE.CLIP\n let indent = -1\n let detectedIndent = false\n\n if (ch !== 0x7C/* | */ && ch !== 0x3E/* > */) return false\n\n const style = ch === 0x7C/* | */ ? SCALAR_STYLE.LITERAL_BLOCK : SCALAR_STYLE.FOLDED_BLOCK\n state.position++\n\n while (state.input.charCodeAt(state.position) !== 0) {\n const current = state.input.charCodeAt(state.position)\n const digit = fromDecimalCode(current)\n\n if (current === 0x2B/* + */ || current === 0x2D/* - */) {\n if (chomping !== CHOMPING_MODE.CLIP) throwError(state, 'repeat of a chomping mode identifier')\n chomping = current === 0x2B/* + */ ? CHOMPING_MODE.KEEP : CHOMPING_MODE.STRIP\n state.position++\n } else if (digit >= 0) {\n if (digit === 0) {\n throwError(state, 'bad explicit indentation width of a block scalar; it cannot be less than one')\n }\n if (detectedIndent) throwError(state, 'repeat of an indentation width identifier')\n indent = parentIndent + digit - 1\n detectedIndent = true\n state.position++\n } else {\n break\n }\n }\n\n let hadWhitespace = false\n while (isWhiteSpace(state.input.charCodeAt(state.position))) {\n hadWhitespace = true\n state.position++\n }\n if (hadWhitespace && state.input.charCodeAt(state.position) === 0x23/* # */) skipUntilLineEnd(state)\n\n if (isEol(state.input.charCodeAt(state.position))) {\n consumeLineBreak(state)\n } else if (state.input.charCodeAt(state.position) !== 0) {\n throwError(state, 'a line break is expected')\n }\n\n let contentIndent = detectedIndent ? indent : -1\n let maxLeadingIndent = 0\n const valueStart = state.position\n let valueEnd = state.position\n\n while (state.input.charCodeAt(state.position) !== 0) {\n const linePosition = state.position\n let column = 0\n\n while (state.input.charCodeAt(linePosition + column) === 0x20/* Space */) column++\n\n const first = state.input.charCodeAt(linePosition + column)\n if (first === 0) {\n // End of input acts as a line terminator, but there is no line break to\n // include here. A final all-spaces line still counts: when the block has a\n // content indent, the spaces beyond it are real content; in a wholly blank\n // block (contentIndent < 0) the spaces form a blank line that chomping must\n // see, exactly as it would if the line ended with a break. Capture the line\n // in both cases; otherwise the block ends at the start of this empty line.\n if (contentIndent >= 0) {\n if (column > contentIndent) valueEnd = linePosition + column\n } else if (column > 0) {\n valueEnd = linePosition + column\n }\n break\n }\n if (testDocumentBoundary(state)) break\n\n if (!detectedIndent && contentIndent === -1 && isEol(first)) {\n maxLeadingIndent = Math.max(maxLeadingIndent, column)\n }\n\n if (!detectedIndent && contentIndent === -1 && !isEol(first)) {\n if (first === 0x09/* Tab */ && column < parentIndent) {\n state.position = linePosition + column\n throwError(state, 'tab characters must not be used in indentation')\n }\n if (column < maxLeadingIndent) {\n state.position = linePosition + column\n throwError(state, 'bad indentation of a mapping entry')\n }\n }\n\n if (contentIndent === -1 && first !== 0 && !isEol(first) && column < parentIndent) {\n state.lineIndent = column\n state.position = linePosition + column\n break\n }\n\n if (!detectedIndent && first !== 0 && !isEol(first) && contentIndent === -1) {\n contentIndent = column\n }\n\n const requiredIndent = contentIndent === -1 ? parentIndent + 1 : contentIndent\n if (first !== 0 && !isEol(first) && column < requiredIndent) {\n state.lineIndent = column\n state.position = linePosition + column\n break\n }\n\n skipUntilLineEnd(state)\n valueEnd = state.position\n if (isEol(state.input.charCodeAt(state.position))) {\n consumeLineBreak(state)\n // Include the line break in the range so trailing blank lines are\n // preserved. This is what lets cook tell apart an empty `|+` (range \"\",\n // value \"\") from a `|+` with one blank line (range \"\\n\", value \"\\n\").\n // De-indent and chomping are applied later in getScalarValue.\n valueEnd = state.position\n }\n }\n\n checkPrintable(state, valueStart, valueEnd)\n addScalarEvent(\n state,\n valueStart,\n valueEnd,\n props.anchorStart,\n props.anchorEnd,\n props.tagStart,\n props.tagEnd,\n style,\n chomping,\n contentIndent\n )\n return true\n}\n\nfunction canStartPlainScalar (state: ParserState, nodeContext: NodeContext) {\n const ch = state.input.charCodeAt(state.position)\n const inFlow = nodeContext === CONTEXT_FLOW_IN\n\n if (ch === 0 ||\n isWsOrEol(ch) ||\n ch === 0x23/* # */ ||\n ch === 0x26/* & */ ||\n ch === 0x2A/* * */ ||\n ch === 0x21/* ! */ ||\n ch === 0x7C/* | */ ||\n ch === 0x3E/* > */ ||\n ch === 0x27/* ' */ ||\n ch === 0x22/* \" */ ||\n ch === 0x25/* % */ ||\n ch === 0x40/* @ */ ||\n ch === 0x60/* ` */ ||\n (inFlow && isFlowIndicator(ch))) {\n return false\n }\n\n if (ch === 0x3F/* ? */ || ch === 0x2D/* - */) {\n const following = state.input.charCodeAt(state.position + 1)\n if (isWsOrEolOrEnd(following) || (inFlow && isFlowIndicator(following))) return false\n }\n\n return true\n}\n\nfunction readPlainScalar (state: ParserState, nodeIndent: number, nodeContext: NodeContext, props: NodeProperties) {\n if (!canStartPlainScalar(state, nodeContext)) return false\n\n const start = state.position\n let end = state.position\n let ch = state.input.charCodeAt(state.position)\n const inFlow = nodeContext === CONTEXT_FLOW_IN\n // A single-line plain scalar is sliceable verbatim: the parser already trims\n // trailing whitespace from the range, so no folding is needed (see\n // getScalarValue fast path). Folded line breaks make it non-simple.\n let multiline = false\n\n while (ch !== 0) {\n if (testDocumentBoundary(state)) break\n\n if (ch === 0x3A/* : */) {\n const following = state.input.charCodeAt(state.position + 1)\n if (isWsOrEolOrEnd(following) || (inFlow && isFlowIndicator(following))) break\n } else if (ch === 0x23/* # */) {\n const preceding = state.input.charCodeAt(state.position - 1)\n if (isWsOrEol(preceding)) break\n } else if (inFlow && isFlowIndicator(ch)) {\n break\n } else if (isEol(ch)) {\n const savedPosition = state.position\n const savedLine = state.line\n const savedLineStart = state.lineStart\n const savedLineIndent = state.lineIndent\n\n skipSeparationSpace(state, false)\n\n if (state.lineIndent >= nodeIndent) {\n multiline = true\n ch = state.input.charCodeAt(state.position)\n continue\n }\n\n state.position = savedPosition\n state.line = savedLine\n state.lineStart = savedLineStart\n state.lineIndent = savedLineIndent\n break\n }\n\n if (!isWhiteSpace(ch)) end = state.position + 1\n ch = state.input.charCodeAt(++state.position)\n }\n\n if (end === start) return false\n\n checkPrintable(state, start, end)\n addScalarEvent(state, start, end, props.anchorStart, props.anchorEnd, props.tagStart, props.tagEnd, SCALAR_STYLE.PLAIN, CHOMPING_MODE.CLIP, -1, !multiline)\n return true\n}\n\nfunction findBlockMappingColon (state: ParserState) {\n let position = state.position\n let flowLevel = 0\n\n while (position < state.length) {\n const ch = state.input.charCodeAt(position)\n\n if (isEol(ch)) return -1\n if (ch === 0x23/* # */ && isWsOrEol(state.input.charCodeAt(position - 1))) return -1\n\n if ((ch === 0x2A/* * */ || ch === 0x26/* & */) && position === state.position) {\n do { position++ }\n while (state.input.charCodeAt(position) !== 0 &&\n !isWsOrEol(state.input.charCodeAt(position)) &&\n !isFlowIndicator(state.input.charCodeAt(position)))\n continue\n }\n\n if (ch === 0x5B/* [ */ || ch === 0x7B/* { */) {\n flowLevel++\n } else if (ch === 0x5D/* ] */ || ch === 0x7D/* } */) {\n if (flowLevel > 0) flowLevel--\n } else if (flowLevel === 0 && ch === 0x3A/* : */ && isWsOrEol(state.input.charCodeAt(position + 1))) {\n return position\n }\n\n if ((flowLevel > 0 || position === state.position) &&\n (ch === 0x27/* ' */ || ch === 0x22/* \" */)) {\n const quote = ch\n position++\n\n while (position < state.length && state.input.charCodeAt(position) !== quote) {\n if (state.input.charCodeAt(position) === 0x5C/* \\ */ && quote === 0x22/* \" */) position++\n position++\n }\n }\n\n position++\n }\n\n return -1\n}\n\nfunction skipFlowSeparationSpace (state: ParserState, nodeIndent: number) {\n const startLine = state.line\n skipSeparationSpace(state, true)\n\n if ((state.line > startLine && state.lineIndent < nodeIndent) ||\n (state.firstTabInLine !== -1 && state.lineIndent < nodeIndent)) {\n throwError(state, 'deficient indentation')\n }\n}\n\nfunction readFlowCollection (state: ParserState, nodeIndent: number, props: NodeProperties) {\n const ch = state.input.charCodeAt(state.position)\n const isMapping = ch === 0x7B/* { */\n const start = state.position\n let readNext = true\n\n if (ch !== 0x5B/* [ */ && ch !== 0x7B/* { */) return false\n\n const terminator = isMapping ? 0x7D/* } */ : 0x5D/* ] */\n\n if (isMapping) {\n addMappingEvent(state, start, props.anchorStart, props.anchorEnd, props.tagStart, props.tagEnd, COLLECTION_STYLE.FLOW)\n } else {\n addSequenceEvent(state, start, props.anchorStart, props.anchorEnd, props.tagStart, props.tagEnd, COLLECTION_STYLE.FLOW)\n }\n\n state.position++\n\n while (state.input.charCodeAt(state.position) !== 0) {\n skipFlowSeparationSpace(state, nodeIndent)\n\n let ch = state.input.charCodeAt(state.position)\n\n if (ch === terminator) {\n state.position++\n addPopEvent(state)\n return true\n } else if (!readNext) {\n throwError(state, 'missed comma between flow collection entries')\n } else if (ch === 0x2C/* , */) {\n throwError(state, \"expected the node content, but found ','\")\n }\n\n let isPair = false\n let isExplicitPair = false\n\n if (ch === 0x3F/* ? */ && isWsOrEol(state.input.charCodeAt(state.position + 1))) {\n isPair = isExplicitPair = true\n state.position += 1\n skipFlowSeparationSpace(state, nodeIndent)\n }\n\n const entryLine = state.line\n const entryStart = snapshotState(state)\n\n const keyWasRead = parseNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true)\n skipFlowSeparationSpace(state, nodeIndent)\n\n ch = state.input.charCodeAt(state.position)\n\n if ((isMapping || isExplicitPair || state.line === entryLine) && ch === 0x3A/* : */) {\n isPair = true\n state.position++\n skipFlowSeparationSpace(state, nodeIndent)\n if (!isMapping) {\n insertFlowPairMappingEvent(state, entryStart)\n if (!keyWasRead) addEmptyScalarEvent(state)\n } else if (!keyWasRead) {\n addEmptyScalarEvent(state)\n }\n if (!parseNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true)) {\n addEmptyScalarEvent(state)\n }\n skipFlowSeparationSpace(state, nodeIndent)\n if (!isMapping) addPopEvent(state)\n } else if (isMapping && isPair) {\n if (!keyWasRead) addEmptyScalarEvent(state)\n addEmptyScalarEvent(state)\n } else if (isMapping) {\n addEmptyScalarEvent(state)\n } else if (isPair) {\n insertFlowPairMappingEvent(state, entryStart)\n if (!keyWasRead) addEmptyScalarEvent(state)\n addEmptyScalarEvent(state)\n addPopEvent(state)\n }\n\n ch = state.input.charCodeAt(state.position)\n\n if (ch === 0x2C/* , */) {\n readNext = true\n state.position++\n } else {\n readNext = false\n }\n }\n\n throwError(state, 'unexpected end of the stream within a flow collection')\n}\n\nfunction readBlockSequence (state: ParserState, nodeIndent: number, props: NodeProperties) {\n if (state.firstTabInLine !== -1 || state.input.charCodeAt(state.position) !== 0x2D/* - */ || !isWsOrEolOrEnd(state.input.charCodeAt(state.position + 1))) {\n return false\n }\n\n addSequenceEvent(state, state.position, props.anchorStart, props.anchorEnd, props.tagStart, props.tagEnd, COLLECTION_STYLE.BLOCK)\n\n while (state.input.charCodeAt(state.position) === 0x2D/* - */ && isWsOrEolOrEnd(state.input.charCodeAt(state.position + 1))) {\n if (state.firstTabInLine !== -1) {\n state.position = state.firstTabInLine\n throwError(state, 'tab characters must not be used in indentation')\n }\n\n const entryLine = state.line\n state.position++\n\n const hadBreak = skipSeparationSpace(state, true) > 0\n if (state.firstTabInLine !== -1 &&\n state.input.charCodeAt(state.position) === 0x2D/* - */ &&\n isWsOrEolOrEnd(state.input.charCodeAt(state.position + 1))) {\n throwError(state, 'bad indentation of a sequence entry')\n }\n\n if (hadBreak && state.lineIndent <= nodeIndent) {\n addEmptyScalarEvent(state)\n } else {\n parseNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true)\n }\n\n skipSeparationSpace(state, true)\n\n if (state.lineIndent < nodeIndent || state.position >= state.length) break\n if (state.lineIndent > nodeIndent) throwError(state, 'bad indentation of a sequence entry')\n if (state.line === entryLine &&\n state.input.charCodeAt(state.position) === 0x2D/* - */ &&\n isWsOrEolOrEnd(state.input.charCodeAt(state.position + 1))) {\n throwError(state, 'bad indentation of a sequence entry')\n }\n }\n\n addPopEvent(state)\n return true\n}\n\nfunction readBlockMapping (state: ParserState, nodeIndent: number, flowIndent: number, props: NodeProperties) {\n let atExplicitKey = false\n let detected = false\n let mappingOpened = false\n let pendingExplicitKey = false\n\n if (state.firstTabInLine !== -1) return false\n\n let ch = state.input.charCodeAt(state.position)\n\n while (ch !== 0) {\n if (!atExplicitKey && state.firstTabInLine !== -1) {\n state.position = state.firstTabInLine\n throwError(state, 'tab characters must not be used in indentation')\n }\n\n const following = state.input.charCodeAt(state.position + 1)\n const entryLine = state.line\n\n if ((ch === 0x3F/* ? */ || ch === 0x3A/* : */) && isWsOrEolOrEnd(following)) {\n if (!mappingOpened) {\n addMappingEvent(state, state.position, props.anchorStart, props.anchorEnd, props.tagStart, props.tagEnd, COLLECTION_STYLE.BLOCK)\n mappingOpened = true\n }\n\n if (ch === 0x3F/* ? */) {\n if (atExplicitKey) addEmptyScalarEvent(state)\n detected = true\n atExplicitKey = true\n } else if (atExplicitKey) {\n atExplicitKey = false\n } else {\n addEmptyScalarEvent(state)\n detected = true\n atExplicitKey = false\n }\n\n state.position += 1\n pendingExplicitKey = true\n } else {\n // An explicit key awaiting its value, followed by an implicit key, means\n // the explicit key's value is empty. Emit it now (append-only) so it is\n // ordered before the implicit key node read just below.\n if (atExplicitKey) {\n addEmptyScalarEvent(state)\n atExplicitKey = false\n }\n\n const beforeKey = snapshotState(state)\n\n if (!parseNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) {\n break\n }\n\n if (state.line === entryLine) {\n ch = state.input.charCodeAt(state.position)\n\n while (isWhiteSpace(ch)) {\n ch = state.input.charCodeAt(++state.position)\n }\n\n if (ch === 0x3A/* : */) {\n ch = state.input.charCodeAt(++state.position)\n\n if (!isWsOrEolOrEnd(ch)) {\n throwError(state, 'a whitespace character is expected after the key-value separator within a block mapping')\n }\n\n if (!mappingOpened) {\n restoreState(state, beforeKey)\n addMappingEvent(state, beforeKey.position, props.anchorStart, props.anchorEnd, props.tagStart, props.tagEnd, COLLECTION_STYLE.BLOCK)\n mappingOpened = true\n // The key, the `:` and the space after it were already validated\n // above, before the rollback. Re-reading the same input cannot\n // fail, so just consume it again without error checks.\n parseNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)\n\n ch = state.input.charCodeAt(state.position)\n while (isWhiteSpace(ch)) {\n ch = state.input.charCodeAt(++state.position)\n }\n\n state.position++\n }\n\n detected = true\n atExplicitKey = false\n pendingExplicitKey = false\n } else if (detected) {\n throwError(state, \"expected ':' after a mapping key\")\n } else {\n // Not a mapping. If outer properties are pending, roll back so the\n // caller re-reads this node with them attached (events are append-only).\n if (props.anchorStart !== NO_RANGE || props.tagStart !== NO_RANGE) {\n restoreState(state, beforeKey)\n return false\n }\n return true\n }\n } else if (detected) {\n throwError(state, 'can not read a block mapping entry; a multiline key may not be an implicit key')\n } else {\n if (props.anchorStart !== NO_RANGE || props.tagStart !== NO_RANGE) {\n restoreState(state, beforeKey)\n return false\n }\n return true\n }\n }\n\n if (parseNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, pendingExplicitKey)) {\n pendingExplicitKey = false\n }\n\n if (!atExplicitKey) {\n if (pendingExplicitKey) {\n addEmptyScalarEvent(state)\n pendingExplicitKey = false\n }\n }\n\n skipSeparationSpace(state, true)\n ch = state.input.charCodeAt(state.position)\n\n if ((state.line === entryLine || state.lineIndent > nodeIndent) && ch !== 0) {\n throwError(state, 'bad indentation of a mapping entry')\n } else if (state.lineIndent < nodeIndent) {\n break\n }\n }\n\n if (!detected) return false\n if (atExplicitKey) addEmptyScalarEvent(state)\n if (mappingOpened) addPopEvent(state)\n return true\n}\n\nfunction parseNode (\n state: ParserState,\n parentIndent: number,\n nodeContext: NodeContext,\n allowToSeek: boolean,\n allowCompact: boolean,\n allowPropertyMapping = true\n): boolean {\n if (state.depth >= state.maxDepth) {\n throwError(state, `nesting exceeded maxDepth (${state.maxDepth})`)\n }\n\n state.depth++\n\n let indentStatus = 1\n let atNewLine = false\n let hasContent = false\n let propertyStart: ParserSnapshot | null = null\n const props = emptyProperties()\n\n let allowBlockScalars = nodeContext === CONTEXT_BLOCK_OUT || nodeContext === CONTEXT_BLOCK_IN\n let allowBlockCollections = allowBlockScalars\n const allowBlockStyles = allowBlockScalars\n\n if (allowToSeek && skipSeparationSpace(state, true)) {\n atNewLine = true\n\n if (state.lineIndent > parentIndent) {\n indentStatus = 1\n } else if (state.lineIndent === parentIndent) {\n indentStatus = 0\n } else {\n indentStatus = -1\n }\n }\n\n if (indentStatus === 1) {\n while (true) {\n const ch = state.input.charCodeAt(state.position)\n const propertyState = snapshotState(state)\n\n if (atNewLine &&\n indentStatus !== 1 &&\n (ch === 0x21/* ! */ || ch === 0x26/* & */)) {\n break\n }\n\n if (atNewLine &&\n allowBlockStyles &&\n (props.tagStart !== NO_RANGE || props.anchorStart !== NO_RANGE) &&\n (ch === 0x21/* ! */ || ch === 0x26/* & */)) {\n const fallbackState = snapshotState(state)\n const flowIndent = parentIndent + 1\n const mappingIndent = state.position - state.lineStart\n\n if (readBlockMapping(state, mappingIndent, flowIndent, props) &&\n state.events[fallbackState.eventsLength]?.type === EVENT_ID.MAPPING) {\n state.depth--\n return true\n }\n\n restoreState(state, fallbackState)\n }\n\n if (atNewLine &&\n ((ch === 0x21/* ! */ && props.tagStart !== NO_RANGE) ||\n (ch === 0x26/* & */ && props.anchorStart !== NO_RANGE))) {\n break\n }\n\n if (!readTagProperty(state, props, nodeContext === CONTEXT_FLOW_IN) && !readAnchorProperty(state, props)) {\n break\n }\n\n if (propertyStart === null) propertyStart = propertyState\n\n if (skipSeparationSpace(state, true)) {\n atNewLine = true\n allowBlockCollections = allowBlockStyles\n\n if (state.lineIndent > parentIndent) {\n indentStatus = 1\n } else if (state.lineIndent === parentIndent) {\n indentStatus = 0\n } else {\n indentStatus = -1\n }\n } else {\n allowBlockCollections = false\n }\n }\n }\n\n if (allowBlockCollections) {\n allowBlockCollections = atNewLine || allowCompact\n }\n\n if (indentStatus === 1 || nodeContext === CONTEXT_BLOCK_OUT) {\n const flowIndent = nodeContext === CONTEXT_FLOW_IN || nodeContext === CONTEXT_FLOW_OUT\n ? parentIndent\n : parentIndent + 1\n const blockIndent = state.position - state.lineStart\n\n if (indentStatus === 1) {\n if ((allowBlockCollections &&\n (readBlockSequence(state, blockIndent, props) ||\n readBlockMapping(state, blockIndent, flowIndent, props))) ||\n readFlowCollection(state, flowIndent, props)) {\n hasContent = true\n } else {\n const ch = state.input.charCodeAt(state.position)\n\n if (propertyStart !== null && allowPropertyMapping && allowBlockStyles && !allowBlockCollections &&\n ch !== 0x7C/* | */ && ch !== 0x3E/* > */) {\n const fallbackState = snapshotState(state)\n const propertyIndent = propertyStart.position - propertyStart.lineStart\n\n restoreState(state, propertyStart)\n\n if (readBlockMapping(state, propertyIndent, flowIndent, emptyProperties()) &&\n state.events[fallbackState.eventsLength]?.type === EVENT_ID.MAPPING) {\n hasContent = true\n } else {\n restoreState(state, fallbackState)\n }\n }\n\n if (!hasContent &&\n ((allowBlockScalars && readBlockScalar(state, flowIndent, props)) ||\n readSingleQuotedScalar(state, flowIndent, props) ||\n readDoubleQuotedScalar(state, flowIndent, props) ||\n readAlias(state, props) ||\n readPlainScalar(state, flowIndent, nodeContext, props))) {\n hasContent = true\n }\n }\n } else if (indentStatus === 0) {\n hasContent = allowBlockCollections && readBlockSequence(state, blockIndent, props)\n }\n }\n\n allowBlockScalars = allowBlockScalars && !hasContent\n\n if (!hasContent && (props.anchorStart !== NO_RANGE || props.tagStart !== NO_RANGE || allowBlockScalars)) {\n addScalarEvent(\n state,\n NO_RANGE,\n NO_RANGE,\n props.anchorStart,\n props.anchorEnd,\n props.tagStart,\n props.tagEnd,\n SCALAR_STYLE.PLAIN\n )\n hasContent = true\n }\n\n state.depth--\n return hasContent || props.anchorStart !== NO_RANGE || props.tagStart !== NO_RANGE\n}\n\nfunction readDirective (state: ParserState) {\n if (state.lineIndent > 0 || state.input.charCodeAt(state.position) !== 0x25/* % */) return false\n\n state.position++\n const nameStart = state.position\n\n while (state.input.charCodeAt(state.position) !== 0 && !isWsOrEol(state.input.charCodeAt(state.position))) state.position++\n\n const name = state.input.slice(nameStart, state.position)\n const args: string[] = []\n\n if (name.length === 0) throwError(state, 'directive name must not be less than one character in length')\n\n while (state.input.charCodeAt(state.position) !== 0 && !isEol(state.input.charCodeAt(state.position))) {\n while (isWhiteSpace(state.input.charCodeAt(state.position))) state.position++\n if (state.input.charCodeAt(state.position) === 0x23/* # */ || isEol(state.input.charCodeAt(state.position)) || state.input.charCodeAt(state.position) === 0) break\n\n const start = state.position\n while (state.input.charCodeAt(state.position) !== 0 && !isWsOrEol(state.input.charCodeAt(state.position))) state.position++\n args.push(state.input.slice(start, state.position))\n }\n\n if (isEol(state.input.charCodeAt(state.position))) consumeLineBreak(state)\n\n if (name === 'YAML') {\n if (state.directives.some(directive => directive.kind === 'yaml')) throwError(state, 'duplication of %YAML directive')\n if (args.length !== 1) throwError(state, 'YAML directive accepts exactly one argument')\n\n const match = /^([0-9]+)\\.([0-9]+)$/.exec(args[0])\n if (match === null) throwError(state, 'ill-formed argument of the YAML directive')\n if (parseInt(match[1], 10) !== 1) throwError(state, 'unacceptable YAML version of the document')\n\n state.directives.push({ kind: 'yaml', version: args[0] })\n } else if (name === 'TAG') {\n if (args.length !== 2) throwError(state, 'TAG directive accepts exactly two arguments')\n\n const [handle, prefix] = args\n if (!PATTERN_TAG_HANDLE.test(handle)) throwError(state, 'ill-formed tag handle (first argument) of the TAG directive')\n if (HAS_OWN.call(state.tagHandlers, handle)) throwError(state, `there is a previously declared suffix for \"${handle}\" tag handle`)\n if (!PATTERN_TAG_PREFIX.test(prefix)) throwError(state, 'ill-formed tag prefix (second argument) of the TAG directive')\n try {\n decodeURIComponent(prefix)\n } catch {\n throwError(state, `tag prefix is malformed: ${prefix}`)\n }\n\n state.tagHandlers[handle] = prefix\n state.directives.push({ kind: 'tag', handle, prefix })\n }\n\n return true\n}\n\nfunction readDocument (state: ParserState) {\n state.directives = []\n state.tagHandlers = Object.create(null)\n let hasDirectives = false\n\n skipSeparationSpace(state, true)\n\n while (readDirective(state)) {\n hasDirectives = true\n skipSeparationSpace(state, true)\n }\n\n let explicitStart = false\n let explicitEnd = false\n let allowCompact = true\n\n if (state.lineIndent === 0 &&\n state.input.charCodeAt(state.position) === 0x2D/* - */ &&\n state.input.charCodeAt(state.position + 1) === 0x2D/* - */ &&\n state.input.charCodeAt(state.position + 2) === 0x2D/* - */ &&\n isWsOrEolOrEnd(state.input.charCodeAt(state.position + 3))) {\n explicitStart = true\n const markerLine = state.line\n state.position += 3\n skipSeparationSpace(state, true)\n allowCompact = state.line > markerLine\n } else if (hasDirectives) {\n throwError(state, 'directives end mark is expected')\n }\n\n const documentEventIndex = state.events.length\n if (!explicitStart &&\n state.position === state.lineStart &&\n state.input.charCodeAt(state.position) === 0x2E/* . */ &&\n testDocumentSeparator(state)) {\n state.position += 3\n skipSeparationSpace(state, true)\n return\n }\n\n addDocumentEvent(state, explicitStart, false)\n if (!parseNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, allowCompact, allowCompact)) {\n addEmptyScalarEvent(state)\n }\n skipSeparationSpace(state, true)\n\n if (state.position === state.lineStart && testDocumentSeparator(state)) {\n explicitEnd = state.input.charCodeAt(state.position) === 0x2E/* . */\n if (explicitEnd) {\n const markerLine = state.line\n state.position += 3\n skipSeparationSpace(state, true)\n if (state.line === markerLine && state.position < state.length) {\n throwError(state, 'end of the stream or a document separator is expected')\n }\n }\n }\n\n const documentEvent = state.events[documentEventIndex]\n if (documentEvent?.type === EVENT_ID.DOCUMENT) documentEvent.explicitEnd = explicitEnd\n\n addPopEvent(state)\n\n if (!explicitEnd &&\n state.position < state.length &&\n !testDocumentBoundary(state)) {\n throwError(state, 'end of the stream or a document separator is expected')\n }\n}\n\n/**\n * Parses YAML into a flat event stream referencing source text by offsets.\n *\n * @category Events\n */\nfunction parseEvents (input: string, options: ParserOptions): Event[] {\n const length = input.length\n const state: ParserState = {\n ...DEFAULT_PARSER_OPTIONS,\n ...options,\n input: `${input}\\0`,\n length,\n position: 0,\n line: 0,\n lineStart: 0,\n lineIndent: 0,\n firstTabInLine: -1,\n depth: 0,\n directives: [],\n tagHandlers: Object.create(null),\n events: []\n }\n\n const nullpos = input.indexOf('\\0')\n if (nullpos !== -1) YAMLException.throwAt(input, nullpos, 'null byte is not allowed in input', state.filename)\n\n while (state.position < state.length) {\n skipByteOrderMark(state)\n skipSeparationSpace(state, true)\n if (state.position >= state.length) break\n const documentStart = state.position\n readDocument(state)\n if (state.position === documentStart) {\n // Internal progress guard: if readDocument() ever returns without\n // consuming input, stop here instead of looping forever.\n /* c8 ignore next */\n throwError(state, 'can not read a document')\n }\n }\n\n return state.events\n}\n\nexport {\n parseEvents,\n DEFAULT_PARSER_OPTIONS,\n type ParserOptions\n}\n","import { YAMLException } from './common/exception.ts'\nimport { pick } from './common/object.ts'\nimport {\n constructFromEvents,\n DEFAULT_CONSTRUCTOR_OPTIONS,\n type ConstructorOptions\n} from './parser/constructor.ts'\nimport {\n parseEvents,\n DEFAULT_PARSER_OPTIONS,\n type ParserOptions\n} from './parser/parser.ts'\n\n// `source` is supplied by `loadDocuments` itself, not by the public caller.\n/** @category Main */\ninterface LoadOptions extends ParserOptions, Omit {}\n\n/** @inline */\ntype LoadAllIterator = (document: unknown) => void\n\nconst DEFAULT_LOAD_OPTIONS: Required = {\n ...DEFAULT_PARSER_OPTIONS,\n ...DEFAULT_CONSTRUCTOR_OPTIONS\n}\n\nfunction loadDocuments (input: string, options: LoadOptions = {}) {\n const opts = { ...DEFAULT_LOAD_OPTIONS, ...options }\n const source = String(input)\n\n const PARSER_OPT_KEYS = Object.keys(DEFAULT_PARSER_OPTIONS) as\n (keyof typeof DEFAULT_PARSER_OPTIONS)[]\n const CONSTRUCTOR_OPT_KEYS = Object.keys(DEFAULT_CONSTRUCTOR_OPTIONS) as\n (keyof typeof DEFAULT_CONSTRUCTOR_OPTIONS)[]\n\n const events = parseEvents(source, pick(opts, PARSER_OPT_KEYS))\n return constructFromEvents(events, { ...pick(opts, CONSTRUCTOR_OPT_KEYS), source })\n}\n\n/**\n * Same as {@link load}, but understands multi-document sources.\n * Returns an array of documents.\n *\n * @category Main\n */\nfunction loadAll (input: string, options?: LoadOptions): unknown[]\n\n/**\n * @deprecated Iterator is not supported.\n */\nfunction loadAll (input: string, iterator: null, options?: LoadOptions): unknown[]\n\n/**\n * @deprecated Iterator is not supported.\n */\nfunction loadAll (input: string, iterator: LoadAllIterator, options?: LoadOptions): void\nfunction loadAll (\n input: string,\n iteratorOrOptions?: LoadAllIterator | LoadOptions | null,\n options?: LoadOptions\n) {\n let iterator: LoadAllIterator | null = null\n\n if (typeof iteratorOrOptions === 'function') {\n iterator = iteratorOrOptions\n } else if (iteratorOrOptions !== null && typeof iteratorOrOptions === 'object') {\n options = iteratorOrOptions\n }\n\n const documents = loadDocuments(input, options)\n\n if (iterator === null) return documents\n for (const document of documents) iterator(document)\n}\n\n/**\n * Parses `string` as a single YAML document. Throws {@link YAMLException} on\n * error. This function does not understand multi-document or empty sources; it\n * throws an exception on those.\n *\n * > [!NOTE]\n * > 1. When processing untrusted input, see the\n * > [security considerations](../docs/safety.md).\n * > 2. All exceptions MUST be caught, not just {@link YAMLException}.\n * > 3. The default {@link CORE_SCHEMA} comes without the `!!merge` tag. You can\n * > easily enable it if needed.\n * > 4. The default {@link mapTag} is `{}`-object based, with known limitations\n * > (see description). For full compatibility use {@link realMapTag}\n * > instead (it uses native JS `Map`).\n *\n * @example\n * Enable {@link mergeTag} and {@link realMapTag}:\n *\n * ```javascript\n * import { load, CORE_SCHEMA, mergeTag, realMapTag } from 'js-yaml'\n *\n * try {\n * load(data, { schema: CORE_SCHEMA.withTags(mergeTag, realMapTag) })\n * } catch (e) {\n * console.error(e)\n * }\n * ```\n *\n * @category Main\n */\nfunction load (input: string, options?: LoadOptions) {\n const documents = loadDocuments(input, options)\n\n if (documents.length === 0) throw new YAMLException('expected a document, but the input is empty')\n if (documents.length === 1) return documents[0]\n\n throw new YAMLException('expected a single document in the stream, but found more')\n}\n\nexport {\n load,\n loadAll,\n type LoadOptions\n}\n","// JS value graph → AST. Knows tags (`identify` / `represent`). A single\n// identity-`Map` walk handles dedup: a repeat occurrence of an object (including\n// a cycle) becomes an `alias`, and the first occurrence gets an `anchor`.\n\nimport { YAMLException } from '../common/exception.ts'\nimport { type Schema } from '../schema.ts'\nimport { type TagDefinition } from '../tag.ts'\nimport { tagNameShort } from '../common/tagname.ts'\nimport { COLLECTION_STYLE, SCALAR_STYLE } from '../parser/events.ts'\nimport {\n type Document,\n type Node,\n type ScalarNode,\n type SequenceNode,\n type MappingNode\n} from './nodes.ts'\n\n/** @category AST */\ninterface FromJsOptions {\n /** Inlines duplicate objects instead of converting them into references. */\n noRefs?: boolean\n\n /**\n * Skips unrepresentable values instead of throwing. Invalid mapping pairs\n * and sequence items are skipped; `undefined` sequence items become `null`.\n */\n skipInvalid?: boolean\n}\n\n// A match candidate. `implicitTag` means the tag is not printed (implicit\n// scalars and the default str/seq/map tags).\ninterface RepresentType {\n tag: TagDefinition\n implicitTag: boolean\n}\n\n// Returned by `build` when no tag matched.\nconst INVALID = Symbol('INVALID')\n\ninterface FromJsState {\n representTypes: RepresentType[]\n noRefs: boolean\n skipInvalid: boolean\n\n // Already-built collection values → their node, for anchor/alias dedup.\n refs: Map\n refCounter: number\n}\n\nfunction buildRepresentTypes (schema: Schema): RepresentType[] {\n const defaultTags = new Set([\n schema.defaultScalarTag,\n schema.defaultSequenceTag,\n schema.defaultMappingTag\n ].filter((t): t is TagDefinition => t !== undefined))\n\n // Default container/str tags go last so a more specific tag identifying the\n // same JS value (e.g. a custom tag on a plain object) wins.\n const implicitScalars = schema.implicitScalarTags\n const explicitTags = schema.tags.filter(t =>\n !(t.nodeKind === 'scalar' && t.implicit) && !defaultTags.has(t))\n const defaultTagsLast = schema.tags.filter(t => defaultTags.has(t))\n\n return [\n ...implicitScalars.map(tag => ({ tag, implicitTag: true })),\n ...explicitTags.map(tag => ({ tag, implicitTag: false })),\n ...defaultTagsLast.map(tag => ({ tag, implicitTag: true }))\n ]\n}\n\n// First tag whose `identify` accepts `object`.\nfunction matchTag (state: FromJsState, object: unknown): { tag: TagDefinition, tagName: string, implicitTag: boolean } | null {\n for (let index = 0, length = state.representTypes.length; index < length; index += 1) {\n const { tag, implicitTag } = state.representTypes[index]\n\n if (tag.identify(object)) {\n let tagName: string\n if (tag.matchByTagPrefix) {\n tagName = tag.representTagName(object)\n } else {\n tagName = tag.tagName\n }\n return { tag, tagName, implicitTag }\n }\n }\n\n return null\n}\n\n// Build a node for `object`, or INVALID when no tag matches. `undefined` never\n// throws (caller decides: null in a sequence, skip in a mapping, '' at root);\n// any other unrepresentable value throws unless `skipInvalid`.\nfunction build (state: FromJsState, object: unknown): Node | typeof INVALID {\n if (!state.noRefs && object !== null && typeof object === 'object') {\n const existing = state.refs.get(object)\n if (existing) {\n if (existing.anchor === undefined) existing.anchor = `ref_${state.refCounter++}`\n return { kind: 'alias', anchor: existing.anchor }\n }\n }\n\n const matched = matchTag(state, object)\n\n if (!matched) {\n if (object === undefined) return INVALID\n if (state.skipInvalid) return INVALID\n throw new YAMLException(`unacceptable kind of an object to dump ${Object.prototype.toString.call(object)}`)\n }\n\n const { tag, tagName, implicitTag } = matched\n const nodeTagName = implicitTag ? tagName : tagNameShort(tagName)\n\n if (tag.nodeKind === 'scalar') {\n const node: ScalarNode = {\n kind: 'scalar',\n tag: nodeTagName,\n tagged: !implicitTag,\n style: SCALAR_STYLE.PLAIN,\n value: tag.represent(object)\n }\n return node\n }\n\n if (tag.nodeKind === 'sequence') {\n const container = tag.represent(object)\n const node: SequenceNode = {\n kind: 'sequence',\n tag: nodeTagName,\n tagged: !implicitTag,\n style: COLLECTION_STYLE.BLOCK,\n items: []\n }\n if (!state.noRefs) state.refs.set(object, node)\n\n for (let index = 0, length = container.length; index < length; index += 1) {\n let item = build(state, container[index])\n // An invalid element becomes null; a still-invalid null then skips/throws.\n if (item === INVALID && container[index] === undefined) item = build(state, null)\n if (item === INVALID) continue\n node.items.push(item)\n }\n return node\n }\n\n // mapping — the canonical form is always a `Map`.\n const map = tag.represent(object)\n const node: MappingNode = {\n kind: 'mapping',\n tag: nodeTagName,\n tagged: !implicitTag,\n style: COLLECTION_STYLE.BLOCK,\n items: []\n }\n if (!state.noRefs) state.refs.set(object, node)\n\n for (const [objectKey, objectValue] of map) {\n const key = build(state, objectKey)\n if (key === INVALID) continue // invalid key skips the pair\n const value = build(state, objectValue)\n if (value === INVALID) continue // invalid value skips the pair\n node.items.push({ key, value })\n }\n return node\n}\n\n/**\n * Convert JS object to AST. A JS value is one YAML document. An unrepresentable\n * root becomes an empty document, which the presenter renders as an empty\n * string.\n *\n * @category AST\n */\nfunction jsToAst (input: unknown, schema: Schema, options: FromJsOptions = {}): Document[] {\n const state: FromJsState = {\n representTypes: buildRepresentTypes(schema),\n noRefs: options.noRefs ?? false,\n skipInvalid: options.skipInvalid ?? false,\n refs: new Map(),\n refCounter: 0\n }\n\n const root = build(state, input)\n return [{ contents: root === INVALID ? null : root, directives: [] }]\n}\n\nexport {\n jsToAst,\n type FromJsOptions\n}\n","// Depth-first AST traversal. Mirrors the `kind` walk of the presenter and the\n// `from_*` builders, but stays read-oriented: nodes are plain objects, so a\n// visitor mutates them in place. Control signals let it prune or stop the walk.\n\nimport {\n type Node,\n type Document\n} from './nodes.ts'\n\n// Returned by a visitor to control the walk; anything else (incl. `undefined`)\n// descends as usual.\n/**\n * Return from a visitor to stop the whole traversal.\n *\n * @category AST\n */\nconst VISIT_BREAK = Symbol('visit:break')\n\n/**\n * Return from a visitor to skip the current node's children.\n *\n * @category AST\n */\nconst VISIT_SKIP = Symbol('visit:skip')\n\n/** @inline */\ntype VisitControl = typeof VISIT_BREAK | typeof VISIT_SKIP | undefined | void\n\n/**\n * Traversal-derived position of the current node. Kept off the node itself: a\n * node may sit in several places (alias/dedup reuse), so depth/role belong to\n * the walk, not the node. {@link VisitContext.parent} `kind` +\n * {@link VisitContext.isKey} pin the exact slot.\n *\n * @category AST\n */\ninterface VisitContext {\n /** 0 = document content root */\n depth: number\n\n /** Enclosing sequence/mapping, null at the root */\n parent: Node | null\n\n /** Node sits in a mapping key position */\n isKey: boolean\n}\n\n/** @category AST */\ntype Visitor = (node: Node, ctx: VisitContext) => VisitControl\n\n// Returns `true` once `VISIT_BREAK` was seen, so callers can unwind the walk.\nfunction visitNode (node: Node, visitor: Visitor, ctx: VisitContext): boolean {\n const control = visitor(node, ctx)\n if (control === VISIT_BREAK) return true\n if (control === VISIT_SKIP) return false\n\n const depth = ctx.depth + 1\n\n switch (node.kind) {\n case 'sequence':\n for (const item of node.items) {\n if (visitNode(item, visitor, { depth, parent: node, isKey: false })) return true\n }\n break\n case 'mapping':\n for (const { key, value } of node.items) {\n if (visitNode(key, visitor, { depth, parent: node, isKey: true })) return true\n if (visitNode(value, visitor, { depth, parent: node, isKey: false })) return true\n }\n break\n }\n\n return false\n}\n\n/**\n * Walk every node in the documents, calling {@link Visitor} once per\n * node (pre-order).\n *\n * @category AST\n */\nfunction visit (documents: Document[], visitor: Visitor): void {\n for (const doc of documents) {\n if (doc.contents && visitNode(doc.contents, visitor, { depth: 0, parent: null, isKey: false })) return\n }\n}\n\nexport {\n visit,\n VISIT_BREAK,\n VISIT_SKIP,\n type Visitor,\n type VisitContext\n}\n","import { SCALAR_STYLE, type ScalarStyle } from '../parser/events.ts'\nimport { type ScalarLayout } from './scalar_styler.ts'\n\nfunction hasBit (mask: number, bit: number): boolean { return (mask & (1 << bit)) !== 0 }\n\n// This should eventually be a presenter option, but collection styling,\n// especially key layout, must be designed first to decide whether scalar and\n// collection width limits should share an option or be configured separately.\nconst MIN_SCALAR_CONTENT_WIDTH = 40\n\n/**\n * Default scalar styling rules in application order.\n * See [Scalar styling](../../docs/scalar_styling.md) for usage details.\n *\n * @category AST\n */\nconst DEFAULT_SCALAR_STYLE_RULES = {\n applyQuoteFlowKeysOption,\n doubleQuoteForInvisibles,\n doubleQuoteWhitespaceOnly,\n applyForceQuotesOption,\n tryLongOrMultilineAsBlock,\n quoteInvalidPlain,\n fallbackToDoubleQuoted\n} as const\n\nfunction _preferredQuotedStyle (layout: ScalarLayout): ScalarStyle {\n if (layout.presenterOptions.quoteStyle === 'single' &&\n hasBit(layout.allowedStylesMask, SCALAR_STYLE.SINGLE_QUOTED)) {\n return SCALAR_STYLE.SINGLE_QUOTED\n }\n\n return SCALAR_STYLE.DOUBLE_QUOTED\n}\n\nfunction applyQuoteFlowKeysOption (layout: ScalarLayout): void {\n if (!layout.presenterOptions.quoteFlowKeys) return\n\n // quoteFlowKeys applies only to plain scalar keys in flow mappings.\n if (!layout.isKey || !layout.flowOnly || layout.style !== SCALAR_STYLE.PLAIN) return\n\n layout.style = SCALAR_STYLE.DOUBLE_QUOTED\n}\n\nfunction doubleQuoteForInvisibles (layout: ScalarLayout): void {\n if (layout.style === SCALAR_STYLE.PLAIN &&\n /[\\t\\x7F-\\xA0\\u2028\\u2029\\uFEFF\\uFFFE\\uFFFF]/.test(layout.node.value)) {\n layout.style = SCALAR_STYLE.DOUBLE_QUOTED\n }\n}\n\nfunction doubleQuoteWhitespaceOnly (layout: ScalarLayout): void {\n // Block styles normally make multiline structure easier to see, but\n // whitespace-only content turns that structure into visually empty lines,\n // so force double quotes for this special case.\n if (layout.style === SCALAR_STYLE.PLAIN && /^\\s+$/.test(layout.node.value)) {\n layout.style = SCALAR_STYLE.DOUBLE_QUOTED\n }\n}\n\nfunction applyForceQuotesOption (layout: ScalarLayout): void {\n if (!layout.presenterOptions.forceQuotes) return\n\n // forceQuotes applies only to plain values, not to mapping keys.\n if (layout.isKey || layout.style !== SCALAR_STYLE.PLAIN) return\n\n layout.style = layout.node.value.includes('\\n')\n ? SCALAR_STYLE.DOUBLE_QUOTED\n : _preferredQuotedStyle(layout)\n}\n\nfunction tryLongOrMultilineAsBlock (layout: ScalarLayout): void {\n if (layout.style !== SCALAR_STYLE.PLAIN || layout.isKey) return\n\n const value = layout.node.value\n const multiline = value.indexOf('\\n') !== -1\n\n // Literal and folded block style bits are always set together, so checking\n // either one is sufficient.\n if (!hasBit(layout.allowedStylesMask, SCALAR_STYLE.LITERAL_BLOCK)) {\n if (multiline) layout.style = SCALAR_STYLE.DOUBLE_QUOTED\n return\n }\n\n const w = layout.presenterOptions.lineWidth\n\n if (w === -1) {\n if (multiline) layout.style = SCALAR_STYLE.LITERAL_BLOCK\n return\n }\n\n const availableWidth = Math.max(\n Math.min(w, MIN_SCALAR_CONTENT_WIDTH),\n w - layout.shiftOfContent\n )\n\n let position = 0\n let shouldFold = false\n\n // Check whether at least one line exceeds the width budget\n // and can be split at a space.\n while (position <= value.length) {\n let lineEnd = value.length\n\n const nextLineBreak = value.indexOf('\\n', position)\n\n if (nextLineBreak !== -1) lineEnd = nextLineBreak\n\n const line = value.slice(position, lineEnd)\n\n if (line.length > availableWidth &&\n line[0] !== ' ' &&\n / [^ \\t]/.test(line)) {\n shouldFold = true\n }\n\n if (nextLineBreak === -1) break\n position = nextLineBreak + 1\n }\n\n if (shouldFold) {\n layout.style = SCALAR_STYLE.FOLDED_BLOCK\n } else if (multiline) {\n layout.style = SCALAR_STYLE.LITERAL_BLOCK\n }\n}\n\nfunction quoteInvalidPlain (layout: ScalarLayout): void {\n if (layout.style === SCALAR_STYLE.PLAIN &&\n !hasBit(layout.allowedStylesMask, SCALAR_STYLE.PLAIN)) {\n layout.style = _preferredQuotedStyle(layout)\n }\n}\n\nfunction fallbackToDoubleQuoted (layout: ScalarLayout): void {\n if (!hasBit(layout.allowedStylesMask, layout.style)) {\n layout.style = SCALAR_STYLE.DOUBLE_QUOTED\n }\n}\n\nexport { MIN_SCALAR_CONTENT_WIDTH, DEFAULT_SCALAR_STYLE_RULES }\n","import { SCALAR_STYLE, type ScalarStyle } from '../parser/events.ts'\nimport { type Node, type ScalarNode } from './nodes.ts'\nimport { type PresenterOptions } from './presenter.ts'\nimport { MIN_SCALAR_CONTENT_WIDTH } from './styler_defaults.ts'\n\n/** Scalar presentation state passed to styling rules. @category AST */\ninterface ScalarLayout {\n readonly node: Readonly\n readonly parent: Readonly | null\n readonly level: number\n readonly isKey: boolean\n readonly flowOnly: boolean\n readonly shiftOfParent: number\n readonly shiftOfContent: number\n readonly shiftOfFirstLine: number\n readonly presenterOptions: Readonly>\n /**\n * Bit mask of allowed styles; each bit corresponds to a {@link SCALAR_STYLE}\n * value.\n */\n allowedStylesMask: number\n /**\n * Selected output style, which styling rules may modify. To avoid overriding\n * earlier decisions, a rule should normally modify it only while it is\n * {@link SCALAR_STYLE.PLAIN}.\n */\n style: ScalarStyle\n}\n\n/** Function signature for scalar styling rules. @category AST */\ntype ScalarStyleRule = (layout: ScalarLayout) => void\n\nfunction setBit (mask: number, bit: number): number { return mask | (1 << bit) }\n\n// YAML 1.2.2 character productions.\n// https://yaml.org/spec/1.2.2/#51-character-set\nconst SRC_C_PRINTABLE = '[\\\\x09\\\\x0A\\\\x0D\\\\x20-\\\\x7E\\\\x85\\\\xA0-\\\\uD7FF\\\\uE000-\\\\uFFFD\\\\u{10000}-\\\\u{10FFFF}]'\nconst SRC_B_CHAR = '[\\\\n\\\\r]'\nconst SRC_C_BYTE_ORDER_MARK = '\\\\uFEFF'\nconst SRC_S_WHITE = '[ \\\\t]'\nconst SRC_NB_CHAR = `(?:(?!(?:${SRC_B_CHAR}|${SRC_C_BYTE_ORDER_MARK}))${SRC_C_PRINTABLE})`\nconst SRC_NS_CHAR = `(?:(?!${SRC_S_WHITE})${SRC_NB_CHAR})`\n\n// YAML 1.2.2 [2] nb-json.\nconst SRC_NB_JSON = '[\\\\x09\\\\x20-\\\\uD7FF\\\\uE000-\\\\uFFFF\\\\u{10000}-\\\\u{10FFFF}]'\n\n// YAML 1.2.2 indicator productions.\n// https://yaml.org/spec/1.2.2/#54-indicator-characters\nconst SRC_C_INDICATOR = '[-?:,\\\\[\\\\]{}#&*!|>\\'\"%@`]'\nconst SRC_C_FLOW_INDICATOR = '[,\\\\[\\\\]{}]'\n\n// YAML 1.2.2 [127]-[129] ns-plain-safe(c).\n// https://yaml.org/spec/1.2.2/#733-plain-style\nconst SRC_NS_PLAIN_SAFE_FLOW_OUT = SRC_NS_CHAR\nconst SRC_NS_PLAIN_SAFE_FLOW_IN = `(?:(?!${SRC_C_FLOW_INDICATOR})${SRC_NS_CHAR})`\n\n// YAML 1.2.2 [126] ns-plain-first(c).\nconst SRC_NS_PLAIN_FIRST_FLOW_OUT =\n `(?:(?:(?!${SRC_C_INDICATOR})${SRC_NS_CHAR})|[?:-](?=${SRC_NS_PLAIN_SAFE_FLOW_OUT}))`\nconst SRC_NS_PLAIN_FIRST_FLOW_IN =\n `(?:(?:(?!${SRC_C_INDICATOR})${SRC_NS_CHAR})|[?:-](?=${SRC_NS_PLAIN_SAFE_FLOW_IN}))`\n\n// YAML 1.2.2 [130] ns-plain-char(c).\n// The production itself requires lookbehind, so these regexps require ES2018 lookbehind support.\n// const SRC_NS_PLAIN_CHAR_FLOW_OUT =\n// `(?:(?:(?![:#])${SRC_NS_PLAIN_SAFE_FLOW_OUT})|(?<=${SRC_NS_CHAR})#|:(?=${SRC_NS_PLAIN_SAFE_FLOW_OUT}))`\n// const SRC_NS_PLAIN_CHAR_FLOW_IN =\n// `(?:(?:(?![:#])${SRC_NS_PLAIN_SAFE_FLOW_IN})|(?<=${SRC_NS_CHAR})#|:(?=${SRC_NS_PLAIN_SAFE_FLOW_IN}))`\n\n// ES2015-compatible alternative without lookbehind: consume each run of hashes\n// together with the preceding non-hash ns-plain-char.\nconst SRC_NS_PLAIN_CHAR_FLOW_OUT =\n `(?:(?:(?![:#])${SRC_NS_PLAIN_SAFE_FLOW_OUT})|:(?=${SRC_NS_PLAIN_SAFE_FLOW_OUT}))#*`\nconst SRC_NS_PLAIN_CHAR_FLOW_IN =\n `(?:(?:(?![:#])${SRC_NS_PLAIN_SAFE_FLOW_IN})|:(?=${SRC_NS_PLAIN_SAFE_FLOW_IN}))#*`\n\n// YAML 1.2.2 [132] nb-ns-plain-in-line(c).\nconst SRC_NB_NS_PLAIN_IN_LINE_FLOW_OUT = `(?:${SRC_S_WHITE}*${SRC_NS_PLAIN_CHAR_FLOW_OUT})*`\nconst SRC_NB_NS_PLAIN_IN_LINE_FLOW_IN = `(?:${SRC_S_WHITE}*${SRC_NS_PLAIN_CHAR_FLOW_IN})*`\n\n// YAML 1.2.2 [133] ns-plain-one-line(c).\nconst SRC_NS_PLAIN_ONE_LINE_FLOW_OUT =\n `${SRC_NS_PLAIN_FIRST_FLOW_OUT}#*${SRC_NB_NS_PLAIN_IN_LINE_FLOW_OUT}`\nconst SRC_NS_PLAIN_ONE_LINE_FLOW_IN =\n `${SRC_NS_PLAIN_FIRST_FLOW_IN}#*${SRC_NB_NS_PLAIN_IN_LINE_FLOW_IN}`\nconst SRC_NS_PLAIN_ONE_LINE_BLOCK_KEY = SRC_NS_PLAIN_ONE_LINE_FLOW_OUT\nconst SRC_NS_PLAIN_ONE_LINE_FLOW_KEY = SRC_NS_PLAIN_ONE_LINE_FLOW_IN\n\n// YAML 1.2.2 [134] s-ns-plain-next-line(n,c).\n// ScalarNode.value contains the folded value, not the source text: one source\n// line break became a space, while k > 1 breaks became k - 1 LF characters.\n// The space case is already accepted by [132]; each remaining run of LFs\n// therefore represents a transition to the next non-empty content line in [134].\nconst SRC_S_NS_PLAIN_NEXT_LINE_FLOW_OUT =\n `\\\\n+${SRC_NS_PLAIN_CHAR_FLOW_OUT}${SRC_NB_NS_PLAIN_IN_LINE_FLOW_OUT}`\nconst SRC_S_NS_PLAIN_NEXT_LINE_FLOW_IN =\n `\\\\n+${SRC_NS_PLAIN_CHAR_FLOW_IN}${SRC_NB_NS_PLAIN_IN_LINE_FLOW_IN}`\n\n// YAML 1.2.2 [135] ns-plain-multi-line(n,c).\nconst SRC_NS_PLAIN_MULTI_LINE_FLOW_OUT =\n `${SRC_NS_PLAIN_ONE_LINE_FLOW_OUT}(?:${SRC_S_NS_PLAIN_NEXT_LINE_FLOW_OUT})*`\nconst SRC_NS_PLAIN_MULTI_LINE_FLOW_IN =\n `${SRC_NS_PLAIN_ONE_LINE_FLOW_IN}(?:${SRC_S_NS_PLAIN_NEXT_LINE_FLOW_IN})*`\n\n// YAML 1.2.2 [131] ns-plain(n,c).\nconst NS_PLAIN_FLOW_OUT = new RegExp(`^(?:${SRC_NS_PLAIN_MULTI_LINE_FLOW_OUT})$`, 'u')\nconst NS_PLAIN_FLOW_IN = new RegExp(`^(?:${SRC_NS_PLAIN_MULTI_LINE_FLOW_IN})$`, 'u')\nconst NS_PLAIN_BLOCK_KEY = new RegExp(`^(?:${SRC_NS_PLAIN_ONE_LINE_BLOCK_KEY})$`, 'u')\nconst NS_PLAIN_FLOW_KEY = new RegExp(`^(?:${SRC_NS_PLAIN_ONE_LINE_FLOW_KEY})$`, 'u')\n\n// YAML 1.2.2 [118]-[125], projected to ScalarNode.value: doubled quotes\n// are already decoded, and flow folding represents content line feeds as LF.\nconst NB_SINGLE_ONE_LINE = new RegExp(`^(?:${SRC_NB_JSON})*$`, 'u')\nconst NB_SINGLE_MULTI_LINE = new RegExp(`^(?:${SRC_NB_JSON}|\\\\n)*$`, 'u')\n\n// YAML 1.2.2 [170]-[182], projected to ScalarNode.value: source line breaks\n// are normalized to LF; every other content character must be nb-char.\nconst BLOCK_SCALAR_CONTENT = new RegExp(`^(?:${SRC_NB_CHAR}|\\\\n)*$`, 'u')\n\n// YAML 1.2.2 [206] c-forbidden.\n// https://yaml.org/spec/1.2.2/#912-document-markers\nconst C_FORBIDDEN_FIRST_LINE = /^(?:---|\\.\\.\\.)(?=$|[ \\t\\n\\r])/\nconst C_FORBIDDEN_CONTENT = /^(?:---|\\.\\.\\.)(?=$|[ \\t\\n\\r])/m\n\nfunction canUsePlain (layout: ScalarLayout): boolean {\n const str = layout.node.value\n\n // Allow null to be rendered as an empty scalar; its tag is checked below.\n if (str !== '') {\n const nsPlain = layout.isKey\n ? (layout.flowOnly ? NS_PLAIN_FLOW_KEY : NS_PLAIN_BLOCK_KEY)\n : (layout.flowOnly ? NS_PLAIN_FLOW_IN : NS_PLAIN_FLOW_OUT)\n\n if (!nsPlain.test(str)) return false\n if (layout.shiftOfFirstLine === 0 && C_FORBIDDEN_FIRST_LINE.test(str)) return false\n\n if (layout.shiftOfContent === 0) {\n const firstLineBreak = str.indexOf('\\n')\n\n if (firstLineBreak !== -1) {\n const content = str.slice(firstLineBreak + 1)\n\n if (C_FORBIDDEN_CONTENT.test(content)) return false\n }\n }\n }\n\n // Outside the plain-syntax BNF: preserve the node tag under implicit resolution.\n const resolvedTag = layout.presenterOptions.schema.resolveImplicitScalarTag(str).tag.tagName\n\n if (!layout.node.tagged && resolvedTag !== layout.node.tag) return false\n\n // Outside YAML 1.2.2: preserve YAML 1.1 !!value semantics.\n // https://yaml.org/type/value.html\n if (!layout.node.tagged && str === '=' &&\n resolvedTag === layout.presenterOptions.schema.defaultScalarTag.tagName) return false\n\n return true\n}\n\nfunction canUseSingleQuoted (layout: ScalarLayout): boolean {\n const str = layout.node.value\n const nbSingleText = layout.isKey ? NB_SINGLE_ONE_LINE : NB_SINGLE_MULTI_LINE\n\n if (!nbSingleText.test(str)) return false\n\n // [123]-[125] exclude trailing and leading s-white around a folded break;\n // single-quoted style has no escape that could preserve it.\n if (/[ \\t]\\n|\\n[ \\t]/.test(str)) return false\n\n // A decoded LF is rendered through flow folding. At zero continuation\n // indentation, c-forbidden would terminate the quoted scalar.\n if (!layout.isKey && layout.shiftOfContent === 0) {\n const firstLineBreak = str.indexOf('\\n')\n\n if (firstLineBreak !== -1 &&\n C_FORBIDDEN_CONTENT.test(str.slice(firstLineBreak + 1))) return false\n }\n\n return true\n}\n\nfunction canUseBlock (layout: ScalarLayout): boolean {\n if (layout.flowOnly || !BLOCK_SCALAR_CONTENT.test(layout.node.value)) return false\n\n const contentIndent = layout.shiftOfContent - layout.shiftOfParent\n\n if (contentIndent < 1) return false\n\n // A leading space requires [163] c-indentation-indicator. Its value is 1-9.\n if (contentIndent > 9 && /^\\n* /.test(layout.node.value)) return false\n\n // Block content starts on its own line, so every zero-indented content line\n // is subject to [206] c-forbidden.\n if (layout.shiftOfContent === 0 && C_FORBIDDEN_CONTENT.test(layout.node.value)) return false\n\n return true\n}\n\nfunction detectAllowedStyles (layout: ScalarLayout): void {\n // [107] Double-quoted style can express arbitrary strings through escape sequences.\n let mask = setBit(0, SCALAR_STYLE.DOUBLE_QUOTED)\n\n if (canUsePlain(layout)) mask = setBit(mask, SCALAR_STYLE.PLAIN)\n if (canUseSingleQuoted(layout)) mask = setBit(mask, SCALAR_STYLE.SINGLE_QUOTED)\n\n if (canUseBlock(layout)) {\n mask = setBit(setBit(mask, SCALAR_STYLE.LITERAL_BLOCK), SCALAR_STYLE.FOLDED_BLOCK)\n }\n\n layout.allowedStylesMask = mask\n}\n\nfunction renderScalar (layout: ScalarLayout): string {\n switch (layout.style) {\n case SCALAR_STYLE.PLAIN:\n return renderPlain(layout)\n case SCALAR_STYLE.SINGLE_QUOTED:\n return renderSingleQuoted(layout)\n case SCALAR_STYLE.LITERAL_BLOCK:\n return renderLiteralBlock(layout)\n case SCALAR_STYLE.FOLDED_BLOCK:\n return renderFoldedBlock(layout)\n case SCALAR_STYLE.DOUBLE_QUOTED:\n return renderDoubleQuoted(layout)\n }\n}\n\nfunction renderPlain (layout: ScalarLayout): string {\n return encodeFlowBreaks(layout.node.value, layout.shiftOfContent)\n}\n\nfunction renderSingleQuoted (layout: ScalarLayout): string {\n const value = encodeFlowBreaks(layout.node.value, layout.shiftOfContent)\n return `'${value.replace(/'/g, \"''\")}'`\n}\n\nfunction renderLiteralBlock (layout: ScalarLayout): string {\n const value = layout.node.value\n\n return '|' + blockHeader(value, layout.shiftOfParent, layout.shiftOfContent) +\n dropEndingNewline(indentString(value, layout.shiftOfContent))\n}\n\nfunction renderFoldedBlock (layout: ScalarLayout): string {\n const value = layout.node.value\n const w = layout.presenterOptions.lineWidth\n let availableWidth = Infinity\n\n if (w !== -1) {\n availableWidth = Math.max(\n Math.min(w, MIN_SCALAR_CONTENT_WIDTH),\n w - layout.shiftOfContent\n )\n }\n\n return '>' + blockHeader(value, layout.shiftOfParent, layout.shiftOfContent) +\n dropEndingNewline(indentString(\n foldBlockScalar(value, availableWidth),\n layout.shiftOfContent\n ))\n}\n\nfunction renderDoubleQuoted (layout: ScalarLayout): string {\n return `\"${escapeString(layout.node.value)}\"`\n}\n\n// Flow scalars fold line breaks: a run of k source line breaks reparses to k-1\n// literal LF characters. Encode each run of p literal LF characters as p+1\n// breaks and indent the following content line.\nfunction encodeFlowBreaks (string: string, shiftOfContent: number): string {\n let nextLF = string.indexOf('\\n')\n if (nextLF === -1) return string\n\n const pad = ' '.repeat(shiftOfContent)\n let result = string.slice(0, nextLF)\n\n const lineRe = /(\\n+)([^\\n]*)/g\n lineRe.lastIndex = nextLF\n let match\n\n while ((match = lineRe.exec(string))) {\n const breaks = match[1].length\n const line = match[2]\n result += '\\n'.repeat(breaks + 1) + pad + line\n }\n\n return result\n}\n\n// Indents every line in a string. Empty lines (\\n only) are not indented.\nfunction indentString (string: string, spaces: number): string {\n const indent = ' '.repeat(spaces)\n let position = 0\n let result = ''\n const length = string.length\n\n while (position < length) {\n let line\n const next = string.indexOf('\\n', position)\n\n if (next === -1) {\n line = string.slice(position)\n position = length\n } else {\n line = string.slice(position, next + 1)\n position = next + 1\n }\n\n if (line.length && line !== '\\n') result += indent\n\n result += line\n }\n\n return result\n}\n\nfunction needIndentIndicator (string: string): boolean {\n return /^\\n* /.test(string)\n}\n\nfunction blockHeader (string: string, shiftOfParent: number, shiftOfContent: number): string {\n const indentIndicator = needIndentIndicator(string)\n ? String(shiftOfContent - shiftOfParent)\n : ''\n\n // The string '\\n' counts as a trailing empty line.\n const clip = string[string.length - 1] === '\\n'\n const keep = clip && (string[string.length - 2] === '\\n' || string === '\\n')\n const chomp = keep ? '+' : (clip ? '' : '-')\n\n return `${indentIndicator}${chomp}\\n`\n}\n\n// The presenter adds its own trailing newline.\nfunction dropEndingNewline (string: string): string {\n return string[string.length - 1] === '\\n' ? string.slice(0, -1) : string\n}\n\nfunction isMoreIndented (char: string): boolean {\n return char === ' ' || char === '\\t'\n}\n\nfunction foldLine (line: string, width: number): string {\n if (line === '' || isMoreIndented(line[0])) return line\n\n const breakRe = / [^ \\t]/g\n let match\n let start = 0\n let end\n let curr = 0\n let next = 0\n let result = ''\n\n while ((match = breakRe.exec(line))) {\n next = match.index\n\n if (next - start > width) {\n end = (curr > start) ? curr : next\n result += `\\n${line.slice(start, end)}`\n start = end + 1\n }\n\n curr = next\n }\n\n result += '\\n'\n\n if (line.length - start > width && curr > start) {\n result += `${line.slice(start, curr)}\\n${line.slice(curr + 1)}`\n } else {\n result += line.slice(start)\n }\n\n return result.slice(1)\n}\n\nfunction foldBlockScalar (string: string, width: number): string {\n const lineRe = /(\\n+)([^\\n]*)/g\n\n let nextLF = string.indexOf('\\n')\n if (nextLF === -1) nextLF = string.length\n lineRe.lastIndex = nextLF\n\n let result = foldLine(string.slice(0, nextLF), width)\n let prevMoreIndented = string[0] === '\\n' || isMoreIndented(string[0])\n let moreIndented\n let match\n\n while ((match = lineRe.exec(string))) {\n const prefix = match[1]\n const line = match[2]\n\n moreIndented = line !== '' && isMoreIndented(line[0])\n result += prefix +\n ((!prevMoreIndented && !moreIndented && line !== '') ? '\\n' : '') +\n foldLine(line, width)\n prevMoreIndented = moreIndented\n }\n\n return result\n}\n\n// Characters escaped in Double-Quoted Style:\n//\n// - the inverse of YAML 1.2.2 [1] c-printable;\n// - TAB, LF and CR, which c-printable includes;\n// - NEL, NBSP, LS, PS and BOM, which are escaped to make invisible content\n// visible;\n// - double quote and backslash, which must be escaped because they have\n// syntactic meaning.\n//\n// In Unicode mode, the surrogate range matches unpaired surrogates but does not\n// match either code unit of a valid surrogate pair.\n// https://yaml.org/spec/1.2.2/#rule-c-printable\nconst CHARACTERS_TO_ESCAPE =\n /[\"\\\\\\x00-\\x1F\\x7F-\\xA0\\u2028\\u2029\\uD800-\\uDFFF\\uFEFF\\uFFFE\\uFFFF]/gu\n\nfunction escapeCharacter (character: string): string {\n switch (character) {\n case '\\x00': return '\\\\0'\n case '\\x07': return '\\\\a'\n case '\\x08': return '\\\\b'\n case '\\x09': return '\\\\t'\n case '\\x0A': return '\\\\n'\n case '\\x0B': return '\\\\v'\n case '\\x0C': return '\\\\f'\n case '\\x0D': return '\\\\r'\n case '\\x1B': return '\\\\e'\n case '\"': return '\\\\\"'\n case '\\\\': return '\\\\\\\\'\n case '\\x85': return '\\\\N'\n case '\\xA0': return '\\\\_'\n case '\\u2028': return '\\\\L'\n case '\\u2029': return '\\\\P'\n }\n\n const code = character.charCodeAt(0)\n const hex = code.toString(16).toUpperCase()\n\n if (code <= 0xFF) return `\\\\x${'0'.repeat(2 - hex.length)}${hex}`\n\n return `\\\\u${'0'.repeat(4 - hex.length)}${hex}`\n}\n\nfunction escapeString (string: string): string {\n return string.replace(CHARACTERS_TO_ESCAPE, escapeCharacter)\n}\n\nexport {\n detectAllowedStyles,\n renderScalar,\n type ScalarLayout,\n type ScalarStyleRule\n}\n","// AST → text. Walks the node `kind`; the scalar machinery (style selection,\n// quoting, folding) is driven by node text, not by sniffing a JS value.\n\nimport { YAMLException } from '../common/exception.ts'\nimport { tagNameShort } from '../common/tagname.ts'\nimport { COLLECTION_STYLE, SCALAR_STYLE } from '../parser/events.ts'\nimport { type Schema } from '../schema.ts'\nimport {\n type Node,\n type Document,\n type ScalarNode,\n type SequenceNode,\n type MappingNode\n} from './nodes.ts'\nimport {\n detectAllowedStyles,\n renderScalar,\n type ScalarLayout,\n type ScalarStyleRule\n} from './scalar_styler.ts'\nimport { DEFAULT_SCALAR_STYLE_RULES } from './styler_defaults.ts'\n\nconst CHAR_LINE_FEED = 0x0A /* LF */\n\n/** @category AST */\ninterface PresenterOptions {\n /** Schema used when selecting a safe scalar style. */\n schema: Schema\n\n /**\n * Indentation width in spaces.\n *\n * @defaultValue `2`\n */\n indent?: number\n\n /**\n * Does not add an indentation level to array elements when enabled.\n *\n * @defaultValue `false`\n */\n seqNoIndent?: boolean\n\n /**\n * Allows a nested collection to start on the same line after `-`.\n *\n * @defaultValue `true`\n */\n seqInlineFirst?: boolean\n\n /**\n * Preferred line width for folding. Unbreakable and more-indented lines may\n * exceed it. Set to `-1` for unlimited width.\n *\n * @defaultValue `80`\n */\n lineWidth?: number\n\n /**\n * Adds spaces inside flow collection brackets: `{a: 1}` becomes `{ a: 1 }`.\n *\n * @defaultValue `false`\n */\n flowBracketPadding?: boolean\n\n /**\n * Omits the space after commas in flow collections: `[1, 2]` becomes\n * `[1,2]`.\n *\n * @defaultValue `false`\n */\n flowSkipCommaSpace?: boolean\n\n /**\n * Omits the space after `:` in flow mappings: `{\"a\": 1}` becomes `{\"a\":1}`.\n *\n * This forces `quoteFlowKeys`; otherwise `a:1` would be parsed as a single\n * plain scalar instead of a mapping entry.\n *\n * @defaultValue `false`\n */\n flowSkipColonSpace?: boolean\n\n /**\n * Quotes flow mapping keys: `{a: 1}` becomes `{\"a\": 1}`.\n *\n * @defaultValue `false`\n */\n quoteFlowKeys?: boolean\n\n /**\n * Quoting style to use when a string needs quotes.\n *\n * @defaultValue `'single'`\n */\n quoteStyle?: 'single' | 'double'\n\n /**\n * Quotes all non-key strings using {@link quoteStyle}.\n *\n * @defaultValue `false`\n */\n forceQuotes?: boolean\n\n /**\n * Customizes how strings are rendered as plain, quoted, literal, or folded\n * scalars. Rules are applied in array order; providing this option replaces\n * the {@link DEFAULT_SCALAR_STYLE_RULES default rules}.\n *\n * @defaultValue `Object.values(DEFAULT_SCALAR_STYLE_RULES)`\n */\n scalarStyleRules?: readonly ScalarStyleRule[]\n\n /**\n * Prints an explicit tag before an anchor: `&ref_0 !!set` becomes\n * `!!set &ref_0`.\n *\n * @defaultValue `false`\n */\n tagBeforeAnchor?: boolean\n}\n\nconst DEFAULT_PRESENTER_OPTIONS: Required> = {\n indent: 2,\n seqNoIndent: false,\n seqInlineFirst: true,\n lineWidth: 80,\n flowBracketPadding: false,\n flowSkipCommaSpace: false,\n flowSkipColonSpace: false,\n quoteFlowKeys: false,\n quoteStyle: 'single',\n forceQuotes: false,\n scalarStyleRules: Object.keys(DEFAULT_SCALAR_STYLE_RULES)\n .map(name => Reflect.get(DEFAULT_SCALAR_STYLE_RULES, name)),\n tagBeforeAnchor: false\n}\n\ninterface PresenterState extends Required {\n defaultScalarTagName: string\n openEnded: boolean\n}\n\nfunction nodeTagShort (node: ScalarNode | SequenceNode | MappingNode) {\n return node.tagged ? node.tag : tagNameShort(node.tag)\n}\n\nfunction createPresenterState (options: PresenterOptions): PresenterState {\n const opts = {\n ...DEFAULT_PRESENTER_OPTIONS,\n ...options\n }\n\n if (opts.flowSkipColonSpace) {\n opts.quoteFlowKeys = true\n }\n\n return {\n ...opts,\n defaultScalarTagName: opts.schema.defaultScalarTag.tagName,\n openEnded: false\n }\n}\n\nfunction generateNextLine (state: PresenterState, level: number) {\n return `\\n${' '.repeat(state.indent * level)}`\n}\n\nfunction scalarLayout (state: PresenterState, node: ScalarNode, parent: Readonly | null, level: number,\n isKey: boolean, flowOnly: boolean): ScalarLayout {\n const shiftOfParent = level === 0 ? -1 : state.indent * (level - 1)\n const shiftOfContent = state.indent * Math.max(1, level)\n\n return {\n node,\n parent,\n level,\n isKey,\n flowOnly,\n shiftOfParent,\n shiftOfContent,\n shiftOfFirstLine: level === 0 ? 0 : state.indent * level,\n presenterOptions: state,\n allowedStylesMask: 0,\n style: node.style\n }\n}\n\nfunction writeFlowSequence (state: PresenterState, level: number, node: SequenceNode) {\n let result = ''\n\n for (let index = 0, length = node.items.length; index < length; index += 1) {\n const item = writeNode(state, level, node.items[index], node, {}).text\n if (index > 0) result += `,${!state.flowSkipCommaSpace ? ' ' : ''}`\n result += item\n }\n\n const pad = state.flowBracketPadding && node.items.length > 0 ? ' ' : ''\n return `[${pad}${result}${pad}]`\n}\n\nfunction writeBlockSequence (state: PresenterState, level: number, node: SequenceNode, compact: boolean) {\n let result = ''\n\n for (let index = 0, length = node.items.length; index < length; index += 1) {\n const item = writeNode(state, level + 1, node.items[index], node,\n { block: true, compact: state.seqInlineFirst, isblockseq: true }).text\n\n if (!compact || result !== '') {\n result += generateNextLine(state, level)\n }\n\n // No trailing space when the value renders empty (e.g. null → '').\n if (item === '' || CHAR_LINE_FEED === item.charCodeAt(0)) {\n result += '-'\n } else {\n result += '- '\n }\n\n result += item\n }\n\n return result\n}\n\nfunction writeFlowMapping (state: PresenterState, level: number, node: MappingNode) {\n let result = ''\n\n for (const { key, value } of node.items) {\n let pairBuffer = ''\n if (result !== '') pairBuffer += `,${!state.flowSkipCommaSpace ? ' ' : ''}`\n\n const keyRender = writeNode(state, level, key, node, { iskey: true })\n const keyText = keyRender.text\n\n const valueText = writeNode(state, level, value, node, {}).text\n // No separating space when the value renders empty (e.g. null → '').\n const sep = state.flowSkipColonSpace || valueText === '' ? '' : ' '\n\n // An alias or a property-only scalar must be separated from `:` because the\n // colon can otherwise be consumed as part of the alias/anchor/tag name.\n const keyIsBareProps = key.kind === 'scalar' && keyRender.noBody &&\n (key.tagged || key.anchor !== undefined)\n const keyColonSep = key.kind === 'alias' || keyIsBareProps ? ' ' : ''\n\n pairBuffer += `${keyText}${keyColonSep}:${sep}${valueText}`\n\n result += pairBuffer\n }\n\n const pad = state.flowBracketPadding && result !== '' ? ' ' : ''\n return `{${pad}${result}${pad}}`\n}\n\nfunction writeBlockMapping (state: PresenterState, level: number, node: MappingNode, compact: boolean) {\n let result = ''\n\n for (let index = 0, length = node.items.length; index < length; index += 1) {\n let pairBuffer = ''\n\n if (!compact || result !== '') {\n pairBuffer += generateNextLine(state, level)\n }\n\n const { key, value } = node.items[index]\n\n // A block key — a block collection (mapping/sequence) or a block scalar\n // (literal/folded) — can't sit on a `key:` line, so it's written with block\n // context and the pair takes the explicit `? key / : value` form. A simple\n // scalar key stays inline (flow-vs-block is invisible there).\n const keyIsBlock =\n ((key.kind === 'mapping' || key.kind === 'sequence') &&\n key.style === COLLECTION_STYLE.BLOCK && key.items.length !== 0) ||\n (key.kind === 'scalar' &&\n (key.style === SCALAR_STYLE.LITERAL_BLOCK || key.style === SCALAR_STYLE.FOLDED_BLOCK))\n\n // The `?`/`:` indicators shift content right like a `-`, so a block key or\n // value that stays on the indicator line keeps its indentation under\n // seqNoIndent (`isblockseq`). One that drops to its own line (tag/anchor)\n // collapses to the parent indent, so leave the flag off there.\n const keyRender = keyIsBlock\n ? writeNode(state, level + 1, key, node,\n { block: true, compact: true, isblockseq: !cannotBeCompact(state, key, level + 1) })\n : writeNode(state, level + 1, key, node, { block: true, compact: true, iskey: true })\n const keyText = keyRender.text\n\n // Block key, over-long key, or multiline scalar key forces explicit form.\n // Multiline isn't a spec requirement — just matches pyyaml's simple-key rule.\n const keyHasLineBreak = key.kind === 'scalar' && key.value.indexOf('\\n') !== -1\n\n // YAML limits an implicit key to 1024 Unicode code points. `length` counts\n // UTF-16 code units, never fewer than code points, so it is a cheap safe\n // precheck. The `u` regexp then counts each [\\s\\S] match as one code point.\n const keyIsTooLong = keyText.length > 1024 && /^[\\s\\S]{1025}/u.test(keyText)\n const explicitPair = keyIsBlock || keyHasLineBreak || keyIsTooLong\n\n if (explicitPair) {\n if (keyText && CHAR_LINE_FEED === keyText.charCodeAt(0)) {\n pairBuffer += '?'\n } else {\n pairBuffer += '? '\n }\n }\n\n pairBuffer += keyText\n\n if (explicitPair) {\n pairBuffer += generateNextLine(state, level)\n }\n\n const valueText = writeNode(state, level + 1, value, node,\n { block: true, compact: explicitPair, isblockseq: explicitPair && !cannotBeCompact(state, value, level + 1) }).text\n\n // Keep a space before the colon when the key text ends in a leading\n // property rather than scalar content, so the colon can't be read as part\n // of it. Two cases: an inline alias key (`*b : v`), and an empty scalar key\n // whose whole text is its anchor/tag (`&a :`, `!!str :`) — without the\n // space `&a:` reparses as an anchored value, dropping the null key.\n const keyIsBareProps = key.kind === 'scalar' && keyRender.noBody &&\n (key.tagged || key.anchor !== undefined)\n const keyColonSep = !explicitPair && (key.kind === 'alias' || keyIsBareProps) ? ' ' : ''\n\n // No trailing space when the value renders empty (e.g. null → '').\n if (valueText === '' || CHAR_LINE_FEED === valueText.charCodeAt(0)) {\n pairBuffer += `${keyColonSep}:`\n } else {\n pairBuffer += `${keyColonSep}: `\n }\n\n pairBuffer += valueText\n\n result += pairBuffer\n }\n\n return result\n}\n\n// Where a node sits relative to its parent — drives layout/style decisions.\n// All flags default to false (the flow-context, non-key, non-compact case).\ninterface NodeContext {\n block?: boolean // block context (vs flow); propagates downward\n compact?: boolean // may start on the current line (no leading newline)\n iskey?: boolean // node is a mapping key\n isblockseq?: boolean // content follows an indicator (`-`, or `?`/`:` in an\n // explicit pair) that already shifted it right; keeps\n // its indentation under seqNoIndent\n}\n\ninterface NodeRender {\n text: string\n noBody: boolean\n}\n\n// A node can't sit compact on its parent's indicator (`-`/`?`/`:`) line when it\n// carries leading props (tag/anchor) that would collide with the indicator, or\n// when the indent step is too narrow for the 2-char indicator. Such a node drops\n// to its own line; a block collection that does so also collapses its seqNoIndent\n// indentation back to the parent.\nfunction cannotBeCompact (state: PresenterState, node: Node, level: number) {\n if (node.kind === 'alias') return true\n return node.tagged || node.anchor !== undefined || (state.indent < 2 && level > 0)\n}\n\nfunction writeNode (state: PresenterState, level: number, node: Node,\n parent: Readonly | null, ctx: NodeContext): NodeRender {\n if (node.kind === 'alias') {\n state.openEnded = false\n return { text: `*${node.anchor}`, noBody: false }\n }\n\n const { block = false, iskey = false, isblockseq = false } = ctx\n let compact = ctx.compact ?? false\n\n const hasAnchor = node.anchor !== undefined\n\n if (cannotBeCompact(state, node, level)) {\n compact = false\n }\n\n let body: string\n let shouldPrintTag = node.tagged\n const useBlockCollection = block &&\n (node.kind === 'mapping' || node.kind === 'sequence') &&\n node.style === COLLECTION_STYLE.BLOCK && node.items.length !== 0\n\n if (node.kind === 'mapping') {\n if (useBlockCollection) {\n body = writeBlockMapping(state, level, node, compact)\n } else {\n body = writeFlowMapping(state, level, node)\n }\n } else if (node.kind === 'sequence') {\n if (useBlockCollection) {\n if (state.seqNoIndent && !isblockseq && level > 0) {\n body = writeBlockSequence(state, level - 1, node, compact)\n } else {\n body = writeBlockSequence(state, level, node, compact)\n }\n } else {\n body = writeFlowSequence(state, level, node)\n }\n } else {\n const layout = scalarLayout(state, node, parent, level, iskey, !block)\n\n detectAllowedStyles(layout)\n for (const rule of state.scalarStyleRules) rule(layout)\n\n body = renderScalar(layout)\n state.openEnded =\n (layout.style === SCALAR_STYLE.LITERAL_BLOCK || layout.style === SCALAR_STYLE.FOLDED_BLOCK) &&\n (node.value === '\\n' || node.value.endsWith('\\n\\n'))\n\n // A flow sequence entry cannot be completely empty. Print the semantic tag\n // as the node property that explicitly indicates the entry's existence.\n shouldPrintTag = node.tagged ||\n (body === '' && layout.flowOnly && parent?.kind === 'sequence' && !hasAnchor) ||\n (layout.style !== SCALAR_STYLE.PLAIN && node.tag !== state.defaultScalarTagName)\n }\n\n // A flow collection ends with its closing indicator, not with its last child.\n if ((node.kind === 'mapping' || node.kind === 'sequence') && !useBlockCollection) {\n state.openEnded = false\n }\n\n // An indicator plus its mandatory separator occupies 2 columns. For wider\n // indentation, pad a compact block collection so its first item starts at\n // the same column as the following items.\n if (useBlockCollection && compact && level > 0 && state.indent > 2) {\n body = `${' '.repeat(state.indent - 2)}${body}`\n }\n\n const noBody = body === ''\n let text = body\n\n if (shouldPrintTag || hasAnchor) {\n const props: string[] = []\n const tag = shouldPrintTag ? nodeTagShort(node) : null\n const anchor = hasAnchor ? `&${node.anchor}` : null\n\n if (state.tagBeforeAnchor) {\n if (tag !== null) props.push(tag)\n if (anchor !== null) props.push(anchor)\n } else {\n if (anchor !== null) props.push(anchor)\n if (tag !== null) props.push(tag)\n }\n\n // No separator when the body is empty (e.g. `&anchor` on a null node) or\n // already starts on its own line.\n const sep = body === '' || body.charCodeAt(0) === CHAR_LINE_FEED ? '' : ' '\n text = `${props.join(' ')}${sep}${body}`\n }\n\n return { text, noBody }\n}\n\n// A bare (untagged, unanchored) non-empty block collection: writeNode renders it\n// in compact form with its first item on the opening line. That works mid-stream,\n// but right after a `---` the first item must drop to the next line. A tag/anchor\n// already forces the body onto its own line, so those stay on the `---` line.\nfunction rootStartsOwnLine (node: Node) {\n return (node.kind === 'sequence' || node.kind === 'mapping') &&\n node.style === COLLECTION_STYLE.BLOCK &&\n node.items.length !== 0 &&\n !node.tagged &&\n node.anchor === undefined\n}\n\nfunction writeDocumentDirectives (doc: Document) {\n let result = ''\n\n for (const directive of doc.directives) {\n if (directive.kind === 'yaml') {\n result += `%YAML ${directive.version}\\n`\n continue\n }\n\n const { handle, prefix } = directive\n result += `%TAG ${handle} ${prefix}\\n`\n }\n\n return result\n}\n\n/**\n * Build YAML from AST.\n *\n * @category AST\n */\nfunction present (documents: Document[], options: PresenterOptions): string {\n const state = createPresenterState(options)\n let result = ''\n let previousEnded = false\n\n for (let index = 0; index < documents.length; index += 1) {\n const doc = documents[index]\n state.openEnded = false\n const directives = writeDocumentDirectives(doc)\n const hasDirectives = directives !== ''\n const marker = doc.explicitStart || hasDirectives || (index > 0 && !previousEnded)\n\n result += directives\n\n if (doc.contents === null) {\n if (marker) result += '---\\n'\n } else if (marker) {\n const body = writeNode(state, 0, doc.contents, null, { block: true, compact: true }).text\n // Content shares the `---` line, except: an empty render (no separator at\n // all), a bare block collection (wraps to the next line), or directives\n // forcing `---` onto its own line.\n const sep = body === '' ? '' : (hasDirectives || rootStartsOwnLine(doc.contents) ? '\\n' : ' ')\n result += `---${sep}${body}\\n`\n } else {\n result += writeNode(state, 0, doc.contents, null, { block: true, compact: true }).text + '\\n'\n }\n\n previousEnded = doc.explicitEnd || state.openEnded\n if (previousEnded) {\n result += '...\\n'\n }\n }\n\n return result\n}\n\nexport {\n DEFAULT_PRESENTER_OPTIONS,\n present,\n type PresenterOptions\n}\n","import { DUMP_SCHEMA, type Schema } from './schema.ts'\nimport { COLLECTION_STYLE } from './parser/events.ts'\nimport { jsToAst } from './ast/from_js.ts'\nimport { visit, VISIT_SKIP } from './ast/visit.ts'\nimport { type Document } from './ast/nodes.ts'\nimport {\n DEFAULT_PRESENTER_OPTIONS,\n present,\n type PresenterOptions\n} from './ast/presenter.ts'\nimport { pick } from './common/object.ts'\n\n/** @category Main */\ninterface DumpOptions extends Omit {\n /**\n * Schema to use.\n *\n * @defaultValue {@link DUMP_SCHEMA}\n */\n schema?: Schema\n\n /**\n * Skips invalid types instead of throwing. Invalid mapping pairs and sequence\n * items are skipped; `undefined` sequence items are serialized as `null`.\n *\n * @defaultValue `false`\n */\n skipInvalid?: boolean\n\n /**\n * Inlines duplicate objects instead of converting them into references.\n *\n * @defaultValue `false`\n */\n noRefs?: boolean\n\n /**\n * Nesting level at which collections switch from block to flow style. Set to\n * `-1` to never switch automatically.\n *\n * @defaultValue `-1`\n */\n flowLevel?: number\n\n /**\n * Sorts mapping keys when `true`. A function can be provided to define the\n * sort order.\n *\n * @defaultValue `false`\n * @deprecated Use {@link transform} to reorder mapping items.\n */\n sortKeys?: boolean | ((a: any, b: any) => number)\n\n /**\n * Mutates the generated AST before it is rendered.\n *\n * @example Sort mapping keys:\n *\n * ```typescript\n * import { dump, visit } from 'js-yaml'\n *\n * dump(value, {\n * transform: documents => visit(documents, node => {\n * if (node.kind === 'mapping') node.items.sort((a, b) => {\n * const x = a.key.kind === 'scalar' ? a.key.value : ''\n * const y = b.key.kind === 'scalar' ? b.key.value : ''\n * return x.localeCompare(y)\n * })\n * })\n * })\n * ```\n */\n transform?: (documents: Document[]) => void\n}\n\nconst DEFAULT_DUMP_OPTIONS: Required = {\n ...DEFAULT_PRESENTER_OPTIONS,\n schema: DUMP_SCHEMA,\n skipInvalid: false,\n noRefs: false,\n flowLevel: -1,\n sortKeys: false,\n transform: () => {}\n}\n\nfunction defaultCompareFn (a: any, b: any) {\n const x = String(a)\n const y = String(b)\n\n if (x < y) return -1\n if (x > y) return 1\n return 0\n}\n\n/**\n * Serializes JS object as a YAML document. By default it can dump every\n * supported YAML type, so it throws an exception if you try to dump regexps or\n * functions. However, you can disable exceptions by setting the\n * {@link DumpOptions.skipInvalid} option to `true`.\n *\n * @category Main\n */\nfunction dump (input: any, options: DumpOptions = {}) {\n const opts = { ...DEFAULT_DUMP_OPTIONS, ...options }\n\n const documents = jsToAst(input, opts.schema, {\n noRefs: opts.noRefs,\n skipInvalid: opts.skipInvalid\n })\n\n // flowLevel: every node at this depth switches to flow; the presenter forces\n // everything below into flow too, so the walk stops there.\n if (opts.flowLevel >= 0) {\n visit(documents, (node, ctx) => {\n if (ctx.depth < opts.flowLevel) return\n if (node.kind === 'sequence' || node.kind === 'mapping') {\n node.style = COLLECTION_STYLE.FLOW\n }\n return VISIT_SKIP\n })\n }\n\n if (opts.sortKeys) {\n const compareFn = opts.sortKeys === true ? defaultCompareFn : opts.sortKeys\n\n visit(documents, node => {\n if (node.kind !== 'mapping') return\n\n node.items.sort((a, b) => compareFn(\n a.key.kind === 'scalar' ? a.key.value : '',\n b.key.kind === 'scalar' ? b.key.value : ''\n ))\n })\n }\n\n opts.transform(documents)\n\n const PRESENTER_OPT_KEYS = Object.keys(DEFAULT_PRESENTER_OPTIONS) as\n (keyof typeof DEFAULT_PRESENTER_OPTIONS)[]\n\n return present(documents, { ...pick(opts, PRESENTER_OPT_KEYS), schema: opts.schema })\n}\n\nexport {\n dump,\n\n type DumpOptions\n}\n","// Parser events → AST. The second entry into the AST world (the first being\n// `jsToAst`): instead of building JS values like the constructor, it mirrors the\n// same document/sequence/mapping frame walk and emits `Node`s that keep the\n// original styles, tags and anchors, so parsed YAML can be re-dumped faithfully.\n\nimport {\n EVENT_ID,\n SCALAR_STYLE,\n type CollectionStyle,\n type Event,\n type MappingEvent,\n type ScalarEvent,\n type SequenceEvent\n} from '../parser/events.ts'\nimport { getScalarValue } from '../parser/parser_scalar.ts'\nimport { type Schema } from '../schema.ts'\nimport {\n type Node,\n type Document,\n type ScalarNode,\n type SequenceNode,\n type MappingNode,\n type AliasNode\n} from './nodes.ts'\n\nconst NO_RANGE = -1\n\ninterface DocumentFrame {\n kind: 'document'\n doc: Document\n}\n\ninterface SequenceFrame {\n kind: 'sequence'\n node: SequenceNode\n}\n\ninterface MappingFrame {\n kind: 'mapping'\n node: MappingNode\n key: Node | null\n}\n\ntype Frame = DocumentFrame | SequenceFrame | MappingFrame\n\n/** @category AST */\ninterface FromEventsOptions {\n /** Source text referenced by offsets in `events`. */\n source: string\n\n /** Schema used to resolve implicit scalar tags. */\n schema: Schema\n}\n\ninterface FromEventsState {\n source: string\n schema: Schema\n eventIndex: number\n position: number\n frames: Frame[]\n documents: Document[]\n}\n\nfunction eventPosition (event: Event) {\n if ('tagStart' in event && event.tagStart !== NO_RANGE) return event.tagStart\n if ('anchorStart' in event && event.anchorStart !== NO_RANGE) return event.anchorStart\n if ('valueStart' in event && event.valueStart !== NO_RANGE) return event.valueStart\n if ('start' in event) return event.start\n return 0\n}\n\nfunction rawTag (state: FromEventsState, event: ScalarEvent | SequenceEvent | MappingEvent) {\n return event.tagStart === NO_RANGE\n ? ''\n : state.source.slice(event.tagStart, event.tagEnd)\n}\n\nfunction anchorName (state: FromEventsState, event: ScalarEvent | SequenceEvent | MappingEvent) {\n return event.anchorStart === NO_RANGE\n ? undefined\n : state.source.slice(event.anchorStart, event.anchorEnd)\n}\n\nfunction buildScalar (state: FromEventsState, event: ScalarEvent): ScalarNode {\n const value = getScalarValue(state.source, event)\n const raw = rawTag(state, event)\n\n let tag: string\n let tagged = false\n if (raw !== '') {\n tagged = true\n tag = raw\n } else if (event.style === SCALAR_STYLE.PLAIN) {\n tag = state.schema.resolveImplicitScalarTag(value).tag.tagName\n } else {\n tag = state.schema.defaultScalarTag.tagName\n }\n\n return { kind: 'scalar', tag, tagged, style: event.style, anchor: anchorName(state, event), value }\n}\n\nfunction buildCollection (\n state: FromEventsState,\n event: SequenceEvent | MappingEvent,\n defaultTagName: string\n): { tag: string, tagged: boolean, style: CollectionStyle, anchor?: string } {\n const raw = rawTag(state, event)\n\n let tag: string\n let tagged = false\n if (raw === '') {\n tag = defaultTagName\n } else {\n tag = raw\n tagged = true\n }\n\n return { tag, tagged, style: event.style, anchor: anchorName(state, event) }\n}\n\nfunction addNode (state: FromEventsState, node: Node) {\n const frame = state.frames[state.frames.length - 1]\n\n if (frame.kind === 'document') {\n frame.doc.contents = node\n } else if (frame.kind === 'sequence') {\n frame.node.items.push(node)\n } else if (frame.key) {\n frame.node.items.push({ key: frame.key, value: node })\n frame.key = null\n } else {\n frame.key = node\n }\n}\n\n/**\n * Builds an AST from parser events\n *\n * @category AST\n */\nfunction eventsToAst (events: Event[], options: FromEventsOptions): Document[] {\n const state: FromEventsState = {\n source: options.source,\n schema: options.schema,\n eventIndex: 0,\n position: 0,\n frames: [],\n documents: []\n }\n\n while (state.eventIndex < events.length) {\n const event = events[state.eventIndex++]\n state.position = eventPosition(event)\n\n switch (event.type) {\n case EVENT_ID.DOCUMENT: {\n const doc: Document = {\n contents: null,\n explicitStart: event.explicitStart,\n explicitEnd: event.explicitEnd,\n directives: event.directives\n }\n state.frames.push({ kind: 'document', doc })\n break\n }\n\n case EVENT_ID.SCALAR:\n addNode(state, buildScalar(state, event))\n break\n\n case EVENT_ID.SEQUENCE: {\n const { tag, tagged, style, anchor } = buildCollection(state, event, 'tag:yaml.org,2002:seq')\n const node: SequenceNode = { kind: 'sequence', tag, tagged, style, anchor, items: [] }\n state.frames.push({ kind: 'sequence', node })\n break\n }\n\n case EVENT_ID.MAPPING: {\n const { tag, tagged, style, anchor } = buildCollection(state, event, 'tag:yaml.org,2002:map')\n const node: MappingNode = { kind: 'mapping', tag, tagged, style, anchor, items: [] }\n state.frames.push({ kind: 'mapping', node, key: null })\n break\n }\n\n case EVENT_ID.ALIAS: {\n const name = state.source.slice(event.anchorStart, event.anchorEnd)\n const node: AliasNode = { kind: 'alias', anchor: name }\n addNode(state, node)\n break\n }\n\n case EVENT_ID.POP: {\n const frame = state.frames.pop()!\n if (frame.kind === 'mapping' && frame.key) {\n throw new Error('incomplete mapping pair in event stream')\n }\n if (frame.kind === 'document') {\n state.documents.push(frame.doc)\n } else {\n addNode(state, frame.node)\n }\n break\n }\n }\n }\n\n return state.documents\n}\n\nexport {\n eventsToAst,\n type FromEventsOptions\n}\n","export {\n Schema,\n FAILSAFE_SCHEMA,\n JSON_SCHEMA,\n CORE_SCHEMA,\n YAML11_SCHEMA,\n DUMP_SCHEMA\n} from './schema.ts'\n\nexport {\n NOT_RESOLVED,\n defineScalarTag,\n defineSequenceTag,\n defineMappingTag,\n type ScalarTagDefinition,\n type SequenceTagDefinition,\n type MappingTagDefinition,\n type TagDefinition,\n type ScalarTagOptions,\n type SequenceTagOptions,\n type MappingTagOptions\n} from './tag.ts'\n\nexport { strTag } from './tag/scalar/str.ts'\nexport { nullCoreTag } from './tag/scalar/null_core.ts'\nexport { nullJsonTag } from './tag/scalar/null_json.ts'\nexport { nullYaml11Tag } from './tag/scalar/null_yaml11.ts'\nexport { boolCoreTag } from './tag/scalar/bool_core.ts'\nexport { boolJsonTag } from './tag/scalar/bool_json.ts'\nexport { boolYaml11Tag } from './tag/scalar/bool_yaml11.ts'\nexport { intCoreTag } from './tag/scalar/int_core.ts'\nexport { intJsonTag } from './tag/scalar/int_json.ts'\nexport { intYaml11Tag } from './tag/scalar/int_yaml11.ts'\nexport { floatCoreTag } from './tag/scalar/float_core.ts'\nexport { floatJsonTag } from './tag/scalar/float_json.ts'\nexport { floatYaml11Tag } from './tag/scalar/float_yaml11.ts'\nexport { mergeTag } from './tag/scalar/merge.ts'\nexport { binaryTag } from './tag/scalar/binary.ts'\nexport { timestampTag } from './tag/scalar/timestamp.ts'\n\nexport { seqTag } from './tag/sequence/seq.ts'\nexport { omapTag } from './tag/sequence/omap.ts'\nexport { pairsTag } from './tag/sequence/pairs.ts'\n\nexport { mapTag } from './tag/mapping/map.ts'\nexport { realMapTag } from './tag/mapping/real_map.ts'\nexport { legacyMapTag } from './tag/mapping/legacy_map.ts'\nexport { setTag } from './tag/mapping/set.ts'\n\nexport { load, loadAll, type LoadOptions } from './load.ts'\nexport { dump, type DumpOptions } from './dump.ts'\nexport { YAMLException } from './common/exception.ts'\n\nexport {\n EVENT_ID,\n SCALAR_STYLE,\n COLLECTION_STYLE,\n CHOMPING_MODE,\n type EventId,\n type ScalarStyle,\n type CollectionStyle,\n type ChompingMode,\n\n type DocumentDirective,\n type DocumentEvent,\n type SequenceEvent,\n type MappingEvent,\n type ScalarEvent,\n type AliasEvent,\n type PopEvent,\n type Event\n} from './parser/events.ts'\n\nexport {\n parseEvents,\n type ParserOptions\n} from './parser/parser.ts'\n\nexport { getScalarValue } from './parser/parser_scalar.ts'\n\nexport {\n constructFromEvents,\n type ConstructorOptions\n} from './parser/constructor.ts'\n\nexport { eventsToAst, type FromEventsOptions } from './ast/from_events.ts'\nexport { jsToAst, type FromJsOptions } from './ast/from_js.ts'\nexport { present, type PresenterOptions } from './ast/presenter.ts'\nexport { type ScalarLayout, type ScalarStyleRule } from './ast/scalar_styler.ts'\nexport { DEFAULT_SCALAR_STYLE_RULES } from './ast/styler_defaults.ts'\n\nexport {\n visit,\n VISIT_BREAK,\n VISIT_SKIP,\n type Visitor,\n type VisitContext\n} from './ast/visit.ts'\n\nexport {\n type Node,\n type Document,\n type NodeBase,\n type ScalarNode,\n type SequenceNode,\n type MappingNode,\n type AliasNode\n} from './ast/nodes.ts'\n\n// Deprecated compatibility exports\n\nimport { EVENT_ID, SCALAR_STYLE, COLLECTION_STYLE, CHOMPING_MODE } from './parser/events.ts'\n\n/** @deprecated Use `EVENT_ID.DOCUMENT` instead. @internal */\nexport const EVENT_DOCUMENT = EVENT_ID.DOCUMENT\n/** @deprecated Use `EVENT_ID.SEQUENCE` instead. @internal */\nexport const EVENT_SEQUENCE = EVENT_ID.SEQUENCE\n/** @deprecated Use `EVENT_ID.MAPPING` instead. @internal */\nexport const EVENT_MAPPING = EVENT_ID.MAPPING\n/** @deprecated Use `EVENT_ID.SCALAR` instead. @internal */\nexport const EVENT_SCALAR = EVENT_ID.SCALAR\n/** @deprecated Use `EVENT_ID.ALIAS` instead. @internal */\nexport const EVENT_ALIAS = EVENT_ID.ALIAS\n/** @deprecated Use `EVENT_ID.POP` instead. @internal */\nexport const EVENT_POP = EVENT_ID.POP\n/** @deprecated Use `SCALAR_STYLE.PLAIN` instead. @internal */\nexport const SCALAR_STYLE_PLAIN = SCALAR_STYLE.PLAIN\n/** @deprecated Use `SCALAR_STYLE.SINGLE_QUOTED` instead. @internal */\nexport const SCALAR_STYLE_SINGLE_QUOTED = SCALAR_STYLE.SINGLE_QUOTED\n/** @deprecated Use `SCALAR_STYLE.DOUBLE_QUOTED` instead. @internal */\nexport const SCALAR_STYLE_DOUBLE_QUOTED = SCALAR_STYLE.DOUBLE_QUOTED\n/** @deprecated Use `SCALAR_STYLE.LITERAL_BLOCK` instead. @internal */\nexport const SCALAR_STYLE_LITERAL_BLOCK = SCALAR_STYLE.LITERAL_BLOCK\n/** @deprecated Use `SCALAR_STYLE.FOLDED_BLOCK` instead. @internal */\nexport const SCALAR_STYLE_FOLDED_BLOCK = SCALAR_STYLE.FOLDED_BLOCK\n/** @deprecated Use `COLLECTION_STYLE.BLOCK` instead. @internal */\nexport const COLLECTION_STYLE_BLOCK = COLLECTION_STYLE.BLOCK\n/** @deprecated Use `COLLECTION_STYLE.FLOW` instead. @internal */\nexport const COLLECTION_STYLE_FLOW = COLLECTION_STYLE.FLOW\n/** @deprecated Use `CHOMPING_MODE.CLIP` instead. @internal */\nexport const CHOMPING_CLIP = CHOMPING_MODE.CLIP\n/** @deprecated Use `CHOMPING_MODE.STRIP` instead. @internal */\nexport const CHOMPING_STRIP = CHOMPING_MODE.STRIP\n/** @deprecated Use `CHOMPING_MODE.KEEP` instead. @internal */\nexport const CHOMPING_KEEP = CHOMPING_MODE.KEEP\n"],"mappings":";;;;;;;;AAKA,IAAM,eAA8B,OAAO,cAAc;;;;;;AAsMzD,SAAS,gBAAyB,SAAiB,SAAgE;;CACjH,OAAO;EACL;EACA,UAAU;EACV,WAAA,oBAAU,QAAQ,cAAA,QAAA,sBAAA,KAAA,IAAA,oBAAY;EAC9B,mBAAA,wBAAkB,QAAQ,sBAAA,QAAA,0BAAA,KAAA,IAAA,wBAAoB;EAC9C,qBAAA,wBAAoB,QAAQ,wBAAA,QAAA,0BAAA,KAAA,IAAA,wBAAsB;EAClD,SAAS,QAAQ;EACjB,UAAU,QAAQ;EAClB,YAAA,qBAAW,QAAQ,e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AI,MAAM,yCAAyC;IAE3D,IAAI,MAAM,SAAS,YACjB,MAAM,UAAU,KAAK,MAAM,GAAG;SAE9B,QAAQ,OAAO,MAAM,IAAI;IAE3B;GACF;EACF;CACF;CAEA,OAAO,MAAM;AACf;;;;AC7FA,IAAa,iBAAiB,SAAS;;AAEvC,IAAa,iBAAiB,SAAS;;AAEvC,IAAa,gBAAgB,SAAS;;AAEtC,IAAa,eAAe,SAAS;;AAErC,IAAa,cAAc,SAAS;;AAEpC,IAAa,YAAY,SAAS;;AAElC,IAAa,qBAAqB,aAAa;;AAE/C,IAAa,6BAA6B,aAAa;;AAEvD,IAAa,6BAA6B,aAAa;;AAEvD,IAAa,6BAA6B,aAAa;;AAEvD,IAAa,4BAA4B,aAAa;;AAEtD,IAAa,yBAAyB,iBAAiB;;AAEvD,IAAa,wBAAwB,iBAAiB;;AAEtD,IAAa,gBAAgB,cAAc;;AAE3C,IAAa,iBAAiB,cAAc;;AAE5C,IAAa,gBAAgB,cAAc"} \ No newline at end of file diff --git a/node_modules/js-yaml/dist/js-yaml.d.ts b/node_modules/js-yaml/dist/js-yaml.d.ts new file mode 100644 index 00000000..993af346 --- /dev/null +++ b/node_modules/js-yaml/dist/js-yaml.d.ts @@ -0,0 +1,1126 @@ +/** + * Returned by a scalar resolver when the source does not match its tag. + * + * @category Tags + */ +declare const NOT_RESOLVED: unique symbol; +/** + * Options for {@link defineScalarTag}. + * + * @category Tags + */ +interface ScalarTagOptions { + /** + * Whether this tag participates in resolving plain scalars without an + * explicit tag. Default: `false`. + */ + implicit?: boolean; + /** + * Whether explicit tag names are matched by prefix instead of exact equality. + * Default: `false`. + */ + matchByTagPrefix?: boolean; + /** + * Set of `source.charAt(0)` keys for which `resolve` may succeed (a superset + * of what it really matches). A key is either a single character or '' (empty + * source). `null` means "no constraint, always try". Used by the composer to + * dispatch implicit scalars by first character without running every resolver. + */ + implicitFirstChars?: readonly string[] | null; + /** + * Construct a value from scalar text, or return {@link NOT_RESOLVED} when it + * is invalid for this tag. `isExplicit` is true for an explicit tag and + * `tagName` is the actual matched name. + */ + resolve: (source: string, isExplicit: boolean, tagName: string) => Result | typeof NOT_RESOLVED; + /** + * Selects this tag for a JavaScript value when dumping. Use `() => false` + * for load-only tags. + */ + identify: (data: any) => boolean; + /** + * A scalar's printed form is text, so `represent` always yields a string. + * The factory supplies a `String(data)` default when a tag omits it. + */ + represent?: (data: any) => string; + /** Return the tag name to emit for a prefix-matching tag. Defaults to `tagName`. */ + representTagName?: (data: any) => string; +} +/** + * Normalized scalar tag returned by {@link defineScalarTag}. + * + * @category Tags + */ +interface ScalarTagDefinition extends Required> { + /** Tag name used for schema lookup. */ + tagName: string; + /** YAML node kind handled by this tag. */ + nodeKind: 'scalar'; +} +/** + * Options for {@link defineSequenceTag}. + * + * @category Tags + */ +interface SequenceTagOptions { + /** + * Whether explicit tag names are matched by prefix instead of exact equality. + * Default: `false`. + */ + matchByTagPrefix?: boolean; + /** Create the carrier used while constructing a sequence. */ + create: (tagName: string) => Carrier; + /** Add an item to the carrier. Return a non-empty error message to reject it. */ + addItem: (carrier: Carrier, item: unknown, index: number) => void | string; + /** Convert the completed carrier to the result. Defaults to the identity function. */ + finalize?: (carrier: Carrier) => Result; + /** + * Selects this tag for a JavaScript value when dumping. Use `() => false` + * for load-only tags. + */ + identify: (data: any) => boolean; + /** Return the array-like contents to dump. Defaults to the identity function. */ + represent?: (data: any) => ArrayLike; + /** Return the tag name to emit for a prefix-matching tag. Defaults to `tagName`. */ + representTagName?: (data: any) => string; +} +/** + * Normalized sequence tag returned by {@link defineSequenceTag}. + * + * @category Tags + */ +interface SequenceTagDefinition extends Required> { + /** Tag name used for schema lookup. */ + tagName: string; + /** YAML node kind handled by this tag. */ + nodeKind: 'sequence'; + /** Sequence tags do not participate in implicit scalar resolution. */ + implicit: false; + /** Whether the carrier is also the final result (`finalize` was omitted). */ + carrierIsResult: boolean; +} +/** + * Options for {@link defineMappingTag}. + * + * @category Tags + */ +interface MappingTagOptions { + /** + * Whether explicit tag names are matched by prefix instead of exact equality. + * Default: `false`. + */ + matchByTagPrefix?: boolean; + /** Create the carrier used while constructing a mapping. */ + create: (tagName: string) => Carrier; + /** + * Writes a pair. Returns '' on success, a non-empty error message otherwise + * (key does not fit the representation, value rejected, ...). Always a string + * so the hot path never allocates an exception wrapper. + */ + addPair: (carrier: Carrier, key: unknown, value: unknown) => string; + /** Return whether the carrier contains a key, for duplicate and merge checks. */ + has: (carrier: Carrier, key: unknown) => boolean; + /** Return the keys of a completed result for YAML merge processing. */ + keys: (result: Result) => Iterable; + /** Return a value from a completed result for YAML merge processing. */ + get: (result: Result, key: unknown) => unknown; + /** Convert the completed carrier to the result. Defaults to the identity function. */ + finalize?: (carrier: Carrier) => Result; + /** + * Selects this tag for a JavaScript value when dumping. Use `() => false` + * for load-only tags. + */ + identify: (data: any) => boolean; + /** Return the mapping entries to dump. Defaults to the identity function. */ + represent?: (data: any) => Map; + /** Return the tag name to emit for a prefix-matching tag. Defaults to `tagName`. */ + representTagName?: (data: any) => string; +} +/** + * Normalized mapping tag returned by {@link defineMappingTag}. + * + * @category Tags + */ +interface MappingTagDefinition extends Required> { + /** Tag name used for schema lookup. */ + tagName: string; + /** YAML node kind handled by this tag. */ + nodeKind: 'mapping'; + /** Mapping tags do not participate in implicit scalar resolution. */ + implicit: false; + /** Whether the carrier is also the final result (`finalize` was omitted). */ + carrierIsResult: boolean; +} +/** + * Any normalized tag definition accepted by {@link Schema}. + * + * @category Tags + */ +type TagDefinition = ScalarTagDefinition | SequenceTagDefinition | MappingTagDefinition; +/** + * Create a normalized scalar tag definition. + * + * @category Tags + */ +declare function defineScalarTag(tagName: string, options: ScalarTagOptions): ScalarTagDefinition; +/** + * Create a normalized sequence tag definition. + * + * @category Tags + */ +declare function defineSequenceTag(tagName: string, options: SequenceTagOptions): SequenceTagDefinition; +/** + * Create a normalized mapping tag definition. + * + * @category Tags + */ +declare function defineMappingTag(tagName: string, options: MappingTagOptions): MappingTagDefinition; + +/** + * Controls tag resolution when loading and type selection when dumping. + * + * @category Schemas + */ +declare class Schema { + readonly tags: readonly TagDefinition[]; + /** @internal */ + readonly implicitScalarTags: readonly ScalarTagDefinition[]; + /** + * Dispatch implicit scalar resolvers by `source.charAt(0)`. Each bucket holds + * the resolvers that may match that key, in schema order; a key absent from + * the map uses + * {@link Schema.implicitScalarAnyFirstChar} + * (resolvers that declared no first-char constraint, so they apply to any + * first character). + */ + private readonly implicitScalarByFirstChar; + private readonly implicitScalarAnyFirstChar; + /** + * The default scalar tag (`!!str`), resolved once so the composer's fallback + * for unresolved plain scalars avoids a keyed lookup per scalar. + * + * @internal + */ + readonly defaultScalarTag: ScalarTagDefinition; + /** + * The default container tags (`!!seq` / `!!map`), used by the dumper: when a + * value is identified by its default tag, the tag is implicit and not + * printed. Undefined if the schema does not define them (then such values + * can't be dumped). + * + * @internal + */ + readonly defaultSequenceTag: SequenceTagDefinition | undefined; + /** @internal */ + readonly defaultMappingTag: MappingTagDefinition | undefined; + private readonly exact; + private readonly prefix; + constructor(tags: readonly TagDefinition[]); + /** @internal */ + lookupScalarTag(tagName: string): ScalarTagDefinition | undefined; + /** @internal */ + lookupSequenceTag(tagName: string): SequenceTagDefinition | undefined; + /** @internal */ + lookupMappingTag(tagName: string): MappingTagDefinition | undefined; + /** @internal */ + resolveImplicitScalarTag(source: string): { + value: unknown; + tag: ScalarTagDefinition; + }; + /** + * Creates a new schema with the specified tags added. If a tag already + * exists, it is replaced by the specified tag. + * + * @example + * + * ```javascript + * import { CORE_SCHEMA, mergeTag, realMapTag } from 'js-yaml' + * + * const schema = CORE_SCHEMA.withTags(mergeTag, realMapTag) + * ``` + */ + withTags(...tags: Array): Schema; +} +/** + * The YAML 1.2 Failsafe Schema: strings, sequences, and mappings. + * + * @category Schemas + */ +declare const FAILSAFE_SCHEMA: Schema; +/** + * The YAML 1.2 JSON Schema. It uses JSON scalar forms while retaining YAML + * collection syntax. + * + * @category Schemas + */ +declare const JSON_SCHEMA: Schema; +/** + * The default schema for the loaders. Note, {@link CORE_SCHEMA} comes + * without the `!!merge` tag. You can easily enable it if needed. + * + * @example + * Enable {@link mergeTag}: + * + * ```javascript + * import { load, CORE_SCHEMA, mergeTag } from 'js-yaml' + * + * try { + * load(data, { schema: CORE_SCHEMA.withTags(mergeTag) }) + * } catch (e) { + * console.error(e) + * } + * ``` + * + * @category Schemas + */ +declare const CORE_SCHEMA: Schema; +/** + * YAML 1.1-compatible schema. + * + * @category Schemas + */ +declare const YAML11_SCHEMA: Schema; +/** + * The dumper schema for maximum compatibility. It combines all supported type + * variants from YAML 1.1 and YAML 1.2 so strings matching any of them are + * quoted. This makes the generated YAML more compatible with other parsers. + * + * The schema is based on YAML 1.1, but extends `!!int` and `!!float` to accept + * both YAML 1.1 and Core Schema forms, since Core Schema supports some forms + * that YAML 1.1 does not. + * + * @category Schemas + */ +declare const DUMP_SCHEMA: Schema; + +/** @category Tags */ +declare const strTag: ScalarTagDefinition; + +/** @category Tags */ +declare const nullCoreTag: ScalarTagDefinition; + +/** @category Tags */ +declare const nullJsonTag: ScalarTagDefinition; + +/** @category Tags */ +declare const nullYaml11Tag: ScalarTagDefinition; + +/** @category Tags */ +declare const boolCoreTag: ScalarTagDefinition; + +/** @category Tags */ +declare const boolJsonTag: ScalarTagDefinition; + +/** @category Tags */ +declare const boolYaml11Tag: ScalarTagDefinition; + +/** @category Tags */ +declare const intCoreTag: ScalarTagDefinition; + +/** @category Tags */ +declare const intJsonTag: ScalarTagDefinition; + +/** @category Tags */ +declare const intYaml11Tag: ScalarTagDefinition; + +/** @category Tags */ +declare const floatCoreTag: ScalarTagDefinition; + +/** @category Tags */ +declare const floatJsonTag: ScalarTagDefinition; + +/** @category Tags */ +declare const floatYaml11Tag: ScalarTagDefinition; + +/** + * Enables merge keys in {@link CORE_SCHEMA} when added with + * {@link Schema.withTags}. + * + * @category Tags + */ +declare const mergeTag: ScalarTagDefinition<"<<">; + +/** + * The `!!binary` tag, represented as a `Uint8Array`. + * + * @category Tags + */ +declare const binaryTag: ScalarTagDefinition>; + +/** + * The YAML 1.1 `!!timestamp` tag, represented as a JavaScript `Date`. + * + * @category Tags + */ +declare const timestampTag: ScalarTagDefinition; + +/** @category Tags */ +declare const seqTag: SequenceTagDefinition; + +/** + * Provided only for YAML 1.1 compatibility and supported by the loader only. + * JavaScript has no dedicated class to represent this type, so it cannot be + * identified and dumped. + * + * ```yaml + * !!omap + * - one: 1 + * - two: 2 + * ``` + * + * is loaded as + * + * ```javascript + * [ + * { one: 1 }, + * { two: 2 } + * ] + * ``` + * + * @category Tags + */ +declare const omapTag: SequenceTagDefinition<{ + list: unknown[]; + seen: Set; +}, unknown[]>; + +/** + * Provided only for YAML 1.1 compatibility and supported by the loader only. + * JavaScript has no dedicated class to represent this type, so it cannot be + * identified and dumped. + * + * ```yaml + * !!pairs + * - one: 1 + * - two: 2 + * ``` + * + * is loaded as + * + * ```javascript + * [ + * ['one', 1], + * ['two', 2] + * ] + * ``` + * + * @category Tags + */ +declare const pairsTag: SequenceTagDefinition<[unknown, unknown][], [unknown, unknown][]>; + +/** + * This is the default mapping implementation. It uses `{}` objects and has only + * partial functionality due to language limitations. This choice was made + * because users expect to get JavaScript objects, and it was left unchanged to + * avoid too many breaking changes in the v5 release. + * + * Side effects: + * + * - `Object.hasOwn()` checks or `for...of` loops are required for safe use (to + * avoid falling through to prototypes). + * - Only scalar string keys are supported properly. + * - Other scalar keys, such as `null` and numbers, are converted to strings. + * This is historical behaviour, and it can cause side effects such as + * problems with `!!merge`. + * + * Note that non-string scalar keys may be deprecated in future versions. + * + * Ideally, use {@link realMapTag} instead. + * + * @category Tags + */ +declare const mapTag: MappingTagDefinition, Record>; + +/** + * Recommended when non-string keys are actually needed. It uses native + * JavaScript `Map` objects, so keys keep their constructed types instead of + * being converted to strings. + * + * It is not the default to avoid widespread breaking changes in existing + * projects. `Map` has a different access API and does not pass deep equality + * checks against `{}`-based fixtures. Alongside the other changes in v5, + * making it the default was considered too disruptive. + * + * If these differences are acceptable for your project, we recommend using + * {@link realMapTag} to guarantee the absence of problems and side effects. + * + * @example + * Enable {@link realMapTag}: + * + * ```javascript + * import { load, CORE_SCHEMA, realMapTag } from 'js-yaml' + * + * try { + * load(data, { schema: CORE_SCHEMA.withTags(realMapTag) }) + * } catch (e) { + * console.error(e) + * } + * ``` + * + * @category Tags + */ +declare const realMapTag: MappingTagDefinition, Map>; + +/** + * This implementation exists solely to reproduce v4 behavior exactly. Its use + * is strongly discouraged. If complex or non-string keys are needed, use + * {@link realMapTag} instead. + * + * @category Tags + */ +declare const legacyMapTag: MappingTagDefinition, Record>; + +/** + * The YAML 1.1 `!!set` tag, represented as a JavaScript `Set`. + * + * @category Tags + */ +declare const setTag: MappingTagDefinition, Set>; + +/** @category Events */ +declare const EVENT_ID: { + readonly DOCUMENT: 1; + readonly SEQUENCE: 2; + readonly MAPPING: 3; + readonly SCALAR: 4; + readonly ALIAS: 5; + readonly POP: 6; +}; +/** @category Events */ +type EventId = typeof EVENT_ID[keyof typeof EVENT_ID]; +/** @category Nodes */ +declare const SCALAR_STYLE: { + readonly PLAIN: 1; + readonly SINGLE_QUOTED: 2; + readonly DOUBLE_QUOTED: 3; + readonly LITERAL_BLOCK: 4; + readonly FOLDED_BLOCK: 5; +}; +/** @category Nodes */ +type ScalarStyle = typeof SCALAR_STYLE[keyof typeof SCALAR_STYLE]; +/** @category Nodes */ +declare const COLLECTION_STYLE: { + readonly BLOCK: 1; + readonly FLOW: 2; +}; +/** @category Nodes */ +type CollectionStyle = typeof COLLECTION_STYLE[keyof typeof COLLECTION_STYLE]; +/** @category Nodes */ +declare const CHOMPING_MODE: { + readonly CLIP: 1; + readonly STRIP: 2; + readonly KEEP: 3; +}; +/** @category Nodes */ +type ChompingMode = typeof CHOMPING_MODE[keyof typeof CHOMPING_MODE]; +/** @category Events */ +type DocumentDirective = { + kind: 'yaml'; + version: string; +} | { + kind: 'tag'; + handle: string; + prefix: string; +}; +/** @category Events */ +interface DocumentEvent { + type: typeof EVENT_ID.DOCUMENT; + explicitStart: boolean; + explicitEnd: boolean; + directives: DocumentDirective[]; +} +/** @category Events */ +interface SequenceEvent { + type: typeof EVENT_ID.SEQUENCE; + start: number; + anchorStart: number; + anchorEnd: number; + tagStart: number; + tagEnd: number; + style: CollectionStyle; +} +/** @category Events */ +interface MappingEvent { + type: typeof EVENT_ID.MAPPING; + start: number; + anchorStart: number; + anchorEnd: number; + tagStart: number; + tagEnd: number; + style: CollectionStyle; +} +/** + * A scalar whose decoded value can be read with {@link getScalarValue}. + * + * @category Events + */ +interface ScalarEvent { + type: typeof EVENT_ID.SCALAR; + valueStart: number; + valueEnd: number; + anchorStart: number; + anchorEnd: number; + tagStart: number; + tagEnd: number; + style: ScalarStyle; + chomping: ChompingMode; + indent: number; + fast: boolean; +} +/** @category Events */ +interface AliasEvent { + type: typeof EVENT_ID.ALIAS; + anchorStart: number; + anchorEnd: number; +} +/** + * Closes the most recently opened document, sequence, or mapping. + * + * @category Events + */ +interface PopEvent { + type: typeof EVENT_ID.POP; +} +/** + * Source ranges are zero-based and end-exclusive; `-1` means absent. + * + * @category Events + */ +type Event = DocumentEvent | SequenceEvent | MappingEvent | ScalarEvent | AliasEvent | PopEvent; + +/** @category Events */ +interface ConstructorOptions { + /** Source text referenced by offsets in `events`. */ + source: string; + filename?: string; + /** + * Schema to use. + * + * @defaultValue {@link CORE_SCHEMA} + */ + schema?: Schema; + /** + * Enables compatibility with `JSON.parse` behavior. Duplicate keys in a + * mapping override values instead of throwing an error. + * + * @defaultValue `false` + */ + json?: boolean; + /** + * Maximum total number of keys processed by merge (`<<`) across one load + * call. Each member of a merge sequence also counts as one key. Set to `-1` + * to disable the limit. + * + * @defaultValue `10000` + */ + maxTotalMergeKeys?: number; + /** + * Maximum number of alias nodes (`*ref`) per document. Set to `0` to reject + * all aliases, or to `-1` for no limit. + * + * @defaultValue `-1` + */ + maxAliases?: number; +} +/** + * Constructs JavaScript documents directly from parser events, without an + * intermediate AST. + * + * @category Events + */ +declare function constructFromEvents(events: Event[], options: ConstructorOptions): unknown[]; + +/** @category Events */ +interface ParserOptions { + /** + * File path used in error messages. + * + * @defaultValue `null` + */ + filename?: string; + /** + * Maximum nesting depth for collections. Aliases are not taken into account. + * + * @defaultValue `100` + */ + maxDepth?: number; +} +/** + * Parses YAML into a flat event stream referencing source text by offsets. + * + * @category Events + */ +declare function parseEvents(input: string, options: ParserOptions): Event[]; + +/** @category Main */ +interface LoadOptions extends ParserOptions, Omit { +} +/** @inline */ +type LoadAllIterator = (document: unknown) => void; +/** + * Same as {@link load}, but understands multi-document sources. + * Returns an array of documents. + * + * @category Main + */ +declare function loadAll(input: string, options?: LoadOptions): unknown[]; +/** + * @deprecated Iterator is not supported. + */ +declare function loadAll(input: string, iterator: null, options?: LoadOptions): unknown[]; +/** + * @deprecated Iterator is not supported. + */ +declare function loadAll(input: string, iterator: LoadAllIterator, options?: LoadOptions): void; +/** + * Parses `string` as a single YAML document. Throws {@link YAMLException} on + * error. This function does not understand multi-document or empty sources; it + * throws an exception on those. + * + * > [!NOTE] + * > 1. When processing untrusted input, see the + * > [security considerations](../docs/safety.md). + * > 2. All exceptions MUST be caught, not just {@link YAMLException}. + * > 3. The default {@link CORE_SCHEMA} comes without the `!!merge` tag. You can + * > easily enable it if needed. + * > 4. The default {@link mapTag} is `{}`-object based, with known limitations + * > (see description). For full compatibility use {@link realMapTag} + * > instead (it uses native JS `Map`). + * + * @example + * Enable {@link mergeTag} and {@link realMapTag}: + * + * ```javascript + * import { load, CORE_SCHEMA, mergeTag, realMapTag } from 'js-yaml' + * + * try { + * load(data, { schema: CORE_SCHEMA.withTags(mergeTag, realMapTag) }) + * } catch (e) { + * console.error(e) + * } + * ``` + * + * @category Main + */ +declare function load(input: string, options?: LoadOptions): unknown; + +/** @category Nodes */ +interface NodeBase { + /** + * YAML tag. Untagged nodes carry the semantic resolved tag; tagged nodes carry + * the printable/verbatim tag spelling. + */ + tag: string; + /** Whether to print the node's tag explicitly. */ + tagged: boolean; + anchor?: string; + /** Reserved for the formatting layer; not populated by the dumper yet. */ + commentBefore?: string; + comment?: string; + commentAfter?: string; + blankBefore?: number; +} +/** @category Nodes */ +interface ScalarNode extends NodeBase { + kind: 'scalar'; + /** Preferred scalar style; the presenter may fall back when necessary. */ + style: ScalarStyle; + value: string; +} +/** @category Nodes */ +interface SequenceNode extends NodeBase { + kind: 'sequence'; + style: CollectionStyle; + items: Node[]; +} +/** @category Nodes */ +interface MappingNode extends NodeBase { + kind: 'mapping'; + style: CollectionStyle; + items: Array<{ + key: Node; + value: Node; + }>; +} +/** @category Nodes */ +interface AliasNode { + kind: 'alias'; + /** The anchor name this alias points at (`*name`). */ + anchor: string; +} +/** @category Nodes */ +type Node = ScalarNode | SequenceNode | MappingNode | AliasNode; +/** + * The layer above {@link Node}: each document wraps one content node plus its + * own markers/directives. Not a member of {@link Node} — the fields differ. + * Document directives are ordered presentation data. + * + * @category Nodes + */ +interface Document { + /** null = empty document */ + contents: Node | null; + /** print '---' */ + explicitStart?: boolean; + /** print '...' */ + explicitEnd?: boolean; + directives: DocumentDirective[]; +} + +/** Scalar presentation state passed to styling rules. @category AST */ +interface ScalarLayout { + readonly node: Readonly; + readonly parent: Readonly | null; + readonly level: number; + readonly isKey: boolean; + readonly flowOnly: boolean; + readonly shiftOfParent: number; + readonly shiftOfContent: number; + readonly shiftOfFirstLine: number; + readonly presenterOptions: Readonly>; + /** + * Bit mask of allowed styles; each bit corresponds to a {@link SCALAR_STYLE} + * value. + */ + allowedStylesMask: number; + /** + * Selected output style, which styling rules may modify. To avoid overriding + * earlier decisions, a rule should normally modify it only while it is + * {@link SCALAR_STYLE.PLAIN}. + */ + style: ScalarStyle; +} +/** Function signature for scalar styling rules. @category AST */ +type ScalarStyleRule = (layout: ScalarLayout) => void; + +/** @category AST */ +interface PresenterOptions { + /** Schema used when selecting a safe scalar style. */ + schema: Schema; + /** + * Indentation width in spaces. + * + * @defaultValue `2` + */ + indent?: number; + /** + * Does not add an indentation level to array elements when enabled. + * + * @defaultValue `false` + */ + seqNoIndent?: boolean; + /** + * Allows a nested collection to start on the same line after `-`. + * + * @defaultValue `true` + */ + seqInlineFirst?: boolean; + /** + * Preferred line width for folding. Unbreakable and more-indented lines may + * exceed it. Set to `-1` for unlimited width. + * + * @defaultValue `80` + */ + lineWidth?: number; + /** + * Adds spaces inside flow collection brackets: `{a: 1}` becomes `{ a: 1 }`. + * + * @defaultValue `false` + */ + flowBracketPadding?: boolean; + /** + * Omits the space after commas in flow collections: `[1, 2]` becomes + * `[1,2]`. + * + * @defaultValue `false` + */ + flowSkipCommaSpace?: boolean; + /** + * Omits the space after `:` in flow mappings: `{"a": 1}` becomes `{"a":1}`. + * + * This forces `quoteFlowKeys`; otherwise `a:1` would be parsed as a single + * plain scalar instead of a mapping entry. + * + * @defaultValue `false` + */ + flowSkipColonSpace?: boolean; + /** + * Quotes flow mapping keys: `{a: 1}` becomes `{"a": 1}`. + * + * @defaultValue `false` + */ + quoteFlowKeys?: boolean; + /** + * Quoting style to use when a string needs quotes. + * + * @defaultValue `'single'` + */ + quoteStyle?: 'single' | 'double'; + /** + * Quotes all non-key strings using {@link quoteStyle}. + * + * @defaultValue `false` + */ + forceQuotes?: boolean; + /** + * Customizes how strings are rendered as plain, quoted, literal, or folded + * scalars. Rules are applied in array order; providing this option replaces + * the {@link DEFAULT_SCALAR_STYLE_RULES default rules}. + * + * @defaultValue `Object.values(DEFAULT_SCALAR_STYLE_RULES)` + */ + scalarStyleRules?: readonly ScalarStyleRule[]; + /** + * Prints an explicit tag before an anchor: `&ref_0 !!set` becomes + * `!!set &ref_0`. + * + * @defaultValue `false` + */ + tagBeforeAnchor?: boolean; +} +/** + * Build YAML from AST. + * + * @category AST + */ +declare function present(documents: Document[], options: PresenterOptions): string; + +/** @category Main */ +interface DumpOptions extends Omit { + /** + * Schema to use. + * + * @defaultValue {@link DUMP_SCHEMA} + */ + schema?: Schema; + /** + * Skips invalid types instead of throwing. Invalid mapping pairs and sequence + * items are skipped; `undefined` sequence items are serialized as `null`. + * + * @defaultValue `false` + */ + skipInvalid?: boolean; + /** + * Inlines duplicate objects instead of converting them into references. + * + * @defaultValue `false` + */ + noRefs?: boolean; + /** + * Nesting level at which collections switch from block to flow style. Set to + * `-1` to never switch automatically. + * + * @defaultValue `-1` + */ + flowLevel?: number; + /** + * Sorts mapping keys when `true`. A function can be provided to define the + * sort order. + * + * @defaultValue `false` + * @deprecated Use {@link transform} to reorder mapping items. + */ + sortKeys?: boolean | ((a: any, b: any) => number); + /** + * Mutates the generated AST before it is rendered. + * + * @example Sort mapping keys: + * + * ```typescript + * import { dump, visit } from 'js-yaml' + * + * dump(value, { + * transform: documents => visit(documents, node => { + * if (node.kind === 'mapping') node.items.sort((a, b) => { + * const x = a.key.kind === 'scalar' ? a.key.value : '' + * const y = b.key.kind === 'scalar' ? b.key.value : '' + * return x.localeCompare(y) + * }) + * }) + * }) + * ``` + */ + transform?: (documents: Document[]) => void; +} +/** + * Serializes JS object as a YAML document. By default it can dump every + * supported YAML type, so it throws an exception if you try to dump regexps or + * functions. However, you can disable exceptions by setting the + * {@link DumpOptions.skipInvalid} option to `true`. + * + * @category Main + */ +declare function dump(input: any, options?: DumpOptions): string; + +interface SnippetMark { + name?: string | null; + buffer: string; + position: number; + line: number; + column: number; + snippet?: string | null; +} + +/** + * A YAML error. Unlike an ordinary `Error`, it adds a source snippet showing + * the location of the problem to the error message, when available. + * + * @category Main + */ +declare class YAMLException extends Error { + reason: string; + mark?: SnippetMark; + /** + * Optional `mark` contains source snippet data. Usually, use + * {@link YAMLException.throwAt} instead of passing it directly. + */ + constructor(reason: string, mark?: SnippetMark); + /** + * Returns the formatted error, omitting the source snippet in compact mode. + */ + toString(compact?: boolean): string; + /** + * Builds a YAMLException with a source snippet and throws it. `source` is + * the raw input text; `position` is an offset into it. + */ + static throwAt(source: string, position: number, message: string, filename?: string): never; +} + +/** + * Decodes the scalar referenced by event offsets in `input`. + * + * @category Events + */ +declare function getScalarValue(input: string, scalar: ScalarEvent): string; + +/** @category AST */ +interface FromEventsOptions { + /** Source text referenced by offsets in `events`. */ + source: string; + /** Schema used to resolve implicit scalar tags. */ + schema: Schema; +} +/** + * Builds an AST from parser events + * + * @category AST + */ +declare function eventsToAst(events: Event[], options: FromEventsOptions): Document[]; + +/** @category AST */ +interface FromJsOptions { + /** Inlines duplicate objects instead of converting them into references. */ + noRefs?: boolean; + /** + * Skips unrepresentable values instead of throwing. Invalid mapping pairs + * and sequence items are skipped; `undefined` sequence items become `null`. + */ + skipInvalid?: boolean; +} +/** + * Convert JS object to AST. A JS value is one YAML document. An unrepresentable + * root becomes an empty document, which the presenter renders as an empty + * string. + * + * @category AST + */ +declare function jsToAst(input: unknown, schema: Schema, options?: FromJsOptions): Document[]; + +/** + * Default scalar styling rules in application order. + * See [Scalar styling](../../docs/scalar_styling.md) for usage details. + * + * @category AST + */ +declare const DEFAULT_SCALAR_STYLE_RULES: { + readonly applyQuoteFlowKeysOption: typeof applyQuoteFlowKeysOption; + readonly doubleQuoteForInvisibles: typeof doubleQuoteForInvisibles; + readonly doubleQuoteWhitespaceOnly: typeof doubleQuoteWhitespaceOnly; + readonly applyForceQuotesOption: typeof applyForceQuotesOption; + readonly tryLongOrMultilineAsBlock: typeof tryLongOrMultilineAsBlock; + readonly quoteInvalidPlain: typeof quoteInvalidPlain; + readonly fallbackToDoubleQuoted: typeof fallbackToDoubleQuoted; +}; +declare function applyQuoteFlowKeysOption(layout: ScalarLayout): void; +declare function doubleQuoteForInvisibles(layout: ScalarLayout): void; +declare function doubleQuoteWhitespaceOnly(layout: ScalarLayout): void; +declare function applyForceQuotesOption(layout: ScalarLayout): void; +declare function tryLongOrMultilineAsBlock(layout: ScalarLayout): void; +declare function quoteInvalidPlain(layout: ScalarLayout): void; +declare function fallbackToDoubleQuoted(layout: ScalarLayout): void; + +/** + * Return from a visitor to stop the whole traversal. + * + * @category AST + */ +declare const VISIT_BREAK: unique symbol; +/** + * Return from a visitor to skip the current node's children. + * + * @category AST + */ +declare const VISIT_SKIP: unique symbol; +/** @inline */ +type VisitControl = typeof VISIT_BREAK | typeof VISIT_SKIP | undefined | void; +/** + * Traversal-derived position of the current node. Kept off the node itself: a + * node may sit in several places (alias/dedup reuse), so depth/role belong to + * the walk, not the node. {@link VisitContext.parent} `kind` + + * {@link VisitContext.isKey} pin the exact slot. + * + * @category AST + */ +interface VisitContext { + /** 0 = document content root */ + depth: number; + /** Enclosing sequence/mapping, null at the root */ + parent: Node | null; + /** Node sits in a mapping key position */ + isKey: boolean; +} +/** @category AST */ +type Visitor = (node: Node, ctx: VisitContext) => VisitControl; +/** + * Walk every node in the documents, calling {@link Visitor} once per + * node (pre-order). + * + * @category AST + */ +declare function visit(documents: Document[], visitor: Visitor): void; + +/** @deprecated Use `EVENT_ID.DOCUMENT` instead. @internal */ +declare const EVENT_DOCUMENT: 1; +/** @deprecated Use `EVENT_ID.SEQUENCE` instead. @internal */ +declare const EVENT_SEQUENCE: 2; +/** @deprecated Use `EVENT_ID.MAPPING` instead. @internal */ +declare const EVENT_MAPPING: 3; +/** @deprecated Use `EVENT_ID.SCALAR` instead. @internal */ +declare const EVENT_SCALAR: 4; +/** @deprecated Use `EVENT_ID.ALIAS` instead. @internal */ +declare const EVENT_ALIAS: 5; +/** @deprecated Use `EVENT_ID.POP` instead. @internal */ +declare const EVENT_POP: 6; +/** @deprecated Use `SCALAR_STYLE.PLAIN` instead. @internal */ +declare const SCALAR_STYLE_PLAIN: 1; +/** @deprecated Use `SCALAR_STYLE.SINGLE_QUOTED` instead. @internal */ +declare const SCALAR_STYLE_SINGLE_QUOTED: 2; +/** @deprecated Use `SCALAR_STYLE.DOUBLE_QUOTED` instead. @internal */ +declare const SCALAR_STYLE_DOUBLE_QUOTED: 3; +/** @deprecated Use `SCALAR_STYLE.LITERAL_BLOCK` instead. @internal */ +declare const SCALAR_STYLE_LITERAL_BLOCK: 4; +/** @deprecated Use `SCALAR_STYLE.FOLDED_BLOCK` instead. @internal */ +declare const SCALAR_STYLE_FOLDED_BLOCK: 5; +/** @deprecated Use `COLLECTION_STYLE.BLOCK` instead. @internal */ +declare const COLLECTION_STYLE_BLOCK: 1; +/** @deprecated Use `COLLECTION_STYLE.FLOW` instead. @internal */ +declare const COLLECTION_STYLE_FLOW: 2; +/** @deprecated Use `CHOMPING_MODE.CLIP` instead. @internal */ +declare const CHOMPING_CLIP: 1; +/** @deprecated Use `CHOMPING_MODE.STRIP` instead. @internal */ +declare const CHOMPING_STRIP: 2; +/** @deprecated Use `CHOMPING_MODE.KEEP` instead. @internal */ +declare const CHOMPING_KEEP: 3; + +export { CHOMPING_CLIP, CHOMPING_KEEP, CHOMPING_MODE, CHOMPING_STRIP, COLLECTION_STYLE, COLLECTION_STYLE_BLOCK, COLLECTION_STYLE_FLOW, CORE_SCHEMA, DEFAULT_SCALAR_STYLE_RULES, DUMP_SCHEMA, EVENT_ALIAS, EVENT_DOCUMENT, EVENT_ID, EVENT_MAPPING, EVENT_POP, EVENT_SCALAR, EVENT_SEQUENCE, FAILSAFE_SCHEMA, JSON_SCHEMA, NOT_RESOLVED, SCALAR_STYLE, SCALAR_STYLE_DOUBLE_QUOTED, SCALAR_STYLE_FOLDED_BLOCK, SCALAR_STYLE_LITERAL_BLOCK, SCALAR_STYLE_PLAIN, SCALAR_STYLE_SINGLE_QUOTED, Schema, VISIT_BREAK, VISIT_SKIP, YAML11_SCHEMA, YAMLException, binaryTag, boolCoreTag, boolJsonTag, boolYaml11Tag, constructFromEvents, defineMappingTag, defineScalarTag, defineSequenceTag, dump, eventsToAst, floatCoreTag, floatJsonTag, floatYaml11Tag, getScalarValue, intCoreTag, intJsonTag, intYaml11Tag, jsToAst, legacyMapTag, load, loadAll, mapTag, mergeTag, nullCoreTag, nullJsonTag, nullYaml11Tag, omapTag, pairsTag, parseEvents, present, realMapTag, seqTag, setTag, strTag, timestampTag, visit }; +export type { AliasEvent, AliasNode, ChompingMode, CollectionStyle, ConstructorOptions, Document, DocumentDirective, DocumentEvent, DumpOptions, Event, EventId, FromEventsOptions, FromJsOptions, LoadOptions, MappingEvent, MappingNode, MappingTagDefinition, MappingTagOptions, Node, NodeBase, ParserOptions, PopEvent, PresenterOptions, ScalarEvent, ScalarLayout, ScalarNode, ScalarStyle, ScalarStyleRule, ScalarTagDefinition, ScalarTagOptions, SequenceEvent, SequenceNode, SequenceTagDefinition, SequenceTagOptions, TagDefinition, VisitContext, Visitor }; diff --git a/node_modules/js-yaml/dist/js-yaml.js b/node_modules/js-yaml/dist/js-yaml.js deleted file mode 100644 index 4cc0ddf6..00000000 --- a/node_modules/js-yaml/dist/js-yaml.js +++ /dev/null @@ -1,3874 +0,0 @@ - -/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */ -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : - typeof define === 'function' && define.amd ? define(['exports'], factory) : - (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.jsyaml = {})); -}(this, (function (exports) { 'use strict'; - - function isNothing(subject) { - return (typeof subject === 'undefined') || (subject === null); - } - - - function isObject(subject) { - return (typeof subject === 'object') && (subject !== null); - } - - - function toArray(sequence) { - if (Array.isArray(sequence)) return sequence; - else if (isNothing(sequence)) return []; - - return [ sequence ]; - } - - - function extend(target, source) { - var index, length, key, sourceKeys; - - if (source) { - sourceKeys = Object.keys(source); - - for (index = 0, length = sourceKeys.length; index < length; index += 1) { - key = sourceKeys[index]; - target[key] = source[key]; - } - } - - return target; - } - - - function repeat(string, count) { - var result = '', cycle; - - for (cycle = 0; cycle < count; cycle += 1) { - result += string; - } - - return result; - } - - - function isNegativeZero(number) { - return (number === 0) && (Number.NEGATIVE_INFINITY === 1 / number); - } - - - var isNothing_1 = isNothing; - var isObject_1 = isObject; - var toArray_1 = toArray; - var repeat_1 = repeat; - var isNegativeZero_1 = isNegativeZero; - var extend_1 = extend; - - var common = { - isNothing: isNothing_1, - isObject: isObject_1, - toArray: toArray_1, - repeat: repeat_1, - isNegativeZero: isNegativeZero_1, - extend: extend_1 - }; - - // YAML error class. http://stackoverflow.com/questions/8458984 - - - function formatError(exception, compact) { - var where = '', message = exception.reason || '(unknown reason)'; - - if (!exception.mark) return message; - - if (exception.mark.name) { - where += 'in "' + exception.mark.name + '" '; - } - - where += '(' + (exception.mark.line + 1) + ':' + (exception.mark.column + 1) + ')'; - - if (!compact && exception.mark.snippet) { - where += '\n\n' + exception.mark.snippet; - } - - return message + ' ' + where; - } - - - function YAMLException$1(reason, mark) { - // Super constructor - Error.call(this); - - this.name = 'YAMLException'; - this.reason = reason; - this.mark = mark; - this.message = formatError(this, false); - - // Include stack trace in error object - if (Error.captureStackTrace) { - // Chrome and NodeJS - Error.captureStackTrace(this, this.constructor); - } else { - // FF, IE 10+ and Safari 6+. Fallback for others - this.stack = (new Error()).stack || ''; - } - } - - - // Inherit from Error - YAMLException$1.prototype = Object.create(Error.prototype); - YAMLException$1.prototype.constructor = YAMLException$1; - - - YAMLException$1.prototype.toString = function toString(compact) { - return this.name + ': ' + formatError(this, compact); - }; - - - var exception = YAMLException$1; - - // get snippet for a single line, respecting maxLength - function getLine(buffer, lineStart, lineEnd, position, maxLineLength) { - var head = ''; - var tail = ''; - var maxHalfLength = Math.floor(maxLineLength / 2) - 1; - - if (position - lineStart > maxHalfLength) { - head = ' ... '; - lineStart = position - maxHalfLength + head.length; - } - - if (lineEnd - position > maxHalfLength) { - tail = ' ...'; - lineEnd = position + maxHalfLength - tail.length; - } - - return { - str: head + buffer.slice(lineStart, lineEnd).replace(/\t/g, '→') + tail, - pos: position - lineStart + head.length // relative position - }; - } - - - function padStart(string, max) { - return common.repeat(' ', max - string.length) + string; - } - - - function makeSnippet(mark, options) { - options = Object.create(options || null); - - if (!mark.buffer) return null; - - if (!options.maxLength) options.maxLength = 79; - if (typeof options.indent !== 'number') options.indent = 1; - if (typeof options.linesBefore !== 'number') options.linesBefore = 3; - if (typeof options.linesAfter !== 'number') options.linesAfter = 2; - - var re = /\r?\n|\r|\0/g; - var lineStarts = [ 0 ]; - var lineEnds = []; - var match; - var foundLineNo = -1; - - while ((match = re.exec(mark.buffer))) { - lineEnds.push(match.index); - lineStarts.push(match.index + match[0].length); - - if (mark.position <= match.index && foundLineNo < 0) { - foundLineNo = lineStarts.length - 2; - } - } - - if (foundLineNo < 0) foundLineNo = lineStarts.length - 1; - - var result = '', i, line; - var lineNoLength = Math.min(mark.line + options.linesAfter, lineEnds.length).toString().length; - var maxLineLength = options.maxLength - (options.indent + lineNoLength + 3); - - for (i = 1; i <= options.linesBefore; i++) { - if (foundLineNo - i < 0) break; - line = getLine( - mark.buffer, - lineStarts[foundLineNo - i], - lineEnds[foundLineNo - i], - mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo - i]), - maxLineLength - ); - result = common.repeat(' ', options.indent) + padStart((mark.line - i + 1).toString(), lineNoLength) + - ' | ' + line.str + '\n' + result; - } - - line = getLine(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength); - result += common.repeat(' ', options.indent) + padStart((mark.line + 1).toString(), lineNoLength) + - ' | ' + line.str + '\n'; - result += common.repeat('-', options.indent + lineNoLength + 3 + line.pos) + '^' + '\n'; - - for (i = 1; i <= options.linesAfter; i++) { - if (foundLineNo + i >= lineEnds.length) break; - line = getLine( - mark.buffer, - lineStarts[foundLineNo + i], - lineEnds[foundLineNo + i], - mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo + i]), - maxLineLength - ); - result += common.repeat(' ', options.indent) + padStart((mark.line + i + 1).toString(), lineNoLength) + - ' | ' + line.str + '\n'; - } - - return result.replace(/\n$/, ''); - } - - - var snippet = makeSnippet; - - var TYPE_CONSTRUCTOR_OPTIONS = [ - 'kind', - 'multi', - 'resolve', - 'construct', - 'instanceOf', - 'predicate', - 'represent', - 'representName', - 'defaultStyle', - 'styleAliases' - ]; - - var YAML_NODE_KINDS = [ - 'scalar', - 'sequence', - 'mapping' - ]; - - function compileStyleAliases(map) { - var result = {}; - - if (map !== null) { - Object.keys(map).forEach(function (style) { - map[style].forEach(function (alias) { - result[String(alias)] = style; - }); - }); - } - - return result; - } - - function Type$1(tag, options) { - options = options || {}; - - Object.keys(options).forEach(function (name) { - if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) { - throw new exception('Unknown option "' + name + '" is met in definition of "' + tag + '" YAML type.'); - } - }); - - // TODO: Add tag format check. - this.options = options; // keep original options in case user wants to extend this type later - this.tag = tag; - this.kind = options['kind'] || null; - this.resolve = options['resolve'] || function () { return true; }; - this.construct = options['construct'] || function (data) { return data; }; - this.instanceOf = options['instanceOf'] || null; - this.predicate = options['predicate'] || null; - this.represent = options['represent'] || null; - this.representName = options['representName'] || null; - this.defaultStyle = options['defaultStyle'] || null; - this.multi = options['multi'] || false; - this.styleAliases = compileStyleAliases(options['styleAliases'] || null); - - if (YAML_NODE_KINDS.indexOf(this.kind) === -1) { - throw new exception('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.'); - } - } - - var type = Type$1; - - /*eslint-disable max-len*/ - - - - - - function compileList(schema, name) { - var result = []; - - schema[name].forEach(function (currentType) { - var newIndex = result.length; - - result.forEach(function (previousType, previousIndex) { - if (previousType.tag === currentType.tag && - previousType.kind === currentType.kind && - previousType.multi === currentType.multi) { - - newIndex = previousIndex; - } - }); - - result[newIndex] = currentType; - }); - - return result; - } - - - function compileMap(/* lists... */) { - var result = { - scalar: {}, - sequence: {}, - mapping: {}, - fallback: {}, - multi: { - scalar: [], - sequence: [], - mapping: [], - fallback: [] - } - }, index, length; - - function collectType(type) { - if (type.multi) { - result.multi[type.kind].push(type); - result.multi['fallback'].push(type); - } else { - result[type.kind][type.tag] = result['fallback'][type.tag] = type; - } - } - - for (index = 0, length = arguments.length; index < length; index += 1) { - arguments[index].forEach(collectType); - } - return result; - } - - - function Schema$1(definition) { - return this.extend(definition); - } - - - Schema$1.prototype.extend = function extend(definition) { - var implicit = []; - var explicit = []; - - if (definition instanceof type) { - // Schema.extend(type) - explicit.push(definition); - - } else if (Array.isArray(definition)) { - // Schema.extend([ type1, type2, ... ]) - explicit = explicit.concat(definition); - - } else if (definition && (Array.isArray(definition.implicit) || Array.isArray(definition.explicit))) { - // Schema.extend({ explicit: [ type1, type2, ... ], implicit: [ type1, type2, ... ] }) - if (definition.implicit) implicit = implicit.concat(definition.implicit); - if (definition.explicit) explicit = explicit.concat(definition.explicit); - - } else { - throw new exception('Schema.extend argument should be a Type, [ Type ], ' + - 'or a schema definition ({ implicit: [...], explicit: [...] })'); - } - - implicit.forEach(function (type$1) { - if (!(type$1 instanceof type)) { - throw new exception('Specified list of YAML types (or a single Type object) contains a non-Type object.'); - } - - if (type$1.loadKind && type$1.loadKind !== 'scalar') { - throw new exception('There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.'); - } - - if (type$1.multi) { - throw new exception('There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.'); - } - }); - - explicit.forEach(function (type$1) { - if (!(type$1 instanceof type)) { - throw new exception('Specified list of YAML types (or a single Type object) contains a non-Type object.'); - } - }); - - var result = Object.create(Schema$1.prototype); - - result.implicit = (this.implicit || []).concat(implicit); - result.explicit = (this.explicit || []).concat(explicit); - - result.compiledImplicit = compileList(result, 'implicit'); - result.compiledExplicit = compileList(result, 'explicit'); - result.compiledTypeMap = compileMap(result.compiledImplicit, result.compiledExplicit); - - return result; - }; - - - var schema = Schema$1; - - var str = new type('tag:yaml.org,2002:str', { - kind: 'scalar', - construct: function (data) { return data !== null ? data : ''; } - }); - - var seq = new type('tag:yaml.org,2002:seq', { - kind: 'sequence', - construct: function (data) { return data !== null ? data : []; } - }); - - var map = new type('tag:yaml.org,2002:map', { - kind: 'mapping', - construct: function (data) { return data !== null ? data : {}; } - }); - - var failsafe = new schema({ - explicit: [ - str, - seq, - map - ] - }); - - function resolveYamlNull(data) { - if (data === null) return true; - - var max = data.length; - - return (max === 1 && data === '~') || - (max === 4 && (data === 'null' || data === 'Null' || data === 'NULL')); - } - - function constructYamlNull() { - return null; - } - - function isNull(object) { - return object === null; - } - - var _null = new type('tag:yaml.org,2002:null', { - kind: 'scalar', - resolve: resolveYamlNull, - construct: constructYamlNull, - predicate: isNull, - represent: { - canonical: function () { return '~'; }, - lowercase: function () { return 'null'; }, - uppercase: function () { return 'NULL'; }, - camelcase: function () { return 'Null'; }, - empty: function () { return ''; } - }, - defaultStyle: 'lowercase' - }); - - function resolveYamlBoolean(data) { - if (data === null) return false; - - var max = data.length; - - return (max === 4 && (data === 'true' || data === 'True' || data === 'TRUE')) || - (max === 5 && (data === 'false' || data === 'False' || data === 'FALSE')); - } - - function constructYamlBoolean(data) { - return data === 'true' || - data === 'True' || - data === 'TRUE'; - } - - function isBoolean(object) { - return Object.prototype.toString.call(object) === '[object Boolean]'; - } - - var bool = new type('tag:yaml.org,2002:bool', { - kind: 'scalar', - resolve: resolveYamlBoolean, - construct: constructYamlBoolean, - predicate: isBoolean, - represent: { - lowercase: function (object) { return object ? 'true' : 'false'; }, - uppercase: function (object) { return object ? 'TRUE' : 'FALSE'; }, - camelcase: function (object) { return object ? 'True' : 'False'; } - }, - defaultStyle: 'lowercase' - }); - - function isHexCode(c) { - return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) || - ((0x41/* A */ <= c) && (c <= 0x46/* F */)) || - ((0x61/* a */ <= c) && (c <= 0x66/* f */)); - } - - function isOctCode(c) { - return ((0x30/* 0 */ <= c) && (c <= 0x37/* 7 */)); - } - - function isDecCode(c) { - return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)); - } - - function resolveYamlInteger(data) { - if (data === null) return false; - - var max = data.length, - index = 0, - hasDigits = false, - ch; - - if (!max) return false; - - ch = data[index]; - - // sign - if (ch === '-' || ch === '+') { - ch = data[++index]; - } - - if (ch === '0') { - // 0 - if (index + 1 === max) return true; - ch = data[++index]; - - // base 2, base 8, base 16 - - if (ch === 'b') { - // base 2 - index++; - - for (; index < max; index++) { - ch = data[index]; - if (ch === '_') continue; - if (ch !== '0' && ch !== '1') return false; - hasDigits = true; - } - return hasDigits && ch !== '_'; - } - - - if (ch === 'x') { - // base 16 - index++; - - for (; index < max; index++) { - ch = data[index]; - if (ch === '_') continue; - if (!isHexCode(data.charCodeAt(index))) return false; - hasDigits = true; - } - return hasDigits && ch !== '_'; - } - - - if (ch === 'o') { - // base 8 - index++; - - for (; index < max; index++) { - ch = data[index]; - if (ch === '_') continue; - if (!isOctCode(data.charCodeAt(index))) return false; - hasDigits = true; - } - return hasDigits && ch !== '_'; - } - } - - // base 10 (except 0) - - // value should not start with `_`; - if (ch === '_') return false; - - for (; index < max; index++) { - ch = data[index]; - if (ch === '_') continue; - if (!isDecCode(data.charCodeAt(index))) { - return false; - } - hasDigits = true; - } - - // Should have digits and should not end with `_` - if (!hasDigits || ch === '_') return false; - - return true; - } - - function constructYamlInteger(data) { - var value = data, sign = 1, ch; - - if (value.indexOf('_') !== -1) { - value = value.replace(/_/g, ''); - } - - ch = value[0]; - - if (ch === '-' || ch === '+') { - if (ch === '-') sign = -1; - value = value.slice(1); - ch = value[0]; - } - - if (value === '0') return 0; - - if (ch === '0') { - if (value[1] === 'b') return sign * parseInt(value.slice(2), 2); - if (value[1] === 'x') return sign * parseInt(value.slice(2), 16); - if (value[1] === 'o') return sign * parseInt(value.slice(2), 8); - } - - return sign * parseInt(value, 10); - } - - function isInteger(object) { - return (Object.prototype.toString.call(object)) === '[object Number]' && - (object % 1 === 0 && !common.isNegativeZero(object)); - } - - var int = new type('tag:yaml.org,2002:int', { - kind: 'scalar', - resolve: resolveYamlInteger, - construct: constructYamlInteger, - predicate: isInteger, - represent: { - binary: function (obj) { return obj >= 0 ? '0b' + obj.toString(2) : '-0b' + obj.toString(2).slice(1); }, - octal: function (obj) { return obj >= 0 ? '0o' + obj.toString(8) : '-0o' + obj.toString(8).slice(1); }, - decimal: function (obj) { return obj.toString(10); }, - /* eslint-disable max-len */ - hexadecimal: function (obj) { return obj >= 0 ? '0x' + obj.toString(16).toUpperCase() : '-0x' + obj.toString(16).toUpperCase().slice(1); } - }, - defaultStyle: 'decimal', - styleAliases: { - binary: [ 2, 'bin' ], - octal: [ 8, 'oct' ], - decimal: [ 10, 'dec' ], - hexadecimal: [ 16, 'hex' ] - } - }); - - var YAML_FLOAT_PATTERN = new RegExp( - // 2.5e4, 2.5 and integers - '^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?' + - // .2e4, .2 - // special case, seems not from spec - '|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?' + - // .inf - '|[-+]?\\.(?:inf|Inf|INF)' + - // .nan - '|\\.(?:nan|NaN|NAN))$'); - - function resolveYamlFloat(data) { - if (data === null) return false; - - if (!YAML_FLOAT_PATTERN.test(data) || - // Quick hack to not allow integers end with `_` - // Probably should update regexp & check speed - data[data.length - 1] === '_') { - return false; - } - - return true; - } - - function constructYamlFloat(data) { - var value, sign; - - value = data.replace(/_/g, '').toLowerCase(); - sign = value[0] === '-' ? -1 : 1; - - if ('+-'.indexOf(value[0]) >= 0) { - value = value.slice(1); - } - - if (value === '.inf') { - return (sign === 1) ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY; - - } else if (value === '.nan') { - return NaN; - } - return sign * parseFloat(value, 10); - } - - - var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/; - - function representYamlFloat(object, style) { - var res; - - if (isNaN(object)) { - switch (style) { - case 'lowercase': return '.nan'; - case 'uppercase': return '.NAN'; - case 'camelcase': return '.NaN'; - } - } else if (Number.POSITIVE_INFINITY === object) { - switch (style) { - case 'lowercase': return '.inf'; - case 'uppercase': return '.INF'; - case 'camelcase': return '.Inf'; - } - } else if (Number.NEGATIVE_INFINITY === object) { - switch (style) { - case 'lowercase': return '-.inf'; - case 'uppercase': return '-.INF'; - case 'camelcase': return '-.Inf'; - } - } else if (common.isNegativeZero(object)) { - return '-0.0'; - } - - res = object.toString(10); - - // JS stringifier can build scientific format without dots: 5e-100, - // while YAML requres dot: 5.e-100. Fix it with simple hack - - return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace('e', '.e') : res; - } - - function isFloat(object) { - return (Object.prototype.toString.call(object) === '[object Number]') && - (object % 1 !== 0 || common.isNegativeZero(object)); - } - - var float = new type('tag:yaml.org,2002:float', { - kind: 'scalar', - resolve: resolveYamlFloat, - construct: constructYamlFloat, - predicate: isFloat, - represent: representYamlFloat, - defaultStyle: 'lowercase' - }); - - var json = failsafe.extend({ - implicit: [ - _null, - bool, - int, - float - ] - }); - - var core = json; - - var YAML_DATE_REGEXP = new RegExp( - '^([0-9][0-9][0-9][0-9])' + // [1] year - '-([0-9][0-9])' + // [2] month - '-([0-9][0-9])$'); // [3] day - - var YAML_TIMESTAMP_REGEXP = new RegExp( - '^([0-9][0-9][0-9][0-9])' + // [1] year - '-([0-9][0-9]?)' + // [2] month - '-([0-9][0-9]?)' + // [3] day - '(?:[Tt]|[ \\t]+)' + // ... - '([0-9][0-9]?)' + // [4] hour - ':([0-9][0-9])' + // [5] minute - ':([0-9][0-9])' + // [6] second - '(?:\\.([0-9]*))?' + // [7] fraction - '(?:[ \\t]*(Z|([-+])([0-9][0-9]?)' + // [8] tz [9] tz_sign [10] tz_hour - '(?::([0-9][0-9]))?))?$'); // [11] tz_minute - - function resolveYamlTimestamp(data) { - if (data === null) return false; - if (YAML_DATE_REGEXP.exec(data) !== null) return true; - if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) return true; - return false; - } - - function constructYamlTimestamp(data) { - var match, year, month, day, hour, minute, second, fraction = 0, - delta = null, tz_hour, tz_minute, date; - - match = YAML_DATE_REGEXP.exec(data); - if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(data); - - if (match === null) throw new Error('Date resolve error'); - - // match: [1] year [2] month [3] day - - year = +(match[1]); - month = +(match[2]) - 1; // JS month starts with 0 - day = +(match[3]); - - if (!match[4]) { // no hour - return new Date(Date.UTC(year, month, day)); - } - - // match: [4] hour [5] minute [6] second [7] fraction - - hour = +(match[4]); - minute = +(match[5]); - second = +(match[6]); - - if (match[7]) { - fraction = match[7].slice(0, 3); - while (fraction.length < 3) { // milli-seconds - fraction += '0'; - } - fraction = +fraction; - } - - // match: [8] tz [9] tz_sign [10] tz_hour [11] tz_minute - - if (match[9]) { - tz_hour = +(match[10]); - tz_minute = +(match[11] || 0); - delta = (tz_hour * 60 + tz_minute) * 60000; // delta in mili-seconds - if (match[9] === '-') delta = -delta; - } - - date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction)); - - if (delta) date.setTime(date.getTime() - delta); - - return date; - } - - function representYamlTimestamp(object /*, style*/) { - return object.toISOString(); - } - - var timestamp = new type('tag:yaml.org,2002:timestamp', { - kind: 'scalar', - resolve: resolveYamlTimestamp, - construct: constructYamlTimestamp, - instanceOf: Date, - represent: representYamlTimestamp - }); - - function resolveYamlMerge(data) { - return data === '<<' || data === null; - } - - var merge = new type('tag:yaml.org,2002:merge', { - kind: 'scalar', - resolve: resolveYamlMerge - }); - - /*eslint-disable no-bitwise*/ - - - - - - // [ 64, 65, 66 ] -> [ padding, CR, LF ] - var BASE64_MAP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r'; - - - function resolveYamlBinary(data) { - if (data === null) return false; - - var code, idx, bitlen = 0, max = data.length, map = BASE64_MAP; - - // Convert one by one. - for (idx = 0; idx < max; idx++) { - code = map.indexOf(data.charAt(idx)); - - // Skip CR/LF - if (code > 64) continue; - - // Fail on illegal characters - if (code < 0) return false; - - bitlen += 6; - } - - // If there are any bits left, source was corrupted - return (bitlen % 8) === 0; - } - - function constructYamlBinary(data) { - var idx, tailbits, - input = data.replace(/[\r\n=]/g, ''), // remove CR/LF & padding to simplify scan - max = input.length, - map = BASE64_MAP, - bits = 0, - result = []; - - // Collect by 6*4 bits (3 bytes) - - for (idx = 0; idx < max; idx++) { - if ((idx % 4 === 0) && idx) { - result.push((bits >> 16) & 0xFF); - result.push((bits >> 8) & 0xFF); - result.push(bits & 0xFF); - } - - bits = (bits << 6) | map.indexOf(input.charAt(idx)); - } - - // Dump tail - - tailbits = (max % 4) * 6; - - if (tailbits === 0) { - result.push((bits >> 16) & 0xFF); - result.push((bits >> 8) & 0xFF); - result.push(bits & 0xFF); - } else if (tailbits === 18) { - result.push((bits >> 10) & 0xFF); - result.push((bits >> 2) & 0xFF); - } else if (tailbits === 12) { - result.push((bits >> 4) & 0xFF); - } - - return new Uint8Array(result); - } - - function representYamlBinary(object /*, style*/) { - var result = '', bits = 0, idx, tail, - max = object.length, - map = BASE64_MAP; - - // Convert every three bytes to 4 ASCII characters. - - for (idx = 0; idx < max; idx++) { - if ((idx % 3 === 0) && idx) { - result += map[(bits >> 18) & 0x3F]; - result += map[(bits >> 12) & 0x3F]; - result += map[(bits >> 6) & 0x3F]; - result += map[bits & 0x3F]; - } - - bits = (bits << 8) + object[idx]; - } - - // Dump tail - - tail = max % 3; - - if (tail === 0) { - result += map[(bits >> 18) & 0x3F]; - result += map[(bits >> 12) & 0x3F]; - result += map[(bits >> 6) & 0x3F]; - result += map[bits & 0x3F]; - } else if (tail === 2) { - result += map[(bits >> 10) & 0x3F]; - result += map[(bits >> 4) & 0x3F]; - result += map[(bits << 2) & 0x3F]; - result += map[64]; - } else if (tail === 1) { - result += map[(bits >> 2) & 0x3F]; - result += map[(bits << 4) & 0x3F]; - result += map[64]; - result += map[64]; - } - - return result; - } - - function isBinary(obj) { - return Object.prototype.toString.call(obj) === '[object Uint8Array]'; - } - - var binary = new type('tag:yaml.org,2002:binary', { - kind: 'scalar', - resolve: resolveYamlBinary, - construct: constructYamlBinary, - predicate: isBinary, - represent: representYamlBinary - }); - - var _hasOwnProperty$3 = Object.prototype.hasOwnProperty; - var _toString$2 = Object.prototype.toString; - - function resolveYamlOmap(data) { - if (data === null) return true; - - var objectKeys = [], index, length, pair, pairKey, pairHasKey, - object = data; - - for (index = 0, length = object.length; index < length; index += 1) { - pair = object[index]; - pairHasKey = false; - - if (_toString$2.call(pair) !== '[object Object]') return false; - - for (pairKey in pair) { - if (_hasOwnProperty$3.call(pair, pairKey)) { - if (!pairHasKey) pairHasKey = true; - else return false; - } - } - - if (!pairHasKey) return false; - - if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey); - else return false; - } - - return true; - } - - function constructYamlOmap(data) { - return data !== null ? data : []; - } - - var omap = new type('tag:yaml.org,2002:omap', { - kind: 'sequence', - resolve: resolveYamlOmap, - construct: constructYamlOmap - }); - - var _toString$1 = Object.prototype.toString; - - function resolveYamlPairs(data) { - if (data === null) return true; - - var index, length, pair, keys, result, - object = data; - - result = new Array(object.length); - - for (index = 0, length = object.length; index < length; index += 1) { - pair = object[index]; - - if (_toString$1.call(pair) !== '[object Object]') return false; - - keys = Object.keys(pair); - - if (keys.length !== 1) return false; - - result[index] = [ keys[0], pair[keys[0]] ]; - } - - return true; - } - - function constructYamlPairs(data) { - if (data === null) return []; - - var index, length, pair, keys, result, - object = data; - - result = new Array(object.length); - - for (index = 0, length = object.length; index < length; index += 1) { - pair = object[index]; - - keys = Object.keys(pair); - - result[index] = [ keys[0], pair[keys[0]] ]; - } - - return result; - } - - var pairs = new type('tag:yaml.org,2002:pairs', { - kind: 'sequence', - resolve: resolveYamlPairs, - construct: constructYamlPairs - }); - - var _hasOwnProperty$2 = Object.prototype.hasOwnProperty; - - function resolveYamlSet(data) { - if (data === null) return true; - - var key, object = data; - - for (key in object) { - if (_hasOwnProperty$2.call(object, key)) { - if (object[key] !== null) return false; - } - } - - return true; - } - - function constructYamlSet(data) { - return data !== null ? data : {}; - } - - var set = new type('tag:yaml.org,2002:set', { - kind: 'mapping', - resolve: resolveYamlSet, - construct: constructYamlSet - }); - - var _default = core.extend({ - implicit: [ - timestamp, - merge - ], - explicit: [ - binary, - omap, - pairs, - set - ] - }); - - /*eslint-disable max-len,no-use-before-define*/ - - - - - - - - var _hasOwnProperty$1 = Object.prototype.hasOwnProperty; - - - var CONTEXT_FLOW_IN = 1; - var CONTEXT_FLOW_OUT = 2; - var CONTEXT_BLOCK_IN = 3; - var CONTEXT_BLOCK_OUT = 4; - - - var CHOMPING_CLIP = 1; - var CHOMPING_STRIP = 2; - var CHOMPING_KEEP = 3; - - - var PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; - var PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/; - var PATTERN_FLOW_INDICATORS = /[,\[\]\{\}]/; - var PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\-]+!)$/i; - var PATTERN_TAG_URI = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i; - - - function _class(obj) { return Object.prototype.toString.call(obj); } - - function is_EOL(c) { - return (c === 0x0A/* LF */) || (c === 0x0D/* CR */); - } - - function is_WHITE_SPACE(c) { - return (c === 0x09/* Tab */) || (c === 0x20/* Space */); - } - - function is_WS_OR_EOL(c) { - return (c === 0x09/* Tab */) || - (c === 0x20/* Space */) || - (c === 0x0A/* LF */) || - (c === 0x0D/* CR */); - } - - function is_FLOW_INDICATOR(c) { - return c === 0x2C/* , */ || - c === 0x5B/* [ */ || - c === 0x5D/* ] */ || - c === 0x7B/* { */ || - c === 0x7D/* } */; - } - - function fromHexCode(c) { - var lc; - - if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) { - return c - 0x30; - } - - /*eslint-disable no-bitwise*/ - lc = c | 0x20; - - if ((0x61/* a */ <= lc) && (lc <= 0x66/* f */)) { - return lc - 0x61 + 10; - } - - return -1; - } - - function escapedHexLen(c) { - if (c === 0x78/* x */) { return 2; } - if (c === 0x75/* u */) { return 4; } - if (c === 0x55/* U */) { return 8; } - return 0; - } - - function fromDecimalCode(c) { - if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) { - return c - 0x30; - } - - return -1; - } - - function simpleEscapeSequence(c) { - /* eslint-disable indent */ - return (c === 0x30/* 0 */) ? '\x00' : - (c === 0x61/* a */) ? '\x07' : - (c === 0x62/* b */) ? '\x08' : - (c === 0x74/* t */) ? '\x09' : - (c === 0x09/* Tab */) ? '\x09' : - (c === 0x6E/* n */) ? '\x0A' : - (c === 0x76/* v */) ? '\x0B' : - (c === 0x66/* f */) ? '\x0C' : - (c === 0x72/* r */) ? '\x0D' : - (c === 0x65/* e */) ? '\x1B' : - (c === 0x20/* Space */) ? ' ' : - (c === 0x22/* " */) ? '\x22' : - (c === 0x2F/* / */) ? '/' : - (c === 0x5C/* \ */) ? '\x5C' : - (c === 0x4E/* N */) ? '\x85' : - (c === 0x5F/* _ */) ? '\xA0' : - (c === 0x4C/* L */) ? '\u2028' : - (c === 0x50/* P */) ? '\u2029' : ''; - } - - function charFromCodepoint(c) { - if (c <= 0xFFFF) { - return String.fromCharCode(c); - } - // Encode UTF-16 surrogate pair - // https://en.wikipedia.org/wiki/UTF-16#Code_points_U.2B010000_to_U.2B10FFFF - return String.fromCharCode( - ((c - 0x010000) >> 10) + 0xD800, - ((c - 0x010000) & 0x03FF) + 0xDC00 - ); - } - - var simpleEscapeCheck = new Array(256); // integer, for fast access - var simpleEscapeMap = new Array(256); - for (var i = 0; i < 256; i++) { - simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0; - simpleEscapeMap[i] = simpleEscapeSequence(i); - } - - - function State$1(input, options) { - this.input = input; - - this.filename = options['filename'] || null; - this.schema = options['schema'] || _default; - this.onWarning = options['onWarning'] || null; - // (Hidden) Remove? makes the loader to expect YAML 1.1 documents - // if such documents have no explicit %YAML directive - this.legacy = options['legacy'] || false; - - this.json = options['json'] || false; - this.listener = options['listener'] || null; - - this.implicitTypes = this.schema.compiledImplicit; - this.typeMap = this.schema.compiledTypeMap; - - this.length = input.length; - this.position = 0; - this.line = 0; - this.lineStart = 0; - this.lineIndent = 0; - - // position of first leading tab in the current line, - // used to make sure there are no tabs in the indentation - this.firstTabInLine = -1; - - this.documents = []; - - /* - this.version; - this.checkLineBreaks; - this.tagMap; - this.anchorMap; - this.tag; - this.anchor; - this.kind; - this.result;*/ - - } - - - function generateError(state, message) { - var mark = { - name: state.filename, - buffer: state.input.slice(0, -1), // omit trailing \0 - position: state.position, - line: state.line, - column: state.position - state.lineStart - }; - - mark.snippet = snippet(mark); - - return new exception(message, mark); - } - - function throwError(state, message) { - throw generateError(state, message); - } - - function throwWarning(state, message) { - if (state.onWarning) { - state.onWarning.call(null, generateError(state, message)); - } - } - - - var directiveHandlers = { - - YAML: function handleYamlDirective(state, name, args) { - - var match, major, minor; - - if (state.version !== null) { - throwError(state, 'duplication of %YAML directive'); - } - - if (args.length !== 1) { - throwError(state, 'YAML directive accepts exactly one argument'); - } - - match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]); - - if (match === null) { - throwError(state, 'ill-formed argument of the YAML directive'); - } - - major = parseInt(match[1], 10); - minor = parseInt(match[2], 10); - - if (major !== 1) { - throwError(state, 'unacceptable YAML version of the document'); - } - - state.version = args[0]; - state.checkLineBreaks = (minor < 2); - - if (minor !== 1 && minor !== 2) { - throwWarning(state, 'unsupported YAML version of the document'); - } - }, - - TAG: function handleTagDirective(state, name, args) { - - var handle, prefix; - - if (args.length !== 2) { - throwError(state, 'TAG directive accepts exactly two arguments'); - } - - handle = args[0]; - prefix = args[1]; - - if (!PATTERN_TAG_HANDLE.test(handle)) { - throwError(state, 'ill-formed tag handle (first argument) of the TAG directive'); - } - - if (_hasOwnProperty$1.call(state.tagMap, handle)) { - throwError(state, 'there is a previously declared suffix for "' + handle + '" tag handle'); - } - - if (!PATTERN_TAG_URI.test(prefix)) { - throwError(state, 'ill-formed tag prefix (second argument) of the TAG directive'); - } - - try { - prefix = decodeURIComponent(prefix); - } catch (err) { - throwError(state, 'tag prefix is malformed: ' + prefix); - } - - state.tagMap[handle] = prefix; - } - }; - - - function captureSegment(state, start, end, checkJson) { - var _position, _length, _character, _result; - - if (start < end) { - _result = state.input.slice(start, end); - - if (checkJson) { - for (_position = 0, _length = _result.length; _position < _length; _position += 1) { - _character = _result.charCodeAt(_position); - if (!(_character === 0x09 || - (0x20 <= _character && _character <= 0x10FFFF))) { - throwError(state, 'expected valid JSON character'); - } - } - } else if (PATTERN_NON_PRINTABLE.test(_result)) { - throwError(state, 'the stream contains non-printable characters'); - } - - state.result += _result; - } - } - - function mergeMappings(state, destination, source, overridableKeys) { - var sourceKeys, key, index, quantity; - - if (!common.isObject(source)) { - throwError(state, 'cannot merge mappings; the provided source object is unacceptable'); - } - - sourceKeys = Object.keys(source); - - for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) { - key = sourceKeys[index]; - - if (!_hasOwnProperty$1.call(destination, key)) { - destination[key] = source[key]; - overridableKeys[key] = true; - } - } - } - - function storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, - startLine, startLineStart, startPos) { - - var index, quantity; - - // The output is a plain object here, so keys can only be strings. - // We need to convert keyNode to a string, but doing so can hang the process - // (deeply nested arrays that explode exponentially using aliases). - if (Array.isArray(keyNode)) { - keyNode = Array.prototype.slice.call(keyNode); - - for (index = 0, quantity = keyNode.length; index < quantity; index += 1) { - if (Array.isArray(keyNode[index])) { - throwError(state, 'nested arrays are not supported inside keys'); - } - - if (typeof keyNode === 'object' && _class(keyNode[index]) === '[object Object]') { - keyNode[index] = '[object Object]'; - } - } - } - - // Avoid code execution in load() via toString property - // (still use its own toString for arrays, timestamps, - // and whatever user schema extensions happen to have @@toStringTag) - if (typeof keyNode === 'object' && _class(keyNode) === '[object Object]') { - keyNode = '[object Object]'; - } - - - keyNode = String(keyNode); - - if (_result === null) { - _result = {}; - } - - if (keyTag === 'tag:yaml.org,2002:merge') { - if (Array.isArray(valueNode)) { - for (index = 0, quantity = valueNode.length; index < quantity; index += 1) { - mergeMappings(state, _result, valueNode[index], overridableKeys); - } - } else { - mergeMappings(state, _result, valueNode, overridableKeys); - } - } else { - if (!state.json && - !_hasOwnProperty$1.call(overridableKeys, keyNode) && - _hasOwnProperty$1.call(_result, keyNode)) { - state.line = startLine || state.line; - state.lineStart = startLineStart || state.lineStart; - state.position = startPos || state.position; - throwError(state, 'duplicated mapping key'); - } - - // used for this specific key only because Object.defineProperty is slow - if (keyNode === '__proto__') { - Object.defineProperty(_result, keyNode, { - configurable: true, - enumerable: true, - writable: true, - value: valueNode - }); - } else { - _result[keyNode] = valueNode; - } - delete overridableKeys[keyNode]; - } - - return _result; - } - - function readLineBreak(state) { - var ch; - - ch = state.input.charCodeAt(state.position); - - if (ch === 0x0A/* LF */) { - state.position++; - } else if (ch === 0x0D/* CR */) { - state.position++; - if (state.input.charCodeAt(state.position) === 0x0A/* LF */) { - state.position++; - } - } else { - throwError(state, 'a line break is expected'); - } - - state.line += 1; - state.lineStart = state.position; - state.firstTabInLine = -1; - } - - function skipSeparationSpace(state, allowComments, checkIndent) { - var lineBreaks = 0, - ch = state.input.charCodeAt(state.position); - - while (ch !== 0) { - while (is_WHITE_SPACE(ch)) { - if (ch === 0x09/* Tab */ && state.firstTabInLine === -1) { - state.firstTabInLine = state.position; - } - ch = state.input.charCodeAt(++state.position); - } - - if (allowComments && ch === 0x23/* # */) { - do { - ch = state.input.charCodeAt(++state.position); - } while (ch !== 0x0A/* LF */ && ch !== 0x0D/* CR */ && ch !== 0); - } - - if (is_EOL(ch)) { - readLineBreak(state); - - ch = state.input.charCodeAt(state.position); - lineBreaks++; - state.lineIndent = 0; - - while (ch === 0x20/* Space */) { - state.lineIndent++; - ch = state.input.charCodeAt(++state.position); - } - } else { - break; - } - } - - if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) { - throwWarning(state, 'deficient indentation'); - } - - return lineBreaks; - } - - function testDocumentSeparator(state) { - var _position = state.position, - ch; - - ch = state.input.charCodeAt(_position); - - // Condition state.position === state.lineStart is tested - // in parent on each call, for efficiency. No needs to test here again. - if ((ch === 0x2D/* - */ || ch === 0x2E/* . */) && - ch === state.input.charCodeAt(_position + 1) && - ch === state.input.charCodeAt(_position + 2)) { - - _position += 3; - - ch = state.input.charCodeAt(_position); - - if (ch === 0 || is_WS_OR_EOL(ch)) { - return true; - } - } - - return false; - } - - function writeFoldedLines(state, count) { - if (count === 1) { - state.result += ' '; - } else if (count > 1) { - state.result += common.repeat('\n', count - 1); - } - } - - - function readPlainScalar(state, nodeIndent, withinFlowCollection) { - var preceding, - following, - captureStart, - captureEnd, - hasPendingContent, - _line, - _lineStart, - _lineIndent, - _kind = state.kind, - _result = state.result, - ch; - - ch = state.input.charCodeAt(state.position); - - if (is_WS_OR_EOL(ch) || - is_FLOW_INDICATOR(ch) || - ch === 0x23/* # */ || - ch === 0x26/* & */ || - ch === 0x2A/* * */ || - ch === 0x21/* ! */ || - ch === 0x7C/* | */ || - ch === 0x3E/* > */ || - ch === 0x27/* ' */ || - ch === 0x22/* " */ || - ch === 0x25/* % */ || - ch === 0x40/* @ */ || - ch === 0x60/* ` */) { - return false; - } - - if (ch === 0x3F/* ? */ || ch === 0x2D/* - */) { - following = state.input.charCodeAt(state.position + 1); - - if (is_WS_OR_EOL(following) || - withinFlowCollection && is_FLOW_INDICATOR(following)) { - return false; - } - } - - state.kind = 'scalar'; - state.result = ''; - captureStart = captureEnd = state.position; - hasPendingContent = false; - - while (ch !== 0) { - if (ch === 0x3A/* : */) { - following = state.input.charCodeAt(state.position + 1); - - if (is_WS_OR_EOL(following) || - withinFlowCollection && is_FLOW_INDICATOR(following)) { - break; - } - - } else if (ch === 0x23/* # */) { - preceding = state.input.charCodeAt(state.position - 1); - - if (is_WS_OR_EOL(preceding)) { - break; - } - - } else if ((state.position === state.lineStart && testDocumentSeparator(state)) || - withinFlowCollection && is_FLOW_INDICATOR(ch)) { - break; - - } else if (is_EOL(ch)) { - _line = state.line; - _lineStart = state.lineStart; - _lineIndent = state.lineIndent; - skipSeparationSpace(state, false, -1); - - if (state.lineIndent >= nodeIndent) { - hasPendingContent = true; - ch = state.input.charCodeAt(state.position); - continue; - } else { - state.position = captureEnd; - state.line = _line; - state.lineStart = _lineStart; - state.lineIndent = _lineIndent; - break; - } - } - - if (hasPendingContent) { - captureSegment(state, captureStart, captureEnd, false); - writeFoldedLines(state, state.line - _line); - captureStart = captureEnd = state.position; - hasPendingContent = false; - } - - if (!is_WHITE_SPACE(ch)) { - captureEnd = state.position + 1; - } - - ch = state.input.charCodeAt(++state.position); - } - - captureSegment(state, captureStart, captureEnd, false); - - if (state.result) { - return true; - } - - state.kind = _kind; - state.result = _result; - return false; - } - - function readSingleQuotedScalar(state, nodeIndent) { - var ch, - captureStart, captureEnd; - - ch = state.input.charCodeAt(state.position); - - if (ch !== 0x27/* ' */) { - return false; - } - - state.kind = 'scalar'; - state.result = ''; - state.position++; - captureStart = captureEnd = state.position; - - while ((ch = state.input.charCodeAt(state.position)) !== 0) { - if (ch === 0x27/* ' */) { - captureSegment(state, captureStart, state.position, true); - ch = state.input.charCodeAt(++state.position); - - if (ch === 0x27/* ' */) { - captureStart = state.position; - state.position++; - captureEnd = state.position; - } else { - return true; - } - - } else if (is_EOL(ch)) { - captureSegment(state, captureStart, captureEnd, true); - writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); - captureStart = captureEnd = state.position; - - } else if (state.position === state.lineStart && testDocumentSeparator(state)) { - throwError(state, 'unexpected end of the document within a single quoted scalar'); - - } else { - state.position++; - captureEnd = state.position; - } - } - - throwError(state, 'unexpected end of the stream within a single quoted scalar'); - } - - function readDoubleQuotedScalar(state, nodeIndent) { - var captureStart, - captureEnd, - hexLength, - hexResult, - tmp, - ch; - - ch = state.input.charCodeAt(state.position); - - if (ch !== 0x22/* " */) { - return false; - } - - state.kind = 'scalar'; - state.result = ''; - state.position++; - captureStart = captureEnd = state.position; - - while ((ch = state.input.charCodeAt(state.position)) !== 0) { - if (ch === 0x22/* " */) { - captureSegment(state, captureStart, state.position, true); - state.position++; - return true; - - } else if (ch === 0x5C/* \ */) { - captureSegment(state, captureStart, state.position, true); - ch = state.input.charCodeAt(++state.position); - - if (is_EOL(ch)) { - skipSeparationSpace(state, false, nodeIndent); - - // TODO: rework to inline fn with no type cast? - } else if (ch < 256 && simpleEscapeCheck[ch]) { - state.result += simpleEscapeMap[ch]; - state.position++; - - } else if ((tmp = escapedHexLen(ch)) > 0) { - hexLength = tmp; - hexResult = 0; - - for (; hexLength > 0; hexLength--) { - ch = state.input.charCodeAt(++state.position); - - if ((tmp = fromHexCode(ch)) >= 0) { - hexResult = (hexResult << 4) + tmp; - - } else { - throwError(state, 'expected hexadecimal character'); - } - } - - state.result += charFromCodepoint(hexResult); - - state.position++; - - } else { - throwError(state, 'unknown escape sequence'); - } - - captureStart = captureEnd = state.position; - - } else if (is_EOL(ch)) { - captureSegment(state, captureStart, captureEnd, true); - writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); - captureStart = captureEnd = state.position; - - } else if (state.position === state.lineStart && testDocumentSeparator(state)) { - throwError(state, 'unexpected end of the document within a double quoted scalar'); - - } else { - state.position++; - captureEnd = state.position; - } - } - - throwError(state, 'unexpected end of the stream within a double quoted scalar'); - } - - function readFlowCollection(state, nodeIndent) { - var readNext = true, - _line, - _lineStart, - _pos, - _tag = state.tag, - _result, - _anchor = state.anchor, - following, - terminator, - isPair, - isExplicitPair, - isMapping, - overridableKeys = Object.create(null), - keyNode, - keyTag, - valueNode, - ch; - - ch = state.input.charCodeAt(state.position); - - if (ch === 0x5B/* [ */) { - terminator = 0x5D;/* ] */ - isMapping = false; - _result = []; - } else if (ch === 0x7B/* { */) { - terminator = 0x7D;/* } */ - isMapping = true; - _result = {}; - } else { - return false; - } - - if (state.anchor !== null) { - state.anchorMap[state.anchor] = _result; - } - - ch = state.input.charCodeAt(++state.position); - - while (ch !== 0) { - skipSeparationSpace(state, true, nodeIndent); - - ch = state.input.charCodeAt(state.position); - - if (ch === terminator) { - state.position++; - state.tag = _tag; - state.anchor = _anchor; - state.kind = isMapping ? 'mapping' : 'sequence'; - state.result = _result; - return true; - } else if (!readNext) { - throwError(state, 'missed comma between flow collection entries'); - } else if (ch === 0x2C/* , */) { - // "flow collection entries can never be completely empty", as per YAML 1.2, section 7.4 - throwError(state, "expected the node content, but found ','"); - } - - keyTag = keyNode = valueNode = null; - isPair = isExplicitPair = false; - - if (ch === 0x3F/* ? */) { - following = state.input.charCodeAt(state.position + 1); - - if (is_WS_OR_EOL(following)) { - isPair = isExplicitPair = true; - state.position++; - skipSeparationSpace(state, true, nodeIndent); - } - } - - _line = state.line; // Save the current line. - _lineStart = state.lineStart; - _pos = state.position; - composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); - keyTag = state.tag; - keyNode = state.result; - skipSeparationSpace(state, true, nodeIndent); - - ch = state.input.charCodeAt(state.position); - - if ((isExplicitPair || state.line === _line) && ch === 0x3A/* : */) { - isPair = true; - ch = state.input.charCodeAt(++state.position); - skipSeparationSpace(state, true, nodeIndent); - composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); - valueNode = state.result; - } - - if (isMapping) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos); - } else if (isPair) { - _result.push(storeMappingPair(state, null, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos)); - } else { - _result.push(keyNode); - } - - skipSeparationSpace(state, true, nodeIndent); - - ch = state.input.charCodeAt(state.position); - - if (ch === 0x2C/* , */) { - readNext = true; - ch = state.input.charCodeAt(++state.position); - } else { - readNext = false; - } - } - - throwError(state, 'unexpected end of the stream within a flow collection'); - } - - function readBlockScalar(state, nodeIndent) { - var captureStart, - folding, - chomping = CHOMPING_CLIP, - didReadContent = false, - detectedIndent = false, - textIndent = nodeIndent, - emptyLines = 0, - atMoreIndented = false, - tmp, - ch; - - ch = state.input.charCodeAt(state.position); - - if (ch === 0x7C/* | */) { - folding = false; - } else if (ch === 0x3E/* > */) { - folding = true; - } else { - return false; - } - - state.kind = 'scalar'; - state.result = ''; - - while (ch !== 0) { - ch = state.input.charCodeAt(++state.position); - - if (ch === 0x2B/* + */ || ch === 0x2D/* - */) { - if (CHOMPING_CLIP === chomping) { - chomping = (ch === 0x2B/* + */) ? CHOMPING_KEEP : CHOMPING_STRIP; - } else { - throwError(state, 'repeat of a chomping mode identifier'); - } - - } else if ((tmp = fromDecimalCode(ch)) >= 0) { - if (tmp === 0) { - throwError(state, 'bad explicit indentation width of a block scalar; it cannot be less than one'); - } else if (!detectedIndent) { - textIndent = nodeIndent + tmp - 1; - detectedIndent = true; - } else { - throwError(state, 'repeat of an indentation width identifier'); - } - - } else { - break; - } - } - - if (is_WHITE_SPACE(ch)) { - do { ch = state.input.charCodeAt(++state.position); } - while (is_WHITE_SPACE(ch)); - - if (ch === 0x23/* # */) { - do { ch = state.input.charCodeAt(++state.position); } - while (!is_EOL(ch) && (ch !== 0)); - } - } - - while (ch !== 0) { - readLineBreak(state); - state.lineIndent = 0; - - ch = state.input.charCodeAt(state.position); - - while ((!detectedIndent || state.lineIndent < textIndent) && - (ch === 0x20/* Space */)) { - state.lineIndent++; - ch = state.input.charCodeAt(++state.position); - } - - if (!detectedIndent && state.lineIndent > textIndent) { - textIndent = state.lineIndent; - } - - if (is_EOL(ch)) { - emptyLines++; - continue; - } - - // End of the scalar. - if (state.lineIndent < textIndent) { - - // Perform the chomping. - if (chomping === CHOMPING_KEEP) { - state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); - } else if (chomping === CHOMPING_CLIP) { - if (didReadContent) { // i.e. only if the scalar is not empty. - state.result += '\n'; - } - } - - // Break this `while` cycle and go to the funciton's epilogue. - break; - } - - // Folded style: use fancy rules to handle line breaks. - if (folding) { - - // Lines starting with white space characters (more-indented lines) are not folded. - if (is_WHITE_SPACE(ch)) { - atMoreIndented = true; - // except for the first content line (cf. Example 8.1) - state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); - - // End of more-indented block. - } else if (atMoreIndented) { - atMoreIndented = false; - state.result += common.repeat('\n', emptyLines + 1); - - // Just one line break - perceive as the same line. - } else if (emptyLines === 0) { - if (didReadContent) { // i.e. only if we have already read some scalar content. - state.result += ' '; - } - - // Several line breaks - perceive as different lines. - } else { - state.result += common.repeat('\n', emptyLines); - } - - // Literal style: just add exact number of line breaks between content lines. - } else { - // Keep all line breaks except the header line break. - state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); - } - - didReadContent = true; - detectedIndent = true; - emptyLines = 0; - captureStart = state.position; - - while (!is_EOL(ch) && (ch !== 0)) { - ch = state.input.charCodeAt(++state.position); - } - - captureSegment(state, captureStart, state.position, false); - } - - return true; - } - - function readBlockSequence(state, nodeIndent) { - var _line, - _tag = state.tag, - _anchor = state.anchor, - _result = [], - following, - detected = false, - ch; - - // there is a leading tab before this token, so it can't be a block sequence/mapping; - // it can still be flow sequence/mapping or a scalar - if (state.firstTabInLine !== -1) return false; - - if (state.anchor !== null) { - state.anchorMap[state.anchor] = _result; - } - - ch = state.input.charCodeAt(state.position); - - while (ch !== 0) { - if (state.firstTabInLine !== -1) { - state.position = state.firstTabInLine; - throwError(state, 'tab characters must not be used in indentation'); - } - - if (ch !== 0x2D/* - */) { - break; - } - - following = state.input.charCodeAt(state.position + 1); - - if (!is_WS_OR_EOL(following)) { - break; - } - - detected = true; - state.position++; - - if (skipSeparationSpace(state, true, -1)) { - if (state.lineIndent <= nodeIndent) { - _result.push(null); - ch = state.input.charCodeAt(state.position); - continue; - } - } - - _line = state.line; - composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true); - _result.push(state.result); - skipSeparationSpace(state, true, -1); - - ch = state.input.charCodeAt(state.position); - - if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) { - throwError(state, 'bad indentation of a sequence entry'); - } else if (state.lineIndent < nodeIndent) { - break; - } - } - - if (detected) { - state.tag = _tag; - state.anchor = _anchor; - state.kind = 'sequence'; - state.result = _result; - return true; - } - return false; - } - - function readBlockMapping(state, nodeIndent, flowIndent) { - var following, - allowCompact, - _line, - _keyLine, - _keyLineStart, - _keyPos, - _tag = state.tag, - _anchor = state.anchor, - _result = {}, - overridableKeys = Object.create(null), - keyTag = null, - keyNode = null, - valueNode = null, - atExplicitKey = false, - detected = false, - ch; - - // there is a leading tab before this token, so it can't be a block sequence/mapping; - // it can still be flow sequence/mapping or a scalar - if (state.firstTabInLine !== -1) return false; - - if (state.anchor !== null) { - state.anchorMap[state.anchor] = _result; - } - - ch = state.input.charCodeAt(state.position); - - while (ch !== 0) { - if (!atExplicitKey && state.firstTabInLine !== -1) { - state.position = state.firstTabInLine; - throwError(state, 'tab characters must not be used in indentation'); - } - - following = state.input.charCodeAt(state.position + 1); - _line = state.line; // Save the current line. - - // - // Explicit notation case. There are two separate blocks: - // first for the key (denoted by "?") and second for the value (denoted by ":") - // - if ((ch === 0x3F/* ? */ || ch === 0x3A/* : */) && is_WS_OR_EOL(following)) { - - if (ch === 0x3F/* ? */) { - if (atExplicitKey) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); - keyTag = keyNode = valueNode = null; - } - - detected = true; - atExplicitKey = true; - allowCompact = true; - - } else if (atExplicitKey) { - // i.e. 0x3A/* : */ === character after the explicit key. - atExplicitKey = false; - allowCompact = true; - - } else { - throwError(state, 'incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line'); - } - - state.position += 1; - ch = following; - - // - // Implicit notation case. Flow-style node as the key first, then ":", and the value. - // - } else { - _keyLine = state.line; - _keyLineStart = state.lineStart; - _keyPos = state.position; - - if (!composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) { - // Neither implicit nor explicit notation. - // Reading is done. Go to the epilogue. - break; - } - - if (state.line === _line) { - ch = state.input.charCodeAt(state.position); - - while (is_WHITE_SPACE(ch)) { - ch = state.input.charCodeAt(++state.position); - } - - if (ch === 0x3A/* : */) { - ch = state.input.charCodeAt(++state.position); - - if (!is_WS_OR_EOL(ch)) { - throwError(state, 'a whitespace character is expected after the key-value separator within a block mapping'); - } - - if (atExplicitKey) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); - keyTag = keyNode = valueNode = null; - } - - detected = true; - atExplicitKey = false; - allowCompact = false; - keyTag = state.tag; - keyNode = state.result; - - } else if (detected) { - throwError(state, 'can not read an implicit mapping pair; a colon is missed'); - - } else { - state.tag = _tag; - state.anchor = _anchor; - return true; // Keep the result of `composeNode`. - } - - } else if (detected) { - throwError(state, 'can not read a block mapping entry; a multiline key may not be an implicit key'); - - } else { - state.tag = _tag; - state.anchor = _anchor; - return true; // Keep the result of `composeNode`. - } - } - - // - // Common reading code for both explicit and implicit notations. - // - if (state.line === _line || state.lineIndent > nodeIndent) { - if (atExplicitKey) { - _keyLine = state.line; - _keyLineStart = state.lineStart; - _keyPos = state.position; - } - - if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) { - if (atExplicitKey) { - keyNode = state.result; - } else { - valueNode = state.result; - } - } - - if (!atExplicitKey) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _keyLine, _keyLineStart, _keyPos); - keyTag = keyNode = valueNode = null; - } - - skipSeparationSpace(state, true, -1); - ch = state.input.charCodeAt(state.position); - } - - if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) { - throwError(state, 'bad indentation of a mapping entry'); - } else if (state.lineIndent < nodeIndent) { - break; - } - } - - // - // Epilogue. - // - - // Special case: last mapping's node contains only the key in explicit notation. - if (atExplicitKey) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); - } - - // Expose the resulting mapping. - if (detected) { - state.tag = _tag; - state.anchor = _anchor; - state.kind = 'mapping'; - state.result = _result; - } - - return detected; - } - - function readTagProperty(state) { - var _position, - isVerbatim = false, - isNamed = false, - tagHandle, - tagName, - ch; - - ch = state.input.charCodeAt(state.position); - - if (ch !== 0x21/* ! */) return false; - - if (state.tag !== null) { - throwError(state, 'duplication of a tag property'); - } - - ch = state.input.charCodeAt(++state.position); - - if (ch === 0x3C/* < */) { - isVerbatim = true; - ch = state.input.charCodeAt(++state.position); - - } else if (ch === 0x21/* ! */) { - isNamed = true; - tagHandle = '!!'; - ch = state.input.charCodeAt(++state.position); - - } else { - tagHandle = '!'; - } - - _position = state.position; - - if (isVerbatim) { - do { ch = state.input.charCodeAt(++state.position); } - while (ch !== 0 && ch !== 0x3E/* > */); - - if (state.position < state.length) { - tagName = state.input.slice(_position, state.position); - ch = state.input.charCodeAt(++state.position); - } else { - throwError(state, 'unexpected end of the stream within a verbatim tag'); - } - } else { - while (ch !== 0 && !is_WS_OR_EOL(ch)) { - - if (ch === 0x21/* ! */) { - if (!isNamed) { - tagHandle = state.input.slice(_position - 1, state.position + 1); - - if (!PATTERN_TAG_HANDLE.test(tagHandle)) { - throwError(state, 'named tag handle cannot contain such characters'); - } - - isNamed = true; - _position = state.position + 1; - } else { - throwError(state, 'tag suffix cannot contain exclamation marks'); - } - } - - ch = state.input.charCodeAt(++state.position); - } - - tagName = state.input.slice(_position, state.position); - - if (PATTERN_FLOW_INDICATORS.test(tagName)) { - throwError(state, 'tag suffix cannot contain flow indicator characters'); - } - } - - if (tagName && !PATTERN_TAG_URI.test(tagName)) { - throwError(state, 'tag name cannot contain such characters: ' + tagName); - } - - try { - tagName = decodeURIComponent(tagName); - } catch (err) { - throwError(state, 'tag name is malformed: ' + tagName); - } - - if (isVerbatim) { - state.tag = tagName; - - } else if (_hasOwnProperty$1.call(state.tagMap, tagHandle)) { - state.tag = state.tagMap[tagHandle] + tagName; - - } else if (tagHandle === '!') { - state.tag = '!' + tagName; - - } else if (tagHandle === '!!') { - state.tag = 'tag:yaml.org,2002:' + tagName; - - } else { - throwError(state, 'undeclared tag handle "' + tagHandle + '"'); - } - - return true; - } - - function readAnchorProperty(state) { - var _position, - ch; - - ch = state.input.charCodeAt(state.position); - - if (ch !== 0x26/* & */) return false; - - if (state.anchor !== null) { - throwError(state, 'duplication of an anchor property'); - } - - ch = state.input.charCodeAt(++state.position); - _position = state.position; - - while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { - ch = state.input.charCodeAt(++state.position); - } - - if (state.position === _position) { - throwError(state, 'name of an anchor node must contain at least one character'); - } - - state.anchor = state.input.slice(_position, state.position); - return true; - } - - function readAlias(state) { - var _position, alias, - ch; - - ch = state.input.charCodeAt(state.position); - - if (ch !== 0x2A/* * */) return false; - - ch = state.input.charCodeAt(++state.position); - _position = state.position; - - while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { - ch = state.input.charCodeAt(++state.position); - } - - if (state.position === _position) { - throwError(state, 'name of an alias node must contain at least one character'); - } - - alias = state.input.slice(_position, state.position); - - if (!_hasOwnProperty$1.call(state.anchorMap, alias)) { - throwError(state, 'unidentified alias "' + alias + '"'); - } - - state.result = state.anchorMap[alias]; - skipSeparationSpace(state, true, -1); - return true; - } - - function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) { - var allowBlockStyles, - allowBlockScalars, - allowBlockCollections, - indentStatus = 1, // 1: this>parent, 0: this=parent, -1: this parentIndent) { - indentStatus = 1; - } else if (state.lineIndent === parentIndent) { - indentStatus = 0; - } else if (state.lineIndent < parentIndent) { - indentStatus = -1; - } - } - } - - if (indentStatus === 1) { - while (readTagProperty(state) || readAnchorProperty(state)) { - if (skipSeparationSpace(state, true, -1)) { - atNewLine = true; - allowBlockCollections = allowBlockStyles; - - if (state.lineIndent > parentIndent) { - indentStatus = 1; - } else if (state.lineIndent === parentIndent) { - indentStatus = 0; - } else if (state.lineIndent < parentIndent) { - indentStatus = -1; - } - } else { - allowBlockCollections = false; - } - } - } - - if (allowBlockCollections) { - allowBlockCollections = atNewLine || allowCompact; - } - - if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) { - if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) { - flowIndent = parentIndent; - } else { - flowIndent = parentIndent + 1; - } - - blockIndent = state.position - state.lineStart; - - if (indentStatus === 1) { - if (allowBlockCollections && - (readBlockSequence(state, blockIndent) || - readBlockMapping(state, blockIndent, flowIndent)) || - readFlowCollection(state, flowIndent)) { - hasContent = true; - } else { - if ((allowBlockScalars && readBlockScalar(state, flowIndent)) || - readSingleQuotedScalar(state, flowIndent) || - readDoubleQuotedScalar(state, flowIndent)) { - hasContent = true; - - } else if (readAlias(state)) { - hasContent = true; - - if (state.tag !== null || state.anchor !== null) { - throwError(state, 'alias node should not have any properties'); - } - - } else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) { - hasContent = true; - - if (state.tag === null) { - state.tag = '?'; - } - } - - if (state.anchor !== null) { - state.anchorMap[state.anchor] = state.result; - } - } - } else if (indentStatus === 0) { - // Special case: block sequences are allowed to have same indentation level as the parent. - // http://www.yaml.org/spec/1.2/spec.html#id2799784 - hasContent = allowBlockCollections && readBlockSequence(state, blockIndent); - } - } - - if (state.tag === null) { - if (state.anchor !== null) { - state.anchorMap[state.anchor] = state.result; - } - - } else if (state.tag === '?') { - // Implicit resolving is not allowed for non-scalar types, and '?' - // non-specific tag is only automatically assigned to plain scalars. - // - // We only need to check kind conformity in case user explicitly assigns '?' - // tag, for example like this: "! [0]" - // - if (state.result !== null && state.kind !== 'scalar') { - throwError(state, 'unacceptable node kind for ! tag; it should be "scalar", not "' + state.kind + '"'); - } - - for (typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) { - type = state.implicitTypes[typeIndex]; - - if (type.resolve(state.result)) { // `state.result` updated in resolver if matched - state.result = type.construct(state.result); - state.tag = type.tag; - if (state.anchor !== null) { - state.anchorMap[state.anchor] = state.result; - } - break; - } - } - } else if (state.tag !== '!') { - if (_hasOwnProperty$1.call(state.typeMap[state.kind || 'fallback'], state.tag)) { - type = state.typeMap[state.kind || 'fallback'][state.tag]; - } else { - // looking for multi type - type = null; - typeList = state.typeMap.multi[state.kind || 'fallback']; - - for (typeIndex = 0, typeQuantity = typeList.length; typeIndex < typeQuantity; typeIndex += 1) { - if (state.tag.slice(0, typeList[typeIndex].tag.length) === typeList[typeIndex].tag) { - type = typeList[typeIndex]; - break; - } - } - } - - if (!type) { - throwError(state, 'unknown tag !<' + state.tag + '>'); - } - - if (state.result !== null && type.kind !== state.kind) { - throwError(state, 'unacceptable node kind for !<' + state.tag + '> tag; it should be "' + type.kind + '", not "' + state.kind + '"'); - } - - if (!type.resolve(state.result, state.tag)) { // `state.result` updated in resolver if matched - throwError(state, 'cannot resolve a node with !<' + state.tag + '> explicit tag'); - } else { - state.result = type.construct(state.result, state.tag); - if (state.anchor !== null) { - state.anchorMap[state.anchor] = state.result; - } - } - } - - if (state.listener !== null) { - state.listener('close', state); - } - return state.tag !== null || state.anchor !== null || hasContent; - } - - function readDocument(state) { - var documentStart = state.position, - _position, - directiveName, - directiveArgs, - hasDirectives = false, - ch; - - state.version = null; - state.checkLineBreaks = state.legacy; - state.tagMap = Object.create(null); - state.anchorMap = Object.create(null); - - while ((ch = state.input.charCodeAt(state.position)) !== 0) { - skipSeparationSpace(state, true, -1); - - ch = state.input.charCodeAt(state.position); - - if (state.lineIndent > 0 || ch !== 0x25/* % */) { - break; - } - - hasDirectives = true; - ch = state.input.charCodeAt(++state.position); - _position = state.position; - - while (ch !== 0 && !is_WS_OR_EOL(ch)) { - ch = state.input.charCodeAt(++state.position); - } - - directiveName = state.input.slice(_position, state.position); - directiveArgs = []; - - if (directiveName.length < 1) { - throwError(state, 'directive name must not be less than one character in length'); - } - - while (ch !== 0) { - while (is_WHITE_SPACE(ch)) { - ch = state.input.charCodeAt(++state.position); - } - - if (ch === 0x23/* # */) { - do { ch = state.input.charCodeAt(++state.position); } - while (ch !== 0 && !is_EOL(ch)); - break; - } - - if (is_EOL(ch)) break; - - _position = state.position; - - while (ch !== 0 && !is_WS_OR_EOL(ch)) { - ch = state.input.charCodeAt(++state.position); - } - - directiveArgs.push(state.input.slice(_position, state.position)); - } - - if (ch !== 0) readLineBreak(state); - - if (_hasOwnProperty$1.call(directiveHandlers, directiveName)) { - directiveHandlers[directiveName](state, directiveName, directiveArgs); - } else { - throwWarning(state, 'unknown document directive "' + directiveName + '"'); - } - } - - skipSeparationSpace(state, true, -1); - - if (state.lineIndent === 0 && - state.input.charCodeAt(state.position) === 0x2D/* - */ && - state.input.charCodeAt(state.position + 1) === 0x2D/* - */ && - state.input.charCodeAt(state.position + 2) === 0x2D/* - */) { - state.position += 3; - skipSeparationSpace(state, true, -1); - - } else if (hasDirectives) { - throwError(state, 'directives end mark is expected'); - } - - composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true); - skipSeparationSpace(state, true, -1); - - if (state.checkLineBreaks && - PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) { - throwWarning(state, 'non-ASCII line breaks are interpreted as content'); - } - - state.documents.push(state.result); - - if (state.position === state.lineStart && testDocumentSeparator(state)) { - - if (state.input.charCodeAt(state.position) === 0x2E/* . */) { - state.position += 3; - skipSeparationSpace(state, true, -1); - } - return; - } - - if (state.position < (state.length - 1)) { - throwError(state, 'end of the stream or a document separator is expected'); - } else { - return; - } - } - - - function loadDocuments(input, options) { - input = String(input); - options = options || {}; - - if (input.length !== 0) { - - // Add tailing `\n` if not exists - if (input.charCodeAt(input.length - 1) !== 0x0A/* LF */ && - input.charCodeAt(input.length - 1) !== 0x0D/* CR */) { - input += '\n'; - } - - // Strip BOM - if (input.charCodeAt(0) === 0xFEFF) { - input = input.slice(1); - } - } - - var state = new State$1(input, options); - - var nullpos = input.indexOf('\0'); - - if (nullpos !== -1) { - state.position = nullpos; - throwError(state, 'null byte is not allowed in input'); - } - - // Use 0 as string terminator. That significantly simplifies bounds check. - state.input += '\0'; - - while (state.input.charCodeAt(state.position) === 0x20/* Space */) { - state.lineIndent += 1; - state.position += 1; - } - - while (state.position < (state.length - 1)) { - readDocument(state); - } - - return state.documents; - } - - - function loadAll$1(input, iterator, options) { - if (iterator !== null && typeof iterator === 'object' && typeof options === 'undefined') { - options = iterator; - iterator = null; - } - - var documents = loadDocuments(input, options); - - if (typeof iterator !== 'function') { - return documents; - } - - for (var index = 0, length = documents.length; index < length; index += 1) { - iterator(documents[index]); - } - } - - - function load$1(input, options) { - var documents = loadDocuments(input, options); - - if (documents.length === 0) { - /*eslint-disable no-undefined*/ - return undefined; - } else if (documents.length === 1) { - return documents[0]; - } - throw new exception('expected a single document in the stream, but found more'); - } - - - var loadAll_1 = loadAll$1; - var load_1 = load$1; - - var loader = { - loadAll: loadAll_1, - load: load_1 - }; - - /*eslint-disable no-use-before-define*/ - - - - - - var _toString = Object.prototype.toString; - var _hasOwnProperty = Object.prototype.hasOwnProperty; - - var CHAR_BOM = 0xFEFF; - var CHAR_TAB = 0x09; /* Tab */ - var CHAR_LINE_FEED = 0x0A; /* LF */ - var CHAR_CARRIAGE_RETURN = 0x0D; /* CR */ - var CHAR_SPACE = 0x20; /* Space */ - var CHAR_EXCLAMATION = 0x21; /* ! */ - var CHAR_DOUBLE_QUOTE = 0x22; /* " */ - var CHAR_SHARP = 0x23; /* # */ - var CHAR_PERCENT = 0x25; /* % */ - var CHAR_AMPERSAND = 0x26; /* & */ - var CHAR_SINGLE_QUOTE = 0x27; /* ' */ - var CHAR_ASTERISK = 0x2A; /* * */ - var CHAR_COMMA = 0x2C; /* , */ - var CHAR_MINUS = 0x2D; /* - */ - var CHAR_COLON = 0x3A; /* : */ - var CHAR_EQUALS = 0x3D; /* = */ - var CHAR_GREATER_THAN = 0x3E; /* > */ - var CHAR_QUESTION = 0x3F; /* ? */ - var CHAR_COMMERCIAL_AT = 0x40; /* @ */ - var CHAR_LEFT_SQUARE_BRACKET = 0x5B; /* [ */ - var CHAR_RIGHT_SQUARE_BRACKET = 0x5D; /* ] */ - var CHAR_GRAVE_ACCENT = 0x60; /* ` */ - var CHAR_LEFT_CURLY_BRACKET = 0x7B; /* { */ - var CHAR_VERTICAL_LINE = 0x7C; /* | */ - var CHAR_RIGHT_CURLY_BRACKET = 0x7D; /* } */ - - var ESCAPE_SEQUENCES = {}; - - ESCAPE_SEQUENCES[0x00] = '\\0'; - ESCAPE_SEQUENCES[0x07] = '\\a'; - ESCAPE_SEQUENCES[0x08] = '\\b'; - ESCAPE_SEQUENCES[0x09] = '\\t'; - ESCAPE_SEQUENCES[0x0A] = '\\n'; - ESCAPE_SEQUENCES[0x0B] = '\\v'; - ESCAPE_SEQUENCES[0x0C] = '\\f'; - ESCAPE_SEQUENCES[0x0D] = '\\r'; - ESCAPE_SEQUENCES[0x1B] = '\\e'; - ESCAPE_SEQUENCES[0x22] = '\\"'; - ESCAPE_SEQUENCES[0x5C] = '\\\\'; - ESCAPE_SEQUENCES[0x85] = '\\N'; - ESCAPE_SEQUENCES[0xA0] = '\\_'; - ESCAPE_SEQUENCES[0x2028] = '\\L'; - ESCAPE_SEQUENCES[0x2029] = '\\P'; - - var DEPRECATED_BOOLEANS_SYNTAX = [ - 'y', 'Y', 'yes', 'Yes', 'YES', 'on', 'On', 'ON', - 'n', 'N', 'no', 'No', 'NO', 'off', 'Off', 'OFF' - ]; - - var DEPRECATED_BASE60_SYNTAX = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/; - - function compileStyleMap(schema, map) { - var result, keys, index, length, tag, style, type; - - if (map === null) return {}; - - result = {}; - keys = Object.keys(map); - - for (index = 0, length = keys.length; index < length; index += 1) { - tag = keys[index]; - style = String(map[tag]); - - if (tag.slice(0, 2) === '!!') { - tag = 'tag:yaml.org,2002:' + tag.slice(2); - } - type = schema.compiledTypeMap['fallback'][tag]; - - if (type && _hasOwnProperty.call(type.styleAliases, style)) { - style = type.styleAliases[style]; - } - - result[tag] = style; - } - - return result; - } - - function encodeHex(character) { - var string, handle, length; - - string = character.toString(16).toUpperCase(); - - if (character <= 0xFF) { - handle = 'x'; - length = 2; - } else if (character <= 0xFFFF) { - handle = 'u'; - length = 4; - } else if (character <= 0xFFFFFFFF) { - handle = 'U'; - length = 8; - } else { - throw new exception('code point within a string may not be greater than 0xFFFFFFFF'); - } - - return '\\' + handle + common.repeat('0', length - string.length) + string; - } - - - var QUOTING_TYPE_SINGLE = 1, - QUOTING_TYPE_DOUBLE = 2; - - function State(options) { - this.schema = options['schema'] || _default; - this.indent = Math.max(1, (options['indent'] || 2)); - this.noArrayIndent = options['noArrayIndent'] || false; - this.skipInvalid = options['skipInvalid'] || false; - this.flowLevel = (common.isNothing(options['flowLevel']) ? -1 : options['flowLevel']); - this.styleMap = compileStyleMap(this.schema, options['styles'] || null); - this.sortKeys = options['sortKeys'] || false; - this.lineWidth = options['lineWidth'] || 80; - this.noRefs = options['noRefs'] || false; - this.noCompatMode = options['noCompatMode'] || false; - this.condenseFlow = options['condenseFlow'] || false; - this.quotingType = options['quotingType'] === '"' ? QUOTING_TYPE_DOUBLE : QUOTING_TYPE_SINGLE; - this.forceQuotes = options['forceQuotes'] || false; - this.replacer = typeof options['replacer'] === 'function' ? options['replacer'] : null; - - this.implicitTypes = this.schema.compiledImplicit; - this.explicitTypes = this.schema.compiledExplicit; - - this.tag = null; - this.result = ''; - - this.duplicates = []; - this.usedDuplicates = null; - } - - // Indents every line in a string. Empty lines (\n only) are not indented. - function indentString(string, spaces) { - var ind = common.repeat(' ', spaces), - position = 0, - next = -1, - result = '', - line, - length = string.length; - - while (position < length) { - next = string.indexOf('\n', position); - if (next === -1) { - line = string.slice(position); - position = length; - } else { - line = string.slice(position, next + 1); - position = next + 1; - } - - if (line.length && line !== '\n') result += ind; - - result += line; - } - - return result; - } - - function generateNextLine(state, level) { - return '\n' + common.repeat(' ', state.indent * level); - } - - function testImplicitResolving(state, str) { - var index, length, type; - - for (index = 0, length = state.implicitTypes.length; index < length; index += 1) { - type = state.implicitTypes[index]; - - if (type.resolve(str)) { - return true; - } - } - - return false; - } - - // [33] s-white ::= s-space | s-tab - function isWhitespace(c) { - return c === CHAR_SPACE || c === CHAR_TAB; - } - - // Returns true if the character can be printed without escaping. - // From YAML 1.2: "any allowed characters known to be non-printable - // should also be escaped. [However,] This isn’t mandatory" - // Derived from nb-char - \t - #x85 - #xA0 - #x2028 - #x2029. - function isPrintable(c) { - return (0x00020 <= c && c <= 0x00007E) - || ((0x000A1 <= c && c <= 0x00D7FF) && c !== 0x2028 && c !== 0x2029) - || ((0x0E000 <= c && c <= 0x00FFFD) && c !== CHAR_BOM) - || (0x10000 <= c && c <= 0x10FFFF); - } - - // [34] ns-char ::= nb-char - s-white - // [27] nb-char ::= c-printable - b-char - c-byte-order-mark - // [26] b-char ::= b-line-feed | b-carriage-return - // Including s-white (for some reason, examples doesn't match specs in this aspect) - // ns-char ::= c-printable - b-line-feed - b-carriage-return - c-byte-order-mark - function isNsCharOrWhitespace(c) { - return isPrintable(c) - && c !== CHAR_BOM - // - b-char - && c !== CHAR_CARRIAGE_RETURN - && c !== CHAR_LINE_FEED; - } - - // [127] ns-plain-safe(c) ::= c = flow-out ⇒ ns-plain-safe-out - // c = flow-in ⇒ ns-plain-safe-in - // c = block-key ⇒ ns-plain-safe-out - // c = flow-key ⇒ ns-plain-safe-in - // [128] ns-plain-safe-out ::= ns-char - // [129] ns-plain-safe-in ::= ns-char - c-flow-indicator - // [130] ns-plain-char(c) ::= ( ns-plain-safe(c) - “:” - “#” ) - // | ( /* An ns-char preceding */ “#” ) - // | ( “:” /* Followed by an ns-plain-safe(c) */ ) - function isPlainSafe(c, prev, inblock) { - var cIsNsCharOrWhitespace = isNsCharOrWhitespace(c); - var cIsNsChar = cIsNsCharOrWhitespace && !isWhitespace(c); - return ( - // ns-plain-safe - inblock ? // c = flow-in - cIsNsCharOrWhitespace - : cIsNsCharOrWhitespace - // - c-flow-indicator - && c !== CHAR_COMMA - && c !== CHAR_LEFT_SQUARE_BRACKET - && c !== CHAR_RIGHT_SQUARE_BRACKET - && c !== CHAR_LEFT_CURLY_BRACKET - && c !== CHAR_RIGHT_CURLY_BRACKET - ) - // ns-plain-char - && c !== CHAR_SHARP // false on '#' - && !(prev === CHAR_COLON && !cIsNsChar) // false on ': ' - || (isNsCharOrWhitespace(prev) && !isWhitespace(prev) && c === CHAR_SHARP) // change to true on '[^ ]#' - || (prev === CHAR_COLON && cIsNsChar); // change to true on ':[^ ]' - } - - // Simplified test for values allowed as the first character in plain style. - function isPlainSafeFirst(c) { - // Uses a subset of ns-char - c-indicator - // where ns-char = nb-char - s-white. - // No support of ( ( “?” | “:” | “-” ) /* Followed by an ns-plain-safe(c)) */ ) part - return isPrintable(c) && c !== CHAR_BOM - && !isWhitespace(c) // - s-white - // - (c-indicator ::= - // “-” | “?” | “:” | “,” | “[” | “]” | “{” | “}” - && c !== CHAR_MINUS - && c !== CHAR_QUESTION - && c !== CHAR_COLON - && c !== CHAR_COMMA - && c !== CHAR_LEFT_SQUARE_BRACKET - && c !== CHAR_RIGHT_SQUARE_BRACKET - && c !== CHAR_LEFT_CURLY_BRACKET - && c !== CHAR_RIGHT_CURLY_BRACKET - // | “#” | “&” | “*” | “!” | “|” | “=” | “>” | “'” | “"” - && c !== CHAR_SHARP - && c !== CHAR_AMPERSAND - && c !== CHAR_ASTERISK - && c !== CHAR_EXCLAMATION - && c !== CHAR_VERTICAL_LINE - && c !== CHAR_EQUALS - && c !== CHAR_GREATER_THAN - && c !== CHAR_SINGLE_QUOTE - && c !== CHAR_DOUBLE_QUOTE - // | “%” | “@” | “`”) - && c !== CHAR_PERCENT - && c !== CHAR_COMMERCIAL_AT - && c !== CHAR_GRAVE_ACCENT; - } - - // Simplified test for values allowed as the last character in plain style. - function isPlainSafeLast(c) { - // just not whitespace or colon, it will be checked to be plain character later - return !isWhitespace(c) && c !== CHAR_COLON; - } - - // Same as 'string'.codePointAt(pos), but works in older browsers. - function codePointAt(string, pos) { - var first = string.charCodeAt(pos), second; - if (first >= 0xD800 && first <= 0xDBFF && pos + 1 < string.length) { - second = string.charCodeAt(pos + 1); - if (second >= 0xDC00 && second <= 0xDFFF) { - // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae - return (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000; - } - } - return first; - } - - // Determines whether block indentation indicator is required. - function needIndentIndicator(string) { - var leadingSpaceRe = /^\n* /; - return leadingSpaceRe.test(string); - } - - var STYLE_PLAIN = 1, - STYLE_SINGLE = 2, - STYLE_LITERAL = 3, - STYLE_FOLDED = 4, - STYLE_DOUBLE = 5; - - // Determines which scalar styles are possible and returns the preferred style. - // lineWidth = -1 => no limit. - // Pre-conditions: str.length > 0. - // Post-conditions: - // STYLE_PLAIN or STYLE_SINGLE => no \n are in the string. - // STYLE_LITERAL => no lines are suitable for folding (or lineWidth is -1). - // STYLE_FOLDED => a line > lineWidth and can be folded (and lineWidth != -1). - function chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth, - testAmbiguousType, quotingType, forceQuotes, inblock) { - - var i; - var char = 0; - var prevChar = null; - var hasLineBreak = false; - var hasFoldableLine = false; // only checked if shouldTrackWidth - var shouldTrackWidth = lineWidth !== -1; - var previousLineBreak = -1; // count the first line correctly - var plain = isPlainSafeFirst(codePointAt(string, 0)) - && isPlainSafeLast(codePointAt(string, string.length - 1)); - - if (singleLineOnly || forceQuotes) { - // Case: no block styles. - // Check for disallowed characters to rule out plain and single. - for (i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) { - char = codePointAt(string, i); - if (!isPrintable(char)) { - return STYLE_DOUBLE; - } - plain = plain && isPlainSafe(char, prevChar, inblock); - prevChar = char; - } - } else { - // Case: block styles permitted. - for (i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) { - char = codePointAt(string, i); - if (char === CHAR_LINE_FEED) { - hasLineBreak = true; - // Check if any line can be folded. - if (shouldTrackWidth) { - hasFoldableLine = hasFoldableLine || - // Foldable line = too long, and not more-indented. - (i - previousLineBreak - 1 > lineWidth && - string[previousLineBreak + 1] !== ' '); - previousLineBreak = i; - } - } else if (!isPrintable(char)) { - return STYLE_DOUBLE; - } - plain = plain && isPlainSafe(char, prevChar, inblock); - prevChar = char; - } - // in case the end is missing a \n - hasFoldableLine = hasFoldableLine || (shouldTrackWidth && - (i - previousLineBreak - 1 > lineWidth && - string[previousLineBreak + 1] !== ' ')); - } - // Although every style can represent \n without escaping, prefer block styles - // for multiline, since they're more readable and they don't add empty lines. - // Also prefer folding a super-long line. - if (!hasLineBreak && !hasFoldableLine) { - // Strings interpretable as another type have to be quoted; - // e.g. the string 'true' vs. the boolean true. - if (plain && !forceQuotes && !testAmbiguousType(string)) { - return STYLE_PLAIN; - } - return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE; - } - // Edge case: block indentation indicator can only have one digit. - if (indentPerLevel > 9 && needIndentIndicator(string)) { - return STYLE_DOUBLE; - } - // At this point we know block styles are valid. - // Prefer literal style unless we want to fold. - if (!forceQuotes) { - return hasFoldableLine ? STYLE_FOLDED : STYLE_LITERAL; - } - return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE; - } - - // Note: line breaking/folding is implemented for only the folded style. - // NB. We drop the last trailing newline (if any) of a returned block scalar - // since the dumper adds its own newline. This always works: - // • No ending newline => unaffected; already using strip "-" chomping. - // • Ending newline => removed then restored. - // Importantly, this keeps the "+" chomp indicator from gaining an extra line. - function writeScalar(state, string, level, iskey, inblock) { - state.dump = (function () { - if (string.length === 0) { - return state.quotingType === QUOTING_TYPE_DOUBLE ? '""' : "''"; - } - if (!state.noCompatMode) { - if (DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1 || DEPRECATED_BASE60_SYNTAX.test(string)) { - return state.quotingType === QUOTING_TYPE_DOUBLE ? ('"' + string + '"') : ("'" + string + "'"); - } - } - - var indent = state.indent * Math.max(1, level); // no 0-indent scalars - // As indentation gets deeper, let the width decrease monotonically - // to the lower bound min(state.lineWidth, 40). - // Note that this implies - // state.lineWidth ≤ 40 + state.indent: width is fixed at the lower bound. - // state.lineWidth > 40 + state.indent: width decreases until the lower bound. - // This behaves better than a constant minimum width which disallows narrower options, - // or an indent threshold which causes the width to suddenly increase. - var lineWidth = state.lineWidth === -1 - ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent); - - // Without knowing if keys are implicit/explicit, assume implicit for safety. - var singleLineOnly = iskey - // No block styles in flow mode. - || (state.flowLevel > -1 && level >= state.flowLevel); - function testAmbiguity(string) { - return testImplicitResolving(state, string); - } - - switch (chooseScalarStyle(string, singleLineOnly, state.indent, lineWidth, - testAmbiguity, state.quotingType, state.forceQuotes && !iskey, inblock)) { - - case STYLE_PLAIN: - return string; - case STYLE_SINGLE: - return "'" + string.replace(/'/g, "''") + "'"; - case STYLE_LITERAL: - return '|' + blockHeader(string, state.indent) - + dropEndingNewline(indentString(string, indent)); - case STYLE_FOLDED: - return '>' + blockHeader(string, state.indent) - + dropEndingNewline(indentString(foldString(string, lineWidth), indent)); - case STYLE_DOUBLE: - return '"' + escapeString(string) + '"'; - default: - throw new exception('impossible error: invalid scalar style'); - } - }()); - } - - // Pre-conditions: string is valid for a block scalar, 1 <= indentPerLevel <= 9. - function blockHeader(string, indentPerLevel) { - var indentIndicator = needIndentIndicator(string) ? String(indentPerLevel) : ''; - - // note the special case: the string '\n' counts as a "trailing" empty line. - var clip = string[string.length - 1] === '\n'; - var keep = clip && (string[string.length - 2] === '\n' || string === '\n'); - var chomp = keep ? '+' : (clip ? '' : '-'); - - return indentIndicator + chomp + '\n'; - } - - // (See the note for writeScalar.) - function dropEndingNewline(string) { - return string[string.length - 1] === '\n' ? string.slice(0, -1) : string; - } - - // Note: a long line without a suitable break point will exceed the width limit. - // Pre-conditions: every char in str isPrintable, str.length > 0, width > 0. - function foldString(string, width) { - // In folded style, $k$ consecutive newlines output as $k+1$ newlines— - // unless they're before or after a more-indented line, or at the very - // beginning or end, in which case $k$ maps to $k$. - // Therefore, parse each chunk as newline(s) followed by a content line. - var lineRe = /(\n+)([^\n]*)/g; - - // first line (possibly an empty line) - var result = (function () { - var nextLF = string.indexOf('\n'); - nextLF = nextLF !== -1 ? nextLF : string.length; - lineRe.lastIndex = nextLF; - return foldLine(string.slice(0, nextLF), width); - }()); - // If we haven't reached the first content line yet, don't add an extra \n. - var prevMoreIndented = string[0] === '\n' || string[0] === ' '; - var moreIndented; - - // rest of the lines - var match; - while ((match = lineRe.exec(string))) { - var prefix = match[1], line = match[2]; - moreIndented = (line[0] === ' '); - result += prefix - + (!prevMoreIndented && !moreIndented && line !== '' - ? '\n' : '') - + foldLine(line, width); - prevMoreIndented = moreIndented; - } - - return result; - } - - // Greedy line breaking. - // Picks the longest line under the limit each time, - // otherwise settles for the shortest line over the limit. - // NB. More-indented lines *cannot* be folded, as that would add an extra \n. - function foldLine(line, width) { - if (line === '' || line[0] === ' ') return line; - - // Since a more-indented line adds a \n, breaks can't be followed by a space. - var breakRe = / [^ ]/g; // note: the match index will always be <= length-2. - var match; - // start is an inclusive index. end, curr, and next are exclusive. - var start = 0, end, curr = 0, next = 0; - var result = ''; - - // Invariants: 0 <= start <= length-1. - // 0 <= curr <= next <= max(0, length-2). curr - start <= width. - // Inside the loop: - // A match implies length >= 2, so curr and next are <= length-2. - while ((match = breakRe.exec(line))) { - next = match.index; - // maintain invariant: curr - start <= width - if (next - start > width) { - end = (curr > start) ? curr : next; // derive end <= length-2 - result += '\n' + line.slice(start, end); - // skip the space that was output as \n - start = end + 1; // derive start <= length-1 - } - curr = next; - } - - // By the invariants, start <= length-1, so there is something left over. - // It is either the whole string or a part starting from non-whitespace. - result += '\n'; - // Insert a break if the remainder is too long and there is a break available. - if (line.length - start > width && curr > start) { - result += line.slice(start, curr) + '\n' + line.slice(curr + 1); - } else { - result += line.slice(start); - } - - return result.slice(1); // drop extra \n joiner - } - - // Escapes a double-quoted string. - function escapeString(string) { - var result = ''; - var char = 0; - var escapeSeq; - - for (var i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) { - char = codePointAt(string, i); - escapeSeq = ESCAPE_SEQUENCES[char]; - - if (!escapeSeq && isPrintable(char)) { - result += string[i]; - if (char >= 0x10000) result += string[i + 1]; - } else { - result += escapeSeq || encodeHex(char); - } - } - - return result; - } - - function writeFlowSequence(state, level, object) { - var _result = '', - _tag = state.tag, - index, - length, - value; - - for (index = 0, length = object.length; index < length; index += 1) { - value = object[index]; - - if (state.replacer) { - value = state.replacer.call(object, String(index), value); - } - - // Write only valid elements, put null instead of invalid elements. - if (writeNode(state, level, value, false, false) || - (typeof value === 'undefined' && - writeNode(state, level, null, false, false))) { - - if (_result !== '') _result += ',' + (!state.condenseFlow ? ' ' : ''); - _result += state.dump; - } - } - - state.tag = _tag; - state.dump = '[' + _result + ']'; - } - - function writeBlockSequence(state, level, object, compact) { - var _result = '', - _tag = state.tag, - index, - length, - value; - - for (index = 0, length = object.length; index < length; index += 1) { - value = object[index]; - - if (state.replacer) { - value = state.replacer.call(object, String(index), value); - } - - // Write only valid elements, put null instead of invalid elements. - if (writeNode(state, level + 1, value, true, true, false, true) || - (typeof value === 'undefined' && - writeNode(state, level + 1, null, true, true, false, true))) { - - if (!compact || _result !== '') { - _result += generateNextLine(state, level); - } - - if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { - _result += '-'; - } else { - _result += '- '; - } - - _result += state.dump; - } - } - - state.tag = _tag; - state.dump = _result || '[]'; // Empty sequence if no valid values. - } - - function writeFlowMapping(state, level, object) { - var _result = '', - _tag = state.tag, - objectKeyList = Object.keys(object), - index, - length, - objectKey, - objectValue, - pairBuffer; - - for (index = 0, length = objectKeyList.length; index < length; index += 1) { - - pairBuffer = ''; - if (_result !== '') pairBuffer += ', '; - - if (state.condenseFlow) pairBuffer += '"'; - - objectKey = objectKeyList[index]; - objectValue = object[objectKey]; - - if (state.replacer) { - objectValue = state.replacer.call(object, objectKey, objectValue); - } - - if (!writeNode(state, level, objectKey, false, false)) { - continue; // Skip this pair because of invalid key; - } - - if (state.dump.length > 1024) pairBuffer += '? '; - - pairBuffer += state.dump + (state.condenseFlow ? '"' : '') + ':' + (state.condenseFlow ? '' : ' '); - - if (!writeNode(state, level, objectValue, false, false)) { - continue; // Skip this pair because of invalid value. - } - - pairBuffer += state.dump; - - // Both key and value are valid. - _result += pairBuffer; - } - - state.tag = _tag; - state.dump = '{' + _result + '}'; - } - - function writeBlockMapping(state, level, object, compact) { - var _result = '', - _tag = state.tag, - objectKeyList = Object.keys(object), - index, - length, - objectKey, - objectValue, - explicitPair, - pairBuffer; - - // Allow sorting keys so that the output file is deterministic - if (state.sortKeys === true) { - // Default sorting - objectKeyList.sort(); - } else if (typeof state.sortKeys === 'function') { - // Custom sort function - objectKeyList.sort(state.sortKeys); - } else if (state.sortKeys) { - // Something is wrong - throw new exception('sortKeys must be a boolean or a function'); - } - - for (index = 0, length = objectKeyList.length; index < length; index += 1) { - pairBuffer = ''; - - if (!compact || _result !== '') { - pairBuffer += generateNextLine(state, level); - } - - objectKey = objectKeyList[index]; - objectValue = object[objectKey]; - - if (state.replacer) { - objectValue = state.replacer.call(object, objectKey, objectValue); - } - - if (!writeNode(state, level + 1, objectKey, true, true, true)) { - continue; // Skip this pair because of invalid key. - } - - explicitPair = (state.tag !== null && state.tag !== '?') || - (state.dump && state.dump.length > 1024); - - if (explicitPair) { - if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { - pairBuffer += '?'; - } else { - pairBuffer += '? '; - } - } - - pairBuffer += state.dump; - - if (explicitPair) { - pairBuffer += generateNextLine(state, level); - } - - if (!writeNode(state, level + 1, objectValue, true, explicitPair)) { - continue; // Skip this pair because of invalid value. - } - - if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { - pairBuffer += ':'; - } else { - pairBuffer += ': '; - } - - pairBuffer += state.dump; - - // Both key and value are valid. - _result += pairBuffer; - } - - state.tag = _tag; - state.dump = _result || '{}'; // Empty mapping if no valid pairs. - } - - function detectType(state, object, explicit) { - var _result, typeList, index, length, type, style; - - typeList = explicit ? state.explicitTypes : state.implicitTypes; - - for (index = 0, length = typeList.length; index < length; index += 1) { - type = typeList[index]; - - if ((type.instanceOf || type.predicate) && - (!type.instanceOf || ((typeof object === 'object') && (object instanceof type.instanceOf))) && - (!type.predicate || type.predicate(object))) { - - if (explicit) { - if (type.multi && type.representName) { - state.tag = type.representName(object); - } else { - state.tag = type.tag; - } - } else { - state.tag = '?'; - } - - if (type.represent) { - style = state.styleMap[type.tag] || type.defaultStyle; - - if (_toString.call(type.represent) === '[object Function]') { - _result = type.represent(object, style); - } else if (_hasOwnProperty.call(type.represent, style)) { - _result = type.represent[style](object, style); - } else { - throw new exception('!<' + type.tag + '> tag resolver accepts not "' + style + '" style'); - } - - state.dump = _result; - } - - return true; - } - } - - return false; - } - - // Serializes `object` and writes it to global `result`. - // Returns true on success, or false on invalid object. - // - function writeNode(state, level, object, block, compact, iskey, isblockseq) { - state.tag = null; - state.dump = object; - - if (!detectType(state, object, false)) { - detectType(state, object, true); - } - - var type = _toString.call(state.dump); - var inblock = block; - var tagStr; - - if (block) { - block = (state.flowLevel < 0 || state.flowLevel > level); - } - - var objectOrArray = type === '[object Object]' || type === '[object Array]', - duplicateIndex, - duplicate; - - if (objectOrArray) { - duplicateIndex = state.duplicates.indexOf(object); - duplicate = duplicateIndex !== -1; - } - - if ((state.tag !== null && state.tag !== '?') || duplicate || (state.indent !== 2 && level > 0)) { - compact = false; - } - - if (duplicate && state.usedDuplicates[duplicateIndex]) { - state.dump = '*ref_' + duplicateIndex; - } else { - if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) { - state.usedDuplicates[duplicateIndex] = true; - } - if (type === '[object Object]') { - if (block && (Object.keys(state.dump).length !== 0)) { - writeBlockMapping(state, level, state.dump, compact); - if (duplicate) { - state.dump = '&ref_' + duplicateIndex + state.dump; - } - } else { - writeFlowMapping(state, level, state.dump); - if (duplicate) { - state.dump = '&ref_' + duplicateIndex + ' ' + state.dump; - } - } - } else if (type === '[object Array]') { - if (block && (state.dump.length !== 0)) { - if (state.noArrayIndent && !isblockseq && level > 0) { - writeBlockSequence(state, level - 1, state.dump, compact); - } else { - writeBlockSequence(state, level, state.dump, compact); - } - if (duplicate) { - state.dump = '&ref_' + duplicateIndex + state.dump; - } - } else { - writeFlowSequence(state, level, state.dump); - if (duplicate) { - state.dump = '&ref_' + duplicateIndex + ' ' + state.dump; - } - } - } else if (type === '[object String]') { - if (state.tag !== '?') { - writeScalar(state, state.dump, level, iskey, inblock); - } - } else if (type === '[object Undefined]') { - return false; - } else { - if (state.skipInvalid) return false; - throw new exception('unacceptable kind of an object to dump ' + type); - } - - if (state.tag !== null && state.tag !== '?') { - // Need to encode all characters except those allowed by the spec: - // - // [35] ns-dec-digit ::= [#x30-#x39] /* 0-9 */ - // [36] ns-hex-digit ::= ns-dec-digit - // | [#x41-#x46] /* A-F */ | [#x61-#x66] /* a-f */ - // [37] ns-ascii-letter ::= [#x41-#x5A] /* A-Z */ | [#x61-#x7A] /* a-z */ - // [38] ns-word-char ::= ns-dec-digit | ns-ascii-letter | “-” - // [39] ns-uri-char ::= “%” ns-hex-digit ns-hex-digit | ns-word-char | “#” - // | “;” | “/” | “?” | “:” | “@” | “&” | “=” | “+” | “$” | “,” - // | “_” | “.” | “!” | “~” | “*” | “'” | “(” | “)” | “[” | “]” - // - // Also need to encode '!' because it has special meaning (end of tag prefix). - // - tagStr = encodeURI( - state.tag[0] === '!' ? state.tag.slice(1) : state.tag - ).replace(/!/g, '%21'); - - if (state.tag[0] === '!') { - tagStr = '!' + tagStr; - } else if (tagStr.slice(0, 18) === 'tag:yaml.org,2002:') { - tagStr = '!!' + tagStr.slice(18); - } else { - tagStr = '!<' + tagStr + '>'; - } - - state.dump = tagStr + ' ' + state.dump; - } - } - - return true; - } - - function getDuplicateReferences(object, state) { - var objects = [], - duplicatesIndexes = [], - index, - length; - - inspectNode(object, objects, duplicatesIndexes); - - for (index = 0, length = duplicatesIndexes.length; index < length; index += 1) { - state.duplicates.push(objects[duplicatesIndexes[index]]); - } - state.usedDuplicates = new Array(length); - } - - function inspectNode(object, objects, duplicatesIndexes) { - var objectKeyList, - index, - length; - - if (object !== null && typeof object === 'object') { - index = objects.indexOf(object); - if (index !== -1) { - if (duplicatesIndexes.indexOf(index) === -1) { - duplicatesIndexes.push(index); - } - } else { - objects.push(object); - - if (Array.isArray(object)) { - for (index = 0, length = object.length; index < length; index += 1) { - inspectNode(object[index], objects, duplicatesIndexes); - } - } else { - objectKeyList = Object.keys(object); - - for (index = 0, length = objectKeyList.length; index < length; index += 1) { - inspectNode(object[objectKeyList[index]], objects, duplicatesIndexes); - } - } - } - } - } - - function dump$1(input, options) { - options = options || {}; - - var state = new State(options); - - if (!state.noRefs) getDuplicateReferences(input, state); - - var value = input; - - if (state.replacer) { - value = state.replacer.call({ '': value }, '', value); - } - - if (writeNode(state, 0, value, true, true)) return state.dump + '\n'; - - return ''; - } - - var dump_1 = dump$1; - - var dumper = { - dump: dump_1 - }; - - function renamed(from, to) { - return function () { - throw new Error('Function yaml.' + from + ' is removed in js-yaml 4. ' + - 'Use yaml.' + to + ' instead, which is now safe by default.'); - }; - } - - - var Type = type; - var Schema = schema; - var FAILSAFE_SCHEMA = failsafe; - var JSON_SCHEMA = json; - var CORE_SCHEMA = core; - var DEFAULT_SCHEMA = _default; - var load = loader.load; - var loadAll = loader.loadAll; - var dump = dumper.dump; - var YAMLException = exception; - - // Re-export all types in case user wants to create custom schema - var types = { - binary: binary, - float: float, - map: map, - null: _null, - pairs: pairs, - set: set, - timestamp: timestamp, - bool: bool, - int: int, - merge: merge, - omap: omap, - seq: seq, - str: str - }; - - // Removed functions from JS-YAML 3.0.x - var safeLoad = renamed('safeLoad', 'load'); - var safeLoadAll = renamed('safeLoadAll', 'loadAll'); - var safeDump = renamed('safeDump', 'dump'); - - var jsYaml = { - Type: Type, - Schema: Schema, - FAILSAFE_SCHEMA: FAILSAFE_SCHEMA, - JSON_SCHEMA: JSON_SCHEMA, - CORE_SCHEMA: CORE_SCHEMA, - DEFAULT_SCHEMA: DEFAULT_SCHEMA, - load: load, - loadAll: loadAll, - dump: dump, - YAMLException: YAMLException, - types: types, - safeLoad: safeLoad, - safeLoadAll: safeLoadAll, - safeDump: safeDump - }; - - exports.CORE_SCHEMA = CORE_SCHEMA; - exports.DEFAULT_SCHEMA = DEFAULT_SCHEMA; - exports.FAILSAFE_SCHEMA = FAILSAFE_SCHEMA; - exports.JSON_SCHEMA = JSON_SCHEMA; - exports.Schema = Schema; - exports.Type = Type; - exports.YAMLException = YAMLException; - exports.default = jsYaml; - exports.dump = dump; - exports.load = load; - exports.loadAll = loadAll; - exports.safeDump = safeDump; - exports.safeLoad = safeLoad; - exports.safeLoadAll = safeLoadAll; - exports.types = types; - - Object.defineProperty(exports, '__esModule', { value: true }); - -}))); diff --git a/node_modules/js-yaml/dist/js-yaml.min.js b/node_modules/js-yaml/dist/js-yaml.min.js deleted file mode 100644 index bdd8eef5..00000000 --- a/node_modules/js-yaml/dist/js-yaml.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).jsyaml={})}(this,(function(e){"use strict";function t(e){return null==e}var n={isNothing:t,isObject:function(e){return"object"==typeof e&&null!==e},toArray:function(e){return Array.isArray(e)?e:t(e)?[]:[e]},repeat:function(e,t){var n,i="";for(n=0;nl&&(t=i-l+(o=" ... ").length),n-i>l&&(n=i+l-(a=" ...").length),{str:o+e.slice(t,n).replace(/\t/g,"→")+a,pos:i-t+o.length}}function l(e,t){return n.repeat(" ",t-e.length)+e}var c=function(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),"number"!=typeof t.indent&&(t.indent=1),"number"!=typeof t.linesBefore&&(t.linesBefore=3),"number"!=typeof t.linesAfter&&(t.linesAfter=2);for(var i,r=/\r?\n|\r|\0/g,o=[0],c=[],s=-1;i=r.exec(e.buffer);)c.push(i.index),o.push(i.index+i[0].length),e.position<=i.index&&s<0&&(s=o.length-2);s<0&&(s=o.length-1);var u,p,f="",d=Math.min(e.line+t.linesAfter,c.length).toString().length,h=t.maxLength-(t.indent+d+3);for(u=1;u<=t.linesBefore&&!(s-u<0);u++)p=a(e.buffer,o[s-u],c[s-u],e.position-(o[s]-o[s-u]),h),f=n.repeat(" ",t.indent)+l((e.line-u+1).toString(),d)+" | "+p.str+"\n"+f;for(p=a(e.buffer,o[s],c[s],e.position,h),f+=n.repeat(" ",t.indent)+l((e.line+1).toString(),d)+" | "+p.str+"\n",f+=n.repeat("-",t.indent+d+3+p.pos)+"^\n",u=1;u<=t.linesAfter&&!(s+u>=c.length);u++)p=a(e.buffer,o[s+u],c[s+u],e.position-(o[s]-o[s+u]),h),f+=n.repeat(" ",t.indent)+l((e.line+u+1).toString(),d)+" | "+p.str+"\n";return f.replace(/\n$/,"")},s=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],u=["scalar","sequence","mapping"];var p=function(e,t){if(t=t||{},Object.keys(t).forEach((function(t){if(-1===s.indexOf(t))throw new o('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')})),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=function(e){var t={};return null!==e&&Object.keys(e).forEach((function(n){e[n].forEach((function(e){t[String(e)]=n}))})),t}(t.styleAliases||null),-1===u.indexOf(this.kind))throw new o('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')};function f(e,t){var n=[];return e[t].forEach((function(e){var t=n.length;n.forEach((function(n,i){n.tag===e.tag&&n.kind===e.kind&&n.multi===e.multi&&(t=i)})),n[t]=e})),n}function d(e){return this.extend(e)}d.prototype.extend=function(e){var t=[],n=[];if(e instanceof p)n.push(e);else if(Array.isArray(e))n=n.concat(e);else{if(!e||!Array.isArray(e.implicit)&&!Array.isArray(e.explicit))throw new o("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");e.implicit&&(t=t.concat(e.implicit)),e.explicit&&(n=n.concat(e.explicit))}t.forEach((function(e){if(!(e instanceof p))throw new o("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(e.loadKind&&"scalar"!==e.loadKind)throw new o("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(e.multi)throw new o("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")})),n.forEach((function(e){if(!(e instanceof p))throw new o("Specified list of YAML types (or a single Type object) contains a non-Type object.")}));var i=Object.create(d.prototype);return i.implicit=(this.implicit||[]).concat(t),i.explicit=(this.explicit||[]).concat(n),i.compiledImplicit=f(i,"implicit"),i.compiledExplicit=f(i,"explicit"),i.compiledTypeMap=function(){var e,t,n={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function i(e){e.multi?(n.multi[e.kind].push(e),n.multi.fallback.push(e)):n[e.kind][e.tag]=n.fallback[e.tag]=e}for(e=0,t=arguments.length;e=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),x=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");var I=/^[-+]?[0-9]+e/;var S=new p("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(e){return null!==e&&!(!x.test(e)||"_"===e[e.length-1])},construct:function(e){var t,n;return n="-"===(t=e.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),".inf"===t?1===n?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:n*parseFloat(t,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||n.isNegativeZero(e))},represent:function(e,t){var i;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(n.isNegativeZero(e))return"-0.0";return i=e.toString(10),I.test(i)?i.replace("e",".e"):i},defaultStyle:"lowercase"}),O=b.extend({implicit:[A,v,C,S]}),j=O,T=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),N=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");var F=new p("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(e){return null!==e&&(null!==T.exec(e)||null!==N.exec(e))},construct:function(e){var t,n,i,r,o,a,l,c,s=0,u=null;if(null===(t=T.exec(e))&&(t=N.exec(e)),null===t)throw new Error("Date resolve error");if(n=+t[1],i=+t[2]-1,r=+t[3],!t[4])return new Date(Date.UTC(n,i,r));if(o=+t[4],a=+t[5],l=+t[6],t[7]){for(s=t[7].slice(0,3);s.length<3;)s+="0";s=+s}return t[9]&&(u=6e4*(60*+t[10]+ +(t[11]||0)),"-"===t[9]&&(u=-u)),c=new Date(Date.UTC(n,i,r,o,a,l,s)),u&&c.setTime(c.getTime()-u),c},instanceOf:Date,represent:function(e){return e.toISOString()}});var E=new p("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(e){return"<<"===e||null===e}}),M="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";var L=new p("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,n,i=0,r=e.length,o=M;for(n=0;n64)){if(t<0)return!1;i+=6}return i%8==0},construct:function(e){var t,n,i=e.replace(/[\r\n=]/g,""),r=i.length,o=M,a=0,l=[];for(t=0;t>16&255),l.push(a>>8&255),l.push(255&a)),a=a<<6|o.indexOf(i.charAt(t));return 0===(n=r%4*6)?(l.push(a>>16&255),l.push(a>>8&255),l.push(255&a)):18===n?(l.push(a>>10&255),l.push(a>>2&255)):12===n&&l.push(a>>4&255),new Uint8Array(l)},predicate:function(e){return"[object Uint8Array]"===Object.prototype.toString.call(e)},represent:function(e){var t,n,i="",r=0,o=e.length,a=M;for(t=0;t>18&63],i+=a[r>>12&63],i+=a[r>>6&63],i+=a[63&r]),r=(r<<8)+e[t];return 0===(n=o%3)?(i+=a[r>>18&63],i+=a[r>>12&63],i+=a[r>>6&63],i+=a[63&r]):2===n?(i+=a[r>>10&63],i+=a[r>>4&63],i+=a[r<<2&63],i+=a[64]):1===n&&(i+=a[r>>2&63],i+=a[r<<4&63],i+=a[64],i+=a[64]),i}}),_=Object.prototype.hasOwnProperty,D=Object.prototype.toString;var U=new p("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,n,i,r,o,a=[],l=e;for(t=0,n=l.length;t>10),56320+(e-65536&1023))}for(var ie=new Array(256),re=new Array(256),oe=0;oe<256;oe++)ie[oe]=te(oe)?1:0,re[oe]=te(oe);function ae(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||K,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function le(e,t){var n={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return n.snippet=c(n),new o(t,n)}function ce(e,t){throw le(e,t)}function se(e,t){e.onWarning&&e.onWarning.call(null,le(e,t))}var ue={YAML:function(e,t,n){var i,r,o;null!==e.version&&ce(e,"duplication of %YAML directive"),1!==n.length&&ce(e,"YAML directive accepts exactly one argument"),null===(i=/^([0-9]+)\.([0-9]+)$/.exec(n[0]))&&ce(e,"ill-formed argument of the YAML directive"),r=parseInt(i[1],10),o=parseInt(i[2],10),1!==r&&ce(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=o<2,1!==o&&2!==o&&se(e,"unsupported YAML version of the document")},TAG:function(e,t,n){var i,r;2!==n.length&&ce(e,"TAG directive accepts exactly two arguments"),i=n[0],r=n[1],G.test(i)||ce(e,"ill-formed tag handle (first argument) of the TAG directive"),P.call(e.tagMap,i)&&ce(e,'there is a previously declared suffix for "'+i+'" tag handle'),V.test(r)||ce(e,"ill-formed tag prefix (second argument) of the TAG directive");try{r=decodeURIComponent(r)}catch(t){ce(e,"tag prefix is malformed: "+r)}e.tagMap[i]=r}};function pe(e,t,n,i){var r,o,a,l;if(t1&&(e.result+=n.repeat("\n",t-1))}function be(e,t){var n,i,r=e.tag,o=e.anchor,a=[],l=!1;if(-1!==e.firstTabInLine)return!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=a),i=e.input.charCodeAt(e.position);0!==i&&(-1!==e.firstTabInLine&&(e.position=e.firstTabInLine,ce(e,"tab characters must not be used in indentation")),45===i)&&z(e.input.charCodeAt(e.position+1));)if(l=!0,e.position++,ge(e,!0,-1)&&e.lineIndent<=t)a.push(null),i=e.input.charCodeAt(e.position);else if(n=e.line,we(e,t,3,!1,!0),a.push(e.result),ge(e,!0,-1),i=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&0!==i)ce(e,"bad indentation of a sequence entry");else if(e.lineIndentt?g=1:e.lineIndent===t?g=0:e.lineIndentt?g=1:e.lineIndent===t?g=0:e.lineIndentt)&&(y&&(a=e.line,l=e.lineStart,c=e.position),we(e,t,4,!0,r)&&(y?g=e.result:m=e.result),y||(de(e,f,d,h,g,m,a,l,c),h=g=m=null),ge(e,!0,-1),s=e.input.charCodeAt(e.position)),(e.line===o||e.lineIndent>t)&&0!==s)ce(e,"bad indentation of a mapping entry");else if(e.lineIndent=0))break;0===o?ce(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):u?ce(e,"repeat of an indentation width identifier"):(p=t+o-1,u=!0)}if(Q(a)){do{a=e.input.charCodeAt(++e.position)}while(Q(a));if(35===a)do{a=e.input.charCodeAt(++e.position)}while(!J(a)&&0!==a)}for(;0!==a;){for(he(e),e.lineIndent=0,a=e.input.charCodeAt(e.position);(!u||e.lineIndentp&&(p=e.lineIndent),J(a))f++;else{if(e.lineIndent0){for(r=a,o=0;r>0;r--)(a=ee(l=e.input.charCodeAt(++e.position)))>=0?o=(o<<4)+a:ce(e,"expected hexadecimal character");e.result+=ne(o),e.position++}else ce(e,"unknown escape sequence");n=i=e.position}else J(l)?(pe(e,n,i,!0),ye(e,ge(e,!1,t)),n=i=e.position):e.position===e.lineStart&&me(e)?ce(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}ce(e,"unexpected end of the stream within a double quoted scalar")}(e,d)?y=!0:!function(e){var t,n,i;if(42!==(i=e.input.charCodeAt(e.position)))return!1;for(i=e.input.charCodeAt(++e.position),t=e.position;0!==i&&!z(i)&&!X(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&ce(e,"name of an alias node must contain at least one character"),n=e.input.slice(t,e.position),P.call(e.anchorMap,n)||ce(e,'unidentified alias "'+n+'"'),e.result=e.anchorMap[n],ge(e,!0,-1),!0}(e)?function(e,t,n){var i,r,o,a,l,c,s,u,p=e.kind,f=e.result;if(z(u=e.input.charCodeAt(e.position))||X(u)||35===u||38===u||42===u||33===u||124===u||62===u||39===u||34===u||37===u||64===u||96===u)return!1;if((63===u||45===u)&&(z(i=e.input.charCodeAt(e.position+1))||n&&X(i)))return!1;for(e.kind="scalar",e.result="",r=o=e.position,a=!1;0!==u;){if(58===u){if(z(i=e.input.charCodeAt(e.position+1))||n&&X(i))break}else if(35===u){if(z(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&me(e)||n&&X(u))break;if(J(u)){if(l=e.line,c=e.lineStart,s=e.lineIndent,ge(e,!1,-1),e.lineIndent>=t){a=!0,u=e.input.charCodeAt(e.position);continue}e.position=o,e.line=l,e.lineStart=c,e.lineIndent=s;break}}a&&(pe(e,r,o,!1),ye(e,e.line-l),r=o=e.position,a=!1),Q(u)||(o=e.position+1),u=e.input.charCodeAt(++e.position)}return pe(e,r,o,!1),!!e.result||(e.kind=p,e.result=f,!1)}(e,d,1===i)&&(y=!0,null===e.tag&&(e.tag="?")):(y=!0,null===e.tag&&null===e.anchor||ce(e,"alias node should not have any properties")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===g&&(y=c&&be(e,h))),null===e.tag)null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);else if("?"===e.tag){for(null!==e.result&&"scalar"!==e.kind&&ce(e,'unacceptable node kind for ! tag; it should be "scalar", not "'+e.kind+'"'),s=0,u=e.implicitTypes.length;s"),null!==e.result&&f.kind!==e.kind&&ce(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+f.kind+'", not "'+e.kind+'"'),f.resolve(e.result,e.tag)?(e.result=f.construct(e.result,e.tag),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):ce(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||y}function ke(e){var t,n,i,r,o=e.position,a=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);0!==(r=e.input.charCodeAt(e.position))&&(ge(e,!0,-1),r=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==r));){for(a=!0,r=e.input.charCodeAt(++e.position),t=e.position;0!==r&&!z(r);)r=e.input.charCodeAt(++e.position);for(i=[],(n=e.input.slice(t,e.position)).length<1&&ce(e,"directive name must not be less than one character in length");0!==r;){for(;Q(r);)r=e.input.charCodeAt(++e.position);if(35===r){do{r=e.input.charCodeAt(++e.position)}while(0!==r&&!J(r));break}if(J(r))break;for(t=e.position;0!==r&&!z(r);)r=e.input.charCodeAt(++e.position);i.push(e.input.slice(t,e.position))}0!==r&&he(e),P.call(ue,n)?ue[n](e,n,i):se(e,'unknown document directive "'+n+'"')}ge(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,ge(e,!0,-1)):a&&ce(e,"directives end mark is expected"),we(e,e.lineIndent-1,4,!1,!0),ge(e,!0,-1),e.checkLineBreaks&&H.test(e.input.slice(o,e.position))&&se(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&me(e)?46===e.input.charCodeAt(e.position)&&(e.position+=3,ge(e,!0,-1)):e.position=55296&&i<=56319&&t+1=56320&&n<=57343?1024*(i-55296)+n-56320+65536:i}function Re(e){return/^\n* /.test(e)}function Be(e,t,n,i,r,o,a,l){var c,s,u=0,p=null,f=!1,d=!1,h=-1!==i,g=-1,m=De(s=Ye(e,0))&&s!==Oe&&!_e(s)&&45!==s&&63!==s&&58!==s&&44!==s&&91!==s&&93!==s&&123!==s&&125!==s&&35!==s&&38!==s&&42!==s&&33!==s&&124!==s&&61!==s&&62!==s&&39!==s&&34!==s&&37!==s&&64!==s&&96!==s&&function(e){return!_e(e)&&58!==e}(Ye(e,e.length-1));if(t||a)for(c=0;c=65536?c+=2:c++){if(!De(u=Ye(e,c)))return 5;m=m&&qe(u,p,l),p=u}else{for(c=0;c=65536?c+=2:c++){if(10===(u=Ye(e,c)))f=!0,h&&(d=d||c-g-1>i&&" "!==e[g+1],g=c);else if(!De(u))return 5;m=m&&qe(u,p,l),p=u}d=d||h&&c-g-1>i&&" "!==e[g+1]}return f||d?n>9&&Re(e)?5:a?2===o?5:2:d?4:3:!m||a||r(e)?2===o?5:2:1}function Ke(e,t,n,i,r){e.dump=function(){if(0===t.length)return 2===e.quotingType?'""':"''";if(!e.noCompatMode&&(-1!==Te.indexOf(t)||Ne.test(t)))return 2===e.quotingType?'"'+t+'"':"'"+t+"'";var a=e.indent*Math.max(1,n),l=-1===e.lineWidth?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-a),c=i||e.flowLevel>-1&&n>=e.flowLevel;switch(Be(t,c,e.indent,l,(function(t){return function(e,t){var n,i;for(n=0,i=e.implicitTypes.length;n"+Pe(t,e.indent)+We(Me(function(e,t){var n,i,r=/(\n+)([^\n]*)/g,o=(l=e.indexOf("\n"),l=-1!==l?l:e.length,r.lastIndex=l,He(e.slice(0,l),t)),a="\n"===e[0]||" "===e[0];var l;for(;i=r.exec(e);){var c=i[1],s=i[2];n=" "===s[0],o+=c+(a||n||""===s?"":"\n")+He(s,t),a=n}return o}(t,l),a));case 5:return'"'+function(e){for(var t,n="",i=0,r=0;r=65536?r+=2:r++)i=Ye(e,r),!(t=je[i])&&De(i)?(n+=e[r],i>=65536&&(n+=e[r+1])):n+=t||Fe(i);return n}(t)+'"';default:throw new o("impossible error: invalid scalar style")}}()}function Pe(e,t){var n=Re(e)?String(t):"",i="\n"===e[e.length-1];return n+(i&&("\n"===e[e.length-2]||"\n"===e)?"+":i?"":"-")+"\n"}function We(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function He(e,t){if(""===e||" "===e[0])return e;for(var n,i,r=/ [^ ]/g,o=0,a=0,l=0,c="";n=r.exec(e);)(l=n.index)-o>t&&(i=a>o?a:l,c+="\n"+e.slice(o,i),o=i+1),a=l;return c+="\n",e.length-o>t&&a>o?c+=e.slice(o,a)+"\n"+e.slice(a+1):c+=e.slice(o),c.slice(1)}function $e(e,t,n,i){var r,o,a,l="",c=e.tag;for(r=0,o=n.length;r tag resolver accepts not "'+s+'" style');i=c.represent[s](t,s)}e.dump=i}return!0}return!1}function Ve(e,t,n,i,r,a,l){e.tag=null,e.dump=n,Ge(e,n,!1)||Ge(e,n,!0);var c,s=Ie.call(e.dump),u=i;i&&(i=e.flowLevel<0||e.flowLevel>t);var p,f,d="[object Object]"===s||"[object Array]"===s;if(d&&(f=-1!==(p=e.duplicates.indexOf(n))),(null!==e.tag&&"?"!==e.tag||f||2!==e.indent&&t>0)&&(r=!1),f&&e.usedDuplicates[p])e.dump="*ref_"+p;else{if(d&&f&&!e.usedDuplicates[p]&&(e.usedDuplicates[p]=!0),"[object Object]"===s)i&&0!==Object.keys(e.dump).length?(!function(e,t,n,i){var r,a,l,c,s,u,p="",f=e.tag,d=Object.keys(n);if(!0===e.sortKeys)d.sort();else if("function"==typeof e.sortKeys)d.sort(e.sortKeys);else if(e.sortKeys)throw new o("sortKeys must be a boolean or a function");for(r=0,a=d.length;r1024)&&(e.dump&&10===e.dump.charCodeAt(0)?u+="?":u+="? "),u+=e.dump,s&&(u+=Le(e,t)),Ve(e,t+1,c,!0,s)&&(e.dump&&10===e.dump.charCodeAt(0)?u+=":":u+=": ",p+=u+=e.dump));e.tag=f,e.dump=p||"{}"}(e,t,e.dump,r),f&&(e.dump="&ref_"+p+e.dump)):(!function(e,t,n){var i,r,o,a,l,c="",s=e.tag,u=Object.keys(n);for(i=0,r=u.length;i1024&&(l+="? "),l+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Ve(e,t,a,!1,!1)&&(c+=l+=e.dump));e.tag=s,e.dump="{"+c+"}"}(e,t,e.dump),f&&(e.dump="&ref_"+p+" "+e.dump));else if("[object Array]"===s)i&&0!==e.dump.length?(e.noArrayIndent&&!l&&t>0?$e(e,t-1,e.dump,r):$e(e,t,e.dump,r),f&&(e.dump="&ref_"+p+e.dump)):(!function(e,t,n){var i,r,o,a="",l=e.tag;for(i=0,r=n.length;i",e.dump=c+" "+e.dump)}return!0}function Ze(e,t){var n,i,r=[],o=[];for(Je(e,r,o),n=0,i=o.length;n maxHalfLength) { - head = ' ... '; - lineStart = position - maxHalfLength + head.length; - } - - if (lineEnd - position > maxHalfLength) { - tail = ' ...'; - lineEnd = position + maxHalfLength - tail.length; - } - - return { - str: head + buffer.slice(lineStart, lineEnd).replace(/\t/g, '→') + tail, - pos: position - lineStart + head.length // relative position - }; -} - - -function padStart(string, max) { - return common.repeat(' ', max - string.length) + string; -} - - -function makeSnippet(mark, options) { - options = Object.create(options || null); - - if (!mark.buffer) return null; - - if (!options.maxLength) options.maxLength = 79; - if (typeof options.indent !== 'number') options.indent = 1; - if (typeof options.linesBefore !== 'number') options.linesBefore = 3; - if (typeof options.linesAfter !== 'number') options.linesAfter = 2; - - var re = /\r?\n|\r|\0/g; - var lineStarts = [ 0 ]; - var lineEnds = []; - var match; - var foundLineNo = -1; - - while ((match = re.exec(mark.buffer))) { - lineEnds.push(match.index); - lineStarts.push(match.index + match[0].length); - - if (mark.position <= match.index && foundLineNo < 0) { - foundLineNo = lineStarts.length - 2; - } - } - - if (foundLineNo < 0) foundLineNo = lineStarts.length - 1; - - var result = '', i, line; - var lineNoLength = Math.min(mark.line + options.linesAfter, lineEnds.length).toString().length; - var maxLineLength = options.maxLength - (options.indent + lineNoLength + 3); - - for (i = 1; i <= options.linesBefore; i++) { - if (foundLineNo - i < 0) break; - line = getLine( - mark.buffer, - lineStarts[foundLineNo - i], - lineEnds[foundLineNo - i], - mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo - i]), - maxLineLength - ); - result = common.repeat(' ', options.indent) + padStart((mark.line - i + 1).toString(), lineNoLength) + - ' | ' + line.str + '\n' + result; - } - - line = getLine(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength); - result += common.repeat(' ', options.indent) + padStart((mark.line + 1).toString(), lineNoLength) + - ' | ' + line.str + '\n'; - result += common.repeat('-', options.indent + lineNoLength + 3 + line.pos) + '^' + '\n'; - - for (i = 1; i <= options.linesAfter; i++) { - if (foundLineNo + i >= lineEnds.length) break; - line = getLine( - mark.buffer, - lineStarts[foundLineNo + i], - lineEnds[foundLineNo + i], - mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo + i]), - maxLineLength - ); - result += common.repeat(' ', options.indent) + padStart((mark.line + i + 1).toString(), lineNoLength) + - ' | ' + line.str + '\n'; - } - - return result.replace(/\n$/, ''); -} - - -var snippet = makeSnippet; - -var TYPE_CONSTRUCTOR_OPTIONS = [ - 'kind', - 'multi', - 'resolve', - 'construct', - 'instanceOf', - 'predicate', - 'represent', - 'representName', - 'defaultStyle', - 'styleAliases' -]; - -var YAML_NODE_KINDS = [ - 'scalar', - 'sequence', - 'mapping' -]; - -function compileStyleAliases(map) { - var result = {}; - - if (map !== null) { - Object.keys(map).forEach(function (style) { - map[style].forEach(function (alias) { - result[String(alias)] = style; - }); - }); - } - - return result; -} - -function Type$1(tag, options) { - options = options || {}; - - Object.keys(options).forEach(function (name) { - if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) { - throw new exception('Unknown option "' + name + '" is met in definition of "' + tag + '" YAML type.'); - } - }); - - // TODO: Add tag format check. - this.options = options; // keep original options in case user wants to extend this type later - this.tag = tag; - this.kind = options['kind'] || null; - this.resolve = options['resolve'] || function () { return true; }; - this.construct = options['construct'] || function (data) { return data; }; - this.instanceOf = options['instanceOf'] || null; - this.predicate = options['predicate'] || null; - this.represent = options['represent'] || null; - this.representName = options['representName'] || null; - this.defaultStyle = options['defaultStyle'] || null; - this.multi = options['multi'] || false; - this.styleAliases = compileStyleAliases(options['styleAliases'] || null); - - if (YAML_NODE_KINDS.indexOf(this.kind) === -1) { - throw new exception('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.'); - } -} - -var type = Type$1; - -/*eslint-disable max-len*/ - - - - - -function compileList(schema, name) { - var result = []; - - schema[name].forEach(function (currentType) { - var newIndex = result.length; - - result.forEach(function (previousType, previousIndex) { - if (previousType.tag === currentType.tag && - previousType.kind === currentType.kind && - previousType.multi === currentType.multi) { - - newIndex = previousIndex; - } - }); - - result[newIndex] = currentType; - }); - - return result; -} - - -function compileMap(/* lists... */) { - var result = { - scalar: {}, - sequence: {}, - mapping: {}, - fallback: {}, - multi: { - scalar: [], - sequence: [], - mapping: [], - fallback: [] - } - }, index, length; - - function collectType(type) { - if (type.multi) { - result.multi[type.kind].push(type); - result.multi['fallback'].push(type); - } else { - result[type.kind][type.tag] = result['fallback'][type.tag] = type; - } - } - - for (index = 0, length = arguments.length; index < length; index += 1) { - arguments[index].forEach(collectType); - } - return result; -} - - -function Schema$1(definition) { - return this.extend(definition); -} - - -Schema$1.prototype.extend = function extend(definition) { - var implicit = []; - var explicit = []; - - if (definition instanceof type) { - // Schema.extend(type) - explicit.push(definition); - - } else if (Array.isArray(definition)) { - // Schema.extend([ type1, type2, ... ]) - explicit = explicit.concat(definition); - - } else if (definition && (Array.isArray(definition.implicit) || Array.isArray(definition.explicit))) { - // Schema.extend({ explicit: [ type1, type2, ... ], implicit: [ type1, type2, ... ] }) - if (definition.implicit) implicit = implicit.concat(definition.implicit); - if (definition.explicit) explicit = explicit.concat(definition.explicit); - - } else { - throw new exception('Schema.extend argument should be a Type, [ Type ], ' + - 'or a schema definition ({ implicit: [...], explicit: [...] })'); - } - - implicit.forEach(function (type$1) { - if (!(type$1 instanceof type)) { - throw new exception('Specified list of YAML types (or a single Type object) contains a non-Type object.'); - } - - if (type$1.loadKind && type$1.loadKind !== 'scalar') { - throw new exception('There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.'); - } - - if (type$1.multi) { - throw new exception('There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.'); - } - }); - - explicit.forEach(function (type$1) { - if (!(type$1 instanceof type)) { - throw new exception('Specified list of YAML types (or a single Type object) contains a non-Type object.'); - } - }); - - var result = Object.create(Schema$1.prototype); - - result.implicit = (this.implicit || []).concat(implicit); - result.explicit = (this.explicit || []).concat(explicit); - - result.compiledImplicit = compileList(result, 'implicit'); - result.compiledExplicit = compileList(result, 'explicit'); - result.compiledTypeMap = compileMap(result.compiledImplicit, result.compiledExplicit); - - return result; -}; - - -var schema = Schema$1; - -var str = new type('tag:yaml.org,2002:str', { - kind: 'scalar', - construct: function (data) { return data !== null ? data : ''; } -}); - -var seq = new type('tag:yaml.org,2002:seq', { - kind: 'sequence', - construct: function (data) { return data !== null ? data : []; } -}); - -var map = new type('tag:yaml.org,2002:map', { - kind: 'mapping', - construct: function (data) { return data !== null ? data : {}; } -}); - -var failsafe = new schema({ - explicit: [ - str, - seq, - map - ] -}); - -function resolveYamlNull(data) { - if (data === null) return true; - - var max = data.length; - - return (max === 1 && data === '~') || - (max === 4 && (data === 'null' || data === 'Null' || data === 'NULL')); -} - -function constructYamlNull() { - return null; -} - -function isNull(object) { - return object === null; -} - -var _null = new type('tag:yaml.org,2002:null', { - kind: 'scalar', - resolve: resolveYamlNull, - construct: constructYamlNull, - predicate: isNull, - represent: { - canonical: function () { return '~'; }, - lowercase: function () { return 'null'; }, - uppercase: function () { return 'NULL'; }, - camelcase: function () { return 'Null'; }, - empty: function () { return ''; } - }, - defaultStyle: 'lowercase' -}); - -function resolveYamlBoolean(data) { - if (data === null) return false; - - var max = data.length; - - return (max === 4 && (data === 'true' || data === 'True' || data === 'TRUE')) || - (max === 5 && (data === 'false' || data === 'False' || data === 'FALSE')); -} - -function constructYamlBoolean(data) { - return data === 'true' || - data === 'True' || - data === 'TRUE'; -} - -function isBoolean(object) { - return Object.prototype.toString.call(object) === '[object Boolean]'; -} - -var bool = new type('tag:yaml.org,2002:bool', { - kind: 'scalar', - resolve: resolveYamlBoolean, - construct: constructYamlBoolean, - predicate: isBoolean, - represent: { - lowercase: function (object) { return object ? 'true' : 'false'; }, - uppercase: function (object) { return object ? 'TRUE' : 'FALSE'; }, - camelcase: function (object) { return object ? 'True' : 'False'; } - }, - defaultStyle: 'lowercase' -}); - -function isHexCode(c) { - return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) || - ((0x41/* A */ <= c) && (c <= 0x46/* F */)) || - ((0x61/* a */ <= c) && (c <= 0x66/* f */)); -} - -function isOctCode(c) { - return ((0x30/* 0 */ <= c) && (c <= 0x37/* 7 */)); -} - -function isDecCode(c) { - return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)); -} - -function resolveYamlInteger(data) { - if (data === null) return false; - - var max = data.length, - index = 0, - hasDigits = false, - ch; - - if (!max) return false; - - ch = data[index]; - - // sign - if (ch === '-' || ch === '+') { - ch = data[++index]; - } - - if (ch === '0') { - // 0 - if (index + 1 === max) return true; - ch = data[++index]; - - // base 2, base 8, base 16 - - if (ch === 'b') { - // base 2 - index++; - - for (; index < max; index++) { - ch = data[index]; - if (ch === '_') continue; - if (ch !== '0' && ch !== '1') return false; - hasDigits = true; - } - return hasDigits && ch !== '_'; - } - - - if (ch === 'x') { - // base 16 - index++; - - for (; index < max; index++) { - ch = data[index]; - if (ch === '_') continue; - if (!isHexCode(data.charCodeAt(index))) return false; - hasDigits = true; - } - return hasDigits && ch !== '_'; - } - - - if (ch === 'o') { - // base 8 - index++; - - for (; index < max; index++) { - ch = data[index]; - if (ch === '_') continue; - if (!isOctCode(data.charCodeAt(index))) return false; - hasDigits = true; - } - return hasDigits && ch !== '_'; - } - } - - // base 10 (except 0) - - // value should not start with `_`; - if (ch === '_') return false; - - for (; index < max; index++) { - ch = data[index]; - if (ch === '_') continue; - if (!isDecCode(data.charCodeAt(index))) { - return false; - } - hasDigits = true; - } - - // Should have digits and should not end with `_` - if (!hasDigits || ch === '_') return false; - - return true; -} - -function constructYamlInteger(data) { - var value = data, sign = 1, ch; - - if (value.indexOf('_') !== -1) { - value = value.replace(/_/g, ''); - } - - ch = value[0]; - - if (ch === '-' || ch === '+') { - if (ch === '-') sign = -1; - value = value.slice(1); - ch = value[0]; - } - - if (value === '0') return 0; - - if (ch === '0') { - if (value[1] === 'b') return sign * parseInt(value.slice(2), 2); - if (value[1] === 'x') return sign * parseInt(value.slice(2), 16); - if (value[1] === 'o') return sign * parseInt(value.slice(2), 8); - } - - return sign * parseInt(value, 10); -} - -function isInteger(object) { - return (Object.prototype.toString.call(object)) === '[object Number]' && - (object % 1 === 0 && !common.isNegativeZero(object)); -} - -var int = new type('tag:yaml.org,2002:int', { - kind: 'scalar', - resolve: resolveYamlInteger, - construct: constructYamlInteger, - predicate: isInteger, - represent: { - binary: function (obj) { return obj >= 0 ? '0b' + obj.toString(2) : '-0b' + obj.toString(2).slice(1); }, - octal: function (obj) { return obj >= 0 ? '0o' + obj.toString(8) : '-0o' + obj.toString(8).slice(1); }, - decimal: function (obj) { return obj.toString(10); }, - /* eslint-disable max-len */ - hexadecimal: function (obj) { return obj >= 0 ? '0x' + obj.toString(16).toUpperCase() : '-0x' + obj.toString(16).toUpperCase().slice(1); } - }, - defaultStyle: 'decimal', - styleAliases: { - binary: [ 2, 'bin' ], - octal: [ 8, 'oct' ], - decimal: [ 10, 'dec' ], - hexadecimal: [ 16, 'hex' ] - } -}); - -var YAML_FLOAT_PATTERN = new RegExp( - // 2.5e4, 2.5 and integers - '^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?' + - // .2e4, .2 - // special case, seems not from spec - '|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?' + - // .inf - '|[-+]?\\.(?:inf|Inf|INF)' + - // .nan - '|\\.(?:nan|NaN|NAN))$'); - -function resolveYamlFloat(data) { - if (data === null) return false; - - if (!YAML_FLOAT_PATTERN.test(data) || - // Quick hack to not allow integers end with `_` - // Probably should update regexp & check speed - data[data.length - 1] === '_') { - return false; - } - - return true; -} - -function constructYamlFloat(data) { - var value, sign; - - value = data.replace(/_/g, '').toLowerCase(); - sign = value[0] === '-' ? -1 : 1; - - if ('+-'.indexOf(value[0]) >= 0) { - value = value.slice(1); - } - - if (value === '.inf') { - return (sign === 1) ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY; - - } else if (value === '.nan') { - return NaN; - } - return sign * parseFloat(value, 10); -} - - -var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/; - -function representYamlFloat(object, style) { - var res; - - if (isNaN(object)) { - switch (style) { - case 'lowercase': return '.nan'; - case 'uppercase': return '.NAN'; - case 'camelcase': return '.NaN'; - } - } else if (Number.POSITIVE_INFINITY === object) { - switch (style) { - case 'lowercase': return '.inf'; - case 'uppercase': return '.INF'; - case 'camelcase': return '.Inf'; - } - } else if (Number.NEGATIVE_INFINITY === object) { - switch (style) { - case 'lowercase': return '-.inf'; - case 'uppercase': return '-.INF'; - case 'camelcase': return '-.Inf'; - } - } else if (common.isNegativeZero(object)) { - return '-0.0'; - } - - res = object.toString(10); - - // JS stringifier can build scientific format without dots: 5e-100, - // while YAML requres dot: 5.e-100. Fix it with simple hack - - return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace('e', '.e') : res; -} - -function isFloat(object) { - return (Object.prototype.toString.call(object) === '[object Number]') && - (object % 1 !== 0 || common.isNegativeZero(object)); -} - -var float = new type('tag:yaml.org,2002:float', { - kind: 'scalar', - resolve: resolveYamlFloat, - construct: constructYamlFloat, - predicate: isFloat, - represent: representYamlFloat, - defaultStyle: 'lowercase' -}); - -var json = failsafe.extend({ - implicit: [ - _null, - bool, - int, - float - ] -}); - -var core = json; - -var YAML_DATE_REGEXP = new RegExp( - '^([0-9][0-9][0-9][0-9])' + // [1] year - '-([0-9][0-9])' + // [2] month - '-([0-9][0-9])$'); // [3] day - -var YAML_TIMESTAMP_REGEXP = new RegExp( - '^([0-9][0-9][0-9][0-9])' + // [1] year - '-([0-9][0-9]?)' + // [2] month - '-([0-9][0-9]?)' + // [3] day - '(?:[Tt]|[ \\t]+)' + // ... - '([0-9][0-9]?)' + // [4] hour - ':([0-9][0-9])' + // [5] minute - ':([0-9][0-9])' + // [6] second - '(?:\\.([0-9]*))?' + // [7] fraction - '(?:[ \\t]*(Z|([-+])([0-9][0-9]?)' + // [8] tz [9] tz_sign [10] tz_hour - '(?::([0-9][0-9]))?))?$'); // [11] tz_minute - -function resolveYamlTimestamp(data) { - if (data === null) return false; - if (YAML_DATE_REGEXP.exec(data) !== null) return true; - if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) return true; - return false; -} - -function constructYamlTimestamp(data) { - var match, year, month, day, hour, minute, second, fraction = 0, - delta = null, tz_hour, tz_minute, date; - - match = YAML_DATE_REGEXP.exec(data); - if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(data); - - if (match === null) throw new Error('Date resolve error'); - - // match: [1] year [2] month [3] day - - year = +(match[1]); - month = +(match[2]) - 1; // JS month starts with 0 - day = +(match[3]); - - if (!match[4]) { // no hour - return new Date(Date.UTC(year, month, day)); - } - - // match: [4] hour [5] minute [6] second [7] fraction - - hour = +(match[4]); - minute = +(match[5]); - second = +(match[6]); - - if (match[7]) { - fraction = match[7].slice(0, 3); - while (fraction.length < 3) { // milli-seconds - fraction += '0'; - } - fraction = +fraction; - } - - // match: [8] tz [9] tz_sign [10] tz_hour [11] tz_minute - - if (match[9]) { - tz_hour = +(match[10]); - tz_minute = +(match[11] || 0); - delta = (tz_hour * 60 + tz_minute) * 60000; // delta in mili-seconds - if (match[9] === '-') delta = -delta; - } - - date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction)); - - if (delta) date.setTime(date.getTime() - delta); - - return date; -} - -function representYamlTimestamp(object /*, style*/) { - return object.toISOString(); -} - -var timestamp = new type('tag:yaml.org,2002:timestamp', { - kind: 'scalar', - resolve: resolveYamlTimestamp, - construct: constructYamlTimestamp, - instanceOf: Date, - represent: representYamlTimestamp -}); - -function resolveYamlMerge(data) { - return data === '<<' || data === null; -} - -var merge = new type('tag:yaml.org,2002:merge', { - kind: 'scalar', - resolve: resolveYamlMerge -}); - -/*eslint-disable no-bitwise*/ - - - - - -// [ 64, 65, 66 ] -> [ padding, CR, LF ] -var BASE64_MAP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r'; - - -function resolveYamlBinary(data) { - if (data === null) return false; - - var code, idx, bitlen = 0, max = data.length, map = BASE64_MAP; - - // Convert one by one. - for (idx = 0; idx < max; idx++) { - code = map.indexOf(data.charAt(idx)); - - // Skip CR/LF - if (code > 64) continue; - - // Fail on illegal characters - if (code < 0) return false; - - bitlen += 6; - } - - // If there are any bits left, source was corrupted - return (bitlen % 8) === 0; -} - -function constructYamlBinary(data) { - var idx, tailbits, - input = data.replace(/[\r\n=]/g, ''), // remove CR/LF & padding to simplify scan - max = input.length, - map = BASE64_MAP, - bits = 0, - result = []; - - // Collect by 6*4 bits (3 bytes) - - for (idx = 0; idx < max; idx++) { - if ((idx % 4 === 0) && idx) { - result.push((bits >> 16) & 0xFF); - result.push((bits >> 8) & 0xFF); - result.push(bits & 0xFF); - } - - bits = (bits << 6) | map.indexOf(input.charAt(idx)); - } - - // Dump tail - - tailbits = (max % 4) * 6; - - if (tailbits === 0) { - result.push((bits >> 16) & 0xFF); - result.push((bits >> 8) & 0xFF); - result.push(bits & 0xFF); - } else if (tailbits === 18) { - result.push((bits >> 10) & 0xFF); - result.push((bits >> 2) & 0xFF); - } else if (tailbits === 12) { - result.push((bits >> 4) & 0xFF); - } - - return new Uint8Array(result); -} - -function representYamlBinary(object /*, style*/) { - var result = '', bits = 0, idx, tail, - max = object.length, - map = BASE64_MAP; - - // Convert every three bytes to 4 ASCII characters. - - for (idx = 0; idx < max; idx++) { - if ((idx % 3 === 0) && idx) { - result += map[(bits >> 18) & 0x3F]; - result += map[(bits >> 12) & 0x3F]; - result += map[(bits >> 6) & 0x3F]; - result += map[bits & 0x3F]; - } - - bits = (bits << 8) + object[idx]; - } - - // Dump tail - - tail = max % 3; - - if (tail === 0) { - result += map[(bits >> 18) & 0x3F]; - result += map[(bits >> 12) & 0x3F]; - result += map[(bits >> 6) & 0x3F]; - result += map[bits & 0x3F]; - } else if (tail === 2) { - result += map[(bits >> 10) & 0x3F]; - result += map[(bits >> 4) & 0x3F]; - result += map[(bits << 2) & 0x3F]; - result += map[64]; - } else if (tail === 1) { - result += map[(bits >> 2) & 0x3F]; - result += map[(bits << 4) & 0x3F]; - result += map[64]; - result += map[64]; - } - - return result; -} - -function isBinary(obj) { - return Object.prototype.toString.call(obj) === '[object Uint8Array]'; -} - -var binary = new type('tag:yaml.org,2002:binary', { - kind: 'scalar', - resolve: resolveYamlBinary, - construct: constructYamlBinary, - predicate: isBinary, - represent: representYamlBinary -}); - -var _hasOwnProperty$3 = Object.prototype.hasOwnProperty; -var _toString$2 = Object.prototype.toString; - -function resolveYamlOmap(data) { - if (data === null) return true; - - var objectKeys = [], index, length, pair, pairKey, pairHasKey, - object = data; - - for (index = 0, length = object.length; index < length; index += 1) { - pair = object[index]; - pairHasKey = false; - - if (_toString$2.call(pair) !== '[object Object]') return false; - - for (pairKey in pair) { - if (_hasOwnProperty$3.call(pair, pairKey)) { - if (!pairHasKey) pairHasKey = true; - else return false; - } - } - - if (!pairHasKey) return false; - - if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey); - else return false; - } - - return true; -} - -function constructYamlOmap(data) { - return data !== null ? data : []; -} - -var omap = new type('tag:yaml.org,2002:omap', { - kind: 'sequence', - resolve: resolveYamlOmap, - construct: constructYamlOmap -}); - -var _toString$1 = Object.prototype.toString; - -function resolveYamlPairs(data) { - if (data === null) return true; - - var index, length, pair, keys, result, - object = data; - - result = new Array(object.length); - - for (index = 0, length = object.length; index < length; index += 1) { - pair = object[index]; - - if (_toString$1.call(pair) !== '[object Object]') return false; - - keys = Object.keys(pair); - - if (keys.length !== 1) return false; - - result[index] = [ keys[0], pair[keys[0]] ]; - } - - return true; -} - -function constructYamlPairs(data) { - if (data === null) return []; - - var index, length, pair, keys, result, - object = data; - - result = new Array(object.length); - - for (index = 0, length = object.length; index < length; index += 1) { - pair = object[index]; - - keys = Object.keys(pair); - - result[index] = [ keys[0], pair[keys[0]] ]; - } - - return result; -} - -var pairs = new type('tag:yaml.org,2002:pairs', { - kind: 'sequence', - resolve: resolveYamlPairs, - construct: constructYamlPairs -}); - -var _hasOwnProperty$2 = Object.prototype.hasOwnProperty; - -function resolveYamlSet(data) { - if (data === null) return true; - - var key, object = data; - - for (key in object) { - if (_hasOwnProperty$2.call(object, key)) { - if (object[key] !== null) return false; - } - } - - return true; -} - -function constructYamlSet(data) { - return data !== null ? data : {}; -} - -var set = new type('tag:yaml.org,2002:set', { - kind: 'mapping', - resolve: resolveYamlSet, - construct: constructYamlSet -}); - -var _default = core.extend({ - implicit: [ - timestamp, - merge - ], - explicit: [ - binary, - omap, - pairs, - set - ] -}); - -/*eslint-disable max-len,no-use-before-define*/ - - - - - - - -var _hasOwnProperty$1 = Object.prototype.hasOwnProperty; - - -var CONTEXT_FLOW_IN = 1; -var CONTEXT_FLOW_OUT = 2; -var CONTEXT_BLOCK_IN = 3; -var CONTEXT_BLOCK_OUT = 4; - - -var CHOMPING_CLIP = 1; -var CHOMPING_STRIP = 2; -var CHOMPING_KEEP = 3; - - -var PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; -var PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/; -var PATTERN_FLOW_INDICATORS = /[,\[\]\{\}]/; -var PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\-]+!)$/i; -var PATTERN_TAG_URI = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i; - - -function _class(obj) { return Object.prototype.toString.call(obj); } - -function is_EOL(c) { - return (c === 0x0A/* LF */) || (c === 0x0D/* CR */); -} - -function is_WHITE_SPACE(c) { - return (c === 0x09/* Tab */) || (c === 0x20/* Space */); -} - -function is_WS_OR_EOL(c) { - return (c === 0x09/* Tab */) || - (c === 0x20/* Space */) || - (c === 0x0A/* LF */) || - (c === 0x0D/* CR */); -} - -function is_FLOW_INDICATOR(c) { - return c === 0x2C/* , */ || - c === 0x5B/* [ */ || - c === 0x5D/* ] */ || - c === 0x7B/* { */ || - c === 0x7D/* } */; -} - -function fromHexCode(c) { - var lc; - - if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) { - return c - 0x30; - } - - /*eslint-disable no-bitwise*/ - lc = c | 0x20; - - if ((0x61/* a */ <= lc) && (lc <= 0x66/* f */)) { - return lc - 0x61 + 10; - } - - return -1; -} - -function escapedHexLen(c) { - if (c === 0x78/* x */) { return 2; } - if (c === 0x75/* u */) { return 4; } - if (c === 0x55/* U */) { return 8; } - return 0; -} - -function fromDecimalCode(c) { - if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) { - return c - 0x30; - } - - return -1; -} - -function simpleEscapeSequence(c) { - /* eslint-disable indent */ - return (c === 0x30/* 0 */) ? '\x00' : - (c === 0x61/* a */) ? '\x07' : - (c === 0x62/* b */) ? '\x08' : - (c === 0x74/* t */) ? '\x09' : - (c === 0x09/* Tab */) ? '\x09' : - (c === 0x6E/* n */) ? '\x0A' : - (c === 0x76/* v */) ? '\x0B' : - (c === 0x66/* f */) ? '\x0C' : - (c === 0x72/* r */) ? '\x0D' : - (c === 0x65/* e */) ? '\x1B' : - (c === 0x20/* Space */) ? ' ' : - (c === 0x22/* " */) ? '\x22' : - (c === 0x2F/* / */) ? '/' : - (c === 0x5C/* \ */) ? '\x5C' : - (c === 0x4E/* N */) ? '\x85' : - (c === 0x5F/* _ */) ? '\xA0' : - (c === 0x4C/* L */) ? '\u2028' : - (c === 0x50/* P */) ? '\u2029' : ''; -} - -function charFromCodepoint(c) { - if (c <= 0xFFFF) { - return String.fromCharCode(c); - } - // Encode UTF-16 surrogate pair - // https://en.wikipedia.org/wiki/UTF-16#Code_points_U.2B010000_to_U.2B10FFFF - return String.fromCharCode( - ((c - 0x010000) >> 10) + 0xD800, - ((c - 0x010000) & 0x03FF) + 0xDC00 - ); -} - -var simpleEscapeCheck = new Array(256); // integer, for fast access -var simpleEscapeMap = new Array(256); -for (var i = 0; i < 256; i++) { - simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0; - simpleEscapeMap[i] = simpleEscapeSequence(i); -} - - -function State$1(input, options) { - this.input = input; - - this.filename = options['filename'] || null; - this.schema = options['schema'] || _default; - this.onWarning = options['onWarning'] || null; - // (Hidden) Remove? makes the loader to expect YAML 1.1 documents - // if such documents have no explicit %YAML directive - this.legacy = options['legacy'] || false; - - this.json = options['json'] || false; - this.listener = options['listener'] || null; - - this.implicitTypes = this.schema.compiledImplicit; - this.typeMap = this.schema.compiledTypeMap; - - this.length = input.length; - this.position = 0; - this.line = 0; - this.lineStart = 0; - this.lineIndent = 0; - - // position of first leading tab in the current line, - // used to make sure there are no tabs in the indentation - this.firstTabInLine = -1; - - this.documents = []; - - /* - this.version; - this.checkLineBreaks; - this.tagMap; - this.anchorMap; - this.tag; - this.anchor; - this.kind; - this.result;*/ - -} - - -function generateError(state, message) { - var mark = { - name: state.filename, - buffer: state.input.slice(0, -1), // omit trailing \0 - position: state.position, - line: state.line, - column: state.position - state.lineStart - }; - - mark.snippet = snippet(mark); - - return new exception(message, mark); -} - -function throwError(state, message) { - throw generateError(state, message); -} - -function throwWarning(state, message) { - if (state.onWarning) { - state.onWarning.call(null, generateError(state, message)); - } -} - - -var directiveHandlers = { - - YAML: function handleYamlDirective(state, name, args) { - - var match, major, minor; - - if (state.version !== null) { - throwError(state, 'duplication of %YAML directive'); - } - - if (args.length !== 1) { - throwError(state, 'YAML directive accepts exactly one argument'); - } - - match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]); - - if (match === null) { - throwError(state, 'ill-formed argument of the YAML directive'); - } - - major = parseInt(match[1], 10); - minor = parseInt(match[2], 10); - - if (major !== 1) { - throwError(state, 'unacceptable YAML version of the document'); - } - - state.version = args[0]; - state.checkLineBreaks = (minor < 2); - - if (minor !== 1 && minor !== 2) { - throwWarning(state, 'unsupported YAML version of the document'); - } - }, - - TAG: function handleTagDirective(state, name, args) { - - var handle, prefix; - - if (args.length !== 2) { - throwError(state, 'TAG directive accepts exactly two arguments'); - } - - handle = args[0]; - prefix = args[1]; - - if (!PATTERN_TAG_HANDLE.test(handle)) { - throwError(state, 'ill-formed tag handle (first argument) of the TAG directive'); - } - - if (_hasOwnProperty$1.call(state.tagMap, handle)) { - throwError(state, 'there is a previously declared suffix for "' + handle + '" tag handle'); - } - - if (!PATTERN_TAG_URI.test(prefix)) { - throwError(state, 'ill-formed tag prefix (second argument) of the TAG directive'); - } - - try { - prefix = decodeURIComponent(prefix); - } catch (err) { - throwError(state, 'tag prefix is malformed: ' + prefix); - } - - state.tagMap[handle] = prefix; - } -}; - - -function captureSegment(state, start, end, checkJson) { - var _position, _length, _character, _result; - - if (start < end) { - _result = state.input.slice(start, end); - - if (checkJson) { - for (_position = 0, _length = _result.length; _position < _length; _position += 1) { - _character = _result.charCodeAt(_position); - if (!(_character === 0x09 || - (0x20 <= _character && _character <= 0x10FFFF))) { - throwError(state, 'expected valid JSON character'); - } - } - } else if (PATTERN_NON_PRINTABLE.test(_result)) { - throwError(state, 'the stream contains non-printable characters'); - } - - state.result += _result; - } -} - -function mergeMappings(state, destination, source, overridableKeys) { - var sourceKeys, key, index, quantity; - - if (!common.isObject(source)) { - throwError(state, 'cannot merge mappings; the provided source object is unacceptable'); - } - - sourceKeys = Object.keys(source); - - for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) { - key = sourceKeys[index]; - - if (!_hasOwnProperty$1.call(destination, key)) { - destination[key] = source[key]; - overridableKeys[key] = true; - } - } -} - -function storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, - startLine, startLineStart, startPos) { - - var index, quantity; - - // The output is a plain object here, so keys can only be strings. - // We need to convert keyNode to a string, but doing so can hang the process - // (deeply nested arrays that explode exponentially using aliases). - if (Array.isArray(keyNode)) { - keyNode = Array.prototype.slice.call(keyNode); - - for (index = 0, quantity = keyNode.length; index < quantity; index += 1) { - if (Array.isArray(keyNode[index])) { - throwError(state, 'nested arrays are not supported inside keys'); - } - - if (typeof keyNode === 'object' && _class(keyNode[index]) === '[object Object]') { - keyNode[index] = '[object Object]'; - } - } - } - - // Avoid code execution in load() via toString property - // (still use its own toString for arrays, timestamps, - // and whatever user schema extensions happen to have @@toStringTag) - if (typeof keyNode === 'object' && _class(keyNode) === '[object Object]') { - keyNode = '[object Object]'; - } - - - keyNode = String(keyNode); - - if (_result === null) { - _result = {}; - } - - if (keyTag === 'tag:yaml.org,2002:merge') { - if (Array.isArray(valueNode)) { - for (index = 0, quantity = valueNode.length; index < quantity; index += 1) { - mergeMappings(state, _result, valueNode[index], overridableKeys); - } - } else { - mergeMappings(state, _result, valueNode, overridableKeys); - } - } else { - if (!state.json && - !_hasOwnProperty$1.call(overridableKeys, keyNode) && - _hasOwnProperty$1.call(_result, keyNode)) { - state.line = startLine || state.line; - state.lineStart = startLineStart || state.lineStart; - state.position = startPos || state.position; - throwError(state, 'duplicated mapping key'); - } - - // used for this specific key only because Object.defineProperty is slow - if (keyNode === '__proto__') { - Object.defineProperty(_result, keyNode, { - configurable: true, - enumerable: true, - writable: true, - value: valueNode - }); - } else { - _result[keyNode] = valueNode; - } - delete overridableKeys[keyNode]; - } - - return _result; -} - -function readLineBreak(state) { - var ch; - - ch = state.input.charCodeAt(state.position); - - if (ch === 0x0A/* LF */) { - state.position++; - } else if (ch === 0x0D/* CR */) { - state.position++; - if (state.input.charCodeAt(state.position) === 0x0A/* LF */) { - state.position++; - } - } else { - throwError(state, 'a line break is expected'); - } - - state.line += 1; - state.lineStart = state.position; - state.firstTabInLine = -1; -} - -function skipSeparationSpace(state, allowComments, checkIndent) { - var lineBreaks = 0, - ch = state.input.charCodeAt(state.position); - - while (ch !== 0) { - while (is_WHITE_SPACE(ch)) { - if (ch === 0x09/* Tab */ && state.firstTabInLine === -1) { - state.firstTabInLine = state.position; - } - ch = state.input.charCodeAt(++state.position); - } - - if (allowComments && ch === 0x23/* # */) { - do { - ch = state.input.charCodeAt(++state.position); - } while (ch !== 0x0A/* LF */ && ch !== 0x0D/* CR */ && ch !== 0); - } - - if (is_EOL(ch)) { - readLineBreak(state); - - ch = state.input.charCodeAt(state.position); - lineBreaks++; - state.lineIndent = 0; - - while (ch === 0x20/* Space */) { - state.lineIndent++; - ch = state.input.charCodeAt(++state.position); - } - } else { - break; - } - } - - if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) { - throwWarning(state, 'deficient indentation'); - } - - return lineBreaks; -} - -function testDocumentSeparator(state) { - var _position = state.position, - ch; - - ch = state.input.charCodeAt(_position); - - // Condition state.position === state.lineStart is tested - // in parent on each call, for efficiency. No needs to test here again. - if ((ch === 0x2D/* - */ || ch === 0x2E/* . */) && - ch === state.input.charCodeAt(_position + 1) && - ch === state.input.charCodeAt(_position + 2)) { - - _position += 3; - - ch = state.input.charCodeAt(_position); - - if (ch === 0 || is_WS_OR_EOL(ch)) { - return true; - } - } - - return false; -} - -function writeFoldedLines(state, count) { - if (count === 1) { - state.result += ' '; - } else if (count > 1) { - state.result += common.repeat('\n', count - 1); - } -} - - -function readPlainScalar(state, nodeIndent, withinFlowCollection) { - var preceding, - following, - captureStart, - captureEnd, - hasPendingContent, - _line, - _lineStart, - _lineIndent, - _kind = state.kind, - _result = state.result, - ch; - - ch = state.input.charCodeAt(state.position); - - if (is_WS_OR_EOL(ch) || - is_FLOW_INDICATOR(ch) || - ch === 0x23/* # */ || - ch === 0x26/* & */ || - ch === 0x2A/* * */ || - ch === 0x21/* ! */ || - ch === 0x7C/* | */ || - ch === 0x3E/* > */ || - ch === 0x27/* ' */ || - ch === 0x22/* " */ || - ch === 0x25/* % */ || - ch === 0x40/* @ */ || - ch === 0x60/* ` */) { - return false; - } - - if (ch === 0x3F/* ? */ || ch === 0x2D/* - */) { - following = state.input.charCodeAt(state.position + 1); - - if (is_WS_OR_EOL(following) || - withinFlowCollection && is_FLOW_INDICATOR(following)) { - return false; - } - } - - state.kind = 'scalar'; - state.result = ''; - captureStart = captureEnd = state.position; - hasPendingContent = false; - - while (ch !== 0) { - if (ch === 0x3A/* : */) { - following = state.input.charCodeAt(state.position + 1); - - if (is_WS_OR_EOL(following) || - withinFlowCollection && is_FLOW_INDICATOR(following)) { - break; - } - - } else if (ch === 0x23/* # */) { - preceding = state.input.charCodeAt(state.position - 1); - - if (is_WS_OR_EOL(preceding)) { - break; - } - - } else if ((state.position === state.lineStart && testDocumentSeparator(state)) || - withinFlowCollection && is_FLOW_INDICATOR(ch)) { - break; - - } else if (is_EOL(ch)) { - _line = state.line; - _lineStart = state.lineStart; - _lineIndent = state.lineIndent; - skipSeparationSpace(state, false, -1); - - if (state.lineIndent >= nodeIndent) { - hasPendingContent = true; - ch = state.input.charCodeAt(state.position); - continue; - } else { - state.position = captureEnd; - state.line = _line; - state.lineStart = _lineStart; - state.lineIndent = _lineIndent; - break; - } - } - - if (hasPendingContent) { - captureSegment(state, captureStart, captureEnd, false); - writeFoldedLines(state, state.line - _line); - captureStart = captureEnd = state.position; - hasPendingContent = false; - } - - if (!is_WHITE_SPACE(ch)) { - captureEnd = state.position + 1; - } - - ch = state.input.charCodeAt(++state.position); - } - - captureSegment(state, captureStart, captureEnd, false); - - if (state.result) { - return true; - } - - state.kind = _kind; - state.result = _result; - return false; -} - -function readSingleQuotedScalar(state, nodeIndent) { - var ch, - captureStart, captureEnd; - - ch = state.input.charCodeAt(state.position); - - if (ch !== 0x27/* ' */) { - return false; - } - - state.kind = 'scalar'; - state.result = ''; - state.position++; - captureStart = captureEnd = state.position; - - while ((ch = state.input.charCodeAt(state.position)) !== 0) { - if (ch === 0x27/* ' */) { - captureSegment(state, captureStart, state.position, true); - ch = state.input.charCodeAt(++state.position); - - if (ch === 0x27/* ' */) { - captureStart = state.position; - state.position++; - captureEnd = state.position; - } else { - return true; - } - - } else if (is_EOL(ch)) { - captureSegment(state, captureStart, captureEnd, true); - writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); - captureStart = captureEnd = state.position; - - } else if (state.position === state.lineStart && testDocumentSeparator(state)) { - throwError(state, 'unexpected end of the document within a single quoted scalar'); - - } else { - state.position++; - captureEnd = state.position; - } - } - - throwError(state, 'unexpected end of the stream within a single quoted scalar'); -} - -function readDoubleQuotedScalar(state, nodeIndent) { - var captureStart, - captureEnd, - hexLength, - hexResult, - tmp, - ch; - - ch = state.input.charCodeAt(state.position); - - if (ch !== 0x22/* " */) { - return false; - } - - state.kind = 'scalar'; - state.result = ''; - state.position++; - captureStart = captureEnd = state.position; - - while ((ch = state.input.charCodeAt(state.position)) !== 0) { - if (ch === 0x22/* " */) { - captureSegment(state, captureStart, state.position, true); - state.position++; - return true; - - } else if (ch === 0x5C/* \ */) { - captureSegment(state, captureStart, state.position, true); - ch = state.input.charCodeAt(++state.position); - - if (is_EOL(ch)) { - skipSeparationSpace(state, false, nodeIndent); - - // TODO: rework to inline fn with no type cast? - } else if (ch < 256 && simpleEscapeCheck[ch]) { - state.result += simpleEscapeMap[ch]; - state.position++; - - } else if ((tmp = escapedHexLen(ch)) > 0) { - hexLength = tmp; - hexResult = 0; - - for (; hexLength > 0; hexLength--) { - ch = state.input.charCodeAt(++state.position); - - if ((tmp = fromHexCode(ch)) >= 0) { - hexResult = (hexResult << 4) + tmp; - - } else { - throwError(state, 'expected hexadecimal character'); - } - } - - state.result += charFromCodepoint(hexResult); - - state.position++; - - } else { - throwError(state, 'unknown escape sequence'); - } - - captureStart = captureEnd = state.position; - - } else if (is_EOL(ch)) { - captureSegment(state, captureStart, captureEnd, true); - writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); - captureStart = captureEnd = state.position; - - } else if (state.position === state.lineStart && testDocumentSeparator(state)) { - throwError(state, 'unexpected end of the document within a double quoted scalar'); - - } else { - state.position++; - captureEnd = state.position; - } - } - - throwError(state, 'unexpected end of the stream within a double quoted scalar'); -} - -function readFlowCollection(state, nodeIndent) { - var readNext = true, - _line, - _lineStart, - _pos, - _tag = state.tag, - _result, - _anchor = state.anchor, - following, - terminator, - isPair, - isExplicitPair, - isMapping, - overridableKeys = Object.create(null), - keyNode, - keyTag, - valueNode, - ch; - - ch = state.input.charCodeAt(state.position); - - if (ch === 0x5B/* [ */) { - terminator = 0x5D;/* ] */ - isMapping = false; - _result = []; - } else if (ch === 0x7B/* { */) { - terminator = 0x7D;/* } */ - isMapping = true; - _result = {}; - } else { - return false; - } - - if (state.anchor !== null) { - state.anchorMap[state.anchor] = _result; - } - - ch = state.input.charCodeAt(++state.position); - - while (ch !== 0) { - skipSeparationSpace(state, true, nodeIndent); - - ch = state.input.charCodeAt(state.position); - - if (ch === terminator) { - state.position++; - state.tag = _tag; - state.anchor = _anchor; - state.kind = isMapping ? 'mapping' : 'sequence'; - state.result = _result; - return true; - } else if (!readNext) { - throwError(state, 'missed comma between flow collection entries'); - } else if (ch === 0x2C/* , */) { - // "flow collection entries can never be completely empty", as per YAML 1.2, section 7.4 - throwError(state, "expected the node content, but found ','"); - } - - keyTag = keyNode = valueNode = null; - isPair = isExplicitPair = false; - - if (ch === 0x3F/* ? */) { - following = state.input.charCodeAt(state.position + 1); - - if (is_WS_OR_EOL(following)) { - isPair = isExplicitPair = true; - state.position++; - skipSeparationSpace(state, true, nodeIndent); - } - } - - _line = state.line; // Save the current line. - _lineStart = state.lineStart; - _pos = state.position; - composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); - keyTag = state.tag; - keyNode = state.result; - skipSeparationSpace(state, true, nodeIndent); - - ch = state.input.charCodeAt(state.position); - - if ((isExplicitPair || state.line === _line) && ch === 0x3A/* : */) { - isPair = true; - ch = state.input.charCodeAt(++state.position); - skipSeparationSpace(state, true, nodeIndent); - composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); - valueNode = state.result; - } - - if (isMapping) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos); - } else if (isPair) { - _result.push(storeMappingPair(state, null, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos)); - } else { - _result.push(keyNode); - } - - skipSeparationSpace(state, true, nodeIndent); - - ch = state.input.charCodeAt(state.position); - - if (ch === 0x2C/* , */) { - readNext = true; - ch = state.input.charCodeAt(++state.position); - } else { - readNext = false; - } - } - - throwError(state, 'unexpected end of the stream within a flow collection'); -} - -function readBlockScalar(state, nodeIndent) { - var captureStart, - folding, - chomping = CHOMPING_CLIP, - didReadContent = false, - detectedIndent = false, - textIndent = nodeIndent, - emptyLines = 0, - atMoreIndented = false, - tmp, - ch; - - ch = state.input.charCodeAt(state.position); - - if (ch === 0x7C/* | */) { - folding = false; - } else if (ch === 0x3E/* > */) { - folding = true; - } else { - return false; - } - - state.kind = 'scalar'; - state.result = ''; - - while (ch !== 0) { - ch = state.input.charCodeAt(++state.position); - - if (ch === 0x2B/* + */ || ch === 0x2D/* - */) { - if (CHOMPING_CLIP === chomping) { - chomping = (ch === 0x2B/* + */) ? CHOMPING_KEEP : CHOMPING_STRIP; - } else { - throwError(state, 'repeat of a chomping mode identifier'); - } - - } else if ((tmp = fromDecimalCode(ch)) >= 0) { - if (tmp === 0) { - throwError(state, 'bad explicit indentation width of a block scalar; it cannot be less than one'); - } else if (!detectedIndent) { - textIndent = nodeIndent + tmp - 1; - detectedIndent = true; - } else { - throwError(state, 'repeat of an indentation width identifier'); - } - - } else { - break; - } - } - - if (is_WHITE_SPACE(ch)) { - do { ch = state.input.charCodeAt(++state.position); } - while (is_WHITE_SPACE(ch)); - - if (ch === 0x23/* # */) { - do { ch = state.input.charCodeAt(++state.position); } - while (!is_EOL(ch) && (ch !== 0)); - } - } - - while (ch !== 0) { - readLineBreak(state); - state.lineIndent = 0; - - ch = state.input.charCodeAt(state.position); - - while ((!detectedIndent || state.lineIndent < textIndent) && - (ch === 0x20/* Space */)) { - state.lineIndent++; - ch = state.input.charCodeAt(++state.position); - } - - if (!detectedIndent && state.lineIndent > textIndent) { - textIndent = state.lineIndent; - } - - if (is_EOL(ch)) { - emptyLines++; - continue; - } - - // End of the scalar. - if (state.lineIndent < textIndent) { - - // Perform the chomping. - if (chomping === CHOMPING_KEEP) { - state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); - } else if (chomping === CHOMPING_CLIP) { - if (didReadContent) { // i.e. only if the scalar is not empty. - state.result += '\n'; - } - } - - // Break this `while` cycle and go to the funciton's epilogue. - break; - } - - // Folded style: use fancy rules to handle line breaks. - if (folding) { - - // Lines starting with white space characters (more-indented lines) are not folded. - if (is_WHITE_SPACE(ch)) { - atMoreIndented = true; - // except for the first content line (cf. Example 8.1) - state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); - - // End of more-indented block. - } else if (atMoreIndented) { - atMoreIndented = false; - state.result += common.repeat('\n', emptyLines + 1); - - // Just one line break - perceive as the same line. - } else if (emptyLines === 0) { - if (didReadContent) { // i.e. only if we have already read some scalar content. - state.result += ' '; - } - - // Several line breaks - perceive as different lines. - } else { - state.result += common.repeat('\n', emptyLines); - } - - // Literal style: just add exact number of line breaks between content lines. - } else { - // Keep all line breaks except the header line break. - state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); - } - - didReadContent = true; - detectedIndent = true; - emptyLines = 0; - captureStart = state.position; - - while (!is_EOL(ch) && (ch !== 0)) { - ch = state.input.charCodeAt(++state.position); - } - - captureSegment(state, captureStart, state.position, false); - } - - return true; -} - -function readBlockSequence(state, nodeIndent) { - var _line, - _tag = state.tag, - _anchor = state.anchor, - _result = [], - following, - detected = false, - ch; - - // there is a leading tab before this token, so it can't be a block sequence/mapping; - // it can still be flow sequence/mapping or a scalar - if (state.firstTabInLine !== -1) return false; - - if (state.anchor !== null) { - state.anchorMap[state.anchor] = _result; - } - - ch = state.input.charCodeAt(state.position); - - while (ch !== 0) { - if (state.firstTabInLine !== -1) { - state.position = state.firstTabInLine; - throwError(state, 'tab characters must not be used in indentation'); - } - - if (ch !== 0x2D/* - */) { - break; - } - - following = state.input.charCodeAt(state.position + 1); - - if (!is_WS_OR_EOL(following)) { - break; - } - - detected = true; - state.position++; - - if (skipSeparationSpace(state, true, -1)) { - if (state.lineIndent <= nodeIndent) { - _result.push(null); - ch = state.input.charCodeAt(state.position); - continue; - } - } - - _line = state.line; - composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true); - _result.push(state.result); - skipSeparationSpace(state, true, -1); - - ch = state.input.charCodeAt(state.position); - - if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) { - throwError(state, 'bad indentation of a sequence entry'); - } else if (state.lineIndent < nodeIndent) { - break; - } - } - - if (detected) { - state.tag = _tag; - state.anchor = _anchor; - state.kind = 'sequence'; - state.result = _result; - return true; - } - return false; -} - -function readBlockMapping(state, nodeIndent, flowIndent) { - var following, - allowCompact, - _line, - _keyLine, - _keyLineStart, - _keyPos, - _tag = state.tag, - _anchor = state.anchor, - _result = {}, - overridableKeys = Object.create(null), - keyTag = null, - keyNode = null, - valueNode = null, - atExplicitKey = false, - detected = false, - ch; - - // there is a leading tab before this token, so it can't be a block sequence/mapping; - // it can still be flow sequence/mapping or a scalar - if (state.firstTabInLine !== -1) return false; - - if (state.anchor !== null) { - state.anchorMap[state.anchor] = _result; - } - - ch = state.input.charCodeAt(state.position); - - while (ch !== 0) { - if (!atExplicitKey && state.firstTabInLine !== -1) { - state.position = state.firstTabInLine; - throwError(state, 'tab characters must not be used in indentation'); - } - - following = state.input.charCodeAt(state.position + 1); - _line = state.line; // Save the current line. - - // - // Explicit notation case. There are two separate blocks: - // first for the key (denoted by "?") and second for the value (denoted by ":") - // - if ((ch === 0x3F/* ? */ || ch === 0x3A/* : */) && is_WS_OR_EOL(following)) { - - if (ch === 0x3F/* ? */) { - if (atExplicitKey) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); - keyTag = keyNode = valueNode = null; - } - - detected = true; - atExplicitKey = true; - allowCompact = true; - - } else if (atExplicitKey) { - // i.e. 0x3A/* : */ === character after the explicit key. - atExplicitKey = false; - allowCompact = true; - - } else { - throwError(state, 'incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line'); - } - - state.position += 1; - ch = following; - - // - // Implicit notation case. Flow-style node as the key first, then ":", and the value. - // - } else { - _keyLine = state.line; - _keyLineStart = state.lineStart; - _keyPos = state.position; - - if (!composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) { - // Neither implicit nor explicit notation. - // Reading is done. Go to the epilogue. - break; - } - - if (state.line === _line) { - ch = state.input.charCodeAt(state.position); - - while (is_WHITE_SPACE(ch)) { - ch = state.input.charCodeAt(++state.position); - } - - if (ch === 0x3A/* : */) { - ch = state.input.charCodeAt(++state.position); - - if (!is_WS_OR_EOL(ch)) { - throwError(state, 'a whitespace character is expected after the key-value separator within a block mapping'); - } - - if (atExplicitKey) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); - keyTag = keyNode = valueNode = null; - } - - detected = true; - atExplicitKey = false; - allowCompact = false; - keyTag = state.tag; - keyNode = state.result; - - } else if (detected) { - throwError(state, 'can not read an implicit mapping pair; a colon is missed'); - - } else { - state.tag = _tag; - state.anchor = _anchor; - return true; // Keep the result of `composeNode`. - } - - } else if (detected) { - throwError(state, 'can not read a block mapping entry; a multiline key may not be an implicit key'); - - } else { - state.tag = _tag; - state.anchor = _anchor; - return true; // Keep the result of `composeNode`. - } - } - - // - // Common reading code for both explicit and implicit notations. - // - if (state.line === _line || state.lineIndent > nodeIndent) { - if (atExplicitKey) { - _keyLine = state.line; - _keyLineStart = state.lineStart; - _keyPos = state.position; - } - - if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) { - if (atExplicitKey) { - keyNode = state.result; - } else { - valueNode = state.result; - } - } - - if (!atExplicitKey) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _keyLine, _keyLineStart, _keyPos); - keyTag = keyNode = valueNode = null; - } - - skipSeparationSpace(state, true, -1); - ch = state.input.charCodeAt(state.position); - } - - if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) { - throwError(state, 'bad indentation of a mapping entry'); - } else if (state.lineIndent < nodeIndent) { - break; - } - } - - // - // Epilogue. - // - - // Special case: last mapping's node contains only the key in explicit notation. - if (atExplicitKey) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); - } - - // Expose the resulting mapping. - if (detected) { - state.tag = _tag; - state.anchor = _anchor; - state.kind = 'mapping'; - state.result = _result; - } - - return detected; -} - -function readTagProperty(state) { - var _position, - isVerbatim = false, - isNamed = false, - tagHandle, - tagName, - ch; - - ch = state.input.charCodeAt(state.position); - - if (ch !== 0x21/* ! */) return false; - - if (state.tag !== null) { - throwError(state, 'duplication of a tag property'); - } - - ch = state.input.charCodeAt(++state.position); - - if (ch === 0x3C/* < */) { - isVerbatim = true; - ch = state.input.charCodeAt(++state.position); - - } else if (ch === 0x21/* ! */) { - isNamed = true; - tagHandle = '!!'; - ch = state.input.charCodeAt(++state.position); - - } else { - tagHandle = '!'; - } - - _position = state.position; - - if (isVerbatim) { - do { ch = state.input.charCodeAt(++state.position); } - while (ch !== 0 && ch !== 0x3E/* > */); - - if (state.position < state.length) { - tagName = state.input.slice(_position, state.position); - ch = state.input.charCodeAt(++state.position); - } else { - throwError(state, 'unexpected end of the stream within a verbatim tag'); - } - } else { - while (ch !== 0 && !is_WS_OR_EOL(ch)) { - - if (ch === 0x21/* ! */) { - if (!isNamed) { - tagHandle = state.input.slice(_position - 1, state.position + 1); - - if (!PATTERN_TAG_HANDLE.test(tagHandle)) { - throwError(state, 'named tag handle cannot contain such characters'); - } - - isNamed = true; - _position = state.position + 1; - } else { - throwError(state, 'tag suffix cannot contain exclamation marks'); - } - } - - ch = state.input.charCodeAt(++state.position); - } - - tagName = state.input.slice(_position, state.position); - - if (PATTERN_FLOW_INDICATORS.test(tagName)) { - throwError(state, 'tag suffix cannot contain flow indicator characters'); - } - } - - if (tagName && !PATTERN_TAG_URI.test(tagName)) { - throwError(state, 'tag name cannot contain such characters: ' + tagName); - } - - try { - tagName = decodeURIComponent(tagName); - } catch (err) { - throwError(state, 'tag name is malformed: ' + tagName); - } - - if (isVerbatim) { - state.tag = tagName; - - } else if (_hasOwnProperty$1.call(state.tagMap, tagHandle)) { - state.tag = state.tagMap[tagHandle] + tagName; - - } else if (tagHandle === '!') { - state.tag = '!' + tagName; - - } else if (tagHandle === '!!') { - state.tag = 'tag:yaml.org,2002:' + tagName; - - } else { - throwError(state, 'undeclared tag handle "' + tagHandle + '"'); - } - - return true; -} - -function readAnchorProperty(state) { - var _position, - ch; - - ch = state.input.charCodeAt(state.position); - - if (ch !== 0x26/* & */) return false; - - if (state.anchor !== null) { - throwError(state, 'duplication of an anchor property'); - } - - ch = state.input.charCodeAt(++state.position); - _position = state.position; - - while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { - ch = state.input.charCodeAt(++state.position); - } - - if (state.position === _position) { - throwError(state, 'name of an anchor node must contain at least one character'); - } - - state.anchor = state.input.slice(_position, state.position); - return true; -} - -function readAlias(state) { - var _position, alias, - ch; - - ch = state.input.charCodeAt(state.position); - - if (ch !== 0x2A/* * */) return false; - - ch = state.input.charCodeAt(++state.position); - _position = state.position; - - while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { - ch = state.input.charCodeAt(++state.position); - } - - if (state.position === _position) { - throwError(state, 'name of an alias node must contain at least one character'); - } - - alias = state.input.slice(_position, state.position); - - if (!_hasOwnProperty$1.call(state.anchorMap, alias)) { - throwError(state, 'unidentified alias "' + alias + '"'); - } - - state.result = state.anchorMap[alias]; - skipSeparationSpace(state, true, -1); - return true; -} - -function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) { - var allowBlockStyles, - allowBlockScalars, - allowBlockCollections, - indentStatus = 1, // 1: this>parent, 0: this=parent, -1: this parentIndent) { - indentStatus = 1; - } else if (state.lineIndent === parentIndent) { - indentStatus = 0; - } else if (state.lineIndent < parentIndent) { - indentStatus = -1; - } - } - } - - if (indentStatus === 1) { - while (readTagProperty(state) || readAnchorProperty(state)) { - if (skipSeparationSpace(state, true, -1)) { - atNewLine = true; - allowBlockCollections = allowBlockStyles; - - if (state.lineIndent > parentIndent) { - indentStatus = 1; - } else if (state.lineIndent === parentIndent) { - indentStatus = 0; - } else if (state.lineIndent < parentIndent) { - indentStatus = -1; - } - } else { - allowBlockCollections = false; - } - } - } - - if (allowBlockCollections) { - allowBlockCollections = atNewLine || allowCompact; - } - - if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) { - if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) { - flowIndent = parentIndent; - } else { - flowIndent = parentIndent + 1; - } - - blockIndent = state.position - state.lineStart; - - if (indentStatus === 1) { - if (allowBlockCollections && - (readBlockSequence(state, blockIndent) || - readBlockMapping(state, blockIndent, flowIndent)) || - readFlowCollection(state, flowIndent)) { - hasContent = true; - } else { - if ((allowBlockScalars && readBlockScalar(state, flowIndent)) || - readSingleQuotedScalar(state, flowIndent) || - readDoubleQuotedScalar(state, flowIndent)) { - hasContent = true; - - } else if (readAlias(state)) { - hasContent = true; - - if (state.tag !== null || state.anchor !== null) { - throwError(state, 'alias node should not have any properties'); - } - - } else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) { - hasContent = true; - - if (state.tag === null) { - state.tag = '?'; - } - } - - if (state.anchor !== null) { - state.anchorMap[state.anchor] = state.result; - } - } - } else if (indentStatus === 0) { - // Special case: block sequences are allowed to have same indentation level as the parent. - // http://www.yaml.org/spec/1.2/spec.html#id2799784 - hasContent = allowBlockCollections && readBlockSequence(state, blockIndent); - } - } - - if (state.tag === null) { - if (state.anchor !== null) { - state.anchorMap[state.anchor] = state.result; - } - - } else if (state.tag === '?') { - // Implicit resolving is not allowed for non-scalar types, and '?' - // non-specific tag is only automatically assigned to plain scalars. - // - // We only need to check kind conformity in case user explicitly assigns '?' - // tag, for example like this: "! [0]" - // - if (state.result !== null && state.kind !== 'scalar') { - throwError(state, 'unacceptable node kind for ! tag; it should be "scalar", not "' + state.kind + '"'); - } - - for (typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) { - type = state.implicitTypes[typeIndex]; - - if (type.resolve(state.result)) { // `state.result` updated in resolver if matched - state.result = type.construct(state.result); - state.tag = type.tag; - if (state.anchor !== null) { - state.anchorMap[state.anchor] = state.result; - } - break; - } - } - } else if (state.tag !== '!') { - if (_hasOwnProperty$1.call(state.typeMap[state.kind || 'fallback'], state.tag)) { - type = state.typeMap[state.kind || 'fallback'][state.tag]; - } else { - // looking for multi type - type = null; - typeList = state.typeMap.multi[state.kind || 'fallback']; - - for (typeIndex = 0, typeQuantity = typeList.length; typeIndex < typeQuantity; typeIndex += 1) { - if (state.tag.slice(0, typeList[typeIndex].tag.length) === typeList[typeIndex].tag) { - type = typeList[typeIndex]; - break; - } - } - } - - if (!type) { - throwError(state, 'unknown tag !<' + state.tag + '>'); - } - - if (state.result !== null && type.kind !== state.kind) { - throwError(state, 'unacceptable node kind for !<' + state.tag + '> tag; it should be "' + type.kind + '", not "' + state.kind + '"'); - } - - if (!type.resolve(state.result, state.tag)) { // `state.result` updated in resolver if matched - throwError(state, 'cannot resolve a node with !<' + state.tag + '> explicit tag'); - } else { - state.result = type.construct(state.result, state.tag); - if (state.anchor !== null) { - state.anchorMap[state.anchor] = state.result; - } - } - } - - if (state.listener !== null) { - state.listener('close', state); - } - return state.tag !== null || state.anchor !== null || hasContent; -} - -function readDocument(state) { - var documentStart = state.position, - _position, - directiveName, - directiveArgs, - hasDirectives = false, - ch; - - state.version = null; - state.checkLineBreaks = state.legacy; - state.tagMap = Object.create(null); - state.anchorMap = Object.create(null); - - while ((ch = state.input.charCodeAt(state.position)) !== 0) { - skipSeparationSpace(state, true, -1); - - ch = state.input.charCodeAt(state.position); - - if (state.lineIndent > 0 || ch !== 0x25/* % */) { - break; - } - - hasDirectives = true; - ch = state.input.charCodeAt(++state.position); - _position = state.position; - - while (ch !== 0 && !is_WS_OR_EOL(ch)) { - ch = state.input.charCodeAt(++state.position); - } - - directiveName = state.input.slice(_position, state.position); - directiveArgs = []; - - if (directiveName.length < 1) { - throwError(state, 'directive name must not be less than one character in length'); - } - - while (ch !== 0) { - while (is_WHITE_SPACE(ch)) { - ch = state.input.charCodeAt(++state.position); - } - - if (ch === 0x23/* # */) { - do { ch = state.input.charCodeAt(++state.position); } - while (ch !== 0 && !is_EOL(ch)); - break; - } - - if (is_EOL(ch)) break; - - _position = state.position; - - while (ch !== 0 && !is_WS_OR_EOL(ch)) { - ch = state.input.charCodeAt(++state.position); - } - - directiveArgs.push(state.input.slice(_position, state.position)); - } - - if (ch !== 0) readLineBreak(state); - - if (_hasOwnProperty$1.call(directiveHandlers, directiveName)) { - directiveHandlers[directiveName](state, directiveName, directiveArgs); - } else { - throwWarning(state, 'unknown document directive "' + directiveName + '"'); - } - } - - skipSeparationSpace(state, true, -1); - - if (state.lineIndent === 0 && - state.input.charCodeAt(state.position) === 0x2D/* - */ && - state.input.charCodeAt(state.position + 1) === 0x2D/* - */ && - state.input.charCodeAt(state.position + 2) === 0x2D/* - */) { - state.position += 3; - skipSeparationSpace(state, true, -1); - - } else if (hasDirectives) { - throwError(state, 'directives end mark is expected'); - } - - composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true); - skipSeparationSpace(state, true, -1); - - if (state.checkLineBreaks && - PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) { - throwWarning(state, 'non-ASCII line breaks are interpreted as content'); - } - - state.documents.push(state.result); - - if (state.position === state.lineStart && testDocumentSeparator(state)) { - - if (state.input.charCodeAt(state.position) === 0x2E/* . */) { - state.position += 3; - skipSeparationSpace(state, true, -1); - } - return; - } - - if (state.position < (state.length - 1)) { - throwError(state, 'end of the stream or a document separator is expected'); - } else { - return; - } -} - - -function loadDocuments(input, options) { - input = String(input); - options = options || {}; - - if (input.length !== 0) { - - // Add tailing `\n` if not exists - if (input.charCodeAt(input.length - 1) !== 0x0A/* LF */ && - input.charCodeAt(input.length - 1) !== 0x0D/* CR */) { - input += '\n'; - } - - // Strip BOM - if (input.charCodeAt(0) === 0xFEFF) { - input = input.slice(1); - } - } - - var state = new State$1(input, options); - - var nullpos = input.indexOf('\0'); - - if (nullpos !== -1) { - state.position = nullpos; - throwError(state, 'null byte is not allowed in input'); - } - - // Use 0 as string terminator. That significantly simplifies bounds check. - state.input += '\0'; - - while (state.input.charCodeAt(state.position) === 0x20/* Space */) { - state.lineIndent += 1; - state.position += 1; - } - - while (state.position < (state.length - 1)) { - readDocument(state); - } - - return state.documents; -} - - -function loadAll$1(input, iterator, options) { - if (iterator !== null && typeof iterator === 'object' && typeof options === 'undefined') { - options = iterator; - iterator = null; - } - - var documents = loadDocuments(input, options); - - if (typeof iterator !== 'function') { - return documents; - } - - for (var index = 0, length = documents.length; index < length; index += 1) { - iterator(documents[index]); - } +/*! js-yaml 5.4.1 https://github.com/nodeca/js-yaml @license MIT */ +//#region src/tag.ts +/** +* Returned by a scalar resolver when the source does not match its tag. +* +* @category Tags +*/ +var NOT_RESOLVED = Symbol("NOT_RESOLVED"); +/** +* Create a normalized scalar tag definition. +* +* @category Tags +*/ +function defineScalarTag(tagName, options) { + return { + tagName, + nodeKind: "scalar", + implicit: options.implicit ?? false, + matchByTagPrefix: options.matchByTagPrefix ?? false, + implicitFirstChars: options.implicitFirstChars ?? null, + resolve: options.resolve, + identify: options.identify, + represent: options.represent ?? ((data) => String(data)), + representTagName: options.representTagName ?? (() => tagName) + }; +} +/** +* Create a normalized sequence tag definition. +* +* @category Tags +*/ +function defineSequenceTag(tagName, options) { + const carrierIsResult = options.finalize === void 0; + return { + tagName, + nodeKind: "sequence", + implicit: false, + matchByTagPrefix: options.matchByTagPrefix ?? false, + create: options.create, + addItem: options.addItem, + finalize: options.finalize ?? ((carrier) => carrier), + carrierIsResult, + identify: options.identify, + represent: options.represent ?? ((data) => data), + representTagName: options.representTagName ?? (() => tagName) + }; +} +/** +* Create a normalized mapping tag definition. +* +* @category Tags +*/ +function defineMappingTag(tagName, options) { + const carrierIsResult = options.finalize === void 0; + return { + tagName, + nodeKind: "mapping", + implicit: false, + matchByTagPrefix: options.matchByTagPrefix ?? false, + create: options.create, + addPair: options.addPair, + has: options.has, + keys: options.keys, + get: options.get, + finalize: options.finalize ?? ((carrier) => carrier), + carrierIsResult, + identify: options.identify, + represent: options.represent ?? ((data) => data), + representTagName: options.representTagName ?? (() => tagName) + }; +} +//#endregion +//#region src/tag/scalar/str.ts +/** @category Tags */ +var strTag = defineScalarTag("tag:yaml.org,2002:str", { + resolve: (source) => source, + identify: (data) => typeof data === "string" +}); +//#endregion +//#region src/tag/scalar/null_core.ts +var NULL_VALUES$1 = [ + "", + "~", + "null", + "Null", + "NULL" +]; +/** @category Tags */ +var nullCoreTag = defineScalarTag("tag:yaml.org,2002:null", { + implicit: true, + implicitFirstChars: [ + "", + "~", + "n", + "N" + ], + resolve: (source) => { + if (NULL_VALUES$1.indexOf(source) !== -1) return null; + return NOT_RESOLVED; + }, + identify: (object) => object === null, + represent: () => "null" +}); +//#endregion +//#region src/tag/scalar/null_json.ts +/** @category Tags */ +var nullJsonTag = defineScalarTag("tag:yaml.org,2002:null", { + implicit: true, + implicitFirstChars: ["n"], + resolve: (source, isExplicit) => { + if (source === "null" || isExplicit && source === "") return null; + return NOT_RESOLVED; + }, + identify: (object) => object === null, + represent: () => "null" +}); +//#endregion +//#region src/tag/scalar/null_yaml11.ts +var NULL_VALUES = [ + "", + "~", + "null", + "Null", + "NULL" +]; +/** @category Tags */ +var nullYaml11Tag = defineScalarTag("tag:yaml.org,2002:null", { + implicit: true, + implicitFirstChars: [ + "", + "~", + "n", + "N" + ], + resolve: (source) => { + if (NULL_VALUES.indexOf(source) !== -1) return null; + return NOT_RESOLVED; + }, + identify: (object) => object === null, + represent: () => "null" +}); +//#endregion +//#region src/tag/scalar/bool_core.ts +var TRUE_VALUES$2 = [ + "true", + "True", + "TRUE" +]; +var FALSE_VALUES$2 = [ + "false", + "False", + "FALSE" +]; +/** @category Tags */ +var boolCoreTag = defineScalarTag("tag:yaml.org,2002:bool", { + implicit: true, + implicitFirstChars: [ + "t", + "T", + "f", + "F" + ], + resolve: (source) => { + if (TRUE_VALUES$2.indexOf(source) !== -1) return true; + if (FALSE_VALUES$2.indexOf(source) !== -1) return false; + return NOT_RESOLVED; + }, + identify: (object) => Object.prototype.toString.call(object) === "[object Boolean]", + represent: (object) => object ? "true" : "false" +}); +//#endregion +//#region src/tag/scalar/bool_json.ts +var TRUE_VALUES$1 = ["true"]; +var FALSE_VALUES$1 = ["false"]; +/** @category Tags */ +var boolJsonTag = defineScalarTag("tag:yaml.org,2002:bool", { + implicit: true, + implicitFirstChars: ["t", "f"], + resolve: (source) => { + if (TRUE_VALUES$1.indexOf(source) !== -1) return true; + if (FALSE_VALUES$1.indexOf(source) !== -1) return false; + return NOT_RESOLVED; + }, + identify: (object) => Object.prototype.toString.call(object) === "[object Boolean]", + represent: (object) => object ? "true" : "false" +}); +//#endregion +//#region src/tag/scalar/bool_yaml11.ts +var TRUE_VALUES = [ + "true", + "True", + "TRUE", + "y", + "Y", + "yes", + "Yes", + "YES", + "on", + "On", + "ON" +]; +var FALSE_VALUES = [ + "false", + "False", + "FALSE", + "n", + "N", + "no", + "No", + "NO", + "off", + "Off", + "OFF" +]; +/** @category Tags */ +var boolYaml11Tag = defineScalarTag("tag:yaml.org,2002:bool", { + implicit: true, + implicitFirstChars: [ + "y", + "Y", + "n", + "N", + "t", + "T", + "f", + "F", + "o", + "O" + ], + resolve: (source) => { + if (TRUE_VALUES.indexOf(source) !== -1) return true; + if (FALSE_VALUES.indexOf(source) !== -1) return false; + return NOT_RESOLVED; + }, + identify: (object) => Object.prototype.toString.call(object) === "[object Boolean]", + represent: (object) => object ? "true" : "false" +}); +//#endregion +//#region src/tag/scalar/int_core.ts +var YAML_INTEGER_IMPLICIT_PATTERN$1 = /* @__PURE__ */ new RegExp("^(?:0o[0-7]+|0x[0-9a-fA-F]+|[-+]?[0-9]+)$"); +var YAML_INTEGER_EXPLICIT_PATTERN$1 = /* @__PURE__ */ new RegExp("^(?:[-+]?0b[0-1]+|[-+]?0o[0-7]+|[-+]?0x[0-9a-fA-F]+|[-+]?[0-9]+)$"); +function parseYamlInteger$2(source) { + let value = source; + let sign = 1; + if (value[0] === "-" || value[0] === "+") { + if (value[0] === "-") sign = -1; + value = value.slice(1); + } + if (value.startsWith("0b")) return sign * parseInt(value.slice(2), 2); + if (value.startsWith("0o")) return sign * parseInt(value.slice(2), 8); + if (value.startsWith("0x")) return sign * parseInt(value.slice(2), 16); + return sign * parseInt(value, 10); +} +function resolveYamlInteger$2(source, isExplicit) { + if (isExplicit) { + if (!YAML_INTEGER_EXPLICIT_PATTERN$1.test(source)) return NOT_RESOLVED; + } else if (!YAML_INTEGER_IMPLICIT_PATTERN$1.test(source)) return NOT_RESOLVED; + const result = parseYamlInteger$2(source); + return Number.isFinite(result) ? result : NOT_RESOLVED; +} +/** @category Tags */ +var intCoreTag = defineScalarTag("tag:yaml.org,2002:int", { + implicit: true, + implicitFirstChars: [ + "-", + "+", + ..."0123456789" + ], + resolve: resolveYamlInteger$2, + identify: (object) => Number.isInteger(object) && !Object.is(object, -0) && object.toString(10).indexOf("e") < 0, + represent: (object) => object.toString(10) +}); +//#endregion +//#region src/tag/scalar/int_json.ts +var YAML_INTEGER_IMPLICIT_PATTERN = /* @__PURE__ */ new RegExp("^-?(?:0|[1-9][0-9]*)$"); +var YAML_INTEGER_EXPLICIT_PATTERN = /* @__PURE__ */ new RegExp("^(?:[-+]?0b[0-1]+|[-+]?0o[0-7]+|[-+]?0x[0-9a-fA-F]+|[-+]?[0-9]+)$"); +function parseYamlInteger$1(source) { + let value = source; + let sign = 1; + if (value[0] === "-" || value[0] === "+") { + if (value[0] === "-") sign = -1; + value = value.slice(1); + } + if (value.startsWith("0b")) return sign * parseInt(value.slice(2), 2); + if (value.startsWith("0o")) return sign * parseInt(value.slice(2), 8); + if (value.startsWith("0x")) return sign * parseInt(value.slice(2), 16); + return sign * parseInt(value, 10); +} +function resolveYamlInteger$1(source, isExplicit) { + if (isExplicit) { + if (!YAML_INTEGER_EXPLICIT_PATTERN.test(source)) return NOT_RESOLVED; + } else if (!YAML_INTEGER_IMPLICIT_PATTERN.test(source)) return NOT_RESOLVED; + const result = parseYamlInteger$1(source); + return Number.isFinite(result) ? result : NOT_RESOLVED; +} +/** @category Tags */ +var intJsonTag = defineScalarTag("tag:yaml.org,2002:int", { + implicit: true, + implicitFirstChars: ["-", ..."0123456789"], + resolve: resolveYamlInteger$1, + identify: (object) => Number.isInteger(object) && !Object.is(object, -0) && object.toString(10).indexOf("e") < 0, + represent: (object) => object.toString(10) +}); +//#endregion +//#region src/tag/scalar/int_yaml11.ts +var YAML_INTEGER_PATTERN = /* @__PURE__ */ new RegExp("^(?:[-+]?0b[0-1_]+|[-+]?0[0-7_]+|[-+]?0x[0-9a-fA-F_]+|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+|[-+]?(?:0|[1-9][0-9_]*))$"); +function parseYamlInteger(source) { + let value = source.replace(/_/g, ""); + let sign = 1; + if (value[0] === "-" || value[0] === "+") { + if (value[0] === "-") sign = -1; + value = value.slice(1); + } + if (value.startsWith("0b")) return sign * parseInt(value.slice(2), 2); + if (value.startsWith("0x")) return sign * parseInt(value.slice(2), 16); + if (value.includes(":")) { + let result = 0; + for (const part of value.split(":")) result = result * 60 + Number(part); + return sign * result; + } + if (value !== "0" && value[0] === "0") return sign * parseInt(value, 8); + return sign * parseInt(value, 10); +} +function resolveYamlInteger(source) { + if (!YAML_INTEGER_PATTERN.test(source)) return NOT_RESOLVED; + const result = parseYamlInteger(source); + return Number.isFinite(result) ? result : NOT_RESOLVED; +} +/** @category Tags */ +var intYaml11Tag = defineScalarTag("tag:yaml.org,2002:int", { + implicit: true, + implicitFirstChars: [ + "-", + "+", + ..."0123456789" + ], + resolve: resolveYamlInteger, + identify: (object) => Number.isInteger(object) && !Object.is(object, -0) && object.toString(10).indexOf("e") < 0, + represent: (object) => object.toString(10) +}); +//#endregion +//#region src/tag/scalar/float_core.ts +var YAML_FLOAT_PATTERN$1 = /* @__PURE__ */ new RegExp("^(?:[-+]?[0-9]+(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|[-+]?\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"); +var YAML_FLOAT_SPECIAL_PATTERN$1 = /* @__PURE__ */ new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"); +function resolveYamlFloat$2(source) { + if (!YAML_FLOAT_PATTERN$1.test(source)) return NOT_RESOLVED; + let value = source.toLowerCase(); + const sign = value[0] === "-" ? -1 : 1; + if ("+-".includes(value[0])) value = value.slice(1); + if (value === ".inf") return sign === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY; + if (value === ".nan") return NaN; + const result = sign * parseFloat(value); + if (Number.isFinite(result) || YAML_FLOAT_SPECIAL_PATTERN$1.test(source)) return result; + return NOT_RESOLVED; +} +function representYamlFloat$2(object) { + if (isNaN(object)) return ".nan"; + if (object === Number.POSITIVE_INFINITY) return ".inf"; + if (object === Number.NEGATIVE_INFINITY) return "-.inf"; + if (Object.is(object, -0)) return "-0.0"; + const result = object.toString(10); + return /^[-+]?[0-9]+e/.test(result) ? result.replace("e", ".e") : result; +} +/** @category Tags */ +var floatCoreTag = defineScalarTag("tag:yaml.org,2002:float", { + implicit: true, + implicitFirstChars: [ + "-", + "+", + ".", + ..."0123456789" + ], + resolve: resolveYamlFloat$2, + identify: (object) => typeof object === "number" && (!Number.isInteger(object) || Object.is(object, -0) || object.toString(10).indexOf("e") >= 0), + represent: representYamlFloat$2 +}); +//#endregion +//#region src/tag/scalar/float_json.ts +var YAML_FLOAT_IMPLICIT_PATTERN = /* @__PURE__ */ new RegExp("^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$"); +var YAML_FLOAT_EXPLICIT_PATTERN = /* @__PURE__ */ new RegExp("^(?:[-+]?[0-9]+(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|[-+]?\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"); +function resolveYamlFloat$1(source, isExplicit) { + if (isExplicit) { + if (!YAML_FLOAT_EXPLICIT_PATTERN.test(source)) return NOT_RESOLVED; + let value = source.toLowerCase(); + const sign = value[0] === "-" ? -1 : 1; + if ("+-".includes(value[0])) value = value.slice(1); + if (value === ".inf") return sign === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY; + if (value === ".nan") return NaN; + const result = sign * parseFloat(value); + return Number.isFinite(result) ? result : NOT_RESOLVED; + } + if (!YAML_FLOAT_IMPLICIT_PATTERN.test(source)) return NOT_RESOLVED; + const result = Number(source); + if (Number.isFinite(result)) return result; + return NOT_RESOLVED; +} +function representYamlFloat$1(object) { + if (isNaN(object)) return ".nan"; + if (object === Number.POSITIVE_INFINITY) return ".inf"; + if (object === Number.NEGATIVE_INFINITY) return "-.inf"; + if (Object.is(object, -0)) return "-0.0"; + const result = object.toString(10); + return /^[-+]?[0-9]+e/.test(result) ? result.replace("e", ".e") : result; +} +/** @category Tags */ +var floatJsonTag = defineScalarTag("tag:yaml.org,2002:float", { + implicit: true, + implicitFirstChars: ["-", ..."0123456789"], + resolve: resolveYamlFloat$1, + identify: (object) => typeof object === "number" && (!Number.isInteger(object) || Object.is(object, -0) || object.toString(10).indexOf("e") >= 0), + represent: representYamlFloat$1 +}); +//#endregion +//#region src/tag/scalar/float_yaml11.ts +var YAML_FLOAT_PATTERN = /* @__PURE__ */ new RegExp("^(?:[-+]?(?:(?:[0-9][0-9_]*)?\\.[0-9_]*)(?:[eE][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"); +var YAML_FLOAT_SPECIAL_PATTERN = /* @__PURE__ */ new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"); +function resolveYamlFloat(source) { + if (!YAML_FLOAT_PATTERN.test(source)) return NOT_RESOLVED; + let value = source.toLowerCase().replace(/_/g, ""); + const sign = value[0] === "-" ? -1 : 1; + if ("+-".includes(value[0])) value = value.slice(1); + if (value === ".inf") return sign === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY; + if (value === ".nan") return NaN; + let result = 0; + if (value.includes(":")) { + for (const part of value.split(":")) result = result * 60 + Number(part); + result *= sign; + } else result = sign * parseFloat(value); + if (Number.isFinite(result) || YAML_FLOAT_SPECIAL_PATTERN.test(source)) return result; + return NOT_RESOLVED; +} +function representYamlFloat(object) { + if (isNaN(object)) return ".nan"; + if (object === Number.POSITIVE_INFINITY) return ".inf"; + if (object === Number.NEGATIVE_INFINITY) return "-.inf"; + if (Object.is(object, -0)) return "-0.0"; + const result = object.toString(10); + return /^[-+]?[0-9]+e/.test(result) ? result.replace("e", ".e") : result; +} +/** @category Tags */ +var floatYaml11Tag = defineScalarTag("tag:yaml.org,2002:float", { + implicit: true, + implicitFirstChars: [ + "-", + "+", + ".", + ..."0123456789" + ], + resolve: resolveYamlFloat, + identify: (object) => typeof object === "number" && (!Number.isInteger(object) || Object.is(object, -0) || object.toString(10).indexOf("e") >= 0), + represent: representYamlFloat +}); +//#endregion +//#region src/tag/scalar/merge.ts +/** +* Enables merge keys in {@link CORE_SCHEMA} when added with +* {@link Schema.withTags}. +* +* @category Tags +*/ +var mergeTag = defineScalarTag("tag:yaml.org,2002:merge", { + implicit: true, + implicitFirstChars: ["<"], + resolve: (source, isExplicit) => { + if (source === "<<" || isExplicit && source === "") return "<<"; + return NOT_RESOLVED; + }, + identify: () => false +}); +//#endregion +//#region src/tag/scalar/binary.ts +var BASE64_PATTERN = /^[A-Za-z0-9+/]*={0,2}$/; +function resolveYamlBinary(source) { + const input = source.replace(/\s/g, ""); + if (input.length % 4 !== 0 || !BASE64_PATTERN.test(input)) return NOT_RESOLVED; + const binary = atob(input); + const result = new Uint8Array(binary.length); + for (let index = 0; index < binary.length; index++) result[index] = binary.charCodeAt(index); + return result; +} +function representYamlBinary(object) { + let binary = ""; + for (let index = 0; index < object.length; index++) binary += String.fromCharCode(object[index]); + return btoa(binary); +} +/** +* The `!!binary` tag, represented as a `Uint8Array`. +* +* @category Tags +*/ +var binaryTag = defineScalarTag("tag:yaml.org,2002:binary", { + resolve: resolveYamlBinary, + identify: (object) => Object.prototype.toString.call(object) === "[object Uint8Array]", + represent: representYamlBinary +}); +//#endregion +//#region src/tag/scalar/timestamp.ts +var YAML_DATE_REGEXP = /* @__PURE__ */ new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"); +var YAML_TIMESTAMP_REGEXP = /* @__PURE__ */ new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$"); +function makeUtcDate(year, month, day, hour = 0, minute = 0, second = 0, fraction = 0) { + const date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction)); + date.setUTCFullYear(year, month, day); + return date; +} +function resolveYamlTimestamp(source) { + let match = YAML_DATE_REGEXP.exec(source); + if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(source); + if (match === null) return NOT_RESOLVED; + const year = +match[1]; + const month = +match[2] - 1; + const day = +match[3]; + if (!match[4]) { + const date = makeUtcDate(year, month, day); + if (date.getUTCFullYear() !== year || date.getUTCMonth() !== month || date.getUTCDate() !== day) return NOT_RESOLVED; + return date; + } + const hour = +match[4]; + const minute = +match[5]; + const second = +match[6]; + let fraction = 0; + if (hour > 23 || minute > 59 || second > 59) return NOT_RESOLVED; + if (match[7]) { + let value = match[7].slice(0, 3); + while (value.length < 3) value += "0"; + fraction = +value; + } + const date = makeUtcDate(year, month, day, hour, minute, second, fraction); + if (date.getUTCFullYear() !== year || date.getUTCMonth() !== month || date.getUTCDate() !== day) return NOT_RESOLVED; + if (match[9]) { + const offsetHour = +match[10]; + const offsetMinute = +(match[11] || 0); + if (offsetHour > 23 || offsetMinute > 59) return NOT_RESOLVED; + const offset = (offsetHour * 60 + offsetMinute) * 6e4; + date.setTime(date.getTime() - (match[9] === "-" ? -offset : offset)); + } + return date; +} +/** +* The YAML 1.1 `!!timestamp` tag, represented as a JavaScript `Date`. +* +* @category Tags +*/ +var timestampTag = defineScalarTag("tag:yaml.org,2002:timestamp", { + implicit: true, + implicitFirstChars: [..."0123456789"], + resolve: resolveYamlTimestamp, + identify: (object) => object instanceof Date, + represent: (object) => object.toISOString() +}); +//#endregion +//#region src/tag/sequence/seq.ts +/** @category Tags */ +var seqTag = defineSequenceTag("tag:yaml.org,2002:seq", { + create: () => [], + addItem: (container, item) => { + container.push(item); + }, + identify: Array.isArray +}); +//#endregion +//#region src/common/object.ts +function isPlainObject(data) { + if (data === null || typeof data !== "object" || Array.isArray(data)) return false; + const prototype = Object.getPrototypeOf(data); + return prototype === null || prototype === Object.prototype; +} +function pick(object, keys) { + const result = {}; + for (const key of keys) if (object[key] !== void 0) result[key] = object[key]; + return result; +} +//#endregion +//#region src/tag/sequence/omap.ts +/** +* Provided only for YAML 1.1 compatibility and supported by the loader only. +* JavaScript has no dedicated class to represent this type, so it cannot be +* identified and dumped. +* +* ```yaml +* !!omap +* - one: 1 +* - two: 2 +* ``` +* +* is loaded as +* +* ```javascript +* [ +* { one: 1 }, +* { two: 2 } +* ] +* ``` +* +* @category Tags +*/ +var omapTag = defineSequenceTag("tag:yaml.org,2002:omap", { + create: () => ({ + list: [], + seen: /* @__PURE__ */ new Set() + }), + addItem: (carrier, item) => { + let key; + if (item instanceof Map) { + if (item.size !== 1) return "cannot resolve an ordered map item"; + key = item.keys().next().value; + } else if (isPlainObject(item)) { + const itemKeys = Object.keys(item); + if (itemKeys.length !== 1) return "cannot resolve an ordered map item"; + key = itemKeys[0]; + } else return "cannot resolve an ordered map item"; + if (carrier.seen.has(key)) return "duplicate key in ordered map"; + carrier.seen.add(key); + carrier.list.push(item); + return ""; + }, + finalize: (carrier) => carrier.list, + identify: () => false +}); +//#endregion +//#region src/tag/sequence/pairs.ts +/** +* Provided only for YAML 1.1 compatibility and supported by the loader only. +* JavaScript has no dedicated class to represent this type, so it cannot be +* identified and dumped. +* +* ```yaml +* !!pairs +* - one: 1 +* - two: 2 +* ``` +* +* is loaded as +* +* ```javascript +* [ +* ['one', 1], +* ['two', 2] +* ] +* ``` +* +* @category Tags +*/ +var pairsTag = defineSequenceTag("tag:yaml.org,2002:pairs", { + create: () => [], + addItem: (container, item) => { + if (item instanceof Map) { + if (item.size !== 1) return "cannot resolve a pairs item"; + container.push(item.entries().next().value); + return ""; + } + if (Object.prototype.toString.call(item) !== "[object Object]") return "cannot resolve a pairs item"; + const object = item; + const keys = Object.keys(object); + if (keys.length !== 1) return "cannot resolve a pairs item"; + container.push([keys[0], object[keys[0]]]); + return ""; + }, + identify: () => false +}); +//#endregion +//#region src/tag/mapping/map.ts +/** +* This is the default mapping implementation. It uses `{}` objects and has only +* partial functionality due to language limitations. This choice was made +* because users expect to get JavaScript objects, and it was left unchanged to +* avoid too many breaking changes in the v5 release. +* +* Side effects: +* +* - `Object.hasOwn()` checks or `for...of` loops are required for safe use (to +* avoid falling through to prototypes). +* - Only scalar string keys are supported properly. +* - Other scalar keys, such as `null` and numbers, are converted to strings. +* This is historical behaviour, and it can cause side effects such as +* problems with `!!merge`. +* +* Note that non-string scalar keys may be deprecated in future versions. +* +* Ideally, use {@link realMapTag} instead. +* +* @category Tags +*/ +var mapTag = defineMappingTag("tag:yaml.org,2002:map", { + create: () => ({}), + identify: isPlainObject, + represent: (o) => { + const map = /* @__PURE__ */ new Map(); + for (const key of Object.keys(o)) map.set(key, o[key]); + return map; + }, + addPair: (container, key, value) => { + if (key !== null && typeof key === "object") return "object-based map does not support complex keys"; + const normalizedKey = String(key); + if (normalizedKey === "__proto__") Object.defineProperty(container, normalizedKey, { + value, + enumerable: true, + configurable: true, + writable: true + }); + else container[normalizedKey] = value; + return ""; + }, + has: (container, key) => { + if (key !== null && typeof key === "object") return false; + return Object.prototype.hasOwnProperty.call(container, String(key)); + }, + keys: (container) => Object.keys(container), + get: (container, key) => { + const normalizedKey = String(key); + if (!Object.prototype.hasOwnProperty.call(container, normalizedKey)) return null; + return container[normalizedKey]; + } +}); +//#endregion +//#region src/tag/mapping/set.ts +/** +* The YAML 1.1 `!!set` tag, represented as a JavaScript `Set`. +* +* @category Tags +*/ +var setTag = defineMappingTag("tag:yaml.org,2002:set", { + create: () => /* @__PURE__ */ new Set(), + identify: (data) => data instanceof Set, + represent: (data) => { + const map = /* @__PURE__ */ new Map(); + for (const key of data) map.set(key, null); + return map; + }, + addPair: (container, key, value) => { + if (value !== null) return "cannot resolve a set item"; + container.add(key); + return ""; + }, + has: (container, key) => container.has(key), + keys: (container) => container.keys(), + get: () => null +}); +//#endregion +//#region src/schema.ts +function createTagDefinitionMap() { + return { + scalar: Object.create(null), + sequence: Object.create(null), + mapping: Object.create(null) + }; +} +function createTagDefinitionListMap() { + return { + scalar: [], + sequence: [], + mapping: [] + }; +} +function compileTags(tags) { + const result = []; + for (const tag of tags) { + let index = result.length; + for (let previousIndex = 0; previousIndex < result.length; previousIndex++) { + const previous = result[previousIndex]; + if (previous.nodeKind === tag.nodeKind && previous.tagName === tag.tagName && previous.matchByTagPrefix === tag.matchByTagPrefix) { + index = previousIndex; + break; + } + } + result[index] = tag; + } + return result; +} +/** +* Controls tag resolution when loading and type selection when dumping. +* +* @category Schemas +*/ +var Schema = class Schema { + tags; + /** @internal */ + implicitScalarTags; + /** + * Dispatch implicit scalar resolvers by `source.charAt(0)`. Each bucket holds + * the resolvers that may match that key, in schema order; a key absent from + * the map uses + * {@link Schema.implicitScalarAnyFirstChar} + * (resolvers that declared no first-char constraint, so they apply to any + * first character). + */ + implicitScalarByFirstChar; + implicitScalarAnyFirstChar; + /** + * The default scalar tag (`!!str`), resolved once so the composer's fallback + * for unresolved plain scalars avoids a keyed lookup per scalar. + * + * @internal + */ + defaultScalarTag; + /** + * The default container tags (`!!seq` / `!!map`), used by the dumper: when a + * value is identified by its default tag, the tag is implicit and not + * printed. Undefined if the schema does not define them (then such values + * can't be dumped). + * + * @internal + */ + defaultSequenceTag; + /** @internal */ + defaultMappingTag; + exact; + prefix; + constructor(tags) { + const compiledTags = compileTags(tags); + const implicitScalarTags = []; + const exact = createTagDefinitionMap(); + const prefix = createTagDefinitionListMap(); + for (const tag of compiledTags) { + if (tag.nodeKind === "scalar" && tag.implicit) { + if (tag.matchByTagPrefix) throw new Error("Implicit scalar tags cannot match by tag prefix"); + implicitScalarTags.push(tag); + } + switch (tag.nodeKind) { + case "scalar": + if (tag.matchByTagPrefix) prefix.scalar.push(tag); + else exact.scalar[tag.tagName] = tag; + break; + case "sequence": + if (tag.matchByTagPrefix) prefix.sequence.push(tag); + else exact.sequence[tag.tagName] = tag; + break; + case "mapping": + if (tag.matchByTagPrefix) prefix.mapping.push(tag); + else exact.mapping[tag.tagName] = tag; + break; + } + } + const implicitScalarAnyFirstChar = implicitScalarTags.filter((tag) => tag.implicitFirstChars === null); + const keys = /* @__PURE__ */ new Set(); + for (const tag of implicitScalarTags) if (tag.implicitFirstChars !== null) for (const key of tag.implicitFirstChars) keys.add(key); + const implicitScalarByFirstChar = /* @__PURE__ */ new Map(); + for (const key of keys) implicitScalarByFirstChar.set(key, implicitScalarTags.filter((tag) => tag.implicitFirstChars === null || tag.implicitFirstChars.indexOf(key) !== -1)); + const defaultScalarTag = exact.scalar["tag:yaml.org,2002:str"]; + if (!defaultScalarTag) throw new Error("schema does not define the default scalar tag (tag:yaml.org,2002:str)"); + this.tags = compiledTags; + this.implicitScalarTags = implicitScalarTags; + this.implicitScalarByFirstChar = implicitScalarByFirstChar; + this.implicitScalarAnyFirstChar = implicitScalarAnyFirstChar; + this.defaultScalarTag = defaultScalarTag; + this.defaultSequenceTag = exact.sequence["tag:yaml.org,2002:seq"]; + this.defaultMappingTag = exact.mapping["tag:yaml.org,2002:map"]; + this.exact = exact; + this.prefix = prefix; + } + /** @internal */ + lookupScalarTag(tagName) { + const exactTag = this.exact.scalar[tagName]; + if (exactTag) return exactTag; + for (const tag of this.prefix.scalar) if (tagName.startsWith(tag.tagName)) return tag; + } + /** @internal */ + lookupSequenceTag(tagName) { + const exactTag = this.exact.sequence[tagName]; + if (exactTag) return exactTag; + for (const tag of this.prefix.sequence) if (tagName.startsWith(tag.tagName)) return tag; + } + /** @internal */ + lookupMappingTag(tagName) { + const exactTag = this.exact.mapping[tagName]; + if (exactTag) return exactTag; + for (const tag of this.prefix.mapping) if (tagName.startsWith(tag.tagName)) return tag; + } + /** @internal */ + resolveImplicitScalarTag(source) { + const candidates = this.implicitScalarByFirstChar.get(source.charAt(0)) ?? this.implicitScalarAnyFirstChar; + for (const tag of candidates) { + const value = tag.resolve(source, false, tag.tagName); + if (value !== NOT_RESOLVED) return { + value, + tag + }; + } + const tag = this.defaultScalarTag; + return { + value: tag.resolve(source, false, tag.tagName), + tag + }; + } + /** + * Creates a new schema with the specified tags added. If a tag already + * exists, it is replaced by the specified tag. + * + * @example + * + * ```javascript + * import { CORE_SCHEMA, mergeTag, realMapTag } from 'js-yaml' + * + * const schema = CORE_SCHEMA.withTags(mergeTag, realMapTag) + * ``` + */ + withTags(...tags) { + let flatTags = []; + for (const tag of tags) flatTags = flatTags.concat(tag); + return new Schema([...this.tags, ...flatTags]); + } +}; +/** +* The YAML 1.2 Failsafe Schema: strings, sequences, and mappings. +* +* @category Schemas +*/ +var FAILSAFE_SCHEMA = new Schema([ + strTag, + seqTag, + mapTag +]); +/** +* The YAML 1.2 JSON Schema. It uses JSON scalar forms while retaining YAML +* collection syntax. +* +* @category Schemas +*/ +var JSON_SCHEMA = new Schema([ + ...FAILSAFE_SCHEMA.tags, + nullJsonTag, + boolJsonTag, + intJsonTag, + floatJsonTag +]); +/** +* The default schema for the loaders. Note, {@link CORE_SCHEMA} comes +* without the `!!merge` tag. You can easily enable it if needed. +* +* @example +* Enable {@link mergeTag}: +* +* ```javascript +* import { load, CORE_SCHEMA, mergeTag } from 'js-yaml' +* +* try { +* load(data, { schema: CORE_SCHEMA.withTags(mergeTag) }) +* } catch (e) { +* console.error(e) +* } +* ``` +* +* @category Schemas +*/ +var CORE_SCHEMA = new Schema([ + ...FAILSAFE_SCHEMA.tags, + nullCoreTag, + boolCoreTag, + intCoreTag, + floatCoreTag +]); +/** +* YAML 1.1-compatible schema. +* +* @category Schemas +*/ +var YAML11_SCHEMA = new Schema([ + ...FAILSAFE_SCHEMA.tags, + nullYaml11Tag, + boolYaml11Tag, + intYaml11Tag, + floatYaml11Tag, + timestampTag, + mergeTag, + binaryTag, + omapTag, + pairsTag, + setTag +]); +/** +* The dumper schema for maximum compatibility. It combines all supported type +* variants from YAML 1.1 and YAML 1.2 so strings matching any of them are +* quoted. This makes the generated YAML more compatible with other parsers. +* +* The schema is based on YAML 1.1, but extends `!!int` and `!!float` to accept +* both YAML 1.1 and Core Schema forms, since Core Schema supports some forms +* that YAML 1.1 does not. +* +* @category Schemas +*/ +var DUMP_SCHEMA = YAML11_SCHEMA.withTags({ + ...intYaml11Tag, + resolve: (source, isExplicit, tagName) => { + const result = intYaml11Tag.resolve(source, isExplicit, tagName); + return result === NOT_RESOLVED ? intCoreTag.resolve(source, isExplicit, tagName) : result; + } +}, { + ...floatYaml11Tag, + resolve: (source, isExplicit, tagName) => { + const result = floatYaml11Tag.resolve(source, isExplicit, tagName); + return result === NOT_RESOLVED ? floatCoreTag.resolve(source, isExplicit, tagName) : result; + } +}); +//#endregion +//#region src/tag/mapping/real_map.ts +/** +* Recommended when non-string keys are actually needed. It uses native +* JavaScript `Map` objects, so keys keep their constructed types instead of +* being converted to strings. +* +* It is not the default to avoid widespread breaking changes in existing +* projects. `Map` has a different access API and does not pass deep equality +* checks against `{}`-based fixtures. Alongside the other changes in v5, +* making it the default was considered too disruptive. +* +* If these differences are acceptable for your project, we recommend using +* {@link realMapTag} to guarantee the absence of problems and side effects. +* +* @example +* Enable {@link realMapTag}: +* +* ```javascript +* import { load, CORE_SCHEMA, realMapTag } from 'js-yaml' +* +* try { +* load(data, { schema: CORE_SCHEMA.withTags(realMapTag) }) +* } catch (e) { +* console.error(e) +* } +* ``` +* +* @category Tags +*/ +var realMapTag = defineMappingTag("tag:yaml.org,2002:map", { + create: () => /* @__PURE__ */ new Map(), + addPair: (container, key, value) => { + container.set(key, value); + return ""; + }, + has: (container, key) => container.has(key), + keys: (container) => container.keys(), + get: (container, key) => container.get(key), + identify: (data) => data instanceof Map || isPlainObject(data), + represent: (data) => { + if (data instanceof Map) return data; + const map = /* @__PURE__ */ new Map(); + const obj = data; + for (const key of Object.keys(obj)) map.set(key, obj[key]); + return map; + } +}); +//#endregion +//#region src/tag/mapping/legacy_map.ts +function normalizeKey(key) { + if (Array.isArray(key)) { + const array = Array.prototype.slice.call(key); + for (let index = 0; index < array.length; index++) { + if (Array.isArray(array[index])) return null; + if (typeof array[index] === "object" && Object.prototype.toString.call(array[index]) === "[object Object]") array[index] = "[object Object]"; + } + return String(array); + } + if (typeof key === "object" && Object.prototype.toString.call(key) === "[object Object]") return "[object Object]"; + return String(key); +} +/** +* This implementation exists solely to reproduce v4 behavior exactly. Its use +* is strongly discouraged. If complex or non-string keys are needed, use +* {@link realMapTag} instead. +* +* @category Tags +*/ +var legacyMapTag = defineMappingTag("tag:yaml.org,2002:map", { + create: () => ({}), + identify: isPlainObject, + represent: (o) => { + const map = /* @__PURE__ */ new Map(); + for (const key of Object.keys(o)) map.set(key, o[key]); + return map; + }, + addPair: (container, key, value) => { + const normalizedKey = normalizeKey(key); + if (normalizedKey === null) return "nested arrays are not supported inside keys"; + if (normalizedKey === "__proto__") Object.defineProperty(container, normalizedKey, { + value, + enumerable: true, + configurable: true, + writable: true + }); + else container[normalizedKey] = value; + return ""; + }, + has: (container, key) => { + const normalizedKey = normalizeKey(key); + return normalizedKey !== null && Object.prototype.hasOwnProperty.call(container, normalizedKey); + }, + keys: (container) => Object.keys(container), + get: (container, key) => { + const normalizedKey = String(key); + if (!Object.prototype.hasOwnProperty.call(container, normalizedKey)) return null; + return container[normalizedKey]; + } +}); +//#endregion +//#region src/common/snippet.ts +var DEFAULT_SNIPPET_OPTIONS = { + maxLength: 79, + indent: 1, + linesBefore: 3, + linesAfter: 2 +}; +function getLine(buffer, lineStart, lineEnd, position, maxLineLength) { + let head = ""; + let tail = ""; + const maxHalfLength = Math.floor(maxLineLength / 2) - 1; + if (position - lineStart > maxHalfLength) { + head = " ... "; + lineStart = position - maxHalfLength + head.length; + } + if (lineEnd - position > maxHalfLength) { + tail = " ..."; + lineEnd = position + maxHalfLength - tail.length; + } + return { + str: head + buffer.slice(lineStart, lineEnd).replace(/\t/g, "→") + tail, + pos: position - lineStart + head.length + }; } - - -function load$1(input, options) { - var documents = loadDocuments(input, options); - - if (documents.length === 0) { - /*eslint-disable no-undefined*/ - return undefined; - } else if (documents.length === 1) { - return documents[0]; - } - throw new exception('expected a single document in the stream, but found more'); +function padStart(string, max) { + return " ".repeat(Math.max(max - string.length, 0)) + string; } - - -var loadAll_1 = loadAll$1; -var load_1 = load$1; - -var loader = { - loadAll: loadAll_1, - load: load_1 +function makeSnippet(mark, options) { + if (!mark.buffer) return null; + const opts = { + ...DEFAULT_SNIPPET_OPTIONS, + ...options + }; + const re = /\r?\n|\r|\0/g; + const lineStarts = [0]; + const lineEnds = []; + let match; + let foundLineNo = -1; + while (match = re.exec(mark.buffer)) { + lineEnds.push(match.index); + lineStarts.push(match.index + match[0].length); + if (mark.position <= match.index && foundLineNo < 0) foundLineNo = lineStarts.length - 2; + } + if (foundLineNo < 0) foundLineNo = lineStarts.length - 1; + let result = ""; + const lineNoLength = Math.min(mark.line + opts.linesAfter, lineEnds.length).toString().length; + const maxLineLength = opts.maxLength - (opts.indent + lineNoLength + 3); + for (let i = 1; i <= opts.linesBefore; i++) { + if (foundLineNo - i < 0) break; + const line = getLine(mark.buffer, lineStarts[foundLineNo - i], lineEnds[foundLineNo - i], mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo - i]), maxLineLength); + result = `${" ".repeat(opts.indent)}${padStart((mark.line - i + 1).toString(), lineNoLength)} | ${line.str}\n${result}`; + } + const line = getLine(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength); + result += `${" ".repeat(opts.indent)}${padStart((mark.line + 1).toString(), lineNoLength)} | ${line.str}\n`; + result += `${"-".repeat(opts.indent + lineNoLength + 3 + line.pos)}^\n`; + for (let i = 1; i <= opts.linesAfter; i++) { + if (foundLineNo + i >= lineEnds.length) break; + const line = getLine(mark.buffer, lineStarts[foundLineNo + i], lineEnds[foundLineNo + i], mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo + i]), maxLineLength); + result += `${" ".repeat(opts.indent)}${padStart((mark.line + i + 1).toString(), lineNoLength)} | ${line.str}\n`; + } + return result.replace(/\n$/, ""); +} +//#endregion +//#region src/common/exception.ts +function formatError(exception, compact) { + let where = ""; + if (!exception.mark) return exception.reason; + if (exception.mark.name) where += `in "${exception.mark.name}" `; + where += `(${exception.mark.line + 1}:${exception.mark.column + 1})`; + if (!compact && exception.mark.snippet) where += `\n\n${exception.mark.snippet}`; + return `${exception.reason} ${where}`; +} +/** +* A YAML error. Unlike an ordinary `Error`, it adds a source snippet showing +* the location of the problem to the error message, when available. +* +* @category Main +*/ +var YAMLException = class YAMLException extends Error { + reason; + mark; + /** + * Optional `mark` contains source snippet data. Usually, use + * {@link YAMLException.throwAt} instead of passing it directly. + */ + constructor(reason, mark) { + super(); + this.name = "YAMLException"; + this.reason = reason; + this.mark = mark; + this.message = formatError(this, false); + if (Error.captureStackTrace) Error.captureStackTrace(this, this.constructor); + } + /** + * Returns the formatted error, omitting the source snippet in compact mode. + */ + toString(compact) { + return `${this.name}: ${formatError(this, compact)}`; + } + /** + * Builds a YAMLException with a source snippet and throws it. `source` is + * the raw input text; `position` is an offset into it. + */ + static throwAt(source, position, message, filename = "") { + let line = 0; + let lineStart = 0; + for (let index = 0; index < position; index++) { + const ch = source.charCodeAt(index); + if (ch === 10) { + line++; + lineStart = index + 1; + } else if (ch === 13) { + line++; + if (source.charCodeAt(index + 1) === 10) index++; + lineStart = index + 1; + } + } + const mark = { + name: filename, + buffer: source, + position, + line, + column: position - lineStart + }; + mark.snippet = makeSnippet(mark); + throw new YAMLException(message, mark); + } }; - -/*eslint-disable no-use-before-define*/ - - - - - -var _toString = Object.prototype.toString; -var _hasOwnProperty = Object.prototype.hasOwnProperty; - -var CHAR_BOM = 0xFEFF; -var CHAR_TAB = 0x09; /* Tab */ -var CHAR_LINE_FEED = 0x0A; /* LF */ -var CHAR_CARRIAGE_RETURN = 0x0D; /* CR */ -var CHAR_SPACE = 0x20; /* Space */ -var CHAR_EXCLAMATION = 0x21; /* ! */ -var CHAR_DOUBLE_QUOTE = 0x22; /* " */ -var CHAR_SHARP = 0x23; /* # */ -var CHAR_PERCENT = 0x25; /* % */ -var CHAR_AMPERSAND = 0x26; /* & */ -var CHAR_SINGLE_QUOTE = 0x27; /* ' */ -var CHAR_ASTERISK = 0x2A; /* * */ -var CHAR_COMMA = 0x2C; /* , */ -var CHAR_MINUS = 0x2D; /* - */ -var CHAR_COLON = 0x3A; /* : */ -var CHAR_EQUALS = 0x3D; /* = */ -var CHAR_GREATER_THAN = 0x3E; /* > */ -var CHAR_QUESTION = 0x3F; /* ? */ -var CHAR_COMMERCIAL_AT = 0x40; /* @ */ -var CHAR_LEFT_SQUARE_BRACKET = 0x5B; /* [ */ -var CHAR_RIGHT_SQUARE_BRACKET = 0x5D; /* ] */ -var CHAR_GRAVE_ACCENT = 0x60; /* ` */ -var CHAR_LEFT_CURLY_BRACKET = 0x7B; /* { */ -var CHAR_VERTICAL_LINE = 0x7C; /* | */ -var CHAR_RIGHT_CURLY_BRACKET = 0x7D; /* } */ - -var ESCAPE_SEQUENCES = {}; - -ESCAPE_SEQUENCES[0x00] = '\\0'; -ESCAPE_SEQUENCES[0x07] = '\\a'; -ESCAPE_SEQUENCES[0x08] = '\\b'; -ESCAPE_SEQUENCES[0x09] = '\\t'; -ESCAPE_SEQUENCES[0x0A] = '\\n'; -ESCAPE_SEQUENCES[0x0B] = '\\v'; -ESCAPE_SEQUENCES[0x0C] = '\\f'; -ESCAPE_SEQUENCES[0x0D] = '\\r'; -ESCAPE_SEQUENCES[0x1B] = '\\e'; -ESCAPE_SEQUENCES[0x22] = '\\"'; -ESCAPE_SEQUENCES[0x5C] = '\\\\'; -ESCAPE_SEQUENCES[0x85] = '\\N'; -ESCAPE_SEQUENCES[0xA0] = '\\_'; -ESCAPE_SEQUENCES[0x2028] = '\\L'; -ESCAPE_SEQUENCES[0x2029] = '\\P'; - -var DEPRECATED_BOOLEANS_SYNTAX = [ - 'y', 'Y', 'yes', 'Yes', 'YES', 'on', 'On', 'ON', - 'n', 'N', 'no', 'No', 'NO', 'off', 'Off', 'OFF' -]; - -var DEPRECATED_BASE60_SYNTAX = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/; - -function compileStyleMap(schema, map) { - var result, keys, index, length, tag, style, type; - - if (map === null) return {}; - - result = {}; - keys = Object.keys(map); - - for (index = 0, length = keys.length; index < length; index += 1) { - tag = keys[index]; - style = String(map[tag]); - - if (tag.slice(0, 2) === '!!') { - tag = 'tag:yaml.org,2002:' + tag.slice(2); - } - type = schema.compiledTypeMap['fallback'][tag]; - - if (type && _hasOwnProperty.call(type.styleAliases, style)) { - style = type.styleAliases[style]; - } - - result[tag] = style; - } - - return result; +//#endregion +//#region src/parser/events.ts +/** @category Events */ +var EVENT_ID = { + DOCUMENT: 1, + SEQUENCE: 2, + MAPPING: 3, + SCALAR: 4, + ALIAS: 5, + POP: 6 +}; +/** @category Nodes */ +var SCALAR_STYLE = { + PLAIN: 1, + SINGLE_QUOTED: 2, + DOUBLE_QUOTED: 3, + LITERAL_BLOCK: 4, + FOLDED_BLOCK: 5 +}; +/** @category Nodes */ +var COLLECTION_STYLE = { + BLOCK: 1, + FLOW: 2 +}; +/** @category Nodes */ +var CHOMPING_MODE = { + CLIP: 1, + STRIP: 2, + KEEP: 3 +}; +//#endregion +//#region src/parser/parser_scalar.ts +var NO_RANGE$3 = -1; +function simpleEscapeSequence(c) { + switch (c) { + case 48: return "\0"; + case 97: return "\x07"; + case 98: return "\b"; + case 116: return " "; + case 9: return " "; + case 110: return "\n"; + case 118: return "\v"; + case 102: return "\f"; + case 114: return "\r"; + case 101: return "\x1B"; + case 32: return " "; + case 34: return "\""; + case 47: return "/"; + case 92: return "\\"; + case 78: return "…"; + case 95: return "\xA0"; + case 76: return "\u2028"; + case 80: return "\u2029"; + default: return ""; + } +} +var simpleEscapeCheck = new Array(256); +var simpleEscapeMap = new Array(256); +for (let i = 0; i < 256; i++) { + simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0; + simpleEscapeMap[i] = simpleEscapeSequence(i); } - -function encodeHex(character) { - var string, handle, length; - - string = character.toString(16).toUpperCase(); - - if (character <= 0xFF) { - handle = 'x'; - length = 2; - } else if (character <= 0xFFFF) { - handle = 'u'; - length = 4; - } else if (character <= 0xFFFFFFFF) { - handle = 'U'; - length = 8; - } else { - throw new exception('code point within a string may not be greater than 0xFFFFFFFF'); - } - - return '\\' + handle + common.repeat('0', length - string.length) + string; +function charFromCodepoint(c) { + if (c <= 65535) return String.fromCharCode(c); + return String.fromCharCode((c - 65536 >> 10) + 55296, (c - 65536 & 1023) + 56320); +} +function fromHexCode$1(c) { + if (c >= 48 && c <= 57) return c - 48; + return (c | 32) - 97 + 10; +} +function escapedHexLen$1(c) { + if (c === 120) return 2; + if (c === 117) return 4; + return 8; +} +function skipFoldedBreaks(input, position, end) { + let breaks = 0; + while (position < end) { + const ch = input.charCodeAt(position); + if (ch === 10) { + breaks++; + position++; + } else if (ch === 13) { + breaks++; + position++; + if (input.charCodeAt(position) === 10) position++; + } else if (ch === 32 || ch === 9) position++; + else break; + } + return { + position, + breaks + }; +} +function foldedBreaks(count) { + if (count === 1) return " "; + return "\n".repeat(count - 1); +} +function getPlainValue(input, start, end) { + let result = ""; + let position = start; + let captureStart = start; + let captureEnd = start; + while (position < end) { + const ch = input.charCodeAt(position); + if (ch === 10 || ch === 13) { + result += input.slice(captureStart, captureEnd); + const fold = skipFoldedBreaks(input, position, end); + result += foldedBreaks(fold.breaks); + position = captureStart = captureEnd = fold.position; + } else { + position++; + if (ch !== 32 && ch !== 9) captureEnd = position; + } + } + return result + input.slice(captureStart, captureEnd); +} +function getSingleQuotedValue(input, start, end) { + let result = ""; + let position = start; + let captureStart = start; + let captureEnd = start; + while (position < end) { + const ch = input.charCodeAt(position); + if (ch === 39) { + result += input.slice(captureStart, position) + "'"; + position += 2; + captureStart = captureEnd = position; + } else if (ch === 10 || ch === 13) { + result += input.slice(captureStart, captureEnd); + const fold = skipFoldedBreaks(input, position, end); + result += foldedBreaks(fold.breaks); + position = captureStart = captureEnd = fold.position; + } else { + position++; + if (ch !== 32 && ch !== 9) captureEnd = position; + } + } + return result + input.slice(captureStart, end); +} +function getDoubleQuotedValue(input, start, end) { + let result = ""; + let position = start; + let captureStart = start; + let captureEnd = start; + while (position < end) { + const ch = input.charCodeAt(position); + if (ch === 92) { + result += input.slice(captureStart, position); + position++; + const escaped = input.charCodeAt(position); + if (escaped === 10 || escaped === 13) position = skipFoldedBreaks(input, position, end).position; + else if (escaped < 256 && simpleEscapeCheck[escaped]) { + result += simpleEscapeMap[escaped]; + position++; + } else { + let hexLength = escapedHexLen$1(escaped); + let hexResult = 0; + for (; hexLength > 0; hexLength--) { + position++; + const digit = fromHexCode$1(input.charCodeAt(position)); + hexResult = (hexResult << 4) + digit; + } + result += charFromCodepoint(hexResult); + position++; + } + captureStart = captureEnd = position; + } else if (ch === 10 || ch === 13) { + result += input.slice(captureStart, captureEnd); + const fold = skipFoldedBreaks(input, position, end); + result += foldedBreaks(fold.breaks); + position = captureStart = captureEnd = fold.position; + } else { + position++; + if (ch !== 32 && ch !== 9) captureEnd = position; + } + } + return result + input.slice(captureStart, end); +} +function getBlockValue(input, start, end, indent, chomping, folded) { + const textIndent = indent < 0 ? 0 : indent; + const region = input.slice(start, end).replace(/\r\n?/g, "\n"); + const lines = region === "" ? [] : (region.endsWith("\n") ? region.slice(0, -1) : region).split("\n"); + let result = ""; + let didReadContent = false; + let emptyLines = 0; + let atMoreIndented = false; + for (const line of lines) { + let column = 0; + while (column < textIndent && line.charCodeAt(column) === 32) column++; + if (indent < 0 || column >= line.length) { + emptyLines++; + continue; + } + const content = line.slice(textIndent); + const first = content.charCodeAt(0); + if (folded) if (first === 32 || first === 9) { + atMoreIndented = true; + result += "\n".repeat(didReadContent ? 1 + emptyLines : emptyLines); + } else if (atMoreIndented) { + atMoreIndented = false; + result += "\n".repeat(emptyLines + 1); + } else if (emptyLines === 0) { + if (didReadContent) result += " "; + } else result += "\n".repeat(emptyLines); + else result += "\n".repeat(didReadContent ? 1 + emptyLines : emptyLines); + result += content; + didReadContent = true; + emptyLines = 0; + } + if (chomping === CHOMPING_MODE.KEEP) result += "\n".repeat(didReadContent ? 1 + emptyLines : emptyLines); + else if (chomping !== CHOMPING_MODE.STRIP) { + if (didReadContent) result += "\n"; + } + return result; +} +/** +* Decodes the scalar referenced by event offsets in `input`. +* +* @category Events +*/ +function getScalarValue(input, scalar) { + if (scalar.valueStart === NO_RANGE$3) return ""; + const { valueStart, valueEnd } = scalar; + if (scalar.fast) return input.slice(valueStart, valueEnd); + switch (scalar.style) { + case SCALAR_STYLE.SINGLE_QUOTED: return getSingleQuotedValue(input, valueStart, valueEnd); + case SCALAR_STYLE.DOUBLE_QUOTED: return getDoubleQuotedValue(input, valueStart, valueEnd); + case SCALAR_STYLE.LITERAL_BLOCK: return getBlockValue(input, valueStart, valueEnd, scalar.indent, scalar.chomping, false); + case SCALAR_STYLE.FOLDED_BLOCK: return getBlockValue(input, valueStart, valueEnd, scalar.indent, scalar.chomping, true); + default: return getPlainValue(input, valueStart, valueEnd); + } +} +//#endregion +//#region src/common/tagname.ts +var DEFAULT_TAG_HANDLERS = Object.assign(Object.create(null), { + "!": "!", + "!!": "tag:yaml.org,2002:" +}); +function tagPercentEncode(source) { + return encodeURI(source).replace(/!/g, "%21"); +} +function tagNameFull(rawTag, tagHandlers) { + if (rawTag.startsWith("!<") && rawTag.endsWith(">")) return decodeURIComponent(rawTag.slice(2, -1)); + const handleEnd = rawTag.indexOf("!", 1); + const handle = handleEnd === -1 ? "!" : rawTag.slice(0, handleEnd + 1); + const prefix = tagHandlers?.[handle] ?? DEFAULT_TAG_HANDLERS[handle] ?? handle; + return decodeURIComponent(prefix) + decodeURIComponent(rawTag.slice(handle.length)); +} +function tagNameShort(fullTag) { + let tag = fullTag; + if (tag.charCodeAt(0) === 33) { + tag = tag.slice(1); + return `!${tagPercentEncode(tag)}`; + } + if (tag.slice(0, 18) === "tag:yaml.org,2002:") return `!!${tagPercentEncode(tag.slice(18))}`; + return `!<${tagPercentEncode(tag)}>`; +} +//#endregion +//#region src/parser/constructor.ts +var NO_RANGE$2 = -1; +var MERGE_TAG_NAME = "tag:yaml.org,2002:merge"; +var DEFAULT_CONSTRUCTOR_OPTIONS = { + filename: "", + schema: CORE_SCHEMA, + json: false, + maxTotalMergeKeys: 1e4, + maxAliases: -1 +}; +function eventPosition$1(event) { + if ("tagStart" in event && event.tagStart !== NO_RANGE$2) return event.tagStart; + if ("anchorStart" in event && event.anchorStart !== NO_RANGE$2) return event.anchorStart; + if ("valueStart" in event && event.valueStart !== NO_RANGE$2) return event.valueStart; + if ("start" in event) return event.start; + return 0; +} +function throwError$1(state, message) { + YAMLException.throwAt(state.source, state.position, message, state.filename); +} +function finalizeCollection(state, position, tag, carrier) { + try { + return tag.finalize(carrier); + } catch (error) { + if (error instanceof YAMLException) throw error; + YAMLException.throwAt(state.source, position, error instanceof Error ? error.message : String(error), state.filename); + } +} +function constructScalar(state, event) { + const source = getScalarValue(state.source, event); + const rawTag = event.tagStart === NO_RANGE$2 ? "" : state.source.slice(event.tagStart, event.tagEnd); + const strTag = state.schema.defaultScalarTag; + if (rawTag !== "") { + if (rawTag === "!") return { + value: source, + tag: strTag + }; + const tagName = tagNameFull(rawTag, state.tagHandlers); + const scalarTag = state.schema.lookupScalarTag(tagName); + if (scalarTag) { + const result = scalarTag.resolve(source, true, tagName); + if (result === NOT_RESOLVED) throwError$1(state, `cannot resolve a node with !<${tagName}> explicit tag`); + return { + value: result, + tag: scalarTag + }; + } + const collectionTagDef = state.schema.lookupMappingTag(tagName) ?? state.schema.lookupSequenceTag(tagName); + if (collectionTagDef) { + if (source !== "") throwError$1(state, `cannot resolve a node with !<${tagName}> explicit tag`); + const carrier = collectionTagDef.create(tagName); + return { + value: collectionTagDef.carrierIsResult ? carrier : finalizeCollection(state, state.position, collectionTagDef, carrier), + tag: collectionTagDef + }; + } + throwError$1(state, `unknown scalar tag !<${tagName}>`); + } + if (event.style === SCALAR_STYLE.PLAIN) return state.schema.resolveImplicitScalarTag(source); + return { + value: strTag.resolve(source, false, strTag.tagName), + tag: strTag + }; +} +function collectionTagName(state, event, defaultTagName) { + const rawTag = event.tagStart === NO_RANGE$2 ? "" : state.source.slice(event.tagStart, event.tagEnd); + return rawTag === "" || rawTag === "!" ? defaultTagName : tagNameFull(rawTag, state.tagHandlers); +} +function isMappingTag(tag) { + return tag.nodeKind === "mapping"; +} +function chargeMergeWork(state) { + state.totalMergeKeys++; + if (state.maxTotalMergeKeys !== -1 && state.totalMergeKeys > state.maxTotalMergeKeys) throwError$1(state, `merge keys exceeded maxTotalMergeKeys (${state.maxTotalMergeKeys})`); +} +function mergeKeys(state, frame, source, sourceTag) { + chargeMergeWork(state); + for (const sourceKey of sourceTag.keys(source)) { + chargeMergeWork(state); + if (frame.tag.has(frame.value, sourceKey)) continue; + const err = frame.tag.addPair(frame.value, sourceKey, sourceTag.get(source, sourceKey)); + if (err) throwError$1(state, err); + frame.overridable ??= /* @__PURE__ */ new Set(); + frame.overridable.add(sourceKey); + } +} +function mergeSource(state, frame, source, sourceTag) { + state.position = frame.keyPosition; + if (isMappingTag(sourceTag)) mergeKeys(state, frame, source, sourceTag); + else if (sourceTag.nodeKind === "sequence" && Array.isArray(source)) { + if (source.length > 100) throwError$1(state, "abnormal merge sequence size"); + for (const element of source) { + const elementTag = state.nodeTags.get(element); + if (!elementTag) throwError$1(state, "cannot merge mappings; the provided source object is unacceptable"); + mergeKeys(state, frame, element, elementTag); + } + } else throwError$1(state, "cannot merge mappings; the provided source object is unacceptable"); +} +function addMappingValue(state, frame, key, value, tag) { + state.position = frame.keyPosition; + if (frame.keyIsMerge) { + mergeSource(state, frame, value, tag); + return; + } + if (!state.json && frame.tag.has(frame.value, key) && !frame.overridable?.has(key)) throwError$1(state, "duplicated mapping key"); + const err = frame.tag.addPair(frame.value, key, value); + if (err) throwError$1(state, err); + frame.overridable?.delete(key); +} +function addValue(state, value, tag) { + const frame = state.frames[state.frames.length - 1]; + if (frame.kind === "document") { + frame.value = value; + frame.hasValue = true; + } else if (frame.kind === "sequence") { + if (isMappingTag(tag)) state.nodeTags.set(value, tag); + const err = frame.tag.addItem(frame.value, value, frame.index++); + if (err) throwError$1(state, err); + } else if (frame.hasKey) { + const key = frame.key; + frame.key = void 0; + frame.hasKey = false; + addMappingValue(state, frame, key, value, tag); + } else { + frame.key = value; + frame.keyPosition = state.position; + frame.hasKey = true; + frame.keyIsMerge = tag.tagName === MERGE_TAG_NAME; + } +} +function storeAnchor(state, event, value, tag, isValueFinal) { + if (event.anchorStart !== NO_RANGE$2) { + const anchor = { + value, + tag, + isValueFinal + }; + state.anchors.set(state.source.slice(event.anchorStart, event.anchorEnd), anchor); + return anchor; + } + return null; +} +/** +* Constructs JavaScript documents directly from parser events, without an +* intermediate AST. +* +* @category Events +*/ +function constructFromEvents(events, options) { + const state = { + ...DEFAULT_CONSTRUCTOR_OPTIONS, + ...options, + events, + documents: [], + eventIndex: 0, + position: 0, + frames: [], + anchors: /* @__PURE__ */ new Map(), + nodeTags: /* @__PURE__ */ new Map(), + tagHandlers: Object.create(null), + totalMergeKeys: 0, + aliasCount: 0 + }; + while (state.eventIndex < state.events.length) { + const event = state.events[state.eventIndex++]; + state.position = eventPosition$1(event); + switch (event.type) { + case EVENT_ID.DOCUMENT: + state.anchors = /* @__PURE__ */ new Map(); + state.nodeTags = /* @__PURE__ */ new Map(); + state.aliasCount = 0; + state.tagHandlers = Object.create(null); + for (const directive of event.directives) if (directive.kind === "tag") state.tagHandlers[directive.handle] = directive.prefix; + state.frames.push({ + kind: "document", + position: state.position, + value: void 0, + hasValue: false + }); + break; + case EVENT_ID.SCALAR: { + const { value, tag } = constructScalar(state, event); + storeAnchor(state, event, value, tag, true); + addValue(state, value, tag); + break; + } + case EVENT_ID.SEQUENCE: { + const tagName = collectionTagName(state, event, "tag:yaml.org,2002:seq"); + const tag = state.schema.lookupSequenceTag(tagName); + if (!tag) throwError$1(state, `unknown sequence tag !<${tagName}>`); + const value = tag.create(tagName); + const anchor = storeAnchor(state, event, value, tag, tag.carrierIsResult); + state.frames.push({ + kind: "sequence", + position: state.position, + value, + tag, + anchor, + index: 0 + }); + break; + } + case EVENT_ID.MAPPING: { + const tagName = collectionTagName(state, event, "tag:yaml.org,2002:map"); + const tag = state.schema.lookupMappingTag(tagName); + if (!tag) throwError$1(state, `unknown mapping tag !<${tagName}>`); + const value = tag.create(tagName); + const anchor = storeAnchor(state, event, value, tag, tag.carrierIsResult); + state.frames.push({ + kind: "mapping", + position: state.position, + value, + tag, + anchor, + key: void 0, + keyPosition: state.position, + hasKey: false, + keyIsMerge: false, + overridable: null + }); + break; + } + case EVENT_ID.ALIAS: { + if (state.maxAliases !== -1 && ++state.aliasCount > state.maxAliases) throwError$1(state, `aliases exceeded maxAliases (${state.maxAliases})`); + const name = state.source.slice(event.anchorStart, event.anchorEnd); + const anchor = state.anchors.get(name); + if (!anchor) throwError$1(state, `unidentified alias "${name}"`); + if (!anchor.isValueFinal) throwError$1(state, `recursive alias "${name}" is not supported for tag ${anchor.tag.tagName} because it uses finalize()`); + addValue(state, anchor.value, anchor.tag); + break; + } + case EVENT_ID.POP: { + const frame = state.frames.pop(); + if (frame.kind === "mapping" && frame.hasKey) { + state.position = frame.keyPosition; + throwError$1(state, "incomplete mapping pair in event stream"); + } + if (frame.kind === "document") state.documents.push(frame.value); + else { + const value = frame.tag.carrierIsResult ? frame.value : finalizeCollection(state, frame.position, frame.tag, frame.value); + if (frame.anchor) { + frame.anchor.value = value; + frame.anchor.isValueFinal = true; + } + addValue(state, value, frame.tag); + } + break; + } + } + } + return state.documents; +} +//#endregion +//#region src/parser/parser.ts +var NO_RANGE$1 = -1; +var HAS_OWN = Object.prototype.hasOwnProperty; +var CONTEXT_FLOW_IN = 1; +var CONTEXT_FLOW_OUT = 2; +var CONTEXT_BLOCK_IN = 3; +var CONTEXT_BLOCK_OUT = 4; +var PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; +var PATTERN_FLOW_INDICATORS = /[,\[\]{}]/; +var PATTERN_TAG_HANDLE = /^(?:!|!!|![0-9A-Za-z-]+!)$/; +var NS_URI_CHAR = String.raw`(?:%[0-9A-Fa-f]{2}|[0-9A-Za-z\-#;/?:@&=+$,_.!~*'()\[\]])`; +var NS_TAG_CHAR = String.raw`(?:%[0-9A-Fa-f]{2}|[0-9A-Za-z\-#;/?:@&=+$.~*'()_])`; +var PATTERN_TAG_URI = new RegExp(`^(?:${NS_URI_CHAR})*$`); +var PATTERN_TAG_SUFFIX = new RegExp(`^(?:${NS_TAG_CHAR})+$`); +var PATTERN_TAG_PREFIX = new RegExp(`^(?:!(?:${NS_URI_CHAR})*|${NS_TAG_CHAR}(?:${NS_URI_CHAR})*)$`); +var DEFAULT_PARSER_OPTIONS = { + filename: "", + maxDepth: 100 +}; +function addDocumentEvent(state, explicitStart, explicitEnd) { + state.events.push({ + type: EVENT_ID.DOCUMENT, + explicitStart, + explicitEnd, + directives: state.directives + }); +} +function addSequenceEvent(state, start, anchorStart, anchorEnd, tagStart, tagEnd, style) { + state.events.push({ + type: EVENT_ID.SEQUENCE, + start, + anchorStart, + anchorEnd, + tagStart, + tagEnd, + style + }); +} +function addMappingEvent(state, start, anchorStart, anchorEnd, tagStart, tagEnd, style) { + state.events.push({ + type: EVENT_ID.MAPPING, + start, + anchorStart, + anchorEnd, + tagStart, + tagEnd, + style + }); +} +function insertFlowPairMappingEvent(state, snapshot) { + state.events.splice(snapshot.eventsLength, 0, { + type: EVENT_ID.MAPPING, + start: snapshot.position, + anchorStart: NO_RANGE$1, + anchorEnd: NO_RANGE$1, + tagStart: NO_RANGE$1, + tagEnd: NO_RANGE$1, + style: COLLECTION_STYLE.FLOW + }); +} +function addScalarEvent(state, valueStart, valueEnd, anchorStart, anchorEnd, tagStart, tagEnd, style, chomping = CHOMPING_MODE.CLIP, indent = -1, fast = false) { + state.events.push({ + type: EVENT_ID.SCALAR, + valueStart, + valueEnd, + anchorStart, + anchorEnd, + tagStart, + tagEnd, + style, + chomping, + indent, + fast + }); +} +function addAliasEvent(state, anchorStart, anchorEnd) { + state.events.push({ + type: EVENT_ID.ALIAS, + anchorStart, + anchorEnd + }); +} +function addPopEvent(state) { + state.events.push({ type: EVENT_ID.POP }); +} +function addEmptyScalarEvent(state) { + addScalarEvent(state, NO_RANGE$1, NO_RANGE$1, NO_RANGE$1, NO_RANGE$1, NO_RANGE$1, NO_RANGE$1, SCALAR_STYLE.PLAIN); +} +function emptyProperties() { + return { + anchorStart: NO_RANGE$1, + anchorEnd: NO_RANGE$1, + tagStart: NO_RANGE$1, + tagEnd: NO_RANGE$1 + }; +} +function snapshotState(state) { + return { + position: state.position, + line: state.line, + lineStart: state.lineStart, + lineIndent: state.lineIndent, + firstTabInLine: state.firstTabInLine, + eventsLength: state.events.length + }; +} +function restoreState(state, snapshot) { + state.position = snapshot.position; + state.line = snapshot.line; + state.lineStart = snapshot.lineStart; + state.lineIndent = snapshot.lineIndent; + state.firstTabInLine = snapshot.firstTabInLine; + state.events.length = snapshot.eventsLength; } - - -var QUOTING_TYPE_SINGLE = 1, - QUOTING_TYPE_DOUBLE = 2; - -function State(options) { - this.schema = options['schema'] || _default; - this.indent = Math.max(1, (options['indent'] || 2)); - this.noArrayIndent = options['noArrayIndent'] || false; - this.skipInvalid = options['skipInvalid'] || false; - this.flowLevel = (common.isNothing(options['flowLevel']) ? -1 : options['flowLevel']); - this.styleMap = compileStyleMap(this.schema, options['styles'] || null); - this.sortKeys = options['sortKeys'] || false; - this.lineWidth = options['lineWidth'] || 80; - this.noRefs = options['noRefs'] || false; - this.noCompatMode = options['noCompatMode'] || false; - this.condenseFlow = options['condenseFlow'] || false; - this.quotingType = options['quotingType'] === '"' ? QUOTING_TYPE_DOUBLE : QUOTING_TYPE_SINGLE; - this.forceQuotes = options['forceQuotes'] || false; - this.replacer = typeof options['replacer'] === 'function' ? options['replacer'] : null; - - this.implicitTypes = this.schema.compiledImplicit; - this.explicitTypes = this.schema.compiledExplicit; - - this.tag = null; - this.result = ''; - - this.duplicates = []; - this.usedDuplicates = null; +function throwError(state, message) { + YAMLException.throwAt(state.input.slice(0, state.length), state.position, message, state.filename); } - -// Indents every line in a string. Empty lines (\n only) are not indented. -function indentString(string, spaces) { - var ind = common.repeat(' ', spaces), - position = 0, - next = -1, - result = '', - line, - length = string.length; - - while (position < length) { - next = string.indexOf('\n', position); - if (next === -1) { - line = string.slice(position); - position = length; - } else { - line = string.slice(position, next + 1); - position = next + 1; - } - - if (line.length && line !== '\n') result += ind; - - result += line; - } - - return result; +function isEol(c) { + return c === 10 || c === 13; } - -function generateNextLine(state, level) { - return '\n' + common.repeat(' ', state.indent * level); +function isWhiteSpace(c) { + return c === 9 || c === 32; } - -function testImplicitResolving(state, str) { - var index, length, type; - - for (index = 0, length = state.implicitTypes.length; index < length; index += 1) { - type = state.implicitTypes[index]; - - if (type.resolve(str)) { - return true; - } - } - - return false; +function isWsOrEol(c) { + return isWhiteSpace(c) || isEol(c); } - -// [33] s-white ::= s-space | s-tab -function isWhitespace(c) { - return c === CHAR_SPACE || c === CHAR_TAB; +function isWsOrEolOrEnd(c) { + return c === 0 || isWsOrEol(c); } - -// Returns true if the character can be printed without escaping. -// From YAML 1.2: "any allowed characters known to be non-printable -// should also be escaped. [However,] This isn’t mandatory" -// Derived from nb-char - \t - #x85 - #xA0 - #x2028 - #x2029. -function isPrintable(c) { - return (0x00020 <= c && c <= 0x00007E) - || ((0x000A1 <= c && c <= 0x00D7FF) && c !== 0x2028 && c !== 0x2029) - || ((0x0E000 <= c && c <= 0x00FFFD) && c !== CHAR_BOM) - || (0x10000 <= c && c <= 0x10FFFF); +function isFlowIndicator(c) { + return c === 44 || c === 91 || c === 93 || c === 123 || c === 125; } - -// [34] ns-char ::= nb-char - s-white -// [27] nb-char ::= c-printable - b-char - c-byte-order-mark -// [26] b-char ::= b-line-feed | b-carriage-return -// Including s-white (for some reason, examples doesn't match specs in this aspect) -// ns-char ::= c-printable - b-line-feed - b-carriage-return - c-byte-order-mark -function isNsCharOrWhitespace(c) { - return isPrintable(c) - && c !== CHAR_BOM - // - b-char - && c !== CHAR_CARRIAGE_RETURN - && c !== CHAR_LINE_FEED; +function fromDecimalCode(c) { + return c >= 48 && c <= 57 ? c - 48 : -1; } - -// [127] ns-plain-safe(c) ::= c = flow-out ⇒ ns-plain-safe-out -// c = flow-in ⇒ ns-plain-safe-in -// c = block-key ⇒ ns-plain-safe-out -// c = flow-key ⇒ ns-plain-safe-in -// [128] ns-plain-safe-out ::= ns-char -// [129] ns-plain-safe-in ::= ns-char - c-flow-indicator -// [130] ns-plain-char(c) ::= ( ns-plain-safe(c) - “:” - “#” ) -// | ( /* An ns-char preceding */ “#” ) -// | ( “:” /* Followed by an ns-plain-safe(c) */ ) -function isPlainSafe(c, prev, inblock) { - var cIsNsCharOrWhitespace = isNsCharOrWhitespace(c); - var cIsNsChar = cIsNsCharOrWhitespace && !isWhitespace(c); - return ( - // ns-plain-safe - inblock ? // c = flow-in - cIsNsCharOrWhitespace - : cIsNsCharOrWhitespace - // - c-flow-indicator - && c !== CHAR_COMMA - && c !== CHAR_LEFT_SQUARE_BRACKET - && c !== CHAR_RIGHT_SQUARE_BRACKET - && c !== CHAR_LEFT_CURLY_BRACKET - && c !== CHAR_RIGHT_CURLY_BRACKET - ) - // ns-plain-char - && c !== CHAR_SHARP // false on '#' - && !(prev === CHAR_COLON && !cIsNsChar) // false on ': ' - || (isNsCharOrWhitespace(prev) && !isWhitespace(prev) && c === CHAR_SHARP) // change to true on '[^ ]#' - || (prev === CHAR_COLON && cIsNsChar); // change to true on ':[^ ]' +function fromHexCode(c) { + if (c >= 48 && c <= 57) return c - 48; + const lc = c | 32; + if (lc >= 97 && lc <= 102) return lc - 97 + 10; + return -1; } - -// Simplified test for values allowed as the first character in plain style. -function isPlainSafeFirst(c) { - // Uses a subset of ns-char - c-indicator - // where ns-char = nb-char - s-white. - // No support of ( ( “?” | “:” | “-” ) /* Followed by an ns-plain-safe(c)) */ ) part - return isPrintable(c) && c !== CHAR_BOM - && !isWhitespace(c) // - s-white - // - (c-indicator ::= - // “-” | “?” | “:” | “,” | “[” | “]” | “{” | “}” - && c !== CHAR_MINUS - && c !== CHAR_QUESTION - && c !== CHAR_COLON - && c !== CHAR_COMMA - && c !== CHAR_LEFT_SQUARE_BRACKET - && c !== CHAR_RIGHT_SQUARE_BRACKET - && c !== CHAR_LEFT_CURLY_BRACKET - && c !== CHAR_RIGHT_CURLY_BRACKET - // | “#” | “&” | “*” | “!” | “|” | “=” | “>” | “'” | “"” - && c !== CHAR_SHARP - && c !== CHAR_AMPERSAND - && c !== CHAR_ASTERISK - && c !== CHAR_EXCLAMATION - && c !== CHAR_VERTICAL_LINE - && c !== CHAR_EQUALS - && c !== CHAR_GREATER_THAN - && c !== CHAR_SINGLE_QUOTE - && c !== CHAR_DOUBLE_QUOTE - // | “%” | “@” | “`”) - && c !== CHAR_PERCENT - && c !== CHAR_COMMERCIAL_AT - && c !== CHAR_GRAVE_ACCENT; +function escapedHexLen(c) { + if (c === 120) return 2; + if (c === 117) return 4; + if (c === 85) return 8; + return 0; +} +function isSimpleEscape(c) { + return c === 48 || c === 97 || c === 98 || c === 116 || c === 9 || c === 110 || c === 118 || c === 102 || c === 114 || c === 101 || c === 32 || c === 34 || c === 47 || c === 92 || c === 78 || c === 95 || c === 76 || c === 80; +} +function consumeLineBreak(state) { + if (state.input.charCodeAt(state.position) === 10) state.position++; + else { + state.position++; + if (state.input.charCodeAt(state.position) === 10) state.position++; + } + state.line++; + state.lineStart = state.position; + state.lineIndent = 0; + state.firstTabInLine = -1; +} +function skipSeparationSpace(state, allowComments) { + let lineBreaks = 0; + let ch = state.input.charCodeAt(state.position); + let hasSeparation = state.position === state.lineStart || isWsOrEol(state.input.charCodeAt(state.position - 1)); + while (ch !== 0) { + while (isWhiteSpace(ch)) { + hasSeparation = true; + if (ch === 9 && state.firstTabInLine === -1) state.firstTabInLine = state.position; + ch = state.input.charCodeAt(++state.position); + } + if (allowComments && hasSeparation && ch === 35) do + ch = state.input.charCodeAt(++state.position); + while (!isEol(ch) && ch !== 0); + if (!isEol(ch)) break; + consumeLineBreak(state); + lineBreaks++; + hasSeparation = true; + ch = state.input.charCodeAt(state.position); + while (ch === 32) { + state.lineIndent++; + ch = state.input.charCodeAt(++state.position); + } + } + return lineBreaks; +} +function testDocumentSeparator(state, position = state.position) { + const ch = state.input.charCodeAt(position); + if ((ch === 45 || ch === 46) && ch === state.input.charCodeAt(position + 1) && ch === state.input.charCodeAt(position + 2)) { + const following = state.input.charCodeAt(position + 3); + return following === 0 || isWsOrEol(following); + } + return false; +} +function skipByteOrderMark(state) { + if (state.position === state.lineStart && state.input.charCodeAt(state.position) === 65279) { + state.position++; + state.lineStart = state.position; + } +} +function testDocumentBoundary(state) { + if (state.position !== state.lineStart) return false; + if (testDocumentSeparator(state)) return true; + if (state.input.charCodeAt(state.position) !== 65279) return false; + const snapshot = snapshotState(state); + skipByteOrderMark(state); + skipSeparationSpace(state, true); + const ch = state.input.charCodeAt(state.position); + const result = state.position === state.lineStart && (ch === 37 || ch === 45 && testDocumentSeparator(state)); + restoreState(state, snapshot); + return result; +} +function skipUntilLineEnd(state) { + let ch = state.input.charCodeAt(state.position); + while (ch !== 0 && !isEol(ch)) ch = state.input.charCodeAt(++state.position); +} +function checkPrintable(state, start, end) { + if (PATTERN_NON_PRINTABLE.test(state.input.slice(start, end))) throwError(state, "the stream contains non-printable characters"); +} +function readTagProperty(state, props, inFlow) { + if (state.input.charCodeAt(state.position) !== 33) return false; + if (props.tagStart !== NO_RANGE$1) throwError(state, "duplication of a tag property"); + const start = state.position; + let isVerbatim = false; + let isNamed = false; + let tagHandle = "!"; + let ch = state.input.charCodeAt(++state.position); + if (ch === 60) { + isVerbatim = true; + ch = state.input.charCodeAt(++state.position); + } else if (ch === 33) { + isNamed = true; + tagHandle = "!!"; + ch = state.input.charCodeAt(++state.position); + } + let suffixStart = state.position; + let tagName; + if (isVerbatim) { + while (ch !== 0 && ch !== 62) ch = state.input.charCodeAt(++state.position); + if (ch !== 62) throwError(state, "unexpected end of the stream within a verbatim tag"); + tagName = state.input.slice(suffixStart, state.position); + state.position++; + } else { + while (ch !== 0 && !isWsOrEol(ch) && !(inFlow && isFlowIndicator(ch))) { + if (ch === 33) if (!isNamed) { + tagHandle = state.input.slice(suffixStart - 1, state.position + 1); + if (!PATTERN_TAG_HANDLE.test(tagHandle)) throwError(state, "named tag handle cannot contain such characters"); + isNamed = true; + suffixStart = state.position + 1; + } else throwError(state, "tag suffix cannot contain exclamation marks"); + ch = state.input.charCodeAt(++state.position); + } + tagName = state.input.slice(suffixStart, state.position); + if (PATTERN_FLOW_INDICATORS.test(tagName)) throwError(state, "tag suffix cannot contain flow indicator characters"); + } + if (tagName && !(isVerbatim ? PATTERN_TAG_URI.test(tagName) : PATTERN_TAG_SUFFIX.test(tagName))) throwError(state, `tag name cannot contain such characters: ${tagName}`); + if (!isVerbatim && tagHandle !== "!" && tagHandle !== "!!" && !HAS_OWN.call(state.tagHandlers, tagHandle)) throwError(state, `undeclared tag handle "${tagHandle}"`); + props.tagStart = start; + props.tagEnd = state.position; + return true; +} +function readAnchorProperty(state, props) { + if (state.input.charCodeAt(state.position) !== 38) return false; + if (props.anchorStart !== NO_RANGE$1) throwError(state, "duplication of an anchor property"); + state.position++; + const start = state.position; + while (state.input.charCodeAt(state.position) !== 0 && !isWsOrEol(state.input.charCodeAt(state.position)) && !isFlowIndicator(state.input.charCodeAt(state.position))) state.position++; + if (state.position === start) throwError(state, "name of an anchor node must contain at least one character"); + props.anchorStart = start; + props.anchorEnd = state.position; + return true; +} +function readAlias(state, props) { + if (state.input.charCodeAt(state.position) !== 42) return false; + if (props.anchorStart !== NO_RANGE$1 || props.tagStart !== NO_RANGE$1) throwError(state, "alias node should not have any properties"); + state.position++; + const start = state.position; + while (state.input.charCodeAt(state.position) !== 0 && !isWsOrEol(state.input.charCodeAt(state.position)) && !isFlowIndicator(state.input.charCodeAt(state.position))) state.position++; + if (state.position === start) throwError(state, "name of an alias node must contain at least one character"); + addAliasEvent(state, start, state.position); + return true; +} +function readFlowScalarBreak(state, nodeIndent) { + skipSeparationSpace(state, false); + if (state.lineIndent < nodeIndent) throwError(state, "deficient indentation"); +} +function readSingleQuotedScalar(state, nodeIndent, props) { + if (state.input.charCodeAt(state.position) !== 39) return false; + state.position++; + const start = state.position; + let simple = true; + while (state.input.charCodeAt(state.position) !== 0) { + const ch = state.input.charCodeAt(state.position); + if (ch === 39) { + if (state.input.charCodeAt(state.position + 1) === 39) { + simple = false; + state.position += 2; + continue; + } + const end = state.position; + state.position++; + addScalarEvent(state, start, end, props.anchorStart, props.anchorEnd, props.tagStart, props.tagEnd, SCALAR_STYLE.SINGLE_QUOTED, CHOMPING_MODE.CLIP, -1, simple); + return true; + } + if (isEol(ch)) { + simple = false; + readFlowScalarBreak(state, nodeIndent); + } else if (state.position === state.lineStart && testDocumentSeparator(state)) throwError(state, "unexpected end of the document within a single quoted scalar"); + else if (ch !== 9 && ch < 32) throwError(state, "expected valid JSON character"); + else state.position++; + } + throwError(state, "unexpected end of the stream within a single quoted scalar"); +} +function readDoubleQuotedScalar(state, nodeIndent, props) { + if (state.input.charCodeAt(state.position) !== 34) return false; + state.position++; + const start = state.position; + let simple = true; + while (state.input.charCodeAt(state.position) !== 0) { + const ch = state.input.charCodeAt(state.position); + if (ch === 34) { + const end = state.position; + state.position++; + addScalarEvent(state, start, end, props.anchorStart, props.anchorEnd, props.tagStart, props.tagEnd, SCALAR_STYLE.DOUBLE_QUOTED, CHOMPING_MODE.CLIP, -1, simple); + return true; + } + if (ch === 92) { + simple = false; + const escaped = state.input.charCodeAt(++state.position); + if (isEol(escaped)) readFlowScalarBreak(state, nodeIndent); + else if (isSimpleEscape(escaped)) state.position++; + else { + let hexLength = escapedHexLen(escaped); + if (hexLength === 0) throwError(state, "unknown escape sequence"); + while (hexLength-- > 0) { + state.position++; + if (fromHexCode(state.input.charCodeAt(state.position)) < 0) throwError(state, "expected hexadecimal character"); + } + state.position++; + } + } else if (isEol(ch)) { + simple = false; + readFlowScalarBreak(state, nodeIndent); + } else if (state.position === state.lineStart && testDocumentSeparator(state)) throwError(state, "unexpected end of the document within a double quoted scalar"); + else if (ch !== 9 && ch < 32) throwError(state, "expected valid JSON character"); + else state.position++; + } + throwError(state, "unexpected end of the stream within a double quoted scalar"); +} +function readBlockScalar(state, parentIndent, props) { + const ch = state.input.charCodeAt(state.position); + let chomping = CHOMPING_MODE.CLIP; + let indent = -1; + let detectedIndent = false; + if (ch !== 124 && ch !== 62) return false; + const style = ch === 124 ? SCALAR_STYLE.LITERAL_BLOCK : SCALAR_STYLE.FOLDED_BLOCK; + state.position++; + while (state.input.charCodeAt(state.position) !== 0) { + const current = state.input.charCodeAt(state.position); + const digit = fromDecimalCode(current); + if (current === 43 || current === 45) { + if (chomping !== CHOMPING_MODE.CLIP) throwError(state, "repeat of a chomping mode identifier"); + chomping = current === 43 ? CHOMPING_MODE.KEEP : CHOMPING_MODE.STRIP; + state.position++; + } else if (digit >= 0) { + if (digit === 0) throwError(state, "bad explicit indentation width of a block scalar; it cannot be less than one"); + if (detectedIndent) throwError(state, "repeat of an indentation width identifier"); + indent = parentIndent + digit - 1; + detectedIndent = true; + state.position++; + } else break; + } + let hadWhitespace = false; + while (isWhiteSpace(state.input.charCodeAt(state.position))) { + hadWhitespace = true; + state.position++; + } + if (hadWhitespace && state.input.charCodeAt(state.position) === 35) skipUntilLineEnd(state); + if (isEol(state.input.charCodeAt(state.position))) consumeLineBreak(state); + else if (state.input.charCodeAt(state.position) !== 0) throwError(state, "a line break is expected"); + let contentIndent = detectedIndent ? indent : -1; + let maxLeadingIndent = 0; + const valueStart = state.position; + let valueEnd = state.position; + while (state.input.charCodeAt(state.position) !== 0) { + const linePosition = state.position; + let column = 0; + while (state.input.charCodeAt(linePosition + column) === 32) column++; + const first = state.input.charCodeAt(linePosition + column); + if (first === 0) { + if (contentIndent >= 0) { + if (column > contentIndent) valueEnd = linePosition + column; + } else if (column > 0) valueEnd = linePosition + column; + break; + } + if (testDocumentBoundary(state)) break; + if (!detectedIndent && contentIndent === -1 && isEol(first)) maxLeadingIndent = Math.max(maxLeadingIndent, column); + if (!detectedIndent && contentIndent === -1 && !isEol(first)) { + if (first === 9 && column < parentIndent) { + state.position = linePosition + column; + throwError(state, "tab characters must not be used in indentation"); + } + if (column < maxLeadingIndent) { + state.position = linePosition + column; + throwError(state, "bad indentation of a mapping entry"); + } + } + if (contentIndent === -1 && first !== 0 && !isEol(first) && column < parentIndent) { + state.lineIndent = column; + state.position = linePosition + column; + break; + } + if (!detectedIndent && first !== 0 && !isEol(first) && contentIndent === -1) contentIndent = column; + const requiredIndent = contentIndent === -1 ? parentIndent + 1 : contentIndent; + if (first !== 0 && !isEol(first) && column < requiredIndent) { + state.lineIndent = column; + state.position = linePosition + column; + break; + } + skipUntilLineEnd(state); + valueEnd = state.position; + if (isEol(state.input.charCodeAt(state.position))) { + consumeLineBreak(state); + valueEnd = state.position; + } + } + checkPrintable(state, valueStart, valueEnd); + addScalarEvent(state, valueStart, valueEnd, props.anchorStart, props.anchorEnd, props.tagStart, props.tagEnd, style, chomping, contentIndent); + return true; +} +function canStartPlainScalar(state, nodeContext) { + const ch = state.input.charCodeAt(state.position); + const inFlow = nodeContext === CONTEXT_FLOW_IN; + if (ch === 0 || isWsOrEol(ch) || ch === 35 || ch === 38 || ch === 42 || ch === 33 || ch === 124 || ch === 62 || ch === 39 || ch === 34 || ch === 37 || ch === 64 || ch === 96 || inFlow && isFlowIndicator(ch)) return false; + if (ch === 63 || ch === 45) { + const following = state.input.charCodeAt(state.position + 1); + if (isWsOrEolOrEnd(following) || inFlow && isFlowIndicator(following)) return false; + } + return true; +} +function readPlainScalar(state, nodeIndent, nodeContext, props) { + if (!canStartPlainScalar(state, nodeContext)) return false; + const start = state.position; + let end = state.position; + let ch = state.input.charCodeAt(state.position); + const inFlow = nodeContext === CONTEXT_FLOW_IN; + let multiline = false; + while (ch !== 0) { + if (testDocumentBoundary(state)) break; + if (ch === 58) { + const following = state.input.charCodeAt(state.position + 1); + if (isWsOrEolOrEnd(following) || inFlow && isFlowIndicator(following)) break; + } else if (ch === 35) { + if (isWsOrEol(state.input.charCodeAt(state.position - 1))) break; + } else if (inFlow && isFlowIndicator(ch)) break; + else if (isEol(ch)) { + const savedPosition = state.position; + const savedLine = state.line; + const savedLineStart = state.lineStart; + const savedLineIndent = state.lineIndent; + skipSeparationSpace(state, false); + if (state.lineIndent >= nodeIndent) { + multiline = true; + ch = state.input.charCodeAt(state.position); + continue; + } + state.position = savedPosition; + state.line = savedLine; + state.lineStart = savedLineStart; + state.lineIndent = savedLineIndent; + break; + } + if (!isWhiteSpace(ch)) end = state.position + 1; + ch = state.input.charCodeAt(++state.position); + } + if (end === start) return false; + checkPrintable(state, start, end); + addScalarEvent(state, start, end, props.anchorStart, props.anchorEnd, props.tagStart, props.tagEnd, SCALAR_STYLE.PLAIN, CHOMPING_MODE.CLIP, -1, !multiline); + return true; +} +function skipFlowSeparationSpace(state, nodeIndent) { + const startLine = state.line; + skipSeparationSpace(state, true); + if (state.line > startLine && state.lineIndent < nodeIndent || state.firstTabInLine !== -1 && state.lineIndent < nodeIndent) throwError(state, "deficient indentation"); +} +function readFlowCollection(state, nodeIndent, props) { + const ch = state.input.charCodeAt(state.position); + const isMapping = ch === 123; + const start = state.position; + let readNext = true; + if (ch !== 91 && ch !== 123) return false; + const terminator = isMapping ? 125 : 93; + if (isMapping) addMappingEvent(state, start, props.anchorStart, props.anchorEnd, props.tagStart, props.tagEnd, COLLECTION_STYLE.FLOW); + else addSequenceEvent(state, start, props.anchorStart, props.anchorEnd, props.tagStart, props.tagEnd, COLLECTION_STYLE.FLOW); + state.position++; + while (state.input.charCodeAt(state.position) !== 0) { + skipFlowSeparationSpace(state, nodeIndent); + let ch = state.input.charCodeAt(state.position); + if (ch === terminator) { + state.position++; + addPopEvent(state); + return true; + } else if (!readNext) throwError(state, "missed comma between flow collection entries"); + else if (ch === 44) throwError(state, "expected the node content, but found ','"); + let isPair = false; + let isExplicitPair = false; + if (ch === 63 && isWsOrEol(state.input.charCodeAt(state.position + 1))) { + isPair = isExplicitPair = true; + state.position += 1; + skipFlowSeparationSpace(state, nodeIndent); + } + const entryLine = state.line; + const entryStart = snapshotState(state); + const keyWasRead = parseNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); + skipFlowSeparationSpace(state, nodeIndent); + ch = state.input.charCodeAt(state.position); + if ((isMapping || isExplicitPair || state.line === entryLine) && ch === 58) { + isPair = true; + state.position++; + skipFlowSeparationSpace(state, nodeIndent); + if (!isMapping) { + insertFlowPairMappingEvent(state, entryStart); + if (!keyWasRead) addEmptyScalarEvent(state); + } else if (!keyWasRead) addEmptyScalarEvent(state); + if (!parseNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true)) addEmptyScalarEvent(state); + skipFlowSeparationSpace(state, nodeIndent); + if (!isMapping) addPopEvent(state); + } else if (isMapping && isPair) { + if (!keyWasRead) addEmptyScalarEvent(state); + addEmptyScalarEvent(state); + } else if (isMapping) addEmptyScalarEvent(state); + else if (isPair) { + insertFlowPairMappingEvent(state, entryStart); + if (!keyWasRead) addEmptyScalarEvent(state); + addEmptyScalarEvent(state); + addPopEvent(state); + } + ch = state.input.charCodeAt(state.position); + if (ch === 44) { + readNext = true; + state.position++; + } else readNext = false; + } + throwError(state, "unexpected end of the stream within a flow collection"); +} +function readBlockSequence(state, nodeIndent, props) { + if (state.firstTabInLine !== -1 || state.input.charCodeAt(state.position) !== 45 || !isWsOrEolOrEnd(state.input.charCodeAt(state.position + 1))) return false; + addSequenceEvent(state, state.position, props.anchorStart, props.anchorEnd, props.tagStart, props.tagEnd, COLLECTION_STYLE.BLOCK); + while (state.input.charCodeAt(state.position) === 45 && isWsOrEolOrEnd(state.input.charCodeAt(state.position + 1))) { + if (state.firstTabInLine !== -1) { + state.position = state.firstTabInLine; + throwError(state, "tab characters must not be used in indentation"); + } + const entryLine = state.line; + state.position++; + const hadBreak = skipSeparationSpace(state, true) > 0; + if (state.firstTabInLine !== -1 && state.input.charCodeAt(state.position) === 45 && isWsOrEolOrEnd(state.input.charCodeAt(state.position + 1))) throwError(state, "bad indentation of a sequence entry"); + if (hadBreak && state.lineIndent <= nodeIndent) addEmptyScalarEvent(state); + else parseNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true); + skipSeparationSpace(state, true); + if (state.lineIndent < nodeIndent || state.position >= state.length) break; + if (state.lineIndent > nodeIndent) throwError(state, "bad indentation of a sequence entry"); + if (state.line === entryLine && state.input.charCodeAt(state.position) === 45 && isWsOrEolOrEnd(state.input.charCodeAt(state.position + 1))) throwError(state, "bad indentation of a sequence entry"); + } + addPopEvent(state); + return true; +} +function readBlockMapping(state, nodeIndent, flowIndent, props) { + let atExplicitKey = false; + let detected = false; + let mappingOpened = false; + let pendingExplicitKey = false; + if (state.firstTabInLine !== -1) return false; + let ch = state.input.charCodeAt(state.position); + while (ch !== 0) { + if (!atExplicitKey && state.firstTabInLine !== -1) { + state.position = state.firstTabInLine; + throwError(state, "tab characters must not be used in indentation"); + } + const following = state.input.charCodeAt(state.position + 1); + const entryLine = state.line; + if ((ch === 63 || ch === 58) && isWsOrEolOrEnd(following)) { + if (!mappingOpened) { + addMappingEvent(state, state.position, props.anchorStart, props.anchorEnd, props.tagStart, props.tagEnd, COLLECTION_STYLE.BLOCK); + mappingOpened = true; + } + if (ch === 63) { + if (atExplicitKey) addEmptyScalarEvent(state); + detected = true; + atExplicitKey = true; + } else if (atExplicitKey) atExplicitKey = false; + else { + addEmptyScalarEvent(state); + detected = true; + atExplicitKey = false; + } + state.position += 1; + pendingExplicitKey = true; + } else { + if (atExplicitKey) { + addEmptyScalarEvent(state); + atExplicitKey = false; + } + const beforeKey = snapshotState(state); + if (!parseNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) break; + if (state.line === entryLine) { + ch = state.input.charCodeAt(state.position); + while (isWhiteSpace(ch)) ch = state.input.charCodeAt(++state.position); + if (ch === 58) { + ch = state.input.charCodeAt(++state.position); + if (!isWsOrEolOrEnd(ch)) throwError(state, "a whitespace character is expected after the key-value separator within a block mapping"); + if (!mappingOpened) { + restoreState(state, beforeKey); + addMappingEvent(state, beforeKey.position, props.anchorStart, props.anchorEnd, props.tagStart, props.tagEnd, COLLECTION_STYLE.BLOCK); + mappingOpened = true; + parseNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true); + ch = state.input.charCodeAt(state.position); + while (isWhiteSpace(ch)) ch = state.input.charCodeAt(++state.position); + state.position++; + } + detected = true; + atExplicitKey = false; + pendingExplicitKey = false; + } else if (detected) throwError(state, "expected ':' after a mapping key"); + else { + if (props.anchorStart !== NO_RANGE$1 || props.tagStart !== NO_RANGE$1) { + restoreState(state, beforeKey); + return false; + } + return true; + } + } else if (detected) throwError(state, "can not read a block mapping entry; a multiline key may not be an implicit key"); + else { + if (props.anchorStart !== NO_RANGE$1 || props.tagStart !== NO_RANGE$1) { + restoreState(state, beforeKey); + return false; + } + return true; + } + } + if (parseNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, pendingExplicitKey)) pendingExplicitKey = false; + if (!atExplicitKey) { + if (pendingExplicitKey) { + addEmptyScalarEvent(state); + pendingExplicitKey = false; + } + } + skipSeparationSpace(state, true); + ch = state.input.charCodeAt(state.position); + if ((state.line === entryLine || state.lineIndent > nodeIndent) && ch !== 0) throwError(state, "bad indentation of a mapping entry"); + else if (state.lineIndent < nodeIndent) break; + } + if (!detected) return false; + if (atExplicitKey) addEmptyScalarEvent(state); + if (mappingOpened) addPopEvent(state); + return true; +} +function parseNode(state, parentIndent, nodeContext, allowToSeek, allowCompact, allowPropertyMapping = true) { + if (state.depth >= state.maxDepth) throwError(state, `nesting exceeded maxDepth (${state.maxDepth})`); + state.depth++; + let indentStatus = 1; + let atNewLine = false; + let hasContent = false; + let propertyStart = null; + const props = emptyProperties(); + let allowBlockScalars = nodeContext === CONTEXT_BLOCK_OUT || nodeContext === CONTEXT_BLOCK_IN; + let allowBlockCollections = allowBlockScalars; + const allowBlockStyles = allowBlockScalars; + if (allowToSeek && skipSeparationSpace(state, true)) { + atNewLine = true; + if (state.lineIndent > parentIndent) indentStatus = 1; + else if (state.lineIndent === parentIndent) indentStatus = 0; + else indentStatus = -1; + } + if (indentStatus === 1) while (true) { + const ch = state.input.charCodeAt(state.position); + const propertyState = snapshotState(state); + if (atNewLine && indentStatus !== 1 && (ch === 33 || ch === 38)) break; + if (atNewLine && allowBlockStyles && (props.tagStart !== NO_RANGE$1 || props.anchorStart !== NO_RANGE$1) && (ch === 33 || ch === 38)) { + const fallbackState = snapshotState(state); + const flowIndent = parentIndent + 1; + if (readBlockMapping(state, state.position - state.lineStart, flowIndent, props) && state.events[fallbackState.eventsLength]?.type === EVENT_ID.MAPPING) { + state.depth--; + return true; + } + restoreState(state, fallbackState); + } + if (atNewLine && (ch === 33 && props.tagStart !== NO_RANGE$1 || ch === 38 && props.anchorStart !== NO_RANGE$1)) break; + if (!readTagProperty(state, props, nodeContext === CONTEXT_FLOW_IN) && !readAnchorProperty(state, props)) break; + if (propertyStart === null) propertyStart = propertyState; + if (skipSeparationSpace(state, true)) { + atNewLine = true; + allowBlockCollections = allowBlockStyles; + if (state.lineIndent > parentIndent) indentStatus = 1; + else if (state.lineIndent === parentIndent) indentStatus = 0; + else indentStatus = -1; + } else allowBlockCollections = false; + } + if (allowBlockCollections) allowBlockCollections = atNewLine || allowCompact; + if (indentStatus === 1 || nodeContext === CONTEXT_BLOCK_OUT) { + const flowIndent = nodeContext === CONTEXT_FLOW_IN || nodeContext === CONTEXT_FLOW_OUT ? parentIndent : parentIndent + 1; + const blockIndent = state.position - state.lineStart; + if (indentStatus === 1) if (allowBlockCollections && (readBlockSequence(state, blockIndent, props) || readBlockMapping(state, blockIndent, flowIndent, props)) || readFlowCollection(state, flowIndent, props)) hasContent = true; + else { + const ch = state.input.charCodeAt(state.position); + if (propertyStart !== null && allowPropertyMapping && allowBlockStyles && !allowBlockCollections && ch !== 124 && ch !== 62) { + const fallbackState = snapshotState(state); + const propertyIndent = propertyStart.position - propertyStart.lineStart; + restoreState(state, propertyStart); + if (readBlockMapping(state, propertyIndent, flowIndent, emptyProperties()) && state.events[fallbackState.eventsLength]?.type === EVENT_ID.MAPPING) hasContent = true; + else restoreState(state, fallbackState); + } + if (!hasContent && (allowBlockScalars && readBlockScalar(state, flowIndent, props) || readSingleQuotedScalar(state, flowIndent, props) || readDoubleQuotedScalar(state, flowIndent, props) || readAlias(state, props) || readPlainScalar(state, flowIndent, nodeContext, props))) hasContent = true; + } + else if (indentStatus === 0) hasContent = allowBlockCollections && readBlockSequence(state, blockIndent, props); + } + allowBlockScalars = allowBlockScalars && !hasContent; + if (!hasContent && (props.anchorStart !== NO_RANGE$1 || props.tagStart !== NO_RANGE$1 || allowBlockScalars)) { + addScalarEvent(state, NO_RANGE$1, NO_RANGE$1, props.anchorStart, props.anchorEnd, props.tagStart, props.tagEnd, SCALAR_STYLE.PLAIN); + hasContent = true; + } + state.depth--; + return hasContent || props.anchorStart !== NO_RANGE$1 || props.tagStart !== NO_RANGE$1; +} +function readDirective(state) { + if (state.lineIndent > 0 || state.input.charCodeAt(state.position) !== 37) return false; + state.position++; + const nameStart = state.position; + while (state.input.charCodeAt(state.position) !== 0 && !isWsOrEol(state.input.charCodeAt(state.position))) state.position++; + const name = state.input.slice(nameStart, state.position); + const args = []; + if (name.length === 0) throwError(state, "directive name must not be less than one character in length"); + while (state.input.charCodeAt(state.position) !== 0 && !isEol(state.input.charCodeAt(state.position))) { + while (isWhiteSpace(state.input.charCodeAt(state.position))) state.position++; + if (state.input.charCodeAt(state.position) === 35 || isEol(state.input.charCodeAt(state.position)) || state.input.charCodeAt(state.position) === 0) break; + const start = state.position; + while (state.input.charCodeAt(state.position) !== 0 && !isWsOrEol(state.input.charCodeAt(state.position))) state.position++; + args.push(state.input.slice(start, state.position)); + } + if (isEol(state.input.charCodeAt(state.position))) consumeLineBreak(state); + if (name === "YAML") { + if (state.directives.some((directive) => directive.kind === "yaml")) throwError(state, "duplication of %YAML directive"); + if (args.length !== 1) throwError(state, "YAML directive accepts exactly one argument"); + const match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]); + if (match === null) throwError(state, "ill-formed argument of the YAML directive"); + if (parseInt(match[1], 10) !== 1) throwError(state, "unacceptable YAML version of the document"); + state.directives.push({ + kind: "yaml", + version: args[0] + }); + } else if (name === "TAG") { + if (args.length !== 2) throwError(state, "TAG directive accepts exactly two arguments"); + const [handle, prefix] = args; + if (!PATTERN_TAG_HANDLE.test(handle)) throwError(state, "ill-formed tag handle (first argument) of the TAG directive"); + if (HAS_OWN.call(state.tagHandlers, handle)) throwError(state, `there is a previously declared suffix for "${handle}" tag handle`); + if (!PATTERN_TAG_PREFIX.test(prefix)) throwError(state, "ill-formed tag prefix (second argument) of the TAG directive"); + state.tagHandlers[handle] = prefix; + state.directives.push({ + kind: "tag", + handle, + prefix + }); + } + return true; } - -// Simplified test for values allowed as the last character in plain style. -function isPlainSafeLast(c) { - // just not whitespace or colon, it will be checked to be plain character later - return !isWhitespace(c) && c !== CHAR_COLON; +function readDocument(state) { + state.directives = []; + state.tagHandlers = Object.create(null); + let hasDirectives = false; + skipSeparationSpace(state, true); + while (readDirective(state)) { + hasDirectives = true; + skipSeparationSpace(state, true); + } + let explicitStart = false; + let explicitEnd = false; + let allowCompact = true; + if (state.lineIndent === 0 && state.input.charCodeAt(state.position) === 45 && state.input.charCodeAt(state.position + 1) === 45 && state.input.charCodeAt(state.position + 2) === 45 && isWsOrEolOrEnd(state.input.charCodeAt(state.position + 3))) { + explicitStart = true; + const markerLine = state.line; + state.position += 3; + skipSeparationSpace(state, true); + allowCompact = state.line > markerLine; + } else if (hasDirectives) throwError(state, "directives end mark is expected"); + const documentEventIndex = state.events.length; + if (!explicitStart && state.position === state.lineStart && state.input.charCodeAt(state.position) === 46 && testDocumentSeparator(state)) { + state.position += 3; + skipSeparationSpace(state, true); + return; + } + addDocumentEvent(state, explicitStart, false); + if (!parseNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, allowCompact, allowCompact)) addEmptyScalarEvent(state); + skipSeparationSpace(state, true); + if (state.position === state.lineStart && testDocumentSeparator(state)) { + explicitEnd = state.input.charCodeAt(state.position) === 46; + if (explicitEnd) { + const markerLine = state.line; + state.position += 3; + skipSeparationSpace(state, true); + if (state.line === markerLine && state.position < state.length) throwError(state, "end of the stream or a document separator is expected"); + } + } + const documentEvent = state.events[documentEventIndex]; + if (documentEvent?.type === EVENT_ID.DOCUMENT) documentEvent.explicitEnd = explicitEnd; + addPopEvent(state); + if (!explicitEnd && state.position < state.length && !testDocumentBoundary(state)) throwError(state, "end of the stream or a document separator is expected"); +} +/** +* Parses YAML into a flat event stream referencing source text by offsets. +* +* @category Events +*/ +function parseEvents(input, options) { + const length = input.length; + const state = { + ...DEFAULT_PARSER_OPTIONS, + ...options, + input: `${input}\0`, + length, + position: 0, + line: 0, + lineStart: 0, + lineIndent: 0, + firstTabInLine: -1, + depth: 0, + directives: [], + tagHandlers: Object.create(null), + events: [] + }; + const nullpos = input.indexOf("\0"); + if (nullpos !== -1) YAMLException.throwAt(input, nullpos, "null byte is not allowed in input", state.filename); + while (state.position < state.length) { + skipByteOrderMark(state); + skipSeparationSpace(state, true); + if (state.position >= state.length) break; + const documentStart = state.position; + readDocument(state); + if (state.position === documentStart) + /* c8 ignore next */ + throwError(state, "can not read a document"); + } + return state.events; +} +//#endregion +//#region src/load.ts +var DEFAULT_LOAD_OPTIONS = { + ...DEFAULT_PARSER_OPTIONS, + ...DEFAULT_CONSTRUCTOR_OPTIONS +}; +function loadDocuments(input, options = {}) { + const opts = { + ...DEFAULT_LOAD_OPTIONS, + ...options + }; + const source = String(input); + const PARSER_OPT_KEYS = Object.keys(DEFAULT_PARSER_OPTIONS); + const CONSTRUCTOR_OPT_KEYS = Object.keys(DEFAULT_CONSTRUCTOR_OPTIONS); + return constructFromEvents(parseEvents(source, pick(opts, PARSER_OPT_KEYS)), { + ...pick(opts, CONSTRUCTOR_OPT_KEYS), + source + }); +} +function loadAll(input, iteratorOrOptions, options) { + let iterator = null; + if (typeof iteratorOrOptions === "function") iterator = iteratorOrOptions; + else if (iteratorOrOptions !== null && typeof iteratorOrOptions === "object") options = iteratorOrOptions; + const documents = loadDocuments(input, options); + if (iterator === null) return documents; + for (const document of documents) iterator(document); +} +/** +* Parses `string` as a single YAML document. Throws {@link YAMLException} on +* error. This function does not understand multi-document or empty sources; it +* throws an exception on those. +* +* > [!NOTE] +* > 1. When processing untrusted input, see the +* > [security considerations](../docs/safety.md). +* > 2. All exceptions MUST be caught, not just {@link YAMLException}. +* > 3. The default {@link CORE_SCHEMA} comes without the `!!merge` tag. You can +* > easily enable it if needed. +* > 4. The default {@link mapTag} is `{}`-object based, with known limitations +* > (see description). For full compatibility use {@link realMapTag} +* > instead (it uses native JS `Map`). +* +* @example +* Enable {@link mergeTag} and {@link realMapTag}: +* +* ```javascript +* import { load, CORE_SCHEMA, mergeTag, realMapTag } from 'js-yaml' +* +* try { +* load(data, { schema: CORE_SCHEMA.withTags(mergeTag, realMapTag) }) +* } catch (e) { +* console.error(e) +* } +* ``` +* +* @category Main +*/ +function load(input, options) { + const documents = loadDocuments(input, options); + if (documents.length === 0) throw new YAMLException("expected a document, but the input is empty"); + if (documents.length === 1) return documents[0]; + throw new YAMLException("expected a single document in the stream, but found more"); +} +//#endregion +//#region src/ast/from_js.ts +var INVALID = Symbol("INVALID"); +function buildRepresentTypes(schema) { + const defaultTags = new Set([ + schema.defaultScalarTag, + schema.defaultSequenceTag, + schema.defaultMappingTag + ].filter((t) => t !== void 0)); + const implicitScalars = schema.implicitScalarTags; + const explicitTags = schema.tags.filter((t) => !(t.nodeKind === "scalar" && t.implicit) && !defaultTags.has(t)); + const defaultTagsLast = schema.tags.filter((t) => defaultTags.has(t)); + return [ + ...implicitScalars.map((tag) => ({ + tag, + implicitTag: true + })), + ...explicitTags.map((tag) => ({ + tag, + implicitTag: false + })), + ...defaultTagsLast.map((tag) => ({ + tag, + implicitTag: true + })) + ]; +} +function matchTag(state, object) { + for (let index = 0, length = state.representTypes.length; index < length; index += 1) { + const { tag, implicitTag } = state.representTypes[index]; + if (tag.identify(object)) { + let tagName; + if (tag.matchByTagPrefix) tagName = tag.representTagName(object); + else tagName = tag.tagName; + return { + tag, + tagName, + implicitTag + }; + } + } + return null; +} +function build(state, object) { + if (!state.noRefs && object !== null && typeof object === "object") { + const existing = state.refs.get(object); + if (existing) { + if (existing.anchor === void 0) existing.anchor = `ref_${state.refCounter++}`; + return { + kind: "alias", + anchor: existing.anchor + }; + } + } + const matched = matchTag(state, object); + if (!matched) { + if (object === void 0) return INVALID; + if (state.skipInvalid) return INVALID; + throw new YAMLException(`unacceptable kind of an object to dump ${Object.prototype.toString.call(object)}`); + } + const { tag, tagName, implicitTag } = matched; + const nodeTagName = implicitTag ? tagName : tagNameShort(tagName); + if (tag.nodeKind === "scalar") return { + kind: "scalar", + tag: nodeTagName, + tagged: !implicitTag, + style: SCALAR_STYLE.PLAIN, + value: tag.represent(object) + }; + if (tag.nodeKind === "sequence") { + const container = tag.represent(object); + const node = { + kind: "sequence", + tag: nodeTagName, + tagged: !implicitTag, + style: COLLECTION_STYLE.BLOCK, + items: [] + }; + if (!state.noRefs) state.refs.set(object, node); + for (let index = 0, length = container.length; index < length; index += 1) { + let item = build(state, container[index]); + if (item === INVALID && container[index] === void 0) item = build(state, null); + if (item === INVALID) continue; + node.items.push(item); + } + return node; + } + const map = tag.represent(object); + const node = { + kind: "mapping", + tag: nodeTagName, + tagged: !implicitTag, + style: COLLECTION_STYLE.BLOCK, + items: [] + }; + if (!state.noRefs) state.refs.set(object, node); + for (const [objectKey, objectValue] of map) { + const key = build(state, objectKey); + if (key === INVALID) continue; + const value = build(state, objectValue); + if (value === INVALID) continue; + node.items.push({ + key, + value + }); + } + return node; +} +/** +* Convert JS object to AST. A JS value is one YAML document. An unrepresentable +* root becomes an empty document, which the presenter renders as an empty +* string. +* +* @category AST +*/ +function jsToAst(input, schema, options = {}) { + const root = build({ + representTypes: buildRepresentTypes(schema), + noRefs: options.noRefs ?? false, + skipInvalid: options.skipInvalid ?? false, + refs: /* @__PURE__ */ new Map(), + refCounter: 0 + }, input); + return [{ + contents: root === INVALID ? null : root, + directives: [] + }]; +} +//#endregion +//#region src/ast/visit.ts +/** +* Return from a visitor to stop the whole traversal. +* +* @category AST +*/ +var VISIT_BREAK = Symbol("visit:break"); +/** +* Return from a visitor to skip the current node's children. +* +* @category AST +*/ +var VISIT_SKIP = Symbol("visit:skip"); +function visitNode(node, visitor, ctx) { + const control = visitor(node, ctx); + if (control === VISIT_BREAK) return true; + if (control === VISIT_SKIP) return false; + const depth = ctx.depth + 1; + switch (node.kind) { + case "sequence": + for (const item of node.items) if (visitNode(item, visitor, { + depth, + parent: node, + isKey: false + })) return true; + break; + case "mapping": + for (const { key, value } of node.items) { + if (visitNode(key, visitor, { + depth, + parent: node, + isKey: true + })) return true; + if (visitNode(value, visitor, { + depth, + parent: node, + isKey: false + })) return true; + } + break; + } + return false; +} +/** +* Walk every node in the documents, calling {@link Visitor} once per +* node (pre-order). +* +* @category AST +*/ +function visit(documents, visitor) { + for (const doc of documents) if (doc.contents && visitNode(doc.contents, visitor, { + depth: 0, + parent: null, + isKey: false + })) return; +} +//#endregion +//#region src/ast/styler_defaults.ts +function hasBit(mask, bit) { + return (mask & 1 << bit) !== 0; +} +/** +* Default scalar styling rules in application order. +* See [Scalar styling](../../docs/scalar_styling.md) for usage details. +* +* @category AST +*/ +var DEFAULT_SCALAR_STYLE_RULES = { + applyQuoteFlowKeysOption, + doubleQuoteForInvisibles, + doubleQuoteWhitespaceOnly, + applyForceQuotesOption, + tryLongOrMultilineAsBlock, + quoteInvalidPlain, + fallbackToDoubleQuoted +}; +function _preferredQuotedStyle(layout) { + if (layout.presenterOptions.quoteStyle === "single" && hasBit(layout.allowedStylesMask, SCALAR_STYLE.SINGLE_QUOTED)) return SCALAR_STYLE.SINGLE_QUOTED; + return SCALAR_STYLE.DOUBLE_QUOTED; +} +function applyQuoteFlowKeysOption(layout) { + if (!layout.presenterOptions.quoteFlowKeys) return; + if (!layout.isKey || !layout.flowOnly || layout.style !== SCALAR_STYLE.PLAIN) return; + layout.style = SCALAR_STYLE.DOUBLE_QUOTED; +} +function doubleQuoteForInvisibles(layout) { + if (layout.style === SCALAR_STYLE.PLAIN && /[\t\x7F-\xA0\u2028\u2029\uFEFF\uFFFE\uFFFF]/.test(layout.node.value)) layout.style = SCALAR_STYLE.DOUBLE_QUOTED; +} +function doubleQuoteWhitespaceOnly(layout) { + if (layout.style === SCALAR_STYLE.PLAIN && /^\s+$/.test(layout.node.value)) layout.style = SCALAR_STYLE.DOUBLE_QUOTED; +} +function applyForceQuotesOption(layout) { + if (!layout.presenterOptions.forceQuotes) return; + if (layout.isKey || layout.style !== SCALAR_STYLE.PLAIN) return; + layout.style = layout.node.value.includes("\n") ? SCALAR_STYLE.DOUBLE_QUOTED : _preferredQuotedStyle(layout); +} +function tryLongOrMultilineAsBlock(layout) { + if (layout.style !== SCALAR_STYLE.PLAIN || layout.isKey) return; + const value = layout.node.value; + const multiline = value.indexOf("\n") !== -1; + if (!hasBit(layout.allowedStylesMask, SCALAR_STYLE.LITERAL_BLOCK)) { + if (multiline) layout.style = SCALAR_STYLE.DOUBLE_QUOTED; + return; + } + const w = layout.presenterOptions.lineWidth; + if (w === -1) { + if (multiline) layout.style = SCALAR_STYLE.LITERAL_BLOCK; + return; + } + const availableWidth = Math.max(Math.min(w, 40), w - layout.shiftOfContent); + let position = 0; + let shouldFold = false; + while (position <= value.length) { + let lineEnd = value.length; + const nextLineBreak = value.indexOf("\n", position); + if (nextLineBreak !== -1) lineEnd = nextLineBreak; + const line = value.slice(position, lineEnd); + if (line.length > availableWidth && line[0] !== " " && / [^ \t]/.test(line)) shouldFold = true; + if (nextLineBreak === -1) break; + position = nextLineBreak + 1; + } + if (shouldFold) layout.style = SCALAR_STYLE.FOLDED_BLOCK; + else if (multiline) layout.style = SCALAR_STYLE.LITERAL_BLOCK; +} +function quoteInvalidPlain(layout) { + if (layout.style === SCALAR_STYLE.PLAIN && !hasBit(layout.allowedStylesMask, SCALAR_STYLE.PLAIN)) layout.style = _preferredQuotedStyle(layout); +} +function fallbackToDoubleQuoted(layout) { + if (!hasBit(layout.allowedStylesMask, layout.style)) layout.style = SCALAR_STYLE.DOUBLE_QUOTED; +} +//#endregion +//#region src/ast/scalar_styler.ts +function setBit(mask, bit) { + return mask | 1 << bit; +} +var SRC_C_PRINTABLE = "[\\x09\\x0A\\x0D\\x20-\\x7E\\x85\\xA0-\\uD7FF\\uE000-\\uFFFD\\u{10000}-\\u{10FFFF}]"; +var SRC_B_CHAR = "[\\n\\r]"; +var SRC_C_BYTE_ORDER_MARK = "\\uFEFF"; +var SRC_S_WHITE = "[ \\t]"; +var SRC_NB_CHAR = `(?:(?!(?:${SRC_B_CHAR}|${SRC_C_BYTE_ORDER_MARK}))${SRC_C_PRINTABLE})`; +var SRC_NS_CHAR = `(?:(?!${SRC_S_WHITE})${SRC_NB_CHAR})`; +var SRC_NB_JSON = "[\\x09\\x20-\\uD7FF\\uE000-\\uFFFF\\u{10000}-\\u{10FFFF}]"; +var SRC_C_INDICATOR = "[-?:,\\[\\]{}#&*!|>'\"%@`]"; +var SRC_C_FLOW_INDICATOR = "[,\\[\\]{}]"; +var SRC_NS_PLAIN_SAFE_FLOW_OUT = SRC_NS_CHAR; +var SRC_NS_PLAIN_SAFE_FLOW_IN = `(?:(?!${SRC_C_FLOW_INDICATOR})${SRC_NS_CHAR})`; +var SRC_NS_PLAIN_FIRST_FLOW_OUT = `(?:(?:(?!${SRC_C_INDICATOR})${SRC_NS_CHAR})|[?:-](?=${SRC_NS_PLAIN_SAFE_FLOW_OUT}))`; +var SRC_NS_PLAIN_FIRST_FLOW_IN = `(?:(?:(?!${SRC_C_INDICATOR})${SRC_NS_CHAR})|[?:-](?=${SRC_NS_PLAIN_SAFE_FLOW_IN}))`; +var SRC_NS_PLAIN_CHAR_FLOW_OUT = `(?:(?:(?![:#])${SRC_NS_PLAIN_SAFE_FLOW_OUT})|:(?=${SRC_NS_PLAIN_SAFE_FLOW_OUT}))#*`; +var SRC_NS_PLAIN_CHAR_FLOW_IN = `(?:(?:(?![:#])${SRC_NS_PLAIN_SAFE_FLOW_IN})|:(?=${SRC_NS_PLAIN_SAFE_FLOW_IN}))#*`; +var SRC_NB_NS_PLAIN_IN_LINE_FLOW_OUT = `(?:${SRC_S_WHITE}*${SRC_NS_PLAIN_CHAR_FLOW_OUT})*`; +var SRC_NB_NS_PLAIN_IN_LINE_FLOW_IN = `(?:${SRC_S_WHITE}*${SRC_NS_PLAIN_CHAR_FLOW_IN})*`; +var SRC_NS_PLAIN_ONE_LINE_FLOW_OUT = `${SRC_NS_PLAIN_FIRST_FLOW_OUT}#*${SRC_NB_NS_PLAIN_IN_LINE_FLOW_OUT}`; +var SRC_NS_PLAIN_ONE_LINE_FLOW_IN = `${SRC_NS_PLAIN_FIRST_FLOW_IN}#*${SRC_NB_NS_PLAIN_IN_LINE_FLOW_IN}`; +var SRC_NS_PLAIN_ONE_LINE_BLOCK_KEY = SRC_NS_PLAIN_ONE_LINE_FLOW_OUT; +var SRC_NS_PLAIN_ONE_LINE_FLOW_KEY = SRC_NS_PLAIN_ONE_LINE_FLOW_IN; +var SRC_S_NS_PLAIN_NEXT_LINE_FLOW_OUT = `\\n+${SRC_NS_PLAIN_CHAR_FLOW_OUT}${SRC_NB_NS_PLAIN_IN_LINE_FLOW_OUT}`; +var SRC_S_NS_PLAIN_NEXT_LINE_FLOW_IN = `\\n+${SRC_NS_PLAIN_CHAR_FLOW_IN}${SRC_NB_NS_PLAIN_IN_LINE_FLOW_IN}`; +var SRC_NS_PLAIN_MULTI_LINE_FLOW_OUT = `${SRC_NS_PLAIN_ONE_LINE_FLOW_OUT}(?:${SRC_S_NS_PLAIN_NEXT_LINE_FLOW_OUT})*`; +var SRC_NS_PLAIN_MULTI_LINE_FLOW_IN = `${SRC_NS_PLAIN_ONE_LINE_FLOW_IN}(?:${SRC_S_NS_PLAIN_NEXT_LINE_FLOW_IN})*`; +var NS_PLAIN_FLOW_OUT = new RegExp(`^(?:${SRC_NS_PLAIN_MULTI_LINE_FLOW_OUT})$`, "u"); +var NS_PLAIN_FLOW_IN = new RegExp(`^(?:${SRC_NS_PLAIN_MULTI_LINE_FLOW_IN})$`, "u"); +var NS_PLAIN_BLOCK_KEY = new RegExp(`^(?:${SRC_NS_PLAIN_ONE_LINE_BLOCK_KEY})$`, "u"); +var NS_PLAIN_FLOW_KEY = new RegExp(`^(?:${SRC_NS_PLAIN_ONE_LINE_FLOW_KEY})$`, "u"); +var NB_SINGLE_ONE_LINE = new RegExp(`^(?:${SRC_NB_JSON})*$`, "u"); +var NB_SINGLE_MULTI_LINE = new RegExp(`^(?:${SRC_NB_JSON}|\\n)*$`, "u"); +var BLOCK_SCALAR_CONTENT = new RegExp(`^(?:${SRC_NB_CHAR}|\\n)*$`, "u"); +var C_FORBIDDEN_FIRST_LINE = /^(?:---|\.\.\.)(?=$|[ \t\n\r])/; +var C_FORBIDDEN_CONTENT = /^(?:---|\.\.\.)(?=$|[ \t\n\r])/m; +function canUsePlain(layout) { + const str = layout.node.value; + if (str !== "") { + if (!(layout.isKey ? layout.flowOnly ? NS_PLAIN_FLOW_KEY : NS_PLAIN_BLOCK_KEY : layout.flowOnly ? NS_PLAIN_FLOW_IN : NS_PLAIN_FLOW_OUT).test(str)) return false; + if (layout.shiftOfFirstLine === 0 && C_FORBIDDEN_FIRST_LINE.test(str)) return false; + if (layout.shiftOfContent === 0) { + const firstLineBreak = str.indexOf("\n"); + if (firstLineBreak !== -1) { + const content = str.slice(firstLineBreak + 1); + if (C_FORBIDDEN_CONTENT.test(content)) return false; + } + } + } + const resolvedTag = layout.presenterOptions.schema.resolveImplicitScalarTag(str).tag.tagName; + if (!layout.node.tagged && resolvedTag !== layout.node.tag) return false; + if (!layout.node.tagged && str === "=" && resolvedTag === layout.presenterOptions.schema.defaultScalarTag.tagName) return false; + return true; +} +function canUseSingleQuoted(layout) { + const str = layout.node.value; + if (!(layout.isKey ? NB_SINGLE_ONE_LINE : NB_SINGLE_MULTI_LINE).test(str)) return false; + if (/[ \t]\n|\n[ \t]/.test(str)) return false; + if (!layout.isKey && layout.shiftOfContent === 0) { + const firstLineBreak = str.indexOf("\n"); + if (firstLineBreak !== -1 && C_FORBIDDEN_CONTENT.test(str.slice(firstLineBreak + 1))) return false; + } + return true; +} +function canUseBlock(layout) { + if (layout.flowOnly || !BLOCK_SCALAR_CONTENT.test(layout.node.value)) return false; + const contentIndent = layout.shiftOfContent - layout.shiftOfParent; + if (contentIndent < 1) return false; + if (contentIndent > 9 && /^\n* /.test(layout.node.value)) return false; + if (layout.shiftOfContent === 0 && C_FORBIDDEN_CONTENT.test(layout.node.value)) return false; + return true; +} +function detectAllowedStyles(layout) { + let mask = setBit(0, SCALAR_STYLE.DOUBLE_QUOTED); + if (canUsePlain(layout)) mask = setBit(mask, SCALAR_STYLE.PLAIN); + if (canUseSingleQuoted(layout)) mask = setBit(mask, SCALAR_STYLE.SINGLE_QUOTED); + if (canUseBlock(layout)) mask = setBit(setBit(mask, SCALAR_STYLE.LITERAL_BLOCK), SCALAR_STYLE.FOLDED_BLOCK); + layout.allowedStylesMask = mask; +} +function renderScalar(layout) { + switch (layout.style) { + case SCALAR_STYLE.PLAIN: return renderPlain(layout); + case SCALAR_STYLE.SINGLE_QUOTED: return renderSingleQuoted(layout); + case SCALAR_STYLE.LITERAL_BLOCK: return renderLiteralBlock(layout); + case SCALAR_STYLE.FOLDED_BLOCK: return renderFoldedBlock(layout); + case SCALAR_STYLE.DOUBLE_QUOTED: return renderDoubleQuoted(layout); + } +} +function renderPlain(layout) { + return encodeFlowBreaks(layout.node.value, layout.shiftOfContent); +} +function renderSingleQuoted(layout) { + return `'${encodeFlowBreaks(layout.node.value, layout.shiftOfContent).replace(/'/g, "''")}'`; +} +function renderLiteralBlock(layout) { + const value = layout.node.value; + return "|" + blockHeader(value, layout.shiftOfParent, layout.shiftOfContent) + dropEndingNewline(indentString(value, layout.shiftOfContent)); +} +function renderFoldedBlock(layout) { + const value = layout.node.value; + const w = layout.presenterOptions.lineWidth; + let availableWidth = Infinity; + if (w !== -1) availableWidth = Math.max(Math.min(w, 40), w - layout.shiftOfContent); + return ">" + blockHeader(value, layout.shiftOfParent, layout.shiftOfContent) + dropEndingNewline(indentString(foldBlockScalar(value, availableWidth), layout.shiftOfContent)); +} +function renderDoubleQuoted(layout) { + return `"${escapeString(layout.node.value)}"`; +} +function encodeFlowBreaks(string, shiftOfContent) { + let nextLF = string.indexOf("\n"); + if (nextLF === -1) return string; + const pad = " ".repeat(shiftOfContent); + let result = string.slice(0, nextLF); + const lineRe = /(\n+)([^\n]*)/g; + lineRe.lastIndex = nextLF; + let match; + while (match = lineRe.exec(string)) { + const breaks = match[1].length; + const line = match[2]; + result += "\n".repeat(breaks + 1) + pad + line; + } + return result; } - -// Same as 'string'.codePointAt(pos), but works in older browsers. -function codePointAt(string, pos) { - var first = string.charCodeAt(pos), second; - if (first >= 0xD800 && first <= 0xDBFF && pos + 1 < string.length) { - second = string.charCodeAt(pos + 1); - if (second >= 0xDC00 && second <= 0xDFFF) { - // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae - return (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000; - } - } - return first; +function indentString(string, spaces) { + const indent = " ".repeat(spaces); + let position = 0; + let result = ""; + const length = string.length; + while (position < length) { + let line; + const next = string.indexOf("\n", position); + if (next === -1) { + line = string.slice(position); + position = length; + } else { + line = string.slice(position, next + 1); + position = next + 1; + } + if (line.length && line !== "\n") result += indent; + result += line; + } + return result; } - -// Determines whether block indentation indicator is required. function needIndentIndicator(string) { - var leadingSpaceRe = /^\n* /; - return leadingSpaceRe.test(string); + return /^\n* /.test(string); } - -var STYLE_PLAIN = 1, - STYLE_SINGLE = 2, - STYLE_LITERAL = 3, - STYLE_FOLDED = 4, - STYLE_DOUBLE = 5; - -// Determines which scalar styles are possible and returns the preferred style. -// lineWidth = -1 => no limit. -// Pre-conditions: str.length > 0. -// Post-conditions: -// STYLE_PLAIN or STYLE_SINGLE => no \n are in the string. -// STYLE_LITERAL => no lines are suitable for folding (or lineWidth is -1). -// STYLE_FOLDED => a line > lineWidth and can be folded (and lineWidth != -1). -function chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth, - testAmbiguousType, quotingType, forceQuotes, inblock) { - - var i; - var char = 0; - var prevChar = null; - var hasLineBreak = false; - var hasFoldableLine = false; // only checked if shouldTrackWidth - var shouldTrackWidth = lineWidth !== -1; - var previousLineBreak = -1; // count the first line correctly - var plain = isPlainSafeFirst(codePointAt(string, 0)) - && isPlainSafeLast(codePointAt(string, string.length - 1)); - - if (singleLineOnly || forceQuotes) { - // Case: no block styles. - // Check for disallowed characters to rule out plain and single. - for (i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) { - char = codePointAt(string, i); - if (!isPrintable(char)) { - return STYLE_DOUBLE; - } - plain = plain && isPlainSafe(char, prevChar, inblock); - prevChar = char; - } - } else { - // Case: block styles permitted. - for (i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) { - char = codePointAt(string, i); - if (char === CHAR_LINE_FEED) { - hasLineBreak = true; - // Check if any line can be folded. - if (shouldTrackWidth) { - hasFoldableLine = hasFoldableLine || - // Foldable line = too long, and not more-indented. - (i - previousLineBreak - 1 > lineWidth && - string[previousLineBreak + 1] !== ' '); - previousLineBreak = i; - } - } else if (!isPrintable(char)) { - return STYLE_DOUBLE; - } - plain = plain && isPlainSafe(char, prevChar, inblock); - prevChar = char; - } - // in case the end is missing a \n - hasFoldableLine = hasFoldableLine || (shouldTrackWidth && - (i - previousLineBreak - 1 > lineWidth && - string[previousLineBreak + 1] !== ' ')); - } - // Although every style can represent \n without escaping, prefer block styles - // for multiline, since they're more readable and they don't add empty lines. - // Also prefer folding a super-long line. - if (!hasLineBreak && !hasFoldableLine) { - // Strings interpretable as another type have to be quoted; - // e.g. the string 'true' vs. the boolean true. - if (plain && !forceQuotes && !testAmbiguousType(string)) { - return STYLE_PLAIN; - } - return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE; - } - // Edge case: block indentation indicator can only have one digit. - if (indentPerLevel > 9 && needIndentIndicator(string)) { - return STYLE_DOUBLE; - } - // At this point we know block styles are valid. - // Prefer literal style unless we want to fold. - if (!forceQuotes) { - return hasFoldableLine ? STYLE_FOLDED : STYLE_LITERAL; - } - return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE; -} - -// Note: line breaking/folding is implemented for only the folded style. -// NB. We drop the last trailing newline (if any) of a returned block scalar -// since the dumper adds its own newline. This always works: -// • No ending newline => unaffected; already using strip "-" chomping. -// • Ending newline => removed then restored. -// Importantly, this keeps the "+" chomp indicator from gaining an extra line. -function writeScalar(state, string, level, iskey, inblock) { - state.dump = (function () { - if (string.length === 0) { - return state.quotingType === QUOTING_TYPE_DOUBLE ? '""' : "''"; - } - if (!state.noCompatMode) { - if (DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1 || DEPRECATED_BASE60_SYNTAX.test(string)) { - return state.quotingType === QUOTING_TYPE_DOUBLE ? ('"' + string + '"') : ("'" + string + "'"); - } - } - - var indent = state.indent * Math.max(1, level); // no 0-indent scalars - // As indentation gets deeper, let the width decrease monotonically - // to the lower bound min(state.lineWidth, 40). - // Note that this implies - // state.lineWidth ≤ 40 + state.indent: width is fixed at the lower bound. - // state.lineWidth > 40 + state.indent: width decreases until the lower bound. - // This behaves better than a constant minimum width which disallows narrower options, - // or an indent threshold which causes the width to suddenly increase. - var lineWidth = state.lineWidth === -1 - ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent); - - // Without knowing if keys are implicit/explicit, assume implicit for safety. - var singleLineOnly = iskey - // No block styles in flow mode. - || (state.flowLevel > -1 && level >= state.flowLevel); - function testAmbiguity(string) { - return testImplicitResolving(state, string); - } - - switch (chooseScalarStyle(string, singleLineOnly, state.indent, lineWidth, - testAmbiguity, state.quotingType, state.forceQuotes && !iskey, inblock)) { - - case STYLE_PLAIN: - return string; - case STYLE_SINGLE: - return "'" + string.replace(/'/g, "''") + "'"; - case STYLE_LITERAL: - return '|' + blockHeader(string, state.indent) - + dropEndingNewline(indentString(string, indent)); - case STYLE_FOLDED: - return '>' + blockHeader(string, state.indent) - + dropEndingNewline(indentString(foldString(string, lineWidth), indent)); - case STYLE_DOUBLE: - return '"' + escapeString(string) + '"'; - default: - throw new exception('impossible error: invalid scalar style'); - } - }()); -} - -// Pre-conditions: string is valid for a block scalar, 1 <= indentPerLevel <= 9. -function blockHeader(string, indentPerLevel) { - var indentIndicator = needIndentIndicator(string) ? String(indentPerLevel) : ''; - - // note the special case: the string '\n' counts as a "trailing" empty line. - var clip = string[string.length - 1] === '\n'; - var keep = clip && (string[string.length - 2] === '\n' || string === '\n'); - var chomp = keep ? '+' : (clip ? '' : '-'); - - return indentIndicator + chomp + '\n'; +function blockHeader(string, shiftOfParent, shiftOfContent) { + const indentIndicator = needIndentIndicator(string) ? String(shiftOfContent - shiftOfParent) : ""; + const clip = string[string.length - 1] === "\n"; + return `${indentIndicator}${clip && (string[string.length - 2] === "\n" || string === "\n") ? "+" : clip ? "" : "-"}\n`; } - -// (See the note for writeScalar.) function dropEndingNewline(string) { - return string[string.length - 1] === '\n' ? string.slice(0, -1) : string; + return string[string.length - 1] === "\n" ? string.slice(0, -1) : string; } - -// Note: a long line without a suitable break point will exceed the width limit. -// Pre-conditions: every char in str isPrintable, str.length > 0, width > 0. -function foldString(string, width) { - // In folded style, $k$ consecutive newlines output as $k+1$ newlines— - // unless they're before or after a more-indented line, or at the very - // beginning or end, in which case $k$ maps to $k$. - // Therefore, parse each chunk as newline(s) followed by a content line. - var lineRe = /(\n+)([^\n]*)/g; - - // first line (possibly an empty line) - var result = (function () { - var nextLF = string.indexOf('\n'); - nextLF = nextLF !== -1 ? nextLF : string.length; - lineRe.lastIndex = nextLF; - return foldLine(string.slice(0, nextLF), width); - }()); - // If we haven't reached the first content line yet, don't add an extra \n. - var prevMoreIndented = string[0] === '\n' || string[0] === ' '; - var moreIndented; - - // rest of the lines - var match; - while ((match = lineRe.exec(string))) { - var prefix = match[1], line = match[2]; - moreIndented = (line[0] === ' '); - result += prefix - + (!prevMoreIndented && !moreIndented && line !== '' - ? '\n' : '') - + foldLine(line, width); - prevMoreIndented = moreIndented; - } - - return result; +function isMoreIndented(char) { + return char === " " || char === " "; } - -// Greedy line breaking. -// Picks the longest line under the limit each time, -// otherwise settles for the shortest line over the limit. -// NB. More-indented lines *cannot* be folded, as that would add an extra \n. function foldLine(line, width) { - if (line === '' || line[0] === ' ') return line; - - // Since a more-indented line adds a \n, breaks can't be followed by a space. - var breakRe = / [^ ]/g; // note: the match index will always be <= length-2. - var match; - // start is an inclusive index. end, curr, and next are exclusive. - var start = 0, end, curr = 0, next = 0; - var result = ''; - - // Invariants: 0 <= start <= length-1. - // 0 <= curr <= next <= max(0, length-2). curr - start <= width. - // Inside the loop: - // A match implies length >= 2, so curr and next are <= length-2. - while ((match = breakRe.exec(line))) { - next = match.index; - // maintain invariant: curr - start <= width - if (next - start > width) { - end = (curr > start) ? curr : next; // derive end <= length-2 - result += '\n' + line.slice(start, end); - // skip the space that was output as \n - start = end + 1; // derive start <= length-1 - } - curr = next; - } - - // By the invariants, start <= length-1, so there is something left over. - // It is either the whole string or a part starting from non-whitespace. - result += '\n'; - // Insert a break if the remainder is too long and there is a break available. - if (line.length - start > width && curr > start) { - result += line.slice(start, curr) + '\n' + line.slice(curr + 1); - } else { - result += line.slice(start); - } - - return result.slice(1); // drop extra \n joiner + if (line === "" || isMoreIndented(line[0])) return line; + const breakRe = / [^ \t]/g; + let match; + let start = 0; + let end; + let curr = 0; + let next = 0; + let result = ""; + while (match = breakRe.exec(line)) { + next = match.index; + if (next - start > width) { + end = curr > start ? curr : next; + result += `\n${line.slice(start, end)}`; + start = end + 1; + } + curr = next; + } + result += "\n"; + if (line.length - start > width && curr > start) result += `${line.slice(start, curr)}\n${line.slice(curr + 1)}`; + else result += line.slice(start); + return result.slice(1); +} +function foldBlockScalar(string, width) { + const lineRe = /(\n+)([^\n]*)/g; + let nextLF = string.indexOf("\n"); + if (nextLF === -1) nextLF = string.length; + lineRe.lastIndex = nextLF; + let result = foldLine(string.slice(0, nextLF), width); + let prevMoreIndented = string[0] === "\n" || isMoreIndented(string[0]); + let moreIndented; + let match; + while (match = lineRe.exec(string)) { + const prefix = match[1]; + const line = match[2]; + moreIndented = line !== "" && isMoreIndented(line[0]); + result += prefix + (!prevMoreIndented && !moreIndented && line !== "" ? "\n" : "") + foldLine(line, width); + prevMoreIndented = moreIndented; + } + return result; +} +var CHARACTERS_TO_ESCAPE = /["\\\x00-\x1F\x7F-\xA0\u2028\u2029\uD800-\uDFFF\uFEFF\uFFFE\uFFFF]/gu; +function escapeCharacter(character) { + switch (character) { + case "\0": return "\\0"; + case "\x07": return "\\a"; + case "\b": return "\\b"; + case " ": return "\\t"; + case "\n": return "\\n"; + case "\v": return "\\v"; + case "\f": return "\\f"; + case "\r": return "\\r"; + case "\x1B": return "\\e"; + case "\"": return "\\\""; + case "\\": return "\\\\"; + case "…": return "\\N"; + case "\xA0": return "\\_"; + case "\u2028": return "\\L"; + case "\u2029": return "\\P"; + } + const code = character.charCodeAt(0); + const hex = code.toString(16).toUpperCase(); + if (code <= 255) return `\\x${"0".repeat(2 - hex.length)}${hex}`; + return `\\u${"0".repeat(4 - hex.length)}${hex}`; } - -// Escapes a double-quoted string. function escapeString(string) { - var result = ''; - var char = 0; - var escapeSeq; - - for (var i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) { - char = codePointAt(string, i); - escapeSeq = ESCAPE_SEQUENCES[char]; - - if (!escapeSeq && isPrintable(char)) { - result += string[i]; - if (char >= 0x10000) result += string[i + 1]; - } else { - result += escapeSeq || encodeHex(char); - } - } - - return result; -} - -function writeFlowSequence(state, level, object) { - var _result = '', - _tag = state.tag, - index, - length, - value; - - for (index = 0, length = object.length; index < length; index += 1) { - value = object[index]; - - if (state.replacer) { - value = state.replacer.call(object, String(index), value); - } - - // Write only valid elements, put null instead of invalid elements. - if (writeNode(state, level, value, false, false) || - (typeof value === 'undefined' && - writeNode(state, level, null, false, false))) { - - if (_result !== '') _result += ',' + (!state.condenseFlow ? ' ' : ''); - _result += state.dump; - } - } - - state.tag = _tag; - state.dump = '[' + _result + ']'; -} - -function writeBlockSequence(state, level, object, compact) { - var _result = '', - _tag = state.tag, - index, - length, - value; - - for (index = 0, length = object.length; index < length; index += 1) { - value = object[index]; - - if (state.replacer) { - value = state.replacer.call(object, String(index), value); - } - - // Write only valid elements, put null instead of invalid elements. - if (writeNode(state, level + 1, value, true, true, false, true) || - (typeof value === 'undefined' && - writeNode(state, level + 1, null, true, true, false, true))) { - - if (!compact || _result !== '') { - _result += generateNextLine(state, level); - } - - if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { - _result += '-'; - } else { - _result += '- '; - } - - _result += state.dump; - } - } - - state.tag = _tag; - state.dump = _result || '[]'; // Empty sequence if no valid values. -} - -function writeFlowMapping(state, level, object) { - var _result = '', - _tag = state.tag, - objectKeyList = Object.keys(object), - index, - length, - objectKey, - objectValue, - pairBuffer; - - for (index = 0, length = objectKeyList.length; index < length; index += 1) { - - pairBuffer = ''; - if (_result !== '') pairBuffer += ', '; - - if (state.condenseFlow) pairBuffer += '"'; - - objectKey = objectKeyList[index]; - objectValue = object[objectKey]; - - if (state.replacer) { - objectValue = state.replacer.call(object, objectKey, objectValue); - } - - if (!writeNode(state, level, objectKey, false, false)) { - continue; // Skip this pair because of invalid key; - } - - if (state.dump.length > 1024) pairBuffer += '? '; - - pairBuffer += state.dump + (state.condenseFlow ? '"' : '') + ':' + (state.condenseFlow ? '' : ' '); - - if (!writeNode(state, level, objectValue, false, false)) { - continue; // Skip this pair because of invalid value. - } - - pairBuffer += state.dump; - - // Both key and value are valid. - _result += pairBuffer; - } - - state.tag = _tag; - state.dump = '{' + _result + '}'; -} - -function writeBlockMapping(state, level, object, compact) { - var _result = '', - _tag = state.tag, - objectKeyList = Object.keys(object), - index, - length, - objectKey, - objectValue, - explicitPair, - pairBuffer; - - // Allow sorting keys so that the output file is deterministic - if (state.sortKeys === true) { - // Default sorting - objectKeyList.sort(); - } else if (typeof state.sortKeys === 'function') { - // Custom sort function - objectKeyList.sort(state.sortKeys); - } else if (state.sortKeys) { - // Something is wrong - throw new exception('sortKeys must be a boolean or a function'); - } - - for (index = 0, length = objectKeyList.length; index < length; index += 1) { - pairBuffer = ''; - - if (!compact || _result !== '') { - pairBuffer += generateNextLine(state, level); - } - - objectKey = objectKeyList[index]; - objectValue = object[objectKey]; - - if (state.replacer) { - objectValue = state.replacer.call(object, objectKey, objectValue); - } - - if (!writeNode(state, level + 1, objectKey, true, true, true)) { - continue; // Skip this pair because of invalid key. - } - - explicitPair = (state.tag !== null && state.tag !== '?') || - (state.dump && state.dump.length > 1024); - - if (explicitPair) { - if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { - pairBuffer += '?'; - } else { - pairBuffer += '? '; - } - } - - pairBuffer += state.dump; - - if (explicitPair) { - pairBuffer += generateNextLine(state, level); - } - - if (!writeNode(state, level + 1, objectValue, true, explicitPair)) { - continue; // Skip this pair because of invalid value. - } - - if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { - pairBuffer += ':'; - } else { - pairBuffer += ': '; - } - - pairBuffer += state.dump; - - // Both key and value are valid. - _result += pairBuffer; - } - - state.tag = _tag; - state.dump = _result || '{}'; // Empty mapping if no valid pairs. -} - -function detectType(state, object, explicit) { - var _result, typeList, index, length, type, style; - - typeList = explicit ? state.explicitTypes : state.implicitTypes; - - for (index = 0, length = typeList.length; index < length; index += 1) { - type = typeList[index]; - - if ((type.instanceOf || type.predicate) && - (!type.instanceOf || ((typeof object === 'object') && (object instanceof type.instanceOf))) && - (!type.predicate || type.predicate(object))) { - - if (explicit) { - if (type.multi && type.representName) { - state.tag = type.representName(object); - } else { - state.tag = type.tag; - } - } else { - state.tag = '?'; - } - - if (type.represent) { - style = state.styleMap[type.tag] || type.defaultStyle; - - if (_toString.call(type.represent) === '[object Function]') { - _result = type.represent(object, style); - } else if (_hasOwnProperty.call(type.represent, style)) { - _result = type.represent[style](object, style); - } else { - throw new exception('!<' + type.tag + '> tag resolver accepts not "' + style + '" style'); - } - - state.dump = _result; - } - - return true; - } - } - - return false; -} - -// Serializes `object` and writes it to global `result`. -// Returns true on success, or false on invalid object. -// -function writeNode(state, level, object, block, compact, iskey, isblockseq) { - state.tag = null; - state.dump = object; - - if (!detectType(state, object, false)) { - detectType(state, object, true); - } - - var type = _toString.call(state.dump); - var inblock = block; - var tagStr; - - if (block) { - block = (state.flowLevel < 0 || state.flowLevel > level); - } - - var objectOrArray = type === '[object Object]' || type === '[object Array]', - duplicateIndex, - duplicate; - - if (objectOrArray) { - duplicateIndex = state.duplicates.indexOf(object); - duplicate = duplicateIndex !== -1; - } - - if ((state.tag !== null && state.tag !== '?') || duplicate || (state.indent !== 2 && level > 0)) { - compact = false; - } - - if (duplicate && state.usedDuplicates[duplicateIndex]) { - state.dump = '*ref_' + duplicateIndex; - } else { - if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) { - state.usedDuplicates[duplicateIndex] = true; - } - if (type === '[object Object]') { - if (block && (Object.keys(state.dump).length !== 0)) { - writeBlockMapping(state, level, state.dump, compact); - if (duplicate) { - state.dump = '&ref_' + duplicateIndex + state.dump; - } - } else { - writeFlowMapping(state, level, state.dump); - if (duplicate) { - state.dump = '&ref_' + duplicateIndex + ' ' + state.dump; - } - } - } else if (type === '[object Array]') { - if (block && (state.dump.length !== 0)) { - if (state.noArrayIndent && !isblockseq && level > 0) { - writeBlockSequence(state, level - 1, state.dump, compact); - } else { - writeBlockSequence(state, level, state.dump, compact); - } - if (duplicate) { - state.dump = '&ref_' + duplicateIndex + state.dump; - } - } else { - writeFlowSequence(state, level, state.dump); - if (duplicate) { - state.dump = '&ref_' + duplicateIndex + ' ' + state.dump; - } - } - } else if (type === '[object String]') { - if (state.tag !== '?') { - writeScalar(state, state.dump, level, iskey, inblock); - } - } else if (type === '[object Undefined]') { - return false; - } else { - if (state.skipInvalid) return false; - throw new exception('unacceptable kind of an object to dump ' + type); - } - - if (state.tag !== null && state.tag !== '?') { - // Need to encode all characters except those allowed by the spec: - // - // [35] ns-dec-digit ::= [#x30-#x39] /* 0-9 */ - // [36] ns-hex-digit ::= ns-dec-digit - // | [#x41-#x46] /* A-F */ | [#x61-#x66] /* a-f */ - // [37] ns-ascii-letter ::= [#x41-#x5A] /* A-Z */ | [#x61-#x7A] /* a-z */ - // [38] ns-word-char ::= ns-dec-digit | ns-ascii-letter | “-” - // [39] ns-uri-char ::= “%” ns-hex-digit ns-hex-digit | ns-word-char | “#” - // | “;” | “/” | “?” | “:” | “@” | “&” | “=” | “+” | “$” | “,” - // | “_” | “.” | “!” | “~” | “*” | “'” | “(” | “)” | “[” | “]” - // - // Also need to encode '!' because it has special meaning (end of tag prefix). - // - tagStr = encodeURI( - state.tag[0] === '!' ? state.tag.slice(1) : state.tag - ).replace(/!/g, '%21'); - - if (state.tag[0] === '!') { - tagStr = '!' + tagStr; - } else if (tagStr.slice(0, 18) === 'tag:yaml.org,2002:') { - tagStr = '!!' + tagStr.slice(18); - } else { - tagStr = '!<' + tagStr + '>'; - } - - state.dump = tagStr + ' ' + state.dump; - } - } - - return true; -} - -function getDuplicateReferences(object, state) { - var objects = [], - duplicatesIndexes = [], - index, - length; - - inspectNode(object, objects, duplicatesIndexes); - - for (index = 0, length = duplicatesIndexes.length; index < length; index += 1) { - state.duplicates.push(objects[duplicatesIndexes[index]]); - } - state.usedDuplicates = new Array(length); -} - -function inspectNode(object, objects, duplicatesIndexes) { - var objectKeyList, - index, - length; - - if (object !== null && typeof object === 'object') { - index = objects.indexOf(object); - if (index !== -1) { - if (duplicatesIndexes.indexOf(index) === -1) { - duplicatesIndexes.push(index); - } - } else { - objects.push(object); - - if (Array.isArray(object)) { - for (index = 0, length = object.length; index < length; index += 1) { - inspectNode(object[index], objects, duplicatesIndexes); - } - } else { - objectKeyList = Object.keys(object); - - for (index = 0, length = objectKeyList.length; index < length; index += 1) { - inspectNode(object[objectKeyList[index]], objects, duplicatesIndexes); - } - } - } - } -} - -function dump$1(input, options) { - options = options || {}; - - var state = new State(options); - - if (!state.noRefs) getDuplicateReferences(input, state); - - var value = input; - - if (state.replacer) { - value = state.replacer.call({ '': value }, '', value); - } - - if (writeNode(state, 0, value, true, true)) return state.dump + '\n'; - - return ''; -} - -var dump_1 = dump$1; - -var dumper = { - dump: dump_1 + return string.replace(CHARACTERS_TO_ESCAPE, escapeCharacter); +} +//#endregion +//#region src/ast/presenter.ts +var CHAR_LINE_FEED = 10; +var DEFAULT_PRESENTER_OPTIONS = { + indent: 2, + seqNoIndent: false, + seqInlineFirst: true, + lineWidth: 80, + flowBracketPadding: false, + flowSkipCommaSpace: false, + flowSkipColonSpace: false, + quoteFlowKeys: false, + quoteStyle: "single", + forceQuotes: false, + scalarStyleRules: Object.keys(DEFAULT_SCALAR_STYLE_RULES).map((name) => Reflect.get(DEFAULT_SCALAR_STYLE_RULES, name)), + tagBeforeAnchor: false }; - -function renamed(from, to) { - return function () { - throw new Error('Function yaml.' + from + ' is removed in js-yaml 4. ' + - 'Use yaml.' + to + ' instead, which is now safe by default.'); - }; +function nodeTagShort(node) { + return node.tagged ? node.tag : tagNameShort(node.tag); +} +function createPresenterState(options) { + const opts = { + ...DEFAULT_PRESENTER_OPTIONS, + ...options + }; + if (opts.flowSkipColonSpace) opts.quoteFlowKeys = true; + return { + ...opts, + defaultScalarTagName: opts.schema.defaultScalarTag.tagName, + openEnded: false + }; } - - -var Type = type; -var Schema = schema; -var FAILSAFE_SCHEMA = failsafe; -var JSON_SCHEMA = json; -var CORE_SCHEMA = core; -var DEFAULT_SCHEMA = _default; -var load = loader.load; -var loadAll = loader.loadAll; -var dump = dumper.dump; -var YAMLException = exception; - -// Re-export all types in case user wants to create custom schema -var types = { - binary: binary, - float: float, - map: map, - null: _null, - pairs: pairs, - set: set, - timestamp: timestamp, - bool: bool, - int: int, - merge: merge, - omap: omap, - seq: seq, - str: str -}; - -// Removed functions from JS-YAML 3.0.x -var safeLoad = renamed('safeLoad', 'load'); -var safeLoadAll = renamed('safeLoadAll', 'loadAll'); -var safeDump = renamed('safeDump', 'dump'); - -var jsYaml = { - Type: Type, - Schema: Schema, - FAILSAFE_SCHEMA: FAILSAFE_SCHEMA, - JSON_SCHEMA: JSON_SCHEMA, - CORE_SCHEMA: CORE_SCHEMA, - DEFAULT_SCHEMA: DEFAULT_SCHEMA, - load: load, - loadAll: loadAll, - dump: dump, - YAMLException: YAMLException, - types: types, - safeLoad: safeLoad, - safeLoadAll: safeLoadAll, - safeDump: safeDump +function generateNextLine(state, level) { + return `\n${" ".repeat(state.indent * level)}`; +} +function scalarLayout(state, node, parent, level, isKey, flowOnly) { + return { + node, + parent, + level, + isKey, + flowOnly, + shiftOfParent: level === 0 ? -1 : state.indent * (level - 1), + shiftOfContent: state.indent * Math.max(1, level), + shiftOfFirstLine: level === 0 ? 0 : state.indent * level, + presenterOptions: state, + allowedStylesMask: 0, + style: node.style + }; +} +function writeFlowSequence(state, level, node) { + let result = ""; + for (let index = 0, length = node.items.length; index < length; index += 1) { + const item = writeNode(state, level, node.items[index], node, {}).text; + if (index > 0) result += `,${!state.flowSkipCommaSpace ? " " : ""}`; + result += item; + } + const pad = state.flowBracketPadding && node.items.length > 0 ? " " : ""; + return `[${pad}${result}${pad}]`; +} +function writeBlockSequence(state, level, node, compact) { + let result = ""; + for (let index = 0, length = node.items.length; index < length; index += 1) { + const item = writeNode(state, level + 1, node.items[index], node, { + block: true, + compact: state.seqInlineFirst, + isblockseq: true + }).text; + if (!compact || result !== "") result += generateNextLine(state, level); + if (item === "" || CHAR_LINE_FEED === item.charCodeAt(0)) result += "-"; + else result += "- "; + result += item; + } + return result; +} +function writeFlowMapping(state, level, node) { + let result = ""; + for (const { key, value } of node.items) { + let pairBuffer = ""; + if (result !== "") pairBuffer += `,${!state.flowSkipCommaSpace ? " " : ""}`; + const keyRender = writeNode(state, level, key, node, { iskey: true }); + const keyText = keyRender.text; + const valueText = writeNode(state, level, value, node, {}).text; + const sep = state.flowSkipColonSpace || valueText === "" ? "" : " "; + const keyIsBareProps = key.kind === "scalar" && keyRender.noBody && (key.tagged || key.anchor !== void 0); + const keyColonSep = key.kind === "alias" || keyIsBareProps ? " " : ""; + pairBuffer += `${keyText}${keyColonSep}:${sep}${valueText}`; + result += pairBuffer; + } + const pad = state.flowBracketPadding && result !== "" ? " " : ""; + return `{${pad}${result}${pad}}`; +} +function writeBlockMapping(state, level, node, compact) { + let result = ""; + for (let index = 0, length = node.items.length; index < length; index += 1) { + let pairBuffer = ""; + if (!compact || result !== "") pairBuffer += generateNextLine(state, level); + const { key, value } = node.items[index]; + const keyIsBlock = (key.kind === "mapping" || key.kind === "sequence") && key.style === COLLECTION_STYLE.BLOCK && key.items.length !== 0 || key.kind === "scalar" && (key.style === SCALAR_STYLE.LITERAL_BLOCK || key.style === SCALAR_STYLE.FOLDED_BLOCK); + const keyRender = keyIsBlock ? writeNode(state, level + 1, key, node, { + block: true, + compact: true, + isblockseq: !cannotBeCompact(state, key, level + 1) + }) : writeNode(state, level + 1, key, node, { + block: true, + compact: true, + iskey: true + }); + const keyText = keyRender.text; + const keyHasLineBreak = key.kind === "scalar" && key.value.indexOf("\n") !== -1; + const keyIsTooLong = keyText.length > 1024 && /^[\s\S]{1025}/u.test(keyText); + const explicitPair = keyIsBlock || keyHasLineBreak || keyIsTooLong; + if (explicitPair) if (keyText && CHAR_LINE_FEED === keyText.charCodeAt(0)) pairBuffer += "?"; + else pairBuffer += "? "; + pairBuffer += keyText; + if (explicitPair) pairBuffer += generateNextLine(state, level); + const valueText = writeNode(state, level + 1, value, node, { + block: true, + compact: explicitPair, + isblockseq: explicitPair && !cannotBeCompact(state, value, level + 1) + }).text; + const keyIsBareProps = key.kind === "scalar" && keyRender.noBody && (key.tagged || key.anchor !== void 0); + const keyColonSep = !explicitPair && (key.kind === "alias" || keyIsBareProps) ? " " : ""; + if (valueText === "" || CHAR_LINE_FEED === valueText.charCodeAt(0)) pairBuffer += `${keyColonSep}:`; + else pairBuffer += `${keyColonSep}: `; + pairBuffer += valueText; + result += pairBuffer; + } + return result; +} +function cannotBeCompact(state, node, level) { + if (node.kind === "alias") return true; + return node.tagged || node.anchor !== void 0 || state.indent < 2 && level > 0; +} +function writeNode(state, level, node, parent, ctx) { + if (node.kind === "alias") { + state.openEnded = false; + return { + text: `*${node.anchor}`, + noBody: false + }; + } + const { block = false, iskey = false, isblockseq = false } = ctx; + let compact = ctx.compact ?? false; + const hasAnchor = node.anchor !== void 0; + if (cannotBeCompact(state, node, level)) compact = false; + let body; + let shouldPrintTag = node.tagged; + const useBlockCollection = block && (node.kind === "mapping" || node.kind === "sequence") && node.style === COLLECTION_STYLE.BLOCK && node.items.length !== 0; + if (node.kind === "mapping") if (useBlockCollection) body = writeBlockMapping(state, level, node, compact); + else body = writeFlowMapping(state, level, node); + else if (node.kind === "sequence") if (useBlockCollection) if (state.seqNoIndent && !isblockseq && level > 0) body = writeBlockSequence(state, level - 1, node, compact); + else body = writeBlockSequence(state, level, node, compact); + else body = writeFlowSequence(state, level, node); + else { + const layout = scalarLayout(state, node, parent, level, iskey, !block); + detectAllowedStyles(layout); + for (const rule of state.scalarStyleRules) rule(layout); + body = renderScalar(layout); + state.openEnded = (layout.style === SCALAR_STYLE.LITERAL_BLOCK || layout.style === SCALAR_STYLE.FOLDED_BLOCK) && (node.value === "\n" || node.value.endsWith("\n\n")); + shouldPrintTag = node.tagged || body === "" && layout.flowOnly && parent?.kind === "sequence" && !hasAnchor || layout.style !== SCALAR_STYLE.PLAIN && node.tag !== state.defaultScalarTagName; + } + if ((node.kind === "mapping" || node.kind === "sequence") && !useBlockCollection) state.openEnded = false; + if (useBlockCollection && compact && level > 0 && state.indent > 2) body = `${" ".repeat(state.indent - 2)}${body}`; + const noBody = body === ""; + let text = body; + if (shouldPrintTag || hasAnchor) { + const props = []; + const tag = shouldPrintTag ? nodeTagShort(node) : null; + const anchor = hasAnchor ? `&${node.anchor}` : null; + if (state.tagBeforeAnchor) { + if (tag !== null) props.push(tag); + if (anchor !== null) props.push(anchor); + } else { + if (anchor !== null) props.push(anchor); + if (tag !== null) props.push(tag); + } + const sep = body === "" || body.charCodeAt(0) === CHAR_LINE_FEED ? "" : " "; + text = `${props.join(" ")}${sep}${body}`; + } + return { + text, + noBody + }; +} +function rootStartsOwnLine(node) { + return (node.kind === "sequence" || node.kind === "mapping") && node.style === COLLECTION_STYLE.BLOCK && node.items.length !== 0 && !node.tagged && node.anchor === void 0; +} +function writeDocumentDirectives(doc) { + let result = ""; + for (const directive of doc.directives) { + if (directive.kind === "yaml") { + result += `%YAML ${directive.version}\n`; + continue; + } + const { handle, prefix } = directive; + result += `%TAG ${handle} ${prefix}\n`; + } + return result; +} +/** +* Build YAML from AST. +* +* @category AST +*/ +function present(documents, options) { + const state = createPresenterState(options); + let result = ""; + let previousEnded = false; + for (let index = 0; index < documents.length; index += 1) { + const doc = documents[index]; + state.openEnded = false; + const directives = writeDocumentDirectives(doc); + const hasDirectives = directives !== ""; + const marker = doc.explicitStart || hasDirectives || index > 0 && !previousEnded; + result += directives; + if (doc.contents === null) { + if (marker) result += "---\n"; + } else if (marker) { + const body = writeNode(state, 0, doc.contents, null, { + block: true, + compact: true + }).text; + const sep = body === "" ? "" : hasDirectives || rootStartsOwnLine(doc.contents) ? "\n" : " "; + result += `---${sep}${body}\n`; + } else result += writeNode(state, 0, doc.contents, null, { + block: true, + compact: true + }).text + "\n"; + previousEnded = doc.explicitEnd || state.openEnded; + if (previousEnded) result += "...\n"; + } + return result; +} +//#endregion +//#region src/dump.ts +var DEFAULT_DUMP_OPTIONS = { + ...DEFAULT_PRESENTER_OPTIONS, + schema: DUMP_SCHEMA, + skipInvalid: false, + noRefs: false, + flowLevel: -1, + sortKeys: false, + transform: () => {} }; - -export default jsYaml; -export { CORE_SCHEMA, DEFAULT_SCHEMA, FAILSAFE_SCHEMA, JSON_SCHEMA, Schema, Type, YAMLException, dump, load, loadAll, safeDump, safeLoad, safeLoadAll, types }; +function defaultCompareFn(a, b) { + const x = String(a); + const y = String(b); + if (x < y) return -1; + if (x > y) return 1; + return 0; +} +/** +* Serializes JS object as a YAML document. By default it can dump every +* supported YAML type, so it throws an exception if you try to dump regexps or +* functions. However, you can disable exceptions by setting the +* {@link DumpOptions.skipInvalid} option to `true`. +* +* @category Main +*/ +function dump(input, options = {}) { + const opts = { + ...DEFAULT_DUMP_OPTIONS, + ...options + }; + const documents = jsToAst(input, opts.schema, { + noRefs: opts.noRefs, + skipInvalid: opts.skipInvalid + }); + if (opts.flowLevel >= 0) visit(documents, (node, ctx) => { + if (ctx.depth < opts.flowLevel) return; + if (node.kind === "sequence" || node.kind === "mapping") node.style = COLLECTION_STYLE.FLOW; + return VISIT_SKIP; + }); + if (opts.sortKeys) { + const compareFn = opts.sortKeys === true ? defaultCompareFn : opts.sortKeys; + visit(documents, (node) => { + if (node.kind !== "mapping") return; + node.items.sort((a, b) => compareFn(a.key.kind === "scalar" ? a.key.value : "", b.key.kind === "scalar" ? b.key.value : "")); + }); + } + opts.transform(documents); + return present(documents, { + ...pick(opts, Object.keys(DEFAULT_PRESENTER_OPTIONS)), + schema: opts.schema + }); +} +//#endregion +//#region src/ast/from_events.ts +var NO_RANGE = -1; +function eventPosition(event) { + if ("tagStart" in event && event.tagStart !== NO_RANGE) return event.tagStart; + if ("anchorStart" in event && event.anchorStart !== NO_RANGE) return event.anchorStart; + if ("valueStart" in event && event.valueStart !== NO_RANGE) return event.valueStart; + if ("start" in event) return event.start; + return 0; +} +function rawTag(state, event) { + return event.tagStart === NO_RANGE ? "" : state.source.slice(event.tagStart, event.tagEnd); +} +function anchorName(state, event) { + return event.anchorStart === NO_RANGE ? void 0 : state.source.slice(event.anchorStart, event.anchorEnd); +} +function buildScalar(state, event) { + const value = getScalarValue(state.source, event); + const raw = rawTag(state, event); + let tag; + let tagged = false; + if (raw !== "") { + tagged = true; + tag = raw; + } else if (event.style === SCALAR_STYLE.PLAIN) tag = state.schema.resolveImplicitScalarTag(value).tag.tagName; + else tag = state.schema.defaultScalarTag.tagName; + return { + kind: "scalar", + tag, + tagged, + style: event.style, + anchor: anchorName(state, event), + value + }; +} +function buildCollection(state, event, defaultTagName) { + const raw = rawTag(state, event); + let tag; + let tagged = false; + if (raw === "") tag = defaultTagName; + else { + tag = raw; + tagged = true; + } + return { + tag, + tagged, + style: event.style, + anchor: anchorName(state, event) + }; +} +function addNode(state, node) { + const frame = state.frames[state.frames.length - 1]; + if (frame.kind === "document") frame.doc.contents = node; + else if (frame.kind === "sequence") frame.node.items.push(node); + else if (frame.key) { + frame.node.items.push({ + key: frame.key, + value: node + }); + frame.key = null; + } else frame.key = node; +} +/** +* Builds an AST from parser events +* +* @category AST +*/ +function eventsToAst(events, options) { + const state = { + source: options.source, + schema: options.schema, + eventIndex: 0, + position: 0, + frames: [], + documents: [] + }; + while (state.eventIndex < events.length) { + const event = events[state.eventIndex++]; + state.position = eventPosition(event); + switch (event.type) { + case EVENT_ID.DOCUMENT: { + const doc = { + contents: null, + explicitStart: event.explicitStart, + explicitEnd: event.explicitEnd, + directives: event.directives + }; + state.frames.push({ + kind: "document", + doc + }); + break; + } + case EVENT_ID.SCALAR: + addNode(state, buildScalar(state, event)); + break; + case EVENT_ID.SEQUENCE: { + const { tag, tagged, style, anchor } = buildCollection(state, event, "tag:yaml.org,2002:seq"); + const node = { + kind: "sequence", + tag, + tagged, + style, + anchor, + items: [] + }; + state.frames.push({ + kind: "sequence", + node + }); + break; + } + case EVENT_ID.MAPPING: { + const { tag, tagged, style, anchor } = buildCollection(state, event, "tag:yaml.org,2002:map"); + const node = { + kind: "mapping", + tag, + tagged, + style, + anchor, + items: [] + }; + state.frames.push({ + kind: "mapping", + node, + key: null + }); + break; + } + case EVENT_ID.ALIAS: + addNode(state, { + kind: "alias", + anchor: state.source.slice(event.anchorStart, event.anchorEnd) + }); + break; + case EVENT_ID.POP: { + const frame = state.frames.pop(); + if (frame.kind === "mapping" && frame.key) throw new Error("incomplete mapping pair in event stream"); + if (frame.kind === "document") state.documents.push(frame.doc); + else addNode(state, frame.node); + break; + } + } + } + return state.documents; +} +//#endregion +//#region src/index.ts +/** @deprecated Use `EVENT_ID.DOCUMENT` instead. @internal */ +var EVENT_DOCUMENT = EVENT_ID.DOCUMENT; +/** @deprecated Use `EVENT_ID.SEQUENCE` instead. @internal */ +var EVENT_SEQUENCE = EVENT_ID.SEQUENCE; +/** @deprecated Use `EVENT_ID.MAPPING` instead. @internal */ +var EVENT_MAPPING = EVENT_ID.MAPPING; +/** @deprecated Use `EVENT_ID.SCALAR` instead. @internal */ +var EVENT_SCALAR = EVENT_ID.SCALAR; +/** @deprecated Use `EVENT_ID.ALIAS` instead. @internal */ +var EVENT_ALIAS = EVENT_ID.ALIAS; +/** @deprecated Use `EVENT_ID.POP` instead. @internal */ +var EVENT_POP = EVENT_ID.POP; +/** @deprecated Use `SCALAR_STYLE.PLAIN` instead. @internal */ +var SCALAR_STYLE_PLAIN = SCALAR_STYLE.PLAIN; +/** @deprecated Use `SCALAR_STYLE.SINGLE_QUOTED` instead. @internal */ +var SCALAR_STYLE_SINGLE_QUOTED = SCALAR_STYLE.SINGLE_QUOTED; +/** @deprecated Use `SCALAR_STYLE.DOUBLE_QUOTED` instead. @internal */ +var SCALAR_STYLE_DOUBLE_QUOTED = SCALAR_STYLE.DOUBLE_QUOTED; +/** @deprecated Use `SCALAR_STYLE.LITERAL_BLOCK` instead. @internal */ +var SCALAR_STYLE_LITERAL_BLOCK = SCALAR_STYLE.LITERAL_BLOCK; +/** @deprecated Use `SCALAR_STYLE.FOLDED_BLOCK` instead. @internal */ +var SCALAR_STYLE_FOLDED_BLOCK = SCALAR_STYLE.FOLDED_BLOCK; +/** @deprecated Use `COLLECTION_STYLE.BLOCK` instead. @internal */ +var COLLECTION_STYLE_BLOCK = COLLECTION_STYLE.BLOCK; +/** @deprecated Use `COLLECTION_STYLE.FLOW` instead. @internal */ +var COLLECTION_STYLE_FLOW = COLLECTION_STYLE.FLOW; +/** @deprecated Use `CHOMPING_MODE.CLIP` instead. @internal */ +var CHOMPING_CLIP = CHOMPING_MODE.CLIP; +/** @deprecated Use `CHOMPING_MODE.STRIP` instead. @internal */ +var CHOMPING_STRIP = CHOMPING_MODE.STRIP; +/** @deprecated Use `CHOMPING_MODE.KEEP` instead. @internal */ +var CHOMPING_KEEP = CHOMPING_MODE.KEEP; +//#endregion +export { CHOMPING_CLIP, CHOMPING_KEEP, CHOMPING_MODE, CHOMPING_STRIP, COLLECTION_STYLE, COLLECTION_STYLE_BLOCK, COLLECTION_STYLE_FLOW, CORE_SCHEMA, DEFAULT_SCALAR_STYLE_RULES, DUMP_SCHEMA, EVENT_ALIAS, EVENT_DOCUMENT, EVENT_ID, EVENT_MAPPING, EVENT_POP, EVENT_SCALAR, EVENT_SEQUENCE, FAILSAFE_SCHEMA, JSON_SCHEMA, NOT_RESOLVED, SCALAR_STYLE, SCALAR_STYLE_DOUBLE_QUOTED, SCALAR_STYLE_FOLDED_BLOCK, SCALAR_STYLE_LITERAL_BLOCK, SCALAR_STYLE_PLAIN, SCALAR_STYLE_SINGLE_QUOTED, Schema, VISIT_BREAK, VISIT_SKIP, YAML11_SCHEMA, YAMLException, binaryTag, boolCoreTag, boolJsonTag, boolYaml11Tag, constructFromEvents, defineMappingTag, defineScalarTag, defineSequenceTag, dump, eventsToAst, floatCoreTag, floatJsonTag, floatYaml11Tag, getScalarValue, intCoreTag, intJsonTag, intYaml11Tag, jsToAst, legacyMapTag, load, loadAll, mapTag, mergeTag, nullCoreTag, nullJsonTag, nullYaml11Tag, omapTag, pairsTag, parseEvents, present, realMapTag, seqTag, setTag, strTag, timestampTag, visit }; + +//# sourceMappingURL=js-yaml.mjs.map \ No newline at end of file diff --git a/node_modules/js-yaml/dist/js-yaml.mjs.map b/node_modules/js-yaml/dist/js-yaml.mjs.map new file mode 100644 index 00000000..12d7cb5c --- /dev/null +++ b/node_modules/js-yaml/dist/js-yaml.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"js-yaml.mjs","names":[],"sources":["../src/tag.ts","../src/tag/scalar/str.ts","../src/tag/scalar/null_core.ts","../src/tag/scalar/null_json.ts","../src/tag/scalar/null_yaml11.ts","../src/tag/scalar/bool_core.ts","../src/tag/scalar/bool_json.ts","../src/tag/scalar/bool_yaml11.ts","../src/tag/scalar/int_core.ts","../src/tag/scalar/int_json.ts","../src/tag/scalar/int_yaml11.ts","../src/tag/scalar/float_core.ts","../src/tag/scalar/float_json.ts","../src/tag/scalar/float_yaml11.ts","../src/tag/scalar/merge.ts","../src/tag/scalar/binary.ts","../src/tag/scalar/timestamp.ts","../src/tag/sequence/seq.ts","../src/common/object.ts","../src/tag/sequence/omap.ts","../src/tag/sequence/pairs.ts","../src/tag/mapping/map.ts","../src/tag/mapping/set.ts","../src/schema.ts","../src/tag/mapping/real_map.ts","../src/tag/mapping/legacy_map.ts","../src/common/snippet.ts","../src/common/exception.ts","../src/parser/events.ts","../src/parser/parser_scalar.ts","../src/common/tagname.ts","../src/parser/constructor.ts","../src/parser/parser.ts","../src/load.ts","../src/ast/from_js.ts","../src/ast/visit.ts","../src/ast/styler_defaults.ts","../src/ast/scalar_styler.ts","../src/ast/presenter.ts","../src/dump.ts","../src/ast/from_events.ts","../src/index.ts"],"sourcesContent":["/**\n * Returned by a scalar resolver when the source does not match its tag.\n *\n * @category Tags\n */\nconst NOT_RESOLVED: unique symbol = Symbol('NOT_RESOLVED')\n\n/**\n * Options for {@link defineScalarTag}.\n *\n * @category Tags\n */\ninterface ScalarTagOptions {\n /**\n * Whether this tag participates in resolving plain scalars without an\n * explicit tag. Default: `false`.\n */\n implicit?: boolean\n\n /**\n * Whether explicit tag names are matched by prefix instead of exact equality.\n * Default: `false`.\n */\n matchByTagPrefix?: boolean\n\n /**\n * Set of `source.charAt(0)` keys for which `resolve` may succeed (a superset\n * of what it really matches). A key is either a single character or '' (empty\n * source). `null` means \"no constraint, always try\". Used by the composer to\n * dispatch implicit scalars by first character without running every resolver.\n */\n implicitFirstChars?: readonly string[] | null\n\n /**\n * Construct a value from scalar text, or return {@link NOT_RESOLVED} when it\n * is invalid for this tag. `isExplicit` is true for an explicit tag and\n * `tagName` is the actual matched name.\n */\n resolve: (source: string, isExplicit: boolean, tagName: string) => Result | typeof NOT_RESOLVED\n\n /**\n * Selects this tag for a JavaScript value when dumping. Use `() => false`\n * for load-only tags.\n */\n identify: (data: any) => boolean\n\n /**\n * A scalar's printed form is text, so `represent` always yields a string.\n * The factory supplies a `String(data)` default when a tag omits it.\n */\n represent?: (data: any) => string\n\n /** Return the tag name to emit for a prefix-matching tag. Defaults to `tagName`. */\n representTagName?: (data: any) => string\n}\n\n/**\n * Normalized scalar tag returned by {@link defineScalarTag}.\n *\n * @category Tags\n */\ninterface ScalarTagDefinition extends Required> {\n /** Tag name used for schema lookup. */\n tagName: string\n\n /** YAML node kind handled by this tag. */\n nodeKind: 'scalar'\n}\n\n/**\n * Options for {@link defineSequenceTag}.\n *\n * @category Tags\n */\ninterface SequenceTagOptions {\n /**\n * Whether explicit tag names are matched by prefix instead of exact equality.\n * Default: `false`.\n */\n matchByTagPrefix?: boolean\n\n /** Create the carrier used while constructing a sequence. */\n create: (tagName: string) => Carrier\n\n /** Add an item to the carrier. Return a non-empty error message to reject it. */\n addItem: (carrier: Carrier, item: unknown, index: number) => void | string\n\n /** Convert the completed carrier to the result. Defaults to the identity function. */\n finalize?: (carrier: Carrier) => Result\n\n /**\n * Selects this tag for a JavaScript value when dumping. Use `() => false`\n * for load-only tags.\n */\n identify: (data: any) => boolean\n\n /** Return the array-like contents to dump. Defaults to the identity function. */\n represent?: (data: any) => ArrayLike\n\n /** Return the tag name to emit for a prefix-matching tag. Defaults to `tagName`. */\n representTagName?: (data: any) => string\n}\n\n/**\n * Normalized sequence tag returned by {@link defineSequenceTag}.\n *\n * @category Tags\n */\ninterface SequenceTagDefinition extends Required> {\n /** Tag name used for schema lookup. */\n tagName: string\n\n /** YAML node kind handled by this tag. */\n nodeKind: 'sequence'\n\n /** Sequence tags do not participate in implicit scalar resolution. */\n implicit: false\n\n /** Whether the carrier is also the final result (`finalize` was omitted). */\n carrierIsResult: boolean\n}\n\n/**\n * Options for {@link defineMappingTag}.\n *\n * @category Tags\n */\ninterface MappingTagOptions {\n /**\n * Whether explicit tag names are matched by prefix instead of exact equality.\n * Default: `false`.\n */\n matchByTagPrefix?: boolean\n\n /** Create the carrier used while constructing a mapping. */\n create: (tagName: string) => Carrier\n\n /**\n * Writes a pair. Returns '' on success, a non-empty error message otherwise\n * (key does not fit the representation, value rejected, ...). Always a string\n * so the hot path never allocates an exception wrapper.\n */\n addPair: (carrier: Carrier, key: unknown, value: unknown) => string\n\n /** Return whether the carrier contains a key, for duplicate and merge checks. */\n has: (carrier: Carrier, key: unknown) => boolean\n\n /** Return the keys of a completed result for YAML merge processing. */\n keys: (result: Result) => Iterable\n\n /** Return a value from a completed result for YAML merge processing. */\n get: (result: Result, key: unknown) => unknown\n\n /** Convert the completed carrier to the result. Defaults to the identity function. */\n finalize?: (carrier: Carrier) => Result\n\n /**\n * Selects this tag for a JavaScript value when dumping. Use `() => false`\n * for load-only tags.\n */\n identify: (data: any) => boolean\n\n /** Return the mapping entries to dump. Defaults to the identity function. */\n represent?: (data: any) => Map\n\n /** Return the tag name to emit for a prefix-matching tag. Defaults to `tagName`. */\n representTagName?: (data: any) => string\n}\n\n/**\n * Normalized mapping tag returned by {@link defineMappingTag}.\n *\n * @category Tags\n */\ninterface MappingTagDefinition extends Required> {\n /** Tag name used for schema lookup. */\n tagName: string\n\n /** YAML node kind handled by this tag. */\n nodeKind: 'mapping'\n\n /** Mapping tags do not participate in implicit scalar resolution. */\n implicit: false\n\n /** Whether the carrier is also the final result (`finalize` was omitted). */\n carrierIsResult: boolean\n}\n\n/**\n * Any normalized tag definition accepted by {@link Schema}.\n *\n * @category Tags\n */\ntype TagDefinition =\n | ScalarTagDefinition\n | SequenceTagDefinition\n | MappingTagDefinition\n\n/**\n * Create a normalized scalar tag definition.\n *\n * @category Tags\n */\nfunction defineScalarTag (tagName: string, options: ScalarTagOptions): ScalarTagDefinition {\n return {\n tagName,\n nodeKind: 'scalar',\n implicit: options.implicit ?? false,\n matchByTagPrefix: options.matchByTagPrefix ?? false,\n implicitFirstChars: options.implicitFirstChars ?? null,\n resolve: options.resolve,\n identify: options.identify,\n represent: options.represent ?? (data => String(data)),\n representTagName: options.representTagName ?? (() => tagName)\n }\n}\n\n/**\n * Create a normalized sequence tag definition.\n *\n * @category Tags\n */\nfunction defineSequenceTag (tagName: string, options: SequenceTagOptions): SequenceTagDefinition {\n const carrierIsResult = options.finalize === undefined\n\n return {\n tagName,\n nodeKind: 'sequence',\n implicit: false,\n matchByTagPrefix: options.matchByTagPrefix ?? false,\n create: options.create,\n addItem: options.addItem,\n finalize: options.finalize ?? (carrier => carrier as unknown as Result),\n carrierIsResult,\n identify: options.identify,\n represent: options.represent ?? (data => data as ArrayLike),\n representTagName: options.representTagName ?? (() => tagName)\n }\n}\n\n/**\n * Create a normalized mapping tag definition.\n *\n * @category Tags\n */\nfunction defineMappingTag (tagName: string, options: MappingTagOptions): MappingTagDefinition {\n const carrierIsResult = options.finalize === undefined\n\n return {\n tagName,\n nodeKind: 'mapping',\n implicit: false,\n matchByTagPrefix: options.matchByTagPrefix ?? false,\n create: options.create,\n addPair: options.addPair,\n has: options.has,\n keys: options.keys,\n get: options.get,\n finalize: options.finalize ?? (carrier => carrier as unknown as Result),\n carrierIsResult,\n identify: options.identify,\n represent: options.represent ?? (data => data as Map),\n representTagName: options.representTagName ?? (() => tagName)\n }\n}\n\nexport {\n NOT_RESOLVED,\n defineScalarTag,\n defineSequenceTag,\n defineMappingTag,\n\n type ScalarTagDefinition,\n type SequenceTagDefinition,\n type MappingTagDefinition,\n type TagDefinition,\n type ScalarTagOptions,\n type SequenceTagOptions,\n type MappingTagOptions\n}\n","import { defineScalarTag } from '../../tag.ts'\n\n/** @category Tags */\nconst strTag = defineScalarTag('tag:yaml.org,2002:str', {\n resolve: (source) => source,\n identify: (data) => typeof data === 'string'\n})\n\nexport { strTag }\n","import { defineScalarTag, NOT_RESOLVED } from '../../tag.ts'\n\nconst NULL_VALUES = ['', '~', 'null', 'Null', 'NULL']\n\n/** @category Tags */\nconst nullCoreTag = defineScalarTag('tag:yaml.org,2002:null', {\n implicit: true,\n // Superset of source.charAt(0) over all matched inputs: '' (empty), '~', 'null'/'Null'/'NULL'.\n implicitFirstChars: ['', '~', 'n', 'N'],\n resolve: (source) => {\n if (NULL_VALUES.indexOf(source) !== -1) return null\n\n return NOT_RESOLVED\n },\n identify: (object) => object === null,\n represent: () => 'null'\n})\n\nexport { nullCoreTag }\n","import { defineScalarTag, NOT_RESOLVED } from '../../tag.ts'\n\n/** @category Tags */\nconst nullJsonTag = defineScalarTag('tag:yaml.org,2002:null', {\n implicit: true,\n // Superset of source.charAt(0) over all matched inputs: null.\n implicitFirstChars: ['n'],\n resolve: (source, isExplicit) => {\n if (source === 'null' || (isExplicit && source === '')) return null\n\n return NOT_RESOLVED\n },\n identify: (object) => object === null,\n represent: () => 'null'\n})\n\nexport { nullJsonTag }\n","import { defineScalarTag, NOT_RESOLVED } from '../../tag.ts'\n\nconst NULL_VALUES = ['', '~', 'null', 'Null', 'NULL']\n\n/** @category Tags */\nconst nullYaml11Tag = defineScalarTag('tag:yaml.org,2002:null', {\n implicit: true,\n // Superset of source.charAt(0) over all matched inputs: '' (empty), '~', 'null'/'Null'/'NULL'.\n implicitFirstChars: ['', '~', 'n', 'N'],\n resolve: (source) => {\n if (NULL_VALUES.indexOf(source) !== -1) return null\n\n return NOT_RESOLVED\n },\n identify: (object) => object === null,\n represent: () => 'null'\n})\n\nexport { nullYaml11Tag }\n","import { defineScalarTag, NOT_RESOLVED } from '../../tag.ts'\n\nconst TRUE_VALUES = ['true', 'True', 'TRUE']\nconst FALSE_VALUES = ['false', 'False', 'FALSE']\n\n/** @category Tags */\nconst boolCoreTag = defineScalarTag('tag:yaml.org,2002:bool', {\n implicit: true,\n // Superset of source.charAt(0) over all matched inputs: true/True/TRUE, false/False/FALSE.\n implicitFirstChars: ['t', 'T', 'f', 'F'],\n resolve: (source) => {\n if (TRUE_VALUES.indexOf(source) !== -1) return true\n if (FALSE_VALUES.indexOf(source) !== -1) return false\n\n return NOT_RESOLVED\n },\n identify: (object) => Object.prototype.toString.call(object) === '[object Boolean]',\n represent: (object) => object ? 'true' : 'false'\n})\n\nexport { boolCoreTag }\n","import { defineScalarTag, NOT_RESOLVED } from '../../tag.ts'\n\nconst TRUE_VALUES = ['true']\nconst FALSE_VALUES = ['false']\n\n/** @category Tags */\nconst boolJsonTag = defineScalarTag('tag:yaml.org,2002:bool', {\n implicit: true,\n // Superset of source.charAt(0) over all matched inputs: true, false.\n implicitFirstChars: ['t', 'f'],\n resolve: (source) => {\n if (TRUE_VALUES.indexOf(source) !== -1) return true\n if (FALSE_VALUES.indexOf(source) !== -1) return false\n\n return NOT_RESOLVED\n },\n identify: (object) => Object.prototype.toString.call(object) === '[object Boolean]',\n represent: (object) => object ? 'true' : 'false'\n})\n\nexport { boolJsonTag }\n","import { defineScalarTag, NOT_RESOLVED } from '../../tag.ts'\n\nconst TRUE_VALUES = ['true', 'True', 'TRUE', 'y', 'Y', 'yes', 'Yes', 'YES', 'on', 'On', 'ON']\nconst FALSE_VALUES = ['false', 'False', 'FALSE', 'n', 'N', 'no', 'No', 'NO', 'off', 'Off', 'OFF']\n\n/** @category Tags */\nconst boolYaml11Tag = defineScalarTag('tag:yaml.org,2002:bool', {\n implicit: true,\n // Superset of source.charAt(0) over all matched inputs.\n implicitFirstChars: ['y', 'Y', 'n', 'N', 't', 'T', 'f', 'F', 'o', 'O'],\n resolve: (source) => {\n if (TRUE_VALUES.indexOf(source) !== -1) return true\n if (FALSE_VALUES.indexOf(source) !== -1) return false\n\n return NOT_RESOLVED\n },\n identify: (object) => Object.prototype.toString.call(object) === '[object Boolean]',\n represent: (object) => object ? 'true' : 'false'\n})\n\nexport { boolYaml11Tag }\n","import { defineScalarTag, NOT_RESOLVED } from '../../tag.ts'\n\n// YAML 1.2 Core schema implicit resolution:\n// [-+]? [0-9]+ | 0o [0-7]+ | 0x [0-9a-fA-F]+\nconst YAML_INTEGER_IMPLICIT_PATTERN = new RegExp(\n // 0o123\n '^(?:0o[0-7]+' +\n // 0x1A\n '|0x[0-9a-fA-F]+' +\n // 12345\n '|[-+]?[0-9]+)$')\n\n// Explicit `!!int` validation is separate from Core implicit resolution.\nconst YAML_INTEGER_EXPLICIT_PATTERN = new RegExp(\n // 0b1010\n '^(?:[-+]?0b[0-1]+' +\n // 0o123\n '|[-+]?0o[0-7]+' +\n // 0x1A\n '|[-+]?0x[0-9a-fA-F]+' +\n // 12345\n '|[-+]?[0-9]+)$')\n\nfunction parseYamlInteger (source: string) {\n let value = source\n let sign = 1\n\n if (value[0] === '-' || value[0] === '+') {\n if (value[0] === '-') sign = -1\n value = value.slice(1)\n }\n\n if (value.startsWith('0b')) return sign * parseInt(value.slice(2), 2)\n if (value.startsWith('0o')) return sign * parseInt(value.slice(2), 8)\n if (value.startsWith('0x')) return sign * parseInt(value.slice(2), 16)\n\n return sign * parseInt(value, 10)\n}\n\nfunction resolveYamlInteger (source: string, isExplicit: boolean) {\n if (isExplicit) {\n if (!YAML_INTEGER_EXPLICIT_PATTERN.test(source)) return NOT_RESOLVED\n } else if (!YAML_INTEGER_IMPLICIT_PATTERN.test(source)) {\n return NOT_RESOLVED\n }\n\n const result = parseYamlInteger(source)\n return Number.isFinite(result) ? result : NOT_RESOLVED\n}\n\n/** @category Tags */\nconst intCoreTag = defineScalarTag('tag:yaml.org,2002:int', {\n implicit: true,\n // Superset of source.charAt(0) over all matched inputs: optional sign + decimal digit.\n implicitFirstChars: ['-', '+', ...'0123456789'],\n resolve: resolveYamlInteger,\n identify: (object) =>\n // No ancient boxed numbers support\n Number.isInteger(object) &&\n // Negative zero => !!float\n !Object.is(object, -0) &&\n // Exponential form => !!float, round-trip for !!int 1e21 will be broken\n object.toString(10).indexOf('e') < 0,\n represent: (object: number) => object.toString(10)\n})\n\nexport { intCoreTag }\n","import { defineScalarTag, NOT_RESOLVED } from '../../tag.ts'\n\n// YAML 1.2 JSON schema implicit resolution:\n// -? ( 0 | [1-9] [0-9]* )\nconst YAML_INTEGER_IMPLICIT_PATTERN = new RegExp(\n '^-?(?:0|[1-9][0-9]*)$')\n\n// Explicit `!!int` validation is separate from JSON implicit resolution.\nconst YAML_INTEGER_EXPLICIT_PATTERN = new RegExp(\n // 0b1010\n '^(?:[-+]?0b[0-1]+' +\n // 0o123\n '|[-+]?0o[0-7]+' +\n // 0x1A\n '|[-+]?0x[0-9a-fA-F]+' +\n // 12345\n '|[-+]?[0-9]+)$')\n\nfunction parseYamlInteger (source: string) {\n let value = source\n let sign = 1\n\n if (value[0] === '-' || value[0] === '+') {\n if (value[0] === '-') sign = -1\n value = value.slice(1)\n }\n\n if (value.startsWith('0b')) return sign * parseInt(value.slice(2), 2)\n if (value.startsWith('0o')) return sign * parseInt(value.slice(2), 8)\n if (value.startsWith('0x')) return sign * parseInt(value.slice(2), 16)\n\n return sign * parseInt(value, 10)\n}\n\nfunction resolveYamlInteger (source: string, isExplicit: boolean) {\n if (isExplicit) {\n if (!YAML_INTEGER_EXPLICIT_PATTERN.test(source)) return NOT_RESOLVED\n } else if (!YAML_INTEGER_IMPLICIT_PATTERN.test(source)) {\n return NOT_RESOLVED\n }\n\n const result = parseYamlInteger(source)\n return Number.isFinite(result) ? result : NOT_RESOLVED\n}\n\n/** @category Tags */\nconst intJsonTag = defineScalarTag('tag:yaml.org,2002:int', {\n implicit: true,\n // Superset of source.charAt(0) over all matched inputs: optional '-' or digit.\n implicitFirstChars: ['-', ...'0123456789'],\n resolve: resolveYamlInteger,\n identify: (object) =>\n // No ancient boxed numbers support\n Number.isInteger(object) &&\n // Negative zero => !!float\n !Object.is(object, -0) &&\n // Exponential form => !!float, round-trip for !!int 1e21 will be broken\n object.toString(10).indexOf('e') < 0,\n represent: (object: number) => object.toString(10)\n})\n\nexport { intJsonTag }\n","import { defineScalarTag, NOT_RESOLVED } from '../../tag.ts'\n\nconst YAML_INTEGER_PATTERN = new RegExp(\n // 0b1010\n '^(?:[-+]?0b[0-1_]+' +\n // 0123\n '|[-+]?0[0-7_]+' +\n // 0x1A\n '|[-+]?0x[0-9a-fA-F_]+' +\n // 1:23\n '|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+' +\n // 12345\n '|[-+]?(?:0|[1-9][0-9_]*))$')\n\nfunction parseYamlInteger (source: string) {\n let value = source.replace(/_/g, '')\n let sign = 1\n\n if (value[0] === '-' || value[0] === '+') {\n if (value[0] === '-') sign = -1\n value = value.slice(1)\n }\n\n if (value.startsWith('0b')) return sign * parseInt(value.slice(2), 2)\n if (value.startsWith('0x')) return sign * parseInt(value.slice(2), 16)\n\n if (value.includes(':')) {\n let result = 0\n for (const part of value.split(':')) result = result * 60 + Number(part)\n return sign * result\n }\n\n if (value !== '0' && value[0] === '0') return sign * parseInt(value, 8)\n\n return sign * parseInt(value, 10)\n}\n\nfunction resolveYamlInteger (source: string) {\n if (!YAML_INTEGER_PATTERN.test(source)) return NOT_RESOLVED\n\n const result = parseYamlInteger(source)\n return Number.isFinite(result) ? result : NOT_RESOLVED\n}\n\n/** @category Tags */\nconst intYaml11Tag = defineScalarTag('tag:yaml.org,2002:int', {\n implicit: true,\n // Superset of source.charAt(0) over all matched inputs: optional sign + decimal digit.\n implicitFirstChars: ['-', '+', ...'0123456789'],\n resolve: resolveYamlInteger,\n identify: (object) =>\n // No ancient boxed numbers support\n Number.isInteger(object) &&\n // Negative zero => !!float\n !Object.is(object, -0) &&\n // Exponential form => !!float, round-trip for !!int 1e21 will be broken\n object.toString(10).indexOf('e') < 0,\n represent: (object: number) => object.toString(10)\n})\n\nexport { intYaml11Tag }\n","import { defineScalarTag, NOT_RESOLVED } from '../../tag.ts'\n\nconst YAML_FLOAT_PATTERN = new RegExp(\n // 2.5e4, 2.5 and integers\n '^(?:[-+]?[0-9]+(?:\\\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?' +\n // .2e4, .2\n '|[-+]?\\\\.[0-9]+(?:[eE][-+]?[0-9]+)?' +\n // .inf\n '|[-+]?\\\\.(?:inf|Inf|INF)' +\n // .nan\n '|\\\\.(?:nan|NaN|NAN))$')\n\nconst YAML_FLOAT_SPECIAL_PATTERN = new RegExp(\n '^(?:' +\n // .inf\n '[-+]?\\\\.(?:inf|Inf|INF)' +\n // .nan\n '|\\\\.(?:nan|NaN|NAN))$')\n\nfunction resolveYamlFloat (source: string) {\n if (!YAML_FLOAT_PATTERN.test(source)) return NOT_RESOLVED\n\n let value = source.toLowerCase()\n const sign = value[0] === '-' ? -1 : 1\n\n if ('+-'.includes(value[0])) value = value.slice(1)\n\n if (value === '.inf') return sign === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY\n if (value === '.nan') return NaN\n\n const result = sign * parseFloat(value)\n\n if (Number.isFinite(result) || YAML_FLOAT_SPECIAL_PATTERN.test(source)) return result\n return NOT_RESOLVED\n}\n\nfunction representYamlFloat (object: number) {\n if (isNaN(object)) return '.nan'\n if (object === Number.POSITIVE_INFINITY) return '.inf'\n if (object === Number.NEGATIVE_INFINITY) return '-.inf'\n if (Object.is(object, -0)) return '-0.0'\n\n const result = object.toString(10)\n return /^[-+]?[0-9]+e/.test(result) ? result.replace('e', '.e') : result\n}\n\n/** @category Tags */\nconst floatCoreTag = defineScalarTag('tag:yaml.org,2002:float', {\n implicit: true,\n // Superset of source.charAt(0) over all matched inputs: optional sign, '.', or digit\n // ('.inf'/'.nan' start with '.').\n implicitFirstChars: ['-', '+', '.', ...'0123456789'],\n resolve: resolveYamlFloat,\n identify: (object) =>\n // No ancient boxed numbers support\n typeof object === 'number' &&\n (\n // We land here all numbers, not handled (declined) by !!int `.identify`\n // The same condition as for !!int, but reversed.\n\n // Filter out integers...\n !Number.isInteger(object) ||\n // but allow negative zero\n Object.is(object, -0) ||\n // and integers with exponential form\n object.toString(10).indexOf('e') >= 0\n ),\n represent: representYamlFloat\n})\n\nexport { floatCoreTag }\n","import { defineScalarTag, NOT_RESOLVED } from '../../tag.ts'\n\n// YAML 1.2 JSON schema implicit resolution:\n// -? ( 0 | [1-9] [0-9]* ) ( \\. [0-9]* )? ( [eE] [-+]? [0-9]+ )?\nconst YAML_FLOAT_IMPLICIT_PATTERN = new RegExp(\n // 2.5e4, 2.5 and integers\n '^-?(?:0|[1-9][0-9]*)(?:\\\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$')\n\n// Explicit `!!float` validation is separate from JSON implicit resolution.\nconst YAML_FLOAT_EXPLICIT_PATTERN = new RegExp(\n // 2.5e4, 2.5 and integers\n '^(?:[-+]?[0-9]+(?:\\\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?' +\n // .2e4, .2\n '|[-+]?\\\\.[0-9]+(?:[eE][-+]?[0-9]+)?' +\n // .inf\n '|[-+]?\\\\.(?:inf|Inf|INF)' +\n // .nan\n '|\\\\.(?:nan|NaN|NAN))$')\n\nfunction resolveYamlFloat (source: string, isExplicit: boolean) {\n if (isExplicit) {\n if (!YAML_FLOAT_EXPLICIT_PATTERN.test(source)) return NOT_RESOLVED\n\n let value = source.toLowerCase()\n const sign = value[0] === '-' ? -1 : 1\n\n if ('+-'.includes(value[0])) value = value.slice(1)\n\n if (value === '.inf') return sign === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY\n if (value === '.nan') return NaN\n\n const result = sign * parseFloat(value)\n return Number.isFinite(result) ? result : NOT_RESOLVED\n }\n\n if (!YAML_FLOAT_IMPLICIT_PATTERN.test(source)) return NOT_RESOLVED\n\n const result = Number(source)\n\n if (Number.isFinite(result)) return result\n return NOT_RESOLVED\n}\n\nfunction representYamlFloat (object: number) {\n if (isNaN(object)) return '.nan'\n if (object === Number.POSITIVE_INFINITY) return '.inf'\n if (object === Number.NEGATIVE_INFINITY) return '-.inf'\n if (Object.is(object, -0)) return '-0.0'\n\n const result = object.toString(10)\n return /^[-+]?[0-9]+e/.test(result) ? result.replace('e', '.e') : result\n}\n\n/** @category Tags */\nconst floatJsonTag = defineScalarTag('tag:yaml.org,2002:float', {\n implicit: true,\n // Superset of source.charAt(0) over all matched inputs: optional '-' or digit.\n implicitFirstChars: ['-', ...'0123456789'],\n resolve: resolveYamlFloat,\n identify: (object) =>\n // No ancient boxed numbers support\n typeof object === 'number' &&\n (\n // We land here all numbers, not handled (declined) by !!int `.identify`\n // The same condition as for !!int, but reversed.\n\n // Filter out integers...\n !Number.isInteger(object) ||\n // but allow negative zero\n Object.is(object, -0) ||\n // and integers with exponential form\n object.toString(10).indexOf('e') >= 0\n ),\n represent: representYamlFloat\n})\n\nexport { floatJsonTag }\n","import { defineScalarTag, NOT_RESOLVED } from '../../tag.ts'\n\nconst YAML_FLOAT_PATTERN = new RegExp(\n // 2.5e4, 2.5 and integers\n '^(?:[-+]?(?:(?:[0-9][0-9_]*)?\\\\.[0-9_]*)(?:[eE][-+][0-9]+)?' +\n // 190:20:30.15\n '|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\\\.[0-9_]*' +\n // .inf\n '|[-+]?\\\\.(?:inf|Inf|INF)' +\n // .nan\n '|\\\\.(?:nan|NaN|NAN))$')\n\nconst YAML_FLOAT_SPECIAL_PATTERN = new RegExp(\n '^(?:' +\n // .inf\n '[-+]?\\\\.(?:inf|Inf|INF)' +\n // .nan\n '|\\\\.(?:nan|NaN|NAN))$')\n\nfunction resolveYamlFloat (source: string) {\n if (!YAML_FLOAT_PATTERN.test(source)) return NOT_RESOLVED\n\n let value = source.toLowerCase().replace(/_/g, '')\n const sign = value[0] === '-' ? -1 : 1\n\n if ('+-'.includes(value[0])) value = value.slice(1)\n\n if (value === '.inf') return sign === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY\n if (value === '.nan') return NaN\n\n let result = 0\n\n if (value.includes(':')) {\n for (const part of value.split(':')) result = result * 60 + Number(part)\n result *= sign\n } else {\n result = sign * parseFloat(value)\n }\n\n if (Number.isFinite(result) || YAML_FLOAT_SPECIAL_PATTERN.test(source)) return result\n return NOT_RESOLVED\n}\n\nfunction representYamlFloat (object: number) {\n if (isNaN(object)) return '.nan'\n if (object === Number.POSITIVE_INFINITY) return '.inf'\n if (object === Number.NEGATIVE_INFINITY) return '-.inf'\n if (Object.is(object, -0)) return '-0.0'\n\n const result = object.toString(10)\n return /^[-+]?[0-9]+e/.test(result) ? result.replace('e', '.e') : result\n}\n\n/** @category Tags */\nconst floatYaml11Tag = defineScalarTag('tag:yaml.org,2002:float', {\n implicit: true,\n // Superset of source.charAt(0) over all matched inputs: optional sign, '.', or digit\n // ('.inf'/'.nan' start with '.').\n implicitFirstChars: ['-', '+', '.', ...'0123456789'],\n resolve: resolveYamlFloat,\n identify: (object) =>\n // No ancient boxed numbers support\n typeof object === 'number' &&\n (\n // We land here all numbers, not handled (declined) by !!int `.identify`\n // The same condition as for !!int, but reversed.\n\n // Filter out integers...\n !Number.isInteger(object) ||\n // but allow negative zero\n Object.is(object, -0) ||\n // and integers with exponential form\n object.toString(10).indexOf('e') >= 0\n ),\n represent: representYamlFloat\n})\n\nexport { floatYaml11Tag }\n","import { defineScalarTag, NOT_RESOLVED } from '../../tag.ts'\n\n/**\n * Enables merge keys in {@link CORE_SCHEMA} when added with\n * {@link Schema.withTags}.\n *\n * @category Tags\n */\nconst mergeTag = defineScalarTag('tag:yaml.org,2002:merge', {\n implicit: true,\n // source.charAt(0) over matched implicit inputs: '<' ('<<').\n implicitFirstChars: ['<'],\n // Merge semantics live in the tag, not in the value: the constructor acts on\n // a key tagged `!!merge`, so `<<` anywhere else is just this string.\n resolve: (source, isExplicit) => {\n if (source === '<<' || (isExplicit && source === '')) return '<<'\n return NOT_RESOLVED\n },\n identify: () => false\n})\n\nexport { mergeTag }\n","import { defineScalarTag, NOT_RESOLVED } from '../../tag.ts'\n\nconst BASE64_PATTERN = /^[A-Za-z0-9+/]*={0,2}$/\n\nfunction resolveYamlBinary (source: string) {\n // Strip allowed whitespace first, so validation stays a plain base64 check.\n const input = source.replace(/\\s/g, '')\n if (input.length % 4 !== 0 || !BASE64_PATTERN.test(input)) return NOT_RESOLVED\n\n const binary = atob(input)\n const result = new Uint8Array(binary.length)\n for (let index = 0; index < binary.length; index++) {\n result[index] = binary.charCodeAt(index)\n }\n return result\n}\n\nfunction representYamlBinary (object: Uint8Array) {\n let binary = ''\n for (let index = 0; index < object.length; index++) {\n binary += String.fromCharCode(object[index])\n }\n return btoa(binary)\n}\n\n/**\n * The `!!binary` tag, represented as a `Uint8Array`.\n *\n * @category Tags\n */\nconst binaryTag = defineScalarTag('tag:yaml.org,2002:binary', {\n resolve: resolveYamlBinary,\n identify: (object) => Object.prototype.toString.call(object) === '[object Uint8Array]',\n represent: representYamlBinary\n})\n\nexport { binaryTag }\n","import { defineScalarTag, NOT_RESOLVED } from '../../tag.ts'\n\nconst YAML_DATE_REGEXP = new RegExp(\n '^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$')\n\nconst YAML_TIMESTAMP_REGEXP = new RegExp(\n '^([0-9][0-9][0-9][0-9])' +\n '-([0-9][0-9]?)' +\n '-([0-9][0-9]?)' +\n '(?:[Tt]|[ \\\\t]+)' +\n '([0-9][0-9]?)' +\n ':([0-9][0-9])' +\n ':([0-9][0-9])' +\n '(?:\\\\.([0-9]*))?' +\n '(?:[ \\\\t]*(Z|([-+])([0-9][0-9]?)' +\n '(?::([0-9][0-9]))?))?$')\n\nfunction makeUtcDate (\n year: number,\n month: number,\n day: number,\n hour = 0,\n minute = 0,\n second = 0,\n fraction = 0\n) {\n const date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction))\n\n // Date.UTC() treats years 0..99 as 1900..1999. Restore the parsed YAML year\n // before validating calendar normalization, e.g. reject 0001-02-29.\n date.setUTCFullYear(year, month, day)\n\n return date\n}\n\nfunction resolveYamlTimestamp (source: string) {\n let match = YAML_DATE_REGEXP.exec(source)\n if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(source)\n if (match === null) return NOT_RESOLVED\n\n const year = +(match[1])\n const month = +(match[2]) - 1\n const day = +(match[3])\n\n // Date-only form (`YYYY-MM-DD`) has no time captures.\n if (!match[4]) {\n const date = makeUtcDate(year, month, day)\n // Reject dates that JS would normalize, e.g. 2023-02-29 -> 2023-03-01.\n if (date.getUTCFullYear() !== year || date.getUTCMonth() !== month || date.getUTCDate() !== day) {\n return NOT_RESOLVED\n }\n return date\n }\n\n const hour = +(match[4])\n const minute = +(match[5])\n const second = +(match[6])\n let fraction = 0\n\n // Reject times that JS would normalize into the next minute/hour/day.\n if (hour > 23 || minute > 59 || second > 59) return NOT_RESOLVED\n\n if (match[7]) {\n let value = match[7].slice(0, 3)\n while (value.length < 3) value += '0'\n fraction = +value\n }\n\n const date = makeUtcDate(year, month, day, hour, minute, second, fraction)\n\n // Reject invalid calendar dates before applying timezone offset.\n if (date.getUTCFullYear() !== year || date.getUTCMonth() !== month || date.getUTCDate() !== day) {\n return NOT_RESOLVED\n }\n\n if (match[9]) {\n const offsetHour = +(match[10])\n const offsetMinute = +(match[11] || 0)\n // Reject timezone offsets that JS date arithmetic would otherwise accept.\n if (offsetHour > 23 || offsetMinute > 59) return NOT_RESOLVED\n\n const offset = (offsetHour * 60 + offsetMinute) * 60000\n date.setTime(date.getTime() - (match[9] === '-' ? -offset : offset))\n }\n\n return date\n}\n\n/**\n * The YAML 1.1 `!!timestamp` tag, represented as a JavaScript `Date`.\n *\n * @category Tags\n */\nconst timestampTag = defineScalarTag('tag:yaml.org,2002:timestamp', {\n implicit: true,\n // Both patterns start with a 4-digit year, so source.charAt(0) is always a digit.\n implicitFirstChars: [...'0123456789'],\n resolve: resolveYamlTimestamp,\n identify: (object) => object instanceof Date,\n represent: (object: Date) => object.toISOString()\n})\n\nexport { timestampTag }\n","import { defineSequenceTag } from '../../tag.ts'\n\n/** @category Tags */\nconst seqTag = defineSequenceTag('tag:yaml.org,2002:seq', {\n create: () => [] as unknown[],\n addItem: (container, item) => {\n container.push(item)\n },\n identify: Array.isArray\n})\n\nexport { seqTag }\n","function isPlainObject (data: unknown): boolean {\n if (data === null || typeof data !== 'object' || Array.isArray(data)) return false\n const prototype = Object.getPrototypeOf(data)\n return prototype === null || prototype === Object.prototype\n}\n\n// Project `object` onto `keys`. Absent keys are skipped (so the result can be\n// safely spread over defaults without clobbering them with `undefined`), hence\n// the `Partial` return.\nfunction pick (object: T, keys: readonly K[]): Partial> {\n const result: Partial> = {}\n for (const key of keys) {\n if (object[key] !== undefined) result[key] = object[key]\n }\n return result\n}\n\nexport {\n isPlainObject,\n pick\n}\n","import { defineSequenceTag } from '../../tag.ts'\nimport { isPlainObject } from '../../common/object.ts'\n\n/**\n * Provided only for YAML 1.1 compatibility and supported by the loader only.\n * JavaScript has no dedicated class to represent this type, so it cannot be\n * identified and dumped.\n *\n * ```yaml\n * !!omap\n * - one: 1\n * - two: 2\n * ```\n *\n * is loaded as\n *\n * ```javascript\n * [\n * { one: 1 },\n * { two: 2 }\n * ]\n * ```\n *\n * @category Tags\n */\nconst omapTag = defineSequenceTag('tag:yaml.org,2002:omap', {\n create: (): { list: unknown[]; seen: Set } => ({ list: [], seen: new Set() }),\n addItem: (carrier, item) => {\n let key: unknown\n\n if (item instanceof Map) {\n if (item.size !== 1) return 'cannot resolve an ordered map item'\n key = item.keys().next().value\n } else if (isPlainObject(item)) {\n const itemKeys = Object.keys(item as Record)\n if (itemKeys.length !== 1) return 'cannot resolve an ordered map item'\n key = itemKeys[0]\n } else {\n return 'cannot resolve an ordered map item'\n }\n\n if (carrier.seen.has(key)) return 'duplicate key in ordered map'\n carrier.seen.add(key)\n carrier.list.push(item)\n return ''\n },\n finalize: (carrier): unknown[] => carrier.list,\n identify: () => false\n})\n\nexport { omapTag }\n","import { defineSequenceTag } from '../../tag.ts'\n\n/**\n * Provided only for YAML 1.1 compatibility and supported by the loader only.\n * JavaScript has no dedicated class to represent this type, so it cannot be\n * identified and dumped.\n *\n * ```yaml\n * !!pairs\n * - one: 1\n * - two: 2\n * ```\n *\n * is loaded as\n *\n * ```javascript\n * [\n * ['one', 1],\n * ['two', 2]\n * ]\n * ```\n *\n * @category Tags\n */\nconst pairsTag = defineSequenceTag('tag:yaml.org,2002:pairs', {\n create: () => [] as [unknown, unknown][],\n addItem: (container, item) => {\n if (item instanceof Map) {\n if (item.size !== 1) return 'cannot resolve a pairs item'\n\n container.push(item.entries().next().value!)\n return ''\n }\n\n if (Object.prototype.toString.call(item) !== '[object Object]') {\n return 'cannot resolve a pairs item'\n }\n\n const object = item as Record\n const keys = Object.keys(object)\n\n if (keys.length !== 1) return 'cannot resolve a pairs item'\n\n container.push([keys[0], object[keys[0]]])\n return ''\n },\n identify: () => false\n})\n\nexport { pairsTag }\n","import { defineMappingTag } from '../../tag.ts'\nimport { isPlainObject } from '../../common/object.ts'\n\n/**\n * This is the default mapping implementation. It uses `{}` objects and has only\n * partial functionality due to language limitations. This choice was made\n * because users expect to get JavaScript objects, and it was left unchanged to\n * avoid too many breaking changes in the v5 release.\n *\n * Side effects:\n *\n * - `Object.hasOwn()` checks or `for...of` loops are required for safe use (to\n * avoid falling through to prototypes).\n * - Only scalar string keys are supported properly.\n * - Other scalar keys, such as `null` and numbers, are converted to strings.\n * This is historical behaviour, and it can cause side effects such as\n * problems with `!!merge`.\n *\n * Note that non-string scalar keys may be deprecated in future versions.\n *\n * Ideally, use {@link realMapTag} instead.\n *\n * @category Tags\n */\nconst mapTag = defineMappingTag('tag:yaml.org,2002:map', {\n create: (): Record => ({}),\n identify: isPlainObject,\n // Dump side: wrap the plain object into the canonical `Map` form the writer\n // walks. Shallow — keys/values stay references to the originals.\n represent: (o: Record) => {\n const map = new Map()\n for (const key of Object.keys(o)) map.set(key, o[key])\n return map\n },\n addPair: (container, key, value) => {\n if (key !== null && typeof key === 'object') {\n return 'object-based map does not support complex keys'\n }\n const normalizedKey = String(key)\n if (normalizedKey === '__proto__') {\n // Define as an own data property so a literal `__proto__` key stays data\n // and never invokes the prototype setter.\n Object.defineProperty(container, normalizedKey, {\n value, enumerable: true, configurable: true, writable: true\n })\n } else {\n container[normalizedKey] = value\n }\n return ''\n },\n // hasOwn, not `in`: a plain object inherits `toString` and friends.\n has: (container, key) => {\n if (key !== null && typeof key === 'object') return false\n return Object.prototype.hasOwnProperty.call(container, String(key))\n },\n keys: (container) => Object.keys(container),\n get: (container, key) => {\n const normalizedKey = String(key)\n // key is from `keys()` only. Strong check is not needed, but leave for sure.\n if (!Object.prototype.hasOwnProperty.call(container, normalizedKey)) return null\n return container[normalizedKey]\n }\n})\n\nexport { mapTag, isPlainObject }\n","import { defineMappingTag } from '../../tag.ts'\n\n/**\n * The YAML 1.1 `!!set` tag, represented as a JavaScript `Set`.\n *\n * @category Tags\n */\nconst setTag = defineMappingTag('tag:yaml.org,2002:set', {\n create: () => new Set(),\n identify: (data) => data instanceof Set,\n represent: (data: Set) => {\n const map = new Map()\n for (const key of data) map.set(key, null)\n return map\n },\n addPair: (container, key, value) => {\n if (value !== null) return 'cannot resolve a set item'\n container.add(key)\n return ''\n },\n has: (container, key) => container.has(key),\n keys: (container) => container.keys(),\n get: () => null\n})\n\nexport { setTag }\n","import {\n NOT_RESOLVED,\n type MappingTagDefinition,\n type ScalarTagDefinition,\n type SequenceTagDefinition,\n type TagDefinition\n} from './tag.ts'\nimport { strTag } from './tag/scalar/str.ts'\nimport { nullCoreTag } from './tag/scalar/null_core.ts'\nimport { nullJsonTag } from './tag/scalar/null_json.ts'\nimport { nullYaml11Tag } from './tag/scalar/null_yaml11.ts'\nimport { boolCoreTag } from './tag/scalar/bool_core.ts'\nimport { boolJsonTag } from './tag/scalar/bool_json.ts'\nimport { boolYaml11Tag } from './tag/scalar/bool_yaml11.ts'\nimport { intCoreTag } from './tag/scalar/int_core.ts'\nimport { intJsonTag } from './tag/scalar/int_json.ts'\nimport { intYaml11Tag } from './tag/scalar/int_yaml11.ts'\nimport { floatCoreTag } from './tag/scalar/float_core.ts'\nimport { floatJsonTag } from './tag/scalar/float_json.ts'\nimport { floatYaml11Tag } from './tag/scalar/float_yaml11.ts'\nimport { mergeTag } from './tag/scalar/merge.ts'\nimport { binaryTag } from './tag/scalar/binary.ts'\nimport { timestampTag } from './tag/scalar/timestamp.ts'\nimport { seqTag } from './tag/sequence/seq.ts'\nimport { omapTag } from './tag/sequence/omap.ts'\nimport { pairsTag } from './tag/sequence/pairs.ts'\nimport { mapTag } from './tag/mapping/map.ts'\nimport { setTag } from './tag/mapping/set.ts'\n\ninterface TagDefinitionMap {\n scalar: Record\n sequence: Record\n mapping: Record\n}\n\ninterface TagDefinitionListMap {\n scalar: ScalarTagDefinition[]\n sequence: SequenceTagDefinition[]\n mapping: MappingTagDefinition[]\n}\n\nfunction createTagDefinitionMap (): TagDefinitionMap {\n return {\n scalar: Object.create(null),\n sequence: Object.create(null),\n mapping: Object.create(null)\n }\n}\n\nfunction createTagDefinitionListMap (): TagDefinitionListMap {\n return {\n scalar: [],\n sequence: [],\n mapping: []\n }\n}\n\nfunction compileTags (tags: readonly TagDefinition[]) {\n const result: TagDefinition[] = []\n\n for (const tag of tags) {\n let index = result.length\n\n for (let previousIndex = 0; previousIndex < result.length; previousIndex++) {\n const previous = result[previousIndex]\n\n if (previous.nodeKind === tag.nodeKind &&\n previous.tagName === tag.tagName &&\n previous.matchByTagPrefix === tag.matchByTagPrefix) {\n index = previousIndex\n break\n }\n }\n\n result[index] = tag\n }\n\n return result\n}\n\n/**\n * Controls tag resolution when loading and type selection when dumping.\n *\n * @category Schemas\n */\nclass Schema {\n readonly tags: readonly TagDefinition[]\n /** @internal */\n readonly implicitScalarTags: readonly ScalarTagDefinition[]\n\n /**\n * Dispatch implicit scalar resolvers by `source.charAt(0)`. Each bucket holds\n * the resolvers that may match that key, in schema order; a key absent from\n * the map uses\n * {@link Schema.implicitScalarAnyFirstChar}\n * (resolvers that declared no first-char constraint, so they apply to any\n * first character).\n */\n private readonly implicitScalarByFirstChar: ReadonlyMap\n private readonly implicitScalarAnyFirstChar: readonly ScalarTagDefinition[]\n\n /**\n * The default scalar tag (`!!str`), resolved once so the composer's fallback\n * for unresolved plain scalars avoids a keyed lookup per scalar.\n *\n * @internal\n */\n readonly defaultScalarTag: ScalarTagDefinition\n\n /**\n * The default container tags (`!!seq` / `!!map`), used by the dumper: when a\n * value is identified by its default tag, the tag is implicit and not\n * printed. Undefined if the schema does not define them (then such values\n * can't be dumped).\n *\n * @internal\n */\n readonly defaultSequenceTag: SequenceTagDefinition | undefined\n /** @internal */\n readonly defaultMappingTag: MappingTagDefinition | undefined\n private readonly exact: TagDefinitionMap\n private readonly prefix: TagDefinitionListMap\n\n constructor (tags: readonly TagDefinition[]) {\n const compiledTags = compileTags(tags)\n const implicitScalarTags: ScalarTagDefinition[] = []\n const exact = createTagDefinitionMap()\n const prefix = createTagDefinitionListMap()\n\n for (const tag of compiledTags) {\n if (tag.nodeKind === 'scalar' && tag.implicit) {\n if (tag.matchByTagPrefix) {\n throw new Error('Implicit scalar tags cannot match by tag prefix')\n }\n\n implicitScalarTags.push(tag)\n }\n\n switch (tag.nodeKind) {\n case 'scalar':\n if (tag.matchByTagPrefix) prefix.scalar.push(tag)\n else exact.scalar[tag.tagName] = tag\n break\n case 'sequence':\n if (tag.matchByTagPrefix) prefix.sequence.push(tag)\n else exact.sequence[tag.tagName] = tag\n break\n case 'mapping':\n if (tag.matchByTagPrefix) prefix.mapping.push(tag)\n else exact.mapping[tag.tagName] = tag\n break\n }\n }\n\n const implicitScalarAnyFirstChar = implicitScalarTags.filter(tag => tag.implicitFirstChars === null)\n\n const keys = new Set()\n for (const tag of implicitScalarTags) {\n if (tag.implicitFirstChars !== null) {\n for (const key of tag.implicitFirstChars) keys.add(key)\n }\n }\n\n const implicitScalarByFirstChar = new Map()\n for (const key of keys) {\n implicitScalarByFirstChar.set(key, implicitScalarTags.filter(tag =>\n tag.implicitFirstChars === null || tag.implicitFirstChars.indexOf(key) !== -1))\n }\n\n const defaultScalarTag = exact.scalar['tag:yaml.org,2002:str']\n if (!defaultScalarTag) throw new Error('schema does not define the default scalar tag (tag:yaml.org,2002:str)')\n\n this.tags = compiledTags\n this.implicitScalarTags = implicitScalarTags\n this.implicitScalarByFirstChar = implicitScalarByFirstChar\n this.implicitScalarAnyFirstChar = implicitScalarAnyFirstChar\n this.defaultScalarTag = defaultScalarTag\n this.defaultSequenceTag = exact.sequence['tag:yaml.org,2002:seq']\n this.defaultMappingTag = exact.mapping['tag:yaml.org,2002:map']\n this.exact = exact\n this.prefix = prefix\n }\n\n /** @internal */\n lookupScalarTag (tagName: string): ScalarTagDefinition | undefined {\n const exactTag = this.exact.scalar[tagName]\n if (exactTag) return exactTag\n\n for (const tag of this.prefix.scalar) {\n if (tagName.startsWith(tag.tagName)) return tag\n }\n\n return undefined\n }\n\n /** @internal */\n lookupSequenceTag (tagName: string): SequenceTagDefinition | undefined {\n const exactTag = this.exact.sequence[tagName]\n if (exactTag) return exactTag\n\n for (const tag of this.prefix.sequence) {\n if (tagName.startsWith(tag.tagName)) return tag\n }\n\n return undefined\n }\n\n /** @internal */\n lookupMappingTag (tagName: string): MappingTagDefinition | undefined {\n const exactTag = this.exact.mapping[tagName]\n if (exactTag) return exactTag\n\n for (const tag of this.prefix.mapping) {\n if (tagName.startsWith(tag.tagName)) return tag\n }\n\n return undefined\n }\n\n /** @internal */\n resolveImplicitScalarTag (source: string): { value: unknown, tag: ScalarTagDefinition } {\n const candidates = this.implicitScalarByFirstChar.get(source.charAt(0)) ??\n this.implicitScalarAnyFirstChar\n\n for (const tag of candidates) {\n const value = tag.resolve(source, false, tag.tagName)\n if (value !== NOT_RESOLVED) return { value, tag }\n }\n\n const tag = this.defaultScalarTag\n return { value: tag.resolve(source, false, tag.tagName), tag }\n }\n\n /**\n * Creates a new schema with the specified tags added. If a tag already\n * exists, it is replaced by the specified tag.\n *\n * @example\n *\n * ```javascript\n * import { CORE_SCHEMA, mergeTag, realMapTag } from 'js-yaml'\n *\n * const schema = CORE_SCHEMA.withTags(mergeTag, realMapTag)\n * ```\n */\n withTags (...tags: Array): Schema {\n let flatTags: TagDefinition[] = []\n for (const tag of tags) flatTags = flatTags.concat(tag)\n\n return new Schema([...this.tags, ...flatTags])\n }\n}\n\n/**\n * The YAML 1.2 Failsafe Schema: strings, sequences, and mappings.\n *\n * @category Schemas\n */\nconst FAILSAFE_SCHEMA = new Schema([\n strTag,\n seqTag,\n mapTag\n])\n\n/**\n * The YAML 1.2 JSON Schema. It uses JSON scalar forms while retaining YAML\n * collection syntax.\n *\n * @category Schemas\n */\nconst JSON_SCHEMA = new Schema([\n ...FAILSAFE_SCHEMA.tags,\n nullJsonTag,\n boolJsonTag,\n intJsonTag,\n floatJsonTag\n])\n\n/**\n * The default schema for the loaders. Note, {@link CORE_SCHEMA} comes\n * without the `!!merge` tag. You can easily enable it if needed.\n *\n * @example\n * Enable {@link mergeTag}:\n *\n * ```javascript\n * import { load, CORE_SCHEMA, mergeTag } from 'js-yaml'\n *\n * try {\n * load(data, { schema: CORE_SCHEMA.withTags(mergeTag) })\n * } catch (e) {\n * console.error(e)\n * }\n * ```\n *\n * @category Schemas\n */\nconst CORE_SCHEMA = new Schema([\n ...FAILSAFE_SCHEMA.tags,\n nullCoreTag,\n boolCoreTag,\n intCoreTag,\n floatCoreTag\n])\n\n/**\n * YAML 1.1-compatible schema.\n *\n * @category Schemas\n */\nconst YAML11_SCHEMA = new Schema([\n ...FAILSAFE_SCHEMA.tags,\n nullYaml11Tag,\n boolYaml11Tag,\n intYaml11Tag,\n floatYaml11Tag,\n timestampTag,\n mergeTag,\n binaryTag,\n omapTag,\n pairsTag,\n setTag\n])\n\n/**\n * The dumper schema for maximum compatibility. It combines all supported type\n * variants from YAML 1.1 and YAML 1.2 so strings matching any of them are\n * quoted. This makes the generated YAML more compatible with other parsers.\n *\n * The schema is based on YAML 1.1, but extends `!!int` and `!!float` to accept\n * both YAML 1.1 and Core Schema forms, since Core Schema supports some forms\n * that YAML 1.1 does not.\n *\n * @category Schemas\n */\nconst DUMP_SCHEMA = YAML11_SCHEMA.withTags(\n {\n ...intYaml11Tag,\n resolve: (source, isExplicit, tagName) => {\n const result = intYaml11Tag.resolve(source, isExplicit, tagName)\n return result === NOT_RESOLVED ? intCoreTag.resolve(source, isExplicit, tagName) : result\n }\n },\n {\n ...floatYaml11Tag,\n resolve: (source, isExplicit, tagName) => {\n const result = floatYaml11Tag.resolve(source, isExplicit, tagName)\n return result === NOT_RESOLVED ? floatCoreTag.resolve(source, isExplicit, tagName) : result\n }\n }\n)\n\nexport {\n Schema,\n FAILSAFE_SCHEMA,\n JSON_SCHEMA,\n CORE_SCHEMA,\n YAML11_SCHEMA,\n DUMP_SCHEMA\n}\n","import { defineMappingTag } from '../../tag.ts'\nimport { isPlainObject } from '../../common/object.ts'\n\n/**\n * Recommended when non-string keys are actually needed. It uses native\n * JavaScript `Map` objects, so keys keep their constructed types instead of\n * being converted to strings.\n *\n * It is not the default to avoid widespread breaking changes in existing\n * projects. `Map` has a different access API and does not pass deep equality\n * checks against `{}`-based fixtures. Alongside the other changes in v5,\n * making it the default was considered too disruptive.\n *\n * If these differences are acceptable for your project, we recommend using\n * {@link realMapTag} to guarantee the absence of problems and side effects.\n *\n * @example\n * Enable {@link realMapTag}:\n *\n * ```javascript\n * import { load, CORE_SCHEMA, realMapTag } from 'js-yaml'\n *\n * try {\n * load(data, { schema: CORE_SCHEMA.withTags(realMapTag) })\n * } catch (e) {\n * console.error(e)\n * }\n * ```\n *\n * @category Tags\n */\nconst realMapTag = defineMappingTag('tag:yaml.org,2002:map', {\n create: () => new Map(),\n addPair: (container: Map, key, value) => {\n container.set(key, value)\n return ''\n },\n has: (container: Map, key) => container.has(key),\n keys: (container: Map) => container.keys(),\n get: (container: Map, key) => container.get(key),\n // Dump side: handle both a real `Map` and a plain object, so this tag fully\n // replaces the default map representation when dumping too.\n identify: (data) => data instanceof Map || isPlainObject(data),\n // Dump side: the canonical mapping form is a `Map`. A real `Map` passes\n // through untouched (keys keep their type); a plain object is wrapped\n // shallowly. Lossless — nothing is stringified.\n represent: (data) => {\n if (data instanceof Map) return data\n const map = new Map()\n const obj = data as Record\n for (const key of Object.keys(obj)) map.set(key, obj[key])\n return map\n }\n})\n\nexport { realMapTag }\n","import { defineMappingTag } from '../../tag.ts'\nimport { isPlainObject } from '../../common/object.ts'\n\n// Coerce a constructed key into the string identity a `{}` representation uses.\n// Returns null for a nested array key (an array element that is itself an\n// array), which would otherwise blow up exponentially when stringified via\n// aliases.\nfunction normalizeKey (key: unknown): string | null {\n if (Array.isArray(key)) {\n const array = Array.prototype.slice.call(key) as unknown[]\n\n for (let index = 0; index < array.length; index++) {\n if (Array.isArray(array[index])) return null\n\n if (typeof array[index] === 'object' &&\n Object.prototype.toString.call(array[index]) === '[object Object]') {\n array[index] = '[object Object]'\n }\n }\n\n return String(array)\n }\n\n if (typeof key === 'object' &&\n Object.prototype.toString.call(key) === '[object Object]') {\n return '[object Object]'\n }\n\n return String(key)\n}\n\n/**\n * This implementation exists solely to reproduce v4 behavior exactly. Its use\n * is strongly discouraged. If complex or non-string keys are needed, use\n * {@link realMapTag} instead.\n *\n * @category Tags\n */\nconst legacyMapTag = defineMappingTag('tag:yaml.org,2002:map', {\n create: (): Record => ({}),\n identify: isPlainObject,\n // Dump side: wrap the plain object into the canonical `Map` form the writer\n // walks. Shallow — keys/values stay references to the originals.\n represent: (o: Record) => {\n const map = new Map()\n for (const key of Object.keys(o)) map.set(key, o[key])\n return map\n },\n addPair: (container, key, value) => {\n const normalizedKey = normalizeKey(key)\n if (normalizedKey === null) return 'nested arrays are not supported inside keys'\n if (normalizedKey === '__proto__') {\n // Define as an own data property so a literal `__proto__` key stays data\n // and never invokes the prototype setter.\n Object.defineProperty(container, normalizedKey, {\n value, enumerable: true, configurable: true, writable: true\n })\n } else {\n container[normalizedKey] = value\n }\n return ''\n },\n // hasOwn, not `in`: a plain object inherits `toString` and friends.\n has: (container, key) => {\n const normalizedKey = normalizeKey(key)\n return normalizedKey !== null && Object.prototype.hasOwnProperty.call(container, normalizedKey)\n },\n keys: (container) => Object.keys(container),\n get: (container, key) => {\n const normalizedKey = String(key)\n // key is from `keys()` only. Strong check is not needed, but leave for sure.\n if (!Object.prototype.hasOwnProperty.call(container, normalizedKey)) return null\n return container[normalizedKey]\n }\n})\n\nexport { legacyMapTag, isPlainObject }\n","export interface SnippetMark {\n name?: string | null\n buffer: string\n position: number\n line: number\n column: number\n snippet?: string | null\n}\n\ninterface SnippetOptions {\n maxLength?: number\n indent?: number\n linesBefore?: number\n linesAfter?: number\n}\n\nconst DEFAULT_SNIPPET_OPTIONS: Required = {\n maxLength: 79,\n indent: 1,\n linesBefore: 3,\n linesAfter: 2\n}\n\n// get snippet for a single line, respecting maxLength\nfunction getLine (buffer: string, lineStart: number, lineEnd: number, position: number, maxLineLength: number) {\n let head = ''\n let tail = ''\n const maxHalfLength = Math.floor(maxLineLength / 2) - 1\n\n if (position - lineStart > maxHalfLength) {\n head = ' ... '\n lineStart = position - maxHalfLength + head.length\n }\n\n if (lineEnd - position > maxHalfLength) {\n tail = ' ...'\n lineEnd = position + maxHalfLength - tail.length\n }\n\n return {\n str: head + buffer.slice(lineStart, lineEnd).replace(/\\t/g, '→') + tail,\n pos: position - lineStart + head.length // relative position\n }\n}\n\nfunction padStart (string: string, max: number) {\n // max() protects from negativa value, to avoid exception.\n return ' '.repeat(Math.max(max - string.length, 0)) + string\n}\n\nfunction makeSnippet (mark: SnippetMark, options?: SnippetOptions) {\n if (!mark.buffer) return null\n\n const opts = { ...DEFAULT_SNIPPET_OPTIONS, ...options }\n\n const re = /\\r?\\n|\\r|\\0/g\n const lineStarts = [0]\n const lineEnds: number[] = []\n let match: RegExpExecArray | null\n let foundLineNo = -1\n\n while ((match = re.exec(mark.buffer))) {\n lineEnds.push(match.index)\n lineStarts.push(match.index + match[0].length)\n\n if (mark.position <= match.index && foundLineNo < 0) {\n foundLineNo = lineStarts.length - 2\n }\n }\n\n if (foundLineNo < 0) foundLineNo = lineStarts.length - 1\n\n let result = ''\n const lineNoLength = Math.min(mark.line + opts.linesAfter, lineEnds.length).toString().length\n const maxLineLength = opts.maxLength - (opts.indent + lineNoLength + 3)\n\n for (let i = 1; i <= opts.linesBefore; i++) {\n if (foundLineNo - i < 0) break\n const line = getLine(\n mark.buffer,\n lineStarts[foundLineNo - i],\n lineEnds[foundLineNo - i],\n mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo - i]),\n maxLineLength\n )\n result = `${' '.repeat(opts.indent)}${padStart((mark.line - i + 1).toString(), lineNoLength)} | ${line.str}\\n${result}`\n }\n\n const line = getLine(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength)\n result += `${' '.repeat(opts.indent)}${padStart((mark.line + 1).toString(), lineNoLength)} | ${line.str}\\n`\n result += `${'-'.repeat(opts.indent + lineNoLength + 3 + line.pos)}^\\n`\n\n for (let i = 1; i <= opts.linesAfter; i++) {\n if (foundLineNo + i >= lineEnds.length) break\n const line = getLine(\n mark.buffer,\n lineStarts[foundLineNo + i],\n lineEnds[foundLineNo + i],\n mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo + i]),\n maxLineLength\n )\n result += `${' '.repeat(opts.indent)}${padStart((mark.line + i + 1).toString(), lineNoLength)} | ${line.str}\\n`\n }\n\n return result.replace(/\\n$/, '')\n}\n\nexport default makeSnippet\n","import makeSnippet, { type SnippetMark } from './snippet.ts'\n\n// YAML error class. http://stackoverflow.com/questions/8458984\n//\nfunction formatError (exception: YAMLException, compact?: boolean) {\n let where = ''\n\n if (!exception.mark) return exception.reason\n\n if (exception.mark.name) {\n where += `in \"${exception.mark.name}\" `\n }\n\n where += `(${exception.mark.line + 1}:${exception.mark.column + 1})`\n\n if (!compact && exception.mark.snippet) {\n where += `\\n\\n${exception.mark.snippet}`\n }\n\n return `${exception.reason} ${where}`\n}\n\n/**\n * A YAML error. Unlike an ordinary `Error`, it adds a source snippet showing\n * the location of the problem to the error message, when available.\n *\n * @category Main\n */\nclass YAMLException extends Error {\n reason: string\n mark?: SnippetMark\n\n /**\n * Optional `mark` contains source snippet data. Usually, use\n * {@link YAMLException.throwAt} instead of passing it directly.\n */\n constructor (reason: string, mark?: SnippetMark) {\n super()\n\n this.name = 'YAMLException'\n this.reason = reason\n this.mark = mark\n this.message = formatError(this, false)\n\n // Guard for ancient browsers\n if (Error.captureStackTrace) {\n // Include stack trace in error object,\n Error.captureStackTrace(this, this.constructor)\n }\n }\n\n /**\n * Returns the formatted error, omitting the source snippet in compact mode.\n */\n toString (compact?: boolean) {\n return `${this.name}: ${formatError(this, compact)}`\n }\n\n /**\n * Builds a YAMLException with a source snippet and throws it. `source` is\n * the raw input text; `position` is an offset into it.\n */\n static throwAt (source: string, position: number, message: string, filename = ''): never {\n let line = 0\n let lineStart = 0\n\n for (let index = 0; index < position; index++) {\n const ch = source.charCodeAt(index)\n\n if (ch === 0x0A/* LF */) {\n line++\n lineStart = index + 1\n } else if (ch === 0x0D/* CR */) {\n line++\n if (source.charCodeAt(index + 1) === 0x0A/* LF */) index++\n lineStart = index + 1\n }\n }\n\n const mark: SnippetMark = {\n name: filename,\n buffer: source,\n position,\n line,\n column: position - lineStart\n }\n\n mark.snippet = makeSnippet(mark)\n throw new YAMLException(message, mark)\n }\n}\n\nexport { YAMLException }\n","/** @category Events */\nconst EVENT_ID = {\n DOCUMENT: 1,\n SEQUENCE: 2,\n MAPPING: 3,\n SCALAR: 4,\n ALIAS: 5,\n POP: 6\n} as const\n\n/** @category Events */\ntype EventId = typeof EVENT_ID[keyof typeof EVENT_ID]\n\n/** @category Nodes */\nconst SCALAR_STYLE = {\n PLAIN: 1,\n SINGLE_QUOTED: 2,\n DOUBLE_QUOTED: 3,\n LITERAL_BLOCK: 4,\n FOLDED_BLOCK: 5\n} as const\n\n/** @category Nodes */\ntype ScalarStyle = typeof SCALAR_STYLE[keyof typeof SCALAR_STYLE]\n\n/** @category Nodes */\nconst COLLECTION_STYLE = {\n BLOCK: 1,\n FLOW: 2\n} as const\n\n/** @category Nodes */\ntype CollectionStyle = typeof COLLECTION_STYLE[keyof typeof COLLECTION_STYLE]\n\n/** @category Nodes */\nconst CHOMPING_MODE = {\n CLIP: 1,\n STRIP: 2,\n KEEP: 3\n} as const\n\n/** @category Nodes */\ntype ChompingMode = typeof CHOMPING_MODE[keyof typeof CHOMPING_MODE]\n\n/** @category Events */\ntype DocumentDirective =\n { kind: 'yaml', version: string } |\n { kind: 'tag', handle: string, prefix: string }\n\ntype TagHandlers = Record\n\n/** @category Events */\ninterface DocumentEvent {\n type: typeof EVENT_ID.DOCUMENT\n explicitStart: boolean\n explicitEnd: boolean\n directives: DocumentDirective[]\n}\n\n/** @category Events */\ninterface SequenceEvent {\n type: typeof EVENT_ID.SEQUENCE\n start: number\n anchorStart: number\n anchorEnd: number\n tagStart: number\n tagEnd: number\n style: CollectionStyle\n}\n\n/** @category Events */\ninterface MappingEvent {\n type: typeof EVENT_ID.MAPPING\n start: number\n anchorStart: number\n anchorEnd: number\n tagStart: number\n tagEnd: number\n style: CollectionStyle\n}\n\n/**\n * A scalar whose decoded value can be read with {@link getScalarValue}.\n *\n * @category Events\n */\ninterface ScalarEvent {\n type: typeof EVENT_ID.SCALAR\n valueStart: number\n valueEnd: number\n anchorStart: number\n anchorEnd: number\n tagStart: number\n tagEnd: number\n style: ScalarStyle\n chomping: ChompingMode\n indent: number\n fast: boolean\n}\n\n/** @category Events */\ninterface AliasEvent {\n type: typeof EVENT_ID.ALIAS\n anchorStart: number\n anchorEnd: number\n}\n\n/**\n * Closes the most recently opened document, sequence, or mapping.\n *\n * @category Events\n */\ninterface PopEvent {\n type: typeof EVENT_ID.POP\n}\n\n/**\n * Source ranges are zero-based and end-exclusive; `-1` means absent.\n *\n * @category Events\n */\ntype Event =\n DocumentEvent |\n SequenceEvent |\n MappingEvent |\n ScalarEvent |\n AliasEvent |\n PopEvent\n\nexport {\n EVENT_ID,\n SCALAR_STYLE,\n COLLECTION_STYLE,\n CHOMPING_MODE,\n\n type EventId,\n type ScalarStyle,\n type CollectionStyle,\n type ChompingMode,\n\n type DocumentDirective,\n type TagHandlers,\n type DocumentEvent,\n type SequenceEvent,\n type MappingEvent,\n type ScalarEvent,\n type AliasEvent,\n type PopEvent,\n type Event\n}\n","import {\n SCALAR_STYLE,\n CHOMPING_MODE,\n type ScalarEvent\n} from './events.ts'\n\nconst NO_RANGE = -1\n\n// --- character helpers (mirrors src/loader.ts, kept self-contained here) ---\n\nfunction simpleEscapeSequence (c: number) {\n switch (c) {\n case 0x30/* 0 */: return '\\x00'\n case 0x61/* a */: return '\\x07'\n case 0x62/* b */: return '\\x08'\n case 0x74/* t */: return '\\x09'\n case 0x09/* Tab */: return '\\x09'\n case 0x6E/* n */: return '\\x0A'\n case 0x76/* v */: return '\\x0B'\n case 0x66/* f */: return '\\x0C'\n case 0x72/* r */: return '\\x0D'\n case 0x65/* e */: return '\\x1B'\n case 0x20/* Space */: return ' '\n case 0x22/* \" */: return '\\x22'\n case 0x2F/* / */: return '/'\n case 0x5C/* \\ */: return '\\x5C'\n case 0x4E/* N */: return '\\x85'\n case 0x5F/* _ */: return '\\xA0'\n case 0x4C/* L */: return '\\u2028'\n case 0x50/* P */: return '\\u2029'\n default: return ''\n }\n}\n\nconst simpleEscapeCheck = new Array(256)\nconst simpleEscapeMap = new Array(256)\nfor (let i = 0; i < 256; i++) {\n simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0\n simpleEscapeMap[i] = simpleEscapeSequence(i)\n}\n\nfunction charFromCodepoint (c: number) {\n if (c <= 0xFFFF) {\n return String.fromCharCode(c)\n }\n return String.fromCharCode(\n ((c - 0x010000) >> 10) + 0xD800,\n ((c - 0x010000) & 0x03FF) + 0xDC00\n )\n}\n\nfunction fromHexCode (c: number) {\n if (c >= 0x30/* 0 */ && c <= 0x39/* 9 */) return c - 0x30\n const lc = c | 0x20\n // Double-quoted scalar ranges are validated by parser.ts before cooking.\n return lc - 0x61 + 10\n}\n\nfunction escapedHexLen (c: number) {\n if (c === 0x78/* x */) return 2\n if (c === 0x75/* u */) return 4\n // Double-quoted scalar ranges are validated by parser.ts before cooking.\n return 8\n}\n\n// --- line folding helpers ---\n\n// Skip a run of line breaks plus the leading whitespace of the following\n// lines, returning the number of line breaks consumed and the new position.\nfunction skipFoldedBreaks (input: string, position: number, end: number) {\n let breaks = 0\n\n while (position < end) {\n const ch = input.charCodeAt(position)\n\n if (ch === 0x0A/* LF */) {\n breaks++\n position++\n } else if (ch === 0x0D/* CR */) {\n breaks++\n position++\n if (input.charCodeAt(position) === 0x0A/* LF */) position++\n } else if (ch === 0x20/* Space */ || ch === 0x09/* Tab */) {\n position++\n } else {\n break\n }\n }\n\n return { position, breaks }\n}\n\n// Folding of line breaks between content chunks: a single break becomes a\n// space, several breaks become (count - 1) newlines.\nfunction foldedBreaks (count: number) {\n if (count === 1) return ' '\n // Called only after skipFoldedBreaks() consumed at least one line break.\n return '\\n'.repeat(count - 1)\n}\n\n// --- per-style extractors ---\n\nfunction getPlainValue (input: string, start: number, end: number) {\n let result = ''\n let position = start\n let captureStart = start\n let captureEnd = start\n\n while (position < end) {\n const ch = input.charCodeAt(position)\n\n if (ch === 0x0A/* LF */ || ch === 0x0D/* CR */) {\n result += input.slice(captureStart, captureEnd)\n const fold = skipFoldedBreaks(input, position, end)\n result += foldedBreaks(fold.breaks)\n position = captureStart = captureEnd = fold.position\n } else {\n position++\n if (ch !== 0x20/* Space */ && ch !== 0x09/* Tab */) captureEnd = position\n }\n }\n\n return result + input.slice(captureStart, captureEnd)\n}\n\nfunction getSingleQuotedValue (input: string, start: number, end: number) {\n let result = ''\n let position = start\n let captureStart = start\n let captureEnd = start\n\n while (position < end) {\n const ch = input.charCodeAt(position)\n\n if (ch === 0x27/* ' */) {\n // Within the stored range every quote is part of an escaped '' pair.\n result += input.slice(captureStart, position) + \"'\"\n position += 2\n captureStart = captureEnd = position\n } else if (ch === 0x0A/* LF */ || ch === 0x0D/* CR */) {\n result += input.slice(captureStart, captureEnd)\n const fold = skipFoldedBreaks(input, position, end)\n result += foldedBreaks(fold.breaks)\n position = captureStart = captureEnd = fold.position\n } else {\n position++\n if (ch !== 0x20/* Space */ && ch !== 0x09/* Tab */) captureEnd = position\n }\n }\n\n // Whitespace right before the closing quote is significant (it is only\n // stripped when followed by a line break).\n return result + input.slice(captureStart, end)\n}\n\nfunction getDoubleQuotedValue (input: string, start: number, end: number) {\n let result = ''\n let position = start\n let captureStart = start\n let captureEnd = start\n\n while (position < end) {\n const ch = input.charCodeAt(position)\n\n if (ch === 0x5C/* \\ */) {\n result += input.slice(captureStart, position)\n position++\n const escaped = input.charCodeAt(position)\n\n if (escaped === 0x0A/* LF */ || escaped === 0x0D/* CR */) {\n // Escaped line break: a line continuation that joins with nothing.\n position = skipFoldedBreaks(input, position, end).position\n } else if (escaped < 256 && simpleEscapeCheck[escaped]) {\n result += simpleEscapeMap[escaped]\n position++\n } else {\n // parser.ts has already rejected unknown escapes and invalid hex digits.\n let hexLength = escapedHexLen(escaped)\n let hexResult = 0\n\n for (; hexLength > 0; hexLength--) {\n position++\n const digit = fromHexCode(input.charCodeAt(position))\n hexResult = (hexResult << 4) + digit\n }\n\n result += charFromCodepoint(hexResult)\n position++\n }\n\n captureStart = captureEnd = position\n } else if (ch === 0x0A/* LF */ || ch === 0x0D/* CR */) {\n result += input.slice(captureStart, captureEnd)\n const fold = skipFoldedBreaks(input, position, end)\n result += foldedBreaks(fold.breaks)\n position = captureStart = captureEnd = fold.position\n } else {\n position++\n if (ch !== 0x20/* Space */ && ch !== 0x09/* Tab */) captureEnd = position\n }\n }\n\n return result + input.slice(captureStart, end)\n}\n\nfunction getBlockValue (\n input: string,\n start: number,\n end: number,\n indent: number,\n chomping: number,\n folded: boolean\n) {\n const textIndent = indent < 0 ? 0 : indent\n // The range starts at column 0 of the first line and includes every line\n // break, including those of trailing blank lines.\n const region = input.slice(start, end).replace(/\\r\\n?/g, '\\n')\n // An empty range is a block with no lines at all (e.g. an empty `|+`) and\n // must stay empty; a naive split would invent a phantom blank line. Otherwise\n // a trailing line break leaves a trailing '' from split() that is not a real\n // line (just the terminator of the last one), so drop it. Interior blank\n // lines are kept.\n const lines = region === ''\n ? []\n : (region.endsWith('\\n') ? region.slice(0, -1) : region).split('\\n')\n\n let result = ''\n let didReadContent = false\n let emptyLines = 0\n let atMoreIndented = false\n\n for (const line of lines) {\n // Whitespace beyond the content indentation is part of the content, so the\n // indentation scan stops at textIndent. A line is empty only when nothing\n // remains after the (capped) indentation.\n // indent < 0 means no content line was detected (a wholly blank block), so\n // every line is an empty line.\n let column = 0\n while (column < textIndent && line.charCodeAt(column) === 0x20/* Space */) column++\n\n if (indent < 0 || column >= line.length) {\n emptyLines++\n continue\n }\n\n const content = line.slice(textIndent)\n const first = content.charCodeAt(0)\n\n if (folded) {\n if (first === 0x20/* Space */ || first === 0x09/* Tab */) {\n // More-indented lines are not folded.\n atMoreIndented = true\n result += '\\n'.repeat(didReadContent ? 1 + emptyLines : emptyLines)\n } else if (atMoreIndented) {\n atMoreIndented = false\n result += '\\n'.repeat(emptyLines + 1)\n } else if (emptyLines === 0) {\n if (didReadContent) result += ' '\n } else {\n result += '\\n'.repeat(emptyLines)\n }\n } else {\n result += '\\n'.repeat(didReadContent ? 1 + emptyLines : emptyLines)\n }\n\n result += content\n didReadContent = true\n emptyLines = 0\n }\n\n if (chomping === CHOMPING_MODE.KEEP) {\n result += '\\n'.repeat(didReadContent ? 1 + emptyLines : emptyLines)\n } else if (chomping !== CHOMPING_MODE.STRIP) {\n if (didReadContent) result += '\\n'\n }\n\n return result\n}\n\n/**\n * Decodes the scalar referenced by event offsets in `input`.\n *\n * @category Events\n */\nfunction getScalarValue (input: string, scalar: ScalarEvent): string {\n if (scalar.valueStart === NO_RANGE) return ''\n\n const { valueStart, valueEnd } = scalar\n\n // Fast path: the parser marked this scalar as a verbatim slice of the input\n // (single-line plain / quoted with no escapes or folded breaks), so the\n // per-style char loop below would just reproduce the slice.\n if (scalar.fast) return input.slice(valueStart, valueEnd)\n\n switch (scalar.style) {\n case SCALAR_STYLE.SINGLE_QUOTED:\n return getSingleQuotedValue(input, valueStart, valueEnd)\n case SCALAR_STYLE.DOUBLE_QUOTED:\n return getDoubleQuotedValue(input, valueStart, valueEnd)\n case SCALAR_STYLE.LITERAL_BLOCK:\n return getBlockValue(input, valueStart, valueEnd, scalar.indent, scalar.chomping, false)\n case SCALAR_STYLE.FOLDED_BLOCK:\n return getBlockValue(input, valueStart, valueEnd, scalar.indent, scalar.chomping, true)\n default:\n return getPlainValue(input, valueStart, valueEnd)\n }\n}\n\nexport {\n getScalarValue\n}\n","const DEFAULT_TAG_HANDLERS: Readonly> = Object.assign(\n Object.create(null),\n {\n '!': '!',\n '!!': 'tag:yaml.org,2002:'\n }\n)\n\nfunction tagPercentEncode (source: string) {\n return encodeURI(source).replace(/!/g, '%21')\n}\n\nfunction tagNameFull (rawTag: string, tagHandlers?: Readonly>) {\n if (rawTag.startsWith('!<') && rawTag.endsWith('>')) {\n return decodeURIComponent(rawTag.slice(2, -1))\n }\n\n const handleEnd = rawTag.indexOf('!', 1)\n const handle = handleEnd === -1 ? '!' : rawTag.slice(0, handleEnd + 1)\n const prefix = tagHandlers?.[handle] ?? DEFAULT_TAG_HANDLERS[handle] ?? handle\n\n return decodeURIComponent(prefix) + decodeURIComponent(rawTag.slice(handle.length))\n}\n\nfunction tagNameShort (fullTag: string) {\n let tag = fullTag\n\n if (tag.charCodeAt(0) === 0x21) {\n tag = tag.slice(1)\n return `!${tagPercentEncode(tag)}`\n }\n\n if (tag.slice(0, 18) === 'tag:yaml.org,2002:') {\n return `!!${tagPercentEncode(tag.slice(18))}`\n }\n\n return `!<${tagPercentEncode(tag)}>`\n}\n\nexport {\n tagNameFull,\n tagNameShort\n}\n","import {\n EVENT_ID,\n SCALAR_STYLE,\n type Event,\n type TagHandlers,\n type MappingEvent,\n type ScalarEvent,\n type SequenceEvent\n} from './events.ts'\nimport { getScalarValue } from './parser_scalar.ts'\nimport { CORE_SCHEMA, type Schema } from '../schema.ts'\nimport {\n NOT_RESOLVED,\n type MappingTagDefinition,\n type ScalarTagDefinition,\n type SequenceTagDefinition\n} from '../tag.ts'\nimport { YAMLException } from '../common/exception.ts'\nimport { tagNameFull } from '../common/tagname.ts'\n\nconst NO_RANGE = -1\n\nconst MERGE_TAG_NAME = 'tag:yaml.org,2002:merge'\n\ninterface DocumentFrame {\n kind: 'document'\n position: number\n value: unknown\n hasValue: boolean\n}\n\ninterface SequenceFrame {\n kind: 'sequence'\n position: number\n value: any\n tag: SequenceTagDefinition\n anchor: Anchor | null\n index: number\n}\n\ninterface MappingFrame {\n kind: 'mapping'\n position: number\n value: any\n tag: MappingTagDefinition\n anchor: Anchor | null\n key: unknown\n keyPosition: number\n hasKey: boolean\n // The key slot drops its tag, but `<<` is recognized by tag, not by value.\n keyIsMerge: boolean\n // Keys brought in by a merge that an explicit pair is still allowed to\n // override. Lazily allocated: stays null for mappings without `<<`.\n overridable: Set | null\n}\n\ntype Frame = DocumentFrame | SequenceFrame | MappingFrame\n\ntype AnyTag = ScalarTagDefinition | SequenceTagDefinition | MappingTagDefinition\n\ninterface ValueAndTag {\n value: unknown\n tag: AnyTag\n}\n\ninterface Anchor {\n value: unknown\n tag: AnyTag\n isValueFinal: boolean\n}\n\n/** @category Events */\ninterface ConstructorOptions {\n /** Source text referenced by offsets in `events`. */\n source: string\n filename?: string\n\n /**\n * Schema to use.\n *\n * @defaultValue {@link CORE_SCHEMA}\n */\n schema?: Schema\n\n /**\n * Enables compatibility with `JSON.parse` behavior. Duplicate keys in a\n * mapping override values instead of throwing an error.\n *\n * @defaultValue `false`\n */\n json?: boolean\n\n /**\n * Maximum total number of keys processed by merge (`<<`) across one load\n * call. Each member of a merge sequence also counts as one key. Set to `-1`\n * to disable the limit.\n *\n * @defaultValue `10000`\n */\n maxTotalMergeKeys?: number\n\n /**\n * Maximum number of alias nodes (`*ref`) per document. Set to `0` to reject\n * all aliases, or to `-1` for no limit.\n *\n * @defaultValue `-1`\n */\n maxAliases?: number\n}\n\n// `source` is input data, not config — so it has no default here.\nconst DEFAULT_CONSTRUCTOR_OPTIONS: Required> = {\n filename: '',\n schema: CORE_SCHEMA,\n json: false,\n maxTotalMergeKeys: 10000,\n maxAliases: -1\n}\n\ninterface ConstructorState extends Required {\n events: Event[]\n documents: unknown[]\n eventIndex: number\n position: number\n frames: Frame[]\n anchors: Map\n // Mapping tag each sequence element was built with, keyed by the element\n // itself. Needed by `<<` merge, which sees only the finished element values.\n nodeTags: Map>\n tagHandlers: TagHandlers\n totalMergeKeys: number\n aliasCount: number\n}\n\nfunction eventPosition (event: Event) {\n if ('tagStart' in event && event.tagStart !== NO_RANGE) return event.tagStart\n if ('anchorStart' in event && event.anchorStart !== NO_RANGE) return event.anchorStart\n if ('valueStart' in event && event.valueStart !== NO_RANGE) return event.valueStart\n if ('start' in event) return event.start\n return 0\n}\n\nfunction throwError (state: ConstructorState, message: string): never {\n YAMLException.throwAt(state.source, state.position, message, state.filename)\n}\n\nfunction finalizeCollection (\n state: ConstructorState,\n position: number,\n tag: SequenceTagDefinition | MappingTagDefinition,\n carrier: unknown\n) {\n try {\n return tag.finalize(carrier)\n } catch (error) {\n if (error instanceof YAMLException) throw error\n YAMLException.throwAt(\n state.source,\n position,\n error instanceof Error ? error.message : String(error),\n state.filename\n )\n }\n}\n\nfunction constructScalar (\n state: ConstructorState,\n event: ScalarEvent\n): ValueAndTag {\n const source = getScalarValue(state.source, event)\n const rawTag = event.tagStart === NO_RANGE\n ? ''\n : state.source.slice(event.tagStart, event.tagEnd)\n const strTag = state.schema.defaultScalarTag\n\n if (rawTag !== '') {\n if (rawTag === '!') return { value: source, tag: strTag }\n\n const tagName = tagNameFull(rawTag, state.tagHandlers)\n const scalarTag = state.schema.lookupScalarTag(tagName)\n\n if (scalarTag) {\n const result = scalarTag.resolve(source, true, tagName)\n\n if (result === NOT_RESOLVED) {\n throwError(state, `cannot resolve a node with !<${tagName}> explicit tag`)\n }\n\n return { value: result, tag: scalarTag }\n }\n\n // An empty node carrying a collection tag (e.g. `!!map`, `!!seq`) is emitted\n // by the parser as a scalar event, since there is no collection syntax to key\n // off. Resolve it here by the explicit tag's kind into an empty collection.\n const collectionTagDef =\n state.schema.lookupMappingTag(tagName) ??\n state.schema.lookupSequenceTag(tagName)\n\n if (collectionTagDef) {\n if (source !== '') {\n throwError(state, `cannot resolve a node with !<${tagName}> explicit tag`)\n }\n\n const carrier = collectionTagDef.create(tagName)\n const value = collectionTagDef.carrierIsResult\n ? carrier\n : finalizeCollection(state, state.position, collectionTagDef, carrier)\n return { value, tag: collectionTagDef }\n }\n\n throwError(state, `unknown scalar tag !<${tagName}>`)\n }\n\n if (event.style === SCALAR_STYLE.PLAIN) {\n return state.schema.resolveImplicitScalarTag(source)\n }\n\n return { value: strTag.resolve(source, false, strTag.tagName), tag: strTag }\n}\n\nfunction collectionTagName (\n state: ConstructorState,\n event: SequenceEvent | MappingEvent,\n defaultTagName: string\n) {\n const rawTag = event.tagStart === NO_RANGE\n ? ''\n : state.source.slice(event.tagStart, event.tagEnd)\n const tagName = rawTag === '' || rawTag === '!'\n ? defaultTagName\n : tagNameFull(rawTag, state.tagHandlers)\n\n return tagName\n}\n\n// A merge source must be a mapping; every mapping tag exposes the read side.\nfunction isMappingTag (tag: AnyTag): tag is MappingTagDefinition {\n return tag.nodeKind === 'mapping'\n}\n\nfunction chargeMergeWork (state: ConstructorState) {\n state.totalMergeKeys++\n\n if (state.maxTotalMergeKeys !== -1 && state.totalMergeKeys > state.maxTotalMergeKeys) {\n throwError(state, `merge keys exceeded maxTotalMergeKeys (${state.maxTotalMergeKeys})`)\n }\n}\n\n// Fold the keys of one mapping source into the target frame, honoring merge\n// precedence: an already-present key (explicit or from an earlier source) wins.\nfunction mergeKeys (state: ConstructorState, frame: MappingFrame, source: unknown, sourceTag: MappingTagDefinition) {\n // Count the source mapping itself to bound sequences of empty mappings.\n chargeMergeWork(state)\n\n for (const sourceKey of sourceTag.keys(source)) {\n chargeMergeWork(state)\n\n if (frame.tag.has(frame.value, sourceKey)) continue\n\n const err = frame.tag.addPair(frame.value, sourceKey, sourceTag.get(source, sourceKey))\n if (err) throwError(state, err)\n\n frame.overridable ??= new Set()\n frame.overridable.add(sourceKey)\n }\n}\n\n// The value of a `<<` key: either a mapping (fold its keys) or a sequence of\n// mappings (fold each). Sequence elements arrive as bare values, so the tag each\n// was built with comes from `nodeTags`; a miss means it is not a mapping (a\n// scalar, a nested sequence, or a value some sequence tag synthesized itself).\nfunction mergeSource (state: ConstructorState, frame: MappingFrame, source: unknown, sourceTag: AnyTag) {\n state.position = frame.keyPosition\n\n if (isMappingTag(sourceTag)) {\n mergeKeys(state, frame, source, sourceTag)\n } else if (sourceTag.nodeKind === 'sequence' && Array.isArray(source)) {\n // The current merge budget is sufficient; this hard cap only further limits\n // the attack vector, so there is no reason to expose it as a public option.\n if (source.length > 100) {\n throwError(state, 'abnormal merge sequence size')\n }\n\n for (const element of source) {\n const elementTag = state.nodeTags.get(element)\n if (!elementTag) {\n throwError(state, 'cannot merge mappings; the provided source object is unacceptable')\n }\n mergeKeys(state, frame, element, elementTag)\n }\n } else {\n throwError(state, 'cannot merge mappings; the provided source object is unacceptable')\n }\n}\n\nfunction addMappingValue (state: ConstructorState, frame: MappingFrame, key: unknown, value: unknown, tag: AnyTag) {\n state.position = frame.keyPosition\n\n // `<<` is intercepted before dedup, so a repeated merge key is allowed.\n if (frame.keyIsMerge) {\n mergeSource(state, frame, value, tag)\n return\n }\n\n if (!state.json && frame.tag.has(frame.value, key) && !frame.overridable?.has(key)) {\n throwError(state, 'duplicated mapping key')\n }\n\n const err = frame.tag.addPair(frame.value, key, value)\n if (err) throwError(state, err)\n frame.overridable?.delete(key)\n}\n\nfunction addValue (state: ConstructorState, value: unknown, tag: AnyTag) {\n const frame = state.frames[state.frames.length - 1]!\n\n if (frame.kind === 'document') {\n frame.value = value\n frame.hasValue = true\n } else if (frame.kind === 'sequence') {\n // Any element may later be folded in by a `<<` merge, which by then has no\n // way to tell what built it.\n if (isMappingTag(tag)) state.nodeTags.set(value, tag)\n const err = frame.tag.addItem(frame.value, value, frame.index++)\n if (err) throwError(state, err)\n } else if (frame.hasKey) {\n const key = frame.key\n frame.key = undefined\n frame.hasKey = false\n addMappingValue(state, frame, key, value, tag)\n } else {\n frame.key = value\n frame.keyPosition = state.position\n frame.hasKey = true\n frame.keyIsMerge = tag.tagName === MERGE_TAG_NAME\n }\n}\n\nfunction storeAnchor (\n state: ConstructorState,\n event: ScalarEvent | SequenceEvent | MappingEvent,\n value: unknown,\n tag: AnyTag,\n isValueFinal: boolean\n): Anchor | null {\n if (event.anchorStart !== NO_RANGE) {\n const anchor = {\n value,\n tag,\n isValueFinal\n }\n state.anchors.set(state.source.slice(event.anchorStart, event.anchorEnd), anchor)\n return anchor\n }\n\n return null\n}\n\n/**\n * Constructs JavaScript documents directly from parser events, without an\n * intermediate AST.\n *\n * @category Events\n */\nfunction constructFromEvents (events: Event[], options: ConstructorOptions): unknown[] {\n const state: ConstructorState = {\n ...DEFAULT_CONSTRUCTOR_OPTIONS,\n ...options,\n events,\n documents: [],\n eventIndex: 0,\n position: 0,\n frames: [],\n anchors: new Map(),\n nodeTags: new Map(),\n tagHandlers: Object.create(null),\n totalMergeKeys: 0,\n aliasCount: 0\n }\n\n while (state.eventIndex < state.events.length) {\n const event = state.events[state.eventIndex++]\n state.position = eventPosition(event)\n\n switch (event.type) {\n case EVENT_ID.DOCUMENT:\n state.anchors = new Map()\n state.nodeTags = new Map()\n state.aliasCount = 0\n state.tagHandlers = Object.create(null)\n for (const directive of event.directives) {\n if (directive.kind === 'tag') state.tagHandlers[directive.handle] = directive.prefix\n }\n state.frames.push({ kind: 'document', position: state.position, value: undefined, hasValue: false })\n break\n\n case EVENT_ID.SCALAR: {\n const { value, tag } = constructScalar(state, event)\n storeAnchor(state, event, value, tag, true)\n addValue(state, value, tag)\n break\n }\n\n case EVENT_ID.SEQUENCE: {\n const tagName = collectionTagName(state, event, 'tag:yaml.org,2002:seq')\n const tag = state.schema.lookupSequenceTag(tagName)\n if (!tag) throwError(state, `unknown sequence tag !<${tagName}>`)\n\n const value = tag.create(tagName)\n const anchor = storeAnchor(state, event, value, tag, tag.carrierIsResult)\n\n state.frames.push({\n kind: 'sequence', position: state.position, value, tag, anchor, index: 0\n })\n break\n }\n\n case EVENT_ID.MAPPING: {\n const tagName = collectionTagName(state, event, 'tag:yaml.org,2002:map')\n const tag = state.schema.lookupMappingTag(tagName)\n if (!tag) throwError(state, `unknown mapping tag !<${tagName}>`)\n\n const value = tag.create(tagName)\n const anchor = storeAnchor(state, event, value, tag, tag.carrierIsResult)\n state.frames.push({\n kind: 'mapping',\n position: state.position,\n value,\n tag,\n anchor,\n key: undefined,\n keyPosition: state.position,\n hasKey: false,\n keyIsMerge: false,\n overridable: null\n })\n break\n }\n\n case EVENT_ID.ALIAS: {\n if (state.maxAliases !== -1 && ++state.aliasCount > state.maxAliases) {\n throwError(state, `aliases exceeded maxAliases (${state.maxAliases})`)\n }\n\n const name = state.source.slice(event.anchorStart, event.anchorEnd)\n const anchor = state.anchors.get(name)\n if (!anchor) {\n throwError(state, `unidentified alias \"${name}\"`)\n }\n if (!anchor.isValueFinal) {\n throwError(state, `recursive alias \"${name}\" is not supported for tag ${anchor.tag.tagName} because it uses finalize()`)\n }\n addValue(state, anchor.value, anchor.tag)\n break\n }\n\n case EVENT_ID.POP: {\n const frame = state.frames.pop()!\n\n if (frame.kind === 'mapping' && frame.hasKey) {\n state.position = frame.keyPosition\n throwError(state, 'incomplete mapping pair in event stream')\n }\n\n if (frame.kind === 'document') {\n state.documents.push(frame.value)\n } else {\n const value = frame.tag.carrierIsResult\n ? frame.value\n : finalizeCollection(state, frame.position, frame.tag, frame.value)\n if (frame.anchor) {\n frame.anchor.value = value\n frame.anchor.isValueFinal = true\n }\n addValue(state, value, frame.tag)\n }\n break\n }\n }\n }\n\n return state.documents\n}\n\nexport {\n constructFromEvents,\n DEFAULT_CONSTRUCTOR_OPTIONS,\n type ConstructorOptions\n}\n","import {\n EVENT_ID,\n SCALAR_STYLE,\n COLLECTION_STYLE,\n CHOMPING_MODE,\n type Event,\n type ScalarStyle,\n type CollectionStyle,\n type ChompingMode,\n type DocumentDirective,\n type TagHandlers\n} from './events.ts'\nimport { YAMLException } from '../common/exception.ts'\n\nconst NO_RANGE = -1\nconst HAS_OWN = Object.prototype.hasOwnProperty\n\nconst CONTEXT_FLOW_IN = 1\nconst CONTEXT_FLOW_OUT = 2\nconst CONTEXT_BLOCK_IN = 3\nconst CONTEXT_BLOCK_OUT = 4\n\n// eslint-disable-next-line no-control-regex\nconst PATTERN_NON_PRINTABLE = /[\\x00-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7F-\\x84\\x86-\\x9F\\uFFFE\\uFFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]/\n// eslint-disable-next-line no-useless-escape\nconst PATTERN_FLOW_INDICATORS = /[,\\[\\]{}]/\n// YAML 1.2.2, [91] c-tag-handle.\n// eslint-disable-next-line no-useless-escape\nconst PATTERN_TAG_HANDLE = /^(?:!|!!|![0-9A-Za-z-]+!)$/\n// YAML 1.2.2, [39] ns-uri-char.\n// eslint-disable-next-line no-useless-escape\nconst NS_URI_CHAR = String.raw`(?:%[0-9A-Fa-f]{2}|[0-9A-Za-z\\-#;/?:@&=+$,_.!~*'()\\[\\]])`\n// YAML 1.2.2, [40] ns-tag-char = ns-uri-char - \"!\" - c-flow-indicator.\n// eslint-disable-next-line no-useless-escape\nconst NS_TAG_CHAR = String.raw`(?:%[0-9A-Fa-f]{2}|[0-9A-Za-z\\-#;/?:@&=+$.~*'()_])`\nconst PATTERN_TAG_URI = new RegExp(`^(?:${NS_URI_CHAR})*$`)\n// YAML 1.2.2, [99] c-ns-shorthand-tag suffix part.\nconst PATTERN_TAG_SUFFIX = new RegExp(`^(?:${NS_TAG_CHAR})+$`)\n// YAML 1.2.2, [93] ns-tag-prefix.\nconst PATTERN_TAG_PREFIX = new RegExp(`^(?:!(?:${NS_URI_CHAR})*|${NS_TAG_CHAR}(?:${NS_URI_CHAR})*)$`)\n\ntype NodeContext =\n typeof CONTEXT_FLOW_IN | typeof CONTEXT_FLOW_OUT |\n typeof CONTEXT_BLOCK_IN | typeof CONTEXT_BLOCK_OUT\n\ninterface NodeProperties {\n anchorStart: number\n anchorEnd: number\n tagStart: number\n tagEnd: number\n}\n\ninterface ParserSnapshot {\n position: number\n line: number\n lineStart: number\n lineIndent: number\n firstTabInLine: number\n eventsLength: number\n}\n\n/** @category Events */\ninterface ParserOptions {\n /**\n * File path used in error messages.\n *\n * @defaultValue `null`\n */\n filename?: string\n\n /**\n * Maximum nesting depth for collections. Aliases are not taken into account.\n *\n * @defaultValue `100`\n */\n maxDepth?: number\n}\n\nconst DEFAULT_PARSER_OPTIONS: Required = {\n filename: '',\n maxDepth: 100\n}\n\ninterface ParserState extends Required {\n input: string\n length: number\n position: number\n line: number\n lineStart: number\n lineIndent: number\n firstTabInLine: number\n depth: number\n directives: DocumentDirective[]\n tagHandlers: TagHandlers\n events: Event[]\n}\n\nfunction addDocumentEvent (\n state: ParserState,\n explicitStart: boolean,\n explicitEnd: boolean\n) {\n state.events.push({\n type: EVENT_ID.DOCUMENT,\n explicitStart,\n explicitEnd,\n directives: state.directives\n })\n}\n\nfunction addSequenceEvent (\n state: ParserState,\n start: number,\n anchorStart: number,\n anchorEnd: number,\n tagStart: number,\n tagEnd: number,\n style: CollectionStyle\n) {\n state.events.push({\n type: EVENT_ID.SEQUENCE,\n start,\n anchorStart,\n anchorEnd,\n tagStart,\n tagEnd,\n style\n })\n}\n\nfunction addMappingEvent (\n state: ParserState,\n start: number,\n anchorStart: number,\n anchorEnd: number,\n tagStart: number,\n tagEnd: number,\n style: CollectionStyle\n) {\n state.events.push({\n type: EVENT_ID.MAPPING,\n start,\n anchorStart,\n anchorEnd,\n tagStart,\n tagEnd,\n style\n })\n}\n\nfunction insertFlowPairMappingEvent (state: ParserState, snapshot: ParserSnapshot) {\n state.events.splice(snapshot.eventsLength, 0, {\n type: EVENT_ID.MAPPING,\n start: snapshot.position,\n anchorStart: NO_RANGE,\n anchorEnd: NO_RANGE,\n tagStart: NO_RANGE,\n tagEnd: NO_RANGE,\n style: COLLECTION_STYLE.FLOW\n })\n}\n\nfunction addScalarEvent (\n state: ParserState,\n valueStart: number,\n valueEnd: number,\n anchorStart: number,\n anchorEnd: number,\n tagStart: number,\n tagEnd: number,\n style: ScalarStyle,\n chomping: ChompingMode = CHOMPING_MODE.CLIP,\n indent = -1,\n fast = false\n) {\n state.events.push({\n type: EVENT_ID.SCALAR,\n valueStart,\n valueEnd,\n anchorStart,\n anchorEnd,\n tagStart,\n tagEnd,\n style,\n chomping,\n indent,\n fast\n })\n}\n\nfunction addAliasEvent (\n state: ParserState,\n anchorStart: number,\n anchorEnd: number\n) {\n state.events.push({\n type: EVENT_ID.ALIAS,\n anchorStart,\n anchorEnd\n })\n}\n\nfunction addPopEvent (state: ParserState) {\n state.events.push({ type: EVENT_ID.POP })\n}\n\nfunction addEmptyScalarEvent (state: ParserState) {\n addScalarEvent(\n state,\n NO_RANGE,\n NO_RANGE,\n NO_RANGE,\n NO_RANGE,\n NO_RANGE,\n NO_RANGE,\n SCALAR_STYLE.PLAIN\n )\n}\n\nfunction emptyProperties (): NodeProperties {\n return {\n anchorStart: NO_RANGE,\n anchorEnd: NO_RANGE,\n tagStart: NO_RANGE,\n tagEnd: NO_RANGE\n }\n}\n\nfunction snapshotState (state: ParserState): ParserSnapshot {\n return {\n position: state.position,\n line: state.line,\n lineStart: state.lineStart,\n lineIndent: state.lineIndent,\n firstTabInLine: state.firstTabInLine,\n eventsLength: state.events.length\n }\n}\n\nfunction restoreState (state: ParserState, snapshot: ParserSnapshot) {\n state.position = snapshot.position\n state.line = snapshot.line\n state.lineStart = snapshot.lineStart\n state.lineIndent = snapshot.lineIndent\n state.firstTabInLine = snapshot.firstTabInLine\n state.events.length = snapshot.eventsLength\n}\n\nfunction throwError (state: ParserState, message: string): never {\n YAMLException.throwAt(state.input.slice(0, state.length), state.position, message, state.filename)\n}\n\nfunction isEol (c: number) {\n return c === 0x0A/* LF */ || c === 0x0D/* CR */\n}\n\nfunction isWhiteSpace (c: number) {\n return c === 0x09/* Tab */ || c === 0x20/* Space */\n}\n\nfunction isWsOrEol (c: number) {\n return isWhiteSpace(c) || isEol(c)\n}\n\nfunction isWsOrEolOrEnd (c: number) {\n return c === 0 || isWsOrEol(c)\n}\n\nfunction isFlowIndicator (c: number) {\n return c === 0x2C/* , */ ||\n c === 0x5B/* [ */ ||\n c === 0x5D/* ] */ ||\n c === 0x7B/* { */ ||\n c === 0x7D/* } */\n}\n\nfunction fromDecimalCode (c: number) {\n return c >= 0x30/* 0 */ && c <= 0x39/* 9 */ ? c - 0x30 : -1\n}\n\nfunction fromHexCode (c: number) {\n if (c >= 0x30/* 0 */ && c <= 0x39/* 9 */) return c - 0x30\n const lc = c | 0x20\n if (lc >= 0x61/* a */ && lc <= 0x66/* f */) return lc - 0x61 + 10\n return -1\n}\n\nfunction escapedHexLen (c: number) {\n if (c === 0x78/* x */) return 2\n if (c === 0x75/* u */) return 4\n if (c === 0x55/* U */) return 8\n return 0\n}\n\nfunction isSimpleEscape (c: number) {\n return c === 0x30/* 0 */ ||\n c === 0x61/* a */ ||\n c === 0x62/* b */ ||\n c === 0x74/* t */ ||\n c === 0x09/* Tab */ ||\n c === 0x6E/* n */ ||\n c === 0x76/* v */ ||\n c === 0x66/* f */ ||\n c === 0x72/* r */ ||\n c === 0x65/* e */ ||\n c === 0x20/* Space */ ||\n c === 0x22/* \" */ ||\n c === 0x2F/* / */ ||\n c === 0x5C/* \\ */ ||\n c === 0x4E/* N */ ||\n c === 0x5F/* _ */ ||\n c === 0x4C/* L */ ||\n c === 0x50/* P */\n}\n\n// Precondition: state.position points at LF or CR.\nfunction consumeLineBreak (state: ParserState) {\n const ch = state.input.charCodeAt(state.position)\n\n if (ch === 0x0A/* LF */) {\n state.position++\n } else {\n state.position++\n if (state.input.charCodeAt(state.position) === 0x0A/* LF */) state.position++\n }\n\n state.line++\n state.lineStart = state.position\n state.lineIndent = 0\n state.firstTabInLine = -1\n}\n\nfunction skipSeparationSpace (state: ParserState, allowComments: boolean) {\n let lineBreaks = 0\n let ch = state.input.charCodeAt(state.position)\n let hasSeparation = state.position === state.lineStart ||\n isWsOrEol(state.input.charCodeAt(state.position - 1))\n\n while (ch !== 0) {\n while (isWhiteSpace(ch)) {\n hasSeparation = true\n if (ch === 0x09/* Tab */ && state.firstTabInLine === -1) {\n state.firstTabInLine = state.position\n }\n ch = state.input.charCodeAt(++state.position)\n }\n\n if (allowComments && hasSeparation && ch === 0x23/* # */) {\n do { ch = state.input.charCodeAt(++state.position) }\n while (!isEol(ch) && ch !== 0)\n }\n\n if (!isEol(ch)) break\n\n consumeLineBreak(state)\n lineBreaks++\n hasSeparation = true\n ch = state.input.charCodeAt(state.position)\n\n while (ch === 0x20/* Space */) {\n state.lineIndent++\n ch = state.input.charCodeAt(++state.position)\n }\n }\n\n return lineBreaks\n}\n\nfunction testDocumentSeparator (state: ParserState, position = state.position) {\n const ch = state.input.charCodeAt(position)\n\n if ((ch === 0x2D/* - */ || ch === 0x2E/* . */) &&\n ch === state.input.charCodeAt(position + 1) &&\n ch === state.input.charCodeAt(position + 2)) {\n const following = state.input.charCodeAt(position + 3)\n return following === 0 || isWsOrEol(following)\n }\n\n return false\n}\n\nfunction skipByteOrderMark (state: ParserState) {\n if (state.position === state.lineStart &&\n state.input.charCodeAt(state.position) === 0xFEFF) {\n state.position++\n state.lineStart = state.position\n }\n}\n\nfunction testDocumentBoundary (state: ParserState) {\n if (state.position !== state.lineStart) return false\n\n // Fast path: most document boundaries do not have a BOM.\n if (testDocumentSeparator(state)) return true\n if (state.input.charCodeAt(state.position) !== 0xFEFF) return false\n\n // BOM-prefixed boundaries are rare, so snapshot/restore overhead is negligible.\n const snapshot = snapshotState(state)\n\n skipByteOrderMark(state)\n skipSeparationSpace(state, true)\n\n const ch = state.input.charCodeAt(state.position)\n const result = state.position === state.lineStart &&\n (ch === 0x25/* % */ || (ch === 0x2D/* - */ && testDocumentSeparator(state)))\n\n restoreState(state, snapshot)\n return result\n}\n\nfunction skipUntilLineEnd (state: ParserState) {\n let ch = state.input.charCodeAt(state.position)\n\n while (ch !== 0 && !isEol(ch)) {\n ch = state.input.charCodeAt(++state.position)\n }\n}\n\nfunction checkPrintable (state: ParserState, start: number, end: number) {\n if (PATTERN_NON_PRINTABLE.test(state.input.slice(start, end))) {\n throwError(state, 'the stream contains non-printable characters')\n }\n}\n\nfunction readTagProperty (state: ParserState, props: NodeProperties, inFlow: boolean) {\n if (state.input.charCodeAt(state.position) !== 0x21/* ! */) return false\n if (props.tagStart !== NO_RANGE) throwError(state, 'duplication of a tag property')\n\n const start = state.position\n let isVerbatim = false\n let isNamed = false\n let tagHandle = '!'\n let ch = state.input.charCodeAt(++state.position)\n\n if (ch === 0x3C/* < */) {\n isVerbatim = true\n ch = state.input.charCodeAt(++state.position)\n } else if (ch === 0x21/* ! */) {\n isNamed = true\n tagHandle = '!!'\n ch = state.input.charCodeAt(++state.position)\n }\n\n let suffixStart = state.position\n let tagName\n\n if (isVerbatim) {\n while (ch !== 0 && ch !== 0x3E/* > */) ch = state.input.charCodeAt(++state.position)\n if (ch !== 0x3E/* > */) throwError(state, 'unexpected end of the stream within a verbatim tag')\n tagName = state.input.slice(suffixStart, state.position)\n state.position++\n } else {\n while (ch !== 0 && !isWsOrEol(ch) && !(inFlow && isFlowIndicator(ch))) {\n if (ch === 0x21/* ! */) {\n if (!isNamed) {\n tagHandle = state.input.slice(suffixStart - 1, state.position + 1)\n if (!PATTERN_TAG_HANDLE.test(tagHandle)) throwError(state, 'named tag handle cannot contain such characters')\n isNamed = true\n suffixStart = state.position + 1\n } else {\n throwError(state, 'tag suffix cannot contain exclamation marks')\n }\n }\n\n ch = state.input.charCodeAt(++state.position)\n }\n\n tagName = state.input.slice(suffixStart, state.position)\n if (PATTERN_FLOW_INDICATORS.test(tagName)) throwError(state, 'tag suffix cannot contain flow indicator characters')\n }\n\n if (tagName && !(isVerbatim ? PATTERN_TAG_URI.test(tagName) : PATTERN_TAG_SUFFIX.test(tagName))) {\n throwError(state, `tag name cannot contain such characters: ${tagName}`)\n }\n try {\n decodeURIComponent(tagName)\n } catch {\n throwError(state, `tag name is malformed: ${tagName}`)\n }\n\n if (!isVerbatim && tagHandle !== '!' && tagHandle !== '!!' && !HAS_OWN.call(state.tagHandlers, tagHandle)) {\n throwError(state, `undeclared tag handle \"${tagHandle}\"`)\n }\n\n props.tagStart = start\n props.tagEnd = state.position\n return true\n}\n\nfunction readAnchorProperty (state: ParserState, props: NodeProperties) {\n if (state.input.charCodeAt(state.position) !== 0x26/* & */) return false\n if (props.anchorStart !== NO_RANGE) throwError(state, 'duplication of an anchor property')\n\n state.position++\n const start = state.position\n\n while (state.input.charCodeAt(state.position) !== 0 && !isWsOrEol(state.input.charCodeAt(state.position)) && !isFlowIndicator(state.input.charCodeAt(state.position))) {\n state.position++\n }\n\n if (state.position === start) throwError(state, 'name of an anchor node must contain at least one character')\n\n props.anchorStart = start\n props.anchorEnd = state.position\n return true\n}\n\nfunction readAlias (state: ParserState, props: NodeProperties) {\n if (state.input.charCodeAt(state.position) !== 0x2A/* * */) return false\n if (props.anchorStart !== NO_RANGE || props.tagStart !== NO_RANGE) {\n throwError(state, 'alias node should not have any properties')\n }\n\n state.position++\n const start = state.position\n\n while (state.input.charCodeAt(state.position) !== 0 && !isWsOrEol(state.input.charCodeAt(state.position)) && !isFlowIndicator(state.input.charCodeAt(state.position))) {\n state.position++\n }\n\n if (state.position === start) throwError(state, 'name of an alias node must contain at least one character')\n\n addAliasEvent(state, start, state.position)\n return true\n}\n\nfunction readFlowScalarBreak (state: ParserState, nodeIndent: number) {\n skipSeparationSpace(state, false)\n\n if (state.lineIndent < nodeIndent) {\n throwError(state, 'deficient indentation')\n }\n}\n\nfunction readSingleQuotedScalar (state: ParserState, nodeIndent: number, props: NodeProperties) {\n if (state.input.charCodeAt(state.position) !== 0x27/* ' */) return false\n\n state.position++\n const start = state.position\n // A single-quoted scalar is sliceable verbatim when it has no '' escape pairs\n // and no folded line breaks (see getScalarValue fast path).\n let simple = true\n\n while (state.input.charCodeAt(state.position) !== 0) {\n const ch = state.input.charCodeAt(state.position)\n\n if (ch === 0x27/* ' */) {\n if (state.input.charCodeAt(state.position + 1) === 0x27/* ' */) {\n simple = false\n state.position += 2\n continue\n }\n\n const end = state.position\n state.position++\n addScalarEvent(state, start, end, props.anchorStart, props.anchorEnd, props.tagStart, props.tagEnd, SCALAR_STYLE.SINGLE_QUOTED, CHOMPING_MODE.CLIP, -1, simple)\n return true\n }\n\n if (isEol(ch)) {\n simple = false\n readFlowScalarBreak(state, nodeIndent)\n } else if (state.position === state.lineStart && testDocumentSeparator(state)) {\n throwError(state, 'unexpected end of the document within a single quoted scalar')\n } else if (ch !== 0x09/* Tab */ && ch < 0x20) {\n throwError(state, 'expected valid JSON character')\n } else {\n state.position++\n }\n }\n\n throwError(state, 'unexpected end of the stream within a single quoted scalar')\n}\n\nfunction readDoubleQuotedScalar (state: ParserState, nodeIndent: number, props: NodeProperties) {\n if (state.input.charCodeAt(state.position) !== 0x22/* \" */) return false\n\n state.position++\n const start = state.position\n // A double-quoted scalar is sliceable verbatim when it has no \\ escapes and\n // no folded line breaks (see getScalarValue fast path).\n let simple = true\n\n while (state.input.charCodeAt(state.position) !== 0) {\n const ch = state.input.charCodeAt(state.position)\n\n if (ch === 0x22/* \" */) {\n const end = state.position\n state.position++\n addScalarEvent(state, start, end, props.anchorStart, props.anchorEnd, props.tagStart, props.tagEnd, SCALAR_STYLE.DOUBLE_QUOTED, CHOMPING_MODE.CLIP, -1, simple)\n return true\n }\n\n if (ch === 0x5C/* \\ */) {\n simple = false\n const escaped = state.input.charCodeAt(++state.position)\n\n if (isEol(escaped)) {\n readFlowScalarBreak(state, nodeIndent)\n } else if (isSimpleEscape(escaped)) {\n state.position++\n } else {\n let hexLength = escapedHexLen(escaped)\n\n if (hexLength === 0) throwError(state, 'unknown escape sequence')\n\n while (hexLength-- > 0) {\n state.position++\n if (fromHexCode(state.input.charCodeAt(state.position)) < 0) {\n throwError(state, 'expected hexadecimal character')\n }\n }\n state.position++\n }\n } else if (isEol(ch)) {\n simple = false\n readFlowScalarBreak(state, nodeIndent)\n } else if (state.position === state.lineStart && testDocumentSeparator(state)) {\n throwError(state, 'unexpected end of the document within a double quoted scalar')\n } else if (ch !== 0x09/* Tab */ && ch < 0x20) {\n throwError(state, 'expected valid JSON character')\n } else {\n state.position++\n }\n }\n\n throwError(state, 'unexpected end of the stream within a double quoted scalar')\n}\n\nfunction readBlockScalar (state: ParserState, parentIndent: number, props: NodeProperties) {\n const ch = state.input.charCodeAt(state.position)\n let chomping: ChompingMode = CHOMPING_MODE.CLIP\n let indent = -1\n let detectedIndent = false\n\n if (ch !== 0x7C/* | */ && ch !== 0x3E/* > */) return false\n\n const style = ch === 0x7C/* | */ ? SCALAR_STYLE.LITERAL_BLOCK : SCALAR_STYLE.FOLDED_BLOCK\n state.position++\n\n while (state.input.charCodeAt(state.position) !== 0) {\n const current = state.input.charCodeAt(state.position)\n const digit = fromDecimalCode(current)\n\n if (current === 0x2B/* + */ || current === 0x2D/* - */) {\n if (chomping !== CHOMPING_MODE.CLIP) throwError(state, 'repeat of a chomping mode identifier')\n chomping = current === 0x2B/* + */ ? CHOMPING_MODE.KEEP : CHOMPING_MODE.STRIP\n state.position++\n } else if (digit >= 0) {\n if (digit === 0) {\n throwError(state, 'bad explicit indentation width of a block scalar; it cannot be less than one')\n }\n if (detectedIndent) throwError(state, 'repeat of an indentation width identifier')\n indent = parentIndent + digit - 1\n detectedIndent = true\n state.position++\n } else {\n break\n }\n }\n\n let hadWhitespace = false\n while (isWhiteSpace(state.input.charCodeAt(state.position))) {\n hadWhitespace = true\n state.position++\n }\n if (hadWhitespace && state.input.charCodeAt(state.position) === 0x23/* # */) skipUntilLineEnd(state)\n\n if (isEol(state.input.charCodeAt(state.position))) {\n consumeLineBreak(state)\n } else if (state.input.charCodeAt(state.position) !== 0) {\n throwError(state, 'a line break is expected')\n }\n\n let contentIndent = detectedIndent ? indent : -1\n let maxLeadingIndent = 0\n const valueStart = state.position\n let valueEnd = state.position\n\n while (state.input.charCodeAt(state.position) !== 0) {\n const linePosition = state.position\n let column = 0\n\n while (state.input.charCodeAt(linePosition + column) === 0x20/* Space */) column++\n\n const first = state.input.charCodeAt(linePosition + column)\n if (first === 0) {\n // End of input acts as a line terminator, but there is no line break to\n // include here. A final all-spaces line still counts: when the block has a\n // content indent, the spaces beyond it are real content; in a wholly blank\n // block (contentIndent < 0) the spaces form a blank line that chomping must\n // see, exactly as it would if the line ended with a break. Capture the line\n // in both cases; otherwise the block ends at the start of this empty line.\n if (contentIndent >= 0) {\n if (column > contentIndent) valueEnd = linePosition + column\n } else if (column > 0) {\n valueEnd = linePosition + column\n }\n break\n }\n if (testDocumentBoundary(state)) break\n\n if (!detectedIndent && contentIndent === -1 && isEol(first)) {\n maxLeadingIndent = Math.max(maxLeadingIndent, column)\n }\n\n if (!detectedIndent && contentIndent === -1 && !isEol(first)) {\n if (first === 0x09/* Tab */ && column < parentIndent) {\n state.position = linePosition + column\n throwError(state, 'tab characters must not be used in indentation')\n }\n if (column < maxLeadingIndent) {\n state.position = linePosition + column\n throwError(state, 'bad indentation of a mapping entry')\n }\n }\n\n if (contentIndent === -1 && first !== 0 && !isEol(first) && column < parentIndent) {\n state.lineIndent = column\n state.position = linePosition + column\n break\n }\n\n if (!detectedIndent && first !== 0 && !isEol(first) && contentIndent === -1) {\n contentIndent = column\n }\n\n const requiredIndent = contentIndent === -1 ? parentIndent + 1 : contentIndent\n if (first !== 0 && !isEol(first) && column < requiredIndent) {\n state.lineIndent = column\n state.position = linePosition + column\n break\n }\n\n skipUntilLineEnd(state)\n valueEnd = state.position\n if (isEol(state.input.charCodeAt(state.position))) {\n consumeLineBreak(state)\n // Include the line break in the range so trailing blank lines are\n // preserved. This is what lets cook tell apart an empty `|+` (range \"\",\n // value \"\") from a `|+` with one blank line (range \"\\n\", value \"\\n\").\n // De-indent and chomping are applied later in getScalarValue.\n valueEnd = state.position\n }\n }\n\n checkPrintable(state, valueStart, valueEnd)\n addScalarEvent(\n state,\n valueStart,\n valueEnd,\n props.anchorStart,\n props.anchorEnd,\n props.tagStart,\n props.tagEnd,\n style,\n chomping,\n contentIndent\n )\n return true\n}\n\nfunction canStartPlainScalar (state: ParserState, nodeContext: NodeContext) {\n const ch = state.input.charCodeAt(state.position)\n const inFlow = nodeContext === CONTEXT_FLOW_IN\n\n if (ch === 0 ||\n isWsOrEol(ch) ||\n ch === 0x23/* # */ ||\n ch === 0x26/* & */ ||\n ch === 0x2A/* * */ ||\n ch === 0x21/* ! */ ||\n ch === 0x7C/* | */ ||\n ch === 0x3E/* > */ ||\n ch === 0x27/* ' */ ||\n ch === 0x22/* \" */ ||\n ch === 0x25/* % */ ||\n ch === 0x40/* @ */ ||\n ch === 0x60/* ` */ ||\n (inFlow && isFlowIndicator(ch))) {\n return false\n }\n\n if (ch === 0x3F/* ? */ || ch === 0x2D/* - */) {\n const following = state.input.charCodeAt(state.position + 1)\n if (isWsOrEolOrEnd(following) || (inFlow && isFlowIndicator(following))) return false\n }\n\n return true\n}\n\nfunction readPlainScalar (state: ParserState, nodeIndent: number, nodeContext: NodeContext, props: NodeProperties) {\n if (!canStartPlainScalar(state, nodeContext)) return false\n\n const start = state.position\n let end = state.position\n let ch = state.input.charCodeAt(state.position)\n const inFlow = nodeContext === CONTEXT_FLOW_IN\n // A single-line plain scalar is sliceable verbatim: the parser already trims\n // trailing whitespace from the range, so no folding is needed (see\n // getScalarValue fast path). Folded line breaks make it non-simple.\n let multiline = false\n\n while (ch !== 0) {\n if (testDocumentBoundary(state)) break\n\n if (ch === 0x3A/* : */) {\n const following = state.input.charCodeAt(state.position + 1)\n if (isWsOrEolOrEnd(following) || (inFlow && isFlowIndicator(following))) break\n } else if (ch === 0x23/* # */) {\n const preceding = state.input.charCodeAt(state.position - 1)\n if (isWsOrEol(preceding)) break\n } else if (inFlow && isFlowIndicator(ch)) {\n break\n } else if (isEol(ch)) {\n const savedPosition = state.position\n const savedLine = state.line\n const savedLineStart = state.lineStart\n const savedLineIndent = state.lineIndent\n\n skipSeparationSpace(state, false)\n\n if (state.lineIndent >= nodeIndent) {\n multiline = true\n ch = state.input.charCodeAt(state.position)\n continue\n }\n\n state.position = savedPosition\n state.line = savedLine\n state.lineStart = savedLineStart\n state.lineIndent = savedLineIndent\n break\n }\n\n if (!isWhiteSpace(ch)) end = state.position + 1\n ch = state.input.charCodeAt(++state.position)\n }\n\n if (end === start) return false\n\n checkPrintable(state, start, end)\n addScalarEvent(state, start, end, props.anchorStart, props.anchorEnd, props.tagStart, props.tagEnd, SCALAR_STYLE.PLAIN, CHOMPING_MODE.CLIP, -1, !multiline)\n return true\n}\n\nfunction findBlockMappingColon (state: ParserState) {\n let position = state.position\n let flowLevel = 0\n\n while (position < state.length) {\n const ch = state.input.charCodeAt(position)\n\n if (isEol(ch)) return -1\n if (ch === 0x23/* # */ && isWsOrEol(state.input.charCodeAt(position - 1))) return -1\n\n if ((ch === 0x2A/* * */ || ch === 0x26/* & */) && position === state.position) {\n do { position++ }\n while (state.input.charCodeAt(position) !== 0 &&\n !isWsOrEol(state.input.charCodeAt(position)) &&\n !isFlowIndicator(state.input.charCodeAt(position)))\n continue\n }\n\n if (ch === 0x5B/* [ */ || ch === 0x7B/* { */) {\n flowLevel++\n } else if (ch === 0x5D/* ] */ || ch === 0x7D/* } */) {\n if (flowLevel > 0) flowLevel--\n } else if (flowLevel === 0 && ch === 0x3A/* : */ && isWsOrEol(state.input.charCodeAt(position + 1))) {\n return position\n }\n\n if ((flowLevel > 0 || position === state.position) &&\n (ch === 0x27/* ' */ || ch === 0x22/* \" */)) {\n const quote = ch\n position++\n\n while (position < state.length && state.input.charCodeAt(position) !== quote) {\n if (state.input.charCodeAt(position) === 0x5C/* \\ */ && quote === 0x22/* \" */) position++\n position++\n }\n }\n\n position++\n }\n\n return -1\n}\n\nfunction skipFlowSeparationSpace (state: ParserState, nodeIndent: number) {\n const startLine = state.line\n skipSeparationSpace(state, true)\n\n if ((state.line > startLine && state.lineIndent < nodeIndent) ||\n (state.firstTabInLine !== -1 && state.lineIndent < nodeIndent)) {\n throwError(state, 'deficient indentation')\n }\n}\n\nfunction readFlowCollection (state: ParserState, nodeIndent: number, props: NodeProperties) {\n const ch = state.input.charCodeAt(state.position)\n const isMapping = ch === 0x7B/* { */\n const start = state.position\n let readNext = true\n\n if (ch !== 0x5B/* [ */ && ch !== 0x7B/* { */) return false\n\n const terminator = isMapping ? 0x7D/* } */ : 0x5D/* ] */\n\n if (isMapping) {\n addMappingEvent(state, start, props.anchorStart, props.anchorEnd, props.tagStart, props.tagEnd, COLLECTION_STYLE.FLOW)\n } else {\n addSequenceEvent(state, start, props.anchorStart, props.anchorEnd, props.tagStart, props.tagEnd, COLLECTION_STYLE.FLOW)\n }\n\n state.position++\n\n while (state.input.charCodeAt(state.position) !== 0) {\n skipFlowSeparationSpace(state, nodeIndent)\n\n let ch = state.input.charCodeAt(state.position)\n\n if (ch === terminator) {\n state.position++\n addPopEvent(state)\n return true\n } else if (!readNext) {\n throwError(state, 'missed comma between flow collection entries')\n } else if (ch === 0x2C/* , */) {\n throwError(state, \"expected the node content, but found ','\")\n }\n\n let isPair = false\n let isExplicitPair = false\n\n if (ch === 0x3F/* ? */ && isWsOrEol(state.input.charCodeAt(state.position + 1))) {\n isPair = isExplicitPair = true\n state.position += 1\n skipFlowSeparationSpace(state, nodeIndent)\n }\n\n const entryLine = state.line\n const entryStart = snapshotState(state)\n\n const keyWasRead = parseNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true)\n skipFlowSeparationSpace(state, nodeIndent)\n\n ch = state.input.charCodeAt(state.position)\n\n if ((isMapping || isExplicitPair || state.line === entryLine) && ch === 0x3A/* : */) {\n isPair = true\n state.position++\n skipFlowSeparationSpace(state, nodeIndent)\n if (!isMapping) {\n insertFlowPairMappingEvent(state, entryStart)\n if (!keyWasRead) addEmptyScalarEvent(state)\n } else if (!keyWasRead) {\n addEmptyScalarEvent(state)\n }\n if (!parseNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true)) {\n addEmptyScalarEvent(state)\n }\n skipFlowSeparationSpace(state, nodeIndent)\n if (!isMapping) addPopEvent(state)\n } else if (isMapping && isPair) {\n if (!keyWasRead) addEmptyScalarEvent(state)\n addEmptyScalarEvent(state)\n } else if (isMapping) {\n addEmptyScalarEvent(state)\n } else if (isPair) {\n insertFlowPairMappingEvent(state, entryStart)\n if (!keyWasRead) addEmptyScalarEvent(state)\n addEmptyScalarEvent(state)\n addPopEvent(state)\n }\n\n ch = state.input.charCodeAt(state.position)\n\n if (ch === 0x2C/* , */) {\n readNext = true\n state.position++\n } else {\n readNext = false\n }\n }\n\n throwError(state, 'unexpected end of the stream within a flow collection')\n}\n\nfunction readBlockSequence (state: ParserState, nodeIndent: number, props: NodeProperties) {\n if (state.firstTabInLine !== -1 || state.input.charCodeAt(state.position) !== 0x2D/* - */ || !isWsOrEolOrEnd(state.input.charCodeAt(state.position + 1))) {\n return false\n }\n\n addSequenceEvent(state, state.position, props.anchorStart, props.anchorEnd, props.tagStart, props.tagEnd, COLLECTION_STYLE.BLOCK)\n\n while (state.input.charCodeAt(state.position) === 0x2D/* - */ && isWsOrEolOrEnd(state.input.charCodeAt(state.position + 1))) {\n if (state.firstTabInLine !== -1) {\n state.position = state.firstTabInLine\n throwError(state, 'tab characters must not be used in indentation')\n }\n\n const entryLine = state.line\n state.position++\n\n const hadBreak = skipSeparationSpace(state, true) > 0\n if (state.firstTabInLine !== -1 &&\n state.input.charCodeAt(state.position) === 0x2D/* - */ &&\n isWsOrEolOrEnd(state.input.charCodeAt(state.position + 1))) {\n throwError(state, 'bad indentation of a sequence entry')\n }\n\n if (hadBreak && state.lineIndent <= nodeIndent) {\n addEmptyScalarEvent(state)\n } else {\n parseNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true)\n }\n\n skipSeparationSpace(state, true)\n\n if (state.lineIndent < nodeIndent || state.position >= state.length) break\n if (state.lineIndent > nodeIndent) throwError(state, 'bad indentation of a sequence entry')\n if (state.line === entryLine &&\n state.input.charCodeAt(state.position) === 0x2D/* - */ &&\n isWsOrEolOrEnd(state.input.charCodeAt(state.position + 1))) {\n throwError(state, 'bad indentation of a sequence entry')\n }\n }\n\n addPopEvent(state)\n return true\n}\n\nfunction readBlockMapping (state: ParserState, nodeIndent: number, flowIndent: number, props: NodeProperties) {\n let atExplicitKey = false\n let detected = false\n let mappingOpened = false\n let pendingExplicitKey = false\n\n if (state.firstTabInLine !== -1) return false\n\n let ch = state.input.charCodeAt(state.position)\n\n while (ch !== 0) {\n if (!atExplicitKey && state.firstTabInLine !== -1) {\n state.position = state.firstTabInLine\n throwError(state, 'tab characters must not be used in indentation')\n }\n\n const following = state.input.charCodeAt(state.position + 1)\n const entryLine = state.line\n\n if ((ch === 0x3F/* ? */ || ch === 0x3A/* : */) && isWsOrEolOrEnd(following)) {\n if (!mappingOpened) {\n addMappingEvent(state, state.position, props.anchorStart, props.anchorEnd, props.tagStart, props.tagEnd, COLLECTION_STYLE.BLOCK)\n mappingOpened = true\n }\n\n if (ch === 0x3F/* ? */) {\n if (atExplicitKey) addEmptyScalarEvent(state)\n detected = true\n atExplicitKey = true\n } else if (atExplicitKey) {\n atExplicitKey = false\n } else {\n addEmptyScalarEvent(state)\n detected = true\n atExplicitKey = false\n }\n\n state.position += 1\n pendingExplicitKey = true\n } else {\n // An explicit key awaiting its value, followed by an implicit key, means\n // the explicit key's value is empty. Emit it now (append-only) so it is\n // ordered before the implicit key node read just below.\n if (atExplicitKey) {\n addEmptyScalarEvent(state)\n atExplicitKey = false\n }\n\n const beforeKey = snapshotState(state)\n\n if (!parseNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) {\n break\n }\n\n if (state.line === entryLine) {\n ch = state.input.charCodeAt(state.position)\n\n while (isWhiteSpace(ch)) {\n ch = state.input.charCodeAt(++state.position)\n }\n\n if (ch === 0x3A/* : */) {\n ch = state.input.charCodeAt(++state.position)\n\n if (!isWsOrEolOrEnd(ch)) {\n throwError(state, 'a whitespace character is expected after the key-value separator within a block mapping')\n }\n\n if (!mappingOpened) {\n restoreState(state, beforeKey)\n addMappingEvent(state, beforeKey.position, props.anchorStart, props.anchorEnd, props.tagStart, props.tagEnd, COLLECTION_STYLE.BLOCK)\n mappingOpened = true\n // The key, the `:` and the space after it were already validated\n // above, before the rollback. Re-reading the same input cannot\n // fail, so just consume it again without error checks.\n parseNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)\n\n ch = state.input.charCodeAt(state.position)\n while (isWhiteSpace(ch)) {\n ch = state.input.charCodeAt(++state.position)\n }\n\n state.position++\n }\n\n detected = true\n atExplicitKey = false\n pendingExplicitKey = false\n } else if (detected) {\n throwError(state, \"expected ':' after a mapping key\")\n } else {\n // Not a mapping. If outer properties are pending, roll back so the\n // caller re-reads this node with them attached (events are append-only).\n if (props.anchorStart !== NO_RANGE || props.tagStart !== NO_RANGE) {\n restoreState(state, beforeKey)\n return false\n }\n return true\n }\n } else if (detected) {\n throwError(state, 'can not read a block mapping entry; a multiline key may not be an implicit key')\n } else {\n if (props.anchorStart !== NO_RANGE || props.tagStart !== NO_RANGE) {\n restoreState(state, beforeKey)\n return false\n }\n return true\n }\n }\n\n if (parseNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, pendingExplicitKey)) {\n pendingExplicitKey = false\n }\n\n if (!atExplicitKey) {\n if (pendingExplicitKey) {\n addEmptyScalarEvent(state)\n pendingExplicitKey = false\n }\n }\n\n skipSeparationSpace(state, true)\n ch = state.input.charCodeAt(state.position)\n\n if ((state.line === entryLine || state.lineIndent > nodeIndent) && ch !== 0) {\n throwError(state, 'bad indentation of a mapping entry')\n } else if (state.lineIndent < nodeIndent) {\n break\n }\n }\n\n if (!detected) return false\n if (atExplicitKey) addEmptyScalarEvent(state)\n if (mappingOpened) addPopEvent(state)\n return true\n}\n\nfunction parseNode (\n state: ParserState,\n parentIndent: number,\n nodeContext: NodeContext,\n allowToSeek: boolean,\n allowCompact: boolean,\n allowPropertyMapping = true\n): boolean {\n if (state.depth >= state.maxDepth) {\n throwError(state, `nesting exceeded maxDepth (${state.maxDepth})`)\n }\n\n state.depth++\n\n let indentStatus = 1\n let atNewLine = false\n let hasContent = false\n let propertyStart: ParserSnapshot | null = null\n const props = emptyProperties()\n\n let allowBlockScalars = nodeContext === CONTEXT_BLOCK_OUT || nodeContext === CONTEXT_BLOCK_IN\n let allowBlockCollections = allowBlockScalars\n const allowBlockStyles = allowBlockScalars\n\n if (allowToSeek && skipSeparationSpace(state, true)) {\n atNewLine = true\n\n if (state.lineIndent > parentIndent) {\n indentStatus = 1\n } else if (state.lineIndent === parentIndent) {\n indentStatus = 0\n } else {\n indentStatus = -1\n }\n }\n\n if (indentStatus === 1) {\n while (true) {\n const ch = state.input.charCodeAt(state.position)\n const propertyState = snapshotState(state)\n\n if (atNewLine &&\n indentStatus !== 1 &&\n (ch === 0x21/* ! */ || ch === 0x26/* & */)) {\n break\n }\n\n if (atNewLine &&\n allowBlockStyles &&\n (props.tagStart !== NO_RANGE || props.anchorStart !== NO_RANGE) &&\n (ch === 0x21/* ! */ || ch === 0x26/* & */)) {\n const fallbackState = snapshotState(state)\n const flowIndent = parentIndent + 1\n const mappingIndent = state.position - state.lineStart\n\n if (readBlockMapping(state, mappingIndent, flowIndent, props) &&\n state.events[fallbackState.eventsLength]?.type === EVENT_ID.MAPPING) {\n state.depth--\n return true\n }\n\n restoreState(state, fallbackState)\n }\n\n if (atNewLine &&\n ((ch === 0x21/* ! */ && props.tagStart !== NO_RANGE) ||\n (ch === 0x26/* & */ && props.anchorStart !== NO_RANGE))) {\n break\n }\n\n if (!readTagProperty(state, props, nodeContext === CONTEXT_FLOW_IN) && !readAnchorProperty(state, props)) {\n break\n }\n\n if (propertyStart === null) propertyStart = propertyState\n\n if (skipSeparationSpace(state, true)) {\n atNewLine = true\n allowBlockCollections = allowBlockStyles\n\n if (state.lineIndent > parentIndent) {\n indentStatus = 1\n } else if (state.lineIndent === parentIndent) {\n indentStatus = 0\n } else {\n indentStatus = -1\n }\n } else {\n allowBlockCollections = false\n }\n }\n }\n\n if (allowBlockCollections) {\n allowBlockCollections = atNewLine || allowCompact\n }\n\n if (indentStatus === 1 || nodeContext === CONTEXT_BLOCK_OUT) {\n const flowIndent = nodeContext === CONTEXT_FLOW_IN || nodeContext === CONTEXT_FLOW_OUT\n ? parentIndent\n : parentIndent + 1\n const blockIndent = state.position - state.lineStart\n\n if (indentStatus === 1) {\n if ((allowBlockCollections &&\n (readBlockSequence(state, blockIndent, props) ||\n readBlockMapping(state, blockIndent, flowIndent, props))) ||\n readFlowCollection(state, flowIndent, props)) {\n hasContent = true\n } else {\n const ch = state.input.charCodeAt(state.position)\n\n if (propertyStart !== null && allowPropertyMapping && allowBlockStyles && !allowBlockCollections &&\n ch !== 0x7C/* | */ && ch !== 0x3E/* > */) {\n const fallbackState = snapshotState(state)\n const propertyIndent = propertyStart.position - propertyStart.lineStart\n\n restoreState(state, propertyStart)\n\n if (readBlockMapping(state, propertyIndent, flowIndent, emptyProperties()) &&\n state.events[fallbackState.eventsLength]?.type === EVENT_ID.MAPPING) {\n hasContent = true\n } else {\n restoreState(state, fallbackState)\n }\n }\n\n if (!hasContent &&\n ((allowBlockScalars && readBlockScalar(state, flowIndent, props)) ||\n readSingleQuotedScalar(state, flowIndent, props) ||\n readDoubleQuotedScalar(state, flowIndent, props) ||\n readAlias(state, props) ||\n readPlainScalar(state, flowIndent, nodeContext, props))) {\n hasContent = true\n }\n }\n } else if (indentStatus === 0) {\n hasContent = allowBlockCollections && readBlockSequence(state, blockIndent, props)\n }\n }\n\n allowBlockScalars = allowBlockScalars && !hasContent\n\n if (!hasContent && (props.anchorStart !== NO_RANGE || props.tagStart !== NO_RANGE || allowBlockScalars)) {\n addScalarEvent(\n state,\n NO_RANGE,\n NO_RANGE,\n props.anchorStart,\n props.anchorEnd,\n props.tagStart,\n props.tagEnd,\n SCALAR_STYLE.PLAIN\n )\n hasContent = true\n }\n\n state.depth--\n return hasContent || props.anchorStart !== NO_RANGE || props.tagStart !== NO_RANGE\n}\n\nfunction readDirective (state: ParserState) {\n if (state.lineIndent > 0 || state.input.charCodeAt(state.position) !== 0x25/* % */) return false\n\n state.position++\n const nameStart = state.position\n\n while (state.input.charCodeAt(state.position) !== 0 && !isWsOrEol(state.input.charCodeAt(state.position))) state.position++\n\n const name = state.input.slice(nameStart, state.position)\n const args: string[] = []\n\n if (name.length === 0) throwError(state, 'directive name must not be less than one character in length')\n\n while (state.input.charCodeAt(state.position) !== 0 && !isEol(state.input.charCodeAt(state.position))) {\n while (isWhiteSpace(state.input.charCodeAt(state.position))) state.position++\n if (state.input.charCodeAt(state.position) === 0x23/* # */ || isEol(state.input.charCodeAt(state.position)) || state.input.charCodeAt(state.position) === 0) break\n\n const start = state.position\n while (state.input.charCodeAt(state.position) !== 0 && !isWsOrEol(state.input.charCodeAt(state.position))) state.position++\n args.push(state.input.slice(start, state.position))\n }\n\n if (isEol(state.input.charCodeAt(state.position))) consumeLineBreak(state)\n\n if (name === 'YAML') {\n if (state.directives.some(directive => directive.kind === 'yaml')) throwError(state, 'duplication of %YAML directive')\n if (args.length !== 1) throwError(state, 'YAML directive accepts exactly one argument')\n\n const match = /^([0-9]+)\\.([0-9]+)$/.exec(args[0])\n if (match === null) throwError(state, 'ill-formed argument of the YAML directive')\n if (parseInt(match[1], 10) !== 1) throwError(state, 'unacceptable YAML version of the document')\n\n state.directives.push({ kind: 'yaml', version: args[0] })\n } else if (name === 'TAG') {\n if (args.length !== 2) throwError(state, 'TAG directive accepts exactly two arguments')\n\n const [handle, prefix] = args\n if (!PATTERN_TAG_HANDLE.test(handle)) throwError(state, 'ill-formed tag handle (first argument) of the TAG directive')\n if (HAS_OWN.call(state.tagHandlers, handle)) throwError(state, `there is a previously declared suffix for \"${handle}\" tag handle`)\n if (!PATTERN_TAG_PREFIX.test(prefix)) throwError(state, 'ill-formed tag prefix (second argument) of the TAG directive')\n try {\n decodeURIComponent(prefix)\n } catch {\n throwError(state, `tag prefix is malformed: ${prefix}`)\n }\n\n state.tagHandlers[handle] = prefix\n state.directives.push({ kind: 'tag', handle, prefix })\n }\n\n return true\n}\n\nfunction readDocument (state: ParserState) {\n state.directives = []\n state.tagHandlers = Object.create(null)\n let hasDirectives = false\n\n skipSeparationSpace(state, true)\n\n while (readDirective(state)) {\n hasDirectives = true\n skipSeparationSpace(state, true)\n }\n\n let explicitStart = false\n let explicitEnd = false\n let allowCompact = true\n\n if (state.lineIndent === 0 &&\n state.input.charCodeAt(state.position) === 0x2D/* - */ &&\n state.input.charCodeAt(state.position + 1) === 0x2D/* - */ &&\n state.input.charCodeAt(state.position + 2) === 0x2D/* - */ &&\n isWsOrEolOrEnd(state.input.charCodeAt(state.position + 3))) {\n explicitStart = true\n const markerLine = state.line\n state.position += 3\n skipSeparationSpace(state, true)\n allowCompact = state.line > markerLine\n } else if (hasDirectives) {\n throwError(state, 'directives end mark is expected')\n }\n\n const documentEventIndex = state.events.length\n if (!explicitStart &&\n state.position === state.lineStart &&\n state.input.charCodeAt(state.position) === 0x2E/* . */ &&\n testDocumentSeparator(state)) {\n state.position += 3\n skipSeparationSpace(state, true)\n return\n }\n\n addDocumentEvent(state, explicitStart, false)\n if (!parseNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, allowCompact, allowCompact)) {\n addEmptyScalarEvent(state)\n }\n skipSeparationSpace(state, true)\n\n if (state.position === state.lineStart && testDocumentSeparator(state)) {\n explicitEnd = state.input.charCodeAt(state.position) === 0x2E/* . */\n if (explicitEnd) {\n const markerLine = state.line\n state.position += 3\n skipSeparationSpace(state, true)\n if (state.line === markerLine && state.position < state.length) {\n throwError(state, 'end of the stream or a document separator is expected')\n }\n }\n }\n\n const documentEvent = state.events[documentEventIndex]\n if (documentEvent?.type === EVENT_ID.DOCUMENT) documentEvent.explicitEnd = explicitEnd\n\n addPopEvent(state)\n\n if (!explicitEnd &&\n state.position < state.length &&\n !testDocumentBoundary(state)) {\n throwError(state, 'end of the stream or a document separator is expected')\n }\n}\n\n/**\n * Parses YAML into a flat event stream referencing source text by offsets.\n *\n * @category Events\n */\nfunction parseEvents (input: string, options: ParserOptions): Event[] {\n const length = input.length\n const state: ParserState = {\n ...DEFAULT_PARSER_OPTIONS,\n ...options,\n input: `${input}\\0`,\n length,\n position: 0,\n line: 0,\n lineStart: 0,\n lineIndent: 0,\n firstTabInLine: -1,\n depth: 0,\n directives: [],\n tagHandlers: Object.create(null),\n events: []\n }\n\n const nullpos = input.indexOf('\\0')\n if (nullpos !== -1) YAMLException.throwAt(input, nullpos, 'null byte is not allowed in input', state.filename)\n\n while (state.position < state.length) {\n skipByteOrderMark(state)\n skipSeparationSpace(state, true)\n if (state.position >= state.length) break\n const documentStart = state.position\n readDocument(state)\n if (state.position === documentStart) {\n // Internal progress guard: if readDocument() ever returns without\n // consuming input, stop here instead of looping forever.\n /* c8 ignore next */\n throwError(state, 'can not read a document')\n }\n }\n\n return state.events\n}\n\nexport {\n parseEvents,\n DEFAULT_PARSER_OPTIONS,\n type ParserOptions\n}\n","import { YAMLException } from './common/exception.ts'\nimport { pick } from './common/object.ts'\nimport {\n constructFromEvents,\n DEFAULT_CONSTRUCTOR_OPTIONS,\n type ConstructorOptions\n} from './parser/constructor.ts'\nimport {\n parseEvents,\n DEFAULT_PARSER_OPTIONS,\n type ParserOptions\n} from './parser/parser.ts'\n\n// `source` is supplied by `loadDocuments` itself, not by the public caller.\n/** @category Main */\ninterface LoadOptions extends ParserOptions, Omit {}\n\n/** @inline */\ntype LoadAllIterator = (document: unknown) => void\n\nconst DEFAULT_LOAD_OPTIONS: Required = {\n ...DEFAULT_PARSER_OPTIONS,\n ...DEFAULT_CONSTRUCTOR_OPTIONS\n}\n\nfunction loadDocuments (input: string, options: LoadOptions = {}) {\n const opts = { ...DEFAULT_LOAD_OPTIONS, ...options }\n const source = String(input)\n\n const PARSER_OPT_KEYS = Object.keys(DEFAULT_PARSER_OPTIONS) as\n (keyof typeof DEFAULT_PARSER_OPTIONS)[]\n const CONSTRUCTOR_OPT_KEYS = Object.keys(DEFAULT_CONSTRUCTOR_OPTIONS) as\n (keyof typeof DEFAULT_CONSTRUCTOR_OPTIONS)[]\n\n const events = parseEvents(source, pick(opts, PARSER_OPT_KEYS))\n return constructFromEvents(events, { ...pick(opts, CONSTRUCTOR_OPT_KEYS), source })\n}\n\n/**\n * Same as {@link load}, but understands multi-document sources.\n * Returns an array of documents.\n *\n * @category Main\n */\nfunction loadAll (input: string, options?: LoadOptions): unknown[]\n\n/**\n * @deprecated Iterator is not supported.\n */\nfunction loadAll (input: string, iterator: null, options?: LoadOptions): unknown[]\n\n/**\n * @deprecated Iterator is not supported.\n */\nfunction loadAll (input: string, iterator: LoadAllIterator, options?: LoadOptions): void\nfunction loadAll (\n input: string,\n iteratorOrOptions?: LoadAllIterator | LoadOptions | null,\n options?: LoadOptions\n) {\n let iterator: LoadAllIterator | null = null\n\n if (typeof iteratorOrOptions === 'function') {\n iterator = iteratorOrOptions\n } else if (iteratorOrOptions !== null && typeof iteratorOrOptions === 'object') {\n options = iteratorOrOptions\n }\n\n const documents = loadDocuments(input, options)\n\n if (iterator === null) return documents\n for (const document of documents) iterator(document)\n}\n\n/**\n * Parses `string` as a single YAML document. Throws {@link YAMLException} on\n * error. This function does not understand multi-document or empty sources; it\n * throws an exception on those.\n *\n * > [!NOTE]\n * > 1. When processing untrusted input, see the\n * > [security considerations](../docs/safety.md).\n * > 2. All exceptions MUST be caught, not just {@link YAMLException}.\n * > 3. The default {@link CORE_SCHEMA} comes without the `!!merge` tag. You can\n * > easily enable it if needed.\n * > 4. The default {@link mapTag} is `{}`-object based, with known limitations\n * > (see description). For full compatibility use {@link realMapTag}\n * > instead (it uses native JS `Map`).\n *\n * @example\n * Enable {@link mergeTag} and {@link realMapTag}:\n *\n * ```javascript\n * import { load, CORE_SCHEMA, mergeTag, realMapTag } from 'js-yaml'\n *\n * try {\n * load(data, { schema: CORE_SCHEMA.withTags(mergeTag, realMapTag) })\n * } catch (e) {\n * console.error(e)\n * }\n * ```\n *\n * @category Main\n */\nfunction load (input: string, options?: LoadOptions) {\n const documents = loadDocuments(input, options)\n\n if (documents.length === 0) throw new YAMLException('expected a document, but the input is empty')\n if (documents.length === 1) return documents[0]\n\n throw new YAMLException('expected a single document in the stream, but found more')\n}\n\nexport {\n load,\n loadAll,\n type LoadOptions\n}\n","// JS value graph → AST. Knows tags (`identify` / `represent`). A single\n// identity-`Map` walk handles dedup: a repeat occurrence of an object (including\n// a cycle) becomes an `alias`, and the first occurrence gets an `anchor`.\n\nimport { YAMLException } from '../common/exception.ts'\nimport { type Schema } from '../schema.ts'\nimport { type TagDefinition } from '../tag.ts'\nimport { tagNameShort } from '../common/tagname.ts'\nimport { COLLECTION_STYLE, SCALAR_STYLE } from '../parser/events.ts'\nimport {\n type Document,\n type Node,\n type ScalarNode,\n type SequenceNode,\n type MappingNode\n} from './nodes.ts'\n\n/** @category AST */\ninterface FromJsOptions {\n /** Inlines duplicate objects instead of converting them into references. */\n noRefs?: boolean\n\n /**\n * Skips unrepresentable values instead of throwing. Invalid mapping pairs\n * and sequence items are skipped; `undefined` sequence items become `null`.\n */\n skipInvalid?: boolean\n}\n\n// A match candidate. `implicitTag` means the tag is not printed (implicit\n// scalars and the default str/seq/map tags).\ninterface RepresentType {\n tag: TagDefinition\n implicitTag: boolean\n}\n\n// Returned by `build` when no tag matched.\nconst INVALID = Symbol('INVALID')\n\ninterface FromJsState {\n representTypes: RepresentType[]\n noRefs: boolean\n skipInvalid: boolean\n\n // Already-built collection values → their node, for anchor/alias dedup.\n refs: Map\n refCounter: number\n}\n\nfunction buildRepresentTypes (schema: Schema): RepresentType[] {\n const defaultTags = new Set([\n schema.defaultScalarTag,\n schema.defaultSequenceTag,\n schema.defaultMappingTag\n ].filter((t): t is TagDefinition => t !== undefined))\n\n // Default container/str tags go last so a more specific tag identifying the\n // same JS value (e.g. a custom tag on a plain object) wins.\n const implicitScalars = schema.implicitScalarTags\n const explicitTags = schema.tags.filter(t =>\n !(t.nodeKind === 'scalar' && t.implicit) && !defaultTags.has(t))\n const defaultTagsLast = schema.tags.filter(t => defaultTags.has(t))\n\n return [\n ...implicitScalars.map(tag => ({ tag, implicitTag: true })),\n ...explicitTags.map(tag => ({ tag, implicitTag: false })),\n ...defaultTagsLast.map(tag => ({ tag, implicitTag: true }))\n ]\n}\n\n// First tag whose `identify` accepts `object`.\nfunction matchTag (state: FromJsState, object: unknown): { tag: TagDefinition, tagName: string, implicitTag: boolean } | null {\n for (let index = 0, length = state.representTypes.length; index < length; index += 1) {\n const { tag, implicitTag } = state.representTypes[index]\n\n if (tag.identify(object)) {\n let tagName: string\n if (tag.matchByTagPrefix) {\n tagName = tag.representTagName(object)\n } else {\n tagName = tag.tagName\n }\n return { tag, tagName, implicitTag }\n }\n }\n\n return null\n}\n\n// Build a node for `object`, or INVALID when no tag matches. `undefined` never\n// throws (caller decides: null in a sequence, skip in a mapping, '' at root);\n// any other unrepresentable value throws unless `skipInvalid`.\nfunction build (state: FromJsState, object: unknown): Node | typeof INVALID {\n if (!state.noRefs && object !== null && typeof object === 'object') {\n const existing = state.refs.get(object)\n if (existing) {\n if (existing.anchor === undefined) existing.anchor = `ref_${state.refCounter++}`\n return { kind: 'alias', anchor: existing.anchor }\n }\n }\n\n const matched = matchTag(state, object)\n\n if (!matched) {\n if (object === undefined) return INVALID\n if (state.skipInvalid) return INVALID\n throw new YAMLException(`unacceptable kind of an object to dump ${Object.prototype.toString.call(object)}`)\n }\n\n const { tag, tagName, implicitTag } = matched\n const nodeTagName = implicitTag ? tagName : tagNameShort(tagName)\n\n if (tag.nodeKind === 'scalar') {\n const node: ScalarNode = {\n kind: 'scalar',\n tag: nodeTagName,\n tagged: !implicitTag,\n style: SCALAR_STYLE.PLAIN,\n value: tag.represent(object)\n }\n return node\n }\n\n if (tag.nodeKind === 'sequence') {\n const container = tag.represent(object)\n const node: SequenceNode = {\n kind: 'sequence',\n tag: nodeTagName,\n tagged: !implicitTag,\n style: COLLECTION_STYLE.BLOCK,\n items: []\n }\n if (!state.noRefs) state.refs.set(object, node)\n\n for (let index = 0, length = container.length; index < length; index += 1) {\n let item = build(state, container[index])\n // An invalid element becomes null; a still-invalid null then skips/throws.\n if (item === INVALID && container[index] === undefined) item = build(state, null)\n if (item === INVALID) continue\n node.items.push(item)\n }\n return node\n }\n\n // mapping — the canonical form is always a `Map`.\n const map = tag.represent(object)\n const node: MappingNode = {\n kind: 'mapping',\n tag: nodeTagName,\n tagged: !implicitTag,\n style: COLLECTION_STYLE.BLOCK,\n items: []\n }\n if (!state.noRefs) state.refs.set(object, node)\n\n for (const [objectKey, objectValue] of map) {\n const key = build(state, objectKey)\n if (key === INVALID) continue // invalid key skips the pair\n const value = build(state, objectValue)\n if (value === INVALID) continue // invalid value skips the pair\n node.items.push({ key, value })\n }\n return node\n}\n\n/**\n * Convert JS object to AST. A JS value is one YAML document. An unrepresentable\n * root becomes an empty document, which the presenter renders as an empty\n * string.\n *\n * @category AST\n */\nfunction jsToAst (input: unknown, schema: Schema, options: FromJsOptions = {}): Document[] {\n const state: FromJsState = {\n representTypes: buildRepresentTypes(schema),\n noRefs: options.noRefs ?? false,\n skipInvalid: options.skipInvalid ?? false,\n refs: new Map(),\n refCounter: 0\n }\n\n const root = build(state, input)\n return [{ contents: root === INVALID ? null : root, directives: [] }]\n}\n\nexport {\n jsToAst,\n type FromJsOptions\n}\n","// Depth-first AST traversal. Mirrors the `kind` walk of the presenter and the\n// `from_*` builders, but stays read-oriented: nodes are plain objects, so a\n// visitor mutates them in place. Control signals let it prune or stop the walk.\n\nimport {\n type Node,\n type Document\n} from './nodes.ts'\n\n// Returned by a visitor to control the walk; anything else (incl. `undefined`)\n// descends as usual.\n/**\n * Return from a visitor to stop the whole traversal.\n *\n * @category AST\n */\nconst VISIT_BREAK = Symbol('visit:break')\n\n/**\n * Return from a visitor to skip the current node's children.\n *\n * @category AST\n */\nconst VISIT_SKIP = Symbol('visit:skip')\n\n/** @inline */\ntype VisitControl = typeof VISIT_BREAK | typeof VISIT_SKIP | undefined | void\n\n/**\n * Traversal-derived position of the current node. Kept off the node itself: a\n * node may sit in several places (alias/dedup reuse), so depth/role belong to\n * the walk, not the node. {@link VisitContext.parent} `kind` +\n * {@link VisitContext.isKey} pin the exact slot.\n *\n * @category AST\n */\ninterface VisitContext {\n /** 0 = document content root */\n depth: number\n\n /** Enclosing sequence/mapping, null at the root */\n parent: Node | null\n\n /** Node sits in a mapping key position */\n isKey: boolean\n}\n\n/** @category AST */\ntype Visitor = (node: Node, ctx: VisitContext) => VisitControl\n\n// Returns `true` once `VISIT_BREAK` was seen, so callers can unwind the walk.\nfunction visitNode (node: Node, visitor: Visitor, ctx: VisitContext): boolean {\n const control = visitor(node, ctx)\n if (control === VISIT_BREAK) return true\n if (control === VISIT_SKIP) return false\n\n const depth = ctx.depth + 1\n\n switch (node.kind) {\n case 'sequence':\n for (const item of node.items) {\n if (visitNode(item, visitor, { depth, parent: node, isKey: false })) return true\n }\n break\n case 'mapping':\n for (const { key, value } of node.items) {\n if (visitNode(key, visitor, { depth, parent: node, isKey: true })) return true\n if (visitNode(value, visitor, { depth, parent: node, isKey: false })) return true\n }\n break\n }\n\n return false\n}\n\n/**\n * Walk every node in the documents, calling {@link Visitor} once per\n * node (pre-order).\n *\n * @category AST\n */\nfunction visit (documents: Document[], visitor: Visitor): void {\n for (const doc of documents) {\n if (doc.contents && visitNode(doc.contents, visitor, { depth: 0, parent: null, isKey: false })) return\n }\n}\n\nexport {\n visit,\n VISIT_BREAK,\n VISIT_SKIP,\n type Visitor,\n type VisitContext\n}\n","import { SCALAR_STYLE, type ScalarStyle } from '../parser/events.ts'\nimport { type ScalarLayout } from './scalar_styler.ts'\n\nfunction hasBit (mask: number, bit: number): boolean { return (mask & (1 << bit)) !== 0 }\n\n// This should eventually be a presenter option, but collection styling,\n// especially key layout, must be designed first to decide whether scalar and\n// collection width limits should share an option or be configured separately.\nconst MIN_SCALAR_CONTENT_WIDTH = 40\n\n/**\n * Default scalar styling rules in application order.\n * See [Scalar styling](../../docs/scalar_styling.md) for usage details.\n *\n * @category AST\n */\nconst DEFAULT_SCALAR_STYLE_RULES = {\n applyQuoteFlowKeysOption,\n doubleQuoteForInvisibles,\n doubleQuoteWhitespaceOnly,\n applyForceQuotesOption,\n tryLongOrMultilineAsBlock,\n quoteInvalidPlain,\n fallbackToDoubleQuoted\n} as const\n\nfunction _preferredQuotedStyle (layout: ScalarLayout): ScalarStyle {\n if (layout.presenterOptions.quoteStyle === 'single' &&\n hasBit(layout.allowedStylesMask, SCALAR_STYLE.SINGLE_QUOTED)) {\n return SCALAR_STYLE.SINGLE_QUOTED\n }\n\n return SCALAR_STYLE.DOUBLE_QUOTED\n}\n\nfunction applyQuoteFlowKeysOption (layout: ScalarLayout): void {\n if (!layout.presenterOptions.quoteFlowKeys) return\n\n // quoteFlowKeys applies only to plain scalar keys in flow mappings.\n if (!layout.isKey || !layout.flowOnly || layout.style !== SCALAR_STYLE.PLAIN) return\n\n layout.style = SCALAR_STYLE.DOUBLE_QUOTED\n}\n\nfunction doubleQuoteForInvisibles (layout: ScalarLayout): void {\n if (layout.style === SCALAR_STYLE.PLAIN &&\n /[\\t\\x7F-\\xA0\\u2028\\u2029\\uFEFF\\uFFFE\\uFFFF]/.test(layout.node.value)) {\n layout.style = SCALAR_STYLE.DOUBLE_QUOTED\n }\n}\n\nfunction doubleQuoteWhitespaceOnly (layout: ScalarLayout): void {\n // Block styles normally make multiline structure easier to see, but\n // whitespace-only content turns that structure into visually empty lines,\n // so force double quotes for this special case.\n if (layout.style === SCALAR_STYLE.PLAIN && /^\\s+$/.test(layout.node.value)) {\n layout.style = SCALAR_STYLE.DOUBLE_QUOTED\n }\n}\n\nfunction applyForceQuotesOption (layout: ScalarLayout): void {\n if (!layout.presenterOptions.forceQuotes) return\n\n // forceQuotes applies only to plain values, not to mapping keys.\n if (layout.isKey || layout.style !== SCALAR_STYLE.PLAIN) return\n\n layout.style = layout.node.value.includes('\\n')\n ? SCALAR_STYLE.DOUBLE_QUOTED\n : _preferredQuotedStyle(layout)\n}\n\nfunction tryLongOrMultilineAsBlock (layout: ScalarLayout): void {\n if (layout.style !== SCALAR_STYLE.PLAIN || layout.isKey) return\n\n const value = layout.node.value\n const multiline = value.indexOf('\\n') !== -1\n\n // Literal and folded block style bits are always set together, so checking\n // either one is sufficient.\n if (!hasBit(layout.allowedStylesMask, SCALAR_STYLE.LITERAL_BLOCK)) {\n if (multiline) layout.style = SCALAR_STYLE.DOUBLE_QUOTED\n return\n }\n\n const w = layout.presenterOptions.lineWidth\n\n if (w === -1) {\n if (multiline) layout.style = SCALAR_STYLE.LITERAL_BLOCK\n return\n }\n\n const availableWidth = Math.max(\n Math.min(w, MIN_SCALAR_CONTENT_WIDTH),\n w - layout.shiftOfContent\n )\n\n let position = 0\n let shouldFold = false\n\n // Check whether at least one line exceeds the width budget\n // and can be split at a space.\n while (position <= value.length) {\n let lineEnd = value.length\n\n const nextLineBreak = value.indexOf('\\n', position)\n\n if (nextLineBreak !== -1) lineEnd = nextLineBreak\n\n const line = value.slice(position, lineEnd)\n\n if (line.length > availableWidth &&\n line[0] !== ' ' &&\n / [^ \\t]/.test(line)) {\n shouldFold = true\n }\n\n if (nextLineBreak === -1) break\n position = nextLineBreak + 1\n }\n\n if (shouldFold) {\n layout.style = SCALAR_STYLE.FOLDED_BLOCK\n } else if (multiline) {\n layout.style = SCALAR_STYLE.LITERAL_BLOCK\n }\n}\n\nfunction quoteInvalidPlain (layout: ScalarLayout): void {\n if (layout.style === SCALAR_STYLE.PLAIN &&\n !hasBit(layout.allowedStylesMask, SCALAR_STYLE.PLAIN)) {\n layout.style = _preferredQuotedStyle(layout)\n }\n}\n\nfunction fallbackToDoubleQuoted (layout: ScalarLayout): void {\n if (!hasBit(layout.allowedStylesMask, layout.style)) {\n layout.style = SCALAR_STYLE.DOUBLE_QUOTED\n }\n}\n\nexport { MIN_SCALAR_CONTENT_WIDTH, DEFAULT_SCALAR_STYLE_RULES }\n","import { SCALAR_STYLE, type ScalarStyle } from '../parser/events.ts'\nimport { type Node, type ScalarNode } from './nodes.ts'\nimport { type PresenterOptions } from './presenter.ts'\nimport { MIN_SCALAR_CONTENT_WIDTH } from './styler_defaults.ts'\n\n/** Scalar presentation state passed to styling rules. @category AST */\ninterface ScalarLayout {\n readonly node: Readonly\n readonly parent: Readonly | null\n readonly level: number\n readonly isKey: boolean\n readonly flowOnly: boolean\n readonly shiftOfParent: number\n readonly shiftOfContent: number\n readonly shiftOfFirstLine: number\n readonly presenterOptions: Readonly>\n /**\n * Bit mask of allowed styles; each bit corresponds to a {@link SCALAR_STYLE}\n * value.\n */\n allowedStylesMask: number\n /**\n * Selected output style, which styling rules may modify. To avoid overriding\n * earlier decisions, a rule should normally modify it only while it is\n * {@link SCALAR_STYLE.PLAIN}.\n */\n style: ScalarStyle\n}\n\n/** Function signature for scalar styling rules. @category AST */\ntype ScalarStyleRule = (layout: ScalarLayout) => void\n\nfunction setBit (mask: number, bit: number): number { return mask | (1 << bit) }\n\n// YAML 1.2.2 character productions.\n// https://yaml.org/spec/1.2.2/#51-character-set\nconst SRC_C_PRINTABLE = '[\\\\x09\\\\x0A\\\\x0D\\\\x20-\\\\x7E\\\\x85\\\\xA0-\\\\uD7FF\\\\uE000-\\\\uFFFD\\\\u{10000}-\\\\u{10FFFF}]'\nconst SRC_B_CHAR = '[\\\\n\\\\r]'\nconst SRC_C_BYTE_ORDER_MARK = '\\\\uFEFF'\nconst SRC_S_WHITE = '[ \\\\t]'\nconst SRC_NB_CHAR = `(?:(?!(?:${SRC_B_CHAR}|${SRC_C_BYTE_ORDER_MARK}))${SRC_C_PRINTABLE})`\nconst SRC_NS_CHAR = `(?:(?!${SRC_S_WHITE})${SRC_NB_CHAR})`\n\n// YAML 1.2.2 [2] nb-json.\nconst SRC_NB_JSON = '[\\\\x09\\\\x20-\\\\uD7FF\\\\uE000-\\\\uFFFF\\\\u{10000}-\\\\u{10FFFF}]'\n\n// YAML 1.2.2 indicator productions.\n// https://yaml.org/spec/1.2.2/#54-indicator-characters\nconst SRC_C_INDICATOR = '[-?:,\\\\[\\\\]{}#&*!|>\\'\"%@`]'\nconst SRC_C_FLOW_INDICATOR = '[,\\\\[\\\\]{}]'\n\n// YAML 1.2.2 [127]-[129] ns-plain-safe(c).\n// https://yaml.org/spec/1.2.2/#733-plain-style\nconst SRC_NS_PLAIN_SAFE_FLOW_OUT = SRC_NS_CHAR\nconst SRC_NS_PLAIN_SAFE_FLOW_IN = `(?:(?!${SRC_C_FLOW_INDICATOR})${SRC_NS_CHAR})`\n\n// YAML 1.2.2 [126] ns-plain-first(c).\nconst SRC_NS_PLAIN_FIRST_FLOW_OUT =\n `(?:(?:(?!${SRC_C_INDICATOR})${SRC_NS_CHAR})|[?:-](?=${SRC_NS_PLAIN_SAFE_FLOW_OUT}))`\nconst SRC_NS_PLAIN_FIRST_FLOW_IN =\n `(?:(?:(?!${SRC_C_INDICATOR})${SRC_NS_CHAR})|[?:-](?=${SRC_NS_PLAIN_SAFE_FLOW_IN}))`\n\n// YAML 1.2.2 [130] ns-plain-char(c).\n// The production itself requires lookbehind, so these regexps require ES2018 lookbehind support.\n// const SRC_NS_PLAIN_CHAR_FLOW_OUT =\n// `(?:(?:(?![:#])${SRC_NS_PLAIN_SAFE_FLOW_OUT})|(?<=${SRC_NS_CHAR})#|:(?=${SRC_NS_PLAIN_SAFE_FLOW_OUT}))`\n// const SRC_NS_PLAIN_CHAR_FLOW_IN =\n// `(?:(?:(?![:#])${SRC_NS_PLAIN_SAFE_FLOW_IN})|(?<=${SRC_NS_CHAR})#|:(?=${SRC_NS_PLAIN_SAFE_FLOW_IN}))`\n\n// ES2015-compatible alternative without lookbehind: consume each run of hashes\n// together with the preceding non-hash ns-plain-char.\nconst SRC_NS_PLAIN_CHAR_FLOW_OUT =\n `(?:(?:(?![:#])${SRC_NS_PLAIN_SAFE_FLOW_OUT})|:(?=${SRC_NS_PLAIN_SAFE_FLOW_OUT}))#*`\nconst SRC_NS_PLAIN_CHAR_FLOW_IN =\n `(?:(?:(?![:#])${SRC_NS_PLAIN_SAFE_FLOW_IN})|:(?=${SRC_NS_PLAIN_SAFE_FLOW_IN}))#*`\n\n// YAML 1.2.2 [132] nb-ns-plain-in-line(c).\nconst SRC_NB_NS_PLAIN_IN_LINE_FLOW_OUT = `(?:${SRC_S_WHITE}*${SRC_NS_PLAIN_CHAR_FLOW_OUT})*`\nconst SRC_NB_NS_PLAIN_IN_LINE_FLOW_IN = `(?:${SRC_S_WHITE}*${SRC_NS_PLAIN_CHAR_FLOW_IN})*`\n\n// YAML 1.2.2 [133] ns-plain-one-line(c).\nconst SRC_NS_PLAIN_ONE_LINE_FLOW_OUT =\n `${SRC_NS_PLAIN_FIRST_FLOW_OUT}#*${SRC_NB_NS_PLAIN_IN_LINE_FLOW_OUT}`\nconst SRC_NS_PLAIN_ONE_LINE_FLOW_IN =\n `${SRC_NS_PLAIN_FIRST_FLOW_IN}#*${SRC_NB_NS_PLAIN_IN_LINE_FLOW_IN}`\nconst SRC_NS_PLAIN_ONE_LINE_BLOCK_KEY = SRC_NS_PLAIN_ONE_LINE_FLOW_OUT\nconst SRC_NS_PLAIN_ONE_LINE_FLOW_KEY = SRC_NS_PLAIN_ONE_LINE_FLOW_IN\n\n// YAML 1.2.2 [134] s-ns-plain-next-line(n,c).\n// ScalarNode.value contains the folded value, not the source text: one source\n// line break became a space, while k > 1 breaks became k - 1 LF characters.\n// The space case is already accepted by [132]; each remaining run of LFs\n// therefore represents a transition to the next non-empty content line in [134].\nconst SRC_S_NS_PLAIN_NEXT_LINE_FLOW_OUT =\n `\\\\n+${SRC_NS_PLAIN_CHAR_FLOW_OUT}${SRC_NB_NS_PLAIN_IN_LINE_FLOW_OUT}`\nconst SRC_S_NS_PLAIN_NEXT_LINE_FLOW_IN =\n `\\\\n+${SRC_NS_PLAIN_CHAR_FLOW_IN}${SRC_NB_NS_PLAIN_IN_LINE_FLOW_IN}`\n\n// YAML 1.2.2 [135] ns-plain-multi-line(n,c).\nconst SRC_NS_PLAIN_MULTI_LINE_FLOW_OUT =\n `${SRC_NS_PLAIN_ONE_LINE_FLOW_OUT}(?:${SRC_S_NS_PLAIN_NEXT_LINE_FLOW_OUT})*`\nconst SRC_NS_PLAIN_MULTI_LINE_FLOW_IN =\n `${SRC_NS_PLAIN_ONE_LINE_FLOW_IN}(?:${SRC_S_NS_PLAIN_NEXT_LINE_FLOW_IN})*`\n\n// YAML 1.2.2 [131] ns-plain(n,c).\nconst NS_PLAIN_FLOW_OUT = new RegExp(`^(?:${SRC_NS_PLAIN_MULTI_LINE_FLOW_OUT})$`, 'u')\nconst NS_PLAIN_FLOW_IN = new RegExp(`^(?:${SRC_NS_PLAIN_MULTI_LINE_FLOW_IN})$`, 'u')\nconst NS_PLAIN_BLOCK_KEY = new RegExp(`^(?:${SRC_NS_PLAIN_ONE_LINE_BLOCK_KEY})$`, 'u')\nconst NS_PLAIN_FLOW_KEY = new RegExp(`^(?:${SRC_NS_PLAIN_ONE_LINE_FLOW_KEY})$`, 'u')\n\n// YAML 1.2.2 [118]-[125], projected to ScalarNode.value: doubled quotes\n// are already decoded, and flow folding represents content line feeds as LF.\nconst NB_SINGLE_ONE_LINE = new RegExp(`^(?:${SRC_NB_JSON})*$`, 'u')\nconst NB_SINGLE_MULTI_LINE = new RegExp(`^(?:${SRC_NB_JSON}|\\\\n)*$`, 'u')\n\n// YAML 1.2.2 [170]-[182], projected to ScalarNode.value: source line breaks\n// are normalized to LF; every other content character must be nb-char.\nconst BLOCK_SCALAR_CONTENT = new RegExp(`^(?:${SRC_NB_CHAR}|\\\\n)*$`, 'u')\n\n// YAML 1.2.2 [206] c-forbidden.\n// https://yaml.org/spec/1.2.2/#912-document-markers\nconst C_FORBIDDEN_FIRST_LINE = /^(?:---|\\.\\.\\.)(?=$|[ \\t\\n\\r])/\nconst C_FORBIDDEN_CONTENT = /^(?:---|\\.\\.\\.)(?=$|[ \\t\\n\\r])/m\n\nfunction canUsePlain (layout: ScalarLayout): boolean {\n const str = layout.node.value\n\n // Allow null to be rendered as an empty scalar; its tag is checked below.\n if (str !== '') {\n const nsPlain = layout.isKey\n ? (layout.flowOnly ? NS_PLAIN_FLOW_KEY : NS_PLAIN_BLOCK_KEY)\n : (layout.flowOnly ? NS_PLAIN_FLOW_IN : NS_PLAIN_FLOW_OUT)\n\n if (!nsPlain.test(str)) return false\n if (layout.shiftOfFirstLine === 0 && C_FORBIDDEN_FIRST_LINE.test(str)) return false\n\n if (layout.shiftOfContent === 0) {\n const firstLineBreak = str.indexOf('\\n')\n\n if (firstLineBreak !== -1) {\n const content = str.slice(firstLineBreak + 1)\n\n if (C_FORBIDDEN_CONTENT.test(content)) return false\n }\n }\n }\n\n // Outside the plain-syntax BNF: preserve the node tag under implicit resolution.\n const resolvedTag = layout.presenterOptions.schema.resolveImplicitScalarTag(str).tag.tagName\n\n if (!layout.node.tagged && resolvedTag !== layout.node.tag) return false\n\n // Outside YAML 1.2.2: preserve YAML 1.1 !!value semantics.\n // https://yaml.org/type/value.html\n if (!layout.node.tagged && str === '=' &&\n resolvedTag === layout.presenterOptions.schema.defaultScalarTag.tagName) return false\n\n return true\n}\n\nfunction canUseSingleQuoted (layout: ScalarLayout): boolean {\n const str = layout.node.value\n const nbSingleText = layout.isKey ? NB_SINGLE_ONE_LINE : NB_SINGLE_MULTI_LINE\n\n if (!nbSingleText.test(str)) return false\n\n // [123]-[125] exclude trailing and leading s-white around a folded break;\n // single-quoted style has no escape that could preserve it.\n if (/[ \\t]\\n|\\n[ \\t]/.test(str)) return false\n\n // A decoded LF is rendered through flow folding. At zero continuation\n // indentation, c-forbidden would terminate the quoted scalar.\n if (!layout.isKey && layout.shiftOfContent === 0) {\n const firstLineBreak = str.indexOf('\\n')\n\n if (firstLineBreak !== -1 &&\n C_FORBIDDEN_CONTENT.test(str.slice(firstLineBreak + 1))) return false\n }\n\n return true\n}\n\nfunction canUseBlock (layout: ScalarLayout): boolean {\n if (layout.flowOnly || !BLOCK_SCALAR_CONTENT.test(layout.node.value)) return false\n\n const contentIndent = layout.shiftOfContent - layout.shiftOfParent\n\n if (contentIndent < 1) return false\n\n // A leading space requires [163] c-indentation-indicator. Its value is 1-9.\n if (contentIndent > 9 && /^\\n* /.test(layout.node.value)) return false\n\n // Block content starts on its own line, so every zero-indented content line\n // is subject to [206] c-forbidden.\n if (layout.shiftOfContent === 0 && C_FORBIDDEN_CONTENT.test(layout.node.value)) return false\n\n return true\n}\n\nfunction detectAllowedStyles (layout: ScalarLayout): void {\n // [107] Double-quoted style can express arbitrary strings through escape sequences.\n let mask = setBit(0, SCALAR_STYLE.DOUBLE_QUOTED)\n\n if (canUsePlain(layout)) mask = setBit(mask, SCALAR_STYLE.PLAIN)\n if (canUseSingleQuoted(layout)) mask = setBit(mask, SCALAR_STYLE.SINGLE_QUOTED)\n\n if (canUseBlock(layout)) {\n mask = setBit(setBit(mask, SCALAR_STYLE.LITERAL_BLOCK), SCALAR_STYLE.FOLDED_BLOCK)\n }\n\n layout.allowedStylesMask = mask\n}\n\nfunction renderScalar (layout: ScalarLayout): string {\n switch (layout.style) {\n case SCALAR_STYLE.PLAIN:\n return renderPlain(layout)\n case SCALAR_STYLE.SINGLE_QUOTED:\n return renderSingleQuoted(layout)\n case SCALAR_STYLE.LITERAL_BLOCK:\n return renderLiteralBlock(layout)\n case SCALAR_STYLE.FOLDED_BLOCK:\n return renderFoldedBlock(layout)\n case SCALAR_STYLE.DOUBLE_QUOTED:\n return renderDoubleQuoted(layout)\n }\n}\n\nfunction renderPlain (layout: ScalarLayout): string {\n return encodeFlowBreaks(layout.node.value, layout.shiftOfContent)\n}\n\nfunction renderSingleQuoted (layout: ScalarLayout): string {\n const value = encodeFlowBreaks(layout.node.value, layout.shiftOfContent)\n return `'${value.replace(/'/g, \"''\")}'`\n}\n\nfunction renderLiteralBlock (layout: ScalarLayout): string {\n const value = layout.node.value\n\n return '|' + blockHeader(value, layout.shiftOfParent, layout.shiftOfContent) +\n dropEndingNewline(indentString(value, layout.shiftOfContent))\n}\n\nfunction renderFoldedBlock (layout: ScalarLayout): string {\n const value = layout.node.value\n const w = layout.presenterOptions.lineWidth\n let availableWidth = Infinity\n\n if (w !== -1) {\n availableWidth = Math.max(\n Math.min(w, MIN_SCALAR_CONTENT_WIDTH),\n w - layout.shiftOfContent\n )\n }\n\n return '>' + blockHeader(value, layout.shiftOfParent, layout.shiftOfContent) +\n dropEndingNewline(indentString(\n foldBlockScalar(value, availableWidth),\n layout.shiftOfContent\n ))\n}\n\nfunction renderDoubleQuoted (layout: ScalarLayout): string {\n return `\"${escapeString(layout.node.value)}\"`\n}\n\n// Flow scalars fold line breaks: a run of k source line breaks reparses to k-1\n// literal LF characters. Encode each run of p literal LF characters as p+1\n// breaks and indent the following content line.\nfunction encodeFlowBreaks (string: string, shiftOfContent: number): string {\n let nextLF = string.indexOf('\\n')\n if (nextLF === -1) return string\n\n const pad = ' '.repeat(shiftOfContent)\n let result = string.slice(0, nextLF)\n\n const lineRe = /(\\n+)([^\\n]*)/g\n lineRe.lastIndex = nextLF\n let match\n\n while ((match = lineRe.exec(string))) {\n const breaks = match[1].length\n const line = match[2]\n result += '\\n'.repeat(breaks + 1) + pad + line\n }\n\n return result\n}\n\n// Indents every line in a string. Empty lines (\\n only) are not indented.\nfunction indentString (string: string, spaces: number): string {\n const indent = ' '.repeat(spaces)\n let position = 0\n let result = ''\n const length = string.length\n\n while (position < length) {\n let line\n const next = string.indexOf('\\n', position)\n\n if (next === -1) {\n line = string.slice(position)\n position = length\n } else {\n line = string.slice(position, next + 1)\n position = next + 1\n }\n\n if (line.length && line !== '\\n') result += indent\n\n result += line\n }\n\n return result\n}\n\nfunction needIndentIndicator (string: string): boolean {\n return /^\\n* /.test(string)\n}\n\nfunction blockHeader (string: string, shiftOfParent: number, shiftOfContent: number): string {\n const indentIndicator = needIndentIndicator(string)\n ? String(shiftOfContent - shiftOfParent)\n : ''\n\n // The string '\\n' counts as a trailing empty line.\n const clip = string[string.length - 1] === '\\n'\n const keep = clip && (string[string.length - 2] === '\\n' || string === '\\n')\n const chomp = keep ? '+' : (clip ? '' : '-')\n\n return `${indentIndicator}${chomp}\\n`\n}\n\n// The presenter adds its own trailing newline.\nfunction dropEndingNewline (string: string): string {\n return string[string.length - 1] === '\\n' ? string.slice(0, -1) : string\n}\n\nfunction isMoreIndented (char: string): boolean {\n return char === ' ' || char === '\\t'\n}\n\nfunction foldLine (line: string, width: number): string {\n if (line === '' || isMoreIndented(line[0])) return line\n\n const breakRe = / [^ \\t]/g\n let match\n let start = 0\n let end\n let curr = 0\n let next = 0\n let result = ''\n\n while ((match = breakRe.exec(line))) {\n next = match.index\n\n if (next - start > width) {\n end = (curr > start) ? curr : next\n result += `\\n${line.slice(start, end)}`\n start = end + 1\n }\n\n curr = next\n }\n\n result += '\\n'\n\n if (line.length - start > width && curr > start) {\n result += `${line.slice(start, curr)}\\n${line.slice(curr + 1)}`\n } else {\n result += line.slice(start)\n }\n\n return result.slice(1)\n}\n\nfunction foldBlockScalar (string: string, width: number): string {\n const lineRe = /(\\n+)([^\\n]*)/g\n\n let nextLF = string.indexOf('\\n')\n if (nextLF === -1) nextLF = string.length\n lineRe.lastIndex = nextLF\n\n let result = foldLine(string.slice(0, nextLF), width)\n let prevMoreIndented = string[0] === '\\n' || isMoreIndented(string[0])\n let moreIndented\n let match\n\n while ((match = lineRe.exec(string))) {\n const prefix = match[1]\n const line = match[2]\n\n moreIndented = line !== '' && isMoreIndented(line[0])\n result += prefix +\n ((!prevMoreIndented && !moreIndented && line !== '') ? '\\n' : '') +\n foldLine(line, width)\n prevMoreIndented = moreIndented\n }\n\n return result\n}\n\n// Characters escaped in Double-Quoted Style:\n//\n// - the inverse of YAML 1.2.2 [1] c-printable;\n// - TAB, LF and CR, which c-printable includes;\n// - NEL, NBSP, LS, PS and BOM, which are escaped to make invisible content\n// visible;\n// - double quote and backslash, which must be escaped because they have\n// syntactic meaning.\n//\n// In Unicode mode, the surrogate range matches unpaired surrogates but does not\n// match either code unit of a valid surrogate pair.\n// https://yaml.org/spec/1.2.2/#rule-c-printable\nconst CHARACTERS_TO_ESCAPE =\n /[\"\\\\\\x00-\\x1F\\x7F-\\xA0\\u2028\\u2029\\uD800-\\uDFFF\\uFEFF\\uFFFE\\uFFFF]/gu\n\nfunction escapeCharacter (character: string): string {\n switch (character) {\n case '\\x00': return '\\\\0'\n case '\\x07': return '\\\\a'\n case '\\x08': return '\\\\b'\n case '\\x09': return '\\\\t'\n case '\\x0A': return '\\\\n'\n case '\\x0B': return '\\\\v'\n case '\\x0C': return '\\\\f'\n case '\\x0D': return '\\\\r'\n case '\\x1B': return '\\\\e'\n case '\"': return '\\\\\"'\n case '\\\\': return '\\\\\\\\'\n case '\\x85': return '\\\\N'\n case '\\xA0': return '\\\\_'\n case '\\u2028': return '\\\\L'\n case '\\u2029': return '\\\\P'\n }\n\n const code = character.charCodeAt(0)\n const hex = code.toString(16).toUpperCase()\n\n if (code <= 0xFF) return `\\\\x${'0'.repeat(2 - hex.length)}${hex}`\n\n return `\\\\u${'0'.repeat(4 - hex.length)}${hex}`\n}\n\nfunction escapeString (string: string): string {\n return string.replace(CHARACTERS_TO_ESCAPE, escapeCharacter)\n}\n\nexport {\n detectAllowedStyles,\n renderScalar,\n type ScalarLayout,\n type ScalarStyleRule\n}\n","// AST → text. Walks the node `kind`; the scalar machinery (style selection,\n// quoting, folding) is driven by node text, not by sniffing a JS value.\n\nimport { YAMLException } from '../common/exception.ts'\nimport { tagNameShort } from '../common/tagname.ts'\nimport { COLLECTION_STYLE, SCALAR_STYLE } from '../parser/events.ts'\nimport { type Schema } from '../schema.ts'\nimport {\n type Node,\n type Document,\n type ScalarNode,\n type SequenceNode,\n type MappingNode\n} from './nodes.ts'\nimport {\n detectAllowedStyles,\n renderScalar,\n type ScalarLayout,\n type ScalarStyleRule\n} from './scalar_styler.ts'\nimport { DEFAULT_SCALAR_STYLE_RULES } from './styler_defaults.ts'\n\nconst CHAR_LINE_FEED = 0x0A /* LF */\n\n/** @category AST */\ninterface PresenterOptions {\n /** Schema used when selecting a safe scalar style. */\n schema: Schema\n\n /**\n * Indentation width in spaces.\n *\n * @defaultValue `2`\n */\n indent?: number\n\n /**\n * Does not add an indentation level to array elements when enabled.\n *\n * @defaultValue `false`\n */\n seqNoIndent?: boolean\n\n /**\n * Allows a nested collection to start on the same line after `-`.\n *\n * @defaultValue `true`\n */\n seqInlineFirst?: boolean\n\n /**\n * Preferred line width for folding. Unbreakable and more-indented lines may\n * exceed it. Set to `-1` for unlimited width.\n *\n * @defaultValue `80`\n */\n lineWidth?: number\n\n /**\n * Adds spaces inside flow collection brackets: `{a: 1}` becomes `{ a: 1 }`.\n *\n * @defaultValue `false`\n */\n flowBracketPadding?: boolean\n\n /**\n * Omits the space after commas in flow collections: `[1, 2]` becomes\n * `[1,2]`.\n *\n * @defaultValue `false`\n */\n flowSkipCommaSpace?: boolean\n\n /**\n * Omits the space after `:` in flow mappings: `{\"a\": 1}` becomes `{\"a\":1}`.\n *\n * This forces `quoteFlowKeys`; otherwise `a:1` would be parsed as a single\n * plain scalar instead of a mapping entry.\n *\n * @defaultValue `false`\n */\n flowSkipColonSpace?: boolean\n\n /**\n * Quotes flow mapping keys: `{a: 1}` becomes `{\"a\": 1}`.\n *\n * @defaultValue `false`\n */\n quoteFlowKeys?: boolean\n\n /**\n * Quoting style to use when a string needs quotes.\n *\n * @defaultValue `'single'`\n */\n quoteStyle?: 'single' | 'double'\n\n /**\n * Quotes all non-key strings using {@link quoteStyle}.\n *\n * @defaultValue `false`\n */\n forceQuotes?: boolean\n\n /**\n * Customizes how strings are rendered as plain, quoted, literal, or folded\n * scalars. Rules are applied in array order; providing this option replaces\n * the {@link DEFAULT_SCALAR_STYLE_RULES default rules}.\n *\n * @defaultValue `Object.values(DEFAULT_SCALAR_STYLE_RULES)`\n */\n scalarStyleRules?: readonly ScalarStyleRule[]\n\n /**\n * Prints an explicit tag before an anchor: `&ref_0 !!set` becomes\n * `!!set &ref_0`.\n *\n * @defaultValue `false`\n */\n tagBeforeAnchor?: boolean\n}\n\nconst DEFAULT_PRESENTER_OPTIONS: Required> = {\n indent: 2,\n seqNoIndent: false,\n seqInlineFirst: true,\n lineWidth: 80,\n flowBracketPadding: false,\n flowSkipCommaSpace: false,\n flowSkipColonSpace: false,\n quoteFlowKeys: false,\n quoteStyle: 'single',\n forceQuotes: false,\n scalarStyleRules: Object.keys(DEFAULT_SCALAR_STYLE_RULES)\n .map(name => Reflect.get(DEFAULT_SCALAR_STYLE_RULES, name)),\n tagBeforeAnchor: false\n}\n\ninterface PresenterState extends Required {\n defaultScalarTagName: string\n openEnded: boolean\n}\n\nfunction nodeTagShort (node: ScalarNode | SequenceNode | MappingNode) {\n return node.tagged ? node.tag : tagNameShort(node.tag)\n}\n\nfunction createPresenterState (options: PresenterOptions): PresenterState {\n const opts = {\n ...DEFAULT_PRESENTER_OPTIONS,\n ...options\n }\n\n if (opts.flowSkipColonSpace) {\n opts.quoteFlowKeys = true\n }\n\n return {\n ...opts,\n defaultScalarTagName: opts.schema.defaultScalarTag.tagName,\n openEnded: false\n }\n}\n\nfunction generateNextLine (state: PresenterState, level: number) {\n return `\\n${' '.repeat(state.indent * level)}`\n}\n\nfunction scalarLayout (state: PresenterState, node: ScalarNode, parent: Readonly | null, level: number,\n isKey: boolean, flowOnly: boolean): ScalarLayout {\n const shiftOfParent = level === 0 ? -1 : state.indent * (level - 1)\n const shiftOfContent = state.indent * Math.max(1, level)\n\n return {\n node,\n parent,\n level,\n isKey,\n flowOnly,\n shiftOfParent,\n shiftOfContent,\n shiftOfFirstLine: level === 0 ? 0 : state.indent * level,\n presenterOptions: state,\n allowedStylesMask: 0,\n style: node.style\n }\n}\n\nfunction writeFlowSequence (state: PresenterState, level: number, node: SequenceNode) {\n let result = ''\n\n for (let index = 0, length = node.items.length; index < length; index += 1) {\n const item = writeNode(state, level, node.items[index], node, {}).text\n if (index > 0) result += `,${!state.flowSkipCommaSpace ? ' ' : ''}`\n result += item\n }\n\n const pad = state.flowBracketPadding && node.items.length > 0 ? ' ' : ''\n return `[${pad}${result}${pad}]`\n}\n\nfunction writeBlockSequence (state: PresenterState, level: number, node: SequenceNode, compact: boolean) {\n let result = ''\n\n for (let index = 0, length = node.items.length; index < length; index += 1) {\n const item = writeNode(state, level + 1, node.items[index], node,\n { block: true, compact: state.seqInlineFirst, isblockseq: true }).text\n\n if (!compact || result !== '') {\n result += generateNextLine(state, level)\n }\n\n // No trailing space when the value renders empty (e.g. null → '').\n if (item === '' || CHAR_LINE_FEED === item.charCodeAt(0)) {\n result += '-'\n } else {\n result += '- '\n }\n\n result += item\n }\n\n return result\n}\n\nfunction writeFlowMapping (state: PresenterState, level: number, node: MappingNode) {\n let result = ''\n\n for (const { key, value } of node.items) {\n let pairBuffer = ''\n if (result !== '') pairBuffer += `,${!state.flowSkipCommaSpace ? ' ' : ''}`\n\n const keyRender = writeNode(state, level, key, node, { iskey: true })\n const keyText = keyRender.text\n\n const valueText = writeNode(state, level, value, node, {}).text\n // No separating space when the value renders empty (e.g. null → '').\n const sep = state.flowSkipColonSpace || valueText === '' ? '' : ' '\n\n // An alias or a property-only scalar must be separated from `:` because the\n // colon can otherwise be consumed as part of the alias/anchor/tag name.\n const keyIsBareProps = key.kind === 'scalar' && keyRender.noBody &&\n (key.tagged || key.anchor !== undefined)\n const keyColonSep = key.kind === 'alias' || keyIsBareProps ? ' ' : ''\n\n pairBuffer += `${keyText}${keyColonSep}:${sep}${valueText}`\n\n result += pairBuffer\n }\n\n const pad = state.flowBracketPadding && result !== '' ? ' ' : ''\n return `{${pad}${result}${pad}}`\n}\n\nfunction writeBlockMapping (state: PresenterState, level: number, node: MappingNode, compact: boolean) {\n let result = ''\n\n for (let index = 0, length = node.items.length; index < length; index += 1) {\n let pairBuffer = ''\n\n if (!compact || result !== '') {\n pairBuffer += generateNextLine(state, level)\n }\n\n const { key, value } = node.items[index]\n\n // A block key — a block collection (mapping/sequence) or a block scalar\n // (literal/folded) — can't sit on a `key:` line, so it's written with block\n // context and the pair takes the explicit `? key / : value` form. A simple\n // scalar key stays inline (flow-vs-block is invisible there).\n const keyIsBlock =\n ((key.kind === 'mapping' || key.kind === 'sequence') &&\n key.style === COLLECTION_STYLE.BLOCK && key.items.length !== 0) ||\n (key.kind === 'scalar' &&\n (key.style === SCALAR_STYLE.LITERAL_BLOCK || key.style === SCALAR_STYLE.FOLDED_BLOCK))\n\n // The `?`/`:` indicators shift content right like a `-`, so a block key or\n // value that stays on the indicator line keeps its indentation under\n // seqNoIndent (`isblockseq`). One that drops to its own line (tag/anchor)\n // collapses to the parent indent, so leave the flag off there.\n const keyRender = keyIsBlock\n ? writeNode(state, level + 1, key, node,\n { block: true, compact: true, isblockseq: !cannotBeCompact(state, key, level + 1) })\n : writeNode(state, level + 1, key, node, { block: true, compact: true, iskey: true })\n const keyText = keyRender.text\n\n // Block key, over-long key, or multiline scalar key forces explicit form.\n // Multiline isn't a spec requirement — just matches pyyaml's simple-key rule.\n const keyHasLineBreak = key.kind === 'scalar' && key.value.indexOf('\\n') !== -1\n\n // YAML limits an implicit key to 1024 Unicode code points. `length` counts\n // UTF-16 code units, never fewer than code points, so it is a cheap safe\n // precheck. The `u` regexp then counts each [\\s\\S] match as one code point.\n const keyIsTooLong = keyText.length > 1024 && /^[\\s\\S]{1025}/u.test(keyText)\n const explicitPair = keyIsBlock || keyHasLineBreak || keyIsTooLong\n\n if (explicitPair) {\n if (keyText && CHAR_LINE_FEED === keyText.charCodeAt(0)) {\n pairBuffer += '?'\n } else {\n pairBuffer += '? '\n }\n }\n\n pairBuffer += keyText\n\n if (explicitPair) {\n pairBuffer += generateNextLine(state, level)\n }\n\n const valueText = writeNode(state, level + 1, value, node,\n { block: true, compact: explicitPair, isblockseq: explicitPair && !cannotBeCompact(state, value, level + 1) }).text\n\n // Keep a space before the colon when the key text ends in a leading\n // property rather than scalar content, so the colon can't be read as part\n // of it. Two cases: an inline alias key (`*b : v`), and an empty scalar key\n // whose whole text is its anchor/tag (`&a :`, `!!str :`) — without the\n // space `&a:` reparses as an anchored value, dropping the null key.\n const keyIsBareProps = key.kind === 'scalar' && keyRender.noBody &&\n (key.tagged || key.anchor !== undefined)\n const keyColonSep = !explicitPair && (key.kind === 'alias' || keyIsBareProps) ? ' ' : ''\n\n // No trailing space when the value renders empty (e.g. null → '').\n if (valueText === '' || CHAR_LINE_FEED === valueText.charCodeAt(0)) {\n pairBuffer += `${keyColonSep}:`\n } else {\n pairBuffer += `${keyColonSep}: `\n }\n\n pairBuffer += valueText\n\n result += pairBuffer\n }\n\n return result\n}\n\n// Where a node sits relative to its parent — drives layout/style decisions.\n// All flags default to false (the flow-context, non-key, non-compact case).\ninterface NodeContext {\n block?: boolean // block context (vs flow); propagates downward\n compact?: boolean // may start on the current line (no leading newline)\n iskey?: boolean // node is a mapping key\n isblockseq?: boolean // content follows an indicator (`-`, or `?`/`:` in an\n // explicit pair) that already shifted it right; keeps\n // its indentation under seqNoIndent\n}\n\ninterface NodeRender {\n text: string\n noBody: boolean\n}\n\n// A node can't sit compact on its parent's indicator (`-`/`?`/`:`) line when it\n// carries leading props (tag/anchor) that would collide with the indicator, or\n// when the indent step is too narrow for the 2-char indicator. Such a node drops\n// to its own line; a block collection that does so also collapses its seqNoIndent\n// indentation back to the parent.\nfunction cannotBeCompact (state: PresenterState, node: Node, level: number) {\n if (node.kind === 'alias') return true\n return node.tagged || node.anchor !== undefined || (state.indent < 2 && level > 0)\n}\n\nfunction writeNode (state: PresenterState, level: number, node: Node,\n parent: Readonly | null, ctx: NodeContext): NodeRender {\n if (node.kind === 'alias') {\n state.openEnded = false\n return { text: `*${node.anchor}`, noBody: false }\n }\n\n const { block = false, iskey = false, isblockseq = false } = ctx\n let compact = ctx.compact ?? false\n\n const hasAnchor = node.anchor !== undefined\n\n if (cannotBeCompact(state, node, level)) {\n compact = false\n }\n\n let body: string\n let shouldPrintTag = node.tagged\n const useBlockCollection = block &&\n (node.kind === 'mapping' || node.kind === 'sequence') &&\n node.style === COLLECTION_STYLE.BLOCK && node.items.length !== 0\n\n if (node.kind === 'mapping') {\n if (useBlockCollection) {\n body = writeBlockMapping(state, level, node, compact)\n } else {\n body = writeFlowMapping(state, level, node)\n }\n } else if (node.kind === 'sequence') {\n if (useBlockCollection) {\n if (state.seqNoIndent && !isblockseq && level > 0) {\n body = writeBlockSequence(state, level - 1, node, compact)\n } else {\n body = writeBlockSequence(state, level, node, compact)\n }\n } else {\n body = writeFlowSequence(state, level, node)\n }\n } else {\n const layout = scalarLayout(state, node, parent, level, iskey, !block)\n\n detectAllowedStyles(layout)\n for (const rule of state.scalarStyleRules) rule(layout)\n\n body = renderScalar(layout)\n state.openEnded =\n (layout.style === SCALAR_STYLE.LITERAL_BLOCK || layout.style === SCALAR_STYLE.FOLDED_BLOCK) &&\n (node.value === '\\n' || node.value.endsWith('\\n\\n'))\n\n // A flow sequence entry cannot be completely empty. Print the semantic tag\n // as the node property that explicitly indicates the entry's existence.\n shouldPrintTag = node.tagged ||\n (body === '' && layout.flowOnly && parent?.kind === 'sequence' && !hasAnchor) ||\n (layout.style !== SCALAR_STYLE.PLAIN && node.tag !== state.defaultScalarTagName)\n }\n\n // A flow collection ends with its closing indicator, not with its last child.\n if ((node.kind === 'mapping' || node.kind === 'sequence') && !useBlockCollection) {\n state.openEnded = false\n }\n\n // An indicator plus its mandatory separator occupies 2 columns. For wider\n // indentation, pad a compact block collection so its first item starts at\n // the same column as the following items.\n if (useBlockCollection && compact && level > 0 && state.indent > 2) {\n body = `${' '.repeat(state.indent - 2)}${body}`\n }\n\n const noBody = body === ''\n let text = body\n\n if (shouldPrintTag || hasAnchor) {\n const props: string[] = []\n const tag = shouldPrintTag ? nodeTagShort(node) : null\n const anchor = hasAnchor ? `&${node.anchor}` : null\n\n if (state.tagBeforeAnchor) {\n if (tag !== null) props.push(tag)\n if (anchor !== null) props.push(anchor)\n } else {\n if (anchor !== null) props.push(anchor)\n if (tag !== null) props.push(tag)\n }\n\n // No separator when the body is empty (e.g. `&anchor` on a null node) or\n // already starts on its own line.\n const sep = body === '' || body.charCodeAt(0) === CHAR_LINE_FEED ? '' : ' '\n text = `${props.join(' ')}${sep}${body}`\n }\n\n return { text, noBody }\n}\n\n// A bare (untagged, unanchored) non-empty block collection: writeNode renders it\n// in compact form with its first item on the opening line. That works mid-stream,\n// but right after a `---` the first item must drop to the next line. A tag/anchor\n// already forces the body onto its own line, so those stay on the `---` line.\nfunction rootStartsOwnLine (node: Node) {\n return (node.kind === 'sequence' || node.kind === 'mapping') &&\n node.style === COLLECTION_STYLE.BLOCK &&\n node.items.length !== 0 &&\n !node.tagged &&\n node.anchor === undefined\n}\n\nfunction writeDocumentDirectives (doc: Document) {\n let result = ''\n\n for (const directive of doc.directives) {\n if (directive.kind === 'yaml') {\n result += `%YAML ${directive.version}\\n`\n continue\n }\n\n const { handle, prefix } = directive\n result += `%TAG ${handle} ${prefix}\\n`\n }\n\n return result\n}\n\n/**\n * Build YAML from AST.\n *\n * @category AST\n */\nfunction present (documents: Document[], options: PresenterOptions): string {\n const state = createPresenterState(options)\n let result = ''\n let previousEnded = false\n\n for (let index = 0; index < documents.length; index += 1) {\n const doc = documents[index]\n state.openEnded = false\n const directives = writeDocumentDirectives(doc)\n const hasDirectives = directives !== ''\n const marker = doc.explicitStart || hasDirectives || (index > 0 && !previousEnded)\n\n result += directives\n\n if (doc.contents === null) {\n if (marker) result += '---\\n'\n } else if (marker) {\n const body = writeNode(state, 0, doc.contents, null, { block: true, compact: true }).text\n // Content shares the `---` line, except: an empty render (no separator at\n // all), a bare block collection (wraps to the next line), or directives\n // forcing `---` onto its own line.\n const sep = body === '' ? '' : (hasDirectives || rootStartsOwnLine(doc.contents) ? '\\n' : ' ')\n result += `---${sep}${body}\\n`\n } else {\n result += writeNode(state, 0, doc.contents, null, { block: true, compact: true }).text + '\\n'\n }\n\n previousEnded = doc.explicitEnd || state.openEnded\n if (previousEnded) {\n result += '...\\n'\n }\n }\n\n return result\n}\n\nexport {\n DEFAULT_PRESENTER_OPTIONS,\n present,\n type PresenterOptions\n}\n","import { DUMP_SCHEMA, type Schema } from './schema.ts'\nimport { COLLECTION_STYLE } from './parser/events.ts'\nimport { jsToAst } from './ast/from_js.ts'\nimport { visit, VISIT_SKIP } from './ast/visit.ts'\nimport { type Document } from './ast/nodes.ts'\nimport {\n DEFAULT_PRESENTER_OPTIONS,\n present,\n type PresenterOptions\n} from './ast/presenter.ts'\nimport { pick } from './common/object.ts'\n\n/** @category Main */\ninterface DumpOptions extends Omit {\n /**\n * Schema to use.\n *\n * @defaultValue {@link DUMP_SCHEMA}\n */\n schema?: Schema\n\n /**\n * Skips invalid types instead of throwing. Invalid mapping pairs and sequence\n * items are skipped; `undefined` sequence items are serialized as `null`.\n *\n * @defaultValue `false`\n */\n skipInvalid?: boolean\n\n /**\n * Inlines duplicate objects instead of converting them into references.\n *\n * @defaultValue `false`\n */\n noRefs?: boolean\n\n /**\n * Nesting level at which collections switch from block to flow style. Set to\n * `-1` to never switch automatically.\n *\n * @defaultValue `-1`\n */\n flowLevel?: number\n\n /**\n * Sorts mapping keys when `true`. A function can be provided to define the\n * sort order.\n *\n * @defaultValue `false`\n * @deprecated Use {@link transform} to reorder mapping items.\n */\n sortKeys?: boolean | ((a: any, b: any) => number)\n\n /**\n * Mutates the generated AST before it is rendered.\n *\n * @example Sort mapping keys:\n *\n * ```typescript\n * import { dump, visit } from 'js-yaml'\n *\n * dump(value, {\n * transform: documents => visit(documents, node => {\n * if (node.kind === 'mapping') node.items.sort((a, b) => {\n * const x = a.key.kind === 'scalar' ? a.key.value : ''\n * const y = b.key.kind === 'scalar' ? b.key.value : ''\n * return x.localeCompare(y)\n * })\n * })\n * })\n * ```\n */\n transform?: (documents: Document[]) => void\n}\n\nconst DEFAULT_DUMP_OPTIONS: Required = {\n ...DEFAULT_PRESENTER_OPTIONS,\n schema: DUMP_SCHEMA,\n skipInvalid: false,\n noRefs: false,\n flowLevel: -1,\n sortKeys: false,\n transform: () => {}\n}\n\nfunction defaultCompareFn (a: any, b: any) {\n const x = String(a)\n const y = String(b)\n\n if (x < y) return -1\n if (x > y) return 1\n return 0\n}\n\n/**\n * Serializes JS object as a YAML document. By default it can dump every\n * supported YAML type, so it throws an exception if you try to dump regexps or\n * functions. However, you can disable exceptions by setting the\n * {@link DumpOptions.skipInvalid} option to `true`.\n *\n * @category Main\n */\nfunction dump (input: any, options: DumpOptions = {}) {\n const opts = { ...DEFAULT_DUMP_OPTIONS, ...options }\n\n const documents = jsToAst(input, opts.schema, {\n noRefs: opts.noRefs,\n skipInvalid: opts.skipInvalid\n })\n\n // flowLevel: every node at this depth switches to flow; the presenter forces\n // everything below into flow too, so the walk stops there.\n if (opts.flowLevel >= 0) {\n visit(documents, (node, ctx) => {\n if (ctx.depth < opts.flowLevel) return\n if (node.kind === 'sequence' || node.kind === 'mapping') {\n node.style = COLLECTION_STYLE.FLOW\n }\n return VISIT_SKIP\n })\n }\n\n if (opts.sortKeys) {\n const compareFn = opts.sortKeys === true ? defaultCompareFn : opts.sortKeys\n\n visit(documents, node => {\n if (node.kind !== 'mapping') return\n\n node.items.sort((a, b) => compareFn(\n a.key.kind === 'scalar' ? a.key.value : '',\n b.key.kind === 'scalar' ? b.key.value : ''\n ))\n })\n }\n\n opts.transform(documents)\n\n const PRESENTER_OPT_KEYS = Object.keys(DEFAULT_PRESENTER_OPTIONS) as\n (keyof typeof DEFAULT_PRESENTER_OPTIONS)[]\n\n return present(documents, { ...pick(opts, PRESENTER_OPT_KEYS), schema: opts.schema })\n}\n\nexport {\n dump,\n\n type DumpOptions\n}\n","// Parser events → AST. The second entry into the AST world (the first being\n// `jsToAst`): instead of building JS values like the constructor, it mirrors the\n// same document/sequence/mapping frame walk and emits `Node`s that keep the\n// original styles, tags and anchors, so parsed YAML can be re-dumped faithfully.\n\nimport {\n EVENT_ID,\n SCALAR_STYLE,\n type CollectionStyle,\n type Event,\n type MappingEvent,\n type ScalarEvent,\n type SequenceEvent\n} from '../parser/events.ts'\nimport { getScalarValue } from '../parser/parser_scalar.ts'\nimport { type Schema } from '../schema.ts'\nimport {\n type Node,\n type Document,\n type ScalarNode,\n type SequenceNode,\n type MappingNode,\n type AliasNode\n} from './nodes.ts'\n\nconst NO_RANGE = -1\n\ninterface DocumentFrame {\n kind: 'document'\n doc: Document\n}\n\ninterface SequenceFrame {\n kind: 'sequence'\n node: SequenceNode\n}\n\ninterface MappingFrame {\n kind: 'mapping'\n node: MappingNode\n key: Node | null\n}\n\ntype Frame = DocumentFrame | SequenceFrame | MappingFrame\n\n/** @category AST */\ninterface FromEventsOptions {\n /** Source text referenced by offsets in `events`. */\n source: string\n\n /** Schema used to resolve implicit scalar tags. */\n schema: Schema\n}\n\ninterface FromEventsState {\n source: string\n schema: Schema\n eventIndex: number\n position: number\n frames: Frame[]\n documents: Document[]\n}\n\nfunction eventPosition (event: Event) {\n if ('tagStart' in event && event.tagStart !== NO_RANGE) return event.tagStart\n if ('anchorStart' in event && event.anchorStart !== NO_RANGE) return event.anchorStart\n if ('valueStart' in event && event.valueStart !== NO_RANGE) return event.valueStart\n if ('start' in event) return event.start\n return 0\n}\n\nfunction rawTag (state: FromEventsState, event: ScalarEvent | SequenceEvent | MappingEvent) {\n return event.tagStart === NO_RANGE\n ? ''\n : state.source.slice(event.tagStart, event.tagEnd)\n}\n\nfunction anchorName (state: FromEventsState, event: ScalarEvent | SequenceEvent | MappingEvent) {\n return event.anchorStart === NO_RANGE\n ? undefined\n : state.source.slice(event.anchorStart, event.anchorEnd)\n}\n\nfunction buildScalar (state: FromEventsState, event: ScalarEvent): ScalarNode {\n const value = getScalarValue(state.source, event)\n const raw = rawTag(state, event)\n\n let tag: string\n let tagged = false\n if (raw !== '') {\n tagged = true\n tag = raw\n } else if (event.style === SCALAR_STYLE.PLAIN) {\n tag = state.schema.resolveImplicitScalarTag(value).tag.tagName\n } else {\n tag = state.schema.defaultScalarTag.tagName\n }\n\n return { kind: 'scalar', tag, tagged, style: event.style, anchor: anchorName(state, event), value }\n}\n\nfunction buildCollection (\n state: FromEventsState,\n event: SequenceEvent | MappingEvent,\n defaultTagName: string\n): { tag: string, tagged: boolean, style: CollectionStyle, anchor?: string } {\n const raw = rawTag(state, event)\n\n let tag: string\n let tagged = false\n if (raw === '') {\n tag = defaultTagName\n } else {\n tag = raw\n tagged = true\n }\n\n return { tag, tagged, style: event.style, anchor: anchorName(state, event) }\n}\n\nfunction addNode (state: FromEventsState, node: Node) {\n const frame = state.frames[state.frames.length - 1]\n\n if (frame.kind === 'document') {\n frame.doc.contents = node\n } else if (frame.kind === 'sequence') {\n frame.node.items.push(node)\n } else if (frame.key) {\n frame.node.items.push({ key: frame.key, value: node })\n frame.key = null\n } else {\n frame.key = node\n }\n}\n\n/**\n * Builds an AST from parser events\n *\n * @category AST\n */\nfunction eventsToAst (events: Event[], options: FromEventsOptions): Document[] {\n const state: FromEventsState = {\n source: options.source,\n schema: options.schema,\n eventIndex: 0,\n position: 0,\n frames: [],\n documents: []\n }\n\n while (state.eventIndex < events.length) {\n const event = events[state.eventIndex++]\n state.position = eventPosition(event)\n\n switch (event.type) {\n case EVENT_ID.DOCUMENT: {\n const doc: Document = {\n contents: null,\n explicitStart: event.explicitStart,\n explicitEnd: event.explicitEnd,\n directives: event.directives\n }\n state.frames.push({ kind: 'document', doc })\n break\n }\n\n case EVENT_ID.SCALAR:\n addNode(state, buildScalar(state, event))\n break\n\n case EVENT_ID.SEQUENCE: {\n const { tag, tagged, style, anchor } = buildCollection(state, event, 'tag:yaml.org,2002:seq')\n const node: SequenceNode = { kind: 'sequence', tag, tagged, style, anchor, items: [] }\n state.frames.push({ kind: 'sequence', node })\n break\n }\n\n case EVENT_ID.MAPPING: {\n const { tag, tagged, style, anchor } = buildCollection(state, event, 'tag:yaml.org,2002:map')\n const node: MappingNode = { kind: 'mapping', tag, tagged, style, anchor, items: [] }\n state.frames.push({ kind: 'mapping', node, key: null })\n break\n }\n\n case EVENT_ID.ALIAS: {\n const name = state.source.slice(event.anchorStart, event.anchorEnd)\n const node: AliasNode = { kind: 'alias', anchor: name }\n addNode(state, node)\n break\n }\n\n case EVENT_ID.POP: {\n const frame = state.frames.pop()!\n if (frame.kind === 'mapping' && frame.key) {\n throw new Error('incomplete mapping pair in event stream')\n }\n if (frame.kind === 'document') {\n state.documents.push(frame.doc)\n } else {\n addNode(state, frame.node)\n }\n break\n }\n }\n }\n\n return state.documents\n}\n\nexport {\n eventsToAst,\n type FromEventsOptions\n}\n","export {\n Schema,\n FAILSAFE_SCHEMA,\n JSON_SCHEMA,\n CORE_SCHEMA,\n YAML11_SCHEMA,\n DUMP_SCHEMA\n} from './schema.ts'\n\nexport {\n NOT_RESOLVED,\n defineScalarTag,\n defineSequenceTag,\n defineMappingTag,\n type ScalarTagDefinition,\n type SequenceTagDefinition,\n type MappingTagDefinition,\n type TagDefinition,\n type ScalarTagOptions,\n type SequenceTagOptions,\n type MappingTagOptions\n} from './tag.ts'\n\nexport { strTag } from './tag/scalar/str.ts'\nexport { nullCoreTag } from './tag/scalar/null_core.ts'\nexport { nullJsonTag } from './tag/scalar/null_json.ts'\nexport { nullYaml11Tag } from './tag/scalar/null_yaml11.ts'\nexport { boolCoreTag } from './tag/scalar/bool_core.ts'\nexport { boolJsonTag } from './tag/scalar/bool_json.ts'\nexport { boolYaml11Tag } from './tag/scalar/bool_yaml11.ts'\nexport { intCoreTag } from './tag/scalar/int_core.ts'\nexport { intJsonTag } from './tag/scalar/int_json.ts'\nexport { intYaml11Tag } from './tag/scalar/int_yaml11.ts'\nexport { floatCoreTag } from './tag/scalar/float_core.ts'\nexport { floatJsonTag } from './tag/scalar/float_json.ts'\nexport { floatYaml11Tag } from './tag/scalar/float_yaml11.ts'\nexport { mergeTag } from './tag/scalar/merge.ts'\nexport { binaryTag } from './tag/scalar/binary.ts'\nexport { timestampTag } from './tag/scalar/timestamp.ts'\n\nexport { seqTag } from './tag/sequence/seq.ts'\nexport { omapTag } from './tag/sequence/omap.ts'\nexport { pairsTag } from './tag/sequence/pairs.ts'\n\nexport { mapTag } from './tag/mapping/map.ts'\nexport { realMapTag } from './tag/mapping/real_map.ts'\nexport { legacyMapTag } from './tag/mapping/legacy_map.ts'\nexport { setTag } from './tag/mapping/set.ts'\n\nexport { load, loadAll, type LoadOptions } from './load.ts'\nexport { dump, type DumpOptions } from './dump.ts'\nexport { YAMLException } from './common/exception.ts'\n\nexport {\n EVENT_ID,\n SCALAR_STYLE,\n COLLECTION_STYLE,\n CHOMPING_MODE,\n type EventId,\n type ScalarStyle,\n type CollectionStyle,\n type ChompingMode,\n\n type DocumentDirective,\n type DocumentEvent,\n type SequenceEvent,\n type MappingEvent,\n type ScalarEvent,\n type AliasEvent,\n type PopEvent,\n type Event\n} from './parser/events.ts'\n\nexport {\n parseEvents,\n type ParserOptions\n} from './parser/parser.ts'\n\nexport { getScalarValue } from './parser/parser_scalar.ts'\n\nexport {\n constructFromEvents,\n type ConstructorOptions\n} from './parser/constructor.ts'\n\nexport { eventsToAst, type FromEventsOptions } from './ast/from_events.ts'\nexport { jsToAst, type FromJsOptions } from './ast/from_js.ts'\nexport { present, type PresenterOptions } from './ast/presenter.ts'\nexport { type ScalarLayout, type ScalarStyleRule } from './ast/scalar_styler.ts'\nexport { DEFAULT_SCALAR_STYLE_RULES } from './ast/styler_defaults.ts'\n\nexport {\n visit,\n VISIT_BREAK,\n VISIT_SKIP,\n type Visitor,\n type VisitContext\n} from './ast/visit.ts'\n\nexport {\n type Node,\n type Document,\n type NodeBase,\n type ScalarNode,\n type SequenceNode,\n type MappingNode,\n type AliasNode\n} from './ast/nodes.ts'\n\n// Deprecated compatibility exports\n\nimport { EVENT_ID, SCALAR_STYLE, COLLECTION_STYLE, CHOMPING_MODE } from './parser/events.ts'\n\n/** @deprecated Use `EVENT_ID.DOCUMENT` instead. @internal */\nexport const EVENT_DOCUMENT = EVENT_ID.DOCUMENT\n/** @deprecated Use `EVENT_ID.SEQUENCE` instead. @internal */\nexport const EVENT_SEQUENCE = EVENT_ID.SEQUENCE\n/** @deprecated Use `EVENT_ID.MAPPING` instead. @internal */\nexport const EVENT_MAPPING = EVENT_ID.MAPPING\n/** @deprecated Use `EVENT_ID.SCALAR` instead. @internal */\nexport const EVENT_SCALAR = EVENT_ID.SCALAR\n/** @deprecated Use `EVENT_ID.ALIAS` instead. @internal */\nexport const EVENT_ALIAS = EVENT_ID.ALIAS\n/** @deprecated Use `EVENT_ID.POP` instead. @internal */\nexport const EVENT_POP = EVENT_ID.POP\n/** @deprecated Use `SCALAR_STYLE.PLAIN` instead. @internal */\nexport const SCALAR_STYLE_PLAIN = SCALAR_STYLE.PLAIN\n/** @deprecated Use `SCALAR_STYLE.SINGLE_QUOTED` instead. @internal */\nexport const SCALAR_STYLE_SINGLE_QUOTED = SCALAR_STYLE.SINGLE_QUOTED\n/** @deprecated Use `SCALAR_STYLE.DOUBLE_QUOTED` instead. @internal */\nexport const SCALAR_STYLE_DOUBLE_QUOTED = SCALAR_STYLE.DOUBLE_QUOTED\n/** @deprecated Use `SCALAR_STYLE.LITERAL_BLOCK` instead. @internal */\nexport const SCALAR_STYLE_LITERAL_BLOCK = SCALAR_STYLE.LITERAL_BLOCK\n/** @deprecated Use `SCALAR_STYLE.FOLDED_BLOCK` instead. @internal */\nexport const SCALAR_STYLE_FOLDED_BLOCK = SCALAR_STYLE.FOLDED_BLOCK\n/** @deprecated Use `COLLECTION_STYLE.BLOCK` instead. @internal */\nexport const COLLECTION_STYLE_BLOCK = COLLECTION_STYLE.BLOCK\n/** @deprecated Use `COLLECTION_STYLE.FLOW` instead. @internal */\nexport const COLLECTION_STYLE_FLOW = COLLECTION_STYLE.FLOW\n/** @deprecated Use `CHOMPING_MODE.CLIP` instead. @internal */\nexport const CHOMPING_CLIP = CHOMPING_MODE.CLIP\n/** @deprecated Use `CHOMPING_MODE.STRIP` instead. @internal */\nexport const CHOMPING_STRIP = CHOMPING_MODE.STRIP\n/** @deprecated Use `CHOMPING_MODE.KEEP` instead. @internal */\nexport const CHOMPING_KEEP = CHOMPING_MODE.KEEP\n"],"mappings":";;;;;;;AAKA,IAAM,eAA8B,OAAO,cAAc;;;;;;AAsMzD,SAAS,gBAAyB,SAAiB,SAAgE;CACjH,OAAO;EACL;EACA,UAAU;EACV,UAAU,QAAQ,YAAY;EAC9B,kBAAkB,QAAQ,oBAAoB;EAC9C,oBAAoB,QAAQ,sBAAsB;EAClD,SAAS,QAAQ;EACjB,UAAU,QAAQ;EAClB,WAAW,QAAQ,eAAc,SAAQ,OAAO,IAAI;EACpD,kBAAkB,QAAQ,2BAA2B;CACvD;AACF;;;;;;AAOA,SAAS,kBAA8C,SAAiB,SAAsF;CAC5J,MAAM,kBAAkB,QAAQ,aAAa,KAAA;CAE7C,OAAO;EACL;EACA,UAAU;EACV,UAAU;EACV,kBAAkB,QAAQ,oBAAoB;EAC9C,QAAQ,QAAQ;EAChB,SAAS,QAAQ;EACjB,UAAU,QAAQ,cAAa,YAAW;EAC1C;EACA,UAAU,QAAQ;EAClB,WAAW,QAAQ,eAAc,SAAQ;EACzC,kBAAkB,QAAQ,2BAA2B;CACvD;AACF;;;;;;AAOA,SAAS,iBAA6C,SAAiB,SAAoF;CACzJ,MAAM,kBAAkB,QAAQ,aAAa,KAAA;CAE7C,OAAO;EACL;EACA,UAAU;EACV,UAAU;EACV,kBAAkB,QAAQ,oBAAoB;EAC9C,QAAQ,QAAQ;EAChB,SAAS,QAAQ;EACjB,KAAK,QAAQ;EACb,MAAM,QAAQ;EACd,KAAK,QAAQ;EACb,UAAU,QAAQ,cAAa,YAAW;EAC1C;EACA,UAAU,QAAQ;EAClB,WAAW,QAAQ,eAAc,SAAQ;EACzC,kBAAkB,QAAQ,2BAA2B;CACvD;AACF;;;;ACrQA,IAAM,SAAS,gBAAgB,yBAAyB;CACtD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AI,MAAM,yCAAyC;IAE3D,IAAI,MAAM,SAAS,YACjB,MAAM,UAAU,KAAK,MAAM,GAAG;SAE9B,QAAQ,OAAO,MAAM,IAAI;IAE3B;GACF;EACF;CACF;CAEA,OAAO,MAAM;AACf;;;;AC7FA,IAAa,iBAAiB,SAAS;;AAEvC,IAAa,iBAAiB,SAAS;;AAEvC,IAAa,gBAAgB,SAAS;;AAEtC,IAAa,eAAe,SAAS;;AAErC,IAAa,cAAc,SAAS;;AAEpC,IAAa,YAAY,SAAS;;AAElC,IAAa,qBAAqB,aAAa;;AAE/C,IAAa,6BAA6B,aAAa;;AAEvD,IAAa,6BAA6B,aAAa;;AAEvD,IAAa,6BAA6B,aAAa;;AAEvD,IAAa,4BAA4B,aAAa;;AAEtD,IAAa,yBAAyB,iBAAiB;;AAEvD,IAAa,wBAAwB,iBAAiB;;AAEtD,IAAa,gBAAgB,cAAc;;AAE3C,IAAa,iBAAiB,cAAc;;AAE5C,IAAa,gBAAgB,cAAc"} \ No newline at end of file diff --git a/node_modules/js-yaml/index.js b/node_modules/js-yaml/index.js deleted file mode 100644 index bcb7eba7..00000000 --- a/node_modules/js-yaml/index.js +++ /dev/null @@ -1,47 +0,0 @@ -'use strict'; - - -var loader = require('./lib/loader'); -var dumper = require('./lib/dumper'); - - -function renamed(from, to) { - return function () { - throw new Error('Function yaml.' + from + ' is removed in js-yaml 4. ' + - 'Use yaml.' + to + ' instead, which is now safe by default.'); - }; -} - - -module.exports.Type = require('./lib/type'); -module.exports.Schema = require('./lib/schema'); -module.exports.FAILSAFE_SCHEMA = require('./lib/schema/failsafe'); -module.exports.JSON_SCHEMA = require('./lib/schema/json'); -module.exports.CORE_SCHEMA = require('./lib/schema/core'); -module.exports.DEFAULT_SCHEMA = require('./lib/schema/default'); -module.exports.load = loader.load; -module.exports.loadAll = loader.loadAll; -module.exports.dump = dumper.dump; -module.exports.YAMLException = require('./lib/exception'); - -// Re-export all types in case user wants to create custom schema -module.exports.types = { - binary: require('./lib/type/binary'), - float: require('./lib/type/float'), - map: require('./lib/type/map'), - null: require('./lib/type/null'), - pairs: require('./lib/type/pairs'), - set: require('./lib/type/set'), - timestamp: require('./lib/type/timestamp'), - bool: require('./lib/type/bool'), - int: require('./lib/type/int'), - merge: require('./lib/type/merge'), - omap: require('./lib/type/omap'), - seq: require('./lib/type/seq'), - str: require('./lib/type/str') -}; - -// Removed functions from JS-YAML 3.0.x -module.exports.safeLoad = renamed('safeLoad', 'load'); -module.exports.safeLoadAll = renamed('safeLoadAll', 'loadAll'); -module.exports.safeDump = renamed('safeDump', 'dump'); diff --git a/node_modules/js-yaml/lib/common.js b/node_modules/js-yaml/lib/common.js deleted file mode 100644 index 25ef7d8e..00000000 --- a/node_modules/js-yaml/lib/common.js +++ /dev/null @@ -1,59 +0,0 @@ -'use strict'; - - -function isNothing(subject) { - return (typeof subject === 'undefined') || (subject === null); -} - - -function isObject(subject) { - return (typeof subject === 'object') && (subject !== null); -} - - -function toArray(sequence) { - if (Array.isArray(sequence)) return sequence; - else if (isNothing(sequence)) return []; - - return [ sequence ]; -} - - -function extend(target, source) { - var index, length, key, sourceKeys; - - if (source) { - sourceKeys = Object.keys(source); - - for (index = 0, length = sourceKeys.length; index < length; index += 1) { - key = sourceKeys[index]; - target[key] = source[key]; - } - } - - return target; -} - - -function repeat(string, count) { - var result = '', cycle; - - for (cycle = 0; cycle < count; cycle += 1) { - result += string; - } - - return result; -} - - -function isNegativeZero(number) { - return (number === 0) && (Number.NEGATIVE_INFINITY === 1 / number); -} - - -module.exports.isNothing = isNothing; -module.exports.isObject = isObject; -module.exports.toArray = toArray; -module.exports.repeat = repeat; -module.exports.isNegativeZero = isNegativeZero; -module.exports.extend = extend; diff --git a/node_modules/js-yaml/lib/dumper.js b/node_modules/js-yaml/lib/dumper.js deleted file mode 100644 index f357a6ae..00000000 --- a/node_modules/js-yaml/lib/dumper.js +++ /dev/null @@ -1,965 +0,0 @@ -'use strict'; - -/*eslint-disable no-use-before-define*/ - -var common = require('./common'); -var YAMLException = require('./exception'); -var DEFAULT_SCHEMA = require('./schema/default'); - -var _toString = Object.prototype.toString; -var _hasOwnProperty = Object.prototype.hasOwnProperty; - -var CHAR_BOM = 0xFEFF; -var CHAR_TAB = 0x09; /* Tab */ -var CHAR_LINE_FEED = 0x0A; /* LF */ -var CHAR_CARRIAGE_RETURN = 0x0D; /* CR */ -var CHAR_SPACE = 0x20; /* Space */ -var CHAR_EXCLAMATION = 0x21; /* ! */ -var CHAR_DOUBLE_QUOTE = 0x22; /* " */ -var CHAR_SHARP = 0x23; /* # */ -var CHAR_PERCENT = 0x25; /* % */ -var CHAR_AMPERSAND = 0x26; /* & */ -var CHAR_SINGLE_QUOTE = 0x27; /* ' */ -var CHAR_ASTERISK = 0x2A; /* * */ -var CHAR_COMMA = 0x2C; /* , */ -var CHAR_MINUS = 0x2D; /* - */ -var CHAR_COLON = 0x3A; /* : */ -var CHAR_EQUALS = 0x3D; /* = */ -var CHAR_GREATER_THAN = 0x3E; /* > */ -var CHAR_QUESTION = 0x3F; /* ? */ -var CHAR_COMMERCIAL_AT = 0x40; /* @ */ -var CHAR_LEFT_SQUARE_BRACKET = 0x5B; /* [ */ -var CHAR_RIGHT_SQUARE_BRACKET = 0x5D; /* ] */ -var CHAR_GRAVE_ACCENT = 0x60; /* ` */ -var CHAR_LEFT_CURLY_BRACKET = 0x7B; /* { */ -var CHAR_VERTICAL_LINE = 0x7C; /* | */ -var CHAR_RIGHT_CURLY_BRACKET = 0x7D; /* } */ - -var ESCAPE_SEQUENCES = {}; - -ESCAPE_SEQUENCES[0x00] = '\\0'; -ESCAPE_SEQUENCES[0x07] = '\\a'; -ESCAPE_SEQUENCES[0x08] = '\\b'; -ESCAPE_SEQUENCES[0x09] = '\\t'; -ESCAPE_SEQUENCES[0x0A] = '\\n'; -ESCAPE_SEQUENCES[0x0B] = '\\v'; -ESCAPE_SEQUENCES[0x0C] = '\\f'; -ESCAPE_SEQUENCES[0x0D] = '\\r'; -ESCAPE_SEQUENCES[0x1B] = '\\e'; -ESCAPE_SEQUENCES[0x22] = '\\"'; -ESCAPE_SEQUENCES[0x5C] = '\\\\'; -ESCAPE_SEQUENCES[0x85] = '\\N'; -ESCAPE_SEQUENCES[0xA0] = '\\_'; -ESCAPE_SEQUENCES[0x2028] = '\\L'; -ESCAPE_SEQUENCES[0x2029] = '\\P'; - -var DEPRECATED_BOOLEANS_SYNTAX = [ - 'y', 'Y', 'yes', 'Yes', 'YES', 'on', 'On', 'ON', - 'n', 'N', 'no', 'No', 'NO', 'off', 'Off', 'OFF' -]; - -var DEPRECATED_BASE60_SYNTAX = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/; - -function compileStyleMap(schema, map) { - var result, keys, index, length, tag, style, type; - - if (map === null) return {}; - - result = {}; - keys = Object.keys(map); - - for (index = 0, length = keys.length; index < length; index += 1) { - tag = keys[index]; - style = String(map[tag]); - - if (tag.slice(0, 2) === '!!') { - tag = 'tag:yaml.org,2002:' + tag.slice(2); - } - type = schema.compiledTypeMap['fallback'][tag]; - - if (type && _hasOwnProperty.call(type.styleAliases, style)) { - style = type.styleAliases[style]; - } - - result[tag] = style; - } - - return result; -} - -function encodeHex(character) { - var string, handle, length; - - string = character.toString(16).toUpperCase(); - - if (character <= 0xFF) { - handle = 'x'; - length = 2; - } else if (character <= 0xFFFF) { - handle = 'u'; - length = 4; - } else if (character <= 0xFFFFFFFF) { - handle = 'U'; - length = 8; - } else { - throw new YAMLException('code point within a string may not be greater than 0xFFFFFFFF'); - } - - return '\\' + handle + common.repeat('0', length - string.length) + string; -} - - -var QUOTING_TYPE_SINGLE = 1, - QUOTING_TYPE_DOUBLE = 2; - -function State(options) { - this.schema = options['schema'] || DEFAULT_SCHEMA; - this.indent = Math.max(1, (options['indent'] || 2)); - this.noArrayIndent = options['noArrayIndent'] || false; - this.skipInvalid = options['skipInvalid'] || false; - this.flowLevel = (common.isNothing(options['flowLevel']) ? -1 : options['flowLevel']); - this.styleMap = compileStyleMap(this.schema, options['styles'] || null); - this.sortKeys = options['sortKeys'] || false; - this.lineWidth = options['lineWidth'] || 80; - this.noRefs = options['noRefs'] || false; - this.noCompatMode = options['noCompatMode'] || false; - this.condenseFlow = options['condenseFlow'] || false; - this.quotingType = options['quotingType'] === '"' ? QUOTING_TYPE_DOUBLE : QUOTING_TYPE_SINGLE; - this.forceQuotes = options['forceQuotes'] || false; - this.replacer = typeof options['replacer'] === 'function' ? options['replacer'] : null; - - this.implicitTypes = this.schema.compiledImplicit; - this.explicitTypes = this.schema.compiledExplicit; - - this.tag = null; - this.result = ''; - - this.duplicates = []; - this.usedDuplicates = null; -} - -// Indents every line in a string. Empty lines (\n only) are not indented. -function indentString(string, spaces) { - var ind = common.repeat(' ', spaces), - position = 0, - next = -1, - result = '', - line, - length = string.length; - - while (position < length) { - next = string.indexOf('\n', position); - if (next === -1) { - line = string.slice(position); - position = length; - } else { - line = string.slice(position, next + 1); - position = next + 1; - } - - if (line.length && line !== '\n') result += ind; - - result += line; - } - - return result; -} - -function generateNextLine(state, level) { - return '\n' + common.repeat(' ', state.indent * level); -} - -function testImplicitResolving(state, str) { - var index, length, type; - - for (index = 0, length = state.implicitTypes.length; index < length; index += 1) { - type = state.implicitTypes[index]; - - if (type.resolve(str)) { - return true; - } - } - - return false; -} - -// [33] s-white ::= s-space | s-tab -function isWhitespace(c) { - return c === CHAR_SPACE || c === CHAR_TAB; -} - -// Returns true if the character can be printed without escaping. -// From YAML 1.2: "any allowed characters known to be non-printable -// should also be escaped. [However,] This isn’t mandatory" -// Derived from nb-char - \t - #x85 - #xA0 - #x2028 - #x2029. -function isPrintable(c) { - return (0x00020 <= c && c <= 0x00007E) - || ((0x000A1 <= c && c <= 0x00D7FF) && c !== 0x2028 && c !== 0x2029) - || ((0x0E000 <= c && c <= 0x00FFFD) && c !== CHAR_BOM) - || (0x10000 <= c && c <= 0x10FFFF); -} - -// [34] ns-char ::= nb-char - s-white -// [27] nb-char ::= c-printable - b-char - c-byte-order-mark -// [26] b-char ::= b-line-feed | b-carriage-return -// Including s-white (for some reason, examples doesn't match specs in this aspect) -// ns-char ::= c-printable - b-line-feed - b-carriage-return - c-byte-order-mark -function isNsCharOrWhitespace(c) { - return isPrintable(c) - && c !== CHAR_BOM - // - b-char - && c !== CHAR_CARRIAGE_RETURN - && c !== CHAR_LINE_FEED; -} - -// [127] ns-plain-safe(c) ::= c = flow-out ⇒ ns-plain-safe-out -// c = flow-in ⇒ ns-plain-safe-in -// c = block-key ⇒ ns-plain-safe-out -// c = flow-key ⇒ ns-plain-safe-in -// [128] ns-plain-safe-out ::= ns-char -// [129] ns-plain-safe-in ::= ns-char - c-flow-indicator -// [130] ns-plain-char(c) ::= ( ns-plain-safe(c) - “:” - “#” ) -// | ( /* An ns-char preceding */ “#” ) -// | ( “:” /* Followed by an ns-plain-safe(c) */ ) -function isPlainSafe(c, prev, inblock) { - var cIsNsCharOrWhitespace = isNsCharOrWhitespace(c); - var cIsNsChar = cIsNsCharOrWhitespace && !isWhitespace(c); - return ( - // ns-plain-safe - inblock ? // c = flow-in - cIsNsCharOrWhitespace - : cIsNsCharOrWhitespace - // - c-flow-indicator - && c !== CHAR_COMMA - && c !== CHAR_LEFT_SQUARE_BRACKET - && c !== CHAR_RIGHT_SQUARE_BRACKET - && c !== CHAR_LEFT_CURLY_BRACKET - && c !== CHAR_RIGHT_CURLY_BRACKET - ) - // ns-plain-char - && c !== CHAR_SHARP // false on '#' - && !(prev === CHAR_COLON && !cIsNsChar) // false on ': ' - || (isNsCharOrWhitespace(prev) && !isWhitespace(prev) && c === CHAR_SHARP) // change to true on '[^ ]#' - || (prev === CHAR_COLON && cIsNsChar); // change to true on ':[^ ]' -} - -// Simplified test for values allowed as the first character in plain style. -function isPlainSafeFirst(c) { - // Uses a subset of ns-char - c-indicator - // where ns-char = nb-char - s-white. - // No support of ( ( “?” | “:” | “-” ) /* Followed by an ns-plain-safe(c)) */ ) part - return isPrintable(c) && c !== CHAR_BOM - && !isWhitespace(c) // - s-white - // - (c-indicator ::= - // “-” | “?” | “:” | “,” | “[” | “]” | “{” | “}” - && c !== CHAR_MINUS - && c !== CHAR_QUESTION - && c !== CHAR_COLON - && c !== CHAR_COMMA - && c !== CHAR_LEFT_SQUARE_BRACKET - && c !== CHAR_RIGHT_SQUARE_BRACKET - && c !== CHAR_LEFT_CURLY_BRACKET - && c !== CHAR_RIGHT_CURLY_BRACKET - // | “#” | “&” | “*” | “!” | “|” | “=” | “>” | “'” | “"” - && c !== CHAR_SHARP - && c !== CHAR_AMPERSAND - && c !== CHAR_ASTERISK - && c !== CHAR_EXCLAMATION - && c !== CHAR_VERTICAL_LINE - && c !== CHAR_EQUALS - && c !== CHAR_GREATER_THAN - && c !== CHAR_SINGLE_QUOTE - && c !== CHAR_DOUBLE_QUOTE - // | “%” | “@” | “`”) - && c !== CHAR_PERCENT - && c !== CHAR_COMMERCIAL_AT - && c !== CHAR_GRAVE_ACCENT; -} - -// Simplified test for values allowed as the last character in plain style. -function isPlainSafeLast(c) { - // just not whitespace or colon, it will be checked to be plain character later - return !isWhitespace(c) && c !== CHAR_COLON; -} - -// Same as 'string'.codePointAt(pos), but works in older browsers. -function codePointAt(string, pos) { - var first = string.charCodeAt(pos), second; - if (first >= 0xD800 && first <= 0xDBFF && pos + 1 < string.length) { - second = string.charCodeAt(pos + 1); - if (second >= 0xDC00 && second <= 0xDFFF) { - // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae - return (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000; - } - } - return first; -} - -// Determines whether block indentation indicator is required. -function needIndentIndicator(string) { - var leadingSpaceRe = /^\n* /; - return leadingSpaceRe.test(string); -} - -var STYLE_PLAIN = 1, - STYLE_SINGLE = 2, - STYLE_LITERAL = 3, - STYLE_FOLDED = 4, - STYLE_DOUBLE = 5; - -// Determines which scalar styles are possible and returns the preferred style. -// lineWidth = -1 => no limit. -// Pre-conditions: str.length > 0. -// Post-conditions: -// STYLE_PLAIN or STYLE_SINGLE => no \n are in the string. -// STYLE_LITERAL => no lines are suitable for folding (or lineWidth is -1). -// STYLE_FOLDED => a line > lineWidth and can be folded (and lineWidth != -1). -function chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth, - testAmbiguousType, quotingType, forceQuotes, inblock) { - - var i; - var char = 0; - var prevChar = null; - var hasLineBreak = false; - var hasFoldableLine = false; // only checked if shouldTrackWidth - var shouldTrackWidth = lineWidth !== -1; - var previousLineBreak = -1; // count the first line correctly - var plain = isPlainSafeFirst(codePointAt(string, 0)) - && isPlainSafeLast(codePointAt(string, string.length - 1)); - - if (singleLineOnly || forceQuotes) { - // Case: no block styles. - // Check for disallowed characters to rule out plain and single. - for (i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) { - char = codePointAt(string, i); - if (!isPrintable(char)) { - return STYLE_DOUBLE; - } - plain = plain && isPlainSafe(char, prevChar, inblock); - prevChar = char; - } - } else { - // Case: block styles permitted. - for (i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) { - char = codePointAt(string, i); - if (char === CHAR_LINE_FEED) { - hasLineBreak = true; - // Check if any line can be folded. - if (shouldTrackWidth) { - hasFoldableLine = hasFoldableLine || - // Foldable line = too long, and not more-indented. - (i - previousLineBreak - 1 > lineWidth && - string[previousLineBreak + 1] !== ' '); - previousLineBreak = i; - } - } else if (!isPrintable(char)) { - return STYLE_DOUBLE; - } - plain = plain && isPlainSafe(char, prevChar, inblock); - prevChar = char; - } - // in case the end is missing a \n - hasFoldableLine = hasFoldableLine || (shouldTrackWidth && - (i - previousLineBreak - 1 > lineWidth && - string[previousLineBreak + 1] !== ' ')); - } - // Although every style can represent \n without escaping, prefer block styles - // for multiline, since they're more readable and they don't add empty lines. - // Also prefer folding a super-long line. - if (!hasLineBreak && !hasFoldableLine) { - // Strings interpretable as another type have to be quoted; - // e.g. the string 'true' vs. the boolean true. - if (plain && !forceQuotes && !testAmbiguousType(string)) { - return STYLE_PLAIN; - } - return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE; - } - // Edge case: block indentation indicator can only have one digit. - if (indentPerLevel > 9 && needIndentIndicator(string)) { - return STYLE_DOUBLE; - } - // At this point we know block styles are valid. - // Prefer literal style unless we want to fold. - if (!forceQuotes) { - return hasFoldableLine ? STYLE_FOLDED : STYLE_LITERAL; - } - return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE; -} - -// Note: line breaking/folding is implemented for only the folded style. -// NB. We drop the last trailing newline (if any) of a returned block scalar -// since the dumper adds its own newline. This always works: -// • No ending newline => unaffected; already using strip "-" chomping. -// • Ending newline => removed then restored. -// Importantly, this keeps the "+" chomp indicator from gaining an extra line. -function writeScalar(state, string, level, iskey, inblock) { - state.dump = (function () { - if (string.length === 0) { - return state.quotingType === QUOTING_TYPE_DOUBLE ? '""' : "''"; - } - if (!state.noCompatMode) { - if (DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1 || DEPRECATED_BASE60_SYNTAX.test(string)) { - return state.quotingType === QUOTING_TYPE_DOUBLE ? ('"' + string + '"') : ("'" + string + "'"); - } - } - - var indent = state.indent * Math.max(1, level); // no 0-indent scalars - // As indentation gets deeper, let the width decrease monotonically - // to the lower bound min(state.lineWidth, 40). - // Note that this implies - // state.lineWidth ≤ 40 + state.indent: width is fixed at the lower bound. - // state.lineWidth > 40 + state.indent: width decreases until the lower bound. - // This behaves better than a constant minimum width which disallows narrower options, - // or an indent threshold which causes the width to suddenly increase. - var lineWidth = state.lineWidth === -1 - ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent); - - // Without knowing if keys are implicit/explicit, assume implicit for safety. - var singleLineOnly = iskey - // No block styles in flow mode. - || (state.flowLevel > -1 && level >= state.flowLevel); - function testAmbiguity(string) { - return testImplicitResolving(state, string); - } - - switch (chooseScalarStyle(string, singleLineOnly, state.indent, lineWidth, - testAmbiguity, state.quotingType, state.forceQuotes && !iskey, inblock)) { - - case STYLE_PLAIN: - return string; - case STYLE_SINGLE: - return "'" + string.replace(/'/g, "''") + "'"; - case STYLE_LITERAL: - return '|' + blockHeader(string, state.indent) - + dropEndingNewline(indentString(string, indent)); - case STYLE_FOLDED: - return '>' + blockHeader(string, state.indent) - + dropEndingNewline(indentString(foldString(string, lineWidth), indent)); - case STYLE_DOUBLE: - return '"' + escapeString(string, lineWidth) + '"'; - default: - throw new YAMLException('impossible error: invalid scalar style'); - } - }()); -} - -// Pre-conditions: string is valid for a block scalar, 1 <= indentPerLevel <= 9. -function blockHeader(string, indentPerLevel) { - var indentIndicator = needIndentIndicator(string) ? String(indentPerLevel) : ''; - - // note the special case: the string '\n' counts as a "trailing" empty line. - var clip = string[string.length - 1] === '\n'; - var keep = clip && (string[string.length - 2] === '\n' || string === '\n'); - var chomp = keep ? '+' : (clip ? '' : '-'); - - return indentIndicator + chomp + '\n'; -} - -// (See the note for writeScalar.) -function dropEndingNewline(string) { - return string[string.length - 1] === '\n' ? string.slice(0, -1) : string; -} - -// Note: a long line without a suitable break point will exceed the width limit. -// Pre-conditions: every char in str isPrintable, str.length > 0, width > 0. -function foldString(string, width) { - // In folded style, $k$ consecutive newlines output as $k+1$ newlines— - // unless they're before or after a more-indented line, or at the very - // beginning or end, in which case $k$ maps to $k$. - // Therefore, parse each chunk as newline(s) followed by a content line. - var lineRe = /(\n+)([^\n]*)/g; - - // first line (possibly an empty line) - var result = (function () { - var nextLF = string.indexOf('\n'); - nextLF = nextLF !== -1 ? nextLF : string.length; - lineRe.lastIndex = nextLF; - return foldLine(string.slice(0, nextLF), width); - }()); - // If we haven't reached the first content line yet, don't add an extra \n. - var prevMoreIndented = string[0] === '\n' || string[0] === ' '; - var moreIndented; - - // rest of the lines - var match; - while ((match = lineRe.exec(string))) { - var prefix = match[1], line = match[2]; - moreIndented = (line[0] === ' '); - result += prefix - + (!prevMoreIndented && !moreIndented && line !== '' - ? '\n' : '') - + foldLine(line, width); - prevMoreIndented = moreIndented; - } - - return result; -} - -// Greedy line breaking. -// Picks the longest line under the limit each time, -// otherwise settles for the shortest line over the limit. -// NB. More-indented lines *cannot* be folded, as that would add an extra \n. -function foldLine(line, width) { - if (line === '' || line[0] === ' ') return line; - - // Since a more-indented line adds a \n, breaks can't be followed by a space. - var breakRe = / [^ ]/g; // note: the match index will always be <= length-2. - var match; - // start is an inclusive index. end, curr, and next are exclusive. - var start = 0, end, curr = 0, next = 0; - var result = ''; - - // Invariants: 0 <= start <= length-1. - // 0 <= curr <= next <= max(0, length-2). curr - start <= width. - // Inside the loop: - // A match implies length >= 2, so curr and next are <= length-2. - while ((match = breakRe.exec(line))) { - next = match.index; - // maintain invariant: curr - start <= width - if (next - start > width) { - end = (curr > start) ? curr : next; // derive end <= length-2 - result += '\n' + line.slice(start, end); - // skip the space that was output as \n - start = end + 1; // derive start <= length-1 - } - curr = next; - } - - // By the invariants, start <= length-1, so there is something left over. - // It is either the whole string or a part starting from non-whitespace. - result += '\n'; - // Insert a break if the remainder is too long and there is a break available. - if (line.length - start > width && curr > start) { - result += line.slice(start, curr) + '\n' + line.slice(curr + 1); - } else { - result += line.slice(start); - } - - return result.slice(1); // drop extra \n joiner -} - -// Escapes a double-quoted string. -function escapeString(string) { - var result = ''; - var char = 0; - var escapeSeq; - - for (var i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) { - char = codePointAt(string, i); - escapeSeq = ESCAPE_SEQUENCES[char]; - - if (!escapeSeq && isPrintable(char)) { - result += string[i]; - if (char >= 0x10000) result += string[i + 1]; - } else { - result += escapeSeq || encodeHex(char); - } - } - - return result; -} - -function writeFlowSequence(state, level, object) { - var _result = '', - _tag = state.tag, - index, - length, - value; - - for (index = 0, length = object.length; index < length; index += 1) { - value = object[index]; - - if (state.replacer) { - value = state.replacer.call(object, String(index), value); - } - - // Write only valid elements, put null instead of invalid elements. - if (writeNode(state, level, value, false, false) || - (typeof value === 'undefined' && - writeNode(state, level, null, false, false))) { - - if (_result !== '') _result += ',' + (!state.condenseFlow ? ' ' : ''); - _result += state.dump; - } - } - - state.tag = _tag; - state.dump = '[' + _result + ']'; -} - -function writeBlockSequence(state, level, object, compact) { - var _result = '', - _tag = state.tag, - index, - length, - value; - - for (index = 0, length = object.length; index < length; index += 1) { - value = object[index]; - - if (state.replacer) { - value = state.replacer.call(object, String(index), value); - } - - // Write only valid elements, put null instead of invalid elements. - if (writeNode(state, level + 1, value, true, true, false, true) || - (typeof value === 'undefined' && - writeNode(state, level + 1, null, true, true, false, true))) { - - if (!compact || _result !== '') { - _result += generateNextLine(state, level); - } - - if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { - _result += '-'; - } else { - _result += '- '; - } - - _result += state.dump; - } - } - - state.tag = _tag; - state.dump = _result || '[]'; // Empty sequence if no valid values. -} - -function writeFlowMapping(state, level, object) { - var _result = '', - _tag = state.tag, - objectKeyList = Object.keys(object), - index, - length, - objectKey, - objectValue, - pairBuffer; - - for (index = 0, length = objectKeyList.length; index < length; index += 1) { - - pairBuffer = ''; - if (_result !== '') pairBuffer += ', '; - - if (state.condenseFlow) pairBuffer += '"'; - - objectKey = objectKeyList[index]; - objectValue = object[objectKey]; - - if (state.replacer) { - objectValue = state.replacer.call(object, objectKey, objectValue); - } - - if (!writeNode(state, level, objectKey, false, false)) { - continue; // Skip this pair because of invalid key; - } - - if (state.dump.length > 1024) pairBuffer += '? '; - - pairBuffer += state.dump + (state.condenseFlow ? '"' : '') + ':' + (state.condenseFlow ? '' : ' '); - - if (!writeNode(state, level, objectValue, false, false)) { - continue; // Skip this pair because of invalid value. - } - - pairBuffer += state.dump; - - // Both key and value are valid. - _result += pairBuffer; - } - - state.tag = _tag; - state.dump = '{' + _result + '}'; -} - -function writeBlockMapping(state, level, object, compact) { - var _result = '', - _tag = state.tag, - objectKeyList = Object.keys(object), - index, - length, - objectKey, - objectValue, - explicitPair, - pairBuffer; - - // Allow sorting keys so that the output file is deterministic - if (state.sortKeys === true) { - // Default sorting - objectKeyList.sort(); - } else if (typeof state.sortKeys === 'function') { - // Custom sort function - objectKeyList.sort(state.sortKeys); - } else if (state.sortKeys) { - // Something is wrong - throw new YAMLException('sortKeys must be a boolean or a function'); - } - - for (index = 0, length = objectKeyList.length; index < length; index += 1) { - pairBuffer = ''; - - if (!compact || _result !== '') { - pairBuffer += generateNextLine(state, level); - } - - objectKey = objectKeyList[index]; - objectValue = object[objectKey]; - - if (state.replacer) { - objectValue = state.replacer.call(object, objectKey, objectValue); - } - - if (!writeNode(state, level + 1, objectKey, true, true, true)) { - continue; // Skip this pair because of invalid key. - } - - explicitPair = (state.tag !== null && state.tag !== '?') || - (state.dump && state.dump.length > 1024); - - if (explicitPair) { - if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { - pairBuffer += '?'; - } else { - pairBuffer += '? '; - } - } - - pairBuffer += state.dump; - - if (explicitPair) { - pairBuffer += generateNextLine(state, level); - } - - if (!writeNode(state, level + 1, objectValue, true, explicitPair)) { - continue; // Skip this pair because of invalid value. - } - - if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { - pairBuffer += ':'; - } else { - pairBuffer += ': '; - } - - pairBuffer += state.dump; - - // Both key and value are valid. - _result += pairBuffer; - } - - state.tag = _tag; - state.dump = _result || '{}'; // Empty mapping if no valid pairs. -} - -function detectType(state, object, explicit) { - var _result, typeList, index, length, type, style; - - typeList = explicit ? state.explicitTypes : state.implicitTypes; - - for (index = 0, length = typeList.length; index < length; index += 1) { - type = typeList[index]; - - if ((type.instanceOf || type.predicate) && - (!type.instanceOf || ((typeof object === 'object') && (object instanceof type.instanceOf))) && - (!type.predicate || type.predicate(object))) { - - if (explicit) { - if (type.multi && type.representName) { - state.tag = type.representName(object); - } else { - state.tag = type.tag; - } - } else { - state.tag = '?'; - } - - if (type.represent) { - style = state.styleMap[type.tag] || type.defaultStyle; - - if (_toString.call(type.represent) === '[object Function]') { - _result = type.represent(object, style); - } else if (_hasOwnProperty.call(type.represent, style)) { - _result = type.represent[style](object, style); - } else { - throw new YAMLException('!<' + type.tag + '> tag resolver accepts not "' + style + '" style'); - } - - state.dump = _result; - } - - return true; - } - } - - return false; -} - -// Serializes `object` and writes it to global `result`. -// Returns true on success, or false on invalid object. -// -function writeNode(state, level, object, block, compact, iskey, isblockseq) { - state.tag = null; - state.dump = object; - - if (!detectType(state, object, false)) { - detectType(state, object, true); - } - - var type = _toString.call(state.dump); - var inblock = block; - var tagStr; - - if (block) { - block = (state.flowLevel < 0 || state.flowLevel > level); - } - - var objectOrArray = type === '[object Object]' || type === '[object Array]', - duplicateIndex, - duplicate; - - if (objectOrArray) { - duplicateIndex = state.duplicates.indexOf(object); - duplicate = duplicateIndex !== -1; - } - - if ((state.tag !== null && state.tag !== '?') || duplicate || (state.indent !== 2 && level > 0)) { - compact = false; - } - - if (duplicate && state.usedDuplicates[duplicateIndex]) { - state.dump = '*ref_' + duplicateIndex; - } else { - if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) { - state.usedDuplicates[duplicateIndex] = true; - } - if (type === '[object Object]') { - if (block && (Object.keys(state.dump).length !== 0)) { - writeBlockMapping(state, level, state.dump, compact); - if (duplicate) { - state.dump = '&ref_' + duplicateIndex + state.dump; - } - } else { - writeFlowMapping(state, level, state.dump); - if (duplicate) { - state.dump = '&ref_' + duplicateIndex + ' ' + state.dump; - } - } - } else if (type === '[object Array]') { - if (block && (state.dump.length !== 0)) { - if (state.noArrayIndent && !isblockseq && level > 0) { - writeBlockSequence(state, level - 1, state.dump, compact); - } else { - writeBlockSequence(state, level, state.dump, compact); - } - if (duplicate) { - state.dump = '&ref_' + duplicateIndex + state.dump; - } - } else { - writeFlowSequence(state, level, state.dump); - if (duplicate) { - state.dump = '&ref_' + duplicateIndex + ' ' + state.dump; - } - } - } else if (type === '[object String]') { - if (state.tag !== '?') { - writeScalar(state, state.dump, level, iskey, inblock); - } - } else if (type === '[object Undefined]') { - return false; - } else { - if (state.skipInvalid) return false; - throw new YAMLException('unacceptable kind of an object to dump ' + type); - } - - if (state.tag !== null && state.tag !== '?') { - // Need to encode all characters except those allowed by the spec: - // - // [35] ns-dec-digit ::= [#x30-#x39] /* 0-9 */ - // [36] ns-hex-digit ::= ns-dec-digit - // | [#x41-#x46] /* A-F */ | [#x61-#x66] /* a-f */ - // [37] ns-ascii-letter ::= [#x41-#x5A] /* A-Z */ | [#x61-#x7A] /* a-z */ - // [38] ns-word-char ::= ns-dec-digit | ns-ascii-letter | “-” - // [39] ns-uri-char ::= “%” ns-hex-digit ns-hex-digit | ns-word-char | “#” - // | “;” | “/” | “?” | “:” | “@” | “&” | “=” | “+” | “$” | “,” - // | “_” | “.” | “!” | “~” | “*” | “'” | “(” | “)” | “[” | “]” - // - // Also need to encode '!' because it has special meaning (end of tag prefix). - // - tagStr = encodeURI( - state.tag[0] === '!' ? state.tag.slice(1) : state.tag - ).replace(/!/g, '%21'); - - if (state.tag[0] === '!') { - tagStr = '!' + tagStr; - } else if (tagStr.slice(0, 18) === 'tag:yaml.org,2002:') { - tagStr = '!!' + tagStr.slice(18); - } else { - tagStr = '!<' + tagStr + '>'; - } - - state.dump = tagStr + ' ' + state.dump; - } - } - - return true; -} - -function getDuplicateReferences(object, state) { - var objects = [], - duplicatesIndexes = [], - index, - length; - - inspectNode(object, objects, duplicatesIndexes); - - for (index = 0, length = duplicatesIndexes.length; index < length; index += 1) { - state.duplicates.push(objects[duplicatesIndexes[index]]); - } - state.usedDuplicates = new Array(length); -} - -function inspectNode(object, objects, duplicatesIndexes) { - var objectKeyList, - index, - length; - - if (object !== null && typeof object === 'object') { - index = objects.indexOf(object); - if (index !== -1) { - if (duplicatesIndexes.indexOf(index) === -1) { - duplicatesIndexes.push(index); - } - } else { - objects.push(object); - - if (Array.isArray(object)) { - for (index = 0, length = object.length; index < length; index += 1) { - inspectNode(object[index], objects, duplicatesIndexes); - } - } else { - objectKeyList = Object.keys(object); - - for (index = 0, length = objectKeyList.length; index < length; index += 1) { - inspectNode(object[objectKeyList[index]], objects, duplicatesIndexes); - } - } - } - } -} - -function dump(input, options) { - options = options || {}; - - var state = new State(options); - - if (!state.noRefs) getDuplicateReferences(input, state); - - var value = input; - - if (state.replacer) { - value = state.replacer.call({ '': value }, '', value); - } - - if (writeNode(state, 0, value, true, true)) return state.dump + '\n'; - - return ''; -} - -module.exports.dump = dump; diff --git a/node_modules/js-yaml/lib/exception.js b/node_modules/js-yaml/lib/exception.js deleted file mode 100644 index 7f62daae..00000000 --- a/node_modules/js-yaml/lib/exception.js +++ /dev/null @@ -1,55 +0,0 @@ -// YAML error class. http://stackoverflow.com/questions/8458984 -// -'use strict'; - - -function formatError(exception, compact) { - var where = '', message = exception.reason || '(unknown reason)'; - - if (!exception.mark) return message; - - if (exception.mark.name) { - where += 'in "' + exception.mark.name + '" '; - } - - where += '(' + (exception.mark.line + 1) + ':' + (exception.mark.column + 1) + ')'; - - if (!compact && exception.mark.snippet) { - where += '\n\n' + exception.mark.snippet; - } - - return message + ' ' + where; -} - - -function YAMLException(reason, mark) { - // Super constructor - Error.call(this); - - this.name = 'YAMLException'; - this.reason = reason; - this.mark = mark; - this.message = formatError(this, false); - - // Include stack trace in error object - if (Error.captureStackTrace) { - // Chrome and NodeJS - Error.captureStackTrace(this, this.constructor); - } else { - // FF, IE 10+ and Safari 6+. Fallback for others - this.stack = (new Error()).stack || ''; - } -} - - -// Inherit from Error -YAMLException.prototype = Object.create(Error.prototype); -YAMLException.prototype.constructor = YAMLException; - - -YAMLException.prototype.toString = function toString(compact) { - return this.name + ': ' + formatError(this, compact); -}; - - -module.exports = YAMLException; diff --git a/node_modules/js-yaml/lib/loader.js b/node_modules/js-yaml/lib/loader.js deleted file mode 100644 index 39f13f56..00000000 --- a/node_modules/js-yaml/lib/loader.js +++ /dev/null @@ -1,1727 +0,0 @@ -'use strict'; - -/*eslint-disable max-len,no-use-before-define*/ - -var common = require('./common'); -var YAMLException = require('./exception'); -var makeSnippet = require('./snippet'); -var DEFAULT_SCHEMA = require('./schema/default'); - - -var _hasOwnProperty = Object.prototype.hasOwnProperty; - - -var CONTEXT_FLOW_IN = 1; -var CONTEXT_FLOW_OUT = 2; -var CONTEXT_BLOCK_IN = 3; -var CONTEXT_BLOCK_OUT = 4; - - -var CHOMPING_CLIP = 1; -var CHOMPING_STRIP = 2; -var CHOMPING_KEEP = 3; - - -var PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; -var PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/; -var PATTERN_FLOW_INDICATORS = /[,\[\]\{\}]/; -var PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\-]+!)$/i; -var PATTERN_TAG_URI = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i; - - -function _class(obj) { return Object.prototype.toString.call(obj); } - -function is_EOL(c) { - return (c === 0x0A/* LF */) || (c === 0x0D/* CR */); -} - -function is_WHITE_SPACE(c) { - return (c === 0x09/* Tab */) || (c === 0x20/* Space */); -} - -function is_WS_OR_EOL(c) { - return (c === 0x09/* Tab */) || - (c === 0x20/* Space */) || - (c === 0x0A/* LF */) || - (c === 0x0D/* CR */); -} - -function is_FLOW_INDICATOR(c) { - return c === 0x2C/* , */ || - c === 0x5B/* [ */ || - c === 0x5D/* ] */ || - c === 0x7B/* { */ || - c === 0x7D/* } */; -} - -function fromHexCode(c) { - var lc; - - if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) { - return c - 0x30; - } - - /*eslint-disable no-bitwise*/ - lc = c | 0x20; - - if ((0x61/* a */ <= lc) && (lc <= 0x66/* f */)) { - return lc - 0x61 + 10; - } - - return -1; -} - -function escapedHexLen(c) { - if (c === 0x78/* x */) { return 2; } - if (c === 0x75/* u */) { return 4; } - if (c === 0x55/* U */) { return 8; } - return 0; -} - -function fromDecimalCode(c) { - if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) { - return c - 0x30; - } - - return -1; -} - -function simpleEscapeSequence(c) { - /* eslint-disable indent */ - return (c === 0x30/* 0 */) ? '\x00' : - (c === 0x61/* a */) ? '\x07' : - (c === 0x62/* b */) ? '\x08' : - (c === 0x74/* t */) ? '\x09' : - (c === 0x09/* Tab */) ? '\x09' : - (c === 0x6E/* n */) ? '\x0A' : - (c === 0x76/* v */) ? '\x0B' : - (c === 0x66/* f */) ? '\x0C' : - (c === 0x72/* r */) ? '\x0D' : - (c === 0x65/* e */) ? '\x1B' : - (c === 0x20/* Space */) ? ' ' : - (c === 0x22/* " */) ? '\x22' : - (c === 0x2F/* / */) ? '/' : - (c === 0x5C/* \ */) ? '\x5C' : - (c === 0x4E/* N */) ? '\x85' : - (c === 0x5F/* _ */) ? '\xA0' : - (c === 0x4C/* L */) ? '\u2028' : - (c === 0x50/* P */) ? '\u2029' : ''; -} - -function charFromCodepoint(c) { - if (c <= 0xFFFF) { - return String.fromCharCode(c); - } - // Encode UTF-16 surrogate pair - // https://en.wikipedia.org/wiki/UTF-16#Code_points_U.2B010000_to_U.2B10FFFF - return String.fromCharCode( - ((c - 0x010000) >> 10) + 0xD800, - ((c - 0x010000) & 0x03FF) + 0xDC00 - ); -} - -var simpleEscapeCheck = new Array(256); // integer, for fast access -var simpleEscapeMap = new Array(256); -for (var i = 0; i < 256; i++) { - simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0; - simpleEscapeMap[i] = simpleEscapeSequence(i); -} - - -function State(input, options) { - this.input = input; - - this.filename = options['filename'] || null; - this.schema = options['schema'] || DEFAULT_SCHEMA; - this.onWarning = options['onWarning'] || null; - // (Hidden) Remove? makes the loader to expect YAML 1.1 documents - // if such documents have no explicit %YAML directive - this.legacy = options['legacy'] || false; - - this.json = options['json'] || false; - this.listener = options['listener'] || null; - - this.implicitTypes = this.schema.compiledImplicit; - this.typeMap = this.schema.compiledTypeMap; - - this.length = input.length; - this.position = 0; - this.line = 0; - this.lineStart = 0; - this.lineIndent = 0; - - // position of first leading tab in the current line, - // used to make sure there are no tabs in the indentation - this.firstTabInLine = -1; - - this.documents = []; - - /* - this.version; - this.checkLineBreaks; - this.tagMap; - this.anchorMap; - this.tag; - this.anchor; - this.kind; - this.result;*/ - -} - - -function generateError(state, message) { - var mark = { - name: state.filename, - buffer: state.input.slice(0, -1), // omit trailing \0 - position: state.position, - line: state.line, - column: state.position - state.lineStart - }; - - mark.snippet = makeSnippet(mark); - - return new YAMLException(message, mark); -} - -function throwError(state, message) { - throw generateError(state, message); -} - -function throwWarning(state, message) { - if (state.onWarning) { - state.onWarning.call(null, generateError(state, message)); - } -} - - -var directiveHandlers = { - - YAML: function handleYamlDirective(state, name, args) { - - var match, major, minor; - - if (state.version !== null) { - throwError(state, 'duplication of %YAML directive'); - } - - if (args.length !== 1) { - throwError(state, 'YAML directive accepts exactly one argument'); - } - - match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]); - - if (match === null) { - throwError(state, 'ill-formed argument of the YAML directive'); - } - - major = parseInt(match[1], 10); - minor = parseInt(match[2], 10); - - if (major !== 1) { - throwError(state, 'unacceptable YAML version of the document'); - } - - state.version = args[0]; - state.checkLineBreaks = (minor < 2); - - if (minor !== 1 && minor !== 2) { - throwWarning(state, 'unsupported YAML version of the document'); - } - }, - - TAG: function handleTagDirective(state, name, args) { - - var handle, prefix; - - if (args.length !== 2) { - throwError(state, 'TAG directive accepts exactly two arguments'); - } - - handle = args[0]; - prefix = args[1]; - - if (!PATTERN_TAG_HANDLE.test(handle)) { - throwError(state, 'ill-formed tag handle (first argument) of the TAG directive'); - } - - if (_hasOwnProperty.call(state.tagMap, handle)) { - throwError(state, 'there is a previously declared suffix for "' + handle + '" tag handle'); - } - - if (!PATTERN_TAG_URI.test(prefix)) { - throwError(state, 'ill-formed tag prefix (second argument) of the TAG directive'); - } - - try { - prefix = decodeURIComponent(prefix); - } catch (err) { - throwError(state, 'tag prefix is malformed: ' + prefix); - } - - state.tagMap[handle] = prefix; - } -}; - - -function captureSegment(state, start, end, checkJson) { - var _position, _length, _character, _result; - - if (start < end) { - _result = state.input.slice(start, end); - - if (checkJson) { - for (_position = 0, _length = _result.length; _position < _length; _position += 1) { - _character = _result.charCodeAt(_position); - if (!(_character === 0x09 || - (0x20 <= _character && _character <= 0x10FFFF))) { - throwError(state, 'expected valid JSON character'); - } - } - } else if (PATTERN_NON_PRINTABLE.test(_result)) { - throwError(state, 'the stream contains non-printable characters'); - } - - state.result += _result; - } -} - -function mergeMappings(state, destination, source, overridableKeys) { - var sourceKeys, key, index, quantity; - - if (!common.isObject(source)) { - throwError(state, 'cannot merge mappings; the provided source object is unacceptable'); - } - - sourceKeys = Object.keys(source); - - for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) { - key = sourceKeys[index]; - - if (!_hasOwnProperty.call(destination, key)) { - destination[key] = source[key]; - overridableKeys[key] = true; - } - } -} - -function storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, - startLine, startLineStart, startPos) { - - var index, quantity; - - // The output is a plain object here, so keys can only be strings. - // We need to convert keyNode to a string, but doing so can hang the process - // (deeply nested arrays that explode exponentially using aliases). - if (Array.isArray(keyNode)) { - keyNode = Array.prototype.slice.call(keyNode); - - for (index = 0, quantity = keyNode.length; index < quantity; index += 1) { - if (Array.isArray(keyNode[index])) { - throwError(state, 'nested arrays are not supported inside keys'); - } - - if (typeof keyNode === 'object' && _class(keyNode[index]) === '[object Object]') { - keyNode[index] = '[object Object]'; - } - } - } - - // Avoid code execution in load() via toString property - // (still use its own toString for arrays, timestamps, - // and whatever user schema extensions happen to have @@toStringTag) - if (typeof keyNode === 'object' && _class(keyNode) === '[object Object]') { - keyNode = '[object Object]'; - } - - - keyNode = String(keyNode); - - if (_result === null) { - _result = {}; - } - - if (keyTag === 'tag:yaml.org,2002:merge') { - if (Array.isArray(valueNode)) { - for (index = 0, quantity = valueNode.length; index < quantity; index += 1) { - mergeMappings(state, _result, valueNode[index], overridableKeys); - } - } else { - mergeMappings(state, _result, valueNode, overridableKeys); - } - } else { - if (!state.json && - !_hasOwnProperty.call(overridableKeys, keyNode) && - _hasOwnProperty.call(_result, keyNode)) { - state.line = startLine || state.line; - state.lineStart = startLineStart || state.lineStart; - state.position = startPos || state.position; - throwError(state, 'duplicated mapping key'); - } - - // used for this specific key only because Object.defineProperty is slow - if (keyNode === '__proto__') { - Object.defineProperty(_result, keyNode, { - configurable: true, - enumerable: true, - writable: true, - value: valueNode - }); - } else { - _result[keyNode] = valueNode; - } - delete overridableKeys[keyNode]; - } - - return _result; -} - -function readLineBreak(state) { - var ch; - - ch = state.input.charCodeAt(state.position); - - if (ch === 0x0A/* LF */) { - state.position++; - } else if (ch === 0x0D/* CR */) { - state.position++; - if (state.input.charCodeAt(state.position) === 0x0A/* LF */) { - state.position++; - } - } else { - throwError(state, 'a line break is expected'); - } - - state.line += 1; - state.lineStart = state.position; - state.firstTabInLine = -1; -} - -function skipSeparationSpace(state, allowComments, checkIndent) { - var lineBreaks = 0, - ch = state.input.charCodeAt(state.position); - - while (ch !== 0) { - while (is_WHITE_SPACE(ch)) { - if (ch === 0x09/* Tab */ && state.firstTabInLine === -1) { - state.firstTabInLine = state.position; - } - ch = state.input.charCodeAt(++state.position); - } - - if (allowComments && ch === 0x23/* # */) { - do { - ch = state.input.charCodeAt(++state.position); - } while (ch !== 0x0A/* LF */ && ch !== 0x0D/* CR */ && ch !== 0); - } - - if (is_EOL(ch)) { - readLineBreak(state); - - ch = state.input.charCodeAt(state.position); - lineBreaks++; - state.lineIndent = 0; - - while (ch === 0x20/* Space */) { - state.lineIndent++; - ch = state.input.charCodeAt(++state.position); - } - } else { - break; - } - } - - if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) { - throwWarning(state, 'deficient indentation'); - } - - return lineBreaks; -} - -function testDocumentSeparator(state) { - var _position = state.position, - ch; - - ch = state.input.charCodeAt(_position); - - // Condition state.position === state.lineStart is tested - // in parent on each call, for efficiency. No needs to test here again. - if ((ch === 0x2D/* - */ || ch === 0x2E/* . */) && - ch === state.input.charCodeAt(_position + 1) && - ch === state.input.charCodeAt(_position + 2)) { - - _position += 3; - - ch = state.input.charCodeAt(_position); - - if (ch === 0 || is_WS_OR_EOL(ch)) { - return true; - } - } - - return false; -} - -function writeFoldedLines(state, count) { - if (count === 1) { - state.result += ' '; - } else if (count > 1) { - state.result += common.repeat('\n', count - 1); - } -} - - -function readPlainScalar(state, nodeIndent, withinFlowCollection) { - var preceding, - following, - captureStart, - captureEnd, - hasPendingContent, - _line, - _lineStart, - _lineIndent, - _kind = state.kind, - _result = state.result, - ch; - - ch = state.input.charCodeAt(state.position); - - if (is_WS_OR_EOL(ch) || - is_FLOW_INDICATOR(ch) || - ch === 0x23/* # */ || - ch === 0x26/* & */ || - ch === 0x2A/* * */ || - ch === 0x21/* ! */ || - ch === 0x7C/* | */ || - ch === 0x3E/* > */ || - ch === 0x27/* ' */ || - ch === 0x22/* " */ || - ch === 0x25/* % */ || - ch === 0x40/* @ */ || - ch === 0x60/* ` */) { - return false; - } - - if (ch === 0x3F/* ? */ || ch === 0x2D/* - */) { - following = state.input.charCodeAt(state.position + 1); - - if (is_WS_OR_EOL(following) || - withinFlowCollection && is_FLOW_INDICATOR(following)) { - return false; - } - } - - state.kind = 'scalar'; - state.result = ''; - captureStart = captureEnd = state.position; - hasPendingContent = false; - - while (ch !== 0) { - if (ch === 0x3A/* : */) { - following = state.input.charCodeAt(state.position + 1); - - if (is_WS_OR_EOL(following) || - withinFlowCollection && is_FLOW_INDICATOR(following)) { - break; - } - - } else if (ch === 0x23/* # */) { - preceding = state.input.charCodeAt(state.position - 1); - - if (is_WS_OR_EOL(preceding)) { - break; - } - - } else if ((state.position === state.lineStart && testDocumentSeparator(state)) || - withinFlowCollection && is_FLOW_INDICATOR(ch)) { - break; - - } else if (is_EOL(ch)) { - _line = state.line; - _lineStart = state.lineStart; - _lineIndent = state.lineIndent; - skipSeparationSpace(state, false, -1); - - if (state.lineIndent >= nodeIndent) { - hasPendingContent = true; - ch = state.input.charCodeAt(state.position); - continue; - } else { - state.position = captureEnd; - state.line = _line; - state.lineStart = _lineStart; - state.lineIndent = _lineIndent; - break; - } - } - - if (hasPendingContent) { - captureSegment(state, captureStart, captureEnd, false); - writeFoldedLines(state, state.line - _line); - captureStart = captureEnd = state.position; - hasPendingContent = false; - } - - if (!is_WHITE_SPACE(ch)) { - captureEnd = state.position + 1; - } - - ch = state.input.charCodeAt(++state.position); - } - - captureSegment(state, captureStart, captureEnd, false); - - if (state.result) { - return true; - } - - state.kind = _kind; - state.result = _result; - return false; -} - -function readSingleQuotedScalar(state, nodeIndent) { - var ch, - captureStart, captureEnd; - - ch = state.input.charCodeAt(state.position); - - if (ch !== 0x27/* ' */) { - return false; - } - - state.kind = 'scalar'; - state.result = ''; - state.position++; - captureStart = captureEnd = state.position; - - while ((ch = state.input.charCodeAt(state.position)) !== 0) { - if (ch === 0x27/* ' */) { - captureSegment(state, captureStart, state.position, true); - ch = state.input.charCodeAt(++state.position); - - if (ch === 0x27/* ' */) { - captureStart = state.position; - state.position++; - captureEnd = state.position; - } else { - return true; - } - - } else if (is_EOL(ch)) { - captureSegment(state, captureStart, captureEnd, true); - writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); - captureStart = captureEnd = state.position; - - } else if (state.position === state.lineStart && testDocumentSeparator(state)) { - throwError(state, 'unexpected end of the document within a single quoted scalar'); - - } else { - state.position++; - captureEnd = state.position; - } - } - - throwError(state, 'unexpected end of the stream within a single quoted scalar'); -} - -function readDoubleQuotedScalar(state, nodeIndent) { - var captureStart, - captureEnd, - hexLength, - hexResult, - tmp, - ch; - - ch = state.input.charCodeAt(state.position); - - if (ch !== 0x22/* " */) { - return false; - } - - state.kind = 'scalar'; - state.result = ''; - state.position++; - captureStart = captureEnd = state.position; - - while ((ch = state.input.charCodeAt(state.position)) !== 0) { - if (ch === 0x22/* " */) { - captureSegment(state, captureStart, state.position, true); - state.position++; - return true; - - } else if (ch === 0x5C/* \ */) { - captureSegment(state, captureStart, state.position, true); - ch = state.input.charCodeAt(++state.position); - - if (is_EOL(ch)) { - skipSeparationSpace(state, false, nodeIndent); - - // TODO: rework to inline fn with no type cast? - } else if (ch < 256 && simpleEscapeCheck[ch]) { - state.result += simpleEscapeMap[ch]; - state.position++; - - } else if ((tmp = escapedHexLen(ch)) > 0) { - hexLength = tmp; - hexResult = 0; - - for (; hexLength > 0; hexLength--) { - ch = state.input.charCodeAt(++state.position); - - if ((tmp = fromHexCode(ch)) >= 0) { - hexResult = (hexResult << 4) + tmp; - - } else { - throwError(state, 'expected hexadecimal character'); - } - } - - state.result += charFromCodepoint(hexResult); - - state.position++; - - } else { - throwError(state, 'unknown escape sequence'); - } - - captureStart = captureEnd = state.position; - - } else if (is_EOL(ch)) { - captureSegment(state, captureStart, captureEnd, true); - writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); - captureStart = captureEnd = state.position; - - } else if (state.position === state.lineStart && testDocumentSeparator(state)) { - throwError(state, 'unexpected end of the document within a double quoted scalar'); - - } else { - state.position++; - captureEnd = state.position; - } - } - - throwError(state, 'unexpected end of the stream within a double quoted scalar'); -} - -function readFlowCollection(state, nodeIndent) { - var readNext = true, - _line, - _lineStart, - _pos, - _tag = state.tag, - _result, - _anchor = state.anchor, - following, - terminator, - isPair, - isExplicitPair, - isMapping, - overridableKeys = Object.create(null), - keyNode, - keyTag, - valueNode, - ch; - - ch = state.input.charCodeAt(state.position); - - if (ch === 0x5B/* [ */) { - terminator = 0x5D;/* ] */ - isMapping = false; - _result = []; - } else if (ch === 0x7B/* { */) { - terminator = 0x7D;/* } */ - isMapping = true; - _result = {}; - } else { - return false; - } - - if (state.anchor !== null) { - state.anchorMap[state.anchor] = _result; - } - - ch = state.input.charCodeAt(++state.position); - - while (ch !== 0) { - skipSeparationSpace(state, true, nodeIndent); - - ch = state.input.charCodeAt(state.position); - - if (ch === terminator) { - state.position++; - state.tag = _tag; - state.anchor = _anchor; - state.kind = isMapping ? 'mapping' : 'sequence'; - state.result = _result; - return true; - } else if (!readNext) { - throwError(state, 'missed comma between flow collection entries'); - } else if (ch === 0x2C/* , */) { - // "flow collection entries can never be completely empty", as per YAML 1.2, section 7.4 - throwError(state, "expected the node content, but found ','"); - } - - keyTag = keyNode = valueNode = null; - isPair = isExplicitPair = false; - - if (ch === 0x3F/* ? */) { - following = state.input.charCodeAt(state.position + 1); - - if (is_WS_OR_EOL(following)) { - isPair = isExplicitPair = true; - state.position++; - skipSeparationSpace(state, true, nodeIndent); - } - } - - _line = state.line; // Save the current line. - _lineStart = state.lineStart; - _pos = state.position; - composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); - keyTag = state.tag; - keyNode = state.result; - skipSeparationSpace(state, true, nodeIndent); - - ch = state.input.charCodeAt(state.position); - - if ((isExplicitPair || state.line === _line) && ch === 0x3A/* : */) { - isPair = true; - ch = state.input.charCodeAt(++state.position); - skipSeparationSpace(state, true, nodeIndent); - composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); - valueNode = state.result; - } - - if (isMapping) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos); - } else if (isPair) { - _result.push(storeMappingPair(state, null, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos)); - } else { - _result.push(keyNode); - } - - skipSeparationSpace(state, true, nodeIndent); - - ch = state.input.charCodeAt(state.position); - - if (ch === 0x2C/* , */) { - readNext = true; - ch = state.input.charCodeAt(++state.position); - } else { - readNext = false; - } - } - - throwError(state, 'unexpected end of the stream within a flow collection'); -} - -function readBlockScalar(state, nodeIndent) { - var captureStart, - folding, - chomping = CHOMPING_CLIP, - didReadContent = false, - detectedIndent = false, - textIndent = nodeIndent, - emptyLines = 0, - atMoreIndented = false, - tmp, - ch; - - ch = state.input.charCodeAt(state.position); - - if (ch === 0x7C/* | */) { - folding = false; - } else if (ch === 0x3E/* > */) { - folding = true; - } else { - return false; - } - - state.kind = 'scalar'; - state.result = ''; - - while (ch !== 0) { - ch = state.input.charCodeAt(++state.position); - - if (ch === 0x2B/* + */ || ch === 0x2D/* - */) { - if (CHOMPING_CLIP === chomping) { - chomping = (ch === 0x2B/* + */) ? CHOMPING_KEEP : CHOMPING_STRIP; - } else { - throwError(state, 'repeat of a chomping mode identifier'); - } - - } else if ((tmp = fromDecimalCode(ch)) >= 0) { - if (tmp === 0) { - throwError(state, 'bad explicit indentation width of a block scalar; it cannot be less than one'); - } else if (!detectedIndent) { - textIndent = nodeIndent + tmp - 1; - detectedIndent = true; - } else { - throwError(state, 'repeat of an indentation width identifier'); - } - - } else { - break; - } - } - - if (is_WHITE_SPACE(ch)) { - do { ch = state.input.charCodeAt(++state.position); } - while (is_WHITE_SPACE(ch)); - - if (ch === 0x23/* # */) { - do { ch = state.input.charCodeAt(++state.position); } - while (!is_EOL(ch) && (ch !== 0)); - } - } - - while (ch !== 0) { - readLineBreak(state); - state.lineIndent = 0; - - ch = state.input.charCodeAt(state.position); - - while ((!detectedIndent || state.lineIndent < textIndent) && - (ch === 0x20/* Space */)) { - state.lineIndent++; - ch = state.input.charCodeAt(++state.position); - } - - if (!detectedIndent && state.lineIndent > textIndent) { - textIndent = state.lineIndent; - } - - if (is_EOL(ch)) { - emptyLines++; - continue; - } - - // End of the scalar. - if (state.lineIndent < textIndent) { - - // Perform the chomping. - if (chomping === CHOMPING_KEEP) { - state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); - } else if (chomping === CHOMPING_CLIP) { - if (didReadContent) { // i.e. only if the scalar is not empty. - state.result += '\n'; - } - } - - // Break this `while` cycle and go to the funciton's epilogue. - break; - } - - // Folded style: use fancy rules to handle line breaks. - if (folding) { - - // Lines starting with white space characters (more-indented lines) are not folded. - if (is_WHITE_SPACE(ch)) { - atMoreIndented = true; - // except for the first content line (cf. Example 8.1) - state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); - - // End of more-indented block. - } else if (atMoreIndented) { - atMoreIndented = false; - state.result += common.repeat('\n', emptyLines + 1); - - // Just one line break - perceive as the same line. - } else if (emptyLines === 0) { - if (didReadContent) { // i.e. only if we have already read some scalar content. - state.result += ' '; - } - - // Several line breaks - perceive as different lines. - } else { - state.result += common.repeat('\n', emptyLines); - } - - // Literal style: just add exact number of line breaks between content lines. - } else { - // Keep all line breaks except the header line break. - state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); - } - - didReadContent = true; - detectedIndent = true; - emptyLines = 0; - captureStart = state.position; - - while (!is_EOL(ch) && (ch !== 0)) { - ch = state.input.charCodeAt(++state.position); - } - - captureSegment(state, captureStart, state.position, false); - } - - return true; -} - -function readBlockSequence(state, nodeIndent) { - var _line, - _tag = state.tag, - _anchor = state.anchor, - _result = [], - following, - detected = false, - ch; - - // there is a leading tab before this token, so it can't be a block sequence/mapping; - // it can still be flow sequence/mapping or a scalar - if (state.firstTabInLine !== -1) return false; - - if (state.anchor !== null) { - state.anchorMap[state.anchor] = _result; - } - - ch = state.input.charCodeAt(state.position); - - while (ch !== 0) { - if (state.firstTabInLine !== -1) { - state.position = state.firstTabInLine; - throwError(state, 'tab characters must not be used in indentation'); - } - - if (ch !== 0x2D/* - */) { - break; - } - - following = state.input.charCodeAt(state.position + 1); - - if (!is_WS_OR_EOL(following)) { - break; - } - - detected = true; - state.position++; - - if (skipSeparationSpace(state, true, -1)) { - if (state.lineIndent <= nodeIndent) { - _result.push(null); - ch = state.input.charCodeAt(state.position); - continue; - } - } - - _line = state.line; - composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true); - _result.push(state.result); - skipSeparationSpace(state, true, -1); - - ch = state.input.charCodeAt(state.position); - - if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) { - throwError(state, 'bad indentation of a sequence entry'); - } else if (state.lineIndent < nodeIndent) { - break; - } - } - - if (detected) { - state.tag = _tag; - state.anchor = _anchor; - state.kind = 'sequence'; - state.result = _result; - return true; - } - return false; -} - -function readBlockMapping(state, nodeIndent, flowIndent) { - var following, - allowCompact, - _line, - _keyLine, - _keyLineStart, - _keyPos, - _tag = state.tag, - _anchor = state.anchor, - _result = {}, - overridableKeys = Object.create(null), - keyTag = null, - keyNode = null, - valueNode = null, - atExplicitKey = false, - detected = false, - ch; - - // there is a leading tab before this token, so it can't be a block sequence/mapping; - // it can still be flow sequence/mapping or a scalar - if (state.firstTabInLine !== -1) return false; - - if (state.anchor !== null) { - state.anchorMap[state.anchor] = _result; - } - - ch = state.input.charCodeAt(state.position); - - while (ch !== 0) { - if (!atExplicitKey && state.firstTabInLine !== -1) { - state.position = state.firstTabInLine; - throwError(state, 'tab characters must not be used in indentation'); - } - - following = state.input.charCodeAt(state.position + 1); - _line = state.line; // Save the current line. - - // - // Explicit notation case. There are two separate blocks: - // first for the key (denoted by "?") and second for the value (denoted by ":") - // - if ((ch === 0x3F/* ? */ || ch === 0x3A/* : */) && is_WS_OR_EOL(following)) { - - if (ch === 0x3F/* ? */) { - if (atExplicitKey) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); - keyTag = keyNode = valueNode = null; - } - - detected = true; - atExplicitKey = true; - allowCompact = true; - - } else if (atExplicitKey) { - // i.e. 0x3A/* : */ === character after the explicit key. - atExplicitKey = false; - allowCompact = true; - - } else { - throwError(state, 'incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line'); - } - - state.position += 1; - ch = following; - - // - // Implicit notation case. Flow-style node as the key first, then ":", and the value. - // - } else { - _keyLine = state.line; - _keyLineStart = state.lineStart; - _keyPos = state.position; - - if (!composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) { - // Neither implicit nor explicit notation. - // Reading is done. Go to the epilogue. - break; - } - - if (state.line === _line) { - ch = state.input.charCodeAt(state.position); - - while (is_WHITE_SPACE(ch)) { - ch = state.input.charCodeAt(++state.position); - } - - if (ch === 0x3A/* : */) { - ch = state.input.charCodeAt(++state.position); - - if (!is_WS_OR_EOL(ch)) { - throwError(state, 'a whitespace character is expected after the key-value separator within a block mapping'); - } - - if (atExplicitKey) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); - keyTag = keyNode = valueNode = null; - } - - detected = true; - atExplicitKey = false; - allowCompact = false; - keyTag = state.tag; - keyNode = state.result; - - } else if (detected) { - throwError(state, 'can not read an implicit mapping pair; a colon is missed'); - - } else { - state.tag = _tag; - state.anchor = _anchor; - return true; // Keep the result of `composeNode`. - } - - } else if (detected) { - throwError(state, 'can not read a block mapping entry; a multiline key may not be an implicit key'); - - } else { - state.tag = _tag; - state.anchor = _anchor; - return true; // Keep the result of `composeNode`. - } - } - - // - // Common reading code for both explicit and implicit notations. - // - if (state.line === _line || state.lineIndent > nodeIndent) { - if (atExplicitKey) { - _keyLine = state.line; - _keyLineStart = state.lineStart; - _keyPos = state.position; - } - - if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) { - if (atExplicitKey) { - keyNode = state.result; - } else { - valueNode = state.result; - } - } - - if (!atExplicitKey) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _keyLine, _keyLineStart, _keyPos); - keyTag = keyNode = valueNode = null; - } - - skipSeparationSpace(state, true, -1); - ch = state.input.charCodeAt(state.position); - } - - if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) { - throwError(state, 'bad indentation of a mapping entry'); - } else if (state.lineIndent < nodeIndent) { - break; - } - } - - // - // Epilogue. - // - - // Special case: last mapping's node contains only the key in explicit notation. - if (atExplicitKey) { - storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); - } - - // Expose the resulting mapping. - if (detected) { - state.tag = _tag; - state.anchor = _anchor; - state.kind = 'mapping'; - state.result = _result; - } - - return detected; -} - -function readTagProperty(state) { - var _position, - isVerbatim = false, - isNamed = false, - tagHandle, - tagName, - ch; - - ch = state.input.charCodeAt(state.position); - - if (ch !== 0x21/* ! */) return false; - - if (state.tag !== null) { - throwError(state, 'duplication of a tag property'); - } - - ch = state.input.charCodeAt(++state.position); - - if (ch === 0x3C/* < */) { - isVerbatim = true; - ch = state.input.charCodeAt(++state.position); - - } else if (ch === 0x21/* ! */) { - isNamed = true; - tagHandle = '!!'; - ch = state.input.charCodeAt(++state.position); - - } else { - tagHandle = '!'; - } - - _position = state.position; - - if (isVerbatim) { - do { ch = state.input.charCodeAt(++state.position); } - while (ch !== 0 && ch !== 0x3E/* > */); - - if (state.position < state.length) { - tagName = state.input.slice(_position, state.position); - ch = state.input.charCodeAt(++state.position); - } else { - throwError(state, 'unexpected end of the stream within a verbatim tag'); - } - } else { - while (ch !== 0 && !is_WS_OR_EOL(ch)) { - - if (ch === 0x21/* ! */) { - if (!isNamed) { - tagHandle = state.input.slice(_position - 1, state.position + 1); - - if (!PATTERN_TAG_HANDLE.test(tagHandle)) { - throwError(state, 'named tag handle cannot contain such characters'); - } - - isNamed = true; - _position = state.position + 1; - } else { - throwError(state, 'tag suffix cannot contain exclamation marks'); - } - } - - ch = state.input.charCodeAt(++state.position); - } - - tagName = state.input.slice(_position, state.position); - - if (PATTERN_FLOW_INDICATORS.test(tagName)) { - throwError(state, 'tag suffix cannot contain flow indicator characters'); - } - } - - if (tagName && !PATTERN_TAG_URI.test(tagName)) { - throwError(state, 'tag name cannot contain such characters: ' + tagName); - } - - try { - tagName = decodeURIComponent(tagName); - } catch (err) { - throwError(state, 'tag name is malformed: ' + tagName); - } - - if (isVerbatim) { - state.tag = tagName; - - } else if (_hasOwnProperty.call(state.tagMap, tagHandle)) { - state.tag = state.tagMap[tagHandle] + tagName; - - } else if (tagHandle === '!') { - state.tag = '!' + tagName; - - } else if (tagHandle === '!!') { - state.tag = 'tag:yaml.org,2002:' + tagName; - - } else { - throwError(state, 'undeclared tag handle "' + tagHandle + '"'); - } - - return true; -} - -function readAnchorProperty(state) { - var _position, - ch; - - ch = state.input.charCodeAt(state.position); - - if (ch !== 0x26/* & */) return false; - - if (state.anchor !== null) { - throwError(state, 'duplication of an anchor property'); - } - - ch = state.input.charCodeAt(++state.position); - _position = state.position; - - while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { - ch = state.input.charCodeAt(++state.position); - } - - if (state.position === _position) { - throwError(state, 'name of an anchor node must contain at least one character'); - } - - state.anchor = state.input.slice(_position, state.position); - return true; -} - -function readAlias(state) { - var _position, alias, - ch; - - ch = state.input.charCodeAt(state.position); - - if (ch !== 0x2A/* * */) return false; - - ch = state.input.charCodeAt(++state.position); - _position = state.position; - - while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { - ch = state.input.charCodeAt(++state.position); - } - - if (state.position === _position) { - throwError(state, 'name of an alias node must contain at least one character'); - } - - alias = state.input.slice(_position, state.position); - - if (!_hasOwnProperty.call(state.anchorMap, alias)) { - throwError(state, 'unidentified alias "' + alias + '"'); - } - - state.result = state.anchorMap[alias]; - skipSeparationSpace(state, true, -1); - return true; -} - -function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) { - var allowBlockStyles, - allowBlockScalars, - allowBlockCollections, - indentStatus = 1, // 1: this>parent, 0: this=parent, -1: this parentIndent) { - indentStatus = 1; - } else if (state.lineIndent === parentIndent) { - indentStatus = 0; - } else if (state.lineIndent < parentIndent) { - indentStatus = -1; - } - } - } - - if (indentStatus === 1) { - while (readTagProperty(state) || readAnchorProperty(state)) { - if (skipSeparationSpace(state, true, -1)) { - atNewLine = true; - allowBlockCollections = allowBlockStyles; - - if (state.lineIndent > parentIndent) { - indentStatus = 1; - } else if (state.lineIndent === parentIndent) { - indentStatus = 0; - } else if (state.lineIndent < parentIndent) { - indentStatus = -1; - } - } else { - allowBlockCollections = false; - } - } - } - - if (allowBlockCollections) { - allowBlockCollections = atNewLine || allowCompact; - } - - if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) { - if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) { - flowIndent = parentIndent; - } else { - flowIndent = parentIndent + 1; - } - - blockIndent = state.position - state.lineStart; - - if (indentStatus === 1) { - if (allowBlockCollections && - (readBlockSequence(state, blockIndent) || - readBlockMapping(state, blockIndent, flowIndent)) || - readFlowCollection(state, flowIndent)) { - hasContent = true; - } else { - if ((allowBlockScalars && readBlockScalar(state, flowIndent)) || - readSingleQuotedScalar(state, flowIndent) || - readDoubleQuotedScalar(state, flowIndent)) { - hasContent = true; - - } else if (readAlias(state)) { - hasContent = true; - - if (state.tag !== null || state.anchor !== null) { - throwError(state, 'alias node should not have any properties'); - } - - } else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) { - hasContent = true; - - if (state.tag === null) { - state.tag = '?'; - } - } - - if (state.anchor !== null) { - state.anchorMap[state.anchor] = state.result; - } - } - } else if (indentStatus === 0) { - // Special case: block sequences are allowed to have same indentation level as the parent. - // http://www.yaml.org/spec/1.2/spec.html#id2799784 - hasContent = allowBlockCollections && readBlockSequence(state, blockIndent); - } - } - - if (state.tag === null) { - if (state.anchor !== null) { - state.anchorMap[state.anchor] = state.result; - } - - } else if (state.tag === '?') { - // Implicit resolving is not allowed for non-scalar types, and '?' - // non-specific tag is only automatically assigned to plain scalars. - // - // We only need to check kind conformity in case user explicitly assigns '?' - // tag, for example like this: "! [0]" - // - if (state.result !== null && state.kind !== 'scalar') { - throwError(state, 'unacceptable node kind for ! tag; it should be "scalar", not "' + state.kind + '"'); - } - - for (typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) { - type = state.implicitTypes[typeIndex]; - - if (type.resolve(state.result)) { // `state.result` updated in resolver if matched - state.result = type.construct(state.result); - state.tag = type.tag; - if (state.anchor !== null) { - state.anchorMap[state.anchor] = state.result; - } - break; - } - } - } else if (state.tag !== '!') { - if (_hasOwnProperty.call(state.typeMap[state.kind || 'fallback'], state.tag)) { - type = state.typeMap[state.kind || 'fallback'][state.tag]; - } else { - // looking for multi type - type = null; - typeList = state.typeMap.multi[state.kind || 'fallback']; - - for (typeIndex = 0, typeQuantity = typeList.length; typeIndex < typeQuantity; typeIndex += 1) { - if (state.tag.slice(0, typeList[typeIndex].tag.length) === typeList[typeIndex].tag) { - type = typeList[typeIndex]; - break; - } - } - } - - if (!type) { - throwError(state, 'unknown tag !<' + state.tag + '>'); - } - - if (state.result !== null && type.kind !== state.kind) { - throwError(state, 'unacceptable node kind for !<' + state.tag + '> tag; it should be "' + type.kind + '", not "' + state.kind + '"'); - } - - if (!type.resolve(state.result, state.tag)) { // `state.result` updated in resolver if matched - throwError(state, 'cannot resolve a node with !<' + state.tag + '> explicit tag'); - } else { - state.result = type.construct(state.result, state.tag); - if (state.anchor !== null) { - state.anchorMap[state.anchor] = state.result; - } - } - } - - if (state.listener !== null) { - state.listener('close', state); - } - return state.tag !== null || state.anchor !== null || hasContent; -} - -function readDocument(state) { - var documentStart = state.position, - _position, - directiveName, - directiveArgs, - hasDirectives = false, - ch; - - state.version = null; - state.checkLineBreaks = state.legacy; - state.tagMap = Object.create(null); - state.anchorMap = Object.create(null); - - while ((ch = state.input.charCodeAt(state.position)) !== 0) { - skipSeparationSpace(state, true, -1); - - ch = state.input.charCodeAt(state.position); - - if (state.lineIndent > 0 || ch !== 0x25/* % */) { - break; - } - - hasDirectives = true; - ch = state.input.charCodeAt(++state.position); - _position = state.position; - - while (ch !== 0 && !is_WS_OR_EOL(ch)) { - ch = state.input.charCodeAt(++state.position); - } - - directiveName = state.input.slice(_position, state.position); - directiveArgs = []; - - if (directiveName.length < 1) { - throwError(state, 'directive name must not be less than one character in length'); - } - - while (ch !== 0) { - while (is_WHITE_SPACE(ch)) { - ch = state.input.charCodeAt(++state.position); - } - - if (ch === 0x23/* # */) { - do { ch = state.input.charCodeAt(++state.position); } - while (ch !== 0 && !is_EOL(ch)); - break; - } - - if (is_EOL(ch)) break; - - _position = state.position; - - while (ch !== 0 && !is_WS_OR_EOL(ch)) { - ch = state.input.charCodeAt(++state.position); - } - - directiveArgs.push(state.input.slice(_position, state.position)); - } - - if (ch !== 0) readLineBreak(state); - - if (_hasOwnProperty.call(directiveHandlers, directiveName)) { - directiveHandlers[directiveName](state, directiveName, directiveArgs); - } else { - throwWarning(state, 'unknown document directive "' + directiveName + '"'); - } - } - - skipSeparationSpace(state, true, -1); - - if (state.lineIndent === 0 && - state.input.charCodeAt(state.position) === 0x2D/* - */ && - state.input.charCodeAt(state.position + 1) === 0x2D/* - */ && - state.input.charCodeAt(state.position + 2) === 0x2D/* - */) { - state.position += 3; - skipSeparationSpace(state, true, -1); - - } else if (hasDirectives) { - throwError(state, 'directives end mark is expected'); - } - - composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true); - skipSeparationSpace(state, true, -1); - - if (state.checkLineBreaks && - PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) { - throwWarning(state, 'non-ASCII line breaks are interpreted as content'); - } - - state.documents.push(state.result); - - if (state.position === state.lineStart && testDocumentSeparator(state)) { - - if (state.input.charCodeAt(state.position) === 0x2E/* . */) { - state.position += 3; - skipSeparationSpace(state, true, -1); - } - return; - } - - if (state.position < (state.length - 1)) { - throwError(state, 'end of the stream or a document separator is expected'); - } else { - return; - } -} - - -function loadDocuments(input, options) { - input = String(input); - options = options || {}; - - if (input.length !== 0) { - - // Add tailing `\n` if not exists - if (input.charCodeAt(input.length - 1) !== 0x0A/* LF */ && - input.charCodeAt(input.length - 1) !== 0x0D/* CR */) { - input += '\n'; - } - - // Strip BOM - if (input.charCodeAt(0) === 0xFEFF) { - input = input.slice(1); - } - } - - var state = new State(input, options); - - var nullpos = input.indexOf('\0'); - - if (nullpos !== -1) { - state.position = nullpos; - throwError(state, 'null byte is not allowed in input'); - } - - // Use 0 as string terminator. That significantly simplifies bounds check. - state.input += '\0'; - - while (state.input.charCodeAt(state.position) === 0x20/* Space */) { - state.lineIndent += 1; - state.position += 1; - } - - while (state.position < (state.length - 1)) { - readDocument(state); - } - - return state.documents; -} - - -function loadAll(input, iterator, options) { - if (iterator !== null && typeof iterator === 'object' && typeof options === 'undefined') { - options = iterator; - iterator = null; - } - - var documents = loadDocuments(input, options); - - if (typeof iterator !== 'function') { - return documents; - } - - for (var index = 0, length = documents.length; index < length; index += 1) { - iterator(documents[index]); - } -} - - -function load(input, options) { - var documents = loadDocuments(input, options); - - if (documents.length === 0) { - /*eslint-disable no-undefined*/ - return undefined; - } else if (documents.length === 1) { - return documents[0]; - } - throw new YAMLException('expected a single document in the stream, but found more'); -} - - -module.exports.loadAll = loadAll; -module.exports.load = load; diff --git a/node_modules/js-yaml/lib/schema.js b/node_modules/js-yaml/lib/schema.js deleted file mode 100644 index 65b41f40..00000000 --- a/node_modules/js-yaml/lib/schema.js +++ /dev/null @@ -1,121 +0,0 @@ -'use strict'; - -/*eslint-disable max-len*/ - -var YAMLException = require('./exception'); -var Type = require('./type'); - - -function compileList(schema, name) { - var result = []; - - schema[name].forEach(function (currentType) { - var newIndex = result.length; - - result.forEach(function (previousType, previousIndex) { - if (previousType.tag === currentType.tag && - previousType.kind === currentType.kind && - previousType.multi === currentType.multi) { - - newIndex = previousIndex; - } - }); - - result[newIndex] = currentType; - }); - - return result; -} - - -function compileMap(/* lists... */) { - var result = { - scalar: {}, - sequence: {}, - mapping: {}, - fallback: {}, - multi: { - scalar: [], - sequence: [], - mapping: [], - fallback: [] - } - }, index, length; - - function collectType(type) { - if (type.multi) { - result.multi[type.kind].push(type); - result.multi['fallback'].push(type); - } else { - result[type.kind][type.tag] = result['fallback'][type.tag] = type; - } - } - - for (index = 0, length = arguments.length; index < length; index += 1) { - arguments[index].forEach(collectType); - } - return result; -} - - -function Schema(definition) { - return this.extend(definition); -} - - -Schema.prototype.extend = function extend(definition) { - var implicit = []; - var explicit = []; - - if (definition instanceof Type) { - // Schema.extend(type) - explicit.push(definition); - - } else if (Array.isArray(definition)) { - // Schema.extend([ type1, type2, ... ]) - explicit = explicit.concat(definition); - - } else if (definition && (Array.isArray(definition.implicit) || Array.isArray(definition.explicit))) { - // Schema.extend({ explicit: [ type1, type2, ... ], implicit: [ type1, type2, ... ] }) - if (definition.implicit) implicit = implicit.concat(definition.implicit); - if (definition.explicit) explicit = explicit.concat(definition.explicit); - - } else { - throw new YAMLException('Schema.extend argument should be a Type, [ Type ], ' + - 'or a schema definition ({ implicit: [...], explicit: [...] })'); - } - - implicit.forEach(function (type) { - if (!(type instanceof Type)) { - throw new YAMLException('Specified list of YAML types (or a single Type object) contains a non-Type object.'); - } - - if (type.loadKind && type.loadKind !== 'scalar') { - throw new YAMLException('There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.'); - } - - if (type.multi) { - throw new YAMLException('There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.'); - } - }); - - explicit.forEach(function (type) { - if (!(type instanceof Type)) { - throw new YAMLException('Specified list of YAML types (or a single Type object) contains a non-Type object.'); - } - }); - - var result = Object.create(Schema.prototype); - - result.implicit = (this.implicit || []).concat(implicit); - result.explicit = (this.explicit || []).concat(explicit); - - result.compiledImplicit = compileList(result, 'implicit'); - result.compiledExplicit = compileList(result, 'explicit'); - result.compiledTypeMap = compileMap(result.compiledImplicit, result.compiledExplicit); - - return result; -}; - - -module.exports = Schema; diff --git a/node_modules/js-yaml/lib/schema/core.js b/node_modules/js-yaml/lib/schema/core.js deleted file mode 100644 index 608b26de..00000000 --- a/node_modules/js-yaml/lib/schema/core.js +++ /dev/null @@ -1,11 +0,0 @@ -// Standard YAML's Core schema. -// http://www.yaml.org/spec/1.2/spec.html#id2804923 -// -// NOTE: JS-YAML does not support schema-specific tag resolution restrictions. -// So, Core schema has no distinctions from JSON schema is JS-YAML. - - -'use strict'; - - -module.exports = require('./json'); diff --git a/node_modules/js-yaml/lib/schema/default.js b/node_modules/js-yaml/lib/schema/default.js deleted file mode 100644 index 3af0520d..00000000 --- a/node_modules/js-yaml/lib/schema/default.js +++ /dev/null @@ -1,22 +0,0 @@ -// JS-YAML's default schema for `safeLoad` function. -// It is not described in the YAML specification. -// -// This schema is based on standard YAML's Core schema and includes most of -// extra types described at YAML tag repository. (http://yaml.org/type/) - - -'use strict'; - - -module.exports = require('./core').extend({ - implicit: [ - require('../type/timestamp'), - require('../type/merge') - ], - explicit: [ - require('../type/binary'), - require('../type/omap'), - require('../type/pairs'), - require('../type/set') - ] -}); diff --git a/node_modules/js-yaml/lib/schema/failsafe.js b/node_modules/js-yaml/lib/schema/failsafe.js deleted file mode 100644 index b7a33eb7..00000000 --- a/node_modules/js-yaml/lib/schema/failsafe.js +++ /dev/null @@ -1,17 +0,0 @@ -// Standard YAML's Failsafe schema. -// http://www.yaml.org/spec/1.2/spec.html#id2802346 - - -'use strict'; - - -var Schema = require('../schema'); - - -module.exports = new Schema({ - explicit: [ - require('../type/str'), - require('../type/seq'), - require('../type/map') - ] -}); diff --git a/node_modules/js-yaml/lib/schema/json.js b/node_modules/js-yaml/lib/schema/json.js deleted file mode 100644 index b73df78e..00000000 --- a/node_modules/js-yaml/lib/schema/json.js +++ /dev/null @@ -1,19 +0,0 @@ -// Standard YAML's JSON schema. -// http://www.yaml.org/spec/1.2/spec.html#id2803231 -// -// NOTE: JS-YAML does not support schema-specific tag resolution restrictions. -// So, this schema is not such strict as defined in the YAML specification. -// It allows numbers in binary notaion, use `Null` and `NULL` as `null`, etc. - - -'use strict'; - - -module.exports = require('./failsafe').extend({ - implicit: [ - require('../type/null'), - require('../type/bool'), - require('../type/int'), - require('../type/float') - ] -}); diff --git a/node_modules/js-yaml/lib/snippet.js b/node_modules/js-yaml/lib/snippet.js deleted file mode 100644 index 00e2133c..00000000 --- a/node_modules/js-yaml/lib/snippet.js +++ /dev/null @@ -1,101 +0,0 @@ -'use strict'; - - -var common = require('./common'); - - -// get snippet for a single line, respecting maxLength -function getLine(buffer, lineStart, lineEnd, position, maxLineLength) { - var head = ''; - var tail = ''; - var maxHalfLength = Math.floor(maxLineLength / 2) - 1; - - if (position - lineStart > maxHalfLength) { - head = ' ... '; - lineStart = position - maxHalfLength + head.length; - } - - if (lineEnd - position > maxHalfLength) { - tail = ' ...'; - lineEnd = position + maxHalfLength - tail.length; - } - - return { - str: head + buffer.slice(lineStart, lineEnd).replace(/\t/g, '→') + tail, - pos: position - lineStart + head.length // relative position - }; -} - - -function padStart(string, max) { - return common.repeat(' ', max - string.length) + string; -} - - -function makeSnippet(mark, options) { - options = Object.create(options || null); - - if (!mark.buffer) return null; - - if (!options.maxLength) options.maxLength = 79; - if (typeof options.indent !== 'number') options.indent = 1; - if (typeof options.linesBefore !== 'number') options.linesBefore = 3; - if (typeof options.linesAfter !== 'number') options.linesAfter = 2; - - var re = /\r?\n|\r|\0/g; - var lineStarts = [ 0 ]; - var lineEnds = []; - var match; - var foundLineNo = -1; - - while ((match = re.exec(mark.buffer))) { - lineEnds.push(match.index); - lineStarts.push(match.index + match[0].length); - - if (mark.position <= match.index && foundLineNo < 0) { - foundLineNo = lineStarts.length - 2; - } - } - - if (foundLineNo < 0) foundLineNo = lineStarts.length - 1; - - var result = '', i, line; - var lineNoLength = Math.min(mark.line + options.linesAfter, lineEnds.length).toString().length; - var maxLineLength = options.maxLength - (options.indent + lineNoLength + 3); - - for (i = 1; i <= options.linesBefore; i++) { - if (foundLineNo - i < 0) break; - line = getLine( - mark.buffer, - lineStarts[foundLineNo - i], - lineEnds[foundLineNo - i], - mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo - i]), - maxLineLength - ); - result = common.repeat(' ', options.indent) + padStart((mark.line - i + 1).toString(), lineNoLength) + - ' | ' + line.str + '\n' + result; - } - - line = getLine(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength); - result += common.repeat(' ', options.indent) + padStart((mark.line + 1).toString(), lineNoLength) + - ' | ' + line.str + '\n'; - result += common.repeat('-', options.indent + lineNoLength + 3 + line.pos) + '^' + '\n'; - - for (i = 1; i <= options.linesAfter; i++) { - if (foundLineNo + i >= lineEnds.length) break; - line = getLine( - mark.buffer, - lineStarts[foundLineNo + i], - lineEnds[foundLineNo + i], - mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo + i]), - maxLineLength - ); - result += common.repeat(' ', options.indent) + padStart((mark.line + i + 1).toString(), lineNoLength) + - ' | ' + line.str + '\n'; - } - - return result.replace(/\n$/, ''); -} - - -module.exports = makeSnippet; diff --git a/node_modules/js-yaml/lib/type.js b/node_modules/js-yaml/lib/type.js deleted file mode 100644 index 5e57877f..00000000 --- a/node_modules/js-yaml/lib/type.js +++ /dev/null @@ -1,66 +0,0 @@ -'use strict'; - -var YAMLException = require('./exception'); - -var TYPE_CONSTRUCTOR_OPTIONS = [ - 'kind', - 'multi', - 'resolve', - 'construct', - 'instanceOf', - 'predicate', - 'represent', - 'representName', - 'defaultStyle', - 'styleAliases' -]; - -var YAML_NODE_KINDS = [ - 'scalar', - 'sequence', - 'mapping' -]; - -function compileStyleAliases(map) { - var result = {}; - - if (map !== null) { - Object.keys(map).forEach(function (style) { - map[style].forEach(function (alias) { - result[String(alias)] = style; - }); - }); - } - - return result; -} - -function Type(tag, options) { - options = options || {}; - - Object.keys(options).forEach(function (name) { - if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) { - throw new YAMLException('Unknown option "' + name + '" is met in definition of "' + tag + '" YAML type.'); - } - }); - - // TODO: Add tag format check. - this.options = options; // keep original options in case user wants to extend this type later - this.tag = tag; - this.kind = options['kind'] || null; - this.resolve = options['resolve'] || function () { return true; }; - this.construct = options['construct'] || function (data) { return data; }; - this.instanceOf = options['instanceOf'] || null; - this.predicate = options['predicate'] || null; - this.represent = options['represent'] || null; - this.representName = options['representName'] || null; - this.defaultStyle = options['defaultStyle'] || null; - this.multi = options['multi'] || false; - this.styleAliases = compileStyleAliases(options['styleAliases'] || null); - - if (YAML_NODE_KINDS.indexOf(this.kind) === -1) { - throw new YAMLException('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.'); - } -} - -module.exports = Type; diff --git a/node_modules/js-yaml/lib/type/binary.js b/node_modules/js-yaml/lib/type/binary.js deleted file mode 100644 index e1523513..00000000 --- a/node_modules/js-yaml/lib/type/binary.js +++ /dev/null @@ -1,125 +0,0 @@ -'use strict'; - -/*eslint-disable no-bitwise*/ - - -var Type = require('../type'); - - -// [ 64, 65, 66 ] -> [ padding, CR, LF ] -var BASE64_MAP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r'; - - -function resolveYamlBinary(data) { - if (data === null) return false; - - var code, idx, bitlen = 0, max = data.length, map = BASE64_MAP; - - // Convert one by one. - for (idx = 0; idx < max; idx++) { - code = map.indexOf(data.charAt(idx)); - - // Skip CR/LF - if (code > 64) continue; - - // Fail on illegal characters - if (code < 0) return false; - - bitlen += 6; - } - - // If there are any bits left, source was corrupted - return (bitlen % 8) === 0; -} - -function constructYamlBinary(data) { - var idx, tailbits, - input = data.replace(/[\r\n=]/g, ''), // remove CR/LF & padding to simplify scan - max = input.length, - map = BASE64_MAP, - bits = 0, - result = []; - - // Collect by 6*4 bits (3 bytes) - - for (idx = 0; idx < max; idx++) { - if ((idx % 4 === 0) && idx) { - result.push((bits >> 16) & 0xFF); - result.push((bits >> 8) & 0xFF); - result.push(bits & 0xFF); - } - - bits = (bits << 6) | map.indexOf(input.charAt(idx)); - } - - // Dump tail - - tailbits = (max % 4) * 6; - - if (tailbits === 0) { - result.push((bits >> 16) & 0xFF); - result.push((bits >> 8) & 0xFF); - result.push(bits & 0xFF); - } else if (tailbits === 18) { - result.push((bits >> 10) & 0xFF); - result.push((bits >> 2) & 0xFF); - } else if (tailbits === 12) { - result.push((bits >> 4) & 0xFF); - } - - return new Uint8Array(result); -} - -function representYamlBinary(object /*, style*/) { - var result = '', bits = 0, idx, tail, - max = object.length, - map = BASE64_MAP; - - // Convert every three bytes to 4 ASCII characters. - - for (idx = 0; idx < max; idx++) { - if ((idx % 3 === 0) && idx) { - result += map[(bits >> 18) & 0x3F]; - result += map[(bits >> 12) & 0x3F]; - result += map[(bits >> 6) & 0x3F]; - result += map[bits & 0x3F]; - } - - bits = (bits << 8) + object[idx]; - } - - // Dump tail - - tail = max % 3; - - if (tail === 0) { - result += map[(bits >> 18) & 0x3F]; - result += map[(bits >> 12) & 0x3F]; - result += map[(bits >> 6) & 0x3F]; - result += map[bits & 0x3F]; - } else if (tail === 2) { - result += map[(bits >> 10) & 0x3F]; - result += map[(bits >> 4) & 0x3F]; - result += map[(bits << 2) & 0x3F]; - result += map[64]; - } else if (tail === 1) { - result += map[(bits >> 2) & 0x3F]; - result += map[(bits << 4) & 0x3F]; - result += map[64]; - result += map[64]; - } - - return result; -} - -function isBinary(obj) { - return Object.prototype.toString.call(obj) === '[object Uint8Array]'; -} - -module.exports = new Type('tag:yaml.org,2002:binary', { - kind: 'scalar', - resolve: resolveYamlBinary, - construct: constructYamlBinary, - predicate: isBinary, - represent: representYamlBinary -}); diff --git a/node_modules/js-yaml/lib/type/bool.js b/node_modules/js-yaml/lib/type/bool.js deleted file mode 100644 index cb774593..00000000 --- a/node_modules/js-yaml/lib/type/bool.js +++ /dev/null @@ -1,35 +0,0 @@ -'use strict'; - -var Type = require('../type'); - -function resolveYamlBoolean(data) { - if (data === null) return false; - - var max = data.length; - - return (max === 4 && (data === 'true' || data === 'True' || data === 'TRUE')) || - (max === 5 && (data === 'false' || data === 'False' || data === 'FALSE')); -} - -function constructYamlBoolean(data) { - return data === 'true' || - data === 'True' || - data === 'TRUE'; -} - -function isBoolean(object) { - return Object.prototype.toString.call(object) === '[object Boolean]'; -} - -module.exports = new Type('tag:yaml.org,2002:bool', { - kind: 'scalar', - resolve: resolveYamlBoolean, - construct: constructYamlBoolean, - predicate: isBoolean, - represent: { - lowercase: function (object) { return object ? 'true' : 'false'; }, - uppercase: function (object) { return object ? 'TRUE' : 'FALSE'; }, - camelcase: function (object) { return object ? 'True' : 'False'; } - }, - defaultStyle: 'lowercase' -}); diff --git a/node_modules/js-yaml/lib/type/float.js b/node_modules/js-yaml/lib/type/float.js deleted file mode 100644 index 74d77ec2..00000000 --- a/node_modules/js-yaml/lib/type/float.js +++ /dev/null @@ -1,97 +0,0 @@ -'use strict'; - -var common = require('../common'); -var Type = require('../type'); - -var YAML_FLOAT_PATTERN = new RegExp( - // 2.5e4, 2.5 and integers - '^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?' + - // .2e4, .2 - // special case, seems not from spec - '|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?' + - // .inf - '|[-+]?\\.(?:inf|Inf|INF)' + - // .nan - '|\\.(?:nan|NaN|NAN))$'); - -function resolveYamlFloat(data) { - if (data === null) return false; - - if (!YAML_FLOAT_PATTERN.test(data) || - // Quick hack to not allow integers end with `_` - // Probably should update regexp & check speed - data[data.length - 1] === '_') { - return false; - } - - return true; -} - -function constructYamlFloat(data) { - var value, sign; - - value = data.replace(/_/g, '').toLowerCase(); - sign = value[0] === '-' ? -1 : 1; - - if ('+-'.indexOf(value[0]) >= 0) { - value = value.slice(1); - } - - if (value === '.inf') { - return (sign === 1) ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY; - - } else if (value === '.nan') { - return NaN; - } - return sign * parseFloat(value, 10); -} - - -var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/; - -function representYamlFloat(object, style) { - var res; - - if (isNaN(object)) { - switch (style) { - case 'lowercase': return '.nan'; - case 'uppercase': return '.NAN'; - case 'camelcase': return '.NaN'; - } - } else if (Number.POSITIVE_INFINITY === object) { - switch (style) { - case 'lowercase': return '.inf'; - case 'uppercase': return '.INF'; - case 'camelcase': return '.Inf'; - } - } else if (Number.NEGATIVE_INFINITY === object) { - switch (style) { - case 'lowercase': return '-.inf'; - case 'uppercase': return '-.INF'; - case 'camelcase': return '-.Inf'; - } - } else if (common.isNegativeZero(object)) { - return '-0.0'; - } - - res = object.toString(10); - - // JS stringifier can build scientific format without dots: 5e-100, - // while YAML requres dot: 5.e-100. Fix it with simple hack - - return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace('e', '.e') : res; -} - -function isFloat(object) { - return (Object.prototype.toString.call(object) === '[object Number]') && - (object % 1 !== 0 || common.isNegativeZero(object)); -} - -module.exports = new Type('tag:yaml.org,2002:float', { - kind: 'scalar', - resolve: resolveYamlFloat, - construct: constructYamlFloat, - predicate: isFloat, - represent: representYamlFloat, - defaultStyle: 'lowercase' -}); diff --git a/node_modules/js-yaml/lib/type/int.js b/node_modules/js-yaml/lib/type/int.js deleted file mode 100644 index 3fe3a443..00000000 --- a/node_modules/js-yaml/lib/type/int.js +++ /dev/null @@ -1,156 +0,0 @@ -'use strict'; - -var common = require('../common'); -var Type = require('../type'); - -function isHexCode(c) { - return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) || - ((0x41/* A */ <= c) && (c <= 0x46/* F */)) || - ((0x61/* a */ <= c) && (c <= 0x66/* f */)); -} - -function isOctCode(c) { - return ((0x30/* 0 */ <= c) && (c <= 0x37/* 7 */)); -} - -function isDecCode(c) { - return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)); -} - -function resolveYamlInteger(data) { - if (data === null) return false; - - var max = data.length, - index = 0, - hasDigits = false, - ch; - - if (!max) return false; - - ch = data[index]; - - // sign - if (ch === '-' || ch === '+') { - ch = data[++index]; - } - - if (ch === '0') { - // 0 - if (index + 1 === max) return true; - ch = data[++index]; - - // base 2, base 8, base 16 - - if (ch === 'b') { - // base 2 - index++; - - for (; index < max; index++) { - ch = data[index]; - if (ch === '_') continue; - if (ch !== '0' && ch !== '1') return false; - hasDigits = true; - } - return hasDigits && ch !== '_'; - } - - - if (ch === 'x') { - // base 16 - index++; - - for (; index < max; index++) { - ch = data[index]; - if (ch === '_') continue; - if (!isHexCode(data.charCodeAt(index))) return false; - hasDigits = true; - } - return hasDigits && ch !== '_'; - } - - - if (ch === 'o') { - // base 8 - index++; - - for (; index < max; index++) { - ch = data[index]; - if (ch === '_') continue; - if (!isOctCode(data.charCodeAt(index))) return false; - hasDigits = true; - } - return hasDigits && ch !== '_'; - } - } - - // base 10 (except 0) - - // value should not start with `_`; - if (ch === '_') return false; - - for (; index < max; index++) { - ch = data[index]; - if (ch === '_') continue; - if (!isDecCode(data.charCodeAt(index))) { - return false; - } - hasDigits = true; - } - - // Should have digits and should not end with `_` - if (!hasDigits || ch === '_') return false; - - return true; -} - -function constructYamlInteger(data) { - var value = data, sign = 1, ch; - - if (value.indexOf('_') !== -1) { - value = value.replace(/_/g, ''); - } - - ch = value[0]; - - if (ch === '-' || ch === '+') { - if (ch === '-') sign = -1; - value = value.slice(1); - ch = value[0]; - } - - if (value === '0') return 0; - - if (ch === '0') { - if (value[1] === 'b') return sign * parseInt(value.slice(2), 2); - if (value[1] === 'x') return sign * parseInt(value.slice(2), 16); - if (value[1] === 'o') return sign * parseInt(value.slice(2), 8); - } - - return sign * parseInt(value, 10); -} - -function isInteger(object) { - return (Object.prototype.toString.call(object)) === '[object Number]' && - (object % 1 === 0 && !common.isNegativeZero(object)); -} - -module.exports = new Type('tag:yaml.org,2002:int', { - kind: 'scalar', - resolve: resolveYamlInteger, - construct: constructYamlInteger, - predicate: isInteger, - represent: { - binary: function (obj) { return obj >= 0 ? '0b' + obj.toString(2) : '-0b' + obj.toString(2).slice(1); }, - octal: function (obj) { return obj >= 0 ? '0o' + obj.toString(8) : '-0o' + obj.toString(8).slice(1); }, - decimal: function (obj) { return obj.toString(10); }, - /* eslint-disable max-len */ - hexadecimal: function (obj) { return obj >= 0 ? '0x' + obj.toString(16).toUpperCase() : '-0x' + obj.toString(16).toUpperCase().slice(1); } - }, - defaultStyle: 'decimal', - styleAliases: { - binary: [ 2, 'bin' ], - octal: [ 8, 'oct' ], - decimal: [ 10, 'dec' ], - hexadecimal: [ 16, 'hex' ] - } -}); diff --git a/node_modules/js-yaml/lib/type/map.js b/node_modules/js-yaml/lib/type/map.js deleted file mode 100644 index f327beeb..00000000 --- a/node_modules/js-yaml/lib/type/map.js +++ /dev/null @@ -1,8 +0,0 @@ -'use strict'; - -var Type = require('../type'); - -module.exports = new Type('tag:yaml.org,2002:map', { - kind: 'mapping', - construct: function (data) { return data !== null ? data : {}; } -}); diff --git a/node_modules/js-yaml/lib/type/merge.js b/node_modules/js-yaml/lib/type/merge.js deleted file mode 100644 index ae08a864..00000000 --- a/node_modules/js-yaml/lib/type/merge.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -var Type = require('../type'); - -function resolveYamlMerge(data) { - return data === '<<' || data === null; -} - -module.exports = new Type('tag:yaml.org,2002:merge', { - kind: 'scalar', - resolve: resolveYamlMerge -}); diff --git a/node_modules/js-yaml/lib/type/null.js b/node_modules/js-yaml/lib/type/null.js deleted file mode 100644 index 315ca4e2..00000000 --- a/node_modules/js-yaml/lib/type/null.js +++ /dev/null @@ -1,35 +0,0 @@ -'use strict'; - -var Type = require('../type'); - -function resolveYamlNull(data) { - if (data === null) return true; - - var max = data.length; - - return (max === 1 && data === '~') || - (max === 4 && (data === 'null' || data === 'Null' || data === 'NULL')); -} - -function constructYamlNull() { - return null; -} - -function isNull(object) { - return object === null; -} - -module.exports = new Type('tag:yaml.org,2002:null', { - kind: 'scalar', - resolve: resolveYamlNull, - construct: constructYamlNull, - predicate: isNull, - represent: { - canonical: function () { return '~'; }, - lowercase: function () { return 'null'; }, - uppercase: function () { return 'NULL'; }, - camelcase: function () { return 'Null'; }, - empty: function () { return ''; } - }, - defaultStyle: 'lowercase' -}); diff --git a/node_modules/js-yaml/lib/type/omap.js b/node_modules/js-yaml/lib/type/omap.js deleted file mode 100644 index b2b5323b..00000000 --- a/node_modules/js-yaml/lib/type/omap.js +++ /dev/null @@ -1,44 +0,0 @@ -'use strict'; - -var Type = require('../type'); - -var _hasOwnProperty = Object.prototype.hasOwnProperty; -var _toString = Object.prototype.toString; - -function resolveYamlOmap(data) { - if (data === null) return true; - - var objectKeys = [], index, length, pair, pairKey, pairHasKey, - object = data; - - for (index = 0, length = object.length; index < length; index += 1) { - pair = object[index]; - pairHasKey = false; - - if (_toString.call(pair) !== '[object Object]') return false; - - for (pairKey in pair) { - if (_hasOwnProperty.call(pair, pairKey)) { - if (!pairHasKey) pairHasKey = true; - else return false; - } - } - - if (!pairHasKey) return false; - - if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey); - else return false; - } - - return true; -} - -function constructYamlOmap(data) { - return data !== null ? data : []; -} - -module.exports = new Type('tag:yaml.org,2002:omap', { - kind: 'sequence', - resolve: resolveYamlOmap, - construct: constructYamlOmap -}); diff --git a/node_modules/js-yaml/lib/type/pairs.js b/node_modules/js-yaml/lib/type/pairs.js deleted file mode 100644 index 74b52403..00000000 --- a/node_modules/js-yaml/lib/type/pairs.js +++ /dev/null @@ -1,53 +0,0 @@ -'use strict'; - -var Type = require('../type'); - -var _toString = Object.prototype.toString; - -function resolveYamlPairs(data) { - if (data === null) return true; - - var index, length, pair, keys, result, - object = data; - - result = new Array(object.length); - - for (index = 0, length = object.length; index < length; index += 1) { - pair = object[index]; - - if (_toString.call(pair) !== '[object Object]') return false; - - keys = Object.keys(pair); - - if (keys.length !== 1) return false; - - result[index] = [ keys[0], pair[keys[0]] ]; - } - - return true; -} - -function constructYamlPairs(data) { - if (data === null) return []; - - var index, length, pair, keys, result, - object = data; - - result = new Array(object.length); - - for (index = 0, length = object.length; index < length; index += 1) { - pair = object[index]; - - keys = Object.keys(pair); - - result[index] = [ keys[0], pair[keys[0]] ]; - } - - return result; -} - -module.exports = new Type('tag:yaml.org,2002:pairs', { - kind: 'sequence', - resolve: resolveYamlPairs, - construct: constructYamlPairs -}); diff --git a/node_modules/js-yaml/lib/type/seq.js b/node_modules/js-yaml/lib/type/seq.js deleted file mode 100644 index be8f77f2..00000000 --- a/node_modules/js-yaml/lib/type/seq.js +++ /dev/null @@ -1,8 +0,0 @@ -'use strict'; - -var Type = require('../type'); - -module.exports = new Type('tag:yaml.org,2002:seq', { - kind: 'sequence', - construct: function (data) { return data !== null ? data : []; } -}); diff --git a/node_modules/js-yaml/lib/type/set.js b/node_modules/js-yaml/lib/type/set.js deleted file mode 100644 index f885a329..00000000 --- a/node_modules/js-yaml/lib/type/set.js +++ /dev/null @@ -1,29 +0,0 @@ -'use strict'; - -var Type = require('../type'); - -var _hasOwnProperty = Object.prototype.hasOwnProperty; - -function resolveYamlSet(data) { - if (data === null) return true; - - var key, object = data; - - for (key in object) { - if (_hasOwnProperty.call(object, key)) { - if (object[key] !== null) return false; - } - } - - return true; -} - -function constructYamlSet(data) { - return data !== null ? data : {}; -} - -module.exports = new Type('tag:yaml.org,2002:set', { - kind: 'mapping', - resolve: resolveYamlSet, - construct: constructYamlSet -}); diff --git a/node_modules/js-yaml/lib/type/str.js b/node_modules/js-yaml/lib/type/str.js deleted file mode 100644 index 27acc106..00000000 --- a/node_modules/js-yaml/lib/type/str.js +++ /dev/null @@ -1,8 +0,0 @@ -'use strict'; - -var Type = require('../type'); - -module.exports = new Type('tag:yaml.org,2002:str', { - kind: 'scalar', - construct: function (data) { return data !== null ? data : ''; } -}); diff --git a/node_modules/js-yaml/lib/type/timestamp.js b/node_modules/js-yaml/lib/type/timestamp.js deleted file mode 100644 index 8fa9c586..00000000 --- a/node_modules/js-yaml/lib/type/timestamp.js +++ /dev/null @@ -1,88 +0,0 @@ -'use strict'; - -var Type = require('../type'); - -var YAML_DATE_REGEXP = new RegExp( - '^([0-9][0-9][0-9][0-9])' + // [1] year - '-([0-9][0-9])' + // [2] month - '-([0-9][0-9])$'); // [3] day - -var YAML_TIMESTAMP_REGEXP = new RegExp( - '^([0-9][0-9][0-9][0-9])' + // [1] year - '-([0-9][0-9]?)' + // [2] month - '-([0-9][0-9]?)' + // [3] day - '(?:[Tt]|[ \\t]+)' + // ... - '([0-9][0-9]?)' + // [4] hour - ':([0-9][0-9])' + // [5] minute - ':([0-9][0-9])' + // [6] second - '(?:\\.([0-9]*))?' + // [7] fraction - '(?:[ \\t]*(Z|([-+])([0-9][0-9]?)' + // [8] tz [9] tz_sign [10] tz_hour - '(?::([0-9][0-9]))?))?$'); // [11] tz_minute - -function resolveYamlTimestamp(data) { - if (data === null) return false; - if (YAML_DATE_REGEXP.exec(data) !== null) return true; - if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) return true; - return false; -} - -function constructYamlTimestamp(data) { - var match, year, month, day, hour, minute, second, fraction = 0, - delta = null, tz_hour, tz_minute, date; - - match = YAML_DATE_REGEXP.exec(data); - if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(data); - - if (match === null) throw new Error('Date resolve error'); - - // match: [1] year [2] month [3] day - - year = +(match[1]); - month = +(match[2]) - 1; // JS month starts with 0 - day = +(match[3]); - - if (!match[4]) { // no hour - return new Date(Date.UTC(year, month, day)); - } - - // match: [4] hour [5] minute [6] second [7] fraction - - hour = +(match[4]); - minute = +(match[5]); - second = +(match[6]); - - if (match[7]) { - fraction = match[7].slice(0, 3); - while (fraction.length < 3) { // milli-seconds - fraction += '0'; - } - fraction = +fraction; - } - - // match: [8] tz [9] tz_sign [10] tz_hour [11] tz_minute - - if (match[9]) { - tz_hour = +(match[10]); - tz_minute = +(match[11] || 0); - delta = (tz_hour * 60 + tz_minute) * 60000; // delta in mili-seconds - if (match[9] === '-') delta = -delta; - } - - date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction)); - - if (delta) date.setTime(date.getTime() - delta); - - return date; -} - -function representYamlTimestamp(object /*, style*/) { - return object.toISOString(); -} - -module.exports = new Type('tag:yaml.org,2002:timestamp', { - kind: 'scalar', - resolve: resolveYamlTimestamp, - construct: constructYamlTimestamp, - instanceOf: Date, - represent: representYamlTimestamp -}); diff --git a/node_modules/js-yaml/package.json b/node_modules/js-yaml/package.json index 17574da8..10c360ff 100644 --- a/node_modules/js-yaml/package.json +++ b/node_modules/js-yaml/package.json @@ -1,6 +1,6 @@ { "name": "js-yaml", - "version": "4.1.0", + "version": "5.4.1", "description": "YAML 1.2 parser and serializer", "keywords": [ "yaml", @@ -16,51 +16,77 @@ ], "license": "MIT", "repository": "nodeca/js-yaml", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/puzrin" + }, + { + "type": "github", + "url": "https://github.com/sponsors/nodeca" + } + ], "files": [ - "index.js", - "lib/", "bin/", "dist/" ], "bin": { - "js-yaml": "bin/js-yaml.js" + "js-yaml": "bin/js-yaml.mjs" }, + "main": "./dist/js-yaml.cjs.js", "module": "./dist/js-yaml.mjs", + "types": "./dist/js-yaml.d.ts", "exports": { ".": { + "types": "./dist/js-yaml.d.ts", "import": "./dist/js-yaml.mjs", - "require": "./index.js" + "require": "./dist/js-yaml.cjs.js" + }, + "./browser": { + "types": "./dist/js-yaml.d.ts", + "import": "./dist/browser/js-yaml.esm.min.mjs", + "require": "./dist/browser/js-yaml.umd.min.js", + "default": "./dist/browser/js-yaml.umd.min.js" }, "./package.json": "./package.json" }, "scripts": { "lint": "eslint .", - "test": "npm run lint && mocha", - "coverage": "npm run lint && nyc mocha && nyc report --reporter html", - "demo": "npm run lint && node support/build_demo.js", - "gh-demo": "npm run demo && gh-pages -d demo -f", - "browserify": "rollup -c support/rollup.config.js", - "prepublishOnly": "npm run gh-demo" + "lint-fix": "eslint . --fix", + "type-check": "tsc --noEmit", + "test": "npm run lint && npm run build && npm run type-check && npm run spec:get && node --test 'test/core/**/*.test.mjs' 'test/spec/*.test.mjs'", + "test:spec": "npm run build && npm run spec:get && node test/spec/spec.test.mjs", + "spec:get": "node support/get-yaml-test-suite.mjs", + "spec:update": "node support/get-yaml-test-suite.mjs update", + "coverage": "npm run build && npm run spec:get && c8 --include 'dist/js-yaml.mjs' --include 'src/**' -r text -r html -r lcov node --test 'test/core/**/*.test.mjs' 'test/spec/*.test.mjs'", + "build": "node support/build-dist.mjs", + "demo": "npm run lint && node support/build_demo.mjs && npm run doc", + "doc": "typedoc", + "demo:publish": "npm run demo && gh-pages -d demo -f", + "benchmark:deps": "npm install --prefix benchmark/extra/", + "prepack": "npm test && npm run build && npm run demo", + "postpublish": "npm run demo:publish" }, - "unpkg": "dist/js-yaml.min.js", - "jsdelivr": "dist/js-yaml.min.js", "dependencies": { "argparse": "^2.0.1" }, "devDependencies": { - "@rollup/plugin-commonjs": "^17.0.0", - "@rollup/plugin-node-resolve": "^11.0.0", - "ansi": "^0.3.1", - "benchmark": "^2.1.4", - "codemirror": "^5.13.4", - "eslint": "^7.0.0", - "fast-check": "^2.8.0", - "gh-pages": "^3.1.0", - "mocha": "^8.2.1", - "nyc": "^15.1.0", - "rollup": "^2.34.1", - "rollup-plugin-node-polyfills": "^0.2.1", - "rollup-plugin-terser": "^7.0.2", - "shelljs": "^0.8.4" + "@streamparser/json": "^0.0.22", + "@types/node": "^24.12.2", + "c8": "^11.0.0", + "codemirror": "^5.65.21", + "eslint": "^9.39.4", + "fast-check": "^4.8.0", + "gh-pages": "^6.3.0", + "mitata": "^1.0.34", + "neostandard": "^0.13.0", + "rollup": "^4.62.2", + "rollup-plugin-dts": "^6.4.1", + "typedoc": "^0.28.19", + "typescript": "^6.0.3", + "vite": "^8.1.2", + "vite-plugin-node-polyfills": "^0.28.0", + "vite-plugin-singlefile": "^2.3.3", + "workerpool": "^10.0.3" } } diff --git a/node_modules/minimatch/README.md b/node_modules/minimatch/README.md index 01da9c86..1a068fab 100644 --- a/node_modules/minimatch/README.md +++ b/node_modules/minimatch/README.md @@ -7,6 +7,43 @@ This is the matching library used internally by npm. It works by converting glob expressions into JavaScript `RegExp` objects. +## Important Security Consideration! + +> [!WARNING] +> This library uses JavaScript regular expressions. Please read +> the following warning carefully, and be thoughtful about what +> you provide to this library in production systems. + +_Any_ library in JavaScript that deals with matching string +patterns using regular expressions will be subject to +[ReDoS](https://owasp.org/www-community/attacks/Regular_expression_Denial_of_Service_-_ReDoS) +if the pattern is generated using untrusted input. + +Efforts have been made to mitigate risk as much as is feasible in +such a library, providing maximum recursion depths and so forth, +but these measures can only ultimately protect against accidents, +not malice. A dedicated attacker can _always_ find patterns that +cannot be defended against by a bash-compatible glob pattern +matching system that uses JavaScript regular expressions. + +To be extremely clear: + +> [!WARNING] +> **If you create a system where you take user input, and use +> that input as the source of a Regular Expression pattern, in +> this or any extant glob matcher in JavaScript, you will be +> pwned.** + +A future version of this library _may_ use a different matching +algorithm which does not exhibit backtracking problems. If and +when that happens, it will likely be a sweeping change, and those +improvements will **not** be backported to legacy versions. + +In the near term, it is not reasonable to continue to play +whack-a-mole with security advisories, and so any future ReDoS +reports will be considered "working as intended", and resolved +entirely by this warning. + ## Usage ```js @@ -157,7 +194,9 @@ Returns a function that tests its supplied argument, suitable for use with `Array.filter`. Example: ```javascript -var javascripts = fileList.filter(minimatch.filter('*.js', { matchBase: true })) +var javascripts = fileList.filter( + minimatch.filter('*.js', { matchBase: true }), +) ``` ### minimatch.escape(pattern, options = {}) @@ -394,6 +433,42 @@ separators in file paths for comparison.) Defaults to the value of `process.platform`. +### maxGlobstarRecursion + +Max number of non-adjacent `**` patterns to recursively walk +down. + +The default of `200` is almost certainly high enough for most +purposes, and can handle absurdly excessive patterns. + +If the limit is exceeded (which would require very excessively +long patterns and paths containing lots of `**` patterns!), then +it is treated as non-matching, even if the path would normally +match the pattern provided. + +That is, this is an intentional false negative, deemed an +acceptable break in correctness for security and performance. + +### maxExtglobRecursion + +Max depth to traverse for nested extglobs like `*(a|b|c)` + +Default is 2, which is quite low, but any higher value swiftly +results in punishing performance impacts. Note that this is _not_ +relevant when the globstar types can be safely coalesced into a +single set. + +For example, `*(a|@(b|c)|d)` would be flattened into +`*(a|b|c|d)`. Thus, many common extglobs will retain good +performance and never hit this limit, even if they are +excessively deep and complicated. + +If the limit is hit, then the extglob characters are simply not +parsed, and the pattern effectively switches into `noextglob: +true` mode for the contents of that nested sub-pattern. This will +typically _not_ result in a match, but is considered a valid +trade-off for security and performance. + ## Comparisons to other fnmatch/glob implementations While strict compliance with the existing standards is a diff --git a/node_modules/minimatch/dist/commonjs/assert-valid-pattern.d.ts b/node_modules/minimatch/dist/commonjs/assert-valid-pattern.d.ts index 8e318b23..34d7a78a 100644 --- a/node_modules/minimatch/dist/commonjs/assert-valid-pattern.d.ts +++ b/node_modules/minimatch/dist/commonjs/assert-valid-pattern.d.ts @@ -1,2 +1,2 @@ -export declare const assertValidPattern: (pattern: any) => void; +export declare const assertValidPattern: (pattern: unknown) => void; //# sourceMappingURL=assert-valid-pattern.d.ts.map \ No newline at end of file diff --git a/node_modules/minimatch/dist/commonjs/assert-valid-pattern.d.ts.map b/node_modules/minimatch/dist/commonjs/assert-valid-pattern.d.ts.map index c61c0310..30ddcd51 100644 --- a/node_modules/minimatch/dist/commonjs/assert-valid-pattern.d.ts.map +++ b/node_modules/minimatch/dist/commonjs/assert-valid-pattern.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"assert-valid-pattern.d.ts","sourceRoot":"","sources":["../../src/assert-valid-pattern.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,kBAAkB,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,IAUlD,CAAA"} \ No newline at end of file +{"version":3,"file":"assert-valid-pattern.d.ts","sourceRoot":"","sources":["../../src/assert-valid-pattern.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,kBAAkB,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAUtD,CAAA"} \ No newline at end of file diff --git a/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js.map b/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js.map index 69fea07a..9fc27a93 100644 --- a/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js.map +++ b/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js.map @@ -1 +1 @@ -{"version":3,"file":"assert-valid-pattern.js","sourceRoot":"","sources":["../../src/assert-valid-pattern.ts"],"names":[],"mappings":";;;AAAA,MAAM,kBAAkB,GAAG,IAAI,GAAG,EAAE,CAAA;AAC7B,MAAM,kBAAkB,GAA2B,CACxD,OAAY,EACe,EAAE;IAC7B,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,CAAC;QAChC,MAAM,IAAI,SAAS,CAAC,iBAAiB,CAAC,CAAA;IACxC,CAAC;IAED,IAAI,OAAO,CAAC,MAAM,GAAG,kBAAkB,EAAE,CAAC;QACxC,MAAM,IAAI,SAAS,CAAC,qBAAqB,CAAC,CAAA;IAC5C,CAAC;AACH,CAAC,CAAA;AAVY,QAAA,kBAAkB,sBAU9B","sourcesContent":["const MAX_PATTERN_LENGTH = 1024 * 64\nexport const assertValidPattern: (pattern: any) => void = (\n pattern: any,\n): asserts pattern is string => {\n if (typeof pattern !== 'string') {\n throw new TypeError('invalid pattern')\n }\n\n if (pattern.length > MAX_PATTERN_LENGTH) {\n throw new TypeError('pattern is too long')\n }\n}\n"]} \ No newline at end of file +{"version":3,"file":"assert-valid-pattern.js","sourceRoot":"","sources":["../../src/assert-valid-pattern.ts"],"names":[],"mappings":";;;AAAA,MAAM,kBAAkB,GAAG,IAAI,GAAG,EAAE,CAAA;AAC7B,MAAM,kBAAkB,GAA+B,CAC5D,OAAgB,EACW,EAAE;IAC7B,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,CAAC;QAChC,MAAM,IAAI,SAAS,CAAC,iBAAiB,CAAC,CAAA;IACxC,CAAC;IAED,IAAI,OAAO,CAAC,MAAM,GAAG,kBAAkB,EAAE,CAAC;QACxC,MAAM,IAAI,SAAS,CAAC,qBAAqB,CAAC,CAAA;IAC5C,CAAC;AACH,CAAC,CAAA;AAVY,QAAA,kBAAkB,sBAU9B","sourcesContent":["const MAX_PATTERN_LENGTH = 1024 * 64\nexport const assertValidPattern: (pattern: unknown) => void = (\n pattern: unknown,\n): asserts pattern is string => {\n if (typeof pattern !== 'string') {\n throw new TypeError('invalid pattern')\n }\n\n if (pattern.length > MAX_PATTERN_LENGTH) {\n throw new TypeError('pattern is too long')\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/minimatch/dist/commonjs/ast.d.ts b/node_modules/minimatch/dist/commonjs/ast.d.ts index b8c1e544..74f2cf93 100644 --- a/node_modules/minimatch/dist/commonjs/ast.d.ts +++ b/node_modules/minimatch/dist/commonjs/ast.d.ts @@ -1,13 +1,15 @@ -import { MinimatchOptions, MMRegExp } from './index.js'; +import type { MinimatchOptions, MMRegExp } from './index.js'; export type ExtglobType = '!' | '?' | '+' | '*' | '@'; export declare class AST { #private; type: ExtglobType | null; + id: number; + get depth(): number; constructor(type: ExtglobType | null, parent?: AST, options?: MinimatchOptions); get hasMagic(): boolean | undefined; toString(): string; push(...parts: (string | AST)[]): void; - toJSON(): any[]; + toJSON(): unknown[]; isStart(): boolean; isEnd(): boolean; copyIn(part: AST | string): void; diff --git a/node_modules/minimatch/dist/commonjs/ast.d.ts.map b/node_modules/minimatch/dist/commonjs/ast.d.ts.map index e1594506..8965fd6a 100644 --- a/node_modules/minimatch/dist/commonjs/ast.d.ts.map +++ b/node_modules/minimatch/dist/commonjs/ast.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"ast.d.ts","sourceRoot":"","sources":["../../src/ast.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAwCvD,MAAM,MAAM,WAAW,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAA;AAkCrD,qBAAa,GAAG;;IACd,IAAI,EAAE,WAAW,GAAG,IAAI,CAAA;gBAiBtB,IAAI,EAAE,WAAW,GAAG,IAAI,EACxB,MAAM,CAAC,EAAE,GAAG,EACZ,OAAO,GAAE,gBAAqB;IAahC,IAAI,QAAQ,IAAI,OAAO,GAAG,SAAS,CAUlC;IAGD,QAAQ,IAAI,MAAM;IA+ClB,IAAI,CAAC,GAAG,KAAK,EAAE,CAAC,MAAM,GAAG,GAAG,CAAC,EAAE;IAY/B,MAAM;IAgBN,OAAO,IAAI,OAAO;IAgBlB,KAAK,IAAI,OAAO;IAYhB,MAAM,CAAC,IAAI,EAAE,GAAG,GAAG,MAAM;IAKzB,KAAK,CAAC,MAAM,EAAE,GAAG;IAsIjB,MAAM,CAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,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,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC;CA6OjE"} \ No newline at end of file diff --git a/node_modules/minimatch/dist/commonjs/ast.js b/node_modules/minimatch/dist/commonjs/ast.js index fd7f3d73..33df3769 100644 --- a/node_modules/minimatch/dist/commonjs/ast.js +++ b/node_modules/minimatch/dist/commonjs/ast.js @@ -1,11 +1,113 @@ "use strict"; // parse a single path portion +var _a; Object.defineProperty(exports, "__esModule", { value: true }); exports.AST = void 0; const brace_expressions_js_1 = require("./brace-expressions.js"); const unescape_js_1 = require("./unescape.js"); const types = new Set(['!', '?', '+', '*', '@']); const isExtglobType = (c) => types.has(c); +const isExtglobAST = (c) => isExtglobType(c.type); +// Map of which extglob types can adopt the children of a nested extglob +// +// anything but ! can adopt a matching type: +// +(a|+(b|c)|d) => +(a|b|c|d) +// *(a|*(b|c)|d) => *(a|b|c|d) +// @(a|@(b|c)|d) => @(a|b|c|d) +// ?(a|?(b|c)|d) => ?(a|b|c|d) +// +// * can adopt anything, because 0 or repetition is allowed +// *(a|?(b|c)|d) => *(a|b|c|d) +// *(a|+(b|c)|d) => *(a|b|c|d) +// *(a|@(b|c)|d) => *(a|b|c|d) +// +// + can adopt @, because 1 or repetition is allowed +// +(a|@(b|c)|d) => +(a|b|c|d) +// +// + and @ CANNOT adopt *, because 0 would be allowed +// +(a|*(b|c)|d) => would match "", on *(b|c) +// @(a|*(b|c)|d) => would match "", on *(b|c) +// +// + and @ CANNOT adopt ?, because 0 would be allowed +// +(a|?(b|c)|d) => would match "", on ?(b|c) +// @(a|?(b|c)|d) => would match "", on ?(b|c) +// +// ? can adopt @, because 0 or 1 is allowed +// ?(a|@(b|c)|d) => ?(a|b|c|d) +// +// ? and @ CANNOT adopt * or +, because >1 would be allowed +// ?(a|*(b|c)|d) => would match bbb on *(b|c) +// @(a|*(b|c)|d) => would match bbb on *(b|c) +// ?(a|+(b|c)|d) => would match bbb on +(b|c) +// @(a|+(b|c)|d) => would match bbb on +(b|c) +// +// ! CANNOT adopt ! (nothing else can either) +// !(a|!(b|c)|d) => !(a|b|c|d) would fail to match on b (not not b|c) +// +// ! can adopt @ +// !(a|@(b|c)|d) => !(a|b|c|d) +// +// ! CANNOT adopt * +// !(a|*(b|c)|d) => !(a|b|c|d) would match on bbb, not allowed +// +// ! CANNOT adopt + +// !(a|+(b|c)|d) => !(a|b|c|d) would match on bbb, not allowed +// +// ! CANNOT adopt ? +// x!(a|?(b|c)|d) => x!(a|b|c|d) would fail to match "x" +const adoptionMap = new Map([ + ['!', ['@']], + ['?', ['?', '@']], + ['@', ['@']], + ['*', ['*', '+', '?', '@']], + ['+', ['+', '@']], +]); +// nested extglobs that can be adopted in, but with the addition of +// a blank '' element. +const adoptionWithSpaceMap = new Map([ + ['!', ['?']], + ['@', ['?']], + ['+', ['?', '*']], +]); +// union of the previous two maps +const adoptionAnyMap = new Map([ + ['!', ['?', '@']], + ['?', ['?', '@']], + ['@', ['?', '@']], + ['*', ['*', '+', '?', '@']], + ['+', ['+', '@', '?', '*']], +]); +// Extglobs that can take over their parent if they are the only child +// the key is parent, value maps child to resulting extglob parent type +// '@' is omitted because it's a special case. An `@` extglob with a single +// member can always be usurped by that subpattern. +const usurpMap = new Map([ + ['!', new Map([['!', '@']])], + [ + '?', + new Map([ + ['*', '*'], + ['+', '*'], + ]), + ], + [ + '@', + new Map([ + ['!', '!'], + ['?', '?'], + ['@', '@'], + ['*', '*'], + ['+', '+'], + ]), + ], + [ + '+', + new Map([ + ['?', '*'], + ['*', '*'], + ]), + ], +]); // Patterns that get prepended to bind to the start of either the // entire string, or just a single path portion, to prevent dots // and/or traversal patterns, when needed. @@ -29,6 +131,7 @@ const star = qmark + '*?'; const starNoEmpty = qmark + '+?'; // remove the \ chars that we added if we end up doing a nonmagic compare // const deslash = (s: string) => s.replace(/\\(.)/g, '$1') +let ID = 0; class AST { type; #root; @@ -44,6 +147,22 @@ class AST { // set to true if it's an extglob with no children // (which really means one child of '') #emptyExt = false; + id = ++ID; + get depth() { + return (this.#parent?.depth ?? -1) + 1; + } + [Symbol.for('nodejs.util.inspect.custom')]() { + return { + '@@type': 'AST', + id: this.id, + type: this.type, + root: this.#root.id, + parent: this.#parent?.id, + depth: this.depth, + partsLength: this.#parts.length, + parts: this.#parts, + }; + } constructor(type, parent, options = {}) { this.type = type; // extglobs are inherently magical @@ -73,15 +192,14 @@ class AST { } // reconstructs the pattern toString() { - if (this.#toString !== undefined) - return this.#toString; - if (!this.type) { - return (this.#toString = this.#parts.map(p => String(p)).join('')); - } - else { - return (this.#toString = - this.type + '(' + this.#parts.map(p => String(p)).join('|') + ')'); - } + return (this.#toString !== undefined ? this.#toString + : !this.type ? + (this.#toString = this.#parts.map(p => String(p)).join('')) + : (this.#toString = + this.type + + '(' + + this.#parts.map(p => String(p)).join('|') + + ')')); } #fillNegs() { /* c8 ignore start */ @@ -122,7 +240,8 @@ class AST { if (p === '') continue; /* c8 ignore start */ - if (typeof p !== 'string' && !(p instanceof AST && p.#parent === this)) { + if (typeof p !== 'string' && + !(p instanceof _a && p.#parent === this)) { throw new Error('invalid part: ' + p); } /* c8 ignore stop */ @@ -130,8 +249,10 @@ class AST { } } toJSON() { - const ret = this.type === null - ? this.#parts.slice().map(p => (typeof p === 'string' ? p : p.toJSON())) + const ret = this.type === null ? + this.#parts + .slice() + .map(p => (typeof p === 'string' ? p : p.toJSON())) : [this.type, ...this.#parts.map(p => p.toJSON())]; if (this.isStart() && !this.type) ret.unshift([]); @@ -154,7 +275,7 @@ class AST { const p = this.#parent; for (let i = 0; i < this.#parentIndex; i++) { const pp = p.#parts[i]; - if (!(pp instanceof AST && pp.type === '!')) { + if (!(pp instanceof _a && pp.type === '!')) { return false; } } @@ -182,13 +303,14 @@ class AST { this.push(part.clone(this)); } clone(parent) { - const c = new AST(this.type, parent); + const c = new _a(this.type, parent); for (const p of this.#parts) { c.copyIn(p); } return c; } - static #parseAST(str, ast, pos, opt) { + static #parseAST(str, ast, pos, opt, extDepth) { + const maxDepth = opt.maxExtglobRecursion ?? 2; let escaping = false; let inBrace = false; let braceStart = -1; @@ -225,11 +347,17 @@ class AST { acc += c; continue; } - if (!opt.noext && isExtglobType(c) && str.charAt(i) === '(') { + // we don't have to check for adoption here, because that's + // done at the other recursion point. + const doRecurse = !opt.noext && + isExtglobType(c) && + str.charAt(i) === '(' && + extDepth <= maxDepth; + if (doRecurse) { ast.push(acc); acc = ''; - const ext = new AST(c, ast); - i = AST.#parseAST(str, ext, i, opt); + const ext = new _a(c, ast); + i = _a.#parseAST(str, ext, i, opt, extDepth + 1); ast.push(ext); continue; } @@ -241,7 +369,7 @@ class AST { // some kind of extglob, pos is at the ( // find the next | or ) let i = pos + 1; - let part = new AST(null, ast); + let part = new _a(null, ast); const parts = []; let acc = ''; while (i < str.length) { @@ -272,19 +400,26 @@ class AST { acc += c; continue; } - if (isExtglobType(c) && str.charAt(i) === '(') { + const doRecurse = !opt.noext && + isExtglobType(c) && + str.charAt(i) === '(' && + /* c8 ignore start - the maxDepth is sufficient here */ + (extDepth <= maxDepth || (ast && ast.#canAdoptType(c))); + /* c8 ignore stop */ + if (doRecurse) { + const depthAdd = ast && ast.#canAdoptType(c) ? 0 : 1; part.push(acc); acc = ''; - const ext = new AST(c, part); + const ext = new _a(c, part); part.push(ext); - i = AST.#parseAST(str, ext, i, opt); + i = _a.#parseAST(str, ext, i, opt, extDepth + depthAdd); continue; } if (c === '|') { part.push(acc); acc = ''; parts.push(part); - part = new AST(null, ast); + part = new _a(null, ast); continue; } if (c === ')') { @@ -306,9 +441,82 @@ class AST { ast.#parts = [str.substring(pos - 1)]; return i; } + #canAdoptWithSpace(child) { + return this.#canAdopt(child, adoptionWithSpaceMap); + } + #canAdopt(child, map = adoptionMap) { + if (!child || + typeof child !== 'object' || + child.type !== null || + child.#parts.length !== 1 || + this.type === null) { + return false; + } + const gc = child.#parts[0]; + if (!gc || typeof gc !== 'object' || gc.type === null) { + return false; + } + return this.#canAdoptType(gc.type, map); + } + #canAdoptType(c, map = adoptionAnyMap) { + return !!map.get(this.type)?.includes(c); + } + #adoptWithSpace(child, index) { + const gc = child.#parts[0]; + const blank = new _a(null, gc, this.options); + blank.#parts.push(''); + gc.push(blank); + this.#adopt(child, index); + } + #adopt(child, index) { + const gc = child.#parts[0]; + this.#parts.splice(index, 1, ...gc.#parts); + for (const p of gc.#parts) { + if (typeof p === 'object') + p.#parent = this; + } + this.#toString = undefined; + } + #canUsurpType(c) { + const m = usurpMap.get(this.type); + return !!m?.has(c); + } + #canUsurp(child) { + if (!child || + typeof child !== 'object' || + child.type !== null || + child.#parts.length !== 1 || + this.type === null || + this.#parts.length !== 1) { + return false; + } + const gc = child.#parts[0]; + if (!gc || typeof gc !== 'object' || gc.type === null) { + return false; + } + return this.#canUsurpType(gc.type); + } + #usurp(child) { + const m = usurpMap.get(this.type); + const gc = child.#parts[0]; + const nt = m?.get(gc.type); + /* c8 ignore start - impossible */ + if (!nt) + return false; + /* c8 ignore stop */ + this.#parts = gc.#parts; + for (const p of this.#parts) { + if (typeof p === 'object') { + p.#parent = this; + } + } + this.type = nt; + this.#toString = undefined; + this.#emptyExt = false; + } static fromGlob(pattern, options = {}) { - const ast = new AST(null, undefined, options); - AST.#parseAST(pattern, ast, 0, options); + const ast = new _a(null, undefined, options); + _a.#parseAST(pattern, ast, 0, options, 0); return ast; } // returns the regular expression if there's magic, or the unescaped @@ -412,16 +620,18 @@ class AST { // or start or whatever) and prepend ^ or / at the Regexp construction. toRegExpSource(allowDot) { const dot = allowDot ?? !!this.#options.dot; - if (this.#root === this) + if (this.#root === this) { + this.#flatten(); this.#fillNegs(); - if (!this.type) { + } + if (!isExtglobAST(this)) { const noEmpty = this.isStart() && this.isEnd() && !this.#parts.some(s => typeof s !== 'string'); const src = this.#parts .map(p => { - const [re, _, hasMagic, uflag] = typeof p === 'string' - ? AST.#parseGlob(p, this.#hasMagic, noEmpty) + const [re, _, hasMagic, uflag] = typeof p === 'string' ? + _a.#parseGlob(p, this.#hasMagic, noEmpty) : p.toRegExpSource(allowDot); this.#hasMagic = this.#hasMagic || hasMagic; this.#uflag = this.#uflag || uflag; @@ -450,7 +660,10 @@ class AST { // no need to prevent dots if it can't match a dot, or if a // sub-pattern will be preventing it anyway. const needNoDot = !dot && !allowDot && aps.has(src.charAt(0)); - start = needNoTrav ? startNoTraversal : needNoDot ? startNoDot : ''; + start = + needNoTrav ? startNoTraversal + : needNoDot ? startNoDot + : ''; } } } @@ -480,14 +693,14 @@ class AST { // invalid extglob, has to at least be *something* present, if it's // the entire path portion. const s = this.toString(); - this.#parts = [s]; - this.type = null; - this.#hasMagic = undefined; + const me = this; + me.#parts = [s]; + me.type = null; + me.#hasMagic = undefined; return [s, (0, unescape_js_1.unescape)(this.toString()), false, false]; } - // XXX abstract out this map method - let bodyDotAllowed = !repeated || allowDot || dot || !startNoDot - ? '' + let bodyDotAllowed = !repeated || allowDot || dot || !startNoDot ? + '' : this.#partsToRegExp(true); if (bodyDotAllowed === body) { bodyDotAllowed = ''; @@ -501,20 +714,16 @@ class AST { final = (this.isStart() && !dot ? startNoDot : '') + starNoEmpty; } else { - const close = this.type === '!' - ? // !() must match something,but !(x) can match '' - '))' + - (this.isStart() && !dot && !allowDot ? startNoDot : '') + - star + - ')' - : this.type === '@' - ? ')' - : this.type === '?' - ? ')?' - : this.type === '+' && bodyDotAllowed - ? ')' - : this.type === '*' && bodyDotAllowed - ? `)?` + const close = this.type === '!' ? + // !() must match something,but !(x) can match '' + '))' + + (this.isStart() && !dot && !allowDot ? startNoDot : '') + + star + + ')' + : this.type === '@' ? ')' + : this.type === '?' ? ')?' + : this.type === '+' && bodyDotAllowed ? ')' + : this.type === '*' && bodyDotAllowed ? `)?` : `)${this.type}`; final = start + body + close; } @@ -525,6 +734,42 @@ class AST { this.#uflag, ]; } + #flatten() { + if (!isExtglobAST(this)) { + for (const p of this.#parts) { + if (typeof p === 'object') { + p.#flatten(); + } + } + } + else { + // do up to 10 passes to flatten as much as possible + let iterations = 0; + let done = false; + do { + done = true; + for (let i = 0; i < this.#parts.length; i++) { + const c = this.#parts[i]; + if (typeof c === 'object') { + c.#flatten(); + if (this.#canAdopt(c)) { + done = false; + this.#adopt(c, i); + } + else if (this.#canAdoptWithSpace(c)) { + done = false; + this.#adoptWithSpace(c, i); + } + else if (this.#canUsurp(c)) { + done = false; + this.#usurp(c); + } + } + } + } while (!done && ++iterations < 10); + } + this.#toString = undefined; + } #partsToRegExp(dot) { return this.#parts .map(p => { @@ -546,6 +791,8 @@ class AST { let escaping = false; let re = ''; let uflag = false; + // multiple stars that aren't globstars coalesce into one * + let inStar = false; for (let i = 0; i < glob.length; i++) { const c = glob.charAt(i); if (escaping) { @@ -553,6 +800,17 @@ class AST { re += (reSpecials.has(c) ? '\\' : '') + c; continue; } + if (c === '*') { + if (inStar) + continue; + inStar = true; + re += noEmpty && /^[*]+$/.test(glob) ? starNoEmpty : star; + hasMagic = true; + continue; + } + else { + inStar = false; + } if (c === '\\') { if (i === glob.length - 1) { re += '\\\\'; @@ -572,11 +830,6 @@ class AST { continue; } } - if (c === '*') { - re += noEmpty && glob === '*' ? starNoEmpty : star; - hasMagic = true; - continue; - } if (c === '?') { re += qmark; hasMagic = true; @@ -588,4 +841,5 @@ class AST { } } exports.AST = AST; +_a = AST; //# sourceMappingURL=ast.js.map \ No newline at end of file diff --git a/node_modules/minimatch/dist/commonjs/ast.js.map b/node_modules/minimatch/dist/commonjs/ast.js.map index 58a8abe9..3498fb26 100644 --- a/node_modules/minimatch/dist/commonjs/ast.js.map +++ b/node_modules/minimatch/dist/commonjs/ast.js.map @@ -1 +1 @@ -{"version":3,"file":"ast.js","sourceRoot":"","sources":["../../src/ast.ts"],"names":[],"mappings":";AAAA,8BAA8B;;;AAE9B,iEAAmD;AAEnD,+CAAwC;AAwCxC,MAAM,KAAK,GAAG,IAAI,GAAG,CAAc,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAA;AAC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W,CAAC,CAAC,CAAC,IAAI,CAAA;gBAClD,QAAQ,GAAG,IAAI,CAAA;gBACf,SAAQ;YACV,CAAC;YACD,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;gBACd,EAAE,IAAI,KAAK,CAAA;gBACX,QAAQ,GAAG,IAAI,CAAA;gBACf,SAAQ;YACV,CAAC;YACD,EAAE,IAAI,YAAY,CAAC,CAAC,CAAC,CAAA;QACvB,CAAC;QACD,OAAO,CAAC,EAAE,EAAE,IAAA,sBAAQ,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAA;IAChD,CAAC;CACF;AAjlBD,kBAilBC","sourcesContent":["// parse a single path portion\n\nimport { parseClass } from './brace-expressions.js'\nimport { MinimatchOptions, MMRegExp } from './index.js'\nimport { unescape } from './unescape.js'\n\n// classes [] are handled by the parseClass method\n// for positive extglobs, we sub-parse the contents, and combine,\n// with the appropriate regexp close.\n// for negative extglobs, we sub-parse the contents, but then\n// have to include the rest of the pattern, then the parent, etc.,\n// as the thing that cannot be because RegExp negative lookaheads\n// are different from globs.\n//\n// So for example:\n// a@(i|w!(x|y)z|j)b => ^a(i|w((!?(x|y)zb).*)z|j)b$\n// 1 2 3 4 5 6 1 2 3 46 5 6\n//\n// Assembling the extglob requires not just the negated patterns themselves,\n// but also anything following the negative patterns up to the boundary\n// of the current pattern, plus anything following in the parent pattern.\n//\n//\n// So, first, we parse the string into an AST of extglobs, without turning\n// anything into regexps yet.\n//\n// ['a', {@ [['i'], ['w', {!['x', 'y']}, 'z'], ['j']]}, 'b']\n//\n// Then, for all the negative extglobs, we append whatever comes after in\n// each parent as their tail\n//\n// ['a', {@ [['i'], ['w', {!['x', 'y'], 'z', 'b'}, 'z'], ['j']]}, 'b']\n//\n// Lastly, we turn each of these pieces into a regexp, and join\n//\n// v----- .* because there's more following,\n// v v otherwise, .+ because it must be\n// v v *something* there.\n// ['^a', {@ ['i', 'w(?:(!?(?:x|y).*zb$).*)z', 'j' ]}, 'b$']\n// copy what follows into here--^^^^^\n// ['^a', '(?:i|w(?:(?!(?:x|y).*zb$).*)z|j)', 'b$']\n// ['^a(?:i|w(?:(?!(?:x|y).*zb$).*)z|j)b$']\n\nexport type ExtglobType = '!' | '?' | '+' | '*' | '@'\nconst types = new Set(['!', '?', '+', '*', '@'])\nconst isExtglobType = (c: string): c is ExtglobType =>\n types.has(c as ExtglobType)\n\n// Patterns that get prepended to bind to the start of either the\n// entire string, or just a single path portion, to prevent dots\n// and/or traversal patterns, when needed.\n// Exts don't need the ^ or / bit, because the root binds that already.\nconst startNoTraversal = '(?!(?:^|/)\\\\.\\\\.?(?:$|/))'\nconst startNoDot = '(?!\\\\.)'\n\n// characters that indicate a start of pattern needs the \"no dots\" bit,\n// because a dot *might* be matched. ( is not in the list, because in\n// the case of a child extglob, it will handle the prevention itself.\nconst addPatternStart = new Set(['[', '.'])\n// cases where traversal is A-OK, no dot prevention needed\nconst justDots = new Set(['..', '.'])\nconst reSpecials = new Set('().*{}+?[]^$\\\\!')\nconst regExpEscape = (s: string) =>\n s.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&')\n\n// any single thing other than /\nconst qmark = '[^/]'\n\n// * => any number of characters\nconst star = qmark + '*?'\n// use + when we need to ensure that *something* matches, because the * is\n// the only thing in the path portion.\nconst starNoEmpty = qmark + '+?'\n\n// remove the \\ chars that we added if we end up doing a nonmagic compare\n// const deslash = (s: string) => s.replace(/\\\\(.)/g, '$1')\n\nexport class AST {\n type: ExtglobType | null\n readonly #root: AST\n\n #hasMagic?: boolean\n #uflag: boolean = false\n #parts: (string | AST)[] = []\n readonly #parent?: AST\n readonly #parentIndex: number\n #negs: AST[]\n #filledNegs: boolean = false\n #options: MinimatchOptions\n #toString?: string\n // set to true if it's an extglob with no children\n // (which really means one child of '')\n #emptyExt: boolean = false\n\n constructor(\n type: ExtglobType | null,\n parent?: AST,\n options: MinimatchOptions = {},\n ) {\n this.type = type\n // extglobs are inherently magical\n if (type) this.#hasMagic = true\n this.#parent = parent\n this.#root = this.#parent ? this.#parent.#root : this\n this.#options = this.#root === this ? options : this.#root.#options\n this.#negs = this.#root === this ? [] : this.#root.#negs\n if (type === '!' && !this.#root.#filledNegs) this.#negs.push(this)\n this.#parentIndex = this.#parent ? this.#parent.#parts.length : 0\n }\n\n get hasMagic(): boolean | undefined {\n /* c8 ignore start */\n if (this.#hasMagic !== undefined) return this.#hasMagic\n /* c8 ignore stop */\n for (const p of this.#parts) {\n if (typeof p === 'string') continue\n if (p.type || p.hasMagic) return (this.#hasMagic = true)\n }\n // note: will be undefined until we generate the regexp src and find out\n return this.#hasMagic\n }\n\n // reconstructs the pattern\n toString(): string {\n if (this.#toString !== undefined) return this.#toString\n if (!this.type) {\n return (this.#toString = this.#parts.map(p => String(p)).join(''))\n } else {\n return (this.#toString =\n this.type + '(' + this.#parts.map(p => String(p)).join('|') + ')')\n }\n }\n\n #fillNegs() {\n /* c8 ignore start */\n if (this !== this.#root) throw new Error('should only call on root')\n if (this.#filledNegs) return this\n /* c8 ignore stop */\n\n // call toString() once to fill this out\n this.toString()\n this.#filledNegs = true\n let n: AST | undefined\n while ((n = this.#negs.pop())) {\n if (n.type !== '!') continue\n // walk up the tree, appending everthing that comes AFTER parentIndex\n let p: AST | undefined = n\n let pp = p.#parent\n while (pp) {\n for (\n let i = p.#parentIndex + 1;\n !pp.type && i < pp.#parts.length;\n i++\n ) {\n for (const part of n.#parts) {\n /* c8 ignore start */\n if (typeof part === 'string') {\n throw new Error('string part in extglob AST??')\n }\n /* c8 ignore stop */\n part.copyIn(pp.#parts[i])\n }\n }\n p = pp\n pp = p.#parent\n }\n }\n return this\n }\n\n push(...parts: (string | AST)[]) {\n for (const p of parts) {\n if (p === '') continue\n /* c8 ignore start */\n if (typeof p !== 'string' && !(p instanceof AST && p.#parent === this)) {\n throw new Error('invalid part: ' + p)\n }\n /* c8 ignore stop */\n this.#parts.push(p)\n }\n }\n\n toJSON() {\n const ret: any[] =\n this.type === null\n ? this.#parts.slice().map(p => (typeof p === 'string' ? p : p.toJSON()))\n : [this.type, ...this.#parts.map(p => (p as AST).toJSON())]\n if (this.isStart() && !this.type) ret.unshift([])\n if (\n this.isEnd() &&\n (this === this.#root ||\n (this.#root.#filledNegs && this.#parent?.type === '!'))\n ) {\n ret.push({})\n }\n return ret\n }\n\n isStart(): boolean {\n if (this.#root === this) return true\n // if (this.type) return !!this.#parent?.isStart()\n if (!this.#parent?.isStart()) return false\n if (this.#parentIndex === 0) return true\n // if everything AHEAD of this is a negation, then it's still the \"start\"\n const p = this.#parent\n for (let i = 0; i < this.#parentIndex; i++) {\n const pp = p.#parts[i]\n if (!(pp instanceof AST && pp.type === '!')) {\n return false\n }\n }\n return true\n }\n\n isEnd(): boolean {\n if (this.#root === this) return true\n if (this.#parent?.type === '!') return true\n if (!this.#parent?.isEnd()) return false\n if (!this.type) return this.#parent?.isEnd()\n // if not root, it'll always have a parent\n /* c8 ignore start */\n const pl = this.#parent ? this.#parent.#parts.length : 0\n /* c8 ignore stop */\n return this.#parentIndex === pl - 1\n }\n\n copyIn(part: AST | string) {\n if (typeof part === 'string') this.push(part)\n else this.push(part.clone(this))\n }\n\n clone(parent: AST) {\n const c = new AST(this.type, parent)\n for (const p of this.#parts) {\n c.copyIn(p)\n }\n return c\n }\n\n static #parseAST(\n str: string,\n ast: AST,\n pos: number,\n opt: MinimatchOptions,\n ): number {\n let escaping = false\n let inBrace = false\n let braceStart = -1\n let braceNeg = false\n if (ast.type === null) {\n // outside of a extglob, append until we find a start\n let i = pos\n let acc = ''\n while (i < str.length) {\n const c = str.charAt(i++)\n // still accumulate escapes at this point, but we do ignore\n // starts that are escaped\n if (escaping || c === '\\\\') {\n escaping = !escaping\n acc += c\n continue\n }\n\n if (inBrace) {\n if (i === braceStart + 1) {\n if (c === '^' || c === '!') {\n braceNeg = true\n }\n } else if (c === ']' && !(i === braceStart + 2 && braceNeg)) {\n inBrace = false\n }\n acc += c\n continue\n } else if (c === '[') {\n inBrace = true\n braceStart = i\n braceNeg = false\n acc += c\n continue\n }\n\n if (!opt.noext && isExtglobType(c) && str.charAt(i) === '(') {\n ast.push(acc)\n acc = ''\n const ext = new AST(c, ast)\n i = AST.#parseAST(str, ext, i, opt)\n ast.push(ext)\n continue\n }\n acc += c\n }\n ast.push(acc)\n return i\n }\n\n // some kind of extglob, pos is at the (\n // find the next | or )\n let i = pos + 1\n let part = new AST(null, ast)\n const parts: AST[] = []\n let acc = ''\n while (i < str.length) {\n const c = str.charAt(i++)\n // still accumulate escapes at this point, but we do ignore\n // starts that are escaped\n if (escaping || c === '\\\\') {\n escaping = !escaping\n acc += c\n continue\n }\n\n if (inBrace) {\n if (i === braceStart + 1) {\n if (c === '^' || c === '!') {\n braceNeg = true\n }\n } else if (c === ']' && !(i === braceStart + 2 && braceNeg)) {\n inBrace = false\n }\n acc += c\n continue\n } else if (c === '[') {\n inBrace = true\n braceStart = i\n braceNeg = false\n acc += c\n continue\n }\n\n if (isExtglobType(c) && str.charAt(i) === '(') {\n part.push(acc)\n acc = ''\n const ext = new AST(c, part)\n part.push(ext)\n i = AST.#parseAST(str, ext, i, opt)\n continue\n }\n if (c === '|') {\n part.push(acc)\n acc = ''\n parts.push(part)\n part = new AST(null, ast)\n continue\n }\n if (c === ')') {\n if (acc === '' && ast.#parts.length === 0) {\n ast.#emptyExt = true\n }\n part.push(acc)\n acc = ''\n ast.push(...parts, part)\n return i\n }\n acc += c\n }\n\n // unfinished extglob\n // if we got here, it was a malformed extglob! not an extglob, but\n // maybe something else in there.\n ast.type = null\n ast.#hasMagic = undefined\n ast.#parts = [str.substring(pos - 1)]\n return i\n }\n\n static fromGlob(pattern: string, options: MinimatchOptions = {}) {\n const ast = new AST(null, undefined, options)\n AST.#parseAST(pattern, ast, 0, options)\n return ast\n }\n\n // returns the regular expression if there's magic, or the unescaped\n // string if not.\n toMMPattern(): MMRegExp | string {\n // should only be called on root\n /* c8 ignore start */\n if (this !== this.#root) return this.#root.toMMPattern()\n /* c8 ignore stop */\n const glob = this.toString()\n const [re, body, hasMagic, uflag] = this.toRegExpSource()\n // if we're in nocase mode, and not nocaseMagicOnly, then we do\n // still need a regular expression if we have to case-insensitively\n // match capital/lowercase characters.\n const anyMagic =\n hasMagic ||\n this.#hasMagic ||\n (this.#options.nocase &&\n !this.#options.nocaseMagicOnly &&\n glob.toUpperCase() !== glob.toLowerCase())\n if (!anyMagic) {\n return body\n }\n\n const flags = (this.#options.nocase ? 'i' : '') + (uflag ? 'u' : '')\n return Object.assign(new RegExp(`^${re}$`, flags), {\n _src: re,\n _glob: glob,\n })\n }\n\n get options() {\n return this.#options\n }\n\n // returns the string match, the regexp source, whether there's magic\n // in the regexp (so a regular expression is required) and whether or\n // not the uflag is needed for the regular expression (for posix classes)\n // TODO: instead of injecting the start/end at this point, just return\n // the BODY of the regexp, along with the start/end portions suitable\n // for binding the start/end in either a joined full-path makeRe context\n // (where we bind to (^|/), or a standalone matchPart context (where\n // we bind to ^, and not /). Otherwise slashes get duped!\n //\n // In part-matching mode, the start is:\n // - if not isStart: nothing\n // - if traversal possible, but not allowed: ^(?!\\.\\.?$)\n // - if dots allowed or not possible: ^\n // - if dots possible and not allowed: ^(?!\\.)\n // end is:\n // - if not isEnd(): nothing\n // - else: $\n //\n // In full-path matching mode, we put the slash at the START of the\n // pattern, so start is:\n // - if first pattern: same as part-matching mode\n // - if not isStart(): nothing\n // - if traversal possible, but not allowed: /(?!\\.\\.?(?:$|/))\n // - if dots allowed or not possible: /\n // - if dots possible and not allowed: /(?!\\.)\n // end is:\n // - if last pattern, same as part-matching mode\n // - else nothing\n //\n // Always put the (?:$|/) on negated tails, though, because that has to be\n // there to bind the end of the negated pattern portion, and it's easier to\n // just stick it in now rather than try to inject it later in the middle of\n // the pattern.\n //\n // We can just always return the same end, and leave it up to the caller\n // to know whether it's going to be used joined or in parts.\n // And, if the start is adjusted slightly, can do the same there:\n // - if not isStart: nothing\n // - if traversal possible, but not allowed: (?:/|^)(?!\\.\\.?$)\n // - if dots allowed or not possible: (?:/|^)\n // - if dots possible and not allowed: (?:/|^)(?!\\.)\n //\n // But it's better to have a simpler binding without a conditional, for\n // performance, so probably better to return both start options.\n //\n // Then the caller just ignores the end if it's not the first pattern,\n // and the start always gets applied.\n //\n // But that's always going to be $ if it's the ending pattern, or nothing,\n // so the caller can just attach $ at the end of the pattern when building.\n //\n // So the todo is:\n // - better detect what kind of start is needed\n // - return both flavors of starting pattern\n // - attach $ at the end of the pattern when creating the actual RegExp\n //\n // Ah, but wait, no, that all only applies to the root when the first pattern\n // is not an extglob. If the first pattern IS an extglob, then we need all\n // that dot prevention biz to live in the extglob portions, because eg\n // +(*|.x*) can match .xy but not .yx.\n //\n // So, return the two flavors if it's #root and the first child is not an\n // AST, otherwise leave it to the child AST to handle it, and there,\n // use the (?:^|/) style of start binding.\n //\n // Even simplified further:\n // - Since the start for a join is eg /(?!\\.) and the start for a part\n // is ^(?!\\.), we can just prepend (?!\\.) to the pattern (either root\n // or start or whatever) and prepend ^ or / at the Regexp construction.\n toRegExpSource(\n allowDot?: boolean,\n ): [re: string, body: string, hasMagic: boolean, uflag: boolean] {\n const dot = allowDot ?? !!this.#options.dot\n if (this.#root === this) this.#fillNegs()\n if (!this.type) {\n const noEmpty =\n this.isStart() &&\n this.isEnd() &&\n !this.#parts.some(s => typeof s !== 'string')\n const src = this.#parts\n .map(p => {\n const [re, _, hasMagic, uflag] =\n typeof p === 'string'\n ? AST.#parseGlob(p, this.#hasMagic, noEmpty)\n : p.toRegExpSource(allowDot)\n this.#hasMagic = this.#hasMagic || hasMagic\n this.#uflag = this.#uflag || uflag\n return re\n })\n .join('')\n\n let start = ''\n if (this.isStart()) {\n if (typeof this.#parts[0] === 'string') {\n // this is the string that will match the start of the pattern,\n // so we need to protect against dots and such.\n\n // '.' and '..' cannot match unless the pattern is that exactly,\n // even if it starts with . or dot:true is set.\n const dotTravAllowed =\n this.#parts.length === 1 && justDots.has(this.#parts[0])\n if (!dotTravAllowed) {\n const aps = addPatternStart\n // check if we have a possibility of matching . or ..,\n // and prevent that.\n const needNoTrav =\n // dots are allowed, and the pattern starts with [ or .\n (dot && aps.has(src.charAt(0))) ||\n // the pattern starts with \\., and then [ or .\n (src.startsWith('\\\\.') && aps.has(src.charAt(2))) ||\n // the pattern starts with \\.\\., and then [ or .\n (src.startsWith('\\\\.\\\\.') && aps.has(src.charAt(4)))\n // no need to prevent dots if it can't match a dot, or if a\n // sub-pattern will be preventing it anyway.\n const needNoDot = !dot && !allowDot && aps.has(src.charAt(0))\n\n start = needNoTrav ? startNoTraversal : needNoDot ? startNoDot : ''\n }\n }\n }\n\n // append the \"end of path portion\" pattern to negation tails\n let end = ''\n if (\n this.isEnd() &&\n this.#root.#filledNegs &&\n this.#parent?.type === '!'\n ) {\n end = '(?:$|\\\\/)'\n }\n const final = start + src + end\n return [\n final,\n unescape(src),\n (this.#hasMagic = !!this.#hasMagic),\n this.#uflag,\n ]\n }\n\n // We need to calculate the body *twice* if it's a repeat pattern\n // at the start, once in nodot mode, then again in dot mode, so a\n // pattern like *(?) can match 'x.y'\n\n const repeated = this.type === '*' || this.type === '+'\n // some kind of extglob\n const start = this.type === '!' ? '(?:(?!(?:' : '(?:'\n let body = this.#partsToRegExp(dot)\n\n if (this.isStart() && this.isEnd() && !body && this.type !== '!') {\n // invalid extglob, has to at least be *something* present, if it's\n // the entire path portion.\n const s = this.toString()\n this.#parts = [s]\n this.type = null\n this.#hasMagic = undefined\n return [s, unescape(this.toString()), false, false]\n }\n\n // XXX abstract out this map method\n let bodyDotAllowed =\n !repeated || allowDot || dot || !startNoDot\n ? ''\n : this.#partsToRegExp(true)\n if (bodyDotAllowed === body) {\n bodyDotAllowed = ''\n }\n if (bodyDotAllowed) {\n body = `(?:${body})(?:${bodyDotAllowed})*?`\n }\n\n // an empty !() is exactly equivalent to a starNoEmpty\n let final = ''\n if (this.type === '!' && this.#emptyExt) {\n final = (this.isStart() && !dot ? startNoDot : '') + starNoEmpty\n } else {\n const close =\n this.type === '!'\n ? // !() must match something,but !(x) can match ''\n '))' +\n (this.isStart() && !dot && !allowDot ? startNoDot : '') +\n star +\n ')'\n : this.type === '@'\n ? ')'\n : this.type === '?'\n ? ')?'\n : this.type === '+' && bodyDotAllowed\n ? ')'\n : this.type === '*' && bodyDotAllowed\n ? `)?`\n : `)${this.type}`\n final = start + body + close\n }\n return [\n final,\n unescape(body),\n (this.#hasMagic = !!this.#hasMagic),\n this.#uflag,\n ]\n }\n\n #partsToRegExp(dot: boolean) {\n return this.#parts\n .map(p => {\n // extglob ASTs should only contain parent ASTs\n /* c8 ignore start */\n if (typeof p === 'string') {\n throw new Error('string type in extglob ast??')\n }\n /* c8 ignore stop */\n // can ignore hasMagic, because extglobs are already always magic\n const [re, _, _hasMagic, uflag] = p.toRegExpSource(dot)\n this.#uflag = this.#uflag || uflag\n return re\n })\n .filter(p => !(this.isStart() && this.isEnd()) || !!p)\n .join('|')\n }\n\n static #parseGlob(\n glob: string,\n hasMagic: boolean | undefined,\n noEmpty: boolean = false,\n ): [re: string, body: string, hasMagic: boolean, uflag: boolean] {\n let escaping = false\n let re = ''\n let uflag = false\n for (let i = 0; i < glob.length; i++) {\n const c = glob.charAt(i)\n if (escaping) {\n escaping = false\n re += (reSpecials.has(c) ? '\\\\' : '') + c\n continue\n }\n if (c === '\\\\') {\n if (i === glob.length - 1) {\n re += '\\\\\\\\'\n } else {\n escaping = true\n }\n continue\n }\n if (c === '[') {\n const [src, needUflag, consumed, magic] = parseClass(glob, i)\n if (consumed) {\n re += src\n uflag = uflag || needUflag\n i += consumed - 1\n hasMagic = hasMagic || magic\n continue\n }\n }\n if (c === '*') {\n re += noEmpty && glob === '*' ? starNoEmpty : star\n hasMagic = true\n continue\n }\n if (c === '?') {\n re += qmark\n hasMagic = true\n continue\n }\n re += regExpEscape(c)\n }\n return [re, unescape(glob), !!hasMagic, uflag]\n }\n}\n"]} \ No newline at end of file +{"version":3,"file":"ast.js","sourceRoot":"","sources":["../../src/ast.ts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,GAAG,EAAE,CAAC;gBACd,EAAE,IAAI,KAAK,CAAA;gBACX,QAAQ,GAAG,IAAI,CAAA;gBACf,SAAQ;YACV,CAAC;YACD,EAAE,IAAI,YAAY,CAAC,CAAC,CAAC,CAAA;QACvB,CAAC;QACD,OAAO,CAAC,EAAE,EAAE,IAAA,sBAAQ,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAA;IAChD,CAAC;CACF;AArxBD,kBAqxBC","sourcesContent":["// parse a single path portion\n\nimport { parseClass } from './brace-expressions.js'\nimport type { MinimatchOptions, MMRegExp } from './index.js'\nimport { unescape } from './unescape.js'\n\n// classes [] are handled by the parseClass method\n// for positive extglobs, we sub-parse the contents, and combine,\n// with the appropriate regexp close.\n// for negative extglobs, we sub-parse the contents, but then\n// have to include the rest of the pattern, then the parent, etc.,\n// as the thing that cannot be because RegExp negative lookaheads\n// are different from globs.\n//\n// So for example:\n// a@(i|w!(x|y)z|j)b => ^a(i|w((!?(x|y)zb).*)z|j)b$\n// 1 2 3 4 5 6 1 2 3 46 5 6\n//\n// Assembling the extglob requires not just the negated patterns themselves,\n// but also anything following the negative patterns up to the boundary\n// of the current pattern, plus anything following in the parent pattern.\n//\n//\n// So, first, we parse the string into an AST of extglobs, without turning\n// anything into regexps yet.\n//\n// ['a', {@ [['i'], ['w', {!['x', 'y']}, 'z'], ['j']]}, 'b']\n//\n// Then, for all the negative extglobs, we append whatever comes after in\n// each parent as their tail\n//\n// ['a', {@ [['i'], ['w', {!['x', 'y'], 'z', 'b'}, 'z'], ['j']]}, 'b']\n//\n// Lastly, we turn each of these pieces into a regexp, and join\n//\n// v----- .* because there's more following,\n// v v otherwise, .+ because it must be\n// v v *something* there.\n// ['^a', {@ ['i', 'w(?:(!?(?:x|y).*zb$).*)z', 'j' ]}, 'b$']\n// copy what follows into here--^^^^^\n// ['^a', '(?:i|w(?:(?!(?:x|y).*zb$).*)z|j)', 'b$']\n// ['^a(?:i|w(?:(?!(?:x|y).*zb$).*)z|j)b$']\n\nexport type ExtglobType = '!' | '?' | '+' | '*' | '@'\nconst types = new Set(['!', '?', '+', '*', '@'])\nconst isExtglobType = (c: string | null): c is ExtglobType =>\n types.has(c as ExtglobType)\nconst isExtglobAST = (c: AST): c is AST & { type: ExtglobType } =>\n isExtglobType(c.type)\n\n// Map of which extglob types can adopt the children of a nested extglob\n//\n// anything but ! can adopt a matching type:\n// +(a|+(b|c)|d) => +(a|b|c|d)\n// *(a|*(b|c)|d) => *(a|b|c|d)\n// @(a|@(b|c)|d) => @(a|b|c|d)\n// ?(a|?(b|c)|d) => ?(a|b|c|d)\n//\n// * can adopt anything, because 0 or repetition is allowed\n// *(a|?(b|c)|d) => *(a|b|c|d)\n// *(a|+(b|c)|d) => *(a|b|c|d)\n// *(a|@(b|c)|d) => *(a|b|c|d)\n//\n// + can adopt @, because 1 or repetition is allowed\n// +(a|@(b|c)|d) => +(a|b|c|d)\n//\n// + and @ CANNOT adopt *, because 0 would be allowed\n// +(a|*(b|c)|d) => would match \"\", on *(b|c)\n// @(a|*(b|c)|d) => would match \"\", on *(b|c)\n//\n// + and @ CANNOT adopt ?, because 0 would be allowed\n// +(a|?(b|c)|d) => would match \"\", on ?(b|c)\n// @(a|?(b|c)|d) => would match \"\", on ?(b|c)\n//\n// ? can adopt @, because 0 or 1 is allowed\n// ?(a|@(b|c)|d) => ?(a|b|c|d)\n//\n// ? and @ CANNOT adopt * or +, because >1 would be allowed\n// ?(a|*(b|c)|d) => would match bbb on *(b|c)\n// @(a|*(b|c)|d) => would match bbb on *(b|c)\n// ?(a|+(b|c)|d) => would match bbb on +(b|c)\n// @(a|+(b|c)|d) => would match bbb on +(b|c)\n//\n// ! CANNOT adopt ! (nothing else can either)\n// !(a|!(b|c)|d) => !(a|b|c|d) would fail to match on b (not not b|c)\n//\n// ! can adopt @\n// !(a|@(b|c)|d) => !(a|b|c|d)\n//\n// ! CANNOT adopt *\n// !(a|*(b|c)|d) => !(a|b|c|d) would match on bbb, not allowed\n//\n// ! CANNOT adopt +\n// !(a|+(b|c)|d) => !(a|b|c|d) would match on bbb, not allowed\n//\n// ! CANNOT adopt ?\n// x!(a|?(b|c)|d) => x!(a|b|c|d) would fail to match \"x\"\nconst adoptionMap = new Map([\n ['!', ['@']],\n ['?', ['?', '@']],\n ['@', ['@']],\n ['*', ['*', '+', '?', '@']],\n ['+', ['+', '@']],\n])\n\n// nested extglobs that can be adopted in, but with the addition of\n// a blank '' element.\nconst adoptionWithSpaceMap = new Map([\n ['!', ['?']],\n ['@', ['?']],\n ['+', ['?', '*']],\n])\n\n// union of the previous two maps\nconst adoptionAnyMap = new Map([\n ['!', ['?', '@']],\n ['?', ['?', '@']],\n ['@', ['?', '@']],\n ['*', ['*', '+', '?', '@']],\n ['+', ['+', '@', '?', '*']],\n])\n\n// Extglobs that can take over their parent if they are the only child\n// the key is parent, value maps child to resulting extglob parent type\n// '@' is omitted because it's a special case. An `@` extglob with a single\n// member can always be usurped by that subpattern.\nconst usurpMap = new Map<\n ExtglobType,\n Map\n>([\n ['!', new Map([['!', '@']])],\n [\n '?',\n new Map([\n ['*', '*'],\n ['+', '*'],\n ]),\n ],\n [\n '@',\n new Map([\n ['!', '!'],\n ['?', '?'],\n ['@', '@'],\n ['*', '*'],\n ['+', '+'],\n ]),\n ],\n [\n '+',\n new Map([\n ['?', '*'],\n ['*', '*'],\n ]),\n ],\n])\n\n// Patterns that get prepended to bind to the start of either the\n// entire string, or just a single path portion, to prevent dots\n// and/or traversal patterns, when needed.\n// Exts don't need the ^ or / bit, because the root binds that already.\nconst startNoTraversal = '(?!(?:^|/)\\\\.\\\\.?(?:$|/))'\nconst startNoDot = '(?!\\\\.)'\n\n// characters that indicate a start of pattern needs the \"no dots\" bit,\n// because a dot *might* be matched. ( is not in the list, because in\n// the case of a child extglob, it will handle the prevention itself.\nconst addPatternStart = new Set(['[', '.'])\n// cases where traversal is A-OK, no dot prevention needed\nconst justDots = new Set(['..', '.'])\nconst reSpecials = new Set('().*{}+?[]^$\\\\!')\nconst regExpEscape = (s: string) =>\n s.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&')\n\n// any single thing other than /\nconst qmark = '[^/]'\n\n// * => any number of characters\nconst star = qmark + '*?'\n// use + when we need to ensure that *something* matches, because the * is\n// the only thing in the path portion.\nconst starNoEmpty = qmark + '+?'\n\n// remove the \\ chars that we added if we end up doing a nonmagic compare\n// const deslash = (s: string) => s.replace(/\\\\(.)/g, '$1')\n\nlet ID = 0\nexport class AST {\n type: ExtglobType | null\n readonly #root: AST\n\n #hasMagic?: boolean\n #uflag: boolean = false\n #parts: (string | AST)[] = []\n #parent?: AST\n #parentIndex: number\n #negs: AST[]\n #filledNegs: boolean = false\n #options: MinimatchOptions\n #toString?: string\n // set to true if it's an extglob with no children\n // (which really means one child of '')\n #emptyExt: boolean = false\n id = ++ID\n\n get depth(): number {\n return (this.#parent?.depth ?? -1) + 1\n }\n\n [Symbol.for('nodejs.util.inspect.custom')]() {\n return {\n '@@type': 'AST',\n id: this.id,\n type: this.type,\n root: this.#root.id,\n parent: this.#parent?.id,\n depth: this.depth,\n partsLength: this.#parts.length,\n parts: this.#parts,\n }\n }\n\n constructor(\n type: ExtglobType | null,\n parent?: AST,\n options: MinimatchOptions = {},\n ) {\n this.type = type\n // extglobs are inherently magical\n if (type) this.#hasMagic = true\n this.#parent = parent\n this.#root = this.#parent ? this.#parent.#root : this\n this.#options = this.#root === this ? options : this.#root.#options\n this.#negs = this.#root === this ? [] : this.#root.#negs\n if (type === '!' && !this.#root.#filledNegs) this.#negs.push(this)\n this.#parentIndex = this.#parent ? this.#parent.#parts.length : 0\n }\n\n get hasMagic(): boolean | undefined {\n /* c8 ignore start */\n if (this.#hasMagic !== undefined) return this.#hasMagic\n /* c8 ignore stop */\n for (const p of this.#parts) {\n if (typeof p === 'string') continue\n if (p.type || p.hasMagic) return (this.#hasMagic = true)\n }\n // note: will be undefined until we generate the regexp src and find out\n return this.#hasMagic\n }\n\n // reconstructs the pattern\n toString(): string {\n return (\n this.#toString !== undefined ? this.#toString\n : !this.type ?\n (this.#toString = this.#parts.map(p => String(p)).join(''))\n : (this.#toString =\n this.type +\n '(' +\n this.#parts.map(p => String(p)).join('|') +\n ')')\n )\n }\n\n #fillNegs() {\n /* c8 ignore start */\n if (this !== this.#root) throw new Error('should only call on root')\n if (this.#filledNegs) return this\n /* c8 ignore stop */\n\n // call toString() once to fill this out\n this.toString()\n this.#filledNegs = true\n let n: AST | undefined\n while ((n = this.#negs.pop())) {\n if (n.type !== '!') continue\n // walk up the tree, appending everthing that comes AFTER parentIndex\n let p: AST | undefined = n\n let pp = p.#parent\n while (pp) {\n for (\n let i = p.#parentIndex + 1;\n !pp.type && i < pp.#parts.length;\n i++\n ) {\n for (const part of n.#parts) {\n /* c8 ignore start */\n if (typeof part === 'string') {\n throw new Error('string part in extglob AST??')\n }\n /* c8 ignore stop */\n part.copyIn(pp.#parts[i])\n }\n }\n p = pp\n pp = p.#parent\n }\n }\n return this\n }\n\n push(...parts: (string | AST)[]) {\n for (const p of parts) {\n if (p === '') continue\n /* c8 ignore start */\n if (\n typeof p !== 'string' &&\n !(p instanceof AST && p.#parent === this)\n ) {\n throw new Error('invalid part: ' + p)\n }\n /* c8 ignore stop */\n this.#parts.push(p)\n }\n }\n\n toJSON() {\n const ret: unknown[] =\n this.type === null ?\n this.#parts\n .slice()\n .map(p => (typeof p === 'string' ? p : p.toJSON()))\n : [this.type, ...this.#parts.map(p => (p as AST).toJSON())]\n if (this.isStart() && !this.type) ret.unshift([])\n if (\n this.isEnd() &&\n (this === this.#root ||\n (this.#root.#filledNegs && this.#parent?.type === '!'))\n ) {\n ret.push({})\n }\n return ret\n }\n\n isStart(): boolean {\n if (this.#root === this) return true\n // if (this.type) return !!this.#parent?.isStart()\n if (!this.#parent?.isStart()) return false\n if (this.#parentIndex === 0) return true\n // if everything AHEAD of this is a negation, then it's still the \"start\"\n const p = this.#parent\n for (let i = 0; i < this.#parentIndex; i++) {\n const pp = p.#parts[i]\n if (!(pp instanceof AST && pp.type === '!')) {\n return false\n }\n }\n return true\n }\n\n isEnd(): boolean {\n if (this.#root === this) return true\n if (this.#parent?.type === '!') return true\n if (!this.#parent?.isEnd()) return false\n if (!this.type) return this.#parent?.isEnd()\n // if not root, it'll always have a parent\n /* c8 ignore start */\n const pl = this.#parent ? this.#parent.#parts.length : 0\n /* c8 ignore stop */\n return this.#parentIndex === pl - 1\n }\n\n copyIn(part: AST | string) {\n if (typeof part === 'string') this.push(part)\n else this.push(part.clone(this))\n }\n\n clone(parent: AST) {\n const c = new AST(this.type, parent)\n for (const p of this.#parts) {\n c.copyIn(p)\n }\n return c\n }\n\n static #parseAST(\n str: string,\n ast: AST,\n pos: number,\n opt: MinimatchOptions,\n extDepth: number,\n ): number {\n const maxDepth = opt.maxExtglobRecursion ?? 2\n let escaping = false\n let inBrace = false\n let braceStart = -1\n let braceNeg = false\n if (ast.type === null) {\n // outside of a extglob, append until we find a start\n let i = pos\n let acc = ''\n while (i < str.length) {\n const c = str.charAt(i++)\n // still accumulate escapes at this point, but we do ignore\n // starts that are escaped\n if (escaping || c === '\\\\') {\n escaping = !escaping\n acc += c\n continue\n }\n\n if (inBrace) {\n if (i === braceStart + 1) {\n if (c === '^' || c === '!') {\n braceNeg = true\n }\n } else if (c === ']' && !(i === braceStart + 2 && braceNeg)) {\n inBrace = false\n }\n acc += c\n continue\n } else if (c === '[') {\n inBrace = true\n braceStart = i\n braceNeg = false\n acc += c\n continue\n }\n\n // we don't have to check for adoption here, because that's\n // done at the other recursion point.\n const doRecurse =\n !opt.noext &&\n isExtglobType(c) &&\n str.charAt(i) === '(' &&\n extDepth <= maxDepth\n if (doRecurse) {\n ast.push(acc)\n acc = ''\n const ext = new AST(c, ast)\n i = AST.#parseAST(str, ext, i, opt, extDepth + 1)\n ast.push(ext)\n continue\n }\n acc += c\n }\n ast.push(acc)\n return i\n }\n\n // some kind of extglob, pos is at the (\n // find the next | or )\n let i = pos + 1\n let part = new AST(null, ast)\n const parts: AST[] = []\n let acc = ''\n while (i < str.length) {\n const c = str.charAt(i++)\n // still accumulate escapes at this point, but we do ignore\n // starts that are escaped\n if (escaping || c === '\\\\') {\n escaping = !escaping\n acc += c\n continue\n }\n\n if (inBrace) {\n if (i === braceStart + 1) {\n if (c === '^' || c === '!') {\n braceNeg = true\n }\n } else if (c === ']' && !(i === braceStart + 2 && braceNeg)) {\n inBrace = false\n }\n acc += c\n continue\n } else if (c === '[') {\n inBrace = true\n braceStart = i\n braceNeg = false\n acc += c\n continue\n }\n\n const doRecurse =\n !opt.noext &&\n isExtglobType(c) &&\n str.charAt(i) === '(' &&\n /* c8 ignore start - the maxDepth is sufficient here */\n (extDepth <= maxDepth || (ast && ast.#canAdoptType(c)))\n /* c8 ignore stop */\n if (doRecurse) {\n const depthAdd = ast && ast.#canAdoptType(c) ? 0 : 1\n part.push(acc)\n acc = ''\n const ext = new AST(c, part)\n part.push(ext)\n i = AST.#parseAST(str, ext, i, opt, extDepth + depthAdd)\n continue\n }\n if (c === '|') {\n part.push(acc)\n acc = ''\n parts.push(part)\n part = new AST(null, ast)\n continue\n }\n if (c === ')') {\n if (acc === '' && ast.#parts.length === 0) {\n ast.#emptyExt = true\n }\n part.push(acc)\n acc = ''\n ast.push(...parts, part)\n return i\n }\n acc += c\n }\n\n // unfinished extglob\n // if we got here, it was a malformed extglob! not an extglob, but\n // maybe something else in there.\n ast.type = null\n ast.#hasMagic = undefined\n ast.#parts = [str.substring(pos - 1)]\n return i\n }\n\n #canAdoptWithSpace(child?: AST | string): child is AST & {\n type: null\n parts: [AST & { type: ExtglobType }]\n } {\n return this.#canAdopt(child, adoptionWithSpaceMap)\n }\n\n #canAdopt(\n child?: AST | string,\n map: Map = adoptionMap,\n ): child is AST & {\n type: null\n parts: [AST & { type: ExtglobType }]\n } {\n if (\n !child ||\n typeof child !== 'object' ||\n child.type !== null ||\n child.#parts.length !== 1 ||\n this.type === null\n ) {\n return false\n }\n const gc = child.#parts[0]\n if (!gc || typeof gc !== 'object' || gc.type === null) {\n return false\n }\n return (this as AST & { type: ExtglobType }).#canAdoptType(\n gc.type,\n map,\n )\n }\n #canAdoptType(\n c: string,\n map: Map = adoptionAnyMap,\n ): c is ExtglobType {\n return !!map.get(this.type as ExtglobType)?.includes(c as ExtglobType)\n }\n\n #adoptWithSpace(\n this: AST & { type: ExtglobType },\n child: AST & {\n type: null\n },\n index: number,\n ) {\n const gc = child.#parts[0] as AST & { type: ExtglobType }\n const blank = new AST(null, gc, this.options)\n blank.#parts.push('')\n gc.push(blank)\n this.#adopt(child, index)\n }\n\n #adopt(\n child: AST & {\n type: null\n },\n index: number,\n ) {\n const gc = child.#parts[0] as AST & { type: ExtglobType }\n this.#parts.splice(index, 1, ...gc.#parts)\n for (const p of gc.#parts) {\n if (typeof p === 'object') p.#parent = this\n }\n this.#toString = undefined\n }\n\n #canUsurpType(c: string): boolean {\n const m = usurpMap.get(this.type as ExtglobType)\n return !!m?.has(c as ExtglobType)\n }\n\n #canUsurp(child?: AST | string): child is AST & {\n type: null\n parts: [AST & { type: ExtglobType }]\n } {\n if (\n !child ||\n typeof child !== 'object' ||\n child.type !== null ||\n child.#parts.length !== 1 ||\n this.type === null ||\n this.#parts.length !== 1\n ) {\n return false\n }\n const gc = child.#parts[0]\n if (!gc || typeof gc !== 'object' || gc.type === null) {\n return false\n }\n return (this as AST & { type: ExtglobType }).#canUsurpType(gc.type)\n }\n\n #usurp(this: AST & { type: ExtglobType }, child: AST & { type: null }) {\n const m = usurpMap.get(this.type as ExtglobType)\n const gc = child.#parts[0] as AST & { type: ExtglobType }\n const nt = m?.get(gc.type)\n /* c8 ignore start - impossible */\n if (!nt) return false\n /* c8 ignore stop */\n this.#parts = gc.#parts\n for (const p of this.#parts) {\n if (typeof p === 'object') {\n p.#parent = this\n }\n }\n this.type = nt\n this.#toString = undefined\n this.#emptyExt = false\n }\n\n static fromGlob(pattern: string, options: MinimatchOptions = {}) {\n const ast = new AST(null, undefined, options)\n AST.#parseAST(pattern, ast, 0, options, 0)\n return ast\n }\n\n // returns the regular expression if there's magic, or the unescaped\n // string if not.\n toMMPattern(): MMRegExp | string {\n // should only be called on root\n /* c8 ignore start */\n if (this !== this.#root) return this.#root.toMMPattern()\n /* c8 ignore stop */\n const glob = this.toString()\n const [re, body, hasMagic, uflag] = this.toRegExpSource()\n // if we're in nocase mode, and not nocaseMagicOnly, then we do\n // still need a regular expression if we have to case-insensitively\n // match capital/lowercase characters.\n const anyMagic =\n hasMagic ||\n this.#hasMagic ||\n (this.#options.nocase &&\n !this.#options.nocaseMagicOnly &&\n glob.toUpperCase() !== glob.toLowerCase())\n if (!anyMagic) {\n return body\n }\n\n const flags = (this.#options.nocase ? 'i' : '') + (uflag ? 'u' : '')\n return Object.assign(new RegExp(`^${re}$`, flags), {\n _src: re,\n _glob: glob,\n })\n }\n\n get options() {\n return this.#options\n }\n\n // returns the string match, the regexp source, whether there's magic\n // in the regexp (so a regular expression is required) and whether or\n // not the uflag is needed for the regular expression (for posix classes)\n // TODO: instead of injecting the start/end at this point, just return\n // the BODY of the regexp, along with the start/end portions suitable\n // for binding the start/end in either a joined full-path makeRe context\n // (where we bind to (^|/), or a standalone matchPart context (where\n // we bind to ^, and not /). Otherwise slashes get duped!\n //\n // In part-matching mode, the start is:\n // - if not isStart: nothing\n // - if traversal possible, but not allowed: ^(?!\\.\\.?$)\n // - if dots allowed or not possible: ^\n // - if dots possible and not allowed: ^(?!\\.)\n // end is:\n // - if not isEnd(): nothing\n // - else: $\n //\n // In full-path matching mode, we put the slash at the START of the\n // pattern, so start is:\n // - if first pattern: same as part-matching mode\n // - if not isStart(): nothing\n // - if traversal possible, but not allowed: /(?!\\.\\.?(?:$|/))\n // - if dots allowed or not possible: /\n // - if dots possible and not allowed: /(?!\\.)\n // end is:\n // - if last pattern, same as part-matching mode\n // - else nothing\n //\n // Always put the (?:$|/) on negated tails, though, because that has to be\n // there to bind the end of the negated pattern portion, and it's easier to\n // just stick it in now rather than try to inject it later in the middle of\n // the pattern.\n //\n // We can just always return the same end, and leave it up to the caller\n // to know whether it's going to be used joined or in parts.\n // And, if the start is adjusted slightly, can do the same there:\n // - if not isStart: nothing\n // - if traversal possible, but not allowed: (?:/|^)(?!\\.\\.?$)\n // - if dots allowed or not possible: (?:/|^)\n // - if dots possible and not allowed: (?:/|^)(?!\\.)\n //\n // But it's better to have a simpler binding without a conditional, for\n // performance, so probably better to return both start options.\n //\n // Then the caller just ignores the end if it's not the first pattern,\n // and the start always gets applied.\n //\n // But that's always going to be $ if it's the ending pattern, or nothing,\n // so the caller can just attach $ at the end of the pattern when building.\n //\n // So the todo is:\n // - better detect what kind of start is needed\n // - return both flavors of starting pattern\n // - attach $ at the end of the pattern when creating the actual RegExp\n //\n // Ah, but wait, no, that all only applies to the root when the first pattern\n // is not an extglob. If the first pattern IS an extglob, then we need all\n // that dot prevention biz to live in the extglob portions, because eg\n // +(*|.x*) can match .xy but not .yx.\n //\n // So, return the two flavors if it's #root and the first child is not an\n // AST, otherwise leave it to the child AST to handle it, and there,\n // use the (?:^|/) style of start binding.\n //\n // Even simplified further:\n // - Since the start for a join is eg /(?!\\.) and the start for a part\n // is ^(?!\\.), we can just prepend (?!\\.) to the pattern (either root\n // or start or whatever) and prepend ^ or / at the Regexp construction.\n toRegExpSource(\n allowDot?: boolean,\n ): [re: string, body: string, hasMagic: boolean, uflag: boolean] {\n const dot = allowDot ?? !!this.#options.dot\n if (this.#root === this) {\n this.#flatten()\n this.#fillNegs()\n }\n if (!isExtglobAST(this)) {\n const noEmpty =\n this.isStart() &&\n this.isEnd() &&\n !this.#parts.some(s => typeof s !== 'string')\n const src = this.#parts\n .map(p => {\n const [re, _, hasMagic, uflag] =\n typeof p === 'string' ?\n AST.#parseGlob(p, this.#hasMagic, noEmpty)\n : p.toRegExpSource(allowDot)\n this.#hasMagic = this.#hasMagic || hasMagic\n this.#uflag = this.#uflag || uflag\n return re\n })\n .join('')\n\n let start = ''\n if (this.isStart()) {\n if (typeof this.#parts[0] === 'string') {\n // this is the string that will match the start of the pattern,\n // so we need to protect against dots and such.\n\n // '.' and '..' cannot match unless the pattern is that exactly,\n // even if it starts with . or dot:true is set.\n const dotTravAllowed =\n this.#parts.length === 1 && justDots.has(this.#parts[0])\n if (!dotTravAllowed) {\n const aps = addPatternStart\n // check if we have a possibility of matching . or ..,\n // and prevent that.\n const needNoTrav =\n // dots are allowed, and the pattern starts with [ or .\n (dot && aps.has(src.charAt(0))) ||\n // the pattern starts with \\., and then [ or .\n (src.startsWith('\\\\.') && aps.has(src.charAt(2))) ||\n // the pattern starts with \\.\\., and then [ or .\n (src.startsWith('\\\\.\\\\.') && aps.has(src.charAt(4)))\n // no need to prevent dots if it can't match a dot, or if a\n // sub-pattern will be preventing it anyway.\n const needNoDot = !dot && !allowDot && aps.has(src.charAt(0))\n\n start =\n needNoTrav ? startNoTraversal\n : needNoDot ? startNoDot\n : ''\n }\n }\n }\n\n // append the \"end of path portion\" pattern to negation tails\n let end = ''\n if (\n this.isEnd() &&\n this.#root.#filledNegs &&\n this.#parent?.type === '!'\n ) {\n end = '(?:$|\\\\/)'\n }\n const final = start + src + end\n return [\n final,\n unescape(src),\n (this.#hasMagic = !!this.#hasMagic),\n this.#uflag,\n ]\n }\n\n // We need to calculate the body *twice* if it's a repeat pattern\n // at the start, once in nodot mode, then again in dot mode, so a\n // pattern like *(?) can match 'x.y'\n\n const repeated = this.type === '*' || this.type === '+'\n // some kind of extglob\n const start = this.type === '!' ? '(?:(?!(?:' : '(?:'\n let body = (this as AST & { type: ExtglobType }).#partsToRegExp(dot)\n\n if (this.isStart() && this.isEnd() && !body && this.type !== '!') {\n // invalid extglob, has to at least be *something* present, if it's\n // the entire path portion.\n const s = this.toString()\n const me = this as AST\n me.#parts = [s]\n me.type = null\n me.#hasMagic = undefined\n return [s, unescape(this.toString()), false, false]\n }\n\n let bodyDotAllowed =\n !repeated || allowDot || dot || !startNoDot ?\n ''\n : this.#partsToRegExp(true)\n if (bodyDotAllowed === body) {\n bodyDotAllowed = ''\n }\n if (bodyDotAllowed) {\n body = `(?:${body})(?:${bodyDotAllowed})*?`\n }\n\n // an empty !() is exactly equivalent to a starNoEmpty\n let final = ''\n if (this.type === '!' && this.#emptyExt) {\n final = (this.isStart() && !dot ? startNoDot : '') + starNoEmpty\n } else {\n const close =\n this.type === '!' ?\n // !() must match something,but !(x) can match ''\n '))' +\n (this.isStart() && !dot && !allowDot ? startNoDot : '') +\n star +\n ')'\n : this.type === '@' ? ')'\n : this.type === '?' ? ')?'\n : this.type === '+' && bodyDotAllowed ? ')'\n : this.type === '*' && bodyDotAllowed ? `)?`\n : `)${this.type}`\n final = start + body + close\n }\n return [\n final,\n unescape(body),\n (this.#hasMagic = !!this.#hasMagic),\n this.#uflag,\n ]\n }\n\n #flatten() {\n if (!isExtglobAST(this)) {\n for (const p of this.#parts) {\n if (typeof p === 'object') {\n p.#flatten()\n }\n }\n } else {\n // do up to 10 passes to flatten as much as possible\n let iterations = 0\n let done = false\n do {\n done = true\n for (let i = 0; i < this.#parts.length; i++) {\n const c = this.#parts[i]\n if (typeof c === 'object') {\n c.#flatten()\n if (this.#canAdopt(c)) {\n done = false\n this.#adopt(c, i)\n } else if (this.#canAdoptWithSpace(c)) {\n done = false\n ;(this as AST & { type: ExtglobType }).#adoptWithSpace(c, i)\n } else if (this.#canUsurp(c)) {\n done = false\n ;(this as AST & { type: ExtglobType }).#usurp(c)\n }\n }\n }\n } while (!done && ++iterations < 10)\n }\n this.#toString = undefined\n }\n\n #partsToRegExp(this: AST & { type: ExtglobType }, dot: boolean) {\n return this.#parts\n .map(p => {\n // extglob ASTs should only contain parent ASTs\n /* c8 ignore start */\n if (typeof p === 'string') {\n throw new Error('string type in extglob ast??')\n }\n /* c8 ignore stop */\n // can ignore hasMagic, because extglobs are already always magic\n const [re, _, _hasMagic, uflag] = p.toRegExpSource(dot)\n this.#uflag = this.#uflag || uflag\n return re\n })\n .filter(p => !(this.isStart() && this.isEnd()) || !!p)\n .join('|')\n }\n\n static #parseGlob(\n glob: string,\n hasMagic: boolean | undefined,\n noEmpty: boolean = false,\n ): [re: string, body: string, hasMagic: boolean, uflag: boolean] {\n let escaping = false\n let re = ''\n let uflag = false\n // multiple stars that aren't globstars coalesce into one *\n let inStar = false\n for (let i = 0; i < glob.length; i++) {\n const c = glob.charAt(i)\n if (escaping) {\n escaping = false\n re += (reSpecials.has(c) ? '\\\\' : '') + c\n continue\n }\n if (c === '*') {\n if (inStar) continue\n inStar = true\n re += noEmpty && /^[*]+$/.test(glob) ? starNoEmpty : star\n hasMagic = true\n continue\n } else {\n inStar = false\n }\n if (c === '\\\\') {\n if (i === glob.length - 1) {\n re += '\\\\\\\\'\n } else {\n escaping = true\n }\n continue\n }\n if (c === '[') {\n const [src, needUflag, consumed, magic] = parseClass(glob, i)\n if (consumed) {\n re += src\n uflag = uflag || needUflag\n i += consumed - 1\n hasMagic = hasMagic || magic\n continue\n }\n }\n if (c === '?') {\n re += qmark\n hasMagic = true\n continue\n }\n re += regExpEscape(c)\n }\n return [re, unescape(glob), !!hasMagic, uflag]\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/minimatch/dist/commonjs/brace-expressions.d.ts.map b/node_modules/minimatch/dist/commonjs/brace-expressions.d.ts.map index 3293e237..09b4c110 100644 --- a/node_modules/minimatch/dist/commonjs/brace-expressions.d.ts.map +++ b/node_modules/minimatch/dist/commonjs/brace-expressions.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"brace-expressions.d.ts","sourceRoot":"","sources":["../../src/brace-expressions.ts"],"names":[],"mappings":"AA+BA,MAAM,MAAM,gBAAgB,GAAG;IAC7B,GAAG,EAAE,MAAM;IACX,KAAK,EAAE,OAAO;IACd,QAAQ,EAAE,MAAM;IAChB,QAAQ,EAAE,OAAO;CAClB,CAAA;AAQD,eAAO,MAAM,UAAU,GACrB,MAAM,MAAM,EACZ,UAAU,MAAM,KACf,gBA6HF,CAAA"} \ No newline at end of file +{"version":3,"file":"brace-expressions.d.ts","sourceRoot":"","sources":["../../src/brace-expressions.ts"],"names":[],"mappings":"AAgCA,MAAM,MAAM,gBAAgB,GAAG;IAC7B,GAAG,EAAE,MAAM;IACX,KAAK,EAAE,OAAO;IACd,QAAQ,EAAE,MAAM;IAChB,QAAQ,EAAE,OAAO;CAClB,CAAA;AAQD,eAAO,MAAM,UAAU,GACrB,MAAM,MAAM,EACZ,UAAU,MAAM,KACf,gBA2HF,CAAA"} \ No newline at end of file diff --git a/node_modules/minimatch/dist/commonjs/brace-expressions.js b/node_modules/minimatch/dist/commonjs/brace-expressions.js index 0e13eefc..2b7b0371 100644 --- a/node_modules/minimatch/dist/commonjs/brace-expressions.js +++ b/node_modules/minimatch/dist/commonjs/brace-expressions.js @@ -141,10 +141,8 @@ const parseClass = (glob, position) => { } const sranges = '[' + (negate ? '^' : '') + rangesToString(ranges) + ']'; const snegs = '[' + (negate ? '' : '^') + rangesToString(negs) + ']'; - const comb = ranges.length && negs.length - ? '(' + sranges + '|' + snegs + ')' - : ranges.length - ? sranges + const comb = ranges.length && negs.length ? '(' + sranges + '|' + snegs + ')' + : ranges.length ? sranges : snegs; return [comb, uflag, endPos - pos, true]; }; diff --git a/node_modules/minimatch/dist/commonjs/brace-expressions.js.map b/node_modules/minimatch/dist/commonjs/brace-expressions.js.map index 4fab2f61..3cc3b343 100644 --- a/node_modules/minimatch/dist/commonjs/brace-expressions.js.map +++ b/node_modules/minimatch/dist/commonjs/brace-expressions.js.map @@ -1 +1 @@ -{"version":3,"file":"brace-expressions.js","sourceRoot":"","sources":["../../src/brace-expressions.ts"],"names":[],"mappings":";AAAA,wEAAwE;AACxE,wCAAwC;;;AAExC,8DAA8D;AAC9D,MAAM,YAAY,GAA0D;IAC1E,WAAW,EAAE,CAAC,sBAAsB,EAAE,IAAI,CAAC;IAC3C,WAAW,EAAE,CAAC,eAAe,EAAE,IAAI,CAAC;IACpC,WAAW,EAAE,CAAC,KAAK,GAAG,QAAQ,GAAG,IAAI,EAAE,KAAK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;IAED,MAAM,OAAO,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,cAAc,CAAC,MAAM,CAAC,GAAG,GAAG,CAAA;IACxE,MAAM,KAAK,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,cAAc,CAAC,IAAI,CAAC,GAAG,GAAG,CAAA;IACpE,MAAM,IAAI,GACR,MAAM,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM;QAC1B,CAAC,CAAC,GAAG,GAAG,OAAO,GAAG,GAAG,GAAG,KAAK,GAAG,GAAG;QACnC,CAAC,CAAC,MAAM,CAAC,MAAM;YACb,CAAC,CAAC,OAAO;YACT,CAAC,CAAC,KAAK,CAAA;IAEb,OAAO,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,GAAG,GAAG,EAAE,IAAI,CAAC,CAAA;AAC1C,CAAC,CAAA;AAhIY,QAAA,UAAU,cAgItB","sourcesContent":["// translate the various posix character classes into unicode properties\n// this works across all unicode locales\n\n// { : [, /u flag required, negated]\nconst posixClasses: { [k: string]: [e: string, u: boolean, n?: boolean] } = {\n '[:alnum:]': ['\\\\p{L}\\\\p{Nl}\\\\p{Nd}', true],\n '[:alpha:]': ['\\\\p{L}\\\\p{Nl}', true],\n '[:ascii:]': ['\\\\x' + '00-\\\\x' + '7f', false],\n '[:blank:]': ['\\\\p{Zs}\\\\t', true],\n '[:cntrl:]': ['\\\\p{Cc}', true],\n '[:digit:]': ['\\\\p{Nd}', true],\n '[:graph:]': ['\\\\p{Z}\\\\p{C}', true, true],\n '[:lower:]': ['\\\\p{Ll}', true],\n '[:print:]': ['\\\\p{C}', true],\n '[:punct:]': ['\\\\p{P}', true],\n '[:space:]': ['\\\\p{Z}\\\\t\\\\r\\\\n\\\\v\\\\f', true],\n '[:upper:]': ['\\\\p{Lu}', true],\n '[:word:]': ['\\\\p{L}\\\\p{Nl}\\\\p{Nd}\\\\p{Pc}', true],\n '[:xdigit:]': ['A-Fa-f0-9', false],\n}\n\n// only need to escape a few things inside of brace expressions\n// escapes: [ \\ ] -\nconst braceEscape = (s: string) => s.replace(/[[\\]\\\\-]/g, '\\\\$&')\n// escape all regexp magic characters\nconst regexpEscape = (s: string) =>\n s.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&')\n\n// everything has already been escaped, we just have to join\nconst rangesToString = (ranges: string[]): string => ranges.join('')\n\nexport type ParseClassResult = [\n src: string,\n uFlag: boolean,\n consumed: number,\n hasMagic: boolean,\n]\n\n// takes a glob string at a posix brace expression, and returns\n// an equivalent regular expression source, and boolean indicating\n// whether the /u flag needs to be applied, and the number of chars\n// consumed to parse the character class.\n// This also removes out of order ranges, and returns ($.) if the\n// entire class just no good.\nexport const parseClass = (\n glob: string,\n position: number,\n): ParseClassResult => {\n const pos = position\n /* c8 ignore start */\n if (glob.charAt(pos) !== '[') {\n throw new Error('not in a brace expression')\n }\n /* c8 ignore stop */\n const ranges: string[] = []\n const negs: string[] = []\n\n let i = pos + 1\n let sawStart = false\n let uflag = false\n let escaping = false\n let negate = false\n let endPos = pos\n let rangeStart = ''\n WHILE: while (i < glob.length) {\n const c = glob.charAt(i)\n if ((c === '!' || c === '^') && i === pos + 1) {\n negate = true\n i++\n continue\n }\n\n if (c === ']' && sawStart && !escaping) {\n endPos = i + 1\n break\n }\n\n sawStart = true\n if (c === '\\\\') {\n if (!escaping) {\n escaping = true\n i++\n continue\n }\n // escaped \\ char, fall through and treat like normal char\n }\n if (c === '[' && !escaping) {\n // either a posix class, a collation equivalent, or just a [\n for (const [cls, [unip, u, neg]] of Object.entries(posixClasses)) {\n if (glob.startsWith(cls, i)) {\n // invalid, [a-[] is fine, but not [a-[:alpha]]\n if (rangeStart) {\n return ['$.', false, glob.length - pos, true]\n }\n i += cls.length\n if (neg) negs.push(unip)\n else ranges.push(unip)\n uflag = uflag || u\n continue WHILE\n }\n }\n }\n\n // now it's just a normal character, effectively\n escaping = false\n if (rangeStart) {\n // throw this range away if it's not valid, but others\n // can still match.\n if (c > rangeStart) {\n ranges.push(braceEscape(rangeStart) + '-' + braceEscape(c))\n } else if (c === rangeStart) {\n ranges.push(braceEscape(c))\n }\n rangeStart = ''\n i++\n continue\n }\n\n // now might be the start of a range.\n // can be either c-d or c-] or c] or c] at this point\n if (glob.startsWith('-]', i + 1)) {\n ranges.push(braceEscape(c + '-'))\n i += 2\n continue\n }\n if (glob.startsWith('-', i + 1)) {\n rangeStart = c\n i += 2\n continue\n }\n\n // not the start of a range, just a single character\n ranges.push(braceEscape(c))\n i++\n }\n\n if (endPos < i) {\n // didn't see the end of the class, not a valid class,\n // but might still be valid as a literal match.\n return ['', false, 0, false]\n }\n\n // if we got no ranges and no negates, then we have a range that\n // cannot possibly match anything, and that poisons the whole glob\n if (!ranges.length && !negs.length) {\n return ['$.', false, glob.length - pos, true]\n }\n\n // if we got one positive range, and it's a single character, then that's\n // not actually a magic pattern, it's just that one literal character.\n // we should not treat that as \"magic\", we should just return the literal\n // character. [_] is a perfectly valid way to escape glob magic chars.\n if (\n negs.length === 0 &&\n ranges.length === 1 &&\n /^\\\\?.$/.test(ranges[0]) &&\n !negate\n ) {\n const r = ranges[0].length === 2 ? ranges[0].slice(-1) : ranges[0]\n return [regexpEscape(r), false, endPos - pos, false]\n }\n\n const sranges = '[' + (negate ? '^' : '') + rangesToString(ranges) + ']'\n const snegs = '[' + (negate ? '' : '^') + rangesToString(negs) + ']'\n const comb =\n ranges.length && negs.length\n ? '(' + sranges + '|' + snegs + ')'\n : ranges.length\n ? sranges\n : snegs\n\n return [comb, uflag, endPos - pos, true]\n}\n"]} \ No newline at end of file +{"version":3,"file":"brace-expressions.js","sourceRoot":"","sources":["../../src/brace-expressions.ts"],"names":[],"mappings":";AAAA,wEAAwE;AACxE,wCAAwC;;;AAExC,8DAA8D;AAC9D,MAAM,YAAY,GAChB;IACE,WAAW,EA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AC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;QAClE,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,GAAG,EAAE,KAAK,CAAC,CAAA;IACtD,CAAC;IAED,MAAM,OAAO,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,cAAc,CAAC,MAAM,CAAC,GAAG,GAAG,CAAA;IACxE,MAAM,KAAK,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,cAAc,CAAC,IAAI,CAAC,GAAG,GAAG,CAAA;IACpE,MAAM,IAAI,GACR,MAAM,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,GAAG,OAAO,GAAG,GAAG,GAAG,KAAK,GAAG,GAAG;QAChE,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO;YACzB,CAAC,CAAC,KAAK,CAAA;IAET,OAAO,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,GAAG,GAAG,EAAE,IAAI,CAAC,CAAA;AAC1C,CAAC,CAAA;AA9HY,QAAA,UAAU,cA8HtB","sourcesContent":["// translate the various posix character classes into unicode properties\n// this works across all unicode locales\n\n// { : [, /u flag required, negated]\nconst posixClasses: { [k: string]: [e: string, u: boolean, n?: boolean] } =\n {\n '[:alnum:]': ['\\\\p{L}\\\\p{Nl}\\\\p{Nd}', true],\n '[:alpha:]': ['\\\\p{L}\\\\p{Nl}', true],\n '[:ascii:]': ['\\\\x' + '00-\\\\x' + '7f', false],\n '[:blank:]': ['\\\\p{Zs}\\\\t', true],\n '[:cntrl:]': ['\\\\p{Cc}', true],\n '[:digit:]': ['\\\\p{Nd}', true],\n '[:graph:]': ['\\\\p{Z}\\\\p{C}', true, true],\n '[:lower:]': ['\\\\p{Ll}', true],\n '[:print:]': ['\\\\p{C}', true],\n '[:punct:]': ['\\\\p{P}', true],\n '[:space:]': ['\\\\p{Z}\\\\t\\\\r\\\\n\\\\v\\\\f', true],\n '[:upper:]': ['\\\\p{Lu}', true],\n '[:word:]': ['\\\\p{L}\\\\p{Nl}\\\\p{Nd}\\\\p{Pc}', true],\n '[:xdigit:]': ['A-Fa-f0-9', false],\n }\n\n// only need to escape a few things inside of brace expressions\n// escapes: [ \\ ] -\nconst braceEscape = (s: string) => s.replace(/[[\\]\\\\-]/g, '\\\\$&')\n// escape all regexp magic characters\nconst regexpEscape = (s: string) =>\n s.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&')\n\n// everything has already been escaped, we just have to join\nconst rangesToString = (ranges: string[]): string => ranges.join('')\n\nexport type ParseClassResult = [\n src: string,\n uFlag: boolean,\n consumed: number,\n hasMagic: boolean,\n]\n\n// takes a glob string at a posix brace expression, and returns\n// an equivalent regular expression source, and boolean indicating\n// whether the /u flag needs to be applied, and the number of chars\n// consumed to parse the character class.\n// This also removes out of order ranges, and returns ($.) if the\n// entire class just no good.\nexport const parseClass = (\n glob: string,\n position: number,\n): ParseClassResult => {\n const pos = position\n /* c8 ignore start */\n if (glob.charAt(pos) !== '[') {\n throw new Error('not in a brace expression')\n }\n /* c8 ignore stop */\n const ranges: string[] = []\n const negs: string[] = []\n\n let i = pos + 1\n let sawStart = false\n let uflag = false\n let escaping = false\n let negate = false\n let endPos = pos\n let rangeStart = ''\n WHILE: while (i < glob.length) {\n const c = glob.charAt(i)\n if ((c === '!' || c === '^') && i === pos + 1) {\n negate = true\n i++\n continue\n }\n\n if (c === ']' && sawStart && !escaping) {\n endPos = i + 1\n break\n }\n\n sawStart = true\n if (c === '\\\\') {\n if (!escaping) {\n escaping = true\n i++\n continue\n }\n // escaped \\ char, fall through and treat like normal char\n }\n if (c === '[' && !escaping) {\n // either a posix class, a collation equivalent, or just a [\n for (const [cls, [unip, u, neg]] of Object.entries(posixClasses)) {\n if (glob.startsWith(cls, i)) {\n // invalid, [a-[] is fine, but not [a-[:alpha]]\n if (rangeStart) {\n return ['$.', false, glob.length - pos, true]\n }\n i += cls.length\n if (neg) negs.push(unip)\n else ranges.push(unip)\n uflag = uflag || u\n continue WHILE\n }\n }\n }\n\n // now it's just a normal character, effectively\n escaping = false\n if (rangeStart) {\n // throw this range away if it's not valid, but others\n // can still match.\n if (c > rangeStart) {\n ranges.push(braceEscape(rangeStart) + '-' + braceEscape(c))\n } else if (c === rangeStart) {\n ranges.push(braceEscape(c))\n }\n rangeStart = ''\n i++\n continue\n }\n\n // now might be the start of a range.\n // can be either c-d or c-] or c] or c] at this point\n if (glob.startsWith('-]', i + 1)) {\n ranges.push(braceEscape(c + '-'))\n i += 2\n continue\n }\n if (glob.startsWith('-', i + 1)) {\n rangeStart = c\n i += 2\n continue\n }\n\n // not the start of a range, just a single character\n ranges.push(braceEscape(c))\n i++\n }\n\n if (endPos < i) {\n // didn't see the end of the class, not a valid class,\n // but might still be valid as a literal match.\n return ['', false, 0, false]\n }\n\n // if we got no ranges and no negates, then we have a range that\n // cannot possibly match anything, and that poisons the whole glob\n if (!ranges.length && !negs.length) {\n return ['$.', false, glob.length - pos, true]\n }\n\n // if we got one positive range, and it's a single character, then that's\n // not actually a magic pattern, it's just that one literal character.\n // we should not treat that as \"magic\", we should just return the literal\n // character. [_] is a perfectly valid way to escape glob magic chars.\n if (\n negs.length === 0 &&\n ranges.length === 1 &&\n /^\\\\?.$/.test(ranges[0]) &&\n !negate\n ) {\n const r = ranges[0].length === 2 ? ranges[0].slice(-1) : ranges[0]\n return [regexpEscape(r), false, endPos - pos, false]\n }\n\n const sranges = '[' + (negate ? '^' : '') + rangesToString(ranges) + ']'\n const snegs = '[' + (negate ? '' : '^') + rangesToString(negs) + ']'\n const comb =\n ranges.length && negs.length ? '(' + sranges + '|' + snegs + ')'\n : ranges.length ? sranges\n : snegs\n\n return [comb, uflag, endPos - pos, true]\n}\n"]} \ No newline at end of file diff --git a/node_modules/minimatch/dist/commonjs/escape.d.ts b/node_modules/minimatch/dist/commonjs/escape.d.ts index 92e88c8f..141024a0 100644 --- a/node_modules/minimatch/dist/commonjs/escape.d.ts +++ b/node_modules/minimatch/dist/commonjs/escape.d.ts @@ -1,4 +1,4 @@ -import { MinimatchOptions } from './index.js'; +import type { MinimatchOptions } from './index.js'; /** * Escape all magic characters in a glob pattern. * diff --git a/node_modules/minimatch/dist/commonjs/escape.d.ts.map b/node_modules/minimatch/dist/commonjs/escape.d.ts.map index e8d8a693..e167e300 100644 --- a/node_modules/minimatch/dist/commonjs/escape.d.ts.map +++ b/node_modules/minimatch/dist/commonjs/escape.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"escape.d.ts","sourceRoot":"","sources":["../../src/escape.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAE7C;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,MAAM,GACjB,GAAG,MAAM,EACT,2CAGG,IAAI,CAAC,gBAAgB,EAAE,sBAAsB,GAAG,eAAe,CAAM,WAazE,CAAA"} \ No newline at end of file +{"version":3,"file":"escape.d.ts","sourceRoot":"","sources":["../../src/escape.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAElD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,MAAM,GACjB,GAAG,MAAM,EACT,2CAGG,IAAI,CAAC,gBAAgB,EAAE,sBAAsB,GAAG,eAAe,CAAM,WAazE,CAAA"} \ No newline at end of file diff --git a/node_modules/minimatch/dist/commonjs/escape.js b/node_modules/minimatch/dist/commonjs/escape.js index 6fb634fb..83a713a2 100644 --- a/node_modules/minimatch/dist/commonjs/escape.js +++ b/node_modules/minimatch/dist/commonjs/escape.js @@ -18,12 +18,12 @@ const escape = (s, { windowsPathsNoEscape = false, magicalBraces = false, } = {} // that make those magic, and escaping ! as [!] isn't valid, // because [!]] is a valid glob class meaning not ']'. if (magicalBraces) { - return windowsPathsNoEscape - ? s.replace(/[?*()[\]{}]/g, '[$&]') + return windowsPathsNoEscape ? + s.replace(/[?*()[\]{}]/g, '[$&]') : s.replace(/[?*()[\]\\{}]/g, '\\$&'); } - return windowsPathsNoEscape - ? s.replace(/[?*()[\]]/g, '[$&]') + return windowsPathsNoEscape ? + s.replace(/[?*()[\]]/g, '[$&]') : s.replace(/[?*()[\]\\]/g, '\\$&'); }; exports.escape = escape; diff --git a/node_modules/minimatch/dist/commonjs/escape.js.map b/node_modules/minimatch/dist/commonjs/escape.js.map index bcc96bf4..f963f0a1 100644 --- a/node_modules/minimatch/dist/commonjs/escape.js.map +++ b/node_modules/minimatch/dist/commonjs/escape.js.map @@ -1 +1 @@ -{"version":3,"file":"escape.js","sourceRoot":"","sources":["../../src/escape.ts"],"names":[],"mappings":";;;AAEA;;;;;;;;;;;GAWG;AACI,MAAM,MAAM,GAAG,CACpB,CAAS,EACT,EACE,oBAAoB,GAAG,KAAK,EAC5B,aAAa,GAAG,KAAK,MAC+C,EAAE,EACxE,EAAE;IACF,wDAAwD;IACxD,4DAA4D;IAC5D,sDAAsD;IACtD,IAAI,aAAa,EAAE,CAAC;QAClB,OAAO,oBAAoB;YACzB,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,cAAc,EAAE,MAAM,CAAC;YACnC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAAA;IACzC,CAAC;IACD,OAAO,oBAAoB;QACzB,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,YAAY,EAAE,MAAM,CAAC;QACjC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,cAAc,EAAE,MAAM,CAAC,CAAA;AACvC,CAAC,CAAA;AAlBY,QAAA,MAAM,UAkBlB","sourcesContent":["import { MinimatchOptions } from './index.js'\n\n/**\n * Escape all magic characters in a glob pattern.\n *\n * If the {@link MinimatchOptions.windowsPathsNoEscape}\n * option is used, then characters are escaped by wrapping in `[]`, because\n * a magic character wrapped in a character class can only be satisfied by\n * that exact character. In this mode, `\\` is _not_ escaped, because it is\n * not interpreted as a magic character, but instead as a path separator.\n *\n * If the {@link MinimatchOptions.magicalBraces} option is used,\n * then braces (`{` and `}`) will be escaped.\n */\nexport const escape = (\n s: string,\n {\n windowsPathsNoEscape = false,\n magicalBraces = false,\n }: Pick = {},\n) => {\n // don't need to escape +@! because we escape the parens\n // that make those magic, and escaping ! as [!] isn't valid,\n // because [!]] is a valid glob class meaning not ']'.\n if (magicalBraces) {\n return windowsPathsNoEscape\n ? s.replace(/[?*()[\\]{}]/g, '[$&]')\n : s.replace(/[?*()[\\]\\\\{}]/g, '\\\\$&')\n }\n return windowsPathsNoEscape\n ? s.replace(/[?*()[\\]]/g, '[$&]')\n : s.replace(/[?*()[\\]\\\\]/g, '\\\\$&')\n}\n"]} \ No newline at end of file +{"version":3,"file":"escape.js","sourceRoot":"","sources":["../../src/escape.ts"],"names":[],"mappings":";;;AAEA;;;;;;;;;;;GAWG;AACI,MAAM,MAAM,GAAG,CACpB,CAAS,EACT,EACE,oBAAoB,GAAG,KAAK,EAC5B,aAAa,GAAG,KAAK,MAC+C,EAAE,EACxE,EAAE;IACF,wDAAwD;IACxD,4DAA4D;IAC5D,sDAAsD;IACtD,IAAI,aAAa,EAAE,CAAC;QAClB,OAAO,oBAAoB,CAAC,CAAC;YACzB,CAAC,CAAC,OAAO,CAAC,cAAc,EAAE,MAAM,CAAC;YACnC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAAA;IACzC,CAAC;IACD,OAAO,oBAAoB,CAAC,CAAC;QACzB,CAAC,CAAC,OAAO,CAAC,YAAY,EAAE,MAAM,CAAC;QACjC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,cAAc,EAAE,MAAM,CAAC,CAAA;AACvC,CAAC,CAAA;AAlBY,QAAA,MAAM,UAkBlB","sourcesContent":["import type { MinimatchOptions } from './index.js'\n\n/**\n * Escape all magic characters in a glob pattern.\n *\n * If the {@link MinimatchOptions.windowsPathsNoEscape}\n * option is used, then characters are escaped by wrapping in `[]`, because\n * a magic character wrapped in a character class can only be satisfied by\n * that exact character. In this mode, `\\` is _not_ escaped, because it is\n * not interpreted as a magic character, but instead as a path separator.\n *\n * If the {@link MinimatchOptions.magicalBraces} option is used,\n * then braces (`{` and `}`) will be escaped.\n */\nexport const escape = (\n s: string,\n {\n windowsPathsNoEscape = false,\n magicalBraces = false,\n }: Pick = {},\n) => {\n // don't need to escape +@! because we escape the parens\n // that make those magic, and escaping ! as [!] isn't valid,\n // because [!]] is a valid glob class meaning not ']'.\n if (magicalBraces) {\n return windowsPathsNoEscape ?\n s.replace(/[?*()[\\]{}]/g, '[$&]')\n : s.replace(/[?*()[\\]\\\\{}]/g, '\\\\$&')\n }\n return windowsPathsNoEscape ?\n s.replace(/[?*()[\\]]/g, '[$&]')\n : s.replace(/[?*()[\\]\\\\]/g, '\\\\$&')\n}\n"]} \ No newline at end of file diff --git a/node_modules/minimatch/dist/commonjs/index.d.ts b/node_modules/minimatch/dist/commonjs/index.d.ts index 968eb143..7e1fc2ed 100644 --- a/node_modules/minimatch/dist/commonjs/index.d.ts +++ b/node_modules/minimatch/dist/commonjs/index.d.ts @@ -1,26 +1,104 @@ import { AST } from './ast.js'; export type Platform = 'aix' | 'android' | 'darwin' | 'freebsd' | 'haiku' | 'linux' | 'openbsd' | 'sunos' | 'win32' | 'cygwin' | 'netbsd'; export interface MinimatchOptions { + /** do not expand `{x,y}` style braces */ nobrace?: boolean; + /** do not treat patterns starting with `#` as a comment */ nocomment?: boolean; + /** do not treat patterns starting with `!` as a negation */ nonegate?: boolean; + /** print LOTS of debugging output */ debug?: boolean; + /** treat `**` the same as `*` */ noglobstar?: boolean; + /** do not expand extglobs like `+(a|b)` */ noext?: boolean; + /** return the pattern if nothing matches */ nonull?: boolean; + /** treat `\\` as a path separator, not an escape character */ windowsPathsNoEscape?: boolean; + /** + * inverse of {@link MinimatchOptions.windowsPathsNoEscape} + * @deprecated + */ allowWindowsEscape?: boolean; + /** + * Compare a partial path to a pattern. As long as the parts + * of the path that are present are not contradicted by the + * pattern, it will be treated as a match. This is useful in + * applications where you're walking through a folder structure, + * and don't yet have the full path, but want to ensure that you + * do not walk down paths that can never be a match. + */ partial?: boolean; + /** allow matches that start with `.` even if the pattern does not */ dot?: boolean; + /** ignore case */ nocase?: boolean; + /** ignore case only in wildcard patterns */ nocaseMagicOnly?: boolean; + /** consider braces to be "magic" for the purpose of `hasMagic` */ magicalBraces?: boolean; + /** + * If set, then patterns without slashes will be matched + * against the basename of the path if it contains slashes. + * For example, `a?b` would match the path `/xyz/123/acb`, but + * not `/xyz/acb/123`. + */ matchBase?: boolean; + /** invert the results of negated matches */ flipNegate?: boolean; + /** do not collapse multiple `/` into a single `/` */ preserveMultipleSlashes?: boolean; + /** + * A number indicating the level of optimization that should be done + * to the pattern prior to parsing and using it for matches. + */ optimizationLevel?: number; + /** operating system platform */ platform?: Platform; + /** + * When a pattern starts with a UNC path or drive letter, and in + * `nocase:true` mode, do not convert the root portions of the + * pattern into a case-insensitive regular expression, and instead + * leave them as strings. + * + * This is the default when the platform is `win32` and + * `nocase:true` is set. + */ windowsNoMagicRoot?: boolean; + /** + * max number of `{...}` patterns to expand. Default 100_000. + */ + braceExpandMax?: number; + /** + * Max number of non-adjacent `**` patterns to recursively walk down. + * + * The default of 200 is almost certainly high enough for most purposes, + * and can handle absurdly excessive patterns. + */ + maxGlobstarRecursion?: number; + /** + * Max depth to traverse for nested extglobs like `*(a|b|c)` + * + * Default is 2, which is quite low, but any higher value + * swiftly results in punishing performance impacts. Note + * that this is *not* relevant when the globstar types can + * be safely coalesced into a single set. + * + * For example, `*(a|@(b|c)|d)` would be flattened into + * `*(a|b|c|d)`. Thus, many common extglobs will retain good + * performance and never hit this limit, even if they are + * excessively deep and complicated. + * + * If the limit is hit, then the extglob characters are simply + * not parsed, and the pattern effectively switches into + * `noextglob: true` mode for the contents of that nested + * sub-pattern. This will typically _not_ result in a match, + * but is considered a valid trade-off for security and + * performance. + */ + maxExtglobRecursion?: number; } export declare const minimatch: { (p: string, pattern: string, options?: MinimatchOptions): boolean; @@ -51,6 +129,7 @@ export type MMRegExp = RegExp & { export type ParseReturnFiltered = string | MMRegExp | typeof GLOBSTAR; export type ParseReturn = ParseReturnFiltered | false; export declare class Minimatch { + #private; options: MinimatchOptions; set: ParseReturnFiltered[][]; pattern: string; @@ -67,10 +146,11 @@ export declare class Minimatch { isWindows: boolean; platform: Platform; windowsNoMagicRoot: boolean; + maxGlobstarRecursion: number; regexp: false | null | MMRegExp; constructor(pattern: string, options?: MinimatchOptions); hasMagic(): boolean; - debug(..._: any[]): void; + debug(..._: unknown[]): void; make(): void; preprocess(globParts: string[][]): string[][]; adjascentGlobstarOptimize(globParts: string[][]): string[][]; diff --git a/node_modules/minimatch/dist/commonjs/index.d.ts.map b/node_modules/minimatch/dist/commonjs/index.d.ts.map index f241c28b..7620db91 100644 --- a/node_modules/minimatch/dist/commonjs/index.d.ts.map +++ b/node_modules/minimatch/dist/commonjs/index.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,GAAG,EAAe,MAAM,UAAU,CAAA;AAI3C,MAAM,MAAM,QAAQ,GAChB,KAAK,GACL,SAAS,GACT,QAAQ,GACR,SAAS,GACT,OAAO,GACP,OAAO,GACP,SAAS,GACT,OAAO,GACP,OAAO,GACP,QAAQ,GACR,QAAQ,CAAA;AAEZ,MAAM,WAAW,gBAAgB;IAC/B,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,KAAK,CAAC,EAAE,OAAO,CAAA;IAC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MAAM;IAepB,KAAK,CAAC,CAAC,EAAE,MAAM,EAAE,OAAO,UAAe;IAgEvC,MAAM,CAAC,QAAQ,CAAC,GAAG,EAAE,gBAAgB;CAGtC;AAED,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAC9B,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA"} \ No newline at end of file diff --git a/node_modules/minimatch/dist/commonjs/index.js b/node_modules/minimatch/dist/commonjs/index.js index 966dc9b8..5a698348 100644 --- a/node_modules/minimatch/dist/commonjs/index.js +++ b/node_modules/minimatch/dist/commonjs/index.js @@ -1,7 +1,7 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.unescape = exports.escape = exports.AST = exports.Minimatch = exports.match = exports.makeRe = exports.braceExpand = exports.defaults = exports.filter = exports.GLOBSTAR = exports.sep = exports.minimatch = void 0; -const brace_expansion_1 = require("@isaacs/brace-expansion"); +const brace_expansion_1 = require("brace-expansion"); const assert_valid_pattern_js_1 = require("./assert-valid-pattern.js"); const ast_js_1 = require("./ast.js"); const escape_js_1 = require("./escape.js"); @@ -16,7 +16,7 @@ const minimatch = (p, pattern, options = {}) => { }; exports.minimatch = minimatch; // Optimized checking for the most common glob patterns. -const starDotExtRE = /^\*+([^+@!?\*\[\(]*)$/; +const starDotExtRE = /^\*+([^+@!?*[(]*)$/; const starDotExtTest = (ext) => (f) => !f.startsWith('.') && f.endsWith(ext); const starDotExtTestDot = (ext) => (f) => f.endsWith(ext); const starDotExtTestNocase = (ext) => { @@ -35,7 +35,7 @@ const dotStarTest = (f) => f !== '.' && f !== '..' && f.startsWith('.'); const starRE = /^\*+$/; const starTest = (f) => f.length !== 0 && !f.startsWith('.'); const starTestDot = (f) => f.length !== 0 && f !== '.' && f !== '..'; -const qmarksRE = /^\?+([^+@!?\*\[\(]*)?$/; +const qmarksRE = /^\?+([^+@!?*[(]*)?$/; const qmarksTestNocase = ([$0, ext = '']) => { const noext = qmarksTestNoExt([$0]); if (!ext) @@ -67,8 +67,8 @@ const qmarksTestNoExtDot = ([$0]) => { return (f) => f.length === len && f !== '.' && f !== '..'; }; /* c8 ignore start */ -const defaultPlatform = (typeof process === 'object' && process - ? (typeof process.env === 'object' && +const defaultPlatform = (typeof process === 'object' && process ? + (typeof process.env === 'object' && process.env && process.env.__MINIMATCH_TESTING_PLATFORM__) || process.platform @@ -154,7 +154,7 @@ const braceExpand = (pattern, options = {}) => { // shortcut. no need to expand. return [pattern]; } - return (0, brace_expansion_1.expand)(pattern); + return (0, brace_expansion_1.expand)(pattern, { max: options.braceExpandMax }); }; exports.braceExpand = braceExpand; exports.minimatch.braceExpand = exports.braceExpand; @@ -202,16 +202,20 @@ class Minimatch { isWindows; platform; windowsNoMagicRoot; + maxGlobstarRecursion; regexp; constructor(pattern, options = {}) { (0, assert_valid_pattern_js_1.assertValidPattern)(pattern); options = options || {}; this.options = options; + this.maxGlobstarRecursion = options.maxGlobstarRecursion ?? 200; this.pattern = pattern; this.platform = options.platform || defaultPlatform; this.isWindows = this.platform === 'win32'; + // avoid the annoying deprecation flag lol + const awe = ('allowWindow' + 'sEscape'); this.windowsPathsNoEscape = - !!options.windowsPathsNoEscape || options.allowWindowsEscape === false; + !!options.windowsPathsNoEscape || options[awe] === false; if (this.windowsPathsNoEscape) { this.pattern = this.pattern.replace(/\\/g, '/'); } @@ -224,8 +228,8 @@ class Minimatch { this.partial = !!options.partial; this.nocase = !!this.options.nocase; this.windowsNoMagicRoot = - options.windowsNoMagicRoot !== undefined - ? options.windowsNoMagicRoot + options.windowsNoMagicRoot !== undefined ? + options.windowsNoMagicRoot : !!(this.isWindows && this.nocase); this.globSet = []; this.globParts = []; @@ -263,6 +267,7 @@ class Minimatch { // step 2: expand braces this.globSet = [...new Set(this.braceExpand())]; if (options.debug) { + //oxlint-disable-next-line no-console this.debug = (...args) => console.error(...args); } this.debug(this.pattern, this.globSet); @@ -288,7 +293,10 @@ class Minimatch { !globMagic.test(s[3]); const isDrive = /^[a-z]:/i.test(s[0]); if (isUNC) { - return [...s.slice(0, 4), ...s.slice(4).map(ss => this.parse(ss))]; + return [ + ...s.slice(0, 4), + ...s.slice(4).map(ss => this.parse(ss)), + ]; } else if (isDrive) { return [s[0], ...s.slice(1).map(ss => this.parse(ss))]; @@ -320,12 +328,12 @@ class Minimatch { // to the right as possible, even if it increases the number // of patterns that we have to process. preprocess(globParts) { - // if we're not in globstar mode, then turn all ** into * + // if we're not in globstar mode, then turn ** into * if (this.options.noglobstar) { - for (let i = 0; i < globParts.length; i++) { - for (let j = 0; j < globParts[i].length; j++) { - if (globParts[i][j] === '**') { - globParts[i][j] = '*'; + for (const partset of globParts) { + for (let j = 0; j < partset.length; j++) { + if (partset[j] === '**') { + partset[j] = '*'; } } } @@ -413,7 +421,11 @@ class Minimatch { let dd = 0; while (-1 !== (dd = parts.indexOf('..', dd + 1))) { const p = parts[dd - 1]; - if (p && p !== '.' && p !== '..' && p !== '**') { + if (p && + p !== '.' && + p !== '..' && + p !== '**' && + !(this.isWindows && /^[a-z]:$/i.test(p))) { didSomething = true; parts.splice(dd - 1, 2); dd -= 2; @@ -606,7 +618,8 @@ class Minimatch { // out of pattern, then that's fine, as long as all // the parts match. matchOne(file, pattern, partial = false) { - const options = this.options; + let fileStartIndex = 0; + let patternStartIndex = 0; // UNC paths like //?/X:/... can match X:/... and vice versa // Drive letters in absolute drive or unc paths are always compared // case-insensitively. @@ -624,18 +637,22 @@ class Minimatch { pattern[2] === '?' && typeof pattern[3] === 'string' && /^[a-z]:$/i.test(pattern[3]); - const fdi = fileUNC ? 3 : fileDrive ? 0 : undefined; - const pdi = patternUNC ? 3 : patternDrive ? 0 : undefined; + const fdi = fileUNC ? 3 + : fileDrive ? 0 + : undefined; + const pdi = patternUNC ? 3 + : patternDrive ? 0 + : undefined; if (typeof fdi === 'number' && typeof pdi === 'number') { - const [fd, pd] = [file[fdi], pattern[pdi]]; + const [fd, pd] = [ + file[fdi], + pattern[pdi], + ]; + // start matching at the drive letter index of each if (fd.toLowerCase() === pd.toLowerCase()) { pattern[pdi] = fd; - if (pdi > fdi) { - pattern = pattern.slice(pdi); - } - else if (fdi > pdi) { - file = file.slice(fdi); - } + patternStartIndex = pdi; + fileStartIndex = fdi; } } } @@ -645,99 +662,187 @@ class Minimatch { if (optimizationLevel >= 2) { file = this.levelTwoFileOptimize(file); } - this.debug('matchOne', this, { file, pattern }); - this.debug('matchOne', file.length, pattern.length); - for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) { + if (pattern.includes(exports.GLOBSTAR)) { + return this.#matchGlobstar(file, pattern, partial, fileStartIndex, patternStartIndex); + } + return this.#matchOne(file, pattern, partial, fileStartIndex, patternStartIndex); + } + #matchGlobstar(file, pattern, partial, fileIndex, patternIndex) { + // split the pattern into head, tail, and middle of ** delimited parts + const firstgs = pattern.indexOf(exports.GLOBSTAR, patternIndex); + const lastgs = pattern.lastIndexOf(exports.GLOBSTAR); + // split the pattern up into globstar-delimited sections + // the tail has to be at the end, and the others just have + // to be found in order from the head. + const [head, body, tail] = partial ? + [ + pattern.slice(patternIndex, firstgs), + pattern.slice(firstgs + 1), + [], + ] + : [ + pattern.slice(patternIndex, firstgs), + pattern.slice(firstgs + 1, lastgs), + pattern.slice(lastgs + 1), + ]; + // check the head, from the current file/pattern index. + if (head.length) { + const fileHead = file.slice(fileIndex, fileIndex + head.length); + if (!this.#matchOne(fileHead, head, partial, 0, 0)) { + return false; + } + fileIndex += head.length; + patternIndex += head.length; + } + // now we know the head matches! + // if the last portion is not empty, it MUST match the end + // check the tail + let fileTailMatch = 0; + if (tail.length) { + // if head + tail > file, then we cannot possibly match + if (tail.length + fileIndex > file.length) + return false; + // try to match the tail + let tailStart = file.length - tail.length; + if (this.#matchOne(file, tail, partial, tailStart, 0)) { + fileTailMatch = tail.length; + } + else { + // affordance for stuff like a/**/* matching a/b/ + // if the last file portion is '', and there's more to the pattern + // then try without the '' bit. + if (file[file.length - 1] !== '' || + fileIndex + tail.length === file.length) { + return false; + } + tailStart--; + if (!this.#matchOne(file, tail, partial, tailStart, 0)) { + return false; + } + fileTailMatch = tail.length + 1; + } + } + // now we know the tail matches! + // the middle is zero or more portions wrapped in **, possibly + // containing more ** sections. + // so a/**/b/**/c/**/d has become **/b/**/c/** + // if it's empty, it means a/**/b, just verify we have no bad dots + // if there's no tail, so it ends on /**, then we must have *something* + // after the head, or it's not a matc + if (!body.length) { + let sawSome = !!fileTailMatch; + for (let i = fileIndex; i < file.length - fileTailMatch; i++) { + const f = String(file[i]); + sawSome = true; + if (f === '.' || + f === '..' || + (!this.options.dot && f.startsWith('.'))) { + return false; + } + } + // in partial mode, we just need to get past all file parts + return partial || sawSome; + } + // now we know that there's one or more body sections, which can + // be matched anywhere from the 0 index (because the head was pruned) + // through to the length-fileTailMatch index. + // split the body up into sections, and note the minimum index it can + // be found at (start with the length of all previous segments) + // [section, before, after] + const bodySegments = [[[], 0]]; + let currentBody = bodySegments[0]; + let nonGsParts = 0; + const nonGsPartsSums = [0]; + for (const b of body) { + if (b === exports.GLOBSTAR) { + nonGsPartsSums.push(nonGsParts); + currentBody = [[], 0]; + bodySegments.push(currentBody); + } + else { + currentBody[0].push(b); + nonGsParts++; + } + } + let i = bodySegments.length - 1; + const fileLength = file.length - fileTailMatch; + for (const b of bodySegments) { + b[1] = fileLength - (nonGsPartsSums[i--] + b[0].length); + } + return !!this.#matchGlobStarBodySections(file, bodySegments, fileIndex, 0, partial, 0, !!fileTailMatch); + } + // return false for "nope, not matching" + // return null for "not matching, cannot keep trying" + #matchGlobStarBodySections(file, + // pattern section, last possible position for it + bodySegments, fileIndex, bodyIndex, partial, globStarDepth, sawTail) { + // take the first body segment, and walk from fileIndex to its "after" + // value at the end + // If it doesn't match at that position, we increment, until we hit + // that final possible position, and give up. + // If it does match, then advance and try to rest. + // If any of them fail we keep walking forward. + // this is still a bit recursively painful, but it's more constrained + // than previous implementations, because we never test something that + // can't possibly be a valid matching condition. + const bs = bodySegments[bodyIndex]; + if (!bs) { + // just make sure that there's no bad dots + for (let i = fileIndex; i < file.length; i++) { + sawTail = true; + const f = file[i]; + if (f === '.' || + f === '..' || + (!this.options.dot && f.startsWith('.'))) { + return false; + } + } + return sawTail; + } + // have a non-globstar body section to test + const [body, after] = bs; + while (fileIndex <= after) { + const m = this.#matchOne(file.slice(0, fileIndex + body.length), body, partial, fileIndex, 0); + // if limit exceeded, no match. intentional false negative, + // acceptable break in correctness for security. + if (m && globStarDepth < this.maxGlobstarRecursion) { + // match! see if the rest match. if so, we're done! + const sub = this.#matchGlobStarBodySections(file, bodySegments, fileIndex + body.length, bodyIndex + 1, partial, globStarDepth + 1, sawTail); + if (sub !== false) { + return sub; + } + } + const f = file[fileIndex]; + if (f === '.' || + f === '..' || + (!this.options.dot && f.startsWith('.'))) { + return false; + } + fileIndex++; + } + // walked off. no point continuing + return partial || null; + } + #matchOne(file, pattern, partial, fileIndex, patternIndex) { + let fi; + let pi; + let pl; + let fl; + for (fi = fileIndex, + pi = patternIndex, + fl = file.length, + pl = pattern.length; fi < fl && pi < pl; fi++, pi++) { this.debug('matchOne loop'); - var p = pattern[pi]; - var f = file[fi]; + let p = pattern[pi]; + let f = file[fi]; this.debug(pattern, p, f); // should be impossible. // some invalid regexp stuff in the set. /* c8 ignore start */ - if (p === false) { + if (p === false || p === exports.GLOBSTAR) { return false; } /* c8 ignore stop */ - if (p === exports.GLOBSTAR) { - this.debug('GLOBSTAR', [pattern, p, f]); - // "**" - // a/**/b/**/c would match the following: - // a/b/x/y/z/c - // a/x/y/z/b/c - // a/b/x/b/x/c - // a/b/c - // To do this, take the rest of the pattern after - // the **, and see if it would match the file remainder. - // If so, return success. - // If not, the ** "swallows" a segment, and try again. - // This is recursively awful. - // - // a/**/b/**/c matching a/b/x/y/z/c - // - a matches a - // - doublestar - // - matchOne(b/x/y/z/c, b/**/c) - // - b matches b - // - doublestar - // - matchOne(x/y/z/c, c) -> no - // - matchOne(y/z/c, c) -> no - // - matchOne(z/c, c) -> no - // - matchOne(c, c) yes, hit - var fr = fi; - var pr = pi + 1; - if (pr === pl) { - this.debug('** at the end'); - // a ** at the end will just swallow the rest. - // We have found a match. - // however, it will not swallow /.x, unless - // options.dot is set. - // . and .. are *never* matched by **, for explosively - // exponential reasons. - for (; fi < fl; fi++) { - if (file[fi] === '.' || - file[fi] === '..' || - (!options.dot && file[fi].charAt(0) === '.')) - return false; - } - return true; - } - // ok, let's see if we can swallow whatever we can. - while (fr < fl) { - var swallowee = file[fr]; - this.debug('\nglobstar while', file, fr, pattern, pr, swallowee); - // XXX remove this slice. Just pass the start index. - if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { - this.debug('globstar found match!', fr, fl, swallowee); - // found a match. - return true; - } - else { - // can't swallow "." or ".." ever. - // can only swallow ".foo" when explicitly asked. - if (swallowee === '.' || - swallowee === '..' || - (!options.dot && swallowee.charAt(0) === '.')) { - this.debug('dot detected!', file, fr, pattern, pr); - break; - } - // ** swallows a segment, and continue. - this.debug('globstar swallow a segment, and continue'); - fr++; - } - } - // no match was found. - // However, in partial mode, we can't say this is necessarily over. - /* c8 ignore start */ - if (partial) { - // ran out of file - this.debug('\n>>> no match, partial?', file, fr, pattern, pr); - if (fr === fl) { - return true; - } - } - /* c8 ignore stop */ - return false; - } // something other than ** // non-magic patterns just have to match exactly // patterns with magic have been turned into regexps. @@ -808,21 +913,19 @@ class Minimatch { fastTest = options.dot ? starTestDot : starTest; } else if ((m = pattern.match(starDotExtRE))) { - fastTest = (options.nocase - ? options.dot - ? starDotExtTestNocaseDot + fastTest = (options.nocase ? + options.dot ? + starDotExtTestNocaseDot : starDotExtTestNocase - : options.dot - ? starDotExtTestDot + : options.dot ? starDotExtTestDot : starDotExtTest)(m[1]); } else if ((m = pattern.match(qmarksRE))) { - fastTest = (options.nocase - ? options.dot - ? qmarksTestNocaseDot + fastTest = (options.nocase ? + options.dot ? + qmarksTestNocaseDot : qmarksTestNocase - : options.dot - ? qmarksTestDot + : options.dot ? qmarksTestDot : qmarksTest)(m); } else if ((m = pattern.match(starDotStarRE))) { @@ -853,10 +956,8 @@ class Minimatch { return this.regexp; } const options = this.options; - const twoStar = options.noglobstar - ? star - : options.dot - ? twoStarDot + const twoStar = options.noglobstar ? star + : options.dot ? twoStarDot : twoStarNoDot; const flags = new Set(options.nocase ? ['i'] : []); // regexpify non-globstar patterns @@ -872,11 +973,9 @@ class Minimatch { for (const f of p.flags.split('')) flags.add(f); } - return typeof p === 'string' - ? regExpEscape(p) - : p === exports.GLOBSTAR - ? exports.GLOBSTAR - : p._src; + return (typeof p === 'string' ? regExpEscape(p) + : p === exports.GLOBSTAR ? exports.GLOBSTAR + : p._src); }); pp.forEach((p, i) => { const next = pp[i + 1]; @@ -931,7 +1030,7 @@ class Minimatch { this.regexp = new RegExp(re, [...flags].join('')); /* c8 ignore start */ } - catch (ex) { + catch { // should be impossible this.regexp = false; } @@ -946,7 +1045,7 @@ class Minimatch { if (this.preserveMultipleSlashes) { return p.split('/'); } - else if (this.isWindows && /^\/\/[^\/]+/.test(p)) { + else if (this.isWindows && /^\/\/[^/]+/.test(p)) { // add an extra '' for the one we lose return ['', ...p.split(/\/+/)]; } @@ -988,8 +1087,7 @@ class Minimatch { filename = ff[i]; } } - for (let i = 0; i < set.length; i++) { - const pattern = set[i]; + for (const pattern of set) { let file = ff; if (options.matchBase && pattern.length === 1) { file = [filename]; diff --git a/node_modules/minimatch/dist/commonjs/index.js.map b/node_modules/minimatch/dist/commonjs/index.js.map index 2f4ecefa..f0b81f03 100644 --- a/node_modules/minimatch/dist/commonjs/index.js.map +++ b/node_modules/minimatch/dist/commonjs/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,6DAAgD;AAChD,uEAA8D;AAC9D,qCAA2C;AAC3C,2CAAoC;AACpC,+CAAwC;AAsCjC,MAAM,SAAS,GAAG,CACvB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,SAAS,GAAG,SAAS,CAAA;AAC/B,iBAAS,CAAC,MAAM,GAAG,kBAAM,CAAA;AACzB,iBAAS,CAAC,QAAQ,GAAG,sBAAQ,CAAA","sourcesContent":["import { expand } from '@isaacs/brace-expansion'\nimport { assertValidPattern } from './assert-valid-pattern.js'\nimport { AST, ExtglobType } from './ast.js'\nimport { escape } from './escape.js'\nimport { unescape } from './unescape.js'\n\nexport type Platform =\n | 'aix'\n | 'android'\n | 'darwin'\n | 'freebsd'\n | 'haiku'\n | 'linux'\n | 'openbsd'\n | 'sunos'\n | 'win32'\n | 'cygwin'\n | 'netbsd'\n\nexport interface MinimatchOptions {\n nobrace?: boolean\n nocomment?: boolean\n nonegate?: boolean\n debug?: boolean\n noglobstar?: boolean\n noext?: boolean\n nonull?: boolean\n windowsPathsNoEscape?: boolean\n allowWindowsEscape?: boolean\n partial?: boolean\n dot?: boolean\n nocase?: boolean\n nocaseMagicOnly?: boolean\n magicalBraces?: boolean\n matchBase?: boolean\n flipNegate?: boolean\n preserveMultipleSlashes?: boolean\n optimizationLevel?: number\n platform?: Platform\n windowsNoMagicRoot?: boolean\n}\n\nexport const minimatch = (\n p: string,\n pattern: string,\n options: MinimatchOptions = {},\n) => {\n assertValidPattern(pattern)\n\n // shortcut: comments match nothing.\n if (!options.nocomment && pattern.charAt(0) === '#') {\n return false\n }\n\n return new Minimatch(pattern, options).match(p)\n}\n\n// Optimized checking for the most common glob patterns.\nconst starDotExtRE = /^\\*+([^+@!?\\*\\[\\(]*)$/\nconst starDotExtTest = (ext: string) => (f: string) =>\n !f.startsWith('.') && f.endsWith(ext)\nconst starDotExtTestDot = (ext: string) => (f: string) => f.endsWith(ext)\nconst starDotExtTestNocase = (ext: string) => {\n ext = ext.toLowerCase()\n return (f: string) => !f.startsWith('.') && f.toLowerCase().endsWith(ext)\n}\nconst starDotExtTestNocaseDot = (ext: string) => {\n ext = ext.toLowerCase()\n return (f: string) => f.toLowerCase().endsWith(ext)\n}\nconst starDotStarRE = /^\\*+\\.\\*+$/\nconst starDotStarTest = (f: string) => !f.startsWith('.') && f.includes('.')\nconst starDotStarTestDot = (f: string) =>\n f !== '.' && f !== '..' && f.includes('.')\nconst dotStarRE = /^\\.\\*+$/\nconst dotStarTest = (f: string) => f !== '.' && f !== '..' && f.startsWith('.')\nconst starRE = /^\\*+$/\nconst starTest = (f: string) => f.length !== 0 && !f.startsWith('.')\nconst starTestDot = (f: string) => f.length !== 0 && f !== '.' && f !== '..'\nconst qmarksRE = /^\\?+([^+@!?\\*\\[\\(]*)?$/\nconst qmarksTestNocase = ([$0, ext = '']: RegExpMatchArray) => {\n const noext = qmarksTestNoExt([$0])\n if (!ext) return noext\n ext = ext.toLowerCase()\n return (f: string) => noext(f) && f.toLowerCase().endsWith(ext)\n}\nconst qmarksTestNocaseDot = ([$0, ext = '']: RegExpMatchArray) => {\n const noext = qmarksTestNoExtDot([$0])\n if (!ext) return noext\n ext = ext.toLowerCase()\n return (f: string) => noext(f) && f.toLowerCase().endsWith(ext)\n}\nconst qmarksTestDot = ([$0, ext = '']: RegExpMatchArray) => {\n const noext = qmarksTestNoExtDot([$0])\n return !ext ? noext : (f: string) => noext(f) && f.endsWith(ext)\n}\nconst qmarksTest = ([$0, ext = '']: RegExpMatchArray) => {\n const noext = qmarksTestNoExt([$0])\n return !ext ? noext : (f: string) => noext(f) && f.endsWith(ext)\n}\nconst qmarksTestNoExt = ([$0]: RegExpMatchArray) => {\n const len = $0.length\n return (f: string) => f.length === len && !f.startsWith('.')\n}\nconst qmarksTestNoExtDot = ([$0]: RegExpMatchArray) => {\n const len = $0.length\n return (f: string) => f.length === len && f !== '.' && f !== '..'\n}\n\n/* c8 ignore start */\nconst defaultPlatform: Platform = (\n typeof process === 'object' && process\n ? (typeof process.env === 'object' &&\n process.env &&\n process.env.__MINIMATCH_TESTING_PLATFORM__) ||\n process.platform\n : 'posix'\n) as Platform\n\nexport type Sep = '\\\\' | '/'\n\nconst path: { [k: string]: { sep: Sep } } = {\n win32: { sep: '\\\\' },\n posix: { sep: '/' },\n}\n/* c8 ignore stop */\n\nexport const sep = defaultPlatform === 'win32' ? path.win32.sep : path.posix.sep\nminimatch.sep = sep\n\nexport const GLOBSTAR = Symbol('globstar **')\nminimatch.GLOBSTAR = GLOBSTAR\n\n// any single thing other than /\n// don't need to escape / when using new RegExp()\nconst qmark = '[^/]'\n\n// * => any number of characters\nconst star = qmark + '*?'\n\n// ** when dots are allowed. Anything goes, except .. and .\n// not (^ or / followed by one or two dots followed by $ or /),\n// followed by anything, any number of times.\nconst twoStarDot = '(?:(?!(?:\\\\/|^)(?:\\\\.{1,2})($|\\\\/)).)*?'\n\n// not a ^ or / followed by a dot,\n// followed by anything, any number of times.\nconst twoStarNoDot = '(?:(?!(?:\\\\/|^)\\\\.).)*?'\n\nexport const filter =\n (pattern: string, options: MinimatchOptions = {}) =>\n (p: string) =>\n minimatch(p, pattern, options)\nminimatch.filter = filter\n\nconst ext = (a: MinimatchOptions, b: MinimatchOptions = {}) =>\n Object.assign({}, a, b)\n\nexport const defaults = (def: MinimatchOptions): typeof minimatch => {\n if (!def || typeof def !== 'object' || !Object.keys(def).length) {\n return minimatch\n }\n\n const orig = minimatch\n\n const m = (p: string, pattern: string, options: MinimatchOptions = {}) =>\n orig(p, pattern, ext(def, options))\n\n return Object.assign(m, {\n Minimatch: class Minimatch extends orig.Minimatch {\n constructor(pattern: string, options: MinimatchOptions = {}) {\n super(pattern, ext(def, options))\n }\n static defaults(options: MinimatchOptions) {\n return orig.defaults(ext(def, options)).Minimatch\n }\n },\n\n AST: class AST extends orig.AST {\n /* c8 ignore start */\n constructor(\n type: ExtglobType | null,\n parent?: AST,\n options: MinimatchOptions = {},\n ) {\n super(type, parent, ext(def, options))\n }\n /* c8 ignore stop */\n\n static fromGlob(pattern: string, options: MinimatchOptions = {}) {\n return orig.AST.fromGlob(pattern, ext(def, options))\n }\n },\n\n unescape: (\n s: string,\n options: Pick<\n MinimatchOptions,\n 'windowsPathsNoEscape' | 'magicalBraces'\n > = {},\n ) => orig.unescape(s, ext(def, options)),\n\n escape: (\n s: string,\n options: Pick<\n MinimatchOptions,\n 'windowsPathsNoEscape' | 'magicalBraces'\n > = {},\n ) => orig.escape(s, ext(def, options)),\n\n filter: (pattern: string, options: MinimatchOptions = {}) =>\n orig.filter(pattern, ext(def, options)),\n\n defaults: (options: MinimatchOptions) => orig.defaults(ext(def, options)),\n\n makeRe: (pattern: string, options: MinimatchOptions = {}) =>\n orig.makeRe(pattern, ext(def, options)),\n\n braceExpand: (pattern: string, options: MinimatchOptions = {}) =>\n orig.braceExpand(pattern, ext(def, options)),\n\n match: (list: string[], pattern: string, options: MinimatchOptions = {}) =>\n orig.match(list, pattern, ext(def, options)),\n\n sep: orig.sep,\n GLOBSTAR: GLOBSTAR as typeof GLOBSTAR,\n })\n}\nminimatch.defaults = defaults\n\n// Brace expansion:\n// a{b,c}d -> abd acd\n// a{b,}c -> abc ac\n// a{0..3}d -> a0d a1d a2d a3d\n// a{b,c{d,e}f}g -> abg acdfg acefg\n// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg\n//\n// Invalid sets are not expanded.\n// a{2..}b -> a{2..}b\n// a{b}c -> a{b}c\nexport const braceExpand = (\n pattern: string,\n options: MinimatchOptions = {},\n) => {\n assertValidPattern(pattern)\n\n // Thanks to Yeting Li for\n // improving this regexp to avoid a ReDOS vulnerability.\n if (options.nobrace || !/\\{(?:(?!\\{).)*\\}/.test(pattern)) {\n // shortcut. no need to expand.\n return [pattern]\n }\n\n return expand(pattern)\n}\nminimatch.braceExpand = braceExpand\n\n// parse a component of the expanded set.\n// At this point, no pattern may contain \"/\" in it\n// so we're going to return a 2d array, where each entry is the full\n// pattern, split on '/', and then turned into a regular expression.\n// A regexp is made at the end which joins each array with an\n// escaped /, and another full one which joins each regexp with |.\n//\n// Following the lead of Bash 4.1, note that \"**\" only has special meaning\n// when it is the *only* thing in a path portion. Otherwise, any series\n// of * is equivalent to a single *. Globstar behavior is enabled by\n// default, and can be disabled by setting options.noglobstar.\n\nexport const makeRe = (pattern: string, options: MinimatchOptions = {}) =>\n new Minimatch(pattern, options).makeRe()\nminimatch.makeRe = makeRe\n\nexport const match = (\n list: string[],\n pattern: string,\n options: MinimatchOptions = {},\n) => {\n const mm = new Minimatch(pattern, options)\n list = list.filter(f => mm.match(f))\n if (mm.options.nonull && !list.length) {\n list.push(pattern)\n }\n return list\n}\nminimatch.match = match\n\n// replace stuff like \\* with *\nconst globMagic = /[?*]|[+@!]\\(.*?\\)|\\[|\\]/\nconst regExpEscape = (s: string) =>\n s.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&')\n\nexport type MMRegExp = RegExp & {\n _src?: string\n _glob?: string\n}\n\nexport type ParseReturnFiltered = string | MMRegExp | typeof GLOBSTAR\nexport type ParseReturn = ParseReturnFiltered | false\n\nexport class Minimatch {\n options: MinimatchOptions\n set: ParseReturnFiltered[][]\n pattern: string\n\n windowsPathsNoEscape: boolean\n nonegate: boolean\n negate: boolean\n comment: boolean\n empty: boolean\n preserveMultipleSlashes: boolean\n partial: boolean\n globSet: string[]\n globParts: string[][]\n nocase: boolean\n\n isWindows: boolean\n platform: Platform\n windowsNoMagicRoot: boolean\n\n regexp: false | null | MMRegExp\n constructor(pattern: string, options: MinimatchOptions = {}) {\n assertValidPattern(pattern)\n\n options = options || {}\n this.options = options\n this.pattern = pattern\n this.platform = options.platform || defaultPlatform\n this.isWindows = this.platform === 'win32'\n this.windowsPathsNoEscape =\n !!options.windowsPathsNoEscape || options.allowWindowsEscape === false\n if (this.windowsPathsNoEscape) {\n this.pattern = this.pattern.replace(/\\\\/g, '/')\n }\n this.preserveMultipleSlashes = !!options.preserveMultipleSlashes\n this.regexp = null\n this.negate = false\n this.nonegate = !!options.nonegate\n this.comment = false\n this.empty = false\n this.partial = !!options.partial\n this.nocase = !!this.options.nocase\n this.windowsNoMagicRoot =\n options.windowsNoMagicRoot !== undefined\n ? options.windowsNoMagicRoot\n : !!(this.isWindows && this.nocase)\n\n this.globSet = []\n this.globParts = []\n this.set = []\n\n // make the set of regexps etc.\n this.make()\n }\n\n hasMagic(): boolean {\n if (this.options.magicalBraces && this.set.length > 1) {\n return true\n }\n for (const pattern of this.set) {\n for (const part of pattern) {\n if (typeof part !== 'string') return true\n }\n }\n return false\n }\n\n debug(..._: any[]) {}\n\n make() {\n const pattern = this.pattern\n const options = this.options\n\n // empty patterns and comments match nothing.\n if (!options.nocomment && pattern.charAt(0) === '#') {\n this.comment = true\n return\n }\n\n if (!pattern) {\n this.empty = true\n return\n }\n\n // step 1: figure out negation, etc.\n this.parseNegate()\n\n // step 2: expand braces\n this.globSet = [...new Set(this.braceExpand())]\n\n if (options.debug) {\n this.debug = (...args: any[]) => console.error(...args)\n }\n\n this.debug(this.pattern, this.globSet)\n\n // step 3: now we have a set, so turn each one into a series of\n // path-portion matching patterns.\n // These will be regexps, except in the case of \"**\", which is\n // set to the GLOBSTAR object for globstar behavior,\n // and will not contain any / characters\n //\n // First, we preprocess to make the glob pattern sets a bit simpler\n // and deduped. There are some perf-killing patterns that can cause\n // problems with a glob walk, but we can simplify them down a bit.\n const rawGlobParts = this.globSet.map(s => this.slashSplit(s))\n this.globParts = this.preprocess(rawGlobParts)\n this.debug(this.pattern, this.globParts)\n\n // glob --> regexps\n let set = this.globParts.map((s, _, __) => {\n if (this.isWindows && this.windowsNoMagicRoot) {\n // check if it's a drive or unc path.\n const isUNC =\n s[0] === '' &&\n s[1] === '' &&\n (s[2] === '?' || !globMagic.test(s[2])) &&\n !globMagic.test(s[3])\n const isDrive = /^[a-z]:/i.test(s[0])\n if (isUNC) {\n return [...s.slice(0, 4), ...s.slice(4).map(ss => this.parse(ss))]\n } else if (isDrive) {\n return [s[0], ...s.slice(1).map(ss => this.parse(ss))]\n }\n }\n return s.map(ss => this.parse(ss))\n })\n\n this.debug(this.pattern, set)\n\n // filter out everything that didn't compile properly.\n this.set = set.filter(\n s => s.indexOf(false) === -1,\n ) as ParseReturnFiltered[][]\n\n // do not treat the ? in UNC paths as magic\n if (this.isWindows) {\n for (let i = 0; i < this.set.length; i++) {\n const p = this.set[i]\n if (\n p[0] === '' &&\n p[1] === '' &&\n this.globParts[i][2] === '?' &&\n typeof p[3] === 'string' &&\n /^[a-z]:$/i.test(p[3])\n ) {\n p[2] = '?'\n }\n }\n }\n\n this.debug(this.pattern, this.set)\n }\n\n // various transforms to equivalent pattern sets that are\n // faster to process in a filesystem walk. The goal is to\n // eliminate what we can, and push all ** patterns as far\n // to the right as possible, even if it increases the number\n // of patterns that we have to process.\n preprocess(globParts: string[][]) {\n // if we're not in globstar mode, then turn all ** into *\n if (this.options.noglobstar) {\n for (let i = 0; i < globParts.length; i++) {\n for (let j = 0; j < globParts[i].length; j++) {\n if (globParts[i][j] === '**') {\n globParts[i][j] = '*'\n }\n }\n }\n }\n\n const { optimizationLevel = 1 } = this.options\n\n if (optimizationLevel >= 2) {\n // aggressive optimization for the purpose of fs walking\n globParts = this.firstPhasePreProcess(globParts)\n globParts = this.secondPhasePreProcess(globParts)\n } else if (optimizationLevel >= 1) {\n // just basic optimizations to remove some .. parts\n globParts = this.levelOneOptimize(globParts)\n } else {\n // just collapse multiple ** portions into one\n globParts = this.adjascentGlobstarOptimize(globParts)\n }\n\n return globParts\n }\n\n // just get rid of adjascent ** portions\n adjascentGlobstarOptimize(globParts: string[][]) {\n return globParts.map(parts => {\n let gs: number = -1\n while (-1 !== (gs = parts.indexOf('**', gs + 1))) {\n let i = gs\n while (parts[i + 1] === '**') {\n i++\n }\n if (i !== gs) {\n parts.splice(gs, i - gs)\n }\n }\n return parts\n })\n }\n\n // get rid of adjascent ** and resolve .. portions\n levelOneOptimize(globParts: string[][]) {\n return globParts.map(parts => {\n parts = parts.reduce((set: string[], part) => {\n const prev = set[set.length - 1]\n if (part === '**' && prev === '**') {\n return set\n }\n if (part === '..') {\n if (prev && prev !== '..' && prev !== '.' && prev !== '**') {\n set.pop()\n return set\n }\n }\n set.push(part)\n return set\n }, [])\n return parts.length === 0 ? [''] : parts\n })\n }\n\n levelTwoFileOptimize(parts: string | string[]) {\n if (!Array.isArray(parts)) {\n parts = this.slashSplit(parts)\n }\n let didSomething: boolean = false\n do {\n didSomething = false\n //
// -> 
/\n      if (!this.preserveMultipleSlashes) {\n        for (let i = 1; i < parts.length - 1; i++) {\n          const p = parts[i]\n          // don't squeeze out UNC patterns\n          if (i === 1 && p === '' && parts[0] === '') continue\n          if (p === '.' || p === '') {\n            didSomething = true\n            parts.splice(i, 1)\n            i--\n          }\n        }\n        if (\n          parts[0] === '.' &&\n          parts.length === 2 &&\n          (parts[1] === '.' || parts[1] === '')\n        ) {\n          didSomething = true\n          parts.pop()\n        }\n      }\n\n      // 
/

/../ ->

/\n      let dd: number = 0\n      while (-1 !== (dd = parts.indexOf('..', dd + 1))) {\n        const p = parts[dd - 1]\n        if (p && p !== '.' && p !== '..' && p !== '**') {\n          didSomething = true\n          parts.splice(dd - 1, 2)\n          dd -= 2\n        }\n      }\n    } while (didSomething)\n    return parts.length === 0 ? [''] : parts\n  }\n\n  // First phase: single-pattern processing\n  // 
 is 1 or more portions\n  //  is 1 or more portions\n  // 

is any portion other than ., .., '', or **\n // is . or ''\n //\n // **/.. is *brutal* for filesystem walking performance, because\n // it effectively resets the recursive walk each time it occurs,\n // and ** cannot be reduced out by a .. pattern part like a regexp\n // or most strings (other than .., ., and '') can be.\n //\n //

/**/../

/

/ -> {

/../

/

/,

/**/

/

/}\n //

// -> 
/\n  // 
/

/../ ->

/\n  // **/**/ -> **/\n  //\n  // **/*/ -> */**/ <== not valid because ** doesn't follow\n  // this WOULD be allowed if ** did follow symlinks, or * didn't\n  firstPhasePreProcess(globParts: string[][]) {\n    let didSomething = false\n    do {\n      didSomething = false\n      // 
/**/../

/

/ -> {

/../

/

/,

/**/

/

/}\n for (let parts of globParts) {\n let gs: number = -1\n while (-1 !== (gs = parts.indexOf('**', gs + 1))) {\n let gss: number = gs\n while (parts[gss + 1] === '**') {\n //

/**/**/ -> 
/**/\n            gss++\n          }\n          // eg, if gs is 2 and gss is 4, that means we have 3 **\n          // parts, and can remove 2 of them.\n          if (gss > gs) {\n            parts.splice(gs + 1, gss - gs)\n          }\n\n          let next = parts[gs + 1]\n          const p = parts[gs + 2]\n          const p2 = parts[gs + 3]\n          if (next !== '..') continue\n          if (\n            !p ||\n            p === '.' ||\n            p === '..' ||\n            !p2 ||\n            p2 === '.' ||\n            p2 === '..'\n          ) {\n            continue\n          }\n          didSomething = true\n          // edit parts in place, and push the new one\n          parts.splice(gs, 1)\n          const other = parts.slice(0)\n          other[gs] = '**'\n          globParts.push(other)\n          gs--\n        }\n\n        // 
// -> 
/\n        if (!this.preserveMultipleSlashes) {\n          for (let i = 1; i < parts.length - 1; i++) {\n            const p = parts[i]\n            // don't squeeze out UNC patterns\n            if (i === 1 && p === '' && parts[0] === '') continue\n            if (p === '.' || p === '') {\n              didSomething = true\n              parts.splice(i, 1)\n              i--\n            }\n          }\n          if (\n            parts[0] === '.' &&\n            parts.length === 2 &&\n            (parts[1] === '.' || parts[1] === '')\n          ) {\n            didSomething = true\n            parts.pop()\n          }\n        }\n\n        // 
/

/../ ->

/\n        let dd: number = 0\n        while (-1 !== (dd = parts.indexOf('..', dd + 1))) {\n          const p = parts[dd - 1]\n          if (p && p !== '.' && p !== '..' && p !== '**') {\n            didSomething = true\n            const needDot = dd === 1 && parts[dd + 1] === '**'\n            const splin = needDot ? ['.'] : []\n            parts.splice(dd - 1, 2, ...splin)\n            if (parts.length === 0) parts.push('')\n            dd -= 2\n          }\n        }\n      }\n    } while (didSomething)\n\n    return globParts\n  }\n\n  // second phase: multi-pattern dedupes\n  // {
/*/,
/

/} ->

/*/\n  // {
/,
/} -> 
/\n  // {
/**/,
/} -> 
/**/\n  //\n  // {
/**/,
/**/

/} ->

/**/\n  // ^-- not valid because ** doens't follow symlinks\n  secondPhasePreProcess(globParts: string[][]): string[][] {\n    for (let i = 0; i < globParts.length - 1; i++) {\n      for (let j = i + 1; j < globParts.length; j++) {\n        const matched = this.partsMatch(\n          globParts[i],\n          globParts[j],\n          !this.preserveMultipleSlashes,\n        )\n        if (matched) {\n          globParts[i] = []\n          globParts[j] = matched\n          break\n        }\n      }\n    }\n    return globParts.filter(gs => gs.length)\n  }\n\n  partsMatch(\n    a: string[],\n    b: string[],\n    emptyGSMatch: boolean = false,\n  ): false | string[] {\n    let ai = 0\n    let bi = 0\n    let result: string[] = []\n    let which: string = ''\n    while (ai < a.length && bi < b.length) {\n      if (a[ai] === b[bi]) {\n        result.push(which === 'b' ? b[bi] : a[ai])\n        ai++\n        bi++\n      } else if (emptyGSMatch && a[ai] === '**' && b[bi] === a[ai + 1]) {\n        result.push(a[ai])\n        ai++\n      } else if (emptyGSMatch && b[bi] === '**' && a[ai] === b[bi + 1]) {\n        result.push(b[bi])\n        bi++\n      } else if (\n        a[ai] === '*' &&\n        b[bi] &&\n        (this.options.dot || !b[bi].startsWith('.')) &&\n        b[bi] !== '**'\n      ) {\n        if (which === 'b') return false\n        which = 'a'\n        result.push(a[ai])\n        ai++\n        bi++\n      } else if (\n        b[bi] === '*' &&\n        a[ai] &&\n        (this.options.dot || !a[ai].startsWith('.')) &&\n        a[ai] !== '**'\n      ) {\n        if (which === 'a') return false\n        which = 'b'\n        result.push(b[bi])\n        ai++\n        bi++\n      } else {\n        return false\n      }\n    }\n    // if we fall out of the loop, it means they two are identical\n    // as long as their lengths match\n    return a.length === b.length && result\n  }\n\n  parseNegate() {\n    if (this.nonegate) return\n\n    const pattern = this.pattern\n    let negate = false\n    let negateOffset = 0\n\n    for (let i = 0; i < pattern.length && pattern.charAt(i) === '!'; i++) {\n      negate = !negate\n      negateOffset++\n    }\n\n    if (negateOffset) this.pattern = pattern.slice(negateOffset)\n    this.negate = negate\n  }\n\n  // set partial to true to test if, for example,\n  // \"/a/b\" matches the start of \"/*/b/*/d\"\n  // Partial means, if you run out of file before you run\n  // out of pattern, then that's fine, as long as all\n  // the parts match.\n  matchOne(file: string[], pattern: ParseReturn[], partial: boolean = false) {\n    const options = this.options\n\n    // UNC paths like //?/X:/... can match X:/... and vice versa\n    // Drive letters in absolute drive or unc paths are always compared\n    // case-insensitively.\n    if (this.isWindows) {\n      const fileDrive = typeof file[0] === 'string' && /^[a-z]:$/i.test(file[0])\n      const fileUNC =\n        !fileDrive &&\n        file[0] === '' &&\n        file[1] === '' &&\n        file[2] === '?' &&\n        /^[a-z]:$/i.test(file[3])\n\n      const patternDrive =\n        typeof pattern[0] === 'string' && /^[a-z]:$/i.test(pattern[0])\n      const patternUNC =\n        !patternDrive &&\n        pattern[0] === '' &&\n        pattern[1] === '' &&\n        pattern[2] === '?' &&\n        typeof pattern[3] === 'string' &&\n        /^[a-z]:$/i.test(pattern[3])\n\n      const fdi = fileUNC ? 3 : fileDrive ? 0 : undefined\n      const pdi = patternUNC ? 3 : patternDrive ? 0 : undefined\n      if (typeof fdi === 'number' && typeof pdi === 'number') {\n        const [fd, pd]: [string, string] = [file[fdi], pattern[pdi] as string]\n        if (fd.toLowerCase() === pd.toLowerCase()) {\n          pattern[pdi] = fd\n          if (pdi > fdi) {\n            pattern = pattern.slice(pdi)\n          } else if (fdi > pdi) {\n            file = file.slice(fdi)\n          }\n        }\n      }\n    }\n\n    // resolve and reduce . and .. portions in the file as well.\n    // don't need to do the second phase, because it's only one string[]\n    const { optimizationLevel = 1 } = this.options\n    if (optimizationLevel >= 2) {\n      file = this.levelTwoFileOptimize(file)\n    }\n\n    this.debug('matchOne', this, { file, pattern })\n    this.debug('matchOne', file.length, pattern.length)\n\n    for (\n      var fi = 0, pi = 0, fl = file.length, pl = pattern.length;\n      fi < fl && pi < pl;\n      fi++, pi++\n    ) {\n      this.debug('matchOne loop')\n      var p = pattern[pi]\n      var f = file[fi]\n\n      this.debug(pattern, p, f)\n\n      // should be impossible.\n      // some invalid regexp stuff in the set.\n      /* c8 ignore start */\n      if (p === false) {\n        return false\n      }\n      /* c8 ignore stop */\n\n      if (p === GLOBSTAR) {\n        this.debug('GLOBSTAR', [pattern, p, f])\n\n        // \"**\"\n        // a/**/b/**/c would match the following:\n        // a/b/x/y/z/c\n        // a/x/y/z/b/c\n        // a/b/x/b/x/c\n        // a/b/c\n        // To do this, take the rest of the pattern after\n        // the **, and see if it would match the file remainder.\n        // If so, return success.\n        // If not, the ** \"swallows\" a segment, and try again.\n        // This is recursively awful.\n        //\n        // a/**/b/**/c matching a/b/x/y/z/c\n        // - a matches a\n        // - doublestar\n        //   - matchOne(b/x/y/z/c, b/**/c)\n        //     - b matches b\n        //     - doublestar\n        //       - matchOne(x/y/z/c, c) -> no\n        //       - matchOne(y/z/c, c) -> no\n        //       - matchOne(z/c, c) -> no\n        //       - matchOne(c, c) yes, hit\n        var fr = fi\n        var pr = pi + 1\n        if (pr === pl) {\n          this.debug('** at the end')\n          // a ** at the end will just swallow the rest.\n          // We have found a match.\n          // however, it will not swallow /.x, unless\n          // options.dot is set.\n          // . and .. are *never* matched by **, for explosively\n          // exponential reasons.\n          for (; fi < fl; fi++) {\n            if (\n              file[fi] === '.' ||\n              file[fi] === '..' ||\n              (!options.dot && file[fi].charAt(0) === '.')\n            )\n              return false\n          }\n          return true\n        }\n\n        // ok, let's see if we can swallow whatever we can.\n        while (fr < fl) {\n          var swallowee = file[fr]\n\n          this.debug('\\nglobstar while', file, fr, pattern, pr, swallowee)\n\n          // XXX remove this slice.  Just pass the start index.\n          if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {\n            this.debug('globstar found match!', fr, fl, swallowee)\n            // found a match.\n            return true\n          } else {\n            // can't swallow \".\" or \"..\" ever.\n            // can only swallow \".foo\" when explicitly asked.\n            if (\n              swallowee === '.' ||\n              swallowee === '..' ||\n              (!options.dot && swallowee.charAt(0) === '.')\n            ) {\n              this.debug('dot detected!', file, fr, pattern, pr)\n              break\n            }\n\n            // ** swallows a segment, and continue.\n            this.debug('globstar swallow a segment, and continue')\n            fr++\n          }\n        }\n\n        // no match was found.\n        // However, in partial mode, we can't say this is necessarily over.\n        /* c8 ignore start */\n        if (partial) {\n          // ran out of file\n          this.debug('\\n>>> no match, partial?', file, fr, pattern, pr)\n          if (fr === fl) {\n            return true\n          }\n        }\n        /* c8 ignore stop */\n        return false\n      }\n\n      // something other than **\n      // non-magic patterns just have to match exactly\n      // patterns with magic have been turned into regexps.\n      let hit: boolean\n      if (typeof p === 'string') {\n        hit = f === p\n        this.debug('string match', p, f, hit)\n      } else {\n        hit = p.test(f)\n        this.debug('pattern match', p, f, hit)\n      }\n\n      if (!hit) return false\n    }\n\n    // Note: ending in / means that we'll get a final \"\"\n    // at the end of the pattern.  This can only match a\n    // corresponding \"\" at the end of the file.\n    // If the file ends in /, then it can only match a\n    // a pattern that ends in /, unless the pattern just\n    // doesn't have any more for it. But, a/b/ should *not*\n    // match \"a/b/*\", even though \"\" matches against the\n    // [^/]*? pattern, except in partial mode, where it might\n    // simply not be reached yet.\n    // However, a/b/ should still satisfy a/*\n\n    // now either we fell off the end of the pattern, or we're done.\n    if (fi === fl && pi === pl) {\n      // ran out of pattern and filename at the same time.\n      // an exact hit!\n      return true\n    } else if (fi === fl) {\n      // ran out of file, but still had pattern left.\n      // this is ok if we're doing the match as part of\n      // a glob fs traversal.\n      return partial\n    } else if (pi === pl) {\n      // ran out of pattern, still have file left.\n      // this is only acceptable if we're on the very last\n      // empty segment of a file with a trailing slash.\n      // a/* should match a/b/\n      return fi === fl - 1 && file[fi] === ''\n\n      /* c8 ignore start */\n    } else {\n      // should be unreachable.\n      throw new Error('wtf?')\n    }\n    /* c8 ignore stop */\n  }\n\n  braceExpand() {\n    return braceExpand(this.pattern, this.options)\n  }\n\n  parse(pattern: string): ParseReturn {\n    assertValidPattern(pattern)\n\n    const options = this.options\n\n    // shortcuts\n    if (pattern === '**') return GLOBSTAR\n    if (pattern === '') return ''\n\n    // far and away, the most common glob pattern parts are\n    // *, *.*, and *.  Add a fast check method for those.\n    let m: RegExpMatchArray | null\n    let fastTest: null | ((f: string) => boolean) = null\n    if ((m = pattern.match(starRE))) {\n      fastTest = options.dot ? starTestDot : starTest\n    } else if ((m = pattern.match(starDotExtRE))) {\n      fastTest = (\n        options.nocase\n          ? options.dot\n            ? starDotExtTestNocaseDot\n            : starDotExtTestNocase\n          : options.dot\n            ? starDotExtTestDot\n            : starDotExtTest\n      )(m[1])\n    } else if ((m = pattern.match(qmarksRE))) {\n      fastTest = (\n        options.nocase\n          ? options.dot\n            ? qmarksTestNocaseDot\n            : qmarksTestNocase\n          : options.dot\n            ? qmarksTestDot\n            : qmarksTest\n      )(m)\n    } else if ((m = pattern.match(starDotStarRE))) {\n      fastTest = options.dot ? starDotStarTestDot : starDotStarTest\n    } else if ((m = pattern.match(dotStarRE))) {\n      fastTest = dotStarTest\n    }\n\n    const re = AST.fromGlob(pattern, this.options).toMMPattern()\n    if (fastTest && typeof re === 'object') {\n      // Avoids overriding in frozen environments\n      Reflect.defineProperty(re, 'test', { value: fastTest })\n    }\n    return re\n  }\n\n  makeRe() {\n    if (this.regexp || this.regexp === false) return this.regexp\n\n    // at this point, this.set is a 2d array of partial\n    // pattern strings, or \"**\".\n    //\n    // It's better to use .match().  This function shouldn't\n    // be used, really, but it's pretty convenient sometimes,\n    // when you just want to work with a regex.\n    const set = this.set\n\n    if (!set.length) {\n      this.regexp = false\n      return this.regexp\n    }\n    const options = this.options\n\n    const twoStar = options.noglobstar\n      ? star\n      : options.dot\n        ? twoStarDot\n        : twoStarNoDot\n    const flags = new Set(options.nocase ? ['i'] : [])\n\n    // regexpify non-globstar patterns\n    // if ** is only item, then we just do one twoStar\n    // if ** is first, and there are more, prepend (\\/|twoStar\\/)? to next\n    // if ** is last, append (\\/twoStar|) to previous\n    // if ** is in the middle, append (\\/|\\/twoStar\\/) to previous\n    // then filter out GLOBSTAR symbols\n    let re = set\n      .map(pattern => {\n        const pp: (string | typeof GLOBSTAR)[] = pattern.map(p => {\n          if (p instanceof RegExp) {\n            for (const f of p.flags.split('')) flags.add(f)\n          }\n          return typeof p === 'string'\n            ? regExpEscape(p)\n            : p === GLOBSTAR\n              ? GLOBSTAR\n              : p._src\n        }) as (string | typeof GLOBSTAR)[]\n        pp.forEach((p, i) => {\n          const next = pp[i + 1]\n          const prev = pp[i - 1]\n          if (p !== GLOBSTAR || prev === GLOBSTAR) {\n            return\n          }\n          if (prev === undefined) {\n            if (next !== undefined && next !== GLOBSTAR) {\n              pp[i + 1] = '(?:\\\\/|' + twoStar + '\\\\/)?' + next\n            } else {\n              pp[i] = twoStar\n            }\n          } else if (next === undefined) {\n            pp[i - 1] = prev + '(?:\\\\/|\\\\/' + twoStar + ')?'\n          } else if (next !== GLOBSTAR) {\n            pp[i - 1] = prev + '(?:\\\\/|\\\\/' + twoStar + '\\\\/)' + next\n            pp[i + 1] = GLOBSTAR\n          }\n        })\n        const filtered = pp.filter(p => p !== GLOBSTAR)\n\n        // For partial matches, we need to make the pattern match\n        // any prefix of the full path. We do this by generating\n        // alternative patterns that match progressively longer prefixes.\n        if (this.partial && filtered.length >= 1) {\n          const prefixes: string[] = []\n          for (let i = 1; i <= filtered.length; i++) {\n            prefixes.push(filtered.slice(0, i).join('/'))\n          }\n          return '(?:' + prefixes.join('|') + ')'\n        }\n\n        return filtered.join('/')\n      })\n      .join('|')\n\n    // need to wrap in parens if we had more than one thing with |,\n    // otherwise only the first will be anchored to ^ and the last to $\n    const [open, close] = set.length > 1 ? ['(?:', ')'] : ['', '']\n    // must match entire pattern\n    // ending in a * or ** will make it less strict.\n    re = '^' + open + re + close + '$'\n\n    // In partial mode, '/' should always match as it's a valid prefix for any pattern\n    if (this.partial) {\n      re = '^(?:\\\\/|' + open + re.slice(1, -1) + close + ')$'\n    }\n\n    // can match anything, as long as it's not this.\n    if (this.negate) re = '^(?!' + re + ').+$'\n\n    try {\n      this.regexp = new RegExp(re, [...flags].join(''))\n      /* c8 ignore start */\n    } catch (ex) {\n      // should be impossible\n      this.regexp = false\n    }\n    /* c8 ignore stop */\n    return this.regexp\n  }\n\n  slashSplit(p: string) {\n    // if p starts with // on windows, we preserve that\n    // so that UNC paths aren't broken.  Otherwise, any number of\n    // / characters are coalesced into one, unless\n    // preserveMultipleSlashes is set to true.\n    if (this.preserveMultipleSlashes) {\n      return p.split('/')\n    } else if (this.isWindows && /^\\/\\/[^\\/]+/.test(p)) {\n      // add an extra '' for the one we lose\n      return ['', ...p.split(/\\/+/)]\n    } else {\n      return p.split(/\\/+/)\n    }\n  }\n\n  match(f: string, partial = this.partial) {\n    this.debug('match', f, this.pattern)\n    // short-circuit in the case of busted things.\n    // comments, etc.\n    if (this.comment) {\n      return false\n    }\n    if (this.empty) {\n      return f === ''\n    }\n\n    if (f === '/' && partial) {\n      return true\n    }\n\n    const options = this.options\n\n    // windows: need to use /, not \\\n    if (this.isWindows) {\n      f = f.split('\\\\').join('/')\n    }\n\n    // treat the test path as a set of pathparts.\n    const ff = this.slashSplit(f)\n    this.debug(this.pattern, 'split', ff)\n\n    // just ONE of the pattern sets in this.set needs to match\n    // in order for it to be valid.  If negating, then just one\n    // match means that we have failed.\n    // Either way, return on the first hit.\n\n    const set = this.set\n    this.debug(this.pattern, 'set', set)\n\n    // Find the basename of the path by looking for the last non-empty segment\n    let filename: string = ff[ff.length - 1]\n    if (!filename) {\n      for (let i = ff.length - 2; !filename && i >= 0; i--) {\n        filename = ff[i]\n      }\n    }\n\n    for (let i = 0; i < set.length; i++) {\n      const pattern = set[i]\n      let file = ff\n      if (options.matchBase && pattern.length === 1) {\n        file = [filename]\n      }\n      const hit = this.matchOne(file, pattern, partial)\n      if (hit) {\n        if (options.flipNegate) {\n          return true\n        }\n        return !this.negate\n      }\n    }\n\n    // didn't get any hits.  this is success if it's a negative\n    // pattern, failure otherwise.\n    if (options.flipNegate) {\n      return false\n    }\n    return this.negate\n  }\n\n  static defaults(def: MinimatchOptions) {\n    return minimatch.defaults(def).Minimatch\n  }\n}\n/* c8 ignore start */\nexport { AST } from './ast.js'\nexport { escape } from './escape.js'\nexport { unescape } from './unescape.js'\n/* c8 ignore stop */\nminimatch.AST = AST\nminimatch.Minimatch = Minimatch\nminimatch.escape = escape\nminimatch.unescape = unescape\n"]}
\ No newline at end of file
+{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,qDAAwC;AACxC,uEAA8D;AAE9D,qCAA8B;AAC9B,2CAAoC;AACpC,+CAAwC;AAqHjC,MAAM,SAAS,GAAG,CACvB,CAAS,EACT,OAAe,EACf,UAA4B,EAAE,EAC9B,EAAE;IACF,IAAA,4CAAkB,EAAC,OAAO,CAAC,CAAA;IAE3B,oCAAoC;IACpC,IAAI,CAAC,OAAO,CAAC,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE,CAAC;QACpD,OAAO,KAAK,CAAA;IACd,CAAC;IAED,OAAO,IAAI,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;AACjD,CAAC,CAAA;AAbY,QAAA,SAAS,aAarB;AAED,wDAAwD;AACxD,MAAM,YAAY,GAAG,oBAAoB,CAAA;AACzC,MAAM,cAAc,GAAG,CAAC,GAAW,EAAE,EAAE,CAAC,CAAC,CAAS,EAAE,EAAE,CACpD,CAAC,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAA;AACvC,MAAM,iBAAiB,GAAG,CAAC,GAAW,EAAE,EAAE,CAAC,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAA;AACzE,MAAM,oBAAoB,GAAG,CAAC,GAAW,EAAE,EAAE;IAC3C,GAAG,GAAG,GAAG,CAAC,WAAW,EAAE,CAAA;IACvB,OAAO,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAA;AAC3E,CAAC,CAAA;AACD,MAAM,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,6FAAA,GAAG,OAAA;AACZ,yCAAoC;AAA3B,mGAAA,MAAM,OAAA;AACf,6CAAwC;AAA/B,uGAAA,QAAQ,OAAA;AACjB,oBAAoB;AACpB,iBAAS,CAAC,GAAG,GAAG,YAAG,CAAA;AACnB,iBAAS,CAAC,SAAS,GAAG,SAAS,CAAA;AAC/B,iBAAS,CAAC,MAAM,GAAG,kBAAM,CAAA;AACzB,iBAAS,CAAC,QAAQ,GAAG,sBAAQ,CAAA","sourcesContent":["import { expand } from 'brace-expansion'\nimport { assertValidPattern } from './assert-valid-pattern.js'\nimport type { ExtglobType } from './ast.js'\nimport { AST } from './ast.js'\nimport { escape } from './escape.js'\nimport { unescape } from './unescape.js'\n\nexport type Platform =\n  | 'aix'\n  | 'android'\n  | 'darwin'\n  | 'freebsd'\n  | 'haiku'\n  | 'linux'\n  | 'openbsd'\n  | 'sunos'\n  | 'win32'\n  | 'cygwin'\n  | 'netbsd'\n\nexport interface MinimatchOptions {\n  /** do not expand `{x,y}` style braces */\n  nobrace?: boolean\n  /** do not treat patterns starting with `#` as a comment */\n  nocomment?: boolean\n  /** do not treat patterns starting with `!` as a negation */\n  nonegate?: boolean\n  /** print LOTS of debugging output */\n  debug?: boolean\n  /** treat `**` the same as `*` */\n  noglobstar?: boolean\n  /** do not expand extglobs like `+(a|b)` */\n  noext?: boolean\n  /** return the pattern if nothing matches */\n  nonull?: boolean\n  /** treat `\\\\` as a path separator, not an escape character */\n  windowsPathsNoEscape?: boolean\n  /**\n   * inverse of {@link MinimatchOptions.windowsPathsNoEscape}\n   * @deprecated\n   */\n  allowWindowsEscape?: boolean\n  /**\n   * Compare a partial path to a pattern. As long as the parts\n   * of the path that are present are not contradicted by the\n   * pattern, it will be treated as a match. This is useful in\n   * applications where you're walking through a folder structure,\n   * and don't yet have the full path, but want to ensure that you\n   * do not walk down paths that can never be a match.\n   */\n  partial?: boolean\n  /** allow matches that start with `.` even if the pattern does not */\n  dot?: boolean\n  /** ignore case */\n  nocase?: boolean\n  /** ignore case only in wildcard patterns */\n  nocaseMagicOnly?: boolean\n  /** consider braces to be \"magic\" for the purpose of `hasMagic` */\n  magicalBraces?: boolean\n  /**\n   * If set, then patterns without slashes will be matched\n   * against the basename of the path if it contains slashes.\n   * For example, `a?b` would match the path `/xyz/123/acb`, but\n   * not `/xyz/acb/123`.\n   */\n  matchBase?: boolean\n  /** invert the results of negated matches */\n  flipNegate?: boolean\n  /** do not collapse multiple `/` into a single `/` */\n  preserveMultipleSlashes?: boolean\n  /**\n   * A number indicating the level of optimization that should be done\n   * to the pattern prior to parsing and using it for matches.\n   */\n  optimizationLevel?: number\n  /** operating system platform */\n  platform?: Platform\n  /**\n   * When a pattern starts with a UNC path or drive letter, and in\n   * `nocase:true` mode, do not convert the root portions of the\n   * pattern into a case-insensitive regular expression, and instead\n   * leave them as strings.\n   *\n   * This is the default when the platform is `win32` and\n   * `nocase:true` is set.\n   */\n  windowsNoMagicRoot?: boolean\n  /**\n   * max number of `{...}` patterns to expand. Default 100_000.\n   */\n  braceExpandMax?: number\n  /**\n   * Max number of non-adjacent `**` patterns to recursively walk down.\n   *\n   * The default of 200 is almost certainly high enough for most purposes,\n   * and can handle absurdly excessive patterns.\n   */\n  maxGlobstarRecursion?: number\n\n  /**\n   * Max depth to traverse for nested extglobs like `*(a|b|c)`\n   *\n   * Default is 2, which is quite low, but any higher value\n   * swiftly results in punishing performance impacts. Note\n   * that this is *not*  relevant when the globstar types can\n   * be safely coalesced into a single set.\n   *\n   * For example, `*(a|@(b|c)|d)` would be flattened into\n   * `*(a|b|c|d)`. Thus, many common extglobs will retain good\n   * performance and  never hit this limit, even if they are\n   * excessively deep and complicated.\n   *\n   * If the limit is hit, then the extglob characters are simply\n   * not parsed, and the pattern effectively switches into\n   * `noextglob: true` mode for the contents of that nested\n   * sub-pattern. This will typically _not_ result in a match,\n   * but is considered a valid trade-off for security and\n   * performance.\n   */\n  maxExtglobRecursion?: number\n}\n\nexport const minimatch = (\n  p: string,\n  pattern: string,\n  options: MinimatchOptions = {},\n) => {\n  assertValidPattern(pattern)\n\n  // shortcut: comments match nothing.\n  if (!options.nocomment && pattern.charAt(0) === '#') {\n    return false\n  }\n\n  return new Minimatch(pattern, options).match(p)\n}\n\n// Optimized checking for the most common glob patterns.\nconst starDotExtRE = /^\\*+([^+@!?*[(]*)$/\nconst starDotExtTest = (ext: string) => (f: string) =>\n  !f.startsWith('.') && f.endsWith(ext)\nconst starDotExtTestDot = (ext: string) => (f: string) => f.endsWith(ext)\nconst starDotExtTestNocase = (ext: string) => {\n  ext = ext.toLowerCase()\n  return (f: string) => !f.startsWith('.') && f.toLowerCase().endsWith(ext)\n}\nconst starDotExtTestNocaseDot = (ext: string) => {\n  ext = ext.toLowerCase()\n  return (f: string) => f.toLowerCase().endsWith(ext)\n}\nconst starDotStarRE = /^\\*+\\.\\*+$/\nconst starDotStarTest = (f: string) =>\n  !f.startsWith('.') && f.includes('.')\nconst starDotStarTestDot = (f: string) =>\n  f !== '.' && f !== '..' && f.includes('.')\nconst dotStarRE = /^\\.\\*+$/\nconst dotStarTest = (f: string) =>\n  f !== '.' && f !== '..' && f.startsWith('.')\nconst starRE = /^\\*+$/\nconst starTest = (f: string) => f.length !== 0 && !f.startsWith('.')\nconst starTestDot = (f: string) =>\n  f.length !== 0 && f !== '.' && f !== '..'\nconst qmarksRE = /^\\?+([^+@!?*[(]*)?$/\nconst qmarksTestNocase = ([$0, ext = '']: RegExpMatchArray) => {\n  const noext = qmarksTestNoExt([$0])\n  if (!ext) return noext\n  ext = ext.toLowerCase()\n  return (f: string) => noext(f) && f.toLowerCase().endsWith(ext)\n}\nconst qmarksTestNocaseDot = ([$0, ext = '']: RegExpMatchArray) => {\n  const noext = qmarksTestNoExtDot([$0])\n  if (!ext) return noext\n  ext = ext.toLowerCase()\n  return (f: string) => noext(f) && f.toLowerCase().endsWith(ext)\n}\nconst qmarksTestDot = ([$0, ext = '']: RegExpMatchArray) => {\n  const noext = qmarksTestNoExtDot([$0])\n  return !ext ? noext : (f: string) => noext(f) && f.endsWith(ext)\n}\nconst qmarksTest = ([$0, ext = '']: RegExpMatchArray) => {\n  const noext = qmarksTestNoExt([$0])\n  return !ext ? noext : (f: string) => noext(f) && f.endsWith(ext)\n}\nconst qmarksTestNoExt = ([$0]: RegExpMatchArray) => {\n  const len = $0.length\n  return (f: string) => f.length === len && !f.startsWith('.')\n}\nconst qmarksTestNoExtDot = ([$0]: RegExpMatchArray) => {\n  const len = $0.length\n  return (f: string) => f.length === len && f !== '.' && f !== '..'\n}\n\n/* c8 ignore start */\nconst defaultPlatform: Platform = (\n  typeof process === 'object' && process ?\n    (typeof process.env === 'object' &&\n      process.env &&\n      process.env.__MINIMATCH_TESTING_PLATFORM__) ||\n    process.platform\n  : 'posix') as Platform\n\nexport type Sep = '\\\\' | '/'\n\nconst path: { [k: string]: { sep: Sep } } = {\n  win32: { sep: '\\\\' },\n  posix: { sep: '/' },\n}\n/* c8 ignore stop */\n\nexport const sep =\n  defaultPlatform === 'win32' ? path.win32.sep : path.posix.sep\nminimatch.sep = sep\n\nexport const GLOBSTAR = Symbol('globstar **')\nminimatch.GLOBSTAR = GLOBSTAR\n\n// any single thing other than /\n// don't need to escape / when using new RegExp()\nconst qmark = '[^/]'\n\n// * => any number of characters\nconst star = qmark + '*?'\n\n// ** when dots are allowed.  Anything goes, except .. and .\n// not (^ or / followed by one or two dots followed by $ or /),\n// followed by anything, any number of times.\nconst twoStarDot = '(?:(?!(?:\\\\/|^)(?:\\\\.{1,2})($|\\\\/)).)*?'\n\n// not a ^ or / followed by a dot,\n// followed by anything, any number of times.\nconst twoStarNoDot = '(?:(?!(?:\\\\/|^)\\\\.).)*?'\n\nexport const filter =\n  (pattern: string, options: MinimatchOptions = {}) =>\n  (p: string) =>\n    minimatch(p, pattern, options)\nminimatch.filter = filter\n\nconst ext = (a: MinimatchOptions, b: MinimatchOptions = {}) =>\n  Object.assign({}, a, b)\n\nexport const defaults = (def: MinimatchOptions): typeof minimatch => {\n  if (!def || typeof def !== 'object' || !Object.keys(def).length) {\n    return minimatch\n  }\n\n  const orig = minimatch\n\n  const m = (p: string, pattern: string, options: MinimatchOptions = {}) =>\n    orig(p, pattern, ext(def, options))\n\n  return Object.assign(m, {\n    Minimatch: class Minimatch extends orig.Minimatch {\n      constructor(pattern: string, options: MinimatchOptions = {}) {\n        super(pattern, ext(def, options))\n      }\n      static defaults(options: MinimatchOptions) {\n        return orig.defaults(ext(def, options)).Minimatch\n      }\n    },\n\n    AST: class AST extends orig.AST {\n      /* c8 ignore start */\n      constructor(\n        type: ExtglobType | null,\n        parent?: AST,\n        options: MinimatchOptions = {},\n      ) {\n        super(type, parent, ext(def, options))\n      }\n      /* c8 ignore stop */\n\n      static fromGlob(pattern: string, options: MinimatchOptions = {}) {\n        return orig.AST.fromGlob(pattern, ext(def, options))\n      }\n    },\n\n    unescape: (\n      s: string,\n      options: Pick<\n        MinimatchOptions,\n        'windowsPathsNoEscape' | 'magicalBraces'\n      > = {},\n    ) => orig.unescape(s, ext(def, options)),\n\n    escape: (\n      s: string,\n      options: Pick<\n        MinimatchOptions,\n        'windowsPathsNoEscape' | 'magicalBraces'\n      > = {},\n    ) => orig.escape(s, ext(def, options)),\n\n    filter: (pattern: string, options: MinimatchOptions = {}) =>\n      orig.filter(pattern, ext(def, options)),\n\n    defaults: (options: MinimatchOptions) =>\n      orig.defaults(ext(def, options)),\n\n    makeRe: (pattern: string, options: MinimatchOptions = {}) =>\n      orig.makeRe(pattern, ext(def, options)),\n\n    braceExpand: (pattern: string, options: MinimatchOptions = {}) =>\n      orig.braceExpand(pattern, ext(def, options)),\n\n    match: (\n      list: string[],\n      pattern: string,\n      options: MinimatchOptions = {},\n    ) => orig.match(list, pattern, ext(def, options)),\n\n    sep: orig.sep,\n    GLOBSTAR: GLOBSTAR as typeof GLOBSTAR,\n  })\n}\nminimatch.defaults = defaults\n\n// Brace expansion:\n// a{b,c}d -> abd acd\n// a{b,}c -> abc ac\n// a{0..3}d -> a0d a1d a2d a3d\n// a{b,c{d,e}f}g -> abg acdfg acefg\n// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg\n//\n// Invalid sets are not expanded.\n// a{2..}b -> a{2..}b\n// a{b}c -> a{b}c\nexport const braceExpand = (\n  pattern: string,\n  options: MinimatchOptions = {},\n) => {\n  assertValidPattern(pattern)\n\n  // Thanks to Yeting Li  for\n  // improving this regexp to avoid a ReDOS vulnerability.\n  if (options.nobrace || !/\\{(?:(?!\\{).)*\\}/.test(pattern)) {\n    // shortcut. no need to expand.\n    return [pattern]\n  }\n\n  return expand(pattern, { max: options.braceExpandMax })\n}\nminimatch.braceExpand = braceExpand\n\n// parse a component of the expanded set.\n// At this point, no pattern may contain \"/\" in it\n// so we're going to return a 2d array, where each entry is the full\n// pattern, split on '/', and then turned into a regular expression.\n// A regexp is made at the end which joins each array with an\n// escaped /, and another full one which joins each regexp with |.\n//\n// Following the lead of Bash 4.1, note that \"**\" only has special meaning\n// when it is the *only* thing in a path portion.  Otherwise, any series\n// of * is equivalent to a single *.  Globstar behavior is enabled by\n// default, and can be disabled by setting options.noglobstar.\n\nexport const makeRe = (pattern: string, options: MinimatchOptions = {}) =>\n  new Minimatch(pattern, options).makeRe()\nminimatch.makeRe = makeRe\n\nexport const match = (\n  list: string[],\n  pattern: string,\n  options: MinimatchOptions = {},\n) => {\n  const mm = new Minimatch(pattern, options)\n  list = list.filter(f => mm.match(f))\n  if (mm.options.nonull && !list.length) {\n    list.push(pattern)\n  }\n  return list\n}\nminimatch.match = match\n\n// replace stuff like \\* with *\nconst globMagic = /[?*]|[+@!]\\(.*?\\)|\\[|\\]/\nconst regExpEscape = (s: string) =>\n  s.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&')\n\nexport type MMRegExp = RegExp & {\n  _src?: string\n  _glob?: string\n}\n\nexport type ParseReturnFiltered = string | MMRegExp | typeof GLOBSTAR\nexport type ParseReturn = ParseReturnFiltered | false\n\nexport class Minimatch {\n  options: MinimatchOptions\n  set: ParseReturnFiltered[][]\n  pattern: string\n\n  windowsPathsNoEscape: boolean\n  nonegate: boolean\n  negate: boolean\n  comment: boolean\n  empty: boolean\n  preserveMultipleSlashes: boolean\n  partial: boolean\n  globSet: string[]\n  globParts: string[][]\n  nocase: boolean\n\n  isWindows: boolean\n  platform: Platform\n  windowsNoMagicRoot: boolean\n  maxGlobstarRecursion: number\n\n  regexp: false | null | MMRegExp\n  constructor(pattern: string, options: MinimatchOptions = {}) {\n    assertValidPattern(pattern)\n\n    options = options || {}\n    this.options = options\n    this.maxGlobstarRecursion = options.maxGlobstarRecursion ?? 200\n    this.pattern = pattern\n    this.platform = options.platform || defaultPlatform\n    this.isWindows = this.platform === 'win32'\n    // avoid the annoying deprecation flag lol\n    const awe = ('allowWindow' + 'sEscape') as keyof MinimatchOptions\n    this.windowsPathsNoEscape =\n      !!options.windowsPathsNoEscape || options[awe] === false\n    if (this.windowsPathsNoEscape) {\n      this.pattern = this.pattern.replace(/\\\\/g, '/')\n    }\n    this.preserveMultipleSlashes = !!options.preserveMultipleSlashes\n    this.regexp = null\n    this.negate = false\n    this.nonegate = !!options.nonegate\n    this.comment = false\n    this.empty = false\n    this.partial = !!options.partial\n    this.nocase = !!this.options.nocase\n    this.windowsNoMagicRoot =\n      options.windowsNoMagicRoot !== undefined ?\n        options.windowsNoMagicRoot\n      : !!(this.isWindows && this.nocase)\n\n    this.globSet = []\n    this.globParts = []\n    this.set = []\n\n    // make the set of regexps etc.\n    this.make()\n  }\n\n  hasMagic(): boolean {\n    if (this.options.magicalBraces && this.set.length > 1) {\n      return true\n    }\n    for (const pattern of this.set) {\n      for (const part of pattern) {\n        if (typeof part !== 'string') return true\n      }\n    }\n    return false\n  }\n\n  debug(..._: unknown[]) {}\n\n  make() {\n    const pattern = this.pattern\n    const options = this.options\n\n    // empty patterns and comments match nothing.\n    if (!options.nocomment && pattern.charAt(0) === '#') {\n      this.comment = true\n      return\n    }\n\n    if (!pattern) {\n      this.empty = true\n      return\n    }\n\n    // step 1: figure out negation, etc.\n    this.parseNegate()\n\n    // step 2: expand braces\n    this.globSet = [...new Set(this.braceExpand())]\n\n    if (options.debug) {\n      //oxlint-disable-next-line no-console\n      this.debug = (...args: unknown[]) => console.error(...args)\n    }\n\n    this.debug(this.pattern, this.globSet)\n\n    // step 3: now we have a set, so turn each one into a series of\n    // path-portion matching patterns.\n    // These will be regexps, except in the case of \"**\", which is\n    // set to the GLOBSTAR object for globstar behavior,\n    // and will not contain any / characters\n    //\n    // First, we preprocess to make the glob pattern sets a bit simpler\n    // and deduped.  There are some perf-killing patterns that can cause\n    // problems with a glob walk, but we can simplify them down a bit.\n    const rawGlobParts = this.globSet.map(s => this.slashSplit(s))\n    this.globParts = this.preprocess(rawGlobParts)\n    this.debug(this.pattern, this.globParts)\n\n    // glob --> regexps\n    let set = this.globParts.map((s, _, __) => {\n      if (this.isWindows && this.windowsNoMagicRoot) {\n        // check if it's a drive or unc path.\n        const isUNC =\n          s[0] === '' &&\n          s[1] === '' &&\n          (s[2] === '?' || !globMagic.test(s[2])) &&\n          !globMagic.test(s[3])\n        const isDrive = /^[a-z]:/i.test(s[0])\n        if (isUNC) {\n          return [\n            ...s.slice(0, 4),\n            ...s.slice(4).map(ss => this.parse(ss)),\n          ]\n        } else if (isDrive) {\n          return [s[0], ...s.slice(1).map(ss => this.parse(ss))]\n        }\n      }\n      return s.map(ss => this.parse(ss))\n    })\n\n    this.debug(this.pattern, set)\n\n    // filter out everything that didn't compile properly.\n    this.set = set.filter(\n      s => s.indexOf(false) === -1,\n    ) as ParseReturnFiltered[][]\n\n    // do not treat the ? in UNC paths as magic\n    if (this.isWindows) {\n      for (let i = 0; i < this.set.length; i++) {\n        const p = this.set[i]\n        if (\n          p[0] === '' &&\n          p[1] === '' &&\n          this.globParts[i][2] === '?' &&\n          typeof p[3] === 'string' &&\n          /^[a-z]:$/i.test(p[3])\n        ) {\n          p[2] = '?'\n        }\n      }\n    }\n\n    this.debug(this.pattern, this.set)\n  }\n\n  // various transforms to equivalent pattern sets that are\n  // faster to process in a filesystem walk.  The goal is to\n  // eliminate what we can, and push all ** patterns as far\n  // to the right as possible, even if it increases the number\n  // of patterns that we have to process.\n  preprocess(globParts: string[][]) {\n    // if we're not in globstar mode, then turn ** into *\n    if (this.options.noglobstar) {\n      for (const partset of globParts) {\n        for (let j = 0; j < partset.length; j++) {\n          if (partset[j] === '**') {\n            partset[j] = '*'\n          }\n        }\n      }\n    }\n\n    const { optimizationLevel = 1 } = this.options\n\n    if (optimizationLevel >= 2) {\n      // aggressive optimization for the purpose of fs walking\n      globParts = this.firstPhasePreProcess(globParts)\n      globParts = this.secondPhasePreProcess(globParts)\n    } else if (optimizationLevel >= 1) {\n      // just basic optimizations to remove some .. parts\n      globParts = this.levelOneOptimize(globParts)\n    } else {\n      // just collapse multiple ** portions into one\n      globParts = this.adjascentGlobstarOptimize(globParts)\n    }\n\n    return globParts\n  }\n\n  // just get rid of adjascent ** portions\n  adjascentGlobstarOptimize(globParts: string[][]) {\n    return globParts.map(parts => {\n      let gs: number = -1\n      while (-1 !== (gs = parts.indexOf('**', gs + 1))) {\n        let i = gs\n        while (parts[i + 1] === '**') {\n          i++\n        }\n        if (i !== gs) {\n          parts.splice(gs, i - gs)\n        }\n      }\n      return parts\n    })\n  }\n\n  // get rid of adjascent ** and resolve .. portions\n  levelOneOptimize(globParts: string[][]) {\n    return globParts.map(parts => {\n      parts = parts.reduce((set: string[], part) => {\n        const prev = set[set.length - 1]\n        if (part === '**' && prev === '**') {\n          return set\n        }\n        if (part === '..') {\n          if (prev && prev !== '..' && prev !== '.' && prev !== '**') {\n            set.pop()\n            return set\n          }\n        }\n        set.push(part)\n        return set\n      }, [])\n      return parts.length === 0 ? [''] : parts\n    })\n  }\n\n  levelTwoFileOptimize(parts: string | string[]) {\n    if (!Array.isArray(parts)) {\n      parts = this.slashSplit(parts)\n    }\n    let didSomething: boolean = false\n\n    do {\n      didSomething = false\n      // 
// -> 
/\n      if (!this.preserveMultipleSlashes) {\n        for (let i = 1; i < parts.length - 1; i++) {\n          const p = parts[i]\n          // don't squeeze out UNC patterns\n          if (i === 1 && p === '' && parts[0] === '') continue\n          if (p === '.' || p === '') {\n            didSomething = true\n            parts.splice(i, 1)\n            i--\n          }\n        }\n        if (\n          parts[0] === '.' &&\n          parts.length === 2 &&\n          (parts[1] === '.' || parts[1] === '')\n        ) {\n          didSomething = true\n          parts.pop()\n        }\n      }\n\n      // 
/

/../ ->

/\n      let dd: number = 0\n      while (-1 !== (dd = parts.indexOf('..', dd + 1))) {\n        const p = parts[dd - 1]\n        if (\n          p &&\n          p !== '.' &&\n          p !== '..' &&\n          p !== '**' &&\n          !(this.isWindows && /^[a-z]:$/i.test(p))\n        ) {\n          didSomething = true\n          parts.splice(dd - 1, 2)\n          dd -= 2\n        }\n      }\n    } while (didSomething)\n    return parts.length === 0 ? [''] : parts\n  }\n\n  // First phase: single-pattern processing\n  // 
 is 1 or more portions\n  //  is 1 or more portions\n  // 

is any portion other than ., .., '', or **\n // is . or ''\n //\n // **/.. is *brutal* for filesystem walking performance, because\n // it effectively resets the recursive walk each time it occurs,\n // and ** cannot be reduced out by a .. pattern part like a regexp\n // or most strings (other than .., ., and '') can be.\n //\n //

/**/../

/

/ -> {

/../

/

/,

/**/

/

/}\n //

// -> 
/\n  // 
/

/../ ->

/\n  // **/**/ -> **/\n  //\n  // **/*/ -> */**/ <== not valid because ** doesn't follow\n  // this WOULD be allowed if ** did follow symlinks, or * didn't\n  firstPhasePreProcess(globParts: string[][]) {\n    let didSomething = false\n    do {\n      didSomething = false\n      // 
/**/../

/

/ -> {

/../

/

/,

/**/

/

/}\n for (let parts of globParts) {\n let gs: number = -1\n while (-1 !== (gs = parts.indexOf('**', gs + 1))) {\n let gss: number = gs\n while (parts[gss + 1] === '**') {\n //

/**/**/ -> 
/**/\n            gss++\n          }\n          // eg, if gs is 2 and gss is 4, that means we have 3 **\n          // parts, and can remove 2 of them.\n          if (gss > gs) {\n            parts.splice(gs + 1, gss - gs)\n          }\n\n          let next = parts[gs + 1]\n          const p = parts[gs + 2]\n          const p2 = parts[gs + 3]\n          if (next !== '..') continue\n          if (\n            !p ||\n            p === '.' ||\n            p === '..' ||\n            !p2 ||\n            p2 === '.' ||\n            p2 === '..'\n          ) {\n            continue\n          }\n          didSomething = true\n          // edit parts in place, and push the new one\n          parts.splice(gs, 1)\n          const other = parts.slice(0)\n          other[gs] = '**'\n          globParts.push(other)\n          gs--\n        }\n\n        // 
// -> 
/\n        if (!this.preserveMultipleSlashes) {\n          for (let i = 1; i < parts.length - 1; i++) {\n            const p = parts[i]\n            // don't squeeze out UNC patterns\n            if (i === 1 && p === '' && parts[0] === '') continue\n            if (p === '.' || p === '') {\n              didSomething = true\n              parts.splice(i, 1)\n              i--\n            }\n          }\n          if (\n            parts[0] === '.' &&\n            parts.length === 2 &&\n            (parts[1] === '.' || parts[1] === '')\n          ) {\n            didSomething = true\n            parts.pop()\n          }\n        }\n\n        // 
/

/../ ->

/\n        let dd: number = 0\n        while (-1 !== (dd = parts.indexOf('..', dd + 1))) {\n          const p = parts[dd - 1]\n          if (p && p !== '.' && p !== '..' && p !== '**') {\n            didSomething = true\n            const needDot = dd === 1 && parts[dd + 1] === '**'\n            const splin = needDot ? ['.'] : []\n            parts.splice(dd - 1, 2, ...splin)\n            if (parts.length === 0) parts.push('')\n            dd -= 2\n          }\n        }\n      }\n    } while (didSomething)\n\n    return globParts\n  }\n\n  // second phase: multi-pattern dedupes\n  // {
/*/,
/

/} ->

/*/\n  // {
/,
/} -> 
/\n  // {
/**/,
/} -> 
/**/\n  //\n  // {
/**/,
/**/

/} ->

/**/\n  // ^-- not valid because ** doens't follow symlinks\n  secondPhasePreProcess(globParts: string[][]): string[][] {\n    for (let i = 0; i < globParts.length - 1; i++) {\n      for (let j = i + 1; j < globParts.length; j++) {\n        const matched = this.partsMatch(\n          globParts[i],\n          globParts[j],\n          !this.preserveMultipleSlashes,\n        )\n        if (matched) {\n          globParts[i] = []\n          globParts[j] = matched\n          break\n        }\n      }\n    }\n    return globParts.filter(gs => gs.length)\n  }\n\n  partsMatch(\n    a: string[],\n    b: string[],\n    emptyGSMatch: boolean = false,\n  ): false | string[] {\n    let ai = 0\n    let bi = 0\n    let result: string[] = []\n    let which: string = ''\n    while (ai < a.length && bi < b.length) {\n      if (a[ai] === b[bi]) {\n        result.push(which === 'b' ? b[bi] : a[ai])\n        ai++\n        bi++\n      } else if (emptyGSMatch && a[ai] === '**' && b[bi] === a[ai + 1]) {\n        result.push(a[ai])\n        ai++\n      } else if (emptyGSMatch && b[bi] === '**' && a[ai] === b[bi + 1]) {\n        result.push(b[bi])\n        bi++\n      } else if (\n        a[ai] === '*' &&\n        b[bi] &&\n        (this.options.dot || !b[bi].startsWith('.')) &&\n        b[bi] !== '**'\n      ) {\n        if (which === 'b') return false\n        which = 'a'\n        result.push(a[ai])\n        ai++\n        bi++\n      } else if (\n        b[bi] === '*' &&\n        a[ai] &&\n        (this.options.dot || !a[ai].startsWith('.')) &&\n        a[ai] !== '**'\n      ) {\n        if (which === 'a') return false\n        which = 'b'\n        result.push(b[bi])\n        ai++\n        bi++\n      } else {\n        return false\n      }\n    }\n    // if we fall out of the loop, it means they two are identical\n    // as long as their lengths match\n    return a.length === b.length && result\n  }\n\n  parseNegate() {\n    if (this.nonegate) return\n\n    const pattern = this.pattern\n    let negate = false\n    let negateOffset = 0\n\n    for (let i = 0; i < pattern.length && pattern.charAt(i) === '!'; i++) {\n      negate = !negate\n      negateOffset++\n    }\n\n    if (negateOffset) this.pattern = pattern.slice(negateOffset)\n    this.negate = negate\n  }\n\n  // set partial to true to test if, for example,\n  // \"/a/b\" matches the start of \"/*/b/*/d\"\n  // Partial means, if you run out of file before you run\n  // out of pattern, then that's fine, as long as all\n  // the parts match.\n  matchOne(\n    file: string[],\n    pattern: ParseReturn[],\n    partial: boolean = false,\n  ) {\n    let fileStartIndex = 0\n    let patternStartIndex = 0\n\n    // UNC paths like //?/X:/... can match X:/... and vice versa\n    // Drive letters in absolute drive or unc paths are always compared\n    // case-insensitively.\n    if (this.isWindows) {\n      const fileDrive =\n        typeof file[0] === 'string' && /^[a-z]:$/i.test(file[0])\n      const fileUNC =\n        !fileDrive &&\n        file[0] === '' &&\n        file[1] === '' &&\n        file[2] === '?' &&\n        /^[a-z]:$/i.test(file[3])\n\n      const patternDrive =\n        typeof pattern[0] === 'string' && /^[a-z]:$/i.test(pattern[0])\n      const patternUNC =\n        !patternDrive &&\n        pattern[0] === '' &&\n        pattern[1] === '' &&\n        pattern[2] === '?' &&\n        typeof pattern[3] === 'string' &&\n        /^[a-z]:$/i.test(pattern[3])\n\n      const fdi =\n        fileUNC ? 3\n        : fileDrive ? 0\n        : undefined\n      const pdi =\n        patternUNC ? 3\n        : patternDrive ? 0\n        : undefined\n      if (typeof fdi === 'number' && typeof pdi === 'number') {\n        const [fd, pd]: [string, string] = [\n          file[fdi],\n          pattern[pdi] as string,\n        ]\n        // start matching at the drive letter index of each\n        if (fd.toLowerCase() === pd.toLowerCase()) {\n          pattern[pdi] = fd\n          patternStartIndex = pdi\n          fileStartIndex = fdi\n        }\n      }\n    }\n\n    // resolve and reduce . and .. portions in the file as well.\n    // don't need to do the second phase, because it's only one string[]\n    const { optimizationLevel = 1 } = this.options\n    if (optimizationLevel >= 2) {\n      file = this.levelTwoFileOptimize(file)\n    }\n\n    if (pattern.includes(GLOBSTAR)) {\n      return this.#matchGlobstar(\n        file,\n        pattern,\n        partial,\n        fileStartIndex,\n        patternStartIndex,\n      )\n    }\n\n    return this.#matchOne(\n      file,\n      pattern,\n      partial,\n      fileStartIndex,\n      patternStartIndex,\n    )\n  }\n\n  #matchGlobstar(\n    file: string[],\n    pattern: ParseReturn[],\n    partial: boolean,\n    fileIndex: number,\n    patternIndex: number,\n  ) {\n    // split the pattern into head, tail, and middle of ** delimited parts\n    const firstgs = pattern.indexOf(GLOBSTAR, patternIndex)\n    const lastgs = pattern.lastIndexOf(GLOBSTAR)\n\n    // split the pattern up into globstar-delimited sections\n    // the tail has to be at the end, and the others just have\n    // to be found in order from the head.\n    const [head, body, tail] =\n      partial ?\n        [\n          pattern.slice(patternIndex, firstgs),\n          pattern.slice(firstgs + 1),\n          [],\n        ]\n      : [\n          pattern.slice(patternIndex, firstgs),\n          pattern.slice(firstgs + 1, lastgs),\n          pattern.slice(lastgs + 1),\n        ]\n\n    // check the head, from the current file/pattern index.\n    if (head.length) {\n      const fileHead = file.slice(fileIndex, fileIndex + head.length)\n      if (!this.#matchOne(fileHead, head, partial, 0, 0)) {\n        return false\n      }\n      fileIndex += head.length\n      patternIndex += head.length\n    }\n    // now we know the head matches!\n\n    // if the last portion is not empty, it MUST match the end\n    // check the tail\n    let fileTailMatch: number = 0\n    if (tail.length) {\n      // if head + tail > file, then we cannot possibly match\n      if (tail.length + fileIndex > file.length) return false\n\n      // try to match the tail\n      let tailStart = file.length - tail.length\n      if (this.#matchOne(file, tail, partial, tailStart, 0)) {\n        fileTailMatch = tail.length\n      } else {\n        // affordance for stuff like a/**/* matching a/b/\n        // if the last file portion is '', and there's more to the pattern\n        // then try without the '' bit.\n        if (\n          file[file.length - 1] !== '' ||\n          fileIndex + tail.length === file.length\n        ) {\n          return false\n        }\n        tailStart--\n        if (!this.#matchOne(file, tail, partial, tailStart, 0)) {\n          return false\n        }\n        fileTailMatch = tail.length + 1\n      }\n    }\n\n    // now we know the tail matches!\n\n    // the middle is zero or more portions wrapped in **, possibly\n    // containing more ** sections.\n    // so a/**/b/**/c/**/d has become **/b/**/c/**\n    // if it's empty, it means a/**/b, just verify we have no bad dots\n    // if there's no tail, so it ends on /**, then we must have *something*\n    // after the head, or it's not a matc\n    if (!body.length) {\n      let sawSome = !!fileTailMatch\n      for (let i = fileIndex; i < file.length - fileTailMatch; i++) {\n        const f = String(file[i])\n        sawSome = true\n        if (\n          f === '.' ||\n          f === '..' ||\n          (!this.options.dot && f.startsWith('.'))\n        ) {\n          return false\n        }\n      }\n      // in partial mode, we just need to get past all file parts\n      return partial || sawSome\n    }\n\n    // now we know that there's one or more body sections, which can\n    // be matched anywhere from the 0 index (because the head was pruned)\n    // through to the length-fileTailMatch index.\n    // split the body up into sections, and note the minimum index it can\n    // be found at (start with the length of all previous segments)\n    // [section, before, after]\n    const bodySegments: [ParseReturn[], number][] = [[[], 0]]\n    let currentBody: [ParseReturn[], number] = bodySegments[0]\n    let nonGsParts = 0\n    const nonGsPartsSums: number[] = [0]\n    for (const b of body) {\n      if (b === GLOBSTAR) {\n        nonGsPartsSums.push(nonGsParts)\n        currentBody = [[], 0]\n        bodySegments.push(currentBody)\n      } else {\n        currentBody[0].push(b)\n        nonGsParts++\n      }\n    }\n    let i = bodySegments.length - 1\n    const fileLength = file.length - fileTailMatch\n    for (const b of bodySegments) {\n      b[1] = fileLength - ((nonGsPartsSums[i--] as number) + b[0].length)\n    }\n\n    return !!this.#matchGlobStarBodySections(\n      file,\n      bodySegments,\n      fileIndex,\n      0,\n      partial,\n      0,\n      !!fileTailMatch,\n    )\n  }\n\n  // return false for \"nope, not matching\"\n  // return null for \"not matching, cannot keep trying\"\n  #matchGlobStarBodySections(\n    file: string[],\n    // pattern section, last possible position for it\n    bodySegments: [ParseReturn[], number][],\n    fileIndex: number,\n    bodyIndex: number,\n    partial: boolean,\n    globStarDepth: number,\n    sawTail: boolean,\n  ): boolean | null {\n    // take the first body segment, and walk from fileIndex to its \"after\"\n    // value at the end\n    // If it doesn't match at that position, we increment, until we hit\n    // that final possible position, and give up.\n    // If it does match, then advance and try to rest.\n    // If any of them fail we keep walking forward.\n    // this is still a bit recursively painful, but it's more constrained\n    // than previous implementations, because we never test something that\n    // can't possibly be a valid matching condition.\n    const bs = bodySegments[bodyIndex]\n    if (!bs) {\n      // just make sure that there's no bad dots\n      for (let i = fileIndex; i < file.length; i++) {\n        sawTail = true\n        const f = file[i]\n        if (\n          f === '.' ||\n          f === '..' ||\n          (!this.options.dot && f.startsWith('.'))\n        ) {\n          return false\n        }\n      }\n      return sawTail\n    }\n\n    // have a non-globstar body section to test\n    const [body, after] = bs\n    while (fileIndex <= after) {\n      const m = this.#matchOne(\n        file.slice(0, fileIndex + body.length),\n        body,\n        partial,\n        fileIndex,\n        0,\n      )\n      // if limit exceeded, no match. intentional false negative,\n      // acceptable break in correctness for security.\n      if (m && globStarDepth < this.maxGlobstarRecursion) {\n        // match! see if the rest match. if so, we're done!\n        const sub = this.#matchGlobStarBodySections(\n          file,\n          bodySegments,\n          fileIndex + body.length,\n          bodyIndex + 1,\n          partial,\n          globStarDepth + 1,\n          sawTail,\n        )\n        if (sub !== false) {\n          return sub\n        }\n      }\n      const f = file[fileIndex]\n      if (\n        f === '.' ||\n        f === '..' ||\n        (!this.options.dot && f.startsWith('.'))\n      ) {\n        return false\n      }\n\n      fileIndex++\n    }\n    // walked off. no point continuing\n    return partial || null\n  }\n\n  #matchOne(\n    file: string[],\n    pattern: ParseReturn[],\n    partial: boolean,\n    fileIndex: number,\n    patternIndex: number,\n  ) {\n    let fi: number\n    let pi: number\n    let pl: number\n    let fl: number\n    for (\n      fi = fileIndex,\n        pi = patternIndex,\n        fl = file.length,\n        pl = pattern.length;\n      fi < fl && pi < pl;\n      fi++, pi++\n    ) {\n      this.debug('matchOne loop')\n      let p = pattern[pi]\n      let f = file[fi]\n\n      this.debug(pattern, p, f)\n\n      // should be impossible.\n      // some invalid regexp stuff in the set.\n      /* c8 ignore start */\n      if (p === false || p === GLOBSTAR) {\n        return false\n      }\n      /* c8 ignore stop */\n\n      // something other than **\n      // non-magic patterns just have to match exactly\n      // patterns with magic have been turned into regexps.\n      let hit: boolean\n      if (typeof p === 'string') {\n        hit = f === p\n        this.debug('string match', p, f, hit)\n      } else {\n        hit = p.test(f)\n        this.debug('pattern match', p, f, hit)\n      }\n\n      if (!hit) return false\n    }\n\n    // Note: ending in / means that we'll get a final \"\"\n    // at the end of the pattern.  This can only match a\n    // corresponding \"\" at the end of the file.\n    // If the file ends in /, then it can only match a\n    // a pattern that ends in /, unless the pattern just\n    // doesn't have any more for it. But, a/b/ should *not*\n    // match \"a/b/*\", even though \"\" matches against the\n    // [^/]*? pattern, except in partial mode, where it might\n    // simply not be reached yet.\n    // However, a/b/ should still satisfy a/*\n\n    // now either we fell off the end of the pattern, or we're done.\n    if (fi === fl && pi === pl) {\n      // ran out of pattern and filename at the same time.\n      // an exact hit!\n      return true\n    } else if (fi === fl) {\n      // ran out of file, but still had pattern left.\n      // this is ok if we're doing the match as part of\n      // a glob fs traversal.\n      return partial\n    } else if (pi === pl) {\n      // ran out of pattern, still have file left.\n      // this is only acceptable if we're on the very last\n      // empty segment of a file with a trailing slash.\n      // a/* should match a/b/\n      return fi === fl - 1 && file[fi] === ''\n\n      /* c8 ignore start */\n    } else {\n      // should be unreachable.\n      throw new Error('wtf?')\n    }\n    /* c8 ignore stop */\n  }\n\n  braceExpand() {\n    return braceExpand(this.pattern, this.options)\n  }\n\n  parse(pattern: string): ParseReturn {\n    assertValidPattern(pattern)\n\n    const options = this.options\n\n    // shortcuts\n    if (pattern === '**') return GLOBSTAR\n    if (pattern === '') return ''\n\n    // far and away, the most common glob pattern parts are\n    // *, *.*, and *.  Add a fast check method for those.\n    let m: RegExpMatchArray | null\n    let fastTest: null | ((f: string) => boolean) = null\n    if ((m = pattern.match(starRE))) {\n      fastTest = options.dot ? starTestDot : starTest\n    } else if ((m = pattern.match(starDotExtRE))) {\n      fastTest = (\n        options.nocase ?\n          options.dot ?\n            starDotExtTestNocaseDot\n          : starDotExtTestNocase\n        : options.dot ? starDotExtTestDot\n        : starDotExtTest)(m[1])\n    } else if ((m = pattern.match(qmarksRE))) {\n      fastTest = (\n        options.nocase ?\n          options.dot ?\n            qmarksTestNocaseDot\n          : qmarksTestNocase\n        : options.dot ? qmarksTestDot\n        : qmarksTest)(m)\n    } else if ((m = pattern.match(starDotStarRE))) {\n      fastTest = options.dot ? starDotStarTestDot : starDotStarTest\n    } else if ((m = pattern.match(dotStarRE))) {\n      fastTest = dotStarTest\n    }\n\n    const re = AST.fromGlob(pattern, this.options).toMMPattern()\n    if (fastTest && typeof re === 'object') {\n      // Avoids overriding in frozen environments\n      Reflect.defineProperty(re, 'test', { value: fastTest })\n    }\n    return re\n  }\n\n  makeRe() {\n    if (this.regexp || this.regexp === false) return this.regexp\n\n    // at this point, this.set is a 2d array of partial\n    // pattern strings, or \"**\".\n    //\n    // It's better to use .match().  This function shouldn't\n    // be used, really, but it's pretty convenient sometimes,\n    // when you just want to work with a regex.\n    const set = this.set\n\n    if (!set.length) {\n      this.regexp = false\n      return this.regexp\n    }\n    const options = this.options\n\n    const twoStar =\n      options.noglobstar ? star\n      : options.dot ? twoStarDot\n      : twoStarNoDot\n    const flags = new Set(options.nocase ? ['i'] : [])\n\n    // regexpify non-globstar patterns\n    // if ** is only item, then we just do one twoStar\n    // if ** is first, and there are more, prepend (\\/|twoStar\\/)? to next\n    // if ** is last, append (\\/twoStar|) to previous\n    // if ** is in the middle, append (\\/|\\/twoStar\\/) to previous\n    // then filter out GLOBSTAR symbols\n    let re = set\n      .map(pattern => {\n        const pp: (string | typeof GLOBSTAR)[] = pattern.map(p => {\n          if (p instanceof RegExp) {\n            for (const f of p.flags.split('')) flags.add(f)\n          }\n          return (\n            typeof p === 'string' ? regExpEscape(p)\n            : p === GLOBSTAR ? GLOBSTAR\n            : p._src\n          )\n        }) as (string | typeof GLOBSTAR)[]\n        pp.forEach((p, i) => {\n          const next = pp[i + 1]\n          const prev = pp[i - 1]\n          if (p !== GLOBSTAR || prev === GLOBSTAR) {\n            return\n          }\n          if (prev === undefined) {\n            if (next !== undefined && next !== GLOBSTAR) {\n              pp[i + 1] = '(?:\\\\/|' + twoStar + '\\\\/)?' + next\n            } else {\n              pp[i] = twoStar\n            }\n          } else if (next === undefined) {\n            pp[i - 1] = prev + '(?:\\\\/|\\\\/' + twoStar + ')?'\n          } else if (next !== GLOBSTAR) {\n            pp[i - 1] = prev + '(?:\\\\/|\\\\/' + twoStar + '\\\\/)' + next\n            pp[i + 1] = GLOBSTAR\n          }\n        })\n        const filtered = pp.filter(p => p !== GLOBSTAR)\n\n        // For partial matches, we need to make the pattern match\n        // any prefix of the full path. We do this by generating\n        // alternative patterns that match progressively longer prefixes.\n        if (this.partial && filtered.length >= 1) {\n          const prefixes: string[] = []\n          for (let i = 1; i <= filtered.length; i++) {\n            prefixes.push(filtered.slice(0, i).join('/'))\n          }\n          return '(?:' + prefixes.join('|') + ')'\n        }\n\n        return filtered.join('/')\n      })\n      .join('|')\n\n    // need to wrap in parens if we had more than one thing with |,\n    // otherwise only the first will be anchored to ^ and the last to $\n    const [open, close] = set.length > 1 ? ['(?:', ')'] : ['', '']\n    // must match entire pattern\n    // ending in a * or ** will make it less strict.\n    re = '^' + open + re + close + '$'\n\n    // In partial mode, '/' should always match as it's a valid prefix for any pattern\n    if (this.partial) {\n      re = '^(?:\\\\/|' + open + re.slice(1, -1) + close + ')$'\n    }\n\n    // can match anything, as long as it's not this.\n    if (this.negate) re = '^(?!' + re + ').+$'\n\n    try {\n      this.regexp = new RegExp(re, [...flags].join(''))\n      /* c8 ignore start */\n    } catch {\n      // should be impossible\n      this.regexp = false\n    }\n    /* c8 ignore stop */\n    return this.regexp\n  }\n\n  slashSplit(p: string) {\n    // if p starts with // on windows, we preserve that\n    // so that UNC paths aren't broken.  Otherwise, any number of\n    // / characters are coalesced into one, unless\n    // preserveMultipleSlashes is set to true.\n    if (this.preserveMultipleSlashes) {\n      return p.split('/')\n    } else if (this.isWindows && /^\\/\\/[^/]+/.test(p)) {\n      // add an extra '' for the one we lose\n      return ['', ...p.split(/\\/+/)]\n    } else {\n      return p.split(/\\/+/)\n    }\n  }\n\n  match(f: string, partial = this.partial) {\n    this.debug('match', f, this.pattern)\n    // short-circuit in the case of busted things.\n    // comments, etc.\n    if (this.comment) {\n      return false\n    }\n    if (this.empty) {\n      return f === ''\n    }\n\n    if (f === '/' && partial) {\n      return true\n    }\n\n    const options = this.options\n\n    // windows: need to use /, not \\\n    if (this.isWindows) {\n      f = f.split('\\\\').join('/')\n    }\n\n    // treat the test path as a set of pathparts.\n    const ff = this.slashSplit(f)\n    this.debug(this.pattern, 'split', ff)\n\n    // just ONE of the pattern sets in this.set needs to match\n    // in order for it to be valid.  If negating, then just one\n    // match means that we have failed.\n    // Either way, return on the first hit.\n\n    const set = this.set\n    this.debug(this.pattern, 'set', set)\n\n    // Find the basename of the path by looking for the last non-empty segment\n    let filename: string = ff[ff.length - 1]\n    if (!filename) {\n      for (let i = ff.length - 2; !filename && i >= 0; i--) {\n        filename = ff[i]\n      }\n    }\n\n    for (const pattern of set) {\n      let file = ff\n      if (options.matchBase && pattern.length === 1) {\n        file = [filename]\n      }\n      const hit = this.matchOne(file, pattern, partial)\n      if (hit) {\n        if (options.flipNegate) {\n          return true\n        }\n        return !this.negate\n      }\n    }\n\n    // didn't get any hits.  this is success if it's a negative\n    // pattern, failure otherwise.\n    if (options.flipNegate) {\n      return false\n    }\n    return this.negate\n  }\n\n  static defaults(def: MinimatchOptions) {\n    return minimatch.defaults(def).Minimatch\n  }\n}\n/* c8 ignore start */\nexport { AST } from './ast.js'\nexport { escape } from './escape.js'\nexport { unescape } from './unescape.js'\n/* c8 ignore stop */\nminimatch.AST = AST\nminimatch.Minimatch = Minimatch\nminimatch.escape = escape\nminimatch.unescape = unescape\n"]}
\ No newline at end of file
diff --git a/node_modules/minimatch/dist/commonjs/unescape.d.ts b/node_modules/minimatch/dist/commonjs/unescape.d.ts
index 30ec8292..c4a14473 100644
--- a/node_modules/minimatch/dist/commonjs/unescape.d.ts
+++ b/node_modules/minimatch/dist/commonjs/unescape.d.ts
@@ -1,4 +1,4 @@
-import { MinimatchOptions } from './index.js';
+import type { MinimatchOptions } from './index.js';
 /**
  * Un-escape a string that has been escaped with {@link escape}.
  *
diff --git a/node_modules/minimatch/dist/commonjs/unescape.d.ts.map b/node_modules/minimatch/dist/commonjs/unescape.d.ts.map
index 6b84d753..09d6eab4 100644
--- a/node_modules/minimatch/dist/commonjs/unescape.d.ts.map
+++ b/node_modules/minimatch/dist/commonjs/unescape.d.ts.map
@@ -1 +1 @@
-{"version":3,"file":"unescape.d.ts","sourceRoot":"","sources":["../../src/unescape.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAE7C;;;;;;;;;;;;;;;;;;GAkBG;AAEH,eAAO,MAAM,QAAQ,GACnB,GAAG,MAAM,EACT,2CAGG,IAAI,CAAC,gBAAgB,EAAE,sBAAsB,GAAG,eAAe,CAAM,WAczE,CAAA"}
\ No newline at end of file
+{"version":3,"file":"unescape.d.ts","sourceRoot":"","sources":["../../src/unescape.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAElD;;;;;;;;;;;;;;;;;;GAkBG;AAEH,eAAO,MAAM,QAAQ,GACnB,GAAG,MAAM,EACT,2CAGG,IAAI,CAAC,gBAAgB,EAAE,sBAAsB,GAAG,eAAe,CAAM,WAczE,CAAA"}
\ No newline at end of file
diff --git a/node_modules/minimatch/dist/commonjs/unescape.js b/node_modules/minimatch/dist/commonjs/unescape.js
index 171098d8..ad648fba 100644
--- a/node_modules/minimatch/dist/commonjs/unescape.js
+++ b/node_modules/minimatch/dist/commonjs/unescape.js
@@ -22,17 +22,17 @@ exports.unescape = void 0;
  */
 const unescape = (s, { windowsPathsNoEscape = false, magicalBraces = true, } = {}) => {
     if (magicalBraces) {
-        return windowsPathsNoEscape
-            ? s.replace(/\[([^\/\\])\]/g, '$1')
+        return windowsPathsNoEscape ?
+            s.replace(/\[([^/\\])\]/g, '$1')
             : s
-                .replace(/((?!\\).|^)\[([^\/\\])\]/g, '$1$2')
-                .replace(/\\([^\/])/g, '$1');
+                .replace(/((?!\\).|^)\[([^/\\])\]/g, '$1$2')
+                .replace(/\\([^/])/g, '$1');
     }
-    return windowsPathsNoEscape
-        ? s.replace(/\[([^\/\\{}])\]/g, '$1')
+    return windowsPathsNoEscape ?
+        s.replace(/\[([^/\\{}])\]/g, '$1')
         : s
-            .replace(/((?!\\).|^)\[([^\/\\{}])\]/g, '$1$2')
-            .replace(/\\([^\/{}])/g, '$1');
+            .replace(/((?!\\).|^)\[([^/\\{}])\]/g, '$1$2')
+            .replace(/\\([^/{}])/g, '$1');
 };
 exports.unescape = unescape;
 //# sourceMappingURL=unescape.js.map
\ No newline at end of file
diff --git a/node_modules/minimatch/dist/commonjs/unescape.js.map b/node_modules/minimatch/dist/commonjs/unescape.js.map
index c66031e8..44387ec5 100644
--- a/node_modules/minimatch/dist/commonjs/unescape.js.map
+++ b/node_modules/minimatch/dist/commonjs/unescape.js.map
@@ -1 +1 @@
-{"version":3,"file":"unescape.js","sourceRoot":"","sources":["../../src/unescape.ts"],"names":[],"mappings":";;;AAEA;;;;;;;;;;;;;;;;;;GAkBG;AAEI,MAAM,QAAQ,GAAG,CACtB,CAAS,EACT,EACE,oBAAoB,GAAG,KAAK,EAC5B,aAAa,GAAG,IAAI,MACgD,EAAE,EACxE,EAAE;IACF,IAAI,aAAa,EAAE,CAAC;QAClB,OAAO,oBAAoB;YACzB,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,gBAAgB,EAAE,IAAI,CAAC;YACnC,CAAC,CAAC,CAAC;iBACE,OAAO,CAAC,2BAA2B,EAAE,MAAM,CAAC;iBAC5C,OAAO,CAAC,YAAY,EAAE,IAAI,CAAC,CAAA;IACpC,CAAC;IACD,OAAO,oBAAoB;QACzB,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,kBAAkB,EAAE,IAAI,CAAC;QACrC,CAAC,CAAC,CAAC;aACE,OAAO,CAAC,6BAA6B,EAAE,MAAM,CAAC;aAC9C,OAAO,CAAC,cAAc,EAAE,IAAI,CAAC,CAAA;AACtC,CAAC,CAAA;AAnBY,QAAA,QAAQ,YAmBpB","sourcesContent":["import { MinimatchOptions } from './index.js'\n\n/**\n * Un-escape a string that has been escaped with {@link escape}.\n *\n * If the {@link MinimatchOptions.windowsPathsNoEscape} option is used, then\n * square-bracket escapes are removed, but not backslash escapes.\n *\n * For example, it will turn the string `'[*]'` into `*`, but it will not\n * turn `'\\\\*'` into `'*'`, because `\\` is a path separator in\n * `windowsPathsNoEscape` mode.\n *\n * When `windowsPathsNoEscape` is not set, then both square-bracket escapes and\n * backslash escapes are removed.\n *\n * Slashes (and backslashes in `windowsPathsNoEscape` mode) cannot be escaped\n * or unescaped.\n *\n * When `magicalBraces` is not set, escapes of braces (`{` and `}`) will not be\n * unescaped.\n */\n\nexport const unescape = (\n  s: string,\n  {\n    windowsPathsNoEscape = false,\n    magicalBraces = true,\n  }: Pick = {},\n) => {\n  if (magicalBraces) {\n    return windowsPathsNoEscape\n      ? s.replace(/\\[([^\\/\\\\])\\]/g, '$1')\n      : s\n          .replace(/((?!\\\\).|^)\\[([^\\/\\\\])\\]/g, '$1$2')\n          .replace(/\\\\([^\\/])/g, '$1')\n  }\n  return windowsPathsNoEscape\n    ? s.replace(/\\[([^\\/\\\\{}])\\]/g, '$1')\n    : s\n        .replace(/((?!\\\\).|^)\\[([^\\/\\\\{}])\\]/g, '$1$2')\n        .replace(/\\\\([^\\/{}])/g, '$1')\n}\n"]}
\ No newline at end of file
+{"version":3,"file":"unescape.js","sourceRoot":"","sources":["../../src/unescape.ts"],"names":[],"mappings":";;;AAEA;;;;;;;;;;;;;;;;;;GAkBG;AAEI,MAAM,QAAQ,GAAG,CACtB,CAAS,EACT,EACE,oBAAoB,GAAG,KAAK,EAC5B,aAAa,GAAG,IAAI,MACgD,EAAE,EACxE,EAAE;IACF,IAAI,aAAa,EAAE,CAAC;QAClB,OAAO,oBAAoB,CAAC,CAAC;YACzB,CAAC,CAAC,OAAO,CAAC,eAAe,EAAE,IAAI,CAAC;YAClC,CAAC,CAAC,CAAC;iBACE,OAAO,CAAC,0BAA0B,EAAE,MAAM,CAAC;iBAC3C,OAAO,CAAC,WAAW,EAAE,IAAI,CAAC,CAAA;IACnC,CAAC;IACD,OAAO,oBAAoB,CAAC,CAAC;QACzB,CAAC,CAAC,OAAO,CAAC,iBAAiB,EAAE,IAAI,CAAC;QACpC,CAAC,CAAC,CAAC;aACE,OAAO,CAAC,4BAA4B,EAAE,MAAM,CAAC;aAC7C,OAAO,CAAC,aAAa,EAAE,IAAI,CAAC,CAAA;AACrC,CAAC,CAAA;AAnBY,QAAA,QAAQ,YAmBpB","sourcesContent":["import type { MinimatchOptions } from './index.js'\n\n/**\n * Un-escape a string that has been escaped with {@link escape}.\n *\n * If the {@link MinimatchOptions.windowsPathsNoEscape} option is used, then\n * square-bracket escapes are removed, but not backslash escapes.\n *\n * For example, it will turn the string `'[*]'` into `*`, but it will not\n * turn `'\\\\*'` into `'*'`, because `\\` is a path separator in\n * `windowsPathsNoEscape` mode.\n *\n * When `windowsPathsNoEscape` is not set, then both square-bracket escapes and\n * backslash escapes are removed.\n *\n * Slashes (and backslashes in `windowsPathsNoEscape` mode) cannot be escaped\n * or unescaped.\n *\n * When `magicalBraces` is not set, escapes of braces (`{` and `}`) will not be\n * unescaped.\n */\n\nexport const unescape = (\n  s: string,\n  {\n    windowsPathsNoEscape = false,\n    magicalBraces = true,\n  }: Pick = {},\n) => {\n  if (magicalBraces) {\n    return windowsPathsNoEscape ?\n        s.replace(/\\[([^/\\\\])\\]/g, '$1')\n      : s\n          .replace(/((?!\\\\).|^)\\[([^/\\\\])\\]/g, '$1$2')\n          .replace(/\\\\([^/])/g, '$1')\n  }\n  return windowsPathsNoEscape ?\n      s.replace(/\\[([^/\\\\{}])\\]/g, '$1')\n    : s\n        .replace(/((?!\\\\).|^)\\[([^/\\\\{}])\\]/g, '$1$2')\n        .replace(/\\\\([^/{}])/g, '$1')\n}\n"]}
\ No newline at end of file
diff --git a/node_modules/minimatch/dist/esm/assert-valid-pattern.d.ts b/node_modules/minimatch/dist/esm/assert-valid-pattern.d.ts
index 8e318b23..34d7a78a 100644
--- a/node_modules/minimatch/dist/esm/assert-valid-pattern.d.ts
+++ b/node_modules/minimatch/dist/esm/assert-valid-pattern.d.ts
@@ -1,2 +1,2 @@
-export declare const assertValidPattern: (pattern: any) => void;
+export declare const assertValidPattern: (pattern: unknown) => void;
 //# sourceMappingURL=assert-valid-pattern.d.ts.map
\ No newline at end of file
diff --git a/node_modules/minimatch/dist/esm/assert-valid-pattern.d.ts.map b/node_modules/minimatch/dist/esm/assert-valid-pattern.d.ts.map
index c61c0310..30ddcd51 100644
--- a/node_modules/minimatch/dist/esm/assert-valid-pattern.d.ts.map
+++ b/node_modules/minimatch/dist/esm/assert-valid-pattern.d.ts.map
@@ -1 +1 @@
-{"version":3,"file":"assert-valid-pattern.d.ts","sourceRoot":"","sources":["../../src/assert-valid-pattern.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,kBAAkB,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,IAUlD,CAAA"}
\ No newline at end of file
+{"version":3,"file":"assert-valid-pattern.d.ts","sourceRoot":"","sources":["../../src/assert-valid-pattern.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,kBAAkB,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAUtD,CAAA"}
\ No newline at end of file
diff --git a/node_modules/minimatch/dist/esm/assert-valid-pattern.js.map b/node_modules/minimatch/dist/esm/assert-valid-pattern.js.map
index c4cd82a9..550f61df 100644
--- a/node_modules/minimatch/dist/esm/assert-valid-pattern.js.map
+++ b/node_modules/minimatch/dist/esm/assert-valid-pattern.js.map
@@ -1 +1 @@
-{"version":3,"file":"assert-valid-pattern.js","sourceRoot":"","sources":["../../src/assert-valid-pattern.ts"],"names":[],"mappings":"AAAA,MAAM,kBAAkB,GAAG,IAAI,GAAG,EAAE,CAAA;AACpC,MAAM,CAAC,MAAM,kBAAkB,GAA2B,CACxD,OAAY,EACe,EAAE;IAC7B,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,CAAC;QAChC,MAAM,IAAI,SAAS,CAAC,iBAAiB,CAAC,CAAA;IACxC,CAAC;IAED,IAAI,OAAO,CAAC,MAAM,GAAG,kBAAkB,EAAE,CAAC;QACxC,MAAM,IAAI,SAAS,CAAC,qBAAqB,CAAC,CAAA;IAC5C,CAAC;AACH,CAAC,CAAA","sourcesContent":["const MAX_PATTERN_LENGTH = 1024 * 64\nexport const assertValidPattern: (pattern: any) => void = (\n  pattern: any,\n): asserts pattern is string => {\n  if (typeof pattern !== 'string') {\n    throw new TypeError('invalid pattern')\n  }\n\n  if (pattern.length > MAX_PATTERN_LENGTH) {\n    throw new TypeError('pattern is too long')\n  }\n}\n"]}
\ No newline at end of file
+{"version":3,"file":"assert-valid-pattern.js","sourceRoot":"","sources":["../../src/assert-valid-pattern.ts"],"names":[],"mappings":"AAAA,MAAM,kBAAkB,GAAG,IAAI,GAAG,EAAE,CAAA;AACpC,MAAM,CAAC,MAAM,kBAAkB,GAA+B,CAC5D,OAAgB,EACW,EAAE;IAC7B,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,CAAC;QAChC,MAAM,IAAI,SAAS,CAAC,iBAAiB,CAAC,CAAA;IACxC,CAAC;IAED,IAAI,OAAO,CAAC,MAAM,GAAG,kBAAkB,EAAE,CAAC;QACxC,MAAM,IAAI,SAAS,CAAC,qBAAqB,CAAC,CAAA;IAC5C,CAAC;AACH,CAAC,CAAA","sourcesContent":["const MAX_PATTERN_LENGTH = 1024 * 64\nexport const assertValidPattern: (pattern: unknown) => void = (\n  pattern: unknown,\n): asserts pattern is string => {\n  if (typeof pattern !== 'string') {\n    throw new TypeError('invalid pattern')\n  }\n\n  if (pattern.length > MAX_PATTERN_LENGTH) {\n    throw new TypeError('pattern is too long')\n  }\n}\n"]}
\ No newline at end of file
diff --git a/node_modules/minimatch/dist/esm/ast.d.ts b/node_modules/minimatch/dist/esm/ast.d.ts
index b8c1e544..74f2cf93 100644
--- a/node_modules/minimatch/dist/esm/ast.d.ts
+++ b/node_modules/minimatch/dist/esm/ast.d.ts
@@ -1,13 +1,15 @@
-import { MinimatchOptions, MMRegExp } from './index.js';
+import type { MinimatchOptions, MMRegExp } from './index.js';
 export type ExtglobType = '!' | '?' | '+' | '*' | '@';
 export declare class AST {
     #private;
     type: ExtglobType | null;
+    id: number;
+    get depth(): number;
     constructor(type: ExtglobType | null, parent?: AST, options?: MinimatchOptions);
     get hasMagic(): boolean | undefined;
     toString(): string;
     push(...parts: (string | AST)[]): void;
-    toJSON(): any[];
+    toJSON(): unknown[];
     isStart(): boolean;
     isEnd(): boolean;
     copyIn(part: AST | string): void;
diff --git a/node_modules/minimatch/dist/esm/ast.d.ts.map b/node_modules/minimatch/dist/esm/ast.d.ts.map
index e1594506..8965fd6a 100644
--- a/node_modules/minimatch/dist/esm/ast.d.ts.map
+++ b/node_modules/minimatch/dist/esm/ast.d.ts.map
@@ -1 +1 @@
-{"version":3,"file":"ast.d.ts","sourceRoot":"","sources":["../../src/ast.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAwCvD,MAAM,MAAM,WAAW,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAA;AAkCrD,qBAAa,GAAG;;IACd,IAAI,EAAE,WAAW,GAAG,IAAI,CAAA;gBAiBtB,IAAI,EAAE,WAAW,GAAG,IAAI,EACxB,MAAM,CAAC,EAAE,GAAG,EACZ,OAAO,GAAE,gBAAqB;IAahC,IAAI,QAAQ,IAAI,OAAO,GAAG,SAAS,CAUlC;IAGD,QAAQ,IAAI,MAAM;IA+ClB,IAAI,CAAC,GAAG,KAAK,EAAE,CAAC,MAAM,GAAG,GAAG,CAAC,EAAE;IAY/B,MAAM;IAgBN,OAAO,IAAI,OAAO;IAgBlB,KAAK,IAAI,OAAO;IAYhB,MAAM,CAAC,IAAI,EAAE,GAAG,GAAG,MAAM;IAKzB,KAAK,CAAC,MAAM,EAAE,GAAG;IAsIjB,MAAM,CAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,GAAE,gBAAqB;IAQ/D,WAAW,IAAI,QAAQ,GAAG,MAAM;IA2BhC,IAAI,OAAO,qBAEV;IAuED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
diff --git a/node_modules/minimatch/dist/esm/ast.js b/node_modules/minimatch/dist/esm/ast.js
index e4547b16..f6395465 100644
--- a/node_modules/minimatch/dist/esm/ast.js
+++ b/node_modules/minimatch/dist/esm/ast.js
@@ -1,8 +1,110 @@
 // parse a single path portion
+var _a;
 import { parseClass } from './brace-expressions.js';
 import { unescape } from './unescape.js';
 const types = new Set(['!', '?', '+', '*', '@']);
 const isExtglobType = (c) => types.has(c);
+const isExtglobAST = (c) => isExtglobType(c.type);
+// Map of which extglob types can adopt the children of a nested extglob
+//
+// anything but ! can adopt a matching type:
+// +(a|+(b|c)|d) => +(a|b|c|d)
+// *(a|*(b|c)|d) => *(a|b|c|d)
+// @(a|@(b|c)|d) => @(a|b|c|d)
+// ?(a|?(b|c)|d) => ?(a|b|c|d)
+//
+// * can adopt anything, because 0 or repetition is allowed
+// *(a|?(b|c)|d) => *(a|b|c|d)
+// *(a|+(b|c)|d) => *(a|b|c|d)
+// *(a|@(b|c)|d) => *(a|b|c|d)
+//
+// + can adopt @, because 1 or repetition is allowed
+// +(a|@(b|c)|d) => +(a|b|c|d)
+//
+// + and @ CANNOT adopt *, because 0 would be allowed
+// +(a|*(b|c)|d) => would match "", on *(b|c)
+// @(a|*(b|c)|d) => would match "", on *(b|c)
+//
+// + and @ CANNOT adopt ?, because 0 would be allowed
+// +(a|?(b|c)|d) => would match "", on ?(b|c)
+// @(a|?(b|c)|d) => would match "", on ?(b|c)
+//
+// ? can adopt @, because 0 or 1 is allowed
+// ?(a|@(b|c)|d) => ?(a|b|c|d)
+//
+// ? and @ CANNOT adopt * or +, because >1 would be allowed
+// ?(a|*(b|c)|d) => would match bbb on *(b|c)
+// @(a|*(b|c)|d) => would match bbb on *(b|c)
+// ?(a|+(b|c)|d) => would match bbb on +(b|c)
+// @(a|+(b|c)|d) => would match bbb on +(b|c)
+//
+// ! CANNOT adopt ! (nothing else can either)
+// !(a|!(b|c)|d) => !(a|b|c|d) would fail to match on b (not not b|c)
+//
+// ! can adopt @
+// !(a|@(b|c)|d) => !(a|b|c|d)
+//
+// ! CANNOT adopt *
+// !(a|*(b|c)|d) => !(a|b|c|d) would match on bbb, not allowed
+//
+// ! CANNOT adopt +
+// !(a|+(b|c)|d) => !(a|b|c|d) would match on bbb, not allowed
+//
+// ! CANNOT adopt ?
+// x!(a|?(b|c)|d) => x!(a|b|c|d) would fail to match "x"
+const adoptionMap = new Map([
+    ['!', ['@']],
+    ['?', ['?', '@']],
+    ['@', ['@']],
+    ['*', ['*', '+', '?', '@']],
+    ['+', ['+', '@']],
+]);
+// nested extglobs that can be adopted in, but with the addition of
+// a blank '' element.
+const adoptionWithSpaceMap = new Map([
+    ['!', ['?']],
+    ['@', ['?']],
+    ['+', ['?', '*']],
+]);
+// union of the previous two maps
+const adoptionAnyMap = new Map([
+    ['!', ['?', '@']],
+    ['?', ['?', '@']],
+    ['@', ['?', '@']],
+    ['*', ['*', '+', '?', '@']],
+    ['+', ['+', '@', '?', '*']],
+]);
+// Extglobs that can take over their parent if they are the only child
+// the key is parent, value maps child to resulting extglob parent type
+// '@' is omitted because it's a special case. An `@` extglob with a single
+// member can always be usurped by that subpattern.
+const usurpMap = new Map([
+    ['!', new Map([['!', '@']])],
+    [
+        '?',
+        new Map([
+            ['*', '*'],
+            ['+', '*'],
+        ]),
+    ],
+    [
+        '@',
+        new Map([
+            ['!', '!'],
+            ['?', '?'],
+            ['@', '@'],
+            ['*', '*'],
+            ['+', '+'],
+        ]),
+    ],
+    [
+        '+',
+        new Map([
+            ['?', '*'],
+            ['*', '*'],
+        ]),
+    ],
+]);
 // Patterns that get prepended to bind to the start of either the
 // entire string, or just a single path portion, to prevent dots
 // and/or traversal patterns, when needed.
@@ -26,6 +128,7 @@ const star = qmark + '*?';
 const starNoEmpty = qmark + '+?';
 // remove the \ chars that we added if we end up doing a nonmagic compare
 // const deslash = (s: string) => s.replace(/\\(.)/g, '$1')
+let ID = 0;
 export class AST {
     type;
     #root;
@@ -41,6 +144,22 @@ export class AST {
     // set to true if it's an extglob with no children
     // (which really means one child of '')
     #emptyExt = false;
+    id = ++ID;
+    get depth() {
+        return (this.#parent?.depth ?? -1) + 1;
+    }
+    [Symbol.for('nodejs.util.inspect.custom')]() {
+        return {
+            '@@type': 'AST',
+            id: this.id,
+            type: this.type,
+            root: this.#root.id,
+            parent: this.#parent?.id,
+            depth: this.depth,
+            partsLength: this.#parts.length,
+            parts: this.#parts,
+        };
+    }
     constructor(type, parent, options = {}) {
         this.type = type;
         // extglobs are inherently magical
@@ -70,15 +189,14 @@ export class AST {
     }
     // reconstructs the pattern
     toString() {
-        if (this.#toString !== undefined)
-            return this.#toString;
-        if (!this.type) {
-            return (this.#toString = this.#parts.map(p => String(p)).join(''));
-        }
-        else {
-            return (this.#toString =
-                this.type + '(' + this.#parts.map(p => String(p)).join('|') + ')');
-        }
+        return (this.#toString !== undefined ? this.#toString
+            : !this.type ?
+                (this.#toString = this.#parts.map(p => String(p)).join(''))
+                : (this.#toString =
+                    this.type +
+                        '(' +
+                        this.#parts.map(p => String(p)).join('|') +
+                        ')'));
     }
     #fillNegs() {
         /* c8 ignore start */
@@ -119,7 +237,8 @@ export class AST {
             if (p === '')
                 continue;
             /* c8 ignore start */
-            if (typeof p !== 'string' && !(p instanceof AST && p.#parent === this)) {
+            if (typeof p !== 'string' &&
+                !(p instanceof _a && p.#parent === this)) {
                 throw new Error('invalid part: ' + p);
             }
             /* c8 ignore stop */
@@ -127,8 +246,10 @@ export class AST {
         }
     }
     toJSON() {
-        const ret = this.type === null
-            ? this.#parts.slice().map(p => (typeof p === 'string' ? p : p.toJSON()))
+        const ret = this.type === null ?
+            this.#parts
+                .slice()
+                .map(p => (typeof p === 'string' ? p : p.toJSON()))
             : [this.type, ...this.#parts.map(p => p.toJSON())];
         if (this.isStart() && !this.type)
             ret.unshift([]);
@@ -151,7 +272,7 @@ export class AST {
         const p = this.#parent;
         for (let i = 0; i < this.#parentIndex; i++) {
             const pp = p.#parts[i];
-            if (!(pp instanceof AST && pp.type === '!')) {
+            if (!(pp instanceof _a && pp.type === '!')) {
                 return false;
             }
         }
@@ -179,13 +300,14 @@ export class AST {
             this.push(part.clone(this));
     }
     clone(parent) {
-        const c = new AST(this.type, parent);
+        const c = new _a(this.type, parent);
         for (const p of this.#parts) {
             c.copyIn(p);
         }
         return c;
     }
-    static #parseAST(str, ast, pos, opt) {
+    static #parseAST(str, ast, pos, opt, extDepth) {
+        const maxDepth = opt.maxExtglobRecursion ?? 2;
         let escaping = false;
         let inBrace = false;
         let braceStart = -1;
@@ -222,11 +344,17 @@ export class AST {
                     acc += c;
                     continue;
                 }
-                if (!opt.noext && isExtglobType(c) && str.charAt(i) === '(') {
+                // we don't have to check for adoption here, because that's
+                // done at the other recursion point.
+                const doRecurse = !opt.noext &&
+                    isExtglobType(c) &&
+                    str.charAt(i) === '(' &&
+                    extDepth <= maxDepth;
+                if (doRecurse) {
                     ast.push(acc);
                     acc = '';
-                    const ext = new AST(c, ast);
-                    i = AST.#parseAST(str, ext, i, opt);
+                    const ext = new _a(c, ast);
+                    i = _a.#parseAST(str, ext, i, opt, extDepth + 1);
                     ast.push(ext);
                     continue;
                 }
@@ -238,7 +366,7 @@ export class AST {
         // some kind of extglob, pos is at the (
         // find the next | or )
         let i = pos + 1;
-        let part = new AST(null, ast);
+        let part = new _a(null, ast);
         const parts = [];
         let acc = '';
         while (i < str.length) {
@@ -269,19 +397,26 @@ export class AST {
                 acc += c;
                 continue;
             }
-            if (isExtglobType(c) && str.charAt(i) === '(') {
+            const doRecurse = !opt.noext &&
+                isExtglobType(c) &&
+                str.charAt(i) === '(' &&
+                /* c8 ignore start - the maxDepth is sufficient here */
+                (extDepth <= maxDepth || (ast && ast.#canAdoptType(c)));
+            /* c8 ignore stop */
+            if (doRecurse) {
+                const depthAdd = ast && ast.#canAdoptType(c) ? 0 : 1;
                 part.push(acc);
                 acc = '';
-                const ext = new AST(c, part);
+                const ext = new _a(c, part);
                 part.push(ext);
-                i = AST.#parseAST(str, ext, i, opt);
+                i = _a.#parseAST(str, ext, i, opt, extDepth + depthAdd);
                 continue;
             }
             if (c === '|') {
                 part.push(acc);
                 acc = '';
                 parts.push(part);
-                part = new AST(null, ast);
+                part = new _a(null, ast);
                 continue;
             }
             if (c === ')') {
@@ -303,9 +438,82 @@ export class AST {
         ast.#parts = [str.substring(pos - 1)];
         return i;
     }
+    #canAdoptWithSpace(child) {
+        return this.#canAdopt(child, adoptionWithSpaceMap);
+    }
+    #canAdopt(child, map = adoptionMap) {
+        if (!child ||
+            typeof child !== 'object' ||
+            child.type !== null ||
+            child.#parts.length !== 1 ||
+            this.type === null) {
+            return false;
+        }
+        const gc = child.#parts[0];
+        if (!gc || typeof gc !== 'object' || gc.type === null) {
+            return false;
+        }
+        return this.#canAdoptType(gc.type, map);
+    }
+    #canAdoptType(c, map = adoptionAnyMap) {
+        return !!map.get(this.type)?.includes(c);
+    }
+    #adoptWithSpace(child, index) {
+        const gc = child.#parts[0];
+        const blank = new _a(null, gc, this.options);
+        blank.#parts.push('');
+        gc.push(blank);
+        this.#adopt(child, index);
+    }
+    #adopt(child, index) {
+        const gc = child.#parts[0];
+        this.#parts.splice(index, 1, ...gc.#parts);
+        for (const p of gc.#parts) {
+            if (typeof p === 'object')
+                p.#parent = this;
+        }
+        this.#toString = undefined;
+    }
+    #canUsurpType(c) {
+        const m = usurpMap.get(this.type);
+        return !!m?.has(c);
+    }
+    #canUsurp(child) {
+        if (!child ||
+            typeof child !== 'object' ||
+            child.type !== null ||
+            child.#parts.length !== 1 ||
+            this.type === null ||
+            this.#parts.length !== 1) {
+            return false;
+        }
+        const gc = child.#parts[0];
+        if (!gc || typeof gc !== 'object' || gc.type === null) {
+            return false;
+        }
+        return this.#canUsurpType(gc.type);
+    }
+    #usurp(child) {
+        const m = usurpMap.get(this.type);
+        const gc = child.#parts[0];
+        const nt = m?.get(gc.type);
+        /* c8 ignore start - impossible */
+        if (!nt)
+            return false;
+        /* c8 ignore stop */
+        this.#parts = gc.#parts;
+        for (const p of this.#parts) {
+            if (typeof p === 'object') {
+                p.#parent = this;
+            }
+        }
+        this.type = nt;
+        this.#toString = undefined;
+        this.#emptyExt = false;
+    }
     static fromGlob(pattern, options = {}) {
-        const ast = new AST(null, undefined, options);
-        AST.#parseAST(pattern, ast, 0, options);
+        const ast = new _a(null, undefined, options);
+        _a.#parseAST(pattern, ast, 0, options, 0);
         return ast;
     }
     // returns the regular expression if there's magic, or the unescaped
@@ -409,16 +617,18 @@ export class AST {
     // or start or whatever) and prepend ^ or / at the Regexp construction.
     toRegExpSource(allowDot) {
         const dot = allowDot ?? !!this.#options.dot;
-        if (this.#root === this)
+        if (this.#root === this) {
+            this.#flatten();
             this.#fillNegs();
-        if (!this.type) {
+        }
+        if (!isExtglobAST(this)) {
             const noEmpty = this.isStart() &&
                 this.isEnd() &&
                 !this.#parts.some(s => typeof s !== 'string');
             const src = this.#parts
                 .map(p => {
-                const [re, _, hasMagic, uflag] = typeof p === 'string'
-                    ? AST.#parseGlob(p, this.#hasMagic, noEmpty)
+                const [re, _, hasMagic, uflag] = typeof p === 'string' ?
+                    _a.#parseGlob(p, this.#hasMagic, noEmpty)
                     : p.toRegExpSource(allowDot);
                 this.#hasMagic = this.#hasMagic || hasMagic;
                 this.#uflag = this.#uflag || uflag;
@@ -447,7 +657,10 @@ export class AST {
                         // no need to prevent dots if it can't match a dot, or if a
                         // sub-pattern will be preventing it anyway.
                         const needNoDot = !dot && !allowDot && aps.has(src.charAt(0));
-                        start = needNoTrav ? startNoTraversal : needNoDot ? startNoDot : '';
+                        start =
+                            needNoTrav ? startNoTraversal
+                                : needNoDot ? startNoDot
+                                    : '';
                     }
                 }
             }
@@ -477,14 +690,14 @@ export class AST {
             // invalid extglob, has to at least be *something* present, if it's
             // the entire path portion.
             const s = this.toString();
-            this.#parts = [s];
-            this.type = null;
-            this.#hasMagic = undefined;
+            const me = this;
+            me.#parts = [s];
+            me.type = null;
+            me.#hasMagic = undefined;
             return [s, unescape(this.toString()), false, false];
         }
-        // XXX abstract out this map method
-        let bodyDotAllowed = !repeated || allowDot || dot || !startNoDot
-            ? ''
+        let bodyDotAllowed = !repeated || allowDot || dot || !startNoDot ?
+            ''
             : this.#partsToRegExp(true);
         if (bodyDotAllowed === body) {
             bodyDotAllowed = '';
@@ -498,20 +711,16 @@ export class AST {
             final = (this.isStart() && !dot ? startNoDot : '') + starNoEmpty;
         }
         else {
-            const close = this.type === '!'
-                ? // !() must match something,but !(x) can match ''
-                    '))' +
-                        (this.isStart() && !dot && !allowDot ? startNoDot : '') +
-                        star +
-                        ')'
-                : this.type === '@'
-                    ? ')'
-                    : this.type === '?'
-                        ? ')?'
-                        : this.type === '+' && bodyDotAllowed
-                            ? ')'
-                            : this.type === '*' && bodyDotAllowed
-                                ? `)?`
+            const close = this.type === '!' ?
+                // !() must match something,but !(x) can match ''
+                '))' +
+                    (this.isStart() && !dot && !allowDot ? startNoDot : '') +
+                    star +
+                    ')'
+                : this.type === '@' ? ')'
+                    : this.type === '?' ? ')?'
+                        : this.type === '+' && bodyDotAllowed ? ')'
+                            : this.type === '*' && bodyDotAllowed ? `)?`
                                 : `)${this.type}`;
             final = start + body + close;
         }
@@ -522,6 +731,42 @@ export class AST {
             this.#uflag,
         ];
     }
+    #flatten() {
+        if (!isExtglobAST(this)) {
+            for (const p of this.#parts) {
+                if (typeof p === 'object') {
+                    p.#flatten();
+                }
+            }
+        }
+        else {
+            // do up to 10 passes to flatten as much as possible
+            let iterations = 0;
+            let done = false;
+            do {
+                done = true;
+                for (let i = 0; i < this.#parts.length; i++) {
+                    const c = this.#parts[i];
+                    if (typeof c === 'object') {
+                        c.#flatten();
+                        if (this.#canAdopt(c)) {
+                            done = false;
+                            this.#adopt(c, i);
+                        }
+                        else if (this.#canAdoptWithSpace(c)) {
+                            done = false;
+                            this.#adoptWithSpace(c, i);
+                        }
+                        else if (this.#canUsurp(c)) {
+                            done = false;
+                            this.#usurp(c);
+                        }
+                    }
+                }
+            } while (!done && ++iterations < 10);
+        }
+        this.#toString = undefined;
+    }
     #partsToRegExp(dot) {
         return this.#parts
             .map(p => {
@@ -543,6 +788,8 @@ export class AST {
         let escaping = false;
         let re = '';
         let uflag = false;
+        // multiple stars that aren't globstars coalesce into one *
+        let inStar = false;
         for (let i = 0; i < glob.length; i++) {
             const c = glob.charAt(i);
             if (escaping) {
@@ -550,6 +797,17 @@ export class AST {
                 re += (reSpecials.has(c) ? '\\' : '') + c;
                 continue;
             }
+            if (c === '*') {
+                if (inStar)
+                    continue;
+                inStar = true;
+                re += noEmpty && /^[*]+$/.test(glob) ? starNoEmpty : star;
+                hasMagic = true;
+                continue;
+            }
+            else {
+                inStar = false;
+            }
             if (c === '\\') {
                 if (i === glob.length - 1) {
                     re += '\\\\';
@@ -569,11 +827,6 @@ export class AST {
                     continue;
                 }
             }
-            if (c === '*') {
-                re += noEmpty && glob === '*' ? starNoEmpty : star;
-                hasMagic = true;
-                continue;
-            }
             if (c === '?') {
                 re += qmark;
                 hasMagic = true;
@@ -584,4 +837,5 @@ export class AST {
         return [re, unescape(glob), !!hasMagic, uflag];
     }
 }
+_a = AST;
 //# sourceMappingURL=ast.js.map
\ No newline at end of file
diff --git a/node_modules/minimatch/dist/esm/ast.js.map b/node_modules/minimatch/dist/esm/ast.js.map
index 87bc3f24..f5cc3ee9 100644
--- a/node_modules/minimatch/dist/esm/ast.js.map
+++ b/node_modules/minimatch/dist/esm/ast.js.map
@@ -1 +1 @@
-{"version":3,"file":"ast.js","sourceRoot":"","sources":["../../src/ast.ts"],"names":[],"mappings":"AAAA,8BAA8B;AAE9B,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAEnD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAwCxC,MAAM,KAAK,GAAG,IAAI,GAAG,CAAc,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAA;AAC7D,MAAM,aAAa,GAAG,CAAC,CAAS,EAAoB,EAAE,CACp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AQ;YACV,CAAC;YACD,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;gBACd,EAAE,IAAI,KAAK,CAAA;gBACX,QAAQ,GAAG,IAAI,CAAA;gBACf,SAAQ;YACV,CAAC;YACD,EAAE,IAAI,YAAY,CAAC,CAAC,CAAC,CAAA;QACvB,CAAC;QACD,OAAO,CAAC,EAAE,EAAE,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAA;IAChD,CAAC;CACF","sourcesContent":["// parse a single path portion\n\nimport { parseClass } from './brace-expressions.js'\nimport { MinimatchOptions, MMRegExp } from './index.js'\nimport { unescape } from './unescape.js'\n\n// classes [] are handled by the parseClass method\n// for positive extglobs, we sub-parse the contents, and combine,\n// with the appropriate regexp close.\n// for negative extglobs, we sub-parse the contents, but then\n// have to include the rest of the pattern, then the parent, etc.,\n// as the thing that cannot be because RegExp negative lookaheads\n// are different from globs.\n//\n// So for example:\n// a@(i|w!(x|y)z|j)b => ^a(i|w((!?(x|y)zb).*)z|j)b$\n//   1   2 3   4 5 6      1   2    3   46      5 6\n//\n// Assembling the extglob requires not just the negated patterns themselves,\n// but also anything following the negative patterns up to the boundary\n// of the current pattern, plus anything following in the parent pattern.\n//\n//\n// So, first, we parse the string into an AST of extglobs, without turning\n// anything into regexps yet.\n//\n// ['a', {@ [['i'], ['w', {!['x', 'y']}, 'z'], ['j']]}, 'b']\n//\n// Then, for all the negative extglobs, we append whatever comes after in\n// each parent as their tail\n//\n// ['a', {@ [['i'], ['w', {!['x', 'y'], 'z', 'b'}, 'z'], ['j']]}, 'b']\n//\n// Lastly, we turn each of these pieces into a regexp, and join\n//\n//                                 v----- .* because there's more following,\n//                                 v    v  otherwise, .+ because it must be\n//                                 v    v  *something* there.\n// ['^a', {@ ['i', 'w(?:(!?(?:x|y).*zb$).*)z', 'j' ]}, 'b$']\n//   copy what follows into here--^^^^^\n// ['^a', '(?:i|w(?:(?!(?:x|y).*zb$).*)z|j)', 'b$']\n// ['^a(?:i|w(?:(?!(?:x|y).*zb$).*)z|j)b$']\n\nexport type ExtglobType = '!' | '?' | '+' | '*' | '@'\nconst types = new Set(['!', '?', '+', '*', '@'])\nconst isExtglobType = (c: string): c is ExtglobType =>\n  types.has(c as ExtglobType)\n\n// Patterns that get prepended to bind to the start of either the\n// entire string, or just a single path portion, to prevent dots\n// and/or traversal patterns, when needed.\n// Exts don't need the ^ or / bit, because the root binds that already.\nconst startNoTraversal = '(?!(?:^|/)\\\\.\\\\.?(?:$|/))'\nconst startNoDot = '(?!\\\\.)'\n\n// characters that indicate a start of pattern needs the \"no dots\" bit,\n// because a dot *might* be matched. ( is not in the list, because in\n// the case of a child extglob, it will handle the prevention itself.\nconst addPatternStart = new Set(['[', '.'])\n// cases where traversal is A-OK, no dot prevention needed\nconst justDots = new Set(['..', '.'])\nconst reSpecials = new Set('().*{}+?[]^$\\\\!')\nconst regExpEscape = (s: string) =>\n  s.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&')\n\n// any single thing other than /\nconst qmark = '[^/]'\n\n// * => any number of characters\nconst star = qmark + '*?'\n// use + when we need to ensure that *something* matches, because the * is\n// the only thing in the path portion.\nconst starNoEmpty = qmark + '+?'\n\n// remove the \\ chars that we added if we end up doing a nonmagic compare\n// const deslash = (s: string) => s.replace(/\\\\(.)/g, '$1')\n\nexport class AST {\n  type: ExtglobType | null\n  readonly #root: AST\n\n  #hasMagic?: boolean\n  #uflag: boolean = false\n  #parts: (string | AST)[] = []\n  readonly #parent?: AST\n  readonly #parentIndex: number\n  #negs: AST[]\n  #filledNegs: boolean = false\n  #options: MinimatchOptions\n  #toString?: string\n  // set to true if it's an extglob with no children\n  // (which really means one child of '')\n  #emptyExt: boolean = false\n\n  constructor(\n    type: ExtglobType | null,\n    parent?: AST,\n    options: MinimatchOptions = {},\n  ) {\n    this.type = type\n    // extglobs are inherently magical\n    if (type) this.#hasMagic = true\n    this.#parent = parent\n    this.#root = this.#parent ? this.#parent.#root : this\n    this.#options = this.#root === this ? options : this.#root.#options\n    this.#negs = this.#root === this ? [] : this.#root.#negs\n    if (type === '!' && !this.#root.#filledNegs) this.#negs.push(this)\n    this.#parentIndex = this.#parent ? this.#parent.#parts.length : 0\n  }\n\n  get hasMagic(): boolean | undefined {\n    /* c8 ignore start */\n    if (this.#hasMagic !== undefined) return this.#hasMagic\n    /* c8 ignore stop */\n    for (const p of this.#parts) {\n      if (typeof p === 'string') continue\n      if (p.type || p.hasMagic) return (this.#hasMagic = true)\n    }\n    // note: will be undefined until we generate the regexp src and find out\n    return this.#hasMagic\n  }\n\n  // reconstructs the pattern\n  toString(): string {\n    if (this.#toString !== undefined) return this.#toString\n    if (!this.type) {\n      return (this.#toString = this.#parts.map(p => String(p)).join(''))\n    } else {\n      return (this.#toString =\n        this.type + '(' + this.#parts.map(p => String(p)).join('|') + ')')\n    }\n  }\n\n  #fillNegs() {\n    /* c8 ignore start */\n    if (this !== this.#root) throw new Error('should only call on root')\n    if (this.#filledNegs) return this\n    /* c8 ignore stop */\n\n    // call toString() once to fill this out\n    this.toString()\n    this.#filledNegs = true\n    let n: AST | undefined\n    while ((n = this.#negs.pop())) {\n      if (n.type !== '!') continue\n      // walk up the tree, appending everthing that comes AFTER parentIndex\n      let p: AST | undefined = n\n      let pp = p.#parent\n      while (pp) {\n        for (\n          let i = p.#parentIndex + 1;\n          !pp.type && i < pp.#parts.length;\n          i++\n        ) {\n          for (const part of n.#parts) {\n            /* c8 ignore start */\n            if (typeof part === 'string') {\n              throw new Error('string part in extglob AST??')\n            }\n            /* c8 ignore stop */\n            part.copyIn(pp.#parts[i])\n          }\n        }\n        p = pp\n        pp = p.#parent\n      }\n    }\n    return this\n  }\n\n  push(...parts: (string | AST)[]) {\n    for (const p of parts) {\n      if (p === '') continue\n      /* c8 ignore start */\n      if (typeof p !== 'string' && !(p instanceof AST && p.#parent === this)) {\n        throw new Error('invalid part: ' + p)\n      }\n      /* c8 ignore stop */\n      this.#parts.push(p)\n    }\n  }\n\n  toJSON() {\n    const ret: any[] =\n      this.type === null\n        ? this.#parts.slice().map(p => (typeof p === 'string' ? p : p.toJSON()))\n        : [this.type, ...this.#parts.map(p => (p as AST).toJSON())]\n    if (this.isStart() && !this.type) ret.unshift([])\n    if (\n      this.isEnd() &&\n      (this === this.#root ||\n        (this.#root.#filledNegs && this.#parent?.type === '!'))\n    ) {\n      ret.push({})\n    }\n    return ret\n  }\n\n  isStart(): boolean {\n    if (this.#root === this) return true\n    // if (this.type) return !!this.#parent?.isStart()\n    if (!this.#parent?.isStart()) return false\n    if (this.#parentIndex === 0) return true\n    // if everything AHEAD of this is a negation, then it's still the \"start\"\n    const p = this.#parent\n    for (let i = 0; i < this.#parentIndex; i++) {\n      const pp = p.#parts[i]\n      if (!(pp instanceof AST && pp.type === '!')) {\n        return false\n      }\n    }\n    return true\n  }\n\n  isEnd(): boolean {\n    if (this.#root === this) return true\n    if (this.#parent?.type === '!') return true\n    if (!this.#parent?.isEnd()) return false\n    if (!this.type) return this.#parent?.isEnd()\n    // if not root, it'll always have a parent\n    /* c8 ignore start */\n    const pl = this.#parent ? this.#parent.#parts.length : 0\n    /* c8 ignore stop */\n    return this.#parentIndex === pl - 1\n  }\n\n  copyIn(part: AST | string) {\n    if (typeof part === 'string') this.push(part)\n    else this.push(part.clone(this))\n  }\n\n  clone(parent: AST) {\n    const c = new AST(this.type, parent)\n    for (const p of this.#parts) {\n      c.copyIn(p)\n    }\n    return c\n  }\n\n  static #parseAST(\n    str: string,\n    ast: AST,\n    pos: number,\n    opt: MinimatchOptions,\n  ): number {\n    let escaping = false\n    let inBrace = false\n    let braceStart = -1\n    let braceNeg = false\n    if (ast.type === null) {\n      // outside of a extglob, append until we find a start\n      let i = pos\n      let acc = ''\n      while (i < str.length) {\n        const c = str.charAt(i++)\n        // still accumulate escapes at this point, but we do ignore\n        // starts that are escaped\n        if (escaping || c === '\\\\') {\n          escaping = !escaping\n          acc += c\n          continue\n        }\n\n        if (inBrace) {\n          if (i === braceStart + 1) {\n            if (c === '^' || c === '!') {\n              braceNeg = true\n            }\n          } else if (c === ']' && !(i === braceStart + 2 && braceNeg)) {\n            inBrace = false\n          }\n          acc += c\n          continue\n        } else if (c === '[') {\n          inBrace = true\n          braceStart = i\n          braceNeg = false\n          acc += c\n          continue\n        }\n\n        if (!opt.noext && isExtglobType(c) && str.charAt(i) === '(') {\n          ast.push(acc)\n          acc = ''\n          const ext = new AST(c, ast)\n          i = AST.#parseAST(str, ext, i, opt)\n          ast.push(ext)\n          continue\n        }\n        acc += c\n      }\n      ast.push(acc)\n      return i\n    }\n\n    // some kind of extglob, pos is at the (\n    // find the next | or )\n    let i = pos + 1\n    let part = new AST(null, ast)\n    const parts: AST[] = []\n    let acc = ''\n    while (i < str.length) {\n      const c = str.charAt(i++)\n      // still accumulate escapes at this point, but we do ignore\n      // starts that are escaped\n      if (escaping || c === '\\\\') {\n        escaping = !escaping\n        acc += c\n        continue\n      }\n\n      if (inBrace) {\n        if (i === braceStart + 1) {\n          if (c === '^' || c === '!') {\n            braceNeg = true\n          }\n        } else if (c === ']' && !(i === braceStart + 2 && braceNeg)) {\n          inBrace = false\n        }\n        acc += c\n        continue\n      } else if (c === '[') {\n        inBrace = true\n        braceStart = i\n        braceNeg = false\n        acc += c\n        continue\n      }\n\n      if (isExtglobType(c) && str.charAt(i) === '(') {\n        part.push(acc)\n        acc = ''\n        const ext = new AST(c, part)\n        part.push(ext)\n        i = AST.#parseAST(str, ext, i, opt)\n        continue\n      }\n      if (c === '|') {\n        part.push(acc)\n        acc = ''\n        parts.push(part)\n        part = new AST(null, ast)\n        continue\n      }\n      if (c === ')') {\n        if (acc === '' && ast.#parts.length === 0) {\n          ast.#emptyExt = true\n        }\n        part.push(acc)\n        acc = ''\n        ast.push(...parts, part)\n        return i\n      }\n      acc += c\n    }\n\n    // unfinished extglob\n    // if we got here, it was a malformed extglob! not an extglob, but\n    // maybe something else in there.\n    ast.type = null\n    ast.#hasMagic = undefined\n    ast.#parts = [str.substring(pos - 1)]\n    return i\n  }\n\n  static fromGlob(pattern: string, options: MinimatchOptions = {}) {\n    const ast = new AST(null, undefined, options)\n    AST.#parseAST(pattern, ast, 0, options)\n    return ast\n  }\n\n  // returns the regular expression if there's magic, or the unescaped\n  // string if not.\n  toMMPattern(): MMRegExp | string {\n    // should only be called on root\n    /* c8 ignore start */\n    if (this !== this.#root) return this.#root.toMMPattern()\n    /* c8 ignore stop */\n    const glob = this.toString()\n    const [re, body, hasMagic, uflag] = this.toRegExpSource()\n    // if we're in nocase mode, and not nocaseMagicOnly, then we do\n    // still need a regular expression if we have to case-insensitively\n    // match capital/lowercase characters.\n    const anyMagic =\n      hasMagic ||\n      this.#hasMagic ||\n      (this.#options.nocase &&\n        !this.#options.nocaseMagicOnly &&\n        glob.toUpperCase() !== glob.toLowerCase())\n    if (!anyMagic) {\n      return body\n    }\n\n    const flags = (this.#options.nocase ? 'i' : '') + (uflag ? 'u' : '')\n    return Object.assign(new RegExp(`^${re}$`, flags), {\n      _src: re,\n      _glob: glob,\n    })\n  }\n\n  get options() {\n    return this.#options\n  }\n\n  // returns the string match, the regexp source, whether there's magic\n  // in the regexp (so a regular expression is required) and whether or\n  // not the uflag is needed for the regular expression (for posix classes)\n  // TODO: instead of injecting the start/end at this point, just return\n  // the BODY of the regexp, along with the start/end portions suitable\n  // for binding the start/end in either a joined full-path makeRe context\n  // (where we bind to (^|/), or a standalone matchPart context (where\n  // we bind to ^, and not /).  Otherwise slashes get duped!\n  //\n  // In part-matching mode, the start is:\n  // - if not isStart: nothing\n  // - if traversal possible, but not allowed: ^(?!\\.\\.?$)\n  // - if dots allowed or not possible: ^\n  // - if dots possible and not allowed: ^(?!\\.)\n  // end is:\n  // - if not isEnd(): nothing\n  // - else: $\n  //\n  // In full-path matching mode, we put the slash at the START of the\n  // pattern, so start is:\n  // - if first pattern: same as part-matching mode\n  // - if not isStart(): nothing\n  // - if traversal possible, but not allowed: /(?!\\.\\.?(?:$|/))\n  // - if dots allowed or not possible: /\n  // - if dots possible and not allowed: /(?!\\.)\n  // end is:\n  // - if last pattern, same as part-matching mode\n  // - else nothing\n  //\n  // Always put the (?:$|/) on negated tails, though, because that has to be\n  // there to bind the end of the negated pattern portion, and it's easier to\n  // just stick it in now rather than try to inject it later in the middle of\n  // the pattern.\n  //\n  // We can just always return the same end, and leave it up to the caller\n  // to know whether it's going to be used joined or in parts.\n  // And, if the start is adjusted slightly, can do the same there:\n  // - if not isStart: nothing\n  // - if traversal possible, but not allowed: (?:/|^)(?!\\.\\.?$)\n  // - if dots allowed or not possible: (?:/|^)\n  // - if dots possible and not allowed: (?:/|^)(?!\\.)\n  //\n  // But it's better to have a simpler binding without a conditional, for\n  // performance, so probably better to return both start options.\n  //\n  // Then the caller just ignores the end if it's not the first pattern,\n  // and the start always gets applied.\n  //\n  // But that's always going to be $ if it's the ending pattern, or nothing,\n  // so the caller can just attach $ at the end of the pattern when building.\n  //\n  // So the todo is:\n  // - better detect what kind of start is needed\n  // - return both flavors of starting pattern\n  // - attach $ at the end of the pattern when creating the actual RegExp\n  //\n  // Ah, but wait, no, that all only applies to the root when the first pattern\n  // is not an extglob. If the first pattern IS an extglob, then we need all\n  // that dot prevention biz to live in the extglob portions, because eg\n  // +(*|.x*) can match .xy but not .yx.\n  //\n  // So, return the two flavors if it's #root and the first child is not an\n  // AST, otherwise leave it to the child AST to handle it, and there,\n  // use the (?:^|/) style of start binding.\n  //\n  // Even simplified further:\n  // - Since the start for a join is eg /(?!\\.) and the start for a part\n  // is ^(?!\\.), we can just prepend (?!\\.) to the pattern (either root\n  // or start or whatever) and prepend ^ or / at the Regexp construction.\n  toRegExpSource(\n    allowDot?: boolean,\n  ): [re: string, body: string, hasMagic: boolean, uflag: boolean] {\n    const dot = allowDot ?? !!this.#options.dot\n    if (this.#root === this) this.#fillNegs()\n    if (!this.type) {\n      const noEmpty =\n        this.isStart() &&\n        this.isEnd() &&\n        !this.#parts.some(s => typeof s !== 'string')\n      const src = this.#parts\n        .map(p => {\n          const [re, _, hasMagic, uflag] =\n            typeof p === 'string'\n              ? AST.#parseGlob(p, this.#hasMagic, noEmpty)\n              : p.toRegExpSource(allowDot)\n          this.#hasMagic = this.#hasMagic || hasMagic\n          this.#uflag = this.#uflag || uflag\n          return re\n        })\n        .join('')\n\n      let start = ''\n      if (this.isStart()) {\n        if (typeof this.#parts[0] === 'string') {\n          // this is the string that will match the start of the pattern,\n          // so we need to protect against dots and such.\n\n          // '.' and '..' cannot match unless the pattern is that exactly,\n          // even if it starts with . or dot:true is set.\n          const dotTravAllowed =\n            this.#parts.length === 1 && justDots.has(this.#parts[0])\n          if (!dotTravAllowed) {\n            const aps = addPatternStart\n            // check if we have a possibility of matching . or ..,\n            // and prevent that.\n            const needNoTrav =\n              // dots are allowed, and the pattern starts with [ or .\n              (dot && aps.has(src.charAt(0))) ||\n              // the pattern starts with \\., and then [ or .\n              (src.startsWith('\\\\.') && aps.has(src.charAt(2))) ||\n              // the pattern starts with \\.\\., and then [ or .\n              (src.startsWith('\\\\.\\\\.') && aps.has(src.charAt(4)))\n            // no need to prevent dots if it can't match a dot, or if a\n            // sub-pattern will be preventing it anyway.\n            const needNoDot = !dot && !allowDot && aps.has(src.charAt(0))\n\n            start = needNoTrav ? startNoTraversal : needNoDot ? startNoDot : ''\n          }\n        }\n      }\n\n      // append the \"end of path portion\" pattern to negation tails\n      let end = ''\n      if (\n        this.isEnd() &&\n        this.#root.#filledNegs &&\n        this.#parent?.type === '!'\n      ) {\n        end = '(?:$|\\\\/)'\n      }\n      const final = start + src + end\n      return [\n        final,\n        unescape(src),\n        (this.#hasMagic = !!this.#hasMagic),\n        this.#uflag,\n      ]\n    }\n\n    // We need to calculate the body *twice* if it's a repeat pattern\n    // at the start, once in nodot mode, then again in dot mode, so a\n    // pattern like *(?) can match 'x.y'\n\n    const repeated = this.type === '*' || this.type === '+'\n    // some kind of extglob\n    const start = this.type === '!' ? '(?:(?!(?:' : '(?:'\n    let body = this.#partsToRegExp(dot)\n\n    if (this.isStart() && this.isEnd() && !body && this.type !== '!') {\n      // invalid extglob, has to at least be *something* present, if it's\n      // the entire path portion.\n      const s = this.toString()\n      this.#parts = [s]\n      this.type = null\n      this.#hasMagic = undefined\n      return [s, unescape(this.toString()), false, false]\n    }\n\n    // XXX abstract out this map method\n    let bodyDotAllowed =\n      !repeated || allowDot || dot || !startNoDot\n        ? ''\n        : this.#partsToRegExp(true)\n    if (bodyDotAllowed === body) {\n      bodyDotAllowed = ''\n    }\n    if (bodyDotAllowed) {\n      body = `(?:${body})(?:${bodyDotAllowed})*?`\n    }\n\n    // an empty !() is exactly equivalent to a starNoEmpty\n    let final = ''\n    if (this.type === '!' && this.#emptyExt) {\n      final = (this.isStart() && !dot ? startNoDot : '') + starNoEmpty\n    } else {\n      const close =\n        this.type === '!'\n          ? // !() must match something,but !(x) can match ''\n            '))' +\n            (this.isStart() && !dot && !allowDot ? startNoDot : '') +\n            star +\n            ')'\n          : this.type === '@'\n            ? ')'\n            : this.type === '?'\n              ? ')?'\n              : this.type === '+' && bodyDotAllowed\n                ? ')'\n                : this.type === '*' && bodyDotAllowed\n                  ? `)?`\n                  : `)${this.type}`\n      final = start + body + close\n    }\n    return [\n      final,\n      unescape(body),\n      (this.#hasMagic = !!this.#hasMagic),\n      this.#uflag,\n    ]\n  }\n\n  #partsToRegExp(dot: boolean) {\n    return this.#parts\n      .map(p => {\n        // extglob ASTs should only contain parent ASTs\n        /* c8 ignore start */\n        if (typeof p === 'string') {\n          throw new Error('string type in extglob ast??')\n        }\n        /* c8 ignore stop */\n        // can ignore hasMagic, because extglobs are already always magic\n        const [re, _, _hasMagic, uflag] = p.toRegExpSource(dot)\n        this.#uflag = this.#uflag || uflag\n        return re\n      })\n      .filter(p => !(this.isStart() && this.isEnd()) || !!p)\n      .join('|')\n  }\n\n  static #parseGlob(\n    glob: string,\n    hasMagic: boolean | undefined,\n    noEmpty: boolean = false,\n  ): [re: string, body: string, hasMagic: boolean, uflag: boolean] {\n    let escaping = false\n    let re = ''\n    let uflag = false\n    for (let i = 0; i < glob.length; i++) {\n      const c = glob.charAt(i)\n      if (escaping) {\n        escaping = false\n        re += (reSpecials.has(c) ? '\\\\' : '') + c\n        continue\n      }\n      if (c === '\\\\') {\n        if (i === glob.length - 1) {\n          re += '\\\\\\\\'\n        } else {\n          escaping = true\n        }\n        continue\n      }\n      if (c === '[') {\n        const [src, needUflag, consumed, magic] = parseClass(glob, i)\n        if (consumed) {\n          re += src\n          uflag = uflag || needUflag\n          i += consumed - 1\n          hasMagic = hasMagic || magic\n          continue\n        }\n      }\n      if (c === '*') {\n        re += noEmpty && glob === '*' ? starNoEmpty : star\n        hasMagic = true\n        continue\n      }\n      if (c === '?') {\n        re += qmark\n        hasMagic = true\n        continue\n      }\n      re += regExpEscape(c)\n    }\n    return [re, unescape(glob), !!hasMagic, uflag]\n  }\n}\n"]}
\ No newline at end of file
+{"version":3,"file":"ast.js","sourceRoot":"","sources":["../../src/ast.ts"],"names":[],"mappings":"AAAA,8BAA8B;;AAE9B,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAEnD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAwCxC,MAAM,KAAK,GAAG,IAAI,GAAG,CAAc,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAA;AAC7D,MAAM,aAAa,GAAG,CAAC,CAAgB,EAAoB,EAAE,CAC3D,KAAK,CAAC,GAAG,CAAC,CAAgB,CAAC,CAAA;AAC7B,MAAM,YAAY,GAAG,CAAC,CAAM,EAAoC,EAAE,CAChE,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,CAAA;AAEvB,wEAAwE;AACxE,EAAE;AACF,4CAA4C;AAC5C,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;AAC9B,EAAE;AACF,2DAA2D;AAC3D,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B;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,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC;gBACf,IAAI,CAAC,KAAK,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;oBAC1B,EAAE,IAAI,MAAM,CAAA;gBACd,CAAC;qBAAM,CAAC;oBACN,QAAQ,GAAG,IAAI,CAAA;gBACjB,CAAC;gBACD,SAAQ;YACV,CAAC;YACD,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;gBACd,MAAM,CAAC,GAAG,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,CAAC,GAAG,UAAU,CAAC,IAAI,EAAE,CAAC,CAAC,CAAA;gBAC7D,IAAI,QAAQ,EAAE,CAAC;oBACb,EAAE,IAAI,GAAG,CAAA;oBACT,KAAK,GAAG,KAAK,IAAI,SAAS,CAAA;oBAC1B,CAAC,IAAI,QAAQ,GAAG,CAAC,CAAA;oBACjB,QAAQ,GAAG,QAAQ,IAAI,KAAK,CAAA;oBAC5B,SAAQ;gBACV,CAAC;YACH,CAAC;YACD,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;gBACd,EAAE,IAAI,KAAK,CAAA;gBACX,QAAQ,GAAG,IAAI,CAAA;gBACf,SAAQ;YACV,CAAC;YACD,EAAE,IAAI,YAAY,CAAC,CAAC,CAAC,CAAA;QACvB,CAAC;QACD,OAAO,CAAC,EAAE,EAAE,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAA;IAChD,CAAC;CACF","sourcesContent":["// parse a single path portion\n\nimport { parseClass } from './brace-expressions.js'\nimport type { MinimatchOptions, MMRegExp } from './index.js'\nimport { unescape } from './unescape.js'\n\n// classes [] are handled by the parseClass method\n// for positive extglobs, we sub-parse the contents, and combine,\n// with the appropriate regexp close.\n// for negative extglobs, we sub-parse the contents, but then\n// have to include the rest of the pattern, then the parent, etc.,\n// as the thing that cannot be because RegExp negative lookaheads\n// are different from globs.\n//\n// So for example:\n// a@(i|w!(x|y)z|j)b => ^a(i|w((!?(x|y)zb).*)z|j)b$\n//   1   2 3   4 5 6      1   2    3   46      5 6\n//\n// Assembling the extglob requires not just the negated patterns themselves,\n// but also anything following the negative patterns up to the boundary\n// of the current pattern, plus anything following in the parent pattern.\n//\n//\n// So, first, we parse the string into an AST of extglobs, without turning\n// anything into regexps yet.\n//\n// ['a', {@ [['i'], ['w', {!['x', 'y']}, 'z'], ['j']]}, 'b']\n//\n// Then, for all the negative extglobs, we append whatever comes after in\n// each parent as their tail\n//\n// ['a', {@ [['i'], ['w', {!['x', 'y'], 'z', 'b'}, 'z'], ['j']]}, 'b']\n//\n// Lastly, we turn each of these pieces into a regexp, and join\n//\n//                                 v----- .* because there's more following,\n//                                 v    v  otherwise, .+ because it must be\n//                                 v    v  *something* there.\n// ['^a', {@ ['i', 'w(?:(!?(?:x|y).*zb$).*)z', 'j' ]}, 'b$']\n//   copy what follows into here--^^^^^\n// ['^a', '(?:i|w(?:(?!(?:x|y).*zb$).*)z|j)', 'b$']\n// ['^a(?:i|w(?:(?!(?:x|y).*zb$).*)z|j)b$']\n\nexport type ExtglobType = '!' | '?' | '+' | '*' | '@'\nconst types = new Set(['!', '?', '+', '*', '@'])\nconst isExtglobType = (c: string | null): c is ExtglobType =>\n  types.has(c as ExtglobType)\nconst isExtglobAST = (c: AST): c is AST & { type: ExtglobType } =>\n  isExtglobType(c.type)\n\n// Map of which extglob types can adopt the children of a nested extglob\n//\n// anything but ! can adopt a matching type:\n// +(a|+(b|c)|d) => +(a|b|c|d)\n// *(a|*(b|c)|d) => *(a|b|c|d)\n// @(a|@(b|c)|d) => @(a|b|c|d)\n// ?(a|?(b|c)|d) => ?(a|b|c|d)\n//\n// * can adopt anything, because 0 or repetition is allowed\n// *(a|?(b|c)|d) => *(a|b|c|d)\n// *(a|+(b|c)|d) => *(a|b|c|d)\n// *(a|@(b|c)|d) => *(a|b|c|d)\n//\n// + can adopt @, because 1 or repetition is allowed\n// +(a|@(b|c)|d) => +(a|b|c|d)\n//\n// + and @ CANNOT adopt *, because 0 would be allowed\n// +(a|*(b|c)|d) => would match \"\", on *(b|c)\n// @(a|*(b|c)|d) => would match \"\", on *(b|c)\n//\n// + and @ CANNOT adopt ?, because 0 would be allowed\n// +(a|?(b|c)|d) => would match \"\", on ?(b|c)\n// @(a|?(b|c)|d) => would match \"\", on ?(b|c)\n//\n// ? can adopt @, because 0 or 1 is allowed\n// ?(a|@(b|c)|d) => ?(a|b|c|d)\n//\n// ? and @ CANNOT adopt * or +, because >1 would be allowed\n// ?(a|*(b|c)|d) => would match bbb on *(b|c)\n// @(a|*(b|c)|d) => would match bbb on *(b|c)\n// ?(a|+(b|c)|d) => would match bbb on +(b|c)\n// @(a|+(b|c)|d) => would match bbb on +(b|c)\n//\n// ! CANNOT adopt ! (nothing else can either)\n// !(a|!(b|c)|d) => !(a|b|c|d) would fail to match on b (not not b|c)\n//\n// ! can adopt @\n// !(a|@(b|c)|d) => !(a|b|c|d)\n//\n// ! CANNOT adopt *\n// !(a|*(b|c)|d) => !(a|b|c|d) would match on bbb, not allowed\n//\n// ! CANNOT adopt +\n// !(a|+(b|c)|d) => !(a|b|c|d) would match on bbb, not allowed\n//\n// ! CANNOT adopt ?\n// x!(a|?(b|c)|d) => x!(a|b|c|d) would fail to match \"x\"\nconst adoptionMap = new Map([\n  ['!', ['@']],\n  ['?', ['?', '@']],\n  ['@', ['@']],\n  ['*', ['*', '+', '?', '@']],\n  ['+', ['+', '@']],\n])\n\n// nested extglobs that can be adopted in, but with the addition of\n// a blank '' element.\nconst adoptionWithSpaceMap = new Map([\n  ['!', ['?']],\n  ['@', ['?']],\n  ['+', ['?', '*']],\n])\n\n// union of the previous two maps\nconst adoptionAnyMap = new Map([\n  ['!', ['?', '@']],\n  ['?', ['?', '@']],\n  ['@', ['?', '@']],\n  ['*', ['*', '+', '?', '@']],\n  ['+', ['+', '@', '?', '*']],\n])\n\n// Extglobs that can take over their parent if they are the only child\n// the key is parent, value maps child to resulting extglob parent type\n// '@' is omitted because it's a special case. An `@` extglob with a single\n// member can always be usurped by that subpattern.\nconst usurpMap = new Map<\n  ExtglobType,\n  Map\n>([\n  ['!', new Map([['!', '@']])],\n  [\n    '?',\n    new Map([\n      ['*', '*'],\n      ['+', '*'],\n    ]),\n  ],\n  [\n    '@',\n    new Map([\n      ['!', '!'],\n      ['?', '?'],\n      ['@', '@'],\n      ['*', '*'],\n      ['+', '+'],\n    ]),\n  ],\n  [\n    '+',\n    new Map([\n      ['?', '*'],\n      ['*', '*'],\n    ]),\n  ],\n])\n\n// Patterns that get prepended to bind to the start of either the\n// entire string, or just a single path portion, to prevent dots\n// and/or traversal patterns, when needed.\n// Exts don't need the ^ or / bit, because the root binds that already.\nconst startNoTraversal = '(?!(?:^|/)\\\\.\\\\.?(?:$|/))'\nconst startNoDot = '(?!\\\\.)'\n\n// characters that indicate a start of pattern needs the \"no dots\" bit,\n// because a dot *might* be matched. ( is not in the list, because in\n// the case of a child extglob, it will handle the prevention itself.\nconst addPatternStart = new Set(['[', '.'])\n// cases where traversal is A-OK, no dot prevention needed\nconst justDots = new Set(['..', '.'])\nconst reSpecials = new Set('().*{}+?[]^$\\\\!')\nconst regExpEscape = (s: string) =>\n  s.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&')\n\n// any single thing other than /\nconst qmark = '[^/]'\n\n// * => any number of characters\nconst star = qmark + '*?'\n// use + when we need to ensure that *something* matches, because the * is\n// the only thing in the path portion.\nconst starNoEmpty = qmark + '+?'\n\n// remove the \\ chars that we added if we end up doing a nonmagic compare\n// const deslash = (s: string) => s.replace(/\\\\(.)/g, '$1')\n\nlet ID = 0\nexport class AST {\n  type: ExtglobType | null\n  readonly #root: AST\n\n  #hasMagic?: boolean\n  #uflag: boolean = false\n  #parts: (string | AST)[] = []\n  #parent?: AST\n  #parentIndex: number\n  #negs: AST[]\n  #filledNegs: boolean = false\n  #options: MinimatchOptions\n  #toString?: string\n  // set to true if it's an extglob with no children\n  // (which really means one child of '')\n  #emptyExt: boolean = false\n  id = ++ID\n\n  get depth(): number {\n    return (this.#parent?.depth ?? -1) + 1\n  }\n\n  [Symbol.for('nodejs.util.inspect.custom')]() {\n    return {\n      '@@type': 'AST',\n      id: this.id,\n      type: this.type,\n      root: this.#root.id,\n      parent: this.#parent?.id,\n      depth: this.depth,\n      partsLength: this.#parts.length,\n      parts: this.#parts,\n    }\n  }\n\n  constructor(\n    type: ExtglobType | null,\n    parent?: AST,\n    options: MinimatchOptions = {},\n  ) {\n    this.type = type\n    // extglobs are inherently magical\n    if (type) this.#hasMagic = true\n    this.#parent = parent\n    this.#root = this.#parent ? this.#parent.#root : this\n    this.#options = this.#root === this ? options : this.#root.#options\n    this.#negs = this.#root === this ? [] : this.#root.#negs\n    if (type === '!' && !this.#root.#filledNegs) this.#negs.push(this)\n    this.#parentIndex = this.#parent ? this.#parent.#parts.length : 0\n  }\n\n  get hasMagic(): boolean | undefined {\n    /* c8 ignore start */\n    if (this.#hasMagic !== undefined) return this.#hasMagic\n    /* c8 ignore stop */\n    for (const p of this.#parts) {\n      if (typeof p === 'string') continue\n      if (p.type || p.hasMagic) return (this.#hasMagic = true)\n    }\n    // note: will be undefined until we generate the regexp src and find out\n    return this.#hasMagic\n  }\n\n  // reconstructs the pattern\n  toString(): string {\n    return (\n      this.#toString !== undefined ? this.#toString\n      : !this.type ?\n        (this.#toString = this.#parts.map(p => String(p)).join(''))\n      : (this.#toString =\n          this.type +\n          '(' +\n          this.#parts.map(p => String(p)).join('|') +\n          ')')\n    )\n  }\n\n  #fillNegs() {\n    /* c8 ignore start */\n    if (this !== this.#root) throw new Error('should only call on root')\n    if (this.#filledNegs) return this\n    /* c8 ignore stop */\n\n    // call toString() once to fill this out\n    this.toString()\n    this.#filledNegs = true\n    let n: AST | undefined\n    while ((n = this.#negs.pop())) {\n      if (n.type !== '!') continue\n      // walk up the tree, appending everthing that comes AFTER parentIndex\n      let p: AST | undefined = n\n      let pp = p.#parent\n      while (pp) {\n        for (\n          let i = p.#parentIndex + 1;\n          !pp.type && i < pp.#parts.length;\n          i++\n        ) {\n          for (const part of n.#parts) {\n            /* c8 ignore start */\n            if (typeof part === 'string') {\n              throw new Error('string part in extglob AST??')\n            }\n            /* c8 ignore stop */\n            part.copyIn(pp.#parts[i])\n          }\n        }\n        p = pp\n        pp = p.#parent\n      }\n    }\n    return this\n  }\n\n  push(...parts: (string | AST)[]) {\n    for (const p of parts) {\n      if (p === '') continue\n      /* c8 ignore start */\n      if (\n        typeof p !== 'string' &&\n        !(p instanceof AST && p.#parent === this)\n      ) {\n        throw new Error('invalid part: ' + p)\n      }\n      /* c8 ignore stop */\n      this.#parts.push(p)\n    }\n  }\n\n  toJSON() {\n    const ret: unknown[] =\n      this.type === null ?\n        this.#parts\n          .slice()\n          .map(p => (typeof p === 'string' ? p : p.toJSON()))\n      : [this.type, ...this.#parts.map(p => (p as AST).toJSON())]\n    if (this.isStart() && !this.type) ret.unshift([])\n    if (\n      this.isEnd() &&\n      (this === this.#root ||\n        (this.#root.#filledNegs && this.#parent?.type === '!'))\n    ) {\n      ret.push({})\n    }\n    return ret\n  }\n\n  isStart(): boolean {\n    if (this.#root === this) return true\n    // if (this.type) return !!this.#parent?.isStart()\n    if (!this.#parent?.isStart()) return false\n    if (this.#parentIndex === 0) return true\n    // if everything AHEAD of this is a negation, then it's still the \"start\"\n    const p = this.#parent\n    for (let i = 0; i < this.#parentIndex; i++) {\n      const pp = p.#parts[i]\n      if (!(pp instanceof AST && pp.type === '!')) {\n        return false\n      }\n    }\n    return true\n  }\n\n  isEnd(): boolean {\n    if (this.#root === this) return true\n    if (this.#parent?.type === '!') return true\n    if (!this.#parent?.isEnd()) return false\n    if (!this.type) return this.#parent?.isEnd()\n    // if not root, it'll always have a parent\n    /* c8 ignore start */\n    const pl = this.#parent ? this.#parent.#parts.length : 0\n    /* c8 ignore stop */\n    return this.#parentIndex === pl - 1\n  }\n\n  copyIn(part: AST | string) {\n    if (typeof part === 'string') this.push(part)\n    else this.push(part.clone(this))\n  }\n\n  clone(parent: AST) {\n    const c = new AST(this.type, parent)\n    for (const p of this.#parts) {\n      c.copyIn(p)\n    }\n    return c\n  }\n\n  static #parseAST(\n    str: string,\n    ast: AST,\n    pos: number,\n    opt: MinimatchOptions,\n    extDepth: number,\n  ): number {\n    const maxDepth = opt.maxExtglobRecursion ?? 2\n    let escaping = false\n    let inBrace = false\n    let braceStart = -1\n    let braceNeg = false\n    if (ast.type === null) {\n      // outside of a extglob, append until we find a start\n      let i = pos\n      let acc = ''\n      while (i < str.length) {\n        const c = str.charAt(i++)\n        // still accumulate escapes at this point, but we do ignore\n        // starts that are escaped\n        if (escaping || c === '\\\\') {\n          escaping = !escaping\n          acc += c\n          continue\n        }\n\n        if (inBrace) {\n          if (i === braceStart + 1) {\n            if (c === '^' || c === '!') {\n              braceNeg = true\n            }\n          } else if (c === ']' && !(i === braceStart + 2 && braceNeg)) {\n            inBrace = false\n          }\n          acc += c\n          continue\n        } else if (c === '[') {\n          inBrace = true\n          braceStart = i\n          braceNeg = false\n          acc += c\n          continue\n        }\n\n        // we don't have to check for adoption here, because that's\n        // done at the other recursion point.\n        const doRecurse =\n          !opt.noext &&\n          isExtglobType(c) &&\n          str.charAt(i) === '(' &&\n          extDepth <= maxDepth\n        if (doRecurse) {\n          ast.push(acc)\n          acc = ''\n          const ext = new AST(c, ast)\n          i = AST.#parseAST(str, ext, i, opt, extDepth + 1)\n          ast.push(ext)\n          continue\n        }\n        acc += c\n      }\n      ast.push(acc)\n      return i\n    }\n\n    // some kind of extglob, pos is at the (\n    // find the next | or )\n    let i = pos + 1\n    let part = new AST(null, ast)\n    const parts: AST[] = []\n    let acc = ''\n    while (i < str.length) {\n      const c = str.charAt(i++)\n      // still accumulate escapes at this point, but we do ignore\n      // starts that are escaped\n      if (escaping || c === '\\\\') {\n        escaping = !escaping\n        acc += c\n        continue\n      }\n\n      if (inBrace) {\n        if (i === braceStart + 1) {\n          if (c === '^' || c === '!') {\n            braceNeg = true\n          }\n        } else if (c === ']' && !(i === braceStart + 2 && braceNeg)) {\n          inBrace = false\n        }\n        acc += c\n        continue\n      } else if (c === '[') {\n        inBrace = true\n        braceStart = i\n        braceNeg = false\n        acc += c\n        continue\n      }\n\n      const doRecurse =\n        !opt.noext &&\n        isExtglobType(c) &&\n        str.charAt(i) === '(' &&\n        /* c8 ignore start - the maxDepth is sufficient here */\n        (extDepth <= maxDepth || (ast && ast.#canAdoptType(c)))\n      /* c8 ignore stop */\n      if (doRecurse) {\n        const depthAdd = ast && ast.#canAdoptType(c) ? 0 : 1\n        part.push(acc)\n        acc = ''\n        const ext = new AST(c, part)\n        part.push(ext)\n        i = AST.#parseAST(str, ext, i, opt, extDepth + depthAdd)\n        continue\n      }\n      if (c === '|') {\n        part.push(acc)\n        acc = ''\n        parts.push(part)\n        part = new AST(null, ast)\n        continue\n      }\n      if (c === ')') {\n        if (acc === '' && ast.#parts.length === 0) {\n          ast.#emptyExt = true\n        }\n        part.push(acc)\n        acc = ''\n        ast.push(...parts, part)\n        return i\n      }\n      acc += c\n    }\n\n    // unfinished extglob\n    // if we got here, it was a malformed extglob! not an extglob, but\n    // maybe something else in there.\n    ast.type = null\n    ast.#hasMagic = undefined\n    ast.#parts = [str.substring(pos - 1)]\n    return i\n  }\n\n  #canAdoptWithSpace(child?: AST | string): child is AST & {\n    type: null\n    parts: [AST & { type: ExtglobType }]\n  } {\n    return this.#canAdopt(child, adoptionWithSpaceMap)\n  }\n\n  #canAdopt(\n    child?: AST | string,\n    map: Map = adoptionMap,\n  ): child is AST & {\n    type: null\n    parts: [AST & { type: ExtglobType }]\n  } {\n    if (\n      !child ||\n      typeof child !== 'object' ||\n      child.type !== null ||\n      child.#parts.length !== 1 ||\n      this.type === null\n    ) {\n      return false\n    }\n    const gc = child.#parts[0]\n    if (!gc || typeof gc !== 'object' || gc.type === null) {\n      return false\n    }\n    return (this as AST & { type: ExtglobType }).#canAdoptType(\n      gc.type,\n      map,\n    )\n  }\n  #canAdoptType(\n    c: string,\n    map: Map = adoptionAnyMap,\n  ): c is ExtglobType {\n    return !!map.get(this.type as ExtglobType)?.includes(c as ExtglobType)\n  }\n\n  #adoptWithSpace(\n    this: AST & { type: ExtglobType },\n    child: AST & {\n      type: null\n    },\n    index: number,\n  ) {\n    const gc = child.#parts[0] as AST & { type: ExtglobType }\n    const blank = new AST(null, gc, this.options)\n    blank.#parts.push('')\n    gc.push(blank)\n    this.#adopt(child, index)\n  }\n\n  #adopt(\n    child: AST & {\n      type: null\n    },\n    index: number,\n  ) {\n    const gc = child.#parts[0] as AST & { type: ExtglobType }\n    this.#parts.splice(index, 1, ...gc.#parts)\n    for (const p of gc.#parts) {\n      if (typeof p === 'object') p.#parent = this\n    }\n    this.#toString = undefined\n  }\n\n  #canUsurpType(c: string): boolean {\n    const m = usurpMap.get(this.type as ExtglobType)\n    return !!m?.has(c as ExtglobType)\n  }\n\n  #canUsurp(child?: AST | string): child is AST & {\n    type: null\n    parts: [AST & { type: ExtglobType }]\n  } {\n    if (\n      !child ||\n      typeof child !== 'object' ||\n      child.type !== null ||\n      child.#parts.length !== 1 ||\n      this.type === null ||\n      this.#parts.length !== 1\n    ) {\n      return false\n    }\n    const gc = child.#parts[0]\n    if (!gc || typeof gc !== 'object' || gc.type === null) {\n      return false\n    }\n    return (this as AST & { type: ExtglobType }).#canUsurpType(gc.type)\n  }\n\n  #usurp(this: AST & { type: ExtglobType }, child: AST & { type: null }) {\n    const m = usurpMap.get(this.type as ExtglobType)\n    const gc = child.#parts[0] as AST & { type: ExtglobType }\n    const nt = m?.get(gc.type)\n    /* c8 ignore start - impossible */\n    if (!nt) return false\n    /* c8 ignore stop */\n    this.#parts = gc.#parts\n    for (const p of this.#parts) {\n      if (typeof p === 'object') {\n        p.#parent = this\n      }\n    }\n    this.type = nt\n    this.#toString = undefined\n    this.#emptyExt = false\n  }\n\n  static fromGlob(pattern: string, options: MinimatchOptions = {}) {\n    const ast = new AST(null, undefined, options)\n    AST.#parseAST(pattern, ast, 0, options, 0)\n    return ast\n  }\n\n  // returns the regular expression if there's magic, or the unescaped\n  // string if not.\n  toMMPattern(): MMRegExp | string {\n    // should only be called on root\n    /* c8 ignore start */\n    if (this !== this.#root) return this.#root.toMMPattern()\n    /* c8 ignore stop */\n    const glob = this.toString()\n    const [re, body, hasMagic, uflag] = this.toRegExpSource()\n    // if we're in nocase mode, and not nocaseMagicOnly, then we do\n    // still need a regular expression if we have to case-insensitively\n    // match capital/lowercase characters.\n    const anyMagic =\n      hasMagic ||\n      this.#hasMagic ||\n      (this.#options.nocase &&\n        !this.#options.nocaseMagicOnly &&\n        glob.toUpperCase() !== glob.toLowerCase())\n    if (!anyMagic) {\n      return body\n    }\n\n    const flags = (this.#options.nocase ? 'i' : '') + (uflag ? 'u' : '')\n    return Object.assign(new RegExp(`^${re}$`, flags), {\n      _src: re,\n      _glob: glob,\n    })\n  }\n\n  get options() {\n    return this.#options\n  }\n\n  // returns the string match, the regexp source, whether there's magic\n  // in the regexp (so a regular expression is required) and whether or\n  // not the uflag is needed for the regular expression (for posix classes)\n  // TODO: instead of injecting the start/end at this point, just return\n  // the BODY of the regexp, along with the start/end portions suitable\n  // for binding the start/end in either a joined full-path makeRe context\n  // (where we bind to (^|/), or a standalone matchPart context (where\n  // we bind to ^, and not /).  Otherwise slashes get duped!\n  //\n  // In part-matching mode, the start is:\n  // - if not isStart: nothing\n  // - if traversal possible, but not allowed: ^(?!\\.\\.?$)\n  // - if dots allowed or not possible: ^\n  // - if dots possible and not allowed: ^(?!\\.)\n  // end is:\n  // - if not isEnd(): nothing\n  // - else: $\n  //\n  // In full-path matching mode, we put the slash at the START of the\n  // pattern, so start is:\n  // - if first pattern: same as part-matching mode\n  // - if not isStart(): nothing\n  // - if traversal possible, but not allowed: /(?!\\.\\.?(?:$|/))\n  // - if dots allowed or not possible: /\n  // - if dots possible and not allowed: /(?!\\.)\n  // end is:\n  // - if last pattern, same as part-matching mode\n  // - else nothing\n  //\n  // Always put the (?:$|/) on negated tails, though, because that has to be\n  // there to bind the end of the negated pattern portion, and it's easier to\n  // just stick it in now rather than try to inject it later in the middle of\n  // the pattern.\n  //\n  // We can just always return the same end, and leave it up to the caller\n  // to know whether it's going to be used joined or in parts.\n  // And, if the start is adjusted slightly, can do the same there:\n  // - if not isStart: nothing\n  // - if traversal possible, but not allowed: (?:/|^)(?!\\.\\.?$)\n  // - if dots allowed or not possible: (?:/|^)\n  // - if dots possible and not allowed: (?:/|^)(?!\\.)\n  //\n  // But it's better to have a simpler binding without a conditional, for\n  // performance, so probably better to return both start options.\n  //\n  // Then the caller just ignores the end if it's not the first pattern,\n  // and the start always gets applied.\n  //\n  // But that's always going to be $ if it's the ending pattern, or nothing,\n  // so the caller can just attach $ at the end of the pattern when building.\n  //\n  // So the todo is:\n  // - better detect what kind of start is needed\n  // - return both flavors of starting pattern\n  // - attach $ at the end of the pattern when creating the actual RegExp\n  //\n  // Ah, but wait, no, that all only applies to the root when the first pattern\n  // is not an extglob. If the first pattern IS an extglob, then we need all\n  // that dot prevention biz to live in the extglob portions, because eg\n  // +(*|.x*) can match .xy but not .yx.\n  //\n  // So, return the two flavors if it's #root and the first child is not an\n  // AST, otherwise leave it to the child AST to handle it, and there,\n  // use the (?:^|/) style of start binding.\n  //\n  // Even simplified further:\n  // - Since the start for a join is eg /(?!\\.) and the start for a part\n  // is ^(?!\\.), we can just prepend (?!\\.) to the pattern (either root\n  // or start or whatever) and prepend ^ or / at the Regexp construction.\n  toRegExpSource(\n    allowDot?: boolean,\n  ): [re: string, body: string, hasMagic: boolean, uflag: boolean] {\n    const dot = allowDot ?? !!this.#options.dot\n    if (this.#root === this) {\n      this.#flatten()\n      this.#fillNegs()\n    }\n    if (!isExtglobAST(this)) {\n      const noEmpty =\n        this.isStart() &&\n        this.isEnd() &&\n        !this.#parts.some(s => typeof s !== 'string')\n      const src = this.#parts\n        .map(p => {\n          const [re, _, hasMagic, uflag] =\n            typeof p === 'string' ?\n              AST.#parseGlob(p, this.#hasMagic, noEmpty)\n            : p.toRegExpSource(allowDot)\n          this.#hasMagic = this.#hasMagic || hasMagic\n          this.#uflag = this.#uflag || uflag\n          return re\n        })\n        .join('')\n\n      let start = ''\n      if (this.isStart()) {\n        if (typeof this.#parts[0] === 'string') {\n          // this is the string that will match the start of the pattern,\n          // so we need to protect against dots and such.\n\n          // '.' and '..' cannot match unless the pattern is that exactly,\n          // even if it starts with . or dot:true is set.\n          const dotTravAllowed =\n            this.#parts.length === 1 && justDots.has(this.#parts[0])\n          if (!dotTravAllowed) {\n            const aps = addPatternStart\n            // check if we have a possibility of matching . or ..,\n            // and prevent that.\n            const needNoTrav =\n              // dots are allowed, and the pattern starts with [ or .\n              (dot && aps.has(src.charAt(0))) ||\n              // the pattern starts with \\., and then [ or .\n              (src.startsWith('\\\\.') && aps.has(src.charAt(2))) ||\n              // the pattern starts with \\.\\., and then [ or .\n              (src.startsWith('\\\\.\\\\.') && aps.has(src.charAt(4)))\n            // no need to prevent dots if it can't match a dot, or if a\n            // sub-pattern will be preventing it anyway.\n            const needNoDot = !dot && !allowDot && aps.has(src.charAt(0))\n\n            start =\n              needNoTrav ? startNoTraversal\n              : needNoDot ? startNoDot\n              : ''\n          }\n        }\n      }\n\n      // append the \"end of path portion\" pattern to negation tails\n      let end = ''\n      if (\n        this.isEnd() &&\n        this.#root.#filledNegs &&\n        this.#parent?.type === '!'\n      ) {\n        end = '(?:$|\\\\/)'\n      }\n      const final = start + src + end\n      return [\n        final,\n        unescape(src),\n        (this.#hasMagic = !!this.#hasMagic),\n        this.#uflag,\n      ]\n    }\n\n    // We need to calculate the body *twice* if it's a repeat pattern\n    // at the start, once in nodot mode, then again in dot mode, so a\n    // pattern like *(?) can match 'x.y'\n\n    const repeated = this.type === '*' || this.type === '+'\n    // some kind of extglob\n    const start = this.type === '!' ? '(?:(?!(?:' : '(?:'\n    let body = (this as AST & { type: ExtglobType }).#partsToRegExp(dot)\n\n    if (this.isStart() && this.isEnd() && !body && this.type !== '!') {\n      // invalid extglob, has to at least be *something* present, if it's\n      // the entire path portion.\n      const s = this.toString()\n      const me = this as AST\n      me.#parts = [s]\n      me.type = null\n      me.#hasMagic = undefined\n      return [s, unescape(this.toString()), false, false]\n    }\n\n    let bodyDotAllowed =\n      !repeated || allowDot || dot || !startNoDot ?\n        ''\n      : this.#partsToRegExp(true)\n    if (bodyDotAllowed === body) {\n      bodyDotAllowed = ''\n    }\n    if (bodyDotAllowed) {\n      body = `(?:${body})(?:${bodyDotAllowed})*?`\n    }\n\n    // an empty !() is exactly equivalent to a starNoEmpty\n    let final = ''\n    if (this.type === '!' && this.#emptyExt) {\n      final = (this.isStart() && !dot ? startNoDot : '') + starNoEmpty\n    } else {\n      const close =\n        this.type === '!' ?\n          // !() must match something,but !(x) can match ''\n          '))' +\n          (this.isStart() && !dot && !allowDot ? startNoDot : '') +\n          star +\n          ')'\n        : this.type === '@' ? ')'\n        : this.type === '?' ? ')?'\n        : this.type === '+' && bodyDotAllowed ? ')'\n        : this.type === '*' && bodyDotAllowed ? `)?`\n        : `)${this.type}`\n      final = start + body + close\n    }\n    return [\n      final,\n      unescape(body),\n      (this.#hasMagic = !!this.#hasMagic),\n      this.#uflag,\n    ]\n  }\n\n  #flatten() {\n    if (!isExtglobAST(this)) {\n      for (const p of this.#parts) {\n        if (typeof p === 'object') {\n          p.#flatten()\n        }\n      }\n    } else {\n      // do up to 10 passes to flatten as much as possible\n      let iterations = 0\n      let done = false\n      do {\n        done = true\n        for (let i = 0; i < this.#parts.length; i++) {\n          const c = this.#parts[i]\n          if (typeof c === 'object') {\n            c.#flatten()\n            if (this.#canAdopt(c)) {\n              done = false\n              this.#adopt(c, i)\n            } else if (this.#canAdoptWithSpace(c)) {\n              done = false\n              ;(this as AST & { type: ExtglobType }).#adoptWithSpace(c, i)\n            } else if (this.#canUsurp(c)) {\n              done = false\n              ;(this as AST & { type: ExtglobType }).#usurp(c)\n            }\n          }\n        }\n      } while (!done && ++iterations < 10)\n    }\n    this.#toString = undefined\n  }\n\n  #partsToRegExp(this: AST & { type: ExtglobType }, dot: boolean) {\n    return this.#parts\n      .map(p => {\n        // extglob ASTs should only contain parent ASTs\n        /* c8 ignore start */\n        if (typeof p === 'string') {\n          throw new Error('string type in extglob ast??')\n        }\n        /* c8 ignore stop */\n        // can ignore hasMagic, because extglobs are already always magic\n        const [re, _, _hasMagic, uflag] = p.toRegExpSource(dot)\n        this.#uflag = this.#uflag || uflag\n        return re\n      })\n      .filter(p => !(this.isStart() && this.isEnd()) || !!p)\n      .join('|')\n  }\n\n  static #parseGlob(\n    glob: string,\n    hasMagic: boolean | undefined,\n    noEmpty: boolean = false,\n  ): [re: string, body: string, hasMagic: boolean, uflag: boolean] {\n    let escaping = false\n    let re = ''\n    let uflag = false\n    // multiple stars that aren't globstars coalesce into one *\n    let inStar = false\n    for (let i = 0; i < glob.length; i++) {\n      const c = glob.charAt(i)\n      if (escaping) {\n        escaping = false\n        re += (reSpecials.has(c) ? '\\\\' : '') + c\n        continue\n      }\n      if (c === '*') {\n        if (inStar) continue\n        inStar = true\n        re += noEmpty && /^[*]+$/.test(glob) ? starNoEmpty : star\n        hasMagic = true\n        continue\n      } else {\n        inStar = false\n      }\n      if (c === '\\\\') {\n        if (i === glob.length - 1) {\n          re += '\\\\\\\\'\n        } else {\n          escaping = true\n        }\n        continue\n      }\n      if (c === '[') {\n        const [src, needUflag, consumed, magic] = parseClass(glob, i)\n        if (consumed) {\n          re += src\n          uflag = uflag || needUflag\n          i += consumed - 1\n          hasMagic = hasMagic || magic\n          continue\n        }\n      }\n      if (c === '?') {\n        re += qmark\n        hasMagic = true\n        continue\n      }\n      re += regExpEscape(c)\n    }\n    return [re, unescape(glob), !!hasMagic, uflag]\n  }\n}\n"]}
\ No newline at end of file
diff --git a/node_modules/minimatch/dist/esm/brace-expressions.d.ts.map b/node_modules/minimatch/dist/esm/brace-expressions.d.ts.map
index 3293e237..09b4c110 100644
--- a/node_modules/minimatch/dist/esm/brace-expressions.d.ts.map
+++ b/node_modules/minimatch/dist/esm/brace-expressions.d.ts.map
@@ -1 +1 @@
-{"version":3,"file":"brace-expressions.d.ts","sourceRoot":"","sources":["../../src/brace-expressions.ts"],"names":[],"mappings":"AA+BA,MAAM,MAAM,gBAAgB,GAAG;IAC7B,GAAG,EAAE,MAAM;IACX,KAAK,EAAE,OAAO;IACd,QAAQ,EAAE,MAAM;IAChB,QAAQ,EAAE,OAAO;CAClB,CAAA;AAQD,eAAO,MAAM,UAAU,GACrB,MAAM,MAAM,EACZ,UAAU,MAAM,KACf,gBA6HF,CAAA"}
\ No newline at end of file
+{"version":3,"file":"brace-expressions.d.ts","sourceRoot":"","sources":["../../src/brace-expressions.ts"],"names":[],"mappings":"AAgCA,MAAM,MAAM,gBAAgB,GAAG;IAC7B,GAAG,EAAE,MAAM;IACX,KAAK,EAAE,OAAO;IACd,QAAQ,EAAE,MAAM;IAChB,QAAQ,EAAE,OAAO;CAClB,CAAA;AAQD,eAAO,MAAM,UAAU,GACrB,MAAM,MAAM,EACZ,UAAU,MAAM,KACf,gBA2HF,CAAA"}
\ No newline at end of file
diff --git a/node_modules/minimatch/dist/esm/brace-expressions.js b/node_modules/minimatch/dist/esm/brace-expressions.js
index c629d6ae..4b49d40b 100644
--- a/node_modules/minimatch/dist/esm/brace-expressions.js
+++ b/node_modules/minimatch/dist/esm/brace-expressions.js
@@ -138,10 +138,8 @@ export const parseClass = (glob, position) => {
     }
     const sranges = '[' + (negate ? '^' : '') + rangesToString(ranges) + ']';
     const snegs = '[' + (negate ? '' : '^') + rangesToString(negs) + ']';
-    const comb = ranges.length && negs.length
-        ? '(' + sranges + '|' + snegs + ')'
-        : ranges.length
-            ? sranges
+    const comb = ranges.length && negs.length ? '(' + sranges + '|' + snegs + ')'
+        : ranges.length ? sranges
             : snegs;
     return [comb, uflag, endPos - pos, true];
 };
diff --git a/node_modules/minimatch/dist/esm/brace-expressions.js.map b/node_modules/minimatch/dist/esm/brace-expressions.js.map
index d988fd9f..184b5a89 100644
--- a/node_modules/minimatch/dist/esm/brace-expressions.js.map
+++ b/node_modules/minimatch/dist/esm/brace-expressions.js.map
@@ -1 +1 @@
-{"version":3,"file":"brace-expressions.js","sourceRoot":"","sources":["../../src/brace-expressions.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,wCAAwC;AAExC,8DAA8D;AAC9D,MAAM,YAAY,GAA0D;IAC1E,WAAW,EAAE,CAAC,sBAAsB,EAAE,IAAI,CAAC;IAC3C,WAAW,EAAE,CAAC,eAAe,EAAE,IAAI,CAAC;IACpC,WAAW,EAAE,CAAC,KAAK,GAAG,QAAQ,GAAG,IAAI,EAAE,KAAK,CAAC;IAC7C,WAAW,EAAE,CAAC,YAAY,EAAE,IAAI,CAAC;IACjC,WAAW,EAAE,CAAC,SAAS,EAAE,IAAI,CAAC;IAC9B,WAAW,EAAE,CAAC,SAAS,EAAE,IAAI,CAAC;IAC9B,WAAW,EAAE,CAAC,cAAc,EAAE,IAAI,EAAE,IAAI,CAAC;IACzC,WAAW,EAAE,CAAC,SAAS,EAAE,IAAI,CAAC;IAC9B,WAAW,EAAE,CAAC,QAAQ,EAAE,IAAI,CAAC;IAC7B,WAAW,EAAE,CAAC,QAAQ,EAAE,IAAI,CAAC;IAC7B,WAAW,EAAE,CAAC,uBAAuB,EAAE,IAAI,CAAC;IAC5C,WAAW,EAAE,CAAC,SAAS,EAAE,IAAI,CAAC;IAC9B,UAAU,EAAE,CAAC,6BAA6B,EAAE,IAAI,CAAC;IACjD,YAAY,EAAE,CAAC,WAAW,EAAE,KAAK,CAAC;CACnC,CAAA;AAED,+DAA+D;AAC/D,mBAAmB;AACnB,MAAM,WAAW,GAAG,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,WAAW,EAAE,MAAM,CAAC,CAAA;AACjE,qCAAqC;AACrC,MAAM,YAAY,GAAG,CAAC,CAAS,EAAE,EAAE,CACjC,CAAC,CAAC,OAAO,CAAC,0BAA0B,EAAE,MAAM,CAAC,CAAA;AAE/C,4DAA4D;AAC5D,MAAM,cA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AAC,MAAM,CAAC,CAAC,CAAC,CAAC;QACxB,CAAC,MAAM,EACP,CAAC;QACD,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;QAClE,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,GAAG,EAAE,KAAK,CAAC,CAAA;IACtD,CAAC;IAED,MAAM,OAAO,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,cAAc,CAAC,MAAM,CAAC,GAAG,GAAG,CAAA;IACxE,MAAM,KAAK,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,cAAc,CAAC,IAAI,CAAC,GAAG,GAAG,CAAA;IACpE,MAAM,IAAI,GACR,MAAM,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM;QAC1B,CAAC,CAAC,GAAG,GAAG,OAAO,GAAG,GAAG,GAAG,KAAK,GAAG,GAAG;QACnC,CAAC,CAAC,MAAM,CAAC,MAAM;YACb,CAAC,CAAC,OAAO;YACT,CAAC,CAAC,KAAK,CAAA;IAEb,OAAO,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,GAAG,GAAG,EAAE,IAAI,CAAC,CAAA;AAC1C,CAAC,CAAA","sourcesContent":["// translate the various posix character classes into unicode properties\n// this works across all unicode locales\n\n// { : [, /u flag required, negated]\nconst posixClasses: { [k: string]: [e: string, u: boolean, n?: boolean] } = {\n  '[:alnum:]': ['\\\\p{L}\\\\p{Nl}\\\\p{Nd}', true],\n  '[:alpha:]': ['\\\\p{L}\\\\p{Nl}', true],\n  '[:ascii:]': ['\\\\x' + '00-\\\\x' + '7f', false],\n  '[:blank:]': ['\\\\p{Zs}\\\\t', true],\n  '[:cntrl:]': ['\\\\p{Cc}', true],\n  '[:digit:]': ['\\\\p{Nd}', true],\n  '[:graph:]': ['\\\\p{Z}\\\\p{C}', true, true],\n  '[:lower:]': ['\\\\p{Ll}', true],\n  '[:print:]': ['\\\\p{C}', true],\n  '[:punct:]': ['\\\\p{P}', true],\n  '[:space:]': ['\\\\p{Z}\\\\t\\\\r\\\\n\\\\v\\\\f', true],\n  '[:upper:]': ['\\\\p{Lu}', true],\n  '[:word:]': ['\\\\p{L}\\\\p{Nl}\\\\p{Nd}\\\\p{Pc}', true],\n  '[:xdigit:]': ['A-Fa-f0-9', false],\n}\n\n// only need to escape a few things inside of brace expressions\n// escapes: [ \\ ] -\nconst braceEscape = (s: string) => s.replace(/[[\\]\\\\-]/g, '\\\\$&')\n// escape all regexp magic characters\nconst regexpEscape = (s: string) =>\n  s.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&')\n\n// everything has already been escaped, we just have to join\nconst rangesToString = (ranges: string[]): string => ranges.join('')\n\nexport type ParseClassResult = [\n  src: string,\n  uFlag: boolean,\n  consumed: number,\n  hasMagic: boolean,\n]\n\n// takes a glob string at a posix brace expression, and returns\n// an equivalent regular expression source, and boolean indicating\n// whether the /u flag needs to be applied, and the number of chars\n// consumed to parse the character class.\n// This also removes out of order ranges, and returns ($.) if the\n// entire class just no good.\nexport const parseClass = (\n  glob: string,\n  position: number,\n): ParseClassResult => {\n  const pos = position\n  /* c8 ignore start */\n  if (glob.charAt(pos) !== '[') {\n    throw new Error('not in a brace expression')\n  }\n  /* c8 ignore stop */\n  const ranges: string[] = []\n  const negs: string[] = []\n\n  let i = pos + 1\n  let sawStart = false\n  let uflag = false\n  let escaping = false\n  let negate = false\n  let endPos = pos\n  let rangeStart = ''\n  WHILE: while (i < glob.length) {\n    const c = glob.charAt(i)\n    if ((c === '!' || c === '^') && i === pos + 1) {\n      negate = true\n      i++\n      continue\n    }\n\n    if (c === ']' && sawStart && !escaping) {\n      endPos = i + 1\n      break\n    }\n\n    sawStart = true\n    if (c === '\\\\') {\n      if (!escaping) {\n        escaping = true\n        i++\n        continue\n      }\n      // escaped \\ char, fall through and treat like normal char\n    }\n    if (c === '[' && !escaping) {\n      // either a posix class, a collation equivalent, or just a [\n      for (const [cls, [unip, u, neg]] of Object.entries(posixClasses)) {\n        if (glob.startsWith(cls, i)) {\n          // invalid, [a-[] is fine, but not [a-[:alpha]]\n          if (rangeStart) {\n            return ['$.', false, glob.length - pos, true]\n          }\n          i += cls.length\n          if (neg) negs.push(unip)\n          else ranges.push(unip)\n          uflag = uflag || u\n          continue WHILE\n        }\n      }\n    }\n\n    // now it's just a normal character, effectively\n    escaping = false\n    if (rangeStart) {\n      // throw this range away if it's not valid, but others\n      // can still match.\n      if (c > rangeStart) {\n        ranges.push(braceEscape(rangeStart) + '-' + braceEscape(c))\n      } else if (c === rangeStart) {\n        ranges.push(braceEscape(c))\n      }\n      rangeStart = ''\n      i++\n      continue\n    }\n\n    // now might be the start of a range.\n    // can be either c-d or c-] or c] or c] at this point\n    if (glob.startsWith('-]', i + 1)) {\n      ranges.push(braceEscape(c + '-'))\n      i += 2\n      continue\n    }\n    if (glob.startsWith('-', i + 1)) {\n      rangeStart = c\n      i += 2\n      continue\n    }\n\n    // not the start of a range, just a single character\n    ranges.push(braceEscape(c))\n    i++\n  }\n\n  if (endPos < i) {\n    // didn't see the end of the class, not a valid class,\n    // but might still be valid as a literal match.\n    return ['', false, 0, false]\n  }\n\n  // if we got no ranges and no negates, then we have a range that\n  // cannot possibly match anything, and that poisons the whole glob\n  if (!ranges.length && !negs.length) {\n    return ['$.', false, glob.length - pos, true]\n  }\n\n  // if we got one positive range, and it's a single character, then that's\n  // not actually a magic pattern, it's just that one literal character.\n  // we should not treat that as \"magic\", we should just return the literal\n  // character. [_] is a perfectly valid way to escape glob magic chars.\n  if (\n    negs.length === 0 &&\n    ranges.length === 1 &&\n    /^\\\\?.$/.test(ranges[0]) &&\n    !negate\n  ) {\n    const r = ranges[0].length === 2 ? ranges[0].slice(-1) : ranges[0]\n    return [regexpEscape(r), false, endPos - pos, false]\n  }\n\n  const sranges = '[' + (negate ? '^' : '') + rangesToString(ranges) + ']'\n  const snegs = '[' + (negate ? '' : '^') + rangesToString(negs) + ']'\n  const comb =\n    ranges.length && negs.length\n      ? '(' + sranges + '|' + snegs + ')'\n      : ranges.length\n        ? sranges\n        : snegs\n\n  return [comb, uflag, endPos - pos, true]\n}\n"]}
\ No newline at end of file
+{"version":3,"file":"brace-expressions.js","sourceRoot":"","sources":["../../src/brace-expressions.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,wCAAwC;AAExC,8DAA8D;AAC9D,MAAM,YAAY,GAChB;IACE,WAAW,EAAE,CAAC,sBAAsB,EAAE,IAAI,CAAC;IAC3C,WAAW,EAAE,CAAC,eAAe,EAAE,IAAI,CAAC;IACpC,WAAW,EAAE,CAAC,KAAK,GAAG,QAAQ,GAAG,IAAI,EAAE,KAAK,CAAC;IAC7C,WAAW,EAAE,CAAC,YAAY,EAAE,IAAI,CAAC;IACjC,WAAW,EAAE,CAAC,SAAS,EAAE,IAAI,CAAC;IAC9B,WAAW,EAAE,CAAC,SAAS,EAAE,IAAI,CAAC;IAC9B,WAAW,EAAE,CAAC,cAAc,EAAE,IAAI,EAAE,IAAI,CAAC;IACzC,WAAW,EAAE,CAAC,SAAS,EAAE,IAAI,CAAC;IAC9B,WAAW,EAAE,CAAC,QAAQ,EAAE,IAAI,CAAC;IAC7B,WAAW,EAAE,CAAC,QAAQ,EAAE,IAAI,CAAC;IAC7B,WAAW,EAAE,CAAC,uBAAuB,EAAE,IAAI,CAAC;IAC5C,WAAW,EAAE,CAAC,SAAS,EAAE,IAAI,CAAC;IAC9B,UAAU,EAAE,CAAC,6BAA6B,EAAE,IAAI,CAAC;IACjD,YAAY,EAAE,CAAC,WAAW,EAAE,KAAK,CAAC;CACnC,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KAAK,EAAE,MAAM,GAAG,GAAG,EAAE,IAAI,CAAC,CAAA;AAC1C,CAAC,CAAA","sourcesContent":["// translate the various posix character classes into unicode properties\n// this works across all unicode locales\n\n// { : [, /u flag required, negated]\nconst posixClasses: { [k: string]: [e: string, u: boolean, n?: boolean] } =\n  {\n    '[:alnum:]': ['\\\\p{L}\\\\p{Nl}\\\\p{Nd}', true],\n    '[:alpha:]': ['\\\\p{L}\\\\p{Nl}', true],\n    '[:ascii:]': ['\\\\x' + '00-\\\\x' + '7f', false],\n    '[:blank:]': ['\\\\p{Zs}\\\\t', true],\n    '[:cntrl:]': ['\\\\p{Cc}', true],\n    '[:digit:]': ['\\\\p{Nd}', true],\n    '[:graph:]': ['\\\\p{Z}\\\\p{C}', true, true],\n    '[:lower:]': ['\\\\p{Ll}', true],\n    '[:print:]': ['\\\\p{C}', true],\n    '[:punct:]': ['\\\\p{P}', true],\n    '[:space:]': ['\\\\p{Z}\\\\t\\\\r\\\\n\\\\v\\\\f', true],\n    '[:upper:]': ['\\\\p{Lu}', true],\n    '[:word:]': ['\\\\p{L}\\\\p{Nl}\\\\p{Nd}\\\\p{Pc}', true],\n    '[:xdigit:]': ['A-Fa-f0-9', false],\n  }\n\n// only need to escape a few things inside of brace expressions\n// escapes: [ \\ ] -\nconst braceEscape = (s: string) => s.replace(/[[\\]\\\\-]/g, '\\\\$&')\n// escape all regexp magic characters\nconst regexpEscape = (s: string) =>\n  s.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&')\n\n// everything has already been escaped, we just have to join\nconst rangesToString = (ranges: string[]): string => ranges.join('')\n\nexport type ParseClassResult = [\n  src: string,\n  uFlag: boolean,\n  consumed: number,\n  hasMagic: boolean,\n]\n\n// takes a glob string at a posix brace expression, and returns\n// an equivalent regular expression source, and boolean indicating\n// whether the /u flag needs to be applied, and the number of chars\n// consumed to parse the character class.\n// This also removes out of order ranges, and returns ($.) if the\n// entire class just no good.\nexport const parseClass = (\n  glob: string,\n  position: number,\n): ParseClassResult => {\n  const pos = position\n  /* c8 ignore start */\n  if (glob.charAt(pos) !== '[') {\n    throw new Error('not in a brace expression')\n  }\n  /* c8 ignore stop */\n  const ranges: string[] = []\n  const negs: string[] = []\n\n  let i = pos + 1\n  let sawStart = false\n  let uflag = false\n  let escaping = false\n  let negate = false\n  let endPos = pos\n  let rangeStart = ''\n  WHILE: while (i < glob.length) {\n    const c = glob.charAt(i)\n    if ((c === '!' || c === '^') && i === pos + 1) {\n      negate = true\n      i++\n      continue\n    }\n\n    if (c === ']' && sawStart && !escaping) {\n      endPos = i + 1\n      break\n    }\n\n    sawStart = true\n    if (c === '\\\\') {\n      if (!escaping) {\n        escaping = true\n        i++\n        continue\n      }\n      // escaped \\ char, fall through and treat like normal char\n    }\n    if (c === '[' && !escaping) {\n      // either a posix class, a collation equivalent, or just a [\n      for (const [cls, [unip, u, neg]] of Object.entries(posixClasses)) {\n        if (glob.startsWith(cls, i)) {\n          // invalid, [a-[] is fine, but not [a-[:alpha]]\n          if (rangeStart) {\n            return ['$.', false, glob.length - pos, true]\n          }\n          i += cls.length\n          if (neg) negs.push(unip)\n          else ranges.push(unip)\n          uflag = uflag || u\n          continue WHILE\n        }\n      }\n    }\n\n    // now it's just a normal character, effectively\n    escaping = false\n    if (rangeStart) {\n      // throw this range away if it's not valid, but others\n      // can still match.\n      if (c > rangeStart) {\n        ranges.push(braceEscape(rangeStart) + '-' + braceEscape(c))\n      } else if (c === rangeStart) {\n        ranges.push(braceEscape(c))\n      }\n      rangeStart = ''\n      i++\n      continue\n    }\n\n    // now might be the start of a range.\n    // can be either c-d or c-] or c] or c] at this point\n    if (glob.startsWith('-]', i + 1)) {\n      ranges.push(braceEscape(c + '-'))\n      i += 2\n      continue\n    }\n    if (glob.startsWith('-', i + 1)) {\n      rangeStart = c\n      i += 2\n      continue\n    }\n\n    // not the start of a range, just a single character\n    ranges.push(braceEscape(c))\n    i++\n  }\n\n  if (endPos < i) {\n    // didn't see the end of the class, not a valid class,\n    // but might still be valid as a literal match.\n    return ['', false, 0, false]\n  }\n\n  // if we got no ranges and no negates, then we have a range that\n  // cannot possibly match anything, and that poisons the whole glob\n  if (!ranges.length && !negs.length) {\n    return ['$.', false, glob.length - pos, true]\n  }\n\n  // if we got one positive range, and it's a single character, then that's\n  // not actually a magic pattern, it's just that one literal character.\n  // we should not treat that as \"magic\", we should just return the literal\n  // character. [_] is a perfectly valid way to escape glob magic chars.\n  if (\n    negs.length === 0 &&\n    ranges.length === 1 &&\n    /^\\\\?.$/.test(ranges[0]) &&\n    !negate\n  ) {\n    const r = ranges[0].length === 2 ? ranges[0].slice(-1) : ranges[0]\n    return [regexpEscape(r), false, endPos - pos, false]\n  }\n\n  const sranges = '[' + (negate ? '^' : '') + rangesToString(ranges) + ']'\n  const snegs = '[' + (negate ? '' : '^') + rangesToString(negs) + ']'\n  const comb =\n    ranges.length && negs.length ? '(' + sranges + '|' + snegs + ')'\n    : ranges.length ? sranges\n    : snegs\n\n  return [comb, uflag, endPos - pos, true]\n}\n"]}
\ No newline at end of file
diff --git a/node_modules/minimatch/dist/esm/escape.d.ts b/node_modules/minimatch/dist/esm/escape.d.ts
index 92e88c8f..141024a0 100644
--- a/node_modules/minimatch/dist/esm/escape.d.ts
+++ b/node_modules/minimatch/dist/esm/escape.d.ts
@@ -1,4 +1,4 @@
-import { MinimatchOptions } from './index.js';
+import type { MinimatchOptions } from './index.js';
 /**
  * Escape all magic characters in a glob pattern.
  *
diff --git a/node_modules/minimatch/dist/esm/escape.d.ts.map b/node_modules/minimatch/dist/esm/escape.d.ts.map
index e8d8a693..e167e300 100644
--- a/node_modules/minimatch/dist/esm/escape.d.ts.map
+++ b/node_modules/minimatch/dist/esm/escape.d.ts.map
@@ -1 +1 @@
-{"version":3,"file":"escape.d.ts","sourceRoot":"","sources":["../../src/escape.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAE7C;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,MAAM,GACjB,GAAG,MAAM,EACT,2CAGG,IAAI,CAAC,gBAAgB,EAAE,sBAAsB,GAAG,eAAe,CAAM,WAazE,CAAA"}
\ No newline at end of file
+{"version":3,"file":"escape.d.ts","sourceRoot":"","sources":["../../src/escape.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAElD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,MAAM,GACjB,GAAG,MAAM,EACT,2CAGG,IAAI,CAAC,gBAAgB,EAAE,sBAAsB,GAAG,eAAe,CAAM,WAazE,CAAA"}
\ No newline at end of file
diff --git a/node_modules/minimatch/dist/esm/escape.js b/node_modules/minimatch/dist/esm/escape.js
index bab968ff..46d0ec88 100644
--- a/node_modules/minimatch/dist/esm/escape.js
+++ b/node_modules/minimatch/dist/esm/escape.js
@@ -15,12 +15,12 @@ export const escape = (s, { windowsPathsNoEscape = false, magicalBraces = false,
     // that make those magic, and escaping ! as [!] isn't valid,
     // because [!]] is a valid glob class meaning not ']'.
     if (magicalBraces) {
-        return windowsPathsNoEscape
-            ? s.replace(/[?*()[\]{}]/g, '[$&]')
+        return windowsPathsNoEscape ?
+            s.replace(/[?*()[\]{}]/g, '[$&]')
             : s.replace(/[?*()[\]\\{}]/g, '\\$&');
     }
-    return windowsPathsNoEscape
-        ? s.replace(/[?*()[\]]/g, '[$&]')
+    return windowsPathsNoEscape ?
+        s.replace(/[?*()[\]]/g, '[$&]')
         : s.replace(/[?*()[\]\\]/g, '\\$&');
 };
 //# sourceMappingURL=escape.js.map
\ No newline at end of file
diff --git a/node_modules/minimatch/dist/esm/escape.js.map b/node_modules/minimatch/dist/esm/escape.js.map
index 5d7f282a..4740508f 100644
--- a/node_modules/minimatch/dist/esm/escape.js.map
+++ b/node_modules/minimatch/dist/esm/escape.js.map
@@ -1 +1 @@
-{"version":3,"file":"escape.js","sourceRoot":"","sources":["../../src/escape.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,CACpB,CAAS,EACT,EACE,oBAAoB,GAAG,KAAK,EAC5B,aAAa,GAAG,KAAK,MAC+C,EAAE,EACxE,EAAE;IACF,wDAAwD;IACxD,4DAA4D;IAC5D,sDAAsD;IACtD,IAAI,aAAa,EAAE,CAAC;QAClB,OAAO,oBAAoB;YACzB,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,cAAc,EAAE,MAAM,CAAC;YACnC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAAA;IACzC,CAAC;IACD,OAAO,oBAAoB;QACzB,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,YAAY,EAAE,MAAM,CAAC;QACjC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,cAAc,EAAE,MAAM,CAAC,CAAA;AACvC,CAAC,CAAA","sourcesContent":["import { MinimatchOptions } from './index.js'\n\n/**\n * Escape all magic characters in a glob pattern.\n *\n * If the {@link MinimatchOptions.windowsPathsNoEscape}\n * option is used, then characters are escaped by wrapping in `[]`, because\n * a magic character wrapped in a character class can only be satisfied by\n * that exact character.  In this mode, `\\` is _not_ escaped, because it is\n * not interpreted as a magic character, but instead as a path separator.\n *\n * If the {@link MinimatchOptions.magicalBraces} option is used,\n * then braces (`{` and `}`) will be escaped.\n */\nexport const escape = (\n  s: string,\n  {\n    windowsPathsNoEscape = false,\n    magicalBraces = false,\n  }: Pick = {},\n) => {\n  // don't need to escape +@! because we escape the parens\n  // that make those magic, and escaping ! as [!] isn't valid,\n  // because [!]] is a valid glob class meaning not ']'.\n  if (magicalBraces) {\n    return windowsPathsNoEscape\n      ? s.replace(/[?*()[\\]{}]/g, '[$&]')\n      : s.replace(/[?*()[\\]\\\\{}]/g, '\\\\$&')\n  }\n  return windowsPathsNoEscape\n    ? s.replace(/[?*()[\\]]/g, '[$&]')\n    : s.replace(/[?*()[\\]\\\\]/g, '\\\\$&')\n}\n"]}
\ No newline at end of file
+{"version":3,"file":"escape.js","sourceRoot":"","sources":["../../src/escape.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,CACpB,CAAS,EACT,EACE,oBAAoB,GAAG,KAAK,EAC5B,aAAa,GAAG,KAAK,MAC+C,EAAE,EACxE,EAAE;IACF,wDAAwD;IACxD,4DAA4D;IAC5D,sDAAsD;IACtD,IAAI,aAAa,EAAE,CAAC;QAClB,OAAO,oBAAoB,CAAC,CAAC;YACzB,CAAC,CAAC,OAAO,CAAC,cAAc,EAAE,MAAM,CAAC;YACnC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAAA;IACzC,CAAC;IACD,OAAO,oBAAoB,CAAC,CAAC;QACzB,CAAC,CAAC,OAAO,CAAC,YAAY,EAAE,MAAM,CAAC;QACjC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,cAAc,EAAE,MAAM,CAAC,CAAA;AACvC,CAAC,CAAA","sourcesContent":["import type { MinimatchOptions } from './index.js'\n\n/**\n * Escape all magic characters in a glob pattern.\n *\n * If the {@link MinimatchOptions.windowsPathsNoEscape}\n * option is used, then characters are escaped by wrapping in `[]`, because\n * a magic character wrapped in a character class can only be satisfied by\n * that exact character.  In this mode, `\\` is _not_ escaped, because it is\n * not interpreted as a magic character, but instead as a path separator.\n *\n * If the {@link MinimatchOptions.magicalBraces} option is used,\n * then braces (`{` and `}`) will be escaped.\n */\nexport const escape = (\n  s: string,\n  {\n    windowsPathsNoEscape = false,\n    magicalBraces = false,\n  }: Pick = {},\n) => {\n  // don't need to escape +@! because we escape the parens\n  // that make those magic, and escaping ! as [!] isn't valid,\n  // because [!]] is a valid glob class meaning not ']'.\n  if (magicalBraces) {\n    return windowsPathsNoEscape ?\n        s.replace(/[?*()[\\]{}]/g, '[$&]')\n      : s.replace(/[?*()[\\]\\\\{}]/g, '\\\\$&')\n  }\n  return windowsPathsNoEscape ?\n      s.replace(/[?*()[\\]]/g, '[$&]')\n    : s.replace(/[?*()[\\]\\\\]/g, '\\\\$&')\n}\n"]}
\ No newline at end of file
diff --git a/node_modules/minimatch/dist/esm/index.d.ts b/node_modules/minimatch/dist/esm/index.d.ts
index 968eb143..7e1fc2ed 100644
--- a/node_modules/minimatch/dist/esm/index.d.ts
+++ b/node_modules/minimatch/dist/esm/index.d.ts
@@ -1,26 +1,104 @@
 import { AST } from './ast.js';
 export type Platform = 'aix' | 'android' | 'darwin' | 'freebsd' | 'haiku' | 'linux' | 'openbsd' | 'sunos' | 'win32' | 'cygwin' | 'netbsd';
 export interface MinimatchOptions {
+    /** do not expand `{x,y}` style braces */
     nobrace?: boolean;
+    /** do not treat patterns starting with `#` as a comment */
     nocomment?: boolean;
+    /** do not treat patterns starting with `!` as a negation */
     nonegate?: boolean;
+    /** print LOTS of debugging output */
     debug?: boolean;
+    /** treat `**` the same as `*` */
     noglobstar?: boolean;
+    /** do not expand extglobs like `+(a|b)` */
     noext?: boolean;
+    /** return the pattern if nothing matches */
     nonull?: boolean;
+    /** treat `\\` as a path separator, not an escape character */
     windowsPathsNoEscape?: boolean;
+    /**
+     * inverse of {@link MinimatchOptions.windowsPathsNoEscape}
+     * @deprecated
+     */
     allowWindowsEscape?: boolean;
+    /**
+     * Compare a partial path to a pattern. As long as the parts
+     * of the path that are present are not contradicted by the
+     * pattern, it will be treated as a match. This is useful in
+     * applications where you're walking through a folder structure,
+     * and don't yet have the full path, but want to ensure that you
+     * do not walk down paths that can never be a match.
+     */
     partial?: boolean;
+    /** allow matches that start with `.` even if the pattern does not */
     dot?: boolean;
+    /** ignore case */
     nocase?: boolean;
+    /** ignore case only in wildcard patterns */
     nocaseMagicOnly?: boolean;
+    /** consider braces to be "magic" for the purpose of `hasMagic` */
     magicalBraces?: boolean;
+    /**
+     * If set, then patterns without slashes will be matched
+     * against the basename of the path if it contains slashes.
+     * For example, `a?b` would match the path `/xyz/123/acb`, but
+     * not `/xyz/acb/123`.
+     */
     matchBase?: boolean;
+    /** invert the results of negated matches */
     flipNegate?: boolean;
+    /** do not collapse multiple `/` into a single `/` */
     preserveMultipleSlashes?: boolean;
+    /**
+     * A number indicating the level of optimization that should be done
+     * to the pattern prior to parsing and using it for matches.
+     */
     optimizationLevel?: number;
+    /** operating system platform */
     platform?: Platform;
+    /**
+     * When a pattern starts with a UNC path or drive letter, and in
+     * `nocase:true` mode, do not convert the root portions of the
+     * pattern into a case-insensitive regular expression, and instead
+     * leave them as strings.
+     *
+     * This is the default when the platform is `win32` and
+     * `nocase:true` is set.
+     */
     windowsNoMagicRoot?: boolean;
+    /**
+     * max number of `{...}` patterns to expand. Default 100_000.
+     */
+    braceExpandMax?: number;
+    /**
+     * Max number of non-adjacent `**` patterns to recursively walk down.
+     *
+     * The default of 200 is almost certainly high enough for most purposes,
+     * and can handle absurdly excessive patterns.
+     */
+    maxGlobstarRecursion?: number;
+    /**
+     * Max depth to traverse for nested extglobs like `*(a|b|c)`
+     *
+     * Default is 2, which is quite low, but any higher value
+     * swiftly results in punishing performance impacts. Note
+     * that this is *not*  relevant when the globstar types can
+     * be safely coalesced into a single set.
+     *
+     * For example, `*(a|@(b|c)|d)` would be flattened into
+     * `*(a|b|c|d)`. Thus, many common extglobs will retain good
+     * performance and  never hit this limit, even if they are
+     * excessively deep and complicated.
+     *
+     * If the limit is hit, then the extglob characters are simply
+     * not parsed, and the pattern effectively switches into
+     * `noextglob: true` mode for the contents of that nested
+     * sub-pattern. This will typically _not_ result in a match,
+     * but is considered a valid trade-off for security and
+     * performance.
+     */
+    maxExtglobRecursion?: number;
 }
 export declare const minimatch: {
     (p: string, pattern: string, options?: MinimatchOptions): boolean;
@@ -51,6 +129,7 @@ export type MMRegExp = RegExp & {
 export type ParseReturnFiltered = string | MMRegExp | typeof GLOBSTAR;
 export type ParseReturn = ParseReturnFiltered | false;
 export declare class Minimatch {
+    #private;
     options: MinimatchOptions;
     set: ParseReturnFiltered[][];
     pattern: string;
@@ -67,10 +146,11 @@ export declare class Minimatch {
     isWindows: boolean;
     platform: Platform;
     windowsNoMagicRoot: boolean;
+    maxGlobstarRecursion: number;
     regexp: false | null | MMRegExp;
     constructor(pattern: string, options?: MinimatchOptions);
     hasMagic(): boolean;
-    debug(..._: any[]): void;
+    debug(..._: unknown[]): void;
     make(): void;
     preprocess(globParts: string[][]): string[][];
     adjascentGlobstarOptimize(globParts: string[][]): string[][];
diff --git a/node_modules/minimatch/dist/esm/index.d.ts.map b/node_modules/minimatch/dist/esm/index.d.ts.map
index f241c28b..7620db91 100644
--- a/node_modules/minimatch/dist/esm/index.d.ts.map
+++ b/node_modules/minimatch/dist/esm/index.d.ts.map
@@ -1 +1 @@
-{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,GAAG,EAAe,MAAM,UAAU,CAAA;AAI3C,MAAM,MAAM,QAAQ,GAChB,KAAK,GACL,SAAS,GACT,QAAQ,GACR,SAAS,GACT,OAAO,GACP,OAAO,GACP,SAAS,GACT,OAAO,GACP,OAAO,GACP,QAAQ,GACR,QAAQ,CAAA;AAEZ,MAAM,WAAW,gBAAgB;IAC/B,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,GAAG,CAAC,EAAE,OAAO,CAAA;IACb,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,aAAa,CAA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
\ No newline at end of file
diff --git a/node_modules/minimatch/dist/esm/index.js b/node_modules/minimatch/dist/esm/index.js
index e83823fa..a5e6fa88 100644
--- a/node_modules/minimatch/dist/esm/index.js
+++ b/node_modules/minimatch/dist/esm/index.js
@@ -1,4 +1,4 @@
-import { expand } from '@isaacs/brace-expansion';
+import { expand } from 'brace-expansion';
 import { assertValidPattern } from './assert-valid-pattern.js';
 import { AST } from './ast.js';
 import { escape } from './escape.js';
@@ -12,7 +12,7 @@ export const minimatch = (p, pattern, options = {}) => {
     return new Minimatch(pattern, options).match(p);
 };
 // Optimized checking for the most common glob patterns.
-const starDotExtRE = /^\*+([^+@!?\*\[\(]*)$/;
+const starDotExtRE = /^\*+([^+@!?*[(]*)$/;
 const starDotExtTest = (ext) => (f) => !f.startsWith('.') && f.endsWith(ext);
 const starDotExtTestDot = (ext) => (f) => f.endsWith(ext);
 const starDotExtTestNocase = (ext) => {
@@ -31,7 +31,7 @@ const dotStarTest = (f) => f !== '.' && f !== '..' && f.startsWith('.');
 const starRE = /^\*+$/;
 const starTest = (f) => f.length !== 0 && !f.startsWith('.');
 const starTestDot = (f) => f.length !== 0 && f !== '.' && f !== '..';
-const qmarksRE = /^\?+([^+@!?\*\[\(]*)?$/;
+const qmarksRE = /^\?+([^+@!?*[(]*)?$/;
 const qmarksTestNocase = ([$0, ext = '']) => {
     const noext = qmarksTestNoExt([$0]);
     if (!ext)
@@ -63,8 +63,8 @@ const qmarksTestNoExtDot = ([$0]) => {
     return (f) => f.length === len && f !== '.' && f !== '..';
 };
 /* c8 ignore start */
-const defaultPlatform = (typeof process === 'object' && process
-    ? (typeof process.env === 'object' &&
+const defaultPlatform = (typeof process === 'object' && process ?
+    (typeof process.env === 'object' &&
         process.env &&
         process.env.__MINIMATCH_TESTING_PLATFORM__) ||
         process.platform
@@ -148,7 +148,7 @@ export const braceExpand = (pattern, options = {}) => {
         // shortcut. no need to expand.
         return [pattern];
     }
-    return expand(pattern);
+    return expand(pattern, { max: options.braceExpandMax });
 };
 minimatch.braceExpand = braceExpand;
 // parse a component of the expanded set.
@@ -193,16 +193,20 @@ export class Minimatch {
     isWindows;
     platform;
     windowsNoMagicRoot;
+    maxGlobstarRecursion;
     regexp;
     constructor(pattern, options = {}) {
         assertValidPattern(pattern);
         options = options || {};
         this.options = options;
+        this.maxGlobstarRecursion = options.maxGlobstarRecursion ?? 200;
         this.pattern = pattern;
         this.platform = options.platform || defaultPlatform;
         this.isWindows = this.platform === 'win32';
+        // avoid the annoying deprecation flag lol
+        const awe = ('allowWindow' + 'sEscape');
         this.windowsPathsNoEscape =
-            !!options.windowsPathsNoEscape || options.allowWindowsEscape === false;
+            !!options.windowsPathsNoEscape || options[awe] === false;
         if (this.windowsPathsNoEscape) {
             this.pattern = this.pattern.replace(/\\/g, '/');
         }
@@ -215,8 +219,8 @@ export class Minimatch {
         this.partial = !!options.partial;
         this.nocase = !!this.options.nocase;
         this.windowsNoMagicRoot =
-            options.windowsNoMagicRoot !== undefined
-                ? options.windowsNoMagicRoot
+            options.windowsNoMagicRoot !== undefined ?
+                options.windowsNoMagicRoot
                 : !!(this.isWindows && this.nocase);
         this.globSet = [];
         this.globParts = [];
@@ -254,6 +258,7 @@ export class Minimatch {
         // step 2: expand braces
         this.globSet = [...new Set(this.braceExpand())];
         if (options.debug) {
+            //oxlint-disable-next-line no-console
             this.debug = (...args) => console.error(...args);
         }
         this.debug(this.pattern, this.globSet);
@@ -279,7 +284,10 @@ export class Minimatch {
                     !globMagic.test(s[3]);
                 const isDrive = /^[a-z]:/i.test(s[0]);
                 if (isUNC) {
-                    return [...s.slice(0, 4), ...s.slice(4).map(ss => this.parse(ss))];
+                    return [
+                        ...s.slice(0, 4),
+                        ...s.slice(4).map(ss => this.parse(ss)),
+                    ];
                 }
                 else if (isDrive) {
                     return [s[0], ...s.slice(1).map(ss => this.parse(ss))];
@@ -311,12 +319,12 @@ export class Minimatch {
     // to the right as possible, even if it increases the number
     // of patterns that we have to process.
     preprocess(globParts) {
-        // if we're not in globstar mode, then turn all ** into *
+        // if we're not in globstar mode, then turn ** into *
         if (this.options.noglobstar) {
-            for (let i = 0; i < globParts.length; i++) {
-                for (let j = 0; j < globParts[i].length; j++) {
-                    if (globParts[i][j] === '**') {
-                        globParts[i][j] = '*';
+            for (const partset of globParts) {
+                for (let j = 0; j < partset.length; j++) {
+                    if (partset[j] === '**') {
+                        partset[j] = '*';
                     }
                 }
             }
@@ -404,7 +412,11 @@ export class Minimatch {
             let dd = 0;
             while (-1 !== (dd = parts.indexOf('..', dd + 1))) {
                 const p = parts[dd - 1];
-                if (p && p !== '.' && p !== '..' && p !== '**') {
+                if (p &&
+                    p !== '.' &&
+                    p !== '..' &&
+                    p !== '**' &&
+                    !(this.isWindows && /^[a-z]:$/i.test(p))) {
                     didSomething = true;
                     parts.splice(dd - 1, 2);
                     dd -= 2;
@@ -597,7 +609,8 @@ export class Minimatch {
     // out of pattern, then that's fine, as long as all
     // the parts match.
     matchOne(file, pattern, partial = false) {
-        const options = this.options;
+        let fileStartIndex = 0;
+        let patternStartIndex = 0;
         // UNC paths like //?/X:/... can match X:/... and vice versa
         // Drive letters in absolute drive or unc paths are always compared
         // case-insensitively.
@@ -615,18 +628,22 @@ export class Minimatch {
                 pattern[2] === '?' &&
                 typeof pattern[3] === 'string' &&
                 /^[a-z]:$/i.test(pattern[3]);
-            const fdi = fileUNC ? 3 : fileDrive ? 0 : undefined;
-            const pdi = patternUNC ? 3 : patternDrive ? 0 : undefined;
+            const fdi = fileUNC ? 3
+                : fileDrive ? 0
+                    : undefined;
+            const pdi = patternUNC ? 3
+                : patternDrive ? 0
+                    : undefined;
             if (typeof fdi === 'number' && typeof pdi === 'number') {
-                const [fd, pd] = [file[fdi], pattern[pdi]];
+                const [fd, pd] = [
+                    file[fdi],
+                    pattern[pdi],
+                ];
+                // start matching at the drive letter index of each
                 if (fd.toLowerCase() === pd.toLowerCase()) {
                     pattern[pdi] = fd;
-                    if (pdi > fdi) {
-                        pattern = pattern.slice(pdi);
-                    }
-                    else if (fdi > pdi) {
-                        file = file.slice(fdi);
-                    }
+                    patternStartIndex = pdi;
+                    fileStartIndex = fdi;
                 }
             }
         }
@@ -636,99 +653,187 @@ export class Minimatch {
         if (optimizationLevel >= 2) {
             file = this.levelTwoFileOptimize(file);
         }
-        this.debug('matchOne', this, { file, pattern });
-        this.debug('matchOne', file.length, pattern.length);
-        for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
+        if (pattern.includes(GLOBSTAR)) {
+            return this.#matchGlobstar(file, pattern, partial, fileStartIndex, patternStartIndex);
+        }
+        return this.#matchOne(file, pattern, partial, fileStartIndex, patternStartIndex);
+    }
+    #matchGlobstar(file, pattern, partial, fileIndex, patternIndex) {
+        // split the pattern into head, tail, and middle of ** delimited parts
+        const firstgs = pattern.indexOf(GLOBSTAR, patternIndex);
+        const lastgs = pattern.lastIndexOf(GLOBSTAR);
+        // split the pattern up into globstar-delimited sections
+        // the tail has to be at the end, and the others just have
+        // to be found in order from the head.
+        const [head, body, tail] = partial ?
+            [
+                pattern.slice(patternIndex, firstgs),
+                pattern.slice(firstgs + 1),
+                [],
+            ]
+            : [
+                pattern.slice(patternIndex, firstgs),
+                pattern.slice(firstgs + 1, lastgs),
+                pattern.slice(lastgs + 1),
+            ];
+        // check the head, from the current file/pattern index.
+        if (head.length) {
+            const fileHead = file.slice(fileIndex, fileIndex + head.length);
+            if (!this.#matchOne(fileHead, head, partial, 0, 0)) {
+                return false;
+            }
+            fileIndex += head.length;
+            patternIndex += head.length;
+        }
+        // now we know the head matches!
+        // if the last portion is not empty, it MUST match the end
+        // check the tail
+        let fileTailMatch = 0;
+        if (tail.length) {
+            // if head + tail > file, then we cannot possibly match
+            if (tail.length + fileIndex > file.length)
+                return false;
+            // try to match the tail
+            let tailStart = file.length - tail.length;
+            if (this.#matchOne(file, tail, partial, tailStart, 0)) {
+                fileTailMatch = tail.length;
+            }
+            else {
+                // affordance for stuff like a/**/* matching a/b/
+                // if the last file portion is '', and there's more to the pattern
+                // then try without the '' bit.
+                if (file[file.length - 1] !== '' ||
+                    fileIndex + tail.length === file.length) {
+                    return false;
+                }
+                tailStart--;
+                if (!this.#matchOne(file, tail, partial, tailStart, 0)) {
+                    return false;
+                }
+                fileTailMatch = tail.length + 1;
+            }
+        }
+        // now we know the tail matches!
+        // the middle is zero or more portions wrapped in **, possibly
+        // containing more ** sections.
+        // so a/**/b/**/c/**/d has become **/b/**/c/**
+        // if it's empty, it means a/**/b, just verify we have no bad dots
+        // if there's no tail, so it ends on /**, then we must have *something*
+        // after the head, or it's not a matc
+        if (!body.length) {
+            let sawSome = !!fileTailMatch;
+            for (let i = fileIndex; i < file.length - fileTailMatch; i++) {
+                const f = String(file[i]);
+                sawSome = true;
+                if (f === '.' ||
+                    f === '..' ||
+                    (!this.options.dot && f.startsWith('.'))) {
+                    return false;
+                }
+            }
+            // in partial mode, we just need to get past all file parts
+            return partial || sawSome;
+        }
+        // now we know that there's one or more body sections, which can
+        // be matched anywhere from the 0 index (because the head was pruned)
+        // through to the length-fileTailMatch index.
+        // split the body up into sections, and note the minimum index it can
+        // be found at (start with the length of all previous segments)
+        // [section, before, after]
+        const bodySegments = [[[], 0]];
+        let currentBody = bodySegments[0];
+        let nonGsParts = 0;
+        const nonGsPartsSums = [0];
+        for (const b of body) {
+            if (b === GLOBSTAR) {
+                nonGsPartsSums.push(nonGsParts);
+                currentBody = [[], 0];
+                bodySegments.push(currentBody);
+            }
+            else {
+                currentBody[0].push(b);
+                nonGsParts++;
+            }
+        }
+        let i = bodySegments.length - 1;
+        const fileLength = file.length - fileTailMatch;
+        for (const b of bodySegments) {
+            b[1] = fileLength - (nonGsPartsSums[i--] + b[0].length);
+        }
+        return !!this.#matchGlobStarBodySections(file, bodySegments, fileIndex, 0, partial, 0, !!fileTailMatch);
+    }
+    // return false for "nope, not matching"
+    // return null for "not matching, cannot keep trying"
+    #matchGlobStarBodySections(file, 
+    // pattern section, last possible position for it
+    bodySegments, fileIndex, bodyIndex, partial, globStarDepth, sawTail) {
+        // take the first body segment, and walk from fileIndex to its "after"
+        // value at the end
+        // If it doesn't match at that position, we increment, until we hit
+        // that final possible position, and give up.
+        // If it does match, then advance and try to rest.
+        // If any of them fail we keep walking forward.
+        // this is still a bit recursively painful, but it's more constrained
+        // than previous implementations, because we never test something that
+        // can't possibly be a valid matching condition.
+        const bs = bodySegments[bodyIndex];
+        if (!bs) {
+            // just make sure that there's no bad dots
+            for (let i = fileIndex; i < file.length; i++) {
+                sawTail = true;
+                const f = file[i];
+                if (f === '.' ||
+                    f === '..' ||
+                    (!this.options.dot && f.startsWith('.'))) {
+                    return false;
+                }
+            }
+            return sawTail;
+        }
+        // have a non-globstar body section to test
+        const [body, after] = bs;
+        while (fileIndex <= after) {
+            const m = this.#matchOne(file.slice(0, fileIndex + body.length), body, partial, fileIndex, 0);
+            // if limit exceeded, no match. intentional false negative,
+            // acceptable break in correctness for security.
+            if (m && globStarDepth < this.maxGlobstarRecursion) {
+                // match! see if the rest match. if so, we're done!
+                const sub = this.#matchGlobStarBodySections(file, bodySegments, fileIndex + body.length, bodyIndex + 1, partial, globStarDepth + 1, sawTail);
+                if (sub !== false) {
+                    return sub;
+                }
+            }
+            const f = file[fileIndex];
+            if (f === '.' ||
+                f === '..' ||
+                (!this.options.dot && f.startsWith('.'))) {
+                return false;
+            }
+            fileIndex++;
+        }
+        // walked off. no point continuing
+        return partial || null;
+    }
+    #matchOne(file, pattern, partial, fileIndex, patternIndex) {
+        let fi;
+        let pi;
+        let pl;
+        let fl;
+        for (fi = fileIndex,
+            pi = patternIndex,
+            fl = file.length,
+            pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
             this.debug('matchOne loop');
-            var p = pattern[pi];
-            var f = file[fi];
+            let p = pattern[pi];
+            let f = file[fi];
             this.debug(pattern, p, f);
             // should be impossible.
             // some invalid regexp stuff in the set.
             /* c8 ignore start */
-            if (p === false) {
+            if (p === false || p === GLOBSTAR) {
                 return false;
             }
             /* c8 ignore stop */
-            if (p === GLOBSTAR) {
-                this.debug('GLOBSTAR', [pattern, p, f]);
-                // "**"
-                // a/**/b/**/c would match the following:
-                // a/b/x/y/z/c
-                // a/x/y/z/b/c
-                // a/b/x/b/x/c
-                // a/b/c
-                // To do this, take the rest of the pattern after
-                // the **, and see if it would match the file remainder.
-                // If so, return success.
-                // If not, the ** "swallows" a segment, and try again.
-                // This is recursively awful.
-                //
-                // a/**/b/**/c matching a/b/x/y/z/c
-                // - a matches a
-                // - doublestar
-                //   - matchOne(b/x/y/z/c, b/**/c)
-                //     - b matches b
-                //     - doublestar
-                //       - matchOne(x/y/z/c, c) -> no
-                //       - matchOne(y/z/c, c) -> no
-                //       - matchOne(z/c, c) -> no
-                //       - matchOne(c, c) yes, hit
-                var fr = fi;
-                var pr = pi + 1;
-                if (pr === pl) {
-                    this.debug('** at the end');
-                    // a ** at the end will just swallow the rest.
-                    // We have found a match.
-                    // however, it will not swallow /.x, unless
-                    // options.dot is set.
-                    // . and .. are *never* matched by **, for explosively
-                    // exponential reasons.
-                    for (; fi < fl; fi++) {
-                        if (file[fi] === '.' ||
-                            file[fi] === '..' ||
-                            (!options.dot && file[fi].charAt(0) === '.'))
-                            return false;
-                    }
-                    return true;
-                }
-                // ok, let's see if we can swallow whatever we can.
-                while (fr < fl) {
-                    var swallowee = file[fr];
-                    this.debug('\nglobstar while', file, fr, pattern, pr, swallowee);
-                    // XXX remove this slice.  Just pass the start index.
-                    if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
-                        this.debug('globstar found match!', fr, fl, swallowee);
-                        // found a match.
-                        return true;
-                    }
-                    else {
-                        // can't swallow "." or ".." ever.
-                        // can only swallow ".foo" when explicitly asked.
-                        if (swallowee === '.' ||
-                            swallowee === '..' ||
-                            (!options.dot && swallowee.charAt(0) === '.')) {
-                            this.debug('dot detected!', file, fr, pattern, pr);
-                            break;
-                        }
-                        // ** swallows a segment, and continue.
-                        this.debug('globstar swallow a segment, and continue');
-                        fr++;
-                    }
-                }
-                // no match was found.
-                // However, in partial mode, we can't say this is necessarily over.
-                /* c8 ignore start */
-                if (partial) {
-                    // ran out of file
-                    this.debug('\n>>> no match, partial?', file, fr, pattern, pr);
-                    if (fr === fl) {
-                        return true;
-                    }
-                }
-                /* c8 ignore stop */
-                return false;
-            }
             // something other than **
             // non-magic patterns just have to match exactly
             // patterns with magic have been turned into regexps.
@@ -799,21 +904,19 @@ export class Minimatch {
             fastTest = options.dot ? starTestDot : starTest;
         }
         else if ((m = pattern.match(starDotExtRE))) {
-            fastTest = (options.nocase
-                ? options.dot
-                    ? starDotExtTestNocaseDot
+            fastTest = (options.nocase ?
+                options.dot ?
+                    starDotExtTestNocaseDot
                     : starDotExtTestNocase
-                : options.dot
-                    ? starDotExtTestDot
+                : options.dot ? starDotExtTestDot
                     : starDotExtTest)(m[1]);
         }
         else if ((m = pattern.match(qmarksRE))) {
-            fastTest = (options.nocase
-                ? options.dot
-                    ? qmarksTestNocaseDot
+            fastTest = (options.nocase ?
+                options.dot ?
+                    qmarksTestNocaseDot
                     : qmarksTestNocase
-                : options.dot
-                    ? qmarksTestDot
+                : options.dot ? qmarksTestDot
                     : qmarksTest)(m);
         }
         else if ((m = pattern.match(starDotStarRE))) {
@@ -844,10 +947,8 @@ export class Minimatch {
             return this.regexp;
         }
         const options = this.options;
-        const twoStar = options.noglobstar
-            ? star
-            : options.dot
-                ? twoStarDot
+        const twoStar = options.noglobstar ? star
+            : options.dot ? twoStarDot
                 : twoStarNoDot;
         const flags = new Set(options.nocase ? ['i'] : []);
         // regexpify non-globstar patterns
@@ -863,11 +964,9 @@ export class Minimatch {
                     for (const f of p.flags.split(''))
                         flags.add(f);
                 }
-                return typeof p === 'string'
-                    ? regExpEscape(p)
-                    : p === GLOBSTAR
-                        ? GLOBSTAR
-                        : p._src;
+                return (typeof p === 'string' ? regExpEscape(p)
+                    : p === GLOBSTAR ? GLOBSTAR
+                        : p._src);
             });
             pp.forEach((p, i) => {
                 const next = pp[i + 1];
@@ -922,7 +1021,7 @@ export class Minimatch {
             this.regexp = new RegExp(re, [...flags].join(''));
             /* c8 ignore start */
         }
-        catch (ex) {
+        catch {
             // should be impossible
             this.regexp = false;
         }
@@ -937,7 +1036,7 @@ export class Minimatch {
         if (this.preserveMultipleSlashes) {
             return p.split('/');
         }
-        else if (this.isWindows && /^\/\/[^\/]+/.test(p)) {
+        else if (this.isWindows && /^\/\/[^/]+/.test(p)) {
             // add an extra '' for the one we lose
             return ['', ...p.split(/\/+/)];
         }
@@ -979,8 +1078,7 @@ export class Minimatch {
                 filename = ff[i];
             }
         }
-        for (let i = 0; i < set.length; i++) {
-            const pattern = set[i];
+        for (const pattern of set) {
             let file = ff;
             if (options.matchBase && pattern.length === 1) {
                 file = [filename];
diff --git a/node_modules/minimatch/dist/esm/index.js.map b/node_modules/minimatch/dist/esm/index.js.map
index bbbc70e0..431b3a15 100644
--- a/node_modules/minimatch/dist/esm/index.js.map
+++ b/node_modules/minimatch/dist/esm/index.js.map
@@ -1 +1 @@
-{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAA;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAC9D,OAAO,EAAE,GAAG,EAAe,MAAM,UAAU,CAAA;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAsCxC,MAAM,CAAC,MAAM,SAAS,GAAG,CACvB,CAAS,EACT,OAAe,EACf,UAA4B,EAAE,EAC9B,EAAE;IACF,kBAAkB,CAAC,OAAO,CAAC,CAAA;IAE3B,oCAAoC;IACpC,IAAI,CAAC,OAAO,CAAC,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE,CAAC;QACpD,OAAO,KAAK,CAAA;IACd,CAAC;IAED,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SAAS,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBAC9C,IAAI,GAAG,CAAC,QAAQ,CAAC,CAAA;YACnB,CAAC;YACD,MAAM,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,CAAA;YACjD,IAAI,GAAG,EAAE,CAAC;gBACR,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC;oBACvB,OAAO,IAAI,CAAA;gBACb,CAAC;gBACD,OAAO,CAAC,IAAI,CAAC,MAAM,CAAA;YACrB,CAAC;QACH,CAAC;QAED,2DAA2D;QAC3D,8BAA8B;QAC9B,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC;YACvB,OAAO,KAAK,CAAA;QACd,CAAC;QACD,OAAO,IAAI,CAAC,MAAM,CAAA;IACpB,CAAC;IAED,MAAM,CAAC,QAAQ,CAAC,GAAqB;QACnC,OAAO,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,SAAS,CAAA;IAC1C,CAAC;CACF;AACD,qBAAqB;AACrB,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAC9B,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACxC,oBAAoB;AACpB,SAAS,CAAC,GAAG,GAAG,GAAG,CAAA;AACnB,SAAS,CAAC,SAAS,GAAG,SAAS,CAAA;AAC/B,SAAS,CAAC,MAAM,GAAG,MAAM,CAAA;AACzB,SAAS,CAAC,QAAQ,GAAG,QAAQ,CAAA","sourcesContent":["import { expand } from '@isaacs/brace-expansion'\nimport { assertValidPattern } from './assert-valid-pattern.js'\nimport { AST, ExtglobType } from './ast.js'\nimport { escape } from './escape.js'\nimport { unescape } from './unescape.js'\n\nexport type Platform =\n  | 'aix'\n  | 'android'\n  | 'darwin'\n  | 'freebsd'\n  | 'haiku'\n  | 'linux'\n  | 'openbsd'\n  | 'sunos'\n  | 'win32'\n  | 'cygwin'\n  | 'netbsd'\n\nexport interface MinimatchOptions {\n  nobrace?: boolean\n  nocomment?: boolean\n  nonegate?: boolean\n  debug?: boolean\n  noglobstar?: boolean\n  noext?: boolean\n  nonull?: boolean\n  windowsPathsNoEscape?: boolean\n  allowWindowsEscape?: boolean\n  partial?: boolean\n  dot?: boolean\n  nocase?: boolean\n  nocaseMagicOnly?: boolean\n  magicalBraces?: boolean\n  matchBase?: boolean\n  flipNegate?: boolean\n  preserveMultipleSlashes?: boolean\n  optimizationLevel?: number\n  platform?: Platform\n  windowsNoMagicRoot?: boolean\n}\n\nexport const minimatch = (\n  p: string,\n  pattern: string,\n  options: MinimatchOptions = {},\n) => {\n  assertValidPattern(pattern)\n\n  // shortcut: comments match nothing.\n  if (!options.nocomment && pattern.charAt(0) === '#') {\n    return false\n  }\n\n  return new Minimatch(pattern, options).match(p)\n}\n\n// Optimized checking for the most common glob patterns.\nconst starDotExtRE = /^\\*+([^+@!?\\*\\[\\(]*)$/\nconst starDotExtTest = (ext: string) => (f: string) =>\n  !f.startsWith('.') && f.endsWith(ext)\nconst starDotExtTestDot = (ext: string) => (f: string) => f.endsWith(ext)\nconst starDotExtTestNocase = (ext: string) => {\n  ext = ext.toLowerCase()\n  return (f: string) => !f.startsWith('.') && f.toLowerCase().endsWith(ext)\n}\nconst starDotExtTestNocaseDot = (ext: string) => {\n  ext = ext.toLowerCase()\n  return (f: string) => f.toLowerCase().endsWith(ext)\n}\nconst starDotStarRE = /^\\*+\\.\\*+$/\nconst starDotStarTest = (f: string) => !f.startsWith('.') && f.includes('.')\nconst starDotStarTestDot = (f: string) =>\n  f !== '.' && f !== '..' && f.includes('.')\nconst dotStarRE = /^\\.\\*+$/\nconst dotStarTest = (f: string) => f !== '.' && f !== '..' && f.startsWith('.')\nconst starRE = /^\\*+$/\nconst starTest = (f: string) => f.length !== 0 && !f.startsWith('.')\nconst starTestDot = (f: string) => f.length !== 0 && f !== '.' && f !== '..'\nconst qmarksRE = /^\\?+([^+@!?\\*\\[\\(]*)?$/\nconst qmarksTestNocase = ([$0, ext = '']: RegExpMatchArray) => {\n  const noext = qmarksTestNoExt([$0])\n  if (!ext) return noext\n  ext = ext.toLowerCase()\n  return (f: string) => noext(f) && f.toLowerCase().endsWith(ext)\n}\nconst qmarksTestNocaseDot = ([$0, ext = '']: RegExpMatchArray) => {\n  const noext = qmarksTestNoExtDot([$0])\n  if (!ext) return noext\n  ext = ext.toLowerCase()\n  return (f: string) => noext(f) && f.toLowerCase().endsWith(ext)\n}\nconst qmarksTestDot = ([$0, ext = '']: RegExpMatchArray) => {\n  const noext = qmarksTestNoExtDot([$0])\n  return !ext ? noext : (f: string) => noext(f) && f.endsWith(ext)\n}\nconst qmarksTest = ([$0, ext = '']: RegExpMatchArray) => {\n  const noext = qmarksTestNoExt([$0])\n  return !ext ? noext : (f: string) => noext(f) && f.endsWith(ext)\n}\nconst qmarksTestNoExt = ([$0]: RegExpMatchArray) => {\n  const len = $0.length\n  return (f: string) => f.length === len && !f.startsWith('.')\n}\nconst qmarksTestNoExtDot = ([$0]: RegExpMatchArray) => {\n  const len = $0.length\n  return (f: string) => f.length === len && f !== '.' && f !== '..'\n}\n\n/* c8 ignore start */\nconst defaultPlatform: Platform = (\n  typeof process === 'object' && process\n    ? (typeof process.env === 'object' &&\n        process.env &&\n        process.env.__MINIMATCH_TESTING_PLATFORM__) ||\n      process.platform\n    : 'posix'\n) as Platform\n\nexport type Sep = '\\\\' | '/'\n\nconst path: { [k: string]: { sep: Sep } } = {\n  win32: { sep: '\\\\' },\n  posix: { sep: '/' },\n}\n/* c8 ignore stop */\n\nexport const sep = defaultPlatform === 'win32' ? path.win32.sep : path.posix.sep\nminimatch.sep = sep\n\nexport const GLOBSTAR = Symbol('globstar **')\nminimatch.GLOBSTAR = GLOBSTAR\n\n// any single thing other than /\n// don't need to escape / when using new RegExp()\nconst qmark = '[^/]'\n\n// * => any number of characters\nconst star = qmark + '*?'\n\n// ** when dots are allowed.  Anything goes, except .. and .\n// not (^ or / followed by one or two dots followed by $ or /),\n// followed by anything, any number of times.\nconst twoStarDot = '(?:(?!(?:\\\\/|^)(?:\\\\.{1,2})($|\\\\/)).)*?'\n\n// not a ^ or / followed by a dot,\n// followed by anything, any number of times.\nconst twoStarNoDot = '(?:(?!(?:\\\\/|^)\\\\.).)*?'\n\nexport const filter =\n  (pattern: string, options: MinimatchOptions = {}) =>\n  (p: string) =>\n    minimatch(p, pattern, options)\nminimatch.filter = filter\n\nconst ext = (a: MinimatchOptions, b: MinimatchOptions = {}) =>\n  Object.assign({}, a, b)\n\nexport const defaults = (def: MinimatchOptions): typeof minimatch => {\n  if (!def || typeof def !== 'object' || !Object.keys(def).length) {\n    return minimatch\n  }\n\n  const orig = minimatch\n\n  const m = (p: string, pattern: string, options: MinimatchOptions = {}) =>\n    orig(p, pattern, ext(def, options))\n\n  return Object.assign(m, {\n    Minimatch: class Minimatch extends orig.Minimatch {\n      constructor(pattern: string, options: MinimatchOptions = {}) {\n        super(pattern, ext(def, options))\n      }\n      static defaults(options: MinimatchOptions) {\n        return orig.defaults(ext(def, options)).Minimatch\n      }\n    },\n\n    AST: class AST extends orig.AST {\n      /* c8 ignore start */\n      constructor(\n        type: ExtglobType | null,\n        parent?: AST,\n        options: MinimatchOptions = {},\n      ) {\n        super(type, parent, ext(def, options))\n      }\n      /* c8 ignore stop */\n\n      static fromGlob(pattern: string, options: MinimatchOptions = {}) {\n        return orig.AST.fromGlob(pattern, ext(def, options))\n      }\n    },\n\n    unescape: (\n      s: string,\n      options: Pick<\n        MinimatchOptions,\n        'windowsPathsNoEscape' | 'magicalBraces'\n      > = {},\n    ) => orig.unescape(s, ext(def, options)),\n\n    escape: (\n      s: string,\n      options: Pick<\n        MinimatchOptions,\n        'windowsPathsNoEscape' | 'magicalBraces'\n      > = {},\n    ) => orig.escape(s, ext(def, options)),\n\n    filter: (pattern: string, options: MinimatchOptions = {}) =>\n      orig.filter(pattern, ext(def, options)),\n\n    defaults: (options: MinimatchOptions) => orig.defaults(ext(def, options)),\n\n    makeRe: (pattern: string, options: MinimatchOptions = {}) =>\n      orig.makeRe(pattern, ext(def, options)),\n\n    braceExpand: (pattern: string, options: MinimatchOptions = {}) =>\n      orig.braceExpand(pattern, ext(def, options)),\n\n    match: (list: string[], pattern: string, options: MinimatchOptions = {}) =>\n      orig.match(list, pattern, ext(def, options)),\n\n    sep: orig.sep,\n    GLOBSTAR: GLOBSTAR as typeof GLOBSTAR,\n  })\n}\nminimatch.defaults = defaults\n\n// Brace expansion:\n// a{b,c}d -> abd acd\n// a{b,}c -> abc ac\n// a{0..3}d -> a0d a1d a2d a3d\n// a{b,c{d,e}f}g -> abg acdfg acefg\n// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg\n//\n// Invalid sets are not expanded.\n// a{2..}b -> a{2..}b\n// a{b}c -> a{b}c\nexport const braceExpand = (\n  pattern: string,\n  options: MinimatchOptions = {},\n) => {\n  assertValidPattern(pattern)\n\n  // Thanks to Yeting Li  for\n  // improving this regexp to avoid a ReDOS vulnerability.\n  if (options.nobrace || !/\\{(?:(?!\\{).)*\\}/.test(pattern)) {\n    // shortcut. no need to expand.\n    return [pattern]\n  }\n\n  return expand(pattern)\n}\nminimatch.braceExpand = braceExpand\n\n// parse a component of the expanded set.\n// At this point, no pattern may contain \"/\" in it\n// so we're going to return a 2d array, where each entry is the full\n// pattern, split on '/', and then turned into a regular expression.\n// A regexp is made at the end which joins each array with an\n// escaped /, and another full one which joins each regexp with |.\n//\n// Following the lead of Bash 4.1, note that \"**\" only has special meaning\n// when it is the *only* thing in a path portion.  Otherwise, any series\n// of * is equivalent to a single *.  Globstar behavior is enabled by\n// default, and can be disabled by setting options.noglobstar.\n\nexport const makeRe = (pattern: string, options: MinimatchOptions = {}) =>\n  new Minimatch(pattern, options).makeRe()\nminimatch.makeRe = makeRe\n\nexport const match = (\n  list: string[],\n  pattern: string,\n  options: MinimatchOptions = {},\n) => {\n  const mm = new Minimatch(pattern, options)\n  list = list.filter(f => mm.match(f))\n  if (mm.options.nonull && !list.length) {\n    list.push(pattern)\n  }\n  return list\n}\nminimatch.match = match\n\n// replace stuff like \\* with *\nconst globMagic = /[?*]|[+@!]\\(.*?\\)|\\[|\\]/\nconst regExpEscape = (s: string) =>\n  s.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&')\n\nexport type MMRegExp = RegExp & {\n  _src?: string\n  _glob?: string\n}\n\nexport type ParseReturnFiltered = string | MMRegExp | typeof GLOBSTAR\nexport type ParseReturn = ParseReturnFiltered | false\n\nexport class Minimatch {\n  options: MinimatchOptions\n  set: ParseReturnFiltered[][]\n  pattern: string\n\n  windowsPathsNoEscape: boolean\n  nonegate: boolean\n  negate: boolean\n  comment: boolean\n  empty: boolean\n  preserveMultipleSlashes: boolean\n  partial: boolean\n  globSet: string[]\n  globParts: string[][]\n  nocase: boolean\n\n  isWindows: boolean\n  platform: Platform\n  windowsNoMagicRoot: boolean\n\n  regexp: false | null | MMRegExp\n  constructor(pattern: string, options: MinimatchOptions = {}) {\n    assertValidPattern(pattern)\n\n    options = options || {}\n    this.options = options\n    this.pattern = pattern\n    this.platform = options.platform || defaultPlatform\n    this.isWindows = this.platform === 'win32'\n    this.windowsPathsNoEscape =\n      !!options.windowsPathsNoEscape || options.allowWindowsEscape === false\n    if (this.windowsPathsNoEscape) {\n      this.pattern = this.pattern.replace(/\\\\/g, '/')\n    }\n    this.preserveMultipleSlashes = !!options.preserveMultipleSlashes\n    this.regexp = null\n    this.negate = false\n    this.nonegate = !!options.nonegate\n    this.comment = false\n    this.empty = false\n    this.partial = !!options.partial\n    this.nocase = !!this.options.nocase\n    this.windowsNoMagicRoot =\n      options.windowsNoMagicRoot !== undefined\n        ? options.windowsNoMagicRoot\n        : !!(this.isWindows && this.nocase)\n\n    this.globSet = []\n    this.globParts = []\n    this.set = []\n\n    // make the set of regexps etc.\n    this.make()\n  }\n\n  hasMagic(): boolean {\n    if (this.options.magicalBraces && this.set.length > 1) {\n      return true\n    }\n    for (const pattern of this.set) {\n      for (const part of pattern) {\n        if (typeof part !== 'string') return true\n      }\n    }\n    return false\n  }\n\n  debug(..._: any[]) {}\n\n  make() {\n    const pattern = this.pattern\n    const options = this.options\n\n    // empty patterns and comments match nothing.\n    if (!options.nocomment && pattern.charAt(0) === '#') {\n      this.comment = true\n      return\n    }\n\n    if (!pattern) {\n      this.empty = true\n      return\n    }\n\n    // step 1: figure out negation, etc.\n    this.parseNegate()\n\n    // step 2: expand braces\n    this.globSet = [...new Set(this.braceExpand())]\n\n    if (options.debug) {\n      this.debug = (...args: any[]) => console.error(...args)\n    }\n\n    this.debug(this.pattern, this.globSet)\n\n    // step 3: now we have a set, so turn each one into a series of\n    // path-portion matching patterns.\n    // These will be regexps, except in the case of \"**\", which is\n    // set to the GLOBSTAR object for globstar behavior,\n    // and will not contain any / characters\n    //\n    // First, we preprocess to make the glob pattern sets a bit simpler\n    // and deduped.  There are some perf-killing patterns that can cause\n    // problems with a glob walk, but we can simplify them down a bit.\n    const rawGlobParts = this.globSet.map(s => this.slashSplit(s))\n    this.globParts = this.preprocess(rawGlobParts)\n    this.debug(this.pattern, this.globParts)\n\n    // glob --> regexps\n    let set = this.globParts.map((s, _, __) => {\n      if (this.isWindows && this.windowsNoMagicRoot) {\n        // check if it's a drive or unc path.\n        const isUNC =\n          s[0] === '' &&\n          s[1] === '' &&\n          (s[2] === '?' || !globMagic.test(s[2])) &&\n          !globMagic.test(s[3])\n        const isDrive = /^[a-z]:/i.test(s[0])\n        if (isUNC) {\n          return [...s.slice(0, 4), ...s.slice(4).map(ss => this.parse(ss))]\n        } else if (isDrive) {\n          return [s[0], ...s.slice(1).map(ss => this.parse(ss))]\n        }\n      }\n      return s.map(ss => this.parse(ss))\n    })\n\n    this.debug(this.pattern, set)\n\n    // filter out everything that didn't compile properly.\n    this.set = set.filter(\n      s => s.indexOf(false) === -1,\n    ) as ParseReturnFiltered[][]\n\n    // do not treat the ? in UNC paths as magic\n    if (this.isWindows) {\n      for (let i = 0; i < this.set.length; i++) {\n        const p = this.set[i]\n        if (\n          p[0] === '' &&\n          p[1] === '' &&\n          this.globParts[i][2] === '?' &&\n          typeof p[3] === 'string' &&\n          /^[a-z]:$/i.test(p[3])\n        ) {\n          p[2] = '?'\n        }\n      }\n    }\n\n    this.debug(this.pattern, this.set)\n  }\n\n  // various transforms to equivalent pattern sets that are\n  // faster to process in a filesystem walk.  The goal is to\n  // eliminate what we can, and push all ** patterns as far\n  // to the right as possible, even if it increases the number\n  // of patterns that we have to process.\n  preprocess(globParts: string[][]) {\n    // if we're not in globstar mode, then turn all ** into *\n    if (this.options.noglobstar) {\n      for (let i = 0; i < globParts.length; i++) {\n        for (let j = 0; j < globParts[i].length; j++) {\n          if (globParts[i][j] === '**') {\n            globParts[i][j] = '*'\n          }\n        }\n      }\n    }\n\n    const { optimizationLevel = 1 } = this.options\n\n    if (optimizationLevel >= 2) {\n      // aggressive optimization for the purpose of fs walking\n      globParts = this.firstPhasePreProcess(globParts)\n      globParts = this.secondPhasePreProcess(globParts)\n    } else if (optimizationLevel >= 1) {\n      // just basic optimizations to remove some .. parts\n      globParts = this.levelOneOptimize(globParts)\n    } else {\n      // just collapse multiple ** portions into one\n      globParts = this.adjascentGlobstarOptimize(globParts)\n    }\n\n    return globParts\n  }\n\n  // just get rid of adjascent ** portions\n  adjascentGlobstarOptimize(globParts: string[][]) {\n    return globParts.map(parts => {\n      let gs: number = -1\n      while (-1 !== (gs = parts.indexOf('**', gs + 1))) {\n        let i = gs\n        while (parts[i + 1] === '**') {\n          i++\n        }\n        if (i !== gs) {\n          parts.splice(gs, i - gs)\n        }\n      }\n      return parts\n    })\n  }\n\n  // get rid of adjascent ** and resolve .. portions\n  levelOneOptimize(globParts: string[][]) {\n    return globParts.map(parts => {\n      parts = parts.reduce((set: string[], part) => {\n        const prev = set[set.length - 1]\n        if (part === '**' && prev === '**') {\n          return set\n        }\n        if (part === '..') {\n          if (prev && prev !== '..' && prev !== '.' && prev !== '**') {\n            set.pop()\n            return set\n          }\n        }\n        set.push(part)\n        return set\n      }, [])\n      return parts.length === 0 ? [''] : parts\n    })\n  }\n\n  levelTwoFileOptimize(parts: string | string[]) {\n    if (!Array.isArray(parts)) {\n      parts = this.slashSplit(parts)\n    }\n    let didSomething: boolean = false\n    do {\n      didSomething = false\n      // 
// -> 
/\n      if (!this.preserveMultipleSlashes) {\n        for (let i = 1; i < parts.length - 1; i++) {\n          const p = parts[i]\n          // don't squeeze out UNC patterns\n          if (i === 1 && p === '' && parts[0] === '') continue\n          if (p === '.' || p === '') {\n            didSomething = true\n            parts.splice(i, 1)\n            i--\n          }\n        }\n        if (\n          parts[0] === '.' &&\n          parts.length === 2 &&\n          (parts[1] === '.' || parts[1] === '')\n        ) {\n          didSomething = true\n          parts.pop()\n        }\n      }\n\n      // 
/

/../ ->

/\n      let dd: number = 0\n      while (-1 !== (dd = parts.indexOf('..', dd + 1))) {\n        const p = parts[dd - 1]\n        if (p && p !== '.' && p !== '..' && p !== '**') {\n          didSomething = true\n          parts.splice(dd - 1, 2)\n          dd -= 2\n        }\n      }\n    } while (didSomething)\n    return parts.length === 0 ? [''] : parts\n  }\n\n  // First phase: single-pattern processing\n  // 
 is 1 or more portions\n  //  is 1 or more portions\n  // 

is any portion other than ., .., '', or **\n // is . or ''\n //\n // **/.. is *brutal* for filesystem walking performance, because\n // it effectively resets the recursive walk each time it occurs,\n // and ** cannot be reduced out by a .. pattern part like a regexp\n // or most strings (other than .., ., and '') can be.\n //\n //

/**/../

/

/ -> {

/../

/

/,

/**/

/

/}\n //

// -> 
/\n  // 
/

/../ ->

/\n  // **/**/ -> **/\n  //\n  // **/*/ -> */**/ <== not valid because ** doesn't follow\n  // this WOULD be allowed if ** did follow symlinks, or * didn't\n  firstPhasePreProcess(globParts: string[][]) {\n    let didSomething = false\n    do {\n      didSomething = false\n      // 
/**/../

/

/ -> {

/../

/

/,

/**/

/

/}\n for (let parts of globParts) {\n let gs: number = -1\n while (-1 !== (gs = parts.indexOf('**', gs + 1))) {\n let gss: number = gs\n while (parts[gss + 1] === '**') {\n //

/**/**/ -> 
/**/\n            gss++\n          }\n          // eg, if gs is 2 and gss is 4, that means we have 3 **\n          // parts, and can remove 2 of them.\n          if (gss > gs) {\n            parts.splice(gs + 1, gss - gs)\n          }\n\n          let next = parts[gs + 1]\n          const p = parts[gs + 2]\n          const p2 = parts[gs + 3]\n          if (next !== '..') continue\n          if (\n            !p ||\n            p === '.' ||\n            p === '..' ||\n            !p2 ||\n            p2 === '.' ||\n            p2 === '..'\n          ) {\n            continue\n          }\n          didSomething = true\n          // edit parts in place, and push the new one\n          parts.splice(gs, 1)\n          const other = parts.slice(0)\n          other[gs] = '**'\n          globParts.push(other)\n          gs--\n        }\n\n        // 
// -> 
/\n        if (!this.preserveMultipleSlashes) {\n          for (let i = 1; i < parts.length - 1; i++) {\n            const p = parts[i]\n            // don't squeeze out UNC patterns\n            if (i === 1 && p === '' && parts[0] === '') continue\n            if (p === '.' || p === '') {\n              didSomething = true\n              parts.splice(i, 1)\n              i--\n            }\n          }\n          if (\n            parts[0] === '.' &&\n            parts.length === 2 &&\n            (parts[1] === '.' || parts[1] === '')\n          ) {\n            didSomething = true\n            parts.pop()\n          }\n        }\n\n        // 
/

/../ ->

/\n        let dd: number = 0\n        while (-1 !== (dd = parts.indexOf('..', dd + 1))) {\n          const p = parts[dd - 1]\n          if (p && p !== '.' && p !== '..' && p !== '**') {\n            didSomething = true\n            const needDot = dd === 1 && parts[dd + 1] === '**'\n            const splin = needDot ? ['.'] : []\n            parts.splice(dd - 1, 2, ...splin)\n            if (parts.length === 0) parts.push('')\n            dd -= 2\n          }\n        }\n      }\n    } while (didSomething)\n\n    return globParts\n  }\n\n  // second phase: multi-pattern dedupes\n  // {
/*/,
/

/} ->

/*/\n  // {
/,
/} -> 
/\n  // {
/**/,
/} -> 
/**/\n  //\n  // {
/**/,
/**/

/} ->

/**/\n  // ^-- not valid because ** doens't follow symlinks\n  secondPhasePreProcess(globParts: string[][]): string[][] {\n    for (let i = 0; i < globParts.length - 1; i++) {\n      for (let j = i + 1; j < globParts.length; j++) {\n        const matched = this.partsMatch(\n          globParts[i],\n          globParts[j],\n          !this.preserveMultipleSlashes,\n        )\n        if (matched) {\n          globParts[i] = []\n          globParts[j] = matched\n          break\n        }\n      }\n    }\n    return globParts.filter(gs => gs.length)\n  }\n\n  partsMatch(\n    a: string[],\n    b: string[],\n    emptyGSMatch: boolean = false,\n  ): false | string[] {\n    let ai = 0\n    let bi = 0\n    let result: string[] = []\n    let which: string = ''\n    while (ai < a.length && bi < b.length) {\n      if (a[ai] === b[bi]) {\n        result.push(which === 'b' ? b[bi] : a[ai])\n        ai++\n        bi++\n      } else if (emptyGSMatch && a[ai] === '**' && b[bi] === a[ai + 1]) {\n        result.push(a[ai])\n        ai++\n      } else if (emptyGSMatch && b[bi] === '**' && a[ai] === b[bi + 1]) {\n        result.push(b[bi])\n        bi++\n      } else if (\n        a[ai] === '*' &&\n        b[bi] &&\n        (this.options.dot || !b[bi].startsWith('.')) &&\n        b[bi] !== '**'\n      ) {\n        if (which === 'b') return false\n        which = 'a'\n        result.push(a[ai])\n        ai++\n        bi++\n      } else if (\n        b[bi] === '*' &&\n        a[ai] &&\n        (this.options.dot || !a[ai].startsWith('.')) &&\n        a[ai] !== '**'\n      ) {\n        if (which === 'a') return false\n        which = 'b'\n        result.push(b[bi])\n        ai++\n        bi++\n      } else {\n        return false\n      }\n    }\n    // if we fall out of the loop, it means they two are identical\n    // as long as their lengths match\n    return a.length === b.length && result\n  }\n\n  parseNegate() {\n    if (this.nonegate) return\n\n    const pattern = this.pattern\n    let negate = false\n    let negateOffset = 0\n\n    for (let i = 0; i < pattern.length && pattern.charAt(i) === '!'; i++) {\n      negate = !negate\n      negateOffset++\n    }\n\n    if (negateOffset) this.pattern = pattern.slice(negateOffset)\n    this.negate = negate\n  }\n\n  // set partial to true to test if, for example,\n  // \"/a/b\" matches the start of \"/*/b/*/d\"\n  // Partial means, if you run out of file before you run\n  // out of pattern, then that's fine, as long as all\n  // the parts match.\n  matchOne(file: string[], pattern: ParseReturn[], partial: boolean = false) {\n    const options = this.options\n\n    // UNC paths like //?/X:/... can match X:/... and vice versa\n    // Drive letters in absolute drive or unc paths are always compared\n    // case-insensitively.\n    if (this.isWindows) {\n      const fileDrive = typeof file[0] === 'string' && /^[a-z]:$/i.test(file[0])\n      const fileUNC =\n        !fileDrive &&\n        file[0] === '' &&\n        file[1] === '' &&\n        file[2] === '?' &&\n        /^[a-z]:$/i.test(file[3])\n\n      const patternDrive =\n        typeof pattern[0] === 'string' && /^[a-z]:$/i.test(pattern[0])\n      const patternUNC =\n        !patternDrive &&\n        pattern[0] === '' &&\n        pattern[1] === '' &&\n        pattern[2] === '?' &&\n        typeof pattern[3] === 'string' &&\n        /^[a-z]:$/i.test(pattern[3])\n\n      const fdi = fileUNC ? 3 : fileDrive ? 0 : undefined\n      const pdi = patternUNC ? 3 : patternDrive ? 0 : undefined\n      if (typeof fdi === 'number' && typeof pdi === 'number') {\n        const [fd, pd]: [string, string] = [file[fdi], pattern[pdi] as string]\n        if (fd.toLowerCase() === pd.toLowerCase()) {\n          pattern[pdi] = fd\n          if (pdi > fdi) {\n            pattern = pattern.slice(pdi)\n          } else if (fdi > pdi) {\n            file = file.slice(fdi)\n          }\n        }\n      }\n    }\n\n    // resolve and reduce . and .. portions in the file as well.\n    // don't need to do the second phase, because it's only one string[]\n    const { optimizationLevel = 1 } = this.options\n    if (optimizationLevel >= 2) {\n      file = this.levelTwoFileOptimize(file)\n    }\n\n    this.debug('matchOne', this, { file, pattern })\n    this.debug('matchOne', file.length, pattern.length)\n\n    for (\n      var fi = 0, pi = 0, fl = file.length, pl = pattern.length;\n      fi < fl && pi < pl;\n      fi++, pi++\n    ) {\n      this.debug('matchOne loop')\n      var p = pattern[pi]\n      var f = file[fi]\n\n      this.debug(pattern, p, f)\n\n      // should be impossible.\n      // some invalid regexp stuff in the set.\n      /* c8 ignore start */\n      if (p === false) {\n        return false\n      }\n      /* c8 ignore stop */\n\n      if (p === GLOBSTAR) {\n        this.debug('GLOBSTAR', [pattern, p, f])\n\n        // \"**\"\n        // a/**/b/**/c would match the following:\n        // a/b/x/y/z/c\n        // a/x/y/z/b/c\n        // a/b/x/b/x/c\n        // a/b/c\n        // To do this, take the rest of the pattern after\n        // the **, and see if it would match the file remainder.\n        // If so, return success.\n        // If not, the ** \"swallows\" a segment, and try again.\n        // This is recursively awful.\n        //\n        // a/**/b/**/c matching a/b/x/y/z/c\n        // - a matches a\n        // - doublestar\n        //   - matchOne(b/x/y/z/c, b/**/c)\n        //     - b matches b\n        //     - doublestar\n        //       - matchOne(x/y/z/c, c) -> no\n        //       - matchOne(y/z/c, c) -> no\n        //       - matchOne(z/c, c) -> no\n        //       - matchOne(c, c) yes, hit\n        var fr = fi\n        var pr = pi + 1\n        if (pr === pl) {\n          this.debug('** at the end')\n          // a ** at the end will just swallow the rest.\n          // We have found a match.\n          // however, it will not swallow /.x, unless\n          // options.dot is set.\n          // . and .. are *never* matched by **, for explosively\n          // exponential reasons.\n          for (; fi < fl; fi++) {\n            if (\n              file[fi] === '.' ||\n              file[fi] === '..' ||\n              (!options.dot && file[fi].charAt(0) === '.')\n            )\n              return false\n          }\n          return true\n        }\n\n        // ok, let's see if we can swallow whatever we can.\n        while (fr < fl) {\n          var swallowee = file[fr]\n\n          this.debug('\\nglobstar while', file, fr, pattern, pr, swallowee)\n\n          // XXX remove this slice.  Just pass the start index.\n          if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {\n            this.debug('globstar found match!', fr, fl, swallowee)\n            // found a match.\n            return true\n          } else {\n            // can't swallow \".\" or \"..\" ever.\n            // can only swallow \".foo\" when explicitly asked.\n            if (\n              swallowee === '.' ||\n              swallowee === '..' ||\n              (!options.dot && swallowee.charAt(0) === '.')\n            ) {\n              this.debug('dot detected!', file, fr, pattern, pr)\n              break\n            }\n\n            // ** swallows a segment, and continue.\n            this.debug('globstar swallow a segment, and continue')\n            fr++\n          }\n        }\n\n        // no match was found.\n        // However, in partial mode, we can't say this is necessarily over.\n        /* c8 ignore start */\n        if (partial) {\n          // ran out of file\n          this.debug('\\n>>> no match, partial?', file, fr, pattern, pr)\n          if (fr === fl) {\n            return true\n          }\n        }\n        /* c8 ignore stop */\n        return false\n      }\n\n      // something other than **\n      // non-magic patterns just have to match exactly\n      // patterns with magic have been turned into regexps.\n      let hit: boolean\n      if (typeof p === 'string') {\n        hit = f === p\n        this.debug('string match', p, f, hit)\n      } else {\n        hit = p.test(f)\n        this.debug('pattern match', p, f, hit)\n      }\n\n      if (!hit) return false\n    }\n\n    // Note: ending in / means that we'll get a final \"\"\n    // at the end of the pattern.  This can only match a\n    // corresponding \"\" at the end of the file.\n    // If the file ends in /, then it can only match a\n    // a pattern that ends in /, unless the pattern just\n    // doesn't have any more for it. But, a/b/ should *not*\n    // match \"a/b/*\", even though \"\" matches against the\n    // [^/]*? pattern, except in partial mode, where it might\n    // simply not be reached yet.\n    // However, a/b/ should still satisfy a/*\n\n    // now either we fell off the end of the pattern, or we're done.\n    if (fi === fl && pi === pl) {\n      // ran out of pattern and filename at the same time.\n      // an exact hit!\n      return true\n    } else if (fi === fl) {\n      // ran out of file, but still had pattern left.\n      // this is ok if we're doing the match as part of\n      // a glob fs traversal.\n      return partial\n    } else if (pi === pl) {\n      // ran out of pattern, still have file left.\n      // this is only acceptable if we're on the very last\n      // empty segment of a file with a trailing slash.\n      // a/* should match a/b/\n      return fi === fl - 1 && file[fi] === ''\n\n      /* c8 ignore start */\n    } else {\n      // should be unreachable.\n      throw new Error('wtf?')\n    }\n    /* c8 ignore stop */\n  }\n\n  braceExpand() {\n    return braceExpand(this.pattern, this.options)\n  }\n\n  parse(pattern: string): ParseReturn {\n    assertValidPattern(pattern)\n\n    const options = this.options\n\n    // shortcuts\n    if (pattern === '**') return GLOBSTAR\n    if (pattern === '') return ''\n\n    // far and away, the most common glob pattern parts are\n    // *, *.*, and *.  Add a fast check method for those.\n    let m: RegExpMatchArray | null\n    let fastTest: null | ((f: string) => boolean) = null\n    if ((m = pattern.match(starRE))) {\n      fastTest = options.dot ? starTestDot : starTest\n    } else if ((m = pattern.match(starDotExtRE))) {\n      fastTest = (\n        options.nocase\n          ? options.dot\n            ? starDotExtTestNocaseDot\n            : starDotExtTestNocase\n          : options.dot\n            ? starDotExtTestDot\n            : starDotExtTest\n      )(m[1])\n    } else if ((m = pattern.match(qmarksRE))) {\n      fastTest = (\n        options.nocase\n          ? options.dot\n            ? qmarksTestNocaseDot\n            : qmarksTestNocase\n          : options.dot\n            ? qmarksTestDot\n            : qmarksTest\n      )(m)\n    } else if ((m = pattern.match(starDotStarRE))) {\n      fastTest = options.dot ? starDotStarTestDot : starDotStarTest\n    } else if ((m = pattern.match(dotStarRE))) {\n      fastTest = dotStarTest\n    }\n\n    const re = AST.fromGlob(pattern, this.options).toMMPattern()\n    if (fastTest && typeof re === 'object') {\n      // Avoids overriding in frozen environments\n      Reflect.defineProperty(re, 'test', { value: fastTest })\n    }\n    return re\n  }\n\n  makeRe() {\n    if (this.regexp || this.regexp === false) return this.regexp\n\n    // at this point, this.set is a 2d array of partial\n    // pattern strings, or \"**\".\n    //\n    // It's better to use .match().  This function shouldn't\n    // be used, really, but it's pretty convenient sometimes,\n    // when you just want to work with a regex.\n    const set = this.set\n\n    if (!set.length) {\n      this.regexp = false\n      return this.regexp\n    }\n    const options = this.options\n\n    const twoStar = options.noglobstar\n      ? star\n      : options.dot\n        ? twoStarDot\n        : twoStarNoDot\n    const flags = new Set(options.nocase ? ['i'] : [])\n\n    // regexpify non-globstar patterns\n    // if ** is only item, then we just do one twoStar\n    // if ** is first, and there are more, prepend (\\/|twoStar\\/)? to next\n    // if ** is last, append (\\/twoStar|) to previous\n    // if ** is in the middle, append (\\/|\\/twoStar\\/) to previous\n    // then filter out GLOBSTAR symbols\n    let re = set\n      .map(pattern => {\n        const pp: (string | typeof GLOBSTAR)[] = pattern.map(p => {\n          if (p instanceof RegExp) {\n            for (const f of p.flags.split('')) flags.add(f)\n          }\n          return typeof p === 'string'\n            ? regExpEscape(p)\n            : p === GLOBSTAR\n              ? GLOBSTAR\n              : p._src\n        }) as (string | typeof GLOBSTAR)[]\n        pp.forEach((p, i) => {\n          const next = pp[i + 1]\n          const prev = pp[i - 1]\n          if (p !== GLOBSTAR || prev === GLOBSTAR) {\n            return\n          }\n          if (prev === undefined) {\n            if (next !== undefined && next !== GLOBSTAR) {\n              pp[i + 1] = '(?:\\\\/|' + twoStar + '\\\\/)?' + next\n            } else {\n              pp[i] = twoStar\n            }\n          } else if (next === undefined) {\n            pp[i - 1] = prev + '(?:\\\\/|\\\\/' + twoStar + ')?'\n          } else if (next !== GLOBSTAR) {\n            pp[i - 1] = prev + '(?:\\\\/|\\\\/' + twoStar + '\\\\/)' + next\n            pp[i + 1] = GLOBSTAR\n          }\n        })\n        const filtered = pp.filter(p => p !== GLOBSTAR)\n\n        // For partial matches, we need to make the pattern match\n        // any prefix of the full path. We do this by generating\n        // alternative patterns that match progressively longer prefixes.\n        if (this.partial && filtered.length >= 1) {\n          const prefixes: string[] = []\n          for (let i = 1; i <= filtered.length; i++) {\n            prefixes.push(filtered.slice(0, i).join('/'))\n          }\n          return '(?:' + prefixes.join('|') + ')'\n        }\n\n        return filtered.join('/')\n      })\n      .join('|')\n\n    // need to wrap in parens if we had more than one thing with |,\n    // otherwise only the first will be anchored to ^ and the last to $\n    const [open, close] = set.length > 1 ? ['(?:', ')'] : ['', '']\n    // must match entire pattern\n    // ending in a * or ** will make it less strict.\n    re = '^' + open + re + close + '$'\n\n    // In partial mode, '/' should always match as it's a valid prefix for any pattern\n    if (this.partial) {\n      re = '^(?:\\\\/|' + open + re.slice(1, -1) + close + ')$'\n    }\n\n    // can match anything, as long as it's not this.\n    if (this.negate) re = '^(?!' + re + ').+$'\n\n    try {\n      this.regexp = new RegExp(re, [...flags].join(''))\n      /* c8 ignore start */\n    } catch (ex) {\n      // should be impossible\n      this.regexp = false\n    }\n    /* c8 ignore stop */\n    return this.regexp\n  }\n\n  slashSplit(p: string) {\n    // if p starts with // on windows, we preserve that\n    // so that UNC paths aren't broken.  Otherwise, any number of\n    // / characters are coalesced into one, unless\n    // preserveMultipleSlashes is set to true.\n    if (this.preserveMultipleSlashes) {\n      return p.split('/')\n    } else if (this.isWindows && /^\\/\\/[^\\/]+/.test(p)) {\n      // add an extra '' for the one we lose\n      return ['', ...p.split(/\\/+/)]\n    } else {\n      return p.split(/\\/+/)\n    }\n  }\n\n  match(f: string, partial = this.partial) {\n    this.debug('match', f, this.pattern)\n    // short-circuit in the case of busted things.\n    // comments, etc.\n    if (this.comment) {\n      return false\n    }\n    if (this.empty) {\n      return f === ''\n    }\n\n    if (f === '/' && partial) {\n      return true\n    }\n\n    const options = this.options\n\n    // windows: need to use /, not \\\n    if (this.isWindows) {\n      f = f.split('\\\\').join('/')\n    }\n\n    // treat the test path as a set of pathparts.\n    const ff = this.slashSplit(f)\n    this.debug(this.pattern, 'split', ff)\n\n    // just ONE of the pattern sets in this.set needs to match\n    // in order for it to be valid.  If negating, then just one\n    // match means that we have failed.\n    // Either way, return on the first hit.\n\n    const set = this.set\n    this.debug(this.pattern, 'set', set)\n\n    // Find the basename of the path by looking for the last non-empty segment\n    let filename: string = ff[ff.length - 1]\n    if (!filename) {\n      for (let i = ff.length - 2; !filename && i >= 0; i--) {\n        filename = ff[i]\n      }\n    }\n\n    for (let i = 0; i < set.length; i++) {\n      const pattern = set[i]\n      let file = ff\n      if (options.matchBase && pattern.length === 1) {\n        file = [filename]\n      }\n      const hit = this.matchOne(file, pattern, partial)\n      if (hit) {\n        if (options.flipNegate) {\n          return true\n        }\n        return !this.negate\n      }\n    }\n\n    // didn't get any hits.  this is success if it's a negative\n    // pattern, failure otherwise.\n    if (options.flipNegate) {\n      return false\n    }\n    return this.negate\n  }\n\n  static defaults(def: MinimatchOptions) {\n    return minimatch.defaults(def).Minimatch\n  }\n}\n/* c8 ignore start */\nexport { AST } from './ast.js'\nexport { escape } from './escape.js'\nexport { unescape } from './unescape.js'\n/* c8 ignore stop */\nminimatch.AST = AST\nminimatch.Minimatch = Minimatch\nminimatch.escape = escape\nminimatch.unescape = unescape\n"]}
\ No newline at end of file
+{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AACxC,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAE9D,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAC9B,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAqHxC,MAAM,CAAC,MAAM,SAAS,GAAG,CACvB,CAAS,EACT,OAAe,EACf,UAA4B,EAAE,EAC9B,EAAE;IACF,kBAAkB,CAAC,OAAO,CAAC,CAAA;IAE3B,oCAAoC;IACpC,IAAI,CAAC,OAAO,CAAC,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE,CAAC;QACpD,OAAO,KAAK,CAAA;IACd,CAAC;IAED,OAAO,IAAI,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;AACjD,CAAC,CAAA;AAED,wDAAwD;AACxD,MAAM,YAAY,GAAG,oBAAoB,CAAA;AACzC,MAAM,cAAc,GAAG,CAAC,GAAW,EAAE,EAAE,CAAC,CAAC,CAAS,EAAE,EAAE,CACpD,CAAC,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAA;AACvC,MAAM,iBAAiB,GAAG,CAAC,GAAW,EAAE,EAAE,CAAC,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAA;AACzE,MAAM,oBAAoB,GAAG,CAAC,GAAW,E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ACnC,OAAO,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,SAAS,CAAA;IAC1C,CAAC;CACF;AACD,qBAAqB;AACrB,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAC9B,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACxC,oBAAoB;AACpB,SAAS,CAAC,GAAG,GAAG,GAAG,CAAA;AACnB,SAAS,CAAC,SAAS,GAAG,SAAS,CAAA;AAC/B,SAAS,CAAC,MAAM,GAAG,MAAM,CAAA;AACzB,SAAS,CAAC,QAAQ,GAAG,QAAQ,CAAA","sourcesContent":["import { expand } from 'brace-expansion'\nimport { assertValidPattern } from './assert-valid-pattern.js'\nimport type { ExtglobType } from './ast.js'\nimport { AST } from './ast.js'\nimport { escape } from './escape.js'\nimport { unescape } from './unescape.js'\n\nexport type Platform =\n  | 'aix'\n  | 'android'\n  | 'darwin'\n  | 'freebsd'\n  | 'haiku'\n  | 'linux'\n  | 'openbsd'\n  | 'sunos'\n  | 'win32'\n  | 'cygwin'\n  | 'netbsd'\n\nexport interface MinimatchOptions {\n  /** do not expand `{x,y}` style braces */\n  nobrace?: boolean\n  /** do not treat patterns starting with `#` as a comment */\n  nocomment?: boolean\n  /** do not treat patterns starting with `!` as a negation */\n  nonegate?: boolean\n  /** print LOTS of debugging output */\n  debug?: boolean\n  /** treat `**` the same as `*` */\n  noglobstar?: boolean\n  /** do not expand extglobs like `+(a|b)` */\n  noext?: boolean\n  /** return the pattern if nothing matches */\n  nonull?: boolean\n  /** treat `\\\\` as a path separator, not an escape character */\n  windowsPathsNoEscape?: boolean\n  /**\n   * inverse of {@link MinimatchOptions.windowsPathsNoEscape}\n   * @deprecated\n   */\n  allowWindowsEscape?: boolean\n  /**\n   * Compare a partial path to a pattern. As long as the parts\n   * of the path that are present are not contradicted by the\n   * pattern, it will be treated as a match. This is useful in\n   * applications where you're walking through a folder structure,\n   * and don't yet have the full path, but want to ensure that you\n   * do not walk down paths that can never be a match.\n   */\n  partial?: boolean\n  /** allow matches that start with `.` even if the pattern does not */\n  dot?: boolean\n  /** ignore case */\n  nocase?: boolean\n  /** ignore case only in wildcard patterns */\n  nocaseMagicOnly?: boolean\n  /** consider braces to be \"magic\" for the purpose of `hasMagic` */\n  magicalBraces?: boolean\n  /**\n   * If set, then patterns without slashes will be matched\n   * against the basename of the path if it contains slashes.\n   * For example, `a?b` would match the path `/xyz/123/acb`, but\n   * not `/xyz/acb/123`.\n   */\n  matchBase?: boolean\n  /** invert the results of negated matches */\n  flipNegate?: boolean\n  /** do not collapse multiple `/` into a single `/` */\n  preserveMultipleSlashes?: boolean\n  /**\n   * A number indicating the level of optimization that should be done\n   * to the pattern prior to parsing and using it for matches.\n   */\n  optimizationLevel?: number\n  /** operating system platform */\n  platform?: Platform\n  /**\n   * When a pattern starts with a UNC path or drive letter, and in\n   * `nocase:true` mode, do not convert the root portions of the\n   * pattern into a case-insensitive regular expression, and instead\n   * leave them as strings.\n   *\n   * This is the default when the platform is `win32` and\n   * `nocase:true` is set.\n   */\n  windowsNoMagicRoot?: boolean\n  /**\n   * max number of `{...}` patterns to expand. Default 100_000.\n   */\n  braceExpandMax?: number\n  /**\n   * Max number of non-adjacent `**` patterns to recursively walk down.\n   *\n   * The default of 200 is almost certainly high enough for most purposes,\n   * and can handle absurdly excessive patterns.\n   */\n  maxGlobstarRecursion?: number\n\n  /**\n   * Max depth to traverse for nested extglobs like `*(a|b|c)`\n   *\n   * Default is 2, which is quite low, but any higher value\n   * swiftly results in punishing performance impacts. Note\n   * that this is *not*  relevant when the globstar types can\n   * be safely coalesced into a single set.\n   *\n   * For example, `*(a|@(b|c)|d)` would be flattened into\n   * `*(a|b|c|d)`. Thus, many common extglobs will retain good\n   * performance and  never hit this limit, even if they are\n   * excessively deep and complicated.\n   *\n   * If the limit is hit, then the extglob characters are simply\n   * not parsed, and the pattern effectively switches into\n   * `noextglob: true` mode for the contents of that nested\n   * sub-pattern. This will typically _not_ result in a match,\n   * but is considered a valid trade-off for security and\n   * performance.\n   */\n  maxExtglobRecursion?: number\n}\n\nexport const minimatch = (\n  p: string,\n  pattern: string,\n  options: MinimatchOptions = {},\n) => {\n  assertValidPattern(pattern)\n\n  // shortcut: comments match nothing.\n  if (!options.nocomment && pattern.charAt(0) === '#') {\n    return false\n  }\n\n  return new Minimatch(pattern, options).match(p)\n}\n\n// Optimized checking for the most common glob patterns.\nconst starDotExtRE = /^\\*+([^+@!?*[(]*)$/\nconst starDotExtTest = (ext: string) => (f: string) =>\n  !f.startsWith('.') && f.endsWith(ext)\nconst starDotExtTestDot = (ext: string) => (f: string) => f.endsWith(ext)\nconst starDotExtTestNocase = (ext: string) => {\n  ext = ext.toLowerCase()\n  return (f: string) => !f.startsWith('.') && f.toLowerCase().endsWith(ext)\n}\nconst starDotExtTestNocaseDot = (ext: string) => {\n  ext = ext.toLowerCase()\n  return (f: string) => f.toLowerCase().endsWith(ext)\n}\nconst starDotStarRE = /^\\*+\\.\\*+$/\nconst starDotStarTest = (f: string) =>\n  !f.startsWith('.') && f.includes('.')\nconst starDotStarTestDot = (f: string) =>\n  f !== '.' && f !== '..' && f.includes('.')\nconst dotStarRE = /^\\.\\*+$/\nconst dotStarTest = (f: string) =>\n  f !== '.' && f !== '..' && f.startsWith('.')\nconst starRE = /^\\*+$/\nconst starTest = (f: string) => f.length !== 0 && !f.startsWith('.')\nconst starTestDot = (f: string) =>\n  f.length !== 0 && f !== '.' && f !== '..'\nconst qmarksRE = /^\\?+([^+@!?*[(]*)?$/\nconst qmarksTestNocase = ([$0, ext = '']: RegExpMatchArray) => {\n  const noext = qmarksTestNoExt([$0])\n  if (!ext) return noext\n  ext = ext.toLowerCase()\n  return (f: string) => noext(f) && f.toLowerCase().endsWith(ext)\n}\nconst qmarksTestNocaseDot = ([$0, ext = '']: RegExpMatchArray) => {\n  const noext = qmarksTestNoExtDot([$0])\n  if (!ext) return noext\n  ext = ext.toLowerCase()\n  return (f: string) => noext(f) && f.toLowerCase().endsWith(ext)\n}\nconst qmarksTestDot = ([$0, ext = '']: RegExpMatchArray) => {\n  const noext = qmarksTestNoExtDot([$0])\n  return !ext ? noext : (f: string) => noext(f) && f.endsWith(ext)\n}\nconst qmarksTest = ([$0, ext = '']: RegExpMatchArray) => {\n  const noext = qmarksTestNoExt([$0])\n  return !ext ? noext : (f: string) => noext(f) && f.endsWith(ext)\n}\nconst qmarksTestNoExt = ([$0]: RegExpMatchArray) => {\n  const len = $0.length\n  return (f: string) => f.length === len && !f.startsWith('.')\n}\nconst qmarksTestNoExtDot = ([$0]: RegExpMatchArray) => {\n  const len = $0.length\n  return (f: string) => f.length === len && f !== '.' && f !== '..'\n}\n\n/* c8 ignore start */\nconst defaultPlatform: Platform = (\n  typeof process === 'object' && process ?\n    (typeof process.env === 'object' &&\n      process.env &&\n      process.env.__MINIMATCH_TESTING_PLATFORM__) ||\n    process.platform\n  : 'posix') as Platform\n\nexport type Sep = '\\\\' | '/'\n\nconst path: { [k: string]: { sep: Sep } } = {\n  win32: { sep: '\\\\' },\n  posix: { sep: '/' },\n}\n/* c8 ignore stop */\n\nexport const sep =\n  defaultPlatform === 'win32' ? path.win32.sep : path.posix.sep\nminimatch.sep = sep\n\nexport const GLOBSTAR = Symbol('globstar **')\nminimatch.GLOBSTAR = GLOBSTAR\n\n// any single thing other than /\n// don't need to escape / when using new RegExp()\nconst qmark = '[^/]'\n\n// * => any number of characters\nconst star = qmark + '*?'\n\n// ** when dots are allowed.  Anything goes, except .. and .\n// not (^ or / followed by one or two dots followed by $ or /),\n// followed by anything, any number of times.\nconst twoStarDot = '(?:(?!(?:\\\\/|^)(?:\\\\.{1,2})($|\\\\/)).)*?'\n\n// not a ^ or / followed by a dot,\n// followed by anything, any number of times.\nconst twoStarNoDot = '(?:(?!(?:\\\\/|^)\\\\.).)*?'\n\nexport const filter =\n  (pattern: string, options: MinimatchOptions = {}) =>\n  (p: string) =>\n    minimatch(p, pattern, options)\nminimatch.filter = filter\n\nconst ext = (a: MinimatchOptions, b: MinimatchOptions = {}) =>\n  Object.assign({}, a, b)\n\nexport const defaults = (def: MinimatchOptions): typeof minimatch => {\n  if (!def || typeof def !== 'object' || !Object.keys(def).length) {\n    return minimatch\n  }\n\n  const orig = minimatch\n\n  const m = (p: string, pattern: string, options: MinimatchOptions = {}) =>\n    orig(p, pattern, ext(def, options))\n\n  return Object.assign(m, {\n    Minimatch: class Minimatch extends orig.Minimatch {\n      constructor(pattern: string, options: MinimatchOptions = {}) {\n        super(pattern, ext(def, options))\n      }\n      static defaults(options: MinimatchOptions) {\n        return orig.defaults(ext(def, options)).Minimatch\n      }\n    },\n\n    AST: class AST extends orig.AST {\n      /* c8 ignore start */\n      constructor(\n        type: ExtglobType | null,\n        parent?: AST,\n        options: MinimatchOptions = {},\n      ) {\n        super(type, parent, ext(def, options))\n      }\n      /* c8 ignore stop */\n\n      static fromGlob(pattern: string, options: MinimatchOptions = {}) {\n        return orig.AST.fromGlob(pattern, ext(def, options))\n      }\n    },\n\n    unescape: (\n      s: string,\n      options: Pick<\n        MinimatchOptions,\n        'windowsPathsNoEscape' | 'magicalBraces'\n      > = {},\n    ) => orig.unescape(s, ext(def, options)),\n\n    escape: (\n      s: string,\n      options: Pick<\n        MinimatchOptions,\n        'windowsPathsNoEscape' | 'magicalBraces'\n      > = {},\n    ) => orig.escape(s, ext(def, options)),\n\n    filter: (pattern: string, options: MinimatchOptions = {}) =>\n      orig.filter(pattern, ext(def, options)),\n\n    defaults: (options: MinimatchOptions) =>\n      orig.defaults(ext(def, options)),\n\n    makeRe: (pattern: string, options: MinimatchOptions = {}) =>\n      orig.makeRe(pattern, ext(def, options)),\n\n    braceExpand: (pattern: string, options: MinimatchOptions = {}) =>\n      orig.braceExpand(pattern, ext(def, options)),\n\n    match: (\n      list: string[],\n      pattern: string,\n      options: MinimatchOptions = {},\n    ) => orig.match(list, pattern, ext(def, options)),\n\n    sep: orig.sep,\n    GLOBSTAR: GLOBSTAR as typeof GLOBSTAR,\n  })\n}\nminimatch.defaults = defaults\n\n// Brace expansion:\n// a{b,c}d -> abd acd\n// a{b,}c -> abc ac\n// a{0..3}d -> a0d a1d a2d a3d\n// a{b,c{d,e}f}g -> abg acdfg acefg\n// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg\n//\n// Invalid sets are not expanded.\n// a{2..}b -> a{2..}b\n// a{b}c -> a{b}c\nexport const braceExpand = (\n  pattern: string,\n  options: MinimatchOptions = {},\n) => {\n  assertValidPattern(pattern)\n\n  // Thanks to Yeting Li  for\n  // improving this regexp to avoid a ReDOS vulnerability.\n  if (options.nobrace || !/\\{(?:(?!\\{).)*\\}/.test(pattern)) {\n    // shortcut. no need to expand.\n    return [pattern]\n  }\n\n  return expand(pattern, { max: options.braceExpandMax })\n}\nminimatch.braceExpand = braceExpand\n\n// parse a component of the expanded set.\n// At this point, no pattern may contain \"/\" in it\n// so we're going to return a 2d array, where each entry is the full\n// pattern, split on '/', and then turned into a regular expression.\n// A regexp is made at the end which joins each array with an\n// escaped /, and another full one which joins each regexp with |.\n//\n// Following the lead of Bash 4.1, note that \"**\" only has special meaning\n// when it is the *only* thing in a path portion.  Otherwise, any series\n// of * is equivalent to a single *.  Globstar behavior is enabled by\n// default, and can be disabled by setting options.noglobstar.\n\nexport const makeRe = (pattern: string, options: MinimatchOptions = {}) =>\n  new Minimatch(pattern, options).makeRe()\nminimatch.makeRe = makeRe\n\nexport const match = (\n  list: string[],\n  pattern: string,\n  options: MinimatchOptions = {},\n) => {\n  const mm = new Minimatch(pattern, options)\n  list = list.filter(f => mm.match(f))\n  if (mm.options.nonull && !list.length) {\n    list.push(pattern)\n  }\n  return list\n}\nminimatch.match = match\n\n// replace stuff like \\* with *\nconst globMagic = /[?*]|[+@!]\\(.*?\\)|\\[|\\]/\nconst regExpEscape = (s: string) =>\n  s.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&')\n\nexport type MMRegExp = RegExp & {\n  _src?: string\n  _glob?: string\n}\n\nexport type ParseReturnFiltered = string | MMRegExp | typeof GLOBSTAR\nexport type ParseReturn = ParseReturnFiltered | false\n\nexport class Minimatch {\n  options: MinimatchOptions\n  set: ParseReturnFiltered[][]\n  pattern: string\n\n  windowsPathsNoEscape: boolean\n  nonegate: boolean\n  negate: boolean\n  comment: boolean\n  empty: boolean\n  preserveMultipleSlashes: boolean\n  partial: boolean\n  globSet: string[]\n  globParts: string[][]\n  nocase: boolean\n\n  isWindows: boolean\n  platform: Platform\n  windowsNoMagicRoot: boolean\n  maxGlobstarRecursion: number\n\n  regexp: false | null | MMRegExp\n  constructor(pattern: string, options: MinimatchOptions = {}) {\n    assertValidPattern(pattern)\n\n    options = options || {}\n    this.options = options\n    this.maxGlobstarRecursion = options.maxGlobstarRecursion ?? 200\n    this.pattern = pattern\n    this.platform = options.platform || defaultPlatform\n    this.isWindows = this.platform === 'win32'\n    // avoid the annoying deprecation flag lol\n    const awe = ('allowWindow' + 'sEscape') as keyof MinimatchOptions\n    this.windowsPathsNoEscape =\n      !!options.windowsPathsNoEscape || options[awe] === false\n    if (this.windowsPathsNoEscape) {\n      this.pattern = this.pattern.replace(/\\\\/g, '/')\n    }\n    this.preserveMultipleSlashes = !!options.preserveMultipleSlashes\n    this.regexp = null\n    this.negate = false\n    this.nonegate = !!options.nonegate\n    this.comment = false\n    this.empty = false\n    this.partial = !!options.partial\n    this.nocase = !!this.options.nocase\n    this.windowsNoMagicRoot =\n      options.windowsNoMagicRoot !== undefined ?\n        options.windowsNoMagicRoot\n      : !!(this.isWindows && this.nocase)\n\n    this.globSet = []\n    this.globParts = []\n    this.set = []\n\n    // make the set of regexps etc.\n    this.make()\n  }\n\n  hasMagic(): boolean {\n    if (this.options.magicalBraces && this.set.length > 1) {\n      return true\n    }\n    for (const pattern of this.set) {\n      for (const part of pattern) {\n        if (typeof part !== 'string') return true\n      }\n    }\n    return false\n  }\n\n  debug(..._: unknown[]) {}\n\n  make() {\n    const pattern = this.pattern\n    const options = this.options\n\n    // empty patterns and comments match nothing.\n    if (!options.nocomment && pattern.charAt(0) === '#') {\n      this.comment = true\n      return\n    }\n\n    if (!pattern) {\n      this.empty = true\n      return\n    }\n\n    // step 1: figure out negation, etc.\n    this.parseNegate()\n\n    // step 2: expand braces\n    this.globSet = [...new Set(this.braceExpand())]\n\n    if (options.debug) {\n      //oxlint-disable-next-line no-console\n      this.debug = (...args: unknown[]) => console.error(...args)\n    }\n\n    this.debug(this.pattern, this.globSet)\n\n    // step 3: now we have a set, so turn each one into a series of\n    // path-portion matching patterns.\n    // These will be regexps, except in the case of \"**\", which is\n    // set to the GLOBSTAR object for globstar behavior,\n    // and will not contain any / characters\n    //\n    // First, we preprocess to make the glob pattern sets a bit simpler\n    // and deduped.  There are some perf-killing patterns that can cause\n    // problems with a glob walk, but we can simplify them down a bit.\n    const rawGlobParts = this.globSet.map(s => this.slashSplit(s))\n    this.globParts = this.preprocess(rawGlobParts)\n    this.debug(this.pattern, this.globParts)\n\n    // glob --> regexps\n    let set = this.globParts.map((s, _, __) => {\n      if (this.isWindows && this.windowsNoMagicRoot) {\n        // check if it's a drive or unc path.\n        const isUNC =\n          s[0] === '' &&\n          s[1] === '' &&\n          (s[2] === '?' || !globMagic.test(s[2])) &&\n          !globMagic.test(s[3])\n        const isDrive = /^[a-z]:/i.test(s[0])\n        if (isUNC) {\n          return [\n            ...s.slice(0, 4),\n            ...s.slice(4).map(ss => this.parse(ss)),\n          ]\n        } else if (isDrive) {\n          return [s[0], ...s.slice(1).map(ss => this.parse(ss))]\n        }\n      }\n      return s.map(ss => this.parse(ss))\n    })\n\n    this.debug(this.pattern, set)\n\n    // filter out everything that didn't compile properly.\n    this.set = set.filter(\n      s => s.indexOf(false) === -1,\n    ) as ParseReturnFiltered[][]\n\n    // do not treat the ? in UNC paths as magic\n    if (this.isWindows) {\n      for (let i = 0; i < this.set.length; i++) {\n        const p = this.set[i]\n        if (\n          p[0] === '' &&\n          p[1] === '' &&\n          this.globParts[i][2] === '?' &&\n          typeof p[3] === 'string' &&\n          /^[a-z]:$/i.test(p[3])\n        ) {\n          p[2] = '?'\n        }\n      }\n    }\n\n    this.debug(this.pattern, this.set)\n  }\n\n  // various transforms to equivalent pattern sets that are\n  // faster to process in a filesystem walk.  The goal is to\n  // eliminate what we can, and push all ** patterns as far\n  // to the right as possible, even if it increases the number\n  // of patterns that we have to process.\n  preprocess(globParts: string[][]) {\n    // if we're not in globstar mode, then turn ** into *\n    if (this.options.noglobstar) {\n      for (const partset of globParts) {\n        for (let j = 0; j < partset.length; j++) {\n          if (partset[j] === '**') {\n            partset[j] = '*'\n          }\n        }\n      }\n    }\n\n    const { optimizationLevel = 1 } = this.options\n\n    if (optimizationLevel >= 2) {\n      // aggressive optimization for the purpose of fs walking\n      globParts = this.firstPhasePreProcess(globParts)\n      globParts = this.secondPhasePreProcess(globParts)\n    } else if (optimizationLevel >= 1) {\n      // just basic optimizations to remove some .. parts\n      globParts = this.levelOneOptimize(globParts)\n    } else {\n      // just collapse multiple ** portions into one\n      globParts = this.adjascentGlobstarOptimize(globParts)\n    }\n\n    return globParts\n  }\n\n  // just get rid of adjascent ** portions\n  adjascentGlobstarOptimize(globParts: string[][]) {\n    return globParts.map(parts => {\n      let gs: number = -1\n      while (-1 !== (gs = parts.indexOf('**', gs + 1))) {\n        let i = gs\n        while (parts[i + 1] === '**') {\n          i++\n        }\n        if (i !== gs) {\n          parts.splice(gs, i - gs)\n        }\n      }\n      return parts\n    })\n  }\n\n  // get rid of adjascent ** and resolve .. portions\n  levelOneOptimize(globParts: string[][]) {\n    return globParts.map(parts => {\n      parts = parts.reduce((set: string[], part) => {\n        const prev = set[set.length - 1]\n        if (part === '**' && prev === '**') {\n          return set\n        }\n        if (part === '..') {\n          if (prev && prev !== '..' && prev !== '.' && prev !== '**') {\n            set.pop()\n            return set\n          }\n        }\n        set.push(part)\n        return set\n      }, [])\n      return parts.length === 0 ? [''] : parts\n    })\n  }\n\n  levelTwoFileOptimize(parts: string | string[]) {\n    if (!Array.isArray(parts)) {\n      parts = this.slashSplit(parts)\n    }\n    let didSomething: boolean = false\n\n    do {\n      didSomething = false\n      // 
// -> 
/\n      if (!this.preserveMultipleSlashes) {\n        for (let i = 1; i < parts.length - 1; i++) {\n          const p = parts[i]\n          // don't squeeze out UNC patterns\n          if (i === 1 && p === '' && parts[0] === '') continue\n          if (p === '.' || p === '') {\n            didSomething = true\n            parts.splice(i, 1)\n            i--\n          }\n        }\n        if (\n          parts[0] === '.' &&\n          parts.length === 2 &&\n          (parts[1] === '.' || parts[1] === '')\n        ) {\n          didSomething = true\n          parts.pop()\n        }\n      }\n\n      // 
/

/../ ->

/\n      let dd: number = 0\n      while (-1 !== (dd = parts.indexOf('..', dd + 1))) {\n        const p = parts[dd - 1]\n        if (\n          p &&\n          p !== '.' &&\n          p !== '..' &&\n          p !== '**' &&\n          !(this.isWindows && /^[a-z]:$/i.test(p))\n        ) {\n          didSomething = true\n          parts.splice(dd - 1, 2)\n          dd -= 2\n        }\n      }\n    } while (didSomething)\n    return parts.length === 0 ? [''] : parts\n  }\n\n  // First phase: single-pattern processing\n  // 
 is 1 or more portions\n  //  is 1 or more portions\n  // 

is any portion other than ., .., '', or **\n // is . or ''\n //\n // **/.. is *brutal* for filesystem walking performance, because\n // it effectively resets the recursive walk each time it occurs,\n // and ** cannot be reduced out by a .. pattern part like a regexp\n // or most strings (other than .., ., and '') can be.\n //\n //

/**/../

/

/ -> {

/../

/

/,

/**/

/

/}\n //

// -> 
/\n  // 
/

/../ ->

/\n  // **/**/ -> **/\n  //\n  // **/*/ -> */**/ <== not valid because ** doesn't follow\n  // this WOULD be allowed if ** did follow symlinks, or * didn't\n  firstPhasePreProcess(globParts: string[][]) {\n    let didSomething = false\n    do {\n      didSomething = false\n      // 
/**/../

/

/ -> {

/../

/

/,

/**/

/

/}\n for (let parts of globParts) {\n let gs: number = -1\n while (-1 !== (gs = parts.indexOf('**', gs + 1))) {\n let gss: number = gs\n while (parts[gss + 1] === '**') {\n //

/**/**/ -> 
/**/\n            gss++\n          }\n          // eg, if gs is 2 and gss is 4, that means we have 3 **\n          // parts, and can remove 2 of them.\n          if (gss > gs) {\n            parts.splice(gs + 1, gss - gs)\n          }\n\n          let next = parts[gs + 1]\n          const p = parts[gs + 2]\n          const p2 = parts[gs + 3]\n          if (next !== '..') continue\n          if (\n            !p ||\n            p === '.' ||\n            p === '..' ||\n            !p2 ||\n            p2 === '.' ||\n            p2 === '..'\n          ) {\n            continue\n          }\n          didSomething = true\n          // edit parts in place, and push the new one\n          parts.splice(gs, 1)\n          const other = parts.slice(0)\n          other[gs] = '**'\n          globParts.push(other)\n          gs--\n        }\n\n        // 
// -> 
/\n        if (!this.preserveMultipleSlashes) {\n          for (let i = 1; i < parts.length - 1; i++) {\n            const p = parts[i]\n            // don't squeeze out UNC patterns\n            if (i === 1 && p === '' && parts[0] === '') continue\n            if (p === '.' || p === '') {\n              didSomething = true\n              parts.splice(i, 1)\n              i--\n            }\n          }\n          if (\n            parts[0] === '.' &&\n            parts.length === 2 &&\n            (parts[1] === '.' || parts[1] === '')\n          ) {\n            didSomething = true\n            parts.pop()\n          }\n        }\n\n        // 
/

/../ ->

/\n        let dd: number = 0\n        while (-1 !== (dd = parts.indexOf('..', dd + 1))) {\n          const p = parts[dd - 1]\n          if (p && p !== '.' && p !== '..' && p !== '**') {\n            didSomething = true\n            const needDot = dd === 1 && parts[dd + 1] === '**'\n            const splin = needDot ? ['.'] : []\n            parts.splice(dd - 1, 2, ...splin)\n            if (parts.length === 0) parts.push('')\n            dd -= 2\n          }\n        }\n      }\n    } while (didSomething)\n\n    return globParts\n  }\n\n  // second phase: multi-pattern dedupes\n  // {
/*/,
/

/} ->

/*/\n  // {
/,
/} -> 
/\n  // {
/**/,
/} -> 
/**/\n  //\n  // {
/**/,
/**/

/} ->

/**/\n  // ^-- not valid because ** doens't follow symlinks\n  secondPhasePreProcess(globParts: string[][]): string[][] {\n    for (let i = 0; i < globParts.length - 1; i++) {\n      for (let j = i + 1; j < globParts.length; j++) {\n        const matched = this.partsMatch(\n          globParts[i],\n          globParts[j],\n          !this.preserveMultipleSlashes,\n        )\n        if (matched) {\n          globParts[i] = []\n          globParts[j] = matched\n          break\n        }\n      }\n    }\n    return globParts.filter(gs => gs.length)\n  }\n\n  partsMatch(\n    a: string[],\n    b: string[],\n    emptyGSMatch: boolean = false,\n  ): false | string[] {\n    let ai = 0\n    let bi = 0\n    let result: string[] = []\n    let which: string = ''\n    while (ai < a.length && bi < b.length) {\n      if (a[ai] === b[bi]) {\n        result.push(which === 'b' ? b[bi] : a[ai])\n        ai++\n        bi++\n      } else if (emptyGSMatch && a[ai] === '**' && b[bi] === a[ai + 1]) {\n        result.push(a[ai])\n        ai++\n      } else if (emptyGSMatch && b[bi] === '**' && a[ai] === b[bi + 1]) {\n        result.push(b[bi])\n        bi++\n      } else if (\n        a[ai] === '*' &&\n        b[bi] &&\n        (this.options.dot || !b[bi].startsWith('.')) &&\n        b[bi] !== '**'\n      ) {\n        if (which === 'b') return false\n        which = 'a'\n        result.push(a[ai])\n        ai++\n        bi++\n      } else if (\n        b[bi] === '*' &&\n        a[ai] &&\n        (this.options.dot || !a[ai].startsWith('.')) &&\n        a[ai] !== '**'\n      ) {\n        if (which === 'a') return false\n        which = 'b'\n        result.push(b[bi])\n        ai++\n        bi++\n      } else {\n        return false\n      }\n    }\n    // if we fall out of the loop, it means they two are identical\n    // as long as their lengths match\n    return a.length === b.length && result\n  }\n\n  parseNegate() {\n    if (this.nonegate) return\n\n    const pattern = this.pattern\n    let negate = false\n    let negateOffset = 0\n\n    for (let i = 0; i < pattern.length && pattern.charAt(i) === '!'; i++) {\n      negate = !negate\n      negateOffset++\n    }\n\n    if (negateOffset) this.pattern = pattern.slice(negateOffset)\n    this.negate = negate\n  }\n\n  // set partial to true to test if, for example,\n  // \"/a/b\" matches the start of \"/*/b/*/d\"\n  // Partial means, if you run out of file before you run\n  // out of pattern, then that's fine, as long as all\n  // the parts match.\n  matchOne(\n    file: string[],\n    pattern: ParseReturn[],\n    partial: boolean = false,\n  ) {\n    let fileStartIndex = 0\n    let patternStartIndex = 0\n\n    // UNC paths like //?/X:/... can match X:/... and vice versa\n    // Drive letters in absolute drive or unc paths are always compared\n    // case-insensitively.\n    if (this.isWindows) {\n      const fileDrive =\n        typeof file[0] === 'string' && /^[a-z]:$/i.test(file[0])\n      const fileUNC =\n        !fileDrive &&\n        file[0] === '' &&\n        file[1] === '' &&\n        file[2] === '?' &&\n        /^[a-z]:$/i.test(file[3])\n\n      const patternDrive =\n        typeof pattern[0] === 'string' && /^[a-z]:$/i.test(pattern[0])\n      const patternUNC =\n        !patternDrive &&\n        pattern[0] === '' &&\n        pattern[1] === '' &&\n        pattern[2] === '?' &&\n        typeof pattern[3] === 'string' &&\n        /^[a-z]:$/i.test(pattern[3])\n\n      const fdi =\n        fileUNC ? 3\n        : fileDrive ? 0\n        : undefined\n      const pdi =\n        patternUNC ? 3\n        : patternDrive ? 0\n        : undefined\n      if (typeof fdi === 'number' && typeof pdi === 'number') {\n        const [fd, pd]: [string, string] = [\n          file[fdi],\n          pattern[pdi] as string,\n        ]\n        // start matching at the drive letter index of each\n        if (fd.toLowerCase() === pd.toLowerCase()) {\n          pattern[pdi] = fd\n          patternStartIndex = pdi\n          fileStartIndex = fdi\n        }\n      }\n    }\n\n    // resolve and reduce . and .. portions in the file as well.\n    // don't need to do the second phase, because it's only one string[]\n    const { optimizationLevel = 1 } = this.options\n    if (optimizationLevel >= 2) {\n      file = this.levelTwoFileOptimize(file)\n    }\n\n    if (pattern.includes(GLOBSTAR)) {\n      return this.#matchGlobstar(\n        file,\n        pattern,\n        partial,\n        fileStartIndex,\n        patternStartIndex,\n      )\n    }\n\n    return this.#matchOne(\n      file,\n      pattern,\n      partial,\n      fileStartIndex,\n      patternStartIndex,\n    )\n  }\n\n  #matchGlobstar(\n    file: string[],\n    pattern: ParseReturn[],\n    partial: boolean,\n    fileIndex: number,\n    patternIndex: number,\n  ) {\n    // split the pattern into head, tail, and middle of ** delimited parts\n    const firstgs = pattern.indexOf(GLOBSTAR, patternIndex)\n    const lastgs = pattern.lastIndexOf(GLOBSTAR)\n\n    // split the pattern up into globstar-delimited sections\n    // the tail has to be at the end, and the others just have\n    // to be found in order from the head.\n    const [head, body, tail] =\n      partial ?\n        [\n          pattern.slice(patternIndex, firstgs),\n          pattern.slice(firstgs + 1),\n          [],\n        ]\n      : [\n          pattern.slice(patternIndex, firstgs),\n          pattern.slice(firstgs + 1, lastgs),\n          pattern.slice(lastgs + 1),\n        ]\n\n    // check the head, from the current file/pattern index.\n    if (head.length) {\n      const fileHead = file.slice(fileIndex, fileIndex + head.length)\n      if (!this.#matchOne(fileHead, head, partial, 0, 0)) {\n        return false\n      }\n      fileIndex += head.length\n      patternIndex += head.length\n    }\n    // now we know the head matches!\n\n    // if the last portion is not empty, it MUST match the end\n    // check the tail\n    let fileTailMatch: number = 0\n    if (tail.length) {\n      // if head + tail > file, then we cannot possibly match\n      if (tail.length + fileIndex > file.length) return false\n\n      // try to match the tail\n      let tailStart = file.length - tail.length\n      if (this.#matchOne(file, tail, partial, tailStart, 0)) {\n        fileTailMatch = tail.length\n      } else {\n        // affordance for stuff like a/**/* matching a/b/\n        // if the last file portion is '', and there's more to the pattern\n        // then try without the '' bit.\n        if (\n          file[file.length - 1] !== '' ||\n          fileIndex + tail.length === file.length\n        ) {\n          return false\n        }\n        tailStart--\n        if (!this.#matchOne(file, tail, partial, tailStart, 0)) {\n          return false\n        }\n        fileTailMatch = tail.length + 1\n      }\n    }\n\n    // now we know the tail matches!\n\n    // the middle is zero or more portions wrapped in **, possibly\n    // containing more ** sections.\n    // so a/**/b/**/c/**/d has become **/b/**/c/**\n    // if it's empty, it means a/**/b, just verify we have no bad dots\n    // if there's no tail, so it ends on /**, then we must have *something*\n    // after the head, or it's not a matc\n    if (!body.length) {\n      let sawSome = !!fileTailMatch\n      for (let i = fileIndex; i < file.length - fileTailMatch; i++) {\n        const f = String(file[i])\n        sawSome = true\n        if (\n          f === '.' ||\n          f === '..' ||\n          (!this.options.dot && f.startsWith('.'))\n        ) {\n          return false\n        }\n      }\n      // in partial mode, we just need to get past all file parts\n      return partial || sawSome\n    }\n\n    // now we know that there's one or more body sections, which can\n    // be matched anywhere from the 0 index (because the head was pruned)\n    // through to the length-fileTailMatch index.\n    // split the body up into sections, and note the minimum index it can\n    // be found at (start with the length of all previous segments)\n    // [section, before, after]\n    const bodySegments: [ParseReturn[], number][] = [[[], 0]]\n    let currentBody: [ParseReturn[], number] = bodySegments[0]\n    let nonGsParts = 0\n    const nonGsPartsSums: number[] = [0]\n    for (const b of body) {\n      if (b === GLOBSTAR) {\n        nonGsPartsSums.push(nonGsParts)\n        currentBody = [[], 0]\n        bodySegments.push(currentBody)\n      } else {\n        currentBody[0].push(b)\n        nonGsParts++\n      }\n    }\n    let i = bodySegments.length - 1\n    const fileLength = file.length - fileTailMatch\n    for (const b of bodySegments) {\n      b[1] = fileLength - ((nonGsPartsSums[i--] as number) + b[0].length)\n    }\n\n    return !!this.#matchGlobStarBodySections(\n      file,\n      bodySegments,\n      fileIndex,\n      0,\n      partial,\n      0,\n      !!fileTailMatch,\n    )\n  }\n\n  // return false for \"nope, not matching\"\n  // return null for \"not matching, cannot keep trying\"\n  #matchGlobStarBodySections(\n    file: string[],\n    // pattern section, last possible position for it\n    bodySegments: [ParseReturn[], number][],\n    fileIndex: number,\n    bodyIndex: number,\n    partial: boolean,\n    globStarDepth: number,\n    sawTail: boolean,\n  ): boolean | null {\n    // take the first body segment, and walk from fileIndex to its \"after\"\n    // value at the end\n    // If it doesn't match at that position, we increment, until we hit\n    // that final possible position, and give up.\n    // If it does match, then advance and try to rest.\n    // If any of them fail we keep walking forward.\n    // this is still a bit recursively painful, but it's more constrained\n    // than previous implementations, because we never test something that\n    // can't possibly be a valid matching condition.\n    const bs = bodySegments[bodyIndex]\n    if (!bs) {\n      // just make sure that there's no bad dots\n      for (let i = fileIndex; i < file.length; i++) {\n        sawTail = true\n        const f = file[i]\n        if (\n          f === '.' ||\n          f === '..' ||\n          (!this.options.dot && f.startsWith('.'))\n        ) {\n          return false\n        }\n      }\n      return sawTail\n    }\n\n    // have a non-globstar body section to test\n    const [body, after] = bs\n    while (fileIndex <= after) {\n      const m = this.#matchOne(\n        file.slice(0, fileIndex + body.length),\n        body,\n        partial,\n        fileIndex,\n        0,\n      )\n      // if limit exceeded, no match. intentional false negative,\n      // acceptable break in correctness for security.\n      if (m && globStarDepth < this.maxGlobstarRecursion) {\n        // match! see if the rest match. if so, we're done!\n        const sub = this.#matchGlobStarBodySections(\n          file,\n          bodySegments,\n          fileIndex + body.length,\n          bodyIndex + 1,\n          partial,\n          globStarDepth + 1,\n          sawTail,\n        )\n        if (sub !== false) {\n          return sub\n        }\n      }\n      const f = file[fileIndex]\n      if (\n        f === '.' ||\n        f === '..' ||\n        (!this.options.dot && f.startsWith('.'))\n      ) {\n        return false\n      }\n\n      fileIndex++\n    }\n    // walked off. no point continuing\n    return partial || null\n  }\n\n  #matchOne(\n    file: string[],\n    pattern: ParseReturn[],\n    partial: boolean,\n    fileIndex: number,\n    patternIndex: number,\n  ) {\n    let fi: number\n    let pi: number\n    let pl: number\n    let fl: number\n    for (\n      fi = fileIndex,\n        pi = patternIndex,\n        fl = file.length,\n        pl = pattern.length;\n      fi < fl && pi < pl;\n      fi++, pi++\n    ) {\n      this.debug('matchOne loop')\n      let p = pattern[pi]\n      let f = file[fi]\n\n      this.debug(pattern, p, f)\n\n      // should be impossible.\n      // some invalid regexp stuff in the set.\n      /* c8 ignore start */\n      if (p === false || p === GLOBSTAR) {\n        return false\n      }\n      /* c8 ignore stop */\n\n      // something other than **\n      // non-magic patterns just have to match exactly\n      // patterns with magic have been turned into regexps.\n      let hit: boolean\n      if (typeof p === 'string') {\n        hit = f === p\n        this.debug('string match', p, f, hit)\n      } else {\n        hit = p.test(f)\n        this.debug('pattern match', p, f, hit)\n      }\n\n      if (!hit) return false\n    }\n\n    // Note: ending in / means that we'll get a final \"\"\n    // at the end of the pattern.  This can only match a\n    // corresponding \"\" at the end of the file.\n    // If the file ends in /, then it can only match a\n    // a pattern that ends in /, unless the pattern just\n    // doesn't have any more for it. But, a/b/ should *not*\n    // match \"a/b/*\", even though \"\" matches against the\n    // [^/]*? pattern, except in partial mode, where it might\n    // simply not be reached yet.\n    // However, a/b/ should still satisfy a/*\n\n    // now either we fell off the end of the pattern, or we're done.\n    if (fi === fl && pi === pl) {\n      // ran out of pattern and filename at the same time.\n      // an exact hit!\n      return true\n    } else if (fi === fl) {\n      // ran out of file, but still had pattern left.\n      // this is ok if we're doing the match as part of\n      // a glob fs traversal.\n      return partial\n    } else if (pi === pl) {\n      // ran out of pattern, still have file left.\n      // this is only acceptable if we're on the very last\n      // empty segment of a file with a trailing slash.\n      // a/* should match a/b/\n      return fi === fl - 1 && file[fi] === ''\n\n      /* c8 ignore start */\n    } else {\n      // should be unreachable.\n      throw new Error('wtf?')\n    }\n    /* c8 ignore stop */\n  }\n\n  braceExpand() {\n    return braceExpand(this.pattern, this.options)\n  }\n\n  parse(pattern: string): ParseReturn {\n    assertValidPattern(pattern)\n\n    const options = this.options\n\n    // shortcuts\n    if (pattern === '**') return GLOBSTAR\n    if (pattern === '') return ''\n\n    // far and away, the most common glob pattern parts are\n    // *, *.*, and *.  Add a fast check method for those.\n    let m: RegExpMatchArray | null\n    let fastTest: null | ((f: string) => boolean) = null\n    if ((m = pattern.match(starRE))) {\n      fastTest = options.dot ? starTestDot : starTest\n    } else if ((m = pattern.match(starDotExtRE))) {\n      fastTest = (\n        options.nocase ?\n          options.dot ?\n            starDotExtTestNocaseDot\n          : starDotExtTestNocase\n        : options.dot ? starDotExtTestDot\n        : starDotExtTest)(m[1])\n    } else if ((m = pattern.match(qmarksRE))) {\n      fastTest = (\n        options.nocase ?\n          options.dot ?\n            qmarksTestNocaseDot\n          : qmarksTestNocase\n        : options.dot ? qmarksTestDot\n        : qmarksTest)(m)\n    } else if ((m = pattern.match(starDotStarRE))) {\n      fastTest = options.dot ? starDotStarTestDot : starDotStarTest\n    } else if ((m = pattern.match(dotStarRE))) {\n      fastTest = dotStarTest\n    }\n\n    const re = AST.fromGlob(pattern, this.options).toMMPattern()\n    if (fastTest && typeof re === 'object') {\n      // Avoids overriding in frozen environments\n      Reflect.defineProperty(re, 'test', { value: fastTest })\n    }\n    return re\n  }\n\n  makeRe() {\n    if (this.regexp || this.regexp === false) return this.regexp\n\n    // at this point, this.set is a 2d array of partial\n    // pattern strings, or \"**\".\n    //\n    // It's better to use .match().  This function shouldn't\n    // be used, really, but it's pretty convenient sometimes,\n    // when you just want to work with a regex.\n    const set = this.set\n\n    if (!set.length) {\n      this.regexp = false\n      return this.regexp\n    }\n    const options = this.options\n\n    const twoStar =\n      options.noglobstar ? star\n      : options.dot ? twoStarDot\n      : twoStarNoDot\n    const flags = new Set(options.nocase ? ['i'] : [])\n\n    // regexpify non-globstar patterns\n    // if ** is only item, then we just do one twoStar\n    // if ** is first, and there are more, prepend (\\/|twoStar\\/)? to next\n    // if ** is last, append (\\/twoStar|) to previous\n    // if ** is in the middle, append (\\/|\\/twoStar\\/) to previous\n    // then filter out GLOBSTAR symbols\n    let re = set\n      .map(pattern => {\n        const pp: (string | typeof GLOBSTAR)[] = pattern.map(p => {\n          if (p instanceof RegExp) {\n            for (const f of p.flags.split('')) flags.add(f)\n          }\n          return (\n            typeof p === 'string' ? regExpEscape(p)\n            : p === GLOBSTAR ? GLOBSTAR\n            : p._src\n          )\n        }) as (string | typeof GLOBSTAR)[]\n        pp.forEach((p, i) => {\n          const next = pp[i + 1]\n          const prev = pp[i - 1]\n          if (p !== GLOBSTAR || prev === GLOBSTAR) {\n            return\n          }\n          if (prev === undefined) {\n            if (next !== undefined && next !== GLOBSTAR) {\n              pp[i + 1] = '(?:\\\\/|' + twoStar + '\\\\/)?' + next\n            } else {\n              pp[i] = twoStar\n            }\n          } else if (next === undefined) {\n            pp[i - 1] = prev + '(?:\\\\/|\\\\/' + twoStar + ')?'\n          } else if (next !== GLOBSTAR) {\n            pp[i - 1] = prev + '(?:\\\\/|\\\\/' + twoStar + '\\\\/)' + next\n            pp[i + 1] = GLOBSTAR\n          }\n        })\n        const filtered = pp.filter(p => p !== GLOBSTAR)\n\n        // For partial matches, we need to make the pattern match\n        // any prefix of the full path. We do this by generating\n        // alternative patterns that match progressively longer prefixes.\n        if (this.partial && filtered.length >= 1) {\n          const prefixes: string[] = []\n          for (let i = 1; i <= filtered.length; i++) {\n            prefixes.push(filtered.slice(0, i).join('/'))\n          }\n          return '(?:' + prefixes.join('|') + ')'\n        }\n\n        return filtered.join('/')\n      })\n      .join('|')\n\n    // need to wrap in parens if we had more than one thing with |,\n    // otherwise only the first will be anchored to ^ and the last to $\n    const [open, close] = set.length > 1 ? ['(?:', ')'] : ['', '']\n    // must match entire pattern\n    // ending in a * or ** will make it less strict.\n    re = '^' + open + re + close + '$'\n\n    // In partial mode, '/' should always match as it's a valid prefix for any pattern\n    if (this.partial) {\n      re = '^(?:\\\\/|' + open + re.slice(1, -1) + close + ')$'\n    }\n\n    // can match anything, as long as it's not this.\n    if (this.negate) re = '^(?!' + re + ').+$'\n\n    try {\n      this.regexp = new RegExp(re, [...flags].join(''))\n      /* c8 ignore start */\n    } catch {\n      // should be impossible\n      this.regexp = false\n    }\n    /* c8 ignore stop */\n    return this.regexp\n  }\n\n  slashSplit(p: string) {\n    // if p starts with // on windows, we preserve that\n    // so that UNC paths aren't broken.  Otherwise, any number of\n    // / characters are coalesced into one, unless\n    // preserveMultipleSlashes is set to true.\n    if (this.preserveMultipleSlashes) {\n      return p.split('/')\n    } else if (this.isWindows && /^\\/\\/[^/]+/.test(p)) {\n      // add an extra '' for the one we lose\n      return ['', ...p.split(/\\/+/)]\n    } else {\n      return p.split(/\\/+/)\n    }\n  }\n\n  match(f: string, partial = this.partial) {\n    this.debug('match', f, this.pattern)\n    // short-circuit in the case of busted things.\n    // comments, etc.\n    if (this.comment) {\n      return false\n    }\n    if (this.empty) {\n      return f === ''\n    }\n\n    if (f === '/' && partial) {\n      return true\n    }\n\n    const options = this.options\n\n    // windows: need to use /, not \\\n    if (this.isWindows) {\n      f = f.split('\\\\').join('/')\n    }\n\n    // treat the test path as a set of pathparts.\n    const ff = this.slashSplit(f)\n    this.debug(this.pattern, 'split', ff)\n\n    // just ONE of the pattern sets in this.set needs to match\n    // in order for it to be valid.  If negating, then just one\n    // match means that we have failed.\n    // Either way, return on the first hit.\n\n    const set = this.set\n    this.debug(this.pattern, 'set', set)\n\n    // Find the basename of the path by looking for the last non-empty segment\n    let filename: string = ff[ff.length - 1]\n    if (!filename) {\n      for (let i = ff.length - 2; !filename && i >= 0; i--) {\n        filename = ff[i]\n      }\n    }\n\n    for (const pattern of set) {\n      let file = ff\n      if (options.matchBase && pattern.length === 1) {\n        file = [filename]\n      }\n      const hit = this.matchOne(file, pattern, partial)\n      if (hit) {\n        if (options.flipNegate) {\n          return true\n        }\n        return !this.negate\n      }\n    }\n\n    // didn't get any hits.  this is success if it's a negative\n    // pattern, failure otherwise.\n    if (options.flipNegate) {\n      return false\n    }\n    return this.negate\n  }\n\n  static defaults(def: MinimatchOptions) {\n    return minimatch.defaults(def).Minimatch\n  }\n}\n/* c8 ignore start */\nexport { AST } from './ast.js'\nexport { escape } from './escape.js'\nexport { unescape } from './unescape.js'\n/* c8 ignore stop */\nminimatch.AST = AST\nminimatch.Minimatch = Minimatch\nminimatch.escape = escape\nminimatch.unescape = unescape\n"]}
\ No newline at end of file
diff --git a/node_modules/minimatch/dist/esm/unescape.d.ts b/node_modules/minimatch/dist/esm/unescape.d.ts
index 30ec8292..c4a14473 100644
--- a/node_modules/minimatch/dist/esm/unescape.d.ts
+++ b/node_modules/minimatch/dist/esm/unescape.d.ts
@@ -1,4 +1,4 @@
-import { MinimatchOptions } from './index.js';
+import type { MinimatchOptions } from './index.js';
 /**
  * Un-escape a string that has been escaped with {@link escape}.
  *
diff --git a/node_modules/minimatch/dist/esm/unescape.d.ts.map b/node_modules/minimatch/dist/esm/unescape.d.ts.map
index 6b84d753..09d6eab4 100644
--- a/node_modules/minimatch/dist/esm/unescape.d.ts.map
+++ b/node_modules/minimatch/dist/esm/unescape.d.ts.map
@@ -1 +1 @@
-{"version":3,"file":"unescape.d.ts","sourceRoot":"","sources":["../../src/unescape.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAE7C;;;;;;;;;;;;;;;;;;GAkBG;AAEH,eAAO,MAAM,QAAQ,GACnB,GAAG,MAAM,EACT,2CAGG,IAAI,CAAC,gBAAgB,EAAE,sBAAsB,GAAG,eAAe,CAAM,WAczE,CAAA"}
\ No newline at end of file
+{"version":3,"file":"unescape.d.ts","sourceRoot":"","sources":["../../src/unescape.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAElD;;;;;;;;;;;;;;;;;;GAkBG;AAEH,eAAO,MAAM,QAAQ,GACnB,GAAG,MAAM,EACT,2CAGG,IAAI,CAAC,gBAAgB,EAAE,sBAAsB,GAAG,eAAe,CAAM,WAczE,CAAA"}
\ No newline at end of file
diff --git a/node_modules/minimatch/dist/esm/unescape.js b/node_modules/minimatch/dist/esm/unescape.js
index dfa408d3..19ce86e7 100644
--- a/node_modules/minimatch/dist/esm/unescape.js
+++ b/node_modules/minimatch/dist/esm/unescape.js
@@ -19,16 +19,16 @@
  */
 export const unescape = (s, { windowsPathsNoEscape = false, magicalBraces = true, } = {}) => {
     if (magicalBraces) {
-        return windowsPathsNoEscape
-            ? s.replace(/\[([^\/\\])\]/g, '$1')
+        return windowsPathsNoEscape ?
+            s.replace(/\[([^/\\])\]/g, '$1')
             : s
-                .replace(/((?!\\).|^)\[([^\/\\])\]/g, '$1$2')
-                .replace(/\\([^\/])/g, '$1');
+                .replace(/((?!\\).|^)\[([^/\\])\]/g, '$1$2')
+                .replace(/\\([^/])/g, '$1');
     }
-    return windowsPathsNoEscape
-        ? s.replace(/\[([^\/\\{}])\]/g, '$1')
+    return windowsPathsNoEscape ?
+        s.replace(/\[([^/\\{}])\]/g, '$1')
         : s
-            .replace(/((?!\\).|^)\[([^\/\\{}])\]/g, '$1$2')
-            .replace(/\\([^\/{}])/g, '$1');
+            .replace(/((?!\\).|^)\[([^/\\{}])\]/g, '$1$2')
+            .replace(/\\([^/{}])/g, '$1');
 };
 //# sourceMappingURL=unescape.js.map
\ No newline at end of file
diff --git a/node_modules/minimatch/dist/esm/unescape.js.map b/node_modules/minimatch/dist/esm/unescape.js.map
index 4fcd5131..6d507391 100644
--- a/node_modules/minimatch/dist/esm/unescape.js.map
+++ b/node_modules/minimatch/dist/esm/unescape.js.map
@@ -1 +1 @@
-{"version":3,"file":"unescape.js","sourceRoot":"","sources":["../../src/unescape.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,MAAM,CAAC,MAAM,QAAQ,GAAG,CACtB,CAAS,EACT,EACE,oBAAoB,GAAG,KAAK,EAC5B,aAAa,GAAG,IAAI,MACgD,EAAE,EACxE,EAAE;IACF,IAAI,aAAa,EAAE,CAAC;QAClB,OAAO,oBAAoB;YACzB,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,gBAAgB,EAAE,IAAI,CAAC;YACnC,CAAC,CAAC,CAAC;iBACE,OAAO,CAAC,2BAA2B,EAAE,MAAM,CAAC;iBAC5C,OAAO,CAAC,YAAY,EAAE,IAAI,CAAC,CAAA;IACpC,CAAC;IACD,OAAO,oBAAoB;QACzB,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,kBAAkB,EAAE,IAAI,CAAC;QACrC,CAAC,CAAC,CAAC;aACE,OAAO,CAAC,6BAA6B,EAAE,MAAM,CAAC;aAC9C,OAAO,CAAC,cAAc,EAAE,IAAI,CAAC,CAAA;AACtC,CAAC,CAAA","sourcesContent":["import { MinimatchOptions } from './index.js'\n\n/**\n * Un-escape a string that has been escaped with {@link escape}.\n *\n * If the {@link MinimatchOptions.windowsPathsNoEscape} option is used, then\n * square-bracket escapes are removed, but not backslash escapes.\n *\n * For example, it will turn the string `'[*]'` into `*`, but it will not\n * turn `'\\\\*'` into `'*'`, because `\\` is a path separator in\n * `windowsPathsNoEscape` mode.\n *\n * When `windowsPathsNoEscape` is not set, then both square-bracket escapes and\n * backslash escapes are removed.\n *\n * Slashes (and backslashes in `windowsPathsNoEscape` mode) cannot be escaped\n * or unescaped.\n *\n * When `magicalBraces` is not set, escapes of braces (`{` and `}`) will not be\n * unescaped.\n */\n\nexport const unescape = (\n  s: string,\n  {\n    windowsPathsNoEscape = false,\n    magicalBraces = true,\n  }: Pick = {},\n) => {\n  if (magicalBraces) {\n    return windowsPathsNoEscape\n      ? s.replace(/\\[([^\\/\\\\])\\]/g, '$1')\n      : s\n          .replace(/((?!\\\\).|^)\\[([^\\/\\\\])\\]/g, '$1$2')\n          .replace(/\\\\([^\\/])/g, '$1')\n  }\n  return windowsPathsNoEscape\n    ? s.replace(/\\[([^\\/\\\\{}])\\]/g, '$1')\n    : s\n        .replace(/((?!\\\\).|^)\\[([^\\/\\\\{}])\\]/g, '$1$2')\n        .replace(/\\\\([^\\/{}])/g, '$1')\n}\n"]}
\ No newline at end of file
+{"version":3,"file":"unescape.js","sourceRoot":"","sources":["../../src/unescape.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,MAAM,CAAC,MAAM,QAAQ,GAAG,CACtB,CAAS,EACT,EACE,oBAAoB,GAAG,KAAK,EAC5B,aAAa,GAAG,IAAI,MACgD,EAAE,EACxE,EAAE;IACF,IAAI,aAAa,EAAE,CAAC;QAClB,OAAO,oBAAoB,CAAC,CAAC;YACzB,CAAC,CAAC,OAAO,CAAC,eAAe,EAAE,IAAI,CAAC;YAClC,CAAC,CAAC,CAAC;iBACE,OAAO,CAAC,0BAA0B,EAAE,MAAM,CAAC;iBAC3C,OAAO,CAAC,WAAW,EAAE,IAAI,CAAC,CAAA;IACnC,CAAC;IACD,OAAO,oBAAoB,CAAC,CAAC;QACzB,CAAC,CAAC,OAAO,CAAC,iBAAiB,EAAE,IAAI,CAAC;QACpC,CAAC,CAAC,CAAC;aACE,OAAO,CAAC,4BAA4B,EAAE,MAAM,CAAC;aAC7C,OAAO,CAAC,aAAa,EAAE,IAAI,CAAC,CAAA;AACrC,CAAC,CAAA","sourcesContent":["import type { MinimatchOptions } from './index.js'\n\n/**\n * Un-escape a string that has been escaped with {@link escape}.\n *\n * If the {@link MinimatchOptions.windowsPathsNoEscape} option is used, then\n * square-bracket escapes are removed, but not backslash escapes.\n *\n * For example, it will turn the string `'[*]'` into `*`, but it will not\n * turn `'\\\\*'` into `'*'`, because `\\` is a path separator in\n * `windowsPathsNoEscape` mode.\n *\n * When `windowsPathsNoEscape` is not set, then both square-bracket escapes and\n * backslash escapes are removed.\n *\n * Slashes (and backslashes in `windowsPathsNoEscape` mode) cannot be escaped\n * or unescaped.\n *\n * When `magicalBraces` is not set, escapes of braces (`{` and `}`) will not be\n * unescaped.\n */\n\nexport const unescape = (\n  s: string,\n  {\n    windowsPathsNoEscape = false,\n    magicalBraces = true,\n  }: Pick = {},\n) => {\n  if (magicalBraces) {\n    return windowsPathsNoEscape ?\n        s.replace(/\\[([^/\\\\])\\]/g, '$1')\n      : s\n          .replace(/((?!\\\\).|^)\\[([^/\\\\])\\]/g, '$1$2')\n          .replace(/\\\\([^/])/g, '$1')\n  }\n  return windowsPathsNoEscape ?\n      s.replace(/\\[([^/\\\\{}])\\]/g, '$1')\n    : s\n        .replace(/((?!\\\\).|^)\\[([^/\\\\{}])\\]/g, '$1$2')\n        .replace(/\\\\([^/{}])/g, '$1')\n}\n"]}
\ No newline at end of file
diff --git a/node_modules/minimatch/package.json b/node_modules/minimatch/package.json
index 74b945eb..75dee484 100644
--- a/node_modules/minimatch/package.json
+++ b/node_modules/minimatch/package.json
@@ -2,7 +2,7 @@
   "author": "Isaac Z. Schlueter  (http://blog.izs.me)",
   "name": "minimatch",
   "description": "a glob matcher in javascript",
-  "version": "10.1.2",
+  "version": "10.2.6",
   "repository": {
     "type": "git",
     "url": "git@github.com:isaacs/minimatch"
@@ -34,20 +34,25 @@
     "presnap": "npm run prepare",
     "test": "tap",
     "snap": "tap",
-    "format": "prettier --write . --log-level warn",
+    "format": "prettier --write .",
     "benchmark": "node benchmark/index.js",
-    "typedoc": "typedoc --tsconfig .tshy/esm.json ./src/*.ts"
+    "typedoc": "typedoc --tsconfig .tshy/esm.json ./src/*.ts",
+    "lint": "oxlint --fix src test",
+    "postsnap": "npm run lint",
+    "postlint": "npm run format"
   },
   "engines": {
-    "node": "20 || >=22"
+    "node": "18 || 20 || >=22"
   },
   "devDependencies": {
-    "@types/node": "^24.0.0",
+    "@types/node": "^26.1.2",
     "mkdirp": "^3.0.1",
-    "prettier": "^3.6.2",
-    "tap": "^21.1.0",
-    "tshy": "^3.0.2",
-    "typedoc": "^0.28.5"
+    "oxlint": "^1.76.0",
+    "oxlint-tsgolint": "^7.0.2001",
+    "prettier": "^3.9.6",
+    "tap": "^21.7.5",
+    "tshy": "^4.1.3",
+    "typedoc": "^0.28.20"
   },
   "funding": {
     "url": "https://github.com/sponsors/isaacs"
@@ -57,11 +62,12 @@
     "exports": {
       "./package.json": "./package.json",
       ".": "./src/index.ts"
-    }
+    },
+    "selfLink": false
   },
   "type": "module",
   "module": "./dist/esm/index.js",
   "dependencies": {
-    "@isaacs/brace-expansion": "^5.0.1"
+    "brace-expansion": "^5.0.8"
   }
 }
diff --git a/node_modules/mocha/README.md b/node_modules/mocha/README.md
index c82fc76b..dca45e5f 100644
--- a/node_modules/mocha/README.md
+++ b/node_modules/mocha/README.md
@@ -1,15 +1,15 @@
 

- Mocha test framework logo + Mocha test framework logo

-

☕️ Simple, flexible, fun JavaScript test framework for Node.js & The Browser ☕️

+

☕️ Classic, reliable, trusted test framework for Node.js and the browser ☕️

-NPM Version +npm version 12.0.0-9.6-9.3 Node Version [![GitHub Actions Build Status](https://github.com/mochajs/mocha/actions/workflows/mocha.yml/badge.svg)](https://github.com/mochajs/mocha/actions/workflows/mocha.yml) -Coverage Status +Codecov Coverage Status
@@ -36,7 +36,7 @@ [Become a backer](https://opencollective.com/mochajs) and show your support to our open source project on [our site](https://mochajs.org/#backers). - +Mocha's backers on Open Collective ## Sponsors diff --git a/node_modules/mocha/bin/_mocha b/node_modules/mocha/bin/_mocha deleted file mode 100755 index 9572d94c..00000000 --- a/node_modules/mocha/bin/_mocha +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env node -"use strict"; - -/** - * This file remains for backwards compatibility only. - * Don't put stuff in this file. - * @see module:lib/cli - */ - -require("../lib/cli").main(); diff --git a/node_modules/mocha/bin/mocha.js b/node_modules/mocha/bin/mocha.js index 01a97232..f06aaddf 100755 --- a/node_modules/mocha/bin/mocha.js +++ b/node_modules/mocha/bin/mocha.js @@ -1,7 +1,5 @@ #!/usr/bin/env node -"use strict"; - /** * This wrapper executable checks for known node flags and appends them when found, * before invoking the "real" executable (`lib/cli/cli.js`) @@ -10,16 +8,22 @@ * @private */ -const os = require("node:os"); -const { loadOptions } = require("../lib/cli/options"); -const { +import d from "debug"; +import { spawn } from "node:child_process"; +import fs from "node:fs"; +import os from "node:os"; +import { unparseMochaArgs } from "../lib/cli/unparse-args.js"; + +import { main } from "../lib/cli/cli.js"; +import { loadOptions } from "../lib/cli/options.cjs"; +import { unparseNodeFlags, isNodeFlag, impliesNoTimeouts, -} = require("../lib/cli/node-flags"); -const unparse = require("yargs-unparser"); -const debug = require("debug")("mocha:cli:mocha"); -const { aliases } = require("../lib/cli/run-option-metadata"); +} from "../lib/cli/node-flags.cjs"; +import { fileURLToPath } from "node:url"; + +const debug = d.debug("mocha:cli:mocha"); const mochaArgs = {}; const nodeArgs = {}; @@ -80,8 +84,7 @@ if (mochaArgs._) { } if (mochaArgs["node-option"] || Object.keys(nodeArgs).length || hasInspect) { - const { spawn } = require("node:child_process"); - const mochaPath = require.resolve("../lib/cli/cli.js"); + const mochaPath = fileURLToPath(import.meta.resolve("../lib/cli/cli.js")); const nodeArgv = (mochaArgs["node-option"] && @@ -93,10 +96,21 @@ if (mochaArgs["node-option"] || Object.keys(nodeArgs).length || hasInspect) { debug("final node argv", nodeArgv); + const stdio = ["inherit", "inherit", "inherit"]; + mochaArgs._ = mochaArgs._?.map((arg) => { + const match = /^\/dev\/fd\/(\d+)$/.exec(arg); + if (!match || !fs.existsSync(arg)) { + return arg; + } + + stdio.push(Number(match[1])); + return `/dev/fd/${stdio.length - 1}`; + }); + const args = [].concat( nodeArgv, mochaPath, - unparse(mochaArgs, { alias: aliases }), + unparseMochaArgs(mochaArgs), ); debug( @@ -106,7 +120,7 @@ if (mochaArgs["node-option"] || Object.keys(nodeArgs).length || hasInspect) { ); const proc = spawn(process.execPath, args, { - stdio: "inherit", + stdio, }); proc.on("exit", (code, signal) => { @@ -146,5 +160,5 @@ if (mochaArgs["node-option"] || Object.keys(nodeArgs).length || hasInspect) { }); } else { debug("running Mocha in-process"); - require("../lib/cli/cli").main([], mochaArgs); + main([], mochaArgs); } diff --git a/node_modules/mocha/browser-entry.js b/node_modules/mocha/browser-entry.js index 3c40c5d7..2ca3f409 100644 --- a/node_modules/mocha/browser-entry.js +++ b/node_modules/mocha/browser-entry.js @@ -1,17 +1,13 @@ -"use strict"; +import BrowserStdout from "browser-stdout"; -/* eslint no-unused-vars: off */ -/* eslint-env commonjs */ +import { parseQuery } from "./lib/browser/parse-query.js"; +import { highlightTags } from "./lib/browser/highlight-tags.js"; +import Mocha from "./lib/mocha.cjs"; /** * Shim process.stdout. */ - -process.stdout = require("browser-stdout")({ label: false }); - -var parseQuery = require("./lib/browser/parse-query"); -var highlightTags = require("./lib/browser/highlight-tags"); -var Mocha = require("./lib/mocha"); +process.stdout = BrowserStdout({ label: false }); /** * Create a Mocha instance. @@ -27,9 +23,6 @@ var mocha = new Mocha({ reporter: "html" }); var Date = global.Date; var setTimeout = global.setTimeout; -var setInterval = global.setInterval; -var clearTimeout = global.clearTimeout; -var clearInterval = global.clearInterval; var uncaughtExceptionHandlers = []; @@ -215,7 +208,7 @@ global.mocha = mocha; // for bundlers: enable `import {describe, it} from 'mocha'` // `bdd` interface only // prettier-ignore -[ +[ 'describe', 'context', 'it', 'specify', 'xdescribe', 'xcontext', 'xit', 'xspecify', 'before', 'beforeEach', 'afterEach', 'after' @@ -223,4 +216,4 @@ global.mocha = mocha; mocha[key] = global[key]; }); -module.exports = mocha; +export default mocha; diff --git a/node_modules/mocha/index.js b/node_modules/mocha/index.js index 6c972d99..5a5d9a2e 100644 --- a/node_modules/mocha/index.js +++ b/node_modules/mocha/index.js @@ -1,3 +1,2 @@ -"use strict"; - -module.exports = require("./lib/mocha"); +export { default } from "./lib/mocha.cjs"; +export * from "./lib/mocha.cjs"; diff --git a/node_modules/mocha/lib/browser/highlight-tags.js b/node_modules/mocha/lib/browser/highlight-tags.js index 3f2dca46..ebdfa271 100644 --- a/node_modules/mocha/lib/browser/highlight-tags.js +++ b/node_modules/mocha/lib/browser/highlight-tags.js @@ -1,5 +1,3 @@ -"use strict"; - /** * Highlight the given string of `js`. * @@ -31,9 +29,9 @@ function highlight(js) { * @private * @param {string} name */ -module.exports = function highlightTags(name) { +export function highlightTags(name) { var code = document.getElementById("mocha").getElementsByTagName(name); for (var i = 0, len = code.length; i < len; ++i) { code[i].innerHTML = highlight(code[i].innerHTML); } -}; +} diff --git a/node_modules/mocha/lib/browser/parse-query.js b/node_modules/mocha/lib/browser/parse-query.js index 7841a437..941f8e68 100644 --- a/node_modules/mocha/lib/browser/parse-query.js +++ b/node_modules/mocha/lib/browser/parse-query.js @@ -1,5 +1,3 @@ -"use strict"; - /** * Parse the given `qs`. * @@ -7,18 +5,18 @@ * @param {string} qs * @return {Object} */ -module.exports = function parseQuery(qs) { +export function parseQuery(qs) { return qs .replace("?", "") .split("&") .reduce(function (obj, pair) { var i = pair.indexOf("="); var key = pair.slice(0, i); - var val = pair.slice(++i); + var val = pair.slice(i + 1); // Due to how the URLSearchParams API treats spaces obj[key] = decodeURIComponent(val.replace(/\+/g, "%20")); return obj; }, {}); -}; +} diff --git a/node_modules/mocha/lib/cli/cli.js b/node_modules/mocha/lib/cli/cli.js index 81475a42..1a509137 100755 --- a/node_modules/mocha/lib/cli/cli.js +++ b/node_modules/mocha/lib/cli/cli.js @@ -1,33 +1,100 @@ -"use strict"; - /** * Contains CLI entry point and public API for programmatic usage in Node.js. - * - Option parsing is handled by {@link https://npm.im/yargs yargs}. + * - Option parsing is handled by {@link module:lib/cli/parse-args}. * - If executed via `node`, this module will run {@linkcode module:lib/cli.main main()}. * @public * @module lib/cli */ -const debug = require("debug")("mocha:cli:cli"); -const symbols = require("log-symbols"); -const yargs = require("yargs"); -const path = require("node:path"); -const { - loadRc, - loadPkgRc, - loadOptions, - YARGS_PARSER_CONFIG, -} = require("./options"); -const lookupFiles = require("./lookup-files"); -const commands = require("./commands"); -const pc = require("picocolors"); -const { - repository, - homepage, - version, - discord, -} = require("../../package.json"); -const { cwd } = require("../utils"); +import debugModule from "debug"; +import { fileURLToPath } from "node:url"; + +import { loadOptions } from "./options.cjs"; +import { run, init } from "./commands.js"; +import pc from "picocolors"; +import { logSymbols } from "../utils.cjs"; + +import packageJson from "../../package.json" with { type: "json" }; +import { getRunOptionDefinitions } from "./run-option-metadata.cjs"; + +const __filename = fileURLToPath(import.meta.url); + +const debug = debugModule("mocha:cli:cli"); + +const hasFlag = (args, longName, shortName) => + args.includes(`--${longName}`) || args.includes(`-${shortName}`); + +const formatOption = (option) => { + const aliases = option.aliases.map((alias) => + alias.length === 1 ? `-${alias}` : `--${alias}`, + ); + return [`--${option.name}`].concat(aliases).join(", "); +}; + +const printVersion = () => { + console.log(packageJson.version); +}; + +const printHelp = () => { + const options = getRunOptionDefinitions() + .filter((option) => option.description) + .map( + (option) => ` ${formatOption(option).padEnd(34)} ${option.description}`, + ) + .join("\n"); + + console.log(`Usage: mocha [spec..] + mocha init + +Commands: + init ${init.description} + +Options: +${options} + --help, -h${"".padEnd(24)} Show usage information & exit + --version, -V${"".padEnd(21)} Show version number & exit + +Mocha Resources + Chat: ${packageJson.discord} + GitHub: ${packageJson.repository.url} + Docs: ${packageJson.homepage}`); +}; + +const fail = (msg, err) => { + debug("caught error before command handler: %O", err); + printHelp(); + console.error(`\n${logSymbols.error} ${pc.red("ERROR:")} ${msg}`); + if (!msg && err) { + // Log raw error and stack when an unexpected error is encountered, to + // make debugging easier (instead of an inactionable "ERROR: null"). + console.error(err); + } + process.exit(1); +}; + +const failRunPreparation = (err) => { + console.error(`\n${logSymbols.error} ${pc.red("ERROR:")}`, err); + process.exit(1); +}; + +const runCommand = async (args) => { + args.spec = args.spec || (args._ && args._.length ? args._ : ["test"]); + + try { + run.normalizeRunOptions(args); + run.validateRunOptions(args); + } catch (err) { + fail(err && err.message, err); + } + + try { + await run.prepareRunOptions(args); + } catch (err) { + failRunPreparation(err); + } + + return run.handler(args); +}; /** * - Accepts an `Array` of arguments @@ -38,12 +105,8 @@ const { cwd } = require("../utils"); * @param {string[]} argv - Array of arguments to parse, or by default the lovely `process.argv.slice(2)` * @param {object} [mochaArgs] - Object of already parsed Mocha arguments (by bin/mocha) */ -exports.main = (argv = process.argv.slice(2), mochaArgs) => { +export function main(argv = process.argv.slice(2), mochaArgs) { debug("entered main with raw args", argv); - // ensure we can require() from current working directory - if (typeof module.paths !== "undefined") { - module.paths.push(cwd(), path.resolve("node_modules")); - } try { Error.stackTraceLimit = Infinity; // configurable via --stack-trace-limit? @@ -51,46 +114,32 @@ exports.main = (argv = process.argv.slice(2), mochaArgs) => { debug("unable to set Error.stackTraceLimit = Infinity", err); } - var args = mochaArgs || loadOptions(argv); - - yargs() - .scriptName("mocha") - .command(commands.run) - .command(commands.init) - .updateStrings({ - "Positionals:": "Positional Arguments", - "Options:": "Other Options", - "Commands:": "Commands", - }) - .fail((msg, err, yargs) => { - debug("caught error sometime before command handler: %O", err); - yargs.showHelp(); - console.error(`\n${symbols.error} ${pc.red("ERROR:")} ${msg}`); - process.exit(1); - }) - .help("help", "Show usage information & exit") - .alias("help", "h") - .version("version", "Show version number & exit", version) - .alias("version", "V") - .wrap(process.stdout.columns ? Math.min(process.stdout.columns, 80) : 80) - .epilog( - `${pc.reset("Mocha Resources")} - Chat: ${pc.magenta(discord)} - GitHub: ${pc.blue(repository.url)} - Docs: ${pc.yellow(homepage)} - `, - ) - .parserConfiguration(YARGS_PARSER_CONFIG) - .config(args) - .parse(args._); -}; + try { + const args = mochaArgs ?? loadOptions(argv); + if (hasFlag(argv, "help", "h") || args.help || args.h) { + printHelp(); + process.exit(0); + } -exports.lookupFiles = lookupFiles; -exports.loadOptions = loadOptions; -exports.loadPkgRc = loadPkgRc; -exports.loadRc = loadRc; + if (hasFlag(argv, "version", "V") || args.version || args.V) { + printVersion(); + process.exit(0); + } + + const command = (args._ && args._[0]) || argv[0]; + if (command === "init") { + const commandArgs = + args._ && args._[0] === "init" ? args._.slice(1) : argv.slice(1); + return init.handler(init.parse(commandArgs)); + } + + return runCommand(args); + } catch (err) { + fail(err && err.message, err); + } +} // allow direct execution -if (require.main === module) { - exports.main(); +if (__filename === process.argv[1]) { + main(); } diff --git a/node_modules/mocha/lib/cli/collect-files.js b/node_modules/mocha/lib/cli/collect-files.cjs similarity index 94% rename from node_modules/mocha/lib/cli/collect-files.js rename to node_modules/mocha/lib/cli/collect-files.cjs index 020e86e6..0440fbfb 100644 --- a/node_modules/mocha/lib/cli/collect-files.js +++ b/node_modules/mocha/lib/cli/collect-files.cjs @@ -4,9 +4,9 @@ const path = require("node:path"); const pc = require("picocolors"); const debug = require("debug")("mocha:cli:run:helpers"); const { minimatch } = require("minimatch"); -const { NO_FILES_MATCH_PATTERN } = require("../error-constants").constants; -const lookupFiles = require("./lookup-files"); -const { castArray } = require("../utils"); +const { NO_FILES_MATCH_PATTERN } = require("../error-constants.js").constants; +const { lookupFiles } = require("./lookup-files.js"); +const { castArray } = require("../utils.cjs"); /** * Exports a function that collects test files from CLI parameters. diff --git a/node_modules/mocha/lib/cli/commands.js b/node_modules/mocha/lib/cli/commands.js index b3383d1e..5b5d8323 100644 --- a/node_modules/mocha/lib/cli/commands.js +++ b/node_modules/mocha/lib/cli/commands.js @@ -1,14 +1,9 @@ -"use strict"; - /** - * Exports Yargs commands - * @see https://github.com/yargs/yargs/blob/main/docs/advanced.md + * Exports Mocha CLI commands. * @private * @module */ -module.exports = { - init: require("./init"), - // default command - run: require("./run"), -}; +export * as init from "./init.js"; +// default command +export { default as run } from "./run.cjs"; diff --git a/node_modules/mocha/lib/cli/config.js b/node_modules/mocha/lib/cli/config.cjs similarity index 84% rename from node_modules/mocha/lib/cli/config.js rename to node_modules/mocha/lib/cli/config.cjs index 20682811..03b68c92 100644 --- a/node_modules/mocha/lib/cli/config.js +++ b/node_modules/mocha/lib/cli/config.cjs @@ -11,8 +11,8 @@ const fs = require("node:fs"); const path = require("node:path"); const debug = require("debug")("mocha:cli:config"); const findUp = require("find-up"); -const { createUnparsableFileError } = require("../errors"); -const utils = require("../utils"); +const { createUnparsableFileError } = require("../errors.js"); +const utils = require("../utils.cjs"); /** * These are the valid config files, in order of precedence; @@ -21,9 +21,11 @@ const utils = require("../utils"); * The user should still be able to explicitly specify a file. * @private */ +// This is documented publicly in `configuring.mdx` exports.CONFIG_FILES = [ ".mocharc.cjs", ".mocharc.js", + ".mocharc.mjs", ".mocharc.yaml", ".mocharc.yml", ".mocharc.jsonc", @@ -52,7 +54,7 @@ const parsers = (exports.parsers = { }, json: (filepath) => JSON.parse( - require("strip-json-comments")(fs.readFileSync(filepath, "utf8")), + require("strip-json-comments").default(fs.readFileSync(filepath, "utf8")), ), }); @@ -65,15 +67,16 @@ const parsers = (exports.parsers = { * @returns {Object} Parsed config object */ exports.loadConfig = (filepath) => { - let config = {}; + let config; debug("loadConfig: trying to parse config at %s", filepath); const ext = path.extname(filepath); try { if (ext === ".yml" || ext === ".yaml") { config = parsers.yaml(filepath); - } else if (ext === ".js" || ext === ".cjs") { - config = parsers.js(filepath); + } else if (ext === ".js" || ext === ".cjs" || ext === ".mjs") { + const parsedConfig = parsers.js(filepath); + config = parsedConfig.default ?? parsedConfig; } else { config = parsers.json(filepath); } diff --git a/node_modules/mocha/lib/cli/index.cjs b/node_modules/mocha/lib/cli/index.cjs new file mode 100644 index 00000000..3e313d8e --- /dev/null +++ b/node_modules/mocha/lib/cli/index.cjs @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = require("./cli.js"); diff --git a/node_modules/mocha/lib/cli/index.js b/node_modules/mocha/lib/cli/index.js deleted file mode 100644 index 95fcfe5a..00000000 --- a/node_modules/mocha/lib/cli/index.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = require("./cli"); diff --git a/node_modules/mocha/lib/cli/init.js b/node_modules/mocha/lib/cli/init.js index 8b5fafee..30df24a9 100644 --- a/node_modules/mocha/lib/cli/init.js +++ b/node_modules/mocha/lib/cli/init.js @@ -1,5 +1,3 @@ -"use strict"; - /** * Command module for "init" command * @@ -7,22 +5,24 @@ * @module */ -const fs = require("node:fs"); -const path = require("node:path"); +import fs from "node:fs"; +import path from "node:path"; -exports.command = "init "; +export const command = "init "; -exports.description = "create a client-side Mocha setup at "; +export const description = "create a client-side Mocha setup at "; -exports.builder = (yargs) => - yargs.positional("path", { - type: "string", - normalize: true, - }); +export const parse = (args) => { + const [pathArg] = args; + if (!pathArg) { + throw new Error("Not enough non-option arguments: got 0, need at least 1"); + } + return { _: [], path: path.normalize(pathArg) }; +}; -exports.handler = (argv) => { +export const handler = (argv) => { const destdir = argv.path; - const srcdir = path.join(__dirname, "..", ".."); + const srcdir = path.join(import.meta.dirname, "..", ".."); fs.mkdirSync(destdir, { recursive: true }); const css = fs.readFileSync(path.join(srcdir, "mocha.css")); const js = fs.readFileSync(path.join(srcdir, "mocha.js")); diff --git a/node_modules/mocha/lib/cli/lookup-files.js b/node_modules/mocha/lib/cli/lookup-files.js index 878b4993..764588f7 100644 --- a/node_modules/mocha/lib/cli/lookup-files.js +++ b/node_modules/mocha/lib/cli/lookup-files.js @@ -1,17 +1,18 @@ -"use strict"; /** * Contains `lookupFiles`, which takes some globs/dirs/options and returns a list of files. * @module * @private */ -var fs = require("node:fs"); -var path = require("node:path"); -var glob = require("glob"); -var errors = require("../errors"); -var createNoFilesMatchPatternError = errors.createNoFilesMatchPatternError; -var createMissingArgumentError = errors.createMissingArgumentError; -const debug = require("debug")("mocha:cli:lookup-files"); +import fs from "node:fs"; +import path from "node:path"; +import * as glob from "glob"; +import { + createNoFilesMatchPatternError, + createMissingArgumentError, +} from "../errors.js"; +import debugModule from "debug"; +const debug = debugModule("mocha:cli:lookup-files"); /** * Determines if pathname would be a "hidden" file (or directory) on UN*X. @@ -65,11 +66,7 @@ const hasMatchingExtname = (pathname, exts = []) => * @throws {Error} if no files match pattern. * @throws {TypeError} if `filepath` is directory and `extensions` not provided. */ -module.exports = function lookupFiles( - filepath, - extensions = [], - recursive = false, -) { +export function lookupFiles(filepath, extensions = [], recursive = false) { const files = []; let stat; @@ -109,10 +106,10 @@ module.exports = function lookupFiles( // Handle file try { stat = fs.statSync(filepath); - if (stat.isFile()) { - return filepath; + if (stat.isFile() || stat.isFIFO()) { + return [filepath]; } - } catch (err) { + } catch { // ignore error return; } @@ -130,7 +127,7 @@ module.exports = function lookupFiles( } return; } - } catch (ignored) { + } catch { return; } if (!extensions.length) { @@ -152,4 +149,4 @@ module.exports = function lookupFiles( }); return files; -}; +} diff --git a/node_modules/mocha/lib/cli/node-flags.js b/node_modules/mocha/lib/cli/node-flags.cjs similarity index 66% rename from node_modules/mocha/lib/cli/node-flags.js rename to node_modules/mocha/lib/cli/node-flags.cjs index 8b8ffe02..f5b46d24 100644 --- a/node_modules/mocha/lib/cli/node-flags.js +++ b/node_modules/mocha/lib/cli/node-flags.cjs @@ -7,8 +7,11 @@ */ const nodeFlags = process.allowedNodeEnvironmentFlags; -const { isMochaFlag } = require("./run-option-metadata"); -const unparse = require("yargs-unparser"); +const { + isMochaFlag, + stripLeadingDashes, +} = require("./run-option-metadata.cjs"); +const { unparseNodeFlags } = require("./unparse-args.js"); /** * These flags are considered "debug" flags. @@ -34,14 +37,14 @@ const debugFlags = new Set(["inspect", "inspect-brk"]); * @returns {boolean} If the flag is considered a "Node" flag. * @private */ -exports.isNodeFlag = (flag, bareword = true) => { +function isNodeFlag(flag, bareword = true) { if (!bareword) { // check if the flag begins with dashes; if not, not a node flag. if (!/^--?/.test(flag)) { return false; } // strip the leading dashes to match against subsequent checks - flag = flag.replace(/^--?/, ""); + flag = stripLeadingDashes(flag); } return ( // check actual node flags from `process.allowedNodeEnvironmentFlags`, @@ -53,7 +56,7 @@ exports.isNodeFlag = (flag, bareword = true) => { flag, ) ); -}; +} /** * Returns `true` if the flag is a "debug-like" flag. These require timeouts @@ -62,24 +65,10 @@ exports.isNodeFlag = (flag, bareword = true) => { * @returns {boolean} * @private */ -exports.impliesNoTimeouts = (flag) => debugFlags.has(flag); +function impliesNoTimeouts(flag) { + return debugFlags.has(flag); +} -/** - * All non-strictly-boolean arguments to node--those with values--must specify those values using `=`, e.g., `--inspect=0.0.0.0`. - * Unparse these arguments using `yargs-unparser` (which would result in `--inspect 0.0.0.0`), then supply `=` where we have values. - * There's probably an easier or more robust way to do this; fixes welcome - * @param {Object} opts - Arguments object - * @returns {string[]} Unparsed arguments using `=` to specify values - * @private - */ -exports.unparseNodeFlags = (opts) => { - var args = unparse(opts); - return args.length - ? args - .join(" ") - .split(/\b/) - .map((arg) => (arg === " " ? "=" : arg)) - .join("") - .split(" ") - : []; -}; +exports.isNodeFlag = isNodeFlag; +exports.impliesNoTimeouts = impliesNoTimeouts; +exports.unparseNodeFlags = unparseNodeFlags; diff --git a/node_modules/mocha/lib/cli/one-and-dones.js b/node_modules/mocha/lib/cli/one-and-dones.js index dc3a738f..aba3ee99 100644 --- a/node_modules/mocha/lib/cli/one-and-dones.js +++ b/node_modules/mocha/lib/cli/one-and-dones.js @@ -1,5 +1,3 @@ -"use strict"; - /** * Contains "command" code for "one-and-dones"--options passed * to Mocha which cause it to just dump some info and exit. @@ -8,7 +6,7 @@ * @private */ -const Mocha = require("../mocha"); +import Mocha from "../mocha.cjs"; /** * Dumps a sorted list of the enumerable, lower-case keys of some object @@ -43,7 +41,7 @@ const showKeys = (obj) => { * @namespace * @private */ -exports.ONE_AND_DONES = { +const ONE_AND_DONES = { /** * Dump list of built-in interfaces * @private @@ -65,6 +63,8 @@ exports.ONE_AND_DONES = { * @type Set * @private */ -exports.ONE_AND_DONE_ARGS = new Set( - ["help", "h", "version", "V"].concat(Object.keys(exports.ONE_AND_DONES)), +const ONE_AND_DONE_ARGS = new Set( + ["help", "h", "version", "V"].concat(Object.keys(ONE_AND_DONES)), ); + +export { ONE_AND_DONES, ONE_AND_DONE_ARGS }; diff --git a/node_modules/mocha/lib/cli/options.cjs b/node_modules/mocha/lib/cli/options.cjs new file mode 100644 index 00000000..48a6663a --- /dev/null +++ b/node_modules/mocha/lib/cli/options.cjs @@ -0,0 +1,184 @@ +"use strict"; + +/** + * Main entry point for handling filesystem-based configuration, + * whether that's a config file or `package.json` or whatever. + * @module lib/cli/options + * @private + */ + +const { readFileSync } = require("node:fs"); +const pc = require("picocolors"); +const { parseMochaArgs } = require("./parse-args.js"); +const { ONE_AND_DONE_ARGS } = require("./one-and-dones.js"); +const mocharc = require("../mocharc.json"); +const { loadConfig, findConfig } = require("./config.cjs"); +const { sync } = require("find-up"); +const debugModule = require("debug"); +const { createUnparsableFileError, isMochaError } = require("../errors.js"); + +const debug = debugModule("mocha:cli:options"); + +/** + * The `parseArgs` function + * @external parseArgs + * @see {@link https://nodejs.org/api/util.html#utilparseargsconfig} + */ + +/** + * An object representing arguments parsed from the CLI + * @memberof external:parseArgs + * @interface Arguments + */ + +/** + * Wrapper around `parseMochaArgs` which applies Mocha's CLI parsing behavior. + * @param {string|string[]} args - Arguments to parse + * @param {Object} defaultValues - Default values of mocharc.json + * @param {...Object} configObjects - Objects to merge into parsed arguments + * @private + * @ignore + */ +const parse = (args = [], defaultValues = {}, ...configObjects) => { + try { + return parseMochaArgs(args, defaultValues, ...configObjects); + } catch (err) { + if (isMochaError(err)) { + throw err; + } + console.error(pc.red(`Error: ${err.message}`)); + process.exit(1); + } +}; + +/** + * Given path to config file in `args.config`, attempt to load & parse config file. + * @param {Object} [args] - Arguments object + * @param {string|boolean} [args.config] - Path to config file or `false` to skip + * @public + * @alias module:lib/cli.loadRc + * @returns {external:parseArgs.Arguments|void} Parsed config, or nothing if `args.config` is `false` + */ +const loadRc = (args = {}) => { + if (args.config !== false) { + const config = args.config || findConfig(); + return config ? loadConfig(config) : {}; + } +}; + +/** + * Given path to `package.json` in `args.package`, attempt to load config from `mocha` prop. + * If `args.package` is falsy, attempts to load from default package location (`./package.json`) + * @param {Object} [args] - Arguments object + * @param {string|boolean} [args.config] - Path to `package.json` or `false` to use default + * @public + * @alias module:lib/cli.loadPkgRc + * @returns {external:parseArgs.Arguments|void} Parsed config. Throws if unparsableF. Empty object if file not found. + */ +const loadPkgRc = (args = {}) => { + let result; + if (args.package === false) { + return result; + } + result = {}; + const filepath = args.package || sync(mocharc.package); + if (filepath) { + let configData; + try { + configData = readFileSync(filepath, "utf8"); + } catch (err) { + // If `args.package` was explicitly specified, throw an error + if (filepath == args.package) { + throw createUnparsableFileError( + `Unable to read ${filepath}: ${err}`, + filepath, + ); + } else { + debug("failed to read default package.json at %s; ignoring", filepath); + return result; + } + } + try { + const pkg = JSON.parse(configData); + if (pkg.mocha) { + debug("`mocha` prop of package.json parsed: %O", pkg.mocha); + result = pkg.mocha; + } else { + debug("no config found in %s", filepath); + } + } catch (err) { + // If JSON failed to parse, throw an error. + throw createUnparsableFileError( + `Unable to parse ${filepath}: ${err}`, + filepath, + ); + } + } + return result; +}; + +/** + * Priority list: + * + * 1. Command-line args + * 2. `MOCHA_OPTIONS` environment variable. + * 3. RC file (`.mocharc.c?js`, `.mocharc.ya?ml`, `mocharc.json`) + * 4. `mocha` prop of `package.json` + * 5. default configuration (`lib/mocharc.json`) + * + * If a {@link module:lib/cli/one-and-dones.ONE_AND_DONE_ARGS "one-and-done" option} is present in the `argv` array, no external config files will be read. + * @summary Parses options read from `.mocharc.*` and `package.json`. + * @param {string|string[]} [argv] - Arguments to parse + * @public + * @alias module:lib/cli.loadOptions + * @returns {external:parseArgs.Arguments} Parsed args from everything + */ +const loadOptions = (argv = []) => { + let args = parse(argv); + // short-circuit: look for a flag that would abort loading of options + if ( + Array.from(ONE_AND_DONE_ARGS).reduce( + (acc, arg) => acc || arg in args, + false, + ) + ) { + return args; + } + + const envConfig = parse(process.env.MOCHA_OPTIONS || ""); + const rcConfig = loadRc(args); + const pkgConfig = loadPkgRc(args); + + if (rcConfig) { + args.config = false; + args._ = args._.concat(rcConfig._ || []); + } + if (pkgConfig) { + args.package = false; + args._ = args._.concat(pkgConfig._ || []); + } + + args = parse( + args._, + mocharc, + args, + envConfig, + rcConfig || {}, + pkgConfig || {}, + ); + + // recombine positional arguments and "spec" + if (args.spec) { + args._ = args._.concat(args.spec); + delete args.spec; + } + + // make unique + args._ = Array.from(new Set(args._)); + + return args; +}; + +exports.loadRc = loadRc; +exports.loadPkgRc = loadPkgRc; +exports.loadOptions = loadOptions; diff --git a/node_modules/mocha/lib/cli/options.js b/node_modules/mocha/lib/cli/options.js deleted file mode 100644 index 007f8943..00000000 --- a/node_modules/mocha/lib/cli/options.js +++ /dev/null @@ -1,337 +0,0 @@ -"use strict"; - -/** - * Main entry point for handling filesystem-based configuration, - * whether that's a config file or `package.json` or whatever. - * @module lib/cli/options - * @private - */ - -const fs = require("node:fs"); -const pc = require("picocolors"); -const yargsParser = require("yargs-parser"); -const { - types, - aliases, - isMochaFlag, - expectedTypeForFlag, -} = require("./run-option-metadata"); -const { ONE_AND_DONE_ARGS } = require("./one-and-dones"); -const mocharc = require("../mocharc.json"); -const { list } = require("./run-helpers"); -const { loadConfig, findConfig } = require("./config"); -const findUp = require("find-up"); -const debug = require("debug")("mocha:cli:options"); -const { isNodeFlag } = require("./node-flags"); -const { - createUnparsableFileError, - createInvalidArgumentTypeError, - createUnsupportedError, -} = require("../errors"); -const { isNumeric } = require("../utils"); - -/** - * The `yargs-parser` namespace - * @external yargsParser - * @see {@link https://npm.im/yargs-parser} - */ - -/** - * An object returned by a configured `yargs-parser` representing arguments - * @memberof external:yargsParser - * @interface Arguments - */ - -/** - * Base yargs parser configuration - * @private - */ -const YARGS_PARSER_CONFIG = { - "combine-arrays": true, - "short-option-groups": false, - "dot-notation": false, - "strip-aliased": true, -}; - -/** - * This is the config pulled from the `yargs` property of Mocha's - * `package.json`, but it also disables camel case expansion as to - * avoid outputting non-canonical keynames, as we need to do some - * lookups. - * @private - * @ignore - */ -const configuration = Object.assign({}, YARGS_PARSER_CONFIG, { - "camel-case-expansion": false, -}); - -/** - * This is a really fancy way to: - * - `array`-type options: ensure unique values and evtl. split comma-delimited lists - * - `boolean`/`number`/`string`- options: use last element when given multiple times - * This is passed as the `coerce` option to `yargs-parser` - * @private - * @ignore - */ -const globOptions = ["spec", "ignore"]; -const coerceOpts = Object.assign( - types.array.reduce( - (acc, arg) => - Object.assign(acc, { - [arg]: (v) => - Array.from(new Set(globOptions.includes(arg) ? v : list(v))), - }), - {}, - ), - types.boolean - .concat(types.string, types.number) - .reduce( - (acc, arg) => - Object.assign(acc, { [arg]: (v) => (Array.isArray(v) ? v.pop() : v) }), - {}, - ), -); - -/** - * We do not have a case when multiple arguments are ever allowed after a flag - * (e.g., `--foo bar baz quux`), so we fix the number of arguments to 1 across - * the board of non-boolean options. - * This is passed as the `narg` option to `yargs-parser` - * @private - * @ignore - */ -const nargOpts = types.array - .concat(types.string, types.number) - .reduce((acc, arg) => Object.assign(acc, { [arg]: 1 }), {}); - -/** - * Throws either "UNSUPPORTED" error or "INVALID_ARG_TYPE" error for numeric positional arguments. - * @param {string[]} allArgs - Stringified args passed to mocha cli - * @param {number} numericArg - Numeric positional arg for which error must be thrown - * @param {Object} parsedResult - Result from `yargs-parser` - * @private - * @ignore - */ -const createErrorForNumericPositionalArg = ( - numericArg, - allArgs, - parsedResult, -) => { - // A flag for `numericArg` exists if: - // 1. A mocha flag immediately preceeded the numericArg in `allArgs` array and - // 2. `numericArg` value could not be assigned to this flag by `yargs-parser` because of incompatible datatype. - const flag = allArgs.find((arg, index) => { - const normalizedArg = arg.replace(/^--?/, ""); - return ( - isMochaFlag(arg) && - allArgs[index + 1] === String(numericArg) && - parsedResult[normalizedArg] !== String(numericArg) - ); - }); - - if (flag) { - throw createInvalidArgumentTypeError( - `Mocha flag '${flag}' given invalid option: '${numericArg}'`, - numericArg, - expectedTypeForFlag(flag), - ); - } else { - throw createUnsupportedError( - `Option ${numericArg} is unsupported by the mocha cli`, - ); - } -}; - -/** - * Wrapper around `yargs-parser` which applies our settings - * @param {string|string[]} args - Arguments to parse - * @param {Object} defaultValues - Default values of mocharc.json - * @param {...Object} configObjects - `configObjects` for yargs-parser - * @private - * @ignore - */ -const parse = (args = [], defaultValues = {}, ...configObjects) => { - // save node-specific args for special handling. - // 1. when these args have a "=" they should be considered to have values - // 2. if they don't, they are just boolean flags - // 3. to avoid explicitly defining the set of them, we tell yargs-parser they - // are ALL boolean flags. - // 4. we can then reapply the values after yargs-parser is done. - const allArgs = Array.isArray(args) ? args : args.split(" "); - const nodeArgs = allArgs.reduce((acc, arg) => { - const pair = arg.split("="); - let flag = pair[0]; - if (isNodeFlag(flag, false)) { - flag = flag.replace(/^--?/, ""); - return acc.concat([[flag, arg.includes("=") ? pair[1] : true]]); - } - return acc; - }, []); - - const result = yargsParser.detailed(args, { - configuration, - configObjects, - default: defaultValues, - coerce: coerceOpts, - narg: nargOpts, - alias: aliases, - string: types.string, - array: types.array, - number: types.number, - boolean: types.boolean.concat(nodeArgs.map((pair) => pair[0])), - }); - if (result.error) { - console.error(pc.red(`Error: ${result.error.message}`)); - process.exit(1); - } - - const numericPositionalArg = result.argv._.find((arg) => isNumeric(arg)); - if (numericPositionalArg) { - createErrorForNumericPositionalArg( - numericPositionalArg, - allArgs, - result.argv, - ); - } - - // reapply "=" arg values from above - nodeArgs.forEach(([key, value]) => { - result.argv[key] = value; - }); - - return result.argv; -}; - -/** - * Given path to config file in `args.config`, attempt to load & parse config file. - * @param {Object} [args] - Arguments object - * @param {string|boolean} [args.config] - Path to config file or `false` to skip - * @public - * @alias module:lib/cli.loadRc - * @returns {external:yargsParser.Arguments|void} Parsed config, or nothing if `args.config` is `false` - */ -const loadRc = (args = {}) => { - if (args.config !== false) { - const config = args.config || findConfig(); - return config ? loadConfig(config) : {}; - } -}; - -module.exports.loadRc = loadRc; - -/** - * Given path to `package.json` in `args.package`, attempt to load config from `mocha` prop. - * @param {Object} [args] - Arguments object - * @param {string|boolean} [args.config] - Path to `package.json` or `false` to skip - * @public - * @alias module:lib/cli.loadPkgRc - * @returns {external:yargsParser.Arguments|void} Parsed config, or nothing if `args.package` is `false` - */ -const loadPkgRc = (args = {}) => { - let result; - if (args.package === false) { - return result; - } - result = {}; - const filepath = args.package || findUp.sync(mocharc.package); - if (filepath) { - let configData; - try { - configData = fs.readFileSync(filepath, "utf8"); - } catch (err) { - // If `args.package` was explicitly specified, throw an error - if (filepath == args.package) { - throw createUnparsableFileError( - `Unable to read ${filepath}: ${err}`, - filepath, - ); - } else { - debug("failed to read default package.json at %s; ignoring", filepath); - return result; - } - } - try { - const pkg = JSON.parse(configData); - if (pkg.mocha) { - debug("`mocha` prop of package.json parsed: %O", pkg.mocha); - result = pkg.mocha; - } else { - debug("no config found in %s", filepath); - } - } catch (err) { - // If JSON failed to parse, throw an error. - throw createUnparsableFileError( - `Unable to parse ${filepath}: ${err}`, - filepath, - ); - } - } - return result; -}; - -module.exports.loadPkgRc = loadPkgRc; - -/** - * Priority list: - * - * 1. Command-line args - * 2. `MOCHA_OPTIONS` environment variable. - * 3. RC file (`.mocharc.c?js`, `.mocharc.ya?ml`, `mocharc.json`) - * 4. `mocha` prop of `package.json` - * 5. default configuration (`lib/mocharc.json`) - * - * If a {@link module:lib/cli/one-and-dones.ONE_AND_DONE_ARGS "one-and-done" option} is present in the `argv` array, no external config files will be read. - * @summary Parses options read from `.mocharc.*` and `package.json`. - * @param {string|string[]} [argv] - Arguments to parse - * @public - * @alias module:lib/cli.loadOptions - * @returns {external:yargsParser.Arguments} Parsed args from everything - */ -const loadOptions = (argv = []) => { - let args = parse(argv); - // short-circuit: look for a flag that would abort loading of options - if ( - Array.from(ONE_AND_DONE_ARGS).reduce( - (acc, arg) => acc || arg in args, - false, - ) - ) { - return args; - } - - const envConfig = parse(process.env.MOCHA_OPTIONS || ""); - const rcConfig = loadRc(args); - const pkgConfig = loadPkgRc(args); - - if (rcConfig) { - args.config = false; - args._ = args._.concat(rcConfig._ || []); - } - if (pkgConfig) { - args.package = false; - args._ = args._.concat(pkgConfig._ || []); - } - - args = parse( - args._, - mocharc, - args, - envConfig, - rcConfig || {}, - pkgConfig || {}, - ); - - // recombine positional arguments and "spec" - if (args.spec) { - args._ = args._.concat(args.spec); - delete args.spec; - } - - // make unique - args._ = Array.from(new Set(args._)); - - return args; -}; - -module.exports.loadOptions = loadOptions; -module.exports.YARGS_PARSER_CONFIG = YARGS_PARSER_CONFIG; diff --git a/node_modules/mocha/lib/cli/parse-args.js b/node_modules/mocha/lib/cli/parse-args.js new file mode 100644 index 00000000..bb6aaf89 --- /dev/null +++ b/node_modules/mocha/lib/cli/parse-args.js @@ -0,0 +1,440 @@ +import { parseArgs } from "node:util"; +import { + createInvalidArgumentTypeError, + createUnsupportedError, +} from "../errors.js"; +import { isNumeric } from "../utils.cjs"; +import { list } from "./run-helpers.cjs"; +import { + aliases, + expectedTypeForFlag, + isMochaFlag, + stripLeadingDashes, + types, +} from "./run-option-metadata.cjs"; +import { isNodeFlag } from "./node-flags.cjs"; +import debugModule from "debug"; + +const debug = debugModule("mocha:cli:parse-args"); +const globOptions = ["spec", "ignore"]; +const aliasToCanonical = Object.entries(aliases).reduce( + (acc, [canonical, optionAliases]) => { + optionAliases.forEach((alias) => { + acc[alias] = canonical; + }); + return acc; + }, + {}, +); + +const canonicalOptionName = (name) => aliasToCanonical[name] || name; + +const optionTypeByName = Object.entries(types).reduce((acc, [type, names]) => { + names.forEach((name) => { + acc[name] = type; + }); + return acc; +}, {}); + +const arrayOptions = new Set(types.array); +const booleanOptions = new Set(types.boolean); +const numberOptions = new Set(types.number); +const scalarOptions = new Set(types.boolean.concat(types.string, types.number)); + +/** + * Directly-passed Node/V8 flags are not a fixed list known to this parser. When + * we see them, define them as boolean options for parseArgs(), then reapply any + * values from equals-form flags after parsing. + */ +const createParseArgsOptions = (nodeArgs) => { + const options = {}; + + Object.entries(optionTypeByName).forEach(([name, type]) => { + const short = (aliases[name] || []).find((alias) => alias.length === 1); + options[name] = { + type: type === "boolean" ? "boolean" : "string", + multiple: type !== "boolean", + }; + if (short) { + options[name].short = short; + } + }); + + nodeArgs.forEach(([name]) => { + options[name] = { type: "boolean" }; + }); + + return options; +}; + +const toArray = (value) => { + if (value === undefined) { + return []; + } + return Array.isArray(value) ? value : [value]; +}; + +// Array-type options should have unique values, with comma-delimited values +// split unless the option is a glob where commas can be part of the pattern. +const coerceArrayOption = (name, value) => { + if ( + name === "reporter-option" && + value && + typeof value === "object" && + !Array.isArray(value) + ) { + return value; + } + + if ( + name === "reporter-option" && + Array.isArray(value) && + value.every( + (item) => item && typeof item === "object" && !Array.isArray(item), + ) + ) { + return Object.assign({}, ...value); + } + const values = toArray(value); + return Array.from( + new Set(globOptions.includes(name) ? values : list(values)), + ); +}; + +// Boolean/string/number options use the last value when given multiple times. +const coerceScalarOption = (name, value) => { + const scalar = Array.isArray(value) ? value[value.length - 1] : value; + + if (booleanOptions.has(name)) { + if (scalar === "false") { + return false; + } + if (scalar === "true") { + return true; + } + } + + return scalar; +}; + +const coerceNumberOption = (value) => { + const scalar = Array.isArray(value) ? value[value.length - 1] : value; + return scalar === undefined ? scalar : Number(scalar); +}; + +const mergeValue = (existing, next) => { + if (existing === undefined) { + return next; + } + return toArray(existing).concat(toArray(next)); +}; + +const mergeConfigObjects = (defaultValues, configObjects) => { + const defaultArrayOptions = new Set(); + + return [defaultValues] + .concat(configObjects.slice().reverse()) + .reduce((merged, config) => { + if (!config) { + return merged; + } + + Object.entries(config).forEach(([rawName, value]) => { + const name = canonicalOptionName(rawName); + if (name === "_") { + merged._ = mergeValue(value, merged._); + } else if (arrayOptions.has(name)) { + if (config === defaultValues) { + defaultArrayOptions.add(name); + merged[name] = value; + } else if (defaultArrayOptions.has(name)) { + defaultArrayOptions.delete(name); + merged[name] = value; + } else { + merged[name] = mergeValue(value, merged[name]); + } + } else { + merged[name] = value; + } + }); + + return merged; + }, {}); +}; + +const preprocessArgs = (allArgs) => { + return allArgs.map((arg) => { + const noPrefix = stripLeadingDashes(arg); + const [name, ...rest] = noPrefix.split("="); + const canonical = canonicalOptionName(name.replace(/^no-/, "")); + const negated = name.startsWith("no-"); + const prefix = arg.startsWith("--") ? "--" : arg.startsWith("-") ? "-" : ""; + + if (!prefix || name === canonical || name.length === 1) { + return arg; + } + + const normalizedName = negated ? `no-${canonical}` : canonical; + return `${prefix}${normalizedName}${rest.length ? `=${rest.join("=")}` : ""}`; + }); +}; + +const requiresValue = (name) => { + const canonical = canonicalOptionName(name); + return ( + arrayOptions.has(canonical) || + types.string.includes(canonical) || + numberOptions.has(canonical) + ); +}; + +/** + * Splits for downstream handling. + * Does not apply Mocha-specific logic. + * If arg is already string array, returns arg. + * Respects escaped chars and quoted strings. + * @param {string|string[]} args Input to be split, e.g. `"--grep -1"` + * @returns {string[]} One entry per CLI arg-equivalent + * @sample + * ```js + * const x = splitArgs("--timeout -1 --grep 'foo \' bar' --color"); + * x === ["--timeout", "-1", "--grep", "foo ' bar", "--color"]; // true + * ``` + */ +const splitArgs = (args) => { + debug(`starting splitArgs(${args})`); + if (!args) { + debug("splitArgs took in falsy value, returning empty array"); + return []; + } + + if (Array.isArray(args)) { + debug("splitArgs took in array, returning argument unchanged"); + return args; + } + + const result = []; + let current = ""; + let tokenStarted = false; + let quote = null; + let escaped = false; + + for (const char of args) { + if (escaped) { + current += char; + tokenStarted = true; + escaped = false; + continue; + } + + if (char === "\\") { + tokenStarted = true; + escaped = true; + continue; + } + + if (quote) { + if (char === quote) { + quote = null; + } else { + current += char; + tokenStarted = true; + } + continue; + } + + if (char === '"' || char === "'") { + tokenStarted = true; + quote = char; + continue; + } + // At this point, we are not in quoted mode + + // Using newlines in CLI in this way is difficult. + // We do not handle it for now to keep tests simple. + if (/\t| /.test(char)) { + if (tokenStarted) { + result.push(current); + current = ""; + tokenStarted = false; + } + continue; + } + + current += char; + tokenStarted = true; + } + + if (escaped) { + current += "\\"; + } + + // Unterminated is OK, usually passed via MOCHA_OPTIONS + if (quote) { + debug("unterminated quoted token, prepending quote"); + current = quote + current; + debug(`updated token: ${current}`); + } + + if (tokenStarted) { + result.push(current); + } + + debug(`finishing splitArgs(${args})`); + debug(`returning ${result}`); + return result; +}; + +/** + * Disallows multiple arguments after a single option, such as `--grep abc def`. + */ +const validateArgsBeforeParse = (allArgs) => { + allArgs.forEach((arg, index) => { + if (!arg.startsWith("-") || arg === "--" || arg.includes("=")) { + return; + } + + const name = canonicalOptionName(stripLeadingDashes(arg)); + const next = allArgs[index + 1]; + + if ( + requiresValue(name) && + (next === undefined || (next.startsWith("-") && !isNumeric(next))) + ) { + throw new Error(`Not enough arguments following: ${name}`); + } + }); +}; + +const normalizeParsedValues = (values, positionals) => { + const normalized = Object.assign({ _: positionals }, values); + + Object.keys(normalized).forEach((rawName) => { + if (rawName === "_") { + return; + } + + const name = canonicalOptionName(rawName); + if (name !== rawName) { + normalized[name] = mergeValue(normalized[name], normalized[rawName]); + delete normalized[rawName]; + } + }); + + arrayOptions.forEach((name) => { + if (normalized[name] !== undefined) { + normalized[name] = coerceArrayOption(name, normalized[name]); + } + }); + + scalarOptions.forEach((name) => { + if (normalized[name] !== undefined) { + normalized[name] = coerceScalarOption(name, normalized[name]); + } + }); + + numberOptions.forEach((name) => { + if (normalized[name] !== undefined) { + normalized[name] = coerceNumberOption(normalized[name]); + } + }); + + return normalized; +}; + +const createErrorForNumericPositionalArg = ( + numericArg, + allArgs, + parsedResult, +) => { + // A flag for `numericArg` exists if: + // 1. A Mocha flag immediately preceded the numericArg in `allArgs`, and + // 2. parseArgs() could not assign the numericArg to that flag because the + // option has an incompatible datatype. + const flag = allArgs.find((arg, index) => { + const normalizedArg = stripLeadingDashes(arg); + return ( + isMochaFlag(arg) && + allArgs[index + 1] === String(numericArg) && + parsedResult[normalizedArg] !== String(numericArg) + ); + }); + + if (flag) { + throw createInvalidArgumentTypeError( + `Mocha flag '${flag}' given invalid option: '${numericArg}'`, + numericArg, + expectedTypeForFlag(flag), + ); + } + + throw createUnsupportedError( + `Option ${numericArg} is unsupported by the mocha cli`, + ); +}; + +/** + * Parse the args into a config object. + * Splits, + * handles Node args, + * validates general args, + * parses into config object, + * normalizes, + * validates numerical args, + * and returns resulting config object. + * @param {string|string[]} args + * @param {object} defaultValues + * @param {...any} configObjects + */ +export const parseMochaArgs = ( + args = [], + defaultValues = {}, + ...configObjects +) => { + const allArgs = splitArgs(args); + + // Save Node-specific args for special handling. Equals-form args have values; + // the rest are boolean flags. + const nodeArgs = allArgs.reduce((acc, arg) => { + const pair = arg.split("="); + let flag = pair[0]; + if (isNodeFlag(flag, false)) { + flag = stripLeadingDashes(flag); + return acc.concat([[flag, arg.includes("=") ? pair[1] : true]]); + } + return acc; + }, []); + + validateArgsBeforeParse(allArgs); + const parsed = parseArgs({ + args: preprocessArgs(allArgs), + options: createParseArgsOptions(nodeArgs), + allowNegative: true, + allowPositionals: true, + strict: false, + }); + + const result = normalizeParsedValues( + Object.assign( + mergeConfigObjects(defaultValues, configObjects), + parsed.values, + ), + parsed.positionals, + ); + + const numericPositionalArg = result._.find((arg) => isNumeric(arg)); + if (numericPositionalArg) { + createErrorForNumericPositionalArg( + Number(numericPositionalArg), + allArgs, + result, + ); + } + + // Reapply equals-form Node/V8 flag values saved above. + nodeArgs.forEach(([key, value]) => { + result[key] = value; + }); + + return result; +}; diff --git a/node_modules/mocha/lib/cli/run-helpers.js b/node_modules/mocha/lib/cli/run-helpers.cjs similarity index 94% rename from node_modules/mocha/lib/cli/run-helpers.js rename to node_modules/mocha/lib/cli/run-helpers.cjs index d83b76f1..948cb222 100644 --- a/node_modules/mocha/lib/cli/run-helpers.js +++ b/node_modules/mocha/lib/cli/run-helpers.cjs @@ -8,22 +8,22 @@ */ /** - * @typedef {import('../mocha.js')} Mocha + * @typedef {import('../mocha.cjs')} Mocha * @typedef {import('../types.d.ts').MochaOptions} MochaOptions * @typedef {import('../types.d.ts').UnmatchedFile} UnmatchedFile - * @typedef {import('../runner.js')} Runner + * @typedef {import('../runner.cjs')} Runner */ const fs = require("node:fs"); const path = require("node:path"); const pc = require("picocolors"); const debug = require("debug")("mocha:cli:run:helpers"); -const { watchRun, watchParallelRun } = require("./watch-run"); -const collectFiles = require("./collect-files"); +const { watchRun, watchParallelRun } = require("./watch-run.cjs"); +const collectFiles = require("./collect-files.cjs"); const { format } = require("node:util"); -const { createInvalidLegacyPluginError } = require("../errors"); -const { requireOrImport } = require("../nodejs/esm-utils"); -const PluginLoader = require("../plugin-loader"); +const { createInvalidLegacyPluginError } = require("../errors.js"); +const { requireOrImport } = require("../nodejs/esm-utils.cjs"); +const { PluginLoader } = require("../plugin-loader.js"); /** * Exits Mocha when tests + code under test has finished execution (default) @@ -152,7 +152,7 @@ const handleUnmatchedFiles = (mocha, unmatchedFiles) => { * @param {Mocha} mocha - Mocha instance * @param {MochaOptions} [opts] - Command line options * @param {Object} fileCollectParams - Parameters that control test - * file collection. See `lib/cli/collect-files.js`. + * file collection. See `lib/cli/collect-files.cjs`. * @returns {Promise} * @private */ @@ -183,7 +183,7 @@ const singleRun = async ( * @param {Mocha} mocha - Mocha instance * @param {MochaOptions} options - Command line options * @param {Object} fileCollectParams - Parameters that control test - * file collection. See `lib/cli/collect-files.js`. + * file collection. See `lib/cli/collect-files.cjs`. * @returns {Promise} * @ignore * @private diff --git a/node_modules/mocha/lib/cli/run-option-metadata.cjs b/node_modules/mocha/lib/cli/run-option-metadata.cjs new file mode 100644 index 00000000..d3e252d5 --- /dev/null +++ b/node_modules/mocha/lib/cli/run-option-metadata.cjs @@ -0,0 +1,216 @@ +"use strict"; + +/** + * Metadata about various options of the `run` command + * @see module:lib/cli/run + * @module + * @private + */ + +/** + * Dictionary of option types to list of options having said type + * @type {Record} + * @private + */ +const types = { + array: [ + "extension", + "file", + "global", + "ignore", + "node-option", + "reporter-option", + "require", + "spec", + "watch-files", + "watch-ignore", + ], + boolean: [ + "allow-uncaught", + "async-only", + "bail", + "check-leaks", + "clear-screen", + "color", + "delay", + "diff", + "dry-run", + "exit", + "fail-hook-affected-tests", + "pass-on-failing-test-suite", + "fail-zero", + "forbid-only", + "forbid-pending", + "full-trace", + "inline-diffs", + "invert", + "list-interfaces", + "list-reporters", + "no-colors", + "parallel", + "posix-exit-codes", + "recursive", + "sort", + "watch", + ], + number: ["retries", "jobs"], + string: [ + "config", + "fgrep", + "grep", + "package", + "reporter", + "ui", + "slow", + "timeout", + ], +}; + +/** + * Option aliases keyed by canonical option name. + * Arrays used to reduce + * @type {Record} + * @private + */ +const aliases = { + "async-only": ["A"], + bail: ["b"], + color: ["c", "colors"], + fgrep: ["f"], + global: ["globals"], + grep: ["g"], + ignore: ["exclude"], + invert: ["i"], + jobs: ["j"], + "no-colors": ["C"], + "node-option": ["n"], + parallel: ["p"], + reporter: ["R"], + "reporter-option": ["reporter-options", "O"], + require: ["r"], + slow: ["s"], + sort: ["S"], + timeout: ["t", "timeouts"], + ui: ["u"], + watch: ["w"], +}; + +const descriptions = { + "allow-uncaught": "Allow uncaught errors to propagate", + "async-only": + "Require all tests to use a callback (async) or return a Promise", + bail: 'Abort ("bail") after first test failure', + "check-leaks": "Check for global variable leaks", + color: "Force-enable color output", + config: "Path to config file", + delay: "Delay initial execution of root suite", + diff: "Show diff on failure", + "dry-run": "Report tests without executing them", + exit: "Force Mocha to quit after tests complete", + extension: "File extension(s) to load", + "fail-hook-affected-tests": + "Report tests as failed when affected by hook failures (before/beforeEach)", + "fail-zero": "Fail test run if no test(s) encountered", + "pass-on-failing-test-suite": "Not fail test run if tests were failed", + fgrep: "Only run tests containing this string", + file: "Specify file(s) to be loaded prior to root suite execution", + "forbid-only": "Fail if exclusive test(s) encountered", + "forbid-pending": "Fail if pending test(s) encountered", + "full-trace": "Display full stack traces", + global: "List of allowed global variables", + grep: "Only run tests matching this string or regexp", + ignore: "Ignore file(s) or glob pattern(s)", + "inline-diffs": + "Display actual/expected differences inline within each string", + invert: "Inverts --grep and --fgrep matches", + jobs: "Number of concurrent jobs for --parallel; use 1 to run in serial", + "list-interfaces": "List built-in user interfaces & exit", + "list-reporters": "List built-in reporters & exit", + "no-colors": "Force-disable color output", + "node-option": 'Node or V8 option (no leading "--")', + package: "Path to package.json for config", + parallel: "Run tests in parallel", + "posix-exit-codes": + "Use POSIX and UNIX shell exit codes as Mocha's return value", + recursive: "Look for tests in subdirectories", + reporter: "Specify reporter to use", + "reporter-option": "Reporter-specific options ()", + require: "Require module", + retries: "Retry failed tests this many times", + slow: 'Specify "slow" test threshold (in milliseconds)', + sort: "Sort test files", + timeout: "Specify test timeout threshold (in milliseconds)", + ui: "Specify user interface", + watch: "Watch files in the current working directory for changes", + "watch-files": "List of paths or globs to watch", + "watch-ignore": "List of paths or globs to exclude from watching", +}; + +const getRunOptionDefinitions = () => + Object.entries(types).flatMap(([type, names]) => + names.map((name) => ({ + name, + type, + aliases: aliases[name] || [], + description: descriptions[name] || "", + })), + ); + +const ALL_MOCHA_FLAGS = Object.keys(types).reduce((acc, key) => { + // gets all flags from each of the fields in `types`, adds those, + // then adds aliases of each flag (if any) + types[key].forEach((flag) => { + acc.add(flag); + const flagAliases = aliases[flag] || []; + flagAliases.forEach((alias) => { + acc.add(alias); + }); + }); + return acc; +}, new Set()); + +/** + * Strips one or two leading dashes from a flag, e.g. `--grep` becomes `grep` + * and `-g` becomes `g`. Barewords are returned unchanged. + * @param {string} flag - Flag to normalize (with or without leading dashes) + * @returns {string} The flag without its leading dashes + * @private + */ +const stripLeadingDashes = (flag) => flag.replace(/^--?/, ""); + +/** + * Returns `true` if the provided `flag` is known to Mocha. + * @param {string} flag - Flag to check + * @returns {boolean} If `true`, this is a Mocha flag + * @private + */ +const isMochaFlag = (flag) => { + return ALL_MOCHA_FLAGS.has(stripLeadingDashes(flag)); +}; + +/** + * Returns expected yarg option type for a given mocha flag. + * @param {string} flag - Flag to check (can be with or without leading dashes "--"") + * @returns {string | undefined} - If flag is a valid mocha flag, the expected type of argument for this flag is returned, otherwise undefined is returned. + * @private + */ +const expectedTypeForFlag = (flag) => { + const normalizedName = stripLeadingDashes(flag); + + // If flag is an alias, get it's full name. + const fullFlagName = + Object.keys(aliases).find((flagName) => + aliases[flagName].includes(normalizedName), + ) || normalizedName; + + return Object.keys(types).find((flagType) => + types[flagType].includes(fullFlagName), + ); +}; + +exports.types = types; +exports.aliases = aliases; +exports.getRunOptionDefinitions = getRunOptionDefinitions; +exports.isMochaFlag = isMochaFlag; +exports.expectedTypeForFlag = expectedTypeForFlag; +exports.stripLeadingDashes = stripLeadingDashes; diff --git a/node_modules/mocha/lib/cli/run-option-metadata.js b/node_modules/mocha/lib/cli/run-option-metadata.js deleted file mode 100644 index e850502f..00000000 --- a/node_modules/mocha/lib/cli/run-option-metadata.js +++ /dev/null @@ -1,139 +0,0 @@ -"use strict"; - -/** - * Metadata about various options of the `run` command - * @see module:lib/cli/run - * @module - * @private - */ - -/** - * Dictionary of yargs option types to list of options having said type - * @type {Record} - * @private - */ -const TYPES = (exports.types = { - array: [ - "extension", - "file", - "global", - "ignore", - "node-option", - "reporter-option", - "require", - "spec", - "watch-files", - "watch-ignore", - ], - boolean: [ - "allow-uncaught", - "async-only", - "bail", - "check-leaks", - "color", - "delay", - "diff", - "dry-run", - "exit", - "fail-hook-affected-tests", - "pass-on-failing-test-suite", - "fail-zero", - "forbid-only", - "forbid-pending", - "full-trace", - "inline-diffs", - "invert", - "list-interfaces", - "list-reporters", - "no-colors", - "parallel", - "posix-exit-codes", - "recursive", - "sort", - "watch", - ], - number: ["retries", "jobs"], - string: [ - "config", - "fgrep", - "grep", - "package", - "reporter", - "ui", - "slow", - "timeout", - ], -}); - -/** - * Option aliases keyed by canonical option name. - * Arrays used to reduce - * @type {Record} - * @private - */ -exports.aliases = { - "async-only": ["A"], - bail: ["b"], - color: ["c", "colors"], - fgrep: ["f"], - global: ["globals"], - grep: ["g"], - ignore: ["exclude"], - invert: ["i"], - jobs: ["j"], - "no-colors": ["C"], - "node-option": ["n"], - parallel: ["p"], - reporter: ["R"], - "reporter-option": ["reporter-options", "O"], - require: ["r"], - slow: ["s"], - sort: ["S"], - timeout: ["t", "timeouts"], - ui: ["u"], - watch: ["w"], -}; - -const ALL_MOCHA_FLAGS = Object.keys(TYPES).reduce((acc, key) => { - // gets all flags from each of the fields in `types`, adds those, - // then adds aliases of each flag (if any) - TYPES[key].forEach((flag) => { - acc.add(flag); - const aliases = exports.aliases[flag] || []; - aliases.forEach((alias) => { - acc.add(alias); - }); - }); - return acc; -}, new Set()); - -/** - * Returns `true` if the provided `flag` is known to Mocha. - * @param {string} flag - Flag to check - * @returns {boolean} If `true`, this is a Mocha flag - * @private - */ -exports.isMochaFlag = (flag) => { - return ALL_MOCHA_FLAGS.has(flag.replace(/^--?/, "")); -}; - -/** - * Returns expected yarg option type for a given mocha flag. - * @param {string} flag - Flag to check (can be with or without leading dashes "--"") - * @returns {string | undefined} - If flag is a valid mocha flag, the expected type of argument for this flag is returned, otherwise undefined is returned. - * @private - */ -exports.expectedTypeForFlag = (flag) => { - const normalizedName = flag.replace(/^--?/, ""); - - // If flag is an alias, get it's full name. - const aliases = exports.aliases; - const fullFlagName = - Object.keys(aliases).find((flagName) => - aliases[flagName].includes(normalizedName), - ) || normalizedName; - - return Object.keys(TYPES).find((flagType) => - TYPES[flagType].includes(fullFlagName), - ); -}; diff --git a/node_modules/mocha/lib/cli/run.cjs b/node_modules/mocha/lib/cli/run.cjs new file mode 100644 index 00000000..d872a420 --- /dev/null +++ b/node_modules/mocha/lib/cli/run.cjs @@ -0,0 +1,148 @@ +"use strict"; + +/** + * Definition for Mocha's default ("run tests") command + * + * @module + * @private + */ + +const Mocha = require("../mocha.cjs"); +const { + createUnsupportedError, + createInvalidArgumentValueError, + createMissingArgumentError, +} = require("../errors.js"); + +const { + list, + handleRequires, + validateLegacyPlugin, + runMocha, +} = require("./run-helpers.cjs"); +const { ONE_AND_DONES } = require("./one-and-dones.js"); +const debug = require("debug")("mocha:cli:run"); + +exports.command = ["$0 [spec..]", "inspect"]; + +exports.describe = "Run tests with Mocha"; + +const camelCase = (name) => + name.replace(/-([a-z])/g, (_, char) => char.toUpperCase()); + +const coerceReporterOption = (opts) => + list(opts).reduce((acc, opt) => { + const pair = opt.split("="); + + if (pair.length > 2 || !pair.length) { + throw createInvalidArgumentValueError( + `invalid reporter option '${opt}'`, + "--reporter-option", + opt, + 'expected "key=value" format', + ); + } + + acc[pair[0]] = pair.length === 2 ? pair[1] : true; + return acc; + }, {}); + +const normalizeRunOptions = (argv) => { + Object.keys(argv).forEach((name) => { + const reporterOptionMatch = name.match(/^reporter-options?\.(.+)$/); + if (reporterOptionMatch) { + argv["reporter-option"] = Object.assign({}, argv["reporter-option"], { + [reporterOptionMatch[1]]: argv[name], + }); + } + + if (name.includes("-")) { + const normalizedName = camelCase(name); + if (!(normalizedName in argv)) { + argv[normalizedName] = argv[name]; + } + } + }); + + if (Array.isArray(argv["reporter-option"])) { + argv["reporter-option"] = coerceReporterOption(argv["reporter-option"]); + } +}; + +const validateRunOptions = (argv) => { + // "one-and-dones"; help and version are handled by the top-level CLI. + const oneAndDoneOptions = Object.keys(ONE_AND_DONES).filter((opt) => + Boolean(argv[opt]), + ); + if (oneAndDoneOptions.length > 1) { + throw createUnsupportedError( + `Arguments ${oneAndDoneOptions.join(" and ")} are mutually exclusive`, + ); + } + + Object.keys(ONE_AND_DONES).forEach((opt) => { + if (argv[opt]) { + ONE_AND_DONES[opt].call(null); + process.exit(0); + } + }); + + if (argv.invert && !("fgrep" in argv || "grep" in argv)) { + throw createMissingArgumentError( + '"--invert" requires one of "--fgrep " or "--grep "', + "--fgrep|--grep", + "string|regexp", + ); + } + + if (argv.fgrep && argv.grep) { + throw createUnsupportedError( + "Arguments fgrep and grep are mutually exclusive", + ); + } + + if (argv.parallel) { + if (argv.file) { + throw createUnsupportedError( + "--parallel runs test files in a non-deterministic order, and is mutually exclusive with --file", + ); + } + + if (argv.sort) { + throw createUnsupportedError( + "--parallel runs test files in a non-deterministic order, and is mutually exclusive with --sort", + ); + } + + if (["progress", "markdown", "json-stream"].includes(argv.reporter)) { + throw createUnsupportedError( + `--reporter=${argv.reporter} is mutually exclusive with --parallel`, + ); + } + } +}; + +const prepareRunOptions = async (argv) => { + const plugins = await handleRequires(argv.require); + validateLegacyPlugin(argv, "reporter", Mocha.reporters); + validateLegacyPlugin(argv, "ui", Mocha.interfaces); + Object.assign(argv, plugins); + return argv; +}; + +exports.validateRunOptions = validateRunOptions; +exports.prepareRunOptions = prepareRunOptions; +exports.normalizeRunOptions = normalizeRunOptions; + +exports.handler = async function (argv) { + normalizeRunOptions(argv); + debug("running with config", argv); + const mocha = new Mocha(argv); + + try { + await runMocha(mocha, argv); + } catch (err) { + console.error("\n Exception during run:", err); + process.exit(1); + } +}; diff --git a/node_modules/mocha/lib/cli/run.js b/node_modules/mocha/lib/cli/run.js deleted file mode 100644 index 727dc1b2..00000000 --- a/node_modules/mocha/lib/cli/run.js +++ /dev/null @@ -1,394 +0,0 @@ -"use strict"; - -/** - * Definition for Mocha's default ("run tests") command - * - * @module - * @private - */ - -const symbols = require("log-symbols"); -const pc = require("picocolors"); -const Mocha = require("../mocha"); -const { - createUnsupportedError, - createInvalidArgumentValueError, - createMissingArgumentError, -} = require("../errors"); - -const { - list, - handleRequires, - validateLegacyPlugin, - runMocha, -} = require("./run-helpers"); -const { ONE_AND_DONES, ONE_AND_DONE_ARGS } = require("./one-and-dones"); -const debug = require("debug")("mocha:cli:run"); -const defaults = require("../mocharc.json"); -const { types, aliases } = require("./run-option-metadata"); - -/** - * Logical option groups - * @constant - */ -const GROUPS = { - FILES: "File Handling", - FILTERS: "Test Filters", - NODEJS: "Node.js & V8", - OUTPUT: "Reporting & Output", - RULES: "Rules & Behavior", - CONFIG: "Configuration", -}; - -exports.command = ["$0 [spec..]", "inspect"]; - -exports.describe = "Run tests with Mocha"; - -exports.builder = (yargs) => - yargs - .options({ - "allow-uncaught": { - description: "Allow uncaught errors to propagate", - group: GROUPS.RULES, - }, - "async-only": { - description: - "Require all tests to use a callback (async) or return a Promise", - group: GROUPS.RULES, - }, - bail: { - description: 'Abort ("bail") after first test failure', - group: GROUPS.RULES, - }, - "check-leaks": { - description: "Check for global variable leaks", - group: GROUPS.RULES, - }, - color: { - description: "Force-enable color output", - group: GROUPS.OUTPUT, - }, - config: { - config: true, - defaultDescription: "(nearest rc file)", - description: "Path to config file", - group: GROUPS.CONFIG, - }, - delay: { - description: "Delay initial execution of root suite", - group: GROUPS.RULES, - }, - diff: { - default: true, - description: "Show diff on failure", - group: GROUPS.OUTPUT, - }, - "dry-run": { - description: "Report tests without executing them", - group: GROUPS.RULES, - }, - exit: { - description: "Force Mocha to quit after tests complete", - group: GROUPS.RULES, - }, - extension: { - default: defaults.extension, - description: "File extension(s) to load", - group: GROUPS.FILES, - requiresArg: true, - coerce: list, - }, - "pass-on-failing-test-suite": { - default: false, - description: "Not fail test run if tests were failed", - group: GROUPS.RULES, - }, - "fail-hook-affected-tests": { - description: - "Report tests as failed when affected by hook failures (before/beforeEach)", - group: GROUPS.RULES, - }, - "fail-zero": { - description: "Fail test run if no test(s) encountered", - group: GROUPS.RULES, - }, - fgrep: { - conflicts: "grep", - description: "Only run tests containing this string", - group: GROUPS.FILTERS, - requiresArg: true, - }, - file: { - defaultDescription: "(none)", - description: - "Specify file(s) to be loaded prior to root suite execution", - group: GROUPS.FILES, - normalize: true, - requiresArg: true, - }, - "forbid-only": { - description: "Fail if exclusive test(s) encountered", - group: GROUPS.RULES, - }, - "forbid-pending": { - description: "Fail if pending test(s) encountered", - group: GROUPS.RULES, - }, - "full-trace": { - description: "Display full stack traces", - group: GROUPS.OUTPUT, - }, - global: { - coerce: list, - description: "List of allowed global variables", - group: GROUPS.RULES, - requiresArg: true, - }, - grep: { - coerce: (value) => (!value ? null : value), - conflicts: "fgrep", - description: "Only run tests matching this string or regexp", - group: GROUPS.FILTERS, - requiresArg: true, - }, - ignore: { - defaultDescription: "(none)", - description: "Ignore file(s) or glob pattern(s)", - group: GROUPS.FILES, - requiresArg: true, - }, - "inline-diffs": { - description: - "Display actual/expected differences inline within each string", - group: GROUPS.OUTPUT, - }, - invert: { - description: "Inverts --grep and --fgrep matches", - group: GROUPS.FILTERS, - }, - jobs: { - description: - "Number of concurrent jobs for --parallel; use 1 to run in serial", - defaultDescription: "(number of CPU cores - 1)", - requiresArg: true, - group: GROUPS.RULES, - }, - "list-interfaces": { - conflicts: Array.from(ONE_AND_DONE_ARGS).filter( - (arg) => arg !== "list-interfaces", - ), - description: "List built-in user interfaces & exit", - }, - "list-reporters": { - conflicts: Array.from(ONE_AND_DONE_ARGS).filter( - (arg) => arg !== "list-reporters", - ), - description: "List built-in reporters & exit", - }, - "no-colors": { - description: "Force-disable color output", - group: GROUPS.OUTPUT, - hidden: true, - }, - "node-option": { - description: 'Node or V8 option (no leading "--")', - group: GROUPS.CONFIG, - }, - package: { - description: "Path to package.json for config", - group: GROUPS.CONFIG, - normalize: true, - requiresArg: true, - }, - parallel: { - description: "Run tests in parallel", - group: GROUPS.RULES, - }, - "posix-exit-codes": { - description: - "Use POSIX and UNIX shell exit codes as Mocha's return value", - group: GROUPS.RULES, - }, - recursive: { - description: "Look for tests in subdirectories", - group: GROUPS.FILES, - }, - reporter: { - default: defaults.reporter, - description: "Specify reporter to use", - group: GROUPS.OUTPUT, - requiresArg: true, - }, - "reporter-option": { - coerce: (opts) => - list(opts).reduce((acc, opt) => { - const pair = opt.split("="); - - if (pair.length > 2 || !pair.length) { - throw createInvalidArgumentValueError( - `invalid reporter option '${opt}'`, - "--reporter-option", - opt, - 'expected "key=value" format', - ); - } - - acc[pair[0]] = pair.length === 2 ? pair[1] : true; - return acc; - }, {}), - description: "Reporter-specific options ()", - group: GROUPS.OUTPUT, - requiresArg: true, - }, - require: { - defaultDescription: "(none)", - description: "Require module", - group: GROUPS.FILES, - requiresArg: true, - }, - retries: { - description: "Retry failed tests this many times", - group: GROUPS.RULES, - }, - slow: { - default: defaults.slow, - description: 'Specify "slow" test threshold (in milliseconds)', - group: GROUPS.RULES, - }, - sort: { - description: "Sort test files", - group: GROUPS.FILES, - }, - timeout: { - default: defaults.timeout, - description: "Specify test timeout threshold (in milliseconds)", - group: GROUPS.RULES, - }, - ui: { - default: defaults.ui, - description: "Specify user interface", - group: GROUPS.RULES, - requiresArg: true, - }, - watch: { - description: "Watch files in the current working directory for changes", - group: GROUPS.FILES, - }, - "watch-files": { - description: "List of paths or globs to watch", - group: GROUPS.FILES, - requiresArg: true, - coerce: list, - }, - "watch-ignore": { - description: "List of paths or globs to exclude from watching", - group: GROUPS.FILES, - requiresArg: true, - coerce: list, - default: defaults["watch-ignore"], - }, - }) - .positional("spec", { - default: ["test"], - description: "One or more files, directories, or globs to test", - type: "array", - }) - .check((argv) => { - // "one-and-dones"; let yargs handle help and version - Object.keys(ONE_AND_DONES).forEach((opt) => { - if (argv[opt]) { - ONE_AND_DONES[opt].call(null, yargs); - process.exit(); - } - }); - - // yargs.implies() isn't flexible enough to handle this - if (argv.invert && !("fgrep" in argv || "grep" in argv)) { - throw createMissingArgumentError( - '"--invert" requires one of "--fgrep " or "--grep "', - "--fgrep|--grep", - "string|regexp", - ); - } - - if (argv.parallel) { - // yargs.conflicts() can't deal with `--file foo.js --no-parallel`, either - if (argv.file) { - throw createUnsupportedError( - "--parallel runs test files in a non-deterministic order, and is mutually exclusive with --file", - ); - } - - // or this - if (argv.sort) { - throw createUnsupportedError( - "--parallel runs test files in a non-deterministic order, and is mutually exclusive with --sort", - ); - } - - if (argv.reporter === "progress") { - throw createUnsupportedError( - "--reporter=progress is mutually exclusive with --parallel", - ); - } - - if (argv.reporter === "markdown") { - throw createUnsupportedError( - "--reporter=markdown is mutually exclusive with --parallel", - ); - } - - if (argv.reporter === "json-stream") { - throw createUnsupportedError( - "--reporter=json-stream is mutually exclusive with --parallel", - ); - } - } - - if (argv.compilers) { - throw createUnsupportedError( - `--compilers is DEPRECATED and no longer supported. - See https://github.com/mochajs/mocha/wiki/compilers-deprecation for migration information.`, - ); - } - - if (argv.opts) { - throw createUnsupportedError( - `--opts: configuring Mocha via 'mocha.opts' is DEPRECATED and no longer supported. - Please use a configuration file instead.`, - ); - } - - return true; - }) - .middleware(async (argv, yargs) => { - // currently a failing middleware does not work nicely with yargs' `fail()`. - try { - // load requires first, because it can impact "plugin" validation - const plugins = await handleRequires(argv.require); - validateLegacyPlugin(argv, "reporter", Mocha.reporters); - validateLegacyPlugin(argv, "ui", Mocha.interfaces); - Object.assign(argv, plugins); - } catch (err) { - // this could be a bad --require, bad reporter, ui, etc. - console.error(`\n${symbols.error} ${pc.red("ERROR:")}`, err); - yargs.exit(1); - } - }) - .array(types.array) - .boolean(types.boolean) - .string(types.string) - .number(types.number) - .alias(aliases); - -exports.handler = async function (argv) { - debug("post-yargs config", argv); - const mocha = new Mocha(argv); - - try { - await runMocha(mocha, argv); - } catch (err) { - console.error("\n Exception during run:", err); - process.exit(1); - } -}; diff --git a/node_modules/mocha/lib/cli/unparse-args.js b/node_modules/mocha/lib/cli/unparse-args.js new file mode 100644 index 00000000..c7edded2 --- /dev/null +++ b/node_modules/mocha/lib/cli/unparse-args.js @@ -0,0 +1,55 @@ +const toArray = (value) => (Array.isArray(value) ? value : [value]); + +const unparseOption = (name, value) => { + if (value === false) { + return [`--no-${name}`]; + } + + if (value === true) { + return [`--${name}`]; + } + + if (value == null) { + return []; + } + + if (Array.isArray(value)) { + return value.flatMap((item) => unparseOption(name, item)); + } + + if (typeof value === "object") { + return Object.entries(value).flatMap(([key, item]) => + unparseOption(`${name}.${key}`, item), + ); + } + + if (name.includes(".")) { + return [`--${name}=${String(value)}`]; + } + return [`--${name}`, String(value)]; +}; + +const unparseMochaArgs = (opts) => { + const positionals = opts._ == null ? [] : toArray(opts._).map(String); + const options = Object.entries(opts).flatMap(([name, value]) => + name === "_" ? [] : unparseOption(name, value), + ); + + return positionals.concat(options); +}; + +const unparseNodeFlags = (opts) => { + return Object.entries(opts).flatMap(([name, value]) => { + if (value === true) { + return [`--${name}`]; + } + + if (value === false || value == null) { + return []; + } + + return toArray(value).map((item) => `--${name}=${item}`); + }); +}; + +export { unparseMochaArgs, unparseNodeFlags }; diff --git a/node_modules/mocha/lib/cli/watch-run.js b/node_modules/mocha/lib/cli/watch-run.cjs similarity index 94% rename from node_modules/mocha/lib/cli/watch-run.js rename to node_modules/mocha/lib/cli/watch-run.cjs index 72f161a8..f688556f 100644 --- a/node_modules/mocha/lib/cli/watch-run.js +++ b/node_modules/mocha/lib/cli/watch-run.cjs @@ -1,21 +1,21 @@ "use strict"; -const logSymbols = require("log-symbols"); const debug = require("debug")("mocha:cli:watch"); const path = require("node:path"); const chokidar = require("chokidar"); const glob = require("glob"); const isPathInside = require("is-path-inside"); const { minimatch } = require("minimatch"); -const Context = require("../context"); -const collectFiles = require("./collect-files"); +const Context = require("../context.js").Context; +const collectFiles = require("./collect-files.cjs"); +const { logSymbols } = require("../utils.cjs"); /** * @typedef {import('chokidar').FSWatcher} FSWatcher * @typedef {import('glob').Glob['patterns'][number]} Pattern * The `Pattern` class is not exported by the `glob` package. * Ref [link](../../node_modules/glob/dist/commonjs/pattern.d.ts). - * @typedef {import('../mocha.js')} Mocha + * @typedef {import('../mocha.cjs')} Mocha * @typedef {import('../types.d.ts').BeforeWatchRun} BeforeWatchRun * @typedef {import('../types.d.ts').FileCollectionOptions} FileCollectionOptions * @typedef {import('../types.d.ts').Rerunner} Rerunner @@ -46,7 +46,7 @@ const collectFiles = require("./collect-files"); */ exports.watchParallelRun = ( mocha, - { watchFiles, watchIgnore }, + { watchFiles, watchIgnore, clearScreen }, fileCollectParams, ) => { debug("creating parallel watcher"); @@ -54,6 +54,7 @@ exports.watchParallelRun = ( return createWatcher(mocha, { watchFiles, watchIgnore, + clearScreen, beforeRun({ mocha }) { // I don't know why we're cloning the root suite. const rootSuite = mocha.suite.clone(); @@ -64,7 +65,7 @@ exports.watchParallelRun = ( // this `require` is needed because the require cache has been cleared. the dynamic // exports set via the below call to `mocha.ui()` won't work properly if a // test depends on this module. - const Mocha = require("../mocha"); + const Mocha = require("../mocha.cjs"); // ... and now that we've gotten a new module, we need to use it again due // to `mocha.ui()` call @@ -105,15 +106,20 @@ exports.watchParallelRun = ( * @param {string[]} opts.watchIgnore - List of paths and patterns to * exclude from watching. See `ignored` option of `chokidar`. * @param {FileCollectionOptions} fileCollectParams - Parameters that control test - * file collection. See `lib/cli/collect-files.js`. + * file collection. See `lib/cli/collect-files.cjs`. * @private */ -exports.watchRun = (mocha, { watchFiles, watchIgnore }, fileCollectParams) => { +exports.watchRun = ( + mocha, + { watchFiles, watchIgnore, clearScreen }, + fileCollectParams, +) => { debug("creating serial watcher"); return createWatcher(mocha, { watchFiles, watchIgnore, + clearScreen, beforeRun({ mocha }) { mocha.unloadFiles(); @@ -126,7 +132,7 @@ exports.watchRun = (mocha, { watchFiles, watchIgnore }, fileCollectParams) => { // this `require` is needed because the require cache has been cleared. the dynamic // exports set via the below call to `mocha.ui()` won't work properly if a // test depends on this module. - const Mocha = require("../mocha"); + const Mocha = require("../mocha.cjs"); // ... and now that we've gotten a new module, we need to use it again due // to `mocha.ui()` call @@ -397,6 +403,7 @@ function createPathMatcher(allowed, ignored, basePath) { * `chokidar.watch`. * @param {string[]} [opts.watchIgnore] - List of paths and patterns to exclude * from watching. See `ignored` option of `chokidar`. + * @param {boolean} [opts.clearScreen] - Clear the terminal before each run. * @param {FileCollectionOptions} opts.fileCollectParams - List of extensions to watch if `opts.watchFiles` is not given. * @returns {FSWatcher} * @ignore @@ -404,7 +411,7 @@ function createPathMatcher(allowed, ignored, basePath) { */ const createWatcher = ( mocha, - { watchFiles, watchIgnore, beforeRun, fileCollectParams }, + { watchFiles, watchIgnore, clearScreen, beforeRun, fileCollectParams }, ) => { if (!watchFiles) { watchFiles = fileCollectParams.extension.map((ext) => `**/*.${ext}`); @@ -436,6 +443,7 @@ const createWatcher = ( const rerunner = createRerunner(mocha, watcher, { beforeRun, + clearScreen, }); watcher.on("ready", async () => { @@ -511,11 +519,12 @@ const createWatcher = ( * @param {FSWatcher} watcher - Chokidar `FSWatcher` instance * @param {Object} [opts] - Options! * @param {BeforeWatchRun} [opts.beforeRun] - Function to call before `mocha.run()` + * @param {boolean} [opts.clearScreen] - Clear the terminal before each run * @returns {Rerunner} * @ignore * @private */ -const createRerunner = (mocha, watcher, { beforeRun } = {}) => { +const createRerunner = (mocha, watcher, { beforeRun, clearScreen } = {}) => { // Set to a `Runner` when mocha is running. Set to `null` when mocha is not // running. let runner = null; @@ -525,6 +534,9 @@ const createRerunner = (mocha, watcher, { beforeRun } = {}) => { const run = () => { try { + if (clearScreen) { + clearTerminal(); + } mocha = beforeRun ? beforeRun({ mocha, watcher }) || mocha : mocha; runner = mocha.run(() => { debug("finished watch run"); @@ -611,6 +623,15 @@ const eraseLine = () => { process.stdout.write("\u001b[2K"); }; +/** + * Clears the terminal and moves the cursor to the top-left corner. + * @private + */ +const clearTerminal = () => { + // "\u001b[2J" clears the screen. "\u001b[H" moves the cursor to the home position + process.stdout.write("\u001b[2J\u001b[H"); +}; + /** * Blast all of the watched files out of `require.cache` * @param {FSWatcher} watcher - Chokidar FSWatcher diff --git a/node_modules/mocha/lib/context.js b/node_modules/mocha/lib/context.js index 900a0f4d..a5f0b76a 100644 --- a/node_modules/mocha/lib/context.js +++ b/node_modules/mocha/lib/context.js @@ -1,91 +1,79 @@ -"use strict"; - /** * @typedef {import('./runnable.js')} Runnable */ -/** - * @module Context - */ -/** - * Expose `Context`. - */ - -module.exports = Context; - /** * Initialize a new `Context`. * * @private */ -function Context() {} - -/** - * Set or get the context `Runnable` to `runnable`. - * - * @private - * @param {Runnable} runnable - * @return {Context} context - */ -Context.prototype.runnable = function (runnable) { - if (!arguments.length) { - return this._runnable; +class Context { + constructor() {} + /** + * Set or get the context `Runnable` to `runnable`. + * + * @private + * @param {Runnable} runnable + * @return {Context} context + */ + runnable(runnable) { + if (!arguments.length) { + return this._runnable; + } + this.test = this._runnable = runnable; + return this; } - this.test = this._runnable = runnable; - return this; -}; - -/** - * Set or get test timeout `ms`. - * - * @private - * @param {number} ms - * @return {Context} self - */ -Context.prototype.timeout = function (ms) { - if (!arguments.length) { - return this.runnable().timeout(); + /** + * Set or get test timeout `ms`. + * + * @private + * @param {number} ms + * @return {Context} self + */ + timeout(ms) { + if (!arguments.length) { + return this.runnable().timeout(); + } + this.runnable().timeout(ms); + return this; } - this.runnable().timeout(ms); - return this; -}; - -/** - * Set or get test slowness threshold `ms`. - * - * @private - * @param {number} ms - * @return {Context} self - */ -Context.prototype.slow = function (ms) { - if (!arguments.length) { - return this.runnable().slow(); + /** + * Set or get test slowness threshold `ms`. + * + * @private + * @param {number} ms + * @return {Context} self + */ + slow(ms) { + if (!arguments.length) { + return this.runnable().slow(); + } + this.runnable().slow(ms); + return this; } - this.runnable().slow(ms); - return this; -}; - -/** - * Mark a test as skipped. - * - * @private - * @throws Pending - */ -Context.prototype.skip = function () { - this.runnable().skip(); -}; - -/** - * Set or get a number of allowed retries on failed tests - * - * @private - * @param {number} n - * @return {Context} self - */ -Context.prototype.retries = function (n) { - if (!arguments.length) { - return this.runnable().retries(); + /** + * Mark a test as skipped. + * + * @private + * @throws PendingError + */ + skip() { + this.runnable().skip(); } - this.runnable().retries(n); - return this; -}; + /** + * Set or get a number of allowed retries on failed tests + * + * @private + * @param {number} n + * @return {Context} self + */ + retries(n) { + if (!arguments.length) { + return this.runnable().retries(); + } + this.runnable().retries(n); + return this; + } +} + +export { Context }; diff --git a/node_modules/mocha/lib/error-constants.js b/node_modules/mocha/lib/error-constants.js index 362078b0..c86e0488 100644 --- a/node_modules/mocha/lib/error-constants.js +++ b/node_modules/mocha/lib/error-constants.js @@ -1,12 +1,10 @@ -"use strict"; - /** * When Mocha throws exceptions (or rejects `Promise`s), it attempts to assign a `code` property to the `Error` object, for easier handling. These are the potential values of `code`. * @public * @namespace * @memberof module:lib/errors */ -var constants = { +export const constants = { /** * An unrecoverable error. * @constant @@ -119,5 +117,3 @@ var constants = { */ UNPARSABLE_FILE: "ERR_MOCHA_UNPARSABLE_FILE", }; - -module.exports = { constants }; diff --git a/node_modules/mocha/lib/errors.js b/node_modules/mocha/lib/errors.js index cc2d5b8a..f6432199 100644 --- a/node_modules/mocha/lib/errors.js +++ b/node_modules/mocha/lib/errors.js @@ -1,66 +1,19 @@ -"use strict"; - /** - * @typedef {import('./mocha.js')} Mocha + * @typedef {import('./mocha.cjs')} Mocha * @typedef {import('./runnable.js')} Runnable * @typedef {import('./types.d.ts').MochaTimeoutError} MochaTimeoutError * @typedef {import('./types.d.ts').PluginDefinition} PluginDefinition */ -const { format } = require("node:util"); -const { constants } = require("./error-constants.js"); +import { format } from "node:util"; +import { constants } from "./error-constants.js"; +import { isCI } from "./utils.cjs"; /** - * Contains error codes, factory functions to create throwable error objects, - * and warning/deprecation functions. + * Contains error codes and factory functions to create throwable error objects * @module */ -/** - * process.emitWarning or a polyfill - * @see https://nodejs.org/api/process.html#process_process_emitwarning_warning_options - * @ignore - */ -const emitWarning = (msg, type) => { - if (process.emitWarning) { - process.emitWarning(msg, type); - } else { - /* istanbul ignore next */ - process.nextTick(function () { - console.warn(type + ": " + msg); - }); - } -}; - -/** - * Show a deprecation warning. Each distinct message is only displayed once. - * Ignores empty messages. - * - * @param {string} [msg] - Warning to print - * @private - */ -const deprecate = (msg) => { - msg = String(msg); - if (msg && !deprecate.cache[msg]) { - deprecate.cache[msg] = true; - emitWarning(msg, "DeprecationWarning"); - } -}; -deprecate.cache = {}; - -/** - * Show a generic warning. - * Ignores empty messages. - * - * @param {string} [msg] - Warning to print - * @private - */ -const warn = (msg) => { - if (msg) { - emitWarning(msg); - } -}; - /** * A set containing all string values of all Mocha error constants, for use by {@link isMochaError}. * @private @@ -234,22 +187,6 @@ function createInvalidLegacyPluginError(message, pluginType, pluginId) { } } -/** - * **DEPRECATED**. Use {@link createInvalidLegacyPluginError} instead Dynamically creates a plugin-type-specific error based on plugin type - * @deprecated - * @param {string} message - Error message - * @param {"reporter"|"interface"} pluginType - Plugin type. Future: expand as needed - * @param {string} [pluginId] - Name/path of plugin, if any - * @throws When `pluginType` is not known - * @public - * @static - * @returns {Error} - */ -function createInvalidPluginError(...args) { - deprecate("Use createInvalidLegacyPluginError() instead"); - return createInvalidLegacyPluginError(...args); -} - /** * Creates an error object to be thrown when a mocha object's `run` method is executed while it is already disposed. * @param {string} message The error message to be displayed. @@ -298,7 +235,7 @@ function createMultipleDoneError(runnable, originalErr) { if (runnable.parent.root) { title += " (of root suite)"; } - } catch (ignored) { + } catch { title = format("<%s> (of unknown suite)", runnable.title); } var message = format( @@ -329,11 +266,17 @@ function createMultipleDoneError(runnable, originalErr) { * @returns {Error} Error with code {@link constants.FORBIDDEN_EXCLUSIVITY} */ function createForbiddenExclusivityError(mocha) { - var err = new Error( - mocha.isWorker - ? "`.only` is not supported in parallel mode" - : "`.only` forbidden by --forbid-only", - ); + var message; + if (mocha.isWorker) { + message = "`.only` is not supported in parallel mode"; + } else { + message = "`.only` forbidden by --forbid-only"; + if (isCI()) { + message += " (default in CI, add `--no-forbid-only` to allow `.only`)"; + } + } + + var err = new Error(message); err.code = constants.FORBIDDEN_EXCLUSIVITY; return err; } @@ -414,7 +357,7 @@ function createUnparsableFileError(message) { const isMochaError = (err) => Boolean(err && typeof err === "object" && MOCHA_ERRORS.has(err.code)); -module.exports = { +export { createFatalError, createForbiddenExclusivityError, createInvalidArgumentTypeError, @@ -423,7 +366,6 @@ module.exports = { createInvalidInterfaceError, createInvalidLegacyPluginError, createInvalidPluginDefinitionError, - createInvalidPluginError, createInvalidPluginImplementationError, createInvalidReporterError, createMissingArgumentError, @@ -434,7 +376,5 @@ module.exports = { createTimeoutError, createUnparsableFileError, createUnsupportedError, - deprecate, isMochaError, - warn, }; diff --git a/node_modules/mocha/lib/hook.js b/node_modules/mocha/lib/hook.js index fb50d825..782fcf48 100644 --- a/node_modules/mocha/lib/hook.js +++ b/node_modules/mocha/lib/hook.js @@ -1,89 +1,80 @@ -"use strict"; +import { Runnable } from "./runnable.js"; +import utils from "./utils.cjs"; -var Runnable = require("./runnable"); -const { inherits, constants } = require("./utils"); -const { MOCHA_ID_PROP_NAME } = constants; +const { MOCHA_ID_PROP_NAME } = utils.constants; -/** - * Expose `Hook`. - */ - -module.exports = Hook; - -/** - * Initialize a new `Hook` with the given `title` and callback `fn` - * - * @class - * @extends Runnable - * @param {String} title - * @param {Function} fn - */ -function Hook(title, fn) { - Runnable.call(this, title, fn); - this.type = "hook"; -} +class Hook extends Runnable { + /** + * Initialize a new `Hook` with the given `title` and callback `fn` + * + * @extends Runnable + * @param {String} title + * @param {Function} fn + */ + constructor(title, fn) { + super(title, fn); + this.type = "hook"; + } -/** - * Inherit from `Runnable.prototype`. - */ -inherits(Hook, Runnable); + /** + * Resets the state for a next run. + */ + reset() { + super.reset(this); + delete this._error; + } -/** - * Resets the state for a next run. - */ -Hook.prototype.reset = function () { - Runnable.prototype.reset.call(this); - delete this._error; -}; + /** + * Get or set the test `err`. + * + * @memberof Hook + * @public + * @param {Error} err + * @return {Error} + */ + error(err) { + if (!arguments.length) { + err = this._error; + this._error = null; + return err; + } -/** - * Get or set the test `err`. - * - * @memberof Hook - * @public - * @param {Error} err - * @return {Error} - */ -Hook.prototype.error = function (err) { - if (!arguments.length) { - err = this._error; - this._error = null; - return err; + this._error = err; } - this._error = err; -}; + /** + * Returns an object suitable for IPC. + * Functions are represented by keys beginning with `$$`. + * @private + * @returns {Object} + */ + serialize() { + return { + $$currentRetry: this.currentRetry(), + $$fullTitle: this.fullTitle(), + $$isPending: Boolean(this.isPending()), + $$titlePath: this.titlePath(), + ctx: + this.ctx && this.ctx.currentTest + ? { + currentTest: { + title: this.ctx.currentTest.title, + [MOCHA_ID_PROP_NAME]: this.ctx.currentTest.id, + }, + } + : {}, + duration: this.duration, + file: this.file, + parent: { + $$fullTitle: this.parent.fullTitle(), + [MOCHA_ID_PROP_NAME]: this.parent.id, + }, + state: this.state, + title: this.title, + type: this.type, + [MOCHA_ID_PROP_NAME]: this.id, + }; + } +} -/** - * Returns an object suitable for IPC. - * Functions are represented by keys beginning with `$$`. - * @private - * @returns {Object} - */ -Hook.prototype.serialize = function serialize() { - return { - $$currentRetry: this.currentRetry(), - $$fullTitle: this.fullTitle(), - $$isPending: Boolean(this.isPending()), - $$titlePath: this.titlePath(), - ctx: - this.ctx && this.ctx.currentTest - ? { - currentTest: { - title: this.ctx.currentTest.title, - [MOCHA_ID_PROP_NAME]: this.ctx.currentTest.id, - }, - } - : {}, - duration: this.duration, - file: this.file, - parent: { - $$fullTitle: this.parent.fullTitle(), - [MOCHA_ID_PROP_NAME]: this.parent.id, - }, - state: this.state, - title: this.title, - type: this.type, - [MOCHA_ID_PROP_NAME]: this.id, - }; -}; +export { Hook }; diff --git a/node_modules/mocha/lib/interfaces/bdd.js b/node_modules/mocha/lib/interfaces/bdd.js index 231fa907..01c83710 100644 --- a/node_modules/mocha/lib/interfaces/bdd.js +++ b/node_modules/mocha/lib/interfaces/bdd.js @@ -1,12 +1,8 @@ -"use strict"; +import { Test } from "../test.js"; +import { Suite } from "../suite.js"; +import { createCommon } from "./common.js"; -/** - * @typedef {import('../suite.js')} Suite - */ - -var Test = require("../test"); -var EVENT_FILE_PRE_REQUIRE = - require("../suite").constants.EVENT_FILE_PRE_REQUIRE; +const EVENT_FILE_PRE_REQUIRE = Suite.constants.EVENT_FILE_PRE_REQUIRE; /** * BDD-style interface: @@ -25,11 +21,11 @@ var EVENT_FILE_PRE_REQUIRE = * * @param {Suite} suite Root suite. */ -module.exports = function bddInterface(suite) { +function bddInterface(suite) { var suites = [suite]; suite.on(EVENT_FILE_PRE_REQUIRE, function (context, file, mocha) { - var common = require("./common")(suites, context, mocha); + var common = createCommon(suites, context, mocha); context.before = common.before; context.after = common.after; @@ -113,6 +109,9 @@ module.exports = function bddInterface(suite) { return context.it(title); }; }); -}; +} + +// Required for `--list-interfaces` +bddInterface.description = "BDD or RSpec style [default]"; -module.exports.description = "BDD or RSpec style [default]"; +export { bddInterface }; diff --git a/node_modules/mocha/lib/interfaces/common.js b/node_modules/mocha/lib/interfaces/common.js index a1406225..9f82dfc0 100644 --- a/node_modules/mocha/lib/interfaces/common.js +++ b/node_modules/mocha/lib/interfaces/common.js @@ -1,19 +1,9 @@ -"use strict"; - -/** - * @typedef {import('../context.js')} Context - * @typedef {import('../mocha.js')} Mocha - */ - -/** - @module interfaces/common -*/ - -var Suite = require("../suite"); -var errors = require("../errors"); -var createMissingArgumentError = errors.createMissingArgumentError; -var createUnsupportedError = errors.createUnsupportedError; -var createForbiddenExclusivityError = errors.createForbiddenExclusivityError; +import { Suite } from "../suite.js"; +import { + createMissingArgumentError, + createUnsupportedError, + createForbiddenExclusivityError, +} from "../errors.js"; /** * Functions common to more than one interface. @@ -24,7 +14,7 @@ var createForbiddenExclusivityError = errors.createForbiddenExclusivityError; * @param {Mocha} mocha * @return {Object} An object containing common functions. */ -module.exports = function (suites, context, mocha) { +function createCommon(suites, context, mocha) { /** * Check if the suite should be tested. * @@ -195,4 +185,6 @@ module.exports = function (suites, context, mocha) { }, }, }; -}; +} + +export { createCommon }; diff --git a/node_modules/mocha/lib/interfaces/exports.js b/node_modules/mocha/lib/interfaces/exports.js index fac6aedb..96cc09c8 100644 --- a/node_modules/mocha/lib/interfaces/exports.js +++ b/node_modules/mocha/lib/interfaces/exports.js @@ -1,6 +1,5 @@ -"use strict"; -var Suite = require("../suite"); -var Test = require("../test"); +import { Suite } from "../suite.js"; +import { Test } from "../test.js"; /** * Exports-style (as Node.js module) interface: @@ -19,7 +18,7 @@ var Test = require("../test"); * * @param {Suite} suite Root suite. */ -module.exports = function (suite) { +function exportsInterface(suite) { var suites = [suite]; suite.on(Suite.constants.EVENT_FILE_REQUIRE, visit); @@ -55,6 +54,9 @@ module.exports = function (suite) { } } } -}; +} -module.exports.description = 'Node.js module ("exports") style'; +// Required for `--list-interfaces` +exportsInterface.description = 'Node.js module ("exports") style'; + +export { exportsInterface }; diff --git a/node_modules/mocha/lib/interfaces/index.js b/node_modules/mocha/lib/interfaces/index.js index 48ad0fd1..a86fa4f1 100644 --- a/node_modules/mocha/lib/interfaces/index.js +++ b/node_modules/mocha/lib/interfaces/index.js @@ -1,6 +1,11 @@ -"use strict"; +import { bddInterface } from "./bdd.js"; +import { tddInterface } from "./tdd.js"; +import { qUnitInterface } from "./qunit.js"; +import { exportsInterface } from "./exports.js"; -exports.bdd = require("./bdd"); -exports.tdd = require("./tdd"); -exports.qunit = require("./qunit"); -exports.exports = require("./exports"); +export { + bddInterface as bdd, + tddInterface as tdd, + qUnitInterface as qunit, + exportsInterface as exports, +}; diff --git a/node_modules/mocha/lib/interfaces/qunit.js b/node_modules/mocha/lib/interfaces/qunit.js index c47d48d9..54a7899b 100644 --- a/node_modules/mocha/lib/interfaces/qunit.js +++ b/node_modules/mocha/lib/interfaces/qunit.js @@ -1,11 +1,8 @@ -"use strict"; -/** - * @typedef {import('../suite.js')} Suite - */ +import { Test } from "../test.js"; +import { Suite } from "../suite.js"; +import { createCommon } from "./common.js"; -var Test = require("../test"); -var EVENT_FILE_PRE_REQUIRE = - require("../suite").constants.EVENT_FILE_PRE_REQUIRE; +const EVENT_FILE_PRE_REQUIRE = Suite.constants.EVENT_FILE_PRE_REQUIRE; /** * QUnit-style interface: @@ -32,11 +29,11 @@ var EVENT_FILE_PRE_REQUIRE = * * @param {Suite} suite Root suite. */ -module.exports = function qUnitInterface(suite) { +function qUnitInterface(suite) { var suites = [suite]; suite.on(EVENT_FILE_PRE_REQUIRE, function (context, file, mocha) { - var common = require("./common")(suites, context, mocha); + var common = createCommon(suites, context, mocha); context.before = common.before; context.after = common.after; @@ -96,6 +93,9 @@ module.exports = function qUnitInterface(suite) { context.test.skip = common.test.skip; }); -}; +} + +// Required for `--list-interfaces` +qUnitInterface.description = "QUnit style"; -module.exports.description = "QUnit style"; +export { qUnitInterface }; diff --git a/node_modules/mocha/lib/interfaces/tdd.js b/node_modules/mocha/lib/interfaces/tdd.js index 6b669814..40a2be1b 100644 --- a/node_modules/mocha/lib/interfaces/tdd.js +++ b/node_modules/mocha/lib/interfaces/tdd.js @@ -1,12 +1,8 @@ -"use strict"; +import { Test } from "../test.js"; +import { Suite } from "../suite.js"; +import { createCommon } from "./common.js"; -/** - * @typedef {import('../suite.js')} Suite - */ - -var Test = require("../test"); -var EVENT_FILE_PRE_REQUIRE = - require("../suite").constants.EVENT_FILE_PRE_REQUIRE; +const EVENT_FILE_PRE_REQUIRE = Suite.constants.EVENT_FILE_PRE_REQUIRE; /** * TDD-style interface: @@ -33,11 +29,11 @@ var EVENT_FILE_PRE_REQUIRE = * * @param {Suite} suite Root suite. */ -module.exports = function (suite) { +function tddInterface(suite) { var suites = [suite]; suite.on(EVENT_FILE_PRE_REQUIRE, function (context, file, mocha) { - var common = require("./common")(suites, context, mocha); + var common = createCommon(suites, context, mocha); context.setup = common.beforeEach; context.teardown = common.afterEach; @@ -104,7 +100,10 @@ module.exports = function (suite) { context.test.skip = common.test.skip; }); -}; +} -module.exports.description = +// Required for `--list-interfaces` +tddInterface.description = 'traditional "suite"/"test" instead of BDD\'s "describe"/"it"'; + +export { tddInterface }; diff --git a/node_modules/mocha/lib/mocha.js b/node_modules/mocha/lib/mocha.cjs similarity index 93% rename from node_modules/mocha/lib/mocha.js rename to node_modules/mocha/lib/mocha.cjs index ce8ef1a9..aad4cedd 100644 --- a/node_modules/mocha/lib/mocha.js +++ b/node_modules/mocha/lib/mocha.cjs @@ -6,21 +6,21 @@ * MIT Licensed */ -var escapeRe = require("escape-string-regexp"); +var { escapeRegExp } = require("./utils/regexp.js"); var path = require("node:path"); -var builtinReporters = require("./reporters"); -var utils = require("./utils"); +var builtinReporters = require("./reporters/index.cjs"); +var utils = require("./utils.cjs"); var mocharc = require("./mocharc.json"); -var Suite = require("./suite"); -var esmUtils = require("./nodejs/esm-utils"); -var createStatsCollector = require("./stats-collector"); +var { Suite } = require("./suite.js"); +var esmUtils = require("./nodejs/esm-utils.cjs"); +var createStatsCollector = require("./stats-collector.js").createStatsCollector; const { createInvalidReporterError, createInvalidInterfaceError, createMochaInstanceAlreadyDisposedError, createMochaInstanceAlreadyRunningError, createUnsupportedError, -} = require("./errors"); +} = require("./errors.js"); const { EVENT_FILE_PRE_REQUIRE, EVENT_FILE_POST_REQUIRE, EVENT_FILE_REQUIRE } = Suite.constants; var debug = require("debug")("mocha:mocha"); @@ -33,8 +33,12 @@ var debug = require("debug")("mocha:mocha"); * @typedef {import('./types.d.ts').Reporter} Reporter */ +// Legacy CJS-style require() export, as well as default in ESM exports = module.exports = Mocha; +// Modern property-based / ESM named export +module.exports.Mocha = Mocha; + /** * A Mocha instance is a finite state machine. * These are the states it can be in. @@ -79,22 +83,24 @@ if (!utils.isBrowser() && typeof module.paths !== "undefined") { */ exports.utils = utils; -exports.interfaces = require("./interfaces"); +// Must be extensible, see `should add the interface` test +// in `run-helpers.spec.js` +exports.interfaces = { ...require("./interfaces/index.js") }; /** * @public * @memberof Mocha */ exports.reporters = builtinReporters; -exports.Runnable = require("./runnable"); -exports.Context = require("./context"); +exports.Runnable = require("./runnable.js").Runnable; +exports.Context = require("./context.js").Context; /** * * @memberof Mocha */ -exports.Runner = require("./runner"); +exports.Runner = require("./runner.cjs"); exports.Suite = Suite; -exports.Hook = require("./hook"); -exports.Test = require("./test"); +exports.Hook = require("./hook.js").Hook; +exports.Test = require("./test.js").Test; let currentContext; exports.afterEach = function (...args) { @@ -329,6 +335,10 @@ Mocha.prototype.reporter = function (reporterName, reporterOptions) { } } } + if (reporter.default) { + reporter = reporter.default; + } + this._reporter = reporter; } this.options.reporterOption = reporterOptions; @@ -358,11 +368,15 @@ Mocha.prototype.ui = function (ui) { if (!bindInterface) { try { bindInterface = require(ui); - } catch (err) { + } catch { throw createInvalidInterfaceError(`invalid interface '${ui}'`, ui); } } } + if (bindInterface.default) { + bindInterface = bindInterface.default; + } + bindInterface(this.suite); this.suite.on(EVENT_FILE_PRE_REQUIRE, function (context) { @@ -453,7 +467,7 @@ Mocha.unloadFile = function (file) { "unloadFile() is only supported in a Node.js environment", ); } - return require("./nodejs/file-unloader").unloadFile(file); + return require("./nodejs/file-unloader.cjs").unloadFile(file); }; /** @@ -504,7 +518,7 @@ Mocha.prototype.fgrep = function (str) { if (!str) { return this; } - return this.grep(new RegExp(escapeRe(str))); + return this.grep(new RegExp(escapeRegExp(str))); }; /** @@ -544,7 +558,7 @@ Mocha.prototype.fgrep = function (str) { Mocha.prototype.grep = function (re) { if (utils.isString(re)) { // extract args if it's regex-like, i.e: [string, pattern, flag] - var arg = re.match(/^\/(.*)\/([gimy]{0,4})$|.*/); + var arg = re.match(/^\/(.*)\/([a-z]*)$|.*/); this.options.grep = new RegExp(arg[1] || arg[0], arg[2]); } else { this.options.grep = re; @@ -957,7 +971,7 @@ Object.defineProperty(Mocha.prototype, "version", { * @see {@link Mocha#unloadFiles} * @see {@link Runner#run} * @param {DoneCB} [fn] - Callback invoked when test execution completed. - * @returns {import("./runner.js")} runner instance + * @returns {import("./runner.cjs")} runner instance * @example * * // exit with non-zero status if there were test failures @@ -1016,26 +1030,40 @@ Mocha.prototype.run = function (fn) { } }; + const reportFixtureError = (phase, err) => { + process.stderr.write( + `\n[mocha] global ${phase} failed:\n${err && err.stack ? err.stack : err}\n`, + ); + }; + const runAsync = async (runner) => { - const context = - this.options.enableGlobalSetup && this.hasGlobalSetupFixtures() - ? await this.runGlobalSetup(runner) - : {}; + let context = {}; + if (this.options.enableGlobalSetup && this.hasGlobalSetupFixtures()) { + try { + context = await this.runGlobalSetup(runner); + } catch (err) { + reportFixtureError("setup", err); + return 1; + } + } const failureCount = await runner.runAsync({ files: this.files, options, }); if (this.options.enableGlobalTeardown && this.hasGlobalTeardownFixtures()) { - await this.runGlobalTeardown(runner, { context }); + try { + await this.runGlobalTeardown(runner, { context }); + } catch (err) { + reportFixtureError("teardown", err); + return failureCount + 1; + } } return failureCount; }; - // no "catch" here is intentional. errors coming out of - // Runner#run are considered uncaught/unhandled and caught - // by the `process` event listeners. - // also: returning anything other than `runner` would be a breaking - // change + // Errors coming out of Runner#run itself remain uncaught/unhandled and are picked up by the `process` event listeners. + // Only global fixture errors are intercepted above so they surface to the user instead of being silently "swallowed". + // Also: returning anything other than `runner` would be a breaking change. runAsync(runner).then(done); return runner; @@ -1107,7 +1135,7 @@ Mocha.prototype.parallelMode = function parallelMode(enable = true) { // swap Runner class this._runnerClass = parallel - ? require("./nodejs/parallel-buffered-runner") + ? require("./nodejs/parallel-buffered-runner.cjs") : exports.Runner; // lazyLoadFiles may have been set `true` otherwise (for ESM loading), diff --git a/node_modules/mocha/lib/nodejs/buffered-worker-pool.js b/node_modules/mocha/lib/nodejs/buffered-worker-pool.cjs similarity index 96% rename from node_modules/mocha/lib/nodejs/buffered-worker-pool.js rename to node_modules/mocha/lib/nodejs/buffered-worker-pool.cjs index c8b3f3a3..cd357df9 100644 --- a/node_modules/mocha/lib/nodejs/buffered-worker-pool.js +++ b/node_modules/mocha/lib/nodejs/buffered-worker-pool.cjs @@ -15,11 +15,11 @@ const serializeJavascript = require("serialize-javascript"); const workerpool = require("workerpool"); -const { deserialize } = require("./serializer"); +const { deserialize } = require("./serializer.js"); const debug = require("debug")("mocha:parallel:buffered-worker-pool"); -const { createInvalidArgumentTypeError } = require("../errors"); +const { createInvalidArgumentTypeError } = require("../errors.js"); -const WORKER_PATH = require.resolve("./worker.js"); +const WORKER_PATH = require.resolve("./worker.cjs"); /** * A mapping of Mocha `Options` objects to serialized values. diff --git a/node_modules/mocha/lib/nodejs/esm-utils.js b/node_modules/mocha/lib/nodejs/esm-utils.cjs similarity index 89% rename from node_modules/mocha/lib/nodejs/esm-utils.js rename to node_modules/mocha/lib/nodejs/esm-utils.cjs index caeb81bc..31c66695 100644 --- a/node_modules/mocha/lib/nodejs/esm-utils.js +++ b/node_modules/mocha/lib/nodejs/esm-utils.cjs @@ -1,6 +1,7 @@ const path = require("node:path"); const url = require("node:url"); const debug = require("debug")("mocha:esm-utils"); +const { isMochaError } = require("../errors.js"); const forward = (x) => x; @@ -98,7 +99,7 @@ const requireModule = async (file, esmDecorator) => { return require(file); } catch (requireErr) { debug("requireModule caught err: %O", requireErr.message); - if (requireErr.name === "TSError") { + if (requireErr.name === "TSError" || isMochaError(requireErr)) { throw requireErr; } try { @@ -109,7 +110,7 @@ const requireModule = async (file, esmDecorator) => { // What we actually care about is the original require() error. // See: https://github.com/mochajs/mocha/issues/5393 if ( - /\.(cts|mts|ts)$/.test(file) && + /\.(cts|mts|ts)$/.test(file) || importErr.code === "ERR_UNKNOWN_FILE_EXTENSION" ) { throw requireErr; @@ -147,6 +148,22 @@ function dealWithExports(module) { } } +const resolveFile = (file) => { + if (URL.canParse(file)) { + const parsed = new URL(file); + // Single-letter "protocols" (e.g. "d:") are Windows drive letters, not URL schemes + if (parsed.protocol.length > 2) { + if (parsed.protocol === "file:") { + return url.fileURLToPath(parsed); + } + throw new Error( + `Unsupported URL protocol "${parsed.protocol}". Only "file:" URLs are supported.`, + ); + } + } + return path.resolve(file); +}; + exports.loadFilesAsync = async ( files, preLoadFunc, @@ -156,7 +173,7 @@ exports.loadFilesAsync = async ( for (const file of files) { preLoadFunc(file); const result = await exports.requireOrImport( - path.resolve(file), + resolveFile(file), esmDecorator, ); postLoadFunc(file, result); diff --git a/node_modules/mocha/lib/nodejs/file-unloader.js b/node_modules/mocha/lib/nodejs/file-unloader.cjs similarity index 100% rename from node_modules/mocha/lib/nodejs/file-unloader.js rename to node_modules/mocha/lib/nodejs/file-unloader.cjs diff --git a/node_modules/mocha/lib/nodejs/parallel-buffered-runner.js b/node_modules/mocha/lib/nodejs/parallel-buffered-runner.cjs similarity index 97% rename from node_modules/mocha/lib/nodejs/parallel-buffered-runner.js rename to node_modules/mocha/lib/nodejs/parallel-buffered-runner.cjs index be6f59d7..de2d8128 100644 --- a/node_modules/mocha/lib/nodejs/parallel-buffered-runner.js +++ b/node_modules/mocha/lib/nodejs/parallel-buffered-runner.cjs @@ -13,18 +13,17 @@ * @typedef {import('../types.d.ts').SigIntListener} SigIntListener */ -const Runner = require("../runner"); +const Runner = require("../runner.cjs"); const { EVENT_RUN_BEGIN, EVENT_RUN_END } = Runner.constants; const debug = require("debug")("mocha:parallel:parallel-buffered-runner"); -const { BufferedWorkerPool } = require("./buffered-worker-pool"); +const { BufferedWorkerPool } = require("./buffered-worker-pool.cjs"); const { setInterval, clearInterval } = global; -const { createMap, constants } = require("../utils"); +const { createMap, constants } = require("../utils.cjs"); const { MOCHA_ID_PROP_NAME } = constants; -const { createFatalError } = require("../errors"); +const { createFatalError } = require("../errors.js"); -const DEFAULT_WORKER_REPORTER = require.resolve( - "./reporters/parallel-buffered", -); +const DEFAULT_WORKER_REPORTER = + require.resolve("./reporters/parallel-buffered.cjs"); /** * List of options to _not_ serialize for transmission to workers diff --git a/node_modules/mocha/lib/nodejs/reporters/parallel-buffered.js b/node_modules/mocha/lib/nodejs/reporters/parallel-buffered.cjs similarity index 96% rename from node_modules/mocha/lib/nodejs/reporters/parallel-buffered.js rename to node_modules/mocha/lib/nodejs/reporters/parallel-buffered.cjs index 085e09bd..1fb0c0ca 100644 --- a/node_modules/mocha/lib/nodejs/reporters/parallel-buffered.js +++ b/node_modules/mocha/lib/nodejs/reporters/parallel-buffered.cjs @@ -8,7 +8,7 @@ /** * @typedef {import('../../types.d.ts').BufferedEvent} BufferedEvent - * @typedef {import('../../runner.js')} Runner + * @typedef {import('../../runner.cjs')} Runner */ /** @@ -29,13 +29,13 @@ const { EVENT_HOOK_BEGIN, EVENT_HOOK_END, EVENT_RUN_END, -} = require("../../runner").constants; +} = require("../../runner.cjs").constants; const { SerializableEvent, SerializableWorkerResult, -} = require("../serializer"); +} = require("../serializer.js"); const debug = require("debug")("mocha:reporters:buffered"); -const Base = require("../../reporters/base"); +const { Base } = require("../../reporters/base.js"); /** * List of events to listen to; these will be buffered and sent diff --git a/node_modules/mocha/lib/nodejs/serializer.js b/node_modules/mocha/lib/nodejs/serializer.js index 8e6253ff..74e41a10 100644 --- a/node_modules/mocha/lib/nodejs/serializer.js +++ b/node_modules/mocha/lib/nodejs/serializer.js @@ -4,18 +4,18 @@ * @private */ -"use strict"; - /** * @typedef {import('../types.d.ts').SerializedEvent} SerializedEvent * @typedef {import('../types.d.ts').SerializedWorkerResult} SerializedWorkerResult */ -const { type, breakCircularDeps } = require("../utils"); -const { createInvalidArgumentTypeError } = require("../errors"); +import { type, breakCircularDeps } from "../utils.cjs"; +import { createInvalidArgumentTypeError } from "../errors.js"; +import d from "debug"; + // this is not named `mocha:parallel:serializer` because it's noisy and it's // helpful to be able to write `DEBUG=mocha:parallel*` and get everything else. -const debug = require("debug")("mocha:serializer"); +const debug = d.debug("mocha:serializer"); const SERIALIZABLE_RESULT_NAME = "SerializableWorkerResult"; const SERIALIZABLE_TYPES = new Set(["object", "array", "function", "error"]); @@ -24,7 +24,7 @@ const SERIALIZABLE_TYPES = new Set(["object", "array", "function", "error"]); * The serializable result of a test file run from a worker. * @private */ -class SerializableWorkerResult { +export class SerializableWorkerResult { /** * Creates instance props; of note, the `__type` prop. * @@ -118,7 +118,7 @@ class SerializableWorkerResult { * deserialization. * @private */ -class SerializableEvent { +export class SerializableEvent { /** * Constructs a `SerializableEvent`, throwing if we receive unexpected data. * @@ -371,14 +371,14 @@ class SerializableEvent { * * @param {*} [value] - A value to serialize */ -exports.serialize = function serialize(value) { +export function serialize(value) { const result = type(value) === "object" && type(value.serialize) === "function" ? value.serialize() : value; debug("serialized: %O", result); return result; -}; +} /** * "Deserializes" a "message" received over IPC. @@ -388,13 +388,10 @@ exports.serialize = function serialize(value) { * * @param {*} [value] - A "message" to deserialize */ -exports.deserialize = function deserialize(value) { +export function deserialize(value) { const result = SerializableWorkerResult.isSerializedWorkerResult(value) ? SerializableWorkerResult.deserialize(value) : value; debug("deserialized: %O", result); return result; -}; - -exports.SerializableEvent = SerializableEvent; -exports.SerializableWorkerResult = SerializableWorkerResult; +} diff --git a/node_modules/mocha/lib/nodejs/worker.js b/node_modules/mocha/lib/nodejs/worker.cjs similarity index 94% rename from node_modules/mocha/lib/nodejs/worker.js rename to node_modules/mocha/lib/nodejs/worker.cjs index 4b87d98f..3aec72bd 100644 --- a/node_modules/mocha/lib/nodejs/worker.js +++ b/node_modules/mocha/lib/nodejs/worker.cjs @@ -14,14 +14,17 @@ const { createInvalidArgumentTypeError, createInvalidArgumentValueError, -} = require("../errors"); +} = require("../errors.js"); const workerpool = require("workerpool"); -const Mocha = require("../mocha"); -const { handleRequires, validateLegacyPlugin } = require("../cli/run-helpers"); +const Mocha = require("../mocha.cjs"); +const { + handleRequires, + validateLegacyPlugin, +} = require("../cli/run-helpers.cjs"); const d = require("debug"); const debug = d.debug(`mocha:parallel:worker:${process.pid}`); const isDebugEnabled = d.enabled(`mocha:parallel:worker:${process.pid}`); -const { serialize } = require("./serializer"); +const { serialize } = require("./serializer.js"); const { setInterval, clearInterval } = global; let rootHooks; @@ -83,9 +86,8 @@ async function run(filepath, serializedOptions = "{}") { } let argv; try { - // eslint-disable-next-line no-eval argv = eval("(" + serializedOptions + ")"); - } catch (err) { + } catch { throw createInvalidArgumentValueError( "run() was unable to deserialize the options", "serializedOptions", diff --git a/node_modules/mocha/lib/pending.js b/node_modules/mocha/lib/pending.js index dedea5eb..8e586abc 100644 --- a/node_modules/mocha/lib/pending.js +++ b/node_modules/mocha/lib/pending.js @@ -1,16 +1,17 @@ -"use strict"; - /** @module Pending */ -module.exports = Pending; - /** - * Initialize a new `Pending` error with the given message. + * Initialize a new `PendingError` error with the given message. * * @param {string} message */ -function Pending(message) { - this.message = message; +class PendingError extends Error { + constructor(message) { + super(message); + this.name = "PendingError"; + } } + +export { PendingError }; diff --git a/node_modules/mocha/lib/plugin-loader.js b/node_modules/mocha/lib/plugin-loader.js index 4469621a..c873be43 100644 --- a/node_modules/mocha/lib/plugin-loader.js +++ b/node_modules/mocha/lib/plugin-loader.js @@ -13,14 +13,13 @@ * @module plugin */ -"use strict"; - -const debug = require("debug")("mocha:plugin-loader"); -const { +import debugModule from "debug"; +import { createInvalidPluginDefinitionError, createInvalidPluginImplementationError, -} = require("./errors"); -const { castArray } = require("./utils"); +} from "./errors.js"; +import { castArray } from "./utils.cjs"; +const debug = debugModule("mocha:plugin-loader"); /** * @typedef {import('./types.d.ts').PluginLoaderOptions} PluginLoaderOptions @@ -284,4 +283,4 @@ class PluginLoader { } } -module.exports = PluginLoader; +export { PluginLoader }; diff --git a/node_modules/mocha/lib/reporters/base.js b/node_modules/mocha/lib/reporters/base.js index 3c200388..e537ed9b 100644 --- a/node_modules/mocha/lib/reporters/base.js +++ b/node_modules/mocha/lib/reporters/base.js @@ -1,7 +1,5 @@ -"use strict"; - /** - * @typedef {import('../runner.js')} Runner + * @typedef {import('../runner.cjs')} Runner * @typedef {import('../test.js')} Test * @typedef {import('../types.d.ts').FullErrorStack} FullErrorStack */ @@ -13,12 +11,13 @@ * Module dependencies. */ -var diff = require("diff"); -var milliseconds = require("ms"); -var utils = require("../utils"); -var supportsColor = require("supports-color"); -var symbols = require("log-symbols"); -var constants = require("../runner").constants; +import * as diff from "diff"; +import milliseconds from "ms"; +import utils from "../utils.cjs"; +import supportsColor from "supports-color"; +import Runner from "../runner.cjs"; + +const { constants } = Runner; var EVENT_TEST_PASS = constants.EVENT_TEST_PASS; var EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL; @@ -32,12 +31,6 @@ function getBrowserWindowSize() { return [640, 480]; } -/** - * Expose `Base`. - */ - -exports = module.exports = Base; - /** * Check if both stdio streams are associated with a tty. */ @@ -50,10 +43,108 @@ var isatty = isBrowser || (process.stdout.isTTY && process.stderr.isTTY); var consoleLog = console.log; /** - * Enable coloring by default, except in the browser interface. + * @abstract + * @description + * All other reporters generally inherit from this reporter. */ +export class Base { + /** + * Constructs a new `Base` reporter instance. + * + * @public + * @memberof Mocha.reporters + * @param {Runner} runner - Instance triggers reporter actions. + * @param {Object} [options] - runner options + */ + constructor(runner, options) { + var failures = (this.failures = []); + + if (!runner) { + throw new TypeError("Missing runner argument"); + } + this.options = options || {}; + this.runner = runner; + this.stats = runner.stats; // assigned so Reporters keep a closer reference + + var maxDiffSizeOpt = + this.options.reporterOption && this.options.reporterOption.maxDiffSize; + if (maxDiffSizeOpt !== undefined && !isNaN(Number(maxDiffSizeOpt))) { + Base.maxDiffSize = Number(maxDiffSizeOpt); + } + + runner.on(EVENT_TEST_PASS, function (test) { + if (test.duration > test.slow()) { + test.speed = "slow"; + } else if (test.duration > test.slow() / 2) { + test.speed = "medium"; + } else { + test.speed = "fast"; + } + }); + + runner.on(EVENT_TEST_FAIL, function (test, err) { + if (Base.showDiff(err)) { + stringifyDiffObjs(err); + } + // more than one error per test + if (test.err && err instanceof Error) { + test.err.multiple = (test.err.multiple || []).concat(err); + } else { + test.err = err; + } + failures.push(test); + }); + } + + /** + * Outputs common epilogue used by many of the bundled reporters. + * + * @public + * @memberof Mocha.reporters + */ + epilogue() { + var stats = this.stats; + var fmt; + + Base.consoleLog(); + + // passes + fmt = + Base.color("bright pass", " ") + + Base.color("green", " %d passing") + + Base.color("light", " (%s)"); + + Base.consoleLog(fmt, stats.passes || 0, milliseconds(stats.duration)); + + // pending + if (stats.pending) { + fmt = Base.color("pending", " ") + Base.color("pending", " %d pending"); + + Base.consoleLog(fmt, stats.pending); + } + + // failures + if (stats.failures) { + fmt = Base.color("fail", " %d failing"); -exports.useColors = + Base.consoleLog(fmt, stats.failures); + + Base.list(this.failures); + Base.consoleLog(); + } + + Base.consoleLog(); + } +} + +Base.consoleLog = consoleLog; + +Base.abstract = true; + +/** + * Enable coloring by default, except in the browser interface. + */ +Base.useColors = !isBrowser && (supportsColor.stdout || process.env.MOCHA_COLORS !== undefined); @@ -61,18 +152,18 @@ exports.useColors = * Inline diffs instead of +/- */ -exports.inlineDiffs = false; +Base.inlineDiffs = false; /** * Truncate diffs longer than this value to avoid slow performance */ -exports.maxDiffSize = 8192; +Base.maxDiffSize = 8192; /** * Default color map. */ -exports.colors = { +Base.colors = { pass: 90, fail: 31, "bright pass": 92, @@ -100,9 +191,9 @@ exports.colors = { * Default symbol map. */ -exports.symbols = { - ok: symbols.success, - err: symbols.error, +Base.symbols = { + ok: utils.logSymbols.success, + err: utils.logSymbols.error, dot: ".", comma: ",", bang: "!", @@ -119,26 +210,26 @@ exports.symbols = { * @param {string} str * @return {string} */ -var color = (exports.color = function (type, str) { - if (!exports.useColors) { +Base.color = function (type, str) { + if (!Base.useColors) { return String(str); } - return "\u001b[" + exports.colors[type] + "m" + str + "\u001b[0m"; -}); + return "\u001b[" + Base.colors[type] + "m" + str + "\u001b[0m"; +}; /** * Expose term window size, with some defaults for when stderr is not a tty. */ -exports.window = { +Base.window = { width: 75, }; if (isatty) { if (isBrowser) { - exports.window.width = getBrowserWindowSize()[1]; + Base.window.width = getBrowserWindowSize()[1]; } else { - exports.window.width = process.stdout.getWindowSize(1)[0]; + Base.window.width = process.stdout.getWindowSize(1)[0]; } } @@ -146,7 +237,7 @@ if (isatty) { * Expose some basic cursor interactions that are common among reporters. */ -exports.cursor = { +Base.cursor = { hide: function () { isatty && process.stdout.write("\u001b[?25l"); }, @@ -165,25 +256,94 @@ exports.cursor = { CR: function () { if (isatty) { - exports.cursor.deleteLine(); - exports.cursor.beginningOfLine(); + Base.cursor.deleteLine(); + Base.cursor.beginningOfLine(); } else { process.stdout.write("\r"); } }, }; -var showDiff = (exports.showDiff = function (err) { +Base.showDiff = function (err) { return ( err && err.showDiff !== false && sameType(err.actual, err.expected) && err.expected !== undefined ); -}); +}; + +/** + * Estimate the serialized size of a value. + * Returns -1 if the value is too complex to estimate safely. + * + * @private + * @param {*} val + * @param {number} maxDepth + * @param {Set<*>} [seen] + * @returns {number} + */ +function estimateSize(val, maxDepth, seen) { + if (maxDepth <= 0) return -1; + + seen = seen || new Set(); + + const type = typeof val; + if (type === "string") return val.length; + if (type === "number" || type === "boolean") return 8; + if (val === null || val === undefined) return 4; + + // Avoid circular references + if (type === "object") { + if (seen.has(val)) return -1; + seen.add(val); + + // Special handling for Buffers - they can be massive + if (typeof Buffer !== "undefined" && Buffer.isBuffer(val)) { + return val.length > 10000 ? -1 : val.length * 2; + } + + let size = 2; // {} or [] + try { + const keys = Object.keys(val); + if (keys.length > 1000) return -1; // Too many keys + + for (const key of keys) { + const childSize = estimateSize(val[key], maxDepth - 1, seen); + if (childSize === -1) return -1; + size += key.length + childSize + 4; // key + value + formatting + if (size > 100000) return -1; // Bail early if getting huge + } + } catch { + return -1; + } + + seen.delete(val); + return size; + } + + return 50; // Default estimate for other types +} function stringifyDiffObjs(err) { if (!utils.isString(err.actual) || !utils.isString(err.expected)) { + // Estimate size before stringifying to avoid hangs + const maxSafeSize = Base.maxDiffSize || 8192; + const actualSize = estimateSize(err.actual, 10); + const expectedSize = estimateSize(err.expected, 10); + + if ( + actualSize === -1 || + expectedSize === -1 || + actualSize > maxSafeSize || + expectedSize > maxSafeSize + ) { + // Values too large/complex - provide safe fallback + err.actual = "[object too large to diff]"; + err.expected = "[object too large to diff]"; + return; + } + err.actual = utils.stringify(err.actual); err.expected = utils.stringify(err.expected); } @@ -201,32 +361,32 @@ function stringifyDiffObjs(err) { * @return {string} Diff */ -var generateDiff = (exports.generateDiff = function (actual, expected) { +Base.generateDiff = function (actual, expected) { try { - var maxLen = exports.maxDiffSize; + var maxLen = Base.maxDiffSize; var skipped = 0; if (maxLen > 0) { skipped = Math.max(actual.length - maxLen, expected.length - maxLen); actual = actual.slice(0, maxLen); expected = expected.slice(0, maxLen); } - let result = exports.inlineDiffs + let result = Base.inlineDiffs ? inlineDiff(actual, expected) : unifiedDiff(actual, expected); if (skipped > 0) { result = `${result}\n [mocha] output truncated to ${maxLen} characters, see "maxDiffSize" reporter-option\n`; } return result; - } catch (err) { + } catch { var msg = "\n " + - color("diff added", "+ expected") + + Base.color("diff added", "+ expected") + " " + - color("diff removed", "- actual: failed to generate Mocha diff") + + Base.color("diff removed", "- actual: failed to generate Mocha diff") + "\n"; return msg; } -}); +}; /** * Traverses err.cause and returns all stack traces @@ -290,15 +450,15 @@ var getFullErrorStack = function (err, seen) { * @param {Object[]} failures - Each is Test instance with corresponding * Error property */ -exports.list = function (failures) { +Base.list = function (failures) { var multipleErr, multipleTest; Base.consoleLog(); failures.forEach(function (test, i) { // format var fmt = - color("error title", " %s) %s:\n") + - color("error message", " %s") + - color("error stack", "\n%s\n"); + Base.color("error title", " %s) %s:\n") + + Base.color("error message", " %s") + + Base.color("error stack", "\n%s\n"); // msg var err; @@ -319,14 +479,15 @@ exports.list = function (failures) { msg = "Uncaught " + msg; } // explicitly show diff - if (!exports.hideDiff && showDiff(err)) { + if (!Base.hideDiff && Base.showDiff(err)) { stringifyDiffObjs(err); fmt = - color("error title", " %s) %s:\n%s") + color("error stack", "\n%s\n"); + Base.color("error title", " %s) %s:\n%s") + + Base.color("error stack", "\n%s\n"); var match = message.match(/^([^:]+): expected/); - msg = "\n " + color("error message", match ? match[1] : msg); + msg = "\n " + Base.color("error message", match ? match[1] : msg); - msg += generateDiff(err.actual, err.expected); + msg += Base.generateDiff(err.actual, err.expected); } // indent stack trace @@ -348,98 +509,6 @@ exports.list = function (failures) { }); }; -/** - * Constructs a new `Base` reporter instance. - * - * @description - * All other reporters generally inherit from this reporter. - * - * @public - * @class - * @memberof Mocha.reporters - * @param {Runner} runner - Instance triggers reporter actions. - * @param {Object} [options] - runner options - */ -function Base(runner, options) { - var failures = (this.failures = []); - - if (!runner) { - throw new TypeError("Missing runner argument"); - } - this.options = options || {}; - this.runner = runner; - this.stats = runner.stats; // assigned so Reporters keep a closer reference - - var maxDiffSizeOpt = - this.options.reporterOption && this.options.reporterOption.maxDiffSize; - if (maxDiffSizeOpt !== undefined && !isNaN(Number(maxDiffSizeOpt))) { - exports.maxDiffSize = Number(maxDiffSizeOpt); - } - - runner.on(EVENT_TEST_PASS, function (test) { - if (test.duration > test.slow()) { - test.speed = "slow"; - } else if (test.duration > test.slow() / 2) { - test.speed = "medium"; - } else { - test.speed = "fast"; - } - }); - - runner.on(EVENT_TEST_FAIL, function (test, err) { - if (showDiff(err)) { - stringifyDiffObjs(err); - } - // more than one error per test - if (test.err && err instanceof Error) { - test.err.multiple = (test.err.multiple || []).concat(err); - } else { - test.err = err; - } - failures.push(test); - }); -} - -/** - * Outputs common epilogue used by many of the bundled reporters. - * - * @public - * @memberof Mocha.reporters - */ -Base.prototype.epilogue = function () { - var stats = this.stats; - var fmt; - - Base.consoleLog(); - - // passes - fmt = - color("bright pass", " ") + - color("green", " %d passing") + - color("light", " (%s)"); - - Base.consoleLog(fmt, stats.passes || 0, milliseconds(stats.duration)); - - // pending - if (stats.pending) { - fmt = color("pending", " ") + color("pending", " %d pending"); - - Base.consoleLog(fmt, stats.pending); - } - - // failures - if (stats.failures) { - fmt = color("fail", " %d failing"); - - Base.consoleLog(fmt, stats.failures); - - Base.list(this.failures); - Base.consoleLog(); - } - - Base.consoleLog(); -}; - /** * Pads the given `str` to `len`. * @@ -470,7 +539,7 @@ function inlineDiff(actual, expected) { var width = String(lines.length).length; msg = lines .map(function (str, i) { - return pad(++i, width) + " |" + " " + str; + return pad(i + 1, width) + " |" + " " + str; }) .join("\n"); } @@ -478,9 +547,9 @@ function inlineDiff(actual, expected) { // legend msg = "\n" + - color("diff removed inline", "actual") + + Base.color("diff removed inline", "actual") + " " + - color("diff added inline", "expected") + + Base.color("diff added inline", "expected") + "\n\n" + msg + "\n"; @@ -565,7 +634,7 @@ function colorLines(name, str) { return str .split("\n") .map(function (str) { - return color(name, str); + return Base.color(name, str); }) .join("\n"); } @@ -586,7 +655,3 @@ var objToString = Object.prototype.toString; function sameType(a, b) { return objToString.call(a) === objToString.call(b); } - -Base.consoleLog = consoleLog; - -Base.abstract = true; diff --git a/node_modules/mocha/lib/reporters/doc.js b/node_modules/mocha/lib/reporters/doc.js index da8e5d11..62e33e3a 100644 --- a/node_modules/mocha/lib/reporters/doc.js +++ b/node_modules/mocha/lib/reporters/doc.js @@ -1,7 +1,5 @@ -"use strict"; - /** - * @typedef {import('../runner.js')} Runner + * @typedef {import('../runner.cjs')} Runner */ /** @@ -11,90 +9,92 @@ * Module dependencies. */ -var Base = require("./base"); -var utils = require("../utils"); -var constants = require("../runner").constants; +import { Base } from "./base.js"; +import utils from "../utils.cjs"; +import Runner from "../runner.cjs"; +var constants = Runner.constants; var EVENT_TEST_PASS = constants.EVENT_TEST_PASS; var EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL; var EVENT_SUITE_BEGIN = constants.EVENT_SUITE_BEGIN; var EVENT_SUITE_END = constants.EVENT_SUITE_END; -/** - * Expose `Doc`. - */ - -exports = module.exports = Doc; +class Doc extends Base { + static description = "HTML documentation"; -/** - * Constructs a new `Doc` reporter instance. - * - * @public - * @class - * @memberof Mocha.reporters - * @extends Mocha.reporters.Base - * @param {Runner} runner - Instance triggers reporter actions. - * @param {Object} [options] - runner options - */ -function Doc(runner, options) { - Base.call(this, runner, options); + /** + * Constructs a new `Doc` reporter instance. + * + * @public + * @memberof Mocha.reporters + * @extends Mocha.reporters.Base + * @param {Runner} runner - Instance triggers reporter actions. + * @param {Object} [options] - runner options + */ + constructor(runner, options) { + super(runner, options); - var indents = 2; + var indents = 2; - function indent() { - return Array(indents).join(" "); - } - - runner.on(EVENT_SUITE_BEGIN, function (suite) { - if (suite.root) { - return; + function indent() { + return Array(indents).join(" "); } - ++indents; - Base.consoleLog('%s
', indent()); - ++indents; - Base.consoleLog("%s

%s

", indent(), utils.escape(suite.title)); - Base.consoleLog("%s
", indent()); - }); - runner.on(EVENT_SUITE_END, function (suite) { - if (suite.root) { - return; - } - Base.consoleLog("%s
", indent()); - --indents; - Base.consoleLog("%s
", indent()); - --indents; - }); + runner.on(EVENT_SUITE_BEGIN, function (suite) { + if (suite.root) { + return; + } + ++indents; + Base.consoleLog('%s
', indent()); + ++indents; + Base.consoleLog("%s

%s

", indent(), utils.escape(suite.title)); + Base.consoleLog("%s
", indent()); + }); - runner.on(EVENT_TEST_PASS, function (test) { - Base.consoleLog("%s
%s
", indent(), utils.escape(test.title)); - Base.consoleLog("%s
%s
", indent(), utils.escape(test.file)); - var code = utils.escape(utils.clean(test.body)); - Base.consoleLog("%s
%s
", indent(), code); - }); + runner.on(EVENT_SUITE_END, function (suite) { + if (suite.root) { + return; + } + Base.consoleLog("%s
", indent()); + --indents; + Base.consoleLog("%s
", indent()); + --indents; + }); - runner.on(EVENT_TEST_FAIL, function (test, err) { - Base.consoleLog( - '%s
%s
', - indent(), - utils.escape(test.title), - ); - Base.consoleLog( - '%s
%s
', - indent(), - utils.escape(test.file), - ); - var code = utils.escape(utils.clean(test.body)); - Base.consoleLog( - '%s
%s
', - indent(), - code, - ); - Base.consoleLog( - '%s
%s
', - indent(), - utils.escape(err), - ); - }); + runner.on(EVENT_TEST_PASS, function (test) { + Base.consoleLog("%s
%s
", indent(), utils.escape(test.title)); + Base.consoleLog("%s
%s
", indent(), utils.escape(test.file)); + var code = utils.escape(utils.clean(test.body)); + Base.consoleLog( + "%s
%s
", + indent(), + code, + ); + }); + + runner.on(EVENT_TEST_FAIL, function (test, err) { + Base.consoleLog( + '%s
%s
', + indent(), + utils.escape(test.title), + ); + Base.consoleLog( + '%s
%s
', + indent(), + utils.escape(test.file), + ); + var code = utils.escape(utils.clean(test.body)); + Base.consoleLog( + '%s
%s
', + indent(), + code, + ); + Base.consoleLog( + '%s
%s
', + indent(), + utils.escape(err), + ); + }); + } } -Doc.description = "HTML documentation"; +export { Doc }; diff --git a/node_modules/mocha/lib/reporters/dot.js b/node_modules/mocha/lib/reporters/dot.js index f87c36c8..eac37b81 100644 --- a/node_modules/mocha/lib/reporters/dot.js +++ b/node_modules/mocha/lib/reporters/dot.js @@ -1,7 +1,5 @@ -"use strict"; - /** - * @typedef {import('../runner.js')} Runner + * @typedef {import('../runner.cjs')} Runner */ /** @@ -11,76 +9,69 @@ * Module dependencies. */ -var Base = require("./base"); -var inherits = require("../utils").inherits; -var constants = require("../runner").constants; +import { Base } from "./base.js"; +import Runner from "../runner.cjs"; + +var { constants } = Runner; var EVENT_TEST_PASS = constants.EVENT_TEST_PASS; var EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL; var EVENT_RUN_BEGIN = constants.EVENT_RUN_BEGIN; var EVENT_TEST_PENDING = constants.EVENT_TEST_PENDING; var EVENT_RUN_END = constants.EVENT_RUN_END; -/** - * Expose `Dot`. - */ - -exports = module.exports = Dot; +class Dot extends Base { + static description = "dot matrix representation"; -/** - * Constructs a new `Dot` reporter instance. - * - * @public - * @class - * @memberof Mocha.reporters - * @extends Mocha.reporters.Base - * @param {Runner} runner - Instance triggers reporter actions. - * @param {Object} [options] - runner options - */ -function Dot(runner, options) { - Base.call(this, runner, options); + /** + * Constructs a new `Dot` reporter instance. + * + * @public + * @memberof Mocha.reporters + * @extends Mocha.reporters.Base + * @param {Runner} runner - Instance triggers reporter actions. + * @param {Object} [options] - runner options + */ + constructor(runner, options) { + super(runner, options); - var self = this; - var width = (Base.window.width * 0.75) | 0; - var n = -1; + var self = this; + var width = (Base.window.width * 0.75) | 0; + var n = -1; - runner.on(EVENT_RUN_BEGIN, function () { - process.stdout.write("\n"); - }); + runner.on(EVENT_RUN_BEGIN, function () { + process.stdout.write("\n"); + }); - runner.on(EVENT_TEST_PENDING, function () { - if (++n % width === 0) { - process.stdout.write("\n "); - } - process.stdout.write(Base.color("pending", Base.symbols.comma)); - }); + runner.on(EVENT_TEST_PENDING, function () { + if (++n % width === 0) { + process.stdout.write("\n "); + } + process.stdout.write(Base.color("pending", Base.symbols.comma)); + }); - runner.on(EVENT_TEST_PASS, function (test) { - if (++n % width === 0) { - process.stdout.write("\n "); - } - if (test.speed === "slow") { - process.stdout.write(Base.color("bright yellow", Base.symbols.dot)); - } else { - process.stdout.write(Base.color(test.speed, Base.symbols.dot)); - } - }); + runner.on(EVENT_TEST_PASS, function (test) { + if (++n % width === 0) { + process.stdout.write("\n "); + } + if (test.speed === "slow") { + process.stdout.write(Base.color("bright yellow", Base.symbols.dot)); + } else { + process.stdout.write(Base.color(test.speed, Base.symbols.dot)); + } + }); - runner.on(EVENT_TEST_FAIL, function () { - if (++n % width === 0) { - process.stdout.write("\n "); - } - process.stdout.write(Base.color("fail", Base.symbols.bang)); - }); + runner.on(EVENT_TEST_FAIL, function () { + if (++n % width === 0) { + process.stdout.write("\n "); + } + process.stdout.write(Base.color("fail", Base.symbols.bang)); + }); - runner.once(EVENT_RUN_END, function () { - process.stdout.write("\n"); - self.epilogue(); - }); + runner.once(EVENT_RUN_END, function () { + process.stdout.write("\n"); + self.epilogue(); + }); + } } -/** - * Inherit from `Base.prototype`. - */ -inherits(Dot, Base); - -Dot.description = "dot matrix representation"; +export { Dot }; diff --git a/node_modules/mocha/lib/reporters/github-actions.js b/node_modules/mocha/lib/reporters/github-actions.js new file mode 100644 index 00000000..28c7ab9d --- /dev/null +++ b/node_modules/mocha/lib/reporters/github-actions.js @@ -0,0 +1,150 @@ +/** + * @typedef {import('../runner.cjs')} Runner + * @typedef {import('../test.js')} Test + */ + +/** + * @module GithubActions + */ +/** + * Module dependencies. + */ + +import fs from "node:fs"; +import ms from "ms"; +import { Spec } from "./spec.js"; +import Runner from "../runner.cjs"; + +const { constants } = Runner; +var EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL; +var EVENT_RUN_END = constants.EVENT_RUN_END; + +/** + * Extract file, line, and column from an error stack trace. + * + * @private + * @param {string} [stackTrace] - stack trace string + * @return {{ file?: string, line?: string, col?: string }} + */ +function extractLocation(stackTrace) { + if (!stackTrace) { + return {}; + } + var matches = + /^\s*at Context.*\(([^()]+):([0-9]+):([0-9]+)\)/gm.exec(stackTrace) || + /^\s*at.*\(([^()]+):([0-9]+):([0-9]+)\)/gm.exec(stackTrace); + if (matches === null) { + return {}; + } + return { + file: matches[1], + line: matches[2], + col: matches[3], + }; +} + +/** + * Escape a value for use in a GitHub Actions workflow command. + * + * @private + * @param {string} value + * @return {string} + */ +function escapeWorkflowValue(value) { + return String(value) + .replace(/%/g, "%25") + .replace(/\r/g, "%0D") + .replace(/\n/g, "%0A"); +} + +/** + * Escape a property value for use in a GitHub Actions workflow command. + * + * @private + * @param {string} value + * @return {string} + */ +function escapeWorkflowProperty(value) { + return String(value) + .replace(/%/g, "%25") + .replace(/\r/g, "%0D") + .replace(/\n/g, "%0A") + .replace(/:/g, "%3A") + .replace(/,/g, "%2C"); +} + +class GithubActions extends Spec { + static description = + "like spec, with GitHub Actions error annotations and job summary"; + + /** + * Construct a new GithubActions reporter instance. + * + * @description + * Extend the Spec reporter to add GitHub Actions error annotations and + * Job Summary output when running in GitHub Actions CI. + * + * @public + * @memberof Mocha.reporters + * @extends Mocha.reporters.Spec + * @param {Runner} runner - Instance triggers reporter actions. + * @param {Object} [options] - runner options + */ + constructor(runner, options) { + super(runner, options); + + var ciFailures = []; + + runner.on(EVENT_TEST_FAIL, function (test) { + ciFailures.push(test); + }); + + runner.once(EVENT_RUN_END, () => { + if (ciFailures.length > 0) { + process.stdout.write("::group::Mocha Annotations\n"); + + for (var test of ciFailures) { + var location = extractLocation(test.err && test.err.stack); + var props = []; + if (location.file) { + props.push("file=" + escapeWorkflowProperty(location.file)); + } + if (location.line) { + props.push("line=" + escapeWorkflowProperty(location.line)); + } + if (location.col) { + props.push("col=" + escapeWorkflowProperty(location.col)); + } + + var message = test.err ? escapeWorkflowValue(test.err.message) : ""; + process.stdout.write( + "::error " + props.join(",") + "::" + message + "\n", + ); + } + + process.stdout.write("::endgroup::\n"); + } + + var summaryFile = process.env.GITHUB_STEP_SUMMARY; + if (summaryFile) { + var lines = []; + lines.push( + ":white_check_mark: " + + (this.stats.passes || 0) + + " passing (" + + ms(this.stats.duration) + + ")", + ); + if (this.stats.pending) { + lines.push(":pause_button: " + this.stats.pending + " pending"); + } + if (this.stats.failures) { + lines.push(":x: " + this.stats.failures + " failing"); + } + fs.appendFileSync(summaryFile, lines.join("\n") + "\n"); + } + }); + } +} + +export { GithubActions }; diff --git a/node_modules/mocha/lib/reporters/html.js b/node_modules/mocha/lib/reporters/html.js index 85cc82f8..b806e567 100644 --- a/node_modules/mocha/lib/reporters/html.js +++ b/node_modules/mocha/lib/reporters/html.js @@ -1,10 +1,7 @@ -"use strict"; - /** - * @typedef {import('../runner.js')} Runner + * @typedef {import('../runner.cjs')} Runner */ -/* eslint-env browser */ /** * @module HTML */ @@ -12,10 +9,11 @@ * Module dependencies. */ -var Base = require("./base"); -var utils = require("../utils"); -var escapeRe = require("escape-string-regexp"); -var constants = require("../runner").constants; +import { Base } from "./base.js"; +import utils from "../utils.cjs"; +import { escapeRegExp } from "../utils/regexp.js"; +import Runner from "../runner.cjs"; +var constants = Runner.constants; var EVENT_TEST_PASS = constants.EVENT_TEST_PASS; var EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL; var EVENT_SUITE_BEGIN = constants.EVENT_SUITE_BEGIN; @@ -29,12 +27,6 @@ var escape = utils.escape; var Date = global.Date; -/** - * Expose `HTML`. - */ - -exports = module.exports = HTML; - /** * Stats template: Result, progress, passes, failures, and duration. */ @@ -50,236 +42,275 @@ var statsTemplate = var playIcon = "‣"; -/** - * Constructs a new `HTML` reporter instance. - * - * @public - * @class - * @memberof Mocha.reporters - * @extends Mocha.reporters.Base - * @param {Runner} runner - Instance triggers reporter actions. - * @param {Object} [options] - runner options - */ -function HTML(runner, options) { - Base.call(this, runner, options); - - var self = this; - var stats = this.stats; - var stat = fragment(statsTemplate); - var items = stat.getElementsByTagName("li"); - const resultIndex = 0; - const progressIndex = 1; - const passesIndex = 2; - const failuresIndex = 3; - const durationIndex = 4; - /** Stat item containing the root suite pass or fail indicator (hasFailures ? '✖' : '✓') */ - var resultIndicator = items[resultIndex]; - /** Passes text and count */ - const passesStat = items[passesIndex]; - /** Stat item containing the pass count (not the word, just the number) */ - const passesCount = passesStat.getElementsByTagName("em")[0]; - /** Stat item linking to filter to show only passing tests */ - const passesLink = passesStat.getElementsByTagName("a")[0]; - /** Failures text and count */ - const failuresStat = items[failuresIndex]; - /** Stat item containing the failure count (not the word, just the number) */ - const failuresCount = failuresStat.getElementsByTagName("em")[0]; - /** Stat item linking to filter to show only failing tests */ - const failuresLink = failuresStat.getElementsByTagName("a")[0]; - /** Stat item linking to the duration time (not the word or unit, just the number) */ - var duration = items[durationIndex].getElementsByTagName("em")[0]; - var report = fragment('
    '); - var stack = [report]; - var progressText = items[progressIndex].getElementsByTagName("div")[0]; - var progressBar = items[progressIndex].getElementsByTagName("progress")[0]; - var progressRing = [ - items[progressIndex].getElementsByClassName("ring-flatlight")[0], - items[progressIndex].getElementsByClassName("ring-highlight")[0], - ]; - var root = document.getElementById("mocha"); - - if (!root) { - return error("#mocha div missing, add it to your document"); - } - - // pass toggle - on(passesLink, "click", function (evt) { - evt.preventDefault(); - unhide(); - var name = /pass/.test(report.className) ? "" : " pass"; - report.className = report.className.replace(/fail|pass/g, "") + name; - if (report.className.trim()) { - hideSuitesWithout("test pass"); +class HTML extends Base { + static browserOnly = true; + + /** + * Constructs a new `HTML` reporter instance. + * + * @public + * @memberof Mocha.reporters + * @extends Mocha.reporters.Base + * @param {Runner} runner - Instance triggers reporter actions. + * @param {Object} [options] - runner options + */ + constructor(runner, options) { + super(runner, options); + + var self = this; + var stats = this.stats; + var stat = fragment(statsTemplate); + var items = stat.getElementsByTagName("li"); + const resultIndex = 0; + const progressIndex = 1; + const passesIndex = 2; + const failuresIndex = 3; + const durationIndex = 4; + /** Stat item containing the root suite pass or fail indicator (hasFailures ? '✖' : '✓') */ + var resultIndicator = items[resultIndex]; + /** Passes text and count */ + const passesStat = items[passesIndex]; + /** Stat item containing the pass count (not the word, just the number) */ + const passesCount = passesStat.getElementsByTagName("em")[0]; + /** Stat item linking to filter to show only passing tests */ + const passesLink = passesStat.getElementsByTagName("a")[0]; + /** Failures text and count */ + const failuresStat = items[failuresIndex]; + /** Stat item containing the failure count (not the word, just the number) */ + const failuresCount = failuresStat.getElementsByTagName("em")[0]; + /** Stat item linking to filter to show only failing tests */ + const failuresLink = failuresStat.getElementsByTagName("a")[0]; + /** Stat item linking to the duration time (not the word or unit, just the number) */ + var duration = items[durationIndex].getElementsByTagName("em")[0]; + var report = fragment('
      '); + var stack = [report]; + var progressText = items[progressIndex].getElementsByTagName("div")[0]; + var progressBar = items[progressIndex].getElementsByTagName("progress")[0]; + var progressRing = [ + items[progressIndex].getElementsByClassName("ring-flatlight")[0], + items[progressIndex].getElementsByClassName("ring-highlight")[0], + ]; + var root = document.getElementById("mocha"); + + if (!root) { + return error("#mocha div missing, add it to your document"); } - }); - // failure toggle - on(failuresLink, "click", function (evt) { - evt.preventDefault(); - unhide(); - var name = /fail/.test(report.className) ? "" : " fail"; - report.className = report.className.replace(/fail|pass/g, "") + name; - if (report.className.trim()) { - hideSuitesWithout("test fail"); - } - }); + // pass toggle + on(passesLink, "click", function (evt) { + evt.preventDefault(); + unhide(); + var name = /pass/.test(report.className) ? "" : " pass"; + report.className = report.className.replace(/fail|pass/g, "") + name; + if (report.className.trim()) { + hideSuitesWithout("test pass"); + } + }); + + // failure toggle + on(failuresLink, "click", function (evt) { + evt.preventDefault(); + unhide(); + var name = /fail/.test(report.className) ? "" : " fail"; + report.className = report.className.replace(/fail|pass/g, "") + name; + if (report.className.trim()) { + hideSuitesWithout("test fail"); + } + }); - root.appendChild(stat); - root.appendChild(report); + root.appendChild(stat); + root.appendChild(report); - runner.on(EVENT_SUITE_BEGIN, function (suite) { - if (suite.root) { - return; - } + runner.on(EVENT_SUITE_BEGIN, function (suite) { + if (suite.root) { + return; + } - // suite - var url = self.suiteURL(suite); - var el = fragment( - '
    • %s

    • ', - url, - escape(suite.title), - ); - - // container - stack[0].appendChild(el); - stack.unshift(document.createElement("ul")); - el.appendChild(stack[0]); - }); + // suite + var url = self.suiteURL(suite); + var el = fragment( + '
    • %s

    • ', + url, + escape(suite.title), + ); - runner.on(EVENT_SUITE_END, function (suite) { - if (suite.root) { - if (stats.failures === 0) { - text(resultIndicator, "✓"); - stat.className += " pass"; + // container + stack[0].appendChild(el); + stack.unshift(document.createElement("ul")); + el.appendChild(stack[0]); + }); + + runner.on(EVENT_SUITE_END, function (suite) { + if (suite.root) { + if (stats.failures === 0) { + text(resultIndicator, "✓"); + stat.className += " pass"; + } + updateStats(); + return; } + stack.shift(); + }); + + runner.on(EVENT_TEST_PASS, function (test) { + var url = self.testURL(test); + var markup = + '
    • %e%ems ' + + '' + + playIcon + + "

    • "; + var el = fragment(markup, test.speed, test.title, test.duration, url); + self.addCodeToggle(el, test.body); + appendToStack(el); updateStats(); - return; - } - stack.shift(); - }); + }); + + runner.on(EVENT_TEST_FAIL, function (test) { + // Update stat items + text(resultIndicator, "✖"); + stat.className += " fail"; + + var el = fragment( + '
    • %e ' + + playIcon + + "

    • ", + test.title, + self.testURL(test), + ); + var stackString; // Note: Includes leading newline + var message = test.err.toString(); - runner.on(EVENT_TEST_PASS, function (test) { - var url = self.testURL(test); - var markup = - '
    • %e%ems ' + - '' + - playIcon + - "

    • "; - var el = fragment(markup, test.speed, test.title, test.duration, url); - self.addCodeToggle(el, test.body); - appendToStack(el); - updateStats(); - }); + // <=IE7 stringifies to [Object Error]. Since it can be overloaded, we + // check for the result of the stringifying. + if (message === "[object Error]") { + message = test.err.message; + } - runner.on(EVENT_TEST_FAIL, function (test) { - // Update stat items - text(resultIndicator, "✖"); - stat.className += " fail"; + if (test.err.stack) { + var indexOfMessage = test.err.stack.indexOf(test.err.message); + if (indexOfMessage === -1) { + stackString = test.err.stack; + } else { + stackString = test.err.stack.slice( + test.err.message.length + indexOfMessage, + ); + } + } else if (test.err.sourceURL && test.err.line !== undefined) { + // Safari doesn't give you a stack. Let's at least provide a source line. + stackString = "\n(" + test.err.sourceURL + ":" + test.err.line + ")"; + } - var el = fragment( - '
    • %e ' + - playIcon + - "

    • ", - test.title, - self.testURL(test), - ); - var stackString; // Note: Includes leading newline - var message = test.err.toString(); - - // <=IE7 stringifies to [Object Error]. Since it can be overloaded, we - // check for the result of the stringifying. - if (message === "[object Error]") { - message = test.err.message; - } + stackString = stackString || ""; - if (test.err.stack) { - var indexOfMessage = test.err.stack.indexOf(test.err.message); - if (indexOfMessage === -1) { - stackString = test.err.stack; + if (test.err.htmlMessage && stackString) { + el.appendChild( + fragment( + '
      %s\n
      %e
      ', + test.err.htmlMessage, + stackString, + ), + ); + } else if (test.err.htmlMessage) { + el.appendChild( + fragment('
      %s
      ', test.err.htmlMessage), + ); } else { - stackString = test.err.stack.slice( - test.err.message.length + indexOfMessage, + el.appendChild( + fragment('
      %e%e
      ', message, stackString), ); } - } else if (test.err.sourceURL && test.err.line !== undefined) { - // Safari doesn't give you a stack. Let's at least provide a source line. - stackString = "\n(" + test.err.sourceURL + ":" + test.err.line + ")"; - } - stackString = stackString || ""; + self.addCodeToggle(el, test.body); + appendToStack(el); + updateStats(); + }); - if (test.err.htmlMessage && stackString) { - el.appendChild( - fragment( - '
      %s\n
      %e
      ', - test.err.htmlMessage, - stackString, - ), - ); - } else if (test.err.htmlMessage) { - el.appendChild( - fragment('
      %s
      ', test.err.htmlMessage), - ); - } else { - el.appendChild( - fragment('
      %e%e
      ', message, stackString), + runner.on(EVENT_TEST_PENDING, function (test) { + var el = fragment( + '
    • %e

    • ', + test.title, ); - } + appendToStack(el); + updateStats(); + }); - self.addCodeToggle(el, test.body); - appendToStack(el); - updateStats(); - }); + function appendToStack(el) { + // Don't call .appendChild if #mocha-report was already .shift()'ed off the stack. + if (stack[0]) { + stack[0].appendChild(el); + } + } - runner.on(EVENT_TEST_PENDING, function (test) { - var el = fragment( - '
    • %e

    • ', - test.title, - ); - appendToStack(el); - updateStats(); - }); + function updateStats() { + var percent = ((stats.tests / runner.total) * 100) | 0; + progressBar.value = percent; + if (progressText) { + // setting a toFixed that is too low, makes small changes to progress not shown + // setting it too high, makes the progress text longer then it needs to + // to address this, calculate the toFixed based on the magnitude of total + var decimalPlaces = Math.ceil(Math.log10(runner.total / 100)); + text( + progressText, + percent.toFixed(Math.min(Math.max(decimalPlaces, 0), 100)) + "%", + ); + } + if (progressRing) { + var radius = parseFloat( + getComputedStyle(progressRing[0]).getPropertyValue("r"), + ); + var wholeArc = Math.PI * 2 * radius; + var highlightArc = percent * (wholeArc / 100); + // The progress ring is in 2 parts, the flatlight color and highlight color. + // Rendering both on top of the other, seems to make a 3rd color on the edges. + // To create 1 whole ring with 2 colors, both parts are inverse of the other. + progressRing[0].style["stroke-dasharray"] = + `0,${highlightArc}px,${wholeArc}px`; + progressRing[1].style["stroke-dasharray"] = + `${highlightArc}px,${wholeArc}px`; + } - function appendToStack(el) { - // Don't call .appendChild if #mocha-report was already .shift()'ed off the stack. - if (stack[0]) { - stack[0].appendChild(el); + // update stats + var ms = new Date() - stats.start; + text(passesCount, stats.passes); + text(failuresCount, stats.failures); + text(duration, (ms / 1000).toFixed(2)); } } - function updateStats() { - var percent = ((stats.tests / runner.total) * 100) | 0; - progressBar.value = percent; - if (progressText) { - // setting a toFixed that is too low, makes small changes to progress not shown - // setting it too high, makes the progress text longer then it needs to - // to address this, calculate the toFixed based on the magnitude of total - var decimalPlaces = Math.ceil(Math.log10(runner.total / 100)); - text( - progressText, - percent.toFixed(Math.min(Math.max(decimalPlaces, 0), 100)) + "%", - ); - } - if (progressRing) { - var radius = parseFloat( - getComputedStyle(progressRing[0]).getPropertyValue("r"), - ); - var wholeArc = Math.PI * 2 * radius; - var highlightArc = percent * (wholeArc / 100); - // The progress ring is in 2 parts, the flatlight color and highlight color. - // Rendering both on top of the other, seems to make a 3rd color on the edges. - // To create 1 whole ring with 2 colors, both parts are inverse of the other. - progressRing[0].style["stroke-dasharray"] = - `0,${highlightArc}px,${wholeArc}px`; - progressRing[1].style["stroke-dasharray"] = - `${highlightArc}px,${wholeArc}px`; - } + /** + * Provide suite URL. + * + * @param {Object} [suite] + */ + suiteURL(suite) { + return makeUrl("^" + escapeRegExp(suite.fullTitle()) + " "); + } + + /** + * Provide test URL. + * + * @param {Object} [test] + */ + testURL(test) { + return makeUrl("^" + escapeRegExp(test.fullTitle()) + "$"); + } - // update stats - var ms = new Date() - stats.start; - text(passesCount, stats.passes); - text(failuresCount, stats.failures); - text(duration, (ms / 1000).toFixed(2)); + /** + * Adds code toggle functionality for the provided test's list element. + * + * @param {HTMLLIElement} el + * @param {string} contents + */ + addCodeToggle(el, contents) { + var h2 = el.getElementsByTagName("h2")[0]; + + on(h2, "click", function () { + pre.style.display = pre.style.display === "none" ? "block" : "none"; + }); + + var pre = fragment("
      %e
      ", utils.clean(contents)); + el.appendChild(pre); + pre.style.display = "none"; } } @@ -307,42 +338,6 @@ function makeUrl(s) { ); } -/** - * Provide suite URL. - * - * @param {Object} [suite] - */ -HTML.prototype.suiteURL = function (suite) { - return makeUrl("^" + escapeRe(suite.fullTitle()) + " "); -}; - -/** - * Provide test URL. - * - * @param {Object} [test] - */ -HTML.prototype.testURL = function (test) { - return makeUrl("^" + escapeRe(test.fullTitle()) + "$"); -}; - -/** - * Adds code toggle functionality for the provided test's list element. - * - * @param {HTMLLIElement} el - * @param {string} contents - */ -HTML.prototype.addCodeToggle = function (el, contents) { - var h2 = el.getElementsByTagName("h2")[0]; - - on(h2, "click", function () { - pre.style.display = pre.style.display === "none" ? "block" : "none"; - }); - - var pre = fragment("
      %e
      ", utils.clean(contents)); - el.appendChild(pre); - pre.style.display = "none"; -}; - /** * Display error `msg`. * @@ -426,4 +421,4 @@ function on(el, event, fn) { } } -HTML.browserOnly = true; +export { HTML }; diff --git a/node_modules/mocha/lib/reporters/index.cjs b/node_modules/mocha/lib/reporters/index.cjs new file mode 100644 index 00000000..5a96cf14 --- /dev/null +++ b/node_modules/mocha/lib/reporters/index.cjs @@ -0,0 +1,36 @@ +"use strict"; + +// Alias exports to a their normalized format Mocha#reporter to prevent a need +// for dynamic (try/catch) requires, which Browserify doesn't handle. +const { Base } = require("./base.js"); +exports.Base = exports.base = Base; +const { Dot } = require("./dot.js"); +exports.Dot = exports.dot = Dot; +const { Doc } = require("./doc.js"); +exports.Doc = exports.doc = Doc; +const { TAP } = require("./tap.js"); +exports.TAP = exports.tap = TAP; +const { JSONReporter } = require("./json.js"); +exports.JSON = exports.json = JSONReporter; +const { HTML } = require("./html.js"); +exports.HTML = exports.html = HTML; +const { List } = require("./list.js"); +exports.List = exports.list = List; +const { Min } = require("./min.js"); +exports.Min = exports.min = Min; +const { Spec } = require("./spec.js"); +exports.Spec = exports.spec = Spec; +const { NyanCat } = require("./nyan.js"); +exports.Nyan = exports.nyan = NyanCat; +const { XUnit } = require("./xunit.js"); +exports.XUnit = exports.xunit = XUnit; +const { Markdown } = require("./markdown.js"); +exports.Markdown = exports.markdown = Markdown; +const { Progress } = require("./progress.js"); +exports.Progress = exports.progress = Progress; +const { Landing } = require("./landing.js"); +exports.Landing = exports.landing = Landing; +const { JSONStream } = require("./json-stream.js"); +exports.JSONStream = exports["json-stream"] = JSONStream; +const { GithubActions } = require("./github-actions.js"); +exports.GithubActions = exports["github-actions"] = GithubActions; diff --git a/node_modules/mocha/lib/reporters/index.js b/node_modules/mocha/lib/reporters/index.js deleted file mode 100644 index d7103c1b..00000000 --- a/node_modules/mocha/lib/reporters/index.js +++ /dev/null @@ -1,19 +0,0 @@ -"use strict"; - -// Alias exports to a their normalized format Mocha#reporter to prevent a need -// for dynamic (try/catch) requires, which Browserify doesn't handle. -exports.Base = exports.base = require("./base"); -exports.Dot = exports.dot = require("./dot"); -exports.Doc = exports.doc = require("./doc"); -exports.TAP = exports.tap = require("./tap"); -exports.JSON = exports.json = require("./json"); -exports.HTML = exports.html = require("./html"); -exports.List = exports.list = require("./list"); -exports.Min = exports.min = require("./min"); -exports.Spec = exports.spec = require("./spec"); -exports.Nyan = exports.nyan = require("./nyan"); -exports.XUnit = exports.xunit = require("./xunit"); -exports.Markdown = exports.markdown = require("./markdown"); -exports.Progress = exports.progress = require("./progress"); -exports.Landing = exports.landing = require("./landing"); -exports.JSONStream = exports["json-stream"] = require("./json-stream"); diff --git a/node_modules/mocha/lib/reporters/json-stream.js b/node_modules/mocha/lib/reporters/json-stream.js index 9d157e1e..a4e11852 100644 --- a/node_modules/mocha/lib/reporters/json-stream.js +++ b/node_modules/mocha/lib/reporters/json-stream.js @@ -1,7 +1,5 @@ -"use strict"; - /** - * @typedef {import('../runner.js')} Runner + * @typedef {import('../runner.cjs')} Runner * @typedef {import('../test.js')} Test */ @@ -12,53 +10,51 @@ * Module dependencies. */ -var Base = require("./base"); -var constants = require("../runner").constants; +import { Base } from "./base.js"; +import Runner from "../runner.cjs"; +var constants = Runner.constants; var EVENT_TEST_PASS = constants.EVENT_TEST_PASS; var EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL; var EVENT_RUN_BEGIN = constants.EVENT_RUN_BEGIN; var EVENT_RUN_END = constants.EVENT_RUN_END; -/** - * Expose `JSONStream`. - */ - -exports = module.exports = JSONStream; +class JSONStream extends Base { + static description = "newline delimited JSON events"; -/** - * Constructs a new `JSONStream` reporter instance. - * - * @public - * @class - * @memberof Mocha.reporters - * @extends Mocha.reporters.Base - * @param {Runner} runner - Instance triggers reporter actions. - * @param {Object} [options] - runner options - */ -function JSONStream(runner, options) { - Base.call(this, runner, options); + /** + * Constructs a new `JSONStream` reporter instance. + * + * @public + * @memberof Mocha.reporters + * @extends Mocha.reporters.Base + * @param {Runner} runner - Instance triggers reporter actions. + * @param {Object} [options] - runner options + */ + constructor(runner, options) { + super(runner, options); - var self = this; - var total = runner.total; + var self = this; + var total = runner.total; - runner.once(EVENT_RUN_BEGIN, function () { - writeEvent(["start", { total }]); - }); + runner.once(EVENT_RUN_BEGIN, function () { + writeEvent(["start", { total }]); + }); - runner.on(EVENT_TEST_PASS, function (test) { - writeEvent(["pass", clean(test)]); - }); + runner.on(EVENT_TEST_PASS, function (test) { + writeEvent(["pass", clean(test)]); + }); - runner.on(EVENT_TEST_FAIL, function (test, err) { - test = clean(test); - test.err = err.message; - test.stack = err.stack || null; - writeEvent(["fail", test]); - }); + runner.on(EVENT_TEST_FAIL, function (test, err) { + test = clean(test); + test.err = err.message; + test.stack = err.stack || null; + writeEvent(["fail", test]); + }); - runner.once(EVENT_RUN_END, function () { - writeEvent(["end", self.stats]); - }); + runner.once(EVENT_RUN_END, function () { + writeEvent(["end", self.stats]); + }); + } } /** @@ -90,4 +86,4 @@ function clean(test) { }; } -JSONStream.description = "newline delimited JSON events"; +export { JSONStream }; diff --git a/node_modules/mocha/lib/reporters/json.js b/node_modules/mocha/lib/reporters/json.js index 8ceef6bd..66ee9e29 100644 --- a/node_modules/mocha/lib/reporters/json.js +++ b/node_modules/mocha/lib/reporters/json.js @@ -1,7 +1,5 @@ -"use strict"; - /** - * @typedef {import('../runner.js')} Runner + * @typedef {import('../runner.cjs')} Runner */ /** @@ -11,93 +9,92 @@ * Module dependencies. */ -var Base = require("./base"); -var fs = require("node:fs"); -var path = require("node:path"); -const createUnsupportedError = require("../errors").createUnsupportedError; -const utils = require("../utils"); -var constants = require("../runner").constants; +import { Base } from "./base.js"; +import fs from "node:fs"; +import path from "node:path"; +import * as errors from "../errors.js"; +import utils from "../utils.cjs"; +import Runner from "../runner.cjs"; +const createUnsupportedError = errors.createUnsupportedError; +var constants = Runner.constants; var EVENT_TEST_PASS = constants.EVENT_TEST_PASS; var EVENT_TEST_PENDING = constants.EVENT_TEST_PENDING; var EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL; var EVENT_TEST_END = constants.EVENT_TEST_END; var EVENT_RUN_END = constants.EVENT_RUN_END; -/** - * Expose `JSON`. - */ - -exports = module.exports = JSONReporter; - -/** - * Constructs a new `JSON` reporter instance. - * - * @public - * @class JSON - * @memberof Mocha.reporters - * @extends Mocha.reporters.Base - * @param {Runner} runner - Instance triggers reporter actions. - * @param {Object} [options] - runner options - */ -function JSONReporter(runner, options = {}) { - Base.call(this, runner, options); - - var self = this; - var tests = []; - var pending = []; - var failures = []; - var passes = []; - var output; - - if (options.reporterOption && options.reporterOption.output) { - if (utils.isBrowser()) { - throw createUnsupportedError("file output not supported in browser"); +class JSONReporter extends Base { + static description = "single JSON object"; + + /** + * Constructs a new `JSON` reporter instance. + * + * @public + * @memberof Mocha.reporters + * @extends Mocha.reporters.Base + * @param {Runner} runner - Instance triggers reporter actions. + * @param {Object} [options] - runner options + */ + constructor(runner, options = {}) { + super(runner, options); + + var self = this; + var tests = []; + var pending = []; + var failures = []; + var passes = []; + var output; + + if (options.reporterOption && options.reporterOption.output) { + if (utils.isBrowser()) { + throw createUnsupportedError("file output not supported in browser"); + } + output = options.reporterOption.output; } - output = options.reporterOption.output; - } - runner.on(EVENT_TEST_END, function (test) { - tests.push(test); - }); - - runner.on(EVENT_TEST_PASS, function (test) { - passes.push(test); - }); - - runner.on(EVENT_TEST_FAIL, function (test) { - failures.push(test); - }); - - runner.on(EVENT_TEST_PENDING, function (test) { - pending.push(test); - }); - - runner.once(EVENT_RUN_END, function () { - var obj = { - stats: self.stats, - tests: tests.map(clean), - pending: pending.map(clean), - failures: failures.map(clean), - passes: passes.map(clean), - }; - - runner.testResults = obj; - - var json = JSON.stringify(obj, null, 2); - if (output) { - try { - fs.mkdirSync(path.dirname(output), { recursive: true }); - fs.writeFileSync(output, json); - } catch (err) { - console.error( - `${Base.symbols.err} [mocha] writing output to "${output}" failed: ${err.message}\n`, - ); + runner.on(EVENT_TEST_END, function (test) { + tests.push(test); + }); + + runner.on(EVENT_TEST_PASS, function (test) { + passes.push(test); + }); + + runner.on(EVENT_TEST_FAIL, function (test) { + failures.push(test); + }); + + runner.on(EVENT_TEST_PENDING, function (test) { + pending.push(test); + }); + + runner.once(EVENT_RUN_END, function () { + var obj = { + stats: self.stats, + tests: tests.map(clean), + pending: pending.map(clean), + failures: failures.map(clean), + passes: passes.map(clean), + }; + + runner.testResults = obj; + + var json = JSON.stringify(obj, null, 2); + if (output) { + try { + fs.mkdirSync(path.dirname(output), { recursive: true }); + fs.writeFileSync(output, json); + } catch (err) { + console.error( + `${Base.symbols.err} [mocha] writing output to "${output}" failed: ${err.message}\n`, + ); + process.stdout.write(json); + } + } else { process.stdout.write(json); } - } else { - process.stdout.write(json); - } - }); + }); + } } /** @@ -164,4 +161,4 @@ function errorJSON(err) { return res; } -JSONReporter.description = "single JSON object"; +export { JSONReporter }; diff --git a/node_modules/mocha/lib/reporters/landing.js b/node_modules/mocha/lib/reporters/landing.js index bbb01c4e..d6831d3b 100644 --- a/node_modules/mocha/lib/reporters/landing.js +++ b/node_modules/mocha/lib/reporters/landing.js @@ -1,7 +1,5 @@ -"use strict"; - /** - * @typedef {import('../runner.js')} Runner + * @typedef {import('../runner.cjs')} Runner */ /** @@ -11,23 +9,18 @@ * Module dependencies. */ -var Base = require("./base"); -var inherits = require("../utils").inherits; -var constants = require("../runner").constants; +import { Base } from "./base.js"; +import Runner from "../runner.cjs"; +import { Runnable } from "../runnable.js"; +var constants = Runner.constants; var EVENT_RUN_BEGIN = constants.EVENT_RUN_BEGIN; var EVENT_RUN_END = constants.EVENT_RUN_END; var EVENT_TEST_END = constants.EVENT_TEST_END; -var STATE_FAILED = require("../runnable").constants.STATE_FAILED; +var STATE_FAILED = Runnable.constants.STATE_FAILED; var cursor = Base.cursor; var color = Base.color; -/** - * Expose `Landing`. - */ - -exports = module.exports = Landing; - /** * Airplane color. */ @@ -46,76 +39,74 @@ Base.colors["plane crash"] = 31; Base.colors.runway = 90; -/** - * Constructs a new `Landing` reporter instance. - * - * @public - * @class - * @memberof Mocha.reporters - * @extends Mocha.reporters.Base - * @param {Runner} runner - Instance triggers reporter actions. - * @param {Object} [options] - runner options - */ -function Landing(runner, options) { - Base.call(this, runner, options); - - var self = this; - var width = (Base.window.width * 0.75) | 0; - var stream = process.stdout; +class Landing extends Base { + static description = "Unicode landing strip"; + + /** + * Constructs a new `Landing` reporter instance. + * + * @public + * @memberof Mocha.reporters + * @extends Mocha.reporters.Base + * @param {Runner} runner - Instance triggers reporter actions. + * @param {Object} [options] - runner options + */ + constructor(runner, options) { + super(runner, options); + + var self = this; + var width = (Base.window.width * 0.75) | 0; + var stream = process.stdout; + + var plane = color("plane", "✈"); + var crashed = -1; + var n = 0; + var total = 0; + + function runway() { + var buf = Array(width).join("-"); + return " " + color("runway", buf); + } - var plane = color("plane", "✈"); - var crashed = -1; - var n = 0; - var total = 0; + runner.on(EVENT_RUN_BEGIN, function () { + stream.write("\n\n\n "); + cursor.hide(); + }); - function runway() { - var buf = Array(width).join("-"); - return " " + color("runway", buf); - } + runner.on(EVENT_TEST_END, function (test) { + // check if the plane crashed + var col = crashed === -1 ? ((width * ++n) / ++total) | 0 : crashed; + // show the crash + if (test.state === STATE_FAILED) { + plane = color("plane crash", "✈"); + crashed = col; + } + + // render landing strip + stream.write("\u001b[" + (width + 1) + "D\u001b[2A"); + stream.write(runway()); + stream.write("\n "); + stream.write(color("runway", Array(col).join("⋅"))); + stream.write(plane); + stream.write(color("runway", Array(width - col).join("⋅") + "\n")); + stream.write(runway()); + stream.write("\u001b[0m"); + }); - runner.on(EVENT_RUN_BEGIN, function () { - stream.write("\n\n\n "); - cursor.hide(); - }); - - runner.on(EVENT_TEST_END, function (test) { - // check if the plane crashed - var col = crashed === -1 ? ((width * ++n) / ++total) | 0 : crashed; - // show the crash - if (test.state === STATE_FAILED) { - plane = color("plane crash", "✈"); - crashed = col; - } + runner.once(EVENT_RUN_END, function () { + cursor.show(); + process.stdout.write("\n"); + self.epilogue(); + }); - // render landing strip - stream.write("\u001b[" + (width + 1) + "D\u001b[2A"); - stream.write(runway()); - stream.write("\n "); - stream.write(color("runway", Array(col).join("⋅"))); - stream.write(plane); - stream.write(color("runway", Array(width - col).join("⋅") + "\n")); - stream.write(runway()); - stream.write("\u001b[0m"); - }); - - runner.once(EVENT_RUN_END, function () { - cursor.show(); - process.stdout.write("\n"); - self.epilogue(); - }); - - // if cursor is hidden when we ctrl-C, then it will remain hidden unless... - process.once("SIGINT", function () { - cursor.show(); - process.nextTick(function () { - process.kill(process.pid, "SIGINT"); + // if cursor is hidden when we ctrl-C, then it will remain hidden unless... + process.once("SIGINT", function () { + cursor.show(); + process.nextTick(function () { + process.kill(process.pid, "SIGINT"); + }); }); - }); + } } -/** - * Inherit from `Base.prototype`. - */ -inherits(Landing, Base); - -Landing.description = "Unicode landing strip"; +export { Landing }; diff --git a/node_modules/mocha/lib/reporters/list.js b/node_modules/mocha/lib/reporters/list.js index ff372124..ada2c35e 100644 --- a/node_modules/mocha/lib/reporters/list.js +++ b/node_modules/mocha/lib/reporters/list.js @@ -1,7 +1,5 @@ -"use strict"; - /** - * @typedef {import('../runner.js')} Runner + * @typedef {import('../runner.cjs')} Runner */ /** @@ -11,9 +9,10 @@ * Module dependencies. */ -var Base = require("./base"); -var inherits = require("../utils").inherits; -var constants = require("../runner").constants; +import { Base } from "./base.js"; +import Runner from "../runner.cjs"; + +var { constants } = Runner; var EVENT_RUN_BEGIN = constants.EVENT_RUN_BEGIN; var EVENT_RUN_END = constants.EVENT_RUN_END; var EVENT_TEST_BEGIN = constants.EVENT_TEST_BEGIN; @@ -23,61 +22,52 @@ var EVENT_TEST_PENDING = constants.EVENT_TEST_PENDING; var color = Base.color; var cursor = Base.cursor; -/** - * Expose `List`. - */ - -exports = module.exports = List; +class List extends Base { + static description = 'like "spec" reporter but flat'; -/** - * Constructs a new `List` reporter instance. - * - * @public - * @class - * @memberof Mocha.reporters - * @extends Mocha.reporters.Base - * @param {Runner} runner - Instance triggers reporter actions. - * @param {Object} [options] - runner options - */ -function List(runner, options) { - Base.call(this, runner, options); + /** + * Constructs a new `List` reporter instance. + * + * @public + * @memberof Mocha.reporters + * @extends Mocha.reporters.Base + * @param {Runner} runner - Instance triggers reporter actions. + * @param {Object} [options] - runner options + */ + constructor(runner, options) { + super(runner, options); - var self = this; - var n = 0; + var n = 0; - runner.on(EVENT_RUN_BEGIN, function () { - Base.consoleLog(); - }); + runner.on(EVENT_RUN_BEGIN, function () { + Base.consoleLog(); + }); - runner.on(EVENT_TEST_BEGIN, function (test) { - process.stdout.write(color("pass", " " + test.fullTitle() + ": ")); - }); + runner.on(EVENT_TEST_BEGIN, function (test) { + process.stdout.write(color("pass", " " + test.fullTitle() + ": ")); + }); - runner.on(EVENT_TEST_PENDING, function (test) { - var fmt = color("checkmark", " -") + color("pending", " %s"); - Base.consoleLog(fmt, test.fullTitle()); - }); + runner.on(EVENT_TEST_PENDING, function (test) { + var fmt = color("checkmark", " -") + color("pending", " %s"); + Base.consoleLog(fmt, test.fullTitle()); + }); - runner.on(EVENT_TEST_PASS, function (test) { - var fmt = - color("checkmark", " " + Base.symbols.ok) + - color("pass", " %s: ") + - color(test.speed, "%dms"); - cursor.CR(); - Base.consoleLog(fmt, test.fullTitle(), test.duration); - }); + runner.on(EVENT_TEST_PASS, function (test) { + var fmt = + color("checkmark", " " + Base.symbols.ok) + + color("pass", " %s: ") + + color(test.speed, "%dms"); + cursor.CR(); + Base.consoleLog(fmt, test.fullTitle(), test.duration); + }); - runner.on(EVENT_TEST_FAIL, function (test) { - cursor.CR(); - Base.consoleLog(color("fail", " %d) %s"), ++n, test.fullTitle()); - }); + runner.on(EVENT_TEST_FAIL, function (test) { + cursor.CR(); + Base.consoleLog(color("fail", " %d) %s"), ++n, test.fullTitle()); + }); - runner.once(EVENT_RUN_END, self.epilogue.bind(self)); + runner.once(EVENT_RUN_END, (...args) => this.epilogue(...args)); + } } -/** - * Inherit from `Base.prototype`. - */ -inherits(List, Base); - -List.description = 'like "spec" reporter but flat'; +export { List }; diff --git a/node_modules/mocha/lib/reporters/markdown.js b/node_modules/mocha/lib/reporters/markdown.js index 5c2e487d..2e6848f9 100644 --- a/node_modules/mocha/lib/reporters/markdown.js +++ b/node_modules/mocha/lib/reporters/markdown.js @@ -1,7 +1,5 @@ -"use strict"; - /** - * @typedef {import('../runner.js')} Runner + * @typedef {import('../runner.cjs')} Runner */ /** @@ -11,9 +9,10 @@ * Module dependencies. */ -var Base = require("./base"); -var utils = require("../utils"); -var constants = require("../runner").constants; +import { Base } from "./base.js"; +import utils from "../utils.cjs"; +import Runner from "../runner.cjs"; +var constants = Runner.constants; var EVENT_RUN_END = constants.EVENT_RUN_END; var EVENT_SUITE_BEGIN = constants.EVENT_SUITE_BEGIN; var EVENT_SUITE_END = constants.EVENT_SUITE_END; @@ -25,93 +24,90 @@ var EVENT_TEST_PASS = constants.EVENT_TEST_PASS; var SUITE_PREFIX = "$"; -/** - * Expose `Markdown`. - */ +class Markdown extends Base { + static description = "GitHub Flavored Markdown"; + + /** + * Constructs a new `Markdown` reporter instance. + * + * @public + * @memberof Mocha.reporters + * @extends Mocha.reporters.Base + * @param {Runner} runner - Instance triggers reporter actions. + * @param {Object} [options] - runner options + */ + constructor(runner, options) { + super(runner, options); + + var level = 0; + var buf = ""; -exports = module.exports = Markdown; + function title(str) { + return Array(level).join("#") + " " + str; + } -/** - * Constructs a new `Markdown` reporter instance. - * - * @public - * @class - * @memberof Mocha.reporters - * @extends Mocha.reporters.Base - * @param {Runner} runner - Instance triggers reporter actions. - * @param {Object} [options] - runner options - */ -function Markdown(runner, options) { - Base.call(this, runner, options); + function mapTOC(suite, obj) { + var ret = obj; + var key = SUITE_PREFIX + suite.title; - var level = 0; - var buf = ""; + obj = obj[key] = obj[key] || { suite }; + suite.suites.forEach(function (suite) { + mapTOC(suite, obj); + }); - function title(str) { - return Array(level).join("#") + " " + str; - } + return ret; + } + + function stringifyTOC(obj, level) { + ++level; + var buf = ""; + var link; + for (var key in obj) { + if (key === "suite") { + continue; + } + if (key !== SUITE_PREFIX) { + link = " - [" + key.substring(1) + "]"; + link += "(#" + utils.slug(obj[key].suite.fullTitle()) + ")\n"; + buf += Array(level).join(" ") + link; + } + buf += stringifyTOC(obj[key], level); + } + return buf; + } - function mapTOC(suite, obj) { - var ret = obj; - var key = SUITE_PREFIX + suite.title; + function generateTOC(suite) { + var obj = mapTOC(suite, {}); + return stringifyTOC(obj, 0); + } + + generateTOC(runner.suite); - obj = obj[key] = obj[key] || { suite }; - suite.suites.forEach(function (suite) { - mapTOC(suite, obj); + runner.on(EVENT_SUITE_BEGIN, function (suite) { + ++level; + var slug = utils.slug(suite.fullTitle()); + buf += '' + "\n"; + buf += title(suite.title) + "\n"; }); - return ret; - } + runner.on(EVENT_SUITE_END, function () { + --level; + }); - function stringifyTOC(obj, level) { - ++level; - var buf = ""; - var link; - for (var key in obj) { - if (key === "suite") { - continue; - } - if (key !== SUITE_PREFIX) { - link = " - [" + key.substring(1) + "]"; - link += "(#" + utils.slug(obj[key].suite.fullTitle()) + ")\n"; - buf += Array(level).join(" ") + link; - } - buf += stringifyTOC(obj[key], level); - } - return buf; - } + runner.on(EVENT_TEST_PASS, function (test) { + var code = utils.clean(test.body); + buf += test.title + ".\n"; + buf += "\n```js\n"; + buf += code + "\n"; + buf += "```\n\n"; + }); - function generateTOC(suite) { - var obj = mapTOC(suite, {}); - return stringifyTOC(obj, 0); + runner.once(EVENT_RUN_END, function () { + process.stdout.write("# TOC\n"); + process.stdout.write(generateTOC(runner.suite)); + process.stdout.write(buf); + }); } - - generateTOC(runner.suite); - - runner.on(EVENT_SUITE_BEGIN, function (suite) { - ++level; - var slug = utils.slug(suite.fullTitle()); - buf += '' + "\n"; - buf += title(suite.title) + "\n"; - }); - - runner.on(EVENT_SUITE_END, function () { - --level; - }); - - runner.on(EVENT_TEST_PASS, function (test) { - var code = utils.clean(test.body); - buf += test.title + ".\n"; - buf += "\n```js\n"; - buf += code + "\n"; - buf += "```\n\n"; - }); - - runner.once(EVENT_RUN_END, function () { - process.stdout.write("# TOC\n"); - process.stdout.write(generateTOC(runner.suite)); - process.stdout.write(buf); - }); } -Markdown.description = "GitHub Flavored Markdown"; +export { Markdown }; diff --git a/node_modules/mocha/lib/reporters/min.js b/node_modules/mocha/lib/reporters/min.js index a825e629..5e0953e1 100644 --- a/node_modules/mocha/lib/reporters/min.js +++ b/node_modules/mocha/lib/reporters/min.js @@ -1,7 +1,5 @@ -"use strict"; - /** - * @typedef {import('../runner.js')} Runner + * @typedef {import('../runner.cjs')} Runner */ /** @@ -11,47 +9,40 @@ * Module dependencies. */ -var Base = require("./base"); -var inherits = require("../utils").inherits; -var constants = require("../runner").constants; +import { Base } from "./base.js"; +import Runner from "../runner.cjs"; + +var { constants } = Runner; var EVENT_RUN_END = constants.EVENT_RUN_END; var EVENT_RUN_BEGIN = constants.EVENT_RUN_BEGIN; -/** - * Expose `Min`. - */ - -exports = module.exports = Min; - -/** - * Constructs a new `Min` reporter instance. - * - * @description - * This minimal test reporter is best used with '--watch'. - * - * @public - * @class - * @memberof Mocha.reporters - * @extends Mocha.reporters.Base - * @param {Runner} runner - Instance triggers reporter actions. - * @param {Object} [options] - runner options - */ -function Min(runner, options) { - Base.call(this, runner, options); - - runner.on(EVENT_RUN_BEGIN, function () { - // clear screen - process.stdout.write("\u001b[2J"); - // set cursor position - process.stdout.write("\u001b[1;3H"); - }); - - runner.once(EVENT_RUN_END, this.epilogue.bind(this)); +class Min extends Base { + static description = "essentially just a summary"; + + /** + * Constructs a new `Min` reporter instance. + * + * @description + * This minimal test reporter is best used with '--watch'. + * + * @public + * @memberof Mocha.reporters + * @extends Mocha.reporters.Base + * @param {Runner} runner - Instance triggers reporter actions. + * @param {Object} [options] - runner options + */ + constructor(runner, options) { + super(runner, options); + + runner.on(EVENT_RUN_BEGIN, function () { + // clear screen + process.stdout.write("\u001b[2J"); + // set cursor position + process.stdout.write("\u001b[1;3H"); + }); + + runner.once(EVENT_RUN_END, (...args) => this.epilogue(...args)); + } } -/** - * Inherit from `Base.prototype`. - */ -inherits(Min, Base); - -Min.description = "essentially just a summary"; +export { Min }; diff --git a/node_modules/mocha/lib/reporters/nyan.js b/node_modules/mocha/lib/reporters/nyan.js index 85720660..aa414432 100644 --- a/node_modules/mocha/lib/reporters/nyan.js +++ b/node_modules/mocha/lib/reporters/nyan.js @@ -1,7 +1,5 @@ -"use strict"; - /** - * @typedef {import('../runner.js')} Runner + * @typedef {import('../runner.cjs')} Runner */ /** @@ -11,262 +9,254 @@ * Module dependencies. */ -var Base = require("./base"); -var constants = require("../runner").constants; -var inherits = require("../utils").inherits; +import { Base } from "./base.js"; +import Runner from "../runner.cjs"; +var constants = Runner.constants; var EVENT_RUN_BEGIN = constants.EVENT_RUN_BEGIN; var EVENT_TEST_PENDING = constants.EVENT_TEST_PENDING; var EVENT_TEST_PASS = constants.EVENT_TEST_PASS; var EVENT_RUN_END = constants.EVENT_RUN_END; var EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL; -/** - * Expose `Dot`. - */ - -exports = module.exports = NyanCat; - -/** - * Constructs a new `Nyan` reporter instance. - * - * @public - * @class Nyan - * @memberof Mocha.reporters - * @extends Mocha.reporters.Base - * @param {Runner} runner - Instance triggers reporter actions. - * @param {Object} [options] - runner options - */ -function NyanCat(runner, options) { - Base.call(this, runner, options); - - var self = this; - var width = (Base.window.width * 0.75) | 0; - var nyanCatWidth = (this.nyanCatWidth = 11); - - this.colorIndex = 0; - this.numberOfLines = 4; - this.rainbowColors = self.generateColors(); - this.scoreboardWidth = 5; - this.tick = 0; - this.trajectories = [[], [], [], []]; - this.trajectoryWidthMax = width - nyanCatWidth; - - runner.on(EVENT_RUN_BEGIN, function () { - Base.cursor.hide(); - self.draw(); - }); - - runner.on(EVENT_TEST_PENDING, function () { - self.draw(); - }); - - runner.on(EVENT_TEST_PASS, function () { - self.draw(); - }); - - runner.on(EVENT_TEST_FAIL, function () { - self.draw(); - }); - - runner.once(EVENT_RUN_END, function () { - Base.cursor.show(); - for (var i = 0; i < self.numberOfLines; i++) { - process.stdout.write("\n"); - } - self.epilogue(); - }); -} - -/** - * Inherit from `Base.prototype`. - */ -inherits(NyanCat, Base); +class NyanCat extends Base { + static description = '"nyan cat"'; + + /** + * Constructs a new `Nyan` reporter instance. + * + * @public + * @memberof Mocha.reporters + * @extends Mocha.reporters.Base + * @param {Runner} runner - Instance triggers reporter actions. + * @param {Object} [options] - runner options + */ + constructor(runner, options) { + super(runner, options); + + var self = this; + var width = (Base.window.width * 0.75) | 0; + var nyanCatWidth = (this.nyanCatWidth = 11); + + this.colorIndex = 0; + this.numberOfLines = 4; + this.rainbowColors = self.generateColors(); + this.scoreboardWidth = 5; + this.tick = 0; + this.trajectories = [[], [], [], []]; + this.trajectoryWidthMax = width - nyanCatWidth; + + runner.on(EVENT_RUN_BEGIN, function () { + Base.cursor.hide(); + self.draw(); + }); + + runner.on(EVENT_TEST_PENDING, function () { + self.draw(); + }); + + runner.on(EVENT_TEST_PASS, function () { + self.draw(); + }); + + runner.on(EVENT_TEST_FAIL, function () { + self.draw(); + }); + + runner.once(EVENT_RUN_END, function () { + Base.cursor.show(); + for (var i = 0; i < self.numberOfLines; i++) { + process.stdout.write("\n"); + } + self.epilogue(); + }); + } -/** - * Draw the nyan cat - * - * @private - */ + /** + * Draw the nyan cat + * + * @private + */ + + draw() { + this.appendRainbow(); + this.drawScoreboard(); + this.drawRainbow(); + this.drawNyanCat(); + this.tick = !this.tick; + } -NyanCat.prototype.draw = function () { - this.appendRainbow(); - this.drawScoreboard(); - this.drawRainbow(); - this.drawNyanCat(); - this.tick = !this.tick; -}; + /** + * Draw the "scoreboard" showing the number + * of passes, failures and pending tests. + * + * @private + */ -/** - * Draw the "scoreboard" showing the number - * of passes, failures and pending tests. - * - * @private - */ + drawScoreboard() { + var stats = this.stats; -NyanCat.prototype.drawScoreboard = function () { - var stats = this.stats; + function draw(type, n) { + process.stdout.write(" "); + process.stdout.write(Base.color(type, n)); + process.stdout.write("\n"); + } - function draw(type, n) { - process.stdout.write(" "); - process.stdout.write(Base.color(type, n)); + draw("green", stats.passes); + draw("fail", stats.failures); + draw("pending", stats.pending); process.stdout.write("\n"); + + this.cursorUp(this.numberOfLines); } - draw("green", stats.passes); - draw("fail", stats.failures); - draw("pending", stats.pending); - process.stdout.write("\n"); + /** + * Append the rainbow. + * + * @private + */ + + appendRainbow() { + var segment = this.tick ? "_" : "-"; + var rainbowified = this.rainbowify(segment); + + for (var index = 0; index < this.numberOfLines; index++) { + var trajectory = this.trajectories[index]; + if (trajectory.length >= this.trajectoryWidthMax) { + trajectory.shift(); + } + trajectory.push(rainbowified); + } + } - this.cursorUp(this.numberOfLines); -}; + /** + * Draw the rainbow. + * + * @private + */ -/** - * Append the rainbow. - * - * @private - */ + drawRainbow() { + var self = this; -NyanCat.prototype.appendRainbow = function () { - var segment = this.tick ? "_" : "-"; - var rainbowified = this.rainbowify(segment); + this.trajectories.forEach(function (line) { + process.stdout.write("\u001b[" + self.scoreboardWidth + "C"); + process.stdout.write(line.join("")); + process.stdout.write("\n"); + }); - for (var index = 0; index < this.numberOfLines; index++) { - var trajectory = this.trajectories[index]; - if (trajectory.length >= this.trajectoryWidthMax) { - trajectory.shift(); - } - trajectory.push(rainbowified); + this.cursorUp(this.numberOfLines); } -}; -/** - * Draw the rainbow. - * - * @private - */ - -NyanCat.prototype.drawRainbow = function () { - var self = this; - - this.trajectories.forEach(function (line) { - process.stdout.write("\u001b[" + self.scoreboardWidth + "C"); - process.stdout.write(line.join("")); + /** + * Draw the nyan cat + * + * @private + */ + drawNyanCat() { + var self = this; + var startWidth = this.scoreboardWidth + this.trajectories[0].length; + var dist = "\u001b[" + startWidth + "C"; + var padding; + + process.stdout.write(dist); + process.stdout.write("_,------,"); process.stdout.write("\n"); - }); - this.cursorUp(this.numberOfLines); -}; + process.stdout.write(dist); + padding = self.tick ? " " : " "; + process.stdout.write("_|" + padding + "/\\_/\\ "); + process.stdout.write("\n"); -/** - * Draw the nyan cat - * - * @private - */ -NyanCat.prototype.drawNyanCat = function () { - var self = this; - var startWidth = this.scoreboardWidth + this.trajectories[0].length; - var dist = "\u001b[" + startWidth + "C"; - var padding = ""; - - process.stdout.write(dist); - process.stdout.write("_,------,"); - process.stdout.write("\n"); - - process.stdout.write(dist); - padding = self.tick ? " " : " "; - process.stdout.write("_|" + padding + "/\\_/\\ "); - process.stdout.write("\n"); - - process.stdout.write(dist); - padding = self.tick ? "_" : "__"; - var tail = self.tick ? "~" : "^"; - process.stdout.write(tail + "|" + padding + this.face() + " "); - process.stdout.write("\n"); - - process.stdout.write(dist); - padding = self.tick ? " " : " "; - process.stdout.write(padding + '"" "" '); - process.stdout.write("\n"); - - this.cursorUp(this.numberOfLines); -}; + process.stdout.write(dist); + padding = self.tick ? "_" : "__"; + var tail = self.tick ? "~" : "^"; + process.stdout.write(tail + "|" + padding + this.face() + " "); + process.stdout.write("\n"); -/** - * Draw nyan cat face. - * - * @private - * @return {string} - */ + process.stdout.write(dist); + padding = self.tick ? " " : " "; + process.stdout.write(padding + '"" "" '); + process.stdout.write("\n"); -NyanCat.prototype.face = function () { - var stats = this.stats; - if (stats.failures) { - return "( x .x)"; - } else if (stats.pending) { - return "( o .o)"; - } else if (stats.passes) { - return "( ^ .^)"; + this.cursorUp(this.numberOfLines); } - return "( - .-)"; -}; -/** - * Move cursor up `n`. - * - * @private - * @param {number} n - */ + /** + * Draw nyan cat face. + * + * @private + * @return {string} + */ + + face() { + var stats = this.stats; + if (stats.failures) { + return "( x .x)"; + } else if (stats.pending) { + return "( o .o)"; + } else if (stats.passes) { + return "( ^ .^)"; + } + return "( - .-)"; + } -NyanCat.prototype.cursorUp = function (n) { - process.stdout.write("\u001b[" + n + "A"); -}; + /** + * Move cursor up `n`. + * + * @private + * @param {number} n + */ -/** - * Move cursor down `n`. - * - * @private - * @param {number} n - */ + cursorUp(n) { + process.stdout.write("\u001b[" + n + "A"); + } -NyanCat.prototype.cursorDown = function (n) { - process.stdout.write("\u001b[" + n + "B"); -}; + /** + * Move cursor down `n`. + * + * @private + * @param {number} n + */ -/** - * Generate rainbow colors. - * - * @private - * @return {Array} - */ -NyanCat.prototype.generateColors = function () { - var colors = []; - - for (var i = 0; i < 6 * 7; i++) { - var pi3 = Math.floor(Math.PI / 3); - var n = i * (1.0 / 6); - var r = Math.floor(3 * Math.sin(n) + 3); - var g = Math.floor(3 * Math.sin(n + 2 * pi3) + 3); - var b = Math.floor(3 * Math.sin(n + 4 * pi3) + 3); - colors.push(36 * r + 6 * g + b + 16); + cursorDown(n) { + process.stdout.write("\u001b[" + n + "B"); } - return colors; -}; + /** + * Generate rainbow colors. + * + * @private + * @return {Array} + */ + generateColors() { + var colors = []; + + for (var i = 0; i < 6 * 7; i++) { + var pi3 = Math.floor(Math.PI / 3); + var n = i * (1.0 / 6); + var r = Math.floor(3 * Math.sin(n) + 3); + var g = Math.floor(3 * Math.sin(n + 2 * pi3) + 3); + var b = Math.floor(3 * Math.sin(n + 4 * pi3) + 3); + colors.push(36 * r + 6 * g + b + 16); + } -/** - * Apply rainbow to the given `str`. - * - * @private - * @param {string} str - * @return {string} - */ -NyanCat.prototype.rainbowify = function (str) { - if (!Base.useColors) { - return str; + return colors; + } + + /** + * Apply rainbow to the given `str`. + * + * @private + * @param {string} str + * @return {string} + */ + rainbowify(str) { + if (!Base.useColors) { + return str; + } + var color = this.rainbowColors[this.colorIndex % this.rainbowColors.length]; + this.colorIndex += 1; + return "\u001b[38;5;" + color + "m" + str + "\u001b[0m"; } - var color = this.rainbowColors[this.colorIndex % this.rainbowColors.length]; - this.colorIndex += 1; - return "\u001b[38;5;" + color + "m" + str + "\u001b[0m"; -}; +} -NyanCat.description = '"nyan cat"'; +export { NyanCat }; diff --git a/node_modules/mocha/lib/reporters/progress.js b/node_modules/mocha/lib/reporters/progress.js index 9058cdbf..b4a5d55a 100644 --- a/node_modules/mocha/lib/reporters/progress.js +++ b/node_modules/mocha/lib/reporters/progress.js @@ -1,7 +1,5 @@ -"use strict"; - /** - * @typedef {import('../runner.js')} Runner + * @typedef {import('../runner.cjs')} Runner */ /** @@ -11,99 +9,93 @@ * Module dependencies. */ -var Base = require("./base"); -var constants = require("../runner").constants; +import { Base } from "./base.js"; +import Runner from "../runner.cjs"; +var constants = Runner.constants; var EVENT_RUN_BEGIN = constants.EVENT_RUN_BEGIN; var EVENT_TEST_END = constants.EVENT_TEST_END; var EVENT_RUN_END = constants.EVENT_RUN_END; -var inherits = require("../utils").inherits; var color = Base.color; var cursor = Base.cursor; -/** - * Expose `Progress`. - */ - -exports = module.exports = Progress; - /** * General progress bar color. */ Base.colors.progress = 90; -/** - * Constructs a new `Progress` reporter instance. - * - * @public - * @class - * @memberof Mocha.reporters - * @extends Mocha.reporters.Base - * @param {Runner} runner - Instance triggers reporter actions. - * @param {Object} [options] - runner options - */ -function Progress(runner, options) { - Base.call(this, runner, options); - - var self = this; - var width = (Base.window.width * 0.5) | 0; - var total = runner.total; - var complete = 0; - var lastN = -1; - - // default chars - options = options || {}; - var reporterOptions = options.reporterOptions || {}; - - options.open = reporterOptions.open || "["; - options.complete = reporterOptions.complete || "▬"; - options.incomplete = reporterOptions.incomplete || Base.symbols.dot; - options.close = reporterOptions.close || "]"; - options.verbose = reporterOptions.verbose || false; - - // tests started - runner.on(EVENT_RUN_BEGIN, function () { - process.stdout.write("\n"); - cursor.hide(); - }); - - // tests complete - runner.on(EVENT_TEST_END, function () { - complete++; - - var percent = complete / total; - var n = (width * percent) | 0; - var i = width - n; - - if (n === lastN && !options.verbose) { - // Don't re-render the line if it hasn't changed - return; - } - lastN = n; - - cursor.CR(); - process.stdout.write("\u001b[J"); - process.stdout.write(color("progress", " " + options.open)); - process.stdout.write(Array(n).join(options.complete)); - process.stdout.write(Array(i).join(options.incomplete)); - process.stdout.write(color("progress", options.close)); - if (options.verbose) { - process.stdout.write(color("progress", " " + complete + " of " + total)); - } - }); - - // tests are complete, output some stats - // and the failures if any - runner.once(EVENT_RUN_END, function () { - cursor.show(); - process.stdout.write("\n"); - self.epilogue(); - }); +class Progress extends Base { + static description = "a progress bar"; + + /** + * Constructs a new `Progress` reporter instance. + * + * @public + * @memberof Mocha.reporters + * @extends Mocha.reporters.Base + * @param {Runner} runner - Instance triggers reporter actions. + * @param {Object} [options] - runner options + */ + constructor(runner, options) { + super(runner, options); + + var self = this; + var width = (Base.window.width * 0.5) | 0; + var total = runner.total; + var complete = 0; + var lastN = -1; + + // default chars + options = options || {}; + var reporterOptions = options.reporterOptions || {}; + + options.open = reporterOptions.open || "["; + options.complete = reporterOptions.complete || "▬"; + options.incomplete = reporterOptions.incomplete || Base.symbols.dot; + options.close = reporterOptions.close || "]"; + options.verbose = reporterOptions.verbose || false; + + // tests started + runner.on(EVENT_RUN_BEGIN, function () { + process.stdout.write("\n"); + cursor.hide(); + }); + + // tests complete + runner.on(EVENT_TEST_END, function () { + complete++; + + var percent = complete / total; + var n = (width * percent) | 0; + var i = width - n; + + if (n === lastN && !options.verbose) { + // Don't re-render the line if it hasn't changed + return; + } + lastN = n; + + cursor.CR(); + process.stdout.write("\u001b[J"); + process.stdout.write(color("progress", " " + options.open)); + process.stdout.write(Array(n).join(options.complete)); + process.stdout.write(Array(i).join(options.incomplete)); + process.stdout.write(color("progress", options.close)); + if (options.verbose) { + process.stdout.write( + color("progress", " " + complete + " of " + total), + ); + } + }); + + // tests are complete, output some stats + // and the failures if any + runner.once(EVENT_RUN_END, function () { + cursor.show(); + process.stdout.write("\n"); + self.epilogue(); + }); + } } -/** - * Inherit from `Base.prototype`. - */ -inherits(Progress, Base); - -Progress.description = "a progress bar"; +export { Progress }; diff --git a/node_modules/mocha/lib/reporters/spec.js b/node_modules/mocha/lib/reporters/spec.js index 5f2f56d3..1aed1421 100644 --- a/node_modules/mocha/lib/reporters/spec.js +++ b/node_modules/mocha/lib/reporters/spec.js @@ -1,7 +1,5 @@ -"use strict"; - /** - * @typedef {import('../runner.js')} Runner + * @typedef {import('../runner.cjs')} Runner * @typedef {import('../test.js')} Test */ @@ -12,8 +10,9 @@ * Module dependencies. */ -var Base = require("./base"); -var constants = require("../runner").constants; +import { Base } from "./base.js"; +import Runner from "../runner.cjs"; +var constants = Runner.constants; var EVENT_RUN_BEGIN = constants.EVENT_RUN_BEGIN; var EVENT_RUN_END = constants.EVENT_RUN_END; var EVENT_SUITE_BEGIN = constants.EVENT_SUITE_BEGIN; @@ -21,85 +20,75 @@ var EVENT_SUITE_END = constants.EVENT_SUITE_END; var EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL; var EVENT_TEST_PASS = constants.EVENT_TEST_PASS; var EVENT_TEST_PENDING = constants.EVENT_TEST_PENDING; -var inherits = require("../utils").inherits; var color = Base.color; -/** - * Expose `Spec`. - */ - -exports = module.exports = Spec; - -/** - * Constructs a new `Spec` reporter instance. - * - * @public - * @class - * @memberof Mocha.reporters - * @extends Mocha.reporters.Base - * @param {Runner} runner - Instance triggers reporter actions. - * @param {Object} [options] - runner options - */ -function Spec(runner, options) { - Base.call(this, runner, options); - - var self = this; - var indents = 0; - var n = 0; - - function indent() { - return Array(indents).join(" "); - } - - runner.on(EVENT_RUN_BEGIN, function () { - Base.consoleLog(); - }); - - runner.on(EVENT_SUITE_BEGIN, function (suite) { - ++indents; - Base.consoleLog(color("suite", "%s%s"), indent(), suite.title); - }); - - runner.on(EVENT_SUITE_END, function () { - --indents; - if (indents === 1) { - Base.consoleLog(); +class Spec extends Base { + static description = "hierarchical & verbose [default]"; + + /** + * Constructs a new `Spec` reporter instance. + * + * @public + * @memberof Mocha.reporters + * @extends Mocha.reporters.Base + * @param {Runner} runner - Instance triggers reporter actions. + * @param {Object} [options] - runner options + */ + constructor(runner, options) { + super(runner, options); + + var indents = 0; + var n = 0; + + function indent() { + return Array(indents).join(" "); } - }); - - runner.on(EVENT_TEST_PENDING, function (test) { - var fmt = indent() + color("pending", " - %s"); - Base.consoleLog(fmt, test.title); - }); - runner.on(EVENT_TEST_PASS, function (test) { - var fmt; - if (test.speed === "fast") { - fmt = - indent() + - color("checkmark", " " + Base.symbols.ok) + - color("pass", " %s"); + runner.on(EVENT_RUN_BEGIN, function () { + Base.consoleLog(); + }); + + runner.on(EVENT_SUITE_BEGIN, function (suite) { + ++indents; + Base.consoleLog(color("suite", "%s%s"), indent(), suite.title); + }); + + runner.on(EVENT_SUITE_END, function () { + --indents; + if (indents === 1) { + Base.consoleLog(); + } + }); + + runner.on(EVENT_TEST_PENDING, function (test) { + var fmt = indent() + color("pending", " - %s"); Base.consoleLog(fmt, test.title); - } else { - fmt = - indent() + - color("checkmark", " " + Base.symbols.ok) + - color("pass", " %s") + - color(test.speed, " (%dms)"); - Base.consoleLog(fmt, test.title, test.duration); - } - }); - - runner.on(EVENT_TEST_FAIL, function (test) { - Base.consoleLog(indent() + color("fail", " %d) %s"), ++n, test.title); - }); - - runner.once(EVENT_RUN_END, self.epilogue.bind(self)); + }); + + runner.on(EVENT_TEST_PASS, function (test) { + var fmt; + if (test.speed === "fast") { + fmt = + indent() + + color("checkmark", " " + Base.symbols.ok) + + color("pass", " %s"); + Base.consoleLog(fmt, test.title); + } else { + fmt = + indent() + + color("checkmark", " " + Base.symbols.ok) + + color("pass", " %s") + + color(test.speed, " (%dms)"); + Base.consoleLog(fmt, test.title, test.duration); + } + }); + + runner.on(EVENT_TEST_FAIL, function (test) { + Base.consoleLog(indent() + color("fail", " %d) %s"), ++n, test.title); + }); + + runner.once(EVENT_RUN_END, (...args) => this.epilogue(...args)); + } } -/** - * Inherit from `Base.prototype`. - */ -inherits(Spec, Base); - -Spec.description = "hierarchical & verbose [default]"; +export { Spec }; diff --git a/node_modules/mocha/lib/reporters/tap.js b/node_modules/mocha/lib/reporters/tap.js index d34ac981..384dbfa8 100644 --- a/node_modules/mocha/lib/reporters/tap.js +++ b/node_modules/mocha/lib/reporters/tap.js @@ -1,7 +1,5 @@ -"use strict"; - /** - * @typedef {import('../runner.js')} Runner + * @typedef {import('../runner.cjs')} Runner * @typedef {import('../test.js')} Test */ @@ -12,79 +10,71 @@ * Module dependencies. */ -var util = require("node:util"); -var Base = require("./base"); -var constants = require("../runner").constants; +import util from "node:util"; +import { Base } from "./base.js"; +import Runner from "../runner.cjs"; +var constants = Runner.constants; var EVENT_TEST_PASS = constants.EVENT_TEST_PASS; var EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL; var EVENT_RUN_BEGIN = constants.EVENT_RUN_BEGIN; var EVENT_RUN_END = constants.EVENT_RUN_END; var EVENT_TEST_PENDING = constants.EVENT_TEST_PENDING; var EVENT_TEST_END = constants.EVENT_TEST_END; -var inherits = require("../utils").inherits; var sprintf = util.format; -/** - * Expose `TAP`. - */ +class TAP extends Base { + static description = "TAP-compatible output"; -exports = module.exports = TAP; - -/** - * Constructs a new `TAP` reporter instance. - * - * @public - * @class - * @memberof Mocha.reporters - * @extends Mocha.reporters.Base - * @param {Runner} runner - Instance triggers reporter actions. - * @param {Object} [options] - runner options - */ -function TAP(runner, options) { - Base.call(this, runner, options); + /** + * Constructs a new `TAP` reporter instance. + * + * @public + * @memberof Mocha.reporters + * @extends Mocha.reporters.Base + * @param {Runner} runner - Instance triggers reporter actions. + * @param {Object} [options] - runner options + */ + constructor(runner, options) { + super(runner, options); - var self = this; - var n = 1; + var self = this; + var n = 1; - var tapVersion = "12"; - if (options && options.reporterOptions) { - if (options.reporterOptions.tapVersion) { - tapVersion = options.reporterOptions.tapVersion.toString(); + var tapVersion = "12"; + if (options && options.reporterOptions) { + if (options.reporterOptions.tapVersion) { + tapVersion = options.reporterOptions.tapVersion.toString(); + } } - } - this._producer = createProducer(tapVersion); + this._producer = createProducer(tapVersion); - runner.once(EVENT_RUN_BEGIN, function () { - self._producer.writeVersion(); - }); + runner.once(EVENT_RUN_BEGIN, function () { + self._producer.writeVersion(); + }); - runner.on(EVENT_TEST_END, function () { - ++n; - }); + runner.on(EVENT_TEST_END, function () { + ++n; + }); - runner.on(EVENT_TEST_PENDING, function (test) { - self._producer.writePending(n, test); - }); + runner.on(EVENT_TEST_PENDING, function (test) { + self._producer.writePending(n, test); + }); - runner.on(EVENT_TEST_PASS, function (test) { - self._producer.writePass(n, test); - }); + runner.on(EVENT_TEST_PASS, function (test) { + self._producer.writePass(n, test); + }); - runner.on(EVENT_TEST_FAIL, function (test, err) { - self._producer.writeFail(n, test, err); - }); + runner.on(EVENT_TEST_FAIL, function (test, err) { + self._producer.writeFail(n, test, err); + }); - runner.once(EVENT_RUN_END, function () { - self._producer.writeEpilogue(runner.stats); - }); + runner.once(EVENT_RUN_END, function () { + self._producer.writeEpilogue(runner.stats); + }); + } } -/** - * Inherit from `Base.prototype`. - */ -inherits(TAP, Base); - /** * Returns a TAP-safe title of `test`. * @@ -143,77 +133,74 @@ function createProducer(tapVersion) { * @private * @constructor */ -function TAPProducer() {} - -/** - * Writes the TAP version to reporter output stream. - * - * @abstract - */ -TAPProducer.prototype.writeVersion = function () {}; +class TAPProducer { + /** + * Writes the TAP version to reporter output stream. + * + * @abstract + */ + writeVersion() {} -/** - * Writes the plan to reporter output stream. - * - * @abstract - * @param {number} ntests - Number of tests that are planned to run. - */ -TAPProducer.prototype.writePlan = function (ntests) { - println("%d..%d", 1, ntests); -}; + /** + * Writes the plan to reporter output stream. + * + * @abstract + * @param {number} ntests - Number of tests that are planned to run. + */ + writePlan(ntests) { + println("%d..%d", 1, ntests); + } -/** - * Writes that test passed to reporter output stream. - * - * @abstract - * @param {number} n - Index of test that passed. - * @param {Test} test - Instance containing test information. - */ -TAPProducer.prototype.writePass = function (n, test) { - println("ok %d %s", n, title(test)); -}; + /** + * Writes that test passed to reporter output stream. + * + * @abstract + * @param {number} n - Index of test that passed. + * @param {Test} test - Instance containing test information. + */ + writePass(n, test) { + println("ok %d %s", n, title(test)); + } -/** - * Writes that test was skipped to reporter output stream. - * - * @abstract - * @param {number} n - Index of test that was skipped. - * @param {Test} test - Instance containing test information. - */ -TAPProducer.prototype.writePending = function (n, test) { - println("ok %d %s # SKIP -", n, title(test)); -}; + /** + * Writes that test was skipped to reporter output stream. + * + * @abstract + * @param {number} n - Index of test that was skipped. + * @param {Test} test - Instance containing test information. + */ + writePending(n, test) { + println("ok %d %s # SKIP -", n, title(test)); + } -/** - * Writes that test failed to reporter output stream. - * - * @abstract - * @param {number} n - Index of test that failed. - * @param {Test} test - Instance containing test information. - */ -TAPProducer.prototype.writeFail = function (n, test) { - println("not ok %d %s", n, title(test)); -}; + /** + * Writes that test failed to reporter output stream. + * + * @abstract + * @param {number} n - Index of test that failed. + * @param {Test} test - Instance containing test information. + */ + writeFail(n, test) { + println("not ok %d %s", n, title(test)); + } -/** - * Writes the summary epilogue to reporter output stream. - * - * @abstract - * @param {Object} stats - Object containing run statistics. - */ -TAPProducer.prototype.writeEpilogue = function (stats) { - // :TBD: Why is this not counting pending tests? - println("# tests " + (stats.passes + stats.failures)); - println("# pass " + stats.passes); - // :TBD: Why are we not showing pending results? - println("# fail " + stats.failures); - this.writePlan(stats.passes + stats.failures + stats.pending); -}; + /** + * Writes the summary epilogue to reporter output stream. + * + * @abstract + * @param {Object} stats - Object containing run statistics. + */ + writeEpilogue(stats) { + // :TBD: Why is this not counting pending tests? + println("# tests " + (stats.passes + stats.failures)); + println("# pass " + stats.passes); + // :TBD: Why are we not showing pending results? + println("# fail " + stats.failures); + this.writePlan(stats.passes + stats.failures + stats.pending); + } +} /** - * @summary - * Constructs a new TAP12Producer. - * * @description * Produces output conforming to the TAP12 specification. * @@ -222,27 +209,22 @@ TAPProducer.prototype.writeEpilogue = function (stats) { * @extends TAPProducer * @see {@link https://testanything.org/tap-specification.html|Specification} */ -function TAP12Producer() { +class TAP12Producer extends TAPProducer { /** * Writes that test failed to reporter output stream, with error formatting. * @override */ - this.writeFail = function (n, test, err) { - TAPProducer.prototype.writeFail.call(this, n, test, err); + writeFail(n, test, err) { + super.writeFail(n, test, err); if (err.message) { println(err.message.replace(/^/gm, " ")); } if (err.stack) { println(err.stack.replace(/^/gm, " ")); } - }; + } } -/** - * Inherit from `TAPProducer.prototype`. - */ -inherits(TAP12Producer, TAPProducer); - /** * @summary * Constructs a new TAP13Producer. @@ -255,21 +237,21 @@ inherits(TAP12Producer, TAPProducer); * @extends TAPProducer * @see {@link https://testanything.org/tap-version-13-specification.html|Specification} */ -function TAP13Producer() { +class TAP13Producer extends TAPProducer { /** * Writes the TAP version to reporter output stream. * @override */ - this.writeVersion = function () { + writeVersion() { println("TAP version 13"); - }; + } /** * Writes that test failed to reporter output stream, with error formatting. * @override */ - this.writeFail = function (n, test, err) { - TAPProducer.prototype.writeFail.call(this, n, test, err); + writeFail(n, test, err) { + super.writeFail(n, test, err); var emitYamlBlock = err.message != null || err.stack != null; if (emitYamlBlock) { println(indent(1) + "---"); @@ -283,16 +265,11 @@ function TAP13Producer() { } println(indent(1) + "..."); } - }; - - function indent(level) { - return Array(level + 1).join(" "); } } -/** - * Inherit from `TAPProducer.prototype`. - */ -inherits(TAP13Producer, TAPProducer); +function indent(level) { + return Array(level + 1).join(" "); +} -TAP.description = "TAP-compatible output"; +export { TAP }; diff --git a/node_modules/mocha/lib/reporters/xunit.js b/node_modules/mocha/lib/reporters/xunit.js index 0eb48fb6..809df451 100644 --- a/node_modules/mocha/lib/reporters/xunit.js +++ b/node_modules/mocha/lib/reporters/xunit.js @@ -1,7 +1,5 @@ -"use strict"; - /** - * @typedef {import('../runner.js')} Runner + * @typedef {import('../runner.cjs')} Runner * @typedef {import('../test.js')} Test */ @@ -12,187 +10,187 @@ * Module dependencies. */ -var Base = require("./base"); -var utils = require("../utils"); -var fs = require("node:fs"); -var path = require("node:path"); -var errors = require("../errors"); +import { Base } from "./base.js"; +import utils from "../utils.cjs"; +import fs from "node:fs"; +import path from "node:path"; +import * as errors from "../errors.js"; +import Runner from "../runner.cjs"; +import { Runnable } from "../runnable.js"; var createUnsupportedError = errors.createUnsupportedError; -var constants = require("../runner").constants; +var constants = Runner.constants; var EVENT_TEST_PASS = constants.EVENT_TEST_PASS; var EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL; var EVENT_RUN_END = constants.EVENT_RUN_END; var EVENT_TEST_PENDING = constants.EVENT_TEST_PENDING; -var STATE_FAILED = require("../runnable").constants.STATE_FAILED; -var inherits = utils.inherits; +var STATE_FAILED = Runnable.constants.STATE_FAILED; var escape = utils.escape; +var ANSI_ESCAPE_SEQUENCE = new RegExp( + String.fromCharCode(27) + "\\[[0-?]*[ -/]*[@-~]", + "g", +); /** * Save timer references to avoid Sinon interfering (see GH-237). */ var Date = global.Date; -/** - * Expose `XUnit`. - */ +class XUnit extends Base { + static description = "XUnit-compatible XML output"; + + /** + * Constructs a new `XUnit` reporter instance. + * + * @public + * @memberof Mocha.reporters + * @extends Mocha.reporters.Base + * @param {Runner} runner - Instance triggers reporter actions. + * @param {Object} [options] - runner options + */ + constructor(runner, options) { + super(runner, options); + + var stats = this.stats; + var tests = []; + var self = this; + + // the name of the test suite, as it will appear in the resulting XML file + var suiteName; + + // the default name of the test suite if none is provided + var DEFAULT_SUITE_NAME = "Mocha Tests"; + + if (options && options.reporterOptions) { + if (options.reporterOptions.output) { + if (!fs.createWriteStream) { + throw createUnsupportedError("file output not supported in browser"); + } + + fs.mkdirSync(path.dirname(options.reporterOptions.output), { + recursive: true, + }); + self.fileStream = fs.createWriteStream(options.reporterOptions.output); + } -exports = module.exports = XUnit; + // get the suite name from the reporter options (if provided) + suiteName = options.reporterOptions.suiteName; + } -/** - * Constructs a new `XUnit` reporter instance. - * - * @public - * @class - * @memberof Mocha.reporters - * @extends Mocha.reporters.Base - * @param {Runner} runner - Instance triggers reporter actions. - * @param {Object} [options] - runner options - */ -function XUnit(runner, options) { - Base.call(this, runner, options); + // fall back to the default suite name + suiteName = suiteName || DEFAULT_SUITE_NAME; - var stats = this.stats; - var tests = []; - var self = this; + runner.on(EVENT_TEST_PENDING, function (test) { + tests.push(test); + }); - // the name of the test suite, as it will appear in the resulting XML file - var suiteName; + runner.on(EVENT_TEST_PASS, function (test) { + tests.push(test); + }); - // the default name of the test suite if none is provided - var DEFAULT_SUITE_NAME = "Mocha Tests"; + runner.on(EVENT_TEST_FAIL, function (test) { + tests.push(test); + }); - if (options && options.reporterOptions) { - if (options.reporterOptions.output) { - if (!fs.createWriteStream) { - throw createUnsupportedError("file output not supported in browser"); - } + runner.once(EVENT_RUN_END, function () { + self.write( + tag( + "testsuite", + { + name: suiteName, + tests: stats.tests, + failures: 0, + errors: stats.failures, + skipped: stats.tests - stats.failures - stats.passes, + timestamp: new Date().toUTCString(), + time: stats.duration / 1000 || 0, + }, + false, + ), + ); - fs.mkdirSync(path.dirname(options.reporterOptions.output), { - recursive: true, + tests.forEach(function (t) { + self.test(t, options); }); - self.fileStream = fs.createWriteStream(options.reporterOptions.output); - } - - // get the suite name from the reporter options (if provided) - suiteName = options.reporterOptions.suiteName; - } - // fall back to the default suite name - suiteName = suiteName || DEFAULT_SUITE_NAME; - - runner.on(EVENT_TEST_PENDING, function (test) { - tests.push(test); - }); - - runner.on(EVENT_TEST_PASS, function (test) { - tests.push(test); - }); - - runner.on(EVENT_TEST_FAIL, function (test) { - tests.push(test); - }); - - runner.once(EVENT_RUN_END, function () { - self.write( - tag( - "testsuite", - { - name: suiteName, - tests: stats.tests, - failures: 0, - errors: stats.failures, - skipped: stats.tests - stats.failures - stats.passes, - timestamp: new Date().toUTCString(), - time: stats.duration / 1000 || 0, - }, - false, - ), - ); - - tests.forEach(function (t) { - self.test(t, options); + self.write(""); }); + } - self.write(""); - }); -} - -/** - * Inherit from `Base.prototype`. - */ -inherits(XUnit, Base); - -/** - * Override done to close the stream (if it's a file). - * - * @param failures - * @param {Function} fn - */ -XUnit.prototype.done = function (failures, fn) { - if (this.fileStream) { - this.fileStream.end(function () { + /** + * Override done to close the stream (if it's a file). + * + * @param failures + * @param {Function} fn + */ + done(failures, fn) { + if (this.fileStream) { + this.fileStream.end(function () { + fn(failures); + }); + } else { fn(failures); - }); - } else { - fn(failures); + } } -}; -/** - * Write out the given line. - * - * @param {string} line - */ -XUnit.prototype.write = function (line) { - if (this.fileStream) { - this.fileStream.write(line + "\n"); - } else if (typeof process === "object" && process.stdout) { - process.stdout.write(line + "\n"); - } else { - Base.consoleLog(line); + /** + * Write out the given line. + * + * @param {string} line + */ + write(line) { + if (this.fileStream) { + this.fileStream.write(line + "\n"); + } else if (typeof process === "object" && process.stdout) { + process.stdout.write(line + "\n"); + } else { + Base.consoleLog(line); + } } -}; -/** - * Output tag for the given `test.` - * - * @param {Test} test - */ -XUnit.prototype.test = function (test, options) { - Base.useColors = false; - - var attrs = { - classname: test.parent.fullTitle(), - name: test.title, - file: testFilePath(test.file, options), - time: test.duration / 1000 || 0, - }; - - if (test.state === STATE_FAILED) { - var err = test.err; - var diff = - !Base.hideDiff && Base.showDiff(err) - ? "\n" + Base.generateDiff(err.actual, err.expected) - : ""; - this.write( - tag( - "testcase", - attrs, - false, + /** + * Output tag for the given `test.` + * + * @param {Test} test + */ + test(test, options) { + Base.useColors = false; + + var attrs = { + classname: test.parent.fullTitle(), + name: test.title, + file: testFilePath(test.file, options), + time: test.duration / 1000 || 0, + }; + + if (test.state === STATE_FAILED) { + var err = test.err; + var diff = + !Base.hideDiff && Base.showDiff(err) + ? "\n" + Base.generateDiff(err.actual, err.expected) + : ""; + this.write( tag( - "failure", - {}, + "testcase", + attrs, false, - escape(err.message) + escape(diff) + "\n" + escape(err.stack), + tag( + "failure", + {}, + false, + escapeXml(err.message) + + escapeXml(diff) + + "\n" + + escapeXml(err.stack), + ), ), - ), - ); - } else if (test.isPending()) { - this.write(tag("testcase", attrs, false, tag("skipped", {}, true))); - } else { - this.write(tag("testcase", attrs, true)); + ); + } else if (test.isPending()) { + this.write(tag("testcase", attrs, false, tag("skipped", {}, true))); + } else { + this.write(tag("testcase", attrs, true)); + } } -}; +} /** * HTML tag helper. @@ -210,7 +208,7 @@ function tag(name, attrs, close, content) { for (var key in attrs) { if (Object.prototype.hasOwnProperty.call(attrs, key)) { - pairs.push(key + '="' + escape(attrs[key]) + '"'); + pairs.push(key + '="' + escapeXml(attrs[key]) + '"'); } } @@ -221,6 +219,30 @@ function tag(name, attrs, close, content) { return tag; } +function escapeXml(value) { + return escape( + stripInvalidXmlCharacters(String(value).replace(ANSI_ESCAPE_SEQUENCE, "")), + ); +} + +function stripInvalidXmlCharacters(value) { + var result = ""; + + for (var i = 0; i < value.length; i += 1) { + var charCode = value.charCodeAt(i); + if ( + charCode === 0x09 || + charCode === 0x0a || + charCode === 0x0d || + charCode >= 0x20 + ) { + result += value[i]; + } + } + + return result; +} + function testFilePath(filepath, options) { if ( options && @@ -233,4 +255,4 @@ function testFilePath(filepath, options) { return filepath; } -XUnit.description = "XUnit-compatible XML output"; +export { XUnit }; diff --git a/node_modules/mocha/lib/runnable.js b/node_modules/mocha/lib/runnable.js index 97097dda..db55c03e 100644 --- a/node_modules/mocha/lib/runnable.js +++ b/node_modules/mocha/lib/runnable.js @@ -1,15 +1,15 @@ -"use strict"; - -var EventEmitter = require("node:events").EventEmitter; -var Pending = require("./pending"); -var debug = require("debug")("mocha:runnable"); -var milliseconds = require("ms"); -var utils = require("./utils"); -const { +import { EventEmitter } from "node:events"; +import { PendingError } from "./pending.js"; +import debugModule from "debug"; +import milliseconds from "ms"; +import utils from "./utils.cjs"; +import { createInvalidExceptionError, createMultipleDoneError, createTimeoutError, -} = require("./errors"); +} from "./errors.js"; + +const debug = debugModule("mocha:runnable"); /** * Save timer references to avoid Sinon interfering (see GH-237). @@ -22,455 +22,454 @@ var toString = Object.prototype.toString; var MAX_TIMEOUT = Math.pow(2, 31) - 1; -module.exports = Runnable; - -// "Additional properties" doc comment added for hosted docs (mochajs.org/api) -/** - * Initialize a new `Runnable` with the given `title` and callback `fn`. - * Additional properties, like `getFullTitle()` and `slow()`, can be viewed in the `Runnable` source. - * - * @class - * @extends external:EventEmitter - * @public - * @param {String} title - * @param {Function} fn - */ -function Runnable(title, fn) { - this.title = title; - this.fn = fn; - this.body = (fn || "").toString(); - this.async = fn && fn.length; - this.sync = !this.async; - this._timeout = 2000; - this._slow = 75; - this._retries = -1; - utils.assignNewMochaID(this); - Object.defineProperty(this, "id", { - get() { - return utils.getMochaID(this); - }, - }); - this.reset(); -} +class Runnable extends EventEmitter { + // "Additional properties" doc comment added for hosted docs (mochajs.org/api) + /** + * Initialize a new `Runnable` with the given `title` and callback `fn`. + * Additional properties, like `getFullTitle()` and `slow()`, can be viewed in the `Runnable` source. + * + * @extends external:EventEmitter + * @public + * @param {String} title + * @param {Function} fn + */ + constructor(title, fn) { + super(title, fn); + this.title = title; + this.fn = fn; + this.body = (fn || "").toString(); + this.async = fn && fn.length; + this.sync = !this.async; + this._timeout = 2000; + this._slow = 75; + this._retries = -1; + utils.assignNewMochaID(this); + Object.defineProperty(this, "id", { + get() { + return utils.getMochaID(this); + }, + }); + this.reset(); + } -/** - * Inherit from `EventEmitter.prototype`. - */ -utils.inherits(Runnable, EventEmitter); + /** + * Resets the state initially or for a next run. + */ + reset() { + this.timedOut = false; + this._currentRetry = 0; + this.pending = false; + delete this.state; + delete this.err; + } -/** - * Resets the state initially or for a next run. - */ -Runnable.prototype.reset = function () { - this.timedOut = false; - this._currentRetry = 0; - this.pending = false; - delete this.state; - delete this.err; -}; + /** + * Get current timeout value in msecs. + * + * @private + * @returns {number} current timeout threshold value + */ + /** + * @summary + * Set timeout threshold value (msecs). + * + * @description + * A string argument can use shorthand (e.g., "2s") and will be converted. + * The value will be clamped to range [0, 2^31-1]. + * If clamped value matches either range endpoint, timeouts will be disabled. + * + * @private + * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setTimeout#Maximum_delay_value} + * @param {number|string} ms - Timeout threshold value. + * @returns {Runnable} this + * @chainable + */ + timeout(ms) { + if (!arguments.length) { + return this._timeout; + } + if (typeof ms === "string") { + ms = milliseconds(ms); + } -/** - * Get current timeout value in msecs. - * - * @private - * @returns {number} current timeout threshold value - */ -/** - * @summary - * Set timeout threshold value (msecs). - * - * @description - * A string argument can use shorthand (e.g., "2s") and will be converted. - * The value will be clamped to range [0, 2^31-1]. - * If clamped value matches either range endpoint, timeouts will be disabled. - * - * @private - * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setTimeout#Maximum_delay_value} - * @param {number|string} ms - Timeout threshold value. - * @returns {Runnable} this - * @chainable - */ -Runnable.prototype.timeout = function (ms) { - if (!arguments.length) { - return this._timeout; - } - if (typeof ms === "string") { - ms = milliseconds(ms); - } + // Clamp to range + var range = [0, MAX_TIMEOUT]; + ms = utils.clamp(ms, range); - // Clamp to range - var range = [0, MAX_TIMEOUT]; - ms = utils.clamp(ms, range); + // see #1652 for reasoning + if (ms === range[0] || ms === range[1]) { + this._timeout = 0; + } else { + this._timeout = ms; + } + debug("timeout %d", this._timeout); - // see #1652 for reasoning - if (ms === range[0] || ms === range[1]) { - this._timeout = 0; - } else { - this._timeout = ms; + if (this.timer) { + this.resetTimeout(); + } + return this; } - debug("timeout %d", this._timeout); - if (this.timer) { - this.resetTimeout(); + /** + * Set or get slow `ms`. + * + * @private + * @param {number|string} ms + * @return {Runnable|number} ms or Runnable instance. + */ + slow(ms) { + if (!arguments.length || typeof ms === "undefined") { + return this._slow; + } + if (typeof ms === "string") { + ms = milliseconds(ms); + } + debug("slow %d", ms); + this._slow = ms; + return this; } - return this; -}; -/** - * Set or get slow `ms`. - * - * @private - * @param {number|string} ms - * @return {Runnable|number} ms or Runnable instance. - */ -Runnable.prototype.slow = function (ms) { - if (!arguments.length || typeof ms === "undefined") { - return this._slow; - } - if (typeof ms === "string") { - ms = milliseconds(ms); + /** + * Halt and mark as pending. + * + * @memberof Mocha.Runnable + * @public + */ + skip() { + this.pending = true; + throw new PendingError("sync skip; aborting execution"); } - debug("slow %d", ms); - this._slow = ms; - return this; -}; -/** - * Halt and mark as pending. - * - * @memberof Mocha.Runnable - * @public - */ -Runnable.prototype.skip = function () { - this.pending = true; - throw new Pending("sync skip; aborting execution"); -}; - -/** - * Check if this runnable or its parent suite is marked as pending. - * - * @private - */ -Runnable.prototype.isPending = function () { - return this.pending || (this.parent && this.parent.isPending()); -}; - -/** - * Return `true` if this Runnable has failed. - * @return {boolean} - * @private - */ -Runnable.prototype.isFailed = function () { - return !this.isPending() && this.state === constants.STATE_FAILED; -}; - -/** - * Return `true` if this Runnable has passed. - * @return {boolean} - * @private - */ -Runnable.prototype.isPassed = function () { - return !this.isPending() && this.state === constants.STATE_PASSED; -}; - -/** - * Set or get number of retries. - * - * @private - */ -Runnable.prototype.retries = function (n) { - if (!arguments.length) { - return this._retries; + /** + * Check if this runnable or its parent suite is marked as pending. + * + * @private + */ + isPending() { + return this.pending || (this.parent && this.parent.isPending()); } - this._retries = n; -}; -/** - * Set or get current retry - * - * @private - */ -Runnable.prototype.currentRetry = function (n) { - if (!arguments.length) { - return this._currentRetry; + /** + * Return `true` if this Runnable has failed. + * @return {boolean} + * @private + */ + isFailed() { + return !this.isPending() && this.state === Runnable.constants.STATE_FAILED; } - this._currentRetry = n; -}; -/** - * Return the full title generated by recursively concatenating the parent's - * full title. - * - * @memberof Mocha.Runnable - * @public - * @return {string} - */ -Runnable.prototype.fullTitle = function () { - return this.titlePath().join(" "); -}; + /** + * Return `true` if this Runnable has passed. + * @return {boolean} + * @private + */ + isPassed() { + return !this.isPending() && this.state === Runnable.constants.STATE_PASSED; + } -/** - * Return the title path generated by concatenating the parent's title path with the title. - * - * @memberof Mocha.Runnable - * @public - * @return {string[]} - */ -Runnable.prototype.titlePath = function () { - return this.parent.titlePath().concat([this.title]); -}; + /** + * Set or get number of retries. + * + * @private + */ + retries(n) { + if (!arguments.length) { + return this._retries; + } + this._retries = n; + } -/** - * Clear the timeout. - * - * @private - */ -Runnable.prototype.clearTimeout = function () { - clearTimeout(this.timer); -}; + /** + * Set or get current retry + * + * @private + */ + currentRetry(n) { + if (!arguments.length) { + return this._currentRetry; + } + this._currentRetry = n; + } -/** - * Reset the timeout. - * - * @private - */ -Runnable.prototype.resetTimeout = function () { - var self = this; - var ms = this.timeout() || MAX_TIMEOUT; + /** + * Return the full title generated by recursively concatenating the parent's + * full title. + * + * @memberof Mocha.Runnable + * @public + * @return {string} + */ + fullTitle() { + return this.titlePath().join(" "); + } - this.clearTimeout(); - this.timer = setTimeout(function () { - if (self.timeout() === 0) { - return; - } - self.callback(self._timeoutError(ms)); - self.timedOut = true; - }, ms); -}; + /** + * Return the title path generated by concatenating the parent's title path with the title. + * + * @memberof Mocha.Runnable + * @public + * @return {string[]} + */ + titlePath() { + return this.parent.titlePath().concat([this.title]); + } -/** - * Set or get a list of whitelisted globals for this test run. - * - * @private - * @param {string[]} globals - */ -Runnable.prototype.globals = function (globals) { - if (!arguments.length) { - return this._allowedGlobals; + /** + * Clear the timeout. + * + * @private + */ + clearTimeout() { + clearTimeout(this.timer); } - this._allowedGlobals = globals; -}; -/** - * Run the test and invoke `fn(err)`. - * - * @param {Function} fn - * @private - */ -Runnable.prototype.run = function (fn) { - var self = this; - var start = new Date(); - var ctx = this.ctx; - var finished; - var errorWasHandled = false; - - if (this.isPending()) return fn(); - - // Sometimes the ctx exists, but it is not runnable - if (ctx && ctx.runnable) { - ctx.runnable(this); + /** + * Reset the timeout. + * + * @private + */ + resetTimeout() { + var self = this; + var ms = this.timeout() || MAX_TIMEOUT; + + this.clearTimeout(); + this.timer = setTimeout(function () { + if (self.timeout() === 0) { + return; + } + self.callback(self._timeoutError(ms)); + self.timedOut = true; + }, ms); } - // called multiple times - function multiple(err) { - if (errorWasHandled) { - return; + /** + * Set or get a list of whitelisted globals for this test run. + * + * @private + * @param {string[]} globals + */ + globals(globals) { + if (!arguments.length) { + return this._allowedGlobals; } - errorWasHandled = true; - self.emit("error", createMultipleDoneError(self, err)); + this._allowedGlobals = globals; } - // finished - function done(err) { - var ms = self.timeout(); - if (self.timedOut) { - return; + /** + * Run the test and invoke `fn(err)`. + * + * @param {Function} fn + * @private + */ + run(fn) { + var self = this; + var start = new Date(); + var ctx = this.ctx; + var finished; + var errorWasHandled = false; + + if (this.isPending()) return fn(); + + // Sometimes the ctx exists, but it is not runnable + if (ctx && ctx.runnable) { + ctx.runnable(this); } - if (finished) { - return multiple(err); + // called multiple times + function multiple(err) { + if (errorWasHandled) { + return; + } + errorWasHandled = true; + self.emit("error", createMultipleDoneError(self, err)); } - self.clearTimeout(); - self.duration = new Date() - start; - finished = true; - if (!err && self.duration > ms && ms > 0) { - err = self._timeoutError(ms); - } - fn(err); - } + // finished + function done(err) { + var ms = self.timeout(); + if (self.timedOut) { + return; + } + + if (finished) { + return multiple(err); + } - // for .resetTimeout() and Runner#uncaught() - this.callback = done; + self.clearTimeout(); + self.duration = new Date() - start; + finished = true; + if (!err && self.duration > ms && ms > 0) { + err = self._timeoutError(ms); + } + fn(err); + } - if (this.fn && typeof this.fn.call !== "function") { - done( - new TypeError( - "A runnable must be passed a function as its second argument.", - ), - ); - return; - } + // for .resetTimeout() and Runner#uncaught() + this.callback = done; - // explicit async with `done` argument - if (this.async) { - this.resetTimeout(); + if (this.fn && typeof this.fn.call !== "function") { + done( + new TypeError( + "A runnable must be passed a function as its second argument.", + ), + ); + return; + } - // allows skip() to be used in an explicit async context - this.skip = function asyncSkip() { - this.pending = true; - done(); - // halt execution, the uncaught handler will ignore the failure. - throw new Pending("async skip; aborting execution"); - }; + // explicit async with `done` argument + if (this.async) { + this.resetTimeout(); + + // allows skip() to be used in an explicit async context + this.skip = function asyncSkip() { + this.pending = true; + done(); + // halt execution, the uncaught handler will ignore the failure. + throw new PendingError("async skip; aborting execution"); + }; + + try { + callFnAsync(this.fn); + } catch (err) { + // handles async runnables which actually run synchronously + errorWasHandled = true; + if (err instanceof PendingError) { + return; // done() is already called in this.skip() + } else if (this.allowUncaught) { + throw err; + } + done(Runnable.toValueOrError(err)); + } + return; + } + // sync or promise-returning try { - callFnAsync(this.fn); + callFn(this.fn); } catch (err) { - // handles async runnables which actually run synchronously errorWasHandled = true; - if (err instanceof Pending) { - return; // done() is already called in this.skip() + if (err instanceof PendingError) { + return done(); } else if (this.allowUncaught) { throw err; } done(Runnable.toValueOrError(err)); } - return; - } - - // sync or promise-returning - try { - callFn(this.fn); - } catch (err) { - errorWasHandled = true; - if (err instanceof Pending) { - return done(); - } else if (this.allowUncaught) { - throw err; - } - done(Runnable.toValueOrError(err)); - } - function callFn(fn) { - var result = fn.call(ctx); - if (result && typeof result.then === "function") { - self.resetTimeout(); - result.then( - function () { - done(); - // Return null so libraries like bluebird do not warn about - // subsequently constructed Promises. - return null; - }, - function (reason) { - done(reason || new Error("Promise rejected with no or falsy reason")); - }, - ); - } else { - if (self.asyncOnly) { - return done( - new Error( - "--async-only option in use without declaring `done()` or returning a promise", - ), + function callFn(fn) { + var result = fn.call(ctx); + if (result && typeof result.then === "function") { + self.resetTimeout(); + result.then( + function () { + done(); + // Return null so libraries like bluebird do not warn about + // subsequently constructed Promises. + return null; + }, + function (reason) { + done( + reason || new Error("Promise rejected with no or falsy reason"), + ); + }, ); - } + } else { + if (self.asyncOnly) { + return done( + new Error( + "--async-only option in use without declaring `done()` or returning a promise", + ), + ); + } - done(); + done(); + } } - } - function callFnAsync(fn) { - var result = fn.call(ctx, function (err) { - if (err instanceof Error || toString.call(err) === "[object Error]") { - return done(err); - } - if (err) { - if (Object.prototype.toString.call(err) === "[object Object]") { + function callFnAsync(fn) { + var result = fn.call(ctx, function (err) { + if (err instanceof Error || toString.call(err) === "[object Error]") { + return done(err); + } + if (err) { + if (Object.prototype.toString.call(err) === "[object Object]") { + return done( + new Error( + "done() invoked with non-Error: " + JSON.stringify(err), + ), + ); + } + return done(new Error("done() invoked with non-Error: " + err)); + } + if (result && utils.isPromise(result)) { return done( - new Error("done() invoked with non-Error: " + JSON.stringify(err)), + new Error( + "Resolution method is overspecified. Specify a callback *or* return a Promise; not both.", + ), ); } - return done(new Error("done() invoked with non-Error: " + err)); - } - if (result && utils.isPromise(result)) { - return done( - new Error( - "Resolution method is overspecified. Specify a callback *or* return a Promise; not both.", - ), - ); - } - done(); - }); - } -}; - -/** - * Instantiates a "timeout" error - * - * @param {number} ms - Timeout (in milliseconds) - * @returns {Error} a "timeout" error - * @private - */ -Runnable.prototype._timeoutError = function (ms) { - let msg = `Timeout of ${ms}ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.`; - if (this.file) { - msg += " (" + this.file + ")"; + done(); + }); + } } - return createTimeoutError(msg, ms, this.file); -}; -var constants = utils.defineConstants( /** - * {@link Runnable}-related constants. - * @public - * @memberof Runnable - * @readonly - * @static - * @alias constants - * @enum {string} + * Instantiates a "timeout" error + * + * @param {number} ms - Timeout (in milliseconds) + * @returns {Error} a "timeout" error + * @private */ - { - /** - * Value of `state` prop when a `Runnable` has failed - */ - STATE_FAILED: "failed", - /** - * Value of `state` prop when a `Runnable` has passed - */ - STATE_PASSED: "passed", + _timeoutError(ms) { + let msg = `Timeout of ${ms}ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.`; + if (this.file) { + msg += " (" + this.file + ")"; + } + return createTimeoutError(msg, ms, this.file); + } + + static constants = utils.defineConstants( /** - * Value of `state` prop when a `Runnable` has been skipped by user + * {@link Runnable}-related Runnable.constants. + * @public + * @memberof Runnable + * @readonly + * @static + * @alias constants + * @enum {string} */ - STATE_PENDING: "pending", - }, -); - -/** - * Given `value`, return identity if truthy, otherwise create an "invalid exception" error and return that. - * @param {*} [value] - Value to return, if present - * @returns {*|Error} `value`, otherwise an `Error` - * @private - */ -Runnable.toValueOrError = function (value) { - return ( - value || - createInvalidExceptionError( - "Runnable failed with falsy or undefined exception. Please throw an Error instead.", - value, - ) + { + /** + * Value of `state` prop when a `Runnable` has failed + */ + STATE_FAILED: "failed", + /** + * Value of `state` prop when a `Runnable` has passed + */ + STATE_PASSED: "passed", + /** + * Value of `state` prop when a `Runnable` has been skipped by user + */ + STATE_PENDING: "pending", + }, ); -}; -Runnable.constants = constants; + /** + * Given `value`, return identity if truthy, otherwise create an "invalid exception" error and return that. + * @param {*} [value] - Value to return, if present + * @returns {*|Error} `value`, otherwise an `Error` + * @private + */ + static toValueOrError(value) { + return ( + value || + createInvalidExceptionError( + "Runnable failed with falsy or undefined exception. Please throw an Error instead.", + value, + ) + ); + } +} + +export { Runnable }; diff --git a/node_modules/mocha/lib/runner.js b/node_modules/mocha/lib/runner.cjs similarity index 98% rename from node_modules/mocha/lib/runner.js rename to node_modules/mocha/lib/runner.cjs index 02dfd247..4ebadc50 100644 --- a/node_modules/mocha/lib/runner.js +++ b/node_modules/mocha/lib/runner.cjs @@ -9,11 +9,11 @@ * @private */ var EventEmitter = require("node:events").EventEmitter; -var Pending = require("./pending"); -var utils = require("./utils"); +var { PendingError } = require("./pending.js"); +var utils = require("./utils.cjs"); var debug = require("debug")("mocha:runner"); -var Runnable = require("./runnable"); -var Suite = require("./suite"); +var { Runnable } = require("./runnable.js"); +var { Suite } = require("./suite.js"); var HOOK_TYPE_BEFORE_EACH = Suite.constants.HOOK_TYPE_BEFORE_EACH; var HOOK_TYPE_AFTER_EACH = Suite.constants.HOOK_TYPE_AFTER_EACH; var HOOK_TYPE_AFTER_ALL = Suite.constants.HOOK_TYPE_AFTER_ALL; @@ -30,8 +30,8 @@ const { createUnsupportedError, createFatalError, isMochaError, -} = require("./errors"); -const { constants: errorConstants } = require("./error-constants"); +} = require("./errors.js"); +const { constants: errorConstants } = require("./error-constants.js"); /** * Non-enumerable globals. @@ -242,12 +242,12 @@ class Runner extends EventEmitter { } /** - * Wrapper for setImmediate, process.nextTick, or browser polyfill. + * Wrapper for setImmediate or browser polyfill. * * @param {Function} fn * @private */ -Runner.immediately = global.setImmediate || process.nextTick; +Runner.immediately = global.setImmediate; /** * Replacement for `target.on(eventName, listener)` that does bookkeeping to remove them when this runner instance is disposed. @@ -563,8 +563,8 @@ Runner.prototype.fail = function (test, err, force) { try { currentErr.stack = stackFilter(currentErr.stack); - } catch (ignore) { - // some environments do not take kindly to monkeying with the stack + } catch { + // Ignore error as some environments do not take kindly to monkeying with the stack } currentErr = currentErr.cause; @@ -1105,8 +1105,8 @@ Runner.prototype._uncaught = function (err) { this, ); } - if (err instanceof Pending) { - debug("uncaught(): caught a Pending"); + if (err instanceof PendingError) { + debug("uncaught(): caught a PendingError"); return; } // browser does not exit script when throwing in global.onerror() diff --git a/node_modules/mocha/lib/stats-collector.js b/node_modules/mocha/lib/stats-collector.js index eb3a3339..6e7cfdbd 100644 --- a/node_modules/mocha/lib/stats-collector.js +++ b/node_modules/mocha/lib/stats-collector.js @@ -1,8 +1,6 @@ -"use strict"; - /** * @typedef {import('./types.d.ts').StatsCollector} StatsCollector - * @typedef {import('./runner.js')} Runner + * @typedef {import('./runner.cjs')} Runner */ /** @@ -10,16 +8,17 @@ * @module */ -var constants = require("./runner").constants; -var EVENT_TEST_PASS = constants.EVENT_TEST_PASS; -var EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL; -var EVENT_SUITE_BEGIN = constants.EVENT_SUITE_BEGIN; -var EVENT_RUN_BEGIN = constants.EVENT_RUN_BEGIN; -var EVENT_TEST_PENDING = constants.EVENT_TEST_PENDING; -var EVENT_RUN_END = constants.EVENT_RUN_END; -var EVENT_TEST_END = constants.EVENT_TEST_END; +import Runner from "./runner.cjs"; -var Date = global.Date; +const { + EVENT_TEST_PASS, + EVENT_TEST_FAIL, + EVENT_SUITE_BEGIN, + EVENT_RUN_BEGIN, + EVENT_TEST_PENDING, + EVENT_RUN_END, + EVENT_TEST_END, +} = Runner.constants; /** * Provides stats such as test duration, number of tests passed / failed etc., by listening for events emitted by `runner`. @@ -70,4 +69,4 @@ function createStatsCollector(runner) { }); } -module.exports = createStatsCollector; +export { createStatsCollector }; diff --git a/node_modules/mocha/lib/suite.js b/node_modules/mocha/lib/suite.js index a29d71e8..ff78e2b0 100644 --- a/node_modules/mocha/lib/suite.js +++ b/node_modules/mocha/lib/suite.js @@ -1,5 +1,3 @@ -"use strict"; - /** * @typedef {import('./test.js')} Test */ @@ -8,673 +6,665 @@ * Module dependencies. * @private */ -const { EventEmitter } = require("node:events"); -const Hook = require("./hook"); -var { +import { EventEmitter } from "node:events"; +import { Hook } from "./hook.js"; +import utils from "./utils.cjs"; +import debugModule from "debug"; +import milliseconds from "ms"; +import * as errors from "./errors.js"; + +const { assignNewMochaID, clamp, constants: utilsConstants, defineConstants, getMochaID, - inherits, isString, -} = require("./utils"); -const debug = require("debug")("mocha:suite"); -const milliseconds = require("ms"); -const errors = require("./errors"); +} = utils; +const debug = debugModule("mocha:suite"); const { MOCHA_ID_PROP_NAME } = utilsConstants; -/** - * Expose `Suite`. - */ - -exports = module.exports = Suite; - -/** - * Create a new `Suite` with the given `title` and parent `Suite`. - * - * @public - * @param {Suite} parent - Parent suite (required!) - * @param {string} title - Title - * @return {Suite} - */ -Suite.create = function (parent, title) { - var suite = new Suite(title, parent.ctx); - suite.parent = parent; - title = suite.fullTitle(); - parent.addSuite(suite); - return suite; -}; - -/** - * Constructs a new `Suite` instance with the given `title`, `ctx`, and `isRoot`. - * - * @public - * @class - * @extends EventEmitter - * @see {@link https://nodejs.org/api/events.html#events_class_eventemitter|EventEmitter} - * @param {string} title - Suite title. - * @param {Context} parentContext - Parent context instance. - * @param {boolean} [isRoot=false] - Whether this is the root suite. - */ -function Suite(title, parentContext, isRoot) { - if (!isString(title)) { - throw errors.createInvalidArgumentTypeError( - 'Suite argument "title" must be a string. Received type "' + - typeof title + - '"', - "title", - "string", - ); - } - this.title = title; - function Context() {} - Context.prototype = parentContext; - this.ctx = new Context(); - this.suites = []; - this.tests = []; - this.root = isRoot === true; - this.pending = false; - this._retries = -1; - this._beforeEach = []; - this._beforeAll = []; - this._afterEach = []; - this._afterAll = []; - this._timeout = 2000; - this._slow = 75; - this._bail = false; - this._onlyTests = []; - this._onlySuites = []; - assignNewMochaID(this); - - Object.defineProperty(this, "id", { - get() { - return getMochaID(this); +class Suite extends EventEmitter { + static constants = defineConstants( + /** + * {@link Suite}-related constants. + * @public + * @memberof Suite + * @alias constants + * @readonly + * @static + * @enum {string} + */ + { + /** + * Event emitted after a test file has been loaded. Not emitted in browser. + */ + EVENT_FILE_POST_REQUIRE: "post-require", + /** + * Event emitted before a test file has been loaded. In browser, this is emitted once an interface has been selected. + */ + EVENT_FILE_PRE_REQUIRE: "pre-require", + /** + * Event emitted immediately after a test file has been loaded. Not emitted in browser. + */ + EVENT_FILE_REQUIRE: "require", + /** + * Event emitted when `global.run()` is called (use with `delay` option). + */ + EVENT_ROOT_SUITE_RUN: "run", + + /** + * Namespace for collection of a `Suite`'s "after all" hooks. + */ + HOOK_TYPE_AFTER_ALL: "afterAll", + /** + * Namespace for collection of a `Suite`'s "after each" hooks. + */ + HOOK_TYPE_AFTER_EACH: "afterEach", + /** + * Namespace for collection of a `Suite`'s "before all" hooks. + */ + HOOK_TYPE_BEFORE_ALL: "beforeAll", + /** + * Namespace for collection of a `Suite`'s "before each" hooks. + */ + HOOK_TYPE_BEFORE_EACH: "beforeEach", + + /** + * Emitted after a child `Suite` has been added to a `Suite`. + */ + EVENT_SUITE_ADD_SUITE: "suite", + /** + * Emitted after an "after all" `Hook` has been added to a `Suite`. + */ + EVENT_SUITE_ADD_HOOK_AFTER_ALL: "afterAll", + /** + * Emitted after an "after each" `Hook` has been added to a `Suite`. + */ + EVENT_SUITE_ADD_HOOK_AFTER_EACH: "afterEach", + /** + * Emitted after an "before all" `Hook` has been added to a `Suite`. + */ + EVENT_SUITE_ADD_HOOK_BEFORE_ALL: "beforeAll", + /** + * Emitted after an "before each" `Hook` has been added to a `Suite`. + */ + EVENT_SUITE_ADD_HOOK_BEFORE_EACH: "beforeEach", + /** + * Emitted after a `Test` has been added to a `Suite`. + */ + EVENT_SUITE_ADD_TEST: "test", }, - }); - - this.reset(); -} - -/** - * Inherit from `EventEmitter.prototype`. - */ -inherits(Suite, EventEmitter); + ); -/** - * Resets the state initially or for a next run. - */ -Suite.prototype.reset = function () { - this.delayed = false; - function doReset(thingToReset) { - thingToReset.reset(); + /** + * Create a new `Suite` with the given `title` and parent `Suite`. + * + * @public + * @param {Suite} parent - Parent suite (required!) + * @param {string} title - Title + * @return {Suite} + */ + static create(parent, title) { + var suite = new Suite(title, parent.ctx); + suite.parent = parent; + parent.addSuite(suite); + return suite; } - this.suites.forEach(doReset); - this.tests.forEach(doReset); - this._beforeEach.forEach(doReset); - this._afterEach.forEach(doReset); - this._beforeAll.forEach(doReset); - this._afterAll.forEach(doReset); -}; -/** - * Return a clone of this `Suite`. - * - * @private - * @return {Suite} - */ -Suite.prototype.clone = function () { - var suite = new Suite(this.title); - debug("clone"); - suite.ctx = this.ctx; - suite.root = this.root; - suite.timeout(this.timeout()); - suite.retries(this.retries()); - suite.slow(this.slow()); - suite.bail(this.bail()); - return suite; -}; + /** + * Constructs a new `Suite` instance with the given `title`, `ctx`, and `isRoot`. + * + * @public + * @extends EventEmitter + * @see {@link https://nodejs.org/api/events.html#events_class_eventemitter|EventEmitter} + * @param {string} title - Suite title. + * @param {Context} parentContext - Parent context instance. + * @param {boolean} [isRoot=false] - Whether this is the root suite. + */ + constructor(title, parentContext, isRoot) { + if (!isString(title)) { + throw errors.createInvalidArgumentTypeError( + 'Suite argument "title" must be a string. Received type "' + + typeof title + + '"', + "title", + "string", + ); + } + super(); + this.title = title; + function Context() {} + Context.prototype = parentContext; + this.ctx = new Context(); + this.suites = []; + this.tests = []; + this.root = isRoot === true; + this.pending = false; + this._retries = -1; + this._beforeEach = []; + this._beforeAll = []; + this._afterEach = []; + this._afterAll = []; + this._timeout = 2000; + this._slow = 75; + this._bail = false; + this._onlyTests = []; + this._onlySuites = []; + assignNewMochaID(this); + + Object.defineProperty(this, "id", { + get() { + return getMochaID(this); + }, + }); -/** - * Set or get timeout `ms` or short-hand such as "2s". - * - * @private - * @todo Do not attempt to set value if `ms` is undefined - * @param {number|string} ms - * @return {Suite|number} for chaining - */ -Suite.prototype.timeout = function (ms) { - if (!arguments.length) { - return this._timeout; - } - if (typeof ms === "string") { - ms = milliseconds(ms); + this.reset(); } - // Clamp to range - var INT_MAX = Math.pow(2, 31) - 1; - var range = [0, INT_MAX]; - ms = clamp(ms, range); - - debug("timeout %d", ms); - this._timeout = parseInt(ms, 10); - - // Allow overriding inner/nested suites - // See and test-cases with chain-called timeout argument. - // https://github.com/mochajs/mocha/issues/5422 - for (const t of this.tests) { - t.timeout(this._timeout); - } - for (const s of this.suites) { - s.timeout(this._timeout); + /** + * Resets the state initially or for a next run. + */ + reset() { + this.delayed = false; + function doReset(thingToReset) { + thingToReset.reset(); + } + this.suites.forEach(doReset); + this.tests.forEach(doReset); + this._beforeEach.forEach(doReset); + this._afterEach.forEach(doReset); + this._beforeAll.forEach(doReset); + this._afterAll.forEach(doReset); } - return this; -}; -/** - * Set or get number of times to retry a failed test. - * - * @private - * @param {number|string} n - * @return {Suite|number} for chaining - */ -Suite.prototype.retries = function (n) { - if (!arguments.length) { - return this._retries; + /** + * Return a clone of this `Suite`. + * + * @private + * @return {Suite} + */ + clone() { + var suite = new Suite(this.title); + debug("clone"); + suite.ctx = this.ctx; + suite.root = this.root; + suite.timeout(this.timeout()); + suite.retries(this.retries()); + suite.slow(this.slow()); + suite.bail(this.bail()); + return suite; } - debug("retries %d", n); - this._retries = parseInt(n, 10) || 0; - return this; -}; -/** - * Set or get slow `ms` or short-hand such as "2s". - * - * @private - * @param {number|string} ms - * @return {Suite|number} for chaining - */ -Suite.prototype.slow = function (ms) { - if (!arguments.length) { - return this._slow; - } - if (typeof ms === "string") { - ms = milliseconds(ms); - } - debug("slow %d", ms); - this._slow = ms; - return this; -}; + /** + * Set or get timeout `ms` or short-hand such as "2s". + * + * @private + * @todo Do not attempt to set value if `ms` is undefined + * @param {number|string} ms + * @return {Suite|number} for chaining + */ + timeout(ms) { + if (!arguments.length) { + return this._timeout; + } + if (typeof ms === "string") { + ms = milliseconds(ms); + } -/** - * Set or get whether to bail after first error. - * - * @private - * @param {boolean} bail - * @return {Suite|number} for chaining - */ -Suite.prototype.bail = function (bail) { - if (!arguments.length) { - return this._bail; - } - debug("bail %s", bail); - this._bail = bail; - return this; -}; + // Clamp to range + var INT_MAX = Math.pow(2, 31) - 1; + var range = [0, INT_MAX]; + ms = clamp(ms, range); -/** - * Check if this suite or its parent suite is marked as pending. - * - * @private - */ -Suite.prototype.isPending = function () { - return this.pending || (this.parent && this.parent.isPending()); -}; + debug("timeout %d", ms); + this._timeout = parseInt(ms, 10); -/** - * Generic hook-creator. - * @private - * @param {string} title - Title of hook - * @param {Function} fn - Hook callback - * @returns {Hook} A new hook - */ -Suite.prototype._createHook = function (title, fn) { - var hook = new Hook(title, fn); - hook.parent = this; - hook.timeout(this.timeout()); - hook.retries(this.retries()); - hook.slow(this.slow()); - hook.ctx = this.ctx; - hook.file = this.file; - return hook; -}; - -/** - * Run `fn(test[, done])` before running tests. - * - * @private - * @param {string} title - * @param {Function} fn - * @return {Suite} for chaining - */ -Suite.prototype.beforeAll = function (title, fn) { - if (this.isPending()) { + // Allow overriding inner/nested suites + // See and test-cases with chain-called timeout argument. + // https://github.com/mochajs/mocha/issues/5422 + for (const t of this.tests) { + t.timeout(this._timeout); + } + for (const s of this.suites) { + s.timeout(this._timeout); + } return this; } - if (typeof title === "function") { - fn = title; - title = fn.name; - } - title = '"before all" hook' + (title ? ": " + title : ""); - - var hook = this._createHook(title, fn); - this._beforeAll.push(hook); - this.emit(constants.EVENT_SUITE_ADD_HOOK_BEFORE_ALL, hook); - return hook; -}; -/** - * Run `fn(test[, done])` after running tests. - * - * @private - * @param {string} title - * @param {Function} fn - * @return {Suite} for chaining - */ -Suite.prototype.afterAll = function (title, fn) { - if (this.isPending()) { + /** + * Set or get number of times to retry a failed test. + * + * @private + * @param {number|string} n + * @return {Suite|number} for chaining + */ + retries(n) { + if (!arguments.length) { + return this._retries; + } + debug("retries %d", n); + this._retries = parseInt(n, 10) || 0; return this; } - if (typeof title === "function") { - fn = title; - title = fn.name; - } - title = '"after all" hook' + (title ? ": " + title : ""); - - var hook = this._createHook(title, fn); - this._afterAll.push(hook); - this.emit(constants.EVENT_SUITE_ADD_HOOK_AFTER_ALL, hook); - return hook; -}; -/** - * Run `fn(test[, done])` before each test case. - * - * @private - * @param {string} title - * @param {Function} fn - * @return {Suite} for chaining - */ -Suite.prototype.beforeEach = function (title, fn) { - if (this.isPending()) { + /** + * Set or get slow `ms` or short-hand such as "2s". + * + * @private + * @param {number|string} ms + * @return {Suite|number} for chaining + */ + slow(ms) { + if (!arguments.length) { + return this._slow; + } + if (typeof ms === "string") { + ms = milliseconds(ms); + } + debug("slow %d", ms); + this._slow = ms; return this; } - if (typeof title === "function") { - fn = title; - title = fn.name; - } - title = '"before each" hook' + (title ? ": " + title : ""); - - var hook = this._createHook(title, fn); - this._beforeEach.push(hook); - this.emit(constants.EVENT_SUITE_ADD_HOOK_BEFORE_EACH, hook); - return hook; -}; -/** - * Run `fn(test[, done])` after each test case. - * - * @private - * @param {string} title - * @param {Function} fn - * @return {Suite} for chaining - */ -Suite.prototype.afterEach = function (title, fn) { - if (this.isPending()) { + /** + * Set or get whether to bail after first error. + * + * @private + * @param {boolean} bail + * @return {Suite|number} for chaining + */ + bail(bail) { + if (!arguments.length) { + return this._bail; + } + debug("bail %s", bail); + this._bail = bail; return this; } - if (typeof title === "function") { - fn = title; - title = fn.name; + + /** + * Check if this suite or its parent suite is marked as pending. + * + * @private + */ + isPending() { + return this.pending || (this.parent && this.parent.isPending()); } - title = '"after each" hook' + (title ? ": " + title : ""); - var hook = this._createHook(title, fn); - this._afterEach.push(hook); - this.emit(constants.EVENT_SUITE_ADD_HOOK_AFTER_EACH, hook); - return hook; -}; + /** + * Generic hook-creator. + * @private + * @param {string} title - Title of hook + * @param {Function} fn - Hook callback + * @returns {Hook} A new hook + */ + _createHook(title, fn) { + var hook = new Hook(title, fn); + hook.parent = this; + hook.timeout(this.timeout()); + hook.retries(this.retries()); + hook.slow(this.slow()); + hook.ctx = this.ctx; + hook.file = this.file; + return hook; + } -/** - * Add a test `suite`. - * - * @private - * @param {Suite} suite - * @return {Suite} for chaining - */ -Suite.prototype.addSuite = function (suite) { - suite.parent = this; - suite.root = false; - suite.timeout(this.timeout()); - suite.retries(this.retries()); - suite.slow(this.slow()); - suite.bail(this.bail()); - this.suites.push(suite); - this.emit(constants.EVENT_SUITE_ADD_SUITE, suite); - return this; -}; + /** + * Run `fn(test[, done])` before running tests. + * + * @private + * @param {string} title + * @param {Function} fn + * @return {Suite} for chaining + */ + beforeAll(title, fn) { + if (this.isPending()) { + return this; + } + if (typeof title === "function") { + fn = title; + title = fn.name; + } + title = '"before all" hook' + (title ? ": " + title : ""); -/** - * Add a `test` to this suite. - * - * @private - * @param {Test} test - * @return {Suite} for chaining - */ -Suite.prototype.addTest = function (test) { - test.parent = this; - test.timeout(this.timeout()); - test.retries(this.retries()); - test.slow(this.slow()); - test.ctx = this.ctx; - this.tests.push(test); - this.emit(constants.EVENT_SUITE_ADD_TEST, test); - return this; -}; + var hook = this._createHook(title, fn); + this._beforeAll.push(hook); + this.emit(Suite.constants.EVENT_SUITE_ADD_HOOK_BEFORE_ALL, hook); + return hook; + } -/** - * Return the full title generated by recursively concatenating the parent's - * full title. - * - * @memberof Suite - * @public - * @return {string} - */ -Suite.prototype.fullTitle = function () { - return this.titlePath().join(" "); -}; + /** + * Run `fn(test[, done])` after running tests. + * + * @private + * @param {string} title + * @param {Function} fn + * @return {Suite} for chaining + */ + afterAll(title, fn) { + if (this.isPending()) { + return this; + } + if (typeof title === "function") { + fn = title; + title = fn.name; + } + title = '"after all" hook' + (title ? ": " + title : ""); -/** - * Return the title path generated by recursively concatenating the parent's - * title path. - * - * @memberof Suite - * @public - * @return {string[]} - */ -Suite.prototype.titlePath = function () { - var result = []; - if (this.parent) { - result = result.concat(this.parent.titlePath()); + var hook = this._createHook(title, fn); + this._afterAll.push(hook); + this.emit(Suite.constants.EVENT_SUITE_ADD_HOOK_AFTER_ALL, hook); + return hook; } - if (!this.root) { - result.push(this.title); + + /** + * Run `fn(test[, done])` before each test case. + * + * @private + * @param {string} title + * @param {Function} fn + * @return {Suite} for chaining + */ + beforeEach(title, fn) { + if (this.isPending()) { + return this; + } + if (typeof title === "function") { + fn = title; + title = fn.name; + } + title = '"before each" hook' + (title ? ": " + title : ""); + + var hook = this._createHook(title, fn); + this._beforeEach.push(hook); + this.emit(Suite.constants.EVENT_SUITE_ADD_HOOK_BEFORE_EACH, hook); + return hook; } - return result; -}; -/** - * Return the total number of tests. - * - * @memberof Suite - * @public - * @return {number} - */ -Suite.prototype.total = function () { - return ( - this.suites.reduce(function (sum, suite) { - return sum + suite.total(); - }, 0) + this.tests.length - ); -}; + /** + * Run `fn(test[, done])` after each test case. + * + * @private + * @param {string} title + * @param {Function} fn + * @return {Suite} for chaining + */ + afterEach(title, fn) { + if (this.isPending()) { + return this; + } + if (typeof title === "function") { + fn = title; + title = fn.name; + } + title = '"after each" hook' + (title ? ": " + title : ""); -/** - * Iterates through each suite recursively to find all tests. Applies a - * function in the format `fn(test)`. - * - * @private - * @param {Function} fn - * @return {Suite} - */ -Suite.prototype.eachTest = function (fn) { - this.tests.forEach(fn); - this.suites.forEach(function (suite) { - suite.eachTest(fn); - }); - return this; -}; + var hook = this._createHook(title, fn); + this._afterEach.push(hook); + this.emit(Suite.constants.EVENT_SUITE_ADD_HOOK_AFTER_EACH, hook); + return hook; + } -/** - * This will run the root suite if we happen to be running in delayed mode. - * @private - */ -Suite.prototype.run = function run() { - if (this.root) { - this.emit(constants.EVENT_ROOT_SUITE_RUN); + /** + * Add a test `suite`. + * + * @private + * @param {Suite} suite + * @return {Suite} for chaining + */ + addSuite(suite) { + suite.parent = this; + suite.root = false; + suite.timeout(this.timeout()); + suite.retries(this.retries()); + suite.slow(this.slow()); + suite.bail(this.bail()); + this.suites.push(suite); + this.emit(Suite.constants.EVENT_SUITE_ADD_SUITE, suite); + return this; } -}; -/** - * Determines whether a suite has an `only` test or suite as a descendant. - * - * @private - * @returns {Boolean} - */ -Suite.prototype.hasOnly = function hasOnly() { - return ( - this._onlyTests.length > 0 || - this._onlySuites.length > 0 || - this.suites.some(function (suite) { - return suite.hasOnly(); - }) - ); -}; + /** + * Add a `test` to this suite. + * + * @private + * @param {Test} test + * @return {Suite} for chaining + */ + addTest(test) { + test.parent = this; + test.timeout(this.timeout()); + test.retries(this.retries()); + test.slow(this.slow()); + test.ctx = this.ctx; + this.tests.push(test); + this.emit(Suite.constants.EVENT_SUITE_ADD_TEST, test); + return this; + } -/** - * Filter suites based on `isOnly` logic. - * - * @private - * @returns {Boolean} - */ -Suite.prototype.filterOnly = function filterOnly() { - if (this._onlyTests.length) { - // If the suite contains `only` tests, run those and ignore any nested suites. - this.tests = this._onlyTests; - this.suites = []; - } else { - // Otherwise, do not run any of the tests in this suite. - this.tests = []; - this._onlySuites.forEach(function (onlySuite) { - // If there are other `only` tests/suites nested in the current `only` suite, then filter that `only` suite. - // Otherwise, all of the tests on this `only` suite should be run, so don't filter it. - if (onlySuite.hasOnly()) { - onlySuite.filterOnly(); - } - }); - // Run the `only` suites, as well as any other suites that have `only` tests/suites as descendants. - var onlySuites = this._onlySuites; - this.suites = this.suites.filter(function (childSuite) { - return onlySuites.indexOf(childSuite) !== -1 || childSuite.filterOnly(); - }); + /** + * Return the full title generated by recursively concatenating the parent's + * full title. + * + * @memberof Suite + * @public + * @return {string} + */ + fullTitle() { + return this.titlePath().join(" "); } - // Keep the suite only if there is something to run - return this.tests.length > 0 || this.suites.length > 0; -}; -/** - * Adds a suite to the list of subsuites marked `only`. - * - * @private - * @param {Suite} suite - */ -Suite.prototype.appendOnlySuite = function (suite) { - this._onlySuites.push(suite); -}; + /** + * Return the title path generated by recursively concatenating the parent's + * title path. + * + * @memberof Suite + * @public + * @return {string[]} + */ + titlePath() { + var result = []; + if (this.parent) { + result = result.concat(this.parent.titlePath()); + } + if (!this.root) { + result.push(this.title); + } + return result; + } -/** - * Marks a suite to be `only`. - * - * @private - */ -Suite.prototype.markOnly = function () { - this.parent && this.parent.appendOnlySuite(this); -}; + /** + * Return the total number of tests. + * + * @memberof Suite + * @public + * @return {number} + */ + total() { + return ( + this.suites.reduce(function (sum, suite) { + return sum + suite.total(); + }, 0) + this.tests.length + ); + } -/** - * Adds a test to the list of tests marked `only`. - * - * @private - * @param {Test} test - */ -Suite.prototype.appendOnlyTest = function (test) { - this._onlyTests.push(test); -}; + /** + * Iterates through each suite recursively to find all tests. Applies a + * function in the format `fn(test)`. + * + * @private + * @param {Function} fn + * @return {Suite} + */ + eachTest(fn) { + this.tests.forEach(fn); + this.suites.forEach(function (suite) { + suite.eachTest(fn); + }); + return this; + } -/** - * Returns the array of hooks by hook name; see `HOOK_TYPE_*` constants. - * @private - */ -Suite.prototype.getHooks = function getHooks(name) { - return this["_" + name]; -}; + /** + * This will run the root suite if we happen to be running in delayed mode. + * @private + */ + run() { + if (this.root) { + this.emit(Suite.constants.EVENT_ROOT_SUITE_RUN); + } + } -/** - * cleans all references from this suite and all child suites. - */ -Suite.prototype.dispose = function () { - this.suites.forEach(function (suite) { - suite.dispose(); - }); - this.cleanReferences(); -}; + /** + * Determines whether a suite has an `only` test or suite as a descendant. + * + * @private + * @returns {Boolean} + */ + hasOnly() { + return ( + this._onlyTests.length > 0 || + this._onlySuites.length > 0 || + this.suites.some(function (suite) { + return suite.hasOnly(); + }) + ); + } -/** - * Cleans up the references to all the deferred functions - * (before/after/beforeEach/afterEach) and tests of a Suite. - * These must be deleted otherwise a memory leak can happen, - * as those functions may reference variables from closures, - * thus those variables can never be garbage collected as long - * as the deferred functions exist. - * - * @private - */ -Suite.prototype.cleanReferences = function cleanReferences() { - function cleanArrReferences(arr) { - for (var i = 0; i < arr.length; i++) { - delete arr[i].fn; + /** + * Filter suites based on `isOnly` logic. + * + * @private + * @returns {Boolean} + */ + filterOnly() { + if (this._onlyTests.length) { + // If the suite contains `only` tests, run those and ignore any nested suites. + this.tests = this._onlyTests; + this.suites = []; + } else { + // Otherwise, do not run any of the tests in this suite. + this.tests = []; + this._onlySuites.forEach(function (onlySuite) { + // If there are other `only` tests/suites nested in the current `only` suite, then filter that `only` suite. + // Otherwise, all of the tests on this `only` suite should be run, so don't filter it. + if (onlySuite.hasOnly()) { + onlySuite.filterOnly(); + } + }); + // Run the `only` suites, as well as any other suites that have `only` tests/suites as descendants. + var onlySuites = this._onlySuites; + this.suites = this.suites.filter(function (childSuite) { + return onlySuites.indexOf(childSuite) !== -1 || childSuite.filterOnly(); + }); } + // Keep the suite only if there is something to run + return this.tests.length > 0 || this.suites.length > 0; } - if (Array.isArray(this._beforeAll)) { - cleanArrReferences(this._beforeAll); + /** + * Adds a suite to the list of subsuites marked `only`. + * + * @private + * @param {Suite} suite + */ + appendOnlySuite(suite) { + this._onlySuites.push(suite); } - if (Array.isArray(this._beforeEach)) { - cleanArrReferences(this._beforeEach); + /** + * Marks a suite to be `only`. + * + * @private + */ + markOnly() { + this.parent && this.parent.appendOnlySuite(this); } - if (Array.isArray(this._afterAll)) { - cleanArrReferences(this._afterAll); + /** + * Adds a test to the list of tests marked `only`. + * + * @private + * @param {Test} test + */ + appendOnlyTest(test) { + this._onlyTests.push(test); } - if (Array.isArray(this._afterEach)) { - cleanArrReferences(this._afterEach); + /** + * Returns the array of hooks by hook name; see `HOOK_TYPE_*` constants. + * @private + */ + getHooks(name) { + return this["_" + name]; } - for (var i = 0; i < this.tests.length; i++) { - delete this.tests[i].fn; + /** + * cleans all references from this suite and all child suites. + */ + dispose() { + this.suites.forEach(function (suite) { + suite.dispose(); + }); + this.cleanReferences(); } -}; -/** - * Returns an object suitable for IPC. - * Functions are represented by keys beginning with `$$`. - * @private - * @returns {Object} - */ -Suite.prototype.serialize = function serialize() { - return { - _bail: this._bail, - $$fullTitle: this.fullTitle(), - $$isPending: Boolean(this.isPending()), - root: this.root, - title: this.title, - [MOCHA_ID_PROP_NAME]: this.id, - parent: this.parent ? { [MOCHA_ID_PROP_NAME]: this.parent.id } : null, - }; -}; - -var constants = defineConstants( /** - * {@link Suite}-related constants. - * @public - * @memberof Suite - * @alias constants - * @readonly - * @static - * @enum {string} + * Cleans up the references to all the deferred functions + * (before/after/beforeEach/afterEach) and tests of a Suite. + * These must be deleted otherwise a memory leak can happen, + * as those functions may reference variables from closures, + * thus those variables can never be garbage collected as long + * as the deferred functions exist. + * + * @private */ - { - /** - * Event emitted after a test file has been loaded. Not emitted in browser. - */ - EVENT_FILE_POST_REQUIRE: "post-require", - /** - * Event emitted before a test file has been loaded. In browser, this is emitted once an interface has been selected. - */ - EVENT_FILE_PRE_REQUIRE: "pre-require", - /** - * Event emitted immediately after a test file has been loaded. Not emitted in browser. - */ - EVENT_FILE_REQUIRE: "require", - /** - * Event emitted when `global.run()` is called (use with `delay` option). - */ - EVENT_ROOT_SUITE_RUN: "run", + cleanReferences() { + function cleanArrReferences(arr) { + for (var i = 0; i < arr.length; i++) { + delete arr[i].fn; + } + } - /** - * Namespace for collection of a `Suite`'s "after all" hooks. - */ - HOOK_TYPE_AFTER_ALL: "afterAll", - /** - * Namespace for collection of a `Suite`'s "after each" hooks. - */ - HOOK_TYPE_AFTER_EACH: "afterEach", - /** - * Namespace for collection of a `Suite`'s "before all" hooks. - */ - HOOK_TYPE_BEFORE_ALL: "beforeAll", - /** - * Namespace for collection of a `Suite`'s "before each" hooks. - */ - HOOK_TYPE_BEFORE_EACH: "beforeEach", + if (Array.isArray(this._beforeAll)) { + cleanArrReferences(this._beforeAll); + } - /** - * Emitted after a child `Suite` has been added to a `Suite`. - */ - EVENT_SUITE_ADD_SUITE: "suite", - /** - * Emitted after an "after all" `Hook` has been added to a `Suite`. - */ - EVENT_SUITE_ADD_HOOK_AFTER_ALL: "afterAll", - /** - * Emitted after an "after each" `Hook` has been added to a `Suite`. - */ - EVENT_SUITE_ADD_HOOK_AFTER_EACH: "afterEach", - /** - * Emitted after an "before all" `Hook` has been added to a `Suite`. - */ - EVENT_SUITE_ADD_HOOK_BEFORE_ALL: "beforeAll", - /** - * Emitted after an "before each" `Hook` has been added to a `Suite`. - */ - EVENT_SUITE_ADD_HOOK_BEFORE_EACH: "beforeEach", - /** - * Emitted after a `Test` has been added to a `Suite`. - */ - EVENT_SUITE_ADD_TEST: "test", - }, -); + if (Array.isArray(this._beforeEach)) { + cleanArrReferences(this._beforeEach); + } + + if (Array.isArray(this._afterAll)) { + cleanArrReferences(this._afterAll); + } + + if (Array.isArray(this._afterEach)) { + cleanArrReferences(this._afterEach); + } + + for (var i = 0; i < this.tests.length; i++) { + delete this.tests[i].fn; + } + } + + /** + * Returns an object suitable for IPC. + * Functions are represented by keys beginning with `$$`. + * @private + * @returns {Object} + */ + serialize() { + return { + _bail: this._bail, + $$fullTitle: this.fullTitle(), + $$isPending: Boolean(this.isPending()), + root: this.root, + title: this.title, + [MOCHA_ID_PROP_NAME]: this.id, + parent: this.parent ? { [MOCHA_ID_PROP_NAME]: this.parent.id } : null, + }; + } +} -Suite.constants = constants; +export { Suite }; diff --git a/node_modules/mocha/lib/test.js b/node_modules/mocha/lib/test.js index 8997b48b..de69a082 100644 --- a/node_modules/mocha/lib/test.js +++ b/node_modules/mocha/lib/test.js @@ -1,113 +1,107 @@ -"use strict"; -var Runnable = require("./runnable"); -var utils = require("./utils"); -var errors = require("./errors"); -var createInvalidArgumentTypeError = errors.createInvalidArgumentTypeError; -var isString = utils.isString; +import { Runnable } from "./runnable.js"; +import utils from "./utils.cjs"; +import { createInvalidArgumentTypeError } from "./errors.js"; +const { isString } = utils; const { MOCHA_ID_PROP_NAME } = utils.constants; -module.exports = Test; - -/** - * Initialize a new `Test` with the given `title` and callback `fn`. - * - * @public - * @class - * @extends Runnable - * @param {String} title - Test title (required) - * @param {Function} [fn] - Test callback. If omitted, the Test is considered "pending" - */ -function Test(title, fn) { - if (!isString(title)) { - throw createInvalidArgumentTypeError( - 'Test argument "title" should be a string. Received type "' + - typeof title + - '"', - "title", - "string", - ); +class Test extends Runnable { + /** + * Initialize a new `Test` with the given `title` and callback `fn`. + * + * @public + * @extends Runnable + * @param {String} title - Test title (required) + * @param {Function} [fn] - Test callback. If omitted, the Test is considered "pending" + */ + constructor(title, fn) { + if (!isString(title)) { + throw createInvalidArgumentTypeError( + 'Test argument "title" should be a string. Received type "' + + typeof title + + '"', + "title", + "string", + ); + } + super(title, fn); + this.type = "test"; + this.reset(); } - this.type = "test"; - Runnable.call(this, title, fn); - this.reset(); -} -/** - * Inherit from `Runnable.prototype`. - */ -utils.inherits(Test, Runnable); + /** + * Resets the state initially or for a next run. + */ + reset() { + super.reset(); + this.pending = !this.fn; + delete this.state; + } -/** - * Resets the state initially or for a next run. - */ -Test.prototype.reset = function () { - Runnable.prototype.reset.call(this); - this.pending = !this.fn; - delete this.state; -}; + /** + * Set or get retried test + * + * @private + */ + retriedTest(n) { + if (!arguments.length) { + return this._retriedTest; + } + this._retriedTest = n; + } -/** - * Set or get retried test - * - * @private - */ -Test.prototype.retriedTest = function (n) { - if (!arguments.length) { - return this._retriedTest; + /** + * Add test to the list of tests marked `only`. + * + * @private + */ + markOnly() { + this.parent.appendOnlyTest(this); } - this._retriedTest = n; -}; -/** - * Add test to the list of tests marked `only`. - * - * @private - */ -Test.prototype.markOnly = function () { - this.parent.appendOnlyTest(this); -}; + clone() { + var test = new Test(this.title, this.fn); + test.timeout(this.timeout()); + test.slow(this.slow()); + test.retries(this.retries()); + test.currentRetry(this.currentRetry()); + test.retriedTest(this.retriedTest() || this); + test.globals(this.globals()); + test.parent = this.parent; + test.file = this.file; + test.ctx = this.ctx; + return test; + } -Test.prototype.clone = function () { - var test = new Test(this.title, this.fn); - test.timeout(this.timeout()); - test.slow(this.slow()); - test.retries(this.retries()); - test.currentRetry(this.currentRetry()); - test.retriedTest(this.retriedTest() || this); - test.globals(this.globals()); - test.parent = this.parent; - test.file = this.file; - test.ctx = this.ctx; - return test; -}; + /** + * Returns an minimal object suitable for transmission over IPC. + * Functions are represented by keys beginning with `$$`. + * @private + * @returns {Object} + */ + serialize() { + return { + $$currentRetry: this._currentRetry, + $$fullTitle: this.fullTitle(), + $$isPending: Boolean(this.pending), + $$retriedTest: this._retriedTest || null, + $$slow: this._slow, + $$titlePath: this.titlePath(), + body: this.body, + duration: this.duration, + err: this.err, + parent: { + $$fullTitle: this.parent.fullTitle(), + [MOCHA_ID_PROP_NAME]: this.parent.id, + }, + speed: this.speed, + state: this.state, + title: this.title, + type: this.type, + file: this.file, + [MOCHA_ID_PROP_NAME]: this.id, + }; + } +} -/** - * Returns an minimal object suitable for transmission over IPC. - * Functions are represented by keys beginning with `$$`. - * @private - * @returns {Object} - */ -Test.prototype.serialize = function serialize() { - return { - $$currentRetry: this._currentRetry, - $$fullTitle: this.fullTitle(), - $$isPending: Boolean(this.pending), - $$retriedTest: this._retriedTest || null, - $$slow: this._slow, - $$titlePath: this.titlePath(), - body: this.body, - duration: this.duration, - err: this.err, - parent: { - $$fullTitle: this.parent.fullTitle(), - [MOCHA_ID_PROP_NAME]: this.parent.id, - }, - speed: this.speed, - state: this.state, - title: this.title, - type: this.type, - file: this.file, - [MOCHA_ID_PROP_NAME]: this.id, - }; -}; +export { Test }; diff --git a/node_modules/mocha/lib/utils.js b/node_modules/mocha/lib/utils.cjs similarity index 87% rename from node_modules/mocha/lib/utils.js rename to node_modules/mocha/lib/utils.cjs index d3a928b8..dbfd97f9 100644 --- a/node_modules/mocha/lib/utils.js +++ b/node_modules/mocha/lib/utils.cjs @@ -9,21 +9,36 @@ * Module dependencies. */ var path = require("node:path"); -var util = require("node:util"); -var he = require("he"); +var pc = require("picocolors"); +var isUnicodeSupported = require("is-unicode-supported")(); const MOCHA_ID_PROP_NAME = "__mocha_id__"; -/** - * Inherit the prototype methods from one constructor into another. - * - * @param {function} ctor - Constructor function which needs to inherit the - * prototype. - * @param {function} superCtor - Constructor function to inherit prototype from. - * @throws {TypeError} if either constructor is null, or if super constructor - * lacks a prototype. - */ -exports.inherits = util.inherits; +function htmlCodePointEscape(codePoint) { + return "&#x" + codePoint.toString(16).toUpperCase() + ";"; +} + +function shouldEscapeHtmlChar(codePoint) { + return ( + (codePoint >= 0x01 && codePoint <= 0x09) || + codePoint === 0x0b || + codePoint === 0x0c || + (codePoint >= 0x0e && codePoint <= 0x1f) || + codePoint === 0x22 || + codePoint === 0x26 || + codePoint === 0x27 || + codePoint === 0x3c || + codePoint === 0x3e || + codePoint === 0x60 || + codePoint === 0x7f || + codePoint === 0x81 || + codePoint === 0x8d || + codePoint === 0x8f || + codePoint === 0x90 || + codePoint === 0x9d || + codePoint >= 0xa0 + ); +} /** * Escape special characters in the given string of html. @@ -33,7 +48,35 @@ exports.inherits = util.inherits; * @return {string} */ exports.escape = function (html) { - return he.encode(String(html), { useNamedReferences: false }); + var string = String(html); + var escaped = ""; + + for (var index = 0; index < string.length; index++) { + var codePoint = string.charCodeAt(index); + + if ( + codePoint >= 0xd800 && + codePoint <= 0xdbff && + index + 1 < string.length + ) { + var low = string.charCodeAt(index + 1); + + if (low >= 0xdc00 && low <= 0xdfff) { + // Decode a UTF-16 surrogate pair into a single Unicode code point. + // See https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae + codePoint = (codePoint - 0xd800) * 0x400 + low - 0xdc00 + 0x10000; + escaped += htmlCodePointEscape(codePoint); + index++; + continue; + } + } + + escaped += shouldEscapeHtmlChar(codePoint) + ? htmlCodePointEscape(codePoint) + : string.charAt(index); + } + + return escaped; }; /** @@ -108,6 +151,7 @@ function emptyRepresentation(value, typeHint) { switch (typeHint) { case "function": return "[Function]"; + case "null-prototype": case "object": return "{}"; case "array": @@ -226,8 +270,7 @@ exports.stringify = function (value) { ).replace(/,(\n|$)/g, "$1"); } - // IE7/IE8 has a bizarre String constructor; needs to be coerced - // into an array and back to obj. + // Boxed String objects (new String("foo")): expand into character-indexed object. if (typeHint === "string" && typeof value === "object") { value = value.split("").reduce(function (acc, char, idx) { acc[idx] = char; @@ -274,11 +317,6 @@ function jsonStringify(object, spaces, depth) { typeof object.length === "number" ? object.length : Object.keys(object).length; - // `.repeat()` polyfill - function repeat(s, n) { - return new Array(n).join(s); - } - function _stringify(val) { switch (canonicalType(val)) { case "null": @@ -327,7 +365,7 @@ function jsonStringify(object, spaces, depth) { --length; str += "\n " + - repeat(" ", space) + + " ".repeat(space - 1) + (Array.isArray(object) ? "" : '"' + i + '": ') + // key _stringify(object[i]) + // value (length ? "," : ""); // comma @@ -336,7 +374,7 @@ function jsonStringify(object, spaces, depth) { return ( str + // [], {} - (str.length !== 1 ? "\n" + repeat(" ", --space) + end : end) + (str.length !== 1 ? "\n" + " ".repeat(Math.max(0, space - 2)) + end : end) ); } @@ -361,9 +399,9 @@ function jsonStringify(object, spaces, depth) { */ exports.canonicalize = function canonicalize(value, stack, typeHint) { var canonicalizedObj; - /* eslint-disable no-unused-vars */ + var prop; - /* eslint-enable no-unused-vars */ + typeHint = typeHint || canonicalType(value); function withStack(value, fn) { stack.push(value); @@ -391,12 +429,12 @@ exports.canonicalize = function canonicalize(value, stack, typeHint) { }); break; case "function": - /* eslint-disable-next-line no-unused-vars, no-unreachable-loop */ + /* eslint-disable-next-line no-unused-vars */ for (prop in value) { canonicalizedObj = {}; break; } - /* eslint-enable guard-for-in */ + if (!canonicalizedObj) { canonicalizedObj = emptyRepresentation(value, typeHint); break; @@ -696,3 +734,24 @@ exports.breakCircularDeps = (inputObj) => { exports.isNumeric = (input) => { return !isNaN(parseFloat(input)); }; + +/** + * Checks if being ran in a CI environment. + * + * This uses the CI env variable, which is set by most popular CI providers. Some + * examples include: + * Github: https://docs.github.com/en/actions/reference/workflows-and-actions/variables + * Gitlab: https://docs.gitlab.com/ci/variables/predefined_variables/ + * CircleCI: https://circleci.com/docs/reference/variables/#built-in-environment-variables + * Bitbucket: https://support.atlassian.com/bitbucket-cloud/docs/variables-and-secrets/ + */ +exports.isCI = () => { + return !!process.env.CI; +}; + +exports.logSymbols = { + info: pc.blue(isUnicodeSupported ? "ℹ" : "i"), + success: pc.green(isUnicodeSupported ? "✔" : "√"), + warning: pc.yellow(isUnicodeSupported ? "⚠" : "‼"), + error: pc.red(isUnicodeSupported ? "✖" : "×"), +}; diff --git a/node_modules/mocha/lib/utils/regexp.js b/node_modules/mocha/lib/utils/regexp.js new file mode 100644 index 00000000..cf3e17cd --- /dev/null +++ b/node_modules/mocha/lib/utils/regexp.js @@ -0,0 +1,14 @@ +// @ts-check + +/** + * Escapes special characters in a string to make it safe for use in regular expressions. + * + * @param {string} value - The string to escape + * @returns {string} The escaped string safe for use in regular expressions + */ +export function escapeRegExp(value) { + // TODO [engine:node@>=24]: Replace with built in RegExp.escape() + return value + .replaceAll(/[|\\{}()[\]^$+*?.]/g, "\\$&") + .replaceAll("-", "\\x2d"); +} diff --git a/node_modules/mocha/mocha.js b/node_modules/mocha/mocha.js index efae9801..1cb74ba3 100644 --- a/node_modules/mocha/mocha.js +++ b/node_modules/mocha/mocha.js @@ -1,194 +1,190 @@ -// mocha@11.8.0 in javascript ES2018 +// mocha@12.0.0 in javascript ES2018 (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.mocha = factory()); })(this, (function () { 'use strict'; - var global$2 = (typeof global !== "undefined" ? global : + var global$1 = (typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}); - var global$1 = (typeof global$2 !== "undefined" ? global$2 : - typeof self !== "undefined" ? self : - typeof window !== "undefined" ? window : {}); - // shim for using process in browser // based off https://github.com/defunctzombie/node-process/blob/master/browser.js - function defaultSetTimout$1() { + function defaultSetTimout() { throw new Error('setTimeout has not been defined'); } - function defaultClearTimeout$1 () { + function defaultClearTimeout () { throw new Error('clearTimeout has not been defined'); } - var cachedSetTimeout$1 = defaultSetTimout$1; - var cachedClearTimeout$1 = defaultClearTimeout$1; + var cachedSetTimeout = defaultSetTimout; + var cachedClearTimeout = defaultClearTimeout; if (typeof global$1.setTimeout === 'function') { - cachedSetTimeout$1 = setTimeout; + cachedSetTimeout = setTimeout; } if (typeof global$1.clearTimeout === 'function') { - cachedClearTimeout$1 = clearTimeout; + cachedClearTimeout = clearTimeout; } - function runTimeout$1(fun) { - if (cachedSetTimeout$1 === setTimeout) { + function runTimeout(fun) { + if (cachedSetTimeout === setTimeout) { //normal enviroments in sane situations return setTimeout(fun, 0); } // if setTimeout wasn't available but was latter defined - if ((cachedSetTimeout$1 === defaultSetTimout$1 || !cachedSetTimeout$1) && setTimeout) { - cachedSetTimeout$1 = setTimeout; + if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { + cachedSetTimeout = setTimeout; return setTimeout(fun, 0); } try { // when when somebody has screwed with setTimeout but no I.E. maddness - return cachedSetTimeout$1(fun, 0); + return cachedSetTimeout(fun, 0); } catch(e){ try { // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally - return cachedSetTimeout$1.call(null, fun, 0); + return cachedSetTimeout.call(null, fun, 0); } catch(e){ // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error - return cachedSetTimeout$1.call(this, fun, 0); + return cachedSetTimeout.call(this, fun, 0); } } } - function runClearTimeout$1(marker) { - if (cachedClearTimeout$1 === clearTimeout) { + function runClearTimeout(marker) { + if (cachedClearTimeout === clearTimeout) { //normal enviroments in sane situations return clearTimeout(marker); } // if clearTimeout wasn't available but was latter defined - if ((cachedClearTimeout$1 === defaultClearTimeout$1 || !cachedClearTimeout$1) && clearTimeout) { - cachedClearTimeout$1 = clearTimeout; + if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { + cachedClearTimeout = clearTimeout; return clearTimeout(marker); } try { // when when somebody has screwed with setTimeout but no I.E. maddness - return cachedClearTimeout$1(marker); + return cachedClearTimeout(marker); } catch (e){ try { // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally - return cachedClearTimeout$1.call(null, marker); + return cachedClearTimeout.call(null, marker); } catch (e){ // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. // Some versions of I.E. have different rules for clearTimeout vs setTimeout - return cachedClearTimeout$1.call(this, marker); + return cachedClearTimeout.call(this, marker); } } } - var queue$1 = []; - var draining$1 = false; - var currentQueue$1; - var queueIndex$1 = -1; + var queue = []; + var draining = false; + var currentQueue; + var queueIndex = -1; - function cleanUpNextTick$1() { - if (!draining$1 || !currentQueue$1) { + function cleanUpNextTick() { + if (!draining || !currentQueue) { return; } - draining$1 = false; - if (currentQueue$1.length) { - queue$1 = currentQueue$1.concat(queue$1); + draining = false; + if (currentQueue.length) { + queue = currentQueue.concat(queue); } else { - queueIndex$1 = -1; + queueIndex = -1; } - if (queue$1.length) { - drainQueue$1(); + if (queue.length) { + drainQueue(); } } - function drainQueue$1() { - if (draining$1) { + function drainQueue() { + if (draining) { return; } - var timeout = runTimeout$1(cleanUpNextTick$1); - draining$1 = true; + var timeout = runTimeout(cleanUpNextTick); + draining = true; - var len = queue$1.length; + var len = queue.length; while(len) { - currentQueue$1 = queue$1; - queue$1 = []; - while (++queueIndex$1 < len) { - if (currentQueue$1) { - currentQueue$1[queueIndex$1].run(); + currentQueue = queue; + queue = []; + while (++queueIndex < len) { + if (currentQueue) { + currentQueue[queueIndex].run(); } } - queueIndex$1 = -1; - len = queue$1.length; + queueIndex = -1; + len = queue.length; } - currentQueue$1 = null; - draining$1 = false; - runClearTimeout$1(timeout); + currentQueue = null; + draining = false; + runClearTimeout(timeout); } - function nextTick$1(fun) { + function nextTick(fun) { var args = new Array(arguments.length - 1); if (arguments.length > 1) { for (var i = 1; i < arguments.length; i++) { args[i - 1] = arguments[i]; } } - queue$1.push(new Item$1(fun, args)); - if (queue$1.length === 1 && !draining$1) { - runTimeout$1(drainQueue$1); + queue.push(new Item(fun, args)); + if (queue.length === 1 && !draining) { + runTimeout(drainQueue); } } // v8 likes predictible objects - function Item$1(fun, array) { + function Item(fun, array) { this.fun = fun; this.array = array; } - Item$1.prototype.run = function () { + Item.prototype.run = function () { this.fun.apply(null, this.array); }; var title$1 = 'browser'; - var platform$1 = 'browser'; - var browser$4 = true; - var env$1 = {}; - var argv$1 = []; - var version$2 = ''; // empty string to avoid regexp issues - var versions$1 = {}; - var release$1 = {}; - var config$1 = {}; - - function noop$1() {} - - var on$1 = noop$1; - var addListener$1 = noop$1; - var once$1 = noop$1; - var off$1 = noop$1; - var removeListener$1 = noop$1; - var removeAllListeners$1 = noop$1; - var emit$1 = noop$1; - - function binding$1(name) { + var platform = 'browser'; + var browser$1 = true; + var env = {}; + var argv = []; + var version = ''; // empty string to avoid regexp issues + var versions = {}; + var release = {}; + var config = {}; + + function noop() {} + + var on$1 = noop; + var addListener = noop; + var once = noop; + var off = noop; + var removeListener = noop; + var removeAllListeners = noop; + var emit = noop; + + function binding(name) { throw new Error('process.binding is not supported'); } - function cwd$1 () { return '/' } - function chdir$1 (dir) { + function cwd () { return '/' } + function chdir (dir) { throw new Error('process.chdir is not supported'); - }function umask$1() { return 0; } + }function umask() { return 0; } // from https://github.com/kumavis/browser-process-hrtime/blob/master/index.js - var performance$1 = global$1.performance || {}; - var performanceNow$1 = - performance$1.now || - performance$1.mozNow || - performance$1.msNow || - performance$1.oNow || - performance$1.webkitNow || + var performance = global$1.performance || {}; + var performanceNow = + performance.now || + performance.mozNow || + performance.msNow || + performance.oNow || + performance.webkitNow || function(){ return (new Date()).getTime() }; // generate timestamp or delta // see http://nodejs.org/api/process.html#process_process_hrtime - function hrtime$1(previousTimestamp){ - var clocktime = performanceNow$1.call(performance$1)*1e-3; + function hrtime(previousTimestamp){ + var clocktime = performanceNow.call(performance)*1e-3; var seconds = Math.floor(clocktime); var nanoseconds = Math.floor((clocktime%1)*1e9); if (previousTimestamp) { @@ -202,44 +198,62 @@ return [seconds,nanoseconds] } - var startTime$1 = new Date(); - function uptime$1() { + var startTime = new Date(); + function uptime() { var currentTime = new Date(); - var dif = currentTime - startTime$1; + var dif = currentTime - startTime; return dif / 1000; } - var process = { - nextTick: nextTick$1, + var browser$1$1 = { + nextTick: nextTick, title: title$1, - browser: browser$4, - env: env$1, - argv: argv$1, - version: version$2, - versions: versions$1, + browser: browser$1, + env: env, + argv: argv, + version: version, + versions: versions, on: on$1, - addListener: addListener$1, - once: once$1, - off: off$1, - removeListener: removeListener$1, - removeAllListeners: removeAllListeners$1, - emit: emit$1, - binding: binding$1, - cwd: cwd$1, - chdir: chdir$1, - umask: umask$1, - hrtime: hrtime$1, - platform: platform$1, - release: release$1, - config: config$1, - uptime: uptime$1 + addListener: addListener, + once: once, + off: off, + removeListener: removeListener, + removeAllListeners: removeAllListeners, + emit: emit, + binding: binding, + cwd: cwd, + chdir: chdir, + umask: umask, + hrtime: hrtime, + platform: platform, + release: release, + config: config, + uptime: uptime }; var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; + function getDefaultExportFromCjs (x) { + return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x; + } + function getAugmentedNamespace(n) { - if (n.__esModule) return n; - var a = Object.defineProperty({}, '__esModule', {value: true}); + if (Object.prototype.hasOwnProperty.call(n, '__esModule')) return n; + var f = n.default; + if (typeof f == "function") { + var a = function a () { + var isInstance = false; + try { + isInstance = this instanceof a; + } catch {} + if (isInstance) { + return Reflect.construct(f, arguments, this.constructor); + } + return f.apply(this, arguments); + }; + a.prototype = f.prototype; + } else a = {}; + Object.defineProperty(a, '__esModule', {value: true}); Object.keys(n).forEach(function (k) { var d = Object.getOwnPropertyDescriptor(n, k); Object.defineProperty(a, k, d.get ? d : { @@ -252,10 +266,6 @@ return a; } - function commonjsRequire (path) { - throw new Error('Could not dynamically require "' + path + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.'); - } - var domain; // This constructor is used to store event handlers. Instantiating this is @@ -264,29 +274,31 @@ function EventHandlers() {} EventHandlers.prototype = Object.create(null); - function EventEmitter$2() { - EventEmitter$2.init.call(this); + function EventEmitter() { + EventEmitter.init.call(this); } // nodejs oddity // require('events') === require('events').EventEmitter - EventEmitter$2.EventEmitter = EventEmitter$2; + EventEmitter.EventEmitter = EventEmitter; - EventEmitter$2.usingDomains = false; + EventEmitter.usingDomains = false; - EventEmitter$2.prototype.domain = undefined; - EventEmitter$2.prototype._events = undefined; - EventEmitter$2.prototype._maxListeners = undefined; + EventEmitter.prototype.domain = undefined; + EventEmitter.prototype._events = undefined; + EventEmitter.prototype._maxListeners = undefined; // By default EventEmitters will print a warning if more than 10 listeners are // added to it. This is a useful default which helps finding memory leaks. - EventEmitter$2.defaultMaxListeners = 10; + EventEmitter.defaultMaxListeners = 10; - EventEmitter$2.init = function() { + EventEmitter.init = function() { this.domain = null; - if (EventEmitter$2.usingDomains) { + if (EventEmitter.usingDomains) { // if there is an active domain, then attach to it. - if (domain.active ) ; + if (domain.active && !(this instanceof domain.Domain)) { + this.domain = domain.active; + } } if (!this._events || this._events === Object.getPrototypeOf(this)._events) { @@ -299,7 +311,7 @@ // Obviously not all Emitters should be limited to 10. This function allows // that to be increased. Set to zero for unlimited. - EventEmitter$2.prototype.setMaxListeners = function setMaxListeners(n) { + EventEmitter.prototype.setMaxListeners = function setMaxListeners(n) { if (typeof n !== 'number' || n < 0 || isNaN(n)) throw new TypeError('"n" argument must be a positive number'); this._maxListeners = n; @@ -308,11 +320,11 @@ function $getMaxListeners(that) { if (that._maxListeners === undefined) - return EventEmitter$2.defaultMaxListeners; + return EventEmitter.defaultMaxListeners; return that._maxListeners; } - EventEmitter$2.prototype.getMaxListeners = function getMaxListeners() { + EventEmitter.prototype.getMaxListeners = function getMaxListeners() { return $getMaxListeners(this); }; @@ -373,7 +385,7 @@ } } - EventEmitter$2.prototype.emit = function emit(type) { + EventEmitter.prototype.emit = function emit(type) { var er, handler, len, args, i, events, domain; var doError = (type === 'error'); @@ -494,23 +506,23 @@ w.emitter = target; w.type = type; w.count = existing.length; - emitWarning$1(w); + emitWarning(w); } } } return target; } - function emitWarning$1(e) { + function emitWarning(e) { typeof console.warn === 'function' ? console.warn(e) : console.log(e); } - EventEmitter$2.prototype.addListener = function addListener(type, listener) { + EventEmitter.prototype.addListener = function addListener(type, listener) { return _addListener(this, type, listener, false); }; - EventEmitter$2.prototype.on = EventEmitter$2.prototype.addListener; + EventEmitter.prototype.on = EventEmitter.prototype.addListener; - EventEmitter$2.prototype.prependListener = + EventEmitter.prototype.prependListener = function prependListener(type, listener) { return _addListener(this, type, listener, true); }; @@ -528,14 +540,14 @@ return g; } - EventEmitter$2.prototype.once = function once(type, listener) { + EventEmitter.prototype.once = function once(type, listener) { if (typeof listener !== 'function') throw new TypeError('"listener" argument must be a function'); this.on(type, _onceWrap(this, type, listener)); return this; }; - EventEmitter$2.prototype.prependOnceListener = + EventEmitter.prototype.prependOnceListener = function prependOnceListener(type, listener) { if (typeof listener !== 'function') throw new TypeError('"listener" argument must be a function'); @@ -544,7 +556,7 @@ }; // emits a 'removeListener' event iff the listener was removed - EventEmitter$2.prototype.removeListener = + EventEmitter.prototype.removeListener = function removeListener(type, listener) { var list, events, position, i, originalListener; @@ -603,11 +615,11 @@ // Alias for removeListener added in NodeJS 10.0 // https://nodejs.org/api/events.html#events_emitter_off_eventname_listener - EventEmitter$2.prototype.off = function(type, listener){ + EventEmitter.prototype.off = function(type, listener){ return this.removeListener(type, listener); }; - EventEmitter$2.prototype.removeAllListeners = + EventEmitter.prototype.removeAllListeners = function removeAllListeners(type) { var listeners, events; @@ -657,7 +669,7 @@ return this; }; - EventEmitter$2.prototype.listeners = function listeners(type) { + EventEmitter.prototype.listeners = function listeners(type) { var evlistener; var ret; var events = this._events; @@ -677,7 +689,7 @@ return ret; }; - EventEmitter$2.listenerCount = function(emitter, type) { + EventEmitter.listenerCount = function(emitter, type) { if (typeof emitter.listenerCount === 'function') { return emitter.listenerCount(type); } else { @@ -685,7 +697,7 @@ } }; - EventEmitter$2.prototype.listenerCount = listenerCount$1; + EventEmitter.prototype.listenerCount = listenerCount$1; function listenerCount$1(type) { var events = this._events; @@ -702,7 +714,7 @@ return 0; } - EventEmitter$2.prototype.eventNames = function eventNames() { + EventEmitter.prototype.eventNames = function eventNames() { return this._eventsCount > 0 ? Reflect.ownKeys(this._events) : []; }; @@ -730,29 +742,29 @@ var _polyfillNode_events = /*#__PURE__*/Object.freeze({ __proto__: null, - 'default': EventEmitter$2, - EventEmitter: EventEmitter$2 + EventEmitter: EventEmitter, + default: EventEmitter }); - var lookup$1 = []; - var revLookup$1 = []; - var Arr$1 = typeof Uint8Array !== 'undefined' ? Uint8Array : Array; - var inited$1 = false; - function init$1 () { - inited$1 = true; + var lookup = []; + var revLookup = []; + var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array; + var inited = false; + function init () { + inited = true; var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; for (var i = 0, len = code.length; i < len; ++i) { - lookup$1[i] = code[i]; - revLookup$1[code.charCodeAt(i)] = i; + lookup[i] = code[i]; + revLookup[code.charCodeAt(i)] = i; } - revLookup$1['-'.charCodeAt(0)] = 62; - revLookup$1['_'.charCodeAt(0)] = 63; + revLookup['-'.charCodeAt(0)] = 62; + revLookup['_'.charCodeAt(0)] = 63; } - function toByteArray$1 (b64) { - if (!inited$1) { - init$1(); + function toByteArray (b64) { + if (!inited) { + init(); } var i, j, l, tmp, placeHolders, arr; var len = b64.length; @@ -769,7 +781,7 @@ placeHolders = b64[len - 2] === '=' ? 2 : b64[len - 1] === '=' ? 1 : 0; // base64 is 4/3 + up to two characters of the original data - arr = new Arr$1(len * 3 / 4 - placeHolders); + arr = new Arr(len * 3 / 4 - placeHolders); // if there are placeholders, only get up to the last complete 4 chars l = placeHolders > 0 ? len - 4 : len; @@ -777,17 +789,17 @@ var L = 0; for (i = 0, j = 0; i < l; i += 4, j += 3) { - tmp = (revLookup$1[b64.charCodeAt(i)] << 18) | (revLookup$1[b64.charCodeAt(i + 1)] << 12) | (revLookup$1[b64.charCodeAt(i + 2)] << 6) | revLookup$1[b64.charCodeAt(i + 3)]; + tmp = (revLookup[b64.charCodeAt(i)] << 18) | (revLookup[b64.charCodeAt(i + 1)] << 12) | (revLookup[b64.charCodeAt(i + 2)] << 6) | revLookup[b64.charCodeAt(i + 3)]; arr[L++] = (tmp >> 16) & 0xFF; arr[L++] = (tmp >> 8) & 0xFF; arr[L++] = tmp & 0xFF; } if (placeHolders === 2) { - tmp = (revLookup$1[b64.charCodeAt(i)] << 2) | (revLookup$1[b64.charCodeAt(i + 1)] >> 4); + tmp = (revLookup[b64.charCodeAt(i)] << 2) | (revLookup[b64.charCodeAt(i + 1)] >> 4); arr[L++] = tmp & 0xFF; } else if (placeHolders === 1) { - tmp = (revLookup$1[b64.charCodeAt(i)] << 10) | (revLookup$1[b64.charCodeAt(i + 1)] << 4) | (revLookup$1[b64.charCodeAt(i + 2)] >> 2); + tmp = (revLookup[b64.charCodeAt(i)] << 10) | (revLookup[b64.charCodeAt(i + 1)] << 4) | (revLookup[b64.charCodeAt(i + 2)] >> 2); arr[L++] = (tmp >> 8) & 0xFF; arr[L++] = tmp & 0xFF; } @@ -795,23 +807,23 @@ return arr } - function tripletToBase64$1 (num) { - return lookup$1[num >> 18 & 0x3F] + lookup$1[num >> 12 & 0x3F] + lookup$1[num >> 6 & 0x3F] + lookup$1[num & 0x3F] + function tripletToBase64 (num) { + return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F] } - function encodeChunk$1 (uint8, start, end) { + function encodeChunk (uint8, start, end) { var tmp; var output = []; for (var i = start; i < end; i += 3) { tmp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2]); - output.push(tripletToBase64$1(tmp)); + output.push(tripletToBase64(tmp)); } return output.join('') } - function fromByteArray$1 (uint8) { - if (!inited$1) { - init$1(); + function fromByteArray (uint8) { + if (!inited) { + init(); } var tmp; var len = uint8.length; @@ -822,20 +834,20 @@ // go through the array every three bytes, we'll deal with trailing stuff later for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) { - parts.push(encodeChunk$1(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength))); + parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength))); } // pad the end with zeros, but make sure to not forget the extra bytes if (extraBytes === 1) { tmp = uint8[len - 1]; - output += lookup$1[tmp >> 2]; - output += lookup$1[(tmp << 4) & 0x3F]; + output += lookup[tmp >> 2]; + output += lookup[(tmp << 4) & 0x3F]; output += '=='; } else if (extraBytes === 2) { tmp = (uint8[len - 2] << 8) + (uint8[len - 1]); - output += lookup$1[tmp >> 10]; - output += lookup$1[(tmp >> 4) & 0x3F]; - output += lookup$1[(tmp << 2) & 0x3F]; + output += lookup[tmp >> 10]; + output += lookup[(tmp >> 4) & 0x3F]; + output += lookup[(tmp << 2) & 0x3F]; output += '='; } @@ -844,7 +856,7 @@ return parts.join('') } - function read$1 (buffer, offset, isLE, mLen, nBytes) { + function read (buffer, offset, isLE, mLen, nBytes) { var e, m; var eLen = nBytes * 8 - mLen - 1; var eMax = (1 << eLen) - 1; @@ -877,7 +889,7 @@ return (s ? -1 : 1) * m * Math.pow(2, e - mLen) } - function write$1 (buffer, value, offset, isLE, mLen, nBytes) { + function write (buffer, value, offset, isLE, mLen, nBytes) { var e, m, c; var eLen = nBytes * 8 - mLen - 1; var eMax = (1 << eLen) - 1; @@ -929,10 +941,10 @@ buffer[offset + i - d] |= s * 128; } - var toString$2 = {}.toString; + var toString$1 = {}.toString; - var isArray$2 = Array.isArray || function (arr) { - return toString$2.call(arr) == '[object Array]'; + var isArray$1 = Array.isArray || function (arr) { + return toString$1.call(arr) == '[object Array]'; }; /*! @@ -941,8 +953,10 @@ * @author Feross Aboukhadijeh * @license MIT */ + /* eslint-disable no-proto */ - var INSPECT_MAX_BYTES$1 = 50; + + var INSPECT_MAX_BYTES = 50; /** * If `Buffer.TYPED_ARRAY_SUPPORT`: @@ -968,33 +982,33 @@ * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they * get the Object implementation, which is slower but behaves correctly. */ - Buffer$1.TYPED_ARRAY_SUPPORT = global$2.TYPED_ARRAY_SUPPORT !== undefined - ? global$2.TYPED_ARRAY_SUPPORT + Buffer.TYPED_ARRAY_SUPPORT = global$1.TYPED_ARRAY_SUPPORT !== undefined + ? global$1.TYPED_ARRAY_SUPPORT : true; /* * Export kMaxLength after typed array support is determined. */ - kMaxLength$1(); + kMaxLength(); - function kMaxLength$1 () { - return Buffer$1.TYPED_ARRAY_SUPPORT + function kMaxLength () { + return Buffer.TYPED_ARRAY_SUPPORT ? 0x7fffffff : 0x3fffffff } - function createBuffer$1 (that, length) { - if (kMaxLength$1() < length) { + function createBuffer (that, length) { + if (kMaxLength() < length) { throw new RangeError('Invalid typed array length') } - if (Buffer$1.TYPED_ARRAY_SUPPORT) { + if (Buffer.TYPED_ARRAY_SUPPORT) { // Return an augmented `Uint8Array` instance, for best performance that = new Uint8Array(length); - that.__proto__ = Buffer$1.prototype; + that.__proto__ = Buffer.prototype; } else { // Fallback: Return an object instance of the Buffer class if (that === null) { - that = new Buffer$1(length); + that = new Buffer(length); } that.length = length; } @@ -1012,9 +1026,9 @@ * The `Uint8Array` prototype remains unmodified. */ - function Buffer$1 (arg, encodingOrOffset, length) { - if (!Buffer$1.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer$1)) { - return new Buffer$1(arg, encodingOrOffset, length) + function Buffer (arg, encodingOrOffset, length) { + if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) { + return new Buffer(arg, encodingOrOffset, length) } // Common case. @@ -1024,33 +1038,33 @@ 'If encoding is specified then the first argument must be a string' ) } - return allocUnsafe$1(this, arg) + return allocUnsafe(this, arg) } - return from$1(this, arg, encodingOrOffset, length) + return from(this, arg, encodingOrOffset, length) } - Buffer$1.poolSize = 8192; // not used by this implementation + Buffer.poolSize = 8192; // not used by this implementation // TODO: Legacy, not needed anymore. Remove in next major version. - Buffer$1._augment = function (arr) { - arr.__proto__ = Buffer$1.prototype; + Buffer._augment = function (arr) { + arr.__proto__ = Buffer.prototype; return arr }; - function from$1 (that, value, encodingOrOffset, length) { + function from (that, value, encodingOrOffset, length) { if (typeof value === 'number') { throw new TypeError('"value" argument must not be a number') } if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) { - return fromArrayBuffer$1(that, value, encodingOrOffset, length) + return fromArrayBuffer(that, value, encodingOrOffset, length) } if (typeof value === 'string') { - return fromString$1(that, value, encodingOrOffset) + return fromString(that, value, encodingOrOffset) } - return fromObject$1(that, value) + return fromObject(that, value) } /** @@ -1061,16 +1075,18 @@ * Buffer.from(buffer) * Buffer.from(arrayBuffer[, byteOffset[, length]]) **/ - Buffer$1.from = function (value, encodingOrOffset, length) { - return from$1(null, value, encodingOrOffset, length) + Buffer.from = function (value, encodingOrOffset, length) { + return from(null, value, encodingOrOffset, length) }; - if (Buffer$1.TYPED_ARRAY_SUPPORT) { - Buffer$1.prototype.__proto__ = Uint8Array.prototype; - Buffer$1.__proto__ = Uint8Array; + if (Buffer.TYPED_ARRAY_SUPPORT) { + Buffer.prototype.__proto__ = Uint8Array.prototype; + Buffer.__proto__ = Uint8Array; + if (typeof Symbol !== 'undefined' && Symbol.species && + Buffer[Symbol.species] === Buffer) ; } - function assertSize$1 (size) { + function assertSize (size) { if (typeof size !== 'number') { throw new TypeError('"size" argument must be a number') } else if (size < 0) { @@ -1078,34 +1094,34 @@ } } - function alloc$1 (that, size, fill, encoding) { - assertSize$1(size); + function alloc (that, size, fill, encoding) { + assertSize(size); if (size <= 0) { - return createBuffer$1(that, size) + return createBuffer(that, size) } if (fill !== undefined) { // Only pay attention to encoding if it's a string. This // prevents accidentally sending in a number that would // be interpretted as a start offset. return typeof encoding === 'string' - ? createBuffer$1(that, size).fill(fill, encoding) - : createBuffer$1(that, size).fill(fill) + ? createBuffer(that, size).fill(fill, encoding) + : createBuffer(that, size).fill(fill) } - return createBuffer$1(that, size) + return createBuffer(that, size) } /** * Creates a new filled Buffer instance. * alloc(size[, fill[, encoding]]) **/ - Buffer$1.alloc = function (size, fill, encoding) { - return alloc$1(null, size, fill, encoding) + Buffer.alloc = function (size, fill, encoding) { + return alloc(null, size, fill, encoding) }; - function allocUnsafe$1 (that, size) { - assertSize$1(size); - that = createBuffer$1(that, size < 0 ? 0 : checked$1(size) | 0); - if (!Buffer$1.TYPED_ARRAY_SUPPORT) { + function allocUnsafe (that, size) { + assertSize(size); + that = createBuffer(that, size < 0 ? 0 : checked(size) | 0); + if (!Buffer.TYPED_ARRAY_SUPPORT) { for (var i = 0; i < size; ++i) { that[i] = 0; } @@ -1116,27 +1132,27 @@ /** * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance. * */ - Buffer$1.allocUnsafe = function (size) { - return allocUnsafe$1(null, size) + Buffer.allocUnsafe = function (size) { + return allocUnsafe(null, size) }; /** * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. */ - Buffer$1.allocUnsafeSlow = function (size) { - return allocUnsafe$1(null, size) + Buffer.allocUnsafeSlow = function (size) { + return allocUnsafe(null, size) }; - function fromString$1 (that, string, encoding) { + function fromString (that, string, encoding) { if (typeof encoding !== 'string' || encoding === '') { encoding = 'utf8'; } - if (!Buffer$1.isEncoding(encoding)) { + if (!Buffer.isEncoding(encoding)) { throw new TypeError('"encoding" must be a valid string encoding') } - var length = byteLength$1(string, encoding) | 0; - that = createBuffer$1(that, length); + var length = byteLength(string, encoding) | 0; + that = createBuffer(that, length); var actual = that.write(string, encoding); @@ -1150,16 +1166,16 @@ return that } - function fromArrayLike$1 (that, array) { - var length = array.length < 0 ? 0 : checked$1(array.length) | 0; - that = createBuffer$1(that, length); + function fromArrayLike (that, array) { + var length = array.length < 0 ? 0 : checked(array.length) | 0; + that = createBuffer(that, length); for (var i = 0; i < length; i += 1) { that[i] = array[i] & 255; } return that } - function fromArrayBuffer$1 (that, array, byteOffset, length) { + function fromArrayBuffer (that, array, byteOffset, length) { array.byteLength; // this throws if `array` is not a valid ArrayBuffer if (byteOffset < 0 || array.byteLength < byteOffset) { @@ -1178,21 +1194,21 @@ array = new Uint8Array(array, byteOffset, length); } - if (Buffer$1.TYPED_ARRAY_SUPPORT) { + if (Buffer.TYPED_ARRAY_SUPPORT) { // Return an augmented `Uint8Array` instance, for best performance that = array; - that.__proto__ = Buffer$1.prototype; + that.__proto__ = Buffer.prototype; } else { // Fallback: Return an object instance of the Buffer class - that = fromArrayLike$1(that, array); + that = fromArrayLike(that, array); } return that } - function fromObject$1 (that, obj) { - if (internalIsBuffer$1(obj)) { - var len = checked$1(obj.length) | 0; - that = createBuffer$1(that, len); + function fromObject (that, obj) { + if (internalIsBuffer(obj)) { + var len = checked(obj.length) | 0; + that = createBuffer(that, len); if (that.length === 0) { return that @@ -1205,36 +1221,36 @@ if (obj) { if ((typeof ArrayBuffer !== 'undefined' && obj.buffer instanceof ArrayBuffer) || 'length' in obj) { - if (typeof obj.length !== 'number' || isnan$1(obj.length)) { - return createBuffer$1(that, 0) + if (typeof obj.length !== 'number' || isnan(obj.length)) { + return createBuffer(that, 0) } - return fromArrayLike$1(that, obj) + return fromArrayLike(that, obj) } - if (obj.type === 'Buffer' && isArray$2(obj.data)) { - return fromArrayLike$1(that, obj.data) + if (obj.type === 'Buffer' && isArray$1(obj.data)) { + return fromArrayLike(that, obj.data) } } throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.') } - function checked$1 (length) { + function checked (length) { // Note: cannot use `length < kMaxLength()` here because that fails when // length is NaN (which is otherwise coerced to zero.) - if (length >= kMaxLength$1()) { + if (length >= kMaxLength()) { throw new RangeError('Attempt to allocate Buffer larger than maximum ' + - 'size: 0x' + kMaxLength$1().toString(16) + ' bytes') + 'size: 0x' + kMaxLength().toString(16) + ' bytes') } return length | 0 } - Buffer$1.isBuffer = isBuffer$2; - function internalIsBuffer$1 (b) { + Buffer.isBuffer = isBuffer$1; + function internalIsBuffer (b) { return !!(b != null && b._isBuffer) } - Buffer$1.compare = function compare (a, b) { - if (!internalIsBuffer$1(a) || !internalIsBuffer$1(b)) { + Buffer.compare = function compare (a, b) { + if (!internalIsBuffer(a) || !internalIsBuffer(b)) { throw new TypeError('Arguments must be Buffers') } @@ -1256,7 +1272,7 @@ return 0 }; - Buffer$1.isEncoding = function isEncoding (encoding) { + Buffer.isEncoding = function isEncoding (encoding) { switch (String(encoding).toLowerCase()) { case 'hex': case 'utf8': @@ -1275,13 +1291,13 @@ } }; - Buffer$1.concat = function concat (list, length) { - if (!isArray$2(list)) { + Buffer.concat = function concat (list, length) { + if (!isArray$1(list)) { throw new TypeError('"list" argument must be an Array of Buffers') } if (list.length === 0) { - return Buffer$1.alloc(0) + return Buffer.alloc(0) } var i; @@ -1292,11 +1308,11 @@ } } - var buffer = Buffer$1.allocUnsafe(length); + var buffer = Buffer.allocUnsafe(length); var pos = 0; for (i = 0; i < list.length; ++i) { var buf = list[i]; - if (!internalIsBuffer$1(buf)) { + if (!internalIsBuffer(buf)) { throw new TypeError('"list" argument must be an Array of Buffers') } buf.copy(buffer, pos); @@ -1305,8 +1321,8 @@ return buffer }; - function byteLength$1 (string, encoding) { - if (internalIsBuffer$1(string)) { + function byteLength (string, encoding) { + if (internalIsBuffer(string)) { return string.length } if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' && @@ -1331,7 +1347,7 @@ case 'utf8': case 'utf-8': case undefined: - return utf8ToBytes$1(string).length + return utf8ToBytes(string).length case 'ucs2': case 'ucs-2': case 'utf16le': @@ -1340,17 +1356,17 @@ case 'hex': return len >>> 1 case 'base64': - return base64ToBytes$1(string).length + return base64ToBytes(string).length default: - if (loweredCase) return utf8ToBytes$1(string).length // assume utf8 + if (loweredCase) return utf8ToBytes(string).length // assume utf8 encoding = ('' + encoding).toLowerCase(); loweredCase = true; } } } - Buffer$1.byteLength = byteLength$1; + Buffer.byteLength = byteLength; - function slowToString$1 (encoding, start, end) { + function slowToString (encoding, start, end) { var loweredCase = false; // No need to verify that "this.length <= MAX_UINT32" since it's a read-only @@ -1390,27 +1406,27 @@ while (true) { switch (encoding) { case 'hex': - return hexSlice$1(this, start, end) + return hexSlice(this, start, end) case 'utf8': case 'utf-8': - return utf8Slice$1(this, start, end) + return utf8Slice(this, start, end) case 'ascii': - return asciiSlice$1(this, start, end) + return asciiSlice(this, start, end) case 'latin1': case 'binary': - return latin1Slice$1(this, start, end) + return latin1Slice(this, start, end) case 'base64': - return base64Slice$1(this, start, end) + return base64Slice(this, start, end) case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': - return utf16leSlice$1(this, start, end) + return utf16leSlice(this, start, end) default: if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) @@ -1422,67 +1438,67 @@ // The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect // Buffer instances. - Buffer$1.prototype._isBuffer = true; + Buffer.prototype._isBuffer = true; - function swap$1 (b, n, m) { + function swap (b, n, m) { var i = b[n]; b[n] = b[m]; b[m] = i; } - Buffer$1.prototype.swap16 = function swap16 () { + Buffer.prototype.swap16 = function swap16 () { var len = this.length; if (len % 2 !== 0) { throw new RangeError('Buffer size must be a multiple of 16-bits') } for (var i = 0; i < len; i += 2) { - swap$1(this, i, i + 1); + swap(this, i, i + 1); } return this }; - Buffer$1.prototype.swap32 = function swap32 () { + Buffer.prototype.swap32 = function swap32 () { var len = this.length; if (len % 4 !== 0) { throw new RangeError('Buffer size must be a multiple of 32-bits') } for (var i = 0; i < len; i += 4) { - swap$1(this, i, i + 3); - swap$1(this, i + 1, i + 2); + swap(this, i, i + 3); + swap(this, i + 1, i + 2); } return this }; - Buffer$1.prototype.swap64 = function swap64 () { + Buffer.prototype.swap64 = function swap64 () { var len = this.length; if (len % 8 !== 0) { throw new RangeError('Buffer size must be a multiple of 64-bits') } for (var i = 0; i < len; i += 8) { - swap$1(this, i, i + 7); - swap$1(this, i + 1, i + 6); - swap$1(this, i + 2, i + 5); - swap$1(this, i + 3, i + 4); + swap(this, i, i + 7); + swap(this, i + 1, i + 6); + swap(this, i + 2, i + 5); + swap(this, i + 3, i + 4); } return this }; - Buffer$1.prototype.toString = function toString () { + Buffer.prototype.toString = function toString () { var length = this.length | 0; if (length === 0) return '' - if (arguments.length === 0) return utf8Slice$1(this, 0, length) - return slowToString$1.apply(this, arguments) + if (arguments.length === 0) return utf8Slice(this, 0, length) + return slowToString.apply(this, arguments) }; - Buffer$1.prototype.equals = function equals (b) { - if (!internalIsBuffer$1(b)) throw new TypeError('Argument must be a Buffer') + Buffer.prototype.equals = function equals (b) { + if (!internalIsBuffer(b)) throw new TypeError('Argument must be a Buffer') if (this === b) return true - return Buffer$1.compare(this, b) === 0 + return Buffer.compare(this, b) === 0 }; - Buffer$1.prototype.inspect = function inspect () { + Buffer.prototype.inspect = function inspect () { var str = ''; - var max = INSPECT_MAX_BYTES$1; + var max = INSPECT_MAX_BYTES; if (this.length > 0) { str = this.toString('hex', 0, max).match(/.{2}/g).join(' '); if (this.length > max) str += ' ... '; @@ -1490,8 +1506,8 @@ return '' }; - Buffer$1.prototype.compare = function compare (target, start, end, thisStart, thisEnd) { - if (!internalIsBuffer$1(target)) { + Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) { + if (!internalIsBuffer(target)) { throw new TypeError('Argument must be a Buffer') } @@ -1558,7 +1574,7 @@ // - byteOffset - an index into `buffer`; will be clamped to an int32 // - encoding - an optional encoding, relevant is val is a string // - dir - true for indexOf, false for lastIndexOf - function bidirectionalIndexOf$1 (buffer, val, byteOffset, encoding, dir) { + function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) { // Empty buffer means no match if (buffer.length === 0) return -1 @@ -1568,8 +1584,8 @@ byteOffset = 0; } else if (byteOffset > 0x7fffffff) { byteOffset = 0x7fffffff; - } else if (byteOffset < -0x80000000) { - byteOffset = -0x80000000; + } else if (byteOffset < -2147483648) { + byteOffset = -2147483648; } byteOffset = +byteOffset; // Coerce to Number. if (isNaN(byteOffset)) { @@ -1589,19 +1605,19 @@ // Normalize val if (typeof val === 'string') { - val = Buffer$1.from(val, encoding); + val = Buffer.from(val, encoding); } // Finally, search either indexOf (if dir is true) or lastIndexOf - if (internalIsBuffer$1(val)) { + if (internalIsBuffer(val)) { // Special case: looking for empty string/buffer always fails if (val.length === 0) { return -1 } - return arrayIndexOf$1(buffer, val, byteOffset, encoding, dir) + return arrayIndexOf(buffer, val, byteOffset, encoding, dir) } else if (typeof val === 'number') { val = val & 0xFF; // Search for a byte value [0-255] - if (Buffer$1.TYPED_ARRAY_SUPPORT && + if (Buffer.TYPED_ARRAY_SUPPORT && typeof Uint8Array.prototype.indexOf === 'function') { if (dir) { return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset) @@ -1609,13 +1625,13 @@ return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset) } } - return arrayIndexOf$1(buffer, [ val ], byteOffset, encoding, dir) + return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir) } throw new TypeError('val must be string, number or Buffer') } - function arrayIndexOf$1 (arr, val, byteOffset, encoding, dir) { + function arrayIndexOf (arr, val, byteOffset, encoding, dir) { var indexSize = 1; var arrLength = arr.length; var valLength = val.length; @@ -1671,19 +1687,19 @@ return -1 } - Buffer$1.prototype.includes = function includes (val, byteOffset, encoding) { + Buffer.prototype.includes = function includes (val, byteOffset, encoding) { return this.indexOf(val, byteOffset, encoding) !== -1 }; - Buffer$1.prototype.indexOf = function indexOf (val, byteOffset, encoding) { - return bidirectionalIndexOf$1(this, val, byteOffset, encoding, true) + Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) { + return bidirectionalIndexOf(this, val, byteOffset, encoding, true) }; - Buffer$1.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) { - return bidirectionalIndexOf$1(this, val, byteOffset, encoding, false) + Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) { + return bidirectionalIndexOf(this, val, byteOffset, encoding, false) }; - function hexWrite$1 (buf, string, offset, length) { + function hexWrite (buf, string, offset, length) { offset = Number(offset) || 0; var remaining = buf.length - offset; if (!length) { @@ -1710,27 +1726,27 @@ return i } - function utf8Write$1 (buf, string, offset, length) { - return blitBuffer$1(utf8ToBytes$1(string, buf.length - offset), buf, offset, length) + function utf8Write (buf, string, offset, length) { + return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length) } - function asciiWrite$1 (buf, string, offset, length) { - return blitBuffer$1(asciiToBytes$1(string), buf, offset, length) + function asciiWrite (buf, string, offset, length) { + return blitBuffer(asciiToBytes(string), buf, offset, length) } - function latin1Write$1 (buf, string, offset, length) { - return asciiWrite$1(buf, string, offset, length) + function latin1Write (buf, string, offset, length) { + return asciiWrite(buf, string, offset, length) } - function base64Write$1 (buf, string, offset, length) { - return blitBuffer$1(base64ToBytes$1(string), buf, offset, length) + function base64Write (buf, string, offset, length) { + return blitBuffer(base64ToBytes(string), buf, offset, length) } - function ucs2Write$1 (buf, string, offset, length) { - return blitBuffer$1(utf16leToBytes$1(string, buf.length - offset), buf, offset, length) + function ucs2Write (buf, string, offset, length) { + return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length) } - Buffer$1.prototype.write = function write (string, offset, length, encoding) { + Buffer.prototype.write = function write (string, offset, length, encoding) { // Buffer#write(string) if (offset === undefined) { encoding = 'utf8'; @@ -1771,28 +1787,28 @@ for (;;) { switch (encoding) { case 'hex': - return hexWrite$1(this, string, offset, length) + return hexWrite(this, string, offset, length) case 'utf8': case 'utf-8': - return utf8Write$1(this, string, offset, length) + return utf8Write(this, string, offset, length) case 'ascii': - return asciiWrite$1(this, string, offset, length) + return asciiWrite(this, string, offset, length) case 'latin1': case 'binary': - return latin1Write$1(this, string, offset, length) + return latin1Write(this, string, offset, length) case 'base64': // Warning: maxLength not taken into account in base64Write - return base64Write$1(this, string, offset, length) + return base64Write(this, string, offset, length) case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': - return ucs2Write$1(this, string, offset, length) + return ucs2Write(this, string, offset, length) default: if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) @@ -1802,22 +1818,22 @@ } }; - Buffer$1.prototype.toJSON = function toJSON () { + Buffer.prototype.toJSON = function toJSON () { return { type: 'Buffer', data: Array.prototype.slice.call(this._arr || this, 0) } }; - function base64Slice$1 (buf, start, end) { + function base64Slice (buf, start, end) { if (start === 0 && end === buf.length) { - return fromByteArray$1(buf) + return fromByteArray(buf) } else { - return fromByteArray$1(buf.slice(start, end)) + return fromByteArray(buf.slice(start, end)) } } - function utf8Slice$1 (buf, start, end) { + function utf8Slice (buf, start, end) { end = Math.min(buf.length, end); var res = []; @@ -1887,17 +1903,17 @@ i += bytesPerSequence; } - return decodeCodePointsArray$1(res) + return decodeCodePointsArray(res) } // Based on http://stackoverflow.com/a/22747272/680742, the browser with // the lowest limit is Chrome, with 0x10000 args. // We go 1 magnitude less, for safety - var MAX_ARGUMENTS_LENGTH$1 = 0x1000; + var MAX_ARGUMENTS_LENGTH = 0x1000; - function decodeCodePointsArray$1 (codePoints) { + function decodeCodePointsArray (codePoints) { var len = codePoints.length; - if (len <= MAX_ARGUMENTS_LENGTH$1) { + if (len <= MAX_ARGUMENTS_LENGTH) { return String.fromCharCode.apply(String, codePoints) // avoid extra slice() } @@ -1907,13 +1923,13 @@ while (i < len) { res += String.fromCharCode.apply( String, - codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH$1) + codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH) ); } return res } - function asciiSlice$1 (buf, start, end) { + function asciiSlice (buf, start, end) { var ret = ''; end = Math.min(buf.length, end); @@ -1923,7 +1939,7 @@ return ret } - function latin1Slice$1 (buf, start, end) { + function latin1Slice (buf, start, end) { var ret = ''; end = Math.min(buf.length, end); @@ -1933,7 +1949,7 @@ return ret } - function hexSlice$1 (buf, start, end) { + function hexSlice (buf, start, end) { var len = buf.length; if (!start || start < 0) start = 0; @@ -1941,12 +1957,12 @@ var out = ''; for (var i = start; i < end; ++i) { - out += toHex$1(buf[i]); + out += toHex(buf[i]); } return out } - function utf16leSlice$1 (buf, start, end) { + function utf16leSlice (buf, start, end) { var bytes = buf.slice(start, end); var res = ''; for (var i = 0; i < bytes.length; i += 2) { @@ -1955,7 +1971,7 @@ return res } - Buffer$1.prototype.slice = function slice (start, end) { + Buffer.prototype.slice = function slice (start, end) { var len = this.length; start = ~~start; end = end === undefined ? len : ~~end; @@ -1977,12 +1993,12 @@ if (end < start) end = start; var newBuf; - if (Buffer$1.TYPED_ARRAY_SUPPORT) { + if (Buffer.TYPED_ARRAY_SUPPORT) { newBuf = this.subarray(start, end); - newBuf.__proto__ = Buffer$1.prototype; + newBuf.__proto__ = Buffer.prototype; } else { var sliceLen = end - start; - newBuf = new Buffer$1(sliceLen, undefined); + newBuf = new Buffer(sliceLen, undefined); for (var i = 0; i < sliceLen; ++i) { newBuf[i] = this[i + start]; } @@ -1994,15 +2010,15 @@ /* * Need to make sure that buffer isn't trying to write out of bounds. */ - function checkOffset$1 (offset, ext, length) { + function checkOffset (offset, ext, length) { if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint') if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length') } - Buffer$1.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) { + Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) { offset = offset | 0; byteLength = byteLength | 0; - if (!noAssert) checkOffset$1(offset, byteLength, this.length); + if (!noAssert) checkOffset(offset, byteLength, this.length); var val = this[offset]; var mul = 1; @@ -2014,11 +2030,11 @@ return val }; - Buffer$1.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) { + Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) { offset = offset | 0; byteLength = byteLength | 0; if (!noAssert) { - checkOffset$1(offset, byteLength, this.length); + checkOffset(offset, byteLength, this.length); } var val = this[offset + --byteLength]; @@ -2030,23 +2046,23 @@ return val }; - Buffer$1.prototype.readUInt8 = function readUInt8 (offset, noAssert) { - if (!noAssert) checkOffset$1(offset, 1, this.length); + Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) { + if (!noAssert) checkOffset(offset, 1, this.length); return this[offset] }; - Buffer$1.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) { - if (!noAssert) checkOffset$1(offset, 2, this.length); + Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length); return this[offset] | (this[offset + 1] << 8) }; - Buffer$1.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) { - if (!noAssert) checkOffset$1(offset, 2, this.length); + Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length); return (this[offset] << 8) | this[offset + 1] }; - Buffer$1.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) { - if (!noAssert) checkOffset$1(offset, 4, this.length); + Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length); return ((this[offset]) | (this[offset + 1] << 8) | @@ -2054,8 +2070,8 @@ (this[offset + 3] * 0x1000000) }; - Buffer$1.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) { - if (!noAssert) checkOffset$1(offset, 4, this.length); + Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length); return (this[offset] * 0x1000000) + ((this[offset + 1] << 16) | @@ -2063,10 +2079,10 @@ this[offset + 3]) }; - Buffer$1.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) { + Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) { offset = offset | 0; byteLength = byteLength | 0; - if (!noAssert) checkOffset$1(offset, byteLength, this.length); + if (!noAssert) checkOffset(offset, byteLength, this.length); var val = this[offset]; var mul = 1; @@ -2081,10 +2097,10 @@ return val }; - Buffer$1.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) { + Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) { offset = offset | 0; byteLength = byteLength | 0; - if (!noAssert) checkOffset$1(offset, byteLength, this.length); + if (!noAssert) checkOffset(offset, byteLength, this.length); var i = byteLength; var mul = 1; @@ -2099,26 +2115,26 @@ return val }; - Buffer$1.prototype.readInt8 = function readInt8 (offset, noAssert) { - if (!noAssert) checkOffset$1(offset, 1, this.length); + Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) { + if (!noAssert) checkOffset(offset, 1, this.length); if (!(this[offset] & 0x80)) return (this[offset]) return ((0xff - this[offset] + 1) * -1) }; - Buffer$1.prototype.readInt16LE = function readInt16LE (offset, noAssert) { - if (!noAssert) checkOffset$1(offset, 2, this.length); + Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length); var val = this[offset] | (this[offset + 1] << 8); return (val & 0x8000) ? val | 0xFFFF0000 : val }; - Buffer$1.prototype.readInt16BE = function readInt16BE (offset, noAssert) { - if (!noAssert) checkOffset$1(offset, 2, this.length); + Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length); var val = this[offset + 1] | (this[offset] << 8); return (val & 0x8000) ? val | 0xFFFF0000 : val }; - Buffer$1.prototype.readInt32LE = function readInt32LE (offset, noAssert) { - if (!noAssert) checkOffset$1(offset, 4, this.length); + Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length); return (this[offset]) | (this[offset + 1] << 8) | @@ -2126,8 +2142,8 @@ (this[offset + 3] << 24) }; - Buffer$1.prototype.readInt32BE = function readInt32BE (offset, noAssert) { - if (!noAssert) checkOffset$1(offset, 4, this.length); + Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length); return (this[offset] << 24) | (this[offset + 1] << 16) | @@ -2135,39 +2151,39 @@ (this[offset + 3]) }; - Buffer$1.prototype.readFloatLE = function readFloatLE (offset, noAssert) { - if (!noAssert) checkOffset$1(offset, 4, this.length); - return read$1(this, offset, true, 23, 4) + Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length); + return read(this, offset, true, 23, 4) }; - Buffer$1.prototype.readFloatBE = function readFloatBE (offset, noAssert) { - if (!noAssert) checkOffset$1(offset, 4, this.length); - return read$1(this, offset, false, 23, 4) + Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length); + return read(this, offset, false, 23, 4) }; - Buffer$1.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) { - if (!noAssert) checkOffset$1(offset, 8, this.length); - return read$1(this, offset, true, 52, 8) + Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 8, this.length); + return read(this, offset, true, 52, 8) }; - Buffer$1.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) { - if (!noAssert) checkOffset$1(offset, 8, this.length); - return read$1(this, offset, false, 52, 8) + Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 8, this.length); + return read(this, offset, false, 52, 8) }; - function checkInt$1 (buf, value, offset, ext, max, min) { - if (!internalIsBuffer$1(buf)) throw new TypeError('"buffer" argument must be a Buffer instance') + function checkInt (buf, value, offset, ext, max, min) { + if (!internalIsBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance') if (value > max || value < min) throw new RangeError('"value" argument is out of bounds') if (offset + ext > buf.length) throw new RangeError('Index out of range') } - Buffer$1.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) { + Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) { value = +value; offset = offset | 0; byteLength = byteLength | 0; if (!noAssert) { var maxBytes = Math.pow(2, 8 * byteLength) - 1; - checkInt$1(this, value, offset, byteLength, maxBytes, 0); + checkInt(this, value, offset, byteLength, maxBytes, 0); } var mul = 1; @@ -2180,13 +2196,13 @@ return offset + byteLength }; - Buffer$1.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) { + Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) { value = +value; offset = offset | 0; byteLength = byteLength | 0; if (!noAssert) { var maxBytes = Math.pow(2, 8 * byteLength) - 1; - checkInt$1(this, value, offset, byteLength, maxBytes, 0); + checkInt(this, value, offset, byteLength, maxBytes, 0); } var i = byteLength - 1; @@ -2199,16 +2215,16 @@ return offset + byteLength }; - Buffer$1.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) { + Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) { value = +value; offset = offset | 0; - if (!noAssert) checkInt$1(this, value, offset, 1, 0xff, 0); - if (!Buffer$1.TYPED_ARRAY_SUPPORT) value = Math.floor(value); + if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0); + if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value); this[offset] = (value & 0xff); return offset + 1 }; - function objectWriteUInt16$1 (buf, value, offset, littleEndian) { + function objectWriteUInt16 (buf, value, offset, littleEndian) { if (value < 0) value = 0xffff + value + 1; for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) { buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>> @@ -2216,76 +2232,76 @@ } } - Buffer$1.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) { + Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) { value = +value; offset = offset | 0; - if (!noAssert) checkInt$1(this, value, offset, 2, 0xffff, 0); - if (Buffer$1.TYPED_ARRAY_SUPPORT) { + if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0); + if (Buffer.TYPED_ARRAY_SUPPORT) { this[offset] = (value & 0xff); this[offset + 1] = (value >>> 8); } else { - objectWriteUInt16$1(this, value, offset, true); + objectWriteUInt16(this, value, offset, true); } return offset + 2 }; - Buffer$1.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) { + Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) { value = +value; offset = offset | 0; - if (!noAssert) checkInt$1(this, value, offset, 2, 0xffff, 0); - if (Buffer$1.TYPED_ARRAY_SUPPORT) { + if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0); + if (Buffer.TYPED_ARRAY_SUPPORT) { this[offset] = (value >>> 8); this[offset + 1] = (value & 0xff); } else { - objectWriteUInt16$1(this, value, offset, false); + objectWriteUInt16(this, value, offset, false); } return offset + 2 }; - function objectWriteUInt32$1 (buf, value, offset, littleEndian) { + function objectWriteUInt32 (buf, value, offset, littleEndian) { if (value < 0) value = 0xffffffff + value + 1; for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) { buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff; } } - Buffer$1.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) { + Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) { value = +value; offset = offset | 0; - if (!noAssert) checkInt$1(this, value, offset, 4, 0xffffffff, 0); - if (Buffer$1.TYPED_ARRAY_SUPPORT) { + if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0); + if (Buffer.TYPED_ARRAY_SUPPORT) { this[offset + 3] = (value >>> 24); this[offset + 2] = (value >>> 16); this[offset + 1] = (value >>> 8); this[offset] = (value & 0xff); } else { - objectWriteUInt32$1(this, value, offset, true); + objectWriteUInt32(this, value, offset, true); } return offset + 4 }; - Buffer$1.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) { + Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) { value = +value; offset = offset | 0; - if (!noAssert) checkInt$1(this, value, offset, 4, 0xffffffff, 0); - if (Buffer$1.TYPED_ARRAY_SUPPORT) { + if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0); + if (Buffer.TYPED_ARRAY_SUPPORT) { this[offset] = (value >>> 24); this[offset + 1] = (value >>> 16); this[offset + 2] = (value >>> 8); this[offset + 3] = (value & 0xff); } else { - objectWriteUInt32$1(this, value, offset, false); + objectWriteUInt32(this, value, offset, false); } return offset + 4 }; - Buffer$1.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) { + Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) { value = +value; offset = offset | 0; if (!noAssert) { var limit = Math.pow(2, 8 * byteLength - 1); - checkInt$1(this, value, offset, byteLength, limit - 1, -limit); + checkInt(this, value, offset, byteLength, limit - 1, -limit); } var i = 0; @@ -2302,13 +2318,13 @@ return offset + byteLength }; - Buffer$1.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) { + Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) { value = +value; offset = offset | 0; if (!noAssert) { var limit = Math.pow(2, 8 * byteLength - 1); - checkInt$1(this, value, offset, byteLength, limit - 1, -limit); + checkInt(this, value, offset, byteLength, limit - 1, -limit); } var i = byteLength - 1; @@ -2325,112 +2341,112 @@ return offset + byteLength }; - Buffer$1.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) { + Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) { value = +value; offset = offset | 0; - if (!noAssert) checkInt$1(this, value, offset, 1, 0x7f, -0x80); - if (!Buffer$1.TYPED_ARRAY_SUPPORT) value = Math.floor(value); + if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -128); + if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value); if (value < 0) value = 0xff + value + 1; this[offset] = (value & 0xff); return offset + 1 }; - Buffer$1.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) { + Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) { value = +value; offset = offset | 0; - if (!noAssert) checkInt$1(this, value, offset, 2, 0x7fff, -0x8000); - if (Buffer$1.TYPED_ARRAY_SUPPORT) { + if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -32768); + if (Buffer.TYPED_ARRAY_SUPPORT) { this[offset] = (value & 0xff); this[offset + 1] = (value >>> 8); } else { - objectWriteUInt16$1(this, value, offset, true); + objectWriteUInt16(this, value, offset, true); } return offset + 2 }; - Buffer$1.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) { + Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) { value = +value; offset = offset | 0; - if (!noAssert) checkInt$1(this, value, offset, 2, 0x7fff, -0x8000); - if (Buffer$1.TYPED_ARRAY_SUPPORT) { + if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -32768); + if (Buffer.TYPED_ARRAY_SUPPORT) { this[offset] = (value >>> 8); this[offset + 1] = (value & 0xff); } else { - objectWriteUInt16$1(this, value, offset, false); + objectWriteUInt16(this, value, offset, false); } return offset + 2 }; - Buffer$1.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) { + Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) { value = +value; offset = offset | 0; - if (!noAssert) checkInt$1(this, value, offset, 4, 0x7fffffff, -0x80000000); - if (Buffer$1.TYPED_ARRAY_SUPPORT) { + if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -2147483648); + if (Buffer.TYPED_ARRAY_SUPPORT) { this[offset] = (value & 0xff); this[offset + 1] = (value >>> 8); this[offset + 2] = (value >>> 16); this[offset + 3] = (value >>> 24); } else { - objectWriteUInt32$1(this, value, offset, true); + objectWriteUInt32(this, value, offset, true); } return offset + 4 }; - Buffer$1.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) { + Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) { value = +value; offset = offset | 0; - if (!noAssert) checkInt$1(this, value, offset, 4, 0x7fffffff, -0x80000000); + if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -2147483648); if (value < 0) value = 0xffffffff + value + 1; - if (Buffer$1.TYPED_ARRAY_SUPPORT) { + if (Buffer.TYPED_ARRAY_SUPPORT) { this[offset] = (value >>> 24); this[offset + 1] = (value >>> 16); this[offset + 2] = (value >>> 8); this[offset + 3] = (value & 0xff); } else { - objectWriteUInt32$1(this, value, offset, false); + objectWriteUInt32(this, value, offset, false); } return offset + 4 }; - function checkIEEE754$1 (buf, value, offset, ext, max, min) { + function checkIEEE754 (buf, value, offset, ext, max, min) { if (offset + ext > buf.length) throw new RangeError('Index out of range') if (offset < 0) throw new RangeError('Index out of range') } - function writeFloat$1 (buf, value, offset, littleEndian, noAssert) { + function writeFloat (buf, value, offset, littleEndian, noAssert) { if (!noAssert) { - checkIEEE754$1(buf, value, offset, 4); + checkIEEE754(buf, value, offset, 4); } - write$1(buf, value, offset, littleEndian, 23, 4); + write(buf, value, offset, littleEndian, 23, 4); return offset + 4 } - Buffer$1.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) { - return writeFloat$1(this, value, offset, true, noAssert) + Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) { + return writeFloat(this, value, offset, true, noAssert) }; - Buffer$1.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) { - return writeFloat$1(this, value, offset, false, noAssert) + Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) { + return writeFloat(this, value, offset, false, noAssert) }; - function writeDouble$1 (buf, value, offset, littleEndian, noAssert) { + function writeDouble (buf, value, offset, littleEndian, noAssert) { if (!noAssert) { - checkIEEE754$1(buf, value, offset, 8); + checkIEEE754(buf, value, offset, 8); } - write$1(buf, value, offset, littleEndian, 52, 8); + write(buf, value, offset, littleEndian, 52, 8); return offset + 8 } - Buffer$1.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) { - return writeDouble$1(this, value, offset, true, noAssert) + Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) { + return writeDouble(this, value, offset, true, noAssert) }; - Buffer$1.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) { - return writeDouble$1(this, value, offset, false, noAssert) + Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) { + return writeDouble(this, value, offset, false, noAssert) }; // copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) - Buffer$1.prototype.copy = function copy (target, targetStart, start, end) { + Buffer.prototype.copy = function copy (target, targetStart, start, end) { if (!start) start = 0; if (!end && end !== 0) end = this.length; if (targetStart >= target.length) targetStart = target.length; @@ -2462,7 +2478,7 @@ for (i = len - 1; i >= 0; --i) { target[i + targetStart] = this[i + start]; } - } else if (len < 1000 || !Buffer$1.TYPED_ARRAY_SUPPORT) { + } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) { // ascending copy from start for (i = 0; i < len; ++i) { target[i + targetStart] = this[i + start]; @@ -2482,7 +2498,7 @@ // buffer.fill(number[, offset[, end]]) // buffer.fill(buffer[, offset[, end]]) // buffer.fill(string[, offset[, end]][, encoding]) - Buffer$1.prototype.fill = function fill (val, start, end, encoding) { + Buffer.prototype.fill = function fill (val, start, end, encoding) { // Handle string cases: if (typeof val === 'string') { if (typeof start === 'string') { @@ -2502,7 +2518,7 @@ if (encoding !== undefined && typeof encoding !== 'string') { throw new TypeError('encoding must be a string') } - if (typeof encoding === 'string' && !Buffer$1.isEncoding(encoding)) { + if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) { throw new TypeError('Unknown encoding: ' + encoding) } } else if (typeof val === 'number') { @@ -2529,9 +2545,9 @@ this[i] = val; } } else { - var bytes = internalIsBuffer$1(val) + var bytes = internalIsBuffer(val) ? val - : utf8ToBytes$1(new Buffer$1(val, encoding).toString()); + : utf8ToBytes(new Buffer(val, encoding).toString()); var len = bytes.length; for (i = 0; i < end - start; ++i) { this[i + start] = bytes[i % len]; @@ -2544,11 +2560,11 @@ // HELPER FUNCTIONS // ================ - var INVALID_BASE64_RE$1 = /[^+\/0-9A-Za-z-_]/g; + var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g; - function base64clean$1 (str) { + function base64clean (str) { // Node strips out invalid characters like \n and \t from the string, base64-js does not - str = stringtrim$1(str).replace(INVALID_BASE64_RE$1, ''); + str = stringtrim(str).replace(INVALID_BASE64_RE, ''); // Node converts strings with length < 2 to '' if (str.length < 2) return '' // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not @@ -2558,17 +2574,17 @@ return str } - function stringtrim$1 (str) { + function stringtrim (str) { if (str.trim) return str.trim() return str.replace(/^\s+|\s+$/g, '') } - function toHex$1 (n) { + function toHex (n) { if (n < 16) return '0' + n.toString(16) return n.toString(16) } - function utf8ToBytes$1 (string, units) { + function utf8ToBytes (string, units) { units = units || Infinity; var codePoint; var length = string.length; @@ -2648,7 +2664,7 @@ return bytes } - function asciiToBytes$1 (str) { + function asciiToBytes (str) { var byteArray = []; for (var i = 0; i < str.length; ++i) { // Node's code seems to be doing this and not & 0x7F.. @@ -2657,7 +2673,7 @@ return byteArray } - function utf16leToBytes$1 (str, units) { + function utf16leToBytes (str, units) { var c, hi, lo; var byteArray = []; for (var i = 0; i < str.length; ++i) { @@ -2674,11 +2690,11 @@ } - function base64ToBytes$1 (str) { - return toByteArray$1(base64clean$1(str)) + function base64ToBytes (str) { + return toByteArray(base64clean(str)) } - function blitBuffer$1 (src, dst, offset, length) { + function blitBuffer (src, dst, offset, length) { for (var i = 0; i < length; ++i) { if ((i + offset >= dst.length) || (i >= src.length)) break dst[i + offset] = src[i]; @@ -2686,7 +2702,7 @@ return i } - function isnan$1 (val) { + function isnan (val) { return val !== val // eslint-disable-line no-self-compare } @@ -2694,293 +2710,80 @@ // the following is from is-buffer, also by Feross Aboukhadijeh and with same lisence // The _isBuffer check is for Safari 5-7 support, because it's missing // Object.prototype.constructor. Remove this eventually - function isBuffer$2(obj) { - return obj != null && (!!obj._isBuffer || isFastBuffer$1(obj) || isSlowBuffer$1(obj)) + function isBuffer$1(obj) { + return obj != null && (!!obj._isBuffer || isFastBuffer(obj) || isSlowBuffer(obj)) } - function isFastBuffer$1 (obj) { + function isFastBuffer (obj) { return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj) } // For Node v0.10 support. Remove this eventually. - function isSlowBuffer$1 (obj) { - return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isFastBuffer$1(obj.slice(0, 0)) + function isSlowBuffer (obj) { + return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isFastBuffer(obj.slice(0, 0)) } - // shim for using process in browser - // based off https://github.com/defunctzombie/node-process/blob/master/browser.js - - function defaultSetTimout() { - throw new Error('setTimeout has not been defined'); - } - function defaultClearTimeout () { - throw new Error('clearTimeout has not been defined'); - } - var cachedSetTimeout = defaultSetTimout; - var cachedClearTimeout = defaultClearTimeout; - if (typeof global$2.setTimeout === 'function') { - cachedSetTimeout = setTimeout; - } - if (typeof global$2.clearTimeout === 'function') { - cachedClearTimeout = clearTimeout; + var inherits; + if (typeof Object.create === 'function'){ + inherits = function inherits(ctor, superCtor) { + // implementation from standard node.js 'util' module + ctor.super_ = superCtor; + ctor.prototype = Object.create(superCtor.prototype, { + constructor: { + value: ctor, + enumerable: false, + writable: true, + configurable: true + } + }); + }; + } else { + inherits = function inherits(ctor, superCtor) { + ctor.super_ = superCtor; + var TempCtor = function () {}; + TempCtor.prototype = superCtor.prototype; + ctor.prototype = new TempCtor(); + ctor.prototype.constructor = ctor; + }; } - function runTimeout(fun) { - if (cachedSetTimeout === setTimeout) { - //normal enviroments in sane situations - return setTimeout(fun, 0); + var getOwnPropertyDescriptors = Object.getOwnPropertyDescriptors || + function getOwnPropertyDescriptors(obj) { + var keys = Object.keys(obj); + var descriptors = {}; + for (var i = 0; i < keys.length; i++) { + descriptors[keys[i]] = Object.getOwnPropertyDescriptor(obj, keys[i]); } - // if setTimeout wasn't available but was latter defined - if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { - cachedSetTimeout = setTimeout; - return setTimeout(fun, 0); + return descriptors; + }; + + var formatRegExp = /%[sdj%]/g; + function format(f) { + if (!isString$2(f)) { + var objects = []; + for (var i = 0; i < arguments.length; i++) { + objects.push(inspect(arguments[i])); } - try { - // when when somebody has screwed with setTimeout but no I.E. maddness - return cachedSetTimeout(fun, 0); - } catch(e){ + return objects.join(' '); + } + + var i = 1; + var args = arguments; + var len = args.length; + var str = String(f).replace(formatRegExp, function(x) { + if (x === '%%') return '%'; + if (i >= len) return x; + switch (x) { + case '%s': return String(args[i++]); + case '%d': return Number(args[i++]); + case '%j': try { - // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally - return cachedSetTimeout.call(null, fun, 0); - } catch(e){ - // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error - return cachedSetTimeout.call(this, fun, 0); + return JSON.stringify(args[i++]); + } catch (_) { + return '[Circular]'; } - } - - - } - function runClearTimeout(marker) { - if (cachedClearTimeout === clearTimeout) { - //normal enviroments in sane situations - return clearTimeout(marker); - } - // if clearTimeout wasn't available but was latter defined - if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { - cachedClearTimeout = clearTimeout; - return clearTimeout(marker); - } - try { - // when when somebody has screwed with setTimeout but no I.E. maddness - return cachedClearTimeout(marker); - } catch (e){ - try { - // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally - return cachedClearTimeout.call(null, marker); - } catch (e){ - // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. - // Some versions of I.E. have different rules for clearTimeout vs setTimeout - return cachedClearTimeout.call(this, marker); - } - } - - - - } - var queue = []; - var draining = false; - var currentQueue; - var queueIndex = -1; - - function cleanUpNextTick() { - if (!draining || !currentQueue) { - return; - } - draining = false; - if (currentQueue.length) { - queue = currentQueue.concat(queue); - } else { - queueIndex = -1; - } - if (queue.length) { - drainQueue(); - } - } - - function drainQueue() { - if (draining) { - return; - } - var timeout = runTimeout(cleanUpNextTick); - draining = true; - - var len = queue.length; - while(len) { - currentQueue = queue; - queue = []; - while (++queueIndex < len) { - if (currentQueue) { - currentQueue[queueIndex].run(); - } - } - queueIndex = -1; - len = queue.length; - } - currentQueue = null; - draining = false; - runClearTimeout(timeout); - } - function nextTick(fun) { - var args = new Array(arguments.length - 1); - if (arguments.length > 1) { - for (var i = 1; i < arguments.length; i++) { - args[i - 1] = arguments[i]; - } - } - queue.push(new Item(fun, args)); - if (queue.length === 1 && !draining) { - runTimeout(drainQueue); - } - } - // v8 likes predictible objects - function Item(fun, array) { - this.fun = fun; - this.array = array; - } - Item.prototype.run = function () { - this.fun.apply(null, this.array); - }; - var title = 'browser'; - var platform = 'browser'; - var browser$3 = true; - var env = {}; - var argv = []; - var version$1 = ''; // empty string to avoid regexp issues - var versions = {}; - var release = {}; - var config = {}; - - function noop() {} - - var on = noop; - var addListener = noop; - var once = noop; - var off = noop; - var removeListener = noop; - var removeAllListeners = noop; - var emit = noop; - - function binding(name) { - throw new Error('process.binding is not supported'); - } - - function cwd () { return '/' } - function chdir (dir) { - throw new Error('process.chdir is not supported'); - }function umask() { return 0; } - - // from https://github.com/kumavis/browser-process-hrtime/blob/master/index.js - var performance = global$2.performance || {}; - var performanceNow = - performance.now || - performance.mozNow || - performance.msNow || - performance.oNow || - performance.webkitNow || - function(){ return (new Date()).getTime() }; - - // generate timestamp or delta - // see http://nodejs.org/api/process.html#process_process_hrtime - function hrtime(previousTimestamp){ - var clocktime = performanceNow.call(performance)*1e-3; - var seconds = Math.floor(clocktime); - var nanoseconds = Math.floor((clocktime%1)*1e9); - if (previousTimestamp) { - seconds = seconds - previousTimestamp[0]; - nanoseconds = nanoseconds - previousTimestamp[1]; - if (nanoseconds<0) { - seconds--; - nanoseconds += 1e9; - } - } - return [seconds,nanoseconds] - } - - var startTime = new Date(); - function uptime() { - var currentTime = new Date(); - var dif = currentTime - startTime; - return dif / 1000; - } - - var browser$1$1 = { - nextTick: nextTick, - title: title, - browser: browser$3, - env: env, - argv: argv, - version: version$1, - versions: versions, - on: on, - addListener: addListener, - once: once, - off: off, - removeListener: removeListener, - removeAllListeners: removeAllListeners, - emit: emit, - binding: binding, - cwd: cwd, - chdir: chdir, - umask: umask, - hrtime: hrtime, - platform: platform, - release: release, - config: config, - uptime: uptime - }; - - var inherits$2; - if (typeof Object.create === 'function'){ - inherits$2 = function inherits(ctor, superCtor) { - // implementation from standard node.js 'util' module - ctor.super_ = superCtor; - ctor.prototype = Object.create(superCtor.prototype, { - constructor: { - value: ctor, - enumerable: false, - writable: true, - configurable: true - } - }); - }; - } else { - inherits$2 = function inherits(ctor, superCtor) { - ctor.super_ = superCtor; - var TempCtor = function () {}; - TempCtor.prototype = superCtor.prototype; - ctor.prototype = new TempCtor(); - ctor.prototype.constructor = ctor; - }; - } - var inherits$3 = inherits$2; - - var formatRegExp = /%[sdj%]/g; - function format$1(f) { - if (!isString$1(f)) { - var objects = []; - for (var i = 0; i < arguments.length; i++) { - objects.push(inspect(arguments[i])); - } - return objects.join(' '); - } - - var i = 1; - var args = arguments; - var len = args.length; - var str = String(f).replace(formatRegExp, function(x) { - if (x === '%%') return '%'; - if (i >= len) return x; - switch (x) { - case '%s': return String(args[i++]); - case '%d': return Number(args[i++]); - case '%j': - try { - return JSON.stringify(args[i++]); - } catch (_) { - return '[Circular]'; - } - default: - return x; + default: + return x; } }); for (var x = args[i]; i < len; x = args[++i]) { @@ -2996,11 +2799,11 @@ // Mark that a method should not be used. // Returns a modified function which warns once by default. // If --no-deprecation is set, then it is a no-op. - function deprecate$1(fn, msg) { + function deprecate(fn, msg) { // Allow for deprecating things in the process of starting up. - if (isUndefined(global$2.process)) { + if (isUndefined(global$1.process)) { return function() { - return deprecate$1(fn, msg).apply(this, arguments); + return deprecate(fn, msg).apply(this, arguments); }; } @@ -3036,7 +2839,7 @@ if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) { var pid = 0; debugs[set] = function() { - var msg = format$1.apply(null, arguments); + var msg = format.apply(null, arguments); console.error('%s %d: %s', set, pid, msg); }; } else { @@ -3149,7 +2952,7 @@ // Also filter out any prototype objects using the circular check. !(value.constructor && value.constructor.prototype === value)) { var ret = value.inspect(recurseTimes, ctx); - if (!isString$1(ret)) { + if (!isString$2(ret)) { ret = formatValue(ctx, ret, recurseTimes); } return ret; @@ -3171,7 +2974,7 @@ // IE doesn't make error fields non-enumerable // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx - if (isError$1(value) + if (isError(value) && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) { return formatError(value); } @@ -3188,7 +2991,7 @@ if (isDate(value)) { return ctx.stylize(Date.prototype.toString.call(value), 'date'); } - if (isError$1(value)) { + if (isError(value)) { return formatError(value); } } @@ -3196,7 +2999,7 @@ var base = '', array = false, braces = ['{', '}']; // Make Array say that they are Array - if (isArray$1(value)) { + if (isArray(value)) { array = true; braces = ['[', ']']; } @@ -3218,7 +3021,7 @@ } // Make error with message first say the error - if (isError$1(value)) { + if (isError(value)) { base = ' ' + formatError(value); } @@ -3254,7 +3057,7 @@ function formatPrimitive(ctx, value) { if (isUndefined(value)) return ctx.stylize('undefined', 'undefined'); - if (isString$1(value)) { + if (isString$2(value)) { var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '') .replace(/'/g, "\\'") .replace(/\\"/g, '"') + '\''; @@ -3375,7 +3178,7 @@ // NOTE: These type checking functions intentionally don't use `instanceof` // because it is fragile and can be easily faked with `Object.create()`. - function isArray$1(ar) { + function isArray(ar) { return Array.isArray(ar); } @@ -3395,7 +3198,7 @@ return typeof arg === 'number'; } - function isString$1(arg) { + function isString$2(arg) { return typeof arg === 'string'; } @@ -3419,7 +3222,7 @@ return isObject(d) && objectToString(d) === '[object Date]'; } - function isError$1(e) { + function isError(e) { return isObject(e) && (objectToString(e) === '[object Error]' || e instanceof Error); } @@ -3437,8 +3240,8 @@ typeof arg === 'undefined'; } - function isBuffer$1(maybeBuf) { - return Buffer$1.isBuffer(maybeBuf); + function isBuffer(maybeBuf) { + return Buffer.isBuffer(maybeBuf); } function objectToString(o) { @@ -3446,7 +3249,7 @@ } - function pad(n) { + function pad$1(n) { return n < 10 ? '0' + n.toString(10) : n.toString(10); } @@ -3457,16 +3260,16 @@ // 26 Feb 16:19:34 function timestamp() { var d = new Date(); - var time = [pad(d.getHours()), - pad(d.getMinutes()), - pad(d.getSeconds())].join(':'); + var time = [pad$1(d.getHours()), + pad$1(d.getMinutes()), + pad$1(d.getSeconds())].join(':'); return [d.getDate(), months[d.getMonth()], time].join(' '); } // log is just a thin wrapper to console.log that prepends a timestamp function log() { - console.log('%s - %s', timestamp(), format$1.apply(null, arguments)); + console.log('%s - %s', timestamp(), format.apply(null, arguments)); } function _extend(origin, add) { @@ -3484,65 +3287,174 @@ return Object.prototype.hasOwnProperty.call(obj, prop); } - var _polyfillNode_util = { - inherits: inherits$3, - _extend: _extend, - log: log, - isBuffer: isBuffer$1, - isPrimitive: isPrimitive, - isFunction: isFunction, - isError: isError$1, - isDate: isDate, - isObject: isObject, - isRegExp: isRegExp, - isUndefined: isUndefined, - isSymbol: isSymbol, - isString: isString$1, - isNumber: isNumber, - isNullOrUndefined: isNullOrUndefined, - isNull: isNull, - isBoolean: isBoolean, - isArray: isArray$1, - inspect: inspect, - deprecate: deprecate$1, - format: format$1, - debuglog: debuglog - }; - - var _polyfillNode_util$1 = /*#__PURE__*/Object.freeze({ - __proto__: null, - format: format$1, - deprecate: deprecate$1, - debuglog: debuglog, - inspect: inspect, - isArray: isArray$1, - isBoolean: isBoolean, - isNull: isNull, - isNullOrUndefined: isNullOrUndefined, - isNumber: isNumber, - isString: isString$1, - isSymbol: isSymbol, - isUndefined: isUndefined, - isRegExp: isRegExp, - isObject: isObject, - isDate: isDate, - isError: isError$1, - isFunction: isFunction, - isPrimitive: isPrimitive, - isBuffer: isBuffer$1, - log: log, - inherits: inherits$3, - _extend: _extend, - 'default': _polyfillNode_util - }); + var kCustomPromisifiedSymbol = typeof Symbol !== 'undefined' ? Symbol('util.promisify.custom') : undefined; - function BufferList() { - this.head = null; - this.tail = null; - this.length = 0; - } + function promisify(original) { + if (typeof original !== 'function') + throw new TypeError('The "original" argument must be of type Function'); - BufferList.prototype.push = function (v) { + if (kCustomPromisifiedSymbol && original[kCustomPromisifiedSymbol]) { + var fn = original[kCustomPromisifiedSymbol]; + if (typeof fn !== 'function') { + throw new TypeError('The "util.promisify.custom" argument must be of type Function'); + } + Object.defineProperty(fn, kCustomPromisifiedSymbol, { + value: fn, enumerable: false, writable: false, configurable: true + }); + return fn; + } + + function fn() { + var promiseResolve, promiseReject; + var promise = new Promise(function (resolve, reject) { + promiseResolve = resolve; + promiseReject = reject; + }); + + var args = []; + for (var i = 0; i < arguments.length; i++) { + args.push(arguments[i]); + } + args.push(function (err, value) { + if (err) { + promiseReject(err); + } else { + promiseResolve(value); + } + }); + + try { + original.apply(this, args); + } catch (err) { + promiseReject(err); + } + + return promise; + } + + Object.setPrototypeOf(fn, Object.getPrototypeOf(original)); + + if (kCustomPromisifiedSymbol) Object.defineProperty(fn, kCustomPromisifiedSymbol, { + value: fn, enumerable: false, writable: false, configurable: true + }); + return Object.defineProperties( + fn, + getOwnPropertyDescriptors(original) + ); + } + + promisify.custom = kCustomPromisifiedSymbol; + + function callbackifyOnRejected(reason, cb) { + // `!reason` guard inspired by bluebird (Ref: https://goo.gl/t5IS6M). + // Because `null` is a special error value in callbacks which means "no error + // occurred", we error-wrap so the callback consumer can distinguish between + // "the promise rejected with null" or "the promise fulfilled with undefined". + if (!reason) { + var newReason = new Error('Promise was rejected with a falsy value'); + newReason.reason = reason; + reason = newReason; + } + return cb(reason); + } + + function callbackify(original) { + if (typeof original !== 'function') { + throw new TypeError('The "original" argument must be of type Function'); + } + + // We DO NOT return the promise as it gives the user a false sense that + // the promise is actually somehow related to the callback's execution + // and that the callback throwing will reject the promise. + function callbackified() { + var args = []; + for (var i = 0; i < arguments.length; i++) { + args.push(arguments[i]); + } + + var maybeCb = args.pop(); + if (typeof maybeCb !== 'function') { + throw new TypeError('The last argument must be of type Function'); + } + var self = this; + var cb = function() { + return maybeCb.apply(self, arguments); + }; + // In true node style we process the callback on `nextTick` with all the + // implications (stack, `uncaughtException`, `async_hooks`) + original.apply(this, args) + .then(function(ret) { browser$1$1.nextTick(cb.bind(null, null, ret)); }, + function(rej) { browser$1$1.nextTick(callbackifyOnRejected.bind(null, rej, cb)); }); + } + + Object.setPrototypeOf(callbackified, Object.getPrototypeOf(original)); + Object.defineProperties(callbackified, getOwnPropertyDescriptors(original)); + return callbackified; + } + + var util = { + inherits: inherits, + _extend: _extend, + log: log, + isBuffer: isBuffer, + isPrimitive: isPrimitive, + isFunction: isFunction, + isError: isError, + isDate: isDate, + isObject: isObject, + isRegExp: isRegExp, + isUndefined: isUndefined, + isSymbol: isSymbol, + isString: isString$2, + isNumber: isNumber, + isNullOrUndefined: isNullOrUndefined, + isNull: isNull, + isBoolean: isBoolean, + isArray: isArray, + inspect: inspect, + deprecate: deprecate, + format: format, + debuglog: debuglog, + promisify: promisify, + callbackify: callbackify, + }; + + var _polyfillNode_util = /*#__PURE__*/Object.freeze({ + __proto__: null, + _extend: _extend, + callbackify: callbackify, + debuglog: debuglog, + default: util, + deprecate: deprecate, + format: format, + inherits: inherits, + inspect: inspect, + isArray: isArray, + isBoolean: isBoolean, + isBuffer: isBuffer, + isDate: isDate, + isError: isError, + isFunction: isFunction, + isNull: isNull, + isNullOrUndefined: isNullOrUndefined, + isNumber: isNumber, + isObject: isObject, + isPrimitive: isPrimitive, + isRegExp: isRegExp, + isString: isString$2, + isSymbol: isSymbol, + isUndefined: isUndefined, + log: log, + promisify: promisify + }); + + function BufferList() { + this.head = null; + this.tail = null; + this.length = 0; + } + + BufferList.prototype.push = function (v) { var entry = { data: v, next: null }; if (this.length > 0) this.tail.next = entry;else this.head = entry; this.tail = entry; @@ -3579,9 +3491,9 @@ }; BufferList.prototype.concat = function (n) { - if (this.length === 0) return Buffer$1.alloc(0); + if (this.length === 0) return Buffer.alloc(0); if (this.length === 1) return this.head.data; - var ret = Buffer$1.allocUnsafe(n >>> 0); + var ret = Buffer.allocUnsafe(n >>> 0); var p = this.head; var i = 0; while (p) { @@ -3593,7 +3505,27 @@ }; // Copyright Joyent, Inc. and other Node contributors. - var isBufferEncoding = Buffer$1.isEncoding + // + // 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. + + var isBufferEncoding = Buffer.isEncoding || function(encoding) { switch (encoding && encoding.toLowerCase()) { case 'hex': case 'utf8': case 'utf-8': case 'ascii': case 'binary': case 'base64': case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': case 'raw': return true; @@ -3642,7 +3574,7 @@ // Enough space to store all bytes of a single character. UTF-8 needs 4 // bytes, but CESU-8 may require up to 6 (3 bytes per surrogate). - this.charBuffer = new Buffer$1(6); + this.charBuffer = new Buffer(6); // Number of bytes received for the current incomplete multi-byte character. this.charReceived = 0; // Number of bytes expected for the current incomplete multi-byte character. @@ -3794,7 +3726,7 @@ Readable.ReadableState = ReadableState; var debug$2 = debuglog('stream'); - inherits$3(Readable, EventEmitter$2); + inherits(Readable, EventEmitter); function prependListener(emitter, event, fn) { // Sadly this is not cacheable as some libraries bundle their own @@ -3894,7 +3826,7 @@ if (options && typeof options.read === 'function') this._read = options.read; - EventEmitter$2.call(this); + EventEmitter.call(this); } // Manually shove something into the read() buffer. @@ -3907,7 +3839,7 @@ if (!state.objectMode && typeof chunk === 'string') { encoding = encoding || state.defaultEncoding; if (encoding !== state.encoding) { - chunk = Buffer$1.from(chunk, encoding); + chunk = Buffer.from(chunk, encoding); encoding = ''; } } @@ -4133,7 +4065,7 @@ function chunkInvalid(state, chunk) { var er = null; - if (!Buffer$1.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== null && chunk !== undefined && !state.objectMode) { + if (!Buffer.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== null && chunk !== undefined && !state.objectMode) { er = new TypeError('Invalid non-string/buffer chunk'); } return er; @@ -4402,7 +4334,7 @@ // set up data events if they are asked for // Ensure readable listeners eventually get something Readable.prototype.on = function (ev, fn) { - var res = EventEmitter$2.prototype.on.call(this, ev, fn); + var res = EventEmitter.prototype.on.call(this, ev, fn); if (ev === 'data') { // Start flowing on next tick if stream isn't explicitly paused @@ -4617,7 +4549,7 @@ // This function is designed to be inlinable, so please take care when making // changes to the function body. function copyFromBuffer(n, list) { - var ret = Buffer$1.allocUnsafe(n); + var ret = Buffer.allocUnsafe(n); var p = list.head; var c = 1; p.data.copy(ret); @@ -4679,8 +4611,11 @@ } // A bit simpler than readable streams. + // Implement an async ._write(chunk, encoding, cb), and it'll handle all + // the drain event emission and buffering. + Writable.WritableState = WritableState; - inherits$3(Writable, EventEmitter$2); + inherits(Writable, EventEmitter); function nop() {} @@ -4693,7 +4628,7 @@ function WritableState(options, stream) { Object.defineProperty(this, 'buffer', { - get: deprecate$1(function () { + get: deprecate(function () { return this.getBuffer(); }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.') }); @@ -4815,7 +4750,7 @@ if (typeof options.writev === 'function') this._writev = options.writev; } - EventEmitter$2.call(this); + EventEmitter.call(this); } // Otherwise people can pipe Writable streams, which is just wrong. @@ -4843,7 +4778,7 @@ // if it is not a buffer, string, or undefined. if (chunk === null) { er = new TypeError('May not write null values to stream'); - } else if (!Buffer$1.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) { + } else if (!Buffer.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) { er = new TypeError('Invalid non-string/buffer chunk'); } if (er) { @@ -4863,7 +4798,7 @@ encoding = null; } - if (Buffer$1.isBuffer(chunk)) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding; + if (Buffer.isBuffer(chunk)) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding; if (typeof cb !== 'function') cb = nop; @@ -4901,7 +4836,7 @@ function decodeChunk(state, chunk, encoding) { if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') { - chunk = Buffer$1.from(chunk, encoding); + chunk = Buffer.from(chunk, encoding); } return chunk; } @@ -4912,7 +4847,7 @@ function writeOrBuffer(stream, state, chunk, encoding, cb) { chunk = decodeChunk(state, chunk, encoding); - if (Buffer$1.isBuffer(chunk)) encoding = 'buffer'; + if (Buffer.isBuffer(chunk)) encoding = 'buffer'; var len = state.objectMode ? 1 : chunk.length; state.length += len; @@ -5151,7 +5086,7 @@ }; } - inherits$3(Duplex, Readable); + inherits(Duplex, Readable); var keys = Object.keys(Writable.prototype); for (var v = 0; v < keys.length; v++) { @@ -5190,7 +5125,48 @@ } // a transform stream is a readable/writable stream where you do - inherits$3(Transform, Duplex); + // something with the data. Sometimes it's called a "filter", + // but that's not a great name for it, since that implies a thing where + // some bits pass through, and others are simply ignored. (That would + // be a valid example of a transform, of course.) + // + // While the output is causally related to the input, it's not a + // necessarily symmetric or synchronous transformation. For example, + // a zlib stream might take multiple plain-text writes(), and then + // emit a single compressed chunk some time in the future. + // + // Here's how this works: + // + // The Transform stream has all the aspects of the readable and writable + // stream classes. When you write(chunk), that calls _write(chunk,cb) + // internally, and returns false if there's a lot of pending writes + // buffered up. When you call read(), that calls _read(n) until + // there's enough pending readable data buffered up. + // + // In a transform stream, the written data is placed in a buffer. When + // _read(n) is called, it transforms the queued up data, calling the + // buffered _write cb's as it consumes chunks. If consuming a single + // written chunk would result in multiple output chunks, then the first + // outputted bit calls the readcb, and subsequent chunks just go into + // the read buffer, and will cause it to emit 'readable' if necessary. + // + // This way, back-pressure is actually determined by the reading side, + // since _read has to be called to start processing a new chunk. However, + // a pathological inflate type of transform can cause excessive buffering + // here. For example, imagine a stream where every byte of input is + // interpreted as an integer from 0-255, and then results in that many + // bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in + // 1kb of data being output. In this case, you could write a very small + // amount of input, and end up with a very large amount of output. In + // such a pathological inflating mechanism, there'd be no way to tell + // the system to stop doing the transform. A single 4MB write could + // cause the system to run out of memory. + // + // However, even in such a pathological case, only a single written chunk + // would be consumed, and then the rest would wait (un-transformed) until + // the results of the previous transformed chunk were consumed. + + inherits(Transform, Duplex); function TransformState(stream) { this.afterTransform = function (er, data) { @@ -5317,7 +5293,7 @@ return stream.push(null); } - inherits$3(PassThrough, Transform); + inherits(PassThrough, Transform); function PassThrough(options) { if (!(this instanceof PassThrough)) return new PassThrough(options); @@ -5328,7 +5304,7 @@ cb(null, chunk); }; - inherits$3(Stream, EventEmitter$2); + inherits(Stream, EventEmitter); Stream.Readable = Readable; Stream.Writable = Writable; Stream.Duplex = Duplex; @@ -5342,7 +5318,7 @@ // part of this class) is overridden in the Readable class. function Stream() { - EventEmitter$2.call(this); + EventEmitter.call(this); } Stream.prototype.pipe = function(dest, options) { @@ -5392,7 +5368,7 @@ // don't leave dangling pipes when there are errors. function onerror(er) { cleanup(); - if (EventEmitter$2.listenerCount(this, 'error') === 0) { + if (EventEmitter.listenerCount(this, 'error') === 0) { throw er; // Unhandled stream error in pipe. } } @@ -5430,44 +5406,55 @@ var _polyfillNode_stream = /*#__PURE__*/Object.freeze({ __proto__: null, - 'default': Stream, - Readable: Readable, - Writable: Writable, Duplex: Duplex, - Transform: Transform, PassThrough: PassThrough, - Stream: Stream + Readable: Readable, + Stream: Stream, + Transform: Transform, + Writable: Writable, + default: Stream }); - var require$$0$2 = /*@__PURE__*/getAugmentedNamespace(_polyfillNode_stream); + var require$$0$3 = /*@__PURE__*/getAugmentedNamespace(_polyfillNode_stream); + + var require$$1$3 = /*@__PURE__*/getAugmentedNamespace(_polyfillNode_util); - var require$$0$1 = /*@__PURE__*/getAugmentedNamespace(_polyfillNode_util$1); + var browserStdout; + var hasRequiredBrowserStdout; - var WritableStream = require$$0$2.Writable; - var inherits$1 = require$$0$1.inherits; + function requireBrowserStdout () { + if (hasRequiredBrowserStdout) return browserStdout; + hasRequiredBrowserStdout = 1; + var WritableStream = require$$0$3.Writable; + var inherits = require$$1$3.inherits; - var browserStdout = BrowserStdout; + browserStdout = BrowserStdout; - inherits$1(BrowserStdout, WritableStream); + inherits(BrowserStdout, WritableStream); - function BrowserStdout(opts) { - if (!(this instanceof BrowserStdout)) return new BrowserStdout(opts) + function BrowserStdout(opts) { + if (!(this instanceof BrowserStdout)) return new BrowserStdout(opts) + + opts = opts || {}; + WritableStream.call(this, opts); + this.label = (opts.label !== undefined) ? opts.label : 'stdout'; + } - opts = opts || {}; - WritableStream.call(this, opts); - this.label = (opts.label !== undefined) ? opts.label : 'stdout'; + BrowserStdout.prototype._write = function(chunks, encoding, cb) { + var output = chunks.toString ? chunks.toString() : chunks; + if (this.label === false) { + console.log(output); + } else { + console.log(this.label+':', output); + } + browser$1$1.nextTick(cb); + }; + return browserStdout; } - BrowserStdout.prototype._write = function(chunks, encoding, cb) { - var output = chunks.toString ? chunks.toString() : chunks; - if (this.label === false) { - console.log(output); - } else { - console.log(this.label+':', output); - } - nextTick$1(cb); - }; + var browserStdoutExports = requireBrowserStdout(); + var BrowserStdout = /*@__PURE__*/getDefaultExportFromCjs(browserStdoutExports); /** * Parse the given `qs`. @@ -5476,21 +5463,21 @@ * @param {string} qs * @return {Object} */ - var parseQuery$1 = function parseQuery(qs) { + function parseQuery(qs) { return qs .replace("?", "") .split("&") .reduce(function (obj, pair) { var i = pair.indexOf("="); var key = pair.slice(0, i); - var val = pair.slice(++i); + var val = pair.slice(i + 1); // Due to how the URLSearchParams API treats spaces obj[key] = decodeURIComponent(val.replace(/\+/g, "%20")); return obj; }, {}); - }; + } /** * Highlight the given string of `js`. @@ -5523,26 +5510,40 @@ * @private * @param {string} name */ - var highlightTags$1 = function highlightTags(name) { + function highlightTags(name) { var code = document.getElementById("mocha").getElementsByTagName(name); for (var i = 0, len = code.length; i < len; ++i) { code[i].innerHTML = highlight(code[i].innerHTML); } - }; + } + + function commonjsRequire(path) { + throw new Error('Could not dynamically require "' + path + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.'); + } var mocha$1 = {exports: {}}; - var escapeStringRegexp = string => { - if (typeof string !== 'string') { - throw new TypeError('Expected a string'); - } + // @ts-check - // Escape characters with special meaning either inside or outside character sets. - // Use a simple backslash escape when it’s always valid, and a \unnnn escape when the simpler form would be disallowed by Unicode patterns’ stricter grammar. - return string - .replace(/[|\\{}()[\]^$+*?.]/g, '\\$&') - .replace(/-/g, '\\x2d'); - }; + /** + * Escapes special characters in a string to make it safe for use in regular expressions. + * + * @param {string} value - The string to escape + * @returns {string} The escaped string safe for use in regular expressions + */ + function escapeRegExp(value) { + // TODO [engine:node@>=24]: Replace with built in RegExp.escape() + return value + .replaceAll(/[|\\{}()[\]^$+*?.]/g, "\\$&") + .replaceAll("-", "\\x2d"); + } + + var regexp = /*#__PURE__*/Object.freeze({ + __proto__: null, + escapeRegExp: escapeRegExp + }); + + var require$$0$2 = /*@__PURE__*/getAugmentedNamespace(regexp); // Copyright Joyent, Inc. and other Node contributors. // @@ -5747,7 +5748,7 @@ function extname(path) { return splitPath(path)[3]; } - var _polyfillNode_path = { + var path = { extname: extname, basename: basename, dirname: dirname, @@ -5777,10700 +5778,5607 @@ } ; - var _polyfillNode_path$1 = /*#__PURE__*/Object.freeze({ + var _polyfillNode_path = /*#__PURE__*/Object.freeze({ __proto__: null, - resolve: resolve, - normalize: normalize, - isAbsolute: isAbsolute, - join: join, - relative: relative, - sep: sep, + basename: basename, + default: path, delimiter: delimiter, dirname: dirname, - basename: basename, extname: extname, - 'default': _polyfillNode_path + isAbsolute: isAbsolute, + join: join, + normalize: normalize, + relative: relative, + resolve: resolve, + sep: sep }); - var require$$1 = /*@__PURE__*/getAugmentedNamespace(_polyfillNode_path$1); + var require$$1$2 = /*@__PURE__*/getAugmentedNamespace(_polyfillNode_path); var reporters = {}; - var base$1 = {exports: {}}; - - var lib = {}; - - var base = {}; - - /*istanbul ignore start*/ - - (function (exports) { - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports["default"] = Diff; - /*istanbul ignore end*/ - function Diff() {} - Diff.prototype = { - /*istanbul ignore start*/ - /*istanbul ignore end*/ - diff: function diff(oldString, newString) { - /*istanbul ignore start*/ - var _options$timeout; - var - /*istanbul ignore end*/ - options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; - var callback = options.callback; - if (typeof options === 'function') { - callback = options; - options = {}; - } - var self = this; - function done(value) { - value = self.postProcess(value, options); - if (callback) { - setTimeout(function () { - callback(value); - }, 0); - return true; - } else { - return value; - } - } - - // Allow subclasses to massage the input prior to running - oldString = this.castInput(oldString, options); - newString = this.castInput(newString, options); - oldString = this.removeEmpty(this.tokenize(oldString, options)); - newString = this.removeEmpty(this.tokenize(newString, options)); - var newLen = newString.length, - oldLen = oldString.length; - var editLength = 1; - var maxEditLength = newLen + oldLen; - if (options.maxEditLength != null) { - maxEditLength = Math.min(maxEditLength, options.maxEditLength); - } - var maxExecutionTime = - /*istanbul ignore start*/ - (_options$timeout = - /*istanbul ignore end*/ - options.timeout) !== null && _options$timeout !== void 0 ? _options$timeout : Infinity; - var abortAfterTimestamp = Date.now() + maxExecutionTime; - var bestPath = [{ - oldPos: -1, - lastComponent: undefined - }]; - - // Seed editLength = 0, i.e. the content starts with the same values - var newPos = this.extractCommon(bestPath[0], newString, oldString, 0, options); - if (bestPath[0].oldPos + 1 >= oldLen && newPos + 1 >= newLen) { - // Identity per the equality and tokenizer - return done(buildValues(self, bestPath[0].lastComponent, newString, oldString, self.useLongestToken)); - } - - // Once we hit the right edge of the edit graph on some diagonal k, we can - // definitely reach the end of the edit graph in no more than k edits, so - // there's no point in considering any moves to diagonal k+1 any more (from - // which we're guaranteed to need at least k+1 more edits). - // Similarly, once we've reached the bottom of the edit graph, there's no - // point considering moves to lower diagonals. - // We record this fact by setting minDiagonalToConsider and - // maxDiagonalToConsider to some finite value once we've hit the edge of - // the edit graph. - // This optimization is not faithful to the original algorithm presented in - // Myers's paper, which instead pointlessly extends D-paths off the end of - // the edit graph - see page 7 of Myers's paper which notes this point - // explicitly and illustrates it with a diagram. This has major performance - // implications for some common scenarios. For instance, to compute a diff - // where the new text simply appends d characters on the end of the - // original text of length n, the true Myers algorithm will take O(n+d^2) - // time while this optimization needs only O(n+d) time. - var minDiagonalToConsider = -Infinity, - maxDiagonalToConsider = Infinity; - - // Main worker method. checks all permutations of a given edit length for acceptance. - function execEditLength() { - for (var diagonalPath = Math.max(minDiagonalToConsider, -editLength); diagonalPath <= Math.min(maxDiagonalToConsider, editLength); diagonalPath += 2) { - var basePath = - /*istanbul ignore start*/ - void 0 - /*istanbul ignore end*/ - ; - var removePath = bestPath[diagonalPath - 1], - addPath = bestPath[diagonalPath + 1]; - if (removePath) { - // No one else is going to attempt to use this value, clear it - bestPath[diagonalPath - 1] = undefined; + class Diff { + diff(oldStr, newStr, + // Type below is not accurate/complete - see above for full possibilities - but it compiles + options = {}) { + let callback; + if (typeof options === 'function') { + callback = options; + options = {}; } - var canAdd = false; - if (addPath) { - // what newPos will be after we do an insertion: - var addPathNewPos = addPath.oldPos - diagonalPath; - canAdd = addPath && 0 <= addPathNewPos && addPathNewPos < newLen; + else if ('callback' in options) { + callback = options.callback; } - var canRemove = removePath && removePath.oldPos + 1 < oldLen; - if (!canAdd && !canRemove) { - // If this path is a terminal then prune - bestPath[diagonalPath] = undefined; - continue; + // Allow subclasses to massage the input prior to running + const oldString = this.castInput(oldStr, options); + const newString = this.castInput(newStr, options); + const oldTokens = this.removeEmpty(this.tokenize(oldString, options)); + const newTokens = this.removeEmpty(this.tokenize(newString, options)); + return this.diffWithOptionsObj(oldTokens, newTokens, options, callback); + } + diffWithOptionsObj(oldTokens, newTokens, options, callback) { + var _a; + const done = (value) => { + value = this.postProcess(value, options); + if (callback) { + setTimeout(function () { callback(value); }, 0); + return undefined; + } + else { + return value; + } + }; + const newLen = newTokens.length, oldLen = oldTokens.length; + let editLength = 1; + let maxEditLength = newLen + oldLen; + if (options.maxEditLength != null) { + maxEditLength = Math.min(maxEditLength, options.maxEditLength); } - - // Select the diagonal that we want to branch from. We select the prior - // path whose position in the old string is the farthest from the origin - // and does not pass the bounds of the diff graph - if (!canRemove || canAdd && removePath.oldPos < addPath.oldPos) { - basePath = self.addToPath(addPath, true, false, 0, options); - } else { - basePath = self.addToPath(removePath, false, true, 1, options); + const maxExecutionTime = (_a = options.timeout) !== null && _a !== void 0 ? _a : Infinity; + const abortAfterTimestamp = Date.now() + maxExecutionTime; + const bestPath = [{ oldPos: -1, lastComponent: undefined }]; + // Seed editLength = 0, i.e. the content starts with the same values + let newPos = this.extractCommon(bestPath[0], newTokens, oldTokens, 0, options); + if (bestPath[0].oldPos + 1 >= oldLen && newPos + 1 >= newLen) { + // Identity per the equality and tokenizer + return done(this.buildValues(bestPath[0].lastComponent, newTokens, oldTokens)); } - newPos = self.extractCommon(basePath, newString, oldString, diagonalPath, options); - if (basePath.oldPos + 1 >= oldLen && newPos + 1 >= newLen) { - // If we have hit the end of both strings, then we are done - return done(buildValues(self, basePath.lastComponent, newString, oldString, self.useLongestToken)); - } else { - bestPath[diagonalPath] = basePath; - if (basePath.oldPos + 1 >= oldLen) { - maxDiagonalToConsider = Math.min(maxDiagonalToConsider, diagonalPath - 1); - } - if (newPos + 1 >= newLen) { - minDiagonalToConsider = Math.max(minDiagonalToConsider, diagonalPath + 1); - } + // Once we hit the right edge of the edit graph on some diagonal k, we can + // definitely reach the end of the edit graph in no more than k edits, so + // there's no point in considering any moves to diagonal k+1 any more (from + // which we're guaranteed to need at least k+1 more edits). + // Similarly, once we've reached the bottom of the edit graph, there's no + // point considering moves to lower diagonals. + // We record this fact by setting minDiagonalToConsider and + // maxDiagonalToConsider to some finite value once we've hit the edge of + // the edit graph. + // This optimization is not faithful to the original algorithm presented in + // Myers's paper, which instead pointlessly extends D-paths off the end of + // the edit graph - see page 7 of Myers's paper which notes this point + // explicitly and illustrates it with a diagram. This has major performance + // implications for some common scenarios. For instance, to compute a diff + // where the new text simply appends d characters on the end of the + // original text of length n, the true Myers algorithm will take O(n+d^2) + // time while this optimization needs only O(n+d) time. + let minDiagonalToConsider = -Infinity, maxDiagonalToConsider = Infinity; + // Main worker method. checks all permutations of a given edit length for acceptance. + const execEditLength = () => { + for (let diagonalPath = Math.max(minDiagonalToConsider, -editLength); diagonalPath <= Math.min(maxDiagonalToConsider, editLength); diagonalPath += 2) { + let basePath; + const removePath = bestPath[diagonalPath - 1], addPath = bestPath[diagonalPath + 1]; + if (removePath) { + // No one else is going to attempt to use this value, clear it + // @ts-expect-error - perf optimisation. This type-violating value will never be read. + bestPath[diagonalPath - 1] = undefined; + } + let canAdd = false; + if (addPath) { + // what newPos will be after we do an insertion: + const addPathNewPos = addPath.oldPos - diagonalPath; + canAdd = addPath && 0 <= addPathNewPos && addPathNewPos < newLen; + } + const canRemove = removePath && removePath.oldPos + 1 < oldLen; + if (!canAdd && !canRemove) { + // If this path is a terminal then prune + // @ts-expect-error - perf optimisation. This type-violating value will never be read. + bestPath[diagonalPath] = undefined; + continue; + } + // Select the diagonal that we want to branch from. We select the prior + // path whose position in the old string is the farthest from the origin + // and does not pass the bounds of the diff graph + if (!canRemove || (canAdd && removePath.oldPos < addPath.oldPos)) { + basePath = this.addToPath(addPath, true, false, 0, options); + } + else { + basePath = this.addToPath(removePath, false, true, 1, options); + } + newPos = this.extractCommon(basePath, newTokens, oldTokens, diagonalPath, options); + if (basePath.oldPos + 1 >= oldLen && newPos + 1 >= newLen) { + // If we have hit the end of both strings, then we are done + return done(this.buildValues(basePath.lastComponent, newTokens, oldTokens)) || true; + } + else { + bestPath[diagonalPath] = basePath; + if (basePath.oldPos + 1 >= oldLen) { + maxDiagonalToConsider = Math.min(maxDiagonalToConsider, diagonalPath - 1); + } + if (newPos + 1 >= newLen) { + minDiagonalToConsider = Math.max(minDiagonalToConsider, diagonalPath + 1); + } + } + } + editLength++; + }; + // Performs the length of edit iteration. Is a bit fugly as this has to support the + // sync and async mode which is never fun. Loops over execEditLength until a value + // is produced, or until the edit length exceeds options.maxEditLength (if given), + // in which case it will return undefined. + if (callback) { + (function exec() { + setTimeout(function () { + if (editLength > maxEditLength || Date.now() > abortAfterTimestamp) { + return callback(undefined); + } + if (!execEditLength()) { + exec(); + } + }, 0); + }()); } - } - editLength++; - } - - // Performs the length of edit iteration. Is a bit fugly as this has to support the - // sync and async mode which is never fun. Loops over execEditLength until a value - // is produced, or until the edit length exceeds options.maxEditLength (if given), - // in which case it will return undefined. - if (callback) { - (function exec() { - setTimeout(function () { - if (editLength > maxEditLength || Date.now() > abortAfterTimestamp) { - return callback(); - } - if (!execEditLength()) { - exec(); - } - }, 0); - })(); - } else { - while (editLength <= maxEditLength && Date.now() <= abortAfterTimestamp) { - var ret = execEditLength(); - if (ret) { - return ret; + else { + while (editLength <= maxEditLength && Date.now() <= abortAfterTimestamp) { + const ret = execEditLength(); + if (ret) { + return ret; + } + } } - } } - }, - /*istanbul ignore start*/ - /*istanbul ignore end*/ - addToPath: function addToPath(path, added, removed, oldPosInc, options) { - var last = path.lastComponent; - if (last && !options.oneChangePerToken && last.added === added && last.removed === removed) { - return { - oldPos: path.oldPos + oldPosInc, - lastComponent: { - count: last.count + 1, - added: added, - removed: removed, - previousComponent: last.previousComponent + addToPath(path, added, removed, oldPosInc, options) { + const last = path.lastComponent; + if (last && !options.oneChangePerToken && last.added === added && last.removed === removed) { + return { + oldPos: path.oldPos + oldPosInc, + lastComponent: { count: last.count + 1, added: added, removed: removed, previousComponent: last.previousComponent } + }; } - }; - } else { - return { - oldPos: path.oldPos + oldPosInc, - lastComponent: { - count: 1, - added: added, - removed: removed, - previousComponent: last + else { + return { + oldPos: path.oldPos + oldPosInc, + lastComponent: { count: 1, added: added, removed: removed, previousComponent: last } + }; } - }; } - }, - /*istanbul ignore start*/ - /*istanbul ignore end*/ - extractCommon: function extractCommon(basePath, newString, oldString, diagonalPath, options) { - var newLen = newString.length, - oldLen = oldString.length, - oldPos = basePath.oldPos, - newPos = oldPos - diagonalPath, - commonCount = 0; - while (newPos + 1 < newLen && oldPos + 1 < oldLen && this.equals(oldString[oldPos + 1], newString[newPos + 1], options)) { - newPos++; - oldPos++; - commonCount++; - if (options.oneChangePerToken) { - basePath.lastComponent = { - count: 1, - previousComponent: basePath.lastComponent, - added: false, - removed: false - }; - } + extractCommon(basePath, newTokens, oldTokens, diagonalPath, options) { + const newLen = newTokens.length, oldLen = oldTokens.length; + let oldPos = basePath.oldPos, newPos = oldPos - diagonalPath, commonCount = 0; + while (newPos + 1 < newLen && oldPos + 1 < oldLen && this.equals(oldTokens[oldPos + 1], newTokens[newPos + 1], options)) { + newPos++; + oldPos++; + commonCount++; + if (options.oneChangePerToken) { + basePath.lastComponent = { count: 1, previousComponent: basePath.lastComponent, added: false, removed: false }; + } + } + if (commonCount && !options.oneChangePerToken) { + basePath.lastComponent = { count: commonCount, previousComponent: basePath.lastComponent, added: false, removed: false }; + } + basePath.oldPos = oldPos; + return newPos; } - if (commonCount && !options.oneChangePerToken) { - basePath.lastComponent = { - count: commonCount, - previousComponent: basePath.lastComponent, - added: false, - removed: false - }; + equals(left, right, options) { + if (options.comparator) { + return options.comparator(left, right); + } + else { + return left === right + || (!!options.ignoreCase && left.toLowerCase() === right.toLowerCase()); + } } - basePath.oldPos = oldPos; - return newPos; - }, - /*istanbul ignore start*/ - /*istanbul ignore end*/ - equals: function equals(left, right, options) { - if (options.comparator) { - return options.comparator(left, right); - } else { - return left === right || options.ignoreCase && left.toLowerCase() === right.toLowerCase(); + removeEmpty(array) { + const ret = []; + for (let i = 0; i < array.length; i++) { + if (array[i]) { + ret.push(array[i]); + } + } + return ret; } - }, - /*istanbul ignore start*/ - /*istanbul ignore end*/ - removeEmpty: function removeEmpty(array) { - var ret = []; - for (var i = 0; i < array.length; i++) { - if (array[i]) { - ret.push(array[i]); - } + // eslint-disable-next-line @typescript-eslint/no-unused-vars + castInput(value, options) { + return value; } - return ret; - }, - /*istanbul ignore start*/ - /*istanbul ignore end*/ - castInput: function castInput(value) { - return value; - }, - /*istanbul ignore start*/ - /*istanbul ignore end*/ - tokenize: function tokenize(value) { - return Array.from(value); - }, - /*istanbul ignore start*/ - /*istanbul ignore end*/ - join: function join(chars) { - return chars.join(''); - }, - /*istanbul ignore start*/ - /*istanbul ignore end*/ - postProcess: function postProcess(changeObjects) { - return changeObjects; - } - }; - function buildValues(diff, lastComponent, newString, oldString, useLongestToken) { - // First we convert our linked list of components in reverse order to an - // array in the right order: - var components = []; - var nextComponent; - while (lastComponent) { - components.push(lastComponent); - nextComponent = lastComponent.previousComponent; - delete lastComponent.previousComponent; - lastComponent = nextComponent; - } - components.reverse(); - var componentPos = 0, - componentLen = components.length, - newPos = 0, - oldPos = 0; - for (; componentPos < componentLen; componentPos++) { - var component = components[componentPos]; - if (!component.removed) { - if (!component.added && useLongestToken) { - var value = newString.slice(newPos, newPos + component.count); - value = value.map(function (value, i) { - var oldValue = oldString[oldPos + i]; - return oldValue.length > value.length ? oldValue : value; - }); - component.value = diff.join(value); - } else { - component.value = diff.join(newString.slice(newPos, newPos + component.count)); - } - newPos += component.count; - - // Common case - if (!component.added) { - oldPos += component.count; - } - } else { - component.value = diff.join(oldString.slice(oldPos, oldPos + component.count)); - oldPos += component.count; + // eslint-disable-next-line @typescript-eslint/no-unused-vars + tokenize(value, options) { + return Array.from(value); + } + join(chars) { + // Assumes ValueT is string, which is the case for most subclasses. + // When it's false, e.g. in diffArrays, this method needs to be overridden (e.g. with a no-op) + // Yes, the casts are verbose and ugly, because this pattern - of having the base class SORT OF + // assume tokens and values are strings, but not completely - is weird and janky. + return chars.join(''); + } + postProcess(changeObjects, + // eslint-disable-next-line @typescript-eslint/no-unused-vars + options) { + return changeObjects; + } + get useLongestToken() { + return false; + } + buildValues(lastComponent, newTokens, oldTokens) { + // First we convert our linked list of components in reverse order to an + // array in the right order: + const components = []; + let nextComponent; + while (lastComponent) { + components.push(lastComponent); + nextComponent = lastComponent.previousComponent; + delete lastComponent.previousComponent; + lastComponent = nextComponent; + } + components.reverse(); + const componentLen = components.length; + let componentPos = 0, newPos = 0, oldPos = 0; + for (; componentPos < componentLen; componentPos++) { + const component = components[componentPos]; + if (!component.removed) { + if (!component.added && this.useLongestToken) { + let value = newTokens.slice(newPos, newPos + component.count); + value = value.map(function (value, i) { + const oldValue = oldTokens[oldPos + i]; + return oldValue.length > value.length ? oldValue : value; + }); + component.value = this.join(value); + } + else { + component.value = this.join(newTokens.slice(newPos, newPos + component.count)); + } + newPos += component.count; + // Common case + if (!component.added) { + oldPos += component.count; + } + } + else { + component.value = this.join(oldTokens.slice(oldPos, oldPos + component.count)); + oldPos += component.count; + } + } + return components; } - } - return components; - } - - }(base)); - - var character = {}; - - /*istanbul ignore start*/ - - Object.defineProperty(character, "__esModule", { - value: true - }); - character.characterDiff = void 0; - character.diffChars = diffChars; - /*istanbul ignore end*/ - var - /*istanbul ignore start*/ - _base$6 = _interopRequireDefault$7(base) - /*istanbul ignore end*/ - ; - /*istanbul ignore start*/ function _interopRequireDefault$7(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - /*istanbul ignore end*/ - var characterDiff = - /*istanbul ignore start*/ - character.characterDiff = - /*istanbul ignore end*/ - new - /*istanbul ignore start*/ - _base$6 - /*istanbul ignore end*/ - [ - /*istanbul ignore start*/ - "default" - /*istanbul ignore end*/ - ](); - function diffChars(oldStr, newStr, options) { - return characterDiff.diff(oldStr, newStr, options); } - var word = {}; - - var string = {}; - - /*istanbul ignore start*/ - - Object.defineProperty(string, "__esModule", { - value: true - }); - string.hasOnlyUnixLineEndings = hasOnlyUnixLineEndings; - string.hasOnlyWinLineEndings = hasOnlyWinLineEndings; - string.longestCommonPrefix = longestCommonPrefix; - string.longestCommonSuffix = longestCommonSuffix; - string.maximumOverlap = maximumOverlap; - string.removePrefix = removePrefix; - string.removeSuffix = removeSuffix; - string.replacePrefix = replacePrefix; - string.replaceSuffix = replaceSuffix; - /*istanbul ignore end*/ - function longestCommonPrefix(str1, str2) { - var i; - for (i = 0; i < str1.length && i < str2.length; i++) { - if (str1[i] != str2[i]) { - return str1.slice(0, i); + // Based on https://en.wikipedia.org/wiki/Latin_script_in_Unicode + // + // Chars/ranges counted as "word" characters by this regex are as follows: + // + // + U+00AD Soft hyphen + // + 00C0–00FF (letters with diacritics from the Latin-1 Supplement), except: + // - U+00D7 × Multiplication sign + // - U+00F7 ÷ Division sign + // + Latin Extended-A, 0100–017F + // + Latin Extended-B, 0180–024F + // + IPA Extensions, 0250–02AF + // + Spacing Modifier Letters, 02B0–02FF, except: + // - U+02C7 ˇ ˇ Caron + // - U+02D8 ˘ ˘ Breve + // - U+02D9 ˙ ˙ Dot Above + // - U+02DA ˚ ˚ Ring Above + // - U+02DB ˛ ˛ Ogonek + // - U+02DC ˜ ˜ Small Tilde + // - U+02DD ˝ ˝ Double Acute Accent + // + Latin Extended Additional, 1E00–1EFF + const extendedWordChars = 'a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}'; + class WordsWithSpaceDiff extends Diff { + tokenize(value) { + // Slightly different to the tokenizeIncludingWhitespace regex used above in + // that this one treats each individual newline as a distinct token, rather + // than merging them into other surrounding whitespace. This was requested + // in https://github.com/kpdecker/jsdiff/issues/180 & + // https://github.com/kpdecker/jsdiff/issues/211 + const regex = new RegExp(`(\\r?\\n)|[${extendedWordChars}]+|[^\\S\\n\\r]+|[^${extendedWordChars}]`, 'ug'); + return value.match(regex) || []; + } + } + const wordsWithSpaceDiff = new WordsWithSpaceDiff(); + function diffWordsWithSpace(oldStr, newStr, options) { + return wordsWithSpaceDiff.diff(oldStr, newStr, options); + } + + class LineDiff extends Diff { + constructor() { + super(...arguments); + this.tokenize = tokenize; + } + equals(left, right, options) { + // If we're ignoring whitespace, we need to normalise lines by stripping + // whitespace before checking equality. (This has an annoying interaction + // with newlineIsToken that requires special handling: if newlines get their + // own token, then we DON'T want to trim the *newline* tokens down to empty + // strings, since this would cause us to treat whitespace-only line content + // as equal to a separator between lines, which would be weird and + // inconsistent with the documented behavior of the options.) + if (options.ignoreWhitespace) { + if (!options.newlineIsToken || !left.includes('\n')) { + left = left.trim(); + } + if (!options.newlineIsToken || !right.includes('\n')) { + right = right.trim(); + } + } + else if (options.ignoreNewlineAtEof && !options.newlineIsToken) { + if (left.endsWith('\n')) { + left = left.slice(0, -1); + } + if (right.endsWith('\n')) { + right = right.slice(0, -1); + } + } + return super.equals(left, right, options); } - } - return str1.slice(0, i); } - function longestCommonSuffix(str1, str2) { - var i; - - // Unlike longestCommonPrefix, we need a special case to handle all scenarios - // where we return the empty string since str1.slice(-0) will return the - // entire string. - if (!str1 || !str2 || str1[str1.length - 1] != str2[str2.length - 1]) { - return ''; - } - for (i = 0; i < str1.length && i < str2.length; i++) { - if (str1[str1.length - (i + 1)] != str2[str2.length - (i + 1)]) { - return str1.slice(-i); - } - } - return str1.slice(-i); - } - function replacePrefix(string, oldPrefix, newPrefix) { - if (string.slice(0, oldPrefix.length) != oldPrefix) { - throw Error( - /*istanbul ignore start*/ - "string ".concat( - /*istanbul ignore end*/ - JSON.stringify(string), " doesn't start with prefix ").concat(JSON.stringify(oldPrefix), "; this is a bug")); - } - return newPrefix + string.slice(oldPrefix.length); - } - function replaceSuffix(string, oldSuffix, newSuffix) { - if (!oldSuffix) { - return string + newSuffix; - } - if (string.slice(-oldSuffix.length) != oldSuffix) { - throw Error( - /*istanbul ignore start*/ - "string ".concat( - /*istanbul ignore end*/ - JSON.stringify(string), " doesn't end with suffix ").concat(JSON.stringify(oldSuffix), "; this is a bug")); - } - return string.slice(0, -oldSuffix.length) + newSuffix; - } - function removePrefix(string, oldPrefix) { - return replacePrefix(string, oldPrefix, ''); - } - function removeSuffix(string, oldSuffix) { - return replaceSuffix(string, oldSuffix, ''); + const lineDiff = new LineDiff(); + function diffLines(oldStr, newStr, options) { + return lineDiff.diff(oldStr, newStr, options); } - function maximumOverlap(string1, string2) { - return string2.slice(0, overlapCount(string1, string2)); - } - - // Nicked from https://stackoverflow.com/a/60422853/1709587 - function overlapCount(a, b) { - // Deal with cases where the strings differ in length - var startA = 0; - if (a.length > b.length) { - startA = a.length - b.length; - } - var endB = b.length; - if (a.length < b.length) { - endB = a.length; - } - // Create a back-reference for each index - // that should be followed in case of a mismatch. - // We only need B to make these references: - var map = Array(endB); - var k = 0; // Index that lags behind j - map[0] = 0; - for (var j = 1; j < endB; j++) { - if (b[j] == b[k]) { - map[j] = map[k]; // skip over the same character (optional optimisation) - } else { - map[j] = k; - } - while (k > 0 && b[j] != b[k]) { - k = map[k]; + // Exported standalone so it can be used from jsonDiff too. + function tokenize(value, options) { + if (options.stripTrailingCr) { + // remove one \r before \n to match GNU diff's --strip-trailing-cr behavior + value = value.replace(/\r\n/g, '\n'); } - if (b[j] == b[k]) { - k++; - } - } - // Phase 2: use these references while iterating over A - k = 0; - for (var i = startA; i < a.length; i++) { - while (k > 0 && a[i] != b[k]) { - k = map[k]; + const retLines = [], linesAndNewlines = value.split(/(\n|\r\n)/); + // Ignore the final empty token that occurs if the string ends with a new line + if (!linesAndNewlines[linesAndNewlines.length - 1]) { + linesAndNewlines.pop(); } - if (a[i] == b[k]) { - k++; + // Merge the content and line separators into single tokens + for (let i = 0; i < linesAndNewlines.length; i++) { + const line = linesAndNewlines[i]; + if (i % 2 && !options.newlineIsToken) { + retLines[retLines.length - 1] += line; + } + else { + retLines.push(line); + } } - } - return k; + return retLines; } /** - * Returns true if the string consistently uses Windows line endings. + * Returns true if the filename contains characters that require C-style + * quoting (as used by Git and GNU diffutils in diff output). */ - function hasOnlyWinLineEndings(string) { - return string.includes('\r\n') && !string.startsWith('\n') && !string.match(/[^\r]\n/); + function needsQuoting(s) { + for (let i = 0; i < s.length; i++) { + if (s[i] < '\x20' || s[i] > '\x7e' || s[i] === '"' || s[i] === '\\') { + return true; + } + } + return false; } - /** - * Returns true if the string consistently uses Unix line endings. + * C-style quotes a filename, encoding special characters as escape sequences + * and non-ASCII bytes as octal escapes. This is the inverse of + * `parseQuotedFileName` in parse.ts. + * + * Non-ASCII bytes are encoded as UTF-8 before being emitted as octal escapes. + * This matches the behaviour of both Git and GNU diffutils, which always emit + * UTF-8 octal escapes regardless of the underlying filesystem encoding (e.g. + * Git for Windows converts from NTFS's UTF-16 to UTF-8 internally). + * + * If the filename doesn't need quoting, returns it as-is. */ - function hasOnlyUnixLineEndings(string) { - return !string.includes('\r\n') && string.includes('\n'); - } - - /*istanbul ignore start*/ - - Object.defineProperty(word, "__esModule", { - value: true - }); - word.diffWords = diffWords; - word.diffWordsWithSpace = diffWordsWithSpace; - word.wordWithSpaceDiff = word.wordDiff = void 0; - /*istanbul ignore end*/ - var - /*istanbul ignore start*/ - _base$5 = _interopRequireDefault$6(base) - /*istanbul ignore end*/ - ; - var - /*istanbul ignore start*/ - _string$1 = string - /*istanbul ignore end*/ - ; - /*istanbul ignore start*/ function _interopRequireDefault$6(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - /*istanbul ignore end*/ - // Based on https://en.wikipedia.org/wiki/Latin_script_in_Unicode - // - // Ranges and exceptions: - // Latin-1 Supplement, 0080–00FF - // - U+00D7 × Multiplication sign - // - U+00F7 ÷ Division sign - // Latin Extended-A, 0100–017F - // Latin Extended-B, 0180–024F - // IPA Extensions, 0250–02AF - // Spacing Modifier Letters, 02B0–02FF - // - U+02C7 ˇ ˇ Caron - // - U+02D8 ˘ ˘ Breve - // - U+02D9 ˙ ˙ Dot Above - // - U+02DA ˚ ˚ Ring Above - // - U+02DB ˛ ˛ Ogonek - // - U+02DC ˜ ˜ Small Tilde - // - U+02DD ˝ ˝ Double Acute Accent - // Latin Extended Additional, 1E00–1EFF - var extendedWordChars = "a-zA-Z0-9_\\u{C0}-\\u{FF}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}"; - - // Each token is one of the following: - // - A punctuation mark plus the surrounding whitespace - // - A word plus the surrounding whitespace - // - Pure whitespace (but only in the special case where this the entire text - // is just whitespace) - // - // We have to include surrounding whitespace in the tokens because the two - // alternative approaches produce horribly broken results: - // * If we just discard the whitespace, we can't fully reproduce the original - // text from the sequence of tokens and any attempt to render the diff will - // get the whitespace wrong. - // * If we have separate tokens for whitespace, then in a typical text every - // second token will be a single space character. But this often results in - // the optimal diff between two texts being a perverse one that preserves - // the spaces between words but deletes and reinserts actual common words. - // See https://github.com/kpdecker/jsdiff/issues/160#issuecomment-1866099640 - // for an example. - // - // Keeping the surrounding whitespace of course has implications for .equals - // and .join, not just .tokenize. - - // This regex does NOT fully implement the tokenization rules described above. - // Instead, it gives runs of whitespace their own "token". The tokenize method - // then handles stitching whitespace tokens onto adjacent word or punctuation - // tokens. - var tokenizeIncludingWhitespace = new RegExp( - /*istanbul ignore start*/ - "[".concat( - /*istanbul ignore end*/ - extendedWordChars, "]+|\\s+|[^").concat(extendedWordChars, "]"), 'ug'); - var wordDiff = - /*istanbul ignore start*/ - word.wordDiff = - /*istanbul ignore end*/ - new - /*istanbul ignore start*/ - _base$5 - /*istanbul ignore end*/ - [ - /*istanbul ignore start*/ - "default" - /*istanbul ignore end*/ - ](); - wordDiff.equals = function (left, right, options) { - if (options.ignoreCase) { - left = left.toLowerCase(); - right = right.toLowerCase(); - } - return left.trim() === right.trim(); - }; - wordDiff.tokenize = function (value) { - /*istanbul ignore start*/ - var - /*istanbul ignore end*/ - options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - var parts; - if (options.intlSegmenter) { - if (options.intlSegmenter.resolvedOptions().granularity != 'word') { - throw new Error('The segmenter passed must have a granularity of "word"'); - } - parts = Array.from(options.intlSegmenter.segment(value), function (segment) - /*istanbul ignore start*/ - { - return ( - /*istanbul ignore end*/ - segment.segment - ); - }); - } else { - parts = value.match(tokenizeIncludingWhitespace) || []; - } - var tokens = []; - var prevPart = null; - parts.forEach(function (part) { - if (/\s/.test(part)) { - if (prevPart == null) { - tokens.push(part); - } else { - tokens.push(tokens.pop() + part); - } - } else if (/\s/.test(prevPart)) { - if (tokens[tokens.length - 1] == prevPart) { - tokens.push(tokens.pop() + part); - } else { - tokens.push(prevPart + part); - } - } else { - tokens.push(part); + function quoteFileNameIfNeeded(s) { + if (!needsQuoting(s)) { + return s; } - prevPart = part; - }); - return tokens; - }; - wordDiff.join = function (tokens) { - // Tokens being joined here will always have appeared consecutively in the - // same text, so we can simply strip off the leading whitespace from all the - // tokens except the first (and except any whitespace-only tokens - but such - // a token will always be the first and only token anyway) and then join them - // and the whitespace around words and punctuation will end up correct. - return tokens.map(function (token, i) { - if (i == 0) { - return token; - } else { - return token.replace(/^\s+/, ''); + let result = '"'; + const bytes = new TextEncoder().encode(s); + let i = 0; + while (i < bytes.length) { + const b = bytes[i]; + // See https://en.wikipedia.org/wiki/Escape_sequences_in_C#Escape_sequences + if (b === 0x07) { + result += '\\a'; + } + else if (b === 0x08) { + result += '\\b'; + } + else if (b === 0x09) { + result += '\\t'; + } + else if (b === 0x0a) { + result += '\\n'; + } + else if (b === 0x0b) { + result += '\\v'; + } + else if (b === 0x0c) { + result += '\\f'; + } + else if (b === 0x0d) { + result += '\\r'; + } + else if (b === 0x22) { + result += '\\"'; + } + else if (b === 0x5c) { + result += '\\\\'; + } + else if (b >= 0x20 && b <= 0x7e) { + // Just a printable ASCII character that is neither a double quote nor a + // backslash; no need to escape it. + result += String.fromCharCode(b); + } + else { + // Either part of a non-ASCII character or a control character without a + // special escape sequence; needs escaping as a 3-digit octal escape + result += '\\' + b.toString(8).padStart(3, '0'); + } + i++; } - }).join(''); + result += '"'; + return result; + } + const INCLUDE_HEADERS = { + includeIndex: true, + includeUnderline: true, + includeFileHeaders: true }; - wordDiff.postProcess = function (changes, options) { - if (!changes || options.oneChangePerToken) { - return changes; - } - var lastKeep = null; - // Change objects representing any insertion or deletion since the last - // "keep" change object. There can be at most one of each. - var insertion = null; - var deletion = null; - changes.forEach(function (change) { - if (change.added) { - insertion = change; - } else if (change.removed) { - deletion = change; - } else { - if (insertion || deletion) { - // May be false at start of text - dedupeWhitespaceInChangeObjects(lastKeep, deletion, insertion, change); - } - lastKeep = change; - insertion = null; - deletion = null; + function structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) { + let optionsObj; + { + optionsObj = {}; + } + if (typeof optionsObj.context === 'undefined') { + optionsObj.context = 4; + } + // We copy this into its own variable to placate TypeScript, which thinks + // optionsObj.context might be undefined in the callbacks below. + const context = optionsObj.context; + // @ts-expect-error (runtime check for something that is correctly a static type error) + if (optionsObj.newlineIsToken) { + throw new Error('newlineIsToken may not be used with patch-generation functions, only with diffing functions'); + } + if (!optionsObj.callback) { + return diffLinesResultToPatch(diffLines(oldStr, newStr, optionsObj)); + } + else { + const { callback } = optionsObj; + diffLines(oldStr, newStr, Object.assign(Object.assign({}, optionsObj), { callback: (diff) => { + const patch = diffLinesResultToPatch(diff); + // TypeScript is unhappy without the cast because it does not understand that `patch` may + // be undefined here only if `callback` is StructuredPatchCallbackAbortable: + callback(patch); + } })); + } + function diffLinesResultToPatch(diff) { + // STEP 1: Build up the patch with no "\ No newline at end of file" lines and with the arrays + // of lines containing trailing newline characters. We'll tidy up later... + if (!diff) { + return; + } + diff.push({ value: '', lines: [] }); // Append an empty value to make cleanup easier + function contextLines(lines) { + return lines.map(function (entry) { return ' ' + entry; }); + } + const hunks = []; + let oldRangeStart = 0, newRangeStart = 0, curRange = [], oldLine = 1, newLine = 1; + for (let i = 0; i < diff.length; i++) { + const current = diff[i], lines = current.lines || splitLines(current.value); + current.lines = lines; + if (current.added || current.removed) { + // If we have previous context, start with that + if (!oldRangeStart) { + const prev = diff[i - 1]; + oldRangeStart = oldLine; + newRangeStart = newLine; + if (prev) { + curRange = context > 0 ? contextLines(prev.lines.slice(-context)) : []; + oldRangeStart -= curRange.length; + newRangeStart -= curRange.length; + } + } + // Output our changes + for (const line of lines) { + curRange.push((current.added ? '+' : '-') + line); + } + // Track the updated file position + if (current.added) { + newLine += lines.length; + } + else { + oldLine += lines.length; + } + } + else { + // Identical context lines. Track line changes + if (oldRangeStart) { + // Close out any changes that have been output (or join overlapping) + if (lines.length <= context * 2 && i < diff.length - 2) { + // Overlapping + for (const line of contextLines(lines)) { + curRange.push(line); + } + } + else { + // end the range and output + const contextSize = Math.min(lines.length, context); + for (const line of contextLines(lines.slice(0, contextSize))) { + curRange.push(line); + } + const hunk = { + oldStart: oldRangeStart, + oldLines: (oldLine - oldRangeStart + contextSize), + newStart: newRangeStart, + newLines: (newLine - newRangeStart + contextSize), + lines: curRange + }; + hunks.push(hunk); + oldRangeStart = 0; + newRangeStart = 0; + curRange = []; + } + } + oldLine += lines.length; + newLine += lines.length; + } + } + // Step 2: eliminate the trailing `\n` from each line of each hunk, and, where needed, add + // "\ No newline at end of file". + for (const hunk of hunks) { + for (let i = 0; i < hunk.lines.length; i++) { + if (hunk.lines[i].endsWith('\n')) { + hunk.lines[i] = hunk.lines[i].slice(0, -1); + } + else { + hunk.lines.splice(i + 1, 0, '\\ No newline at end of file'); + i++; // Skip the line we just added, then continue iterating + } + } + } + return { + oldFileName: oldFileName, newFileName: newFileName, + oldHeader: oldHeader, newHeader: newHeader, + hunks: hunks + }; } - }); - if (insertion || deletion) { - dedupeWhitespaceInChangeObjects(lastKeep, deletion, insertion, null); - } - return changes; - }; - function diffWords(oldStr, newStr, options) { - // This option has never been documented and never will be (it's clearer to - // just call `diffWordsWithSpace` directly if you need that behavior), but - // has existed in jsdiff for a long time, so we retain support for it here - // for the sake of backwards compatibility. - if ( - /*istanbul ignore start*/ - ( - /*istanbul ignore end*/ - options === null || options === void 0 ? void 0 : options.ignoreWhitespace) != null && !options.ignoreWhitespace) { - return diffWordsWithSpace(oldStr, newStr, options); - } - return wordDiff.diff(oldStr, newStr, options); - } - function dedupeWhitespaceInChangeObjects(startKeep, deletion, insertion, endKeep) { - // Before returning, we tidy up the leading and trailing whitespace of the - // change objects to eliminate cases where trailing whitespace in one object - // is repeated as leading whitespace in the next. - // Below are examples of the outcomes we want here to explain the code. - // I=insert, K=keep, D=delete - // 1. diffing 'foo bar baz' vs 'foo baz' - // Prior to cleanup, we have K:'foo ' D:' bar ' K:' baz' - // After cleanup, we want: K:'foo ' D:'bar ' K:'baz' - // - // 2. Diffing 'foo bar baz' vs 'foo qux baz' - // Prior to cleanup, we have K:'foo ' D:' bar ' I:' qux ' K:' baz' - // After cleanup, we want K:'foo ' D:'bar' I:'qux' K:' baz' - // - // 3. Diffing 'foo\nbar baz' vs 'foo baz' - // Prior to cleanup, we have K:'foo ' D:'\nbar ' K:' baz' - // After cleanup, we want K'foo' D:'\nbar' K:' baz' - // - // 4. Diffing 'foo baz' vs 'foo\nbar baz' - // Prior to cleanup, we have K:'foo\n' I:'\nbar ' K:' baz' - // After cleanup, we ideally want K'foo' I:'\nbar' K:' baz' - // but don't actually manage this currently (the pre-cleanup change - // objects don't contain enough information to make it possible). - // - // 5. Diffing 'foo bar baz' vs 'foo baz' - // Prior to cleanup, we have K:'foo ' D:' bar ' K:' baz' - // After cleanup, we want K:'foo ' D:' bar ' K:'baz' - // - // Our handling is unavoidably imperfect in the case where there's a single - // indel between keeps and the whitespace has changed. For instance, consider - // diffing 'foo\tbar\nbaz' vs 'foo baz'. Unless we create an extra change - // object to represent the insertion of the space character (which isn't even - // a token), we have no way to avoid losing information about the texts' - // original whitespace in the result we return. Still, we do our best to - // output something that will look sensible if we e.g. print it with - // insertions in green and deletions in red. - - // Between two "keep" change objects (or before the first or after the last - // change object), we can have either: - // * A "delete" followed by an "insert" - // * Just an "insert" - // * Just a "delete" - // We handle the three cases separately. - if (deletion && insertion) { - var oldWsPrefix = deletion.value.match(/^\s*/)[0]; - var oldWsSuffix = deletion.value.match(/\s*$/)[0]; - var newWsPrefix = insertion.value.match(/^\s*/)[0]; - var newWsSuffix = insertion.value.match(/\s*$/)[0]; - if (startKeep) { - var commonWsPrefix = - /*istanbul ignore start*/ - (/*istanbul ignore end*/ - /*istanbul ignore start*/ - 0, _string$1 - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - longestCommonPrefix) - /*istanbul ignore end*/ - (oldWsPrefix, newWsPrefix); - startKeep.value = - /*istanbul ignore start*/ - (/*istanbul ignore end*/ - /*istanbul ignore start*/ - 0, _string$1 - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - replaceSuffix) - /*istanbul ignore end*/ - (startKeep.value, newWsPrefix, commonWsPrefix); - deletion.value = - /*istanbul ignore start*/ - (/*istanbul ignore end*/ - /*istanbul ignore start*/ - 0, _string$1 - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - removePrefix) - /*istanbul ignore end*/ - (deletion.value, commonWsPrefix); - insertion.value = - /*istanbul ignore start*/ - (/*istanbul ignore end*/ - /*istanbul ignore start*/ - 0, _string$1 - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - removePrefix) - /*istanbul ignore end*/ - (insertion.value, commonWsPrefix); - } - if (endKeep) { - var commonWsSuffix = - /*istanbul ignore start*/ - (/*istanbul ignore end*/ - /*istanbul ignore start*/ - 0, _string$1 - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - longestCommonSuffix) - /*istanbul ignore end*/ - (oldWsSuffix, newWsSuffix); - endKeep.value = - /*istanbul ignore start*/ - (/*istanbul ignore end*/ - /*istanbul ignore start*/ - 0, _string$1 - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - replacePrefix) - /*istanbul ignore end*/ - (endKeep.value, newWsSuffix, commonWsSuffix); - deletion.value = - /*istanbul ignore start*/ - (/*istanbul ignore end*/ - /*istanbul ignore start*/ - 0, _string$1 - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - removeSuffix) - /*istanbul ignore end*/ - (deletion.value, commonWsSuffix); - insertion.value = - /*istanbul ignore start*/ - (/*istanbul ignore end*/ - /*istanbul ignore start*/ - 0, _string$1 - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - removeSuffix) - /*istanbul ignore end*/ - (insertion.value, commonWsSuffix); - } - } else if (insertion) { - // The whitespaces all reflect what was in the new text rather than - // the old, so we essentially have no information about whitespace - // insertion or deletion. We just want to dedupe the whitespace. - // We do that by having each change object keep its trailing - // whitespace and deleting duplicate leading whitespace where - // present. - if (startKeep) { - insertion.value = insertion.value.replace(/^\s*/, ''); - } - if (endKeep) { - endKeep.value = endKeep.value.replace(/^\s*/, ''); - } - // otherwise we've got a deletion and no insertion - } else if (startKeep && endKeep) { - var newWsFull = endKeep.value.match(/^\s*/)[0], - delWsStart = deletion.value.match(/^\s*/)[0], - delWsEnd = deletion.value.match(/\s*$/)[0]; - - // Any whitespace that comes straight after startKeep in both the old and - // new texts, assign to startKeep and remove from the deletion. - var newWsStart = - /*istanbul ignore start*/ - (/*istanbul ignore end*/ - /*istanbul ignore start*/ - 0, _string$1 - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - longestCommonPrefix) - /*istanbul ignore end*/ - (newWsFull, delWsStart); - deletion.value = - /*istanbul ignore start*/ - (/*istanbul ignore end*/ - /*istanbul ignore start*/ - 0, _string$1 - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - removePrefix) - /*istanbul ignore end*/ - (deletion.value, newWsStart); - - // Any whitespace that comes straight before endKeep in both the old and - // new texts, and hasn't already been assigned to startKeep, assign to - // endKeep and remove from the deletion. - var newWsEnd = - /*istanbul ignore start*/ - (/*istanbul ignore end*/ - /*istanbul ignore start*/ - 0, _string$1 - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - longestCommonSuffix) - /*istanbul ignore end*/ - ( - /*istanbul ignore start*/ - (/*istanbul ignore end*/ - /*istanbul ignore start*/ - 0, _string$1 - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - removePrefix) - /*istanbul ignore end*/ - (newWsFull, newWsStart), delWsEnd); - deletion.value = - /*istanbul ignore start*/ - (/*istanbul ignore end*/ - /*istanbul ignore start*/ - 0, _string$1 - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - removeSuffix) - /*istanbul ignore end*/ - (deletion.value, newWsEnd); - endKeep.value = - /*istanbul ignore start*/ - (/*istanbul ignore end*/ - /*istanbul ignore start*/ - 0, _string$1 - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - replacePrefix) - /*istanbul ignore end*/ - (endKeep.value, newWsFull, newWsEnd); - - // If there's any whitespace from the new text that HASN'T already been - // assigned, assign it to the start: - startKeep.value = - /*istanbul ignore start*/ - (/*istanbul ignore end*/ - /*istanbul ignore start*/ - 0, _string$1 - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - replaceSuffix) - /*istanbul ignore end*/ - (startKeep.value, newWsFull, newWsFull.slice(0, newWsFull.length - newWsEnd.length)); - } else if (endKeep) { - // We are at the start of the text. Preserve all the whitespace on - // endKeep, and just remove whitespace from the end of deletion to the - // extent that it overlaps with the start of endKeep. - var endKeepWsPrefix = endKeep.value.match(/^\s*/)[0]; - var deletionWsSuffix = deletion.value.match(/\s*$/)[0]; - var overlap = - /*istanbul ignore start*/ - (/*istanbul ignore end*/ - /*istanbul ignore start*/ - 0, _string$1 - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - maximumOverlap) - /*istanbul ignore end*/ - (deletionWsSuffix, endKeepWsPrefix); - deletion.value = - /*istanbul ignore start*/ - (/*istanbul ignore end*/ - /*istanbul ignore start*/ - 0, _string$1 - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - removeSuffix) - /*istanbul ignore end*/ - (deletion.value, overlap); - } else if (startKeep) { - // We are at the END of the text. Preserve all the whitespace on - // startKeep, and just remove whitespace from the start of deletion to - // the extent that it overlaps with the end of startKeep. - var startKeepWsSuffix = startKeep.value.match(/\s*$/)[0]; - var deletionWsPrefix = deletion.value.match(/^\s*/)[0]; - var _overlap = - /*istanbul ignore start*/ - (/*istanbul ignore end*/ - /*istanbul ignore start*/ - 0, _string$1 - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - maximumOverlap) - /*istanbul ignore end*/ - (startKeepWsSuffix, deletionWsPrefix); - deletion.value = - /*istanbul ignore start*/ - (/*istanbul ignore end*/ - /*istanbul ignore start*/ - 0, _string$1 - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - removePrefix) - /*istanbul ignore end*/ - (deletion.value, _overlap); - } - } - var wordWithSpaceDiff = - /*istanbul ignore start*/ - word.wordWithSpaceDiff = - /*istanbul ignore end*/ - new - /*istanbul ignore start*/ - _base$5 - /*istanbul ignore end*/ - [ - /*istanbul ignore start*/ - "default" - /*istanbul ignore end*/ - ](); - wordWithSpaceDiff.tokenize = function (value) { - // Slightly different to the tokenizeIncludingWhitespace regex used above in - // that this one treats each individual newline as a distinct tokens, rather - // than merging them into other surrounding whitespace. This was requested - // in https://github.com/kpdecker/jsdiff/issues/180 & - // https://github.com/kpdecker/jsdiff/issues/211 - var regex = new RegExp( - /*istanbul ignore start*/ - "(\\r?\\n)|[".concat( - /*istanbul ignore end*/ - extendedWordChars, "]+|[^\\S\\n\\r]+|[^").concat(extendedWordChars, "]"), 'ug'); - return value.match(regex) || []; - }; - function diffWordsWithSpace(oldStr, newStr, options) { - return wordWithSpaceDiff.diff(oldStr, newStr, options); } - - var line = {}; - - var params = {}; - - /*istanbul ignore start*/ - - Object.defineProperty(params, "__esModule", { - value: true - }); - params.generateOptions = generateOptions; - /*istanbul ignore end*/ - function generateOptions(options, defaults) { - if (typeof options === 'function') { - defaults.callback = options; - } else if (options) { - for (var name in options) { - /* istanbul ignore else */ - if (options.hasOwnProperty(name)) { - defaults[name] = options[name]; - } + /** + * creates a unified diff patch. + * + * @param patch either a single structured patch object (as returned by `structuredPatch`) or an + * array of them (as returned by `parsePatch`). + * @param headerOptions behaves the same as the `headerOptions` option of `createTwoFilesPatch`. + * Ignored for patches where `isGit` is `true`. + * + * When a patch has `isGit: true`, `formatPatch` output is changed to more closely match Git's + * output: it emits a `diff --git` header, emits Git extended headers as appropriate based on + * properties like `isRename`, `isCreate`, `newMode`, etc, and will omit `---`/`+++` file + * headers for patches with no hunks (e.g. renames without content changes). + */ + function formatPatch(patch, headerOptions) { + var _a, _b, _c, _d, _e, _f; + if (!headerOptions) { + headerOptions = INCLUDE_HEADERS; } - } - return defaults; - } - - /*istanbul ignore start*/ - - Object.defineProperty(line, "__esModule", { - value: true - }); - line.diffLines = diffLines; - line.diffTrimmedLines = diffTrimmedLines; - line.lineDiff = void 0; - /*istanbul ignore end*/ - var - /*istanbul ignore start*/ - _base$4 = _interopRequireDefault$5(base) - /*istanbul ignore end*/ - ; - var - /*istanbul ignore start*/ - _params = params - /*istanbul ignore end*/ - ; - /*istanbul ignore start*/ function _interopRequireDefault$5(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - /*istanbul ignore end*/ - var lineDiff = - /*istanbul ignore start*/ - line.lineDiff = - /*istanbul ignore end*/ - new - /*istanbul ignore start*/ - _base$4 - /*istanbul ignore end*/ - [ - /*istanbul ignore start*/ - "default" - /*istanbul ignore end*/ - ](); - lineDiff.tokenize = function (value, options) { - if (options.stripTrailingCr) { - // remove one \r before \n to match GNU diff's --strip-trailing-cr behavior - value = value.replace(/\r\n/g, '\n'); - } - var retLines = [], - linesAndNewlines = value.split(/(\n|\r\n)/); - - // Ignore the final empty token that occurs if the string ends with a new line - if (!linesAndNewlines[linesAndNewlines.length - 1]) { - linesAndNewlines.pop(); - } - - // Merge the content and line separators into single tokens - for (var i = 0; i < linesAndNewlines.length; i++) { - var line = linesAndNewlines[i]; - if (i % 2 && !options.newlineIsToken) { - retLines[retLines.length - 1] += line; - } else { - retLines.push(line); + if (Array.isArray(patch)) { + if (patch.length > 1 && !headerOptions.includeFileHeaders && !patch.every(p => p.isGit)) { + throw new Error('Cannot omit file headers on a multi-file patch. ' + + '(The result would be unparseable; how would a tool trying to apply ' + + 'the patch know which changes are to which file?)'); + } + return patch.map(p => formatPatch(p, headerOptions)).join('\n'); + } + const ret = []; + // Git patches have a fixed header format (diff --git, extended headers, + // and ---/+++ when hunks are present), so headerOptions is ignored. + if (patch.isGit) { + headerOptions = INCLUDE_HEADERS; + // Emit Git-style diff --git header and extended headers. + // Git never puts /dev/null in the "diff --git" line; for file + // creations/deletions it uses the real filename on both sides. + if (!patch.oldFileName) { + throw new Error('oldFileName must be specified for Git patches'); + } + if (!patch.newFileName) { + throw new Error('newFileName must be specified for Git patches'); + } + let gitOldName = patch.oldFileName; + let gitNewName = patch.newFileName; + if (patch.isCreate && gitOldName === '/dev/null') { + gitOldName = gitNewName.replace(/^b\//, 'a/'); + } + else if (patch.isDelete && gitNewName === '/dev/null') { + gitNewName = gitOldName.replace(/^a\//, 'b/'); + } + ret.push('diff --git ' + quoteFileNameIfNeeded(gitOldName) + ' ' + quoteFileNameIfNeeded(gitNewName)); + if (patch.isDelete) { + ret.push('deleted file mode ' + ((_a = patch.oldMode) !== null && _a !== void 0 ? _a : '100644')); + } + if (patch.isCreate) { + ret.push('new file mode ' + ((_b = patch.newMode) !== null && _b !== void 0 ? _b : '100644')); + } + if (patch.oldMode && patch.newMode && !patch.isDelete && !patch.isCreate) { + ret.push('old mode ' + patch.oldMode); + ret.push('new mode ' + patch.newMode); + } + if (patch.isRename) { + ret.push('rename from ' + quoteFileNameIfNeeded(((_c = patch.oldFileName) !== null && _c !== void 0 ? _c : '').replace(/^a\//, ''))); + ret.push('rename to ' + quoteFileNameIfNeeded(((_d = patch.newFileName) !== null && _d !== void 0 ? _d : '').replace(/^b\//, ''))); + } + if (patch.isCopy) { + ret.push('copy from ' + quoteFileNameIfNeeded(((_e = patch.oldFileName) !== null && _e !== void 0 ? _e : '').replace(/^a\//, ''))); + ret.push('copy to ' + quoteFileNameIfNeeded(((_f = patch.newFileName) !== null && _f !== void 0 ? _f : '').replace(/^b\//, ''))); + } } - } - return retLines; - }; - lineDiff.equals = function (left, right, options) { - // If we're ignoring whitespace, we need to normalise lines by stripping - // whitespace before checking equality. (This has an annoying interaction - // with newlineIsToken that requires special handling: if newlines get their - // own token, then we DON'T want to trim the *newline* tokens down to empty - // strings, since this would cause us to treat whitespace-only line content - // as equal to a separator between lines, which would be weird and - // inconsistent with the documented behavior of the options.) - if (options.ignoreWhitespace) { - if (!options.newlineIsToken || !left.includes('\n')) { - left = left.trim(); + else { + if (headerOptions.includeIndex && patch.oldFileName == patch.newFileName && patch.oldFileName !== undefined) { + ret.push('Index: ' + patch.oldFileName); + } + if (headerOptions.includeUnderline) { + ret.push('==================================================================='); + } + } + // Emit --- / +++ file headers. For Git patches with no hunks (e.g. + // pure renames, mode-only changes), Git omits these, so we do too. + const hasHunks = patch.hunks.length > 0; + if (headerOptions.includeFileHeaders && patch.oldFileName !== undefined && patch.newFileName !== undefined + && (!patch.isGit || hasHunks)) { + ret.push('--- ' + quoteFileNameIfNeeded(patch.oldFileName) + (patch.oldHeader ? '\t' + patch.oldHeader : '')); + ret.push('+++ ' + quoteFileNameIfNeeded(patch.newFileName) + (patch.newHeader ? '\t' + patch.newHeader : '')); + } + for (let i = 0; i < patch.hunks.length; i++) { + const hunk = patch.hunks[i]; + // Unified Diff Format quirk: If the chunk size is 0, + // the first number is one lower than one would expect. + // https://www.artima.com/weblogs/viewpost.jsp?thread=164293 + const oldStart = hunk.oldLines === 0 ? hunk.oldStart - 1 : hunk.oldStart; + const newStart = hunk.newLines === 0 ? hunk.newStart - 1 : hunk.newStart; + ret.push('@@ -' + oldStart + ',' + hunk.oldLines + + ' +' + newStart + ',' + hunk.newLines + + ' @@'); + for (const line of hunk.lines) { + ret.push(line); + } } - if (!options.newlineIsToken || !right.includes('\n')) { - right = right.trim(); + return ret.join('\n') + '\n'; + } + function createTwoFilesPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) { + { + const patchObj = structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader); + if (!patchObj) { + return; + } + return formatPatch(patchObj, void 0 ); } - } else if (options.ignoreNewlineAtEof && !options.newlineIsToken) { - if (left.endsWith('\n')) { - left = left.slice(0, -1); + } + function createPatch(fileName, oldStr, newStr, oldHeader, newHeader, options) { + return createTwoFilesPatch(fileName, fileName, oldStr, newStr, oldHeader, newHeader); + } + /** + * Split `text` into an array of lines, including the trailing newline character (where present) + */ + function splitLines(text) { + const hasTrailingNl = text.endsWith('\n'); + const result = text.split('\n').map(line => line + '\n'); + if (hasTrailingNl) { + result.pop(); } - if (right.endsWith('\n')) { - right = right.slice(0, -1); + else { + result.push(result.pop().slice(0, -1)); } - } - return ( - /*istanbul ignore start*/ - _base$4 - /*istanbul ignore end*/ - [ - /*istanbul ignore start*/ - "default" - /*istanbul ignore end*/ - ].prototype.equals.call(this, left, right, options) - ); - }; - function diffLines(oldStr, newStr, callback) { - return lineDiff.diff(oldStr, newStr, callback); - } - - // Kept for backwards compatibility. This is a rather arbitrary wrapper method - // that just calls `diffLines` with `ignoreWhitespace: true`. It's confusing to - // have two ways to do exactly the same thing in the API, so we no longer - // document this one (library users should explicitly use `diffLines` with - // `ignoreWhitespace: true` instead) but we keep it around to maintain - // compatibility with code that used old versions. - function diffTrimmedLines(oldStr, newStr, callback) { - var options = - /*istanbul ignore start*/ - (/*istanbul ignore end*/ - /*istanbul ignore start*/ - 0, _params - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - generateOptions) - /*istanbul ignore end*/ - (callback, { - ignoreWhitespace: true - }); - return lineDiff.diff(oldStr, newStr, options); + return result; } - var sentence = {}; + /** + * Helpers. + */ - /*istanbul ignore start*/ + var ms$1; + var hasRequiredMs; - Object.defineProperty(sentence, "__esModule", { - value: true - }); - sentence.diffSentences = diffSentences; - sentence.sentenceDiff = void 0; - /*istanbul ignore end*/ - var - /*istanbul ignore start*/ - _base$3 = _interopRequireDefault$4(base) - /*istanbul ignore end*/ - ; - /*istanbul ignore start*/ function _interopRequireDefault$4(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - /*istanbul ignore end*/ - var sentenceDiff = - /*istanbul ignore start*/ - sentence.sentenceDiff = - /*istanbul ignore end*/ - new - /*istanbul ignore start*/ - _base$3 - /*istanbul ignore end*/ - [ - /*istanbul ignore start*/ - "default" - /*istanbul ignore end*/ - ](); - sentenceDiff.tokenize = function (value) { - return value.split(/(\S.+?[.!?])(?=\s+|$)/); - }; - function diffSentences(oldStr, newStr, callback) { - return sentenceDiff.diff(oldStr, newStr, callback); - } + function requireMs () { + if (hasRequiredMs) return ms$1; + hasRequiredMs = 1; + var s = 1000; + var m = s * 60; + var h = m * 60; + var d = h * 24; + var w = d * 7; + var y = d * 365.25; - var css = {}; + /** + * Parse or format the given `val`. + * + * Options: + * + * - `long` verbose formatting [false] + * + * @param {String|Number} val + * @param {Object} [options] + * @throws {Error} throw an error if val is not a non-empty string or a number + * @return {String|Number} + * @api public + */ + + ms$1 = function (val, options) { + options = options || {}; + var type = typeof val; + if (type === 'string' && val.length > 0) { + return parse(val); + } else if (type === 'number' && isFinite(val)) { + return options.long ? fmtLong(val) : fmtShort(val); + } + throw new Error( + 'val is not a non-empty string or a valid number. val=' + + JSON.stringify(val) + ); + }; - /*istanbul ignore start*/ + /** + * Parse the given `str` and return milliseconds. + * + * @param {String} str + * @return {Number} + * @api private + */ + + function parse(str) { + str = String(str); + if (str.length > 100) { + return; + } + var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec( + str + ); + if (!match) { + return; + } + var n = parseFloat(match[1]); + var type = (match[2] || 'ms').toLowerCase(); + switch (type) { + case 'years': + case 'year': + case 'yrs': + case 'yr': + case 'y': + return n * y; + case 'weeks': + case 'week': + case 'w': + return n * w; + case 'days': + case 'day': + case 'd': + return n * d; + case 'hours': + case 'hour': + case 'hrs': + case 'hr': + case 'h': + return n * h; + case 'minutes': + case 'minute': + case 'mins': + case 'min': + case 'm': + return n * m; + case 'seconds': + case 'second': + case 'secs': + case 'sec': + case 's': + return n * s; + case 'milliseconds': + case 'millisecond': + case 'msecs': + case 'msec': + case 'ms': + return n; + default: + return undefined; + } + } - Object.defineProperty(css, "__esModule", { - value: true - }); - css.cssDiff = void 0; - css.diffCss = diffCss; - /*istanbul ignore end*/ - var - /*istanbul ignore start*/ - _base$2 = _interopRequireDefault$3(base) - /*istanbul ignore end*/ - ; - /*istanbul ignore start*/ function _interopRequireDefault$3(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - /*istanbul ignore end*/ - var cssDiff = - /*istanbul ignore start*/ - css.cssDiff = - /*istanbul ignore end*/ - new - /*istanbul ignore start*/ - _base$2 - /*istanbul ignore end*/ - [ - /*istanbul ignore start*/ - "default" - /*istanbul ignore end*/ - ](); - cssDiff.tokenize = function (value) { - return value.split(/([{}:;,]|\s+)/); - }; - function diffCss(oldStr, newStr, callback) { - return cssDiff.diff(oldStr, newStr, callback); - } + /** + * Short format for `ms`. + * + * @param {Number} ms + * @return {String} + * @api private + */ + + function fmtShort(ms) { + var msAbs = Math.abs(ms); + if (msAbs >= d) { + return Math.round(ms / d) + 'd'; + } + if (msAbs >= h) { + return Math.round(ms / h) + 'h'; + } + if (msAbs >= m) { + return Math.round(ms / m) + 'm'; + } + if (msAbs >= s) { + return Math.round(ms / s) + 's'; + } + return ms + 'ms'; + } - var json$1 = {}; + /** + * Long format for `ms`. + * + * @param {Number} ms + * @return {String} + * @api private + */ + + function fmtLong(ms) { + var msAbs = Math.abs(ms); + if (msAbs >= d) { + return plural(ms, msAbs, d, 'day'); + } + if (msAbs >= h) { + return plural(ms, msAbs, h, 'hour'); + } + if (msAbs >= m) { + return plural(ms, msAbs, m, 'minute'); + } + if (msAbs >= s) { + return plural(ms, msAbs, s, 'second'); + } + return ms + ' ms'; + } - /*istanbul ignore start*/ + /** + * Pluralization helper. + */ - Object.defineProperty(json$1, "__esModule", { - value: true - }); - json$1.canonicalize = canonicalize; - json$1.diffJson = diffJson; - json$1.jsonDiff = void 0; - /*istanbul ignore end*/ - var - /*istanbul ignore start*/ - _base$1 = _interopRequireDefault$2(base) - /*istanbul ignore end*/ - ; - var - /*istanbul ignore start*/ - _line$1 = line - /*istanbul ignore end*/ - ; - /*istanbul ignore start*/ function _interopRequireDefault$2(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - function _typeof$3(o) { "@babel/helpers - typeof"; return _typeof$3 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof$3(o); } - /*istanbul ignore end*/ - var jsonDiff = - /*istanbul ignore start*/ - json$1.jsonDiff = - /*istanbul ignore end*/ - new - /*istanbul ignore start*/ - _base$1 - /*istanbul ignore end*/ - [ - /*istanbul ignore start*/ - "default" - /*istanbul ignore end*/ - ](); - // Discriminate between two lines of pretty-printed, serialized JSON where one of them has a - // dangling comma and the other doesn't. Turns out including the dangling comma yields the nicest output: - jsonDiff.useLongestToken = true; - jsonDiff.tokenize = - /*istanbul ignore start*/ - _line$1 - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - lineDiff - /*istanbul ignore end*/ - .tokenize; - jsonDiff.castInput = function (value, options) { - var - /*istanbul ignore start*/ - /*istanbul ignore end*/ - undefinedReplacement = options.undefinedReplacement, - /*istanbul ignore start*/ - _options$stringifyRep = - /*istanbul ignore end*/ - options.stringifyReplacer, - /*istanbul ignore start*/ - /*istanbul ignore end*/ - stringifyReplacer = _options$stringifyRep === void 0 ? function (k, v) - /*istanbul ignore start*/ - { - return ( - /*istanbul ignore end*/ - typeof v === 'undefined' ? undefinedReplacement : v - ); - } : _options$stringifyRep; - return typeof value === 'string' ? value : JSON.stringify(canonicalize(value, null, null, stringifyReplacer), stringifyReplacer, ' '); - }; - jsonDiff.equals = function (left, right, options) { - return ( - /*istanbul ignore start*/ - _base$1 - /*istanbul ignore end*/ - [ - /*istanbul ignore start*/ - "default" - /*istanbul ignore end*/ - ].prototype.equals.call(jsonDiff, left.replace(/,([\r\n])/g, '$1'), right.replace(/,([\r\n])/g, '$1'), options) - ); - }; - function diffJson(oldObj, newObj, options) { - return jsonDiff.diff(oldObj, newObj, options); + function plural(ms, msAbs, n, name) { + var isPlural = msAbs >= n * 1.5; + return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : ''); + } + return ms$1; } - // This function handles the presence of circular references by bailing out when encountering an - // object that is already on the "stack" of items being processed. Accepts an optional replacer - function canonicalize(obj, stack, replacementStack, replacer, key) { - stack = stack || []; - replacementStack = replacementStack || []; - if (replacer) { - obj = replacer(key, obj); - } - var i; - for (i = 0; i < stack.length; i += 1) { - if (stack[i] === obj) { - return replacementStack[i]; - } - } - var canonicalizedObj; - if ('[object Array]' === Object.prototype.toString.call(obj)) { - stack.push(obj); - canonicalizedObj = new Array(obj.length); - replacementStack.push(canonicalizedObj); - for (i = 0; i < obj.length; i += 1) { - canonicalizedObj[i] = canonicalize(obj[i], stack, replacementStack, replacer, key); - } - stack.pop(); - replacementStack.pop(); - return canonicalizedObj; - } - if (obj && obj.toJSON) { - obj = obj.toJSON(); - } - if ( - /*istanbul ignore start*/ - _typeof$3( - /*istanbul ignore end*/ - obj) === 'object' && obj !== null) { - stack.push(obj); - canonicalizedObj = {}; - replacementStack.push(canonicalizedObj); - var sortedKeys = [], - _key; - for (_key in obj) { - /* istanbul ignore else */ - if (Object.prototype.hasOwnProperty.call(obj, _key)) { - sortedKeys.push(_key); - } - } - sortedKeys.sort(); - for (i = 0; i < sortedKeys.length; i += 1) { - _key = sortedKeys[i]; - canonicalizedObj[_key] = canonicalize(obj[_key], stack, replacementStack, replacer, _key); - } - stack.pop(); - replacementStack.pop(); - } else { - canonicalizedObj = obj; - } - return canonicalizedObj; - } + var msExports = requireMs(); + var ms = /*@__PURE__*/getDefaultExportFromCjs(msExports); - var array$1 = {}; + var utils$1 = {}; - /*istanbul ignore start*/ + var picocolors_browser = {exports: {}}; - Object.defineProperty(array$1, "__esModule", { - value: true - }); - array$1.arrayDiff = void 0; - array$1.diffArrays = diffArrays; - /*istanbul ignore end*/ - var - /*istanbul ignore start*/ - _base = _interopRequireDefault$1(base) - /*istanbul ignore end*/ - ; - /*istanbul ignore start*/ function _interopRequireDefault$1(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - /*istanbul ignore end*/ - var arrayDiff = - /*istanbul ignore start*/ - array$1.arrayDiff = - /*istanbul ignore end*/ - new - /*istanbul ignore start*/ - _base - /*istanbul ignore end*/ - [ - /*istanbul ignore start*/ - "default" - /*istanbul ignore end*/ - ](); - arrayDiff.tokenize = function (value) { - return value.slice(); - }; - arrayDiff.join = arrayDiff.removeEmpty = function (value) { - return value; - }; - function diffArrays(oldArr, newArr, callback) { - return arrayDiff.diff(oldArr, newArr, callback); + var hasRequiredPicocolors_browser; + + function requirePicocolors_browser () { + if (hasRequiredPicocolors_browser) return picocolors_browser.exports; + hasRequiredPicocolors_browser = 1; + var x=String; + var create=function() {return {isColorSupported:false,reset:x,bold:x,dim:x,italic:x,underline:x,inverse:x,hidden:x,strikethrough:x,black:x,red:x,green:x,yellow:x,blue:x,magenta:x,cyan:x,white:x,gray:x,bgBlack:x,bgRed:x,bgGreen:x,bgYellow:x,bgBlue:x,bgMagenta:x,bgCyan:x,bgWhite:x,blackBright:x,redBright:x,greenBright:x,yellowBright:x,blueBright:x,magentaBright:x,cyanBright:x,whiteBright:x,bgBlackBright:x,bgRedBright:x,bgGreenBright:x,bgYellowBright:x,bgBlueBright:x,bgMagentaBright:x,bgCyanBright:x,bgWhiteBright:x}}; + picocolors_browser.exports=create(); + picocolors_browser.exports.createColors = create; + return picocolors_browser.exports; } - var apply = {}; + var isUnicodeSupported; + var hasRequiredIsUnicodeSupported; - var lineEndings = {}; + function requireIsUnicodeSupported () { + if (hasRequiredIsUnicodeSupported) return isUnicodeSupported; + hasRequiredIsUnicodeSupported = 1; - /*istanbul ignore start*/ + isUnicodeSupported = () => { + if (browser$1$1.platform !== 'win32') { + return true; + } - Object.defineProperty(lineEndings, "__esModule", { - value: true - }); - lineEndings.isUnix = isUnix; - lineEndings.isWin = isWin; - lineEndings.unixToWin = unixToWin; - lineEndings.winToUnix = winToUnix; - function _typeof$2(o) { "@babel/helpers - typeof"; return _typeof$2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof$2(o); } - function ownKeys$2(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } - function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2(Object(t), !0).forEach(function (r) { _defineProperty$2(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } - function _defineProperty$2(obj, key, value) { key = _toPropertyKey$2(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } - function _toPropertyKey$2(t) { var i = _toPrimitive$2(t, "string"); return "symbol" == _typeof$2(i) ? i : i + ""; } - function _toPrimitive$2(t, r) { if ("object" != _typeof$2(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof$2(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } - /*istanbul ignore end*/ - function unixToWin(patch) { - if (Array.isArray(patch)) { - return patch.map(unixToWin); - } - return ( - /*istanbul ignore start*/ - _objectSpread$2(_objectSpread$2({}, - /*istanbul ignore end*/ - patch), {}, { - hunks: patch.hunks.map(function (hunk) - /*istanbul ignore start*/ - { - return _objectSpread$2(_objectSpread$2({}, - /*istanbul ignore end*/ - hunk), {}, { - lines: hunk.lines.map(function (line, i) - /*istanbul ignore start*/ - { - var _hunk$lines; - return ( - /*istanbul ignore end*/ - line.startsWith('\\') || line.endsWith('\r') || - /*istanbul ignore start*/ - (_hunk$lines = - /*istanbul ignore end*/ - hunk.lines[i + 1]) !== null && _hunk$lines !== void 0 && - /*istanbul ignore start*/ - _hunk$lines - /*istanbul ignore end*/ - .startsWith('\\') ? line : line + '\r' - ); - }) - }); - }) - }) - ); - } - function winToUnix(patch) { - if (Array.isArray(patch)) { - return patch.map(winToUnix); - } - return ( - /*istanbul ignore start*/ - _objectSpread$2(_objectSpread$2({}, - /*istanbul ignore end*/ - patch), {}, { - hunks: patch.hunks.map(function (hunk) - /*istanbul ignore start*/ - { - return _objectSpread$2(_objectSpread$2({}, - /*istanbul ignore end*/ - hunk), {}, { - lines: hunk.lines.map(function (line) - /*istanbul ignore start*/ - { - return ( - /*istanbul ignore end*/ - line.endsWith('\r') ? line.substring(0, line.length - 1) : line - ); - }) - }); - }) - }) - ); + return Boolean(browser$1$1.env.CI) || + Boolean(browser$1$1.env.WT_SESSION) || // Windows Terminal + browser$1$1.env.TERM_PROGRAM === 'vscode' || + browser$1$1.env.TERM === 'xterm-256color' || + browser$1$1.env.TERM === 'alacritty'; + }; + return isUnicodeSupported; } - /** - * Returns true if the patch consistently uses Unix line endings (or only involves one line and has - * no line endings). - */ - function isUnix(patch) { - if (!Array.isArray(patch)) { - patch = [patch]; - } - return !patch.some(function (index) - /*istanbul ignore start*/ - { - return ( - /*istanbul ignore end*/ - index.hunks.some(function (hunk) - /*istanbul ignore start*/ - { - return ( - /*istanbul ignore end*/ - hunk.lines.some(function (line) - /*istanbul ignore start*/ - { - return ( - /*istanbul ignore end*/ - !line.startsWith('\\') && line.endsWith('\r') - ); - }) - ); - }) - ); - }); - } + var hasRequiredUtils; - /** - * Returns true if the patch uses Windows line endings and only Windows line endings. - */ - function isWin(patch) { - if (!Array.isArray(patch)) { - patch = [patch]; - } - return patch.some(function (index) - /*istanbul ignore start*/ - { - return ( - /*istanbul ignore end*/ - index.hunks.some(function (hunk) - /*istanbul ignore start*/ - { - return ( - /*istanbul ignore end*/ - hunk.lines.some(function (line) - /*istanbul ignore start*/ - { - return ( - /*istanbul ignore end*/ - line.endsWith('\r') - ); - }) - ); - }) - ); - }) && patch.every(function (index) - /*istanbul ignore start*/ - { - return ( - /*istanbul ignore end*/ - index.hunks.every(function (hunk) - /*istanbul ignore start*/ - { - return ( - /*istanbul ignore end*/ - hunk.lines.every(function (line, i) - /*istanbul ignore start*/ - { - var _hunk$lines2; - return ( - /*istanbul ignore end*/ - line.startsWith('\\') || line.endsWith('\r') || - /*istanbul ignore start*/ - ((_hunk$lines2 = - /*istanbul ignore end*/ - hunk.lines[i + 1]) === null || _hunk$lines2 === void 0 ? void 0 : - /*istanbul ignore start*/ - _hunk$lines2 - /*istanbul ignore end*/ - .startsWith('\\')) - ); - }) - ); - }) - ); - }); - } + function requireUtils () { + if (hasRequiredUtils) return utils$1; + hasRequiredUtils = 1; + (function (exports) { - var parse$2 = {}; + /** + * Various utility functions used throughout Mocha's codebase. + * @module utils + */ - /*istanbul ignore start*/ + /** + * Module dependencies. + */ + var path = require$$1$2; + var pc = /*@__PURE__*/ requirePicocolors_browser(); + var isUnicodeSupported = requireIsUnicodeSupported()(); - Object.defineProperty(parse$2, "__esModule", { - value: true - }); - parse$2.parsePatch = parsePatch; - /*istanbul ignore end*/ - function parsePatch(uniDiff) { - var diffstr = uniDiff.split(/\n/), - list = [], - i = 0; - function parseIndex() { - var index = {}; - list.push(index); - - // Parse diff metadata - while (i < diffstr.length) { - var line = diffstr[i]; - - // File header found, end parsing diff metadata - if (/^(\-\-\-|\+\+\+|@@)\s/.test(line)) { - break; - } + const MOCHA_ID_PROP_NAME = "__mocha_id__"; - // Diff index - var header = /^(?:Index:|diff(?: -r \w+)+)\s+(.+?)\s*$/.exec(line); - if (header) { - index.index = header[1]; - } - i++; - } + function htmlCodePointEscape(codePoint) { + return "&#x" + codePoint.toString(16).toUpperCase() + ";"; + } - // Parse file headers if they are defined. Unified diff requires them, but - // there's no technical issues to have an isolated hunk without file header - parseFileHeader(index); - parseFileHeader(index); + function shouldEscapeHtmlChar(codePoint) { + return ( + (codePoint >= 0x01 && codePoint <= 0x09) || + codePoint === 0x0b || + codePoint === 0x0c || + (codePoint >= 0x0e && codePoint <= 0x1f) || + codePoint === 0x22 || + codePoint === 0x26 || + codePoint === 0x27 || + codePoint === 0x3c || + codePoint === 0x3e || + codePoint === 0x60 || + codePoint === 0x7f || + codePoint === 0x81 || + codePoint === 0x8d || + codePoint === 0x8f || + codePoint === 0x90 || + codePoint === 0x9d || + codePoint >= 0xa0 + ); + } - // Parse hunks - index.hunks = []; - while (i < diffstr.length) { - var _line = diffstr[i]; - if (/^(Index:\s|diff\s|\-\-\-\s|\+\+\+\s|===================================================================)/.test(_line)) { - break; - } else if (/^@@/.test(_line)) { - index.hunks.push(parseHunk()); - } else if (_line) { - throw new Error('Unknown line ' + (i + 1) + ' ' + JSON.stringify(_line)); - } else { - i++; - } - } - } + /** + * Escape special characters in the given string of html. + * + * @private + * @param {string} html + * @return {string} + */ + exports.escape = function (html) { + var string = String(html); + var escaped = ""; + + for (var index = 0; index < string.length; index++) { + var codePoint = string.charCodeAt(index); + + if ( + codePoint >= 0xd800 && + codePoint <= 0xdbff && + index + 1 < string.length + ) { + var low = string.charCodeAt(index + 1); + + if (low >= 0xdc00 && low <= 0xdfff) { + // Decode a UTF-16 surrogate pair into a single Unicode code point. + // See https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae + codePoint = (codePoint - 0xd800) * 0x400 + low - 0xdc00 + 0x10000; + escaped += htmlCodePointEscape(codePoint); + index++; + continue; + } + } + + escaped += shouldEscapeHtmlChar(codePoint) + ? htmlCodePointEscape(codePoint) + : string.charAt(index); + } + + return escaped; + }; - // Parses the --- and +++ headers, if none are found, no lines - // are consumed. - function parseFileHeader(index) { - var fileHeader = /^(---|\+\+\+)\s+(.*)\r?$/.exec(diffstr[i]); - if (fileHeader) { - var keyPrefix = fileHeader[1] === '---' ? 'old' : 'new'; - var data = fileHeader[2].split('\t', 2); - var fileName = data[0].replace(/\\\\/g, '\\'); - if (/^".*"$/.test(fileName)) { - fileName = fileName.substr(1, fileName.length - 2); - } - index[keyPrefix + 'FileName'] = fileName; - index[keyPrefix + 'Header'] = (data[1] || '').trim(); - i++; - } - } - - // Parses a hunk - // This assumes that we are at the start of a hunk. - function parseHunk() { - var chunkHeaderIndex = i, - chunkHeaderLine = diffstr[i++], - chunkHeader = chunkHeaderLine.split(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/); - var hunk = { - oldStart: +chunkHeader[1], - oldLines: typeof chunkHeader[2] === 'undefined' ? 1 : +chunkHeader[2], - newStart: +chunkHeader[3], - newLines: typeof chunkHeader[4] === 'undefined' ? 1 : +chunkHeader[4], - lines: [] - }; + /** + * Test if the given obj is type of string. + * + * @private + * @param {Object} obj + * @return {boolean} + */ + exports.isString = function (obj) { + return typeof obj === "string"; + }; - // Unified Diff Format quirk: If the chunk size is 0, - // the first number is one lower than one would expect. - // https://www.artima.com/weblogs/viewpost.jsp?thread=164293 - if (hunk.oldLines === 0) { - hunk.oldStart += 1; - } - if (hunk.newLines === 0) { - hunk.newStart += 1; - } - var addCount = 0, - removeCount = 0; - for (; i < diffstr.length && (removeCount < hunk.oldLines || addCount < hunk.newLines || - /*istanbul ignore start*/ - (_diffstr$i = - /*istanbul ignore end*/ - diffstr[i]) !== null && _diffstr$i !== void 0 && - /*istanbul ignore start*/ - _diffstr$i - /*istanbul ignore end*/ - .startsWith('\\')); i++) { - /*istanbul ignore start*/ - var _diffstr$i; - /*istanbul ignore end*/ - var operation = diffstr[i].length == 0 && i != diffstr.length - 1 ? ' ' : diffstr[i][0]; - if (operation === '+' || operation === '-' || operation === ' ' || operation === '\\') { - hunk.lines.push(diffstr[i]); - if (operation === '+') { - addCount++; - } else if (operation === '-') { - removeCount++; - } else if (operation === ' ') { - addCount++; - removeCount++; - } - } else { - throw new Error( - /*istanbul ignore start*/ - "Hunk at line ".concat( - /*istanbul ignore end*/ - chunkHeaderIndex + 1, " contained invalid line ").concat(diffstr[i])); - } - } + /** + * Compute a slug from the given `str`. + * + * @private + * @param {string} str + * @return {string} + */ + exports.slug = function (str) { + return str + .toLowerCase() + .replace(/\s+/g, "-") + .replace(/[^-\w]/g, "") + .replace(/-{2,}/g, "-"); + }; - // Handle the empty block count case - if (!addCount && hunk.newLines === 1) { - hunk.newLines = 0; - } - if (!removeCount && hunk.oldLines === 1) { - hunk.oldLines = 0; - } + /** + * Strip the function definition from `str`, and re-indent for pre whitespace. + * + * @param {string} str + * @return {string} + */ + exports.clean = function (str) { + str = str + .replace(/\r\n?|[\n\u2028\u2029]/g, "\n") + .replace(/^\uFEFF/, "") + // (traditional)-> space/name parameters body (lambda)-> parameters body multi-statement/single keep body content + .replace( + /^function(?:\s*|\s[^(]*)\([^)]*\)\s*\{((?:.|\n)*?)\}$|^\([^)]*\)\s*=>\s*(?:\{((?:.|\n)*?)\}|((?:.|\n)*))$/, + "$1$2$3", + ); + + var spaces = str.match(/^\n?( *)/)[1].length; + var tabs = str.match(/^\n?(\t*)/)[1].length; + var re = new RegExp( + "^\n?" + (tabs ? "\t" : " ") + "{" + (tabs || spaces) + "}", + "gm", + ); + + str = str.replace(re, ""); + + return str.trim(); + }; - // Perform sanity checking - if (addCount !== hunk.newLines) { - throw new Error('Added line count did not match for hunk at line ' + (chunkHeaderIndex + 1)); - } - if (removeCount !== hunk.oldLines) { - throw new Error('Removed line count did not match for hunk at line ' + (chunkHeaderIndex + 1)); - } - return hunk; - } - while (i < diffstr.length) { - parseIndex(); - } - return list; - } + /** + * If a value could have properties, and has none, this function is called, + * which returns a string representation of the empty value. + * + * Functions w/ no properties return `'[Function]'` + * Arrays w/ length === 0 return `'[]'` + * Objects w/ no properties return `'{}'` + * All else: return result of `value.toString()` + * + * @private + * @param {*} value The value to inspect. + * @param {string} typeHint The type of the value + * @returns {string} + */ + function emptyRepresentation(value, typeHint) { + switch (typeHint) { + case "function": + return "[Function]"; + case "null-prototype": + case "object": + return "{}"; + case "array": + return "[]"; + default: + return value.toString(); + } + } - var distanceIterator = {}; + /** + * Takes some variable and asks `Object.prototype.toString()` what it thinks it + * is. + * + * @private + * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/toString + * @param {*} value The value to test. + * @returns {string} Computed type + * @example + * canonicalType({}) // 'object' + * canonicalType([]) // 'array' + * canonicalType(1) // 'number' + * canonicalType(false) // 'boolean' + * canonicalType(Infinity) // 'number' + * canonicalType(null) // 'null' + * canonicalType(new Date()) // 'date' + * canonicalType(/foo/) // 'regexp' + * canonicalType('type') // 'string' + * canonicalType(global) // 'global' + * canonicalType(new String('foo') // 'object' + * canonicalType(async function() {}) // 'asyncfunction' + * canonicalType(Object.create(null)) // 'null-prototype' + */ + var canonicalType = (exports.canonicalType = function canonicalType(value) { + if (value === undefined) { + return "undefined"; + } else if (value === null) { + return "null"; + } else if (Buffer.isBuffer(value)) { + return "buffer"; + } else if (Object.getPrototypeOf(value) === null) { + return "null-prototype"; + } + + return Object.prototype.toString + .call(value) + .replace(/^\[.+\s(.+?)]$/, "$1") + .toLowerCase(); + }); - /*istanbul ignore start*/ + /** + * + * Returns a general type or data structure of a variable + * @private + * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures + * @param {*} value The value to test. + * @returns {string} One of undefined, boolean, number, string, bigint, symbol, object + * @example + * type({}) // 'object' + * type([]) // 'array' + * type(1) // 'number' + * type(false) // 'boolean' + * type(Infinity) // 'number' + * type(null) // 'null' + * type(new Date()) // 'object' + * type(/foo/) // 'object' + * type('type') // 'string' + * type(global) // 'object' + * type(new String('foo') // 'string' + */ + exports.type = function type(value) { + // Null is special + if (value === null) return "null"; + const primitives = new Set([ + "undefined", + "boolean", + "number", + "string", + "bigint", + "symbol", + ]); + const _type = typeof value; + if (_type === "function") return _type; + if (primitives.has(_type)) return _type; + if (value instanceof String) return "string"; + if (value instanceof Error) return "error"; + if (Array.isArray(value)) return "array"; + + return _type; + }; - (function (exports) { + /** + * Stringify `value`. Different behavior depending on type of value: + * + * - If `value` is undefined or null, return `'[undefined]'` or `'[null]'`, respectively. + * - If `value` is not an object, function or array, return result of `value.toString()` wrapped in double-quotes. + * - If `value` is an *empty* object, function, or array, return result of function + * {@link emptyRepresentation}. + * - If `value` has properties, call {@link exports.canonicalize} on it, then return result of + * JSON.stringify(). + * + * @private + * @see exports.type + * @param {*} value + * @return {string} + */ + exports.stringify = function (value) { + var typeHint = canonicalType(value); + + if (!~["object", "array", "function", "null-prototype"].indexOf(typeHint)) { + if (typeHint === "buffer") { + var json = Buffer.prototype.toJSON.call(value); + // Based on the toJSON result + return jsonStringify( + json.data && json.type ? json.data : json, + 2, + ).replace(/,(\n|$)/g, "$1"); + } + + // Boxed String objects (new String("foo")): expand into character-indexed object. + if (typeHint === "string" && typeof value === "object") { + value = value.split("").reduce(function (acc, char, idx) { + acc[idx] = char; + return acc; + }, {}); + typeHint = "object"; + } else { + return jsonStringify(value); + } + } + + for (var prop in value) { + if (Object.prototype.hasOwnProperty.call(value, prop)) { + return jsonStringify( + exports.canonicalize(value, null, typeHint), + 2, + ).replace(/,(\n|$)/g, "$1"); + } + } + + return emptyRepresentation(value, typeHint); + }; - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports["default"] = _default; - /*istanbul ignore end*/ - // Iterator that traverses in the range of [min, max], stepping - // by distance from a given start position. I.e. for [0, 4], with - // start of 2, this will iterate 2, 3, 1, 4, 0. - function - /*istanbul ignore start*/ - _default - /*istanbul ignore end*/ - (start, minLine, maxLine) { - var wantForward = true, - backwardExhausted = false, - forwardExhausted = false, - localOffset = 1; - return function iterator() { - if (wantForward && !forwardExhausted) { - if (backwardExhausted) { - localOffset++; - } else { - wantForward = false; - } + /** + * like JSON.stringify but more sense. + * + * @private + * @param {Object} object + * @param {number=} spaces + * @param {number=} depth + * @returns {*} + */ + function jsonStringify(object, spaces, depth) { + if (typeof spaces === "undefined") { + // primitive types + return _stringify(object); + } + + depth = depth || 1; + var space = spaces * depth; + var str = Array.isArray(object) ? "[" : "{"; + var end = Array.isArray(object) ? "]" : "}"; + var length = + typeof object.length === "number" + ? object.length + : Object.keys(object).length; + function _stringify(val) { + switch (canonicalType(val)) { + case "null": + case "undefined": + val = "[" + val + "]"; + break; + case "array": + case "object": + val = jsonStringify(val, spaces, depth + 1); + break; + case "boolean": + case "regexp": + case "symbol": + case "number": + val = + val === 0 && 1 / val === -Infinity // `-0` + ? "-0" + : val.toString(); + break; + case "bigint": + val = val.toString() + "n"; + break; + case "date": + var sDate = isNaN(val.getTime()) ? val.toString() : val.toISOString(); + val = "[Date: " + sDate + "]"; + break; + case "buffer": + var json = val.toJSON(); + // Based on the toJSON result + json = json.data && json.type ? json.data : json; + val = "[Buffer: " + jsonStringify(json, 2, depth + 1) + "]"; + break; + default: + val = + val === "[Function]" || val === "[Circular]" + ? val + : JSON.stringify(val); // string + } + return val; + } + + for (var i in object) { + if (!Object.prototype.hasOwnProperty.call(object, i)) { + continue; // not my business + } + --length; + str += + "\n " + + " ".repeat(space - 1) + + (Array.isArray(object) ? "" : '"' + i + '": ') + // key + _stringify(object[i]) + // value + (length ? "," : ""); // comma + } + + return ( + str + + // [], {} + (str.length !== 1 ? "\n" + " ".repeat(Math.max(0, space - 2)) + end : end) + ); + } - // Check if trying to fit beyond text length, and if not, check it fits - // after offset location (or desired location on first iteration) - if (start + localOffset <= maxLine) { - return start + localOffset; - } - forwardExhausted = true; - } - if (!backwardExhausted) { - if (!forwardExhausted) { - wantForward = true; - } + /** + * Return a new Thing that has the keys in sorted order. Recursive. + * + * If the Thing... + * - has already been seen, return string `'[Circular]'` + * - is `undefined`, return string `'[undefined]'` + * - is `null`, return value `null` + * - is some other primitive, return the value + * - is not a primitive or an `Array`, `Object`, or `Function`, return the value of the Thing's `toString()` method + * - is a non-empty `Array`, `Object`, or `Function`, return the result of calling this function again. + * - is an empty `Array`, `Object`, or `Function`, return the result of calling `emptyRepresentation()` + * + * @private + * @see {@link exports.stringify} + * @param {*} value Thing to inspect. May or may not have properties. + * @param {Array} [stack=[]] Stack of seen values + * @param {string} [typeHint] Type hint + * @return {(Object|Array|Function|string|undefined)} + */ + exports.canonicalize = function canonicalize(value, stack, typeHint) { + var canonicalizedObj; + + var prop; + + typeHint = typeHint || canonicalType(value); + function withStack(value, fn) { + stack.push(value); + fn(); + stack.pop(); + } + + stack = stack || []; + + if (stack.indexOf(value) !== -1) { + return "[Circular]"; + } + + switch (typeHint) { + case "undefined": + case "buffer": + case "null": + canonicalizedObj = value; + break; + case "array": + withStack(value, function () { + canonicalizedObj = value.map(function (item) { + return exports.canonicalize(item, stack); + }); + }); + break; + case "function": + /* eslint-disable-next-line no-unused-vars */ + for (prop in value) { + canonicalizedObj = {}; + break; + } + + if (!canonicalizedObj) { + canonicalizedObj = emptyRepresentation(value, typeHint); + break; + } + /* falls through */ + case "null-prototype": + case "object": + canonicalizedObj = canonicalizedObj || {}; + if (typeHint === "null-prototype" && Symbol.toStringTag in value) { + canonicalizedObj["[Symbol.toStringTag]"] = value[Symbol.toStringTag]; + } + withStack(value, function () { + Object.keys(value) + .sort() + .forEach(function (key) { + canonicalizedObj[key] = exports.canonicalize(value[key], stack); + }); + }); + break; + case "date": + case "number": + case "regexp": + case "boolean": + case "symbol": + canonicalizedObj = value; + break; + default: + canonicalizedObj = value + ""; + } + + return canonicalizedObj; + }; - // Check if trying to fit before text beginning, and if not, check it fits - // before offset location - if (minLine <= start - localOffset) { - return start - localOffset++; - } - backwardExhausted = true; - return iterator(); - } + /** + * @summary + * This Filter based on `mocha-clean` module.(see: `github.com/rstacruz/mocha-clean`) + * @description + * When invoking this function you get a filter function that get the Error.stack as an input, + * and return a prettify output. + * (i.e: strip Mocha and internal node functions from stack trace). + * @returns {Function} + */ + exports.stackTraceFilter = function () { + // TODO: Replace with `process.browser` + var is = typeof document === "undefined" ? { node: true } : { }; + var slash = path.sep; + var cwd; + if (is.node) { + cwd = exports.cwd() + slash; + } else { + cwd = ( + typeof location === "undefined" ? window.location : location + ).href.replace(/\/[^/]*$/, "/"); + slash = "/"; + } + + function isMochaInternal(line) { + return ( + ~line.indexOf("node_modules" + slash + "mocha" + slash) || + ~line.indexOf(slash + "mocha.js") || + ~line.indexOf(slash + "mocha.min.js") + ); + } + + function isNodeInternal(line) { + return ( + ~line.indexOf("(timers.js:") || + ~line.indexOf("(events.js:") || + ~line.indexOf("(node.js:") || + ~line.indexOf("(module.js:") || + ~line.indexOf("GeneratorFunctionPrototype.next (native)") || + false + ); + } + + return function (stack) { + stack = stack.split("\n"); + + stack = stack.reduce(function (list, line) { + if (isMochaInternal(line)) { + return list; + } + + if (is.node && isNodeInternal(line)) { + return list; + } + + // Clean up cwd(absolute) + if (/:\d+:\d+\)?$/.test(line)) { + line = line.replace("(" + cwd, "("); + } + + list.push(line); + return list; + }, []); + + return stack.join("\n"); + }; + }; - // We tried to fit hunk before text beginning and beyond text length, then - // hunk can't fit on the text. Return undefined - }; - } + /** + * Crude, but effective. + * @public + * @param {*} value + * @returns {boolean} Whether or not `value` is a Promise + */ + exports.isPromise = function isPromise(value) { + return ( + typeof value === "object" && + value !== null && + typeof value.then === "function" + ); + }; - }(distanceIterator)); + /** + * Clamps a numeric value to an inclusive range. + * + * @param {number} value - Value to be clamped. + * @param {number[]} range - Two element array specifying [min, max] range. + * @returns {number} clamped value + */ + exports.clamp = function clamp(value, range) { + return Math.min(Math.max(value, range[0]), range[1]); + }; - /*istanbul ignore start*/ + /** + * It's a noop. + * @public + */ + exports.noop = function () {}; + + /** + * Creates a map-like object. + * + * @description + * A "map" is an object with no prototype, for our purposes. In some cases + * this would be more appropriate than a `Map`, especially if your environment + * doesn't support it. Recommended for use in Mocha's public APIs. + * + * @public + * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map#Custom_and_Null_objects|MDN:Map} + * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/create#Custom_and_Null_objects|MDN:Object.create - Custom objects} + * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign#Custom_and_Null_objects|MDN:Object.assign} + * @param {...*} [obj] - Arguments to `Object.assign()`. + * @returns {Object} An object with no prototype, having `...obj` properties + */ + exports.createMap = function () { + return Object.assign.apply( + null, + [Object.create(null)].concat(Array.prototype.slice.call(arguments)), + ); + }; - Object.defineProperty(apply, "__esModule", { - value: true - }); - apply.applyPatch = applyPatch; - apply.applyPatches = applyPatches; - /*istanbul ignore end*/ - var - /*istanbul ignore start*/ - _string = string - /*istanbul ignore end*/ - ; - var - /*istanbul ignore start*/ - _lineEndings = lineEndings - /*istanbul ignore end*/ - ; - var - /*istanbul ignore start*/ - _parse$1 = parse$2 - /*istanbul ignore end*/ - ; - var - /*istanbul ignore start*/ - _distanceIterator = _interopRequireDefault(distanceIterator) - /*istanbul ignore end*/ - ; - /*istanbul ignore start*/ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - /*istanbul ignore end*/ - function applyPatch(source, uniDiff) { - /*istanbul ignore start*/ - var - /*istanbul ignore end*/ - options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; - if (typeof uniDiff === 'string') { - uniDiff = - /*istanbul ignore start*/ - (/*istanbul ignore end*/ - /*istanbul ignore start*/ - 0, _parse$1 - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - parsePatch) - /*istanbul ignore end*/ - (uniDiff); - } - if (Array.isArray(uniDiff)) { - if (uniDiff.length > 1) { - throw new Error('applyPatch only works with a single input.'); - } - uniDiff = uniDiff[0]; - } - if (options.autoConvertLineEndings || options.autoConvertLineEndings == null) { - if ( - /*istanbul ignore start*/ - (/*istanbul ignore end*/ - /*istanbul ignore start*/ - 0, _string - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - hasOnlyWinLineEndings) - /*istanbul ignore end*/ - (source) && - /*istanbul ignore start*/ - (/*istanbul ignore end*/ - /*istanbul ignore start*/ - 0, _lineEndings - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - isUnix) - /*istanbul ignore end*/ - (uniDiff)) { - uniDiff = - /*istanbul ignore start*/ - (/*istanbul ignore end*/ - /*istanbul ignore start*/ - 0, _lineEndings - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - unixToWin) - /*istanbul ignore end*/ - (uniDiff); - } else if ( - /*istanbul ignore start*/ - (/*istanbul ignore end*/ - /*istanbul ignore start*/ - 0, _string - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - hasOnlyUnixLineEndings) - /*istanbul ignore end*/ - (source) && - /*istanbul ignore start*/ - (/*istanbul ignore end*/ - /*istanbul ignore start*/ - 0, _lineEndings - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - isWin) - /*istanbul ignore end*/ - (uniDiff)) { - uniDiff = - /*istanbul ignore start*/ - (/*istanbul ignore end*/ - /*istanbul ignore start*/ - 0, _lineEndings - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - winToUnix) - /*istanbul ignore end*/ - (uniDiff); - } - } - - // Apply the diff to the input - var lines = source.split('\n'), - hunks = uniDiff.hunks, - compareLine = options.compareLine || function (lineNumber, line, operation, patchContent) - /*istanbul ignore start*/ - { - return ( - /*istanbul ignore end*/ - line === patchContent - ); - }, - fuzzFactor = options.fuzzFactor || 0, - minLine = 0; - if (fuzzFactor < 0 || !Number.isInteger(fuzzFactor)) { - throw new Error('fuzzFactor must be a non-negative integer'); - } - - // Special case for empty patch. - if (!hunks.length) { - return source; - } - - // Before anything else, handle EOFNL insertion/removal. If the patch tells us to make a change - // to the EOFNL that is redundant/impossible - i.e. to remove a newline that's not there, or add a - // newline that already exists - then we either return false and fail to apply the patch (if - // fuzzFactor is 0) or simply ignore the problem and do nothing (if fuzzFactor is >0). - // If we do need to remove/add a newline at EOF, this will always be in the final hunk: - var prevLine = '', - removeEOFNL = false, - addEOFNL = false; - for (var i = 0; i < hunks[hunks.length - 1].lines.length; i++) { - var line = hunks[hunks.length - 1].lines[i]; - if (line[0] == '\\') { - if (prevLine[0] == '+') { - removeEOFNL = true; - } else if (prevLine[0] == '-') { - addEOFNL = true; - } - } - prevLine = line; - } - if (removeEOFNL) { - if (addEOFNL) { - // This means the final line gets changed but doesn't have a trailing newline in either the - // original or patched version. In that case, we do nothing if fuzzFactor > 0, and if - // fuzzFactor is 0, we simply validate that the source file has no trailing newline. - if (!fuzzFactor && lines[lines.length - 1] == '') { - return false; - } - } else if (lines[lines.length - 1] == '') { - lines.pop(); - } else if (!fuzzFactor) { - return false; - } - } else if (addEOFNL) { - if (lines[lines.length - 1] != '') { - lines.push(''); - } else if (!fuzzFactor) { - return false; - } - } + /** + * Creates a read-only map-like object. + * + * @description + * This differs from {@link module:utils.createMap createMap} only in that + * the argument must be non-empty, because the result is frozen. + * + * @see {@link module:utils.createMap createMap} + * @param {...*} [obj] - Arguments to `Object.assign()`. + * @returns {Object} A frozen object with no prototype, having `...obj` properties + * @throws {TypeError} if argument is not a non-empty object. + */ + exports.defineConstants = function (obj) { + if (canonicalType(obj) !== "object" || !Object.keys(obj).length) { + throw new TypeError("Invalid argument; expected a non-empty object"); + } + return Object.freeze(exports.createMap(obj)); + }; - /** - * Checks if the hunk can be made to fit at the provided location with at most `maxErrors` - * insertions, substitutions, or deletions, while ensuring also that: - * - lines deleted in the hunk match exactly, and - * - wherever an insertion operation or block of insertion operations appears in the hunk, the - * immediately preceding and following lines of context match exactly - * - * `toPos` should be set such that lines[toPos] is meant to match hunkLines[0]. - * - * If the hunk can be applied, returns an object with properties `oldLineLastI` and - * `replacementLines`. Otherwise, returns null. - */ - function applyHunk(hunkLines, toPos, maxErrors) { - /*istanbul ignore start*/ - var - /*istanbul ignore end*/ - hunkLinesI = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0; - /*istanbul ignore start*/ - var - /*istanbul ignore end*/ - lastContextLineMatched = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true; - /*istanbul ignore start*/ - var - /*istanbul ignore end*/ - patchedLines = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : []; - /*istanbul ignore start*/ - var - /*istanbul ignore end*/ - patchedLinesLength = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : 0; - var nConsecutiveOldContextLines = 0; - var nextContextLineMustMatch = false; - for (; hunkLinesI < hunkLines.length; hunkLinesI++) { - var hunkLine = hunkLines[hunkLinesI], - operation = hunkLine.length > 0 ? hunkLine[0] : ' ', - content = hunkLine.length > 0 ? hunkLine.substr(1) : hunkLine; - if (operation === '-') { - if (compareLine(toPos + 1, lines[toPos], operation, content)) { - toPos++; - nConsecutiveOldContextLines = 0; - } else { - if (!maxErrors || lines[toPos] == null) { - return null; - } - patchedLines[patchedLinesLength] = lines[toPos]; - return applyHunk(hunkLines, toPos + 1, maxErrors - 1, hunkLinesI, false, patchedLines, patchedLinesLength + 1); - } - } - if (operation === '+') { - if (!lastContextLineMatched) { - return null; - } - patchedLines[patchedLinesLength] = content; - patchedLinesLength++; - nConsecutiveOldContextLines = 0; - nextContextLineMustMatch = true; - } - if (operation === ' ') { - nConsecutiveOldContextLines++; - patchedLines[patchedLinesLength] = lines[toPos]; - if (compareLine(toPos + 1, lines[toPos], operation, content)) { - patchedLinesLength++; - lastContextLineMatched = true; - nextContextLineMustMatch = false; - toPos++; - } else { - if (nextContextLineMustMatch || !maxErrors) { - return null; - } + /** + * Returns current working directory + * + * Wrapper around `process.cwd()` for isolation + * @private + */ + exports.cwd = function cwd() { + return browser$1$1.cwd(); + }; - // Consider 3 possibilities in sequence: - // 1. lines contains a *substitution* not included in the patch context, or - // 2. lines contains an *insertion* not included in the patch context, or - // 3. lines contains a *deletion* not included in the patch context - // The first two options are of course only possible if the line from lines is non-null - - // i.e. only option 3 is possible if we've overrun the end of the old file. - return lines[toPos] && (applyHunk(hunkLines, toPos + 1, maxErrors - 1, hunkLinesI + 1, false, patchedLines, patchedLinesLength + 1) || applyHunk(hunkLines, toPos + 1, maxErrors - 1, hunkLinesI, false, patchedLines, patchedLinesLength + 1)) || applyHunk(hunkLines, toPos, maxErrors - 1, hunkLinesI + 1, false, patchedLines, patchedLinesLength); - } - } - } + /** + * Returns `true` if Mocha is running in a browser. + * Checks for `process.browser`. + * @returns {boolean} + * @private + */ + exports.isBrowser = function isBrowser() { + return Boolean(browser$1$1.browser); + }; - // Before returning, trim any unmodified context lines off the end of patchedLines and reduce - // toPos (and thus oldLineLastI) accordingly. This allows later hunks to be applied to a region - // that starts in this hunk's trailing context. - patchedLinesLength -= nConsecutiveOldContextLines; - toPos -= nConsecutiveOldContextLines; - patchedLines.length = patchedLinesLength; - return { - patchedLines: patchedLines, - oldLineLastI: toPos - 1 - }; - } - var resultLines = []; - - // Search best fit offsets for each hunk based on the previous ones - var prevHunkOffset = 0; - for (var _i = 0; _i < hunks.length; _i++) { - var hunk = hunks[_i]; - var hunkResult = - /*istanbul ignore start*/ - void 0 - /*istanbul ignore end*/ - ; - var maxLine = lines.length - hunk.oldLines + fuzzFactor; - var toPos = - /*istanbul ignore start*/ - void 0 - /*istanbul ignore end*/ - ; - for (var maxErrors = 0; maxErrors <= fuzzFactor; maxErrors++) { - toPos = hunk.oldStart + prevHunkOffset - 1; - var iterator = - /*istanbul ignore start*/ - (/*istanbul ignore end*/ - /*istanbul ignore start*/ - 0, _distanceIterator - /*istanbul ignore end*/ - [ - /*istanbul ignore start*/ - "default" - /*istanbul ignore end*/ - ])(toPos, minLine, maxLine); - for (; toPos !== undefined; toPos = iterator()) { - hunkResult = applyHunk(hunk.lines, toPos, maxErrors); - if (hunkResult) { - break; - } - } - if (hunkResult) { - break; - } - } - if (!hunkResult) { - return false; - } + /* + * Casts `value` to an array; useful for optionally accepting array parameters + * + * It follows these rules, depending on `value`. If `value` is... + * 1. `undefined`: return an empty Array + * 2. `null`: return an array with a single `null` element + * 3. Any other object: return the value of `Array.from()` _if_ the object is iterable + * 4. otherwise: return an array with a single element, `value` + * @param {*} value - Something to cast to an Array + * @returns {Array<*>} + */ + exports.castArray = function castArray(value) { + if (value === undefined) { + return []; + } + if (value === null) { + return [null]; + } + if ( + typeof value === "object" && + (typeof value[Symbol.iterator] === "function" || value.length !== undefined) + ) { + return Array.from(value); + } + return [value]; + }; - // Copy everything from the end of where we applied the last hunk to the start of this hunk - for (var _i2 = minLine; _i2 < toPos; _i2++) { - resultLines.push(lines[_i2]); - } + exports.constants = exports.defineConstants({ + MOCHA_ID_PROP_NAME, + }); - // Add the lines produced by applying the hunk: - for (var _i3 = 0; _i3 < hunkResult.patchedLines.length; _i3++) { - var _line = hunkResult.patchedLines[_i3]; - resultLines.push(_line); - } + const uniqueIDBase = + "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_"; + + /** + * Creates a new unique identifier + * Does not create cryptographically safe ids. + * Trivial copy of nanoid/non-secure + * @returns {string} Unique identifier + */ + exports.uniqueID = () => { + let id = ""; + for (let i = 0; i < 21; i++) { + id += uniqueIDBase[(Math.random() * 64) | 0]; + } + return id; + }; - // Set lower text limit to end of the current hunk, so next ones don't try - // to fit over already patched text - minLine = hunkResult.oldLineLastI + 1; + exports.assignNewMochaID = (obj) => { + const id = exports.uniqueID(); + Object.defineProperty(obj, MOCHA_ID_PROP_NAME, { + get() { + return id; + }, + }); + return obj; + }; - // Note the offset between where the patch said the hunk should've applied and where we - // applied it, so we can adjust future hunks accordingly: - prevHunkOffset = toPos + 1 - hunk.oldStart; - } + /** + * Retrieves a Mocha ID from an object, if present. + * @param {*} [obj] - Object + * @returns {string|void} + */ + exports.getMochaID = (obj) => + obj && typeof obj === "object" ? obj[MOCHA_ID_PROP_NAME] : undefined; + + /** + * Replaces any detected circular dependency with the string '[Circular]' + * Mutates original object + * @param inputObj {*} + * @returns {*} + */ + exports.breakCircularDeps = (inputObj) => { + const seen = new Set(); + + function _breakCircularDeps(obj) { + if (obj && typeof obj !== "object") { + return obj; + } + + if (seen.has(obj)) { + return "[Circular]"; + } + + seen.add(obj); + for (const k in obj) { + const descriptor = Object.getOwnPropertyDescriptor(obj, k); + + if (descriptor && descriptor.writable) { + obj[k] = _breakCircularDeps(obj[k]); + } + } + + // deleting means only a seen object that is its own child will be detected + seen.delete(obj); + return obj; + } + + return _breakCircularDeps(inputObj); + }; - // Copy over the rest of the lines from the old text - for (var _i4 = minLine; _i4 < lines.length; _i4++) { - resultLines.push(lines[_i4]); - } - return resultLines.join('\n'); - } + /** + * Checks if provided input can be parsed as a JavaScript Number. + */ + exports.isNumeric = (input) => { + return !isNaN(parseFloat(input)); + }; - // Wrapper that supports multiple file patches via callbacks. - function applyPatches(uniDiff, options) { - if (typeof uniDiff === 'string') { - uniDiff = - /*istanbul ignore start*/ - (/*istanbul ignore end*/ - /*istanbul ignore start*/ - 0, _parse$1 - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - parsePatch) - /*istanbul ignore end*/ - (uniDiff); - } - var currentIndex = 0; - function processIndex() { - var index = uniDiff[currentIndex++]; - if (!index) { - return options.complete(); - } - options.loadFile(index, function (err, data) { - if (err) { - return options.complete(err); - } - var updatedContent = applyPatch(data, index, options); - options.patched(index, updatedContent, function (err) { - if (err) { - return options.complete(err); - } - processIndex(); - }); - }); - } - processIndex(); - } + /** + * Checks if being ran in a CI environment. + * + * This uses the CI env variable, which is set by most popular CI providers. Some + * examples include: + * Github: https://docs.github.com/en/actions/reference/workflows-and-actions/variables + * Gitlab: https://docs.gitlab.com/ci/variables/predefined_variables/ + * CircleCI: https://circleci.com/docs/reference/variables/#built-in-environment-variables + * Bitbucket: https://support.atlassian.com/bitbucket-cloud/docs/variables-and-secrets/ + */ + exports.isCI = () => { + return !!browser$1$1.env.CI; + }; - var merge$1 = {}; + exports.logSymbols = { + info: pc.blue(isUnicodeSupported ? "ℹ" : "i"), + success: pc.green(isUnicodeSupported ? "✔" : "√"), + warning: pc.yellow(isUnicodeSupported ? "⚠" : "‼"), + error: pc.red(isUnicodeSupported ? "✖" : "×"), + }; + } (utils$1)); + return utils$1; + } - var create = {}; + var utilsExports = requireUtils(); + var utils = /*@__PURE__*/getDefaultExportFromCjs(utilsExports); - /*istanbul ignore start*/ + var supportsColor = {}; - Object.defineProperty(create, "__esModule", { - value: true + var _nodeResolve_empty = /*#__PURE__*/Object.freeze({ + __proto__: null, + default: supportsColor }); - create.createPatch = createPatch; - create.createTwoFilesPatch = createTwoFilesPatch; - create.formatPatch = formatPatch; - create.structuredPatch = structuredPatch; - /*istanbul ignore end*/ - var - /*istanbul ignore start*/ - _line = line - /*istanbul ignore end*/ - ; - /*istanbul ignore start*/ function _typeof$1(o) { "@babel/helpers - typeof"; return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof$1(o); } - function _toConsumableArray$1(arr) { return _arrayWithoutHoles$1(arr) || _iterableToArray$1(arr) || _unsupportedIterableToArray$1(arr) || _nonIterableSpread$1(); } - function _nonIterableSpread$1() { 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 _unsupportedIterableToArray$1(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray$1(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$1(o, minLen); } - function _iterableToArray$1(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); } - function _arrayWithoutHoles$1(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$1(arr); } - function _arrayLikeToArray$1(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 ownKeys$1(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } - function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1(Object(t), !0).forEach(function (r) { _defineProperty$1(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } - function _defineProperty$1(obj, key, value) { key = _toPropertyKey$1(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } - function _toPropertyKey$1(t) { var i = _toPrimitive$1(t, "string"); return "symbol" == _typeof$1(i) ? i : i + ""; } - function _toPrimitive$1(t, r) { if ("object" != _typeof$1(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof$1(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } - /*istanbul ignore end*/ - function structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) { - if (!options) { - options = {}; - } - if (typeof options === 'function') { - options = { - callback: options - }; - } - if (typeof options.context === 'undefined') { - options.context = 4; - } - if (options.newlineIsToken) { - throw new Error('newlineIsToken may not be used with patch-generation functions, only with diffing functions'); - } - if (!options.callback) { - return diffLinesResultToPatch( - /*istanbul ignore start*/ - (/*istanbul ignore end*/ - /*istanbul ignore start*/ - 0, _line - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - diffLines) - /*istanbul ignore end*/ - (oldStr, newStr, options)); - } else { - var - /*istanbul ignore start*/ - _options = - /*istanbul ignore end*/ - options, - /*istanbul ignore start*/ - /*istanbul ignore end*/ - _callback = _options.callback; - /*istanbul ignore start*/ - (/*istanbul ignore end*/ - /*istanbul ignore start*/ - 0, _line - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - diffLines) - /*istanbul ignore end*/ - (oldStr, newStr, - /*istanbul ignore start*/ - _objectSpread$1(_objectSpread$1({}, - /*istanbul ignore end*/ - options), {}, { - callback: function - /*istanbul ignore start*/ - callback - /*istanbul ignore end*/ - (diff) { - var patch = diffLinesResultToPatch(diff); - _callback(patch); - } - })); - } - function diffLinesResultToPatch(diff) { - // STEP 1: Build up the patch with no "\ No newline at end of file" lines and with the arrays - // of lines containing trailing newline characters. We'll tidy up later... - - if (!diff) { - return; - } - diff.push({ - value: '', - lines: [] - }); // Append an empty value to make cleanup easier - function contextLines(lines) { - return lines.map(function (entry) { - return ' ' + entry; - }); - } - var hunks = []; - var oldRangeStart = 0, - newRangeStart = 0, - curRange = [], - oldLine = 1, - newLine = 1; - /*istanbul ignore start*/ - var _loop = function _loop() - /*istanbul ignore end*/ - { - var current = diff[i], - lines = current.lines || splitLines(current.value); - current.lines = lines; - if (current.added || current.removed) { - /*istanbul ignore start*/ - var _curRange; - /*istanbul ignore end*/ - // If we have previous context, start with that - if (!oldRangeStart) { - var prev = diff[i - 1]; - oldRangeStart = oldLine; - newRangeStart = newLine; - if (prev) { - curRange = options.context > 0 ? contextLines(prev.lines.slice(-options.context)) : []; - oldRangeStart -= curRange.length; - newRangeStart -= curRange.length; - } - } + var require$$0$1 = /*@__PURE__*/getAugmentedNamespace(_polyfillNode_events); - // Output our changes - /*istanbul ignore start*/ - /*istanbul ignore end*/ - /*istanbul ignore start*/ - (_curRange = - /*istanbul ignore end*/ - curRange).push.apply( - /*istanbul ignore start*/ - _curRange - /*istanbul ignore end*/ - , - /*istanbul ignore start*/ - _toConsumableArray$1( - /*istanbul ignore end*/ - lines.map(function (entry) { - return (current.added ? '+' : '-') + entry; - }))); - - // Track the updated file position - if (current.added) { - newLine += lines.length; - } else { - oldLine += lines.length; - } - } else { - // Identical context lines. Track line changes - if (oldRangeStart) { - // Close out any changes that have been output (or join overlapping) - if (lines.length <= options.context * 2 && i < diff.length - 2) { - /*istanbul ignore start*/ - var _curRange2; - /*istanbul ignore end*/ - // Overlapping - /*istanbul ignore start*/ - /*istanbul ignore end*/ - /*istanbul ignore start*/ - (_curRange2 = - /*istanbul ignore end*/ - curRange).push.apply( - /*istanbul ignore start*/ - _curRange2 - /*istanbul ignore end*/ - , - /*istanbul ignore start*/ - _toConsumableArray$1( - /*istanbul ignore end*/ - contextLines(lines))); - } else { - /*istanbul ignore start*/ - var _curRange3; - /*istanbul ignore end*/ - // end the range and output - var contextSize = Math.min(lines.length, options.context); - /*istanbul ignore start*/ - /*istanbul ignore end*/ - /*istanbul ignore start*/ - (_curRange3 = - /*istanbul ignore end*/ - curRange).push.apply( - /*istanbul ignore start*/ - _curRange3 - /*istanbul ignore end*/ - , - /*istanbul ignore start*/ - _toConsumableArray$1( - /*istanbul ignore end*/ - contextLines(lines.slice(0, contextSize)))); - var _hunk = { - oldStart: oldRangeStart, - oldLines: oldLine - oldRangeStart + contextSize, - newStart: newRangeStart, - newLines: newLine - newRangeStart + contextSize, - lines: curRange - }; - hunks.push(_hunk); - oldRangeStart = 0; - newRangeStart = 0; - curRange = []; - } - } - oldLine += lines.length; - newLine += lines.length; - } - }; - for (var i = 0; i < diff.length; i++) - /*istanbul ignore start*/ - { - _loop(); - } - - // Step 2: eliminate the trailing `\n` from each line of each hunk, and, where needed, add - // "\ No newline at end of file". - /*istanbul ignore end*/ - for ( - /*istanbul ignore start*/ - var _i = 0, _hunks = - /*istanbul ignore end*/ - hunks; - /*istanbul ignore start*/ - _i < _hunks.length - /*istanbul ignore end*/ - ; - /*istanbul ignore start*/ - _i++ - /*istanbul ignore end*/ - ) { - var hunk = - /*istanbul ignore start*/ - _hunks[_i] - /*istanbul ignore end*/ - ; - for (var _i2 = 0; _i2 < hunk.lines.length; _i2++) { - if (hunk.lines[_i2].endsWith('\n')) { - hunk.lines[_i2] = hunk.lines[_i2].slice(0, -1); - } else { - hunk.lines.splice(_i2 + 1, 0, '\\ No newline at end of file'); - _i2++; // Skip the line we just added, then continue iterating - } - } - } - return { - oldFileName: oldFileName, - newFileName: newFileName, - oldHeader: oldHeader, - newHeader: newHeader, - hunks: hunks - }; - } - } - function formatPatch(diff) { - if (Array.isArray(diff)) { - return diff.map(formatPatch).join('\n'); - } - var ret = []; - if (diff.oldFileName == diff.newFileName) { - ret.push('Index: ' + diff.oldFileName); - } - ret.push('==================================================================='); - ret.push('--- ' + diff.oldFileName + (typeof diff.oldHeader === 'undefined' ? '' : '\t' + diff.oldHeader)); - ret.push('+++ ' + diff.newFileName + (typeof diff.newHeader === 'undefined' ? '' : '\t' + diff.newHeader)); - for (var i = 0; i < diff.hunks.length; i++) { - var hunk = diff.hunks[i]; - // Unified Diff Format quirk: If the chunk size is 0, - // the first number is one lower than one would expect. - // https://www.artima.com/weblogs/viewpost.jsp?thread=164293 - if (hunk.oldLines === 0) { - hunk.oldStart -= 1; - } - if (hunk.newLines === 0) { - hunk.newStart -= 1; - } - ret.push('@@ -' + hunk.oldStart + ',' + hunk.oldLines + ' +' + hunk.newStart + ',' + hunk.newLines + ' @@'); - ret.push.apply(ret, hunk.lines); - } - return ret.join('\n') + '\n'; - } - function createTwoFilesPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) { - /*istanbul ignore start*/ - var _options2; - /*istanbul ignore end*/ - if (typeof options === 'function') { - options = { - callback: options - }; - } - if (! - /*istanbul ignore start*/ - ((_options2 = - /*istanbul ignore end*/ - options) !== null && _options2 !== void 0 && - /*istanbul ignore start*/ - _options2 - /*istanbul ignore end*/ - .callback)) { - var patchObj = structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options); - if (!patchObj) { - return; - } - return formatPatch(patchObj); - } else { - var - /*istanbul ignore start*/ - _options3 = - /*istanbul ignore end*/ - options, - /*istanbul ignore start*/ - /*istanbul ignore end*/ - _callback2 = _options3.callback; - structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, - /*istanbul ignore start*/ - _objectSpread$1(_objectSpread$1({}, - /*istanbul ignore end*/ - options), {}, { - callback: function - /*istanbul ignore start*/ - callback - /*istanbul ignore end*/ - (patchObj) { - if (!patchObj) { - _callback2(); - } else { - _callback2(formatPatch(patchObj)); - } - } - })); - } - } - function createPatch(fileName, oldStr, newStr, oldHeader, newHeader, options) { - return createTwoFilesPatch(fileName, fileName, oldStr, newStr, oldHeader, newHeader, options); - } + /** + @module Pending + */ /** - * Split `text` into an array of lines, including the trailing newline character (where present) + * Initialize a new `PendingError` error with the given message. + * + * @param {string} message */ - function splitLines(text) { - var hasTrailingNl = text.endsWith('\n'); - var result = text.split('\n').map(function (line) - /*istanbul ignore start*/ - { - return ( - /*istanbul ignore end*/ - line + '\n' - ); - }); - if (hasTrailingNl) { - result.pop(); - } else { - result.push(result.pop().slice(0, -1)); + class PendingError extends Error { + constructor(message) { + super(message); + this.name = "PendingError"; } - return result; } - var array = {}; + var pending = /*#__PURE__*/Object.freeze({ + __proto__: null, + PendingError: PendingError + }); - /*istanbul ignore start*/ + var require$$1$1 = /*@__PURE__*/getAugmentedNamespace(pending); - Object.defineProperty(array, "__esModule", { - value: true - }); - array.arrayEqual = arrayEqual; - array.arrayStartsWith = arrayStartsWith; - /*istanbul ignore end*/ - function arrayEqual(a, b) { - if (a.length !== b.length) { - return false; - } - return arrayStartsWith(a, b); - } - function arrayStartsWith(array, start) { - if (start.length > array.length) { - return false; - } - for (var i = 0; i < start.length; i++) { - if (start[i] !== array[i]) { - return false; - } - } - return true; - } + var browser = {exports: {}}; - /*istanbul ignore start*/ + var common; + var hasRequiredCommon; - Object.defineProperty(merge$1, "__esModule", { - value: true - }); - merge$1.calcLineCount = calcLineCount; - merge$1.merge = merge; - /*istanbul ignore end*/ - var - /*istanbul ignore start*/ - _create = create - /*istanbul ignore end*/ - ; - var - /*istanbul ignore start*/ - _parse = parse$2 - /*istanbul ignore end*/ - ; - var - /*istanbul ignore start*/ - _array = array - /*istanbul ignore end*/ - ; - /*istanbul ignore start*/ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } - 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 _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; 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 _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); } - function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } - 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; } - /*istanbul ignore end*/ - function calcLineCount(hunk) { - var - /*istanbul ignore start*/ - _calcOldNewLineCount = - /*istanbul ignore end*/ - calcOldNewLineCount(hunk.lines), - /*istanbul ignore start*/ - /*istanbul ignore end*/ - oldLines = _calcOldNewLineCount.oldLines, - /*istanbul ignore start*/ - /*istanbul ignore end*/ - newLines = _calcOldNewLineCount.newLines; - if (oldLines !== undefined) { - hunk.oldLines = oldLines; - } else { - delete hunk.oldLines; - } - if (newLines !== undefined) { - hunk.newLines = newLines; - } else { - delete hunk.newLines; - } - } - function merge(mine, theirs, base) { - mine = loadPatch(mine, base); - theirs = loadPatch(theirs, base); - var ret = {}; - - // For index we just let it pass through as it doesn't have any necessary meaning. - // Leaving sanity checks on this to the API consumer that may know more about the - // meaning in their own context. - if (mine.index || theirs.index) { - ret.index = mine.index || theirs.index; - } - if (mine.newFileName || theirs.newFileName) { - if (!fileNameChanged(mine)) { - // No header or no change in ours, use theirs (and ours if theirs does not exist) - ret.oldFileName = theirs.oldFileName || mine.oldFileName; - ret.newFileName = theirs.newFileName || mine.newFileName; - ret.oldHeader = theirs.oldHeader || mine.oldHeader; - ret.newHeader = theirs.newHeader || mine.newHeader; - } else if (!fileNameChanged(theirs)) { - // No header or no change in theirs, use ours - ret.oldFileName = mine.oldFileName; - ret.newFileName = mine.newFileName; - ret.oldHeader = mine.oldHeader; - ret.newHeader = mine.newHeader; - } else { - // Both changed... figure it out - ret.oldFileName = selectField(ret, mine.oldFileName, theirs.oldFileName); - ret.newFileName = selectField(ret, mine.newFileName, theirs.newFileName); - ret.oldHeader = selectField(ret, mine.oldHeader, theirs.oldHeader); - ret.newHeader = selectField(ret, mine.newHeader, theirs.newHeader); - } - } - ret.hunks = []; - var mineIndex = 0, - theirsIndex = 0, - mineOffset = 0, - theirsOffset = 0; - while (mineIndex < mine.hunks.length || theirsIndex < theirs.hunks.length) { - var mineCurrent = mine.hunks[mineIndex] || { - oldStart: Infinity - }, - theirsCurrent = theirs.hunks[theirsIndex] || { - oldStart: Infinity - }; - if (hunkBefore(mineCurrent, theirsCurrent)) { - // This patch does not overlap with any of the others, yay. - ret.hunks.push(cloneHunk(mineCurrent, mineOffset)); - mineIndex++; - theirsOffset += mineCurrent.newLines - mineCurrent.oldLines; - } else if (hunkBefore(theirsCurrent, mineCurrent)) { - // This patch does not overlap with any of the others, yay. - ret.hunks.push(cloneHunk(theirsCurrent, theirsOffset)); - theirsIndex++; - mineOffset += theirsCurrent.newLines - theirsCurrent.oldLines; - } else { - // Overlap, merge as best we can - var mergedHunk = { - oldStart: Math.min(mineCurrent.oldStart, theirsCurrent.oldStart), - oldLines: 0, - newStart: Math.min(mineCurrent.newStart + mineOffset, theirsCurrent.oldStart + theirsOffset), - newLines: 0, - lines: [] - }; - mergeLines(mergedHunk, mineCurrent.oldStart, mineCurrent.lines, theirsCurrent.oldStart, theirsCurrent.lines); - theirsIndex++; - mineIndex++; - ret.hunks.push(mergedHunk); - } - } - return ret; - } - function loadPatch(param, base) { - if (typeof param === 'string') { - if (/^@@/m.test(param) || /^Index:/m.test(param)) { - return ( - /*istanbul ignore start*/ - (/*istanbul ignore end*/ - /*istanbul ignore start*/ - 0, _parse - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - parsePatch) - /*istanbul ignore end*/ - (param)[0] - ); - } - if (!base) { - throw new Error('Must provide a base reference or pass in a patch'); - } - return ( - /*istanbul ignore start*/ - (/*istanbul ignore end*/ - /*istanbul ignore start*/ - 0, _create - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - structuredPatch) - /*istanbul ignore end*/ - (undefined, undefined, base, param) - ); - } - return param; - } - function fileNameChanged(patch) { - return patch.newFileName && patch.newFileName !== patch.oldFileName; - } - function selectField(index, mine, theirs) { - if (mine === theirs) { - return mine; - } else { - index.conflict = true; - return { - mine: mine, - theirs: theirs - }; - } - } - function hunkBefore(test, check) { - return test.oldStart < check.oldStart && test.oldStart + test.oldLines < check.oldStart; - } - function cloneHunk(hunk, offset) { - return { - oldStart: hunk.oldStart, - oldLines: hunk.oldLines, - newStart: hunk.newStart + offset, - newLines: hunk.newLines, - lines: hunk.lines - }; - } - function mergeLines(hunk, mineOffset, mineLines, theirOffset, theirLines) { - // This will generally result in a conflicted hunk, but there are cases where the context - // is the only overlap where we can successfully merge the content here. - var mine = { - offset: mineOffset, - lines: mineLines, - index: 0 - }, - their = { - offset: theirOffset, - lines: theirLines, - index: 0 - }; + function requireCommon () { + if (hasRequiredCommon) return common; + hasRequiredCommon = 1; + /** + * This is the common logic for both the Node.js and web browser + * implementations of `debug()`. + */ + + function setup(env) { + createDebug.debug = createDebug; + createDebug.default = createDebug; + createDebug.coerce = coerce; + createDebug.disable = disable; + createDebug.enable = enable; + createDebug.enabled = enabled; + createDebug.humanize = requireMs(); + createDebug.destroy = destroy; + + Object.keys(env).forEach(key => { + createDebug[key] = env[key]; + }); - // Handle any leading content - insertLeading(hunk, mine, their); - insertLeading(hunk, their, mine); - - // Now in the overlap content. Scan through and select the best changes from each. - while (mine.index < mine.lines.length && their.index < their.lines.length) { - var mineCurrent = mine.lines[mine.index], - theirCurrent = their.lines[their.index]; - if ((mineCurrent[0] === '-' || mineCurrent[0] === '+') && (theirCurrent[0] === '-' || theirCurrent[0] === '+')) { - // Both modified ... - mutualChange(hunk, mine, their); - } else if (mineCurrent[0] === '+' && theirCurrent[0] === ' ') { - /*istanbul ignore start*/ - var _hunk$lines; - /*istanbul ignore end*/ - // Mine inserted - /*istanbul ignore start*/ - /*istanbul ignore end*/ - /*istanbul ignore start*/ - (_hunk$lines = - /*istanbul ignore end*/ - hunk.lines).push.apply( - /*istanbul ignore start*/ - _hunk$lines - /*istanbul ignore end*/ - , - /*istanbul ignore start*/ - _toConsumableArray( - /*istanbul ignore end*/ - collectChange(mine))); - } else if (theirCurrent[0] === '+' && mineCurrent[0] === ' ') { - /*istanbul ignore start*/ - var _hunk$lines2; - /*istanbul ignore end*/ - // Theirs inserted - /*istanbul ignore start*/ - /*istanbul ignore end*/ - /*istanbul ignore start*/ - (_hunk$lines2 = - /*istanbul ignore end*/ - hunk.lines).push.apply( - /*istanbul ignore start*/ - _hunk$lines2 - /*istanbul ignore end*/ - , - /*istanbul ignore start*/ - _toConsumableArray( - /*istanbul ignore end*/ - collectChange(their))); - } else if (mineCurrent[0] === '-' && theirCurrent[0] === ' ') { - // Mine removed or edited - removal(hunk, mine, their); - } else if (theirCurrent[0] === '-' && mineCurrent[0] === ' ') { - // Their removed or edited - removal(hunk, their, mine, true); - } else if (mineCurrent === theirCurrent) { - // Context identity - hunk.lines.push(mineCurrent); - mine.index++; - their.index++; - } else { - // Context mismatch - conflict(hunk, collectChange(mine), collectChange(their)); - } - } + /** + * The currently active debug mode names, and names to skip. + */ - // Now push anything that may be remaining - insertTrailing(hunk, mine); - insertTrailing(hunk, their); - calcLineCount(hunk); - } - function mutualChange(hunk, mine, their) { - var myChanges = collectChange(mine), - theirChanges = collectChange(their); - if (allRemoves(myChanges) && allRemoves(theirChanges)) { - // Special case for remove changes that are supersets of one another - if ( - /*istanbul ignore start*/ - (/*istanbul ignore end*/ - /*istanbul ignore start*/ - 0, _array - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - arrayStartsWith) - /*istanbul ignore end*/ - (myChanges, theirChanges) && skipRemoveSuperset(their, myChanges, myChanges.length - theirChanges.length)) { - /*istanbul ignore start*/ - var _hunk$lines3; - /*istanbul ignore end*/ - /*istanbul ignore start*/ - /*istanbul ignore end*/ - /*istanbul ignore start*/ - (_hunk$lines3 = - /*istanbul ignore end*/ - hunk.lines).push.apply( - /*istanbul ignore start*/ - _hunk$lines3 - /*istanbul ignore end*/ - , - /*istanbul ignore start*/ - _toConsumableArray( - /*istanbul ignore end*/ - myChanges)); - return; - } else if ( - /*istanbul ignore start*/ - (/*istanbul ignore end*/ - /*istanbul ignore start*/ - 0, _array - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - arrayStartsWith) - /*istanbul ignore end*/ - (theirChanges, myChanges) && skipRemoveSuperset(mine, theirChanges, theirChanges.length - myChanges.length)) { - /*istanbul ignore start*/ - var _hunk$lines4; - /*istanbul ignore end*/ - /*istanbul ignore start*/ - /*istanbul ignore end*/ - /*istanbul ignore start*/ - (_hunk$lines4 = - /*istanbul ignore end*/ - hunk.lines).push.apply( - /*istanbul ignore start*/ - _hunk$lines4 - /*istanbul ignore end*/ - , - /*istanbul ignore start*/ - _toConsumableArray( - /*istanbul ignore end*/ - theirChanges)); - return; - } - } else if ( - /*istanbul ignore start*/ - (/*istanbul ignore end*/ - /*istanbul ignore start*/ - 0, _array - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - arrayEqual) - /*istanbul ignore end*/ - (myChanges, theirChanges)) { - /*istanbul ignore start*/ - var _hunk$lines5; - /*istanbul ignore end*/ - /*istanbul ignore start*/ - /*istanbul ignore end*/ - /*istanbul ignore start*/ - (_hunk$lines5 = - /*istanbul ignore end*/ - hunk.lines).push.apply( - /*istanbul ignore start*/ - _hunk$lines5 - /*istanbul ignore end*/ - , - /*istanbul ignore start*/ - _toConsumableArray( - /*istanbul ignore end*/ - myChanges)); - return; - } - conflict(hunk, myChanges, theirChanges); - } - function removal(hunk, mine, their, swap) { - var myChanges = collectChange(mine), - theirChanges = collectContext(their, myChanges); - if (theirChanges.merged) { - /*istanbul ignore start*/ - var _hunk$lines6; - /*istanbul ignore end*/ - /*istanbul ignore start*/ - /*istanbul ignore end*/ - /*istanbul ignore start*/ - (_hunk$lines6 = - /*istanbul ignore end*/ - hunk.lines).push.apply( - /*istanbul ignore start*/ - _hunk$lines6 - /*istanbul ignore end*/ - , - /*istanbul ignore start*/ - _toConsumableArray( - /*istanbul ignore end*/ - theirChanges.merged)); - } else { - conflict(hunk, swap ? theirChanges : myChanges, swap ? myChanges : theirChanges); - } - } - function conflict(hunk, mine, their) { - hunk.conflict = true; - hunk.lines.push({ - conflict: true, - mine: mine, - theirs: their - }); - } - function insertLeading(hunk, insert, their) { - while (insert.offset < their.offset && insert.index < insert.lines.length) { - var line = insert.lines[insert.index++]; - hunk.lines.push(line); - insert.offset++; - } - } - function insertTrailing(hunk, insert) { - while (insert.index < insert.lines.length) { - var line = insert.lines[insert.index++]; - hunk.lines.push(line); - } - } - function collectChange(state) { - var ret = [], - operation = state.lines[state.index][0]; - while (state.index < state.lines.length) { - var line = state.lines[state.index]; + createDebug.names = []; + createDebug.skips = []; - // Group additions that are immediately after subtractions and treat them as one "atomic" modify change. - if (operation === '-' && line[0] === '+') { - operation = '+'; - } - if (operation === line[0]) { - ret.push(line); - state.index++; - } else { - break; - } - } - return ret; - } - function collectContext(state, matchChanges) { - var changes = [], - merged = [], - matchIndex = 0, - contextChanges = false, - conflicted = false; - while (matchIndex < matchChanges.length && state.index < state.lines.length) { - var change = state.lines[state.index], - match = matchChanges[matchIndex]; - - // Once we've hit our add, then we are done - if (match[0] === '+') { - break; - } - contextChanges = contextChanges || change[0] !== ' '; - merged.push(match); - matchIndex++; - - // Consume any additions in the other block as a conflict to attempt - // to pull in the remaining context after this - if (change[0] === '+') { - conflicted = true; - while (change[0] === '+') { - changes.push(change); - change = state.lines[++state.index]; - } - } - if (match.substr(1) === change.substr(1)) { - changes.push(change); - state.index++; - } else { - conflicted = true; - } - } - if ((matchChanges[matchIndex] || '')[0] === '+' && contextChanges) { - conflicted = true; - } - if (conflicted) { - return changes; - } - while (matchIndex < matchChanges.length) { - merged.push(matchChanges[matchIndex++]); - } - return { - merged: merged, - changes: changes - }; - } - function allRemoves(changes) { - return changes.reduce(function (prev, change) { - return prev && change[0] === '-'; - }, true); - } - function skipRemoveSuperset(state, removeChanges, delta) { - for (var i = 0; i < delta; i++) { - var changeContent = removeChanges[removeChanges.length - delta + i].substr(1); - if (state.lines[state.index + i] !== ' ' + changeContent) { - return false; - } - } - state.index += delta; - return true; - } - function calcOldNewLineCount(lines) { - var oldLines = 0; - var newLines = 0; - lines.forEach(function (line) { - if (typeof line !== 'string') { - var myCount = calcOldNewLineCount(line.mine); - var theirCount = calcOldNewLineCount(line.theirs); - if (oldLines !== undefined) { - if (myCount.oldLines === theirCount.oldLines) { - oldLines += myCount.oldLines; - } else { - oldLines = undefined; - } - } - if (newLines !== undefined) { - if (myCount.newLines === theirCount.newLines) { - newLines += myCount.newLines; - } else { - newLines = undefined; - } - } - } else { - if (newLines !== undefined && (line[0] === '+' || line[0] === ' ')) { - newLines++; - } - if (oldLines !== undefined && (line[0] === '-' || line[0] === ' ')) { - oldLines++; - } - } - }); - return { - oldLines: oldLines, - newLines: newLines - }; - } - - var reverse = {}; + /** + * Map of special "%n" handling functions, for the debug "format" argument. + * + * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N". + */ + createDebug.formatters = {}; + + /** + * Selects a color for a debug namespace + * @param {String} namespace The namespace string for the debug instance to be colored + * @return {Number|String} An ANSI color code for the given namespace + * @api private + */ + function selectColor(namespace) { + let hash = 0; + + for (let i = 0; i < namespace.length; i++) { + hash = ((hash << 5) - hash) + namespace.charCodeAt(i); + hash |= 0; // Convert to 32bit integer + } - /*istanbul ignore start*/ + return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; + } + createDebug.selectColor = selectColor; + + /** + * Create a debugger with the given `namespace`. + * + * @param {String} namespace + * @return {Function} + * @api public + */ + function createDebug(namespace) { + let prevTime; + let enableOverride = null; + let namespacesCache; + let enabledCache; + + function debug(...args) { + // Disabled? + if (!debug.enabled) { + return; + } - Object.defineProperty(reverse, "__esModule", { - value: true - }); - reverse.reversePatch = reversePatch; - function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } - function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } - function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } - function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } - function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } - function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } - /*istanbul ignore end*/ - function reversePatch(structuredPatch) { - if (Array.isArray(structuredPatch)) { - return structuredPatch.map(reversePatch).reverse(); - } - return ( - /*istanbul ignore start*/ - _objectSpread(_objectSpread({}, - /*istanbul ignore end*/ - structuredPatch), {}, { - oldFileName: structuredPatch.newFileName, - oldHeader: structuredPatch.newHeader, - newFileName: structuredPatch.oldFileName, - newHeader: structuredPatch.oldHeader, - hunks: structuredPatch.hunks.map(function (hunk) { - return { - oldLines: hunk.newLines, - oldStart: hunk.newStart, - newLines: hunk.oldLines, - newStart: hunk.oldStart, - lines: hunk.lines.map(function (l) { - if (l.startsWith('-')) { - return ( - /*istanbul ignore start*/ - "+".concat( - /*istanbul ignore end*/ - l.slice(1)) - ); - } - if (l.startsWith('+')) { - return ( - /*istanbul ignore start*/ - "-".concat( - /*istanbul ignore end*/ - l.slice(1)) - ); - } - return l; - }) - }; - }) - }) - ); - } + const self = debug; - var dmp = {}; + // Set `diff` timestamp + const curr = Number(new Date()); + const ms = curr - (prevTime || curr); + self.diff = ms; + self.prev = prevTime; + self.curr = curr; + prevTime = curr; - /*istanbul ignore start*/ + args[0] = createDebug.coerce(args[0]); - Object.defineProperty(dmp, "__esModule", { - value: true - }); - dmp.convertChangesToDMP = convertChangesToDMP; - /*istanbul ignore end*/ - // See: http://code.google.com/p/google-diff-match-patch/wiki/API - function convertChangesToDMP(changes) { - var ret = [], - change, - operation; - for (var i = 0; i < changes.length; i++) { - change = changes[i]; - if (change.added) { - operation = 1; - } else if (change.removed) { - operation = -1; - } else { - operation = 0; - } - ret.push([operation, change.value]); - } - return ret; - } + if (typeof args[0] !== 'string') { + // Anything else let's inspect with %O + args.unshift('%O'); + } - var xml = {}; + // Apply any `formatters` transformations + let index = 0; + args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => { + // If we encounter an escaped % then don't increase the array index + if (match === '%%') { + return '%'; + } + index++; + const formatter = createDebug.formatters[format]; + if (typeof formatter === 'function') { + const val = args[index]; + match = formatter.call(self, val); + + // Now we need to remove `args[index]` since it's inlined in the `format` + args.splice(index, 1); + index--; + } + return match; + }); - /*istanbul ignore start*/ + // Apply env-specific formatting (colors, etc.) + createDebug.formatArgs.call(self, args); - Object.defineProperty(xml, "__esModule", { - value: true - }); - xml.convertChangesToXML = convertChangesToXML; - /*istanbul ignore end*/ - function convertChangesToXML(changes) { - var ret = []; - for (var i = 0; i < changes.length; i++) { - var change = changes[i]; - if (change.added) { - ret.push(''); - } else if (change.removed) { - ret.push(''); - } - ret.push(escapeHTML(change.value)); - if (change.added) { - ret.push(''); - } else if (change.removed) { - ret.push(''); - } - } - return ret.join(''); - } - function escapeHTML(s) { - var n = s; - n = n.replace(/&/g, '&'); - n = n.replace(//g, '>'); - n = n.replace(/"/g, '"'); - return n; - } + const logFn = self.log || createDebug.log; + logFn.apply(self, args); + } - /*istanbul ignore start*/ + debug.namespace = namespace; + debug.useColors = createDebug.useColors(); + debug.color = createDebug.selectColor(namespace); + debug.extend = extend; + debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release. + + Object.defineProperty(debug, 'enabled', { + enumerable: true, + configurable: false, + get: () => { + if (enableOverride !== null) { + return enableOverride; + } + if (namespacesCache !== createDebug.namespaces) { + namespacesCache = createDebug.namespaces; + enabledCache = createDebug.enabled(namespace); + } - (function (exports) { + return enabledCache; + }, + set: v => { + enableOverride = v; + } + }); - Object.defineProperty(exports, "__esModule", { - value: true - }); - Object.defineProperty(exports, "Diff", { - enumerable: true, - get: function get() { - return _base["default"]; - } - }); - Object.defineProperty(exports, "applyPatch", { - enumerable: true, - get: function get() { - return _apply.applyPatch; - } - }); - Object.defineProperty(exports, "applyPatches", { - enumerable: true, - get: function get() { - return _apply.applyPatches; - } - }); - Object.defineProperty(exports, "canonicalize", { - enumerable: true, - get: function get() { - return _json.canonicalize; - } - }); - Object.defineProperty(exports, "convertChangesToDMP", { - enumerable: true, - get: function get() { - return _dmp.convertChangesToDMP; - } - }); - Object.defineProperty(exports, "convertChangesToXML", { - enumerable: true, - get: function get() { - return _xml.convertChangesToXML; - } - }); - Object.defineProperty(exports, "createPatch", { - enumerable: true, - get: function get() { - return _create.createPatch; - } - }); - Object.defineProperty(exports, "createTwoFilesPatch", { - enumerable: true, - get: function get() { - return _create.createTwoFilesPatch; - } - }); - Object.defineProperty(exports, "diffArrays", { - enumerable: true, - get: function get() { - return _array.diffArrays; - } - }); - Object.defineProperty(exports, "diffChars", { - enumerable: true, - get: function get() { - return _character.diffChars; - } - }); - Object.defineProperty(exports, "diffCss", { - enumerable: true, - get: function get() { - return _css.diffCss; - } - }); - Object.defineProperty(exports, "diffJson", { - enumerable: true, - get: function get() { - return _json.diffJson; - } - }); - Object.defineProperty(exports, "diffLines", { - enumerable: true, - get: function get() { - return _line.diffLines; - } - }); - Object.defineProperty(exports, "diffSentences", { - enumerable: true, - get: function get() { - return _sentence.diffSentences; - } - }); - Object.defineProperty(exports, "diffTrimmedLines", { - enumerable: true, - get: function get() { - return _line.diffTrimmedLines; - } - }); - Object.defineProperty(exports, "diffWords", { - enumerable: true, - get: function get() { - return _word.diffWords; - } - }); - Object.defineProperty(exports, "diffWordsWithSpace", { - enumerable: true, - get: function get() { - return _word.diffWordsWithSpace; - } - }); - Object.defineProperty(exports, "formatPatch", { - enumerable: true, - get: function get() { - return _create.formatPatch; - } - }); - Object.defineProperty(exports, "merge", { - enumerable: true, - get: function get() { - return _merge.merge; - } - }); - Object.defineProperty(exports, "parsePatch", { - enumerable: true, - get: function get() { - return _parse.parsePatch; - } - }); - Object.defineProperty(exports, "reversePatch", { - enumerable: true, - get: function get() { - return _reverse.reversePatch; - } - }); - Object.defineProperty(exports, "structuredPatch", { - enumerable: true, - get: function get() { - return _create.structuredPatch; - } - }); - /*istanbul ignore end*/ - var - /*istanbul ignore start*/ - _base = _interopRequireDefault(base) - /*istanbul ignore end*/ - ; - var - /*istanbul ignore start*/ - _character = character - /*istanbul ignore end*/ - ; - var - /*istanbul ignore start*/ - _word = word - /*istanbul ignore end*/ - ; - var - /*istanbul ignore start*/ - _line = line - /*istanbul ignore end*/ - ; - var - /*istanbul ignore start*/ - _sentence = sentence - /*istanbul ignore end*/ - ; - var - /*istanbul ignore start*/ - _css = css - /*istanbul ignore end*/ - ; - var - /*istanbul ignore start*/ - _json = json$1 - /*istanbul ignore end*/ - ; - var - /*istanbul ignore start*/ - _array = array$1 - /*istanbul ignore end*/ - ; - var - /*istanbul ignore start*/ - _apply = apply - /*istanbul ignore end*/ - ; - var - /*istanbul ignore start*/ - _parse = parse$2 - /*istanbul ignore end*/ - ; - var - /*istanbul ignore start*/ - _merge = merge$1 - /*istanbul ignore end*/ - ; - var - /*istanbul ignore start*/ - _reverse = reverse - /*istanbul ignore end*/ - ; - var - /*istanbul ignore start*/ - _create = create - /*istanbul ignore end*/ - ; - var - /*istanbul ignore start*/ - _dmp = dmp - /*istanbul ignore end*/ - ; - var - /*istanbul ignore start*/ - _xml = xml - /*istanbul ignore end*/ - ; - /*istanbul ignore start*/ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } - /*istanbul ignore end*/ + // Env-specific initialization logic for debug instances + if (typeof createDebug.init === 'function') { + createDebug.init(debug); + } - }(lib)); + return debug; + } - /** - * Helpers. - */ + function extend(namespace, delimiter) { + const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace); + newDebug.log = this.log; + return newDebug; + } - var s$1 = 1000; - var m$1 = s$1 * 60; - var h$1 = m$1 * 60; - var d$1 = h$1 * 24; - var w$1 = d$1 * 7; - var y$1 = d$1 * 365.25; + /** + * Enables a debug mode by namespaces. This can include modes + * separated by a colon and wildcards. + * + * @param {String} namespaces + * @api public + */ + function enable(namespaces) { + createDebug.save(namespaces); + createDebug.namespaces = namespaces; + + createDebug.names = []; + createDebug.skips = []; + + const split = (typeof namespaces === 'string' ? namespaces : '') + .trim() + .replace(/\s+/g, ',') + .split(',') + .filter(Boolean); + + for (const ns of split) { + if (ns[0] === '-') { + createDebug.skips.push(ns.slice(1)); + } else { + createDebug.names.push(ns); + } + } + } - /** - * Parse or format the given `val`. - * - * Options: - * - * - `long` verbose formatting [false] - * - * @param {String|Number} val - * @param {Object} [options] - * @throws {Error} throw an error if val is not a non-empty string or a number - * @return {String|Number} - * @api public - */ + /** + * Checks if the given string matches a namespace template, honoring + * asterisks as wildcards. + * + * @param {String} search + * @param {String} template + * @return {Boolean} + */ + function matchesTemplate(search, template) { + let searchIndex = 0; + let templateIndex = 0; + let starIndex = -1; + let matchIndex = 0; + + while (searchIndex < search.length) { + if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === '*')) { + // Match character or proceed with wildcard + if (template[templateIndex] === '*') { + starIndex = templateIndex; + matchIndex = searchIndex; + templateIndex++; // Skip the '*' + } else { + searchIndex++; + templateIndex++; + } + } else if (starIndex !== -1) { // eslint-disable-line no-negated-condition + // Backtrack to the last '*' and try to match more characters + templateIndex = starIndex + 1; + matchIndex++; + searchIndex = matchIndex; + } else { + return false; // No match + } + } - var ms$1 = function (val, options) { - options = options || {}; - var type = typeof val; - if (type === 'string' && val.length > 0) { - return parse$1(val); - } else if (type === 'number' && isFinite(val)) { - return options.long ? fmtLong$1(val) : fmtShort$1(val); - } - throw new Error( - 'val is not a non-empty string or a valid number. val=' + - JSON.stringify(val) - ); - }; + // Handle trailing '*' in template + while (templateIndex < template.length && template[templateIndex] === '*') { + templateIndex++; + } - /** - * Parse the given `str` and return milliseconds. - * - * @param {String} str - * @return {Number} - * @api private - */ + return templateIndex === template.length; + } - function parse$1(str) { - str = String(str); - if (str.length > 100) { - return; - } - var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec( - str - ); - if (!match) { - return; - } - var n = parseFloat(match[1]); - var type = (match[2] || 'ms').toLowerCase(); - switch (type) { - case 'years': - case 'year': - case 'yrs': - case 'yr': - case 'y': - return n * y$1; - case 'weeks': - case 'week': - case 'w': - return n * w$1; - case 'days': - case 'day': - case 'd': - return n * d$1; - case 'hours': - case 'hour': - case 'hrs': - case 'hr': - case 'h': - return n * h$1; - case 'minutes': - case 'minute': - case 'mins': - case 'min': - case 'm': - return n * m$1; - case 'seconds': - case 'second': - case 'secs': - case 'sec': - case 's': - return n * s$1; - case 'milliseconds': - case 'millisecond': - case 'msecs': - case 'msec': - case 'ms': - return n; - default: - return undefined; - } - } + /** + * Disable debug output. + * + * @return {String} namespaces + * @api public + */ + function disable() { + const namespaces = [ + ...createDebug.names, + ...createDebug.skips.map(namespace => '-' + namespace) + ].join(','); + createDebug.enable(''); + return namespaces; + } - /** - * Short format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private - */ + /** + * Returns true if the given mode name is enabled, false otherwise. + * + * @param {String} name + * @return {Boolean} + * @api public + */ + function enabled(name) { + for (const skip of createDebug.skips) { + if (matchesTemplate(name, skip)) { + return false; + } + } - function fmtShort$1(ms) { - var msAbs = Math.abs(ms); - if (msAbs >= d$1) { - return Math.round(ms / d$1) + 'd'; - } - if (msAbs >= h$1) { - return Math.round(ms / h$1) + 'h'; - } - if (msAbs >= m$1) { - return Math.round(ms / m$1) + 'm'; - } - if (msAbs >= s$1) { - return Math.round(ms / s$1) + 's'; - } - return ms + 'ms'; - } + for (const ns of createDebug.names) { + if (matchesTemplate(name, ns)) { + return true; + } + } - /** - * Long format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private - */ + return false; + } - function fmtLong$1(ms) { - var msAbs = Math.abs(ms); - if (msAbs >= d$1) { - return plural$1(ms, msAbs, d$1, 'day'); - } - if (msAbs >= h$1) { - return plural$1(ms, msAbs, h$1, 'hour'); - } - if (msAbs >= m$1) { - return plural$1(ms, msAbs, m$1, 'minute'); - } - if (msAbs >= s$1) { - return plural$1(ms, msAbs, s$1, 'second'); - } - return ms + ' ms'; - } + /** + * Coerce `val`. + * + * @param {Mixed} val + * @return {Mixed} + * @api private + */ + function coerce(val) { + if (val instanceof Error) { + return val.stack || val.message; + } + return val; + } - /** - * Pluralization helper. - */ + /** + * XXX DO NOT USE. This is a temporary stub function. + * XXX It WILL be removed in the next major release. + */ + function destroy() { + console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'); + } - function plural$1(ms, msAbs, n, name) { - var isPlural = msAbs >= n * 1.5; - return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : ''); - } + createDebug.enable(createDebug.load()); - var lookup = []; - var revLookup = []; - var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array; - var inited = false; - function init () { - inited = true; - var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; - for (var i = 0, len = code.length; i < len; ++i) { - lookup[i] = code[i]; - revLookup[code.charCodeAt(i)] = i; - } + return createDebug; + } - revLookup['-'.charCodeAt(0)] = 62; - revLookup['_'.charCodeAt(0)] = 63; + common = setup; + return common; } - function toByteArray (b64) { - if (!inited) { - init(); - } - var i, j, l, tmp, placeHolders, arr; - var len = b64.length; - - if (len % 4 > 0) { - throw new Error('Invalid string. Length must be a multiple of 4') - } - - // the number of equal signs (place holders) - // if there are two placeholders, than the two characters before it - // represent one byte - // if there is only one, then the three characters before it represent 2 bytes - // this is just a cheap hack to not do indexOf twice - placeHolders = b64[len - 2] === '=' ? 2 : b64[len - 1] === '=' ? 1 : 0; + var hasRequiredBrowser; - // base64 is 4/3 + up to two characters of the original data - arr = new Arr(len * 3 / 4 - placeHolders); + function requireBrowser () { + if (hasRequiredBrowser) return browser.exports; + hasRequiredBrowser = 1; + (function (module, exports) { + /** + * This is the web browser implementation of `debug()`. + */ - // if there are placeholders, only get up to the last complete 4 chars - l = placeHolders > 0 ? len - 4 : len; + exports.formatArgs = formatArgs; + exports.save = save; + exports.load = load; + exports.useColors = useColors; + exports.storage = localstorage(); + exports.destroy = (() => { + let warned = false; - var L = 0; + return () => { + if (!warned) { + warned = true; + console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'); + } + }; + })(); + + /** + * Colors. + */ + + exports.colors = [ + '#0000CC', + '#0000FF', + '#0033CC', + '#0033FF', + '#0066CC', + '#0066FF', + '#0099CC', + '#0099FF', + '#00CC00', + '#00CC33', + '#00CC66', + '#00CC99', + '#00CCCC', + '#00CCFF', + '#3300CC', + '#3300FF', + '#3333CC', + '#3333FF', + '#3366CC', + '#3366FF', + '#3399CC', + '#3399FF', + '#33CC00', + '#33CC33', + '#33CC66', + '#33CC99', + '#33CCCC', + '#33CCFF', + '#6600CC', + '#6600FF', + '#6633CC', + '#6633FF', + '#66CC00', + '#66CC33', + '#9900CC', + '#9900FF', + '#9933CC', + '#9933FF', + '#99CC00', + '#99CC33', + '#CC0000', + '#CC0033', + '#CC0066', + '#CC0099', + '#CC00CC', + '#CC00FF', + '#CC3300', + '#CC3333', + '#CC3366', + '#CC3399', + '#CC33CC', + '#CC33FF', + '#CC6600', + '#CC6633', + '#CC9900', + '#CC9933', + '#CCCC00', + '#CCCC33', + '#FF0000', + '#FF0033', + '#FF0066', + '#FF0099', + '#FF00CC', + '#FF00FF', + '#FF3300', + '#FF3333', + '#FF3366', + '#FF3399', + '#FF33CC', + '#FF33FF', + '#FF6600', + '#FF6633', + '#FF9900', + '#FF9933', + '#FFCC00', + '#FFCC33' + ]; + + /** + * Currently only WebKit-based Web Inspectors, Firefox >= v31, + * and the Firebug extension (any Firefox version) are known + * to support "%c" CSS customizations. + * + * TODO: add a `localStorage` variable to explicitly enable/disable colors + */ + + // eslint-disable-next-line complexity + function useColors() { + // NB: In an Electron preload script, document will be defined but not fully + // initialized. Since we know we're in Chrome, we'll just detect this case + // explicitly + if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) { + return true; + } - for (i = 0, j = 0; i < l; i += 4, j += 3) { - tmp = (revLookup[b64.charCodeAt(i)] << 18) | (revLookup[b64.charCodeAt(i + 1)] << 12) | (revLookup[b64.charCodeAt(i + 2)] << 6) | revLookup[b64.charCodeAt(i + 3)]; - arr[L++] = (tmp >> 16) & 0xFF; - arr[L++] = (tmp >> 8) & 0xFF; - arr[L++] = tmp & 0xFF; - } + // Internet Explorer and Edge do not support colors. + if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { + return false; + } - if (placeHolders === 2) { - tmp = (revLookup[b64.charCodeAt(i)] << 2) | (revLookup[b64.charCodeAt(i + 1)] >> 4); - arr[L++] = tmp & 0xFF; - } else if (placeHolders === 1) { - tmp = (revLookup[b64.charCodeAt(i)] << 10) | (revLookup[b64.charCodeAt(i + 1)] << 4) | (revLookup[b64.charCodeAt(i + 2)] >> 2); - arr[L++] = (tmp >> 8) & 0xFF; - arr[L++] = tmp & 0xFF; - } + let m; + + // Is webkit? http://stackoverflow.com/a/16459606/376773 + // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 + // eslint-disable-next-line no-return-assign + return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) || + // Is firebug? http://stackoverflow.com/a/398120/376773 + (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) || + // Is firefox >= v31? + // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages + (typeof navigator !== 'undefined' && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31) || + // Double check webkit in userAgent just in case we are in a worker + (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)); + } - return arr - } + /** + * Colorize log arguments if enabled. + * + * @api public + */ + + function formatArgs(args) { + args[0] = (this.useColors ? '%c' : '') + + this.namespace + + (this.useColors ? ' %c' : ' ') + + args[0] + + (this.useColors ? '%c ' : ' ') + + '+' + module.exports.humanize(this.diff); + + if (!this.useColors) { + return; + } - function tripletToBase64 (num) { - return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F] - } + const c = 'color: ' + this.color; + args.splice(1, 0, c, 'color: inherit'); - function encodeChunk (uint8, start, end) { - var tmp; - var output = []; - for (var i = start; i < end; i += 3) { - tmp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2]); - output.push(tripletToBase64(tmp)); - } - return output.join('') - } - - function fromByteArray (uint8) { - if (!inited) { - init(); - } - var tmp; - var len = uint8.length; - var extraBytes = len % 3; // if we have 1 byte left, pad 2 bytes - var output = ''; - var parts = []; - var maxChunkLength = 16383; // must be multiple of 3 - - // go through the array every three bytes, we'll deal with trailing stuff later - for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) { - parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength))); - } - - // pad the end with zeros, but make sure to not forget the extra bytes - if (extraBytes === 1) { - tmp = uint8[len - 1]; - output += lookup[tmp >> 2]; - output += lookup[(tmp << 4) & 0x3F]; - output += '=='; - } else if (extraBytes === 2) { - tmp = (uint8[len - 2] << 8) + (uint8[len - 1]); - output += lookup[tmp >> 10]; - output += lookup[(tmp >> 4) & 0x3F]; - output += lookup[(tmp << 2) & 0x3F]; - output += '='; - } - - parts.push(output); - - return parts.join('') - } - - function read (buffer, offset, isLE, mLen, nBytes) { - var e, m; - var eLen = nBytes * 8 - mLen - 1; - var eMax = (1 << eLen) - 1; - var eBias = eMax >> 1; - var nBits = -7; - var i = isLE ? (nBytes - 1) : 0; - var d = isLE ? -1 : 1; - var s = buffer[offset + i]; - - i += d; - - e = s & ((1 << (-nBits)) - 1); - s >>= (-nBits); - nBits += eLen; - for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {} - - m = e & ((1 << (-nBits)) - 1); - e >>= (-nBits); - nBits += mLen; - for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {} - - if (e === 0) { - e = 1 - eBias; - } else if (e === eMax) { - return m ? NaN : ((s ? -1 : 1) * Infinity) - } else { - m = m + Math.pow(2, mLen); - e = e - eBias; - } - return (s ? -1 : 1) * m * Math.pow(2, e - mLen) - } - - function write (buffer, value, offset, isLE, mLen, nBytes) { - var e, m, c; - var eLen = nBytes * 8 - mLen - 1; - var eMax = (1 << eLen) - 1; - var eBias = eMax >> 1; - var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0); - var i = isLE ? 0 : (nBytes - 1); - var d = isLE ? 1 : -1; - var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0; - - value = Math.abs(value); - - if (isNaN(value) || value === Infinity) { - m = isNaN(value) ? 1 : 0; - e = eMax; - } else { - e = Math.floor(Math.log(value) / Math.LN2); - if (value * (c = Math.pow(2, -e)) < 1) { - e--; - c *= 2; - } - if (e + eBias >= 1) { - value += rt / c; - } else { - value += rt * Math.pow(2, 1 - eBias); - } - if (value * c >= 2) { - e++; - c /= 2; - } - - if (e + eBias >= eMax) { - m = 0; - e = eMax; - } else if (e + eBias >= 1) { - m = (value * c - 1) * Math.pow(2, mLen); - e = e + eBias; - } else { - m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen); - e = 0; - } - } - - for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {} - - e = (e << mLen) | m; - eLen += mLen; - for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {} - - buffer[offset + i - d] |= s * 128; - } - - var toString$1 = {}.toString; - - var isArray = Array.isArray || function (arr) { - return toString$1.call(arr) == '[object Array]'; - }; - - var INSPECT_MAX_BYTES = 50; - - /** - * If `Buffer.TYPED_ARRAY_SUPPORT`: - * === true Use Uint8Array implementation (fastest) - * === false Use Object implementation (most compatible, even IE6) - * - * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+, - * Opera 11.6+, iOS 4.2+. - * - * Due to various browser bugs, sometimes the Object implementation will be used even - * when the browser supports typed arrays. - * - * Note: - * - * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances, - * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438. - * - * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function. - * - * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of - * incorrect length in some situations. - - * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they - * get the Object implementation, which is slower but behaves correctly. - */ - Buffer.TYPED_ARRAY_SUPPORT = global$1.TYPED_ARRAY_SUPPORT !== undefined - ? global$1.TYPED_ARRAY_SUPPORT - : true; - - /* - * Export kMaxLength after typed array support is determined. - */ - kMaxLength(); - - function kMaxLength () { - return Buffer.TYPED_ARRAY_SUPPORT - ? 0x7fffffff - : 0x3fffffff - } - - function createBuffer (that, length) { - if (kMaxLength() < length) { - throw new RangeError('Invalid typed array length') - } - if (Buffer.TYPED_ARRAY_SUPPORT) { - // Return an augmented `Uint8Array` instance, for best performance - that = new Uint8Array(length); - that.__proto__ = Buffer.prototype; - } else { - // Fallback: Return an object instance of the Buffer class - if (that === null) { - that = new Buffer(length); - } - that.length = length; - } - - return that - } - - /** - * The Buffer constructor returns instances of `Uint8Array` that have their - * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of - * `Uint8Array`, so the returned instances will have all the node `Buffer` methods - * and the `Uint8Array` methods. Square bracket notation works as expected -- it - * returns a single octet. - * - * The `Uint8Array` prototype remains unmodified. - */ - - function Buffer (arg, encodingOrOffset, length) { - if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) { - return new Buffer(arg, encodingOrOffset, length) - } - - // Common case. - if (typeof arg === 'number') { - if (typeof encodingOrOffset === 'string') { - throw new Error( - 'If encoding is specified then the first argument must be a string' - ) - } - return allocUnsafe(this, arg) - } - return from(this, arg, encodingOrOffset, length) - } - - Buffer.poolSize = 8192; // not used by this implementation - - // TODO: Legacy, not needed anymore. Remove in next major version. - Buffer._augment = function (arr) { - arr.__proto__ = Buffer.prototype; - return arr - }; - - function from (that, value, encodingOrOffset, length) { - if (typeof value === 'number') { - throw new TypeError('"value" argument must not be a number') - } - - if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) { - return fromArrayBuffer(that, value, encodingOrOffset, length) - } - - if (typeof value === 'string') { - return fromString(that, value, encodingOrOffset) - } - - return fromObject(that, value) - } - - /** - * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError - * if value is a number. - * Buffer.from(str[, encoding]) - * Buffer.from(array) - * Buffer.from(buffer) - * Buffer.from(arrayBuffer[, byteOffset[, length]]) - **/ - Buffer.from = function (value, encodingOrOffset, length) { - return from(null, value, encodingOrOffset, length) - }; - - if (Buffer.TYPED_ARRAY_SUPPORT) { - Buffer.prototype.__proto__ = Uint8Array.prototype; - Buffer.__proto__ = Uint8Array; - if (typeof Symbol !== 'undefined' && Symbol.species && - Buffer[Symbol.species] === Buffer) ; - } - - function assertSize (size) { - if (typeof size !== 'number') { - throw new TypeError('"size" argument must be a number') - } else if (size < 0) { - throw new RangeError('"size" argument must not be negative') - } - } - - function alloc (that, size, fill, encoding) { - assertSize(size); - if (size <= 0) { - return createBuffer(that, size) - } - if (fill !== undefined) { - // Only pay attention to encoding if it's a string. This - // prevents accidentally sending in a number that would - // be interpretted as a start offset. - return typeof encoding === 'string' - ? createBuffer(that, size).fill(fill, encoding) - : createBuffer(that, size).fill(fill) - } - return createBuffer(that, size) - } - - /** - * Creates a new filled Buffer instance. - * alloc(size[, fill[, encoding]]) - **/ - Buffer.alloc = function (size, fill, encoding) { - return alloc(null, size, fill, encoding) - }; - - function allocUnsafe (that, size) { - assertSize(size); - that = createBuffer(that, size < 0 ? 0 : checked(size) | 0); - if (!Buffer.TYPED_ARRAY_SUPPORT) { - for (var i = 0; i < size; ++i) { - that[i] = 0; - } - } - return that - } - - /** - * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance. - * */ - Buffer.allocUnsafe = function (size) { - return allocUnsafe(null, size) - }; - /** - * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. - */ - Buffer.allocUnsafeSlow = function (size) { - return allocUnsafe(null, size) - }; - - function fromString (that, string, encoding) { - if (typeof encoding !== 'string' || encoding === '') { - encoding = 'utf8'; - } - - if (!Buffer.isEncoding(encoding)) { - throw new TypeError('"encoding" must be a valid string encoding') - } - - var length = byteLength(string, encoding) | 0; - that = createBuffer(that, length); - - var actual = that.write(string, encoding); - - if (actual !== length) { - // Writing a hex string, for example, that contains invalid characters will - // cause everything after the first invalid character to be ignored. (e.g. - // 'abxxcd' will be treated as 'ab') - that = that.slice(0, actual); - } - - return that - } - - function fromArrayLike (that, array) { - var length = array.length < 0 ? 0 : checked(array.length) | 0; - that = createBuffer(that, length); - for (var i = 0; i < length; i += 1) { - that[i] = array[i] & 255; - } - return that - } - - function fromArrayBuffer (that, array, byteOffset, length) { - array.byteLength; // this throws if `array` is not a valid ArrayBuffer - - if (byteOffset < 0 || array.byteLength < byteOffset) { - throw new RangeError('\'offset\' is out of bounds') - } - - if (array.byteLength < byteOffset + (length || 0)) { - throw new RangeError('\'length\' is out of bounds') - } - - if (byteOffset === undefined && length === undefined) { - array = new Uint8Array(array); - } else if (length === undefined) { - array = new Uint8Array(array, byteOffset); - } else { - array = new Uint8Array(array, byteOffset, length); - } - - if (Buffer.TYPED_ARRAY_SUPPORT) { - // Return an augmented `Uint8Array` instance, for best performance - that = array; - that.__proto__ = Buffer.prototype; - } else { - // Fallback: Return an object instance of the Buffer class - that = fromArrayLike(that, array); - } - return that - } - - function fromObject (that, obj) { - if (internalIsBuffer(obj)) { - var len = checked(obj.length) | 0; - that = createBuffer(that, len); - - if (that.length === 0) { - return that - } - - obj.copy(that, 0, 0, len); - return that - } - - if (obj) { - if ((typeof ArrayBuffer !== 'undefined' && - obj.buffer instanceof ArrayBuffer) || 'length' in obj) { - if (typeof obj.length !== 'number' || isnan(obj.length)) { - return createBuffer(that, 0) - } - return fromArrayLike(that, obj) - } - - if (obj.type === 'Buffer' && isArray(obj.data)) { - return fromArrayLike(that, obj.data) - } - } - - throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.') - } - - function checked (length) { - // Note: cannot use `length < kMaxLength()` here because that fails when - // length is NaN (which is otherwise coerced to zero.) - if (length >= kMaxLength()) { - throw new RangeError('Attempt to allocate Buffer larger than maximum ' + - 'size: 0x' + kMaxLength().toString(16) + ' bytes') - } - return length | 0 - } - Buffer.isBuffer = isBuffer; - function internalIsBuffer (b) { - return !!(b != null && b._isBuffer) - } - - Buffer.compare = function compare (a, b) { - if (!internalIsBuffer(a) || !internalIsBuffer(b)) { - throw new TypeError('Arguments must be Buffers') - } - - if (a === b) return 0 - - var x = a.length; - var y = b.length; - - for (var i = 0, len = Math.min(x, y); i < len; ++i) { - if (a[i] !== b[i]) { - x = a[i]; - y = b[i]; - break - } - } - - if (x < y) return -1 - if (y < x) return 1 - return 0 - }; - - Buffer.isEncoding = function isEncoding (encoding) { - switch (String(encoding).toLowerCase()) { - case 'hex': - case 'utf8': - case 'utf-8': - case 'ascii': - case 'latin1': - case 'binary': - case 'base64': - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return true - default: - return false - } - }; - - Buffer.concat = function concat (list, length) { - if (!isArray(list)) { - throw new TypeError('"list" argument must be an Array of Buffers') - } - - if (list.length === 0) { - return Buffer.alloc(0) - } - - var i; - if (length === undefined) { - length = 0; - for (i = 0; i < list.length; ++i) { - length += list[i].length; - } - } - - var buffer = Buffer.allocUnsafe(length); - var pos = 0; - for (i = 0; i < list.length; ++i) { - var buf = list[i]; - if (!internalIsBuffer(buf)) { - throw new TypeError('"list" argument must be an Array of Buffers') - } - buf.copy(buffer, pos); - pos += buf.length; - } - return buffer - }; - - function byteLength (string, encoding) { - if (internalIsBuffer(string)) { - return string.length - } - if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' && - (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) { - return string.byteLength - } - if (typeof string !== 'string') { - string = '' + string; - } - - var len = string.length; - if (len === 0) return 0 - - // Use a for loop to avoid recursion - var loweredCase = false; - for (;;) { - switch (encoding) { - case 'ascii': - case 'latin1': - case 'binary': - return len - case 'utf8': - case 'utf-8': - case undefined: - return utf8ToBytes(string).length - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return len * 2 - case 'hex': - return len >>> 1 - case 'base64': - return base64ToBytes(string).length - default: - if (loweredCase) return utf8ToBytes(string).length // assume utf8 - encoding = ('' + encoding).toLowerCase(); - loweredCase = true; - } - } - } - Buffer.byteLength = byteLength; - - function slowToString (encoding, start, end) { - var loweredCase = false; - - // No need to verify that "this.length <= MAX_UINT32" since it's a read-only - // property of a typed array. - - // This behaves neither like String nor Uint8Array in that we set start/end - // to their upper/lower bounds if the value passed is out of range. - // undefined is handled specially as per ECMA-262 6th Edition, - // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization. - if (start === undefined || start < 0) { - start = 0; - } - // Return early if start > this.length. Done here to prevent potential uint32 - // coercion fail below. - if (start > this.length) { - return '' - } - - if (end === undefined || end > this.length) { - end = this.length; - } - - if (end <= 0) { - return '' - } - - // Force coersion to uint32. This will also coerce falsey/NaN values to 0. - end >>>= 0; - start >>>= 0; - - if (end <= start) { - return '' - } - - if (!encoding) encoding = 'utf8'; - - while (true) { - switch (encoding) { - case 'hex': - return hexSlice(this, start, end) - - case 'utf8': - case 'utf-8': - return utf8Slice(this, start, end) - - case 'ascii': - return asciiSlice(this, start, end) - - case 'latin1': - case 'binary': - return latin1Slice(this, start, end) - - case 'base64': - return base64Slice(this, start, end) - - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return utf16leSlice(this, start, end) - - default: - if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) - encoding = (encoding + '').toLowerCase(); - loweredCase = true; - } - } - } - - // The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect - // Buffer instances. - Buffer.prototype._isBuffer = true; - - function swap (b, n, m) { - var i = b[n]; - b[n] = b[m]; - b[m] = i; - } - - Buffer.prototype.swap16 = function swap16 () { - var len = this.length; - if (len % 2 !== 0) { - throw new RangeError('Buffer size must be a multiple of 16-bits') - } - for (var i = 0; i < len; i += 2) { - swap(this, i, i + 1); - } - return this - }; - - Buffer.prototype.swap32 = function swap32 () { - var len = this.length; - if (len % 4 !== 0) { - throw new RangeError('Buffer size must be a multiple of 32-bits') - } - for (var i = 0; i < len; i += 4) { - swap(this, i, i + 3); - swap(this, i + 1, i + 2); - } - return this - }; - - Buffer.prototype.swap64 = function swap64 () { - var len = this.length; - if (len % 8 !== 0) { - throw new RangeError('Buffer size must be a multiple of 64-bits') - } - for (var i = 0; i < len; i += 8) { - swap(this, i, i + 7); - swap(this, i + 1, i + 6); - swap(this, i + 2, i + 5); - swap(this, i + 3, i + 4); - } - return this - }; - - Buffer.prototype.toString = function toString () { - var length = this.length | 0; - if (length === 0) return '' - if (arguments.length === 0) return utf8Slice(this, 0, length) - return slowToString.apply(this, arguments) - }; - - Buffer.prototype.equals = function equals (b) { - if (!internalIsBuffer(b)) throw new TypeError('Argument must be a Buffer') - if (this === b) return true - return Buffer.compare(this, b) === 0 - }; - - Buffer.prototype.inspect = function inspect () { - var str = ''; - var max = INSPECT_MAX_BYTES; - if (this.length > 0) { - str = this.toString('hex', 0, max).match(/.{2}/g).join(' '); - if (this.length > max) str += ' ... '; - } - return '' - }; - - Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) { - if (!internalIsBuffer(target)) { - throw new TypeError('Argument must be a Buffer') - } - - if (start === undefined) { - start = 0; - } - if (end === undefined) { - end = target ? target.length : 0; - } - if (thisStart === undefined) { - thisStart = 0; - } - if (thisEnd === undefined) { - thisEnd = this.length; - } - - if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) { - throw new RangeError('out of range index') - } - - if (thisStart >= thisEnd && start >= end) { - return 0 - } - if (thisStart >= thisEnd) { - return -1 - } - if (start >= end) { - return 1 - } - - start >>>= 0; - end >>>= 0; - thisStart >>>= 0; - thisEnd >>>= 0; - - if (this === target) return 0 - - var x = thisEnd - thisStart; - var y = end - start; - var len = Math.min(x, y); - - var thisCopy = this.slice(thisStart, thisEnd); - var targetCopy = target.slice(start, end); - - for (var i = 0; i < len; ++i) { - if (thisCopy[i] !== targetCopy[i]) { - x = thisCopy[i]; - y = targetCopy[i]; - break - } - } - - if (x < y) return -1 - if (y < x) return 1 - return 0 - }; - - // Finds either the first index of `val` in `buffer` at offset >= `byteOffset`, - // OR the last index of `val` in `buffer` at offset <= `byteOffset`. - // - // Arguments: - // - buffer - a Buffer to search - // - val - a string, Buffer, or number - // - byteOffset - an index into `buffer`; will be clamped to an int32 - // - encoding - an optional encoding, relevant is val is a string - // - dir - true for indexOf, false for lastIndexOf - function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) { - // Empty buffer means no match - if (buffer.length === 0) return -1 - - // Normalize byteOffset - if (typeof byteOffset === 'string') { - encoding = byteOffset; - byteOffset = 0; - } else if (byteOffset > 0x7fffffff) { - byteOffset = 0x7fffffff; - } else if (byteOffset < -0x80000000) { - byteOffset = -0x80000000; - } - byteOffset = +byteOffset; // Coerce to Number. - if (isNaN(byteOffset)) { - // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer - byteOffset = dir ? 0 : (buffer.length - 1); - } - - // Normalize byteOffset: negative offsets start from the end of the buffer - if (byteOffset < 0) byteOffset = buffer.length + byteOffset; - if (byteOffset >= buffer.length) { - if (dir) return -1 - else byteOffset = buffer.length - 1; - } else if (byteOffset < 0) { - if (dir) byteOffset = 0; - else return -1 - } - - // Normalize val - if (typeof val === 'string') { - val = Buffer.from(val, encoding); - } - - // Finally, search either indexOf (if dir is true) or lastIndexOf - if (internalIsBuffer(val)) { - // Special case: looking for empty string/buffer always fails - if (val.length === 0) { - return -1 - } - return arrayIndexOf(buffer, val, byteOffset, encoding, dir) - } else if (typeof val === 'number') { - val = val & 0xFF; // Search for a byte value [0-255] - if (Buffer.TYPED_ARRAY_SUPPORT && - typeof Uint8Array.prototype.indexOf === 'function') { - if (dir) { - return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset) - } else { - return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset) - } - } - return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir) - } - - throw new TypeError('val must be string, number or Buffer') - } - - function arrayIndexOf (arr, val, byteOffset, encoding, dir) { - var indexSize = 1; - var arrLength = arr.length; - var valLength = val.length; - - if (encoding !== undefined) { - encoding = String(encoding).toLowerCase(); - if (encoding === 'ucs2' || encoding === 'ucs-2' || - encoding === 'utf16le' || encoding === 'utf-16le') { - if (arr.length < 2 || val.length < 2) { - return -1 - } - indexSize = 2; - arrLength /= 2; - valLength /= 2; - byteOffset /= 2; - } - } - - function read (buf, i) { - if (indexSize === 1) { - return buf[i] - } else { - return buf.readUInt16BE(i * indexSize) - } - } - - var i; - if (dir) { - var foundIndex = -1; - for (i = byteOffset; i < arrLength; i++) { - if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) { - if (foundIndex === -1) foundIndex = i; - if (i - foundIndex + 1 === valLength) return foundIndex * indexSize - } else { - if (foundIndex !== -1) i -= i - foundIndex; - foundIndex = -1; - } - } - } else { - if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength; - for (i = byteOffset; i >= 0; i--) { - var found = true; - for (var j = 0; j < valLength; j++) { - if (read(arr, i + j) !== read(val, j)) { - found = false; - break - } - } - if (found) return i - } - } - - return -1 - } - - Buffer.prototype.includes = function includes (val, byteOffset, encoding) { - return this.indexOf(val, byteOffset, encoding) !== -1 - }; - - Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) { - return bidirectionalIndexOf(this, val, byteOffset, encoding, true) - }; - - Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) { - return bidirectionalIndexOf(this, val, byteOffset, encoding, false) - }; - - function hexWrite (buf, string, offset, length) { - offset = Number(offset) || 0; - var remaining = buf.length - offset; - if (!length) { - length = remaining; - } else { - length = Number(length); - if (length > remaining) { - length = remaining; - } - } - - // must be an even number of digits - var strLen = string.length; - if (strLen % 2 !== 0) throw new TypeError('Invalid hex string') - - if (length > strLen / 2) { - length = strLen / 2; - } - for (var i = 0; i < length; ++i) { - var parsed = parseInt(string.substr(i * 2, 2), 16); - if (isNaN(parsed)) return i - buf[offset + i] = parsed; - } - return i - } - - function utf8Write (buf, string, offset, length) { - return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length) - } - - function asciiWrite (buf, string, offset, length) { - return blitBuffer(asciiToBytes(string), buf, offset, length) - } - - function latin1Write (buf, string, offset, length) { - return asciiWrite(buf, string, offset, length) - } - - function base64Write (buf, string, offset, length) { - return blitBuffer(base64ToBytes(string), buf, offset, length) - } - - function ucs2Write (buf, string, offset, length) { - return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length) - } - - Buffer.prototype.write = function write (string, offset, length, encoding) { - // Buffer#write(string) - if (offset === undefined) { - encoding = 'utf8'; - length = this.length; - offset = 0; - // Buffer#write(string, encoding) - } else if (length === undefined && typeof offset === 'string') { - encoding = offset; - length = this.length; - offset = 0; - // Buffer#write(string, offset[, length][, encoding]) - } else if (isFinite(offset)) { - offset = offset | 0; - if (isFinite(length)) { - length = length | 0; - if (encoding === undefined) encoding = 'utf8'; - } else { - encoding = length; - length = undefined; - } - // legacy write(string, encoding, offset, length) - remove in v0.13 - } else { - throw new Error( - 'Buffer.write(string, encoding, offset[, length]) is no longer supported' - ) - } - - var remaining = this.length - offset; - if (length === undefined || length > remaining) length = remaining; - - if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) { - throw new RangeError('Attempt to write outside buffer bounds') - } - - if (!encoding) encoding = 'utf8'; - - var loweredCase = false; - for (;;) { - switch (encoding) { - case 'hex': - return hexWrite(this, string, offset, length) - - case 'utf8': - case 'utf-8': - return utf8Write(this, string, offset, length) - - case 'ascii': - return asciiWrite(this, string, offset, length) - - case 'latin1': - case 'binary': - return latin1Write(this, string, offset, length) - - case 'base64': - // Warning: maxLength not taken into account in base64Write - return base64Write(this, string, offset, length) - - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return ucs2Write(this, string, offset, length) - - default: - if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) - encoding = ('' + encoding).toLowerCase(); - loweredCase = true; - } - } - }; - - Buffer.prototype.toJSON = function toJSON () { - return { - type: 'Buffer', - data: Array.prototype.slice.call(this._arr || this, 0) - } - }; - - function base64Slice (buf, start, end) { - if (start === 0 && end === buf.length) { - return fromByteArray(buf) - } else { - return fromByteArray(buf.slice(start, end)) - } - } - - function utf8Slice (buf, start, end) { - end = Math.min(buf.length, end); - var res = []; - - var i = start; - while (i < end) { - var firstByte = buf[i]; - var codePoint = null; - var bytesPerSequence = (firstByte > 0xEF) ? 4 - : (firstByte > 0xDF) ? 3 - : (firstByte > 0xBF) ? 2 - : 1; - - if (i + bytesPerSequence <= end) { - var secondByte, thirdByte, fourthByte, tempCodePoint; - - switch (bytesPerSequence) { - case 1: - if (firstByte < 0x80) { - codePoint = firstByte; - } - break - case 2: - secondByte = buf[i + 1]; - if ((secondByte & 0xC0) === 0x80) { - tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F); - if (tempCodePoint > 0x7F) { - codePoint = tempCodePoint; - } - } - break - case 3: - secondByte = buf[i + 1]; - thirdByte = buf[i + 2]; - if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) { - tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F); - if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) { - codePoint = tempCodePoint; - } - } - break - case 4: - secondByte = buf[i + 1]; - thirdByte = buf[i + 2]; - fourthByte = buf[i + 3]; - if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) { - tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F); - if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) { - codePoint = tempCodePoint; - } - } - } - } - - if (codePoint === null) { - // we did not generate a valid codePoint so insert a - // replacement char (U+FFFD) and advance only 1 byte - codePoint = 0xFFFD; - bytesPerSequence = 1; - } else if (codePoint > 0xFFFF) { - // encode to utf16 (surrogate pair dance) - codePoint -= 0x10000; - res.push(codePoint >>> 10 & 0x3FF | 0xD800); - codePoint = 0xDC00 | codePoint & 0x3FF; - } - - res.push(codePoint); - i += bytesPerSequence; - } - - return decodeCodePointsArray(res) - } - - // Based on http://stackoverflow.com/a/22747272/680742, the browser with - // the lowest limit is Chrome, with 0x10000 args. - // We go 1 magnitude less, for safety - var MAX_ARGUMENTS_LENGTH = 0x1000; - - function decodeCodePointsArray (codePoints) { - var len = codePoints.length; - if (len <= MAX_ARGUMENTS_LENGTH) { - return String.fromCharCode.apply(String, codePoints) // avoid extra slice() - } - - // Decode in chunks to avoid "call stack size exceeded". - var res = ''; - var i = 0; - while (i < len) { - res += String.fromCharCode.apply( - String, - codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH) - ); - } - return res - } - - function asciiSlice (buf, start, end) { - var ret = ''; - end = Math.min(buf.length, end); - - for (var i = start; i < end; ++i) { - ret += String.fromCharCode(buf[i] & 0x7F); - } - return ret - } - - function latin1Slice (buf, start, end) { - var ret = ''; - end = Math.min(buf.length, end); - - for (var i = start; i < end; ++i) { - ret += String.fromCharCode(buf[i]); - } - return ret - } - - function hexSlice (buf, start, end) { - var len = buf.length; - - if (!start || start < 0) start = 0; - if (!end || end < 0 || end > len) end = len; - - var out = ''; - for (var i = start; i < end; ++i) { - out += toHex(buf[i]); - } - return out - } - - function utf16leSlice (buf, start, end) { - var bytes = buf.slice(start, end); - var res = ''; - for (var i = 0; i < bytes.length; i += 2) { - res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256); - } - return res - } - - Buffer.prototype.slice = function slice (start, end) { - var len = this.length; - start = ~~start; - end = end === undefined ? len : ~~end; - - if (start < 0) { - start += len; - if (start < 0) start = 0; - } else if (start > len) { - start = len; - } - - if (end < 0) { - end += len; - if (end < 0) end = 0; - } else if (end > len) { - end = len; - } - - if (end < start) end = start; - - var newBuf; - if (Buffer.TYPED_ARRAY_SUPPORT) { - newBuf = this.subarray(start, end); - newBuf.__proto__ = Buffer.prototype; - } else { - var sliceLen = end - start; - newBuf = new Buffer(sliceLen, undefined); - for (var i = 0; i < sliceLen; ++i) { - newBuf[i] = this[i + start]; - } - } - - return newBuf - }; - - /* - * Need to make sure that buffer isn't trying to write out of bounds. - */ - function checkOffset (offset, ext, length) { - if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint') - if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length') - } - - Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) { - offset = offset | 0; - byteLength = byteLength | 0; - if (!noAssert) checkOffset(offset, byteLength, this.length); - - var val = this[offset]; - var mul = 1; - var i = 0; - while (++i < byteLength && (mul *= 0x100)) { - val += this[offset + i] * mul; - } - - return val - }; - - Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) { - offset = offset | 0; - byteLength = byteLength | 0; - if (!noAssert) { - checkOffset(offset, byteLength, this.length); - } - - var val = this[offset + --byteLength]; - var mul = 1; - while (byteLength > 0 && (mul *= 0x100)) { - val += this[offset + --byteLength] * mul; - } - - return val - }; - - Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) { - if (!noAssert) checkOffset(offset, 1, this.length); - return this[offset] - }; - - Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length); - return this[offset] | (this[offset + 1] << 8) - }; - - Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length); - return (this[offset] << 8) | this[offset + 1] - }; - - Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length); - - return ((this[offset]) | - (this[offset + 1] << 8) | - (this[offset + 2] << 16)) + - (this[offset + 3] * 0x1000000) - }; - - Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length); - - return (this[offset] * 0x1000000) + - ((this[offset + 1] << 16) | - (this[offset + 2] << 8) | - this[offset + 3]) - }; - - Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) { - offset = offset | 0; - byteLength = byteLength | 0; - if (!noAssert) checkOffset(offset, byteLength, this.length); - - var val = this[offset]; - var mul = 1; - var i = 0; - while (++i < byteLength && (mul *= 0x100)) { - val += this[offset + i] * mul; - } - mul *= 0x80; - - if (val >= mul) val -= Math.pow(2, 8 * byteLength); - - return val - }; - - Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) { - offset = offset | 0; - byteLength = byteLength | 0; - if (!noAssert) checkOffset(offset, byteLength, this.length); - - var i = byteLength; - var mul = 1; - var val = this[offset + --i]; - while (i > 0 && (mul *= 0x100)) { - val += this[offset + --i] * mul; - } - mul *= 0x80; - - if (val >= mul) val -= Math.pow(2, 8 * byteLength); - - return val - }; - - Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) { - if (!noAssert) checkOffset(offset, 1, this.length); - if (!(this[offset] & 0x80)) return (this[offset]) - return ((0xff - this[offset] + 1) * -1) - }; - - Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length); - var val = this[offset] | (this[offset + 1] << 8); - return (val & 0x8000) ? val | 0xFFFF0000 : val - }; - - Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length); - var val = this[offset + 1] | (this[offset] << 8); - return (val & 0x8000) ? val | 0xFFFF0000 : val - }; - - Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length); - - return (this[offset]) | - (this[offset + 1] << 8) | - (this[offset + 2] << 16) | - (this[offset + 3] << 24) - }; - - Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length); - - return (this[offset] << 24) | - (this[offset + 1] << 16) | - (this[offset + 2] << 8) | - (this[offset + 3]) - }; - - Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length); - return read(this, offset, true, 23, 4) - }; - - Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length); - return read(this, offset, false, 23, 4) - }; - - Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 8, this.length); - return read(this, offset, true, 52, 8) - }; - - Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 8, this.length); - return read(this, offset, false, 52, 8) - }; - - function checkInt (buf, value, offset, ext, max, min) { - if (!internalIsBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance') - if (value > max || value < min) throw new RangeError('"value" argument is out of bounds') - if (offset + ext > buf.length) throw new RangeError('Index out of range') - } - - Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) { - value = +value; - offset = offset | 0; - byteLength = byteLength | 0; - if (!noAssert) { - var maxBytes = Math.pow(2, 8 * byteLength) - 1; - checkInt(this, value, offset, byteLength, maxBytes, 0); - } - - var mul = 1; - var i = 0; - this[offset] = value & 0xFF; - while (++i < byteLength && (mul *= 0x100)) { - this[offset + i] = (value / mul) & 0xFF; - } - - return offset + byteLength - }; - - Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) { - value = +value; - offset = offset | 0; - byteLength = byteLength | 0; - if (!noAssert) { - var maxBytes = Math.pow(2, 8 * byteLength) - 1; - checkInt(this, value, offset, byteLength, maxBytes, 0); - } - - var i = byteLength - 1; - var mul = 1; - this[offset + i] = value & 0xFF; - while (--i >= 0 && (mul *= 0x100)) { - this[offset + i] = (value / mul) & 0xFF; - } - - return offset + byteLength - }; - - Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) { - value = +value; - offset = offset | 0; - if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0); - if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value); - this[offset] = (value & 0xff); - return offset + 1 - }; - - function objectWriteUInt16 (buf, value, offset, littleEndian) { - if (value < 0) value = 0xffff + value + 1; - for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) { - buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>> - (littleEndian ? i : 1 - i) * 8; - } - } - - Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) { - value = +value; - offset = offset | 0; - if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0); - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value & 0xff); - this[offset + 1] = (value >>> 8); - } else { - objectWriteUInt16(this, value, offset, true); - } - return offset + 2 - }; - - Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) { - value = +value; - offset = offset | 0; - if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0); - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value >>> 8); - this[offset + 1] = (value & 0xff); - } else { - objectWriteUInt16(this, value, offset, false); - } - return offset + 2 - }; - - function objectWriteUInt32 (buf, value, offset, littleEndian) { - if (value < 0) value = 0xffffffff + value + 1; - for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) { - buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff; - } - } - - Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) { - value = +value; - offset = offset | 0; - if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0); - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset + 3] = (value >>> 24); - this[offset + 2] = (value >>> 16); - this[offset + 1] = (value >>> 8); - this[offset] = (value & 0xff); - } else { - objectWriteUInt32(this, value, offset, true); - } - return offset + 4 - }; - - Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) { - value = +value; - offset = offset | 0; - if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0); - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value >>> 24); - this[offset + 1] = (value >>> 16); - this[offset + 2] = (value >>> 8); - this[offset + 3] = (value & 0xff); - } else { - objectWriteUInt32(this, value, offset, false); - } - return offset + 4 - }; - - Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) { - value = +value; - offset = offset | 0; - if (!noAssert) { - var limit = Math.pow(2, 8 * byteLength - 1); - - checkInt(this, value, offset, byteLength, limit - 1, -limit); - } - - var i = 0; - var mul = 1; - var sub = 0; - this[offset] = value & 0xFF; - while (++i < byteLength && (mul *= 0x100)) { - if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) { - sub = 1; - } - this[offset + i] = ((value / mul) >> 0) - sub & 0xFF; - } - - return offset + byteLength - }; - - Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) { - value = +value; - offset = offset | 0; - if (!noAssert) { - var limit = Math.pow(2, 8 * byteLength - 1); - - checkInt(this, value, offset, byteLength, limit - 1, -limit); - } - - var i = byteLength - 1; - var mul = 1; - var sub = 0; - this[offset + i] = value & 0xFF; - while (--i >= 0 && (mul *= 0x100)) { - if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) { - sub = 1; - } - this[offset + i] = ((value / mul) >> 0) - sub & 0xFF; - } - - return offset + byteLength - }; - - Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) { - value = +value; - offset = offset | 0; - if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80); - if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value); - if (value < 0) value = 0xff + value + 1; - this[offset] = (value & 0xff); - return offset + 1 - }; - - Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) { - value = +value; - offset = offset | 0; - if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000); - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value & 0xff); - this[offset + 1] = (value >>> 8); - } else { - objectWriteUInt16(this, value, offset, true); - } - return offset + 2 - }; - - Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) { - value = +value; - offset = offset | 0; - if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000); - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value >>> 8); - this[offset + 1] = (value & 0xff); - } else { - objectWriteUInt16(this, value, offset, false); - } - return offset + 2 - }; - - Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) { - value = +value; - offset = offset | 0; - if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000); - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value & 0xff); - this[offset + 1] = (value >>> 8); - this[offset + 2] = (value >>> 16); - this[offset + 3] = (value >>> 24); - } else { - objectWriteUInt32(this, value, offset, true); - } - return offset + 4 - }; - - Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) { - value = +value; - offset = offset | 0; - if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000); - if (value < 0) value = 0xffffffff + value + 1; - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value >>> 24); - this[offset + 1] = (value >>> 16); - this[offset + 2] = (value >>> 8); - this[offset + 3] = (value & 0xff); - } else { - objectWriteUInt32(this, value, offset, false); - } - return offset + 4 - }; - - function checkIEEE754 (buf, value, offset, ext, max, min) { - if (offset + ext > buf.length) throw new RangeError('Index out of range') - if (offset < 0) throw new RangeError('Index out of range') - } - - function writeFloat (buf, value, offset, littleEndian, noAssert) { - if (!noAssert) { - checkIEEE754(buf, value, offset, 4); - } - write(buf, value, offset, littleEndian, 23, 4); - return offset + 4 - } - - Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) { - return writeFloat(this, value, offset, true, noAssert) - }; - - Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) { - return writeFloat(this, value, offset, false, noAssert) - }; - - function writeDouble (buf, value, offset, littleEndian, noAssert) { - if (!noAssert) { - checkIEEE754(buf, value, offset, 8); - } - write(buf, value, offset, littleEndian, 52, 8); - return offset + 8 - } - - Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) { - return writeDouble(this, value, offset, true, noAssert) - }; - - Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) { - return writeDouble(this, value, offset, false, noAssert) - }; - - // copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) - Buffer.prototype.copy = function copy (target, targetStart, start, end) { - if (!start) start = 0; - if (!end && end !== 0) end = this.length; - if (targetStart >= target.length) targetStart = target.length; - if (!targetStart) targetStart = 0; - if (end > 0 && end < start) end = start; - - // Copy 0 bytes; we're done - if (end === start) return 0 - if (target.length === 0 || this.length === 0) return 0 - - // Fatal error conditions - if (targetStart < 0) { - throw new RangeError('targetStart out of bounds') - } - if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds') - if (end < 0) throw new RangeError('sourceEnd out of bounds') - - // Are we oob? - if (end > this.length) end = this.length; - if (target.length - targetStart < end - start) { - end = target.length - targetStart + start; - } - - var len = end - start; - var i; - - if (this === target && start < targetStart && targetStart < end) { - // descending copy from end - for (i = len - 1; i >= 0; --i) { - target[i + targetStart] = this[i + start]; - } - } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) { - // ascending copy from start - for (i = 0; i < len; ++i) { - target[i + targetStart] = this[i + start]; - } - } else { - Uint8Array.prototype.set.call( - target, - this.subarray(start, start + len), - targetStart - ); - } - - return len - }; - - // Usage: - // buffer.fill(number[, offset[, end]]) - // buffer.fill(buffer[, offset[, end]]) - // buffer.fill(string[, offset[, end]][, encoding]) - Buffer.prototype.fill = function fill (val, start, end, encoding) { - // Handle string cases: - if (typeof val === 'string') { - if (typeof start === 'string') { - encoding = start; - start = 0; - end = this.length; - } else if (typeof end === 'string') { - encoding = end; - end = this.length; - } - if (val.length === 1) { - var code = val.charCodeAt(0); - if (code < 256) { - val = code; - } - } - if (encoding !== undefined && typeof encoding !== 'string') { - throw new TypeError('encoding must be a string') - } - if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) { - throw new TypeError('Unknown encoding: ' + encoding) - } - } else if (typeof val === 'number') { - val = val & 255; - } - - // Invalid ranges are not set to a default, so can range check early. - if (start < 0 || this.length < start || this.length < end) { - throw new RangeError('Out of range index') - } - - if (end <= start) { - return this - } - - start = start >>> 0; - end = end === undefined ? this.length : end >>> 0; - - if (!val) val = 0; - - var i; - if (typeof val === 'number') { - for (i = start; i < end; ++i) { - this[i] = val; - } - } else { - var bytes = internalIsBuffer(val) - ? val - : utf8ToBytes(new Buffer(val, encoding).toString()); - var len = bytes.length; - for (i = 0; i < end - start; ++i) { - this[i + start] = bytes[i % len]; - } - } - - return this - }; - - // HELPER FUNCTIONS - // ================ - - var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g; - - function base64clean (str) { - // Node strips out invalid characters like \n and \t from the string, base64-js does not - str = stringtrim(str).replace(INVALID_BASE64_RE, ''); - // Node converts strings with length < 2 to '' - if (str.length < 2) return '' - // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not - while (str.length % 4 !== 0) { - str = str + '='; - } - return str - } - - function stringtrim (str) { - if (str.trim) return str.trim() - return str.replace(/^\s+|\s+$/g, '') - } - - function toHex (n) { - if (n < 16) return '0' + n.toString(16) - return n.toString(16) - } - - function utf8ToBytes (string, units) { - units = units || Infinity; - var codePoint; - var length = string.length; - var leadSurrogate = null; - var bytes = []; - - for (var i = 0; i < length; ++i) { - codePoint = string.charCodeAt(i); - - // is surrogate component - if (codePoint > 0xD7FF && codePoint < 0xE000) { - // last char was a lead - if (!leadSurrogate) { - // no lead yet - if (codePoint > 0xDBFF) { - // unexpected trail - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD); - continue - } else if (i + 1 === length) { - // unpaired lead - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD); - continue - } - - // valid lead - leadSurrogate = codePoint; - - continue - } - - // 2 leads in a row - if (codePoint < 0xDC00) { - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD); - leadSurrogate = codePoint; - continue - } - - // valid surrogate pair - codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000; - } else if (leadSurrogate) { - // valid bmp char, but last char was a lead - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD); - } - - leadSurrogate = null; - - // encode utf8 - if (codePoint < 0x80) { - if ((units -= 1) < 0) break - bytes.push(codePoint); - } else if (codePoint < 0x800) { - if ((units -= 2) < 0) break - bytes.push( - codePoint >> 0x6 | 0xC0, - codePoint & 0x3F | 0x80 - ); - } else if (codePoint < 0x10000) { - if ((units -= 3) < 0) break - bytes.push( - codePoint >> 0xC | 0xE0, - codePoint >> 0x6 & 0x3F | 0x80, - codePoint & 0x3F | 0x80 - ); - } else if (codePoint < 0x110000) { - if ((units -= 4) < 0) break - bytes.push( - codePoint >> 0x12 | 0xF0, - codePoint >> 0xC & 0x3F | 0x80, - codePoint >> 0x6 & 0x3F | 0x80, - codePoint & 0x3F | 0x80 - ); - } else { - throw new Error('Invalid code point') - } - } - - return bytes - } - - function asciiToBytes (str) { - var byteArray = []; - for (var i = 0; i < str.length; ++i) { - // Node's code seems to be doing this and not & 0x7F.. - byteArray.push(str.charCodeAt(i) & 0xFF); - } - return byteArray - } - - function utf16leToBytes (str, units) { - var c, hi, lo; - var byteArray = []; - for (var i = 0; i < str.length; ++i) { - if ((units -= 2) < 0) break - - c = str.charCodeAt(i); - hi = c >> 8; - lo = c % 256; - byteArray.push(lo); - byteArray.push(hi); - } - - return byteArray - } - - - function base64ToBytes (str) { - return toByteArray(base64clean(str)) - } - - function blitBuffer (src, dst, offset, length) { - for (var i = 0; i < length; ++i) { - if ((i + offset >= dst.length) || (i >= src.length)) break - dst[i + offset] = src[i]; - } - return i - } - - function isnan (val) { - return val !== val // eslint-disable-line no-self-compare - } - - - // the following is from is-buffer, also by Feross Aboukhadijeh and with same lisence - // The _isBuffer check is for Safari 5-7 support, because it's missing - // Object.prototype.constructor. Remove this eventually - function isBuffer(obj) { - return obj != null && (!!obj._isBuffer || isFastBuffer(obj) || isSlowBuffer(obj)) - } - - function isFastBuffer (obj) { - return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj) - } - - // For Node v0.10 support. Remove this eventually. - function isSlowBuffer (obj) { - return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isFastBuffer(obj.slice(0, 0)) - } - - var browser$2 = true; - - var utils$3 = {}; - - var he = {exports: {}}; - - /*! https://mths.be/he v1.2.0 by @mathias | MIT license */ - - (function (module, exports) { - (function(root) { - - // Detect free variables `exports`. - var freeExports = exports; - - // Detect free variable `module`. - var freeModule = module && - module.exports == freeExports && module; - - // Detect free variable `global`, from Node.js or Browserified code, - // and use it as `root`. - var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal; - if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) { - root = freeGlobal; - } - - /*--------------------------------------------------------------------------*/ - - // All astral symbols. - var regexAstralSymbols = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g; - // All ASCII symbols (not just printable ASCII) except those listed in the - // first column of the overrides table. - // https://html.spec.whatwg.org/multipage/syntax.html#table-charref-overrides - var regexAsciiWhitelist = /[\x01-\x7F]/g; - // All BMP symbols that are not ASCII newlines, printable ASCII symbols, or - // code points listed in the first column of the overrides table on - // https://html.spec.whatwg.org/multipage/syntax.html#table-charref-overrides. - var regexBmpWhitelist = /[\x01-\t\x0B\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g; - - var regexEncodeNonAscii = /<\u20D2|=\u20E5|>\u20D2|\u205F\u200A|\u219D\u0338|\u2202\u0338|\u2220\u20D2|\u2229\uFE00|\u222A\uFE00|\u223C\u20D2|\u223D\u0331|\u223E\u0333|\u2242\u0338|\u224B\u0338|\u224D\u20D2|\u224E\u0338|\u224F\u0338|\u2250\u0338|\u2261\u20E5|\u2264\u20D2|\u2265\u20D2|\u2266\u0338|\u2267\u0338|\u2268\uFE00|\u2269\uFE00|\u226A\u0338|\u226A\u20D2|\u226B\u0338|\u226B\u20D2|\u227F\u0338|\u2282\u20D2|\u2283\u20D2|\u228A\uFE00|\u228B\uFE00|\u228F\u0338|\u2290\u0338|\u2293\uFE00|\u2294\uFE00|\u22B4\u20D2|\u22B5\u20D2|\u22D8\u0338|\u22D9\u0338|\u22DA\uFE00|\u22DB\uFE00|\u22F5\u0338|\u22F9\u0338|\u2933\u0338|\u29CF\u0338|\u29D0\u0338|\u2A6D\u0338|\u2A70\u0338|\u2A7D\u0338|\u2A7E\u0338|\u2AA1\u0338|\u2AA2\u0338|\u2AAC\uFE00|\u2AAD\uFE00|\u2AAF\u0338|\u2AB0\u0338|\u2AC5\u0338|\u2AC6\u0338|\u2ACB\uFE00|\u2ACC\uFE00|\u2AFD\u20E5|[\xA0-\u0113\u0116-\u0122\u0124-\u012B\u012E-\u014D\u0150-\u017E\u0192\u01B5\u01F5\u0237\u02C6\u02C7\u02D8-\u02DD\u0311\u0391-\u03A1\u03A3-\u03A9\u03B1-\u03C9\u03D1\u03D2\u03D5\u03D6\u03DC\u03DD\u03F0\u03F1\u03F5\u03F6\u0401-\u040C\u040E-\u044F\u0451-\u045C\u045E\u045F\u2002-\u2005\u2007-\u2010\u2013-\u2016\u2018-\u201A\u201C-\u201E\u2020-\u2022\u2025\u2026\u2030-\u2035\u2039\u203A\u203E\u2041\u2043\u2044\u204F\u2057\u205F-\u2063\u20AC\u20DB\u20DC\u2102\u2105\u210A-\u2113\u2115-\u211E\u2122\u2124\u2127-\u2129\u212C\u212D\u212F-\u2131\u2133-\u2138\u2145-\u2148\u2153-\u215E\u2190-\u219B\u219D-\u21A7\u21A9-\u21AE\u21B0-\u21B3\u21B5-\u21B7\u21BA-\u21DB\u21DD\u21E4\u21E5\u21F5\u21FD-\u2205\u2207-\u2209\u220B\u220C\u220F-\u2214\u2216-\u2218\u221A\u221D-\u2238\u223A-\u2257\u2259\u225A\u225C\u225F-\u2262\u2264-\u228B\u228D-\u229B\u229D-\u22A5\u22A7-\u22B0\u22B2-\u22BB\u22BD-\u22DB\u22DE-\u22E3\u22E6-\u22F7\u22F9-\u22FE\u2305\u2306\u2308-\u2310\u2312\u2313\u2315\u2316\u231C-\u231F\u2322\u2323\u232D\u232E\u2336\u233D\u233F\u237C\u23B0\u23B1\u23B4-\u23B6\u23DC-\u23DF\u23E2\u23E7\u2423\u24C8\u2500\u2502\u250C\u2510\u2514\u2518\u251C\u2524\u252C\u2534\u253C\u2550-\u256C\u2580\u2584\u2588\u2591-\u2593\u25A1\u25AA\u25AB\u25AD\u25AE\u25B1\u25B3-\u25B5\u25B8\u25B9\u25BD-\u25BF\u25C2\u25C3\u25CA\u25CB\u25EC\u25EF\u25F8-\u25FC\u2605\u2606\u260E\u2640\u2642\u2660\u2663\u2665\u2666\u266A\u266D-\u266F\u2713\u2717\u2720\u2736\u2758\u2772\u2773\u27C8\u27C9\u27E6-\u27ED\u27F5-\u27FA\u27FC\u27FF\u2902-\u2905\u290C-\u2913\u2916\u2919-\u2920\u2923-\u292A\u2933\u2935-\u2939\u293C\u293D\u2945\u2948-\u294B\u294E-\u2976\u2978\u2979\u297B-\u297F\u2985\u2986\u298B-\u2996\u299A\u299C\u299D\u29A4-\u29B7\u29B9\u29BB\u29BC\u29BE-\u29C5\u29C9\u29CD-\u29D0\u29DC-\u29DE\u29E3-\u29E5\u29EB\u29F4\u29F6\u2A00-\u2A02\u2A04\u2A06\u2A0C\u2A0D\u2A10-\u2A17\u2A22-\u2A27\u2A29\u2A2A\u2A2D-\u2A31\u2A33-\u2A3C\u2A3F\u2A40\u2A42-\u2A4D\u2A50\u2A53-\u2A58\u2A5A-\u2A5D\u2A5F\u2A66\u2A6A\u2A6D-\u2A75\u2A77-\u2A9A\u2A9D-\u2AA2\u2AA4-\u2AB0\u2AB3-\u2AC8\u2ACB\u2ACC\u2ACF-\u2ADB\u2AE4\u2AE6-\u2AE9\u2AEB-\u2AF3\u2AFD\uFB00-\uFB04]|\uD835[\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDCCF\uDD04\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDD6B]/g; - var encodeMap = {'\xAD':'shy','\u200C':'zwnj','\u200D':'zwj','\u200E':'lrm','\u2063':'ic','\u2062':'it','\u2061':'af','\u200F':'rlm','\u200B':'ZeroWidthSpace','\u2060':'NoBreak','\u0311':'DownBreve','\u20DB':'tdot','\u20DC':'DotDot','\t':'Tab','\n':'NewLine','\u2008':'puncsp','\u205F':'MediumSpace','\u2009':'thinsp','\u200A':'hairsp','\u2004':'emsp13','\u2002':'ensp','\u2005':'emsp14','\u2003':'emsp','\u2007':'numsp','\xA0':'nbsp','\u205F\u200A':'ThickSpace','\u203E':'oline','_':'lowbar','\u2010':'dash','\u2013':'ndash','\u2014':'mdash','\u2015':'horbar',',':'comma',';':'semi','\u204F':'bsemi',':':'colon','\u2A74':'Colone','!':'excl','\xA1':'iexcl','?':'quest','\xBF':'iquest','.':'period','\u2025':'nldr','\u2026':'mldr','\xB7':'middot','\'':'apos','\u2018':'lsquo','\u2019':'rsquo','\u201A':'sbquo','\u2039':'lsaquo','\u203A':'rsaquo','"':'quot','\u201C':'ldquo','\u201D':'rdquo','\u201E':'bdquo','\xAB':'laquo','\xBB':'raquo','(':'lpar',')':'rpar','[':'lsqb',']':'rsqb','{':'lcub','}':'rcub','\u2308':'lceil','\u2309':'rceil','\u230A':'lfloor','\u230B':'rfloor','\u2985':'lopar','\u2986':'ropar','\u298B':'lbrke','\u298C':'rbrke','\u298D':'lbrkslu','\u298E':'rbrksld','\u298F':'lbrksld','\u2990':'rbrkslu','\u2991':'langd','\u2992':'rangd','\u2993':'lparlt','\u2994':'rpargt','\u2995':'gtlPar','\u2996':'ltrPar','\u27E6':'lobrk','\u27E7':'robrk','\u27E8':'lang','\u27E9':'rang','\u27EA':'Lang','\u27EB':'Rang','\u27EC':'loang','\u27ED':'roang','\u2772':'lbbrk','\u2773':'rbbrk','\u2016':'Vert','\xA7':'sect','\xB6':'para','@':'commat','*':'ast','/':'sol','undefined':null,'&':'amp','#':'num','%':'percnt','\u2030':'permil','\u2031':'pertenk','\u2020':'dagger','\u2021':'Dagger','\u2022':'bull','\u2043':'hybull','\u2032':'prime','\u2033':'Prime','\u2034':'tprime','\u2057':'qprime','\u2035':'bprime','\u2041':'caret','`':'grave','\xB4':'acute','\u02DC':'tilde','^':'Hat','\xAF':'macr','\u02D8':'breve','\u02D9':'dot','\xA8':'die','\u02DA':'ring','\u02DD':'dblac','\xB8':'cedil','\u02DB':'ogon','\u02C6':'circ','\u02C7':'caron','\xB0':'deg','\xA9':'copy','\xAE':'reg','\u2117':'copysr','\u2118':'wp','\u211E':'rx','\u2127':'mho','\u2129':'iiota','\u2190':'larr','\u219A':'nlarr','\u2192':'rarr','\u219B':'nrarr','\u2191':'uarr','\u2193':'darr','\u2194':'harr','\u21AE':'nharr','\u2195':'varr','\u2196':'nwarr','\u2197':'nearr','\u2198':'searr','\u2199':'swarr','\u219D':'rarrw','\u219D\u0338':'nrarrw','\u219E':'Larr','\u219F':'Uarr','\u21A0':'Rarr','\u21A1':'Darr','\u21A2':'larrtl','\u21A3':'rarrtl','\u21A4':'mapstoleft','\u21A5':'mapstoup','\u21A6':'map','\u21A7':'mapstodown','\u21A9':'larrhk','\u21AA':'rarrhk','\u21AB':'larrlp','\u21AC':'rarrlp','\u21AD':'harrw','\u21B0':'lsh','\u21B1':'rsh','\u21B2':'ldsh','\u21B3':'rdsh','\u21B5':'crarr','\u21B6':'cularr','\u21B7':'curarr','\u21BA':'olarr','\u21BB':'orarr','\u21BC':'lharu','\u21BD':'lhard','\u21BE':'uharr','\u21BF':'uharl','\u21C0':'rharu','\u21C1':'rhard','\u21C2':'dharr','\u21C3':'dharl','\u21C4':'rlarr','\u21C5':'udarr','\u21C6':'lrarr','\u21C7':'llarr','\u21C8':'uuarr','\u21C9':'rrarr','\u21CA':'ddarr','\u21CB':'lrhar','\u21CC':'rlhar','\u21D0':'lArr','\u21CD':'nlArr','\u21D1':'uArr','\u21D2':'rArr','\u21CF':'nrArr','\u21D3':'dArr','\u21D4':'iff','\u21CE':'nhArr','\u21D5':'vArr','\u21D6':'nwArr','\u21D7':'neArr','\u21D8':'seArr','\u21D9':'swArr','\u21DA':'lAarr','\u21DB':'rAarr','\u21DD':'zigrarr','\u21E4':'larrb','\u21E5':'rarrb','\u21F5':'duarr','\u21FD':'loarr','\u21FE':'roarr','\u21FF':'hoarr','\u2200':'forall','\u2201':'comp','\u2202':'part','\u2202\u0338':'npart','\u2203':'exist','\u2204':'nexist','\u2205':'empty','\u2207':'Del','\u2208':'in','\u2209':'notin','\u220B':'ni','\u220C':'notni','\u03F6':'bepsi','\u220F':'prod','\u2210':'coprod','\u2211':'sum','+':'plus','\xB1':'pm','\xF7':'div','\xD7':'times','<':'lt','\u226E':'nlt','<\u20D2':'nvlt','=':'equals','\u2260':'ne','=\u20E5':'bne','\u2A75':'Equal','>':'gt','\u226F':'ngt','>\u20D2':'nvgt','\xAC':'not','|':'vert','\xA6':'brvbar','\u2212':'minus','\u2213':'mp','\u2214':'plusdo','\u2044':'frasl','\u2216':'setmn','\u2217':'lowast','\u2218':'compfn','\u221A':'Sqrt','\u221D':'prop','\u221E':'infin','\u221F':'angrt','\u2220':'ang','\u2220\u20D2':'nang','\u2221':'angmsd','\u2222':'angsph','\u2223':'mid','\u2224':'nmid','\u2225':'par','\u2226':'npar','\u2227':'and','\u2228':'or','\u2229':'cap','\u2229\uFE00':'caps','\u222A':'cup','\u222A\uFE00':'cups','\u222B':'int','\u222C':'Int','\u222D':'tint','\u2A0C':'qint','\u222E':'oint','\u222F':'Conint','\u2230':'Cconint','\u2231':'cwint','\u2232':'cwconint','\u2233':'awconint','\u2234':'there4','\u2235':'becaus','\u2236':'ratio','\u2237':'Colon','\u2238':'minusd','\u223A':'mDDot','\u223B':'homtht','\u223C':'sim','\u2241':'nsim','\u223C\u20D2':'nvsim','\u223D':'bsim','\u223D\u0331':'race','\u223E':'ac','\u223E\u0333':'acE','\u223F':'acd','\u2240':'wr','\u2242':'esim','\u2242\u0338':'nesim','\u2243':'sime','\u2244':'nsime','\u2245':'cong','\u2247':'ncong','\u2246':'simne','\u2248':'ap','\u2249':'nap','\u224A':'ape','\u224B':'apid','\u224B\u0338':'napid','\u224C':'bcong','\u224D':'CupCap','\u226D':'NotCupCap','\u224D\u20D2':'nvap','\u224E':'bump','\u224E\u0338':'nbump','\u224F':'bumpe','\u224F\u0338':'nbumpe','\u2250':'doteq','\u2250\u0338':'nedot','\u2251':'eDot','\u2252':'efDot','\u2253':'erDot','\u2254':'colone','\u2255':'ecolon','\u2256':'ecir','\u2257':'cire','\u2259':'wedgeq','\u225A':'veeeq','\u225C':'trie','\u225F':'equest','\u2261':'equiv','\u2262':'nequiv','\u2261\u20E5':'bnequiv','\u2264':'le','\u2270':'nle','\u2264\u20D2':'nvle','\u2265':'ge','\u2271':'nge','\u2265\u20D2':'nvge','\u2266':'lE','\u2266\u0338':'nlE','\u2267':'gE','\u2267\u0338':'ngE','\u2268\uFE00':'lvnE','\u2268':'lnE','\u2269':'gnE','\u2269\uFE00':'gvnE','\u226A':'ll','\u226A\u0338':'nLtv','\u226A\u20D2':'nLt','\u226B':'gg','\u226B\u0338':'nGtv','\u226B\u20D2':'nGt','\u226C':'twixt','\u2272':'lsim','\u2274':'nlsim','\u2273':'gsim','\u2275':'ngsim','\u2276':'lg','\u2278':'ntlg','\u2277':'gl','\u2279':'ntgl','\u227A':'pr','\u2280':'npr','\u227B':'sc','\u2281':'nsc','\u227C':'prcue','\u22E0':'nprcue','\u227D':'sccue','\u22E1':'nsccue','\u227E':'prsim','\u227F':'scsim','\u227F\u0338':'NotSucceedsTilde','\u2282':'sub','\u2284':'nsub','\u2282\u20D2':'vnsub','\u2283':'sup','\u2285':'nsup','\u2283\u20D2':'vnsup','\u2286':'sube','\u2288':'nsube','\u2287':'supe','\u2289':'nsupe','\u228A\uFE00':'vsubne','\u228A':'subne','\u228B\uFE00':'vsupne','\u228B':'supne','\u228D':'cupdot','\u228E':'uplus','\u228F':'sqsub','\u228F\u0338':'NotSquareSubset','\u2290':'sqsup','\u2290\u0338':'NotSquareSuperset','\u2291':'sqsube','\u22E2':'nsqsube','\u2292':'sqsupe','\u22E3':'nsqsupe','\u2293':'sqcap','\u2293\uFE00':'sqcaps','\u2294':'sqcup','\u2294\uFE00':'sqcups','\u2295':'oplus','\u2296':'ominus','\u2297':'otimes','\u2298':'osol','\u2299':'odot','\u229A':'ocir','\u229B':'oast','\u229D':'odash','\u229E':'plusb','\u229F':'minusb','\u22A0':'timesb','\u22A1':'sdotb','\u22A2':'vdash','\u22AC':'nvdash','\u22A3':'dashv','\u22A4':'top','\u22A5':'bot','\u22A7':'models','\u22A8':'vDash','\u22AD':'nvDash','\u22A9':'Vdash','\u22AE':'nVdash','\u22AA':'Vvdash','\u22AB':'VDash','\u22AF':'nVDash','\u22B0':'prurel','\u22B2':'vltri','\u22EA':'nltri','\u22B3':'vrtri','\u22EB':'nrtri','\u22B4':'ltrie','\u22EC':'nltrie','\u22B4\u20D2':'nvltrie','\u22B5':'rtrie','\u22ED':'nrtrie','\u22B5\u20D2':'nvrtrie','\u22B6':'origof','\u22B7':'imof','\u22B8':'mumap','\u22B9':'hercon','\u22BA':'intcal','\u22BB':'veebar','\u22BD':'barvee','\u22BE':'angrtvb','\u22BF':'lrtri','\u22C0':'Wedge','\u22C1':'Vee','\u22C2':'xcap','\u22C3':'xcup','\u22C4':'diam','\u22C5':'sdot','\u22C6':'Star','\u22C7':'divonx','\u22C8':'bowtie','\u22C9':'ltimes','\u22CA':'rtimes','\u22CB':'lthree','\u22CC':'rthree','\u22CD':'bsime','\u22CE':'cuvee','\u22CF':'cuwed','\u22D0':'Sub','\u22D1':'Sup','\u22D2':'Cap','\u22D3':'Cup','\u22D4':'fork','\u22D5':'epar','\u22D6':'ltdot','\u22D7':'gtdot','\u22D8':'Ll','\u22D8\u0338':'nLl','\u22D9':'Gg','\u22D9\u0338':'nGg','\u22DA\uFE00':'lesg','\u22DA':'leg','\u22DB':'gel','\u22DB\uFE00':'gesl','\u22DE':'cuepr','\u22DF':'cuesc','\u22E6':'lnsim','\u22E7':'gnsim','\u22E8':'prnsim','\u22E9':'scnsim','\u22EE':'vellip','\u22EF':'ctdot','\u22F0':'utdot','\u22F1':'dtdot','\u22F2':'disin','\u22F3':'isinsv','\u22F4':'isins','\u22F5':'isindot','\u22F5\u0338':'notindot','\u22F6':'notinvc','\u22F7':'notinvb','\u22F9':'isinE','\u22F9\u0338':'notinE','\u22FA':'nisd','\u22FB':'xnis','\u22FC':'nis','\u22FD':'notnivc','\u22FE':'notnivb','\u2305':'barwed','\u2306':'Barwed','\u230C':'drcrop','\u230D':'dlcrop','\u230E':'urcrop','\u230F':'ulcrop','\u2310':'bnot','\u2312':'profline','\u2313':'profsurf','\u2315':'telrec','\u2316':'target','\u231C':'ulcorn','\u231D':'urcorn','\u231E':'dlcorn','\u231F':'drcorn','\u2322':'frown','\u2323':'smile','\u232D':'cylcty','\u232E':'profalar','\u2336':'topbot','\u233D':'ovbar','\u233F':'solbar','\u237C':'angzarr','\u23B0':'lmoust','\u23B1':'rmoust','\u23B4':'tbrk','\u23B5':'bbrk','\u23B6':'bbrktbrk','\u23DC':'OverParenthesis','\u23DD':'UnderParenthesis','\u23DE':'OverBrace','\u23DF':'UnderBrace','\u23E2':'trpezium','\u23E7':'elinters','\u2423':'blank','\u2500':'boxh','\u2502':'boxv','\u250C':'boxdr','\u2510':'boxdl','\u2514':'boxur','\u2518':'boxul','\u251C':'boxvr','\u2524':'boxvl','\u252C':'boxhd','\u2534':'boxhu','\u253C':'boxvh','\u2550':'boxH','\u2551':'boxV','\u2552':'boxdR','\u2553':'boxDr','\u2554':'boxDR','\u2555':'boxdL','\u2556':'boxDl','\u2557':'boxDL','\u2558':'boxuR','\u2559':'boxUr','\u255A':'boxUR','\u255B':'boxuL','\u255C':'boxUl','\u255D':'boxUL','\u255E':'boxvR','\u255F':'boxVr','\u2560':'boxVR','\u2561':'boxvL','\u2562':'boxVl','\u2563':'boxVL','\u2564':'boxHd','\u2565':'boxhD','\u2566':'boxHD','\u2567':'boxHu','\u2568':'boxhU','\u2569':'boxHU','\u256A':'boxvH','\u256B':'boxVh','\u256C':'boxVH','\u2580':'uhblk','\u2584':'lhblk','\u2588':'block','\u2591':'blk14','\u2592':'blk12','\u2593':'blk34','\u25A1':'squ','\u25AA':'squf','\u25AB':'EmptyVerySmallSquare','\u25AD':'rect','\u25AE':'marker','\u25B1':'fltns','\u25B3':'xutri','\u25B4':'utrif','\u25B5':'utri','\u25B8':'rtrif','\u25B9':'rtri','\u25BD':'xdtri','\u25BE':'dtrif','\u25BF':'dtri','\u25C2':'ltrif','\u25C3':'ltri','\u25CA':'loz','\u25CB':'cir','\u25EC':'tridot','\u25EF':'xcirc','\u25F8':'ultri','\u25F9':'urtri','\u25FA':'lltri','\u25FB':'EmptySmallSquare','\u25FC':'FilledSmallSquare','\u2605':'starf','\u2606':'star','\u260E':'phone','\u2640':'female','\u2642':'male','\u2660':'spades','\u2663':'clubs','\u2665':'hearts','\u2666':'diams','\u266A':'sung','\u2713':'check','\u2717':'cross','\u2720':'malt','\u2736':'sext','\u2758':'VerticalSeparator','\u27C8':'bsolhsub','\u27C9':'suphsol','\u27F5':'xlarr','\u27F6':'xrarr','\u27F7':'xharr','\u27F8':'xlArr','\u27F9':'xrArr','\u27FA':'xhArr','\u27FC':'xmap','\u27FF':'dzigrarr','\u2902':'nvlArr','\u2903':'nvrArr','\u2904':'nvHarr','\u2905':'Map','\u290C':'lbarr','\u290D':'rbarr','\u290E':'lBarr','\u290F':'rBarr','\u2910':'RBarr','\u2911':'DDotrahd','\u2912':'UpArrowBar','\u2913':'DownArrowBar','\u2916':'Rarrtl','\u2919':'latail','\u291A':'ratail','\u291B':'lAtail','\u291C':'rAtail','\u291D':'larrfs','\u291E':'rarrfs','\u291F':'larrbfs','\u2920':'rarrbfs','\u2923':'nwarhk','\u2924':'nearhk','\u2925':'searhk','\u2926':'swarhk','\u2927':'nwnear','\u2928':'toea','\u2929':'tosa','\u292A':'swnwar','\u2933':'rarrc','\u2933\u0338':'nrarrc','\u2935':'cudarrr','\u2936':'ldca','\u2937':'rdca','\u2938':'cudarrl','\u2939':'larrpl','\u293C':'curarrm','\u293D':'cularrp','\u2945':'rarrpl','\u2948':'harrcir','\u2949':'Uarrocir','\u294A':'lurdshar','\u294B':'ldrushar','\u294E':'LeftRightVector','\u294F':'RightUpDownVector','\u2950':'DownLeftRightVector','\u2951':'LeftUpDownVector','\u2952':'LeftVectorBar','\u2953':'RightVectorBar','\u2954':'RightUpVectorBar','\u2955':'RightDownVectorBar','\u2956':'DownLeftVectorBar','\u2957':'DownRightVectorBar','\u2958':'LeftUpVectorBar','\u2959':'LeftDownVectorBar','\u295A':'LeftTeeVector','\u295B':'RightTeeVector','\u295C':'RightUpTeeVector','\u295D':'RightDownTeeVector','\u295E':'DownLeftTeeVector','\u295F':'DownRightTeeVector','\u2960':'LeftUpTeeVector','\u2961':'LeftDownTeeVector','\u2962':'lHar','\u2963':'uHar','\u2964':'rHar','\u2965':'dHar','\u2966':'luruhar','\u2967':'ldrdhar','\u2968':'ruluhar','\u2969':'rdldhar','\u296A':'lharul','\u296B':'llhard','\u296C':'rharul','\u296D':'lrhard','\u296E':'udhar','\u296F':'duhar','\u2970':'RoundImplies','\u2971':'erarr','\u2972':'simrarr','\u2973':'larrsim','\u2974':'rarrsim','\u2975':'rarrap','\u2976':'ltlarr','\u2978':'gtrarr','\u2979':'subrarr','\u297B':'suplarr','\u297C':'lfisht','\u297D':'rfisht','\u297E':'ufisht','\u297F':'dfisht','\u299A':'vzigzag','\u299C':'vangrt','\u299D':'angrtvbd','\u29A4':'ange','\u29A5':'range','\u29A6':'dwangle','\u29A7':'uwangle','\u29A8':'angmsdaa','\u29A9':'angmsdab','\u29AA':'angmsdac','\u29AB':'angmsdad','\u29AC':'angmsdae','\u29AD':'angmsdaf','\u29AE':'angmsdag','\u29AF':'angmsdah','\u29B0':'bemptyv','\u29B1':'demptyv','\u29B2':'cemptyv','\u29B3':'raemptyv','\u29B4':'laemptyv','\u29B5':'ohbar','\u29B6':'omid','\u29B7':'opar','\u29B9':'operp','\u29BB':'olcross','\u29BC':'odsold','\u29BE':'olcir','\u29BF':'ofcir','\u29C0':'olt','\u29C1':'ogt','\u29C2':'cirscir','\u29C3':'cirE','\u29C4':'solb','\u29C5':'bsolb','\u29C9':'boxbox','\u29CD':'trisb','\u29CE':'rtriltri','\u29CF':'LeftTriangleBar','\u29CF\u0338':'NotLeftTriangleBar','\u29D0':'RightTriangleBar','\u29D0\u0338':'NotRightTriangleBar','\u29DC':'iinfin','\u29DD':'infintie','\u29DE':'nvinfin','\u29E3':'eparsl','\u29E4':'smeparsl','\u29E5':'eqvparsl','\u29EB':'lozf','\u29F4':'RuleDelayed','\u29F6':'dsol','\u2A00':'xodot','\u2A01':'xoplus','\u2A02':'xotime','\u2A04':'xuplus','\u2A06':'xsqcup','\u2A0D':'fpartint','\u2A10':'cirfnint','\u2A11':'awint','\u2A12':'rppolint','\u2A13':'scpolint','\u2A14':'npolint','\u2A15':'pointint','\u2A16':'quatint','\u2A17':'intlarhk','\u2A22':'pluscir','\u2A23':'plusacir','\u2A24':'simplus','\u2A25':'plusdu','\u2A26':'plussim','\u2A27':'plustwo','\u2A29':'mcomma','\u2A2A':'minusdu','\u2A2D':'loplus','\u2A2E':'roplus','\u2A2F':'Cross','\u2A30':'timesd','\u2A31':'timesbar','\u2A33':'smashp','\u2A34':'lotimes','\u2A35':'rotimes','\u2A36':'otimesas','\u2A37':'Otimes','\u2A38':'odiv','\u2A39':'triplus','\u2A3A':'triminus','\u2A3B':'tritime','\u2A3C':'iprod','\u2A3F':'amalg','\u2A40':'capdot','\u2A42':'ncup','\u2A43':'ncap','\u2A44':'capand','\u2A45':'cupor','\u2A46':'cupcap','\u2A47':'capcup','\u2A48':'cupbrcap','\u2A49':'capbrcup','\u2A4A':'cupcup','\u2A4B':'capcap','\u2A4C':'ccups','\u2A4D':'ccaps','\u2A50':'ccupssm','\u2A53':'And','\u2A54':'Or','\u2A55':'andand','\u2A56':'oror','\u2A57':'orslope','\u2A58':'andslope','\u2A5A':'andv','\u2A5B':'orv','\u2A5C':'andd','\u2A5D':'ord','\u2A5F':'wedbar','\u2A66':'sdote','\u2A6A':'simdot','\u2A6D':'congdot','\u2A6D\u0338':'ncongdot','\u2A6E':'easter','\u2A6F':'apacir','\u2A70':'apE','\u2A70\u0338':'napE','\u2A71':'eplus','\u2A72':'pluse','\u2A73':'Esim','\u2A77':'eDDot','\u2A78':'equivDD','\u2A79':'ltcir','\u2A7A':'gtcir','\u2A7B':'ltquest','\u2A7C':'gtquest','\u2A7D':'les','\u2A7D\u0338':'nles','\u2A7E':'ges','\u2A7E\u0338':'nges','\u2A7F':'lesdot','\u2A80':'gesdot','\u2A81':'lesdoto','\u2A82':'gesdoto','\u2A83':'lesdotor','\u2A84':'gesdotol','\u2A85':'lap','\u2A86':'gap','\u2A87':'lne','\u2A88':'gne','\u2A89':'lnap','\u2A8A':'gnap','\u2A8B':'lEg','\u2A8C':'gEl','\u2A8D':'lsime','\u2A8E':'gsime','\u2A8F':'lsimg','\u2A90':'gsiml','\u2A91':'lgE','\u2A92':'glE','\u2A93':'lesges','\u2A94':'gesles','\u2A95':'els','\u2A96':'egs','\u2A97':'elsdot','\u2A98':'egsdot','\u2A99':'el','\u2A9A':'eg','\u2A9D':'siml','\u2A9E':'simg','\u2A9F':'simlE','\u2AA0':'simgE','\u2AA1':'LessLess','\u2AA1\u0338':'NotNestedLessLess','\u2AA2':'GreaterGreater','\u2AA2\u0338':'NotNestedGreaterGreater','\u2AA4':'glj','\u2AA5':'gla','\u2AA6':'ltcc','\u2AA7':'gtcc','\u2AA8':'lescc','\u2AA9':'gescc','\u2AAA':'smt','\u2AAB':'lat','\u2AAC':'smte','\u2AAC\uFE00':'smtes','\u2AAD':'late','\u2AAD\uFE00':'lates','\u2AAE':'bumpE','\u2AAF':'pre','\u2AAF\u0338':'npre','\u2AB0':'sce','\u2AB0\u0338':'nsce','\u2AB3':'prE','\u2AB4':'scE','\u2AB5':'prnE','\u2AB6':'scnE','\u2AB7':'prap','\u2AB8':'scap','\u2AB9':'prnap','\u2ABA':'scnap','\u2ABB':'Pr','\u2ABC':'Sc','\u2ABD':'subdot','\u2ABE':'supdot','\u2ABF':'subplus','\u2AC0':'supplus','\u2AC1':'submult','\u2AC2':'supmult','\u2AC3':'subedot','\u2AC4':'supedot','\u2AC5':'subE','\u2AC5\u0338':'nsubE','\u2AC6':'supE','\u2AC6\u0338':'nsupE','\u2AC7':'subsim','\u2AC8':'supsim','\u2ACB\uFE00':'vsubnE','\u2ACB':'subnE','\u2ACC\uFE00':'vsupnE','\u2ACC':'supnE','\u2ACF':'csub','\u2AD0':'csup','\u2AD1':'csube','\u2AD2':'csupe','\u2AD3':'subsup','\u2AD4':'supsub','\u2AD5':'subsub','\u2AD6':'supsup','\u2AD7':'suphsub','\u2AD8':'supdsub','\u2AD9':'forkv','\u2ADA':'topfork','\u2ADB':'mlcp','\u2AE4':'Dashv','\u2AE6':'Vdashl','\u2AE7':'Barv','\u2AE8':'vBar','\u2AE9':'vBarv','\u2AEB':'Vbar','\u2AEC':'Not','\u2AED':'bNot','\u2AEE':'rnmid','\u2AEF':'cirmid','\u2AF0':'midcir','\u2AF1':'topcir','\u2AF2':'nhpar','\u2AF3':'parsim','\u2AFD':'parsl','\u2AFD\u20E5':'nparsl','\u266D':'flat','\u266E':'natur','\u266F':'sharp','\xA4':'curren','\xA2':'cent','$':'dollar','\xA3':'pound','\xA5':'yen','\u20AC':'euro','\xB9':'sup1','\xBD':'half','\u2153':'frac13','\xBC':'frac14','\u2155':'frac15','\u2159':'frac16','\u215B':'frac18','\xB2':'sup2','\u2154':'frac23','\u2156':'frac25','\xB3':'sup3','\xBE':'frac34','\u2157':'frac35','\u215C':'frac38','\u2158':'frac45','\u215A':'frac56','\u215D':'frac58','\u215E':'frac78','\uD835\uDCB6':'ascr','\uD835\uDD52':'aopf','\uD835\uDD1E':'afr','\uD835\uDD38':'Aopf','\uD835\uDD04':'Afr','\uD835\uDC9C':'Ascr','\xAA':'ordf','\xE1':'aacute','\xC1':'Aacute','\xE0':'agrave','\xC0':'Agrave','\u0103':'abreve','\u0102':'Abreve','\xE2':'acirc','\xC2':'Acirc','\xE5':'aring','\xC5':'angst','\xE4':'auml','\xC4':'Auml','\xE3':'atilde','\xC3':'Atilde','\u0105':'aogon','\u0104':'Aogon','\u0101':'amacr','\u0100':'Amacr','\xE6':'aelig','\xC6':'AElig','\uD835\uDCB7':'bscr','\uD835\uDD53':'bopf','\uD835\uDD1F':'bfr','\uD835\uDD39':'Bopf','\u212C':'Bscr','\uD835\uDD05':'Bfr','\uD835\uDD20':'cfr','\uD835\uDCB8':'cscr','\uD835\uDD54':'copf','\u212D':'Cfr','\uD835\uDC9E':'Cscr','\u2102':'Copf','\u0107':'cacute','\u0106':'Cacute','\u0109':'ccirc','\u0108':'Ccirc','\u010D':'ccaron','\u010C':'Ccaron','\u010B':'cdot','\u010A':'Cdot','\xE7':'ccedil','\xC7':'Ccedil','\u2105':'incare','\uD835\uDD21':'dfr','\u2146':'dd','\uD835\uDD55':'dopf','\uD835\uDCB9':'dscr','\uD835\uDC9F':'Dscr','\uD835\uDD07':'Dfr','\u2145':'DD','\uD835\uDD3B':'Dopf','\u010F':'dcaron','\u010E':'Dcaron','\u0111':'dstrok','\u0110':'Dstrok','\xF0':'eth','\xD0':'ETH','\u2147':'ee','\u212F':'escr','\uD835\uDD22':'efr','\uD835\uDD56':'eopf','\u2130':'Escr','\uD835\uDD08':'Efr','\uD835\uDD3C':'Eopf','\xE9':'eacute','\xC9':'Eacute','\xE8':'egrave','\xC8':'Egrave','\xEA':'ecirc','\xCA':'Ecirc','\u011B':'ecaron','\u011A':'Ecaron','\xEB':'euml','\xCB':'Euml','\u0117':'edot','\u0116':'Edot','\u0119':'eogon','\u0118':'Eogon','\u0113':'emacr','\u0112':'Emacr','\uD835\uDD23':'ffr','\uD835\uDD57':'fopf','\uD835\uDCBB':'fscr','\uD835\uDD09':'Ffr','\uD835\uDD3D':'Fopf','\u2131':'Fscr','\uFB00':'fflig','\uFB03':'ffilig','\uFB04':'ffllig','\uFB01':'filig','fj':'fjlig','\uFB02':'fllig','\u0192':'fnof','\u210A':'gscr','\uD835\uDD58':'gopf','\uD835\uDD24':'gfr','\uD835\uDCA2':'Gscr','\uD835\uDD3E':'Gopf','\uD835\uDD0A':'Gfr','\u01F5':'gacute','\u011F':'gbreve','\u011E':'Gbreve','\u011D':'gcirc','\u011C':'Gcirc','\u0121':'gdot','\u0120':'Gdot','\u0122':'Gcedil','\uD835\uDD25':'hfr','\u210E':'planckh','\uD835\uDCBD':'hscr','\uD835\uDD59':'hopf','\u210B':'Hscr','\u210C':'Hfr','\u210D':'Hopf','\u0125':'hcirc','\u0124':'Hcirc','\u210F':'hbar','\u0127':'hstrok','\u0126':'Hstrok','\uD835\uDD5A':'iopf','\uD835\uDD26':'ifr','\uD835\uDCBE':'iscr','\u2148':'ii','\uD835\uDD40':'Iopf','\u2110':'Iscr','\u2111':'Im','\xED':'iacute','\xCD':'Iacute','\xEC':'igrave','\xCC':'Igrave','\xEE':'icirc','\xCE':'Icirc','\xEF':'iuml','\xCF':'Iuml','\u0129':'itilde','\u0128':'Itilde','\u0130':'Idot','\u012F':'iogon','\u012E':'Iogon','\u012B':'imacr','\u012A':'Imacr','\u0133':'ijlig','\u0132':'IJlig','\u0131':'imath','\uD835\uDCBF':'jscr','\uD835\uDD5B':'jopf','\uD835\uDD27':'jfr','\uD835\uDCA5':'Jscr','\uD835\uDD0D':'Jfr','\uD835\uDD41':'Jopf','\u0135':'jcirc','\u0134':'Jcirc','\u0237':'jmath','\uD835\uDD5C':'kopf','\uD835\uDCC0':'kscr','\uD835\uDD28':'kfr','\uD835\uDCA6':'Kscr','\uD835\uDD42':'Kopf','\uD835\uDD0E':'Kfr','\u0137':'kcedil','\u0136':'Kcedil','\uD835\uDD29':'lfr','\uD835\uDCC1':'lscr','\u2113':'ell','\uD835\uDD5D':'lopf','\u2112':'Lscr','\uD835\uDD0F':'Lfr','\uD835\uDD43':'Lopf','\u013A':'lacute','\u0139':'Lacute','\u013E':'lcaron','\u013D':'Lcaron','\u013C':'lcedil','\u013B':'Lcedil','\u0142':'lstrok','\u0141':'Lstrok','\u0140':'lmidot','\u013F':'Lmidot','\uD835\uDD2A':'mfr','\uD835\uDD5E':'mopf','\uD835\uDCC2':'mscr','\uD835\uDD10':'Mfr','\uD835\uDD44':'Mopf','\u2133':'Mscr','\uD835\uDD2B':'nfr','\uD835\uDD5F':'nopf','\uD835\uDCC3':'nscr','\u2115':'Nopf','\uD835\uDCA9':'Nscr','\uD835\uDD11':'Nfr','\u0144':'nacute','\u0143':'Nacute','\u0148':'ncaron','\u0147':'Ncaron','\xF1':'ntilde','\xD1':'Ntilde','\u0146':'ncedil','\u0145':'Ncedil','\u2116':'numero','\u014B':'eng','\u014A':'ENG','\uD835\uDD60':'oopf','\uD835\uDD2C':'ofr','\u2134':'oscr','\uD835\uDCAA':'Oscr','\uD835\uDD12':'Ofr','\uD835\uDD46':'Oopf','\xBA':'ordm','\xF3':'oacute','\xD3':'Oacute','\xF2':'ograve','\xD2':'Ograve','\xF4':'ocirc','\xD4':'Ocirc','\xF6':'ouml','\xD6':'Ouml','\u0151':'odblac','\u0150':'Odblac','\xF5':'otilde','\xD5':'Otilde','\xF8':'oslash','\xD8':'Oslash','\u014D':'omacr','\u014C':'Omacr','\u0153':'oelig','\u0152':'OElig','\uD835\uDD2D':'pfr','\uD835\uDCC5':'pscr','\uD835\uDD61':'popf','\u2119':'Popf','\uD835\uDD13':'Pfr','\uD835\uDCAB':'Pscr','\uD835\uDD62':'qopf','\uD835\uDD2E':'qfr','\uD835\uDCC6':'qscr','\uD835\uDCAC':'Qscr','\uD835\uDD14':'Qfr','\u211A':'Qopf','\u0138':'kgreen','\uD835\uDD2F':'rfr','\uD835\uDD63':'ropf','\uD835\uDCC7':'rscr','\u211B':'Rscr','\u211C':'Re','\u211D':'Ropf','\u0155':'racute','\u0154':'Racute','\u0159':'rcaron','\u0158':'Rcaron','\u0157':'rcedil','\u0156':'Rcedil','\uD835\uDD64':'sopf','\uD835\uDCC8':'sscr','\uD835\uDD30':'sfr','\uD835\uDD4A':'Sopf','\uD835\uDD16':'Sfr','\uD835\uDCAE':'Sscr','\u24C8':'oS','\u015B':'sacute','\u015A':'Sacute','\u015D':'scirc','\u015C':'Scirc','\u0161':'scaron','\u0160':'Scaron','\u015F':'scedil','\u015E':'Scedil','\xDF':'szlig','\uD835\uDD31':'tfr','\uD835\uDCC9':'tscr','\uD835\uDD65':'topf','\uD835\uDCAF':'Tscr','\uD835\uDD17':'Tfr','\uD835\uDD4B':'Topf','\u0165':'tcaron','\u0164':'Tcaron','\u0163':'tcedil','\u0162':'Tcedil','\u2122':'trade','\u0167':'tstrok','\u0166':'Tstrok','\uD835\uDCCA':'uscr','\uD835\uDD66':'uopf','\uD835\uDD32':'ufr','\uD835\uDD4C':'Uopf','\uD835\uDD18':'Ufr','\uD835\uDCB0':'Uscr','\xFA':'uacute','\xDA':'Uacute','\xF9':'ugrave','\xD9':'Ugrave','\u016D':'ubreve','\u016C':'Ubreve','\xFB':'ucirc','\xDB':'Ucirc','\u016F':'uring','\u016E':'Uring','\xFC':'uuml','\xDC':'Uuml','\u0171':'udblac','\u0170':'Udblac','\u0169':'utilde','\u0168':'Utilde','\u0173':'uogon','\u0172':'Uogon','\u016B':'umacr','\u016A':'Umacr','\uD835\uDD33':'vfr','\uD835\uDD67':'vopf','\uD835\uDCCB':'vscr','\uD835\uDD19':'Vfr','\uD835\uDD4D':'Vopf','\uD835\uDCB1':'Vscr','\uD835\uDD68':'wopf','\uD835\uDCCC':'wscr','\uD835\uDD34':'wfr','\uD835\uDCB2':'Wscr','\uD835\uDD4E':'Wopf','\uD835\uDD1A':'Wfr','\u0175':'wcirc','\u0174':'Wcirc','\uD835\uDD35':'xfr','\uD835\uDCCD':'xscr','\uD835\uDD69':'xopf','\uD835\uDD4F':'Xopf','\uD835\uDD1B':'Xfr','\uD835\uDCB3':'Xscr','\uD835\uDD36':'yfr','\uD835\uDCCE':'yscr','\uD835\uDD6A':'yopf','\uD835\uDCB4':'Yscr','\uD835\uDD1C':'Yfr','\uD835\uDD50':'Yopf','\xFD':'yacute','\xDD':'Yacute','\u0177':'ycirc','\u0176':'Ycirc','\xFF':'yuml','\u0178':'Yuml','\uD835\uDCCF':'zscr','\uD835\uDD37':'zfr','\uD835\uDD6B':'zopf','\u2128':'Zfr','\u2124':'Zopf','\uD835\uDCB5':'Zscr','\u017A':'zacute','\u0179':'Zacute','\u017E':'zcaron','\u017D':'Zcaron','\u017C':'zdot','\u017B':'Zdot','\u01B5':'imped','\xFE':'thorn','\xDE':'THORN','\u0149':'napos','\u03B1':'alpha','\u0391':'Alpha','\u03B2':'beta','\u0392':'Beta','\u03B3':'gamma','\u0393':'Gamma','\u03B4':'delta','\u0394':'Delta','\u03B5':'epsi','\u03F5':'epsiv','\u0395':'Epsilon','\u03DD':'gammad','\u03DC':'Gammad','\u03B6':'zeta','\u0396':'Zeta','\u03B7':'eta','\u0397':'Eta','\u03B8':'theta','\u03D1':'thetav','\u0398':'Theta','\u03B9':'iota','\u0399':'Iota','\u03BA':'kappa','\u03F0':'kappav','\u039A':'Kappa','\u03BB':'lambda','\u039B':'Lambda','\u03BC':'mu','\xB5':'micro','\u039C':'Mu','\u03BD':'nu','\u039D':'Nu','\u03BE':'xi','\u039E':'Xi','\u03BF':'omicron','\u039F':'Omicron','\u03C0':'pi','\u03D6':'piv','\u03A0':'Pi','\u03C1':'rho','\u03F1':'rhov','\u03A1':'Rho','\u03C3':'sigma','\u03A3':'Sigma','\u03C2':'sigmaf','\u03C4':'tau','\u03A4':'Tau','\u03C5':'upsi','\u03A5':'Upsilon','\u03D2':'Upsi','\u03C6':'phi','\u03D5':'phiv','\u03A6':'Phi','\u03C7':'chi','\u03A7':'Chi','\u03C8':'psi','\u03A8':'Psi','\u03C9':'omega','\u03A9':'ohm','\u0430':'acy','\u0410':'Acy','\u0431':'bcy','\u0411':'Bcy','\u0432':'vcy','\u0412':'Vcy','\u0433':'gcy','\u0413':'Gcy','\u0453':'gjcy','\u0403':'GJcy','\u0434':'dcy','\u0414':'Dcy','\u0452':'djcy','\u0402':'DJcy','\u0435':'iecy','\u0415':'IEcy','\u0451':'iocy','\u0401':'IOcy','\u0454':'jukcy','\u0404':'Jukcy','\u0436':'zhcy','\u0416':'ZHcy','\u0437':'zcy','\u0417':'Zcy','\u0455':'dscy','\u0405':'DScy','\u0438':'icy','\u0418':'Icy','\u0456':'iukcy','\u0406':'Iukcy','\u0457':'yicy','\u0407':'YIcy','\u0439':'jcy','\u0419':'Jcy','\u0458':'jsercy','\u0408':'Jsercy','\u043A':'kcy','\u041A':'Kcy','\u045C':'kjcy','\u040C':'KJcy','\u043B':'lcy','\u041B':'Lcy','\u0459':'ljcy','\u0409':'LJcy','\u043C':'mcy','\u041C':'Mcy','\u043D':'ncy','\u041D':'Ncy','\u045A':'njcy','\u040A':'NJcy','\u043E':'ocy','\u041E':'Ocy','\u043F':'pcy','\u041F':'Pcy','\u0440':'rcy','\u0420':'Rcy','\u0441':'scy','\u0421':'Scy','\u0442':'tcy','\u0422':'Tcy','\u045B':'tshcy','\u040B':'TSHcy','\u0443':'ucy','\u0423':'Ucy','\u045E':'ubrcy','\u040E':'Ubrcy','\u0444':'fcy','\u0424':'Fcy','\u0445':'khcy','\u0425':'KHcy','\u0446':'tscy','\u0426':'TScy','\u0447':'chcy','\u0427':'CHcy','\u045F':'dzcy','\u040F':'DZcy','\u0448':'shcy','\u0428':'SHcy','\u0449':'shchcy','\u0429':'SHCHcy','\u044A':'hardcy','\u042A':'HARDcy','\u044B':'ycy','\u042B':'Ycy','\u044C':'softcy','\u042C':'SOFTcy','\u044D':'ecy','\u042D':'Ecy','\u044E':'yucy','\u042E':'YUcy','\u044F':'yacy','\u042F':'YAcy','\u2135':'aleph','\u2136':'beth','\u2137':'gimel','\u2138':'daleth'}; - - var regexEscape = /["&'<>`]/g; - var escapeMap = { - '"': '"', - '&': '&', - '\'': ''', - '<': '<', - // See https://mathiasbynens.be/notes/ambiguous-ampersands: in HTML, the - // following is not strictly necessary unless it’s part of a tag or an - // unquoted attribute value. We’re only escaping it to support those - // situations, and for XML support. - '>': '>', - // In Internet Explorer ≤ 8, the backtick character can be used - // to break out of (un)quoted attribute values or HTML comments. - // See http://html5sec.org/#102, http://html5sec.org/#108, and - // http://html5sec.org/#133. - '`': '`' - }; - - var regexInvalidEntity = /&#(?:[xX][^a-fA-F0-9]|[^0-9xX])/; - var regexInvalidRawCodePoint = /[\0-\x08\x0B\x0E-\x1F\x7F-\x9F\uFDD0-\uFDEF\uFFFE\uFFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F\uDBBF\uDBFF][\uDFFE\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; - var regexDecode = /&(CounterClockwiseContourIntegral|DoubleLongLeftRightArrow|ClockwiseContourIntegral|NotNestedGreaterGreater|NotSquareSupersetEqual|DiacriticalDoubleAcute|NotRightTriangleEqual|NotSucceedsSlantEqual|NotPrecedesSlantEqual|CloseCurlyDoubleQuote|NegativeVeryThinSpace|DoubleContourIntegral|FilledVerySmallSquare|CapitalDifferentialD|OpenCurlyDoubleQuote|EmptyVerySmallSquare|NestedGreaterGreater|DoubleLongRightArrow|NotLeftTriangleEqual|NotGreaterSlantEqual|ReverseUpEquilibrium|DoubleLeftRightArrow|NotSquareSubsetEqual|NotDoubleVerticalBar|RightArrowLeftArrow|NotGreaterFullEqual|NotRightTriangleBar|SquareSupersetEqual|DownLeftRightVector|DoubleLongLeftArrow|leftrightsquigarrow|LeftArrowRightArrow|NegativeMediumSpace|blacktriangleright|RightDownVectorBar|PrecedesSlantEqual|RightDoubleBracket|SucceedsSlantEqual|NotLeftTriangleBar|RightTriangleEqual|SquareIntersection|RightDownTeeVector|ReverseEquilibrium|NegativeThickSpace|longleftrightarrow|Longleftrightarrow|LongLeftRightArrow|DownRightTeeVector|DownRightVectorBar|GreaterSlantEqual|SquareSubsetEqual|LeftDownVectorBar|LeftDoubleBracket|VerticalSeparator|rightleftharpoons|NotGreaterGreater|NotSquareSuperset|blacktriangleleft|blacktriangledown|NegativeThinSpace|LeftDownTeeVector|NotLessSlantEqual|leftrightharpoons|DoubleUpDownArrow|DoubleVerticalBar|LeftTriangleEqual|FilledSmallSquare|twoheadrightarrow|NotNestedLessLess|DownLeftTeeVector|DownLeftVectorBar|RightAngleBracket|NotTildeFullEqual|NotReverseElement|RightUpDownVector|DiacriticalTilde|NotSucceedsTilde|circlearrowright|NotPrecedesEqual|rightharpoondown|DoubleRightArrow|NotSucceedsEqual|NonBreakingSpace|NotRightTriangle|LessEqualGreater|RightUpTeeVector|LeftAngleBracket|GreaterFullEqual|DownArrowUpArrow|RightUpVectorBar|twoheadleftarrow|GreaterEqualLess|downharpoonright|RightTriangleBar|ntrianglerighteq|NotSupersetEqual|LeftUpDownVector|DiacriticalAcute|rightrightarrows|vartriangleright|UpArrowDownArrow|DiacriticalGrave|UnderParenthesis|EmptySmallSquare|LeftUpVectorBar|leftrightarrows|DownRightVector|downharpoonleft|trianglerighteq|ShortRightArrow|OverParenthesis|DoubleLeftArrow|DoubleDownArrow|NotSquareSubset|bigtriangledown|ntrianglelefteq|UpperRightArrow|curvearrowright|vartriangleleft|NotLeftTriangle|nleftrightarrow|LowerRightArrow|NotHumpDownHump|NotGreaterTilde|rightthreetimes|LeftUpTeeVector|NotGreaterEqual|straightepsilon|LeftTriangleBar|rightsquigarrow|ContourIntegral|rightleftarrows|CloseCurlyQuote|RightDownVector|LeftRightVector|nLeftrightarrow|leftharpoondown|circlearrowleft|SquareSuperset|OpenCurlyQuote|hookrightarrow|HorizontalLine|DiacriticalDot|NotLessGreater|ntriangleright|DoubleRightTee|InvisibleComma|InvisibleTimes|LowerLeftArrow|DownLeftVector|NotSubsetEqual|curvearrowleft|trianglelefteq|NotVerticalBar|TildeFullEqual|downdownarrows|NotGreaterLess|RightTeeVector|ZeroWidthSpace|looparrowright|LongRightArrow|doublebarwedge|ShortLeftArrow|ShortDownArrow|RightVectorBar|GreaterGreater|ReverseElement|rightharpoonup|LessSlantEqual|leftthreetimes|upharpoonright|rightarrowtail|LeftDownVector|Longrightarrow|NestedLessLess|UpperLeftArrow|nshortparallel|leftleftarrows|leftrightarrow|Leftrightarrow|LeftRightArrow|longrightarrow|upharpoonleft|RightArrowBar|ApplyFunction|LeftTeeVector|leftarrowtail|NotEqualTilde|varsubsetneqq|varsupsetneqq|RightTeeArrow|SucceedsEqual|SucceedsTilde|LeftVectorBar|SupersetEqual|hookleftarrow|DifferentialD|VerticalTilde|VeryThinSpace|blacktriangle|bigtriangleup|LessFullEqual|divideontimes|leftharpoonup|UpEquilibrium|ntriangleleft|RightTriangle|measuredangle|shortparallel|longleftarrow|Longleftarrow|LongLeftArrow|DoubleLeftTee|Poincareplane|PrecedesEqual|triangleright|DoubleUpArrow|RightUpVector|fallingdotseq|looparrowleft|PrecedesTilde|NotTildeEqual|NotTildeTilde|smallsetminus|Proportional|triangleleft|triangledown|UnderBracket|NotHumpEqual|exponentiale|ExponentialE|NotLessTilde|HilbertSpace|RightCeiling|blacklozenge|varsupsetneq|HumpDownHump|GreaterEqual|VerticalLine|LeftTeeArrow|NotLessEqual|DownTeeArrow|LeftTriangle|varsubsetneq|Intersection|NotCongruent|DownArrowBar|LeftUpVector|LeftArrowBar|risingdotseq|GreaterTilde|RoundImplies|SquareSubset|ShortUpArrow|NotSuperset|quaternions|precnapprox|backepsilon|preccurlyeq|OverBracket|blacksquare|MediumSpace|VerticalBar|circledcirc|circleddash|CircleMinus|CircleTimes|LessGreater|curlyeqprec|curlyeqsucc|diamondsuit|UpDownArrow|Updownarrow|RuleDelayed|Rrightarrow|updownarrow|RightVector|nRightarrow|nrightarrow|eqslantless|LeftCeiling|Equilibrium|SmallCircle|expectation|NotSucceeds|thickapprox|GreaterLess|SquareUnion|NotPrecedes|NotLessLess|straightphi|succnapprox|succcurlyeq|SubsetEqual|sqsupseteq|Proportion|Laplacetrf|ImaginaryI|supsetneqq|NotGreater|gtreqqless|NotElement|ThickSpace|TildeEqual|TildeTilde|Fouriertrf|rmoustache|EqualTilde|eqslantgtr|UnderBrace|LeftVector|UpArrowBar|nLeftarrow|nsubseteqq|subsetneqq|nsupseteqq|nleftarrow|succapprox|lessapprox|UpTeeArrow|upuparrows|curlywedge|lesseqqgtr|varepsilon|varnothing|RightFloor|complement|CirclePlus|sqsubseteq|Lleftarrow|circledast|RightArrow|Rightarrow|rightarrow|lmoustache|Bernoullis|precapprox|mapstoleft|mapstodown|longmapsto|dotsquare|downarrow|DoubleDot|nsubseteq|supsetneq|leftarrow|nsupseteq|subsetneq|ThinSpace|ngeqslant|subseteqq|HumpEqual|NotSubset|triangleq|NotCupCap|lesseqgtr|heartsuit|TripleDot|Leftarrow|Coproduct|Congruent|varpropto|complexes|gvertneqq|LeftArrow|LessTilde|supseteqq|MinusPlus|CircleDot|nleqslant|NotExists|gtreqless|nparallel|UnionPlus|LeftFloor|checkmark|CenterDot|centerdot|Mellintrf|gtrapprox|bigotimes|OverBrace|spadesuit|therefore|pitchfork|rationals|PlusMinus|Backslash|Therefore|DownBreve|backsimeq|backprime|DownArrow|nshortmid|Downarrow|lvertneqq|eqvparsl|imagline|imagpart|infintie|integers|Integral|intercal|LessLess|Uarrocir|intlarhk|sqsupset|angmsdaf|sqsubset|llcorner|vartheta|cupbrcap|lnapprox|Superset|SuchThat|succnsim|succneqq|angmsdag|biguplus|curlyvee|trpezium|Succeeds|NotTilde|bigwedge|angmsdah|angrtvbd|triminus|cwconint|fpartint|lrcorner|smeparsl|subseteq|urcorner|lurdshar|laemptyv|DDotrahd|approxeq|ldrushar|awconint|mapstoup|backcong|shortmid|triangle|geqslant|gesdotol|timesbar|circledR|circledS|setminus|multimap|naturals|scpolint|ncongdot|RightTee|boxminus|gnapprox|boxtimes|andslope|thicksim|angmsdaa|varsigma|cirfnint|rtriltri|angmsdab|rppolint|angmsdac|barwedge|drbkarow|clubsuit|thetasym|bsolhsub|capbrcup|dzigrarr|doteqdot|DotEqual|dotminus|UnderBar|NotEqual|realpart|otimesas|ulcorner|hksearow|hkswarow|parallel|PartialD|elinters|emptyset|plusacir|bbrktbrk|angmsdad|pointint|bigoplus|angmsdae|Precedes|bigsqcup|varkappa|notindot|supseteq|precneqq|precnsim|profalar|profline|profsurf|leqslant|lesdotor|raemptyv|subplus|notnivb|notnivc|subrarr|zigrarr|vzigzag|submult|subedot|Element|between|cirscir|larrbfs|larrsim|lotimes|lbrksld|lbrkslu|lozenge|ldrdhar|dbkarow|bigcirc|epsilon|simrarr|simplus|ltquest|Epsilon|luruhar|gtquest|maltese|npolint|eqcolon|npreceq|bigodot|ddagger|gtrless|bnequiv|harrcir|ddotseq|equivDD|backsim|demptyv|nsqsube|nsqsupe|Upsilon|nsubset|upsilon|minusdu|nsucceq|swarrow|nsupset|coloneq|searrow|boxplus|napprox|natural|asympeq|alefsym|congdot|nearrow|bigstar|diamond|supplus|tritime|LeftTee|nvinfin|triplus|NewLine|nvltrie|nvrtrie|nwarrow|nexists|Diamond|ruluhar|Implies|supmult|angzarr|suplarr|suphsub|questeq|because|digamma|Because|olcross|bemptyv|omicron|Omicron|rotimes|NoBreak|intprod|angrtvb|orderof|uwangle|suphsol|lesdoto|orslope|DownTee|realine|cudarrl|rdldhar|OverBar|supedot|lessdot|supdsub|topfork|succsim|rbrkslu|rbrksld|pertenk|cudarrr|isindot|planckh|lessgtr|pluscir|gesdoto|plussim|plustwo|lesssim|cularrp|rarrsim|Cayleys|notinva|notinvb|notinvc|UpArrow|Uparrow|uparrow|NotLess|dwangle|precsim|Product|curarrm|Cconint|dotplus|rarrbfs|ccupssm|Cedilla|cemptyv|notniva|quatint|frac35|frac38|frac45|frac56|frac58|frac78|tridot|xoplus|gacute|gammad|Gammad|lfisht|lfloor|bigcup|sqsupe|gbreve|Gbreve|lharul|sqsube|sqcups|Gcedil|apacir|llhard|lmidot|Lmidot|lmoust|andand|sqcaps|approx|Abreve|spades|circeq|tprime|divide|topcir|Assign|topbot|gesdot|divonx|xuplus|timesd|gesles|atilde|solbar|SOFTcy|loplus|timesb|lowast|lowbar|dlcorn|dlcrop|softcy|dollar|lparlt|thksim|lrhard|Atilde|lsaquo|smashp|bigvee|thinsp|wreath|bkarow|lsquor|lstrok|Lstrok|lthree|ltimes|ltlarr|DotDot|simdot|ltrPar|weierp|xsqcup|angmsd|sigmav|sigmaf|zeetrf|Zcaron|zcaron|mapsto|vsupne|thetav|cirmid|marker|mcomma|Zacute|vsubnE|there4|gtlPar|vsubne|bottom|gtrarr|SHCHcy|shchcy|midast|midcir|middot|minusb|minusd|gtrdot|bowtie|sfrown|mnplus|models|colone|seswar|Colone|mstpos|searhk|gtrsim|nacute|Nacute|boxbox|telrec|hairsp|Tcedil|nbumpe|scnsim|ncaron|Ncaron|ncedil|Ncedil|hamilt|Scedil|nearhk|hardcy|HARDcy|tcedil|Tcaron|commat|nequiv|nesear|tcaron|target|hearts|nexist|varrho|scedil|Scaron|scaron|hellip|Sacute|sacute|hercon|swnwar|compfn|rtimes|rthree|rsquor|rsaquo|zacute|wedgeq|homtht|barvee|barwed|Barwed|rpargt|horbar|conint|swarhk|roplus|nltrie|hslash|hstrok|Hstrok|rmoust|Conint|bprime|hybull|hyphen|iacute|Iacute|supsup|supsub|supsim|varphi|coprod|brvbar|agrave|Supset|supset|igrave|Igrave|notinE|Agrave|iiiint|iinfin|copysr|wedbar|Verbar|vangrt|becaus|incare|verbar|inodot|bullet|drcorn|intcal|drcrop|cularr|vellip|Utilde|bumpeq|cupcap|dstrok|Dstrok|CupCap|cupcup|cupdot|eacute|Eacute|supdot|iquest|easter|ecaron|Ecaron|ecolon|isinsv|utilde|itilde|Itilde|curarr|succeq|Bumpeq|cacute|ulcrop|nparsl|Cacute|nprcue|egrave|Egrave|nrarrc|nrarrw|subsup|subsub|nrtrie|jsercy|nsccue|Jsercy|kappav|kcedil|Kcedil|subsim|ulcorn|nsimeq|egsdot|veebar|kgreen|capand|elsdot|Subset|subset|curren|aacute|lacute|Lacute|emptyv|ntilde|Ntilde|lagran|lambda|Lambda|capcap|Ugrave|langle|subdot|emsp13|numero|emsp14|nvdash|nvDash|nVdash|nVDash|ugrave|ufisht|nvHarr|larrfs|nvlArr|larrhk|larrlp|larrpl|nvrArr|Udblac|nwarhk|larrtl|nwnear|oacute|Oacute|latail|lAtail|sstarf|lbrace|odblac|Odblac|lbrack|udblac|odsold|eparsl|lcaron|Lcaron|ograve|Ograve|lcedil|Lcedil|Aacute|ssmile|ssetmn|squarf|ldquor|capcup|ominus|cylcty|rharul|eqcirc|dagger|rfloor|rfisht|Dagger|daleth|equals|origof|capdot|equest|dcaron|Dcaron|rdquor|oslash|Oslash|otilde|Otilde|otimes|Otimes|urcrop|Ubreve|ubreve|Yacute|Uacute|uacute|Rcedil|rcedil|urcorn|parsim|Rcaron|Vdashl|rcaron|Tstrok|percnt|period|permil|Exists|yacute|rbrack|rbrace|phmmat|ccaron|Ccaron|planck|ccedil|plankv|tstrok|female|plusdo|plusdu|ffilig|plusmn|ffllig|Ccedil|rAtail|dfisht|bernou|ratail|Rarrtl|rarrtl|angsph|rarrpl|rarrlp|rarrhk|xwedge|xotime|forall|ForAll|Vvdash|vsupnE|preceq|bigcap|frac12|frac13|frac14|primes|rarrfs|prnsim|frac15|Square|frac16|square|lesdot|frac18|frac23|propto|prurel|rarrap|rangle|puncsp|frac25|Racute|qprime|racute|lesges|frac34|abreve|AElig|eqsim|utdot|setmn|urtri|Equal|Uring|seArr|uring|searr|dashv|Dashv|mumap|nabla|iogon|Iogon|sdote|sdotb|scsim|napid|napos|equiv|natur|Acirc|dblac|erarr|nbump|iprod|erDot|ucirc|awint|esdot|angrt|ncong|isinE|scnap|Scirc|scirc|ndash|isins|Ubrcy|nearr|neArr|isinv|nedot|ubrcy|acute|Ycirc|iukcy|Iukcy|xutri|nesim|caret|jcirc|Jcirc|caron|twixt|ddarr|sccue|exist|jmath|sbquo|ngeqq|angst|ccaps|lceil|ngsim|UpTee|delta|Delta|rtrif|nharr|nhArr|nhpar|rtrie|jukcy|Jukcy|kappa|rsquo|Kappa|nlarr|nlArr|TSHcy|rrarr|aogon|Aogon|fflig|xrarr|tshcy|ccirc|nleqq|filig|upsih|nless|dharl|nlsim|fjlig|ropar|nltri|dharr|robrk|roarr|fllig|fltns|roang|rnmid|subnE|subne|lAarr|trisb|Ccirc|acirc|ccups|blank|VDash|forkv|Vdash|langd|cedil|blk12|blk14|laquo|strns|diams|notin|vDash|larrb|blk34|block|disin|uplus|vdash|vBarv|aelig|starf|Wedge|check|xrArr|lates|lbarr|lBarr|notni|lbbrk|bcong|frasl|lbrke|frown|vrtri|vprop|vnsup|gamma|Gamma|wedge|xodot|bdquo|srarr|doteq|ldquo|boxdl|boxdL|gcirc|Gcirc|boxDl|boxDL|boxdr|boxdR|boxDr|TRADE|trade|rlhar|boxDR|vnsub|npart|vltri|rlarr|boxhd|boxhD|nprec|gescc|nrarr|nrArr|boxHd|boxHD|boxhu|boxhU|nrtri|boxHu|clubs|boxHU|times|colon|Colon|gimel|xlArr|Tilde|nsime|tilde|nsmid|nspar|THORN|thorn|xlarr|nsube|nsubE|thkap|xhArr|comma|nsucc|boxul|boxuL|nsupe|nsupE|gneqq|gnsim|boxUl|boxUL|grave|boxur|boxuR|boxUr|boxUR|lescc|angle|bepsi|boxvh|varpi|boxvH|numsp|Theta|gsime|gsiml|theta|boxVh|boxVH|boxvl|gtcir|gtdot|boxvL|boxVl|boxVL|crarr|cross|Cross|nvsim|boxvr|nwarr|nwArr|sqsup|dtdot|Uogon|lhard|lharu|dtrif|ocirc|Ocirc|lhblk|duarr|odash|sqsub|Hacek|sqcup|llarr|duhar|oelig|OElig|ofcir|boxvR|uogon|lltri|boxVr|csube|uuarr|ohbar|csupe|ctdot|olarr|olcir|harrw|oline|sqcap|omacr|Omacr|omega|Omega|boxVR|aleph|lneqq|lnsim|loang|loarr|rharu|lobrk|hcirc|operp|oplus|rhard|Hcirc|orarr|Union|order|ecirc|Ecirc|cuepr|szlig|cuesc|breve|reals|eDDot|Breve|hoarr|lopar|utrif|rdquo|Umacr|umacr|efDot|swArr|ultri|alpha|rceil|ovbar|swarr|Wcirc|wcirc|smtes|smile|bsemi|lrarr|aring|parsl|lrhar|bsime|uhblk|lrtri|cupor|Aring|uharr|uharl|slarr|rbrke|bsolb|lsime|rbbrk|RBarr|lsimg|phone|rBarr|rbarr|icirc|lsquo|Icirc|emacr|Emacr|ratio|simne|plusb|simlE|simgE|simeq|pluse|ltcir|ltdot|empty|xharr|xdtri|iexcl|Alpha|ltrie|rarrw|pound|ltrif|xcirc|bumpe|prcue|bumpE|asymp|amacr|cuvee|Sigma|sigma|iiint|udhar|iiota|ijlig|IJlig|supnE|imacr|Imacr|prime|Prime|image|prnap|eogon|Eogon|rarrc|mdash|mDDot|cuwed|imath|supne|imped|Amacr|udarr|prsim|micro|rarrb|cwint|raquo|infin|eplus|range|rangd|Ucirc|radic|minus|amalg|veeeq|rAarr|epsiv|ycirc|quest|sharp|quot|zwnj|Qscr|race|qscr|Qopf|qopf|qint|rang|Rang|Zscr|zscr|Zopf|zopf|rarr|rArr|Rarr|Pscr|pscr|prop|prod|prnE|prec|ZHcy|zhcy|prap|Zeta|zeta|Popf|popf|Zdot|plus|zdot|Yuml|yuml|phiv|YUcy|yucy|Yscr|yscr|perp|Yopf|yopf|part|para|YIcy|Ouml|rcub|yicy|YAcy|rdca|ouml|osol|Oscr|rdsh|yacy|real|oscr|xvee|andd|rect|andv|Xscr|oror|ordm|ordf|xscr|ange|aopf|Aopf|rHar|Xopf|opar|Oopf|xopf|xnis|rhov|oopf|omid|xmap|oint|apid|apos|ogon|ascr|Ascr|odot|odiv|xcup|xcap|ocir|oast|nvlt|nvle|nvgt|nvge|nvap|Wscr|wscr|auml|ntlg|ntgl|nsup|nsub|nsim|Nscr|nscr|nsce|Wopf|ring|npre|wopf|npar|Auml|Barv|bbrk|Nopf|nopf|nmid|nLtv|beta|ropf|Ropf|Beta|beth|nles|rpar|nleq|bnot|bNot|nldr|NJcy|rscr|Rscr|Vscr|vscr|rsqb|njcy|bopf|nisd|Bopf|rtri|Vopf|nGtv|ngtr|vopf|boxh|boxH|boxv|nges|ngeq|boxV|bscr|scap|Bscr|bsim|Vert|vert|bsol|bull|bump|caps|cdot|ncup|scnE|ncap|nbsp|napE|Cdot|cent|sdot|Vbar|nang|vBar|chcy|Mscr|mscr|sect|semi|CHcy|Mopf|mopf|sext|circ|cire|mldr|mlcp|cirE|comp|shcy|SHcy|vArr|varr|cong|copf|Copf|copy|COPY|malt|male|macr|lvnE|cscr|ltri|sime|ltcc|simg|Cscr|siml|csub|Uuml|lsqb|lsim|uuml|csup|Lscr|lscr|utri|smid|lpar|cups|smte|lozf|darr|Lopf|Uscr|solb|lopf|sopf|Sopf|lneq|uscr|spar|dArr|lnap|Darr|dash|Sqrt|LJcy|ljcy|lHar|dHar|Upsi|upsi|diam|lesg|djcy|DJcy|leqq|dopf|Dopf|dscr|Dscr|dscy|ldsh|ldca|squf|DScy|sscr|Sscr|dsol|lcub|late|star|Star|Uopf|Larr|lArr|larr|uopf|dtri|dzcy|sube|subE|Lang|lang|Kscr|kscr|Kopf|kopf|KJcy|kjcy|KHcy|khcy|DZcy|ecir|edot|eDot|Jscr|jscr|succ|Jopf|jopf|Edot|uHar|emsp|ensp|Iuml|iuml|eopf|isin|Iscr|iscr|Eopf|epar|sung|epsi|escr|sup1|sup2|sup3|Iota|iota|supe|supE|Iopf|iopf|IOcy|iocy|Escr|esim|Esim|imof|Uarr|QUOT|uArr|uarr|euml|IEcy|iecy|Idot|Euml|euro|excl|Hscr|hscr|Hopf|hopf|TScy|tscy|Tscr|hbar|tscr|flat|tbrk|fnof|hArr|harr|half|fopf|Fopf|tdot|gvnE|fork|trie|gtcc|fscr|Fscr|gdot|gsim|Gscr|gscr|Gopf|gopf|gneq|Gdot|tosa|gnap|Topf|topf|geqq|toea|GJcy|gjcy|tint|gesl|mid|Sfr|ggg|top|ges|gla|glE|glj|geq|gne|gEl|gel|gnE|Gcy|gcy|gap|Tfr|tfr|Tcy|tcy|Hat|Tau|Ffr|tau|Tab|hfr|Hfr|ffr|Fcy|fcy|icy|Icy|iff|ETH|eth|ifr|Ifr|Eta|eta|int|Int|Sup|sup|ucy|Ucy|Sum|sum|jcy|ENG|ufr|Ufr|eng|Jcy|jfr|els|ell|egs|Efr|efr|Jfr|uml|kcy|Kcy|Ecy|ecy|kfr|Kfr|lap|Sub|sub|lat|lcy|Lcy|leg|Dot|dot|lEg|leq|les|squ|div|die|lfr|Lfr|lgE|Dfr|dfr|Del|deg|Dcy|dcy|lne|lnE|sol|loz|smt|Cup|lrm|cup|lsh|Lsh|sim|shy|map|Map|mcy|Mcy|mfr|Mfr|mho|gfr|Gfr|sfr|cir|Chi|chi|nap|Cfr|vcy|Vcy|cfr|Scy|scy|ncy|Ncy|vee|Vee|Cap|cap|nfr|scE|sce|Nfr|nge|ngE|nGg|vfr|Vfr|ngt|bot|nGt|nis|niv|Rsh|rsh|nle|nlE|bne|Bfr|bfr|nLl|nlt|nLt|Bcy|bcy|not|Not|rlm|wfr|Wfr|npr|nsc|num|ocy|ast|Ocy|ofr|xfr|Xfr|Ofr|ogt|ohm|apE|olt|Rho|ape|rho|Rfr|rfr|ord|REG|ang|reg|orv|And|and|AMP|Rcy|amp|Afr|ycy|Ycy|yen|yfr|Yfr|rcy|par|pcy|Pcy|pfr|Pfr|phi|Phi|afr|Acy|acy|zcy|Zcy|piv|acE|acd|zfr|Zfr|pre|prE|psi|Psi|qfr|Qfr|zwj|Or|ge|Gg|gt|gg|el|oS|lt|Lt|LT|Re|lg|gl|eg|ne|Im|it|le|DD|wp|wr|nu|Nu|dd|lE|Sc|sc|pi|Pi|ee|af|ll|Ll|rx|gE|xi|pm|Xi|ic|pr|Pr|in|ni|mp|mu|ac|Mu|or|ap|Gt|GT|ii);|&(Aacute|Agrave|Atilde|Ccedil|Eacute|Egrave|Iacute|Igrave|Ntilde|Oacute|Ograve|Oslash|Otilde|Uacute|Ugrave|Yacute|aacute|agrave|atilde|brvbar|ccedil|curren|divide|eacute|egrave|frac12|frac14|frac34|iacute|igrave|iquest|middot|ntilde|oacute|ograve|oslash|otilde|plusmn|uacute|ugrave|yacute|AElig|Acirc|Aring|Ecirc|Icirc|Ocirc|THORN|Ucirc|acirc|acute|aelig|aring|cedil|ecirc|icirc|iexcl|laquo|micro|ocirc|pound|raquo|szlig|thorn|times|ucirc|Auml|COPY|Euml|Iuml|Ouml|QUOT|Uuml|auml|cent|copy|euml|iuml|macr|nbsp|ordf|ordm|ouml|para|quot|sect|sup1|sup2|sup3|uuml|yuml|AMP|ETH|REG|amp|deg|eth|not|reg|shy|uml|yen|GT|LT|gt|lt)(?!;)([=a-zA-Z0-9]?)|&#([0-9]+)(;?)|&#[xX]([a-fA-F0-9]+)(;?)|&([0-9a-zA-Z]+)/g; - var decodeMap = {'aacute':'\xE1','Aacute':'\xC1','abreve':'\u0103','Abreve':'\u0102','ac':'\u223E','acd':'\u223F','acE':'\u223E\u0333','acirc':'\xE2','Acirc':'\xC2','acute':'\xB4','acy':'\u0430','Acy':'\u0410','aelig':'\xE6','AElig':'\xC6','af':'\u2061','afr':'\uD835\uDD1E','Afr':'\uD835\uDD04','agrave':'\xE0','Agrave':'\xC0','alefsym':'\u2135','aleph':'\u2135','alpha':'\u03B1','Alpha':'\u0391','amacr':'\u0101','Amacr':'\u0100','amalg':'\u2A3F','amp':'&','AMP':'&','and':'\u2227','And':'\u2A53','andand':'\u2A55','andd':'\u2A5C','andslope':'\u2A58','andv':'\u2A5A','ang':'\u2220','ange':'\u29A4','angle':'\u2220','angmsd':'\u2221','angmsdaa':'\u29A8','angmsdab':'\u29A9','angmsdac':'\u29AA','angmsdad':'\u29AB','angmsdae':'\u29AC','angmsdaf':'\u29AD','angmsdag':'\u29AE','angmsdah':'\u29AF','angrt':'\u221F','angrtvb':'\u22BE','angrtvbd':'\u299D','angsph':'\u2222','angst':'\xC5','angzarr':'\u237C','aogon':'\u0105','Aogon':'\u0104','aopf':'\uD835\uDD52','Aopf':'\uD835\uDD38','ap':'\u2248','apacir':'\u2A6F','ape':'\u224A','apE':'\u2A70','apid':'\u224B','apos':'\'','ApplyFunction':'\u2061','approx':'\u2248','approxeq':'\u224A','aring':'\xE5','Aring':'\xC5','ascr':'\uD835\uDCB6','Ascr':'\uD835\uDC9C','Assign':'\u2254','ast':'*','asymp':'\u2248','asympeq':'\u224D','atilde':'\xE3','Atilde':'\xC3','auml':'\xE4','Auml':'\xC4','awconint':'\u2233','awint':'\u2A11','backcong':'\u224C','backepsilon':'\u03F6','backprime':'\u2035','backsim':'\u223D','backsimeq':'\u22CD','Backslash':'\u2216','Barv':'\u2AE7','barvee':'\u22BD','barwed':'\u2305','Barwed':'\u2306','barwedge':'\u2305','bbrk':'\u23B5','bbrktbrk':'\u23B6','bcong':'\u224C','bcy':'\u0431','Bcy':'\u0411','bdquo':'\u201E','becaus':'\u2235','because':'\u2235','Because':'\u2235','bemptyv':'\u29B0','bepsi':'\u03F6','bernou':'\u212C','Bernoullis':'\u212C','beta':'\u03B2','Beta':'\u0392','beth':'\u2136','between':'\u226C','bfr':'\uD835\uDD1F','Bfr':'\uD835\uDD05','bigcap':'\u22C2','bigcirc':'\u25EF','bigcup':'\u22C3','bigodot':'\u2A00','bigoplus':'\u2A01','bigotimes':'\u2A02','bigsqcup':'\u2A06','bigstar':'\u2605','bigtriangledown':'\u25BD','bigtriangleup':'\u25B3','biguplus':'\u2A04','bigvee':'\u22C1','bigwedge':'\u22C0','bkarow':'\u290D','blacklozenge':'\u29EB','blacksquare':'\u25AA','blacktriangle':'\u25B4','blacktriangledown':'\u25BE','blacktriangleleft':'\u25C2','blacktriangleright':'\u25B8','blank':'\u2423','blk12':'\u2592','blk14':'\u2591','blk34':'\u2593','block':'\u2588','bne':'=\u20E5','bnequiv':'\u2261\u20E5','bnot':'\u2310','bNot':'\u2AED','bopf':'\uD835\uDD53','Bopf':'\uD835\uDD39','bot':'\u22A5','bottom':'\u22A5','bowtie':'\u22C8','boxbox':'\u29C9','boxdl':'\u2510','boxdL':'\u2555','boxDl':'\u2556','boxDL':'\u2557','boxdr':'\u250C','boxdR':'\u2552','boxDr':'\u2553','boxDR':'\u2554','boxh':'\u2500','boxH':'\u2550','boxhd':'\u252C','boxhD':'\u2565','boxHd':'\u2564','boxHD':'\u2566','boxhu':'\u2534','boxhU':'\u2568','boxHu':'\u2567','boxHU':'\u2569','boxminus':'\u229F','boxplus':'\u229E','boxtimes':'\u22A0','boxul':'\u2518','boxuL':'\u255B','boxUl':'\u255C','boxUL':'\u255D','boxur':'\u2514','boxuR':'\u2558','boxUr':'\u2559','boxUR':'\u255A','boxv':'\u2502','boxV':'\u2551','boxvh':'\u253C','boxvH':'\u256A','boxVh':'\u256B','boxVH':'\u256C','boxvl':'\u2524','boxvL':'\u2561','boxVl':'\u2562','boxVL':'\u2563','boxvr':'\u251C','boxvR':'\u255E','boxVr':'\u255F','boxVR':'\u2560','bprime':'\u2035','breve':'\u02D8','Breve':'\u02D8','brvbar':'\xA6','bscr':'\uD835\uDCB7','Bscr':'\u212C','bsemi':'\u204F','bsim':'\u223D','bsime':'\u22CD','bsol':'\\','bsolb':'\u29C5','bsolhsub':'\u27C8','bull':'\u2022','bullet':'\u2022','bump':'\u224E','bumpe':'\u224F','bumpE':'\u2AAE','bumpeq':'\u224F','Bumpeq':'\u224E','cacute':'\u0107','Cacute':'\u0106','cap':'\u2229','Cap':'\u22D2','capand':'\u2A44','capbrcup':'\u2A49','capcap':'\u2A4B','capcup':'\u2A47','capdot':'\u2A40','CapitalDifferentialD':'\u2145','caps':'\u2229\uFE00','caret':'\u2041','caron':'\u02C7','Cayleys':'\u212D','ccaps':'\u2A4D','ccaron':'\u010D','Ccaron':'\u010C','ccedil':'\xE7','Ccedil':'\xC7','ccirc':'\u0109','Ccirc':'\u0108','Cconint':'\u2230','ccups':'\u2A4C','ccupssm':'\u2A50','cdot':'\u010B','Cdot':'\u010A','cedil':'\xB8','Cedilla':'\xB8','cemptyv':'\u29B2','cent':'\xA2','centerdot':'\xB7','CenterDot':'\xB7','cfr':'\uD835\uDD20','Cfr':'\u212D','chcy':'\u0447','CHcy':'\u0427','check':'\u2713','checkmark':'\u2713','chi':'\u03C7','Chi':'\u03A7','cir':'\u25CB','circ':'\u02C6','circeq':'\u2257','circlearrowleft':'\u21BA','circlearrowright':'\u21BB','circledast':'\u229B','circledcirc':'\u229A','circleddash':'\u229D','CircleDot':'\u2299','circledR':'\xAE','circledS':'\u24C8','CircleMinus':'\u2296','CirclePlus':'\u2295','CircleTimes':'\u2297','cire':'\u2257','cirE':'\u29C3','cirfnint':'\u2A10','cirmid':'\u2AEF','cirscir':'\u29C2','ClockwiseContourIntegral':'\u2232','CloseCurlyDoubleQuote':'\u201D','CloseCurlyQuote':'\u2019','clubs':'\u2663','clubsuit':'\u2663','colon':':','Colon':'\u2237','colone':'\u2254','Colone':'\u2A74','coloneq':'\u2254','comma':',','commat':'@','comp':'\u2201','compfn':'\u2218','complement':'\u2201','complexes':'\u2102','cong':'\u2245','congdot':'\u2A6D','Congruent':'\u2261','conint':'\u222E','Conint':'\u222F','ContourIntegral':'\u222E','copf':'\uD835\uDD54','Copf':'\u2102','coprod':'\u2210','Coproduct':'\u2210','copy':'\xA9','COPY':'\xA9','copysr':'\u2117','CounterClockwiseContourIntegral':'\u2233','crarr':'\u21B5','cross':'\u2717','Cross':'\u2A2F','cscr':'\uD835\uDCB8','Cscr':'\uD835\uDC9E','csub':'\u2ACF','csube':'\u2AD1','csup':'\u2AD0','csupe':'\u2AD2','ctdot':'\u22EF','cudarrl':'\u2938','cudarrr':'\u2935','cuepr':'\u22DE','cuesc':'\u22DF','cularr':'\u21B6','cularrp':'\u293D','cup':'\u222A','Cup':'\u22D3','cupbrcap':'\u2A48','cupcap':'\u2A46','CupCap':'\u224D','cupcup':'\u2A4A','cupdot':'\u228D','cupor':'\u2A45','cups':'\u222A\uFE00','curarr':'\u21B7','curarrm':'\u293C','curlyeqprec':'\u22DE','curlyeqsucc':'\u22DF','curlyvee':'\u22CE','curlywedge':'\u22CF','curren':'\xA4','curvearrowleft':'\u21B6','curvearrowright':'\u21B7','cuvee':'\u22CE','cuwed':'\u22CF','cwconint':'\u2232','cwint':'\u2231','cylcty':'\u232D','dagger':'\u2020','Dagger':'\u2021','daleth':'\u2138','darr':'\u2193','dArr':'\u21D3','Darr':'\u21A1','dash':'\u2010','dashv':'\u22A3','Dashv':'\u2AE4','dbkarow':'\u290F','dblac':'\u02DD','dcaron':'\u010F','Dcaron':'\u010E','dcy':'\u0434','Dcy':'\u0414','dd':'\u2146','DD':'\u2145','ddagger':'\u2021','ddarr':'\u21CA','DDotrahd':'\u2911','ddotseq':'\u2A77','deg':'\xB0','Del':'\u2207','delta':'\u03B4','Delta':'\u0394','demptyv':'\u29B1','dfisht':'\u297F','dfr':'\uD835\uDD21','Dfr':'\uD835\uDD07','dHar':'\u2965','dharl':'\u21C3','dharr':'\u21C2','DiacriticalAcute':'\xB4','DiacriticalDot':'\u02D9','DiacriticalDoubleAcute':'\u02DD','DiacriticalGrave':'`','DiacriticalTilde':'\u02DC','diam':'\u22C4','diamond':'\u22C4','Diamond':'\u22C4','diamondsuit':'\u2666','diams':'\u2666','die':'\xA8','DifferentialD':'\u2146','digamma':'\u03DD','disin':'\u22F2','div':'\xF7','divide':'\xF7','divideontimes':'\u22C7','divonx':'\u22C7','djcy':'\u0452','DJcy':'\u0402','dlcorn':'\u231E','dlcrop':'\u230D','dollar':'$','dopf':'\uD835\uDD55','Dopf':'\uD835\uDD3B','dot':'\u02D9','Dot':'\xA8','DotDot':'\u20DC','doteq':'\u2250','doteqdot':'\u2251','DotEqual':'\u2250','dotminus':'\u2238','dotplus':'\u2214','dotsquare':'\u22A1','doublebarwedge':'\u2306','DoubleContourIntegral':'\u222F','DoubleDot':'\xA8','DoubleDownArrow':'\u21D3','DoubleLeftArrow':'\u21D0','DoubleLeftRightArrow':'\u21D4','DoubleLeftTee':'\u2AE4','DoubleLongLeftArrow':'\u27F8','DoubleLongLeftRightArrow':'\u27FA','DoubleLongRightArrow':'\u27F9','DoubleRightArrow':'\u21D2','DoubleRightTee':'\u22A8','DoubleUpArrow':'\u21D1','DoubleUpDownArrow':'\u21D5','DoubleVerticalBar':'\u2225','downarrow':'\u2193','Downarrow':'\u21D3','DownArrow':'\u2193','DownArrowBar':'\u2913','DownArrowUpArrow':'\u21F5','DownBreve':'\u0311','downdownarrows':'\u21CA','downharpoonleft':'\u21C3','downharpoonright':'\u21C2','DownLeftRightVector':'\u2950','DownLeftTeeVector':'\u295E','DownLeftVector':'\u21BD','DownLeftVectorBar':'\u2956','DownRightTeeVector':'\u295F','DownRightVector':'\u21C1','DownRightVectorBar':'\u2957','DownTee':'\u22A4','DownTeeArrow':'\u21A7','drbkarow':'\u2910','drcorn':'\u231F','drcrop':'\u230C','dscr':'\uD835\uDCB9','Dscr':'\uD835\uDC9F','dscy':'\u0455','DScy':'\u0405','dsol':'\u29F6','dstrok':'\u0111','Dstrok':'\u0110','dtdot':'\u22F1','dtri':'\u25BF','dtrif':'\u25BE','duarr':'\u21F5','duhar':'\u296F','dwangle':'\u29A6','dzcy':'\u045F','DZcy':'\u040F','dzigrarr':'\u27FF','eacute':'\xE9','Eacute':'\xC9','easter':'\u2A6E','ecaron':'\u011B','Ecaron':'\u011A','ecir':'\u2256','ecirc':'\xEA','Ecirc':'\xCA','ecolon':'\u2255','ecy':'\u044D','Ecy':'\u042D','eDDot':'\u2A77','edot':'\u0117','eDot':'\u2251','Edot':'\u0116','ee':'\u2147','efDot':'\u2252','efr':'\uD835\uDD22','Efr':'\uD835\uDD08','eg':'\u2A9A','egrave':'\xE8','Egrave':'\xC8','egs':'\u2A96','egsdot':'\u2A98','el':'\u2A99','Element':'\u2208','elinters':'\u23E7','ell':'\u2113','els':'\u2A95','elsdot':'\u2A97','emacr':'\u0113','Emacr':'\u0112','empty':'\u2205','emptyset':'\u2205','EmptySmallSquare':'\u25FB','emptyv':'\u2205','EmptyVerySmallSquare':'\u25AB','emsp':'\u2003','emsp13':'\u2004','emsp14':'\u2005','eng':'\u014B','ENG':'\u014A','ensp':'\u2002','eogon':'\u0119','Eogon':'\u0118','eopf':'\uD835\uDD56','Eopf':'\uD835\uDD3C','epar':'\u22D5','eparsl':'\u29E3','eplus':'\u2A71','epsi':'\u03B5','epsilon':'\u03B5','Epsilon':'\u0395','epsiv':'\u03F5','eqcirc':'\u2256','eqcolon':'\u2255','eqsim':'\u2242','eqslantgtr':'\u2A96','eqslantless':'\u2A95','Equal':'\u2A75','equals':'=','EqualTilde':'\u2242','equest':'\u225F','Equilibrium':'\u21CC','equiv':'\u2261','equivDD':'\u2A78','eqvparsl':'\u29E5','erarr':'\u2971','erDot':'\u2253','escr':'\u212F','Escr':'\u2130','esdot':'\u2250','esim':'\u2242','Esim':'\u2A73','eta':'\u03B7','Eta':'\u0397','eth':'\xF0','ETH':'\xD0','euml':'\xEB','Euml':'\xCB','euro':'\u20AC','excl':'!','exist':'\u2203','Exists':'\u2203','expectation':'\u2130','exponentiale':'\u2147','ExponentialE':'\u2147','fallingdotseq':'\u2252','fcy':'\u0444','Fcy':'\u0424','female':'\u2640','ffilig':'\uFB03','fflig':'\uFB00','ffllig':'\uFB04','ffr':'\uD835\uDD23','Ffr':'\uD835\uDD09','filig':'\uFB01','FilledSmallSquare':'\u25FC','FilledVerySmallSquare':'\u25AA','fjlig':'fj','flat':'\u266D','fllig':'\uFB02','fltns':'\u25B1','fnof':'\u0192','fopf':'\uD835\uDD57','Fopf':'\uD835\uDD3D','forall':'\u2200','ForAll':'\u2200','fork':'\u22D4','forkv':'\u2AD9','Fouriertrf':'\u2131','fpartint':'\u2A0D','frac12':'\xBD','frac13':'\u2153','frac14':'\xBC','frac15':'\u2155','frac16':'\u2159','frac18':'\u215B','frac23':'\u2154','frac25':'\u2156','frac34':'\xBE','frac35':'\u2157','frac38':'\u215C','frac45':'\u2158','frac56':'\u215A','frac58':'\u215D','frac78':'\u215E','frasl':'\u2044','frown':'\u2322','fscr':'\uD835\uDCBB','Fscr':'\u2131','gacute':'\u01F5','gamma':'\u03B3','Gamma':'\u0393','gammad':'\u03DD','Gammad':'\u03DC','gap':'\u2A86','gbreve':'\u011F','Gbreve':'\u011E','Gcedil':'\u0122','gcirc':'\u011D','Gcirc':'\u011C','gcy':'\u0433','Gcy':'\u0413','gdot':'\u0121','Gdot':'\u0120','ge':'\u2265','gE':'\u2267','gel':'\u22DB','gEl':'\u2A8C','geq':'\u2265','geqq':'\u2267','geqslant':'\u2A7E','ges':'\u2A7E','gescc':'\u2AA9','gesdot':'\u2A80','gesdoto':'\u2A82','gesdotol':'\u2A84','gesl':'\u22DB\uFE00','gesles':'\u2A94','gfr':'\uD835\uDD24','Gfr':'\uD835\uDD0A','gg':'\u226B','Gg':'\u22D9','ggg':'\u22D9','gimel':'\u2137','gjcy':'\u0453','GJcy':'\u0403','gl':'\u2277','gla':'\u2AA5','glE':'\u2A92','glj':'\u2AA4','gnap':'\u2A8A','gnapprox':'\u2A8A','gne':'\u2A88','gnE':'\u2269','gneq':'\u2A88','gneqq':'\u2269','gnsim':'\u22E7','gopf':'\uD835\uDD58','Gopf':'\uD835\uDD3E','grave':'`','GreaterEqual':'\u2265','GreaterEqualLess':'\u22DB','GreaterFullEqual':'\u2267','GreaterGreater':'\u2AA2','GreaterLess':'\u2277','GreaterSlantEqual':'\u2A7E','GreaterTilde':'\u2273','gscr':'\u210A','Gscr':'\uD835\uDCA2','gsim':'\u2273','gsime':'\u2A8E','gsiml':'\u2A90','gt':'>','Gt':'\u226B','GT':'>','gtcc':'\u2AA7','gtcir':'\u2A7A','gtdot':'\u22D7','gtlPar':'\u2995','gtquest':'\u2A7C','gtrapprox':'\u2A86','gtrarr':'\u2978','gtrdot':'\u22D7','gtreqless':'\u22DB','gtreqqless':'\u2A8C','gtrless':'\u2277','gtrsim':'\u2273','gvertneqq':'\u2269\uFE00','gvnE':'\u2269\uFE00','Hacek':'\u02C7','hairsp':'\u200A','half':'\xBD','hamilt':'\u210B','hardcy':'\u044A','HARDcy':'\u042A','harr':'\u2194','hArr':'\u21D4','harrcir':'\u2948','harrw':'\u21AD','Hat':'^','hbar':'\u210F','hcirc':'\u0125','Hcirc':'\u0124','hearts':'\u2665','heartsuit':'\u2665','hellip':'\u2026','hercon':'\u22B9','hfr':'\uD835\uDD25','Hfr':'\u210C','HilbertSpace':'\u210B','hksearow':'\u2925','hkswarow':'\u2926','hoarr':'\u21FF','homtht':'\u223B','hookleftarrow':'\u21A9','hookrightarrow':'\u21AA','hopf':'\uD835\uDD59','Hopf':'\u210D','horbar':'\u2015','HorizontalLine':'\u2500','hscr':'\uD835\uDCBD','Hscr':'\u210B','hslash':'\u210F','hstrok':'\u0127','Hstrok':'\u0126','HumpDownHump':'\u224E','HumpEqual':'\u224F','hybull':'\u2043','hyphen':'\u2010','iacute':'\xED','Iacute':'\xCD','ic':'\u2063','icirc':'\xEE','Icirc':'\xCE','icy':'\u0438','Icy':'\u0418','Idot':'\u0130','iecy':'\u0435','IEcy':'\u0415','iexcl':'\xA1','iff':'\u21D4','ifr':'\uD835\uDD26','Ifr':'\u2111','igrave':'\xEC','Igrave':'\xCC','ii':'\u2148','iiiint':'\u2A0C','iiint':'\u222D','iinfin':'\u29DC','iiota':'\u2129','ijlig':'\u0133','IJlig':'\u0132','Im':'\u2111','imacr':'\u012B','Imacr':'\u012A','image':'\u2111','ImaginaryI':'\u2148','imagline':'\u2110','imagpart':'\u2111','imath':'\u0131','imof':'\u22B7','imped':'\u01B5','Implies':'\u21D2','in':'\u2208','incare':'\u2105','infin':'\u221E','infintie':'\u29DD','inodot':'\u0131','int':'\u222B','Int':'\u222C','intcal':'\u22BA','integers':'\u2124','Integral':'\u222B','intercal':'\u22BA','Intersection':'\u22C2','intlarhk':'\u2A17','intprod':'\u2A3C','InvisibleComma':'\u2063','InvisibleTimes':'\u2062','iocy':'\u0451','IOcy':'\u0401','iogon':'\u012F','Iogon':'\u012E','iopf':'\uD835\uDD5A','Iopf':'\uD835\uDD40','iota':'\u03B9','Iota':'\u0399','iprod':'\u2A3C','iquest':'\xBF','iscr':'\uD835\uDCBE','Iscr':'\u2110','isin':'\u2208','isindot':'\u22F5','isinE':'\u22F9','isins':'\u22F4','isinsv':'\u22F3','isinv':'\u2208','it':'\u2062','itilde':'\u0129','Itilde':'\u0128','iukcy':'\u0456','Iukcy':'\u0406','iuml':'\xEF','Iuml':'\xCF','jcirc':'\u0135','Jcirc':'\u0134','jcy':'\u0439','Jcy':'\u0419','jfr':'\uD835\uDD27','Jfr':'\uD835\uDD0D','jmath':'\u0237','jopf':'\uD835\uDD5B','Jopf':'\uD835\uDD41','jscr':'\uD835\uDCBF','Jscr':'\uD835\uDCA5','jsercy':'\u0458','Jsercy':'\u0408','jukcy':'\u0454','Jukcy':'\u0404','kappa':'\u03BA','Kappa':'\u039A','kappav':'\u03F0','kcedil':'\u0137','Kcedil':'\u0136','kcy':'\u043A','Kcy':'\u041A','kfr':'\uD835\uDD28','Kfr':'\uD835\uDD0E','kgreen':'\u0138','khcy':'\u0445','KHcy':'\u0425','kjcy':'\u045C','KJcy':'\u040C','kopf':'\uD835\uDD5C','Kopf':'\uD835\uDD42','kscr':'\uD835\uDCC0','Kscr':'\uD835\uDCA6','lAarr':'\u21DA','lacute':'\u013A','Lacute':'\u0139','laemptyv':'\u29B4','lagran':'\u2112','lambda':'\u03BB','Lambda':'\u039B','lang':'\u27E8','Lang':'\u27EA','langd':'\u2991','langle':'\u27E8','lap':'\u2A85','Laplacetrf':'\u2112','laquo':'\xAB','larr':'\u2190','lArr':'\u21D0','Larr':'\u219E','larrb':'\u21E4','larrbfs':'\u291F','larrfs':'\u291D','larrhk':'\u21A9','larrlp':'\u21AB','larrpl':'\u2939','larrsim':'\u2973','larrtl':'\u21A2','lat':'\u2AAB','latail':'\u2919','lAtail':'\u291B','late':'\u2AAD','lates':'\u2AAD\uFE00','lbarr':'\u290C','lBarr':'\u290E','lbbrk':'\u2772','lbrace':'{','lbrack':'[','lbrke':'\u298B','lbrksld':'\u298F','lbrkslu':'\u298D','lcaron':'\u013E','Lcaron':'\u013D','lcedil':'\u013C','Lcedil':'\u013B','lceil':'\u2308','lcub':'{','lcy':'\u043B','Lcy':'\u041B','ldca':'\u2936','ldquo':'\u201C','ldquor':'\u201E','ldrdhar':'\u2967','ldrushar':'\u294B','ldsh':'\u21B2','le':'\u2264','lE':'\u2266','LeftAngleBracket':'\u27E8','leftarrow':'\u2190','Leftarrow':'\u21D0','LeftArrow':'\u2190','LeftArrowBar':'\u21E4','LeftArrowRightArrow':'\u21C6','leftarrowtail':'\u21A2','LeftCeiling':'\u2308','LeftDoubleBracket':'\u27E6','LeftDownTeeVector':'\u2961','LeftDownVector':'\u21C3','LeftDownVectorBar':'\u2959','LeftFloor':'\u230A','leftharpoondown':'\u21BD','leftharpoonup':'\u21BC','leftleftarrows':'\u21C7','leftrightarrow':'\u2194','Leftrightarrow':'\u21D4','LeftRightArrow':'\u2194','leftrightarrows':'\u21C6','leftrightharpoons':'\u21CB','leftrightsquigarrow':'\u21AD','LeftRightVector':'\u294E','LeftTee':'\u22A3','LeftTeeArrow':'\u21A4','LeftTeeVector':'\u295A','leftthreetimes':'\u22CB','LeftTriangle':'\u22B2','LeftTriangleBar':'\u29CF','LeftTriangleEqual':'\u22B4','LeftUpDownVector':'\u2951','LeftUpTeeVector':'\u2960','LeftUpVector':'\u21BF','LeftUpVectorBar':'\u2958','LeftVector':'\u21BC','LeftVectorBar':'\u2952','leg':'\u22DA','lEg':'\u2A8B','leq':'\u2264','leqq':'\u2266','leqslant':'\u2A7D','les':'\u2A7D','lescc':'\u2AA8','lesdot':'\u2A7F','lesdoto':'\u2A81','lesdotor':'\u2A83','lesg':'\u22DA\uFE00','lesges':'\u2A93','lessapprox':'\u2A85','lessdot':'\u22D6','lesseqgtr':'\u22DA','lesseqqgtr':'\u2A8B','LessEqualGreater':'\u22DA','LessFullEqual':'\u2266','LessGreater':'\u2276','lessgtr':'\u2276','LessLess':'\u2AA1','lesssim':'\u2272','LessSlantEqual':'\u2A7D','LessTilde':'\u2272','lfisht':'\u297C','lfloor':'\u230A','lfr':'\uD835\uDD29','Lfr':'\uD835\uDD0F','lg':'\u2276','lgE':'\u2A91','lHar':'\u2962','lhard':'\u21BD','lharu':'\u21BC','lharul':'\u296A','lhblk':'\u2584','ljcy':'\u0459','LJcy':'\u0409','ll':'\u226A','Ll':'\u22D8','llarr':'\u21C7','llcorner':'\u231E','Lleftarrow':'\u21DA','llhard':'\u296B','lltri':'\u25FA','lmidot':'\u0140','Lmidot':'\u013F','lmoust':'\u23B0','lmoustache':'\u23B0','lnap':'\u2A89','lnapprox':'\u2A89','lne':'\u2A87','lnE':'\u2268','lneq':'\u2A87','lneqq':'\u2268','lnsim':'\u22E6','loang':'\u27EC','loarr':'\u21FD','lobrk':'\u27E6','longleftarrow':'\u27F5','Longleftarrow':'\u27F8','LongLeftArrow':'\u27F5','longleftrightarrow':'\u27F7','Longleftrightarrow':'\u27FA','LongLeftRightArrow':'\u27F7','longmapsto':'\u27FC','longrightarrow':'\u27F6','Longrightarrow':'\u27F9','LongRightArrow':'\u27F6','looparrowleft':'\u21AB','looparrowright':'\u21AC','lopar':'\u2985','lopf':'\uD835\uDD5D','Lopf':'\uD835\uDD43','loplus':'\u2A2D','lotimes':'\u2A34','lowast':'\u2217','lowbar':'_','LowerLeftArrow':'\u2199','LowerRightArrow':'\u2198','loz':'\u25CA','lozenge':'\u25CA','lozf':'\u29EB','lpar':'(','lparlt':'\u2993','lrarr':'\u21C6','lrcorner':'\u231F','lrhar':'\u21CB','lrhard':'\u296D','lrm':'\u200E','lrtri':'\u22BF','lsaquo':'\u2039','lscr':'\uD835\uDCC1','Lscr':'\u2112','lsh':'\u21B0','Lsh':'\u21B0','lsim':'\u2272','lsime':'\u2A8D','lsimg':'\u2A8F','lsqb':'[','lsquo':'\u2018','lsquor':'\u201A','lstrok':'\u0142','Lstrok':'\u0141','lt':'<','Lt':'\u226A','LT':'<','ltcc':'\u2AA6','ltcir':'\u2A79','ltdot':'\u22D6','lthree':'\u22CB','ltimes':'\u22C9','ltlarr':'\u2976','ltquest':'\u2A7B','ltri':'\u25C3','ltrie':'\u22B4','ltrif':'\u25C2','ltrPar':'\u2996','lurdshar':'\u294A','luruhar':'\u2966','lvertneqq':'\u2268\uFE00','lvnE':'\u2268\uFE00','macr':'\xAF','male':'\u2642','malt':'\u2720','maltese':'\u2720','map':'\u21A6','Map':'\u2905','mapsto':'\u21A6','mapstodown':'\u21A7','mapstoleft':'\u21A4','mapstoup':'\u21A5','marker':'\u25AE','mcomma':'\u2A29','mcy':'\u043C','Mcy':'\u041C','mdash':'\u2014','mDDot':'\u223A','measuredangle':'\u2221','MediumSpace':'\u205F','Mellintrf':'\u2133','mfr':'\uD835\uDD2A','Mfr':'\uD835\uDD10','mho':'\u2127','micro':'\xB5','mid':'\u2223','midast':'*','midcir':'\u2AF0','middot':'\xB7','minus':'\u2212','minusb':'\u229F','minusd':'\u2238','minusdu':'\u2A2A','MinusPlus':'\u2213','mlcp':'\u2ADB','mldr':'\u2026','mnplus':'\u2213','models':'\u22A7','mopf':'\uD835\uDD5E','Mopf':'\uD835\uDD44','mp':'\u2213','mscr':'\uD835\uDCC2','Mscr':'\u2133','mstpos':'\u223E','mu':'\u03BC','Mu':'\u039C','multimap':'\u22B8','mumap':'\u22B8','nabla':'\u2207','nacute':'\u0144','Nacute':'\u0143','nang':'\u2220\u20D2','nap':'\u2249','napE':'\u2A70\u0338','napid':'\u224B\u0338','napos':'\u0149','napprox':'\u2249','natur':'\u266E','natural':'\u266E','naturals':'\u2115','nbsp':'\xA0','nbump':'\u224E\u0338','nbumpe':'\u224F\u0338','ncap':'\u2A43','ncaron':'\u0148','Ncaron':'\u0147','ncedil':'\u0146','Ncedil':'\u0145','ncong':'\u2247','ncongdot':'\u2A6D\u0338','ncup':'\u2A42','ncy':'\u043D','Ncy':'\u041D','ndash':'\u2013','ne':'\u2260','nearhk':'\u2924','nearr':'\u2197','neArr':'\u21D7','nearrow':'\u2197','nedot':'\u2250\u0338','NegativeMediumSpace':'\u200B','NegativeThickSpace':'\u200B','NegativeThinSpace':'\u200B','NegativeVeryThinSpace':'\u200B','nequiv':'\u2262','nesear':'\u2928','nesim':'\u2242\u0338','NestedGreaterGreater':'\u226B','NestedLessLess':'\u226A','NewLine':'\n','nexist':'\u2204','nexists':'\u2204','nfr':'\uD835\uDD2B','Nfr':'\uD835\uDD11','nge':'\u2271','ngE':'\u2267\u0338','ngeq':'\u2271','ngeqq':'\u2267\u0338','ngeqslant':'\u2A7E\u0338','nges':'\u2A7E\u0338','nGg':'\u22D9\u0338','ngsim':'\u2275','ngt':'\u226F','nGt':'\u226B\u20D2','ngtr':'\u226F','nGtv':'\u226B\u0338','nharr':'\u21AE','nhArr':'\u21CE','nhpar':'\u2AF2','ni':'\u220B','nis':'\u22FC','nisd':'\u22FA','niv':'\u220B','njcy':'\u045A','NJcy':'\u040A','nlarr':'\u219A','nlArr':'\u21CD','nldr':'\u2025','nle':'\u2270','nlE':'\u2266\u0338','nleftarrow':'\u219A','nLeftarrow':'\u21CD','nleftrightarrow':'\u21AE','nLeftrightarrow':'\u21CE','nleq':'\u2270','nleqq':'\u2266\u0338','nleqslant':'\u2A7D\u0338','nles':'\u2A7D\u0338','nless':'\u226E','nLl':'\u22D8\u0338','nlsim':'\u2274','nlt':'\u226E','nLt':'\u226A\u20D2','nltri':'\u22EA','nltrie':'\u22EC','nLtv':'\u226A\u0338','nmid':'\u2224','NoBreak':'\u2060','NonBreakingSpace':'\xA0','nopf':'\uD835\uDD5F','Nopf':'\u2115','not':'\xAC','Not':'\u2AEC','NotCongruent':'\u2262','NotCupCap':'\u226D','NotDoubleVerticalBar':'\u2226','NotElement':'\u2209','NotEqual':'\u2260','NotEqualTilde':'\u2242\u0338','NotExists':'\u2204','NotGreater':'\u226F','NotGreaterEqual':'\u2271','NotGreaterFullEqual':'\u2267\u0338','NotGreaterGreater':'\u226B\u0338','NotGreaterLess':'\u2279','NotGreaterSlantEqual':'\u2A7E\u0338','NotGreaterTilde':'\u2275','NotHumpDownHump':'\u224E\u0338','NotHumpEqual':'\u224F\u0338','notin':'\u2209','notindot':'\u22F5\u0338','notinE':'\u22F9\u0338','notinva':'\u2209','notinvb':'\u22F7','notinvc':'\u22F6','NotLeftTriangle':'\u22EA','NotLeftTriangleBar':'\u29CF\u0338','NotLeftTriangleEqual':'\u22EC','NotLess':'\u226E','NotLessEqual':'\u2270','NotLessGreater':'\u2278','NotLessLess':'\u226A\u0338','NotLessSlantEqual':'\u2A7D\u0338','NotLessTilde':'\u2274','NotNestedGreaterGreater':'\u2AA2\u0338','NotNestedLessLess':'\u2AA1\u0338','notni':'\u220C','notniva':'\u220C','notnivb':'\u22FE','notnivc':'\u22FD','NotPrecedes':'\u2280','NotPrecedesEqual':'\u2AAF\u0338','NotPrecedesSlantEqual':'\u22E0','NotReverseElement':'\u220C','NotRightTriangle':'\u22EB','NotRightTriangleBar':'\u29D0\u0338','NotRightTriangleEqual':'\u22ED','NotSquareSubset':'\u228F\u0338','NotSquareSubsetEqual':'\u22E2','NotSquareSuperset':'\u2290\u0338','NotSquareSupersetEqual':'\u22E3','NotSubset':'\u2282\u20D2','NotSubsetEqual':'\u2288','NotSucceeds':'\u2281','NotSucceedsEqual':'\u2AB0\u0338','NotSucceedsSlantEqual':'\u22E1','NotSucceedsTilde':'\u227F\u0338','NotSuperset':'\u2283\u20D2','NotSupersetEqual':'\u2289','NotTilde':'\u2241','NotTildeEqual':'\u2244','NotTildeFullEqual':'\u2247','NotTildeTilde':'\u2249','NotVerticalBar':'\u2224','npar':'\u2226','nparallel':'\u2226','nparsl':'\u2AFD\u20E5','npart':'\u2202\u0338','npolint':'\u2A14','npr':'\u2280','nprcue':'\u22E0','npre':'\u2AAF\u0338','nprec':'\u2280','npreceq':'\u2AAF\u0338','nrarr':'\u219B','nrArr':'\u21CF','nrarrc':'\u2933\u0338','nrarrw':'\u219D\u0338','nrightarrow':'\u219B','nRightarrow':'\u21CF','nrtri':'\u22EB','nrtrie':'\u22ED','nsc':'\u2281','nsccue':'\u22E1','nsce':'\u2AB0\u0338','nscr':'\uD835\uDCC3','Nscr':'\uD835\uDCA9','nshortmid':'\u2224','nshortparallel':'\u2226','nsim':'\u2241','nsime':'\u2244','nsimeq':'\u2244','nsmid':'\u2224','nspar':'\u2226','nsqsube':'\u22E2','nsqsupe':'\u22E3','nsub':'\u2284','nsube':'\u2288','nsubE':'\u2AC5\u0338','nsubset':'\u2282\u20D2','nsubseteq':'\u2288','nsubseteqq':'\u2AC5\u0338','nsucc':'\u2281','nsucceq':'\u2AB0\u0338','nsup':'\u2285','nsupe':'\u2289','nsupE':'\u2AC6\u0338','nsupset':'\u2283\u20D2','nsupseteq':'\u2289','nsupseteqq':'\u2AC6\u0338','ntgl':'\u2279','ntilde':'\xF1','Ntilde':'\xD1','ntlg':'\u2278','ntriangleleft':'\u22EA','ntrianglelefteq':'\u22EC','ntriangleright':'\u22EB','ntrianglerighteq':'\u22ED','nu':'\u03BD','Nu':'\u039D','num':'#','numero':'\u2116','numsp':'\u2007','nvap':'\u224D\u20D2','nvdash':'\u22AC','nvDash':'\u22AD','nVdash':'\u22AE','nVDash':'\u22AF','nvge':'\u2265\u20D2','nvgt':'>\u20D2','nvHarr':'\u2904','nvinfin':'\u29DE','nvlArr':'\u2902','nvle':'\u2264\u20D2','nvlt':'<\u20D2','nvltrie':'\u22B4\u20D2','nvrArr':'\u2903','nvrtrie':'\u22B5\u20D2','nvsim':'\u223C\u20D2','nwarhk':'\u2923','nwarr':'\u2196','nwArr':'\u21D6','nwarrow':'\u2196','nwnear':'\u2927','oacute':'\xF3','Oacute':'\xD3','oast':'\u229B','ocir':'\u229A','ocirc':'\xF4','Ocirc':'\xD4','ocy':'\u043E','Ocy':'\u041E','odash':'\u229D','odblac':'\u0151','Odblac':'\u0150','odiv':'\u2A38','odot':'\u2299','odsold':'\u29BC','oelig':'\u0153','OElig':'\u0152','ofcir':'\u29BF','ofr':'\uD835\uDD2C','Ofr':'\uD835\uDD12','ogon':'\u02DB','ograve':'\xF2','Ograve':'\xD2','ogt':'\u29C1','ohbar':'\u29B5','ohm':'\u03A9','oint':'\u222E','olarr':'\u21BA','olcir':'\u29BE','olcross':'\u29BB','oline':'\u203E','olt':'\u29C0','omacr':'\u014D','Omacr':'\u014C','omega':'\u03C9','Omega':'\u03A9','omicron':'\u03BF','Omicron':'\u039F','omid':'\u29B6','ominus':'\u2296','oopf':'\uD835\uDD60','Oopf':'\uD835\uDD46','opar':'\u29B7','OpenCurlyDoubleQuote':'\u201C','OpenCurlyQuote':'\u2018','operp':'\u29B9','oplus':'\u2295','or':'\u2228','Or':'\u2A54','orarr':'\u21BB','ord':'\u2A5D','order':'\u2134','orderof':'\u2134','ordf':'\xAA','ordm':'\xBA','origof':'\u22B6','oror':'\u2A56','orslope':'\u2A57','orv':'\u2A5B','oS':'\u24C8','oscr':'\u2134','Oscr':'\uD835\uDCAA','oslash':'\xF8','Oslash':'\xD8','osol':'\u2298','otilde':'\xF5','Otilde':'\xD5','otimes':'\u2297','Otimes':'\u2A37','otimesas':'\u2A36','ouml':'\xF6','Ouml':'\xD6','ovbar':'\u233D','OverBar':'\u203E','OverBrace':'\u23DE','OverBracket':'\u23B4','OverParenthesis':'\u23DC','par':'\u2225','para':'\xB6','parallel':'\u2225','parsim':'\u2AF3','parsl':'\u2AFD','part':'\u2202','PartialD':'\u2202','pcy':'\u043F','Pcy':'\u041F','percnt':'%','period':'.','permil':'\u2030','perp':'\u22A5','pertenk':'\u2031','pfr':'\uD835\uDD2D','Pfr':'\uD835\uDD13','phi':'\u03C6','Phi':'\u03A6','phiv':'\u03D5','phmmat':'\u2133','phone':'\u260E','pi':'\u03C0','Pi':'\u03A0','pitchfork':'\u22D4','piv':'\u03D6','planck':'\u210F','planckh':'\u210E','plankv':'\u210F','plus':'+','plusacir':'\u2A23','plusb':'\u229E','pluscir':'\u2A22','plusdo':'\u2214','plusdu':'\u2A25','pluse':'\u2A72','PlusMinus':'\xB1','plusmn':'\xB1','plussim':'\u2A26','plustwo':'\u2A27','pm':'\xB1','Poincareplane':'\u210C','pointint':'\u2A15','popf':'\uD835\uDD61','Popf':'\u2119','pound':'\xA3','pr':'\u227A','Pr':'\u2ABB','prap':'\u2AB7','prcue':'\u227C','pre':'\u2AAF','prE':'\u2AB3','prec':'\u227A','precapprox':'\u2AB7','preccurlyeq':'\u227C','Precedes':'\u227A','PrecedesEqual':'\u2AAF','PrecedesSlantEqual':'\u227C','PrecedesTilde':'\u227E','preceq':'\u2AAF','precnapprox':'\u2AB9','precneqq':'\u2AB5','precnsim':'\u22E8','precsim':'\u227E','prime':'\u2032','Prime':'\u2033','primes':'\u2119','prnap':'\u2AB9','prnE':'\u2AB5','prnsim':'\u22E8','prod':'\u220F','Product':'\u220F','profalar':'\u232E','profline':'\u2312','profsurf':'\u2313','prop':'\u221D','Proportion':'\u2237','Proportional':'\u221D','propto':'\u221D','prsim':'\u227E','prurel':'\u22B0','pscr':'\uD835\uDCC5','Pscr':'\uD835\uDCAB','psi':'\u03C8','Psi':'\u03A8','puncsp':'\u2008','qfr':'\uD835\uDD2E','Qfr':'\uD835\uDD14','qint':'\u2A0C','qopf':'\uD835\uDD62','Qopf':'\u211A','qprime':'\u2057','qscr':'\uD835\uDCC6','Qscr':'\uD835\uDCAC','quaternions':'\u210D','quatint':'\u2A16','quest':'?','questeq':'\u225F','quot':'"','QUOT':'"','rAarr':'\u21DB','race':'\u223D\u0331','racute':'\u0155','Racute':'\u0154','radic':'\u221A','raemptyv':'\u29B3','rang':'\u27E9','Rang':'\u27EB','rangd':'\u2992','range':'\u29A5','rangle':'\u27E9','raquo':'\xBB','rarr':'\u2192','rArr':'\u21D2','Rarr':'\u21A0','rarrap':'\u2975','rarrb':'\u21E5','rarrbfs':'\u2920','rarrc':'\u2933','rarrfs':'\u291E','rarrhk':'\u21AA','rarrlp':'\u21AC','rarrpl':'\u2945','rarrsim':'\u2974','rarrtl':'\u21A3','Rarrtl':'\u2916','rarrw':'\u219D','ratail':'\u291A','rAtail':'\u291C','ratio':'\u2236','rationals':'\u211A','rbarr':'\u290D','rBarr':'\u290F','RBarr':'\u2910','rbbrk':'\u2773','rbrace':'}','rbrack':']','rbrke':'\u298C','rbrksld':'\u298E','rbrkslu':'\u2990','rcaron':'\u0159','Rcaron':'\u0158','rcedil':'\u0157','Rcedil':'\u0156','rceil':'\u2309','rcub':'}','rcy':'\u0440','Rcy':'\u0420','rdca':'\u2937','rdldhar':'\u2969','rdquo':'\u201D','rdquor':'\u201D','rdsh':'\u21B3','Re':'\u211C','real':'\u211C','realine':'\u211B','realpart':'\u211C','reals':'\u211D','rect':'\u25AD','reg':'\xAE','REG':'\xAE','ReverseElement':'\u220B','ReverseEquilibrium':'\u21CB','ReverseUpEquilibrium':'\u296F','rfisht':'\u297D','rfloor':'\u230B','rfr':'\uD835\uDD2F','Rfr':'\u211C','rHar':'\u2964','rhard':'\u21C1','rharu':'\u21C0','rharul':'\u296C','rho':'\u03C1','Rho':'\u03A1','rhov':'\u03F1','RightAngleBracket':'\u27E9','rightarrow':'\u2192','Rightarrow':'\u21D2','RightArrow':'\u2192','RightArrowBar':'\u21E5','RightArrowLeftArrow':'\u21C4','rightarrowtail':'\u21A3','RightCeiling':'\u2309','RightDoubleBracket':'\u27E7','RightDownTeeVector':'\u295D','RightDownVector':'\u21C2','RightDownVectorBar':'\u2955','RightFloor':'\u230B','rightharpoondown':'\u21C1','rightharpoonup':'\u21C0','rightleftarrows':'\u21C4','rightleftharpoons':'\u21CC','rightrightarrows':'\u21C9','rightsquigarrow':'\u219D','RightTee':'\u22A2','RightTeeArrow':'\u21A6','RightTeeVector':'\u295B','rightthreetimes':'\u22CC','RightTriangle':'\u22B3','RightTriangleBar':'\u29D0','RightTriangleEqual':'\u22B5','RightUpDownVector':'\u294F','RightUpTeeVector':'\u295C','RightUpVector':'\u21BE','RightUpVectorBar':'\u2954','RightVector':'\u21C0','RightVectorBar':'\u2953','ring':'\u02DA','risingdotseq':'\u2253','rlarr':'\u21C4','rlhar':'\u21CC','rlm':'\u200F','rmoust':'\u23B1','rmoustache':'\u23B1','rnmid':'\u2AEE','roang':'\u27ED','roarr':'\u21FE','robrk':'\u27E7','ropar':'\u2986','ropf':'\uD835\uDD63','Ropf':'\u211D','roplus':'\u2A2E','rotimes':'\u2A35','RoundImplies':'\u2970','rpar':')','rpargt':'\u2994','rppolint':'\u2A12','rrarr':'\u21C9','Rrightarrow':'\u21DB','rsaquo':'\u203A','rscr':'\uD835\uDCC7','Rscr':'\u211B','rsh':'\u21B1','Rsh':'\u21B1','rsqb':']','rsquo':'\u2019','rsquor':'\u2019','rthree':'\u22CC','rtimes':'\u22CA','rtri':'\u25B9','rtrie':'\u22B5','rtrif':'\u25B8','rtriltri':'\u29CE','RuleDelayed':'\u29F4','ruluhar':'\u2968','rx':'\u211E','sacute':'\u015B','Sacute':'\u015A','sbquo':'\u201A','sc':'\u227B','Sc':'\u2ABC','scap':'\u2AB8','scaron':'\u0161','Scaron':'\u0160','sccue':'\u227D','sce':'\u2AB0','scE':'\u2AB4','scedil':'\u015F','Scedil':'\u015E','scirc':'\u015D','Scirc':'\u015C','scnap':'\u2ABA','scnE':'\u2AB6','scnsim':'\u22E9','scpolint':'\u2A13','scsim':'\u227F','scy':'\u0441','Scy':'\u0421','sdot':'\u22C5','sdotb':'\u22A1','sdote':'\u2A66','searhk':'\u2925','searr':'\u2198','seArr':'\u21D8','searrow':'\u2198','sect':'\xA7','semi':';','seswar':'\u2929','setminus':'\u2216','setmn':'\u2216','sext':'\u2736','sfr':'\uD835\uDD30','Sfr':'\uD835\uDD16','sfrown':'\u2322','sharp':'\u266F','shchcy':'\u0449','SHCHcy':'\u0429','shcy':'\u0448','SHcy':'\u0428','ShortDownArrow':'\u2193','ShortLeftArrow':'\u2190','shortmid':'\u2223','shortparallel':'\u2225','ShortRightArrow':'\u2192','ShortUpArrow':'\u2191','shy':'\xAD','sigma':'\u03C3','Sigma':'\u03A3','sigmaf':'\u03C2','sigmav':'\u03C2','sim':'\u223C','simdot':'\u2A6A','sime':'\u2243','simeq':'\u2243','simg':'\u2A9E','simgE':'\u2AA0','siml':'\u2A9D','simlE':'\u2A9F','simne':'\u2246','simplus':'\u2A24','simrarr':'\u2972','slarr':'\u2190','SmallCircle':'\u2218','smallsetminus':'\u2216','smashp':'\u2A33','smeparsl':'\u29E4','smid':'\u2223','smile':'\u2323','smt':'\u2AAA','smte':'\u2AAC','smtes':'\u2AAC\uFE00','softcy':'\u044C','SOFTcy':'\u042C','sol':'/','solb':'\u29C4','solbar':'\u233F','sopf':'\uD835\uDD64','Sopf':'\uD835\uDD4A','spades':'\u2660','spadesuit':'\u2660','spar':'\u2225','sqcap':'\u2293','sqcaps':'\u2293\uFE00','sqcup':'\u2294','sqcups':'\u2294\uFE00','Sqrt':'\u221A','sqsub':'\u228F','sqsube':'\u2291','sqsubset':'\u228F','sqsubseteq':'\u2291','sqsup':'\u2290','sqsupe':'\u2292','sqsupset':'\u2290','sqsupseteq':'\u2292','squ':'\u25A1','square':'\u25A1','Square':'\u25A1','SquareIntersection':'\u2293','SquareSubset':'\u228F','SquareSubsetEqual':'\u2291','SquareSuperset':'\u2290','SquareSupersetEqual':'\u2292','SquareUnion':'\u2294','squarf':'\u25AA','squf':'\u25AA','srarr':'\u2192','sscr':'\uD835\uDCC8','Sscr':'\uD835\uDCAE','ssetmn':'\u2216','ssmile':'\u2323','sstarf':'\u22C6','star':'\u2606','Star':'\u22C6','starf':'\u2605','straightepsilon':'\u03F5','straightphi':'\u03D5','strns':'\xAF','sub':'\u2282','Sub':'\u22D0','subdot':'\u2ABD','sube':'\u2286','subE':'\u2AC5','subedot':'\u2AC3','submult':'\u2AC1','subne':'\u228A','subnE':'\u2ACB','subplus':'\u2ABF','subrarr':'\u2979','subset':'\u2282','Subset':'\u22D0','subseteq':'\u2286','subseteqq':'\u2AC5','SubsetEqual':'\u2286','subsetneq':'\u228A','subsetneqq':'\u2ACB','subsim':'\u2AC7','subsub':'\u2AD5','subsup':'\u2AD3','succ':'\u227B','succapprox':'\u2AB8','succcurlyeq':'\u227D','Succeeds':'\u227B','SucceedsEqual':'\u2AB0','SucceedsSlantEqual':'\u227D','SucceedsTilde':'\u227F','succeq':'\u2AB0','succnapprox':'\u2ABA','succneqq':'\u2AB6','succnsim':'\u22E9','succsim':'\u227F','SuchThat':'\u220B','sum':'\u2211','Sum':'\u2211','sung':'\u266A','sup':'\u2283','Sup':'\u22D1','sup1':'\xB9','sup2':'\xB2','sup3':'\xB3','supdot':'\u2ABE','supdsub':'\u2AD8','supe':'\u2287','supE':'\u2AC6','supedot':'\u2AC4','Superset':'\u2283','SupersetEqual':'\u2287','suphsol':'\u27C9','suphsub':'\u2AD7','suplarr':'\u297B','supmult':'\u2AC2','supne':'\u228B','supnE':'\u2ACC','supplus':'\u2AC0','supset':'\u2283','Supset':'\u22D1','supseteq':'\u2287','supseteqq':'\u2AC6','supsetneq':'\u228B','supsetneqq':'\u2ACC','supsim':'\u2AC8','supsub':'\u2AD4','supsup':'\u2AD6','swarhk':'\u2926','swarr':'\u2199','swArr':'\u21D9','swarrow':'\u2199','swnwar':'\u292A','szlig':'\xDF','Tab':'\t','target':'\u2316','tau':'\u03C4','Tau':'\u03A4','tbrk':'\u23B4','tcaron':'\u0165','Tcaron':'\u0164','tcedil':'\u0163','Tcedil':'\u0162','tcy':'\u0442','Tcy':'\u0422','tdot':'\u20DB','telrec':'\u2315','tfr':'\uD835\uDD31','Tfr':'\uD835\uDD17','there4':'\u2234','therefore':'\u2234','Therefore':'\u2234','theta':'\u03B8','Theta':'\u0398','thetasym':'\u03D1','thetav':'\u03D1','thickapprox':'\u2248','thicksim':'\u223C','ThickSpace':'\u205F\u200A','thinsp':'\u2009','ThinSpace':'\u2009','thkap':'\u2248','thksim':'\u223C','thorn':'\xFE','THORN':'\xDE','tilde':'\u02DC','Tilde':'\u223C','TildeEqual':'\u2243','TildeFullEqual':'\u2245','TildeTilde':'\u2248','times':'\xD7','timesb':'\u22A0','timesbar':'\u2A31','timesd':'\u2A30','tint':'\u222D','toea':'\u2928','top':'\u22A4','topbot':'\u2336','topcir':'\u2AF1','topf':'\uD835\uDD65','Topf':'\uD835\uDD4B','topfork':'\u2ADA','tosa':'\u2929','tprime':'\u2034','trade':'\u2122','TRADE':'\u2122','triangle':'\u25B5','triangledown':'\u25BF','triangleleft':'\u25C3','trianglelefteq':'\u22B4','triangleq':'\u225C','triangleright':'\u25B9','trianglerighteq':'\u22B5','tridot':'\u25EC','trie':'\u225C','triminus':'\u2A3A','TripleDot':'\u20DB','triplus':'\u2A39','trisb':'\u29CD','tritime':'\u2A3B','trpezium':'\u23E2','tscr':'\uD835\uDCC9','Tscr':'\uD835\uDCAF','tscy':'\u0446','TScy':'\u0426','tshcy':'\u045B','TSHcy':'\u040B','tstrok':'\u0167','Tstrok':'\u0166','twixt':'\u226C','twoheadleftarrow':'\u219E','twoheadrightarrow':'\u21A0','uacute':'\xFA','Uacute':'\xDA','uarr':'\u2191','uArr':'\u21D1','Uarr':'\u219F','Uarrocir':'\u2949','ubrcy':'\u045E','Ubrcy':'\u040E','ubreve':'\u016D','Ubreve':'\u016C','ucirc':'\xFB','Ucirc':'\xDB','ucy':'\u0443','Ucy':'\u0423','udarr':'\u21C5','udblac':'\u0171','Udblac':'\u0170','udhar':'\u296E','ufisht':'\u297E','ufr':'\uD835\uDD32','Ufr':'\uD835\uDD18','ugrave':'\xF9','Ugrave':'\xD9','uHar':'\u2963','uharl':'\u21BF','uharr':'\u21BE','uhblk':'\u2580','ulcorn':'\u231C','ulcorner':'\u231C','ulcrop':'\u230F','ultri':'\u25F8','umacr':'\u016B','Umacr':'\u016A','uml':'\xA8','UnderBar':'_','UnderBrace':'\u23DF','UnderBracket':'\u23B5','UnderParenthesis':'\u23DD','Union':'\u22C3','UnionPlus':'\u228E','uogon':'\u0173','Uogon':'\u0172','uopf':'\uD835\uDD66','Uopf':'\uD835\uDD4C','uparrow':'\u2191','Uparrow':'\u21D1','UpArrow':'\u2191','UpArrowBar':'\u2912','UpArrowDownArrow':'\u21C5','updownarrow':'\u2195','Updownarrow':'\u21D5','UpDownArrow':'\u2195','UpEquilibrium':'\u296E','upharpoonleft':'\u21BF','upharpoonright':'\u21BE','uplus':'\u228E','UpperLeftArrow':'\u2196','UpperRightArrow':'\u2197','upsi':'\u03C5','Upsi':'\u03D2','upsih':'\u03D2','upsilon':'\u03C5','Upsilon':'\u03A5','UpTee':'\u22A5','UpTeeArrow':'\u21A5','upuparrows':'\u21C8','urcorn':'\u231D','urcorner':'\u231D','urcrop':'\u230E','uring':'\u016F','Uring':'\u016E','urtri':'\u25F9','uscr':'\uD835\uDCCA','Uscr':'\uD835\uDCB0','utdot':'\u22F0','utilde':'\u0169','Utilde':'\u0168','utri':'\u25B5','utrif':'\u25B4','uuarr':'\u21C8','uuml':'\xFC','Uuml':'\xDC','uwangle':'\u29A7','vangrt':'\u299C','varepsilon':'\u03F5','varkappa':'\u03F0','varnothing':'\u2205','varphi':'\u03D5','varpi':'\u03D6','varpropto':'\u221D','varr':'\u2195','vArr':'\u21D5','varrho':'\u03F1','varsigma':'\u03C2','varsubsetneq':'\u228A\uFE00','varsubsetneqq':'\u2ACB\uFE00','varsupsetneq':'\u228B\uFE00','varsupsetneqq':'\u2ACC\uFE00','vartheta':'\u03D1','vartriangleleft':'\u22B2','vartriangleright':'\u22B3','vBar':'\u2AE8','Vbar':'\u2AEB','vBarv':'\u2AE9','vcy':'\u0432','Vcy':'\u0412','vdash':'\u22A2','vDash':'\u22A8','Vdash':'\u22A9','VDash':'\u22AB','Vdashl':'\u2AE6','vee':'\u2228','Vee':'\u22C1','veebar':'\u22BB','veeeq':'\u225A','vellip':'\u22EE','verbar':'|','Verbar':'\u2016','vert':'|','Vert':'\u2016','VerticalBar':'\u2223','VerticalLine':'|','VerticalSeparator':'\u2758','VerticalTilde':'\u2240','VeryThinSpace':'\u200A','vfr':'\uD835\uDD33','Vfr':'\uD835\uDD19','vltri':'\u22B2','vnsub':'\u2282\u20D2','vnsup':'\u2283\u20D2','vopf':'\uD835\uDD67','Vopf':'\uD835\uDD4D','vprop':'\u221D','vrtri':'\u22B3','vscr':'\uD835\uDCCB','Vscr':'\uD835\uDCB1','vsubne':'\u228A\uFE00','vsubnE':'\u2ACB\uFE00','vsupne':'\u228B\uFE00','vsupnE':'\u2ACC\uFE00','Vvdash':'\u22AA','vzigzag':'\u299A','wcirc':'\u0175','Wcirc':'\u0174','wedbar':'\u2A5F','wedge':'\u2227','Wedge':'\u22C0','wedgeq':'\u2259','weierp':'\u2118','wfr':'\uD835\uDD34','Wfr':'\uD835\uDD1A','wopf':'\uD835\uDD68','Wopf':'\uD835\uDD4E','wp':'\u2118','wr':'\u2240','wreath':'\u2240','wscr':'\uD835\uDCCC','Wscr':'\uD835\uDCB2','xcap':'\u22C2','xcirc':'\u25EF','xcup':'\u22C3','xdtri':'\u25BD','xfr':'\uD835\uDD35','Xfr':'\uD835\uDD1B','xharr':'\u27F7','xhArr':'\u27FA','xi':'\u03BE','Xi':'\u039E','xlarr':'\u27F5','xlArr':'\u27F8','xmap':'\u27FC','xnis':'\u22FB','xodot':'\u2A00','xopf':'\uD835\uDD69','Xopf':'\uD835\uDD4F','xoplus':'\u2A01','xotime':'\u2A02','xrarr':'\u27F6','xrArr':'\u27F9','xscr':'\uD835\uDCCD','Xscr':'\uD835\uDCB3','xsqcup':'\u2A06','xuplus':'\u2A04','xutri':'\u25B3','xvee':'\u22C1','xwedge':'\u22C0','yacute':'\xFD','Yacute':'\xDD','yacy':'\u044F','YAcy':'\u042F','ycirc':'\u0177','Ycirc':'\u0176','ycy':'\u044B','Ycy':'\u042B','yen':'\xA5','yfr':'\uD835\uDD36','Yfr':'\uD835\uDD1C','yicy':'\u0457','YIcy':'\u0407','yopf':'\uD835\uDD6A','Yopf':'\uD835\uDD50','yscr':'\uD835\uDCCE','Yscr':'\uD835\uDCB4','yucy':'\u044E','YUcy':'\u042E','yuml':'\xFF','Yuml':'\u0178','zacute':'\u017A','Zacute':'\u0179','zcaron':'\u017E','Zcaron':'\u017D','zcy':'\u0437','Zcy':'\u0417','zdot':'\u017C','Zdot':'\u017B','zeetrf':'\u2128','ZeroWidthSpace':'\u200B','zeta':'\u03B6','Zeta':'\u0396','zfr':'\uD835\uDD37','Zfr':'\u2128','zhcy':'\u0436','ZHcy':'\u0416','zigrarr':'\u21DD','zopf':'\uD835\uDD6B','Zopf':'\u2124','zscr':'\uD835\uDCCF','Zscr':'\uD835\uDCB5','zwj':'\u200D','zwnj':'\u200C'}; - var decodeMapLegacy = {'aacute':'\xE1','Aacute':'\xC1','acirc':'\xE2','Acirc':'\xC2','acute':'\xB4','aelig':'\xE6','AElig':'\xC6','agrave':'\xE0','Agrave':'\xC0','amp':'&','AMP':'&','aring':'\xE5','Aring':'\xC5','atilde':'\xE3','Atilde':'\xC3','auml':'\xE4','Auml':'\xC4','brvbar':'\xA6','ccedil':'\xE7','Ccedil':'\xC7','cedil':'\xB8','cent':'\xA2','copy':'\xA9','COPY':'\xA9','curren':'\xA4','deg':'\xB0','divide':'\xF7','eacute':'\xE9','Eacute':'\xC9','ecirc':'\xEA','Ecirc':'\xCA','egrave':'\xE8','Egrave':'\xC8','eth':'\xF0','ETH':'\xD0','euml':'\xEB','Euml':'\xCB','frac12':'\xBD','frac14':'\xBC','frac34':'\xBE','gt':'>','GT':'>','iacute':'\xED','Iacute':'\xCD','icirc':'\xEE','Icirc':'\xCE','iexcl':'\xA1','igrave':'\xEC','Igrave':'\xCC','iquest':'\xBF','iuml':'\xEF','Iuml':'\xCF','laquo':'\xAB','lt':'<','LT':'<','macr':'\xAF','micro':'\xB5','middot':'\xB7','nbsp':'\xA0','not':'\xAC','ntilde':'\xF1','Ntilde':'\xD1','oacute':'\xF3','Oacute':'\xD3','ocirc':'\xF4','Ocirc':'\xD4','ograve':'\xF2','Ograve':'\xD2','ordf':'\xAA','ordm':'\xBA','oslash':'\xF8','Oslash':'\xD8','otilde':'\xF5','Otilde':'\xD5','ouml':'\xF6','Ouml':'\xD6','para':'\xB6','plusmn':'\xB1','pound':'\xA3','quot':'"','QUOT':'"','raquo':'\xBB','reg':'\xAE','REG':'\xAE','sect':'\xA7','shy':'\xAD','sup1':'\xB9','sup2':'\xB2','sup3':'\xB3','szlig':'\xDF','thorn':'\xFE','THORN':'\xDE','times':'\xD7','uacute':'\xFA','Uacute':'\xDA','ucirc':'\xFB','Ucirc':'\xDB','ugrave':'\xF9','Ugrave':'\xD9','uml':'\xA8','uuml':'\xFC','Uuml':'\xDC','yacute':'\xFD','Yacute':'\xDD','yen':'\xA5','yuml':'\xFF'}; - var decodeMapNumeric = {'0':'\uFFFD','128':'\u20AC','130':'\u201A','131':'\u0192','132':'\u201E','133':'\u2026','134':'\u2020','135':'\u2021','136':'\u02C6','137':'\u2030','138':'\u0160','139':'\u2039','140':'\u0152','142':'\u017D','145':'\u2018','146':'\u2019','147':'\u201C','148':'\u201D','149':'\u2022','150':'\u2013','151':'\u2014','152':'\u02DC','153':'\u2122','154':'\u0161','155':'\u203A','156':'\u0153','158':'\u017E','159':'\u0178'}; - var invalidReferenceCodePoints = [1,2,3,4,5,6,7,8,11,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,64976,64977,64978,64979,64980,64981,64982,64983,64984,64985,64986,64987,64988,64989,64990,64991,64992,64993,64994,64995,64996,64997,64998,64999,65000,65001,65002,65003,65004,65005,65006,65007,65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]; - - /*--------------------------------------------------------------------------*/ - - var stringFromCharCode = String.fromCharCode; - - var object = {}; - var hasOwnProperty = object.hasOwnProperty; - var has = function(object, propertyName) { - return hasOwnProperty.call(object, propertyName); - }; - - var contains = function(array, value) { - var index = -1; - var length = array.length; - while (++index < length) { - if (array[index] == value) { - return true; - } - } - return false; - }; - - var merge = function(options, defaults) { - if (!options) { - return defaults; - } - var result = {}; - var key; - for (key in defaults) { - // A `hasOwnProperty` check is not needed here, since only recognized - // option names are used anyway. Any others are ignored. - result[key] = has(options, key) ? options[key] : defaults[key]; - } - return result; - }; - - // Modified version of `ucs2encode`; see https://mths.be/punycode. - var codePointToSymbol = function(codePoint, strict) { - var output = ''; - if ((codePoint >= 0xD800 && codePoint <= 0xDFFF) || codePoint > 0x10FFFF) { - // See issue #4: - // “Otherwise, if the number is in the range 0xD800 to 0xDFFF or is - // greater than 0x10FFFF, then this is a parse error. Return a U+FFFD - // REPLACEMENT CHARACTER.” - if (strict) { - parseError('character reference outside the permissible Unicode range'); - } - return '\uFFFD'; - } - if (has(decodeMapNumeric, codePoint)) { - if (strict) { - parseError('disallowed character reference'); - } - return decodeMapNumeric[codePoint]; - } - if (strict && contains(invalidReferenceCodePoints, codePoint)) { - parseError('disallowed character reference'); - } - if (codePoint > 0xFFFF) { - codePoint -= 0x10000; - output += stringFromCharCode(codePoint >>> 10 & 0x3FF | 0xD800); - codePoint = 0xDC00 | codePoint & 0x3FF; - } - output += stringFromCharCode(codePoint); - return output; - }; - - var hexEscape = function(codePoint) { - return '&#x' + codePoint.toString(16).toUpperCase() + ';'; - }; - - var decEscape = function(codePoint) { - return '&#' + codePoint + ';'; - }; - - var parseError = function(message) { - throw Error('Parse error: ' + message); - }; - - /*--------------------------------------------------------------------------*/ - - var encode = function(string, options) { - options = merge(options, encode.options); - var strict = options.strict; - if (strict && regexInvalidRawCodePoint.test(string)) { - parseError('forbidden code point'); - } - var encodeEverything = options.encodeEverything; - var useNamedReferences = options.useNamedReferences; - var allowUnsafeSymbols = options.allowUnsafeSymbols; - var escapeCodePoint = options.decimal ? decEscape : hexEscape; - - var escapeBmpSymbol = function(symbol) { - return escapeCodePoint(symbol.charCodeAt(0)); - }; - - if (encodeEverything) { - // Encode ASCII symbols. - string = string.replace(regexAsciiWhitelist, function(symbol) { - // Use named references if requested & possible. - if (useNamedReferences && has(encodeMap, symbol)) { - return '&' + encodeMap[symbol] + ';'; - } - return escapeBmpSymbol(symbol); - }); - // Shorten a few escapes that represent two symbols, of which at least one - // is within the ASCII range. - if (useNamedReferences) { - string = string - .replace(/>\u20D2/g, '>⃒') - .replace(/<\u20D2/g, '<⃒') - .replace(/fj/g, 'fj'); - } - // Encode non-ASCII symbols. - if (useNamedReferences) { - // Encode non-ASCII symbols that can be replaced with a named reference. - string = string.replace(regexEncodeNonAscii, function(string) { - // Note: there is no need to check `has(encodeMap, string)` here. - return '&' + encodeMap[string] + ';'; - }); - } - // Note: any remaining non-ASCII symbols are handled outside of the `if`. - } else if (useNamedReferences) { - // Apply named character references. - // Encode `<>"'&` using named character references. - if (!allowUnsafeSymbols) { - string = string.replace(regexEscape, function(string) { - return '&' + encodeMap[string] + ';'; // no need to check `has()` here - }); - } - // Shorten escapes that represent two symbols, of which at least one is - // `<>"'&`. - string = string - .replace(/>\u20D2/g, '>⃒') - .replace(/<\u20D2/g, '<⃒'); - // Encode non-ASCII symbols that can be replaced with a named reference. - string = string.replace(regexEncodeNonAscii, function(string) { - // Note: there is no need to check `has(encodeMap, string)` here. - return '&' + encodeMap[string] + ';'; - }); - } else if (!allowUnsafeSymbols) { - // Encode `<>"'&` using hexadecimal escapes, now that they’re not handled - // using named character references. - string = string.replace(regexEscape, escapeBmpSymbol); - } - return string - // Encode astral symbols. - .replace(regexAstralSymbols, function($0) { - // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae - var high = $0.charCodeAt(0); - var low = $0.charCodeAt(1); - var codePoint = (high - 0xD800) * 0x400 + low - 0xDC00 + 0x10000; - return escapeCodePoint(codePoint); - }) - // Encode any remaining BMP symbols that are not printable ASCII symbols - // using a hexadecimal escape. - .replace(regexBmpWhitelist, escapeBmpSymbol); - }; - // Expose default options (so they can be overridden globally). - encode.options = { - 'allowUnsafeSymbols': false, - 'encodeEverything': false, - 'strict': false, - 'useNamedReferences': false, - 'decimal' : false - }; - - var decode = function(html, options) { - options = merge(options, decode.options); - var strict = options.strict; - if (strict && regexInvalidEntity.test(html)) { - parseError('malformed character reference'); - } - return html.replace(regexDecode, function($0, $1, $2, $3, $4, $5, $6, $7, $8) { - var codePoint; - var semicolon; - var decDigits; - var hexDigits; - var reference; - var next; - - if ($1) { - reference = $1; - // Note: there is no need to check `has(decodeMap, reference)`. - return decodeMap[reference]; - } - - if ($2) { - // Decode named character references without trailing `;`, e.g. `&`. - // This is only a parse error if it gets converted to `&`, or if it is - // followed by `=` in an attribute context. - reference = $2; - next = $3; - if (next && options.isAttributeValue) { - if (strict && next == '=') { - parseError('`&` did not start a character reference'); - } - return $0; - } else { - if (strict) { - parseError( - 'named character reference was not terminated by a semicolon' - ); - } - // Note: there is no need to check `has(decodeMapLegacy, reference)`. - return decodeMapLegacy[reference] + (next || ''); - } - } - - if ($4) { - // Decode decimal escapes, e.g. `𝌆`. - decDigits = $4; - semicolon = $5; - if (strict && !semicolon) { - parseError('character reference was not terminated by a semicolon'); - } - codePoint = parseInt(decDigits, 10); - return codePointToSymbol(codePoint, strict); - } - - if ($6) { - // Decode hexadecimal escapes, e.g. `𝌆`. - hexDigits = $6; - semicolon = $7; - if (strict && !semicolon) { - parseError('character reference was not terminated by a semicolon'); - } - codePoint = parseInt(hexDigits, 16); - return codePointToSymbol(codePoint, strict); - } - - // If we’re still here, `if ($7)` is implied; it’s an ambiguous - // ampersand for sure. https://mths.be/notes/ambiguous-ampersands - if (strict) { - parseError( - 'named character reference was not terminated by a semicolon' - ); - } - return $0; - }); - }; - // Expose default options (so they can be overridden globally). - decode.options = { - 'isAttributeValue': false, - 'strict': false - }; - - var escape = function(string) { - return string.replace(regexEscape, function($0) { - // Note: there is no need to check `has(escapeMap, $0)` here. - return escapeMap[$0]; - }); - }; - - /*--------------------------------------------------------------------------*/ - - var he = { - 'version': '1.2.0', - 'encode': encode, - 'decode': decode, - 'escape': escape, - 'unescape': decode - }; - - // Some AMD build optimizers, like r.js, check for specific condition patterns - // like the following: - if (freeExports && !freeExports.nodeType) { - if (freeModule) { // in Node.js, io.js, or RingoJS v0.8.0+ - freeModule.exports = he; - } else { // in Narwhal or RingoJS v0.7.0- - for (var key in he) { - has(he, key) && (freeExports[key] = he[key]); - } - } - } else { // in Rhino or a web browser - root.he = he; - } - - }(commonjsGlobal)); - }(he, he.exports)); - - (function (exports) { - - /** - * Various utility functions used throughout Mocha's codebase. - * @module utils - */ - - /** - * Module dependencies. - */ - var path = require$$1; - var util = require$$0$1; - var he$1 = he.exports; - - const MOCHA_ID_PROP_NAME = "__mocha_id__"; - - /** - * Inherit the prototype methods from one constructor into another. - * - * @param {function} ctor - Constructor function which needs to inherit the - * prototype. - * @param {function} superCtor - Constructor function to inherit prototype from. - * @throws {TypeError} if either constructor is null, or if super constructor - * lacks a prototype. - */ - exports.inherits = util.inherits; - - /** - * Escape special characters in the given string of html. - * - * @private - * @param {string} html - * @return {string} - */ - exports.escape = function (html) { - return he$1.encode(String(html), { useNamedReferences: false }); - }; - - /** - * Test if the given obj is type of string. - * - * @private - * @param {Object} obj - * @return {boolean} - */ - exports.isString = function (obj) { - return typeof obj === "string"; - }; - - /** - * Compute a slug from the given `str`. - * - * @private - * @param {string} str - * @return {string} - */ - exports.slug = function (str) { - return str - .toLowerCase() - .replace(/\s+/g, "-") - .replace(/[^-\w]/g, "") - .replace(/-{2,}/g, "-"); - }; - - /** - * Strip the function definition from `str`, and re-indent for pre whitespace. - * - * @param {string} str - * @return {string} - */ - exports.clean = function (str) { - str = str - .replace(/\r\n?|[\n\u2028\u2029]/g, "\n") - .replace(/^\uFEFF/, "") - // (traditional)-> space/name parameters body (lambda)-> parameters body multi-statement/single keep body content - .replace( - /^function(?:\s*|\s[^(]*)\([^)]*\)\s*\{((?:.|\n)*?)\}$|^\([^)]*\)\s*=>\s*(?:\{((?:.|\n)*?)\}|((?:.|\n)*))$/, - "$1$2$3", - ); - - var spaces = str.match(/^\n?( *)/)[1].length; - var tabs = str.match(/^\n?(\t*)/)[1].length; - var re = new RegExp( - "^\n?" + (tabs ? "\t" : " ") + "{" + (tabs || spaces) + "}", - "gm", - ); - - str = str.replace(re, ""); - - return str.trim(); - }; - - /** - * If a value could have properties, and has none, this function is called, - * which returns a string representation of the empty value. - * - * Functions w/ no properties return `'[Function]'` - * Arrays w/ length === 0 return `'[]'` - * Objects w/ no properties return `'{}'` - * All else: return result of `value.toString()` - * - * @private - * @param {*} value The value to inspect. - * @param {string} typeHint The type of the value - * @returns {string} - */ - function emptyRepresentation(value, typeHint) { - switch (typeHint) { - case "function": - return "[Function]"; - case "object": - return "{}"; - case "array": - return "[]"; - default: - return value.toString(); - } - } - - /** - * Takes some variable and asks `Object.prototype.toString()` what it thinks it - * is. - * - * @private - * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/toString - * @param {*} value The value to test. - * @returns {string} Computed type - * @example - * canonicalType({}) // 'object' - * canonicalType([]) // 'array' - * canonicalType(1) // 'number' - * canonicalType(false) // 'boolean' - * canonicalType(Infinity) // 'number' - * canonicalType(null) // 'null' - * canonicalType(new Date()) // 'date' - * canonicalType(/foo/) // 'regexp' - * canonicalType('type') // 'string' - * canonicalType(global) // 'global' - * canonicalType(new String('foo') // 'object' - * canonicalType(async function() {}) // 'asyncfunction' - * canonicalType(Object.create(null)) // 'null-prototype' - */ - var canonicalType = (exports.canonicalType = function canonicalType(value) { - if (value === undefined) { - return "undefined"; - } else if (value === null) { - return "null"; - } else if (isBuffer(value)) { - return "buffer"; - } else if (Object.getPrototypeOf(value) === null) { - return "null-prototype"; - } - - return Object.prototype.toString - .call(value) - .replace(/^\[.+\s(.+?)]$/, "$1") - .toLowerCase(); - }); - - /** - * - * Returns a general type or data structure of a variable - * @private - * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures - * @param {*} value The value to test. - * @returns {string} One of undefined, boolean, number, string, bigint, symbol, object - * @example - * type({}) // 'object' - * type([]) // 'array' - * type(1) // 'number' - * type(false) // 'boolean' - * type(Infinity) // 'number' - * type(null) // 'null' - * type(new Date()) // 'object' - * type(/foo/) // 'object' - * type('type') // 'string' - * type(global) // 'object' - * type(new String('foo') // 'string' - */ - exports.type = function type(value) { - // Null is special - if (value === null) return "null"; - const primitives = new Set([ - "undefined", - "boolean", - "number", - "string", - "bigint", - "symbol", - ]); - const _type = typeof value; - if (_type === "function") return _type; - if (primitives.has(_type)) return _type; - if (value instanceof String) return "string"; - if (value instanceof Error) return "error"; - if (Array.isArray(value)) return "array"; - - return _type; - }; - - /** - * Stringify `value`. Different behavior depending on type of value: - * - * - If `value` is undefined or null, return `'[undefined]'` or `'[null]'`, respectively. - * - If `value` is not an object, function or array, return result of `value.toString()` wrapped in double-quotes. - * - If `value` is an *empty* object, function, or array, return result of function - * {@link emptyRepresentation}. - * - If `value` has properties, call {@link exports.canonicalize} on it, then return result of - * JSON.stringify(). - * - * @private - * @see exports.type - * @param {*} value - * @return {string} - */ - exports.stringify = function (value) { - var typeHint = canonicalType(value); - - if (!~["object", "array", "function", "null-prototype"].indexOf(typeHint)) { - if (typeHint === "buffer") { - var json = Buffer.prototype.toJSON.call(value); - // Based on the toJSON result - return jsonStringify( - json.data && json.type ? json.data : json, - 2, - ).replace(/,(\n|$)/g, "$1"); - } - - // IE7/IE8 has a bizarre String constructor; needs to be coerced - // into an array and back to obj. - if (typeHint === "string" && typeof value === "object") { - value = value.split("").reduce(function (acc, char, idx) { - acc[idx] = char; - return acc; - }, {}); - typeHint = "object"; - } else { - return jsonStringify(value); - } - } - - for (var prop in value) { - if (Object.prototype.hasOwnProperty.call(value, prop)) { - return jsonStringify( - exports.canonicalize(value, null, typeHint), - 2, - ).replace(/,(\n|$)/g, "$1"); - } - } - - return emptyRepresentation(value, typeHint); - }; - - /** - * like JSON.stringify but more sense. - * - * @private - * @param {Object} object - * @param {number=} spaces - * @param {number=} depth - * @returns {*} - */ - function jsonStringify(object, spaces, depth) { - if (typeof spaces === "undefined") { - // primitive types - return _stringify(object); - } - - depth = depth || 1; - var space = spaces * depth; - var str = Array.isArray(object) ? "[" : "{"; - var end = Array.isArray(object) ? "]" : "}"; - var length = - typeof object.length === "number" - ? object.length - : Object.keys(object).length; - // `.repeat()` polyfill - function repeat(s, n) { - return new Array(n).join(s); - } - - function _stringify(val) { - switch (canonicalType(val)) { - case "null": - case "undefined": - val = "[" + val + "]"; - break; - case "array": - case "object": - val = jsonStringify(val, spaces, depth + 1); - break; - case "boolean": - case "regexp": - case "symbol": - case "number": - val = - val === 0 && 1 / val === -Infinity // `-0` - ? "-0" - : val.toString(); - break; - case "bigint": - val = val.toString() + "n"; - break; - case "date": - var sDate = isNaN(val.getTime()) ? val.toString() : val.toISOString(); - val = "[Date: " + sDate + "]"; - break; - case "buffer": - var json = val.toJSON(); - // Based on the toJSON result - json = json.data && json.type ? json.data : json; - val = "[Buffer: " + jsonStringify(json, 2, depth + 1) + "]"; - break; - default: - val = - val === "[Function]" || val === "[Circular]" - ? val - : JSON.stringify(val); // string - } - return val; - } - - for (var i in object) { - if (!Object.prototype.hasOwnProperty.call(object, i)) { - continue; // not my business - } - --length; - str += - "\n " + - repeat(" ", space) + - (Array.isArray(object) ? "" : '"' + i + '": ') + // key - _stringify(object[i]) + // value - (length ? "," : ""); // comma - } - - return ( - str + - // [], {} - (str.length !== 1 ? "\n" + repeat(" ", --space) + end : end) - ); - } - - /** - * Return a new Thing that has the keys in sorted order. Recursive. - * - * If the Thing... - * - has already been seen, return string `'[Circular]'` - * - is `undefined`, return string `'[undefined]'` - * - is `null`, return value `null` - * - is some other primitive, return the value - * - is not a primitive or an `Array`, `Object`, or `Function`, return the value of the Thing's `toString()` method - * - is a non-empty `Array`, `Object`, or `Function`, return the result of calling this function again. - * - is an empty `Array`, `Object`, or `Function`, return the result of calling `emptyRepresentation()` - * - * @private - * @see {@link exports.stringify} - * @param {*} value Thing to inspect. May or may not have properties. - * @param {Array} [stack=[]] Stack of seen values - * @param {string} [typeHint] Type hint - * @return {(Object|Array|Function|string|undefined)} - */ - exports.canonicalize = function canonicalize(value, stack, typeHint) { - var canonicalizedObj; - /* eslint-disable no-unused-vars */ - var prop; - /* eslint-enable no-unused-vars */ - typeHint = typeHint || canonicalType(value); - function withStack(value, fn) { - stack.push(value); - fn(); - stack.pop(); - } - - stack = stack || []; - - if (stack.indexOf(value) !== -1) { - return "[Circular]"; - } - - switch (typeHint) { - case "undefined": - case "buffer": - case "null": - canonicalizedObj = value; - break; - case "array": - withStack(value, function () { - canonicalizedObj = value.map(function (item) { - return exports.canonicalize(item, stack); - }); - }); - break; - case "function": - /* eslint-disable-next-line no-unused-vars, no-unreachable-loop */ - for (prop in value) { - canonicalizedObj = {}; - break; - } - /* eslint-enable guard-for-in */ - if (!canonicalizedObj) { - canonicalizedObj = emptyRepresentation(value, typeHint); - break; - } - /* falls through */ - case "null-prototype": - case "object": - canonicalizedObj = canonicalizedObj || {}; - if (typeHint === "null-prototype" && Symbol.toStringTag in value) { - canonicalizedObj["[Symbol.toStringTag]"] = value[Symbol.toStringTag]; - } - withStack(value, function () { - Object.keys(value) - .sort() - .forEach(function (key) { - canonicalizedObj[key] = exports.canonicalize(value[key], stack); - }); - }); - break; - case "date": - case "number": - case "regexp": - case "boolean": - case "symbol": - canonicalizedObj = value; - break; - default: - canonicalizedObj = value + ""; - } - - return canonicalizedObj; - }; - - /** - * @summary - * This Filter based on `mocha-clean` module.(see: `github.com/rstacruz/mocha-clean`) - * @description - * When invoking this function you get a filter function that get the Error.stack as an input, - * and return a prettify output. - * (i.e: strip Mocha and internal node functions from stack trace). - * @returns {Function} - */ - exports.stackTraceFilter = function () { - // TODO: Replace with `process.browser` - var is = typeof document === "undefined" ? { node: true } : { browser: true }; - var slash = path.sep; - var cwd; - if (is.node) { - cwd = exports.cwd() + slash; - } else { - cwd = ( - typeof location === "undefined" ? window.location : location - ).href.replace(/\/[^/]*$/, "/"); - slash = "/"; - } - - function isMochaInternal(line) { - return ( - ~line.indexOf("node_modules" + slash + "mocha" + slash) || - ~line.indexOf(slash + "mocha.js") || - ~line.indexOf(slash + "mocha.min.js") - ); - } - - function isNodeInternal(line) { - return ( - ~line.indexOf("(timers.js:") || - ~line.indexOf("(events.js:") || - ~line.indexOf("(node.js:") || - ~line.indexOf("(module.js:") || - ~line.indexOf("GeneratorFunctionPrototype.next (native)") || - false - ); - } - - return function (stack) { - stack = stack.split("\n"); - - stack = stack.reduce(function (list, line) { - if (isMochaInternal(line)) { - return list; - } - - if (is.node && isNodeInternal(line)) { - return list; - } - - // Clean up cwd(absolute) - if (/:\d+:\d+\)?$/.test(line)) { - line = line.replace("(" + cwd, "("); - } - - list.push(line); - return list; - }, []); - - return stack.join("\n"); - }; - }; - - /** - * Crude, but effective. - * @public - * @param {*} value - * @returns {boolean} Whether or not `value` is a Promise - */ - exports.isPromise = function isPromise(value) { - return ( - typeof value === "object" && - value !== null && - typeof value.then === "function" - ); - }; - - /** - * Clamps a numeric value to an inclusive range. - * - * @param {number} value - Value to be clamped. - * @param {number[]} range - Two element array specifying [min, max] range. - * @returns {number} clamped value - */ - exports.clamp = function clamp(value, range) { - return Math.min(Math.max(value, range[0]), range[1]); - }; - - /** - * It's a noop. - * @public - */ - exports.noop = function () {}; - - /** - * Creates a map-like object. - * - * @description - * A "map" is an object with no prototype, for our purposes. In some cases - * this would be more appropriate than a `Map`, especially if your environment - * doesn't support it. Recommended for use in Mocha's public APIs. - * - * @public - * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map#Custom_and_Null_objects|MDN:Map} - * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/create#Custom_and_Null_objects|MDN:Object.create - Custom objects} - * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign#Custom_and_Null_objects|MDN:Object.assign} - * @param {...*} [obj] - Arguments to `Object.assign()`. - * @returns {Object} An object with no prototype, having `...obj` properties - */ - exports.createMap = function () { - return Object.assign.apply( - null, - [Object.create(null)].concat(Array.prototype.slice.call(arguments)), - ); - }; - - /** - * Creates a read-only map-like object. - * - * @description - * This differs from {@link module:utils.createMap createMap} only in that - * the argument must be non-empty, because the result is frozen. - * - * @see {@link module:utils.createMap createMap} - * @param {...*} [obj] - Arguments to `Object.assign()`. - * @returns {Object} A frozen object with no prototype, having `...obj` properties - * @throws {TypeError} if argument is not a non-empty object. - */ - exports.defineConstants = function (obj) { - if (canonicalType(obj) !== "object" || !Object.keys(obj).length) { - throw new TypeError("Invalid argument; expected a non-empty object"); - } - return Object.freeze(exports.createMap(obj)); - }; - - /** - * Returns current working directory - * - * Wrapper around `process.cwd()` for isolation - * @private - */ - exports.cwd = function cwd() { - return process.cwd(); - }; - - /** - * Returns `true` if Mocha is running in a browser. - * Checks for `process.browser`. - * @returns {boolean} - * @private - */ - exports.isBrowser = function isBrowser() { - return Boolean(browser$2); - }; - - /* - * Casts `value` to an array; useful for optionally accepting array parameters - * - * It follows these rules, depending on `value`. If `value` is... - * 1. `undefined`: return an empty Array - * 2. `null`: return an array with a single `null` element - * 3. Any other object: return the value of `Array.from()` _if_ the object is iterable - * 4. otherwise: return an array with a single element, `value` - * @param {*} value - Something to cast to an Array - * @returns {Array<*>} - */ - exports.castArray = function castArray(value) { - if (value === undefined) { - return []; - } - if (value === null) { - return [null]; - } - if ( - typeof value === "object" && - (typeof value[Symbol.iterator] === "function" || value.length !== undefined) - ) { - return Array.from(value); - } - return [value]; - }; - - exports.constants = exports.defineConstants({ - MOCHA_ID_PROP_NAME, - }); - - const uniqueIDBase = - "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_"; - - /** - * Creates a new unique identifier - * Does not create cryptographically safe ids. - * Trivial copy of nanoid/non-secure - * @returns {string} Unique identifier - */ - exports.uniqueID = () => { - let id = ""; - for (let i = 0; i < 21; i++) { - id += uniqueIDBase[(Math.random() * 64) | 0]; - } - return id; - }; - - exports.assignNewMochaID = (obj) => { - const id = exports.uniqueID(); - Object.defineProperty(obj, MOCHA_ID_PROP_NAME, { - get() { - return id; - }, - }); - return obj; - }; - - /** - * Retrieves a Mocha ID from an object, if present. - * @param {*} [obj] - Object - * @returns {string|void} - */ - exports.getMochaID = (obj) => - obj && typeof obj === "object" ? obj[MOCHA_ID_PROP_NAME] : undefined; - - /** - * Replaces any detected circular dependency with the string '[Circular]' - * Mutates original object - * @param inputObj {*} - * @returns {*} - */ - exports.breakCircularDeps = (inputObj) => { - const seen = new Set(); - - function _breakCircularDeps(obj) { - if (obj && typeof obj !== "object") { - return obj; - } - - if (seen.has(obj)) { - return "[Circular]"; - } - - seen.add(obj); - for (const k in obj) { - const descriptor = Object.getOwnPropertyDescriptor(obj, k); - - if (descriptor && descriptor.writable) { - obj[k] = _breakCircularDeps(obj[k]); - } - } - - // deleting means only a seen object that is its own child will be detected - seen.delete(obj); - return obj; - } - - return _breakCircularDeps(inputObj); - }; - - /** - * Checks if provided input can be parsed as a JavaScript Number. - */ - exports.isNumeric = (input) => { - return !isNaN(parseFloat(input)); - }; - }(utils$3)); - - var _nodeResolve_empty = {}; - - var _nodeResolve_empty$1 = /*#__PURE__*/Object.freeze({ - __proto__: null, - 'default': _nodeResolve_empty - }); - - var require$$18 = /*@__PURE__*/getAugmentedNamespace(_nodeResolve_empty$1); - - var browser$1 = { - info: 'ℹ️', - success: '✅', - warning: '⚠️', - error: '❌️' - }; - - var require$$0 = /*@__PURE__*/getAugmentedNamespace(_polyfillNode_events); - - /** - @module Pending - */ - - var pending = Pending$2; - - /** - * Initialize a new `Pending` error with the given message. - * - * @param {string} message - */ - function Pending$2(message) { - this.message = message; - } - - var browser = {exports: {}}; - - /** - * Helpers. - */ - - var s = 1000; - var m = s * 60; - var h = m * 60; - var d = h * 24; - var w = d * 7; - var y = d * 365.25; - - /** - * Parse or format the given `val`. - * - * Options: - * - * - `long` verbose formatting [false] - * - * @param {String|Number} val - * @param {Object} [options] - * @throws {Error} throw an error if val is not a non-empty string or a number - * @return {String|Number} - * @api public - */ - - var ms = function(val, options) { - options = options || {}; - var type = typeof val; - if (type === 'string' && val.length > 0) { - return parse(val); - } else if (type === 'number' && isFinite(val)) { - return options.long ? fmtLong(val) : fmtShort(val); - } - throw new Error( - 'val is not a non-empty string or a valid number. val=' + - JSON.stringify(val) - ); - }; - - /** - * Parse the given `str` and return milliseconds. - * - * @param {String} str - * @return {Number} - * @api private - */ - - function parse(str) { - str = String(str); - if (str.length > 100) { - return; - } - var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec( - str - ); - if (!match) { - return; - } - var n = parseFloat(match[1]); - var type = (match[2] || 'ms').toLowerCase(); - switch (type) { - case 'years': - case 'year': - case 'yrs': - case 'yr': - case 'y': - return n * y; - case 'weeks': - case 'week': - case 'w': - return n * w; - case 'days': - case 'day': - case 'd': - return n * d; - case 'hours': - case 'hour': - case 'hrs': - case 'hr': - case 'h': - return n * h; - case 'minutes': - case 'minute': - case 'mins': - case 'min': - case 'm': - return n * m; - case 'seconds': - case 'second': - case 'secs': - case 'sec': - case 's': - return n * s; - case 'milliseconds': - case 'millisecond': - case 'msecs': - case 'msec': - case 'ms': - return n; - default: - return undefined; - } - } - - /** - * Short format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private - */ - - function fmtShort(ms) { - var msAbs = Math.abs(ms); - if (msAbs >= d) { - return Math.round(ms / d) + 'd'; - } - if (msAbs >= h) { - return Math.round(ms / h) + 'h'; - } - if (msAbs >= m) { - return Math.round(ms / m) + 'm'; - } - if (msAbs >= s) { - return Math.round(ms / s) + 's'; - } - return ms + 'ms'; - } - - /** - * Long format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private - */ - - function fmtLong(ms) { - var msAbs = Math.abs(ms); - if (msAbs >= d) { - return plural(ms, msAbs, d, 'day'); - } - if (msAbs >= h) { - return plural(ms, msAbs, h, 'hour'); - } - if (msAbs >= m) { - return plural(ms, msAbs, m, 'minute'); - } - if (msAbs >= s) { - return plural(ms, msAbs, s, 'second'); - } - return ms + ' ms'; - } - - /** - * Pluralization helper. - */ - - function plural(ms, msAbs, n, name) { - var isPlural = msAbs >= n * 1.5; - return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : ''); - } - - /** - * This is the common logic for both the Node.js and web browser - * implementations of `debug()`. - */ - - function setup(env) { - createDebug.debug = createDebug; - createDebug.default = createDebug; - createDebug.coerce = coerce; - createDebug.disable = disable; - createDebug.enable = enable; - createDebug.enabled = enabled; - createDebug.humanize = ms; - createDebug.destroy = destroy; - - Object.keys(env).forEach(key => { - createDebug[key] = env[key]; - }); - - /** - * The currently active debug mode names, and names to skip. - */ - - createDebug.names = []; - createDebug.skips = []; - - /** - * Map of special "%n" handling functions, for the debug "format" argument. - * - * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N". - */ - createDebug.formatters = {}; - - /** - * Selects a color for a debug namespace - * @param {String} namespace The namespace string for the debug instance to be colored - * @return {Number|String} An ANSI color code for the given namespace - * @api private - */ - function selectColor(namespace) { - let hash = 0; - - for (let i = 0; i < namespace.length; i++) { - hash = ((hash << 5) - hash) + namespace.charCodeAt(i); - hash |= 0; // Convert to 32bit integer - } - - return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; - } - createDebug.selectColor = selectColor; - - /** - * Create a debugger with the given `namespace`. - * - * @param {String} namespace - * @return {Function} - * @api public - */ - function createDebug(namespace) { - let prevTime; - let enableOverride = null; - let namespacesCache; - let enabledCache; - - function debug(...args) { - // Disabled? - if (!debug.enabled) { - return; - } - - const self = debug; - - // Set `diff` timestamp - const curr = Number(new Date()); - const ms = curr - (prevTime || curr); - self.diff = ms; - self.prev = prevTime; - self.curr = curr; - prevTime = curr; - - args[0] = createDebug.coerce(args[0]); - - if (typeof args[0] !== 'string') { - // Anything else let's inspect with %O - args.unshift('%O'); - } - - // Apply any `formatters` transformations - let index = 0; - args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => { - // If we encounter an escaped % then don't increase the array index - if (match === '%%') { - return '%'; - } - index++; - const formatter = createDebug.formatters[format]; - if (typeof formatter === 'function') { - const val = args[index]; - match = formatter.call(self, val); - - // Now we need to remove `args[index]` since it's inlined in the `format` - args.splice(index, 1); - index--; - } - return match; - }); - - // Apply env-specific formatting (colors, etc.) - createDebug.formatArgs.call(self, args); - - const logFn = self.log || createDebug.log; - logFn.apply(self, args); - } - - debug.namespace = namespace; - debug.useColors = createDebug.useColors(); - debug.color = createDebug.selectColor(namespace); - debug.extend = extend; - debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release. - - Object.defineProperty(debug, 'enabled', { - enumerable: true, - configurable: false, - get: () => { - if (enableOverride !== null) { - return enableOverride; - } - if (namespacesCache !== createDebug.namespaces) { - namespacesCache = createDebug.namespaces; - enabledCache = createDebug.enabled(namespace); - } - - return enabledCache; - }, - set: v => { - enableOverride = v; - } - }); - - // Env-specific initialization logic for debug instances - if (typeof createDebug.init === 'function') { - createDebug.init(debug); - } - - return debug; - } - - function extend(namespace, delimiter) { - const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace); - newDebug.log = this.log; - return newDebug; - } - - /** - * Enables a debug mode by namespaces. This can include modes - * separated by a colon and wildcards. - * - * @param {String} namespaces - * @api public - */ - function enable(namespaces) { - createDebug.save(namespaces); - createDebug.namespaces = namespaces; - - createDebug.names = []; - createDebug.skips = []; - - let i; - const split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/); - const len = split.length; - - for (i = 0; i < len; i++) { - if (!split[i]) { - // ignore empty strings - continue; - } - - namespaces = split[i].replace(/\*/g, '.*?'); - - if (namespaces[0] === '-') { - createDebug.skips.push(new RegExp('^' + namespaces.slice(1) + '$')); - } else { - createDebug.names.push(new RegExp('^' + namespaces + '$')); - } - } - } - - /** - * Disable debug output. - * - * @return {String} namespaces - * @api public - */ - function disable() { - const namespaces = [ - ...createDebug.names.map(toNamespace), - ...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace) - ].join(','); - createDebug.enable(''); - return namespaces; - } - - /** - * Returns true if the given mode name is enabled, false otherwise. - * - * @param {String} name - * @return {Boolean} - * @api public - */ - function enabled(name) { - if (name[name.length - 1] === '*') { - return true; - } - - let i; - let len; - - for (i = 0, len = createDebug.skips.length; i < len; i++) { - if (createDebug.skips[i].test(name)) { - return false; - } - } - - for (i = 0, len = createDebug.names.length; i < len; i++) { - if (createDebug.names[i].test(name)) { - return true; - } - } - - return false; - } - - /** - * Convert regexp to namespace - * - * @param {RegExp} regxep - * @return {String} namespace - * @api private - */ - function toNamespace(regexp) { - return regexp.toString() - .substring(2, regexp.toString().length - 2) - .replace(/\.\*\?$/, '*'); - } - - /** - * Coerce `val`. - * - * @param {Mixed} val - * @return {Mixed} - * @api private - */ - function coerce(val) { - if (val instanceof Error) { - return val.stack || val.message; - } - return val; - } - - /** - * XXX DO NOT USE. This is a temporary stub function. - * XXX It WILL be removed in the next major release. - */ - function destroy() { - console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'); - } - - createDebug.enable(createDebug.load()); - - return createDebug; - } - - var common$1 = setup; - - (function (module, exports) { - /** - * This is the web browser implementation of `debug()`. - */ - - exports.formatArgs = formatArgs; - exports.save = save; - exports.load = load; - exports.useColors = useColors; - exports.storage = localstorage(); - exports.destroy = (() => { - let warned = false; - - return () => { - if (!warned) { - warned = true; - console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'); - } - }; - })(); - - /** - * Colors. - */ - - exports.colors = [ - '#0000CC', - '#0000FF', - '#0033CC', - '#0033FF', - '#0066CC', - '#0066FF', - '#0099CC', - '#0099FF', - '#00CC00', - '#00CC33', - '#00CC66', - '#00CC99', - '#00CCCC', - '#00CCFF', - '#3300CC', - '#3300FF', - '#3333CC', - '#3333FF', - '#3366CC', - '#3366FF', - '#3399CC', - '#3399FF', - '#33CC00', - '#33CC33', - '#33CC66', - '#33CC99', - '#33CCCC', - '#33CCFF', - '#6600CC', - '#6600FF', - '#6633CC', - '#6633FF', - '#66CC00', - '#66CC33', - '#9900CC', - '#9900FF', - '#9933CC', - '#9933FF', - '#99CC00', - '#99CC33', - '#CC0000', - '#CC0033', - '#CC0066', - '#CC0099', - '#CC00CC', - '#CC00FF', - '#CC3300', - '#CC3333', - '#CC3366', - '#CC3399', - '#CC33CC', - '#CC33FF', - '#CC6600', - '#CC6633', - '#CC9900', - '#CC9933', - '#CCCC00', - '#CCCC33', - '#FF0000', - '#FF0033', - '#FF0066', - '#FF0099', - '#FF00CC', - '#FF00FF', - '#FF3300', - '#FF3333', - '#FF3366', - '#FF3399', - '#FF33CC', - '#FF33FF', - '#FF6600', - '#FF6633', - '#FF9900', - '#FF9933', - '#FFCC00', - '#FFCC33' - ]; - - /** - * Currently only WebKit-based Web Inspectors, Firefox >= v31, - * and the Firebug extension (any Firefox version) are known - * to support "%c" CSS customizations. - * - * TODO: add a `localStorage` variable to explicitly enable/disable colors - */ - - // eslint-disable-next-line complexity - function useColors() { - // NB: In an Electron preload script, document will be defined but not fully - // initialized. Since we know we're in Chrome, we'll just detect this case - // explicitly - if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) { - return true; - } - - // Internet Explorer and Edge do not support colors. - if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { - return false; - } - - // Is webkit? http://stackoverflow.com/a/16459606/376773 - // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 - return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) || - // Is firebug? http://stackoverflow.com/a/398120/376773 - (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) || - // Is firefox >= v31? - // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages - (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) || - // Double check webkit in userAgent just in case we are in a worker - (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)); - } - - /** - * Colorize log arguments if enabled. - * - * @api public - */ - - function formatArgs(args) { - args[0] = (this.useColors ? '%c' : '') + - this.namespace + - (this.useColors ? ' %c' : ' ') + - args[0] + - (this.useColors ? '%c ' : ' ') + - '+' + module.exports.humanize(this.diff); - - if (!this.useColors) { - return; - } - - const c = 'color: ' + this.color; - args.splice(1, 0, c, 'color: inherit'); - - // The final "%c" is somewhat tricky, because there could be other - // arguments passed either before or after the %c, so we need to - // figure out the correct index to insert the CSS into - let index = 0; - let lastC = 0; - args[0].replace(/%[a-zA-Z%]/g, match => { - if (match === '%%') { - return; - } - index++; - if (match === '%c') { - // We only are interested in the *last* %c - // (the user may have provided their own) - lastC = index; - } - }); - - args.splice(lastC, 0, c); - } - - /** - * Invokes `console.debug()` when available. - * No-op when `console.debug` is not a "function". - * If `console.debug` is not available, falls back - * to `console.log`. - * - * @api public - */ - exports.log = console.debug || console.log || (() => {}); - - /** - * Save `namespaces`. - * - * @param {String} namespaces - * @api private - */ - function save(namespaces) { - try { - if (namespaces) { - exports.storage.setItem('debug', namespaces); - } else { - exports.storage.removeItem('debug'); - } - } catch (error) { - // Swallow - // XXX (@Qix-) should we be logging these? - } - } - - /** - * Load `namespaces`. - * - * @return {String} returns the previously persisted debug modes - * @api private - */ - function load() { - let r; - try { - r = exports.storage.getItem('debug'); - } catch (error) { - // Swallow - // XXX (@Qix-) should we be logging these? - } - - // If debug isn't set in LS, and we're in Electron, try to load $DEBUG - if (!r && typeof process !== 'undefined' && 'env' in process) { - r = process.env.DEBUG; - } - - return r; - } - - /** - * Localstorage attempts to return the localstorage. - * - * This is necessary because safari throws - * when a user disables cookies/localstorage - * and you attempt to access it. - * - * @return {LocalStorage} - * @api private - */ - - function localstorage() { - try { - // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context - // The Browser also has localStorage in the global context. - return localStorage; - } catch (error) { - // Swallow - // XXX (@Qix-) should we be logging these? - } - } - - module.exports = common$1(exports); - - const {formatters} = module.exports; - - /** - * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. - */ - - formatters.j = function (v) { - try { - return JSON.stringify(v); - } catch (error) { - return '[UnexpectedJSONParseError]: ' + error.message; - } - }; - }(browser, browser.exports)); - - /** - * When Mocha throws exceptions (or rejects `Promise`s), it attempts to assign a `code` property to the `Error` object, for easier handling. These are the potential values of `code`. - * @public - * @namespace - * @memberof module:lib/errors - */ - var constants$5 = { - /** - * An unrecoverable error. - * @constant - * @default - */ - FATAL: "ERR_MOCHA_FATAL", - - /** - * The type of an argument to a function call is invalid - * @constant - * @default - */ - INVALID_ARG_TYPE: "ERR_MOCHA_INVALID_ARG_TYPE", - - /** - * The value of an argument to a function call is invalid - * @constant - * @default - */ - INVALID_ARG_VALUE: "ERR_MOCHA_INVALID_ARG_VALUE", - - /** - * Something was thrown, but it wasn't an `Error` - * @constant - * @default - */ - INVALID_EXCEPTION: "ERR_MOCHA_INVALID_EXCEPTION", - - /** - * An interface (e.g., `Mocha.interfaces`) is unknown or invalid - * @constant - * @default - */ - INVALID_INTERFACE: "ERR_MOCHA_INVALID_INTERFACE", - - /** - * A reporter (.e.g, `Mocha.reporters`) is unknown or invalid - * @constant - * @default - */ - INVALID_REPORTER: "ERR_MOCHA_INVALID_REPORTER", - - /** - * `done()` was called twice in a `Test` or `Hook` callback - * @constant - * @default - */ - MULTIPLE_DONE: "ERR_MOCHA_MULTIPLE_DONE", - - /** - * No files matched the pattern provided by the user - * @constant - * @default - */ - NO_FILES_MATCH_PATTERN: "ERR_MOCHA_NO_FILES_MATCH_PATTERN", - - /** - * Known, but unsupported behavior of some kind - * @constant - * @default - */ - UNSUPPORTED: "ERR_MOCHA_UNSUPPORTED", - - /** - * Invalid state transition occurring in `Mocha` instance - * @constant - * @default - */ - INSTANCE_ALREADY_RUNNING: "ERR_MOCHA_INSTANCE_ALREADY_RUNNING", - - /** - * Invalid state transition occurring in `Mocha` instance - * @constant - * @default - */ - INSTANCE_ALREADY_DISPOSED: "ERR_MOCHA_INSTANCE_ALREADY_DISPOSED", - - /** - * Use of `only()` w/ `--forbid-only` results in this error. - * @constant - * @default - */ - FORBIDDEN_EXCLUSIVITY: "ERR_MOCHA_FORBIDDEN_EXCLUSIVITY", - - /** - * To be thrown when a user-defined plugin implementation (e.g., `mochaHooks`) is invalid - * @constant - * @default - */ - INVALID_PLUGIN_IMPLEMENTATION: "ERR_MOCHA_INVALID_PLUGIN_IMPLEMENTATION", - - /** - * To be thrown when a builtin or third-party plugin definition (the _definition_ of `mochaHooks`) is invalid - * @constant - * @default - */ - INVALID_PLUGIN_DEFINITION: "ERR_MOCHA_INVALID_PLUGIN_DEFINITION", - - /** - * When a runnable exceeds its allowed run time. - * @constant - * @default - */ - TIMEOUT: "ERR_MOCHA_TIMEOUT", - - /** - * Input file is not able to be parsed - * @constant - * @default - */ - UNPARSABLE_FILE: "ERR_MOCHA_UNPARSABLE_FILE", - }; - - var errorConstants$1 = { constants: constants$5 }; - - /** - * @typedef {import('./mocha.js')} Mocha - * @typedef {import('./runnable.js')} Runnable - * @typedef {import('./types.d.ts').MochaTimeoutError} MochaTimeoutError - * @typedef {import('./types.d.ts').PluginDefinition} PluginDefinition - */ - - const { format } = require$$0$1; - const { constants: constants$4 } = errorConstants$1; - - /** - * Contains error codes, factory functions to create throwable error objects, - * and warning/deprecation functions. - * @module - */ - - /** - * process.emitWarning or a polyfill - * @see https://nodejs.org/api/process.html#process_process_emitwarning_warning_options - * @ignore - */ - const emitWarning = (msg, type) => { - if (process.emitWarning) { - process.emitWarning(msg, type); - } else { - /* istanbul ignore next */ - nextTick$1(function () { - console.warn(type + ": " + msg); - }); - } - }; - - /** - * Show a deprecation warning. Each distinct message is only displayed once. - * Ignores empty messages. - * - * @param {string} [msg] - Warning to print - * @private - */ - const deprecate = (msg) => { - msg = String(msg); - if (msg && !deprecate.cache[msg]) { - deprecate.cache[msg] = true; - emitWarning(msg, "DeprecationWarning"); - } - }; - deprecate.cache = {}; - - /** - * Show a generic warning. - * Ignores empty messages. - * - * @param {string} [msg] - Warning to print - * @private - */ - const warn = (msg) => { - if (msg) { - emitWarning(msg); - } - }; - - /** - * A set containing all string values of all Mocha error constants, for use by {@link isMochaError}. - * @private - */ - const MOCHA_ERRORS = new Set(Object.values(constants$4)); - - /** - * Creates an error object to be thrown when no files to be tested could be found using specified pattern. - * - * @public - * @static - * @param {string} message - Error message to be displayed. - * @param {string} pattern - User-specified argument value. - * @returns {Error} instance detailing the error condition - */ - function createNoFilesMatchPatternError(message, pattern) { - var err = new Error(message); - err.code = constants$4.NO_FILES_MATCH_PATTERN; - err.pattern = pattern; - return err; - } - - /** - * Creates an error object to be thrown when the reporter specified in the options was not found. - * - * @public - * @param {string} message - Error message to be displayed. - * @param {string} reporter - User-specified reporter value. - * @returns {Error} instance detailing the error condition - */ - function createInvalidReporterError(message, reporter) { - var err = new TypeError(message); - err.code = constants$4.INVALID_REPORTER; - err.reporter = reporter; - return err; - } - - /** - * Creates an error object to be thrown when the interface specified in the options was not found. - * - * @public - * @static - * @param {string} message - Error message to be displayed. - * @param {string} ui - User-specified interface value. - * @returns {Error} instance detailing the error condition - */ - function createInvalidInterfaceError(message, ui) { - var err = new Error(message); - err.code = constants$4.INVALID_INTERFACE; - err.interface = ui; - return err; - } - - /** - * Creates an error object to be thrown when a behavior, option, or parameter is unsupported. - * - * @public - * @static - * @param {string} message - Error message to be displayed. - * @returns {Error} instance detailing the error condition - */ - function createUnsupportedError$2(message) { - var err = new Error(message); - err.code = constants$4.UNSUPPORTED; - return err; - } - - /** - * Creates an error object to be thrown when an argument is missing. - * - * @public - * @static - * @param {string} message - Error message to be displayed. - * @param {string} argument - Argument name. - * @param {string} expected - Expected argument datatype. - * @returns {Error} instance detailing the error condition - */ - function createMissingArgumentError$1(message, argument, expected) { - return createInvalidArgumentTypeError$1(message, argument, expected); - } - - /** - * Creates an error object to be thrown when an argument did not use the supported type - * - * @public - * @static - * @param {string} message - Error message to be displayed. - * @param {string} argument - Argument name. - * @param {string} expected - Expected argument datatype. - * @returns {Error} instance detailing the error condition - */ - function createInvalidArgumentTypeError$1(message, argument, expected) { - var err = new TypeError(message); - err.code = constants$4.INVALID_ARG_TYPE; - err.argument = argument; - err.expected = expected; - err.actual = typeof argument; - return err; - } - - /** - * Creates an error object to be thrown when an argument did not use the supported value - * - * @public - * @static - * @param {string} message - Error message to be displayed. - * @param {string} argument - Argument name. - * @param {string} value - Argument value. - * @param {string} [reason] - Why value is invalid. - * @returns {Error} instance detailing the error condition - */ - function createInvalidArgumentValueError(message, argument, value, reason) { - var err = new TypeError(message); - err.code = constants$4.INVALID_ARG_VALUE; - err.argument = argument; - err.value = value; - err.reason = typeof reason !== "undefined" ? reason : "is invalid"; - return err; - } - - /** - * Creates an error object to be thrown when an exception was caught, but the `Error` is falsy or undefined. - * - * @public - * @static - * @param {string} message - Error message to be displayed. - * @returns {Error} instance detailing the error condition - */ - function createInvalidExceptionError$2(message, value) { - var err = new Error(message); - err.code = constants$4.INVALID_EXCEPTION; - err.valueType = typeof value; - err.value = value; - return err; - } - - /** - * Creates an error object to be thrown when an unrecoverable error occurs. - * - * @public - * @static - * @param {string} message - Error message to be displayed. - * @returns {Error} instance detailing the error condition - */ - function createFatalError$1(message, value) { - var err = new Error(message); - err.code = constants$4.FATAL; - err.valueType = typeof value; - err.value = value; - return err; - } - - /** - * Dynamically creates a plugin-type-specific error based on plugin type - * @param {string} message - Error message - * @param {"reporter"|"ui"} pluginType - Plugin type. Future: expand as needed - * @param {string} [pluginId] - Name/path of plugin, if any - * @throws When `pluginType` is not known - * @public - * @static - * @returns {Error} - */ - function createInvalidLegacyPluginError(message, pluginType, pluginId) { - switch (pluginType) { - case "reporter": - return createInvalidReporterError(message, pluginId); - case "ui": - return createInvalidInterfaceError(message, pluginId); - default: - throw new Error('unknown pluginType "' + pluginType + '"'); - } - } - - /** - * **DEPRECATED**. Use {@link createInvalidLegacyPluginError} instead Dynamically creates a plugin-type-specific error based on plugin type - * @deprecated - * @param {string} message - Error message - * @param {"reporter"|"interface"} pluginType - Plugin type. Future: expand as needed - * @param {string} [pluginId] - Name/path of plugin, if any - * @throws When `pluginType` is not known - * @public - * @static - * @returns {Error} - */ - function createInvalidPluginError(...args) { - deprecate("Use createInvalidLegacyPluginError() instead"); - return createInvalidLegacyPluginError(...args); - } - - /** - * Creates an error object to be thrown when a mocha object's `run` method is executed while it is already disposed. - * @param {string} message The error message to be displayed. - * @param {boolean} cleanReferencesAfterRun the value of `cleanReferencesAfterRun` - * @param {Mocha} instance the mocha instance that throw this error - * @static - */ - function createMochaInstanceAlreadyDisposedError( - message, - cleanReferencesAfterRun, - instance, - ) { - var err = new Error(message); - err.code = constants$4.INSTANCE_ALREADY_DISPOSED; - err.cleanReferencesAfterRun = cleanReferencesAfterRun; - err.instance = instance; - return err; - } - - /** - * Creates an error object to be thrown when a mocha object's `run` method is called while a test run is in progress. - * @param {string} message The error message to be displayed. - * @static - * @public - */ - function createMochaInstanceAlreadyRunningError(message, instance) { - var err = new Error(message); - err.code = constants$4.INSTANCE_ALREADY_RUNNING; - err.instance = instance; - return err; - } - - /** - * Creates an error object to be thrown when done() is called multiple times in a test - * - * @public - * @param {Runnable} runnable - Original runnable - * @param {Error} [originalErr] - Original error, if any - * @returns {Error} instance detailing the error condition - * @static - */ - function createMultipleDoneError$1(runnable, originalErr) { - var title; - try { - title = format("<%s>", runnable.fullTitle()); - if (runnable.parent.root) { - title += " (of root suite)"; - } - } catch (ignored) { - title = format("<%s> (of unknown suite)", runnable.title); - } - var message = format( - "done() called multiple times in %s %s", - runnable.type ? runnable.type : "unknown runnable", - title, - ); - if (runnable.file) { - message += format(" of file %s", runnable.file); - } - if (originalErr) { - message += format("; in addition, done() received error: %s", originalErr); - } - - var err = new Error(message); - err.code = constants$4.MULTIPLE_DONE; - err.valueType = typeof originalErr; - err.value = originalErr; - return err; - } - - /** - * Creates an error object to be thrown when `.only()` is used with - * `--forbid-only`. - * @static - * @public - * @param {Mocha} mocha - Mocha instance - * @returns {Error} Error with code {@link constants.FORBIDDEN_EXCLUSIVITY} - */ - function createForbiddenExclusivityError$1(mocha) { - var err = new Error( - mocha.isWorker - ? "`.only` is not supported in parallel mode" - : "`.only` forbidden by --forbid-only", - ); - err.code = constants$4.FORBIDDEN_EXCLUSIVITY; - return err; - } - - /** - * Creates an error object to be thrown when a plugin definition is invalid - * @static - * @param {string} msg - Error message - * @param {PluginDefinition} [pluginDef] - Problematic plugin definition - * @public - * @returns {Error} Error with code {@link constants.INVALID_PLUGIN_DEFINITION} - */ - function createInvalidPluginDefinitionError(msg, pluginDef) { - const err = new Error(msg); - err.code = constants$4.INVALID_PLUGIN_DEFINITION; - err.pluginDef = pluginDef; - return err; - } - - /** - * Creates an error object to be thrown when a plugin implementation (user code) is invalid - * @static - * @param {string} msg - Error message - * @param {Object} [opts] - Plugin definition and user-supplied implementation - * @param {PluginDefinition} [opts.pluginDef] - Plugin Definition - * @param {*} [opts.pluginImpl] - Plugin Implementation (user-supplied) - * @public - * @returns {Error} Error with code {@link constants.INVALID_PLUGIN_DEFINITION} - */ - function createInvalidPluginImplementationError( - msg, - { pluginDef, pluginImpl } = {}, - ) { - const err = new Error(msg); - err.code = constants$4.INVALID_PLUGIN_IMPLEMENTATION; - err.pluginDef = pluginDef; - err.pluginImpl = pluginImpl; - return err; - } - - /** - * Creates an error object to be thrown when a runnable exceeds its allowed run time. - * @static - * @param {string} msg - Error message - * @param {number} [timeout] - Timeout in ms - * @param {string} [file] - File, if given - * @returns {MochaTimeoutError} - */ - function createTimeoutError$1(msg, timeout, file) { - const err = new Error(msg); - err.code = constants$4.TIMEOUT; - err.timeout = timeout; - err.file = file; - return err; - } - - /** - * Creates an error object to be thrown when file is unparsable - * @public - * @static - * @param {string} message - Error message to be displayed. - * @returns {Error} Error with code {@link constants.UNPARSABLE_FILE} - */ - function createUnparsableFileError(message) { - var err = new Error(message); - err.code = constants$4.UNPARSABLE_FILE; - return err; - } - - /** - * Returns `true` if an error came out of Mocha. - * _Can suffer from false negatives, but not false positives._ - * @static - * @public - * @param {*} err - Error, or anything - * @returns {boolean} - */ - const isMochaError$1 = (err) => - Boolean(err && typeof err === "object" && MOCHA_ERRORS.has(err.code)); - - var errors$2 = { - createFatalError: createFatalError$1, - createForbiddenExclusivityError: createForbiddenExclusivityError$1, - createInvalidArgumentTypeError: createInvalidArgumentTypeError$1, - createInvalidArgumentValueError, - createInvalidExceptionError: createInvalidExceptionError$2, - createInvalidInterfaceError, - createInvalidLegacyPluginError, - createInvalidPluginDefinitionError, - createInvalidPluginError, - createInvalidPluginImplementationError, - createInvalidReporterError, - createMissingArgumentError: createMissingArgumentError$1, - createMochaInstanceAlreadyDisposedError, - createMochaInstanceAlreadyRunningError, - createMultipleDoneError: createMultipleDoneError$1, - createNoFilesMatchPatternError, - createTimeoutError: createTimeoutError$1, - createUnparsableFileError, - createUnsupportedError: createUnsupportedError$2, - deprecate, - isMochaError: isMochaError$1, - warn, - }; - - var EventEmitter$1 = require$$0.EventEmitter; - var Pending$1 = pending; - var debug$1 = browser.exports("mocha:runnable"); - var milliseconds = ms$1; - var utils$2 = utils$3; - const { - createInvalidExceptionError: createInvalidExceptionError$1, - createMultipleDoneError, - createTimeoutError, - } = errors$2; - - /** - * Save timer references to avoid Sinon interfering (see GH-237). - * @private - */ - var Date$3 = commonjsGlobal.Date; - var setTimeout$2 = commonjsGlobal.setTimeout; - var clearTimeout$1 = commonjsGlobal.clearTimeout; - var toString = Object.prototype.toString; - - var MAX_TIMEOUT = Math.pow(2, 31) - 1; - - var runnable = Runnable$3; - - // "Additional properties" doc comment added for hosted docs (mochajs.org/api) - /** - * Initialize a new `Runnable` with the given `title` and callback `fn`. - * Additional properties, like `getFullTitle()` and `slow()`, can be viewed in the `Runnable` source. - * - * @class - * @extends external:EventEmitter - * @public - * @param {String} title - * @param {Function} fn - */ - function Runnable$3(title, fn) { - this.title = title; - this.fn = fn; - this.body = (fn || "").toString(); - this.async = fn && fn.length; - this.sync = !this.async; - this._timeout = 2000; - this._slow = 75; - this._retries = -1; - utils$2.assignNewMochaID(this); - Object.defineProperty(this, "id", { - get() { - return utils$2.getMochaID(this); - }, - }); - this.reset(); - } - - /** - * Inherit from `EventEmitter.prototype`. - */ - utils$2.inherits(Runnable$3, EventEmitter$1); - - /** - * Resets the state initially or for a next run. - */ - Runnable$3.prototype.reset = function () { - this.timedOut = false; - this._currentRetry = 0; - this.pending = false; - delete this.state; - delete this.err; - }; - - /** - * Get current timeout value in msecs. - * - * @private - * @returns {number} current timeout threshold value - */ - /** - * @summary - * Set timeout threshold value (msecs). - * - * @description - * A string argument can use shorthand (e.g., "2s") and will be converted. - * The value will be clamped to range [0, 2^31-1]. - * If clamped value matches either range endpoint, timeouts will be disabled. - * - * @private - * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setTimeout#Maximum_delay_value} - * @param {number|string} ms - Timeout threshold value. - * @returns {Runnable} this - * @chainable - */ - Runnable$3.prototype.timeout = function (ms) { - if (!arguments.length) { - return this._timeout; - } - if (typeof ms === "string") { - ms = milliseconds(ms); - } - - // Clamp to range - var range = [0, MAX_TIMEOUT]; - ms = utils$2.clamp(ms, range); - - // see #1652 for reasoning - if (ms === range[0] || ms === range[1]) { - this._timeout = 0; - } else { - this._timeout = ms; - } - debug$1("timeout %d", this._timeout); - - if (this.timer) { - this.resetTimeout(); - } - return this; - }; - - /** - * Set or get slow `ms`. - * - * @private - * @param {number|string} ms - * @return {Runnable|number} ms or Runnable instance. - */ - Runnable$3.prototype.slow = function (ms) { - if (!arguments.length || typeof ms === "undefined") { - return this._slow; - } - if (typeof ms === "string") { - ms = milliseconds(ms); - } - debug$1("slow %d", ms); - this._slow = ms; - return this; - }; - - /** - * Halt and mark as pending. - * - * @memberof Mocha.Runnable - * @public - */ - Runnable$3.prototype.skip = function () { - this.pending = true; - throw new Pending$1("sync skip; aborting execution"); - }; - - /** - * Check if this runnable or its parent suite is marked as pending. - * - * @private - */ - Runnable$3.prototype.isPending = function () { - return this.pending || (this.parent && this.parent.isPending()); - }; - - /** - * Return `true` if this Runnable has failed. - * @return {boolean} - * @private - */ - Runnable$3.prototype.isFailed = function () { - return !this.isPending() && this.state === constants$3.STATE_FAILED; - }; - - /** - * Return `true` if this Runnable has passed. - * @return {boolean} - * @private - */ - Runnable$3.prototype.isPassed = function () { - return !this.isPending() && this.state === constants$3.STATE_PASSED; - }; - - /** - * Set or get number of retries. - * - * @private - */ - Runnable$3.prototype.retries = function (n) { - if (!arguments.length) { - return this._retries; - } - this._retries = n; - }; - - /** - * Set or get current retry - * - * @private - */ - Runnable$3.prototype.currentRetry = function (n) { - if (!arguments.length) { - return this._currentRetry; - } - this._currentRetry = n; - }; - - /** - * Return the full title generated by recursively concatenating the parent's - * full title. - * - * @memberof Mocha.Runnable - * @public - * @return {string} - */ - Runnable$3.prototype.fullTitle = function () { - return this.titlePath().join(" "); - }; - - /** - * Return the title path generated by concatenating the parent's title path with the title. - * - * @memberof Mocha.Runnable - * @public - * @return {string[]} - */ - Runnable$3.prototype.titlePath = function () { - return this.parent.titlePath().concat([this.title]); - }; - - /** - * Clear the timeout. - * - * @private - */ - Runnable$3.prototype.clearTimeout = function () { - clearTimeout$1(this.timer); - }; - - /** - * Reset the timeout. - * - * @private - */ - Runnable$3.prototype.resetTimeout = function () { - var self = this; - var ms = this.timeout() || MAX_TIMEOUT; - - this.clearTimeout(); - this.timer = setTimeout$2(function () { - if (self.timeout() === 0) { - return; - } - self.callback(self._timeoutError(ms)); - self.timedOut = true; - }, ms); - }; - - /** - * Set or get a list of whitelisted globals for this test run. - * - * @private - * @param {string[]} globals - */ - Runnable$3.prototype.globals = function (globals) { - if (!arguments.length) { - return this._allowedGlobals; - } - this._allowedGlobals = globals; - }; - - /** - * Run the test and invoke `fn(err)`. - * - * @param {Function} fn - * @private - */ - Runnable$3.prototype.run = function (fn) { - var self = this; - var start = new Date$3(); - var ctx = this.ctx; - var finished; - var errorWasHandled = false; - - if (this.isPending()) return fn(); - - // Sometimes the ctx exists, but it is not runnable - if (ctx && ctx.runnable) { - ctx.runnable(this); - } - - // called multiple times - function multiple(err) { - if (errorWasHandled) { - return; - } - errorWasHandled = true; - self.emit("error", createMultipleDoneError(self, err)); - } - - // finished - function done(err) { - var ms = self.timeout(); - if (self.timedOut) { - return; - } - - if (finished) { - return multiple(err); - } - - self.clearTimeout(); - self.duration = new Date$3() - start; - finished = true; - if (!err && self.duration > ms && ms > 0) { - err = self._timeoutError(ms); - } - fn(err); - } - - // for .resetTimeout() and Runner#uncaught() - this.callback = done; - - if (this.fn && typeof this.fn.call !== "function") { - done( - new TypeError( - "A runnable must be passed a function as its second argument.", - ), - ); - return; - } - - // explicit async with `done` argument - if (this.async) { - this.resetTimeout(); - - // allows skip() to be used in an explicit async context - this.skip = function asyncSkip() { - this.pending = true; - done(); - // halt execution, the uncaught handler will ignore the failure. - throw new Pending$1("async skip; aborting execution"); - }; - - try { - callFnAsync(this.fn); - } catch (err) { - // handles async runnables which actually run synchronously - errorWasHandled = true; - if (err instanceof Pending$1) { - return; // done() is already called in this.skip() - } else if (this.allowUncaught) { - throw err; - } - done(Runnable$3.toValueOrError(err)); - } - return; - } - - // sync or promise-returning - try { - callFn(this.fn); - } catch (err) { - errorWasHandled = true; - if (err instanceof Pending$1) { - return done(); - } else if (this.allowUncaught) { - throw err; - } - done(Runnable$3.toValueOrError(err)); - } - - function callFn(fn) { - var result = fn.call(ctx); - if (result && typeof result.then === "function") { - self.resetTimeout(); - result.then( - function () { - done(); - // Return null so libraries like bluebird do not warn about - // subsequently constructed Promises. - return null; - }, - function (reason) { - done(reason || new Error("Promise rejected with no or falsy reason")); - }, - ); - } else { - if (self.asyncOnly) { - return done( - new Error( - "--async-only option in use without declaring `done()` or returning a promise", - ), - ); - } - - done(); - } - } - - function callFnAsync(fn) { - var result = fn.call(ctx, function (err) { - if (err instanceof Error || toString.call(err) === "[object Error]") { - return done(err); - } - if (err) { - if (Object.prototype.toString.call(err) === "[object Object]") { - return done( - new Error("done() invoked with non-Error: " + JSON.stringify(err)), - ); - } - return done(new Error("done() invoked with non-Error: " + err)); - } - if (result && utils$2.isPromise(result)) { - return done( - new Error( - "Resolution method is overspecified. Specify a callback *or* return a Promise; not both.", - ), - ); - } + // The final "%c" is somewhat tricky, because there could be other + // arguments passed either before or after the %c, so we need to + // figure out the correct index to insert the CSS into + let index = 0; + let lastC = 0; + args[0].replace(/%[a-zA-Z%]/g, match => { + if (match === '%%') { + return; + } + index++; + if (match === '%c') { + // We only are interested in the *last* %c + // (the user may have provided their own) + lastC = index; + } + }); - done(); - }); - } - }; + args.splice(lastC, 0, c); + } - /** - * Instantiates a "timeout" error - * - * @param {number} ms - Timeout (in milliseconds) - * @returns {Error} a "timeout" error - * @private - */ - Runnable$3.prototype._timeoutError = function (ms) { - let msg = `Timeout of ${ms}ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.`; - if (this.file) { - msg += " (" + this.file + ")"; - } - return createTimeoutError(msg, ms, this.file); - }; + /** + * Invokes `console.debug()` when available. + * No-op when `console.debug` is not a "function". + * If `console.debug` is not available, falls back + * to `console.log`. + * + * @api public + */ + exports.log = console.debug || console.log || (() => {}); + + /** + * Save `namespaces`. + * + * @param {String} namespaces + * @api private + */ + function save(namespaces) { + try { + if (namespaces) { + exports.storage.setItem('debug', namespaces); + } else { + exports.storage.removeItem('debug'); + } + } catch (error) { + // Swallow + // XXX (@Qix-) should we be logging these? + } + } - var constants$3 = utils$2.defineConstants( - /** - * {@link Runnable}-related constants. - * @public - * @memberof Runnable - * @readonly - * @static - * @alias constants - * @enum {string} - */ - { - /** - * Value of `state` prop when a `Runnable` has failed - */ - STATE_FAILED: "failed", - /** - * Value of `state` prop when a `Runnable` has passed - */ - STATE_PASSED: "passed", - /** - * Value of `state` prop when a `Runnable` has been skipped by user - */ - STATE_PENDING: "pending", - }, - ); + /** + * Load `namespaces`. + * + * @return {String} returns the previously persisted debug modes + * @api private + */ + function load() { + let r; + try { + r = exports.storage.getItem('debug') || exports.storage.getItem('DEBUG') ; + } catch (error) { + // Swallow + // XXX (@Qix-) should we be logging these? + } - /** - * Given `value`, return identity if truthy, otherwise create an "invalid exception" error and return that. - * @param {*} [value] - Value to return, if present - * @returns {*|Error} `value`, otherwise an `Error` - * @private - */ - Runnable$3.toValueOrError = function (value) { - return ( - value || - createInvalidExceptionError$1( - "Runnable failed with falsy or undefined exception. Please throw an Error instead.", - value, - ) - ); - }; + // If debug isn't set in LS, and we're in Electron, try to load $DEBUG + if (!r && typeof browser$1$1 !== 'undefined' && 'env' in browser$1$1) { + r = browser$1$1.env.DEBUG; + } - Runnable$3.constants = constants$3; + return r; + } - var suite = {exports: {}}; + /** + * Localstorage attempts to return the localstorage. + * + * This is necessary because safari throws + * when a user disables cookies/localstorage + * and you attempt to access it. + * + * @return {LocalStorage} + * @api private + */ + + function localstorage() { + try { + // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context + // The Browser also has localStorage in the global context. + return localStorage; + } catch (error) { + // Swallow + // XXX (@Qix-) should we be logging these? + } + } - var Runnable$2 = runnable; - const { inherits, constants: constants$2 } = utils$3; - const { MOCHA_ID_PROP_NAME: MOCHA_ID_PROP_NAME$1 } = constants$2; + module.exports = requireCommon()(exports); - /** - * Expose `Hook`. - */ + const {formatters} = module.exports; - var hook = Hook; + /** + * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. + */ - /** - * Initialize a new `Hook` with the given `title` and callback `fn` - * - * @class - * @extends Runnable - * @param {String} title - * @param {Function} fn - */ - function Hook(title, fn) { - Runnable$2.call(this, title, fn); - this.type = "hook"; + formatters.j = function (v) { + try { + return JSON.stringify(v); + } catch (error) { + return '[UnexpectedJSONParseError]: ' + error.message; + } + }; + } (browser, browser.exports)); + return browser.exports; } - /** - * Inherit from `Runnable.prototype`. - */ - inherits(Hook, Runnable$2); - - /** - * Resets the state for a next run. - */ - Hook.prototype.reset = function () { - Runnable$2.prototype.reset.call(this); - delete this._error; - }; + var browserExports = requireBrowser(); + var debugModule = /*@__PURE__*/getDefaultExportFromCjs(browserExports); /** - * Get or set the test `err`. - * - * @memberof Hook + * When Mocha throws exceptions (or rejects `Promise`s), it attempts to assign a `code` property to the `Error` object, for easier handling. These are the potential values of `code`. * @public - * @param {Error} err - * @return {Error} + * @namespace + * @memberof module:lib/errors */ - Hook.prototype.error = function (err) { - if (!arguments.length) { - err = this._error; - this._error = null; - return err; - } + const constants$g = { + /** + * An unrecoverable error. + * @constant + * @default + */ + FATAL: "ERR_MOCHA_FATAL", - this._error = err; - }; + /** + * The type of an argument to a function call is invalid + * @constant + * @default + */ + INVALID_ARG_TYPE: "ERR_MOCHA_INVALID_ARG_TYPE", - /** - * Returns an object suitable for IPC. - * Functions are represented by keys beginning with `$$`. - * @private - * @returns {Object} - */ - Hook.prototype.serialize = function serialize() { - return { - $$currentRetry: this.currentRetry(), - $$fullTitle: this.fullTitle(), - $$isPending: Boolean(this.isPending()), - $$titlePath: this.titlePath(), - ctx: - this.ctx && this.ctx.currentTest - ? { - currentTest: { - title: this.ctx.currentTest.title, - [MOCHA_ID_PROP_NAME$1]: this.ctx.currentTest.id, - }, - } - : {}, - duration: this.duration, - file: this.file, - parent: { - $$fullTitle: this.parent.fullTitle(), - [MOCHA_ID_PROP_NAME$1]: this.parent.id, - }, - state: this.state, - title: this.title, - type: this.type, - [MOCHA_ID_PROP_NAME$1]: this.id, - }; - }; + /** + * The value of an argument to a function call is invalid + * @constant + * @default + */ + INVALID_ARG_VALUE: "ERR_MOCHA_INVALID_ARG_VALUE", - (function (module, exports) { + /** + * Something was thrown, but it wasn't an `Error` + * @constant + * @default + */ + INVALID_EXCEPTION: "ERR_MOCHA_INVALID_EXCEPTION", - /** - * @typedef {import('./test.js')} Test - */ + /** + * An interface (e.g., `Mocha.interfaces`) is unknown or invalid + * @constant + * @default + */ + INVALID_INTERFACE: "ERR_MOCHA_INVALID_INTERFACE", - /** - * Module dependencies. - * @private - */ - const { EventEmitter } = require$$0; - const Hook = hook; - var { - assignNewMochaID, - clamp, - constants: utilsConstants, - defineConstants, - getMochaID, - inherits, - isString, - } = utils$3; - const debug = browser.exports("mocha:suite"); - const milliseconds = ms$1; - const errors = errors$2; + /** + * A reporter (.e.g, `Mocha.reporters`) is unknown or invalid + * @constant + * @default + */ + INVALID_REPORTER: "ERR_MOCHA_INVALID_REPORTER", - const { MOCHA_ID_PROP_NAME } = utilsConstants; + /** + * `done()` was called twice in a `Test` or `Hook` callback + * @constant + * @default + */ + MULTIPLE_DONE: "ERR_MOCHA_MULTIPLE_DONE", - /** - * Expose `Suite`. - */ + /** + * No files matched the pattern provided by the user + * @constant + * @default + */ + NO_FILES_MATCH_PATTERN: "ERR_MOCHA_NO_FILES_MATCH_PATTERN", - module.exports = Suite; + /** + * Known, but unsupported behavior of some kind + * @constant + * @default + */ + UNSUPPORTED: "ERR_MOCHA_UNSUPPORTED", - /** - * Create a new `Suite` with the given `title` and parent `Suite`. - * - * @public - * @param {Suite} parent - Parent suite (required!) - * @param {string} title - Title - * @return {Suite} - */ - Suite.create = function (parent, title) { - var suite = new Suite(title, parent.ctx); - suite.parent = parent; - title = suite.fullTitle(); - parent.addSuite(suite); - return suite; - }; + /** + * Invalid state transition occurring in `Mocha` instance + * @constant + * @default + */ + INSTANCE_ALREADY_RUNNING: "ERR_MOCHA_INSTANCE_ALREADY_RUNNING", - /** - * Constructs a new `Suite` instance with the given `title`, `ctx`, and `isRoot`. - * - * @public - * @class - * @extends EventEmitter - * @see {@link https://nodejs.org/api/events.html#events_class_eventemitter|EventEmitter} - * @param {string} title - Suite title. - * @param {Context} parentContext - Parent context instance. - * @param {boolean} [isRoot=false] - Whether this is the root suite. - */ - function Suite(title, parentContext, isRoot) { - if (!isString(title)) { - throw errors.createInvalidArgumentTypeError( - 'Suite argument "title" must be a string. Received type "' + - typeof title + - '"', - "title", - "string", - ); - } - this.title = title; - function Context() {} - Context.prototype = parentContext; - this.ctx = new Context(); - this.suites = []; - this.tests = []; - this.root = isRoot === true; - this.pending = false; - this._retries = -1; - this._beforeEach = []; - this._beforeAll = []; - this._afterEach = []; - this._afterAll = []; - this._timeout = 2000; - this._slow = 75; - this._bail = false; - this._onlyTests = []; - this._onlySuites = []; - assignNewMochaID(this); - - Object.defineProperty(this, "id", { - get() { - return getMochaID(this); - }, - }); + /** + * Invalid state transition occurring in `Mocha` instance + * @constant + * @default + */ + INSTANCE_ALREADY_DISPOSED: "ERR_MOCHA_INSTANCE_ALREADY_DISPOSED", - this.reset(); - } + /** + * Use of `only()` w/ `--forbid-only` results in this error. + * @constant + * @default + */ + FORBIDDEN_EXCLUSIVITY: "ERR_MOCHA_FORBIDDEN_EXCLUSIVITY", - /** - * Inherit from `EventEmitter.prototype`. - */ - inherits(Suite, EventEmitter); + /** + * To be thrown when a user-defined plugin implementation (e.g., `mochaHooks`) is invalid + * @constant + * @default + */ + INVALID_PLUGIN_IMPLEMENTATION: "ERR_MOCHA_INVALID_PLUGIN_IMPLEMENTATION", - /** - * Resets the state initially or for a next run. - */ - Suite.prototype.reset = function () { - this.delayed = false; - function doReset(thingToReset) { - thingToReset.reset(); - } - this.suites.forEach(doReset); - this.tests.forEach(doReset); - this._beforeEach.forEach(doReset); - this._afterEach.forEach(doReset); - this._beforeAll.forEach(doReset); - this._afterAll.forEach(doReset); - }; + /** + * To be thrown when a builtin or third-party plugin definition (the _definition_ of `mochaHooks`) is invalid + * @constant + * @default + */ + INVALID_PLUGIN_DEFINITION: "ERR_MOCHA_INVALID_PLUGIN_DEFINITION", - /** - * Return a clone of this `Suite`. - * - * @private - * @return {Suite} - */ - Suite.prototype.clone = function () { - var suite = new Suite(this.title); - debug("clone"); - suite.ctx = this.ctx; - suite.root = this.root; - suite.timeout(this.timeout()); - suite.retries(this.retries()); - suite.slow(this.slow()); - suite.bail(this.bail()); - return suite; + /** + * When a runnable exceeds its allowed run time. + * @constant + * @default + */ + TIMEOUT: "ERR_MOCHA_TIMEOUT", + + /** + * Input file is not able to be parsed + * @constant + * @default + */ + UNPARSABLE_FILE: "ERR_MOCHA_UNPARSABLE_FILE", }; + var errorConstants = /*#__PURE__*/Object.freeze({ + __proto__: null, + constants: constants$g + }); + /** - * Set or get timeout `ms` or short-hand such as "2s". - * - * @private - * @todo Do not attempt to set value if `ms` is undefined - * @param {number|string} ms - * @return {Suite|number} for chaining + * @typedef {import('./mocha.cjs')} Mocha + * @typedef {import('./runnable.js')} Runnable + * @typedef {import('./types.d.ts').MochaTimeoutError} MochaTimeoutError + * @typedef {import('./types.d.ts').PluginDefinition} PluginDefinition */ - Suite.prototype.timeout = function (ms) { - if (!arguments.length) { - return this._timeout; - } - if (typeof ms === "string") { - ms = milliseconds(ms); - } - // Clamp to range - var INT_MAX = Math.pow(2, 31) - 1; - var range = [0, INT_MAX]; - ms = clamp(ms, range); - - debug("timeout %d", ms); - this._timeout = parseInt(ms, 10); - - // Allow overriding inner/nested suites - // See and test-cases with chain-called timeout argument. - // https://github.com/mochajs/mocha/issues/5422 - for (const t of this.tests) { - t.timeout(this._timeout); - } - for (const s of this.suites) { - s.timeout(this._timeout); - } - return this; - }; /** - * Set or get number of times to retry a failed test. - * - * @private - * @param {number|string} n - * @return {Suite|number} for chaining + * Contains error codes and factory functions to create throwable error objects + * @module */ - Suite.prototype.retries = function (n) { - if (!arguments.length) { - return this._retries; - } - debug("retries %d", n); - this._retries = parseInt(n, 10) || 0; - return this; - }; /** - * Set or get slow `ms` or short-hand such as "2s". - * + * A set containing all string values of all Mocha error constants, for use by {@link isMochaError}. * @private - * @param {number|string} ms - * @return {Suite|number} for chaining */ - Suite.prototype.slow = function (ms) { - if (!arguments.length) { - return this._slow; - } - if (typeof ms === "string") { - ms = milliseconds(ms); - } - debug("slow %d", ms); - this._slow = ms; - return this; - }; + const MOCHA_ERRORS = new Set(Object.values(constants$g)); /** - * Set or get whether to bail after first error. + * Creates an error object to be thrown when no files to be tested could be found using specified pattern. * - * @private - * @param {boolean} bail - * @return {Suite|number} for chaining + * @public + * @static + * @param {string} message - Error message to be displayed. + * @param {string} pattern - User-specified argument value. + * @returns {Error} instance detailing the error condition */ - Suite.prototype.bail = function (bail) { - if (!arguments.length) { - return this._bail; - } - debug("bail %s", bail); - this._bail = bail; - return this; - }; + function createNoFilesMatchPatternError(message, pattern) { + var err = new Error(message); + err.code = constants$g.NO_FILES_MATCH_PATTERN; + err.pattern = pattern; + return err; + } /** - * Check if this suite or its parent suite is marked as pending. + * Creates an error object to be thrown when the reporter specified in the options was not found. * - * @private - */ - Suite.prototype.isPending = function () { - return this.pending || (this.parent && this.parent.isPending()); - }; - - /** - * Generic hook-creator. - * @private - * @param {string} title - Title of hook - * @param {Function} fn - Hook callback - * @returns {Hook} A new hook + * @public + * @param {string} message - Error message to be displayed. + * @param {string} reporter - User-specified reporter value. + * @returns {Error} instance detailing the error condition */ - Suite.prototype._createHook = function (title, fn) { - var hook = new Hook(title, fn); - hook.parent = this; - hook.timeout(this.timeout()); - hook.retries(this.retries()); - hook.slow(this.slow()); - hook.ctx = this.ctx; - hook.file = this.file; - return hook; - }; + function createInvalidReporterError(message, reporter) { + var err = new TypeError(message); + err.code = constants$g.INVALID_REPORTER; + err.reporter = reporter; + return err; + } /** - * Run `fn(test[, done])` before running tests. + * Creates an error object to be thrown when the interface specified in the options was not found. * - * @private - * @param {string} title - * @param {Function} fn - * @return {Suite} for chaining + * @public + * @static + * @param {string} message - Error message to be displayed. + * @param {string} ui - User-specified interface value. + * @returns {Error} instance detailing the error condition */ - Suite.prototype.beforeAll = function (title, fn) { - if (this.isPending()) { - return this; - } - if (typeof title === "function") { - fn = title; - title = fn.name; - } - title = '"before all" hook' + (title ? ": " + title : ""); - - var hook = this._createHook(title, fn); - this._beforeAll.push(hook); - this.emit(constants.EVENT_SUITE_ADD_HOOK_BEFORE_ALL, hook); - return hook; - }; + function createInvalidInterfaceError(message, ui) { + var err = new Error(message); + err.code = constants$g.INVALID_INTERFACE; + err.interface = ui; + return err; + } /** - * Run `fn(test[, done])` after running tests. + * Creates an error object to be thrown when a behavior, option, or parameter is unsupported. * - * @private - * @param {string} title - * @param {Function} fn - * @return {Suite} for chaining + * @public + * @static + * @param {string} message - Error message to be displayed. + * @returns {Error} instance detailing the error condition */ - Suite.prototype.afterAll = function (title, fn) { - if (this.isPending()) { - return this; - } - if (typeof title === "function") { - fn = title; - title = fn.name; - } - title = '"after all" hook' + (title ? ": " + title : ""); - - var hook = this._createHook(title, fn); - this._afterAll.push(hook); - this.emit(constants.EVENT_SUITE_ADD_HOOK_AFTER_ALL, hook); - return hook; - }; + function createUnsupportedError$2(message) { + var err = new Error(message); + err.code = constants$g.UNSUPPORTED; + return err; + } /** - * Run `fn(test[, done])` before each test case. + * Creates an error object to be thrown when an argument is missing. * - * @private - * @param {string} title - * @param {Function} fn - * @return {Suite} for chaining + * @public + * @static + * @param {string} message - Error message to be displayed. + * @param {string} argument - Argument name. + * @param {string} expected - Expected argument datatype. + * @returns {Error} instance detailing the error condition */ - Suite.prototype.beforeEach = function (title, fn) { - if (this.isPending()) { - return this; - } - if (typeof title === "function") { - fn = title; - title = fn.name; - } - title = '"before each" hook' + (title ? ": " + title : ""); - - var hook = this._createHook(title, fn); - this._beforeEach.push(hook); - this.emit(constants.EVENT_SUITE_ADD_HOOK_BEFORE_EACH, hook); - return hook; - }; + function createMissingArgumentError(message, argument, expected) { + return createInvalidArgumentTypeError(message, argument, expected); + } /** - * Run `fn(test[, done])` after each test case. + * Creates an error object to be thrown when an argument did not use the supported type * - * @private - * @param {string} title - * @param {Function} fn - * @return {Suite} for chaining + * @public + * @static + * @param {string} message - Error message to be displayed. + * @param {string} argument - Argument name. + * @param {string} expected - Expected argument datatype. + * @returns {Error} instance detailing the error condition */ - Suite.prototype.afterEach = function (title, fn) { - if (this.isPending()) { - return this; - } - if (typeof title === "function") { - fn = title; - title = fn.name; - } - title = '"after each" hook' + (title ? ": " + title : ""); - - var hook = this._createHook(title, fn); - this._afterEach.push(hook); - this.emit(constants.EVENT_SUITE_ADD_HOOK_AFTER_EACH, hook); - return hook; - }; + function createInvalidArgumentTypeError(message, argument, expected) { + var err = new TypeError(message); + err.code = constants$g.INVALID_ARG_TYPE; + err.argument = argument; + err.expected = expected; + err.actual = typeof argument; + return err; + } /** - * Add a test `suite`. + * Creates an error object to be thrown when an argument did not use the supported value * - * @private - * @param {Suite} suite - * @return {Suite} for chaining + * @public + * @static + * @param {string} message - Error message to be displayed. + * @param {string} argument - Argument name. + * @param {string} value - Argument value. + * @param {string} [reason] - Why value is invalid. + * @returns {Error} instance detailing the error condition */ - Suite.prototype.addSuite = function (suite) { - suite.parent = this; - suite.root = false; - suite.timeout(this.timeout()); - suite.retries(this.retries()); - suite.slow(this.slow()); - suite.bail(this.bail()); - this.suites.push(suite); - this.emit(constants.EVENT_SUITE_ADD_SUITE, suite); - return this; - }; + function createInvalidArgumentValueError(message, argument, value, reason) { + var err = new TypeError(message); + err.code = constants$g.INVALID_ARG_VALUE; + err.argument = argument; + err.value = value; + err.reason = typeof reason !== "undefined" ? reason : "is invalid"; + return err; + } /** - * Add a `test` to this suite. + * Creates an error object to be thrown when an exception was caught, but the `Error` is falsy or undefined. * - * @private - * @param {Test} test - * @return {Suite} for chaining + * @public + * @static + * @param {string} message - Error message to be displayed. + * @returns {Error} instance detailing the error condition */ - Suite.prototype.addTest = function (test) { - test.parent = this; - test.timeout(this.timeout()); - test.retries(this.retries()); - test.slow(this.slow()); - test.ctx = this.ctx; - this.tests.push(test); - this.emit(constants.EVENT_SUITE_ADD_TEST, test); - return this; - }; + function createInvalidExceptionError(message, value) { + var err = new Error(message); + err.code = constants$g.INVALID_EXCEPTION; + err.valueType = typeof value; + err.value = value; + return err; + } /** - * Return the full title generated by recursively concatenating the parent's - * full title. + * Creates an error object to be thrown when an unrecoverable error occurs. * - * @memberof Suite * @public - * @return {string} + * @static + * @param {string} message - Error message to be displayed. + * @returns {Error} instance detailing the error condition */ - Suite.prototype.fullTitle = function () { - return this.titlePath().join(" "); - }; + function createFatalError(message, value) { + var err = new Error(message); + err.code = constants$g.FATAL; + err.valueType = typeof value; + err.value = value; + return err; + } /** - * Return the title path generated by recursively concatenating the parent's - * title path. - * - * @memberof Suite + * Dynamically creates a plugin-type-specific error based on plugin type + * @param {string} message - Error message + * @param {"reporter"|"ui"} pluginType - Plugin type. Future: expand as needed + * @param {string} [pluginId] - Name/path of plugin, if any + * @throws When `pluginType` is not known * @public - * @return {string[]} + * @static + * @returns {Error} */ - Suite.prototype.titlePath = function () { - var result = []; - if (this.parent) { - result = result.concat(this.parent.titlePath()); - } - if (!this.root) { - result.push(this.title); + function createInvalidLegacyPluginError(message, pluginType, pluginId) { + switch (pluginType) { + case "reporter": + return createInvalidReporterError(message, pluginId); + case "ui": + return createInvalidInterfaceError(message, pluginId); + default: + throw new Error('unknown pluginType "' + pluginType + '"'); } - return result; - }; + } /** - * Return the total number of tests. - * - * @memberof Suite + * Creates an error object to be thrown when a mocha object's `run` method is executed while it is already disposed. + * @param {string} message The error message to be displayed. + * @param {boolean} cleanReferencesAfterRun the value of `cleanReferencesAfterRun` + * @param {Mocha} instance the mocha instance that throw this error + * @static + */ + function createMochaInstanceAlreadyDisposedError( + message, + cleanReferencesAfterRun, + instance, + ) { + var err = new Error(message); + err.code = constants$g.INSTANCE_ALREADY_DISPOSED; + err.cleanReferencesAfterRun = cleanReferencesAfterRun; + err.instance = instance; + return err; + } + + /** + * Creates an error object to be thrown when a mocha object's `run` method is called while a test run is in progress. + * @param {string} message The error message to be displayed. + * @static * @public - * @return {number} */ - Suite.prototype.total = function () { - return ( - this.suites.reduce(function (sum, suite) { - return sum + suite.total(); - }, 0) + this.tests.length - ); - }; + function createMochaInstanceAlreadyRunningError(message, instance) { + var err = new Error(message); + err.code = constants$g.INSTANCE_ALREADY_RUNNING; + err.instance = instance; + return err; + } /** - * Iterates through each suite recursively to find all tests. Applies a - * function in the format `fn(test)`. + * Creates an error object to be thrown when done() is called multiple times in a test * - * @private - * @param {Function} fn - * @return {Suite} + * @public + * @param {Runnable} runnable - Original runnable + * @param {Error} [originalErr] - Original error, if any + * @returns {Error} instance detailing the error condition + * @static */ - Suite.prototype.eachTest = function (fn) { - this.tests.forEach(fn); - this.suites.forEach(function (suite) { - suite.eachTest(fn); - }); - return this; - }; + function createMultipleDoneError(runnable, originalErr) { + var title; + try { + title = format("<%s>", runnable.fullTitle()); + if (runnable.parent.root) { + title += " (of root suite)"; + } + } catch { + title = format("<%s> (of unknown suite)", runnable.title); + } + var message = format( + "done() called multiple times in %s %s", + runnable.type ? runnable.type : "unknown runnable", + title, + ); + if (runnable.file) { + message += format(" of file %s", runnable.file); + } + if (originalErr) { + message += format("; in addition, done() received error: %s", originalErr); + } + + var err = new Error(message); + err.code = constants$g.MULTIPLE_DONE; + err.valueType = typeof originalErr; + err.value = originalErr; + return err; + } /** - * This will run the root suite if we happen to be running in delayed mode. - * @private + * Creates an error object to be thrown when `.only()` is used with + * `--forbid-only`. + * @static + * @public + * @param {Mocha} mocha - Mocha instance + * @returns {Error} Error with code {@link constants.FORBIDDEN_EXCLUSIVITY} */ - Suite.prototype.run = function run() { - if (this.root) { - this.emit(constants.EVENT_ROOT_SUITE_RUN); + function createForbiddenExclusivityError(mocha) { + var message; + if (mocha.isWorker) { + message = "`.only` is not supported in parallel mode"; + } else { + message = "`.only` forbidden by --forbid-only"; + if (utilsExports.isCI()) { + message += " (default in CI, add `--no-forbid-only` to allow `.only`)"; + } } - }; + + var err = new Error(message); + err.code = constants$g.FORBIDDEN_EXCLUSIVITY; + return err; + } /** - * Determines whether a suite has an `only` test or suite as a descendant. - * - * @private - * @returns {Boolean} + * Creates an error object to be thrown when a plugin definition is invalid + * @static + * @param {string} msg - Error message + * @param {PluginDefinition} [pluginDef] - Problematic plugin definition + * @public + * @returns {Error} Error with code {@link constants.INVALID_PLUGIN_DEFINITION} */ - Suite.prototype.hasOnly = function hasOnly() { - return ( - this._onlyTests.length > 0 || - this._onlySuites.length > 0 || - this.suites.some(function (suite) { - return suite.hasOnly(); - }) - ); - }; + function createInvalidPluginDefinitionError(msg, pluginDef) { + const err = new Error(msg); + err.code = constants$g.INVALID_PLUGIN_DEFINITION; + err.pluginDef = pluginDef; + return err; + } /** - * Filter suites based on `isOnly` logic. - * - * @private - * @returns {Boolean} + * Creates an error object to be thrown when a plugin implementation (user code) is invalid + * @static + * @param {string} msg - Error message + * @param {Object} [opts] - Plugin definition and user-supplied implementation + * @param {PluginDefinition} [opts.pluginDef] - Plugin Definition + * @param {*} [opts.pluginImpl] - Plugin Implementation (user-supplied) + * @public + * @returns {Error} Error with code {@link constants.INVALID_PLUGIN_DEFINITION} */ - Suite.prototype.filterOnly = function filterOnly() { - if (this._onlyTests.length) { - // If the suite contains `only` tests, run those and ignore any nested suites. - this.tests = this._onlyTests; - this.suites = []; - } else { - // Otherwise, do not run any of the tests in this suite. - this.tests = []; - this._onlySuites.forEach(function (onlySuite) { - // If there are other `only` tests/suites nested in the current `only` suite, then filter that `only` suite. - // Otherwise, all of the tests on this `only` suite should be run, so don't filter it. - if (onlySuite.hasOnly()) { - onlySuite.filterOnly(); - } - }); - // Run the `only` suites, as well as any other suites that have `only` tests/suites as descendants. - var onlySuites = this._onlySuites; - this.suites = this.suites.filter(function (childSuite) { - return onlySuites.indexOf(childSuite) !== -1 || childSuite.filterOnly(); - }); - } - // Keep the suite only if there is something to run - return this.tests.length > 0 || this.suites.length > 0; - }; + function createInvalidPluginImplementationError( + msg, + { pluginDef, pluginImpl } = {}, + ) { + const err = new Error(msg); + err.code = constants$g.INVALID_PLUGIN_IMPLEMENTATION; + err.pluginDef = pluginDef; + err.pluginImpl = pluginImpl; + return err; + } /** - * Adds a suite to the list of subsuites marked `only`. - * - * @private - * @param {Suite} suite + * Creates an error object to be thrown when a runnable exceeds its allowed run time. + * @static + * @param {string} msg - Error message + * @param {number} [timeout] - Timeout in ms + * @param {string} [file] - File, if given + * @returns {MochaTimeoutError} */ - Suite.prototype.appendOnlySuite = function (suite) { - this._onlySuites.push(suite); - }; + function createTimeoutError(msg, timeout, file) { + const err = new Error(msg); + err.code = constants$g.TIMEOUT; + err.timeout = timeout; + err.file = file; + return err; + } /** - * Marks a suite to be `only`. - * - * @private + * Creates an error object to be thrown when file is unparsable + * @public + * @static + * @param {string} message - Error message to be displayed. + * @returns {Error} Error with code {@link constants.UNPARSABLE_FILE} */ - Suite.prototype.markOnly = function () { - this.parent && this.parent.appendOnlySuite(this); - }; + function createUnparsableFileError(message) { + var err = new Error(message); + err.code = constants$g.UNPARSABLE_FILE; + return err; + } /** - * Adds a test to the list of tests marked `only`. - * - * @private - * @param {Test} test + * Returns `true` if an error came out of Mocha. + * _Can suffer from false negatives, but not false positives._ + * @static + * @public + * @param {*} err - Error, or anything + * @returns {boolean} */ - Suite.prototype.appendOnlyTest = function (test) { - this._onlyTests.push(test); - }; + const isMochaError = (err) => + Boolean(err && typeof err === "object" && MOCHA_ERRORS.has(err.code)); - /** - * Returns the array of hooks by hook name; see `HOOK_TYPE_*` constants. - * @private - */ - Suite.prototype.getHooks = function getHooks(name) { - return this["_" + name]; - }; + var errors = /*#__PURE__*/Object.freeze({ + __proto__: null, + createFatalError: createFatalError, + createForbiddenExclusivityError: createForbiddenExclusivityError, + createInvalidArgumentTypeError: createInvalidArgumentTypeError, + createInvalidArgumentValueError: createInvalidArgumentValueError, + createInvalidExceptionError: createInvalidExceptionError, + createInvalidInterfaceError: createInvalidInterfaceError, + createInvalidLegacyPluginError: createInvalidLegacyPluginError, + createInvalidPluginDefinitionError: createInvalidPluginDefinitionError, + createInvalidPluginImplementationError: createInvalidPluginImplementationError, + createInvalidReporterError: createInvalidReporterError, + createMissingArgumentError: createMissingArgumentError, + createMochaInstanceAlreadyDisposedError: createMochaInstanceAlreadyDisposedError, + createMochaInstanceAlreadyRunningError: createMochaInstanceAlreadyRunningError, + createMultipleDoneError: createMultipleDoneError, + createNoFilesMatchPatternError: createNoFilesMatchPatternError, + createTimeoutError: createTimeoutError, + createUnparsableFileError: createUnparsableFileError, + createUnsupportedError: createUnsupportedError$2, + isMochaError: isMochaError + }); - /** - * cleans all references from this suite and all child suites. - */ - Suite.prototype.dispose = function () { - this.suites.forEach(function (suite) { - suite.dispose(); - }); - this.cleanReferences(); - }; + const debug$1 = debugModule("mocha:runnable"); /** - * Cleans up the references to all the deferred functions - * (before/after/beforeEach/afterEach) and tests of a Suite. - * These must be deleted otherwise a memory leak can happen, - * as those functions may reference variables from closures, - * thus those variables can never be garbage collected as long - * as the deferred functions exist. - * + * Save timer references to avoid Sinon interfering (see GH-237). * @private */ - Suite.prototype.cleanReferences = function cleanReferences() { - function cleanArrReferences(arr) { - for (var i = 0; i < arr.length; i++) { - delete arr[i].fn; - } - } + var Date$4 = global$1.Date; + var setTimeout$2 = global$1.setTimeout; + var clearTimeout$1 = global$1.clearTimeout; + var toString = Object.prototype.toString; - if (Array.isArray(this._beforeAll)) { - cleanArrReferences(this._beforeAll); - } + var MAX_TIMEOUT = Math.pow(2, 31) - 1; - if (Array.isArray(this._beforeEach)) { - cleanArrReferences(this._beforeEach); + class Runnable extends EventEmitter { + // "Additional properties" doc comment added for hosted docs (mochajs.org/api) + /** + * Initialize a new `Runnable` with the given `title` and callback `fn`. + * Additional properties, like `getFullTitle()` and `slow()`, can be viewed in the `Runnable` source. + * + * @extends external:EventEmitter + * @public + * @param {String} title + * @param {Function} fn + */ + constructor(title, fn) { + super(title, fn); + this.title = title; + this.fn = fn; + this.body = (fn || "").toString(); + this.async = fn && fn.length; + this.sync = !this.async; + this._timeout = 2000; + this._slow = 75; + this._retries = -1; + utils.assignNewMochaID(this); + Object.defineProperty(this, "id", { + get() { + return utils.getMochaID(this); + }, + }); + this.reset(); } - if (Array.isArray(this._afterAll)) { - cleanArrReferences(this._afterAll); + /** + * Resets the state initially or for a next run. + */ + reset() { + this.timedOut = false; + this._currentRetry = 0; + this.pending = false; + delete this.state; + delete this.err; } - if (Array.isArray(this._afterEach)) { - cleanArrReferences(this._afterEach); - } + /** + * Get current timeout value in msecs. + * + * @private + * @returns {number} current timeout threshold value + */ + /** + * @summary + * Set timeout threshold value (msecs). + * + * @description + * A string argument can use shorthand (e.g., "2s") and will be converted. + * The value will be clamped to range [0, 2^31-1]. + * If clamped value matches either range endpoint, timeouts will be disabled. + * + * @private + * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setTimeout#Maximum_delay_value} + * @param {number|string} ms - Timeout threshold value. + * @returns {Runnable} this + * @chainable + */ + timeout(ms$1) { + if (!arguments.length) { + return this._timeout; + } + if (typeof ms$1 === "string") { + ms$1 = ms(ms$1); + } + + // Clamp to range + var range = [0, MAX_TIMEOUT]; + ms$1 = utils.clamp(ms$1, range); + + // see #1652 for reasoning + if (ms$1 === range[0] || ms$1 === range[1]) { + this._timeout = 0; + } else { + this._timeout = ms$1; + } + debug$1("timeout %d", this._timeout); - for (var i = 0; i < this.tests.length; i++) { - delete this.tests[i].fn; + if (this.timer) { + this.resetTimeout(); + } + return this; } - }; - /** - * Returns an object suitable for IPC. - * Functions are represented by keys beginning with `$$`. - * @private - * @returns {Object} - */ - Suite.prototype.serialize = function serialize() { - return { - _bail: this._bail, - $$fullTitle: this.fullTitle(), - $$isPending: Boolean(this.isPending()), - root: this.root, - title: this.title, - [MOCHA_ID_PROP_NAME]: this.id, - parent: this.parent ? { [MOCHA_ID_PROP_NAME]: this.parent.id } : null, - }; - }; + /** + * Set or get slow `ms`. + * + * @private + * @param {number|string} ms + * @return {Runnable|number} ms or Runnable instance. + */ + slow(ms$1) { + if (!arguments.length || typeof ms$1 === "undefined") { + return this._slow; + } + if (typeof ms$1 === "string") { + ms$1 = ms(ms$1); + } + debug$1("slow %d", ms$1); + this._slow = ms$1; + return this; + } - var constants = defineConstants( /** - * {@link Suite}-related constants. + * Halt and mark as pending. + * + * @memberof Mocha.Runnable * @public - * @memberof Suite - * @alias constants - * @readonly - * @static - * @enum {string} */ - { - /** - * Event emitted after a test file has been loaded. Not emitted in browser. - */ - EVENT_FILE_POST_REQUIRE: "post-require", - /** - * Event emitted before a test file has been loaded. In browser, this is emitted once an interface has been selected. - */ - EVENT_FILE_PRE_REQUIRE: "pre-require", - /** - * Event emitted immediately after a test file has been loaded. Not emitted in browser. - */ - EVENT_FILE_REQUIRE: "require", - /** - * Event emitted when `global.run()` is called (use with `delay` option). - */ - EVENT_ROOT_SUITE_RUN: "run", - - /** - * Namespace for collection of a `Suite`'s "after all" hooks. - */ - HOOK_TYPE_AFTER_ALL: "afterAll", - /** - * Namespace for collection of a `Suite`'s "after each" hooks. - */ - HOOK_TYPE_AFTER_EACH: "afterEach", - /** - * Namespace for collection of a `Suite`'s "before all" hooks. - */ - HOOK_TYPE_BEFORE_ALL: "beforeAll", - /** - * Namespace for collection of a `Suite`'s "before each" hooks. - */ - HOOK_TYPE_BEFORE_EACH: "beforeEach", - - /** - * Emitted after a child `Suite` has been added to a `Suite`. - */ - EVENT_SUITE_ADD_SUITE: "suite", - /** - * Emitted after an "after all" `Hook` has been added to a `Suite`. - */ - EVENT_SUITE_ADD_HOOK_AFTER_ALL: "afterAll", - /** - * Emitted after an "after each" `Hook` has been added to a `Suite`. - */ - EVENT_SUITE_ADD_HOOK_AFTER_EACH: "afterEach", - /** - * Emitted after an "before all" `Hook` has been added to a `Suite`. - */ - EVENT_SUITE_ADD_HOOK_BEFORE_ALL: "beforeAll", - /** - * Emitted after an "before each" `Hook` has been added to a `Suite`. - */ - EVENT_SUITE_ADD_HOOK_BEFORE_EACH: "beforeEach", - /** - * Emitted after a `Test` has been added to a `Suite`. - */ - EVENT_SUITE_ADD_TEST: "test", - }, - ); - - Suite.constants = constants; - }(suite)); - - /** - * @typedef {import('./types.d.ts').RunnerOptions} RunnerOptions - */ + skip() { + this.pending = true; + throw new PendingError("sync skip; aborting execution"); + } - /** - * Module dependencies. - * @private - */ - var EventEmitter = require$$0.EventEmitter; - var Pending = pending; - var utils$1 = utils$3; - var debug = browser.exports("mocha:runner"); - var Runnable$1 = runnable; - var Suite$2 = suite.exports; - var HOOK_TYPE_BEFORE_EACH = Suite$2.constants.HOOK_TYPE_BEFORE_EACH; - var HOOK_TYPE_AFTER_EACH = Suite$2.constants.HOOK_TYPE_AFTER_EACH; - var HOOK_TYPE_AFTER_ALL = Suite$2.constants.HOOK_TYPE_AFTER_ALL; - var HOOK_TYPE_BEFORE_ALL = Suite$2.constants.HOOK_TYPE_BEFORE_ALL; - var EVENT_ROOT_SUITE_RUN = Suite$2.constants.EVENT_ROOT_SUITE_RUN; - var STATE_FAILED = Runnable$1.constants.STATE_FAILED; - var STATE_PASSED = Runnable$1.constants.STATE_PASSED; - var STATE_PENDING = Runnable$1.constants.STATE_PENDING; - var stackFilter = utils$1.stackTraceFilter(); - var stringify = utils$1.stringify; + /** + * Check if this runnable or its parent suite is marked as pending. + * + * @private + */ + isPending() { + return this.pending || (this.parent && this.parent.isPending()); + } - const { - createInvalidExceptionError, - createUnsupportedError: createUnsupportedError$1, - createFatalError, - isMochaError, - } = errors$2; - const { constants: errorConstants } = errorConstants$1; + /** + * Return `true` if this Runnable has failed. + * @return {boolean} + * @private + */ + isFailed() { + return !this.isPending() && this.state === Runnable.constants.STATE_FAILED; + } - /** - * Non-enumerable globals. - * @private - * @readonly - */ - var globals = [ - "setTimeout", - "clearTimeout", - "setInterval", - "clearInterval", - "XMLHttpRequest", - "Date", - "setImmediate", - "clearImmediate", - ]; + /** + * Return `true` if this Runnable has passed. + * @return {boolean} + * @private + */ + isPassed() { + return !this.isPending() && this.state === Runnable.constants.STATE_PASSED; + } - var constants$1 = utils$1.defineConstants( /** - * {@link Runner}-related constants. Used by reporters. Each event emits the corresponding object, unless otherwise indicated. - * @example - * const Mocha = require('mocha'); - * const Base = Mocha.reporters.Base; - * const { - * EVENT_HOOK_BEGIN, - * EVENT_TEST_PASS, - * EVENT_TEST_FAIL, - * EVENT_TEST_END - * } = Mocha.Runner.constants - * - * function MyReporter(runner, options) { - * Base.call(this, runner, options); - * - * runner.on(EVENT_HOOK_BEGIN, function(hook) { - * console.log('hook called: ', hook.title); - * }); - * - * runner.on(EVENT_TEST_PASS, function(test) { - * console.log('pass: %s', test.fullTitle()); - * }); + * Set or get number of retries. * - * runner.on(EVENT_TEST_FAIL, function(test, err) { - * console.log('fail: %s -- error: %s', test.fullTitle(), err.message); - * }); - * - * runner.on(EVENT_TEST_END, function() { - * console.log('end: %d/%d', runner.stats.passes, runner.stats.tests); - * }); - * } + * @private + */ + retries(n) { + if (!arguments.length) { + return this._retries; + } + this._retries = n; + } + + /** + * Set or get current retry * - * module.exports = MyReporter; + * @private + */ + currentRetry(n) { + if (!arguments.length) { + return this._currentRetry; + } + this._currentRetry = n; + } + + /** + * Return the full title generated by recursively concatenating the parent's + * full title. * + * @memberof Mocha.Runnable * @public - * @memberof Runner - * @readonly - * @alias constants - * @static - * @enum {string} + * @return {string} */ - { - /** - * Emitted when {@link Hook} execution begins - */ - EVENT_HOOK_BEGIN: "hook", - /** - * Emitted when {@link Hook} execution ends - */ - EVENT_HOOK_END: "hook end", - /** - * Emitted when Root {@link Suite} execution begins (all files have been parsed and hooks/tests are ready for execution) - */ - EVENT_RUN_BEGIN: "start", - /** - * Emitted when Root {@link Suite} execution has been delayed via `delay` option - */ - EVENT_DELAY_BEGIN: "waiting", - /** - * Emitted when delayed Root {@link Suite} execution is triggered by user via `global.run()` - */ - EVENT_DELAY_END: "ready", - /** - * Emitted when Root {@link Suite} execution ends - */ - EVENT_RUN_END: "end", - /** - * Emitted when {@link Suite} execution begins - */ - EVENT_SUITE_BEGIN: "suite", - /** - * Emitted when {@link Suite} execution ends - */ - EVENT_SUITE_END: "suite end", - /** - * Emitted when {@link Test} execution begins - */ - EVENT_TEST_BEGIN: "test", - /** - * Emitted when {@link Test} execution ends - */ - EVENT_TEST_END: "test end", - /** - * Emitted when {@link Test} execution fails. Includes an `err` object of type `Error`. - * @example - * runner.on(EVENT_TEST_FAIL, function(test, err) { - * console.log('fail: %s -- error: %s', test.fullTitle(), err.message); - * }); - * - * - */ - EVENT_TEST_FAIL: "fail", - /** - * Emitted when {@link Test} execution succeeds - */ - EVENT_TEST_PASS: "pass", - /** - * Emitted when {@link Test} becomes pending - */ - EVENT_TEST_PENDING: "pending", - /** - * Emitted when {@link Test} execution has failed, but will retry - */ - EVENT_TEST_RETRY: "retry", - /** - * Initial state of Runner - */ - STATE_IDLE: "idle", - /** - * State set to this value when the Runner has started running - */ - STATE_RUNNING: "running", - /** - * State set to this value when the Runner has stopped - */ - STATE_STOPPED: "stopped", - }, - ); + fullTitle() { + return this.titlePath().join(" "); + } - class Runner extends EventEmitter { /** - * Initialize a `Runner` at the Root {@link Suite}, which represents a hierarchy of {@link Suite|Suites} and {@link Test|Tests}. + * Return the title path generated by concatenating the parent's title path with the title. * - * @extends external:EventEmitter + * @memberof Mocha.Runnable * @public - * @class - * @param {Suite} suite - Root suite - * @param {Object} [opts] - Settings object - * @param {boolean} [opts.cleanReferencesAfterRun] - Whether to clean references to test fns and hooks when a suite is done. - * @param {boolean} [opts.delay] - Whether to delay execution of root suite until ready. - * @param {boolean} [opts.dryRun] - Whether to report tests without running them. - * @param {boolean} [opts.failZero] - Whether to fail test run if zero tests encountered. - * @param {boolean} [opts.failHookAffectedTests] - Whether to fail all tests affected by hook failures. + * @return {string[]} */ - constructor(suite, opts = {}) { - super(); + titlePath() { + return this.parent.titlePath().concat([this.title]); + } + + /** + * Clear the timeout. + * + * @private + */ + clearTimeout() { + clearTimeout$1(this.timer); + } + /** + * Reset the timeout. + * + * @private + */ + resetTimeout() { var self = this; - this._globals = []; - this._abort = false; - this.suite = suite; - this._opts = opts; - this.state = constants$1.STATE_IDLE; - this.total = suite.total(); - this.failures = 0; - /** - * @type {Map>>} - */ - this._eventListeners = new Map(); - this.on(constants$1.EVENT_TEST_END, function (test) { - if (test.type === "test" && test.retriedTest() && test.parent) { - var idx = - test.parent.tests && test.parent.tests.indexOf(test.retriedTest()); - if (idx > -1) test.parent.tests[idx] = test; - } - self.checkGlobals(test); - }); - this.on(constants$1.EVENT_HOOK_END, function (hook) { - self.checkGlobals(hook); - }); - this._defaultGrep = /.*/; - this.grep(this._defaultGrep); - this.globals(this.globalProps()); - - this.uncaught = this._uncaught.bind(this); - this.unhandled = (reason, promise) => { - if (isMochaError(reason)) { - debug( - "trapped unhandled rejection coming out of Mocha; forwarding to uncaught handler:", - reason, - ); - this.uncaught(reason); - } else { - debug( - "trapped unhandled rejection from (probably) user code; re-emitting on process", - ); - this._removeEventListener( - process, - "unhandledRejection", - this.unhandled, - ); - try { - process.emit("unhandledRejection", reason, promise); - } finally { - this._addEventListener(process, "unhandledRejection", this.unhandled); - } + var ms = this.timeout() || MAX_TIMEOUT; + + this.clearTimeout(); + this.timer = setTimeout$2(function () { + if (self.timeout() === 0) { + return; } - }; + self.callback(self._timeoutError(ms)); + self.timedOut = true; + }, ms); } - } - /** - * Wrapper for setImmediate, process.nextTick, or browser polyfill. - * - * @param {Function} fn - * @private - */ - Runner.immediately = commonjsGlobal.setImmediate || nextTick$1; + /** + * Set or get a list of whitelisted globals for this test run. + * + * @private + * @param {string[]} globals + */ + globals(globals) { + if (!arguments.length) { + return this._allowedGlobals; + } + this._allowedGlobals = globals; + } + + /** + * Run the test and invoke `fn(err)`. + * + * @param {Function} fn + * @private + */ + run(fn) { + var self = this; + var start = new Date$4(); + var ctx = this.ctx; + var finished; + var errorWasHandled = false; - /** - * Replacement for `target.on(eventName, listener)` that does bookkeeping to remove them when this runner instance is disposed. - * @param {EventEmitter} target - The `EventEmitter` - * @param {string} eventName - The event name - * @param {string} fn - Listener function - * @private - */ - Runner.prototype._addEventListener = function (target, eventName, listener) { - debug( - "_addEventListener(): adding for event %s; %d current listeners", - eventName, - target.listenerCount(eventName), - ); - /* istanbul ignore next */ - if ( - this._eventListeners.has(target) && - this._eventListeners.get(target).has(eventName) && - this._eventListeners.get(target).get(eventName).has(listener) - ) { - debug( - "warning: tried to attach duplicate event listener for %s", - eventName, - ); - return; - } - target.on(eventName, listener); - const targetListeners = this._eventListeners.has(target) - ? this._eventListeners.get(target) - : new Map(); - const targetEventListeners = targetListeners.has(eventName) - ? targetListeners.get(eventName) - : new Set(); - targetEventListeners.add(listener); - targetListeners.set(eventName, targetEventListeners); - this._eventListeners.set(target, targetListeners); - }; + if (this.isPending()) return fn(); - /** - * Replacement for `target.removeListener(eventName, listener)` that also updates the bookkeeping. - * @param {EventEmitter} target - The `EventEmitter` - * @param {string} eventName - The event name - * @param {function} listener - Listener function - * @private - */ - Runner.prototype._removeEventListener = function (target, eventName, listener) { - target.removeListener(eventName, listener); - - if (this._eventListeners.has(target)) { - const targetListeners = this._eventListeners.get(target); - if (targetListeners.has(eventName)) { - const targetEventListeners = targetListeners.get(eventName); - targetEventListeners.delete(listener); - if (!targetEventListeners.size) { - targetListeners.delete(eventName); + // Sometimes the ctx exists, but it is not runnable + if (ctx && ctx.runnable) { + ctx.runnable(this); + } + + // called multiple times + function multiple(err) { + if (errorWasHandled) { + return; } + errorWasHandled = true; + self.emit("error", createMultipleDoneError(self, err)); } - if (!targetListeners.size) { - this._eventListeners.delete(target); + + // finished + function done(err) { + var ms = self.timeout(); + if (self.timedOut) { + return; + } + + if (finished) { + return multiple(err); + } + + self.clearTimeout(); + self.duration = new Date$4() - start; + finished = true; + if (!err && self.duration > ms && ms > 0) { + err = self._timeoutError(ms); + } + fn(err); } - } else { - debug("trying to remove listener for untracked object %s", target); - } - }; - /** - * Removes all event handlers set during a run on this instance. - * Remark: this does _not_ clean/dispose the tests or suites themselves. - */ - Runner.prototype.dispose = function () { - this.removeAllListeners(); - this._eventListeners.forEach((targetListeners, target) => { - targetListeners.forEach((targetEventListeners, eventName) => { - targetEventListeners.forEach((listener) => { - target.removeListener(eventName, listener); - }); - }); - }); - this._eventListeners.clear(); - }; + // for .resetTimeout() and Runner#uncaught() + this.callback = done; - /** - * Run tests with full titles matching `re`. Updates runner.total - * with number of tests matched. - * - * @public - * @memberof Runner - * @param {RegExp} re - * @param {boolean} invert - * @return {Runner} Runner instance. - */ - Runner.prototype.grep = function (re, invert) { - debug("grep(): setting to %s", re); - this._grep = re; - this._invert = invert; - this.total = this.grepTotal(this.suite); - return this; - }; + if (this.fn && typeof this.fn.call !== "function") { + done( + new TypeError( + "A runnable must be passed a function as its second argument.", + ), + ); + return; + } - /** - * Returns the number of tests matching the grep search for the - * given suite. - * - * @memberof Runner - * @public - * @param {Suite} suite - * @return {number} - */ - Runner.prototype.grepTotal = function (suite) { - var self = this; - var total = 0; + // explicit async with `done` argument + if (this.async) { + this.resetTimeout(); + + // allows skip() to be used in an explicit async context + this.skip = function asyncSkip() { + this.pending = true; + done(); + // halt execution, the uncaught handler will ignore the failure. + throw new PendingError("async skip; aborting execution"); + }; - suite.eachTest(function (test) { - var match = self._grep.test(test.fullTitle()); - if (self._invert) { - match = !match; + try { + callFnAsync(this.fn); + } catch (err) { + // handles async runnables which actually run synchronously + errorWasHandled = true; + if (err instanceof PendingError) { + return; // done() is already called in this.skip() + } else if (this.allowUncaught) { + throw err; + } + done(Runnable.toValueOrError(err)); + } + return; } - if (match) { - total++; + + // sync or promise-returning + try { + callFn(this.fn); + } catch (err) { + errorWasHandled = true; + if (err instanceof PendingError) { + return done(); + } else if (this.allowUncaught) { + throw err; + } + done(Runnable.toValueOrError(err)); + } + + function callFn(fn) { + var result = fn.call(ctx); + if (result && typeof result.then === "function") { + self.resetTimeout(); + result.then( + function () { + done(); + // Return null so libraries like bluebird do not warn about + // subsequently constructed Promises. + return null; + }, + function (reason) { + done( + reason || new Error("Promise rejected with no or falsy reason"), + ); + }, + ); + } else { + if (self.asyncOnly) { + return done( + new Error( + "--async-only option in use without declaring `done()` or returning a promise", + ), + ); + } + + done(); + } } - }); - return total; - }; + function callFnAsync(fn) { + var result = fn.call(ctx, function (err) { + if (err instanceof Error || toString.call(err) === "[object Error]") { + return done(err); + } + if (err) { + if (Object.prototype.toString.call(err) === "[object Object]") { + return done( + new Error( + "done() invoked with non-Error: " + JSON.stringify(err), + ), + ); + } + return done(new Error("done() invoked with non-Error: " + err)); + } + if (result && utils.isPromise(result)) { + return done( + new Error( + "Resolution method is overspecified. Specify a callback *or* return a Promise; not both.", + ), + ); + } - /** - * Return a list of global properties. - * - * @return {Array} - * @private - */ - Runner.prototype.globalProps = function () { - var props = Object.keys(commonjsGlobal); + done(); + }); + } + } - // non-enumerables - for (var i = 0; i < globals.length; ++i) { - if (~props.indexOf(globals[i])) { - continue; + /** + * Instantiates a "timeout" error + * + * @param {number} ms - Timeout (in milliseconds) + * @returns {Error} a "timeout" error + * @private + */ + _timeoutError(ms) { + let msg = `Timeout of ${ms}ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.`; + if (this.file) { + msg += " (" + this.file + ")"; } - props.push(globals[i]); + return createTimeoutError(msg, ms, this.file); } - return props; - }; + static constants = utils.defineConstants( + /** + * {@link Runnable}-related Runnable.constants. + * @public + * @memberof Runnable + * @readonly + * @static + * @alias constants + * @enum {string} + */ + { + /** + * Value of `state` prop when a `Runnable` has failed + */ + STATE_FAILED: "failed", + /** + * Value of `state` prop when a `Runnable` has passed + */ + STATE_PASSED: "passed", + /** + * Value of `state` prop when a `Runnable` has been skipped by user + */ + STATE_PENDING: "pending", + }, + ); - /** - * Allow the given `arr` of globals. - * - * @public - * @memberof Runner - * @param {Array} arr - * @return {Runner} Runner instance. - */ - Runner.prototype.globals = function (arr) { - if (!arguments.length) { - return this._globals; + /** + * Given `value`, return identity if truthy, otherwise create an "invalid exception" error and return that. + * @param {*} [value] - Value to return, if present + * @returns {*|Error} `value`, otherwise an `Error` + * @private + */ + static toValueOrError(value) { + return ( + value || + createInvalidExceptionError( + "Runnable failed with falsy or undefined exception. Please throw an Error instead.", + value, + ) + ); } - debug("globals(): setting to %O", arr); - this._globals = this._globals.concat(arr); - return this; - }; + } - /** - * Check for global variable leaks. - * - * @private - */ - Runner.prototype.checkGlobals = function (test) { - if (!this.checkLeaks) { - return; - } - var ok = this._globals; + var runnable = /*#__PURE__*/Object.freeze({ + __proto__: null, + Runnable: Runnable + }); + + var require$$11$1 = /*@__PURE__*/getAugmentedNamespace(runnable); - var globals = this.globalProps(); - var leaks; + const { MOCHA_ID_PROP_NAME: MOCHA_ID_PROP_NAME$2 } = utils.constants; - if (test) { - ok = ok.concat(test._allowedGlobals || []); + class Hook extends Runnable { + /** + * Initialize a new `Hook` with the given `title` and callback `fn` + * + * @extends Runnable + * @param {String} title + * @param {Function} fn + */ + constructor(title, fn) { + super(title, fn); + this.type = "hook"; } - if (this.prevGlobalsLength === globals.length) { - return; + /** + * Resets the state for a next run. + */ + reset() { + super.reset(this); + delete this._error; } - this.prevGlobalsLength = globals.length; - leaks = filterLeaks(ok, globals); - this._globals = this._globals.concat(leaks); + /** + * Get or set the test `err`. + * + * @memberof Hook + * @public + * @param {Error} err + * @return {Error} + */ + error(err) { + if (!arguments.length) { + err = this._error; + this._error = null; + return err; + } - if (leaks.length) { - var msg = `global leak(s) detected: ${leaks.map((e) => `'${e}'`).join(", ")}`; - this.fail(test, new Error(msg)); + this._error = err; } - }; - /** - * Create an error object for a test that was skipped due to a hook failure. - * - * @private - * @param {string} hookTitle - The title of the failed hook - * @param {*} hookError - The error from the failed hook (may not be an Error object) - * @returns {Error} The error object for the skipped test - */ - function createHookSkipError(hookTitle, hookError) { - // Handle falsy or undefined exceptions - if (!hookError) { - hookError = createInvalidExceptionError( - 'Hook "' + hookTitle + '" failed with exception: ' + hookError, - hookError, - ); - } - // Convert non-Error objects to Error - else if (!isError(hookError)) { - hookError = thrown2Error(hookError); + /** + * Returns an object suitable for IPC. + * Functions are represented by keys beginning with `$$`. + * @private + * @returns {Object} + */ + serialize() { + return { + $$currentRetry: this.currentRetry(), + $$fullTitle: this.fullTitle(), + $$isPending: Boolean(this.isPending()), + $$titlePath: this.titlePath(), + ctx: + this.ctx && this.ctx.currentTest + ? { + currentTest: { + title: this.ctx.currentTest.title, + [MOCHA_ID_PROP_NAME$2]: this.ctx.currentTest.id, + }, + } + : {}, + duration: this.duration, + file: this.file, + parent: { + $$fullTitle: this.parent.fullTitle(), + [MOCHA_ID_PROP_NAME$2]: this.parent.id, + }, + state: this.state, + title: this.title, + type: this.type, + [MOCHA_ID_PROP_NAME$2]: this.id, + }; } - - var errorMessage = - 'Test skipped due to failure in hook "' + - hookTitle + - '": ' + - hookError.message; - var testError = new Error(errorMessage); - testError.stack = hookError.stack; - return testError; } + var hook = /*#__PURE__*/Object.freeze({ + __proto__: null, + Hook: Hook + }); + /** - * Fail all tests that are affected by a hook failure. - * This is used when the `failHookAffectedTests` option is enabled. - * - * @private - * @param {Suite} suite - The suite containing the affected tests - * @param {Error} hookError - The error from the failed hook - * @param {string} hookTitle - The title of the failed hook + * @typedef {import('./test.js')} Test */ - Runner.prototype.failAffectedTests = function (suite, hookError, hookTitle) { - if (!this._opts.failHookAffectedTests) { - return; + + + const { + assignNewMochaID, + clamp, + constants: utilsConstants, + defineConstants, + getMochaID, + isString: isString$1, + } = utils; + const debug = debugModule("mocha:suite"); + + const { MOCHA_ID_PROP_NAME: MOCHA_ID_PROP_NAME$1 } = utilsConstants; + + class Suite extends EventEmitter { + static constants = defineConstants( + /** + * {@link Suite}-related constants. + * @public + * @memberof Suite + * @alias constants + * @readonly + * @static + * @enum {string} + */ + { + /** + * Event emitted after a test file has been loaded. Not emitted in browser. + */ + EVENT_FILE_POST_REQUIRE: "post-require", + /** + * Event emitted before a test file has been loaded. In browser, this is emitted once an interface has been selected. + */ + EVENT_FILE_PRE_REQUIRE: "pre-require", + /** + * Event emitted immediately after a test file has been loaded. Not emitted in browser. + */ + EVENT_FILE_REQUIRE: "require", + /** + * Event emitted when `global.run()` is called (use with `delay` option). + */ + EVENT_ROOT_SUITE_RUN: "run", + + /** + * Namespace for collection of a `Suite`'s "after all" hooks. + */ + HOOK_TYPE_AFTER_ALL: "afterAll", + /** + * Namespace for collection of a `Suite`'s "after each" hooks. + */ + HOOK_TYPE_AFTER_EACH: "afterEach", + /** + * Namespace for collection of a `Suite`'s "before all" hooks. + */ + HOOK_TYPE_BEFORE_ALL: "beforeAll", + /** + * Namespace for collection of a `Suite`'s "before each" hooks. + */ + HOOK_TYPE_BEFORE_EACH: "beforeEach", + + /** + * Emitted after a child `Suite` has been added to a `Suite`. + */ + EVENT_SUITE_ADD_SUITE: "suite", + /** + * Emitted after an "after all" `Hook` has been added to a `Suite`. + */ + EVENT_SUITE_ADD_HOOK_AFTER_ALL: "afterAll", + /** + * Emitted after an "after each" `Hook` has been added to a `Suite`. + */ + EVENT_SUITE_ADD_HOOK_AFTER_EACH: "afterEach", + /** + * Emitted after an "before all" `Hook` has been added to a `Suite`. + */ + EVENT_SUITE_ADD_HOOK_BEFORE_ALL: "beforeAll", + /** + * Emitted after an "before each" `Hook` has been added to a `Suite`. + */ + EVENT_SUITE_ADD_HOOK_BEFORE_EACH: "beforeEach", + /** + * Emitted after a `Test` has been added to a `Suite`. + */ + EVENT_SUITE_ADD_TEST: "test", + }, + ); + + /** + * Create a new `Suite` with the given `title` and parent `Suite`. + * + * @public + * @param {Suite} parent - Parent suite (required!) + * @param {string} title - Title + * @return {Suite} + */ + static create(parent, title) { + var suite = new Suite(title, parent.ctx); + suite.parent = parent; + parent.addSuite(suite); + return suite; } - var self = this; - var testError = createHookSkipError(hookTitle, hookError); - - // Recursively fail all tests in this suite and its child suites - function failTestsInSuite(s) { - s.tests.forEach(function (test) { - // Only fail tests that haven't been executed yet - if (!test.state) { - test.state = STATE_FAILED; - self.failures++; - self.emit(constants$1.EVENT_TEST_BEGIN, test); - self.emit(constants$1.EVENT_TEST_FAIL, test, testError); - self.emit(constants$1.EVENT_TEST_END, test); - } + /** + * Constructs a new `Suite` instance with the given `title`, `ctx`, and `isRoot`. + * + * @public + * @extends EventEmitter + * @see {@link https://nodejs.org/api/events.html#events_class_eventemitter|EventEmitter} + * @param {string} title - Suite title. + * @param {Context} parentContext - Parent context instance. + * @param {boolean} [isRoot=false] - Whether this is the root suite. + */ + constructor(title, parentContext, isRoot) { + if (!isString$1(title)) { + throw createInvalidArgumentTypeError( + 'Suite argument "title" must be a string. Received type "' + + typeof title + + '"', + "title", + "string", + ); + } + super(); + this.title = title; + function Context() {} + Context.prototype = parentContext; + this.ctx = new Context(); + this.suites = []; + this.tests = []; + this.root = isRoot === true; + this.pending = false; + this._retries = -1; + this._beforeEach = []; + this._beforeAll = []; + this._afterEach = []; + this._afterAll = []; + this._timeout = 2000; + this._slow = 75; + this._bail = false; + this._onlyTests = []; + this._onlySuites = []; + assignNewMochaID(this); + + Object.defineProperty(this, "id", { + get() { + return getMochaID(this); + }, }); - s.suites.forEach(failTestsInSuite); + this.reset(); } - failTestsInSuite(suite); - }; + /** + * Resets the state initially or for a next run. + */ + reset() { + this.delayed = false; + function doReset(thingToReset) { + thingToReset.reset(); + } + this.suites.forEach(doReset); + this.tests.forEach(doReset); + this._beforeEach.forEach(doReset); + this._afterEach.forEach(doReset); + this._beforeAll.forEach(doReset); + this._afterAll.forEach(doReset); + } - /** - * Fail the given `test`. - * - * If `test` is a hook, failures work in the following pattern: - * - If bail, run corresponding `after each` and `after` hooks, - * then exit - * - Failed `before` hook skips all tests in a suite and subsuites, - * but jumps to corresponding `after` hook - * - Failed `before each` hook skips remaining tests in a - * suite and jumps to corresponding `after each` hook, - * which is run only once - * - Failed `after` hook does not alter execution order - * - Failed `after each` hook skips remaining tests in a - * suite and subsuites, but executes other `after each` - * hooks - * - * @private - * @param {Runnable} test - * @param {Error} err - * @param {boolean} [force=false] - Whether to fail a pending test. - */ - Runner.prototype.fail = function (test, err, force) { - force = force === true; - if (test.isPending() && !force) { - return; + /** + * Return a clone of this `Suite`. + * + * @private + * @return {Suite} + */ + clone() { + var suite = new Suite(this.title); + debug("clone"); + suite.ctx = this.ctx; + suite.root = this.root; + suite.timeout(this.timeout()); + suite.retries(this.retries()); + suite.slow(this.slow()); + suite.bail(this.bail()); + return suite; } - if (this.state === constants$1.STATE_STOPPED) { - if (err.code === errorConstants.MULTIPLE_DONE) { - throw err; + + /** + * Set or get timeout `ms` or short-hand such as "2s". + * + * @private + * @todo Do not attempt to set value if `ms` is undefined + * @param {number|string} ms + * @return {Suite|number} for chaining + */ + timeout(ms$1) { + if (!arguments.length) { + return this._timeout; + } + if (typeof ms$1 === "string") { + ms$1 = ms(ms$1); } - throw createFatalError( - "Test failed after root suite execution completed!", - err, - ); - } - ++this.failures; - debug("total number of failures: %d", this.failures); - test.state = STATE_FAILED; + // Clamp to range + var INT_MAX = Math.pow(2, 31) - 1; + var range = [0, INT_MAX]; + ms$1 = clamp(ms$1, range); + + debug("timeout %d", ms$1); + this._timeout = parseInt(ms$1, 10); + + // Allow overriding inner/nested suites + // See and test-cases with chain-called timeout argument. + // https://github.com/mochajs/mocha/issues/5422 + for (const t of this.tests) { + t.timeout(this._timeout); + } + for (const s of this.suites) { + s.timeout(this._timeout); + } + return this; + } - if (!isError(err)) { - err = thrown2Error(err); + /** + * Set or get number of times to retry a failed test. + * + * @private + * @param {number|string} n + * @return {Suite|number} for chaining + */ + retries(n) { + if (!arguments.length) { + return this._retries; + } + debug("retries %d", n); + this._retries = parseInt(n, 10) || 0; + return this; } - // Filter the stack traces - if (!this.fullStackTrace) { - const alreadyFiltered = new Set(); - let currentErr = err; - - while (currentErr && currentErr.stack && !alreadyFiltered.has(currentErr)) { - alreadyFiltered.add(currentErr); - - try { - currentErr.stack = stackFilter(currentErr.stack); - } catch (ignore) { - // some environments do not take kindly to monkeying with the stack - } - - currentErr = currentErr.cause; + /** + * Set or get slow `ms` or short-hand such as "2s". + * + * @private + * @param {number|string} ms + * @return {Suite|number} for chaining + */ + slow(ms$1) { + if (!arguments.length) { + return this._slow; + } + if (typeof ms$1 === "string") { + ms$1 = ms(ms$1); } + debug("slow %d", ms$1); + this._slow = ms$1; + return this; } - this.emit(constants$1.EVENT_TEST_FAIL, test, err); - }; - - /** - * Run hook `name` callbacks and then invoke `fn()`. - * - * @private - * @param {string} name - * @param {Function} fn - */ + /** + * Set or get whether to bail after first error. + * + * @private + * @param {boolean} bail + * @return {Suite|number} for chaining + */ + bail(bail) { + if (!arguments.length) { + return this._bail; + } + debug("bail %s", bail); + this._bail = bail; + return this; + } - Runner.prototype.hook = function (name, fn) { - if (this._opts.dryRun) return fn(); + /** + * Check if this suite or its parent suite is marked as pending. + * + * @private + */ + isPending() { + return this.pending || (this.parent && this.parent.isPending()); + } - var suite = this.suite; - var hooks = suite.getHooks(name); - var self = this; + /** + * Generic hook-creator. + * @private + * @param {string} title - Title of hook + * @param {Function} fn - Hook callback + * @returns {Hook} A new hook + */ + _createHook(title, fn) { + var hook = new Hook(title, fn); + hook.parent = this; + hook.timeout(this.timeout()); + hook.retries(this.retries()); + hook.slow(this.slow()); + hook.ctx = this.ctx; + hook.file = this.file; + return hook; + } - function next(i) { - var hook = hooks[i]; - if (!hook) { - return fn(); + /** + * Run `fn(test[, done])` before running tests. + * + * @private + * @param {string} title + * @param {Function} fn + * @return {Suite} for chaining + */ + beforeAll(title, fn) { + if (this.isPending()) { + return this; } - self.currentRunnable = hook; - - if (name === HOOK_TYPE_BEFORE_ALL) { - hook.ctx.currentTest = hook.parent.tests[0]; - } else if (name === HOOK_TYPE_AFTER_ALL) { - hook.ctx.currentTest = hook.parent.tests[hook.parent.tests.length - 1]; - } else { - hook.ctx.currentTest = self.test; + if (typeof title === "function") { + fn = title; + title = fn.name; } + title = '"before all" hook' + (title ? ": " + title : ""); - setHookTitle(hook); + var hook = this._createHook(title, fn); + this._beforeAll.push(hook); + this.emit(Suite.constants.EVENT_SUITE_ADD_HOOK_BEFORE_ALL, hook); + return hook; + } - hook.allowUncaught = self.allowUncaught; + /** + * Run `fn(test[, done])` after running tests. + * + * @private + * @param {string} title + * @param {Function} fn + * @return {Suite} for chaining + */ + afterAll(title, fn) { + if (this.isPending()) { + return this; + } + if (typeof title === "function") { + fn = title; + title = fn.name; + } + title = '"after all" hook' + (title ? ": " + title : ""); - self.emit(constants$1.EVENT_HOOK_BEGIN, hook); + var hook = this._createHook(title, fn); + this._afterAll.push(hook); + this.emit(Suite.constants.EVENT_SUITE_ADD_HOOK_AFTER_ALL, hook); + return hook; + } - if (!hook.listeners("error").length) { - self._addEventListener(hook, "error", function (err) { - self.fail(hook, err); - }); + /** + * Run `fn(test[, done])` before each test case. + * + * @private + * @param {string} title + * @param {Function} fn + * @return {Suite} for chaining + */ + beforeEach(title, fn) { + if (this.isPending()) { + return this; + } + if (typeof title === "function") { + fn = title; + title = fn.name; } + title = '"before each" hook' + (title ? ": " + title : ""); - hook.run(function cbHookRun(err) { - var testError = hook.error(); - if (testError) { - self.fail(self.test, testError); - } - // conditional skip - if (hook.pending) { - if (name === HOOK_TYPE_AFTER_EACH) { - // TODO define and implement use case - if (self.test) { - self.test.pending = true; - } - } else if (name === HOOK_TYPE_BEFORE_EACH) { - if (self.test) { - self.test.pending = true; - } - self.emit(constants$1.EVENT_HOOK_END, hook); - hook.pending = false; // activates hook for next test - return fn(new Error("abort hookDown")); - } else if (name === HOOK_TYPE_BEFORE_ALL) { - suite.tests.forEach(function (test) { - test.pending = true; - }); - suite.suites.forEach(function (suite) { - suite.pending = true; - }); - hooks = []; - } else { - hook.pending = false; - var errForbid = createUnsupportedError$1("`this.skip` forbidden"); - self.fail(hook, errForbid); - return fn(errForbid); - } - } else if (err) { - self.fail(hook, err); - // If failHookAffectedTests is enabled, mark affected tests as failed - if (self._opts.failHookAffectedTests) { - if (name === HOOK_TYPE_BEFORE_ALL) { - self.failAffectedTests(self.suite, err, hook.title); - } else if (name === HOOK_TYPE_BEFORE_EACH) { - // Fail the current test - if (self.test && !self.test.state) { - var testError = createHookSkipError(hook.title, err); - - self.test.state = STATE_FAILED; - self.failures++; - self.emit(constants$1.EVENT_TEST_BEGIN, self.test); - self.emit(constants$1.EVENT_TEST_FAIL, self.test, testError); - self.emit(constants$1.EVENT_TEST_END, self.test); - } - // Store the hook error info for remaining tests - self._failedBeforeEachHook = { - error: err, - title: hook.title, - }; - } - } - // stop executing hooks, notify callee of hook err - return fn(err); - } - self.emit(constants$1.EVENT_HOOK_END, hook); - delete hook.ctx.currentTest; - setHookTitle(hook); - next(++i); - }); + var hook = this._createHook(title, fn); + this._beforeEach.push(hook); + this.emit(Suite.constants.EVENT_SUITE_ADD_HOOK_BEFORE_EACH, hook); + return hook; + } - function setHookTitle(hook) { - hook.originalTitle = hook.originalTitle || hook.title; - if (hook.ctx && hook.ctx.currentTest) { - hook.title = `${hook.originalTitle} for "${hook.ctx.currentTest.title}"`; - } else { - var parentTitle; - if (hook.parent.title) { - parentTitle = hook.parent.title; - } else { - parentTitle = hook.parent.root ? "{root}" : ""; - } - hook.title = `${hook.originalTitle} in "${parentTitle}"`; - } + /** + * Run `fn(test[, done])` after each test case. + * + * @private + * @param {string} title + * @param {Function} fn + * @return {Suite} for chaining + */ + afterEach(title, fn) { + if (this.isPending()) { + return this; + } + if (typeof title === "function") { + fn = title; + title = fn.name; } + title = '"after each" hook' + (title ? ": " + title : ""); + + var hook = this._createHook(title, fn); + this._afterEach.push(hook); + this.emit(Suite.constants.EVENT_SUITE_ADD_HOOK_AFTER_EACH, hook); + return hook; } - Runner.immediately(function () { - next(0); - }); - }; + /** + * Add a test `suite`. + * + * @private + * @param {Suite} suite + * @return {Suite} for chaining + */ + addSuite(suite) { + suite.parent = this; + suite.root = false; + suite.timeout(this.timeout()); + suite.retries(this.retries()); + suite.slow(this.slow()); + suite.bail(this.bail()); + this.suites.push(suite); + this.emit(Suite.constants.EVENT_SUITE_ADD_SUITE, suite); + return this; + } - /** - * Run hook `name` for the given array of `suites` - * in order, and callback `fn(err, errSuite)`. - * - * @private - * @param {string} name - * @param {Array} suites - * @param {Function} fn - */ - Runner.prototype.hooks = function (name, suites, fn) { - var self = this; - var orig = this.suite; + /** + * Add a `test` to this suite. + * + * @private + * @param {Test} test + * @return {Suite} for chaining + */ + addTest(test) { + test.parent = this; + test.timeout(this.timeout()); + test.retries(this.retries()); + test.slow(this.slow()); + test.ctx = this.ctx; + this.tests.push(test); + this.emit(Suite.constants.EVENT_SUITE_ADD_TEST, test); + return this; + } - function next(suite) { - self.suite = suite; + /** + * Return the full title generated by recursively concatenating the parent's + * full title. + * + * @memberof Suite + * @public + * @return {string} + */ + fullTitle() { + return this.titlePath().join(" "); + } - if (!suite) { - self.suite = orig; - return fn(); + /** + * Return the title path generated by recursively concatenating the parent's + * title path. + * + * @memberof Suite + * @public + * @return {string[]} + */ + titlePath() { + var result = []; + if (this.parent) { + result = result.concat(this.parent.titlePath()); } + if (!this.root) { + result.push(this.title); + } + return result; + } - self.hook(name, function (err) { - if (err) { - var errSuite = self.suite; - self.suite = orig; - return fn(err, errSuite); - } + /** + * Return the total number of tests. + * + * @memberof Suite + * @public + * @return {number} + */ + total() { + return ( + this.suites.reduce(function (sum, suite) { + return sum + suite.total(); + }, 0) + this.tests.length + ); + } - next(suites.pop()); + /** + * Iterates through each suite recursively to find all tests. Applies a + * function in the format `fn(test)`. + * + * @private + * @param {Function} fn + * @return {Suite} + */ + eachTest(fn) { + this.tests.forEach(fn); + this.suites.forEach(function (suite) { + suite.eachTest(fn); }); + return this; } - next(suites.pop()); - }; - - /** - * Run 'afterEach' hooks from bottom up. - * - * @param {String} name - * @param {Function} fn - * @private - */ - Runner.prototype.hookUp = function (name, fn) { - var suites = [this.suite].concat(this.parents()).reverse(); - this.hooks(name, suites, fn); - }; - - /** - * Run 'beforeEach' hooks from top level down. - * - * @param {String} name - * @param {Function} fn - * @private - */ - Runner.prototype.hookDown = function (name, fn) { - var suites = [this.suite].concat(this.parents()); - this.hooks(name, suites, fn); - }; - - /** - * Return an array of parent Suites from - * closest to furthest. - * - * @return {Array} - * @private - */ - Runner.prototype.parents = function () { - var suite = this.suite; - var suites = []; - while (suite.parent) { - suite = suite.parent; - suites.push(suite); - } - return suites; - }; - - /** - * Run the current test and callback `fn(err)`. - * - * @param {Function} fn - * @private - */ - Runner.prototype.runTest = function (fn) { - if (this._opts.dryRun) return Runner.immediately(fn); - - var self = this; - var test = this.test; + /** + * This will run the root suite if we happen to be running in delayed mode. + * @private + */ + run() { + if (this.root) { + this.emit(Suite.constants.EVENT_ROOT_SUITE_RUN); + } + } - if (!test) { - return; + /** + * Determines whether a suite has an `only` test or suite as a descendant. + * + * @private + * @returns {Boolean} + */ + hasOnly() { + return ( + this._onlyTests.length > 0 || + this._onlySuites.length > 0 || + this.suites.some(function (suite) { + return suite.hasOnly(); + }) + ); } - if (this.asyncOnly) { - test.asyncOnly = true; + /** + * Filter suites based on `isOnly` logic. + * + * @private + * @returns {Boolean} + */ + filterOnly() { + if (this._onlyTests.length) { + // If the suite contains `only` tests, run those and ignore any nested suites. + this.tests = this._onlyTests; + this.suites = []; + } else { + // Otherwise, do not run any of the tests in this suite. + this.tests = []; + this._onlySuites.forEach(function (onlySuite) { + // If there are other `only` tests/suites nested in the current `only` suite, then filter that `only` suite. + // Otherwise, all of the tests on this `only` suite should be run, so don't filter it. + if (onlySuite.hasOnly()) { + onlySuite.filterOnly(); + } + }); + // Run the `only` suites, as well as any other suites that have `only` tests/suites as descendants. + var onlySuites = this._onlySuites; + this.suites = this.suites.filter(function (childSuite) { + return onlySuites.indexOf(childSuite) !== -1 || childSuite.filterOnly(); + }); + } + // Keep the suite only if there is something to run + return this.tests.length > 0 || this.suites.length > 0; } - this._addEventListener(test, "error", function (err) { - self.fail(test, err); - }); - if (this.allowUncaught) { - test.allowUncaught = true; - return test.run(fn); + + /** + * Adds a suite to the list of subsuites marked `only`. + * + * @private + * @param {Suite} suite + */ + appendOnlySuite(suite) { + this._onlySuites.push(suite); } - try { - test.run(fn); - } catch (err) { - fn(err); + + /** + * Marks a suite to be `only`. + * + * @private + */ + markOnly() { + this.parent && this.parent.appendOnlySuite(this); } - }; - /** - * Run tests in the given `suite` and invoke the callback `fn()` when complete. - * - * @private - * @param {Suite} suite - * @param {Function} fn - */ - Runner.prototype.runTests = function (suite, fn) { - var self = this; - var tests = suite.tests.slice(); - var test; + /** + * Adds a test to the list of tests marked `only`. + * + * @private + * @param {Test} test + */ + appendOnlyTest(test) { + this._onlyTests.push(test); + } - function hookErr(err, errSuite, after) { - // before/after Each hook for errSuite failed: - var orig = self.suite; + /** + * Returns the array of hooks by hook name; see `HOOK_TYPE_*` constants. + * @private + */ + getHooks(name) { + return this["_" + name]; + } - // If failHookAffectedTests is enabled and this is a beforeEach failure, - // mark remaining tests as failed - if ( - self._opts.failHookAffectedTests && - !after && - self._failedBeforeEachHook - ) { - // Fail all remaining tests in the suite - var remainingTests = tests.slice(); - remainingTests.forEach(function (t) { - if (!t.state) { - var testError = createHookSkipError( - self._failedBeforeEachHook.title, - self._failedBeforeEachHook.error, - ); + /** + * cleans all references from this suite and all child suites. + */ + dispose() { + this.suites.forEach(function (suite) { + suite.dispose(); + }); + this.cleanReferences(); + } - t.state = STATE_FAILED; - self.failures++; - self.emit(constants$1.EVENT_TEST_BEGIN, t); - self.emit(constants$1.EVENT_TEST_FAIL, t, testError); - self.emit(constants$1.EVENT_TEST_END, t); - } - }); - // Clear the stored hook info - delete self._failedBeforeEachHook; + /** + * Cleans up the references to all the deferred functions + * (before/after/beforeEach/afterEach) and tests of a Suite. + * These must be deleted otherwise a memory leak can happen, + * as those functions may reference variables from closures, + * thus those variables can never be garbage collected as long + * as the deferred functions exist. + * + * @private + */ + cleanReferences() { + function cleanArrReferences(arr) { + for (var i = 0; i < arr.length; i++) { + delete arr[i].fn; + } } - // for failed 'after each' hook start from errSuite parent, - // otherwise start from errSuite itself - self.suite = after ? errSuite.parent : errSuite; - - if (self.suite) { - self.hookUp(HOOK_TYPE_AFTER_EACH, function (err2, errSuite2) { - self.suite = orig; - // some hooks may fail even now - if (err2) { - return hookErr(err2, errSuite2, true); - } - // report error suite - fn(errSuite); - }); - } else { - // there is no need calling other 'after each' hooks - self.suite = orig; - fn(errSuite); + if (Array.isArray(this._beforeAll)) { + cleanArrReferences(this._beforeAll); } - } - function next(err, errSuite) { - // if we bail after first err - if (self.failures && suite._bail) { - tests = []; + if (Array.isArray(this._beforeEach)) { + cleanArrReferences(this._beforeEach); } - if (self._abort) { - return fn(); + if (Array.isArray(this._afterAll)) { + cleanArrReferences(this._afterAll); } - if (err) { - return hookErr(err, errSuite, true); + if (Array.isArray(this._afterEach)) { + cleanArrReferences(this._afterEach); } - // next test - test = tests.shift(); - - // all done - if (!test) { - return fn(); + for (var i = 0; i < this.tests.length; i++) { + delete this.tests[i].fn; } + } - // grep - var match = self._grep.test(test.fullTitle()); - if (self._invert) { - match = !match; - } - if (!match) { - // Run immediately only if we have defined a grep. When we - // define a grep — It can cause maximum callstack error if - // the grep is doing a large recursive loop by neglecting - // all tests. The run immediately function also comes with - // a performance cost. So we don't want to run immediately - // if we run the whole test suite, because running the whole - // test suite don't do any immediate recursive loops. Thus, - // allowing a JS runtime to breathe. - if (self._grep !== self._defaultGrep) { - Runner.immediately(next); - } else { - next(); - } - return; - } + /** + * Returns an object suitable for IPC. + * Functions are represented by keys beginning with `$$`. + * @private + * @returns {Object} + */ + serialize() { + return { + _bail: this._bail, + $$fullTitle: this.fullTitle(), + $$isPending: Boolean(this.isPending()), + root: this.root, + title: this.title, + [MOCHA_ID_PROP_NAME$1]: this.id, + parent: this.parent ? { [MOCHA_ID_PROP_NAME$1]: this.parent.id } : null, + }; + } + } - // static skip, no hooks are executed - if (test.isPending()) { - if (self.forbidPending) { - self.fail(test, new Error("Pending test forbidden"), true); - } else { - test.state = STATE_PENDING; - self.emit(constants$1.EVENT_TEST_PENDING, test); - } - self.emit(constants$1.EVENT_TEST_END, test); - return next(); - } + var suite = /*#__PURE__*/Object.freeze({ + __proto__: null, + Suite: Suite + }); - // execute test and hook(s) - self.emit(constants$1.EVENT_TEST_BEGIN, (self.test = test)); - self.hookDown(HOOK_TYPE_BEFORE_EACH, function (err, errSuite) { - // conditional skip within beforeEach - if (test.isPending()) { - if (self.forbidPending) { - self.fail(test, new Error("Pending test forbidden"), true); - } else { - test.state = STATE_PENDING; - self.emit(constants$1.EVENT_TEST_PENDING, test); - } - self.emit(constants$1.EVENT_TEST_END, test); - // skip inner afterEach hooks below errSuite level - var origSuite = self.suite; - self.suite = errSuite || self.suite; - return self.hookUp(HOOK_TYPE_AFTER_EACH, function (e, eSuite) { - self.suite = origSuite; - next(e, eSuite); - }); - } - if (err) { - return hookErr(err, errSuite, false); - } - self.currentRunnable = self.test; - self.runTest(function (err) { - test = self.test; - // conditional skip within it - if (test.pending) { - if (self.forbidPending) { - self.fail(test, new Error("Pending test forbidden"), true); - } else { - test.state = STATE_PENDING; - self.emit(constants$1.EVENT_TEST_PENDING, test); - } - self.emit(constants$1.EVENT_TEST_END, test); - return self.hookUp(HOOK_TYPE_AFTER_EACH, next); - } else if (err) { - var retry = test.currentRetry(); - if (retry < test.retries()) { - var clonedTest = test.clone(); - clonedTest.currentRetry(retry + 1); - tests.unshift(clonedTest); - - self.emit(constants$1.EVENT_TEST_RETRY, test, err); - - // Early return + hook trigger so that it doesn't - // increment the count wrong - return self.hookUp(HOOK_TYPE_AFTER_EACH, next); - } else { - self.fail(test, err); - } - self.emit(constants$1.EVENT_TEST_END, test); - return self.hookUp(HOOK_TYPE_AFTER_EACH, next); - } + var require$$5$1 = /*@__PURE__*/getAugmentedNamespace(suite); - test.state = STATE_PASSED; - self.emit(constants$1.EVENT_TEST_PASS, test); - self.emit(constants$1.EVENT_TEST_END, test); - self.hookUp(HOOK_TYPE_AFTER_EACH, next); - }); - }); - } + var require$$8$1 = /*@__PURE__*/getAugmentedNamespace(errors); - this.next = next; - this.hookErr = hookErr; - next(); - }; + var require$$7$2 = /*@__PURE__*/getAugmentedNamespace(errorConstants); - /** - * Run the given `suite` and invoke the callback `fn()` when complete. - * - * @private - * @param {Suite} suite - * @param {Function} fn - */ - Runner.prototype.runSuite = function (suite, fn) { - var i = 0; - var self = this; - var total = this.grepTotal(suite); + var runner; + var hasRequiredRunner; - debug("runSuite(): running %s", suite.fullTitle()); + function requireRunner () { + if (hasRequiredRunner) return runner; + hasRequiredRunner = 1; - if (!total || (self.failures && suite._bail)) { - debug("runSuite(): bailing"); - return fn(); - } + /** + * @typedef {import('./types.d.ts').RunnerOptions} RunnerOptions + */ - this.emit(constants$1.EVENT_SUITE_BEGIN, (this.suite = suite)); + /** + * Module dependencies. + * @private + */ + var EventEmitter = require$$0$1.EventEmitter; + var { PendingError } = require$$1$1; + var utils = requireUtils(); + var debug = requireBrowser()("mocha:runner"); + var { Runnable } = require$$11$1; + var { Suite } = require$$5$1; + var HOOK_TYPE_BEFORE_EACH = Suite.constants.HOOK_TYPE_BEFORE_EACH; + var HOOK_TYPE_AFTER_EACH = Suite.constants.HOOK_TYPE_AFTER_EACH; + var HOOK_TYPE_AFTER_ALL = Suite.constants.HOOK_TYPE_AFTER_ALL; + var HOOK_TYPE_BEFORE_ALL = Suite.constants.HOOK_TYPE_BEFORE_ALL; + var EVENT_ROOT_SUITE_RUN = Suite.constants.EVENT_ROOT_SUITE_RUN; + var STATE_FAILED = Runnable.constants.STATE_FAILED; + var STATE_PASSED = Runnable.constants.STATE_PASSED; + var STATE_PENDING = Runnable.constants.STATE_PENDING; + var stackFilter = utils.stackTraceFilter(); + var stringify = utils.stringify; + + const { + createInvalidExceptionError, + createUnsupportedError, + createFatalError, + isMochaError, + } = require$$8$1; + const { constants: errorConstants } = require$$7$2; - function next(errSuite) { - if (errSuite) { - // current suite failed on a hook from errSuite - if (errSuite === suite) { - // if errSuite is current suite - // continue to the next sibling suite - return done(); - } - // errSuite is among the parents of current suite - // stop execution of errSuite and all sub-suites - return done(errSuite); - } + /** + * Non-enumerable globals. + * @private + * @readonly + */ + var globals = [ + "setTimeout", + "clearTimeout", + "setInterval", + "clearInterval", + "XMLHttpRequest", + "Date", + "setImmediate", + "clearImmediate", + ]; + + var constants = utils.defineConstants( + /** + * {@link Runner}-related constants. Used by reporters. Each event emits the corresponding object, unless otherwise indicated. + * @example + * const Mocha = require('mocha'); + * const Base = Mocha.reporters.Base; + * const { + * EVENT_HOOK_BEGIN, + * EVENT_TEST_PASS, + * EVENT_TEST_FAIL, + * EVENT_TEST_END + * } = Mocha.Runner.constants + * + * function MyReporter(runner, options) { + * Base.call(this, runner, options); + * + * runner.on(EVENT_HOOK_BEGIN, function(hook) { + * console.log('hook called: ', hook.title); + * }); + * + * runner.on(EVENT_TEST_PASS, function(test) { + * console.log('pass: %s', test.fullTitle()); + * }); + * + * runner.on(EVENT_TEST_FAIL, function(test, err) { + * console.log('fail: %s -- error: %s', test.fullTitle(), err.message); + * }); + * + * runner.on(EVENT_TEST_END, function() { + * console.log('end: %d/%d', runner.stats.passes, runner.stats.tests); + * }); + * } + * + * module.exports = MyReporter; + * + * @public + * @memberof Runner + * @readonly + * @alias constants + * @static + * @enum {string} + */ + { + /** + * Emitted when {@link Hook} execution begins + */ + EVENT_HOOK_BEGIN: "hook", + /** + * Emitted when {@link Hook} execution ends + */ + EVENT_HOOK_END: "hook end", + /** + * Emitted when Root {@link Suite} execution begins (all files have been parsed and hooks/tests are ready for execution) + */ + EVENT_RUN_BEGIN: "start", + /** + * Emitted when Root {@link Suite} execution has been delayed via `delay` option + */ + EVENT_DELAY_BEGIN: "waiting", + /** + * Emitted when delayed Root {@link Suite} execution is triggered by user via `global.run()` + */ + EVENT_DELAY_END: "ready", + /** + * Emitted when Root {@link Suite} execution ends + */ + EVENT_RUN_END: "end", + /** + * Emitted when {@link Suite} execution begins + */ + EVENT_SUITE_BEGIN: "suite", + /** + * Emitted when {@link Suite} execution ends + */ + EVENT_SUITE_END: "suite end", + /** + * Emitted when {@link Test} execution begins + */ + EVENT_TEST_BEGIN: "test", + /** + * Emitted when {@link Test} execution ends + */ + EVENT_TEST_END: "test end", + /** + * Emitted when {@link Test} execution fails. Includes an `err` object of type `Error`. + * @example + * runner.on(EVENT_TEST_FAIL, function(test, err) { + * console.log('fail: %s -- error: %s', test.fullTitle(), err.message); + * }); + * + * + */ + EVENT_TEST_FAIL: "fail", + /** + * Emitted when {@link Test} execution succeeds + */ + EVENT_TEST_PASS: "pass", + /** + * Emitted when {@link Test} becomes pending + */ + EVENT_TEST_PENDING: "pending", + /** + * Emitted when {@link Test} execution has failed, but will retry + */ + EVENT_TEST_RETRY: "retry", + /** + * Initial state of Runner + */ + STATE_IDLE: "idle", + /** + * State set to this value when the Runner has started running + */ + STATE_RUNNING: "running", + /** + * State set to this value when the Runner has stopped + */ + STATE_STOPPED: "stopped", + }, + ); + + class Runner extends EventEmitter { + /** + * Initialize a `Runner` at the Root {@link Suite}, which represents a hierarchy of {@link Suite|Suites} and {@link Test|Tests}. + * + * @extends external:EventEmitter + * @public + * @class + * @param {Suite} suite - Root suite + * @param {Object} [opts] - Settings object + * @param {boolean} [opts.cleanReferencesAfterRun] - Whether to clean references to test fns and hooks when a suite is done. + * @param {boolean} [opts.delay] - Whether to delay execution of root suite until ready. + * @param {boolean} [opts.dryRun] - Whether to report tests without running them. + * @param {boolean} [opts.failZero] - Whether to fail test run if zero tests encountered. + * @param {boolean} [opts.failHookAffectedTests] - Whether to fail all tests affected by hook failures. + */ + constructor(suite, opts = {}) { + super(); + + var self = this; + this._globals = []; + this._abort = false; + this.suite = suite; + this._opts = opts; + this.state = constants.STATE_IDLE; + this.total = suite.total(); + this.failures = 0; + /** + * @type {Map>>} + */ + this._eventListeners = new Map(); + this.on(constants.EVENT_TEST_END, function (test) { + if (test.type === "test" && test.retriedTest() && test.parent) { + var idx = + test.parent.tests && test.parent.tests.indexOf(test.retriedTest()); + if (idx > -1) test.parent.tests[idx] = test; + } + self.checkGlobals(test); + }); + this.on(constants.EVENT_HOOK_END, function (hook) { + self.checkGlobals(hook); + }); + this._defaultGrep = /.*/; + this.grep(this._defaultGrep); + this.globals(this.globalProps()); + + this.uncaught = this._uncaught.bind(this); + this.unhandled = (reason, promise) => { + if (isMochaError(reason)) { + debug( + "trapped unhandled rejection coming out of Mocha; forwarding to uncaught handler:", + reason, + ); + this.uncaught(reason); + } else { + debug( + "trapped unhandled rejection from (probably) user code; re-emitting on process", + ); + this._removeEventListener( + browser$1$1, + "unhandledRejection", + this.unhandled, + ); + try { + browser$1$1.emit("unhandledRejection", reason, promise); + } finally { + this._addEventListener(browser$1$1, "unhandledRejection", this.unhandled); + } + } + }; + } + } - if (self._abort) { - return done(); - } + /** + * Wrapper for setImmediate or browser polyfill. + * + * @param {Function} fn + * @private + */ + Runner.immediately = commonjsGlobal.setImmediate; - var curr = suite.suites[i++]; - if (!curr) { - return done(); - } + /** + * Replacement for `target.on(eventName, listener)` that does bookkeeping to remove them when this runner instance is disposed. + * @param {EventEmitter} target - The `EventEmitter` + * @param {string} eventName - The event name + * @param {string} fn - Listener function + * @private + */ + Runner.prototype._addEventListener = function (target, eventName, listener) { + debug( + "_addEventListener(): adding for event %s; %d current listeners", + eventName, + target.listenerCount(eventName), + ); + /* istanbul ignore next */ + if ( + this._eventListeners.has(target) && + this._eventListeners.get(target).has(eventName) && + this._eventListeners.get(target).get(eventName).has(listener) + ) { + debug( + "warning: tried to attach duplicate event listener for %s", + eventName, + ); + return; + } + target.on(eventName, listener); + const targetListeners = this._eventListeners.has(target) + ? this._eventListeners.get(target) + : new Map(); + const targetEventListeners = targetListeners.has(eventName) + ? targetListeners.get(eventName) + : new Set(); + targetEventListeners.add(listener); + targetListeners.set(eventName, targetEventListeners); + this._eventListeners.set(target, targetListeners); + }; - // Avoid grep neglecting large number of tests causing a - // huge recursive loop and thus a maximum call stack error. - // See comment in `this.runTests()` for more information. - if (self._grep !== self._defaultGrep) { - Runner.immediately(function () { - self.runSuite(curr, next); - }); - } else { - self.runSuite(curr, next); - } - } + /** + * Replacement for `target.removeListener(eventName, listener)` that also updates the bookkeeping. + * @param {EventEmitter} target - The `EventEmitter` + * @param {string} eventName - The event name + * @param {function} listener - Listener function + * @private + */ + Runner.prototype._removeEventListener = function (target, eventName, listener) { + target.removeListener(eventName, listener); + + if (this._eventListeners.has(target)) { + const targetListeners = this._eventListeners.get(target); + if (targetListeners.has(eventName)) { + const targetEventListeners = targetListeners.get(eventName); + targetEventListeners.delete(listener); + if (!targetEventListeners.size) { + targetListeners.delete(eventName); + } + } + if (!targetListeners.size) { + this._eventListeners.delete(target); + } + } else { + debug("trying to remove listener for untracked object %s", target); + } + }; - function done(errSuite) { - self.suite = suite; - self.nextSuite = next; + /** + * Removes all event handlers set during a run on this instance. + * Remark: this does _not_ clean/dispose the tests or suites themselves. + */ + Runner.prototype.dispose = function () { + this.removeAllListeners(); + this._eventListeners.forEach((targetListeners, target) => { + targetListeners.forEach((targetEventListeners, eventName) => { + targetEventListeners.forEach((listener) => { + target.removeListener(eventName, listener); + }); + }); + }); + this._eventListeners.clear(); + }; - // remove reference to test - delete self.test; + /** + * Run tests with full titles matching `re`. Updates runner.total + * with number of tests matched. + * + * @public + * @memberof Runner + * @param {RegExp} re + * @param {boolean} invert + * @return {Runner} Runner instance. + */ + Runner.prototype.grep = function (re, invert) { + debug("grep(): setting to %s", re); + this._grep = re; + this._invert = invert; + this.total = this.grepTotal(this.suite); + return this; + }; - self.hook(HOOK_TYPE_AFTER_ALL, function () { - self.emit(constants$1.EVENT_SUITE_END, suite); - fn(errSuite); - }); - } + /** + * Returns the number of tests matching the grep search for the + * given suite. + * + * @memberof Runner + * @public + * @param {Suite} suite + * @return {number} + */ + Runner.prototype.grepTotal = function (suite) { + var self = this; + var total = 0; + + suite.eachTest(function (test) { + var match = self._grep.test(test.fullTitle()); + if (self._invert) { + match = !match; + } + if (match) { + total++; + } + }); + + return total; + }; - this.nextSuite = next; + /** + * Return a list of global properties. + * + * @return {Array} + * @private + */ + Runner.prototype.globalProps = function () { + var props = Object.keys(commonjsGlobal); + + // non-enumerables + for (var i = 0; i < globals.length; ++i) { + if (~props.indexOf(globals[i])) { + continue; + } + props.push(globals[i]); + } + + return props; + }; - this.hook(HOOK_TYPE_BEFORE_ALL, function (err) { - if (err) { - return done(); - } - self.runTests(suite, next); - }); - }; + /** + * Allow the given `arr` of globals. + * + * @public + * @memberof Runner + * @param {Array} arr + * @return {Runner} Runner instance. + */ + Runner.prototype.globals = function (arr) { + if (!arguments.length) { + return this._globals; + } + debug("globals(): setting to %O", arr); + this._globals = this._globals.concat(arr); + return this; + }; - /** - * Handle uncaught exceptions within runner. - * - * This function is bound to the instance as `Runner#uncaught` at instantiation - * time. It's intended to be listening on the `Process.uncaughtException` event. - * In order to not leak EE listeners, we need to ensure no more than a single - * `uncaughtException` listener exists per `Runner`. The only way to do - * this--because this function needs the context (and we don't have lambdas)--is - * to use `Function.prototype.bind`. We need strict equality to unregister and - * _only_ unregister the _one_ listener we set from the - * `Process.uncaughtException` event; would be poor form to just remove - * everything. See {@link Runner#run} for where the event listener is registered - * and unregistered. - * @param {Error} err - Some uncaught error - * @private - */ - Runner.prototype._uncaught = function (err) { - // this is defensive to prevent future developers from mis-calling this function. - // it's more likely that it'd be called with the incorrect context--say, the global - // `process` object--than it would to be called with a context that is not a "subclass" - // of `Runner`. - if (!(this instanceof Runner)) { - throw createFatalError( - "Runner#uncaught() called with invalid context", - this, - ); - } - if (err instanceof Pending) { - debug("uncaught(): caught a Pending"); - return; - } - // browser does not exit script when throwing in global.onerror() - if (this.allowUncaught && !utils$1.isBrowser()) { - debug("uncaught(): bubbling exception due to --allow-uncaught"); - throw err; - } + /** + * Check for global variable leaks. + * + * @private + */ + Runner.prototype.checkGlobals = function (test) { + if (!this.checkLeaks) { + return; + } + var ok = this._globals; + + var globals = this.globalProps(); + var leaks; + + if (test) { + ok = ok.concat(test._allowedGlobals || []); + } + + if (this.prevGlobalsLength === globals.length) { + return; + } + this.prevGlobalsLength = globals.length; + + leaks = filterLeaks(ok, globals); + this._globals = this._globals.concat(leaks); + + if (leaks.length) { + var msg = `global leak(s) detected: ${leaks.map((e) => `'${e}'`).join(", ")}`; + this.fail(test, new Error(msg)); + } + }; - if (this.state === constants$1.STATE_STOPPED) { - debug("uncaught(): throwing after run has completed!"); - throw err; - } + /** + * Create an error object for a test that was skipped due to a hook failure. + * + * @private + * @param {string} hookTitle - The title of the failed hook + * @param {*} hookError - The error from the failed hook (may not be an Error object) + * @returns {Error} The error object for the skipped test + */ + function createHookSkipError(hookTitle, hookError) { + // Handle falsy or undefined exceptions + if (!hookError) { + hookError = createInvalidExceptionError( + 'Hook "' + hookTitle + '" failed with exception: ' + hookError, + hookError, + ); + } + // Convert non-Error objects to Error + else if (!isError(hookError)) { + hookError = thrown2Error(hookError); + } + + var errorMessage = + 'Test skipped due to failure in hook "' + + hookTitle + + '": ' + + hookError.message; + var testError = new Error(errorMessage); + testError.stack = hookError.stack; + return testError; + } - if (err) { - debug("uncaught(): got truthy exception %O", err); - } else { - debug("uncaught(): undefined/falsy exception"); - err = createInvalidExceptionError( - "Caught falsy/undefined exception which would otherwise be uncaught. No stack trace found; try a debugger", - err, - ); - } + /** + * Fail all tests that are affected by a hook failure. + * This is used when the `failHookAffectedTests` option is enabled. + * + * @private + * @param {Suite} suite - The suite containing the affected tests + * @param {Error} hookError - The error from the failed hook + * @param {string} hookTitle - The title of the failed hook + */ + Runner.prototype.failAffectedTests = function (suite, hookError, hookTitle) { + if (!this._opts.failHookAffectedTests) { + return; + } + + var self = this; + var testError = createHookSkipError(hookTitle, hookError); + + // Recursively fail all tests in this suite and its child suites + function failTestsInSuite(s) { + s.tests.forEach(function (test) { + // Only fail tests that haven't been executed yet + if (!test.state) { + test.state = STATE_FAILED; + self.failures++; + self.emit(constants.EVENT_TEST_BEGIN, test); + self.emit(constants.EVENT_TEST_FAIL, test, testError); + self.emit(constants.EVENT_TEST_END, test); + } + }); + + s.suites.forEach(failTestsInSuite); + } + + failTestsInSuite(suite); + }; - if (!isError(err)) { - err = thrown2Error(err); - debug('uncaught(): converted "error" %o to Error', err); - } - err.uncaught = true; + /** + * Fail the given `test`. + * + * If `test` is a hook, failures work in the following pattern: + * - If bail, run corresponding `after each` and `after` hooks, + * then exit + * - Failed `before` hook skips all tests in a suite and subsuites, + * but jumps to corresponding `after` hook + * - Failed `before each` hook skips remaining tests in a + * suite and jumps to corresponding `after each` hook, + * which is run only once + * - Failed `after` hook does not alter execution order + * - Failed `after each` hook skips remaining tests in a + * suite and subsuites, but executes other `after each` + * hooks + * + * @private + * @param {Runnable} test + * @param {Error} err + * @param {boolean} [force=false] - Whether to fail a pending test. + */ + Runner.prototype.fail = function (test, err, force) { + force = force === true; + if (test.isPending() && !force) { + return; + } + if (this.state === constants.STATE_STOPPED) { + if (err.code === errorConstants.MULTIPLE_DONE) { + throw err; + } + throw createFatalError( + "Test failed after root suite execution completed!", + err, + ); + } + + ++this.failures; + debug("total number of failures: %d", this.failures); + test.state = STATE_FAILED; + + if (!isError(err)) { + err = thrown2Error(err); + } + + // Filter the stack traces + if (!this.fullStackTrace) { + const alreadyFiltered = new Set(); + let currentErr = err; + + while (currentErr && currentErr.stack && !alreadyFiltered.has(currentErr)) { + alreadyFiltered.add(currentErr); + + try { + currentErr.stack = stackFilter(currentErr.stack); + } catch { + // Ignore error as some environments do not take kindly to monkeying with the stack + } + + currentErr = currentErr.cause; + } + } + + this.emit(constants.EVENT_TEST_FAIL, test, err); + }; - var runnable = this.currentRunnable; + /** + * Run hook `name` callbacks and then invoke `fn()`. + * + * @private + * @param {string} name + * @param {Function} fn + */ + + Runner.prototype.hook = function (name, fn) { + if (this._opts.dryRun) return fn(); + + var suite = this.suite; + var hooks = suite.getHooks(name); + var self = this; + + function next(i) { + var hook = hooks[i]; + if (!hook) { + return fn(); + } + self.currentRunnable = hook; + + if (name === HOOK_TYPE_BEFORE_ALL) { + hook.ctx.currentTest = hook.parent.tests[0]; + } else if (name === HOOK_TYPE_AFTER_ALL) { + hook.ctx.currentTest = hook.parent.tests[hook.parent.tests.length - 1]; + } else { + hook.ctx.currentTest = self.test; + } + + setHookTitle(hook); + + hook.allowUncaught = self.allowUncaught; + + self.emit(constants.EVENT_HOOK_BEGIN, hook); + + if (!hook.listeners("error").length) { + self._addEventListener(hook, "error", function (err) { + self.fail(hook, err); + }); + } + + hook.run(function cbHookRun(err) { + var testError = hook.error(); + if (testError) { + self.fail(self.test, testError); + } + // conditional skip + if (hook.pending) { + if (name === HOOK_TYPE_AFTER_EACH) { + // TODO define and implement use case + if (self.test) { + self.test.pending = true; + } + } else if (name === HOOK_TYPE_BEFORE_EACH) { + if (self.test) { + self.test.pending = true; + } + self.emit(constants.EVENT_HOOK_END, hook); + hook.pending = false; // activates hook for next test + return fn(new Error("abort hookDown")); + } else if (name === HOOK_TYPE_BEFORE_ALL) { + suite.tests.forEach(function (test) { + test.pending = true; + }); + suite.suites.forEach(function (suite) { + suite.pending = true; + }); + hooks = []; + } else { + hook.pending = false; + var errForbid = createUnsupportedError("`this.skip` forbidden"); + self.fail(hook, errForbid); + return fn(errForbid); + } + } else if (err) { + self.fail(hook, err); + // If failHookAffectedTests is enabled, mark affected tests as failed + if (self._opts.failHookAffectedTests) { + if (name === HOOK_TYPE_BEFORE_ALL) { + self.failAffectedTests(self.suite, err, hook.title); + } else if (name === HOOK_TYPE_BEFORE_EACH) { + // Fail the current test + if (self.test && !self.test.state) { + var testError = createHookSkipError(hook.title, err); + + self.test.state = STATE_FAILED; + self.failures++; + self.emit(constants.EVENT_TEST_BEGIN, self.test); + self.emit(constants.EVENT_TEST_FAIL, self.test, testError); + self.emit(constants.EVENT_TEST_END, self.test); + } + // Store the hook error info for remaining tests + self._failedBeforeEachHook = { + error: err, + title: hook.title, + }; + } + } + // stop executing hooks, notify callee of hook err + return fn(err); + } + self.emit(constants.EVENT_HOOK_END, hook); + delete hook.ctx.currentTest; + setHookTitle(hook); + next(++i); + }); + + function setHookTitle(hook) { + hook.originalTitle = hook.originalTitle || hook.title; + if (hook.ctx && hook.ctx.currentTest) { + hook.title = `${hook.originalTitle} for "${hook.ctx.currentTest.title}"`; + } else { + var parentTitle; + if (hook.parent.title) { + parentTitle = hook.parent.title; + } else { + parentTitle = hook.parent.root ? "{root}" : ""; + } + hook.title = `${hook.originalTitle} in "${parentTitle}"`; + } + } + } + + Runner.immediately(function () { + next(0); + }); + }; - if (!runnable) { - runnable = new Runnable$1("Uncaught error outside test suite"); - debug("uncaught(): no current Runnable; created a phony one"); - runnable.parent = this.suite; + /** + * Run hook `name` for the given array of `suites` + * in order, and callback `fn(err, errSuite)`. + * + * @private + * @param {string} name + * @param {Array} suites + * @param {Function} fn + */ + Runner.prototype.hooks = function (name, suites, fn) { + var self = this; + var orig = this.suite; + + function next(suite) { + self.suite = suite; + + if (!suite) { + self.suite = orig; + return fn(); + } + + self.hook(name, function (err) { + if (err) { + var errSuite = self.suite; + self.suite = orig; + return fn(err, errSuite); + } + + next(suites.pop()); + }); + } + + next(suites.pop()); + }; - if (this.state === constants$1.STATE_RUNNING) { - debug("uncaught(): failing gracefully"); - this.fail(runnable, err); - } else { - // Can't recover from this failure - debug("uncaught(): test run has not yet started; unrecoverable"); - this.emit(constants$1.EVENT_RUN_BEGIN); - this.fail(runnable, err); - this.emit(constants$1.EVENT_RUN_END); - } + /** + * Run 'afterEach' hooks from bottom up. + * + * @param {String} name + * @param {Function} fn + * @private + */ + Runner.prototype.hookUp = function (name, fn) { + var suites = [this.suite].concat(this.parents()).reverse(); + this.hooks(name, suites, fn); + }; - return; - } + /** + * Run 'beforeEach' hooks from top level down. + * + * @param {String} name + * @param {Function} fn + * @private + */ + Runner.prototype.hookDown = function (name, fn) { + var suites = [this.suite].concat(this.parents()); + this.hooks(name, suites, fn); + }; - runnable.clearTimeout(); + /** + * Return an array of parent Suites from + * closest to furthest. + * + * @return {Array} + * @private + */ + Runner.prototype.parents = function () { + var suite = this.suite; + var suites = []; + while (suite.parent) { + suite = suite.parent; + suites.push(suite); + } + return suites; + }; - if (runnable.isFailed()) { - debug("uncaught(): Runnable has already failed"); - // Ignore error if already failed - return; - } else if (runnable.isPending()) { - debug("uncaught(): pending Runnable wound up failing!"); - // report 'pending test' retrospectively as failed - this.fail(runnable, err, true); - return; - } + /** + * Run the current test and callback `fn(err)`. + * + * @param {Function} fn + * @private + */ + Runner.prototype.runTest = function (fn) { + if (this._opts.dryRun) return Runner.immediately(fn); + + var self = this; + var test = this.test; + + if (!test) { + return; + } + + if (this.asyncOnly) { + test.asyncOnly = true; + } + this._addEventListener(test, "error", function (err) { + self.fail(test, err); + }); + if (this.allowUncaught) { + test.allowUncaught = true; + return test.run(fn); + } + try { + test.run(fn); + } catch (err) { + fn(err); + } + }; - // we cannot recover gracefully if a Runnable has already passed - // then fails asynchronously - if (runnable.isPassed()) { - debug("uncaught(): Runnable has already passed; bailing gracefully"); - this.fail(runnable, err); - this.abort(); - } else { - debug("uncaught(): forcing Runnable to complete with Error"); - return runnable.callback(err); - } - }; + /** + * Run tests in the given `suite` and invoke the callback `fn()` when complete. + * + * @private + * @param {Suite} suite + * @param {Function} fn + */ + Runner.prototype.runTests = function (suite, fn) { + var self = this; + var tests = suite.tests.slice(); + var test; + + function hookErr(err, errSuite, after) { + // before/after Each hook for errSuite failed: + var orig = self.suite; + + // If failHookAffectedTests is enabled and this is a beforeEach failure, + // mark remaining tests as failed + if ( + self._opts.failHookAffectedTests && + !after && + self._failedBeforeEachHook + ) { + // Fail all remaining tests in the suite + var remainingTests = tests.slice(); + remainingTests.forEach(function (t) { + if (!t.state) { + var testError = createHookSkipError( + self._failedBeforeEachHook.title, + self._failedBeforeEachHook.error, + ); + + t.state = STATE_FAILED; + self.failures++; + self.emit(constants.EVENT_TEST_BEGIN, t); + self.emit(constants.EVENT_TEST_FAIL, t, testError); + self.emit(constants.EVENT_TEST_END, t); + } + }); + // Clear the stored hook info + delete self._failedBeforeEachHook; + } + + // for failed 'after each' hook start from errSuite parent, + // otherwise start from errSuite itself + self.suite = after ? errSuite.parent : errSuite; + + if (self.suite) { + self.hookUp(HOOK_TYPE_AFTER_EACH, function (err2, errSuite2) { + self.suite = orig; + // some hooks may fail even now + if (err2) { + return hookErr(err2, errSuite2, true); + } + // report error suite + fn(errSuite); + }); + } else { + // there is no need calling other 'after each' hooks + self.suite = orig; + fn(errSuite); + } + } + + function next(err, errSuite) { + // if we bail after first err + if (self.failures && suite._bail) { + tests = []; + } + + if (self._abort) { + return fn(); + } + + if (err) { + return hookErr(err, errSuite, true); + } + + // next test + test = tests.shift(); + + // all done + if (!test) { + return fn(); + } + + // grep + var match = self._grep.test(test.fullTitle()); + if (self._invert) { + match = !match; + } + if (!match) { + // Run immediately only if we have defined a grep. When we + // define a grep — It can cause maximum callstack error if + // the grep is doing a large recursive loop by neglecting + // all tests. The run immediately function also comes with + // a performance cost. So we don't want to run immediately + // if we run the whole test suite, because running the whole + // test suite don't do any immediate recursive loops. Thus, + // allowing a JS runtime to breathe. + if (self._grep !== self._defaultGrep) { + Runner.immediately(next); + } else { + next(); + } + return; + } + + // static skip, no hooks are executed + if (test.isPending()) { + if (self.forbidPending) { + self.fail(test, new Error("Pending test forbidden"), true); + } else { + test.state = STATE_PENDING; + self.emit(constants.EVENT_TEST_PENDING, test); + } + self.emit(constants.EVENT_TEST_END, test); + return next(); + } + + // execute test and hook(s) + self.emit(constants.EVENT_TEST_BEGIN, (self.test = test)); + self.hookDown(HOOK_TYPE_BEFORE_EACH, function (err, errSuite) { + // conditional skip within beforeEach + if (test.isPending()) { + if (self.forbidPending) { + self.fail(test, new Error("Pending test forbidden"), true); + } else { + test.state = STATE_PENDING; + self.emit(constants.EVENT_TEST_PENDING, test); + } + self.emit(constants.EVENT_TEST_END, test); + // skip inner afterEach hooks below errSuite level + var origSuite = self.suite; + self.suite = errSuite || self.suite; + return self.hookUp(HOOK_TYPE_AFTER_EACH, function (e, eSuite) { + self.suite = origSuite; + next(e, eSuite); + }); + } + if (err) { + return hookErr(err, errSuite, false); + } + self.currentRunnable = self.test; + self.runTest(function (err) { + test = self.test; + // conditional skip within it + if (test.pending) { + if (self.forbidPending) { + self.fail(test, new Error("Pending test forbidden"), true); + } else { + test.state = STATE_PENDING; + self.emit(constants.EVENT_TEST_PENDING, test); + } + self.emit(constants.EVENT_TEST_END, test); + return self.hookUp(HOOK_TYPE_AFTER_EACH, next); + } else if (err) { + var retry = test.currentRetry(); + if (retry < test.retries()) { + var clonedTest = test.clone(); + clonedTest.currentRetry(retry + 1); + tests.unshift(clonedTest); + + self.emit(constants.EVENT_TEST_RETRY, test, err); + + // Early return + hook trigger so that it doesn't + // increment the count wrong + return self.hookUp(HOOK_TYPE_AFTER_EACH, next); + } else { + self.fail(test, err); + } + self.emit(constants.EVENT_TEST_END, test); + return self.hookUp(HOOK_TYPE_AFTER_EACH, next); + } + + test.state = STATE_PASSED; + self.emit(constants.EVENT_TEST_PASS, test); + self.emit(constants.EVENT_TEST_END, test); + self.hookUp(HOOK_TYPE_AFTER_EACH, next); + }); + }); + } + + this.next = next; + this.hookErr = hookErr; + next(); + }; - /** - * Run the root suite and invoke `fn(failures)` - * on completion. - * - * @public - * @memberof Runner - * @param {Function} fn - Callback when finished - * @param {RunnerOptions} [opts] - For subclasses - * @returns {Runner} Runner instance. - */ - Runner.prototype.run = function (fn, opts = {}) { - var rootSuite = this.suite; - var options = opts.options || {}; + /** + * Run the given `suite` and invoke the callback `fn()` when complete. + * + * @private + * @param {Suite} suite + * @param {Function} fn + */ + Runner.prototype.runSuite = function (suite, fn) { + var i = 0; + var self = this; + var total = this.grepTotal(suite); + + debug("runSuite(): running %s", suite.fullTitle()); + + if (!total || (self.failures && suite._bail)) { + debug("runSuite(): bailing"); + return fn(); + } + + this.emit(constants.EVENT_SUITE_BEGIN, (this.suite = suite)); + + function next(errSuite) { + if (errSuite) { + // current suite failed on a hook from errSuite + if (errSuite === suite) { + // if errSuite is current suite + // continue to the next sibling suite + return done(); + } + // errSuite is among the parents of current suite + // stop execution of errSuite and all sub-suites + return done(errSuite); + } + + if (self._abort) { + return done(); + } + + var curr = suite.suites[i++]; + if (!curr) { + return done(); + } + + // Avoid grep neglecting large number of tests causing a + // huge recursive loop and thus a maximum call stack error. + // See comment in `this.runTests()` for more information. + if (self._grep !== self._defaultGrep) { + Runner.immediately(function () { + self.runSuite(curr, next); + }); + } else { + self.runSuite(curr, next); + } + } + + function done(errSuite) { + self.suite = suite; + self.nextSuite = next; + + // remove reference to test + delete self.test; + + self.hook(HOOK_TYPE_AFTER_ALL, function () { + self.emit(constants.EVENT_SUITE_END, suite); + fn(errSuite); + }); + } + + this.nextSuite = next; + + this.hook(HOOK_TYPE_BEFORE_ALL, function (err) { + if (err) { + return done(); + } + self.runTests(suite, next); + }); + }; - debug("run(): got options: %O", options); - fn = fn || function () {}; + /** + * Handle uncaught exceptions within runner. + * + * This function is bound to the instance as `Runner#uncaught` at instantiation + * time. It's intended to be listening on the `Process.uncaughtException` event. + * In order to not leak EE listeners, we need to ensure no more than a single + * `uncaughtException` listener exists per `Runner`. The only way to do + * this--because this function needs the context (and we don't have lambdas)--is + * to use `Function.prototype.bind`. We need strict equality to unregister and + * _only_ unregister the _one_ listener we set from the + * `Process.uncaughtException` event; would be poor form to just remove + * everything. See {@link Runner#run} for where the event listener is registered + * and unregistered. + * @param {Error} err - Some uncaught error + * @private + */ + Runner.prototype._uncaught = function (err) { + // this is defensive to prevent future developers from mis-calling this function. + // it's more likely that it'd be called with the incorrect context--say, the global + // `process` object--than it would to be called with a context that is not a "subclass" + // of `Runner`. + if (!(this instanceof Runner)) { + throw createFatalError( + "Runner#uncaught() called with invalid context", + this, + ); + } + if (err instanceof PendingError) { + debug("uncaught(): caught a PendingError"); + return; + } + // browser does not exit script when throwing in global.onerror() + if (this.allowUncaught && !utils.isBrowser()) { + debug("uncaught(): bubbling exception due to --allow-uncaught"); + throw err; + } + + if (this.state === constants.STATE_STOPPED) { + debug("uncaught(): throwing after run has completed!"); + throw err; + } + + if (err) { + debug("uncaught(): got truthy exception %O", err); + } else { + debug("uncaught(): undefined/falsy exception"); + err = createInvalidExceptionError( + "Caught falsy/undefined exception which would otherwise be uncaught. No stack trace found; try a debugger", + err, + ); + } + + if (!isError(err)) { + err = thrown2Error(err); + debug('uncaught(): converted "error" %o to Error', err); + } + err.uncaught = true; + + var runnable = this.currentRunnable; + + if (!runnable) { + runnable = new Runnable("Uncaught error outside test suite"); + debug("uncaught(): no current Runnable; created a phony one"); + runnable.parent = this.suite; + + if (this.state === constants.STATE_RUNNING) { + debug("uncaught(): failing gracefully"); + this.fail(runnable, err); + } else { + // Can't recover from this failure + debug("uncaught(): test run has not yet started; unrecoverable"); + this.emit(constants.EVENT_RUN_BEGIN); + this.fail(runnable, err); + this.emit(constants.EVENT_RUN_END); + } + + return; + } + + runnable.clearTimeout(); + + if (runnable.isFailed()) { + debug("uncaught(): Runnable has already failed"); + // Ignore error if already failed + return; + } else if (runnable.isPending()) { + debug("uncaught(): pending Runnable wound up failing!"); + // report 'pending test' retrospectively as failed + this.fail(runnable, err, true); + return; + } + + // we cannot recover gracefully if a Runnable has already passed + // then fails asynchronously + if (runnable.isPassed()) { + debug("uncaught(): Runnable has already passed; bailing gracefully"); + this.fail(runnable, err); + this.abort(); + } else { + debug("uncaught(): forcing Runnable to complete with Error"); + return runnable.callback(err); + } + }; - const end = () => { - if (!this.total && this._opts.failZero) this.failures = 1; + /** + * Run the root suite and invoke `fn(failures)` + * on completion. + * + * @public + * @memberof Runner + * @param {Function} fn - Callback when finished + * @param {RunnerOptions} [opts] - For subclasses + * @returns {Runner} Runner instance. + */ + Runner.prototype.run = function (fn, opts = {}) { + var rootSuite = this.suite; + var options = opts.options || {}; + + debug("run(): got options: %O", options); + fn = fn || function () {}; + + const end = () => { + if (!this.total && this._opts.failZero) this.failures = 1; + + debug("run(): root suite completed; emitting %s", constants.EVENT_RUN_END); + this.emit(constants.EVENT_RUN_END); + }; + + const begin = () => { + debug("run(): emitting %s", constants.EVENT_RUN_BEGIN); + this.emit(constants.EVENT_RUN_BEGIN); + debug("run(): emitted %s", constants.EVENT_RUN_BEGIN); + + this.runSuite(rootSuite, end); + }; + + const prepare = () => { + debug("run(): starting"); + // If there is an `only` filter + if (rootSuite.hasOnly()) { + rootSuite.filterOnly(); + debug("run(): filtered exclusive Runnables"); + } + this.state = constants.STATE_RUNNING; + if (this._opts.delay) { + this.emit(constants.EVENT_DELAY_END); + debug('run(): "delay" ended'); + } + + return begin(); + }; + + // references cleanup to avoid memory leaks + if (this._opts.cleanReferencesAfterRun) { + this.on(constants.EVENT_SUITE_END, (suite) => { + suite.cleanReferences(); + }); + } + + // callback + this.on(constants.EVENT_RUN_END, function () { + this.state = constants.STATE_STOPPED; + debug("run(): emitted %s", constants.EVENT_RUN_END); + fn(this.failures); + }); + + this._removeEventListener(browser$1$1, "uncaughtException", this.uncaught); + this._removeEventListener(browser$1$1, "unhandledRejection", this.unhandled); + this._addEventListener(browser$1$1, "uncaughtException", this.uncaught); + this._addEventListener(browser$1$1, "unhandledRejection", this.unhandled); + + if (this._opts.delay) { + // for reporters, I guess. + // might be nice to debounce some dots while we wait. + this.emit(constants.EVENT_DELAY_BEGIN, rootSuite); + rootSuite.once(EVENT_ROOT_SUITE_RUN, prepare); + debug("run(): waiting for green light due to --delay"); + } else { + Runner.immediately(prepare); + } + + return this; + }; - debug("run(): root suite completed; emitting %s", constants$1.EVENT_RUN_END); - this.emit(constants$1.EVENT_RUN_END); - }; + /** + * Toggle partial object linking behavior; used for building object references from + * unique ID's. Does nothing in serial mode, because the object references already exist. + * Subclasses can implement this (e.g., `ParallelBufferedRunner`) + * @abstract + * @param {boolean} [value] - If `true`, enable partial object linking, otherwise disable + * @returns {Runner} + * @chainable + * @public + * @example + * // this reporter needs proper object references when run in parallel mode + * class MyReporter { + * constructor(runner) { + * runner.linkPartialObjects(true) + * .on(EVENT_SUITE_BEGIN, suite => { + * // this Suite may be the same object... + * }) + * .on(EVENT_TEST_BEGIN, test => { + * // ...as the `test.parent` property + * }); + * } + * } + */ + Runner.prototype.linkPartialObjects = function () { + return this; + }; - const begin = () => { - debug("run(): emitting %s", constants$1.EVENT_RUN_BEGIN); - this.emit(constants$1.EVENT_RUN_BEGIN); - debug("run(): emitted %s", constants$1.EVENT_RUN_BEGIN); + /* + * Like {@link Runner#run}, but does not accept a callback and returns a `Promise` instead of a `Runner`. + * This function cannot reject; an `unhandledRejection` event will bubble up to the `process` object instead. + * @public + * @memberof Runner + * @param {Object} [opts] - Options for {@link Runner#run} + * @returns {Promise} Failure count + */ + Runner.prototype.runAsync = async function runAsync(opts = {}) { + return new Promise((resolve) => { + this.run(resolve, opts); + }); + }; - this.runSuite(rootSuite, end); - }; + /** + * Cleanly abort execution. + * + * @memberof Runner + * @public + * @return {Runner} Runner instance. + */ + Runner.prototype.abort = function () { + debug("abort(): aborting"); + this._abort = true; + + return this; + }; - const prepare = () => { - debug("run(): starting"); - // If there is an `only` filter - if (rootSuite.hasOnly()) { - rootSuite.filterOnly(); - debug("run(): filtered exclusive Runnables"); - } - this.state = constants$1.STATE_RUNNING; - if (this._opts.delay) { - this.emit(constants$1.EVENT_DELAY_END); - debug('run(): "delay" ended'); - } + /** + * Returns `true` if Mocha is running in parallel mode. For reporters. + * + * Subclasses should return an appropriate value. + * @public + * @returns {false} + */ + Runner.prototype.isParallelMode = function isParallelMode() { + return false; + }; - return begin(); - }; + /** + * Configures an alternate reporter for worker processes to use. Subclasses + * using worker processes should implement this. + * @public + * @param {string} path - Absolute path to alternate reporter for worker processes to use + * @returns {Runner} + * @throws When in serial mode + * @chainable + * @abstract + */ + Runner.prototype.workerReporter = function () { + throw createUnsupportedError("workerReporter() not supported in serial mode"); + }; - // references cleanup to avoid memory leaks - if (this._opts.cleanReferencesAfterRun) { - this.on(constants$1.EVENT_SUITE_END, (suite) => { - suite.cleanReferences(); - }); - } + /** + * Filter leaks with the given globals flagged as `ok`. + * + * @private + * @param {Array} ok + * @param {Array} globals + * @return {Array} + */ + function filterLeaks(ok, globals) { + return globals.filter(function (key) { + // Firefox and Chrome exposes iframes as index inside the window object + if (/^\d+/.test(key)) { + return false; + } + + // in firefox + // if runner runs in an iframe, this iframe's window.getInterface method + // not init at first it is assigned in some seconds + if (commonjsGlobal.navigator && /^getInterface/.test(key)) { + return false; + } + + // an iframe could be approached by window[iframeIndex] + // in ie6,7,8 and opera, iframeIndex is enumerable, this could cause leak + if (commonjsGlobal.navigator && /^\d+/.test(key)) { + return false; + } + + // Opera and IE expose global variables for HTML element IDs (issue #243) + if (/^mocha-/.test(key)) { + return false; + } + + var matched = ok.filter(function (ok) { + if (~ok.indexOf("*")) { + return key.indexOf(ok.split("*")[0]) === 0; + } + return key === ok; + }); + return !matched.length && (!commonjsGlobal.navigator || key !== "onerror"); + }); + } - // callback - this.on(constants$1.EVENT_RUN_END, function () { - this.state = constants$1.STATE_STOPPED; - debug("run(): emitted %s", constants$1.EVENT_RUN_END); - fn(this.failures); - }); + /** + * Check if argument is an instance of Error object or a duck-typed equivalent. + * + * @private + * @param {Object} err - object to check + * @param {string} err.message - error message + * @returns {boolean} + */ + function isError(err) { + return err instanceof Error || (err && typeof err.message === "string"); + } - this._removeEventListener(process, "uncaughtException", this.uncaught); - this._removeEventListener(process, "unhandledRejection", this.unhandled); - this._addEventListener(process, "uncaughtException", this.uncaught); - this._addEventListener(process, "unhandledRejection", this.unhandled); - - if (this._opts.delay) { - // for reporters, I guess. - // might be nice to debounce some dots while we wait. - this.emit(constants$1.EVENT_DELAY_BEGIN, rootSuite); - rootSuite.once(EVENT_ROOT_SUITE_RUN, prepare); - debug("run(): waiting for green light due to --delay"); - } else { - Runner.immediately(prepare); - } + /** + * + * Converts thrown non-extensible type into proper Error. + * + * @private + * @param {*} thrown - Non-extensible type thrown by code + * @return {Error} + */ + function thrown2Error(err) { + return new Error( + `the ${utils.canonicalType(err)} ${stringify( + err, + )} was thrown, throw an Error :)`, + ); + } - return this; - }; + Runner.constants = constants; - /** - * Toggle partial object linking behavior; used for building object references from - * unique ID's. Does nothing in serial mode, because the object references already exist. - * Subclasses can implement this (e.g., `ParallelBufferedRunner`) - * @abstract - * @param {boolean} [value] - If `true`, enable partial object linking, otherwise disable - * @returns {Runner} - * @chainable - * @public - * @example - * // this reporter needs proper object references when run in parallel mode - * class MyReporter { - * constructor(runner) { - * runner.linkPartialObjects(true) - * .on(EVENT_SUITE_BEGIN, suite => { - * // this Suite may be the same object... - * }) - * .on(EVENT_TEST_BEGIN, test => { - * // ...as the `test.parent` property - * }); - * } - * } - */ - Runner.prototype.linkPartialObjects = function () { - return this; - }; + /** + * Node.js' `EventEmitter` + * @external EventEmitter + * @see {@link https://nodejs.org/api/events.html#events_class_eventemitter} + */ - /* - * Like {@link Runner#run}, but does not accept a callback and returns a `Promise` instead of a `Runner`. - * This function cannot reject; an `unhandledRejection` event will bubble up to the `process` object instead. - * @public - * @memberof Runner - * @param {Object} [opts] - Options for {@link Runner#run} - * @returns {Promise} Failure count - */ - Runner.prototype.runAsync = async function runAsync(opts = {}) { - return new Promise((resolve) => { - this.run(resolve, opts); - }); - }; + runner = Runner; + return runner; + } - /** - * Cleanly abort execution. - * - * @memberof Runner - * @public - * @return {Runner} Runner instance. - */ - Runner.prototype.abort = function () { - debug("abort(): aborting"); - this._abort = true; + var runnerExports = requireRunner(); + var Runner = /*@__PURE__*/getDefaultExportFromCjs(runnerExports); - return this; - }; + const { constants: constants$f } = Runner; + var EVENT_TEST_PASS$c = constants$f.EVENT_TEST_PASS; + var EVENT_TEST_FAIL$c = constants$f.EVENT_TEST_FAIL; + + const isBrowser = utils.isBrowser(); + + function getBrowserWindowSize() { + if ("innerHeight" in global$1) { + return [global$1.innerHeight, global$1.innerWidth]; + } + // In a Web Worker, the DOM Window is not available. + return [640, 480]; + } /** - * Returns `true` if Mocha is running in parallel mode. For reporters. - * - * Subclasses should return an appropriate value. - * @public - * @returns {false} + * Check if both stdio streams are associated with a tty. */ - Runner.prototype.isParallelMode = function isParallelMode() { - return false; - }; + + var isatty = isBrowser || (browser$1$1.stdout.isTTY && browser$1$1.stderr.isTTY); /** - * Configures an alternate reporter for worker processes to use. Subclasses - * using worker processes should implement this. - * @public - * @param {string} path - Absolute path to alternate reporter for worker processes to use - * @returns {Runner} - * @throws When in serial mode - * @chainable - * @abstract + * Save log references to avoid tests interfering (see GH-3604). */ - Runner.prototype.workerReporter = function () { - throw createUnsupportedError$1("workerReporter() not supported in serial mode"); - }; + var consoleLog = console.log; /** - * Filter leaks with the given globals flagged as `ok`. - * - * @private - * @param {Array} ok - * @param {Array} globals - * @return {Array} + * @abstract + * @description + * All other reporters generally inherit from this reporter. */ - function filterLeaks(ok, globals) { - return globals.filter(function (key) { - // Firefox and Chrome exposes iframes as index inside the window object - if (/^\d+/.test(key)) { - return false; - } - - // in firefox - // if runner runs in an iframe, this iframe's window.getInterface method - // not init at first it is assigned in some seconds - if (commonjsGlobal.navigator && /^getInterface/.test(key)) { - return false; - } + class Base { + /** + * Constructs a new `Base` reporter instance. + * + * @public + * @memberof Mocha.reporters + * @param {Runner} runner - Instance triggers reporter actions. + * @param {Object} [options] - runner options + */ + constructor(runner, options) { + var failures = (this.failures = []); - // an iframe could be approached by window[iframeIndex] - // in ie6,7,8 and opera, iframeIndex is enumerable, this could cause leak - if (commonjsGlobal.navigator && /^\d+/.test(key)) { - return false; + if (!runner) { + throw new TypeError("Missing runner argument"); } + this.options = options || {}; + this.runner = runner; + this.stats = runner.stats; // assigned so Reporters keep a closer reference - // Opera and IE expose global variables for HTML element IDs (issue #243) - if (/^mocha-/.test(key)) { - return false; + var maxDiffSizeOpt = + this.options.reporterOption && this.options.reporterOption.maxDiffSize; + if (maxDiffSizeOpt !== undefined && !isNaN(Number(maxDiffSizeOpt))) { + Base.maxDiffSize = Number(maxDiffSizeOpt); } - var matched = ok.filter(function (ok) { - if (~ok.indexOf("*")) { - return key.indexOf(ok.split("*")[0]) === 0; + runner.on(EVENT_TEST_PASS$c, function (test) { + if (test.duration > test.slow()) { + test.speed = "slow"; + } else if (test.duration > test.slow() / 2) { + test.speed = "medium"; + } else { + test.speed = "fast"; } - return key === ok; }); - return !matched.length && (!commonjsGlobal.navigator || key !== "onerror"); - }); - } - /** - * Check if argument is an instance of Error object or a duck-typed equivalent. - * - * @private - * @param {Object} err - object to check - * @param {string} err.message - error message - * @returns {boolean} - */ - function isError(err) { - return err instanceof Error || (err && typeof err.message === "string"); - } + runner.on(EVENT_TEST_FAIL$c, function (test, err) { + if (Base.showDiff(err)) { + stringifyDiffObjs(err); + } + // more than one error per test + if (test.err && err instanceof Error) { + test.err.multiple = (test.err.multiple || []).concat(err); + } else { + test.err = err; + } + failures.push(test); + }); + } - /** - * - * Converts thrown non-extensible type into proper Error. - * - * @private - * @param {*} thrown - Non-extensible type thrown by code - * @return {Error} - */ - function thrown2Error(err) { - return new Error( - `the ${utils$1.canonicalType(err)} ${stringify( - err, - )} was thrown, throw an Error :)`, - ); - } + /** + * Outputs common epilogue used by many of the bundled reporters. + * + * @public + * @memberof Mocha.reporters + */ + epilogue() { + var stats = this.stats; + var fmt; - Runner.constants = constants$1; + Base.consoleLog(); - /** - * Node.js' `EventEmitter` - * @external EventEmitter - * @see {@link https://nodejs.org/api/events.html#events_class_eventemitter} - */ + // passes + fmt = + Base.color("bright pass", " ") + + Base.color("green", " %d passing") + + Base.color("light", " (%s)"); - var runner = Runner; + Base.consoleLog(fmt, stats.passes || 0, ms(stats.duration)); - (function (module, exports) { + // pending + if (stats.pending) { + fmt = Base.color("pending", " ") + Base.color("pending", " %d pending"); - /** - * @typedef {import('../runner.js')} Runner - * @typedef {import('../test.js')} Test - * @typedef {import('../types.d.ts').FullErrorStack} FullErrorStack - */ + Base.consoleLog(fmt, stats.pending); + } - /** - * @module Base - */ - /** - * Module dependencies. - */ + // failures + if (stats.failures) { + fmt = Base.color("fail", " %d failing"); - var diff = lib; - var milliseconds = ms$1; - var utils = utils$3; - var supportsColor = require$$18; - var symbols = browser$1; - var constants = runner.constants; - var EVENT_TEST_PASS = constants.EVENT_TEST_PASS; - var EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL; + Base.consoleLog(fmt, stats.failures); - const isBrowser = utils.isBrowser(); + Base.list(this.failures); + Base.consoleLog(); + } - function getBrowserWindowSize() { - if ("innerHeight" in commonjsGlobal) { - return [commonjsGlobal.innerHeight, commonjsGlobal.innerWidth]; + Base.consoleLog(); } - // In a Web Worker, the DOM Window is not available. - return [640, 480]; } - /** - * Expose `Base`. - */ - - exports = module.exports = Base; - - /** - * Check if both stdio streams are associated with a tty. - */ - - var isatty = isBrowser || (process.stdout.isTTY && process.stderr.isTTY); + Base.consoleLog = consoleLog; - /** - * Save log references to avoid tests interfering (see GH-3604). - */ - var consoleLog = console.log; + Base.abstract = true; /** * Enable coloring by default, except in the browser interface. */ - - exports.useColors = + Base.useColors = !isBrowser && - (supportsColor.stdout || process.env.MOCHA_COLORS !== undefined); + (supportsColor.stdout || browser$1$1.env.MOCHA_COLORS !== undefined); /** * Inline diffs instead of +/- */ - exports.inlineDiffs = false; + Base.inlineDiffs = false; /** * Truncate diffs longer than this value to avoid slow performance */ - exports.maxDiffSize = 8192; + Base.maxDiffSize = 8192; /** * Default color map. */ - exports.colors = { + Base.colors = { pass: 90, fail: 31, "bright pass": 92, @@ -16498,9 +11406,9 @@ * Default symbol map. */ - exports.symbols = { - ok: symbols.success, - err: symbols.error, + Base.symbols = { + ok: utils.logSymbols.success, + err: utils.logSymbols.error, dot: ".", comma: ",", bang: "!", @@ -16517,26 +11425,26 @@ * @param {string} str * @return {string} */ - var color = (exports.color = function (type, str) { - if (!exports.useColors) { + Base.color = function (type, str) { + if (!Base.useColors) { return String(str); } - return "\u001b[" + exports.colors[type] + "m" + str + "\u001b[0m"; - }); + return "\u001b[" + Base.colors[type] + "m" + str + "\u001b[0m"; + }; /** * Expose term window size, with some defaults for when stderr is not a tty. */ - exports.window = { + Base.window = { width: 75, }; if (isatty) { if (isBrowser) { - exports.window.width = getBrowserWindowSize()[1]; + Base.window.width = getBrowserWindowSize()[1]; } else { - exports.window.width = process.stdout.getWindowSize(1)[0]; + Base.window.width = browser$1$1.stdout.getWindowSize(1)[0]; } } @@ -16544,44 +11452,113 @@ * Expose some basic cursor interactions that are common among reporters. */ - exports.cursor = { + Base.cursor = { hide: function () { - isatty && process.stdout.write("\u001b[?25l"); + isatty && browser$1$1.stdout.write("\u001b[?25l"); }, show: function () { - isatty && process.stdout.write("\u001b[?25h"); + isatty && browser$1$1.stdout.write("\u001b[?25h"); }, deleteLine: function () { - isatty && process.stdout.write("\u001b[2K"); + isatty && browser$1$1.stdout.write("\u001b[2K"); }, beginningOfLine: function () { - isatty && process.stdout.write("\u001b[0G"); + isatty && browser$1$1.stdout.write("\u001b[0G"); }, CR: function () { if (isatty) { - exports.cursor.deleteLine(); - exports.cursor.beginningOfLine(); + Base.cursor.deleteLine(); + Base.cursor.beginningOfLine(); } else { - process.stdout.write("\r"); + browser$1$1.stdout.write("\r"); } }, }; - var showDiff = (exports.showDiff = function (err) { - return ( - err && - err.showDiff !== false && - sameType(err.actual, err.expected) && - err.expected !== undefined - ); - }); + Base.showDiff = function (err) { + return ( + err && + err.showDiff !== false && + sameType(err.actual, err.expected) && + err.expected !== undefined + ); + }; + + /** + * Estimate the serialized size of a value. + * Returns -1 if the value is too complex to estimate safely. + * + * @private + * @param {*} val + * @param {number} maxDepth + * @param {Set<*>} [seen] + * @returns {number} + */ + function estimateSize(val, maxDepth, seen) { + if (maxDepth <= 0) return -1; + + seen = seen || new Set(); + + const type = typeof val; + if (type === "string") return val.length; + if (type === "number" || type === "boolean") return 8; + if (val === null || val === undefined) return 4; + + // Avoid circular references + if (type === "object") { + if (seen.has(val)) return -1; + seen.add(val); + + // Special handling for Buffers - they can be massive + if (typeof Buffer !== "undefined" && Buffer.isBuffer(val)) { + return val.length > 10000 ? -1 : val.length * 2; + } + + let size = 2; // {} or [] + try { + const keys = Object.keys(val); + if (keys.length > 1000) return -1; // Too many keys + + for (const key of keys) { + const childSize = estimateSize(val[key], maxDepth - 1, seen); + if (childSize === -1) return -1; + size += key.length + childSize + 4; // key + value + formatting + if (size > 100000) return -1; // Bail early if getting huge + } + } catch { + return -1; + } + + seen.delete(val); + return size; + } + + return 50; // Default estimate for other types + } function stringifyDiffObjs(err) { if (!utils.isString(err.actual) || !utils.isString(err.expected)) { + // Estimate size before stringifying to avoid hangs + const maxSafeSize = Base.maxDiffSize || 8192; + const actualSize = estimateSize(err.actual, 10); + const expectedSize = estimateSize(err.expected, 10); + + if ( + actualSize === -1 || + expectedSize === -1 || + actualSize > maxSafeSize || + expectedSize > maxSafeSize + ) { + // Values too large/complex - provide safe fallback + err.actual = "[object too large to diff]"; + err.expected = "[object too large to diff]"; + return; + } + err.actual = utils.stringify(err.actual); err.expected = utils.stringify(err.expected); } @@ -16599,32 +11576,32 @@ * @return {string} Diff */ - var generateDiff = (exports.generateDiff = function (actual, expected) { + Base.generateDiff = function (actual, expected) { try { - var maxLen = exports.maxDiffSize; + var maxLen = Base.maxDiffSize; var skipped = 0; if (maxLen > 0) { skipped = Math.max(actual.length - maxLen, expected.length - maxLen); actual = actual.slice(0, maxLen); expected = expected.slice(0, maxLen); } - let result = exports.inlineDiffs + let result = Base.inlineDiffs ? inlineDiff(actual, expected) : unifiedDiff(actual, expected); if (skipped > 0) { result = `${result}\n [mocha] output truncated to ${maxLen} characters, see "maxDiffSize" reporter-option\n`; } return result; - } catch (err) { + } catch { var msg = "\n " + - color("diff added", "+ expected") + + Base.color("diff added", "+ expected") + " " + - color("diff removed", "- actual: failed to generate Mocha diff") + + Base.color("diff removed", "- actual: failed to generate Mocha diff") + "\n"; return msg; } - }); + }; /** * Traverses err.cause and returns all stack traces @@ -16688,15 +11665,15 @@ * @param {Object[]} failures - Each is Test instance with corresponding * Error property */ - exports.list = function (failures) { + Base.list = function (failures) { var multipleErr, multipleTest; Base.consoleLog(); failures.forEach(function (test, i) { // format var fmt = - color("error title", " %s) %s:\n") + - color("error message", " %s") + - color("error stack", "\n%s\n"); + Base.color("error title", " %s) %s:\n") + + Base.color("error message", " %s") + + Base.color("error stack", "\n%s\n"); // msg var err; @@ -16717,14 +11694,15 @@ msg = "Uncaught " + msg; } // explicitly show diff - if (!exports.hideDiff && showDiff(err)) { + if (!Base.hideDiff && Base.showDiff(err)) { stringifyDiffObjs(err); fmt = - color("error title", " %s) %s:\n%s") + color("error stack", "\n%s\n"); + Base.color("error title", " %s) %s:\n%s") + + Base.color("error stack", "\n%s\n"); var match = message.match(/^([^:]+): expected/); - msg = "\n " + color("error message", match ? match[1] : msg); + msg = "\n " + Base.color("error message", match ? match[1] : msg); - msg += generateDiff(err.actual, err.expected); + msg += Base.generateDiff(err.actual, err.expected); } // indent stack trace @@ -16746,98 +11724,6 @@ }); }; - /** - * Constructs a new `Base` reporter instance. - * - * @description - * All other reporters generally inherit from this reporter. - * - * @public - * @class - * @memberof Mocha.reporters - * @param {Runner} runner - Instance triggers reporter actions. - * @param {Object} [options] - runner options - */ - function Base(runner, options) { - var failures = (this.failures = []); - - if (!runner) { - throw new TypeError("Missing runner argument"); - } - this.options = options || {}; - this.runner = runner; - this.stats = runner.stats; // assigned so Reporters keep a closer reference - - var maxDiffSizeOpt = - this.options.reporterOption && this.options.reporterOption.maxDiffSize; - if (maxDiffSizeOpt !== undefined && !isNaN(Number(maxDiffSizeOpt))) { - exports.maxDiffSize = Number(maxDiffSizeOpt); - } - - runner.on(EVENT_TEST_PASS, function (test) { - if (test.duration > test.slow()) { - test.speed = "slow"; - } else if (test.duration > test.slow() / 2) { - test.speed = "medium"; - } else { - test.speed = "fast"; - } - }); - - runner.on(EVENT_TEST_FAIL, function (test, err) { - if (showDiff(err)) { - stringifyDiffObjs(err); - } - // more than one error per test - if (test.err && err instanceof Error) { - test.err.multiple = (test.err.multiple || []).concat(err); - } else { - test.err = err; - } - failures.push(test); - }); - } - - /** - * Outputs common epilogue used by many of the bundled reporters. - * - * @public - * @memberof Mocha.reporters - */ - Base.prototype.epilogue = function () { - var stats = this.stats; - var fmt; - - Base.consoleLog(); - - // passes - fmt = - color("bright pass", " ") + - color("green", " %d passing") + - color("light", " (%s)"); - - Base.consoleLog(fmt, stats.passes || 0, milliseconds(stats.duration)); - - // pending - if (stats.pending) { - fmt = color("pending", " ") + color("pending", " %d pending"); - - Base.consoleLog(fmt, stats.pending); - } - - // failures - if (stats.failures) { - fmt = color("fail", " %d failing"); - - Base.consoleLog(fmt, stats.failures); - - Base.list(this.failures); - Base.consoleLog(); - } - - Base.consoleLog(); - }; - /** * Pads the given `str` to `len`. * @@ -16868,7 +11754,7 @@ var width = String(lines.length).length; msg = lines .map(function (str, i) { - return pad(++i, width) + " |" + " " + str; + return pad(i + 1, width) + " |" + " " + str; }) .join("\n"); } @@ -16876,9 +11762,9 @@ // legend msg = "\n" + - color("diff removed inline", "actual") + + Base.color("diff removed inline", "actual") + " " + - color("diff added inline", "expected") + + Base.color("diff added inline", "expected") + "\n\n" + msg + "\n"; @@ -16916,7 +11802,7 @@ function notBlank(line) { return typeof line !== "undefined" && line !== null; } - var msg = diff.createPatch("string", actual, expected); + var msg = createPatch("string", actual, expected); var lines = msg.split("\n").splice(5); return ( "\n " + @@ -16937,8 +11823,7 @@ * @return {string} the diff */ function errorDiff(actual, expected) { - return diff - .diffWordsWithSpace(actual, expected) + return diffWordsWithSpace(actual, expected) .map(function (str) { if (str.added) { return colorLines("diff added inline", str.value); @@ -16963,7 +11848,7 @@ return str .split("\n") .map(function (str) { - return color(name, str); + return Base.color(name, str); }) .join("\n"); } @@ -16985,294 +11870,240 @@ return objToString.call(a) === objToString.call(b); } - Base.consoleLog = consoleLog; - - Base.abstract = true; - }(base$1, base$1.exports)); - - var dot = {exports: {}}; - - (function (module, exports) { - - /** - * @typedef {import('../runner.js')} Runner - */ - - /** - * @module Dot - */ - /** - * Module dependencies. - */ + var base = /*#__PURE__*/Object.freeze({ + __proto__: null, + Base: Base + }); - var Base = base$1.exports; - var inherits = utils$3.inherits; - var constants = runner.constants; - var EVENT_TEST_PASS = constants.EVENT_TEST_PASS; - var EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL; - var EVENT_RUN_BEGIN = constants.EVENT_RUN_BEGIN; - var EVENT_TEST_PENDING = constants.EVENT_TEST_PENDING; - var EVENT_RUN_END = constants.EVENT_RUN_END; + var require$$0 = /*@__PURE__*/getAugmentedNamespace(base); - /** - * Expose `Dot`. - */ + var { constants: constants$e } = Runner; + var EVENT_TEST_PASS$b = constants$e.EVENT_TEST_PASS; + var EVENT_TEST_FAIL$b = constants$e.EVENT_TEST_FAIL; + var EVENT_RUN_BEGIN$9 = constants$e.EVENT_RUN_BEGIN; + var EVENT_TEST_PENDING$8 = constants$e.EVENT_TEST_PENDING; + var EVENT_RUN_END$d = constants$e.EVENT_RUN_END; - module.exports = Dot; + class Dot extends Base { + static description = "dot matrix representation"; - /** - * Constructs a new `Dot` reporter instance. - * - * @public - * @class - * @memberof Mocha.reporters - * @extends Mocha.reporters.Base - * @param {Runner} runner - Instance triggers reporter actions. - * @param {Object} [options] - runner options - */ - function Dot(runner, options) { - Base.call(this, runner, options); + /** + * Constructs a new `Dot` reporter instance. + * + * @public + * @memberof Mocha.reporters + * @extends Mocha.reporters.Base + * @param {Runner} runner - Instance triggers reporter actions. + * @param {Object} [options] - runner options + */ + constructor(runner, options) { + super(runner, options); - var self = this; - var width = (Base.window.width * 0.75) | 0; - var n = -1; + var self = this; + var width = (Base.window.width * 0.75) | 0; + var n = -1; - runner.on(EVENT_RUN_BEGIN, function () { - process.stdout.write("\n"); - }); + runner.on(EVENT_RUN_BEGIN$9, function () { + browser$1$1.stdout.write("\n"); + }); - runner.on(EVENT_TEST_PENDING, function () { - if (++n % width === 0) { - process.stdout.write("\n "); - } - process.stdout.write(Base.color("pending", Base.symbols.comma)); - }); + runner.on(EVENT_TEST_PENDING$8, function () { + if (++n % width === 0) { + browser$1$1.stdout.write("\n "); + } + browser$1$1.stdout.write(Base.color("pending", Base.symbols.comma)); + }); - runner.on(EVENT_TEST_PASS, function (test) { - if (++n % width === 0) { - process.stdout.write("\n "); - } - if (test.speed === "slow") { - process.stdout.write(Base.color("bright yellow", Base.symbols.dot)); - } else { - process.stdout.write(Base.color(test.speed, Base.symbols.dot)); - } - }); + runner.on(EVENT_TEST_PASS$b, function (test) { + if (++n % width === 0) { + browser$1$1.stdout.write("\n "); + } + if (test.speed === "slow") { + browser$1$1.stdout.write(Base.color("bright yellow", Base.symbols.dot)); + } else { + browser$1$1.stdout.write(Base.color(test.speed, Base.symbols.dot)); + } + }); - runner.on(EVENT_TEST_FAIL, function () { - if (++n % width === 0) { - process.stdout.write("\n "); - } - process.stdout.write(Base.color("fail", Base.symbols.bang)); - }); + runner.on(EVENT_TEST_FAIL$b, function () { + if (++n % width === 0) { + browser$1$1.stdout.write("\n "); + } + browser$1$1.stdout.write(Base.color("fail", Base.symbols.bang)); + }); - runner.once(EVENT_RUN_END, function () { - process.stdout.write("\n"); - self.epilogue(); - }); + runner.once(EVENT_RUN_END$d, function () { + browser$1$1.stdout.write("\n"); + self.epilogue(); + }); + } } - /** - * Inherit from `Base.prototype`. - */ - inherits(Dot, Base); - - Dot.description = "dot matrix representation"; - }(dot)); - - var doc = {exports: {}}; - - (function (module, exports) { - - /** - * @typedef {import('../runner.js')} Runner - */ - - /** - * @module Doc - */ - /** - * Module dependencies. - */ + var dot = /*#__PURE__*/Object.freeze({ + __proto__: null, + Dot: Dot + }); - var Base = base$1.exports; - var utils = utils$3; - var constants = runner.constants; - var EVENT_TEST_PASS = constants.EVENT_TEST_PASS; - var EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL; - var EVENT_SUITE_BEGIN = constants.EVENT_SUITE_BEGIN; - var EVENT_SUITE_END = constants.EVENT_SUITE_END; + var require$$1 = /*@__PURE__*/getAugmentedNamespace(dot); /** - * Expose `Doc`. + * @typedef {import('../runner.cjs')} Runner */ - module.exports = Doc; - - /** - * Constructs a new `Doc` reporter instance. - * - * @public - * @class - * @memberof Mocha.reporters - * @extends Mocha.reporters.Base - * @param {Runner} runner - Instance triggers reporter actions. - * @param {Object} [options] - runner options - */ - function Doc(runner, options) { - Base.call(this, runner, options); + var constants$d = Runner.constants; + var EVENT_TEST_PASS$a = constants$d.EVENT_TEST_PASS; + var EVENT_TEST_FAIL$a = constants$d.EVENT_TEST_FAIL; + var EVENT_SUITE_BEGIN$4 = constants$d.EVENT_SUITE_BEGIN; + var EVENT_SUITE_END$3 = constants$d.EVENT_SUITE_END; - var indents = 2; + class Doc extends Base { + static description = "HTML documentation"; - function indent() { - return Array(indents).join(" "); - } + /** + * Constructs a new `Doc` reporter instance. + * + * @public + * @memberof Mocha.reporters + * @extends Mocha.reporters.Base + * @param {Runner} runner - Instance triggers reporter actions. + * @param {Object} [options] - runner options + */ + constructor(runner, options) { + super(runner, options); - runner.on(EVENT_SUITE_BEGIN, function (suite) { - if (suite.root) { - return; - } - ++indents; - Base.consoleLog('%s
      ', indent()); - ++indents; - Base.consoleLog("%s

      %s

      ", indent(), utils.escape(suite.title)); - Base.consoleLog("%s
      ", indent()); - }); + var indents = 2; - runner.on(EVENT_SUITE_END, function (suite) { - if (suite.root) { - return; + function indent() { + return Array(indents).join(" "); } - Base.consoleLog("%s
      ", indent()); - --indents; - Base.consoleLog("%s
      ", indent()); - --indents; - }); - - runner.on(EVENT_TEST_PASS, function (test) { - Base.consoleLog("%s
      %s
      ", indent(), utils.escape(test.title)); - Base.consoleLog("%s
      %s
      ", indent(), utils.escape(test.file)); - var code = utils.escape(utils.clean(test.body)); - Base.consoleLog("%s
      %s
      ", indent(), code); - }); - runner.on(EVENT_TEST_FAIL, function (test, err) { - Base.consoleLog( - '%s
      %s
      ', - indent(), - utils.escape(test.title), - ); - Base.consoleLog( - '%s
      %s
      ', - indent(), - utils.escape(test.file), - ); - var code = utils.escape(utils.clean(test.body)); - Base.consoleLog( - '%s
      %s
      ', - indent(), - code, - ); - Base.consoleLog( - '%s
      %s
      ', - indent(), - utils.escape(err), - ); - }); - } + runner.on(EVENT_SUITE_BEGIN$4, function (suite) { + if (suite.root) { + return; + } + ++indents; + Base.consoleLog('%s
      ', indent()); + ++indents; + Base.consoleLog("%s

      %s

      ", indent(), utils.escape(suite.title)); + Base.consoleLog("%s
      ", indent()); + }); - Doc.description = "HTML documentation"; - }(doc)); + runner.on(EVENT_SUITE_END$3, function (suite) { + if (suite.root) { + return; + } + Base.consoleLog("%s
      ", indent()); + --indents; + Base.consoleLog("%s
      ", indent()); + --indents; + }); - var tap = {exports: {}}; + runner.on(EVENT_TEST_PASS$a, function (test) { + Base.consoleLog("%s
      %s
      ", indent(), utils.escape(test.title)); + Base.consoleLog("%s
      %s
      ", indent(), utils.escape(test.file)); + var code = utils.escape(utils.clean(test.body)); + Base.consoleLog( + "%s
      %s
      ", + indent(), + code, + ); + }); - (function (module, exports) { + runner.on(EVENT_TEST_FAIL$a, function (test, err) { + Base.consoleLog( + '%s
      %s
      ', + indent(), + utils.escape(test.title), + ); + Base.consoleLog( + '%s
      %s
      ', + indent(), + utils.escape(test.file), + ); + var code = utils.escape(utils.clean(test.body)); + Base.consoleLog( + '%s
      %s
      ', + indent(), + code, + ); + Base.consoleLog( + '%s
      %s
      ', + indent(), + utils.escape(err), + ); + }); + } + } - /** - * @typedef {import('../runner.js')} Runner - * @typedef {import('../test.js')} Test - */ + var doc = /*#__PURE__*/Object.freeze({ + __proto__: null, + Doc: Doc + }); - /** - * @module TAP - */ - /** - * Module dependencies. - */ + var require$$2 = /*@__PURE__*/getAugmentedNamespace(doc); - var util = require$$0$1; - var Base = base$1.exports; - var constants = runner.constants; - var EVENT_TEST_PASS = constants.EVENT_TEST_PASS; - var EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL; - var EVENT_RUN_BEGIN = constants.EVENT_RUN_BEGIN; - var EVENT_RUN_END = constants.EVENT_RUN_END; - var EVENT_TEST_PENDING = constants.EVENT_TEST_PENDING; - var EVENT_TEST_END = constants.EVENT_TEST_END; - var inherits = utils$3.inherits; + var constants$c = Runner.constants; + var EVENT_TEST_PASS$9 = constants$c.EVENT_TEST_PASS; + var EVENT_TEST_FAIL$9 = constants$c.EVENT_TEST_FAIL; + var EVENT_RUN_BEGIN$8 = constants$c.EVENT_RUN_BEGIN; + var EVENT_RUN_END$c = constants$c.EVENT_RUN_END; + var EVENT_TEST_PENDING$7 = constants$c.EVENT_TEST_PENDING; + var EVENT_TEST_END$4 = constants$c.EVENT_TEST_END; var sprintf = util.format; - /** - * Expose `TAP`. - */ - - module.exports = TAP; + class TAP extends Base { + static description = "TAP-compatible output"; - /** - * Constructs a new `TAP` reporter instance. - * - * @public - * @class - * @memberof Mocha.reporters - * @extends Mocha.reporters.Base - * @param {Runner} runner - Instance triggers reporter actions. - * @param {Object} [options] - runner options - */ - function TAP(runner, options) { - Base.call(this, runner, options); + /** + * Constructs a new `TAP` reporter instance. + * + * @public + * @memberof Mocha.reporters + * @extends Mocha.reporters.Base + * @param {Runner} runner - Instance triggers reporter actions. + * @param {Object} [options] - runner options + */ + constructor(runner, options) { + super(runner, options); - var self = this; - var n = 1; + var self = this; + var n = 1; - var tapVersion = "12"; - if (options && options.reporterOptions) { - if (options.reporterOptions.tapVersion) { - tapVersion = options.reporterOptions.tapVersion.toString(); + var tapVersion = "12"; + if (options && options.reporterOptions) { + if (options.reporterOptions.tapVersion) { + tapVersion = options.reporterOptions.tapVersion.toString(); + } } - } - this._producer = createProducer(tapVersion); + this._producer = createProducer(tapVersion); - runner.once(EVENT_RUN_BEGIN, function () { - self._producer.writeVersion(); - }); + runner.once(EVENT_RUN_BEGIN$8, function () { + self._producer.writeVersion(); + }); - runner.on(EVENT_TEST_END, function () { - ++n; - }); + runner.on(EVENT_TEST_END$4, function () { + ++n; + }); - runner.on(EVENT_TEST_PENDING, function (test) { - self._producer.writePending(n, test); - }); + runner.on(EVENT_TEST_PENDING$7, function (test) { + self._producer.writePending(n, test); + }); - runner.on(EVENT_TEST_PASS, function (test) { - self._producer.writePass(n, test); - }); + runner.on(EVENT_TEST_PASS$9, function (test) { + self._producer.writePass(n, test); + }); - runner.on(EVENT_TEST_FAIL, function (test, err) { - self._producer.writeFail(n, test, err); - }); + runner.on(EVENT_TEST_FAIL$9, function (test, err) { + self._producer.writeFail(n, test, err); + }); - runner.once(EVENT_RUN_END, function () { - self._producer.writeEpilogue(runner.stats); - }); + runner.once(EVENT_RUN_END$c, function () { + self._producer.writeEpilogue(runner.stats); + }); + } } - /** - * Inherit from `Base.prototype`. - */ - inherits(TAP, Base); - /** * Returns a TAP-safe title of `test`. * @@ -17294,7 +12125,7 @@ function println() { var vargs = Array.from(arguments); vargs[0] += "\n"; - process.stdout.write(sprintf.apply(null, vargs)); + browser$1$1.stdout.write(sprintf.apply(null, vargs)); } /** @@ -17331,77 +12162,74 @@ * @private * @constructor */ - function TAPProducer() {} - - /** - * Writes the TAP version to reporter output stream. - * - * @abstract - */ - TAPProducer.prototype.writeVersion = function () {}; + class TAPProducer { + /** + * Writes the TAP version to reporter output stream. + * + * @abstract + */ + writeVersion() {} - /** - * Writes the plan to reporter output stream. - * - * @abstract - * @param {number} ntests - Number of tests that are planned to run. - */ - TAPProducer.prototype.writePlan = function (ntests) { - println("%d..%d", 1, ntests); - }; + /** + * Writes the plan to reporter output stream. + * + * @abstract + * @param {number} ntests - Number of tests that are planned to run. + */ + writePlan(ntests) { + println("%d..%d", 1, ntests); + } - /** - * Writes that test passed to reporter output stream. - * - * @abstract - * @param {number} n - Index of test that passed. - * @param {Test} test - Instance containing test information. - */ - TAPProducer.prototype.writePass = function (n, test) { - println("ok %d %s", n, title(test)); - }; + /** + * Writes that test passed to reporter output stream. + * + * @abstract + * @param {number} n - Index of test that passed. + * @param {Test} test - Instance containing test information. + */ + writePass(n, test) { + println("ok %d %s", n, title(test)); + } - /** - * Writes that test was skipped to reporter output stream. - * - * @abstract - * @param {number} n - Index of test that was skipped. - * @param {Test} test - Instance containing test information. - */ - TAPProducer.prototype.writePending = function (n, test) { - println("ok %d %s # SKIP -", n, title(test)); - }; + /** + * Writes that test was skipped to reporter output stream. + * + * @abstract + * @param {number} n - Index of test that was skipped. + * @param {Test} test - Instance containing test information. + */ + writePending(n, test) { + println("ok %d %s # SKIP -", n, title(test)); + } - /** - * Writes that test failed to reporter output stream. - * - * @abstract - * @param {number} n - Index of test that failed. - * @param {Test} test - Instance containing test information. - */ - TAPProducer.prototype.writeFail = function (n, test) { - println("not ok %d %s", n, title(test)); - }; + /** + * Writes that test failed to reporter output stream. + * + * @abstract + * @param {number} n - Index of test that failed. + * @param {Test} test - Instance containing test information. + */ + writeFail(n, test) { + println("not ok %d %s", n, title(test)); + } - /** - * Writes the summary epilogue to reporter output stream. - * - * @abstract - * @param {Object} stats - Object containing run statistics. - */ - TAPProducer.prototype.writeEpilogue = function (stats) { - // :TBD: Why is this not counting pending tests? - println("# tests " + (stats.passes + stats.failures)); - println("# pass " + stats.passes); - // :TBD: Why are we not showing pending results? - println("# fail " + stats.failures); - this.writePlan(stats.passes + stats.failures + stats.pending); - }; + /** + * Writes the summary epilogue to reporter output stream. + * + * @abstract + * @param {Object} stats - Object containing run statistics. + */ + writeEpilogue(stats) { + // :TBD: Why is this not counting pending tests? + println("# tests " + (stats.passes + stats.failures)); + println("# pass " + stats.passes); + // :TBD: Why are we not showing pending results? + println("# fail " + stats.failures); + this.writePlan(stats.passes + stats.failures + stats.pending); + } + } /** - * @summary - * Constructs a new TAP12Producer. - * * @description * Produces output conforming to the TAP12 specification. * @@ -17410,27 +12238,22 @@ * @extends TAPProducer * @see {@link https://testanything.org/tap-specification.html|Specification} */ - function TAP12Producer() { + class TAP12Producer extends TAPProducer { /** * Writes that test failed to reporter output stream, with error formatting. * @override */ - this.writeFail = function (n, test, err) { - TAPProducer.prototype.writeFail.call(this, n, test, err); + writeFail(n, test, err) { + super.writeFail(n, test, err); if (err.message) { println(err.message.replace(/^/gm, " ")); } if (err.stack) { println(err.stack.replace(/^/gm, " ")); } - }; + } } - /** - * Inherit from `TAPProducer.prototype`. - */ - inherits(TAP12Producer, TAPProducer); - /** * @summary * Constructs a new TAP13Producer. @@ -17443,21 +12266,21 @@ * @extends TAPProducer * @see {@link https://testanything.org/tap-version-13-specification.html|Specification} */ - function TAP13Producer() { + class TAP13Producer extends TAPProducer { /** * Writes the TAP version to reporter output stream. * @override */ - this.writeVersion = function () { + writeVersion() { println("TAP version 13"); - }; + } /** * Writes that test failed to reporter output stream, with error formatting. * @override */ - this.writeFail = function (n, test, err) { - TAPProducer.prototype.writeFail.call(this, n, test, err); + writeFail(n, test, err) { + super.writeFail(n, test, err); var emitYamlBlock = err.message != null || err.stack != null; if (emitYamlBlock) { println(indent(1) + "---"); @@ -17471,132 +12294,102 @@ } println(indent(1) + "..."); } - }; - - function indent(level) { - return Array(level + 1).join(" "); } } - /** - * Inherit from `TAPProducer.prototype`. - */ - inherits(TAP13Producer, TAPProducer); - - TAP.description = "TAP-compatible output"; - }(tap)); - - var json = {exports: {}}; - - var _polyfillNode_fs = {}; + function indent(level) { + return Array(level + 1).join(" "); + } - var _polyfillNode_fs$1 = /*#__PURE__*/Object.freeze({ + var tap = /*#__PURE__*/Object.freeze({ __proto__: null, - 'default': _polyfillNode_fs + TAP: TAP }); - var require$$2 = /*@__PURE__*/getAugmentedNamespace(_polyfillNode_fs$1); - - (function (module, exports) { - - /** - * @typedef {import('../runner.js')} Runner - */ - - /** - * @module JSON - */ - /** - * Module dependencies. - */ + var require$$3 = /*@__PURE__*/getAugmentedNamespace(tap); - var Base = base$1.exports; - var fs = require$$2; - var path = require$$1; - const createUnsupportedError = errors$2.createUnsupportedError; - const utils = utils$3; - var constants = runner.constants; - var EVENT_TEST_PASS = constants.EVENT_TEST_PASS; - var EVENT_TEST_PENDING = constants.EVENT_TEST_PENDING; - var EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL; - var EVENT_TEST_END = constants.EVENT_TEST_END; - var EVENT_RUN_END = constants.EVENT_RUN_END; + var fs = {}; - /** - * Expose `JSON`. - */ + const createUnsupportedError$1 = createUnsupportedError$2; + var constants$b = Runner.constants; + var EVENT_TEST_PASS$8 = constants$b.EVENT_TEST_PASS; + var EVENT_TEST_PENDING$6 = constants$b.EVENT_TEST_PENDING; + var EVENT_TEST_FAIL$8 = constants$b.EVENT_TEST_FAIL; + var EVENT_TEST_END$3 = constants$b.EVENT_TEST_END; + var EVENT_RUN_END$b = constants$b.EVENT_RUN_END; - module.exports = JSONReporter; - - /** - * Constructs a new `JSON` reporter instance. - * - * @public - * @class JSON - * @memberof Mocha.reporters - * @extends Mocha.reporters.Base - * @param {Runner} runner - Instance triggers reporter actions. - * @param {Object} [options] - runner options - */ - function JSONReporter(runner, options = {}) { - Base.call(this, runner, options); + class JSONReporter extends Base { + static description = "single JSON object"; - var self = this; - var tests = []; - var pending = []; - var failures = []; - var passes = []; - var output; + /** + * Constructs a new `JSON` reporter instance. + * + * @public + * @memberof Mocha.reporters + * @extends Mocha.reporters.Base + * @param {Runner} runner - Instance triggers reporter actions. + * @param {Object} [options] - runner options + */ + constructor(runner, options = {}) { + super(runner, options); - if (options.reporterOption && options.reporterOption.output) { - if (utils.isBrowser()) { - throw createUnsupportedError("file output not supported in browser"); + var self = this; + var tests = []; + var pending = []; + var failures = []; + var passes = []; + var output; + + if (options.reporterOption && options.reporterOption.output) { + if (utils.isBrowser()) { + throw createUnsupportedError$1("file output not supported in browser"); + } + output = options.reporterOption.output; } - output = options.reporterOption.output; - } - runner.on(EVENT_TEST_END, function (test) { - tests.push(test); - }); + runner.on(EVENT_TEST_END$3, function (test) { + tests.push(test); + }); - runner.on(EVENT_TEST_PASS, function (test) { - passes.push(test); - }); + runner.on(EVENT_TEST_PASS$8, function (test) { + passes.push(test); + }); - runner.on(EVENT_TEST_FAIL, function (test) { - failures.push(test); - }); + runner.on(EVENT_TEST_FAIL$8, function (test) { + failures.push(test); + }); - runner.on(EVENT_TEST_PENDING, function (test) { - pending.push(test); - }); + runner.on(EVENT_TEST_PENDING$6, function (test) { + pending.push(test); + }); - runner.once(EVENT_RUN_END, function () { - var obj = { - stats: self.stats, - tests: tests.map(clean), - pending: pending.map(clean), - failures: failures.map(clean), - passes: passes.map(clean), - }; + runner.once(EVENT_RUN_END$b, function () { + var obj = { + stats: self.stats, + tests: tests.map(clean$1), + pending: pending.map(clean$1), + failures: failures.map(clean$1), + passes: passes.map(clean$1), + }; - runner.testResults = obj; + runner.testResults = obj; - var json = JSON.stringify(obj, null, 2); - if (output) { - try { - fs.mkdirSync(path.dirname(output), { recursive: true }); - fs.writeFileSync(output, json); - } catch (err) { - console.error( - `${Base.symbols.err} [mocha] writing output to "${output}" failed: ${err.message}\n`, - ); - process.stdout.write(json); + var json = JSON.stringify(obj, null, 2); + if (output) { + try { + fs.mkdirSync(path.dirname(output), { recursive: true }); + fs.writeFileSync(output, json); + } catch (err) { + console.error( + `${Base.symbols.err} [mocha] writing output to "${output}" failed: ${err.message}\n`, + ); + browser$1$1.stdout.write(json); + } + } else { + browser$1$1.stdout.write(json); } - } else { - process.stdout.write(json); - } - }); + }); + } } /** @@ -17607,7 +12400,7 @@ * @param {Object} test * @return {Object} */ - function clean(test) { + function clean$1(test) { var err = test.err || {}; if (err instanceof Error) { err = errorJSON(err); @@ -17663,47 +12456,26 @@ return res; } - JSONReporter.description = "single JSON object"; - }(json)); - - var html = {exports: {}}; - - (function (module, exports) { - - /** - * @typedef {import('../runner.js')} Runner - */ + var json = /*#__PURE__*/Object.freeze({ + __proto__: null, + JSONReporter: JSONReporter + }); - /* eslint-env browser */ - /** - * @module HTML - */ - /** - * Module dependencies. - */ + var require$$4$1 = /*@__PURE__*/getAugmentedNamespace(json); - var Base = base$1.exports; - var utils = utils$3; - var escapeRe = escapeStringRegexp; - var constants = runner.constants; - var EVENT_TEST_PASS = constants.EVENT_TEST_PASS; - var EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL; - var EVENT_SUITE_BEGIN = constants.EVENT_SUITE_BEGIN; - var EVENT_SUITE_END = constants.EVENT_SUITE_END; - var EVENT_TEST_PENDING = constants.EVENT_TEST_PENDING; - var escape = utils.escape; + var constants$a = Runner.constants; + var EVENT_TEST_PASS$7 = constants$a.EVENT_TEST_PASS; + var EVENT_TEST_FAIL$7 = constants$a.EVENT_TEST_FAIL; + var EVENT_SUITE_BEGIN$3 = constants$a.EVENT_SUITE_BEGIN; + var EVENT_SUITE_END$2 = constants$a.EVENT_SUITE_END; + var EVENT_TEST_PENDING$5 = constants$a.EVENT_TEST_PENDING; + var escape$1 = utils.escape; /** * Save timer references to avoid Sinon interfering (see GH-237). */ - var Date = commonjsGlobal.Date; - - /** - * Expose `HTML`. - */ - - module.exports = HTML; + var Date$3 = global$1.Date; /** * Stats template: Result, progress, passes, failures, and duration. @@ -17720,236 +12492,275 @@ var playIcon = "‣"; - /** - * Constructs a new `HTML` reporter instance. - * - * @public - * @class - * @memberof Mocha.reporters - * @extends Mocha.reporters.Base - * @param {Runner} runner - Instance triggers reporter actions. - * @param {Object} [options] - runner options - */ - function HTML(runner, options) { - Base.call(this, runner, options); + class HTML extends Base { + static browserOnly = true; - var self = this; - var stats = this.stats; - var stat = fragment(statsTemplate); - var items = stat.getElementsByTagName("li"); - const resultIndex = 0; - const progressIndex = 1; - const passesIndex = 2; - const failuresIndex = 3; - const durationIndex = 4; - /** Stat item containing the root suite pass or fail indicator (hasFailures ? '✖' : '✓') */ - var resultIndicator = items[resultIndex]; - /** Passes text and count */ - const passesStat = items[passesIndex]; - /** Stat item containing the pass count (not the word, just the number) */ - const passesCount = passesStat.getElementsByTagName("em")[0]; - /** Stat item linking to filter to show only passing tests */ - const passesLink = passesStat.getElementsByTagName("a")[0]; - /** Failures text and count */ - const failuresStat = items[failuresIndex]; - /** Stat item containing the failure count (not the word, just the number) */ - const failuresCount = failuresStat.getElementsByTagName("em")[0]; - /** Stat item linking to filter to show only failing tests */ - const failuresLink = failuresStat.getElementsByTagName("a")[0]; - /** Stat item linking to the duration time (not the word or unit, just the number) */ - var duration = items[durationIndex].getElementsByTagName("em")[0]; - var report = fragment('
        '); - var stack = [report]; - var progressText = items[progressIndex].getElementsByTagName("div")[0]; - var progressBar = items[progressIndex].getElementsByTagName("progress")[0]; - var progressRing = [ - items[progressIndex].getElementsByClassName("ring-flatlight")[0], - items[progressIndex].getElementsByClassName("ring-highlight")[0], - ]; - var root = document.getElementById("mocha"); - - if (!root) { - return error("#mocha div missing, add it to your document"); - } - - // pass toggle - on(passesLink, "click", function (evt) { - evt.preventDefault(); - unhide(); - var name = /pass/.test(report.className) ? "" : " pass"; - report.className = report.className.replace(/fail|pass/g, "") + name; - if (report.className.trim()) { - hideSuitesWithout("test pass"); - } - }); + /** + * Constructs a new `HTML` reporter instance. + * + * @public + * @memberof Mocha.reporters + * @extends Mocha.reporters.Base + * @param {Runner} runner - Instance triggers reporter actions. + * @param {Object} [options] - runner options + */ + constructor(runner, options) { + super(runner, options); - // failure toggle - on(failuresLink, "click", function (evt) { - evt.preventDefault(); - unhide(); - var name = /fail/.test(report.className) ? "" : " fail"; - report.className = report.className.replace(/fail|pass/g, "") + name; - if (report.className.trim()) { - hideSuitesWithout("test fail"); - } - }); + var self = this; + var stats = this.stats; + var stat = fragment(statsTemplate); + var items = stat.getElementsByTagName("li"); + const resultIndex = 0; + const progressIndex = 1; + const passesIndex = 2; + const failuresIndex = 3; + const durationIndex = 4; + /** Stat item containing the root suite pass or fail indicator (hasFailures ? '✖' : '✓') */ + var resultIndicator = items[resultIndex]; + /** Passes text and count */ + const passesStat = items[passesIndex]; + /** Stat item containing the pass count (not the word, just the number) */ + const passesCount = passesStat.getElementsByTagName("em")[0]; + /** Stat item linking to filter to show only passing tests */ + const passesLink = passesStat.getElementsByTagName("a")[0]; + /** Failures text and count */ + const failuresStat = items[failuresIndex]; + /** Stat item containing the failure count (not the word, just the number) */ + const failuresCount = failuresStat.getElementsByTagName("em")[0]; + /** Stat item linking to filter to show only failing tests */ + const failuresLink = failuresStat.getElementsByTagName("a")[0]; + /** Stat item linking to the duration time (not the word or unit, just the number) */ + var duration = items[durationIndex].getElementsByTagName("em")[0]; + var report = fragment('
          '); + var stack = [report]; + var progressText = items[progressIndex].getElementsByTagName("div")[0]; + var progressBar = items[progressIndex].getElementsByTagName("progress")[0]; + var progressRing = [ + items[progressIndex].getElementsByClassName("ring-flatlight")[0], + items[progressIndex].getElementsByClassName("ring-highlight")[0], + ]; + var root = document.getElementById("mocha"); + + if (!root) { + return error("#mocha div missing, add it to your document"); + } + + // pass toggle + on(passesLink, "click", function (evt) { + evt.preventDefault(); + unhide(); + var name = /pass/.test(report.className) ? "" : " pass"; + report.className = report.className.replace(/fail|pass/g, "") + name; + if (report.className.trim()) { + hideSuitesWithout("test pass"); + } + }); - root.appendChild(stat); - root.appendChild(report); + // failure toggle + on(failuresLink, "click", function (evt) { + evt.preventDefault(); + unhide(); + var name = /fail/.test(report.className) ? "" : " fail"; + report.className = report.className.replace(/fail|pass/g, "") + name; + if (report.className.trim()) { + hideSuitesWithout("test fail"); + } + }); - runner.on(EVENT_SUITE_BEGIN, function (suite) { - if (suite.root) { - return; - } + root.appendChild(stat); + root.appendChild(report); - // suite - var url = self.suiteURL(suite); - var el = fragment( - '
        • %s

        • ', - url, - escape(suite.title), - ); + runner.on(EVENT_SUITE_BEGIN$3, function (suite) { + if (suite.root) { + return; + } - // container - stack[0].appendChild(el); - stack.unshift(document.createElement("ul")); - el.appendChild(stack[0]); - }); + // suite + var url = self.suiteURL(suite); + var el = fragment( + '
        • %s

        • ', + url, + escape$1(suite.title), + ); + + // container + stack[0].appendChild(el); + stack.unshift(document.createElement("ul")); + el.appendChild(stack[0]); + }); - runner.on(EVENT_SUITE_END, function (suite) { - if (suite.root) { - if (stats.failures === 0) { - text(resultIndicator, "✓"); - stat.className += " pass"; + runner.on(EVENT_SUITE_END$2, function (suite) { + if (suite.root) { + if (stats.failures === 0) { + text(resultIndicator, "✓"); + stat.className += " pass"; + } + updateStats(); + return; } + stack.shift(); + }); + + runner.on(EVENT_TEST_PASS$7, function (test) { + var url = self.testURL(test); + var markup = + '
        • %e%ems ' + + '' + + playIcon + + "

        • "; + var el = fragment(markup, test.speed, test.title, test.duration, url); + self.addCodeToggle(el, test.body); + appendToStack(el); updateStats(); - return; - } - stack.shift(); - }); + }); - runner.on(EVENT_TEST_PASS, function (test) { - var url = self.testURL(test); - var markup = - '
        • %e%ems ' + - '' + - playIcon + - "

        • "; - var el = fragment(markup, test.speed, test.title, test.duration, url); - self.addCodeToggle(el, test.body); - appendToStack(el); - updateStats(); - }); + runner.on(EVENT_TEST_FAIL$7, function (test) { + // Update stat items + text(resultIndicator, "✖"); + stat.className += " fail"; + + var el = fragment( + '
        • %e ' + + playIcon + + "

        • ", + test.title, + self.testURL(test), + ); + var stackString; // Note: Includes leading newline + var message = test.err.toString(); - runner.on(EVENT_TEST_FAIL, function (test) { - // Update stat items - text(resultIndicator, "✖"); - stat.className += " fail"; + // <=IE7 stringifies to [Object Error]. Since it can be overloaded, we + // check for the result of the stringifying. + if (message === "[object Error]") { + message = test.err.message; + } - var el = fragment( - '
        • %e ' + - playIcon + - "

        • ", - test.title, - self.testURL(test), - ); - var stackString; // Note: Includes leading newline - var message = test.err.toString(); + if (test.err.stack) { + var indexOfMessage = test.err.stack.indexOf(test.err.message); + if (indexOfMessage === -1) { + stackString = test.err.stack; + } else { + stackString = test.err.stack.slice( + test.err.message.length + indexOfMessage, + ); + } + } else if (test.err.sourceURL && test.err.line !== undefined) { + // Safari doesn't give you a stack. Let's at least provide a source line. + stackString = "\n(" + test.err.sourceURL + ":" + test.err.line + ")"; + } - // <=IE7 stringifies to [Object Error]. Since it can be overloaded, we - // check for the result of the stringifying. - if (message === "[object Error]") { - message = test.err.message; - } + stackString = stackString || ""; - if (test.err.stack) { - var indexOfMessage = test.err.stack.indexOf(test.err.message); - if (indexOfMessage === -1) { - stackString = test.err.stack; + if (test.err.htmlMessage && stackString) { + el.appendChild( + fragment( + '
          %s\n
          %e
          ', + test.err.htmlMessage, + stackString, + ), + ); + } else if (test.err.htmlMessage) { + el.appendChild( + fragment('
          %s
          ', test.err.htmlMessage), + ); } else { - stackString = test.err.stack.slice( - test.err.message.length + indexOfMessage, + el.appendChild( + fragment('
          %e%e
          ', message, stackString), ); } - } else if (test.err.sourceURL && test.err.line !== undefined) { - // Safari doesn't give you a stack. Let's at least provide a source line. - stackString = "\n(" + test.err.sourceURL + ":" + test.err.line + ")"; - } - stackString = stackString || ""; + self.addCodeToggle(el, test.body); + appendToStack(el); + updateStats(); + }); - if (test.err.htmlMessage && stackString) { - el.appendChild( - fragment( - '
          %s\n
          %e
          ', - test.err.htmlMessage, - stackString, - ), + runner.on(EVENT_TEST_PENDING$5, function (test) { + var el = fragment( + '
        • %e

        • ', + test.title, ); - } else if (test.err.htmlMessage) { - el.appendChild( - fragment('
          %s
          ', test.err.htmlMessage), - ); - } else { - el.appendChild( - fragment('
          %e%e
          ', message, stackString), - ); - } + appendToStack(el); + updateStats(); + }); - self.addCodeToggle(el, test.body); - appendToStack(el); - updateStats(); - }); + function appendToStack(el) { + // Don't call .appendChild if #mocha-report was already .shift()'ed off the stack. + if (stack[0]) { + stack[0].appendChild(el); + } + } - runner.on(EVENT_TEST_PENDING, function (test) { - var el = fragment( - '
        • %e

        • ', - test.title, - ); - appendToStack(el); - updateStats(); - }); + function updateStats() { + var percent = ((stats.tests / runner.total) * 100) | 0; + progressBar.value = percent; + if (progressText) { + // setting a toFixed that is too low, makes small changes to progress not shown + // setting it too high, makes the progress text longer then it needs to + // to address this, calculate the toFixed based on the magnitude of total + var decimalPlaces = Math.ceil(Math.log10(runner.total / 100)); + text( + progressText, + percent.toFixed(Math.min(Math.max(decimalPlaces, 0), 100)) + "%", + ); + } + if (progressRing) { + var radius = parseFloat( + getComputedStyle(progressRing[0]).getPropertyValue("r"), + ); + var wholeArc = Math.PI * 2 * radius; + var highlightArc = percent * (wholeArc / 100); + // The progress ring is in 2 parts, the flatlight color and highlight color. + // Rendering both on top of the other, seems to make a 3rd color on the edges. + // To create 1 whole ring with 2 colors, both parts are inverse of the other. + progressRing[0].style["stroke-dasharray"] = + `0,${highlightArc}px,${wholeArc}px`; + progressRing[1].style["stroke-dasharray"] = + `${highlightArc}px,${wholeArc}px`; + } - function appendToStack(el) { - // Don't call .appendChild if #mocha-report was already .shift()'ed off the stack. - if (stack[0]) { - stack[0].appendChild(el); + // update stats + var ms = new Date$3() - stats.start; + text(passesCount, stats.passes); + text(failuresCount, stats.failures); + text(duration, (ms / 1000).toFixed(2)); } } - function updateStats() { - var percent = ((stats.tests / runner.total) * 100) | 0; - progressBar.value = percent; - if (progressText) { - // setting a toFixed that is too low, makes small changes to progress not shown - // setting it too high, makes the progress text longer then it needs to - // to address this, calculate the toFixed based on the magnitude of total - var decimalPlaces = Math.ceil(Math.log10(runner.total / 100)); - text( - progressText, - percent.toFixed(Math.min(Math.max(decimalPlaces, 0), 100)) + "%", - ); - } - if (progressRing) { - var radius = parseFloat( - getComputedStyle(progressRing[0]).getPropertyValue("r"), - ); - var wholeArc = Math.PI * 2 * radius; - var highlightArc = percent * (wholeArc / 100); - // The progress ring is in 2 parts, the flatlight color and highlight color. - // Rendering both on top of the other, seems to make a 3rd color on the edges. - // To create 1 whole ring with 2 colors, both parts are inverse of the other. - progressRing[0].style["stroke-dasharray"] = - `0,${highlightArc}px,${wholeArc}px`; - progressRing[1].style["stroke-dasharray"] = - `${highlightArc}px,${wholeArc}px`; - } + /** + * Provide suite URL. + * + * @param {Object} [suite] + */ + suiteURL(suite) { + return makeUrl("^" + escapeRegExp(suite.fullTitle()) + " "); + } + + /** + * Provide test URL. + * + * @param {Object} [test] + */ + testURL(test) { + return makeUrl("^" + escapeRegExp(test.fullTitle()) + "$"); + } + + /** + * Adds code toggle functionality for the provided test's list element. + * + * @param {HTMLLIElement} el + * @param {string} contents + */ + addCodeToggle(el, contents) { + var h2 = el.getElementsByTagName("h2")[0]; + + on(h2, "click", function () { + pre.style.display = pre.style.display === "none" ? "block" : "none"; + }); - // update stats - var ms = new Date() - stats.start; - text(passesCount, stats.passes); - text(failuresCount, stats.failures); - text(duration, (ms / 1000).toFixed(2)); + var pre = fragment("
          %e
          ", utils.clean(contents)); + el.appendChild(pre); + pre.style.display = "none"; } } @@ -17977,42 +12788,6 @@ ); } - /** - * Provide suite URL. - * - * @param {Object} [suite] - */ - HTML.prototype.suiteURL = function (suite) { - return makeUrl("^" + escapeRe(suite.fullTitle()) + " "); - }; - - /** - * Provide test URL. - * - * @param {Object} [test] - */ - HTML.prototype.testURL = function (test) { - return makeUrl("^" + escapeRe(test.fullTitle()) + "$"); - }; - - /** - * Adds code toggle functionality for the provided test's list element. - * - * @param {HTMLLIElement} el - * @param {string} contents - */ - HTML.prototype.addCodeToggle = function (el, contents) { - var h2 = el.getElementsByTagName("h2")[0]; - - on(h2, "click", function () { - pre.style.display = pre.style.display === "none" ? "block" : "none"; - }); - - var pre = fragment("
          %e
          ", utils.clean(contents)); - el.appendChild(pre); - pre.style.display = "none"; - }; - /** * Display error `msg`. * @@ -18037,7 +12812,7 @@ case "s": return String(args[i++]); case "e": - return escape(args[i++]); + return escape$1(args[i++]); // no default } }); @@ -18096,739 +12871,638 @@ } } - HTML.browserOnly = true; - }(html)); - - var list = {exports: {}}; - - (function (module, exports) { - - /** - * @typedef {import('../runner.js')} Runner - */ - - /** - * @module List - */ - /** - * Module dependencies. - */ - - var Base = base$1.exports; - var inherits = utils$3.inherits; - var constants = runner.constants; - var EVENT_RUN_BEGIN = constants.EVENT_RUN_BEGIN; - var EVENT_RUN_END = constants.EVENT_RUN_END; - var EVENT_TEST_BEGIN = constants.EVENT_TEST_BEGIN; - var EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL; - var EVENT_TEST_PASS = constants.EVENT_TEST_PASS; - var EVENT_TEST_PENDING = constants.EVENT_TEST_PENDING; - var color = Base.color; - var cursor = Base.cursor; - - /** - * Expose `List`. - */ - - module.exports = List; - - /** - * Constructs a new `List` reporter instance. - * - * @public - * @class - * @memberof Mocha.reporters - * @extends Mocha.reporters.Base - * @param {Runner} runner - Instance triggers reporter actions. - * @param {Object} [options] - runner options - */ - function List(runner, options) { - Base.call(this, runner, options); - - var self = this; - var n = 0; - - runner.on(EVENT_RUN_BEGIN, function () { - Base.consoleLog(); - }); - - runner.on(EVENT_TEST_BEGIN, function (test) { - process.stdout.write(color("pass", " " + test.fullTitle() + ": ")); - }); - - runner.on(EVENT_TEST_PENDING, function (test) { - var fmt = color("checkmark", " -") + color("pending", " %s"); - Base.consoleLog(fmt, test.fullTitle()); - }); - - runner.on(EVENT_TEST_PASS, function (test) { - var fmt = - color("checkmark", " " + Base.symbols.ok) + - color("pass", " %s: ") + - color(test.speed, "%dms"); - cursor.CR(); - Base.consoleLog(fmt, test.fullTitle(), test.duration); - }); - - runner.on(EVENT_TEST_FAIL, function (test) { - cursor.CR(); - Base.consoleLog(color("fail", " %d) %s"), ++n, test.fullTitle()); - }); - - runner.once(EVENT_RUN_END, self.epilogue.bind(self)); - } - - /** - * Inherit from `Base.prototype`. - */ - inherits(List, Base); - - List.description = 'like "spec" reporter but flat'; - }(list)); + var html = /*#__PURE__*/Object.freeze({ + __proto__: null, + HTML: HTML + }); - var min = {exports: {}}; + var require$$5 = /*@__PURE__*/getAugmentedNamespace(html); - (function (module, exports) { + var { constants: constants$9 } = Runner; + var EVENT_RUN_BEGIN$7 = constants$9.EVENT_RUN_BEGIN; + var EVENT_RUN_END$a = constants$9.EVENT_RUN_END; + var EVENT_TEST_BEGIN = constants$9.EVENT_TEST_BEGIN; + var EVENT_TEST_FAIL$6 = constants$9.EVENT_TEST_FAIL; + var EVENT_TEST_PASS$6 = constants$9.EVENT_TEST_PASS; + var EVENT_TEST_PENDING$4 = constants$9.EVENT_TEST_PENDING; + var color$3 = Base.color; + var cursor$2 = Base.cursor; - /** - * @typedef {import('../runner.js')} Runner - */ + class List extends Base { + static description = 'like "spec" reporter but flat'; - /** - * @module Min - */ - /** - * Module dependencies. - */ + /** + * Constructs a new `List` reporter instance. + * + * @public + * @memberof Mocha.reporters + * @extends Mocha.reporters.Base + * @param {Runner} runner - Instance triggers reporter actions. + * @param {Object} [options] - runner options + */ + constructor(runner, options) { + super(runner, options); - var Base = base$1.exports; - var inherits = utils$3.inherits; - var constants = runner.constants; - var EVENT_RUN_END = constants.EVENT_RUN_END; - var EVENT_RUN_BEGIN = constants.EVENT_RUN_BEGIN; + var n = 0; - /** - * Expose `Min`. - */ + runner.on(EVENT_RUN_BEGIN$7, function () { + Base.consoleLog(); + }); - module.exports = Min; + runner.on(EVENT_TEST_BEGIN, function (test) { + browser$1$1.stdout.write(color$3("pass", " " + test.fullTitle() + ": ")); + }); - /** - * Constructs a new `Min` reporter instance. - * - * @description - * This minimal test reporter is best used with '--watch'. - * - * @public - * @class - * @memberof Mocha.reporters - * @extends Mocha.reporters.Base - * @param {Runner} runner - Instance triggers reporter actions. - * @param {Object} [options] - runner options - */ - function Min(runner, options) { - Base.call(this, runner, options); - - runner.on(EVENT_RUN_BEGIN, function () { - // clear screen - process.stdout.write("\u001b[2J"); - // set cursor position - process.stdout.write("\u001b[1;3H"); - }); + runner.on(EVENT_TEST_PENDING$4, function (test) { + var fmt = color$3("checkmark", " -") + color$3("pending", " %s"); + Base.consoleLog(fmt, test.fullTitle()); + }); - runner.once(EVENT_RUN_END, this.epilogue.bind(this)); - } + runner.on(EVENT_TEST_PASS$6, function (test) { + var fmt = + color$3("checkmark", " " + Base.symbols.ok) + + color$3("pass", " %s: ") + + color$3(test.speed, "%dms"); + cursor$2.CR(); + Base.consoleLog(fmt, test.fullTitle(), test.duration); + }); - /** - * Inherit from `Base.prototype`. - */ - inherits(Min, Base); + runner.on(EVENT_TEST_FAIL$6, function (test) { + cursor$2.CR(); + Base.consoleLog(color$3("fail", " %d) %s"), ++n, test.fullTitle()); + }); - Min.description = "essentially just a summary"; - }(min)); + runner.once(EVENT_RUN_END$a, (...args) => this.epilogue(...args)); + } + } - var spec = {exports: {}}; + var list = /*#__PURE__*/Object.freeze({ + __proto__: null, + List: List + }); - (function (module, exports) { + var require$$6 = /*@__PURE__*/getAugmentedNamespace(list); - /** - * @typedef {import('../runner.js')} Runner - * @typedef {import('../test.js')} Test - */ + var { constants: constants$8 } = Runner; + var EVENT_RUN_END$9 = constants$8.EVENT_RUN_END; + var EVENT_RUN_BEGIN$6 = constants$8.EVENT_RUN_BEGIN; - /** - * @module Spec - */ - /** - * Module dependencies. - */ + class Min extends Base { + static description = "essentially just a summary"; - var Base = base$1.exports; - var constants = runner.constants; - var EVENT_RUN_BEGIN = constants.EVENT_RUN_BEGIN; - var EVENT_RUN_END = constants.EVENT_RUN_END; - var EVENT_SUITE_BEGIN = constants.EVENT_SUITE_BEGIN; - var EVENT_SUITE_END = constants.EVENT_SUITE_END; - var EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL; - var EVENT_TEST_PASS = constants.EVENT_TEST_PASS; - var EVENT_TEST_PENDING = constants.EVENT_TEST_PENDING; - var inherits = utils$3.inherits; - var color = Base.color; + /** + * Constructs a new `Min` reporter instance. + * + * @description + * This minimal test reporter is best used with '--watch'. + * + * @public + * @memberof Mocha.reporters + * @extends Mocha.reporters.Base + * @param {Runner} runner - Instance triggers reporter actions. + * @param {Object} [options] - runner options + */ + constructor(runner, options) { + super(runner, options); + + runner.on(EVENT_RUN_BEGIN$6, function () { + // clear screen + browser$1$1.stdout.write("\u001b[2J"); + // set cursor position + browser$1$1.stdout.write("\u001b[1;3H"); + }); - /** - * Expose `Spec`. - */ + runner.once(EVENT_RUN_END$9, (...args) => this.epilogue(...args)); + } + } - module.exports = Spec; + var min = /*#__PURE__*/Object.freeze({ + __proto__: null, + Min: Min + }); + + var require$$7$1 = /*@__PURE__*/getAugmentedNamespace(min); /** - * Constructs a new `Spec` reporter instance. - * - * @public - * @class - * @memberof Mocha.reporters - * @extends Mocha.reporters.Base - * @param {Runner} runner - Instance triggers reporter actions. - * @param {Object} [options] - runner options + * @typedef {import('../runner.cjs')} Runner + * @typedef {import('../test.js')} Test */ - function Spec(runner, options) { - Base.call(this, runner, options); - var self = this; - var indents = 0; - var n = 0; + var constants$7 = Runner.constants; + var EVENT_RUN_BEGIN$5 = constants$7.EVENT_RUN_BEGIN; + var EVENT_RUN_END$8 = constants$7.EVENT_RUN_END; + var EVENT_SUITE_BEGIN$2 = constants$7.EVENT_SUITE_BEGIN; + var EVENT_SUITE_END$1 = constants$7.EVENT_SUITE_END; + var EVENT_TEST_FAIL$5 = constants$7.EVENT_TEST_FAIL; + var EVENT_TEST_PASS$5 = constants$7.EVENT_TEST_PASS; + var EVENT_TEST_PENDING$3 = constants$7.EVENT_TEST_PENDING; + var color$2 = Base.color; - function indent() { - return Array(indents).join(" "); - } + class Spec extends Base { + static description = "hierarchical & verbose [default]"; - runner.on(EVENT_RUN_BEGIN, function () { - Base.consoleLog(); - }); + /** + * Constructs a new `Spec` reporter instance. + * + * @public + * @memberof Mocha.reporters + * @extends Mocha.reporters.Base + * @param {Runner} runner - Instance triggers reporter actions. + * @param {Object} [options] - runner options + */ + constructor(runner, options) { + super(runner, options); - runner.on(EVENT_SUITE_BEGIN, function (suite) { - ++indents; - Base.consoleLog(color("suite", "%s%s"), indent(), suite.title); - }); + var indents = 0; + var n = 0; - runner.on(EVENT_SUITE_END, function () { - --indents; - if (indents === 1) { - Base.consoleLog(); + function indent() { + return Array(indents).join(" "); } - }); - runner.on(EVENT_TEST_PENDING, function (test) { - var fmt = indent() + color("pending", " - %s"); - Base.consoleLog(fmt, test.title); - }); + runner.on(EVENT_RUN_BEGIN$5, function () { + Base.consoleLog(); + }); - runner.on(EVENT_TEST_PASS, function (test) { - var fmt; - if (test.speed === "fast") { - fmt = - indent() + - color("checkmark", " " + Base.symbols.ok) + - color("pass", " %s"); + runner.on(EVENT_SUITE_BEGIN$2, function (suite) { + ++indents; + Base.consoleLog(color$2("suite", "%s%s"), indent(), suite.title); + }); + + runner.on(EVENT_SUITE_END$1, function () { + --indents; + if (indents === 1) { + Base.consoleLog(); + } + }); + + runner.on(EVENT_TEST_PENDING$3, function (test) { + var fmt = indent() + color$2("pending", " - %s"); Base.consoleLog(fmt, test.title); - } else { - fmt = - indent() + - color("checkmark", " " + Base.symbols.ok) + - color("pass", " %s") + - color(test.speed, " (%dms)"); - Base.consoleLog(fmt, test.title, test.duration); - } - }); + }); - runner.on(EVENT_TEST_FAIL, function (test) { - Base.consoleLog(indent() + color("fail", " %d) %s"), ++n, test.title); - }); + runner.on(EVENT_TEST_PASS$5, function (test) { + var fmt; + if (test.speed === "fast") { + fmt = + indent() + + color$2("checkmark", " " + Base.symbols.ok) + + color$2("pass", " %s"); + Base.consoleLog(fmt, test.title); + } else { + fmt = + indent() + + color$2("checkmark", " " + Base.symbols.ok) + + color$2("pass", " %s") + + color$2(test.speed, " (%dms)"); + Base.consoleLog(fmt, test.title, test.duration); + } + }); + + runner.on(EVENT_TEST_FAIL$5, function (test) { + Base.consoleLog(indent() + color$2("fail", " %d) %s"), ++n, test.title); + }); - runner.once(EVENT_RUN_END, self.epilogue.bind(self)); + runner.once(EVENT_RUN_END$8, (...args) => this.epilogue(...args)); + } } - /** - * Inherit from `Base.prototype`. - */ - inherits(Spec, Base); + var spec = /*#__PURE__*/Object.freeze({ + __proto__: null, + Spec: Spec + }); - Spec.description = "hierarchical & verbose [default]"; - }(spec)); + var require$$8 = /*@__PURE__*/getAugmentedNamespace(spec); - var nyan = {exports: {}}; + var constants$6 = Runner.constants; + var EVENT_RUN_BEGIN$4 = constants$6.EVENT_RUN_BEGIN; + var EVENT_TEST_PENDING$2 = constants$6.EVENT_TEST_PENDING; + var EVENT_TEST_PASS$4 = constants$6.EVENT_TEST_PASS; + var EVENT_RUN_END$7 = constants$6.EVENT_RUN_END; + var EVENT_TEST_FAIL$4 = constants$6.EVENT_TEST_FAIL; - (function (module, exports) { + class NyanCat extends Base { + static description = '"nyan cat"'; - /** - * @typedef {import('../runner.js')} Runner - */ + /** + * Constructs a new `Nyan` reporter instance. + * + * @public + * @memberof Mocha.reporters + * @extends Mocha.reporters.Base + * @param {Runner} runner - Instance triggers reporter actions. + * @param {Object} [options] - runner options + */ + constructor(runner, options) { + super(runner, options); - /** - * @module Nyan - */ - /** - * Module dependencies. - */ + var self = this; + var width = (Base.window.width * 0.75) | 0; + var nyanCatWidth = (this.nyanCatWidth = 11); + + this.colorIndex = 0; + this.numberOfLines = 4; + this.rainbowColors = self.generateColors(); + this.scoreboardWidth = 5; + this.tick = 0; + this.trajectories = [[], [], [], []]; + this.trajectoryWidthMax = width - nyanCatWidth; + + runner.on(EVENT_RUN_BEGIN$4, function () { + Base.cursor.hide(); + self.draw(); + }); - var Base = base$1.exports; - var constants = runner.constants; - var inherits = utils$3.inherits; - var EVENT_RUN_BEGIN = constants.EVENT_RUN_BEGIN; - var EVENT_TEST_PENDING = constants.EVENT_TEST_PENDING; - var EVENT_TEST_PASS = constants.EVENT_TEST_PASS; - var EVENT_RUN_END = constants.EVENT_RUN_END; - var EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL; + runner.on(EVENT_TEST_PENDING$2, function () { + self.draw(); + }); - /** - * Expose `Dot`. - */ + runner.on(EVENT_TEST_PASS$4, function () { + self.draw(); + }); - module.exports = NyanCat; + runner.on(EVENT_TEST_FAIL$4, function () { + self.draw(); + }); - /** - * Constructs a new `Nyan` reporter instance. - * - * @public - * @class Nyan - * @memberof Mocha.reporters - * @extends Mocha.reporters.Base - * @param {Runner} runner - Instance triggers reporter actions. - * @param {Object} [options] - runner options - */ - function NyanCat(runner, options) { - Base.call(this, runner, options); + runner.once(EVENT_RUN_END$7, function () { + Base.cursor.show(); + for (var i = 0; i < self.numberOfLines; i++) { + browser$1$1.stdout.write("\n"); + } + self.epilogue(); + }); + } - var self = this; - var width = (Base.window.width * 0.75) | 0; - var nyanCatWidth = (this.nyanCatWidth = 11); - - this.colorIndex = 0; - this.numberOfLines = 4; - this.rainbowColors = self.generateColors(); - this.scoreboardWidth = 5; - this.tick = 0; - this.trajectories = [[], [], [], []]; - this.trajectoryWidthMax = width - nyanCatWidth; - - runner.on(EVENT_RUN_BEGIN, function () { - Base.cursor.hide(); - self.draw(); - }); + /** + * Draw the nyan cat + * + * @private + */ - runner.on(EVENT_TEST_PENDING, function () { - self.draw(); - }); + draw() { + this.appendRainbow(); + this.drawScoreboard(); + this.drawRainbow(); + this.drawNyanCat(); + this.tick = !this.tick; + } - runner.on(EVENT_TEST_PASS, function () { - self.draw(); - }); + /** + * Draw the "scoreboard" showing the number + * of passes, failures and pending tests. + * + * @private + */ - runner.on(EVENT_TEST_FAIL, function () { - self.draw(); - }); + drawScoreboard() { + var stats = this.stats; - runner.once(EVENT_RUN_END, function () { - Base.cursor.show(); - for (var i = 0; i < self.numberOfLines; i++) { - process.stdout.write("\n"); + function draw(type, n) { + browser$1$1.stdout.write(" "); + browser$1$1.stdout.write(Base.color(type, n)); + browser$1$1.stdout.write("\n"); } - self.epilogue(); - }); - } - /** - * Inherit from `Base.prototype`. - */ - inherits(NyanCat, Base); - - /** - * Draw the nyan cat - * - * @private - */ + draw("green", stats.passes); + draw("fail", stats.failures); + draw("pending", stats.pending); + browser$1$1.stdout.write("\n"); - NyanCat.prototype.draw = function () { - this.appendRainbow(); - this.drawScoreboard(); - this.drawRainbow(); - this.drawNyanCat(); - this.tick = !this.tick; - }; + this.cursorUp(this.numberOfLines); + } - /** - * Draw the "scoreboard" showing the number - * of passes, failures and pending tests. - * - * @private - */ + /** + * Append the rainbow. + * + * @private + */ - NyanCat.prototype.drawScoreboard = function () { - var stats = this.stats; + appendRainbow() { + var segment = this.tick ? "_" : "-"; + var rainbowified = this.rainbowify(segment); - function draw(type, n) { - process.stdout.write(" "); - process.stdout.write(Base.color(type, n)); - process.stdout.write("\n"); + for (var index = 0; index < this.numberOfLines; index++) { + var trajectory = this.trajectories[index]; + if (trajectory.length >= this.trajectoryWidthMax) { + trajectory.shift(); + } + trajectory.push(rainbowified); + } } - draw("green", stats.passes); - draw("fail", stats.failures); - draw("pending", stats.pending); - process.stdout.write("\n"); - - this.cursorUp(this.numberOfLines); - }; + /** + * Draw the rainbow. + * + * @private + */ - /** - * Append the rainbow. - * - * @private - */ + drawRainbow() { + var self = this; - NyanCat.prototype.appendRainbow = function () { - var segment = this.tick ? "_" : "-"; - var rainbowified = this.rainbowify(segment); + this.trajectories.forEach(function (line) { + browser$1$1.stdout.write("\u001b[" + self.scoreboardWidth + "C"); + browser$1$1.stdout.write(line.join("")); + browser$1$1.stdout.write("\n"); + }); - for (var index = 0; index < this.numberOfLines; index++) { - var trajectory = this.trajectories[index]; - if (trajectory.length >= this.trajectoryWidthMax) { - trajectory.shift(); - } - trajectory.push(rainbowified); + this.cursorUp(this.numberOfLines); } - }; - - /** - * Draw the rainbow. - * - * @private - */ - NyanCat.prototype.drawRainbow = function () { - var self = this; + /** + * Draw the nyan cat + * + * @private + */ + drawNyanCat() { + var self = this; + var startWidth = this.scoreboardWidth + this.trajectories[0].length; + var dist = "\u001b[" + startWidth + "C"; + var padding; - this.trajectories.forEach(function (line) { - process.stdout.write("\u001b[" + self.scoreboardWidth + "C"); - process.stdout.write(line.join("")); - process.stdout.write("\n"); - }); + browser$1$1.stdout.write(dist); + browser$1$1.stdout.write("_,------,"); + browser$1$1.stdout.write("\n"); - this.cursorUp(this.numberOfLines); - }; + browser$1$1.stdout.write(dist); + padding = self.tick ? " " : " "; + browser$1$1.stdout.write("_|" + padding + "/\\_/\\ "); + browser$1$1.stdout.write("\n"); - /** - * Draw the nyan cat - * - * @private - */ - NyanCat.prototype.drawNyanCat = function () { - var self = this; - var startWidth = this.scoreboardWidth + this.trajectories[0].length; - var dist = "\u001b[" + startWidth + "C"; - var padding = ""; - - process.stdout.write(dist); - process.stdout.write("_,------,"); - process.stdout.write("\n"); - - process.stdout.write(dist); - padding = self.tick ? " " : " "; - process.stdout.write("_|" + padding + "/\\_/\\ "); - process.stdout.write("\n"); - - process.stdout.write(dist); - padding = self.tick ? "_" : "__"; - var tail = self.tick ? "~" : "^"; - process.stdout.write(tail + "|" + padding + this.face() + " "); - process.stdout.write("\n"); - - process.stdout.write(dist); - padding = self.tick ? " " : " "; - process.stdout.write(padding + '"" "" '); - process.stdout.write("\n"); - - this.cursorUp(this.numberOfLines); - }; + browser$1$1.stdout.write(dist); + padding = self.tick ? "_" : "__"; + var tail = self.tick ? "~" : "^"; + browser$1$1.stdout.write(tail + "|" + padding + this.face() + " "); + browser$1$1.stdout.write("\n"); - /** - * Draw nyan cat face. - * - * @private - * @return {string} - */ + browser$1$1.stdout.write(dist); + padding = self.tick ? " " : " "; + browser$1$1.stdout.write(padding + '"" "" '); + browser$1$1.stdout.write("\n"); - NyanCat.prototype.face = function () { - var stats = this.stats; - if (stats.failures) { - return "( x .x)"; - } else if (stats.pending) { - return "( o .o)"; - } else if (stats.passes) { - return "( ^ .^)"; + this.cursorUp(this.numberOfLines); } - return "( - .-)"; - }; - - /** - * Move cursor up `n`. - * - * @private - * @param {number} n - */ - - NyanCat.prototype.cursorUp = function (n) { - process.stdout.write("\u001b[" + n + "A"); - }; - /** - * Move cursor down `n`. - * - * @private - * @param {number} n - */ + /** + * Draw nyan cat face. + * + * @private + * @return {string} + */ - NyanCat.prototype.cursorDown = function (n) { - process.stdout.write("\u001b[" + n + "B"); - }; + face() { + var stats = this.stats; + if (stats.failures) { + return "( x .x)"; + } else if (stats.pending) { + return "( o .o)"; + } else if (stats.passes) { + return "( ^ .^)"; + } + return "( - .-)"; + } - /** - * Generate rainbow colors. - * - * @private - * @return {Array} - */ - NyanCat.prototype.generateColors = function () { - var colors = []; + /** + * Move cursor up `n`. + * + * @private + * @param {number} n + */ - for (var i = 0; i < 6 * 7; i++) { - var pi3 = Math.floor(Math.PI / 3); - var n = i * (1.0 / 6); - var r = Math.floor(3 * Math.sin(n) + 3); - var g = Math.floor(3 * Math.sin(n + 2 * pi3) + 3); - var b = Math.floor(3 * Math.sin(n + 4 * pi3) + 3); - colors.push(36 * r + 6 * g + b + 16); + cursorUp(n) { + browser$1$1.stdout.write("\u001b[" + n + "A"); } - return colors; - }; + /** + * Move cursor down `n`. + * + * @private + * @param {number} n + */ - /** - * Apply rainbow to the given `str`. - * - * @private - * @param {string} str - * @return {string} - */ - NyanCat.prototype.rainbowify = function (str) { - if (!Base.useColors) { - return str; + cursorDown(n) { + browser$1$1.stdout.write("\u001b[" + n + "B"); } - var color = this.rainbowColors[this.colorIndex % this.rainbowColors.length]; - this.colorIndex += 1; - return "\u001b[38;5;" + color + "m" + str + "\u001b[0m"; - }; - NyanCat.description = '"nyan cat"'; - }(nyan)); + /** + * Generate rainbow colors. + * + * @private + * @return {Array} + */ + generateColors() { + var colors = []; - var xunit = {exports: {}}; + for (var i = 0; i < 6 * 7; i++) { + var pi3 = Math.floor(Math.PI / 3); + var n = i * (1.0 / 6); + var r = Math.floor(3 * Math.sin(n) + 3); + var g = Math.floor(3 * Math.sin(n + 2 * pi3) + 3); + var b = Math.floor(3 * Math.sin(n + 4 * pi3) + 3); + colors.push(36 * r + 6 * g + b + 16); + } - (function (module, exports) { + return colors; + } - /** - * @typedef {import('../runner.js')} Runner - * @typedef {import('../test.js')} Test - */ + /** + * Apply rainbow to the given `str`. + * + * @private + * @param {string} str + * @return {string} + */ + rainbowify(str) { + if (!Base.useColors) { + return str; + } + var color = this.rainbowColors[this.colorIndex % this.rainbowColors.length]; + this.colorIndex += 1; + return "\u001b[38;5;" + color + "m" + str + "\u001b[0m"; + } + } - /** - * @module XUnit - */ - /** - * Module dependencies. - */ + var nyan = /*#__PURE__*/Object.freeze({ + __proto__: null, + NyanCat: NyanCat + }); + + var require$$9 = /*@__PURE__*/getAugmentedNamespace(nyan); - var Base = base$1.exports; - var utils = utils$3; - var fs = require$$2; - var path = require$$1; - var errors = errors$2; - var createUnsupportedError = errors.createUnsupportedError; - var constants = runner.constants; - var EVENT_TEST_PASS = constants.EVENT_TEST_PASS; - var EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL; - var EVENT_RUN_END = constants.EVENT_RUN_END; - var EVENT_TEST_PENDING = constants.EVENT_TEST_PENDING; - var STATE_FAILED = runnable.constants.STATE_FAILED; - var inherits = utils.inherits; + var createUnsupportedError = createUnsupportedError$2; + var constants$5 = Runner.constants; + var EVENT_TEST_PASS$3 = constants$5.EVENT_TEST_PASS; + var EVENT_TEST_FAIL$3 = constants$5.EVENT_TEST_FAIL; + var EVENT_RUN_END$6 = constants$5.EVENT_RUN_END; + var EVENT_TEST_PENDING$1 = constants$5.EVENT_TEST_PENDING; + var STATE_FAILED$1 = Runnable.constants.STATE_FAILED; var escape = utils.escape; + var ANSI_ESCAPE_SEQUENCE = new RegExp( + String.fromCharCode(27) + "\\[[0-?]*[ -/]*[@-~]", + "g", + ); /** * Save timer references to avoid Sinon interfering (see GH-237). */ - var Date = commonjsGlobal.Date; + var Date$2 = global$1.Date; - /** - * Expose `XUnit`. - */ + class XUnit extends Base { + static description = "XUnit-compatible XML output"; - module.exports = XUnit; + /** + * Constructs a new `XUnit` reporter instance. + * + * @public + * @memberof Mocha.reporters + * @extends Mocha.reporters.Base + * @param {Runner} runner - Instance triggers reporter actions. + * @param {Object} [options] - runner options + */ + constructor(runner, options) { + super(runner, options); - /** - * Constructs a new `XUnit` reporter instance. - * - * @public - * @class - * @memberof Mocha.reporters - * @extends Mocha.reporters.Base - * @param {Runner} runner - Instance triggers reporter actions. - * @param {Object} [options] - runner options - */ - function XUnit(runner, options) { - Base.call(this, runner, options); + var stats = this.stats; + var tests = []; + var self = this; - var stats = this.stats; - var tests = []; - var self = this; + // the name of the test suite, as it will appear in the resulting XML file + var suiteName; - // the name of the test suite, as it will appear in the resulting XML file - var suiteName; + // the default name of the test suite if none is provided + var DEFAULT_SUITE_NAME = "Mocha Tests"; - // the default name of the test suite if none is provided - var DEFAULT_SUITE_NAME = "Mocha Tests"; + if (options && options.reporterOptions) { + if (options.reporterOptions.output) { + if (!fs.createWriteStream) { + throw createUnsupportedError("file output not supported in browser"); + } - if (options && options.reporterOptions) { - if (options.reporterOptions.output) { - if (!fs.createWriteStream) { - throw createUnsupportedError("file output not supported in browser"); + fs.mkdirSync(path.dirname(options.reporterOptions.output), { + recursive: true, + }); + self.fileStream = fs.createWriteStream(options.reporterOptions.output); } - fs.mkdirSync(path.dirname(options.reporterOptions.output), { - recursive: true, - }); - self.fileStream = fs.createWriteStream(options.reporterOptions.output); + // get the suite name from the reporter options (if provided) + suiteName = options.reporterOptions.suiteName; } - // get the suite name from the reporter options (if provided) - suiteName = options.reporterOptions.suiteName; - } + // fall back to the default suite name + suiteName = suiteName || DEFAULT_SUITE_NAME; - // fall back to the default suite name - suiteName = suiteName || DEFAULT_SUITE_NAME; + runner.on(EVENT_TEST_PENDING$1, function (test) { + tests.push(test); + }); - runner.on(EVENT_TEST_PENDING, function (test) { - tests.push(test); - }); + runner.on(EVENT_TEST_PASS$3, function (test) { + tests.push(test); + }); - runner.on(EVENT_TEST_PASS, function (test) { - tests.push(test); - }); + runner.on(EVENT_TEST_FAIL$3, function (test) { + tests.push(test); + }); - runner.on(EVENT_TEST_FAIL, function (test) { - tests.push(test); - }); + runner.once(EVENT_RUN_END$6, function () { + self.write( + tag( + "testsuite", + { + name: suiteName, + tests: stats.tests, + failures: 0, + errors: stats.failures, + skipped: stats.tests - stats.failures - stats.passes, + timestamp: new Date$2().toUTCString(), + time: stats.duration / 1000 || 0, + }, + false, + ), + ); - runner.once(EVENT_RUN_END, function () { - self.write( - tag( - "testsuite", - { - name: suiteName, - tests: stats.tests, - failures: 0, - errors: stats.failures, - skipped: stats.tests - stats.failures - stats.passes, - timestamp: new Date().toUTCString(), - time: stats.duration / 1000 || 0, - }, - false, - ), - ); + tests.forEach(function (t) { + self.test(t, options); + }); - tests.forEach(function (t) { - self.test(t, options); + self.write(""); }); + } - self.write(""); - }); - } - - /** - * Inherit from `Base.prototype`. - */ - inherits(XUnit, Base); - - /** - * Override done to close the stream (if it's a file). - * - * @param failures - * @param {Function} fn - */ - XUnit.prototype.done = function (failures, fn) { - if (this.fileStream) { - this.fileStream.end(function () { + /** + * Override done to close the stream (if it's a file). + * + * @param failures + * @param {Function} fn + */ + done(failures, fn) { + if (this.fileStream) { + this.fileStream.end(function () { + fn(failures); + }); + } else { fn(failures); - }); - } else { - fn(failures); + } } - }; - /** - * Write out the given line. - * - * @param {string} line - */ - XUnit.prototype.write = function (line) { - if (this.fileStream) { - this.fileStream.write(line + "\n"); - } else if (typeof process === "object" && process.stdout) { - process.stdout.write(line + "\n"); - } else { - Base.consoleLog(line); + /** + * Write out the given line. + * + * @param {string} line + */ + write(line) { + if (this.fileStream) { + this.fileStream.write(line + "\n"); + } else if (typeof browser$1$1 === "object" && browser$1$1.stdout) { + browser$1$1.stdout.write(line + "\n"); + } else { + Base.consoleLog(line); + } } - }; - /** - * Output tag for the given `test.` - * - * @param {Test} test - */ - XUnit.prototype.test = function (test, options) { - Base.useColors = false; - - var attrs = { - classname: test.parent.fullTitle(), - name: test.title, - file: testFilePath(test.file, options), - time: test.duration / 1000 || 0, - }; + /** + * Output tag for the given `test.` + * + * @param {Test} test + */ + test(test, options) { + Base.useColors = false; + + var attrs = { + classname: test.parent.fullTitle(), + name: test.title, + file: testFilePath(test.file, options), + time: test.duration / 1000 || 0, + }; - if (test.state === STATE_FAILED) { - var err = test.err; - var diff = - !Base.hideDiff && Base.showDiff(err) - ? "\n" + Base.generateDiff(err.actual, err.expected) - : ""; - this.write( - tag( - "testcase", - attrs, - false, + if (test.state === STATE_FAILED$1) { + var err = test.err; + var diff = + !Base.hideDiff && Base.showDiff(err) + ? "\n" + Base.generateDiff(err.actual, err.expected) + : ""; + this.write( tag( - "failure", - {}, + "testcase", + attrs, false, - escape(err.message) + escape(diff) + "\n" + escape(err.stack), + tag( + "failure", + {}, + false, + escapeXml(err.message) + + escapeXml(diff) + + "\n" + + escapeXml(err.stack), + ), ), - ), - ); - } else if (test.isPending()) { - this.write(tag("testcase", attrs, false, tag("skipped", {}, true))); - } else { - this.write(tag("testcase", attrs, true)); + ); + } else if (test.isPending()) { + this.write(tag("testcase", attrs, false, tag("skipped", {}, true))); + } else { + this.write(tag("testcase", attrs, true)); + } } - }; + } /** * HTML tag helper. @@ -18846,7 +13520,7 @@ for (var key in attrs) { if (Object.prototype.hasOwnProperty.call(attrs, key)) { - pairs.push(key + '="' + escape(attrs[key]) + '"'); + pairs.push(key + '="' + escapeXml(attrs[key]) + '"'); } } @@ -18857,43 +13531,54 @@ return tag; } + function escapeXml(value) { + return escape( + stripInvalidXmlCharacters(String(value).replace(ANSI_ESCAPE_SEQUENCE, "")), + ); + } + + function stripInvalidXmlCharacters(value) { + var result = ""; + + for (var i = 0; i < value.length; i += 1) { + var charCode = value.charCodeAt(i); + if ( + charCode === 0x09 || + charCode === 0x0a || + charCode === 0x0d || + charCode >= 0x20 + ) { + result += value[i]; + } + } + + return result; + } + function testFilePath(filepath, options) { if ( options && options.reporterOptions && options.reporterOptions.showRelativePaths ) { - return path.relative(process.cwd(), filepath); + return path.relative(browser$1$1.cwd(), filepath); } return filepath; } - XUnit.description = "XUnit-compatible XML output"; - }(xunit)); - - var markdown = {exports: {}}; - - (function (module, exports) { - - /** - * @typedef {import('../runner.js')} Runner - */ + var xunit = /*#__PURE__*/Object.freeze({ + __proto__: null, + XUnit: XUnit + }); - /** - * @module Markdown - */ - /** - * Module dependencies. - */ + var require$$10$1 = /*@__PURE__*/getAugmentedNamespace(xunit); - var Base = base$1.exports; - var utils = utils$3; - var constants = runner.constants; - var EVENT_RUN_END = constants.EVENT_RUN_END; - var EVENT_SUITE_BEGIN = constants.EVENT_SUITE_BEGIN; - var EVENT_SUITE_END = constants.EVENT_SUITE_END; - var EVENT_TEST_PASS = constants.EVENT_TEST_PASS; + var constants$4 = Runner.constants; + var EVENT_RUN_END$5 = constants$4.EVENT_RUN_END; + var EVENT_SUITE_BEGIN$1 = constants$4.EVENT_SUITE_BEGIN; + var EVENT_SUITE_END = constants$4.EVENT_SUITE_END; + var EVENT_TEST_PASS$2 = constants$4.EVENT_TEST_PASS; /** * Constants @@ -18901,127 +13586,105 @@ var SUITE_PREFIX = "$"; - /** - * Expose `Markdown`. - */ - - module.exports = Markdown; + class Markdown extends Base { + static description = "GitHub Flavored Markdown"; - /** - * Constructs a new `Markdown` reporter instance. - * - * @public - * @class - * @memberof Mocha.reporters - * @extends Mocha.reporters.Base - * @param {Runner} runner - Instance triggers reporter actions. - * @param {Object} [options] - runner options - */ - function Markdown(runner, options) { - Base.call(this, runner, options); + /** + * Constructs a new `Markdown` reporter instance. + * + * @public + * @memberof Mocha.reporters + * @extends Mocha.reporters.Base + * @param {Runner} runner - Instance triggers reporter actions. + * @param {Object} [options] - runner options + */ + constructor(runner, options) { + super(runner, options); - var level = 0; - var buf = ""; + var level = 0; + var buf = ""; - function title(str) { - return Array(level).join("#") + " " + str; - } + function title(str) { + return Array(level).join("#") + " " + str; + } - function mapTOC(suite, obj) { - var ret = obj; - var key = SUITE_PREFIX + suite.title; + function mapTOC(suite, obj) { + var ret = obj; + var key = SUITE_PREFIX + suite.title; - obj = obj[key] = obj[key] || { suite }; - suite.suites.forEach(function (suite) { - mapTOC(suite, obj); - }); + obj = obj[key] = obj[key] || { suite }; + suite.suites.forEach(function (suite) { + mapTOC(suite, obj); + }); - return ret; - } + return ret; + } - function stringifyTOC(obj, level) { - ++level; - var buf = ""; - var link; - for (var key in obj) { - if (key === "suite") { - continue; - } - if (key !== SUITE_PREFIX) { - link = " - [" + key.substring(1) + "]"; - link += "(#" + utils.slug(obj[key].suite.fullTitle()) + ")\n"; - buf += Array(level).join(" ") + link; + function stringifyTOC(obj, level) { + ++level; + var buf = ""; + var link; + for (var key in obj) { + if (key === "suite") { + continue; + } + if (key !== SUITE_PREFIX) { + link = " - [" + key.substring(1) + "]"; + link += "(#" + utils.slug(obj[key].suite.fullTitle()) + ")\n"; + buf += Array(level).join(" ") + link; + } + buf += stringifyTOC(obj[key], level); } - buf += stringifyTOC(obj[key], level); + return buf; } - return buf; - } - function generateTOC(suite) { - var obj = mapTOC(suite, {}); - return stringifyTOC(obj, 0); - } + function generateTOC(suite) { + var obj = mapTOC(suite, {}); + return stringifyTOC(obj, 0); + } - generateTOC(runner.suite); + generateTOC(runner.suite); - runner.on(EVENT_SUITE_BEGIN, function (suite) { - ++level; - var slug = utils.slug(suite.fullTitle()); - buf += '' + "\n"; - buf += title(suite.title) + "\n"; - }); + runner.on(EVENT_SUITE_BEGIN$1, function (suite) { + ++level; + var slug = utils.slug(suite.fullTitle()); + buf += '' + "\n"; + buf += title(suite.title) + "\n"; + }); - runner.on(EVENT_SUITE_END, function () { - --level; - }); + runner.on(EVENT_SUITE_END, function () { + --level; + }); - runner.on(EVENT_TEST_PASS, function (test) { - var code = utils.clean(test.body); - buf += test.title + ".\n"; - buf += "\n```js\n"; - buf += code + "\n"; - buf += "```\n\n"; - }); + runner.on(EVENT_TEST_PASS$2, function (test) { + var code = utils.clean(test.body); + buf += test.title + ".\n"; + buf += "\n```js\n"; + buf += code + "\n"; + buf += "```\n\n"; + }); - runner.once(EVENT_RUN_END, function () { - process.stdout.write("# TOC\n"); - process.stdout.write(generateTOC(runner.suite)); - process.stdout.write(buf); - }); + runner.once(EVENT_RUN_END$5, function () { + browser$1$1.stdout.write("# TOC\n"); + browser$1$1.stdout.write(generateTOC(runner.suite)); + browser$1$1.stdout.write(buf); + }); + } } - Markdown.description = "GitHub Flavored Markdown"; - }(markdown)); - - var progress = {exports: {}}; - - (function (module, exports) { - - /** - * @typedef {import('../runner.js')} Runner - */ - - /** - * @module Progress - */ - /** - * Module dependencies. - */ - - var Base = base$1.exports; - var constants = runner.constants; - var EVENT_RUN_BEGIN = constants.EVENT_RUN_BEGIN; - var EVENT_TEST_END = constants.EVENT_TEST_END; - var EVENT_RUN_END = constants.EVENT_RUN_END; - var inherits = utils$3.inherits; - var color = Base.color; - var cursor = Base.cursor; + var markdown = /*#__PURE__*/Object.freeze({ + __proto__: null, + Markdown: Markdown + }); - /** - * Expose `Progress`. - */ + var require$$11 = /*@__PURE__*/getAugmentedNamespace(markdown); - module.exports = Progress; + var constants$3 = Runner.constants; + var EVENT_RUN_BEGIN$3 = constants$3.EVENT_RUN_BEGIN; + var EVENT_TEST_END$2 = constants$3.EVENT_TEST_END; + var EVENT_RUN_END$4 = constants$3.EVENT_RUN_END; + var color$1 = Base.color; + var cursor$1 = Base.cursor; /** * General progress bar color. @@ -19029,115 +13692,96 @@ Base.colors.progress = 90; - /** - * Constructs a new `Progress` reporter instance. - * - * @public - * @class - * @memberof Mocha.reporters - * @extends Mocha.reporters.Base - * @param {Runner} runner - Instance triggers reporter actions. - * @param {Object} [options] - runner options - */ - function Progress(runner, options) { - Base.call(this, runner, options); - - var self = this; - var width = (Base.window.width * 0.5) | 0; - var total = runner.total; - var complete = 0; - var lastN = -1; + class Progress extends Base { + static description = "a progress bar"; - // default chars - options = options || {}; - var reporterOptions = options.reporterOptions || {}; - - options.open = reporterOptions.open || "["; - options.complete = reporterOptions.complete || "▬"; - options.incomplete = reporterOptions.incomplete || Base.symbols.dot; - options.close = reporterOptions.close || "]"; - options.verbose = reporterOptions.verbose || false; - - // tests started - runner.on(EVENT_RUN_BEGIN, function () { - process.stdout.write("\n"); - cursor.hide(); - }); + /** + * Constructs a new `Progress` reporter instance. + * + * @public + * @memberof Mocha.reporters + * @extends Mocha.reporters.Base + * @param {Runner} runner - Instance triggers reporter actions. + * @param {Object} [options] - runner options + */ + constructor(runner, options) { + super(runner, options); - // tests complete - runner.on(EVENT_TEST_END, function () { - complete++; + var self = this; + var width = (Base.window.width * 0.5) | 0; + var total = runner.total; + var complete = 0; + var lastN = -1; + + // default chars + options = options || {}; + var reporterOptions = options.reporterOptions || {}; + + options.open = reporterOptions.open || "["; + options.complete = reporterOptions.complete || "▬"; + options.incomplete = reporterOptions.incomplete || Base.symbols.dot; + options.close = reporterOptions.close || "]"; + options.verbose = reporterOptions.verbose || false; + + // tests started + runner.on(EVENT_RUN_BEGIN$3, function () { + browser$1$1.stdout.write("\n"); + cursor$1.hide(); + }); - var percent = complete / total; - var n = (width * percent) | 0; - var i = width - n; + // tests complete + runner.on(EVENT_TEST_END$2, function () { + complete++; - if (n === lastN && !options.verbose) { - // Don't re-render the line if it hasn't changed - return; - } - lastN = n; + var percent = complete / total; + var n = (width * percent) | 0; + var i = width - n; - cursor.CR(); - process.stdout.write("\u001b[J"); - process.stdout.write(color("progress", " " + options.open)); - process.stdout.write(Array(n).join(options.complete)); - process.stdout.write(Array(i).join(options.incomplete)); - process.stdout.write(color("progress", options.close)); - if (options.verbose) { - process.stdout.write(color("progress", " " + complete + " of " + total)); - } - }); + if (n === lastN && !options.verbose) { + // Don't re-render the line if it hasn't changed + return; + } + lastN = n; + + cursor$1.CR(); + browser$1$1.stdout.write("\u001b[J"); + browser$1$1.stdout.write(color$1("progress", " " + options.open)); + browser$1$1.stdout.write(Array(n).join(options.complete)); + browser$1$1.stdout.write(Array(i).join(options.incomplete)); + browser$1$1.stdout.write(color$1("progress", options.close)); + if (options.verbose) { + browser$1$1.stdout.write( + color$1("progress", " " + complete + " of " + total), + ); + } + }); - // tests are complete, output some stats - // and the failures if any - runner.once(EVENT_RUN_END, function () { - cursor.show(); - process.stdout.write("\n"); - self.epilogue(); - }); + // tests are complete, output some stats + // and the failures if any + runner.once(EVENT_RUN_END$4, function () { + cursor$1.show(); + browser$1$1.stdout.write("\n"); + self.epilogue(); + }); + } } - /** - * Inherit from `Base.prototype`. - */ - inherits(Progress, Base); - - Progress.description = "a progress bar"; - }(progress)); - - var landing = {exports: {}}; - - (function (module, exports) { - - /** - * @typedef {import('../runner.js')} Runner - */ + var progress = /*#__PURE__*/Object.freeze({ + __proto__: null, + Progress: Progress + }); - /** - * @module Landing - */ - /** - * Module dependencies. - */ + var require$$12$1 = /*@__PURE__*/getAugmentedNamespace(progress); - var Base = base$1.exports; - var inherits = utils$3.inherits; - var constants = runner.constants; - var EVENT_RUN_BEGIN = constants.EVENT_RUN_BEGIN; - var EVENT_RUN_END = constants.EVENT_RUN_END; - var EVENT_TEST_END = constants.EVENT_TEST_END; - var STATE_FAILED = runnable.constants.STATE_FAILED; + var constants$2 = Runner.constants; + var EVENT_RUN_BEGIN$2 = constants$2.EVENT_RUN_BEGIN; + var EVENT_RUN_END$3 = constants$2.EVENT_RUN_END; + var EVENT_TEST_END$1 = constants$2.EVENT_TEST_END; + var STATE_FAILED = Runnable.constants.STATE_FAILED; var cursor = Base.cursor; var color = Base.color; - /** - * Expose `Landing`. - */ - - module.exports = Landing; - /** * Airplane color. */ @@ -19156,144 +13800,126 @@ Base.colors.runway = 90; - /** - * Constructs a new `Landing` reporter instance. - * - * @public - * @class - * @memberof Mocha.reporters - * @extends Mocha.reporters.Base - * @param {Runner} runner - Instance triggers reporter actions. - * @param {Object} [options] - runner options - */ - function Landing(runner, options) { - Base.call(this, runner, options); - - var self = this; - var width = (Base.window.width * 0.75) | 0; - var stream = process.stdout; - - var plane = color("plane", "✈"); - var crashed = -1; - var n = 0; - var total = 0; + class Landing extends Base { + static description = "Unicode landing strip"; - function runway() { - var buf = Array(width).join("-"); - return " " + color("runway", buf); - } + /** + * Constructs a new `Landing` reporter instance. + * + * @public + * @memberof Mocha.reporters + * @extends Mocha.reporters.Base + * @param {Runner} runner - Instance triggers reporter actions. + * @param {Object} [options] - runner options + */ + constructor(runner, options) { + super(runner, options); - runner.on(EVENT_RUN_BEGIN, function () { - stream.write("\n\n\n "); - cursor.hide(); - }); + var self = this; + var width = (Base.window.width * 0.75) | 0; + var stream = browser$1$1.stdout; - runner.on(EVENT_TEST_END, function (test) { - // check if the plane crashed - var col = crashed === -1 ? ((width * ++n) / ++total) | 0 : crashed; - // show the crash - if (test.state === STATE_FAILED) { - plane = color("plane crash", "✈"); - crashed = col; - } - - // render landing strip - stream.write("\u001b[" + (width + 1) + "D\u001b[2A"); - stream.write(runway()); - stream.write("\n "); - stream.write(color("runway", Array(col).join("⋅"))); - stream.write(plane); - stream.write(color("runway", Array(width - col).join("⋅") + "\n")); - stream.write(runway()); - stream.write("\u001b[0m"); - }); + var plane = color("plane", "✈"); + var crashed = -1; + var n = 0; + var total = 0; - runner.once(EVENT_RUN_END, function () { - cursor.show(); - process.stdout.write("\n"); - self.epilogue(); - }); + function runway() { + var buf = Array(width).join("-"); + return " " + color("runway", buf); + } - // if cursor is hidden when we ctrl-C, then it will remain hidden unless... - process.once("SIGINT", function () { - cursor.show(); - nextTick$1(function () { - process.kill(process.pid, "SIGINT"); + runner.on(EVENT_RUN_BEGIN$2, function () { + stream.write("\n\n\n "); + cursor.hide(); }); - }); - } - - /** - * Inherit from `Base.prototype`. - */ - inherits(Landing, Base); - Landing.description = "Unicode landing strip"; - }(landing)); + runner.on(EVENT_TEST_END$1, function (test) { + // check if the plane crashed + var col = crashed === -1 ? ((width * ++n) / ++total) | 0 : crashed; + // show the crash + if (test.state === STATE_FAILED) { + plane = color("plane crash", "✈"); + crashed = col; + } - var jsonStream = {exports: {}}; + // render landing strip + stream.write("\u001b[" + (width + 1) + "D\u001b[2A"); + stream.write(runway()); + stream.write("\n "); + stream.write(color("runway", Array(col).join("⋅"))); + stream.write(plane); + stream.write(color("runway", Array(width - col).join("⋅") + "\n")); + stream.write(runway()); + stream.write("\u001b[0m"); + }); - (function (module, exports) { + runner.once(EVENT_RUN_END$3, function () { + cursor.show(); + browser$1$1.stdout.write("\n"); + self.epilogue(); + }); - /** - * @typedef {import('../runner.js')} Runner - * @typedef {import('../test.js')} Test - */ + // if cursor is hidden when we ctrl-C, then it will remain hidden unless... + browser$1$1.once("SIGINT", function () { + cursor.show(); + browser$1$1.nextTick(function () { + browser$1$1.kill(browser$1$1.pid, "SIGINT"); + }); + }); + } + } - /** - * @module JSONStream - */ - /** - * Module dependencies. - */ + var landing = /*#__PURE__*/Object.freeze({ + __proto__: null, + Landing: Landing + }); - var Base = base$1.exports; - var constants = runner.constants; - var EVENT_TEST_PASS = constants.EVENT_TEST_PASS; - var EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL; - var EVENT_RUN_BEGIN = constants.EVENT_RUN_BEGIN; - var EVENT_RUN_END = constants.EVENT_RUN_END; + var require$$13 = /*@__PURE__*/getAugmentedNamespace(landing); - /** - * Expose `JSONStream`. - */ + var constants$1 = Runner.constants; + var EVENT_TEST_PASS$1 = constants$1.EVENT_TEST_PASS; + var EVENT_TEST_FAIL$2 = constants$1.EVENT_TEST_FAIL; + var EVENT_RUN_BEGIN$1 = constants$1.EVENT_RUN_BEGIN; + var EVENT_RUN_END$2 = constants$1.EVENT_RUN_END; - module.exports = JSONStream; + class JSONStream extends Base { + static description = "newline delimited JSON events"; - /** - * Constructs a new `JSONStream` reporter instance. - * - * @public - * @class - * @memberof Mocha.reporters - * @extends Mocha.reporters.Base - * @param {Runner} runner - Instance triggers reporter actions. - * @param {Object} [options] - runner options - */ - function JSONStream(runner, options) { - Base.call(this, runner, options); + /** + * Constructs a new `JSONStream` reporter instance. + * + * @public + * @memberof Mocha.reporters + * @extends Mocha.reporters.Base + * @param {Runner} runner - Instance triggers reporter actions. + * @param {Object} [options] - runner options + */ + constructor(runner, options) { + super(runner, options); - var self = this; - var total = runner.total; + var self = this; + var total = runner.total; - runner.once(EVENT_RUN_BEGIN, function () { - writeEvent(["start", { total }]); - }); + runner.once(EVENT_RUN_BEGIN$1, function () { + writeEvent(["start", { total }]); + }); - runner.on(EVENT_TEST_PASS, function (test) { - writeEvent(["pass", clean(test)]); - }); + runner.on(EVENT_TEST_PASS$1, function (test) { + writeEvent(["pass", clean(test)]); + }); - runner.on(EVENT_TEST_FAIL, function (test, err) { - test = clean(test); - test.err = err.message; - test.stack = err.stack || null; - writeEvent(["fail", test]); - }); + runner.on(EVENT_TEST_FAIL$2, function (test, err) { + test = clean(test); + test.err = err.message; + test.stack = err.stack || null; + writeEvent(["fail", test]); + }); - runner.once(EVENT_RUN_END, function () { - writeEvent(["end", self.stats]); - }); + runner.once(EVENT_RUN_END$2, function () { + writeEvent(["end", self.stats]); + }); + } } /** @@ -19303,7 +13929,7 @@ * @param {unknown[]} event - Mocha event to be output. */ function writeEvent(event) { - process.stdout.write(JSON.stringify(event) + "\n"); + browser$1$1.stdout.write(JSON.stringify(event) + "\n"); } /** @@ -19325,29 +13951,196 @@ }; } - JSONStream.description = "newline delimited JSON events"; - }(jsonStream)); - - (function (exports) { - - // Alias exports to a their normalized format Mocha#reporter to prevent a need - // for dynamic (try/catch) requires, which Browserify doesn't handle. - exports.Base = exports.base = base$1.exports; - exports.Dot = exports.dot = dot.exports; - exports.Doc = exports.doc = doc.exports; - exports.TAP = exports.tap = tap.exports; - exports.JSON = exports.json = json.exports; - exports.HTML = exports.html = html.exports; - exports.List = exports.list = list.exports; - exports.Min = exports.min = min.exports; - exports.Spec = exports.spec = spec.exports; - exports.Nyan = exports.nyan = nyan.exports; - exports.XUnit = exports.xunit = xunit.exports; - exports.Markdown = exports.markdown = markdown.exports; - exports.Progress = exports.progress = progress.exports; - exports.Landing = exports.landing = landing.exports; - exports.JSONStream = exports["json-stream"] = jsonStream.exports; - }(reporters)); + var jsonStream = /*#__PURE__*/Object.freeze({ + __proto__: null, + JSONStream: JSONStream + }); + + var require$$14$1 = /*@__PURE__*/getAugmentedNamespace(jsonStream); + + const { constants } = Runner; + var EVENT_TEST_FAIL$1 = constants.EVENT_TEST_FAIL; + var EVENT_RUN_END$1 = constants.EVENT_RUN_END; + + /** + * Extract file, line, and column from an error stack trace. + * + * @private + * @param {string} [stackTrace] - stack trace string + * @return {{ file?: string, line?: string, col?: string }} + */ + function extractLocation(stackTrace) { + if (!stackTrace) { + return {}; + } + var matches = + /^\s*at Context.*\(([^()]+):([0-9]+):([0-9]+)\)/gm.exec(stackTrace) || + /^\s*at.*\(([^()]+):([0-9]+):([0-9]+)\)/gm.exec(stackTrace); + if (matches === null) { + return {}; + } + return { + file: matches[1], + line: matches[2], + col: matches[3], + }; + } + + /** + * Escape a value for use in a GitHub Actions workflow command. + * + * @private + * @param {string} value + * @return {string} + */ + function escapeWorkflowValue(value) { + return String(value) + .replace(/%/g, "%25") + .replace(/\r/g, "%0D") + .replace(/\n/g, "%0A"); + } + + /** + * Escape a property value for use in a GitHub Actions workflow command. + * + * @private + * @param {string} value + * @return {string} + */ + function escapeWorkflowProperty(value) { + return String(value) + .replace(/%/g, "%25") + .replace(/\r/g, "%0D") + .replace(/\n/g, "%0A") + .replace(/:/g, "%3A") + .replace(/,/g, "%2C"); + } + + class GithubActions extends Spec { + static description = + "like spec, with GitHub Actions error annotations and job summary"; + + /** + * Construct a new GithubActions reporter instance. + * + * @description + * Extend the Spec reporter to add GitHub Actions error annotations and + * Job Summary output when running in GitHub Actions CI. + * + * @public + * @memberof Mocha.reporters + * @extends Mocha.reporters.Spec + * @param {Runner} runner - Instance triggers reporter actions. + * @param {Object} [options] - runner options + */ + constructor(runner, options) { + super(runner, options); + + var ciFailures = []; + + runner.on(EVENT_TEST_FAIL$1, function (test) { + ciFailures.push(test); + }); + + runner.once(EVENT_RUN_END$1, () => { + if (ciFailures.length > 0) { + browser$1$1.stdout.write("::group::Mocha Annotations\n"); + + for (var test of ciFailures) { + var location = extractLocation(test.err && test.err.stack); + var props = []; + if (location.file) { + props.push("file=" + escapeWorkflowProperty(location.file)); + } + if (location.line) { + props.push("line=" + escapeWorkflowProperty(location.line)); + } + if (location.col) { + props.push("col=" + escapeWorkflowProperty(location.col)); + } + + var message = test.err ? escapeWorkflowValue(test.err.message) : ""; + browser$1$1.stdout.write( + "::error " + props.join(",") + "::" + message + "\n", + ); + } + + browser$1$1.stdout.write("::endgroup::\n"); + } + + var summaryFile = browser$1$1.env.GITHUB_STEP_SUMMARY; + if (summaryFile) { + var lines = []; + lines.push( + ":white_check_mark: " + + (this.stats.passes || 0) + + " passing (" + + ms(this.stats.duration) + + ")", + ); + if (this.stats.pending) { + lines.push(":pause_button: " + this.stats.pending + " pending"); + } + if (this.stats.failures) { + lines.push(":x: " + this.stats.failures + " failing"); + } + fs.appendFileSync(summaryFile, lines.join("\n") + "\n"); + } + }); + } + } + + var githubActions = /*#__PURE__*/Object.freeze({ + __proto__: null, + GithubActions: GithubActions + }); + + var require$$15$1 = /*@__PURE__*/getAugmentedNamespace(githubActions); + + var hasRequiredReporters; + + function requireReporters () { + if (hasRequiredReporters) return reporters; + hasRequiredReporters = 1; + (function (exports) { + + // Alias exports to a their normalized format Mocha#reporter to prevent a need + // for dynamic (try/catch) requires, which Browserify doesn't handle. + const { Base } = require$$0; + exports.Base = exports.base = Base; + const { Dot } = require$$1; + exports.Dot = exports.dot = Dot; + const { Doc } = require$$2; + exports.Doc = exports.doc = Doc; + const { TAP } = require$$3; + exports.TAP = exports.tap = TAP; + const { JSONReporter } = require$$4$1; + exports.JSON = exports.json = JSONReporter; + const { HTML } = require$$5; + exports.HTML = exports.html = HTML; + const { List } = require$$6; + exports.List = exports.list = List; + const { Min } = require$$7$1; + exports.Min = exports.min = Min; + const { Spec } = require$$8; + exports.Spec = exports.spec = Spec; + const { NyanCat } = require$$9; + exports.Nyan = exports.nyan = NyanCat; + const { XUnit } = require$$10$1; + exports.XUnit = exports.xunit = XUnit; + const { Markdown } = require$$11; + exports.Markdown = exports.markdown = Markdown; + const { Progress } = require$$12$1; + exports.Progress = exports.progress = Progress; + const { Landing } = require$$13; + exports.Landing = exports.landing = Landing; + const { JSONStream } = require$$14$1; + exports.JSONStream = exports["json-stream"] = JSONStream; + const { GithubActions } = require$$15$1; + exports.GithubActions = exports["github-actions"] = GithubActions; + } (reporters)); + return reporters; + } var diff = true; var extension = [ @@ -19373,26 +14166,23 @@ ] }; - /** - * @typedef {import('./types.d.ts').StatsCollector} StatsCollector - * @typedef {import('./runner.js')} Runner - */ + var require$$18 = /*@__PURE__*/getAugmentedNamespace(_nodeResolve_empty); /** - * Provides a factory function for a {@link StatsCollector} object. - * @module + * @typedef {import('./types.d.ts').StatsCollector} StatsCollector + * @typedef {import('./runner.cjs')} Runner */ - var constants = runner.constants; - var EVENT_TEST_PASS = constants.EVENT_TEST_PASS; - var EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL; - var EVENT_SUITE_BEGIN = constants.EVENT_SUITE_BEGIN; - var EVENT_RUN_BEGIN = constants.EVENT_RUN_BEGIN; - var EVENT_TEST_PENDING = constants.EVENT_TEST_PENDING; - var EVENT_RUN_END = constants.EVENT_RUN_END; - var EVENT_TEST_END = constants.EVENT_TEST_END; - var Date$2 = commonjsGlobal.Date; + const { + EVENT_TEST_PASS, + EVENT_TEST_FAIL, + EVENT_SUITE_BEGIN, + EVENT_RUN_BEGIN, + EVENT_TEST_PENDING, + EVENT_RUN_END, + EVENT_TEST_END, + } = Runner.constants; /** * Provides stats such as test duration, number of tests passed / failed etc., by listening for events emitted by `runner`. @@ -19420,7 +14210,7 @@ runner.stats = stats; runner.once(EVENT_RUN_BEGIN, function () { - stats.start = new Date$2(); + stats.start = new Date(); }); runner.on(EVENT_SUITE_BEGIN, function (suite) { suite.root || stats.suites++; @@ -19438,144 +14228,124 @@ stats.tests++; }); runner.once(EVENT_RUN_END, function () { - stats.end = new Date$2(); + stats.end = new Date(); stats.duration = stats.end - stats.start; }); } - var statsCollector = createStatsCollector; - - var interfaces = {}; - - var bdd = {exports: {}}; + var statsCollector = /*#__PURE__*/Object.freeze({ + __proto__: null, + createStatsCollector: createStatsCollector + }); - var Runnable = runnable; - var utils = utils$3; - var errors$1 = errors$2; - var createInvalidArgumentTypeError = errors$1.createInvalidArgumentTypeError; - var isString = utils.isString; + var require$$7 = /*@__PURE__*/getAugmentedNamespace(statsCollector); + const { isString } = utils; const { MOCHA_ID_PROP_NAME } = utils.constants; - var test = Test$4; - - /** - * Initialize a new `Test` with the given `title` and callback `fn`. - * - * @public - * @class - * @extends Runnable - * @param {String} title - Test title (required) - * @param {Function} [fn] - Test callback. If omitted, the Test is considered "pending" - */ - function Test$4(title, fn) { - if (!isString(title)) { - throw createInvalidArgumentTypeError( - 'Test argument "title" should be a string. Received type "' + - typeof title + - '"', - "title", - "string", - ); + class Test extends Runnable { + /** + * Initialize a new `Test` with the given `title` and callback `fn`. + * + * @public + * @extends Runnable + * @param {String} title - Test title (required) + * @param {Function} [fn] - Test callback. If omitted, the Test is considered "pending" + */ + constructor(title, fn) { + if (!isString(title)) { + throw createInvalidArgumentTypeError( + 'Test argument "title" should be a string. Received type "' + + typeof title + + '"', + "title", + "string", + ); + } + super(title, fn); + this.type = "test"; + this.reset(); } - this.type = "test"; - Runnable.call(this, title, fn); - this.reset(); - } - - /** - * Inherit from `Runnable.prototype`. - */ - utils.inherits(Test$4, Runnable); - /** - * Resets the state initially or for a next run. - */ - Test$4.prototype.reset = function () { - Runnable.prototype.reset.call(this); - this.pending = !this.fn; - delete this.state; - }; - - /** - * Set or get retried test - * - * @private - */ - Test$4.prototype.retriedTest = function (n) { - if (!arguments.length) { - return this._retriedTest; + /** + * Resets the state initially or for a next run. + */ + reset() { + super.reset(); + this.pending = !this.fn; + delete this.state; } - this._retriedTest = n; - }; - - /** - * Add test to the list of tests marked `only`. - * - * @private - */ - Test$4.prototype.markOnly = function () { - this.parent.appendOnlyTest(this); - }; - Test$4.prototype.clone = function () { - var test = new Test$4(this.title, this.fn); - test.timeout(this.timeout()); - test.slow(this.slow()); - test.retries(this.retries()); - test.currentRetry(this.currentRetry()); - test.retriedTest(this.retriedTest() || this); - test.globals(this.globals()); - test.parent = this.parent; - test.file = this.file; - test.ctx = this.ctx; - return test; - }; + /** + * Set or get retried test + * + * @private + */ + retriedTest(n) { + if (!arguments.length) { + return this._retriedTest; + } + this._retriedTest = n; + } - /** - * Returns an minimal object suitable for transmission over IPC. - * Functions are represented by keys beginning with `$$`. - * @private - * @returns {Object} - */ - Test$4.prototype.serialize = function serialize() { - return { - $$currentRetry: this._currentRetry, - $$fullTitle: this.fullTitle(), - $$isPending: Boolean(this.pending), - $$retriedTest: this._retriedTest || null, - $$slow: this._slow, - $$titlePath: this.titlePath(), - body: this.body, - duration: this.duration, - err: this.err, - parent: { - $$fullTitle: this.parent.fullTitle(), - [MOCHA_ID_PROP_NAME]: this.parent.id, - }, - speed: this.speed, - state: this.state, - title: this.title, - type: this.type, - file: this.file, - [MOCHA_ID_PROP_NAME]: this.id, - }; - }; + /** + * Add test to the list of tests marked `only`. + * + * @private + */ + markOnly() { + this.parent.appendOnlyTest(this); + } - /** - * @typedef {import('../context.js')} Context - * @typedef {import('../mocha.js')} Mocha - */ + clone() { + var test = new Test(this.title, this.fn); + test.timeout(this.timeout()); + test.slow(this.slow()); + test.retries(this.retries()); + test.currentRetry(this.currentRetry()); + test.retriedTest(this.retriedTest() || this); + test.globals(this.globals()); + test.parent = this.parent; + test.file = this.file; + test.ctx = this.ctx; + return test; + } - /** - @module interfaces/common - */ + /** + * Returns an minimal object suitable for transmission over IPC. + * Functions are represented by keys beginning with `$$`. + * @private + * @returns {Object} + */ + serialize() { + return { + $$currentRetry: this._currentRetry, + $$fullTitle: this.fullTitle(), + $$isPending: Boolean(this.pending), + $$retriedTest: this._retriedTest || null, + $$slow: this._slow, + $$titlePath: this.titlePath(), + body: this.body, + duration: this.duration, + err: this.err, + parent: { + $$fullTitle: this.parent.fullTitle(), + [MOCHA_ID_PROP_NAME]: this.parent.id, + }, + speed: this.speed, + state: this.state, + title: this.title, + type: this.type, + file: this.file, + [MOCHA_ID_PROP_NAME]: this.id, + }; + } + } - var Suite$1 = suite.exports; - var errors = errors$2; - var createMissingArgumentError = errors.createMissingArgumentError; - var createUnsupportedError = errors.createUnsupportedError; - var createForbiddenExclusivityError = errors.createForbiddenExclusivityError; + var test = /*#__PURE__*/Object.freeze({ + __proto__: null, + Test: Test + }); /** * Functions common to more than one interface. @@ -19586,7 +14356,7 @@ * @param {Mocha} mocha * @return {Object} An object containing common functions. */ - var common = function (suites, context, mocha) { + function createCommon(suites, context, mocha) { /** * Check if the suite should be tested. * @@ -19697,7 +14467,7 @@ * @returns {Suite} */ create: function create(opts) { - var suite = Suite$1.create(suites[0], opts.title); + var suite = Suite.create(suites[0], opts.title); suite.pending = Boolean(opts.pending); suite.file = opts.file; suites.unshift(suite); @@ -19709,7 +14479,7 @@ mocha.options.forbidPending && shouldBeTested(suite) ) { - throw createUnsupportedError("Pending test forbidden"); + throw createUnsupportedError$2("Pending test forbidden"); } if (typeof opts.fn === "function") { opts.fn.call(suite); @@ -19757,15 +14527,9 @@ }, }, }; - }; - - /** - * @typedef {import('../suite.js')} Suite - */ + } - var Test$3 = test; - var EVENT_FILE_PRE_REQUIRE$2 = - suite.exports.constants.EVENT_FILE_PRE_REQUIRE; + const EVENT_FILE_PRE_REQUIRE$2 = Suite.constants.EVENT_FILE_PRE_REQUIRE; /** * BDD-style interface: @@ -19784,17 +14548,17 @@ * * @param {Suite} suite Root suite. */ - bdd.exports = function bddInterface(suite) { + function bddInterface(suite) { var suites = [suite]; suite.on(EVENT_FILE_PRE_REQUIRE$2, function (context, file, mocha) { - var common$1 = common(suites, context, mocha); + var common = createCommon(suites, context, mocha); - context.before = common$1.before; - context.after = common$1.after; - context.beforeEach = common$1.beforeEach; - context.afterEach = common$1.afterEach; - context.run = mocha.options.delay && common$1.runWithSuite(suite); + context.before = common.before; + context.after = common.after; + context.beforeEach = common.beforeEach; + context.afterEach = common.afterEach; + context.run = mocha.options.delay && common.runWithSuite(suite); /** * Describe a "suite" with the given `title` * and callback `fn` containing nested suites @@ -19802,7 +14566,7 @@ */ context.describe = context.context = function (title, fn) { - return common$1.suite.create({ + return common.suite.create({ title, file, fn, @@ -19817,7 +14581,7 @@ context.xcontext = context.describe.skip = function (title, fn) { - return common$1.suite.skip({ + return common.suite.skip({ title, file, fn, @@ -19829,7 +14593,7 @@ */ context.describe.only = function (title, fn) { - return common$1.suite.only({ + return common.suite.only({ title, file, fn, @@ -19847,7 +14611,7 @@ if (suite.isPending()) { fn = null; } - var test = new Test$3(title, fn); + var test = new Test(title, fn); test.file = file; suite.addTest(test); return test; @@ -19858,7 +14622,7 @@ */ context.it.only = function (title, fn) { - return common$1.test.only(mocha, context.it(title, fn)); + return common.test.only(mocha, context.it(title, fn)); }; /** @@ -19872,19 +14636,12 @@ return context.it(title); }; }); - }; - - bdd.exports.description = "BDD or RSpec style [default]"; - - var tdd = {exports: {}}; + } - /** - * @typedef {import('../suite.js')} Suite - */ + // Required for `--list-interfaces` + bddInterface.description = "BDD or RSpec style [default]"; - var Test$2 = test; - var EVENT_FILE_PRE_REQUIRE$1 = - suite.exports.constants.EVENT_FILE_PRE_REQUIRE; + const EVENT_FILE_PRE_REQUIRE$1 = Suite.constants.EVENT_FILE_PRE_REQUIRE; /** * TDD-style interface: @@ -19911,24 +14668,24 @@ * * @param {Suite} suite Root suite. */ - tdd.exports = function (suite) { + function tddInterface(suite) { var suites = [suite]; suite.on(EVENT_FILE_PRE_REQUIRE$1, function (context, file, mocha) { - var common$1 = common(suites, context, mocha); + var common = createCommon(suites, context, mocha); - context.setup = common$1.beforeEach; - context.teardown = common$1.afterEach; - context.suiteSetup = common$1.before; - context.suiteTeardown = common$1.after; - context.run = mocha.options.delay && common$1.runWithSuite(suite); + context.setup = common.beforeEach; + context.teardown = common.afterEach; + context.suiteSetup = common.before; + context.suiteTeardown = common.after; + context.run = mocha.options.delay && common.runWithSuite(suite); /** * Describe a "suite" with the given `title` and callback `fn` containing * nested suites and/or tests. */ context.suite = function (title, fn) { - return common$1.suite.create({ + return common.suite.create({ title, file, fn, @@ -19939,7 +14696,7 @@ * Pending suite. */ context.suite.skip = function (title, fn) { - return common$1.suite.skip({ + return common.suite.skip({ title, file, fn, @@ -19950,7 +14707,7 @@ * Exclusive test-case. */ context.suite.only = function (title, fn) { - return common$1.suite.only({ + return common.suite.only({ title, file, fn, @@ -19966,7 +14723,7 @@ if (suite.isPending()) { fn = null; } - var test = new Test$2(title, fn); + var test = new Test(title, fn); test.file = file; suite.addTest(test); return test; @@ -19977,25 +14734,18 @@ */ context.test.only = function (title, fn) { - return common$1.test.only(mocha, context.test(title, fn)); + return common.test.only(mocha, context.test(title, fn)); }; - context.test.skip = common$1.test.skip; + context.test.skip = common.test.skip; }); - }; + } - tdd.exports.description = + // Required for `--list-interfaces` + tddInterface.description = 'traditional "suite"/"test" instead of BDD\'s "describe"/"it"'; - var qunit = {exports: {}}; - - /** - * @typedef {import('../suite.js')} Suite - */ - - var Test$1 = test; - var EVENT_FILE_PRE_REQUIRE = - suite.exports.constants.EVENT_FILE_PRE_REQUIRE; + const EVENT_FILE_PRE_REQUIRE = Suite.constants.EVENT_FILE_PRE_REQUIRE; /** * QUnit-style interface: @@ -20022,17 +14772,17 @@ * * @param {Suite} suite Root suite. */ - qunit.exports = function qUnitInterface(suite) { + function qUnitInterface(suite) { var suites = [suite]; suite.on(EVENT_FILE_PRE_REQUIRE, function (context, file, mocha) { - var common$1 = common(suites, context, mocha); + var common = createCommon(suites, context, mocha); - context.before = common$1.before; - context.after = common$1.after; - context.beforeEach = common$1.beforeEach; - context.afterEach = common$1.afterEach; - context.run = mocha.options.delay && common$1.runWithSuite(suite); + context.before = common.before; + context.after = common.after; + context.beforeEach = common.beforeEach; + context.afterEach = common.afterEach; + context.run = mocha.options.delay && common.runWithSuite(suite); /** * Describe a "suite" with the given `title`. */ @@ -20041,7 +14791,7 @@ if (suites.length > 1) { suites.shift(); } - return common$1.suite.create({ + return common.suite.create({ title, file, fn: false, @@ -20056,7 +14806,7 @@ if (suites.length > 1) { suites.shift(); } - return common$1.suite.only({ + return common.suite.only({ title, file, fn: false, @@ -20070,7 +14820,7 @@ */ context.test = function (title, fn) { - var test = new Test$1(title, fn); + var test = new Test(title, fn); test.file = file; suites[0].addTest(test); return test; @@ -20081,19 +14831,15 @@ */ context.test.only = function (title, fn) { - return common$1.test.only(mocha, context.test(title, fn)); + return common.test.only(mocha, context.test(title, fn)); }; - context.test.skip = common$1.test.skip; + context.test.skip = common.test.skip; }); - }; - - qunit.exports.description = "QUnit style"; - - var exports$1 = {exports: {}}; + } - var Suite = suite.exports; - var Test = test; + // Required for `--list-interfaces` + qUnitInterface.description = "QUnit style"; /** * Exports-style (as Node.js module) interface: @@ -20112,7 +14858,7 @@ * * @param {Suite} suite Root suite. */ - exports$1.exports = function (suite) { + function exportsInterface(suite) { var suites = [suite]; suite.on(Suite.constants.EVENT_FILE_REQUIRE, visit); @@ -20139,1409 +14885,1437 @@ var test = new Test(key, fn); test.file = file; suites[0].addTest(test); - } - } else { - suite = Suite.create(suites[0], key); - suites.unshift(suite); - visit(obj[key], file); - suites.shift(); - } - } - } - }; - - exports$1.exports.description = 'Node.js module ("exports") style'; - - interfaces.bdd = bdd.exports; - interfaces.tdd = tdd.exports; - interfaces.qunit = qunit.exports; - interfaces.exports = exports$1.exports; - - /** - * @typedef {import('./runnable.js')} Runnable - */ - - /** - * @module Context - */ - /** - * Expose `Context`. - */ - - var context = Context; - - /** - * Initialize a new `Context`. - * - * @private - */ - function Context() {} - - /** - * Set or get the context `Runnable` to `runnable`. - * - * @private - * @param {Runnable} runnable - * @return {Context} context - */ - Context.prototype.runnable = function (runnable) { - if (!arguments.length) { - return this._runnable; - } - this.test = this._runnable = runnable; - return this; - }; - - /** - * Set or get test timeout `ms`. - * - * @private - * @param {number} ms - * @return {Context} self - */ - Context.prototype.timeout = function (ms) { - if (!arguments.length) { - return this.runnable().timeout(); - } - this.runnable().timeout(ms); - return this; - }; - - /** - * Set or get test slowness threshold `ms`. - * - * @private - * @param {number} ms - * @return {Context} self - */ - Context.prototype.slow = function (ms) { - if (!arguments.length) { - return this.runnable().slow(); - } - this.runnable().slow(ms); - return this; - }; - - /** - * Mark a test as skipped. - * - * @private - * @throws Pending - */ - Context.prototype.skip = function () { - this.runnable().skip(); - }; - - /** - * Set or get a number of allowed retries on failed tests - * - * @private - * @param {number} n - * @return {Context} self - */ - Context.prototype.retries = function (n) { - if (!arguments.length) { - return this.runnable().retries(); - } - this.runnable().retries(n); - return this; - }; - - var name = "mocha"; - var version = "11.8.0"; - var homepage = "https://mochajs.org/"; - var notifyLogo = "https://ibin.co/4QuRuGjXvl36.png"; - var require$$17 = { - name: name, - version: version, - homepage: homepage, - notifyLogo: notifyLogo - }; - - (function (module, exports) { - - /*! - * mocha - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - - var escapeRe = escapeStringRegexp; - var path = require$$1; - var builtinReporters = reporters; - var utils = utils$3; - var mocharc = require$$4; - var Suite = suite.exports; - var esmUtils = require$$18; - var createStatsCollector = statsCollector; - const { - createInvalidReporterError, - createInvalidInterfaceError, - createMochaInstanceAlreadyDisposedError, - createMochaInstanceAlreadyRunningError, - createUnsupportedError, - } = errors$2; - const { EVENT_FILE_PRE_REQUIRE, EVENT_FILE_POST_REQUIRE, EVENT_FILE_REQUIRE } = - Suite.constants; - var debug = browser.exports("mocha:mocha"); - - /** - * @typedef {import('./types.d.ts').DoneCB} DoneCB - * @typedef {import('./types.d.ts').MochaGlobalFixture} MochaGlobalFixture - * @typedef {import('./types.d.ts').MochaOptions} MochaOptions - * @typedef {import('./types.d.ts').MochaRootHookObject} MochaRootHookObject - * @typedef {import('./types.d.ts').Reporter} Reporter - */ - - exports = module.exports = Mocha; - - /** - * A Mocha instance is a finite state machine. - * These are the states it can be in. - * @private - */ - var mochaStates = utils.defineConstants({ - /** - * Initial state of the mocha instance - * @private - */ - INIT: "init", - /** - * Mocha instance is running tests - * @private - */ - RUNNING: "running", - /** - * Mocha instance is done running tests and references to test functions and hooks are cleaned. - * You can reset this state by unloading the test files. - * @private - */ - REFERENCES_CLEANED: "referencesCleaned", - /** - * Mocha instance is disposed and can no longer be used. - * @private - */ - DISPOSED: "disposed", - }); + } + } else { + suite = Suite.create(suites[0], key); + suites.unshift(suite); + visit(obj[key], file); + suites.shift(); + } + } + } + } - /** - * To require local UIs and reporters when running in node. - */ + // Required for `--list-interfaces` + exportsInterface.description = 'Node.js module ("exports") style'; - if (!utils.isBrowser() && typeof module.paths !== "undefined") { - var cwd = utils.cwd(); - module.paths.push(cwd, path.join(cwd, "node_modules")); - } + var interfaces = /*#__PURE__*/Object.freeze({ + __proto__: null, + bdd: bddInterface, + exports: exportsInterface, + qunit: qUnitInterface, + tdd: tddInterface + }); - /** - * Expose internals. - * @private - */ + var require$$10 = /*@__PURE__*/getAugmentedNamespace(interfaces); - exports.utils = utils; - exports.interfaces = interfaces; - /** - * @public - * @memberof Mocha - */ - exports.reporters = builtinReporters; - exports.Runnable = runnable; - exports.Context = context; /** - * - * @memberof Mocha + * @typedef {import('./runnable.js')} Runnable */ - exports.Runner = runner; - exports.Suite = Suite; - exports.Hook = hook; - exports.Test = test; - - let currentContext; - exports.afterEach = function (...args) { - return (currentContext.afterEach || currentContext.teardown).apply( - this, - args, - ); - }; - exports.after = function (...args) { - return (currentContext.after || currentContext.suiteTeardown).apply( - this, - args, - ); - }; - exports.beforeEach = function (...args) { - return (currentContext.beforeEach || currentContext.setup).apply(this, args); - }; - exports.before = function (...args) { - return (currentContext.before || currentContext.suiteSetup).apply(this, args); - }; - exports.describe = function (...args) { - return (currentContext.describe || currentContext.suite).apply(this, args); - }; - exports.describe.only = function (...args) { - return (currentContext.describe || currentContext.suite).only.apply( - this, - args, - ); - }; - exports.describe.skip = function (...args) { - return (currentContext.describe || currentContext.suite).skip.apply( - this, - args, - ); - }; - exports.it = function (...args) { - return (currentContext.it || currentContext.test).apply(this, args); - }; - exports.it.only = function (...args) { - return (currentContext.it || currentContext.test).only.apply(this, args); - }; - exports.it.skip = function (...args) { - return (currentContext.it || currentContext.test).skip.apply(this, args); - }; - exports.xdescribe = exports.describe.skip; - exports.xit = exports.it.skip; - exports.setup = exports.beforeEach; - exports.suiteSetup = exports.before; - exports.suiteTeardown = exports.after; - exports.suite = exports.describe; - exports.teardown = exports.afterEach; - exports.test = exports.it; - exports.run = function (...args) { - return currentContext.run.apply(this, args); - }; /** - * Constructs a new Mocha instance with `options`. + * Initialize a new `Context`. * - * @public - * @class Mocha - * @param {MochaOptions} [options] - Settings object. + * @private */ - function Mocha(options = {}) { - options = { ...mocharc, ...options }; - this.files = []; - this.options = options; - // root suite - this.suite = new exports.Suite("", new exports.Context(), true); - this._cleanReferencesAfterRun = true; - this._state = mochaStates.INIT; - - this.grep(options.grep) - .fgrep(options.fgrep) - .ui(options.ui) - .reporter( - options.reporter, - options["reporter-option"] || - options.reporterOption || - options.reporterOptions, // for backwards compatibility - ) - .slow(options.slow) - .global(options.global); - - // this guard exists because Suite#timeout does not consider `undefined` to be valid input - if (typeof options.timeout !== "undefined") { - this.timeout(options.timeout === false ? 0 : options.timeout); - } - - if ("retries" in options) { - this.retries(options.retries); - } - - [ - "allowUncaught", - "asyncOnly", - "bail", - "checkLeaks", - "color", - "delay", - "diff", - "dryRun", - "passOnFailingTestSuite", - "failZero", - "forbidOnly", - "forbidPending", - "fullTrace", - "inlineDiffs", - "invert", - ].forEach(function (opt) { - if (options[opt]) { - this[opt](); + class Context { + constructor() {} + /** + * Set or get the context `Runnable` to `runnable`. + * + * @private + * @param {Runnable} runnable + * @return {Context} context + */ + runnable(runnable) { + if (!arguments.length) { + return this._runnable; } - }, this); - - if (options.rootHooks) { - this.rootHooks(options.rootHooks); + this.test = this._runnable = runnable; + return this; } - /** - * The class which we'll instantiate in {@link Mocha#run}. Defaults to - * {@link Runner} in serial mode; changes in parallel mode. - * @memberof Mocha + * Set or get test timeout `ms`. + * * @private + * @param {number} ms + * @return {Context} self */ - this._runnerClass = exports.Runner; - + timeout(ms) { + if (!arguments.length) { + return this.runnable().timeout(); + } + this.runnable().timeout(ms); + return this; + } /** - * Whether or not to call {@link Mocha#loadFiles} implicitly when calling - * {@link Mocha#run}. If this is `true`, then it's up to the consumer to call - * {@link Mocha#loadFiles} _or_ {@link Mocha#loadFilesAsync}. + * Set or get test slowness threshold `ms`. + * * @private - * @memberof Mocha + * @param {number} ms + * @return {Context} self */ - this._lazyLoadFiles = false; - + slow(ms) { + if (!arguments.length) { + return this.runnable().slow(); + } + this.runnable().slow(ms); + return this; + } /** - * It's useful for a Mocha instance to know if it's running in a worker process. - * We could derive this via other means, but it's helpful to have a flag to refer to. - * @memberof Mocha + * Mark a test as skipped. + * * @private + * @throws PendingError */ - this.isWorker = Boolean(options.isWorker); - - this.globalSetup(options.globalSetup) - .globalTeardown(options.globalTeardown) - .enableGlobalSetup(options.enableGlobalSetup) - .enableGlobalTeardown(options.enableGlobalTeardown); - - if ( - options.parallel && - (typeof options.jobs === "undefined" || options.jobs > 1) - ) { - debug("attempting to enable parallel mode"); - this.parallelMode(true); + skip() { + this.runnable().skip(); } - } - - /** - * Enables or disables bailing on the first failure. - * - * @public - * @see [CLI option](../#-bail-b) - * @param {boolean} [bail=true] - Whether to bail on first error. - * @returns {Mocha} this - * @chainable - */ - Mocha.prototype.bail = function (bail) { - this.suite.bail(bail !== false); - return this; - }; - - /** - * @summary - * Adds `file` to be loaded for execution. - * - * @description - * Useful for generic setup code that must be included within test suite. - * - * @public - * @see [CLI option](../#-file-filedirectoryglob) - * @param {string} file - Pathname of file to be loaded. - * @returns {Mocha} this - * @chainable - */ - Mocha.prototype.addFile = function (file) { - this.files.push(file); - return this; - }; - - /** - * Sets reporter to `reporter`, defaults to "spec". - * - * @public - * @see [CLI option](../#-reporter-name-r-name) - * @see [Reporters](../#reporters) - * @param {String|Reporter} reporterName - Reporter name or constructor. - * @param {Object} [reporterOptions] - Options used to configure the reporter. - * @returns {Mocha} this - * @chainable - * @throws {Error} if requested reporter cannot be loaded - * @example - * - * // Use XUnit reporter and direct its output to file - * mocha.reporter('xunit', { output: '/path/to/testspec.xunit.xml' }); - */ - Mocha.prototype.reporter = function (reporterName, reporterOptions) { - if (typeof reporterName === "function") { - this._reporter = reporterName; - } else { - reporterName = reporterName || "spec"; - var reporter; - // Try to load a built-in reporter. - if (builtinReporters[reporterName]) { - reporter = builtinReporters[reporterName]; - } - // Try to load reporters from process.cwd() and node_modules - if (!reporter) { - let foundReporter; - try { - foundReporter = require.resolve(reporterName); - reporter = commonjsRequire(foundReporter); - } catch (err) { - if (foundReporter) { - throw createInvalidReporterError(err.message, foundReporter); - } - // Try to load reporters from a cwd-relative path - try { - reporter = commonjsRequire(path.resolve(reporterName)); - } catch (err) { - throw createInvalidReporterError(err.message, reporterName); - } - } + /** + * Set or get a number of allowed retries on failed tests + * + * @private + * @param {number} n + * @return {Context} self + */ + retries(n) { + if (!arguments.length) { + return this.runnable().retries(); } - this._reporter = reporter; + this.runnable().retries(n); + return this; } - this.options.reporterOption = reporterOptions; - // alias option name is used in built-in reporters xunit/tap/progress - this.options.reporterOptions = reporterOptions; - return this; - }; + } - /** - * Sets test UI `name`, defaults to "bdd". - * - * @public - * @see [CLI option](../#-ui-name-u-name) - * @see [Interface DSLs](../#interfaces) - * @param {string|Function} [ui=bdd] - Interface name or class. - * @returns {Mocha} this - * @chainable - * @throws {Error} if requested interface cannot be loaded - */ - Mocha.prototype.ui = function (ui) { - var bindInterface; - if (typeof ui === "function") { - bindInterface = ui; - } else { - ui = ui || "bdd"; - bindInterface = exports.interfaces[ui]; - if (!bindInterface) { - try { - bindInterface = commonjsRequire(ui); - } catch (err) { - throw createInvalidInterfaceError(`invalid interface '${ui}'`, ui); - } - } - } - bindInterface(this.suite); + var context = /*#__PURE__*/Object.freeze({ + __proto__: null, + Context: Context + }); - this.suite.on(EVENT_FILE_PRE_REQUIRE, function (context) { - currentContext = context; - }); + var require$$12 = /*@__PURE__*/getAugmentedNamespace(context); - return this; - }; + var require$$14 = /*@__PURE__*/getAugmentedNamespace(hook); - /** - * Loads `files` prior to execution. Does not support ES Modules. - * - * @description - * The implementation relies on Node's `require` to execute - * the test interface functions and will be subject to its cache. - * Supports only CommonJS modules. To load ES modules, use Mocha#loadFilesAsync. - * - * @private - * @see {@link Mocha#addFile} - * @see {@link Mocha#run} - * @see {@link Mocha#unloadFiles} - * @see {@link Mocha#loadFilesAsync} - * @param {Function} [fn] - Callback invoked upon completion. - */ - Mocha.prototype.loadFiles = function (fn) { - var self = this; - var suite = this.suite; - this.files.forEach(function (file) { - file = path.resolve(file); - suite.emit(EVENT_FILE_PRE_REQUIRE, commonjsGlobal, file, self); - suite.emit(EVENT_FILE_REQUIRE, commonjsRequire(file), file, self); - suite.emit(EVENT_FILE_POST_REQUIRE, commonjsGlobal, file, self); - }); - fn && fn(); - }; + var require$$15 = /*@__PURE__*/getAugmentedNamespace(test); - /** - * Loads `files` prior to execution. Supports Node ES Modules. - * - * @description - * The implementation relies on Node's `require` and `import` to execute - * the test interface functions and will be subject to its cache. - * Supports both CJS and ESM modules. - * - * @public - * @see {@link Mocha#addFile} - * @see {@link Mocha#run} - * @see {@link Mocha#unloadFiles} - * @param {Object} [options] - Settings object. - * @param {Function} [options.esmDecorator] - Function invoked on esm module name right before importing it. By default will passthrough as is. - * @returns {Promise} - * @example - * - * // loads ESM (and CJS) test files asynchronously, then runs root suite - * mocha.loadFilesAsync() - * .then(() => mocha.run(failures => process.exitCode = failures ? 1 : 0)) - * .catch(() => process.exitCode = 1); - */ - Mocha.prototype.loadFilesAsync = function ({ esmDecorator } = {}) { - var self = this; - var suite = this.suite; - this.lazyLoadFiles(true); + var require$$17 = { + + }; + + var hasRequiredMocha; + + function requireMocha () { + if (hasRequiredMocha) return mocha$1.exports; + hasRequiredMocha = 1; + (function (module, exports) { + + /*! + * mocha + * Copyright(c) 2011 TJ Holowaychuk + * MIT Licensed + */ + + var { escapeRegExp } = require$$0$2; + var path = require$$1$2; + var builtinReporters = requireReporters(); + var utils = requireUtils(); + var mocharc = require$$4; + var { Suite } = require$$5$1; + var esmUtils = require$$18; + var createStatsCollector = require$$7.createStatsCollector; + const { + createInvalidReporterError, + createInvalidInterfaceError, + createMochaInstanceAlreadyDisposedError, + createMochaInstanceAlreadyRunningError, + createUnsupportedError, + } = require$$8$1; + const { EVENT_FILE_PRE_REQUIRE, EVENT_FILE_POST_REQUIRE, EVENT_FILE_REQUIRE } = + Suite.constants; + var debug = requireBrowser()("mocha:mocha"); + + /** + * @typedef {import('./types.d.ts').DoneCB} DoneCB + * @typedef {import('./types.d.ts').MochaGlobalFixture} MochaGlobalFixture + * @typedef {import('./types.d.ts').MochaOptions} MochaOptions + * @typedef {import('./types.d.ts').MochaRootHookObject} MochaRootHookObject + * @typedef {import('./types.d.ts').Reporter} Reporter + */ + + // Legacy CJS-style require() export, as well as default in ESM + exports = module.exports = Mocha; + + // Modern property-based / ESM named export + module.exports.Mocha = Mocha; + + /** + * A Mocha instance is a finite state machine. + * These are the states it can be in. + * @private + */ + var mochaStates = utils.defineConstants({ + /** + * Initial state of the mocha instance + * @private + */ + INIT: "init", + /** + * Mocha instance is running tests + * @private + */ + RUNNING: "running", + /** + * Mocha instance is done running tests and references to test functions and hooks are cleaned. + * You can reset this state by unloading the test files. + * @private + */ + REFERENCES_CLEANED: "referencesCleaned", + /** + * Mocha instance is disposed and can no longer be used. + * @private + */ + DISPOSED: "disposed", + }); - return esmUtils.loadFilesAsync( - this.files, - function (file) { - suite.emit(EVENT_FILE_PRE_REQUIRE, commonjsGlobal, file, self); - }, - function (file, resultModule) { - suite.emit(EVENT_FILE_REQUIRE, resultModule, file, self); - suite.emit(EVENT_FILE_POST_REQUIRE, commonjsGlobal, file, self); - }, - esmDecorator, - ); - }; + /** + * To require local UIs and reporters when running in node. + */ - /** - * Removes a previously loaded file from Node's `require` cache. - * - * @private - * @static - * @see {@link Mocha#unloadFiles} - * @param {string} file - Pathname of file to be unloaded. - */ - Mocha.unloadFile = function (file) { - if (utils.isBrowser()) { - throw createUnsupportedError( - "unloadFile() is only supported in a Node.js environment", - ); - } - return require$$18.unloadFile(file); - }; + if (!utils.isBrowser() && typeof module.paths !== "undefined") { + var cwd = utils.cwd(); + module.paths.push(cwd, path.join(cwd, "node_modules")); + } - /** - * Unloads `files` from Node's `require` cache. - * - * @description - * This allows required files to be "freshly" reloaded, providing the ability - * to reuse a Mocha instance programmatically. - * Note: does not clear ESM module files from the cache - * - * Intended for consumers — not used internally - * - * @public - * @see {@link Mocha#run} - * @returns {Mocha} this - * @chainable - */ - Mocha.prototype.unloadFiles = function () { - if (this._state === mochaStates.DISPOSED) { - throw createMochaInstanceAlreadyDisposedError( - "Mocha instance is already disposed, it cannot be used again.", - this._cleanReferencesAfterRun, - this, - ); - } + /** + * Expose internals. + * @private + */ + + exports.utils = utils; + // Must be extensible, see `should add the interface` test + // in `run-helpers.spec.js` + exports.interfaces = { ...require$$10 }; + /** + * @public + * @memberof Mocha + */ + exports.reporters = builtinReporters; + exports.Runnable = require$$11$1.Runnable; + exports.Context = require$$12.Context; + /** + * + * @memberof Mocha + */ + exports.Runner = requireRunner(); + exports.Suite = Suite; + exports.Hook = require$$14.Hook; + exports.Test = require$$15.Test; + + let currentContext; + exports.afterEach = function (...args) { + return (currentContext.afterEach || currentContext.teardown).apply( + this, + args, + ); + }; + exports.after = function (...args) { + return (currentContext.after || currentContext.suiteTeardown).apply( + this, + args, + ); + }; + exports.beforeEach = function (...args) { + return (currentContext.beforeEach || currentContext.setup).apply(this, args); + }; + exports.before = function (...args) { + return (currentContext.before || currentContext.suiteSetup).apply(this, args); + }; + exports.describe = function (...args) { + return (currentContext.describe || currentContext.suite).apply(this, args); + }; + exports.describe.only = function (...args) { + return (currentContext.describe || currentContext.suite).only.apply( + this, + args, + ); + }; + exports.describe.skip = function (...args) { + return (currentContext.describe || currentContext.suite).skip.apply( + this, + args, + ); + }; + exports.it = function (...args) { + return (currentContext.it || currentContext.test).apply(this, args); + }; + exports.it.only = function (...args) { + return (currentContext.it || currentContext.test).only.apply(this, args); + }; + exports.it.skip = function (...args) { + return (currentContext.it || currentContext.test).skip.apply(this, args); + }; + exports.xdescribe = exports.describe.skip; + exports.xit = exports.it.skip; + exports.setup = exports.beforeEach; + exports.suiteSetup = exports.before; + exports.suiteTeardown = exports.after; + exports.suite = exports.describe; + exports.teardown = exports.afterEach; + exports.test = exports.it; + exports.run = function (...args) { + return currentContext.run.apply(this, args); + }; - this.files.forEach(function (file) { - Mocha.unloadFile(file); - }); - this._state = mochaStates.INIT; - return this; - }; + /** + * Constructs a new Mocha instance with `options`. + * + * @public + * @class Mocha + * @param {MochaOptions} [options] - Settings object. + */ + function Mocha(options = {}) { + options = { ...mocharc, ...options }; + this.files = []; + this.options = options; + // root suite + this.suite = new exports.Suite("", new exports.Context(), true); + this._cleanReferencesAfterRun = true; + this._state = mochaStates.INIT; + + this.grep(options.grep) + .fgrep(options.fgrep) + .ui(options.ui) + .reporter( + options.reporter, + options["reporter-option"] || + options.reporterOption || + options.reporterOptions, // for backwards compatibility + ) + .slow(options.slow) + .global(options.global); + + // this guard exists because Suite#timeout does not consider `undefined` to be valid input + if (typeof options.timeout !== "undefined") { + this.timeout(options.timeout === false ? 0 : options.timeout); + } + + if ("retries" in options) { + this.retries(options.retries); + } + + [ + "allowUncaught", + "asyncOnly", + "bail", + "checkLeaks", + "color", + "delay", + "diff", + "dryRun", + "passOnFailingTestSuite", + "failZero", + "forbidOnly", + "forbidPending", + "fullTrace", + "inlineDiffs", + "invert", + ].forEach(function (opt) { + if (options[opt]) { + this[opt](); + } + }, this); + + if (options.rootHooks) { + this.rootHooks(options.rootHooks); + } + + /** + * The class which we'll instantiate in {@link Mocha#run}. Defaults to + * {@link Runner} in serial mode; changes in parallel mode. + * @memberof Mocha + * @private + */ + this._runnerClass = exports.Runner; + + /** + * Whether or not to call {@link Mocha#loadFiles} implicitly when calling + * {@link Mocha#run}. If this is `true`, then it's up to the consumer to call + * {@link Mocha#loadFiles} _or_ {@link Mocha#loadFilesAsync}. + * @private + * @memberof Mocha + */ + this._lazyLoadFiles = false; + + /** + * It's useful for a Mocha instance to know if it's running in a worker process. + * We could derive this via other means, but it's helpful to have a flag to refer to. + * @memberof Mocha + * @private + */ + this.isWorker = Boolean(options.isWorker); + + this.globalSetup(options.globalSetup) + .globalTeardown(options.globalTeardown) + .enableGlobalSetup(options.enableGlobalSetup) + .enableGlobalTeardown(options.enableGlobalTeardown); + + if ( + options.parallel && + (typeof options.jobs === "undefined" || options.jobs > 1) + ) { + debug("attempting to enable parallel mode"); + this.parallelMode(true); + } + } - /** - * Sets `grep` filter after escaping RegExp special characters. - * - * @public - * @see {@link Mocha#grep} - * @param {string} str - Value to be converted to a regexp. - * @returns {Mocha} this - * @chainable - * @example - * - * // Select tests whose full title begins with `"foo"` followed by a period - * mocha.fgrep('foo.'); - */ - Mocha.prototype.fgrep = function (str) { - if (!str) { - return this; - } - return this.grep(new RegExp(escapeRe(str))); - }; + /** + * Enables or disables bailing on the first failure. + * + * @public + * @see [CLI option](../#-bail-b) + * @param {boolean} [bail=true] - Whether to bail on first error. + * @returns {Mocha} this + * @chainable + */ + Mocha.prototype.bail = function (bail) { + this.suite.bail(bail !== false); + return this; + }; - /** - * @summary - * Sets `grep` filter used to select specific tests for execution. - * - * @description - * If `re` is a regexp-like string, it will be converted to regexp. - * The regexp is tested against the full title of each test (i.e., the - * name of the test preceded by titles of each its ancestral suites). - * As such, using an exact-match fixed pattern against the - * test name itself will not yield any matches. - *
          - * Previous filter value will be overwritten on each call! - * - * @public - * @see [CLI option](../#-grep-regexp-g-regexp) - * @see {@link Mocha#fgrep} - * @see {@link Mocha#invert} - * @param {RegExp|String} re - Regular expression used to select tests. - * @return {Mocha} this - * @chainable - * @example - * - * // Select tests whose full title contains `"match"`, ignoring case - * mocha.grep(/match/i); - * @example - * - * // Same as above but with regexp-like string argument - * mocha.grep('/match/i'); - * @example - * - * // ## Anti-example - * // Given embedded test `it('only-this-test')`... - * mocha.grep('/^only-this-test$/'); // NO! Use `.only()` to do this! - */ - Mocha.prototype.grep = function (re) { - if (utils.isString(re)) { - // extract args if it's regex-like, i.e: [string, pattern, flag] - var arg = re.match(/^\/(.*)\/([gimy]{0,4})$|.*/); - this.options.grep = new RegExp(arg[1] || arg[0], arg[2]); - } else { - this.options.grep = re; - } - return this; - }; + /** + * @summary + * Adds `file` to be loaded for execution. + * + * @description + * Useful for generic setup code that must be included within test suite. + * + * @public + * @see [CLI option](../#-file-filedirectoryglob) + * @param {string} file - Pathname of file to be loaded. + * @returns {Mocha} this + * @chainable + */ + Mocha.prototype.addFile = function (file) { + this.files.push(file); + return this; + }; - /** - * Inverts `grep` matches. - * - * @public - * @see {@link Mocha#grep} - * @return {Mocha} this - * @chainable - * @example - * - * // Select tests whose full title does *not* contain `"match"`, ignoring case - * mocha.grep(/match/i).invert(); - */ - Mocha.prototype.invert = function () { - this.options.invert = true; - return this; - }; + /** + * Sets reporter to `reporter`, defaults to "spec". + * + * @public + * @see [CLI option](../#-reporter-name-r-name) + * @see [Reporters](../#reporters) + * @param {String|Reporter} reporterName - Reporter name or constructor. + * @param {Object} [reporterOptions] - Options used to configure the reporter. + * @returns {Mocha} this + * @chainable + * @throws {Error} if requested reporter cannot be loaded + * @example + * + * // Use XUnit reporter and direct its output to file + * mocha.reporter('xunit', { output: '/path/to/testspec.xunit.xml' }); + */ + Mocha.prototype.reporter = function (reporterName, reporterOptions) { + if (typeof reporterName === "function") { + this._reporter = reporterName; + } else { + reporterName = reporterName || "spec"; + var reporter; + // Try to load a built-in reporter. + if (builtinReporters[reporterName]) { + reporter = builtinReporters[reporterName]; + } + // Try to load reporters from process.cwd() and node_modules + if (!reporter) { + let foundReporter; + try { + foundReporter = require.resolve(reporterName); + reporter = commonjsRequire(foundReporter); + } catch (err) { + if (foundReporter) { + throw createInvalidReporterError(err.message, foundReporter); + } + // Try to load reporters from a cwd-relative path + try { + reporter = commonjsRequire(path.resolve(reporterName)); + } catch (err) { + throw createInvalidReporterError(err.message, reporterName); + } + } + } + if (reporter.default) { + reporter = reporter.default; + } + + this._reporter = reporter; + } + this.options.reporterOption = reporterOptions; + // alias option name is used in built-in reporters xunit/tap/progress + this.options.reporterOptions = reporterOptions; + return this; + }; - /** - * Enables or disables checking for global variables leaked while running tests. - * - * @public - * @see [CLI option](../#-check-leaks) - * @param {boolean} [checkLeaks=true] - Whether to check for global variable leaks. - * @return {Mocha} this - * @chainable - */ - Mocha.prototype.checkLeaks = function (checkLeaks) { - this.options.checkLeaks = checkLeaks !== false; - return this; - }; + /** + * Sets test UI `name`, defaults to "bdd". + * + * @public + * @see [CLI option](../#-ui-name-u-name) + * @see [Interface DSLs](../#interfaces) + * @param {string|Function} [ui=bdd] - Interface name or class. + * @returns {Mocha} this + * @chainable + * @throws {Error} if requested interface cannot be loaded + */ + Mocha.prototype.ui = function (ui) { + var bindInterface; + if (typeof ui === "function") { + bindInterface = ui; + } else { + ui = ui || "bdd"; + bindInterface = exports.interfaces[ui]; + if (!bindInterface) { + try { + bindInterface = commonjsRequire(ui); + } catch { + throw createInvalidInterfaceError(`invalid interface '${ui}'`, ui); + } + } + } + if (bindInterface.default) { + bindInterface = bindInterface.default; + } + + bindInterface(this.suite); + + this.suite.on(EVENT_FILE_PRE_REQUIRE, function (context) { + currentContext = context; + }); + + return this; + }; - /** - * Enables or disables whether or not to dispose after each test run. - * Disable this to ensure you can run the test suite multiple times. - * If disabled, be sure to dispose mocha when you're done to prevent memory leaks. - * @public - * @see {@link Mocha#dispose} - * @param {boolean} cleanReferencesAfterRun - * @return {Mocha} this - * @chainable - */ - Mocha.prototype.cleanReferencesAfterRun = function (cleanReferencesAfterRun) { - this._cleanReferencesAfterRun = cleanReferencesAfterRun !== false; - return this; - }; + /** + * Loads `files` prior to execution. Does not support ES Modules. + * + * @description + * The implementation relies on Node's `require` to execute + * the test interface functions and will be subject to its cache. + * Supports only CommonJS modules. To load ES modules, use Mocha#loadFilesAsync. + * + * @private + * @see {@link Mocha#addFile} + * @see {@link Mocha#run} + * @see {@link Mocha#unloadFiles} + * @see {@link Mocha#loadFilesAsync} + * @param {Function} [fn] - Callback invoked upon completion. + */ + Mocha.prototype.loadFiles = function (fn) { + var self = this; + var suite = this.suite; + this.files.forEach(function (file) { + file = path.resolve(file); + suite.emit(EVENT_FILE_PRE_REQUIRE, commonjsGlobal, file, self); + suite.emit(EVENT_FILE_REQUIRE, commonjsRequire(file), file, self); + suite.emit(EVENT_FILE_POST_REQUIRE, commonjsGlobal, file, self); + }); + fn && fn(); + }; - /** - * Manually dispose this mocha instance. Mark this instance as `disposed` and unable to run more tests. - * It also removes function references to tests functions and hooks, so variables trapped in closures can be cleaned by the garbage collector. - * @public - */ - Mocha.prototype.dispose = function () { - if (this._state === mochaStates.RUNNING) { - throw createMochaInstanceAlreadyRunningError( - "Cannot dispose while the mocha instance is still running tests.", - ); - } - this.unloadFiles(); - this._previousRunner && this._previousRunner.dispose(); - this.suite.dispose(); - this._state = mochaStates.DISPOSED; - }; + /** + * Loads `files` prior to execution. Supports Node ES Modules. + * + * @description + * The implementation relies on Node's `require` and `import` to execute + * the test interface functions and will be subject to its cache. + * Supports both CJS and ESM modules. + * + * @public + * @see {@link Mocha#addFile} + * @see {@link Mocha#run} + * @see {@link Mocha#unloadFiles} + * @param {Object} [options] - Settings object. + * @param {Function} [options.esmDecorator] - Function invoked on esm module name right before importing it. By default will passthrough as is. + * @returns {Promise} + * @example + * + * // loads ESM (and CJS) test files asynchronously, then runs root suite + * mocha.loadFilesAsync() + * .then(() => mocha.run(failures => process.exitCode = failures ? 1 : 0)) + * .catch(() => process.exitCode = 1); + */ + Mocha.prototype.loadFilesAsync = function ({ esmDecorator } = {}) { + var self = this; + var suite = this.suite; + this.lazyLoadFiles(true); + + return esmUtils.loadFilesAsync( + this.files, + function (file) { + suite.emit(EVENT_FILE_PRE_REQUIRE, commonjsGlobal, file, self); + }, + function (file, resultModule) { + suite.emit(EVENT_FILE_REQUIRE, resultModule, file, self); + suite.emit(EVENT_FILE_POST_REQUIRE, commonjsGlobal, file, self); + }, + esmDecorator, + ); + }; - /** - * Displays full stack trace upon test failure. - * - * @public - * @see [CLI option](../#-full-trace) - * @param {boolean} [fullTrace=true] - Whether to print full stacktrace upon failure. - * @return {Mocha} this - * @chainable - */ - Mocha.prototype.fullTrace = function (fullTrace) { - this.options.fullTrace = fullTrace !== false; - return this; - }; + /** + * Removes a previously loaded file from Node's `require` cache. + * + * @private + * @static + * @see {@link Mocha#unloadFiles} + * @param {string} file - Pathname of file to be unloaded. + */ + Mocha.unloadFile = function (file) { + if (utils.isBrowser()) { + throw createUnsupportedError( + "unloadFile() is only supported in a Node.js environment", + ); + } + return require$$18.unloadFile(file); + }; - /** - * Specifies whitelist of variable names to be expected in global scope. - * - * @public - * @see [CLI option](../#-global-variable-name) - * @see {@link Mocha#checkLeaks} - * @param {String[]|String} global - Accepted global variable name(s). - * @return {Mocha} this - * @chainable - * @example - * - * // Specify variables to be expected in global scope - * mocha.global(['jQuery', 'MyLib']); - */ - Mocha.prototype.global = function (global) { - this.options.global = (this.options.global || []) - .concat(global) - .filter(Boolean) - .filter(function (elt, idx, arr) { - return arr.indexOf(elt) === idx; - }); - return this; - }; - // for backwards compatibility, 'globals' is an alias of 'global' - Mocha.prototype.globals = Mocha.prototype.global; + /** + * Unloads `files` from Node's `require` cache. + * + * @description + * This allows required files to be "freshly" reloaded, providing the ability + * to reuse a Mocha instance programmatically. + * Note: does not clear ESM module files from the cache + * + * Intended for consumers — not used internally + * + * @public + * @see {@link Mocha#run} + * @returns {Mocha} this + * @chainable + */ + Mocha.prototype.unloadFiles = function () { + if (this._state === mochaStates.DISPOSED) { + throw createMochaInstanceAlreadyDisposedError( + "Mocha instance is already disposed, it cannot be used again.", + this._cleanReferencesAfterRun, + this, + ); + } + + this.files.forEach(function (file) { + Mocha.unloadFile(file); + }); + this._state = mochaStates.INIT; + return this; + }; - /** - * Enables or disables TTY color output by screen-oriented reporters. - * - * @public - * @see [CLI option](../#-color-c-colors) - * @param {boolean} [color=true] - Whether to enable color output. - * @return {Mocha} this - * @chainable - */ - Mocha.prototype.color = function (color) { - this.options.color = color !== false; - return this; - }; + /** + * Sets `grep` filter after escaping RegExp special characters. + * + * @public + * @see {@link Mocha#grep} + * @param {string} str - Value to be converted to a regexp. + * @returns {Mocha} this + * @chainable + * @example + * + * // Select tests whose full title begins with `"foo"` followed by a period + * mocha.fgrep('foo.'); + */ + Mocha.prototype.fgrep = function (str) { + if (!str) { + return this; + } + return this.grep(new RegExp(escapeRegExp(str))); + }; - /** - * Enables or disables reporter to use inline diffs (rather than +/-) - * in test failure output. - * - * @public - * @see [CLI option](../#-inline-diffs) - * @param {boolean} [inlineDiffs=true] - Whether to use inline diffs. - * @return {Mocha} this - * @chainable - */ - Mocha.prototype.inlineDiffs = function (inlineDiffs) { - this.options.inlineDiffs = inlineDiffs !== false; - return this; - }; + /** + * @summary + * Sets `grep` filter used to select specific tests for execution. + * + * @description + * If `re` is a regexp-like string, it will be converted to regexp. + * The regexp is tested against the full title of each test (i.e., the + * name of the test preceded by titles of each its ancestral suites). + * As such, using an exact-match fixed pattern against the + * test name itself will not yield any matches. + *
          + * Previous filter value will be overwritten on each call! + * + * @public + * @see [CLI option](../#-grep-regexp-g-regexp) + * @see {@link Mocha#fgrep} + * @see {@link Mocha#invert} + * @param {RegExp|String} re - Regular expression used to select tests. + * @return {Mocha} this + * @chainable + * @example + * + * // Select tests whose full title contains `"match"`, ignoring case + * mocha.grep(/match/i); + * @example + * + * // Same as above but with regexp-like string argument + * mocha.grep('/match/i'); + * @example + * + * // ## Anti-example + * // Given embedded test `it('only-this-test')`... + * mocha.grep('/^only-this-test$/'); // NO! Use `.only()` to do this! + */ + Mocha.prototype.grep = function (re) { + if (utils.isString(re)) { + // extract args if it's regex-like, i.e: [string, pattern, flag] + var arg = re.match(/^\/(.*)\/([a-z]*)$|.*/); + this.options.grep = new RegExp(arg[1] || arg[0], arg[2]); + } else { + this.options.grep = re; + } + return this; + }; - /** - * Enables or disables reporter to include diff in test failure output. - * - * @public - * @see [CLI option](../#-diff) - * @param {boolean} [diff=true] - Whether to show diff on failure. - * @return {Mocha} this - * @chainable - */ - Mocha.prototype.diff = function (diff) { - this.options.diff = diff !== false; - return this; - }; + /** + * Inverts `grep` matches. + * + * @public + * @see {@link Mocha#grep} + * @return {Mocha} this + * @chainable + * @example + * + * // Select tests whose full title does *not* contain `"match"`, ignoring case + * mocha.grep(/match/i).invert(); + */ + Mocha.prototype.invert = function () { + this.options.invert = true; + return this; + }; - /** - * @summary - * Sets timeout threshold value. - * - * @description - * A string argument can use shorthand (such as "2s") and will be converted. - * If the value is `0`, timeouts will be disabled. - * - * @public - * @see [CLI option](../#-timeout-ms-t-ms) - * @see [Timeouts](../#timeouts) - * @param {number|string} msecs - Timeout threshold value. - * @return {Mocha} this - * @chainable - * @example - * - * // Sets timeout to one second - * mocha.timeout(1000); - * @example - * - * // Same as above but using string argument - * mocha.timeout('1s'); - */ - Mocha.prototype.timeout = function (msecs) { - this.suite.timeout(msecs); - return this; - }; + /** + * Enables or disables checking for global variables leaked while running tests. + * + * @public + * @see [CLI option](../#-check-leaks) + * @param {boolean} [checkLeaks=true] - Whether to check for global variable leaks. + * @return {Mocha} this + * @chainable + */ + Mocha.prototype.checkLeaks = function (checkLeaks) { + this.options.checkLeaks = checkLeaks !== false; + return this; + }; - /** - * Sets the number of times to retry failed tests. - * - * @public - * @see [CLI option](../#-retries-n) - * @see [Retry Tests](../#retry-tests) - * @param {number} retry - Number of times to retry failed tests. - * @return {Mocha} this - * @chainable - * @example - * - * // Allow any failed test to retry one more time - * mocha.retries(1); - */ - Mocha.prototype.retries = function (retry) { - this.suite.retries(retry); - return this; - }; + /** + * Enables or disables whether or not to dispose after each test run. + * Disable this to ensure you can run the test suite multiple times. + * If disabled, be sure to dispose mocha when you're done to prevent memory leaks. + * @public + * @see {@link Mocha#dispose} + * @param {boolean} cleanReferencesAfterRun + * @return {Mocha} this + * @chainable + */ + Mocha.prototype.cleanReferencesAfterRun = function (cleanReferencesAfterRun) { + this._cleanReferencesAfterRun = cleanReferencesAfterRun !== false; + return this; + }; - /** - * Sets slowness threshold value. - * - * @public - * @see [CLI option](../#-slow-ms-s-ms) - * @param {number} msecs - Slowness threshold value. - * @return {Mocha} this - * @chainable - * @example - * - * // Sets "slow" threshold to half a second - * mocha.slow(500); - * @example - * - * // Same as above but using string argument - * mocha.slow('0.5s'); - */ - Mocha.prototype.slow = function (msecs) { - this.suite.slow(msecs); - return this; - }; + /** + * Manually dispose this mocha instance. Mark this instance as `disposed` and unable to run more tests. + * It also removes function references to tests functions and hooks, so variables trapped in closures can be cleaned by the garbage collector. + * @public + */ + Mocha.prototype.dispose = function () { + if (this._state === mochaStates.RUNNING) { + throw createMochaInstanceAlreadyRunningError( + "Cannot dispose while the mocha instance is still running tests.", + ); + } + this.unloadFiles(); + this._previousRunner && this._previousRunner.dispose(); + this.suite.dispose(); + this._state = mochaStates.DISPOSED; + }; - /** - * Forces all tests to either accept a `done` callback or return a promise. - * - * @public - * @see [CLI option](../#-async-only-a) - * @param {boolean} [asyncOnly=true] - Whether to force `done` callback or promise. - * @return {Mocha} this - * @chainable - */ - Mocha.prototype.asyncOnly = function (asyncOnly) { - this.options.asyncOnly = asyncOnly !== false; - return this; - }; + /** + * Displays full stack trace upon test failure. + * + * @public + * @see [CLI option](../#-full-trace) + * @param {boolean} [fullTrace=true] - Whether to print full stacktrace upon failure. + * @return {Mocha} this + * @chainable + */ + Mocha.prototype.fullTrace = function (fullTrace) { + this.options.fullTrace = fullTrace !== false; + return this; + }; - /** - * Disables syntax highlighting (in browser). - * - * @public - * @return {Mocha} this - * @chainable - */ - Mocha.prototype.noHighlighting = function () { - this.options.noHighlighting = true; - return this; - }; + /** + * Specifies whitelist of variable names to be expected in global scope. + * + * @public + * @see [CLI option](../#-global-variable-name) + * @see {@link Mocha#checkLeaks} + * @param {String[]|String} global - Accepted global variable name(s). + * @return {Mocha} this + * @chainable + * @example + * + * // Specify variables to be expected in global scope + * mocha.global(['jQuery', 'MyLib']); + */ + Mocha.prototype.global = function (global) { + this.options.global = (this.options.global || []) + .concat(global) + .filter(Boolean) + .filter(function (elt, idx, arr) { + return arr.indexOf(elt) === idx; + }); + return this; + }; + // for backwards compatibility, 'globals' is an alias of 'global' + Mocha.prototype.globals = Mocha.prototype.global; + + /** + * Enables or disables TTY color output by screen-oriented reporters. + * + * @public + * @see [CLI option](../#-color-c-colors) + * @param {boolean} [color=true] - Whether to enable color output. + * @return {Mocha} this + * @chainable + */ + Mocha.prototype.color = function (color) { + this.options.color = color !== false; + return this; + }; - /** - * Enables or disables uncaught errors to propagate. - * - * @public - * @see [CLI option](../#-allow-uncaught) - * @param {boolean} [allowUncaught=true] - Whether to propagate uncaught errors. - * @return {Mocha} this - * @chainable - */ - Mocha.prototype.allowUncaught = function (allowUncaught) { - this.options.allowUncaught = allowUncaught !== false; - return this; - }; + /** + * Enables or disables reporter to use inline diffs (rather than +/-) + * in test failure output. + * + * @public + * @see [CLI option](../#-inline-diffs) + * @param {boolean} [inlineDiffs=true] - Whether to use inline diffs. + * @return {Mocha} this + * @chainable + */ + Mocha.prototype.inlineDiffs = function (inlineDiffs) { + this.options.inlineDiffs = inlineDiffs !== false; + return this; + }; - /** - * @summary - * Delays root suite execution. - * - * @description - * Used to perform async operations before any suites are run. - * - * @public - * @see [delayed root suite](../#delayed-root-suite) - * @returns {Mocha} this - * @chainable - */ - Mocha.prototype.delay = function delay() { - this.options.delay = true; - return this; - }; + /** + * Enables or disables reporter to include diff in test failure output. + * + * @public + * @see [CLI option](../#-diff) + * @param {boolean} [diff=true] - Whether to show diff on failure. + * @return {Mocha} this + * @chainable + */ + Mocha.prototype.diff = function (diff) { + this.options.diff = diff !== false; + return this; + }; - /** - * Enables or disables running tests in dry-run mode. - * - * @public - * @see [CLI option](../#-dry-run) - * @param {boolean} [dryRun=true] - Whether to activate dry-run mode. - * @return {Mocha} this - * @chainable - */ - Mocha.prototype.dryRun = function (dryRun) { - this.options.dryRun = dryRun !== false; - return this; - }; + /** + * @summary + * Sets timeout threshold value. + * + * @description + * A string argument can use shorthand (such as "2s") and will be converted. + * If the value is `0`, timeouts will be disabled. + * + * @public + * @see [CLI option](../#-timeout-ms-t-ms) + * @see [Timeouts](../#timeouts) + * @param {number|string} msecs - Timeout threshold value. + * @return {Mocha} this + * @chainable + * @example + * + * // Sets timeout to one second + * mocha.timeout(1000); + * @example + * + * // Same as above but using string argument + * mocha.timeout('1s'); + */ + Mocha.prototype.timeout = function (msecs) { + this.suite.timeout(msecs); + return this; + }; - /** - * Reports tests as failed when they are skipped due to a hook failure. - * - * @public - * @see [CLI option](../#-fail-hook-affected-tests) - * @param {boolean} [failHookAffectedTests=true] - Whether to fail tests affected by hook failures. - * @return {Mocha} this - * @chainable - */ - Mocha.prototype.failHookAffectedTests = function (failHookAffectedTests) { - this.options.failHookAffectedTests = failHookAffectedTests !== false; - return this; - }; + /** + * Sets the number of times to retry failed tests. + * + * @public + * @see [CLI option](../#-retries-n) + * @see [Retry Tests](../#retry-tests) + * @param {number} retry - Number of times to retry failed tests. + * @return {Mocha} this + * @chainable + * @example + * + * // Allow any failed test to retry one more time + * mocha.retries(1); + */ + Mocha.prototype.retries = function (retry) { + this.suite.retries(retry); + return this; + }; - /** - * Fails test run if no tests encountered with exit-code 1. - * - * @public - * @see [CLI option](../#-fail-zero) - * @param {boolean} [failZero=true] - Whether to fail test run. - * @return {Mocha} this - * @chainable - */ - Mocha.prototype.failZero = function (failZero) { - this.options.failZero = failZero !== false; - return this; - }; + /** + * Sets slowness threshold value. + * + * @public + * @see [CLI option](../#-slow-ms-s-ms) + * @param {number} msecs - Slowness threshold value. + * @return {Mocha} this + * @chainable + * @example + * + * // Sets "slow" threshold to half a second + * mocha.slow(500); + * @example + * + * // Same as above but using string argument + * mocha.slow('0.5s'); + */ + Mocha.prototype.slow = function (msecs) { + this.suite.slow(msecs); + return this; + }; - /** - * Fail test run if tests were failed. - * - * @public - * @see [CLI option](../#-pass-on-failing-test-suite) - * @param {boolean} [passOnFailingTestSuite=false] - Whether to fail test run. - * @return {Mocha} this - * @chainable - */ - Mocha.prototype.passOnFailingTestSuite = function (passOnFailingTestSuite) { - this.options.passOnFailingTestSuite = passOnFailingTestSuite === true; - return this; - }; + /** + * Forces all tests to either accept a `done` callback or return a promise. + * + * @public + * @see [CLI option](../#-async-only-a) + * @param {boolean} [asyncOnly=true] - Whether to force `done` callback or promise. + * @return {Mocha} this + * @chainable + */ + Mocha.prototype.asyncOnly = function (asyncOnly) { + this.options.asyncOnly = asyncOnly !== false; + return this; + }; - /** - * Causes tests marked `only` to fail the suite. - * - * @public - * @see [CLI option](../#-forbid-only) - * @param {boolean} [forbidOnly=true] - Whether tests marked `only` fail the suite. - * @returns {Mocha} this - * @chainable - */ - Mocha.prototype.forbidOnly = function (forbidOnly) { - this.options.forbidOnly = forbidOnly !== false; - return this; - }; + /** + * Disables syntax highlighting (in browser). + * + * @public + * @return {Mocha} this + * @chainable + */ + Mocha.prototype.noHighlighting = function () { + this.options.noHighlighting = true; + return this; + }; - /** - * Causes pending tests and tests marked `skip` to fail the suite. - * - * @public - * @see [CLI option](../#-forbid-pending) - * @param {boolean} [forbidPending=true] - Whether pending tests fail the suite. - * @returns {Mocha} this - * @chainable - */ - Mocha.prototype.forbidPending = function (forbidPending) { - this.options.forbidPending = forbidPending !== false; - return this; - }; + /** + * Enables or disables uncaught errors to propagate. + * + * @public + * @see [CLI option](../#-allow-uncaught) + * @param {boolean} [allowUncaught=true] - Whether to propagate uncaught errors. + * @return {Mocha} this + * @chainable + */ + Mocha.prototype.allowUncaught = function (allowUncaught) { + this.options.allowUncaught = allowUncaught !== false; + return this; + }; - /** - * Throws an error if mocha is in the wrong state to be able to transition to a "running" state. - * @private - */ - Mocha.prototype._guardRunningStateTransition = function () { - if (this._state === mochaStates.RUNNING) { - throw createMochaInstanceAlreadyRunningError( - "Mocha instance is currently running tests, cannot start a next test run until this one is done", - this, - ); - } - if ( - this._state === mochaStates.DISPOSED || - this._state === mochaStates.REFERENCES_CLEANED - ) { - throw createMochaInstanceAlreadyDisposedError( - "Mocha instance is already disposed, cannot start a new test run. Please create a new mocha instance. Be sure to set disable `cleanReferencesAfterRun` when you want to reuse the same mocha instance for multiple test runs.", - this._cleanReferencesAfterRun, - this, - ); - } - }; + /** + * @summary + * Delays root suite execution. + * + * @description + * Used to perform async operations before any suites are run. + * + * @public + * @see [delayed root suite](../#delayed-root-suite) + * @returns {Mocha} this + * @chainable + */ + Mocha.prototype.delay = function delay() { + this.options.delay = true; + return this; + }; - /** - * Mocha version as specified by "package.json". - * - * @name Mocha#version - * @type string - * @readonly - */ - Object.defineProperty(Mocha.prototype, "version", { - value: require$$17.version, - configurable: false, - enumerable: true, - writable: false, - }); + /** + * Enables or disables running tests in dry-run mode. + * + * @public + * @see [CLI option](../#-dry-run) + * @param {boolean} [dryRun=true] - Whether to activate dry-run mode. + * @return {Mocha} this + * @chainable + */ + Mocha.prototype.dryRun = function (dryRun) { + this.options.dryRun = dryRun !== false; + return this; + }; - /** - * Runs root suite and invokes `fn()` when complete. - * - * @description - * To run tests multiple times (or to run tests in files that are - * already in the `require` cache), make sure to clear them from - * the cache first! - * - * @public - * @see {@link Mocha#unloadFiles} - * @see {@link Runner#run} - * @param {DoneCB} [fn] - Callback invoked when test execution completed. - * @returns {import("./runner.js")} runner instance - * @example - * - * // exit with non-zero status if there were test failures - * mocha.run(failures => process.exitCode = failures ? 1 : 0); - */ - Mocha.prototype.run = function (fn) { - this._guardRunningStateTransition(); - this._state = mochaStates.RUNNING; - if (this._previousRunner) { - this._previousRunner.dispose(); - this.suite.reset(); - } - if (this.files.length && !this._lazyLoadFiles) { - this.loadFiles(); - } - var suite = this.suite; - var options = this.options; - options.files = this.files; - const runner = new this._runnerClass(suite, { - cleanReferencesAfterRun: this._cleanReferencesAfterRun, - delay: options.delay, - dryRun: options.dryRun, - failHookAffectedTests: options.failHookAffectedTests, - failZero: options.failZero, - }); - createStatsCollector(runner); - var reporter = new this._reporter(runner, options); - runner.checkLeaks = options.checkLeaks === true; - runner.fullStackTrace = options.fullTrace; - runner.asyncOnly = options.asyncOnly; - runner.allowUncaught = options.allowUncaught; - runner.forbidOnly = options.forbidOnly; - runner.forbidPending = options.forbidPending; - if (options.grep) { - runner.grep(options.grep, options.invert); - } - if (options.global) { - runner.globals(options.global); - } - if (options.color !== undefined) { - exports.reporters.Base.useColors = options.color; - } - exports.reporters.Base.inlineDiffs = options.inlineDiffs; - exports.reporters.Base.hideDiff = !options.diff; - - const done = (failures) => { - this._previousRunner = runner; - this._state = this._cleanReferencesAfterRun - ? mochaStates.REFERENCES_CLEANED - : mochaStates.INIT; - fn = fn || utils.noop; - if (typeof reporter.done === "function") { - reporter.done(failures, fn); - } else { - fn(failures); - } - }; + /** + * Reports tests as failed when they are skipped due to a hook failure. + * + * @public + * @see [CLI option](../#-fail-hook-affected-tests) + * @param {boolean} [failHookAffectedTests=true] - Whether to fail tests affected by hook failures. + * @return {Mocha} this + * @chainable + */ + Mocha.prototype.failHookAffectedTests = function (failHookAffectedTests) { + this.options.failHookAffectedTests = failHookAffectedTests !== false; + return this; + }; - const runAsync = async (runner) => { - const context = - this.options.enableGlobalSetup && this.hasGlobalSetupFixtures() - ? await this.runGlobalSetup(runner) - : {}; - const failureCount = await runner.runAsync({ - files: this.files, - options, - }); - if (this.options.enableGlobalTeardown && this.hasGlobalTeardownFixtures()) { - await this.runGlobalTeardown(runner, { context }); - } - return failureCount; - }; + /** + * Fails test run if no tests encountered with exit-code 1. + * + * @public + * @see [CLI option](../#-fail-zero) + * @param {boolean} [failZero=true] - Whether to fail test run. + * @return {Mocha} this + * @chainable + */ + Mocha.prototype.failZero = function (failZero) { + this.options.failZero = failZero !== false; + return this; + }; - // no "catch" here is intentional. errors coming out of - // Runner#run are considered uncaught/unhandled and caught - // by the `process` event listeners. - // also: returning anything other than `runner` would be a breaking - // change - runAsync(runner).then(done); + /** + * Fail test run if tests were failed. + * + * @public + * @see [CLI option](../#-pass-on-failing-test-suite) + * @param {boolean} [passOnFailingTestSuite=false] - Whether to fail test run. + * @return {Mocha} this + * @chainable + */ + Mocha.prototype.passOnFailingTestSuite = function (passOnFailingTestSuite) { + this.options.passOnFailingTestSuite = passOnFailingTestSuite === true; + return this; + }; - return runner; - }; + /** + * Causes tests marked `only` to fail the suite. + * + * @public + * @see [CLI option](../#-forbid-only) + * @param {boolean} [forbidOnly=true] - Whether tests marked `only` fail the suite. + * @returns {Mocha} this + * @chainable + */ + Mocha.prototype.forbidOnly = function (forbidOnly) { + this.options.forbidOnly = forbidOnly !== false; + return this; + }; - /** - * Assigns hooks to the root suite - * @param {MochaRootHookObject} [hooks] - Hooks to assign to root suite - * @chainable - */ - Mocha.prototype.rootHooks = function rootHooks({ - beforeAll = [], - beforeEach = [], - afterAll = [], - afterEach = [], - } = {}) { - beforeAll = utils.castArray(beforeAll); - beforeEach = utils.castArray(beforeEach); - afterAll = utils.castArray(afterAll); - afterEach = utils.castArray(afterEach); - beforeAll.forEach((hook) => { - this.suite.beforeAll(hook); - }); - beforeEach.forEach((hook) => { - this.suite.beforeEach(hook); - }); - afterAll.forEach((hook) => { - this.suite.afterAll(hook); - }); - afterEach.forEach((hook) => { - this.suite.afterEach(hook); - }); - return this; - }; + /** + * Causes pending tests and tests marked `skip` to fail the suite. + * + * @public + * @see [CLI option](../#-forbid-pending) + * @param {boolean} [forbidPending=true] - Whether pending tests fail the suite. + * @returns {Mocha} this + * @chainable + */ + Mocha.prototype.forbidPending = function (forbidPending) { + this.options.forbidPending = forbidPending !== false; + return this; + }; - /** - * Toggles parallel mode. - * - * Must be run before calling {@link Mocha#run}. Changes the `Runner` class to - * use; also enables lazy file loading if not already done so. - * - * Warning: when passed `false` and lazy loading has been enabled _via any means_ (including calling `parallelMode(true)`), this method will _not_ disable lazy loading. Lazy loading is a prerequisite for parallel - * mode, but parallel mode is _not_ a prerequisite for lazy loading! - * @param {boolean} [enable] - If `true`, enable; otherwise disable. - * @throws If run in browser - * @throws If Mocha not in `INIT` state - * @returns {Mocha} - * @chainable - * @public - */ - Mocha.prototype.parallelMode = function parallelMode(enable = true) { - if (utils.isBrowser()) { - throw createUnsupportedError("parallel mode is only supported in Node.js"); - } - const parallel = Boolean(enable); - if ( - parallel === this.options.parallel && - this._lazyLoadFiles && - this._runnerClass !== exports.Runner - ) { - return this; - } - if (this._state !== mochaStates.INIT) { - throw createUnsupportedError( - "cannot change parallel mode after having called run()", - ); - } - this.options.parallel = parallel; + /** + * Throws an error if mocha is in the wrong state to be able to transition to a "running" state. + * @private + */ + Mocha.prototype._guardRunningStateTransition = function () { + if (this._state === mochaStates.RUNNING) { + throw createMochaInstanceAlreadyRunningError( + "Mocha instance is currently running tests, cannot start a next test run until this one is done", + this, + ); + } + if ( + this._state === mochaStates.DISPOSED || + this._state === mochaStates.REFERENCES_CLEANED + ) { + throw createMochaInstanceAlreadyDisposedError( + "Mocha instance is already disposed, cannot start a new test run. Please create a new mocha instance. Be sure to set disable `cleanReferencesAfterRun` when you want to reuse the same mocha instance for multiple test runs.", + this._cleanReferencesAfterRun, + this, + ); + } + }; - // swap Runner class - this._runnerClass = parallel - ? require$$18 - : exports.Runner; + /** + * Mocha version as specified by "package.json". + * + * @name Mocha#version + * @type string + * @readonly + */ + Object.defineProperty(Mocha.prototype, "version", { + value: require$$17.version, + configurable: false, + enumerable: true, + writable: false, + }); - // lazyLoadFiles may have been set `true` otherwise (for ESM loading), - // so keep `true` if so. - return this.lazyLoadFiles(this._lazyLoadFiles || parallel); - }; + /** + * Runs root suite and invokes `fn()` when complete. + * + * @description + * To run tests multiple times (or to run tests in files that are + * already in the `require` cache), make sure to clear them from + * the cache first! + * + * @public + * @see {@link Mocha#unloadFiles} + * @see {@link Runner#run} + * @param {DoneCB} [fn] - Callback invoked when test execution completed. + * @returns {import("./runner.cjs")} runner instance + * @example + * + * // exit with non-zero status if there were test failures + * mocha.run(failures => process.exitCode = failures ? 1 : 0); + */ + Mocha.prototype.run = function (fn) { + this._guardRunningStateTransition(); + this._state = mochaStates.RUNNING; + if (this._previousRunner) { + this._previousRunner.dispose(); + this.suite.reset(); + } + if (this.files.length && !this._lazyLoadFiles) { + this.loadFiles(); + } + var suite = this.suite; + var options = this.options; + options.files = this.files; + const runner = new this._runnerClass(suite, { + cleanReferencesAfterRun: this._cleanReferencesAfterRun, + delay: options.delay, + dryRun: options.dryRun, + failHookAffectedTests: options.failHookAffectedTests, + failZero: options.failZero, + }); + createStatsCollector(runner); + var reporter = new this._reporter(runner, options); + runner.checkLeaks = options.checkLeaks === true; + runner.fullStackTrace = options.fullTrace; + runner.asyncOnly = options.asyncOnly; + runner.allowUncaught = options.allowUncaught; + runner.forbidOnly = options.forbidOnly; + runner.forbidPending = options.forbidPending; + if (options.grep) { + runner.grep(options.grep, options.invert); + } + if (options.global) { + runner.globals(options.global); + } + if (options.color !== undefined) { + exports.reporters.Base.useColors = options.color; + } + exports.reporters.Base.inlineDiffs = options.inlineDiffs; + exports.reporters.Base.hideDiff = !options.diff; + + const done = (failures) => { + this._previousRunner = runner; + this._state = this._cleanReferencesAfterRun + ? mochaStates.REFERENCES_CLEANED + : mochaStates.INIT; + fn = fn || utils.noop; + if (typeof reporter.done === "function") { + reporter.done(failures, fn); + } else { + fn(failures); + } + }; + + const reportFixtureError = (phase, err) => { + browser$1$1.stderr.write( + `\n[mocha] global ${phase} failed:\n${err && err.stack ? err.stack : err}\n`, + ); + }; + + const runAsync = async (runner) => { + let context = {}; + if (this.options.enableGlobalSetup && this.hasGlobalSetupFixtures()) { + try { + context = await this.runGlobalSetup(runner); + } catch (err) { + reportFixtureError("setup", err); + return 1; + } + } + const failureCount = await runner.runAsync({ + files: this.files, + options, + }); + if (this.options.enableGlobalTeardown && this.hasGlobalTeardownFixtures()) { + try { + await this.runGlobalTeardown(runner, { context }); + } catch (err) { + reportFixtureError("teardown", err); + return failureCount + 1; + } + } + return failureCount; + }; + + // Errors coming out of Runner#run itself remain uncaught/unhandled and are picked up by the `process` event listeners. + // Only global fixture errors are intercepted above so they surface to the user instead of being silently "swallowed". + // Also: returning anything other than `runner` would be a breaking change. + runAsync(runner).then(done); + + return runner; + }; - /** - * Disables implicit call to {@link Mocha#loadFiles} in {@link Mocha#run}. This - * setting is used by watch mode, parallel mode, and for loading ESM files. - * @todo This should throw if we've already loaded files; such behavior - * necessitates adding a new state. - * @param {boolean} [enable] - If `true`, disable eager loading of files in - * {@link Mocha#run} - * @chainable - * @public - */ - Mocha.prototype.lazyLoadFiles = function lazyLoadFiles(enable) { - this._lazyLoadFiles = enable === true; - debug("set lazy load to %s", enable); - return this; - }; + /** + * Assigns hooks to the root suite + * @param {MochaRootHookObject} [hooks] - Hooks to assign to root suite + * @chainable + */ + Mocha.prototype.rootHooks = function rootHooks({ + beforeAll = [], + beforeEach = [], + afterAll = [], + afterEach = [], + } = {}) { + beforeAll = utils.castArray(beforeAll); + beforeEach = utils.castArray(beforeEach); + afterAll = utils.castArray(afterAll); + afterEach = utils.castArray(afterEach); + beforeAll.forEach((hook) => { + this.suite.beforeAll(hook); + }); + beforeEach.forEach((hook) => { + this.suite.beforeEach(hook); + }); + afterAll.forEach((hook) => { + this.suite.afterAll(hook); + }); + afterEach.forEach((hook) => { + this.suite.afterEach(hook); + }); + return this; + }; - /** - * Configures one or more global setup fixtures. - * - * If given no parameters, _unsets_ any previously-set fixtures. - * @chainable - * @public - * @param {MochaGlobalFixture|MochaGlobalFixture[]} [setupFns] - Global setup fixture(s) - * @returns {Mocha} - */ - Mocha.prototype.globalSetup = function globalSetup(setupFns = []) { - setupFns = utils.castArray(setupFns); - this.options.globalSetup = setupFns; - debug("configured %d global setup functions", setupFns.length); - return this; - }; + /** + * Toggles parallel mode. + * + * Must be run before calling {@link Mocha#run}. Changes the `Runner` class to + * use; also enables lazy file loading if not already done so. + * + * Warning: when passed `false` and lazy loading has been enabled _via any means_ (including calling `parallelMode(true)`), this method will _not_ disable lazy loading. Lazy loading is a prerequisite for parallel + * mode, but parallel mode is _not_ a prerequisite for lazy loading! + * @param {boolean} [enable] - If `true`, enable; otherwise disable. + * @throws If run in browser + * @throws If Mocha not in `INIT` state + * @returns {Mocha} + * @chainable + * @public + */ + Mocha.prototype.parallelMode = function parallelMode(enable = true) { + if (utils.isBrowser()) { + throw createUnsupportedError("parallel mode is only supported in Node.js"); + } + const parallel = Boolean(enable); + if ( + parallel === this.options.parallel && + this._lazyLoadFiles && + this._runnerClass !== exports.Runner + ) { + return this; + } + if (this._state !== mochaStates.INIT) { + throw createUnsupportedError( + "cannot change parallel mode after having called run()", + ); + } + this.options.parallel = parallel; + + // swap Runner class + this._runnerClass = parallel + ? require$$18 + : exports.Runner; + + // lazyLoadFiles may have been set `true` otherwise (for ESM loading), + // so keep `true` if so. + return this.lazyLoadFiles(this._lazyLoadFiles || parallel); + }; - /** - * Configures one or more global teardown fixtures. - * - * If given no parameters, _unsets_ any previously-set fixtures. - * @chainable - * @public - * @param {MochaGlobalFixture|MochaGlobalFixture[]} [teardownFns] - Global teardown fixture(s) - * @returns {Mocha} - */ - Mocha.prototype.globalTeardown = function globalTeardown(teardownFns = []) { - teardownFns = utils.castArray(teardownFns); - this.options.globalTeardown = teardownFns; - debug("configured %d global teardown functions", teardownFns.length); - return this; - }; + /** + * Disables implicit call to {@link Mocha#loadFiles} in {@link Mocha#run}. This + * setting is used by watch mode, parallel mode, and for loading ESM files. + * @todo This should throw if we've already loaded files; such behavior + * necessitates adding a new state. + * @param {boolean} [enable] - If `true`, disable eager loading of files in + * {@link Mocha#run} + * @chainable + * @public + */ + Mocha.prototype.lazyLoadFiles = function lazyLoadFiles(enable) { + this._lazyLoadFiles = enable === true; + debug("set lazy load to %s", enable); + return this; + }; - /** - * Run any global setup fixtures sequentially, if any. - * - * This is _automatically called_ by {@link Mocha#run} _unless_ the `runGlobalSetup` option is `false`; see {@link Mocha#enableGlobalSetup}. - * - * The context object this function resolves with should be consumed by {@link Mocha#runGlobalTeardown}. - * @param {object} [context] - Context object if already have one - * @public - * @returns {Promise} Context object - */ - Mocha.prototype.runGlobalSetup = async function runGlobalSetup(context = {}) { - const { globalSetup } = this.options; - if (globalSetup && globalSetup.length) { - debug("run(): global setup starting"); - await this._runGlobalFixtures(globalSetup, context); - debug("run(): global setup complete"); - } - return context; - }; + /** + * Configures one or more global setup fixtures. + * + * If given no parameters, _unsets_ any previously-set fixtures. + * @chainable + * @public + * @param {MochaGlobalFixture|MochaGlobalFixture[]} [setupFns] - Global setup fixture(s) + * @returns {Mocha} + */ + Mocha.prototype.globalSetup = function globalSetup(setupFns = []) { + setupFns = utils.castArray(setupFns); + this.options.globalSetup = setupFns; + debug("configured %d global setup functions", setupFns.length); + return this; + }; - /** - * Run any global teardown fixtures sequentially, if any. - * - * This is _automatically called_ by {@link Mocha#run} _unless_ the `runGlobalTeardown` option is `false`; see {@link Mocha#enableGlobalTeardown}. - * - * Should be called with context object returned by {@link Mocha#runGlobalSetup}, if applicable. - * @param {object} [context] - Context object if already have one - * @public - * @returns {Promise} Context object - */ - Mocha.prototype.runGlobalTeardown = async function runGlobalTeardown( - context = {}, - ) { - const { globalTeardown } = this.options; - if (globalTeardown && globalTeardown.length) { - debug("run(): global teardown starting"); - await this._runGlobalFixtures(globalTeardown, context); - } - debug("run(): global teardown complete"); - return context; - }; + /** + * Configures one or more global teardown fixtures. + * + * If given no parameters, _unsets_ any previously-set fixtures. + * @chainable + * @public + * @param {MochaGlobalFixture|MochaGlobalFixture[]} [teardownFns] - Global teardown fixture(s) + * @returns {Mocha} + */ + Mocha.prototype.globalTeardown = function globalTeardown(teardownFns = []) { + teardownFns = utils.castArray(teardownFns); + this.options.globalTeardown = teardownFns; + debug("configured %d global teardown functions", teardownFns.length); + return this; + }; - /** - * Run global fixtures sequentially with context `context` - * @private - * @param {MochaGlobalFixture[]} [fixtureFns] - Fixtures to run - * @param {object} [context] - context object - * @returns {Promise} context object - */ - Mocha.prototype._runGlobalFixtures = async function _runGlobalFixtures( - fixtureFns = [], - context = {}, - ) { - for await (const fixtureFn of fixtureFns) { - await fixtureFn.call(context); - } - return context; - }; + /** + * Run any global setup fixtures sequentially, if any. + * + * This is _automatically called_ by {@link Mocha#run} _unless_ the `runGlobalSetup` option is `false`; see {@link Mocha#enableGlobalSetup}. + * + * The context object this function resolves with should be consumed by {@link Mocha#runGlobalTeardown}. + * @param {object} [context] - Context object if already have one + * @public + * @returns {Promise} Context object + */ + Mocha.prototype.runGlobalSetup = async function runGlobalSetup(context = {}) { + const { globalSetup } = this.options; + if (globalSetup && globalSetup.length) { + debug("run(): global setup starting"); + await this._runGlobalFixtures(globalSetup, context); + debug("run(): global setup complete"); + } + return context; + }; - /** - * Toggle execution of any global setup fixture(s) - * - * @chainable - * @public - * @param {boolean } [enabled=true] - If `false`, do not run global setup fixture - * @returns {Mocha} - */ - Mocha.prototype.enableGlobalSetup = function enableGlobalSetup(enabled = true) { - this.options.enableGlobalSetup = Boolean(enabled); - return this; - }; + /** + * Run any global teardown fixtures sequentially, if any. + * + * This is _automatically called_ by {@link Mocha#run} _unless_ the `runGlobalTeardown` option is `false`; see {@link Mocha#enableGlobalTeardown}. + * + * Should be called with context object returned by {@link Mocha#runGlobalSetup}, if applicable. + * @param {object} [context] - Context object if already have one + * @public + * @returns {Promise} Context object + */ + Mocha.prototype.runGlobalTeardown = async function runGlobalTeardown( + context = {}, + ) { + const { globalTeardown } = this.options; + if (globalTeardown && globalTeardown.length) { + debug("run(): global teardown starting"); + await this._runGlobalFixtures(globalTeardown, context); + } + debug("run(): global teardown complete"); + return context; + }; - /** - * Toggle execution of any global teardown fixture(s) - * - * @chainable - * @public - * @param {boolean } [enabled=true] - If `false`, do not run global teardown fixture - * @returns {Mocha} - */ - Mocha.prototype.enableGlobalTeardown = function enableGlobalTeardown( - enabled = true, - ) { - this.options.enableGlobalTeardown = Boolean(enabled); - return this; - }; + /** + * Run global fixtures sequentially with context `context` + * @private + * @param {MochaGlobalFixture[]} [fixtureFns] - Fixtures to run + * @param {object} [context] - context object + * @returns {Promise} context object + */ + Mocha.prototype._runGlobalFixtures = async function _runGlobalFixtures( + fixtureFns = [], + context = {}, + ) { + for await (const fixtureFn of fixtureFns) { + await fixtureFn.call(context); + } + return context; + }; - /** - * Returns `true` if one or more global setup fixtures have been supplied. - * @public - * @returns {boolean} - */ - Mocha.prototype.hasGlobalSetupFixtures = function hasGlobalSetupFixtures() { - return Boolean(this.options.globalSetup.length); - }; + /** + * Toggle execution of any global setup fixture(s) + * + * @chainable + * @public + * @param {boolean } [enabled=true] - If `false`, do not run global setup fixture + * @returns {Mocha} + */ + Mocha.prototype.enableGlobalSetup = function enableGlobalSetup(enabled = true) { + this.options.enableGlobalSetup = Boolean(enabled); + return this; + }; - /** - * Returns `true` if one or more global teardown fixtures have been supplied. - * @public - * @returns {boolean} - */ - Mocha.prototype.hasGlobalTeardownFixtures = - function hasGlobalTeardownFixtures() { - return Boolean(this.options.globalTeardown.length); - }; - }(mocha$1, mocha$1.exports)); + /** + * Toggle execution of any global teardown fixture(s) + * + * @chainable + * @public + * @param {boolean } [enabled=true] - If `false`, do not run global teardown fixture + * @returns {Mocha} + */ + Mocha.prototype.enableGlobalTeardown = function enableGlobalTeardown( + enabled = true, + ) { + this.options.enableGlobalTeardown = Boolean(enabled); + return this; + }; - /* eslint no-unused-vars: off */ - /* eslint-env commonjs */ + /** + * Returns `true` if one or more global setup fixtures have been supplied. + * @public + * @returns {boolean} + */ + Mocha.prototype.hasGlobalSetupFixtures = function hasGlobalSetupFixtures() { + return Boolean(this.options.globalSetup.length); + }; + + /** + * Returns `true` if one or more global teardown fixtures have been supplied. + * @public + * @returns {boolean} + */ + Mocha.prototype.hasGlobalTeardownFixtures = + function hasGlobalTeardownFixtures() { + return Boolean(this.options.globalTeardown.length); + }; + } (mocha$1, mocha$1.exports)); + return mocha$1.exports; + } + + var mochaExports = requireMocha(); + var Mocha = /*@__PURE__*/getDefaultExportFromCjs(mochaExports); /** * Shim process.stdout. */ - - process.stdout = browserStdout({ label: false }); - - var parseQuery = parseQuery$1; - var highlightTags = highlightTags$1; - var Mocha = mocha$1.exports; + browser$1$1.stdout = BrowserStdout({ label: false }); /** * Create a Mocha instance. @@ -21555,27 +16329,24 @@ * Save timer references to avoid Sinon interfering (see GH-237). */ - var Date$1 = commonjsGlobal.Date; - var setTimeout$1 = commonjsGlobal.setTimeout; - commonjsGlobal.setInterval; - commonjsGlobal.clearTimeout; - commonjsGlobal.clearInterval; + var Date$1 = global$1.Date; + var setTimeout$1 = global$1.setTimeout; var uncaughtExceptionHandlers = []; - var originalOnerrorHandler = commonjsGlobal.onerror; + var originalOnerrorHandler = global$1.onerror; /** * Remove uncaughtException listener. * Revert to original onerror handler if previously defined. */ - process.removeListener = function (e, fn) { + browser$1$1.removeListener = function (e, fn) { if (e === "uncaughtException") { if (originalOnerrorHandler) { - commonjsGlobal.onerror = originalOnerrorHandler; + global$1.onerror = originalOnerrorHandler; } else { - commonjsGlobal.onerror = function () {}; + global$1.onerror = function () {}; } var i = uncaughtExceptionHandlers.indexOf(fn); if (i !== -1) { @@ -21588,7 +16359,7 @@ * Implements listenerCount for 'uncaughtException'. */ - process.listenerCount = function (name) { + browser$1$1.listenerCount = function (name) { if (name === "uncaughtException") { return uncaughtExceptionHandlers.length; } @@ -21599,9 +16370,9 @@ * Implements uncaughtException listener. */ - process.on = function (e, fn) { + browser$1$1.on = function (e, fn) { if (e === "uncaughtException") { - commonjsGlobal.onerror = function (msg, url, line, col, err) { + global$1.onerror = function (msg, url, line, col, err) { fn(err || new Error(msg + " (" + url + ":" + line + ":" + col + ")")); return !mocha.options.allowUncaught; }; @@ -21609,7 +16380,7 @@ } }; - process.listeners = function (err) { + browser$1$1.listeners = function (err) { if (err === "uncaughtException") { return uncaughtExceptionHandlers; } @@ -21666,7 +16437,7 @@ mocha.ui = function (ui) { Mocha.prototype.ui.call(this, ui); - this.suite.emit("pre-require", commonjsGlobal, null, this); + this.suite.emit("pre-require", global$1, null, this); return this; }; @@ -21702,7 +16473,7 @@ var options = mocha.options; mocha.globals("location"); - var query = parseQuery(commonjsGlobal.location.search || ""); + var query = parseQuery(global$1.location.search || ""); if (query.grep) { mocha.grep(query.grep); } @@ -21715,7 +16486,7 @@ return Mocha.prototype.run.call(mocha, function (err) { // The DOM Document is not available in Web Workers. - var document = commonjsGlobal.document; + var document = global$1.document; if ( document && document.getElementById("mocha") && @@ -21734,28 +16505,26 @@ * https://github.com/mochajs/mocha/pull/916 */ - Mocha.process = process; + Mocha.process = browser$1$1; /** * Expose mocha. */ - commonjsGlobal.Mocha = Mocha; - commonjsGlobal.mocha = mocha; + global$1.Mocha = Mocha; + global$1.mocha = mocha; // for bundlers: enable `import {describe, it} from 'mocha'` // `bdd` interface only // prettier-ignore - [ + [ 'describe', 'context', 'it', 'specify', 'xdescribe', 'xcontext', 'xit', 'xspecify', 'before', 'beforeEach', 'afterEach', 'after' ].forEach(function(key) { - mocha[key] = commonjsGlobal[key]; + mocha[key] = global$1[key]; }); - var browserEntry = mocha; - - return browserEntry; + return mocha; })); //# sourceMappingURL=mocha.js.map diff --git a/node_modules/mocha/mocha.js.map b/node_modules/mocha/mocha.js.map index ab3b44e8..77775e3d 100644 --- a/node_modules/mocha/mocha.js.map +++ b/node_modules/mocha/mocha.js.map @@ -1 +1 @@ -{"version":3,"file":"mocha.js","sources":["node_modules/rollup-plugin-node-globals/src/global.js","node_modules/process-es6/browser.js","node_modules/browser-stdout/index.js","lib/browser/parse-query.js","lib/browser/highlight-tags.js","node_modules/escape-string-regexp/index.js","node_modules/diff/lib/diff/base.js","node_modules/diff/lib/diff/character.js","node_modules/diff/lib/util/string.js","node_modules/diff/lib/diff/word.js","node_modules/diff/lib/util/params.js","node_modules/diff/lib/diff/line.js","node_modules/diff/lib/diff/sentence.js","node_modules/diff/lib/diff/css.js","node_modules/diff/lib/diff/json.js","node_modules/diff/lib/diff/array.js","node_modules/diff/lib/patch/line-endings.js","node_modules/diff/lib/patch/parse.js","node_modules/diff/lib/util/distance-iterator.js","node_modules/diff/lib/patch/apply.js","node_modules/diff/lib/patch/create.js","node_modules/diff/lib/util/array.js","node_modules/diff/lib/patch/merge.js","node_modules/diff/lib/patch/reverse.js","node_modules/diff/lib/convert/dmp.js","node_modules/diff/lib/convert/xml.js","node_modules/diff/lib/index.js","node_modules/ms/index.js","node_modules/buffer-es6/base64.js","node_modules/buffer-es6/ieee754.js","node_modules/buffer-es6/isArray.js","node_modules/buffer-es6/index.js","node_modules/rollup-plugin-node-globals/src/browser.js","node_modules/he/he.js","lib/utils.js","node_modules/log-symbols/browser.js","lib/pending.js","node_modules/debug/node_modules/ms/index.js","node_modules/debug/src/common.js","node_modules/debug/src/browser.js","lib/error-constants.js","lib/errors.js","lib/runnable.js","lib/hook.js","lib/suite.js","lib/runner.js","lib/reporters/base.js","lib/reporters/dot.js","lib/reporters/doc.js","lib/reporters/tap.js","lib/reporters/json.js","lib/reporters/html.js","lib/reporters/list.js","lib/reporters/min.js","lib/reporters/spec.js","lib/reporters/nyan.js","lib/reporters/xunit.js","lib/reporters/markdown.js","lib/reporters/progress.js","lib/reporters/landing.js","lib/reporters/json-stream.js","lib/reporters/index.js","lib/stats-collector.js","lib/test.js","lib/interfaces/common.js","lib/interfaces/bdd.js","lib/interfaces/tdd.js","lib/interfaces/qunit.js","lib/interfaces/exports.js","lib/interfaces/index.js","lib/context.js","lib/mocha.js","browser-entry.js"],"sourcesContent":["export default (typeof global !== \"undefined\" ? global :\n typeof self !== \"undefined\" ? self :\n typeof window !== \"undefined\" ? window : {});\n","// shim for using process in browser\n// based off https://github.com/defunctzombie/node-process/blob/master/browser.js\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\nvar cachedSetTimeout = defaultSetTimout;\nvar cachedClearTimeout = defaultClearTimeout;\nif (typeof global.setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n}\nif (typeof global.clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n}\n\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\nexport function nextTick(fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n}\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nexport var title = 'browser';\nexport var platform = 'browser';\nexport var browser = true;\nexport var env = {};\nexport var argv = [];\nexport var version = ''; // empty string to avoid regexp issues\nexport var versions = {};\nexport var release = {};\nexport var config = {};\n\nfunction noop() {}\n\nexport var on = noop;\nexport var addListener = noop;\nexport var once = noop;\nexport var off = noop;\nexport var removeListener = noop;\nexport var removeAllListeners = noop;\nexport var emit = noop;\n\nexport function binding(name) {\n throw new Error('process.binding is not supported');\n}\n\nexport function cwd () { return '/' }\nexport function chdir (dir) {\n throw new Error('process.chdir is not supported');\n};\nexport function umask() { return 0; }\n\n// from https://github.com/kumavis/browser-process-hrtime/blob/master/index.js\nvar performance = global.performance || {}\nvar performanceNow =\n performance.now ||\n performance.mozNow ||\n performance.msNow ||\n performance.oNow ||\n performance.webkitNow ||\n function(){ return (new Date()).getTime() }\n\n// generate timestamp or delta\n// see http://nodejs.org/api/process.html#process_process_hrtime\nexport function hrtime(previousTimestamp){\n var clocktime = performanceNow.call(performance)*1e-3\n var seconds = Math.floor(clocktime)\n var nanoseconds = Math.floor((clocktime%1)*1e9)\n if (previousTimestamp) {\n seconds = seconds - previousTimestamp[0]\n nanoseconds = nanoseconds - previousTimestamp[1]\n if (nanoseconds<0) {\n seconds--\n nanoseconds += 1e9\n }\n }\n return [seconds,nanoseconds]\n}\n\nvar startTime = new Date();\nexport function uptime() {\n var currentTime = new Date();\n var dif = currentTime - startTime;\n return dif / 1000;\n}\n\nexport default {\n nextTick: nextTick,\n title: title,\n browser: browser,\n env: env,\n argv: argv,\n version: version,\n versions: versions,\n on: on,\n addListener: addListener,\n once: once,\n off: off,\n removeListener: removeListener,\n removeAllListeners: removeAllListeners,\n emit: emit,\n binding: binding,\n cwd: cwd,\n chdir: chdir,\n umask: umask,\n hrtime: hrtime,\n platform: platform,\n release: release,\n config: config,\n uptime: uptime\n};\n","var WritableStream = require('stream').Writable\nvar inherits = require('util').inherits\n\nmodule.exports = BrowserStdout\n\n\ninherits(BrowserStdout, WritableStream)\n\nfunction BrowserStdout(opts) {\n if (!(this instanceof BrowserStdout)) return new BrowserStdout(opts)\n\n opts = opts || {}\n WritableStream.call(this, opts)\n this.label = (opts.label !== undefined) ? opts.label : 'stdout'\n}\n\nBrowserStdout.prototype._write = function(chunks, encoding, cb) {\n var output = chunks.toString ? chunks.toString() : chunks\n if (this.label === false) {\n console.log(output)\n } else {\n console.log(this.label+':', output)\n }\n process.nextTick(cb)\n}\n","\"use strict\";\n\n/**\n * Parse the given `qs`.\n *\n * @private\n * @param {string} qs\n * @return {Object}\n */\nmodule.exports = function parseQuery(qs) {\n return qs\n .replace(\"?\", \"\")\n .split(\"&\")\n .reduce(function (obj, pair) {\n var i = pair.indexOf(\"=\");\n var key = pair.slice(0, i);\n var val = pair.slice(++i);\n\n // Due to how the URLSearchParams API treats spaces\n obj[key] = decodeURIComponent(val.replace(/\\+/g, \"%20\"));\n\n return obj;\n }, {});\n};\n","\"use strict\";\n\n/**\n * Highlight the given string of `js`.\n *\n * @private\n * @param {string} js\n * @return {string}\n */\nfunction highlight(js) {\n return js\n .replace(//g, \">\")\n .replace(/\\/\\/(.*)/gm, '//$1')\n .replace(/('.*?')/gm, '$1')\n .replace(/(\\d+\\.\\d+)/gm, '$1')\n .replace(/(\\d+)/gm, '$1')\n .replace(\n /\\bnew[ \\t]+(\\w+)/gm,\n 'new $1',\n )\n .replace(\n /\\b(function|new|throw|return|var|if|else)\\b/gm,\n '$1',\n );\n}\n\n/**\n * Highlight the contents of tag `name`.\n *\n * @private\n * @param {string} name\n */\nmodule.exports = function highlightTags(name) {\n var code = document.getElementById(\"mocha\").getElementsByTagName(name);\n for (var i = 0, len = code.length; i < len; ++i) {\n code[i].innerHTML = highlight(code[i].innerHTML);\n }\n};\n","'use strict';\n\nmodule.exports = string => {\n\tif (typeof string !== 'string') {\n\t\tthrow new TypeError('Expected a string');\n\t}\n\n\t// Escape characters with special meaning either inside or outside character sets.\n\t// Use a simple backslash escape when it’s always valid, and a \\unnnn escape when the simpler form would be disallowed by Unicode patterns’ stricter grammar.\n\treturn string\n\t\t.replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&')\n\t\t.replace(/-/g, '\\\\x2d');\n};\n","/*istanbul ignore start*/\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = Diff;\n/*istanbul ignore end*/\nfunction Diff() {}\nDiff.prototype = {\n /*istanbul ignore start*/\n /*istanbul ignore end*/\n diff: function diff(oldString, newString) {\n /*istanbul ignore start*/\n var _options$timeout;\n var\n /*istanbul ignore end*/\n options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var callback = options.callback;\n if (typeof options === 'function') {\n callback = options;\n options = {};\n }\n var self = this;\n function done(value) {\n value = self.postProcess(value, options);\n if (callback) {\n setTimeout(function () {\n callback(value);\n }, 0);\n return true;\n } else {\n return value;\n }\n }\n\n // Allow subclasses to massage the input prior to running\n oldString = this.castInput(oldString, options);\n newString = this.castInput(newString, options);\n oldString = this.removeEmpty(this.tokenize(oldString, options));\n newString = this.removeEmpty(this.tokenize(newString, options));\n var newLen = newString.length,\n oldLen = oldString.length;\n var editLength = 1;\n var maxEditLength = newLen + oldLen;\n if (options.maxEditLength != null) {\n maxEditLength = Math.min(maxEditLength, options.maxEditLength);\n }\n var maxExecutionTime =\n /*istanbul ignore start*/\n (_options$timeout =\n /*istanbul ignore end*/\n options.timeout) !== null && _options$timeout !== void 0 ? _options$timeout : Infinity;\n var abortAfterTimestamp = Date.now() + maxExecutionTime;\n var bestPath = [{\n oldPos: -1,\n lastComponent: undefined\n }];\n\n // Seed editLength = 0, i.e. the content starts with the same values\n var newPos = this.extractCommon(bestPath[0], newString, oldString, 0, options);\n if (bestPath[0].oldPos + 1 >= oldLen && newPos + 1 >= newLen) {\n // Identity per the equality and tokenizer\n return done(buildValues(self, bestPath[0].lastComponent, newString, oldString, self.useLongestToken));\n }\n\n // Once we hit the right edge of the edit graph on some diagonal k, we can\n // definitely reach the end of the edit graph in no more than k edits, so\n // there's no point in considering any moves to diagonal k+1 any more (from\n // which we're guaranteed to need at least k+1 more edits).\n // Similarly, once we've reached the bottom of the edit graph, there's no\n // point considering moves to lower diagonals.\n // We record this fact by setting minDiagonalToConsider and\n // maxDiagonalToConsider to some finite value once we've hit the edge of\n // the edit graph.\n // This optimization is not faithful to the original algorithm presented in\n // Myers's paper, which instead pointlessly extends D-paths off the end of\n // the edit graph - see page 7 of Myers's paper which notes this point\n // explicitly and illustrates it with a diagram. This has major performance\n // implications for some common scenarios. For instance, to compute a diff\n // where the new text simply appends d characters on the end of the\n // original text of length n, the true Myers algorithm will take O(n+d^2)\n // time while this optimization needs only O(n+d) time.\n var minDiagonalToConsider = -Infinity,\n maxDiagonalToConsider = Infinity;\n\n // Main worker method. checks all permutations of a given edit length for acceptance.\n function execEditLength() {\n for (var diagonalPath = Math.max(minDiagonalToConsider, -editLength); diagonalPath <= Math.min(maxDiagonalToConsider, editLength); diagonalPath += 2) {\n var basePath =\n /*istanbul ignore start*/\n void 0\n /*istanbul ignore end*/\n ;\n var removePath = bestPath[diagonalPath - 1],\n addPath = bestPath[diagonalPath + 1];\n if (removePath) {\n // No one else is going to attempt to use this value, clear it\n bestPath[diagonalPath - 1] = undefined;\n }\n var canAdd = false;\n if (addPath) {\n // what newPos will be after we do an insertion:\n var addPathNewPos = addPath.oldPos - diagonalPath;\n canAdd = addPath && 0 <= addPathNewPos && addPathNewPos < newLen;\n }\n var canRemove = removePath && removePath.oldPos + 1 < oldLen;\n if (!canAdd && !canRemove) {\n // If this path is a terminal then prune\n bestPath[diagonalPath] = undefined;\n continue;\n }\n\n // Select the diagonal that we want to branch from. We select the prior\n // path whose position in the old string is the farthest from the origin\n // and does not pass the bounds of the diff graph\n if (!canRemove || canAdd && removePath.oldPos < addPath.oldPos) {\n basePath = self.addToPath(addPath, true, false, 0, options);\n } else {\n basePath = self.addToPath(removePath, false, true, 1, options);\n }\n newPos = self.extractCommon(basePath, newString, oldString, diagonalPath, options);\n if (basePath.oldPos + 1 >= oldLen && newPos + 1 >= newLen) {\n // If we have hit the end of both strings, then we are done\n return done(buildValues(self, basePath.lastComponent, newString, oldString, self.useLongestToken));\n } else {\n bestPath[diagonalPath] = basePath;\n if (basePath.oldPos + 1 >= oldLen) {\n maxDiagonalToConsider = Math.min(maxDiagonalToConsider, diagonalPath - 1);\n }\n if (newPos + 1 >= newLen) {\n minDiagonalToConsider = Math.max(minDiagonalToConsider, diagonalPath + 1);\n }\n }\n }\n editLength++;\n }\n\n // Performs the length of edit iteration. Is a bit fugly as this has to support the\n // sync and async mode which is never fun. Loops over execEditLength until a value\n // is produced, or until the edit length exceeds options.maxEditLength (if given),\n // in which case it will return undefined.\n if (callback) {\n (function exec() {\n setTimeout(function () {\n if (editLength > maxEditLength || Date.now() > abortAfterTimestamp) {\n return callback();\n }\n if (!execEditLength()) {\n exec();\n }\n }, 0);\n })();\n } else {\n while (editLength <= maxEditLength && Date.now() <= abortAfterTimestamp) {\n var ret = execEditLength();\n if (ret) {\n return ret;\n }\n }\n }\n },\n /*istanbul ignore start*/\n /*istanbul ignore end*/\n addToPath: function addToPath(path, added, removed, oldPosInc, options) {\n var last = path.lastComponent;\n if (last && !options.oneChangePerToken && last.added === added && last.removed === removed) {\n return {\n oldPos: path.oldPos + oldPosInc,\n lastComponent: {\n count: last.count + 1,\n added: added,\n removed: removed,\n previousComponent: last.previousComponent\n }\n };\n } else {\n return {\n oldPos: path.oldPos + oldPosInc,\n lastComponent: {\n count: 1,\n added: added,\n removed: removed,\n previousComponent: last\n }\n };\n }\n },\n /*istanbul ignore start*/\n /*istanbul ignore end*/\n extractCommon: function extractCommon(basePath, newString, oldString, diagonalPath, options) {\n var newLen = newString.length,\n oldLen = oldString.length,\n oldPos = basePath.oldPos,\n newPos = oldPos - diagonalPath,\n commonCount = 0;\n while (newPos + 1 < newLen && oldPos + 1 < oldLen && this.equals(oldString[oldPos + 1], newString[newPos + 1], options)) {\n newPos++;\n oldPos++;\n commonCount++;\n if (options.oneChangePerToken) {\n basePath.lastComponent = {\n count: 1,\n previousComponent: basePath.lastComponent,\n added: false,\n removed: false\n };\n }\n }\n if (commonCount && !options.oneChangePerToken) {\n basePath.lastComponent = {\n count: commonCount,\n previousComponent: basePath.lastComponent,\n added: false,\n removed: false\n };\n }\n basePath.oldPos = oldPos;\n return newPos;\n },\n /*istanbul ignore start*/\n /*istanbul ignore end*/\n equals: function equals(left, right, options) {\n if (options.comparator) {\n return options.comparator(left, right);\n } else {\n return left === right || options.ignoreCase && left.toLowerCase() === right.toLowerCase();\n }\n },\n /*istanbul ignore start*/\n /*istanbul ignore end*/\n removeEmpty: function removeEmpty(array) {\n var ret = [];\n for (var i = 0; i < array.length; i++) {\n if (array[i]) {\n ret.push(array[i]);\n }\n }\n return ret;\n },\n /*istanbul ignore start*/\n /*istanbul ignore end*/\n castInput: function castInput(value) {\n return value;\n },\n /*istanbul ignore start*/\n /*istanbul ignore end*/\n tokenize: function tokenize(value) {\n return Array.from(value);\n },\n /*istanbul ignore start*/\n /*istanbul ignore end*/\n join: function join(chars) {\n return chars.join('');\n },\n /*istanbul ignore start*/\n /*istanbul ignore end*/\n postProcess: function postProcess(changeObjects) {\n return changeObjects;\n }\n};\nfunction buildValues(diff, lastComponent, newString, oldString, useLongestToken) {\n // First we convert our linked list of components in reverse order to an\n // array in the right order:\n var components = [];\n var nextComponent;\n while (lastComponent) {\n components.push(lastComponent);\n nextComponent = lastComponent.previousComponent;\n delete lastComponent.previousComponent;\n lastComponent = nextComponent;\n }\n components.reverse();\n var componentPos = 0,\n componentLen = components.length,\n newPos = 0,\n oldPos = 0;\n for (; componentPos < componentLen; componentPos++) {\n var component = components[componentPos];\n if (!component.removed) {\n if (!component.added && useLongestToken) {\n var value = newString.slice(newPos, newPos + component.count);\n value = value.map(function (value, i) {\n var oldValue = oldString[oldPos + i];\n return oldValue.length > value.length ? oldValue : value;\n });\n component.value = diff.join(value);\n } else {\n component.value = diff.join(newString.slice(newPos, newPos + component.count));\n }\n newPos += component.count;\n\n // Common case\n if (!component.added) {\n oldPos += component.count;\n }\n } else {\n component.value = diff.join(oldString.slice(oldPos, oldPos + component.count));\n oldPos += component.count;\n }\n }\n return components;\n}\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJEaWZmIiwicHJvdG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M7TUFDcEMsQ0FBQyxNQUFNO1FBQ0xtRSxTQUFTLENBQUNuRSxLQUFLLEdBQUdYLElBQUksQ0FBQ3NFLElBQUksQ0FBQ3BFLFNBQVMsQ0FBQzZFLEtBQUssQ0FBQy9DLE1BQU0sRUFBRUEsTUFBTSxHQUFHOEMsU0FBUyxDQUFDdEIsS0FBSyxDQUFDLENBQUM7TUFDaEY7TUFDQXhCLE1BQU0sSUFBSThDLFNBQVMsQ0FBQ3RCLEtBQUs7O01BRXpCO01BQ0EsSUFBSSxDQUFDc0IsU0FBUyxDQUFDM0IsS0FBSyxFQUFFO1FBQ3BCckIsTUFBTSxJQUFJZ0QsU0FBUyxDQUFDdEIsS0FBSztNQUMzQjtJQUNGLENBQUMsTUFBTTtNQUNMc0IsU0FBUyxDQUFDbkUsS0FBSyxHQUFHWCxJQUFJLENBQUNzRSxJQUFJLENBQUNyRSxTQUFTLENBQUM4RSxLQUFLLENBQUNqRCxNQUFNLEVBQUVBLE1BQU0sR0FBR2dELFNBQVMsQ0FBQ3RCLEtBQUssQ0FBQyxDQUFDO01BQzlFMUIsTUFBTSxJQUFJZ0QsU0FBUyxDQUFDdEIsS0FBSztJQUMzQjtFQUNGO0VBRUEsT0FBT2lCLFVBQVU7QUFDbkIiLCJpZ25vcmVMaXN0IjpbXX0=\n","/*istanbul ignore start*/\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.characterDiff = void 0;\nexports.diffChars = diffChars;\n/*istanbul ignore end*/\nvar\n/*istanbul ignore start*/\n_base = _interopRequireDefault(require(\"./base\"))\n/*istanbul ignore end*/\n;\n/*istanbul ignore start*/ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n/*istanbul ignore end*/\nvar characterDiff =\n/*istanbul ignore start*/\nexports.characterDiff =\n/*istanbul ignore end*/\nnew\n/*istanbul ignore start*/\n_base\n/*istanbul ignore end*/\n[\n/*istanbul ignore start*/\n\"default\"\n/*istanbul ignore end*/\n]();\nfunction diffChars(oldStr, newStr, options) {\n return characterDiff.diff(oldStr, newStr, options);\n}\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfYmFzZSIsIl9pbnRlcm9wUmVxdWlyZURlZmF1bHQiLCJyZXF1aXJlIiwib2JqIiwiX19lc01vZHVsZSIsImNoYXJhY3RlckRpZmYiLCJleHBvcnRzIiwiRGlmZiIsImRpZmZDaGFycyIsIm9sZFN0ciIsIm5ld1N0ciIsIm9wdGlvbnMiLCJkaWZmIl0sInNvdXJjZXMiOlsiLi4vLi4vc3JjL2RpZmYvY2hhcmFjdGVyLmpzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBEaWZmIGZyb20gJy4vYmFzZSc7XG5cbmV4cG9ydCBjb25zdCBjaGFyYWN0ZXJEaWZmID0gbmV3IERpZmYoKTtcbmV4cG9ydCBmdW5jdGlvbiBkaWZmQ2hhcnMob2xkU3RyLCBuZXdTdHIsIG9wdGlvbnMpIHsgcmV0dXJuIGNoYXJhY3RlckRpZmYuZGlmZihvbGRTdHIsIG5ld1N0ciwgb3B0aW9ucyk7IH1cbiJdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7O0FBQUE7QUFBQTtBQUFBQSxLQUFBLEdBQUFDLHNCQUFBLENBQUFDLE9BQUE7QUFBQTtBQUFBO0FBQTBCLG1DQUFBRCx1QkFBQUUsR0FBQSxXQUFBQSxHQUFBLElBQUFBLEdBQUEsQ0FBQUMsVUFBQSxHQUFBRCxHQUFBLGdCQUFBQSxHQUFBO0FBQUE7QUFFbkIsSUFBTUUsYUFBYTtBQUFBO0FBQUFDLE9BQUEsQ0FBQUQsYUFBQTtBQUFBO0FBQUc7QUFBSUU7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUEsQ0FBSSxDQUFDLENBQUM7QUFDaEMsU0FBU0MsU0FBU0EsQ0FBQ0MsTUFBTSxFQUFFQyxNQUFNLEVBQUVDLE9BQU8sRUFBRTtFQUFFLE9BQU9OLGFBQWEsQ0FBQ08sSUFBSSxDQUFDSCxNQUFNLEVBQUVDLE1BQU0sRUFBRUMsT0FBTyxDQUFDO0FBQUUiLCJpZ25vcmVMaXN0IjpbXX0=\n","/*istanbul ignore start*/\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.hasOnlyUnixLineEndings = hasOnlyUnixLineEndings;\nexports.hasOnlyWinLineEndings = hasOnlyWinLineEndings;\nexports.longestCommonPrefix = longestCommonPrefix;\nexports.longestCommonSuffix = longestCommonSuffix;\nexports.maximumOverlap = maximumOverlap;\nexports.removePrefix = removePrefix;\nexports.removeSuffix = removeSuffix;\nexports.replacePrefix = replacePrefix;\nexports.replaceSuffix = replaceSuffix;\n/*istanbul ignore end*/\nfunction longestCommonPrefix(str1, str2) {\n var i;\n for (i = 0; i < str1.length && i < str2.length; i++) {\n if (str1[i] != str2[i]) {\n return str1.slice(0, i);\n }\n }\n return str1.slice(0, i);\n}\nfunction longestCommonSuffix(str1, str2) {\n var i;\n\n // Unlike longestCommonPrefix, we need a special case to handle all scenarios\n // where we return the empty string since str1.slice(-0) will return the\n // entire string.\n if (!str1 || !str2 || str1[str1.length - 1] != str2[str2.length - 1]) {\n return '';\n }\n for (i = 0; i < str1.length && i < str2.length; i++) {\n if (str1[str1.length - (i + 1)] != str2[str2.length - (i + 1)]) {\n return str1.slice(-i);\n }\n }\n return str1.slice(-i);\n}\nfunction replacePrefix(string, oldPrefix, newPrefix) {\n if (string.slice(0, oldPrefix.length) != oldPrefix) {\n throw Error(\n /*istanbul ignore start*/\n \"string \".concat(\n /*istanbul ignore end*/\n JSON.stringify(string), \" doesn't start with prefix \").concat(JSON.stringify(oldPrefix), \"; this is a bug\"));\n }\n return newPrefix + string.slice(oldPrefix.length);\n}\nfunction replaceSuffix(string, oldSuffix, newSuffix) {\n if (!oldSuffix) {\n return string + newSuffix;\n }\n if (string.slice(-oldSuffix.length) != oldSuffix) {\n throw Error(\n /*istanbul ignore start*/\n \"string \".concat(\n /*istanbul ignore end*/\n JSON.stringify(string), \" doesn't end with suffix \").concat(JSON.stringify(oldSuffix), \"; this is a bug\"));\n }\n return string.slice(0, -oldSuffix.length) + newSuffix;\n}\nfunction removePrefix(string, oldPrefix) {\n return replacePrefix(string, oldPrefix, '');\n}\nfunction removeSuffix(string, oldSuffix) {\n return replaceSuffix(string, oldSuffix, '');\n}\nfunction maximumOverlap(string1, string2) {\n return string2.slice(0, overlapCount(string1, string2));\n}\n\n// Nicked from https://stackoverflow.com/a/60422853/1709587\nfunction overlapCount(a, b) {\n // Deal with cases where the strings differ in length\n var startA = 0;\n if (a.length > b.length) {\n startA = a.length - b.length;\n }\n var endB = b.length;\n if (a.length < b.length) {\n endB = a.length;\n }\n // Create a back-reference for each index\n // that should be followed in case of a mismatch.\n // We only need B to make these references:\n var map = Array(endB);\n var k = 0; // Index that lags behind j\n map[0] = 0;\n for (var j = 1; j < endB; j++) {\n if (b[j] == b[k]) {\n map[j] = map[k]; // skip over the same character (optional optimisation)\n } else {\n map[j] = k;\n }\n while (k > 0 && b[j] != b[k]) {\n k = map[k];\n }\n if (b[j] == b[k]) {\n k++;\n }\n }\n // Phase 2: use these references while iterating over A\n k = 0;\n for (var i = startA; i < a.length; i++) {\n while (k > 0 && a[i] != b[k]) {\n k = map[k];\n }\n if (a[i] == b[k]) {\n k++;\n }\n }\n return k;\n}\n\n/**\n * Returns true if the string consistently uses Windows line endings.\n */\nfunction hasOnlyWinLineEndings(string) {\n return string.includes('\\r\\n') && !string.startsWith('\\n') && !string.match(/[^\\r]\\n/);\n}\n\n/**\n * Returns true if the string consistently uses Unix line endings.\n */\nfunction hasOnlyUnixLineEndings(string) {\n return !string.includes('\\r\\n') && string.includes('\\n');\n}\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJsb25nZXN0Q29tbW9uU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0EsT0FBT0EsQ0FBQztBQUNWOztBQUdBO0FBQ0E7QUFDQTtBQUNPLFNBQVNFLHFCQUFxQkEsQ0FBQ3hCLE1BQU0sRUFBRTtFQUM1QyxPQUFPQSxNQUFNLENBQUN5QixRQUFRLENBQUMsTUFBTSxDQUFDLElBQUksQ0FBQ3pCLE1BQU0sQ0FBQzBCLFVBQVUsQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDMUIsTUFBTSxDQUFDMkIsS0FBSyxDQUFDLFNBQVMsQ0FBQztBQUN4Rjs7QUFFQTtBQUNBO0FBQ0E7QUFDTyxTQUFTQyxzQkFBc0JBLENBQUM1QixNQUFNLEVBQUU7RUFDN0MsT0FBTyxDQUFDQSxNQUFNLENBQUN5QixRQUFRLENBQUMsTUFBTSxDQUFDLElBQUl6QixNQUFNLENBQUN5QixRQUFRLENBQUMsSUFBSSxDQUFDO0FBQzFEIiwiaWdub3JlTGlzdCI6W119\n","/*istanbul ignore start*/\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.diffWords = diffWords;\nexports.diffWordsWithSpace = diffWordsWithSpace;\nexports.wordWithSpaceDiff = exports.wordDiff = void 0;\n/*istanbul ignore end*/\nvar\n/*istanbul ignore start*/\n_base = _interopRequireDefault(require(\"./base\"))\n/*istanbul ignore end*/\n;\nvar\n/*istanbul ignore start*/\n_string = require(\"../util/string\")\n/*istanbul ignore end*/\n;\n/*istanbul ignore start*/ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n/*istanbul ignore end*/\n// Based on https://en.wikipedia.org/wiki/Latin_script_in_Unicode\n//\n// Ranges and exceptions:\n// Latin-1 Supplement, 0080–00FF\n// - U+00D7 × Multiplication sign\n// - U+00F7 ÷ Division sign\n// Latin Extended-A, 0100–017F\n// Latin Extended-B, 0180–024F\n// IPA Extensions, 0250–02AF\n// Spacing Modifier Letters, 02B0–02FF\n// - U+02C7 ˇ ˇ Caron\n// - U+02D8 ˘ ˘ Breve\n// - U+02D9 ˙ ˙ Dot Above\n// - U+02DA ˚ ˚ Ring Above\n// - U+02DB ˛ ˛ Ogonek\n// - U+02DC ˜ ˜ Small Tilde\n// - U+02DD ˝ ˝ Double Acute Accent\n// Latin Extended Additional, 1E00–1EFF\nvar extendedWordChars = \"a-zA-Z0-9_\\\\u{C0}-\\\\u{FF}\\\\u{D8}-\\\\u{F6}\\\\u{F8}-\\\\u{2C6}\\\\u{2C8}-\\\\u{2D7}\\\\u{2DE}-\\\\u{2FF}\\\\u{1E00}-\\\\u{1EFF}\";\n\n// Each token is one of the following:\n// - A punctuation mark plus the surrounding whitespace\n// - A word plus the surrounding whitespace\n// - Pure whitespace (but only in the special case where this the entire text\n// is just whitespace)\n//\n// We have to include surrounding whitespace in the tokens because the two\n// alternative approaches produce horribly broken results:\n// * If we just discard the whitespace, we can't fully reproduce the original\n// text from the sequence of tokens and any attempt to render the diff will\n// get the whitespace wrong.\n// * If we have separate tokens for whitespace, then in a typical text every\n// second token will be a single space character. But this often results in\n// the optimal diff between two texts being a perverse one that preserves\n// the spaces between words but deletes and reinserts actual common words.\n// See https://github.com/kpdecker/jsdiff/issues/160#issuecomment-1866099640\n// for an example.\n//\n// Keeping the surrounding whitespace of course has implications for .equals\n// and .join, not just .tokenize.\n\n// This regex does NOT fully implement the tokenization rules described above.\n// Instead, it gives runs of whitespace their own \"token\". The tokenize method\n// then handles stitching whitespace tokens onto adjacent word or punctuation\n// tokens.\nvar tokenizeIncludingWhitespace = new RegExp(\n/*istanbul ignore start*/\n\"[\".concat(\n/*istanbul ignore end*/\nextendedWordChars, \"]+|\\\\s+|[^\").concat(extendedWordChars, \"]\"), 'ug');\nvar wordDiff =\n/*istanbul ignore start*/\nexports.wordDiff =\n/*istanbul ignore end*/\nnew\n/*istanbul ignore start*/\n_base\n/*istanbul ignore end*/\n[\n/*istanbul ignore start*/\n\"default\"\n/*istanbul ignore end*/\n]();\nwordDiff.equals = function (left, right, options) {\n if (options.ignoreCase) {\n left = left.toLowerCase();\n right = right.toLowerCase();\n }\n return left.trim() === right.trim();\n};\nwordDiff.tokenize = function (value) {\n /*istanbul ignore start*/\n var\n /*istanbul ignore end*/\n options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var parts;\n if (options.intlSegmenter) {\n if (options.intlSegmenter.resolvedOptions().granularity != 'word') {\n throw new Error('The segmenter passed must have a granularity of \"word\"');\n }\n parts = Array.from(options.intlSegmenter.segment(value), function (segment)\n /*istanbul ignore start*/\n {\n return (\n /*istanbul ignore end*/\n segment.segment\n );\n });\n } else {\n parts = value.match(tokenizeIncludingWhitespace) || [];\n }\n var tokens = [];\n var prevPart = null;\n parts.forEach(function (part) {\n if (/\\s/.test(part)) {\n if (prevPart == null) {\n tokens.push(part);\n } else {\n tokens.push(tokens.pop() + part);\n }\n } else if (/\\s/.test(prevPart)) {\n if (tokens[tokens.length - 1] == prevPart) {\n tokens.push(tokens.pop() + part);\n } else {\n tokens.push(prevPart + part);\n }\n } else {\n tokens.push(part);\n }\n prevPart = part;\n });\n return tokens;\n};\nwordDiff.join = function (tokens) {\n // Tokens being joined here will always have appeared consecutively in the\n // same text, so we can simply strip off the leading whitespace from all the\n // tokens except the first (and except any whitespace-only tokens - but such\n // a token will always be the first and only token anyway) and then join them\n // and the whitespace around words and punctuation will end up correct.\n return tokens.map(function (token, i) {\n if (i == 0) {\n return token;\n } else {\n return token.replace(/^\\s+/, '');\n }\n }).join('');\n};\nwordDiff.postProcess = function (changes, options) {\n if (!changes || options.oneChangePerToken) {\n return changes;\n }\n var lastKeep = null;\n // Change objects representing any insertion or deletion since the last\n // \"keep\" change object. There can be at most one of each.\n var insertion = null;\n var deletion = null;\n changes.forEach(function (change) {\n if (change.added) {\n insertion = change;\n } else if (change.removed) {\n deletion = change;\n } else {\n if (insertion || deletion) {\n // May be false at start of text\n dedupeWhitespaceInChangeObjects(lastKeep, deletion, insertion, change);\n }\n lastKeep = change;\n insertion = null;\n deletion = null;\n }\n });\n if (insertion || deletion) {\n dedupeWhitespaceInChangeObjects(lastKeep, deletion, insertion, null);\n }\n return changes;\n};\nfunction diffWords(oldStr, newStr, options) {\n // This option has never been documented and never will be (it's clearer to\n // just call `diffWordsWithSpace` directly if you need that behavior), but\n // has existed in jsdiff for a long time, so we retain support for it here\n // for the sake of backwards compatibility.\n if (\n /*istanbul ignore start*/\n (\n /*istanbul ignore end*/\n options === null || options === void 0 ? void 0 : options.ignoreWhitespace) != null && !options.ignoreWhitespace) {\n return diffWordsWithSpace(oldStr, newStr, options);\n }\n return wordDiff.diff(oldStr, newStr, options);\n}\nfunction dedupeWhitespaceInChangeObjects(startKeep, deletion, insertion, endKeep) {\n // Before returning, we tidy up the leading and trailing whitespace of the\n // change objects to eliminate cases where trailing whitespace in one object\n // is repeated as leading whitespace in the next.\n // Below are examples of the outcomes we want here to explain the code.\n // I=insert, K=keep, D=delete\n // 1. diffing 'foo bar baz' vs 'foo baz'\n // Prior to cleanup, we have K:'foo ' D:' bar ' K:' baz'\n // After cleanup, we want: K:'foo ' D:'bar ' K:'baz'\n //\n // 2. Diffing 'foo bar baz' vs 'foo qux baz'\n // Prior to cleanup, we have K:'foo ' D:' bar ' I:' qux ' K:' baz'\n // After cleanup, we want K:'foo ' D:'bar' I:'qux' K:' baz'\n //\n // 3. Diffing 'foo\\nbar baz' vs 'foo baz'\n // Prior to cleanup, we have K:'foo ' D:'\\nbar ' K:' baz'\n // After cleanup, we want K'foo' D:'\\nbar' K:' baz'\n //\n // 4. Diffing 'foo baz' vs 'foo\\nbar baz'\n // Prior to cleanup, we have K:'foo\\n' I:'\\nbar ' K:' baz'\n // After cleanup, we ideally want K'foo' I:'\\nbar' K:' baz'\n // but don't actually manage this currently (the pre-cleanup change\n // objects don't contain enough information to make it possible).\n //\n // 5. Diffing 'foo bar baz' vs 'foo baz'\n // Prior to cleanup, we have K:'foo ' D:' bar ' K:' baz'\n // After cleanup, we want K:'foo ' D:' bar ' K:'baz'\n //\n // Our handling is unavoidably imperfect in the case where there's a single\n // indel between keeps and the whitespace has changed. For instance, consider\n // diffing 'foo\\tbar\\nbaz' vs 'foo baz'. Unless we create an extra change\n // object to represent the insertion of the space character (which isn't even\n // a token), we have no way to avoid losing information about the texts'\n // original whitespace in the result we return. Still, we do our best to\n // output something that will look sensible if we e.g. print it with\n // insertions in green and deletions in red.\n\n // Between two \"keep\" change objects (or before the first or after the last\n // change object), we can have either:\n // * A \"delete\" followed by an \"insert\"\n // * Just an \"insert\"\n // * Just a \"delete\"\n // We handle the three cases separately.\n if (deletion && insertion) {\n var oldWsPrefix = deletion.value.match(/^\\s*/)[0];\n var oldWsSuffix = deletion.value.match(/\\s*$/)[0];\n var newWsPrefix = insertion.value.match(/^\\s*/)[0];\n var newWsSuffix = insertion.value.match(/\\s*$/)[0];\n if (startKeep) {\n var commonWsPrefix =\n /*istanbul ignore start*/\n (0,\n /*istanbul ignore end*/\n /*istanbul ignore start*/\n _string\n /*istanbul ignore end*/\n .\n /*istanbul ignore start*/\n longestCommonPrefix)\n /*istanbul ignore end*/\n (oldWsPrefix, newWsPrefix);\n startKeep.value =\n /*istanbul ignore start*/\n (0,\n /*istanbul ignore end*/\n /*istanbul ignore start*/\n _string\n /*istanbul ignore end*/\n .\n /*istanbul ignore start*/\n replaceSuffix)\n /*istanbul ignore end*/\n (startKeep.value, newWsPrefix, commonWsPrefix);\n deletion.value =\n /*istanbul ignore start*/\n (0,\n /*istanbul ignore end*/\n /*istanbul ignore start*/\n _string\n /*istanbul ignore end*/\n .\n /*istanbul ignore start*/\n removePrefix)\n /*istanbul ignore end*/\n (deletion.value, commonWsPrefix);\n insertion.value =\n /*istanbul ignore start*/\n (0,\n /*istanbul ignore end*/\n /*istanbul ignore start*/\n _string\n /*istanbul ignore end*/\n .\n /*istanbul ignore start*/\n removePrefix)\n /*istanbul ignore end*/\n (insertion.value, commonWsPrefix);\n }\n if (endKeep) {\n var commonWsSuffix =\n /*istanbul ignore start*/\n (0,\n /*istanbul ignore end*/\n /*istanbul ignore start*/\n _string\n /*istanbul ignore end*/\n .\n /*istanbul ignore start*/\n longestCommonSuffix)\n /*istanbul ignore end*/\n (oldWsSuffix, newWsSuffix);\n endKeep.value =\n /*istanbul ignore start*/\n (0,\n /*istanbul ignore end*/\n /*istanbul ignore start*/\n _string\n /*istanbul ignore end*/\n .\n /*istanbul ignore start*/\n replacePrefix)\n /*istanbul ignore end*/\n (endKeep.value, newWsSuffix, commonWsSuffix);\n deletion.value =\n /*istanbul ignore start*/\n (0,\n /*istanbul ignore end*/\n /*istanbul ignore start*/\n _string\n /*istanbul ignore end*/\n .\n /*istanbul ignore start*/\n removeSuffix)\n /*istanbul ignore end*/\n (deletion.value, commonWsSuffix);\n insertion.value =\n /*istanbul ignore start*/\n (0,\n /*istanbul ignore end*/\n /*istanbul ignore start*/\n _string\n /*istanbul ignore end*/\n .\n /*istanbul ignore start*/\n removeSuffix)\n /*istanbul ignore end*/\n (insertion.value, commonWsSuffix);\n }\n } else if (insertion) {\n // The whitespaces all reflect what was in the new text rather than\n // the old, so we essentially have no information about whitespace\n // insertion or deletion. We just want to dedupe the whitespace.\n // We do that by having each change object keep its trailing\n // whitespace and deleting duplicate leading whitespace where\n // present.\n if (startKeep) {\n insertion.value = insertion.value.replace(/^\\s*/, '');\n }\n if (endKeep) {\n endKeep.value = endKeep.value.replace(/^\\s*/, '');\n }\n // otherwise we've got a deletion and no insertion\n } else if (startKeep && endKeep) {\n var newWsFull = endKeep.value.match(/^\\s*/)[0],\n delWsStart = deletion.value.match(/^\\s*/)[0],\n delWsEnd = deletion.value.match(/\\s*$/)[0];\n\n // Any whitespace that comes straight after startKeep in both the old and\n // new texts, assign to startKeep and remove from the deletion.\n var newWsStart =\n /*istanbul ignore start*/\n (0,\n /*istanbul ignore end*/\n /*istanbul ignore start*/\n _string\n /*istanbul ignore end*/\n .\n /*istanbul ignore start*/\n longestCommonPrefix)\n /*istanbul ignore end*/\n (newWsFull, delWsStart);\n deletion.value =\n /*istanbul ignore start*/\n (0,\n /*istanbul ignore end*/\n /*istanbul ignore start*/\n _string\n /*istanbul ignore end*/\n .\n /*istanbul ignore start*/\n removePrefix)\n /*istanbul ignore end*/\n (deletion.value, newWsStart);\n\n // Any whitespace that comes straight before endKeep in both the old and\n // new texts, and hasn't already been assigned to startKeep, assign to\n // endKeep and remove from the deletion.\n var newWsEnd =\n /*istanbul ignore start*/\n (0,\n /*istanbul ignore end*/\n /*istanbul ignore start*/\n _string\n /*istanbul ignore end*/\n .\n /*istanbul ignore start*/\n longestCommonSuffix)\n /*istanbul ignore end*/\n (\n /*istanbul ignore start*/\n (0,\n /*istanbul ignore end*/\n /*istanbul ignore start*/\n _string\n /*istanbul ignore end*/\n .\n /*istanbul ignore start*/\n removePrefix)\n /*istanbul ignore end*/\n (newWsFull, newWsStart), delWsEnd);\n deletion.value =\n /*istanbul ignore start*/\n (0,\n /*istanbul ignore end*/\n /*istanbul ignore start*/\n _string\n /*istanbul ignore end*/\n .\n /*istanbul ignore start*/\n removeSuffix)\n /*istanbul ignore end*/\n (deletion.value, newWsEnd);\n endKeep.value =\n /*istanbul ignore start*/\n (0,\n /*istanbul ignore end*/\n /*istanbul ignore start*/\n _string\n /*istanbul ignore end*/\n .\n /*istanbul ignore start*/\n replacePrefix)\n /*istanbul ignore end*/\n (endKeep.value, newWsFull, newWsEnd);\n\n // If there's any whitespace from the new text that HASN'T already been\n // assigned, assign it to the start:\n startKeep.value =\n /*istanbul ignore start*/\n (0,\n /*istanbul ignore end*/\n /*istanbul ignore start*/\n _string\n /*istanbul ignore end*/\n .\n /*istanbul ignore start*/\n replaceSuffix)\n /*istanbul ignore end*/\n (startKeep.value, newWsFull, newWsFull.slice(0, newWsFull.length - newWsEnd.length));\n } else if (endKeep) {\n // We are at the start of the text. Preserve all the whitespace on\n // endKeep, and just remove whitespace from the end of deletion to the\n // extent that it overlaps with the start of endKeep.\n var endKeepWsPrefix = endKeep.value.match(/^\\s*/)[0];\n var deletionWsSuffix = deletion.value.match(/\\s*$/)[0];\n var overlap =\n /*istanbul ignore start*/\n (0,\n /*istanbul ignore end*/\n /*istanbul ignore start*/\n _string\n /*istanbul ignore end*/\n .\n /*istanbul ignore start*/\n maximumOverlap)\n /*istanbul ignore end*/\n (deletionWsSuffix, endKeepWsPrefix);\n deletion.value =\n /*istanbul ignore start*/\n (0,\n /*istanbul ignore end*/\n /*istanbul ignore start*/\n _string\n /*istanbul ignore end*/\n .\n /*istanbul ignore start*/\n removeSuffix)\n /*istanbul ignore end*/\n (deletion.value, overlap);\n } else if (startKeep) {\n // We are at the END of the text. Preserve all the whitespace on\n // startKeep, and just remove whitespace from the start of deletion to\n // the extent that it overlaps with the end of startKeep.\n var startKeepWsSuffix = startKeep.value.match(/\\s*$/)[0];\n var deletionWsPrefix = deletion.value.match(/^\\s*/)[0];\n var _overlap =\n /*istanbul ignore start*/\n (0,\n /*istanbul ignore end*/\n /*istanbul ignore start*/\n _string\n /*istanbul ignore end*/\n .\n /*istanbul ignore start*/\n maximumOverlap)\n /*istanbul ignore end*/\n (startKeepWsSuffix, deletionWsPrefix);\n deletion.value =\n /*istanbul ignore start*/\n (0,\n /*istanbul ignore end*/\n /*istanbul ignore start*/\n _string\n /*istanbul ignore end*/\n .\n /*istanbul ignore start*/\n removePrefix)\n /*istanbul ignore end*/\n (deletion.value, _overlap);\n }\n}\nvar wordWithSpaceDiff =\n/*istanbul ignore start*/\nexports.wordWithSpaceDiff =\n/*istanbul ignore end*/\nnew\n/*istanbul ignore start*/\n_base\n/*istanbul ignore end*/\n[\n/*istanbul ignore start*/\n\"default\"\n/*istanbul ignore end*/\n]();\nwordWithSpaceDiff.tokenize = function (value) {\n // Slightly different to the tokenizeIncludingWhitespace regex used above in\n // that this one treats each individual newline as a distinct tokens, rather\n // than merging them into other surrounding whitespace. This was requested\n // in https://github.com/kpdecker/jsdiff/issues/180 &\n // https://github.com/kpdecker/jsdiff/issues/211\n var regex = new RegExp(\n /*istanbul ignore start*/\n \"(\\\\r?\\\\n)|[\".concat(\n /*istanbul ignore end*/\n extendedWordChars, \"]+|[^\\\\S\\\\n\\\\r]+|[^\").concat(extendedWordChars, \"]\"), 'ug');\n return value.match(regex) || [];\n};\nfunction diffWordsWithSpace(oldStr, newStr, options) {\n return wordWithSpaceDiff.diff(oldStr, newStr, options);\n}\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfYmFzZSIsIl9pbnRlcm9wUmVxdWlyZURlZmF1bHQiLCJyZXF1aXJlIiwiX3N0cmluZyIsIm9iaiIsIl9fZXNNb2R1bGUiLCJleHRlbmRlZFdvcmRDaGFycyIsInRva2VuaXplSW5jbHVkaW5nV2hpdGVzcGFjZSIsIlJlZ0V4cCIsImNvbmNhdCIsIndvcmREaWZmIiwiZXhwb3J0cyIsIkRpZmYiLCJlcXVhbHMiLCJsZWZ0IiwicmlnaHQiLCJvcHRpb25zIiwiaWdub3JlQ2FzZSIsInRvTG93ZXJDYXNlIiwidHJpbSIsInRva2VuaXplIiwidmFsdWUiLCJhcmd1bWVudHMiLCJsZW5ndGgiLCJ1bmRlZmluZWQiLCJwYXJ0cyIsImludGxTZWdtZW50ZXIiLCJyZXNvbHZlZE9wdGlvbnMiLCJncmFudWxhcml0eSIsIkVycm9yIiwiQXJyYXkiLCJmcm9tIiwic2VnbWVudCIsIm1hdGNoIiwidG9rZW5zIiwicHJldlBhcnQiLCJmb3JFYWNoIiwicGFydCIsInRlc3QiLCJwdXNoIiwicG9wIiwiam9pbiIsIm1hcCIsInRva2VuIiwiaSIsInJlcGxhY2UiLCJwb3N0UHJvY2VzcyIsImNoYW5nZXMiLCJvbmVDaGFuZ2VQZXJUb2tlbiIsImxhc3RLZWVwIiwiaW5zZXJ0aW9uIiwiZGVsZXRpb24iLCJjaGFuZ2UiLCJhZGRlZCIsInJlbW92ZWQiLCJkZWR1cGVXaGl0ZXNwYWNlSW5DaGFuZ2VPYmplY3RzIiwiZGlmZldvcmRzIiwib2xkU3RyIiw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UVDLGdCQUFnQixDQUFDO0lBQ25FcEMsUUFBUSxDQUFDOUIsS0FBSztJQUFHO0lBQUE7SUFBQTtJQUFBa0Q7SUFBQUE7SUFBQUE7SUFBQUE7SUFBQUE7SUFBQUEsWUFBWTtJQUFBO0lBQUEsQ0FBQ3BCLFFBQVEsQ0FBQzlCLEtBQUssRUFBRStELFFBQU8sQ0FBQztFQUN4RDtBQUNGO0FBR08sSUFBTUksaUJBQWlCO0FBQUE7QUFBQTdFLE9BQUEsQ0FBQTZFLGlCQUFBO0FBQUE7QUFBRztBQUFJNUU7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUEsQ0FBSSxDQUFDLENBQUM7QUFDM0M0RSxpQkFBaUIsQ0FBQ3BFLFFBQVEsR0FBRyxVQUFTQyxLQUFLLEVBQUU7RUFDM0M7RUFDQTtFQUNBO0VBQ0E7RUFDQTtFQUNBLElBQU1vRSxLQUFLLEdBQUcsSUFBSWpGLE1BQU07RUFBQTtFQUFBLGNBQUFDLE1BQUE7RUFBQTtFQUFlSCxpQkFBaUIseUJBQUFHLE1BQUEsQ0FBc0JILGlCQUFpQixRQUFLLElBQUksQ0FBQztFQUN6RyxPQUFPZSxLQUFLLENBQUNZLEtBQUssQ0FBQ3dELEtBQUssQ0FBQyxJQUFJLEVBQUU7QUFDakMsQ0FBQztBQUNNLFNBQVM3QixrQkFBa0JBLENBQUNILE1BQU0sRUFBRUMsTUFBTSxFQUFFMUMsT0FBTyxFQUFFO0VBQzFELE9BQU93RSxpQkFBaUIsQ0FBQzNCLElBQUksQ0FBQ0osTUFBTSxFQUFFQyxNQUFNLEVBQUUxQyxPQUFPLENBQUM7QUFDeEQiLCJpZ25vcmVMaXN0IjpbXX0=\n","/*istanbul ignore start*/\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.generateOptions = generateOptions;\n/*istanbul ignore end*/\nfunction generateOptions(options, defaults) {\n if (typeof options === 'function') {\n defaults.callback = options;\n } else if (options) {\n for (var name in options) {\n /* istanbul ignore else */\n if (options.hasOwnProperty(name)) {\n defaults[name] = options[name];\n }\n }\n }\n return defaults;\n}\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJnZW5lcmF0ZU9wdGlvbnMiLCJvcHRpb25zIiwiZGVmYXVsdHMiLCJjYWxsYmFjayIsIm5hbWUiLCJoYXNPd25Qcm9wZXJ0eSJdLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy91dGlsL3BhcmFtcy5qcyJdLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgZnVuY3Rpb24gZ2VuZXJhdGVPcHRpb25zKG9wdGlvbnMsIGRlZmF1bHRzKSB7XG4gIGlmICh0eXBlb2Ygb3B0aW9ucyA9PT0gJ2Z1bmN0aW9uJykge1xuICAgIGRlZmF1bHRzLmNhbGxiYWNrID0gb3B0aW9ucztcbiAgfSBlbHNlIGlmIChvcHRpb25zKSB7XG4gICAgZm9yIChsZXQgbmFtZSBpbiBvcHRpb25zKSB7XG4gICAgICAvKiBpc3RhbmJ1bCBpZ25vcmUgZWxzZSAqL1xuICAgICAgaWYgKG9wdGlvbnMuaGFzT3duUHJvcGVydHkobmFtZSkpIHtcbiAgICAgICAgZGVmYXVsdHNbbmFtZV0gPSBvcHRpb25zW25hbWVdO1xuICAgICAgfVxuICAgIH1cbiAgfVxuICByZXR1cm4gZGVmYXVsdHM7XG59XG4iXSwibWFwcGluZ3MiOiI7Ozs7Ozs7O0FBQU8sU0FBU0EsZUFBZUEsQ0FBQ0MsT0FBTyxFQUFFQyxRQUFRLEVBQUU7RUFDakQsSUFBSSxPQUFPRCxPQUFPLEtBQUssVUFBVSxFQUFFO0lBQ2pDQyxRQUFRLENBQUNDLFFBQVEsR0FBR0YsT0FBTztFQUM3QixDQUFDLE1BQU0sSUFBSUEsT0FBTyxFQUFFO0lBQ2xCLEtBQUssSUFBSUcsSUFBSSxJQUFJSCxPQUFPLEVBQUU7TUFDeEI7TUFDQSxJQUFJQSxPQUFPLENBQUNJLGNBQWMsQ0FBQ0QsSUFBSSxDQUFDLEVBQUU7UUFDaENGLFFBQVEsQ0FBQ0UsSUFBSSxDQUFDLEdBQUdILE9BQU8sQ0FBQ0csSUFBSSxDQUFDO01BQ2hDO0lBQ0Y7RUFDRjtFQUNBLE9BQU9GLFFBQVE7QUFDakIiLCJpZ25vcmVMaXN0IjpbXX0=\n","/*istanbul ignore start*/\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.diffLines = diffLines;\nexports.diffTrimmedLines = diffTrimmedLines;\nexports.lineDiff = void 0;\n/*istanbul ignore end*/\nvar\n/*istanbul ignore start*/\n_base = _interopRequireDefault(require(\"./base\"))\n/*istanbul ignore end*/\n;\nvar\n/*istanbul ignore start*/\n_params = require(\"../util/params\")\n/*istanbul ignore end*/\n;\n/*istanbul ignore start*/ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n/*istanbul ignore end*/\nvar lineDiff =\n/*istanbul ignore start*/\nexports.lineDiff =\n/*istanbul ignore end*/\nnew\n/*istanbul ignore start*/\n_base\n/*istanbul ignore end*/\n[\n/*istanbul ignore start*/\n\"default\"\n/*istanbul ignore end*/\n]();\nlineDiff.tokenize = function (value, options) {\n if (options.stripTrailingCr) {\n // remove one \\r before \\n to match GNU diff's --strip-trailing-cr behavior\n value = value.replace(/\\r\\n/g, '\\n');\n }\n var retLines = [],\n linesAndNewlines = value.split(/(\\n|\\r\\n)/);\n\n // Ignore the final empty token that occurs if the string ends with a new line\n if (!linesAndNewlines[linesAndNewlines.length - 1]) {\n linesAndNewlines.pop();\n }\n\n // Merge the content and line separators into single tokens\n for (var i = 0; i < linesAndNewlines.length; i++) {\n var line = linesAndNewlines[i];\n if (i % 2 && !options.newlineIsToken) {\n retLines[retLines.length - 1] += line;\n } else {\n retLines.push(line);\n }\n }\n return retLines;\n};\nlineDiff.equals = function (left, right, options) {\n // If we're ignoring whitespace, we need to normalise lines by stripping\n // whitespace before checking equality. (This has an annoying interaction\n // with newlineIsToken that requires special handling: if newlines get their\n // own token, then we DON'T want to trim the *newline* tokens down to empty\n // strings, since this would cause us to treat whitespace-only line content\n // as equal to a separator between lines, which would be weird and\n // inconsistent with the documented behavior of the options.)\n if (options.ignoreWhitespace) {\n if (!options.newlineIsToken || !left.includes('\\n')) {\n left = left.trim();\n }\n if (!options.newlineIsToken || !right.includes('\\n')) {\n right = right.trim();\n }\n } else if (options.ignoreNewlineAtEof && !options.newlineIsToken) {\n if (left.endsWith('\\n')) {\n left = left.slice(0, -1);\n }\n if (right.endsWith('\\n')) {\n right = right.slice(0, -1);\n }\n }\n return (\n /*istanbul ignore start*/\n _base\n /*istanbul ignore end*/\n [\n /*istanbul ignore start*/\n \"default\"\n /*istanbul ignore end*/\n ].prototype.equals.call(this, left, right, options)\n );\n};\nfunction diffLines(oldStr, newStr, callback) {\n return lineDiff.diff(oldStr, newStr, callback);\n}\n\n// Kept for backwards compatibility. This is a rather arbitrary wrapper method\n// that just calls `diffLines` with `ignoreWhitespace: true`. It's confusing to\n// have two ways to do exactly the same thing in the API, so we no longer\n// document this one (library users should explicitly use `diffLines` with\n// `ignoreWhitespace: true` instead) but we keep it around to maintain\n// compatibility with code that used old versions.\nfunction diffTrimmedLines(oldStr, newStr, callback) {\n var options =\n /*istanbul ignore start*/\n (0,\n /*istanbul ignore end*/\n /*istanbul ignore start*/\n _params\n /*istanbul ignore end*/\n .\n /*istanbul ignore start*/\n generateOptions)\n /*istanbul ignore end*/\n (callback, {\n ignoreWhitespace: true\n });\n return lineDiff.diff(oldStr, newStr, options);\n}\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfYmFzZSIsIl9pbnRlcm9wUmVxdWlyZURlZmF1bHQiLCJyZXF1aXJlIiwiX3BhcmFtcyIsIm9iaiIsIl9fZXNNb2R1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"__esModule\", {\n value: true\n});\nexports.diffSentences = diffSentences;\nexports.sentenceDiff = void 0;\n/*istanbul ignore end*/\nvar\n/*istanbul ignore start*/\n_base = _interopRequireDefault(require(\"./base\"))\n/*istanbul ignore end*/\n;\n/*istanbul ignore start*/ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n/*istanbul ignore end*/\nvar sentenceDiff =\n/*istanbul ignore start*/\nexports.sentenceDiff =\n/*istanbul ignore end*/\nnew\n/*istanbul ignore start*/\n_base\n/*istanbul ignore end*/\n[\n/*istanbul ignore start*/\n\"default\"\n/*istanbul ignore end*/\n]();\nsentenceDiff.tokenize = function (value) {\n return value.split(/(\\S.+?[.!?])(?=\\s+|$)/);\n};\nfunction diffSentences(oldStr, newStr, callback) {\n return sentenceDiff.diff(oldStr, newStr, callback);\n}\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfYmFzZSIsIl9pbnRlcm9wUmVxdWlyZURlZmF1bHQiLCJyZXF1aXJlIiwib2JqIiwiX19lc01vZHVsZSIsInNlbnRlbmNlRGlmZiIsImV4cG9ydHMiLCJEaWZmIiwidG9rZW5pemUiLCJ2YWx1ZSIsInNwbGl0IiwiZGlmZlNlbnRlbmNlcyIsIm9sZFN0ciIsIm5ld1N0ciIsImNhbGxiYWNrIiwiZGlmZiJdLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9kaWZmL3NlbnRlbmNlLmpzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBEaWZmIGZyb20gJy4vYmFzZSc7XG5cblxuZXhwb3J0IGNvbnN0IHNlbnRlbmNlRGlmZiA9IG5ldyBEaWZmKCk7XG5zZW50ZW5jZURpZmYudG9rZW5pemUgPSBmdW5jdGlvbih2YWx1ZSkge1xuICByZXR1cm4gdmFsdWUuc3BsaXQoLyhcXFMuKz9bLiE/XSkoPz1cXHMrfCQpLyk7XG59O1xuXG5leHBvcnQgZnVuY3Rpb24gZGlmZlNlbnRlbmNlcyhvbGRTdHIsIG5ld1N0ciwgY2FsbGJhY2spIHsgcmV0dXJuIHNlbnRlbmNlRGlmZi5kaWZmKG9sZFN0ciwgbmV3U3RyLCBjYWxsYmFjayk7IH1cbiJdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7O0FBQUE7QUFBQTtBQUFBQSxLQUFBLEdBQUFDLHNCQUFBLENBQUFDLE9BQUE7QUFBQTtBQUFBO0FBQTBCLG1DQUFBRCx1QkFBQUUsR0FBQSxXQUFBQSxHQUFBLElBQUFBLEdBQUEsQ0FBQUMsVUFBQSxHQUFBRCxHQUFBLGdCQUFBQSxHQUFBO0FBQUE7QUFHbkIsSUFBTUUsWUFBWTtBQUFBO0FBQUFDLE9BQUEsQ0FBQUQsWUFBQTtBQUFBO0FBQUc7QUFBSUU7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUEsQ0FBSSxDQUFDLENBQUM7QUFDdENGLFlBQVksQ0FBQ0csUUFBUSxHQUFHLFVBQVNDLEtBQUssRUFBRTtFQUN0QyxPQUFPQSxLQUFLLENBQUNDLEtBQUssQ0FBQyx1QkFBdUIsQ0FBQztBQUM3QyxDQUFDO0FBRU0sU0FBU0MsYUFBYUEsQ0FBQ0MsTUFBTSxFQUFFQyxNQUFNLEVBQUVDLFFBQVEsRUFBRTtFQUFFLE9BQU9ULFlBQVksQ0FBQ1UsSUFBSSxDQUFDSCxNQUFNLEVBQUVDLE1BQU0sRUFBRUMsUUFBUSxDQUFDO0FBQUUiLCJpZ25vcmVMaXN0IjpbXX0=\n","/*istanbul ignore start*/\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.cssDiff = void 0;\nexports.diffCss = diffCss;\n/*istanbul ignore end*/\nvar\n/*istanbul ignore start*/\n_base = _interopRequireDefault(require(\"./base\"))\n/*istanbul ignore end*/\n;\n/*istanbul ignore start*/ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n/*istanbul ignore end*/\nvar cssDiff =\n/*istanbul ignore start*/\nexports.cssDiff =\n/*istanbul ignore end*/\nnew\n/*istanbul ignore start*/\n_base\n/*istanbul ignore end*/\n[\n/*istanbul ignore start*/\n\"default\"\n/*istanbul ignore end*/\n]();\ncssDiff.tokenize = function (value) {\n return value.split(/([{}:;,]|\\s+)/);\n};\nfunction diffCss(oldStr, newStr, callback) {\n return cssDiff.diff(oldStr, newStr, callback);\n}\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfYmFzZSIsIl9pbnRlcm9wUmVxdWlyZURlZmF1bHQiLCJyZXF1aXJlIiwib2JqIiwiX19lc01vZHVsZSIsImNzc0RpZmYiLCJleHBvcnRzIiwiRGlmZiIsInRva2VuaXplIiwidmFsdWUiLCJzcGxpdCIsImRpZmZDc3MiLCJvbGRTdHIiLCJuZXdTdHIiLCJjYWxsYmFjayIsImRpZmYiXSwic291cmNlcyI6WyIuLi8uLi9zcmMvZGlmZi9jc3MuanMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IERpZmYgZnJvbSAnLi9iYXNlJztcblxuZXhwb3J0IGNvbnN0IGNzc0RpZmYgPSBuZXcgRGlmZigpO1xuY3NzRGlmZi50b2tlbml6ZSA9IGZ1bmN0aW9uKHZhbHVlKSB7XG4gIHJldHVybiB2YWx1ZS5zcGxpdCgvKFt7fTo7LF18XFxzKykvKTtcbn07XG5cbmV4cG9ydCBmdW5jdGlvbiBkaWZmQ3NzKG9sZFN0ciwgbmV3U3RyLCBjYWxsYmFjaykgeyByZXR1cm4gY3NzRGlmZi5kaWZmKG9sZFN0ciwgbmV3U3RyLCBjYWxsYmFjayk7IH1cbiJdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7O0FBQUE7QUFBQTtBQUFBQSxLQUFBLEdBQUFDLHNCQUFBLENBQUFDLE9BQUE7QUFBQTtBQUFBO0FBQTBCLG1DQUFBRCx1QkFBQUUsR0FBQSxXQUFBQSxHQUFBLElBQUFBLEdBQUEsQ0FBQUMsVUFBQSxHQUFBRCxHQUFBLGdCQUFBQSxHQUFBO0FBQUE7QUFFbkIsSUFBTUUsT0FBTztBQUFBO0FBQUFDLE9BQUEsQ0FBQUQsT0FBQTtBQUFBO0FBQUc7QUFBSUU7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUEsQ0FBSSxDQUFDLENBQUM7QUFDakNGLE9BQU8sQ0FBQ0csUUFBUSxHQUFHLFVBQVNDLEtBQUssRUFBRTtFQUNqQyxPQUFPQSxLQUFLLENBQUNDLEtBQUssQ0FBQyxlQUFlLENBQUM7QUFDckMsQ0FBQztBQUVNLFNBQVNDLE9BQU9BLENBQUNDLE1BQU0sRUFBRUMsTUFBTSxFQUFFQyxRQUFRLEVBQUU7RUFBRSxPQUFPVCxPQUFPLENBQUNVLElBQUksQ0FBQ0gsTUFBTSxFQUFFQyxNQUFNLEVBQUVDLFFBQVEsQ0FBQztBQUFFIiwiaWdub3JlTGlzdCI6W119\n","/*istanbul ignore start*/\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.canonicalize = canonicalize;\nexports.diffJson = diffJson;\nexports.jsonDiff = void 0;\n/*istanbul ignore end*/\nvar\n/*istanbul ignore start*/\n_base = _interopRequireDefault(require(\"./base\"))\n/*istanbul ignore end*/\n;\nvar\n/*istanbul ignore start*/\n_line = require(\"./line\")\n/*istanbul ignore end*/\n;\n/*istanbul ignore start*/ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\n/*istanbul ignore end*/\nvar jsonDiff =\n/*istanbul ignore start*/\nexports.jsonDiff =\n/*istanbul ignore end*/\nnew\n/*istanbul ignore start*/\n_base\n/*istanbul ignore end*/\n[\n/*istanbul ignore start*/\n\"default\"\n/*istanbul ignore end*/\n]();\n// Discriminate between two lines of pretty-printed, serialized JSON where one of them has a\n// dangling comma and the other doesn't. Turns out including the dangling comma yields the nicest output:\njsonDiff.useLongestToken = true;\njsonDiff.tokenize =\n/*istanbul ignore start*/\n_line\n/*istanbul ignore end*/\n.\n/*istanbul ignore start*/\nlineDiff\n/*istanbul ignore end*/\n.tokenize;\njsonDiff.castInput = function (value, options) {\n var\n /*istanbul ignore start*/\n /*istanbul ignore end*/\n undefinedReplacement = options.undefinedReplacement,\n /*istanbul ignore start*/\n _options$stringifyRep =\n /*istanbul ignore end*/\n options.stringifyReplacer,\n /*istanbul ignore start*/\n /*istanbul ignore end*/\n stringifyReplacer = _options$stringifyRep === void 0 ? function (k, v)\n /*istanbul ignore start*/\n {\n return (\n /*istanbul ignore end*/\n typeof v === 'undefined' ? undefinedReplacement : v\n );\n } : _options$stringifyRep;\n return typeof value === 'string' ? value : JSON.stringify(canonicalize(value, null, null, stringifyReplacer), stringifyReplacer, ' ');\n};\njsonDiff.equals = function (left, right, options) {\n return (\n /*istanbul ignore start*/\n _base\n /*istanbul ignore end*/\n [\n /*istanbul ignore start*/\n \"default\"\n /*istanbul ignore end*/\n ].prototype.equals.call(jsonDiff, left.replace(/,([\\r\\n])/g, '$1'), right.replace(/,([\\r\\n])/g, '$1'), options)\n );\n};\nfunction diffJson(oldObj, newObj, options) {\n return jsonDiff.diff(oldObj, newObj, options);\n}\n\n// This function handles the presence of circular references by bailing out when encountering an\n// object that is already on the \"stack\" of items being processed. Accepts an optional replacer\nfunction canonicalize(obj, stack, replacementStack, replacer, key) {\n stack = stack || [];\n replacementStack = replacementStack || [];\n if (replacer) {\n obj = replacer(key, obj);\n }\n var i;\n for (i = 0; i < stack.length; i += 1) {\n if (stack[i] === obj) {\n return replacementStack[i];\n }\n }\n var canonicalizedObj;\n if ('[object Array]' === Object.prototype.toString.call(obj)) {\n stack.push(obj);\n canonicalizedObj = new Array(obj.length);\n replacementStack.push(canonicalizedObj);\n for (i = 0; i < obj.length; i += 1) {\n canonicalizedObj[i] = canonicalize(obj[i], stack, replacementStack, replacer, key);\n }\n stack.pop();\n replacementStack.pop();\n return canonicalizedObj;\n }\n if (obj && obj.toJSON) {\n obj = obj.toJSON();\n }\n if (\n /*istanbul ignore start*/\n _typeof(\n /*istanbul ignore end*/\n obj) === 'object' && obj !== null) {\n stack.push(obj);\n canonicalizedObj = {};\n replacementStack.push(canonicalizedObj);\n var sortedKeys = [],\n _key;\n for (_key in obj) {\n /* istanbul ignore else */\n if (Object.prototype.hasOwnProperty.call(obj, _key)) {\n sortedKeys.push(_key);\n }\n }\n sortedKeys.sort();\n for (i = 0; i < sortedKeys.length; i += 1) {\n _key = sortedKeys[i];\n canonicalizedObj[_key] = canonicalize(obj[_key], stack, replacementStack, replacer, _key);\n }\n stack.pop();\n replacementStack.pop();\n } else {\n canonicalizedObj = obj;\n }\n return canonicalizedObj;\n}\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfYmFzZSIsIl9pbnRlcm9wUmVxdWlyZURlZmF1bHQiLCJyZXF1aXJlIiwiX2xpbmUiLCJvYmoiLCJfX2VzTW9kdWxlIiwiX3R5cGVvZiIsIm8iLCJTeW1ib2wiLCJpdGVyYXRvciIsImNvbnN0cnVjdG9yIiwicHJvdG90eXBlIiwianNvbkRpZmYiLCJleHBvcnRzIiwiRGlmZiIsInVzZUxvbmdlc3RUb2tlbiIsInRva2VuaXplIiwibGluZURpZmYiLCJjYXN0SW5wdXQiLCJ2YWx1ZSIsIm9wdGlvbnMiLCJ1bmRlZmluZWRSZXBsYWNlbWVudCIsIl9vcHRpb25zJHN0cmluZ2lmeVJlcCIsInN0cmluZ2lmeVJlc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FQyxJQUFHLENBQUM7SUFDeEY7SUFDQUgsS0FBSyxDQUFDVyxHQUFHLENBQUMsQ0FBQztJQUNYVixnQkFBZ0IsQ0FBQ1UsR0FBRyxDQUFDLENBQUM7RUFDeEIsQ0FBQyxNQUFNO0lBQ0xMLGdCQUFnQixHQUFHeEMsR0FBRztFQUN4QjtFQUNBLE9BQU93QyxnQkFBZ0I7QUFDekIiLCJpZ25vcmVMaXN0IjpbXX0=\n","/*istanbul ignore start*/\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.arrayDiff = void 0;\nexports.diffArrays = diffArrays;\n/*istanbul ignore end*/\nvar\n/*istanbul ignore start*/\n_base = _interopRequireDefault(require(\"./base\"))\n/*istanbul ignore end*/\n;\n/*istanbul ignore start*/ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n/*istanbul ignore end*/\nvar arrayDiff =\n/*istanbul ignore start*/\nexports.arrayDiff =\n/*istanbul ignore end*/\nnew\n/*istanbul ignore start*/\n_base\n/*istanbul ignore end*/\n[\n/*istanbul ignore start*/\n\"default\"\n/*istanbul ignore end*/\n]();\narrayDiff.tokenize = function (value) {\n return value.slice();\n};\narrayDiff.join = arrayDiff.removeEmpty = function (value) {\n return value;\n};\nfunction diffArrays(oldArr, newArr, callback) {\n return arrayDiff.diff(oldArr, newArr, callback);\n}\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfYmFzZSIsIl9pbnRlcm9wUmVxdWlyZURlZmF1bHQiLCJyZXF1aXJlIiwib2JqIiwiX19lc01vZHVsZSIsImFycmF5RGlmZiIsImV4cG9ydHMiLCJEaWZmIiwidG9rZW5pemUiLCJ2YWx1ZSIsInNsaWNlIiwiam9pbiIsInJlbW92ZUVtcHR5IiwiZGlmZkFycmF5cyIsIm9sZEFyciIsIm5ld0FyciIsImNhbGxiYWNrIiwiZGlmZiJdLCJzb3VyY2VzIjp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BVyxHQUFHLFVBQVNILEtBQUssRUFBRTtFQUN2RCxPQUFPQSxLQUFLO0FBQ2QsQ0FBQztBQUVNLFNBQVNJLFVBQVVBLENBQUNDLE1BQU0sRUFBRUMsTUFBTSxFQUFFQyxRQUFRLEVBQUU7RUFBRSxPQUFPWCxTQUFTLENBQUNZLElBQUksQ0FBQ0gsTUFBTSxFQUFFQyxNQUFNLEVBQUVDLFFBQVEsQ0FBQztBQUFFIiwiaWdub3JlTGlzdCI6W119\n","/*istanbul ignore start*/\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.isUnix = isUnix;\nexports.isWin = isWin;\nexports.unixToWin = unixToWin;\nexports.winToUnix = winToUnix;\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\n/*istanbul ignore end*/\nfunction unixToWin(patch) {\n if (Array.isArray(patch)) {\n return patch.map(unixToWin);\n }\n return (\n /*istanbul ignore start*/\n _objectSpread(_objectSpread({},\n /*istanbul ignore end*/\n patch), {}, {\n hunks: patch.hunks.map(function (hunk)\n /*istanbul ignore start*/\n {\n return _objectSpread(_objectSpread({},\n /*istanbul ignore end*/\n hunk), {}, {\n lines: hunk.lines.map(function (line, i)\n /*istanbul ignore start*/\n {\n var _hunk$lines;\n return (\n /*istanbul ignore end*/\n line.startsWith('\\\\') || line.endsWith('\\r') ||\n /*istanbul ignore start*/\n (_hunk$lines =\n /*istanbul ignore end*/\n hunk.lines[i + 1]) !== null && _hunk$lines !== void 0 &&\n /*istanbul ignore start*/\n _hunk$lines\n /*istanbul ignore end*/\n .startsWith('\\\\') ? line : line + '\\r'\n );\n })\n });\n })\n })\n );\n}\nfunction winToUnix(patch) {\n if (Array.isArray(patch)) {\n return patch.map(winToUnix);\n }\n return (\n /*istanbul ignore start*/\n _objectSpread(_objectSpread({},\n /*istanbul ignore end*/\n patch), {}, {\n hunks: patch.hunks.map(function (hunk)\n /*istanbul ignore start*/\n {\n return _objectSpread(_objectSpread({},\n /*istanbul ignore end*/\n hunk), {}, {\n lines: hunk.lines.map(function (line)\n /*istanbul ignore start*/\n {\n return (\n /*istanbul ignore end*/\n line.endsWith('\\r') ? line.substring(0, line.length - 1) : line\n );\n })\n });\n })\n })\n );\n}\n\n/**\n * Returns true if the patch consistently uses Unix line endings (or only involves one line and has\n * no line endings).\n */\nfunction isUnix(patch) {\n if (!Array.isArray(patch)) {\n patch = [patch];\n }\n return !patch.some(function (index)\n /*istanbul ignore start*/\n {\n return (\n /*istanbul ignore end*/\n index.hunks.some(function (hunk)\n /*istanbul ignore start*/\n {\n return (\n /*istanbul ignore end*/\n hunk.lines.some(function (line)\n /*istanbul ignore start*/\n {\n return (\n /*istanbul ignore end*/\n !line.startsWith('\\\\') && line.endsWith('\\r')\n );\n })\n );\n })\n );\n });\n}\n\n/**\n * Returns true if the patch uses Windows line endings and only Windows line endings.\n */\nfunction isWin(patch) {\n if (!Array.isArray(patch)) {\n patch = [patch];\n }\n return patch.some(function (index)\n /*istanbul ignore start*/\n {\n return (\n /*istanbul ignore end*/\n index.hunks.some(function (hunk)\n /*istanbul ignore start*/\n {\n return (\n /*istanbul ignore end*/\n hunk.lines.some(function (line)\n /*istanbul ignore start*/\n {\n return (\n /*istanbul ignore end*/\n line.endsWith('\\r')\n );\n })\n );\n })\n );\n }) && patch.every(function (index)\n /*istanbul ignore start*/\n {\n return (\n /*istanbul ignore end*/\n index.hunks.every(function (hunk)\n /*istanbul ignore start*/\n {\n return (\n /*istanbul ignore end*/\n hunk.lines.every(function (line, i)\n /*istanbul ignore start*/\n {\n var _hunk$lines2;\n return (\n /*istanbul ignore end*/\n line.startsWith('\\\\') || line.endsWith('\\r') ||\n /*istanbul ignore start*/\n ((_hunk$lines2 =\n /*istanbul ignore end*/\n hunk.lines[i + 1]) === null || _hunk$lines2 === void 0 ? void 0 :\n /*istanbul ignore start*/\n _hunk$lines2\n /*istanbul ignore end*/\n .startsWith('\\\\'))\n );\n })\n );\n })\n );\n });\n}\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJ1bml4VG9XaW4iLCJwYXRjaCIsIkFycmF5IiwiaXNBcnJheSIsIm1hcCIsIl9vYmplY3RTcHJlYWQiLCJodW5rcyIsImh1bmsiLCJsaW5lcyIsImxpbmUiLCJpIiwiX2h1bmskbGluZXMiLCJzdGFydHNXaXRoIiwiZW5kc1dpdGgiLCJ3aW5Ub1VuaXgiLCJzdWJzdHJpbmciLC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ixLQUFLLENBQUNlLEtBQUssQ0FDeEIsVUFBQWQsSUFBSTtNQUFBO01BQUE7UUFBQTtVQUFBO1VBQUlBLElBQUksQ0FBQ0MsS0FBSyxDQUFDYSxLQUFLLENBQ3RCLFVBQUNaLElBQUksRUFBRUMsQ0FBQztVQUFBO1VBQUE7WUFBQSxJQUFBWSxZQUFBO1lBQUE7Y0FBQTtjQUFLYixJQUFJLENBQUNHLFVBQVUsQ0FBQyxJQUFJLENBQUMsSUFBSUgsSUFBSSxDQUFDSSxRQUFRLENBQUMsSUFBSSxDQUFDO2NBQUE7Y0FBQSxFQUFBUyxZQUFBO2NBQUE7Y0FBSWYsSUFBSSxDQUFDQyxLQUFLLENBQUNFLENBQUMsR0FBRyxDQUFDLENBQUMsY0FBQVksWUFBQTtjQUFqQjtjQUFBQTtjQUFBO2NBQUEsQ0FBbUJWLFVBQVUsQ0FBQyxJQUFJLENBQUM7WUFBQTtVQUFBLENBQ2xHO1FBQUM7TUFBQSxDQUNIO0lBQUM7RUFBQSxDQUNILENBQUM7QUFDTCIsImlnbm9yZUxpc3QiOltdfQ==\n","/*istanbul ignore start*/\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.parsePatch = parsePatch;\n/*istanbul ignore end*/\nfunction parsePatch(uniDiff) {\n var diffstr = uniDiff.split(/\\n/),\n list = [],\n i = 0;\n function parseIndex() {\n var index = {};\n list.push(index);\n\n // Parse diff metadata\n while (i < diffstr.length) {\n var line = diffstr[i];\n\n // File header found, end parsing diff metadata\n if (/^(\\-\\-\\-|\\+\\+\\+|@@)\\s/.test(line)) {\n break;\n }\n\n // Diff index\n var header = /^(?:Index:|diff(?: -r \\w+)+)\\s+(.+?)\\s*$/.exec(line);\n if (header) {\n index.index = header[1];\n }\n i++;\n }\n\n // Parse file headers if they are defined. Unified diff requires them, but\n // there's no technical issues to have an isolated hunk without file header\n parseFileHeader(index);\n parseFileHeader(index);\n\n // Parse hunks\n index.hunks = [];\n while (i < diffstr.length) {\n var _line = diffstr[i];\n if (/^(Index:\\s|diff\\s|\\-\\-\\-\\s|\\+\\+\\+\\s|===================================================================)/.test(_line)) {\n break;\n } else if (/^@@/.test(_line)) {\n index.hunks.push(parseHunk());\n } else if (_line) {\n throw new Error('Unknown line ' + (i + 1) + ' ' + JSON.stringify(_line));\n } else {\n i++;\n }\n }\n }\n\n // Parses the --- and +++ headers, if none are found, no lines\n // are consumed.\n function parseFileHeader(index) {\n var fileHeader = /^(---|\\+\\+\\+)\\s+(.*)\\r?$/.exec(diffstr[i]);\n if (fileHeader) {\n var keyPrefix = fileHeader[1] === '---' ? 'old' : 'new';\n var data = fileHeader[2].split('\\t', 2);\n var fileName = data[0].replace(/\\\\\\\\/g, '\\\\');\n if (/^\".*\"$/.test(fileName)) {\n fileName = fileName.substr(1, fileName.length - 2);\n }\n index[keyPrefix + 'FileName'] = fileName;\n index[keyPrefix + 'Header'] = (data[1] || '').trim();\n i++;\n }\n }\n\n // Parses a hunk\n // This assumes that we are at the start of a hunk.\n function parseHunk() {\n var chunkHeaderIndex = i,\n chunkHeaderLine = diffstr[i++],\n chunkHeader = chunkHeaderLine.split(/@@ -(\\d+)(?:,(\\d+))? \\+(\\d+)(?:,(\\d+))? @@/);\n var hunk = {\n oldStart: +chunkHeader[1],\n oldLines: typeof chunkHeader[2] === 'undefined' ? 1 : +chunkHeader[2],\n newStart: +chunkHeader[3],\n newLines: typeof chunkHeader[4] === 'undefined' ? 1 : +chunkHeader[4],\n lines: []\n };\n\n // Unified Diff Format quirk: If the chunk size is 0,\n // the first number is one lower than one would expect.\n // https://www.artima.com/weblogs/viewpost.jsp?thread=164293\n if (hunk.oldLines === 0) {\n hunk.oldStart += 1;\n }\n if (hunk.newLines === 0) {\n hunk.newStart += 1;\n }\n var addCount = 0,\n removeCount = 0;\n for (; i < diffstr.length && (removeCount < hunk.oldLines || addCount < hunk.newLines ||\n /*istanbul ignore start*/\n (_diffstr$i =\n /*istanbul ignore end*/\n diffstr[i]) !== null && _diffstr$i !== void 0 &&\n /*istanbul ignore start*/\n _diffstr$i\n /*istanbul ignore end*/\n .startsWith('\\\\')); i++) {\n /*istanbul ignore start*/\n var _diffstr$i;\n /*istanbul ignore end*/\n var operation = diffstr[i].length == 0 && i != diffstr.length - 1 ? ' ' : diffstr[i][0];\n if (operation === '+' || operation === '-' || operation === ' ' || operation === '\\\\') {\n hunk.lines.push(diffstr[i]);\n if (operation === '+') {\n addCount++;\n } else if (operation === '-') {\n removeCount++;\n } else if (operation === ' ') {\n addCount++;\n removeCount++;\n }\n } else {\n throw new Error(\n /*istanbul ignore start*/\n \"Hunk at line \".concat(\n /*istanbul ignore end*/\n chunkHeaderIndex + 1, \" contained invalid line \").concat(diffstr[i]));\n }\n }\n\n // Handle the empty block count case\n if (!addCount && hunk.newLines === 1) {\n hunk.newLines = 0;\n }\n if (!removeCount && hunk.oldLines === 1) {\n hunk.oldLines = 0;\n }\n\n // Perform sanity checking\n if (addCount !== hunk.newLines) {\n throw new Error('Added line count did not match for hunk at line ' + (chunkHeaderIndex + 1));\n }\n if (removeCount !== hunk.oldLines) {\n throw new Error('Removed line count did not match for hunk at line ' + (chunkHeaderIndex + 1));\n }\n return hunk;\n }\n while (i < diffstr.length) {\n parseIndex();\n }\n return list;\n}\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJwYXJzZVBhdGNoIiwidW5pRGlmZiIsImRpZmZzdHIiLCJzcGxpdCIsImxpc3QiLCJpIiwicGFyc2VJbmRleCIsImluZGV4IiwicHVzaCIsImxlbmd0aCIsImxpbmUiLCJ0ZXN0IiwiaGVhZGVyIiwiZXhlYyIsInBhcnNlRmlsZUhlYWRlciIsImh1bmtzIiwicGFyc2VIdW5rIiwiRXJyb3IiLCJKU09OIiwic3RyaW5naWZ5IiwiZmlsZUhlYWRlciIsImtleVByZWZpeCIsImRhdGEiLCJmaWxlTmFtZSIsInJlcGxhY2UiLCJzdWJzdHIiL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HQUFHLENBQUM7SUFDbkI7SUFDQSxJQUFJLENBQUNHLFdBQVcsSUFBSVAsSUFBSSxDQUFDRSxRQUFRLEtBQUssQ0FBQyxFQUFFO01BQ3ZDRixJQUFJLENBQUNFLFFBQVEsR0FBRyxDQUFDO0lBQ25COztJQUVBO0lBQ0EsSUFBSUksUUFBUSxLQUFLTixJQUFJLENBQUNJLFFBQVEsRUFBRTtNQUM5QixNQUFNLElBQUlqQixLQUFLLENBQUMsa0RBQWtELElBQUlVLGdCQUFnQixHQUFHLENBQUMsQ0FBQyxDQUFDO0lBQzlGO0lBQ0EsSUFBSVUsV0FBVyxLQUFLUCxJQUFJLENBQUNFLFFBQVEsRUFBRTtNQUNqQyxNQUFNLElBQUlmLEtBQUssQ0FBQyxvREFBb0QsSUFBSVUsZ0JBQWdCLEdBQUcsQ0FBQyxDQUFDLENBQUM7SUFDaEc7SUFFQSxPQUFPRyxJQUFJO0VBQ2I7RUFFQSxPQUFPekIsQ0FBQyxHQUFHSCxPQUFPLENBQUNPLE1BQU0sRUFBRTtJQUN6QkgsVUFBVSxDQUFDLENBQUM7RUFDZDtFQUVBLE9BQU9GLElBQUk7QUFDYiIsImlnbm9yZUxpc3QiOltdfQ==\n","/*istanbul ignore start*/\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = _default;\n/*istanbul ignore end*/\n// Iterator that traverses in the range of [min, max], stepping\n// by distance from a given start position. I.e. for [0, 4], with\n// start of 2, this will iterate 2, 3, 1, 4, 0.\nfunction\n/*istanbul ignore start*/\n_default\n/*istanbul ignore end*/\n(start, minLine, maxLine) {\n var wantForward = true,\n backwardExhausted = false,\n forwardExhausted = false,\n localOffset = 1;\n return function iterator() {\n if (wantForward && !forwardExhausted) {\n if (backwardExhausted) {\n localOffset++;\n } else {\n wantForward = false;\n }\n\n // Check if trying to fit beyond text length, and if not, check it fits\n // after offset location (or desired location on first iteration)\n if (start + localOffset <= maxLine) {\n return start + localOffset;\n }\n forwardExhausted = true;\n }\n if (!backwardExhausted) {\n if (!forwardExhausted) {\n wantForward = true;\n }\n\n // Check if trying to fit before text beginning, and if not, check it fits\n // before offset location\n if (minLine <= start - localOffset) {\n return start - localOffset++;\n }\n backwardExhausted = true;\n return iterator();\n }\n\n // We tried to fit hunk before text beginning and beyond text length, then\n // hunk can't fit on the text. Return undefined\n };\n}\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfZGVmYXVsdCIsInN0YXJ0IiwibWluTGluZSIsIm1heExpbmUiLCJ3YW50Rm9yd2FyZCIsImJhY2t3YXJkRXhoYXVzdGVkIiwiZm9yd2FyZEV4aGF1c3RlZCIsImxvY2FsT2Zmc2V0IiwiaXRlcmF0b3IiXSwic291cmNlcyI6WyIuLi8uLi9zcmMvdXRpbC9kaXN0YW5jZS1pdGVyYXRvci5qcyJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBJdGVyYXRvciB0aGF0IHRyYXZlcnNlcyBpbiB0aGUgcmFuZ2Ugb2YgW21pbiwgbWF4XSwgc3RlcHBpbmdcbi8vIGJ5IGRpc3RhbmNlIGZyb20gYSBnaXZlbiBzdGFydCBwb3NpdGlvbi4gSS5lLiBmb3IgWzAsIDRdLCB3aXRoXG4vLyBzdGFydCBvZiAyLCB0aGlzIHdpbGwgaXRlcmF0ZSAyLCAzLCAxLCA0LCAwLlxuZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24oc3RhcnQsIG1pbkxpbmUsIG1heExpbmUpIHtcbiAgbGV0IHdhbnRGb3J3YXJkID0gdHJ1ZSxcbiAgICAgIGJhY2t3YXJkRXhoYXVzdGVkID0gZmFsc2UsXG4gICAgICBmb3J3YXJkRXhoYXVzdGVkID0gZmFsc2UsXG4gICAgICBsb2NhbE9mZnNldCA9IDE7XG5cbiAgcmV0dXJuIGZ1bmN0aW9uIGl0ZXJhdG9yKCkge1xuICAgIGlmICh3YW50Rm9yd2FyZCAm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BQUk7TUFDeEIsT0FBT0csUUFBUSxDQUFDLENBQUM7SUFDbkI7O0lBRUE7SUFDQTtFQUNGLENBQUM7QUFDSCIsImlnbm9yZUxpc3QiOltdfQ==\n","/*istanbul ignore start*/\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.applyPatch = applyPatch;\nexports.applyPatches = applyPatches;\n/*istanbul ignore end*/\nvar\n/*istanbul ignore start*/\n_string = require(\"../util/string\")\n/*istanbul ignore end*/\n;\nvar\n/*istanbul ignore start*/\n_lineEndings = require(\"./line-endings\")\n/*istanbul ignore end*/\n;\nvar\n/*istanbul ignore start*/\n_parse = require(\"./parse\")\n/*istanbul ignore end*/\n;\nvar\n/*istanbul ignore start*/\n_distanceIterator = _interopRequireDefault(require(\"../util/distance-iterator\"))\n/*istanbul ignore end*/\n;\n/*istanbul ignore start*/ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n/*istanbul ignore end*/\nfunction applyPatch(source, uniDiff) {\n /*istanbul ignore start*/\n var\n /*istanbul ignore end*/\n options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n if (typeof uniDiff === 'string') {\n uniDiff =\n /*istanbul ignore start*/\n (0,\n /*istanbul ignore end*/\n /*istanbul ignore start*/\n _parse\n /*istanbul ignore end*/\n .\n /*istanbul ignore start*/\n parsePatch)\n /*istanbul ignore end*/\n (uniDiff);\n }\n if (Array.isArray(uniDiff)) {\n if (uniDiff.length > 1) {\n throw new Error('applyPatch only works with a single input.');\n }\n uniDiff = uniDiff[0];\n }\n if (options.autoConvertLineEndings || options.autoConvertLineEndings == null) {\n if (\n /*istanbul ignore start*/\n (0,\n /*istanbul ignore end*/\n /*istanbul ignore start*/\n _string\n /*istanbul ignore end*/\n .\n /*istanbul ignore start*/\n hasOnlyWinLineEndings)\n /*istanbul ignore end*/\n (source) &&\n /*istanbul ignore start*/\n (0,\n /*istanbul ignore end*/\n /*istanbul ignore start*/\n _lineEndings\n /*istanbul ignore end*/\n .\n /*istanbul ignore start*/\n isUnix)\n /*istanbul ignore end*/\n (uniDiff)) {\n uniDiff =\n /*istanbul ignore start*/\n (0,\n /*istanbul ignore end*/\n /*istanbul ignore start*/\n _lineEndings\n /*istanbul ignore end*/\n .\n /*istanbul ignore start*/\n unixToWin)\n /*istanbul ignore end*/\n (uniDiff);\n } else if (\n /*istanbul ignore start*/\n (0,\n /*istanbul ignore end*/\n /*istanbul ignore start*/\n _string\n /*istanbul ignore end*/\n .\n /*istanbul ignore start*/\n hasOnlyUnixLineEndings)\n /*istanbul ignore end*/\n (source) &&\n /*istanbul ignore start*/\n (0,\n /*istanbul ignore end*/\n /*istanbul ignore start*/\n _lineEndings\n /*istanbul ignore end*/\n .\n /*istanbul ignore start*/\n isWin)\n /*istanbul ignore end*/\n (uniDiff)) {\n uniDiff =\n /*istanbul ignore start*/\n (0,\n /*istanbul ignore end*/\n /*istanbul ignore start*/\n _lineEndings\n /*istanbul ignore end*/\n .\n /*istanbul ignore start*/\n winToUnix)\n /*istanbul ignore end*/\n (uniDiff);\n }\n }\n\n // Apply the diff to the input\n var lines = source.split('\\n'),\n hunks = uniDiff.hunks,\n compareLine = options.compareLine || function (lineNumber, line, operation, patchContent)\n /*istanbul ignore start*/\n {\n return (\n /*istanbul ignore end*/\n line === patchContent\n );\n },\n fuzzFactor = options.fuzzFactor || 0,\n minLine = 0;\n if (fuzzFactor < 0 || !Number.isInteger(fuzzFactor)) {\n throw new Error('fuzzFactor must be a non-negative integer');\n }\n\n // Special case for empty patch.\n if (!hunks.length) {\n return source;\n }\n\n // Before anything else, handle EOFNL insertion/removal. If the patch tells us to make a change\n // to the EOFNL that is redundant/impossible - i.e. to remove a newline that's not there, or add a\n // newline that already exists - then we either return false and fail to apply the patch (if\n // fuzzFactor is 0) or simply ignore the problem and do nothing (if fuzzFactor is >0).\n // If we do need to remove/add a newline at EOF, this will always be in the final hunk:\n var prevLine = '',\n removeEOFNL = false,\n addEOFNL = false;\n for (var i = 0; i < hunks[hunks.length - 1].lines.length; i++) {\n var line = hunks[hunks.length - 1].lines[i];\n if (line[0] == '\\\\') {\n if (prevLine[0] == '+') {\n removeEOFNL = true;\n } else if (prevLine[0] == '-') {\n addEOFNL = true;\n }\n }\n prevLine = line;\n }\n if (removeEOFNL) {\n if (addEOFNL) {\n // This means the final line gets changed but doesn't have a trailing newline in either the\n // original or patched version. In that case, we do nothing if fuzzFactor > 0, and if\n // fuzzFactor is 0, we simply validate that the source file has no trailing newline.\n if (!fuzzFactor && lines[lines.length - 1] == '') {\n return false;\n }\n } else if (lines[lines.length - 1] == '') {\n lines.pop();\n } else if (!fuzzFactor) {\n return false;\n }\n } else if (addEOFNL) {\n if (lines[lines.length - 1] != '') {\n lines.push('');\n } else if (!fuzzFactor) {\n return false;\n }\n }\n\n /**\n * Checks if the hunk can be made to fit at the provided location with at most `maxErrors`\n * insertions, substitutions, or deletions, while ensuring also that:\n * - lines deleted in the hunk match exactly, and\n * - wherever an insertion operation or block of insertion operations appears in the hunk, the\n * immediately preceding and following lines of context match exactly\n *\n * `toPos` should be set such that lines[toPos] is meant to match hunkLines[0].\n *\n * If the hunk can be applied, returns an object with properties `oldLineLastI` and\n * `replacementLines`. Otherwise, returns null.\n */\n function applyHunk(hunkLines, toPos, maxErrors) {\n /*istanbul ignore start*/\n var\n /*istanbul ignore end*/\n hunkLinesI = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;\n /*istanbul ignore start*/\n var\n /*istanbul ignore end*/\n lastContextLineMatched = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;\n /*istanbul ignore start*/\n var\n /*istanbul ignore end*/\n patchedLines = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : [];\n /*istanbul ignore start*/\n var\n /*istanbul ignore end*/\n patchedLinesLength = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : 0;\n var nConsecutiveOldContextLines = 0;\n var nextContextLineMustMatch = false;\n for (; hunkLinesI < hunkLines.length; hunkLinesI++) {\n var hunkLine = hunkLines[hunkLinesI],\n operation = hunkLine.length > 0 ? hunkLine[0] : ' ',\n content = hunkLine.length > 0 ? hunkLine.substr(1) : hunkLine;\n if (operation === '-') {\n if (compareLine(toPos + 1, lines[toPos], operation, content)) {\n toPos++;\n nConsecutiveOldContextLines = 0;\n } else {\n if (!maxErrors || lines[toPos] == null) {\n return null;\n }\n patchedLines[patchedLinesLength] = lines[toPos];\n return applyHunk(hunkLines, toPos + 1, maxErrors - 1, hunkLinesI, false, patchedLines, patchedLinesLength + 1);\n }\n }\n if (operation === '+') {\n if (!lastContextLineMatched) {\n return null;\n }\n patchedLines[patchedLinesLength] = content;\n patchedLinesLength++;\n nConsecutiveOldContextLines = 0;\n nextContextLineMustMatch = true;\n }\n if (operation === ' ') {\n nConsecutiveOldContextLines++;\n patchedLines[patchedLinesLength] = lines[toPos];\n if (compareLine(toPos + 1, lines[toPos], operation, content)) {\n patchedLinesLength++;\n lastContextLineMatched = true;\n nextContextLineMustMatch = false;\n toPos++;\n } else {\n if (nextContextLineMustMatch || !maxErrors) {\n return null;\n }\n\n // Consider 3 possibilities in sequence:\n // 1. lines contains a *substitution* not included in the patch context, or\n // 2. lines contains an *insertion* not included in the patch context, or\n // 3. lines contains a *deletion* not included in the patch context\n // The first two options are of course only possible if the line from lines is non-null -\n // i.e. only option 3 is possible if we've overrun the end of the old file.\n return lines[toPos] && (applyHunk(hunkLines, toPos + 1, maxErrors - 1, hunkLinesI + 1, false, patchedLines, patchedLinesLength + 1) || applyHunk(hunkLines, toPos + 1, maxErrors - 1, hunkLinesI, false, patchedLines, patchedLinesLength + 1)) || applyHunk(hunkLines, toPos, maxErrors - 1, hunkLinesI + 1, false, patchedLines, patchedLinesLength);\n }\n }\n }\n\n // Before returning, trim any unmodified context lines off the end of patchedLines and reduce\n // toPos (and thus oldLineLastI) accordingly. This allows later hunks to be applied to a region\n // that starts in this hunk's trailing context.\n patchedLinesLength -= nConsecutiveOldContextLines;\n toPos -= nConsecutiveOldContextLines;\n patchedLines.length = patchedLinesLength;\n return {\n patchedLines: patchedLines,\n oldLineLastI: toPos - 1\n };\n }\n var resultLines = [];\n\n // Search best fit offsets for each hunk based on the previous ones\n var prevHunkOffset = 0;\n for (var _i = 0; _i < hunks.length; _i++) {\n var hunk = hunks[_i];\n var hunkResult =\n /*istanbul ignore start*/\n void 0\n /*istanbul ignore end*/\n ;\n var maxLine = lines.length - hunk.oldLines + fuzzFactor;\n var toPos =\n /*istanbul ignore start*/\n void 0\n /*istanbul ignore end*/\n ;\n for (var maxErrors = 0; maxErrors <= fuzzFactor; maxErrors++) {\n toPos = hunk.oldStart + prevHunkOffset - 1;\n var iterator =\n /*istanbul ignore start*/\n (0,\n /*istanbul ignore end*/\n /*istanbul ignore start*/\n _distanceIterator\n /*istanbul ignore end*/\n [\n /*istanbul ignore start*/\n \"default\"\n /*istanbul ignore end*/\n ])(toPos, minLine, maxLine);\n for (; toPos !== undefined; toPos = iterator()) {\n hunkResult = applyHunk(hunk.lines, toPos, maxErrors);\n if (hunkResult) {\n break;\n }\n }\n if (hunkResult) {\n break;\n }\n }\n if (!hunkResult) {\n return false;\n }\n\n // Copy everything from the end of where we applied the last hunk to the start of this hunk\n for (var _i2 = minLine; _i2 < toPos; _i2++) {\n resultLines.push(lines[_i2]);\n }\n\n // Add the lines produced by applying the hunk:\n for (var _i3 = 0; _i3 < hunkResult.patchedLines.length; _i3++) {\n var _line = hunkResult.patchedLines[_i3];\n resultLines.push(_line);\n }\n\n // Set lower text limit to end of the current hunk, so next ones don't try\n // to fit over already patched text\n minLine = hunkResult.oldLineLastI + 1;\n\n // Note the offset between where the patch said the hunk should've applied and where we\n // applied it, so we can adjust future hunks accordingly:\n prevHunkOffset = toPos + 1 - hunk.oldStart;\n }\n\n // Copy over the rest of the lines from the old text\n for (var _i4 = minLine; _i4 < lines.length; _i4++) {\n resultLines.push(lines[_i4]);\n }\n return resultLines.join('\\n');\n}\n\n// Wrapper that supports multiple file patches via callbacks.\nfunction applyPatches(uniDiff, options) {\n if (typeof uniDiff === 'string') {\n uniDiff =\n /*istanbul ignore start*/\n (0,\n /*istanbul ignore end*/\n /*istanbul ignore start*/\n _parse\n /*istanbul ignore end*/\n .\n /*istanbul ignore start*/\n parsePatch)\n /*istanbul ignore end*/\n (uniDiff);\n }\n var currentIndex = 0;\n function processIndex() {\n var index = uniDiff[currentIndex++];\n if (!index) {\n return options.complete();\n }\n options.loadFile(index, function (err, data) {\n if (err) {\n return options.complete(err);\n }\n var updatedContent = applyPatch(data, index, options);\n options.patched(index, updatedContent, function (err) {\n if (err) {\n return options.complete(err);\n }\n processIndex();\n });\n });\n }\n processIndex();\n}\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfc3RyaW5nIiwicmVxdWlyZSIsIl9saW5lRW5kaW5ncyIsIl9wYXJzZSIsIl9kaXN0YW5jZUl0ZXJhdG9yIiwiX2ludGVyb3BSZXF1aXJlRGVmYXVsdCIsIm9iaiIsIl9fZXNNb2R1bGUiLCJhcHBseVBhdGNoIiwic291cmNlIiwidW5pRGlmZiIsIm9wdGlvbnMiLCJhcmd1bWVudHMiLCJsZW5ndGgiLCJ1bmRlZmluZWQiLCJwYXJzZVBhdGNoIiwiQXJyYXkiLCJpc0FycmF5IiwiRXJyb3IiLCJhdXRvQ29udmVydExpbmVFbmRpbmdzIiwiaGFzT25seVdpbkxpbmVFbmRpbmdzIiwiaXNVbml4IiwidW5peFRvV2luIiwiaGFzT25seVVuaXhMaW5lRW5kaW5ncyIsImlzV2luIiwid2luVG9Vbml4IiwibGluZXMiLCJzcGxpdCIsImh1bmtzIiwiY29tcGFyZUxpbmUiLCJsaW5lTnVtYmVyIiwibGluZSIsIm9wZXJhdGlvbiIsInBhdGNoQ29udGVudCIsImZ1enpGYWN0b3IiLCJtaW5MaW5lIiwiTnVtYmVyIiwiaXNJbnRlZ2VyIiwicHJldkxpbmUiLCJyZW1vdmVFT0ZOTC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mVzYC4gT3RoZXJ3aXNlLCByZXR1cm5zIG51bGwuXG4gICAqL1xuICBmdW5jdGlvbiBhcHBseUh1bmsoXG4gICAgaHVua0xpbmVzLFxuICAgIHRvUG9zLFxuICAgIG1heEVycm9ycyxcbiAgICBodW5rTGluZXNJID0gMCxcbiAgICBsYXN0Q29udGV4dExpbmVNYXRjaGVkID0gdHJ1ZSxcbiAgICBwYXRjaGVkTGluZXMgPSBbXSxcbiAgICBwYXRjaGVkTGluZXNMZW5ndGggPSAwLFxuICApIHtcbiAgICBsZXQgbkNvbnNlY3V0aXZlT2xkQ29udGV4dExpbmVzID0gMDtcbiAgICBsZXQgbmV4dENvbnRleHRMaW5lTXVzdE1hdGNoID0gZmFsc2U7XG4gICAgZm9yICg7IGh1bmtMaW5lc0kgPCBodW5rTGluZXMubGVuZ3RoOyBodW5rTGluZXNJKyspIHtcbiAgICAgIGxldCBodW5rTGluZSA9IGh1bmtMaW5lc1todW5rTGluZXNJXSxcbiAgICAgICAgICBvcGVyYXRpb24gPSAoaHVua0xpbmUubGVuZ3RoID4gMCA/IGh1bmtMaW5lWzBdIDogJyAnKSxcbiAgICAgICAgICBjb250ZW50ID0gKGh1bmtMaW5lLmxlbmd0aCA+IDAgPyBodW5rTGluZS5zdWJzdHIoMSkgOiBodW5rTGluZSk7XG5cbiAgICAgIGlmIChvcGVyYXRpb24gPT09ICctJykge1xuICAgICAgICBpZiAoY29tcGFyZUxpbmUodG9Qb3MgKyAxLCBsaW5lc1t0b1Bvc10sIG9wZXJhdGlvbiwgY29udGVudCkpIHtcbiAgICAgICAgICB0b1BvcysrO1xuICAgICAgICAgIG5Db25zZWN1dGl2ZU9sZENvbnRleHRMaW5lcyA9IDA7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgaWYgKCFtYXhFcnJvcnMgfHwgbGluZXNbdG9Qb3NdID09IG51bGwpIHtcbiAgICAgICAgICAgIHJldHVybiBudWxsO1xuICAgICAgICAgIH1cbiAgICAgICAgICBwY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AgICAgIG1heEVycm9ycyAtIDEsXG4gICAgICAgICAgICAgICAgaHVua0xpbmVzSSArIDEsXG4gICAgICAgICAgICAgICAgZmFsc2UsXG4gICAgICAgICAgICAgICAgcGF0Y2hlZExpbmVzLFxuICAgICAgICAgICAgICAgIHBhdGNoZWRMaW5lc0xlbmd0aCArIDFcbiAgICAgICAgICAgICAgKSB8fCBhcHBseUh1bmsoXG4gICAgICAgICAgICAgICAgaHVua0xpbmVzLFxuICAgICAgICAgICAgICAgIHRvUG9zICsgMSxcbiAgICAgICAgICAgICAgICBtYXhFcnJvcnMgLSAxLFxuICAgICAgICAgICAgICAgIGh1bmtMaW5lc0ksXG4gICAgICAgICAgICAgICAgZmFsc2UsXG4gICAgICAgICAgICAgICAgcGF0Y2hlZExpbmVzLFxuICAgICAgICAgICAgICAgIHBhdGNoZWRMaW5lc0xlbmd0aCArIDFcbiAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgKSB8fCBhcHBseUh1bmsoXG4gICAgICAgICAgICAgIGh1bmtMaW5lcyxcbiAgICAgICAgICAgICAgdG9Qb3MsXG4gICAgICAgICAgICAgIG1heEVycm9ycyAtIDEsXG4gICAgICAgICAgICAgIGh1bmtMaW5lc0kgKyAxLFxuICAgICAgICAgICAgICBmYWxzZSxcbiAgICAgICAgICAgICAgcGF0Y2hlZExpbmVzLFxuICAgICAgICAgICAgICBwYXRjaGVkTGluZXNMZW5ndGhcbiAgICAgICAgICAgIClcbiAgICAgICAgICApO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgfVxuXG4gICAgLy8gQmVmb3JlIHJldHVybmluZywgdHJpbSBhbnkgdW5tb2RpZmllZCBjb250ZXh0IGxpbmVzIG9mZiB0aGUgZW5kIG9mIHBhdGNoZWRMaW5lcyBhbmQgcmVkdWNlXG4gICAgLy8gdG9Qb3MgKGFuZCB0aHVzIG9sZExpbmVMYXN0SSkgYWNjb3JkaW5nbHkuIFRoaXMgYWxsb3dzIGxhdGVyIGh1bmtzIHRvIG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xFQUFFO1FBQ1AsT0FBTy9ELE9BQU8sQ0FBQzZELFFBQVEsQ0FBQ0UsR0FBRyxDQUFDO01BQzlCO01BRUEsSUFBSUUsY0FBYyxHQUFHcEUsVUFBVSxDQUFDbUUsSUFBSSxFQUFFSixLQUFLLEVBQUU1RCxPQUFPLENBQUM7TUFDckRBLE9BQU8sQ0FBQ2tFLE9BQU8sQ0FBQ04sS0FBSyxFQUFFSyxjQUFjLEVBQUUsVUFBU0YsR0FBRyxFQUFFO1FBQ25ELElBQUlBLEdBQUcsRUFBRTtVQUNQLE9BQU8vRCxPQUFPLENBQUM2RCxRQUFRLENBQUNFLEdBQUcsQ0FBQztRQUM5QjtRQUVBSixZQUFZLENBQUMsQ0FBQztNQUNoQixDQUFDLENBQUM7SUFDSixDQUFDLENBQUM7RUFDSjtFQUNBQSxZQUFZLENBQUMsQ0FBQztBQUNoQiIsImlnbm9yZUxpc3QiOltdfQ==\n","/*istanbul ignore start*/\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.createPatch = createPatch;\nexports.createTwoFilesPatch = createTwoFilesPatch;\nexports.formatPatch = formatPatch;\nexports.structuredPatch = structuredPatch;\n/*istanbul ignore end*/\nvar\n/*istanbul ignore start*/\n_line = require(\"../diff/line\")\n/*istanbul ignore end*/\n;\n/*istanbul ignore start*/ function _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\nfunction _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.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; 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); }\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\nfunction _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; }\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\n/*istanbul ignore end*/\nfunction structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) {\n if (!options) {\n options = {};\n }\n if (typeof options === 'function') {\n options = {\n callback: options\n };\n }\n if (typeof options.context === 'undefined') {\n options.context = 4;\n }\n if (options.newlineIsToken) {\n throw new Error('newlineIsToken may not be used with patch-generation functions, only with diffing functions');\n }\n if (!options.callback) {\n return diffLinesResultToPatch(\n /*istanbul ignore start*/\n (0,\n /*istanbul ignore end*/\n /*istanbul ignore start*/\n _line\n /*istanbul ignore end*/\n .\n /*istanbul ignore start*/\n diffLines)\n /*istanbul ignore end*/\n (oldStr, newStr, options));\n } else {\n var\n /*istanbul ignore start*/\n _options =\n /*istanbul ignore end*/\n options,\n /*istanbul ignore start*/\n /*istanbul ignore end*/\n _callback = _options.callback;\n /*istanbul ignore start*/\n (0,\n /*istanbul ignore end*/\n /*istanbul ignore start*/\n _line\n /*istanbul ignore end*/\n .\n /*istanbul ignore start*/\n diffLines)\n /*istanbul ignore end*/\n (oldStr, newStr,\n /*istanbul ignore start*/\n _objectSpread(_objectSpread({},\n /*istanbul ignore end*/\n options), {}, {\n callback: function\n /*istanbul ignore start*/\n callback\n /*istanbul ignore end*/\n (diff) {\n var patch = diffLinesResultToPatch(diff);\n _callback(patch);\n }\n }));\n }\n function diffLinesResultToPatch(diff) {\n // STEP 1: Build up the patch with no \"\\ No newline at end of file\" lines and with the arrays\n // of lines containing trailing newline characters. We'll tidy up later...\n\n if (!diff) {\n return;\n }\n diff.push({\n value: '',\n lines: []\n }); // Append an empty value to make cleanup easier\n\n function contextLines(lines) {\n return lines.map(function (entry) {\n return ' ' + entry;\n });\n }\n var hunks = [];\n var oldRangeStart = 0,\n newRangeStart = 0,\n curRange = [],\n oldLine = 1,\n newLine = 1;\n /*istanbul ignore start*/\n var _loop = function _loop()\n /*istanbul ignore end*/\n {\n var current = diff[i],\n lines = current.lines || splitLines(current.value);\n current.lines = lines;\n if (current.added || current.removed) {\n /*istanbul ignore start*/\n var _curRange;\n /*istanbul ignore end*/\n // If we have previous context, start with that\n if (!oldRangeStart) {\n var prev = diff[i - 1];\n oldRangeStart = oldLine;\n newRangeStart = newLine;\n if (prev) {\n curRange = options.context > 0 ? contextLines(prev.lines.slice(-options.context)) : [];\n oldRangeStart -= curRange.length;\n newRangeStart -= curRange.length;\n }\n }\n\n // Output our changes\n /*istanbul ignore start*/\n /*istanbul ignore end*/\n /*istanbul ignore start*/\n (_curRange =\n /*istanbul ignore end*/\n curRange).push.apply(\n /*istanbul ignore start*/\n _curRange\n /*istanbul ignore end*/\n ,\n /*istanbul ignore start*/\n _toConsumableArray(\n /*istanbul ignore end*/\n lines.map(function (entry) {\n return (current.added ? '+' : '-') + entry;\n })));\n\n // Track the updated file position\n if (current.added) {\n newLine += lines.length;\n } else {\n oldLine += lines.length;\n }\n } else {\n // Identical context lines. Track line changes\n if (oldRangeStart) {\n // Close out any changes that have been output (or join overlapping)\n if (lines.length <= options.context * 2 && i < diff.length - 2) {\n /*istanbul ignore start*/\n var _curRange2;\n /*istanbul ignore end*/\n // Overlapping\n /*istanbul ignore start*/\n /*istanbul ignore end*/\n /*istanbul ignore start*/\n (_curRange2 =\n /*istanbul ignore end*/\n curRange).push.apply(\n /*istanbul ignore start*/\n _curRange2\n /*istanbul ignore end*/\n ,\n /*istanbul ignore start*/\n _toConsumableArray(\n /*istanbul ignore end*/\n contextLines(lines)));\n } else {\n /*istanbul ignore start*/\n var _curRange3;\n /*istanbul ignore end*/\n // end the range and output\n var contextSize = Math.min(lines.length, options.context);\n /*istanbul ignore start*/\n /*istanbul ignore end*/\n /*istanbul ignore start*/\n (_curRange3 =\n /*istanbul ignore end*/\n curRange).push.apply(\n /*istanbul ignore start*/\n _curRange3\n /*istanbul ignore end*/\n ,\n /*istanbul ignore start*/\n _toConsumableArray(\n /*istanbul ignore end*/\n contextLines(lines.slice(0, contextSize))));\n var _hunk = {\n oldStart: oldRangeStart,\n oldLines: oldLine - oldRangeStart + contextSize,\n newStart: newRangeStart,\n newLines: newLine - newRangeStart + contextSize,\n lines: curRange\n };\n hunks.push(_hunk);\n oldRangeStart = 0;\n newRangeStart = 0;\n curRange = [];\n }\n }\n oldLine += lines.length;\n newLine += lines.length;\n }\n };\n for (var i = 0; i < diff.length; i++)\n /*istanbul ignore start*/\n {\n _loop();\n }\n\n // Step 2: eliminate the trailing `\\n` from each line of each hunk, and, where needed, add\n // \"\\ No newline at end of file\".\n /*istanbul ignore end*/\n for (\n /*istanbul ignore start*/\n var _i = 0, _hunks =\n /*istanbul ignore end*/\n hunks;\n /*istanbul ignore start*/\n _i < _hunks.length\n /*istanbul ignore end*/\n ;\n /*istanbul ignore start*/\n _i++\n /*istanbul ignore end*/\n ) {\n var hunk =\n /*istanbul ignore start*/\n _hunks[_i]\n /*istanbul ignore end*/\n ;\n for (var _i2 = 0; _i2 < hunk.lines.length; _i2++) {\n if (hunk.lines[_i2].endsWith('\\n')) {\n hunk.lines[_i2] = hunk.lines[_i2].slice(0, -1);\n } else {\n hunk.lines.splice(_i2 + 1, 0, '\\\\ No newline at end of file');\n _i2++; // Skip the line we just added, then continue iterating\n }\n }\n }\n return {\n oldFileName: oldFileName,\n newFileName: newFileName,\n oldHeader: oldHeader,\n newHeader: newHeader,\n hunks: hunks\n };\n }\n}\nfunction formatPatch(diff) {\n if (Array.isArray(diff)) {\n return diff.map(formatPatch).join('\\n');\n }\n var ret = [];\n if (diff.oldFileName == diff.newFileName) {\n ret.push('Index: ' + diff.oldFileName);\n }\n ret.push('===================================================================');\n ret.push('--- ' + diff.oldFileName + (typeof diff.oldHeader === 'undefined' ? '' : '\\t' + diff.oldHeader));\n ret.push('+++ ' + diff.newFileName + (typeof diff.newHeader === 'undefined' ? '' : '\\t' + diff.newHeader));\n for (var i = 0; i < diff.hunks.length; i++) {\n var hunk = diff.hunks[i];\n // Unified Diff Format quirk: If the chunk size is 0,\n // the first number is one lower than one would expect.\n // https://www.artima.com/weblogs/viewpost.jsp?thread=164293\n if (hunk.oldLines === 0) {\n hunk.oldStart -= 1;\n }\n if (hunk.newLines === 0) {\n hunk.newStart -= 1;\n }\n ret.push('@@ -' + hunk.oldStart + ',' + hunk.oldLines + ' +' + hunk.newStart + ',' + hunk.newLines + ' @@');\n ret.push.apply(ret, hunk.lines);\n }\n return ret.join('\\n') + '\\n';\n}\nfunction createTwoFilesPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) {\n /*istanbul ignore start*/\n var _options2;\n /*istanbul ignore end*/\n if (typeof options === 'function') {\n options = {\n callback: options\n };\n }\n if (!\n /*istanbul ignore start*/\n ((_options2 =\n /*istanbul ignore end*/\n options) !== null && _options2 !== void 0 &&\n /*istanbul ignore start*/\n _options2\n /*istanbul ignore end*/\n .callback)) {\n var patchObj = structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options);\n if (!patchObj) {\n return;\n }\n return formatPatch(patchObj);\n } else {\n var\n /*istanbul ignore start*/\n _options3 =\n /*istanbul ignore end*/\n options,\n /*istanbul ignore start*/\n /*istanbul ignore end*/\n _callback2 = _options3.callback;\n structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader,\n /*istanbul ignore start*/\n _objectSpread(_objectSpread({},\n /*istanbul ignore end*/\n options), {}, {\n callback: function\n /*istanbul ignore start*/\n callback\n /*istanbul ignore end*/\n (patchObj) {\n if (!patchObj) {\n _callback2();\n } else {\n _callback2(formatPatch(patchObj));\n }\n }\n }));\n }\n}\nfunction createPatch(fileName, oldStr, newStr, oldHeader, newHeader, options) {\n return createTwoFilesPatch(fileName, fileName, oldStr, newStr, oldHeader, newHeader, options);\n}\n\n/**\n * Split `text` into an array of lines, including the trailing newline character (where present)\n */\nfunction splitLines(text) {\n var hasTrailingNl = text.endsWith('\\n');\n var result = text.split('\\n').map(function (line)\n /*istanbul ignore start*/\n {\n return (\n /*istanbul ignore end*/\n line + '\\n'\n );\n });\n if (hasTrailingNl) {\n result.pop();\n } else {\n result.push(result.pop().slice(0, -1));\n }\n return result;\n}\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfbGluZSIsInJlcXVpcmUiLCJfdHlwZW9mIiwibyIsIlN5bWJvbCIsIml0ZXJhdG9yIiwiY29uc3RydWN0b3IiLCJwcm90b3R5cGUiLCJfdG9Db25zdW1hYmxlQXJyYXkiLCJhcnIiLCJfYXJyYXlXaXRob3V0SG9sZXMiLCJfaXRlcmFibGVUb0FycmF5IiwiX3Vuc3VwcG9ydGVkSXRlcmFibGVUb0FycmF5IiwiX25vbkl0ZXJhYmxlU3ByZWFkIiwiVHlwZUVycm9yIiwibWluTGVuIiwiX2FycmF5TGlrZVRvQXJyYXkiLCJuIiwiT2JqZWN0IiwidG9TdHJpbmciLCJjYWxsIiwic2xpY2UiLCJuYW1lIiwiQXJyYXkiLCJmcm9tIiwidGVzdCIsIml0ZXIiLCJpc0FycmF5IiwibGVuIiwibGVuZ3RoIiwiaSIsImFycjIiLCJvd25LZXlzIiwiZSIsInIiLCJ0Iiwia2V5cyIsImdldE93blByb3BlcnR5U3ltYm9scyIsImZpbHRlciIsImdldE93blByb3BlcnR5RGVzY3JpcHRvciIsImVudW1lcmFibGUiLCJwdXNoIiwiYXBwbHkiLCJfb2JqZWN0U3ByZWFkIiwiYXJndW1lbnRzIiwiZm9yRWFjaCIsIl9kZWZpbmVQcm9wZXJ0eSIsImdldE93blByb3BlcnR5RGVzY3JpcHRvcnMiLCJkZWZpbmVQcm9wZXJ0aWVzIiwiZGVmaW5lUHJvcGVydHkiLCJvYmoiLCJrZXkiLCJ2YWx1ZSIsIl90b1Byb3BlcnR5S2V5IiwiY29uZmlndXJhYmxlIiwid3JpdGFibGUiLCJfdG9QcmltaXRpdmUiLCJ0b1ByaW1pdGl2ZSIsIlN0cmluZyIsIk51bWJlciIsInN0cnVjdHVyZWRQYXRjaCIsIm9sZEZpbGVOY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FydCkge1xuICAgICAgICAgIC8vIENsb3NlIG91dCBhbnkgY2hhbmdlcyB0aGF0IGhhdmUgYmVlbiBvdXRwdXQgKG9yIGpvaW4gb3ZlcmxhcHBpbmcpXG4gICAgICAgICAgaWYgKGxpbmVzLmxlbmd0aCA8PSBvcHRpb25zLmNvbnRleHQgKiAyICYmIGkgPCBkaWZmLmxlbmd0aCAtIDIpIHtcbiAgICAgICAgICAgIC8vIE92ZXJsYXBwaW5nXG4gICAgICAgICAgICBjdXJSYW5nZS5wdXNoKC4uLiBjb250ZXh0TGluZXMobGluZXMpKTtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgLy8gZW5kIHRoZSByYW5nZSBhbmQgb3V0cHV0XG4gICAgICAgICAgICBsZXQgY29udGV4dFNpemUgPSBNYXRoLm1pbihsaW5lcy5sZW5ndGgsIG9wdGlvbnMuY29udGV4dCk7XG4gICAgICAgICAgICBjdXJSYW5nZS5wdXNoKC4uLiBjb250ZXh0TGluZXMobGluZXMuc2xpY2UoMCwgY29udGV4dFNpemUpKSk7XG5cbiAgICAgICAgICAgIGxldCBodW5rID0ge1xuICAgICAgICAgICAgICBvbGRTdGFydDogb2xkUmFuZ2VTdGFydCxcbiAgICAgICAgICAgICAgb2xkTGluZXM6IChvbGRMaW5lIC0gb2xkUmFuZ2VTdGFydCArIGNvbnRleHRTaXplKSxcbiAgICAgICAgICAgICAgbmV3U3RhcnQ6IG5ld1JhbmdlU3RhcnQsXG4gICAgICAgICAgICAgIG5ld0xpbmVzOiAobmV3TGluZSAtIG5ld1JhbmdlU3RhcnQgKyBjb250ZXh0U2l6ZSksXG4gICAgICAgICAgICAgIGxpbmVzOiBjdXJSYW5nZVxuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIGh1bmtzLnB1c2goaHVuayk7XG5cbiAgICAgICAgICAgIG9sZFJhbmdlU3RhcnQgPSAwO1xuICAgICAgICAgICAgbmV3UmFuZ2VTdGFydCA9IDA7XG4gICAgICAgICAgIC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"__esModule\", {\n value: true\n});\nexports.arrayEqual = arrayEqual;\nexports.arrayStartsWith = arrayStartsWith;\n/*istanbul ignore end*/\nfunction arrayEqual(a, b) {\n if (a.length !== b.length) {\n return false;\n }\n return arrayStartsWith(a, b);\n}\nfunction arrayStartsWith(array, start) {\n if (start.length > array.length) {\n return false;\n }\n for (var i = 0; i < start.length; i++) {\n if (start[i] !== array[i]) {\n return false;\n }\n }\n return true;\n}\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJhcnJheUVxdWFsIiwiYSIsImIiLCJsZW5ndGgiLCJhcnJheVN0YXJ0c1dpdGgiLCJhcnJheSIsInN0YXJ0IiwiaSJdLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy91dGlsL2FycmF5LmpzIl0sInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBmdW5jdGlvbiBhcnJheUVxdWFsKGEsIGIpIHtcbiAgaWYgKGEubGVuZ3RoICE9PSBiLmxlbmd0aCkge1xuICAgIHJldHVybiBmYWxzZTtcbiAgfVxuXG4gIHJldHVybiBhcnJheVN0YXJ0c1dpdGgoYSwgYik7XG59XG5cbmV4cG9ydCBmdW5jdGlvbiBhcnJheVN0YXJ0c1dpdGgoYXJyYXksIHN0YXJ0KSB7XG4gIGlmIChzdGFydC5sZW5ndGggPiBhcnJheS5sZW5ndGgpIHtcbiAgICByZXR1cm4gZmFsc2U7XG4gIH1cblxuICBmb3IgKGxldCBpID0gMDsgaSA8IHN0YXJ0Lmxlbmd0aDsgaSsrKSB7XG4gICAgaWYgKHN0YXJ0W2ldICE9PSBhcnJheVtpXSkge1xuICAgICAgcmV0dXJuIGZhbHNlO1xuICAgIH1cbiAgfVxuXG4gIHJldHVybiB0cnVlO1xufVxuIl0sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7QUFBTyxTQUFTQSxVQUFVQSxDQUFDQyxDQUFDLEVBQUVDLENBQUMsRUFBRTtFQUMvQixJQUFJRCxDQUFDLENBQUNFLE1BQU0sS0FBS0QsQ0FBQyxDQUFDQyxNQUFNLEVBQUU7SUFDekIsT0FBTyxLQUFLO0VBQ2Q7RUFFQSxPQUFPQyxlQUFlLENBQUNILENBQUMsRUFBRUMsQ0FBQyxDQUFDO0FBQzlCO0FBRU8sU0FBU0UsZUFBZUEsQ0FBQ0MsS0FBSyxFQUFFQyxLQUFLLEVBQUU7RUFDNUMsSUFBSUEsS0FBSyxDQUFDSCxNQUFNLEdBQUdFLEtBQUssQ0FBQ0YsTUFBTSxFQUFFO0lBQy9CLE9BQU8sS0FBSztFQUNkO0VBRUEsS0FBSyxJQUFJSSxDQUFDLEdBQUcsQ0FBQyxFQUFFQSxDQUFDLEdBQUdELEtBQUssQ0FBQ0gsTUFBTSxFQUFFSSxDQUFDLEVBQUUsRUFBRTtJQUNyQyxJQUFJRCxLQUFLLENBQUNDLENBQUMsQ0FBQyxLQUFLRixLQUFLLENBQUNFLENBQUMsQ0FBQyxFQUFFO01BQ3pCLE9BQU8sS0FBSztJQUNkO0VBQ0Y7RUFFQSxPQUFPLElBQUk7QUFDYiIsImlnbm9yZUxpc3QiOltdfQ==\n","/*istanbul ignore start*/\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.calcLineCount = calcLineCount;\nexports.merge = merge;\n/*istanbul ignore end*/\nvar\n/*istanbul ignore start*/\n_create = require(\"./create\")\n/*istanbul ignore end*/\n;\nvar\n/*istanbul ignore start*/\n_parse = require(\"./parse\")\n/*istanbul ignore end*/\n;\nvar\n/*istanbul ignore start*/\n_array = require(\"../util/array\")\n/*istanbul ignore end*/\n;\n/*istanbul ignore start*/ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\nfunction _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.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; 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); }\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\nfunction _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; }\n/*istanbul ignore end*/\nfunction calcLineCount(hunk) {\n var\n /*istanbul ignore start*/\n _calcOldNewLineCount =\n /*istanbul ignore end*/\n calcOldNewLineCount(hunk.lines),\n /*istanbul ignore start*/\n /*istanbul ignore end*/\n oldLines = _calcOldNewLineCount.oldLines,\n /*istanbul ignore start*/\n /*istanbul ignore end*/\n newLines = _calcOldNewLineCount.newLines;\n if (oldLines !== undefined) {\n hunk.oldLines = oldLines;\n } else {\n delete hunk.oldLines;\n }\n if (newLines !== undefined) {\n hunk.newLines = newLines;\n } else {\n delete hunk.newLines;\n }\n}\nfunction merge(mine, theirs, base) {\n mine = loadPatch(mine, base);\n theirs = loadPatch(theirs, base);\n var ret = {};\n\n // For index we just let it pass through as it doesn't have any necessary meaning.\n // Leaving sanity checks on this to the API consumer that may know more about the\n // meaning in their own context.\n if (mine.index || theirs.index) {\n ret.index = mine.index || theirs.index;\n }\n if (mine.newFileName || theirs.newFileName) {\n if (!fileNameChanged(mine)) {\n // No header or no change in ours, use theirs (and ours if theirs does not exist)\n ret.oldFileName = theirs.oldFileName || mine.oldFileName;\n ret.newFileName = theirs.newFileName || mine.newFileName;\n ret.oldHeader = theirs.oldHeader || mine.oldHeader;\n ret.newHeader = theirs.newHeader || mine.newHeader;\n } else if (!fileNameChanged(theirs)) {\n // No header or no change in theirs, use ours\n ret.oldFileName = mine.oldFileName;\n ret.newFileName = mine.newFileName;\n ret.oldHeader = mine.oldHeader;\n ret.newHeader = mine.newHeader;\n } else {\n // Both changed... figure it out\n ret.oldFileName = selectField(ret, mine.oldFileName, theirs.oldFileName);\n ret.newFileName = selectField(ret, mine.newFileName, theirs.newFileName);\n ret.oldHeader = selectField(ret, mine.oldHeader, theirs.oldHeader);\n ret.newHeader = selectField(ret, mine.newHeader, theirs.newHeader);\n }\n }\n ret.hunks = [];\n var mineIndex = 0,\n theirsIndex = 0,\n mineOffset = 0,\n theirsOffset = 0;\n while (mineIndex < mine.hunks.length || theirsIndex < theirs.hunks.length) {\n var mineCurrent = mine.hunks[mineIndex] || {\n oldStart: Infinity\n },\n theirsCurrent = theirs.hunks[theirsIndex] || {\n oldStart: Infinity\n };\n if (hunkBefore(mineCurrent, theirsCurrent)) {\n // This patch does not overlap with any of the others, yay.\n ret.hunks.push(cloneHunk(mineCurrent, mineOffset));\n mineIndex++;\n theirsOffset += mineCurrent.newLines - mineCurrent.oldLines;\n } else if (hunkBefore(theirsCurrent, mineCurrent)) {\n // This patch does not overlap with any of the others, yay.\n ret.hunks.push(cloneHunk(theirsCurrent, theirsOffset));\n theirsIndex++;\n mineOffset += theirsCurrent.newLines - theirsCurrent.oldLines;\n } else {\n // Overlap, merge as best we can\n var mergedHunk = {\n oldStart: Math.min(mineCurrent.oldStart, theirsCurrent.oldStart),\n oldLines: 0,\n newStart: Math.min(mineCurrent.newStart + mineOffset, theirsCurrent.oldStart + theirsOffset),\n newLines: 0,\n lines: []\n };\n mergeLines(mergedHunk, mineCurrent.oldStart, mineCurrent.lines, theirsCurrent.oldStart, theirsCurrent.lines);\n theirsIndex++;\n mineIndex++;\n ret.hunks.push(mergedHunk);\n }\n }\n return ret;\n}\nfunction loadPatch(param, base) {\n if (typeof param === 'string') {\n if (/^@@/m.test(param) || /^Index:/m.test(param)) {\n return (\n /*istanbul ignore start*/\n (0,\n /*istanbul ignore end*/\n /*istanbul ignore start*/\n _parse\n /*istanbul ignore end*/\n .\n /*istanbul ignore start*/\n parsePatch)\n /*istanbul ignore end*/\n (param)[0]\n );\n }\n if (!base) {\n throw new Error('Must provide a base reference or pass in a patch');\n }\n return (\n /*istanbul ignore start*/\n (0,\n /*istanbul ignore end*/\n /*istanbul ignore start*/\n _create\n /*istanbul ignore end*/\n .\n /*istanbul ignore start*/\n structuredPatch)\n /*istanbul ignore end*/\n (undefined, undefined, base, param)\n );\n }\n return param;\n}\nfunction fileNameChanged(patch) {\n return patch.newFileName && patch.newFileName !== patch.oldFileName;\n}\nfunction selectField(index, mine, theirs) {\n if (mine === theirs) {\n return mine;\n } else {\n index.conflict = true;\n return {\n mine: mine,\n theirs: theirs\n };\n }\n}\nfunction hunkBefore(test, check) {\n return test.oldStart < check.oldStart && test.oldStart + test.oldLines < check.oldStart;\n}\nfunction cloneHunk(hunk, offset) {\n return {\n oldStart: hunk.oldStart,\n oldLines: hunk.oldLines,\n newStart: hunk.newStart + offset,\n newLines: hunk.newLines,\n lines: hunk.lines\n };\n}\nfunction mergeLines(hunk, mineOffset, mineLines, theirOffset, theirLines) {\n // This will generally result in a conflicted hunk, but there are cases where the context\n // is the only overlap where we can successfully merge the content here.\n var mine = {\n offset: mineOffset,\n lines: mineLines,\n index: 0\n },\n their = {\n offset: theirOffset,\n lines: theirLines,\n index: 0\n };\n\n // Handle any leading content\n insertLeading(hunk, mine, their);\n insertLeading(hunk, their, mine);\n\n // Now in the overlap content. Scan through and select the best changes from each.\n while (mine.index < mine.lines.length && their.index < their.lines.length) {\n var mineCurrent = mine.lines[mine.index],\n theirCurrent = their.lines[their.index];\n if ((mineCurrent[0] === '-' || mineCurrent[0] === '+') && (theirCurrent[0] === '-' || theirCurrent[0] === '+')) {\n // Both modified ...\n mutualChange(hunk, mine, their);\n } else if (mineCurrent[0] === '+' && theirCurrent[0] === ' ') {\n /*istanbul ignore start*/\n var _hunk$lines;\n /*istanbul ignore end*/\n // Mine inserted\n /*istanbul ignore start*/\n /*istanbul ignore end*/\n /*istanbul ignore start*/\n (_hunk$lines =\n /*istanbul ignore end*/\n hunk.lines).push.apply(\n /*istanbul ignore start*/\n _hunk$lines\n /*istanbul ignore end*/\n ,\n /*istanbul ignore start*/\n _toConsumableArray(\n /*istanbul ignore end*/\n collectChange(mine)));\n } else if (theirCurrent[0] === '+' && mineCurrent[0] === ' ') {\n /*istanbul ignore start*/\n var _hunk$lines2;\n /*istanbul ignore end*/\n // Theirs inserted\n /*istanbul ignore start*/\n /*istanbul ignore end*/\n /*istanbul ignore start*/\n (_hunk$lines2 =\n /*istanbul ignore end*/\n hunk.lines).push.apply(\n /*istanbul ignore start*/\n _hunk$lines2\n /*istanbul ignore end*/\n ,\n /*istanbul ignore start*/\n _toConsumableArray(\n /*istanbul ignore end*/\n collectChange(their)));\n } else if (mineCurrent[0] === '-' && theirCurrent[0] === ' ') {\n // Mine removed or edited\n removal(hunk, mine, their);\n } else if (theirCurrent[0] === '-' && mineCurrent[0] === ' ') {\n // Their removed or edited\n removal(hunk, their, mine, true);\n } else if (mineCurrent === theirCurrent) {\n // Context identity\n hunk.lines.push(mineCurrent);\n mine.index++;\n their.index++;\n } else {\n // Context mismatch\n conflict(hunk, collectChange(mine), collectChange(their));\n }\n }\n\n // Now push anything that may be remaining\n insertTrailing(hunk, mine);\n insertTrailing(hunk, their);\n calcLineCount(hunk);\n}\nfunction mutualChange(hunk, mine, their) {\n var myChanges = collectChange(mine),\n theirChanges = collectChange(their);\n if (allRemoves(myChanges) && allRemoves(theirChanges)) {\n // Special case for remove changes that are supersets of one another\n if (\n /*istanbul ignore start*/\n (0,\n /*istanbul ignore end*/\n /*istanbul ignore start*/\n _array\n /*istanbul ignore end*/\n .\n /*istanbul ignore start*/\n arrayStartsWith)\n /*istanbul ignore end*/\n (myChanges, theirChanges) && skipRemoveSuperset(their, myChanges, myChanges.length - theirChanges.length)) {\n /*istanbul ignore start*/\n var _hunk$lines3;\n /*istanbul ignore end*/\n /*istanbul ignore start*/\n /*istanbul ignore end*/\n /*istanbul ignore start*/\n (_hunk$lines3 =\n /*istanbul ignore end*/\n hunk.lines).push.apply(\n /*istanbul ignore start*/\n _hunk$lines3\n /*istanbul ignore end*/\n ,\n /*istanbul ignore start*/\n _toConsumableArray(\n /*istanbul ignore end*/\n myChanges));\n return;\n } else if (\n /*istanbul ignore start*/\n (0,\n /*istanbul ignore end*/\n /*istanbul ignore start*/\n _array\n /*istanbul ignore end*/\n .\n /*istanbul ignore start*/\n arrayStartsWith)\n /*istanbul ignore end*/\n (theirChanges, myChanges) && skipRemoveSuperset(mine, theirChanges, theirChanges.length - myChanges.length)) {\n /*istanbul ignore start*/\n var _hunk$lines4;\n /*istanbul ignore end*/\n /*istanbul ignore start*/\n /*istanbul ignore end*/\n /*istanbul ignore start*/\n (_hunk$lines4 =\n /*istanbul ignore end*/\n hunk.lines).push.apply(\n /*istanbul ignore start*/\n _hunk$lines4\n /*istanbul ignore end*/\n ,\n /*istanbul ignore start*/\n _toConsumableArray(\n /*istanbul ignore end*/\n theirChanges));\n return;\n }\n } else if (\n /*istanbul ignore start*/\n (0,\n /*istanbul ignore end*/\n /*istanbul ignore start*/\n _array\n /*istanbul ignore end*/\n .\n /*istanbul ignore start*/\n arrayEqual)\n /*istanbul ignore end*/\n (myChanges, theirChanges)) {\n /*istanbul ignore start*/\n var _hunk$lines5;\n /*istanbul ignore end*/\n /*istanbul ignore start*/\n /*istanbul ignore end*/\n /*istanbul ignore start*/\n (_hunk$lines5 =\n /*istanbul ignore end*/\n hunk.lines).push.apply(\n /*istanbul ignore start*/\n _hunk$lines5\n /*istanbul ignore end*/\n ,\n /*istanbul ignore start*/\n _toConsumableArray(\n /*istanbul ignore end*/\n myChanges));\n return;\n }\n conflict(hunk, myChanges, theirChanges);\n}\nfunction removal(hunk, mine, their, swap) {\n var myChanges = collectChange(mine),\n theirChanges = collectContext(their, myChanges);\n if (theirChanges.merged) {\n /*istanbul ignore start*/\n var _hunk$lines6;\n /*istanbul ignore end*/\n /*istanbul ignore start*/\n /*istanbul ignore end*/\n /*istanbul ignore start*/\n (_hunk$lines6 =\n /*istanbul ignore end*/\n hunk.lines).push.apply(\n /*istanbul ignore start*/\n _hunk$lines6\n /*istanbul ignore end*/\n ,\n /*istanbul ignore start*/\n _toConsumableArray(\n /*istanbul ignore end*/\n theirChanges.merged));\n } else {\n conflict(hunk, swap ? theirChanges : myChanges, swap ? myChanges : theirChanges);\n }\n}\nfunction conflict(hunk, mine, their) {\n hunk.conflict = true;\n hunk.lines.push({\n conflict: true,\n mine: mine,\n theirs: their\n });\n}\nfunction insertLeading(hunk, insert, their) {\n while (insert.offset < their.offset && insert.index < insert.lines.length) {\n var line = insert.lines[insert.index++];\n hunk.lines.push(line);\n insert.offset++;\n }\n}\nfunction insertTrailing(hunk, insert) {\n while (insert.index < insert.lines.length) {\n var line = insert.lines[insert.index++];\n hunk.lines.push(line);\n }\n}\nfunction collectChange(state) {\n var ret = [],\n operation = state.lines[state.index][0];\n while (state.index < state.lines.length) {\n var line = state.lines[state.index];\n\n // Group additions that are immediately after subtractions and treat them as one \"atomic\" modify change.\n if (operation === '-' && line[0] === '+') {\n operation = '+';\n }\n if (operation === line[0]) {\n ret.push(line);\n state.index++;\n } else {\n break;\n }\n }\n return ret;\n}\nfunction collectContext(state, matchChanges) {\n var changes = [],\n merged = [],\n matchIndex = 0,\n contextChanges = false,\n conflicted = false;\n while (matchIndex < matchChanges.length && state.index < state.lines.length) {\n var change = state.lines[state.index],\n match = matchChanges[matchIndex];\n\n // Once we've hit our add, then we are done\n if (match[0] === '+') {\n break;\n }\n contextChanges = contextChanges || change[0] !== ' ';\n merged.push(match);\n matchIndex++;\n\n // Consume any additions in the other block as a conflict to attempt\n // to pull in the remaining context after this\n if (change[0] === '+') {\n conflicted = true;\n while (change[0] === '+') {\n changes.push(change);\n change = state.lines[++state.index];\n }\n }\n if (match.substr(1) === change.substr(1)) {\n changes.push(change);\n state.index++;\n } else {\n conflicted = true;\n }\n }\n if ((matchChanges[matchIndex] || '')[0] === '+' && contextChanges) {\n conflicted = true;\n }\n if (conflicted) {\n return changes;\n }\n while (matchIndex < matchChanges.length) {\n merged.push(matchChanges[matchIndex++]);\n }\n return {\n merged: merged,\n changes: changes\n };\n}\nfunction allRemoves(changes) {\n return changes.reduce(function (prev, change) {\n return prev && change[0] === '-';\n }, true);\n}\nfunction skipRemoveSuperset(state, removeChanges, delta) {\n for (var i = 0; i < delta; i++) {\n var changeContent = removeChanges[removeChanges.length - delta + i].substr(1);\n if (state.lines[state.index + i] !== ' ' + changeContent) {\n return false;\n }\n }\n state.index += delta;\n return true;\n}\nfunction calcOldNewLineCount(lines) {\n var oldLines = 0;\n var newLines = 0;\n lines.forEach(function (line) {\n if (typeof line !== 'string') {\n var myCount = calcOldNewLineCount(line.mine);\n var theirCount = calcOldNewLineCount(line.theirs);\n if (oldLines !== undefined) {\n if (myCount.oldLines === theirCount.oldLines) {\n oldLines += myCount.oldLines;\n } else {\n oldLines = undefined;\n }\n }\n if (newLines !== undefined) {\n if (myCount.newLines === theirCount.newLines) {\n newLines += myCount.newLines;\n } else {\n newLines = undefined;\n }\n }\n } else {\n if (newLines !== undefined && (line[0] === '+' || line[0] === ' ')) {\n newLines++;\n }\n if (oldLines !== undefined && (line[0] === '-' || line[0] === ' ')) {\n oldLines++;\n }\n }\n });\n return {\n oldLines: oldLines,\n newLines: newLines\n };\n}\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfY3JlYXRlIiwicmVxdWlyZSIsIl9wYXJzZSIsIl9hcnJheSIsIl90b0NvbnN1bWFibGVBcnJheSIsImFyciIsIl9hcnJheVdpdGhvdXRIb2xlcyIsIl9pdGVyYWJsZVRvQXJyYXkiLCJfdW5zdXBwb3J0ZWRJdGVyYWJsZVRvQXJy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FO01BQ1o7TUFDQSxJQUFJRCxRQUFRLEtBQUtFLFNBQVMsS0FBS2tFLElBQUksQ0FBQyxDQUFDLENBQUMsS0FBSyxHQUFHLElBQUlBLElBQUksQ0FBQyxDQUFDLENBQUMsS0FBSyxHQUFHLENBQUMsRUFBRTtRQUNsRXBFLFFBQVEsRUFBRTtNQUNaO0lBQ0Y7RUFDRixDQUFDLENBQUM7RUFFRixPQUFPO0lBQUNBLFFBQVEsRUFBUkEsUUFBUTtJQUFFQyxRQUFRLEVBQVJBO0VBQVEsQ0FBQztBQUM3QiIsImlnbm9yZUxpc3QiOltdfQ==\n","/*istanbul ignore start*/\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.reversePatch = reversePatch;\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\n/*istanbul ignore end*/\nfunction reversePatch(structuredPatch) {\n if (Array.isArray(structuredPatch)) {\n return structuredPatch.map(reversePatch).reverse();\n }\n return (\n /*istanbul ignore start*/\n _objectSpread(_objectSpread({},\n /*istanbul ignore end*/\n structuredPatch), {}, {\n oldFileName: structuredPatch.newFileName,\n oldHeader: structuredPatch.newHeader,\n newFileName: structuredPatch.oldFileName,\n newHeader: structuredPatch.oldHeader,\n hunks: structuredPatch.hunks.map(function (hunk) {\n return {\n oldLines: hunk.newLines,\n oldStart: hunk.newStart,\n newLines: hunk.oldLines,\n newStart: hunk.oldStart,\n lines: hunk.lines.map(function (l) {\n if (l.startsWith('-')) {\n return (\n /*istanbul ignore start*/\n \"+\".concat(\n /*istanbul ignore end*/\n l.slice(1))\n );\n }\n if (l.startsWith('+')) {\n return (\n /*istanbul ignore start*/\n \"-\".concat(\n /*istanbul ignore end*/\n l.slice(1))\n );\n }\n return l;\n })\n };\n })\n })\n );\n}\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJyZXZlcnNlUGF0Y2giLCJzdHJ1Y3R1cmVkUGF0Y2giLCJBcnJheSIsImlzQXJyYXkiLCJtYXAiLCJyZXZlcnNlIiwiX29iamVjdFNwcmVhZCIsIm9sZEZpbGVOYW1lIiwibmV3RmlsZU5hbWUiLCJvbGRIZWFkZXIiLCJuZXdIZWFkZXIiLCJodW5rcyIsImh1bmsiLCJvbGRMaW5lcyIsIm5ld0xpbmVzIiwib2xkU3RhcnQiLCJuZXdTdGFydCIsImxpbmVzIiwibCIsInN0YXJ0c1dpdGgiLCJjb25jY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BQSxJQUFBQyxNQUFBO2dCQUFBO2dCQUFXRixDQUFDLENBQUNHLEtBQUssQ0FBQyxDQUFDLENBQUM7Y0FBQTtZQUFJO1lBQ2xELElBQUlILENBQUMsQ0FBQ0MsVUFBVSxDQUFDLEdBQUcsQ0FBQyxFQUFFO2NBQUU7Z0JBQUE7Z0JBQUEsSUFBQUMsTUFBQTtnQkFBQTtnQkFBV0YsQ0FBQyxDQUFDRyxLQUFLLENBQUMsQ0FBQyxDQUFDO2NBQUE7WUFBSTtZQUNsRCxPQUFPSCxDQUFDO1VBQ1YsQ0FBQztRQUNILENBQUM7TUFDSCxDQUFDO0lBQUM7RUFBQTtBQUVOIiwiaWdub3JlTGlzdCI6W119\n","/*istanbul ignore start*/\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.convertChangesToDMP = convertChangesToDMP;\n/*istanbul ignore end*/\n// See: http://code.google.com/p/google-diff-match-patch/wiki/API\nfunction convertChangesToDMP(changes) {\n var ret = [],\n change,\n operation;\n for (var i = 0; i < changes.length; i++) {\n change = changes[i];\n if (change.added) {\n operation = 1;\n } else if (change.removed) {\n operation = -1;\n } else {\n operation = 0;\n }\n ret.push([operation, change.value]);\n }\n return ret;\n}\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJjb252ZXJ0Q2hhbmdlc1RvRE1QIiwiY2hhbmdlcyIsInJldCIsImNoYW5nZSIsIm9wZXJhdGlvbiIsImkiLCJsZW5ndGgiLCJhZGRlZCIsInJlbW92ZWQiLCJwdXNoIiwidmFsdWUiXSwic291cmNlcyI6WyIuLi8uLi9zcmMvY29udmVydC9kbXAuanMiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gU2VlOiBodHRwOi8vY29kZS5nb29nbGUuY29tL3AvZ29vZ2xlLWRpZmYtbWF0Y2gtcGF0Y2gvd2lraS9BUElcbmV4cG9ydCBmdW5jdGlvbiBjb252ZXJ0Q2hh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DQUFDLENBQUNMLFNBQVMsRUFBRUQsTUFBTSxDQUFDTyxLQUFLLENBQUMsQ0FBQztFQUNyQztFQUNBLE9BQU9SLEdBQUc7QUFDWiIsImlnbm9yZUxpc3QiOltdfQ==\n","/*istanbul ignore start*/\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.convertChangesToXML = convertChangesToXML;\n/*istanbul ignore end*/\nfunction convertChangesToXML(changes) {\n var ret = [];\n for (var i = 0; i < changes.length; i++) {\n var change = changes[i];\n if (change.added) {\n ret.push('');\n } else if (change.removed) {\n ret.push('');\n }\n ret.push(escapeHTML(change.value));\n if (change.added) {\n ret.push('');\n } else if (change.removed) {\n ret.push('');\n }\n }\n return ret.join('');\n}\nfunction escapeHTML(s) {\n var n = s;\n n = n.replace(/&/g, '&');\n n = n.replace(//g, '>');\n n = n.replace(/\"/g, '"');\n return n;\n}\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJjb252ZXJ0Q2hhbmdlc1RvWE1MIiwiY2hhbmdlcyIsInJldCIsImkiLCJsZW5ndGgiLCJjaGFuZ2UiLCJhZGRlZCIsInB1c2giLCJyZW1vdmVkIiwiZXNjYXBlSFRNTCIsInZhbHVlIiwiam9pbiIsInMiLCJuIiwicmVwbGFjZSJdLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb252ZXJ0L3htbC5qcyJdLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgZnVuY3Rpb24gY29udmVydENoYW5nZXNUb1hNTChjaGFuZ2VzKSB7XG4gIGxldCByZXQgPSBbXTtcbiAgZm9yIChsZXQgaSA9IDA7IGkgPCBjaGFuZ2VzLmxlbmd0aDsgaSsrKSB7XG4gICAgbGV0IGNoYW5nZSA9IGNoYW5nZXNbaV07XG4gICAgaWYgKGNoYW5nZS5hZGRlZCkge1xuICAgICAgcmV0LnB1c2goJzxpbnM+Jyk7XG4gICAgfSBlbHNlI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SxDQUFDLE9BQU8sQ0FBQztJQUNuQjtJQUVBTCxHQUFHLENBQUNLLElBQUksQ0FBQ0UsVUFBVSxDQUFDSixNQUFNLENBQUNLLEtBQUssQ0FBQyxDQUFDO0lBRWxDLElBQUlMLE1BQU0sQ0FBQ0MsS0FBSyxFQUFFO01BQ2hCSixHQUFHLENBQUNLLElBQUksQ0FBQyxRQUFRLENBQUM7SUFDcEIsQ0FBQyxNQUFNLElBQUlGLE1BQU0sQ0FBQ0csT0FBTyxFQUFFO01BQ3pCTixHQUFHLENBQUNLLElBQUksQ0FBQyxRQUFRLENBQUM7SUFDcEI7RUFDRjtFQUNBLE9BQU9MLEdBQUcsQ0FBQ1MsSUFBSSxDQUFDLEVBQUUsQ0FBQztBQUNyQjtBQUVBLFNBQVNGLFVBQVVBLENBQUNHLENBQUMsRUFBRTtFQUNyQixJQUFJQyxDQUFDLEdBQUdELENBQUM7RUFDVEMsQ0FBQyxHQUFHQSxDQUFDLENBQUNDLE9BQU8sQ0FBQyxJQUFJLEVBQUUsT0FBTyxDQUFDO0VBQzVCRCxDQUFDLEdBQUdBLENBQUMsQ0FBQ0MsT0FBTyxDQUFDLElBQUksRUFBRSxNQUFNLENBQUM7RUFDM0JELENBQUMsR0FBR0EsQ0FBQyxDQUFDQyxPQUFPLENBQUMsSUFBSSxFQUFFLE1BQU0sQ0FBQztFQUMzQkQsQ0FBQyxHQUFHQSxDQUFDLENBQUNDLE9BQU8sQ0FBQyxJQUFJLEVBQUUsUUFBUSxDQUFDO0VBRTdCLE9BQU9ELENBQUM7QUFDViIsImlnbm9yZUxpc3QiOltdfQ==\n","/*istanbul ignore start*/\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"Diff\", {\n enumerable: true,\n get: function get() {\n return _base[\"default\"];\n }\n});\nObject.defineProperty(exports, \"applyPatch\", {\n enumerable: true,\n get: function get() {\n return _apply.applyPatch;\n }\n});\nObject.defineProperty(exports, \"applyPatches\", {\n enumerable: true,\n get: function get() {\n return _apply.applyPatches;\n }\n});\nObject.defineProperty(exports, \"canonicalize\", {\n enumerable: true,\n get: function get() {\n return _json.canonicalize;\n }\n});\nObject.defineProperty(exports, \"convertChangesToDMP\", {\n enumerable: true,\n get: function get() {\n return _dmp.convertChangesToDMP;\n }\n});\nObject.defineProperty(exports, \"convertChangesToXML\", {\n enumerable: true,\n get: function get() {\n return _xml.convertChangesToXML;\n }\n});\nObject.defineProperty(exports, \"createPatch\", {\n enumerable: true,\n get: function get() {\n return _create.createPatch;\n }\n});\nObject.defineProperty(exports, \"createTwoFilesPatch\", {\n enumerable: true,\n get: function get() {\n return _create.createTwoFilesPatch;\n }\n});\nObject.defineProperty(exports, \"diffArrays\", {\n enumerable: true,\n get: function get() {\n return _array.diffArrays;\n }\n});\nObject.defineProperty(exports, \"diffChars\", {\n enumerable: true,\n get: function get() {\n return _character.diffChars;\n }\n});\nObject.defineProperty(exports, \"diffCss\", {\n enumerable: true,\n get: function get() {\n return _css.diffCss;\n }\n});\nObject.defineProperty(exports, \"diffJson\", {\n enumerable: true,\n get: function get() {\n return _json.diffJson;\n }\n});\nObject.defineProperty(exports, \"diffLines\", {\n enumerable: true,\n get: function get() {\n return _line.diffLines;\n }\n});\nObject.defineProperty(exports, \"diffSentences\", {\n enumerable: true,\n get: function get() {\n return _sentence.diffSentences;\n }\n});\nObject.defineProperty(exports, \"diffTrimmedLines\", {\n enumerable: true,\n get: function get() {\n return _line.diffTrimmedLines;\n }\n});\nObject.defineProperty(exports, \"diffWords\", {\n enumerable: true,\n get: function get() {\n return _word.diffWords;\n }\n});\nObject.defineProperty(exports, \"diffWordsWithSpace\", {\n enumerable: true,\n get: function get() {\n return _word.diffWordsWithSpace;\n }\n});\nObject.defineProperty(exports, \"formatPatch\", {\n enumerable: true,\n get: function get() {\n return _create.formatPatch;\n }\n});\nObject.defineProperty(exports, \"merge\", {\n enumerable: true,\n get: function get() {\n return _merge.merge;\n }\n});\nObject.defineProperty(exports, \"parsePatch\", {\n enumerable: true,\n get: function get() {\n return _parse.parsePatch;\n }\n});\nObject.defineProperty(exports, \"reversePatch\", {\n enumerable: true,\n get: function get() {\n return _reverse.reversePatch;\n }\n});\nObject.defineProperty(exports, \"structuredPatch\", {\n enumerable: true,\n get: function get() {\n return _create.structuredPatch;\n }\n});\n/*istanbul ignore end*/\nvar\n/*istanbul ignore start*/\n_base = _interopRequireDefault(require(\"./diff/base\"))\n/*istanbul ignore end*/\n;\nvar\n/*istanbul ignore start*/\n_character = require(\"./diff/character\")\n/*istanbul ignore end*/\n;\nvar\n/*istanbul ignore start*/\n_word = require(\"./diff/word\")\n/*istanbul ignore end*/\n;\nvar\n/*istanbul ignore start*/\n_line = require(\"./diff/line\")\n/*istanbul ignore end*/\n;\nvar\n/*istanbul ignore start*/\n_sentence = require(\"./diff/sentence\")\n/*istanbul ignore end*/\n;\nvar\n/*istanbul ignore start*/\n_css = require(\"./diff/css\")\n/*istanbul ignore end*/\n;\nvar\n/*istanbul ignore start*/\n_json = require(\"./diff/json\")\n/*istanbul ignore end*/\n;\nvar\n/*istanbul ignore start*/\n_array = require(\"./diff/array\")\n/*istanbul ignore end*/\n;\nvar\n/*istanbul ignore start*/\n_apply = require(\"./patch/apply\")\n/*istanbul ignore end*/\n;\nvar\n/*istanbul ignore start*/\n_parse = require(\"./patch/parse\")\n/*istanbul ignore end*/\n;\nvar\n/*istanbul ignore start*/\n_merge = require(\"./patch/merge\")\n/*istanbul ignore end*/\n;\nvar\n/*istanbul ignore start*/\n_reverse = require(\"./patch/reverse\")\n/*istanbul ignore end*/\n;\nvar\n/*istanbul ignore start*/\n_create = require(\"./patch/create\")\n/*istanbul ignore end*/\n;\nvar\n/*istanbul ignore start*/\n_dmp = require(\"./convert/dmp\")\n/*istanbul ignore end*/\n;\nvar\n/*istanbul ignore start*/\n_xml = require(\"./convert/xml\")\n/*istanbul ignore end*/\n;\n/*istanbul ignore start*/ function _interopRequireDefault(obj) { return obj && obj.__esModule ?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PQUFBO0FBQUE7QUFBQTtBQUNBO0FBQUE7QUFBQUksU0FBQSxHQUFBSixPQUFBO0FBQUE7QUFBQTtBQUVBO0FBQUE7QUFBQUssSUFBQSxHQUFBTCxPQUFBO0FBQUE7QUFBQTtBQUNBO0FBQUE7QUFBQU0sS0FBQSxHQUFBTixPQUFBO0FBQUE7QUFBQTtBQUVBO0FBQUE7QUFBQU8sTUFBQSxHQUFBUCxPQUFBO0FBQUE7QUFBQTtBQUVBO0FBQUE7QUFBQVEsTUFBQSxHQUFBUixPQUFBO0FBQUE7QUFBQTtBQUNBO0FBQUE7QUFBQVMsTUFBQSxHQUFBVCxPQUFBO0FBQUE7QUFBQTtBQUNBO0FBQUE7QUFBQVUsTUFBQSxHQUFBVixPQUFBO0FBQUE7QUFBQTtBQUNBO0FBQUE7QUFBQVcsUUFBQSxHQUFBWCxPQUFBO0FBQUE7QUFBQTtBQUNBO0FBQUE7QUFBQVksT0FBQSxHQUFBWixPQUFBO0FBQUE7QUFBQTtBQUVBO0FBQUE7QUFBQWEsSUFBQSxHQUFBYixPQUFBO0FBQUE7QUFBQTtBQUNBO0FBQUE7QUFBQWMsSUFBQSxHQUFBZCxPQUFBO0FBQUE7QUFBQTtBQUFrRCxtQ0FBQUQsdUJBQUFnQixHQUFBLFdBQUFBLEdBQUEsSUFBQUEsR0FBQSxDQUFBQyxVQUFBLEdBQUFELEdBQUEsZ0JBQUFBLEdBQUE7QUFBQSIsImlnbm9yZUxpc3QiOltdfQ==\n","/**\n * Helpers.\n */\n\nvar s = 1000;\nvar m = s * 60;\nvar h = m * 60;\nvar d = h * 24;\nvar w = d * 7;\nvar y = d * 365.25;\n\n/**\n * Parse or format the given `val`.\n *\n * Options:\n *\n * - `long` verbose formatting [false]\n *\n * @param {String|Number} val\n * @param {Object} [options]\n * @throws {Error} throw an error if val is not a non-empty string or a number\n * @return {String|Number}\n * @api public\n */\n\nmodule.exports = function (val, options) {\n options = options || {};\n var type = typeof val;\n if (type === 'string' && val.length > 0) {\n return parse(val);\n } else if (type === 'number' && isFinite(val)) {\n return options.long ? fmtLong(val) : fmtShort(val);\n }\n throw new Error(\n 'val is not a non-empty string or a valid number. val=' +\n JSON.stringify(val)\n );\n};\n\n/**\n * Parse the given `str` and return milliseconds.\n *\n * @param {String} str\n * @return {Number}\n * @api private\n */\n\nfunction parse(str) {\n str = String(str);\n if (str.length > 100) {\n return;\n }\n var match = /^(-?(?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(\n str\n );\n if (!match) {\n return;\n }\n var n = parseFloat(match[1]);\n var type = (match[2] || 'ms').toLowerCase();\n switch (type) {\n case 'years':\n case 'year':\n case 'yrs':\n case 'yr':\n case 'y':\n return n * y;\n case 'weeks':\n case 'week':\n case 'w':\n return n * w;\n case 'days':\n case 'day':\n case 'd':\n return n * d;\n case 'hours':\n case 'hour':\n case 'hrs':\n case 'hr':\n case 'h':\n return n * h;\n case 'minutes':\n case 'minute':\n case 'mins':\n case 'min':\n case 'm':\n return n * m;\n case 'seconds':\n case 'second':\n case 'secs':\n case 'sec':\n case 's':\n return n * s;\n case 'milliseconds':\n case 'millisecond':\n case 'msecs':\n case 'msec':\n case 'ms':\n return n;\n default:\n return undefined;\n }\n}\n\n/**\n * Short format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtShort(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return Math.round(ms / d) + 'd';\n }\n if (msAbs >= h) {\n return Math.round(ms / h) + 'h';\n }\n if (msAbs >= m) {\n return Math.round(ms / m) + 'm';\n }\n if (msAbs >= s) {\n return Math.round(ms / s) + 's';\n }\n return ms + 'ms';\n}\n\n/**\n * Long format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtLong(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return plural(ms, msAbs, d, 'day');\n }\n if (msAbs >= h) {\n return plural(ms, msAbs, h, 'hour');\n }\n if (msAbs >= m) {\n return plural(ms, msAbs, m, 'minute');\n }\n if (msAbs >= s) {\n return plural(ms, msAbs, s, 'second');\n }\n return ms + ' ms';\n}\n\n/**\n * Pluralization helper.\n */\n\nfunction plural(ms, msAbs, n, name) {\n var isPlural = msAbs >= n * 1.5;\n return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');\n}\n","\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\nvar inited = false;\nfunction init () {\n inited = true;\n var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\n for (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n }\n\n revLookup['-'.charCodeAt(0)] = 62\n revLookup['_'.charCodeAt(0)] = 63\n}\n\nexport function toByteArray (b64) {\n if (!inited) {\n init();\n }\n var i, j, l, tmp, placeHolders, arr\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // the number of equal signs (place holders)\n // if there are two placeholders, than the two characters before it\n // represent one byte\n // if there is only one, then the three characters before it represent 2 bytes\n // this is just a cheap hack to not do indexOf twice\n placeHolders = b64[len - 2] === '=' ? 2 : b64[len - 1] === '=' ? 1 : 0\n\n // base64 is 4/3 + up to two characters of the original data\n arr = new Arr(len * 3 / 4 - placeHolders)\n\n // if there are placeholders, only get up to the last complete 4 chars\n l = placeHolders > 0 ? len - 4 : len\n\n var L = 0\n\n for (i = 0, j = 0; i < l; i += 4, j += 3) {\n tmp = (revLookup[b64.charCodeAt(i)] << 18) | (revLookup[b64.charCodeAt(i + 1)] << 12) | (revLookup[b64.charCodeAt(i + 2)] << 6) | revLookup[b64.charCodeAt(i + 3)]\n arr[L++] = (tmp >> 16) & 0xFF\n arr[L++] = (tmp >> 8) & 0xFF\n arr[L++] = tmp & 0xFF\n }\n\n if (placeHolders === 2) {\n tmp = (revLookup[b64.charCodeAt(i)] << 2) | (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[L++] = tmp & 0xFF\n } else if (placeHolders === 1) {\n tmp = (revLookup[b64.charCodeAt(i)] << 10) | (revLookup[b64.charCodeAt(i + 1)] << 4) | (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[L++] = (tmp >> 8) & 0xFF\n arr[L++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2])\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nexport function fromByteArray (uint8) {\n if (!inited) {\n init();\n }\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var output = ''\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n output += lookup[tmp >> 2]\n output += lookup[(tmp << 4) & 0x3F]\n output += '=='\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + (uint8[len - 1])\n output += lookup[tmp >> 10]\n output += lookup[(tmp >> 4) & 0x3F]\n output += lookup[(tmp << 2) & 0x3F]\n output += '='\n }\n\n parts.push(output)\n\n return parts.join('')\n}\n","\nexport function read (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = nBytes * 8 - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexport function write (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = nBytes * 8 - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = (value * c - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","var toString = {}.toString;\n\nexport default Array.isArray || function (arr) {\n return toString.call(arr) == '[object Array]';\n};\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n\nimport * as base64 from './base64'\nimport * as ieee754 from './ieee754'\nimport isArray from './isArray'\n\nexport var INSPECT_MAX_BYTES = 50\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Use Object implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * Due to various browser bugs, sometimes the Object implementation will be used even\n * when the browser supports typed arrays.\n *\n * Note:\n *\n * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,\n * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.\n *\n * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.\n *\n * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of\n * incorrect length in some situations.\n\n * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they\n * get the Object implementation, which is slower but behaves correctly.\n */\nBuffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined\n ? global.TYPED_ARRAY_SUPPORT\n : true\n\n/*\n * Export kMaxLength after typed array support is determined.\n */\nvar _kMaxLength = kMaxLength()\nexport {_kMaxLength as kMaxLength};\nfunction typedArraySupport () {\n return true;\n // rollup issues\n // try {\n // var arr = new Uint8Array(1)\n // arr.__proto__ = {\n // __proto__: Uint8Array.prototype,\n // foo: function () { return 42 }\n // }\n // return arr.foo() === 42 && // typed array instances can be augmented\n // typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`\n // arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`\n // } catch (e) {\n // return false\n // }\n}\n\nfunction kMaxLength () {\n return Buffer.TYPED_ARRAY_SUPPORT\n ? 0x7fffffff\n : 0x3fffffff\n}\n\nfunction createBuffer (that, length) {\n if (kMaxLength() < length) {\n throw new RangeError('Invalid typed array length')\n }\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = new Uint8Array(length)\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n if (that === null) {\n that = new Buffer(length)\n }\n that.length = length\n }\n\n return that\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nexport function Buffer (arg, encodingOrOffset, length) {\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length)\n }\n\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error(\n 'If encoding is specified then the first argument must be a string'\n )\n }\n return allocUnsafe(this, arg)\n }\n return from(this, arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\n// TODO: Legacy, not needed anymore. Remove in next major version.\nBuffer._augment = function (arr) {\n arr.__proto__ = Buffer.prototype\n return arr\n}\n\nfunction from (that, value, encodingOrOffset, length) {\n if (typeof value === 'number') {\n throw new TypeError('\"value\" argument must not be a number')\n }\n\n if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\n return fromArrayBuffer(that, value, encodingOrOffset, length)\n }\n\n if (typeof value === 'string') {\n return fromString(that, value, encodingOrOffset)\n }\n\n return fromObject(that, value)\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(null, value, encodingOrOffset, length)\n}\n\nif (Buffer.TYPED_ARRAY_SUPPORT) {\n Buffer.prototype.__proto__ = Uint8Array.prototype\n Buffer.__proto__ = Uint8Array\n if (typeof Symbol !== 'undefined' && Symbol.species &&\n Buffer[Symbol.species] === Buffer) {\n // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97\n // Object.defineProperty(Buffer, Symbol.species, {\n // value: null,\n // configurable: true\n // })\n }\n}\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be a number')\n } else if (size < 0) {\n throw new RangeError('\"size\" argument must not be negative')\n }\n}\n\nfunction alloc (that, size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(that, size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpretted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(that, size).fill(fill, encoding)\n : createBuffer(that, size).fill(fill)\n }\n return createBuffer(that, size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(null, size, fill, encoding)\n}\n\nfunction allocUnsafe (that, size) {\n assertSize(size)\n that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n for (var i = 0; i < size; ++i) {\n that[i] = 0\n }\n }\n return that\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(null, size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(null, size)\n}\n\nfunction fromString (that, string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('\"encoding\" must be a valid string encoding')\n }\n\n var length = byteLength(string, encoding) | 0\n that = createBuffer(that, length)\n\n var actual = that.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n that = that.slice(0, actual)\n }\n\n return that\n}\n\nfunction fromArrayLike (that, array) {\n var length = array.length < 0 ? 0 : checked(array.length) | 0\n that = createBuffer(that, length)\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}\n\nfunction fromArrayBuffer (that, array, byteOffset, length) {\n array.byteLength // this throws if `array` is not a valid ArrayBuffer\n\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\\'offset\\' is out of bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\\'length\\' is out of bounds')\n }\n\n if (byteOffset === undefined && length === undefined) {\n array = new Uint8Array(array)\n } else if (length === undefined) {\n array = new Uint8Array(array, byteOffset)\n } else {\n array = new Uint8Array(array, byteOffset, length)\n }\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = array\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n that = fromArrayLike(that, array)\n }\n return that\n}\n\nfunction fromObject (that, obj) {\n if (internalIsBuffer(obj)) {\n var len = checked(obj.length) | 0\n that = createBuffer(that, len)\n\n if (that.length === 0) {\n return that\n }\n\n obj.copy(that, 0, 0, len)\n return that\n }\n\n if (obj) {\n if ((typeof ArrayBuffer !== 'undefined' &&\n obj.buffer instanceof ArrayBuffer) || 'length' in obj) {\n if (typeof obj.length !== 'number' || isnan(obj.length)) {\n return createBuffer(that, 0)\n }\n return fromArrayLike(that, obj)\n }\n\n if (obj.type === 'Buffer' && isArray(obj.data)) {\n return fromArrayLike(that, obj.data)\n }\n }\n\n throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')\n}\n\nfunction checked (length) {\n // Note: cannot use `length < kMaxLength()` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= kMaxLength()) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + kMaxLength().toString(16) + ' bytes')\n }\n return length | 0\n}\n\nexport function SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\nBuffer.isBuffer = isBuffer;\nfunction internalIsBuffer (b) {\n return !!(b != null && b._isBuffer)\n}\n\nBuffer.compare = function compare (a, b) {\n if (!internalIsBuffer(a) || !internalIsBuffer(b)) {\n throw new TypeError('Arguments must be Buffers')\n }\n\n if (a === b) return 0\n\n var x = a.length\n var y = b.length\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n var i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n var buffer = Buffer.allocUnsafe(length)\n var pos = 0\n for (i = 0; i < list.length; ++i) {\n var buf = list[i]\n if (!internalIsBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n buf.copy(buffer, pos)\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (internalIsBuffer(string)) {\n return string.length\n }\n if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&\n (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n string = '' + string\n }\n\n var len = string.length\n if (len === 0) return 0\n\n // Use a for loop to avoid recursion\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n case undefined:\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) return utf8ToBytes(string).length // assume utf8\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n var loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coersion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect\n// Buffer instances.\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n var i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n var len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (var i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n var len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (var i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n var len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (var i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n var length = this.length | 0\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.equals = function equals (b) {\n if (!internalIsBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n var str = ''\n var max = INSPECT_MAX_BYTES\n if (this.length > 0) {\n str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')\n if (this.length > max) str += ' ... '\n }\n return ''\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (!internalIsBuffer(target)) {\n throw new TypeError('Argument must be a Buffer')\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n var x = thisEnd - thisStart\n var y = end - start\n var len = Math.min(x, y)\n\n var thisCopy = this.slice(thisStart, thisEnd)\n var targetCopy = target.slice(start, end)\n\n for (var i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (internalIsBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n var indexSize = 1\n var arrLength = arr.length\n var valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n var i\n if (dir) {\n var foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n var found = true\n for (var j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n var remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n // must be an even number of digits\n var strLen = string.length\n if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n for (var i = 0; i < length; ++i) {\n var parsed = parseInt(string.substr(i * 2, 2), 16)\n if (isNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction latin1Write (buf, string, offset, length) {\n return asciiWrite(buf, string, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset | 0\n if (isFinite(length)) {\n length = length | 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n // legacy write(string, encoding, offset, length) - remove in v0.13\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n var remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n return asciiWrite(this, string, offset, length)\n\n case 'latin1':\n case 'binary':\n return latin1Write(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n var res = []\n\n var i = start\n while (i < end) {\n var firstByte = buf[i]\n var codePoint = null\n var bytesPerSequence = (firstByte > 0xEF) ? 4\n : (firstByte > 0xDF) ? 3\n : (firstByte > 0xBF) ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n var secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nvar MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n var len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n var res = ''\n var i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n var len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n var out = ''\n for (var i = start; i < end; ++i) {\n out += toHex(buf[i])\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n var bytes = buf.slice(start, end)\n var res = ''\n for (var i = 0; i < bytes.length; i += 2) {\n res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n var len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n var newBuf\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n newBuf = this.subarray(start, end)\n newBuf.__proto__ = Buffer.prototype\n } else {\n var sliceLen = end - start\n newBuf = new Buffer(sliceLen, undefined)\n for (var i = 0; i < sliceLen; ++i) {\n newBuf[i] = this[i + start]\n }\n }\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n var val = this[offset + --byteLength]\n var mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var i = byteLength\n var mul = 1\n var val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!internalIsBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var mul = 1\n var i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var i = byteLength - 1\n var mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nfunction objectWriteUInt16 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {\n buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>\n (littleEndian ? i : 1 - i) * 8\n }\n}\n\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nfunction objectWriteUInt32 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffffffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {\n buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff\n }\n}\n\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = 0\n var mul = 1\n var sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = byteLength - 1\n var mul = 1\n var sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n var len = end - start\n var i\n\n if (this === target && start < targetStart && targetStart < end) {\n // descending copy from end\n for (i = len - 1; i >= 0; --i) {\n target[i + targetStart] = this[i + start]\n }\n } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {\n // ascending copy from start\n for (i = 0; i < len; ++i) {\n target[i + targetStart] = this[i + start]\n }\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, start + len),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (val.length === 1) {\n var code = val.charCodeAt(0)\n if (code < 256) {\n val = code\n }\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n } else if (typeof val === 'number') {\n val = val & 255\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n var i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n var bytes = internalIsBuffer(val)\n ? val\n : utf8ToBytes(new Buffer(val, encoding).toString())\n var len = bytes.length\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// HELPER FUNCTIONS\n// ================\n\nvar INVALID_BASE64_RE = /[^+\\/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = stringtrim(str).replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction stringtrim (str) {\n if (str.trim) return str.trim()\n return str.replace(/^\\s+|\\s+$/g, '')\n}\n\nfunction toHex (n) {\n if (n < 16) return '0' + n.toString(16)\n return n.toString(16)\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n var codePoint\n var length = string.length\n var leadSurrogate = null\n var bytes = []\n\n for (var i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n var c, hi, lo\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n for (var i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\nfunction isnan (val) {\n return val !== val // eslint-disable-line no-self-compare\n}\n\n\n// the following is from is-buffer, also by Feross Aboukhadijeh and with same lisence\n// The _isBuffer check is for Safari 5-7 support, because it's missing\n// Object.prototype.constructor. Remove this eventually\nexport function isBuffer(obj) {\n return obj != null && (!!obj._isBuffer || isFastBuffer(obj) || isSlowBuffer(obj))\n}\n\nfunction isFastBuffer (obj) {\n return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj)\n}\n\n// For Node v0.10 support. Remove this eventually.\nfunction isSlowBuffer (obj) {\n return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isFastBuffer(obj.slice(0, 0))\n}\n","export var browser = true;\n","/*! https://mths.be/he v1.2.0 by @mathias | MIT license */\n;(function(root) {\n\n\t// Detect free variables `exports`.\n\tvar freeExports = typeof exports == 'object' && exports;\n\n\t// Detect free variable `module`.\n\tvar freeModule = typeof module == 'object' && module &&\n\t\tmodule.exports == freeExports && module;\n\n\t// Detect free variable `global`, from Node.js or Browserified code,\n\t// and use it as `root`.\n\tvar freeGlobal = typeof global == 'object' && global;\n\tif (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) {\n\t\troot = freeGlobal;\n\t}\n\n\t/*--------------------------------------------------------------------------*/\n\n\t// All astral symbols.\n\tvar regexAstralSymbols = /[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g;\n\t// All ASCII symbols (not just printable ASCII) except those listed in the\n\t// first column of the overrides table.\n\t// https://html.spec.whatwg.org/multipage/syntax.html#table-charref-overrides\n\tvar regexAsciiWhitelist = /[\\x01-\\x7F]/g;\n\t// All BMP symbols that are not ASCII newlines, printable ASCII symbols, or\n\t// code points listed in the first column of the overrides table on\n\t// https://html.spec.whatwg.org/multipage/syntax.html#table-charref-overrides.\n\tvar regexBmpWhitelist = /[\\x01-\\t\\x0B\\f\\x0E-\\x1F\\x7F\\x81\\x8D\\x8F\\x90\\x9D\\xA0-\\uFFFF]/g;\n\n\tvar regexEncodeNonAscii = /<\\u20D2|=\\u20E5|>\\u20D2|\\u205F\\u200A|\\u219D\\u0338|\\u2202\\u0338|\\u2220\\u20D2|\\u2229\\uFE00|\\u222A\\uFE00|\\u223C\\u20D2|\\u223D\\u0331|\\u223E\\u0333|\\u2242\\u0338|\\u224B\\u0338|\\u224D\\u20D2|\\u224E\\u0338|\\u224F\\u0338|\\u2250\\u0338|\\u2261\\u20E5|\\u2264\\u20D2|\\u2265\\u20D2|\\u2266\\u0338|\\u2267\\u0338|\\u2268\\uFE00|\\u2269\\uFE00|\\u226A\\u0338|\\u226A\\u20D2|\\u226B\\u0338|\\u226B\\u20D2|\\u227F\\u0338|\\u2282\\u20D2|\\u2283\\u20D2|\\u228A\\uFE00|\\u228B\\uFE00|\\u228F\\u0338|\\u2290\\u0338|\\u2293\\uFE00|\\u2294\\uFE00|\\u22B4\\u20D2|\\u22B5\\u20D2|\\u22D8\\u0338|\\u22D9\\u0338|\\u22DA\\uFE00|\\u22DB\\uFE00|\\u22F5\\u0338|\\u22F9\\u0338|\\u2933\\u0338|\\u29CF\\u0338|\\u29D0\\u0338|\\u2A6D\\u0338|\\u2A70\\u0338|\\u2A7D\\u0338|\\u2A7E\\u0338|\\u2AA1\\u0338|\\u2AA2\\u0338|\\u2AAC\\uFE00|\\u2AAD\\uFE00|\\u2AAF\\u0338|\\u2AB0\\u0338|\\u2AC5\\u0338|\\u2AC6\\u0338|\\u2ACB\\uFE00|\\u2ACC\\uFE00|\\u2AFD\\u20E5|[\\xA0-\\u0113\\u0116-\\u0122\\u0124-\\u012B\\u012E-\\u014D\\u0150-\\u017E\\u0192\\u01B5\\u01F5\\u0237\\u02C6\\u02C7\\u02D8-\\u02DD\\u0311\\u0391-\\u03A1\\u03A3-\\u03A9\\u03B1-\\u03C9\\u03D1\\u03D2\\u03D5\\u03D6\\u03DC\\u03DD\\u03F0\\u03F1\\u03F5\\u03F6\\u0401-\\u040C\\u040E-\\u044F\\u0451-\\u045C\\u045E\\u045F\\u2002-\\u2005\\u2007-\\u2010\\u2013-\\u2016\\u2018-\\u201A\\u201C-\\u201E\\u2020-\\u2022\\u2025\\u2026\\u2030-\\u2035\\u2039\\u203A\\u203E\\u2041\\u2043\\u2044\\u204F\\u2057\\u205F-\\u2063\\u20AC\\u20DB\\u20DC\\u2102\\u2105\\u210A-\\u2113\\u2115-\\u211E\\u2122\\u2124\\u2127-\\u2129\\u212C\\u212D\\u212F-\\u2131\\u2133-\\u2138\\u2145-\\u2148\\u2153-\\u215E\\u2190-\\u219B\\u219D-\\u21A7\\u21A9-\\u21AE\\u21B0-\\u21B3\\u21B5-\\u21B7\\u21BA-\\u21DB\\u21DD\\u21E4\\u21E5\\u21F5\\u21FD-\\u2205\\u2207-\\u2209\\u220B\\u220C\\u220F-\\u2214\\u2216-\\u2218\\u221A\\u221D-\\u2238\\u223A-\\u2257\\u2259\\u225A\\u225C\\u225F-\\u2262\\u2264-\\u228B\\u228D-\\u229B\\u229D-\\u22A5\\u22A7-\\u22B0\\u22B2-\\u22BB\\u22BD-\\u22DB\\u22DE-\\u22E3\\u22E6-\\u22F7\\u22F9-\\u22FE\\u2305\\u2306\\u2308-\\u2310\\u2312\\u2313\\u2315\\u2316\\u231C-\\u231F\\u2322\\u2323\\u232D\\u232E\\u2336\\u233D\\u233F\\u237C\\u23B0\\u23B1\\u23B4-\\u23B6\\u23DC-\\u23DF\\u23E2\\u23E7\\u2423\\u24C8\\u2500\\u2502\\u250C\\u2510\\u2514\\u2518\\u251C\\u2524\\u252C\\u2534\\u253C\\u2550-\\u256C\\u2580\\u2584\\u2588\\u2591-\\u2593\\u25A1\\u25AA\\u25AB\\u25AD\\u25AE\\u25B1\\u25B3-\\u25B5\\u25B8\\u25B9\\u25BD-\\u25BF\\u25C2\\u25C3\\u25CA\\u25CB\\u25EC\\u25EF\\u25F8-\\u25FC\\u2605\\u2606\\u260E\\u2640\\u2642\\u2660\\u2663\\u2665\\u2666\\u266A\\u266D-\\u266F\\u2713\\u2717\\u2720\\u2736\\u2758\\u2772\\u2773\\u27C8\\u27C9\\u27E6-\\u27ED\\u27F5-\\u27FA\\u27FC\\u27FF\\u2902-\\u2905\\u290C-\\u2913\\u2916\\u2919-\\u2920\\u2923-\\u292A\\u2933\\u2935-\\u2939\\u293C\\u293D\\u2945\\u2948-\\u294B\\u294E-\\u2976\\u2978\\u2979\\u297B-\\u297F\\u2985\\u2986\\u298B-\\u2996\\u299A\\u299C\\u299D\\u29A4-\\u29B7\\u29B9\\u29BB\\u29BC\\u29BE-\\u29C5\\u29C9\\u29CD-\\u29D0\\u29DC-\\u29DE\\u29E3-\\u29E5\\u29EB\\u29F4\\u29F6\\u2A00-\\u2A02\\u2A04\\u2A06\\u2A0C\\u2A0D\\u2A10-\\u2A17\\u2A22-\\u2A27\\u2A29\\u2A2A\\u2A2D-\\u2A31\\u2A33-\\u2A3C\\u2A3F\\u2A40\\u2A42-\\u2A4D\\u2A50\\u2A53-\\u2A58\\u2A5A-\\u2A5D\\u2A5F\\u2A66\\u2A6A\\u2A6D-\\u2A75\\u2A77-\\u2A9A\\u2A9D-\\u2AA2\\u2AA4-\\u2AB0\\u2AB3-\\u2AC8\\u2ACB\\u2ACC\\u2ACF-\\u2ADB\\u2AE4\\u2AE6-\\u2AE9\\u2AEB-\\u2AF3\\u2AFD\\uFB00-\\uFB04]|\\uD835[\\uDC9C\\uDC9E\\uDC9F\\uDCA2\\uDCA5\\uDCA6\\uDCA9-\\uDCAC\\uDCAE-\\uDCB9\\uDCBB\\uDCBD-\\uDCC3\\uDCC5-\\uDCCF\\uDD04\\uDD05\\uDD07-\\uDD0A\\uDD0D-\\uDD14\\uDD16-\\uDD1C\\uDD1E-\\uDD39\\uDD3B-\\uDD3E\\uDD40-\\uDD44\\uDD46\\uDD4A-\\uDD50\\uDD52-\\uDD6B]/g;\n\tvar encodeMap = {'\\xAD':'shy','\\u200C':'zwnj','\\u200D':'zwj','\\u200E':'lrm','\\u2063':'ic','\\u2062':'it','\\u2061':'af','\\u200F':'rlm','\\u200B':'ZeroWidthSpace','\\u2060':'NoBreak','\\u0311':'DownBreve','\\u20DB':'tdot','\\u20DC':'DotDot','\\t':'Tab','\\n':'NewLine','\\u2008':'puncsp','\\u205F':'MediumSpace','\\u2009':'thinsp','\\u200A':'hairsp','\\u2004':'emsp13','\\u2002':'ensp','\\u2005':'emsp14','\\u2003':'emsp','\\u2007':'numsp','\\xA0':'nbsp','\\u205F\\u200A':'ThickSpace','\\u203E':'oline','_':'lowbar','\\u2010':'dash','\\u2013':'ndash','\\u2014':'mdash','\\u2015':'horbar',',':'comma',';':'semi','\\u204F':'bsemi',':':'colon','\\u2A74':'Colone','!':'excl','\\xA1':'iexcl','?':'quest','\\xBF':'iquest','.':'period','\\u2025':'nldr','\\u2026':'mldr','\\xB7':'middot','\\'':'apos','\\u2018':'lsquo','\\u2019':'rsquo','\\u201A':'sbquo','\\u2039':'lsaquo','\\u203A':'rsaquo','\"':'quot','\\u201C':'ldquo','\\u201D':'rdquo','\\u201E':'bdquo','\\xAB':'laquo','\\xBB':'raquo','(':'lpar',')':'rpar','[':'lsqb',']':'rsqb','{':'lcub','}':'rcub','\\u2308':'lceil','\\u2309':'rceil','\\u230A':'lfloor','\\u230B':'rfloor','\\u2985':'lopar','\\u2986':'ropar','\\u298B':'lbrke','\\u298C':'rbrke','\\u298D':'lbrkslu','\\u298E':'rbrksld','\\u298F':'lbrksld','\\u2990':'rbrkslu','\\u2991':'langd','\\u2992':'rangd','\\u2993':'lparlt','\\u2994':'rpargt','\\u2995':'gtlPar','\\u2996':'ltrPar','\\u27E6':'lobrk','\\u27E7':'robrk','\\u27E8':'lang','\\u27E9':'rang','\\u27EA':'Lang','\\u27EB':'Rang','\\u27EC':'loang','\\u27ED':'roang','\\u2772':'lbbrk','\\u2773':'rbbrk','\\u2016':'Vert','\\xA7':'sect','\\xB6':'para','@':'commat','*':'ast','/':'sol','undefined':null,'&':'amp','#':'num','%':'percnt','\\u2030':'permil','\\u2031':'pertenk','\\u2020':'dagger','\\u2021':'Dagger','\\u2022':'bull','\\u2043':'hybull','\\u2032':'prime','\\u2033':'Prime','\\u2034':'tprime','\\u2057':'qprime','\\u2035':'bprime','\\u2041':'caret','`':'grave','\\xB4':'acute','\\u02DC':'tilde','^':'Hat','\\xAF':'macr','\\u02D8':'breve','\\u02D9':'dot','\\xA8':'die','\\u02DA':'ring','\\u02DD':'dblac','\\xB8':'cedil','\\u02DB':'ogon','\\u02C6':'circ','\\u02C7':'caron','\\xB0':'deg','\\xA9':'copy','\\xAE':'reg','\\u2117':'copysr','\\u2118':'wp','\\u211E':'rx','\\u2127':'mho','\\u2129':'iiota','\\u2190':'larr','\\u219A':'nlarr','\\u2192':'rarr','\\u219B':'nrarr','\\u2191':'uarr','\\u2193':'darr','\\u2194':'harr','\\u21AE':'nharr','\\u2195':'varr','\\u2196':'nwarr','\\u2197':'nearr','\\u2198':'searr','\\u2199':'swarr','\\u219D':'rarrw','\\u219D\\u0338':'nrarrw','\\u219E':'Larr','\\u219F':'Uarr','\\u21A0':'Rarr','\\u21A1':'Darr','\\u21A2':'larrtl','\\u21A3':'rarrtl','\\u21A4':'mapstoleft','\\u21A5':'mapstoup','\\u21A6':'map','\\u21A7':'mapstodown','\\u21A9':'larrhk','\\u21AA':'rarrhk','\\u21AB':'larrlp','\\u21AC':'rarrlp','\\u21AD':'harrw','\\u21B0':'lsh','\\u21B1':'rsh','\\u21B2':'ldsh','\\u21B3':'rdsh','\\u21B5':'crarr','\\u21B6':'cularr','\\u21B7':'curarr','\\u21BA':'olarr','\\u21BB':'orarr','\\u21BC':'lharu','\\u21BD':'lhard','\\u21BE':'uharr','\\u21BF':'uharl','\\u21C0':'rharu','\\u21C1':'rhard','\\u21C2':'dharr','\\u21C3':'dharl','\\u21C4':'rlarr','\\u21C5':'udarr','\\u21C6':'lrarr','\\u21C7':'llarr','\\u21C8':'uuarr','\\u21C9':'rrarr','\\u21CA':'ddarr','\\u21CB':'lrhar','\\u21CC':'rlhar','\\u21D0':'lArr','\\u21CD':'nlArr','\\u21D1':'uArr','\\u21D2':'rArr','\\u21CF':'nrArr','\\u21D3':'dArr','\\u21D4':'iff','\\u21CE':'nhArr','\\u21D5':'vArr','\\u21D6':'nwArr','\\u21D7':'neArr','\\u21D8':'seArr','\\u21D9':'swArr','\\u21DA':'lAarr','\\u21DB':'rAarr','\\u21DD':'zigrarr','\\u21E4':'larrb','\\u21E5':'rarrb','\\u21F5':'duarr','\\u21FD':'loarr','\\u21FE':'roarr','\\u21FF':'hoarr','\\u2200':'forall','\\u2201':'comp','\\u2202':'part','\\u2202\\u0338':'npart','\\u2203':'exist','\\u2204':'nexist','\\u2205':'empty','\\u2207':'Del','\\u2208':'in','\\u2209':'notin','\\u220B':'ni','\\u220C':'notni','\\u03F6':'bepsi','\\u220F':'prod','\\u2210':'coprod','\\u2211':'sum','+':'plus','\\xB1':'pm','\\xF7':'div','\\xD7':'times','<':'lt','\\u226E':'nlt','<\\u20D2':'nvlt','=':'equals','\\u2260':'ne','=\\u20E5':'bne','\\u2A75':'Equal','>':'gt','\\u226F':'ngt','>\\u20D2':'nvgt','\\xAC':'not','|':'vert','\\xA6':'brvbar','\\u2212':'minus','\\u2213':'mp','\\u2214':'plusdo','\\u2044':'frasl','\\u2216':'setmn','\\u2217':'lowast','\\u2218':'compfn','\\u221A':'Sqrt','\\u221D':'prop','\\u221E':'infin','\\u221F':'angrt','\\u2220':'ang','\\u2220\\u20D2':'nang','\\u2221':'angmsd','\\u2222':'angsph','\\u2223':'mid','\\u2224':'nmid','\\u2225':'par','\\u2226':'npar','\\u2227':'and','\\u2228':'or','\\u2229':'cap','\\u2229\\uFE00':'caps','\\u222A':'cup','\\u222A\\uFE00':'cups','\\u222B':'int','\\u222C':'Int','\\u222D':'tint','\\u2A0C':'qint','\\u222E':'oint','\\u222F':'Conint','\\u2230':'Cconint','\\u2231':'cwint','\\u2232':'cwconint','\\u2233':'awconint','\\u2234':'there4','\\u2235':'becaus','\\u2236':'ratio','\\u2237':'Colon','\\u2238':'minusd','\\u223A':'mDDot','\\u223B':'homtht','\\u223C':'sim','\\u2241':'nsim','\\u223C\\u20D2':'nvsim','\\u223D':'bsim','\\u223D\\u0331':'race','\\u223E':'ac','\\u223E\\u0333':'acE','\\u223F':'acd','\\u2240':'wr','\\u2242':'esim','\\u2242\\u0338':'nesim','\\u2243':'sime','\\u2244':'nsime','\\u2245':'cong','\\u2247':'ncong','\\u2246':'simne','\\u2248':'ap','\\u2249':'nap','\\u224A':'ape','\\u224B':'apid','\\u224B\\u0338':'napid','\\u224C':'bcong','\\u224D':'CupCap','\\u226D':'NotCupCap','\\u224D\\u20D2':'nvap','\\u224E':'bump','\\u224E\\u0338':'nbump','\\u224F':'bumpe','\\u224F\\u0338':'nbumpe','\\u2250':'doteq','\\u2250\\u0338':'nedot','\\u2251':'eDot','\\u2252':'efDot','\\u2253':'erDot','\\u2254':'colone','\\u2255':'ecolon','\\u2256':'ecir','\\u2257':'cire','\\u2259':'wedgeq','\\u225A':'veeeq','\\u225C':'trie','\\u225F':'equest','\\u2261':'equiv','\\u2262':'nequiv','\\u2261\\u20E5':'bnequiv','\\u2264':'le','\\u2270':'nle','\\u2264\\u20D2':'nvle','\\u2265':'ge','\\u2271':'nge','\\u2265\\u20D2':'nvge','\\u2266':'lE','\\u2266\\u0338':'nlE','\\u2267':'gE','\\u2267\\u0338':'ngE','\\u2268\\uFE00':'lvnE','\\u2268':'lnE','\\u2269':'gnE','\\u2269\\uFE00':'gvnE','\\u226A':'ll','\\u226A\\u0338':'nLtv','\\u226A\\u20D2':'nLt','\\u226B':'gg','\\u226B\\u0338':'nGtv','\\u226B\\u20D2':'nGt','\\u226C':'twixt','\\u2272':'lsim','\\u2274':'nlsim','\\u2273':'gsim','\\u2275':'ngsim','\\u2276':'lg','\\u2278':'ntlg','\\u2277':'gl','\\u2279':'ntgl','\\u227A':'pr','\\u2280':'npr','\\u227B':'sc','\\u2281':'nsc','\\u227C':'prcue','\\u22E0':'nprcue','\\u227D':'sccue','\\u22E1':'nsccue','\\u227E':'prsim','\\u227F':'scsim','\\u227F\\u0338':'NotSucceedsTilde','\\u2282':'sub','\\u2284':'nsub','\\u2282\\u20D2':'vnsub','\\u2283':'sup','\\u2285':'nsup','\\u2283\\u20D2':'vnsup','\\u2286':'sube','\\u2288':'nsube','\\u2287':'supe','\\u2289':'nsupe','\\u228A\\uFE00':'vsubne','\\u228A':'subne','\\u228B\\uFE00':'vsupne','\\u228B':'supne','\\u228D':'cupdot','\\u228E':'uplus','\\u228F':'sqsub','\\u228F\\u0338':'NotSquareSubset','\\u2290':'sqsup','\\u2290\\u0338':'NotSquareSuperset','\\u2291':'sqsube','\\u22E2':'nsqsube','\\u2292':'sqsupe','\\u22E3':'nsqsupe','\\u2293':'sqcap','\\u2293\\uFE00':'sqcaps','\\u2294':'sqcup','\\u2294\\uFE00':'sqcups','\\u2295':'oplus','\\u2296':'ominus','\\u2297':'otimes','\\u2298':'osol','\\u2299':'odot','\\u229A':'ocir','\\u229B':'oast','\\u229D':'odash','\\u229E':'plusb','\\u229F':'minusb','\\u22A0':'timesb','\\u22A1':'sdotb','\\u22A2':'vdash','\\u22AC':'nvdash','\\u22A3':'dashv','\\u22A4':'top','\\u22A5':'bot','\\u22A7':'models','\\u22A8':'vDash','\\u22AD':'nvDash','\\u22A9':'Vdash','\\u22AE':'nVdash','\\u22AA':'Vvdash','\\u22AB':'VDash','\\u22AF':'nVDash','\\u22B0':'prurel','\\u22B2':'vltri','\\u22EA':'nltri','\\u22B3':'vrtri','\\u22EB':'nrtri','\\u22B4':'ltrie','\\u22EC':'nltrie','\\u22B4\\u20D2':'nvltrie','\\u22B5':'rtrie','\\u22ED':'nrtrie','\\u22B5\\u20D2':'nvrtrie','\\u22B6':'origof','\\u22B7':'imof','\\u22B8':'mumap','\\u22B9':'hercon','\\u22BA':'intcal','\\u22BB':'veebar','\\u22BD':'barvee','\\u22BE':'angrtvb','\\u22BF':'lrtri','\\u22C0':'Wedge','\\u22C1':'Vee','\\u22C2':'xcap','\\u22C3':'xcup','\\u22C4':'diam','\\u22C5':'sdot','\\u22C6':'Star','\\u22C7':'divonx','\\u22C8':'bowtie','\\u22C9':'ltimes','\\u22CA':'rtimes','\\u22CB':'lthree','\\u22CC':'rthree','\\u22CD':'bsime','\\u22CE':'cuvee','\\u22CF':'cuwed','\\u22D0':'Sub','\\u22D1':'Sup','\\u22D2':'Cap','\\u22D3':'Cup','\\u22D4':'fork','\\u22D5':'epar','\\u22D6':'ltdot','\\u22D7':'gtdot','\\u22D8':'Ll','\\u22D8\\u0338':'nLl','\\u22D9':'Gg','\\u22D9\\u0338':'nGg','\\u22DA\\uFE00':'lesg','\\u22DA':'leg','\\u22DB':'gel','\\u22DB\\uFE00':'gesl','\\u22DE':'cuepr','\\u22DF':'cuesc','\\u22E6':'lnsim','\\u22E7':'gnsim','\\u22E8':'prnsim','\\u22E9':'scnsim','\\u22EE':'vellip','\\u22EF':'ctdot','\\u22F0':'utdot','\\u22F1':'dtdot','\\u22F2':'disin','\\u22F3':'isinsv','\\u22F4':'isins','\\u22F5':'isindot','\\u22F5\\u0338':'notindot','\\u22F6':'notinvc','\\u22F7':'notinvb','\\u22F9':'isinE','\\u22F9\\u0338':'notinE','\\u22FA':'nisd','\\u22FB':'xnis','\\u22FC':'nis','\\u22FD':'notnivc','\\u22FE':'notnivb','\\u2305':'barwed','\\u2306':'Barwed','\\u230C':'drcrop','\\u230D':'dlcrop','\\u230E':'urcrop','\\u230F':'ulcrop','\\u2310':'bnot','\\u2312':'profline','\\u2313':'profsurf','\\u2315':'telrec','\\u2316':'target','\\u231C':'ulcorn','\\u231D':'urcorn','\\u231E':'dlcorn','\\u231F':'drcorn','\\u2322':'frown','\\u2323':'smile','\\u232D':'cylcty','\\u232E':'profalar','\\u2336':'topbot','\\u233D':'ovbar','\\u233F':'solbar','\\u237C':'angzarr','\\u23B0':'lmoust','\\u23B1':'rmoust','\\u23B4':'tbrk','\\u23B5':'bbrk','\\u23B6':'bbrktbrk','\\u23DC':'OverParenthesis','\\u23DD':'UnderParenthesis','\\u23DE':'OverBrace','\\u23DF':'UnderBrace','\\u23E2':'trpezium','\\u23E7':'elinters','\\u2423':'blank','\\u2500':'boxh','\\u2502':'boxv','\\u250C':'boxdr','\\u2510':'boxdl','\\u2514':'boxur','\\u2518':'boxul','\\u251C':'boxvr','\\u2524':'boxvl','\\u252C':'boxhd','\\u2534':'boxhu','\\u253C':'boxvh','\\u2550':'boxH','\\u2551':'boxV','\\u2552':'boxdR','\\u2553':'boxDr','\\u2554':'boxDR','\\u2555':'boxdL','\\u2556':'boxDl','\\u2557':'boxDL','\\u2558':'boxuR','\\u2559':'boxUr','\\u255A':'boxUR','\\u255B':'boxuL','\\u255C':'boxUl','\\u255D':'boxUL','\\u255E':'boxvR','\\u255F':'boxVr','\\u2560':'boxVR','\\u2561':'boxvL','\\u2562':'boxVl','\\u2563':'boxVL','\\u2564':'boxHd','\\u2565':'boxhD','\\u2566':'boxHD','\\u2567':'boxHu','\\u2568':'boxhU','\\u2569':'boxHU','\\u256A':'boxvH','\\u256B':'boxVh','\\u256C':'boxVH','\\u2580':'uhblk','\\u2584':'lhblk','\\u2588':'block','\\u2591':'blk14','\\u2592':'blk12','\\u2593':'blk34','\\u25A1':'squ','\\u25AA':'squf','\\u25AB':'EmptyVerySmallSquare','\\u25AD':'rect','\\u25AE':'marker','\\u25B1':'fltns','\\u25B3':'xutri','\\u25B4':'utrif','\\u25B5':'utri','\\u25B8':'rtrif','\\u25B9':'rtri','\\u25BD':'xdtri','\\u25BE':'dtrif','\\u25BF':'dtri','\\u25C2':'ltrif','\\u25C3':'ltri','\\u25CA':'loz','\\u25CB':'cir','\\u25EC':'tridot','\\u25EF':'xcirc','\\u25F8':'ultri','\\u25F9':'urtri','\\u25FA':'lltri','\\u25FB':'EmptySmallSquare','\\u25FC':'FilledSmallSquare','\\u2605':'starf','\\u2606':'star','\\u260E':'phone','\\u2640':'female','\\u2642':'male','\\u2660':'spades','\\u2663':'clubs','\\u2665':'hearts','\\u2666':'diams','\\u266A':'sung','\\u2713':'check','\\u2717':'cross','\\u2720':'malt','\\u2736':'sext','\\u2758':'VerticalSeparator','\\u27C8':'bsolhsub','\\u27C9':'suphsol','\\u27F5':'xlarr','\\u27F6':'xrarr','\\u27F7':'xharr','\\u27F8':'xlArr','\\u27F9':'xrArr','\\u27FA':'xhArr','\\u27FC':'xmap','\\u27FF':'dzigrarr','\\u2902':'nvlArr','\\u2903':'nvrArr','\\u2904':'nvHarr','\\u2905':'Map','\\u290C':'lbarr','\\u290D':'rbarr','\\u290E':'lBarr','\\u290F':'rBarr','\\u2910':'RBarr','\\u2911':'DDotrahd','\\u2912':'UpArrowBar','\\u2913':'DownArrowBar','\\u2916':'Rarrtl','\\u2919':'latail','\\u291A':'ratail','\\u291B':'lAtail','\\u291C':'rAtail','\\u291D':'larrfs','\\u291E':'rarrfs','\\u291F':'larrbfs','\\u2920':'rarrbfs','\\u2923':'nwarhk','\\u2924':'nearhk','\\u2925':'searhk','\\u2926':'swarhk','\\u2927':'nwnear','\\u2928':'toea','\\u2929':'tosa','\\u292A':'swnwar','\\u2933':'rarrc','\\u2933\\u0338':'nrarrc','\\u2935':'cudarrr','\\u2936':'ldca','\\u2937':'rdca','\\u2938':'cudarrl','\\u2939':'larrpl','\\u293C':'curarrm','\\u293D':'cularrp','\\u2945':'rarrpl','\\u2948':'harrcir','\\u2949':'Uarrocir','\\u294A':'lurdshar','\\u294B':'ldrushar','\\u294E':'LeftRightVector','\\u294F':'RightUpDownVector','\\u2950':'DownLeftRightVector','\\u2951':'LeftUpDownVector','\\u2952':'LeftVectorBar','\\u2953':'RightVectorBar','\\u2954':'RightUpVectorBar','\\u2955':'RightDownVectorBar','\\u2956':'DownLeftVectorBar','\\u2957':'DownRightVectorBar','\\u2958':'LeftUpVectorBar','\\u2959':'LeftDownVectorBar','\\u295A':'LeftTeeVector','\\u295B':'RightTeeVector','\\u295C':'RightUpTeeVector','\\u295D':'RightDownTeeVector','\\u295E':'DownLeftTeeVector','\\u295F':'DownRightTeeVector','\\u2960':'LeftUpTeeVector','\\u2961':'LeftDownTeeVector','\\u2962':'lHar','\\u2963':'uHar','\\u2964':'rHar','\\u2965':'dHar','\\u2966':'luruhar','\\u2967':'ldrdhar','\\u2968':'ruluhar','\\u2969':'rdldhar','\\u296A':'lharul','\\u296B':'llhard','\\u296C':'rharul','\\u296D':'lrhard','\\u296E':'udhar','\\u296F':'duhar','\\u2970':'RoundImplies','\\u2971':'erarr','\\u2972':'simrarr','\\u2973':'larrsim','\\u2974':'rarrsim','\\u2975':'rarrap','\\u2976':'ltlarr','\\u2978':'gtrarr','\\u2979':'subrarr','\\u297B':'suplarr','\\u297C':'lfisht','\\u297D':'rfisht','\\u297E':'ufisht','\\u297F':'dfisht','\\u299A':'vzigzag','\\u299C':'vangrt','\\u299D':'angrtvbd','\\u29A4':'ange','\\u29A5':'range','\\u29A6':'dwangle','\\u29A7':'uwangle','\\u29A8':'angmsdaa','\\u29A9':'angmsdab','\\u29AA':'angmsdac','\\u29AB':'angmsdad','\\u29AC':'angmsdae','\\u29AD':'angmsdaf','\\u29AE':'angmsdag','\\u29AF':'angmsdah','\\u29B0':'bemptyv','\\u29B1':'demptyv','\\u29B2':'cemptyv','\\u29B3':'raemptyv','\\u29B4':'laemptyv','\\u29B5':'ohbar','\\u29B6':'omid','\\u29B7':'opar','\\u29B9':'operp','\\u29BB':'olcross','\\u29BC':'odsold','\\u29BE':'olcir','\\u29BF':'ofcir','\\u29C0':'olt','\\u29C1':'ogt','\\u29C2':'cirscir','\\u29C3':'cirE','\\u29C4':'solb','\\u29C5':'bsolb','\\u29C9':'boxbox','\\u29CD':'trisb','\\u29CE':'rtriltri','\\u29CF':'LeftTriangleBar','\\u29CF\\u0338':'NotLeftTriangleBar','\\u29D0':'RightTriangleBar','\\u29D0\\u0338':'NotRightTriangleBar','\\u29DC':'iinfin','\\u29DD':'infintie','\\u29DE':'nvinfin','\\u29E3':'eparsl','\\u29E4':'smeparsl','\\u29E5':'eqvparsl','\\u29EB':'lozf','\\u29F4':'RuleDelayed','\\u29F6':'dsol','\\u2A00':'xodot','\\u2A01':'xoplus','\\u2A02':'xotime','\\u2A04':'xuplus','\\u2A06':'xsqcup','\\u2A0D':'fpartint','\\u2A10':'cirfnint','\\u2A11':'awint','\\u2A12':'rppolint','\\u2A13':'scpolint','\\u2A14':'npolint','\\u2A15':'pointint','\\u2A16':'quatint','\\u2A17':'intlarhk','\\u2A22':'pluscir','\\u2A23':'plusacir','\\u2A24':'simplus','\\u2A25':'plusdu','\\u2A26':'plussim','\\u2A27':'plustwo','\\u2A29':'mcomma','\\u2A2A':'minusdu','\\u2A2D':'loplus','\\u2A2E':'roplus','\\u2A2F':'Cross','\\u2A30':'timesd','\\u2A31':'timesbar','\\u2A33':'smashp','\\u2A34':'lotimes','\\u2A35':'rotimes','\\u2A36':'otimesas','\\u2A37':'Otimes','\\u2A38':'odiv','\\u2A39':'triplus','\\u2A3A':'triminus','\\u2A3B':'tritime','\\u2A3C':'iprod','\\u2A3F':'amalg','\\u2A40':'capdot','\\u2A42':'ncup','\\u2A43':'ncap','\\u2A44':'capand','\\u2A45':'cupor','\\u2A46':'cupcap','\\u2A47':'capcup','\\u2A48':'cupbrcap','\\u2A49':'capbrcup','\\u2A4A':'cupcup','\\u2A4B':'capcap','\\u2A4C':'ccups','\\u2A4D':'ccaps','\\u2A50':'ccupssm','\\u2A53':'And','\\u2A54':'Or','\\u2A55':'andand','\\u2A56':'oror','\\u2A57':'orslope','\\u2A58':'andslope','\\u2A5A':'andv','\\u2A5B':'orv','\\u2A5C':'andd','\\u2A5D':'ord','\\u2A5F':'wedbar','\\u2A66':'sdote','\\u2A6A':'simdot','\\u2A6D':'congdot','\\u2A6D\\u0338':'ncongdot','\\u2A6E':'easter','\\u2A6F':'apacir','\\u2A70':'apE','\\u2A70\\u0338':'napE','\\u2A71':'eplus','\\u2A72':'pluse','\\u2A73':'Esim','\\u2A77':'eDDot','\\u2A78':'equivDD','\\u2A79':'ltcir','\\u2A7A':'gtcir','\\u2A7B':'ltquest','\\u2A7C':'gtquest','\\u2A7D':'les','\\u2A7D\\u0338':'nles','\\u2A7E':'ges','\\u2A7E\\u0338':'nges','\\u2A7F':'lesdot','\\u2A80':'gesdot','\\u2A81':'lesdoto','\\u2A82':'gesdoto','\\u2A83':'lesdotor','\\u2A84':'gesdotol','\\u2A85':'lap','\\u2A86':'gap','\\u2A87':'lne','\\u2A88':'gne','\\u2A89':'lnap','\\u2A8A':'gnap','\\u2A8B':'lEg','\\u2A8C':'gEl','\\u2A8D':'lsime','\\u2A8E':'gsime','\\u2A8F':'lsimg','\\u2A90':'gsiml','\\u2A91':'lgE','\\u2A92':'glE','\\u2A93':'lesges','\\u2A94':'gesles','\\u2A95':'els','\\u2A96':'egs','\\u2A97':'elsdot','\\u2A98':'egsdot','\\u2A99':'el','\\u2A9A':'eg','\\u2A9D':'siml','\\u2A9E':'simg','\\u2A9F':'simlE','\\u2AA0':'simgE','\\u2AA1':'LessLess','\\u2AA1\\u0338':'NotNestedLessLess','\\u2AA2':'GreaterGreater','\\u2AA2\\u0338':'NotNestedGreaterGreater','\\u2AA4':'glj','\\u2AA5':'gla','\\u2AA6':'ltcc','\\u2AA7':'gtcc','\\u2AA8':'lescc','\\u2AA9':'gescc','\\u2AAA':'smt','\\u2AAB':'lat','\\u2AAC':'smte','\\u2AAC\\uFE00':'smtes','\\u2AAD':'late','\\u2AAD\\uFE00':'lates','\\u2AAE':'bumpE','\\u2AAF':'pre','\\u2AAF\\u0338':'npre','\\u2AB0':'sce','\\u2AB0\\u0338':'nsce','\\u2AB3':'prE','\\u2AB4':'scE','\\u2AB5':'prnE','\\u2AB6':'scnE','\\u2AB7':'prap','\\u2AB8':'scap','\\u2AB9':'prnap','\\u2ABA':'scnap','\\u2ABB':'Pr','\\u2ABC':'Sc','\\u2ABD':'subdot','\\u2ABE':'supdot','\\u2ABF':'subplus','\\u2AC0':'supplus','\\u2AC1':'submult','\\u2AC2':'supmult','\\u2AC3':'subedot','\\u2AC4':'supedot','\\u2AC5':'subE','\\u2AC5\\u0338':'nsubE','\\u2AC6':'supE','\\u2AC6\\u0338':'nsupE','\\u2AC7':'subsim','\\u2AC8':'supsim','\\u2ACB\\uFE00':'vsubnE','\\u2ACB':'subnE','\\u2ACC\\uFE00':'vsupnE','\\u2ACC':'supnE','\\u2ACF':'csub','\\u2AD0':'csup','\\u2AD1':'csube','\\u2AD2':'csupe','\\u2AD3':'subsup','\\u2AD4':'supsub','\\u2AD5':'subsub','\\u2AD6':'supsup','\\u2AD7':'suphsub','\\u2AD8':'supdsub','\\u2AD9':'forkv','\\u2ADA':'topfork','\\u2ADB':'mlcp','\\u2AE4':'Dashv','\\u2AE6':'Vdashl','\\u2AE7':'Barv','\\u2AE8':'vBar','\\u2AE9':'vBarv','\\u2AEB':'Vbar','\\u2AEC':'Not','\\u2AED':'bNot','\\u2AEE':'rnmid','\\u2AEF':'cirmid','\\u2AF0':'midcir','\\u2AF1':'topcir','\\u2AF2':'nhpar','\\u2AF3':'parsim','\\u2AFD':'parsl','\\u2AFD\\u20E5':'nparsl','\\u266D':'flat','\\u266E':'natur','\\u266F':'sharp','\\xA4':'curren','\\xA2':'cent','$':'dollar','\\xA3':'pound','\\xA5':'yen','\\u20AC':'euro','\\xB9':'sup1','\\xBD':'half','\\u2153':'frac13','\\xBC':'frac14','\\u2155':'frac15','\\u2159':'frac16','\\u215B':'frac18','\\xB2':'sup2','\\u2154':'frac23','\\u2156':'frac25','\\xB3':'sup3','\\xBE':'frac34','\\u2157':'frac35','\\u215C':'frac38','\\u2158':'frac45','\\u215A':'frac56','\\u215D':'frac58','\\u215E':'frac78','\\uD835\\uDCB6':'ascr','\\uD835\\uDD52':'aopf','\\uD835\\uDD1E':'afr','\\uD835\\uDD38':'Aopf','\\uD835\\uDD04':'Afr','\\uD835\\uDC9C':'Ascr','\\xAA':'ordf','\\xE1':'aacute','\\xC1':'Aacute','\\xE0':'agrave','\\xC0':'Agrave','\\u0103':'abreve','\\u0102':'Abreve','\\xE2':'acirc','\\xC2':'Acirc','\\xE5':'aring','\\xC5':'angst','\\xE4':'auml','\\xC4':'Auml','\\xE3':'atilde','\\xC3':'Atilde','\\u0105':'aogon','\\u0104':'Aogon','\\u0101':'amacr','\\u0100':'Amacr','\\xE6':'aelig','\\xC6':'AElig','\\uD835\\uDCB7':'bscr','\\uD835\\uDD53':'bopf','\\uD835\\uDD1F':'bfr','\\uD835\\uDD39':'Bopf','\\u212C':'Bscr','\\uD835\\uDD05':'Bfr','\\uD835\\uDD20':'cfr','\\uD835\\uDCB8':'cscr','\\uD835\\uDD54':'copf','\\u212D':'Cfr','\\uD835\\uDC9E':'Cscr','\\u2102':'Copf','\\u0107':'cacute','\\u0106':'Cacute','\\u0109':'ccirc','\\u0108':'Ccirc','\\u010D':'ccaron','\\u010C':'Ccaron','\\u010B':'cdot','\\u010A':'Cdot','\\xE7':'ccedil','\\xC7':'Ccedil','\\u2105':'incare','\\uD835\\uDD21':'dfr','\\u2146':'dd','\\uD835\\uDD55':'dopf','\\uD835\\uDCB9':'dscr','\\uD835\\uDC9F':'Dscr','\\uD835\\uDD07':'Dfr','\\u2145':'DD','\\uD835\\uDD3B':'Dopf','\\u010F':'dcaron','\\u010E':'Dcaron','\\u0111':'dstrok','\\u0110':'Dstrok','\\xF0':'eth','\\xD0':'ETH','\\u2147':'ee','\\u212F':'escr','\\uD835\\uDD22':'efr','\\uD835\\uDD56':'eopf','\\u2130':'Escr','\\uD835\\uDD08':'Efr','\\uD835\\uDD3C':'Eopf','\\xE9':'eacute','\\xC9':'Eacute','\\xE8':'egrave','\\xC8':'Egrave','\\xEA':'ecirc','\\xCA':'Ecirc','\\u011B':'ecaron','\\u011A':'Ecaron','\\xEB':'euml','\\xCB':'Euml','\\u0117':'edot','\\u0116':'Edot','\\u0119':'eogon','\\u0118':'Eogon','\\u0113':'emacr','\\u0112':'Emacr','\\uD835\\uDD23':'ffr','\\uD835\\uDD57':'fopf','\\uD835\\uDCBB':'fscr','\\uD835\\uDD09':'Ffr','\\uD835\\uDD3D':'Fopf','\\u2131':'Fscr','\\uFB00':'fflig','\\uFB03':'ffilig','\\uFB04':'ffllig','\\uFB01':'filig','fj':'fjlig','\\uFB02':'fllig','\\u0192':'fnof','\\u210A':'gscr','\\uD835\\uDD58':'gopf','\\uD835\\uDD24':'gfr','\\uD835\\uDCA2':'Gscr','\\uD835\\uDD3E':'Gopf','\\uD835\\uDD0A':'Gfr','\\u01F5':'gacute','\\u011F':'gbreve','\\u011E':'Gbreve','\\u011D':'gcirc','\\u011C':'Gcirc','\\u0121':'gdot','\\u0120':'Gdot','\\u0122':'Gcedil','\\uD835\\uDD25':'hfr','\\u210E':'planckh','\\uD835\\uDCBD':'hscr','\\uD835\\uDD59':'hopf','\\u210B':'Hscr','\\u210C':'Hfr','\\u210D':'Hopf','\\u0125':'hcirc','\\u0124':'Hcirc','\\u210F':'hbar','\\u0127':'hstrok','\\u0126':'Hstrok','\\uD835\\uDD5A':'iopf','\\uD835\\uDD26':'ifr','\\uD835\\uDCBE':'iscr','\\u2148':'ii','\\uD835\\uDD40':'Iopf','\\u2110':'Iscr','\\u2111':'Im','\\xED':'iacute','\\xCD':'Iacute','\\xEC':'igrave','\\xCC':'Igrave','\\xEE':'icirc','\\xCE':'Icirc','\\xEF':'iuml','\\xCF':'Iuml','\\u0129':'itilde','\\u0128':'Itilde','\\u0130':'Idot','\\u012F':'iogon','\\u012E':'Iogon','\\u012B':'imacr','\\u012A':'Imacr','\\u0133':'ijlig','\\u0132':'IJlig','\\u0131':'imath','\\uD835\\uDCBF':'jscr','\\uD835\\uDD5B':'jopf','\\uD835\\uDD27':'jfr','\\uD835\\uDCA5':'Jscr','\\uD835\\uDD0D':'Jfr','\\uD835\\uDD41':'Jopf','\\u0135':'jcirc','\\u0134':'Jcirc','\\u0237':'jmath','\\uD835\\uDD5C':'kopf','\\uD835\\uDCC0':'kscr','\\uD835\\uDD28':'kfr','\\uD835\\uDCA6':'Kscr','\\uD835\\uDD42':'Kopf','\\uD835\\uDD0E':'Kfr','\\u0137':'kcedil','\\u0136':'Kcedil','\\uD835\\uDD29':'lfr','\\uD835\\uDCC1':'lscr','\\u2113':'ell','\\uD835\\uDD5D':'lopf','\\u2112':'Lscr','\\uD835\\uDD0F':'Lfr','\\uD835\\uDD43':'Lopf','\\u013A':'lacute','\\u0139':'Lacute','\\u013E':'lcaron','\\u013D':'Lcaron','\\u013C':'lcedil','\\u013B':'Lcedil','\\u0142':'lstrok','\\u0141':'Lstrok','\\u0140':'lmidot','\\u013F':'Lmidot','\\uD835\\uDD2A':'mfr','\\uD835\\uDD5E':'mopf','\\uD835\\uDCC2':'mscr','\\uD835\\uDD10':'Mfr','\\uD835\\uDD44':'Mopf','\\u2133':'Mscr','\\uD835\\uDD2B':'nfr','\\uD835\\uDD5F':'nopf','\\uD835\\uDCC3':'nscr','\\u2115':'Nopf','\\uD835\\uDCA9':'Nscr','\\uD835\\uDD11':'Nfr','\\u0144':'nacute','\\u0143':'Nacute','\\u0148':'ncaron','\\u0147':'Ncaron','\\xF1':'ntilde','\\xD1':'Ntilde','\\u0146':'ncedil','\\u0145':'Ncedil','\\u2116':'numero','\\u014B':'eng','\\u014A':'ENG','\\uD835\\uDD60':'oopf','\\uD835\\uDD2C':'ofr','\\u2134':'oscr','\\uD835\\uDCAA':'Oscr','\\uD835\\uDD12':'Ofr','\\uD835\\uDD46':'Oopf','\\xBA':'ordm','\\xF3':'oacute','\\xD3':'Oacute','\\xF2':'ograve','\\xD2':'Ograve','\\xF4':'ocirc','\\xD4':'Ocirc','\\xF6':'ouml','\\xD6':'Ouml','\\u0151':'odblac','\\u0150':'Odblac','\\xF5':'otilde','\\xD5':'Otilde','\\xF8':'oslash','\\xD8':'Oslash','\\u014D':'omacr','\\u014C':'Omacr','\\u0153':'oelig','\\u0152':'OElig','\\uD835\\uDD2D':'pfr','\\uD835\\uDCC5':'pscr','\\uD835\\uDD61':'popf','\\u2119':'Popf','\\uD835\\uDD13':'Pfr','\\uD835\\uDCAB':'Pscr','\\uD835\\uDD62':'qopf','\\uD835\\uDD2E':'qfr','\\uD835\\uDCC6':'qscr','\\uD835\\uDCAC':'Qscr','\\uD835\\uDD14':'Qfr','\\u211A':'Qopf','\\u0138':'kgreen','\\uD835\\uDD2F':'rfr','\\uD835\\uDD63':'ropf','\\uD835\\uDCC7':'rscr','\\u211B':'Rscr','\\u211C':'Re','\\u211D':'Ropf','\\u0155':'racute','\\u0154':'Racute','\\u0159':'rcaron','\\u0158':'Rcaron','\\u0157':'rcedil','\\u0156':'Rcedil','\\uD835\\uDD64':'sopf','\\uD835\\uDCC8':'sscr','\\uD835\\uDD30':'sfr','\\uD835\\uDD4A':'Sopf','\\uD835\\uDD16':'Sfr','\\uD835\\uDCAE':'Sscr','\\u24C8':'oS','\\u015B':'sacute','\\u015A':'Sacute','\\u015D':'scirc','\\u015C':'Scirc','\\u0161':'scaron','\\u0160':'Scaron','\\u015F':'scedil','\\u015E':'Scedil','\\xDF':'szlig','\\uD835\\uDD31':'tfr','\\uD835\\uDCC9':'tscr','\\uD835\\uDD65':'topf','\\uD835\\uDCAF':'Tscr','\\uD835\\uDD17':'Tfr','\\uD835\\uDD4B':'Topf','\\u0165':'tcaron','\\u0164':'Tcaron','\\u0163':'tcedil','\\u0162':'Tcedil','\\u2122':'trade','\\u0167':'tstrok','\\u0166':'Tstrok','\\uD835\\uDCCA':'uscr','\\uD835\\uDD66':'uopf','\\uD835\\uDD32':'ufr','\\uD835\\uDD4C':'Uopf','\\uD835\\uDD18':'Ufr','\\uD835\\uDCB0':'Uscr','\\xFA':'uacute','\\xDA':'Uacute','\\xF9':'ugrave','\\xD9':'Ugrave','\\u016D':'ubreve','\\u016C':'Ubreve','\\xFB':'ucirc','\\xDB':'Ucirc','\\u016F':'uring','\\u016E':'Uring','\\xFC':'uuml','\\xDC':'Uuml','\\u0171':'udblac','\\u0170':'Udblac','\\u0169':'utilde','\\u0168':'Utilde','\\u0173':'uogon','\\u0172':'Uogon','\\u016B':'umacr','\\u016A':'Umacr','\\uD835\\uDD33':'vfr','\\uD835\\uDD67':'vopf','\\uD835\\uDCCB':'vscr','\\uD835\\uDD19':'Vfr','\\uD835\\uDD4D':'Vopf','\\uD835\\uDCB1':'Vscr','\\uD835\\uDD68':'wopf','\\uD835\\uDCCC':'wscr','\\uD835\\uDD34':'wfr','\\uD835\\uDCB2':'Wscr','\\uD835\\uDD4E':'Wopf','\\uD835\\uDD1A':'Wfr','\\u0175':'wcirc','\\u0174':'Wcirc','\\uD835\\uDD35':'xfr','\\uD835\\uDCCD':'xscr','\\uD835\\uDD69':'xopf','\\uD835\\uDD4F':'Xopf','\\uD835\\uDD1B':'Xfr','\\uD835\\uDCB3':'Xscr','\\uD835\\uDD36':'yfr','\\uD835\\uDCCE':'yscr','\\uD835\\uDD6A':'yopf','\\uD835\\uDCB4':'Yscr','\\uD835\\uDD1C':'Yfr','\\uD835\\uDD50':'Yopf','\\xFD':'yacute','\\xDD':'Yacute','\\u0177':'ycirc','\\u0176':'Ycirc','\\xFF':'yuml','\\u0178':'Yuml','\\uD835\\uDCCF':'zscr','\\uD835\\uDD37':'zfr','\\uD835\\uDD6B':'zopf','\\u2128':'Zfr','\\u2124':'Zopf','\\uD835\\uDCB5':'Zscr','\\u017A':'zacute','\\u0179':'Zacute','\\u017E':'zcaron','\\u017D':'Zcaron','\\u017C':'zdot','\\u017B':'Zdot','\\u01B5':'imped','\\xFE':'thorn','\\xDE':'THORN','\\u0149':'napos','\\u03B1':'alpha','\\u0391':'Alpha','\\u03B2':'beta','\\u0392':'Beta','\\u03B3':'gamma','\\u0393':'Gamma','\\u03B4':'delta','\\u0394':'Delta','\\u03B5':'epsi','\\u03F5':'epsiv','\\u0395':'Epsilon','\\u03DD':'gammad','\\u03DC':'Gammad','\\u03B6':'zeta','\\u0396':'Zeta','\\u03B7':'eta','\\u0397':'Eta','\\u03B8':'theta','\\u03D1':'thetav','\\u0398':'Theta','\\u03B9':'iota','\\u0399':'Iota','\\u03BA':'kappa','\\u03F0':'kappav','\\u039A':'Kappa','\\u03BB':'lambda','\\u039B':'Lambda','\\u03BC':'mu','\\xB5':'micro','\\u039C':'Mu','\\u03BD':'nu','\\u039D':'Nu','\\u03BE':'xi','\\u039E':'Xi','\\u03BF':'omicron','\\u039F':'Omicron','\\u03C0':'pi','\\u03D6':'piv','\\u03A0':'Pi','\\u03C1':'rho','\\u03F1':'rhov','\\u03A1':'Rho','\\u03C3':'sigma','\\u03A3':'Sigma','\\u03C2':'sigmaf','\\u03C4':'tau','\\u03A4':'Tau','\\u03C5':'upsi','\\u03A5':'Upsilon','\\u03D2':'Upsi','\\u03C6':'phi','\\u03D5':'phiv','\\u03A6':'Phi','\\u03C7':'chi','\\u03A7':'Chi','\\u03C8':'psi','\\u03A8':'Psi','\\u03C9':'omega','\\u03A9':'ohm','\\u0430':'acy','\\u0410':'Acy','\\u0431':'bcy','\\u0411':'Bcy','\\u0432':'vcy','\\u0412':'Vcy','\\u0433':'gcy','\\u0413':'Gcy','\\u0453':'gjcy','\\u0403':'GJcy','\\u0434':'dcy','\\u0414':'Dcy','\\u0452':'djcy','\\u0402':'DJcy','\\u0435':'iecy','\\u0415':'IEcy','\\u0451':'iocy','\\u0401':'IOcy','\\u0454':'jukcy','\\u0404':'Jukcy','\\u0436':'zhcy','\\u0416':'ZHcy','\\u0437':'zcy','\\u0417':'Zcy','\\u0455':'dscy','\\u0405':'DScy','\\u0438':'icy','\\u0418':'Icy','\\u0456':'iukcy','\\u0406':'Iukcy','\\u0457':'yicy','\\u0407':'YIcy','\\u0439':'jcy','\\u0419':'Jcy','\\u0458':'jsercy','\\u0408':'Jsercy','\\u043A':'kcy','\\u041A':'Kcy','\\u045C':'kjcy','\\u040C':'KJcy','\\u043B':'lcy','\\u041B':'Lcy','\\u0459':'ljcy','\\u0409':'LJcy','\\u043C':'mcy','\\u041C':'Mcy','\\u043D':'ncy','\\u041D':'Ncy','\\u045A':'njcy','\\u040A':'NJcy','\\u043E':'ocy','\\u041E':'Ocy','\\u043F':'pcy','\\u041F':'Pcy','\\u0440':'rcy','\\u0420':'Rcy','\\u0441':'scy','\\u0421':'Scy','\\u0442':'tcy','\\u0422':'Tcy','\\u045B':'tshcy','\\u040B':'TSHcy','\\u0443':'ucy','\\u0423':'Ucy','\\u045E':'ubrcy','\\u040E':'Ubrcy','\\u0444':'fcy','\\u0424':'Fcy','\\u0445':'khcy','\\u0425':'KHcy','\\u0446':'tscy','\\u0426':'TScy','\\u0447':'chcy','\\u0427':'CHcy','\\u045F':'dzcy','\\u040F':'DZcy','\\u0448':'shcy','\\u0428':'SHcy','\\u0449':'shchcy','\\u0429':'SHCHcy','\\u044A':'hardcy','\\u042A':'HARDcy','\\u044B':'ycy','\\u042B':'Ycy','\\u044C':'softcy','\\u042C':'SOFTcy','\\u044D':'ecy','\\u042D':'Ecy','\\u044E':'yucy','\\u042E':'YUcy','\\u044F':'yacy','\\u042F':'YAcy','\\u2135':'aleph','\\u2136':'beth','\\u2137':'gimel','\\u2138':'daleth'};\n\n\tvar regexEscape = /[\"&'<>`]/g;\n\tvar escapeMap = {\n\t\t'\"': '"',\n\t\t'&': '&',\n\t\t'\\'': ''',\n\t\t'<': '<',\n\t\t// See https://mathiasbynens.be/notes/ambiguous-ampersands: in HTML, the\n\t\t// following is not strictly necessary unless it’s part of a tag or an\n\t\t// unquoted attribute value. We’re only escaping it to support those\n\t\t// situations, and for XML support.\n\t\t'>': '>',\n\t\t// In Internet Explorer ≤ 8, the backtick character can be used\n\t\t// to break out of (un)quoted attribute values or HTML comments.\n\t\t// See http://html5sec.org/#102, http://html5sec.org/#108, and\n\t\t// http://html5sec.org/#133.\n\t\t'`': '`'\n\t};\n\n\tvar regexInvalidEntity = /&#(?:[xX][^a-fA-F0-9]|[^0-9xX])/;\n\tvar regexInvalidRawCodePoint = /[\\0-\\x08\\x0B\\x0E-\\x1F\\x7F-\\x9F\\uFDD0-\\uFDEF\\uFFFE\\uFFFF]|[\\uD83F\\uD87F\\uD8BF\\uD8FF\\uD93F\\uD97F\\uD9BF\\uD9FF\\uDA3F\\uDA7F\\uDABF\\uDAFF\\uDB3F\\uDB7F\\uDBBF\\uDBFF][\\uDFFE\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]/;\n\tvar regexDecode = /&(CounterClockwiseContourIntegral|DoubleLongLeftRightArrow|ClockwiseContourIntegral|NotNestedGreaterGreater|NotSquareSupersetEqual|DiacriticalDoubleAcute|NotRightTriangleEqual|NotSucceedsSlantEqual|NotPrecedesSlantEqual|CloseCurlyDoubleQuote|NegativeVeryThinSpace|DoubleContourIntegral|FilledVerySmallSquare|CapitalDifferentialD|OpenCurlyDoubleQuote|EmptyVerySmallSquare|NestedGreaterGreater|DoubleLongRightArrow|NotLeftTriangleEqual|NotGreaterSlantEqual|ReverseUpEquilibrium|DoubleLeftRightArrow|NotSquareSubsetEqual|NotDoubleVerticalBar|RightArrowLeftArrow|NotGreaterFullEqual|NotRightTriangleBar|SquareSupersetEqual|DownLeftRightVector|DoubleLongLeftArrow|leftrightsquigarrow|LeftArrowRightArrow|NegativeMediumSpace|blacktriangleright|RightDownVectorBar|PrecedesSlantEqual|RightDoubleBracket|SucceedsSlantEqual|NotLeftTriangleBar|RightTriangleEqual|SquareIntersection|RightDownTeeVector|ReverseEquilibrium|NegativeThickSpace|longleftrightarrow|Longleftrightarrow|LongLeftRightArrow|DownRightTeeVector|DownRightVectorBar|GreaterSlantEqual|SquareSubsetEqual|LeftDownVectorBar|LeftDoubleBracket|VerticalSeparator|rightleftharpoons|NotGreaterGreater|NotSquareSuperset|blacktriangleleft|blacktriangledown|NegativeThinSpace|LeftDownTeeVector|NotLessSlantEqual|leftrightharpoons|DoubleUpDownArrow|DoubleVerticalBar|LeftTriangleEqual|FilledSmallSquare|twoheadrightarrow|NotNestedLessLess|DownLeftTeeVector|DownLeftVectorBar|RightAngleBracket|NotTildeFullEqual|NotReverseElement|RightUpDownVector|DiacriticalTilde|NotSucceedsTilde|circlearrowright|NotPrecedesEqual|rightharpoondown|DoubleRightArrow|NotSucceedsEqual|NonBreakingSpace|NotRightTriangle|LessEqualGreater|RightUpTeeVector|LeftAngleBracket|GreaterFullEqual|DownArrowUpArrow|RightUpVectorBar|twoheadleftarrow|GreaterEqualLess|downharpoonright|RightTriangleBar|ntrianglerighteq|NotSupersetEqual|LeftUpDownVector|DiacriticalAcute|rightrightarrows|vartriangleright|UpArrowDownArrow|DiacriticalGrave|UnderParenthesis|EmptySmallSquare|LeftUpVectorBar|leftrightarrows|DownRightVector|downharpoonleft|trianglerighteq|ShortRightArrow|OverParenthesis|DoubleLeftArrow|DoubleDownArrow|NotSquareSubset|bigtriangledown|ntrianglelefteq|UpperRightArrow|curvearrowright|vartriangleleft|NotLeftTriangle|nleftrightarrow|LowerRightArrow|NotHumpDownHump|NotGreaterTilde|rightthreetimes|LeftUpTeeVector|NotGreaterEqual|straightepsilon|LeftTriangleBar|rightsquigarrow|ContourIntegral|rightleftarrows|CloseCurlyQuote|RightDownVector|LeftRightVector|nLeftrightarrow|leftharpoondown|circlearrowleft|SquareSuperset|OpenCurlyQuote|hookrightarrow|HorizontalLine|DiacriticalDot|NotLessGreater|ntriangleright|DoubleRightTee|InvisibleComma|InvisibleTimes|LowerLeftArrow|DownLeftVector|NotSubsetEqual|curvearrowleft|trianglelefteq|NotVerticalBar|TildeFullEqual|downdownarrows|NotGreaterLess|RightTeeVector|ZeroWidthSpace|looparrowright|LongRightArrow|doublebarwedge|ShortLeftArrow|ShortDownArrow|RightVectorBar|GreaterGreater|ReverseElement|rightharpoonup|LessSlantEqual|leftthreetimes|upharpoonright|rightarrowtail|LeftDownVector|Longrightarrow|NestedLessLess|UpperLeftArrow|nshortparallel|leftleftarrows|leftrightarrow|Leftrightarrow|LeftRightArrow|longrightarrow|upharpoonleft|RightArrowBar|ApplyFunction|LeftTeeVector|leftarrowtail|NotEqualTilde|varsubsetneqq|varsupsetneqq|RightTeeArrow|SucceedsEqual|SucceedsTilde|LeftVectorBar|SupersetEqual|hookleftarrow|DifferentialD|VerticalTilde|VeryThinSpace|blacktriangle|bigtriangleup|LessFullEqual|divideontimes|leftharpoonup|UpEquilibrium|ntriangleleft|RightTriangle|measuredangle|shortparallel|longleftarrow|Longleftarrow|LongLeftArrow|DoubleLeftTee|Poincareplane|PrecedesEqual|triangleright|DoubleUpArrow|RightUpVector|fallingdotseq|looparrowleft|PrecedesTilde|NotTildeEqual|NotTildeTilde|smallsetminus|Proportional|triangleleft|triangledown|UnderBracket|NotHumpEqual|exponentiale|ExponentialE|NotLessTilde|HilbertSpace|RightCeiling|blacklozenge|varsupsetneq|HumpDownHump|GreaterEqual|VerticalLine|LeftTeeArrow|NotLessEqual|DownTeeArrow|LeftTriangle|varsubsetneq|Intersection|NotCongruent|DownArrowBar|LeftUpVector|LeftArrowBar|risingdotseq|GreaterTilde|RoundImplies|SquareSubset|ShortUpArrow|NotSuperset|quaternions|precnapprox|backepsilon|preccurlyeq|OverBracket|blacksquare|MediumSpace|VerticalBar|circledcirc|circleddash|CircleMinus|CircleTimes|LessGreater|curlyeqprec|curlyeqsucc|diamondsuit|UpDownArrow|Updownarrow|RuleDelayed|Rrightarrow|updownarrow|RightVector|nRightarrow|nrightarrow|eqslantless|LeftCeiling|Equilibrium|SmallCircle|expectation|NotSucceeds|thickapprox|GreaterLess|SquareUnion|NotPrecedes|NotLessLess|straightphi|succnapprox|succcurlyeq|SubsetEqual|sqsupseteq|Proportion|Laplacetrf|ImaginaryI|supsetneqq|NotGreater|gtreqqless|NotElement|ThickSpace|TildeEqual|TildeTilde|Fouriertrf|rmoustache|EqualTilde|eqslantgtr|UnderBrace|LeftVector|UpArrowBar|nLeftarrow|nsubseteqq|subsetneqq|nsupseteqq|nleftarrow|succapprox|lessapprox|UpTeeArrow|upuparrows|curlywedge|lesseqqgtr|varepsilon|varnothing|RightFloor|complement|CirclePlus|sqsubseteq|Lleftarrow|circledast|RightArrow|Rightarrow|rightarrow|lmoustache|Bernoullis|precapprox|mapstoleft|mapstodown|longmapsto|dotsquare|downarrow|DoubleDot|nsubseteq|supsetneq|leftarrow|nsupseteq|subsetneq|ThinSpace|ngeqslant|subseteqq|HumpEqual|NotSubset|triangleq|NotCupCap|lesseqgtr|heartsuit|TripleDot|Leftarrow|Coproduct|Congruent|varpropto|complexes|gvertneqq|LeftArrow|LessTilde|supseteqq|MinusPlus|CircleDot|nleqslant|NotExists|gtreqless|nparallel|UnionPlus|LeftFloor|checkmark|CenterDot|centerdot|Mellintrf|gtrapprox|bigotimes|OverBrace|spadesuit|therefore|pitchfork|rationals|PlusMinus|Backslash|Therefore|DownBreve|backsimeq|backprime|DownArrow|nshortmid|Downarrow|lvertneqq|eqvparsl|imagline|imagpart|infintie|integers|Integral|intercal|LessLess|Uarrocir|intlarhk|sqsupset|angmsdaf|sqsubset|llcorner|vartheta|cupbrcap|lnapprox|Superset|SuchThat|succnsim|succneqq|angmsdag|biguplus|curlyvee|trpezium|Succeeds|NotTilde|bigwedge|angmsdah|angrtvbd|triminus|cwconint|fpartint|lrcorner|smeparsl|subseteq|urcorner|lurdshar|laemptyv|DDotrahd|approxeq|ldrushar|awconint|mapstoup|backcong|shortmid|triangle|geqslant|gesdotol|timesbar|circledR|circledS|setminus|multimap|naturals|scpolint|ncongdot|RightTee|boxminus|gnapprox|boxtimes|andslope|thicksim|angmsdaa|varsigma|cirfnint|rtriltri|angmsdab|rppolint|angmsdac|barwedge|drbkarow|clubsuit|thetasym|bsolhsub|capbrcup|dzigrarr|doteqdot|DotEqual|dotminus|UnderBar|NotEqual|realpart|otimesas|ulcorner|hksearow|hkswarow|parallel|PartialD|elinters|emptyset|plusacir|bbrktbrk|angmsdad|pointint|bigoplus|angmsdae|Precedes|bigsqcup|varkappa|notindot|supseteq|precneqq|precnsim|profalar|profline|profsurf|leqslant|lesdotor|raemptyv|subplus|notnivb|notnivc|subrarr|zigrarr|vzigzag|submult|subedot|Element|between|cirscir|larrbfs|larrsim|lotimes|lbrksld|lbrkslu|lozenge|ldrdhar|dbkarow|bigcirc|epsilon|simrarr|simplus|ltquest|Epsilon|luruhar|gtquest|maltese|npolint|eqcolon|npreceq|bigodot|ddagger|gtrless|bnequiv|harrcir|ddotseq|equivDD|backsim|demptyv|nsqsube|nsqsupe|Upsilon|nsubset|upsilon|minusdu|nsucceq|swarrow|nsupset|coloneq|searrow|boxplus|napprox|natural|asympeq|alefsym|congdot|nearrow|bigstar|diamond|supplus|tritime|LeftTee|nvinfin|triplus|NewLine|nvltrie|nvrtrie|nwarrow|nexists|Diamond|ruluhar|Implies|supmult|angzarr|suplarr|suphsub|questeq|because|digamma|Because|olcross|bemptyv|omicron|Omicron|rotimes|NoBreak|intprod|angrtvb|orderof|uwangle|suphsol|lesdoto|orslope|DownTee|realine|cudarrl|rdldhar|OverBar|supedot|lessdot|supdsub|topfork|succsim|rbrkslu|rbrksld|pertenk|cudarrr|isindot|planckh|lessgtr|pluscir|gesdoto|plussim|plustwo|lesssim|cularrp|rarrsim|Cayleys|notinva|notinvb|notinvc|UpArrow|Uparrow|uparrow|NotLess|dwangle|precsim|Product|curarrm|Cconint|dotplus|rarrbfs|ccupssm|Cedilla|cemptyv|notniva|quatint|frac35|frac38|frac45|frac56|frac58|frac78|tridot|xoplus|gacute|gammad|Gammad|lfisht|lfloor|bigcup|sqsupe|gbreve|Gbreve|lharul|sqsube|sqcups|Gcedil|apacir|llhard|lmidot|Lmidot|lmoust|andand|sqcaps|approx|Abreve|spades|circeq|tprime|divide|topcir|Assign|topbot|gesdot|divonx|xuplus|timesd|gesles|atilde|solbar|SOFTcy|loplus|timesb|lowast|lowbar|dlcorn|dlcrop|softcy|dollar|lparlt|thksim|lrhard|Atilde|lsaquo|smashp|bigvee|thinsp|wreath|bkarow|lsquor|lstrok|Lstrok|lthree|ltimes|ltlarr|DotDot|simdot|ltrPar|weierp|xsqcup|angmsd|sigmav|sigmaf|zeetrf|Zcaron|zcaron|mapsto|vsupne|thetav|cirmid|marker|mcomma|Zacute|vsubnE|there4|gtlPar|vsubne|bottom|gtrarr|SHCHcy|shchcy|midast|midcir|middot|minusb|minusd|gtrdot|bowtie|sfrown|mnplus|models|colone|seswar|Colone|mstpos|searhk|gtrsim|nacute|Nacute|boxbox|telrec|hairsp|Tcedil|nbumpe|scnsim|ncaron|Ncaron|ncedil|Ncedil|hamilt|Scedil|nearhk|hardcy|HARDcy|tcedil|Tcaron|commat|nequiv|nesear|tcaron|target|hearts|nexist|varrho|scedil|Scaron|scaron|hellip|Sacute|sacute|hercon|swnwar|compfn|rtimes|rthree|rsquor|rsaquo|zacute|wedgeq|homtht|barvee|barwed|Barwed|rpargt|horbar|conint|swarhk|roplus|nltrie|hslash|hstrok|Hstrok|rmoust|Conint|bprime|hybull|hyphen|iacute|Iacute|supsup|supsub|supsim|varphi|coprod|brvbar|agrave|Supset|supset|igrave|Igrave|notinE|Agrave|iiiint|iinfin|copysr|wedbar|Verbar|vangrt|becaus|incare|verbar|inodot|bullet|drcorn|intcal|drcrop|cularr|vellip|Utilde|bumpeq|cupcap|dstrok|Dstrok|CupCap|cupcup|cupdot|eacute|Eacute|supdot|iquest|easter|ecaron|Ecaron|ecolon|isinsv|utilde|itilde|Itilde|curarr|succeq|Bumpeq|cacute|ulcrop|nparsl|Cacute|nprcue|egrave|Egrave|nrarrc|nrarrw|subsup|subsub|nrtrie|jsercy|nsccue|Jsercy|kappav|kcedil|Kcedil|subsim|ulcorn|nsimeq|egsdot|veebar|kgreen|capand|elsdot|Subset|subset|curren|aacute|lacute|Lacute|emptyv|ntilde|Ntilde|lagran|lambda|Lambda|capcap|Ugrave|langle|subdot|emsp13|numero|emsp14|nvdash|nvDash|nVdash|nVDash|ugrave|ufisht|nvHarr|larrfs|nvlArr|larrhk|larrlp|larrpl|nvrArr|Udblac|nwarhk|larrtl|nwnear|oacute|Oacute|latail|lAtail|sstarf|lbrace|odblac|Odblac|lbrack|udblac|odsold|eparsl|lcaron|Lcaron|ograve|Ograve|lcedil|Lcedil|Aacute|ssmile|ssetmn|squarf|ldquor|capcup|ominus|cylcty|rharul|eqcirc|dagger|rfloor|rfisht|Dagger|daleth|equals|origof|capdot|equest|dcaron|Dcaron|rdquor|oslash|Oslash|otilde|Otilde|otimes|Otimes|urcrop|Ubreve|ubreve|Yacute|Uacute|uacute|Rcedil|rcedil|urcorn|parsim|Rcaron|Vdashl|rcaron|Tstrok|percnt|period|permil|Exists|yacute|rbrack|rbrace|phmmat|ccaron|Ccaron|planck|ccedil|plankv|tstrok|female|plusdo|plusdu|ffilig|plusmn|ffllig|Ccedil|rAtail|dfisht|bernou|ratail|Rarrtl|rarrtl|angsph|rarrpl|rarrlp|rarrhk|xwedge|xotime|forall|ForAll|Vvdash|vsupnE|preceq|bigcap|frac12|frac13|frac14|primes|rarrfs|prnsim|frac15|Square|frac16|square|lesdot|frac18|frac23|propto|prurel|rarrap|rangle|puncsp|frac25|Racute|qprime|racute|lesges|frac34|abreve|AElig|eqsim|utdot|setmn|urtri|Equal|Uring|seArr|uring|searr|dashv|Dashv|mumap|nabla|iogon|Iogon|sdote|sdotb|scsim|napid|napos|equiv|natur|Acirc|dblac|erarr|nbump|iprod|erDot|ucirc|awint|esdot|angrt|ncong|isinE|scnap|Scirc|scirc|ndash|isins|Ubrcy|nearr|neArr|isinv|nedot|ubrcy|acute|Ycirc|iukcy|Iukcy|xutri|nesim|caret|jcirc|Jcirc|caron|twixt|ddarr|sccue|exist|jmath|sbquo|ngeqq|angst|ccaps|lceil|ngsim|UpTee|delta|Delta|rtrif|nharr|nhArr|nhpar|rtrie|jukcy|Jukcy|kappa|rsquo|Kappa|nlarr|nlArr|TSHcy|rrarr|aogon|Aogon|fflig|xrarr|tshcy|ccirc|nleqq|filig|upsih|nless|dharl|nlsim|fjlig|ropar|nltri|dharr|robrk|roarr|fllig|fltns|roang|rnmid|subnE|subne|lAarr|trisb|Ccirc|acirc|ccups|blank|VDash|forkv|Vdash|langd|cedil|blk12|blk14|laquo|strns|diams|notin|vDash|larrb|blk34|block|disin|uplus|vdash|vBarv|aelig|starf|Wedge|check|xrArr|lates|lbarr|lBarr|notni|lbbrk|bcong|frasl|lbrke|frown|vrtri|vprop|vnsup|gamma|Gamma|wedge|xodot|bdquo|srarr|doteq|ldquo|boxdl|boxdL|gcirc|Gcirc|boxDl|boxDL|boxdr|boxdR|boxDr|TRADE|trade|rlhar|boxDR|vnsub|npart|vltri|rlarr|boxhd|boxhD|nprec|gescc|nrarr|nrArr|boxHd|boxHD|boxhu|boxhU|nrtri|boxHu|clubs|boxHU|times|colon|Colon|gimel|xlArr|Tilde|nsime|tilde|nsmid|nspar|THORN|thorn|xlarr|nsube|nsubE|thkap|xhArr|comma|nsucc|boxul|boxuL|nsupe|nsupE|gneqq|gnsim|boxUl|boxUL|grave|boxur|boxuR|boxUr|boxUR|lescc|angle|bepsi|boxvh|varpi|boxvH|numsp|Theta|gsime|gsiml|theta|boxVh|boxVH|boxvl|gtcir|gtdot|boxvL|boxVl|boxVL|crarr|cross|Cross|nvsim|boxvr|nwarr|nwArr|sqsup|dtdot|Uogon|lhard|lharu|dtrif|ocirc|Ocirc|lhblk|duarr|odash|sqsub|Hacek|sqcup|llarr|duhar|oelig|OElig|ofcir|boxvR|uogon|lltri|boxVr|csube|uuarr|ohbar|csupe|ctdot|olarr|olcir|harrw|oline|sqcap|omacr|Omacr|omega|Omega|boxVR|aleph|lneqq|lnsim|loang|loarr|rharu|lobrk|hcirc|operp|oplus|rhard|Hcirc|orarr|Union|order|ecirc|Ecirc|cuepr|szlig|cuesc|breve|reals|eDDot|Breve|hoarr|lopar|utrif|rdquo|Umacr|umacr|efDot|swArr|ultri|alpha|rceil|ovbar|swarr|Wcirc|wcirc|smtes|smile|bsemi|lrarr|aring|parsl|lrhar|bsime|uhblk|lrtri|cupor|Aring|uharr|uharl|slarr|rbrke|bsolb|lsime|rbbrk|RBarr|lsimg|phone|rBarr|rbarr|icirc|lsquo|Icirc|emacr|Emacr|ratio|simne|plusb|simlE|simgE|simeq|pluse|ltcir|ltdot|empty|xharr|xdtri|iexcl|Alpha|ltrie|rarrw|pound|ltrif|xcirc|bumpe|prcue|bumpE|asymp|amacr|cuvee|Sigma|sigma|iiint|udhar|iiota|ijlig|IJlig|supnE|imacr|Imacr|prime|Prime|image|prnap|eogon|Eogon|rarrc|mdash|mDDot|cuwed|imath|supne|imped|Amacr|udarr|prsim|micro|rarrb|cwint|raquo|infin|eplus|range|rangd|Ucirc|radic|minus|amalg|veeeq|rAarr|epsiv|ycirc|quest|sharp|quot|zwnj|Qscr|race|qscr|Qopf|qopf|qint|rang|Rang|Zscr|zscr|Zopf|zopf|rarr|rArr|Rarr|Pscr|pscr|prop|prod|prnE|prec|ZHcy|zhcy|prap|Zeta|zeta|Popf|popf|Zdot|plus|zdot|Yuml|yuml|phiv|YUcy|yucy|Yscr|yscr|perp|Yopf|yopf|part|para|YIcy|Ouml|rcub|yicy|YAcy|rdca|ouml|osol|Oscr|rdsh|yacy|real|oscr|xvee|andd|rect|andv|Xscr|oror|ordm|ordf|xscr|ange|aopf|Aopf|rHar|Xopf|opar|Oopf|xopf|xnis|rhov|oopf|omid|xmap|oint|apid|apos|ogon|ascr|Ascr|odot|odiv|xcup|xcap|ocir|oast|nvlt|nvle|nvgt|nvge|nvap|Wscr|wscr|auml|ntlg|ntgl|nsup|nsub|nsim|Nscr|nscr|nsce|Wopf|ring|npre|wopf|npar|Auml|Barv|bbrk|Nopf|nopf|nmid|nLtv|beta|ropf|Ropf|Beta|beth|nles|rpar|nleq|bnot|bNot|nldr|NJcy|rscr|Rscr|Vscr|vscr|rsqb|njcy|bopf|nisd|Bopf|rtri|Vopf|nGtv|ngtr|vopf|boxh|boxH|boxv|nges|ngeq|boxV|bscr|scap|Bscr|bsim|Vert|vert|bsol|bull|bump|caps|cdot|ncup|scnE|ncap|nbsp|napE|Cdot|cent|sdot|Vbar|nang|vBar|chcy|Mscr|mscr|sect|semi|CHcy|Mopf|mopf|sext|circ|cire|mldr|mlcp|cirE|comp|shcy|SHcy|vArr|varr|cong|copf|Copf|copy|COPY|malt|male|macr|lvnE|cscr|ltri|sime|ltcc|simg|Cscr|siml|csub|Uuml|lsqb|lsim|uuml|csup|Lscr|lscr|utri|smid|lpar|cups|smte|lozf|darr|Lopf|Uscr|solb|lopf|sopf|Sopf|lneq|uscr|spar|dArr|lnap|Darr|dash|Sqrt|LJcy|ljcy|lHar|dHar|Upsi|upsi|diam|lesg|djcy|DJcy|leqq|dopf|Dopf|dscr|Dscr|dscy|ldsh|ldca|squf|DScy|sscr|Sscr|dsol|lcub|late|star|Star|Uopf|Larr|lArr|larr|uopf|dtri|dzcy|sube|subE|Lang|lang|Kscr|kscr|Kopf|kopf|KJcy|kjcy|KHcy|khcy|DZcy|ecir|edot|eDot|Jscr|jscr|succ|Jopf|jopf|Edot|uHar|emsp|ensp|Iuml|iuml|eopf|isin|Iscr|iscr|Eopf|epar|sung|epsi|escr|sup1|sup2|sup3|Iota|iota|supe|supE|Iopf|iopf|IOcy|iocy|Escr|esim|Esim|imof|Uarr|QUOT|uArr|uarr|euml|IEcy|iecy|Idot|Euml|euro|excl|Hscr|hscr|Hopf|hopf|TScy|tscy|Tscr|hbar|tscr|flat|tbrk|fnof|hArr|harr|half|fopf|Fopf|tdot|gvnE|fork|trie|gtcc|fscr|Fscr|gdot|gsim|Gscr|gscr|Gopf|gopf|gneq|Gdot|tosa|gnap|Topf|topf|geqq|toea|GJcy|gjcy|tint|gesl|mid|Sfr|ggg|top|ges|gla|glE|glj|geq|gne|gEl|gel|gnE|Gcy|gcy|gap|Tfr|tfr|Tcy|tcy|Hat|Tau|Ffr|tau|Tab|hfr|Hfr|ffr|Fcy|fcy|icy|Icy|iff|ETH|eth|ifr|Ifr|Eta|eta|int|Int|Sup|sup|ucy|Ucy|Sum|sum|jcy|ENG|ufr|Ufr|eng|Jcy|jfr|els|ell|egs|Efr|efr|Jfr|uml|kcy|Kcy|Ecy|ecy|kfr|Kfr|lap|Sub|sub|lat|lcy|Lcy|leg|Dot|dot|lEg|leq|les|squ|div|die|lfr|Lfr|lgE|Dfr|dfr|Del|deg|Dcy|dcy|lne|lnE|sol|loz|smt|Cup|lrm|cup|lsh|Lsh|sim|shy|map|Map|mcy|Mcy|mfr|Mfr|mho|gfr|Gfr|sfr|cir|Chi|chi|nap|Cfr|vcy|Vcy|cfr|Scy|scy|ncy|Ncy|vee|Vee|Cap|cap|nfr|scE|sce|Nfr|nge|ngE|nGg|vfr|Vfr|ngt|bot|nGt|nis|niv|Rsh|rsh|nle|nlE|bne|Bfr|bfr|nLl|nlt|nLt|Bcy|bcy|not|Not|rlm|wfr|Wfr|npr|nsc|num|ocy|ast|Ocy|ofr|xfr|Xfr|Ofr|ogt|ohm|apE|olt|Rho|ape|rho|Rfr|rfr|ord|REG|ang|reg|orv|And|and|AMP|Rcy|amp|Afr|ycy|Ycy|yen|yfr|Yfr|rcy|par|pcy|Pcy|pfr|Pfr|phi|Phi|afr|Acy|acy|zcy|Zcy|piv|acE|acd|zfr|Zfr|pre|prE|psi|Psi|qfr|Qfr|zwj|Or|ge|Gg|gt|gg|el|oS|lt|Lt|LT|Re|lg|gl|eg|ne|Im|it|le|DD|wp|wr|nu|Nu|dd|lE|Sc|sc|pi|Pi|ee|af|ll|Ll|rx|gE|xi|pm|Xi|ic|pr|Pr|in|ni|mp|mu|ac|Mu|or|ap|Gt|GT|ii);|&(Aacute|Agrave|Atilde|Ccedil|Eacute|Egrave|Iacute|Igrave|Ntilde|Oacute|Ograve|Oslash|Otilde|Uacute|Ugrave|Yacute|aacute|agrave|atilde|brvbar|ccedil|curren|divide|eacute|egrave|frac12|frac14|frac34|iacute|igrave|iquest|middot|ntilde|oacute|ograve|oslash|otilde|plusmn|uacute|ugrave|yacute|AElig|Acirc|Aring|Ecirc|Icirc|Ocirc|THORN|Ucirc|acirc|acute|aelig|aring|cedil|ecirc|icirc|iexcl|laquo|micro|ocirc|pound|raquo|szlig|thorn|times|ucirc|Auml|COPY|Euml|Iuml|Ouml|QUOT|Uuml|auml|cent|copy|euml|iuml|macr|nbsp|ordf|ordm|ouml|para|quot|sect|sup1|sup2|sup3|uuml|yuml|AMP|ETH|REG|amp|deg|eth|not|reg|shy|uml|yen|GT|LT|gt|lt)(?!;)([=a-zA-Z0-9]?)|&#([0-9]+)(;?)|&#[xX]([a-fA-F0-9]+)(;?)|&([0-9a-zA-Z]+)/g;\n\tvar decodeMap = {'aacute':'\\xE1','Aacute':'\\xC1','abreve':'\\u0103','Abreve':'\\u0102','ac':'\\u223E','acd':'\\u223F','acE':'\\u223E\\u0333','acirc':'\\xE2','Acirc':'\\xC2','acute':'\\xB4','acy':'\\u0430','Acy':'\\u0410','aelig':'\\xE6','AElig':'\\xC6','af':'\\u2061','afr':'\\uD835\\uDD1E','Afr':'\\uD835\\uDD04','agrave':'\\xE0','Agrave':'\\xC0','alefsym':'\\u2135','aleph':'\\u2135','alpha':'\\u03B1','Alpha':'\\u0391','amacr':'\\u0101','Amacr':'\\u0100','amalg':'\\u2A3F','amp':'&','AMP':'&','and':'\\u2227','And':'\\u2A53','andand':'\\u2A55','andd':'\\u2A5C','andslope':'\\u2A58','andv':'\\u2A5A','ang':'\\u2220','ange':'\\u29A4','angle':'\\u2220','angmsd':'\\u2221','angmsdaa':'\\u29A8','angmsdab':'\\u29A9','angmsdac':'\\u29AA','angmsdad':'\\u29AB','angmsdae':'\\u29AC','angmsdaf':'\\u29AD','angmsdag':'\\u29AE','angmsdah':'\\u29AF','angrt':'\\u221F','angrtvb':'\\u22BE','angrtvbd':'\\u299D','angsph':'\\u2222','angst':'\\xC5','angzarr':'\\u237C','aogon':'\\u0105','Aogon':'\\u0104','aopf':'\\uD835\\uDD52','Aopf':'\\uD835\\uDD38','ap':'\\u2248','apacir':'\\u2A6F','ape':'\\u224A','apE':'\\u2A70','apid':'\\u224B','apos':'\\'','ApplyFunction':'\\u2061','approx':'\\u2248','approxeq':'\\u224A','aring':'\\xE5','Aring':'\\xC5','ascr':'\\uD835\\uDCB6','Ascr':'\\uD835\\uDC9C','Assign':'\\u2254','ast':'*','asymp':'\\u2248','asympeq':'\\u224D','atilde':'\\xE3','Atilde':'\\xC3','auml':'\\xE4','Auml':'\\xC4','awconint':'\\u2233','awint':'\\u2A11','backcong':'\\u224C','backepsilon':'\\u03F6','backprime':'\\u2035','backsim':'\\u223D','backsimeq':'\\u22CD','Backslash':'\\u2216','Barv':'\\u2AE7','barvee':'\\u22BD','barwed':'\\u2305','Barwed':'\\u2306','barwedge':'\\u2305','bbrk':'\\u23B5','bbrktbrk':'\\u23B6','bcong':'\\u224C','bcy':'\\u0431','Bcy':'\\u0411','bdquo':'\\u201E','becaus':'\\u2235','because':'\\u2235','Because':'\\u2235','bemptyv':'\\u29B0','bepsi':'\\u03F6','bernou':'\\u212C','Bernoullis':'\\u212C','beta':'\\u03B2','Beta':'\\u0392','beth':'\\u2136','between':'\\u226C','bfr':'\\uD835\\uDD1F','Bfr':'\\uD835\\uDD05','bigcap':'\\u22C2','bigcirc':'\\u25EF','bigcup':'\\u22C3','bigodot':'\\u2A00','bigoplus':'\\u2A01','bigotimes':'\\u2A02','bigsqcup':'\\u2A06','bigstar':'\\u2605','bigtriangledown':'\\u25BD','bigtriangleup':'\\u25B3','biguplus':'\\u2A04','bigvee':'\\u22C1','bigwedge':'\\u22C0','bkarow':'\\u290D','blacklozenge':'\\u29EB','blacksquare':'\\u25AA','blacktriangle':'\\u25B4','blacktriangledown':'\\u25BE','blacktriangleleft':'\\u25C2','blacktriangleright':'\\u25B8','blank':'\\u2423','blk12':'\\u2592','blk14':'\\u2591','blk34':'\\u2593','block':'\\u2588','bne':'=\\u20E5','bnequiv':'\\u2261\\u20E5','bnot':'\\u2310','bNot':'\\u2AED','bopf':'\\uD835\\uDD53','Bopf':'\\uD835\\uDD39','bot':'\\u22A5','bottom':'\\u22A5','bowtie':'\\u22C8','boxbox':'\\u29C9','boxdl':'\\u2510','boxdL':'\\u2555','boxDl':'\\u2556','boxDL':'\\u2557','boxdr':'\\u250C','boxdR':'\\u2552','boxDr':'\\u2553','boxDR':'\\u2554','boxh':'\\u2500','boxH':'\\u2550','boxhd':'\\u252C','boxhD':'\\u2565','boxHd':'\\u2564','boxHD':'\\u2566','boxhu':'\\u2534','boxhU':'\\u2568','boxHu':'\\u2567','boxHU':'\\u2569','boxminus':'\\u229F','boxplus':'\\u229E','boxtimes':'\\u22A0','boxul':'\\u2518','boxuL':'\\u255B','boxUl':'\\u255C','boxUL':'\\u255D','boxur':'\\u2514','boxuR':'\\u2558','boxUr':'\\u2559','boxUR':'\\u255A','boxv':'\\u2502','boxV':'\\u2551','boxvh':'\\u253C','boxvH':'\\u256A','boxVh':'\\u256B','boxVH':'\\u256C','boxvl':'\\u2524','boxvL':'\\u2561','boxVl':'\\u2562','boxVL':'\\u2563','boxvr':'\\u251C','boxvR':'\\u255E','boxVr':'\\u255F','boxVR':'\\u2560','bprime':'\\u2035','breve':'\\u02D8','Breve':'\\u02D8','brvbar':'\\xA6','bscr':'\\uD835\\uDCB7','Bscr':'\\u212C','bsemi':'\\u204F','bsim':'\\u223D','bsime':'\\u22CD','bsol':'\\\\','bsolb':'\\u29C5','bsolhsub':'\\u27C8','bull':'\\u2022','bullet':'\\u2022','bump':'\\u224E','bumpe':'\\u224F','bumpE':'\\u2AAE','bumpeq':'\\u224F','Bumpeq':'\\u224E','cacute':'\\u0107','Cacute':'\\u0106','cap':'\\u2229','Cap':'\\u22D2','capand':'\\u2A44','capbrcup':'\\u2A49','capcap':'\\u2A4B','capcup':'\\u2A47','capdot':'\\u2A40','CapitalDifferentialD':'\\u2145','caps':'\\u2229\\uFE00','caret':'\\u2041','caron':'\\u02C7','Cayleys':'\\u212D','ccaps':'\\u2A4D','ccaron':'\\u010D','Ccaron':'\\u010C','ccedil':'\\xE7','Ccedil':'\\xC7','ccirc':'\\u0109','Ccirc':'\\u0108','Cconint':'\\u2230','ccups':'\\u2A4C','ccupssm':'\\u2A50','cdot':'\\u010B','Cdot':'\\u010A','cedil':'\\xB8','Cedilla':'\\xB8','cemptyv':'\\u29B2','cent':'\\xA2','centerdot':'\\xB7','CenterDot':'\\xB7','cfr':'\\uD835\\uDD20','Cfr':'\\u212D','chcy':'\\u0447','CHcy':'\\u0427','check':'\\u2713','checkmark':'\\u2713','chi':'\\u03C7','Chi':'\\u03A7','cir':'\\u25CB','circ':'\\u02C6','circeq':'\\u2257','circlearrowleft':'\\u21BA','circlearrowright':'\\u21BB','circledast':'\\u229B','circledcirc':'\\u229A','circleddash':'\\u229D','CircleDot':'\\u2299','circledR':'\\xAE','circledS':'\\u24C8','CircleMinus':'\\u2296','CirclePlus':'\\u2295','CircleTimes':'\\u2297','cire':'\\u2257','cirE':'\\u29C3','cirfnint':'\\u2A10','cirmid':'\\u2AEF','cirscir':'\\u29C2','ClockwiseContourIntegral':'\\u2232','CloseCurlyDoubleQuote':'\\u201D','CloseCurlyQuote':'\\u2019','clubs':'\\u2663','clubsuit':'\\u2663','colon':':','Colon':'\\u2237','colone':'\\u2254','Colone':'\\u2A74','coloneq':'\\u2254','comma':',','commat':'@','comp':'\\u2201','compfn':'\\u2218','complement':'\\u2201','complexes':'\\u2102','cong':'\\u2245','congdot':'\\u2A6D','Congruent':'\\u2261','conint':'\\u222E','Conint':'\\u222F','ContourIntegral':'\\u222E','copf':'\\uD835\\uDD54','Copf':'\\u2102','coprod':'\\u2210','Coproduct':'\\u2210','copy':'\\xA9','COPY':'\\xA9','copysr':'\\u2117','CounterClockwiseContourIntegral':'\\u2233','crarr':'\\u21B5','cross':'\\u2717','Cross':'\\u2A2F','cscr':'\\uD835\\uDCB8','Cscr':'\\uD835\\uDC9E','csub':'\\u2ACF','csube':'\\u2AD1','csup':'\\u2AD0','csupe':'\\u2AD2','ctdot':'\\u22EF','cudarrl':'\\u2938','cudarrr':'\\u2935','cuepr':'\\u22DE','cuesc':'\\u22DF','cularr':'\\u21B6','cularrp':'\\u293D','cup':'\\u222A','Cup':'\\u22D3','cupbrcap':'\\u2A48','cupcap':'\\u2A46','CupCap':'\\u224D','cupcup':'\\u2A4A','cupdot':'\\u228D','cupor':'\\u2A45','cups':'\\u222A\\uFE00','curarr':'\\u21B7','curarrm':'\\u293C','curlyeqprec':'\\u22DE','curlyeqsucc':'\\u22DF','curlyvee':'\\u22CE','curlywedge':'\\u22CF','curren':'\\xA4','curvearrowleft':'\\u21B6','curvearrowright':'\\u21B7','cuvee':'\\u22CE','cuwed':'\\u22CF','cwconint':'\\u2232','cwint':'\\u2231','cylcty':'\\u232D','dagger':'\\u2020','Dagger':'\\u2021','daleth':'\\u2138','darr':'\\u2193','dArr':'\\u21D3','Darr':'\\u21A1','dash':'\\u2010','dashv':'\\u22A3','Dashv':'\\u2AE4','dbkarow':'\\u290F','dblac':'\\u02DD','dcaron':'\\u010F','Dcaron':'\\u010E','dcy':'\\u0434','Dcy':'\\u0414','dd':'\\u2146','DD':'\\u2145','ddagger':'\\u2021','ddarr':'\\u21CA','DDotrahd':'\\u2911','ddotseq':'\\u2A77','deg':'\\xB0','Del':'\\u2207','delta':'\\u03B4','Delta':'\\u0394','demptyv':'\\u29B1','dfisht':'\\u297F','dfr':'\\uD835\\uDD21','Dfr':'\\uD835\\uDD07','dHar':'\\u2965','dharl':'\\u21C3','dharr':'\\u21C2','DiacriticalAcute':'\\xB4','DiacriticalDot':'\\u02D9','DiacriticalDoubleAcute':'\\u02DD','DiacriticalGrave':'`','DiacriticalTilde':'\\u02DC','diam':'\\u22C4','diamond':'\\u22C4','Diamond':'\\u22C4','diamondsuit':'\\u2666','diams':'\\u2666','die':'\\xA8','DifferentialD':'\\u2146','digamma':'\\u03DD','disin':'\\u22F2','div':'\\xF7','divide':'\\xF7','divideontimes':'\\u22C7','divonx':'\\u22C7','djcy':'\\u0452','DJcy':'\\u0402','dlcorn':'\\u231E','dlcrop':'\\u230D','dollar':'$','dopf':'\\uD835\\uDD55','Dopf':'\\uD835\\uDD3B','dot':'\\u02D9','Dot':'\\xA8','DotDot':'\\u20DC','doteq':'\\u2250','doteqdot':'\\u2251','DotEqual':'\\u2250','dotminus':'\\u2238','dotplus':'\\u2214','dotsquare':'\\u22A1','doublebarwedge':'\\u2306','DoubleContourIntegral':'\\u222F','DoubleDot':'\\xA8','DoubleDownArrow':'\\u21D3','DoubleLeftArrow':'\\u21D0','DoubleLeftRightArrow':'\\u21D4','DoubleLeftTee':'\\u2AE4','DoubleLongLeftArrow':'\\u27F8','DoubleLongLeftRightArrow':'\\u27FA','DoubleLongRightArrow':'\\u27F9','DoubleRightArrow':'\\u21D2','DoubleRightTee':'\\u22A8','DoubleUpArrow':'\\u21D1','DoubleUpDownArrow':'\\u21D5','DoubleVerticalBar':'\\u2225','downarrow':'\\u2193','Downarrow':'\\u21D3','DownArrow':'\\u2193','DownArrowBar':'\\u2913','DownArrowUpArrow':'\\u21F5','DownBreve':'\\u0311','downdownarrows':'\\u21CA','downharpoonleft':'\\u21C3','downharpoonright':'\\u21C2','DownLeftRightVector':'\\u2950','DownLeftTeeVector':'\\u295E','DownLeftVector':'\\u21BD','DownLeftVectorBar':'\\u2956','DownRightTeeVector':'\\u295F','DownRightVector':'\\u21C1','DownRightVectorBar':'\\u2957','DownTee':'\\u22A4','DownTeeArrow':'\\u21A7','drbkarow':'\\u2910','drcorn':'\\u231F','drcrop':'\\u230C','dscr':'\\uD835\\uDCB9','Dscr':'\\uD835\\uDC9F','dscy':'\\u0455','DScy':'\\u0405','dsol':'\\u29F6','dstrok':'\\u0111','Dstrok':'\\u0110','dtdot':'\\u22F1','dtri':'\\u25BF','dtrif':'\\u25BE','duarr':'\\u21F5','duhar':'\\u296F','dwangle':'\\u29A6','dzcy':'\\u045F','DZcy':'\\u040F','dzigrarr':'\\u27FF','eacute':'\\xE9','Eacute':'\\xC9','easter':'\\u2A6E','ecaron':'\\u011B','Ecaron':'\\u011A','ecir':'\\u2256','ecirc':'\\xEA','Ecirc':'\\xCA','ecolon':'\\u2255','ecy':'\\u044D','Ecy':'\\u042D','eDDot':'\\u2A77','edot':'\\u0117','eDot':'\\u2251','Edot':'\\u0116','ee':'\\u2147','efDot':'\\u2252','efr':'\\uD835\\uDD22','Efr':'\\uD835\\uDD08','eg':'\\u2A9A','egrave':'\\xE8','Egrave':'\\xC8','egs':'\\u2A96','egsdot':'\\u2A98','el':'\\u2A99','Element':'\\u2208','elinters':'\\u23E7','ell':'\\u2113','els':'\\u2A95','elsdot':'\\u2A97','emacr':'\\u0113','Emacr':'\\u0112','empty':'\\u2205','emptyset':'\\u2205','EmptySmallSquare':'\\u25FB','emptyv':'\\u2205','EmptyVerySmallSquare':'\\u25AB','emsp':'\\u2003','emsp13':'\\u2004','emsp14':'\\u2005','eng':'\\u014B','ENG':'\\u014A','ensp':'\\u2002','eogon':'\\u0119','Eogon':'\\u0118','eopf':'\\uD835\\uDD56','Eopf':'\\uD835\\uDD3C','epar':'\\u22D5','eparsl':'\\u29E3','eplus':'\\u2A71','epsi':'\\u03B5','epsilon':'\\u03B5','Epsilon':'\\u0395','epsiv':'\\u03F5','eqcirc':'\\u2256','eqcolon':'\\u2255','eqsim':'\\u2242','eqslantgtr':'\\u2A96','eqslantless':'\\u2A95','Equal':'\\u2A75','equals':'=','EqualTilde':'\\u2242','equest':'\\u225F','Equilibrium':'\\u21CC','equiv':'\\u2261','equivDD':'\\u2A78','eqvparsl':'\\u29E5','erarr':'\\u2971','erDot':'\\u2253','escr':'\\u212F','Escr':'\\u2130','esdot':'\\u2250','esim':'\\u2242','Esim':'\\u2A73','eta':'\\u03B7','Eta':'\\u0397','eth':'\\xF0','ETH':'\\xD0','euml':'\\xEB','Euml':'\\xCB','euro':'\\u20AC','excl':'!','exist':'\\u2203','Exists':'\\u2203','expectation':'\\u2130','exponentiale':'\\u2147','ExponentialE':'\\u2147','fallingdotseq':'\\u2252','fcy':'\\u0444','Fcy':'\\u0424','female':'\\u2640','ffilig':'\\uFB03','fflig':'\\uFB00','ffllig':'\\uFB04','ffr':'\\uD835\\uDD23','Ffr':'\\uD835\\uDD09','filig':'\\uFB01','FilledSmallSquare':'\\u25FC','FilledVerySmallSquare':'\\u25AA','fjlig':'fj','flat':'\\u266D','fllig':'\\uFB02','fltns':'\\u25B1','fnof':'\\u0192','fopf':'\\uD835\\uDD57','Fopf':'\\uD835\\uDD3D','forall':'\\u2200','ForAll':'\\u2200','fork':'\\u22D4','forkv':'\\u2AD9','Fouriertrf':'\\u2131','fpartint':'\\u2A0D','frac12':'\\xBD','frac13':'\\u2153','frac14':'\\xBC','frac15':'\\u2155','frac16':'\\u2159','frac18':'\\u215B','frac23':'\\u2154','frac25':'\\u2156','frac34':'\\xBE','frac35':'\\u2157','frac38':'\\u215C','frac45':'\\u2158','frac56':'\\u215A','frac58':'\\u215D','frac78':'\\u215E','frasl':'\\u2044','frown':'\\u2322','fscr':'\\uD835\\uDCBB','Fscr':'\\u2131','gacute':'\\u01F5','gamma':'\\u03B3','Gamma':'\\u0393','gammad':'\\u03DD','Gammad':'\\u03DC','gap':'\\u2A86','gbreve':'\\u011F','Gbreve':'\\u011E','Gcedil':'\\u0122','gcirc':'\\u011D','Gcirc':'\\u011C','gcy':'\\u0433','Gcy':'\\u0413','gdot':'\\u0121','Gdot':'\\u0120','ge':'\\u2265','gE':'\\u2267','gel':'\\u22DB','gEl':'\\u2A8C','geq':'\\u2265','geqq':'\\u2267','geqslant':'\\u2A7E','ges':'\\u2A7E','gescc':'\\u2AA9','gesdot':'\\u2A80','gesdoto':'\\u2A82','gesdotol':'\\u2A84','gesl':'\\u22DB\\uFE00','gesles':'\\u2A94','gfr':'\\uD835\\uDD24','Gfr':'\\uD835\\uDD0A','gg':'\\u226B','Gg':'\\u22D9','ggg':'\\u22D9','gimel':'\\u2137','gjcy':'\\u0453','GJcy':'\\u0403','gl':'\\u2277','gla':'\\u2AA5','glE':'\\u2A92','glj':'\\u2AA4','gnap':'\\u2A8A','gnapprox':'\\u2A8A','gne':'\\u2A88','gnE':'\\u2269','gneq':'\\u2A88','gneqq':'\\u2269','gnsim':'\\u22E7','gopf':'\\uD835\\uDD58','Gopf':'\\uD835\\uDD3E','grave':'`','GreaterEqual':'\\u2265','GreaterEqualLess':'\\u22DB','GreaterFullEqual':'\\u2267','GreaterGreater':'\\u2AA2','GreaterLess':'\\u2277','GreaterSlantEqual':'\\u2A7E','GreaterTilde':'\\u2273','gscr':'\\u210A','Gscr':'\\uD835\\uDCA2','gsim':'\\u2273','gsime':'\\u2A8E','gsiml':'\\u2A90','gt':'>','Gt':'\\u226B','GT':'>','gtcc':'\\u2AA7','gtcir':'\\u2A7A','gtdot':'\\u22D7','gtlPar':'\\u2995','gtquest':'\\u2A7C','gtrapprox':'\\u2A86','gtrarr':'\\u2978','gtrdot':'\\u22D7','gtreqless':'\\u22DB','gtreqqless':'\\u2A8C','gtrless':'\\u2277','gtrsim':'\\u2273','gvertneqq':'\\u2269\\uFE00','gvnE':'\\u2269\\uFE00','Hacek':'\\u02C7','hairsp':'\\u200A','half':'\\xBD','hamilt':'\\u210B','hardcy':'\\u044A','HARDcy':'\\u042A','harr':'\\u2194','hArr':'\\u21D4','harrcir':'\\u2948','harrw':'\\u21AD','Hat':'^','hbar':'\\u210F','hcirc':'\\u0125','Hcirc':'\\u0124','hearts':'\\u2665','heartsuit':'\\u2665','hellip':'\\u2026','hercon':'\\u22B9','hfr':'\\uD835\\uDD25','Hfr':'\\u210C','HilbertSpace':'\\u210B','hksearow':'\\u2925','hkswarow':'\\u2926','hoarr':'\\u21FF','homtht':'\\u223B','hookleftarrow':'\\u21A9','hookrightarrow':'\\u21AA','hopf':'\\uD835\\uDD59','Hopf':'\\u210D','horbar':'\\u2015','HorizontalLine':'\\u2500','hscr':'\\uD835\\uDCBD','Hscr':'\\u210B','hslash':'\\u210F','hstrok':'\\u0127','Hstrok':'\\u0126','HumpDownHump':'\\u224E','HumpEqual':'\\u224F','hybull':'\\u2043','hyphen':'\\u2010','iacute':'\\xED','Iacute':'\\xCD','ic':'\\u2063','icirc':'\\xEE','Icirc':'\\xCE','icy':'\\u0438','Icy':'\\u0418','Idot':'\\u0130','iecy':'\\u0435','IEcy':'\\u0415','iexcl':'\\xA1','iff':'\\u21D4','ifr':'\\uD835\\uDD26','Ifr':'\\u2111','igrave':'\\xEC','Igrave':'\\xCC','ii':'\\u2148','iiiint':'\\u2A0C','iiint':'\\u222D','iinfin':'\\u29DC','iiota':'\\u2129','ijlig':'\\u0133','IJlig':'\\u0132','Im':'\\u2111','imacr':'\\u012B','Imacr':'\\u012A','image':'\\u2111','ImaginaryI':'\\u2148','imagline':'\\u2110','imagpart':'\\u2111','imath':'\\u0131','imof':'\\u22B7','imped':'\\u01B5','Implies':'\\u21D2','in':'\\u2208','incare':'\\u2105','infin':'\\u221E','infintie':'\\u29DD','inodot':'\\u0131','int':'\\u222B','Int':'\\u222C','intcal':'\\u22BA','integers':'\\u2124','Integral':'\\u222B','intercal':'\\u22BA','Intersection':'\\u22C2','intlarhk':'\\u2A17','intprod':'\\u2A3C','InvisibleComma':'\\u2063','InvisibleTimes':'\\u2062','iocy':'\\u0451','IOcy':'\\u0401','iogon':'\\u012F','Iogon':'\\u012E','iopf':'\\uD835\\uDD5A','Iopf':'\\uD835\\uDD40','iota':'\\u03B9','Iota':'\\u0399','iprod':'\\u2A3C','iquest':'\\xBF','iscr':'\\uD835\\uDCBE','Iscr':'\\u2110','isin':'\\u2208','isindot':'\\u22F5','isinE':'\\u22F9','isins':'\\u22F4','isinsv':'\\u22F3','isinv':'\\u2208','it':'\\u2062','itilde':'\\u0129','Itilde':'\\u0128','iukcy':'\\u0456','Iukcy':'\\u0406','iuml':'\\xEF','Iuml':'\\xCF','jcirc':'\\u0135','Jcirc':'\\u0134','jcy':'\\u0439','Jcy':'\\u0419','jfr':'\\uD835\\uDD27','Jfr':'\\uD835\\uDD0D','jmath':'\\u0237','jopf':'\\uD835\\uDD5B','Jopf':'\\uD835\\uDD41','jscr':'\\uD835\\uDCBF','Jscr':'\\uD835\\uDCA5','jsercy':'\\u0458','Jsercy':'\\u0408','jukcy':'\\u0454','Jukcy':'\\u0404','kappa':'\\u03BA','Kappa':'\\u039A','kappav':'\\u03F0','kcedil':'\\u0137','Kcedil':'\\u0136','kcy':'\\u043A','Kcy':'\\u041A','kfr':'\\uD835\\uDD28','Kfr':'\\uD835\\uDD0E','kgreen':'\\u0138','khcy':'\\u0445','KHcy':'\\u0425','kjcy':'\\u045C','KJcy':'\\u040C','kopf':'\\uD835\\uDD5C','Kopf':'\\uD835\\uDD42','kscr':'\\uD835\\uDCC0','Kscr':'\\uD835\\uDCA6','lAarr':'\\u21DA','lacute':'\\u013A','Lacute':'\\u0139','laemptyv':'\\u29B4','lagran':'\\u2112','lambda':'\\u03BB','Lambda':'\\u039B','lang':'\\u27E8','Lang':'\\u27EA','langd':'\\u2991','langle':'\\u27E8','lap':'\\u2A85','Laplacetrf':'\\u2112','laquo':'\\xAB','larr':'\\u2190','lArr':'\\u21D0','Larr':'\\u219E','larrb':'\\u21E4','larrbfs':'\\u291F','larrfs':'\\u291D','larrhk':'\\u21A9','larrlp':'\\u21AB','larrpl':'\\u2939','larrsim':'\\u2973','larrtl':'\\u21A2','lat':'\\u2AAB','latail':'\\u2919','lAtail':'\\u291B','late':'\\u2AAD','lates':'\\u2AAD\\uFE00','lbarr':'\\u290C','lBarr':'\\u290E','lbbrk':'\\u2772','lbrace':'{','lbrack':'[','lbrke':'\\u298B','lbrksld':'\\u298F','lbrkslu':'\\u298D','lcaron':'\\u013E','Lcaron':'\\u013D','lcedil':'\\u013C','Lcedil':'\\u013B','lceil':'\\u2308','lcub':'{','lcy':'\\u043B','Lcy':'\\u041B','ldca':'\\u2936','ldquo':'\\u201C','ldquor':'\\u201E','ldrdhar':'\\u2967','ldrushar':'\\u294B','ldsh':'\\u21B2','le':'\\u2264','lE':'\\u2266','LeftAngleBracket':'\\u27E8','leftarrow':'\\u2190','Leftarrow':'\\u21D0','LeftArrow':'\\u2190','LeftArrowBar':'\\u21E4','LeftArrowRightArrow':'\\u21C6','leftarrowtail':'\\u21A2','LeftCeiling':'\\u2308','LeftDoubleBracket':'\\u27E6','LeftDownTeeVector':'\\u2961','LeftDownVector':'\\u21C3','LeftDownVectorBar':'\\u2959','LeftFloor':'\\u230A','leftharpoondown':'\\u21BD','leftharpoonup':'\\u21BC','leftleftarrows':'\\u21C7','leftrightarrow':'\\u2194','Leftrightarrow':'\\u21D4','LeftRightArrow':'\\u2194','leftrightarrows':'\\u21C6','leftrightharpoons':'\\u21CB','leftrightsquigarrow':'\\u21AD','LeftRightVector':'\\u294E','LeftTee':'\\u22A3','LeftTeeArrow':'\\u21A4','LeftTeeVector':'\\u295A','leftthreetimes':'\\u22CB','LeftTriangle':'\\u22B2','LeftTriangleBar':'\\u29CF','LeftTriangleEqual':'\\u22B4','LeftUpDownVector':'\\u2951','LeftUpTeeVector':'\\u2960','LeftUpVector':'\\u21BF','LeftUpVectorBar':'\\u2958','LeftVector':'\\u21BC','LeftVectorBar':'\\u2952','leg':'\\u22DA','lEg':'\\u2A8B','leq':'\\u2264','leqq':'\\u2266','leqslant':'\\u2A7D','les':'\\u2A7D','lescc':'\\u2AA8','lesdot':'\\u2A7F','lesdoto':'\\u2A81','lesdotor':'\\u2A83','lesg':'\\u22DA\\uFE00','lesges':'\\u2A93','lessapprox':'\\u2A85','lessdot':'\\u22D6','lesseqgtr':'\\u22DA','lesseqqgtr':'\\u2A8B','LessEqualGreater':'\\u22DA','LessFullEqual':'\\u2266','LessGreater':'\\u2276','lessgtr':'\\u2276','LessLess':'\\u2AA1','lesssim':'\\u2272','LessSlantEqual':'\\u2A7D','LessTilde':'\\u2272','lfisht':'\\u297C','lfloor':'\\u230A','lfr':'\\uD835\\uDD29','Lfr':'\\uD835\\uDD0F','lg':'\\u2276','lgE':'\\u2A91','lHar':'\\u2962','lhard':'\\u21BD','lharu':'\\u21BC','lharul':'\\u296A','lhblk':'\\u2584','ljcy':'\\u0459','LJcy':'\\u0409','ll':'\\u226A','Ll':'\\u22D8','llarr':'\\u21C7','llcorner':'\\u231E','Lleftarrow':'\\u21DA','llhard':'\\u296B','lltri':'\\u25FA','lmidot':'\\u0140','Lmidot':'\\u013F','lmoust':'\\u23B0','lmoustache':'\\u23B0','lnap':'\\u2A89','lnapprox':'\\u2A89','lne':'\\u2A87','lnE':'\\u2268','lneq':'\\u2A87','lneqq':'\\u2268','lnsim':'\\u22E6','loang':'\\u27EC','loarr':'\\u21FD','lobrk':'\\u27E6','longleftarrow':'\\u27F5','Longleftarrow':'\\u27F8','LongLeftArrow':'\\u27F5','longleftrightarrow':'\\u27F7','Longleftrightarrow':'\\u27FA','LongLeftRightArrow':'\\u27F7','longmapsto':'\\u27FC','longrightarrow':'\\u27F6','Longrightarrow':'\\u27F9','LongRightArrow':'\\u27F6','looparrowleft':'\\u21AB','looparrowright':'\\u21AC','lopar':'\\u2985','lopf':'\\uD835\\uDD5D','Lopf':'\\uD835\\uDD43','loplus':'\\u2A2D','lotimes':'\\u2A34','lowast':'\\u2217','lowbar':'_','LowerLeftArrow':'\\u2199','LowerRightArrow':'\\u2198','loz':'\\u25CA','lozenge':'\\u25CA','lozf':'\\u29EB','lpar':'(','lparlt':'\\u2993','lrarr':'\\u21C6','lrcorner':'\\u231F','lrhar':'\\u21CB','lrhard':'\\u296D','lrm':'\\u200E','lrtri':'\\u22BF','lsaquo':'\\u2039','lscr':'\\uD835\\uDCC1','Lscr':'\\u2112','lsh':'\\u21B0','Lsh':'\\u21B0','lsim':'\\u2272','lsime':'\\u2A8D','lsimg':'\\u2A8F','lsqb':'[','lsquo':'\\u2018','lsquor':'\\u201A','lstrok':'\\u0142','Lstrok':'\\u0141','lt':'<','Lt':'\\u226A','LT':'<','ltcc':'\\u2AA6','ltcir':'\\u2A79','ltdot':'\\u22D6','lthree':'\\u22CB','ltimes':'\\u22C9','ltlarr':'\\u2976','ltquest':'\\u2A7B','ltri':'\\u25C3','ltrie':'\\u22B4','ltrif':'\\u25C2','ltrPar':'\\u2996','lurdshar':'\\u294A','luruhar':'\\u2966','lvertneqq':'\\u2268\\uFE00','lvnE':'\\u2268\\uFE00','macr':'\\xAF','male':'\\u2642','malt':'\\u2720','maltese':'\\u2720','map':'\\u21A6','Map':'\\u2905','mapsto':'\\u21A6','mapstodown':'\\u21A7','mapstoleft':'\\u21A4','mapstoup':'\\u21A5','marker':'\\u25AE','mcomma':'\\u2A29','mcy':'\\u043C','Mcy':'\\u041C','mdash':'\\u2014','mDDot':'\\u223A','measuredangle':'\\u2221','MediumSpace':'\\u205F','Mellintrf':'\\u2133','mfr':'\\uD835\\uDD2A','Mfr':'\\uD835\\uDD10','mho':'\\u2127','micro':'\\xB5','mid':'\\u2223','midast':'*','midcir':'\\u2AF0','middot':'\\xB7','minus':'\\u2212','minusb':'\\u229F','minusd':'\\u2238','minusdu':'\\u2A2A','MinusPlus':'\\u2213','mlcp':'\\u2ADB','mldr':'\\u2026','mnplus':'\\u2213','models':'\\u22A7','mopf':'\\uD835\\uDD5E','Mopf':'\\uD835\\uDD44','mp':'\\u2213','mscr':'\\uD835\\uDCC2','Mscr':'\\u2133','mstpos':'\\u223E','mu':'\\u03BC','Mu':'\\u039C','multimap':'\\u22B8','mumap':'\\u22B8','nabla':'\\u2207','nacute':'\\u0144','Nacute':'\\u0143','nang':'\\u2220\\u20D2','nap':'\\u2249','napE':'\\u2A70\\u0338','napid':'\\u224B\\u0338','napos':'\\u0149','napprox':'\\u2249','natur':'\\u266E','natural':'\\u266E','naturals':'\\u2115','nbsp':'\\xA0','nbump':'\\u224E\\u0338','nbumpe':'\\u224F\\u0338','ncap':'\\u2A43','ncaron':'\\u0148','Ncaron':'\\u0147','ncedil':'\\u0146','Ncedil':'\\u0145','ncong':'\\u2247','ncongdot':'\\u2A6D\\u0338','ncup':'\\u2A42','ncy':'\\u043D','Ncy':'\\u041D','ndash':'\\u2013','ne':'\\u2260','nearhk':'\\u2924','nearr':'\\u2197','neArr':'\\u21D7','nearrow':'\\u2197','nedot':'\\u2250\\u0338','NegativeMediumSpace':'\\u200B','NegativeThickSpace':'\\u200B','NegativeThinSpace':'\\u200B','NegativeVeryThinSpace':'\\u200B','nequiv':'\\u2262','nesear':'\\u2928','nesim':'\\u2242\\u0338','NestedGreaterGreater':'\\u226B','NestedLessLess':'\\u226A','NewLine':'\\n','nexist':'\\u2204','nexists':'\\u2204','nfr':'\\uD835\\uDD2B','Nfr':'\\uD835\\uDD11','nge':'\\u2271','ngE':'\\u2267\\u0338','ngeq':'\\u2271','ngeqq':'\\u2267\\u0338','ngeqslant':'\\u2A7E\\u0338','nges':'\\u2A7E\\u0338','nGg':'\\u22D9\\u0338','ngsim':'\\u2275','ngt':'\\u226F','nGt':'\\u226B\\u20D2','ngtr':'\\u226F','nGtv':'\\u226B\\u0338','nharr':'\\u21AE','nhArr':'\\u21CE','nhpar':'\\u2AF2','ni':'\\u220B','nis':'\\u22FC','nisd':'\\u22FA','niv':'\\u220B','njcy':'\\u045A','NJcy':'\\u040A','nlarr':'\\u219A','nlArr':'\\u21CD','nldr':'\\u2025','nle':'\\u2270','nlE':'\\u2266\\u0338','nleftarrow':'\\u219A','nLeftarrow':'\\u21CD','nleftrightarrow':'\\u21AE','nLeftrightarrow':'\\u21CE','nleq':'\\u2270','nleqq':'\\u2266\\u0338','nleqslant':'\\u2A7D\\u0338','nles':'\\u2A7D\\u0338','nless':'\\u226E','nLl':'\\u22D8\\u0338','nlsim':'\\u2274','nlt':'\\u226E','nLt':'\\u226A\\u20D2','nltri':'\\u22EA','nltrie':'\\u22EC','nLtv':'\\u226A\\u0338','nmid':'\\u2224','NoBreak':'\\u2060','NonBreakingSpace':'\\xA0','nopf':'\\uD835\\uDD5F','Nopf':'\\u2115','not':'\\xAC','Not':'\\u2AEC','NotCongruent':'\\u2262','NotCupCap':'\\u226D','NotDoubleVerticalBar':'\\u2226','NotElement':'\\u2209','NotEqual':'\\u2260','NotEqualTilde':'\\u2242\\u0338','NotExists':'\\u2204','NotGreater':'\\u226F','NotGreaterEqual':'\\u2271','NotGreaterFullEqual':'\\u2267\\u0338','NotGreaterGreater':'\\u226B\\u0338','NotGreaterLess':'\\u2279','NotGreaterSlantEqual':'\\u2A7E\\u0338','NotGreaterTilde':'\\u2275','NotHumpDownHump':'\\u224E\\u0338','NotHumpEqual':'\\u224F\\u0338','notin':'\\u2209','notindot':'\\u22F5\\u0338','notinE':'\\u22F9\\u0338','notinva':'\\u2209','notinvb':'\\u22F7','notinvc':'\\u22F6','NotLeftTriangle':'\\u22EA','NotLeftTriangleBar':'\\u29CF\\u0338','NotLeftTriangleEqual':'\\u22EC','NotLess':'\\u226E','NotLessEqual':'\\u2270','NotLessGreater':'\\u2278','NotLessLess':'\\u226A\\u0338','NotLessSlantEqual':'\\u2A7D\\u0338','NotLessTilde':'\\u2274','NotNestedGreaterGreater':'\\u2AA2\\u0338','NotNestedLessLess':'\\u2AA1\\u0338','notni':'\\u220C','notniva':'\\u220C','notnivb':'\\u22FE','notnivc':'\\u22FD','NotPrecedes':'\\u2280','NotPrecedesEqual':'\\u2AAF\\u0338','NotPrecedesSlantEqual':'\\u22E0','NotReverseElement':'\\u220C','NotRightTriangle':'\\u22EB','NotRightTriangleBar':'\\u29D0\\u0338','NotRightTriangleEqual':'\\u22ED','NotSquareSubset':'\\u228F\\u0338','NotSquareSubsetEqual':'\\u22E2','NotSquareSuperset':'\\u2290\\u0338','NotSquareSupersetEqual':'\\u22E3','NotSubset':'\\u2282\\u20D2','NotSubsetEqual':'\\u2288','NotSucceeds':'\\u2281','NotSucceedsEqual':'\\u2AB0\\u0338','NotSucceedsSlantEqual':'\\u22E1','NotSucceedsTilde':'\\u227F\\u0338','NotSuperset':'\\u2283\\u20D2','NotSupersetEqual':'\\u2289','NotTilde':'\\u2241','NotTildeEqual':'\\u2244','NotTildeFullEqual':'\\u2247','NotTildeTilde':'\\u2249','NotVerticalBar':'\\u2224','npar':'\\u2226','nparallel':'\\u2226','nparsl':'\\u2AFD\\u20E5','npart':'\\u2202\\u0338','npolint':'\\u2A14','npr':'\\u2280','nprcue':'\\u22E0','npre':'\\u2AAF\\u0338','nprec':'\\u2280','npreceq':'\\u2AAF\\u0338','nrarr':'\\u219B','nrArr':'\\u21CF','nrarrc':'\\u2933\\u0338','nrarrw':'\\u219D\\u0338','nrightarrow':'\\u219B','nRightarrow':'\\u21CF','nrtri':'\\u22EB','nrtrie':'\\u22ED','nsc':'\\u2281','nsccue':'\\u22E1','nsce':'\\u2AB0\\u0338','nscr':'\\uD835\\uDCC3','Nscr':'\\uD835\\uDCA9','nshortmid':'\\u2224','nshortparallel':'\\u2226','nsim':'\\u2241','nsime':'\\u2244','nsimeq':'\\u2244','nsmid':'\\u2224','nspar':'\\u2226','nsqsube':'\\u22E2','nsqsupe':'\\u22E3','nsub':'\\u2284','nsube':'\\u2288','nsubE':'\\u2AC5\\u0338','nsubset':'\\u2282\\u20D2','nsubseteq':'\\u2288','nsubseteqq':'\\u2AC5\\u0338','nsucc':'\\u2281','nsucceq':'\\u2AB0\\u0338','nsup':'\\u2285','nsupe':'\\u2289','nsupE':'\\u2AC6\\u0338','nsupset':'\\u2283\\u20D2','nsupseteq':'\\u2289','nsupseteqq':'\\u2AC6\\u0338','ntgl':'\\u2279','ntilde':'\\xF1','Ntilde':'\\xD1','ntlg':'\\u2278','ntriangleleft':'\\u22EA','ntrianglelefteq':'\\u22EC','ntriangleright':'\\u22EB','ntrianglerighteq':'\\u22ED','nu':'\\u03BD','Nu':'\\u039D','num':'#','numero':'\\u2116','numsp':'\\u2007','nvap':'\\u224D\\u20D2','nvdash':'\\u22AC','nvDash':'\\u22AD','nVdash':'\\u22AE','nVDash':'\\u22AF','nvge':'\\u2265\\u20D2','nvgt':'>\\u20D2','nvHarr':'\\u2904','nvinfin':'\\u29DE','nvlArr':'\\u2902','nvle':'\\u2264\\u20D2','nvlt':'<\\u20D2','nvltrie':'\\u22B4\\u20D2','nvrArr':'\\u2903','nvrtrie':'\\u22B5\\u20D2','nvsim':'\\u223C\\u20D2','nwarhk':'\\u2923','nwarr':'\\u2196','nwArr':'\\u21D6','nwarrow':'\\u2196','nwnear':'\\u2927','oacute':'\\xF3','Oacute':'\\xD3','oast':'\\u229B','ocir':'\\u229A','ocirc':'\\xF4','Ocirc':'\\xD4','ocy':'\\u043E','Ocy':'\\u041E','odash':'\\u229D','odblac':'\\u0151','Odblac':'\\u0150','odiv':'\\u2A38','odot':'\\u2299','odsold':'\\u29BC','oelig':'\\u0153','OElig':'\\u0152','ofcir':'\\u29BF','ofr':'\\uD835\\uDD2C','Ofr':'\\uD835\\uDD12','ogon':'\\u02DB','ograve':'\\xF2','Ograve':'\\xD2','ogt':'\\u29C1','ohbar':'\\u29B5','ohm':'\\u03A9','oint':'\\u222E','olarr':'\\u21BA','olcir':'\\u29BE','olcross':'\\u29BB','oline':'\\u203E','olt':'\\u29C0','omacr':'\\u014D','Omacr':'\\u014C','omega':'\\u03C9','Omega':'\\u03A9','omicron':'\\u03BF','Omicron':'\\u039F','omid':'\\u29B6','ominus':'\\u2296','oopf':'\\uD835\\uDD60','Oopf':'\\uD835\\uDD46','opar':'\\u29B7','OpenCurlyDoubleQuote':'\\u201C','OpenCurlyQuote':'\\u2018','operp':'\\u29B9','oplus':'\\u2295','or':'\\u2228','Or':'\\u2A54','orarr':'\\u21BB','ord':'\\u2A5D','order':'\\u2134','orderof':'\\u2134','ordf':'\\xAA','ordm':'\\xBA','origof':'\\u22B6','oror':'\\u2A56','orslope':'\\u2A57','orv':'\\u2A5B','oS':'\\u24C8','oscr':'\\u2134','Oscr':'\\uD835\\uDCAA','oslash':'\\xF8','Oslash':'\\xD8','osol':'\\u2298','otilde':'\\xF5','Otilde':'\\xD5','otimes':'\\u2297','Otimes':'\\u2A37','otimesas':'\\u2A36','ouml':'\\xF6','Ouml':'\\xD6','ovbar':'\\u233D','OverBar':'\\u203E','OverBrace':'\\u23DE','OverBracket':'\\u23B4','OverParenthesis':'\\u23DC','par':'\\u2225','para':'\\xB6','parallel':'\\u2225','parsim':'\\u2AF3','parsl':'\\u2AFD','part':'\\u2202','PartialD':'\\u2202','pcy':'\\u043F','Pcy':'\\u041F','percnt':'%','period':'.','permil':'\\u2030','perp':'\\u22A5','pertenk':'\\u2031','pfr':'\\uD835\\uDD2D','Pfr':'\\uD835\\uDD13','phi':'\\u03C6','Phi':'\\u03A6','phiv':'\\u03D5','phmmat':'\\u2133','phone':'\\u260E','pi':'\\u03C0','Pi':'\\u03A0','pitchfork':'\\u22D4','piv':'\\u03D6','planck':'\\u210F','planckh':'\\u210E','plankv':'\\u210F','plus':'+','plusacir':'\\u2A23','plusb':'\\u229E','pluscir':'\\u2A22','plusdo':'\\u2214','plusdu':'\\u2A25','pluse':'\\u2A72','PlusMinus':'\\xB1','plusmn':'\\xB1','plussim':'\\u2A26','plustwo':'\\u2A27','pm':'\\xB1','Poincareplane':'\\u210C','pointint':'\\u2A15','popf':'\\uD835\\uDD61','Popf':'\\u2119','pound':'\\xA3','pr':'\\u227A','Pr':'\\u2ABB','prap':'\\u2AB7','prcue':'\\u227C','pre':'\\u2AAF','prE':'\\u2AB3','prec':'\\u227A','precapprox':'\\u2AB7','preccurlyeq':'\\u227C','Precedes':'\\u227A','PrecedesEqual':'\\u2AAF','PrecedesSlantEqual':'\\u227C','PrecedesTilde':'\\u227E','preceq':'\\u2AAF','precnapprox':'\\u2AB9','precneqq':'\\u2AB5','precnsim':'\\u22E8','precsim':'\\u227E','prime':'\\u2032','Prime':'\\u2033','primes':'\\u2119','prnap':'\\u2AB9','prnE':'\\u2AB5','prnsim':'\\u22E8','prod':'\\u220F','Product':'\\u220F','profalar':'\\u232E','profline':'\\u2312','profsurf':'\\u2313','prop':'\\u221D','Proportion':'\\u2237','Proportional':'\\u221D','propto':'\\u221D','prsim':'\\u227E','prurel':'\\u22B0','pscr':'\\uD835\\uDCC5','Pscr':'\\uD835\\uDCAB','psi':'\\u03C8','Psi':'\\u03A8','puncsp':'\\u2008','qfr':'\\uD835\\uDD2E','Qfr':'\\uD835\\uDD14','qint':'\\u2A0C','qopf':'\\uD835\\uDD62','Qopf':'\\u211A','qprime':'\\u2057','qscr':'\\uD835\\uDCC6','Qscr':'\\uD835\\uDCAC','quaternions':'\\u210D','quatint':'\\u2A16','quest':'?','questeq':'\\u225F','quot':'\"','QUOT':'\"','rAarr':'\\u21DB','race':'\\u223D\\u0331','racute':'\\u0155','Racute':'\\u0154','radic':'\\u221A','raemptyv':'\\u29B3','rang':'\\u27E9','Rang':'\\u27EB','rangd':'\\u2992','range':'\\u29A5','rangle':'\\u27E9','raquo':'\\xBB','rarr':'\\u2192','rArr':'\\u21D2','Rarr':'\\u21A0','rarrap':'\\u2975','rarrb':'\\u21E5','rarrbfs':'\\u2920','rarrc':'\\u2933','rarrfs':'\\u291E','rarrhk':'\\u21AA','rarrlp':'\\u21AC','rarrpl':'\\u2945','rarrsim':'\\u2974','rarrtl':'\\u21A3','Rarrtl':'\\u2916','rarrw':'\\u219D','ratail':'\\u291A','rAtail':'\\u291C','ratio':'\\u2236','rationals':'\\u211A','rbarr':'\\u290D','rBarr':'\\u290F','RBarr':'\\u2910','rbbrk':'\\u2773','rbrace':'}','rbrack':']','rbrke':'\\u298C','rbrksld':'\\u298E','rbrkslu':'\\u2990','rcaron':'\\u0159','Rcaron':'\\u0158','rcedil':'\\u0157','Rcedil':'\\u0156','rceil':'\\u2309','rcub':'}','rcy':'\\u0440','Rcy':'\\u0420','rdca':'\\u2937','rdldhar':'\\u2969','rdquo':'\\u201D','rdquor':'\\u201D','rdsh':'\\u21B3','Re':'\\u211C','real':'\\u211C','realine':'\\u211B','realpart':'\\u211C','reals':'\\u211D','rect':'\\u25AD','reg':'\\xAE','REG':'\\xAE','ReverseElement':'\\u220B','ReverseEquilibrium':'\\u21CB','ReverseUpEquilibrium':'\\u296F','rfisht':'\\u297D','rfloor':'\\u230B','rfr':'\\uD835\\uDD2F','Rfr':'\\u211C','rHar':'\\u2964','rhard':'\\u21C1','rharu':'\\u21C0','rharul':'\\u296C','rho':'\\u03C1','Rho':'\\u03A1','rhov':'\\u03F1','RightAngleBracket':'\\u27E9','rightarrow':'\\u2192','Rightarrow':'\\u21D2','RightArrow':'\\u2192','RightArrowBar':'\\u21E5','RightArrowLeftArrow':'\\u21C4','rightarrowtail':'\\u21A3','RightCeiling':'\\u2309','RightDoubleBracket':'\\u27E7','RightDownTeeVector':'\\u295D','RightDownVector':'\\u21C2','RightDownVectorBar':'\\u2955','RightFloor':'\\u230B','rightharpoondown':'\\u21C1','rightharpoonup':'\\u21C0','rightleftarrows':'\\u21C4','rightleftharpoons':'\\u21CC','rightrightarrows':'\\u21C9','rightsquigarrow':'\\u219D','RightTee':'\\u22A2','RightTeeArrow':'\\u21A6','RightTeeVector':'\\u295B','rightthreetimes':'\\u22CC','RightTriangle':'\\u22B3','RightTriangleBar':'\\u29D0','RightTriangleEqual':'\\u22B5','RightUpDownVector':'\\u294F','RightUpTeeVector':'\\u295C','RightUpVector':'\\u21BE','RightUpVectorBar':'\\u2954','RightVector':'\\u21C0','RightVectorBar':'\\u2953','ring':'\\u02DA','risingdotseq':'\\u2253','rlarr':'\\u21C4','rlhar':'\\u21CC','rlm':'\\u200F','rmoust':'\\u23B1','rmoustache':'\\u23B1','rnmid':'\\u2AEE','roang':'\\u27ED','roarr':'\\u21FE','robrk':'\\u27E7','ropar':'\\u2986','ropf':'\\uD835\\uDD63','Ropf':'\\u211D','roplus':'\\u2A2E','rotimes':'\\u2A35','RoundImplies':'\\u2970','rpar':')','rpargt':'\\u2994','rppolint':'\\u2A12','rrarr':'\\u21C9','Rrightarrow':'\\u21DB','rsaquo':'\\u203A','rscr':'\\uD835\\uDCC7','Rscr':'\\u211B','rsh':'\\u21B1','Rsh':'\\u21B1','rsqb':']','rsquo':'\\u2019','rsquor':'\\u2019','rthree':'\\u22CC','rtimes':'\\u22CA','rtri':'\\u25B9','rtrie':'\\u22B5','rtrif':'\\u25B8','rtriltri':'\\u29CE','RuleDelayed':'\\u29F4','ruluhar':'\\u2968','rx':'\\u211E','sacute':'\\u015B','Sacute':'\\u015A','sbquo':'\\u201A','sc':'\\u227B','Sc':'\\u2ABC','scap':'\\u2AB8','scaron':'\\u0161','Scaron':'\\u0160','sccue':'\\u227D','sce':'\\u2AB0','scE':'\\u2AB4','scedil':'\\u015F','Scedil':'\\u015E','scirc':'\\u015D','Scirc':'\\u015C','scnap':'\\u2ABA','scnE':'\\u2AB6','scnsim':'\\u22E9','scpolint':'\\u2A13','scsim':'\\u227F','scy':'\\u0441','Scy':'\\u0421','sdot':'\\u22C5','sdotb':'\\u22A1','sdote':'\\u2A66','searhk':'\\u2925','searr':'\\u2198','seArr':'\\u21D8','searrow':'\\u2198','sect':'\\xA7','semi':';','seswar':'\\u2929','setminus':'\\u2216','setmn':'\\u2216','sext':'\\u2736','sfr':'\\uD835\\uDD30','Sfr':'\\uD835\\uDD16','sfrown':'\\u2322','sharp':'\\u266F','shchcy':'\\u0449','SHCHcy':'\\u0429','shcy':'\\u0448','SHcy':'\\u0428','ShortDownArrow':'\\u2193','ShortLeftArrow':'\\u2190','shortmid':'\\u2223','shortparallel':'\\u2225','ShortRightArrow':'\\u2192','ShortUpArrow':'\\u2191','shy':'\\xAD','sigma':'\\u03C3','Sigma':'\\u03A3','sigmaf':'\\u03C2','sigmav':'\\u03C2','sim':'\\u223C','simdot':'\\u2A6A','sime':'\\u2243','simeq':'\\u2243','simg':'\\u2A9E','simgE':'\\u2AA0','siml':'\\u2A9D','simlE':'\\u2A9F','simne':'\\u2246','simplus':'\\u2A24','simrarr':'\\u2972','slarr':'\\u2190','SmallCircle':'\\u2218','smallsetminus':'\\u2216','smashp':'\\u2A33','smeparsl':'\\u29E4','smid':'\\u2223','smile':'\\u2323','smt':'\\u2AAA','smte':'\\u2AAC','smtes':'\\u2AAC\\uFE00','softcy':'\\u044C','SOFTcy':'\\u042C','sol':'/','solb':'\\u29C4','solbar':'\\u233F','sopf':'\\uD835\\uDD64','Sopf':'\\uD835\\uDD4A','spades':'\\u2660','spadesuit':'\\u2660','spar':'\\u2225','sqcap':'\\u2293','sqcaps':'\\u2293\\uFE00','sqcup':'\\u2294','sqcups':'\\u2294\\uFE00','Sqrt':'\\u221A','sqsub':'\\u228F','sqsube':'\\u2291','sqsubset':'\\u228F','sqsubseteq':'\\u2291','sqsup':'\\u2290','sqsupe':'\\u2292','sqsupset':'\\u2290','sqsupseteq':'\\u2292','squ':'\\u25A1','square':'\\u25A1','Square':'\\u25A1','SquareIntersection':'\\u2293','SquareSubset':'\\u228F','SquareSubsetEqual':'\\u2291','SquareSuperset':'\\u2290','SquareSupersetEqual':'\\u2292','SquareUnion':'\\u2294','squarf':'\\u25AA','squf':'\\u25AA','srarr':'\\u2192','sscr':'\\uD835\\uDCC8','Sscr':'\\uD835\\uDCAE','ssetmn':'\\u2216','ssmile':'\\u2323','sstarf':'\\u22C6','star':'\\u2606','Star':'\\u22C6','starf':'\\u2605','straightepsilon':'\\u03F5','straightphi':'\\u03D5','strns':'\\xAF','sub':'\\u2282','Sub':'\\u22D0','subdot':'\\u2ABD','sube':'\\u2286','subE':'\\u2AC5','subedot':'\\u2AC3','submult':'\\u2AC1','subne':'\\u228A','subnE':'\\u2ACB','subplus':'\\u2ABF','subrarr':'\\u2979','subset':'\\u2282','Subset':'\\u22D0','subseteq':'\\u2286','subseteqq':'\\u2AC5','SubsetEqual':'\\u2286','subsetneq':'\\u228A','subsetneqq':'\\u2ACB','subsim':'\\u2AC7','subsub':'\\u2AD5','subsup':'\\u2AD3','succ':'\\u227B','succapprox':'\\u2AB8','succcurlyeq':'\\u227D','Succeeds':'\\u227B','SucceedsEqual':'\\u2AB0','SucceedsSlantEqual':'\\u227D','SucceedsTilde':'\\u227F','succeq':'\\u2AB0','succnapprox':'\\u2ABA','succneqq':'\\u2AB6','succnsim':'\\u22E9','succsim':'\\u227F','SuchThat':'\\u220B','sum':'\\u2211','Sum':'\\u2211','sung':'\\u266A','sup':'\\u2283','Sup':'\\u22D1','sup1':'\\xB9','sup2':'\\xB2','sup3':'\\xB3','supdot':'\\u2ABE','supdsub':'\\u2AD8','supe':'\\u2287','supE':'\\u2AC6','supedot':'\\u2AC4','Superset':'\\u2283','SupersetEqual':'\\u2287','suphsol':'\\u27C9','suphsub':'\\u2AD7','suplarr':'\\u297B','supmult':'\\u2AC2','supne':'\\u228B','supnE':'\\u2ACC','supplus':'\\u2AC0','supset':'\\u2283','Supset':'\\u22D1','supseteq':'\\u2287','supseteqq':'\\u2AC6','supsetneq':'\\u228B','supsetneqq':'\\u2ACC','supsim':'\\u2AC8','supsub':'\\u2AD4','supsup':'\\u2AD6','swarhk':'\\u2926','swarr':'\\u2199','swArr':'\\u21D9','swarrow':'\\u2199','swnwar':'\\u292A','szlig':'\\xDF','Tab':'\\t','target':'\\u2316','tau':'\\u03C4','Tau':'\\u03A4','tbrk':'\\u23B4','tcaron':'\\u0165','Tcaron':'\\u0164','tcedil':'\\u0163','Tcedil':'\\u0162','tcy':'\\u0442','Tcy':'\\u0422','tdot':'\\u20DB','telrec':'\\u2315','tfr':'\\uD835\\uDD31','Tfr':'\\uD835\\uDD17','there4':'\\u2234','therefore':'\\u2234','Therefore':'\\u2234','theta':'\\u03B8','Theta':'\\u0398','thetasym':'\\u03D1','thetav':'\\u03D1','thickapprox':'\\u2248','thicksim':'\\u223C','ThickSpace':'\\u205F\\u200A','thinsp':'\\u2009','ThinSpace':'\\u2009','thkap':'\\u2248','thksim':'\\u223C','thorn':'\\xFE','THORN':'\\xDE','tilde':'\\u02DC','Tilde':'\\u223C','TildeEqual':'\\u2243','TildeFullEqual':'\\u2245','TildeTilde':'\\u2248','times':'\\xD7','timesb':'\\u22A0','timesbar':'\\u2A31','timesd':'\\u2A30','tint':'\\u222D','toea':'\\u2928','top':'\\u22A4','topbot':'\\u2336','topcir':'\\u2AF1','topf':'\\uD835\\uDD65','Topf':'\\uD835\\uDD4B','topfork':'\\u2ADA','tosa':'\\u2929','tprime':'\\u2034','trade':'\\u2122','TRADE':'\\u2122','triangle':'\\u25B5','triangledown':'\\u25BF','triangleleft':'\\u25C3','trianglelefteq':'\\u22B4','triangleq':'\\u225C','triangleright':'\\u25B9','trianglerighteq':'\\u22B5','tridot':'\\u25EC','trie':'\\u225C','triminus':'\\u2A3A','TripleDot':'\\u20DB','triplus':'\\u2A39','trisb':'\\u29CD','tritime':'\\u2A3B','trpezium':'\\u23E2','tscr':'\\uD835\\uDCC9','Tscr':'\\uD835\\uDCAF','tscy':'\\u0446','TScy':'\\u0426','tshcy':'\\u045B','TSHcy':'\\u040B','tstrok':'\\u0167','Tstrok':'\\u0166','twixt':'\\u226C','twoheadleftarrow':'\\u219E','twoheadrightarrow':'\\u21A0','uacute':'\\xFA','Uacute':'\\xDA','uarr':'\\u2191','uArr':'\\u21D1','Uarr':'\\u219F','Uarrocir':'\\u2949','ubrcy':'\\u045E','Ubrcy':'\\u040E','ubreve':'\\u016D','Ubreve':'\\u016C','ucirc':'\\xFB','Ucirc':'\\xDB','ucy':'\\u0443','Ucy':'\\u0423','udarr':'\\u21C5','udblac':'\\u0171','Udblac':'\\u0170','udhar':'\\u296E','ufisht':'\\u297E','ufr':'\\uD835\\uDD32','Ufr':'\\uD835\\uDD18','ugrave':'\\xF9','Ugrave':'\\xD9','uHar':'\\u2963','uharl':'\\u21BF','uharr':'\\u21BE','uhblk':'\\u2580','ulcorn':'\\u231C','ulcorner':'\\u231C','ulcrop':'\\u230F','ultri':'\\u25F8','umacr':'\\u016B','Umacr':'\\u016A','uml':'\\xA8','UnderBar':'_','UnderBrace':'\\u23DF','UnderBracket':'\\u23B5','UnderParenthesis':'\\u23DD','Union':'\\u22C3','UnionPlus':'\\u228E','uogon':'\\u0173','Uogon':'\\u0172','uopf':'\\uD835\\uDD66','Uopf':'\\uD835\\uDD4C','uparrow':'\\u2191','Uparrow':'\\u21D1','UpArrow':'\\u2191','UpArrowBar':'\\u2912','UpArrowDownArrow':'\\u21C5','updownarrow':'\\u2195','Updownarrow':'\\u21D5','UpDownArrow':'\\u2195','UpEquilibrium':'\\u296E','upharpoonleft':'\\u21BF','upharpoonright':'\\u21BE','uplus':'\\u228E','UpperLeftArrow':'\\u2196','UpperRightArrow':'\\u2197','upsi':'\\u03C5','Upsi':'\\u03D2','upsih':'\\u03D2','upsilon':'\\u03C5','Upsilon':'\\u03A5','UpTee':'\\u22A5','UpTeeArrow':'\\u21A5','upuparrows':'\\u21C8','urcorn':'\\u231D','urcorner':'\\u231D','urcrop':'\\u230E','uring':'\\u016F','Uring':'\\u016E','urtri':'\\u25F9','uscr':'\\uD835\\uDCCA','Uscr':'\\uD835\\uDCB0','utdot':'\\u22F0','utilde':'\\u0169','Utilde':'\\u0168','utri':'\\u25B5','utrif':'\\u25B4','uuarr':'\\u21C8','uuml':'\\xFC','Uuml':'\\xDC','uwangle':'\\u29A7','vangrt':'\\u299C','varepsilon':'\\u03F5','varkappa':'\\u03F0','varnothing':'\\u2205','varphi':'\\u03D5','varpi':'\\u03D6','varpropto':'\\u221D','varr':'\\u2195','vArr':'\\u21D5','varrho':'\\u03F1','varsigma':'\\u03C2','varsubsetneq':'\\u228A\\uFE00','varsubsetneqq':'\\u2ACB\\uFE00','varsupsetneq':'\\u228B\\uFE00','varsupsetneqq':'\\u2ACC\\uFE00','vartheta':'\\u03D1','vartriangleleft':'\\u22B2','vartriangleright':'\\u22B3','vBar':'\\u2AE8','Vbar':'\\u2AEB','vBarv':'\\u2AE9','vcy':'\\u0432','Vcy':'\\u0412','vdash':'\\u22A2','vDash':'\\u22A8','Vdash':'\\u22A9','VDash':'\\u22AB','Vdashl':'\\u2AE6','vee':'\\u2228','Vee':'\\u22C1','veebar':'\\u22BB','veeeq':'\\u225A','vellip':'\\u22EE','verbar':'|','Verbar':'\\u2016','vert':'|','Vert':'\\u2016','VerticalBar':'\\u2223','VerticalLine':'|','VerticalSeparator':'\\u2758','VerticalTilde':'\\u2240','VeryThinSpace':'\\u200A','vfr':'\\uD835\\uDD33','Vfr':'\\uD835\\uDD19','vltri':'\\u22B2','vnsub':'\\u2282\\u20D2','vnsup':'\\u2283\\u20D2','vopf':'\\uD835\\uDD67','Vopf':'\\uD835\\uDD4D','vprop':'\\u221D','vrtri':'\\u22B3','vscr':'\\uD835\\uDCCB','Vscr':'\\uD835\\uDCB1','vsubne':'\\u228A\\uFE00','vsubnE':'\\u2ACB\\uFE00','vsupne':'\\u228B\\uFE00','vsupnE':'\\u2ACC\\uFE00','Vvdash':'\\u22AA','vzigzag':'\\u299A','wcirc':'\\u0175','Wcirc':'\\u0174','wedbar':'\\u2A5F','wedge':'\\u2227','Wedge':'\\u22C0','wedgeq':'\\u2259','weierp':'\\u2118','wfr':'\\uD835\\uDD34','Wfr':'\\uD835\\uDD1A','wopf':'\\uD835\\uDD68','Wopf':'\\uD835\\uDD4E','wp':'\\u2118','wr':'\\u2240','wreath':'\\u2240','wscr':'\\uD835\\uDCCC','Wscr':'\\uD835\\uDCB2','xcap':'\\u22C2','xcirc':'\\u25EF','xcup':'\\u22C3','xdtri':'\\u25BD','xfr':'\\uD835\\uDD35','Xfr':'\\uD835\\uDD1B','xharr':'\\u27F7','xhArr':'\\u27FA','xi':'\\u03BE','Xi':'\\u039E','xlarr':'\\u27F5','xlArr':'\\u27F8','xmap':'\\u27FC','xnis':'\\u22FB','xodot':'\\u2A00','xopf':'\\uD835\\uDD69','Xopf':'\\uD835\\uDD4F','xoplus':'\\u2A01','xotime':'\\u2A02','xrarr':'\\u27F6','xrArr':'\\u27F9','xscr':'\\uD835\\uDCCD','Xscr':'\\uD835\\uDCB3','xsqcup':'\\u2A06','xuplus':'\\u2A04','xutri':'\\u25B3','xvee':'\\u22C1','xwedge':'\\u22C0','yacute':'\\xFD','Yacute':'\\xDD','yacy':'\\u044F','YAcy':'\\u042F','ycirc':'\\u0177','Ycirc':'\\u0176','ycy':'\\u044B','Ycy':'\\u042B','yen':'\\xA5','yfr':'\\uD835\\uDD36','Yfr':'\\uD835\\uDD1C','yicy':'\\u0457','YIcy':'\\u0407','yopf':'\\uD835\\uDD6A','Yopf':'\\uD835\\uDD50','yscr':'\\uD835\\uDCCE','Yscr':'\\uD835\\uDCB4','yucy':'\\u044E','YUcy':'\\u042E','yuml':'\\xFF','Yuml':'\\u0178','zacute':'\\u017A','Zacute':'\\u0179','zcaron':'\\u017E','Zcaron':'\\u017D','zcy':'\\u0437','Zcy':'\\u0417','zdot':'\\u017C','Zdot':'\\u017B','zeetrf':'\\u2128','ZeroWidthSpace':'\\u200B','zeta':'\\u03B6','Zeta':'\\u0396','zfr':'\\uD835\\uDD37','Zfr':'\\u2128','zhcy':'\\u0436','ZHcy':'\\u0416','zigrarr':'\\u21DD','zopf':'\\uD835\\uDD6B','Zopf':'\\u2124','zscr':'\\uD835\\uDCCF','Zscr':'\\uD835\\uDCB5','zwj':'\\u200D','zwnj':'\\u200C'};\n\tvar decodeMapLegacy = {'aacute':'\\xE1','Aacute':'\\xC1','acirc':'\\xE2','Acirc':'\\xC2','acute':'\\xB4','aelig':'\\xE6','AElig':'\\xC6','agrave':'\\xE0','Agrave':'\\xC0','amp':'&','AMP':'&','aring':'\\xE5','Aring':'\\xC5','atilde':'\\xE3','Atilde':'\\xC3','auml':'\\xE4','Auml':'\\xC4','brvbar':'\\xA6','ccedil':'\\xE7','Ccedil':'\\xC7','cedil':'\\xB8','cent':'\\xA2','copy':'\\xA9','COPY':'\\xA9','curren':'\\xA4','deg':'\\xB0','divide':'\\xF7','eacute':'\\xE9','Eacute':'\\xC9','ecirc':'\\xEA','Ecirc':'\\xCA','egrave':'\\xE8','Egrave':'\\xC8','eth':'\\xF0','ETH':'\\xD0','euml':'\\xEB','Euml':'\\xCB','frac12':'\\xBD','frac14':'\\xBC','frac34':'\\xBE','gt':'>','GT':'>','iacute':'\\xED','Iacute':'\\xCD','icirc':'\\xEE','Icirc':'\\xCE','iexcl':'\\xA1','igrave':'\\xEC','Igrave':'\\xCC','iquest':'\\xBF','iuml':'\\xEF','Iuml':'\\xCF','laquo':'\\xAB','lt':'<','LT':'<','macr':'\\xAF','micro':'\\xB5','middot':'\\xB7','nbsp':'\\xA0','not':'\\xAC','ntilde':'\\xF1','Ntilde':'\\xD1','oacute':'\\xF3','Oacute':'\\xD3','ocirc':'\\xF4','Ocirc':'\\xD4','ograve':'\\xF2','Ograve':'\\xD2','ordf':'\\xAA','ordm':'\\xBA','oslash':'\\xF8','Oslash':'\\xD8','otilde':'\\xF5','Otilde':'\\xD5','ouml':'\\xF6','Ouml':'\\xD6','para':'\\xB6','plusmn':'\\xB1','pound':'\\xA3','quot':'\"','QUOT':'\"','raquo':'\\xBB','reg':'\\xAE','REG':'\\xAE','sect':'\\xA7','shy':'\\xAD','sup1':'\\xB9','sup2':'\\xB2','sup3':'\\xB3','szlig':'\\xDF','thorn':'\\xFE','THORN':'\\xDE','times':'\\xD7','uacute':'\\xFA','Uacute':'\\xDA','ucirc':'\\xFB','Ucirc':'\\xDB','ugrave':'\\xF9','Ugrave':'\\xD9','uml':'\\xA8','uuml':'\\xFC','Uuml':'\\xDC','yacute':'\\xFD','Yacute':'\\xDD','yen':'\\xA5','yuml':'\\xFF'};\n\tvar decodeMapNumeric = {'0':'\\uFFFD','128':'\\u20AC','130':'\\u201A','131':'\\u0192','132':'\\u201E','133':'\\u2026','134':'\\u2020','135':'\\u2021','136':'\\u02C6','137':'\\u2030','138':'\\u0160','139':'\\u2039','140':'\\u0152','142':'\\u017D','145':'\\u2018','146':'\\u2019','147':'\\u201C','148':'\\u201D','149':'\\u2022','150':'\\u2013','151':'\\u2014','152':'\\u02DC','153':'\\u2122','154':'\\u0161','155':'\\u203A','156':'\\u0153','158':'\\u017E','159':'\\u0178'};\n\tvar invalidReferenceCodePoints = [1,2,3,4,5,6,7,8,11,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,64976,64977,64978,64979,64980,64981,64982,64983,64984,64985,64986,64987,64988,64989,64990,64991,64992,64993,64994,64995,64996,64997,64998,64999,65000,65001,65002,65003,65004,65005,65006,65007,65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111];\n\n\t/*--------------------------------------------------------------------------*/\n\n\tvar stringFromCharCode = String.fromCharCode;\n\n\tvar object = {};\n\tvar hasOwnProperty = object.hasOwnProperty;\n\tvar has = function(object, propertyName) {\n\t\treturn hasOwnProperty.call(object, propertyName);\n\t};\n\n\tvar contains = function(array, value) {\n\t\tvar index = -1;\n\t\tvar length = array.length;\n\t\twhile (++index < length) {\n\t\t\tif (array[index] == value) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t};\n\n\tvar merge = function(options, defaults) {\n\t\tif (!options) {\n\t\t\treturn defaults;\n\t\t}\n\t\tvar result = {};\n\t\tvar key;\n\t\tfor (key in defaults) {\n\t\t\t// A `hasOwnProperty` check is not needed here, since only recognized\n\t\t\t// option names are used anyway. Any others are ignored.\n\t\t\tresult[key] = has(options, key) ? options[key] : defaults[key];\n\t\t}\n\t\treturn result;\n\t};\n\n\t// Modified version of `ucs2encode`; see https://mths.be/punycode.\n\tvar codePointToSymbol = function(codePoint, strict) {\n\t\tvar output = '';\n\t\tif ((codePoint >= 0xD800 && codePoint <= 0xDFFF) || codePoint > 0x10FFFF) {\n\t\t\t// See issue #4:\n\t\t\t// “Otherwise, if the number is in the range 0xD800 to 0xDFFF or is\n\t\t\t// greater than 0x10FFFF, then this is a parse error. Return a U+FFFD\n\t\t\t// REPLACEMENT CHARACTER.”\n\t\t\tif (strict) {\n\t\t\t\tparseError('character reference outside the permissible Unicode range');\n\t\t\t}\n\t\t\treturn '\\uFFFD';\n\t\t}\n\t\tif (has(decodeMapNumeric, codePoint)) {\n\t\t\tif (strict) {\n\t\t\t\tparseError('disallowed character reference');\n\t\t\t}\n\t\t\treturn decodeMapNumeric[codePoint];\n\t\t}\n\t\tif (strict && contains(invalidReferenceCodePoints, codePoint)) {\n\t\t\tparseError('disallowed character reference');\n\t\t}\n\t\tif (codePoint > 0xFFFF) {\n\t\t\tcodePoint -= 0x10000;\n\t\t\toutput += stringFromCharCode(codePoint >>> 10 & 0x3FF | 0xD800);\n\t\t\tcodePoint = 0xDC00 | codePoint & 0x3FF;\n\t\t}\n\t\toutput += stringFromCharCode(codePoint);\n\t\treturn output;\n\t};\n\n\tvar hexEscape = function(codePoint) {\n\t\treturn '&#x' + codePoint.toString(16).toUpperCase() + ';';\n\t};\n\n\tvar decEscape = function(codePoint) {\n\t\treturn '&#' + codePoint + ';';\n\t};\n\n\tvar parseError = function(message) {\n\t\tthrow Error('Parse error: ' + message);\n\t};\n\n\t/*--------------------------------------------------------------------------*/\n\n\tvar encode = function(string, options) {\n\t\toptions = merge(options, encode.options);\n\t\tvar strict = options.strict;\n\t\tif (strict && regexInvalidRawCodePoint.test(string)) {\n\t\t\tparseError('forbidden code point');\n\t\t}\n\t\tvar encodeEverything = options.encodeEverything;\n\t\tvar useNamedReferences = options.useNamedReferences;\n\t\tvar allowUnsafeSymbols = options.allowUnsafeSymbols;\n\t\tvar escapeCodePoint = options.decimal ? decEscape : hexEscape;\n\n\t\tvar escapeBmpSymbol = function(symbol) {\n\t\t\treturn escapeCodePoint(symbol.charCodeAt(0));\n\t\t};\n\n\t\tif (encodeEverything) {\n\t\t\t// Encode ASCII symbols.\n\t\t\tstring = string.replace(regexAsciiWhitelist, function(symbol) {\n\t\t\t\t// Use named references if requested & possible.\n\t\t\t\tif (useNamedReferences && has(encodeMap, symbol)) {\n\t\t\t\t\treturn '&' + encodeMap[symbol] + ';';\n\t\t\t\t}\n\t\t\t\treturn escapeBmpSymbol(symbol);\n\t\t\t});\n\t\t\t// Shorten a few escapes that represent two symbols, of which at least one\n\t\t\t// is within the ASCII range.\n\t\t\tif (useNamedReferences) {\n\t\t\t\tstring = string\n\t\t\t\t\t.replace(/>\\u20D2/g, '>⃒')\n\t\t\t\t\t.replace(/<\\u20D2/g, '<⃒')\n\t\t\t\t\t.replace(/fj/g, 'fj');\n\t\t\t}\n\t\t\t// Encode non-ASCII symbols.\n\t\t\tif (useNamedReferences) {\n\t\t\t\t// Encode non-ASCII symbols that can be replaced with a named reference.\n\t\t\t\tstring = string.replace(regexEncodeNonAscii, function(string) {\n\t\t\t\t\t// Note: there is no need to check `has(encodeMap, string)` here.\n\t\t\t\t\treturn '&' + encodeMap[string] + ';';\n\t\t\t\t});\n\t\t\t}\n\t\t\t// Note: any remaining non-ASCII symbols are handled outside of the `if`.\n\t\t} else if (useNamedReferences) {\n\t\t\t// Apply named character references.\n\t\t\t// Encode `<>\"'&` using named character references.\n\t\t\tif (!allowUnsafeSymbols) {\n\t\t\t\tstring = string.replace(regexEscape, function(string) {\n\t\t\t\t\treturn '&' + encodeMap[string] + ';'; // no need to check `has()` here\n\t\t\t\t});\n\t\t\t}\n\t\t\t// Shorten escapes that represent two symbols, of which at least one is\n\t\t\t// `<>\"'&`.\n\t\t\tstring = string\n\t\t\t\t.replace(/>\\u20D2/g, '>⃒')\n\t\t\t\t.replace(/<\\u20D2/g, '<⃒');\n\t\t\t// Encode non-ASCII symbols that can be replaced with a named reference.\n\t\t\tstring = string.replace(regexEncodeNonAscii, function(string) {\n\t\t\t\t// Note: there is no need to check `has(encodeMap, string)` here.\n\t\t\t\treturn '&' + encodeMap[string] + ';';\n\t\t\t});\n\t\t} else if (!allowUnsafeSymbols) {\n\t\t\t// Encode `<>\"'&` using hexadecimal escapes, now that they’re not handled\n\t\t\t// using named character references.\n\t\t\tstring = string.replace(regexEscape, escapeBmpSymbol);\n\t\t}\n\t\treturn string\n\t\t\t// Encode astral symbols.\n\t\t\t.replace(regexAstralSymbols, function($0) {\n\t\t\t\t// https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae\n\t\t\t\tvar high = $0.charCodeAt(0);\n\t\t\t\tvar low = $0.charCodeAt(1);\n\t\t\t\tvar codePoint = (high - 0xD800) * 0x400 + low - 0xDC00 + 0x10000;\n\t\t\t\treturn escapeCodePoint(codePoint);\n\t\t\t})\n\t\t\t// Encode any remaining BMP symbols that are not printable ASCII symbols\n\t\t\t// using a hexadecimal escape.\n\t\t\t.replace(regexBmpWhitelist, escapeBmpSymbol);\n\t};\n\t// Expose default options (so they can be overridden globally).\n\tencode.options = {\n\t\t'allowUnsafeSymbols': false,\n\t\t'encodeEverything': false,\n\t\t'strict': false,\n\t\t'useNamedReferences': false,\n\t\t'decimal' : false\n\t};\n\n\tvar decode = function(html, options) {\n\t\toptions = merge(options, decode.options);\n\t\tvar strict = options.strict;\n\t\tif (strict && regexInvalidEntity.test(html)) {\n\t\t\tparseError('malformed character reference');\n\t\t}\n\t\treturn html.replace(regexDecode, function($0, $1, $2, $3, $4, $5, $6, $7, $8) {\n\t\t\tvar codePoint;\n\t\t\tvar semicolon;\n\t\t\tvar decDigits;\n\t\t\tvar hexDigits;\n\t\t\tvar reference;\n\t\t\tvar next;\n\n\t\t\tif ($1) {\n\t\t\t\treference = $1;\n\t\t\t\t// Note: there is no need to check `has(decodeMap, reference)`.\n\t\t\t\treturn decodeMap[reference];\n\t\t\t}\n\n\t\t\tif ($2) {\n\t\t\t\t// Decode named character references without trailing `;`, e.g. `&`.\n\t\t\t\t// This is only a parse error if it gets converted to `&`, or if it is\n\t\t\t\t// followed by `=` in an attribute context.\n\t\t\t\treference = $2;\n\t\t\t\tnext = $3;\n\t\t\t\tif (next && options.isAttributeValue) {\n\t\t\t\t\tif (strict && next == '=') {\n\t\t\t\t\t\tparseError('`&` did not start a character reference');\n\t\t\t\t\t}\n\t\t\t\t\treturn $0;\n\t\t\t\t} else {\n\t\t\t\t\tif (strict) {\n\t\t\t\t\t\tparseError(\n\t\t\t\t\t\t\t'named character reference was not terminated by a semicolon'\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\t// Note: there is no need to check `has(decodeMapLegacy, reference)`.\n\t\t\t\t\treturn decodeMapLegacy[reference] + (next || '');\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($4) {\n\t\t\t\t// Decode decimal escapes, e.g. `𝌆`.\n\t\t\t\tdecDigits = $4;\n\t\t\t\tsemicolon = $5;\n\t\t\t\tif (strict && !semicolon) {\n\t\t\t\t\tparseError('character reference was not terminated by a semicolon');\n\t\t\t\t}\n\t\t\t\tcodePoint = parseInt(decDigits, 10);\n\t\t\t\treturn codePointToSymbol(codePoint, strict);\n\t\t\t}\n\n\t\t\tif ($6) {\n\t\t\t\t// Decode hexadecimal escapes, e.g. `𝌆`.\n\t\t\t\thexDigits = $6;\n\t\t\t\tsemicolon = $7;\n\t\t\t\tif (strict && !semicolon) {\n\t\t\t\t\tparseError('character reference was not terminated by a semicolon');\n\t\t\t\t}\n\t\t\t\tcodePoint = parseInt(hexDigits, 16);\n\t\t\t\treturn codePointToSymbol(codePoint, strict);\n\t\t\t}\n\n\t\t\t// If we’re still here, `if ($7)` is implied; it’s an ambiguous\n\t\t\t// ampersand for sure. https://mths.be/notes/ambiguous-ampersands\n\t\t\tif (strict) {\n\t\t\t\tparseError(\n\t\t\t\t\t'named character reference was not terminated by a semicolon'\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn $0;\n\t\t});\n\t};\n\t// Expose default options (so they can be overridden globally).\n\tdecode.options = {\n\t\t'isAttributeValue': false,\n\t\t'strict': false\n\t};\n\n\tvar escape = function(string) {\n\t\treturn string.replace(regexEscape, function($0) {\n\t\t\t// Note: there is no need to check `has(escapeMap, $0)` here.\n\t\t\treturn escapeMap[$0];\n\t\t});\n\t};\n\n\t/*--------------------------------------------------------------------------*/\n\n\tvar he = {\n\t\t'version': '1.2.0',\n\t\t'encode': encode,\n\t\t'decode': decode,\n\t\t'escape': escape,\n\t\t'unescape': decode\n\t};\n\n\t// Some AMD build optimizers, like r.js, check for specific condition patterns\n\t// like the following:\n\tif (\n\t\ttypeof define == 'function' &&\n\t\ttypeof define.amd == 'object' &&\n\t\tdefine.amd\n\t) {\n\t\tdefine(function() {\n\t\t\treturn he;\n\t\t});\n\t}\telse if (freeExports && !freeExports.nodeType) {\n\t\tif (freeModule) { // in Node.js, io.js, or RingoJS v0.8.0+\n\t\t\tfreeModule.exports = he;\n\t\t} else { // in Narwhal or RingoJS v0.7.0-\n\t\t\tfor (var key in he) {\n\t\t\t\thas(he, key) && (freeExports[key] = he[key]);\n\t\t\t}\n\t\t}\n\t} else { // in Rhino or a web browser\n\t\troot.he = he;\n\t}\n\n}(this));\n","\"use strict\";\n\n/**\n * Various utility functions used throughout Mocha's codebase.\n * @module utils\n */\n\n/**\n * Module dependencies.\n */\nvar path = require(\"node:path\");\nvar util = require(\"node:util\");\nvar he = require(\"he\");\n\nconst MOCHA_ID_PROP_NAME = \"__mocha_id__\";\n\n/**\n * Inherit the prototype methods from one constructor into another.\n *\n * @param {function} ctor - Constructor function which needs to inherit the\n * prototype.\n * @param {function} superCtor - Constructor function to inherit prototype from.\n * @throws {TypeError} if either constructor is null, or if super constructor\n * lacks a prototype.\n */\nexports.inherits = util.inherits;\n\n/**\n * Escape special characters in the given string of html.\n *\n * @private\n * @param {string} html\n * @return {string}\n */\nexports.escape = function (html) {\n return he.encode(String(html), { useNamedReferences: false });\n};\n\n/**\n * Test if the given obj is type of string.\n *\n * @private\n * @param {Object} obj\n * @return {boolean}\n */\nexports.isString = function (obj) {\n return typeof obj === \"string\";\n};\n\n/**\n * Compute a slug from the given `str`.\n *\n * @private\n * @param {string} str\n * @return {string}\n */\nexports.slug = function (str) {\n return str\n .toLowerCase()\n .replace(/\\s+/g, \"-\")\n .replace(/[^-\\w]/g, \"\")\n .replace(/-{2,}/g, \"-\");\n};\n\n/**\n * Strip the function definition from `str`, and re-indent for pre whitespace.\n *\n * @param {string} str\n * @return {string}\n */\nexports.clean = function (str) {\n str = str\n .replace(/\\r\\n?|[\\n\\u2028\\u2029]/g, \"\\n\")\n .replace(/^\\uFEFF/, \"\")\n // (traditional)-> space/name parameters body (lambda)-> parameters body multi-statement/single keep body content\n .replace(\n /^function(?:\\s*|\\s[^(]*)\\([^)]*\\)\\s*\\{((?:.|\\n)*?)\\}$|^\\([^)]*\\)\\s*=>\\s*(?:\\{((?:.|\\n)*?)\\}|((?:.|\\n)*))$/,\n \"$1$2$3\",\n );\n\n var spaces = str.match(/^\\n?( *)/)[1].length;\n var tabs = str.match(/^\\n?(\\t*)/)[1].length;\n var re = new RegExp(\n \"^\\n?\" + (tabs ? \"\\t\" : \" \") + \"{\" + (tabs || spaces) + \"}\",\n \"gm\",\n );\n\n str = str.replace(re, \"\");\n\n return str.trim();\n};\n\n/**\n * If a value could have properties, and has none, this function is called,\n * which returns a string representation of the empty value.\n *\n * Functions w/ no properties return `'[Function]'`\n * Arrays w/ length === 0 return `'[]'`\n * Objects w/ no properties return `'{}'`\n * All else: return result of `value.toString()`\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {string} typeHint The type of the value\n * @returns {string}\n */\nfunction emptyRepresentation(value, typeHint) {\n switch (typeHint) {\n case \"function\":\n return \"[Function]\";\n case \"object\":\n return \"{}\";\n case \"array\":\n return \"[]\";\n default:\n return value.toString();\n }\n}\n\n/**\n * Takes some variable and asks `Object.prototype.toString()` what it thinks it\n * is.\n *\n * @private\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/toString\n * @param {*} value The value to test.\n * @returns {string} Computed type\n * @example\n * canonicalType({}) // 'object'\n * canonicalType([]) // 'array'\n * canonicalType(1) // 'number'\n * canonicalType(false) // 'boolean'\n * canonicalType(Infinity) // 'number'\n * canonicalType(null) // 'null'\n * canonicalType(new Date()) // 'date'\n * canonicalType(/foo/) // 'regexp'\n * canonicalType('type') // 'string'\n * canonicalType(global) // 'global'\n * canonicalType(new String('foo') // 'object'\n * canonicalType(async function() {}) // 'asyncfunction'\n * canonicalType(Object.create(null)) // 'null-prototype'\n */\nvar canonicalType = (exports.canonicalType = function canonicalType(value) {\n if (value === undefined) {\n return \"undefined\";\n } else if (value === null) {\n return \"null\";\n } else if (Buffer.isBuffer(value)) {\n return \"buffer\";\n } else if (Object.getPrototypeOf(value) === null) {\n return \"null-prototype\";\n }\n\n return Object.prototype.toString\n .call(value)\n .replace(/^\\[.+\\s(.+?)]$/, \"$1\")\n .toLowerCase();\n});\n\n/**\n *\n * Returns a general type or data structure of a variable\n * @private\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures\n * @param {*} value The value to test.\n * @returns {string} One of undefined, boolean, number, string, bigint, symbol, object\n * @example\n * type({}) // 'object'\n * type([]) // 'array'\n * type(1) // 'number'\n * type(false) // 'boolean'\n * type(Infinity) // 'number'\n * type(null) // 'null'\n * type(new Date()) // 'object'\n * type(/foo/) // 'object'\n * type('type') // 'string'\n * type(global) // 'object'\n * type(new String('foo') // 'string'\n */\nexports.type = function type(value) {\n // Null is special\n if (value === null) return \"null\";\n const primitives = new Set([\n \"undefined\",\n \"boolean\",\n \"number\",\n \"string\",\n \"bigint\",\n \"symbol\",\n ]);\n const _type = typeof value;\n if (_type === \"function\") return _type;\n if (primitives.has(_type)) return _type;\n if (value instanceof String) return \"string\";\n if (value instanceof Error) return \"error\";\n if (Array.isArray(value)) return \"array\";\n\n return _type;\n};\n\n/**\n * Stringify `value`. Different behavior depending on type of value:\n *\n * - If `value` is undefined or null, return `'[undefined]'` or `'[null]'`, respectively.\n * - If `value` is not an object, function or array, return result of `value.toString()` wrapped in double-quotes.\n * - If `value` is an *empty* object, function, or array, return result of function\n * {@link emptyRepresentation}.\n * - If `value` has properties, call {@link exports.canonicalize} on it, then return result of\n * JSON.stringify().\n *\n * @private\n * @see exports.type\n * @param {*} value\n * @return {string}\n */\nexports.stringify = function (value) {\n var typeHint = canonicalType(value);\n\n if (!~[\"object\", \"array\", \"function\", \"null-prototype\"].indexOf(typeHint)) {\n if (typeHint === \"buffer\") {\n var json = Buffer.prototype.toJSON.call(value);\n // Based on the toJSON result\n return jsonStringify(\n json.data && json.type ? json.data : json,\n 2,\n ).replace(/,(\\n|$)/g, \"$1\");\n }\n\n // IE7/IE8 has a bizarre String constructor; needs to be coerced\n // into an array and back to obj.\n if (typeHint === \"string\" && typeof value === \"object\") {\n value = value.split(\"\").reduce(function (acc, char, idx) {\n acc[idx] = char;\n return acc;\n }, {});\n typeHint = \"object\";\n } else {\n return jsonStringify(value);\n }\n }\n\n for (var prop in value) {\n if (Object.prototype.hasOwnProperty.call(value, prop)) {\n return jsonStringify(\n exports.canonicalize(value, null, typeHint),\n 2,\n ).replace(/,(\\n|$)/g, \"$1\");\n }\n }\n\n return emptyRepresentation(value, typeHint);\n};\n\n/**\n * like JSON.stringify but more sense.\n *\n * @private\n * @param {Object} object\n * @param {number=} spaces\n * @param {number=} depth\n * @returns {*}\n */\nfunction jsonStringify(object, spaces, depth) {\n if (typeof spaces === \"undefined\") {\n // primitive types\n return _stringify(object);\n }\n\n depth = depth || 1;\n var space = spaces * depth;\n var str = Array.isArray(object) ? \"[\" : \"{\";\n var end = Array.isArray(object) ? \"]\" : \"}\";\n var length =\n typeof object.length === \"number\"\n ? object.length\n : Object.keys(object).length;\n // `.repeat()` polyfill\n function repeat(s, n) {\n return new Array(n).join(s);\n }\n\n function _stringify(val) {\n switch (canonicalType(val)) {\n case \"null\":\n case \"undefined\":\n val = \"[\" + val + \"]\";\n break;\n case \"array\":\n case \"object\":\n val = jsonStringify(val, spaces, depth + 1);\n break;\n case \"boolean\":\n case \"regexp\":\n case \"symbol\":\n case \"number\":\n val =\n val === 0 && 1 / val === -Infinity // `-0`\n ? \"-0\"\n : val.toString();\n break;\n case \"bigint\":\n val = val.toString() + \"n\";\n break;\n case \"date\":\n var sDate = isNaN(val.getTime()) ? val.toString() : val.toISOString();\n val = \"[Date: \" + sDate + \"]\";\n break;\n case \"buffer\":\n var json = val.toJSON();\n // Based on the toJSON result\n json = json.data && json.type ? json.data : json;\n val = \"[Buffer: \" + jsonStringify(json, 2, depth + 1) + \"]\";\n break;\n default:\n val =\n val === \"[Function]\" || val === \"[Circular]\"\n ? val\n : JSON.stringify(val); // string\n }\n return val;\n }\n\n for (var i in object) {\n if (!Object.prototype.hasOwnProperty.call(object, i)) {\n continue; // not my business\n }\n --length;\n str +=\n \"\\n \" +\n repeat(\" \", space) +\n (Array.isArray(object) ? \"\" : '\"' + i + '\": ') + // key\n _stringify(object[i]) + // value\n (length ? \",\" : \"\"); // comma\n }\n\n return (\n str +\n // [], {}\n (str.length !== 1 ? \"\\n\" + repeat(\" \", --space) + end : end)\n );\n}\n\n/**\n * Return a new Thing that has the keys in sorted order. Recursive.\n *\n * If the Thing...\n * - has already been seen, return string `'[Circular]'`\n * - is `undefined`, return string `'[undefined]'`\n * - is `null`, return value `null`\n * - is some other primitive, return the value\n * - is not a primitive or an `Array`, `Object`, or `Function`, return the value of the Thing's `toString()` method\n * - is a non-empty `Array`, `Object`, or `Function`, return the result of calling this function again.\n * - is an empty `Array`, `Object`, or `Function`, return the result of calling `emptyRepresentation()`\n *\n * @private\n * @see {@link exports.stringify}\n * @param {*} value Thing to inspect. May or may not have properties.\n * @param {Array} [stack=[]] Stack of seen values\n * @param {string} [typeHint] Type hint\n * @return {(Object|Array|Function|string|undefined)}\n */\nexports.canonicalize = function canonicalize(value, stack, typeHint) {\n var canonicalizedObj;\n /* eslint-disable no-unused-vars */\n var prop;\n /* eslint-enable no-unused-vars */\n typeHint = typeHint || canonicalType(value);\n function withStack(value, fn) {\n stack.push(value);\n fn();\n stack.pop();\n }\n\n stack = stack || [];\n\n if (stack.indexOf(value) !== -1) {\n return \"[Circular]\";\n }\n\n switch (typeHint) {\n case \"undefined\":\n case \"buffer\":\n case \"null\":\n canonicalizedObj = value;\n break;\n case \"array\":\n withStack(value, function () {\n canonicalizedObj = value.map(function (item) {\n return exports.canonicalize(item, stack);\n });\n });\n break;\n case \"function\":\n /* eslint-disable-next-line no-unused-vars, no-unreachable-loop */\n for (prop in value) {\n canonicalizedObj = {};\n break;\n }\n /* eslint-enable guard-for-in */\n if (!canonicalizedObj) {\n canonicalizedObj = emptyRepresentation(value, typeHint);\n break;\n }\n /* falls through */\n case \"null-prototype\":\n case \"object\":\n canonicalizedObj = canonicalizedObj || {};\n if (typeHint === \"null-prototype\" && Symbol.toStringTag in value) {\n canonicalizedObj[\"[Symbol.toStringTag]\"] = value[Symbol.toStringTag];\n }\n withStack(value, function () {\n Object.keys(value)\n .sort()\n .forEach(function (key) {\n canonicalizedObj[key] = exports.canonicalize(value[key], stack);\n });\n });\n break;\n case \"date\":\n case \"number\":\n case \"regexp\":\n case \"boolean\":\n case \"symbol\":\n canonicalizedObj = value;\n break;\n default:\n canonicalizedObj = value + \"\";\n }\n\n return canonicalizedObj;\n};\n\n/**\n * @summary\n * This Filter based on `mocha-clean` module.(see: `github.com/rstacruz/mocha-clean`)\n * @description\n * When invoking this function you get a filter function that get the Error.stack as an input,\n * and return a prettify output.\n * (i.e: strip Mocha and internal node functions from stack trace).\n * @returns {Function}\n */\nexports.stackTraceFilter = function () {\n // TODO: Replace with `process.browser`\n var is = typeof document === \"undefined\" ? { node: true } : { browser: true };\n var slash = path.sep;\n var cwd;\n if (is.node) {\n cwd = exports.cwd() + slash;\n } else {\n cwd = (\n typeof location === \"undefined\" ? window.location : location\n ).href.replace(/\\/[^/]*$/, \"/\");\n slash = \"/\";\n }\n\n function isMochaInternal(line) {\n return (\n ~line.indexOf(\"node_modules\" + slash + \"mocha\" + slash) ||\n ~line.indexOf(slash + \"mocha.js\") ||\n ~line.indexOf(slash + \"mocha.min.js\")\n );\n }\n\n function isNodeInternal(line) {\n return (\n ~line.indexOf(\"(timers.js:\") ||\n ~line.indexOf(\"(events.js:\") ||\n ~line.indexOf(\"(node.js:\") ||\n ~line.indexOf(\"(module.js:\") ||\n ~line.indexOf(\"GeneratorFunctionPrototype.next (native)\") ||\n false\n );\n }\n\n return function (stack) {\n stack = stack.split(\"\\n\");\n\n stack = stack.reduce(function (list, line) {\n if (isMochaInternal(line)) {\n return list;\n }\n\n if (is.node && isNodeInternal(line)) {\n return list;\n }\n\n // Clean up cwd(absolute)\n if (/:\\d+:\\d+\\)?$/.test(line)) {\n line = line.replace(\"(\" + cwd, \"(\");\n }\n\n list.push(line);\n return list;\n }, []);\n\n return stack.join(\"\\n\");\n };\n};\n\n/**\n * Crude, but effective.\n * @public\n * @param {*} value\n * @returns {boolean} Whether or not `value` is a Promise\n */\nexports.isPromise = function isPromise(value) {\n return (\n typeof value === \"object\" &&\n value !== null &&\n typeof value.then === \"function\"\n );\n};\n\n/**\n * Clamps a numeric value to an inclusive range.\n *\n * @param {number} value - Value to be clamped.\n * @param {number[]} range - Two element array specifying [min, max] range.\n * @returns {number} clamped value\n */\nexports.clamp = function clamp(value, range) {\n return Math.min(Math.max(value, range[0]), range[1]);\n};\n\n/**\n * It's a noop.\n * @public\n */\nexports.noop = function () {};\n\n/**\n * Creates a map-like object.\n *\n * @description\n * A \"map\" is an object with no prototype, for our purposes. In some cases\n * this would be more appropriate than a `Map`, especially if your environment\n * doesn't support it. Recommended for use in Mocha's public APIs.\n *\n * @public\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map#Custom_and_Null_objects|MDN:Map}\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/create#Custom_and_Null_objects|MDN:Object.create - Custom objects}\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign#Custom_and_Null_objects|MDN:Object.assign}\n * @param {...*} [obj] - Arguments to `Object.assign()`.\n * @returns {Object} An object with no prototype, having `...obj` properties\n */\nexports.createMap = function () {\n return Object.assign.apply(\n null,\n [Object.create(null)].concat(Array.prototype.slice.call(arguments)),\n );\n};\n\n/**\n * Creates a read-only map-like object.\n *\n * @description\n * This differs from {@link module:utils.createMap createMap} only in that\n * the argument must be non-empty, because the result is frozen.\n *\n * @see {@link module:utils.createMap createMap}\n * @param {...*} [obj] - Arguments to `Object.assign()`.\n * @returns {Object} A frozen object with no prototype, having `...obj` properties\n * @throws {TypeError} if argument is not a non-empty object.\n */\nexports.defineConstants = function (obj) {\n if (canonicalType(obj) !== \"object\" || !Object.keys(obj).length) {\n throw new TypeError(\"Invalid argument; expected a non-empty object\");\n }\n return Object.freeze(exports.createMap(obj));\n};\n\n/**\n * Returns current working directory\n *\n * Wrapper around `process.cwd()` for isolation\n * @private\n */\nexports.cwd = function cwd() {\n return process.cwd();\n};\n\n/**\n * Returns `true` if Mocha is running in a browser.\n * Checks for `process.browser`.\n * @returns {boolean}\n * @private\n */\nexports.isBrowser = function isBrowser() {\n return Boolean(process.browser);\n};\n\n/*\n * Casts `value` to an array; useful for optionally accepting array parameters\n *\n * It follows these rules, depending on `value`. If `value` is...\n * 1. `undefined`: return an empty Array\n * 2. `null`: return an array with a single `null` element\n * 3. Any other object: return the value of `Array.from()` _if_ the object is iterable\n * 4. otherwise: return an array with a single element, `value`\n * @param {*} value - Something to cast to an Array\n * @returns {Array<*>}\n */\nexports.castArray = function castArray(value) {\n if (value === undefined) {\n return [];\n }\n if (value === null) {\n return [null];\n }\n if (\n typeof value === \"object\" &&\n (typeof value[Symbol.iterator] === \"function\" || value.length !== undefined)\n ) {\n return Array.from(value);\n }\n return [value];\n};\n\nexports.constants = exports.defineConstants({\n MOCHA_ID_PROP_NAME,\n});\n\nconst uniqueIDBase =\n \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_\";\n\n/**\n * Creates a new unique identifier\n * Does not create cryptographically safe ids.\n * Trivial copy of nanoid/non-secure\n * @returns {string} Unique identifier\n */\nexports.uniqueID = () => {\n let id = \"\";\n for (let i = 0; i < 21; i++) {\n id += uniqueIDBase[(Math.random() * 64) | 0];\n }\n return id;\n};\n\nexports.assignNewMochaID = (obj) => {\n const id = exports.uniqueID();\n Object.defineProperty(obj, MOCHA_ID_PROP_NAME, {\n get() {\n return id;\n },\n });\n return obj;\n};\n\n/**\n * Retrieves a Mocha ID from an object, if present.\n * @param {*} [obj] - Object\n * @returns {string|void}\n */\nexports.getMochaID = (obj) =>\n obj && typeof obj === \"object\" ? obj[MOCHA_ID_PROP_NAME] : undefined;\n\n/**\n * Replaces any detected circular dependency with the string '[Circular]'\n * Mutates original object\n * @param inputObj {*}\n * @returns {*}\n */\nexports.breakCircularDeps = (inputObj) => {\n const seen = new Set();\n\n function _breakCircularDeps(obj) {\n if (obj && typeof obj !== \"object\") {\n return obj;\n }\n\n if (seen.has(obj)) {\n return \"[Circular]\";\n }\n\n seen.add(obj);\n for (const k in obj) {\n const descriptor = Object.getOwnPropertyDescriptor(obj, k);\n\n if (descriptor && descriptor.writable) {\n obj[k] = _breakCircularDeps(obj[k], k);\n }\n }\n\n // deleting means only a seen object that is its own child will be detected\n seen.delete(obj);\n return obj;\n }\n\n return _breakCircularDeps(inputObj);\n};\n\n/**\n * Checks if provided input can be parsed as a JavaScript Number.\n */\nexports.isNumeric = (input) => {\n return !isNaN(parseFloat(input));\n};\n","'use strict';\n\nmodule.exports = {\n\tinfo: 'ℹ️',\n\tsuccess: '✅',\n\twarning: '⚠️',\n\terror: '❌️'\n};\n","\"use strict\";\n\n/**\n @module Pending\n*/\n\nmodule.exports = Pending;\n\n/**\n * Initialize a new `Pending` error with the given message.\n *\n * @param {string} message\n */\nfunction Pending(message) {\n this.message = message;\n}\n","/**\n * Helpers.\n */\n\nvar s = 1000;\nvar m = s * 60;\nvar h = m * 60;\nvar d = h * 24;\nvar w = d * 7;\nvar y = d * 365.25;\n\n/**\n * Parse or format the given `val`.\n *\n * Options:\n *\n * - `long` verbose formatting [false]\n *\n * @param {String|Number} val\n * @param {Object} [options]\n * @throws {Error} throw an error if val is not a non-empty string or a number\n * @return {String|Number}\n * @api public\n */\n\nmodule.exports = function(val, options) {\n options = options || {};\n var type = typeof val;\n if (type === 'string' && val.length > 0) {\n return parse(val);\n } else if (type === 'number' && isFinite(val)) {\n return options.long ? fmtLong(val) : fmtShort(val);\n }\n throw new Error(\n 'val is not a non-empty string or a valid number. val=' +\n JSON.stringify(val)\n );\n};\n\n/**\n * Parse the given `str` and return milliseconds.\n *\n * @param {String} str\n * @return {Number}\n * @api private\n */\n\nfunction parse(str) {\n str = String(str);\n if (str.length > 100) {\n return;\n }\n var match = /^(-?(?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(\n str\n );\n if (!match) {\n return;\n }\n var n = parseFloat(match[1]);\n var type = (match[2] || 'ms').toLowerCase();\n switch (type) {\n case 'years':\n case 'year':\n case 'yrs':\n case 'yr':\n case 'y':\n return n * y;\n case 'weeks':\n case 'week':\n case 'w':\n return n * w;\n case 'days':\n case 'day':\n case 'd':\n return n * d;\n case 'hours':\n case 'hour':\n case 'hrs':\n case 'hr':\n case 'h':\n return n * h;\n case 'minutes':\n case 'minute':\n case 'mins':\n case 'min':\n case 'm':\n return n * m;\n case 'seconds':\n case 'second':\n case 'secs':\n case 'sec':\n case 's':\n return n * s;\n case 'milliseconds':\n case 'millisecond':\n case 'msecs':\n case 'msec':\n case 'ms':\n return n;\n default:\n return undefined;\n }\n}\n\n/**\n * Short format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtShort(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return Math.round(ms / d) + 'd';\n }\n if (msAbs >= h) {\n return Math.round(ms / h) + 'h';\n }\n if (msAbs >= m) {\n return Math.round(ms / m) + 'm';\n }\n if (msAbs >= s) {\n return Math.round(ms / s) + 's';\n }\n return ms + 'ms';\n}\n\n/**\n * Long format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtLong(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return plural(ms, msAbs, d, 'day');\n }\n if (msAbs >= h) {\n return plural(ms, msAbs, h, 'hour');\n }\n if (msAbs >= m) {\n return plural(ms, msAbs, m, 'minute');\n }\n if (msAbs >= s) {\n return plural(ms, msAbs, s, 'second');\n }\n return ms + ' ms';\n}\n\n/**\n * Pluralization helper.\n */\n\nfunction plural(ms, msAbs, n, name) {\n var isPlural = msAbs >= n * 1.5;\n return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');\n}\n","\n/**\n * This is the common logic for both the Node.js and web browser\n * implementations of `debug()`.\n */\n\nfunction setup(env) {\n\tcreateDebug.debug = createDebug;\n\tcreateDebug.default = createDebug;\n\tcreateDebug.coerce = coerce;\n\tcreateDebug.disable = disable;\n\tcreateDebug.enable = enable;\n\tcreateDebug.enabled = enabled;\n\tcreateDebug.humanize = require('ms');\n\tcreateDebug.destroy = destroy;\n\n\tObject.keys(env).forEach(key => {\n\t\tcreateDebug[key] = env[key];\n\t});\n\n\t/**\n\t* The currently active debug mode names, and names to skip.\n\t*/\n\n\tcreateDebug.names = [];\n\tcreateDebug.skips = [];\n\n\t/**\n\t* Map of special \"%n\" handling functions, for the debug \"format\" argument.\n\t*\n\t* Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n\t*/\n\tcreateDebug.formatters = {};\n\n\t/**\n\t* Selects a color for a debug namespace\n\t* @param {String} namespace The namespace string for the debug instance to be colored\n\t* @return {Number|String} An ANSI color code for the given namespace\n\t* @api private\n\t*/\n\tfunction selectColor(namespace) {\n\t\tlet hash = 0;\n\n\t\tfor (let i = 0; i < namespace.length; i++) {\n\t\t\thash = ((hash << 5) - hash) + namespace.charCodeAt(i);\n\t\t\thash |= 0; // Convert to 32bit integer\n\t\t}\n\n\t\treturn createDebug.colors[Math.abs(hash) % createDebug.colors.length];\n\t}\n\tcreateDebug.selectColor = selectColor;\n\n\t/**\n\t* Create a debugger with the given `namespace`.\n\t*\n\t* @param {String} namespace\n\t* @return {Function}\n\t* @api public\n\t*/\n\tfunction createDebug(namespace) {\n\t\tlet prevTime;\n\t\tlet enableOverride = null;\n\t\tlet namespacesCache;\n\t\tlet enabledCache;\n\n\t\tfunction debug(...args) {\n\t\t\t// Disabled?\n\t\t\tif (!debug.enabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst self = debug;\n\n\t\t\t// Set `diff` timestamp\n\t\t\tconst curr = Number(new Date());\n\t\t\tconst ms = curr - (prevTime || curr);\n\t\t\tself.diff = ms;\n\t\t\tself.prev = prevTime;\n\t\t\tself.curr = curr;\n\t\t\tprevTime = curr;\n\n\t\t\targs[0] = createDebug.coerce(args[0]);\n\n\t\t\tif (typeof args[0] !== 'string') {\n\t\t\t\t// Anything else let's inspect with %O\n\t\t\t\targs.unshift('%O');\n\t\t\t}\n\n\t\t\t// Apply any `formatters` transformations\n\t\t\tlet index = 0;\n\t\t\targs[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {\n\t\t\t\t// If we encounter an escaped % then don't increase the array index\n\t\t\t\tif (match === '%%') {\n\t\t\t\t\treturn '%';\n\t\t\t\t}\n\t\t\t\tindex++;\n\t\t\t\tconst formatter = createDebug.formatters[format];\n\t\t\t\tif (typeof formatter === 'function') {\n\t\t\t\t\tconst val = args[index];\n\t\t\t\t\tmatch = formatter.call(self, val);\n\n\t\t\t\t\t// Now we need to remove `args[index]` since it's inlined in the `format`\n\t\t\t\t\targs.splice(index, 1);\n\t\t\t\t\tindex--;\n\t\t\t\t}\n\t\t\t\treturn match;\n\t\t\t});\n\n\t\t\t// Apply env-specific formatting (colors, etc.)\n\t\t\tcreateDebug.formatArgs.call(self, args);\n\n\t\t\tconst logFn = self.log || createDebug.log;\n\t\t\tlogFn.apply(self, args);\n\t\t}\n\n\t\tdebug.namespace = namespace;\n\t\tdebug.useColors = createDebug.useColors();\n\t\tdebug.color = createDebug.selectColor(namespace);\n\t\tdebug.extend = extend;\n\t\tdebug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.\n\n\t\tObject.defineProperty(debug, 'enabled', {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: false,\n\t\t\tget: () => {\n\t\t\t\tif (enableOverride !== null) {\n\t\t\t\t\treturn enableOverride;\n\t\t\t\t}\n\t\t\t\tif (namespacesCache !== createDebug.namespaces) {\n\t\t\t\t\tnamespacesCache = createDebug.namespaces;\n\t\t\t\t\tenabledCache = createDebug.enabled(namespace);\n\t\t\t\t}\n\n\t\t\t\treturn enabledCache;\n\t\t\t},\n\t\t\tset: v => {\n\t\t\t\tenableOverride = v;\n\t\t\t}\n\t\t});\n\n\t\t// Env-specific initialization logic for debug instances\n\t\tif (typeof createDebug.init === 'function') {\n\t\t\tcreateDebug.init(debug);\n\t\t}\n\n\t\treturn debug;\n\t}\n\n\tfunction extend(namespace, delimiter) {\n\t\tconst newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);\n\t\tnewDebug.log = this.log;\n\t\treturn newDebug;\n\t}\n\n\t/**\n\t* Enables a debug mode by namespaces. This can include modes\n\t* separated by a colon and wildcards.\n\t*\n\t* @param {String} namespaces\n\t* @api public\n\t*/\n\tfunction enable(namespaces) {\n\t\tcreateDebug.save(namespaces);\n\t\tcreateDebug.namespaces = namespaces;\n\n\t\tcreateDebug.names = [];\n\t\tcreateDebug.skips = [];\n\n\t\tlet i;\n\t\tconst split = (typeof namespaces === 'string' ? namespaces : '').split(/[\\s,]+/);\n\t\tconst len = split.length;\n\n\t\tfor (i = 0; i < len; i++) {\n\t\t\tif (!split[i]) {\n\t\t\t\t// ignore empty strings\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tnamespaces = split[i].replace(/\\*/g, '.*?');\n\n\t\t\tif (namespaces[0] === '-') {\n\t\t\t\tcreateDebug.skips.push(new RegExp('^' + namespaces.slice(1) + '$'));\n\t\t\t} else {\n\t\t\t\tcreateDebug.names.push(new RegExp('^' + namespaces + '$'));\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t* Disable debug output.\n\t*\n\t* @return {String} namespaces\n\t* @api public\n\t*/\n\tfunction disable() {\n\t\tconst namespaces = [\n\t\t\t...createDebug.names.map(toNamespace),\n\t\t\t...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)\n\t\t].join(',');\n\t\tcreateDebug.enable('');\n\t\treturn namespaces;\n\t}\n\n\t/**\n\t* Returns true if the given mode name is enabled, false otherwise.\n\t*\n\t* @param {String} name\n\t* @return {Boolean}\n\t* @api public\n\t*/\n\tfunction enabled(name) {\n\t\tif (name[name.length - 1] === '*') {\n\t\t\treturn true;\n\t\t}\n\n\t\tlet i;\n\t\tlet len;\n\n\t\tfor (i = 0, len = createDebug.skips.length; i < len; i++) {\n\t\t\tif (createDebug.skips[i].test(name)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tfor (i = 0, len = createDebug.names.length; i < len; i++) {\n\t\t\tif (createDebug.names[i].test(name)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t* Convert regexp to namespace\n\t*\n\t* @param {RegExp} regxep\n\t* @return {String} namespace\n\t* @api private\n\t*/\n\tfunction toNamespace(regexp) {\n\t\treturn regexp.toString()\n\t\t\t.substring(2, regexp.toString().length - 2)\n\t\t\t.replace(/\\.\\*\\?$/, '*');\n\t}\n\n\t/**\n\t* Coerce `val`.\n\t*\n\t* @param {Mixed} val\n\t* @return {Mixed}\n\t* @api private\n\t*/\n\tfunction coerce(val) {\n\t\tif (val instanceof Error) {\n\t\t\treturn val.stack || val.message;\n\t\t}\n\t\treturn val;\n\t}\n\n\t/**\n\t* XXX DO NOT USE. This is a temporary stub function.\n\t* XXX It WILL be removed in the next major release.\n\t*/\n\tfunction destroy() {\n\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t}\n\n\tcreateDebug.enable(createDebug.load());\n\n\treturn createDebug;\n}\n\nmodule.exports = setup;\n","/* eslint-env browser */\n\n/**\n * This is the web browser implementation of `debug()`.\n */\n\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.storage = localstorage();\nexports.destroy = (() => {\n\tlet warned = false;\n\n\treturn () => {\n\t\tif (!warned) {\n\t\t\twarned = true;\n\t\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t\t}\n\t};\n})();\n\n/**\n * Colors.\n */\n\nexports.colors = [\n\t'#0000CC',\n\t'#0000FF',\n\t'#0033CC',\n\t'#0033FF',\n\t'#0066CC',\n\t'#0066FF',\n\t'#0099CC',\n\t'#0099FF',\n\t'#00CC00',\n\t'#00CC33',\n\t'#00CC66',\n\t'#00CC99',\n\t'#00CCCC',\n\t'#00CCFF',\n\t'#3300CC',\n\t'#3300FF',\n\t'#3333CC',\n\t'#3333FF',\n\t'#3366CC',\n\t'#3366FF',\n\t'#3399CC',\n\t'#3399FF',\n\t'#33CC00',\n\t'#33CC33',\n\t'#33CC66',\n\t'#33CC99',\n\t'#33CCCC',\n\t'#33CCFF',\n\t'#6600CC',\n\t'#6600FF',\n\t'#6633CC',\n\t'#6633FF',\n\t'#66CC00',\n\t'#66CC33',\n\t'#9900CC',\n\t'#9900FF',\n\t'#9933CC',\n\t'#9933FF',\n\t'#99CC00',\n\t'#99CC33',\n\t'#CC0000',\n\t'#CC0033',\n\t'#CC0066',\n\t'#CC0099',\n\t'#CC00CC',\n\t'#CC00FF',\n\t'#CC3300',\n\t'#CC3333',\n\t'#CC3366',\n\t'#CC3399',\n\t'#CC33CC',\n\t'#CC33FF',\n\t'#CC6600',\n\t'#CC6633',\n\t'#CC9900',\n\t'#CC9933',\n\t'#CCCC00',\n\t'#CCCC33',\n\t'#FF0000',\n\t'#FF0033',\n\t'#FF0066',\n\t'#FF0099',\n\t'#FF00CC',\n\t'#FF00FF',\n\t'#FF3300',\n\t'#FF3333',\n\t'#FF3366',\n\t'#FF3399',\n\t'#FF33CC',\n\t'#FF33FF',\n\t'#FF6600',\n\t'#FF6633',\n\t'#FF9900',\n\t'#FF9933',\n\t'#FFCC00',\n\t'#FFCC33'\n];\n\n/**\n * Currently only WebKit-based Web Inspectors, Firefox >= v31,\n * and the Firebug extension (any Firefox version) are known\n * to support \"%c\" CSS customizations.\n *\n * TODO: add a `localStorage` variable to explicitly enable/disable colors\n */\n\n// eslint-disable-next-line complexity\nfunction useColors() {\n\t// NB: In an Electron preload script, document will be defined but not fully\n\t// initialized. Since we know we're in Chrome, we'll just detect this case\n\t// explicitly\n\tif (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {\n\t\treturn true;\n\t}\n\n\t// Internet Explorer and Edge do not support colors.\n\tif (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n\t\treturn false;\n\t}\n\n\t// Is webkit? http://stackoverflow.com/a/16459606/376773\n\t// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\treturn (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n\t\t// Is firebug? http://stackoverflow.com/a/398120/376773\n\t\t(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n\t\t// Is firefox >= v31?\n\t\t// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n\t\t// Double check webkit in userAgent just in case we are in a worker\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n}\n\n/**\n * Colorize log arguments if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n\targs[0] = (this.useColors ? '%c' : '') +\n\t\tthis.namespace +\n\t\t(this.useColors ? ' %c' : ' ') +\n\t\targs[0] +\n\t\t(this.useColors ? '%c ' : ' ') +\n\t\t'+' + module.exports.humanize(this.diff);\n\n\tif (!this.useColors) {\n\t\treturn;\n\t}\n\n\tconst c = 'color: ' + this.color;\n\targs.splice(1, 0, c, 'color: inherit');\n\n\t// The final \"%c\" is somewhat tricky, because there could be other\n\t// arguments passed either before or after the %c, so we need to\n\t// figure out the correct index to insert the CSS into\n\tlet index = 0;\n\tlet lastC = 0;\n\targs[0].replace(/%[a-zA-Z%]/g, match => {\n\t\tif (match === '%%') {\n\t\t\treturn;\n\t\t}\n\t\tindex++;\n\t\tif (match === '%c') {\n\t\t\t// We only are interested in the *last* %c\n\t\t\t// (the user may have provided their own)\n\t\t\tlastC = index;\n\t\t}\n\t});\n\n\targs.splice(lastC, 0, c);\n}\n\n/**\n * Invokes `console.debug()` when available.\n * No-op when `console.debug` is not a \"function\".\n * If `console.debug` is not available, falls back\n * to `console.log`.\n *\n * @api public\n */\nexports.log = console.debug || console.log || (() => {});\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\nfunction save(namespaces) {\n\ttry {\n\t\tif (namespaces) {\n\t\t\texports.storage.setItem('debug', namespaces);\n\t\t} else {\n\t\t\texports.storage.removeItem('debug');\n\t\t}\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\nfunction load() {\n\tlet r;\n\ttry {\n\t\tr = exports.storage.getItem('debug');\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n\n\t// If debug isn't set in LS, and we're in Electron, try to load $DEBUG\n\tif (!r && typeof process !== 'undefined' && 'env' in process) {\n\t\tr = process.env.DEBUG;\n\t}\n\n\treturn r;\n}\n\n/**\n * Localstorage attempts to return the localstorage.\n *\n * This is necessary because safari throws\n * when a user disables cookies/localstorage\n * and you attempt to access it.\n *\n * @return {LocalStorage}\n * @api private\n */\n\nfunction localstorage() {\n\ttry {\n\t\t// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context\n\t\t// The Browser also has localStorage in the global context.\n\t\treturn localStorage;\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\nmodule.exports = require('./common')(exports);\n\nconst {formatters} = module.exports;\n\n/**\n * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.\n */\n\nformatters.j = function (v) {\n\ttry {\n\t\treturn JSON.stringify(v);\n\t} catch (error) {\n\t\treturn '[UnexpectedJSONParseError]: ' + error.message;\n\t}\n};\n","\"use strict\";\n\n/**\n * When Mocha throws exceptions (or rejects `Promise`s), it attempts to assign a `code` property to the `Error` object, for easier handling. These are the potential values of `code`.\n * @public\n * @namespace\n * @memberof module:lib/errors\n */\nvar constants = {\n /**\n * An unrecoverable error.\n * @constant\n * @default\n */\n FATAL: \"ERR_MOCHA_FATAL\",\n\n /**\n * The type of an argument to a function call is invalid\n * @constant\n * @default\n */\n INVALID_ARG_TYPE: \"ERR_MOCHA_INVALID_ARG_TYPE\",\n\n /**\n * The value of an argument to a function call is invalid\n * @constant\n * @default\n */\n INVALID_ARG_VALUE: \"ERR_MOCHA_INVALID_ARG_VALUE\",\n\n /**\n * Something was thrown, but it wasn't an `Error`\n * @constant\n * @default\n */\n INVALID_EXCEPTION: \"ERR_MOCHA_INVALID_EXCEPTION\",\n\n /**\n * An interface (e.g., `Mocha.interfaces`) is unknown or invalid\n * @constant\n * @default\n */\n INVALID_INTERFACE: \"ERR_MOCHA_INVALID_INTERFACE\",\n\n /**\n * A reporter (.e.g, `Mocha.reporters`) is unknown or invalid\n * @constant\n * @default\n */\n INVALID_REPORTER: \"ERR_MOCHA_INVALID_REPORTER\",\n\n /**\n * `done()` was called twice in a `Test` or `Hook` callback\n * @constant\n * @default\n */\n MULTIPLE_DONE: \"ERR_MOCHA_MULTIPLE_DONE\",\n\n /**\n * No files matched the pattern provided by the user\n * @constant\n * @default\n */\n NO_FILES_MATCH_PATTERN: \"ERR_MOCHA_NO_FILES_MATCH_PATTERN\",\n\n /**\n * Known, but unsupported behavior of some kind\n * @constant\n * @default\n */\n UNSUPPORTED: \"ERR_MOCHA_UNSUPPORTED\",\n\n /**\n * Invalid state transition occurring in `Mocha` instance\n * @constant\n * @default\n */\n INSTANCE_ALREADY_RUNNING: \"ERR_MOCHA_INSTANCE_ALREADY_RUNNING\",\n\n /**\n * Invalid state transition occurring in `Mocha` instance\n * @constant\n * @default\n */\n INSTANCE_ALREADY_DISPOSED: \"ERR_MOCHA_INSTANCE_ALREADY_DISPOSED\",\n\n /**\n * Use of `only()` w/ `--forbid-only` results in this error.\n * @constant\n * @default\n */\n FORBIDDEN_EXCLUSIVITY: \"ERR_MOCHA_FORBIDDEN_EXCLUSIVITY\",\n\n /**\n * To be thrown when a user-defined plugin implementation (e.g., `mochaHooks`) is invalid\n * @constant\n * @default\n */\n INVALID_PLUGIN_IMPLEMENTATION: \"ERR_MOCHA_INVALID_PLUGIN_IMPLEMENTATION\",\n\n /**\n * To be thrown when a builtin or third-party plugin definition (the _definition_ of `mochaHooks`) is invalid\n * @constant\n * @default\n */\n INVALID_PLUGIN_DEFINITION: \"ERR_MOCHA_INVALID_PLUGIN_DEFINITION\",\n\n /**\n * When a runnable exceeds its allowed run time.\n * @constant\n * @default\n */\n TIMEOUT: \"ERR_MOCHA_TIMEOUT\",\n\n /**\n * Input file is not able to be parsed\n * @constant\n * @default\n */\n UNPARSABLE_FILE: \"ERR_MOCHA_UNPARSABLE_FILE\",\n};\n\nmodule.exports = { constants };\n","\"use strict\";\n\n/**\n * @typedef {import('./mocha.js')} Mocha\n * @typedef {import('./runnable.js')} Runnable\n * @typedef {import('./types.d.ts').MochaTimeoutError} MochaTimeoutError\n * @typedef {import('./types.d.ts').PluginDefinition} PluginDefinition\n */\n\nconst { format } = require(\"node:util\");\nconst { constants } = require(\"./error-constants.js\");\n\n/**\n * Contains error codes, factory functions to create throwable error objects,\n * and warning/deprecation functions.\n * @module\n */\n\n/**\n * process.emitWarning or a polyfill\n * @see https://nodejs.org/api/process.html#process_process_emitwarning_warning_options\n * @ignore\n */\nconst emitWarning = (msg, type) => {\n if (process.emitWarning) {\n process.emitWarning(msg, type);\n } else {\n /* istanbul ignore next */\n process.nextTick(function () {\n console.warn(type + \": \" + msg);\n });\n }\n};\n\n/**\n * Show a deprecation warning. Each distinct message is only displayed once.\n * Ignores empty messages.\n *\n * @param {string} [msg] - Warning to print\n * @private\n */\nconst deprecate = (msg) => {\n msg = String(msg);\n if (msg && !deprecate.cache[msg]) {\n deprecate.cache[msg] = true;\n emitWarning(msg, \"DeprecationWarning\");\n }\n};\ndeprecate.cache = {};\n\n/**\n * Show a generic warning.\n * Ignores empty messages.\n *\n * @param {string} [msg] - Warning to print\n * @private\n */\nconst warn = (msg) => {\n if (msg) {\n emitWarning(msg);\n }\n};\n\n/**\n * A set containing all string values of all Mocha error constants, for use by {@link isMochaError}.\n * @private\n */\nconst MOCHA_ERRORS = new Set(Object.values(constants));\n\n/**\n * Creates an error object to be thrown when no files to be tested could be found using specified pattern.\n *\n * @public\n * @static\n * @param {string} message - Error message to be displayed.\n * @param {string} pattern - User-specified argument value.\n * @returns {Error} instance detailing the error condition\n */\nfunction createNoFilesMatchPatternError(message, pattern) {\n var err = new Error(message);\n err.code = constants.NO_FILES_MATCH_PATTERN;\n err.pattern = pattern;\n return err;\n}\n\n/**\n * Creates an error object to be thrown when the reporter specified in the options was not found.\n *\n * @public\n * @param {string} message - Error message to be displayed.\n * @param {string} reporter - User-specified reporter value.\n * @returns {Error} instance detailing the error condition\n */\nfunction createInvalidReporterError(message, reporter) {\n var err = new TypeError(message);\n err.code = constants.INVALID_REPORTER;\n err.reporter = reporter;\n return err;\n}\n\n/**\n * Creates an error object to be thrown when the interface specified in the options was not found.\n *\n * @public\n * @static\n * @param {string} message - Error message to be displayed.\n * @param {string} ui - User-specified interface value.\n * @returns {Error} instance detailing the error condition\n */\nfunction createInvalidInterfaceError(message, ui) {\n var err = new Error(message);\n err.code = constants.INVALID_INTERFACE;\n err.interface = ui;\n return err;\n}\n\n/**\n * Creates an error object to be thrown when a behavior, option, or parameter is unsupported.\n *\n * @public\n * @static\n * @param {string} message - Error message to be displayed.\n * @returns {Error} instance detailing the error condition\n */\nfunction createUnsupportedError(message) {\n var err = new Error(message);\n err.code = constants.UNSUPPORTED;\n return err;\n}\n\n/**\n * Creates an error object to be thrown when an argument is missing.\n *\n * @public\n * @static\n * @param {string} message - Error message to be displayed.\n * @param {string} argument - Argument name.\n * @param {string} expected - Expected argument datatype.\n * @returns {Error} instance detailing the error condition\n */\nfunction createMissingArgumentError(message, argument, expected) {\n return createInvalidArgumentTypeError(message, argument, expected);\n}\n\n/**\n * Creates an error object to be thrown when an argument did not use the supported type\n *\n * @public\n * @static\n * @param {string} message - Error message to be displayed.\n * @param {string} argument - Argument name.\n * @param {string} expected - Expected argument datatype.\n * @returns {Error} instance detailing the error condition\n */\nfunction createInvalidArgumentTypeError(message, argument, expected) {\n var err = new TypeError(message);\n err.code = constants.INVALID_ARG_TYPE;\n err.argument = argument;\n err.expected = expected;\n err.actual = typeof argument;\n return err;\n}\n\n/**\n * Creates an error object to be thrown when an argument did not use the supported value\n *\n * @public\n * @static\n * @param {string} message - Error message to be displayed.\n * @param {string} argument - Argument name.\n * @param {string} value - Argument value.\n * @param {string} [reason] - Why value is invalid.\n * @returns {Error} instance detailing the error condition\n */\nfunction createInvalidArgumentValueError(message, argument, value, reason) {\n var err = new TypeError(message);\n err.code = constants.INVALID_ARG_VALUE;\n err.argument = argument;\n err.value = value;\n err.reason = typeof reason !== \"undefined\" ? reason : \"is invalid\";\n return err;\n}\n\n/**\n * Creates an error object to be thrown when an exception was caught, but the `Error` is falsy or undefined.\n *\n * @public\n * @static\n * @param {string} message - Error message to be displayed.\n * @returns {Error} instance detailing the error condition\n */\nfunction createInvalidExceptionError(message, value) {\n var err = new Error(message);\n err.code = constants.INVALID_EXCEPTION;\n err.valueType = typeof value;\n err.value = value;\n return err;\n}\n\n/**\n * Creates an error object to be thrown when an unrecoverable error occurs.\n *\n * @public\n * @static\n * @param {string} message - Error message to be displayed.\n * @returns {Error} instance detailing the error condition\n */\nfunction createFatalError(message, value) {\n var err = new Error(message);\n err.code = constants.FATAL;\n err.valueType = typeof value;\n err.value = value;\n return err;\n}\n\n/**\n * Dynamically creates a plugin-type-specific error based on plugin type\n * @param {string} message - Error message\n * @param {\"reporter\"|\"ui\"} pluginType - Plugin type. Future: expand as needed\n * @param {string} [pluginId] - Name/path of plugin, if any\n * @throws When `pluginType` is not known\n * @public\n * @static\n * @returns {Error}\n */\nfunction createInvalidLegacyPluginError(message, pluginType, pluginId) {\n switch (pluginType) {\n case \"reporter\":\n return createInvalidReporterError(message, pluginId);\n case \"ui\":\n return createInvalidInterfaceError(message, pluginId);\n default:\n throw new Error('unknown pluginType \"' + pluginType + '\"');\n }\n}\n\n/**\n * **DEPRECATED**. Use {@link createInvalidLegacyPluginError} instead Dynamically creates a plugin-type-specific error based on plugin type\n * @deprecated\n * @param {string} message - Error message\n * @param {\"reporter\"|\"interface\"} pluginType - Plugin type. Future: expand as needed\n * @param {string} [pluginId] - Name/path of plugin, if any\n * @throws When `pluginType` is not known\n * @public\n * @static\n * @returns {Error}\n */\nfunction createInvalidPluginError(...args) {\n deprecate(\"Use createInvalidLegacyPluginError() instead\");\n return createInvalidLegacyPluginError(...args);\n}\n\n/**\n * Creates an error object to be thrown when a mocha object's `run` method is executed while it is already disposed.\n * @param {string} message The error message to be displayed.\n * @param {boolean} cleanReferencesAfterRun the value of `cleanReferencesAfterRun`\n * @param {Mocha} instance the mocha instance that throw this error\n * @static\n */\nfunction createMochaInstanceAlreadyDisposedError(\n message,\n cleanReferencesAfterRun,\n instance,\n) {\n var err = new Error(message);\n err.code = constants.INSTANCE_ALREADY_DISPOSED;\n err.cleanReferencesAfterRun = cleanReferencesAfterRun;\n err.instance = instance;\n return err;\n}\n\n/**\n * Creates an error object to be thrown when a mocha object's `run` method is called while a test run is in progress.\n * @param {string} message The error message to be displayed.\n * @static\n * @public\n */\nfunction createMochaInstanceAlreadyRunningError(message, instance) {\n var err = new Error(message);\n err.code = constants.INSTANCE_ALREADY_RUNNING;\n err.instance = instance;\n return err;\n}\n\n/**\n * Creates an error object to be thrown when done() is called multiple times in a test\n *\n * @public\n * @param {Runnable} runnable - Original runnable\n * @param {Error} [originalErr] - Original error, if any\n * @returns {Error} instance detailing the error condition\n * @static\n */\nfunction createMultipleDoneError(runnable, originalErr) {\n var title;\n try {\n title = format(\"<%s>\", runnable.fullTitle());\n if (runnable.parent.root) {\n title += \" (of root suite)\";\n }\n } catch (ignored) {\n title = format(\"<%s> (of unknown suite)\", runnable.title);\n }\n var message = format(\n \"done() called multiple times in %s %s\",\n runnable.type ? runnable.type : \"unknown runnable\",\n title,\n );\n if (runnable.file) {\n message += format(\" of file %s\", runnable.file);\n }\n if (originalErr) {\n message += format(\"; in addition, done() received error: %s\", originalErr);\n }\n\n var err = new Error(message);\n err.code = constants.MULTIPLE_DONE;\n err.valueType = typeof originalErr;\n err.value = originalErr;\n return err;\n}\n\n/**\n * Creates an error object to be thrown when `.only()` is used with\n * `--forbid-only`.\n * @static\n * @public\n * @param {Mocha} mocha - Mocha instance\n * @returns {Error} Error with code {@link constants.FORBIDDEN_EXCLUSIVITY}\n */\nfunction createForbiddenExclusivityError(mocha) {\n var err = new Error(\n mocha.isWorker\n ? \"`.only` is not supported in parallel mode\"\n : \"`.only` forbidden by --forbid-only\",\n );\n err.code = constants.FORBIDDEN_EXCLUSIVITY;\n return err;\n}\n\n/**\n * Creates an error object to be thrown when a plugin definition is invalid\n * @static\n * @param {string} msg - Error message\n * @param {PluginDefinition} [pluginDef] - Problematic plugin definition\n * @public\n * @returns {Error} Error with code {@link constants.INVALID_PLUGIN_DEFINITION}\n */\nfunction createInvalidPluginDefinitionError(msg, pluginDef) {\n const err = new Error(msg);\n err.code = constants.INVALID_PLUGIN_DEFINITION;\n err.pluginDef = pluginDef;\n return err;\n}\n\n/**\n * Creates an error object to be thrown when a plugin implementation (user code) is invalid\n * @static\n * @param {string} msg - Error message\n * @param {Object} [opts] - Plugin definition and user-supplied implementation\n * @param {PluginDefinition} [opts.pluginDef] - Plugin Definition\n * @param {*} [opts.pluginImpl] - Plugin Implementation (user-supplied)\n * @public\n * @returns {Error} Error with code {@link constants.INVALID_PLUGIN_DEFINITION}\n */\nfunction createInvalidPluginImplementationError(\n msg,\n { pluginDef, pluginImpl } = {},\n) {\n const err = new Error(msg);\n err.code = constants.INVALID_PLUGIN_IMPLEMENTATION;\n err.pluginDef = pluginDef;\n err.pluginImpl = pluginImpl;\n return err;\n}\n\n/**\n * Creates an error object to be thrown when a runnable exceeds its allowed run time.\n * @static\n * @param {string} msg - Error message\n * @param {number} [timeout] - Timeout in ms\n * @param {string} [file] - File, if given\n * @returns {MochaTimeoutError}\n */\nfunction createTimeoutError(msg, timeout, file) {\n const err = new Error(msg);\n err.code = constants.TIMEOUT;\n err.timeout = timeout;\n err.file = file;\n return err;\n}\n\n/**\n * Creates an error object to be thrown when file is unparsable\n * @public\n * @static\n * @param {string} message - Error message to be displayed.\n * @returns {Error} Error with code {@link constants.UNPARSABLE_FILE}\n */\nfunction createUnparsableFileError(message) {\n var err = new Error(message);\n err.code = constants.UNPARSABLE_FILE;\n return err;\n}\n\n/**\n * Returns `true` if an error came out of Mocha.\n * _Can suffer from false negatives, but not false positives._\n * @static\n * @public\n * @param {*} err - Error, or anything\n * @returns {boolean}\n */\nconst isMochaError = (err) =>\n Boolean(err && typeof err === \"object\" && MOCHA_ERRORS.has(err.code));\n\nmodule.exports = {\n createFatalError,\n createForbiddenExclusivityError,\n createInvalidArgumentTypeError,\n createInvalidArgumentValueError,\n createInvalidExceptionError,\n createInvalidInterfaceError,\n createInvalidLegacyPluginError,\n createInvalidPluginDefinitionError,\n createInvalidPluginError,\n createInvalidPluginImplementationError,\n createInvalidReporterError,\n createMissingArgumentError,\n createMochaInstanceAlreadyDisposedError,\n createMochaInstanceAlreadyRunningError,\n createMultipleDoneError,\n createNoFilesMatchPatternError,\n createTimeoutError,\n createUnparsableFileError,\n createUnsupportedError,\n deprecate,\n isMochaError,\n warn,\n};\n","\"use strict\";\n\nvar EventEmitter = require(\"node:events\").EventEmitter;\nvar Pending = require(\"./pending\");\nvar debug = require(\"debug\")(\"mocha:runnable\");\nvar milliseconds = require(\"ms\");\nvar utils = require(\"./utils\");\nconst {\n createInvalidExceptionError,\n createMultipleDoneError,\n createTimeoutError,\n} = require(\"./errors\");\n\n/**\n * Save timer references to avoid Sinon interfering (see GH-237).\n * @private\n */\nvar Date = global.Date;\nvar setTimeout = global.setTimeout;\nvar clearTimeout = global.clearTimeout;\nvar toString = Object.prototype.toString;\n\nvar MAX_TIMEOUT = Math.pow(2, 31) - 1;\n\nmodule.exports = Runnable;\n\n// \"Additional properties\" doc comment added for hosted docs (mochajs.org/api)\n/**\n * Initialize a new `Runnable` with the given `title` and callback `fn`.\n * Additional properties, like `getFullTitle()` and `slow()`, can be viewed in the `Runnable` source.\n *\n * @class\n * @extends external:EventEmitter\n * @public\n * @param {String} title\n * @param {Function} fn\n */\nfunction Runnable(title, fn) {\n this.title = title;\n this.fn = fn;\n this.body = (fn || \"\").toString();\n this.async = fn && fn.length;\n this.sync = !this.async;\n this._timeout = 2000;\n this._slow = 75;\n this._retries = -1;\n utils.assignNewMochaID(this);\n Object.defineProperty(this, \"id\", {\n get() {\n return utils.getMochaID(this);\n },\n });\n this.reset();\n}\n\n/**\n * Inherit from `EventEmitter.prototype`.\n */\nutils.inherits(Runnable, EventEmitter);\n\n/**\n * Resets the state initially or for a next run.\n */\nRunnable.prototype.reset = function () {\n this.timedOut = false;\n this._currentRetry = 0;\n this.pending = false;\n delete this.state;\n delete this.err;\n};\n\n/**\n * Get current timeout value in msecs.\n *\n * @private\n * @returns {number} current timeout threshold value\n */\n/**\n * @summary\n * Set timeout threshold value (msecs).\n *\n * @description\n * A string argument can use shorthand (e.g., \"2s\") and will be converted.\n * The value will be clamped to range [0, 2^31-1].\n * If clamped value matches either range endpoint, timeouts will be disabled.\n *\n * @private\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setTimeout#Maximum_delay_value}\n * @param {number|string} ms - Timeout threshold value.\n * @returns {Runnable} this\n * @chainable\n */\nRunnable.prototype.timeout = function (ms) {\n if (!arguments.length) {\n return this._timeout;\n }\n if (typeof ms === \"string\") {\n ms = milliseconds(ms);\n }\n\n // Clamp to range\n var range = [0, MAX_TIMEOUT];\n ms = utils.clamp(ms, range);\n\n // see #1652 for reasoning\n if (ms === range[0] || ms === range[1]) {\n this._timeout = 0;\n } else {\n this._timeout = ms;\n }\n debug(\"timeout %d\", this._timeout);\n\n if (this.timer) {\n this.resetTimeout();\n }\n return this;\n};\n\n/**\n * Set or get slow `ms`.\n *\n * @private\n * @param {number|string} ms\n * @return {Runnable|number} ms or Runnable instance.\n */\nRunnable.prototype.slow = function (ms) {\n if (!arguments.length || typeof ms === \"undefined\") {\n return this._slow;\n }\n if (typeof ms === \"string\") {\n ms = milliseconds(ms);\n }\n debug(\"slow %d\", ms);\n this._slow = ms;\n return this;\n};\n\n/**\n * Halt and mark as pending.\n *\n * @memberof Mocha.Runnable\n * @public\n */\nRunnable.prototype.skip = function () {\n this.pending = true;\n throw new Pending(\"sync skip; aborting execution\");\n};\n\n/**\n * Check if this runnable or its parent suite is marked as pending.\n *\n * @private\n */\nRunnable.prototype.isPending = function () {\n return this.pending || (this.parent && this.parent.isPending());\n};\n\n/**\n * Return `true` if this Runnable has failed.\n * @return {boolean}\n * @private\n */\nRunnable.prototype.isFailed = function () {\n return !this.isPending() && this.state === constants.STATE_FAILED;\n};\n\n/**\n * Return `true` if this Runnable has passed.\n * @return {boolean}\n * @private\n */\nRunnable.prototype.isPassed = function () {\n return !this.isPending() && this.state === constants.STATE_PASSED;\n};\n\n/**\n * Set or get number of retries.\n *\n * @private\n */\nRunnable.prototype.retries = function (n) {\n if (!arguments.length) {\n return this._retries;\n }\n this._retries = n;\n};\n\n/**\n * Set or get current retry\n *\n * @private\n */\nRunnable.prototype.currentRetry = function (n) {\n if (!arguments.length) {\n return this._currentRetry;\n }\n this._currentRetry = n;\n};\n\n/**\n * Return the full title generated by recursively concatenating the parent's\n * full title.\n *\n * @memberof Mocha.Runnable\n * @public\n * @return {string}\n */\nRunnable.prototype.fullTitle = function () {\n return this.titlePath().join(\" \");\n};\n\n/**\n * Return the title path generated by concatenating the parent's title path with the title.\n *\n * @memberof Mocha.Runnable\n * @public\n * @return {string[]}\n */\nRunnable.prototype.titlePath = function () {\n return this.parent.titlePath().concat([this.title]);\n};\n\n/**\n * Clear the timeout.\n *\n * @private\n */\nRunnable.prototype.clearTimeout = function () {\n clearTimeout(this.timer);\n};\n\n/**\n * Reset the timeout.\n *\n * @private\n */\nRunnable.prototype.resetTimeout = function () {\n var self = this;\n var ms = this.timeout() || MAX_TIMEOUT;\n\n this.clearTimeout();\n this.timer = setTimeout(function () {\n if (self.timeout() === 0) {\n return;\n }\n self.callback(self._timeoutError(ms));\n self.timedOut = true;\n }, ms);\n};\n\n/**\n * Set or get a list of whitelisted globals for this test run.\n *\n * @private\n * @param {string[]} globals\n */\nRunnable.prototype.globals = function (globals) {\n if (!arguments.length) {\n return this._allowedGlobals;\n }\n this._allowedGlobals = globals;\n};\n\n/**\n * Run the test and invoke `fn(err)`.\n *\n * @param {Function} fn\n * @private\n */\nRunnable.prototype.run = function (fn) {\n var self = this;\n var start = new Date();\n var ctx = this.ctx;\n var finished;\n var errorWasHandled = false;\n\n if (this.isPending()) return fn();\n\n // Sometimes the ctx exists, but it is not runnable\n if (ctx && ctx.runnable) {\n ctx.runnable(this);\n }\n\n // called multiple times\n function multiple(err) {\n if (errorWasHandled) {\n return;\n }\n errorWasHandled = true;\n self.emit(\"error\", createMultipleDoneError(self, err));\n }\n\n // finished\n function done(err) {\n var ms = self.timeout();\n if (self.timedOut) {\n return;\n }\n\n if (finished) {\n return multiple(err);\n }\n\n self.clearTimeout();\n self.duration = new Date() - start;\n finished = true;\n if (!err && self.duration > ms && ms > 0) {\n err = self._timeoutError(ms);\n }\n fn(err);\n }\n\n // for .resetTimeout() and Runner#uncaught()\n this.callback = done;\n\n if (this.fn && typeof this.fn.call !== \"function\") {\n done(\n new TypeError(\n \"A runnable must be passed a function as its second argument.\",\n ),\n );\n return;\n }\n\n // explicit async with `done` argument\n if (this.async) {\n this.resetTimeout();\n\n // allows skip() to be used in an explicit async context\n this.skip = function asyncSkip() {\n this.pending = true;\n done();\n // halt execution, the uncaught handler will ignore the failure.\n throw new Pending(\"async skip; aborting execution\");\n };\n\n try {\n callFnAsync(this.fn);\n } catch (err) {\n // handles async runnables which actually run synchronously\n errorWasHandled = true;\n if (err instanceof Pending) {\n return; // done() is already called in this.skip()\n } else if (this.allowUncaught) {\n throw err;\n }\n done(Runnable.toValueOrError(err));\n }\n return;\n }\n\n // sync or promise-returning\n try {\n callFn(this.fn);\n } catch (err) {\n errorWasHandled = true;\n if (err instanceof Pending) {\n return done();\n } else if (this.allowUncaught) {\n throw err;\n }\n done(Runnable.toValueOrError(err));\n }\n\n function callFn(fn) {\n var result = fn.call(ctx);\n if (result && typeof result.then === \"function\") {\n self.resetTimeout();\n result.then(\n function () {\n done();\n // Return null so libraries like bluebird do not warn about\n // subsequently constructed Promises.\n return null;\n },\n function (reason) {\n done(reason || new Error(\"Promise rejected with no or falsy reason\"));\n },\n );\n } else {\n if (self.asyncOnly) {\n return done(\n new Error(\n \"--async-only option in use without declaring `done()` or returning a promise\",\n ),\n );\n }\n\n done();\n }\n }\n\n function callFnAsync(fn) {\n var result = fn.call(ctx, function (err) {\n if (err instanceof Error || toString.call(err) === \"[object Error]\") {\n return done(err);\n }\n if (err) {\n if (Object.prototype.toString.call(err) === \"[object Object]\") {\n return done(\n new Error(\"done() invoked with non-Error: \" + JSON.stringify(err)),\n );\n }\n return done(new Error(\"done() invoked with non-Error: \" + err));\n }\n if (result && utils.isPromise(result)) {\n return done(\n new Error(\n \"Resolution method is overspecified. Specify a callback *or* return a Promise; not both.\",\n ),\n );\n }\n\n done();\n });\n }\n};\n\n/**\n * Instantiates a \"timeout\" error\n *\n * @param {number} ms - Timeout (in milliseconds)\n * @returns {Error} a \"timeout\" error\n * @private\n */\nRunnable.prototype._timeoutError = function (ms) {\n let msg = `Timeout of ${ms}ms exceeded. For async tests and hooks, ensure \"done()\" is called; if returning a Promise, ensure it resolves.`;\n if (this.file) {\n msg += \" (\" + this.file + \")\";\n }\n return createTimeoutError(msg, ms, this.file);\n};\n\nvar constants = utils.defineConstants(\n /**\n * {@link Runnable}-related constants.\n * @public\n * @memberof Runnable\n * @readonly\n * @static\n * @alias constants\n * @enum {string}\n */\n {\n /**\n * Value of `state` prop when a `Runnable` has failed\n */\n STATE_FAILED: \"failed\",\n /**\n * Value of `state` prop when a `Runnable` has passed\n */\n STATE_PASSED: \"passed\",\n /**\n * Value of `state` prop when a `Runnable` has been skipped by user\n */\n STATE_PENDING: \"pending\",\n },\n);\n\n/**\n * Given `value`, return identity if truthy, otherwise create an \"invalid exception\" error and return that.\n * @param {*} [value] - Value to return, if present\n * @returns {*|Error} `value`, otherwise an `Error`\n * @private\n */\nRunnable.toValueOrError = function (value) {\n return (\n value ||\n createInvalidExceptionError(\n \"Runnable failed with falsy or undefined exception. Please throw an Error instead.\",\n value,\n )\n );\n};\n\nRunnable.constants = constants;\n","\"use strict\";\n\nvar Runnable = require(\"./runnable\");\nconst { inherits, constants } = require(\"./utils\");\nconst { MOCHA_ID_PROP_NAME } = constants;\n\n/**\n * Expose `Hook`.\n */\n\nmodule.exports = Hook;\n\n/**\n * Initialize a new `Hook` with the given `title` and callback `fn`\n *\n * @class\n * @extends Runnable\n * @param {String} title\n * @param {Function} fn\n */\nfunction Hook(title, fn) {\n Runnable.call(this, title, fn);\n this.type = \"hook\";\n}\n\n/**\n * Inherit from `Runnable.prototype`.\n */\ninherits(Hook, Runnable);\n\n/**\n * Resets the state for a next run.\n */\nHook.prototype.reset = function () {\n Runnable.prototype.reset.call(this);\n delete this._error;\n};\n\n/**\n * Get or set the test `err`.\n *\n * @memberof Hook\n * @public\n * @param {Error} err\n * @return {Error}\n */\nHook.prototype.error = function (err) {\n if (!arguments.length) {\n err = this._error;\n this._error = null;\n return err;\n }\n\n this._error = err;\n};\n\n/**\n * Returns an object suitable for IPC.\n * Functions are represented by keys beginning with `$$`.\n * @private\n * @returns {Object}\n */\nHook.prototype.serialize = function serialize() {\n return {\n $$currentRetry: this.currentRetry(),\n $$fullTitle: this.fullTitle(),\n $$isPending: Boolean(this.isPending()),\n $$titlePath: this.titlePath(),\n ctx:\n this.ctx && this.ctx.currentTest\n ? {\n currentTest: {\n title: this.ctx.currentTest.title,\n [MOCHA_ID_PROP_NAME]: this.ctx.currentTest.id,\n },\n }\n : {},\n duration: this.duration,\n file: this.file,\n parent: {\n $$fullTitle: this.parent.fullTitle(),\n [MOCHA_ID_PROP_NAME]: this.parent.id,\n },\n state: this.state,\n title: this.title,\n type: this.type,\n [MOCHA_ID_PROP_NAME]: this.id,\n };\n};\n","\"use strict\";\n\n/**\n * @typedef {import('./test.js')} Test\n */\n\n/**\n * Module dependencies.\n * @private\n */\nconst { EventEmitter } = require(\"node:events\");\nconst Hook = require(\"./hook\");\nvar {\n assignNewMochaID,\n clamp,\n constants: utilsConstants,\n defineConstants,\n getMochaID,\n inherits,\n isString,\n} = require(\"./utils\");\nconst debug = require(\"debug\")(\"mocha:suite\");\nconst milliseconds = require(\"ms\");\nconst errors = require(\"./errors\");\n\nconst { MOCHA_ID_PROP_NAME } = utilsConstants;\n\n/**\n * Expose `Suite`.\n */\n\nexports = module.exports = Suite;\n\n/**\n * Create a new `Suite` with the given `title` and parent `Suite`.\n *\n * @public\n * @param {Suite} parent - Parent suite (required!)\n * @param {string} title - Title\n * @return {Suite}\n */\nSuite.create = function (parent, title) {\n var suite = new Suite(title, parent.ctx);\n suite.parent = parent;\n title = suite.fullTitle();\n parent.addSuite(suite);\n return suite;\n};\n\n/**\n * Constructs a new `Suite` instance with the given `title`, `ctx`, and `isRoot`.\n *\n * @public\n * @class\n * @extends EventEmitter\n * @see {@link https://nodejs.org/api/events.html#events_class_eventemitter|EventEmitter}\n * @param {string} title - Suite title.\n * @param {Context} parentContext - Parent context instance.\n * @param {boolean} [isRoot=false] - Whether this is the root suite.\n */\nfunction Suite(title, parentContext, isRoot) {\n if (!isString(title)) {\n throw errors.createInvalidArgumentTypeError(\n 'Suite argument \"title\" must be a string. Received type \"' +\n typeof title +\n '\"',\n \"title\",\n \"string\",\n );\n }\n this.title = title;\n function Context() {}\n Context.prototype = parentContext;\n this.ctx = new Context();\n this.suites = [];\n this.tests = [];\n this.root = isRoot === true;\n this.pending = false;\n this._retries = -1;\n this._beforeEach = [];\n this._beforeAll = [];\n this._afterEach = [];\n this._afterAll = [];\n this._timeout = 2000;\n this._slow = 75;\n this._bail = false;\n this._onlyTests = [];\n this._onlySuites = [];\n assignNewMochaID(this);\n\n Object.defineProperty(this, \"id\", {\n get() {\n return getMochaID(this);\n },\n });\n\n this.reset();\n}\n\n/**\n * Inherit from `EventEmitter.prototype`.\n */\ninherits(Suite, EventEmitter);\n\n/**\n * Resets the state initially or for a next run.\n */\nSuite.prototype.reset = function () {\n this.delayed = false;\n function doReset(thingToReset) {\n thingToReset.reset();\n }\n this.suites.forEach(doReset);\n this.tests.forEach(doReset);\n this._beforeEach.forEach(doReset);\n this._afterEach.forEach(doReset);\n this._beforeAll.forEach(doReset);\n this._afterAll.forEach(doReset);\n};\n\n/**\n * Return a clone of this `Suite`.\n *\n * @private\n * @return {Suite}\n */\nSuite.prototype.clone = function () {\n var suite = new Suite(this.title);\n debug(\"clone\");\n suite.ctx = this.ctx;\n suite.root = this.root;\n suite.timeout(this.timeout());\n suite.retries(this.retries());\n suite.slow(this.slow());\n suite.bail(this.bail());\n return suite;\n};\n\n/**\n * Set or get timeout `ms` or short-hand such as \"2s\".\n *\n * @private\n * @todo Do not attempt to set value if `ms` is undefined\n * @param {number|string} ms\n * @return {Suite|number} for chaining\n */\nSuite.prototype.timeout = function (ms) {\n if (!arguments.length) {\n return this._timeout;\n }\n if (typeof ms === \"string\") {\n ms = milliseconds(ms);\n }\n\n // Clamp to range\n var INT_MAX = Math.pow(2, 31) - 1;\n var range = [0, INT_MAX];\n ms = clamp(ms, range);\n\n debug(\"timeout %d\", ms);\n this._timeout = parseInt(ms, 10);\n\n // Allow overriding inner/nested suites\n // See and test-cases with chain-called timeout argument.\n // https://github.com/mochajs/mocha/issues/5422\n for (const t of this.tests) {\n t.timeout(this._timeout);\n }\n for (const s of this.suites) {\n s.timeout(this._timeout);\n }\n return this;\n};\n\n/**\n * Set or get number of times to retry a failed test.\n *\n * @private\n * @param {number|string} n\n * @return {Suite|number} for chaining\n */\nSuite.prototype.retries = function (n) {\n if (!arguments.length) {\n return this._retries;\n }\n debug(\"retries %d\", n);\n this._retries = parseInt(n, 10) || 0;\n return this;\n};\n\n/**\n * Set or get slow `ms` or short-hand such as \"2s\".\n *\n * @private\n * @param {number|string} ms\n * @return {Suite|number} for chaining\n */\nSuite.prototype.slow = function (ms) {\n if (!arguments.length) {\n return this._slow;\n }\n if (typeof ms === \"string\") {\n ms = milliseconds(ms);\n }\n debug(\"slow %d\", ms);\n this._slow = ms;\n return this;\n};\n\n/**\n * Set or get whether to bail after first error.\n *\n * @private\n * @param {boolean} bail\n * @return {Suite|number} for chaining\n */\nSuite.prototype.bail = function (bail) {\n if (!arguments.length) {\n return this._bail;\n }\n debug(\"bail %s\", bail);\n this._bail = bail;\n return this;\n};\n\n/**\n * Check if this suite or its parent suite is marked as pending.\n *\n * @private\n */\nSuite.prototype.isPending = function () {\n return this.pending || (this.parent && this.parent.isPending());\n};\n\n/**\n * Generic hook-creator.\n * @private\n * @param {string} title - Title of hook\n * @param {Function} fn - Hook callback\n * @returns {Hook} A new hook\n */\nSuite.prototype._createHook = function (title, fn) {\n var hook = new Hook(title, fn);\n hook.parent = this;\n hook.timeout(this.timeout());\n hook.retries(this.retries());\n hook.slow(this.slow());\n hook.ctx = this.ctx;\n hook.file = this.file;\n return hook;\n};\n\n/**\n * Run `fn(test[, done])` before running tests.\n *\n * @private\n * @param {string} title\n * @param {Function} fn\n * @return {Suite} for chaining\n */\nSuite.prototype.beforeAll = function (title, fn) {\n if (this.isPending()) {\n return this;\n }\n if (typeof title === \"function\") {\n fn = title;\n title = fn.name;\n }\n title = '\"before all\" hook' + (title ? \": \" + title : \"\");\n\n var hook = this._createHook(title, fn);\n this._beforeAll.push(hook);\n this.emit(constants.EVENT_SUITE_ADD_HOOK_BEFORE_ALL, hook);\n return hook;\n};\n\n/**\n * Run `fn(test[, done])` after running tests.\n *\n * @private\n * @param {string} title\n * @param {Function} fn\n * @return {Suite} for chaining\n */\nSuite.prototype.afterAll = function (title, fn) {\n if (this.isPending()) {\n return this;\n }\n if (typeof title === \"function\") {\n fn = title;\n title = fn.name;\n }\n title = '\"after all\" hook' + (title ? \": \" + title : \"\");\n\n var hook = this._createHook(title, fn);\n this._afterAll.push(hook);\n this.emit(constants.EVENT_SUITE_ADD_HOOK_AFTER_ALL, hook);\n return hook;\n};\n\n/**\n * Run `fn(test[, done])` before each test case.\n *\n * @private\n * @param {string} title\n * @param {Function} fn\n * @return {Suite} for chaining\n */\nSuite.prototype.beforeEach = function (title, fn) {\n if (this.isPending()) {\n return this;\n }\n if (typeof title === \"function\") {\n fn = title;\n title = fn.name;\n }\n title = '\"before each\" hook' + (title ? \": \" + title : \"\");\n\n var hook = this._createHook(title, fn);\n this._beforeEach.push(hook);\n this.emit(constants.EVENT_SUITE_ADD_HOOK_BEFORE_EACH, hook);\n return hook;\n};\n\n/**\n * Run `fn(test[, done])` after each test case.\n *\n * @private\n * @param {string} title\n * @param {Function} fn\n * @return {Suite} for chaining\n */\nSuite.prototype.afterEach = function (title, fn) {\n if (this.isPending()) {\n return this;\n }\n if (typeof title === \"function\") {\n fn = title;\n title = fn.name;\n }\n title = '\"after each\" hook' + (title ? \": \" + title : \"\");\n\n var hook = this._createHook(title, fn);\n this._afterEach.push(hook);\n this.emit(constants.EVENT_SUITE_ADD_HOOK_AFTER_EACH, hook);\n return hook;\n};\n\n/**\n * Add a test `suite`.\n *\n * @private\n * @param {Suite} suite\n * @return {Suite} for chaining\n */\nSuite.prototype.addSuite = function (suite) {\n suite.parent = this;\n suite.root = false;\n suite.timeout(this.timeout());\n suite.retries(this.retries());\n suite.slow(this.slow());\n suite.bail(this.bail());\n this.suites.push(suite);\n this.emit(constants.EVENT_SUITE_ADD_SUITE, suite);\n return this;\n};\n\n/**\n * Add a `test` to this suite.\n *\n * @private\n * @param {Test} test\n * @return {Suite} for chaining\n */\nSuite.prototype.addTest = function (test) {\n test.parent = this;\n test.timeout(this.timeout());\n test.retries(this.retries());\n test.slow(this.slow());\n test.ctx = this.ctx;\n this.tests.push(test);\n this.emit(constants.EVENT_SUITE_ADD_TEST, test);\n return this;\n};\n\n/**\n * Return the full title generated by recursively concatenating the parent's\n * full title.\n *\n * @memberof Suite\n * @public\n * @return {string}\n */\nSuite.prototype.fullTitle = function () {\n return this.titlePath().join(\" \");\n};\n\n/**\n * Return the title path generated by recursively concatenating the parent's\n * title path.\n *\n * @memberof Suite\n * @public\n * @return {string[]}\n */\nSuite.prototype.titlePath = function () {\n var result = [];\n if (this.parent) {\n result = result.concat(this.parent.titlePath());\n }\n if (!this.root) {\n result.push(this.title);\n }\n return result;\n};\n\n/**\n * Return the total number of tests.\n *\n * @memberof Suite\n * @public\n * @return {number}\n */\nSuite.prototype.total = function () {\n return (\n this.suites.reduce(function (sum, suite) {\n return sum + suite.total();\n }, 0) + this.tests.length\n );\n};\n\n/**\n * Iterates through each suite recursively to find all tests. Applies a\n * function in the format `fn(test)`.\n *\n * @private\n * @param {Function} fn\n * @return {Suite}\n */\nSuite.prototype.eachTest = function (fn) {\n this.tests.forEach(fn);\n this.suites.forEach(function (suite) {\n suite.eachTest(fn);\n });\n return this;\n};\n\n/**\n * This will run the root suite if we happen to be running in delayed mode.\n * @private\n */\nSuite.prototype.run = function run() {\n if (this.root) {\n this.emit(constants.EVENT_ROOT_SUITE_RUN);\n }\n};\n\n/**\n * Determines whether a suite has an `only` test or suite as a descendant.\n *\n * @private\n * @returns {Boolean}\n */\nSuite.prototype.hasOnly = function hasOnly() {\n return (\n this._onlyTests.length > 0 ||\n this._onlySuites.length > 0 ||\n this.suites.some(function (suite) {\n return suite.hasOnly();\n })\n );\n};\n\n/**\n * Filter suites based on `isOnly` logic.\n *\n * @private\n * @returns {Boolean}\n */\nSuite.prototype.filterOnly = function filterOnly() {\n if (this._onlyTests.length) {\n // If the suite contains `only` tests, run those and ignore any nested suites.\n this.tests = this._onlyTests;\n this.suites = [];\n } else {\n // Otherwise, do not run any of the tests in this suite.\n this.tests = [];\n this._onlySuites.forEach(function (onlySuite) {\n // If there are other `only` tests/suites nested in the current `only` suite, then filter that `only` suite.\n // Otherwise, all of the tests on this `only` suite should be run, so don't filter it.\n if (onlySuite.hasOnly()) {\n onlySuite.filterOnly();\n }\n });\n // Run the `only` suites, as well as any other suites that have `only` tests/suites as descendants.\n var onlySuites = this._onlySuites;\n this.suites = this.suites.filter(function (childSuite) {\n return onlySuites.indexOf(childSuite) !== -1 || childSuite.filterOnly();\n });\n }\n // Keep the suite only if there is something to run\n return this.tests.length > 0 || this.suites.length > 0;\n};\n\n/**\n * Adds a suite to the list of subsuites marked `only`.\n *\n * @private\n * @param {Suite} suite\n */\nSuite.prototype.appendOnlySuite = function (suite) {\n this._onlySuites.push(suite);\n};\n\n/**\n * Marks a suite to be `only`.\n *\n * @private\n */\nSuite.prototype.markOnly = function () {\n this.parent && this.parent.appendOnlySuite(this);\n};\n\n/**\n * Adds a test to the list of tests marked `only`.\n *\n * @private\n * @param {Test} test\n */\nSuite.prototype.appendOnlyTest = function (test) {\n this._onlyTests.push(test);\n};\n\n/**\n * Returns the array of hooks by hook name; see `HOOK_TYPE_*` constants.\n * @private\n */\nSuite.prototype.getHooks = function getHooks(name) {\n return this[\"_\" + name];\n};\n\n/**\n * cleans all references from this suite and all child suites.\n */\nSuite.prototype.dispose = function () {\n this.suites.forEach(function (suite) {\n suite.dispose();\n });\n this.cleanReferences();\n};\n\n/**\n * Cleans up the references to all the deferred functions\n * (before/after/beforeEach/afterEach) and tests of a Suite.\n * These must be deleted otherwise a memory leak can happen,\n * as those functions may reference variables from closures,\n * thus those variables can never be garbage collected as long\n * as the deferred functions exist.\n *\n * @private\n */\nSuite.prototype.cleanReferences = function cleanReferences() {\n function cleanArrReferences(arr) {\n for (var i = 0; i < arr.length; i++) {\n delete arr[i].fn;\n }\n }\n\n if (Array.isArray(this._beforeAll)) {\n cleanArrReferences(this._beforeAll);\n }\n\n if (Array.isArray(this._beforeEach)) {\n cleanArrReferences(this._beforeEach);\n }\n\n if (Array.isArray(this._afterAll)) {\n cleanArrReferences(this._afterAll);\n }\n\n if (Array.isArray(this._afterEach)) {\n cleanArrReferences(this._afterEach);\n }\n\n for (var i = 0; i < this.tests.length; i++) {\n delete this.tests[i].fn;\n }\n};\n\n/**\n * Returns an object suitable for IPC.\n * Functions are represented by keys beginning with `$$`.\n * @private\n * @returns {Object}\n */\nSuite.prototype.serialize = function serialize() {\n return {\n _bail: this._bail,\n $$fullTitle: this.fullTitle(),\n $$isPending: Boolean(this.isPending()),\n root: this.root,\n title: this.title,\n [MOCHA_ID_PROP_NAME]: this.id,\n parent: this.parent ? { [MOCHA_ID_PROP_NAME]: this.parent.id } : null,\n };\n};\n\nvar constants = defineConstants(\n /**\n * {@link Suite}-related constants.\n * @public\n * @memberof Suite\n * @alias constants\n * @readonly\n * @static\n * @enum {string}\n */\n {\n /**\n * Event emitted after a test file has been loaded. Not emitted in browser.\n */\n EVENT_FILE_POST_REQUIRE: \"post-require\",\n /**\n * Event emitted before a test file has been loaded. In browser, this is emitted once an interface has been selected.\n */\n EVENT_FILE_PRE_REQUIRE: \"pre-require\",\n /**\n * Event emitted immediately after a test file has been loaded. Not emitted in browser.\n */\n EVENT_FILE_REQUIRE: \"require\",\n /**\n * Event emitted when `global.run()` is called (use with `delay` option).\n */\n EVENT_ROOT_SUITE_RUN: \"run\",\n\n /**\n * Namespace for collection of a `Suite`'s \"after all\" hooks.\n */\n HOOK_TYPE_AFTER_ALL: \"afterAll\",\n /**\n * Namespace for collection of a `Suite`'s \"after each\" hooks.\n */\n HOOK_TYPE_AFTER_EACH: \"afterEach\",\n /**\n * Namespace for collection of a `Suite`'s \"before all\" hooks.\n */\n HOOK_TYPE_BEFORE_ALL: \"beforeAll\",\n /**\n * Namespace for collection of a `Suite`'s \"before each\" hooks.\n */\n HOOK_TYPE_BEFORE_EACH: \"beforeEach\",\n\n /**\n * Emitted after a child `Suite` has been added to a `Suite`.\n */\n EVENT_SUITE_ADD_SUITE: \"suite\",\n /**\n * Emitted after an \"after all\" `Hook` has been added to a `Suite`.\n */\n EVENT_SUITE_ADD_HOOK_AFTER_ALL: \"afterAll\",\n /**\n * Emitted after an \"after each\" `Hook` has been added to a `Suite`.\n */\n EVENT_SUITE_ADD_HOOK_AFTER_EACH: \"afterEach\",\n /**\n * Emitted after an \"before all\" `Hook` has been added to a `Suite`.\n */\n EVENT_SUITE_ADD_HOOK_BEFORE_ALL: \"beforeAll\",\n /**\n * Emitted after an \"before each\" `Hook` has been added to a `Suite`.\n */\n EVENT_SUITE_ADD_HOOK_BEFORE_EACH: \"beforeEach\",\n /**\n * Emitted after a `Test` has been added to a `Suite`.\n */\n EVENT_SUITE_ADD_TEST: \"test\",\n },\n);\n\nSuite.constants = constants;\n","\"use strict\";\n\n/**\n * @typedef {import('./types.d.ts').RunnerOptions} RunnerOptions\n */\n\n/**\n * Module dependencies.\n * @private\n */\nvar EventEmitter = require(\"node:events\").EventEmitter;\nvar Pending = require(\"./pending\");\nvar utils = require(\"./utils\");\nvar debug = require(\"debug\")(\"mocha:runner\");\nvar Runnable = require(\"./runnable\");\nvar Suite = require(\"./suite\");\nvar HOOK_TYPE_BEFORE_EACH = Suite.constants.HOOK_TYPE_BEFORE_EACH;\nvar HOOK_TYPE_AFTER_EACH = Suite.constants.HOOK_TYPE_AFTER_EACH;\nvar HOOK_TYPE_AFTER_ALL = Suite.constants.HOOK_TYPE_AFTER_ALL;\nvar HOOK_TYPE_BEFORE_ALL = Suite.constants.HOOK_TYPE_BEFORE_ALL;\nvar EVENT_ROOT_SUITE_RUN = Suite.constants.EVENT_ROOT_SUITE_RUN;\nvar STATE_FAILED = Runnable.constants.STATE_FAILED;\nvar STATE_PASSED = Runnable.constants.STATE_PASSED;\nvar STATE_PENDING = Runnable.constants.STATE_PENDING;\nvar stackFilter = utils.stackTraceFilter();\nvar stringify = utils.stringify;\n\nconst {\n createInvalidExceptionError,\n createUnsupportedError,\n createFatalError,\n isMochaError,\n} = require(\"./errors\");\nconst { constants: errorConstants } = require(\"./error-constants\");\n\n/**\n * Non-enumerable globals.\n * @private\n * @readonly\n */\nvar globals = [\n \"setTimeout\",\n \"clearTimeout\",\n \"setInterval\",\n \"clearInterval\",\n \"XMLHttpRequest\",\n \"Date\",\n \"setImmediate\",\n \"clearImmediate\",\n];\n\nvar constants = utils.defineConstants(\n /**\n * {@link Runner}-related constants. Used by reporters. Each event emits the corresponding object, unless otherwise indicated.\n * @example\n * const Mocha = require('mocha');\n * const Base = Mocha.reporters.Base;\n * const {\n * EVENT_HOOK_BEGIN,\n * EVENT_TEST_PASS,\n * EVENT_TEST_FAIL,\n * EVENT_TEST_END\n * } = Mocha.Runner.constants\n *\n * function MyReporter(runner, options) {\n * Base.call(this, runner, options);\n *\n * runner.on(EVENT_HOOK_BEGIN, function(hook) {\n * console.log('hook called: ', hook.title);\n * });\n *\n * runner.on(EVENT_TEST_PASS, function(test) {\n * console.log('pass: %s', test.fullTitle());\n * });\n *\n * runner.on(EVENT_TEST_FAIL, function(test, err) {\n * console.log('fail: %s -- error: %s', test.fullTitle(), err.message);\n * });\n *\n * runner.on(EVENT_TEST_END, function() {\n * console.log('end: %d/%d', runner.stats.passes, runner.stats.tests);\n * });\n * }\n *\n * module.exports = MyReporter;\n *\n * @public\n * @memberof Runner\n * @readonly\n * @alias constants\n * @static\n * @enum {string}\n */\n {\n /**\n * Emitted when {@link Hook} execution begins\n */\n EVENT_HOOK_BEGIN: \"hook\",\n /**\n * Emitted when {@link Hook} execution ends\n */\n EVENT_HOOK_END: \"hook end\",\n /**\n * Emitted when Root {@link Suite} execution begins (all files have been parsed and hooks/tests are ready for execution)\n */\n EVENT_RUN_BEGIN: \"start\",\n /**\n * Emitted when Root {@link Suite} execution has been delayed via `delay` option\n */\n EVENT_DELAY_BEGIN: \"waiting\",\n /**\n * Emitted when delayed Root {@link Suite} execution is triggered by user via `global.run()`\n */\n EVENT_DELAY_END: \"ready\",\n /**\n * Emitted when Root {@link Suite} execution ends\n */\n EVENT_RUN_END: \"end\",\n /**\n * Emitted when {@link Suite} execution begins\n */\n EVENT_SUITE_BEGIN: \"suite\",\n /**\n * Emitted when {@link Suite} execution ends\n */\n EVENT_SUITE_END: \"suite end\",\n /**\n * Emitted when {@link Test} execution begins\n */\n EVENT_TEST_BEGIN: \"test\",\n /**\n * Emitted when {@link Test} execution ends\n */\n EVENT_TEST_END: \"test end\",\n /**\n * Emitted when {@link Test} execution fails. Includes an `err` object of type `Error`.\n * @example\n * runner.on(EVENT_TEST_FAIL, function(test, err) {\n * console.log('fail: %s -- error: %s', test.fullTitle(), err.message);\n * });\n *\n *\n */\n EVENT_TEST_FAIL: \"fail\",\n /**\n * Emitted when {@link Test} execution succeeds\n */\n EVENT_TEST_PASS: \"pass\",\n /**\n * Emitted when {@link Test} becomes pending\n */\n EVENT_TEST_PENDING: \"pending\",\n /**\n * Emitted when {@link Test} execution has failed, but will retry\n */\n EVENT_TEST_RETRY: \"retry\",\n /**\n * Initial state of Runner\n */\n STATE_IDLE: \"idle\",\n /**\n * State set to this value when the Runner has started running\n */\n STATE_RUNNING: \"running\",\n /**\n * State set to this value when the Runner has stopped\n */\n STATE_STOPPED: \"stopped\",\n },\n);\n\nclass Runner extends EventEmitter {\n /**\n * Initialize a `Runner` at the Root {@link Suite}, which represents a hierarchy of {@link Suite|Suites} and {@link Test|Tests}.\n *\n * @extends external:EventEmitter\n * @public\n * @class\n * @param {Suite} suite - Root suite\n * @param {Object} [opts] - Settings object\n * @param {boolean} [opts.cleanReferencesAfterRun] - Whether to clean references to test fns and hooks when a suite is done.\n * @param {boolean} [opts.delay] - Whether to delay execution of root suite until ready.\n * @param {boolean} [opts.dryRun] - Whether to report tests without running them.\n * @param {boolean} [opts.failZero] - Whether to fail test run if zero tests encountered.\n * @param {boolean} [opts.failHookAffectedTests] - Whether to fail all tests affected by hook failures.\n */\n constructor(suite, opts = {}) {\n super();\n\n var self = this;\n this._globals = [];\n this._abort = false;\n this.suite = suite;\n this._opts = opts;\n this.state = constants.STATE_IDLE;\n this.total = suite.total();\n this.failures = 0;\n /**\n * @type {Map>>}\n */\n this._eventListeners = new Map();\n this.on(constants.EVENT_TEST_END, function (test) {\n if (test.type === \"test\" && test.retriedTest() && test.parent) {\n var idx =\n test.parent.tests && test.parent.tests.indexOf(test.retriedTest());\n if (idx > -1) test.parent.tests[idx] = test;\n }\n self.checkGlobals(test);\n });\n this.on(constants.EVENT_HOOK_END, function (hook) {\n self.checkGlobals(hook);\n });\n this._defaultGrep = /.*/;\n this.grep(this._defaultGrep);\n this.globals(this.globalProps());\n\n this.uncaught = this._uncaught.bind(this);\n this.unhandled = (reason, promise) => {\n if (isMochaError(reason)) {\n debug(\n \"trapped unhandled rejection coming out of Mocha; forwarding to uncaught handler:\",\n reason,\n );\n this.uncaught(reason);\n } else {\n debug(\n \"trapped unhandled rejection from (probably) user code; re-emitting on process\",\n );\n this._removeEventListener(\n process,\n \"unhandledRejection\",\n this.unhandled,\n );\n try {\n process.emit(\"unhandledRejection\", reason, promise);\n } finally {\n this._addEventListener(process, \"unhandledRejection\", this.unhandled);\n }\n }\n };\n }\n}\n\n/**\n * Wrapper for setImmediate, process.nextTick, or browser polyfill.\n *\n * @param {Function} fn\n * @private\n */\nRunner.immediately = global.setImmediate || process.nextTick;\n\n/**\n * Replacement for `target.on(eventName, listener)` that does bookkeeping to remove them when this runner instance is disposed.\n * @param {EventEmitter} target - The `EventEmitter`\n * @param {string} eventName - The event name\n * @param {string} fn - Listener function\n * @private\n */\nRunner.prototype._addEventListener = function (target, eventName, listener) {\n debug(\n \"_addEventListener(): adding for event %s; %d current listeners\",\n eventName,\n target.listenerCount(eventName),\n );\n /* istanbul ignore next */\n if (\n this._eventListeners.has(target) &&\n this._eventListeners.get(target).has(eventName) &&\n this._eventListeners.get(target).get(eventName).has(listener)\n ) {\n debug(\n \"warning: tried to attach duplicate event listener for %s\",\n eventName,\n );\n return;\n }\n target.on(eventName, listener);\n const targetListeners = this._eventListeners.has(target)\n ? this._eventListeners.get(target)\n : new Map();\n const targetEventListeners = targetListeners.has(eventName)\n ? targetListeners.get(eventName)\n : new Set();\n targetEventListeners.add(listener);\n targetListeners.set(eventName, targetEventListeners);\n this._eventListeners.set(target, targetListeners);\n};\n\n/**\n * Replacement for `target.removeListener(eventName, listener)` that also updates the bookkeeping.\n * @param {EventEmitter} target - The `EventEmitter`\n * @param {string} eventName - The event name\n * @param {function} listener - Listener function\n * @private\n */\nRunner.prototype._removeEventListener = function (target, eventName, listener) {\n target.removeListener(eventName, listener);\n\n if (this._eventListeners.has(target)) {\n const targetListeners = this._eventListeners.get(target);\n if (targetListeners.has(eventName)) {\n const targetEventListeners = targetListeners.get(eventName);\n targetEventListeners.delete(listener);\n if (!targetEventListeners.size) {\n targetListeners.delete(eventName);\n }\n }\n if (!targetListeners.size) {\n this._eventListeners.delete(target);\n }\n } else {\n debug(\"trying to remove listener for untracked object %s\", target);\n }\n};\n\n/**\n * Removes all event handlers set during a run on this instance.\n * Remark: this does _not_ clean/dispose the tests or suites themselves.\n */\nRunner.prototype.dispose = function () {\n this.removeAllListeners();\n this._eventListeners.forEach((targetListeners, target) => {\n targetListeners.forEach((targetEventListeners, eventName) => {\n targetEventListeners.forEach((listener) => {\n target.removeListener(eventName, listener);\n });\n });\n });\n this._eventListeners.clear();\n};\n\n/**\n * Run tests with full titles matching `re`. Updates runner.total\n * with number of tests matched.\n *\n * @public\n * @memberof Runner\n * @param {RegExp} re\n * @param {boolean} invert\n * @return {Runner} Runner instance.\n */\nRunner.prototype.grep = function (re, invert) {\n debug(\"grep(): setting to %s\", re);\n this._grep = re;\n this._invert = invert;\n this.total = this.grepTotal(this.suite);\n return this;\n};\n\n/**\n * Returns the number of tests matching the grep search for the\n * given suite.\n *\n * @memberof Runner\n * @public\n * @param {Suite} suite\n * @return {number}\n */\nRunner.prototype.grepTotal = function (suite) {\n var self = this;\n var total = 0;\n\n suite.eachTest(function (test) {\n var match = self._grep.test(test.fullTitle());\n if (self._invert) {\n match = !match;\n }\n if (match) {\n total++;\n }\n });\n\n return total;\n};\n\n/**\n * Return a list of global properties.\n *\n * @return {Array}\n * @private\n */\nRunner.prototype.globalProps = function () {\n var props = Object.keys(global);\n\n // non-enumerables\n for (var i = 0; i < globals.length; ++i) {\n if (~props.indexOf(globals[i])) {\n continue;\n }\n props.push(globals[i]);\n }\n\n return props;\n};\n\n/**\n * Allow the given `arr` of globals.\n *\n * @public\n * @memberof Runner\n * @param {Array} arr\n * @return {Runner} Runner instance.\n */\nRunner.prototype.globals = function (arr) {\n if (!arguments.length) {\n return this._globals;\n }\n debug(\"globals(): setting to %O\", arr);\n this._globals = this._globals.concat(arr);\n return this;\n};\n\n/**\n * Check for global variable leaks.\n *\n * @private\n */\nRunner.prototype.checkGlobals = function (test) {\n if (!this.checkLeaks) {\n return;\n }\n var ok = this._globals;\n\n var globals = this.globalProps();\n var leaks;\n\n if (test) {\n ok = ok.concat(test._allowedGlobals || []);\n }\n\n if (this.prevGlobalsLength === globals.length) {\n return;\n }\n this.prevGlobalsLength = globals.length;\n\n leaks = filterLeaks(ok, globals);\n this._globals = this._globals.concat(leaks);\n\n if (leaks.length) {\n var msg = `global leak(s) detected: ${leaks.map((e) => `'${e}'`).join(\", \")}`;\n this.fail(test, new Error(msg));\n }\n};\n\n/**\n * Create an error object for a test that was skipped due to a hook failure.\n *\n * @private\n * @param {string} hookTitle - The title of the failed hook\n * @param {*} hookError - The error from the failed hook (may not be an Error object)\n * @returns {Error} The error object for the skipped test\n */\nfunction createHookSkipError(hookTitle, hookError) {\n // Handle falsy or undefined exceptions\n if (!hookError) {\n hookError = createInvalidExceptionError(\n 'Hook \"' + hookTitle + '\" failed with exception: ' + hookError,\n hookError,\n );\n }\n // Convert non-Error objects to Error\n else if (!isError(hookError)) {\n hookError = thrown2Error(hookError);\n }\n\n var errorMessage =\n 'Test skipped due to failure in hook \"' +\n hookTitle +\n '\": ' +\n hookError.message;\n var testError = new Error(errorMessage);\n testError.stack = hookError.stack;\n return testError;\n}\n\n/**\n * Fail all tests that are affected by a hook failure.\n * This is used when the `failHookAffectedTests` option is enabled.\n *\n * @private\n * @param {Suite} suite - The suite containing the affected tests\n * @param {Error} hookError - The error from the failed hook\n * @param {string} hookTitle - The title of the failed hook\n */\nRunner.prototype.failAffectedTests = function (suite, hookError, hookTitle) {\n if (!this._opts.failHookAffectedTests) {\n return;\n }\n\n var self = this;\n var testError = createHookSkipError(hookTitle, hookError);\n\n // Recursively fail all tests in this suite and its child suites\n function failTestsInSuite(s) {\n s.tests.forEach(function (test) {\n // Only fail tests that haven't been executed yet\n if (!test.state) {\n test.state = STATE_FAILED;\n self.failures++;\n self.emit(constants.EVENT_TEST_BEGIN, test);\n self.emit(constants.EVENT_TEST_FAIL, test, testError);\n self.emit(constants.EVENT_TEST_END, test);\n }\n });\n\n s.suites.forEach(failTestsInSuite);\n }\n\n failTestsInSuite(suite);\n};\n\n/**\n * Fail the given `test`.\n *\n * If `test` is a hook, failures work in the following pattern:\n * - If bail, run corresponding `after each` and `after` hooks,\n * then exit\n * - Failed `before` hook skips all tests in a suite and subsuites,\n * but jumps to corresponding `after` hook\n * - Failed `before each` hook skips remaining tests in a\n * suite and jumps to corresponding `after each` hook,\n * which is run only once\n * - Failed `after` hook does not alter execution order\n * - Failed `after each` hook skips remaining tests in a\n * suite and subsuites, but executes other `after each`\n * hooks\n *\n * @private\n * @param {Runnable} test\n * @param {Error} err\n * @param {boolean} [force=false] - Whether to fail a pending test.\n */\nRunner.prototype.fail = function (test, err, force) {\n force = force === true;\n if (test.isPending() && !force) {\n return;\n }\n if (this.state === constants.STATE_STOPPED) {\n if (err.code === errorConstants.MULTIPLE_DONE) {\n throw err;\n }\n throw createFatalError(\n \"Test failed after root suite execution completed!\",\n err,\n );\n }\n\n ++this.failures;\n debug(\"total number of failures: %d\", this.failures);\n test.state = STATE_FAILED;\n\n if (!isError(err)) {\n err = thrown2Error(err);\n }\n\n // Filter the stack traces\n if (!this.fullStackTrace) {\n const alreadyFiltered = new Set();\n let currentErr = err;\n\n while (currentErr && currentErr.stack && !alreadyFiltered.has(currentErr)) {\n alreadyFiltered.add(currentErr);\n\n try {\n currentErr.stack = stackFilter(currentErr.stack);\n } catch (ignore) {\n // some environments do not take kindly to monkeying with the stack\n }\n\n currentErr = currentErr.cause;\n }\n }\n\n this.emit(constants.EVENT_TEST_FAIL, test, err);\n};\n\n/**\n * Run hook `name` callbacks and then invoke `fn()`.\n *\n * @private\n * @param {string} name\n * @param {Function} fn\n */\n\nRunner.prototype.hook = function (name, fn) {\n if (this._opts.dryRun) return fn();\n\n var suite = this.suite;\n var hooks = suite.getHooks(name);\n var self = this;\n\n function next(i) {\n var hook = hooks[i];\n if (!hook) {\n return fn();\n }\n self.currentRunnable = hook;\n\n if (name === HOOK_TYPE_BEFORE_ALL) {\n hook.ctx.currentTest = hook.parent.tests[0];\n } else if (name === HOOK_TYPE_AFTER_ALL) {\n hook.ctx.currentTest = hook.parent.tests[hook.parent.tests.length - 1];\n } else {\n hook.ctx.currentTest = self.test;\n }\n\n setHookTitle(hook);\n\n hook.allowUncaught = self.allowUncaught;\n\n self.emit(constants.EVENT_HOOK_BEGIN, hook);\n\n if (!hook.listeners(\"error\").length) {\n self._addEventListener(hook, \"error\", function (err) {\n self.fail(hook, err);\n });\n }\n\n hook.run(function cbHookRun(err) {\n var testError = hook.error();\n if (testError) {\n self.fail(self.test, testError);\n }\n // conditional skip\n if (hook.pending) {\n if (name === HOOK_TYPE_AFTER_EACH) {\n // TODO define and implement use case\n if (self.test) {\n self.test.pending = true;\n }\n } else if (name === HOOK_TYPE_BEFORE_EACH) {\n if (self.test) {\n self.test.pending = true;\n }\n self.emit(constants.EVENT_HOOK_END, hook);\n hook.pending = false; // activates hook for next test\n return fn(new Error(\"abort hookDown\"));\n } else if (name === HOOK_TYPE_BEFORE_ALL) {\n suite.tests.forEach(function (test) {\n test.pending = true;\n });\n suite.suites.forEach(function (suite) {\n suite.pending = true;\n });\n hooks = [];\n } else {\n hook.pending = false;\n var errForbid = createUnsupportedError(\"`this.skip` forbidden\");\n self.fail(hook, errForbid);\n return fn(errForbid);\n }\n } else if (err) {\n self.fail(hook, err);\n // If failHookAffectedTests is enabled, mark affected tests as failed\n if (self._opts.failHookAffectedTests) {\n if (name === HOOK_TYPE_BEFORE_ALL) {\n self.failAffectedTests(self.suite, err, hook.title);\n } else if (name === HOOK_TYPE_BEFORE_EACH) {\n // Fail the current test\n if (self.test && !self.test.state) {\n var testError = createHookSkipError(hook.title, err);\n\n self.test.state = STATE_FAILED;\n self.failures++;\n self.emit(constants.EVENT_TEST_BEGIN, self.test);\n self.emit(constants.EVENT_TEST_FAIL, self.test, testError);\n self.emit(constants.EVENT_TEST_END, self.test);\n }\n // Store the hook error info for remaining tests\n self._failedBeforeEachHook = {\n error: err,\n title: hook.title,\n };\n }\n }\n // stop executing hooks, notify callee of hook err\n return fn(err);\n }\n self.emit(constants.EVENT_HOOK_END, hook);\n delete hook.ctx.currentTest;\n setHookTitle(hook);\n next(++i);\n });\n\n function setHookTitle(hook) {\n hook.originalTitle = hook.originalTitle || hook.title;\n if (hook.ctx && hook.ctx.currentTest) {\n hook.title = `${hook.originalTitle} for \"${hook.ctx.currentTest.title}\"`;\n } else {\n var parentTitle;\n if (hook.parent.title) {\n parentTitle = hook.parent.title;\n } else {\n parentTitle = hook.parent.root ? \"{root}\" : \"\";\n }\n hook.title = `${hook.originalTitle} in \"${parentTitle}\"`;\n }\n }\n }\n\n Runner.immediately(function () {\n next(0);\n });\n};\n\n/**\n * Run hook `name` for the given array of `suites`\n * in order, and callback `fn(err, errSuite)`.\n *\n * @private\n * @param {string} name\n * @param {Array} suites\n * @param {Function} fn\n */\nRunner.prototype.hooks = function (name, suites, fn) {\n var self = this;\n var orig = this.suite;\n\n function next(suite) {\n self.suite = suite;\n\n if (!suite) {\n self.suite = orig;\n return fn();\n }\n\n self.hook(name, function (err) {\n if (err) {\n var errSuite = self.suite;\n self.suite = orig;\n return fn(err, errSuite);\n }\n\n next(suites.pop());\n });\n }\n\n next(suites.pop());\n};\n\n/**\n * Run 'afterEach' hooks from bottom up.\n *\n * @param {String} name\n * @param {Function} fn\n * @private\n */\nRunner.prototype.hookUp = function (name, fn) {\n var suites = [this.suite].concat(this.parents()).reverse();\n this.hooks(name, suites, fn);\n};\n\n/**\n * Run 'beforeEach' hooks from top level down.\n *\n * @param {String} name\n * @param {Function} fn\n * @private\n */\nRunner.prototype.hookDown = function (name, fn) {\n var suites = [this.suite].concat(this.parents());\n this.hooks(name, suites, fn);\n};\n\n/**\n * Return an array of parent Suites from\n * closest to furthest.\n *\n * @return {Array}\n * @private\n */\nRunner.prototype.parents = function () {\n var suite = this.suite;\n var suites = [];\n while (suite.parent) {\n suite = suite.parent;\n suites.push(suite);\n }\n return suites;\n};\n\n/**\n * Run the current test and callback `fn(err)`.\n *\n * @param {Function} fn\n * @private\n */\nRunner.prototype.runTest = function (fn) {\n if (this._opts.dryRun) return Runner.immediately(fn);\n\n var self = this;\n var test = this.test;\n\n if (!test) {\n return;\n }\n\n if (this.asyncOnly) {\n test.asyncOnly = true;\n }\n this._addEventListener(test, \"error\", function (err) {\n self.fail(test, err);\n });\n if (this.allowUncaught) {\n test.allowUncaught = true;\n return test.run(fn);\n }\n try {\n test.run(fn);\n } catch (err) {\n fn(err);\n }\n};\n\n/**\n * Run tests in the given `suite` and invoke the callback `fn()` when complete.\n *\n * @private\n * @param {Suite} suite\n * @param {Function} fn\n */\nRunner.prototype.runTests = function (suite, fn) {\n var self = this;\n var tests = suite.tests.slice();\n var test;\n\n function hookErr(err, errSuite, after) {\n // before/after Each hook for errSuite failed:\n var orig = self.suite;\n\n // If failHookAffectedTests is enabled and this is a beforeEach failure,\n // mark remaining tests as failed\n if (\n self._opts.failHookAffectedTests &&\n !after &&\n self._failedBeforeEachHook\n ) {\n // Fail all remaining tests in the suite\n var remainingTests = tests.slice();\n remainingTests.forEach(function (t) {\n if (!t.state) {\n var testError = createHookSkipError(\n self._failedBeforeEachHook.title,\n self._failedBeforeEachHook.error,\n );\n\n t.state = STATE_FAILED;\n self.failures++;\n self.emit(constants.EVENT_TEST_BEGIN, t);\n self.emit(constants.EVENT_TEST_FAIL, t, testError);\n self.emit(constants.EVENT_TEST_END, t);\n }\n });\n // Clear the stored hook info\n delete self._failedBeforeEachHook;\n }\n\n // for failed 'after each' hook start from errSuite parent,\n // otherwise start from errSuite itself\n self.suite = after ? errSuite.parent : errSuite;\n\n if (self.suite) {\n self.hookUp(HOOK_TYPE_AFTER_EACH, function (err2, errSuite2) {\n self.suite = orig;\n // some hooks may fail even now\n if (err2) {\n return hookErr(err2, errSuite2, true);\n }\n // report error suite\n fn(errSuite);\n });\n } else {\n // there is no need calling other 'after each' hooks\n self.suite = orig;\n fn(errSuite);\n }\n }\n\n function next(err, errSuite) {\n // if we bail after first err\n if (self.failures && suite._bail) {\n tests = [];\n }\n\n if (self._abort) {\n return fn();\n }\n\n if (err) {\n return hookErr(err, errSuite, true);\n }\n\n // next test\n test = tests.shift();\n\n // all done\n if (!test) {\n return fn();\n }\n\n // grep\n var match = self._grep.test(test.fullTitle());\n if (self._invert) {\n match = !match;\n }\n if (!match) {\n // Run immediately only if we have defined a grep. When we\n // define a grep — It can cause maximum callstack error if\n // the grep is doing a large recursive loop by neglecting\n // all tests. The run immediately function also comes with\n // a performance cost. So we don't want to run immediately\n // if we run the whole test suite, because running the whole\n // test suite don't do any immediate recursive loops. Thus,\n // allowing a JS runtime to breathe.\n if (self._grep !== self._defaultGrep) {\n Runner.immediately(next);\n } else {\n next();\n }\n return;\n }\n\n // static skip, no hooks are executed\n if (test.isPending()) {\n if (self.forbidPending) {\n self.fail(test, new Error(\"Pending test forbidden\"), true);\n } else {\n test.state = STATE_PENDING;\n self.emit(constants.EVENT_TEST_PENDING, test);\n }\n self.emit(constants.EVENT_TEST_END, test);\n return next();\n }\n\n // execute test and hook(s)\n self.emit(constants.EVENT_TEST_BEGIN, (self.test = test));\n self.hookDown(HOOK_TYPE_BEFORE_EACH, function (err, errSuite) {\n // conditional skip within beforeEach\n if (test.isPending()) {\n if (self.forbidPending) {\n self.fail(test, new Error(\"Pending test forbidden\"), true);\n } else {\n test.state = STATE_PENDING;\n self.emit(constants.EVENT_TEST_PENDING, test);\n }\n self.emit(constants.EVENT_TEST_END, test);\n // skip inner afterEach hooks below errSuite level\n var origSuite = self.suite;\n self.suite = errSuite || self.suite;\n return self.hookUp(HOOK_TYPE_AFTER_EACH, function (e, eSuite) {\n self.suite = origSuite;\n next(e, eSuite);\n });\n }\n if (err) {\n return hookErr(err, errSuite, false);\n }\n self.currentRunnable = self.test;\n self.runTest(function (err) {\n test = self.test;\n // conditional skip within it\n if (test.pending) {\n if (self.forbidPending) {\n self.fail(test, new Error(\"Pending test forbidden\"), true);\n } else {\n test.state = STATE_PENDING;\n self.emit(constants.EVENT_TEST_PENDING, test);\n }\n self.emit(constants.EVENT_TEST_END, test);\n return self.hookUp(HOOK_TYPE_AFTER_EACH, next);\n } else if (err) {\n var retry = test.currentRetry();\n if (retry < test.retries()) {\n var clonedTest = test.clone();\n clonedTest.currentRetry(retry + 1);\n tests.unshift(clonedTest);\n\n self.emit(constants.EVENT_TEST_RETRY, test, err);\n\n // Early return + hook trigger so that it doesn't\n // increment the count wrong\n return self.hookUp(HOOK_TYPE_AFTER_EACH, next);\n } else {\n self.fail(test, err);\n }\n self.emit(constants.EVENT_TEST_END, test);\n return self.hookUp(HOOK_TYPE_AFTER_EACH, next);\n }\n\n test.state = STATE_PASSED;\n self.emit(constants.EVENT_TEST_PASS, test);\n self.emit(constants.EVENT_TEST_END, test);\n self.hookUp(HOOK_TYPE_AFTER_EACH, next);\n });\n });\n }\n\n this.next = next;\n this.hookErr = hookErr;\n next();\n};\n\n/**\n * Run the given `suite` and invoke the callback `fn()` when complete.\n *\n * @private\n * @param {Suite} suite\n * @param {Function} fn\n */\nRunner.prototype.runSuite = function (suite, fn) {\n var i = 0;\n var self = this;\n var total = this.grepTotal(suite);\n\n debug(\"runSuite(): running %s\", suite.fullTitle());\n\n if (!total || (self.failures && suite._bail)) {\n debug(\"runSuite(): bailing\");\n return fn();\n }\n\n this.emit(constants.EVENT_SUITE_BEGIN, (this.suite = suite));\n\n function next(errSuite) {\n if (errSuite) {\n // current suite failed on a hook from errSuite\n if (errSuite === suite) {\n // if errSuite is current suite\n // continue to the next sibling suite\n return done();\n }\n // errSuite is among the parents of current suite\n // stop execution of errSuite and all sub-suites\n return done(errSuite);\n }\n\n if (self._abort) {\n return done();\n }\n\n var curr = suite.suites[i++];\n if (!curr) {\n return done();\n }\n\n // Avoid grep neglecting large number of tests causing a\n // huge recursive loop and thus a maximum call stack error.\n // See comment in `this.runTests()` for more information.\n if (self._grep !== self._defaultGrep) {\n Runner.immediately(function () {\n self.runSuite(curr, next);\n });\n } else {\n self.runSuite(curr, next);\n }\n }\n\n function done(errSuite) {\n self.suite = suite;\n self.nextSuite = next;\n\n // remove reference to test\n delete self.test;\n\n self.hook(HOOK_TYPE_AFTER_ALL, function () {\n self.emit(constants.EVENT_SUITE_END, suite);\n fn(errSuite);\n });\n }\n\n this.nextSuite = next;\n\n this.hook(HOOK_TYPE_BEFORE_ALL, function (err) {\n if (err) {\n return done();\n }\n self.runTests(suite, next);\n });\n};\n\n/**\n * Handle uncaught exceptions within runner.\n *\n * This function is bound to the instance as `Runner#uncaught` at instantiation\n * time. It's intended to be listening on the `Process.uncaughtException` event.\n * In order to not leak EE listeners, we need to ensure no more than a single\n * `uncaughtException` listener exists per `Runner`. The only way to do\n * this--because this function needs the context (and we don't have lambdas)--is\n * to use `Function.prototype.bind`. We need strict equality to unregister and\n * _only_ unregister the _one_ listener we set from the\n * `Process.uncaughtException` event; would be poor form to just remove\n * everything. See {@link Runner#run} for where the event listener is registered\n * and unregistered.\n * @param {Error} err - Some uncaught error\n * @private\n */\nRunner.prototype._uncaught = function (err) {\n // this is defensive to prevent future developers from mis-calling this function.\n // it's more likely that it'd be called with the incorrect context--say, the global\n // `process` object--than it would to be called with a context that is not a \"subclass\"\n // of `Runner`.\n if (!(this instanceof Runner)) {\n throw createFatalError(\n \"Runner#uncaught() called with invalid context\",\n this,\n );\n }\n if (err instanceof Pending) {\n debug(\"uncaught(): caught a Pending\");\n return;\n }\n // browser does not exit script when throwing in global.onerror()\n if (this.allowUncaught && !utils.isBrowser()) {\n debug(\"uncaught(): bubbling exception due to --allow-uncaught\");\n throw err;\n }\n\n if (this.state === constants.STATE_STOPPED) {\n debug(\"uncaught(): throwing after run has completed!\");\n throw err;\n }\n\n if (err) {\n debug(\"uncaught(): got truthy exception %O\", err);\n } else {\n debug(\"uncaught(): undefined/falsy exception\");\n err = createInvalidExceptionError(\n \"Caught falsy/undefined exception which would otherwise be uncaught. No stack trace found; try a debugger\",\n err,\n );\n }\n\n if (!isError(err)) {\n err = thrown2Error(err);\n debug('uncaught(): converted \"error\" %o to Error', err);\n }\n err.uncaught = true;\n\n var runnable = this.currentRunnable;\n\n if (!runnable) {\n runnable = new Runnable(\"Uncaught error outside test suite\");\n debug(\"uncaught(): no current Runnable; created a phony one\");\n runnable.parent = this.suite;\n\n if (this.state === constants.STATE_RUNNING) {\n debug(\"uncaught(): failing gracefully\");\n this.fail(runnable, err);\n } else {\n // Can't recover from this failure\n debug(\"uncaught(): test run has not yet started; unrecoverable\");\n this.emit(constants.EVENT_RUN_BEGIN);\n this.fail(runnable, err);\n this.emit(constants.EVENT_RUN_END);\n }\n\n return;\n }\n\n runnable.clearTimeout();\n\n if (runnable.isFailed()) {\n debug(\"uncaught(): Runnable has already failed\");\n // Ignore error if already failed\n return;\n } else if (runnable.isPending()) {\n debug(\"uncaught(): pending Runnable wound up failing!\");\n // report 'pending test' retrospectively as failed\n this.fail(runnable, err, true);\n return;\n }\n\n // we cannot recover gracefully if a Runnable has already passed\n // then fails asynchronously\n if (runnable.isPassed()) {\n debug(\"uncaught(): Runnable has already passed; bailing gracefully\");\n this.fail(runnable, err);\n this.abort();\n } else {\n debug(\"uncaught(): forcing Runnable to complete with Error\");\n return runnable.callback(err);\n }\n};\n\n/**\n * Run the root suite and invoke `fn(failures)`\n * on completion.\n *\n * @public\n * @memberof Runner\n * @param {Function} fn - Callback when finished\n * @param {RunnerOptions} [opts] - For subclasses\n * @returns {Runner} Runner instance.\n */\nRunner.prototype.run = function (fn, opts = {}) {\n var rootSuite = this.suite;\n var options = opts.options || {};\n\n debug(\"run(): got options: %O\", options);\n fn = fn || function () {};\n\n const end = () => {\n if (!this.total && this._opts.failZero) this.failures = 1;\n\n debug(\"run(): root suite completed; emitting %s\", constants.EVENT_RUN_END);\n this.emit(constants.EVENT_RUN_END);\n };\n\n const begin = () => {\n debug(\"run(): emitting %s\", constants.EVENT_RUN_BEGIN);\n this.emit(constants.EVENT_RUN_BEGIN);\n debug(\"run(): emitted %s\", constants.EVENT_RUN_BEGIN);\n\n this.runSuite(rootSuite, end);\n };\n\n const prepare = () => {\n debug(\"run(): starting\");\n // If there is an `only` filter\n if (rootSuite.hasOnly()) {\n rootSuite.filterOnly();\n debug(\"run(): filtered exclusive Runnables\");\n }\n this.state = constants.STATE_RUNNING;\n if (this._opts.delay) {\n this.emit(constants.EVENT_DELAY_END);\n debug('run(): \"delay\" ended');\n }\n\n return begin();\n };\n\n // references cleanup to avoid memory leaks\n if (this._opts.cleanReferencesAfterRun) {\n this.on(constants.EVENT_SUITE_END, (suite) => {\n suite.cleanReferences();\n });\n }\n\n // callback\n this.on(constants.EVENT_RUN_END, function () {\n this.state = constants.STATE_STOPPED;\n debug(\"run(): emitted %s\", constants.EVENT_RUN_END);\n fn(this.failures);\n });\n\n this._removeEventListener(process, \"uncaughtException\", this.uncaught);\n this._removeEventListener(process, \"unhandledRejection\", this.unhandled);\n this._addEventListener(process, \"uncaughtException\", this.uncaught);\n this._addEventListener(process, \"unhandledRejection\", this.unhandled);\n\n if (this._opts.delay) {\n // for reporters, I guess.\n // might be nice to debounce some dots while we wait.\n this.emit(constants.EVENT_DELAY_BEGIN, rootSuite);\n rootSuite.once(EVENT_ROOT_SUITE_RUN, prepare);\n debug(\"run(): waiting for green light due to --delay\");\n } else {\n Runner.immediately(prepare);\n }\n\n return this;\n};\n\n/**\n * Toggle partial object linking behavior; used for building object references from\n * unique ID's. Does nothing in serial mode, because the object references already exist.\n * Subclasses can implement this (e.g., `ParallelBufferedRunner`)\n * @abstract\n * @param {boolean} [value] - If `true`, enable partial object linking, otherwise disable\n * @returns {Runner}\n * @chainable\n * @public\n * @example\n * // this reporter needs proper object references when run in parallel mode\n * class MyReporter {\n * constructor(runner) {\n * runner.linkPartialObjects(true)\n * .on(EVENT_SUITE_BEGIN, suite => {\n * // this Suite may be the same object...\n * })\n * .on(EVENT_TEST_BEGIN, test => {\n * // ...as the `test.parent` property\n * });\n * }\n * }\n */\nRunner.prototype.linkPartialObjects = function () {\n return this;\n};\n\n/*\n * Like {@link Runner#run}, but does not accept a callback and returns a `Promise` instead of a `Runner`.\n * This function cannot reject; an `unhandledRejection` event will bubble up to the `process` object instead.\n * @public\n * @memberof Runner\n * @param {Object} [opts] - Options for {@link Runner#run}\n * @returns {Promise} Failure count\n */\nRunner.prototype.runAsync = async function runAsync(opts = {}) {\n return new Promise((resolve) => {\n this.run(resolve, opts);\n });\n};\n\n/**\n * Cleanly abort execution.\n *\n * @memberof Runner\n * @public\n * @return {Runner} Runner instance.\n */\nRunner.prototype.abort = function () {\n debug(\"abort(): aborting\");\n this._abort = true;\n\n return this;\n};\n\n/**\n * Returns `true` if Mocha is running in parallel mode. For reporters.\n *\n * Subclasses should return an appropriate value.\n * @public\n * @returns {false}\n */\nRunner.prototype.isParallelMode = function isParallelMode() {\n return false;\n};\n\n/**\n * Configures an alternate reporter for worker processes to use. Subclasses\n * using worker processes should implement this.\n * @public\n * @param {string} path - Absolute path to alternate reporter for worker processes to use\n * @returns {Runner}\n * @throws When in serial mode\n * @chainable\n * @abstract\n */\nRunner.prototype.workerReporter = function () {\n throw createUnsupportedError(\"workerReporter() not supported in serial mode\");\n};\n\n/**\n * Filter leaks with the given globals flagged as `ok`.\n *\n * @private\n * @param {Array} ok\n * @param {Array} globals\n * @return {Array}\n */\nfunction filterLeaks(ok, globals) {\n return globals.filter(function (key) {\n // Firefox and Chrome exposes iframes as index inside the window object\n if (/^\\d+/.test(key)) {\n return false;\n }\n\n // in firefox\n // if runner runs in an iframe, this iframe's window.getInterface method\n // not init at first it is assigned in some seconds\n if (global.navigator && /^getInterface/.test(key)) {\n return false;\n }\n\n // an iframe could be approached by window[iframeIndex]\n // in ie6,7,8 and opera, iframeIndex is enumerable, this could cause leak\n if (global.navigator && /^\\d+/.test(key)) {\n return false;\n }\n\n // Opera and IE expose global variables for HTML element IDs (issue #243)\n if (/^mocha-/.test(key)) {\n return false;\n }\n\n var matched = ok.filter(function (ok) {\n if (~ok.indexOf(\"*\")) {\n return key.indexOf(ok.split(\"*\")[0]) === 0;\n }\n return key === ok;\n });\n return !matched.length && (!global.navigator || key !== \"onerror\");\n });\n}\n\n/**\n * Check if argument is an instance of Error object or a duck-typed equivalent.\n *\n * @private\n * @param {Object} err - object to check\n * @param {string} err.message - error message\n * @returns {boolean}\n */\nfunction isError(err) {\n return err instanceof Error || (err && typeof err.message === \"string\");\n}\n\n/**\n *\n * Converts thrown non-extensible type into proper Error.\n *\n * @private\n * @param {*} thrown - Non-extensible type thrown by code\n * @return {Error}\n */\nfunction thrown2Error(err) {\n return new Error(\n `the ${utils.canonicalType(err)} ${stringify(\n err,\n )} was thrown, throw an Error :)`,\n );\n}\n\nRunner.constants = constants;\n\n/**\n * Node.js' `EventEmitter`\n * @external EventEmitter\n * @see {@link https://nodejs.org/api/events.html#events_class_eventemitter}\n */\n\nmodule.exports = Runner;\n","\"use strict\";\n\n/**\n * @typedef {import('../runner.js')} Runner\n * @typedef {import('../test.js')} Test\n * @typedef {import('../types.d.ts').FullErrorStack} FullErrorStack\n */\n\n/**\n * @module Base\n */\n/**\n * Module dependencies.\n */\n\nvar diff = require(\"diff\");\nvar milliseconds = require(\"ms\");\nvar utils = require(\"../utils\");\nvar supportsColor = require(\"supports-color\");\nvar symbols = require(\"log-symbols\");\nvar constants = require(\"../runner\").constants;\nvar EVENT_TEST_PASS = constants.EVENT_TEST_PASS;\nvar EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL;\n\nconst isBrowser = utils.isBrowser();\n\nfunction getBrowserWindowSize() {\n if (\"innerHeight\" in global) {\n return [global.innerHeight, global.innerWidth];\n }\n // In a Web Worker, the DOM Window is not available.\n return [640, 480];\n}\n\n/**\n * Expose `Base`.\n */\n\nexports = module.exports = Base;\n\n/**\n * Check if both stdio streams are associated with a tty.\n */\n\nvar isatty = isBrowser || (process.stdout.isTTY && process.stderr.isTTY);\n\n/**\n * Save log references to avoid tests interfering (see GH-3604).\n */\nvar consoleLog = console.log;\n\n/**\n * Enable coloring by default, except in the browser interface.\n */\n\nexports.useColors =\n !isBrowser &&\n (supportsColor.stdout || process.env.MOCHA_COLORS !== undefined);\n\n/**\n * Inline diffs instead of +/-\n */\n\nexports.inlineDiffs = false;\n\n/**\n * Truncate diffs longer than this value to avoid slow performance\n */\nexports.maxDiffSize = 8192;\n\n/**\n * Default color map.\n */\n\nexports.colors = {\n pass: 90,\n fail: 31,\n \"bright pass\": 92,\n \"bright fail\": 91,\n \"bright yellow\": 93,\n pending: 36,\n suite: 0,\n \"error title\": 0,\n \"error message\": 31,\n \"error stack\": 90,\n checkmark: 32,\n fast: 90,\n medium: 33,\n slow: 31,\n green: 32,\n light: 90,\n \"diff gutter\": 90,\n \"diff added\": 32,\n \"diff removed\": 31,\n \"diff added inline\": \"30;42\",\n \"diff removed inline\": \"30;41\",\n};\n\n/**\n * Default symbol map.\n */\n\nexports.symbols = {\n ok: symbols.success,\n err: symbols.error,\n dot: \".\",\n comma: \",\",\n bang: \"!\",\n};\n\n/**\n * Color `str` with the given `type`,\n * allowing colors to be disabled,\n * as well as user-defined color\n * schemes.\n *\n * @private\n * @param {string} type\n * @param {string} str\n * @return {string}\n */\nvar color = (exports.color = function (type, str) {\n if (!exports.useColors) {\n return String(str);\n }\n return \"\\u001b[\" + exports.colors[type] + \"m\" + str + \"\\u001b[0m\";\n});\n\n/**\n * Expose term window size, with some defaults for when stderr is not a tty.\n */\n\nexports.window = {\n width: 75,\n};\n\nif (isatty) {\n if (isBrowser) {\n exports.window.width = getBrowserWindowSize()[1];\n } else {\n exports.window.width = process.stdout.getWindowSize(1)[0];\n }\n}\n\n/**\n * Expose some basic cursor interactions that are common among reporters.\n */\n\nexports.cursor = {\n hide: function () {\n isatty && process.stdout.write(\"\\u001b[?25l\");\n },\n\n show: function () {\n isatty && process.stdout.write(\"\\u001b[?25h\");\n },\n\n deleteLine: function () {\n isatty && process.stdout.write(\"\\u001b[2K\");\n },\n\n beginningOfLine: function () {\n isatty && process.stdout.write(\"\\u001b[0G\");\n },\n\n CR: function () {\n if (isatty) {\n exports.cursor.deleteLine();\n exports.cursor.beginningOfLine();\n } else {\n process.stdout.write(\"\\r\");\n }\n },\n};\n\nvar showDiff = (exports.showDiff = function (err) {\n return (\n err &&\n err.showDiff !== false &&\n sameType(err.actual, err.expected) &&\n err.expected !== undefined\n );\n});\n\nfunction stringifyDiffObjs(err) {\n if (!utils.isString(err.actual) || !utils.isString(err.expected)) {\n err.actual = utils.stringify(err.actual);\n err.expected = utils.stringify(err.expected);\n }\n}\n\n/**\n * Returns a diff between 2 strings with coloured ANSI output.\n *\n * @description\n * The diff will be either inline or unified dependent on the value\n * of `Base.inlineDiff`.\n *\n * @param {string} actual\n * @param {string} expected\n * @return {string} Diff\n */\n\nvar generateDiff = (exports.generateDiff = function (actual, expected) {\n try {\n var maxLen = exports.maxDiffSize;\n var skipped = 0;\n if (maxLen > 0) {\n skipped = Math.max(actual.length - maxLen, expected.length - maxLen);\n actual = actual.slice(0, maxLen);\n expected = expected.slice(0, maxLen);\n }\n let result = exports.inlineDiffs\n ? inlineDiff(actual, expected)\n : unifiedDiff(actual, expected);\n if (skipped > 0) {\n result = `${result}\\n [mocha] output truncated to ${maxLen} characters, see \"maxDiffSize\" reporter-option\\n`;\n }\n return result;\n } catch (err) {\n var msg =\n \"\\n \" +\n color(\"diff added\", \"+ expected\") +\n \" \" +\n color(\"diff removed\", \"- actual: failed to generate Mocha diff\") +\n \"\\n\";\n return msg;\n }\n});\n\n/**\n * Traverses err.cause and returns all stack traces\n *\n * @private\n * @param {Error} err\n * @param {Set} [seen]\n * @return {FullErrorStack}\n */\nvar getFullErrorStack = function (err, seen) {\n if (seen && seen.has(err)) {\n return { message: \"\", msg: \"\", stack: \"\" };\n }\n\n var message;\n\n if (typeof err.inspect === \"function\") {\n message = err.inspect() + \"\";\n } else if (err.message && typeof err.message.toString === \"function\") {\n message = err.message + \"\";\n } else {\n message = \"\";\n }\n\n var msg;\n var stack = err.stack || message;\n var index = message ? stack.indexOf(message) : -1;\n\n if (index === -1) {\n msg = message;\n } else {\n index += message.length;\n msg = stack.slice(0, index);\n // remove msg from stack\n stack = stack.slice(index + 1);\n\n if (err.cause) {\n seen = seen || new Set();\n seen.add(err);\n const causeStack = getFullErrorStack(err.cause, seen);\n stack +=\n \"\\n Caused by: \" +\n causeStack.msg +\n (causeStack.stack ? \"\\n\" + causeStack.stack : \"\");\n }\n }\n\n return {\n message,\n msg,\n stack,\n };\n};\n\n/**\n * Outputs the given `failures` as a list.\n *\n * @public\n * @memberof Mocha.reporters.Base\n * @variation 1\n * @param {Object[]} failures - Each is Test instance with corresponding\n * Error property\n */\nexports.list = function (failures) {\n var multipleErr, multipleTest;\n Base.consoleLog();\n failures.forEach(function (test, i) {\n // format\n var fmt =\n color(\"error title\", \" %s) %s:\\n\") +\n color(\"error message\", \" %s\") +\n color(\"error stack\", \"\\n%s\\n\");\n\n // msg\n var err;\n if (test.err && test.err.multiple) {\n if (multipleTest !== test) {\n multipleTest = test;\n multipleErr = [test.err].concat(test.err.multiple);\n }\n err = multipleErr.shift();\n } else {\n err = test.err;\n }\n\n var { message, msg, stack } = getFullErrorStack(err);\n\n // uncaught\n if (err.uncaught) {\n msg = \"Uncaught \" + msg;\n }\n // explicitly show diff\n if (!exports.hideDiff && showDiff(err)) {\n stringifyDiffObjs(err);\n fmt =\n color(\"error title\", \" %s) %s:\\n%s\") + color(\"error stack\", \"\\n%s\\n\");\n var match = message.match(/^([^:]+): expected/);\n msg = \"\\n \" + color(\"error message\", match ? match[1] : msg);\n\n msg += generateDiff(err.actual, err.expected);\n }\n\n // indent stack trace\n stack = stack.replace(/^/gm, \" \");\n\n // indented test title\n var testTitle = \"\";\n test.titlePath().forEach(function (str, index) {\n if (index !== 0) {\n testTitle += \"\\n \";\n }\n for (var i = 0; i < index; i++) {\n testTitle += \" \";\n }\n testTitle += str;\n });\n\n Base.consoleLog(fmt, i + 1, testTitle, msg, stack);\n });\n};\n\n/**\n * Constructs a new `Base` reporter instance.\n *\n * @description\n * All other reporters generally inherit from this reporter.\n *\n * @public\n * @class\n * @memberof Mocha.reporters\n * @param {Runner} runner - Instance triggers reporter actions.\n * @param {Object} [options] - runner options\n */\nfunction Base(runner, options) {\n var failures = (this.failures = []);\n\n if (!runner) {\n throw new TypeError(\"Missing runner argument\");\n }\n this.options = options || {};\n this.runner = runner;\n this.stats = runner.stats; // assigned so Reporters keep a closer reference\n\n var maxDiffSizeOpt =\n this.options.reporterOption && this.options.reporterOption.maxDiffSize;\n if (maxDiffSizeOpt !== undefined && !isNaN(Number(maxDiffSizeOpt))) {\n exports.maxDiffSize = Number(maxDiffSizeOpt);\n }\n\n runner.on(EVENT_TEST_PASS, function (test) {\n if (test.duration > test.slow()) {\n test.speed = \"slow\";\n } else if (test.duration > test.slow() / 2) {\n test.speed = \"medium\";\n } else {\n test.speed = \"fast\";\n }\n });\n\n runner.on(EVENT_TEST_FAIL, function (test, err) {\n if (showDiff(err)) {\n stringifyDiffObjs(err);\n }\n // more than one error per test\n if (test.err && err instanceof Error) {\n test.err.multiple = (test.err.multiple || []).concat(err);\n } else {\n test.err = err;\n }\n failures.push(test);\n });\n}\n\n/**\n * Outputs common epilogue used by many of the bundled reporters.\n *\n * @public\n * @memberof Mocha.reporters\n */\nBase.prototype.epilogue = function () {\n var stats = this.stats;\n var fmt;\n\n Base.consoleLog();\n\n // passes\n fmt =\n color(\"bright pass\", \" \") +\n color(\"green\", \" %d passing\") +\n color(\"light\", \" (%s)\");\n\n Base.consoleLog(fmt, stats.passes || 0, milliseconds(stats.duration));\n\n // pending\n if (stats.pending) {\n fmt = color(\"pending\", \" \") + color(\"pending\", \" %d pending\");\n\n Base.consoleLog(fmt, stats.pending);\n }\n\n // failures\n if (stats.failures) {\n fmt = color(\"fail\", \" %d failing\");\n\n Base.consoleLog(fmt, stats.failures);\n\n Base.list(this.failures);\n Base.consoleLog();\n }\n\n Base.consoleLog();\n};\n\n/**\n * Pads the given `str` to `len`.\n *\n * @private\n * @param {string} str\n * @param {string} len\n * @return {string}\n */\nfunction pad(str, len) {\n str = String(str);\n return Array(len - str.length + 1).join(\" \") + str;\n}\n\n/**\n * Returns inline diff between 2 strings with coloured ANSI output.\n *\n * @private\n * @param {String} actual\n * @param {String} expected\n * @return {string} Diff\n */\nfunction inlineDiff(actual, expected) {\n var msg = errorDiff(actual, expected);\n\n // linenos\n var lines = msg.split(\"\\n\");\n if (lines.length > 4) {\n var width = String(lines.length).length;\n msg = lines\n .map(function (str, i) {\n return pad(++i, width) + \" |\" + \" \" + str;\n })\n .join(\"\\n\");\n }\n\n // legend\n msg =\n \"\\n\" +\n color(\"diff removed inline\", \"actual\") +\n \" \" +\n color(\"diff added inline\", \"expected\") +\n \"\\n\\n\" +\n msg +\n \"\\n\";\n\n // indent\n msg = msg.replace(/^/gm, \" \");\n return msg;\n}\n\n/**\n * Returns unified diff between two strings with coloured ANSI output.\n *\n * @private\n * @param {String} actual\n * @param {String} expected\n * @return {string} The diff.\n */\nfunction unifiedDiff(actual, expected) {\n var indent = \" \";\n function cleanUp(line) {\n if (line[0] === \"+\") {\n return indent + colorLines(\"diff added\", line);\n }\n if (line[0] === \"-\") {\n return indent + colorLines(\"diff removed\", line);\n }\n if (line.match(/@@/)) {\n return \"--\";\n }\n if (line.match(/\\\\ No newline/)) {\n return null;\n }\n return indent + line;\n }\n function notBlank(line) {\n return typeof line !== \"undefined\" && line !== null;\n }\n var msg = diff.createPatch(\"string\", actual, expected);\n var lines = msg.split(\"\\n\").splice(5);\n return (\n \"\\n \" +\n colorLines(\"diff added\", \"+ expected\") +\n \" \" +\n colorLines(\"diff removed\", \"- actual\") +\n \"\\n\\n\" +\n lines.map(cleanUp).filter(notBlank).join(\"\\n\")\n );\n}\n\n/**\n * Returns character diff for `err`.\n *\n * @private\n * @param {String} actual\n * @param {String} expected\n * @return {string} the diff\n */\nfunction errorDiff(actual, expected) {\n return diff\n .diffWordsWithSpace(actual, expected)\n .map(function (str) {\n if (str.added) {\n return colorLines(\"diff added inline\", str.value);\n }\n if (str.removed) {\n return colorLines(\"diff removed inline\", str.value);\n }\n return str.value;\n })\n .join(\"\");\n}\n\n/**\n * Colors lines for `str`, using the color `name`.\n *\n * @private\n * @param {string} name\n * @param {string} str\n * @return {string}\n */\nfunction colorLines(name, str) {\n return str\n .split(\"\\n\")\n .map(function (str) {\n return color(name, str);\n })\n .join(\"\\n\");\n}\n\n/**\n * Object#toString reference.\n */\nvar objToString = Object.prototype.toString;\n\n/**\n * Checks that a / b have the same type.\n *\n * @private\n * @param {Object} a\n * @param {Object} b\n * @return {boolean}\n */\nfunction sameType(a, b) {\n return objToString.call(a) === objToString.call(b);\n}\n\nBase.consoleLog = consoleLog;\n\nBase.abstract = true;\n","\"use strict\";\n\n/**\n * @typedef {import('../runner.js')} Runner\n */\n\n/**\n * @module Dot\n */\n/**\n * Module dependencies.\n */\n\nvar Base = require(\"./base\");\nvar inherits = require(\"../utils\").inherits;\nvar constants = require(\"../runner\").constants;\nvar EVENT_TEST_PASS = constants.EVENT_TEST_PASS;\nvar EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL;\nvar EVENT_RUN_BEGIN = constants.EVENT_RUN_BEGIN;\nvar EVENT_TEST_PENDING = constants.EVENT_TEST_PENDING;\nvar EVENT_RUN_END = constants.EVENT_RUN_END;\n\n/**\n * Expose `Dot`.\n */\n\nexports = module.exports = Dot;\n\n/**\n * Constructs a new `Dot` reporter instance.\n *\n * @public\n * @class\n * @memberof Mocha.reporters\n * @extends Mocha.reporters.Base\n * @param {Runner} runner - Instance triggers reporter actions.\n * @param {Object} [options] - runner options\n */\nfunction Dot(runner, options) {\n Base.call(this, runner, options);\n\n var self = this;\n var width = (Base.window.width * 0.75) | 0;\n var n = -1;\n\n runner.on(EVENT_RUN_BEGIN, function () {\n process.stdout.write(\"\\n\");\n });\n\n runner.on(EVENT_TEST_PENDING, function () {\n if (++n % width === 0) {\n process.stdout.write(\"\\n \");\n }\n process.stdout.write(Base.color(\"pending\", Base.symbols.comma));\n });\n\n runner.on(EVENT_TEST_PASS, function (test) {\n if (++n % width === 0) {\n process.stdout.write(\"\\n \");\n }\n if (test.speed === \"slow\") {\n process.stdout.write(Base.color(\"bright yellow\", Base.symbols.dot));\n } else {\n process.stdout.write(Base.color(test.speed, Base.symbols.dot));\n }\n });\n\n runner.on(EVENT_TEST_FAIL, function () {\n if (++n % width === 0) {\n process.stdout.write(\"\\n \");\n }\n process.stdout.write(Base.color(\"fail\", Base.symbols.bang));\n });\n\n runner.once(EVENT_RUN_END, function () {\n process.stdout.write(\"\\n\");\n self.epilogue();\n });\n}\n\n/**\n * Inherit from `Base.prototype`.\n */\ninherits(Dot, Base);\n\nDot.description = \"dot matrix representation\";\n","\"use strict\";\n\n/**\n * @typedef {import('../runner.js')} Runner\n */\n\n/**\n * @module Doc\n */\n/**\n * Module dependencies.\n */\n\nvar Base = require(\"./base\");\nvar utils = require(\"../utils\");\nvar constants = require(\"../runner\").constants;\nvar EVENT_TEST_PASS = constants.EVENT_TEST_PASS;\nvar EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL;\nvar EVENT_SUITE_BEGIN = constants.EVENT_SUITE_BEGIN;\nvar EVENT_SUITE_END = constants.EVENT_SUITE_END;\n\n/**\n * Expose `Doc`.\n */\n\nexports = module.exports = Doc;\n\n/**\n * Constructs a new `Doc` reporter instance.\n *\n * @public\n * @class\n * @memberof Mocha.reporters\n * @extends Mocha.reporters.Base\n * @param {Runner} runner - Instance triggers reporter actions.\n * @param {Object} [options] - runner options\n */\nfunction Doc(runner, options) {\n Base.call(this, runner, options);\n\n var indents = 2;\n\n function indent() {\n return Array(indents).join(\" \");\n }\n\n runner.on(EVENT_SUITE_BEGIN, function (suite) {\n if (suite.root) {\n return;\n }\n ++indents;\n Base.consoleLog('%s
          ', indent());\n ++indents;\n Base.consoleLog(\"%s

          %s

          \", indent(), utils.escape(suite.title));\n Base.consoleLog(\"%s
          \", indent());\n });\n\n runner.on(EVENT_SUITE_END, function (suite) {\n if (suite.root) {\n return;\n }\n Base.consoleLog(\"%s
          \", indent());\n --indents;\n Base.consoleLog(\"%s
          \", indent());\n --indents;\n });\n\n runner.on(EVENT_TEST_PASS, function (test) {\n Base.consoleLog(\"%s
          %s
          \", indent(), utils.escape(test.title));\n Base.consoleLog(\"%s
          %s
          \", indent(), utils.escape(test.file));\n var code = utils.escape(utils.clean(test.body));\n Base.consoleLog(\"%s
          %s
          \", indent(), code);\n });\n\n runner.on(EVENT_TEST_FAIL, function (test, err) {\n Base.consoleLog(\n '%s
          %s
          ',\n indent(),\n utils.escape(test.title),\n );\n Base.consoleLog(\n '%s
          %s
          ',\n indent(),\n utils.escape(test.file),\n );\n var code = utils.escape(utils.clean(test.body));\n Base.consoleLog(\n '%s
          %s
          ',\n indent(),\n code,\n );\n Base.consoleLog(\n '%s
          %s
          ',\n indent(),\n utils.escape(err),\n );\n });\n}\n\nDoc.description = \"HTML documentation\";\n","\"use strict\";\n\n/**\n * @typedef {import('../runner.js')} Runner\n * @typedef {import('../test.js')} Test\n */\n\n/**\n * @module TAP\n */\n/**\n * Module dependencies.\n */\n\nvar util = require(\"node:util\");\nvar Base = require(\"./base\");\nvar constants = require(\"../runner\").constants;\nvar EVENT_TEST_PASS = constants.EVENT_TEST_PASS;\nvar EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL;\nvar EVENT_RUN_BEGIN = constants.EVENT_RUN_BEGIN;\nvar EVENT_RUN_END = constants.EVENT_RUN_END;\nvar EVENT_TEST_PENDING = constants.EVENT_TEST_PENDING;\nvar EVENT_TEST_END = constants.EVENT_TEST_END;\nvar inherits = require(\"../utils\").inherits;\nvar sprintf = util.format;\n\n/**\n * Expose `TAP`.\n */\n\nexports = module.exports = TAP;\n\n/**\n * Constructs a new `TAP` reporter instance.\n *\n * @public\n * @class\n * @memberof Mocha.reporters\n * @extends Mocha.reporters.Base\n * @param {Runner} runner - Instance triggers reporter actions.\n * @param {Object} [options] - runner options\n */\nfunction TAP(runner, options) {\n Base.call(this, runner, options);\n\n var self = this;\n var n = 1;\n\n var tapVersion = \"12\";\n if (options && options.reporterOptions) {\n if (options.reporterOptions.tapVersion) {\n tapVersion = options.reporterOptions.tapVersion.toString();\n }\n }\n\n this._producer = createProducer(tapVersion);\n\n runner.once(EVENT_RUN_BEGIN, function () {\n self._producer.writeVersion();\n });\n\n runner.on(EVENT_TEST_END, function () {\n ++n;\n });\n\n runner.on(EVENT_TEST_PENDING, function (test) {\n self._producer.writePending(n, test);\n });\n\n runner.on(EVENT_TEST_PASS, function (test) {\n self._producer.writePass(n, test);\n });\n\n runner.on(EVENT_TEST_FAIL, function (test, err) {\n self._producer.writeFail(n, test, err);\n });\n\n runner.once(EVENT_RUN_END, function () {\n self._producer.writeEpilogue(runner.stats);\n });\n}\n\n/**\n * Inherit from `Base.prototype`.\n */\ninherits(TAP, Base);\n\n/**\n * Returns a TAP-safe title of `test`.\n *\n * @private\n * @param {Test} test - Test instance.\n * @return {String} title with any hash character removed\n */\nfunction title(test) {\n return test.fullTitle().replace(/#/g, \"\");\n}\n\n/**\n * Writes newline-terminated formatted string to reporter output stream.\n *\n * @private\n * @param {string} format - `printf`-like format string\n * @param {...*} [varArgs] - Format string arguments\n */\nfunction println() {\n var vargs = Array.from(arguments);\n vargs[0] += \"\\n\";\n process.stdout.write(sprintf.apply(null, vargs));\n}\n\n/**\n * Returns a `tapVersion`-appropriate TAP producer instance, if possible.\n *\n * @private\n * @param {string} tapVersion - Version of TAP specification to produce.\n * @returns {TAPProducer} specification-appropriate instance\n * @throws {Error} if specification version has no associated producer.\n */\nfunction createProducer(tapVersion) {\n var producers = {\n 12: new TAP12Producer(),\n 13: new TAP13Producer(),\n };\n var producer = producers[tapVersion];\n\n if (!producer) {\n throw new Error(\n \"invalid or unsupported TAP version: \" + JSON.stringify(tapVersion),\n );\n }\n\n return producer;\n}\n\n/**\n * @summary\n * Constructs a new TAPProducer.\n *\n * @description\n * Only to be used as an abstract base class.\n *\n * @private\n * @constructor\n */\nfunction TAPProducer() {}\n\n/**\n * Writes the TAP version to reporter output stream.\n *\n * @abstract\n */\nTAPProducer.prototype.writeVersion = function () {};\n\n/**\n * Writes the plan to reporter output stream.\n *\n * @abstract\n * @param {number} ntests - Number of tests that are planned to run.\n */\nTAPProducer.prototype.writePlan = function (ntests) {\n println(\"%d..%d\", 1, ntests);\n};\n\n/**\n * Writes that test passed to reporter output stream.\n *\n * @abstract\n * @param {number} n - Index of test that passed.\n * @param {Test} test - Instance containing test information.\n */\nTAPProducer.prototype.writePass = function (n, test) {\n println(\"ok %d %s\", n, title(test));\n};\n\n/**\n * Writes that test was skipped to reporter output stream.\n *\n * @abstract\n * @param {number} n - Index of test that was skipped.\n * @param {Test} test - Instance containing test information.\n */\nTAPProducer.prototype.writePending = function (n, test) {\n println(\"ok %d %s # SKIP -\", n, title(test));\n};\n\n/**\n * Writes that test failed to reporter output stream.\n *\n * @abstract\n * @param {number} n - Index of test that failed.\n * @param {Test} test - Instance containing test information.\n */\nTAPProducer.prototype.writeFail = function (n, test) {\n println(\"not ok %d %s\", n, title(test));\n};\n\n/**\n * Writes the summary epilogue to reporter output stream.\n *\n * @abstract\n * @param {Object} stats - Object containing run statistics.\n */\nTAPProducer.prototype.writeEpilogue = function (stats) {\n // :TBD: Why is this not counting pending tests?\n println(\"# tests \" + (stats.passes + stats.failures));\n println(\"# pass \" + stats.passes);\n // :TBD: Why are we not showing pending results?\n println(\"# fail \" + stats.failures);\n this.writePlan(stats.passes + stats.failures + stats.pending);\n};\n\n/**\n * @summary\n * Constructs a new TAP12Producer.\n *\n * @description\n * Produces output conforming to the TAP12 specification.\n *\n * @private\n * @constructor\n * @extends TAPProducer\n * @see {@link https://testanything.org/tap-specification.html|Specification}\n */\nfunction TAP12Producer() {\n /**\n * Writes that test failed to reporter output stream, with error formatting.\n * @override\n */\n this.writeFail = function (n, test, err) {\n TAPProducer.prototype.writeFail.call(this, n, test, err);\n if (err.message) {\n println(err.message.replace(/^/gm, \" \"));\n }\n if (err.stack) {\n println(err.stack.replace(/^/gm, \" \"));\n }\n };\n}\n\n/**\n * Inherit from `TAPProducer.prototype`.\n */\ninherits(TAP12Producer, TAPProducer);\n\n/**\n * @summary\n * Constructs a new TAP13Producer.\n *\n * @description\n * Produces output conforming to the TAP13 specification.\n *\n * @private\n * @constructor\n * @extends TAPProducer\n * @see {@link https://testanything.org/tap-version-13-specification.html|Specification}\n */\nfunction TAP13Producer() {\n /**\n * Writes the TAP version to reporter output stream.\n * @override\n */\n this.writeVersion = function () {\n println(\"TAP version 13\");\n };\n\n /**\n * Writes that test failed to reporter output stream, with error formatting.\n * @override\n */\n this.writeFail = function (n, test, err) {\n TAPProducer.prototype.writeFail.call(this, n, test, err);\n var emitYamlBlock = err.message != null || err.stack != null;\n if (emitYamlBlock) {\n println(indent(1) + \"---\");\n if (err.message) {\n println(indent(2) + \"message: |-\");\n println(err.message.replace(/^/gm, indent(3)));\n }\n if (err.stack) {\n println(indent(2) + \"stack: |-\");\n println(err.stack.replace(/^/gm, indent(3)));\n }\n println(indent(1) + \"...\");\n }\n };\n\n function indent(level) {\n return Array(level + 1).join(\" \");\n }\n}\n\n/**\n * Inherit from `TAPProducer.prototype`.\n */\ninherits(TAP13Producer, TAPProducer);\n\nTAP.description = \"TAP-compatible output\";\n","\"use strict\";\n\n/**\n * @typedef {import('../runner.js')} Runner\n */\n\n/**\n * @module JSON\n */\n/**\n * Module dependencies.\n */\n\nvar Base = require(\"./base\");\nvar fs = require(\"node:fs\");\nvar path = require(\"node:path\");\nconst createUnsupportedError = require(\"../errors\").createUnsupportedError;\nconst utils = require(\"../utils\");\nvar constants = require(\"../runner\").constants;\nvar EVENT_TEST_PASS = constants.EVENT_TEST_PASS;\nvar EVENT_TEST_PENDING = constants.EVENT_TEST_PENDING;\nvar EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL;\nvar EVENT_TEST_END = constants.EVENT_TEST_END;\nvar EVENT_RUN_END = constants.EVENT_RUN_END;\n\n/**\n * Expose `JSON`.\n */\n\nexports = module.exports = JSONReporter;\n\n/**\n * Constructs a new `JSON` reporter instance.\n *\n * @public\n * @class JSON\n * @memberof Mocha.reporters\n * @extends Mocha.reporters.Base\n * @param {Runner} runner - Instance triggers reporter actions.\n * @param {Object} [options] - runner options\n */\nfunction JSONReporter(runner, options = {}) {\n Base.call(this, runner, options);\n\n var self = this;\n var tests = [];\n var pending = [];\n var failures = [];\n var passes = [];\n var output;\n\n if (options.reporterOption && options.reporterOption.output) {\n if (utils.isBrowser()) {\n throw createUnsupportedError(\"file output not supported in browser\");\n }\n output = options.reporterOption.output;\n }\n\n runner.on(EVENT_TEST_END, function (test) {\n tests.push(test);\n });\n\n runner.on(EVENT_TEST_PASS, function (test) {\n passes.push(test);\n });\n\n runner.on(EVENT_TEST_FAIL, function (test) {\n failures.push(test);\n });\n\n runner.on(EVENT_TEST_PENDING, function (test) {\n pending.push(test);\n });\n\n runner.once(EVENT_RUN_END, function () {\n var obj = {\n stats: self.stats,\n tests: tests.map(clean),\n pending: pending.map(clean),\n failures: failures.map(clean),\n passes: passes.map(clean),\n };\n\n runner.testResults = obj;\n\n var json = JSON.stringify(obj, null, 2);\n if (output) {\n try {\n fs.mkdirSync(path.dirname(output), { recursive: true });\n fs.writeFileSync(output, json);\n } catch (err) {\n console.error(\n `${Base.symbols.err} [mocha] writing output to \"${output}\" failed: ${err.message}\\n`,\n );\n process.stdout.write(json);\n }\n } else {\n process.stdout.write(json);\n }\n });\n}\n\n/**\n * Return a plain-object representation of `test`\n * free of cyclic properties etc.\n *\n * @private\n * @param {Object} test\n * @return {Object}\n */\nfunction clean(test) {\n var err = test.err || {};\n if (err instanceof Error) {\n err = errorJSON(err);\n }\n\n return {\n title: test.title,\n fullTitle: test.fullTitle(),\n file: test.file,\n duration: test.duration,\n currentRetry: test.currentRetry(),\n speed: test.speed,\n err: cleanCycles(err),\n };\n}\n\n/**\n * Replaces any circular references inside `obj` with '[object Object]'\n *\n * @private\n * @param {Object} obj\n * @return {Object}\n */\nfunction cleanCycles(obj) {\n var cache = [];\n return JSON.parse(\n JSON.stringify(obj, function (key, value) {\n if (typeof value === \"object\" && value !== null) {\n if (cache.indexOf(value) !== -1) {\n // Instead of going in a circle, we'll print [object Object]\n return \"\" + value;\n }\n cache.push(value);\n }\n\n return value;\n }),\n );\n}\n\n/**\n * Transform an Error object into a JSON object.\n *\n * @private\n * @param {Error} err\n * @return {Object}\n */\nfunction errorJSON(err) {\n var res = {};\n Object.getOwnPropertyNames(err).forEach(function (key) {\n res[key] = err[key];\n }, err);\n return res;\n}\n\nJSONReporter.description = \"single JSON object\";\n","\"use strict\";\n\n/**\n * @typedef {import('../runner.js')} Runner\n */\n\n/* eslint-env browser */\n/**\n * @module HTML\n */\n/**\n * Module dependencies.\n */\n\nvar Base = require(\"./base\");\nvar utils = require(\"../utils\");\nvar escapeRe = require(\"escape-string-regexp\");\nvar constants = require(\"../runner\").constants;\nvar EVENT_TEST_PASS = constants.EVENT_TEST_PASS;\nvar EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL;\nvar EVENT_SUITE_BEGIN = constants.EVENT_SUITE_BEGIN;\nvar EVENT_SUITE_END = constants.EVENT_SUITE_END;\nvar EVENT_TEST_PENDING = constants.EVENT_TEST_PENDING;\nvar escape = utils.escape;\n\n/**\n * Save timer references to avoid Sinon interfering (see GH-237).\n */\n\nvar Date = global.Date;\n\n/**\n * Expose `HTML`.\n */\n\nexports = module.exports = HTML;\n\n/**\n * Stats template: Result, progress, passes, failures, and duration.\n */\n\nvar statsTemplate =\n '\";\n\nvar playIcon = \"‣\";\n\n/**\n * Constructs a new `HTML` reporter instance.\n *\n * @public\n * @class\n * @memberof Mocha.reporters\n * @extends Mocha.reporters.Base\n * @param {Runner} runner - Instance triggers reporter actions.\n * @param {Object} [options] - runner options\n */\nfunction HTML(runner, options) {\n Base.call(this, runner, options);\n\n var self = this;\n var stats = this.stats;\n var stat = fragment(statsTemplate);\n var items = stat.getElementsByTagName(\"li\");\n const resultIndex = 0;\n const progressIndex = 1;\n const passesIndex = 2;\n const failuresIndex = 3;\n const durationIndex = 4;\n /** Stat item containing the root suite pass or fail indicator (hasFailures ? '✖' : '✓') */\n var resultIndicator = items[resultIndex];\n /** Passes text and count */\n const passesStat = items[passesIndex];\n /** Stat item containing the pass count (not the word, just the number) */\n const passesCount = passesStat.getElementsByTagName(\"em\")[0];\n /** Stat item linking to filter to show only passing tests */\n const passesLink = passesStat.getElementsByTagName(\"a\")[0];\n /** Failures text and count */\n const failuresStat = items[failuresIndex];\n /** Stat item containing the failure count (not the word, just the number) */\n const failuresCount = failuresStat.getElementsByTagName(\"em\")[0];\n /** Stat item linking to filter to show only failing tests */\n const failuresLink = failuresStat.getElementsByTagName(\"a\")[0];\n /** Stat item linking to the duration time (not the word or unit, just the number) */\n var duration = items[durationIndex].getElementsByTagName(\"em\")[0];\n var report = fragment('
            ');\n var stack = [report];\n var progressText = items[progressIndex].getElementsByTagName(\"div\")[0];\n var progressBar = items[progressIndex].getElementsByTagName(\"progress\")[0];\n var progressRing = [\n items[progressIndex].getElementsByClassName(\"ring-flatlight\")[0],\n items[progressIndex].getElementsByClassName(\"ring-highlight\")[0],\n ];\n var root = document.getElementById(\"mocha\");\n\n if (!root) {\n return error(\"#mocha div missing, add it to your document\");\n }\n\n // pass toggle\n on(passesLink, \"click\", function (evt) {\n evt.preventDefault();\n unhide();\n var name = /pass/.test(report.className) ? \"\" : \" pass\";\n report.className = report.className.replace(/fail|pass/g, \"\") + name;\n if (report.className.trim()) {\n hideSuitesWithout(\"test pass\");\n }\n });\n\n // failure toggle\n on(failuresLink, \"click\", function (evt) {\n evt.preventDefault();\n unhide();\n var name = /fail/.test(report.className) ? \"\" : \" fail\";\n report.className = report.className.replace(/fail|pass/g, \"\") + name;\n if (report.className.trim()) {\n hideSuitesWithout(\"test fail\");\n }\n });\n\n root.appendChild(stat);\n root.appendChild(report);\n\n runner.on(EVENT_SUITE_BEGIN, function (suite) {\n if (suite.root) {\n return;\n }\n\n // suite\n var url = self.suiteURL(suite);\n var el = fragment(\n '
          • %s

          • ',\n url,\n escape(suite.title),\n );\n\n // container\n stack[0].appendChild(el);\n stack.unshift(document.createElement(\"ul\"));\n el.appendChild(stack[0]);\n });\n\n runner.on(EVENT_SUITE_END, function (suite) {\n if (suite.root) {\n if (stats.failures === 0) {\n text(resultIndicator, \"✓\");\n stat.className += \" pass\";\n }\n updateStats();\n return;\n }\n stack.shift();\n });\n\n runner.on(EVENT_TEST_PASS, function (test) {\n var url = self.testURL(test);\n var markup =\n '
          • %e%ems ' +\n '' +\n playIcon +\n \"

          • \";\n var el = fragment(markup, test.speed, test.title, test.duration, url);\n self.addCodeToggle(el, test.body);\n appendToStack(el);\n updateStats();\n });\n\n runner.on(EVENT_TEST_FAIL, function (test) {\n // Update stat items\n text(resultIndicator, \"✖\");\n stat.className += \" fail\";\n\n var el = fragment(\n '
          • %e ' +\n playIcon +\n \"

          • \",\n test.title,\n self.testURL(test),\n );\n var stackString; // Note: Includes leading newline\n var message = test.err.toString();\n\n // <=IE7 stringifies to [Object Error]. Since it can be overloaded, we\n // check for the result of the stringifying.\n if (message === \"[object Error]\") {\n message = test.err.message;\n }\n\n if (test.err.stack) {\n var indexOfMessage = test.err.stack.indexOf(test.err.message);\n if (indexOfMessage === -1) {\n stackString = test.err.stack;\n } else {\n stackString = test.err.stack.slice(\n test.err.message.length + indexOfMessage,\n );\n }\n } else if (test.err.sourceURL && test.err.line !== undefined) {\n // Safari doesn't give you a stack. Let's at least provide a source line.\n stackString = \"\\n(\" + test.err.sourceURL + \":\" + test.err.line + \")\";\n }\n\n stackString = stackString || \"\";\n\n if (test.err.htmlMessage && stackString) {\n el.appendChild(\n fragment(\n '
            %s\\n
            %e
            ',\n test.err.htmlMessage,\n stackString,\n ),\n );\n } else if (test.err.htmlMessage) {\n el.appendChild(\n fragment('
            %s
            ', test.err.htmlMessage),\n );\n } else {\n el.appendChild(\n fragment('
            %e%e
            ', message, stackString),\n );\n }\n\n self.addCodeToggle(el, test.body);\n appendToStack(el);\n updateStats();\n });\n\n runner.on(EVENT_TEST_PENDING, function (test) {\n var el = fragment(\n '
          • %e

          • ',\n test.title,\n );\n appendToStack(el);\n updateStats();\n });\n\n function appendToStack(el) {\n // Don't call .appendChild if #mocha-report was already .shift()'ed off the stack.\n if (stack[0]) {\n stack[0].appendChild(el);\n }\n }\n\n function updateStats() {\n var percent = ((stats.tests / runner.total) * 100) | 0;\n progressBar.value = percent;\n if (progressText) {\n // setting a toFixed that is too low, makes small changes to progress not shown\n // setting it too high, makes the progress text longer then it needs to\n // to address this, calculate the toFixed based on the magnitude of total\n var decimalPlaces = Math.ceil(Math.log10(runner.total / 100));\n text(\n progressText,\n percent.toFixed(Math.min(Math.max(decimalPlaces, 0), 100)) + \"%\",\n );\n }\n if (progressRing) {\n var radius = parseFloat(\n getComputedStyle(progressRing[0]).getPropertyValue(\"r\"),\n );\n var wholeArc = Math.PI * 2 * radius;\n var highlightArc = percent * (wholeArc / 100);\n // The progress ring is in 2 parts, the flatlight color and highlight color.\n // Rendering both on top of the other, seems to make a 3rd color on the edges.\n // To create 1 whole ring with 2 colors, both parts are inverse of the other.\n progressRing[0].style[\"stroke-dasharray\"] =\n `0,${highlightArc}px,${wholeArc}px`;\n progressRing[1].style[\"stroke-dasharray\"] =\n `${highlightArc}px,${wholeArc}px`;\n }\n\n // update stats\n var ms = new Date() - stats.start;\n text(passesCount, stats.passes);\n text(failuresCount, stats.failures);\n text(duration, (ms / 1000).toFixed(2));\n }\n}\n\n/**\n * Makes a URL, preserving querystring (\"search\") parameters.\n *\n * @param {string} s\n * @return {string} A new URL.\n */\nfunction makeUrl(s) {\n var search = window.location.search;\n\n // Remove previous {grep, fgrep, invert} query parameters if present\n if (search) {\n search = search\n .replace(/[?&](?:f?grep|invert)=[^&\\s]*/g, \"\")\n .replace(/^&/, \"?\");\n }\n\n return (\n window.location.pathname +\n (search ? search + \"&\" : \"?\") +\n \"grep=\" +\n encodeURIComponent(s)\n );\n}\n\n/**\n * Provide suite URL.\n *\n * @param {Object} [suite]\n */\nHTML.prototype.suiteURL = function (suite) {\n return makeUrl(\"^\" + escapeRe(suite.fullTitle()) + \" \");\n};\n\n/**\n * Provide test URL.\n *\n * @param {Object} [test]\n */\nHTML.prototype.testURL = function (test) {\n return makeUrl(\"^\" + escapeRe(test.fullTitle()) + \"$\");\n};\n\n/**\n * Adds code toggle functionality for the provided test's list element.\n *\n * @param {HTMLLIElement} el\n * @param {string} contents\n */\nHTML.prototype.addCodeToggle = function (el, contents) {\n var h2 = el.getElementsByTagName(\"h2\")[0];\n\n on(h2, \"click\", function () {\n pre.style.display = pre.style.display === \"none\" ? \"block\" : \"none\";\n });\n\n var pre = fragment(\"
            %e
            \", utils.clean(contents));\n el.appendChild(pre);\n pre.style.display = \"none\";\n};\n\n/**\n * Display error `msg`.\n *\n * @param {string} msg\n */\nfunction error(msg) {\n document.body.appendChild(fragment('
            %s
            ', msg));\n}\n\n/**\n * Return a DOM fragment from `html`.\n *\n * @param {string} html\n */\nfunction fragment(html) {\n var args = arguments;\n var div = document.createElement(\"div\");\n var i = 1;\n\n div.innerHTML = html.replace(/%([se])/g, function (_, type) {\n switch (type) {\n case \"s\":\n return String(args[i++]);\n case \"e\":\n return escape(args[i++]);\n // no default\n }\n });\n\n return div.firstChild;\n}\n\n/**\n * Check for suites that do not have elements\n * with `classname`, and hide them.\n *\n * @param {text} classname\n */\nfunction hideSuitesWithout(classname) {\n var suites = document.getElementsByClassName(\"suite\");\n for (var i = 0; i < suites.length; i++) {\n var els = suites[i].getElementsByClassName(classname);\n if (!els.length) {\n suites[i].className += \" hidden\";\n }\n }\n}\n\n/**\n * Unhide .hidden suites.\n */\nfunction unhide() {\n var els = document.getElementsByClassName(\"suite hidden\");\n while (els.length > 0) {\n els[0].className = els[0].className.replace(\"suite hidden\", \"suite\");\n }\n}\n\n/**\n * Set an element's text contents.\n *\n * @param {HTMLElement} el\n * @param {string} contents\n */\nfunction text(el, contents) {\n if (el.textContent) {\n el.textContent = contents;\n } else {\n el.innerText = contents;\n }\n}\n\n/**\n * Listen on `event` with callback `fn`.\n */\nfunction on(el, event, fn) {\n if (el.addEventListener) {\n el.addEventListener(event, fn, false);\n } else {\n el.attachEvent(\"on\" + event, fn);\n }\n}\n\nHTML.browserOnly = true;\n","\"use strict\";\n\n/**\n * @typedef {import('../runner.js')} Runner\n */\n\n/**\n * @module List\n */\n/**\n * Module dependencies.\n */\n\nvar Base = require(\"./base\");\nvar inherits = require(\"../utils\").inherits;\nvar constants = require(\"../runner\").constants;\nvar EVENT_RUN_BEGIN = constants.EVENT_RUN_BEGIN;\nvar EVENT_RUN_END = constants.EVENT_RUN_END;\nvar EVENT_TEST_BEGIN = constants.EVENT_TEST_BEGIN;\nvar EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL;\nvar EVENT_TEST_PASS = constants.EVENT_TEST_PASS;\nvar EVENT_TEST_PENDING = constants.EVENT_TEST_PENDING;\nvar color = Base.color;\nvar cursor = Base.cursor;\n\n/**\n * Expose `List`.\n */\n\nexports = module.exports = List;\n\n/**\n * Constructs a new `List` reporter instance.\n *\n * @public\n * @class\n * @memberof Mocha.reporters\n * @extends Mocha.reporters.Base\n * @param {Runner} runner - Instance triggers reporter actions.\n * @param {Object} [options] - runner options\n */\nfunction List(runner, options) {\n Base.call(this, runner, options);\n\n var self = this;\n var n = 0;\n\n runner.on(EVENT_RUN_BEGIN, function () {\n Base.consoleLog();\n });\n\n runner.on(EVENT_TEST_BEGIN, function (test) {\n process.stdout.write(color(\"pass\", \" \" + test.fullTitle() + \": \"));\n });\n\n runner.on(EVENT_TEST_PENDING, function (test) {\n var fmt = color(\"checkmark\", \" -\") + color(\"pending\", \" %s\");\n Base.consoleLog(fmt, test.fullTitle());\n });\n\n runner.on(EVENT_TEST_PASS, function (test) {\n var fmt =\n color(\"checkmark\", \" \" + Base.symbols.ok) +\n color(\"pass\", \" %s: \") +\n color(test.speed, \"%dms\");\n cursor.CR();\n Base.consoleLog(fmt, test.fullTitle(), test.duration);\n });\n\n runner.on(EVENT_TEST_FAIL, function (test) {\n cursor.CR();\n Base.consoleLog(color(\"fail\", \" %d) %s\"), ++n, test.fullTitle());\n });\n\n runner.once(EVENT_RUN_END, self.epilogue.bind(self));\n}\n\n/**\n * Inherit from `Base.prototype`.\n */\ninherits(List, Base);\n\nList.description = 'like \"spec\" reporter but flat';\n","\"use strict\";\n\n/**\n * @typedef {import('../runner.js')} Runner\n */\n\n/**\n * @module Min\n */\n/**\n * Module dependencies.\n */\n\nvar Base = require(\"./base\");\nvar inherits = require(\"../utils\").inherits;\nvar constants = require(\"../runner\").constants;\nvar EVENT_RUN_END = constants.EVENT_RUN_END;\nvar EVENT_RUN_BEGIN = constants.EVENT_RUN_BEGIN;\n\n/**\n * Expose `Min`.\n */\n\nexports = module.exports = Min;\n\n/**\n * Constructs a new `Min` reporter instance.\n *\n * @description\n * This minimal test reporter is best used with '--watch'.\n *\n * @public\n * @class\n * @memberof Mocha.reporters\n * @extends Mocha.reporters.Base\n * @param {Runner} runner - Instance triggers reporter actions.\n * @param {Object} [options] - runner options\n */\nfunction Min(runner, options) {\n Base.call(this, runner, options);\n\n runner.on(EVENT_RUN_BEGIN, function () {\n // clear screen\n process.stdout.write(\"\\u001b[2J\");\n // set cursor position\n process.stdout.write(\"\\u001b[1;3H\");\n });\n\n runner.once(EVENT_RUN_END, this.epilogue.bind(this));\n}\n\n/**\n * Inherit from `Base.prototype`.\n */\ninherits(Min, Base);\n\nMin.description = \"essentially just a summary\";\n","\"use strict\";\n\n/**\n * @typedef {import('../runner.js')} Runner\n * @typedef {import('../test.js')} Test\n */\n\n/**\n * @module Spec\n */\n/**\n * Module dependencies.\n */\n\nvar Base = require(\"./base\");\nvar constants = require(\"../runner\").constants;\nvar EVENT_RUN_BEGIN = constants.EVENT_RUN_BEGIN;\nvar EVENT_RUN_END = constants.EVENT_RUN_END;\nvar EVENT_SUITE_BEGIN = constants.EVENT_SUITE_BEGIN;\nvar EVENT_SUITE_END = constants.EVENT_SUITE_END;\nvar EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL;\nvar EVENT_TEST_PASS = constants.EVENT_TEST_PASS;\nvar EVENT_TEST_PENDING = constants.EVENT_TEST_PENDING;\nvar inherits = require(\"../utils\").inherits;\nvar color = Base.color;\n\n/**\n * Expose `Spec`.\n */\n\nexports = module.exports = Spec;\n\n/**\n * Constructs a new `Spec` reporter instance.\n *\n * @public\n * @class\n * @memberof Mocha.reporters\n * @extends Mocha.reporters.Base\n * @param {Runner} runner - Instance triggers reporter actions.\n * @param {Object} [options] - runner options\n */\nfunction Spec(runner, options) {\n Base.call(this, runner, options);\n\n var self = this;\n var indents = 0;\n var n = 0;\n\n function indent() {\n return Array(indents).join(\" \");\n }\n\n runner.on(EVENT_RUN_BEGIN, function () {\n Base.consoleLog();\n });\n\n runner.on(EVENT_SUITE_BEGIN, function (suite) {\n ++indents;\n Base.consoleLog(color(\"suite\", \"%s%s\"), indent(), suite.title);\n });\n\n runner.on(EVENT_SUITE_END, function () {\n --indents;\n if (indents === 1) {\n Base.consoleLog();\n }\n });\n\n runner.on(EVENT_TEST_PENDING, function (test) {\n var fmt = indent() + color(\"pending\", \" - %s\");\n Base.consoleLog(fmt, test.title);\n });\n\n runner.on(EVENT_TEST_PASS, function (test) {\n var fmt;\n if (test.speed === \"fast\") {\n fmt =\n indent() +\n color(\"checkmark\", \" \" + Base.symbols.ok) +\n color(\"pass\", \" %s\");\n Base.consoleLog(fmt, test.title);\n } else {\n fmt =\n indent() +\n color(\"checkmark\", \" \" + Base.symbols.ok) +\n color(\"pass\", \" %s\") +\n color(test.speed, \" (%dms)\");\n Base.consoleLog(fmt, test.title, test.duration);\n }\n });\n\n runner.on(EVENT_TEST_FAIL, function (test) {\n Base.consoleLog(indent() + color(\"fail\", \" %d) %s\"), ++n, test.title);\n });\n\n runner.once(EVENT_RUN_END, self.epilogue.bind(self));\n}\n\n/**\n * Inherit from `Base.prototype`.\n */\ninherits(Spec, Base);\n\nSpec.description = \"hierarchical & verbose [default]\";\n","\"use strict\";\n\n/**\n * @typedef {import('../runner.js')} Runner\n */\n\n/**\n * @module Nyan\n */\n/**\n * Module dependencies.\n */\n\nvar Base = require(\"./base\");\nvar constants = require(\"../runner\").constants;\nvar inherits = require(\"../utils\").inherits;\nvar EVENT_RUN_BEGIN = constants.EVENT_RUN_BEGIN;\nvar EVENT_TEST_PENDING = constants.EVENT_TEST_PENDING;\nvar EVENT_TEST_PASS = constants.EVENT_TEST_PASS;\nvar EVENT_RUN_END = constants.EVENT_RUN_END;\nvar EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL;\n\n/**\n * Expose `Dot`.\n */\n\nexports = module.exports = NyanCat;\n\n/**\n * Constructs a new `Nyan` reporter instance.\n *\n * @public\n * @class Nyan\n * @memberof Mocha.reporters\n * @extends Mocha.reporters.Base\n * @param {Runner} runner - Instance triggers reporter actions.\n * @param {Object} [options] - runner options\n */\nfunction NyanCat(runner, options) {\n Base.call(this, runner, options);\n\n var self = this;\n var width = (Base.window.width * 0.75) | 0;\n var nyanCatWidth = (this.nyanCatWidth = 11);\n\n this.colorIndex = 0;\n this.numberOfLines = 4;\n this.rainbowColors = self.generateColors();\n this.scoreboardWidth = 5;\n this.tick = 0;\n this.trajectories = [[], [], [], []];\n this.trajectoryWidthMax = width - nyanCatWidth;\n\n runner.on(EVENT_RUN_BEGIN, function () {\n Base.cursor.hide();\n self.draw();\n });\n\n runner.on(EVENT_TEST_PENDING, function () {\n self.draw();\n });\n\n runner.on(EVENT_TEST_PASS, function () {\n self.draw();\n });\n\n runner.on(EVENT_TEST_FAIL, function () {\n self.draw();\n });\n\n runner.once(EVENT_RUN_END, function () {\n Base.cursor.show();\n for (var i = 0; i < self.numberOfLines; i++) {\n process.stdout.write(\"\\n\");\n }\n self.epilogue();\n });\n}\n\n/**\n * Inherit from `Base.prototype`.\n */\ninherits(NyanCat, Base);\n\n/**\n * Draw the nyan cat\n *\n * @private\n */\n\nNyanCat.prototype.draw = function () {\n this.appendRainbow();\n this.drawScoreboard();\n this.drawRainbow();\n this.drawNyanCat();\n this.tick = !this.tick;\n};\n\n/**\n * Draw the \"scoreboard\" showing the number\n * of passes, failures and pending tests.\n *\n * @private\n */\n\nNyanCat.prototype.drawScoreboard = function () {\n var stats = this.stats;\n\n function draw(type, n) {\n process.stdout.write(\" \");\n process.stdout.write(Base.color(type, n));\n process.stdout.write(\"\\n\");\n }\n\n draw(\"green\", stats.passes);\n draw(\"fail\", stats.failures);\n draw(\"pending\", stats.pending);\n process.stdout.write(\"\\n\");\n\n this.cursorUp(this.numberOfLines);\n};\n\n/**\n * Append the rainbow.\n *\n * @private\n */\n\nNyanCat.prototype.appendRainbow = function () {\n var segment = this.tick ? \"_\" : \"-\";\n var rainbowified = this.rainbowify(segment);\n\n for (var index = 0; index < this.numberOfLines; index++) {\n var trajectory = this.trajectories[index];\n if (trajectory.length >= this.trajectoryWidthMax) {\n trajectory.shift();\n }\n trajectory.push(rainbowified);\n }\n};\n\n/**\n * Draw the rainbow.\n *\n * @private\n */\n\nNyanCat.prototype.drawRainbow = function () {\n var self = this;\n\n this.trajectories.forEach(function (line) {\n process.stdout.write(\"\\u001b[\" + self.scoreboardWidth + \"C\");\n process.stdout.write(line.join(\"\"));\n process.stdout.write(\"\\n\");\n });\n\n this.cursorUp(this.numberOfLines);\n};\n\n/**\n * Draw the nyan cat\n *\n * @private\n */\nNyanCat.prototype.drawNyanCat = function () {\n var self = this;\n var startWidth = this.scoreboardWidth + this.trajectories[0].length;\n var dist = \"\\u001b[\" + startWidth + \"C\";\n var padding = \"\";\n\n process.stdout.write(dist);\n process.stdout.write(\"_,------,\");\n process.stdout.write(\"\\n\");\n\n process.stdout.write(dist);\n padding = self.tick ? \" \" : \" \";\n process.stdout.write(\"_|\" + padding + \"/\\\\_/\\\\ \");\n process.stdout.write(\"\\n\");\n\n process.stdout.write(dist);\n padding = self.tick ? \"_\" : \"__\";\n var tail = self.tick ? \"~\" : \"^\";\n process.stdout.write(tail + \"|\" + padding + this.face() + \" \");\n process.stdout.write(\"\\n\");\n\n process.stdout.write(dist);\n padding = self.tick ? \" \" : \" \";\n process.stdout.write(padding + '\"\" \"\" ');\n process.stdout.write(\"\\n\");\n\n this.cursorUp(this.numberOfLines);\n};\n\n/**\n * Draw nyan cat face.\n *\n * @private\n * @return {string}\n */\n\nNyanCat.prototype.face = function () {\n var stats = this.stats;\n if (stats.failures) {\n return \"( x .x)\";\n } else if (stats.pending) {\n return \"( o .o)\";\n } else if (stats.passes) {\n return \"( ^ .^)\";\n }\n return \"( - .-)\";\n};\n\n/**\n * Move cursor up `n`.\n *\n * @private\n * @param {number} n\n */\n\nNyanCat.prototype.cursorUp = function (n) {\n process.stdout.write(\"\\u001b[\" + n + \"A\");\n};\n\n/**\n * Move cursor down `n`.\n *\n * @private\n * @param {number} n\n */\n\nNyanCat.prototype.cursorDown = function (n) {\n process.stdout.write(\"\\u001b[\" + n + \"B\");\n};\n\n/**\n * Generate rainbow colors.\n *\n * @private\n * @return {Array}\n */\nNyanCat.prototype.generateColors = function () {\n var colors = [];\n\n for (var i = 0; i < 6 * 7; i++) {\n var pi3 = Math.floor(Math.PI / 3);\n var n = i * (1.0 / 6);\n var r = Math.floor(3 * Math.sin(n) + 3);\n var g = Math.floor(3 * Math.sin(n + 2 * pi3) + 3);\n var b = Math.floor(3 * Math.sin(n + 4 * pi3) + 3);\n colors.push(36 * r + 6 * g + b + 16);\n }\n\n return colors;\n};\n\n/**\n * Apply rainbow to the given `str`.\n *\n * @private\n * @param {string} str\n * @return {string}\n */\nNyanCat.prototype.rainbowify = function (str) {\n if (!Base.useColors) {\n return str;\n }\n var color = this.rainbowColors[this.colorIndex % this.rainbowColors.length];\n this.colorIndex += 1;\n return \"\\u001b[38;5;\" + color + \"m\" + str + \"\\u001b[0m\";\n};\n\nNyanCat.description = '\"nyan cat\"';\n","\"use strict\";\n\n/**\n * @typedef {import('../runner.js')} Runner\n * @typedef {import('../test.js')} Test\n */\n\n/**\n * @module XUnit\n */\n/**\n * Module dependencies.\n */\n\nvar Base = require(\"./base\");\nvar utils = require(\"../utils\");\nvar fs = require(\"node:fs\");\nvar path = require(\"node:path\");\nvar errors = require(\"../errors\");\nvar createUnsupportedError = errors.createUnsupportedError;\nvar constants = require(\"../runner\").constants;\nvar EVENT_TEST_PASS = constants.EVENT_TEST_PASS;\nvar EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL;\nvar EVENT_RUN_END = constants.EVENT_RUN_END;\nvar EVENT_TEST_PENDING = constants.EVENT_TEST_PENDING;\nvar STATE_FAILED = require(\"../runnable\").constants.STATE_FAILED;\nvar inherits = utils.inherits;\nvar escape = utils.escape;\n\n/**\n * Save timer references to avoid Sinon interfering (see GH-237).\n */\nvar Date = global.Date;\n\n/**\n * Expose `XUnit`.\n */\n\nexports = module.exports = XUnit;\n\n/**\n * Constructs a new `XUnit` reporter instance.\n *\n * @public\n * @class\n * @memberof Mocha.reporters\n * @extends Mocha.reporters.Base\n * @param {Runner} runner - Instance triggers reporter actions.\n * @param {Object} [options] - runner options\n */\nfunction XUnit(runner, options) {\n Base.call(this, runner, options);\n\n var stats = this.stats;\n var tests = [];\n var self = this;\n\n // the name of the test suite, as it will appear in the resulting XML file\n var suiteName;\n\n // the default name of the test suite if none is provided\n var DEFAULT_SUITE_NAME = \"Mocha Tests\";\n\n if (options && options.reporterOptions) {\n if (options.reporterOptions.output) {\n if (!fs.createWriteStream) {\n throw createUnsupportedError(\"file output not supported in browser\");\n }\n\n fs.mkdirSync(path.dirname(options.reporterOptions.output), {\n recursive: true,\n });\n self.fileStream = fs.createWriteStream(options.reporterOptions.output);\n }\n\n // get the suite name from the reporter options (if provided)\n suiteName = options.reporterOptions.suiteName;\n }\n\n // fall back to the default suite name\n suiteName = suiteName || DEFAULT_SUITE_NAME;\n\n runner.on(EVENT_TEST_PENDING, function (test) {\n tests.push(test);\n });\n\n runner.on(EVENT_TEST_PASS, function (test) {\n tests.push(test);\n });\n\n runner.on(EVENT_TEST_FAIL, function (test) {\n tests.push(test);\n });\n\n runner.once(EVENT_RUN_END, function () {\n self.write(\n tag(\n \"testsuite\",\n {\n name: suiteName,\n tests: stats.tests,\n failures: 0,\n errors: stats.failures,\n skipped: stats.tests - stats.failures - stats.passes,\n timestamp: new Date().toUTCString(),\n time: stats.duration / 1000 || 0,\n },\n false,\n ),\n );\n\n tests.forEach(function (t) {\n self.test(t, options);\n });\n\n self.write(\"\");\n });\n}\n\n/**\n * Inherit from `Base.prototype`.\n */\ninherits(XUnit, Base);\n\n/**\n * Override done to close the stream (if it's a file).\n *\n * @param failures\n * @param {Function} fn\n */\nXUnit.prototype.done = function (failures, fn) {\n if (this.fileStream) {\n this.fileStream.end(function () {\n fn(failures);\n });\n } else {\n fn(failures);\n }\n};\n\n/**\n * Write out the given line.\n *\n * @param {string} line\n */\nXUnit.prototype.write = function (line) {\n if (this.fileStream) {\n this.fileStream.write(line + \"\\n\");\n } else if (typeof process === \"object\" && process.stdout) {\n process.stdout.write(line + \"\\n\");\n } else {\n Base.consoleLog(line);\n }\n};\n\n/**\n * Output tag for the given `test.`\n *\n * @param {Test} test\n */\nXUnit.prototype.test = function (test, options) {\n Base.useColors = false;\n\n var attrs = {\n classname: test.parent.fullTitle(),\n name: test.title,\n file: testFilePath(test.file, options),\n time: test.duration / 1000 || 0,\n };\n\n if (test.state === STATE_FAILED) {\n var err = test.err;\n var diff =\n !Base.hideDiff && Base.showDiff(err)\n ? \"\\n\" + Base.generateDiff(err.actual, err.expected)\n : \"\";\n this.write(\n tag(\n \"testcase\",\n attrs,\n false,\n tag(\n \"failure\",\n {},\n false,\n escape(err.message) + escape(diff) + \"\\n\" + escape(err.stack),\n ),\n ),\n );\n } else if (test.isPending()) {\n this.write(tag(\"testcase\", attrs, false, tag(\"skipped\", {}, true)));\n } else {\n this.write(tag(\"testcase\", attrs, true));\n }\n};\n\n/**\n * HTML tag helper.\n *\n * @param name\n * @param attrs\n * @param close\n * @param content\n * @return {string}\n */\nfunction tag(name, attrs, close, content) {\n var end = close ? \"/>\" : \">\";\n var pairs = [];\n var tag;\n\n for (var key in attrs) {\n if (Object.prototype.hasOwnProperty.call(attrs, key)) {\n pairs.push(key + '=\"' + escape(attrs[key]) + '\"');\n }\n }\n\n tag = \"<\" + name + (pairs.length ? \" \" + pairs.join(\" \") : \"\") + end;\n if (content) {\n tag += content + \"' + \"\\n\";\n buf += title(suite.title) + \"\\n\";\n });\n\n runner.on(EVENT_SUITE_END, function () {\n --level;\n });\n\n runner.on(EVENT_TEST_PASS, function (test) {\n var code = utils.clean(test.body);\n buf += test.title + \".\\n\";\n buf += \"\\n```js\\n\";\n buf += code + \"\\n\";\n buf += \"```\\n\\n\";\n });\n\n runner.once(EVENT_RUN_END, function () {\n process.stdout.write(\"# TOC\\n\");\n process.stdout.write(generateTOC(runner.suite));\n process.stdout.write(buf);\n });\n}\n\nMarkdown.description = \"GitHub Flavored Markdown\";\n","\"use strict\";\n\n/**\n * @typedef {import('../runner.js')} Runner\n */\n\n/**\n * @module Progress\n */\n/**\n * Module dependencies.\n */\n\nvar Base = require(\"./base\");\nvar constants = require(\"../runner\").constants;\nvar EVENT_RUN_BEGIN = constants.EVENT_RUN_BEGIN;\nvar EVENT_TEST_END = constants.EVENT_TEST_END;\nvar EVENT_RUN_END = constants.EVENT_RUN_END;\nvar inherits = require(\"../utils\").inherits;\nvar color = Base.color;\nvar cursor = Base.cursor;\n\n/**\n * Expose `Progress`.\n */\n\nexports = module.exports = Progress;\n\n/**\n * General progress bar color.\n */\n\nBase.colors.progress = 90;\n\n/**\n * Constructs a new `Progress` reporter instance.\n *\n * @public\n * @class\n * @memberof Mocha.reporters\n * @extends Mocha.reporters.Base\n * @param {Runner} runner - Instance triggers reporter actions.\n * @param {Object} [options] - runner options\n */\nfunction Progress(runner, options) {\n Base.call(this, runner, options);\n\n var self = this;\n var width = (Base.window.width * 0.5) | 0;\n var total = runner.total;\n var complete = 0;\n var lastN = -1;\n\n // default chars\n options = options || {};\n var reporterOptions = options.reporterOptions || {};\n\n options.open = reporterOptions.open || \"[\";\n options.complete = reporterOptions.complete || \"▬\";\n options.incomplete = reporterOptions.incomplete || Base.symbols.dot;\n options.close = reporterOptions.close || \"]\";\n options.verbose = reporterOptions.verbose || false;\n\n // tests started\n runner.on(EVENT_RUN_BEGIN, function () {\n process.stdout.write(\"\\n\");\n cursor.hide();\n });\n\n // tests complete\n runner.on(EVENT_TEST_END, function () {\n complete++;\n\n var percent = complete / total;\n var n = (width * percent) | 0;\n var i = width - n;\n\n if (n === lastN && !options.verbose) {\n // Don't re-render the line if it hasn't changed\n return;\n }\n lastN = n;\n\n cursor.CR();\n process.stdout.write(\"\\u001b[J\");\n process.stdout.write(color(\"progress\", \" \" + options.open));\n process.stdout.write(Array(n).join(options.complete));\n process.stdout.write(Array(i).join(options.incomplete));\n process.stdout.write(color(\"progress\", options.close));\n if (options.verbose) {\n process.stdout.write(color(\"progress\", \" \" + complete + \" of \" + total));\n }\n });\n\n // tests are complete, output some stats\n // and the failures if any\n runner.once(EVENT_RUN_END, function () {\n cursor.show();\n process.stdout.write(\"\\n\");\n self.epilogue();\n });\n}\n\n/**\n * Inherit from `Base.prototype`.\n */\ninherits(Progress, Base);\n\nProgress.description = \"a progress bar\";\n","\"use strict\";\n\n/**\n * @typedef {import('../runner.js')} Runner\n */\n\n/**\n * @module Landing\n */\n/**\n * Module dependencies.\n */\n\nvar Base = require(\"./base\");\nvar inherits = require(\"../utils\").inherits;\nvar constants = require(\"../runner\").constants;\nvar EVENT_RUN_BEGIN = constants.EVENT_RUN_BEGIN;\nvar EVENT_RUN_END = constants.EVENT_RUN_END;\nvar EVENT_TEST_END = constants.EVENT_TEST_END;\nvar STATE_FAILED = require(\"../runnable\").constants.STATE_FAILED;\n\nvar cursor = Base.cursor;\nvar color = Base.color;\n\n/**\n * Expose `Landing`.\n */\n\nexports = module.exports = Landing;\n\n/**\n * Airplane color.\n */\n\nBase.colors.plane = 0;\n\n/**\n * Airplane crash color.\n */\n\nBase.colors[\"plane crash\"] = 31;\n\n/**\n * Runway color.\n */\n\nBase.colors.runway = 90;\n\n/**\n * Constructs a new `Landing` reporter instance.\n *\n * @public\n * @class\n * @memberof Mocha.reporters\n * @extends Mocha.reporters.Base\n * @param {Runner} runner - Instance triggers reporter actions.\n * @param {Object} [options] - runner options\n */\nfunction Landing(runner, options) {\n Base.call(this, runner, options);\n\n var self = this;\n var width = (Base.window.width * 0.75) | 0;\n var stream = process.stdout;\n\n var plane = color(\"plane\", \"✈\");\n var crashed = -1;\n var n = 0;\n var total = 0;\n\n function runway() {\n var buf = Array(width).join(\"-\");\n return \" \" + color(\"runway\", buf);\n }\n\n runner.on(EVENT_RUN_BEGIN, function () {\n stream.write(\"\\n\\n\\n \");\n cursor.hide();\n });\n\n runner.on(EVENT_TEST_END, function (test) {\n // check if the plane crashed\n var col = crashed === -1 ? ((width * ++n) / ++total) | 0 : crashed;\n // show the crash\n if (test.state === STATE_FAILED) {\n plane = color(\"plane crash\", \"✈\");\n crashed = col;\n }\n\n // render landing strip\n stream.write(\"\\u001b[\" + (width + 1) + \"D\\u001b[2A\");\n stream.write(runway());\n stream.write(\"\\n \");\n stream.write(color(\"runway\", Array(col).join(\"⋅\")));\n stream.write(plane);\n stream.write(color(\"runway\", Array(width - col).join(\"⋅\") + \"\\n\"));\n stream.write(runway());\n stream.write(\"\\u001b[0m\");\n });\n\n runner.once(EVENT_RUN_END, function () {\n cursor.show();\n process.stdout.write(\"\\n\");\n self.epilogue();\n });\n\n // if cursor is hidden when we ctrl-C, then it will remain hidden unless...\n process.once(\"SIGINT\", function () {\n cursor.show();\n process.nextTick(function () {\n process.kill(process.pid, \"SIGINT\");\n });\n });\n}\n\n/**\n * Inherit from `Base.prototype`.\n */\ninherits(Landing, Base);\n\nLanding.description = \"Unicode landing strip\";\n","\"use strict\";\n\n/**\n * @typedef {import('../runner.js')} Runner\n * @typedef {import('../test.js')} Test\n */\n\n/**\n * @module JSONStream\n */\n/**\n * Module dependencies.\n */\n\nvar Base = require(\"./base\");\nvar constants = require(\"../runner\").constants;\nvar EVENT_TEST_PASS = constants.EVENT_TEST_PASS;\nvar EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL;\nvar EVENT_RUN_BEGIN = constants.EVENT_RUN_BEGIN;\nvar EVENT_RUN_END = constants.EVENT_RUN_END;\n\n/**\n * Expose `JSONStream`.\n */\n\nexports = module.exports = JSONStream;\n\n/**\n * Constructs a new `JSONStream` reporter instance.\n *\n * @public\n * @class\n * @memberof Mocha.reporters\n * @extends Mocha.reporters.Base\n * @param {Runner} runner - Instance triggers reporter actions.\n * @param {Object} [options] - runner options\n */\nfunction JSONStream(runner, options) {\n Base.call(this, runner, options);\n\n var self = this;\n var total = runner.total;\n\n runner.once(EVENT_RUN_BEGIN, function () {\n writeEvent([\"start\", { total }]);\n });\n\n runner.on(EVENT_TEST_PASS, function (test) {\n writeEvent([\"pass\", clean(test)]);\n });\n\n runner.on(EVENT_TEST_FAIL, function (test, err) {\n test = clean(test);\n test.err = err.message;\n test.stack = err.stack || null;\n writeEvent([\"fail\", test]);\n });\n\n runner.once(EVENT_RUN_END, function () {\n writeEvent([\"end\", self.stats]);\n });\n}\n\n/**\n * Writes Mocha event to reporter output stream.\n *\n * @private\n * @param {unknown[]} event - Mocha event to be output.\n */\nfunction writeEvent(event) {\n process.stdout.write(JSON.stringify(event) + \"\\n\");\n}\n\n/**\n * Returns an object literal representation of `test`\n * free of cyclic properties, etc.\n *\n * @private\n * @param {Test} test - Instance used as data source.\n * @return {Object} object containing pared-down test instance data\n */\nfunction clean(test) {\n return {\n title: test.title,\n fullTitle: test.fullTitle(),\n file: test.file,\n duration: test.duration,\n currentRetry: test.currentRetry(),\n speed: test.speed,\n };\n}\n\nJSONStream.description = \"newline delimited JSON events\";\n","\"use strict\";\n\n// Alias exports to a their normalized format Mocha#reporter to prevent a need\n// for dynamic (try/catch) requires, which Browserify doesn't handle.\nexports.Base = exports.base = require(\"./base\");\nexports.Dot = exports.dot = require(\"./dot\");\nexports.Doc = exports.doc = require(\"./doc\");\nexports.TAP = exports.tap = require(\"./tap\");\nexports.JSON = exports.json = require(\"./json\");\nexports.HTML = exports.html = require(\"./html\");\nexports.List = exports.list = require(\"./list\");\nexports.Min = exports.min = require(\"./min\");\nexports.Spec = exports.spec = require(\"./spec\");\nexports.Nyan = exports.nyan = require(\"./nyan\");\nexports.XUnit = exports.xunit = require(\"./xunit\");\nexports.Markdown = exports.markdown = require(\"./markdown\");\nexports.Progress = exports.progress = require(\"./progress\");\nexports.Landing = exports.landing = require(\"./landing\");\nexports.JSONStream = exports[\"json-stream\"] = require(\"./json-stream\");\n","\"use strict\";\n\n/**\n * @typedef {import('./types.d.ts').StatsCollector} StatsCollector\n * @typedef {import('./runner.js')} Runner\n */\n\n/**\n * Provides a factory function for a {@link StatsCollector} object.\n * @module\n */\n\nvar constants = require(\"./runner\").constants;\nvar EVENT_TEST_PASS = constants.EVENT_TEST_PASS;\nvar EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL;\nvar EVENT_SUITE_BEGIN = constants.EVENT_SUITE_BEGIN;\nvar EVENT_RUN_BEGIN = constants.EVENT_RUN_BEGIN;\nvar EVENT_TEST_PENDING = constants.EVENT_TEST_PENDING;\nvar EVENT_RUN_END = constants.EVENT_RUN_END;\nvar EVENT_TEST_END = constants.EVENT_TEST_END;\n\nvar Date = global.Date;\n\n/**\n * Provides stats such as test duration, number of tests passed / failed etc., by listening for events emitted by `runner`.\n *\n * @private\n * @param {Runner} runner - Runner instance\n * @throws {TypeError} If falsy `runner`\n */\nfunction createStatsCollector(runner) {\n /**\n * @type {StatsCollector}\n */\n var stats = {\n suites: 0,\n tests: 0,\n passes: 0,\n pending: 0,\n failures: 0,\n };\n\n if (!runner) {\n throw new TypeError(\"Missing runner argument\");\n }\n\n runner.stats = stats;\n\n runner.once(EVENT_RUN_BEGIN, function () {\n stats.start = new Date();\n });\n runner.on(EVENT_SUITE_BEGIN, function (suite) {\n suite.root || stats.suites++;\n });\n runner.on(EVENT_TEST_PASS, function () {\n stats.passes++;\n });\n runner.on(EVENT_TEST_FAIL, function () {\n stats.failures++;\n });\n runner.on(EVENT_TEST_PENDING, function () {\n stats.pending++;\n });\n runner.on(EVENT_TEST_END, function () {\n stats.tests++;\n });\n runner.once(EVENT_RUN_END, function () {\n stats.end = new Date();\n stats.duration = stats.end - stats.start;\n });\n}\n\nmodule.exports = createStatsCollector;\n","\"use strict\";\nvar Runnable = require(\"./runnable\");\nvar utils = require(\"./utils\");\nvar errors = require(\"./errors\");\nvar createInvalidArgumentTypeError = errors.createInvalidArgumentTypeError;\nvar isString = utils.isString;\n\nconst { MOCHA_ID_PROP_NAME } = utils.constants;\n\nmodule.exports = Test;\n\n/**\n * Initialize a new `Test` with the given `title` and callback `fn`.\n *\n * @public\n * @class\n * @extends Runnable\n * @param {String} title - Test title (required)\n * @param {Function} [fn] - Test callback. If omitted, the Test is considered \"pending\"\n */\nfunction Test(title, fn) {\n if (!isString(title)) {\n throw createInvalidArgumentTypeError(\n 'Test argument \"title\" should be a string. Received type \"' +\n typeof title +\n '\"',\n \"title\",\n \"string\",\n );\n }\n this.type = \"test\";\n Runnable.call(this, title, fn);\n this.reset();\n}\n\n/**\n * Inherit from `Runnable.prototype`.\n */\nutils.inherits(Test, Runnable);\n\n/**\n * Resets the state initially or for a next run.\n */\nTest.prototype.reset = function () {\n Runnable.prototype.reset.call(this);\n this.pending = !this.fn;\n delete this.state;\n};\n\n/**\n * Set or get retried test\n *\n * @private\n */\nTest.prototype.retriedTest = function (n) {\n if (!arguments.length) {\n return this._retriedTest;\n }\n this._retriedTest = n;\n};\n\n/**\n * Add test to the list of tests marked `only`.\n *\n * @private\n */\nTest.prototype.markOnly = function () {\n this.parent.appendOnlyTest(this);\n};\n\nTest.prototype.clone = function () {\n var test = new Test(this.title, this.fn);\n test.timeout(this.timeout());\n test.slow(this.slow());\n test.retries(this.retries());\n test.currentRetry(this.currentRetry());\n test.retriedTest(this.retriedTest() || this);\n test.globals(this.globals());\n test.parent = this.parent;\n test.file = this.file;\n test.ctx = this.ctx;\n return test;\n};\n\n/**\n * Returns an minimal object suitable for transmission over IPC.\n * Functions are represented by keys beginning with `$$`.\n * @private\n * @returns {Object}\n */\nTest.prototype.serialize = function serialize() {\n return {\n $$currentRetry: this._currentRetry,\n $$fullTitle: this.fullTitle(),\n $$isPending: Boolean(this.pending),\n $$retriedTest: this._retriedTest || null,\n $$slow: this._slow,\n $$titlePath: this.titlePath(),\n body: this.body,\n duration: this.duration,\n err: this.err,\n parent: {\n $$fullTitle: this.parent.fullTitle(),\n [MOCHA_ID_PROP_NAME]: this.parent.id,\n },\n speed: this.speed,\n state: this.state,\n title: this.title,\n type: this.type,\n file: this.file,\n [MOCHA_ID_PROP_NAME]: this.id,\n };\n};\n","\"use strict\";\n\n/**\n * @typedef {import('../context.js')} Context\n * @typedef {import('../mocha.js')} Mocha\n */\n\n/**\n @module interfaces/common\n*/\n\nvar Suite = require(\"../suite\");\nvar errors = require(\"../errors\");\nvar createMissingArgumentError = errors.createMissingArgumentError;\nvar createUnsupportedError = errors.createUnsupportedError;\nvar createForbiddenExclusivityError = errors.createForbiddenExclusivityError;\n\n/**\n * Functions common to more than one interface.\n *\n * @private\n * @param {Suite[]} suites\n * @param {Context} context\n * @param {Mocha} mocha\n * @return {Object} An object containing common functions.\n */\nmodule.exports = function (suites, context, mocha) {\n /**\n * Check if the suite should be tested.\n *\n * @private\n * @param {Suite} suite - suite to check\n * @returns {boolean}\n */\n function shouldBeTested(suite) {\n return (\n !mocha.options.grep ||\n (mocha.options.grep &&\n mocha.options.grep.test(suite.fullTitle()) &&\n !mocha.options.invert)\n );\n }\n\n return {\n /**\n * This is only present if flag --delay is passed into Mocha. It triggers\n * root suite execution.\n *\n * @param {Suite} suite The root suite.\n * @return {Function} A function which runs the root suite\n */\n runWithSuite: function runWithSuite(suite) {\n return function run() {\n suite.run();\n };\n },\n\n /**\n * Execute before running tests.\n *\n * @param {string} name\n * @param {Function} fn\n */\n before: function (name, fn) {\n return suites[0].beforeAll(name, fn);\n },\n\n /**\n * Execute after running tests.\n *\n * @param {string} name\n * @param {Function} fn\n */\n after: function (name, fn) {\n return suites[0].afterAll(name, fn);\n },\n\n /**\n * Execute before each test case.\n *\n * @param {string} name\n * @param {Function} fn\n */\n beforeEach: function (name, fn) {\n return suites[0].beforeEach(name, fn);\n },\n\n /**\n * Execute after each test case.\n *\n * @param {string} name\n * @param {Function} fn\n */\n afterEach: function (name, fn) {\n return suites[0].afterEach(name, fn);\n },\n\n suite: {\n /**\n * Create an exclusive Suite; convenience function\n * See docstring for create() below.\n *\n * @param {Object} opts\n * @returns {Suite}\n */\n only: function only(opts) {\n if (mocha.options.forbidOnly) {\n throw createForbiddenExclusivityError(mocha);\n }\n opts.isOnly = true;\n return this.create(opts);\n },\n\n /**\n * Create a Suite, but skip it; convenience function\n * See docstring for create() below.\n *\n * @param {Object} opts\n * @returns {Suite}\n */\n skip: function skip(opts) {\n opts.pending = true;\n return this.create(opts);\n },\n\n /**\n * Creates a suite.\n *\n * @param {Object} opts Options\n * @param {string} opts.title Title of Suite\n * @param {Function} [opts.fn] Suite Function (not always applicable)\n * @param {boolean} [opts.pending] Is Suite pending?\n * @param {string} [opts.file] Filepath where this Suite resides\n * @param {boolean} [opts.isOnly] Is Suite exclusive?\n * @returns {Suite}\n */\n create: function create(opts) {\n var suite = Suite.create(suites[0], opts.title);\n suite.pending = Boolean(opts.pending);\n suite.file = opts.file;\n suites.unshift(suite);\n if (opts.isOnly) {\n suite.markOnly();\n }\n if (\n suite.pending &&\n mocha.options.forbidPending &&\n shouldBeTested(suite)\n ) {\n throw createUnsupportedError(\"Pending test forbidden\");\n }\n if (typeof opts.fn === \"function\") {\n opts.fn.call(suite);\n suites.shift();\n } else if (typeof opts.fn === \"undefined\" && !suite.pending) {\n throw createMissingArgumentError(\n 'Suite \"' +\n suite.fullTitle() +\n '\" was defined but no callback was supplied. ' +\n \"Supply a callback or explicitly skip the suite.\",\n \"callback\",\n \"function\",\n );\n } else if (!opts.fn && suite.pending) {\n suites.shift();\n }\n\n return suite;\n },\n },\n\n test: {\n /**\n * Exclusive test-case.\n *\n * @param {Object} mocha\n * @param {Function} test\n * @returns {*}\n */\n only: function (mocha, test) {\n if (mocha.options.forbidOnly) {\n throw createForbiddenExclusivityError(mocha);\n }\n test.markOnly();\n return test;\n },\n\n /**\n * Pending test case.\n *\n * @param {string} title\n */\n skip: function (title) {\n context.test(title);\n },\n },\n };\n};\n","\"use strict\";\n\n/**\n * @typedef {import('../suite.js')} Suite\n */\n\nvar Test = require(\"../test\");\nvar EVENT_FILE_PRE_REQUIRE =\n require(\"../suite\").constants.EVENT_FILE_PRE_REQUIRE;\n\n/**\n * BDD-style interface:\n *\n * describe('Array', function() {\n * describe('#indexOf()', function() {\n * it('should return -1 when not present', function() {\n * // ...\n * });\n *\n * it('should return the index when present', function() {\n * // ...\n * });\n * });\n * });\n *\n * @param {Suite} suite Root suite.\n */\nmodule.exports = function bddInterface(suite) {\n var suites = [suite];\n\n suite.on(EVENT_FILE_PRE_REQUIRE, function (context, file, mocha) {\n var common = require(\"./common\")(suites, context, mocha);\n\n context.before = common.before;\n context.after = common.after;\n context.beforeEach = common.beforeEach;\n context.afterEach = common.afterEach;\n context.run = mocha.options.delay && common.runWithSuite(suite);\n /**\n * Describe a \"suite\" with the given `title`\n * and callback `fn` containing nested suites\n * and/or tests.\n */\n\n context.describe = context.context = function (title, fn) {\n return common.suite.create({\n title,\n file,\n fn,\n });\n };\n\n /**\n * Pending describe.\n */\n\n context.xdescribe =\n context.xcontext =\n context.describe.skip =\n function (title, fn) {\n return common.suite.skip({\n title,\n file,\n fn,\n });\n };\n\n /**\n * Exclusive suite.\n */\n\n context.describe.only = function (title, fn) {\n return common.suite.only({\n title,\n file,\n fn,\n });\n };\n\n /**\n * Describe a specification or test-case\n * with the given `title` and callback `fn`\n * acting as a thunk.\n */\n\n context.it = context.specify = function (title, fn) {\n var suite = suites[0];\n if (suite.isPending()) {\n fn = null;\n }\n var test = new Test(title, fn);\n test.file = file;\n suite.addTest(test);\n return test;\n };\n\n /**\n * Exclusive test-case.\n */\n\n context.it.only = function (title, fn) {\n return common.test.only(mocha, context.it(title, fn));\n };\n\n /**\n * Pending test case.\n */\n\n context.xit =\n context.xspecify =\n context.it.skip =\n function (title) {\n return context.it(title);\n };\n });\n};\n\nmodule.exports.description = \"BDD or RSpec style [default]\";\n","\"use strict\";\n\n/**\n * @typedef {import('../suite.js')} Suite\n */\n\nvar Test = require(\"../test\");\nvar EVENT_FILE_PRE_REQUIRE =\n require(\"../suite\").constants.EVENT_FILE_PRE_REQUIRE;\n\n/**\n * TDD-style interface:\n *\n * suite('Array', function() {\n * suite('#indexOf()', function() {\n * suiteSetup(function() {\n *\n * });\n *\n * test('should return -1 when not present', function() {\n *\n * });\n *\n * test('should return the index when present', function() {\n *\n * });\n *\n * suiteTeardown(function() {\n *\n * });\n * });\n * });\n *\n * @param {Suite} suite Root suite.\n */\nmodule.exports = function (suite) {\n var suites = [suite];\n\n suite.on(EVENT_FILE_PRE_REQUIRE, function (context, file, mocha) {\n var common = require(\"./common\")(suites, context, mocha);\n\n context.setup = common.beforeEach;\n context.teardown = common.afterEach;\n context.suiteSetup = common.before;\n context.suiteTeardown = common.after;\n context.run = mocha.options.delay && common.runWithSuite(suite);\n\n /**\n * Describe a \"suite\" with the given `title` and callback `fn` containing\n * nested suites and/or tests.\n */\n context.suite = function (title, fn) {\n return common.suite.create({\n title,\n file,\n fn,\n });\n };\n\n /**\n * Pending suite.\n */\n context.suite.skip = function (title, fn) {\n return common.suite.skip({\n title,\n file,\n fn,\n });\n };\n\n /**\n * Exclusive test-case.\n */\n context.suite.only = function (title, fn) {\n return common.suite.only({\n title,\n file,\n fn,\n });\n };\n\n /**\n * Describe a specification or test-case with the given `title` and\n * callback `fn` acting as a thunk.\n */\n context.test = function (title, fn) {\n var suite = suites[0];\n if (suite.isPending()) {\n fn = null;\n }\n var test = new Test(title, fn);\n test.file = file;\n suite.addTest(test);\n return test;\n };\n\n /**\n * Exclusive test-case.\n */\n\n context.test.only = function (title, fn) {\n return common.test.only(mocha, context.test(title, fn));\n };\n\n context.test.skip = common.test.skip;\n });\n};\n\nmodule.exports.description =\n 'traditional \"suite\"/\"test\" instead of BDD\\'s \"describe\"/\"it\"';\n","\"use strict\";\n/**\n * @typedef {import('../suite.js')} Suite\n */\n\nvar Test = require(\"../test\");\nvar EVENT_FILE_PRE_REQUIRE =\n require(\"../suite\").constants.EVENT_FILE_PRE_REQUIRE;\n\n/**\n * QUnit-style interface:\n *\n * suite('Array');\n *\n * test('#length', function() {\n * var arr = [1,2,3];\n * ok(arr.length == 3);\n * });\n *\n * test('#indexOf()', function() {\n * var arr = [1,2,3];\n * ok(arr.indexOf(1) == 0);\n * ok(arr.indexOf(2) == 1);\n * ok(arr.indexOf(3) == 2);\n * });\n *\n * suite('String');\n *\n * test('#length', function() {\n * ok('foo'.length == 3);\n * });\n *\n * @param {Suite} suite Root suite.\n */\nmodule.exports = function qUnitInterface(suite) {\n var suites = [suite];\n\n suite.on(EVENT_FILE_PRE_REQUIRE, function (context, file, mocha) {\n var common = require(\"./common\")(suites, context, mocha);\n\n context.before = common.before;\n context.after = common.after;\n context.beforeEach = common.beforeEach;\n context.afterEach = common.afterEach;\n context.run = mocha.options.delay && common.runWithSuite(suite);\n /**\n * Describe a \"suite\" with the given `title`.\n */\n\n context.suite = function (title) {\n if (suites.length > 1) {\n suites.shift();\n }\n return common.suite.create({\n title,\n file,\n fn: false,\n });\n };\n\n /**\n * Exclusive Suite.\n */\n\n context.suite.only = function (title) {\n if (suites.length > 1) {\n suites.shift();\n }\n return common.suite.only({\n title,\n file,\n fn: false,\n });\n };\n\n /**\n * Describe a specification or test-case\n * with the given `title` and callback `fn`\n * acting as a thunk.\n */\n\n context.test = function (title, fn) {\n var test = new Test(title, fn);\n test.file = file;\n suites[0].addTest(test);\n return test;\n };\n\n /**\n * Exclusive test-case.\n */\n\n context.test.only = function (title, fn) {\n return common.test.only(mocha, context.test(title, fn));\n };\n\n context.test.skip = common.test.skip;\n });\n};\n\nmodule.exports.description = \"QUnit style\";\n","\"use strict\";\nvar Suite = require(\"../suite\");\nvar Test = require(\"../test\");\n\n/**\n * Exports-style (as Node.js module) interface:\n *\n * exports.Array = {\n * '#indexOf()': {\n * 'should return -1 when the value is not present': function() {\n *\n * },\n *\n * 'should return the correct index when the value is present': function() {\n *\n * }\n * }\n * };\n *\n * @param {Suite} suite Root suite.\n */\nmodule.exports = function (suite) {\n var suites = [suite];\n\n suite.on(Suite.constants.EVENT_FILE_REQUIRE, visit);\n\n function visit(obj, file) {\n var suite;\n for (var key in obj) {\n if (typeof obj[key] === \"function\") {\n var fn = obj[key];\n switch (key) {\n case \"before\":\n suites[0].beforeAll(fn);\n break;\n case \"after\":\n suites[0].afterAll(fn);\n break;\n case \"beforeEach\":\n suites[0].beforeEach(fn);\n break;\n case \"afterEach\":\n suites[0].afterEach(fn);\n break;\n default:\n var test = new Test(key, fn);\n test.file = file;\n suites[0].addTest(test);\n }\n } else {\n suite = Suite.create(suites[0], key);\n suites.unshift(suite);\n visit(obj[key], file);\n suites.shift();\n }\n }\n }\n};\n\nmodule.exports.description = 'Node.js module (\"exports\") style';\n","\"use strict\";\n\nexports.bdd = require(\"./bdd\");\nexports.tdd = require(\"./tdd\");\nexports.qunit = require(\"./qunit\");\nexports.exports = require(\"./exports\");\n","\"use strict\";\n\n/**\n * @typedef {import('./runnable.js')} Runnable\n */\n\n/**\n * @module Context\n */\n/**\n * Expose `Context`.\n */\n\nmodule.exports = Context;\n\n/**\n * Initialize a new `Context`.\n *\n * @private\n */\nfunction Context() {}\n\n/**\n * Set or get the context `Runnable` to `runnable`.\n *\n * @private\n * @param {Runnable} runnable\n * @return {Context} context\n */\nContext.prototype.runnable = function (runnable) {\n if (!arguments.length) {\n return this._runnable;\n }\n this.test = this._runnable = runnable;\n return this;\n};\n\n/**\n * Set or get test timeout `ms`.\n *\n * @private\n * @param {number} ms\n * @return {Context} self\n */\nContext.prototype.timeout = function (ms) {\n if (!arguments.length) {\n return this.runnable().timeout();\n }\n this.runnable().timeout(ms);\n return this;\n};\n\n/**\n * Set or get test slowness threshold `ms`.\n *\n * @private\n * @param {number} ms\n * @return {Context} self\n */\nContext.prototype.slow = function (ms) {\n if (!arguments.length) {\n return this.runnable().slow();\n }\n this.runnable().slow(ms);\n return this;\n};\n\n/**\n * Mark a test as skipped.\n *\n * @private\n * @throws Pending\n */\nContext.prototype.skip = function () {\n this.runnable().skip();\n};\n\n/**\n * Set or get a number of allowed retries on failed tests\n *\n * @private\n * @param {number} n\n * @return {Context} self\n */\nContext.prototype.retries = function (n) {\n if (!arguments.length) {\n return this.runnable().retries();\n }\n this.runnable().retries(n);\n return this;\n};\n","\"use strict\";\n\n/*!\n * mocha\n * Copyright(c) 2011 TJ Holowaychuk \n * MIT Licensed\n */\n\nvar escapeRe = require(\"escape-string-regexp\");\nvar path = require(\"node:path\");\nvar builtinReporters = require(\"./reporters\");\nvar utils = require(\"./utils\");\nvar mocharc = require(\"./mocharc.json\");\nvar Suite = require(\"./suite\");\nvar esmUtils = require(\"./nodejs/esm-utils\");\nvar createStatsCollector = require(\"./stats-collector\");\nconst {\n createInvalidReporterError,\n createInvalidInterfaceError,\n createMochaInstanceAlreadyDisposedError,\n createMochaInstanceAlreadyRunningError,\n createUnsupportedError,\n} = require(\"./errors\");\nconst { EVENT_FILE_PRE_REQUIRE, EVENT_FILE_POST_REQUIRE, EVENT_FILE_REQUIRE } =\n Suite.constants;\nvar debug = require(\"debug\")(\"mocha:mocha\");\n\n/**\n * @typedef {import('./types.d.ts').DoneCB} DoneCB\n * @typedef {import('./types.d.ts').MochaGlobalFixture} MochaGlobalFixture\n * @typedef {import('./types.d.ts').MochaOptions} MochaOptions\n * @typedef {import('./types.d.ts').MochaRootHookObject} MochaRootHookObject\n * @typedef {import('./types.d.ts').Reporter} Reporter\n */\n\nexports = module.exports = Mocha;\n\n/**\n * A Mocha instance is a finite state machine.\n * These are the states it can be in.\n * @private\n */\nvar mochaStates = utils.defineConstants({\n /**\n * Initial state of the mocha instance\n * @private\n */\n INIT: \"init\",\n /**\n * Mocha instance is running tests\n * @private\n */\n RUNNING: \"running\",\n /**\n * Mocha instance is done running tests and references to test functions and hooks are cleaned.\n * You can reset this state by unloading the test files.\n * @private\n */\n REFERENCES_CLEANED: \"referencesCleaned\",\n /**\n * Mocha instance is disposed and can no longer be used.\n * @private\n */\n DISPOSED: \"disposed\",\n});\n\n/**\n * To require local UIs and reporters when running in node.\n */\n\nif (!utils.isBrowser() && typeof module.paths !== \"undefined\") {\n var cwd = utils.cwd();\n module.paths.push(cwd, path.join(cwd, \"node_modules\"));\n}\n\n/**\n * Expose internals.\n * @private\n */\n\nexports.utils = utils;\nexports.interfaces = require(\"./interfaces\");\n/**\n * @public\n * @memberof Mocha\n */\nexports.reporters = builtinReporters;\nexports.Runnable = require(\"./runnable\");\nexports.Context = require(\"./context\");\n/**\n *\n * @memberof Mocha\n */\nexports.Runner = require(\"./runner\");\nexports.Suite = Suite;\nexports.Hook = require(\"./hook\");\nexports.Test = require(\"./test\");\n\nlet currentContext;\nexports.afterEach = function (...args) {\n return (currentContext.afterEach || currentContext.teardown).apply(\n this,\n args,\n );\n};\nexports.after = function (...args) {\n return (currentContext.after || currentContext.suiteTeardown).apply(\n this,\n args,\n );\n};\nexports.beforeEach = function (...args) {\n return (currentContext.beforeEach || currentContext.setup).apply(this, args);\n};\nexports.before = function (...args) {\n return (currentContext.before || currentContext.suiteSetup).apply(this, args);\n};\nexports.describe = function (...args) {\n return (currentContext.describe || currentContext.suite).apply(this, args);\n};\nexports.describe.only = function (...args) {\n return (currentContext.describe || currentContext.suite).only.apply(\n this,\n args,\n );\n};\nexports.describe.skip = function (...args) {\n return (currentContext.describe || currentContext.suite).skip.apply(\n this,\n args,\n );\n};\nexports.it = function (...args) {\n return (currentContext.it || currentContext.test).apply(this, args);\n};\nexports.it.only = function (...args) {\n return (currentContext.it || currentContext.test).only.apply(this, args);\n};\nexports.it.skip = function (...args) {\n return (currentContext.it || currentContext.test).skip.apply(this, args);\n};\nexports.xdescribe = exports.describe.skip;\nexports.xit = exports.it.skip;\nexports.setup = exports.beforeEach;\nexports.suiteSetup = exports.before;\nexports.suiteTeardown = exports.after;\nexports.suite = exports.describe;\nexports.teardown = exports.afterEach;\nexports.test = exports.it;\nexports.run = function (...args) {\n return currentContext.run.apply(this, args);\n};\n\n/**\n * Constructs a new Mocha instance with `options`.\n *\n * @public\n * @class Mocha\n * @param {MochaOptions} [options] - Settings object.\n */\nfunction Mocha(options = {}) {\n options = { ...mocharc, ...options };\n this.files = [];\n this.options = options;\n // root suite\n this.suite = new exports.Suite(\"\", new exports.Context(), true);\n this._cleanReferencesAfterRun = true;\n this._state = mochaStates.INIT;\n\n this.grep(options.grep)\n .fgrep(options.fgrep)\n .ui(options.ui)\n .reporter(\n options.reporter,\n options[\"reporter-option\"] ||\n options.reporterOption ||\n options.reporterOptions, // for backwards compatibility\n )\n .slow(options.slow)\n .global(options.global);\n\n // this guard exists because Suite#timeout does not consider `undefined` to be valid input\n if (typeof options.timeout !== \"undefined\") {\n this.timeout(options.timeout === false ? 0 : options.timeout);\n }\n\n if (\"retries\" in options) {\n this.retries(options.retries);\n }\n\n [\n \"allowUncaught\",\n \"asyncOnly\",\n \"bail\",\n \"checkLeaks\",\n \"color\",\n \"delay\",\n \"diff\",\n \"dryRun\",\n \"passOnFailingTestSuite\",\n \"failZero\",\n \"forbidOnly\",\n \"forbidPending\",\n \"fullTrace\",\n \"inlineDiffs\",\n \"invert\",\n ].forEach(function (opt) {\n if (options[opt]) {\n this[opt]();\n }\n }, this);\n\n if (options.rootHooks) {\n this.rootHooks(options.rootHooks);\n }\n\n /**\n * The class which we'll instantiate in {@link Mocha#run}. Defaults to\n * {@link Runner} in serial mode; changes in parallel mode.\n * @memberof Mocha\n * @private\n */\n this._runnerClass = exports.Runner;\n\n /**\n * Whether or not to call {@link Mocha#loadFiles} implicitly when calling\n * {@link Mocha#run}. If this is `true`, then it's up to the consumer to call\n * {@link Mocha#loadFiles} _or_ {@link Mocha#loadFilesAsync}.\n * @private\n * @memberof Mocha\n */\n this._lazyLoadFiles = false;\n\n /**\n * It's useful for a Mocha instance to know if it's running in a worker process.\n * We could derive this via other means, but it's helpful to have a flag to refer to.\n * @memberof Mocha\n * @private\n */\n this.isWorker = Boolean(options.isWorker);\n\n this.globalSetup(options.globalSetup)\n .globalTeardown(options.globalTeardown)\n .enableGlobalSetup(options.enableGlobalSetup)\n .enableGlobalTeardown(options.enableGlobalTeardown);\n\n if (\n options.parallel &&\n (typeof options.jobs === \"undefined\" || options.jobs > 1)\n ) {\n debug(\"attempting to enable parallel mode\");\n this.parallelMode(true);\n }\n}\n\n/**\n * Enables or disables bailing on the first failure.\n *\n * @public\n * @see [CLI option](../#-bail-b)\n * @param {boolean} [bail=true] - Whether to bail on first error.\n * @returns {Mocha} this\n * @chainable\n */\nMocha.prototype.bail = function (bail) {\n this.suite.bail(bail !== false);\n return this;\n};\n\n/**\n * @summary\n * Adds `file` to be loaded for execution.\n *\n * @description\n * Useful for generic setup code that must be included within test suite.\n *\n * @public\n * @see [CLI option](../#-file-filedirectoryglob)\n * @param {string} file - Pathname of file to be loaded.\n * @returns {Mocha} this\n * @chainable\n */\nMocha.prototype.addFile = function (file) {\n this.files.push(file);\n return this;\n};\n\n/**\n * Sets reporter to `reporter`, defaults to \"spec\".\n *\n * @public\n * @see [CLI option](../#-reporter-name-r-name)\n * @see [Reporters](../#reporters)\n * @param {String|Reporter} reporterName - Reporter name or constructor.\n * @param {Object} [reporterOptions] - Options used to configure the reporter.\n * @returns {Mocha} this\n * @chainable\n * @throws {Error} if requested reporter cannot be loaded\n * @example\n *\n * // Use XUnit reporter and direct its output to file\n * mocha.reporter('xunit', { output: '/path/to/testspec.xunit.xml' });\n */\nMocha.prototype.reporter = function (reporterName, reporterOptions) {\n if (typeof reporterName === \"function\") {\n this._reporter = reporterName;\n } else {\n reporterName = reporterName || \"spec\";\n var reporter;\n // Try to load a built-in reporter.\n if (builtinReporters[reporterName]) {\n reporter = builtinReporters[reporterName];\n }\n // Try to load reporters from process.cwd() and node_modules\n if (!reporter) {\n let foundReporter;\n try {\n foundReporter = require.resolve(reporterName);\n reporter = require(foundReporter);\n } catch (err) {\n if (foundReporter) {\n throw createInvalidReporterError(err.message, foundReporter);\n }\n // Try to load reporters from a cwd-relative path\n try {\n reporter = require(path.resolve(reporterName));\n } catch (err) {\n throw createInvalidReporterError(err.message, reporterName);\n }\n }\n }\n this._reporter = reporter;\n }\n this.options.reporterOption = reporterOptions;\n // alias option name is used in built-in reporters xunit/tap/progress\n this.options.reporterOptions = reporterOptions;\n return this;\n};\n\n/**\n * Sets test UI `name`, defaults to \"bdd\".\n *\n * @public\n * @see [CLI option](../#-ui-name-u-name)\n * @see [Interface DSLs](../#interfaces)\n * @param {string|Function} [ui=bdd] - Interface name or class.\n * @returns {Mocha} this\n * @chainable\n * @throws {Error} if requested interface cannot be loaded\n */\nMocha.prototype.ui = function (ui) {\n var bindInterface;\n if (typeof ui === \"function\") {\n bindInterface = ui;\n } else {\n ui = ui || \"bdd\";\n bindInterface = exports.interfaces[ui];\n if (!bindInterface) {\n try {\n bindInterface = require(ui);\n } catch (err) {\n throw createInvalidInterfaceError(`invalid interface '${ui}'`, ui);\n }\n }\n }\n bindInterface(this.suite);\n\n this.suite.on(EVENT_FILE_PRE_REQUIRE, function (context) {\n currentContext = context;\n });\n\n return this;\n};\n\n/**\n * Loads `files` prior to execution. Does not support ES Modules.\n *\n * @description\n * The implementation relies on Node's `require` to execute\n * the test interface functions and will be subject to its cache.\n * Supports only CommonJS modules. To load ES modules, use Mocha#loadFilesAsync.\n *\n * @private\n * @see {@link Mocha#addFile}\n * @see {@link Mocha#run}\n * @see {@link Mocha#unloadFiles}\n * @see {@link Mocha#loadFilesAsync}\n * @param {Function} [fn] - Callback invoked upon completion.\n */\nMocha.prototype.loadFiles = function (fn) {\n var self = this;\n var suite = this.suite;\n this.files.forEach(function (file) {\n file = path.resolve(file);\n suite.emit(EVENT_FILE_PRE_REQUIRE, global, file, self);\n suite.emit(EVENT_FILE_REQUIRE, require(file), file, self);\n suite.emit(EVENT_FILE_POST_REQUIRE, global, file, self);\n });\n fn && fn();\n};\n\n/**\n * Loads `files` prior to execution. Supports Node ES Modules.\n *\n * @description\n * The implementation relies on Node's `require` and `import` to execute\n * the test interface functions and will be subject to its cache.\n * Supports both CJS and ESM modules.\n *\n * @public\n * @see {@link Mocha#addFile}\n * @see {@link Mocha#run}\n * @see {@link Mocha#unloadFiles}\n * @param {Object} [options] - Settings object.\n * @param {Function} [options.esmDecorator] - Function invoked on esm module name right before importing it. By default will passthrough as is.\n * @returns {Promise}\n * @example\n *\n * // loads ESM (and CJS) test files asynchronously, then runs root suite\n * mocha.loadFilesAsync()\n * .then(() => mocha.run(failures => process.exitCode = failures ? 1 : 0))\n * .catch(() => process.exitCode = 1);\n */\nMocha.prototype.loadFilesAsync = function ({ esmDecorator } = {}) {\n var self = this;\n var suite = this.suite;\n this.lazyLoadFiles(true);\n\n return esmUtils.loadFilesAsync(\n this.files,\n function (file) {\n suite.emit(EVENT_FILE_PRE_REQUIRE, global, file, self);\n },\n function (file, resultModule) {\n suite.emit(EVENT_FILE_REQUIRE, resultModule, file, self);\n suite.emit(EVENT_FILE_POST_REQUIRE, global, file, self);\n },\n esmDecorator,\n );\n};\n\n/**\n * Removes a previously loaded file from Node's `require` cache.\n *\n * @private\n * @static\n * @see {@link Mocha#unloadFiles}\n * @param {string} file - Pathname of file to be unloaded.\n */\nMocha.unloadFile = function (file) {\n if (utils.isBrowser()) {\n throw createUnsupportedError(\n \"unloadFile() is only supported in a Node.js environment\",\n );\n }\n return require(\"./nodejs/file-unloader\").unloadFile(file);\n};\n\n/**\n * Unloads `files` from Node's `require` cache.\n *\n * @description\n * This allows required files to be \"freshly\" reloaded, providing the ability\n * to reuse a Mocha instance programmatically.\n * Note: does not clear ESM module files from the cache\n *\n * Intended for consumers — not used internally\n *\n * @public\n * @see {@link Mocha#run}\n * @returns {Mocha} this\n * @chainable\n */\nMocha.prototype.unloadFiles = function () {\n if (this._state === mochaStates.DISPOSED) {\n throw createMochaInstanceAlreadyDisposedError(\n \"Mocha instance is already disposed, it cannot be used again.\",\n this._cleanReferencesAfterRun,\n this,\n );\n }\n\n this.files.forEach(function (file) {\n Mocha.unloadFile(file);\n });\n this._state = mochaStates.INIT;\n return this;\n};\n\n/**\n * Sets `grep` filter after escaping RegExp special characters.\n *\n * @public\n * @see {@link Mocha#grep}\n * @param {string} str - Value to be converted to a regexp.\n * @returns {Mocha} this\n * @chainable\n * @example\n *\n * // Select tests whose full title begins with `\"foo\"` followed by a period\n * mocha.fgrep('foo.');\n */\nMocha.prototype.fgrep = function (str) {\n if (!str) {\n return this;\n }\n return this.grep(new RegExp(escapeRe(str)));\n};\n\n/**\n * @summary\n * Sets `grep` filter used to select specific tests for execution.\n *\n * @description\n * If `re` is a regexp-like string, it will be converted to regexp.\n * The regexp is tested against the full title of each test (i.e., the\n * name of the test preceded by titles of each its ancestral suites).\n * As such, using an exact-match fixed pattern against the\n * test name itself will not yield any matches.\n *
            \n * Previous filter value will be overwritten on each call!\n *\n * @public\n * @see [CLI option](../#-grep-regexp-g-regexp)\n * @see {@link Mocha#fgrep}\n * @see {@link Mocha#invert}\n * @param {RegExp|String} re - Regular expression used to select tests.\n * @return {Mocha} this\n * @chainable\n * @example\n *\n * // Select tests whose full title contains `\"match\"`, ignoring case\n * mocha.grep(/match/i);\n * @example\n *\n * // Same as above but with regexp-like string argument\n * mocha.grep('/match/i');\n * @example\n *\n * // ## Anti-example\n * // Given embedded test `it('only-this-test')`...\n * mocha.grep('/^only-this-test$/'); // NO! Use `.only()` to do this!\n */\nMocha.prototype.grep = function (re) {\n if (utils.isString(re)) {\n // extract args if it's regex-like, i.e: [string, pattern, flag]\n var arg = re.match(/^\\/(.*)\\/([gimy]{0,4})$|.*/);\n this.options.grep = new RegExp(arg[1] || arg[0], arg[2]);\n } else {\n this.options.grep = re;\n }\n return this;\n};\n\n/**\n * Inverts `grep` matches.\n *\n * @public\n * @see {@link Mocha#grep}\n * @return {Mocha} this\n * @chainable\n * @example\n *\n * // Select tests whose full title does *not* contain `\"match\"`, ignoring case\n * mocha.grep(/match/i).invert();\n */\nMocha.prototype.invert = function () {\n this.options.invert = true;\n return this;\n};\n\n/**\n * Enables or disables checking for global variables leaked while running tests.\n *\n * @public\n * @see [CLI option](../#-check-leaks)\n * @param {boolean} [checkLeaks=true] - Whether to check for global variable leaks.\n * @return {Mocha} this\n * @chainable\n */\nMocha.prototype.checkLeaks = function (checkLeaks) {\n this.options.checkLeaks = checkLeaks !== false;\n return this;\n};\n\n/**\n * Enables or disables whether or not to dispose after each test run.\n * Disable this to ensure you can run the test suite multiple times.\n * If disabled, be sure to dispose mocha when you're done to prevent memory leaks.\n * @public\n * @see {@link Mocha#dispose}\n * @param {boolean} cleanReferencesAfterRun\n * @return {Mocha} this\n * @chainable\n */\nMocha.prototype.cleanReferencesAfterRun = function (cleanReferencesAfterRun) {\n this._cleanReferencesAfterRun = cleanReferencesAfterRun !== false;\n return this;\n};\n\n/**\n * Manually dispose this mocha instance. Mark this instance as `disposed` and unable to run more tests.\n * It also removes function references to tests functions and hooks, so variables trapped in closures can be cleaned by the garbage collector.\n * @public\n */\nMocha.prototype.dispose = function () {\n if (this._state === mochaStates.RUNNING) {\n throw createMochaInstanceAlreadyRunningError(\n \"Cannot dispose while the mocha instance is still running tests.\",\n );\n }\n this.unloadFiles();\n this._previousRunner && this._previousRunner.dispose();\n this.suite.dispose();\n this._state = mochaStates.DISPOSED;\n};\n\n/**\n * Displays full stack trace upon test failure.\n *\n * @public\n * @see [CLI option](../#-full-trace)\n * @param {boolean} [fullTrace=true] - Whether to print full stacktrace upon failure.\n * @return {Mocha} this\n * @chainable\n */\nMocha.prototype.fullTrace = function (fullTrace) {\n this.options.fullTrace = fullTrace !== false;\n return this;\n};\n\n/**\n * Specifies whitelist of variable names to be expected in global scope.\n *\n * @public\n * @see [CLI option](../#-global-variable-name)\n * @see {@link Mocha#checkLeaks}\n * @param {String[]|String} global - Accepted global variable name(s).\n * @return {Mocha} this\n * @chainable\n * @example\n *\n * // Specify variables to be expected in global scope\n * mocha.global(['jQuery', 'MyLib']);\n */\nMocha.prototype.global = function (global) {\n this.options.global = (this.options.global || [])\n .concat(global)\n .filter(Boolean)\n .filter(function (elt, idx, arr) {\n return arr.indexOf(elt) === idx;\n });\n return this;\n};\n// for backwards compatibility, 'globals' is an alias of 'global'\nMocha.prototype.globals = Mocha.prototype.global;\n\n/**\n * Enables or disables TTY color output by screen-oriented reporters.\n *\n * @public\n * @see [CLI option](../#-color-c-colors)\n * @param {boolean} [color=true] - Whether to enable color output.\n * @return {Mocha} this\n * @chainable\n */\nMocha.prototype.color = function (color) {\n this.options.color = color !== false;\n return this;\n};\n\n/**\n * Enables or disables reporter to use inline diffs (rather than +/-)\n * in test failure output.\n *\n * @public\n * @see [CLI option](../#-inline-diffs)\n * @param {boolean} [inlineDiffs=true] - Whether to use inline diffs.\n * @return {Mocha} this\n * @chainable\n */\nMocha.prototype.inlineDiffs = function (inlineDiffs) {\n this.options.inlineDiffs = inlineDiffs !== false;\n return this;\n};\n\n/**\n * Enables or disables reporter to include diff in test failure output.\n *\n * @public\n * @see [CLI option](../#-diff)\n * @param {boolean} [diff=true] - Whether to show diff on failure.\n * @return {Mocha} this\n * @chainable\n */\nMocha.prototype.diff = function (diff) {\n this.options.diff = diff !== false;\n return this;\n};\n\n/**\n * @summary\n * Sets timeout threshold value.\n *\n * @description\n * A string argument can use shorthand (such as \"2s\") and will be converted.\n * If the value is `0`, timeouts will be disabled.\n *\n * @public\n * @see [CLI option](../#-timeout-ms-t-ms)\n * @see [Timeouts](../#timeouts)\n * @param {number|string} msecs - Timeout threshold value.\n * @return {Mocha} this\n * @chainable\n * @example\n *\n * // Sets timeout to one second\n * mocha.timeout(1000);\n * @example\n *\n * // Same as above but using string argument\n * mocha.timeout('1s');\n */\nMocha.prototype.timeout = function (msecs) {\n this.suite.timeout(msecs);\n return this;\n};\n\n/**\n * Sets the number of times to retry failed tests.\n *\n * @public\n * @see [CLI option](../#-retries-n)\n * @see [Retry Tests](../#retry-tests)\n * @param {number} retry - Number of times to retry failed tests.\n * @return {Mocha} this\n * @chainable\n * @example\n *\n * // Allow any failed test to retry one more time\n * mocha.retries(1);\n */\nMocha.prototype.retries = function (retry) {\n this.suite.retries(retry);\n return this;\n};\n\n/**\n * Sets slowness threshold value.\n *\n * @public\n * @see [CLI option](../#-slow-ms-s-ms)\n * @param {number} msecs - Slowness threshold value.\n * @return {Mocha} this\n * @chainable\n * @example\n *\n * // Sets \"slow\" threshold to half a second\n * mocha.slow(500);\n * @example\n *\n * // Same as above but using string argument\n * mocha.slow('0.5s');\n */\nMocha.prototype.slow = function (msecs) {\n this.suite.slow(msecs);\n return this;\n};\n\n/**\n * Forces all tests to either accept a `done` callback or return a promise.\n *\n * @public\n * @see [CLI option](../#-async-only-a)\n * @param {boolean} [asyncOnly=true] - Whether to force `done` callback or promise.\n * @return {Mocha} this\n * @chainable\n */\nMocha.prototype.asyncOnly = function (asyncOnly) {\n this.options.asyncOnly = asyncOnly !== false;\n return this;\n};\n\n/**\n * Disables syntax highlighting (in browser).\n *\n * @public\n * @return {Mocha} this\n * @chainable\n */\nMocha.prototype.noHighlighting = function () {\n this.options.noHighlighting = true;\n return this;\n};\n\n/**\n * Enables or disables uncaught errors to propagate.\n *\n * @public\n * @see [CLI option](../#-allow-uncaught)\n * @param {boolean} [allowUncaught=true] - Whether to propagate uncaught errors.\n * @return {Mocha} this\n * @chainable\n */\nMocha.prototype.allowUncaught = function (allowUncaught) {\n this.options.allowUncaught = allowUncaught !== false;\n return this;\n};\n\n/**\n * @summary\n * Delays root suite execution.\n *\n * @description\n * Used to perform async operations before any suites are run.\n *\n * @public\n * @see [delayed root suite](../#delayed-root-suite)\n * @returns {Mocha} this\n * @chainable\n */\nMocha.prototype.delay = function delay() {\n this.options.delay = true;\n return this;\n};\n\n/**\n * Enables or disables running tests in dry-run mode.\n *\n * @public\n * @see [CLI option](../#-dry-run)\n * @param {boolean} [dryRun=true] - Whether to activate dry-run mode.\n * @return {Mocha} this\n * @chainable\n */\nMocha.prototype.dryRun = function (dryRun) {\n this.options.dryRun = dryRun !== false;\n return this;\n};\n\n/**\n * Reports tests as failed when they are skipped due to a hook failure.\n *\n * @public\n * @see [CLI option](../#-fail-hook-affected-tests)\n * @param {boolean} [failHookAffectedTests=true] - Whether to fail tests affected by hook failures.\n * @return {Mocha} this\n * @chainable\n */\nMocha.prototype.failHookAffectedTests = function (failHookAffectedTests) {\n this.options.failHookAffectedTests = failHookAffectedTests !== false;\n return this;\n};\n\n/**\n * Fails test run if no tests encountered with exit-code 1.\n *\n * @public\n * @see [CLI option](../#-fail-zero)\n * @param {boolean} [failZero=true] - Whether to fail test run.\n * @return {Mocha} this\n * @chainable\n */\nMocha.prototype.failZero = function (failZero) {\n this.options.failZero = failZero !== false;\n return this;\n};\n\n/**\n * Fail test run if tests were failed.\n *\n * @public\n * @see [CLI option](../#-pass-on-failing-test-suite)\n * @param {boolean} [passOnFailingTestSuite=false] - Whether to fail test run.\n * @return {Mocha} this\n * @chainable\n */\nMocha.prototype.passOnFailingTestSuite = function (passOnFailingTestSuite) {\n this.options.passOnFailingTestSuite = passOnFailingTestSuite === true;\n return this;\n};\n\n/**\n * Causes tests marked `only` to fail the suite.\n *\n * @public\n * @see [CLI option](../#-forbid-only)\n * @param {boolean} [forbidOnly=true] - Whether tests marked `only` fail the suite.\n * @returns {Mocha} this\n * @chainable\n */\nMocha.prototype.forbidOnly = function (forbidOnly) {\n this.options.forbidOnly = forbidOnly !== false;\n return this;\n};\n\n/**\n * Causes pending tests and tests marked `skip` to fail the suite.\n *\n * @public\n * @see [CLI option](../#-forbid-pending)\n * @param {boolean} [forbidPending=true] - Whether pending tests fail the suite.\n * @returns {Mocha} this\n * @chainable\n */\nMocha.prototype.forbidPending = function (forbidPending) {\n this.options.forbidPending = forbidPending !== false;\n return this;\n};\n\n/**\n * Throws an error if mocha is in the wrong state to be able to transition to a \"running\" state.\n * @private\n */\nMocha.prototype._guardRunningStateTransition = function () {\n if (this._state === mochaStates.RUNNING) {\n throw createMochaInstanceAlreadyRunningError(\n \"Mocha instance is currently running tests, cannot start a next test run until this one is done\",\n this,\n );\n }\n if (\n this._state === mochaStates.DISPOSED ||\n this._state === mochaStates.REFERENCES_CLEANED\n ) {\n throw createMochaInstanceAlreadyDisposedError(\n \"Mocha instance is already disposed, cannot start a new test run. Please create a new mocha instance. Be sure to set disable `cleanReferencesAfterRun` when you want to reuse the same mocha instance for multiple test runs.\",\n this._cleanReferencesAfterRun,\n this,\n );\n }\n};\n\n/**\n * Mocha version as specified by \"package.json\".\n *\n * @name Mocha#version\n * @type string\n * @readonly\n */\nObject.defineProperty(Mocha.prototype, \"version\", {\n value: require(\"../package.json\").version,\n configurable: false,\n enumerable: true,\n writable: false,\n});\n\n/**\n * Runs root suite and invokes `fn()` when complete.\n *\n * @description\n * To run tests multiple times (or to run tests in files that are\n * already in the `require` cache), make sure to clear them from\n * the cache first!\n *\n * @public\n * @see {@link Mocha#unloadFiles}\n * @see {@link Runner#run}\n * @param {DoneCB} [fn] - Callback invoked when test execution completed.\n * @returns {import(\"./runner.js\")} runner instance\n * @example\n *\n * // exit with non-zero status if there were test failures\n * mocha.run(failures => process.exitCode = failures ? 1 : 0);\n */\nMocha.prototype.run = function (fn) {\n this._guardRunningStateTransition();\n this._state = mochaStates.RUNNING;\n if (this._previousRunner) {\n this._previousRunner.dispose();\n this.suite.reset();\n }\n if (this.files.length && !this._lazyLoadFiles) {\n this.loadFiles();\n }\n var suite = this.suite;\n var options = this.options;\n options.files = this.files;\n const runner = new this._runnerClass(suite, {\n cleanReferencesAfterRun: this._cleanReferencesAfterRun,\n delay: options.delay,\n dryRun: options.dryRun,\n failHookAffectedTests: options.failHookAffectedTests,\n failZero: options.failZero,\n });\n createStatsCollector(runner);\n var reporter = new this._reporter(runner, options);\n runner.checkLeaks = options.checkLeaks === true;\n runner.fullStackTrace = options.fullTrace;\n runner.asyncOnly = options.asyncOnly;\n runner.allowUncaught = options.allowUncaught;\n runner.forbidOnly = options.forbidOnly;\n runner.forbidPending = options.forbidPending;\n if (options.grep) {\n runner.grep(options.grep, options.invert);\n }\n if (options.global) {\n runner.globals(options.global);\n }\n if (options.color !== undefined) {\n exports.reporters.Base.useColors = options.color;\n }\n exports.reporters.Base.inlineDiffs = options.inlineDiffs;\n exports.reporters.Base.hideDiff = !options.diff;\n\n const done = (failures) => {\n this._previousRunner = runner;\n this._state = this._cleanReferencesAfterRun\n ? mochaStates.REFERENCES_CLEANED\n : mochaStates.INIT;\n fn = fn || utils.noop;\n if (typeof reporter.done === \"function\") {\n reporter.done(failures, fn);\n } else {\n fn(failures);\n }\n };\n\n const runAsync = async (runner) => {\n const context =\n this.options.enableGlobalSetup && this.hasGlobalSetupFixtures()\n ? await this.runGlobalSetup(runner)\n : {};\n const failureCount = await runner.runAsync({\n files: this.files,\n options,\n });\n if (this.options.enableGlobalTeardown && this.hasGlobalTeardownFixtures()) {\n await this.runGlobalTeardown(runner, { context });\n }\n return failureCount;\n };\n\n // no \"catch\" here is intentional. errors coming out of\n // Runner#run are considered uncaught/unhandled and caught\n // by the `process` event listeners.\n // also: returning anything other than `runner` would be a breaking\n // change\n runAsync(runner).then(done);\n\n return runner;\n};\n\n/**\n * Assigns hooks to the root suite\n * @param {MochaRootHookObject} [hooks] - Hooks to assign to root suite\n * @chainable\n */\nMocha.prototype.rootHooks = function rootHooks({\n beforeAll = [],\n beforeEach = [],\n afterAll = [],\n afterEach = [],\n} = {}) {\n beforeAll = utils.castArray(beforeAll);\n beforeEach = utils.castArray(beforeEach);\n afterAll = utils.castArray(afterAll);\n afterEach = utils.castArray(afterEach);\n beforeAll.forEach((hook) => {\n this.suite.beforeAll(hook);\n });\n beforeEach.forEach((hook) => {\n this.suite.beforeEach(hook);\n });\n afterAll.forEach((hook) => {\n this.suite.afterAll(hook);\n });\n afterEach.forEach((hook) => {\n this.suite.afterEach(hook);\n });\n return this;\n};\n\n/**\n * Toggles parallel mode.\n *\n * Must be run before calling {@link Mocha#run}. Changes the `Runner` class to\n * use; also enables lazy file loading if not already done so.\n *\n * Warning: when passed `false` and lazy loading has been enabled _via any means_ (including calling `parallelMode(true)`), this method will _not_ disable lazy loading. Lazy loading is a prerequisite for parallel\n * mode, but parallel mode is _not_ a prerequisite for lazy loading!\n * @param {boolean} [enable] - If `true`, enable; otherwise disable.\n * @throws If run in browser\n * @throws If Mocha not in `INIT` state\n * @returns {Mocha}\n * @chainable\n * @public\n */\nMocha.prototype.parallelMode = function parallelMode(enable = true) {\n if (utils.isBrowser()) {\n throw createUnsupportedError(\"parallel mode is only supported in Node.js\");\n }\n const parallel = Boolean(enable);\n if (\n parallel === this.options.parallel &&\n this._lazyLoadFiles &&\n this._runnerClass !== exports.Runner\n ) {\n return this;\n }\n if (this._state !== mochaStates.INIT) {\n throw createUnsupportedError(\n \"cannot change parallel mode after having called run()\",\n );\n }\n this.options.parallel = parallel;\n\n // swap Runner class\n this._runnerClass = parallel\n ? require(\"./nodejs/parallel-buffered-runner\")\n : exports.Runner;\n\n // lazyLoadFiles may have been set `true` otherwise (for ESM loading),\n // so keep `true` if so.\n return this.lazyLoadFiles(this._lazyLoadFiles || parallel);\n};\n\n/**\n * Disables implicit call to {@link Mocha#loadFiles} in {@link Mocha#run}. This\n * setting is used by watch mode, parallel mode, and for loading ESM files.\n * @todo This should throw if we've already loaded files; such behavior\n * necessitates adding a new state.\n * @param {boolean} [enable] - If `true`, disable eager loading of files in\n * {@link Mocha#run}\n * @chainable\n * @public\n */\nMocha.prototype.lazyLoadFiles = function lazyLoadFiles(enable) {\n this._lazyLoadFiles = enable === true;\n debug(\"set lazy load to %s\", enable);\n return this;\n};\n\n/**\n * Configures one or more global setup fixtures.\n *\n * If given no parameters, _unsets_ any previously-set fixtures.\n * @chainable\n * @public\n * @param {MochaGlobalFixture|MochaGlobalFixture[]} [setupFns] - Global setup fixture(s)\n * @returns {Mocha}\n */\nMocha.prototype.globalSetup = function globalSetup(setupFns = []) {\n setupFns = utils.castArray(setupFns);\n this.options.globalSetup = setupFns;\n debug(\"configured %d global setup functions\", setupFns.length);\n return this;\n};\n\n/**\n * Configures one or more global teardown fixtures.\n *\n * If given no parameters, _unsets_ any previously-set fixtures.\n * @chainable\n * @public\n * @param {MochaGlobalFixture|MochaGlobalFixture[]} [teardownFns] - Global teardown fixture(s)\n * @returns {Mocha}\n */\nMocha.prototype.globalTeardown = function globalTeardown(teardownFns = []) {\n teardownFns = utils.castArray(teardownFns);\n this.options.globalTeardown = teardownFns;\n debug(\"configured %d global teardown functions\", teardownFns.length);\n return this;\n};\n\n/**\n * Run any global setup fixtures sequentially, if any.\n *\n * This is _automatically called_ by {@link Mocha#run} _unless_ the `runGlobalSetup` option is `false`; see {@link Mocha#enableGlobalSetup}.\n *\n * The context object this function resolves with should be consumed by {@link Mocha#runGlobalTeardown}.\n * @param {object} [context] - Context object if already have one\n * @public\n * @returns {Promise} Context object\n */\nMocha.prototype.runGlobalSetup = async function runGlobalSetup(context = {}) {\n const { globalSetup } = this.options;\n if (globalSetup && globalSetup.length) {\n debug(\"run(): global setup starting\");\n await this._runGlobalFixtures(globalSetup, context);\n debug(\"run(): global setup complete\");\n }\n return context;\n};\n\n/**\n * Run any global teardown fixtures sequentially, if any.\n *\n * This is _automatically called_ by {@link Mocha#run} _unless_ the `runGlobalTeardown` option is `false`; see {@link Mocha#enableGlobalTeardown}.\n *\n * Should be called with context object returned by {@link Mocha#runGlobalSetup}, if applicable.\n * @param {object} [context] - Context object if already have one\n * @public\n * @returns {Promise} Context object\n */\nMocha.prototype.runGlobalTeardown = async function runGlobalTeardown(\n context = {},\n) {\n const { globalTeardown } = this.options;\n if (globalTeardown && globalTeardown.length) {\n debug(\"run(): global teardown starting\");\n await this._runGlobalFixtures(globalTeardown, context);\n }\n debug(\"run(): global teardown complete\");\n return context;\n};\n\n/**\n * Run global fixtures sequentially with context `context`\n * @private\n * @param {MochaGlobalFixture[]} [fixtureFns] - Fixtures to run\n * @param {object} [context] - context object\n * @returns {Promise} context object\n */\nMocha.prototype._runGlobalFixtures = async function _runGlobalFixtures(\n fixtureFns = [],\n context = {},\n) {\n for await (const fixtureFn of fixtureFns) {\n await fixtureFn.call(context);\n }\n return context;\n};\n\n/**\n * Toggle execution of any global setup fixture(s)\n *\n * @chainable\n * @public\n * @param {boolean } [enabled=true] - If `false`, do not run global setup fixture\n * @returns {Mocha}\n */\nMocha.prototype.enableGlobalSetup = function enableGlobalSetup(enabled = true) {\n this.options.enableGlobalSetup = Boolean(enabled);\n return this;\n};\n\n/**\n * Toggle execution of any global teardown fixture(s)\n *\n * @chainable\n * @public\n * @param {boolean } [enabled=true] - If `false`, do not run global teardown fixture\n * @returns {Mocha}\n */\nMocha.prototype.enableGlobalTeardown = function enableGlobalTeardown(\n enabled = true,\n) {\n this.options.enableGlobalTeardown = Boolean(enabled);\n return this;\n};\n\n/**\n * Returns `true` if one or more global setup fixtures have been supplied.\n * @public\n * @returns {boolean}\n */\nMocha.prototype.hasGlobalSetupFixtures = function hasGlobalSetupFixtures() {\n return Boolean(this.options.globalSetup.length);\n};\n\n/**\n * Returns `true` if one or more global teardown fixtures have been supplied.\n * @public\n * @returns {boolean}\n */\nMocha.prototype.hasGlobalTeardownFixtures =\n function hasGlobalTeardownFixtures() {\n return Boolean(this.options.globalTeardown.length);\n };\n","\"use strict\";\n\n/* eslint no-unused-vars: off */\n/* eslint-env commonjs */\n\n/**\n * Shim process.stdout.\n */\n\nprocess.stdout = require(\"browser-stdout\")({ label: false });\n\nvar parseQuery = require(\"./lib/browser/parse-query\");\nvar highlightTags = require(\"./lib/browser/highlight-tags\");\nvar Mocha = require(\"./lib/mocha\");\n\n/**\n * Create a Mocha instance.\n *\n * @return {undefined}\n */\n\nvar mocha = new Mocha({ reporter: \"html\" });\n\n/**\n * Save timer references to avoid Sinon interfering (see GH-237).\n */\n\nvar Date = global.Date;\nvar setTimeout = global.setTimeout;\nvar setInterval = global.setInterval;\nvar clearTimeout = global.clearTimeout;\nvar clearInterval = global.clearInterval;\n\nvar uncaughtExceptionHandlers = [];\n\nvar originalOnerrorHandler = global.onerror;\n\n/**\n * Remove uncaughtException listener.\n * Revert to original onerror handler if previously defined.\n */\n\nprocess.removeListener = function (e, fn) {\n if (e === \"uncaughtException\") {\n if (originalOnerrorHandler) {\n global.onerror = originalOnerrorHandler;\n } else {\n global.onerror = function () {};\n }\n var i = uncaughtExceptionHandlers.indexOf(fn);\n if (i !== -1) {\n uncaughtExceptionHandlers.splice(i, 1);\n }\n }\n};\n\n/**\n * Implements listenerCount for 'uncaughtException'.\n */\n\nprocess.listenerCount = function (name) {\n if (name === \"uncaughtException\") {\n return uncaughtExceptionHandlers.length;\n }\n return 0;\n};\n\n/**\n * Implements uncaughtException listener.\n */\n\nprocess.on = function (e, fn) {\n if (e === \"uncaughtException\") {\n global.onerror = function (msg, url, line, col, err) {\n fn(err || new Error(msg + \" (\" + url + \":\" + line + \":\" + col + \")\"));\n return !mocha.options.allowUncaught;\n };\n uncaughtExceptionHandlers.push(fn);\n }\n};\n\nprocess.listeners = function (err) {\n if (err === \"uncaughtException\") {\n return uncaughtExceptionHandlers;\n }\n return [];\n};\n\n// The BDD UI is registered by default, but no UI will be functional in the\n// browser without an explicit call to the overridden `mocha.ui` (see below).\n// Ensure that this default UI does not expose its methods to the global scope.\nmocha.suite.removeAllListeners(\"pre-require\");\n\nvar immediateQueue = [];\nvar immediateTimeout;\n\nfunction timeslice() {\n var immediateStart = new Date().getTime();\n while (immediateQueue.length && new Date().getTime() - immediateStart < 100) {\n immediateQueue.shift()();\n }\n if (immediateQueue.length) {\n immediateTimeout = setTimeout(timeslice, 0);\n } else {\n immediateTimeout = null;\n }\n}\n\n/**\n * High-performance override of Runner.immediately.\n */\n\nMocha.Runner.immediately = function (callback) {\n immediateQueue.push(callback);\n if (!immediateTimeout) {\n immediateTimeout = setTimeout(timeslice, 0);\n }\n};\n\n/**\n * Function to allow assertion libraries to throw errors directly into mocha.\n * This is useful when running tests in a browser because window.onerror will\n * only receive the 'message' attribute of the Error.\n */\nmocha.throwError = function (err) {\n uncaughtExceptionHandlers.forEach(function (fn) {\n fn(err);\n });\n throw err;\n};\n\n/**\n * Override ui to ensure that the ui functions are initialized.\n * Normally this would happen in Mocha.prototype.loadFiles.\n */\n\nmocha.ui = function (ui) {\n Mocha.prototype.ui.call(this, ui);\n this.suite.emit(\"pre-require\", global, null, this);\n return this;\n};\n\n/**\n * Setup mocha with the given setting options.\n */\n\nmocha.setup = function (opts) {\n if (typeof opts === \"string\") {\n opts = { ui: opts };\n }\n if (opts.delay === true) {\n this.delay();\n }\n var self = this;\n Object.keys(opts)\n .filter(function (opt) {\n return opt !== \"delay\";\n })\n .forEach(function (opt) {\n if (Object.prototype.hasOwnProperty.call(opts, opt)) {\n self[opt](opts[opt]);\n }\n });\n return this;\n};\n\n/**\n * Run mocha, returning the Runner.\n */\n\nmocha.run = function (fn) {\n var options = mocha.options;\n mocha.globals(\"location\");\n\n var query = parseQuery(global.location.search || \"\");\n if (query.grep) {\n mocha.grep(query.grep);\n }\n if (query.fgrep) {\n mocha.fgrep(query.fgrep);\n }\n if (query.invert) {\n mocha.invert();\n }\n\n return Mocha.prototype.run.call(mocha, function (err) {\n // The DOM Document is not available in Web Workers.\n var document = global.document;\n if (\n document &&\n document.getElementById(\"mocha\") &&\n options.noHighlighting !== true\n ) {\n highlightTags(\"code\");\n }\n if (fn) {\n fn(err);\n }\n });\n};\n\n/**\n * Expose the process shim.\n * https://github.com/mochajs/mocha/pull/916\n */\n\nMocha.process = process;\n\n/**\n * Expose mocha.\n */\nglobal.Mocha = Mocha;\nglobal.mocha = mocha;\n\n// for bundlers: enable `import {describe, it} from 'mocha'`\n// `bdd` interface only\n// prettier-ignore\n[ \n 'describe', 'context', 'it', 'specify',\n 'xdescribe', 'xcontext', 'xit', 'xspecify',\n 'before', 'beforeEach', 'afterEach', 'after'\n].forEach(function(key) {\n mocha[key] = global[key];\n});\n\nmodule.exports = mocha;\n"],"names":["global","defaultSetTimout","defaultClearTimeout","cachedSetTimeout","cachedClearTimeout","runTimeout","runClearTimeout","queue","draining","currentQueue","queueIndex","cleanUpNextTick","drainQueue","nextTick","Item","title","platform","browser","env","argv","version","versions","release","config","noop","on","addListener","once","off","removeListener","removeAllListeners","emit","binding","cwd","chdir","umask","performance","performanceNow","hrtime","startTime","uptime","require$$0","inherits","require$$1","process.nextTick","parseQuery","highlightTags","_base","_interopRequireDefault","_string","json","_line","_typeof","array","ownKeys","_objectSpread","_defineProperty","_toPropertyKey","_toPrimitive","parse","_parse","require$$2","require$$3","_toConsumableArray","_arrayWithoutHoles","_iterableToArray","_unsupportedIterableToArray","_nonIterableSpread","_arrayLikeToArray","merge_1","require$$4","require$$5","require$$6","require$$7","require$$8","require$$9","require$$10","require$$11","require$$12","require$$13","require$$14","s","m","h","d","w","y","ms","fmtLong","fmtShort","plural","toString","base64.fromByteArray","ieee754.read","ieee754.write","base64.toByteArray","this","he","Buffer.isBuffer","process.browser","Pending","common","constants","errorConstants","createUnsupportedError","createMissingArgumentError","createInvalidArgumentTypeError","createInvalidExceptionError","createFatalError","createMultipleDoneError","createForbiddenExclusivityError","createTimeoutError","isMochaError","errors","EventEmitter","debug","utils","Date","setTimeout","clearTimeout","Runnable","MOCHA_ID_PROP_NAME","Suite","Test","EVENT_FILE_PRE_REQUIRE","bddModule","bdd","tddModule","tdd","qunitModule","qunit","exportsModule","exports","require$$15","require","require$$16"],"mappings":";;;;;;;;;;;AAAA,iBAAe,CAAC,OAAOA,QAAM,KAAK,WAAW,GAAGA,QAAM;EACtD,YAAY,OAAO,IAAI,KAAK,WAAW,GAAG,IAAI;EAC9C,YAAY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,iBAAiB;AAC1B;EACA;EACA;EACA;EACA;EACA;EACA,EAAE,gBAAgB,EAAE,4BAA4B;AAChD;EACA;EACA;EACA;EACA;EACA;EACA,EAAE,iBAAiB,EAAE,6BAA6B;AAClD;EACA;EACA;EACA;EACA;EACA;EACA,EAAE,iBAAiB,EAAE,6BAA6B;AAClD;EACA;EACA;EACA;EACA;EACA;EACA,EAAE,iBAAiB,EAAE,6BAA6B;AAClD;EACA;EACA;EACA;EACA;EACA;EACA,EAAE,gBAAgB,EAAE,4BAA4B;AAChD;EACA;EACA;EACA;EACA;EACA;EACA,EAAE,aAAa,EAAE,yBAAyB;AAC1C;EACA;EACA;EACA;EACA;EACA;EACA,EAAE,sBAAsB,EAAE,kCAAkC;AAC5D;EACA;EACA;EACA;EACA;EACA;EACA,EAAE,WAAW,EAAE,uBAAuB;AACtC;EACA;EACA;EACA;EACA;EACA;EACA,EAAE,wBAAwB,EAAE,oCAAoC;AAChE;EACA;EACA;EACA;EACA;EACA;EACA,EAAE,yBAAyB,EAAE,qCAAqC;AAClE;EACA;EACA;EACA;EACA;EACA;EACA,EAAE,qBAAqB,EAAE,iCAAiC;AAC1D;EACA;EACA;EACA;EACA;EACA;EACA,EAAE,6BAA6B,EAAE,yCAAyC;AAC1E;EACA;EACA;EACA;EACA;EACA;EACA,EAAE,yBAAyB,EAAE,qCAAqC;AAClE;EACA;EACA;EACA;EACA;EACA;EACA,EAAE,OAAO,EAAE,mBAAmB;AAC9B;EACA;EACA;EACA;EACA;EACA;EACA,EAAE,eAAe,EAAE,2BAA2B;EAC9C,CAAC,CAAC;AACF;MACAC,gBAAc,GAAG,aAAED,WAAS,EAAE;;;;;;;;;ECjH9B,MAAM,EAAE,MAAM,EAAE,GAAG7D,YAAoB,CAAC;EACxC,MAAM,aAAE6D,WAAS,EAAE,GAAG3D,gBAA+B,CAAC;;;;;;;;;;;;;EAatD,MAAM,WAAW,GAAG,CAAC,GAAG,EAAE,IAAI,KAAK;IACjC,IAAI,OAAO,C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AAK,CAAC,GAAG,CAAC,GAAGA,cAAM,CAAC,GAAG,CAAC,CAAC;EAC1B,CAAA,CAAC,CAAC;;AAEH,MAAA,YAAc,GAAG;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"mocha.js","sources":["node_modules/browser-stdout/index.js","lib/browser/parse-query.js","lib/browser/highlight-tags.js","lib/utils/regexp.js","node_modules/diff/libesm/diff/base.js","node_modules/diff/libesm/diff/word.js","node_modules/diff/libesm/diff/line.js","node_modules/diff/libesm/patch/create.js","node_modules/ms/index.js","node_modules/picocolors/picocolors.browser.js","node_modules/is-unicode-supported/index.js","lib/utils.cjs","lib/pending.js","node_modules/debug/src/common.js","node_modules/debug/src/browser.js","lib/error-constants.js","lib/errors.js","lib/runnable.js","lib/hook.js","lib/suite.js","lib/runner.cjs","lib/reporters/base.js","lib/reporters/dot.js","lib/reporters/doc.js","lib/reporters/tap.js","lib/reporters/json.js","lib/reporters/html.js","lib/reporters/list.js","lib/reporters/min.js","lib/reporters/spec.js","lib/reporters/nyan.js","lib/reporters/xunit.js","lib/reporters/markdown.js","lib/reporters/progress.js","lib/reporters/landing.js","lib/reporters/json-stream.js","lib/reporters/github-actions.js","lib/reporters/index.cjs","lib/stats-collector.js","lib/test.js","lib/interfaces/common.js","lib/interfaces/bdd.js","lib/interfaces/tdd.js","lib/interfaces/qunit.js","lib/interfaces/exports.js","lib/context.js","lib/mocha.cjs","browser-entry.js"],"sourcesContent":["var WritableStream = require('stream').Writable\nvar inherits = require('util').inherits\n\nmodule.exports = BrowserStdout\n\n\ninherits(BrowserStdout, WritableStream)\n\nfunction BrowserStdout(opts) {\n if (!(this instanceof BrowserStdout)) return new BrowserStdout(opts)\n\n opts = opts || {}\n WritableStream.call(this, opts)\n this.label = (opts.label !== undefined) ? opts.label : 'stdout'\n}\n\nBrowserStdout.prototype._write = function(chunks, encoding, cb) {\n var output = chunks.toString ? chunks.toString() : chunks\n if (this.label === false) {\n console.log(output)\n } else {\n console.log(this.label+':', output)\n }\n process.nextTick(cb)\n}\n","/**\n * Parse the given `qs`.\n *\n * @private\n * @param {string} qs\n * @return {Object}\n */\nexport function parseQuery(qs) {\n return qs\n .replace(\"?\", \"\")\n .split(\"&\")\n .reduce(function (obj, pair) {\n var i = pair.indexOf(\"=\");\n var key = pair.slice(0, i);\n var val = pair.slice(i + 1);\n\n // Due to how the URLSearchParams API treats spaces\n obj[key] = decodeURIComponent(val.replace(/\\+/g, \"%20\"));\n\n return obj;\n }, {});\n}\n","/**\n * Highlight the given string of `js`.\n *\n * @private\n * @param {string} js\n * @return {string}\n */\nfunction highlight(js) {\n return js\n .replace(//g, \">\")\n .replace(/\\/\\/(.*)/gm, '//$1')\n .replace(/('.*?')/gm, '$1')\n .replace(/(\\d+\\.\\d+)/gm, '$1')\n .replace(/(\\d+)/gm, '$1')\n .replace(\n /\\bnew[ \\t]+(\\w+)/gm,\n 'new $1',\n )\n .replace(\n /\\b(function|new|throw|return|var|if|else)\\b/gm,\n '$1',\n );\n}\n\n/**\n * Highlight the contents of tag `name`.\n *\n * @private\n * @param {string} name\n */\nexport function highlightTags(name) {\n var code = document.getElementById(\"mocha\").getElementsByTagName(name);\n for (var i = 0, len = code.length; i < len; ++i) {\n code[i].innerHTML = highlight(code[i].innerHTML);\n }\n}\n","// @ts-check\n\n/**\n * Escapes special characters in a string to make it safe for use in regular expressions.\n *\n * @param {string} value - The string to escape\n * @returns {string} The escaped string safe for use in regular expressions\n */\nexport function escapeRegExp(value) {\n // TODO [engine:node@>=24]: Replace with built in RegExp.escape()\n return value\n .replaceAll(/[|\\\\{}()[\\]^$+*?.]/g, \"\\\\$&\")\n .replaceAll(\"-\", \"\\\\x2d\");\n}\n","export default class Diff {\n diff(oldStr, newStr, \n // Type below is not accurate/complete - see above for full possibilities - but it compiles\n options = {}) {\n let callback;\n if (typeof options === 'function') {\n callback = options;\n options = {};\n }\n else if ('callback' in options) {\n callback = options.callback;\n }\n // Allow subclasses to massage the input prior to running\n const oldString = this.castInput(oldStr, options);\n const newString = this.castInput(newStr, options);\n const oldTokens = this.removeEmpty(this.tokenize(oldString, options));\n const newTokens = this.removeEmpty(this.tokenize(newString, options));\n return this.diffWithOptionsObj(oldTokens, newTokens, options, callback);\n }\n diffWithOptionsObj(oldTokens, newTokens, options, callback) {\n var _a;\n const done = (value) => {\n value = this.postProcess(value, options);\n if (callback) {\n setTimeout(function () { callback(value); }, 0);\n return undefined;\n }\n else {\n return value;\n }\n };\n const newLen = newTokens.length, oldLen = oldTokens.length;\n let editLength = 1;\n let maxEditLength = newLen + oldLen;\n if (options.maxEditLength != null) {\n maxEditLength = Math.min(maxEditLength, options.maxEditLength);\n }\n const maxExecutionTime = (_a = options.timeout) !== null && _a !== void 0 ? _a : Infinity;\n const abortAfterTimestamp = Date.now() + maxExecutionTime;\n const bestPath = [{ oldPos: -1, lastComponent: undefined }];\n // Seed editLength = 0, i.e. the content starts with the same values\n let newPos = this.extractCommon(bestPath[0], newTokens, oldTokens, 0, options);\n if (bestPath[0].oldPos + 1 >= oldLen && newPos + 1 >= newLen) {\n // Identity per the equality and tokenizer\n return done(this.buildValues(bestPath[0].lastComponent, newTokens, oldTokens));\n }\n // Once we hit the right edge of the edit graph on some diagonal k, we can\n // definitely reach the end of the edit graph in no more than k edits, so\n // there's no point in considering any moves to diagonal k+1 any more (from\n // which we're guaranteed to need at least k+1 more edits).\n // Similarly, once we've reached the bottom of the edit graph, there's no\n // point considering moves to lower diagonals.\n // We record this fact by setting minDiagonalToConsider and\n // maxDiagonalToConsider to some finite value once we've hit the edge of\n // the edit graph.\n // This optimization is not faithful to the original algorithm presented in\n // Myers's paper, which instead pointlessly extends D-paths off the end of\n // the edit graph - see page 7 of Myers's paper which notes this point\n // explicitly and illustrates it with a diagram. This has major performance\n // implications for some common scenarios. For instance, to compute a diff\n // where the new text simply appends d characters on the end of the\n // original text of length n, the true Myers algorithm will take O(n+d^2)\n // time while this optimization needs only O(n+d) time.\n let minDiagonalToConsider = -Infinity, maxDiagonalToConsider = Infinity;\n // Main worker method. checks all permutations of a given edit length for acceptance.\n const execEditLength = () => {\n for (let diagonalPath = Math.max(minDiagonalToConsider, -editLength); diagonalPath <= Math.min(maxDiagonalToConsider, editLength); diagonalPath += 2) {\n let basePath;\n const removePath = bestPath[diagonalPath - 1], addPath = bestPath[diagonalPath + 1];\n if (removePath) {\n // No one else is going to attempt to use this value, clear it\n // @ts-expect-error - perf optimisation. This type-violating value will never be read.\n bestPath[diagonalPath - 1] = undefined;\n }\n let canAdd = false;\n if (addPath) {\n // what newPos will be after we do an insertion:\n const addPathNewPos = addPath.oldPos - diagonalPath;\n canAdd = addPath && 0 <= addPathNewPos && addPathNewPos < newLen;\n }\n const canRemove = removePath && removePath.oldPos + 1 < oldLen;\n if (!canAdd && !canRemove) {\n // If this path is a terminal then prune\n // @ts-expect-error - perf optimisation. This type-violating value will never be read.\n bestPath[diagonalPath] = undefined;\n continue;\n }\n // Select the diagonal that we want to branch from. We select the prior\n // path whose position in the old string is the farthest from the origin\n // and does not pass the bounds of the diff graph\n if (!canRemove || (canAdd && removePath.oldPos < addPath.oldPos)) {\n basePath = this.addToPath(addPath, true, false, 0, options);\n }\n else {\n basePath = this.addToPath(removePath, false, true, 1, options);\n }\n newPos = this.extractCommon(basePath, newTokens, oldTokens, diagonalPath, options);\n if (basePath.oldPos + 1 >= oldLen && newPos + 1 >= newLen) {\n // If we have hit the end of both strings, then we are done\n return done(this.buildValues(basePath.lastComponent, newTokens, oldTokens)) || true;\n }\n else {\n bestPath[diagonalPath] = basePath;\n if (basePath.oldPos + 1 >= oldLen) {\n maxDiagonalToConsider = Math.min(maxDiagonalToConsider, diagonalPath - 1);\n }\n if (newPos + 1 >= newLen) {\n minDiagonalToConsider = Math.max(minDiagonalToConsider, diagonalPath + 1);\n }\n }\n }\n editLength++;\n };\n // Performs the length of edit iteration. Is a bit fugly as this has to support the\n // sync and async mode which is never fun. Loops over execEditLength until a value\n // is produced, or until the edit length exceeds options.maxEditLength (if given),\n // in which case it will return undefined.\n if (callback) {\n (function exec() {\n setTimeout(function () {\n if (editLength > maxEditLength || Date.now() > abortAfterTimestamp) {\n return callback(undefined);\n }\n if (!execEditLength()) {\n exec();\n }\n }, 0);\n }());\n }\n else {\n while (editLength <= maxEditLength && Date.now() <= abortAfterTimestamp) {\n const ret = execEditLength();\n if (ret) {\n return ret;\n }\n }\n }\n }\n addToPath(path, added, removed, oldPosInc, options) {\n const last = path.lastComponent;\n if (last && !options.oneChangePerToken && last.added === added && last.removed === removed) {\n return {\n oldPos: path.oldPos + oldPosInc,\n lastComponent: { count: last.count + 1, added: added, removed: removed, previousComponent: last.previousComponent }\n };\n }\n else {\n return {\n oldPos: path.oldPos + oldPosInc,\n lastComponent: { count: 1, added: added, removed: removed, previousComponent: last }\n };\n }\n }\n extractCommon(basePath, newTokens, oldTokens, diagonalPath, options) {\n const newLen = newTokens.length, oldLen = oldTokens.length;\n let oldPos = basePath.oldPos, newPos = oldPos - diagonalPath, commonCount = 0;\n while (newPos + 1 < newLen && oldPos + 1 < oldLen && this.equals(oldTokens[oldPos + 1], newTokens[newPos + 1], options)) {\n newPos++;\n oldPos++;\n commonCount++;\n if (options.oneChangePerToken) {\n basePath.lastComponent = { count: 1, previousComponent: basePath.lastComponent, added: false, removed: false };\n }\n }\n if (commonCount && !options.oneChangePerToken) {\n basePath.lastComponent = { count: commonCount, previousComponent: basePath.lastComponent, added: false, removed: false };\n }\n basePath.oldPos = oldPos;\n return newPos;\n }\n equals(left, right, options) {\n if (options.comparator) {\n return options.comparator(left, right);\n }\n else {\n return left === right\n || (!!options.ignoreCase && left.toLowerCase() === right.toLowerCase());\n }\n }\n removeEmpty(array) {\n const ret = [];\n for (let i = 0; i < array.length; i++) {\n if (array[i]) {\n ret.push(array[i]);\n }\n }\n return ret;\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n castInput(value, options) {\n return value;\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n tokenize(value, options) {\n return Array.from(value);\n }\n join(chars) {\n // Assumes ValueT is string, which is the case for most subclasses.\n // When it's false, e.g. in diffArrays, this method needs to be overridden (e.g. with a no-op)\n // Yes, the casts are verbose and ugly, because this pattern - of having the base class SORT OF\n // assume tokens and values are strings, but not completely - is weird and janky.\n return chars.join('');\n }\n postProcess(changeObjects, \n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n options) {\n return changeObjects;\n }\n get useLongestToken() {\n return false;\n }\n buildValues(lastComponent, newTokens, oldTokens) {\n // First we convert our linked list of components in reverse order to an\n // array in the right order:\n const components = [];\n let nextComponent;\n while (lastComponent) {\n components.push(lastComponent);\n nextComponent = lastComponent.previousComponent;\n delete lastComponent.previousComponent;\n lastComponent = nextComponent;\n }\n components.reverse();\n const componentLen = components.length;\n let componentPos = 0, newPos = 0, oldPos = 0;\n for (; componentPos < componentLen; componentPos++) {\n const component = components[componentPos];\n if (!component.removed) {\n if (!component.added && this.useLongestToken) {\n let value = newTokens.slice(newPos, newPos + component.count);\n value = value.map(function (value, i) {\n const oldValue = oldTokens[oldPos + i];\n return oldValue.length > value.length ? oldValue : value;\n });\n component.value = this.join(value);\n }\n else {\n component.value = this.join(newTokens.slice(newPos, newPos + component.count));\n }\n newPos += component.count;\n // Common case\n if (!component.added) {\n oldPos += component.count;\n }\n }\n else {\n component.value = this.join(oldTokens.slice(oldPos, oldPos + component.count));\n oldPos += component.count;\n }\n }\n return components;\n }\n}\n","import Diff from './base.js';\nimport { longestCommonPrefix, longestCommonSuffix, replacePrefix, replaceSuffix, removePrefix, removeSuffix, maximumOverlap, leadingWs, trailingWs, leadingAndTrailingWs, segment } from '../util/string.js';\n// Based on https://en.wikipedia.org/wiki/Latin_script_in_Unicode\n//\n// Chars/ranges counted as \"word\" characters by this regex are as follows:\n//\n// + U+00AD Soft hyphen\n// + 00C0–00FF (letters with diacritics from the Latin-1 Supplement), except:\n// - U+00D7 × Multiplication sign\n// - U+00F7 ÷ Division sign\n// + Latin Extended-A, 0100–017F\n// + Latin Extended-B, 0180–024F\n// + IPA Extensions, 0250–02AF\n// + Spacing Modifier Letters, 02B0–02FF, except:\n// - U+02C7 ˇ ˇ Caron\n// - U+02D8 ˘ ˘ Breve\n// - U+02D9 ˙ ˙ Dot Above\n// - U+02DA ˚ ˚ Ring Above\n// - U+02DB ˛ ˛ Ogonek\n// - U+02DC ˜ ˜ Small Tilde\n// - U+02DD ˝ ˝ Double Acute Accent\n// + Latin Extended Additional, 1E00–1EFF\nconst extendedWordChars = 'a-zA-Z0-9_\\\\u{AD}\\\\u{C0}-\\\\u{D6}\\\\u{D8}-\\\\u{F6}\\\\u{F8}-\\\\u{2C6}\\\\u{2C8}-\\\\u{2D7}\\\\u{2DE}-\\\\u{2FF}\\\\u{1E00}-\\\\u{1EFF}';\n// Each token is one of the following:\n// - A punctuation mark plus the surrounding whitespace\n// - A word plus the surrounding whitespace\n// - Pure whitespace (but only in the special case where the entire text\n// is just whitespace)\n//\n// We have to include surrounding whitespace in the tokens because the two\n// alternative approaches produce horribly broken results:\n// * If we just discard the whitespace, we can't fully reproduce the original\n// text from the sequence of tokens and any attempt to render the diff will\n// get the whitespace wrong.\n// * If we have separate tokens for whitespace, then in a typical text every\n// second token will be a single space character. But this often results in\n// the optimal diff between two texts being a perverse one that preserves\n// the spaces between words but deletes and reinserts actual common words.\n// See https://github.com/kpdecker/jsdiff/issues/160#issuecomment-1866099640\n// for an example.\n//\n// Keeping the surrounding whitespace of course has implications for .equals\n// and .join, not just .tokenize.\n// This regex does NOT fully implement the tokenization rules described above.\n// Instead, it gives runs of whitespace their own \"token\". The tokenize method\n// then handles stitching whitespace tokens onto adjacent word or punctuation\n// tokens.\nconst tokenizeIncludingWhitespace = new RegExp(`[${extendedWordChars}]+|\\\\s+|[^${extendedWordChars}]`, 'ug');\nclass WordDiff extends Diff {\n equals(left, right, options) {\n if (options.ignoreCase) {\n left = left.toLowerCase();\n right = right.toLowerCase();\n }\n return left.trim() === right.trim();\n }\n tokenize(value, options = {}) {\n let parts;\n if (options.intlSegmenter) {\n const segmenter = options.intlSegmenter;\n if (segmenter.resolvedOptions().granularity != 'word') {\n throw new Error('The segmenter passed must have a granularity of \"word\"');\n }\n // We want `parts` to be an array whose elements alternate between being\n // pure whitespace and being pure non-whitespace. This is ALMOST what the\n // segments returned by a word-based Intl.Segmenter already look like,\n // but not quite - see explanation in the docs of our custom segment()\n // function.\n parts = segment(value, segmenter);\n }\n else {\n parts = value.match(tokenizeIncludingWhitespace) || [];\n }\n const tokens = [];\n let prevPart = null;\n parts.forEach(part => {\n if ((/\\s/).test(part)) {\n if (prevPart == null) {\n tokens.push(part);\n }\n else {\n tokens.push(tokens.pop() + part);\n }\n }\n else if (prevPart != null && (/\\s/).test(prevPart)) {\n if (tokens[tokens.length - 1] == prevPart) {\n tokens.push(tokens.pop() + part);\n }\n else {\n tokens.push(prevPart + part);\n }\n }\n else {\n tokens.push(part);\n }\n prevPart = part;\n });\n return tokens;\n }\n join(tokens) {\n // Tokens being joined here will always have appeared consecutively in the\n // same text, so we can simply strip off the leading whitespace from all the\n // tokens except the first (and except any whitespace-only tokens - but such\n // a token will always be the first and only token anyway) and then join them\n // and the whitespace around words and punctuation will end up correct.\n return tokens.map((token, i) => {\n if (i == 0) {\n return token;\n }\n else {\n return token.replace((/^\\s+/), '');\n }\n }).join('');\n }\n postProcess(changes, options) {\n if (!changes || options.oneChangePerToken) {\n return changes;\n }\n let lastKeep = null;\n // Change objects representing any insertion or deletion since the last\n // \"keep\" change object. There can be at most one of each.\n let insertion = null;\n let deletion = null;\n changes.forEach(change => {\n if (change.added) {\n insertion = change;\n }\n else if (change.removed) {\n deletion = change;\n }\n else {\n if (insertion || deletion) { // May be false at start of text\n dedupeWhitespaceInChangeObjects(lastKeep, deletion, insertion, change, options.intlSegmenter);\n }\n lastKeep = change;\n insertion = null;\n deletion = null;\n }\n });\n if (insertion || deletion) {\n dedupeWhitespaceInChangeObjects(lastKeep, deletion, insertion, null, options.intlSegmenter);\n }\n return changes;\n }\n}\nexport const wordDiff = new WordDiff();\nexport function diffWords(oldStr, newStr, options) {\n // This option has never been documented and never will be (it's clearer to\n // just call `diffWordsWithSpace` directly if you need that behavior), but\n // has existed in jsdiff for a long time, so we retain support for it here\n // for the sake of backwards compatibility.\n if ((options === null || options === void 0 ? void 0 : options.ignoreWhitespace) != null && !options.ignoreWhitespace) {\n return diffWordsWithSpace(oldStr, newStr, options);\n }\n return wordDiff.diff(oldStr, newStr, options);\n}\nfunction dedupeWhitespaceInChangeObjects(startKeep, deletion, insertion, endKeep, segmenter) {\n // Before returning, we tidy up the leading and trailing whitespace of the\n // change objects to eliminate cases where trailing whitespace in one object\n // is repeated as leading whitespace in the next.\n // Below are examples of the outcomes we want here to explain the code.\n // I=insert, K=keep, D=delete\n // 1. diffing 'foo bar baz' vs 'foo baz'\n // Prior to cleanup, we have K:'foo ' D:' bar ' K:' baz'\n // After cleanup, we want: K:'foo ' D:'bar ' K:'baz'\n //\n // 2. Diffing 'foo bar baz' vs 'foo qux baz'\n // Prior to cleanup, we have K:'foo ' D:' bar ' I:' qux ' K:' baz'\n // After cleanup, we want K:'foo ' D:'bar' I:'qux' K:' baz'\n //\n // 3. Diffing 'foo\\nbar baz' vs 'foo baz'\n // Prior to cleanup, we have K:'foo ' D:'\\nbar ' K:' baz'\n // After cleanup, we want K'foo' D:'\\nbar' K:' baz'\n //\n // 4. Diffing 'foo baz' vs 'foo\\nbar baz'\n // Prior to cleanup, we have K:'foo\\n' I:'\\nbar ' K:' baz'\n // After cleanup, we ideally want K'foo' I:'\\nbar' K:' baz'\n // but don't actually manage this currently (the pre-cleanup change\n // objects don't contain enough information to make it possible).\n //\n // 5. Diffing 'foo bar baz' vs 'foo baz'\n // Prior to cleanup, we have K:'foo ' D:' bar ' K:' baz'\n // After cleanup, we want K:'foo ' D:' bar ' K:'baz'\n //\n // Our handling is unavoidably imperfect in the case where there's a single\n // indel between keeps and the whitespace has changed. For instance, consider\n // diffing 'foo\\tbar\\nbaz' vs 'foo baz'. Unless we create an extra change\n // object to represent the insertion of the space character (which isn't even\n // a token), we have no way to avoid losing information about the texts'\n // original whitespace in the result we return. Still, we do our best to\n // output something that will look sensible if we e.g. print it with\n // insertions in green and deletions in red.\n // Between two \"keep\" change objects (or before the first or after the last\n // change object), we can have either:\n // * A \"delete\" followed by an \"insert\"\n // * Just an \"insert\"\n // * Just a \"delete\"\n // We handle the three cases separately.\n if (deletion && insertion) {\n const [oldWsPrefix, oldWsSuffix] = leadingAndTrailingWs(deletion.value, segmenter);\n const [newWsPrefix, newWsSuffix] = leadingAndTrailingWs(insertion.value, segmenter);\n if (startKeep) {\n const commonWsPrefix = longestCommonPrefix(oldWsPrefix, newWsPrefix);\n startKeep.value = replaceSuffix(startKeep.value, newWsPrefix, commonWsPrefix);\n deletion.value = removePrefix(deletion.value, commonWsPrefix);\n insertion.value = removePrefix(insertion.value, commonWsPrefix);\n }\n if (endKeep) {\n const commonWsSuffix = longestCommonSuffix(oldWsSuffix, newWsSuffix);\n endKeep.value = replacePrefix(endKeep.value, newWsSuffix, commonWsSuffix);\n deletion.value = removeSuffix(deletion.value, commonWsSuffix);\n insertion.value = removeSuffix(insertion.value, commonWsSuffix);\n }\n }\n else if (insertion) {\n // The whitespaces all reflect what was in the new text rather than\n // the old, so we essentially have no information about whitespace\n // insertion or deletion. We just want to dedupe the whitespace.\n // We do that by having each change object keep its trailing\n // whitespace and deleting duplicate leading whitespace where\n // present.\n if (startKeep) {\n const ws = leadingWs(insertion.value, segmenter);\n insertion.value = insertion.value.substring(ws.length);\n }\n if (endKeep) {\n const ws = leadingWs(endKeep.value, segmenter);\n endKeep.value = endKeep.value.substring(ws.length);\n }\n // otherwise we've got a deletion and no insertion\n }\n else if (startKeep && endKeep) {\n const newWsFull = leadingWs(endKeep.value, segmenter), [delWsStart, delWsEnd] = leadingAndTrailingWs(deletion.value, segmenter);\n // Any whitespace that comes straight after startKeep in both the old and\n // new texts, assign to startKeep and remove from the deletion.\n const newWsStart = longestCommonPrefix(newWsFull, delWsStart);\n deletion.value = removePrefix(deletion.value, newWsStart);\n // Any whitespace that comes straight before endKeep in both the old and\n // new texts, and hasn't already been assigned to startKeep, assign to\n // endKeep and remove from the deletion.\n const newWsEnd = longestCommonSuffix(removePrefix(newWsFull, newWsStart), delWsEnd);\n deletion.value = removeSuffix(deletion.value, newWsEnd);\n endKeep.value = replacePrefix(endKeep.value, newWsFull, newWsEnd);\n // If there's any whitespace from the new text that HASN'T already been\n // assigned, assign it to the start:\n startKeep.value = replaceSuffix(startKeep.value, newWsFull, newWsFull.slice(0, newWsFull.length - newWsEnd.length));\n }\n else if (endKeep) {\n // We are at the start of the text. Preserve all the whitespace on\n // endKeep, and just remove whitespace from the end of deletion to the\n // extent that it overlaps with the start of endKeep.\n const endKeepWsPrefix = leadingWs(endKeep.value, segmenter);\n const deletionWsSuffix = trailingWs(deletion.value, segmenter);\n const overlap = maximumOverlap(deletionWsSuffix, endKeepWsPrefix);\n deletion.value = removeSuffix(deletion.value, overlap);\n }\n else if (startKeep) {\n // We are at the END of the text. Preserve all the whitespace on\n // startKeep, and just remove whitespace from the start of deletion to\n // the extent that it overlaps with the end of startKeep.\n const startKeepWsSuffix = trailingWs(startKeep.value, segmenter);\n const deletionWsPrefix = leadingWs(deletion.value, segmenter);\n const overlap = maximumOverlap(startKeepWsSuffix, deletionWsPrefix);\n deletion.value = removePrefix(deletion.value, overlap);\n }\n}\nclass WordsWithSpaceDiff extends Diff {\n tokenize(value) {\n // Slightly different to the tokenizeIncludingWhitespace regex used above in\n // that this one treats each individual newline as a distinct token, rather\n // than merging them into other surrounding whitespace. This was requested\n // in https://github.com/kpdecker/jsdiff/issues/180 &\n // https://github.com/kpdecker/jsdiff/issues/211\n const regex = new RegExp(`(\\\\r?\\\\n)|[${extendedWordChars}]+|[^\\\\S\\\\n\\\\r]+|[^${extendedWordChars}]`, 'ug');\n return value.match(regex) || [];\n }\n}\nexport const wordsWithSpaceDiff = new WordsWithSpaceDiff();\nexport function diffWordsWithSpace(oldStr, newStr, options) {\n return wordsWithSpaceDiff.diff(oldStr, newStr, options);\n}\n","import Diff from './base.js';\nimport { generateOptions } from '../util/params.js';\nclass LineDiff extends Diff {\n constructor() {\n super(...arguments);\n this.tokenize = tokenize;\n }\n equals(left, right, options) {\n // If we're ignoring whitespace, we need to normalise lines by stripping\n // whitespace before checking equality. (This has an annoying interaction\n // with newlineIsToken that requires special handling: if newlines get their\n // own token, then we DON'T want to trim the *newline* tokens down to empty\n // strings, since this would cause us to treat whitespace-only line content\n // as equal to a separator between lines, which would be weird and\n // inconsistent with the documented behavior of the options.)\n if (options.ignoreWhitespace) {\n if (!options.newlineIsToken || !left.includes('\\n')) {\n left = left.trim();\n }\n if (!options.newlineIsToken || !right.includes('\\n')) {\n right = right.trim();\n }\n }\n else if (options.ignoreNewlineAtEof && !options.newlineIsToken) {\n if (left.endsWith('\\n')) {\n left = left.slice(0, -1);\n }\n if (right.endsWith('\\n')) {\n right = right.slice(0, -1);\n }\n }\n return super.equals(left, right, options);\n }\n}\nexport const lineDiff = new LineDiff();\nexport function diffLines(oldStr, newStr, options) {\n return lineDiff.diff(oldStr, newStr, options);\n}\nexport function diffTrimmedLines(oldStr, newStr, options) {\n options = generateOptions(options, { ignoreWhitespace: true });\n return lineDiff.diff(oldStr, newStr, options);\n}\n// Exported standalone so it can be used from jsonDiff too.\nexport function tokenize(value, options) {\n if (options.stripTrailingCr) {\n // remove one \\r before \\n to match GNU diff's --strip-trailing-cr behavior\n value = value.replace(/\\r\\n/g, '\\n');\n }\n const retLines = [], linesAndNewlines = value.split(/(\\n|\\r\\n)/);\n // Ignore the final empty token that occurs if the string ends with a new line\n if (!linesAndNewlines[linesAndNewlines.length - 1]) {\n linesAndNewlines.pop();\n }\n // Merge the content and line separators into single tokens\n for (let i = 0; i < linesAndNewlines.length; i++) {\n const line = linesAndNewlines[i];\n if (i % 2 && !options.newlineIsToken) {\n retLines[retLines.length - 1] += line;\n }\n else {\n retLines.push(line);\n }\n }\n return retLines;\n}\n","import { diffLines } from '../diff/line.js';\n/**\n * Returns true if the filename contains characters that require C-style\n * quoting (as used by Git and GNU diffutils in diff output).\n */\nfunction needsQuoting(s) {\n for (let i = 0; i < s.length; i++) {\n if (s[i] < '\\x20' || s[i] > '\\x7e' || s[i] === '\"' || s[i] === '\\\\') {\n return true;\n }\n }\n return false;\n}\n/**\n * C-style quotes a filename, encoding special characters as escape sequences\n * and non-ASCII bytes as octal escapes. This is the inverse of\n * `parseQuotedFileName` in parse.ts.\n *\n * Non-ASCII bytes are encoded as UTF-8 before being emitted as octal escapes.\n * This matches the behaviour of both Git and GNU diffutils, which always emit\n * UTF-8 octal escapes regardless of the underlying filesystem encoding (e.g.\n * Git for Windows converts from NTFS's UTF-16 to UTF-8 internally).\n *\n * If the filename doesn't need quoting, returns it as-is.\n */\nfunction quoteFileNameIfNeeded(s) {\n if (!needsQuoting(s)) {\n return s;\n }\n let result = '\"';\n const bytes = new TextEncoder().encode(s);\n let i = 0;\n while (i < bytes.length) {\n const b = bytes[i];\n // See https://en.wikipedia.org/wiki/Escape_sequences_in_C#Escape_sequences\n if (b === 0x07) {\n result += '\\\\a';\n }\n else if (b === 0x08) {\n result += '\\\\b';\n }\n else if (b === 0x09) {\n result += '\\\\t';\n }\n else if (b === 0x0a) {\n result += '\\\\n';\n }\n else if (b === 0x0b) {\n result += '\\\\v';\n }\n else if (b === 0x0c) {\n result += '\\\\f';\n }\n else if (b === 0x0d) {\n result += '\\\\r';\n }\n else if (b === 0x22) {\n result += '\\\\\"';\n }\n else if (b === 0x5c) {\n result += '\\\\\\\\';\n }\n else if (b >= 0x20 && b <= 0x7e) {\n // Just a printable ASCII character that is neither a double quote nor a\n // backslash; no need to escape it.\n result += String.fromCharCode(b);\n }\n else {\n // Either part of a non-ASCII character or a control character without a\n // special escape sequence; needs escaping as a 3-digit octal escape\n result += '\\\\' + b.toString(8).padStart(3, '0');\n }\n i++;\n }\n result += '\"';\n return result;\n}\nexport const INCLUDE_HEADERS = {\n includeIndex: true,\n includeUnderline: true,\n includeFileHeaders: true\n};\nexport const FILE_HEADERS_ONLY = {\n includeIndex: false,\n includeUnderline: false,\n includeFileHeaders: true\n};\nexport const OMIT_HEADERS = {\n includeIndex: false,\n includeUnderline: false,\n includeFileHeaders: false\n};\nexport function structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) {\n let optionsObj;\n if (!options) {\n optionsObj = {};\n }\n else if (typeof options === 'function') {\n optionsObj = { callback: options };\n }\n else {\n optionsObj = options;\n }\n if (typeof optionsObj.context === 'undefined') {\n optionsObj.context = 4;\n }\n // We copy this into its own variable to placate TypeScript, which thinks\n // optionsObj.context might be undefined in the callbacks below.\n const context = optionsObj.context;\n // @ts-expect-error (runtime check for something that is correctly a static type error)\n if (optionsObj.newlineIsToken) {\n throw new Error('newlineIsToken may not be used with patch-generation functions, only with diffing functions');\n }\n if (!optionsObj.callback) {\n return diffLinesResultToPatch(diffLines(oldStr, newStr, optionsObj));\n }\n else {\n const { callback } = optionsObj;\n diffLines(oldStr, newStr, Object.assign(Object.assign({}, optionsObj), { callback: (diff) => {\n const patch = diffLinesResultToPatch(diff);\n // TypeScript is unhappy without the cast because it does not understand that `patch` may\n // be undefined here only if `callback` is StructuredPatchCallbackAbortable:\n callback(patch);\n } }));\n }\n function diffLinesResultToPatch(diff) {\n // STEP 1: Build up the patch with no \"\\ No newline at end of file\" lines and with the arrays\n // of lines containing trailing newline characters. We'll tidy up later...\n if (!diff) {\n return;\n }\n diff.push({ value: '', lines: [] }); // Append an empty value to make cleanup easier\n function contextLines(lines) {\n return lines.map(function (entry) { return ' ' + entry; });\n }\n const hunks = [];\n let oldRangeStart = 0, newRangeStart = 0, curRange = [], oldLine = 1, newLine = 1;\n for (let i = 0; i < diff.length; i++) {\n const current = diff[i], lines = current.lines || splitLines(current.value);\n current.lines = lines;\n if (current.added || current.removed) {\n // If we have previous context, start with that\n if (!oldRangeStart) {\n const prev = diff[i - 1];\n oldRangeStart = oldLine;\n newRangeStart = newLine;\n if (prev) {\n curRange = context > 0 ? contextLines(prev.lines.slice(-context)) : [];\n oldRangeStart -= curRange.length;\n newRangeStart -= curRange.length;\n }\n }\n // Output our changes\n for (const line of lines) {\n curRange.push((current.added ? '+' : '-') + line);\n }\n // Track the updated file position\n if (current.added) {\n newLine += lines.length;\n }\n else {\n oldLine += lines.length;\n }\n }\n else {\n // Identical context lines. Track line changes\n if (oldRangeStart) {\n // Close out any changes that have been output (or join overlapping)\n if (lines.length <= context * 2 && i < diff.length - 2) {\n // Overlapping\n for (const line of contextLines(lines)) {\n curRange.push(line);\n }\n }\n else {\n // end the range and output\n const contextSize = Math.min(lines.length, context);\n for (const line of contextLines(lines.slice(0, contextSize))) {\n curRange.push(line);\n }\n const hunk = {\n oldStart: oldRangeStart,\n oldLines: (oldLine - oldRangeStart + contextSize),\n newStart: newRangeStart,\n newLines: (newLine - newRangeStart + contextSize),\n lines: curRange\n };\n hunks.push(hunk);\n oldRangeStart = 0;\n newRangeStart = 0;\n curRange = [];\n }\n }\n oldLine += lines.length;\n newLine += lines.length;\n }\n }\n // Step 2: eliminate the trailing `\\n` from each line of each hunk, and, where needed, add\n // \"\\ No newline at end of file\".\n for (const hunk of hunks) {\n for (let i = 0; i < hunk.lines.length; i++) {\n if (hunk.lines[i].endsWith('\\n')) {\n hunk.lines[i] = hunk.lines[i].slice(0, -1);\n }\n else {\n hunk.lines.splice(i + 1, 0, '\\\\ No newline at end of file');\n i++; // Skip the line we just added, then continue iterating\n }\n }\n }\n return {\n oldFileName: oldFileName, newFileName: newFileName,\n oldHeader: oldHeader, newHeader: newHeader,\n hunks: hunks\n };\n }\n}\n/**\n * creates a unified diff patch.\n *\n * @param patch either a single structured patch object (as returned by `structuredPatch`) or an\n * array of them (as returned by `parsePatch`).\n * @param headerOptions behaves the same as the `headerOptions` option of `createTwoFilesPatch`.\n * Ignored for patches where `isGit` is `true`.\n *\n * When a patch has `isGit: true`, `formatPatch` output is changed to more closely match Git's\n * output: it emits a `diff --git` header, emits Git extended headers as appropriate based on\n * properties like `isRename`, `isCreate`, `newMode`, etc, and will omit `---`/`+++` file\n * headers for patches with no hunks (e.g. renames without content changes).\n */\nexport function formatPatch(patch, headerOptions) {\n var _a, _b, _c, _d, _e, _f;\n if (!headerOptions) {\n headerOptions = INCLUDE_HEADERS;\n }\n if (Array.isArray(patch)) {\n if (patch.length > 1 && !headerOptions.includeFileHeaders && !patch.every(p => p.isGit)) {\n throw new Error('Cannot omit file headers on a multi-file patch. '\n + '(The result would be unparseable; how would a tool trying to apply '\n + 'the patch know which changes are to which file?)');\n }\n return patch.map(p => formatPatch(p, headerOptions)).join('\\n');\n }\n const ret = [];\n // Git patches have a fixed header format (diff --git, extended headers,\n // and ---/+++ when hunks are present), so headerOptions is ignored.\n if (patch.isGit) {\n headerOptions = INCLUDE_HEADERS;\n // Emit Git-style diff --git header and extended headers.\n // Git never puts /dev/null in the \"diff --git\" line; for file\n // creations/deletions it uses the real filename on both sides.\n if (!patch.oldFileName) {\n throw new Error('oldFileName must be specified for Git patches');\n }\n if (!patch.newFileName) {\n throw new Error('newFileName must be specified for Git patches');\n }\n let gitOldName = patch.oldFileName;\n let gitNewName = patch.newFileName;\n if (patch.isCreate && gitOldName === '/dev/null') {\n gitOldName = gitNewName.replace(/^b\\//, 'a/');\n }\n else if (patch.isDelete && gitNewName === '/dev/null') {\n gitNewName = gitOldName.replace(/^a\\//, 'b/');\n }\n ret.push('diff --git ' + quoteFileNameIfNeeded(gitOldName) + ' ' + quoteFileNameIfNeeded(gitNewName));\n if (patch.isDelete) {\n ret.push('deleted file mode ' + ((_a = patch.oldMode) !== null && _a !== void 0 ? _a : '100644'));\n }\n if (patch.isCreate) {\n ret.push('new file mode ' + ((_b = patch.newMode) !== null && _b !== void 0 ? _b : '100644'));\n }\n if (patch.oldMode && patch.newMode && !patch.isDelete && !patch.isCreate) {\n ret.push('old mode ' + patch.oldMode);\n ret.push('new mode ' + patch.newMode);\n }\n if (patch.isRename) {\n ret.push('rename from ' + quoteFileNameIfNeeded(((_c = patch.oldFileName) !== null && _c !== void 0 ? _c : '').replace(/^a\\//, '')));\n ret.push('rename to ' + quoteFileNameIfNeeded(((_d = patch.newFileName) !== null && _d !== void 0 ? _d : '').replace(/^b\\//, '')));\n }\n if (patch.isCopy) {\n ret.push('copy from ' + quoteFileNameIfNeeded(((_e = patch.oldFileName) !== null && _e !== void 0 ? _e : '').replace(/^a\\//, '')));\n ret.push('copy to ' + quoteFileNameIfNeeded(((_f = patch.newFileName) !== null && _f !== void 0 ? _f : '').replace(/^b\\//, '')));\n }\n }\n else {\n if (headerOptions.includeIndex && patch.oldFileName == patch.newFileName && patch.oldFileName !== undefined) {\n ret.push('Index: ' + patch.oldFileName);\n }\n if (headerOptions.includeUnderline) {\n ret.push('===================================================================');\n }\n }\n // Emit --- / +++ file headers. For Git patches with no hunks (e.g.\n // pure renames, mode-only changes), Git omits these, so we do too.\n const hasHunks = patch.hunks.length > 0;\n if (headerOptions.includeFileHeaders && patch.oldFileName !== undefined && patch.newFileName !== undefined\n && (!patch.isGit || hasHunks)) {\n ret.push('--- ' + quoteFileNameIfNeeded(patch.oldFileName) + (patch.oldHeader ? '\\t' + patch.oldHeader : ''));\n ret.push('+++ ' + quoteFileNameIfNeeded(patch.newFileName) + (patch.newHeader ? '\\t' + patch.newHeader : ''));\n }\n for (let i = 0; i < patch.hunks.length; i++) {\n const hunk = patch.hunks[i];\n // Unified Diff Format quirk: If the chunk size is 0,\n // the first number is one lower than one would expect.\n // https://www.artima.com/weblogs/viewpost.jsp?thread=164293\n const oldStart = hunk.oldLines === 0 ? hunk.oldStart - 1 : hunk.oldStart;\n const newStart = hunk.newLines === 0 ? hunk.newStart - 1 : hunk.newStart;\n ret.push('@@ -' + oldStart + ',' + hunk.oldLines\n + ' +' + newStart + ',' + hunk.newLines\n + ' @@');\n for (const line of hunk.lines) {\n ret.push(line);\n }\n }\n return ret.join('\\n') + '\\n';\n}\nexport function createTwoFilesPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) {\n if (typeof options === 'function') {\n options = { callback: options };\n }\n if (!(options === null || options === void 0 ? void 0 : options.callback)) {\n const patchObj = structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options);\n if (!patchObj) {\n return;\n }\n return formatPatch(patchObj, options === null || options === void 0 ? void 0 : options.headerOptions);\n }\n else {\n const { callback } = options;\n structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, Object.assign(Object.assign({}, options), { callback: patchObj => {\n if (!patchObj) {\n callback(undefined);\n }\n else {\n callback(formatPatch(patchObj, options.headerOptions));\n }\n } }));\n }\n}\nexport function createPatch(fileName, oldStr, newStr, oldHeader, newHeader, options) {\n return createTwoFilesPatch(fileName, fileName, oldStr, newStr, oldHeader, newHeader, options);\n}\n/**\n * Split `text` into an array of lines, including the trailing newline character (where present)\n */\nfunction splitLines(text) {\n const hasTrailingNl = text.endsWith('\\n');\n const result = text.split('\\n').map(line => line + '\\n');\n if (hasTrailingNl) {\n result.pop();\n }\n else {\n result.push(result.pop().slice(0, -1));\n }\n return result;\n}\n","/**\n * Helpers.\n */\n\nvar s = 1000;\nvar m = s * 60;\nvar h = m * 60;\nvar d = h * 24;\nvar w = d * 7;\nvar y = d * 365.25;\n\n/**\n * Parse or format the given `val`.\n *\n * Options:\n *\n * - `long` verbose formatting [false]\n *\n * @param {String|Number} val\n * @param {Object} [options]\n * @throws {Error} throw an error if val is not a non-empty string or a number\n * @return {String|Number}\n * @api public\n */\n\nmodule.exports = function (val, options) {\n options = options || {};\n var type = typeof val;\n if (type === 'string' && val.length > 0) {\n return parse(val);\n } else if (type === 'number' && isFinite(val)) {\n return options.long ? fmtLong(val) : fmtShort(val);\n }\n throw new Error(\n 'val is not a non-empty string or a valid number. val=' +\n JSON.stringify(val)\n );\n};\n\n/**\n * Parse the given `str` and return milliseconds.\n *\n * @param {String} str\n * @return {Number}\n * @api private\n */\n\nfunction parse(str) {\n str = String(str);\n if (str.length > 100) {\n return;\n }\n var match = /^(-?(?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(\n str\n );\n if (!match) {\n return;\n }\n var n = parseFloat(match[1]);\n var type = (match[2] || 'ms').toLowerCase();\n switch (type) {\n case 'years':\n case 'year':\n case 'yrs':\n case 'yr':\n case 'y':\n return n * y;\n case 'weeks':\n case 'week':\n case 'w':\n return n * w;\n case 'days':\n case 'day':\n case 'd':\n return n * d;\n case 'hours':\n case 'hour':\n case 'hrs':\n case 'hr':\n case 'h':\n return n * h;\n case 'minutes':\n case 'minute':\n case 'mins':\n case 'min':\n case 'm':\n return n * m;\n case 'seconds':\n case 'second':\n case 'secs':\n case 'sec':\n case 's':\n return n * s;\n case 'milliseconds':\n case 'millisecond':\n case 'msecs':\n case 'msec':\n case 'ms':\n return n;\n default:\n return undefined;\n }\n}\n\n/**\n * Short format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtShort(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return Math.round(ms / d) + 'd';\n }\n if (msAbs >= h) {\n return Math.round(ms / h) + 'h';\n }\n if (msAbs >= m) {\n return Math.round(ms / m) + 'm';\n }\n if (msAbs >= s) {\n return Math.round(ms / s) + 's';\n }\n return ms + 'ms';\n}\n\n/**\n * Long format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtLong(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return plural(ms, msAbs, d, 'day');\n }\n if (msAbs >= h) {\n return plural(ms, msAbs, h, 'hour');\n }\n if (msAbs >= m) {\n return plural(ms, msAbs, m, 'minute');\n }\n if (msAbs >= s) {\n return plural(ms, msAbs, s, 'second');\n }\n return ms + ' ms';\n}\n\n/**\n * Pluralization helper.\n */\n\nfunction plural(ms, msAbs, n, name) {\n var isPlural = msAbs >= n * 1.5;\n return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');\n}\n","var x=String;\nvar create=function() {return {isColorSupported:false,reset:x,bold:x,dim:x,italic:x,underline:x,inverse:x,hidden:x,strikethrough:x,black:x,red:x,green:x,yellow:x,blue:x,magenta:x,cyan:x,white:x,gray:x,bgBlack:x,bgRed:x,bgGreen:x,bgYellow:x,bgBlue:x,bgMagenta:x,bgCyan:x,bgWhite:x,blackBright:x,redBright:x,greenBright:x,yellowBright:x,blueBright:x,magentaBright:x,cyanBright:x,whiteBright:x,bgBlackBright:x,bgRedBright:x,bgGreenBright:x,bgYellowBright:x,bgBlueBright:x,bgMagentaBright:x,bgCyanBright:x,bgWhiteBright:x}};\nmodule.exports=create();\nmodule.exports.createColors = create;\n","'use strict';\n\nmodule.exports = () => {\n\tif (process.platform !== 'win32') {\n\t\treturn true;\n\t}\n\n\treturn Boolean(process.env.CI) ||\n\t\tBoolean(process.env.WT_SESSION) || // Windows Terminal\n\t\tprocess.env.TERM_PROGRAM === 'vscode' ||\n\t\tprocess.env.TERM === 'xterm-256color' ||\n\t\tprocess.env.TERM === 'alacritty';\n};\n","\"use strict\";\n\n/**\n * Various utility functions used throughout Mocha's codebase.\n * @module utils\n */\n\n/**\n * Module dependencies.\n */\nvar path = require(\"node:path\");\nvar pc = require(\"picocolors\");\nvar isUnicodeSupported = require(\"is-unicode-supported\")();\n\nconst MOCHA_ID_PROP_NAME = \"__mocha_id__\";\n\nfunction htmlCodePointEscape(codePoint) {\n return \"&#x\" + codePoint.toString(16).toUpperCase() + \";\";\n}\n\nfunction shouldEscapeHtmlChar(codePoint) {\n return (\n (codePoint >= 0x01 && codePoint <= 0x09) ||\n codePoint === 0x0b ||\n codePoint === 0x0c ||\n (codePoint >= 0x0e && codePoint <= 0x1f) ||\n codePoint === 0x22 ||\n codePoint === 0x26 ||\n codePoint === 0x27 ||\n codePoint === 0x3c ||\n codePoint === 0x3e ||\n codePoint === 0x60 ||\n codePoint === 0x7f ||\n codePoint === 0x81 ||\n codePoint === 0x8d ||\n codePoint === 0x8f ||\n codePoint === 0x90 ||\n codePoint === 0x9d ||\n codePoint >= 0xa0\n );\n}\n\n/**\n * Escape special characters in the given string of html.\n *\n * @private\n * @param {string} html\n * @return {string}\n */\nexports.escape = function (html) {\n var string = String(html);\n var escaped = \"\";\n\n for (var index = 0; index < string.length; index++) {\n var codePoint = string.charCodeAt(index);\n\n if (\n codePoint >= 0xd800 &&\n codePoint <= 0xdbff &&\n index + 1 < string.length\n ) {\n var low = string.charCodeAt(index + 1);\n\n if (low >= 0xdc00 && low <= 0xdfff) {\n // Decode a UTF-16 surrogate pair into a single Unicode code point.\n // See https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae\n codePoint = (codePoint - 0xd800) * 0x400 + low - 0xdc00 + 0x10000;\n escaped += htmlCodePointEscape(codePoint);\n index++;\n continue;\n }\n }\n\n escaped += shouldEscapeHtmlChar(codePoint)\n ? htmlCodePointEscape(codePoint)\n : string.charAt(index);\n }\n\n return escaped;\n};\n\n/**\n * Test if the given obj is type of string.\n *\n * @private\n * @param {Object} obj\n * @return {boolean}\n */\nexports.isString = function (obj) {\n return typeof obj === \"string\";\n};\n\n/**\n * Compute a slug from the given `str`.\n *\n * @private\n * @param {string} str\n * @return {string}\n */\nexports.slug = function (str) {\n return str\n .toLowerCase()\n .replace(/\\s+/g, \"-\")\n .replace(/[^-\\w]/g, \"\")\n .replace(/-{2,}/g, \"-\");\n};\n\n/**\n * Strip the function definition from `str`, and re-indent for pre whitespace.\n *\n * @param {string} str\n * @return {string}\n */\nexports.clean = function (str) {\n str = str\n .replace(/\\r\\n?|[\\n\\u2028\\u2029]/g, \"\\n\")\n .replace(/^\\uFEFF/, \"\")\n // (traditional)-> space/name parameters body (lambda)-> parameters body multi-statement/single keep body content\n .replace(\n /^function(?:\\s*|\\s[^(]*)\\([^)]*\\)\\s*\\{((?:.|\\n)*?)\\}$|^\\([^)]*\\)\\s*=>\\s*(?:\\{((?:.|\\n)*?)\\}|((?:.|\\n)*))$/,\n \"$1$2$3\",\n );\n\n var spaces = str.match(/^\\n?( *)/)[1].length;\n var tabs = str.match(/^\\n?(\\t*)/)[1].length;\n var re = new RegExp(\n \"^\\n?\" + (tabs ? \"\\t\" : \" \") + \"{\" + (tabs || spaces) + \"}\",\n \"gm\",\n );\n\n str = str.replace(re, \"\");\n\n return str.trim();\n};\n\n/**\n * If a value could have properties, and has none, this function is called,\n * which returns a string representation of the empty value.\n *\n * Functions w/ no properties return `'[Function]'`\n * Arrays w/ length === 0 return `'[]'`\n * Objects w/ no properties return `'{}'`\n * All else: return result of `value.toString()`\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {string} typeHint The type of the value\n * @returns {string}\n */\nfunction emptyRepresentation(value, typeHint) {\n switch (typeHint) {\n case \"function\":\n return \"[Function]\";\n case \"null-prototype\":\n case \"object\":\n return \"{}\";\n case \"array\":\n return \"[]\";\n default:\n return value.toString();\n }\n}\n\n/**\n * Takes some variable and asks `Object.prototype.toString()` what it thinks it\n * is.\n *\n * @private\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/toString\n * @param {*} value The value to test.\n * @returns {string} Computed type\n * @example\n * canonicalType({}) // 'object'\n * canonicalType([]) // 'array'\n * canonicalType(1) // 'number'\n * canonicalType(false) // 'boolean'\n * canonicalType(Infinity) // 'number'\n * canonicalType(null) // 'null'\n * canonicalType(new Date()) // 'date'\n * canonicalType(/foo/) // 'regexp'\n * canonicalType('type') // 'string'\n * canonicalType(global) // 'global'\n * canonicalType(new String('foo') // 'object'\n * canonicalType(async function() {}) // 'asyncfunction'\n * canonicalType(Object.create(null)) // 'null-prototype'\n */\nvar canonicalType = (exports.canonicalType = function canonicalType(value) {\n if (value === undefined) {\n return \"undefined\";\n } else if (value === null) {\n return \"null\";\n } else if (Buffer.isBuffer(value)) {\n return \"buffer\";\n } else if (Object.getPrototypeOf(value) === null) {\n return \"null-prototype\";\n }\n\n return Object.prototype.toString\n .call(value)\n .replace(/^\\[.+\\s(.+?)]$/, \"$1\")\n .toLowerCase();\n});\n\n/**\n *\n * Returns a general type or data structure of a variable\n * @private\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures\n * @param {*} value The value to test.\n * @returns {string} One of undefined, boolean, number, string, bigint, symbol, object\n * @example\n * type({}) // 'object'\n * type([]) // 'array'\n * type(1) // 'number'\n * type(false) // 'boolean'\n * type(Infinity) // 'number'\n * type(null) // 'null'\n * type(new Date()) // 'object'\n * type(/foo/) // 'object'\n * type('type') // 'string'\n * type(global) // 'object'\n * type(new String('foo') // 'string'\n */\nexports.type = function type(value) {\n // Null is special\n if (value === null) return \"null\";\n const primitives = new Set([\n \"undefined\",\n \"boolean\",\n \"number\",\n \"string\",\n \"bigint\",\n \"symbol\",\n ]);\n const _type = typeof value;\n if (_type === \"function\") return _type;\n if (primitives.has(_type)) return _type;\n if (value instanceof String) return \"string\";\n if (value instanceof Error) return \"error\";\n if (Array.isArray(value)) return \"array\";\n\n return _type;\n};\n\n/**\n * Stringify `value`. Different behavior depending on type of value:\n *\n * - If `value` is undefined or null, return `'[undefined]'` or `'[null]'`, respectively.\n * - If `value` is not an object, function or array, return result of `value.toString()` wrapped in double-quotes.\n * - If `value` is an *empty* object, function, or array, return result of function\n * {@link emptyRepresentation}.\n * - If `value` has properties, call {@link exports.canonicalize} on it, then return result of\n * JSON.stringify().\n *\n * @private\n * @see exports.type\n * @param {*} value\n * @return {string}\n */\nexports.stringify = function (value) {\n var typeHint = canonicalType(value);\n\n if (!~[\"object\", \"array\", \"function\", \"null-prototype\"].indexOf(typeHint)) {\n if (typeHint === \"buffer\") {\n var json = Buffer.prototype.toJSON.call(value);\n // Based on the toJSON result\n return jsonStringify(\n json.data && json.type ? json.data : json,\n 2,\n ).replace(/,(\\n|$)/g, \"$1\");\n }\n\n // Boxed String objects (new String(\"foo\")): expand into character-indexed object.\n if (typeHint === \"string\" && typeof value === \"object\") {\n value = value.split(\"\").reduce(function (acc, char, idx) {\n acc[idx] = char;\n return acc;\n }, {});\n typeHint = \"object\";\n } else {\n return jsonStringify(value);\n }\n }\n\n for (var prop in value) {\n if (Object.prototype.hasOwnProperty.call(value, prop)) {\n return jsonStringify(\n exports.canonicalize(value, null, typeHint),\n 2,\n ).replace(/,(\\n|$)/g, \"$1\");\n }\n }\n\n return emptyRepresentation(value, typeHint);\n};\n\n/**\n * like JSON.stringify but more sense.\n *\n * @private\n * @param {Object} object\n * @param {number=} spaces\n * @param {number=} depth\n * @returns {*}\n */\nfunction jsonStringify(object, spaces, depth) {\n if (typeof spaces === \"undefined\") {\n // primitive types\n return _stringify(object);\n }\n\n depth = depth || 1;\n var space = spaces * depth;\n var str = Array.isArray(object) ? \"[\" : \"{\";\n var end = Array.isArray(object) ? \"]\" : \"}\";\n var length =\n typeof object.length === \"number\"\n ? object.length\n : Object.keys(object).length;\n function _stringify(val) {\n switch (canonicalType(val)) {\n case \"null\":\n case \"undefined\":\n val = \"[\" + val + \"]\";\n break;\n case \"array\":\n case \"object\":\n val = jsonStringify(val, spaces, depth + 1);\n break;\n case \"boolean\":\n case \"regexp\":\n case \"symbol\":\n case \"number\":\n val =\n val === 0 && 1 / val === -Infinity // `-0`\n ? \"-0\"\n : val.toString();\n break;\n case \"bigint\":\n val = val.toString() + \"n\";\n break;\n case \"date\":\n var sDate = isNaN(val.getTime()) ? val.toString() : val.toISOString();\n val = \"[Date: \" + sDate + \"]\";\n break;\n case \"buffer\":\n var json = val.toJSON();\n // Based on the toJSON result\n json = json.data && json.type ? json.data : json;\n val = \"[Buffer: \" + jsonStringify(json, 2, depth + 1) + \"]\";\n break;\n default:\n val =\n val === \"[Function]\" || val === \"[Circular]\"\n ? val\n : JSON.stringify(val); // string\n }\n return val;\n }\n\n for (var i in object) {\n if (!Object.prototype.hasOwnProperty.call(object, i)) {\n continue; // not my business\n }\n --length;\n str +=\n \"\\n \" +\n \" \".repeat(space - 1) +\n (Array.isArray(object) ? \"\" : '\"' + i + '\": ') + // key\n _stringify(object[i]) + // value\n (length ? \",\" : \"\"); // comma\n }\n\n return (\n str +\n // [], {}\n (str.length !== 1 ? \"\\n\" + \" \".repeat(Math.max(0, space - 2)) + end : end)\n );\n}\n\n/**\n * Return a new Thing that has the keys in sorted order. Recursive.\n *\n * If the Thing...\n * - has already been seen, return string `'[Circular]'`\n * - is `undefined`, return string `'[undefined]'`\n * - is `null`, return value `null`\n * - is some other primitive, return the value\n * - is not a primitive or an `Array`, `Object`, or `Function`, return the value of the Thing's `toString()` method\n * - is a non-empty `Array`, `Object`, or `Function`, return the result of calling this function again.\n * - is an empty `Array`, `Object`, or `Function`, return the result of calling `emptyRepresentation()`\n *\n * @private\n * @see {@link exports.stringify}\n * @param {*} value Thing to inspect. May or may not have properties.\n * @param {Array} [stack=[]] Stack of seen values\n * @param {string} [typeHint] Type hint\n * @return {(Object|Array|Function|string|undefined)}\n */\nexports.canonicalize = function canonicalize(value, stack, typeHint) {\n var canonicalizedObj;\n\n var prop;\n\n typeHint = typeHint || canonicalType(value);\n function withStack(value, fn) {\n stack.push(value);\n fn();\n stack.pop();\n }\n\n stack = stack || [];\n\n if (stack.indexOf(value) !== -1) {\n return \"[Circular]\";\n }\n\n switch (typeHint) {\n case \"undefined\":\n case \"buffer\":\n case \"null\":\n canonicalizedObj = value;\n break;\n case \"array\":\n withStack(value, function () {\n canonicalizedObj = value.map(function (item) {\n return exports.canonicalize(item, stack);\n });\n });\n break;\n case \"function\":\n /* eslint-disable-next-line no-unused-vars */\n for (prop in value) {\n canonicalizedObj = {};\n break;\n }\n\n if (!canonicalizedObj) {\n canonicalizedObj = emptyRepresentation(value, typeHint);\n break;\n }\n /* falls through */\n case \"null-prototype\":\n case \"object\":\n canonicalizedObj = canonicalizedObj || {};\n if (typeHint === \"null-prototype\" && Symbol.toStringTag in value) {\n canonicalizedObj[\"[Symbol.toStringTag]\"] = value[Symbol.toStringTag];\n }\n withStack(value, function () {\n Object.keys(value)\n .sort()\n .forEach(function (key) {\n canonicalizedObj[key] = exports.canonicalize(value[key], stack);\n });\n });\n break;\n case \"date\":\n case \"number\":\n case \"regexp\":\n case \"boolean\":\n case \"symbol\":\n canonicalizedObj = value;\n break;\n default:\n canonicalizedObj = value + \"\";\n }\n\n return canonicalizedObj;\n};\n\n/**\n * @summary\n * This Filter based on `mocha-clean` module.(see: `github.com/rstacruz/mocha-clean`)\n * @description\n * When invoking this function you get a filter function that get the Error.stack as an input,\n * and return a prettify output.\n * (i.e: strip Mocha and internal node functions from stack trace).\n * @returns {Function}\n */\nexports.stackTraceFilter = function () {\n // TODO: Replace with `process.browser`\n var is = typeof document === \"undefined\" ? { node: true } : { browser: true };\n var slash = path.sep;\n var cwd;\n if (is.node) {\n cwd = exports.cwd() + slash;\n } else {\n cwd = (\n typeof location === \"undefined\" ? window.location : location\n ).href.replace(/\\/[^/]*$/, \"/\");\n slash = \"/\";\n }\n\n function isMochaInternal(line) {\n return (\n ~line.indexOf(\"node_modules\" + slash + \"mocha\" + slash) ||\n ~line.indexOf(slash + \"mocha.js\") ||\n ~line.indexOf(slash + \"mocha.min.js\")\n );\n }\n\n function isNodeInternal(line) {\n return (\n ~line.indexOf(\"(timers.js:\") ||\n ~line.indexOf(\"(events.js:\") ||\n ~line.indexOf(\"(node.js:\") ||\n ~line.indexOf(\"(module.js:\") ||\n ~line.indexOf(\"GeneratorFunctionPrototype.next (native)\") ||\n false\n );\n }\n\n return function (stack) {\n stack = stack.split(\"\\n\");\n\n stack = stack.reduce(function (list, line) {\n if (isMochaInternal(line)) {\n return list;\n }\n\n if (is.node && isNodeInternal(line)) {\n return list;\n }\n\n // Clean up cwd(absolute)\n if (/:\\d+:\\d+\\)?$/.test(line)) {\n line = line.replace(\"(\" + cwd, \"(\");\n }\n\n list.push(line);\n return list;\n }, []);\n\n return stack.join(\"\\n\");\n };\n};\n\n/**\n * Crude, but effective.\n * @public\n * @param {*} value\n * @returns {boolean} Whether or not `value` is a Promise\n */\nexports.isPromise = function isPromise(value) {\n return (\n typeof value === \"object\" &&\n value !== null &&\n typeof value.then === \"function\"\n );\n};\n\n/**\n * Clamps a numeric value to an inclusive range.\n *\n * @param {number} value - Value to be clamped.\n * @param {number[]} range - Two element array specifying [min, max] range.\n * @returns {number} clamped value\n */\nexports.clamp = function clamp(value, range) {\n return Math.min(Math.max(value, range[0]), range[1]);\n};\n\n/**\n * It's a noop.\n * @public\n */\nexports.noop = function () {};\n\n/**\n * Creates a map-like object.\n *\n * @description\n * A \"map\" is an object with no prototype, for our purposes. In some cases\n * this would be more appropriate than a `Map`, especially if your environment\n * doesn't support it. Recommended for use in Mocha's public APIs.\n *\n * @public\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map#Custom_and_Null_objects|MDN:Map}\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/create#Custom_and_Null_objects|MDN:Object.create - Custom objects}\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign#Custom_and_Null_objects|MDN:Object.assign}\n * @param {...*} [obj] - Arguments to `Object.assign()`.\n * @returns {Object} An object with no prototype, having `...obj` properties\n */\nexports.createMap = function () {\n return Object.assign.apply(\n null,\n [Object.create(null)].concat(Array.prototype.slice.call(arguments)),\n );\n};\n\n/**\n * Creates a read-only map-like object.\n *\n * @description\n * This differs from {@link module:utils.createMap createMap} only in that\n * the argument must be non-empty, because the result is frozen.\n *\n * @see {@link module:utils.createMap createMap}\n * @param {...*} [obj] - Arguments to `Object.assign()`.\n * @returns {Object} A frozen object with no prototype, having `...obj` properties\n * @throws {TypeError} if argument is not a non-empty object.\n */\nexports.defineConstants = function (obj) {\n if (canonicalType(obj) !== \"object\" || !Object.keys(obj).length) {\n throw new TypeError(\"Invalid argument; expected a non-empty object\");\n }\n return Object.freeze(exports.createMap(obj));\n};\n\n/**\n * Returns current working directory\n *\n * Wrapper around `process.cwd()` for isolation\n * @private\n */\nexports.cwd = function cwd() {\n return process.cwd();\n};\n\n/**\n * Returns `true` if Mocha is running in a browser.\n * Checks for `process.browser`.\n * @returns {boolean}\n * @private\n */\nexports.isBrowser = function isBrowser() {\n return Boolean(process.browser);\n};\n\n/*\n * Casts `value` to an array; useful for optionally accepting array parameters\n *\n * It follows these rules, depending on `value`. If `value` is...\n * 1. `undefined`: return an empty Array\n * 2. `null`: return an array with a single `null` element\n * 3. Any other object: return the value of `Array.from()` _if_ the object is iterable\n * 4. otherwise: return an array with a single element, `value`\n * @param {*} value - Something to cast to an Array\n * @returns {Array<*>}\n */\nexports.castArray = function castArray(value) {\n if (value === undefined) {\n return [];\n }\n if (value === null) {\n return [null];\n }\n if (\n typeof value === \"object\" &&\n (typeof value[Symbol.iterator] === \"function\" || value.length !== undefined)\n ) {\n return Array.from(value);\n }\n return [value];\n};\n\nexports.constants = exports.defineConstants({\n MOCHA_ID_PROP_NAME,\n});\n\nconst uniqueIDBase =\n \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_\";\n\n/**\n * Creates a new unique identifier\n * Does not create cryptographically safe ids.\n * Trivial copy of nanoid/non-secure\n * @returns {string} Unique identifier\n */\nexports.uniqueID = () => {\n let id = \"\";\n for (let i = 0; i < 21; i++) {\n id += uniqueIDBase[(Math.random() * 64) | 0];\n }\n return id;\n};\n\nexports.assignNewMochaID = (obj) => {\n const id = exports.uniqueID();\n Object.defineProperty(obj, MOCHA_ID_PROP_NAME, {\n get() {\n return id;\n },\n });\n return obj;\n};\n\n/**\n * Retrieves a Mocha ID from an object, if present.\n * @param {*} [obj] - Object\n * @returns {string|void}\n */\nexports.getMochaID = (obj) =>\n obj && typeof obj === \"object\" ? obj[MOCHA_ID_PROP_NAME] : undefined;\n\n/**\n * Replaces any detected circular dependency with the string '[Circular]'\n * Mutates original object\n * @param inputObj {*}\n * @returns {*}\n */\nexports.breakCircularDeps = (inputObj) => {\n const seen = new Set();\n\n function _breakCircularDeps(obj) {\n if (obj && typeof obj !== \"object\") {\n return obj;\n }\n\n if (seen.has(obj)) {\n return \"[Circular]\";\n }\n\n seen.add(obj);\n for (const k in obj) {\n const descriptor = Object.getOwnPropertyDescriptor(obj, k);\n\n if (descriptor && descriptor.writable) {\n obj[k] = _breakCircularDeps(obj[k], k);\n }\n }\n\n // deleting means only a seen object that is its own child will be detected\n seen.delete(obj);\n return obj;\n }\n\n return _breakCircularDeps(inputObj);\n};\n\n/**\n * Checks if provided input can be parsed as a JavaScript Number.\n */\nexports.isNumeric = (input) => {\n return !isNaN(parseFloat(input));\n};\n\n/**\n * Checks if being ran in a CI environment.\n *\n * This uses the CI env variable, which is set by most popular CI providers. Some\n * examples include:\n * Github: https://docs.github.com/en/actions/reference/workflows-and-actions/variables\n * Gitlab: https://docs.gitlab.com/ci/variables/predefined_variables/\n * CircleCI: https://circleci.com/docs/reference/variables/#built-in-environment-variables\n * Bitbucket: https://support.atlassian.com/bitbucket-cloud/docs/variables-and-secrets/\n */\nexports.isCI = () => {\n return !!process.env.CI;\n};\n\nexports.logSymbols = {\n info: pc.blue(isUnicodeSupported ? \"ℹ\" : \"i\"),\n success: pc.green(isUnicodeSupported ? \"✔\" : \"√\"),\n warning: pc.yellow(isUnicodeSupported ? \"⚠\" : \"‼\"),\n error: pc.red(isUnicodeSupported ? \"✖\" : \"×\"),\n};\n","/**\n @module Pending\n*/\n\n/**\n * Initialize a new `PendingError` error with the given message.\n *\n * @param {string} message\n */\nclass PendingError extends Error {\n constructor(message) {\n super(message);\n this.name = \"PendingError\";\n }\n}\n\nexport { PendingError };\n","\n/**\n * This is the common logic for both the Node.js and web browser\n * implementations of `debug()`.\n */\n\nfunction setup(env) {\n\tcreateDebug.debug = createDebug;\n\tcreateDebug.default = createDebug;\n\tcreateDebug.coerce = coerce;\n\tcreateDebug.disable = disable;\n\tcreateDebug.enable = enable;\n\tcreateDebug.enabled = enabled;\n\tcreateDebug.humanize = require('ms');\n\tcreateDebug.destroy = destroy;\n\n\tObject.keys(env).forEach(key => {\n\t\tcreateDebug[key] = env[key];\n\t});\n\n\t/**\n\t* The currently active debug mode names, and names to skip.\n\t*/\n\n\tcreateDebug.names = [];\n\tcreateDebug.skips = [];\n\n\t/**\n\t* Map of special \"%n\" handling functions, for the debug \"format\" argument.\n\t*\n\t* Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n\t*/\n\tcreateDebug.formatters = {};\n\n\t/**\n\t* Selects a color for a debug namespace\n\t* @param {String} namespace The namespace string for the debug instance to be colored\n\t* @return {Number|String} An ANSI color code for the given namespace\n\t* @api private\n\t*/\n\tfunction selectColor(namespace) {\n\t\tlet hash = 0;\n\n\t\tfor (let i = 0; i < namespace.length; i++) {\n\t\t\thash = ((hash << 5) - hash) + namespace.charCodeAt(i);\n\t\t\thash |= 0; // Convert to 32bit integer\n\t\t}\n\n\t\treturn createDebug.colors[Math.abs(hash) % createDebug.colors.length];\n\t}\n\tcreateDebug.selectColor = selectColor;\n\n\t/**\n\t* Create a debugger with the given `namespace`.\n\t*\n\t* @param {String} namespace\n\t* @return {Function}\n\t* @api public\n\t*/\n\tfunction createDebug(namespace) {\n\t\tlet prevTime;\n\t\tlet enableOverride = null;\n\t\tlet namespacesCache;\n\t\tlet enabledCache;\n\n\t\tfunction debug(...args) {\n\t\t\t// Disabled?\n\t\t\tif (!debug.enabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst self = debug;\n\n\t\t\t// Set `diff` timestamp\n\t\t\tconst curr = Number(new Date());\n\t\t\tconst ms = curr - (prevTime || curr);\n\t\t\tself.diff = ms;\n\t\t\tself.prev = prevTime;\n\t\t\tself.curr = curr;\n\t\t\tprevTime = curr;\n\n\t\t\targs[0] = createDebug.coerce(args[0]);\n\n\t\t\tif (typeof args[0] !== 'string') {\n\t\t\t\t// Anything else let's inspect with %O\n\t\t\t\targs.unshift('%O');\n\t\t\t}\n\n\t\t\t// Apply any `formatters` transformations\n\t\t\tlet index = 0;\n\t\t\targs[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {\n\t\t\t\t// If we encounter an escaped % then don't increase the array index\n\t\t\t\tif (match === '%%') {\n\t\t\t\t\treturn '%';\n\t\t\t\t}\n\t\t\t\tindex++;\n\t\t\t\tconst formatter = createDebug.formatters[format];\n\t\t\t\tif (typeof formatter === 'function') {\n\t\t\t\t\tconst val = args[index];\n\t\t\t\t\tmatch = formatter.call(self, val);\n\n\t\t\t\t\t// Now we need to remove `args[index]` since it's inlined in the `format`\n\t\t\t\t\targs.splice(index, 1);\n\t\t\t\t\tindex--;\n\t\t\t\t}\n\t\t\t\treturn match;\n\t\t\t});\n\n\t\t\t// Apply env-specific formatting (colors, etc.)\n\t\t\tcreateDebug.formatArgs.call(self, args);\n\n\t\t\tconst logFn = self.log || createDebug.log;\n\t\t\tlogFn.apply(self, args);\n\t\t}\n\n\t\tdebug.namespace = namespace;\n\t\tdebug.useColors = createDebug.useColors();\n\t\tdebug.color = createDebug.selectColor(namespace);\n\t\tdebug.extend = extend;\n\t\tdebug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.\n\n\t\tObject.defineProperty(debug, 'enabled', {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: false,\n\t\t\tget: () => {\n\t\t\t\tif (enableOverride !== null) {\n\t\t\t\t\treturn enableOverride;\n\t\t\t\t}\n\t\t\t\tif (namespacesCache !== createDebug.namespaces) {\n\t\t\t\t\tnamespacesCache = createDebug.namespaces;\n\t\t\t\t\tenabledCache = createDebug.enabled(namespace);\n\t\t\t\t}\n\n\t\t\t\treturn enabledCache;\n\t\t\t},\n\t\t\tset: v => {\n\t\t\t\tenableOverride = v;\n\t\t\t}\n\t\t});\n\n\t\t// Env-specific initialization logic for debug instances\n\t\tif (typeof createDebug.init === 'function') {\n\t\t\tcreateDebug.init(debug);\n\t\t}\n\n\t\treturn debug;\n\t}\n\n\tfunction extend(namespace, delimiter) {\n\t\tconst newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);\n\t\tnewDebug.log = this.log;\n\t\treturn newDebug;\n\t}\n\n\t/**\n\t* Enables a debug mode by namespaces. This can include modes\n\t* separated by a colon and wildcards.\n\t*\n\t* @param {String} namespaces\n\t* @api public\n\t*/\n\tfunction enable(namespaces) {\n\t\tcreateDebug.save(namespaces);\n\t\tcreateDebug.namespaces = namespaces;\n\n\t\tcreateDebug.names = [];\n\t\tcreateDebug.skips = [];\n\n\t\tconst split = (typeof namespaces === 'string' ? namespaces : '')\n\t\t\t.trim()\n\t\t\t.replace(/\\s+/g, ',')\n\t\t\t.split(',')\n\t\t\t.filter(Boolean);\n\n\t\tfor (const ns of split) {\n\t\t\tif (ns[0] === '-') {\n\t\t\t\tcreateDebug.skips.push(ns.slice(1));\n\t\t\t} else {\n\t\t\t\tcreateDebug.names.push(ns);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Checks if the given string matches a namespace template, honoring\n\t * asterisks as wildcards.\n\t *\n\t * @param {String} search\n\t * @param {String} template\n\t * @return {Boolean}\n\t */\n\tfunction matchesTemplate(search, template) {\n\t\tlet searchIndex = 0;\n\t\tlet templateIndex = 0;\n\t\tlet starIndex = -1;\n\t\tlet matchIndex = 0;\n\n\t\twhile (searchIndex < search.length) {\n\t\t\tif (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === '*')) {\n\t\t\t\t// Match character or proceed with wildcard\n\t\t\t\tif (template[templateIndex] === '*') {\n\t\t\t\t\tstarIndex = templateIndex;\n\t\t\t\t\tmatchIndex = searchIndex;\n\t\t\t\t\ttemplateIndex++; // Skip the '*'\n\t\t\t\t} else {\n\t\t\t\t\tsearchIndex++;\n\t\t\t\t\ttemplateIndex++;\n\t\t\t\t}\n\t\t\t} else if (starIndex !== -1) { // eslint-disable-line no-negated-condition\n\t\t\t\t// Backtrack to the last '*' and try to match more characters\n\t\t\t\ttemplateIndex = starIndex + 1;\n\t\t\t\tmatchIndex++;\n\t\t\t\tsearchIndex = matchIndex;\n\t\t\t} else {\n\t\t\t\treturn false; // No match\n\t\t\t}\n\t\t}\n\n\t\t// Handle trailing '*' in template\n\t\twhile (templateIndex < template.length && template[templateIndex] === '*') {\n\t\t\ttemplateIndex++;\n\t\t}\n\n\t\treturn templateIndex === template.length;\n\t}\n\n\t/**\n\t* Disable debug output.\n\t*\n\t* @return {String} namespaces\n\t* @api public\n\t*/\n\tfunction disable() {\n\t\tconst namespaces = [\n\t\t\t...createDebug.names,\n\t\t\t...createDebug.skips.map(namespace => '-' + namespace)\n\t\t].join(',');\n\t\tcreateDebug.enable('');\n\t\treturn namespaces;\n\t}\n\n\t/**\n\t* Returns true if the given mode name is enabled, false otherwise.\n\t*\n\t* @param {String} name\n\t* @return {Boolean}\n\t* @api public\n\t*/\n\tfunction enabled(name) {\n\t\tfor (const skip of createDebug.skips) {\n\t\t\tif (matchesTemplate(name, skip)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tfor (const ns of createDebug.names) {\n\t\t\tif (matchesTemplate(name, ns)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t* Coerce `val`.\n\t*\n\t* @param {Mixed} val\n\t* @return {Mixed}\n\t* @api private\n\t*/\n\tfunction coerce(val) {\n\t\tif (val instanceof Error) {\n\t\t\treturn val.stack || val.message;\n\t\t}\n\t\treturn val;\n\t}\n\n\t/**\n\t* XXX DO NOT USE. This is a temporary stub function.\n\t* XXX It WILL be removed in the next major release.\n\t*/\n\tfunction destroy() {\n\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t}\n\n\tcreateDebug.enable(createDebug.load());\n\n\treturn createDebug;\n}\n\nmodule.exports = setup;\n","/* eslint-env browser */\n\n/**\n * This is the web browser implementation of `debug()`.\n */\n\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.storage = localstorage();\nexports.destroy = (() => {\n\tlet warned = false;\n\n\treturn () => {\n\t\tif (!warned) {\n\t\t\twarned = true;\n\t\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t\t}\n\t};\n})();\n\n/**\n * Colors.\n */\n\nexports.colors = [\n\t'#0000CC',\n\t'#0000FF',\n\t'#0033CC',\n\t'#0033FF',\n\t'#0066CC',\n\t'#0066FF',\n\t'#0099CC',\n\t'#0099FF',\n\t'#00CC00',\n\t'#00CC33',\n\t'#00CC66',\n\t'#00CC99',\n\t'#00CCCC',\n\t'#00CCFF',\n\t'#3300CC',\n\t'#3300FF',\n\t'#3333CC',\n\t'#3333FF',\n\t'#3366CC',\n\t'#3366FF',\n\t'#3399CC',\n\t'#3399FF',\n\t'#33CC00',\n\t'#33CC33',\n\t'#33CC66',\n\t'#33CC99',\n\t'#33CCCC',\n\t'#33CCFF',\n\t'#6600CC',\n\t'#6600FF',\n\t'#6633CC',\n\t'#6633FF',\n\t'#66CC00',\n\t'#66CC33',\n\t'#9900CC',\n\t'#9900FF',\n\t'#9933CC',\n\t'#9933FF',\n\t'#99CC00',\n\t'#99CC33',\n\t'#CC0000',\n\t'#CC0033',\n\t'#CC0066',\n\t'#CC0099',\n\t'#CC00CC',\n\t'#CC00FF',\n\t'#CC3300',\n\t'#CC3333',\n\t'#CC3366',\n\t'#CC3399',\n\t'#CC33CC',\n\t'#CC33FF',\n\t'#CC6600',\n\t'#CC6633',\n\t'#CC9900',\n\t'#CC9933',\n\t'#CCCC00',\n\t'#CCCC33',\n\t'#FF0000',\n\t'#FF0033',\n\t'#FF0066',\n\t'#FF0099',\n\t'#FF00CC',\n\t'#FF00FF',\n\t'#FF3300',\n\t'#FF3333',\n\t'#FF3366',\n\t'#FF3399',\n\t'#FF33CC',\n\t'#FF33FF',\n\t'#FF6600',\n\t'#FF6633',\n\t'#FF9900',\n\t'#FF9933',\n\t'#FFCC00',\n\t'#FFCC33'\n];\n\n/**\n * Currently only WebKit-based Web Inspectors, Firefox >= v31,\n * and the Firebug extension (any Firefox version) are known\n * to support \"%c\" CSS customizations.\n *\n * TODO: add a `localStorage` variable to explicitly enable/disable colors\n */\n\n// eslint-disable-next-line complexity\nfunction useColors() {\n\t// NB: In an Electron preload script, document will be defined but not fully\n\t// initialized. Since we know we're in Chrome, we'll just detect this case\n\t// explicitly\n\tif (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {\n\t\treturn true;\n\t}\n\n\t// Internet Explorer and Edge do not support colors.\n\tif (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n\t\treturn false;\n\t}\n\n\tlet m;\n\n\t// Is webkit? http://stackoverflow.com/a/16459606/376773\n\t// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\t// eslint-disable-next-line no-return-assign\n\treturn (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n\t\t// Is firebug? http://stackoverflow.com/a/398120/376773\n\t\t(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n\t\t// Is firefox >= v31?\n\t\t// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/)) && parseInt(m[1], 10) >= 31) ||\n\t\t// Double check webkit in userAgent just in case we are in a worker\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n}\n\n/**\n * Colorize log arguments if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n\targs[0] = (this.useColors ? '%c' : '') +\n\t\tthis.namespace +\n\t\t(this.useColors ? ' %c' : ' ') +\n\t\targs[0] +\n\t\t(this.useColors ? '%c ' : ' ') +\n\t\t'+' + module.exports.humanize(this.diff);\n\n\tif (!this.useColors) {\n\t\treturn;\n\t}\n\n\tconst c = 'color: ' + this.color;\n\targs.splice(1, 0, c, 'color: inherit');\n\n\t// The final \"%c\" is somewhat tricky, because there could be other\n\t// arguments passed either before or after the %c, so we need to\n\t// figure out the correct index to insert the CSS into\n\tlet index = 0;\n\tlet lastC = 0;\n\targs[0].replace(/%[a-zA-Z%]/g, match => {\n\t\tif (match === '%%') {\n\t\t\treturn;\n\t\t}\n\t\tindex++;\n\t\tif (match === '%c') {\n\t\t\t// We only are interested in the *last* %c\n\t\t\t// (the user may have provided their own)\n\t\t\tlastC = index;\n\t\t}\n\t});\n\n\targs.splice(lastC, 0, c);\n}\n\n/**\n * Invokes `console.debug()` when available.\n * No-op when `console.debug` is not a \"function\".\n * If `console.debug` is not available, falls back\n * to `console.log`.\n *\n * @api public\n */\nexports.log = console.debug || console.log || (() => {});\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\nfunction save(namespaces) {\n\ttry {\n\t\tif (namespaces) {\n\t\t\texports.storage.setItem('debug', namespaces);\n\t\t} else {\n\t\t\texports.storage.removeItem('debug');\n\t\t}\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\nfunction load() {\n\tlet r;\n\ttry {\n\t\tr = exports.storage.getItem('debug') || exports.storage.getItem('DEBUG') ;\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n\n\t// If debug isn't set in LS, and we're in Electron, try to load $DEBUG\n\tif (!r && typeof process !== 'undefined' && 'env' in process) {\n\t\tr = process.env.DEBUG;\n\t}\n\n\treturn r;\n}\n\n/**\n * Localstorage attempts to return the localstorage.\n *\n * This is necessary because safari throws\n * when a user disables cookies/localstorage\n * and you attempt to access it.\n *\n * @return {LocalStorage}\n * @api private\n */\n\nfunction localstorage() {\n\ttry {\n\t\t// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context\n\t\t// The Browser also has localStorage in the global context.\n\t\treturn localStorage;\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\nmodule.exports = require('./common')(exports);\n\nconst {formatters} = module.exports;\n\n/**\n * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.\n */\n\nformatters.j = function (v) {\n\ttry {\n\t\treturn JSON.stringify(v);\n\t} catch (error) {\n\t\treturn '[UnexpectedJSONParseError]: ' + error.message;\n\t}\n};\n","/**\n * When Mocha throws exceptions (or rejects `Promise`s), it attempts to assign a `code` property to the `Error` object, for easier handling. These are the potential values of `code`.\n * @public\n * @namespace\n * @memberof module:lib/errors\n */\nexport const constants = {\n /**\n * An unrecoverable error.\n * @constant\n * @default\n */\n FATAL: \"ERR_MOCHA_FATAL\",\n\n /**\n * The type of an argument to a function call is invalid\n * @constant\n * @default\n */\n INVALID_ARG_TYPE: \"ERR_MOCHA_INVALID_ARG_TYPE\",\n\n /**\n * The value of an argument to a function call is invalid\n * @constant\n * @default\n */\n INVALID_ARG_VALUE: \"ERR_MOCHA_INVALID_ARG_VALUE\",\n\n /**\n * Something was thrown, but it wasn't an `Error`\n * @constant\n * @default\n */\n INVALID_EXCEPTION: \"ERR_MOCHA_INVALID_EXCEPTION\",\n\n /**\n * An interface (e.g., `Mocha.interfaces`) is unknown or invalid\n * @constant\n * @default\n */\n INVALID_INTERFACE: \"ERR_MOCHA_INVALID_INTERFACE\",\n\n /**\n * A reporter (.e.g, `Mocha.reporters`) is unknown or invalid\n * @constant\n * @default\n */\n INVALID_REPORTER: \"ERR_MOCHA_INVALID_REPORTER\",\n\n /**\n * `done()` was called twice in a `Test` or `Hook` callback\n * @constant\n * @default\n */\n MULTIPLE_DONE: \"ERR_MOCHA_MULTIPLE_DONE\",\n\n /**\n * No files matched the pattern provided by the user\n * @constant\n * @default\n */\n NO_FILES_MATCH_PATTERN: \"ERR_MOCHA_NO_FILES_MATCH_PATTERN\",\n\n /**\n * Known, but unsupported behavior of some kind\n * @constant\n * @default\n */\n UNSUPPORTED: \"ERR_MOCHA_UNSUPPORTED\",\n\n /**\n * Invalid state transition occurring in `Mocha` instance\n * @constant\n * @default\n */\n INSTANCE_ALREADY_RUNNING: \"ERR_MOCHA_INSTANCE_ALREADY_RUNNING\",\n\n /**\n * Invalid state transition occurring in `Mocha` instance\n * @constant\n * @default\n */\n INSTANCE_ALREADY_DISPOSED: \"ERR_MOCHA_INSTANCE_ALREADY_DISPOSED\",\n\n /**\n * Use of `only()` w/ `--forbid-only` results in this error.\n * @constant\n * @default\n */\n FORBIDDEN_EXCLUSIVITY: \"ERR_MOCHA_FORBIDDEN_EXCLUSIVITY\",\n\n /**\n * To be thrown when a user-defined plugin implementation (e.g., `mochaHooks`) is invalid\n * @constant\n * @default\n */\n INVALID_PLUGIN_IMPLEMENTATION: \"ERR_MOCHA_INVALID_PLUGIN_IMPLEMENTATION\",\n\n /**\n * To be thrown when a builtin or third-party plugin definition (the _definition_ of `mochaHooks`) is invalid\n * @constant\n * @default\n */\n INVALID_PLUGIN_DEFINITION: \"ERR_MOCHA_INVALID_PLUGIN_DEFINITION\",\n\n /**\n * When a runnable exceeds its allowed run time.\n * @constant\n * @default\n */\n TIMEOUT: \"ERR_MOCHA_TIMEOUT\",\n\n /**\n * Input file is not able to be parsed\n * @constant\n * @default\n */\n UNPARSABLE_FILE: \"ERR_MOCHA_UNPARSABLE_FILE\",\n};\n","/**\n * @typedef {import('./mocha.cjs')} Mocha\n * @typedef {import('./runnable.js')} Runnable\n * @typedef {import('./types.d.ts').MochaTimeoutError} MochaTimeoutError\n * @typedef {import('./types.d.ts').PluginDefinition} PluginDefinition\n */\n\nimport { format } from \"node:util\";\nimport { constants } from \"./error-constants.js\";\nimport { isCI } from \"./utils.cjs\";\n\n/**\n * Contains error codes and factory functions to create throwable error objects\n * @module\n */\n\n/**\n * A set containing all string values of all Mocha error constants, for use by {@link isMochaError}.\n * @private\n */\nconst MOCHA_ERRORS = new Set(Object.values(constants));\n\n/**\n * Creates an error object to be thrown when no files to be tested could be found using specified pattern.\n *\n * @public\n * @static\n * @param {string} message - Error message to be displayed.\n * @param {string} pattern - User-specified argument value.\n * @returns {Error} instance detailing the error condition\n */\nfunction createNoFilesMatchPatternError(message, pattern) {\n var err = new Error(message);\n err.code = constants.NO_FILES_MATCH_PATTERN;\n err.pattern = pattern;\n return err;\n}\n\n/**\n * Creates an error object to be thrown when the reporter specified in the options was not found.\n *\n * @public\n * @param {string} message - Error message to be displayed.\n * @param {string} reporter - User-specified reporter value.\n * @returns {Error} instance detailing the error condition\n */\nfunction createInvalidReporterError(message, reporter) {\n var err = new TypeError(message);\n err.code = constants.INVALID_REPORTER;\n err.reporter = reporter;\n return err;\n}\n\n/**\n * Creates an error object to be thrown when the interface specified in the options was not found.\n *\n * @public\n * @static\n * @param {string} message - Error message to be displayed.\n * @param {string} ui - User-specified interface value.\n * @returns {Error} instance detailing the error condition\n */\nfunction createInvalidInterfaceError(message, ui) {\n var err = new Error(message);\n err.code = constants.INVALID_INTERFACE;\n err.interface = ui;\n return err;\n}\n\n/**\n * Creates an error object to be thrown when a behavior, option, or parameter is unsupported.\n *\n * @public\n * @static\n * @param {string} message - Error message to be displayed.\n * @returns {Error} instance detailing the error condition\n */\nfunction createUnsupportedError(message) {\n var err = new Error(message);\n err.code = constants.UNSUPPORTED;\n return err;\n}\n\n/**\n * Creates an error object to be thrown when an argument is missing.\n *\n * @public\n * @static\n * @param {string} message - Error message to be displayed.\n * @param {string} argument - Argument name.\n * @param {string} expected - Expected argument datatype.\n * @returns {Error} instance detailing the error condition\n */\nfunction createMissingArgumentError(message, argument, expected) {\n return createInvalidArgumentTypeError(message, argument, expected);\n}\n\n/**\n * Creates an error object to be thrown when an argument did not use the supported type\n *\n * @public\n * @static\n * @param {string} message - Error message to be displayed.\n * @param {string} argument - Argument name.\n * @param {string} expected - Expected argument datatype.\n * @returns {Error} instance detailing the error condition\n */\nfunction createInvalidArgumentTypeError(message, argument, expected) {\n var err = new TypeError(message);\n err.code = constants.INVALID_ARG_TYPE;\n err.argument = argument;\n err.expected = expected;\n err.actual = typeof argument;\n return err;\n}\n\n/**\n * Creates an error object to be thrown when an argument did not use the supported value\n *\n * @public\n * @static\n * @param {string} message - Error message to be displayed.\n * @param {string} argument - Argument name.\n * @param {string} value - Argument value.\n * @param {string} [reason] - Why value is invalid.\n * @returns {Error} instance detailing the error condition\n */\nfunction createInvalidArgumentValueError(message, argument, value, reason) {\n var err = new TypeError(message);\n err.code = constants.INVALID_ARG_VALUE;\n err.argument = argument;\n err.value = value;\n err.reason = typeof reason !== \"undefined\" ? reason : \"is invalid\";\n return err;\n}\n\n/**\n * Creates an error object to be thrown when an exception was caught, but the `Error` is falsy or undefined.\n *\n * @public\n * @static\n * @param {string} message - Error message to be displayed.\n * @returns {Error} instance detailing the error condition\n */\nfunction createInvalidExceptionError(message, value) {\n var err = new Error(message);\n err.code = constants.INVALID_EXCEPTION;\n err.valueType = typeof value;\n err.value = value;\n return err;\n}\n\n/**\n * Creates an error object to be thrown when an unrecoverable error occurs.\n *\n * @public\n * @static\n * @param {string} message - Error message to be displayed.\n * @returns {Error} instance detailing the error condition\n */\nfunction createFatalError(message, value) {\n var err = new Error(message);\n err.code = constants.FATAL;\n err.valueType = typeof value;\n err.value = value;\n return err;\n}\n\n/**\n * Dynamically creates a plugin-type-specific error based on plugin type\n * @param {string} message - Error message\n * @param {\"reporter\"|\"ui\"} pluginType - Plugin type. Future: expand as needed\n * @param {string} [pluginId] - Name/path of plugin, if any\n * @throws When `pluginType` is not known\n * @public\n * @static\n * @returns {Error}\n */\nfunction createInvalidLegacyPluginError(message, pluginType, pluginId) {\n switch (pluginType) {\n case \"reporter\":\n return createInvalidReporterError(message, pluginId);\n case \"ui\":\n return createInvalidInterfaceError(message, pluginId);\n default:\n throw new Error('unknown pluginType \"' + pluginType + '\"');\n }\n}\n\n/**\n * Creates an error object to be thrown when a mocha object's `run` method is executed while it is already disposed.\n * @param {string} message The error message to be displayed.\n * @param {boolean} cleanReferencesAfterRun the value of `cleanReferencesAfterRun`\n * @param {Mocha} instance the mocha instance that throw this error\n * @static\n */\nfunction createMochaInstanceAlreadyDisposedError(\n message,\n cleanReferencesAfterRun,\n instance,\n) {\n var err = new Error(message);\n err.code = constants.INSTANCE_ALREADY_DISPOSED;\n err.cleanReferencesAfterRun = cleanReferencesAfterRun;\n err.instance = instance;\n return err;\n}\n\n/**\n * Creates an error object to be thrown when a mocha object's `run` method is called while a test run is in progress.\n * @param {string} message The error message to be displayed.\n * @static\n * @public\n */\nfunction createMochaInstanceAlreadyRunningError(message, instance) {\n var err = new Error(message);\n err.code = constants.INSTANCE_ALREADY_RUNNING;\n err.instance = instance;\n return err;\n}\n\n/**\n * Creates an error object to be thrown when done() is called multiple times in a test\n *\n * @public\n * @param {Runnable} runnable - Original runnable\n * @param {Error} [originalErr] - Original error, if any\n * @returns {Error} instance detailing the error condition\n * @static\n */\nfunction createMultipleDoneError(runnable, originalErr) {\n var title;\n try {\n title = format(\"<%s>\", runnable.fullTitle());\n if (runnable.parent.root) {\n title += \" (of root suite)\";\n }\n } catch {\n title = format(\"<%s> (of unknown suite)\", runnable.title);\n }\n var message = format(\n \"done() called multiple times in %s %s\",\n runnable.type ? runnable.type : \"unknown runnable\",\n title,\n );\n if (runnable.file) {\n message += format(\" of file %s\", runnable.file);\n }\n if (originalErr) {\n message += format(\"; in addition, done() received error: %s\", originalErr);\n }\n\n var err = new Error(message);\n err.code = constants.MULTIPLE_DONE;\n err.valueType = typeof originalErr;\n err.value = originalErr;\n return err;\n}\n\n/**\n * Creates an error object to be thrown when `.only()` is used with\n * `--forbid-only`.\n * @static\n * @public\n * @param {Mocha} mocha - Mocha instance\n * @returns {Error} Error with code {@link constants.FORBIDDEN_EXCLUSIVITY}\n */\nfunction createForbiddenExclusivityError(mocha) {\n var message;\n if (mocha.isWorker) {\n message = \"`.only` is not supported in parallel mode\";\n } else {\n message = \"`.only` forbidden by --forbid-only\";\n if (isCI()) {\n message += \" (default in CI, add `--no-forbid-only` to allow `.only`)\";\n }\n }\n\n var err = new Error(message);\n err.code = constants.FORBIDDEN_EXCLUSIVITY;\n return err;\n}\n\n/**\n * Creates an error object to be thrown when a plugin definition is invalid\n * @static\n * @param {string} msg - Error message\n * @param {PluginDefinition} [pluginDef] - Problematic plugin definition\n * @public\n * @returns {Error} Error with code {@link constants.INVALID_PLUGIN_DEFINITION}\n */\nfunction createInvalidPluginDefinitionError(msg, pluginDef) {\n const err = new Error(msg);\n err.code = constants.INVALID_PLUGIN_DEFINITION;\n err.pluginDef = pluginDef;\n return err;\n}\n\n/**\n * Creates an error object to be thrown when a plugin implementation (user code) is invalid\n * @static\n * @param {string} msg - Error message\n * @param {Object} [opts] - Plugin definition and user-supplied implementation\n * @param {PluginDefinition} [opts.pluginDef] - Plugin Definition\n * @param {*} [opts.pluginImpl] - Plugin Implementation (user-supplied)\n * @public\n * @returns {Error} Error with code {@link constants.INVALID_PLUGIN_DEFINITION}\n */\nfunction createInvalidPluginImplementationError(\n msg,\n { pluginDef, pluginImpl } = {},\n) {\n const err = new Error(msg);\n err.code = constants.INVALID_PLUGIN_IMPLEMENTATION;\n err.pluginDef = pluginDef;\n err.pluginImpl = pluginImpl;\n return err;\n}\n\n/**\n * Creates an error object to be thrown when a runnable exceeds its allowed run time.\n * @static\n * @param {string} msg - Error message\n * @param {number} [timeout] - Timeout in ms\n * @param {string} [file] - File, if given\n * @returns {MochaTimeoutError}\n */\nfunction createTimeoutError(msg, timeout, file) {\n const err = new Error(msg);\n err.code = constants.TIMEOUT;\n err.timeout = timeout;\n err.file = file;\n return err;\n}\n\n/**\n * Creates an error object to be thrown when file is unparsable\n * @public\n * @static\n * @param {string} message - Error message to be displayed.\n * @returns {Error} Error with code {@link constants.UNPARSABLE_FILE}\n */\nfunction createUnparsableFileError(message) {\n var err = new Error(message);\n err.code = constants.UNPARSABLE_FILE;\n return err;\n}\n\n/**\n * Returns `true` if an error came out of Mocha.\n * _Can suffer from false negatives, but not false positives._\n * @static\n * @public\n * @param {*} err - Error, or anything\n * @returns {boolean}\n */\nconst isMochaError = (err) =>\n Boolean(err && typeof err === \"object\" && MOCHA_ERRORS.has(err.code));\n\nexport {\n createFatalError,\n createForbiddenExclusivityError,\n createInvalidArgumentTypeError,\n createInvalidArgumentValueError,\n createInvalidExceptionError,\n createInvalidInterfaceError,\n createInvalidLegacyPluginError,\n createInvalidPluginDefinitionError,\n createInvalidPluginImplementationError,\n createInvalidReporterError,\n createMissingArgumentError,\n createMochaInstanceAlreadyDisposedError,\n createMochaInstanceAlreadyRunningError,\n createMultipleDoneError,\n createNoFilesMatchPatternError,\n createTimeoutError,\n createUnparsableFileError,\n createUnsupportedError,\n isMochaError,\n};\n","import { EventEmitter } from \"node:events\";\nimport { PendingError } from \"./pending.js\";\nimport debugModule from \"debug\";\nimport milliseconds from \"ms\";\nimport utils from \"./utils.cjs\";\nimport {\n createInvalidExceptionError,\n createMultipleDoneError,\n createTimeoutError,\n} from \"./errors.js\";\n\nconst debug = debugModule(\"mocha:runnable\");\n\n/**\n * Save timer references to avoid Sinon interfering (see GH-237).\n * @private\n */\nvar Date = global.Date;\nvar setTimeout = global.setTimeout;\nvar clearTimeout = global.clearTimeout;\nvar toString = Object.prototype.toString;\n\nvar MAX_TIMEOUT = Math.pow(2, 31) - 1;\n\nclass Runnable extends EventEmitter {\n // \"Additional properties\" doc comment added for hosted docs (mochajs.org/api)\n /**\n * Initialize a new `Runnable` with the given `title` and callback `fn`.\n * Additional properties, like `getFullTitle()` and `slow()`, can be viewed in the `Runnable` source.\n *\n * @extends external:EventEmitter\n * @public\n * @param {String} title\n * @param {Function} fn\n */\n constructor(title, fn) {\n super(title, fn);\n this.title = title;\n this.fn = fn;\n this.body = (fn || \"\").toString();\n this.async = fn && fn.length;\n this.sync = !this.async;\n this._timeout = 2000;\n this._slow = 75;\n this._retries = -1;\n utils.assignNewMochaID(this);\n Object.defineProperty(this, \"id\", {\n get() {\n return utils.getMochaID(this);\n },\n });\n this.reset();\n }\n\n /**\n * Resets the state initially or for a next run.\n */\n reset() {\n this.timedOut = false;\n this._currentRetry = 0;\n this.pending = false;\n delete this.state;\n delete this.err;\n }\n\n /**\n * Get current timeout value in msecs.\n *\n * @private\n * @returns {number} current timeout threshold value\n */\n /**\n * @summary\n * Set timeout threshold value (msecs).\n *\n * @description\n * A string argument can use shorthand (e.g., \"2s\") and will be converted.\n * The value will be clamped to range [0, 2^31-1].\n * If clamped value matches either range endpoint, timeouts will be disabled.\n *\n * @private\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setTimeout#Maximum_delay_value}\n * @param {number|string} ms - Timeout threshold value.\n * @returns {Runnable} this\n * @chainable\n */\n timeout(ms) {\n if (!arguments.length) {\n return this._timeout;\n }\n if (typeof ms === \"string\") {\n ms = milliseconds(ms);\n }\n\n // Clamp to range\n var range = [0, MAX_TIMEOUT];\n ms = utils.clamp(ms, range);\n\n // see #1652 for reasoning\n if (ms === range[0] || ms === range[1]) {\n this._timeout = 0;\n } else {\n this._timeout = ms;\n }\n debug(\"timeout %d\", this._timeout);\n\n if (this.timer) {\n this.resetTimeout();\n }\n return this;\n }\n\n /**\n * Set or get slow `ms`.\n *\n * @private\n * @param {number|string} ms\n * @return {Runnable|number} ms or Runnable instance.\n */\n slow(ms) {\n if (!arguments.length || typeof ms === \"undefined\") {\n return this._slow;\n }\n if (typeof ms === \"string\") {\n ms = milliseconds(ms);\n }\n debug(\"slow %d\", ms);\n this._slow = ms;\n return this;\n }\n\n /**\n * Halt and mark as pending.\n *\n * @memberof Mocha.Runnable\n * @public\n */\n skip() {\n this.pending = true;\n throw new PendingError(\"sync skip; aborting execution\");\n }\n\n /**\n * Check if this runnable or its parent suite is marked as pending.\n *\n * @private\n */\n isPending() {\n return this.pending || (this.parent && this.parent.isPending());\n }\n\n /**\n * Return `true` if this Runnable has failed.\n * @return {boolean}\n * @private\n */\n isFailed() {\n return !this.isPending() && this.state === Runnable.constants.STATE_FAILED;\n }\n\n /**\n * Return `true` if this Runnable has passed.\n * @return {boolean}\n * @private\n */\n isPassed() {\n return !this.isPending() && this.state === Runnable.constants.STATE_PASSED;\n }\n\n /**\n * Set or get number of retries.\n *\n * @private\n */\n retries(n) {\n if (!arguments.length) {\n return this._retries;\n }\n this._retries = n;\n }\n\n /**\n * Set or get current retry\n *\n * @private\n */\n currentRetry(n) {\n if (!arguments.length) {\n return this._currentRetry;\n }\n this._currentRetry = n;\n }\n\n /**\n * Return the full title generated by recursively concatenating the parent's\n * full title.\n *\n * @memberof Mocha.Runnable\n * @public\n * @return {string}\n */\n fullTitle() {\n return this.titlePath().join(\" \");\n }\n\n /**\n * Return the title path generated by concatenating the parent's title path with the title.\n *\n * @memberof Mocha.Runnable\n * @public\n * @return {string[]}\n */\n titlePath() {\n return this.parent.titlePath().concat([this.title]);\n }\n\n /**\n * Clear the timeout.\n *\n * @private\n */\n clearTimeout() {\n clearTimeout(this.timer);\n }\n\n /**\n * Reset the timeout.\n *\n * @private\n */\n resetTimeout() {\n var self = this;\n var ms = this.timeout() || MAX_TIMEOUT;\n\n this.clearTimeout();\n this.timer = setTimeout(function () {\n if (self.timeout() === 0) {\n return;\n }\n self.callback(self._timeoutError(ms));\n self.timedOut = true;\n }, ms);\n }\n\n /**\n * Set or get a list of whitelisted globals for this test run.\n *\n * @private\n * @param {string[]} globals\n */\n globals(globals) {\n if (!arguments.length) {\n return this._allowedGlobals;\n }\n this._allowedGlobals = globals;\n }\n\n /**\n * Run the test and invoke `fn(err)`.\n *\n * @param {Function} fn\n * @private\n */\n run(fn) {\n var self = this;\n var start = new Date();\n var ctx = this.ctx;\n var finished;\n var errorWasHandled = false;\n\n if (this.isPending()) return fn();\n\n // Sometimes the ctx exists, but it is not runnable\n if (ctx && ctx.runnable) {\n ctx.runnable(this);\n }\n\n // called multiple times\n function multiple(err) {\n if (errorWasHandled) {\n return;\n }\n errorWasHandled = true;\n self.emit(\"error\", createMultipleDoneError(self, err));\n }\n\n // finished\n function done(err) {\n var ms = self.timeout();\n if (self.timedOut) {\n return;\n }\n\n if (finished) {\n return multiple(err);\n }\n\n self.clearTimeout();\n self.duration = new Date() - start;\n finished = true;\n if (!err && self.duration > ms && ms > 0) {\n err = self._timeoutError(ms);\n }\n fn(err);\n }\n\n // for .resetTimeout() and Runner#uncaught()\n this.callback = done;\n\n if (this.fn && typeof this.fn.call !== \"function\") {\n done(\n new TypeError(\n \"A runnable must be passed a function as its second argument.\",\n ),\n );\n return;\n }\n\n // explicit async with `done` argument\n if (this.async) {\n this.resetTimeout();\n\n // allows skip() to be used in an explicit async context\n this.skip = function asyncSkip() {\n this.pending = true;\n done();\n // halt execution, the uncaught handler will ignore the failure.\n throw new PendingError(\"async skip; aborting execution\");\n };\n\n try {\n callFnAsync(this.fn);\n } catch (err) {\n // handles async runnables which actually run synchronously\n errorWasHandled = true;\n if (err instanceof PendingError) {\n return; // done() is already called in this.skip()\n } else if (this.allowUncaught) {\n throw err;\n }\n done(Runnable.toValueOrError(err));\n }\n return;\n }\n\n // sync or promise-returning\n try {\n callFn(this.fn);\n } catch (err) {\n errorWasHandled = true;\n if (err instanceof PendingError) {\n return done();\n } else if (this.allowUncaught) {\n throw err;\n }\n done(Runnable.toValueOrError(err));\n }\n\n function callFn(fn) {\n var result = fn.call(ctx);\n if (result && typeof result.then === \"function\") {\n self.resetTimeout();\n result.then(\n function () {\n done();\n // Return null so libraries like bluebird do not warn about\n // subsequently constructed Promises.\n return null;\n },\n function (reason) {\n done(\n reason || new Error(\"Promise rejected with no or falsy reason\"),\n );\n },\n );\n } else {\n if (self.asyncOnly) {\n return done(\n new Error(\n \"--async-only option in use without declaring `done()` or returning a promise\",\n ),\n );\n }\n\n done();\n }\n }\n\n function callFnAsync(fn) {\n var result = fn.call(ctx, function (err) {\n if (err instanceof Error || toString.call(err) === \"[object Error]\") {\n return done(err);\n }\n if (err) {\n if (Object.prototype.toString.call(err) === \"[object Object]\") {\n return done(\n new Error(\n \"done() invoked with non-Error: \" + JSON.stringify(err),\n ),\n );\n }\n return done(new Error(\"done() invoked with non-Error: \" + err));\n }\n if (result && utils.isPromise(result)) {\n return done(\n new Error(\n \"Resolution method is overspecified. Specify a callback *or* return a Promise; not both.\",\n ),\n );\n }\n\n done();\n });\n }\n }\n\n /**\n * Instantiates a \"timeout\" error\n *\n * @param {number} ms - Timeout (in milliseconds)\n * @returns {Error} a \"timeout\" error\n * @private\n */\n _timeoutError(ms) {\n let msg = `Timeout of ${ms}ms exceeded. For async tests and hooks, ensure \"done()\" is called; if returning a Promise, ensure it resolves.`;\n if (this.file) {\n msg += \" (\" + this.file + \")\";\n }\n return createTimeoutError(msg, ms, this.file);\n }\n\n static constants = utils.defineConstants(\n /**\n * {@link Runnable}-related Runnable.constants.\n * @public\n * @memberof Runnable\n * @readonly\n * @static\n * @alias constants\n * @enum {string}\n */\n {\n /**\n * Value of `state` prop when a `Runnable` has failed\n */\n STATE_FAILED: \"failed\",\n /**\n * Value of `state` prop when a `Runnable` has passed\n */\n STATE_PASSED: \"passed\",\n /**\n * Value of `state` prop when a `Runnable` has been skipped by user\n */\n STATE_PENDING: \"pending\",\n },\n );\n\n /**\n * Given `value`, return identity if truthy, otherwise create an \"invalid exception\" error and return that.\n * @param {*} [value] - Value to return, if present\n * @returns {*|Error} `value`, otherwise an `Error`\n * @private\n */\n static toValueOrError(value) {\n return (\n value ||\n createInvalidExceptionError(\n \"Runnable failed with falsy or undefined exception. Please throw an Error instead.\",\n value,\n )\n );\n }\n}\n\nexport { Runnable };\n","import { Runnable } from \"./runnable.js\";\nimport utils from \"./utils.cjs\";\n\nconst { MOCHA_ID_PROP_NAME } = utils.constants;\n\nclass Hook extends Runnable {\n /**\n * Initialize a new `Hook` with the given `title` and callback `fn`\n *\n * @extends Runnable\n * @param {String} title\n * @param {Function} fn\n */\n constructor(title, fn) {\n super(title, fn);\n this.type = \"hook\";\n }\n\n /**\n * Resets the state for a next run.\n */\n reset() {\n super.reset(this);\n delete this._error;\n }\n\n /**\n * Get or set the test `err`.\n *\n * @memberof Hook\n * @public\n * @param {Error} err\n * @return {Error}\n */\n error(err) {\n if (!arguments.length) {\n err = this._error;\n this._error = null;\n return err;\n }\n\n this._error = err;\n }\n\n /**\n * Returns an object suitable for IPC.\n * Functions are represented by keys beginning with `$$`.\n * @private\n * @returns {Object}\n */\n serialize() {\n return {\n $$currentRetry: this.currentRetry(),\n $$fullTitle: this.fullTitle(),\n $$isPending: Boolean(this.isPending()),\n $$titlePath: this.titlePath(),\n ctx:\n this.ctx && this.ctx.currentTest\n ? {\n currentTest: {\n title: this.ctx.currentTest.title,\n [MOCHA_ID_PROP_NAME]: this.ctx.currentTest.id,\n },\n }\n : {},\n duration: this.duration,\n file: this.file,\n parent: {\n $$fullTitle: this.parent.fullTitle(),\n [MOCHA_ID_PROP_NAME]: this.parent.id,\n },\n state: this.state,\n title: this.title,\n type: this.type,\n [MOCHA_ID_PROP_NAME]: this.id,\n };\n }\n}\n\nexport { Hook };\n","/**\n * @typedef {import('./test.js')} Test\n */\n\n/**\n * Module dependencies.\n * @private\n */\nimport { EventEmitter } from \"node:events\";\nimport { Hook } from \"./hook.js\";\nimport utils from \"./utils.cjs\";\nimport debugModule from \"debug\";\nimport milliseconds from \"ms\";\nimport * as errors from \"./errors.js\";\n\nconst {\n assignNewMochaID,\n clamp,\n constants: utilsConstants,\n defineConstants,\n getMochaID,\n isString,\n} = utils;\nconst debug = debugModule(\"mocha:suite\");\n\nconst { MOCHA_ID_PROP_NAME } = utilsConstants;\n\nclass Suite extends EventEmitter {\n static constants = defineConstants(\n /**\n * {@link Suite}-related constants.\n * @public\n * @memberof Suite\n * @alias constants\n * @readonly\n * @static\n * @enum {string}\n */\n {\n /**\n * Event emitted after a test file has been loaded. Not emitted in browser.\n */\n EVENT_FILE_POST_REQUIRE: \"post-require\",\n /**\n * Event emitted before a test file has been loaded. In browser, this is emitted once an interface has been selected.\n */\n EVENT_FILE_PRE_REQUIRE: \"pre-require\",\n /**\n * Event emitted immediately after a test file has been loaded. Not emitted in browser.\n */\n EVENT_FILE_REQUIRE: \"require\",\n /**\n * Event emitted when `global.run()` is called (use with `delay` option).\n */\n EVENT_ROOT_SUITE_RUN: \"run\",\n\n /**\n * Namespace for collection of a `Suite`'s \"after all\" hooks.\n */\n HOOK_TYPE_AFTER_ALL: \"afterAll\",\n /**\n * Namespace for collection of a `Suite`'s \"after each\" hooks.\n */\n HOOK_TYPE_AFTER_EACH: \"afterEach\",\n /**\n * Namespace for collection of a `Suite`'s \"before all\" hooks.\n */\n HOOK_TYPE_BEFORE_ALL: \"beforeAll\",\n /**\n * Namespace for collection of a `Suite`'s \"before each\" hooks.\n */\n HOOK_TYPE_BEFORE_EACH: \"beforeEach\",\n\n /**\n * Emitted after a child `Suite` has been added to a `Suite`.\n */\n EVENT_SUITE_ADD_SUITE: \"suite\",\n /**\n * Emitted after an \"after all\" `Hook` has been added to a `Suite`.\n */\n EVENT_SUITE_ADD_HOOK_AFTER_ALL: \"afterAll\",\n /**\n * Emitted after an \"after each\" `Hook` has been added to a `Suite`.\n */\n EVENT_SUITE_ADD_HOOK_AFTER_EACH: \"afterEach\",\n /**\n * Emitted after an \"before all\" `Hook` has been added to a `Suite`.\n */\n EVENT_SUITE_ADD_HOOK_BEFORE_ALL: \"beforeAll\",\n /**\n * Emitted after an \"before each\" `Hook` has been added to a `Suite`.\n */\n EVENT_SUITE_ADD_HOOK_BEFORE_EACH: \"beforeEach\",\n /**\n * Emitted after a `Test` has been added to a `Suite`.\n */\n EVENT_SUITE_ADD_TEST: \"test\",\n },\n );\n\n /**\n * Create a new `Suite` with the given `title` and parent `Suite`.\n *\n * @public\n * @param {Suite} parent - Parent suite (required!)\n * @param {string} title - Title\n * @return {Suite}\n */\n static create(parent, title) {\n var suite = new Suite(title, parent.ctx);\n suite.parent = parent;\n parent.addSuite(suite);\n return suite;\n }\n\n /**\n * Constructs a new `Suite` instance with the given `title`, `ctx`, and `isRoot`.\n *\n * @public\n * @extends EventEmitter\n * @see {@link https://nodejs.org/api/events.html#events_class_eventemitter|EventEmitter}\n * @param {string} title - Suite title.\n * @param {Context} parentContext - Parent context instance.\n * @param {boolean} [isRoot=false] - Whether this is the root suite.\n */\n constructor(title, parentContext, isRoot) {\n if (!isString(title)) {\n throw errors.createInvalidArgumentTypeError(\n 'Suite argument \"title\" must be a string. Received type \"' +\n typeof title +\n '\"',\n \"title\",\n \"string\",\n );\n }\n super();\n this.title = title;\n function Context() {}\n Context.prototype = parentContext;\n this.ctx = new Context();\n this.suites = [];\n this.tests = [];\n this.root = isRoot === true;\n this.pending = false;\n this._retries = -1;\n this._beforeEach = [];\n this._beforeAll = [];\n this._afterEach = [];\n this._afterAll = [];\n this._timeout = 2000;\n this._slow = 75;\n this._bail = false;\n this._onlyTests = [];\n this._onlySuites = [];\n assignNewMochaID(this);\n\n Object.defineProperty(this, \"id\", {\n get() {\n return getMochaID(this);\n },\n });\n\n this.reset();\n }\n\n /**\n * Resets the state initially or for a next run.\n */\n reset() {\n this.delayed = false;\n function doReset(thingToReset) {\n thingToReset.reset();\n }\n this.suites.forEach(doReset);\n this.tests.forEach(doReset);\n this._beforeEach.forEach(doReset);\n this._afterEach.forEach(doReset);\n this._beforeAll.forEach(doReset);\n this._afterAll.forEach(doReset);\n }\n\n /**\n * Return a clone of this `Suite`.\n *\n * @private\n * @return {Suite}\n */\n clone() {\n var suite = new Suite(this.title);\n debug(\"clone\");\n suite.ctx = this.ctx;\n suite.root = this.root;\n suite.timeout(this.timeout());\n suite.retries(this.retries());\n suite.slow(this.slow());\n suite.bail(this.bail());\n return suite;\n }\n\n /**\n * Set or get timeout `ms` or short-hand such as \"2s\".\n *\n * @private\n * @todo Do not attempt to set value if `ms` is undefined\n * @param {number|string} ms\n * @return {Suite|number} for chaining\n */\n timeout(ms) {\n if (!arguments.length) {\n return this._timeout;\n }\n if (typeof ms === \"string\") {\n ms = milliseconds(ms);\n }\n\n // Clamp to range\n var INT_MAX = Math.pow(2, 31) - 1;\n var range = [0, INT_MAX];\n ms = clamp(ms, range);\n\n debug(\"timeout %d\", ms);\n this._timeout = parseInt(ms, 10);\n\n // Allow overriding inner/nested suites\n // See and test-cases with chain-called timeout argument.\n // https://github.com/mochajs/mocha/issues/5422\n for (const t of this.tests) {\n t.timeout(this._timeout);\n }\n for (const s of this.suites) {\n s.timeout(this._timeout);\n }\n return this;\n }\n\n /**\n * Set or get number of times to retry a failed test.\n *\n * @private\n * @param {number|string} n\n * @return {Suite|number} for chaining\n */\n retries(n) {\n if (!arguments.length) {\n return this._retries;\n }\n debug(\"retries %d\", n);\n this._retries = parseInt(n, 10) || 0;\n return this;\n }\n\n /**\n * Set or get slow `ms` or short-hand such as \"2s\".\n *\n * @private\n * @param {number|string} ms\n * @return {Suite|number} for chaining\n */\n slow(ms) {\n if (!arguments.length) {\n return this._slow;\n }\n if (typeof ms === \"string\") {\n ms = milliseconds(ms);\n }\n debug(\"slow %d\", ms);\n this._slow = ms;\n return this;\n }\n\n /**\n * Set or get whether to bail after first error.\n *\n * @private\n * @param {boolean} bail\n * @return {Suite|number} for chaining\n */\n bail(bail) {\n if (!arguments.length) {\n return this._bail;\n }\n debug(\"bail %s\", bail);\n this._bail = bail;\n return this;\n }\n\n /**\n * Check if this suite or its parent suite is marked as pending.\n *\n * @private\n */\n isPending() {\n return this.pending || (this.parent && this.parent.isPending());\n }\n\n /**\n * Generic hook-creator.\n * @private\n * @param {string} title - Title of hook\n * @param {Function} fn - Hook callback\n * @returns {Hook} A new hook\n */\n _createHook(title, fn) {\n var hook = new Hook(title, fn);\n hook.parent = this;\n hook.timeout(this.timeout());\n hook.retries(this.retries());\n hook.slow(this.slow());\n hook.ctx = this.ctx;\n hook.file = this.file;\n return hook;\n }\n\n /**\n * Run `fn(test[, done])` before running tests.\n *\n * @private\n * @param {string} title\n * @param {Function} fn\n * @return {Suite} for chaining\n */\n beforeAll(title, fn) {\n if (this.isPending()) {\n return this;\n }\n if (typeof title === \"function\") {\n fn = title;\n title = fn.name;\n }\n title = '\"before all\" hook' + (title ? \": \" + title : \"\");\n\n var hook = this._createHook(title, fn);\n this._beforeAll.push(hook);\n this.emit(Suite.constants.EVENT_SUITE_ADD_HOOK_BEFORE_ALL, hook);\n return hook;\n }\n\n /**\n * Run `fn(test[, done])` after running tests.\n *\n * @private\n * @param {string} title\n * @param {Function} fn\n * @return {Suite} for chaining\n */\n afterAll(title, fn) {\n if (this.isPending()) {\n return this;\n }\n if (typeof title === \"function\") {\n fn = title;\n title = fn.name;\n }\n title = '\"after all\" hook' + (title ? \": \" + title : \"\");\n\n var hook = this._createHook(title, fn);\n this._afterAll.push(hook);\n this.emit(Suite.constants.EVENT_SUITE_ADD_HOOK_AFTER_ALL, hook);\n return hook;\n }\n\n /**\n * Run `fn(test[, done])` before each test case.\n *\n * @private\n * @param {string} title\n * @param {Function} fn\n * @return {Suite} for chaining\n */\n beforeEach(title, fn) {\n if (this.isPending()) {\n return this;\n }\n if (typeof title === \"function\") {\n fn = title;\n title = fn.name;\n }\n title = '\"before each\" hook' + (title ? \": \" + title : \"\");\n\n var hook = this._createHook(title, fn);\n this._beforeEach.push(hook);\n this.emit(Suite.constants.EVENT_SUITE_ADD_HOOK_BEFORE_EACH, hook);\n return hook;\n }\n\n /**\n * Run `fn(test[, done])` after each test case.\n *\n * @private\n * @param {string} title\n * @param {Function} fn\n * @return {Suite} for chaining\n */\n afterEach(title, fn) {\n if (this.isPending()) {\n return this;\n }\n if (typeof title === \"function\") {\n fn = title;\n title = fn.name;\n }\n title = '\"after each\" hook' + (title ? \": \" + title : \"\");\n\n var hook = this._createHook(title, fn);\n this._afterEach.push(hook);\n this.emit(Suite.constants.EVENT_SUITE_ADD_HOOK_AFTER_EACH, hook);\n return hook;\n }\n\n /**\n * Add a test `suite`.\n *\n * @private\n * @param {Suite} suite\n * @return {Suite} for chaining\n */\n addSuite(suite) {\n suite.parent = this;\n suite.root = false;\n suite.timeout(this.timeout());\n suite.retries(this.retries());\n suite.slow(this.slow());\n suite.bail(this.bail());\n this.suites.push(suite);\n this.emit(Suite.constants.EVENT_SUITE_ADD_SUITE, suite);\n return this;\n }\n\n /**\n * Add a `test` to this suite.\n *\n * @private\n * @param {Test} test\n * @return {Suite} for chaining\n */\n addTest(test) {\n test.parent = this;\n test.timeout(this.timeout());\n test.retries(this.retries());\n test.slow(this.slow());\n test.ctx = this.ctx;\n this.tests.push(test);\n this.emit(Suite.constants.EVENT_SUITE_ADD_TEST, test);\n return this;\n }\n\n /**\n * Return the full title generated by recursively concatenating the parent's\n * full title.\n *\n * @memberof Suite\n * @public\n * @return {string}\n */\n fullTitle() {\n return this.titlePath().join(\" \");\n }\n\n /**\n * Return the title path generated by recursively concatenating the parent's\n * title path.\n *\n * @memberof Suite\n * @public\n * @return {string[]}\n */\n titlePath() {\n var result = [];\n if (this.parent) {\n result = result.concat(this.parent.titlePath());\n }\n if (!this.root) {\n result.push(this.title);\n }\n return result;\n }\n\n /**\n * Return the total number of tests.\n *\n * @memberof Suite\n * @public\n * @return {number}\n */\n total() {\n return (\n this.suites.reduce(function (sum, suite) {\n return sum + suite.total();\n }, 0) + this.tests.length\n );\n }\n\n /**\n * Iterates through each suite recursively to find all tests. Applies a\n * function in the format `fn(test)`.\n *\n * @private\n * @param {Function} fn\n * @return {Suite}\n */\n eachTest(fn) {\n this.tests.forEach(fn);\n this.suites.forEach(function (suite) {\n suite.eachTest(fn);\n });\n return this;\n }\n\n /**\n * This will run the root suite if we happen to be running in delayed mode.\n * @private\n */\n run() {\n if (this.root) {\n this.emit(Suite.constants.EVENT_ROOT_SUITE_RUN);\n }\n }\n\n /**\n * Determines whether a suite has an `only` test or suite as a descendant.\n *\n * @private\n * @returns {Boolean}\n */\n hasOnly() {\n return (\n this._onlyTests.length > 0 ||\n this._onlySuites.length > 0 ||\n this.suites.some(function (suite) {\n return suite.hasOnly();\n })\n );\n }\n\n /**\n * Filter suites based on `isOnly` logic.\n *\n * @private\n * @returns {Boolean}\n */\n filterOnly() {\n if (this._onlyTests.length) {\n // If the suite contains `only` tests, run those and ignore any nested suites.\n this.tests = this._onlyTests;\n this.suites = [];\n } else {\n // Otherwise, do not run any of the tests in this suite.\n this.tests = [];\n this._onlySuites.forEach(function (onlySuite) {\n // If there are other `only` tests/suites nested in the current `only` suite, then filter that `only` suite.\n // Otherwise, all of the tests on this `only` suite should be run, so don't filter it.\n if (onlySuite.hasOnly()) {\n onlySuite.filterOnly();\n }\n });\n // Run the `only` suites, as well as any other suites that have `only` tests/suites as descendants.\n var onlySuites = this._onlySuites;\n this.suites = this.suites.filter(function (childSuite) {\n return onlySuites.indexOf(childSuite) !== -1 || childSuite.filterOnly();\n });\n }\n // Keep the suite only if there is something to run\n return this.tests.length > 0 || this.suites.length > 0;\n }\n\n /**\n * Adds a suite to the list of subsuites marked `only`.\n *\n * @private\n * @param {Suite} suite\n */\n appendOnlySuite(suite) {\n this._onlySuites.push(suite);\n }\n\n /**\n * Marks a suite to be `only`.\n *\n * @private\n */\n markOnly() {\n this.parent && this.parent.appendOnlySuite(this);\n }\n\n /**\n * Adds a test to the list of tests marked `only`.\n *\n * @private\n * @param {Test} test\n */\n appendOnlyTest(test) {\n this._onlyTests.push(test);\n }\n\n /**\n * Returns the array of hooks by hook name; see `HOOK_TYPE_*` constants.\n * @private\n */\n getHooks(name) {\n return this[\"_\" + name];\n }\n\n /**\n * cleans all references from this suite and all child suites.\n */\n dispose() {\n this.suites.forEach(function (suite) {\n suite.dispose();\n });\n this.cleanReferences();\n }\n\n /**\n * Cleans up the references to all the deferred functions\n * (before/after/beforeEach/afterEach) and tests of a Suite.\n * These must be deleted otherwise a memory leak can happen,\n * as those functions may reference variables from closures,\n * thus those variables can never be garbage collected as long\n * as the deferred functions exist.\n *\n * @private\n */\n cleanReferences() {\n function cleanArrReferences(arr) {\n for (var i = 0; i < arr.length; i++) {\n delete arr[i].fn;\n }\n }\n\n if (Array.isArray(this._beforeAll)) {\n cleanArrReferences(this._beforeAll);\n }\n\n if (Array.isArray(this._beforeEach)) {\n cleanArrReferences(this._beforeEach);\n }\n\n if (Array.isArray(this._afterAll)) {\n cleanArrReferences(this._afterAll);\n }\n\n if (Array.isArray(this._afterEach)) {\n cleanArrReferences(this._afterEach);\n }\n\n for (var i = 0; i < this.tests.length; i++) {\n delete this.tests[i].fn;\n }\n }\n\n /**\n * Returns an object suitable for IPC.\n * Functions are represented by keys beginning with `$$`.\n * @private\n * @returns {Object}\n */\n serialize() {\n return {\n _bail: this._bail,\n $$fullTitle: this.fullTitle(),\n $$isPending: Boolean(this.isPending()),\n root: this.root,\n title: this.title,\n [MOCHA_ID_PROP_NAME]: this.id,\n parent: this.parent ? { [MOCHA_ID_PROP_NAME]: this.parent.id } : null,\n };\n }\n}\n\nexport { Suite };\n","\"use strict\";\n\n/**\n * @typedef {import('./types.d.ts').RunnerOptions} RunnerOptions\n */\n\n/**\n * Module dependencies.\n * @private\n */\nvar EventEmitter = require(\"node:events\").EventEmitter;\nvar { PendingError } = require(\"./pending.js\");\nvar utils = require(\"./utils.cjs\");\nvar debug = require(\"debug\")(\"mocha:runner\");\nvar { Runnable } = require(\"./runnable.js\");\nvar { Suite } = require(\"./suite.js\");\nvar HOOK_TYPE_BEFORE_EACH = Suite.constants.HOOK_TYPE_BEFORE_EACH;\nvar HOOK_TYPE_AFTER_EACH = Suite.constants.HOOK_TYPE_AFTER_EACH;\nvar HOOK_TYPE_AFTER_ALL = Suite.constants.HOOK_TYPE_AFTER_ALL;\nvar HOOK_TYPE_BEFORE_ALL = Suite.constants.HOOK_TYPE_BEFORE_ALL;\nvar EVENT_ROOT_SUITE_RUN = Suite.constants.EVENT_ROOT_SUITE_RUN;\nvar STATE_FAILED = Runnable.constants.STATE_FAILED;\nvar STATE_PASSED = Runnable.constants.STATE_PASSED;\nvar STATE_PENDING = Runnable.constants.STATE_PENDING;\nvar stackFilter = utils.stackTraceFilter();\nvar stringify = utils.stringify;\n\nconst {\n createInvalidExceptionError,\n createUnsupportedError,\n createFatalError,\n isMochaError,\n} = require(\"./errors.js\");\nconst { constants: errorConstants } = require(\"./error-constants.js\");\n\n/**\n * Non-enumerable globals.\n * @private\n * @readonly\n */\nvar globals = [\n \"setTimeout\",\n \"clearTimeout\",\n \"setInterval\",\n \"clearInterval\",\n \"XMLHttpRequest\",\n \"Date\",\n \"setImmediate\",\n \"clearImmediate\",\n];\n\nvar constants = utils.defineConstants(\n /**\n * {@link Runner}-related constants. Used by reporters. Each event emits the corresponding object, unless otherwise indicated.\n * @example\n * const Mocha = require('mocha');\n * const Base = Mocha.reporters.Base;\n * const {\n * EVENT_HOOK_BEGIN,\n * EVENT_TEST_PASS,\n * EVENT_TEST_FAIL,\n * EVENT_TEST_END\n * } = Mocha.Runner.constants\n *\n * function MyReporter(runner, options) {\n * Base.call(this, runner, options);\n *\n * runner.on(EVENT_HOOK_BEGIN, function(hook) {\n * console.log('hook called: ', hook.title);\n * });\n *\n * runner.on(EVENT_TEST_PASS, function(test) {\n * console.log('pass: %s', test.fullTitle());\n * });\n *\n * runner.on(EVENT_TEST_FAIL, function(test, err) {\n * console.log('fail: %s -- error: %s', test.fullTitle(), err.message);\n * });\n *\n * runner.on(EVENT_TEST_END, function() {\n * console.log('end: %d/%d', runner.stats.passes, runner.stats.tests);\n * });\n * }\n *\n * module.exports = MyReporter;\n *\n * @public\n * @memberof Runner\n * @readonly\n * @alias constants\n * @static\n * @enum {string}\n */\n {\n /**\n * Emitted when {@link Hook} execution begins\n */\n EVENT_HOOK_BEGIN: \"hook\",\n /**\n * Emitted when {@link Hook} execution ends\n */\n EVENT_HOOK_END: \"hook end\",\n /**\n * Emitted when Root {@link Suite} execution begins (all files have been parsed and hooks/tests are ready for execution)\n */\n EVENT_RUN_BEGIN: \"start\",\n /**\n * Emitted when Root {@link Suite} execution has been delayed via `delay` option\n */\n EVENT_DELAY_BEGIN: \"waiting\",\n /**\n * Emitted when delayed Root {@link Suite} execution is triggered by user via `global.run()`\n */\n EVENT_DELAY_END: \"ready\",\n /**\n * Emitted when Root {@link Suite} execution ends\n */\n EVENT_RUN_END: \"end\",\n /**\n * Emitted when {@link Suite} execution begins\n */\n EVENT_SUITE_BEGIN: \"suite\",\n /**\n * Emitted when {@link Suite} execution ends\n */\n EVENT_SUITE_END: \"suite end\",\n /**\n * Emitted when {@link Test} execution begins\n */\n EVENT_TEST_BEGIN: \"test\",\n /**\n * Emitted when {@link Test} execution ends\n */\n EVENT_TEST_END: \"test end\",\n /**\n * Emitted when {@link Test} execution fails. Includes an `err` object of type `Error`.\n * @example\n * runner.on(EVENT_TEST_FAIL, function(test, err) {\n * console.log('fail: %s -- error: %s', test.fullTitle(), err.message);\n * });\n *\n *\n */\n EVENT_TEST_FAIL: \"fail\",\n /**\n * Emitted when {@link Test} execution succeeds\n */\n EVENT_TEST_PASS: \"pass\",\n /**\n * Emitted when {@link Test} becomes pending\n */\n EVENT_TEST_PENDING: \"pending\",\n /**\n * Emitted when {@link Test} execution has failed, but will retry\n */\n EVENT_TEST_RETRY: \"retry\",\n /**\n * Initial state of Runner\n */\n STATE_IDLE: \"idle\",\n /**\n * State set to this value when the Runner has started running\n */\n STATE_RUNNING: \"running\",\n /**\n * State set to this value when the Runner has stopped\n */\n STATE_STOPPED: \"stopped\",\n },\n);\n\nclass Runner extends EventEmitter {\n /**\n * Initialize a `Runner` at the Root {@link Suite}, which represents a hierarchy of {@link Suite|Suites} and {@link Test|Tests}.\n *\n * @extends external:EventEmitter\n * @public\n * @class\n * @param {Suite} suite - Root suite\n * @param {Object} [opts] - Settings object\n * @param {boolean} [opts.cleanReferencesAfterRun] - Whether to clean references to test fns and hooks when a suite is done.\n * @param {boolean} [opts.delay] - Whether to delay execution of root suite until ready.\n * @param {boolean} [opts.dryRun] - Whether to report tests without running them.\n * @param {boolean} [opts.failZero] - Whether to fail test run if zero tests encountered.\n * @param {boolean} [opts.failHookAffectedTests] - Whether to fail all tests affected by hook failures.\n */\n constructor(suite, opts = {}) {\n super();\n\n var self = this;\n this._globals = [];\n this._abort = false;\n this.suite = suite;\n this._opts = opts;\n this.state = constants.STATE_IDLE;\n this.total = suite.total();\n this.failures = 0;\n /**\n * @type {Map>>}\n */\n this._eventListeners = new Map();\n this.on(constants.EVENT_TEST_END, function (test) {\n if (test.type === \"test\" && test.retriedTest() && test.parent) {\n var idx =\n test.parent.tests && test.parent.tests.indexOf(test.retriedTest());\n if (idx > -1) test.parent.tests[idx] = test;\n }\n self.checkGlobals(test);\n });\n this.on(constants.EVENT_HOOK_END, function (hook) {\n self.checkGlobals(hook);\n });\n this._defaultGrep = /.*/;\n this.grep(this._defaultGrep);\n this.globals(this.globalProps());\n\n this.uncaught = this._uncaught.bind(this);\n this.unhandled = (reason, promise) => {\n if (isMochaError(reason)) {\n debug(\n \"trapped unhandled rejection coming out of Mocha; forwarding to uncaught handler:\",\n reason,\n );\n this.uncaught(reason);\n } else {\n debug(\n \"trapped unhandled rejection from (probably) user code; re-emitting on process\",\n );\n this._removeEventListener(\n process,\n \"unhandledRejection\",\n this.unhandled,\n );\n try {\n process.emit(\"unhandledRejection\", reason, promise);\n } finally {\n this._addEventListener(process, \"unhandledRejection\", this.unhandled);\n }\n }\n };\n }\n}\n\n/**\n * Wrapper for setImmediate or browser polyfill.\n *\n * @param {Function} fn\n * @private\n */\nRunner.immediately = global.setImmediate;\n\n/**\n * Replacement for `target.on(eventName, listener)` that does bookkeeping to remove them when this runner instance is disposed.\n * @param {EventEmitter} target - The `EventEmitter`\n * @param {string} eventName - The event name\n * @param {string} fn - Listener function\n * @private\n */\nRunner.prototype._addEventListener = function (target, eventName, listener) {\n debug(\n \"_addEventListener(): adding for event %s; %d current listeners\",\n eventName,\n target.listenerCount(eventName),\n );\n /* istanbul ignore next */\n if (\n this._eventListeners.has(target) &&\n this._eventListeners.get(target).has(eventName) &&\n this._eventListeners.get(target).get(eventName).has(listener)\n ) {\n debug(\n \"warning: tried to attach duplicate event listener for %s\",\n eventName,\n );\n return;\n }\n target.on(eventName, listener);\n const targetListeners = this._eventListeners.has(target)\n ? this._eventListeners.get(target)\n : new Map();\n const targetEventListeners = targetListeners.has(eventName)\n ? targetListeners.get(eventName)\n : new Set();\n targetEventListeners.add(listener);\n targetListeners.set(eventName, targetEventListeners);\n this._eventListeners.set(target, targetListeners);\n};\n\n/**\n * Replacement for `target.removeListener(eventName, listener)` that also updates the bookkeeping.\n * @param {EventEmitter} target - The `EventEmitter`\n * @param {string} eventName - The event name\n * @param {function} listener - Listener function\n * @private\n */\nRunner.prototype._removeEventListener = function (target, eventName, listener) {\n target.removeListener(eventName, listener);\n\n if (this._eventListeners.has(target)) {\n const targetListeners = this._eventListeners.get(target);\n if (targetListeners.has(eventName)) {\n const targetEventListeners = targetListeners.get(eventName);\n targetEventListeners.delete(listener);\n if (!targetEventListeners.size) {\n targetListeners.delete(eventName);\n }\n }\n if (!targetListeners.size) {\n this._eventListeners.delete(target);\n }\n } else {\n debug(\"trying to remove listener for untracked object %s\", target);\n }\n};\n\n/**\n * Removes all event handlers set during a run on this instance.\n * Remark: this does _not_ clean/dispose the tests or suites themselves.\n */\nRunner.prototype.dispose = function () {\n this.removeAllListeners();\n this._eventListeners.forEach((targetListeners, target) => {\n targetListeners.forEach((targetEventListeners, eventName) => {\n targetEventListeners.forEach((listener) => {\n target.removeListener(eventName, listener);\n });\n });\n });\n this._eventListeners.clear();\n};\n\n/**\n * Run tests with full titles matching `re`. Updates runner.total\n * with number of tests matched.\n *\n * @public\n * @memberof Runner\n * @param {RegExp} re\n * @param {boolean} invert\n * @return {Runner} Runner instance.\n */\nRunner.prototype.grep = function (re, invert) {\n debug(\"grep(): setting to %s\", re);\n this._grep = re;\n this._invert = invert;\n this.total = this.grepTotal(this.suite);\n return this;\n};\n\n/**\n * Returns the number of tests matching the grep search for the\n * given suite.\n *\n * @memberof Runner\n * @public\n * @param {Suite} suite\n * @return {number}\n */\nRunner.prototype.grepTotal = function (suite) {\n var self = this;\n var total = 0;\n\n suite.eachTest(function (test) {\n var match = self._grep.test(test.fullTitle());\n if (self._invert) {\n match = !match;\n }\n if (match) {\n total++;\n }\n });\n\n return total;\n};\n\n/**\n * Return a list of global properties.\n *\n * @return {Array}\n * @private\n */\nRunner.prototype.globalProps = function () {\n var props = Object.keys(global);\n\n // non-enumerables\n for (var i = 0; i < globals.length; ++i) {\n if (~props.indexOf(globals[i])) {\n continue;\n }\n props.push(globals[i]);\n }\n\n return props;\n};\n\n/**\n * Allow the given `arr` of globals.\n *\n * @public\n * @memberof Runner\n * @param {Array} arr\n * @return {Runner} Runner instance.\n */\nRunner.prototype.globals = function (arr) {\n if (!arguments.length) {\n return this._globals;\n }\n debug(\"globals(): setting to %O\", arr);\n this._globals = this._globals.concat(arr);\n return this;\n};\n\n/**\n * Check for global variable leaks.\n *\n * @private\n */\nRunner.prototype.checkGlobals = function (test) {\n if (!this.checkLeaks) {\n return;\n }\n var ok = this._globals;\n\n var globals = this.globalProps();\n var leaks;\n\n if (test) {\n ok = ok.concat(test._allowedGlobals || []);\n }\n\n if (this.prevGlobalsLength === globals.length) {\n return;\n }\n this.prevGlobalsLength = globals.length;\n\n leaks = filterLeaks(ok, globals);\n this._globals = this._globals.concat(leaks);\n\n if (leaks.length) {\n var msg = `global leak(s) detected: ${leaks.map((e) => `'${e}'`).join(\", \")}`;\n this.fail(test, new Error(msg));\n }\n};\n\n/**\n * Create an error object for a test that was skipped due to a hook failure.\n *\n * @private\n * @param {string} hookTitle - The title of the failed hook\n * @param {*} hookError - The error from the failed hook (may not be an Error object)\n * @returns {Error} The error object for the skipped test\n */\nfunction createHookSkipError(hookTitle, hookError) {\n // Handle falsy or undefined exceptions\n if (!hookError) {\n hookError = createInvalidExceptionError(\n 'Hook \"' + hookTitle + '\" failed with exception: ' + hookError,\n hookError,\n );\n }\n // Convert non-Error objects to Error\n else if (!isError(hookError)) {\n hookError = thrown2Error(hookError);\n }\n\n var errorMessage =\n 'Test skipped due to failure in hook \"' +\n hookTitle +\n '\": ' +\n hookError.message;\n var testError = new Error(errorMessage);\n testError.stack = hookError.stack;\n return testError;\n}\n\n/**\n * Fail all tests that are affected by a hook failure.\n * This is used when the `failHookAffectedTests` option is enabled.\n *\n * @private\n * @param {Suite} suite - The suite containing the affected tests\n * @param {Error} hookError - The error from the failed hook\n * @param {string} hookTitle - The title of the failed hook\n */\nRunner.prototype.failAffectedTests = function (suite, hookError, hookTitle) {\n if (!this._opts.failHookAffectedTests) {\n return;\n }\n\n var self = this;\n var testError = createHookSkipError(hookTitle, hookError);\n\n // Recursively fail all tests in this suite and its child suites\n function failTestsInSuite(s) {\n s.tests.forEach(function (test) {\n // Only fail tests that haven't been executed yet\n if (!test.state) {\n test.state = STATE_FAILED;\n self.failures++;\n self.emit(constants.EVENT_TEST_BEGIN, test);\n self.emit(constants.EVENT_TEST_FAIL, test, testError);\n self.emit(constants.EVENT_TEST_END, test);\n }\n });\n\n s.suites.forEach(failTestsInSuite);\n }\n\n failTestsInSuite(suite);\n};\n\n/**\n * Fail the given `test`.\n *\n * If `test` is a hook, failures work in the following pattern:\n * - If bail, run corresponding `after each` and `after` hooks,\n * then exit\n * - Failed `before` hook skips all tests in a suite and subsuites,\n * but jumps to corresponding `after` hook\n * - Failed `before each` hook skips remaining tests in a\n * suite and jumps to corresponding `after each` hook,\n * which is run only once\n * - Failed `after` hook does not alter execution order\n * - Failed `after each` hook skips remaining tests in a\n * suite and subsuites, but executes other `after each`\n * hooks\n *\n * @private\n * @param {Runnable} test\n * @param {Error} err\n * @param {boolean} [force=false] - Whether to fail a pending test.\n */\nRunner.prototype.fail = function (test, err, force) {\n force = force === true;\n if (test.isPending() && !force) {\n return;\n }\n if (this.state === constants.STATE_STOPPED) {\n if (err.code === errorConstants.MULTIPLE_DONE) {\n throw err;\n }\n throw createFatalError(\n \"Test failed after root suite execution completed!\",\n err,\n );\n }\n\n ++this.failures;\n debug(\"total number of failures: %d\", this.failures);\n test.state = STATE_FAILED;\n\n if (!isError(err)) {\n err = thrown2Error(err);\n }\n\n // Filter the stack traces\n if (!this.fullStackTrace) {\n const alreadyFiltered = new Set();\n let currentErr = err;\n\n while (currentErr && currentErr.stack && !alreadyFiltered.has(currentErr)) {\n alreadyFiltered.add(currentErr);\n\n try {\n currentErr.stack = stackFilter(currentErr.stack);\n } catch {\n // Ignore error as some environments do not take kindly to monkeying with the stack\n }\n\n currentErr = currentErr.cause;\n }\n }\n\n this.emit(constants.EVENT_TEST_FAIL, test, err);\n};\n\n/**\n * Run hook `name` callbacks and then invoke `fn()`.\n *\n * @private\n * @param {string} name\n * @param {Function} fn\n */\n\nRunner.prototype.hook = function (name, fn) {\n if (this._opts.dryRun) return fn();\n\n var suite = this.suite;\n var hooks = suite.getHooks(name);\n var self = this;\n\n function next(i) {\n var hook = hooks[i];\n if (!hook) {\n return fn();\n }\n self.currentRunnable = hook;\n\n if (name === HOOK_TYPE_BEFORE_ALL) {\n hook.ctx.currentTest = hook.parent.tests[0];\n } else if (name === HOOK_TYPE_AFTER_ALL) {\n hook.ctx.currentTest = hook.parent.tests[hook.parent.tests.length - 1];\n } else {\n hook.ctx.currentTest = self.test;\n }\n\n setHookTitle(hook);\n\n hook.allowUncaught = self.allowUncaught;\n\n self.emit(constants.EVENT_HOOK_BEGIN, hook);\n\n if (!hook.listeners(\"error\").length) {\n self._addEventListener(hook, \"error\", function (err) {\n self.fail(hook, err);\n });\n }\n\n hook.run(function cbHookRun(err) {\n var testError = hook.error();\n if (testError) {\n self.fail(self.test, testError);\n }\n // conditional skip\n if (hook.pending) {\n if (name === HOOK_TYPE_AFTER_EACH) {\n // TODO define and implement use case\n if (self.test) {\n self.test.pending = true;\n }\n } else if (name === HOOK_TYPE_BEFORE_EACH) {\n if (self.test) {\n self.test.pending = true;\n }\n self.emit(constants.EVENT_HOOK_END, hook);\n hook.pending = false; // activates hook for next test\n return fn(new Error(\"abort hookDown\"));\n } else if (name === HOOK_TYPE_BEFORE_ALL) {\n suite.tests.forEach(function (test) {\n test.pending = true;\n });\n suite.suites.forEach(function (suite) {\n suite.pending = true;\n });\n hooks = [];\n } else {\n hook.pending = false;\n var errForbid = createUnsupportedError(\"`this.skip` forbidden\");\n self.fail(hook, errForbid);\n return fn(errForbid);\n }\n } else if (err) {\n self.fail(hook, err);\n // If failHookAffectedTests is enabled, mark affected tests as failed\n if (self._opts.failHookAffectedTests) {\n if (name === HOOK_TYPE_BEFORE_ALL) {\n self.failAffectedTests(self.suite, err, hook.title);\n } else if (name === HOOK_TYPE_BEFORE_EACH) {\n // Fail the current test\n if (self.test && !self.test.state) {\n var testError = createHookSkipError(hook.title, err);\n\n self.test.state = STATE_FAILED;\n self.failures++;\n self.emit(constants.EVENT_TEST_BEGIN, self.test);\n self.emit(constants.EVENT_TEST_FAIL, self.test, testError);\n self.emit(constants.EVENT_TEST_END, self.test);\n }\n // Store the hook error info for remaining tests\n self._failedBeforeEachHook = {\n error: err,\n title: hook.title,\n };\n }\n }\n // stop executing hooks, notify callee of hook err\n return fn(err);\n }\n self.emit(constants.EVENT_HOOK_END, hook);\n delete hook.ctx.currentTest;\n setHookTitle(hook);\n next(++i);\n });\n\n function setHookTitle(hook) {\n hook.originalTitle = hook.originalTitle || hook.title;\n if (hook.ctx && hook.ctx.currentTest) {\n hook.title = `${hook.originalTitle} for \"${hook.ctx.currentTest.title}\"`;\n } else {\n var parentTitle;\n if (hook.parent.title) {\n parentTitle = hook.parent.title;\n } else {\n parentTitle = hook.parent.root ? \"{root}\" : \"\";\n }\n hook.title = `${hook.originalTitle} in \"${parentTitle}\"`;\n }\n }\n }\n\n Runner.immediately(function () {\n next(0);\n });\n};\n\n/**\n * Run hook `name` for the given array of `suites`\n * in order, and callback `fn(err, errSuite)`.\n *\n * @private\n * @param {string} name\n * @param {Array} suites\n * @param {Function} fn\n */\nRunner.prototype.hooks = function (name, suites, fn) {\n var self = this;\n var orig = this.suite;\n\n function next(suite) {\n self.suite = suite;\n\n if (!suite) {\n self.suite = orig;\n return fn();\n }\n\n self.hook(name, function (err) {\n if (err) {\n var errSuite = self.suite;\n self.suite = orig;\n return fn(err, errSuite);\n }\n\n next(suites.pop());\n });\n }\n\n next(suites.pop());\n};\n\n/**\n * Run 'afterEach' hooks from bottom up.\n *\n * @param {String} name\n * @param {Function} fn\n * @private\n */\nRunner.prototype.hookUp = function (name, fn) {\n var suites = [this.suite].concat(this.parents()).reverse();\n this.hooks(name, suites, fn);\n};\n\n/**\n * Run 'beforeEach' hooks from top level down.\n *\n * @param {String} name\n * @param {Function} fn\n * @private\n */\nRunner.prototype.hookDown = function (name, fn) {\n var suites = [this.suite].concat(this.parents());\n this.hooks(name, suites, fn);\n};\n\n/**\n * Return an array of parent Suites from\n * closest to furthest.\n *\n * @return {Array}\n * @private\n */\nRunner.prototype.parents = function () {\n var suite = this.suite;\n var suites = [];\n while (suite.parent) {\n suite = suite.parent;\n suites.push(suite);\n }\n return suites;\n};\n\n/**\n * Run the current test and callback `fn(err)`.\n *\n * @param {Function} fn\n * @private\n */\nRunner.prototype.runTest = function (fn) {\n if (this._opts.dryRun) return Runner.immediately(fn);\n\n var self = this;\n var test = this.test;\n\n if (!test) {\n return;\n }\n\n if (this.asyncOnly) {\n test.asyncOnly = true;\n }\n this._addEventListener(test, \"error\", function (err) {\n self.fail(test, err);\n });\n if (this.allowUncaught) {\n test.allowUncaught = true;\n return test.run(fn);\n }\n try {\n test.run(fn);\n } catch (err) {\n fn(err);\n }\n};\n\n/**\n * Run tests in the given `suite` and invoke the callback `fn()` when complete.\n *\n * @private\n * @param {Suite} suite\n * @param {Function} fn\n */\nRunner.prototype.runTests = function (suite, fn) {\n var self = this;\n var tests = suite.tests.slice();\n var test;\n\n function hookErr(err, errSuite, after) {\n // before/after Each hook for errSuite failed:\n var orig = self.suite;\n\n // If failHookAffectedTests is enabled and this is a beforeEach failure,\n // mark remaining tests as failed\n if (\n self._opts.failHookAffectedTests &&\n !after &&\n self._failedBeforeEachHook\n ) {\n // Fail all remaining tests in the suite\n var remainingTests = tests.slice();\n remainingTests.forEach(function (t) {\n if (!t.state) {\n var testError = createHookSkipError(\n self._failedBeforeEachHook.title,\n self._failedBeforeEachHook.error,\n );\n\n t.state = STATE_FAILED;\n self.failures++;\n self.emit(constants.EVENT_TEST_BEGIN, t);\n self.emit(constants.EVENT_TEST_FAIL, t, testError);\n self.emit(constants.EVENT_TEST_END, t);\n }\n });\n // Clear the stored hook info\n delete self._failedBeforeEachHook;\n }\n\n // for failed 'after each' hook start from errSuite parent,\n // otherwise start from errSuite itself\n self.suite = after ? errSuite.parent : errSuite;\n\n if (self.suite) {\n self.hookUp(HOOK_TYPE_AFTER_EACH, function (err2, errSuite2) {\n self.suite = orig;\n // some hooks may fail even now\n if (err2) {\n return hookErr(err2, errSuite2, true);\n }\n // report error suite\n fn(errSuite);\n });\n } else {\n // there is no need calling other 'after each' hooks\n self.suite = orig;\n fn(errSuite);\n }\n }\n\n function next(err, errSuite) {\n // if we bail after first err\n if (self.failures && suite._bail) {\n tests = [];\n }\n\n if (self._abort) {\n return fn();\n }\n\n if (err) {\n return hookErr(err, errSuite, true);\n }\n\n // next test\n test = tests.shift();\n\n // all done\n if (!test) {\n return fn();\n }\n\n // grep\n var match = self._grep.test(test.fullTitle());\n if (self._invert) {\n match = !match;\n }\n if (!match) {\n // Run immediately only if we have defined a grep. When we\n // define a grep — It can cause maximum callstack error if\n // the grep is doing a large recursive loop by neglecting\n // all tests. The run immediately function also comes with\n // a performance cost. So we don't want to run immediately\n // if we run the whole test suite, because running the whole\n // test suite don't do any immediate recursive loops. Thus,\n // allowing a JS runtime to breathe.\n if (self._grep !== self._defaultGrep) {\n Runner.immediately(next);\n } else {\n next();\n }\n return;\n }\n\n // static skip, no hooks are executed\n if (test.isPending()) {\n if (self.forbidPending) {\n self.fail(test, new Error(\"Pending test forbidden\"), true);\n } else {\n test.state = STATE_PENDING;\n self.emit(constants.EVENT_TEST_PENDING, test);\n }\n self.emit(constants.EVENT_TEST_END, test);\n return next();\n }\n\n // execute test and hook(s)\n self.emit(constants.EVENT_TEST_BEGIN, (self.test = test));\n self.hookDown(HOOK_TYPE_BEFORE_EACH, function (err, errSuite) {\n // conditional skip within beforeEach\n if (test.isPending()) {\n if (self.forbidPending) {\n self.fail(test, new Error(\"Pending test forbidden\"), true);\n } else {\n test.state = STATE_PENDING;\n self.emit(constants.EVENT_TEST_PENDING, test);\n }\n self.emit(constants.EVENT_TEST_END, test);\n // skip inner afterEach hooks below errSuite level\n var origSuite = self.suite;\n self.suite = errSuite || self.suite;\n return self.hookUp(HOOK_TYPE_AFTER_EACH, function (e, eSuite) {\n self.suite = origSuite;\n next(e, eSuite);\n });\n }\n if (err) {\n return hookErr(err, errSuite, false);\n }\n self.currentRunnable = self.test;\n self.runTest(function (err) {\n test = self.test;\n // conditional skip within it\n if (test.pending) {\n if (self.forbidPending) {\n self.fail(test, new Error(\"Pending test forbidden\"), true);\n } else {\n test.state = STATE_PENDING;\n self.emit(constants.EVENT_TEST_PENDING, test);\n }\n self.emit(constants.EVENT_TEST_END, test);\n return self.hookUp(HOOK_TYPE_AFTER_EACH, next);\n } else if (err) {\n var retry = test.currentRetry();\n if (retry < test.retries()) {\n var clonedTest = test.clone();\n clonedTest.currentRetry(retry + 1);\n tests.unshift(clonedTest);\n\n self.emit(constants.EVENT_TEST_RETRY, test, err);\n\n // Early return + hook trigger so that it doesn't\n // increment the count wrong\n return self.hookUp(HOOK_TYPE_AFTER_EACH, next);\n } else {\n self.fail(test, err);\n }\n self.emit(constants.EVENT_TEST_END, test);\n return self.hookUp(HOOK_TYPE_AFTER_EACH, next);\n }\n\n test.state = STATE_PASSED;\n self.emit(constants.EVENT_TEST_PASS, test);\n self.emit(constants.EVENT_TEST_END, test);\n self.hookUp(HOOK_TYPE_AFTER_EACH, next);\n });\n });\n }\n\n this.next = next;\n this.hookErr = hookErr;\n next();\n};\n\n/**\n * Run the given `suite` and invoke the callback `fn()` when complete.\n *\n * @private\n * @param {Suite} suite\n * @param {Function} fn\n */\nRunner.prototype.runSuite = function (suite, fn) {\n var i = 0;\n var self = this;\n var total = this.grepTotal(suite);\n\n debug(\"runSuite(): running %s\", suite.fullTitle());\n\n if (!total || (self.failures && suite._bail)) {\n debug(\"runSuite(): bailing\");\n return fn();\n }\n\n this.emit(constants.EVENT_SUITE_BEGIN, (this.suite = suite));\n\n function next(errSuite) {\n if (errSuite) {\n // current suite failed on a hook from errSuite\n if (errSuite === suite) {\n // if errSuite is current suite\n // continue to the next sibling suite\n return done();\n }\n // errSuite is among the parents of current suite\n // stop execution of errSuite and all sub-suites\n return done(errSuite);\n }\n\n if (self._abort) {\n return done();\n }\n\n var curr = suite.suites[i++];\n if (!curr) {\n return done();\n }\n\n // Avoid grep neglecting large number of tests causing a\n // huge recursive loop and thus a maximum call stack error.\n // See comment in `this.runTests()` for more information.\n if (self._grep !== self._defaultGrep) {\n Runner.immediately(function () {\n self.runSuite(curr, next);\n });\n } else {\n self.runSuite(curr, next);\n }\n }\n\n function done(errSuite) {\n self.suite = suite;\n self.nextSuite = next;\n\n // remove reference to test\n delete self.test;\n\n self.hook(HOOK_TYPE_AFTER_ALL, function () {\n self.emit(constants.EVENT_SUITE_END, suite);\n fn(errSuite);\n });\n }\n\n this.nextSuite = next;\n\n this.hook(HOOK_TYPE_BEFORE_ALL, function (err) {\n if (err) {\n return done();\n }\n self.runTests(suite, next);\n });\n};\n\n/**\n * Handle uncaught exceptions within runner.\n *\n * This function is bound to the instance as `Runner#uncaught` at instantiation\n * time. It's intended to be listening on the `Process.uncaughtException` event.\n * In order to not leak EE listeners, we need to ensure no more than a single\n * `uncaughtException` listener exists per `Runner`. The only way to do\n * this--because this function needs the context (and we don't have lambdas)--is\n * to use `Function.prototype.bind`. We need strict equality to unregister and\n * _only_ unregister the _one_ listener we set from the\n * `Process.uncaughtException` event; would be poor form to just remove\n * everything. See {@link Runner#run} for where the event listener is registered\n * and unregistered.\n * @param {Error} err - Some uncaught error\n * @private\n */\nRunner.prototype._uncaught = function (err) {\n // this is defensive to prevent future developers from mis-calling this function.\n // it's more likely that it'd be called with the incorrect context--say, the global\n // `process` object--than it would to be called with a context that is not a \"subclass\"\n // of `Runner`.\n if (!(this instanceof Runner)) {\n throw createFatalError(\n \"Runner#uncaught() called with invalid context\",\n this,\n );\n }\n if (err instanceof PendingError) {\n debug(\"uncaught(): caught a PendingError\");\n return;\n }\n // browser does not exit script when throwing in global.onerror()\n if (this.allowUncaught && !utils.isBrowser()) {\n debug(\"uncaught(): bubbling exception due to --allow-uncaught\");\n throw err;\n }\n\n if (this.state === constants.STATE_STOPPED) {\n debug(\"uncaught(): throwing after run has completed!\");\n throw err;\n }\n\n if (err) {\n debug(\"uncaught(): got truthy exception %O\", err);\n } else {\n debug(\"uncaught(): undefined/falsy exception\");\n err = createInvalidExceptionError(\n \"Caught falsy/undefined exception which would otherwise be uncaught. No stack trace found; try a debugger\",\n err,\n );\n }\n\n if (!isError(err)) {\n err = thrown2Error(err);\n debug('uncaught(): converted \"error\" %o to Error', err);\n }\n err.uncaught = true;\n\n var runnable = this.currentRunnable;\n\n if (!runnable) {\n runnable = new Runnable(\"Uncaught error outside test suite\");\n debug(\"uncaught(): no current Runnable; created a phony one\");\n runnable.parent = this.suite;\n\n if (this.state === constants.STATE_RUNNING) {\n debug(\"uncaught(): failing gracefully\");\n this.fail(runnable, err);\n } else {\n // Can't recover from this failure\n debug(\"uncaught(): test run has not yet started; unrecoverable\");\n this.emit(constants.EVENT_RUN_BEGIN);\n this.fail(runnable, err);\n this.emit(constants.EVENT_RUN_END);\n }\n\n return;\n }\n\n runnable.clearTimeout();\n\n if (runnable.isFailed()) {\n debug(\"uncaught(): Runnable has already failed\");\n // Ignore error if already failed\n return;\n } else if (runnable.isPending()) {\n debug(\"uncaught(): pending Runnable wound up failing!\");\n // report 'pending test' retrospectively as failed\n this.fail(runnable, err, true);\n return;\n }\n\n // we cannot recover gracefully if a Runnable has already passed\n // then fails asynchronously\n if (runnable.isPassed()) {\n debug(\"uncaught(): Runnable has already passed; bailing gracefully\");\n this.fail(runnable, err);\n this.abort();\n } else {\n debug(\"uncaught(): forcing Runnable to complete with Error\");\n return runnable.callback(err);\n }\n};\n\n/**\n * Run the root suite and invoke `fn(failures)`\n * on completion.\n *\n * @public\n * @memberof Runner\n * @param {Function} fn - Callback when finished\n * @param {RunnerOptions} [opts] - For subclasses\n * @returns {Runner} Runner instance.\n */\nRunner.prototype.run = function (fn, opts = {}) {\n var rootSuite = this.suite;\n var options = opts.options || {};\n\n debug(\"run(): got options: %O\", options);\n fn = fn || function () {};\n\n const end = () => {\n if (!this.total && this._opts.failZero) this.failures = 1;\n\n debug(\"run(): root suite completed; emitting %s\", constants.EVENT_RUN_END);\n this.emit(constants.EVENT_RUN_END);\n };\n\n const begin = () => {\n debug(\"run(): emitting %s\", constants.EVENT_RUN_BEGIN);\n this.emit(constants.EVENT_RUN_BEGIN);\n debug(\"run(): emitted %s\", constants.EVENT_RUN_BEGIN);\n\n this.runSuite(rootSuite, end);\n };\n\n const prepare = () => {\n debug(\"run(): starting\");\n // If there is an `only` filter\n if (rootSuite.hasOnly()) {\n rootSuite.filterOnly();\n debug(\"run(): filtered exclusive Runnables\");\n }\n this.state = constants.STATE_RUNNING;\n if (this._opts.delay) {\n this.emit(constants.EVENT_DELAY_END);\n debug('run(): \"delay\" ended');\n }\n\n return begin();\n };\n\n // references cleanup to avoid memory leaks\n if (this._opts.cleanReferencesAfterRun) {\n this.on(constants.EVENT_SUITE_END, (suite) => {\n suite.cleanReferences();\n });\n }\n\n // callback\n this.on(constants.EVENT_RUN_END, function () {\n this.state = constants.STATE_STOPPED;\n debug(\"run(): emitted %s\", constants.EVENT_RUN_END);\n fn(this.failures);\n });\n\n this._removeEventListener(process, \"uncaughtException\", this.uncaught);\n this._removeEventListener(process, \"unhandledRejection\", this.unhandled);\n this._addEventListener(process, \"uncaughtException\", this.uncaught);\n this._addEventListener(process, \"unhandledRejection\", this.unhandled);\n\n if (this._opts.delay) {\n // for reporters, I guess.\n // might be nice to debounce some dots while we wait.\n this.emit(constants.EVENT_DELAY_BEGIN, rootSuite);\n rootSuite.once(EVENT_ROOT_SUITE_RUN, prepare);\n debug(\"run(): waiting for green light due to --delay\");\n } else {\n Runner.immediately(prepare);\n }\n\n return this;\n};\n\n/**\n * Toggle partial object linking behavior; used for building object references from\n * unique ID's. Does nothing in serial mode, because the object references already exist.\n * Subclasses can implement this (e.g., `ParallelBufferedRunner`)\n * @abstract\n * @param {boolean} [value] - If `true`, enable partial object linking, otherwise disable\n * @returns {Runner}\n * @chainable\n * @public\n * @example\n * // this reporter needs proper object references when run in parallel mode\n * class MyReporter {\n * constructor(runner) {\n * runner.linkPartialObjects(true)\n * .on(EVENT_SUITE_BEGIN, suite => {\n * // this Suite may be the same object...\n * })\n * .on(EVENT_TEST_BEGIN, test => {\n * // ...as the `test.parent` property\n * });\n * }\n * }\n */\nRunner.prototype.linkPartialObjects = function () {\n return this;\n};\n\n/*\n * Like {@link Runner#run}, but does not accept a callback and returns a `Promise` instead of a `Runner`.\n * This function cannot reject; an `unhandledRejection` event will bubble up to the `process` object instead.\n * @public\n * @memberof Runner\n * @param {Object} [opts] - Options for {@link Runner#run}\n * @returns {Promise} Failure count\n */\nRunner.prototype.runAsync = async function runAsync(opts = {}) {\n return new Promise((resolve) => {\n this.run(resolve, opts);\n });\n};\n\n/**\n * Cleanly abort execution.\n *\n * @memberof Runner\n * @public\n * @return {Runner} Runner instance.\n */\nRunner.prototype.abort = function () {\n debug(\"abort(): aborting\");\n this._abort = true;\n\n return this;\n};\n\n/**\n * Returns `true` if Mocha is running in parallel mode. For reporters.\n *\n * Subclasses should return an appropriate value.\n * @public\n * @returns {false}\n */\nRunner.prototype.isParallelMode = function isParallelMode() {\n return false;\n};\n\n/**\n * Configures an alternate reporter for worker processes to use. Subclasses\n * using worker processes should implement this.\n * @public\n * @param {string} path - Absolute path to alternate reporter for worker processes to use\n * @returns {Runner}\n * @throws When in serial mode\n * @chainable\n * @abstract\n */\nRunner.prototype.workerReporter = function () {\n throw createUnsupportedError(\"workerReporter() not supported in serial mode\");\n};\n\n/**\n * Filter leaks with the given globals flagged as `ok`.\n *\n * @private\n * @param {Array} ok\n * @param {Array} globals\n * @return {Array}\n */\nfunction filterLeaks(ok, globals) {\n return globals.filter(function (key) {\n // Firefox and Chrome exposes iframes as index inside the window object\n if (/^\\d+/.test(key)) {\n return false;\n }\n\n // in firefox\n // if runner runs in an iframe, this iframe's window.getInterface method\n // not init at first it is assigned in some seconds\n if (global.navigator && /^getInterface/.test(key)) {\n return false;\n }\n\n // an iframe could be approached by window[iframeIndex]\n // in ie6,7,8 and opera, iframeIndex is enumerable, this could cause leak\n if (global.navigator && /^\\d+/.test(key)) {\n return false;\n }\n\n // Opera and IE expose global variables for HTML element IDs (issue #243)\n if (/^mocha-/.test(key)) {\n return false;\n }\n\n var matched = ok.filter(function (ok) {\n if (~ok.indexOf(\"*\")) {\n return key.indexOf(ok.split(\"*\")[0]) === 0;\n }\n return key === ok;\n });\n return !matched.length && (!global.navigator || key !== \"onerror\");\n });\n}\n\n/**\n * Check if argument is an instance of Error object or a duck-typed equivalent.\n *\n * @private\n * @param {Object} err - object to check\n * @param {string} err.message - error message\n * @returns {boolean}\n */\nfunction isError(err) {\n return err instanceof Error || (err && typeof err.message === \"string\");\n}\n\n/**\n *\n * Converts thrown non-extensible type into proper Error.\n *\n * @private\n * @param {*} thrown - Non-extensible type thrown by code\n * @return {Error}\n */\nfunction thrown2Error(err) {\n return new Error(\n `the ${utils.canonicalType(err)} ${stringify(\n err,\n )} was thrown, throw an Error :)`,\n );\n}\n\nRunner.constants = constants;\n\n/**\n * Node.js' `EventEmitter`\n * @external EventEmitter\n * @see {@link https://nodejs.org/api/events.html#events_class_eventemitter}\n */\n\nmodule.exports = Runner;\n","/**\n * @typedef {import('../runner.cjs')} Runner\n * @typedef {import('../test.js')} Test\n * @typedef {import('../types.d.ts').FullErrorStack} FullErrorStack\n */\n\n/**\n * @module Base\n */\n/**\n * Module dependencies.\n */\n\nimport * as diff from \"diff\";\nimport milliseconds from \"ms\";\nimport utils from \"../utils.cjs\";\nimport supportsColor from \"supports-color\";\nimport Runner from \"../runner.cjs\";\n\nconst { constants } = Runner;\nvar EVENT_TEST_PASS = constants.EVENT_TEST_PASS;\nvar EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL;\n\nconst isBrowser = utils.isBrowser();\n\nfunction getBrowserWindowSize() {\n if (\"innerHeight\" in global) {\n return [global.innerHeight, global.innerWidth];\n }\n // In a Web Worker, the DOM Window is not available.\n return [640, 480];\n}\n\n/**\n * Check if both stdio streams are associated with a tty.\n */\n\nvar isatty = isBrowser || (process.stdout.isTTY && process.stderr.isTTY);\n\n/**\n * Save log references to avoid tests interfering (see GH-3604).\n */\nvar consoleLog = console.log;\n\n/**\n * @abstract\n * @description\n * All other reporters generally inherit from this reporter.\n */\nexport class Base {\n /**\n * Constructs a new `Base` reporter instance.\n *\n * @public\n * @memberof Mocha.reporters\n * @param {Runner} runner - Instance triggers reporter actions.\n * @param {Object} [options] - runner options\n */\n constructor(runner, options) {\n var failures = (this.failures = []);\n\n if (!runner) {\n throw new TypeError(\"Missing runner argument\");\n }\n this.options = options || {};\n this.runner = runner;\n this.stats = runner.stats; // assigned so Reporters keep a closer reference\n\n var maxDiffSizeOpt =\n this.options.reporterOption && this.options.reporterOption.maxDiffSize;\n if (maxDiffSizeOpt !== undefined && !isNaN(Number(maxDiffSizeOpt))) {\n Base.maxDiffSize = Number(maxDiffSizeOpt);\n }\n\n runner.on(EVENT_TEST_PASS, function (test) {\n if (test.duration > test.slow()) {\n test.speed = \"slow\";\n } else if (test.duration > test.slow() / 2) {\n test.speed = \"medium\";\n } else {\n test.speed = \"fast\";\n }\n });\n\n runner.on(EVENT_TEST_FAIL, function (test, err) {\n if (Base.showDiff(err)) {\n stringifyDiffObjs(err);\n }\n // more than one error per test\n if (test.err && err instanceof Error) {\n test.err.multiple = (test.err.multiple || []).concat(err);\n } else {\n test.err = err;\n }\n failures.push(test);\n });\n }\n\n /**\n * Outputs common epilogue used by many of the bundled reporters.\n *\n * @public\n * @memberof Mocha.reporters\n */\n epilogue() {\n var stats = this.stats;\n var fmt;\n\n Base.consoleLog();\n\n // passes\n fmt =\n Base.color(\"bright pass\", \" \") +\n Base.color(\"green\", \" %d passing\") +\n Base.color(\"light\", \" (%s)\");\n\n Base.consoleLog(fmt, stats.passes || 0, milliseconds(stats.duration));\n\n // pending\n if (stats.pending) {\n fmt = Base.color(\"pending\", \" \") + Base.color(\"pending\", \" %d pending\");\n\n Base.consoleLog(fmt, stats.pending);\n }\n\n // failures\n if (stats.failures) {\n fmt = Base.color(\"fail\", \" %d failing\");\n\n Base.consoleLog(fmt, stats.failures);\n\n Base.list(this.failures);\n Base.consoleLog();\n }\n\n Base.consoleLog();\n }\n}\n\nBase.consoleLog = consoleLog;\n\nBase.abstract = true;\n\n/**\n * Enable coloring by default, except in the browser interface.\n */\nBase.useColors =\n !isBrowser &&\n (supportsColor.stdout || process.env.MOCHA_COLORS !== undefined);\n\n/**\n * Inline diffs instead of +/-\n */\n\nBase.inlineDiffs = false;\n\n/**\n * Truncate diffs longer than this value to avoid slow performance\n */\nBase.maxDiffSize = 8192;\n\n/**\n * Default color map.\n */\n\nBase.colors = {\n pass: 90,\n fail: 31,\n \"bright pass\": 92,\n \"bright fail\": 91,\n \"bright yellow\": 93,\n pending: 36,\n suite: 0,\n \"error title\": 0,\n \"error message\": 31,\n \"error stack\": 90,\n checkmark: 32,\n fast: 90,\n medium: 33,\n slow: 31,\n green: 32,\n light: 90,\n \"diff gutter\": 90,\n \"diff added\": 32,\n \"diff removed\": 31,\n \"diff added inline\": \"30;42\",\n \"diff removed inline\": \"30;41\",\n};\n\n/**\n * Default symbol map.\n */\n\nBase.symbols = {\n ok: utils.logSymbols.success,\n err: utils.logSymbols.error,\n dot: \".\",\n comma: \",\",\n bang: \"!\",\n};\n\n/**\n * Color `str` with the given `type`,\n * allowing colors to be disabled,\n * as well as user-defined color\n * schemes.\n *\n * @private\n * @param {string} type\n * @param {string} str\n * @return {string}\n */\nBase.color = function (type, str) {\n if (!Base.useColors) {\n return String(str);\n }\n return \"\\u001b[\" + Base.colors[type] + \"m\" + str + \"\\u001b[0m\";\n};\n\n/**\n * Expose term window size, with some defaults for when stderr is not a tty.\n */\n\nBase.window = {\n width: 75,\n};\n\nif (isatty) {\n if (isBrowser) {\n Base.window.width = getBrowserWindowSize()[1];\n } else {\n Base.window.width = process.stdout.getWindowSize(1)[0];\n }\n}\n\n/**\n * Expose some basic cursor interactions that are common among reporters.\n */\n\nBase.cursor = {\n hide: function () {\n isatty && process.stdout.write(\"\\u001b[?25l\");\n },\n\n show: function () {\n isatty && process.stdout.write(\"\\u001b[?25h\");\n },\n\n deleteLine: function () {\n isatty && process.stdout.write(\"\\u001b[2K\");\n },\n\n beginningOfLine: function () {\n isatty && process.stdout.write(\"\\u001b[0G\");\n },\n\n CR: function () {\n if (isatty) {\n Base.cursor.deleteLine();\n Base.cursor.beginningOfLine();\n } else {\n process.stdout.write(\"\\r\");\n }\n },\n};\n\nBase.showDiff = function (err) {\n return (\n err &&\n err.showDiff !== false &&\n sameType(err.actual, err.expected) &&\n err.expected !== undefined\n );\n};\n\n/**\n * Estimate the serialized size of a value.\n * Returns -1 if the value is too complex to estimate safely.\n *\n * @private\n * @param {*} val\n * @param {number} maxDepth\n * @param {Set<*>} [seen]\n * @returns {number}\n */\nfunction estimateSize(val, maxDepth, seen) {\n if (maxDepth <= 0) return -1;\n\n seen = seen || new Set();\n\n const type = typeof val;\n if (type === \"string\") return val.length;\n if (type === \"number\" || type === \"boolean\") return 8;\n if (val === null || val === undefined) return 4;\n\n // Avoid circular references\n if (type === \"object\") {\n if (seen.has(val)) return -1;\n seen.add(val);\n\n // Special handling for Buffers - they can be massive\n if (typeof Buffer !== \"undefined\" && Buffer.isBuffer(val)) {\n return val.length > 10000 ? -1 : val.length * 2;\n }\n\n let size = 2; // {} or []\n try {\n const keys = Object.keys(val);\n if (keys.length > 1000) return -1; // Too many keys\n\n for (const key of keys) {\n const childSize = estimateSize(val[key], maxDepth - 1, seen);\n if (childSize === -1) return -1;\n size += key.length + childSize + 4; // key + value + formatting\n if (size > 100000) return -1; // Bail early if getting huge\n }\n } catch {\n return -1;\n }\n\n seen.delete(val);\n return size;\n }\n\n return 50; // Default estimate for other types\n}\n\nfunction stringifyDiffObjs(err) {\n if (!utils.isString(err.actual) || !utils.isString(err.expected)) {\n // Estimate size before stringifying to avoid hangs\n const maxSafeSize = Base.maxDiffSize || 8192;\n const actualSize = estimateSize(err.actual, 10);\n const expectedSize = estimateSize(err.expected, 10);\n\n if (\n actualSize === -1 ||\n expectedSize === -1 ||\n actualSize > maxSafeSize ||\n expectedSize > maxSafeSize\n ) {\n // Values too large/complex - provide safe fallback\n err.actual = \"[object too large to diff]\";\n err.expected = \"[object too large to diff]\";\n return;\n }\n\n err.actual = utils.stringify(err.actual);\n err.expected = utils.stringify(err.expected);\n }\n}\n\n/**\n * Returns a diff between 2 strings with coloured ANSI output.\n *\n * @description\n * The diff will be either inline or unified dependent on the value\n * of `Base.inlineDiff`.\n *\n * @param {string} actual\n * @param {string} expected\n * @return {string} Diff\n */\n\nBase.generateDiff = function (actual, expected) {\n try {\n var maxLen = Base.maxDiffSize;\n var skipped = 0;\n if (maxLen > 0) {\n skipped = Math.max(actual.length - maxLen, expected.length - maxLen);\n actual = actual.slice(0, maxLen);\n expected = expected.slice(0, maxLen);\n }\n let result = Base.inlineDiffs\n ? inlineDiff(actual, expected)\n : unifiedDiff(actual, expected);\n if (skipped > 0) {\n result = `${result}\\n [mocha] output truncated to ${maxLen} characters, see \"maxDiffSize\" reporter-option\\n`;\n }\n return result;\n } catch {\n var msg =\n \"\\n \" +\n Base.color(\"diff added\", \"+ expected\") +\n \" \" +\n Base.color(\"diff removed\", \"- actual: failed to generate Mocha diff\") +\n \"\\n\";\n return msg;\n }\n};\n\n/**\n * Traverses err.cause and returns all stack traces\n *\n * @private\n * @param {Error} err\n * @param {Set} [seen]\n * @return {FullErrorStack}\n */\nvar getFullErrorStack = function (err, seen) {\n if (seen && seen.has(err)) {\n return { message: \"\", msg: \"\", stack: \"\" };\n }\n\n var message;\n\n if (typeof err.inspect === \"function\") {\n message = err.inspect() + \"\";\n } else if (err.message && typeof err.message.toString === \"function\") {\n message = err.message + \"\";\n } else {\n message = \"\";\n }\n\n var msg;\n var stack = err.stack || message;\n var index = message ? stack.indexOf(message) : -1;\n\n if (index === -1) {\n msg = message;\n } else {\n index += message.length;\n msg = stack.slice(0, index);\n // remove msg from stack\n stack = stack.slice(index + 1);\n\n if (err.cause) {\n seen = seen || new Set();\n seen.add(err);\n const causeStack = getFullErrorStack(err.cause, seen);\n stack +=\n \"\\n Caused by: \" +\n causeStack.msg +\n (causeStack.stack ? \"\\n\" + causeStack.stack : \"\");\n }\n }\n\n return {\n message,\n msg,\n stack,\n };\n};\n\n/**\n * Outputs the given `failures` as a list.\n *\n * @public\n * @memberof Mocha.reporters.Base\n * @variation 1\n * @param {Object[]} failures - Each is Test instance with corresponding\n * Error property\n */\nBase.list = function (failures) {\n var multipleErr, multipleTest;\n Base.consoleLog();\n failures.forEach(function (test, i) {\n // format\n var fmt =\n Base.color(\"error title\", \" %s) %s:\\n\") +\n Base.color(\"error message\", \" %s\") +\n Base.color(\"error stack\", \"\\n%s\\n\");\n\n // msg\n var err;\n if (test.err && test.err.multiple) {\n if (multipleTest !== test) {\n multipleTest = test;\n multipleErr = [test.err].concat(test.err.multiple);\n }\n err = multipleErr.shift();\n } else {\n err = test.err;\n }\n\n var { message, msg, stack } = getFullErrorStack(err);\n\n // uncaught\n if (err.uncaught) {\n msg = \"Uncaught \" + msg;\n }\n // explicitly show diff\n if (!Base.hideDiff && Base.showDiff(err)) {\n stringifyDiffObjs(err);\n fmt =\n Base.color(\"error title\", \" %s) %s:\\n%s\") +\n Base.color(\"error stack\", \"\\n%s\\n\");\n var match = message.match(/^([^:]+): expected/);\n msg = \"\\n \" + Base.color(\"error message\", match ? match[1] : msg);\n\n msg += Base.generateDiff(err.actual, err.expected);\n }\n\n // indent stack trace\n stack = stack.replace(/^/gm, \" \");\n\n // indented test title\n var testTitle = \"\";\n test.titlePath().forEach(function (str, index) {\n if (index !== 0) {\n testTitle += \"\\n \";\n }\n for (var i = 0; i < index; i++) {\n testTitle += \" \";\n }\n testTitle += str;\n });\n\n Base.consoleLog(fmt, i + 1, testTitle, msg, stack);\n });\n};\n\n/**\n * Pads the given `str` to `len`.\n *\n * @private\n * @param {string} str\n * @param {string} len\n * @return {string}\n */\nfunction pad(str, len) {\n str = String(str);\n return Array(len - str.length + 1).join(\" \") + str;\n}\n\n/**\n * Returns inline diff between 2 strings with coloured ANSI output.\n *\n * @private\n * @param {String} actual\n * @param {String} expected\n * @return {string} Diff\n */\nfunction inlineDiff(actual, expected) {\n var msg = errorDiff(actual, expected);\n\n // linenos\n var lines = msg.split(\"\\n\");\n if (lines.length > 4) {\n var width = String(lines.length).length;\n msg = lines\n .map(function (str, i) {\n return pad(i + 1, width) + \" |\" + \" \" + str;\n })\n .join(\"\\n\");\n }\n\n // legend\n msg =\n \"\\n\" +\n Base.color(\"diff removed inline\", \"actual\") +\n \" \" +\n Base.color(\"diff added inline\", \"expected\") +\n \"\\n\\n\" +\n msg +\n \"\\n\";\n\n // indent\n msg = msg.replace(/^/gm, \" \");\n return msg;\n}\n\n/**\n * Returns unified diff between two strings with coloured ANSI output.\n *\n * @private\n * @param {String} actual\n * @param {String} expected\n * @return {string} The diff.\n */\nfunction unifiedDiff(actual, expected) {\n var indent = \" \";\n function cleanUp(line) {\n if (line[0] === \"+\") {\n return indent + colorLines(\"diff added\", line);\n }\n if (line[0] === \"-\") {\n return indent + colorLines(\"diff removed\", line);\n }\n if (line.match(/@@/)) {\n return \"--\";\n }\n if (line.match(/\\\\ No newline/)) {\n return null;\n }\n return indent + line;\n }\n function notBlank(line) {\n return typeof line !== \"undefined\" && line !== null;\n }\n var msg = diff.createPatch(\"string\", actual, expected);\n var lines = msg.split(\"\\n\").splice(5);\n return (\n \"\\n \" +\n colorLines(\"diff added\", \"+ expected\") +\n \" \" +\n colorLines(\"diff removed\", \"- actual\") +\n \"\\n\\n\" +\n lines.map(cleanUp).filter(notBlank).join(\"\\n\")\n );\n}\n\n/**\n * Returns character diff for `err`.\n *\n * @private\n * @param {String} actual\n * @param {String} expected\n * @return {string} the diff\n */\nfunction errorDiff(actual, expected) {\n return diff\n .diffWordsWithSpace(actual, expected)\n .map(function (str) {\n if (str.added) {\n return colorLines(\"diff added inline\", str.value);\n }\n if (str.removed) {\n return colorLines(\"diff removed inline\", str.value);\n }\n return str.value;\n })\n .join(\"\");\n}\n\n/**\n * Colors lines for `str`, using the color `name`.\n *\n * @private\n * @param {string} name\n * @param {string} str\n * @return {string}\n */\nfunction colorLines(name, str) {\n return str\n .split(\"\\n\")\n .map(function (str) {\n return Base.color(name, str);\n })\n .join(\"\\n\");\n}\n\n/**\n * Object#toString reference.\n */\nvar objToString = Object.prototype.toString;\n\n/**\n * Checks that a / b have the same type.\n *\n * @private\n * @param {Object} a\n * @param {Object} b\n * @return {boolean}\n */\nfunction sameType(a, b) {\n return objToString.call(a) === objToString.call(b);\n}\n","/**\n * @typedef {import('../runner.cjs')} Runner\n */\n\n/**\n * @module Dot\n */\n/**\n * Module dependencies.\n */\n\nimport { Base } from \"./base.js\";\nimport Runner from \"../runner.cjs\";\n\nvar { constants } = Runner;\nvar EVENT_TEST_PASS = constants.EVENT_TEST_PASS;\nvar EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL;\nvar EVENT_RUN_BEGIN = constants.EVENT_RUN_BEGIN;\nvar EVENT_TEST_PENDING = constants.EVENT_TEST_PENDING;\nvar EVENT_RUN_END = constants.EVENT_RUN_END;\n\nclass Dot extends Base {\n static description = \"dot matrix representation\";\n\n /**\n * Constructs a new `Dot` reporter instance.\n *\n * @public\n * @memberof Mocha.reporters\n * @extends Mocha.reporters.Base\n * @param {Runner} runner - Instance triggers reporter actions.\n * @param {Object} [options] - runner options\n */\n constructor(runner, options) {\n super(runner, options);\n\n var self = this;\n var width = (Base.window.width * 0.75) | 0;\n var n = -1;\n\n runner.on(EVENT_RUN_BEGIN, function () {\n process.stdout.write(\"\\n\");\n });\n\n runner.on(EVENT_TEST_PENDING, function () {\n if (++n % width === 0) {\n process.stdout.write(\"\\n \");\n }\n process.stdout.write(Base.color(\"pending\", Base.symbols.comma));\n });\n\n runner.on(EVENT_TEST_PASS, function (test) {\n if (++n % width === 0) {\n process.stdout.write(\"\\n \");\n }\n if (test.speed === \"slow\") {\n process.stdout.write(Base.color(\"bright yellow\", Base.symbols.dot));\n } else {\n process.stdout.write(Base.color(test.speed, Base.symbols.dot));\n }\n });\n\n runner.on(EVENT_TEST_FAIL, function () {\n if (++n % width === 0) {\n process.stdout.write(\"\\n \");\n }\n process.stdout.write(Base.color(\"fail\", Base.symbols.bang));\n });\n\n runner.once(EVENT_RUN_END, function () {\n process.stdout.write(\"\\n\");\n self.epilogue();\n });\n }\n}\n\nexport { Dot };\n","/**\n * @typedef {import('../runner.cjs')} Runner\n */\n\n/**\n * @module Doc\n */\n/**\n * Module dependencies.\n */\n\nimport { Base } from \"./base.js\";\nimport utils from \"../utils.cjs\";\nimport Runner from \"../runner.cjs\";\nvar constants = Runner.constants;\nvar EVENT_TEST_PASS = constants.EVENT_TEST_PASS;\nvar EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL;\nvar EVENT_SUITE_BEGIN = constants.EVENT_SUITE_BEGIN;\nvar EVENT_SUITE_END = constants.EVENT_SUITE_END;\n\nclass Doc extends Base {\n static description = \"HTML documentation\";\n\n /**\n * Constructs a new `Doc` reporter instance.\n *\n * @public\n * @memberof Mocha.reporters\n * @extends Mocha.reporters.Base\n * @param {Runner} runner - Instance triggers reporter actions.\n * @param {Object} [options] - runner options\n */\n constructor(runner, options) {\n super(runner, options);\n\n var indents = 2;\n\n function indent() {\n return Array(indents).join(\" \");\n }\n\n runner.on(EVENT_SUITE_BEGIN, function (suite) {\n if (suite.root) {\n return;\n }\n ++indents;\n Base.consoleLog('%s
            ', indent());\n ++indents;\n Base.consoleLog(\"%s

            %s

            \", indent(), utils.escape(suite.title));\n Base.consoleLog(\"%s
            \", indent());\n });\n\n runner.on(EVENT_SUITE_END, function (suite) {\n if (suite.root) {\n return;\n }\n Base.consoleLog(\"%s
            \", indent());\n --indents;\n Base.consoleLog(\"%s
            \", indent());\n --indents;\n });\n\n runner.on(EVENT_TEST_PASS, function (test) {\n Base.consoleLog(\"%s
            %s
            \", indent(), utils.escape(test.title));\n Base.consoleLog(\"%s
            %s
            \", indent(), utils.escape(test.file));\n var code = utils.escape(utils.clean(test.body));\n Base.consoleLog(\n \"%s
            %s
            \",\n indent(),\n code,\n );\n });\n\n runner.on(EVENT_TEST_FAIL, function (test, err) {\n Base.consoleLog(\n '%s
            %s
            ',\n indent(),\n utils.escape(test.title),\n );\n Base.consoleLog(\n '%s
            %s
            ',\n indent(),\n utils.escape(test.file),\n );\n var code = utils.escape(utils.clean(test.body));\n Base.consoleLog(\n '%s
            %s
            ',\n indent(),\n code,\n );\n Base.consoleLog(\n '%s
            %s
            ',\n indent(),\n utils.escape(err),\n );\n });\n }\n}\n\nexport { Doc };\n","/**\n * @typedef {import('../runner.cjs')} Runner\n * @typedef {import('../test.js')} Test\n */\n\n/**\n * @module TAP\n */\n/**\n * Module dependencies.\n */\n\nimport util from \"node:util\";\nimport { Base } from \"./base.js\";\nimport Runner from \"../runner.cjs\";\nvar constants = Runner.constants;\nvar EVENT_TEST_PASS = constants.EVENT_TEST_PASS;\nvar EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL;\nvar EVENT_RUN_BEGIN = constants.EVENT_RUN_BEGIN;\nvar EVENT_RUN_END = constants.EVENT_RUN_END;\nvar EVENT_TEST_PENDING = constants.EVENT_TEST_PENDING;\nvar EVENT_TEST_END = constants.EVENT_TEST_END;\nvar sprintf = util.format;\n\nclass TAP extends Base {\n static description = \"TAP-compatible output\";\n\n /**\n * Constructs a new `TAP` reporter instance.\n *\n * @public\n * @memberof Mocha.reporters\n * @extends Mocha.reporters.Base\n * @param {Runner} runner - Instance triggers reporter actions.\n * @param {Object} [options] - runner options\n */\n constructor(runner, options) {\n super(runner, options);\n\n var self = this;\n var n = 1;\n\n var tapVersion = \"12\";\n if (options && options.reporterOptions) {\n if (options.reporterOptions.tapVersion) {\n tapVersion = options.reporterOptions.tapVersion.toString();\n }\n }\n\n this._producer = createProducer(tapVersion);\n\n runner.once(EVENT_RUN_BEGIN, function () {\n self._producer.writeVersion();\n });\n\n runner.on(EVENT_TEST_END, function () {\n ++n;\n });\n\n runner.on(EVENT_TEST_PENDING, function (test) {\n self._producer.writePending(n, test);\n });\n\n runner.on(EVENT_TEST_PASS, function (test) {\n self._producer.writePass(n, test);\n });\n\n runner.on(EVENT_TEST_FAIL, function (test, err) {\n self._producer.writeFail(n, test, err);\n });\n\n runner.once(EVENT_RUN_END, function () {\n self._producer.writeEpilogue(runner.stats);\n });\n }\n}\n\n/**\n * Returns a TAP-safe title of `test`.\n *\n * @private\n * @param {Test} test - Test instance.\n * @return {String} title with any hash character removed\n */\nfunction title(test) {\n return test.fullTitle().replace(/#/g, \"\");\n}\n\n/**\n * Writes newline-terminated formatted string to reporter output stream.\n *\n * @private\n * @param {string} format - `printf`-like format string\n * @param {...*} [varArgs] - Format string arguments\n */\nfunction println() {\n var vargs = Array.from(arguments);\n vargs[0] += \"\\n\";\n process.stdout.write(sprintf.apply(null, vargs));\n}\n\n/**\n * Returns a `tapVersion`-appropriate TAP producer instance, if possible.\n *\n * @private\n * @param {string} tapVersion - Version of TAP specification to produce.\n * @returns {TAPProducer} specification-appropriate instance\n * @throws {Error} if specification version has no associated producer.\n */\nfunction createProducer(tapVersion) {\n var producers = {\n 12: new TAP12Producer(),\n 13: new TAP13Producer(),\n };\n var producer = producers[tapVersion];\n\n if (!producer) {\n throw new Error(\n \"invalid or unsupported TAP version: \" + JSON.stringify(tapVersion),\n );\n }\n\n return producer;\n}\n\n/**\n * @summary\n * Constructs a new TAPProducer.\n *\n * @description\n * Only to be used as an abstract base class.\n *\n * @private\n * @constructor\n */\nclass TAPProducer {\n /**\n * Writes the TAP version to reporter output stream.\n *\n * @abstract\n */\n writeVersion() {}\n\n /**\n * Writes the plan to reporter output stream.\n *\n * @abstract\n * @param {number} ntests - Number of tests that are planned to run.\n */\n writePlan(ntests) {\n println(\"%d..%d\", 1, ntests);\n }\n\n /**\n * Writes that test passed to reporter output stream.\n *\n * @abstract\n * @param {number} n - Index of test that passed.\n * @param {Test} test - Instance containing test information.\n */\n writePass(n, test) {\n println(\"ok %d %s\", n, title(test));\n }\n\n /**\n * Writes that test was skipped to reporter output stream.\n *\n * @abstract\n * @param {number} n - Index of test that was skipped.\n * @param {Test} test - Instance containing test information.\n */\n writePending(n, test) {\n println(\"ok %d %s # SKIP -\", n, title(test));\n }\n\n /**\n * Writes that test failed to reporter output stream.\n *\n * @abstract\n * @param {number} n - Index of test that failed.\n * @param {Test} test - Instance containing test information.\n */\n writeFail(n, test) {\n println(\"not ok %d %s\", n, title(test));\n }\n\n /**\n * Writes the summary epilogue to reporter output stream.\n *\n * @abstract\n * @param {Object} stats - Object containing run statistics.\n */\n writeEpilogue(stats) {\n // :TBD: Why is this not counting pending tests?\n println(\"# tests \" + (stats.passes + stats.failures));\n println(\"# pass \" + stats.passes);\n // :TBD: Why are we not showing pending results?\n println(\"# fail \" + stats.failures);\n this.writePlan(stats.passes + stats.failures + stats.pending);\n }\n}\n\n/**\n * @description\n * Produces output conforming to the TAP12 specification.\n *\n * @private\n * @constructor\n * @extends TAPProducer\n * @see {@link https://testanything.org/tap-specification.html|Specification}\n */\nclass TAP12Producer extends TAPProducer {\n /**\n * Writes that test failed to reporter output stream, with error formatting.\n * @override\n */\n writeFail(n, test, err) {\n super.writeFail(n, test, err);\n if (err.message) {\n println(err.message.replace(/^/gm, \" \"));\n }\n if (err.stack) {\n println(err.stack.replace(/^/gm, \" \"));\n }\n }\n}\n\n/**\n * @summary\n * Constructs a new TAP13Producer.\n *\n * @description\n * Produces output conforming to the TAP13 specification.\n *\n * @private\n * @constructor\n * @extends TAPProducer\n * @see {@link https://testanything.org/tap-version-13-specification.html|Specification}\n */\nclass TAP13Producer extends TAPProducer {\n /**\n * Writes the TAP version to reporter output stream.\n * @override\n */\n writeVersion() {\n println(\"TAP version 13\");\n }\n\n /**\n * Writes that test failed to reporter output stream, with error formatting.\n * @override\n */\n writeFail(n, test, err) {\n super.writeFail(n, test, err);\n var emitYamlBlock = err.message != null || err.stack != null;\n if (emitYamlBlock) {\n println(indent(1) + \"---\");\n if (err.message) {\n println(indent(2) + \"message: |-\");\n println(err.message.replace(/^/gm, indent(3)));\n }\n if (err.stack) {\n println(indent(2) + \"stack: |-\");\n println(err.stack.replace(/^/gm, indent(3)));\n }\n println(indent(1) + \"...\");\n }\n }\n}\n\nfunction indent(level) {\n return Array(level + 1).join(\" \");\n}\n\nexport { TAP };\n","/**\n * @typedef {import('../runner.cjs')} Runner\n */\n\n/**\n * @module JSON\n */\n/**\n * Module dependencies.\n */\n\nimport { Base } from \"./base.js\";\nimport fs from \"node:fs\";\nimport path from \"node:path\";\nimport * as errors from \"../errors.js\";\nimport utils from \"../utils.cjs\";\nimport Runner from \"../runner.cjs\";\nconst createUnsupportedError = errors.createUnsupportedError;\nvar constants = Runner.constants;\nvar EVENT_TEST_PASS = constants.EVENT_TEST_PASS;\nvar EVENT_TEST_PENDING = constants.EVENT_TEST_PENDING;\nvar EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL;\nvar EVENT_TEST_END = constants.EVENT_TEST_END;\nvar EVENT_RUN_END = constants.EVENT_RUN_END;\n\nclass JSONReporter extends Base {\n static description = \"single JSON object\";\n\n /**\n * Constructs a new `JSON` reporter instance.\n *\n * @public\n * @memberof Mocha.reporters\n * @extends Mocha.reporters.Base\n * @param {Runner} runner - Instance triggers reporter actions.\n * @param {Object} [options] - runner options\n */\n constructor(runner, options = {}) {\n super(runner, options);\n\n var self = this;\n var tests = [];\n var pending = [];\n var failures = [];\n var passes = [];\n var output;\n\n if (options.reporterOption && options.reporterOption.output) {\n if (utils.isBrowser()) {\n throw createUnsupportedError(\"file output not supported in browser\");\n }\n output = options.reporterOption.output;\n }\n\n runner.on(EVENT_TEST_END, function (test) {\n tests.push(test);\n });\n\n runner.on(EVENT_TEST_PASS, function (test) {\n passes.push(test);\n });\n\n runner.on(EVENT_TEST_FAIL, function (test) {\n failures.push(test);\n });\n\n runner.on(EVENT_TEST_PENDING, function (test) {\n pending.push(test);\n });\n\n runner.once(EVENT_RUN_END, function () {\n var obj = {\n stats: self.stats,\n tests: tests.map(clean),\n pending: pending.map(clean),\n failures: failures.map(clean),\n passes: passes.map(clean),\n };\n\n runner.testResults = obj;\n\n var json = JSON.stringify(obj, null, 2);\n if (output) {\n try {\n fs.mkdirSync(path.dirname(output), { recursive: true });\n fs.writeFileSync(output, json);\n } catch (err) {\n console.error(\n `${Base.symbols.err} [mocha] writing output to \"${output}\" failed: ${err.message}\\n`,\n );\n process.stdout.write(json);\n }\n } else {\n process.stdout.write(json);\n }\n });\n }\n}\n\n/**\n * Return a plain-object representation of `test`\n * free of cyclic properties etc.\n *\n * @private\n * @param {Object} test\n * @return {Object}\n */\nfunction clean(test) {\n var err = test.err || {};\n if (err instanceof Error) {\n err = errorJSON(err);\n }\n\n return {\n title: test.title,\n fullTitle: test.fullTitle(),\n file: test.file,\n duration: test.duration,\n currentRetry: test.currentRetry(),\n speed: test.speed,\n err: cleanCycles(err),\n };\n}\n\n/**\n * Replaces any circular references inside `obj` with '[object Object]'\n *\n * @private\n * @param {Object} obj\n * @return {Object}\n */\nfunction cleanCycles(obj) {\n var cache = [];\n return JSON.parse(\n JSON.stringify(obj, function (key, value) {\n if (typeof value === \"object\" && value !== null) {\n if (cache.indexOf(value) !== -1) {\n // Instead of going in a circle, we'll print [object Object]\n return \"\" + value;\n }\n cache.push(value);\n }\n\n return value;\n }),\n );\n}\n\n/**\n * Transform an Error object into a JSON object.\n *\n * @private\n * @param {Error} err\n * @return {Object}\n */\nfunction errorJSON(err) {\n var res = {};\n Object.getOwnPropertyNames(err).forEach(function (key) {\n res[key] = err[key];\n }, err);\n return res;\n}\n\nexport { JSONReporter };\n","/**\n * @typedef {import('../runner.cjs')} Runner\n */\n\n/**\n * @module HTML\n */\n/**\n * Module dependencies.\n */\n\nimport { Base } from \"./base.js\";\nimport utils from \"../utils.cjs\";\nimport { escapeRegExp } from \"../utils/regexp.js\";\nimport Runner from \"../runner.cjs\";\nvar constants = Runner.constants;\nvar EVENT_TEST_PASS = constants.EVENT_TEST_PASS;\nvar EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL;\nvar EVENT_SUITE_BEGIN = constants.EVENT_SUITE_BEGIN;\nvar EVENT_SUITE_END = constants.EVENT_SUITE_END;\nvar EVENT_TEST_PENDING = constants.EVENT_TEST_PENDING;\nvar escape = utils.escape;\n\n/**\n * Save timer references to avoid Sinon interfering (see GH-237).\n */\n\nvar Date = global.Date;\n\n/**\n * Stats template: Result, progress, passes, failures, and duration.\n */\n\nvar statsTemplate =\n '\";\n\nvar playIcon = \"‣\";\n\nclass HTML extends Base {\n static browserOnly = true;\n\n /**\n * Constructs a new `HTML` reporter instance.\n *\n * @public\n * @memberof Mocha.reporters\n * @extends Mocha.reporters.Base\n * @param {Runner} runner - Instance triggers reporter actions.\n * @param {Object} [options] - runner options\n */\n constructor(runner, options) {\n super(runner, options);\n\n var self = this;\n var stats = this.stats;\n var stat = fragment(statsTemplate);\n var items = stat.getElementsByTagName(\"li\");\n const resultIndex = 0;\n const progressIndex = 1;\n const passesIndex = 2;\n const failuresIndex = 3;\n const durationIndex = 4;\n /** Stat item containing the root suite pass or fail indicator (hasFailures ? '✖' : '✓') */\n var resultIndicator = items[resultIndex];\n /** Passes text and count */\n const passesStat = items[passesIndex];\n /** Stat item containing the pass count (not the word, just the number) */\n const passesCount = passesStat.getElementsByTagName(\"em\")[0];\n /** Stat item linking to filter to show only passing tests */\n const passesLink = passesStat.getElementsByTagName(\"a\")[0];\n /** Failures text and count */\n const failuresStat = items[failuresIndex];\n /** Stat item containing the failure count (not the word, just the number) */\n const failuresCount = failuresStat.getElementsByTagName(\"em\")[0];\n /** Stat item linking to filter to show only failing tests */\n const failuresLink = failuresStat.getElementsByTagName(\"a\")[0];\n /** Stat item linking to the duration time (not the word or unit, just the number) */\n var duration = items[durationIndex].getElementsByTagName(\"em\")[0];\n var report = fragment('
              ');\n var stack = [report];\n var progressText = items[progressIndex].getElementsByTagName(\"div\")[0];\n var progressBar = items[progressIndex].getElementsByTagName(\"progress\")[0];\n var progressRing = [\n items[progressIndex].getElementsByClassName(\"ring-flatlight\")[0],\n items[progressIndex].getElementsByClassName(\"ring-highlight\")[0],\n ];\n var root = document.getElementById(\"mocha\");\n\n if (!root) {\n return error(\"#mocha div missing, add it to your document\");\n }\n\n // pass toggle\n on(passesLink, \"click\", function (evt) {\n evt.preventDefault();\n unhide();\n var name = /pass/.test(report.className) ? \"\" : \" pass\";\n report.className = report.className.replace(/fail|pass/g, \"\") + name;\n if (report.className.trim()) {\n hideSuitesWithout(\"test pass\");\n }\n });\n\n // failure toggle\n on(failuresLink, \"click\", function (evt) {\n evt.preventDefault();\n unhide();\n var name = /fail/.test(report.className) ? \"\" : \" fail\";\n report.className = report.className.replace(/fail|pass/g, \"\") + name;\n if (report.className.trim()) {\n hideSuitesWithout(\"test fail\");\n }\n });\n\n root.appendChild(stat);\n root.appendChild(report);\n\n runner.on(EVENT_SUITE_BEGIN, function (suite) {\n if (suite.root) {\n return;\n }\n\n // suite\n var url = self.suiteURL(suite);\n var el = fragment(\n '
            • %s

            • ',\n url,\n escape(suite.title),\n );\n\n // container\n stack[0].appendChild(el);\n stack.unshift(document.createElement(\"ul\"));\n el.appendChild(stack[0]);\n });\n\n runner.on(EVENT_SUITE_END, function (suite) {\n if (suite.root) {\n if (stats.failures === 0) {\n text(resultIndicator, \"✓\");\n stat.className += \" pass\";\n }\n updateStats();\n return;\n }\n stack.shift();\n });\n\n runner.on(EVENT_TEST_PASS, function (test) {\n var url = self.testURL(test);\n var markup =\n '
            • %e%ems ' +\n '' +\n playIcon +\n \"

            • \";\n var el = fragment(markup, test.speed, test.title, test.duration, url);\n self.addCodeToggle(el, test.body);\n appendToStack(el);\n updateStats();\n });\n\n runner.on(EVENT_TEST_FAIL, function (test) {\n // Update stat items\n text(resultIndicator, \"✖\");\n stat.className += \" fail\";\n\n var el = fragment(\n '
            • %e ' +\n playIcon +\n \"

            • \",\n test.title,\n self.testURL(test),\n );\n var stackString; // Note: Includes leading newline\n var message = test.err.toString();\n\n // <=IE7 stringifies to [Object Error]. Since it can be overloaded, we\n // check for the result of the stringifying.\n if (message === \"[object Error]\") {\n message = test.err.message;\n }\n\n if (test.err.stack) {\n var indexOfMessage = test.err.stack.indexOf(test.err.message);\n if (indexOfMessage === -1) {\n stackString = test.err.stack;\n } else {\n stackString = test.err.stack.slice(\n test.err.message.length + indexOfMessage,\n );\n }\n } else if (test.err.sourceURL && test.err.line !== undefined) {\n // Safari doesn't give you a stack. Let's at least provide a source line.\n stackString = \"\\n(\" + test.err.sourceURL + \":\" + test.err.line + \")\";\n }\n\n stackString = stackString || \"\";\n\n if (test.err.htmlMessage && stackString) {\n el.appendChild(\n fragment(\n '
              %s\\n
              %e
              ',\n test.err.htmlMessage,\n stackString,\n ),\n );\n } else if (test.err.htmlMessage) {\n el.appendChild(\n fragment('
              %s
              ', test.err.htmlMessage),\n );\n } else {\n el.appendChild(\n fragment('
              %e%e
              ', message, stackString),\n );\n }\n\n self.addCodeToggle(el, test.body);\n appendToStack(el);\n updateStats();\n });\n\n runner.on(EVENT_TEST_PENDING, function (test) {\n var el = fragment(\n '
            • %e

            • ',\n test.title,\n );\n appendToStack(el);\n updateStats();\n });\n\n function appendToStack(el) {\n // Don't call .appendChild if #mocha-report was already .shift()'ed off the stack.\n if (stack[0]) {\n stack[0].appendChild(el);\n }\n }\n\n function updateStats() {\n var percent = ((stats.tests / runner.total) * 100) | 0;\n progressBar.value = percent;\n if (progressText) {\n // setting a toFixed that is too low, makes small changes to progress not shown\n // setting it too high, makes the progress text longer then it needs to\n // to address this, calculate the toFixed based on the magnitude of total\n var decimalPlaces = Math.ceil(Math.log10(runner.total / 100));\n text(\n progressText,\n percent.toFixed(Math.min(Math.max(decimalPlaces, 0), 100)) + \"%\",\n );\n }\n if (progressRing) {\n var radius = parseFloat(\n getComputedStyle(progressRing[0]).getPropertyValue(\"r\"),\n );\n var wholeArc = Math.PI * 2 * radius;\n var highlightArc = percent * (wholeArc / 100);\n // The progress ring is in 2 parts, the flatlight color and highlight color.\n // Rendering both on top of the other, seems to make a 3rd color on the edges.\n // To create 1 whole ring with 2 colors, both parts are inverse of the other.\n progressRing[0].style[\"stroke-dasharray\"] =\n `0,${highlightArc}px,${wholeArc}px`;\n progressRing[1].style[\"stroke-dasharray\"] =\n `${highlightArc}px,${wholeArc}px`;\n }\n\n // update stats\n var ms = new Date() - stats.start;\n text(passesCount, stats.passes);\n text(failuresCount, stats.failures);\n text(duration, (ms / 1000).toFixed(2));\n }\n }\n\n /**\n * Provide suite URL.\n *\n * @param {Object} [suite]\n */\n suiteURL(suite) {\n return makeUrl(\"^\" + escapeRegExp(suite.fullTitle()) + \" \");\n }\n\n /**\n * Provide test URL.\n *\n * @param {Object} [test]\n */\n testURL(test) {\n return makeUrl(\"^\" + escapeRegExp(test.fullTitle()) + \"$\");\n }\n\n /**\n * Adds code toggle functionality for the provided test's list element.\n *\n * @param {HTMLLIElement} el\n * @param {string} contents\n */\n addCodeToggle(el, contents) {\n var h2 = el.getElementsByTagName(\"h2\")[0];\n\n on(h2, \"click\", function () {\n pre.style.display = pre.style.display === \"none\" ? \"block\" : \"none\";\n });\n\n var pre = fragment(\"
              %e
              \", utils.clean(contents));\n el.appendChild(pre);\n pre.style.display = \"none\";\n }\n}\n\n/**\n * Makes a URL, preserving querystring (\"search\") parameters.\n *\n * @param {string} s\n * @return {string} A new URL.\n */\nfunction makeUrl(s) {\n var search = window.location.search;\n\n // Remove previous {grep, fgrep, invert} query parameters if present\n if (search) {\n search = search\n .replace(/[?&](?:f?grep|invert)=[^&\\s]*/g, \"\")\n .replace(/^&/, \"?\");\n }\n\n return (\n window.location.pathname +\n (search ? search + \"&\" : \"?\") +\n \"grep=\" +\n encodeURIComponent(s)\n );\n}\n\n/**\n * Display error `msg`.\n *\n * @param {string} msg\n */\nfunction error(msg) {\n document.body.appendChild(fragment('
              %s
              ', msg));\n}\n\n/**\n * Return a DOM fragment from `html`.\n *\n * @param {string} html\n */\nfunction fragment(html) {\n var args = arguments;\n var div = document.createElement(\"div\");\n var i = 1;\n\n div.innerHTML = html.replace(/%([se])/g, function (_, type) {\n switch (type) {\n case \"s\":\n return String(args[i++]);\n case \"e\":\n return escape(args[i++]);\n // no default\n }\n });\n\n return div.firstChild;\n}\n\n/**\n * Check for suites that do not have elements\n * with `classname`, and hide them.\n *\n * @param {text} classname\n */\nfunction hideSuitesWithout(classname) {\n var suites = document.getElementsByClassName(\"suite\");\n for (var i = 0; i < suites.length; i++) {\n var els = suites[i].getElementsByClassName(classname);\n if (!els.length) {\n suites[i].className += \" hidden\";\n }\n }\n}\n\n/**\n * Unhide .hidden suites.\n */\nfunction unhide() {\n var els = document.getElementsByClassName(\"suite hidden\");\n while (els.length > 0) {\n els[0].className = els[0].className.replace(\"suite hidden\", \"suite\");\n }\n}\n\n/**\n * Set an element's text contents.\n *\n * @param {HTMLElement} el\n * @param {string} contents\n */\nfunction text(el, contents) {\n if (el.textContent) {\n el.textContent = contents;\n } else {\n el.innerText = contents;\n }\n}\n\n/**\n * Listen on `event` with callback `fn`.\n */\nfunction on(el, event, fn) {\n if (el.addEventListener) {\n el.addEventListener(event, fn, false);\n } else {\n el.attachEvent(\"on\" + event, fn);\n }\n}\n\nexport { HTML };\n","/**\n * @typedef {import('../runner.cjs')} Runner\n */\n\n/**\n * @module List\n */\n/**\n * Module dependencies.\n */\n\nimport { Base } from \"./base.js\";\nimport Runner from \"../runner.cjs\";\n\nvar { constants } = Runner;\nvar EVENT_RUN_BEGIN = constants.EVENT_RUN_BEGIN;\nvar EVENT_RUN_END = constants.EVENT_RUN_END;\nvar EVENT_TEST_BEGIN = constants.EVENT_TEST_BEGIN;\nvar EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL;\nvar EVENT_TEST_PASS = constants.EVENT_TEST_PASS;\nvar EVENT_TEST_PENDING = constants.EVENT_TEST_PENDING;\nvar color = Base.color;\nvar cursor = Base.cursor;\n\nclass List extends Base {\n static description = 'like \"spec\" reporter but flat';\n\n /**\n * Constructs a new `List` reporter instance.\n *\n * @public\n * @memberof Mocha.reporters\n * @extends Mocha.reporters.Base\n * @param {Runner} runner - Instance triggers reporter actions.\n * @param {Object} [options] - runner options\n */\n constructor(runner, options) {\n super(runner, options);\n\n var n = 0;\n\n runner.on(EVENT_RUN_BEGIN, function () {\n Base.consoleLog();\n });\n\n runner.on(EVENT_TEST_BEGIN, function (test) {\n process.stdout.write(color(\"pass\", \" \" + test.fullTitle() + \": \"));\n });\n\n runner.on(EVENT_TEST_PENDING, function (test) {\n var fmt = color(\"checkmark\", \" -\") + color(\"pending\", \" %s\");\n Base.consoleLog(fmt, test.fullTitle());\n });\n\n runner.on(EVENT_TEST_PASS, function (test) {\n var fmt =\n color(\"checkmark\", \" \" + Base.symbols.ok) +\n color(\"pass\", \" %s: \") +\n color(test.speed, \"%dms\");\n cursor.CR();\n Base.consoleLog(fmt, test.fullTitle(), test.duration);\n });\n\n runner.on(EVENT_TEST_FAIL, function (test) {\n cursor.CR();\n Base.consoleLog(color(\"fail\", \" %d) %s\"), ++n, test.fullTitle());\n });\n\n runner.once(EVENT_RUN_END, (...args) => this.epilogue(...args));\n }\n}\n\nexport { List };\n","/**\n * @typedef {import('../runner.cjs')} Runner\n */\n\n/**\n * @module Min\n */\n/**\n * Module dependencies.\n */\n\nimport { Base } from \"./base.js\";\nimport Runner from \"../runner.cjs\";\n\nvar { constants } = Runner;\nvar EVENT_RUN_END = constants.EVENT_RUN_END;\nvar EVENT_RUN_BEGIN = constants.EVENT_RUN_BEGIN;\n\nclass Min extends Base {\n static description = \"essentially just a summary\";\n\n /**\n * Constructs a new `Min` reporter instance.\n *\n * @description\n * This minimal test reporter is best used with '--watch'.\n *\n * @public\n * @memberof Mocha.reporters\n * @extends Mocha.reporters.Base\n * @param {Runner} runner - Instance triggers reporter actions.\n * @param {Object} [options] - runner options\n */\n constructor(runner, options) {\n super(runner, options);\n\n runner.on(EVENT_RUN_BEGIN, function () {\n // clear screen\n process.stdout.write(\"\\u001b[2J\");\n // set cursor position\n process.stdout.write(\"\\u001b[1;3H\");\n });\n\n runner.once(EVENT_RUN_END, (...args) => this.epilogue(...args));\n }\n}\n\nexport { Min };\n","/**\n * @typedef {import('../runner.cjs')} Runner\n * @typedef {import('../test.js')} Test\n */\n\n/**\n * @module Spec\n */\n/**\n * Module dependencies.\n */\n\nimport { Base } from \"./base.js\";\nimport Runner from \"../runner.cjs\";\nvar constants = Runner.constants;\nvar EVENT_RUN_BEGIN = constants.EVENT_RUN_BEGIN;\nvar EVENT_RUN_END = constants.EVENT_RUN_END;\nvar EVENT_SUITE_BEGIN = constants.EVENT_SUITE_BEGIN;\nvar EVENT_SUITE_END = constants.EVENT_SUITE_END;\nvar EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL;\nvar EVENT_TEST_PASS = constants.EVENT_TEST_PASS;\nvar EVENT_TEST_PENDING = constants.EVENT_TEST_PENDING;\nvar color = Base.color;\n\nclass Spec extends Base {\n static description = \"hierarchical & verbose [default]\";\n\n /**\n * Constructs a new `Spec` reporter instance.\n *\n * @public\n * @memberof Mocha.reporters\n * @extends Mocha.reporters.Base\n * @param {Runner} runner - Instance triggers reporter actions.\n * @param {Object} [options] - runner options\n */\n constructor(runner, options) {\n super(runner, options);\n\n var indents = 0;\n var n = 0;\n\n function indent() {\n return Array(indents).join(\" \");\n }\n\n runner.on(EVENT_RUN_BEGIN, function () {\n Base.consoleLog();\n });\n\n runner.on(EVENT_SUITE_BEGIN, function (suite) {\n ++indents;\n Base.consoleLog(color(\"suite\", \"%s%s\"), indent(), suite.title);\n });\n\n runner.on(EVENT_SUITE_END, function () {\n --indents;\n if (indents === 1) {\n Base.consoleLog();\n }\n });\n\n runner.on(EVENT_TEST_PENDING, function (test) {\n var fmt = indent() + color(\"pending\", \" - %s\");\n Base.consoleLog(fmt, test.title);\n });\n\n runner.on(EVENT_TEST_PASS, function (test) {\n var fmt;\n if (test.speed === \"fast\") {\n fmt =\n indent() +\n color(\"checkmark\", \" \" + Base.symbols.ok) +\n color(\"pass\", \" %s\");\n Base.consoleLog(fmt, test.title);\n } else {\n fmt =\n indent() +\n color(\"checkmark\", \" \" + Base.symbols.ok) +\n color(\"pass\", \" %s\") +\n color(test.speed, \" (%dms)\");\n Base.consoleLog(fmt, test.title, test.duration);\n }\n });\n\n runner.on(EVENT_TEST_FAIL, function (test) {\n Base.consoleLog(indent() + color(\"fail\", \" %d) %s\"), ++n, test.title);\n });\n\n runner.once(EVENT_RUN_END, (...args) => this.epilogue(...args));\n }\n}\n\nexport { Spec };\n","/**\n * @typedef {import('../runner.cjs')} Runner\n */\n\n/**\n * @module Nyan\n */\n/**\n * Module dependencies.\n */\n\nimport { Base } from \"./base.js\";\nimport Runner from \"../runner.cjs\";\nvar constants = Runner.constants;\nvar EVENT_RUN_BEGIN = constants.EVENT_RUN_BEGIN;\nvar EVENT_TEST_PENDING = constants.EVENT_TEST_PENDING;\nvar EVENT_TEST_PASS = constants.EVENT_TEST_PASS;\nvar EVENT_RUN_END = constants.EVENT_RUN_END;\nvar EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL;\n\nclass NyanCat extends Base {\n static description = '\"nyan cat\"';\n\n /**\n * Constructs a new `Nyan` reporter instance.\n *\n * @public\n * @memberof Mocha.reporters\n * @extends Mocha.reporters.Base\n * @param {Runner} runner - Instance triggers reporter actions.\n * @param {Object} [options] - runner options\n */\n constructor(runner, options) {\n super(runner, options);\n\n var self = this;\n var width = (Base.window.width * 0.75) | 0;\n var nyanCatWidth = (this.nyanCatWidth = 11);\n\n this.colorIndex = 0;\n this.numberOfLines = 4;\n this.rainbowColors = self.generateColors();\n this.scoreboardWidth = 5;\n this.tick = 0;\n this.trajectories = [[], [], [], []];\n this.trajectoryWidthMax = width - nyanCatWidth;\n\n runner.on(EVENT_RUN_BEGIN, function () {\n Base.cursor.hide();\n self.draw();\n });\n\n runner.on(EVENT_TEST_PENDING, function () {\n self.draw();\n });\n\n runner.on(EVENT_TEST_PASS, function () {\n self.draw();\n });\n\n runner.on(EVENT_TEST_FAIL, function () {\n self.draw();\n });\n\n runner.once(EVENT_RUN_END, function () {\n Base.cursor.show();\n for (var i = 0; i < self.numberOfLines; i++) {\n process.stdout.write(\"\\n\");\n }\n self.epilogue();\n });\n }\n\n /**\n * Draw the nyan cat\n *\n * @private\n */\n\n draw() {\n this.appendRainbow();\n this.drawScoreboard();\n this.drawRainbow();\n this.drawNyanCat();\n this.tick = !this.tick;\n }\n\n /**\n * Draw the \"scoreboard\" showing the number\n * of passes, failures and pending tests.\n *\n * @private\n */\n\n drawScoreboard() {\n var stats = this.stats;\n\n function draw(type, n) {\n process.stdout.write(\" \");\n process.stdout.write(Base.color(type, n));\n process.stdout.write(\"\\n\");\n }\n\n draw(\"green\", stats.passes);\n draw(\"fail\", stats.failures);\n draw(\"pending\", stats.pending);\n process.stdout.write(\"\\n\");\n\n this.cursorUp(this.numberOfLines);\n }\n\n /**\n * Append the rainbow.\n *\n * @private\n */\n\n appendRainbow() {\n var segment = this.tick ? \"_\" : \"-\";\n var rainbowified = this.rainbowify(segment);\n\n for (var index = 0; index < this.numberOfLines; index++) {\n var trajectory = this.trajectories[index];\n if (trajectory.length >= this.trajectoryWidthMax) {\n trajectory.shift();\n }\n trajectory.push(rainbowified);\n }\n }\n\n /**\n * Draw the rainbow.\n *\n * @private\n */\n\n drawRainbow() {\n var self = this;\n\n this.trajectories.forEach(function (line) {\n process.stdout.write(\"\\u001b[\" + self.scoreboardWidth + \"C\");\n process.stdout.write(line.join(\"\"));\n process.stdout.write(\"\\n\");\n });\n\n this.cursorUp(this.numberOfLines);\n }\n\n /**\n * Draw the nyan cat\n *\n * @private\n */\n drawNyanCat() {\n var self = this;\n var startWidth = this.scoreboardWidth + this.trajectories[0].length;\n var dist = \"\\u001b[\" + startWidth + \"C\";\n var padding;\n\n process.stdout.write(dist);\n process.stdout.write(\"_,------,\");\n process.stdout.write(\"\\n\");\n\n process.stdout.write(dist);\n padding = self.tick ? \" \" : \" \";\n process.stdout.write(\"_|\" + padding + \"/\\\\_/\\\\ \");\n process.stdout.write(\"\\n\");\n\n process.stdout.write(dist);\n padding = self.tick ? \"_\" : \"__\";\n var tail = self.tick ? \"~\" : \"^\";\n process.stdout.write(tail + \"|\" + padding + this.face() + \" \");\n process.stdout.write(\"\\n\");\n\n process.stdout.write(dist);\n padding = self.tick ? \" \" : \" \";\n process.stdout.write(padding + '\"\" \"\" ');\n process.stdout.write(\"\\n\");\n\n this.cursorUp(this.numberOfLines);\n }\n\n /**\n * Draw nyan cat face.\n *\n * @private\n * @return {string}\n */\n\n face() {\n var stats = this.stats;\n if (stats.failures) {\n return \"( x .x)\";\n } else if (stats.pending) {\n return \"( o .o)\";\n } else if (stats.passes) {\n return \"( ^ .^)\";\n }\n return \"( - .-)\";\n }\n\n /**\n * Move cursor up `n`.\n *\n * @private\n * @param {number} n\n */\n\n cursorUp(n) {\n process.stdout.write(\"\\u001b[\" + n + \"A\");\n }\n\n /**\n * Move cursor down `n`.\n *\n * @private\n * @param {number} n\n */\n\n cursorDown(n) {\n process.stdout.write(\"\\u001b[\" + n + \"B\");\n }\n\n /**\n * Generate rainbow colors.\n *\n * @private\n * @return {Array}\n */\n generateColors() {\n var colors = [];\n\n for (var i = 0; i < 6 * 7; i++) {\n var pi3 = Math.floor(Math.PI / 3);\n var n = i * (1.0 / 6);\n var r = Math.floor(3 * Math.sin(n) + 3);\n var g = Math.floor(3 * Math.sin(n + 2 * pi3) + 3);\n var b = Math.floor(3 * Math.sin(n + 4 * pi3) + 3);\n colors.push(36 * r + 6 * g + b + 16);\n }\n\n return colors;\n }\n\n /**\n * Apply rainbow to the given `str`.\n *\n * @private\n * @param {string} str\n * @return {string}\n */\n rainbowify(str) {\n if (!Base.useColors) {\n return str;\n }\n var color = this.rainbowColors[this.colorIndex % this.rainbowColors.length];\n this.colorIndex += 1;\n return \"\\u001b[38;5;\" + color + \"m\" + str + \"\\u001b[0m\";\n }\n}\n\nexport { NyanCat };\n","/**\n * @typedef {import('../runner.cjs')} Runner\n * @typedef {import('../test.js')} Test\n */\n\n/**\n * @module XUnit\n */\n/**\n * Module dependencies.\n */\n\nimport { Base } from \"./base.js\";\nimport utils from \"../utils.cjs\";\nimport fs from \"node:fs\";\nimport path from \"node:path\";\nimport * as errors from \"../errors.js\";\nimport Runner from \"../runner.cjs\";\nimport { Runnable } from \"../runnable.js\";\nvar createUnsupportedError = errors.createUnsupportedError;\nvar constants = Runner.constants;\nvar EVENT_TEST_PASS = constants.EVENT_TEST_PASS;\nvar EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL;\nvar EVENT_RUN_END = constants.EVENT_RUN_END;\nvar EVENT_TEST_PENDING = constants.EVENT_TEST_PENDING;\nvar STATE_FAILED = Runnable.constants.STATE_FAILED;\nvar escape = utils.escape;\nvar ANSI_ESCAPE_SEQUENCE = new RegExp(\n String.fromCharCode(27) + \"\\\\[[0-?]*[ -/]*[@-~]\",\n \"g\",\n);\n\n/**\n * Save timer references to avoid Sinon interfering (see GH-237).\n */\nvar Date = global.Date;\n\nclass XUnit extends Base {\n static description = \"XUnit-compatible XML output\";\n\n /**\n * Constructs a new `XUnit` reporter instance.\n *\n * @public\n * @memberof Mocha.reporters\n * @extends Mocha.reporters.Base\n * @param {Runner} runner - Instance triggers reporter actions.\n * @param {Object} [options] - runner options\n */\n constructor(runner, options) {\n super(runner, options);\n\n var stats = this.stats;\n var tests = [];\n var self = this;\n\n // the name of the test suite, as it will appear in the resulting XML file\n var suiteName;\n\n // the default name of the test suite if none is provided\n var DEFAULT_SUITE_NAME = \"Mocha Tests\";\n\n if (options && options.reporterOptions) {\n if (options.reporterOptions.output) {\n if (!fs.createWriteStream) {\n throw createUnsupportedError(\"file output not supported in browser\");\n }\n\n fs.mkdirSync(path.dirname(options.reporterOptions.output), {\n recursive: true,\n });\n self.fileStream = fs.createWriteStream(options.reporterOptions.output);\n }\n\n // get the suite name from the reporter options (if provided)\n suiteName = options.reporterOptions.suiteName;\n }\n\n // fall back to the default suite name\n suiteName = suiteName || DEFAULT_SUITE_NAME;\n\n runner.on(EVENT_TEST_PENDING, function (test) {\n tests.push(test);\n });\n\n runner.on(EVENT_TEST_PASS, function (test) {\n tests.push(test);\n });\n\n runner.on(EVENT_TEST_FAIL, function (test) {\n tests.push(test);\n });\n\n runner.once(EVENT_RUN_END, function () {\n self.write(\n tag(\n \"testsuite\",\n {\n name: suiteName,\n tests: stats.tests,\n failures: 0,\n errors: stats.failures,\n skipped: stats.tests - stats.failures - stats.passes,\n timestamp: new Date().toUTCString(),\n time: stats.duration / 1000 || 0,\n },\n false,\n ),\n );\n\n tests.forEach(function (t) {\n self.test(t, options);\n });\n\n self.write(\"\");\n });\n }\n\n /**\n * Override done to close the stream (if it's a file).\n *\n * @param failures\n * @param {Function} fn\n */\n done(failures, fn) {\n if (this.fileStream) {\n this.fileStream.end(function () {\n fn(failures);\n });\n } else {\n fn(failures);\n }\n }\n\n /**\n * Write out the given line.\n *\n * @param {string} line\n */\n write(line) {\n if (this.fileStream) {\n this.fileStream.write(line + \"\\n\");\n } else if (typeof process === \"object\" && process.stdout) {\n process.stdout.write(line + \"\\n\");\n } else {\n Base.consoleLog(line);\n }\n }\n\n /**\n * Output tag for the given `test.`\n *\n * @param {Test} test\n */\n test(test, options) {\n Base.useColors = false;\n\n var attrs = {\n classname: test.parent.fullTitle(),\n name: test.title,\n file: testFilePath(test.file, options),\n time: test.duration / 1000 || 0,\n };\n\n if (test.state === STATE_FAILED) {\n var err = test.err;\n var diff =\n !Base.hideDiff && Base.showDiff(err)\n ? \"\\n\" + Base.generateDiff(err.actual, err.expected)\n : \"\";\n this.write(\n tag(\n \"testcase\",\n attrs,\n false,\n tag(\n \"failure\",\n {},\n false,\n escapeXml(err.message) +\n escapeXml(diff) +\n \"\\n\" +\n escapeXml(err.stack),\n ),\n ),\n );\n } else if (test.isPending()) {\n this.write(tag(\"testcase\", attrs, false, tag(\"skipped\", {}, true)));\n } else {\n this.write(tag(\"testcase\", attrs, true));\n }\n }\n}\n\n/**\n * HTML tag helper.\n *\n * @param name\n * @param attrs\n * @param close\n * @param content\n * @return {string}\n */\nfunction tag(name, attrs, close, content) {\n var end = close ? \"/>\" : \">\";\n var pairs = [];\n var tag;\n\n for (var key in attrs) {\n if (Object.prototype.hasOwnProperty.call(attrs, key)) {\n pairs.push(key + '=\"' + escapeXml(attrs[key]) + '\"');\n }\n }\n\n tag = \"<\" + name + (pairs.length ? \" \" + pairs.join(\" \") : \"\") + end;\n if (content) {\n tag += content + \"= 0x20\n ) {\n result += value[i];\n }\n }\n\n return result;\n}\n\nfunction testFilePath(filepath, options) {\n if (\n options &&\n options.reporterOptions &&\n options.reporterOptions.showRelativePaths\n ) {\n return path.relative(process.cwd(), filepath);\n }\n\n return filepath;\n}\n\nexport { XUnit };\n","/**\n * @typedef {import('../runner.cjs')} Runner\n */\n\n/**\n * @module Markdown\n */\n/**\n * Module dependencies.\n */\n\nimport { Base } from \"./base.js\";\nimport utils from \"../utils.cjs\";\nimport Runner from \"../runner.cjs\";\nvar constants = Runner.constants;\nvar EVENT_RUN_END = constants.EVENT_RUN_END;\nvar EVENT_SUITE_BEGIN = constants.EVENT_SUITE_BEGIN;\nvar EVENT_SUITE_END = constants.EVENT_SUITE_END;\nvar EVENT_TEST_PASS = constants.EVENT_TEST_PASS;\n\n/**\n * Constants\n */\n\nvar SUITE_PREFIX = \"$\";\n\nclass Markdown extends Base {\n static description = \"GitHub Flavored Markdown\";\n\n /**\n * Constructs a new `Markdown` reporter instance.\n *\n * @public\n * @memberof Mocha.reporters\n * @extends Mocha.reporters.Base\n * @param {Runner} runner - Instance triggers reporter actions.\n * @param {Object} [options] - runner options\n */\n constructor(runner, options) {\n super(runner, options);\n\n var level = 0;\n var buf = \"\";\n\n function title(str) {\n return Array(level).join(\"#\") + \" \" + str;\n }\n\n function mapTOC(suite, obj) {\n var ret = obj;\n var key = SUITE_PREFIX + suite.title;\n\n obj = obj[key] = obj[key] || { suite };\n suite.suites.forEach(function (suite) {\n mapTOC(suite, obj);\n });\n\n return ret;\n }\n\n function stringifyTOC(obj, level) {\n ++level;\n var buf = \"\";\n var link;\n for (var key in obj) {\n if (key === \"suite\") {\n continue;\n }\n if (key !== SUITE_PREFIX) {\n link = \" - [\" + key.substring(1) + \"]\";\n link += \"(#\" + utils.slug(obj[key].suite.fullTitle()) + \")\\n\";\n buf += Array(level).join(\" \") + link;\n }\n buf += stringifyTOC(obj[key], level);\n }\n return buf;\n }\n\n function generateTOC(suite) {\n var obj = mapTOC(suite, {});\n return stringifyTOC(obj, 0);\n }\n\n generateTOC(runner.suite);\n\n runner.on(EVENT_SUITE_BEGIN, function (suite) {\n ++level;\n var slug = utils.slug(suite.fullTitle());\n buf += '' + \"\\n\";\n buf += title(suite.title) + \"\\n\";\n });\n\n runner.on(EVENT_SUITE_END, function () {\n --level;\n });\n\n runner.on(EVENT_TEST_PASS, function (test) {\n var code = utils.clean(test.body);\n buf += test.title + \".\\n\";\n buf += \"\\n```js\\n\";\n buf += code + \"\\n\";\n buf += \"```\\n\\n\";\n });\n\n runner.once(EVENT_RUN_END, function () {\n process.stdout.write(\"# TOC\\n\");\n process.stdout.write(generateTOC(runner.suite));\n process.stdout.write(buf);\n });\n }\n}\n\nexport { Markdown };\n","/**\n * @typedef {import('../runner.cjs')} Runner\n */\n\n/**\n * @module Progress\n */\n/**\n * Module dependencies.\n */\n\nimport { Base } from \"./base.js\";\nimport Runner from \"../runner.cjs\";\nvar constants = Runner.constants;\nvar EVENT_RUN_BEGIN = constants.EVENT_RUN_BEGIN;\nvar EVENT_TEST_END = constants.EVENT_TEST_END;\nvar EVENT_RUN_END = constants.EVENT_RUN_END;\nvar color = Base.color;\nvar cursor = Base.cursor;\n\n/**\n * General progress bar color.\n */\n\nBase.colors.progress = 90;\n\nclass Progress extends Base {\n static description = \"a progress bar\";\n\n /**\n * Constructs a new `Progress` reporter instance.\n *\n * @public\n * @memberof Mocha.reporters\n * @extends Mocha.reporters.Base\n * @param {Runner} runner - Instance triggers reporter actions.\n * @param {Object} [options] - runner options\n */\n constructor(runner, options) {\n super(runner, options);\n\n var self = this;\n var width = (Base.window.width * 0.5) | 0;\n var total = runner.total;\n var complete = 0;\n var lastN = -1;\n\n // default chars\n options = options || {};\n var reporterOptions = options.reporterOptions || {};\n\n options.open = reporterOptions.open || \"[\";\n options.complete = reporterOptions.complete || \"▬\";\n options.incomplete = reporterOptions.incomplete || Base.symbols.dot;\n options.close = reporterOptions.close || \"]\";\n options.verbose = reporterOptions.verbose || false;\n\n // tests started\n runner.on(EVENT_RUN_BEGIN, function () {\n process.stdout.write(\"\\n\");\n cursor.hide();\n });\n\n // tests complete\n runner.on(EVENT_TEST_END, function () {\n complete++;\n\n var percent = complete / total;\n var n = (width * percent) | 0;\n var i = width - n;\n\n if (n === lastN && !options.verbose) {\n // Don't re-render the line if it hasn't changed\n return;\n }\n lastN = n;\n\n cursor.CR();\n process.stdout.write(\"\\u001b[J\");\n process.stdout.write(color(\"progress\", \" \" + options.open));\n process.stdout.write(Array(n).join(options.complete));\n process.stdout.write(Array(i).join(options.incomplete));\n process.stdout.write(color(\"progress\", options.close));\n if (options.verbose) {\n process.stdout.write(\n color(\"progress\", \" \" + complete + \" of \" + total),\n );\n }\n });\n\n // tests are complete, output some stats\n // and the failures if any\n runner.once(EVENT_RUN_END, function () {\n cursor.show();\n process.stdout.write(\"\\n\");\n self.epilogue();\n });\n }\n}\n\nexport { Progress };\n","/**\n * @typedef {import('../runner.cjs')} Runner\n */\n\n/**\n * @module Landing\n */\n/**\n * Module dependencies.\n */\n\nimport { Base } from \"./base.js\";\nimport Runner from \"../runner.cjs\";\nimport { Runnable } from \"../runnable.js\";\nvar constants = Runner.constants;\nvar EVENT_RUN_BEGIN = constants.EVENT_RUN_BEGIN;\nvar EVENT_RUN_END = constants.EVENT_RUN_END;\nvar EVENT_TEST_END = constants.EVENT_TEST_END;\nvar STATE_FAILED = Runnable.constants.STATE_FAILED;\n\nvar cursor = Base.cursor;\nvar color = Base.color;\n\n/**\n * Airplane color.\n */\n\nBase.colors.plane = 0;\n\n/**\n * Airplane crash color.\n */\n\nBase.colors[\"plane crash\"] = 31;\n\n/**\n * Runway color.\n */\n\nBase.colors.runway = 90;\n\nclass Landing extends Base {\n static description = \"Unicode landing strip\";\n\n /**\n * Constructs a new `Landing` reporter instance.\n *\n * @public\n * @memberof Mocha.reporters\n * @extends Mocha.reporters.Base\n * @param {Runner} runner - Instance triggers reporter actions.\n * @param {Object} [options] - runner options\n */\n constructor(runner, options) {\n super(runner, options);\n\n var self = this;\n var width = (Base.window.width * 0.75) | 0;\n var stream = process.stdout;\n\n var plane = color(\"plane\", \"✈\");\n var crashed = -1;\n var n = 0;\n var total = 0;\n\n function runway() {\n var buf = Array(width).join(\"-\");\n return \" \" + color(\"runway\", buf);\n }\n\n runner.on(EVENT_RUN_BEGIN, function () {\n stream.write(\"\\n\\n\\n \");\n cursor.hide();\n });\n\n runner.on(EVENT_TEST_END, function (test) {\n // check if the plane crashed\n var col = crashed === -1 ? ((width * ++n) / ++total) | 0 : crashed;\n // show the crash\n if (test.state === STATE_FAILED) {\n plane = color(\"plane crash\", \"✈\");\n crashed = col;\n }\n\n // render landing strip\n stream.write(\"\\u001b[\" + (width + 1) + \"D\\u001b[2A\");\n stream.write(runway());\n stream.write(\"\\n \");\n stream.write(color(\"runway\", Array(col).join(\"⋅\")));\n stream.write(plane);\n stream.write(color(\"runway\", Array(width - col).join(\"⋅\") + \"\\n\"));\n stream.write(runway());\n stream.write(\"\\u001b[0m\");\n });\n\n runner.once(EVENT_RUN_END, function () {\n cursor.show();\n process.stdout.write(\"\\n\");\n self.epilogue();\n });\n\n // if cursor is hidden when we ctrl-C, then it will remain hidden unless...\n process.once(\"SIGINT\", function () {\n cursor.show();\n process.nextTick(function () {\n process.kill(process.pid, \"SIGINT\");\n });\n });\n }\n}\n\nexport { Landing };\n","/**\n * @typedef {import('../runner.cjs')} Runner\n * @typedef {import('../test.js')} Test\n */\n\n/**\n * @module JSONStream\n */\n/**\n * Module dependencies.\n */\n\nimport { Base } from \"./base.js\";\nimport Runner from \"../runner.cjs\";\nvar constants = Runner.constants;\nvar EVENT_TEST_PASS = constants.EVENT_TEST_PASS;\nvar EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL;\nvar EVENT_RUN_BEGIN = constants.EVENT_RUN_BEGIN;\nvar EVENT_RUN_END = constants.EVENT_RUN_END;\n\nclass JSONStream extends Base {\n static description = \"newline delimited JSON events\";\n\n /**\n * Constructs a new `JSONStream` reporter instance.\n *\n * @public\n * @memberof Mocha.reporters\n * @extends Mocha.reporters.Base\n * @param {Runner} runner - Instance triggers reporter actions.\n * @param {Object} [options] - runner options\n */\n constructor(runner, options) {\n super(runner, options);\n\n var self = this;\n var total = runner.total;\n\n runner.once(EVENT_RUN_BEGIN, function () {\n writeEvent([\"start\", { total }]);\n });\n\n runner.on(EVENT_TEST_PASS, function (test) {\n writeEvent([\"pass\", clean(test)]);\n });\n\n runner.on(EVENT_TEST_FAIL, function (test, err) {\n test = clean(test);\n test.err = err.message;\n test.stack = err.stack || null;\n writeEvent([\"fail\", test]);\n });\n\n runner.once(EVENT_RUN_END, function () {\n writeEvent([\"end\", self.stats]);\n });\n }\n}\n\n/**\n * Writes Mocha event to reporter output stream.\n *\n * @private\n * @param {unknown[]} event - Mocha event to be output.\n */\nfunction writeEvent(event) {\n process.stdout.write(JSON.stringify(event) + \"\\n\");\n}\n\n/**\n * Returns an object literal representation of `test`\n * free of cyclic properties, etc.\n *\n * @private\n * @param {Test} test - Instance used as data source.\n * @return {Object} object containing pared-down test instance data\n */\nfunction clean(test) {\n return {\n title: test.title,\n fullTitle: test.fullTitle(),\n file: test.file,\n duration: test.duration,\n currentRetry: test.currentRetry(),\n speed: test.speed,\n };\n}\n\nexport { JSONStream };\n","/**\n * @typedef {import('../runner.cjs')} Runner\n * @typedef {import('../test.js')} Test\n */\n\n/**\n * @module GithubActions\n */\n/**\n * Module dependencies.\n */\n\nimport fs from \"node:fs\";\nimport ms from \"ms\";\nimport { Spec } from \"./spec.js\";\nimport Runner from \"../runner.cjs\";\n\nconst { constants } = Runner;\nvar EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL;\nvar EVENT_RUN_END = constants.EVENT_RUN_END;\n\n/**\n * Extract file, line, and column from an error stack trace.\n *\n * @private\n * @param {string} [stackTrace] - stack trace string\n * @return {{ file?: string, line?: string, col?: string }}\n */\nfunction extractLocation(stackTrace) {\n if (!stackTrace) {\n return {};\n }\n var matches =\n /^\\s*at Context.*\\(([^()]+):([0-9]+):([0-9]+)\\)/gm.exec(stackTrace) ||\n /^\\s*at.*\\(([^()]+):([0-9]+):([0-9]+)\\)/gm.exec(stackTrace);\n if (matches === null) {\n return {};\n }\n return {\n file: matches[1],\n line: matches[2],\n col: matches[3],\n };\n}\n\n/**\n * Escape a value for use in a GitHub Actions workflow command.\n *\n * @private\n * @param {string} value\n * @return {string}\n */\nfunction escapeWorkflowValue(value) {\n return String(value)\n .replace(/%/g, \"%25\")\n .replace(/\\r/g, \"%0D\")\n .replace(/\\n/g, \"%0A\");\n}\n\n/**\n * Escape a property value for use in a GitHub Actions workflow command.\n *\n * @private\n * @param {string} value\n * @return {string}\n */\nfunction escapeWorkflowProperty(value) {\n return String(value)\n .replace(/%/g, \"%25\")\n .replace(/\\r/g, \"%0D\")\n .replace(/\\n/g, \"%0A\")\n .replace(/:/g, \"%3A\")\n .replace(/,/g, \"%2C\");\n}\n\nclass GithubActions extends Spec {\n static description =\n \"like spec, with GitHub Actions error annotations and job summary\";\n\n /**\n * Construct a new GithubActions reporter instance.\n *\n * @description\n * Extend the Spec reporter to add GitHub Actions error annotations and\n * Job Summary output when running in GitHub Actions CI.\n *\n * @public\n * @memberof Mocha.reporters\n * @extends Mocha.reporters.Spec\n * @param {Runner} runner - Instance triggers reporter actions.\n * @param {Object} [options] - runner options\n */\n constructor(runner, options) {\n super(runner, options);\n\n var ciFailures = [];\n\n runner.on(EVENT_TEST_FAIL, function (test) {\n ciFailures.push(test);\n });\n\n runner.once(EVENT_RUN_END, () => {\n if (ciFailures.length > 0) {\n process.stdout.write(\"::group::Mocha Annotations\\n\");\n\n for (var test of ciFailures) {\n var location = extractLocation(test.err && test.err.stack);\n var props = [];\n if (location.file) {\n props.push(\"file=\" + escapeWorkflowProperty(location.file));\n }\n if (location.line) {\n props.push(\"line=\" + escapeWorkflowProperty(location.line));\n }\n if (location.col) {\n props.push(\"col=\" + escapeWorkflowProperty(location.col));\n }\n\n var message = test.err ? escapeWorkflowValue(test.err.message) : \"\";\n process.stdout.write(\n \"::error \" + props.join(\",\") + \"::\" + message + \"\\n\",\n );\n }\n\n process.stdout.write(\"::endgroup::\\n\");\n }\n\n var summaryFile = process.env.GITHUB_STEP_SUMMARY;\n if (summaryFile) {\n var lines = [];\n lines.push(\n \":white_check_mark: \" +\n (this.stats.passes || 0) +\n \" passing (\" +\n ms(this.stats.duration) +\n \")\",\n );\n if (this.stats.pending) {\n lines.push(\":pause_button: \" + this.stats.pending + \" pending\");\n }\n if (this.stats.failures) {\n lines.push(\":x: \" + this.stats.failures + \" failing\");\n }\n fs.appendFileSync(summaryFile, lines.join(\"\\n\") + \"\\n\");\n }\n });\n }\n}\n\nexport { GithubActions };\n","\"use strict\";\n\n// Alias exports to a their normalized format Mocha#reporter to prevent a need\n// for dynamic (try/catch) requires, which Browserify doesn't handle.\nconst { Base } = require(\"./base.js\");\nexports.Base = exports.base = Base;\nconst { Dot } = require(\"./dot.js\");\nexports.Dot = exports.dot = Dot;\nconst { Doc } = require(\"./doc.js\");\nexports.Doc = exports.doc = Doc;\nconst { TAP } = require(\"./tap.js\");\nexports.TAP = exports.tap = TAP;\nconst { JSONReporter } = require(\"./json.js\");\nexports.JSON = exports.json = JSONReporter;\nconst { HTML } = require(\"./html.js\");\nexports.HTML = exports.html = HTML;\nconst { List } = require(\"./list.js\");\nexports.List = exports.list = List;\nconst { Min } = require(\"./min.js\");\nexports.Min = exports.min = Min;\nconst { Spec } = require(\"./spec.js\");\nexports.Spec = exports.spec = Spec;\nconst { NyanCat } = require(\"./nyan.js\");\nexports.Nyan = exports.nyan = NyanCat;\nconst { XUnit } = require(\"./xunit.js\");\nexports.XUnit = exports.xunit = XUnit;\nconst { Markdown } = require(\"./markdown.js\");\nexports.Markdown = exports.markdown = Markdown;\nconst { Progress } = require(\"./progress.js\");\nexports.Progress = exports.progress = Progress;\nconst { Landing } = require(\"./landing.js\");\nexports.Landing = exports.landing = Landing;\nconst { JSONStream } = require(\"./json-stream.js\");\nexports.JSONStream = exports[\"json-stream\"] = JSONStream;\nconst { GithubActions } = require(\"./github-actions.js\");\nexports.GithubActions = exports[\"github-actions\"] = GithubActions;\n","/**\n * @typedef {import('./types.d.ts').StatsCollector} StatsCollector\n * @typedef {import('./runner.cjs')} Runner\n */\n\n/**\n * Provides a factory function for a {@link StatsCollector} object.\n * @module\n */\n\nimport Runner from \"./runner.cjs\";\n\nconst {\n EVENT_TEST_PASS,\n EVENT_TEST_FAIL,\n EVENT_SUITE_BEGIN,\n EVENT_RUN_BEGIN,\n EVENT_TEST_PENDING,\n EVENT_RUN_END,\n EVENT_TEST_END,\n} = Runner.constants;\n\n/**\n * Provides stats such as test duration, number of tests passed / failed etc., by listening for events emitted by `runner`.\n *\n * @private\n * @param {Runner} runner - Runner instance\n * @throws {TypeError} If falsy `runner`\n */\nfunction createStatsCollector(runner) {\n /**\n * @type {StatsCollector}\n */\n var stats = {\n suites: 0,\n tests: 0,\n passes: 0,\n pending: 0,\n failures: 0,\n };\n\n if (!runner) {\n throw new TypeError(\"Missing runner argument\");\n }\n\n runner.stats = stats;\n\n runner.once(EVENT_RUN_BEGIN, function () {\n stats.start = new Date();\n });\n runner.on(EVENT_SUITE_BEGIN, function (suite) {\n suite.root || stats.suites++;\n });\n runner.on(EVENT_TEST_PASS, function () {\n stats.passes++;\n });\n runner.on(EVENT_TEST_FAIL, function () {\n stats.failures++;\n });\n runner.on(EVENT_TEST_PENDING, function () {\n stats.pending++;\n });\n runner.on(EVENT_TEST_END, function () {\n stats.tests++;\n });\n runner.once(EVENT_RUN_END, function () {\n stats.end = new Date();\n stats.duration = stats.end - stats.start;\n });\n}\n\nexport { createStatsCollector };\n","import { Runnable } from \"./runnable.js\";\nimport utils from \"./utils.cjs\";\nimport { createInvalidArgumentTypeError } from \"./errors.js\";\n\nconst { isString } = utils;\nconst { MOCHA_ID_PROP_NAME } = utils.constants;\n\nclass Test extends Runnable {\n /**\n * Initialize a new `Test` with the given `title` and callback `fn`.\n *\n * @public\n * @extends Runnable\n * @param {String} title - Test title (required)\n * @param {Function} [fn] - Test callback. If omitted, the Test is considered \"pending\"\n */\n constructor(title, fn) {\n if (!isString(title)) {\n throw createInvalidArgumentTypeError(\n 'Test argument \"title\" should be a string. Received type \"' +\n typeof title +\n '\"',\n \"title\",\n \"string\",\n );\n }\n super(title, fn);\n this.type = \"test\";\n this.reset();\n }\n\n /**\n * Resets the state initially or for a next run.\n */\n reset() {\n super.reset();\n this.pending = !this.fn;\n delete this.state;\n }\n\n /**\n * Set or get retried test\n *\n * @private\n */\n retriedTest(n) {\n if (!arguments.length) {\n return this._retriedTest;\n }\n this._retriedTest = n;\n }\n\n /**\n * Add test to the list of tests marked `only`.\n *\n * @private\n */\n markOnly() {\n this.parent.appendOnlyTest(this);\n }\n\n clone() {\n var test = new Test(this.title, this.fn);\n test.timeout(this.timeout());\n test.slow(this.slow());\n test.retries(this.retries());\n test.currentRetry(this.currentRetry());\n test.retriedTest(this.retriedTest() || this);\n test.globals(this.globals());\n test.parent = this.parent;\n test.file = this.file;\n test.ctx = this.ctx;\n return test;\n }\n\n /**\n * Returns an minimal object suitable for transmission over IPC.\n * Functions are represented by keys beginning with `$$`.\n * @private\n * @returns {Object}\n */\n serialize() {\n return {\n $$currentRetry: this._currentRetry,\n $$fullTitle: this.fullTitle(),\n $$isPending: Boolean(this.pending),\n $$retriedTest: this._retriedTest || null,\n $$slow: this._slow,\n $$titlePath: this.titlePath(),\n body: this.body,\n duration: this.duration,\n err: this.err,\n parent: {\n $$fullTitle: this.parent.fullTitle(),\n [MOCHA_ID_PROP_NAME]: this.parent.id,\n },\n speed: this.speed,\n state: this.state,\n title: this.title,\n type: this.type,\n file: this.file,\n [MOCHA_ID_PROP_NAME]: this.id,\n };\n }\n}\n\nexport { Test };\n","import { Suite } from \"../suite.js\";\nimport {\n createMissingArgumentError,\n createUnsupportedError,\n createForbiddenExclusivityError,\n} from \"../errors.js\";\n\n/**\n * Functions common to more than one interface.\n *\n * @private\n * @param {Suite[]} suites\n * @param {Context} context\n * @param {Mocha} mocha\n * @return {Object} An object containing common functions.\n */\nfunction createCommon(suites, context, mocha) {\n /**\n * Check if the suite should be tested.\n *\n * @private\n * @param {Suite} suite - suite to check\n * @returns {boolean}\n */\n function shouldBeTested(suite) {\n return (\n !mocha.options.grep ||\n (mocha.options.grep &&\n mocha.options.grep.test(suite.fullTitle()) &&\n !mocha.options.invert)\n );\n }\n\n return {\n /**\n * This is only present if flag --delay is passed into Mocha. It triggers\n * root suite execution.\n *\n * @param {Suite} suite The root suite.\n * @return {Function} A function which runs the root suite\n */\n runWithSuite: function runWithSuite(suite) {\n return function run() {\n suite.run();\n };\n },\n\n /**\n * Execute before running tests.\n *\n * @param {string} name\n * @param {Function} fn\n */\n before: function (name, fn) {\n return suites[0].beforeAll(name, fn);\n },\n\n /**\n * Execute after running tests.\n *\n * @param {string} name\n * @param {Function} fn\n */\n after: function (name, fn) {\n return suites[0].afterAll(name, fn);\n },\n\n /**\n * Execute before each test case.\n *\n * @param {string} name\n * @param {Function} fn\n */\n beforeEach: function (name, fn) {\n return suites[0].beforeEach(name, fn);\n },\n\n /**\n * Execute after each test case.\n *\n * @param {string} name\n * @param {Function} fn\n */\n afterEach: function (name, fn) {\n return suites[0].afterEach(name, fn);\n },\n\n suite: {\n /**\n * Create an exclusive Suite; convenience function\n * See docstring for create() below.\n *\n * @param {Object} opts\n * @returns {Suite}\n */\n only: function only(opts) {\n if (mocha.options.forbidOnly) {\n throw createForbiddenExclusivityError(mocha);\n }\n opts.isOnly = true;\n return this.create(opts);\n },\n\n /**\n * Create a Suite, but skip it; convenience function\n * See docstring for create() below.\n *\n * @param {Object} opts\n * @returns {Suite}\n */\n skip: function skip(opts) {\n opts.pending = true;\n return this.create(opts);\n },\n\n /**\n * Creates a suite.\n *\n * @param {Object} opts Options\n * @param {string} opts.title Title of Suite\n * @param {Function} [opts.fn] Suite Function (not always applicable)\n * @param {boolean} [opts.pending] Is Suite pending?\n * @param {string} [opts.file] Filepath where this Suite resides\n * @param {boolean} [opts.isOnly] Is Suite exclusive?\n * @returns {Suite}\n */\n create: function create(opts) {\n var suite = Suite.create(suites[0], opts.title);\n suite.pending = Boolean(opts.pending);\n suite.file = opts.file;\n suites.unshift(suite);\n if (opts.isOnly) {\n suite.markOnly();\n }\n if (\n suite.pending &&\n mocha.options.forbidPending &&\n shouldBeTested(suite)\n ) {\n throw createUnsupportedError(\"Pending test forbidden\");\n }\n if (typeof opts.fn === \"function\") {\n opts.fn.call(suite);\n suites.shift();\n } else if (typeof opts.fn === \"undefined\" && !suite.pending) {\n throw createMissingArgumentError(\n 'Suite \"' +\n suite.fullTitle() +\n '\" was defined but no callback was supplied. ' +\n \"Supply a callback or explicitly skip the suite.\",\n \"callback\",\n \"function\",\n );\n } else if (!opts.fn && suite.pending) {\n suites.shift();\n }\n\n return suite;\n },\n },\n\n test: {\n /**\n * Exclusive test-case.\n *\n * @param {Object} mocha\n * @param {Function} test\n * @returns {*}\n */\n only: function (mocha, test) {\n if (mocha.options.forbidOnly) {\n throw createForbiddenExclusivityError(mocha);\n }\n test.markOnly();\n return test;\n },\n\n /**\n * Pending test case.\n *\n * @param {string} title\n */\n skip: function (title) {\n context.test(title);\n },\n },\n };\n}\n\nexport { createCommon };\n","import { Test } from \"../test.js\";\nimport { Suite } from \"../suite.js\";\nimport { createCommon } from \"./common.js\";\n\nconst EVENT_FILE_PRE_REQUIRE = Suite.constants.EVENT_FILE_PRE_REQUIRE;\n\n/**\n * BDD-style interface:\n *\n * describe('Array', function() {\n * describe('#indexOf()', function() {\n * it('should return -1 when not present', function() {\n * // ...\n * });\n *\n * it('should return the index when present', function() {\n * // ...\n * });\n * });\n * });\n *\n * @param {Suite} suite Root suite.\n */\nfunction bddInterface(suite) {\n var suites = [suite];\n\n suite.on(EVENT_FILE_PRE_REQUIRE, function (context, file, mocha) {\n var common = createCommon(suites, context, mocha);\n\n context.before = common.before;\n context.after = common.after;\n context.beforeEach = common.beforeEach;\n context.afterEach = common.afterEach;\n context.run = mocha.options.delay && common.runWithSuite(suite);\n /**\n * Describe a \"suite\" with the given `title`\n * and callback `fn` containing nested suites\n * and/or tests.\n */\n\n context.describe = context.context = function (title, fn) {\n return common.suite.create({\n title,\n file,\n fn,\n });\n };\n\n /**\n * Pending describe.\n */\n\n context.xdescribe =\n context.xcontext =\n context.describe.skip =\n function (title, fn) {\n return common.suite.skip({\n title,\n file,\n fn,\n });\n };\n\n /**\n * Exclusive suite.\n */\n\n context.describe.only = function (title, fn) {\n return common.suite.only({\n title,\n file,\n fn,\n });\n };\n\n /**\n * Describe a specification or test-case\n * with the given `title` and callback `fn`\n * acting as a thunk.\n */\n\n context.it = context.specify = function (title, fn) {\n var suite = suites[0];\n if (suite.isPending()) {\n fn = null;\n }\n var test = new Test(title, fn);\n test.file = file;\n suite.addTest(test);\n return test;\n };\n\n /**\n * Exclusive test-case.\n */\n\n context.it.only = function (title, fn) {\n return common.test.only(mocha, context.it(title, fn));\n };\n\n /**\n * Pending test case.\n */\n\n context.xit =\n context.xspecify =\n context.it.skip =\n function (title) {\n return context.it(title);\n };\n });\n}\n\n// Required for `--list-interfaces`\nbddInterface.description = \"BDD or RSpec style [default]\";\n\nexport { bddInterface };\n","import { Test } from \"../test.js\";\nimport { Suite } from \"../suite.js\";\nimport { createCommon } from \"./common.js\";\n\nconst EVENT_FILE_PRE_REQUIRE = Suite.constants.EVENT_FILE_PRE_REQUIRE;\n\n/**\n * TDD-style interface:\n *\n * suite('Array', function() {\n * suite('#indexOf()', function() {\n * suiteSetup(function() {\n *\n * });\n *\n * test('should return -1 when not present', function() {\n *\n * });\n *\n * test('should return the index when present', function() {\n *\n * });\n *\n * suiteTeardown(function() {\n *\n * });\n * });\n * });\n *\n * @param {Suite} suite Root suite.\n */\nfunction tddInterface(suite) {\n var suites = [suite];\n\n suite.on(EVENT_FILE_PRE_REQUIRE, function (context, file, mocha) {\n var common = createCommon(suites, context, mocha);\n\n context.setup = common.beforeEach;\n context.teardown = common.afterEach;\n context.suiteSetup = common.before;\n context.suiteTeardown = common.after;\n context.run = mocha.options.delay && common.runWithSuite(suite);\n\n /**\n * Describe a \"suite\" with the given `title` and callback `fn` containing\n * nested suites and/or tests.\n */\n context.suite = function (title, fn) {\n return common.suite.create({\n title,\n file,\n fn,\n });\n };\n\n /**\n * Pending suite.\n */\n context.suite.skip = function (title, fn) {\n return common.suite.skip({\n title,\n file,\n fn,\n });\n };\n\n /**\n * Exclusive test-case.\n */\n context.suite.only = function (title, fn) {\n return common.suite.only({\n title,\n file,\n fn,\n });\n };\n\n /**\n * Describe a specification or test-case with the given `title` and\n * callback `fn` acting as a thunk.\n */\n context.test = function (title, fn) {\n var suite = suites[0];\n if (suite.isPending()) {\n fn = null;\n }\n var test = new Test(title, fn);\n test.file = file;\n suite.addTest(test);\n return test;\n };\n\n /**\n * Exclusive test-case.\n */\n\n context.test.only = function (title, fn) {\n return common.test.only(mocha, context.test(title, fn));\n };\n\n context.test.skip = common.test.skip;\n });\n}\n\n// Required for `--list-interfaces`\ntddInterface.description =\n 'traditional \"suite\"/\"test\" instead of BDD\\'s \"describe\"/\"it\"';\n\nexport { tddInterface };\n","import { Test } from \"../test.js\";\nimport { Suite } from \"../suite.js\";\nimport { createCommon } from \"./common.js\";\n\nconst EVENT_FILE_PRE_REQUIRE = Suite.constants.EVENT_FILE_PRE_REQUIRE;\n\n/**\n * QUnit-style interface:\n *\n * suite('Array');\n *\n * test('#length', function() {\n * var arr = [1,2,3];\n * ok(arr.length == 3);\n * });\n *\n * test('#indexOf()', function() {\n * var arr = [1,2,3];\n * ok(arr.indexOf(1) == 0);\n * ok(arr.indexOf(2) == 1);\n * ok(arr.indexOf(3) == 2);\n * });\n *\n * suite('String');\n *\n * test('#length', function() {\n * ok('foo'.length == 3);\n * });\n *\n * @param {Suite} suite Root suite.\n */\nfunction qUnitInterface(suite) {\n var suites = [suite];\n\n suite.on(EVENT_FILE_PRE_REQUIRE, function (context, file, mocha) {\n var common = createCommon(suites, context, mocha);\n\n context.before = common.before;\n context.after = common.after;\n context.beforeEach = common.beforeEach;\n context.afterEach = common.afterEach;\n context.run = mocha.options.delay && common.runWithSuite(suite);\n /**\n * Describe a \"suite\" with the given `title`.\n */\n\n context.suite = function (title) {\n if (suites.length > 1) {\n suites.shift();\n }\n return common.suite.create({\n title,\n file,\n fn: false,\n });\n };\n\n /**\n * Exclusive Suite.\n */\n\n context.suite.only = function (title) {\n if (suites.length > 1) {\n suites.shift();\n }\n return common.suite.only({\n title,\n file,\n fn: false,\n });\n };\n\n /**\n * Describe a specification or test-case\n * with the given `title` and callback `fn`\n * acting as a thunk.\n */\n\n context.test = function (title, fn) {\n var test = new Test(title, fn);\n test.file = file;\n suites[0].addTest(test);\n return test;\n };\n\n /**\n * Exclusive test-case.\n */\n\n context.test.only = function (title, fn) {\n return common.test.only(mocha, context.test(title, fn));\n };\n\n context.test.skip = common.test.skip;\n });\n}\n\n// Required for `--list-interfaces`\nqUnitInterface.description = \"QUnit style\";\n\nexport { qUnitInterface };\n","import { Suite } from \"../suite.js\";\nimport { Test } from \"../test.js\";\n\n/**\n * Exports-style (as Node.js module) interface:\n *\n * exports.Array = {\n * '#indexOf()': {\n * 'should return -1 when the value is not present': function() {\n *\n * },\n *\n * 'should return the correct index when the value is present': function() {\n *\n * }\n * }\n * };\n *\n * @param {Suite} suite Root suite.\n */\nfunction exportsInterface(suite) {\n var suites = [suite];\n\n suite.on(Suite.constants.EVENT_FILE_REQUIRE, visit);\n\n function visit(obj, file) {\n var suite;\n for (var key in obj) {\n if (typeof obj[key] === \"function\") {\n var fn = obj[key];\n switch (key) {\n case \"before\":\n suites[0].beforeAll(fn);\n break;\n case \"after\":\n suites[0].afterAll(fn);\n break;\n case \"beforeEach\":\n suites[0].beforeEach(fn);\n break;\n case \"afterEach\":\n suites[0].afterEach(fn);\n break;\n default:\n var test = new Test(key, fn);\n test.file = file;\n suites[0].addTest(test);\n }\n } else {\n suite = Suite.create(suites[0], key);\n suites.unshift(suite);\n visit(obj[key], file);\n suites.shift();\n }\n }\n }\n}\n\n// Required for `--list-interfaces`\nexportsInterface.description = 'Node.js module (\"exports\") style';\n\nexport { exportsInterface };\n","/**\n * @typedef {import('./runnable.js')} Runnable\n */\n\n/**\n * Initialize a new `Context`.\n *\n * @private\n */\nclass Context {\n constructor() {}\n /**\n * Set or get the context `Runnable` to `runnable`.\n *\n * @private\n * @param {Runnable} runnable\n * @return {Context} context\n */\n runnable(runnable) {\n if (!arguments.length) {\n return this._runnable;\n }\n this.test = this._runnable = runnable;\n return this;\n }\n /**\n * Set or get test timeout `ms`.\n *\n * @private\n * @param {number} ms\n * @return {Context} self\n */\n timeout(ms) {\n if (!arguments.length) {\n return this.runnable().timeout();\n }\n this.runnable().timeout(ms);\n return this;\n }\n /**\n * Set or get test slowness threshold `ms`.\n *\n * @private\n * @param {number} ms\n * @return {Context} self\n */\n slow(ms) {\n if (!arguments.length) {\n return this.runnable().slow();\n }\n this.runnable().slow(ms);\n return this;\n }\n /**\n * Mark a test as skipped.\n *\n * @private\n * @throws PendingError\n */\n skip() {\n this.runnable().skip();\n }\n /**\n * Set or get a number of allowed retries on failed tests\n *\n * @private\n * @param {number} n\n * @return {Context} self\n */\n retries(n) {\n if (!arguments.length) {\n return this.runnable().retries();\n }\n this.runnable().retries(n);\n return this;\n }\n}\n\nexport { Context };\n","\"use strict\";\n\n/*!\n * mocha\n * Copyright(c) 2011 TJ Holowaychuk \n * MIT Licensed\n */\n\nvar { escapeRegExp } = require(\"./utils/regexp.js\");\nvar path = require(\"node:path\");\nvar builtinReporters = require(\"./reporters/index.cjs\");\nvar utils = require(\"./utils.cjs\");\nvar mocharc = require(\"./mocharc.json\");\nvar { Suite } = require(\"./suite.js\");\nvar esmUtils = require(\"./nodejs/esm-utils.cjs\");\nvar createStatsCollector = require(\"./stats-collector.js\").createStatsCollector;\nconst {\n createInvalidReporterError,\n createInvalidInterfaceError,\n createMochaInstanceAlreadyDisposedError,\n createMochaInstanceAlreadyRunningError,\n createUnsupportedError,\n} = require(\"./errors.js\");\nconst { EVENT_FILE_PRE_REQUIRE, EVENT_FILE_POST_REQUIRE, EVENT_FILE_REQUIRE } =\n Suite.constants;\nvar debug = require(\"debug\")(\"mocha:mocha\");\n\n/**\n * @typedef {import('./types.d.ts').DoneCB} DoneCB\n * @typedef {import('./types.d.ts').MochaGlobalFixture} MochaGlobalFixture\n * @typedef {import('./types.d.ts').MochaOptions} MochaOptions\n * @typedef {import('./types.d.ts').MochaRootHookObject} MochaRootHookObject\n * @typedef {import('./types.d.ts').Reporter} Reporter\n */\n\n// Legacy CJS-style require() export, as well as default in ESM\nexports = module.exports = Mocha;\n\n// Modern property-based / ESM named export\nmodule.exports.Mocha = Mocha;\n\n/**\n * A Mocha instance is a finite state machine.\n * These are the states it can be in.\n * @private\n */\nvar mochaStates = utils.defineConstants({\n /**\n * Initial state of the mocha instance\n * @private\n */\n INIT: \"init\",\n /**\n * Mocha instance is running tests\n * @private\n */\n RUNNING: \"running\",\n /**\n * Mocha instance is done running tests and references to test functions and hooks are cleaned.\n * You can reset this state by unloading the test files.\n * @private\n */\n REFERENCES_CLEANED: \"referencesCleaned\",\n /**\n * Mocha instance is disposed and can no longer be used.\n * @private\n */\n DISPOSED: \"disposed\",\n});\n\n/**\n * To require local UIs and reporters when running in node.\n */\n\nif (!utils.isBrowser() && typeof module.paths !== \"undefined\") {\n var cwd = utils.cwd();\n module.paths.push(cwd, path.join(cwd, \"node_modules\"));\n}\n\n/**\n * Expose internals.\n * @private\n */\n\nexports.utils = utils;\n// Must be extensible, see `should add the interface` test\n// in `run-helpers.spec.js`\nexports.interfaces = { ...require(\"./interfaces/index.js\") };\n/**\n * @public\n * @memberof Mocha\n */\nexports.reporters = builtinReporters;\nexports.Runnable = require(\"./runnable.js\").Runnable;\nexports.Context = require(\"./context.js\").Context;\n/**\n *\n * @memberof Mocha\n */\nexports.Runner = require(\"./runner.cjs\");\nexports.Suite = Suite;\nexports.Hook = require(\"./hook.js\").Hook;\nexports.Test = require(\"./test.js\").Test;\n\nlet currentContext;\nexports.afterEach = function (...args) {\n return (currentContext.afterEach || currentContext.teardown).apply(\n this,\n args,\n );\n};\nexports.after = function (...args) {\n return (currentContext.after || currentContext.suiteTeardown).apply(\n this,\n args,\n );\n};\nexports.beforeEach = function (...args) {\n return (currentContext.beforeEach || currentContext.setup).apply(this, args);\n};\nexports.before = function (...args) {\n return (currentContext.before || currentContext.suiteSetup).apply(this, args);\n};\nexports.describe = function (...args) {\n return (currentContext.describe || currentContext.suite).apply(this, args);\n};\nexports.describe.only = function (...args) {\n return (currentContext.describe || currentContext.suite).only.apply(\n this,\n args,\n );\n};\nexports.describe.skip = function (...args) {\n return (currentContext.describe || currentContext.suite).skip.apply(\n this,\n args,\n );\n};\nexports.it = function (...args) {\n return (currentContext.it || currentContext.test).apply(this, args);\n};\nexports.it.only = function (...args) {\n return (currentContext.it || currentContext.test).only.apply(this, args);\n};\nexports.it.skip = function (...args) {\n return (currentContext.it || currentContext.test).skip.apply(this, args);\n};\nexports.xdescribe = exports.describe.skip;\nexports.xit = exports.it.skip;\nexports.setup = exports.beforeEach;\nexports.suiteSetup = exports.before;\nexports.suiteTeardown = exports.after;\nexports.suite = exports.describe;\nexports.teardown = exports.afterEach;\nexports.test = exports.it;\nexports.run = function (...args) {\n return currentContext.run.apply(this, args);\n};\n\n/**\n * Constructs a new Mocha instance with `options`.\n *\n * @public\n * @class Mocha\n * @param {MochaOptions} [options] - Settings object.\n */\nfunction Mocha(options = {}) {\n options = { ...mocharc, ...options };\n this.files = [];\n this.options = options;\n // root suite\n this.suite = new exports.Suite(\"\", new exports.Context(), true);\n this._cleanReferencesAfterRun = true;\n this._state = mochaStates.INIT;\n\n this.grep(options.grep)\n .fgrep(options.fgrep)\n .ui(options.ui)\n .reporter(\n options.reporter,\n options[\"reporter-option\"] ||\n options.reporterOption ||\n options.reporterOptions, // for backwards compatibility\n )\n .slow(options.slow)\n .global(options.global);\n\n // this guard exists because Suite#timeout does not consider `undefined` to be valid input\n if (typeof options.timeout !== \"undefined\") {\n this.timeout(options.timeout === false ? 0 : options.timeout);\n }\n\n if (\"retries\" in options) {\n this.retries(options.retries);\n }\n\n [\n \"allowUncaught\",\n \"asyncOnly\",\n \"bail\",\n \"checkLeaks\",\n \"color\",\n \"delay\",\n \"diff\",\n \"dryRun\",\n \"passOnFailingTestSuite\",\n \"failZero\",\n \"forbidOnly\",\n \"forbidPending\",\n \"fullTrace\",\n \"inlineDiffs\",\n \"invert\",\n ].forEach(function (opt) {\n if (options[opt]) {\n this[opt]();\n }\n }, this);\n\n if (options.rootHooks) {\n this.rootHooks(options.rootHooks);\n }\n\n /**\n * The class which we'll instantiate in {@link Mocha#run}. Defaults to\n * {@link Runner} in serial mode; changes in parallel mode.\n * @memberof Mocha\n * @private\n */\n this._runnerClass = exports.Runner;\n\n /**\n * Whether or not to call {@link Mocha#loadFiles} implicitly when calling\n * {@link Mocha#run}. If this is `true`, then it's up to the consumer to call\n * {@link Mocha#loadFiles} _or_ {@link Mocha#loadFilesAsync}.\n * @private\n * @memberof Mocha\n */\n this._lazyLoadFiles = false;\n\n /**\n * It's useful for a Mocha instance to know if it's running in a worker process.\n * We could derive this via other means, but it's helpful to have a flag to refer to.\n * @memberof Mocha\n * @private\n */\n this.isWorker = Boolean(options.isWorker);\n\n this.globalSetup(options.globalSetup)\n .globalTeardown(options.globalTeardown)\n .enableGlobalSetup(options.enableGlobalSetup)\n .enableGlobalTeardown(options.enableGlobalTeardown);\n\n if (\n options.parallel &&\n (typeof options.jobs === \"undefined\" || options.jobs > 1)\n ) {\n debug(\"attempting to enable parallel mode\");\n this.parallelMode(true);\n }\n}\n\n/**\n * Enables or disables bailing on the first failure.\n *\n * @public\n * @see [CLI option](../#-bail-b)\n * @param {boolean} [bail=true] - Whether to bail on first error.\n * @returns {Mocha} this\n * @chainable\n */\nMocha.prototype.bail = function (bail) {\n this.suite.bail(bail !== false);\n return this;\n};\n\n/**\n * @summary\n * Adds `file` to be loaded for execution.\n *\n * @description\n * Useful for generic setup code that must be included within test suite.\n *\n * @public\n * @see [CLI option](../#-file-filedirectoryglob)\n * @param {string} file - Pathname of file to be loaded.\n * @returns {Mocha} this\n * @chainable\n */\nMocha.prototype.addFile = function (file) {\n this.files.push(file);\n return this;\n};\n\n/**\n * Sets reporter to `reporter`, defaults to \"spec\".\n *\n * @public\n * @see [CLI option](../#-reporter-name-r-name)\n * @see [Reporters](../#reporters)\n * @param {String|Reporter} reporterName - Reporter name or constructor.\n * @param {Object} [reporterOptions] - Options used to configure the reporter.\n * @returns {Mocha} this\n * @chainable\n * @throws {Error} if requested reporter cannot be loaded\n * @example\n *\n * // Use XUnit reporter and direct its output to file\n * mocha.reporter('xunit', { output: '/path/to/testspec.xunit.xml' });\n */\nMocha.prototype.reporter = function (reporterName, reporterOptions) {\n if (typeof reporterName === \"function\") {\n this._reporter = reporterName;\n } else {\n reporterName = reporterName || \"spec\";\n var reporter;\n // Try to load a built-in reporter.\n if (builtinReporters[reporterName]) {\n reporter = builtinReporters[reporterName];\n }\n // Try to load reporters from process.cwd() and node_modules\n if (!reporter) {\n let foundReporter;\n try {\n foundReporter = require.resolve(reporterName);\n reporter = require(foundReporter);\n } catch (err) {\n if (foundReporter) {\n throw createInvalidReporterError(err.message, foundReporter);\n }\n // Try to load reporters from a cwd-relative path\n try {\n reporter = require(path.resolve(reporterName));\n } catch (err) {\n throw createInvalidReporterError(err.message, reporterName);\n }\n }\n }\n if (reporter.default) {\n reporter = reporter.default;\n }\n\n this._reporter = reporter;\n }\n this.options.reporterOption = reporterOptions;\n // alias option name is used in built-in reporters xunit/tap/progress\n this.options.reporterOptions = reporterOptions;\n return this;\n};\n\n/**\n * Sets test UI `name`, defaults to \"bdd\".\n *\n * @public\n * @see [CLI option](../#-ui-name-u-name)\n * @see [Interface DSLs](../#interfaces)\n * @param {string|Function} [ui=bdd] - Interface name or class.\n * @returns {Mocha} this\n * @chainable\n * @throws {Error} if requested interface cannot be loaded\n */\nMocha.prototype.ui = function (ui) {\n var bindInterface;\n if (typeof ui === \"function\") {\n bindInterface = ui;\n } else {\n ui = ui || \"bdd\";\n bindInterface = exports.interfaces[ui];\n if (!bindInterface) {\n try {\n bindInterface = require(ui);\n } catch {\n throw createInvalidInterfaceError(`invalid interface '${ui}'`, ui);\n }\n }\n }\n if (bindInterface.default) {\n bindInterface = bindInterface.default;\n }\n\n bindInterface(this.suite);\n\n this.suite.on(EVENT_FILE_PRE_REQUIRE, function (context) {\n currentContext = context;\n });\n\n return this;\n};\n\n/**\n * Loads `files` prior to execution. Does not support ES Modules.\n *\n * @description\n * The implementation relies on Node's `require` to execute\n * the test interface functions and will be subject to its cache.\n * Supports only CommonJS modules. To load ES modules, use Mocha#loadFilesAsync.\n *\n * @private\n * @see {@link Mocha#addFile}\n * @see {@link Mocha#run}\n * @see {@link Mocha#unloadFiles}\n * @see {@link Mocha#loadFilesAsync}\n * @param {Function} [fn] - Callback invoked upon completion.\n */\nMocha.prototype.loadFiles = function (fn) {\n var self = this;\n var suite = this.suite;\n this.files.forEach(function (file) {\n file = path.resolve(file);\n suite.emit(EVENT_FILE_PRE_REQUIRE, global, file, self);\n suite.emit(EVENT_FILE_REQUIRE, require(file), file, self);\n suite.emit(EVENT_FILE_POST_REQUIRE, global, file, self);\n });\n fn && fn();\n};\n\n/**\n * Loads `files` prior to execution. Supports Node ES Modules.\n *\n * @description\n * The implementation relies on Node's `require` and `import` to execute\n * the test interface functions and will be subject to its cache.\n * Supports both CJS and ESM modules.\n *\n * @public\n * @see {@link Mocha#addFile}\n * @see {@link Mocha#run}\n * @see {@link Mocha#unloadFiles}\n * @param {Object} [options] - Settings object.\n * @param {Function} [options.esmDecorator] - Function invoked on esm module name right before importing it. By default will passthrough as is.\n * @returns {Promise}\n * @example\n *\n * // loads ESM (and CJS) test files asynchronously, then runs root suite\n * mocha.loadFilesAsync()\n * .then(() => mocha.run(failures => process.exitCode = failures ? 1 : 0))\n * .catch(() => process.exitCode = 1);\n */\nMocha.prototype.loadFilesAsync = function ({ esmDecorator } = {}) {\n var self = this;\n var suite = this.suite;\n this.lazyLoadFiles(true);\n\n return esmUtils.loadFilesAsync(\n this.files,\n function (file) {\n suite.emit(EVENT_FILE_PRE_REQUIRE, global, file, self);\n },\n function (file, resultModule) {\n suite.emit(EVENT_FILE_REQUIRE, resultModule, file, self);\n suite.emit(EVENT_FILE_POST_REQUIRE, global, file, self);\n },\n esmDecorator,\n );\n};\n\n/**\n * Removes a previously loaded file from Node's `require` cache.\n *\n * @private\n * @static\n * @see {@link Mocha#unloadFiles}\n * @param {string} file - Pathname of file to be unloaded.\n */\nMocha.unloadFile = function (file) {\n if (utils.isBrowser()) {\n throw createUnsupportedError(\n \"unloadFile() is only supported in a Node.js environment\",\n );\n }\n return require(\"./nodejs/file-unloader.cjs\").unloadFile(file);\n};\n\n/**\n * Unloads `files` from Node's `require` cache.\n *\n * @description\n * This allows required files to be \"freshly\" reloaded, providing the ability\n * to reuse a Mocha instance programmatically.\n * Note: does not clear ESM module files from the cache\n *\n * Intended for consumers — not used internally\n *\n * @public\n * @see {@link Mocha#run}\n * @returns {Mocha} this\n * @chainable\n */\nMocha.prototype.unloadFiles = function () {\n if (this._state === mochaStates.DISPOSED) {\n throw createMochaInstanceAlreadyDisposedError(\n \"Mocha instance is already disposed, it cannot be used again.\",\n this._cleanReferencesAfterRun,\n this,\n );\n }\n\n this.files.forEach(function (file) {\n Mocha.unloadFile(file);\n });\n this._state = mochaStates.INIT;\n return this;\n};\n\n/**\n * Sets `grep` filter after escaping RegExp special characters.\n *\n * @public\n * @see {@link Mocha#grep}\n * @param {string} str - Value to be converted to a regexp.\n * @returns {Mocha} this\n * @chainable\n * @example\n *\n * // Select tests whose full title begins with `\"foo\"` followed by a period\n * mocha.fgrep('foo.');\n */\nMocha.prototype.fgrep = function (str) {\n if (!str) {\n return this;\n }\n return this.grep(new RegExp(escapeRegExp(str)));\n};\n\n/**\n * @summary\n * Sets `grep` filter used to select specific tests for execution.\n *\n * @description\n * If `re` is a regexp-like string, it will be converted to regexp.\n * The regexp is tested against the full title of each test (i.e., the\n * name of the test preceded by titles of each its ancestral suites).\n * As such, using an exact-match fixed pattern against the\n * test name itself will not yield any matches.\n *
              \n * Previous filter value will be overwritten on each call!\n *\n * @public\n * @see [CLI option](../#-grep-regexp-g-regexp)\n * @see {@link Mocha#fgrep}\n * @see {@link Mocha#invert}\n * @param {RegExp|String} re - Regular expression used to select tests.\n * @return {Mocha} this\n * @chainable\n * @example\n *\n * // Select tests whose full title contains `\"match\"`, ignoring case\n * mocha.grep(/match/i);\n * @example\n *\n * // Same as above but with regexp-like string argument\n * mocha.grep('/match/i');\n * @example\n *\n * // ## Anti-example\n * // Given embedded test `it('only-this-test')`...\n * mocha.grep('/^only-this-test$/'); // NO! Use `.only()` to do this!\n */\nMocha.prototype.grep = function (re) {\n if (utils.isString(re)) {\n // extract args if it's regex-like, i.e: [string, pattern, flag]\n var arg = re.match(/^\\/(.*)\\/([a-z]*)$|.*/);\n this.options.grep = new RegExp(arg[1] || arg[0], arg[2]);\n } else {\n this.options.grep = re;\n }\n return this;\n};\n\n/**\n * Inverts `grep` matches.\n *\n * @public\n * @see {@link Mocha#grep}\n * @return {Mocha} this\n * @chainable\n * @example\n *\n * // Select tests whose full title does *not* contain `\"match\"`, ignoring case\n * mocha.grep(/match/i).invert();\n */\nMocha.prototype.invert = function () {\n this.options.invert = true;\n return this;\n};\n\n/**\n * Enables or disables checking for global variables leaked while running tests.\n *\n * @public\n * @see [CLI option](../#-check-leaks)\n * @param {boolean} [checkLeaks=true] - Whether to check for global variable leaks.\n * @return {Mocha} this\n * @chainable\n */\nMocha.prototype.checkLeaks = function (checkLeaks) {\n this.options.checkLeaks = checkLeaks !== false;\n return this;\n};\n\n/**\n * Enables or disables whether or not to dispose after each test run.\n * Disable this to ensure you can run the test suite multiple times.\n * If disabled, be sure to dispose mocha when you're done to prevent memory leaks.\n * @public\n * @see {@link Mocha#dispose}\n * @param {boolean} cleanReferencesAfterRun\n * @return {Mocha} this\n * @chainable\n */\nMocha.prototype.cleanReferencesAfterRun = function (cleanReferencesAfterRun) {\n this._cleanReferencesAfterRun = cleanReferencesAfterRun !== false;\n return this;\n};\n\n/**\n * Manually dispose this mocha instance. Mark this instance as `disposed` and unable to run more tests.\n * It also removes function references to tests functions and hooks, so variables trapped in closures can be cleaned by the garbage collector.\n * @public\n */\nMocha.prototype.dispose = function () {\n if (this._state === mochaStates.RUNNING) {\n throw createMochaInstanceAlreadyRunningError(\n \"Cannot dispose while the mocha instance is still running tests.\",\n );\n }\n this.unloadFiles();\n this._previousRunner && this._previousRunner.dispose();\n this.suite.dispose();\n this._state = mochaStates.DISPOSED;\n};\n\n/**\n * Displays full stack trace upon test failure.\n *\n * @public\n * @see [CLI option](../#-full-trace)\n * @param {boolean} [fullTrace=true] - Whether to print full stacktrace upon failure.\n * @return {Mocha} this\n * @chainable\n */\nMocha.prototype.fullTrace = function (fullTrace) {\n this.options.fullTrace = fullTrace !== false;\n return this;\n};\n\n/**\n * Specifies whitelist of variable names to be expected in global scope.\n *\n * @public\n * @see [CLI option](../#-global-variable-name)\n * @see {@link Mocha#checkLeaks}\n * @param {String[]|String} global - Accepted global variable name(s).\n * @return {Mocha} this\n * @chainable\n * @example\n *\n * // Specify variables to be expected in global scope\n * mocha.global(['jQuery', 'MyLib']);\n */\nMocha.prototype.global = function (global) {\n this.options.global = (this.options.global || [])\n .concat(global)\n .filter(Boolean)\n .filter(function (elt, idx, arr) {\n return arr.indexOf(elt) === idx;\n });\n return this;\n};\n// for backwards compatibility, 'globals' is an alias of 'global'\nMocha.prototype.globals = Mocha.prototype.global;\n\n/**\n * Enables or disables TTY color output by screen-oriented reporters.\n *\n * @public\n * @see [CLI option](../#-color-c-colors)\n * @param {boolean} [color=true] - Whether to enable color output.\n * @return {Mocha} this\n * @chainable\n */\nMocha.prototype.color = function (color) {\n this.options.color = color !== false;\n return this;\n};\n\n/**\n * Enables or disables reporter to use inline diffs (rather than +/-)\n * in test failure output.\n *\n * @public\n * @see [CLI option](../#-inline-diffs)\n * @param {boolean} [inlineDiffs=true] - Whether to use inline diffs.\n * @return {Mocha} this\n * @chainable\n */\nMocha.prototype.inlineDiffs = function (inlineDiffs) {\n this.options.inlineDiffs = inlineDiffs !== false;\n return this;\n};\n\n/**\n * Enables or disables reporter to include diff in test failure output.\n *\n * @public\n * @see [CLI option](../#-diff)\n * @param {boolean} [diff=true] - Whether to show diff on failure.\n * @return {Mocha} this\n * @chainable\n */\nMocha.prototype.diff = function (diff) {\n this.options.diff = diff !== false;\n return this;\n};\n\n/**\n * @summary\n * Sets timeout threshold value.\n *\n * @description\n * A string argument can use shorthand (such as \"2s\") and will be converted.\n * If the value is `0`, timeouts will be disabled.\n *\n * @public\n * @see [CLI option](../#-timeout-ms-t-ms)\n * @see [Timeouts](../#timeouts)\n * @param {number|string} msecs - Timeout threshold value.\n * @return {Mocha} this\n * @chainable\n * @example\n *\n * // Sets timeout to one second\n * mocha.timeout(1000);\n * @example\n *\n * // Same as above but using string argument\n * mocha.timeout('1s');\n */\nMocha.prototype.timeout = function (msecs) {\n this.suite.timeout(msecs);\n return this;\n};\n\n/**\n * Sets the number of times to retry failed tests.\n *\n * @public\n * @see [CLI option](../#-retries-n)\n * @see [Retry Tests](../#retry-tests)\n * @param {number} retry - Number of times to retry failed tests.\n * @return {Mocha} this\n * @chainable\n * @example\n *\n * // Allow any failed test to retry one more time\n * mocha.retries(1);\n */\nMocha.prototype.retries = function (retry) {\n this.suite.retries(retry);\n return this;\n};\n\n/**\n * Sets slowness threshold value.\n *\n * @public\n * @see [CLI option](../#-slow-ms-s-ms)\n * @param {number} msecs - Slowness threshold value.\n * @return {Mocha} this\n * @chainable\n * @example\n *\n * // Sets \"slow\" threshold to half a second\n * mocha.slow(500);\n * @example\n *\n * // Same as above but using string argument\n * mocha.slow('0.5s');\n */\nMocha.prototype.slow = function (msecs) {\n this.suite.slow(msecs);\n return this;\n};\n\n/**\n * Forces all tests to either accept a `done` callback or return a promise.\n *\n * @public\n * @see [CLI option](../#-async-only-a)\n * @param {boolean} [asyncOnly=true] - Whether to force `done` callback or promise.\n * @return {Mocha} this\n * @chainable\n */\nMocha.prototype.asyncOnly = function (asyncOnly) {\n this.options.asyncOnly = asyncOnly !== false;\n return this;\n};\n\n/**\n * Disables syntax highlighting (in browser).\n *\n * @public\n * @return {Mocha} this\n * @chainable\n */\nMocha.prototype.noHighlighting = function () {\n this.options.noHighlighting = true;\n return this;\n};\n\n/**\n * Enables or disables uncaught errors to propagate.\n *\n * @public\n * @see [CLI option](../#-allow-uncaught)\n * @param {boolean} [allowUncaught=true] - Whether to propagate uncaught errors.\n * @return {Mocha} this\n * @chainable\n */\nMocha.prototype.allowUncaught = function (allowUncaught) {\n this.options.allowUncaught = allowUncaught !== false;\n return this;\n};\n\n/**\n * @summary\n * Delays root suite execution.\n *\n * @description\n * Used to perform async operations before any suites are run.\n *\n * @public\n * @see [delayed root suite](../#delayed-root-suite)\n * @returns {Mocha} this\n * @chainable\n */\nMocha.prototype.delay = function delay() {\n this.options.delay = true;\n return this;\n};\n\n/**\n * Enables or disables running tests in dry-run mode.\n *\n * @public\n * @see [CLI option](../#-dry-run)\n * @param {boolean} [dryRun=true] - Whether to activate dry-run mode.\n * @return {Mocha} this\n * @chainable\n */\nMocha.prototype.dryRun = function (dryRun) {\n this.options.dryRun = dryRun !== false;\n return this;\n};\n\n/**\n * Reports tests as failed when they are skipped due to a hook failure.\n *\n * @public\n * @see [CLI option](../#-fail-hook-affected-tests)\n * @param {boolean} [failHookAffectedTests=true] - Whether to fail tests affected by hook failures.\n * @return {Mocha} this\n * @chainable\n */\nMocha.prototype.failHookAffectedTests = function (failHookAffectedTests) {\n this.options.failHookAffectedTests = failHookAffectedTests !== false;\n return this;\n};\n\n/**\n * Fails test run if no tests encountered with exit-code 1.\n *\n * @public\n * @see [CLI option](../#-fail-zero)\n * @param {boolean} [failZero=true] - Whether to fail test run.\n * @return {Mocha} this\n * @chainable\n */\nMocha.prototype.failZero = function (failZero) {\n this.options.failZero = failZero !== false;\n return this;\n};\n\n/**\n * Fail test run if tests were failed.\n *\n * @public\n * @see [CLI option](../#-pass-on-failing-test-suite)\n * @param {boolean} [passOnFailingTestSuite=false] - Whether to fail test run.\n * @return {Mocha} this\n * @chainable\n */\nMocha.prototype.passOnFailingTestSuite = function (passOnFailingTestSuite) {\n this.options.passOnFailingTestSuite = passOnFailingTestSuite === true;\n return this;\n};\n\n/**\n * Causes tests marked `only` to fail the suite.\n *\n * @public\n * @see [CLI option](../#-forbid-only)\n * @param {boolean} [forbidOnly=true] - Whether tests marked `only` fail the suite.\n * @returns {Mocha} this\n * @chainable\n */\nMocha.prototype.forbidOnly = function (forbidOnly) {\n this.options.forbidOnly = forbidOnly !== false;\n return this;\n};\n\n/**\n * Causes pending tests and tests marked `skip` to fail the suite.\n *\n * @public\n * @see [CLI option](../#-forbid-pending)\n * @param {boolean} [forbidPending=true] - Whether pending tests fail the suite.\n * @returns {Mocha} this\n * @chainable\n */\nMocha.prototype.forbidPending = function (forbidPending) {\n this.options.forbidPending = forbidPending !== false;\n return this;\n};\n\n/**\n * Throws an error if mocha is in the wrong state to be able to transition to a \"running\" state.\n * @private\n */\nMocha.prototype._guardRunningStateTransition = function () {\n if (this._state === mochaStates.RUNNING) {\n throw createMochaInstanceAlreadyRunningError(\n \"Mocha instance is currently running tests, cannot start a next test run until this one is done\",\n this,\n );\n }\n if (\n this._state === mochaStates.DISPOSED ||\n this._state === mochaStates.REFERENCES_CLEANED\n ) {\n throw createMochaInstanceAlreadyDisposedError(\n \"Mocha instance is already disposed, cannot start a new test run. Please create a new mocha instance. Be sure to set disable `cleanReferencesAfterRun` when you want to reuse the same mocha instance for multiple test runs.\",\n this._cleanReferencesAfterRun,\n this,\n );\n }\n};\n\n/**\n * Mocha version as specified by \"package.json\".\n *\n * @name Mocha#version\n * @type string\n * @readonly\n */\nObject.defineProperty(Mocha.prototype, \"version\", {\n value: require(\"../package.json\").version,\n configurable: false,\n enumerable: true,\n writable: false,\n});\n\n/**\n * Runs root suite and invokes `fn()` when complete.\n *\n * @description\n * To run tests multiple times (or to run tests in files that are\n * already in the `require` cache), make sure to clear them from\n * the cache first!\n *\n * @public\n * @see {@link Mocha#unloadFiles}\n * @see {@link Runner#run}\n * @param {DoneCB} [fn] - Callback invoked when test execution completed.\n * @returns {import(\"./runner.cjs\")} runner instance\n * @example\n *\n * // exit with non-zero status if there were test failures\n * mocha.run(failures => process.exitCode = failures ? 1 : 0);\n */\nMocha.prototype.run = function (fn) {\n this._guardRunningStateTransition();\n this._state = mochaStates.RUNNING;\n if (this._previousRunner) {\n this._previousRunner.dispose();\n this.suite.reset();\n }\n if (this.files.length && !this._lazyLoadFiles) {\n this.loadFiles();\n }\n var suite = this.suite;\n var options = this.options;\n options.files = this.files;\n const runner = new this._runnerClass(suite, {\n cleanReferencesAfterRun: this._cleanReferencesAfterRun,\n delay: options.delay,\n dryRun: options.dryRun,\n failHookAffectedTests: options.failHookAffectedTests,\n failZero: options.failZero,\n });\n createStatsCollector(runner);\n var reporter = new this._reporter(runner, options);\n runner.checkLeaks = options.checkLeaks === true;\n runner.fullStackTrace = options.fullTrace;\n runner.asyncOnly = options.asyncOnly;\n runner.allowUncaught = options.allowUncaught;\n runner.forbidOnly = options.forbidOnly;\n runner.forbidPending = options.forbidPending;\n if (options.grep) {\n runner.grep(options.grep, options.invert);\n }\n if (options.global) {\n runner.globals(options.global);\n }\n if (options.color !== undefined) {\n exports.reporters.Base.useColors = options.color;\n }\n exports.reporters.Base.inlineDiffs = options.inlineDiffs;\n exports.reporters.Base.hideDiff = !options.diff;\n\n const done = (failures) => {\n this._previousRunner = runner;\n this._state = this._cleanReferencesAfterRun\n ? mochaStates.REFERENCES_CLEANED\n : mochaStates.INIT;\n fn = fn || utils.noop;\n if (typeof reporter.done === \"function\") {\n reporter.done(failures, fn);\n } else {\n fn(failures);\n }\n };\n\n const reportFixtureError = (phase, err) => {\n process.stderr.write(\n `\\n[mocha] global ${phase} failed:\\n${err && err.stack ? err.stack : err}\\n`,\n );\n };\n\n const runAsync = async (runner) => {\n let context = {};\n if (this.options.enableGlobalSetup && this.hasGlobalSetupFixtures()) {\n try {\n context = await this.runGlobalSetup(runner);\n } catch (err) {\n reportFixtureError(\"setup\", err);\n return 1;\n }\n }\n const failureCount = await runner.runAsync({\n files: this.files,\n options,\n });\n if (this.options.enableGlobalTeardown && this.hasGlobalTeardownFixtures()) {\n try {\n await this.runGlobalTeardown(runner, { context });\n } catch (err) {\n reportFixtureError(\"teardown\", err);\n return failureCount + 1;\n }\n }\n return failureCount;\n };\n\n // Errors coming out of Runner#run itself remain uncaught/unhandled and are picked up by the `process` event listeners.\n // Only global fixture errors are intercepted above so they surface to the user instead of being silently \"swallowed\".\n // Also: returning anything other than `runner` would be a breaking change.\n runAsync(runner).then(done);\n\n return runner;\n};\n\n/**\n * Assigns hooks to the root suite\n * @param {MochaRootHookObject} [hooks] - Hooks to assign to root suite\n * @chainable\n */\nMocha.prototype.rootHooks = function rootHooks({\n beforeAll = [],\n beforeEach = [],\n afterAll = [],\n afterEach = [],\n} = {}) {\n beforeAll = utils.castArray(beforeAll);\n beforeEach = utils.castArray(beforeEach);\n afterAll = utils.castArray(afterAll);\n afterEach = utils.castArray(afterEach);\n beforeAll.forEach((hook) => {\n this.suite.beforeAll(hook);\n });\n beforeEach.forEach((hook) => {\n this.suite.beforeEach(hook);\n });\n afterAll.forEach((hook) => {\n this.suite.afterAll(hook);\n });\n afterEach.forEach((hook) => {\n this.suite.afterEach(hook);\n });\n return this;\n};\n\n/**\n * Toggles parallel mode.\n *\n * Must be run before calling {@link Mocha#run}. Changes the `Runner` class to\n * use; also enables lazy file loading if not already done so.\n *\n * Warning: when passed `false` and lazy loading has been enabled _via any means_ (including calling `parallelMode(true)`), this method will _not_ disable lazy loading. Lazy loading is a prerequisite for parallel\n * mode, but parallel mode is _not_ a prerequisite for lazy loading!\n * @param {boolean} [enable] - If `true`, enable; otherwise disable.\n * @throws If run in browser\n * @throws If Mocha not in `INIT` state\n * @returns {Mocha}\n * @chainable\n * @public\n */\nMocha.prototype.parallelMode = function parallelMode(enable = true) {\n if (utils.isBrowser()) {\n throw createUnsupportedError(\"parallel mode is only supported in Node.js\");\n }\n const parallel = Boolean(enable);\n if (\n parallel === this.options.parallel &&\n this._lazyLoadFiles &&\n this._runnerClass !== exports.Runner\n ) {\n return this;\n }\n if (this._state !== mochaStates.INIT) {\n throw createUnsupportedError(\n \"cannot change parallel mode after having called run()\",\n );\n }\n this.options.parallel = parallel;\n\n // swap Runner class\n this._runnerClass = parallel\n ? require(\"./nodejs/parallel-buffered-runner.cjs\")\n : exports.Runner;\n\n // lazyLoadFiles may have been set `true` otherwise (for ESM loading),\n // so keep `true` if so.\n return this.lazyLoadFiles(this._lazyLoadFiles || parallel);\n};\n\n/**\n * Disables implicit call to {@link Mocha#loadFiles} in {@link Mocha#run}. This\n * setting is used by watch mode, parallel mode, and for loading ESM files.\n * @todo This should throw if we've already loaded files; such behavior\n * necessitates adding a new state.\n * @param {boolean} [enable] - If `true`, disable eager loading of files in\n * {@link Mocha#run}\n * @chainable\n * @public\n */\nMocha.prototype.lazyLoadFiles = function lazyLoadFiles(enable) {\n this._lazyLoadFiles = enable === true;\n debug(\"set lazy load to %s\", enable);\n return this;\n};\n\n/**\n * Configures one or more global setup fixtures.\n *\n * If given no parameters, _unsets_ any previously-set fixtures.\n * @chainable\n * @public\n * @param {MochaGlobalFixture|MochaGlobalFixture[]} [setupFns] - Global setup fixture(s)\n * @returns {Mocha}\n */\nMocha.prototype.globalSetup = function globalSetup(setupFns = []) {\n setupFns = utils.castArray(setupFns);\n this.options.globalSetup = setupFns;\n debug(\"configured %d global setup functions\", setupFns.length);\n return this;\n};\n\n/**\n * Configures one or more global teardown fixtures.\n *\n * If given no parameters, _unsets_ any previously-set fixtures.\n * @chainable\n * @public\n * @param {MochaGlobalFixture|MochaGlobalFixture[]} [teardownFns] - Global teardown fixture(s)\n * @returns {Mocha}\n */\nMocha.prototype.globalTeardown = function globalTeardown(teardownFns = []) {\n teardownFns = utils.castArray(teardownFns);\n this.options.globalTeardown = teardownFns;\n debug(\"configured %d global teardown functions\", teardownFns.length);\n return this;\n};\n\n/**\n * Run any global setup fixtures sequentially, if any.\n *\n * This is _automatically called_ by {@link Mocha#run} _unless_ the `runGlobalSetup` option is `false`; see {@link Mocha#enableGlobalSetup}.\n *\n * The context object this function resolves with should be consumed by {@link Mocha#runGlobalTeardown}.\n * @param {object} [context] - Context object if already have one\n * @public\n * @returns {Promise} Context object\n */\nMocha.prototype.runGlobalSetup = async function runGlobalSetup(context = {}) {\n const { globalSetup } = this.options;\n if (globalSetup && globalSetup.length) {\n debug(\"run(): global setup starting\");\n await this._runGlobalFixtures(globalSetup, context);\n debug(\"run(): global setup complete\");\n }\n return context;\n};\n\n/**\n * Run any global teardown fixtures sequentially, if any.\n *\n * This is _automatically called_ by {@link Mocha#run} _unless_ the `runGlobalTeardown` option is `false`; see {@link Mocha#enableGlobalTeardown}.\n *\n * Should be called with context object returned by {@link Mocha#runGlobalSetup}, if applicable.\n * @param {object} [context] - Context object if already have one\n * @public\n * @returns {Promise} Context object\n */\nMocha.prototype.runGlobalTeardown = async function runGlobalTeardown(\n context = {},\n) {\n const { globalTeardown } = this.options;\n if (globalTeardown && globalTeardown.length) {\n debug(\"run(): global teardown starting\");\n await this._runGlobalFixtures(globalTeardown, context);\n }\n debug(\"run(): global teardown complete\");\n return context;\n};\n\n/**\n * Run global fixtures sequentially with context `context`\n * @private\n * @param {MochaGlobalFixture[]} [fixtureFns] - Fixtures to run\n * @param {object} [context] - context object\n * @returns {Promise} context object\n */\nMocha.prototype._runGlobalFixtures = async function _runGlobalFixtures(\n fixtureFns = [],\n context = {},\n) {\n for await (const fixtureFn of fixtureFns) {\n await fixtureFn.call(context);\n }\n return context;\n};\n\n/**\n * Toggle execution of any global setup fixture(s)\n *\n * @chainable\n * @public\n * @param {boolean } [enabled=true] - If `false`, do not run global setup fixture\n * @returns {Mocha}\n */\nMocha.prototype.enableGlobalSetup = function enableGlobalSetup(enabled = true) {\n this.options.enableGlobalSetup = Boolean(enabled);\n return this;\n};\n\n/**\n * Toggle execution of any global teardown fixture(s)\n *\n * @chainable\n * @public\n * @param {boolean } [enabled=true] - If `false`, do not run global teardown fixture\n * @returns {Mocha}\n */\nMocha.prototype.enableGlobalTeardown = function enableGlobalTeardown(\n enabled = true,\n) {\n this.options.enableGlobalTeardown = Boolean(enabled);\n return this;\n};\n\n/**\n * Returns `true` if one or more global setup fixtures have been supplied.\n * @public\n * @returns {boolean}\n */\nMocha.prototype.hasGlobalSetupFixtures = function hasGlobalSetupFixtures() {\n return Boolean(this.options.globalSetup.length);\n};\n\n/**\n * Returns `true` if one or more global teardown fixtures have been supplied.\n * @public\n * @returns {boolean}\n */\nMocha.prototype.hasGlobalTeardownFixtures =\n function hasGlobalTeardownFixtures() {\n return Boolean(this.options.globalTeardown.length);\n };\n","import BrowserStdout from \"browser-stdout\";\n\nimport { parseQuery } from \"./lib/browser/parse-query.js\";\nimport { highlightTags } from \"./lib/browser/highlight-tags.js\";\nimport Mocha from \"./lib/mocha.cjs\";\n\n/**\n * Shim process.stdout.\n */\nprocess.stdout = BrowserStdout({ label: false });\n\n/**\n * Create a Mocha instance.\n *\n * @return {undefined}\n */\n\nvar mocha = new Mocha({ reporter: \"html\" });\n\n/**\n * Save timer references to avoid Sinon interfering (see GH-237).\n */\n\nvar Date = global.Date;\nvar setTimeout = global.setTimeout;\n\nvar uncaughtExceptionHandlers = [];\n\nvar originalOnerrorHandler = global.onerror;\n\n/**\n * Remove uncaughtException listener.\n * Revert to original onerror handler if previously defined.\n */\n\nprocess.removeListener = function (e, fn) {\n if (e === \"uncaughtException\") {\n if (originalOnerrorHandler) {\n global.onerror = originalOnerrorHandler;\n } else {\n global.onerror = function () {};\n }\n var i = uncaughtExceptionHandlers.indexOf(fn);\n if (i !== -1) {\n uncaughtExceptionHandlers.splice(i, 1);\n }\n }\n};\n\n/**\n * Implements listenerCount for 'uncaughtException'.\n */\n\nprocess.listenerCount = function (name) {\n if (name === \"uncaughtException\") {\n return uncaughtExceptionHandlers.length;\n }\n return 0;\n};\n\n/**\n * Implements uncaughtException listener.\n */\n\nprocess.on = function (e, fn) {\n if (e === \"uncaughtException\") {\n global.onerror = function (msg, url, line, col, err) {\n fn(err || new Error(msg + \" (\" + url + \":\" + line + \":\" + col + \")\"));\n return !mocha.options.allowUncaught;\n };\n uncaughtExceptionHandlers.push(fn);\n }\n};\n\nprocess.listeners = function (err) {\n if (err === \"uncaughtException\") {\n return uncaughtExceptionHandlers;\n }\n return [];\n};\n\n// The BDD UI is registered by default, but no UI will be functional in the\n// browser without an explicit call to the overridden `mocha.ui` (see below).\n// Ensure that this default UI does not expose its methods to the global scope.\nmocha.suite.removeAllListeners(\"pre-require\");\n\nvar immediateQueue = [];\nvar immediateTimeout;\n\nfunction timeslice() {\n var immediateStart = new Date().getTime();\n while (immediateQueue.length && new Date().getTime() - immediateStart < 100) {\n immediateQueue.shift()();\n }\n if (immediateQueue.length) {\n immediateTimeout = setTimeout(timeslice, 0);\n } else {\n immediateTimeout = null;\n }\n}\n\n/**\n * High-performance override of Runner.immediately.\n */\n\nMocha.Runner.immediately = function (callback) {\n immediateQueue.push(callback);\n if (!immediateTimeout) {\n immediateTimeout = setTimeout(timeslice, 0);\n }\n};\n\n/**\n * Function to allow assertion libraries to throw errors directly into mocha.\n * This is useful when running tests in a browser because window.onerror will\n * only receive the 'message' attribute of the Error.\n */\nmocha.throwError = function (err) {\n uncaughtExceptionHandlers.forEach(function (fn) {\n fn(err);\n });\n throw err;\n};\n\n/**\n * Override ui to ensure that the ui functions are initialized.\n * Normally this would happen in Mocha.prototype.loadFiles.\n */\n\nmocha.ui = function (ui) {\n Mocha.prototype.ui.call(this, ui);\n this.suite.emit(\"pre-require\", global, null, this);\n return this;\n};\n\n/**\n * Setup mocha with the given setting options.\n */\n\nmocha.setup = function (opts) {\n if (typeof opts === \"string\") {\n opts = { ui: opts };\n }\n if (opts.delay === true) {\n this.delay();\n }\n var self = this;\n Object.keys(opts)\n .filter(function (opt) {\n return opt !== \"delay\";\n })\n .forEach(function (opt) {\n if (Object.prototype.hasOwnProperty.call(opts, opt)) {\n self[opt](opts[opt]);\n }\n });\n return this;\n};\n\n/**\n * Run mocha, returning the Runner.\n */\n\nmocha.run = function (fn) {\n var options = mocha.options;\n mocha.globals(\"location\");\n\n var query = parseQuery(global.location.search || \"\");\n if (query.grep) {\n mocha.grep(query.grep);\n }\n if (query.fgrep) {\n mocha.fgrep(query.fgrep);\n }\n if (query.invert) {\n mocha.invert();\n }\n\n return Mocha.prototype.run.call(mocha, function (err) {\n // The DOM Document is not available in Web Workers.\n var document = global.document;\n if (\n document &&\n document.getElementById(\"mocha\") &&\n options.noHighlighting !== true\n ) {\n highlightTags(\"code\");\n }\n if (fn) {\n fn(err);\n }\n });\n};\n\n/**\n * Expose the process shim.\n * https://github.com/mochajs/mocha/pull/916\n */\n\nMocha.process = process;\n\n/**\n * Expose mocha.\n */\nglobal.Mocha = Mocha;\nglobal.mocha = mocha;\n\n// for bundlers: enable `import {describe, it} from 'mocha'`\n// `bdd` interface only\n// prettier-ignore\n[\n 'describe', 'context', 'it', 'specify',\n 'xdescribe', 'xcontext', 'xit', 'xspecify',\n 'before', 'beforeEach', 'afterEach', 'after'\n].forEach(function(key) {\n mocha[key] = global[key];\n});\n\nexport default mocha;\n"],"names":["require$$0","require$$1","process","ms","picocolors_browserModule","require$$2","constants","createUnsupportedError","isCI","debug","Date","global","setTimeout","clearTimeout","milliseconds","MOCHA_ID_PROP_NAME","isString","errors.createInvalidArgumentTypeError","require$$3","require$$4","require$$5","require$$6","require$$7","EVENT_TEST_PASS","EVENT_TEST_FAIL","diff.createPatch","diff\n .diffWordsWithSpace","EVENT_RUN_BEGIN","EVENT_TEST_PENDING","EVENT_RUN_END","EVENT_SUITE_BEGIN","EVENT_SUITE_END","EVENT_TEST_END","errors.createUnsupportedError","clean","escape","color","cursor","STATE_FAILED","require$$10","require$$12","require$$14","require$$15","EVENT_FILE_PRE_REQUIRE","require$$8","require$$9","require$$11","require$$13","require","require$$16"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;KACE;EACF;EACA;EACA;OACI,gBAAgB,EAAE,MAAM;EAC5B;EACA;EACA;OACI,cAAc,EAAE,UAAU;EAC9B;EACA;EACA;OACI,eAAe,EAAE,OAAO;EAC5B;EACA;EACA;OACI,iBAAiB,EAAE,SAAS;EAChC;EACA;EACA;OACI,eAAe,EAAE,OAAO;EAC5B;EACA;EACA;OACI,aAAa,EAAE,KAAK;EACxB;EACA;EACA;OACI,iBAAiB,EAAE,OAAO;EAC9B;EACA;EACA;OACI,eAAe,EAAE,WAAW;EAChC;EACA;EACA;OACI,gBAAgB,EAAE,MAAM;EAC5B;EACA;EACA;OACI,cAAc,EAAE,UAAU;EAC9B;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;OACI,eAAe,EAAE,MAAM;EAC3B;EACA;EACA;OACI,eAAe,EAAE,MAAM;EAC3B;EACA;EACA;OACI,kBAAkB,EAAE,SAAS;EACjC;EACA;EACA;OACI,gBAAgB,EAAE,OAAO;EAC7B;EACA;EACA;OACI,UAAU,EAAE,MAAM;EACtB;EACA;EACA;OACI,aAAa,EAAE,SAAS;EAC5B;EACA;EACA;OACI,aAAa,EAAE,SAAS;MACzB;IACF;;GAED,MAAM,MAAM,SAAS,YAAY,CAAC;EAClC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,GAAE,WAAW,CAAC,KAAK,EAAE,IAAI,GAAG,EAAE,EAAE;EAChC,KAAI,KAAK,EAAE;;OAEP,IAAI,IAAI,GAAG,IAAI;EACnB,KAAI,IAAI,CAAC,QAAQ,GAAG,EAAE;EACtB,KAAI,IAAI,CAAC,MAAM,GAAG,KAAK;EACvB,KAAI,IAAI,CAAC,KAAK,GAAG,KAAK;EACtB,KAAI,IAAI,CAAC,KAAK,GAAG,IAAI;EACrB,KAAI,IAAI,CAAC,KAAK,GAAG,SAAS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/mocha.mjs new file mode 100644 index 00000000..27f17859 --- /dev/null +++ b/node_modules/mocha/mocha.mjs @@ -0,0 +1,69 @@ +// This file is `/mocha.mjs` because the built file is `/mocha.js` + +// the .js built file is not committed to the repo +/* eslint-disable-next-line n/no-missing-import */ +import "./mocha.js"; + +const { mocha, Mocha } = globalThis; + +const mochaExports = { + after: (...args) => globalThis.after?.(...args), + afterEach: (...args) => globalThis.afterEach?.(...args), + before: (...args) => globalThis.before?.(...args), + beforeEach: (...args) => globalThis.beforeEach?.(...args), + context: (...args) => globalThis.context?.(...args), + describe: (...args) => globalThis.describe?.(...args), + it: (...args) => globalThis.it?.(...args), + setup: (...args) => globalThis.setup?.(...args), + suite: (...args) => globalThis.suite?.(...args), + suiteSetup: (...args) => globalThis.suiteSetup?.(...args), + suiteTeardown: (...args) => globalThis.suiteTeardown?.(...args), + teardown: (...args) => globalThis.teardown?.(...args), + test: (...args) => globalThis.test?.(...args), + specify: (...args) => globalThis.specify?.(...args), + xcontext: (...args) => globalThis.xcontext?.(...args), + xdescribe: (...args) => globalThis.xdescribe?.(...args), + xit: (...args) => globalThis.xit?.(...args), + xspecify: (...args) => globalThis.xspecify?.(...args), +}; + +export default Mocha; + +// Export the mocha instance (in browser, this has setup/run methods) +export { mocha }; + +// Re-export class/utility exports from the Mocha module +export const { + utils, + interfaces, + reporters, + Runnable, + Context, + Runner, + Suite, + Hook, + Test, +} = Mocha; + +// Re-export test interface functions +export const { + after, + afterEach, + before, + beforeEach, + context, + describe, + it, + run, + setup, + suite, + suiteSetup, + suiteTeardown, + teardown, + test, + specify, + xcontext, + xdescribe, + xit, + xspecify, +} = mochaExports; diff --git a/node_modules/mocha/node_modules/.bin/glob b/node_modules/mocha/node_modules/.bin/glob deleted file mode 120000 index 85c9c1db..00000000 --- a/node_modules/mocha/node_modules/.bin/glob +++ /dev/null @@ -1 +0,0 @@ -../glob/dist/esm/bin.mjs \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/CONTRIBUTING.md b/node_modules/mocha/node_modules/diff/CONTRIBUTING.md index 199c556c..320bd00e 100644 --- a/node_modules/mocha/node_modules/diff/CONTRIBUTING.md +++ b/node_modules/mocha/node_modules/diff/CONTRIBUTING.md @@ -1,37 +1,25 @@ -# How to Contribute - -## Pull Requests - -We also accept [pull requests][pull-request]! - -Generally we like to see pull requests that - -- Maintain the existing code style -- Are focused on a single change (i.e. avoid large refactoring or style adjustments in untouched code if not the primary goal of the pull request) -- Have [good commit messages](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) -- Have tests -- Don't decrease the current code coverage (see coverage/lcov-report/index.html) - -## Building +## Building and testing ``` yarn yarn test ``` -Running `yarn test -- dev` will watch for tests within Node and `karma start` may be used for manual testing in browsers. +To run tests in a *browser* (for instance to test compatibility with Firefox, with Safari, or with old browser versions), run `yarn karma start`, then open http://localhost:9876/ in the browser you want to test in. Results of the test run will appear in the terminal where `yarn karma start` is running. If you notice any problems, please report them to the GitHub issue tracker at [http://github.com/kpdecker/jsdiff/issues](http://github.com/kpdecker/jsdiff/issues). ## Releasing +Run a test in Firefox via the procedure above before releasing. + A full release may be completed by first updating the `"version"` property in package.json, then running the following: ``` yarn clean -yarn grunt release -yarn publish +yarn build +yarn npm publish ``` After releasing, remember to: diff --git a/node_modules/mocha/node_modules/diff/README.md b/node_modules/mocha/node_modules/diff/README.md index 33f0c946..323f0ce5 100644 --- a/node_modules/mocha/node_modules/diff/README.md +++ b/node_modules/mocha/node_modules/diff/README.md @@ -10,9 +10,29 @@ Based on the algorithm proposed in npm install diff --save ``` -## Usage +## Getting started -Broadly, jsdiff's diff functions all take an old text and a new text and perform three steps: +### Imports + +In an environment where you can use imports, everything you need can be imported directly from `diff`. e.g. + +ESM: + +``` +import {diffChars, createPatch} from 'diff'; +``` + +CommonJS + +``` +const {diffChars, createPatch} = require('diff'); +``` + +If you want to serve jsdiff to a web page without using a module system, you can use `dist/diff.js` or `dist/diff.min.js`. These create a global called `Diff` that contains the entire JsDiff API as its properties. + +### Usage + +jsdiff's diff functions all take an old text and a new text and perform three steps: 1. Split both texts into arrays of "tokens". What constitutes a token varies; in `diffChars`, each character is a token, while in `diffLines`, each line is a token. @@ -22,9 +42,9 @@ Broadly, jsdiff's diff functions all take an old text and a new text and perform 3. Return an array representing the transformation computed in the previous step as a series of [change objects](#change-objects). The array is ordered from the start of the input to the end, and each change object represents *inserting* one or more tokens, *deleting* one or more tokens, or *keeping* one or more tokens. -### API +## API -* `Diff.diffChars(oldStr, newStr[, options])` - diffs two blocks of text, treating each character as a token. +* `diffChars(oldStr, newStr[, options])` - diffs two blocks of text, treating each character as a token. ("Characters" here means Unicode code points - the elements you get when you loop over a string with a `for ... of ...` loop.) @@ -33,7 +53,7 @@ Broadly, jsdiff's diff functions all take an old text and a new text and perform Options * `ignoreCase`: If `true`, the uppercase and lowercase forms of a character are considered equal. Defaults to `false`. -* `Diff.diffWords(oldStr, newStr[, options])` - diffs two blocks of text, treating each word and each punctuation mark as a token. Whitespace is ignored when computing the diff (but preserved as far as possible in the final change objects). +* `diffWords(oldStr, newStr[, options])` - diffs two blocks of text, treating each word and each punctuation mark as a token. Whitespace is ignored when computing the diff (but preserved as far as possible in the final change objects). Returns a list of [change objects](#change-objects). @@ -45,9 +65,9 @@ Broadly, jsdiff's diff functions all take an old text and a new text and perform Using an `Intl.Segmenter` should allow better word-level diffing of non-English text than the default behaviour. For instance, `Intl.Segmenter`s can generally identify via built-in dictionaries which sequences of adjacent Chinese characters form words, allowing word-level diffing of Chinese. By specifying a language when instantiating the segmenter (e.g. `new Intl.Segmenter('sv', {granularity: 'word'})`) you can also support language-specific rules, like treating Swedish's colon separated contractions (like *k:a* for *kyrka*) as single words; by default this would be seen as two words separated by a colon. -* `Diff.diffWordsWithSpace(oldStr, newStr[, options])` - diffs two blocks of text, treating each word, punctuation mark, newline, or run of (non-newline) whitespace as a token. +* `diffWordsWithSpace(oldStr, newStr[, options])` - diffs two blocks of text, treating each word, punctuation mark, newline, or run of (non-newline) whitespace as a token. -* `Diff.diffLines(oldStr, newStr[, options])` - diffs two blocks of text, treating each line as a token. +* `diffLines(oldStr, newStr[, options])` - diffs two blocks of text, treating each line as a token. Options * `ignoreWhitespace`: `true` to ignore leading and trailing whitespace characters when checking if two lines are equal. Defaults to `false`. @@ -60,17 +80,17 @@ Broadly, jsdiff's diff functions all take an old text and a new text and perform Returns a list of [change objects](#change-objects). -* `Diff.diffSentences(oldStr, newStr[, options])` - diffs two blocks of text, treating each sentence as a token. The characters `.`, `!`, and `?`, when followed by whitespace, are treated as marking the end of a sentence; nothing else is considered to mark a sentence end. +* `diffSentences(oldStr, newStr[, options])` - diffs two blocks of text, treating each sentence, and the whitespace between each pair of sentences, as a token. The characters `.`, `!`, and `?`, when followed by whitespace, are treated as marking the end of a sentence; nothing else besides the end of the string is considered to mark a sentence end. - (For more sophisticated detection of sentence breaks, including support for non-English punctuation, consider instead tokenizing with an [`Intl.Segmenter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter) with `granularity: 'sentence'` and passing the result to `Diff.diffArrays`.) + (For more sophisticated detection of sentence breaks, including support for non-English punctuation, consider instead tokenizing with an [`Intl.Segmenter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter) with `granularity: 'sentence'` and passing the result to `diffArrays`.) Returns a list of [change objects](#change-objects). -* `Diff.diffCss(oldStr, newStr[, options])` - diffs two blocks of text, comparing CSS tokens. +* `diffCss(oldStr, newStr[, options])` - diffs two blocks of text, comparing CSS tokens. Returns a list of [change objects](#change-objects). -* `Diff.diffJson(oldObj, newObj[, options])` - diffs two JSON-serializable objects by first serializing them to prettily-formatted JSON and then treating each line of the JSON as a token. Object properties are ordered alphabetically in the serialized JSON, so the order of properties in the objects being compared doesn't affect the result. +* `diffJson(oldObj, newObj[, options])` - diffs two JSON-serializable objects by first serializing them to prettily-formatted JSON and then treating each line of the JSON as a token. Object properties are ordered alphabetically in the serialized JSON, so the order of properties in the objects being compared doesn't affect the result. Returns a list of [change objects](#change-objects). @@ -78,36 +98,48 @@ Broadly, jsdiff's diff functions all take an old text and a new text and perform * `stringifyReplacer`: A custom replacer function. Operates similarly to the `replacer` parameter to [`JSON.stringify()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#the_replacer_parameter), but must be a function. * `undefinedReplacement`: A value to replace `undefined` with. Ignored if a `stringifyReplacer` is provided. -* `Diff.diffArrays(oldArr, newArr[, options])` - diffs two arrays of tokens, comparing each item for strict equality (===). +* `diffArrays(oldArr, newArr[, options])` - diffs two arrays of tokens, comparing each item for strict equality (===). Options * `comparator`: `function(left, right)` for custom equality checks Returns a list of [change objects](#change-objects). -* `Diff.createTwoFilesPatch(oldFileName, newFileName, oldStr, newStr[, oldHeader[, newHeader[, options]]])` - creates a unified diff patch by first computing a diff with `diffLines` and then serializing it to unified diff format. +* `createTwoFilesPatch(oldFileName, newFileName, oldStr, newStr[, oldHeader[, newHeader[, options]]])` - creates a unified diff patch by first computing a diff with `diffLines` and then serializing it to unified diff format. Parameters: - * `oldFileName` : String to be output in the filename section of the patch for the removals - * `newFileName` : String to be output in the filename section of the patch for the additions - * `oldStr` : Original string value - * `newStr` : New string value - * `oldHeader` : Optional additional information to include in the old file header. Default: `undefined`. - * `newHeader` : Optional additional information to include in the new file header. Default: `undefined`. - * `options` : An object with options. - - `context` describes how many lines of context should be included. You can set this to `Number.MAX_SAFE_INTEGER` or `Infinity` to include the entire file content in one hunk. + * `oldFileName`: String to be output in the filename section of the patch for the removals + * `newFileName`: String to be output in the filename section of the patch for the additions + * `oldStr`: Original string value + * `newStr`: New string value + * `oldHeader`: Optional additional information to include in the old file header. Default: `undefined`. + * `newHeader`: Optional additional information to include in the new file header. Default: `undefined`. + * `options`: An object with options. + - `context`: describes how many lines of context should be included. You can set this to `Number.MAX_SAFE_INTEGER` or `Infinity` to include the entire file content in one hunk. - `ignoreWhitespace`: Same as in `diffLines`. Defaults to `false`. - `stripTrailingCr`: Same as in `diffLines`. Defaults to `false`. + - `headerOptions`: Configures the format of patch headers in the returned patch. (Note these are distinct from *hunk* headers, which are a mandatory part of the unified diff format and not configurable.) Has three subfields (all default to `true`): + - `includeIndex`: whether to include a line like `Index: filename.txt` at the start of the patch header. (Even if this is `true`, this line will be omitted if `oldFileName` and `newFileName` are not identical.) + - `includeUnderline`: whether to include `===================================================================`. + - `includeFileHeaders`: whether to include two lines indicating the old and new filename, formatted like `--- old.txt` and `+++ new.txt`. -* `Diff.createPatch(fileName, oldStr, newStr[, oldHeader[, newHeader[, options]]])` - creates a unified diff patch. + Note further that jsdiff exports three top-level constants that can be used as `headerOptions` values, named `INCLUDE_HEADERS` (the default), `FILE_HEADERS_ONLY`, and `OMIT_HEADERS`. - Just like Diff.createTwoFilesPatch, but with oldFileName being equal to newFileName. + (Note that in the case where `includeIndex` and `includeFileHeaders` are both false, the `oldFileName` and `newFileName` parameters are ignored entirely.) -* `Diff.formatPatch(patch)` - creates a unified diff patch. + The GNU `patch` util will accept patches produced with any configuration of these header options (and refers to patch headers as "leading garbage", which in typical usage it makes no attempt to parse or use in any way). However, other tools for working with unified diff format patches may be less liberal (and are not unambiguously wrong to be so, since the format has no real standard). Tinkering with the `headerOptions` setting thus provides a way to help make patches produced by jsdiff compatible with other tools. - `patch` may be either a single structured patch object (as returned by `structuredPatch`) or an array of them (as returned by `parsePatch`). +* `createPatch(fileName, oldStr, newStr[, oldHeader[, newHeader[, options]]])` - creates a unified diff patch. + + Just like createTwoFilesPatch, but with oldFileName being equal to newFileName. -* `Diff.structuredPatch(oldFileName, newFileName, oldStr, newStr[, oldHeader[, newHeader[, options]]])` - returns an object with an array of hunk objects. +* `formatPatch(patch[, headerOptions])` - creates a unified diff patch. + + `patch` may be either a single structured patch object (as returned by `structuredPatch`) or an array of them (as returned by `parsePatch`). The optional `headerOptions` argument behaves the same as the `headerOptions` option of `createTwoFilesPatch`, except that it is ignored for Git patches (i.e. patches where `isGit` is `true`). + + When a patch has `isGit: true`, `formatPatch` output is changed to more closely match Git's output: it emits a `diff --git` header, emits Git extended headers as appropriate based on properties like `isRename`, `isCreate`, `newMode`, etc, and always emits `---`/`+++` file headers when hunks are present but omits them when there are no hunks (e.g. renames without content changes). The `headerOptions` parameter has no effect on Git patches since the header format is fully determined by the Git extended header properties. + +* `structuredPatch(oldFileName, newFileName, oldStr, newStr[, oldHeader[, newHeader[, options]]])` - returns an object with an array of hunk objects. This method is similar to createTwoFilesPatch, but returns a data structure suitable for further processing. Parameters are the same as createTwoFilesPatch. The data structure returned may look like this: @@ -123,7 +155,7 @@ Broadly, jsdiff's diff functions all take an old text and a new text and perform } ``` -* `Diff.applyPatch(source, patch[, options])` - attempts to apply a unified diff patch. +* `applyPatch(source, patch[, options])` - attempts to apply a unified diff patch. Hunks are applied first to last. `applyPatch` first tries to apply the first hunk at the line number specified in the hunk header, and with all context lines matching exactly. If that fails, it tries scanning backwards and forwards, one line at a time, to find a place to apply the hunk where the context lines match exactly. If that still fails, and `fuzzFactor` is greater than zero, it increments the maximum number of mismatches (missing, extra, or changed context lines) that there can be between the hunk context and a region where we are trying to apply the patch such that the hunk will still be considered to match. Regardless of `fuzzFactor`, lines to be deleted in the hunk *must* be present for a hunk to match, and the context lines *immediately* before and after an insertion must match exactly. @@ -143,7 +175,7 @@ Broadly, jsdiff's diff functions all take an old text and a new text and perform - `autoConvertLineEndings`: If `true`, and if the file to be patched consistently uses different line endings to the patch (i.e. either the file always uses Unix line endings while the patch uses Windows ones, or vice versa), then `applyPatch` will behave as if the line endings in the patch were the same as those in the source file. (If `false`, the patch will usually fail to apply in such circumstances since lines deleted in the patch won't be considered to match those in the source file.) Defaults to `true`. - `compareLine(lineNumber, line, operation, patchContent)`: Callback used to compare to given lines to determine if they should be considered equal when patching. Defaults to strict equality but may be overridden to provide fuzzier comparison. Should return false if the lines should be rejected. -* `Diff.applyPatches(patch, options)` - applies one or more patches. +* `applyPatches(patch, options)` - applies one or more patches. `patch` may be either an array of structured patch objects, or a string representing a patch in unified diff format (which may patch one or more files). @@ -154,17 +186,29 @@ Broadly, jsdiff's diff functions all take an old text and a new text and perform Once all patches have been applied or an error occurs, the `options.complete(err)` callback is made. -* `Diff.parsePatch(diffStr)` - Parses a patch into structured data +* `parsePatch(diffStr)` - Parses a unified diff format patch into a structured patch object. + + Returns a JSON object representation of the patch, suitable for use with the `applyPatch` method. This parses to the same structure returned by `structuredPatch`, except that `oldFileName` and `newFileName` may be `undefined` if the patch doesn't contain enough information to determine them (e.g. a hunk-only patch with no file headers). - Return a JSON object representation of the a patch, suitable for use with the `applyPatch` method. This parses to the same structure returned by `Diff.structuredPatch`. + `parsePatch` has some understanding of [Git's particular dialect of unified diff format](https://git-scm.com/docs/git-diff#generate_patch_text_with_p). When parsing a Git patch, each index in the result may contain the following additional fields not included in the data structure returned by `structuredPatch`: + - `isGit` - set to `true` when parsing from a Git-style patch. + - `isRename` - set to `true` when parsing a Git diff that includes `rename from`/`rename to` extended headers, indicating the file was renamed (and the old file no longer exists). Consumers applying the patch should delete the old file. + - `isCopy` - set to `true` when parsing a Git diff that includes `copy from`/`copy to` extended headers, indicating the file was copied (and the old file still exists). Consumers applying the patch should NOT delete the old file. + - `isCreate` - set to `true` when parsing a Git diff that includes a `new file mode` extended header, indicating the file was newly created. + - `isDelete` - set to `true` when parsing a Git diff that includes a `deleted file mode` extended header, indicating the file was deleted. + - `oldMode` - the file mode (e.g. `'100644'`, `'100755'`) of the old file, parsed from Git extended headers (`old mode` or `deleted file mode`). + - `newMode` - the file mode (e.g. `'100644'`, `'100755'`) of the new file, parsed from Git extended headers (`new mode` or `new file mode`). + - `isBinary` - set to `true` when parsing a Git diff that includes a `Binary files ... differ` line, indicating a binary file change. Binary patches have no hunks, so the patch content alone is not sufficient to apply the change; consumers should handle this case specially (e.g. by warning the user or fetching the binary content separately). -* `Diff.reversePatch(patch)` - Returns a new structured patch which when applied will undo the original `patch`. +* `reversePatch(patch)` - Returns a new structured patch which when applied will undo the original `patch`. `patch` may be either a single structured patch object (as returned by `structuredPatch`) or an array of them (as returned by `parsePatch`). -* `Diff.convertChangesToXML(changes)` - converts a list of change objects to a serialized XML format + When `patch` is a Git-style patch, `reversePatch` handles extended header information (relating to renames, file modes, etc.) to the extent that doing so is possible, but note one fundamental limitation: the correct inverse of a patch featuring `copy from`/`copy to` headers cannot, in general, be determined based on the information contained in the patch alone, and so `reversePatch`'s output when passed such a patch will usually be rejected by `git apply`. (The correct inverse would be a patch that deletes the newly-created file, but for Git to apply such a patch, the patch must explicitly delete every line of content in the file too, and that content cannot be determined from the original patch on its own. `reversePatch` therefore does the only vaguely reasonable thing it can do in this scenario: it outputs a patch with a `deleted file mode` header - indicating that the file should be deleted - but no hunks.) -* `Diff.convertChangesToDMP(changes)` - converts a list of change objects to the format returned by Google's [diff-match-patch](https://github.com/google/diff-match-patch) library +* `convertChangesToXML(changes)` - converts a list of change objects to a serialized XML format + +* `convertChangesToDMP(changes)` - converts a list of change objects to the format returned by Google's [diff-match-patch](https://github.com/google/diff-match-patch) library #### Universal `options` @@ -188,14 +232,14 @@ The simplest way to customize tokenization behavior is to simply tokenize the te To customize the notion of token equality used, use the `comparator` option to `diffArrays`. -For even more customisation of the diffing behavior, you can create a `new Diff.Diff()` object, overwrite its `castInput`, `tokenize`, `removeEmpty`, `equals`, and `join` properties with your own functions, then call its `diff(oldString, newString[, options])` method. The methods you can overwrite are used as follows: +For even more customisation of the diffing behavior, you can extend the `Diff()` class, override its `castInput`, `tokenize`, `removeEmpty`, `equals`, and `join` properties with your own functions, then call its `diff(oldString, newString[, options])` method. The methods you can override are used as follows: * `castInput(value, options)`: used to transform the `oldString` and `newString` before any other steps in the diffing algorithm happen. For instance, `diffJson` uses `castInput` to serialize the objects being diffed to JSON. Defaults to a no-op. * `tokenize(value, options)`: used to convert each of `oldString` and `newString` (after they've gone through `castInput`) to an array of tokens. Defaults to returning `value.split('')` (returning an array of individual characters). * `removeEmpty(array)`: called on the arrays of tokens returned by `tokenize` and can be used to modify them. Defaults to stripping out falsey tokens, such as empty strings. `diffArrays` overrides this to simply return the `array`, which means that falsey values like empty strings can be handled like any other token by `diffArrays`. * `equals(left, right, options)`: called to determine if two tokens (one from the old string, one from the new string) should be considered equal. Defaults to comparing them with `===`. -* `join(tokens)`: gets called with an array of consecutive tokens that have either all been added, all been removed, or are all common. Needs to join them into a single value that can be used as the `value` property of the [change object](#change-objects) for these tokens. Defaults to simply returning `tokens.join('')`. -* `postProcess(changeObjects)`: gets called at the end of the algorithm with the [change objects](#change-objects) produced, and can do final cleanups on them. Defaults to simply returning `changeObjects` unchanged. +* `join(tokens)`: gets called with an array of consecutive tokens that have either all been added, all been removed, or are all common. Needs to join them into a single value that can be used as the `value` property of the [change object](#change-objects) for these tokens. Defaults to simply returning `tokens.join('')` (and therefore by default will error out if your tokens are not strings; differs that support non-string tokens like `diffArrays` should override it to be a no-op to fix this). +* `postProcess(changeObjects, options)`: gets called at the end of the algorithm with the [change objects](#change-objects) produced, and can do final cleanups on them. Defaults to simply returning `changeObjects` unchanged. ### Change Objects Many of the methods above return change objects. These objects consist of the following fields: @@ -213,12 +257,12 @@ Many of the methods above return change objects. These objects consist of the fo ```js require('colors'); -const Diff = require('diff'); +const {diffChars} = require('diff'); const one = 'beep boop'; const other = 'beep boob blah'; -const diff = Diff.diffChars(one, other); +const diff = diffChars(one, other); diff.forEach((part) => { // green for additions, red for deletions @@ -275,10 +319,10 @@ Open the above .html file in a browser and you should see The code below is roughly equivalent to the Unix command `diff -u file1.txt file2.txt > mydiff.patch`: ``` -const Diff = require('diff'); +const {createTwoFilesPatch} = require('diff'); const file1Contents = fs.readFileSync("file1.txt").toString(); const file2Contents = fs.readFileSync("file2.txt").toString(); -const patch = Diff.createTwoFilesPatch("file1.txt", "file2.txt", file1Contents, file2Contents); +const patch = createTwoFilesPatch("file1.txt", "file2.txt", file1Contents, file2Contents); fs.writeFileSync("mydiff.patch", patch); ``` @@ -289,10 +333,10 @@ fs.writeFileSync("mydiff.patch", patch); The code below is roughly equivalent to the Unix command `patch file1.txt mydiff.patch`: ``` -const Diff = require('diff'); +const {applyPatch} = require('diff'); const file1Contents = fs.readFileSync("file1.txt").toString(); const patch = fs.readFileSync("mydiff.patch").toString(); -const patchedFile = Diff.applyPatch(file1Contents, patch); +const patchedFile = applyPatch(file1Contents, patch); fs.writeFileSync("file1.txt", patchedFile); ``` @@ -301,9 +345,9 @@ fs.writeFileSync("file1.txt", patchedFile); The code below is roughly equivalent to the Unix command `patch < mydiff.patch`: ``` -const Diff = require('diff'); +const {applyPatches} = require('diff'); const patch = fs.readFileSync("mydiff.patch").toString(); -Diff.applyPatches(patch, { +applyPatches(patch, { loadFile: (patch, callback) => { let fileContents; try { @@ -330,9 +374,87 @@ Diff.applyPatches(patch, { }); ``` +##### Applying a multi-file Git patch that may include renames and mode changes + +[Git patches](https://git-scm.com/docs/git-diff#generate_patch_text_with_p) can include file renames and copies (with or without content changes), which need to be handled in the callbacks you provide to `applyPatches`. `parsePatch` sets `isRename` or `isCopy` on the structured patch object so you can distinguish these cases. Patches can also potentially include file *swaps* (renaming `a → b` and `b → a`), in which case it is incorrect to simply apply each change atomically in sequence. The pattern with the `pendingWrites` Map below handles all of these nuances: + +``` +const {applyPatches} = require('diff'); +const patch = fs.readFileSync("git-diff.patch").toString(); +const DELETE = Symbol('delete'); +const pendingWrites = new Map(); // filePath → {content, mode} or DELETE sentinel +applyPatches(patch, { + loadFile: (patch, callback) => { + if (patch.isCreate) { + // Newly created file — no old content to load + callback(undefined, ''); + return; + } + try { + // Git diffs use a/ and b/ prefixes; strip them to get the real path + const filePath = patch.oldFileName.replace(/^a\//, ''); + callback(undefined, fs.readFileSync(filePath).toString()); + } catch (e) { + callback(`No such file: ${patch.oldFileName}`); + } + }, + patched: (patch, patchedContent, callback) => { + if (patchedContent === false) { + callback(`Failed to apply patch to ${patch.oldFileName}`); + return; + } + const oldPath = patch.oldFileName.replace(/^a\//, ''); + const newPath = patch.newFileName.replace(/^b\//, ''); + if (patch.isDelete) { + if (!pendingWrites.has(oldPath)) { + pendingWrites.set(oldPath, DELETE); + } + } else { + pendingWrites.set(newPath, {content: patchedContent, mode: patch.newMode}); + // For renames, delete the old file (but not for copies, + // where the old file should be kept) + if (patch.isRename && !pendingWrites.has(oldPath)) { + pendingWrites.set(oldPath, DELETE); + } + } + callback(); + }, + complete: (err) => { + if (err) { + console.log("Failed with error:", err); + return; + } + for (const [filePath, entry] of pendingWrites) { + if (entry === DELETE) { + fs.unlinkSync(filePath); + } else { + fs.writeFileSync(filePath, entry.content); + if (entry.mode) { + fs.chmodSync(filePath, entry.mode.slice(-3)); + } + } + } + } +}); +``` + ## Compatibility -jsdiff supports all ES3 environments with some known issues on IE8 and below. Under these browsers some diff algorithms such as word diff and others may fail due to lack of support for capturing groups in the `split` operation. +Version 8 of jsdiff supported ES5. + +Starting from version 9, at the point of release, each jsdiff release should fully support the latest LTS version of Node plus all [Baseline](https://web.dev/baseline) "core browser" releases that are at least 30 months old. (That is: jsdiff only uses JavaScript features that are deemed "widely available" by Baseline.) If you find one that it doesn't support, please [open an issue](https://github.com/kpdecker/jsdiff/issues). + +## TypeScript + +As of version 8, JsDiff ships with type definitions. From version 8 onwards, you should not depend on the `@types/diff` package. + +One tricky pattern pervades the type definitions and is worth explaining here. Most diff-generating and patch-generating functions (`diffChars`, `diffWords`, `structuredPatch`, etc) can be run in async mode (by providing a `callback` option), in abortable mode (by passing a `timeout` or `maxEditLength` property), or both. This is awkward for typing, because these modes have different call signatures: + * in abortable mode, the result *might* be `undefined`, and + * in async mode, the result (which *might* be allowed to be `undefined`, depending upon whether we're in abortable mode) is passed to the provide callback instead of being returned, and the return value is always `undefined` + +Our type definitions handle this as best they can by declaring different types for multiple [overload signatures](https://www.typescriptlang.org/docs/handbook/2/functions.html#function-overloads) for each such function - and also by declaring different types for abortable and nonabortable options objects. For instance, an object of type `DiffCharsOptionsAbortable` is valid to pass as the `options` argument to `diffChars` and represents an *abortable* call (whose result may be `undefined`) since it necessarily contains either the `timeout` or `maxEditLength` property. + +This approach, while probably the least bad way available to add types to JsDiff without radically refactoring the library's API, does not yield perfect results. *As long as* TypeScript is able to statically determine the type of your options, and therefore which overload signature is appropriate, everything should work fine. This should always be the case if you are passing an object literal as the `options` argument and inlining the definition of any `callback` function within that literal. But in cases where TypeScript *cannot* manage to do this - as may often be the case if you, say, define an `options: any = {}` object, build up your options programmatically, and then pass the result to a JsDiff function - then it is likely to fail to match the correct overload signature (probably defaulting to assuming you are calling the function in non-abortable, non-async mode), potentially causing type errors. You can either ignore (e.g. with `@ts-expect-error`) any such errors, or try to avoid them by refactoring your code so that TypeScript can always statically determine the type of the options you pass. ## License diff --git a/node_modules/mocha/node_modules/diff/dist/diff.js b/node_modules/mocha/node_modules/diff/dist/diff.js index 2c2c3334..28f5149a 100644 --- a/node_modules/mocha/node_modules/diff/dist/diff.js +++ b/node_modules/mocha/node_modules/diff/dist/diff.js @@ -1,2106 +1,2313 @@ -/*! - - diff v7.0.0 - -BSD 3-Clause License - -Copyright (c) 2009-2015, Kevin Decker -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -3. Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -@license -*/ (function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : - typeof define === 'function' && define.amd ? define(['exports'], factory) : - (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Diff = {})); + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : + typeof define === 'function' && define.amd ? define(['exports'], factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Diff = {})); })(this, (function (exports) { 'use strict'; - function Diff() {} - Diff.prototype = { - diff: function diff(oldString, newString) { - var _options$timeout; - var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; - var callback = options.callback; - if (typeof options === 'function') { - callback = options; - options = {}; - } - var self = this; - function done(value) { - value = self.postProcess(value, options); - if (callback) { - setTimeout(function () { - callback(value); - }, 0); - return true; - } else { - return value; - } - } - - // Allow subclasses to massage the input prior to running - oldString = this.castInput(oldString, options); - newString = this.castInput(newString, options); - oldString = this.removeEmpty(this.tokenize(oldString, options)); - newString = this.removeEmpty(this.tokenize(newString, options)); - var newLen = newString.length, - oldLen = oldString.length; - var editLength = 1; - var maxEditLength = newLen + oldLen; - if (options.maxEditLength != null) { - maxEditLength = Math.min(maxEditLength, options.maxEditLength); - } - var maxExecutionTime = (_options$timeout = options.timeout) !== null && _options$timeout !== void 0 ? _options$timeout : Infinity; - var abortAfterTimestamp = Date.now() + maxExecutionTime; - var bestPath = [{ - oldPos: -1, - lastComponent: undefined - }]; - - // Seed editLength = 0, i.e. the content starts with the same values - var newPos = this.extractCommon(bestPath[0], newString, oldString, 0, options); - if (bestPath[0].oldPos + 1 >= oldLen && newPos + 1 >= newLen) { - // Identity per the equality and tokenizer - return done(buildValues(self, bestPath[0].lastComponent, newString, oldString, self.useLongestToken)); - } - - // Once we hit the right edge of the edit graph on some diagonal k, we can - // definitely reach the end of the edit graph in no more than k edits, so - // there's no point in considering any moves to diagonal k+1 any more (from - // which we're guaranteed to need at least k+1 more edits). - // Similarly, once we've reached the bottom of the edit graph, there's no - // point considering moves to lower diagonals. - // We record this fact by setting minDiagonalToConsider and - // maxDiagonalToConsider to some finite value once we've hit the edge of - // the edit graph. - // This optimization is not faithful to the original algorithm presented in - // Myers's paper, which instead pointlessly extends D-paths off the end of - // the edit graph - see page 7 of Myers's paper which notes this point - // explicitly and illustrates it with a diagram. This has major performance - // implications for some common scenarios. For instance, to compute a diff - // where the new text simply appends d characters on the end of the - // original text of length n, the true Myers algorithm will take O(n+d^2) - // time while this optimization needs only O(n+d) time. - var minDiagonalToConsider = -Infinity, - maxDiagonalToConsider = Infinity; - - // Main worker method. checks all permutations of a given edit length for acceptance. - function execEditLength() { - for (var diagonalPath = Math.max(minDiagonalToConsider, -editLength); diagonalPath <= Math.min(maxDiagonalToConsider, editLength); diagonalPath += 2) { - var basePath = void 0; - var removePath = bestPath[diagonalPath - 1], - addPath = bestPath[diagonalPath + 1]; - if (removePath) { - // No one else is going to attempt to use this value, clear it - bestPath[diagonalPath - 1] = undefined; - } - var canAdd = false; - if (addPath) { - // what newPos will be after we do an insertion: - var addPathNewPos = addPath.oldPos - diagonalPath; - canAdd = addPath && 0 <= addPathNewPos && addPathNewPos < newLen; - } - var canRemove = removePath && removePath.oldPos + 1 < oldLen; - if (!canAdd && !canRemove) { - // If this path is a terminal then prune - bestPath[diagonalPath] = undefined; - continue; - } - - // Select the diagonal that we want to branch from. We select the prior - // path whose position in the old string is the farthest from the origin - // and does not pass the bounds of the diff graph - if (!canRemove || canAdd && removePath.oldPos < addPath.oldPos) { - basePath = self.addToPath(addPath, true, false, 0, options); - } else { - basePath = self.addToPath(removePath, false, true, 1, options); - } - newPos = self.extractCommon(basePath, newString, oldString, diagonalPath, options); - if (basePath.oldPos + 1 >= oldLen && newPos + 1 >= newLen) { - // If we have hit the end of both strings, then we are done - return done(buildValues(self, basePath.lastComponent, newString, oldString, self.useLongestToken)); - } else { - bestPath[diagonalPath] = basePath; - if (basePath.oldPos + 1 >= oldLen) { - maxDiagonalToConsider = Math.min(maxDiagonalToConsider, diagonalPath - 1); - } - if (newPos + 1 >= newLen) { - minDiagonalToConsider = Math.max(minDiagonalToConsider, diagonalPath + 1); - } - } - } - editLength++; - } - - // Performs the length of edit iteration. Is a bit fugly as this has to support the - // sync and async mode which is never fun. Loops over execEditLength until a value - // is produced, or until the edit length exceeds options.maxEditLength (if given), - // in which case it will return undefined. - if (callback) { - (function exec() { - setTimeout(function () { - if (editLength > maxEditLength || Date.now() > abortAfterTimestamp) { - return callback(); - } - if (!execEditLength()) { - exec(); - } - }, 0); - })(); - } else { - while (editLength <= maxEditLength && Date.now() <= abortAfterTimestamp) { - var ret = execEditLength(); - if (ret) { + class Diff { + diff(oldStr, newStr, + // Type below is not accurate/complete - see above for full possibilities - but it compiles + options = {}) { + let callback; + if (typeof options === 'function') { + callback = options; + options = {}; + } + else if ('callback' in options) { + callback = options.callback; + } + // Allow subclasses to massage the input prior to running + const oldString = this.castInput(oldStr, options); + const newString = this.castInput(newStr, options); + const oldTokens = this.removeEmpty(this.tokenize(oldString, options)); + const newTokens = this.removeEmpty(this.tokenize(newString, options)); + return this.diffWithOptionsObj(oldTokens, newTokens, options, callback); + } + diffWithOptionsObj(oldTokens, newTokens, options, callback) { + var _a; + const done = (value) => { + value = this.postProcess(value, options); + if (callback) { + setTimeout(function () { callback(value); }, 0); + return undefined; + } + else { + return value; + } + }; + const newLen = newTokens.length, oldLen = oldTokens.length; + let editLength = 1; + let maxEditLength = newLen + oldLen; + if (options.maxEditLength != null) { + maxEditLength = Math.min(maxEditLength, options.maxEditLength); + } + const maxExecutionTime = (_a = options.timeout) !== null && _a !== void 0 ? _a : Infinity; + const abortAfterTimestamp = Date.now() + maxExecutionTime; + const bestPath = [{ oldPos: -1, lastComponent: undefined }]; + // Seed editLength = 0, i.e. the content starts with the same values + let newPos = this.extractCommon(bestPath[0], newTokens, oldTokens, 0, options); + if (bestPath[0].oldPos + 1 >= oldLen && newPos + 1 >= newLen) { + // Identity per the equality and tokenizer + return done(this.buildValues(bestPath[0].lastComponent, newTokens, oldTokens)); + } + // Once we hit the right edge of the edit graph on some diagonal k, we can + // definitely reach the end of the edit graph in no more than k edits, so + // there's no point in considering any moves to diagonal k+1 any more (from + // which we're guaranteed to need at least k+1 more edits). + // Similarly, once we've reached the bottom of the edit graph, there's no + // point considering moves to lower diagonals. + // We record this fact by setting minDiagonalToConsider and + // maxDiagonalToConsider to some finite value once we've hit the edge of + // the edit graph. + // This optimization is not faithful to the original algorithm presented in + // Myers's paper, which instead pointlessly extends D-paths off the end of + // the edit graph - see page 7 of Myers's paper which notes this point + // explicitly and illustrates it with a diagram. This has major performance + // implications for some common scenarios. For instance, to compute a diff + // where the new text simply appends d characters on the end of the + // original text of length n, the true Myers algorithm will take O(n+d^2) + // time while this optimization needs only O(n+d) time. + let minDiagonalToConsider = -Infinity, maxDiagonalToConsider = Infinity; + // Main worker method. checks all permutations of a given edit length for acceptance. + const execEditLength = () => { + for (let diagonalPath = Math.max(minDiagonalToConsider, -editLength); diagonalPath <= Math.min(maxDiagonalToConsider, editLength); diagonalPath += 2) { + let basePath; + const removePath = bestPath[diagonalPath - 1], addPath = bestPath[diagonalPath + 1]; + if (removePath) { + // No one else is going to attempt to use this value, clear it + // @ts-expect-error - perf optimisation. This type-violating value will never be read. + bestPath[diagonalPath - 1] = undefined; + } + let canAdd = false; + if (addPath) { + // what newPos will be after we do an insertion: + const addPathNewPos = addPath.oldPos - diagonalPath; + canAdd = addPath && 0 <= addPathNewPos && addPathNewPos < newLen; + } + const canRemove = removePath && removePath.oldPos + 1 < oldLen; + if (!canAdd && !canRemove) { + // If this path is a terminal then prune + // @ts-expect-error - perf optimisation. This type-violating value will never be read. + bestPath[diagonalPath] = undefined; + continue; + } + // Select the diagonal that we want to branch from. We select the prior + // path whose position in the old string is the farthest from the origin + // and does not pass the bounds of the diff graph + if (!canRemove || (canAdd && removePath.oldPos < addPath.oldPos)) { + basePath = this.addToPath(addPath, true, false, 0, options); + } + else { + basePath = this.addToPath(removePath, false, true, 1, options); + } + newPos = this.extractCommon(basePath, newTokens, oldTokens, diagonalPath, options); + if (basePath.oldPos + 1 >= oldLen && newPos + 1 >= newLen) { + // If we have hit the end of both strings, then we are done + return done(this.buildValues(basePath.lastComponent, newTokens, oldTokens)) || true; + } + else { + bestPath[diagonalPath] = basePath; + if (basePath.oldPos + 1 >= oldLen) { + maxDiagonalToConsider = Math.min(maxDiagonalToConsider, diagonalPath - 1); + } + if (newPos + 1 >= newLen) { + minDiagonalToConsider = Math.max(minDiagonalToConsider, diagonalPath + 1); + } + } + } + editLength++; + }; + // Performs the length of edit iteration. Is a bit fugly as this has to support the + // sync and async mode which is never fun. Loops over execEditLength until a value + // is produced, or until the edit length exceeds options.maxEditLength (if given), + // in which case it will return undefined. + if (callback) { + (function exec() { + setTimeout(function () { + if (editLength > maxEditLength || Date.now() > abortAfterTimestamp) { + return callback(undefined); + } + if (!execEditLength()) { + exec(); + } + }, 0); + }()); + } + else { + while (editLength <= maxEditLength && Date.now() <= abortAfterTimestamp) { + const ret = execEditLength(); + if (ret) { + return ret; + } + } + } + } + addToPath(path, added, removed, oldPosInc, options) { + const last = path.lastComponent; + if (last && !options.oneChangePerToken && last.added === added && last.removed === removed) { + return { + oldPos: path.oldPos + oldPosInc, + lastComponent: { count: last.count + 1, added: added, removed: removed, previousComponent: last.previousComponent } + }; + } + else { + return { + oldPos: path.oldPos + oldPosInc, + lastComponent: { count: 1, added: added, removed: removed, previousComponent: last } + }; + } + } + extractCommon(basePath, newTokens, oldTokens, diagonalPath, options) { + const newLen = newTokens.length, oldLen = oldTokens.length; + let oldPos = basePath.oldPos, newPos = oldPos - diagonalPath, commonCount = 0; + while (newPos + 1 < newLen && oldPos + 1 < oldLen && this.equals(oldTokens[oldPos + 1], newTokens[newPos + 1], options)) { + newPos++; + oldPos++; + commonCount++; + if (options.oneChangePerToken) { + basePath.lastComponent = { count: 1, previousComponent: basePath.lastComponent, added: false, removed: false }; + } + } + if (commonCount && !options.oneChangePerToken) { + basePath.lastComponent = { count: commonCount, previousComponent: basePath.lastComponent, added: false, removed: false }; + } + basePath.oldPos = oldPos; + return newPos; + } + equals(left, right, options) { + if (options.comparator) { + return options.comparator(left, right); + } + else { + return left === right + || (!!options.ignoreCase && left.toLowerCase() === right.toLowerCase()); + } + } + removeEmpty(array) { + const ret = []; + for (let i = 0; i < array.length; i++) { + if (array[i]) { + ret.push(array[i]); + } + } return ret; - } - } - } - }, - addToPath: function addToPath(path, added, removed, oldPosInc, options) { - var last = path.lastComponent; - if (last && !options.oneChangePerToken && last.added === added && last.removed === removed) { - return { - oldPos: path.oldPos + oldPosInc, - lastComponent: { - count: last.count + 1, - added: added, - removed: removed, - previousComponent: last.previousComponent - } - }; - } else { - return { - oldPos: path.oldPos + oldPosInc, - lastComponent: { - count: 1, - added: added, - removed: removed, - previousComponent: last - } - }; - } - }, - extractCommon: function extractCommon(basePath, newString, oldString, diagonalPath, options) { - var newLen = newString.length, - oldLen = oldString.length, - oldPos = basePath.oldPos, - newPos = oldPos - diagonalPath, - commonCount = 0; - while (newPos + 1 < newLen && oldPos + 1 < oldLen && this.equals(oldString[oldPos + 1], newString[newPos + 1], options)) { - newPos++; - oldPos++; - commonCount++; - if (options.oneChangePerToken) { - basePath.lastComponent = { - count: 1, - previousComponent: basePath.lastComponent, - added: false, - removed: false - }; - } - } - if (commonCount && !options.oneChangePerToken) { - basePath.lastComponent = { - count: commonCount, - previousComponent: basePath.lastComponent, - added: false, - removed: false - }; - } - basePath.oldPos = oldPos; - return newPos; - }, - equals: function equals(left, right, options) { - if (options.comparator) { - return options.comparator(left, right); - } else { - return left === right || options.ignoreCase && left.toLowerCase() === right.toLowerCase(); - } - }, - removeEmpty: function removeEmpty(array) { - var ret = []; - for (var i = 0; i < array.length; i++) { - if (array[i]) { - ret.push(array[i]); - } - } - return ret; - }, - castInput: function castInput(value) { - return value; - }, - tokenize: function tokenize(value) { - return Array.from(value); - }, - join: function join(chars) { - return chars.join(''); - }, - postProcess: function postProcess(changeObjects) { - return changeObjects; - } - }; - function buildValues(diff, lastComponent, newString, oldString, useLongestToken) { - // First we convert our linked list of components in reverse order to an - // array in the right order: - var components = []; - var nextComponent; - while (lastComponent) { - components.push(lastComponent); - nextComponent = lastComponent.previousComponent; - delete lastComponent.previousComponent; - lastComponent = nextComponent; + } + // eslint-disable-next-line @typescript-eslint/no-unused-vars + castInput(value, options) { + return value; + } + // eslint-disable-next-line @typescript-eslint/no-unused-vars + tokenize(value, options) { + return Array.from(value); + } + join(chars) { + // Assumes ValueT is string, which is the case for most subclasses. + // When it's false, e.g. in diffArrays, this method needs to be overridden (e.g. with a no-op) + // Yes, the casts are verbose and ugly, because this pattern - of having the base class SORT OF + // assume tokens and values are strings, but not completely - is weird and janky. + return chars.join(''); + } + postProcess(changeObjects, + // eslint-disable-next-line @typescript-eslint/no-unused-vars + options) { + return changeObjects; + } + get useLongestToken() { + return false; + } + buildValues(lastComponent, newTokens, oldTokens) { + // First we convert our linked list of components in reverse order to an + // array in the right order: + const components = []; + let nextComponent; + while (lastComponent) { + components.push(lastComponent); + nextComponent = lastComponent.previousComponent; + delete lastComponent.previousComponent; + lastComponent = nextComponent; + } + components.reverse(); + const componentLen = components.length; + let componentPos = 0, newPos = 0, oldPos = 0; + for (; componentPos < componentLen; componentPos++) { + const component = components[componentPos]; + if (!component.removed) { + if (!component.added && this.useLongestToken) { + let value = newTokens.slice(newPos, newPos + component.count); + value = value.map(function (value, i) { + const oldValue = oldTokens[oldPos + i]; + return oldValue.length > value.length ? oldValue : value; + }); + component.value = this.join(value); + } + else { + component.value = this.join(newTokens.slice(newPos, newPos + component.count)); + } + newPos += component.count; + // Common case + if (!component.added) { + oldPos += component.count; + } + } + else { + component.value = this.join(oldTokens.slice(oldPos, oldPos + component.count)); + oldPos += component.count; + } + } + return components; + } } - components.reverse(); - var componentPos = 0, - componentLen = components.length, - newPos = 0, - oldPos = 0; - for (; componentPos < componentLen; componentPos++) { - var component = components[componentPos]; - if (!component.removed) { - if (!component.added && useLongestToken) { - var value = newString.slice(newPos, newPos + component.count); - value = value.map(function (value, i) { - var oldValue = oldString[oldPos + i]; - return oldValue.length > value.length ? oldValue : value; - }); - component.value = diff.join(value); - } else { - component.value = diff.join(newString.slice(newPos, newPos + component.count)); - } - newPos += component.count; - // Common case - if (!component.added) { - oldPos += component.count; - } - } else { - component.value = diff.join(oldString.slice(oldPos, oldPos + component.count)); - oldPos += component.count; - } + class CharacterDiff extends Diff { } - return components; - } - - var characterDiff = new Diff(); - function diffChars(oldStr, newStr, options) { - return characterDiff.diff(oldStr, newStr, options); - } - - function longestCommonPrefix(str1, str2) { - var i; - for (i = 0; i < str1.length && i < str2.length; i++) { - if (str1[i] != str2[i]) { - return str1.slice(0, i); - } + const characterDiff = new CharacterDiff(); + function diffChars(oldStr, newStr, options) { + return characterDiff.diff(oldStr, newStr, options); } - return str1.slice(0, i); - } - function longestCommonSuffix(str1, str2) { - var i; - // Unlike longestCommonPrefix, we need a special case to handle all scenarios - // where we return the empty string since str1.slice(-0) will return the - // entire string. - if (!str1 || !str2 || str1[str1.length - 1] != str2[str2.length - 1]) { - return ''; + function longestCommonPrefix(str1, str2) { + let i; + for (i = 0; i < str1.length && i < str2.length; i++) { + if (str1[i] != str2[i]) { + return str1.slice(0, i); + } + } + return str1.slice(0, i); } - for (i = 0; i < str1.length && i < str2.length; i++) { - if (str1[str1.length - (i + 1)] != str2[str2.length - (i + 1)]) { + function longestCommonSuffix(str1, str2) { + let i; + // Unlike longestCommonPrefix, we need a special case to handle all scenarios + // where we return the empty string since str1.slice(-0) will return the + // entire string. + if (!str1 || !str2 || str1[str1.length - 1] != str2[str2.length - 1]) { + return ''; + } + for (i = 0; i < str1.length && i < str2.length; i++) { + if (str1[str1.length - (i + 1)] != str2[str2.length - (i + 1)]) { + return str1.slice(-i); + } + } return str1.slice(-i); - } } - return str1.slice(-i); - } - function replacePrefix(string, oldPrefix, newPrefix) { - if (string.slice(0, oldPrefix.length) != oldPrefix) { - throw Error("string ".concat(JSON.stringify(string), " doesn't start with prefix ").concat(JSON.stringify(oldPrefix), "; this is a bug")); + function replacePrefix(string, oldPrefix, newPrefix) { + if (string.slice(0, oldPrefix.length) != oldPrefix) { + throw Error(`string ${JSON.stringify(string)} doesn't start with prefix ${JSON.stringify(oldPrefix)}; this is a bug`); + } + return newPrefix + string.slice(oldPrefix.length); } - return newPrefix + string.slice(oldPrefix.length); - } - function replaceSuffix(string, oldSuffix, newSuffix) { - if (!oldSuffix) { - return string + newSuffix; + function replaceSuffix(string, oldSuffix, newSuffix) { + if (!oldSuffix) { + return string + newSuffix; + } + if (string.slice(-oldSuffix.length) != oldSuffix) { + throw Error(`string ${JSON.stringify(string)} doesn't end with suffix ${JSON.stringify(oldSuffix)}; this is a bug`); + } + return string.slice(0, -oldSuffix.length) + newSuffix; } - if (string.slice(-oldSuffix.length) != oldSuffix) { - throw Error("string ".concat(JSON.stringify(string), " doesn't end with suffix ").concat(JSON.stringify(oldSuffix), "; this is a bug")); + function removePrefix(string, oldPrefix) { + return replacePrefix(string, oldPrefix, ''); } - return string.slice(0, -oldSuffix.length) + newSuffix; - } - function removePrefix(string, oldPrefix) { - return replacePrefix(string, oldPrefix, ''); - } - function removeSuffix(string, oldSuffix) { - return replaceSuffix(string, oldSuffix, ''); - } - function maximumOverlap(string1, string2) { - return string2.slice(0, overlapCount(string1, string2)); - } - - // Nicked from https://stackoverflow.com/a/60422853/1709587 - function overlapCount(a, b) { - // Deal with cases where the strings differ in length - var startA = 0; - if (a.length > b.length) { - startA = a.length - b.length; + function removeSuffix(string, oldSuffix) { + return replaceSuffix(string, oldSuffix, ''); } - var endB = b.length; - if (a.length < b.length) { - endB = a.length; + function maximumOverlap(string1, string2) { + return string2.slice(0, overlapCount(string1, string2)); } - // Create a back-reference for each index - // that should be followed in case of a mismatch. - // We only need B to make these references: - var map = Array(endB); - var k = 0; // Index that lags behind j - map[0] = 0; - for (var j = 1; j < endB; j++) { - if (b[j] == b[k]) { - map[j] = map[k]; // skip over the same character (optional optimisation) - } else { - map[j] = k; - } - while (k > 0 && b[j] != b[k]) { - k = map[k]; - } - if (b[j] == b[k]) { - k++; - } + // Nicked from https://stackoverflow.com/a/60422853/1709587 + function overlapCount(a, b) { + // Deal with cases where the strings differ in length + let startA = 0; + if (a.length > b.length) { + startA = a.length - b.length; + } + let endB = b.length; + if (a.length < b.length) { + endB = a.length; + } + // Create a back-reference for each index + // that should be followed in case of a mismatch. + // We only need B to make these references: + const map = Array(endB); + let k = 0; // Index that lags behind j + map[0] = 0; + for (let j = 1; j < endB; j++) { + if (b[j] == b[k]) { + map[j] = map[k]; // skip over the same character (optional optimisation) + } + else { + map[j] = k; + } + while (k > 0 && b[j] != b[k]) { + k = map[k]; + } + if (b[j] == b[k]) { + k++; + } + } + // Phase 2: use these references while iterating over A + k = 0; + for (let i = startA; i < a.length; i++) { + while (k > 0 && a[i] != b[k]) { + k = map[k]; + } + if (a[i] == b[k]) { + k++; + } + } + return k; } - // Phase 2: use these references while iterating over A - k = 0; - for (var i = startA; i < a.length; i++) { - while (k > 0 && a[i] != b[k]) { - k = map[k]; - } - if (a[i] == b[k]) { - k++; - } + /** + * Returns true if the string consistently uses Windows line endings. + */ + function hasOnlyWinLineEndings(string) { + return string.includes('\r\n') && !string.startsWith('\n') && !string.match(/[^\r]\n/); } - return k; - } - - /** - * Returns true if the string consistently uses Windows line endings. - */ - function hasOnlyWinLineEndings(string) { - return string.includes('\r\n') && !string.startsWith('\n') && !string.match(/[^\r]\n/); - } - - /** - * Returns true if the string consistently uses Unix line endings. - */ - function hasOnlyUnixLineEndings(string) { - return !string.includes('\r\n') && string.includes('\n'); - } - - // Based on https://en.wikipedia.org/wiki/Latin_script_in_Unicode - // - // Ranges and exceptions: - // Latin-1 Supplement, 0080–00FF - // - U+00D7 × Multiplication sign - // - U+00F7 ÷ Division sign - // Latin Extended-A, 0100–017F - // Latin Extended-B, 0180–024F - // IPA Extensions, 0250–02AF - // Spacing Modifier Letters, 02B0–02FF - // - U+02C7 ˇ ˇ Caron - // - U+02D8 ˘ ˘ Breve - // - U+02D9 ˙ ˙ Dot Above - // - U+02DA ˚ ˚ Ring Above - // - U+02DB ˛ ˛ Ogonek - // - U+02DC ˜ ˜ Small Tilde - // - U+02DD ˝ ˝ Double Acute Accent - // Latin Extended Additional, 1E00–1EFF - var extendedWordChars = "a-zA-Z0-9_\\u{C0}-\\u{FF}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}"; - - // Each token is one of the following: - // - A punctuation mark plus the surrounding whitespace - // - A word plus the surrounding whitespace - // - Pure whitespace (but only in the special case where this the entire text - // is just whitespace) - // - // We have to include surrounding whitespace in the tokens because the two - // alternative approaches produce horribly broken results: - // * If we just discard the whitespace, we can't fully reproduce the original - // text from the sequence of tokens and any attempt to render the diff will - // get the whitespace wrong. - // * If we have separate tokens for whitespace, then in a typical text every - // second token will be a single space character. But this often results in - // the optimal diff between two texts being a perverse one that preserves - // the spaces between words but deletes and reinserts actual common words. - // See https://github.com/kpdecker/jsdiff/issues/160#issuecomment-1866099640 - // for an example. - // - // Keeping the surrounding whitespace of course has implications for .equals - // and .join, not just .tokenize. - - // This regex does NOT fully implement the tokenization rules described above. - // Instead, it gives runs of whitespace their own "token". The tokenize method - // then handles stitching whitespace tokens onto adjacent word or punctuation - // tokens. - var tokenizeIncludingWhitespace = new RegExp("[".concat(extendedWordChars, "]+|\\s+|[^").concat(extendedWordChars, "]"), 'ug'); - var wordDiff = new Diff(); - wordDiff.equals = function (left, right, options) { - if (options.ignoreCase) { - left = left.toLowerCase(); - right = right.toLowerCase(); + /** + * Returns true if the string consistently uses Unix line endings. + */ + function hasOnlyUnixLineEndings(string) { + return !string.includes('\r\n') && string.includes('\n'); } - return left.trim() === right.trim(); - }; - wordDiff.tokenize = function (value) { - var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - var parts; - if (options.intlSegmenter) { - if (options.intlSegmenter.resolvedOptions().granularity != 'word') { - throw new Error('The segmenter passed must have a granularity of "word"'); - } - parts = Array.from(options.intlSegmenter.segment(value), function (segment) { - return segment.segment; - }); - } else { - parts = value.match(tokenizeIncludingWhitespace) || []; + /** + * Split a string into segments using a word segmenter, merging consecutive + * segments if they are both whitespace segments. Whitespace segments can + * appear adjacent to one another for two reasons: + * - newlines always get their own segment + * - where a diacritic is attached to a whitespace character in the text, the + * segment ends after the diacritic, so e.g. " \u0300 " becomes two segments. + * This function therefore runs the segmenter's .segment() method and then + * merges consecutive segments of whitespace into a single part. + */ + function segment(string, segmenter) { + const parts = []; + for (const segmentObj of Array.from(segmenter.segment(string))) { + const segment = segmentObj.segment; + if (parts.length && (/\s/).test(parts[parts.length - 1]) && (/\s/).test(segment)) { + parts[parts.length - 1] += segment; + } + else { + parts.push(segment); + } + } + return parts; } - var tokens = []; - var prevPart = null; - parts.forEach(function (part) { - if (/\s/.test(part)) { - if (prevPart == null) { - tokens.push(part); - } else { - tokens.push(tokens.pop() + part); - } - } else if (/\s/.test(prevPart)) { - if (tokens[tokens.length - 1] == prevPart) { - tokens.push(tokens.pop() + part); - } else { - tokens.push(prevPart + part); - } - } else { - tokens.push(part); - } - prevPart = part; - }); - return tokens; - }; - wordDiff.join = function (tokens) { - // Tokens being joined here will always have appeared consecutively in the - // same text, so we can simply strip off the leading whitespace from all the - // tokens except the first (and except any whitespace-only tokens - but such - // a token will always be the first and only token anyway) and then join them - // and the whitespace around words and punctuation will end up correct. - return tokens.map(function (token, i) { - if (i == 0) { - return token; - } else { - return token.replace(/^\s+/, ''); - } - }).join(''); - }; - wordDiff.postProcess = function (changes, options) { - if (!changes || options.oneChangePerToken) { - return changes; + // The functions below take a `segmenter` argument so that, when called from + // diffWords when it is using a segmenter, they can use a notion of what + // constitutes "whitespace" that is consistent with the segmenter. + // + // USUALLY this will be identical to the result of the non-segmenter-based + // logic, but it differs in at least one case: when whitespace characters are + // modified by diacritics. A word segmenter considers these diacritics to be + // part of the whitespace, whereas our non-segmenter-based logic does not. + // + // Because the segmenter-based approach necessarily requires segmenting the + // entire string, we offer a leadingAndTrailingWs function to allow getting the + // whitespace prefix AND whitespace suffix with a single call to the segmenter, + // for efficiency's sake. + function trailingWs(string, segmenter) { + if (segmenter) { + return leadingAndTrailingWs(string, segmenter)[1]; + } + // Yes, this looks overcomplicated and dumb - why not replace the whole function with + // return string.match(/\s*$/)[0] + // you ask? Because: + // 1. the trap described at https://markamery.com/blog/quadratic-time-regexes/ would mean doing + // this would cause this function to take O(n²) time in the worst case (specifically when + // there is a massive run of NON-TRAILING whitespace in `string`), and + // 2. the fix proposed in the same blog post, of using a negative lookbehind, is incompatible + // with old Safari versions that we'd like to not break if possible (see + // https://github.com/kpdecker/jsdiff/pull/550) + // It feels absurd to do this with an explicit loop instead of a regex, but I really can't see a + // better way that doesn't result in broken behaviour. + let i; + for (i = string.length - 1; i >= 0; i--) { + if (!string[i].match(/\s/)) { + break; + } + } + return string.substring(i + 1); } - var lastKeep = null; - // Change objects representing any insertion or deletion since the last - // "keep" change object. There can be at most one of each. - var insertion = null; - var deletion = null; - changes.forEach(function (change) { - if (change.added) { - insertion = change; - } else if (change.removed) { - deletion = change; - } else { - if (insertion || deletion) { - // May be false at start of text - dedupeWhitespaceInChangeObjects(lastKeep, deletion, insertion, change); - } - lastKeep = change; - insertion = null; - deletion = null; - } - }); - if (insertion || deletion) { - dedupeWhitespaceInChangeObjects(lastKeep, deletion, insertion, null); + function leadingWs(string, segmenter) { + if (segmenter) { + return leadingAndTrailingWs(string, segmenter)[0]; + } + // Thankfully the annoying considerations described in trailingWs don't apply here: + const match = string.match(/^\s*/); + return match ? match[0] : ''; } - return changes; - }; - function diffWords(oldStr, newStr, options) { - // This option has never been documented and never will be (it's clearer to - // just call `diffWordsWithSpace` directly if you need that behavior), but - // has existed in jsdiff for a long time, so we retain support for it here - // for the sake of backwards compatibility. - if ((options === null || options === void 0 ? void 0 : options.ignoreWhitespace) != null && !options.ignoreWhitespace) { - return diffWordsWithSpace(oldStr, newStr, options); + function leadingAndTrailingWs(string, segmenter) { + if (!segmenter) { + return [leadingWs(string), trailingWs(string)]; + } + if (segmenter.resolvedOptions().granularity != 'word') { + throw new Error('The segmenter passed must have a granularity of "word"'); + } + const segments = segment(string, segmenter); + const firstSeg = segments[0]; + const lastSeg = segments[segments.length - 1]; + const head = (/\s/).test(firstSeg) ? firstSeg : ''; + const tail = (/\s/).test(lastSeg) ? lastSeg : ''; + return [head, tail]; } - return wordDiff.diff(oldStr, newStr, options); - } - function dedupeWhitespaceInChangeObjects(startKeep, deletion, insertion, endKeep) { - // Before returning, we tidy up the leading and trailing whitespace of the - // change objects to eliminate cases where trailing whitespace in one object - // is repeated as leading whitespace in the next. - // Below are examples of the outcomes we want here to explain the code. - // I=insert, K=keep, D=delete - // 1. diffing 'foo bar baz' vs 'foo baz' - // Prior to cleanup, we have K:'foo ' D:' bar ' K:' baz' - // After cleanup, we want: K:'foo ' D:'bar ' K:'baz' - // - // 2. Diffing 'foo bar baz' vs 'foo qux baz' - // Prior to cleanup, we have K:'foo ' D:' bar ' I:' qux ' K:' baz' - // After cleanup, we want K:'foo ' D:'bar' I:'qux' K:' baz' + + // Based on https://en.wikipedia.org/wiki/Latin_script_in_Unicode // - // 3. Diffing 'foo\nbar baz' vs 'foo baz' - // Prior to cleanup, we have K:'foo ' D:'\nbar ' K:' baz' - // After cleanup, we want K'foo' D:'\nbar' K:' baz' + // Chars/ranges counted as "word" characters by this regex are as follows: // - // 4. Diffing 'foo baz' vs 'foo\nbar baz' - // Prior to cleanup, we have K:'foo\n' I:'\nbar ' K:' baz' - // After cleanup, we ideally want K'foo' I:'\nbar' K:' baz' - // but don't actually manage this currently (the pre-cleanup change - // objects don't contain enough information to make it possible). + // + U+00AD Soft hyphen + // + 00C0–00FF (letters with diacritics from the Latin-1 Supplement), except: + // - U+00D7 × Multiplication sign + // - U+00F7 ÷ Division sign + // + Latin Extended-A, 0100–017F + // + Latin Extended-B, 0180–024F + // + IPA Extensions, 0250–02AF + // + Spacing Modifier Letters, 02B0–02FF, except: + // - U+02C7 ˇ ˇ Caron + // - U+02D8 ˘ ˘ Breve + // - U+02D9 ˙ ˙ Dot Above + // - U+02DA ˚ ˚ Ring Above + // - U+02DB ˛ ˛ Ogonek + // - U+02DC ˜ ˜ Small Tilde + // - U+02DD ˝ ˝ Double Acute Accent + // + Latin Extended Additional, 1E00–1EFF + const extendedWordChars = 'a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}'; + // Each token is one of the following: + // - A punctuation mark plus the surrounding whitespace + // - A word plus the surrounding whitespace + // - Pure whitespace (but only in the special case where the entire text + // is just whitespace) // - // 5. Diffing 'foo bar baz' vs 'foo baz' - // Prior to cleanup, we have K:'foo ' D:' bar ' K:' baz' - // After cleanup, we want K:'foo ' D:' bar ' K:'baz' + // We have to include surrounding whitespace in the tokens because the two + // alternative approaches produce horribly broken results: + // * If we just discard the whitespace, we can't fully reproduce the original + // text from the sequence of tokens and any attempt to render the diff will + // get the whitespace wrong. + // * If we have separate tokens for whitespace, then in a typical text every + // second token will be a single space character. But this often results in + // the optimal diff between two texts being a perverse one that preserves + // the spaces between words but deletes and reinserts actual common words. + // See https://github.com/kpdecker/jsdiff/issues/160#issuecomment-1866099640 + // for an example. // - // Our handling is unavoidably imperfect in the case where there's a single - // indel between keeps and the whitespace has changed. For instance, consider - // diffing 'foo\tbar\nbaz' vs 'foo baz'. Unless we create an extra change - // object to represent the insertion of the space character (which isn't even - // a token), we have no way to avoid losing information about the texts' - // original whitespace in the result we return. Still, we do our best to - // output something that will look sensible if we e.g. print it with - // insertions in green and deletions in red. - - // Between two "keep" change objects (or before the first or after the last - // change object), we can have either: - // * A "delete" followed by an "insert" - // * Just an "insert" - // * Just a "delete" - // We handle the three cases separately. - if (deletion && insertion) { - var oldWsPrefix = deletion.value.match(/^\s*/)[0]; - var oldWsSuffix = deletion.value.match(/\s*$/)[0]; - var newWsPrefix = insertion.value.match(/^\s*/)[0]; - var newWsSuffix = insertion.value.match(/\s*$/)[0]; - if (startKeep) { - var commonWsPrefix = longestCommonPrefix(oldWsPrefix, newWsPrefix); - startKeep.value = replaceSuffix(startKeep.value, newWsPrefix, commonWsPrefix); - deletion.value = removePrefix(deletion.value, commonWsPrefix); - insertion.value = removePrefix(insertion.value, commonWsPrefix); - } - if (endKeep) { - var commonWsSuffix = longestCommonSuffix(oldWsSuffix, newWsSuffix); - endKeep.value = replacePrefix(endKeep.value, newWsSuffix, commonWsSuffix); - deletion.value = removeSuffix(deletion.value, commonWsSuffix); - insertion.value = removeSuffix(insertion.value, commonWsSuffix); - } - } else if (insertion) { - // The whitespaces all reflect what was in the new text rather than - // the old, so we essentially have no information about whitespace - // insertion or deletion. We just want to dedupe the whitespace. - // We do that by having each change object keep its trailing - // whitespace and deleting duplicate leading whitespace where - // present. - if (startKeep) { - insertion.value = insertion.value.replace(/^\s*/, ''); - } - if (endKeep) { - endKeep.value = endKeep.value.replace(/^\s*/, ''); - } - // otherwise we've got a deletion and no insertion - } else if (startKeep && endKeep) { - var newWsFull = endKeep.value.match(/^\s*/)[0], - delWsStart = deletion.value.match(/^\s*/)[0], - delWsEnd = deletion.value.match(/\s*$/)[0]; - - // Any whitespace that comes straight after startKeep in both the old and - // new texts, assign to startKeep and remove from the deletion. - var newWsStart = longestCommonPrefix(newWsFull, delWsStart); - deletion.value = removePrefix(deletion.value, newWsStart); - - // Any whitespace that comes straight before endKeep in both the old and - // new texts, and hasn't already been assigned to startKeep, assign to - // endKeep and remove from the deletion. - var newWsEnd = longestCommonSuffix(removePrefix(newWsFull, newWsStart), delWsEnd); - deletion.value = removeSuffix(deletion.value, newWsEnd); - endKeep.value = replacePrefix(endKeep.value, newWsFull, newWsEnd); - - // If there's any whitespace from the new text that HASN'T already been - // assigned, assign it to the start: - startKeep.value = replaceSuffix(startKeep.value, newWsFull, newWsFull.slice(0, newWsFull.length - newWsEnd.length)); - } else if (endKeep) { - // We are at the start of the text. Preserve all the whitespace on - // endKeep, and just remove whitespace from the end of deletion to the - // extent that it overlaps with the start of endKeep. - var endKeepWsPrefix = endKeep.value.match(/^\s*/)[0]; - var deletionWsSuffix = deletion.value.match(/\s*$/)[0]; - var overlap = maximumOverlap(deletionWsSuffix, endKeepWsPrefix); - deletion.value = removeSuffix(deletion.value, overlap); - } else if (startKeep) { - // We are at the END of the text. Preserve all the whitespace on - // startKeep, and just remove whitespace from the start of deletion to - // the extent that it overlaps with the end of startKeep. - var startKeepWsSuffix = startKeep.value.match(/\s*$/)[0]; - var deletionWsPrefix = deletion.value.match(/^\s*/)[0]; - var _overlap = maximumOverlap(startKeepWsSuffix, deletionWsPrefix); - deletion.value = removePrefix(deletion.value, _overlap); - } - } - var wordWithSpaceDiff = new Diff(); - wordWithSpaceDiff.tokenize = function (value) { - // Slightly different to the tokenizeIncludingWhitespace regex used above in - // that this one treats each individual newline as a distinct tokens, rather - // than merging them into other surrounding whitespace. This was requested - // in https://github.com/kpdecker/jsdiff/issues/180 & - // https://github.com/kpdecker/jsdiff/issues/211 - var regex = new RegExp("(\\r?\\n)|[".concat(extendedWordChars, "]+|[^\\S\\n\\r]+|[^").concat(extendedWordChars, "]"), 'ug'); - return value.match(regex) || []; - }; - function diffWordsWithSpace(oldStr, newStr, options) { - return wordWithSpaceDiff.diff(oldStr, newStr, options); - } - - function generateOptions(options, defaults) { - if (typeof options === 'function') { - defaults.callback = options; - } else if (options) { - for (var name in options) { - /* istanbul ignore else */ - if (options.hasOwnProperty(name)) { - defaults[name] = options[name]; - } - } - } - return defaults; - } - - var lineDiff = new Diff(); - lineDiff.tokenize = function (value, options) { - if (options.stripTrailingCr) { - // remove one \r before \n to match GNU diff's --strip-trailing-cr behavior - value = value.replace(/\r\n/g, '\n'); - } - var retLines = [], - linesAndNewlines = value.split(/(\n|\r\n)/); - - // Ignore the final empty token that occurs if the string ends with a new line - if (!linesAndNewlines[linesAndNewlines.length - 1]) { - linesAndNewlines.pop(); - } - - // Merge the content and line separators into single tokens - for (var i = 0; i < linesAndNewlines.length; i++) { - var line = linesAndNewlines[i]; - if (i % 2 && !options.newlineIsToken) { - retLines[retLines.length - 1] += line; - } else { - retLines.push(line); - } - } - return retLines; - }; - lineDiff.equals = function (left, right, options) { - // If we're ignoring whitespace, we need to normalise lines by stripping - // whitespace before checking equality. (This has an annoying interaction - // with newlineIsToken that requires special handling: if newlines get their - // own token, then we DON'T want to trim the *newline* tokens down to empty - // strings, since this would cause us to treat whitespace-only line content - // as equal to a separator between lines, which would be weird and - // inconsistent with the documented behavior of the options.) - if (options.ignoreWhitespace) { - if (!options.newlineIsToken || !left.includes('\n')) { - left = left.trim(); - } - if (!options.newlineIsToken || !right.includes('\n')) { - right = right.trim(); - } - } else if (options.ignoreNewlineAtEof && !options.newlineIsToken) { - if (left.endsWith('\n')) { - left = left.slice(0, -1); - } - if (right.endsWith('\n')) { - right = right.slice(0, -1); - } + // Keeping the surrounding whitespace of course has implications for .equals + // and .join, not just .tokenize. + // This regex does NOT fully implement the tokenization rules described above. + // Instead, it gives runs of whitespace their own "token". The tokenize method + // then handles stitching whitespace tokens onto adjacent word or punctuation + // tokens. + const tokenizeIncludingWhitespace = new RegExp(`[${extendedWordChars}]+|\\s+|[^${extendedWordChars}]`, 'ug'); + class WordDiff extends Diff { + equals(left, right, options) { + if (options.ignoreCase) { + left = left.toLowerCase(); + right = right.toLowerCase(); + } + return left.trim() === right.trim(); + } + tokenize(value, options = {}) { + let parts; + if (options.intlSegmenter) { + const segmenter = options.intlSegmenter; + if (segmenter.resolvedOptions().granularity != 'word') { + throw new Error('The segmenter passed must have a granularity of "word"'); + } + // We want `parts` to be an array whose elements alternate between being + // pure whitespace and being pure non-whitespace. This is ALMOST what the + // segments returned by a word-based Intl.Segmenter already look like, + // but not quite - see explanation in the docs of our custom segment() + // function. + parts = segment(value, segmenter); + } + else { + parts = value.match(tokenizeIncludingWhitespace) || []; + } + const tokens = []; + let prevPart = null; + parts.forEach(part => { + if ((/\s/).test(part)) { + if (prevPart == null) { + tokens.push(part); + } + else { + tokens.push(tokens.pop() + part); + } + } + else if (prevPart != null && (/\s/).test(prevPart)) { + if (tokens[tokens.length - 1] == prevPart) { + tokens.push(tokens.pop() + part); + } + else { + tokens.push(prevPart + part); + } + } + else { + tokens.push(part); + } + prevPart = part; + }); + return tokens; + } + join(tokens) { + // Tokens being joined here will always have appeared consecutively in the + // same text, so we can simply strip off the leading whitespace from all the + // tokens except the first (and except any whitespace-only tokens - but such + // a token will always be the first and only token anyway) and then join them + // and the whitespace around words and punctuation will end up correct. + return tokens.map((token, i) => { + if (i == 0) { + return token; + } + else { + return token.replace((/^\s+/), ''); + } + }).join(''); + } + postProcess(changes, options) { + if (!changes || options.oneChangePerToken) { + return changes; + } + let lastKeep = null; + // Change objects representing any insertion or deletion since the last + // "keep" change object. There can be at most one of each. + let insertion = null; + let deletion = null; + changes.forEach(change => { + if (change.added) { + insertion = change; + } + else if (change.removed) { + deletion = change; + } + else { + if (insertion || deletion) { // May be false at start of text + dedupeWhitespaceInChangeObjects(lastKeep, deletion, insertion, change, options.intlSegmenter); + } + lastKeep = change; + insertion = null; + deletion = null; + } + }); + if (insertion || deletion) { + dedupeWhitespaceInChangeObjects(lastKeep, deletion, insertion, null, options.intlSegmenter); + } + return changes; + } } - return Diff.prototype.equals.call(this, left, right, options); - }; - function diffLines(oldStr, newStr, callback) { - return lineDiff.diff(oldStr, newStr, callback); - } - - // Kept for backwards compatibility. This is a rather arbitrary wrapper method - // that just calls `diffLines` with `ignoreWhitespace: true`. It's confusing to - // have two ways to do exactly the same thing in the API, so we no longer - // document this one (library users should explicitly use `diffLines` with - // `ignoreWhitespace: true` instead) but we keep it around to maintain - // compatibility with code that used old versions. - function diffTrimmedLines(oldStr, newStr, callback) { - var options = generateOptions(callback, { - ignoreWhitespace: true - }); - return lineDiff.diff(oldStr, newStr, options); - } - - var sentenceDiff = new Diff(); - sentenceDiff.tokenize = function (value) { - return value.split(/(\S.+?[.!?])(?=\s+|$)/); - }; - function diffSentences(oldStr, newStr, callback) { - return sentenceDiff.diff(oldStr, newStr, callback); - } - - var cssDiff = new Diff(); - cssDiff.tokenize = function (value) { - return value.split(/([{}:;,]|\s+)/); - }; - function diffCss(oldStr, newStr, callback) { - return cssDiff.diff(oldStr, newStr, callback); - } - - function ownKeys(e, r) { - var t = Object.keys(e); - if (Object.getOwnPropertySymbols) { - var o = Object.getOwnPropertySymbols(e); - r && (o = o.filter(function (r) { - return Object.getOwnPropertyDescriptor(e, r).enumerable; - })), t.push.apply(t, o); + const wordDiff = new WordDiff(); + function diffWords(oldStr, newStr, options) { + // This option has never been documented and never will be (it's clearer to + // just call `diffWordsWithSpace` directly if you need that behavior), but + // has existed in jsdiff for a long time, so we retain support for it here + // for the sake of backwards compatibility. + if ((options === null || options === void 0 ? void 0 : options.ignoreWhitespace) != null && !options.ignoreWhitespace) { + return diffWordsWithSpace(oldStr, newStr, options); + } + return wordDiff.diff(oldStr, newStr, options); + } + function dedupeWhitespaceInChangeObjects(startKeep, deletion, insertion, endKeep, segmenter) { + // Before returning, we tidy up the leading and trailing whitespace of the + // change objects to eliminate cases where trailing whitespace in one object + // is repeated as leading whitespace in the next. + // Below are examples of the outcomes we want here to explain the code. + // I=insert, K=keep, D=delete + // 1. diffing 'foo bar baz' vs 'foo baz' + // Prior to cleanup, we have K:'foo ' D:' bar ' K:' baz' + // After cleanup, we want: K:'foo ' D:'bar ' K:'baz' + // + // 2. Diffing 'foo bar baz' vs 'foo qux baz' + // Prior to cleanup, we have K:'foo ' D:' bar ' I:' qux ' K:' baz' + // After cleanup, we want K:'foo ' D:'bar' I:'qux' K:' baz' + // + // 3. Diffing 'foo\nbar baz' vs 'foo baz' + // Prior to cleanup, we have K:'foo ' D:'\nbar ' K:' baz' + // After cleanup, we want K'foo' D:'\nbar' K:' baz' + // + // 4. Diffing 'foo baz' vs 'foo\nbar baz' + // Prior to cleanup, we have K:'foo\n' I:'\nbar ' K:' baz' + // After cleanup, we ideally want K'foo' I:'\nbar' K:' baz' + // but don't actually manage this currently (the pre-cleanup change + // objects don't contain enough information to make it possible). + // + // 5. Diffing 'foo bar baz' vs 'foo baz' + // Prior to cleanup, we have K:'foo ' D:' bar ' K:' baz' + // After cleanup, we want K:'foo ' D:' bar ' K:'baz' + // + // Our handling is unavoidably imperfect in the case where there's a single + // indel between keeps and the whitespace has changed. For instance, consider + // diffing 'foo\tbar\nbaz' vs 'foo baz'. Unless we create an extra change + // object to represent the insertion of the space character (which isn't even + // a token), we have no way to avoid losing information about the texts' + // original whitespace in the result we return. Still, we do our best to + // output something that will look sensible if we e.g. print it with + // insertions in green and deletions in red. + // Between two "keep" change objects (or before the first or after the last + // change object), we can have either: + // * A "delete" followed by an "insert" + // * Just an "insert" + // * Just a "delete" + // We handle the three cases separately. + if (deletion && insertion) { + const [oldWsPrefix, oldWsSuffix] = leadingAndTrailingWs(deletion.value, segmenter); + const [newWsPrefix, newWsSuffix] = leadingAndTrailingWs(insertion.value, segmenter); + if (startKeep) { + const commonWsPrefix = longestCommonPrefix(oldWsPrefix, newWsPrefix); + startKeep.value = replaceSuffix(startKeep.value, newWsPrefix, commonWsPrefix); + deletion.value = removePrefix(deletion.value, commonWsPrefix); + insertion.value = removePrefix(insertion.value, commonWsPrefix); + } + if (endKeep) { + const commonWsSuffix = longestCommonSuffix(oldWsSuffix, newWsSuffix); + endKeep.value = replacePrefix(endKeep.value, newWsSuffix, commonWsSuffix); + deletion.value = removeSuffix(deletion.value, commonWsSuffix); + insertion.value = removeSuffix(insertion.value, commonWsSuffix); + } + } + else if (insertion) { + // The whitespaces all reflect what was in the new text rather than + // the old, so we essentially have no information about whitespace + // insertion or deletion. We just want to dedupe the whitespace. + // We do that by having each change object keep its trailing + // whitespace and deleting duplicate leading whitespace where + // present. + if (startKeep) { + const ws = leadingWs(insertion.value, segmenter); + insertion.value = insertion.value.substring(ws.length); + } + if (endKeep) { + const ws = leadingWs(endKeep.value, segmenter); + endKeep.value = endKeep.value.substring(ws.length); + } + // otherwise we've got a deletion and no insertion + } + else if (startKeep && endKeep) { + const newWsFull = leadingWs(endKeep.value, segmenter), [delWsStart, delWsEnd] = leadingAndTrailingWs(deletion.value, segmenter); + // Any whitespace that comes straight after startKeep in both the old and + // new texts, assign to startKeep and remove from the deletion. + const newWsStart = longestCommonPrefix(newWsFull, delWsStart); + deletion.value = removePrefix(deletion.value, newWsStart); + // Any whitespace that comes straight before endKeep in both the old and + // new texts, and hasn't already been assigned to startKeep, assign to + // endKeep and remove from the deletion. + const newWsEnd = longestCommonSuffix(removePrefix(newWsFull, newWsStart), delWsEnd); + deletion.value = removeSuffix(deletion.value, newWsEnd); + endKeep.value = replacePrefix(endKeep.value, newWsFull, newWsEnd); + // If there's any whitespace from the new text that HASN'T already been + // assigned, assign it to the start: + startKeep.value = replaceSuffix(startKeep.value, newWsFull, newWsFull.slice(0, newWsFull.length - newWsEnd.length)); + } + else if (endKeep) { + // We are at the start of the text. Preserve all the whitespace on + // endKeep, and just remove whitespace from the end of deletion to the + // extent that it overlaps with the start of endKeep. + const endKeepWsPrefix = leadingWs(endKeep.value, segmenter); + const deletionWsSuffix = trailingWs(deletion.value, segmenter); + const overlap = maximumOverlap(deletionWsSuffix, endKeepWsPrefix); + deletion.value = removeSuffix(deletion.value, overlap); + } + else if (startKeep) { + // We are at the END of the text. Preserve all the whitespace on + // startKeep, and just remove whitespace from the start of deletion to + // the extent that it overlaps with the end of startKeep. + const startKeepWsSuffix = trailingWs(startKeep.value, segmenter); + const deletionWsPrefix = leadingWs(deletion.value, segmenter); + const overlap = maximumOverlap(startKeepWsSuffix, deletionWsPrefix); + deletion.value = removePrefix(deletion.value, overlap); + } } - return t; - } - function _objectSpread2(e) { - for (var r = 1; r < arguments.length; r++) { - var t = null != arguments[r] ? arguments[r] : {}; - r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { - _defineProperty(e, r, t[r]); - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { - Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); - }); + class WordsWithSpaceDiff extends Diff { + tokenize(value) { + // Slightly different to the tokenizeIncludingWhitespace regex used above in + // that this one treats each individual newline as a distinct token, rather + // than merging them into other surrounding whitespace. This was requested + // in https://github.com/kpdecker/jsdiff/issues/180 & + // https://github.com/kpdecker/jsdiff/issues/211 + const regex = new RegExp(`(\\r?\\n)|[${extendedWordChars}]+|[^\\S\\n\\r]+|[^${extendedWordChars}]`, 'ug'); + return value.match(regex) || []; + } } - return e; - } - function _toPrimitive(t, r) { - if ("object" != typeof t || !t) return t; - var e = t[Symbol.toPrimitive]; - if (void 0 !== e) { - var i = e.call(t, r || "default"); - if ("object" != typeof i) return i; - throw new TypeError("@@toPrimitive must return a primitive value."); + const wordsWithSpaceDiff = new WordsWithSpaceDiff(); + function diffWordsWithSpace(oldStr, newStr, options) { + return wordsWithSpaceDiff.diff(oldStr, newStr, options); } - return ("string" === r ? String : Number)(t); - } - function _toPropertyKey(t) { - var i = _toPrimitive(t, "string"); - return "symbol" == typeof i ? i : i + ""; - } - function _typeof(o) { - "@babel/helpers - typeof"; - return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { - return typeof o; - } : function (o) { - return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; - }, _typeof(o); - } - function _defineProperty(obj, key, value) { - key = _toPropertyKey(key); - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; + function generateOptions(options, defaults) { + if (typeof options === 'function') { + defaults.callback = options; + } + else if (options) { + for (const name in options) { + /* istanbul ignore else */ + if (Object.prototype.hasOwnProperty.call(options, name)) { + defaults[name] = options[name]; + } + } + } + return defaults; } - return obj; - } - function _toConsumableArray(arr) { - return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); - } - function _arrayWithoutHoles(arr) { - if (Array.isArray(arr)) return _arrayLikeToArray(arr); - } - function _iterableToArray(iter) { - 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); - var n = Object.prototype.toString.call(o).slice(8, -1); - if (n === "Object" && o.constructor) n = o.constructor.name; - 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."); - } - var jsonDiff = new Diff(); - // Discriminate between two lines of pretty-printed, serialized JSON where one of them has a - // dangling comma and the other doesn't. Turns out including the dangling comma yields the nicest output: - jsonDiff.useLongestToken = true; - jsonDiff.tokenize = lineDiff.tokenize; - jsonDiff.castInput = function (value, options) { - var undefinedReplacement = options.undefinedReplacement, - _options$stringifyRep = options.stringifyReplacer, - stringifyReplacer = _options$stringifyRep === void 0 ? function (k, v) { - return typeof v === 'undefined' ? undefinedReplacement : v; - } : _options$stringifyRep; - return typeof value === 'string' ? value : JSON.stringify(canonicalize(value, null, null, stringifyReplacer), stringifyReplacer, ' '); - }; - jsonDiff.equals = function (left, right, options) { - return Diff.prototype.equals.call(jsonDiff, left.replace(/,([\r\n])/g, '$1'), right.replace(/,([\r\n])/g, '$1'), options); - }; - function diffJson(oldObj, newObj, options) { - return jsonDiff.diff(oldObj, newObj, options); - } - - // This function handles the presence of circular references by bailing out when encountering an - // object that is already on the "stack" of items being processed. Accepts an optional replacer - function canonicalize(obj, stack, replacementStack, replacer, key) { - stack = stack || []; - replacementStack = replacementStack || []; - if (replacer) { - obj = replacer(key, obj); - } - var i; - for (i = 0; i < stack.length; i += 1) { - if (stack[i] === obj) { - return replacementStack[i]; - } - } - var canonicalizedObj; - if ('[object Array]' === Object.prototype.toString.call(obj)) { - stack.push(obj); - canonicalizedObj = new Array(obj.length); - replacementStack.push(canonicalizedObj); - for (i = 0; i < obj.length; i += 1) { - canonicalizedObj[i] = canonicalize(obj[i], stack, replacementStack, replacer, key); - } - stack.pop(); - replacementStack.pop(); - return canonicalizedObj; + class LineDiff extends Diff { + constructor() { + super(...arguments); + this.tokenize = tokenize; + } + equals(left, right, options) { + // If we're ignoring whitespace, we need to normalise lines by stripping + // whitespace before checking equality. (This has an annoying interaction + // with newlineIsToken that requires special handling: if newlines get their + // own token, then we DON'T want to trim the *newline* tokens down to empty + // strings, since this would cause us to treat whitespace-only line content + // as equal to a separator between lines, which would be weird and + // inconsistent with the documented behavior of the options.) + if (options.ignoreWhitespace) { + if (!options.newlineIsToken || !left.includes('\n')) { + left = left.trim(); + } + if (!options.newlineIsToken || !right.includes('\n')) { + right = right.trim(); + } + } + else if (options.ignoreNewlineAtEof && !options.newlineIsToken) { + if (left.endsWith('\n')) { + left = left.slice(0, -1); + } + if (right.endsWith('\n')) { + right = right.slice(0, -1); + } + } + return super.equals(left, right, options); + } } - if (obj && obj.toJSON) { - obj = obj.toJSON(); + const lineDiff = new LineDiff(); + function diffLines(oldStr, newStr, options) { + return lineDiff.diff(oldStr, newStr, options); } - if (_typeof(obj) === 'object' && obj !== null) { - stack.push(obj); - canonicalizedObj = {}; - replacementStack.push(canonicalizedObj); - var sortedKeys = [], - _key; - for (_key in obj) { - /* istanbul ignore else */ - if (Object.prototype.hasOwnProperty.call(obj, _key)) { - sortedKeys.push(_key); - } - } - sortedKeys.sort(); - for (i = 0; i < sortedKeys.length; i += 1) { - _key = sortedKeys[i]; - canonicalizedObj[_key] = canonicalize(obj[_key], stack, replacementStack, replacer, _key); - } - stack.pop(); - replacementStack.pop(); - } else { - canonicalizedObj = obj; + function diffTrimmedLines(oldStr, newStr, options) { + options = generateOptions(options, { ignoreWhitespace: true }); + return lineDiff.diff(oldStr, newStr, options); } - return canonicalizedObj; - } - - var arrayDiff = new Diff(); - arrayDiff.tokenize = function (value) { - return value.slice(); - }; - arrayDiff.join = arrayDiff.removeEmpty = function (value) { - return value; - }; - function diffArrays(oldArr, newArr, callback) { - return arrayDiff.diff(oldArr, newArr, callback); - } - - function unixToWin(patch) { - if (Array.isArray(patch)) { - return patch.map(unixToWin); + // Exported standalone so it can be used from jsonDiff too. + function tokenize(value, options) { + if (options.stripTrailingCr) { + // remove one \r before \n to match GNU diff's --strip-trailing-cr behavior + value = value.replace(/\r\n/g, '\n'); + } + const retLines = [], linesAndNewlines = value.split(/(\n|\r\n)/); + // Ignore the final empty token that occurs if the string ends with a new line + if (!linesAndNewlines[linesAndNewlines.length - 1]) { + linesAndNewlines.pop(); + } + // Merge the content and line separators into single tokens + for (let i = 0; i < linesAndNewlines.length; i++) { + const line = linesAndNewlines[i]; + if (i % 2 && !options.newlineIsToken) { + retLines[retLines.length - 1] += line; + } + else { + retLines.push(line); + } + } + return retLines; + } + + function isSentenceEndPunct(char) { + return char == '.' || char == '!' || char == '?'; + } + class SentenceDiff extends Diff { + tokenize(value) { + var _a; + // If in future we drop support for environments that don't support lookbehinds, we can replace + // this entire function with: + // return value.split(/(?<=[.!?])(\s+|$)/); + // but until then, for similar reasons to the trailingWs function in string.ts, we are forced + // to do this verbosely "by hand" instead of using a regex. + const result = []; + let tokenStartI = 0; + for (let i = 0; i < value.length; i++) { + if (i == value.length - 1) { + result.push(value.slice(tokenStartI)); + break; + } + if (isSentenceEndPunct(value[i]) && value[i + 1].match(/\s/)) { + // We've hit a sentence break - i.e. a punctuation mark followed by whitespace. + // We now want to push TWO tokens to the result: + // 1. the sentence + result.push(value.slice(tokenStartI, i + 1)); + // 2. the whitespace + i = tokenStartI = i + 1; + while ((_a = value[i + 1]) === null || _a === void 0 ? void 0 : _a.match(/\s/)) { + i++; + } + result.push(value.slice(tokenStartI, i + 1)); + // Then the next token (a sentence) starts on the character after the whitespace. + // (It's okay if this is off the end of the string - then the outer loop will terminate + // here anyway.) + tokenStartI = i + 1; + } + } + return result; + } } - return _objectSpread2(_objectSpread2({}, patch), {}, { - hunks: patch.hunks.map(function (hunk) { - return _objectSpread2(_objectSpread2({}, hunk), {}, { - lines: hunk.lines.map(function (line, i) { - var _hunk$lines; - return line.startsWith('\\') || line.endsWith('\r') || (_hunk$lines = hunk.lines[i + 1]) !== null && _hunk$lines !== void 0 && _hunk$lines.startsWith('\\') ? line : line + '\r'; - }) - }); - }) - }); - } - function winToUnix(patch) { - if (Array.isArray(patch)) { - return patch.map(winToUnix); + const sentenceDiff = new SentenceDiff(); + function diffSentences(oldStr, newStr, options) { + return sentenceDiff.diff(oldStr, newStr, options); } - return _objectSpread2(_objectSpread2({}, patch), {}, { - hunks: patch.hunks.map(function (hunk) { - return _objectSpread2(_objectSpread2({}, hunk), {}, { - lines: hunk.lines.map(function (line) { - return line.endsWith('\r') ? line.substring(0, line.length - 1) : line; - }) - }); - }) - }); - } - /** - * Returns true if the patch consistently uses Unix line endings (or only involves one line and has - * no line endings). - */ - function isUnix(patch) { - if (!Array.isArray(patch)) { - patch = [patch]; + class CssDiff extends Diff { + tokenize(value) { + return value.split(/([{}:;,]|\s+)/); + } } - return !patch.some(function (index) { - return index.hunks.some(function (hunk) { - return hunk.lines.some(function (line) { - return !line.startsWith('\\') && line.endsWith('\r'); - }); - }); - }); - } - - /** - * Returns true if the patch uses Windows line endings and only Windows line endings. - */ - function isWin(patch) { - if (!Array.isArray(patch)) { - patch = [patch]; + const cssDiff = new CssDiff(); + function diffCss(oldStr, newStr, options) { + return cssDiff.diff(oldStr, newStr, options); } - return patch.some(function (index) { - return index.hunks.some(function (hunk) { - return hunk.lines.some(function (line) { - return line.endsWith('\r'); - }); - }); - }) && patch.every(function (index) { - return index.hunks.every(function (hunk) { - return hunk.lines.every(function (line, i) { - var _hunk$lines2; - return line.startsWith('\\') || line.endsWith('\r') || ((_hunk$lines2 = hunk.lines[i + 1]) === null || _hunk$lines2 === void 0 ? void 0 : _hunk$lines2.startsWith('\\')); - }); - }); - }); - } - function parsePatch(uniDiff) { - var diffstr = uniDiff.split(/\n/), - list = [], - i = 0; - function parseIndex() { - var index = {}; - list.push(index); - - // Parse diff metadata - while (i < diffstr.length) { - var line = diffstr[i]; - - // File header found, end parsing diff metadata - if (/^(\-\-\-|\+\+\+|@@)\s/.test(line)) { - break; + class JsonDiff extends Diff { + constructor() { + super(...arguments); + this.tokenize = tokenize; } - - // Diff index - var header = /^(?:Index:|diff(?: -r \w+)+)\s+(.+?)\s*$/.exec(line); - if (header) { - index.index = header[1]; + get useLongestToken() { + // Discriminate between two lines of pretty-printed, serialized JSON where one of them has a + // dangling comma and the other doesn't. Turns out including the dangling comma yields the nicest output: + return true; + } + castInput(value, options) { + const { undefinedReplacement, stringifyReplacer = (k, v) => typeof v === 'undefined' ? undefinedReplacement : v } = options; + return typeof value === 'string' ? value : JSON.stringify(canonicalize(value, null, null, stringifyReplacer), null, ' '); + } + equals(left, right, options) { + return super.equals(left.replace(/,([\r\n])/g, '$1'), right.replace(/,([\r\n])/g, '$1'), options); } - i++; - } - - // Parse file headers if they are defined. Unified diff requires them, but - // there's no technical issues to have an isolated hunk without file header - parseFileHeader(index); - parseFileHeader(index); - - // Parse hunks - index.hunks = []; - while (i < diffstr.length) { - var _line = diffstr[i]; - if (/^(Index:\s|diff\s|\-\-\-\s|\+\+\+\s|===================================================================)/.test(_line)) { - break; - } else if (/^@@/.test(_line)) { - index.hunks.push(parseHunk()); - } else if (_line) { - throw new Error('Unknown line ' + (i + 1) + ' ' + JSON.stringify(_line)); - } else { - i++; - } - } - } - - // Parses the --- and +++ headers, if none are found, no lines - // are consumed. - function parseFileHeader(index) { - var fileHeader = /^(---|\+\+\+)\s+(.*)\r?$/.exec(diffstr[i]); - if (fileHeader) { - var keyPrefix = fileHeader[1] === '---' ? 'old' : 'new'; - var data = fileHeader[2].split('\t', 2); - var fileName = data[0].replace(/\\\\/g, '\\'); - if (/^".*"$/.test(fileName)) { - fileName = fileName.substr(1, fileName.length - 2); - } - index[keyPrefix + 'FileName'] = fileName; - index[keyPrefix + 'Header'] = (data[1] || '').trim(); - i++; - } - } - - // Parses a hunk - // This assumes that we are at the start of a hunk. - function parseHunk() { - var chunkHeaderIndex = i, - chunkHeaderLine = diffstr[i++], - chunkHeader = chunkHeaderLine.split(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/); - var hunk = { - oldStart: +chunkHeader[1], - oldLines: typeof chunkHeader[2] === 'undefined' ? 1 : +chunkHeader[2], - newStart: +chunkHeader[3], - newLines: typeof chunkHeader[4] === 'undefined' ? 1 : +chunkHeader[4], - lines: [] - }; - - // Unified Diff Format quirk: If the chunk size is 0, - // the first number is one lower than one would expect. - // https://www.artima.com/weblogs/viewpost.jsp?thread=164293 - if (hunk.oldLines === 0) { - hunk.oldStart += 1; - } - if (hunk.newLines === 0) { - hunk.newStart += 1; - } - var addCount = 0, - removeCount = 0; - for (; i < diffstr.length && (removeCount < hunk.oldLines || addCount < hunk.newLines || (_diffstr$i = diffstr[i]) !== null && _diffstr$i !== void 0 && _diffstr$i.startsWith('\\')); i++) { - var _diffstr$i; - var operation = diffstr[i].length == 0 && i != diffstr.length - 1 ? ' ' : diffstr[i][0]; - if (operation === '+' || operation === '-' || operation === ' ' || operation === '\\') { - hunk.lines.push(diffstr[i]); - if (operation === '+') { - addCount++; - } else if (operation === '-') { - removeCount++; - } else if (operation === ' ') { - addCount++; - removeCount++; - } - } else { - throw new Error("Hunk at line ".concat(chunkHeaderIndex + 1, " contained invalid line ").concat(diffstr[i])); - } - } - - // Handle the empty block count case - if (!addCount && hunk.newLines === 1) { - hunk.newLines = 0; - } - if (!removeCount && hunk.oldLines === 1) { - hunk.oldLines = 0; - } - - // Perform sanity checking - if (addCount !== hunk.newLines) { - throw new Error('Added line count did not match for hunk at line ' + (chunkHeaderIndex + 1)); - } - if (removeCount !== hunk.oldLines) { - throw new Error('Removed line count did not match for hunk at line ' + (chunkHeaderIndex + 1)); - } - return hunk; } - while (i < diffstr.length) { - parseIndex(); + const jsonDiff = new JsonDiff(); + function diffJson(oldStr, newStr, options) { + return jsonDiff.diff(oldStr, newStr, options); + } + // This function handles the presence of circular references by bailing out when encountering an + // object that is already on the "stack" of items being processed. Accepts an optional replacer + function canonicalize(obj, stack, replacementStack, replacer, key) { + stack = stack || []; + replacementStack = replacementStack || []; + if (replacer) { + obj = replacer(key === undefined ? '' : key, obj); + } + let i; + for (i = 0; i < stack.length; i += 1) { + if (stack[i] === obj) { + return replacementStack[i]; + } + } + let canonicalizedObj; + if ('[object Array]' === Object.prototype.toString.call(obj)) { + stack.push(obj); + canonicalizedObj = new Array(obj.length); + replacementStack.push(canonicalizedObj); + for (i = 0; i < obj.length; i += 1) { + canonicalizedObj[i] = canonicalize(obj[i], stack, replacementStack, replacer, String(i)); + } + stack.pop(); + replacementStack.pop(); + return canonicalizedObj; + } + if (obj && obj.toJSON) { + obj = obj.toJSON(); + } + if (typeof obj === 'object' && obj !== null) { + stack.push(obj); + canonicalizedObj = {}; + replacementStack.push(canonicalizedObj); + const sortedKeys = []; + let key; + for (key in obj) { + /* istanbul ignore else */ + if (Object.prototype.hasOwnProperty.call(obj, key)) { + sortedKeys.push(key); + } + } + sortedKeys.sort(); + for (i = 0; i < sortedKeys.length; i += 1) { + key = sortedKeys[i]; + canonicalizedObj[key] = canonicalize(obj[key], stack, replacementStack, replacer, key); + } + stack.pop(); + replacementStack.pop(); + } + else { + canonicalizedObj = obj; + } + return canonicalizedObj; } - return list; - } - // Iterator that traverses in the range of [min, max], stepping - // by distance from a given start position. I.e. for [0, 4], with - // start of 2, this will iterate 2, 3, 1, 4, 0. - function distanceIterator (start, minLine, maxLine) { - var wantForward = true, - backwardExhausted = false, - forwardExhausted = false, - localOffset = 1; - return function iterator() { - if (wantForward && !forwardExhausted) { - if (backwardExhausted) { - localOffset++; - } else { - wantForward = false; + class ArrayDiff extends Diff { + tokenize(value) { + return value.slice(); } - - // Check if trying to fit beyond text length, and if not, check it fits - // after offset location (or desired location on first iteration) - if (start + localOffset <= maxLine) { - return start + localOffset; + join(value) { + return value; } - forwardExhausted = true; - } - if (!backwardExhausted) { - if (!forwardExhausted) { - wantForward = true; + removeEmpty(value) { + return value; } - - // Check if trying to fit before text beginning, and if not, check it fits - // before offset location - if (minLine <= start - localOffset) { - return start - localOffset++; - } - backwardExhausted = true; - return iterator(); - } - - // We tried to fit hunk before text beginning and beyond text length, then - // hunk can't fit on the text. Return undefined - }; - } - - function applyPatch(source, uniDiff) { - var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; - if (typeof uniDiff === 'string') { - uniDiff = parsePatch(uniDiff); } - if (Array.isArray(uniDiff)) { - if (uniDiff.length > 1) { - throw new Error('applyPatch only works with a single input.'); - } - uniDiff = uniDiff[0]; - } - if (options.autoConvertLineEndings || options.autoConvertLineEndings == null) { - if (hasOnlyWinLineEndings(source) && isUnix(uniDiff)) { - uniDiff = unixToWin(uniDiff); - } else if (hasOnlyUnixLineEndings(source) && isWin(uniDiff)) { - uniDiff = winToUnix(uniDiff); - } - } - - // Apply the diff to the input - var lines = source.split('\n'), - hunks = uniDiff.hunks, - compareLine = options.compareLine || function (lineNumber, line, operation, patchContent) { - return line === patchContent; - }, - fuzzFactor = options.fuzzFactor || 0, - minLine = 0; - if (fuzzFactor < 0 || !Number.isInteger(fuzzFactor)) { - throw new Error('fuzzFactor must be a non-negative integer'); + const arrayDiff = new ArrayDiff(); + function diffArrays(oldArr, newArr, options) { + return arrayDiff.diff(oldArr, newArr, options); } - // Special case for empty patch. - if (!hunks.length) { - return source; + function unixToWin(patch) { + if (Array.isArray(patch)) { + // It would be cleaner if instead of the line below we could just write + // return patch.map(unixToWin) + // but mysteriously TypeScript (v5.7.3 at the time of writing) does not like this and it will + // refuse to compile, thinking that unixToWin could then return StructuredPatch[][] and the + // result would be incompatible with the overload signatures. + // See bug report at https://github.com/microsoft/TypeScript/issues/61398. + return patch.map(p => unixToWin(p)); + } + return Object.assign(Object.assign({}, patch), { hunks: patch.hunks.map(hunk => (Object.assign(Object.assign({}, hunk), { lines: hunk.lines.map((line, i) => { + var _a; + return (line.startsWith('\\') || line.endsWith('\r') || ((_a = hunk.lines[i + 1]) === null || _a === void 0 ? void 0 : _a.startsWith('\\'))) + ? line + : line + '\r'; + }) }))) }); + } + function winToUnix(patch) { + if (Array.isArray(patch)) { + // (See comment above equivalent line in unixToWin) + return patch.map(p => winToUnix(p)); + } + return Object.assign(Object.assign({}, patch), { hunks: patch.hunks.map(hunk => (Object.assign(Object.assign({}, hunk), { lines: hunk.lines.map(line => line.endsWith('\r') ? line.substring(0, line.length - 1) : line) }))) }); } - - // Before anything else, handle EOFNL insertion/removal. If the patch tells us to make a change - // to the EOFNL that is redundant/impossible - i.e. to remove a newline that's not there, or add a - // newline that already exists - then we either return false and fail to apply the patch (if - // fuzzFactor is 0) or simply ignore the problem and do nothing (if fuzzFactor is >0). - // If we do need to remove/add a newline at EOF, this will always be in the final hunk: - var prevLine = '', - removeEOFNL = false, - addEOFNL = false; - for (var i = 0; i < hunks[hunks.length - 1].lines.length; i++) { - var line = hunks[hunks.length - 1].lines[i]; - if (line[0] == '\\') { - if (prevLine[0] == '+') { - removeEOFNL = true; - } else if (prevLine[0] == '-') { - addEOFNL = true; - } - } - prevLine = line; + /** + * Returns true if the patch consistently uses Unix line endings (or only involves one line and has + * no line endings). + */ + function isUnix(patch) { + if (!Array.isArray(patch)) { + patch = [patch]; + } + return !patch.some(index => index.hunks.some(hunk => hunk.lines.some(line => !line.startsWith('\\') && line.endsWith('\r')))); } - if (removeEOFNL) { - if (addEOFNL) { - // This means the final line gets changed but doesn't have a trailing newline in either the - // original or patched version. In that case, we do nothing if fuzzFactor > 0, and if - // fuzzFactor is 0, we simply validate that the source file has no trailing newline. - if (!fuzzFactor && lines[lines.length - 1] == '') { - return false; - } - } else if (lines[lines.length - 1] == '') { - lines.pop(); - } else if (!fuzzFactor) { - return false; - } - } else if (addEOFNL) { - if (lines[lines.length - 1] != '') { - lines.push(''); - } else if (!fuzzFactor) { - return false; - } + /** + * Returns true if the patch uses Windows line endings and only Windows line endings. + */ + function isWin(patch) { + if (!Array.isArray(patch)) { + patch = [patch]; + } + return patch.some(index => index.hunks.some(hunk => hunk.lines.some(line => line.endsWith('\r')))) + && patch.every(index => index.hunks.every(hunk => hunk.lines.every((line, i) => { var _a; return line.startsWith('\\') || line.endsWith('\r') || ((_a = hunk.lines[i + 1]) === null || _a === void 0 ? void 0 : _a.startsWith('\\')); }))); } /** - * Checks if the hunk can be made to fit at the provided location with at most `maxErrors` - * insertions, substitutions, or deletions, while ensuring also that: - * - lines deleted in the hunk match exactly, and - * - wherever an insertion operation or block of insertion operations appears in the hunk, the - * immediately preceding and following lines of context match exactly + * Parses a unified diff format patch into a structured patch object. * - * `toPos` should be set such that lines[toPos] is meant to match hunkLines[0]. + * `parsePatch` has some understanding of Git's particular dialect of unified diff format. + * When parsing a Git patch, each index in the result may contain additional + * fields (`isRename`, `isBinary`, etc) not included in the data structure returned by + * `structuredPatch`; see the `StructuredPatch` interface for a full list. * - * If the hunk can be applied, returns an object with properties `oldLineLastI` and - * `replacementLines`. Otherwise, returns null. + * @return a JSON object representation of the patch, suitable for use with the `applyPatch` + * method. This parses to the same structure returned by `structuredPatch`, except that + * `oldFileName` and `newFileName` may be `undefined` if the patch doesn't contain enough + * information to determine them (e.g. a hunk-only patch with no file headers). */ - function applyHunk(hunkLines, toPos, maxErrors) { - var hunkLinesI = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0; - var lastContextLineMatched = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true; - var patchedLines = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : []; - var patchedLinesLength = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : 0; - var nConsecutiveOldContextLines = 0; - var nextContextLineMustMatch = false; - for (; hunkLinesI < hunkLines.length; hunkLinesI++) { - var hunkLine = hunkLines[hunkLinesI], - operation = hunkLine.length > 0 ? hunkLine[0] : ' ', - content = hunkLine.length > 0 ? hunkLine.substr(1) : hunkLine; - if (operation === '-') { - if (compareLine(toPos + 1, lines[toPos], operation, content)) { - toPos++; - nConsecutiveOldContextLines = 0; - } else { - if (!maxErrors || lines[toPos] == null) { - return null; - } - patchedLines[patchedLinesLength] = lines[toPos]; - return applyHunk(hunkLines, toPos + 1, maxErrors - 1, hunkLinesI, false, patchedLines, patchedLinesLength + 1); - } - } - if (operation === '+') { - if (!lastContextLineMatched) { + function parsePatch(uniDiff) { + const diffstr = uniDiff.split(/\n/), list = []; + let i = 0; + // These helper functions identify line types that can appear between files + // in a multi-file patch. Keeping them in one place avoids subtle + // inconsistencies from having the same regexes duplicated in multiple places. + // Matches `diff --git ...` lines specifically. + function isGitDiffHeader(line) { + return (/^diff --git /).test(line); + } + // Matches lines that denote the start of a new diff's section in a + // multi-file patch: `diff --git ...`, `Index: ...`, or `diff -r ...`. + function isDiffHeader(line) { + return isGitDiffHeader(line) + || (/^Index:\s/).test(line) + || (/^diff(?: -r \w+)+\s/).test(line); + } + // Matches `--- ...` and `+++ ...` file header lines. + function isFileHeader(line) { + return (/^(---|\+\+\+)\s/).test(line); + } + // Matches `@@ ...` hunk header lines. + function isHunkHeader(line) { + return (/^@@\s/).test(line); + } + function parseIndex() { + var _a; + const index = {}; + index.hunks = []; + list.push(index); + // Parse diff metadata + let seenDiffHeader = false; + while (i < diffstr.length) { + const line = diffstr[i]; + // File header (---, +++) or hunk header (@@) found; end parsing diff metadata + if (isFileHeader(line) || isHunkHeader(line)) { + break; + } + // The next two branches handle recognized diff headers. Note that + // isDiffHeader deliberately does NOT match arbitrary `diff` + // commands like `diff -u -p -r1.1 -r1.2`, because in some + // formats (e.g. CVS diffs) such lines appear as metadata within + // a single file's header section, after an `Index:` line. See the + // diffx documentation (https://diffx.org) for examples. + // + // In both branches: if we've already seen a diff header for *this* + // file and now we encounter another one, it must belong to the + // next file, so break. + if (isGitDiffHeader(line)) { + if (seenDiffHeader) { + return; + } + seenDiffHeader = true; + index.isGit = true; + // Parse the old and new filenames from the `diff --git` header and + // tentatively set oldFileName and newFileName from them. These may + // be overridden below by `rename from` / `rename to` or `copy from` / + // `copy to` extended headers, or by --- and +++ lines. But for Git + // diffs that lack all of those (e.g. mode-only changes, binary + // file changes without rename), these are the only filenames we + // get. + // parseGitDiffHeader returns null if the header can't be parsed + // (e.g. unterminated quoted filename, or unexpected format). In + // that case we skip setting filenames here; they may still be + // set from --- / +++ or rename from / rename to lines below. + const paths = parseGitDiffHeader(line); + if (paths) { + index.oldFileName = paths.oldFileName; + index.newFileName = paths.newFileName; + } + // Consume Git extended headers (`old mode`, `new mode`, `rename from`, + // `rename to`, `similarity index`, `index`, `Binary files ... differ`, + // etc.) + i++; + while (i < diffstr.length) { + const extLine = diffstr[i]; + // Stop consuming extended headers if we hit a file header, + // hunk header, or another diff header. + if (isFileHeader(extLine) || isHunkHeader(extLine) || isDiffHeader(extLine)) { + break; + } + // Parse `rename from` / `rename to` lines - these give us + // unambiguous filenames. These lines don't include the + // a/ and b/ prefixes that appear in the `diff --git` header + // and --- / +++ lines, so we add them for consistency. + // Git C-style quotes filenames containing special characters + // (tabs, newlines, backslashes, double quotes), so we must + // unquote them when present. + const renameFromMatch = (/^rename from (.*)/).exec(extLine); + if (renameFromMatch) { + index.oldFileName = 'a/' + unquoteIfQuoted(renameFromMatch[1]); + index.isRename = true; + } + const renameToMatch = (/^rename to (.*)/).exec(extLine); + if (renameToMatch) { + index.newFileName = 'b/' + unquoteIfQuoted(renameToMatch[1]); + index.isRename = true; + } + // Parse copy from / copy to lines similarly + const copyFromMatch = (/^copy from (.*)/).exec(extLine); + if (copyFromMatch) { + index.oldFileName = 'a/' + unquoteIfQuoted(copyFromMatch[1]); + index.isCopy = true; + } + const copyToMatch = (/^copy to (.*)/).exec(extLine); + if (copyToMatch) { + index.newFileName = 'b/' + unquoteIfQuoted(copyToMatch[1]); + index.isCopy = true; + } + const newFileModeMatch = (/^new file mode (\d+)/).exec(extLine); + if (newFileModeMatch) { + index.isCreate = true; + index.newMode = newFileModeMatch[1]; + } + const deletedFileModeMatch = (/^deleted file mode (\d+)/).exec(extLine); + if (deletedFileModeMatch) { + index.isDelete = true; + index.oldMode = deletedFileModeMatch[1]; + } + const oldModeMatch = (/^old mode (\d+)/).exec(extLine); + if (oldModeMatch) { + index.oldMode = oldModeMatch[1]; + } + const newModeMatch = (/^new mode (\d+)/).exec(extLine); + if (newModeMatch) { + index.newMode = newModeMatch[1]; + } + if ((/^Binary files /).test(extLine)) { + index.isBinary = true; + } + i++; + } + continue; + } + else if (isDiffHeader(line)) { + if (seenDiffHeader) { + return; + } + seenDiffHeader = true; + // For Mercurial-style headers like + // diff -r 9117c6561b0b -r 273ce12ad8f1 .hgignore + // or Index: headers like + // Index: something with multiple words + // we extract the trailing filename as the index. + // + // TODO: It seems awkward that we indiscriminately trim off + // trailing whitespace here. Theoretically, couldn't that + // be meaningful - e.g. if the patch represents a diff of a + // file whose name ends with a space? Seems wrong to nuke + // it. But this behaviour has been around since v2.2.1 in + // 2015, so if it's going to change, it should be done + // cautiously and in a new major release, for + // backwards-compat reasons. + // -- ExplodingCabbage + const headerMatch = (/^(?:Index:|diff(?: -r \w+)+)\s+/).exec(line); + if (headerMatch) { + index.index = line.substring(headerMatch[0].length).trim(); + } + } + i++; + } + // Parse file headers if they are defined. Unified diff requires them, but + // there's no technical issues to have an isolated hunk without file header + parseFileHeader(index); + parseFileHeader(index); + // If we got one file header but not the other, that's a malformed patch. + if ((index.oldFileName === undefined) !== (index.newFileName === undefined)) { + throw new Error('Missing ' + (index.oldFileName !== undefined ? '"+++ ..."' : '"--- ..."') + + ' file header for ' + ((_a = index.oldFileName) !== null && _a !== void 0 ? _a : index.newFileName)); + } + while (i < diffstr.length) { + const line = diffstr[i]; + if (isDiffHeader(line) || isFileHeader(line) || (/^===================================================================/).test(line)) { + break; + } + else if (isHunkHeader(line)) { + index.hunks.push(parseHunk()); + } + else { + // Skip blank lines and any other unrecognized content between + // or after hunks. Real-world examples of such content include: + // - `Only in : ` from GNU `diff -r` + // - `Property changes on:` sections from `svn diff` + // - Trailing prose or commentary in email patches + // GNU `patch` tolerates all of these, and so do we. + i++; + } + } + } + /** + * Parses the old and new filenames from a `diff --git` header line. + * + * The format is: + * diff --git a/ b/ + * + * When filenames contain special characters (including newlines, tabs, + * backslashes, or double quotes), Git quotes them with C-style escaping: + * diff --git "a/file\twith\ttabs.txt" "b/file\twith\ttabs.txt" + * + * When filenames don't contain special characters and the old and new names + * are the same, we can unambiguously split on ` b/` by finding where the + * two halves (including their a/ and b/ prefixes) yield matching bare names. + * + * A pathological case exists in which we cannot reliably determine the paths + * from the `diff --git` header. This case is when the following are true: + * - the old and new file paths differ + * - they are both unquoted (i.e. contain no special characters) + * - at least one of the underlying file paths includes the substring ` b/` + * In this scenario, we do not know which occurrence of ` b/` indicates the + * start of the new file path, so the header is inherently ambiguous. We thus + * select a possible interpretation arbitrarily and return that. + * + * Fortunately, this ambiguity should never matter, because in any patch + * genuinely output by Git in which this pathological scenario occurs, there + * must also be `rename from`/`rename to` or `copy from`/`copy to` extended + * headers present below the `diff --git` header. `parseIndex` will parse + * THOSE headers, from which we CAN unambiguously determine the filenames, + * and will discard the result returned by this function. + * + * Returns null if the header can't be parsed at all — e.g. a quoted filename + * has an unterminated quote, or if the unquoted header doesn't match the + * expected `a/... b/...` format. In that case, the caller (parseIndex) + * skips setting oldFileName/newFileName from this header, but they may + * still be set later from `---`/`+++` lines or `rename from`/`rename to` + * extended headers; if none of those are present either, they'll remain + * undefined in the output. + */ + function parseGitDiffHeader(line) { + // Strip the "diff --git " prefix + const rest = line.substring('diff --git '.length); + // Handle quoted paths: "a/path" "b/path" + // Git quotes paths when they contain characters like newlines, tabs, + // backslashes, or double quotes (but notably not spaces). + if (rest.startsWith('"')) { + const oldPath = parseQuotedFileName(rest); + if (oldPath === null) { + return null; + } + const afterOld = rest.substring(oldPath.rawLength + 1); // +1 for space + let newFileName; + if (afterOld.startsWith('"')) { + const newPath = parseQuotedFileName(afterOld); + if (newPath === null) { + return null; + } + newFileName = newPath.fileName; + } + else { + newFileName = afterOld; + } + return { + oldFileName: oldPath.fileName, + newFileName + }; + } + // Check if the second path is quoted + // e.g. diff --git a/simple "b/renamed\nnewline.txt" + const quoteIdx = rest.indexOf('"'); + if (quoteIdx > 0) { + const oldFileName = rest.substring(0, quoteIdx - 1); + const newPath = parseQuotedFileName(rest.substring(quoteIdx)); + if (newPath === null) { + return null; + } + return { + oldFileName, + newFileName: newPath.fileName + }; + } + // Unquoted paths. Try to find the split point. + // The format is: a/ b/ + // + // Note the potential ambiguity caused by the possibility of the file paths + // themselves containing the substring ` b/`, plus the pathological case + // described in the comment above. + // + // Strategy: find all occurrences of " b/" and split on the middle + // one. When old and new names are the same (which is the only case where + // we can't rely on extended headers later in the patch so HAVE to get + // this right), this will always be the correct split. + if (rest.startsWith('a/')) { + const splits = []; + let idx = 0; + while (true) { + idx = rest.indexOf(' b/', idx + 1); + if (idx === -1) { + break; + } + splits.push(idx); + } + if (splits.length > 0) { + const mid = splits[Math.floor(splits.length / 2)]; + return { + oldFileName: rest.substring(0, mid), + newFileName: rest.substring(mid + 1) + }; + } + } + // Fallback: can't parse, return null return null; - } - patchedLines[patchedLinesLength] = content; - patchedLinesLength++; - nConsecutiveOldContextLines = 0; - nextContextLineMustMatch = true; - } - if (operation === ' ') { - nConsecutiveOldContextLines++; - patchedLines[patchedLinesLength] = lines[toPos]; - if (compareLine(toPos + 1, lines[toPos], operation, content)) { - patchedLinesLength++; - lastContextLineMatched = true; - nextContextLineMustMatch = false; - toPos++; - } else { - if (nextContextLineMustMatch || !maxErrors) { - return null; + } + /** + * If `s` starts with a double quote, unquotes it using C-style escape + * rules (as used by Git). Otherwise returns `s` as-is. + */ + function unquoteIfQuoted(s) { + if (s.startsWith('"')) { + const parsed = parseQuotedFileName(s); + if (parsed) { + return parsed.fileName; + } } - - // Consider 3 possibilities in sequence: - // 1. lines contains a *substitution* not included in the patch context, or - // 2. lines contains an *insertion* not included in the patch context, or - // 3. lines contains a *deletion* not included in the patch context - // The first two options are of course only possible if the line from lines is non-null - - // i.e. only option 3 is possible if we've overrun the end of the old file. - return lines[toPos] && (applyHunk(hunkLines, toPos + 1, maxErrors - 1, hunkLinesI + 1, false, patchedLines, patchedLinesLength + 1) || applyHunk(hunkLines, toPos + 1, maxErrors - 1, hunkLinesI, false, patchedLines, patchedLinesLength + 1)) || applyHunk(hunkLines, toPos, maxErrors - 1, hunkLinesI + 1, false, patchedLines, patchedLinesLength); - } - } - } - - // Before returning, trim any unmodified context lines off the end of patchedLines and reduce - // toPos (and thus oldLineLastI) accordingly. This allows later hunks to be applied to a region - // that starts in this hunk's trailing context. - patchedLinesLength -= nConsecutiveOldContextLines; - toPos -= nConsecutiveOldContextLines; - patchedLines.length = patchedLinesLength; - return { - patchedLines: patchedLines, - oldLineLastI: toPos - 1 - }; - } - var resultLines = []; - - // Search best fit offsets for each hunk based on the previous ones - var prevHunkOffset = 0; - for (var _i = 0; _i < hunks.length; _i++) { - var hunk = hunks[_i]; - var hunkResult = void 0; - var maxLine = lines.length - hunk.oldLines + fuzzFactor; - var toPos = void 0; - for (var maxErrors = 0; maxErrors <= fuzzFactor; maxErrors++) { - toPos = hunk.oldStart + prevHunkOffset - 1; - var iterator = distanceIterator(toPos, minLine, maxLine); - for (; toPos !== undefined; toPos = iterator()) { - hunkResult = applyHunk(hunk.lines, toPos, maxErrors); - if (hunkResult) { - break; - } - } - if (hunkResult) { - break; - } - } - if (!hunkResult) { - return false; - } - - // Copy everything from the end of where we applied the last hunk to the start of this hunk - for (var _i2 = minLine; _i2 < toPos; _i2++) { - resultLines.push(lines[_i2]); - } - - // Add the lines produced by applying the hunk: - for (var _i3 = 0; _i3 < hunkResult.patchedLines.length; _i3++) { - var _line = hunkResult.patchedLines[_i3]; - resultLines.push(_line); - } - - // Set lower text limit to end of the current hunk, so next ones don't try - // to fit over already patched text - minLine = hunkResult.oldLineLastI + 1; - - // Note the offset between where the patch said the hunk should've applied and where we - // applied it, so we can adjust future hunks accordingly: - prevHunkOffset = toPos + 1 - hunk.oldStart; - } - - // Copy over the rest of the lines from the old text - for (var _i4 = minLine; _i4 < lines.length; _i4++) { - resultLines.push(lines[_i4]); - } - return resultLines.join('\n'); - } - - // Wrapper that supports multiple file patches via callbacks. - function applyPatches(uniDiff, options) { - if (typeof uniDiff === 'string') { - uniDiff = parsePatch(uniDiff); - } - var currentIndex = 0; - function processIndex() { - var index = uniDiff[currentIndex++]; - if (!index) { - return options.complete(); - } - options.loadFile(index, function (err, data) { - if (err) { - return options.complete(err); - } - var updatedContent = applyPatch(data, index, options); - options.patched(index, updatedContent, function (err) { - if (err) { - return options.complete(err); - } - processIndex(); - }); - }); + return s; + } + /** + * Parses a C-style quoted filename as used by Git or GNU `diff -u`. + * Returns the unescaped filename and the raw length consumed (including quotes). + */ + function parseQuotedFileName(s) { + if (!s.startsWith('"')) { + return null; + } + let result = ''; + let j = 1; // skip opening quote + while (j < s.length) { + if (s[j] === '"') { + return { fileName: result, rawLength: j + 1 }; + } + if (s[j] === '\\' && j + 1 < s.length) { + j++; + switch (s[j]) { + case 'a': + result += '\x07'; + break; + case 'b': + result += '\b'; + break; + case 'f': + result += '\f'; + break; + case 'n': + result += '\n'; + break; + case 'r': + result += '\r'; + break; + case 't': + result += '\t'; + break; + case 'v': + result += '\v'; + break; + case '\\': + result += '\\'; + break; + case '"': + result += '"'; + break; + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': { + // C-style octal escapes represent raw bytes. Collect + // consecutive octal-escaped bytes and decode as UTF-8. + // Validate that we have a full 3-digit octal escape + if (j + 2 >= s.length || s[j + 1] < '0' || s[j + 1] > '7' || s[j + 2] < '0' || s[j + 2] > '7') { + return null; + } + const bytes = [parseInt(s.substring(j, j + 3), 8)]; + j += 3; + while (s[j] === '\\' && s[j + 1] >= '0' && s[j + 1] <= '7') { + if (j + 3 >= s.length || s[j + 2] < '0' || s[j + 2] > '7' || s[j + 3] < '0' || s[j + 3] > '7') { + return null; + } + bytes.push(parseInt(s.substring(j + 1, j + 4), 8)); + j += 4; + } + result += new TextDecoder('utf-8').decode(new Uint8Array(bytes)); + continue; // j already points at the next character + } + // Note that in C, there are also three kinds of hex escape sequences: + // - \xhh + // - \uhhhh + // - \Uhhhhhhhh + // We do not bother to parse them here because, so far as we know, + // they are never emitted by any tools that generate unified diff + // format diffs, and so for now jsdiff does not consider them legal. + default: return null; + } + } + else { + result += s[j]; + } + j++; + } + // Unterminated quote + return null; + } + // Parses the --- and +++ headers, if none are found, no lines + // are consumed. + function parseFileHeader(index) { + const fileHeaderMatch = (/^(---|\+\+\+)\s+/).exec(diffstr[i]); + if (fileHeaderMatch) { + const prefix = fileHeaderMatch[1], data = diffstr[i].substring(3).trim().split('\t', 2), header = (data[1] || '').trim(); + let fileName = data[0]; + if (fileName.startsWith('"')) { + fileName = unquoteIfQuoted(fileName); + } + else { + fileName = fileName.replace(/\\\\/g, '\\'); + } + if (prefix === '---') { + index.oldFileName = fileName; + index.oldHeader = header; + } + else { + index.newFileName = fileName; + index.newHeader = header; + } + i++; + } + } + // Parses a hunk + // This assumes that we are at the start of a hunk. + function parseHunk() { + var _a; + const chunkHeaderIndex = i, chunkHeaderLine = diffstr[i++], chunkHeader = chunkHeaderLine.split(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/); + const hunk = { + oldStart: +chunkHeader[1], + oldLines: typeof chunkHeader[2] === 'undefined' ? 1 : +chunkHeader[2], + newStart: +chunkHeader[3], + newLines: typeof chunkHeader[4] === 'undefined' ? 1 : +chunkHeader[4], + lines: [] + }; + // Unified Diff Format quirk: If the chunk size is 0, + // the first number is one lower than one would expect. + // https://www.artima.com/weblogs/viewpost.jsp?thread=164293 + if (hunk.oldLines === 0) { + hunk.oldStart += 1; + } + if (hunk.newLines === 0) { + hunk.newStart += 1; + } + let addCount = 0, removeCount = 0; + for (; i < diffstr.length && (removeCount < hunk.oldLines || addCount < hunk.newLines || ((_a = diffstr[i]) === null || _a === void 0 ? void 0 : _a.startsWith('\\'))); i++) { + const operation = (diffstr[i].length == 0 && i != (diffstr.length - 1)) ? ' ' : diffstr[i][0]; + if (operation === '+' || operation === '-' || operation === ' ' || operation === '\\') { + hunk.lines.push(diffstr[i]); + if (operation === '+') { + addCount++; + } + else if (operation === '-') { + removeCount++; + } + else if (operation === ' ') { + addCount++; + removeCount++; + } + } + else { + throw new Error(`Hunk at line ${chunkHeaderIndex + 1} contained invalid line ${diffstr[i]}`); + } + } + // Handle the empty block count case + if (!addCount && hunk.newLines === 1) { + hunk.newLines = 0; + } + if (!removeCount && hunk.oldLines === 1) { + hunk.oldLines = 0; + } + // Perform sanity checking + if (addCount !== hunk.newLines) { + throw new Error('Added line count did not match for hunk at line ' + (chunkHeaderIndex + 1)); + } + if (removeCount !== hunk.oldLines) { + throw new Error('Removed line count did not match for hunk at line ' + (chunkHeaderIndex + 1)); + } + // Check for extra hunk-body-like lines after the declared line counts + // were exhausted. If the very next line starts with ' ', '+', or '-', + // the hunk's line counts were probably wrong — unless it's a file + // header (--- or +++), which legitimately appears immediately after a + // hunk in multi-file diffs without Index lines. + if (i < diffstr.length && diffstr[i] && (/^[+ -]/).test(diffstr[i]) + && !isFileHeader(diffstr[i])) { + throw new Error('Hunk at line ' + (chunkHeaderIndex + 1) + + ' has more lines than expected (expected ' + + hunk.oldLines + ' old lines and ' + hunk.newLines + ' new lines)'); + } + return hunk; + } + while (i < diffstr.length) { + parseIndex(); + } + return list; + } + + // Iterator that traverses in the range of [min, max], stepping + // by distance from a given start position. I.e. for [0, 4], with + // start of 2, this will iterate 2, 3, 1, 4, 0. + function distanceIterator (start, minLine, maxLine) { + let wantForward = true, backwardExhausted = false, forwardExhausted = false, localOffset = 1; + return function iterator() { + if (wantForward && !forwardExhausted) { + if (backwardExhausted) { + localOffset++; + } + else { + wantForward = false; + } + // Check if trying to fit beyond text length, and if not, check it fits + // after offset location (or desired location on first iteration) + if (start + localOffset <= maxLine) { + return start + localOffset; + } + forwardExhausted = true; + } + if (!backwardExhausted) { + if (!forwardExhausted) { + wantForward = true; + } + // Check if trying to fit before text beginning, and if not, check it fits + // before offset location + if (minLine <= start - localOffset) { + return start - localOffset++; + } + backwardExhausted = true; + return iterator(); + } + // We tried to fit hunk before text beginning and beyond text length, then + // hunk can't fit on the text. Return undefined + return undefined; + }; } - processIndex(); - } - function structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) { - if (!options) { - options = {}; - } - if (typeof options === 'function') { - options = { - callback: options - }; - } - if (typeof options.context === 'undefined') { - options.context = 4; + /** + * attempts to apply a unified diff patch. + * + * Hunks are applied first to last. + * `applyPatch` first tries to apply the first hunk at the line number specified in the hunk header, and with all context lines matching exactly. + * If that fails, it tries scanning backwards and forwards, one line at a time, to find a place to apply the hunk where the context lines match exactly. + * If that still fails, and `fuzzFactor` is greater than zero, it increments the maximum number of mismatches (missing, extra, or changed context lines) that there can be between the hunk context and a region where we are trying to apply the patch such that the hunk will still be considered to match. + * Regardless of `fuzzFactor`, lines to be deleted in the hunk *must* be present for a hunk to match, and the context lines *immediately* before and after an insertion must match exactly. + * + * Once a hunk is successfully fitted, the process begins again with the next hunk. + * Regardless of `fuzzFactor`, later hunks must be applied later in the file than earlier hunks. + * + * If a hunk cannot be successfully fitted *anywhere* with fewer than `fuzzFactor` mismatches, `applyPatch` fails and returns `false`. + * + * If a hunk is successfully fitted but not at the line number specified by the hunk header, all subsequent hunks have their target line number adjusted accordingly. + * (e.g. if the first hunk is applied 10 lines below where the hunk header said it should fit, `applyPatch` will *start* looking for somewhere to apply the second hunk 10 lines below where its hunk header says it goes.) + * + * If the patch was applied successfully, returns a string containing the patched text. + * If the patch could not be applied (because some hunks in the patch couldn't be fitted to the text in `source`), `applyPatch` returns false. + * + * @param patch a string diff or the output from the `parsePatch` or `structuredPatch` methods. + */ + function applyPatch(source, patch, options = {}) { + let patches; + if (typeof patch === 'string') { + patches = parsePatch(patch); + } + else if (Array.isArray(patch)) { + patches = patch; + } + else { + patches = [patch]; + } + if (patches.length > 1) { + throw new Error('applyPatch only works with a single input.'); + } + return applyStructuredPatch(source, patches[0], options); } - if (options.newlineIsToken) { - throw new Error('newlineIsToken may not be used with patch-generation functions, only with diffing functions'); + function applyStructuredPatch(source, patch, options = {}) { + if (options.autoConvertLineEndings || options.autoConvertLineEndings == null) { + if (hasOnlyWinLineEndings(source) && isUnix(patch)) { + patch = unixToWin(patch); + } + else if (hasOnlyUnixLineEndings(source) && isWin(patch)) { + patch = winToUnix(patch); + } + } + // Apply the diff to the input + const lines = source.split('\n'), hunks = patch.hunks, compareLine = options.compareLine || ((lineNumber, line, operation, patchContent) => line === patchContent), fuzzFactor = options.fuzzFactor || 0; + let minLine = 0; + if (fuzzFactor < 0 || !Number.isInteger(fuzzFactor)) { + throw new Error('fuzzFactor must be a non-negative integer'); + } + // Special case for empty patch. + if (!hunks.length) { + return source; + } + // Before anything else, handle EOFNL insertion/removal. If the patch tells us to make a change + // to the EOFNL that is redundant/impossible - i.e. to remove a newline that's not there, or add a + // newline that already exists - then we either return false and fail to apply the patch (if + // fuzzFactor is 0) or simply ignore the problem and do nothing (if fuzzFactor is >0). + // If we do need to remove/add a newline at EOF, this will always be in the final hunk: + let prevLine = '', removeEOFNL = false, addEOFNL = false; + for (let i = 0; i < hunks[hunks.length - 1].lines.length; i++) { + const line = hunks[hunks.length - 1].lines[i]; + if (line[0] == '\\') { + if (prevLine[0] == '+') { + removeEOFNL = true; + } + else if (prevLine[0] == '-') { + addEOFNL = true; + } + } + prevLine = line; + } + if (removeEOFNL) { + if (addEOFNL) { + // This means the final line gets changed but doesn't have a trailing newline in either the + // original or patched version. In that case, we do nothing if fuzzFactor > 0, and if + // fuzzFactor is 0, we simply validate that the source file has no trailing newline. + if (!fuzzFactor && lines[lines.length - 1] == '') { + return false; + } + } + else if (lines[lines.length - 1] == '') { + lines.pop(); + } + else if (!fuzzFactor) { + return false; + } + } + else if (addEOFNL) { + if (lines[lines.length - 1] != '') { + lines.push(''); + } + else if (!fuzzFactor) { + return false; + } + } + /** + * Checks if the hunk can be made to fit at the provided location with at most `maxErrors` + * insertions, substitutions, or deletions, while ensuring also that: + * - lines deleted in the hunk match exactly, and + * - wherever an insertion operation or block of insertion operations appears in the hunk, the + * immediately preceding and following lines of context match exactly + * + * `toPos` should be set such that lines[toPos] is meant to match hunkLines[0]. + * + * If the hunk can be applied, returns an object with properties `oldLineLastI` and + * `replacementLines`. Otherwise, returns null. + */ + function applyHunk(hunkLines, toPos, maxErrors, hunkLinesI = 0, lastContextLineMatched = true, patchedLines = [], patchedLinesLength = 0) { + let nConsecutiveOldContextLines = 0; + let nextContextLineMustMatch = false; + for (; hunkLinesI < hunkLines.length; hunkLinesI++) { + const hunkLine = hunkLines[hunkLinesI], operation = (hunkLine.length > 0 ? hunkLine[0] : ' '), content = (hunkLine.length > 0 ? hunkLine.substr(1) : hunkLine); + if (operation === '-') { + if (compareLine(toPos + 1, lines[toPos], operation, content)) { + toPos++; + nConsecutiveOldContextLines = 0; + } + else { + if (!maxErrors || lines[toPos] == null) { + return null; + } + patchedLines[patchedLinesLength] = lines[toPos]; + return applyHunk(hunkLines, toPos + 1, maxErrors - 1, hunkLinesI, false, patchedLines, patchedLinesLength + 1); + } + } + if (operation === '+') { + if (!lastContextLineMatched) { + return null; + } + patchedLines[patchedLinesLength] = content; + patchedLinesLength++; + nConsecutiveOldContextLines = 0; + nextContextLineMustMatch = true; + } + if (operation === ' ') { + nConsecutiveOldContextLines++; + patchedLines[patchedLinesLength] = lines[toPos]; + if (compareLine(toPos + 1, lines[toPos], operation, content)) { + patchedLinesLength++; + lastContextLineMatched = true; + nextContextLineMustMatch = false; + toPos++; + } + else { + if (nextContextLineMustMatch || !maxErrors) { + return null; + } + // Consider 3 possibilities in sequence: + // 1. lines contains a *substitution* not included in the patch context, or + // 2. lines contains an *insertion* not included in the patch context, or + // 3. lines contains a *deletion* not included in the patch context + // The first two options are of course only possible if the line from lines is non-null - + // i.e. only option 3 is possible if we've overrun the end of the old file. + return (lines[toPos] && (applyHunk(hunkLines, toPos + 1, maxErrors - 1, hunkLinesI + 1, false, patchedLines, patchedLinesLength + 1) || applyHunk(hunkLines, toPos + 1, maxErrors - 1, hunkLinesI, false, patchedLines, patchedLinesLength + 1)) || applyHunk(hunkLines, toPos, maxErrors - 1, hunkLinesI + 1, false, patchedLines, patchedLinesLength)); + } + } + } + // Before returning, trim any unmodified context lines off the end of patchedLines and reduce + // toPos (and thus oldLineLastI) accordingly. This allows later hunks to be applied to a region + // that starts in this hunk's trailing context. + patchedLinesLength -= nConsecutiveOldContextLines; + toPos -= nConsecutiveOldContextLines; + patchedLines.length = patchedLinesLength; + return { + patchedLines, + oldLineLastI: toPos - 1 + }; + } + const resultLines = []; + // Search best fit offsets for each hunk based on the previous ones + let prevHunkOffset = 0; + for (let i = 0; i < hunks.length; i++) { + const hunk = hunks[i]; + let hunkResult; + const maxLine = lines.length - hunk.oldLines + fuzzFactor; + let toPos; + for (let maxErrors = 0; maxErrors <= fuzzFactor; maxErrors++) { + toPos = hunk.oldStart + prevHunkOffset - 1; + const iterator = distanceIterator(toPos, minLine, maxLine); + for (; toPos !== undefined; toPos = iterator()) { + hunkResult = applyHunk(hunk.lines, toPos, maxErrors); + if (hunkResult) { + break; + } + } + if (hunkResult) { + break; + } + } + if (!hunkResult) { + return false; + } + // Copy everything from the end of where we applied the last hunk to the start of this hunk + for (let i = minLine; i < toPos; i++) { + resultLines.push(lines[i]); + } + // Add the lines produced by applying the hunk: + for (let i = 0; i < hunkResult.patchedLines.length; i++) { + const line = hunkResult.patchedLines[i]; + resultLines.push(line); + } + // Set lower text limit to end of the current hunk, so next ones don't try + // to fit over already patched text + minLine = hunkResult.oldLineLastI + 1; + // Note the offset between where the patch said the hunk should've applied and where we + // applied it, so we can adjust future hunks accordingly: + prevHunkOffset = toPos + 1 - hunk.oldStart; + } + // Copy over the rest of the lines from the old text + for (let i = minLine; i < lines.length; i++) { + resultLines.push(lines[i]); + } + return resultLines.join('\n'); } - if (!options.callback) { - return diffLinesResultToPatch(diffLines(oldStr, newStr, options)); - } else { - var _options = options, - _callback = _options.callback; - diffLines(oldStr, newStr, _objectSpread2(_objectSpread2({}, options), {}, { - callback: function callback(diff) { - var patch = diffLinesResultToPatch(diff); - _callback(patch); - } - })); + /** + * applies one or more patches. + * + * `patch` may be either an array of structured patch objects, or a string representing a patch in unified diff format (which may patch one or more files). + * + * This method will iterate over the contents of the patch and apply to data provided through callbacks. The general flow for each patch index is: + * + * - `options.loadFile(index, callback)` is called. The caller should then load the contents of the file and then pass that to the `callback(err, data)` callback. Passing an `err` will terminate further patch execution. + * - `options.patched(index, content, callback)` is called once the patch has been applied. `content` will be the return value from `applyPatch`. When it's ready, the caller should call `callback(err)` callback. Passing an `err` will terminate further patch execution. + * + * Once all patches have been applied or an error occurs, the `options.complete(err)` callback is made. + */ + function applyPatches(uniDiff, options) { + const spDiff = typeof uniDiff === 'string' ? parsePatch(uniDiff) : uniDiff; + let currentIndex = 0; + function processIndex() { + const index = spDiff[currentIndex++]; + if (!index) { + return options.complete(); + } + options.loadFile(index, function (err, data) { + if (err) { + return options.complete(err); + } + const updatedContent = applyPatch(data, index, options); + options.patched(index, updatedContent, function (err) { + if (err) { + return options.complete(err); + } + processIndex(); + }); + }); + } + processIndex(); } - function diffLinesResultToPatch(diff) { - // STEP 1: Build up the patch with no "\ No newline at end of file" lines and with the arrays - // of lines containing trailing newline characters. We'll tidy up later... - - if (!diff) { - return; - } - diff.push({ - value: '', - lines: [] - }); // Append an empty value to make cleanup easier - - function contextLines(lines) { - return lines.map(function (entry) { - return ' ' + entry; - }); - } - var hunks = []; - var oldRangeStart = 0, - newRangeStart = 0, - curRange = [], - oldLine = 1, - newLine = 1; - var _loop = function _loop() { - var current = diff[i], - lines = current.lines || splitLines(current.value); - current.lines = lines; - if (current.added || current.removed) { - var _curRange; - // If we have previous context, start with that - if (!oldRangeStart) { - var prev = diff[i - 1]; - oldRangeStart = oldLine; - newRangeStart = newLine; - if (prev) { - curRange = options.context > 0 ? contextLines(prev.lines.slice(-options.context)) : []; - oldRangeStart -= curRange.length; - newRangeStart -= curRange.length; - } - } - - // Output our changes - (_curRange = curRange).push.apply(_curRange, _toConsumableArray(lines.map(function (entry) { - return (current.added ? '+' : '-') + entry; - }))); - // Track the updated file position - if (current.added) { - newLine += lines.length; - } else { - oldLine += lines.length; - } - } else { - // Identical context lines. Track line changes - if (oldRangeStart) { - // Close out any changes that have been output (or join overlapping) - if (lines.length <= options.context * 2 && i < diff.length - 2) { - var _curRange2; - // Overlapping - (_curRange2 = curRange).push.apply(_curRange2, _toConsumableArray(contextLines(lines))); - } else { - var _curRange3; - // end the range and output - var contextSize = Math.min(lines.length, options.context); - (_curRange3 = curRange).push.apply(_curRange3, _toConsumableArray(contextLines(lines.slice(0, contextSize)))); - var _hunk = { - oldStart: oldRangeStart, - oldLines: oldLine - oldRangeStart + contextSize, - newStart: newRangeStart, - newLines: newLine - newRangeStart + contextSize, - lines: curRange - }; - hunks.push(_hunk); - oldRangeStart = 0; - newRangeStart = 0; - curRange = []; - } - } - oldLine += lines.length; - newLine += lines.length; - } - }; - for (var i = 0; i < diff.length; i++) { - _loop(); - } - - // Step 2: eliminate the trailing `\n` from each line of each hunk, and, where needed, add - // "\ No newline at end of file". - for (var _i = 0, _hunks = hunks; _i < _hunks.length; _i++) { - var hunk = _hunks[_i]; - for (var _i2 = 0; _i2 < hunk.lines.length; _i2++) { - if (hunk.lines[_i2].endsWith('\n')) { - hunk.lines[_i2] = hunk.lines[_i2].slice(0, -1); - } else { - hunk.lines.splice(_i2 + 1, 0, '\\ No newline at end of file'); - _i2++; // Skip the line we just added, then continue iterating - } - } - } - return { - oldFileName: oldFileName, - newFileName: newFileName, - oldHeader: oldHeader, - newHeader: newHeader, - hunks: hunks - }; - } - } - function formatPatch(diff) { - if (Array.isArray(diff)) { - return diff.map(formatPatch).join('\n'); - } - var ret = []; - if (diff.oldFileName == diff.newFileName) { - ret.push('Index: ' + diff.oldFileName); - } - ret.push('==================================================================='); - ret.push('--- ' + diff.oldFileName + (typeof diff.oldHeader === 'undefined' ? '' : '\t' + diff.oldHeader)); - ret.push('+++ ' + diff.newFileName + (typeof diff.newHeader === 'undefined' ? '' : '\t' + diff.newHeader)); - for (var i = 0; i < diff.hunks.length; i++) { - var hunk = diff.hunks[i]; - // Unified Diff Format quirk: If the chunk size is 0, - // the first number is one lower than one would expect. - // https://www.artima.com/weblogs/viewpost.jsp?thread=164293 - if (hunk.oldLines === 0) { - hunk.oldStart -= 1; - } - if (hunk.newLines === 0) { - hunk.newStart -= 1; - } - ret.push('@@ -' + hunk.oldStart + ',' + hunk.oldLines + ' +' + hunk.newStart + ',' + hunk.newLines + ' @@'); - ret.push.apply(ret, hunk.lines); - } - return ret.join('\n') + '\n'; - } - function createTwoFilesPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) { - var _options2; - if (typeof options === 'function') { - options = { - callback: options - }; - } - if (!((_options2 = options) !== null && _options2 !== void 0 && _options2.callback)) { - var patchObj = structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options); - if (!patchObj) { - return; - } - return formatPatch(patchObj); - } else { - var _options3 = options, - _callback2 = _options3.callback; - structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, _objectSpread2(_objectSpread2({}, options), {}, { - callback: function callback(patchObj) { - if (!patchObj) { - _callback2(); - } else { - _callback2(formatPatch(patchObj)); - } - } - })); + function swapPrefix(fileName) { + if (fileName === undefined || fileName === '/dev/null') { + return fileName; + } + if (fileName.startsWith('a/')) { + return 'b/' + fileName.slice(2); + } + if (fileName.startsWith('b/')) { + return 'a/' + fileName.slice(2); + } + return fileName; } - } - function createPatch(fileName, oldStr, newStr, oldHeader, newHeader, options) { - return createTwoFilesPatch(fileName, fileName, oldStr, newStr, oldHeader, newHeader, options); - } - - /** - * Split `text` into an array of lines, including the trailing newline character (where present) - */ - function splitLines(text) { - var hasTrailingNl = text.endsWith('\n'); - var result = text.split('\n').map(function (line) { - return line + '\n'; - }); - if (hasTrailingNl) { - result.pop(); - } else { - result.push(result.pop().slice(0, -1)); + function reversePatch(structuredPatch) { + if (Array.isArray(structuredPatch)) { + // (See comment in unixToWin for why we need the pointless-looking anonymous function here) + return structuredPatch.map(patch => reversePatch(patch)).reverse(); + } + const reversed = Object.assign(Object.assign({}, structuredPatch), { oldFileName: structuredPatch.isGit ? swapPrefix(structuredPatch.newFileName) : structuredPatch.newFileName, oldHeader: structuredPatch.newHeader, newFileName: structuredPatch.isGit ? swapPrefix(structuredPatch.oldFileName) : structuredPatch.oldFileName, newHeader: structuredPatch.oldHeader, oldMode: structuredPatch.newMode, newMode: structuredPatch.oldMode, isCreate: structuredPatch.isDelete, isDelete: structuredPatch.isCreate, hunks: structuredPatch.hunks.map(hunk => { + return { + oldLines: hunk.newLines, + oldStart: hunk.newStart, + newLines: hunk.oldLines, + newStart: hunk.oldStart, + lines: hunk.lines.map(l => { + if (l.startsWith('-')) { + return `+${l.slice(1)}`; + } + if (l.startsWith('+')) { + return `-${l.slice(1)}`; + } + return l; + }) + }; + }) }); + if (structuredPatch.isCopy) { + // Reversing a copy means deleting the file that was created by the copy. + // The "old" file in the reversed patch is the copy destination (which + // exists and should be removed), and the "new" file is /dev/null. + // + // Note: we clear the hunks because the original copy's hunks describe + // the diff between the source and destination, not the full content of + // the destination file, so they can't be meaningfully reversed into a + // deletion hunk. This means the resulting patch is not something + // `git apply` will accept (it requires deletion patches to include a + // hunk removing every line). Producing a correct deletion hunk would + // require knowing the full content of the copy destination, which we + // don't have. Consumers that need a `git apply`-compatible patch will + // need to resolve the full file content themselves. + reversed.newFileName = '/dev/null'; + reversed.newHeader = undefined; + reversed.isDelete = true; + delete reversed.isCreate; + delete reversed.isCopy; + delete reversed.isRename; + reversed.hunks = []; + } + // Reversing a rename is just a rename in the opposite direction; + // isRename stays set and the filenames are already swapped above. + return reversed; } - return result; - } - function arrayEqual(a, b) { - if (a.length !== b.length) { - return false; - } - return arrayStartsWith(a, b); - } - function arrayStartsWith(array, start) { - if (start.length > array.length) { - return false; - } - for (var i = 0; i < start.length; i++) { - if (start[i] !== array[i]) { + /** + * Returns true if the filename contains characters that require C-style + * quoting (as used by Git and GNU diffutils in diff output). + */ + function needsQuoting(s) { + for (let i = 0; i < s.length; i++) { + if (s[i] < '\x20' || s[i] > '\x7e' || s[i] === '"' || s[i] === '\\') { + return true; + } + } return false; - } - } - return true; - } - - function calcLineCount(hunk) { - var _calcOldNewLineCount = calcOldNewLineCount(hunk.lines), - oldLines = _calcOldNewLineCount.oldLines, - newLines = _calcOldNewLineCount.newLines; - if (oldLines !== undefined) { - hunk.oldLines = oldLines; - } else { - delete hunk.oldLines; - } - if (newLines !== undefined) { - hunk.newLines = newLines; - } else { - delete hunk.newLines; } - } - function merge(mine, theirs, base) { - mine = loadPatch(mine, base); - theirs = loadPatch(theirs, base); - var ret = {}; - - // For index we just let it pass through as it doesn't have any necessary meaning. - // Leaving sanity checks on this to the API consumer that may know more about the - // meaning in their own context. - if (mine.index || theirs.index) { - ret.index = mine.index || theirs.index; - } - if (mine.newFileName || theirs.newFileName) { - if (!fileNameChanged(mine)) { - // No header or no change in ours, use theirs (and ours if theirs does not exist) - ret.oldFileName = theirs.oldFileName || mine.oldFileName; - ret.newFileName = theirs.newFileName || mine.newFileName; - ret.oldHeader = theirs.oldHeader || mine.oldHeader; - ret.newHeader = theirs.newHeader || mine.newHeader; - } else if (!fileNameChanged(theirs)) { - // No header or no change in theirs, use ours - ret.oldFileName = mine.oldFileName; - ret.newFileName = mine.newFileName; - ret.oldHeader = mine.oldHeader; - ret.newHeader = mine.newHeader; - } else { - // Both changed... figure it out - ret.oldFileName = selectField(ret, mine.oldFileName, theirs.oldFileName); - ret.newFileName = selectField(ret, mine.newFileName, theirs.newFileName); - ret.oldHeader = selectField(ret, mine.oldHeader, theirs.oldHeader); - ret.newHeader = selectField(ret, mine.newHeader, theirs.newHeader); - } - } - ret.hunks = []; - var mineIndex = 0, - theirsIndex = 0, - mineOffset = 0, - theirsOffset = 0; - while (mineIndex < mine.hunks.length || theirsIndex < theirs.hunks.length) { - var mineCurrent = mine.hunks[mineIndex] || { - oldStart: Infinity - }, - theirsCurrent = theirs.hunks[theirsIndex] || { - oldStart: Infinity - }; - if (hunkBefore(mineCurrent, theirsCurrent)) { - // This patch does not overlap with any of the others, yay. - ret.hunks.push(cloneHunk(mineCurrent, mineOffset)); - mineIndex++; - theirsOffset += mineCurrent.newLines - mineCurrent.oldLines; - } else if (hunkBefore(theirsCurrent, mineCurrent)) { - // This patch does not overlap with any of the others, yay. - ret.hunks.push(cloneHunk(theirsCurrent, theirsOffset)); - theirsIndex++; - mineOffset += theirsCurrent.newLines - theirsCurrent.oldLines; - } else { - // Overlap, merge as best we can - var mergedHunk = { - oldStart: Math.min(mineCurrent.oldStart, theirsCurrent.oldStart), - oldLines: 0, - newStart: Math.min(mineCurrent.newStart + mineOffset, theirsCurrent.oldStart + theirsOffset), - newLines: 0, - lines: [] - }; - mergeLines(mergedHunk, mineCurrent.oldStart, mineCurrent.lines, theirsCurrent.oldStart, theirsCurrent.lines); - theirsIndex++; - mineIndex++; - ret.hunks.push(mergedHunk); - } - } - return ret; - } - function loadPatch(param, base) { - if (typeof param === 'string') { - if (/^@@/m.test(param) || /^Index:/m.test(param)) { - return parsePatch(param)[0]; - } - if (!base) { - throw new Error('Must provide a base reference or pass in a patch'); - } - return structuredPatch(undefined, undefined, base, param); - } - return param; - } - function fileNameChanged(patch) { - return patch.newFileName && patch.newFileName !== patch.oldFileName; - } - function selectField(index, mine, theirs) { - if (mine === theirs) { - return mine; - } else { - index.conflict = true; - return { - mine: mine, - theirs: theirs - }; + /** + * C-style quotes a filename, encoding special characters as escape sequences + * and non-ASCII bytes as octal escapes. This is the inverse of + * `parseQuotedFileName` in parse.ts. + * + * Non-ASCII bytes are encoded as UTF-8 before being emitted as octal escapes. + * This matches the behaviour of both Git and GNU diffutils, which always emit + * UTF-8 octal escapes regardless of the underlying filesystem encoding (e.g. + * Git for Windows converts from NTFS's UTF-16 to UTF-8 internally). + * + * If the filename doesn't need quoting, returns it as-is. + */ + function quoteFileNameIfNeeded(s) { + if (!needsQuoting(s)) { + return s; + } + let result = '"'; + const bytes = new TextEncoder().encode(s); + let i = 0; + while (i < bytes.length) { + const b = bytes[i]; + // See https://en.wikipedia.org/wiki/Escape_sequences_in_C#Escape_sequences + if (b === 0x07) { + result += '\\a'; + } + else if (b === 0x08) { + result += '\\b'; + } + else if (b === 0x09) { + result += '\\t'; + } + else if (b === 0x0a) { + result += '\\n'; + } + else if (b === 0x0b) { + result += '\\v'; + } + else if (b === 0x0c) { + result += '\\f'; + } + else if (b === 0x0d) { + result += '\\r'; + } + else if (b === 0x22) { + result += '\\"'; + } + else if (b === 0x5c) { + result += '\\\\'; + } + else if (b >= 0x20 && b <= 0x7e) { + // Just a printable ASCII character that is neither a double quote nor a + // backslash; no need to escape it. + result += String.fromCharCode(b); + } + else { + // Either part of a non-ASCII character or a control character without a + // special escape sequence; needs escaping as a 3-digit octal escape + result += '\\' + b.toString(8).padStart(3, '0'); + } + i++; + } + result += '"'; + return result; } - } - function hunkBefore(test, check) { - return test.oldStart < check.oldStart && test.oldStart + test.oldLines < check.oldStart; - } - function cloneHunk(hunk, offset) { - return { - oldStart: hunk.oldStart, - oldLines: hunk.oldLines, - newStart: hunk.newStart + offset, - newLines: hunk.newLines, - lines: hunk.lines + const INCLUDE_HEADERS = { + includeIndex: true, + includeUnderline: true, + includeFileHeaders: true }; - } - function mergeLines(hunk, mineOffset, mineLines, theirOffset, theirLines) { - // This will generally result in a conflicted hunk, but there are cases where the context - // is the only overlap where we can successfully merge the content here. - var mine = { - offset: mineOffset, - lines: mineLines, - index: 0 - }, - their = { - offset: theirOffset, - lines: theirLines, - index: 0 - }; - - // Handle any leading content - insertLeading(hunk, mine, their); - insertLeading(hunk, their, mine); - - // Now in the overlap content. Scan through and select the best changes from each. - while (mine.index < mine.lines.length && their.index < their.lines.length) { - var mineCurrent = mine.lines[mine.index], - theirCurrent = their.lines[their.index]; - if ((mineCurrent[0] === '-' || mineCurrent[0] === '+') && (theirCurrent[0] === '-' || theirCurrent[0] === '+')) { - // Both modified ... - mutualChange(hunk, mine, their); - } else if (mineCurrent[0] === '+' && theirCurrent[0] === ' ') { - var _hunk$lines; - // Mine inserted - (_hunk$lines = hunk.lines).push.apply(_hunk$lines, _toConsumableArray(collectChange(mine))); - } else if (theirCurrent[0] === '+' && mineCurrent[0] === ' ') { - var _hunk$lines2; - // Theirs inserted - (_hunk$lines2 = hunk.lines).push.apply(_hunk$lines2, _toConsumableArray(collectChange(their))); - } else if (mineCurrent[0] === '-' && theirCurrent[0] === ' ') { - // Mine removed or edited - removal(hunk, mine, their); - } else if (theirCurrent[0] === '-' && mineCurrent[0] === ' ') { - // Their removed or edited - removal(hunk, their, mine, true); - } else if (mineCurrent === theirCurrent) { - // Context identity - hunk.lines.push(mineCurrent); - mine.index++; - their.index++; - } else { - // Context mismatch - conflict(hunk, collectChange(mine), collectChange(their)); - } - } - - // Now push anything that may be remaining - insertTrailing(hunk, mine); - insertTrailing(hunk, their); - calcLineCount(hunk); - } - function mutualChange(hunk, mine, their) { - var myChanges = collectChange(mine), - theirChanges = collectChange(their); - if (allRemoves(myChanges) && allRemoves(theirChanges)) { - // Special case for remove changes that are supersets of one another - if (arrayStartsWith(myChanges, theirChanges) && skipRemoveSuperset(their, myChanges, myChanges.length - theirChanges.length)) { - var _hunk$lines3; - (_hunk$lines3 = hunk.lines).push.apply(_hunk$lines3, _toConsumableArray(myChanges)); - return; - } else if (arrayStartsWith(theirChanges, myChanges) && skipRemoveSuperset(mine, theirChanges, theirChanges.length - myChanges.length)) { - var _hunk$lines4; - (_hunk$lines4 = hunk.lines).push.apply(_hunk$lines4, _toConsumableArray(theirChanges)); - return; - } - } else if (arrayEqual(myChanges, theirChanges)) { - var _hunk$lines5; - (_hunk$lines5 = hunk.lines).push.apply(_hunk$lines5, _toConsumableArray(myChanges)); - return; - } - conflict(hunk, myChanges, theirChanges); - } - function removal(hunk, mine, their, swap) { - var myChanges = collectChange(mine), - theirChanges = collectContext(their, myChanges); - if (theirChanges.merged) { - var _hunk$lines6; - (_hunk$lines6 = hunk.lines).push.apply(_hunk$lines6, _toConsumableArray(theirChanges.merged)); - } else { - conflict(hunk, swap ? theirChanges : myChanges, swap ? myChanges : theirChanges); - } - } - function conflict(hunk, mine, their) { - hunk.conflict = true; - hunk.lines.push({ - conflict: true, - mine: mine, - theirs: their - }); - } - function insertLeading(hunk, insert, their) { - while (insert.offset < their.offset && insert.index < insert.lines.length) { - var line = insert.lines[insert.index++]; - hunk.lines.push(line); - insert.offset++; - } - } - function insertTrailing(hunk, insert) { - while (insert.index < insert.lines.length) { - var line = insert.lines[insert.index++]; - hunk.lines.push(line); - } - } - function collectChange(state) { - var ret = [], - operation = state.lines[state.index][0]; - while (state.index < state.lines.length) { - var line = state.lines[state.index]; - - // Group additions that are immediately after subtractions and treat them as one "atomic" modify change. - if (operation === '-' && line[0] === '+') { - operation = '+'; - } - if (operation === line[0]) { - ret.push(line); - state.index++; - } else { - break; - } - } - return ret; - } - function collectContext(state, matchChanges) { - var changes = [], - merged = [], - matchIndex = 0, - contextChanges = false, - conflicted = false; - while (matchIndex < matchChanges.length && state.index < state.lines.length) { - var change = state.lines[state.index], - match = matchChanges[matchIndex]; - - // Once we've hit our add, then we are done - if (match[0] === '+') { - break; - } - contextChanges = contextChanges || change[0] !== ' '; - merged.push(match); - matchIndex++; - - // Consume any additions in the other block as a conflict to attempt - // to pull in the remaining context after this - if (change[0] === '+') { - conflicted = true; - while (change[0] === '+') { - changes.push(change); - change = state.lines[++state.index]; - } - } - if (match.substr(1) === change.substr(1)) { - changes.push(change); - state.index++; - } else { - conflicted = true; - } - } - if ((matchChanges[matchIndex] || '')[0] === '+' && contextChanges) { - conflicted = true; - } - if (conflicted) { - return changes; + const FILE_HEADERS_ONLY = { + includeIndex: false, + includeUnderline: false, + includeFileHeaders: true + }; + const OMIT_HEADERS = { + includeIndex: false, + includeUnderline: false, + includeFileHeaders: false + }; + function structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) { + let optionsObj; + if (!options) { + optionsObj = {}; + } + else if (typeof options === 'function') { + optionsObj = { callback: options }; + } + else { + optionsObj = options; + } + if (typeof optionsObj.context === 'undefined') { + optionsObj.context = 4; + } + // We copy this into its own variable to placate TypeScript, which thinks + // optionsObj.context might be undefined in the callbacks below. + const context = optionsObj.context; + // @ts-expect-error (runtime check for something that is correctly a static type error) + if (optionsObj.newlineIsToken) { + throw new Error('newlineIsToken may not be used with patch-generation functions, only with diffing functions'); + } + if (!optionsObj.callback) { + return diffLinesResultToPatch(diffLines(oldStr, newStr, optionsObj)); + } + else { + const { callback } = optionsObj; + diffLines(oldStr, newStr, Object.assign(Object.assign({}, optionsObj), { callback: (diff) => { + const patch = diffLinesResultToPatch(diff); + // TypeScript is unhappy without the cast because it does not understand that `patch` may + // be undefined here only if `callback` is StructuredPatchCallbackAbortable: + callback(patch); + } })); + } + function diffLinesResultToPatch(diff) { + // STEP 1: Build up the patch with no "\ No newline at end of file" lines and with the arrays + // of lines containing trailing newline characters. We'll tidy up later... + if (!diff) { + return; + } + diff.push({ value: '', lines: [] }); // Append an empty value to make cleanup easier + function contextLines(lines) { + return lines.map(function (entry) { return ' ' + entry; }); + } + const hunks = []; + let oldRangeStart = 0, newRangeStart = 0, curRange = [], oldLine = 1, newLine = 1; + for (let i = 0; i < diff.length; i++) { + const current = diff[i], lines = current.lines || splitLines(current.value); + current.lines = lines; + if (current.added || current.removed) { + // If we have previous context, start with that + if (!oldRangeStart) { + const prev = diff[i - 1]; + oldRangeStart = oldLine; + newRangeStart = newLine; + if (prev) { + curRange = context > 0 ? contextLines(prev.lines.slice(-context)) : []; + oldRangeStart -= curRange.length; + newRangeStart -= curRange.length; + } + } + // Output our changes + for (const line of lines) { + curRange.push((current.added ? '+' : '-') + line); + } + // Track the updated file position + if (current.added) { + newLine += lines.length; + } + else { + oldLine += lines.length; + } + } + else { + // Identical context lines. Track line changes + if (oldRangeStart) { + // Close out any changes that have been output (or join overlapping) + if (lines.length <= context * 2 && i < diff.length - 2) { + // Overlapping + for (const line of contextLines(lines)) { + curRange.push(line); + } + } + else { + // end the range and output + const contextSize = Math.min(lines.length, context); + for (const line of contextLines(lines.slice(0, contextSize))) { + curRange.push(line); + } + const hunk = { + oldStart: oldRangeStart, + oldLines: (oldLine - oldRangeStart + contextSize), + newStart: newRangeStart, + newLines: (newLine - newRangeStart + contextSize), + lines: curRange + }; + hunks.push(hunk); + oldRangeStart = 0; + newRangeStart = 0; + curRange = []; + } + } + oldLine += lines.length; + newLine += lines.length; + } + } + // Step 2: eliminate the trailing `\n` from each line of each hunk, and, where needed, add + // "\ No newline at end of file". + for (const hunk of hunks) { + for (let i = 0; i < hunk.lines.length; i++) { + if (hunk.lines[i].endsWith('\n')) { + hunk.lines[i] = hunk.lines[i].slice(0, -1); + } + else { + hunk.lines.splice(i + 1, 0, '\\ No newline at end of file'); + i++; // Skip the line we just added, then continue iterating + } + } + } + return { + oldFileName: oldFileName, newFileName: newFileName, + oldHeader: oldHeader, newHeader: newHeader, + hunks: hunks + }; + } } - while (matchIndex < matchChanges.length) { - merged.push(matchChanges[matchIndex++]); + /** + * creates a unified diff patch. + * + * @param patch either a single structured patch object (as returned by `structuredPatch`) or an + * array of them (as returned by `parsePatch`). + * @param headerOptions behaves the same as the `headerOptions` option of `createTwoFilesPatch`. + * Ignored for patches where `isGit` is `true`. + * + * When a patch has `isGit: true`, `formatPatch` output is changed to more closely match Git's + * output: it emits a `diff --git` header, emits Git extended headers as appropriate based on + * properties like `isRename`, `isCreate`, `newMode`, etc, and will omit `---`/`+++` file + * headers for patches with no hunks (e.g. renames without content changes). + */ + function formatPatch(patch, headerOptions) { + var _a, _b, _c, _d, _e, _f; + if (!headerOptions) { + headerOptions = INCLUDE_HEADERS; + } + if (Array.isArray(patch)) { + if (patch.length > 1 && !headerOptions.includeFileHeaders && !patch.every(p => p.isGit)) { + throw new Error('Cannot omit file headers on a multi-file patch. ' + + '(The result would be unparseable; how would a tool trying to apply ' + + 'the patch know which changes are to which file?)'); + } + return patch.map(p => formatPatch(p, headerOptions)).join('\n'); + } + const ret = []; + // Git patches have a fixed header format (diff --git, extended headers, + // and ---/+++ when hunks are present), so headerOptions is ignored. + if (patch.isGit) { + headerOptions = INCLUDE_HEADERS; + // Emit Git-style diff --git header and extended headers. + // Git never puts /dev/null in the "diff --git" line; for file + // creations/deletions it uses the real filename on both sides. + if (!patch.oldFileName) { + throw new Error('oldFileName must be specified for Git patches'); + } + if (!patch.newFileName) { + throw new Error('newFileName must be specified for Git patches'); + } + let gitOldName = patch.oldFileName; + let gitNewName = patch.newFileName; + if (patch.isCreate && gitOldName === '/dev/null') { + gitOldName = gitNewName.replace(/^b\//, 'a/'); + } + else if (patch.isDelete && gitNewName === '/dev/null') { + gitNewName = gitOldName.replace(/^a\//, 'b/'); + } + ret.push('diff --git ' + quoteFileNameIfNeeded(gitOldName) + ' ' + quoteFileNameIfNeeded(gitNewName)); + if (patch.isDelete) { + ret.push('deleted file mode ' + ((_a = patch.oldMode) !== null && _a !== void 0 ? _a : '100644')); + } + if (patch.isCreate) { + ret.push('new file mode ' + ((_b = patch.newMode) !== null && _b !== void 0 ? _b : '100644')); + } + if (patch.oldMode && patch.newMode && !patch.isDelete && !patch.isCreate) { + ret.push('old mode ' + patch.oldMode); + ret.push('new mode ' + patch.newMode); + } + if (patch.isRename) { + ret.push('rename from ' + quoteFileNameIfNeeded(((_c = patch.oldFileName) !== null && _c !== void 0 ? _c : '').replace(/^a\//, ''))); + ret.push('rename to ' + quoteFileNameIfNeeded(((_d = patch.newFileName) !== null && _d !== void 0 ? _d : '').replace(/^b\//, ''))); + } + if (patch.isCopy) { + ret.push('copy from ' + quoteFileNameIfNeeded(((_e = patch.oldFileName) !== null && _e !== void 0 ? _e : '').replace(/^a\//, ''))); + ret.push('copy to ' + quoteFileNameIfNeeded(((_f = patch.newFileName) !== null && _f !== void 0 ? _f : '').replace(/^b\//, ''))); + } + } + else { + if (headerOptions.includeIndex && patch.oldFileName == patch.newFileName && patch.oldFileName !== undefined) { + ret.push('Index: ' + patch.oldFileName); + } + if (headerOptions.includeUnderline) { + ret.push('==================================================================='); + } + } + // Emit --- / +++ file headers. For Git patches with no hunks (e.g. + // pure renames, mode-only changes), Git omits these, so we do too. + const hasHunks = patch.hunks.length > 0; + if (headerOptions.includeFileHeaders && patch.oldFileName !== undefined && patch.newFileName !== undefined + && (!patch.isGit || hasHunks)) { + ret.push('--- ' + quoteFileNameIfNeeded(patch.oldFileName) + (patch.oldHeader ? '\t' + patch.oldHeader : '')); + ret.push('+++ ' + quoteFileNameIfNeeded(patch.newFileName) + (patch.newHeader ? '\t' + patch.newHeader : '')); + } + for (let i = 0; i < patch.hunks.length; i++) { + const hunk = patch.hunks[i]; + // Unified Diff Format quirk: If the chunk size is 0, + // the first number is one lower than one would expect. + // https://www.artima.com/weblogs/viewpost.jsp?thread=164293 + const oldStart = hunk.oldLines === 0 ? hunk.oldStart - 1 : hunk.oldStart; + const newStart = hunk.newLines === 0 ? hunk.newStart - 1 : hunk.newStart; + ret.push('@@ -' + oldStart + ',' + hunk.oldLines + + ' +' + newStart + ',' + hunk.newLines + + ' @@'); + for (const line of hunk.lines) { + ret.push(line); + } + } + return ret.join('\n') + '\n'; } - return { - merged: merged, - changes: changes - }; - } - function allRemoves(changes) { - return changes.reduce(function (prev, change) { - return prev && change[0] === '-'; - }, true); - } - function skipRemoveSuperset(state, removeChanges, delta) { - for (var i = 0; i < delta; i++) { - var changeContent = removeChanges[removeChanges.length - delta + i].substr(1); - if (state.lines[state.index + i] !== ' ' + changeContent) { - return false; - } + function createTwoFilesPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) { + if (typeof options === 'function') { + options = { callback: options }; + } + if (!(options === null || options === void 0 ? void 0 : options.callback)) { + const patchObj = structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options); + if (!patchObj) { + return; + } + return formatPatch(patchObj, options === null || options === void 0 ? void 0 : options.headerOptions); + } + else { + const { callback } = options; + structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, Object.assign(Object.assign({}, options), { callback: patchObj => { + if (!patchObj) { + callback(undefined); + } + else { + callback(formatPatch(patchObj, options.headerOptions)); + } + } })); + } } - state.index += delta; - return true; - } - function calcOldNewLineCount(lines) { - var oldLines = 0; - var newLines = 0; - lines.forEach(function (line) { - if (typeof line !== 'string') { - var myCount = calcOldNewLineCount(line.mine); - var theirCount = calcOldNewLineCount(line.theirs); - if (oldLines !== undefined) { - if (myCount.oldLines === theirCount.oldLines) { - oldLines += myCount.oldLines; - } else { - oldLines = undefined; - } - } - if (newLines !== undefined) { - if (myCount.newLines === theirCount.newLines) { - newLines += myCount.newLines; - } else { - newLines = undefined; - } - } - } else { - if (newLines !== undefined && (line[0] === '+' || line[0] === ' ')) { - newLines++; - } - if (oldLines !== undefined && (line[0] === '-' || line[0] === ' ')) { - oldLines++; - } - } - }); - return { - oldLines: oldLines, - newLines: newLines - }; - } - - function reversePatch(structuredPatch) { - if (Array.isArray(structuredPatch)) { - return structuredPatch.map(reversePatch).reverse(); + function createPatch(fileName, oldStr, newStr, oldHeader, newHeader, options) { + return createTwoFilesPatch(fileName, fileName, oldStr, newStr, oldHeader, newHeader, options); } - return _objectSpread2(_objectSpread2({}, structuredPatch), {}, { - oldFileName: structuredPatch.newFileName, - oldHeader: structuredPatch.newHeader, - newFileName: structuredPatch.oldFileName, - newHeader: structuredPatch.oldHeader, - hunks: structuredPatch.hunks.map(function (hunk) { - return { - oldLines: hunk.newLines, - oldStart: hunk.newStart, - newLines: hunk.oldLines, - newStart: hunk.oldStart, - lines: hunk.lines.map(function (l) { - if (l.startsWith('-')) { - return "+".concat(l.slice(1)); - } - if (l.startsWith('+')) { - return "-".concat(l.slice(1)); - } - return l; - }) - }; - }) - }); - } - - // See: http://code.google.com/p/google-diff-match-patch/wiki/API - function convertChangesToDMP(changes) { - var ret = [], - change, - operation; - for (var i = 0; i < changes.length; i++) { - change = changes[i]; - if (change.added) { - operation = 1; - } else if (change.removed) { - operation = -1; - } else { - operation = 0; - } - ret.push([operation, change.value]); + /** + * Split `text` into an array of lines, including the trailing newline character (where present) + */ + function splitLines(text) { + const hasTrailingNl = text.endsWith('\n'); + const result = text.split('\n').map(line => line + '\n'); + if (hasTrailingNl) { + result.pop(); + } + else { + result.push(result.pop().slice(0, -1)); + } + return result; } - return ret; - } - function convertChangesToXML(changes) { - var ret = []; - for (var i = 0; i < changes.length; i++) { - var change = changes[i]; - if (change.added) { - ret.push(''); - } else if (change.removed) { - ret.push(''); - } - ret.push(escapeHTML(change.value)); - if (change.added) { - ret.push(''); - } else if (change.removed) { - ret.push(''); - } + /** + * converts a list of change objects to the format returned by Google's [diff-match-patch](https://github.com/google/diff-match-patch) library + */ + function convertChangesToDMP(changes) { + const ret = []; + let change, operation; + for (let i = 0; i < changes.length; i++) { + change = changes[i]; + if (change.added) { + operation = 1; + } + else if (change.removed) { + operation = -1; + } + else { + operation = 0; + } + ret.push([operation, change.value]); + } + return ret; } - return ret.join(''); - } - function escapeHTML(s) { - var n = s; - n = n.replace(/&/g, '&'); - n = n.replace(//g, '>'); - n = n.replace(/"/g, '"'); - return n; - } - exports.Diff = Diff; - exports.applyPatch = applyPatch; - exports.applyPatches = applyPatches; - exports.canonicalize = canonicalize; - exports.convertChangesToDMP = convertChangesToDMP; - exports.convertChangesToXML = convertChangesToXML; - exports.createPatch = createPatch; - exports.createTwoFilesPatch = createTwoFilesPatch; - exports.diffArrays = diffArrays; - exports.diffChars = diffChars; - exports.diffCss = diffCss; - exports.diffJson = diffJson; - exports.diffLines = diffLines; - exports.diffSentences = diffSentences; - exports.diffTrimmedLines = diffTrimmedLines; - exports.diffWords = diffWords; - exports.diffWordsWithSpace = diffWordsWithSpace; - exports.formatPatch = formatPatch; - exports.merge = merge; - exports.parsePatch = parsePatch; - exports.reversePatch = reversePatch; - exports.structuredPatch = structuredPatch; + /** + * converts a list of change objects to a serialized XML format + */ + function convertChangesToXML(changes) { + const ret = []; + for (let i = 0; i < changes.length; i++) { + const change = changes[i]; + if (change.added) { + ret.push(''); + } + else if (change.removed) { + ret.push(''); + } + ret.push(escapeHTML(change.value)); + if (change.added) { + ret.push(''); + } + else if (change.removed) { + ret.push(''); + } + } + return ret.join(''); + } + function escapeHTML(s) { + let n = s; + n = n.replace(/&/g, '&'); + n = n.replace(//g, '>'); + n = n.replace(/"/g, '"'); + return n; + } + + exports.Diff = Diff; + exports.FILE_HEADERS_ONLY = FILE_HEADERS_ONLY; + exports.INCLUDE_HEADERS = INCLUDE_HEADERS; + exports.OMIT_HEADERS = OMIT_HEADERS; + exports.applyPatch = applyPatch; + exports.applyPatches = applyPatches; + exports.arrayDiff = arrayDiff; + exports.canonicalize = canonicalize; + exports.characterDiff = characterDiff; + exports.convertChangesToDMP = convertChangesToDMP; + exports.convertChangesToXML = convertChangesToXML; + exports.createPatch = createPatch; + exports.createTwoFilesPatch = createTwoFilesPatch; + exports.cssDiff = cssDiff; + exports.diffArrays = diffArrays; + exports.diffChars = diffChars; + exports.diffCss = diffCss; + exports.diffJson = diffJson; + exports.diffLines = diffLines; + exports.diffSentences = diffSentences; + exports.diffTrimmedLines = diffTrimmedLines; + exports.diffWords = diffWords; + exports.diffWordsWithSpace = diffWordsWithSpace; + exports.formatPatch = formatPatch; + exports.jsonDiff = jsonDiff; + exports.lineDiff = lineDiff; + exports.parsePatch = parsePatch; + exports.reversePatch = reversePatch; + exports.sentenceDiff = sentenceDiff; + exports.structuredPatch = structuredPatch; + exports.wordDiff = wordDiff; + exports.wordsWithSpaceDiff = wordsWithSpaceDiff; })); diff --git a/node_modules/mocha/node_modules/diff/dist/diff.min.js b/node_modules/mocha/node_modules/diff/dist/diff.min.js index 4d96b763..1dae944f 100644 --- a/node_modules/mocha/node_modules/diff/dist/diff.min.js +++ b/node_modules/mocha/node_modules/diff/dist/diff.min.js @@ -1,37 +1 @@ -/*! - - diff v7.0.0 - -BSD 3-Clause License - -Copyright (c) 2009-2015, Kevin Decker -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -3. Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -@license -*/ -!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((e="undefined"!=typeof globalThis?globalThis:e||self).Diff={})}(this,function(e){"use strict";function r(){}function w(e,n,t,r,i){for(var o,l=[];n;)l.push(n),o=n.previousComponent,delete n.previousComponent,n=o;l.reverse();for(var a=0,u=l.length,s=0,f=0;ae.length?n:e}),d.value=e.join(c)):d.value=e.join(t.slice(s,s+d.count)),s+=d.count,d.added||(f+=d.count))}return l}r.prototype={diff:function(l,a){var u=2=d&&c<=v+1)return f(w(s,p[0].lastComponent,a,l,s.useLongestToken));var g=-1/0,m=1/0;function i(){for(var e=Math.max(g,-h);e<=Math.min(m,h);e+=2){var n=void 0,t=p[e-1],r=p[e+1],i=(t&&(p[e-1]=void 0),!1),o=(r&&(o=r.oldPos-e,i=r&&0<=o&&o=d&&c<=v+1)return f(w(s,n.lastComponent,a,l,s.useLongestToken));(p[e]=n).oldPos+1>=d&&(m=Math.min(m,e-1)),c<=v+1&&(g=Math.max(g,e+1))}else p[e]=void 0}h++}if(n)!function e(){setTimeout(function(){if(tr)return n();i()||e()},0)}();else for(;h<=t&&Date.now()<=r;){var o=i();if(o)return o}},addToPath:function(e,n,t,r,i){var o=e.lastComponent;return o&&!i.oneChangePerToken&&o.added===n&&o.removed===t?{oldPos:e.oldPos+r,lastComponent:{count:o.count+1,added:n,removed:t,previousComponent:o.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:n,removed:t,previousComponent:o}}},extractCommon:function(e,n,t,r,i){for(var o=n.length,l=t.length,a=e.oldPos,u=a-r,s=0;u+1n.length&&(t=e.length-n.length);var r=n.length;e.lengthe.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)return!1;for(var t=0;t"):r.removed&&n.push(""),n.push(r.value.replace(/&/g,"&").replace(//g,">").replace(/"/g,""")),r.added?n.push(""):r.removed&&n.push("")}return n.join("")},e.createPatch=function(e,n,t,r,i,o){return M(e,e,n,t,r,i,o)},e.createTwoFilesPatch=M,e.diffArrays=function(e,n,t){return F.diff(e,n,t)},e.diffChars=function(e,n,t){return I.diff(e,n,t)},e.diffCss=function(e,n,t){return m.diff(e,n,t)},e.diffJson=function(e,n,t){return x.diff(e,n,t)},e.diffLines=y,e.diffSentences=function(e,n,t){return g.diff(e,n,t)},e.diffTrimmedLines=function(e,n,t){return t=function(e,n){if("function"==typeof e)n.callback=e;else if(e)for(var t in e)e.hasOwnProperty(t)&&(n[t]=e[t]);return n}(t,{ignoreWhitespace:!0}),v.diff(e,n,t)},e.diffWords=function(e,n,t){return null==(null==t?void 0:t.ignoreWhitespace)||t.ignoreWhitespace?i.diff(e,n,t):a(e,n,t)},e.diffWordsWithSpace=a,e.formatPatch=E,e.merge=function(e,n,t){e=J(e,t),n=J(n,t);for(var r={},i=((e.index||n.index)&&(r.index=e.index||n.index),(e.newFileName||n.newFileName)&&(q(e)?q(n)?(r.oldFileName=H(r,e.oldFileName,n.oldFileName),r.newFileName=H(r,e.newFileName,n.newFileName),r.oldHeader=H(r,e.oldHeader,n.oldHeader),r.newHeader=H(r,e.newHeader,n.newHeader)):(r.oldFileName=e.oldFileName,r.newFileName=e.newFileName,r.oldHeader=e.oldHeader,r.newHeader=e.newHeader):(r.oldFileName=n.oldFileName||e.oldFileName,r.newFileName=n.newFileName||e.newFileName,r.oldHeader=n.oldHeader||e.oldHeader,r.newHeader=n.newHeader||e.newHeader)),r.hunks=[],0),o=0,l=0,a=0;i{"object"==typeof exports&&"undefined"!=typeof module?factory(exports):"function"==typeof define&&define.amd?define(["exports"],factory):factory((global="undefined"!=typeof globalThis?globalThis:global||self).Diff={})})(this,function(exports){class Diff{diff(oldStr,newStr,options={}){let callback;"function"==typeof options?(callback=options,options={}):"callback"in options&&(callback=options.callback);oldStr=this.castInput(oldStr,options),newStr=this.castInput(newStr,options),oldStr=this.removeEmpty(this.tokenize(oldStr,options)),newStr=this.removeEmpty(this.tokenize(newStr,options));return this.diffWithOptionsObj(oldStr,newStr,options,callback)}diffWithOptionsObj(oldTokens,newTokens,options,callback){let _a,done=value=>{if(value=this.postProcess(value,options),!callback)return value;setTimeout(function(){callback(value)},0)},newLen=newTokens.length,oldLen=oldTokens.length,editLength=1,maxEditLength=newLen+oldLen;null!=options.maxEditLength&&(maxEditLength=Math.min(maxEditLength,options.maxEditLength));var maxExecutionTime=null!=(_a=options.timeout)?_a:1/0;let abortAfterTimestamp=Date.now()+maxExecutionTime,bestPath=[{oldPos:-1,lastComponent:void 0}],newPos=this.extractCommon(bestPath[0],newTokens,oldTokens,0,options);if(bestPath[0].oldPos+1>=oldLen&&newPos+1>=newLen)return done(this.buildValues(bestPath[0].lastComponent,newTokens,oldTokens));let minDiagonalToConsider=-1/0,maxDiagonalToConsider=1/0,execEditLength=()=>{for(let diagonalPath=Math.max(minDiagonalToConsider,-editLength);diagonalPath<=Math.min(maxDiagonalToConsider,editLength);diagonalPath+=2){let basePath;var removePath=bestPath[diagonalPath-1],addPath=bestPath[diagonalPath+1];removePath&&(bestPath[diagonalPath-1]=void 0);let canAdd=!1;addPath&&(addPathNewPos=addPath.oldPos-diagonalPath,canAdd=addPath&&0<=addPathNewPos&&addPathNewPos=oldLen&&newPos+1>=newLen)return done(this.buildValues(basePath.lastComponent,newTokens,oldTokens))||!0;(bestPath[diagonalPath]=basePath).oldPos+1>=oldLen&&(maxDiagonalToConsider=Math.min(maxDiagonalToConsider,diagonalPath-1)),newPos+1>=newLen&&(minDiagonalToConsider=Math.max(minDiagonalToConsider,diagonalPath+1))}else bestPath[diagonalPath]=void 0}editLength++};if(callback)!function exec(){setTimeout(function(){if(editLength>maxEditLength||Date.now()>abortAfterTimestamp)return callback(void 0);execEditLength()||exec()},0)}();else for(;editLength<=maxEditLength&&Date.now()<=abortAfterTimestamp;){var ret=execEditLength();if(ret)return ret}}addToPath(path,added,removed,oldPosInc,options){var last=path.lastComponent;return last&&!options.oneChangePerToken&&last.added===added&&last.removed===removed?{oldPos:path.oldPos+oldPosInc,lastComponent:{count:last.count+1,added:added,removed:removed,previousComponent:last.previousComponent}}:{oldPos:path.oldPos+oldPosInc,lastComponent:{count:1,added:added,removed:removed,previousComponent:last}}}extractCommon(basePath,newTokens,oldTokens,diagonalPath,options){var newLen=newTokens.length,oldLen=oldTokens.length;let oldPos=basePath.oldPos,newPos=oldPos-diagonalPath,commonCount=0;for(;newPos+1value.length?i:value}),component.value=this.join(value)}else component.value=this.join(newTokens.slice(newPos,newPos+component.count));newPos+=component.count,component.added||(oldPos+=component.count)}}return components}}class CharacterDiff extends Diff{}let characterDiff=new CharacterDiff;function longestCommonPrefix(str1,str2){let i;for(i=0;i{let startA=0,endB=(a.length>b.length&&(startA=a.length-b.length),b.length),map=(a.length{/\s/.test(part)?null==prevPart?tokens.push(part):tokens.push(tokens.pop()+part):null!=prevPart&&/\s/.test(prevPart)?tokens[tokens.length-1]==prevPart?tokens.push(tokens.pop()+part):tokens.push(prevPart+part):tokens.push(part),prevPart=part}),tokens}join(tokens){return tokens.map((token,i)=>0==i?token:token.replace(/^\s+/,"")).join("")}postProcess(changes,options){if(changes&&!options.oneChangePerToken){let lastKeep=null,insertion=null,deletion=null;changes.forEach(change=>{change.added?insertion=change:deletion=change.removed?change:((insertion||deletion)&&dedupeWhitespaceInChangeObjects(lastKeep,deletion,insertion,change,options.intlSegmenter),lastKeep=change,insertion=null)}),(insertion||deletion)&&dedupeWhitespaceInChangeObjects(lastKeep,deletion,insertion,null,options.intlSegmenter)}return changes}}let wordDiff=new WordDiff;function dedupeWhitespaceInChangeObjects(startKeep,deletion,insertion,endKeep,segmenter){if(deletion&&insertion){var[oldWsPrefix,oldWsSuffix]=leadingAndTrailingWs(deletion.value,segmenter),[newWsPrefix,newWsSuffix]=leadingAndTrailingWs(insertion.value,segmenter);startKeep&&(oldWsPrefix=longestCommonPrefix(oldWsPrefix,newWsPrefix),startKeep.value=replaceSuffix(startKeep.value,newWsPrefix,oldWsPrefix),deletion.value=removePrefix(deletion.value,oldWsPrefix),insertion.value=removePrefix(insertion.value,oldWsPrefix)),endKeep&&(newWsPrefix=longestCommonSuffix(oldWsSuffix,newWsSuffix),endKeep.value=replacePrefix(endKeep.value,newWsSuffix,newWsPrefix),deletion.value=removeSuffix(deletion.value,newWsPrefix),insertion.value=removeSuffix(insertion.value,newWsPrefix))}else if(insertion){if(startKeep&&(oldWsPrefix=leadingWs(insertion.value,segmenter),insertion.value=insertion.value.substring(oldWsPrefix.length)),endKeep){let ws=leadingWs(endKeep.value,segmenter);endKeep.value=endKeep.value.substring(ws.length)}}else if(startKeep&&endKeep){var oldWsSuffix=leadingWs(endKeep.value,segmenter),[newWsSuffix,newWsPrefix]=leadingAndTrailingWs(deletion.value,segmenter),insertion=longestCommonPrefix(oldWsSuffix,newWsSuffix),oldWsPrefix=(deletion.value=removePrefix(deletion.value,insertion),longestCommonSuffix(removePrefix(oldWsSuffix,insertion),newWsPrefix));deletion.value=removeSuffix(deletion.value,oldWsPrefix),endKeep.value=replacePrefix(endKeep.value,oldWsSuffix,oldWsPrefix),startKeep.value=replaceSuffix(startKeep.value,oldWsSuffix,oldWsSuffix.slice(0,oldWsSuffix.length-oldWsPrefix.length))}else if(endKeep){newWsSuffix=leadingWs(endKeep.value,segmenter),insertion=maximumOverlap(trailingWs(deletion.value,segmenter),newWsSuffix);deletion.value=removeSuffix(deletion.value,insertion)}else if(startKeep){let overlap=maximumOverlap(trailingWs(startKeep.value,segmenter),leadingWs(deletion.value,segmenter));deletion.value=removePrefix(deletion.value,overlap)}}class WordsWithSpaceDiff extends Diff{tokenize(value){var regex=new RegExp(`(\\r?\\n)|[${extendedWordChars}]+|[^\\S\\n\\r]+|[^${extendedWordChars}]`,"ug");return value.match(regex)||[]}}let wordsWithSpaceDiff=new WordsWithSpaceDiff;function diffWordsWithSpace(oldStr,newStr,options){return wordsWithSpaceDiff.diff(oldStr,newStr,options)}class LineDiff extends Diff{constructor(){super(...arguments),this.tokenize=tokenize}equals(left,right,options){return options.ignoreWhitespace?(options.newlineIsToken&&left.includes("\n")||(left=left.trim()),options.newlineIsToken&&right.includes("\n")||(right=right.trim())):options.ignoreNewlineAtEof&&!options.newlineIsToken&&(left.endsWith("\n")&&(left=left.slice(0,-1)),right.endsWith("\n"))&&(right=right.slice(0,-1)),super.equals(left,right,options)}}let lineDiff=new LineDiff;function diffLines(oldStr,newStr,options){return lineDiff.diff(oldStr,newStr,options)}function tokenize(value,options){var retLines=[],linesAndNewlines=(value=options.stripTrailingCr?value.replace(/\r\n/g,"\n"):value).split(/(\n|\r\n)/);linesAndNewlines[linesAndNewlines.length-1]||linesAndNewlines.pop();for(let i=0;ivoid 0===v?undefinedReplacement:v}=options;return"string"==typeof value?value:JSON.stringify(canonicalize(value,null,null,stringifyReplacer),null," ")}equals(left,right,options){return super.equals(left.replace(/,([\r\n])/g,"$1"),right.replace(/,([\r\n])/g,"$1"),options)}}let jsonDiff=new JsonDiff;function canonicalize(obj,stack,replacementStack,replacer,key){stack=stack||[],replacementStack=replacementStack||[],replacer&&(obj=replacer(void 0===key?"":key,obj));let i;for(i=0;i{var newPath,rest=line.substring("diff --git ".length);if(rest.startsWith('"')){line=parseQuotedFileName(rest);if(null===line)return null;var afterOld=rest.substring(line.rawLength+1);let newFileName;if(afterOld.startsWith('"')){var newPath=parseQuotedFileName(afterOld);if(null===newPath)return null;newFileName=newPath.fileName}else newFileName=afterOld;return{oldFileName:line.fileName,newFileName:newFileName}}if(0<(afterOld=rest.indexOf('"')))return line=rest.substring(0,afterOld-1),null===(newPath=parseQuotedFileName(rest.substring(afterOld)))?null:{oldFileName:line,newFileName:newPath.fileName};if(rest.startsWith("a/")){var splits=[];let idx=0;for(;;){if(-1===(idx=rest.indexOf(" b/",idx+1)))break;splits.push(idx)}if(0{var chunkHeaderIndex=i,chunkHeaderLine=diffstr[i++],hunk={oldStart:+(chunkHeaderLine=chunkHeaderLine.split(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/))[1],oldLines:void 0===chunkHeaderLine[2]?1:+chunkHeaderLine[2],newStart:+chunkHeaderLine[3],newLines:void 0===chunkHeaderLine[4]?1:+chunkHeaderLine[4],lines:[]};0===hunk.oldLines&&(hunk.oldStart+=1),0===hunk.newLines&&(hunk.newStart+=1);let addCount=0,removeCount=0;for(;i=s.length||s[j+1]<"0"||"7"=s.length||s[j+2]<"0"||"7"{!options.autoConvertLineEndings&&null!=options.autoConvertLineEndings||((string=>string.includes("\r\n")&&!string.startsWith("\n")&&!string.match(/[^\r]\n/))(source)&&(patch=>!(patch=Array.isArray(patch)?patch:[patch]).some(index=>index.hunks.some(hunk=>hunk.lines.some(line=>!line.startsWith("\\")&&line.endsWith("\r")))))(patch)?patch=function unixToWin(patch){return Array.isArray(patch)?patch.map(p=>unixToWin(p)):Object.assign(Object.assign({},patch),{hunks:patch.hunks.map(hunk=>Object.assign(Object.assign({},hunk),{lines:hunk.lines.map((line,i)=>line.startsWith("\\")||line.endsWith("\r")||null!=(i=hunk.lines[i+1])&&i.startsWith("\\")?line:line+"\r")}))})}(patch):(string=>!string.includes("\r\n")&&string.includes("\n"))(source)&&(patch=>(patch=Array.isArray(patch)?patch:[patch]).some(index=>index.hunks.some(hunk=>hunk.lines.some(line=>line.endsWith("\r"))))&&patch.every(index=>index.hunks.every(hunk=>hunk.lines.every((line,i)=>line.startsWith("\\")||line.endsWith("\r")||(null==(line=hunk.lines[i+1])?void 0:line.startsWith("\\"))))))(patch)&&(patch=function winToUnix(patch){return Array.isArray(patch)?patch.map(p=>winToUnix(p)):Object.assign(Object.assign({},patch),{hunks:patch.hunks.map(hunk=>Object.assign(Object.assign({},hunk),{lines:hunk.lines.map(line=>line.endsWith("\r")?line.substring(0,line.length-1):line)}))})}(patch)));let lines=source.split("\n"),hunks=patch.hunks,compareLine=options.compareLine||((lineNumber,line,operation,patchContent)=>line===patchContent),fuzzFactor=options.fuzzFactor||0,minLine=0;if(fuzzFactor<0||!Number.isInteger(fuzzFactor))throw new Error("fuzzFactor must be a non-negative integer");if(!hunks.length)return source;let prevLine="",removeEOFNL=!1,addEOFNL=!1;for(let i=0;i{let wantForward=!0,backwardExhausted=!1,forwardExhausted=!1,localOffset=1;return function iterator(){if(wantForward&&!forwardExhausted){if(backwardExhausted?localOffset++:wantForward=!1,start+localOffset<=maxLine)return start+localOffset;forwardExhausted=!0}if(!backwardExhausted)return forwardExhausted||(wantForward=!0),minLine<=start-localOffset?start-localOffset++:(backwardExhausted=!0,iterator())}})(toPos=hunk.oldStart+prevHunkOffset-1,minLine,maxLine);void 0!==toPos&&!(hunkResult=function applyHunk(hunkLines,toPos,maxErrors,hunkLinesI=0,lastContextLineMatched=!0,patchedLines=[],patchedLinesLength=0){let nConsecutiveOldContextLines=0,nextContextLineMustMatch=!1;for(;hunkLinesI{for(let i=0;i{diff=diffLinesResultToPatch(diff);callback(diff)}}))}function diffLinesResultToPatch(diff){if(diff){diff.push({value:"",lines:[]});var hunks=[];let oldRangeStart=0,newRangeStart=0,curRange=[],oldLine=1,newLine=1;for(let i=0;i{var hasTrailingNl=text.endsWith("\n"),text=text.split("\n").map(line=>line+"\n");return hasTrailingNl?text.pop():text.push(text.pop().slice(0,-1)),text})(current.value);if(current.lines=lines,current.added||current.removed){oldRangeStart||(prev=diff[i-1],oldRangeStart=oldLine,newRangeStart=newLine,prev&&(curRange=0p.isGit))throw new Error("Cannot omit file headers on a multi-file patch. (The result would be unparseable; how would a tool trying to apply the patch know which changes are to which file?)");return patch.map(p=>formatPatch(p,headerOptions)).join("\n")}var ret=[];if(patch.isGit){if(headerOptions=INCLUDE_HEADERS,!patch.oldFileName)throw new Error("oldFileName must be specified for Git patches");if(!patch.newFileName)throw new Error("newFileName must be specified for Git patches");let gitOldName=patch.oldFileName,gitNewName=patch.newFileName;patch.isCreate&&"/dev/null"===gitOldName?gitOldName=gitNewName.replace(/^b\//,"a/"):patch.isDelete&&"/dev/null"===gitNewName&&(gitNewName=gitOldName.replace(/^a\//,"b/")),ret.push("diff --git "+quoteFileNameIfNeeded(gitOldName)+" "+quoteFileNameIfNeeded(gitNewName)),patch.isDelete&&ret.push("deleted file mode "+(null!=(_a=patch.oldMode)?_a:"100644")),patch.isCreate&&ret.push("new file mode "+(null!=(_a=patch.newMode)?_a:"100644")),patch.oldMode&&patch.newMode&&!patch.isDelete&&!patch.isCreate&&(ret.push("old mode "+patch.oldMode),ret.push("new mode "+patch.newMode)),patch.isRename&&(ret.push("rename from "+quoteFileNameIfNeeded((null!=(_a=patch.oldFileName)?_a:"").replace(/^a\//,""))),ret.push("rename to "+quoteFileNameIfNeeded((null!=(_a=patch.newFileName)?_a:"").replace(/^b\//,"")))),patch.isCopy&&(ret.push("copy from "+quoteFileNameIfNeeded((null!=(_a=patch.oldFileName)?_a:"").replace(/^a\//,""))),ret.push("copy to "+quoteFileNameIfNeeded((null!=(_a=patch.newFileName)?_a:"").replace(/^b\//,""))))}else headerOptions.includeIndex&&patch.oldFileName==patch.newFileName&&void 0!==patch.oldFileName&&ret.push("Index: "+patch.oldFileName),headerOptions.includeUnderline&&ret.push("===================================================================");var _a=0{patchObj?callback(formatPatch(patchObj,options.headerOptions)):callback(void 0)}}))}else{oldFileName=structuredPatch(oldFileName,newFileName,oldStr,newStr,oldHeader,newHeader,options);if(oldFileName)return formatPatch(oldFileName,null==options?void 0:options.headerOptions)}}exports.Diff=Diff,exports.FILE_HEADERS_ONLY={includeIndex:!1,includeUnderline:!1,includeFileHeaders:!0},exports.INCLUDE_HEADERS=INCLUDE_HEADERS,exports.OMIT_HEADERS={includeIndex:!1,includeUnderline:!1,includeFileHeaders:!1},exports.applyPatch=applyPatch,exports.applyPatches=function(uniDiff,options){let spDiff="string"==typeof uniDiff?parsePatch(uniDiff):uniDiff,currentIndex=0;!function processIndex(){let index=spDiff[currentIndex++];if(!index)return options.complete();options.loadFile(index,function(err,data){if(err)return options.complete(err);err=applyPatch(data,index,options),options.patched(index,err,function(err){if(err)return options.complete(err);processIndex()})})}()},exports.arrayDiff=arrayDiff,exports.canonicalize=canonicalize,exports.characterDiff=characterDiff,exports.convertChangesToDMP=function(changes){var ret=[];let change,operation;for(let i=0;i"):change.removed&&ret.push(""),ret.push((s=>{let n=s;return n=(n=(n=(n=n.replace(/&/g,"&")).replace(//g,">")).replace(/"/g,""")})(change.value)),change.added?ret.push(""):change.removed&&ret.push("")}return ret.join("")},exports.createPatch=function(fileName,oldStr,newStr,oldHeader,newHeader,options){return createTwoFilesPatch(fileName,fileName,oldStr,newStr,oldHeader,newHeader,options)},exports.createTwoFilesPatch=createTwoFilesPatch,exports.cssDiff=cssDiff,exports.diffArrays=function(oldArr,newArr,options){return arrayDiff.diff(oldArr,newArr,options)},exports.diffChars=function(oldStr,newStr,options){return characterDiff.diff(oldStr,newStr,options)},exports.diffCss=function(oldStr,newStr,options){return cssDiff.diff(oldStr,newStr,options)},exports.diffJson=function(oldStr,newStr,options){return jsonDiff.diff(oldStr,newStr,options)},exports.diffLines=diffLines,exports.diffSentences=function(oldStr,newStr,options){return sentenceDiff.diff(oldStr,newStr,options)},exports.diffTrimmedLines=function(oldStr,newStr,options){return options=((options,defaults)=>{if("function"==typeof options)defaults.callback=options;else if(options)for(var name in options)Object.prototype.hasOwnProperty.call(options,name)&&(defaults[name]=options[name]);return defaults})(options,{ignoreWhitespace:!0}),lineDiff.diff(oldStr,newStr,options)},exports.diffWords=function(oldStr,newStr,options){return null==(null==options?void 0:options.ignoreWhitespace)||options.ignoreWhitespace?wordDiff.diff(oldStr,newStr,options):diffWordsWithSpace(oldStr,newStr,options)},exports.diffWordsWithSpace=diffWordsWithSpace,exports.formatPatch=formatPatch,exports.jsonDiff=jsonDiff,exports.lineDiff=lineDiff,exports.parsePatch=parsePatch,exports.reversePatch=function reversePatch(structuredPatch){var reversed;return Array.isArray(structuredPatch)?structuredPatch.map(patch=>reversePatch(patch)).reverse():(reversed=Object.assign(Object.assign({},structuredPatch),{oldFileName:structuredPatch.isGit?swapPrefix(structuredPatch.newFileName):structuredPatch.newFileName,oldHeader:structuredPatch.newHeader,newFileName:structuredPatch.isGit?swapPrefix(structuredPatch.oldFileName):structuredPatch.oldFileName,newHeader:structuredPatch.oldHeader,oldMode:structuredPatch.newMode,newMode:structuredPatch.oldMode,isCreate:structuredPatch.isDelete,isDelete:structuredPatch.isCreate,hunks:structuredPatch.hunks.map(hunk=>({oldLines:hunk.newLines,oldStart:hunk.newStart,newLines:hunk.oldLines,newStart:hunk.oldStart,lines:hunk.lines.map(l=>l.startsWith("-")?"+"+l.slice(1):l.startsWith("+")?"-"+l.slice(1):l)}))}),structuredPatch.isCopy&&(reversed.newFileName="/dev/null",reversed.newHeader=void 0,reversed.isDelete=!0,delete reversed.isCreate,delete reversed.isCopy,delete reversed.isRename,reversed.hunks=[]),reversed)},exports.sentenceDiff=sentenceDiff,exports.structuredPatch=structuredPatch,exports.wordDiff=wordDiff,exports.wordsWithSpaceDiff=wordsWithSpaceDiff}); \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/eslint.config.mjs b/node_modules/mocha/node_modules/diff/eslint.config.mjs new file mode 100644 index 00000000..ea1c7356 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/eslint.config.mjs @@ -0,0 +1,182 @@ +// @ts-check + +import eslint from '@eslint/js'; +import tseslint from 'typescript-eslint'; +import globals from "globals"; + +export default tseslint.config( + { + ignores: [ + "**/*", // ignore everything... + "!src/**/", "!src/**/*.ts", // ... except our TypeScript source files... + "!test/**/", "!test/**/*.js", // ... and our tests + ], + }, + eslint.configs.recommended, + tseslint.configs.recommended, + { + files: ['src/**/*.ts'], + languageOptions: { + parserOptions: { + projectService: true, + tsconfigRootDir: import.meta.dirname, + }, + }, + extends: [tseslint.configs.recommendedTypeChecked], + rules: { + // Not sure if these actually serve a purpose, but they provide a way to enforce SOME of what + // would be imposed by having "verbatimModuleSyntax": true in our tsconfig.json without + // actually doing that. + "@typescript-eslint/consistent-type-imports": 2, + "@typescript-eslint/consistent-type-exports": 2, + + // Things from the recommendedTypeChecked shared config that are disabled simply because they + // caused lots of errors in our existing code when tried. Plausibly useful to turn on if + // possible and somebody fancies doing the work: + "@typescript-eslint/no-unsafe-argument": 0, + "@typescript-eslint/no-unsafe-assignment": 0, + "@typescript-eslint/no-unsafe-call": 0, + "@typescript-eslint/no-unsafe-member-access": 0, + "@typescript-eslint/no-unsafe-return": 0, + } + }, + { + languageOptions: { + globals: { + ...globals.browser, + }, + }, + + rules: { + // Possible Errors // + //-----------------// + "comma-dangle": [2, "never"], + "no-console": 1, // Allow for debugging + "no-debugger": 1, // Allow for debugging + "no-extra-parens": [2, "functions"], + "no-extra-semi": 2, + "no-negated-in-lhs": 2, + "no-unreachable": 1, // Optimizer and coverage will handle/highlight this and can be useful for debugging + + // Best Practices // + //----------------// + curly: 2, + "default-case": 1, + "dot-notation": [2, { + allowKeywords: false, + }], + "guard-for-in": 1, + "no-alert": 2, + "no-caller": 2, + "no-div-regex": 1, + "no-eval": 2, + "no-extend-native": 2, + "no-extra-bind": 2, + "no-floating-decimal": 2, + "no-implied-eval": 2, + "no-iterator": 2, + "no-labels": 2, + "no-lone-blocks": 2, + "no-multi-spaces": 2, + "no-multi-str": 1, + "no-native-reassign": 2, + "no-new": 2, + "no-new-func": 2, + "no-new-wrappers": 2, + "no-octal-escape": 2, + "no-process-env": 2, + "no-proto": 2, + "no-return-assign": 2, + "no-script-url": 2, + "no-self-compare": 2, + "no-sequences": 2, + "no-throw-literal": 2, + "no-unused-expressions": 2, + "no-warning-comments": 1, + radix: 2, + "wrap-iife": 2, + + // Variables // + //-----------// + "no-catch-shadow": 2, + "no-label-var": 2, + "no-undef-init": 2, + + // Node.js // + //---------// + + // Stylistic // + //-----------// + "brace-style": [2, "1tbs", { + allowSingleLine: true, + }], + camelcase: 2, + "comma-spacing": [2, { + before: false, + after: true, + }], + "comma-style": [2, "last"], + "consistent-this": [1, "self"], + "eol-last": 2, + "func-style": [2, "declaration"], + "key-spacing": [2, { + beforeColon: false, + afterColon: true, + }], + "new-cap": 2, + "new-parens": 2, + "no-array-constructor": 2, + "no-lonely-if": 2, + "no-mixed-spaces-and-tabs": 2, + "no-nested-ternary": 1, + "no-new-object": 2, + "no-spaced-func": 2, + "no-trailing-spaces": 2, + "quote-props": [2, "as-needed", { + keywords: true, + }], + quotes: [2, "single", "avoid-escape"], + semi: 2, + "semi-spacing": [2, { + before: false, + after: true, + }], + "space-before-blocks": [2, "always"], + "space-before-function-paren": [2, { + anonymous: "never", + named: "never", + }], + "space-in-parens": [2, "never"], + "space-infix-ops": 2, + "space-unary-ops": 2, + "spaced-comment": [2, "always"], + "wrap-regex": 1, + "no-var": 2, + + // Typescript // + //------------// + "@typescript-eslint/no-explicit-any": 0, // Very strict rule, incompatible with our code + + // We use these intentionally - e.g. + // export interface DiffCssOptions extends CommonDiffOptions {} + // for the options argument to diffCss which currently takes no options beyond the ones + // common to all diffFoo functions. Doing this allows consistency (one options interface per + // diffFoo function) and future-proofs against the API having to change in future if we add a + // non-common option to one of these functions. + "@typescript-eslint/no-empty-object-type": [2, {allowInterfaces: 'with-single-extends'}], + }, + }, + { + files: ['test/**/*.js'], + languageOptions: { + globals: { + ...globals.node, + ...globals.mocha, + }, + }, + rules: { + "no-unused-expressions": 0, // Needs disabling to support Chai `.to.be.undefined` etc syntax + "@typescript-eslint/no-unused-expressions": 0, // (as above) + }, + } +); diff --git a/node_modules/mocha/node_modules/diff/lib/convert/dmp.js b/node_modules/mocha/node_modules/diff/lib/convert/dmp.js deleted file mode 100644 index 4f9081a5..00000000 --- a/node_modules/mocha/node_modules/diff/lib/convert/dmp.js +++ /dev/null @@ -1,27 +0,0 @@ -/*istanbul ignore start*/ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.convertChangesToDMP = convertChangesToDMP; -/*istanbul ignore end*/ -// See: http://code.google.com/p/google-diff-match-patch/wiki/API -function convertChangesToDMP(changes) { - var ret = [], - change, - operation; - for (var i = 0; i < changes.length; i++) { - change = changes[i]; - if (change.added) { - operation = 1; - } else if (change.removed) { - operation = -1; - } else { - operation = 0; - } - ret.push([operation, change.value]); - } - return ret; -} -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJjb252ZXJ0Q2hhbmdlc1RvRE1QIiwiY2hhbmdlcyIsInJldCIsImNoYW5nZSIsIm9wZXJhdGlvbiIsImkiLCJsZW5ndGgiLCJhZGRlZCIsInJlbW92ZWQiLCJwdXNoIiwidmFsdWUiXSwic291cmNlcyI6WyIuLi8uLi9zcmMvY29udmVydC9kbXAuanMiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gU2VlOiBodHRwOi8vY29kZS5nb29nbGUuY29tL3AvZ29vZ2xlLWRpZmYtbWF0Y2gtcGF0Y2gvd2lraS9BUElcbmV4cG9ydCBmdW5jdGlvbiBjb252ZXJ0Q2hhbmdlc1RvRE1QKGNoYW5nZXMpIHtcbiAgbGV0IHJldCA9IFtdLFxuICAgICAgY2hhbmdlLFxuICAgICAgb3BlcmF0aW9uO1xuICBmb3IgKGxldCBpID0gMDsgaSA8IGNoYW5nZXMubGVuZ3RoOyBpKyspIHtcbiAgICBjaGFuZ2UgPSBjaGFuZ2VzW2ldO1xuICAgIGlmIChjaGFuZ2UuYWRkZWQpIHtcbiAgICAgIG9wZXJhdGlvbiA9IDE7XG4gICAgfSBlbHNlIGlmIChjaGFuZ2UucmVtb3ZlZCkge1xuICAgICAgb3BlcmF0aW9uID0gLTE7XG4gICAgfSBlbHNlIHtcbiAgICAgIG9wZXJhdGlvbiA9IDA7XG4gICAgfVxuXG4gICAgcmV0LnB1c2goW29wZXJhdGlvbiwgY2hhbmdlLnZhbHVlXSk7XG4gIH1cbiAgcmV0dXJuIHJldDtcbn1cbiJdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7QUFBQTtBQUNPLFNBQVNBLG1CQUFtQkEsQ0FBQ0MsT0FBTyxFQUFFO0VBQzNDLElBQUlDLEdBQUcsR0FBRyxFQUFFO0lBQ1JDLE1BQU07SUFDTkMsU0FBUztFQUNiLEtBQUssSUFBSUMsQ0FBQyxHQUFHLENBQUMsRUFBRUEsQ0FBQyxHQUFHSixPQUFPLENBQUNLLE1BQU0sRUFBRUQsQ0FBQyxFQUFFLEVBQUU7SUFDdkNGLE1BQU0sR0FBR0YsT0FBTyxDQUFDSSxDQUFDLENBQUM7SUFDbkIsSUFBSUYsTUFBTSxDQUFDSSxLQUFLLEVBQUU7TUFDaEJILFNBQVMsR0FBRyxDQUFDO0lBQ2YsQ0FBQyxNQUFNLElBQUlELE1BQU0sQ0FBQ0ssT0FBTyxFQUFFO01BQ3pCSixTQUFTLEdBQUcsQ0FBQyxDQUFDO0lBQ2hCLENBQUMsTUFBTTtNQUNMQSxTQUFTLEdBQUcsQ0FBQztJQUNmO0lBRUFGLEdBQUcsQ0FBQ08sSUFBSSxDQUFDLENBQUNMLFNBQVMsRUFBRUQsTUFBTSxDQUFDTyxLQUFLLENBQUMsQ0FBQztFQUNyQztFQUNBLE9BQU9SLEdBQUc7QUFDWiIsImlnbm9yZUxpc3QiOltdfQ== diff --git a/node_modules/mocha/node_modules/diff/lib/convert/xml.js b/node_modules/mocha/node_modules/diff/lib/convert/xml.js deleted file mode 100644 index d21b7d35..00000000 --- a/node_modules/mocha/node_modules/diff/lib/convert/xml.js +++ /dev/null @@ -1,35 +0,0 @@ -/*istanbul ignore start*/ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.convertChangesToXML = convertChangesToXML; -/*istanbul ignore end*/ -function convertChangesToXML(changes) { - var ret = []; - for (var i = 0; i < changes.length; i++) { - var change = changes[i]; - if (change.added) { - ret.push(''); - } else if (change.removed) { - ret.push(''); - } - ret.push(escapeHTML(change.value)); - if (change.added) { - ret.push(''); - } else if (change.removed) { - ret.push(''); - } - } - return ret.join(''); -} -function escapeHTML(s) { - var n = s; - n = n.replace(/&/g, '&'); - n = n.replace(//g, '>'); - n = n.replace(/"/g, '"'); - return n; -} -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJjb252ZXJ0Q2hhbmdlc1RvWE1MIiwiY2hhbmdlcyIsInJldCIsImkiLCJsZW5ndGgiLCJjaGFuZ2UiLCJhZGRlZCIsInB1c2giLCJyZW1vdmVkIiwiZXNjYXBlSFRNTCIsInZhbHVlIiwiam9pbiIsInMiLCJuIiwicmVwbGFjZSJdLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb252ZXJ0L3htbC5qcyJdLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgZnVuY3Rpb24gY29udmVydENoYW5nZXNUb1hNTChjaGFuZ2VzKSB7XG4gIGxldCByZXQgPSBbXTtcbiAgZm9yIChsZXQgaSA9IDA7IGkgPCBjaGFuZ2VzLmxlbmd0aDsgaSsrKSB7XG4gICAgbGV0IGNoYW5nZSA9IGNoYW5nZXNbaV07XG4gICAgaWYgKGNoYW5nZS5hZGRlZCkge1xuICAgICAgcmV0LnB1c2goJzxpbnM+Jyk7XG4gICAgfSBlbHNlIGlmIChjaGFuZ2UucmVtb3ZlZCkge1xuICAgICAgcmV0LnB1c2goJzxkZWw+Jyk7XG4gICAgfVxuXG4gICAgcmV0LnB1c2goZXNjYXBlSFRNTChjaGFuZ2UudmFsdWUpKTtcblxuICAgIGlmIChjaGFuZ2UuYWRkZWQpIHtcbiAgICAgIHJldC5wdXNoKCc8L2lucz4nKTtcbiAgICB9IGVsc2UgaWYgKGNoYW5nZS5yZW1vdmVkKSB7XG4gICAgICByZXQucHVzaCgnPC9kZWw+Jyk7XG4gICAgfVxuICB9XG4gIHJldHVybiByZXQuam9pbignJyk7XG59X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UFDcEI7RUFDRjtFQUNBLE9BQU9MLEdBQUcsQ0FBQ1MsSUFBSSxDQUFDLEVBQUUsQ0FBQztBQUNyQjtBQUVBLFNBQVNGLFVBQVVBLENBQUNHLENBQUMsRUFBRTtFQUNyQixJQUFJQyxDQUFDLEdBQUdELENBQUM7RUFDVEMsQ0FBQyxHQUFHQSxDQUFDLENBQUNDLE9BQU8sQ0FBQyxJQUFJLEVBQUUsT0FBTyxDQUFDO0VBQzVCRCxDQUFDLEdBQUdBLENBQUMsQ0FBQ0MsT0FBTyxDQUFDLElBQUksRUFBRSxNQUFNLENBQUM7RUFDM0JELENBQUMsR0FBR0EsQ0FBQyxDQUFDQyxPQUFPLENBQUMsSUFBSSxFQUFFLE1BQU0sQ0FBQztFQUMzQkQsQ0FBQyxHQUFHQSxDQUFDLENBQUNDLE9BQU8sQ0FBQyxJQUFJLEVBQUUsUUFBUSxDQUFDO0VBRTdCLE9BQU9ELENBQUM7QUFDViIsImlnbm9yZUxpc3QiOltdfQ== diff --git a/node_modules/mocha/node_modules/diff/lib/diff/array.js b/node_modules/mocha/node_modules/diff/lib/diff/array.js deleted file mode 100644 index bd0802db..00000000 --- a/node_modules/mocha/node_modules/diff/lib/diff/array.js +++ /dev/null @@ -1,39 +0,0 @@ -/*istanbul ignore start*/ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.arrayDiff = void 0; -exports.diffArrays = diffArrays; -/*istanbul ignore end*/ -var -/*istanbul ignore start*/ -_base = _interopRequireDefault(require("./base")) -/*istanbul ignore end*/ -; -/*istanbul ignore start*/ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } -/*istanbul ignore end*/ -var arrayDiff = -/*istanbul ignore start*/ -exports.arrayDiff = -/*istanbul ignore end*/ -new -/*istanbul ignore start*/ -_base -/*istanbul ignore end*/ -[ -/*istanbul ignore start*/ -"default" -/*istanbul ignore end*/ -](); -arrayDiff.tokenize = function (value) { - return value.slice(); -}; -arrayDiff.join = arrayDiff.removeEmpty = function (value) { - return value; -}; -function diffArrays(oldArr, newArr, callback) { - return arrayDiff.diff(oldArr, newArr, callback); -} -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfYmFzZSIsIl9pbnRlcm9wUmVxdWlyZURlZmF1bHQiLCJyZXF1aXJlIiwib2JqIiwiX19lc01vZHVsZSIsImFycmF5RGlmZiIsImV4cG9ydHMiLCJEaWZmIiwidG9rZW5pemUiLCJ2YWx1ZSIsInNsaWNlIiwiam9pbiIsInJlbW92ZUVtcHR5IiwiZGlmZkFycmF5cyIsIm9sZEFyciIsIm5ld0FyciIsImNhbGxiYWNrIiwiZGlmZiJdLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9kaWZmL2FycmF5LmpzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBEaWZmIGZyb20gJy4vYmFzZSc7XG5cbmV4cG9ydCBjb25zdCBhcnJheURpZmYgPSBuZXcgRGlmZigpO1xuYXJyYXlEaWZmLnRva2VuaXplID0gZnVuY3Rpb24odmFsdWUpIHtcbiAgcmV0dXJuIHZhbHVlLnNsaWNlKCk7XG59O1xuYXJyYXlEaWZmLmpvaW4gPSBhcnJheURpZmYucmVtb3ZlRW1wdHkgPSBmdW5jdGlvbih2YWx1ZSkge1xuICByZXR1cm4gdmFsdWU7XG59O1xuXG5leHBvcnQgZnVuY3Rpb24gZGlmZkFycmF5cyhvbGRBcnIsIG5ld0FyciwgY2FsbGJhY2spIHsgcmV0dXJuIGFycmF5RGlmZi5kaWZmKG9sZEFyciwgbmV3QXJyLCBjYWxsYmFjayk7IH1cbiJdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7O0FBQUE7QUFBQTtBQUFBQSxLQUFBLEdBQUFDLHNCQUFBLENBQUFDLE9BQUE7QUFBQTtBQUFBO0FBQTBCLG1DQUFBRCx1QkFBQUUsR0FBQSxXQUFBQSxHQUFBLElBQUFBLEdBQUEsQ0FBQUMsVUFBQSxHQUFBRCxHQUFBLGdCQUFBQSxHQUFBO0FBQUE7QUFFbkIsSUFBTUUsU0FBUztBQUFBO0FBQUFDLE9BQUEsQ0FBQUQsU0FBQTtBQUFBO0FBQUc7QUFBSUU7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUEsQ0FBSSxDQUFDLENBQUM7QUFDbkNGLFNBQVMsQ0FBQ0csUUFBUSxHQUFHLFVBQVNDLEtBQUssRUFBRTtFQUNuQyxPQUFPQSxLQUFLLENBQUNDLEtBQUssQ0FBQyxDQUFDO0FBQ3RCLENBQUM7QUFDREwsU0FBUyxDQUFDTSxJQUFJLEdBQUdOLFNBQVMsQ0FBQ08sV0FBVyxHQUFHLFVBQVNILEtBQUssRUFBRTtFQUN2RCxPQUFPQSxLQUFLO0FBQ2QsQ0FBQztBQUVNLFNBQVNJLFVBQVVBLENBQUNDLE1BQU0sRUFBRUMsTUFBTSxFQUFFQyxRQUFRLEVBQUU7RUFBRSxPQUFPWCxTQUFTLENBQUNZLElBQUksQ0FBQ0gsTUFBTSxFQUFFQyxNQUFNLEVBQUVDLFFBQVEsQ0FBQztBQUFFIiwiaWdub3JlTGlzdCI6W119 diff --git a/node_modules/mocha/node_modules/diff/lib/diff/base.js b/node_modules/mocha/node_modules/diff/lib/diff/base.js deleted file mode 100644 index d2b4b447..00000000 --- a/node_modules/mocha/node_modules/diff/lib/diff/base.js +++ /dev/null @@ -1,304 +0,0 @@ -/*istanbul ignore start*/ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = Diff; -/*istanbul ignore end*/ -function Diff() {} -Diff.prototype = { - /*istanbul ignore start*/ - /*istanbul ignore end*/ - diff: function diff(oldString, newString) { - /*istanbul ignore start*/ - var _options$timeout; - var - /*istanbul ignore end*/ - options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; - var callback = options.callback; - if (typeof options === 'function') { - callback = options; - options = {}; - } - var self = this; - function done(value) { - value = self.postProcess(value, options); - if (callback) { - setTimeout(function () { - callback(value); - }, 0); - return true; - } else { - return value; - } - } - - // Allow subclasses to massage the input prior to running - oldString = this.castInput(oldString, options); - newString = this.castInput(newString, options); - oldString = this.removeEmpty(this.tokenize(oldString, options)); - newString = this.removeEmpty(this.tokenize(newString, options)); - var newLen = newString.length, - oldLen = oldString.length; - var editLength = 1; - var maxEditLength = newLen + oldLen; - if (options.maxEditLength != null) { - maxEditLength = Math.min(maxEditLength, options.maxEditLength); - } - var maxExecutionTime = - /*istanbul ignore start*/ - (_options$timeout = - /*istanbul ignore end*/ - options.timeout) !== null && _options$timeout !== void 0 ? _options$timeout : Infinity; - var abortAfterTimestamp = Date.now() + maxExecutionTime; - var bestPath = [{ - oldPos: -1, - lastComponent: undefined - }]; - - // Seed editLength = 0, i.e. the content starts with the same values - var newPos = this.extractCommon(bestPath[0], newString, oldString, 0, options); - if (bestPath[0].oldPos + 1 >= oldLen && newPos + 1 >= newLen) { - // Identity per the equality and tokenizer - return done(buildValues(self, bestPath[0].lastComponent, newString, oldString, self.useLongestToken)); - } - - // Once we hit the right edge of the edit graph on some diagonal k, we can - // definitely reach the end of the edit graph in no more than k edits, so - // there's no point in considering any moves to diagonal k+1 any more (from - // which we're guaranteed to need at least k+1 more edits). - // Similarly, once we've reached the bottom of the edit graph, there's no - // point considering moves to lower diagonals. - // We record this fact by setting minDiagonalToConsider and - // maxDiagonalToConsider to some finite value once we've hit the edge of - // the edit graph. - // This optimization is not faithful to the original algorithm presented in - // Myers's paper, which instead pointlessly extends D-paths off the end of - // the edit graph - see page 7 of Myers's paper which notes this point - // explicitly and illustrates it with a diagram. This has major performance - // implications for some common scenarios. For instance, to compute a diff - // where the new text simply appends d characters on the end of the - // original text of length n, the true Myers algorithm will take O(n+d^2) - // time while this optimization needs only O(n+d) time. - var minDiagonalToConsider = -Infinity, - maxDiagonalToConsider = Infinity; - - // Main worker method. checks all permutations of a given edit length for acceptance. - function execEditLength() { - for (var diagonalPath = Math.max(minDiagonalToConsider, -editLength); diagonalPath <= Math.min(maxDiagonalToConsider, editLength); diagonalPath += 2) { - var basePath = - /*istanbul ignore start*/ - void 0 - /*istanbul ignore end*/ - ; - var removePath = bestPath[diagonalPath - 1], - addPath = bestPath[diagonalPath + 1]; - if (removePath) { - // No one else is going to attempt to use this value, clear it - bestPath[diagonalPath - 1] = undefined; - } - var canAdd = false; - if (addPath) { - // what newPos will be after we do an insertion: - var addPathNewPos = addPath.oldPos - diagonalPath; - canAdd = addPath && 0 <= addPathNewPos && addPathNewPos < newLen; - } - var canRemove = removePath && removePath.oldPos + 1 < oldLen; - if (!canAdd && !canRemove) { - // If this path is a terminal then prune - bestPath[diagonalPath] = undefined; - continue; - } - - // Select the diagonal that we want to branch from. We select the prior - // path whose position in the old string is the farthest from the origin - // and does not pass the bounds of the diff graph - if (!canRemove || canAdd && removePath.oldPos < addPath.oldPos) { - basePath = self.addToPath(addPath, true, false, 0, options); - } else { - basePath = self.addToPath(removePath, false, true, 1, options); - } - newPos = self.extractCommon(basePath, newString, oldString, diagonalPath, options); - if (basePath.oldPos + 1 >= oldLen && newPos + 1 >= newLen) { - // If we have hit the end of both strings, then we are done - return done(buildValues(self, basePath.lastComponent, newString, oldString, self.useLongestToken)); - } else { - bestPath[diagonalPath] = basePath; - if (basePath.oldPos + 1 >= oldLen) { - maxDiagonalToConsider = Math.min(maxDiagonalToConsider, diagonalPath - 1); - } - if (newPos + 1 >= newLen) { - minDiagonalToConsider = Math.max(minDiagonalToConsider, diagonalPath + 1); - } - } - } - editLength++; - } - - // Performs the length of edit iteration. Is a bit fugly as this has to support the - // sync and async mode which is never fun. Loops over execEditLength until a value - // is produced, or until the edit length exceeds options.maxEditLength (if given), - // in which case it will return undefined. - if (callback) { - (function exec() { - setTimeout(function () { - if (editLength > maxEditLength || Date.now() > abortAfterTimestamp) { - return callback(); - } - if (!execEditLength()) { - exec(); - } - }, 0); - })(); - } else { - while (editLength <= maxEditLength && Date.now() <= abortAfterTimestamp) { - var ret = execEditLength(); - if (ret) { - return ret; - } - } - } - }, - /*istanbul ignore start*/ - /*istanbul ignore end*/ - addToPath: function addToPath(path, added, removed, oldPosInc, options) { - var last = path.lastComponent; - if (last && !options.oneChangePerToken && last.added === added && last.removed === removed) { - return { - oldPos: path.oldPos + oldPosInc, - lastComponent: { - count: last.count + 1, - added: added, - removed: removed, - previousComponent: last.previousComponent - } - }; - } else { - return { - oldPos: path.oldPos + oldPosInc, - lastComponent: { - count: 1, - added: added, - removed: removed, - previousComponent: last - } - }; - } - }, - /*istanbul ignore start*/ - /*istanbul ignore end*/ - extractCommon: function extractCommon(basePath, newString, oldString, diagonalPath, options) { - var newLen = newString.length, - oldLen = oldString.length, - oldPos = basePath.oldPos, - newPos = oldPos - diagonalPath, - commonCount = 0; - while (newPos + 1 < newLen && oldPos + 1 < oldLen && this.equals(oldString[oldPos + 1], newString[newPos + 1], options)) { - newPos++; - oldPos++; - commonCount++; - if (options.oneChangePerToken) { - basePath.lastComponent = { - count: 1, - previousComponent: basePath.lastComponent, - added: false, - removed: false - }; - } - } - if (commonCount && !options.oneChangePerToken) { - basePath.lastComponent = { - count: commonCount, - previousComponent: basePath.lastComponent, - added: false, - removed: false - }; - } - basePath.oldPos = oldPos; - return newPos; - }, - /*istanbul ignore start*/ - /*istanbul ignore end*/ - equals: function equals(left, right, options) { - if (options.comparator) { - return options.comparator(left, right); - } else { - return left === right || options.ignoreCase && left.toLowerCase() === right.toLowerCase(); - } - }, - /*istanbul ignore start*/ - /*istanbul ignore end*/ - removeEmpty: function removeEmpty(array) { - var ret = []; - for (var i = 0; i < array.length; i++) { - if (array[i]) { - ret.push(array[i]); - } - } - return ret; - }, - /*istanbul ignore start*/ - /*istanbul ignore end*/ - castInput: function castInput(value) { - return value; - }, - /*istanbul ignore start*/ - /*istanbul ignore end*/ - tokenize: function tokenize(value) { - return Array.from(value); - }, - /*istanbul ignore start*/ - /*istanbul ignore end*/ - join: function join(chars) { - return chars.join(''); - }, - /*istanbul ignore start*/ - /*istanbul ignore end*/ - postProcess: function postProcess(changeObjects) { - return changeObjects; - } -}; -function buildValues(diff, lastComponent, newString, oldString, useLongestToken) { - // First we convert our linked list of components in reverse order to an - // array in the right order: - var components = []; - var nextComponent; - while (lastComponent) { - components.push(lastComponent); - nextComponent = lastComponent.previousComponent; - delete lastComponent.previousComponent; - lastComponent = nextComponent; - } - components.reverse(); - var componentPos = 0, - componentLen = components.length, - newPos = 0, - oldPos = 0; - for (; componentPos < componentLen; componentPos++) { - var component = components[componentPos]; - if (!component.removed) { - if (!component.added && useLongestToken) { - var value = newString.slice(newPos, newPos + component.count); - value = value.map(function (value, i) { - var oldValue = oldString[oldPos + i]; - return oldValue.length > value.length ? oldValue : value; - }); - component.value = diff.join(value); - } else { - component.value = diff.join(newString.slice(newPos, newPos + component.count)); - } - newPos += component.count; - - // Common case - if (!component.added) { - oldPos += component.count; - } - } else { - component.value = diff.join(oldString.slice(oldPos, oldPos + component.count)); - oldPos += component.count; - } - } - return components; -} -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJEaWZmIiwicHJvdG90eXBlIiwiZGlmZiIsIm9sZFN0cmluZyIsIm5ld1N0cmluZyIsIl9vcHRpb25zJHRpbWVvdXQiLCJvcHRpb25zIiwiYXJndW1lbnRzIiwibGVuZ3RoIiwidW5kZWZpbmVkIiwiY2FsbGJhY2siLCJzZWxmIiwiZG9uZSIsInZhbHVlIiwicG9zdFByb2Nlc3MiLCJzZXRUaW1lb3V0IiwiY2FzdElucHV0IiwicmVtb3ZlRW1wdHkiLCJ0b2tlbml6ZSIsIm5ld0xlbiIsIm9sZExlbiIsImVkaXRMZW5ndGgiLCJtYXhFZGl0TGVuZ3RoIiwiTWF0aCIsIm1pbiIsIm1heEV4ZWN1dGlvblRpbWUiLCJ0aW1lb3V0IiwiSW5maW5pdHkiLCJhYm9ydEFmdGVyVGltZXN0YW1wIiwiRGF0ZSI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xHQUFHWCxJQUFJLENBQUNzRSxJQUFJLENBQUNyRSxTQUFTLENBQUM4RSxLQUFLLENBQUNqRCxNQUFNLEVBQUVBLE1BQU0sR0FBR2dELFNBQVMsQ0FBQ3RCLEtBQUssQ0FBQyxDQUFDO01BQzlFMUIsTUFBTSxJQUFJZ0QsU0FBUyxDQUFDdEIsS0FBSztJQUMzQjtFQUNGO0VBRUEsT0FBT2lCLFVBQVU7QUFDbkIiLCJpZ25vcmVMaXN0IjpbXX0= diff --git a/node_modules/mocha/node_modules/diff/lib/diff/character.js b/node_modules/mocha/node_modules/diff/lib/diff/character.js deleted file mode 100644 index 6a3cf1c4..00000000 --- a/node_modules/mocha/node_modules/diff/lib/diff/character.js +++ /dev/null @@ -1,33 +0,0 @@ -/*istanbul ignore start*/ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.characterDiff = void 0; -exports.diffChars = diffChars; -/*istanbul ignore end*/ -var -/*istanbul ignore start*/ -_base = _interopRequireDefault(require("./base")) -/*istanbul ignore end*/ -; -/*istanbul ignore start*/ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } -/*istanbul ignore end*/ -var characterDiff = -/*istanbul ignore start*/ -exports.characterDiff = -/*istanbul ignore end*/ -new -/*istanbul ignore start*/ -_base -/*istanbul ignore end*/ -[ -/*istanbul ignore start*/ -"default" -/*istanbul ignore end*/ -](); -function diffChars(oldStr, newStr, options) { - return characterDiff.diff(oldStr, newStr, options); -} -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfYmFzZSIsIl9pbnRlcm9wUmVxdWlyZURlZmF1bHQiLCJyZXF1aXJlIiwib2JqIiwiX19lc01vZHVsZSIsImNoYXJhY3RlckRpZmYiLCJleHBvcnRzIiwiRGlmZiIsImRpZmZDaGFycyIsIm9sZFN0ciIsIm5ld1N0ciIsIm9wdGlvbnMiLCJkaWZmIl0sInNvdXJjZXMiOlsiLi4vLi4vc3JjL2RpZmYvY2hhcmFjdGVyLmpzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBEaWZmIGZyb20gJy4vYmFzZSc7XG5cbmV4cG9ydCBjb25zdCBjaGFyYWN0ZXJEaWZmID0gbmV3IERpZmYoKTtcbmV4cG9ydCBmdW5jdGlvbiBkaWZmQ2hhcnMob2xkU3RyLCBuZXdTdHIsIG9wdGlvbnMpIHsgcmV0dXJuIGNoYXJhY3RlckRpZmYuZGlmZihvbGRTdHIsIG5ld1N0ciwgb3B0aW9ucyk7IH1cbiJdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7O0FBQUE7QUFBQTtBQUFBQSxLQUFBLEdBQUFDLHNCQUFBLENBQUFDLE9BQUE7QUFBQTtBQUFBO0FBQTBCLG1DQUFBRCx1QkFBQUUsR0FBQSxXQUFBQSxHQUFBLElBQUFBLEdBQUEsQ0FBQUMsVUFBQSxHQUFBRCxHQUFBLGdCQUFBQSxHQUFBO0FBQUE7QUFFbkIsSUFBTUUsYUFBYTtBQUFBO0FBQUFDLE9BQUEsQ0FBQUQsYUFBQTtBQUFBO0FBQUc7QUFBSUU7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUEsQ0FBSSxDQUFDLENBQUM7QUFDaEMsU0FBU0MsU0FBU0EsQ0FBQ0MsTUFBTSxFQUFFQyxNQUFNLEVBQUVDLE9BQU8sRUFBRTtFQUFFLE9BQU9OLGFBQWEsQ0FBQ08sSUFBSSxDQUFDSCxNQUFNLEVBQUVDLE1BQU0sRUFBRUMsT0FBTyxDQUFDO0FBQUUiLCJpZ25vcmVMaXN0IjpbXX0= diff --git a/node_modules/mocha/node_modules/diff/lib/diff/css.js b/node_modules/mocha/node_modules/diff/lib/diff/css.js deleted file mode 100644 index 63218278..00000000 --- a/node_modules/mocha/node_modules/diff/lib/diff/css.js +++ /dev/null @@ -1,36 +0,0 @@ -/*istanbul ignore start*/ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.cssDiff = void 0; -exports.diffCss = diffCss; -/*istanbul ignore end*/ -var -/*istanbul ignore start*/ -_base = _interopRequireDefault(require("./base")) -/*istanbul ignore end*/ -; -/*istanbul ignore start*/ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } -/*istanbul ignore end*/ -var cssDiff = -/*istanbul ignore start*/ -exports.cssDiff = -/*istanbul ignore end*/ -new -/*istanbul ignore start*/ -_base -/*istanbul ignore end*/ -[ -/*istanbul ignore start*/ -"default" -/*istanbul ignore end*/ -](); -cssDiff.tokenize = function (value) { - return value.split(/([{}:;,]|\s+)/); -}; -function diffCss(oldStr, newStr, callback) { - return cssDiff.diff(oldStr, newStr, callback); -} -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfYmFzZSIsIl9pbnRlcm9wUmVxdWlyZURlZmF1bHQiLCJyZXF1aXJlIiwib2JqIiwiX19lc01vZHVsZSIsImNzc0RpZmYiLCJleHBvcnRzIiwiRGlmZiIsInRva2VuaXplIiwidmFsdWUiLCJzcGxpdCIsImRpZmZDc3MiLCJvbGRTdHIiLCJuZXdTdHIiLCJjYWxsYmFjayIsImRpZmYiXSwic291cmNlcyI6WyIuLi8uLi9zcmMvZGlmZi9jc3MuanMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IERpZmYgZnJvbSAnLi9iYXNlJztcblxuZXhwb3J0IGNvbnN0IGNzc0RpZmYgPSBuZXcgRGlmZigpO1xuY3NzRGlmZi50b2tlbml6ZSA9IGZ1bmN0aW9uKHZhbHVlKSB7XG4gIHJldHVybiB2YWx1ZS5zcGxpdCgvKFt7fTo7LF18XFxzKykvKTtcbn07XG5cbmV4cG9ydCBmdW5jdGlvbiBkaWZmQ3NzKG9sZFN0ciwgbmV3U3RyLCBjYWxsYmFjaykgeyByZXR1cm4gY3NzRGlmZi5kaWZmKG9sZFN0ciwgbmV3U3RyLCBjYWxsYmFjayk7IH1cbiJdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7O0FBQUE7QUFBQTtBQUFBQSxLQUFBLEdBQUFDLHNCQUFBLENBQUFDLE9BQUE7QUFBQTtBQUFBO0FBQTBCLG1DQUFBRCx1QkFBQUUsR0FBQSxXQUFBQSxHQUFBLElBQUFBLEdBQUEsQ0FBQUMsVUFBQSxHQUFBRCxHQUFBLGdCQUFBQSxHQUFBO0FBQUE7QUFFbkIsSUFBTUUsT0FBTztBQUFBO0FBQUFDLE9BQUEsQ0FBQUQsT0FBQTtBQUFBO0FBQUc7QUFBSUU7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUE7QUFBQUEsQ0FBSSxDQUFDLENBQUM7QUFDakNGLE9BQU8sQ0FBQ0csUUFBUSxHQUFHLFVBQVNDLEtBQUssRUFBRTtFQUNqQyxPQUFPQSxLQUFLLENBQUNDLEtBQUssQ0FBQyxlQUFlLENBQUM7QUFDckMsQ0FBQztBQUVNLFNBQVNDLE9BQU9BLENBQUNDLE1BQU0sRUFBRUMsTUFBTSxFQUFFQyxRQUFRLEVBQUU7RUFBRSxPQUFPVCxPQUFPLENBQUNVLElBQUksQ0FBQ0gsTUFBTSxFQUFFQyxNQUFNLEVBQUVDLFFBQVEsQ0FBQztBQUFFIiwiaWdub3JlTGlzdCI6W119 diff --git a/node_modules/mocha/node_modules/diff/lib/diff/json.js b/node_modules/mocha/node_modules/diff/lib/diff/json.js deleted file mode 100644 index a3f07480..00000000 --- a/node_modules/mocha/node_modules/diff/lib/diff/json.js +++ /dev/null @@ -1,143 +0,0 @@ -/*istanbul ignore start*/ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.canonicalize = canonicalize; -exports.diffJson = diffJson; -exports.jsonDiff = void 0; -/*istanbul ignore end*/ -var -/*istanbul ignore start*/ -_base = _interopRequireDefault(require("./base")) -/*istanbul ignore end*/ -; -var -/*istanbul ignore start*/ -_line = require("./line") -/*istanbul ignore end*/ -; -/*istanbul ignore start*/ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -/*istanbul ignore end*/ -var jsonDiff = -/*istanbul ignore start*/ -exports.jsonDiff = -/*istanbul ignore end*/ -new -/*istanbul ignore start*/ -_base -/*istanbul ignore end*/ -[ -/*istanbul ignore start*/ -"default" -/*istanbul ignore end*/ -](); -// Discriminate between two lines of pretty-printed, serialized JSON where one of them has a -// dangling comma and the other doesn't. Turns out including the dangling comma yields the nicest output: -jsonDiff.useLongestToken = true; -jsonDiff.tokenize = -/*istanbul ignore start*/ -_line -/*istanbul ignore end*/ -. -/*istanbul ignore start*/ -lineDiff -/*istanbul ignore end*/ -.tokenize; -jsonDiff.castInput = function (value, options) { - var - /*istanbul ignore start*/ - /*istanbul ignore end*/ - undefinedReplacement = options.undefinedReplacement, - /*istanbul ignore start*/ - _options$stringifyRep = - /*istanbul ignore end*/ - options.stringifyReplacer, - /*istanbul ignore start*/ - /*istanbul ignore end*/ - stringifyReplacer = _options$stringifyRep === void 0 ? function (k, v) - /*istanbul ignore start*/ - { - return ( - /*istanbul ignore end*/ - typeof v === 'undefined' ? undefinedReplacement : v - ); - } : _options$stringifyRep; - return typeof value === 'string' ? value : JSON.stringify(canonicalize(value, null, null, stringifyReplacer), stringifyReplacer, ' '); -}; -jsonDiff.equals = function (left, right, options) { - return ( - /*istanbul ignore start*/ - _base - /*istanbul ignore end*/ - [ - /*istanbul ignore start*/ - "default" - /*istanbul ignore end*/ - ].prototype.equals.call(jsonDiff, left.replace(/,([\r\n])/g, '$1'), right.replace(/,([\r\n])/g, '$1'), options) - ); -}; -function diffJson(oldObj, newObj, options) { - return jsonDiff.diff(oldObj, newObj, options); -} - -// This function handles the presence of circular references by bailing out when encountering an -// object that is already on the "stack" of items being processed. Accepts an optional replacer -function canonicalize(obj, stack, replacementStack, replacer, key) { - stack = stack || []; - replacementStack = replacementStack || []; - if (replacer) { - obj = replacer(key, obj); - } - var i; - for (i = 0; i < stack.length; i += 1) { - if (stack[i] === obj) { - return replacementStack[i]; - } - } - var canonicalizedObj; - if ('[object Array]' === Object.prototype.toString.call(obj)) { - stack.push(obj); - canonicalizedObj = new Array(obj.length); - replacementStack.push(canonicalizedObj); - for (i = 0; i < obj.length; i += 1) { - canonicalizedObj[i] = canonicalize(obj[i], stack, replacementStack, replacer, key); - } - stack.pop(); - replacementStack.pop(); - return canonicalizedObj; - } - if (obj && obj.toJSON) { - obj = obj.toJSON(); - } - if ( - /*istanbul ignore start*/ - _typeof( - /*istanbul ignore end*/ - obj) === 'object' && obj !== null) { - stack.push(obj); - canonicalizedObj = {}; - replacementStack.push(canonicalizedObj); - var sortedKeys = [], - _key; - for (_key in obj) { - /* istanbul ignore else */ - if (Object.prototype.hasOwnProperty.call(obj, _key)) { - sortedKeys.push(_key); - } - } - sortedKeys.sort(); - for (i = 0; i < sortedKeys.length; i += 1) { - _key = sortedKeys[i]; - canonicalizedObj[_key] = canonicalize(obj[_key], stack, replacementStack, replacer, _key); - } - stack.pop(); - replacementStack.pop(); - } else { - canonicalizedObj = obj; - } - return canonicalizedObj; -} -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfYmFzZSIsIl9pbnRlcm9wUmVxdWlyZURlZmF1bHQiLCJyZXF1aXJlIiwiX2xpbmUiLCJvYmoiLCJfX2VzTW9kdWxlIiwiX3R5cGVvZiIsIm8iLCJTeW1ib2wiLCJpdGVyYXRvciIsImNvbnN0cnVjdG9yIiwicHJvdG90eXBlIiwianNvbkRpZmYiLCJleHBvcnRzIiwiRGlmZiIsInVzZUxvbmdlc3RUb2tlbiIsInRva2VuaXplIiwibGlu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JBQWdCLENBQUNILElBQUcsQ0FBQyxHQUFHYixZQUFZLENBQUN4QixHQUFHLENBQUNxQyxJQUFHLENBQUMsRUFBRUgsS0FBSyxFQUFFQyxnQkFBZ0IsRUFBRUMsUUFBUSxFQUFFQyxJQUFHLENBQUM7SUFDeEY7SUFDQUgsS0FBSyxDQUFDVyxHQUFHLENBQUMsQ0FBQztJQUNYVixnQkFBZ0IsQ0FBQ1UsR0FBRyxDQUFDLENBQUM7RUFDeEIsQ0FBQyxNQUFNO0lBQ0xMLGdCQUFnQixHQUFHeEMsR0FBRztFQUN4QjtFQUNBLE9BQU93QyxnQkFBZ0I7QUFDekIiLCJpZ25vcmVMaXN0IjpbXX0= diff --git a/node_modules/mocha/node_modules/diff/lib/diff/line.js b/node_modules/mocha/node_modules/diff/lib/diff/line.js deleted file mode 100644 index 71f3f247..00000000 --- a/node_modules/mocha/node_modules/diff/lib/diff/line.js +++ /dev/null @@ -1,121 +0,0 @@ -/*istanbul ignore start*/ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.diffLines = diffLines; -exports.diffTrimmedLines = diffTrimmedLines; -exports.lineDiff = void 0; -/*istanbul ignore end*/ -var -/*istanbul ignore start*/ -_base = _interopRequireDefault(require("./base")) -/*istanbul ignore end*/ -; -var -/*istanbul ignore start*/ -_params = require("../util/params") -/*istanbul ignore end*/ -; -/*istanbul ignore start*/ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } -/*istanbul ignore end*/ -var lineDiff = -/*istanbul ignore start*/ -exports.lineDiff = -/*istanbul ignore end*/ -new -/*istanbul ignore start*/ -_base -/*istanbul ignore end*/ -[ -/*istanbul ignore start*/ -"default" -/*istanbul ignore end*/ -](); -lineDiff.tokenize = function (value, options) { - if (options.stripTrailingCr) { - // remove one \r before \n to match GNU diff's --strip-trailing-cr behavior - value = value.replace(/\r\n/g, '\n'); - } - var retLines = [], - linesAndNewlines = value.split(/(\n|\r\n)/); - - // Ignore the final empty token that occurs if the string ends with a new line - if (!linesAndNewlines[linesAndNewlines.length - 1]) { - linesAndNewlines.pop(); - } - - // Merge the content and line separators into single tokens - for (var i = 0; i < linesAndNewlines.length; i++) { - var line = linesAndNewlines[i]; - if (i % 2 && !options.newlineIsToken) { - retLines[retLines.length - 1] += line; - } else { - retLines.push(line); - } - } - return retLines; -}; -lineDiff.equals = function (left, right, options) { - // If we're ignoring whitespace, we need to normalise lines by stripping - // whitespace before checking equality. (This has an annoying interaction - // with newlineIsToken that requires special handling: if newlines get their - // own token, then we DON'T want to trim the *newline* tokens down to empty - // strings, since this would cause us to treat whitespace-only line content - // as equal to a separator between lines, which would be weird and - // inconsistent with the documented behavior of the options.) - if (options.ignoreWhitespace) { - if (!options.newlineIsToken || !left.includes('\n')) { - left = left.trim(); - } - if (!options.newlineIsToken || !right.includes('\n')) { - right = right.trim(); - } - } else if (options.ignoreNewlineAtEof && !options.newlineIsToken) { - if (left.endsWith('\n')) { - left = left.slice(0, -1); - } - if (right.endsWith('\n')) { - right = right.slice(0, -1); - } - } - return ( - /*istanbul ignore start*/ - _base - /*istanbul ignore end*/ - [ - /*istanbul ignore start*/ - "default" - /*istanbul ignore end*/ - ].prototype.equals.call(this, left, right, options) - ); -}; -function diffLines(oldStr, newStr, callback) { - return lineDiff.diff(oldStr, newStr, callback); -} - -// Kept for backwards compatibility. This is a rather arbitrary wrapper method -// that just calls `diffLines` with `ignoreWhitespace: true`. It's confusing to -// have two ways to do exactly the same thing in the API, so we no longer -// document this one (library users should explicitly use `diffLines` with -// `ignoreWhitespace: true` instead) but we keep it around to maintain -// compatibility with code that used old versions. -function diffTrimmedLines(oldStr, newStr, callback) { - var options = - /*istanbul ignore start*/ - (0, - /*istanbul ignore end*/ - /*istanbul ignore start*/ - _params - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - generateOptions) - /*istanbul ignore end*/ - (callback, { - ignoreWhitespace: true - }); - return lineDiff.diff(oldStr, newStr, options); -} -//# sourceMappingURL=data:application/json;charset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FBSSxDQUFDSCxNQUFNLEVBQUVDLE1BQU0sRUFBRXpCLE9BQU8sQ0FBQztBQUMvQyIsImlnbm9yZUxpc3QiOltdfQ== diff --git a/node_modules/mocha/node_modules/diff/lib/diff/sentence.js b/node_modules/mocha/node_modules/diff/lib/diff/sentence.js deleted file mode 100644 index 66d8ece2..00000000 --- a/node_modules/mocha/node_modules/diff/lib/diff/sentence.js +++ /dev/null @@ -1,36 +0,0 @@ -/*istanbul ignore start*/ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.diffSentences = diffSentences; -exports.sentenceDiff = void 0; -/*istanbul ignore end*/ -var -/*istanbul ignore start*/ -_base = _interopRequireDefault(require("./base")) -/*istanbul ignore end*/ -; -/*istanbul ignore start*/ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } -/*istanbul ignore end*/ -var sentenceDiff = -/*istanbul ignore start*/ -exports.sentenceDiff = -/*istanbul ignore end*/ -new -/*istanbul ignore start*/ -_base -/*istanbul ignore end*/ -[ -/*istanbul ignore start*/ -"default" -/*istanbul ignore end*/ -](); -sentenceDiff.tokenize = function (value) { - return value.split(/(\S.+?[.!?])(?=\s+|$)/); -}; -function diffSentences(oldStr, newStr, callback) { - return sentenceDiff.diff(oldStr, newStr, callback); -} -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfYmFzZSIsIl9pbnRlcm9wUmVxdWlyZURlZmF1bHQiLCJyZXF1aXJlIiwib2JqIiwiX19lc01vZHVsZSIsInNlbnRlbmNlRGlmZiIsImV4cG9ydHMiLCJEaWZmIiwidG9rZW5pemUiLCJ2YWx1ZSIsInNwbGl0IiwiZGlmZlNlbnRlbmNlcyIsIm9sZFN0ciIsIm5ld1N0ciIsImNhbGxiYWNrIiwiZGlmZiJdLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9kaWZmL3NlbnRlbmNlLmpzIl0sInNvdXJjZXNDb250ZW50Ijp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MsUUFBUSxDQUFDO0FBQUUiLCJpZ25vcmVMaXN0IjpbXX0= diff --git a/node_modules/mocha/node_modules/diff/lib/diff/word.js b/node_modules/mocha/node_modules/diff/lib/diff/word.js deleted file mode 100644 index 64919db4..00000000 --- a/node_modules/mocha/node_modules/diff/lib/diff/word.js +++ /dev/null @@ -1,543 +0,0 @@ -/*istanbul ignore start*/ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.diffWords = diffWords; -exports.diffWordsWithSpace = diffWordsWithSpace; -exports.wordWithSpaceDiff = exports.wordDiff = void 0; -/*istanbul ignore end*/ -var -/*istanbul ignore start*/ -_base = _interopRequireDefault(require("./base")) -/*istanbul ignore end*/ -; -var -/*istanbul ignore start*/ -_string = require("../util/string") -/*istanbul ignore end*/ -; -/*istanbul ignore start*/ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } -/*istanbul ignore end*/ -// Based on https://en.wikipedia.org/wiki/Latin_script_in_Unicode -// -// Ranges and exceptions: -// Latin-1 Supplement, 0080–00FF -// - U+00D7 × Multiplication sign -// - U+00F7 ÷ Division sign -// Latin Extended-A, 0100–017F -// Latin Extended-B, 0180–024F -// IPA Extensions, 0250–02AF -// Spacing Modifier Letters, 02B0–02FF -// - U+02C7 ˇ ˇ Caron -// - U+02D8 ˘ ˘ Breve -// - U+02D9 ˙ ˙ Dot Above -// - U+02DA ˚ ˚ Ring Above -// - U+02DB ˛ ˛ Ogonek -// - U+02DC ˜ ˜ Small Tilde -// - U+02DD ˝ ˝ Double Acute Accent -// Latin Extended Additional, 1E00–1EFF -var extendedWordChars = "a-zA-Z0-9_\\u{C0}-\\u{FF}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}"; - -// Each token is one of the following: -// - A punctuation mark plus the surrounding whitespace -// - A word plus the surrounding whitespace -// - Pure whitespace (but only in the special case where this the entire text -// is just whitespace) -// -// We have to include surrounding whitespace in the tokens because the two -// alternative approaches produce horribly broken results: -// * If we just discard the whitespace, we can't fully reproduce the original -// text from the sequence of tokens and any attempt to render the diff will -// get the whitespace wrong. -// * If we have separate tokens for whitespace, then in a typical text every -// second token will be a single space character. But this often results in -// the optimal diff between two texts being a perverse one that preserves -// the spaces between words but deletes and reinserts actual common words. -// See https://github.com/kpdecker/jsdiff/issues/160#issuecomment-1866099640 -// for an example. -// -// Keeping the surrounding whitespace of course has implications for .equals -// and .join, not just .tokenize. - -// This regex does NOT fully implement the tokenization rules described above. -// Instead, it gives runs of whitespace their own "token". The tokenize method -// then handles stitching whitespace tokens onto adjacent word or punctuation -// tokens. -var tokenizeIncludingWhitespace = new RegExp( -/*istanbul ignore start*/ -"[".concat( -/*istanbul ignore end*/ -extendedWordChars, "]+|\\s+|[^").concat(extendedWordChars, "]"), 'ug'); -var wordDiff = -/*istanbul ignore start*/ -exports.wordDiff = -/*istanbul ignore end*/ -new -/*istanbul ignore start*/ -_base -/*istanbul ignore end*/ -[ -/*istanbul ignore start*/ -"default" -/*istanbul ignore end*/ -](); -wordDiff.equals = function (left, right, options) { - if (options.ignoreCase) { - left = left.toLowerCase(); - right = right.toLowerCase(); - } - return left.trim() === right.trim(); -}; -wordDiff.tokenize = function (value) { - /*istanbul ignore start*/ - var - /*istanbul ignore end*/ - options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - var parts; - if (options.intlSegmenter) { - if (options.intlSegmenter.resolvedOptions().granularity != 'word') { - throw new Error('The segmenter passed must have a granularity of "word"'); - } - parts = Array.from(options.intlSegmenter.segment(value), function (segment) - /*istanbul ignore start*/ - { - return ( - /*istanbul ignore end*/ - segment.segment - ); - }); - } else { - parts = value.match(tokenizeIncludingWhitespace) || []; - } - var tokens = []; - var prevPart = null; - parts.forEach(function (part) { - if (/\s/.test(part)) { - if (prevPart == null) { - tokens.push(part); - } else { - tokens.push(tokens.pop() + part); - } - } else if (/\s/.test(prevPart)) { - if (tokens[tokens.length - 1] == prevPart) { - tokens.push(tokens.pop() + part); - } else { - tokens.push(prevPart + part); - } - } else { - tokens.push(part); - } - prevPart = part; - }); - return tokens; -}; -wordDiff.join = function (tokens) { - // Tokens being joined here will always have appeared consecutively in the - // same text, so we can simply strip off the leading whitespace from all the - // tokens except the first (and except any whitespace-only tokens - but such - // a token will always be the first and only token anyway) and then join them - // and the whitespace around words and punctuation will end up correct. - return tokens.map(function (token, i) { - if (i == 0) { - return token; - } else { - return token.replace(/^\s+/, ''); - } - }).join(''); -}; -wordDiff.postProcess = function (changes, options) { - if (!changes || options.oneChangePerToken) { - return changes; - } - var lastKeep = null; - // Change objects representing any insertion or deletion since the last - // "keep" change object. There can be at most one of each. - var insertion = null; - var deletion = null; - changes.forEach(function (change) { - if (change.added) { - insertion = change; - } else if (change.removed) { - deletion = change; - } else { - if (insertion || deletion) { - // May be false at start of text - dedupeWhitespaceInChangeObjects(lastKeep, deletion, insertion, change); - } - lastKeep = change; - insertion = null; - deletion = null; - } - }); - if (insertion || deletion) { - dedupeWhitespaceInChangeObjects(lastKeep, deletion, insertion, null); - } - return changes; -}; -function diffWords(oldStr, newStr, options) { - // This option has never been documented and never will be (it's clearer to - // just call `diffWordsWithSpace` directly if you need that behavior), but - // has existed in jsdiff for a long time, so we retain support for it here - // for the sake of backwards compatibility. - if ( - /*istanbul ignore start*/ - ( - /*istanbul ignore end*/ - options === null || options === void 0 ? void 0 : options.ignoreWhitespace) != null && !options.ignoreWhitespace) { - return diffWordsWithSpace(oldStr, newStr, options); - } - return wordDiff.diff(oldStr, newStr, options); -} -function dedupeWhitespaceInChangeObjects(startKeep, deletion, insertion, endKeep) { - // Before returning, we tidy up the leading and trailing whitespace of the - // change objects to eliminate cases where trailing whitespace in one object - // is repeated as leading whitespace in the next. - // Below are examples of the outcomes we want here to explain the code. - // I=insert, K=keep, D=delete - // 1. diffing 'foo bar baz' vs 'foo baz' - // Prior to cleanup, we have K:'foo ' D:' bar ' K:' baz' - // After cleanup, we want: K:'foo ' D:'bar ' K:'baz' - // - // 2. Diffing 'foo bar baz' vs 'foo qux baz' - // Prior to cleanup, we have K:'foo ' D:' bar ' I:' qux ' K:' baz' - // After cleanup, we want K:'foo ' D:'bar' I:'qux' K:' baz' - // - // 3. Diffing 'foo\nbar baz' vs 'foo baz' - // Prior to cleanup, we have K:'foo ' D:'\nbar ' K:' baz' - // After cleanup, we want K'foo' D:'\nbar' K:' baz' - // - // 4. Diffing 'foo baz' vs 'foo\nbar baz' - // Prior to cleanup, we have K:'foo\n' I:'\nbar ' K:' baz' - // After cleanup, we ideally want K'foo' I:'\nbar' K:' baz' - // but don't actually manage this currently (the pre-cleanup change - // objects don't contain enough information to make it possible). - // - // 5. Diffing 'foo bar baz' vs 'foo baz' - // Prior to cleanup, we have K:'foo ' D:' bar ' K:' baz' - // After cleanup, we want K:'foo ' D:' bar ' K:'baz' - // - // Our handling is unavoidably imperfect in the case where there's a single - // indel between keeps and the whitespace has changed. For instance, consider - // diffing 'foo\tbar\nbaz' vs 'foo baz'. Unless we create an extra change - // object to represent the insertion of the space character (which isn't even - // a token), we have no way to avoid losing information about the texts' - // original whitespace in the result we return. Still, we do our best to - // output something that will look sensible if we e.g. print it with - // insertions in green and deletions in red. - - // Between two "keep" change objects (or before the first or after the last - // change object), we can have either: - // * A "delete" followed by an "insert" - // * Just an "insert" - // * Just a "delete" - // We handle the three cases separately. - if (deletion && insertion) { - var oldWsPrefix = deletion.value.match(/^\s*/)[0]; - var oldWsSuffix = deletion.value.match(/\s*$/)[0]; - var newWsPrefix = insertion.value.match(/^\s*/)[0]; - var newWsSuffix = insertion.value.match(/\s*$/)[0]; - if (startKeep) { - var commonWsPrefix = - /*istanbul ignore start*/ - (0, - /*istanbul ignore end*/ - /*istanbul ignore start*/ - _string - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - longestCommonPrefix) - /*istanbul ignore end*/ - (oldWsPrefix, newWsPrefix); - startKeep.value = - /*istanbul ignore start*/ - (0, - /*istanbul ignore end*/ - /*istanbul ignore start*/ - _string - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - replaceSuffix) - /*istanbul ignore end*/ - (startKeep.value, newWsPrefix, commonWsPrefix); - deletion.value = - /*istanbul ignore start*/ - (0, - /*istanbul ignore end*/ - /*istanbul ignore start*/ - _string - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - removePrefix) - /*istanbul ignore end*/ - (deletion.value, commonWsPrefix); - insertion.value = - /*istanbul ignore start*/ - (0, - /*istanbul ignore end*/ - /*istanbul ignore start*/ - _string - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - removePrefix) - /*istanbul ignore end*/ - (insertion.value, commonWsPrefix); - } - if (endKeep) { - var commonWsSuffix = - /*istanbul ignore start*/ - (0, - /*istanbul ignore end*/ - /*istanbul ignore start*/ - _string - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - longestCommonSuffix) - /*istanbul ignore end*/ - (oldWsSuffix, newWsSuffix); - endKeep.value = - /*istanbul ignore start*/ - (0, - /*istanbul ignore end*/ - /*istanbul ignore start*/ - _string - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - replacePrefix) - /*istanbul ignore end*/ - (endKeep.value, newWsSuffix, commonWsSuffix); - deletion.value = - /*istanbul ignore start*/ - (0, - /*istanbul ignore end*/ - /*istanbul ignore start*/ - _string - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - removeSuffix) - /*istanbul ignore end*/ - (deletion.value, commonWsSuffix); - insertion.value = - /*istanbul ignore start*/ - (0, - /*istanbul ignore end*/ - /*istanbul ignore start*/ - _string - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - removeSuffix) - /*istanbul ignore end*/ - (insertion.value, commonWsSuffix); - } - } else if (insertion) { - // The whitespaces all reflect what was in the new text rather than - // the old, so we essentially have no information about whitespace - // insertion or deletion. We just want to dedupe the whitespace. - // We do that by having each change object keep its trailing - // whitespace and deleting duplicate leading whitespace where - // present. - if (startKeep) { - insertion.value = insertion.value.replace(/^\s*/, ''); - } - if (endKeep) { - endKeep.value = endKeep.value.replace(/^\s*/, ''); - } - // otherwise we've got a deletion and no insertion - } else if (startKeep && endKeep) { - var newWsFull = endKeep.value.match(/^\s*/)[0], - delWsStart = deletion.value.match(/^\s*/)[0], - delWsEnd = deletion.value.match(/\s*$/)[0]; - - // Any whitespace that comes straight after startKeep in both the old and - // new texts, assign to startKeep and remove from the deletion. - var newWsStart = - /*istanbul ignore start*/ - (0, - /*istanbul ignore end*/ - /*istanbul ignore start*/ - _string - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - longestCommonPrefix) - /*istanbul ignore end*/ - (newWsFull, delWsStart); - deletion.value = - /*istanbul ignore start*/ - (0, - /*istanbul ignore end*/ - /*istanbul ignore start*/ - _string - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - removePrefix) - /*istanbul ignore end*/ - (deletion.value, newWsStart); - - // Any whitespace that comes straight before endKeep in both the old and - // new texts, and hasn't already been assigned to startKeep, assign to - // endKeep and remove from the deletion. - var newWsEnd = - /*istanbul ignore start*/ - (0, - /*istanbul ignore end*/ - /*istanbul ignore start*/ - _string - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - longestCommonSuffix) - /*istanbul ignore end*/ - ( - /*istanbul ignore start*/ - (0, - /*istanbul ignore end*/ - /*istanbul ignore start*/ - _string - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - removePrefix) - /*istanbul ignore end*/ - (newWsFull, newWsStart), delWsEnd); - deletion.value = - /*istanbul ignore start*/ - (0, - /*istanbul ignore end*/ - /*istanbul ignore start*/ - _string - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - removeSuffix) - /*istanbul ignore end*/ - (deletion.value, newWsEnd); - endKeep.value = - /*istanbul ignore start*/ - (0, - /*istanbul ignore end*/ - /*istanbul ignore start*/ - _string - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - replacePrefix) - /*istanbul ignore end*/ - (endKeep.value, newWsFull, newWsEnd); - - // If there's any whitespace from the new text that HASN'T already been - // assigned, assign it to the start: - startKeep.value = - /*istanbul ignore start*/ - (0, - /*istanbul ignore end*/ - /*istanbul ignore start*/ - _string - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - replaceSuffix) - /*istanbul ignore end*/ - (startKeep.value, newWsFull, newWsFull.slice(0, newWsFull.length - newWsEnd.length)); - } else if (endKeep) { - // We are at the start of the text. Preserve all the whitespace on - // endKeep, and just remove whitespace from the end of deletion to the - // extent that it overlaps with the start of endKeep. - var endKeepWsPrefix = endKeep.value.match(/^\s*/)[0]; - var deletionWsSuffix = deletion.value.match(/\s*$/)[0]; - var overlap = - /*istanbul ignore start*/ - (0, - /*istanbul ignore end*/ - /*istanbul ignore start*/ - _string - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - maximumOverlap) - /*istanbul ignore end*/ - (deletionWsSuffix, endKeepWsPrefix); - deletion.value = - /*istanbul ignore start*/ - (0, - /*istanbul ignore end*/ - /*istanbul ignore start*/ - _string - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - removeSuffix) - /*istanbul ignore end*/ - (deletion.value, overlap); - } else if (startKeep) { - // We are at the END of the text. Preserve all the whitespace on - // startKeep, and just remove whitespace from the start of deletion to - // the extent that it overlaps with the end of startKeep. - var startKeepWsSuffix = startKeep.value.match(/\s*$/)[0]; - var deletionWsPrefix = deletion.value.match(/^\s*/)[0]; - var _overlap = - /*istanbul ignore start*/ - (0, - /*istanbul ignore end*/ - /*istanbul ignore start*/ - _string - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - maximumOverlap) - /*istanbul ignore end*/ - (startKeepWsSuffix, deletionWsPrefix); - deletion.value = - /*istanbul ignore start*/ - (0, - /*istanbul ignore end*/ - /*istanbul ignore start*/ - _string - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - removePrefix) - /*istanbul ignore end*/ - (deletion.value, _overlap); - } -} -var wordWithSpaceDiff = -/*istanbul ignore start*/ -exports.wordWithSpaceDiff = -/*istanbul ignore end*/ -new -/*istanbul ignore start*/ -_base -/*istanbul ignore end*/ -[ -/*istanbul ignore start*/ -"default" -/*istanbul ignore end*/ -](); -wordWithSpaceDiff.tokenize = function (value) { - // Slightly different to the tokenizeIncludingWhitespace regex used above in - // that this one treats each individual newline as a distinct tokens, rather - // than merging them into other surrounding whitespace. This was requested - // in https://github.com/kpdecker/jsdiff/issues/180 & - // https://github.com/kpdecker/jsdiff/issues/211 - var regex = new RegExp( - /*istanbul ignore start*/ - "(\\r?\\n)|[".concat( - /*istanbul ignore end*/ - extendedWordChars, "]+|[^\\S\\n\\r]+|[^").concat(extendedWordChars, "]"), 'ug'); - return value.match(regex) || []; -}; -function diffWordsWithSpace(oldStr, newStr, options) { - return wordWithSpaceDiff.diff(oldStr, newStr, options); -} -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfYmFzZSIsIl9pbnRlcm9wUmVxdWlyZURlZmF1bHQiLCJyZXF1aXJlIiwiX3N0cmluZyIsIm9iaiIsIl9fZXNNb2R1bGUiLCJleHRlbmRlZFdvcmRDaGFycyIsInRva2VuaXplSW5jbHVkaW5nV2hpdGVzcGFjZSIsIlJlZ0V4cCIsImNvbmNhdCIsIndvcmREaWZmIiwiZXhwb3J0cyIsIkRpZmYiLCJlcXVhbHMiLCJsZWZ0IiwicmlnaHQiLCJvcHRpb25zIiwiaWdub3JlQ2FzZSIsInRvTG93ZXJDYXNlIiwidHJpbSIsInRva2VuaXplIiwidmFsdWUiLCJhcmd1bWVudHMiLCJsZW5ndGgiLCJ1bmRlZmluZWQiLCJwYXJ0cyIsImludGxTZWdtZW50ZXIiLCJyZXNvbHZlZE9wdGlvbnMiLCJncmFudWxhcml0eSIsIkVycm9yIiwiQXJyYXkiLCJmcm9tIiwic2VnbWVudCIsIm1hdGNoIiwidG9rZW5zIiwicHJldlBhcnQiLCJmb3JFYWNoIiwicGFydCIsInRlc3QiLCJwdXNoIiwicG9wIiwiam9pbiIsIm1hcCI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zFELE9BQU93RSxpQkFBaUIsQ0FBQzNCLElBQUksQ0FBQ0osTUFBTSxFQUFFQyxNQUFNLEVBQUUxQyxPQUFPLENBQUM7QUFDeEQiLCJpZ25vcmVMaXN0IjpbXX0= diff --git a/node_modules/mocha/node_modules/diff/lib/index.es6.js b/node_modules/mocha/node_modules/diff/lib/index.es6.js deleted file mode 100644 index 6e872723..00000000 --- a/node_modules/mocha/node_modules/diff/lib/index.es6.js +++ /dev/null @@ -1,2041 +0,0 @@ -function Diff() {} -Diff.prototype = { - diff: function diff(oldString, newString) { - var _options$timeout; - var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; - var callback = options.callback; - if (typeof options === 'function') { - callback = options; - options = {}; - } - var self = this; - function done(value) { - value = self.postProcess(value, options); - if (callback) { - setTimeout(function () { - callback(value); - }, 0); - return true; - } else { - return value; - } - } - - // Allow subclasses to massage the input prior to running - oldString = this.castInput(oldString, options); - newString = this.castInput(newString, options); - oldString = this.removeEmpty(this.tokenize(oldString, options)); - newString = this.removeEmpty(this.tokenize(newString, options)); - var newLen = newString.length, - oldLen = oldString.length; - var editLength = 1; - var maxEditLength = newLen + oldLen; - if (options.maxEditLength != null) { - maxEditLength = Math.min(maxEditLength, options.maxEditLength); - } - var maxExecutionTime = (_options$timeout = options.timeout) !== null && _options$timeout !== void 0 ? _options$timeout : Infinity; - var abortAfterTimestamp = Date.now() + maxExecutionTime; - var bestPath = [{ - oldPos: -1, - lastComponent: undefined - }]; - - // Seed editLength = 0, i.e. the content starts with the same values - var newPos = this.extractCommon(bestPath[0], newString, oldString, 0, options); - if (bestPath[0].oldPos + 1 >= oldLen && newPos + 1 >= newLen) { - // Identity per the equality and tokenizer - return done(buildValues(self, bestPath[0].lastComponent, newString, oldString, self.useLongestToken)); - } - - // Once we hit the right edge of the edit graph on some diagonal k, we can - // definitely reach the end of the edit graph in no more than k edits, so - // there's no point in considering any moves to diagonal k+1 any more (from - // which we're guaranteed to need at least k+1 more edits). - // Similarly, once we've reached the bottom of the edit graph, there's no - // point considering moves to lower diagonals. - // We record this fact by setting minDiagonalToConsider and - // maxDiagonalToConsider to some finite value once we've hit the edge of - // the edit graph. - // This optimization is not faithful to the original algorithm presented in - // Myers's paper, which instead pointlessly extends D-paths off the end of - // the edit graph - see page 7 of Myers's paper which notes this point - // explicitly and illustrates it with a diagram. This has major performance - // implications for some common scenarios. For instance, to compute a diff - // where the new text simply appends d characters on the end of the - // original text of length n, the true Myers algorithm will take O(n+d^2) - // time while this optimization needs only O(n+d) time. - var minDiagonalToConsider = -Infinity, - maxDiagonalToConsider = Infinity; - - // Main worker method. checks all permutations of a given edit length for acceptance. - function execEditLength() { - for (var diagonalPath = Math.max(minDiagonalToConsider, -editLength); diagonalPath <= Math.min(maxDiagonalToConsider, editLength); diagonalPath += 2) { - var basePath = void 0; - var removePath = bestPath[diagonalPath - 1], - addPath = bestPath[diagonalPath + 1]; - if (removePath) { - // No one else is going to attempt to use this value, clear it - bestPath[diagonalPath - 1] = undefined; - } - var canAdd = false; - if (addPath) { - // what newPos will be after we do an insertion: - var addPathNewPos = addPath.oldPos - diagonalPath; - canAdd = addPath && 0 <= addPathNewPos && addPathNewPos < newLen; - } - var canRemove = removePath && removePath.oldPos + 1 < oldLen; - if (!canAdd && !canRemove) { - // If this path is a terminal then prune - bestPath[diagonalPath] = undefined; - continue; - } - - // Select the diagonal that we want to branch from. We select the prior - // path whose position in the old string is the farthest from the origin - // and does not pass the bounds of the diff graph - if (!canRemove || canAdd && removePath.oldPos < addPath.oldPos) { - basePath = self.addToPath(addPath, true, false, 0, options); - } else { - basePath = self.addToPath(removePath, false, true, 1, options); - } - newPos = self.extractCommon(basePath, newString, oldString, diagonalPath, options); - if (basePath.oldPos + 1 >= oldLen && newPos + 1 >= newLen) { - // If we have hit the end of both strings, then we are done - return done(buildValues(self, basePath.lastComponent, newString, oldString, self.useLongestToken)); - } else { - bestPath[diagonalPath] = basePath; - if (basePath.oldPos + 1 >= oldLen) { - maxDiagonalToConsider = Math.min(maxDiagonalToConsider, diagonalPath - 1); - } - if (newPos + 1 >= newLen) { - minDiagonalToConsider = Math.max(minDiagonalToConsider, diagonalPath + 1); - } - } - } - editLength++; - } - - // Performs the length of edit iteration. Is a bit fugly as this has to support the - // sync and async mode which is never fun. Loops over execEditLength until a value - // is produced, or until the edit length exceeds options.maxEditLength (if given), - // in which case it will return undefined. - if (callback) { - (function exec() { - setTimeout(function () { - if (editLength > maxEditLength || Date.now() > abortAfterTimestamp) { - return callback(); - } - if (!execEditLength()) { - exec(); - } - }, 0); - })(); - } else { - while (editLength <= maxEditLength && Date.now() <= abortAfterTimestamp) { - var ret = execEditLength(); - if (ret) { - return ret; - } - } - } - }, - addToPath: function addToPath(path, added, removed, oldPosInc, options) { - var last = path.lastComponent; - if (last && !options.oneChangePerToken && last.added === added && last.removed === removed) { - return { - oldPos: path.oldPos + oldPosInc, - lastComponent: { - count: last.count + 1, - added: added, - removed: removed, - previousComponent: last.previousComponent - } - }; - } else { - return { - oldPos: path.oldPos + oldPosInc, - lastComponent: { - count: 1, - added: added, - removed: removed, - previousComponent: last - } - }; - } - }, - extractCommon: function extractCommon(basePath, newString, oldString, diagonalPath, options) { - var newLen = newString.length, - oldLen = oldString.length, - oldPos = basePath.oldPos, - newPos = oldPos - diagonalPath, - commonCount = 0; - while (newPos + 1 < newLen && oldPos + 1 < oldLen && this.equals(oldString[oldPos + 1], newString[newPos + 1], options)) { - newPos++; - oldPos++; - commonCount++; - if (options.oneChangePerToken) { - basePath.lastComponent = { - count: 1, - previousComponent: basePath.lastComponent, - added: false, - removed: false - }; - } - } - if (commonCount && !options.oneChangePerToken) { - basePath.lastComponent = { - count: commonCount, - previousComponent: basePath.lastComponent, - added: false, - removed: false - }; - } - basePath.oldPos = oldPos; - return newPos; - }, - equals: function equals(left, right, options) { - if (options.comparator) { - return options.comparator(left, right); - } else { - return left === right || options.ignoreCase && left.toLowerCase() === right.toLowerCase(); - } - }, - removeEmpty: function removeEmpty(array) { - var ret = []; - for (var i = 0; i < array.length; i++) { - if (array[i]) { - ret.push(array[i]); - } - } - return ret; - }, - castInput: function castInput(value) { - return value; - }, - tokenize: function tokenize(value) { - return Array.from(value); - }, - join: function join(chars) { - return chars.join(''); - }, - postProcess: function postProcess(changeObjects) { - return changeObjects; - } -}; -function buildValues(diff, lastComponent, newString, oldString, useLongestToken) { - // First we convert our linked list of components in reverse order to an - // array in the right order: - var components = []; - var nextComponent; - while (lastComponent) { - components.push(lastComponent); - nextComponent = lastComponent.previousComponent; - delete lastComponent.previousComponent; - lastComponent = nextComponent; - } - components.reverse(); - var componentPos = 0, - componentLen = components.length, - newPos = 0, - oldPos = 0; - for (; componentPos < componentLen; componentPos++) { - var component = components[componentPos]; - if (!component.removed) { - if (!component.added && useLongestToken) { - var value = newString.slice(newPos, newPos + component.count); - value = value.map(function (value, i) { - var oldValue = oldString[oldPos + i]; - return oldValue.length > value.length ? oldValue : value; - }); - component.value = diff.join(value); - } else { - component.value = diff.join(newString.slice(newPos, newPos + component.count)); - } - newPos += component.count; - - // Common case - if (!component.added) { - oldPos += component.count; - } - } else { - component.value = diff.join(oldString.slice(oldPos, oldPos + component.count)); - oldPos += component.count; - } - } - return components; -} - -var characterDiff = new Diff(); -function diffChars(oldStr, newStr, options) { - return characterDiff.diff(oldStr, newStr, options); -} - -function longestCommonPrefix(str1, str2) { - var i; - for (i = 0; i < str1.length && i < str2.length; i++) { - if (str1[i] != str2[i]) { - return str1.slice(0, i); - } - } - return str1.slice(0, i); -} -function longestCommonSuffix(str1, str2) { - var i; - - // Unlike longestCommonPrefix, we need a special case to handle all scenarios - // where we return the empty string since str1.slice(-0) will return the - // entire string. - if (!str1 || !str2 || str1[str1.length - 1] != str2[str2.length - 1]) { - return ''; - } - for (i = 0; i < str1.length && i < str2.length; i++) { - if (str1[str1.length - (i + 1)] != str2[str2.length - (i + 1)]) { - return str1.slice(-i); - } - } - return str1.slice(-i); -} -function replacePrefix(string, oldPrefix, newPrefix) { - if (string.slice(0, oldPrefix.length) != oldPrefix) { - throw Error("string ".concat(JSON.stringify(string), " doesn't start with prefix ").concat(JSON.stringify(oldPrefix), "; this is a bug")); - } - return newPrefix + string.slice(oldPrefix.length); -} -function replaceSuffix(string, oldSuffix, newSuffix) { - if (!oldSuffix) { - return string + newSuffix; - } - if (string.slice(-oldSuffix.length) != oldSuffix) { - throw Error("string ".concat(JSON.stringify(string), " doesn't end with suffix ").concat(JSON.stringify(oldSuffix), "; this is a bug")); - } - return string.slice(0, -oldSuffix.length) + newSuffix; -} -function removePrefix(string, oldPrefix) { - return replacePrefix(string, oldPrefix, ''); -} -function removeSuffix(string, oldSuffix) { - return replaceSuffix(string, oldSuffix, ''); -} -function maximumOverlap(string1, string2) { - return string2.slice(0, overlapCount(string1, string2)); -} - -// Nicked from https://stackoverflow.com/a/60422853/1709587 -function overlapCount(a, b) { - // Deal with cases where the strings differ in length - var startA = 0; - if (a.length > b.length) { - startA = a.length - b.length; - } - var endB = b.length; - if (a.length < b.length) { - endB = a.length; - } - // Create a back-reference for each index - // that should be followed in case of a mismatch. - // We only need B to make these references: - var map = Array(endB); - var k = 0; // Index that lags behind j - map[0] = 0; - for (var j = 1; j < endB; j++) { - if (b[j] == b[k]) { - map[j] = map[k]; // skip over the same character (optional optimisation) - } else { - map[j] = k; - } - while (k > 0 && b[j] != b[k]) { - k = map[k]; - } - if (b[j] == b[k]) { - k++; - } - } - // Phase 2: use these references while iterating over A - k = 0; - for (var i = startA; i < a.length; i++) { - while (k > 0 && a[i] != b[k]) { - k = map[k]; - } - if (a[i] == b[k]) { - k++; - } - } - return k; -} - -/** - * Returns true if the string consistently uses Windows line endings. - */ -function hasOnlyWinLineEndings(string) { - return string.includes('\r\n') && !string.startsWith('\n') && !string.match(/[^\r]\n/); -} - -/** - * Returns true if the string consistently uses Unix line endings. - */ -function hasOnlyUnixLineEndings(string) { - return !string.includes('\r\n') && string.includes('\n'); -} - -// Based on https://en.wikipedia.org/wiki/Latin_script_in_Unicode -// -// Ranges and exceptions: -// Latin-1 Supplement, 0080–00FF -// - U+00D7 × Multiplication sign -// - U+00F7 ÷ Division sign -// Latin Extended-A, 0100–017F -// Latin Extended-B, 0180–024F -// IPA Extensions, 0250–02AF -// Spacing Modifier Letters, 02B0–02FF -// - U+02C7 ˇ ˇ Caron -// - U+02D8 ˘ ˘ Breve -// - U+02D9 ˙ ˙ Dot Above -// - U+02DA ˚ ˚ Ring Above -// - U+02DB ˛ ˛ Ogonek -// - U+02DC ˜ ˜ Small Tilde -// - U+02DD ˝ ˝ Double Acute Accent -// Latin Extended Additional, 1E00–1EFF -var extendedWordChars = "a-zA-Z0-9_\\u{C0}-\\u{FF}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}"; - -// Each token is one of the following: -// - A punctuation mark plus the surrounding whitespace -// - A word plus the surrounding whitespace -// - Pure whitespace (but only in the special case where this the entire text -// is just whitespace) -// -// We have to include surrounding whitespace in the tokens because the two -// alternative approaches produce horribly broken results: -// * If we just discard the whitespace, we can't fully reproduce the original -// text from the sequence of tokens and any attempt to render the diff will -// get the whitespace wrong. -// * If we have separate tokens for whitespace, then in a typical text every -// second token will be a single space character. But this often results in -// the optimal diff between two texts being a perverse one that preserves -// the spaces between words but deletes and reinserts actual common words. -// See https://github.com/kpdecker/jsdiff/issues/160#issuecomment-1866099640 -// for an example. -// -// Keeping the surrounding whitespace of course has implications for .equals -// and .join, not just .tokenize. - -// This regex does NOT fully implement the tokenization rules described above. -// Instead, it gives runs of whitespace their own "token". The tokenize method -// then handles stitching whitespace tokens onto adjacent word or punctuation -// tokens. -var tokenizeIncludingWhitespace = new RegExp("[".concat(extendedWordChars, "]+|\\s+|[^").concat(extendedWordChars, "]"), 'ug'); -var wordDiff = new Diff(); -wordDiff.equals = function (left, right, options) { - if (options.ignoreCase) { - left = left.toLowerCase(); - right = right.toLowerCase(); - } - return left.trim() === right.trim(); -}; -wordDiff.tokenize = function (value) { - var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - var parts; - if (options.intlSegmenter) { - if (options.intlSegmenter.resolvedOptions().granularity != 'word') { - throw new Error('The segmenter passed must have a granularity of "word"'); - } - parts = Array.from(options.intlSegmenter.segment(value), function (segment) { - return segment.segment; - }); - } else { - parts = value.match(tokenizeIncludingWhitespace) || []; - } - var tokens = []; - var prevPart = null; - parts.forEach(function (part) { - if (/\s/.test(part)) { - if (prevPart == null) { - tokens.push(part); - } else { - tokens.push(tokens.pop() + part); - } - } else if (/\s/.test(prevPart)) { - if (tokens[tokens.length - 1] == prevPart) { - tokens.push(tokens.pop() + part); - } else { - tokens.push(prevPart + part); - } - } else { - tokens.push(part); - } - prevPart = part; - }); - return tokens; -}; -wordDiff.join = function (tokens) { - // Tokens being joined here will always have appeared consecutively in the - // same text, so we can simply strip off the leading whitespace from all the - // tokens except the first (and except any whitespace-only tokens - but such - // a token will always be the first and only token anyway) and then join them - // and the whitespace around words and punctuation will end up correct. - return tokens.map(function (token, i) { - if (i == 0) { - return token; - } else { - return token.replace(/^\s+/, ''); - } - }).join(''); -}; -wordDiff.postProcess = function (changes, options) { - if (!changes || options.oneChangePerToken) { - return changes; - } - var lastKeep = null; - // Change objects representing any insertion or deletion since the last - // "keep" change object. There can be at most one of each. - var insertion = null; - var deletion = null; - changes.forEach(function (change) { - if (change.added) { - insertion = change; - } else if (change.removed) { - deletion = change; - } else { - if (insertion || deletion) { - // May be false at start of text - dedupeWhitespaceInChangeObjects(lastKeep, deletion, insertion, change); - } - lastKeep = change; - insertion = null; - deletion = null; - } - }); - if (insertion || deletion) { - dedupeWhitespaceInChangeObjects(lastKeep, deletion, insertion, null); - } - return changes; -}; -function diffWords(oldStr, newStr, options) { - // This option has never been documented and never will be (it's clearer to - // just call `diffWordsWithSpace` directly if you need that behavior), but - // has existed in jsdiff for a long time, so we retain support for it here - // for the sake of backwards compatibility. - if ((options === null || options === void 0 ? void 0 : options.ignoreWhitespace) != null && !options.ignoreWhitespace) { - return diffWordsWithSpace(oldStr, newStr, options); - } - return wordDiff.diff(oldStr, newStr, options); -} -function dedupeWhitespaceInChangeObjects(startKeep, deletion, insertion, endKeep) { - // Before returning, we tidy up the leading and trailing whitespace of the - // change objects to eliminate cases where trailing whitespace in one object - // is repeated as leading whitespace in the next. - // Below are examples of the outcomes we want here to explain the code. - // I=insert, K=keep, D=delete - // 1. diffing 'foo bar baz' vs 'foo baz' - // Prior to cleanup, we have K:'foo ' D:' bar ' K:' baz' - // After cleanup, we want: K:'foo ' D:'bar ' K:'baz' - // - // 2. Diffing 'foo bar baz' vs 'foo qux baz' - // Prior to cleanup, we have K:'foo ' D:' bar ' I:' qux ' K:' baz' - // After cleanup, we want K:'foo ' D:'bar' I:'qux' K:' baz' - // - // 3. Diffing 'foo\nbar baz' vs 'foo baz' - // Prior to cleanup, we have K:'foo ' D:'\nbar ' K:' baz' - // After cleanup, we want K'foo' D:'\nbar' K:' baz' - // - // 4. Diffing 'foo baz' vs 'foo\nbar baz' - // Prior to cleanup, we have K:'foo\n' I:'\nbar ' K:' baz' - // After cleanup, we ideally want K'foo' I:'\nbar' K:' baz' - // but don't actually manage this currently (the pre-cleanup change - // objects don't contain enough information to make it possible). - // - // 5. Diffing 'foo bar baz' vs 'foo baz' - // Prior to cleanup, we have K:'foo ' D:' bar ' K:' baz' - // After cleanup, we want K:'foo ' D:' bar ' K:'baz' - // - // Our handling is unavoidably imperfect in the case where there's a single - // indel between keeps and the whitespace has changed. For instance, consider - // diffing 'foo\tbar\nbaz' vs 'foo baz'. Unless we create an extra change - // object to represent the insertion of the space character (which isn't even - // a token), we have no way to avoid losing information about the texts' - // original whitespace in the result we return. Still, we do our best to - // output something that will look sensible if we e.g. print it with - // insertions in green and deletions in red. - - // Between two "keep" change objects (or before the first or after the last - // change object), we can have either: - // * A "delete" followed by an "insert" - // * Just an "insert" - // * Just a "delete" - // We handle the three cases separately. - if (deletion && insertion) { - var oldWsPrefix = deletion.value.match(/^\s*/)[0]; - var oldWsSuffix = deletion.value.match(/\s*$/)[0]; - var newWsPrefix = insertion.value.match(/^\s*/)[0]; - var newWsSuffix = insertion.value.match(/\s*$/)[0]; - if (startKeep) { - var commonWsPrefix = longestCommonPrefix(oldWsPrefix, newWsPrefix); - startKeep.value = replaceSuffix(startKeep.value, newWsPrefix, commonWsPrefix); - deletion.value = removePrefix(deletion.value, commonWsPrefix); - insertion.value = removePrefix(insertion.value, commonWsPrefix); - } - if (endKeep) { - var commonWsSuffix = longestCommonSuffix(oldWsSuffix, newWsSuffix); - endKeep.value = replacePrefix(endKeep.value, newWsSuffix, commonWsSuffix); - deletion.value = removeSuffix(deletion.value, commonWsSuffix); - insertion.value = removeSuffix(insertion.value, commonWsSuffix); - } - } else if (insertion) { - // The whitespaces all reflect what was in the new text rather than - // the old, so we essentially have no information about whitespace - // insertion or deletion. We just want to dedupe the whitespace. - // We do that by having each change object keep its trailing - // whitespace and deleting duplicate leading whitespace where - // present. - if (startKeep) { - insertion.value = insertion.value.replace(/^\s*/, ''); - } - if (endKeep) { - endKeep.value = endKeep.value.replace(/^\s*/, ''); - } - // otherwise we've got a deletion and no insertion - } else if (startKeep && endKeep) { - var newWsFull = endKeep.value.match(/^\s*/)[0], - delWsStart = deletion.value.match(/^\s*/)[0], - delWsEnd = deletion.value.match(/\s*$/)[0]; - - // Any whitespace that comes straight after startKeep in both the old and - // new texts, assign to startKeep and remove from the deletion. - var newWsStart = longestCommonPrefix(newWsFull, delWsStart); - deletion.value = removePrefix(deletion.value, newWsStart); - - // Any whitespace that comes straight before endKeep in both the old and - // new texts, and hasn't already been assigned to startKeep, assign to - // endKeep and remove from the deletion. - var newWsEnd = longestCommonSuffix(removePrefix(newWsFull, newWsStart), delWsEnd); - deletion.value = removeSuffix(deletion.value, newWsEnd); - endKeep.value = replacePrefix(endKeep.value, newWsFull, newWsEnd); - - // If there's any whitespace from the new text that HASN'T already been - // assigned, assign it to the start: - startKeep.value = replaceSuffix(startKeep.value, newWsFull, newWsFull.slice(0, newWsFull.length - newWsEnd.length)); - } else if (endKeep) { - // We are at the start of the text. Preserve all the whitespace on - // endKeep, and just remove whitespace from the end of deletion to the - // extent that it overlaps with the start of endKeep. - var endKeepWsPrefix = endKeep.value.match(/^\s*/)[0]; - var deletionWsSuffix = deletion.value.match(/\s*$/)[0]; - var overlap = maximumOverlap(deletionWsSuffix, endKeepWsPrefix); - deletion.value = removeSuffix(deletion.value, overlap); - } else if (startKeep) { - // We are at the END of the text. Preserve all the whitespace on - // startKeep, and just remove whitespace from the start of deletion to - // the extent that it overlaps with the end of startKeep. - var startKeepWsSuffix = startKeep.value.match(/\s*$/)[0]; - var deletionWsPrefix = deletion.value.match(/^\s*/)[0]; - var _overlap = maximumOverlap(startKeepWsSuffix, deletionWsPrefix); - deletion.value = removePrefix(deletion.value, _overlap); - } -} -var wordWithSpaceDiff = new Diff(); -wordWithSpaceDiff.tokenize = function (value) { - // Slightly different to the tokenizeIncludingWhitespace regex used above in - // that this one treats each individual newline as a distinct tokens, rather - // than merging them into other surrounding whitespace. This was requested - // in https://github.com/kpdecker/jsdiff/issues/180 & - // https://github.com/kpdecker/jsdiff/issues/211 - var regex = new RegExp("(\\r?\\n)|[".concat(extendedWordChars, "]+|[^\\S\\n\\r]+|[^").concat(extendedWordChars, "]"), 'ug'); - return value.match(regex) || []; -}; -function diffWordsWithSpace(oldStr, newStr, options) { - return wordWithSpaceDiff.diff(oldStr, newStr, options); -} - -function generateOptions(options, defaults) { - if (typeof options === 'function') { - defaults.callback = options; - } else if (options) { - for (var name in options) { - /* istanbul ignore else */ - if (options.hasOwnProperty(name)) { - defaults[name] = options[name]; - } - } - } - return defaults; -} - -var lineDiff = new Diff(); -lineDiff.tokenize = function (value, options) { - if (options.stripTrailingCr) { - // remove one \r before \n to match GNU diff's --strip-trailing-cr behavior - value = value.replace(/\r\n/g, '\n'); - } - var retLines = [], - linesAndNewlines = value.split(/(\n|\r\n)/); - - // Ignore the final empty token that occurs if the string ends with a new line - if (!linesAndNewlines[linesAndNewlines.length - 1]) { - linesAndNewlines.pop(); - } - - // Merge the content and line separators into single tokens - for (var i = 0; i < linesAndNewlines.length; i++) { - var line = linesAndNewlines[i]; - if (i % 2 && !options.newlineIsToken) { - retLines[retLines.length - 1] += line; - } else { - retLines.push(line); - } - } - return retLines; -}; -lineDiff.equals = function (left, right, options) { - // If we're ignoring whitespace, we need to normalise lines by stripping - // whitespace before checking equality. (This has an annoying interaction - // with newlineIsToken that requires special handling: if newlines get their - // own token, then we DON'T want to trim the *newline* tokens down to empty - // strings, since this would cause us to treat whitespace-only line content - // as equal to a separator between lines, which would be weird and - // inconsistent with the documented behavior of the options.) - if (options.ignoreWhitespace) { - if (!options.newlineIsToken || !left.includes('\n')) { - left = left.trim(); - } - if (!options.newlineIsToken || !right.includes('\n')) { - right = right.trim(); - } - } else if (options.ignoreNewlineAtEof && !options.newlineIsToken) { - if (left.endsWith('\n')) { - left = left.slice(0, -1); - } - if (right.endsWith('\n')) { - right = right.slice(0, -1); - } - } - return Diff.prototype.equals.call(this, left, right, options); -}; -function diffLines(oldStr, newStr, callback) { - return lineDiff.diff(oldStr, newStr, callback); -} - -// Kept for backwards compatibility. This is a rather arbitrary wrapper method -// that just calls `diffLines` with `ignoreWhitespace: true`. It's confusing to -// have two ways to do exactly the same thing in the API, so we no longer -// document this one (library users should explicitly use `diffLines` with -// `ignoreWhitespace: true` instead) but we keep it around to maintain -// compatibility with code that used old versions. -function diffTrimmedLines(oldStr, newStr, callback) { - var options = generateOptions(callback, { - ignoreWhitespace: true - }); - return lineDiff.diff(oldStr, newStr, options); -} - -var sentenceDiff = new Diff(); -sentenceDiff.tokenize = function (value) { - return value.split(/(\S.+?[.!?])(?=\s+|$)/); -}; -function diffSentences(oldStr, newStr, callback) { - return sentenceDiff.diff(oldStr, newStr, callback); -} - -var cssDiff = new Diff(); -cssDiff.tokenize = function (value) { - return value.split(/([{}:;,]|\s+)/); -}; -function diffCss(oldStr, newStr, callback) { - return cssDiff.diff(oldStr, newStr, callback); -} - -function ownKeys(e, r) { - var t = Object.keys(e); - if (Object.getOwnPropertySymbols) { - var o = Object.getOwnPropertySymbols(e); - r && (o = o.filter(function (r) { - return Object.getOwnPropertyDescriptor(e, r).enumerable; - })), t.push.apply(t, o); - } - return t; -} -function _objectSpread2(e) { - for (var r = 1; r < arguments.length; r++) { - var t = null != arguments[r] ? arguments[r] : {}; - r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { - _defineProperty(e, r, t[r]); - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { - Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); - }); - } - return e; -} -function _toPrimitive(t, r) { - if ("object" != typeof t || !t) return t; - var e = t[Symbol.toPrimitive]; - if (void 0 !== e) { - var i = e.call(t, r || "default"); - if ("object" != typeof i) return i; - throw new TypeError("@@toPrimitive must return a primitive value."); - } - return ("string" === r ? String : Number)(t); -} -function _toPropertyKey(t) { - var i = _toPrimitive(t, "string"); - return "symbol" == typeof i ? i : i + ""; -} -function _typeof(o) { - "@babel/helpers - typeof"; - - return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { - return typeof o; - } : function (o) { - return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; - }, _typeof(o); -} -function _defineProperty(obj, key, value) { - key = _toPropertyKey(key); - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} -function _toConsumableArray(arr) { - return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); -} -function _arrayWithoutHoles(arr) { - if (Array.isArray(arr)) return _arrayLikeToArray(arr); -} -function _iterableToArray(iter) { - 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); - var n = Object.prototype.toString.call(o).slice(8, -1); - if (n === "Object" && o.constructor) n = o.constructor.name; - 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."); -} - -var jsonDiff = new Diff(); -// Discriminate between two lines of pretty-printed, serialized JSON where one of them has a -// dangling comma and the other doesn't. Turns out including the dangling comma yields the nicest output: -jsonDiff.useLongestToken = true; -jsonDiff.tokenize = lineDiff.tokenize; -jsonDiff.castInput = function (value, options) { - var undefinedReplacement = options.undefinedReplacement, - _options$stringifyRep = options.stringifyReplacer, - stringifyReplacer = _options$stringifyRep === void 0 ? function (k, v) { - return typeof v === 'undefined' ? undefinedReplacement : v; - } : _options$stringifyRep; - return typeof value === 'string' ? value : JSON.stringify(canonicalize(value, null, null, stringifyReplacer), stringifyReplacer, ' '); -}; -jsonDiff.equals = function (left, right, options) { - return Diff.prototype.equals.call(jsonDiff, left.replace(/,([\r\n])/g, '$1'), right.replace(/,([\r\n])/g, '$1'), options); -}; -function diffJson(oldObj, newObj, options) { - return jsonDiff.diff(oldObj, newObj, options); -} - -// This function handles the presence of circular references by bailing out when encountering an -// object that is already on the "stack" of items being processed. Accepts an optional replacer -function canonicalize(obj, stack, replacementStack, replacer, key) { - stack = stack || []; - replacementStack = replacementStack || []; - if (replacer) { - obj = replacer(key, obj); - } - var i; - for (i = 0; i < stack.length; i += 1) { - if (stack[i] === obj) { - return replacementStack[i]; - } - } - var canonicalizedObj; - if ('[object Array]' === Object.prototype.toString.call(obj)) { - stack.push(obj); - canonicalizedObj = new Array(obj.length); - replacementStack.push(canonicalizedObj); - for (i = 0; i < obj.length; i += 1) { - canonicalizedObj[i] = canonicalize(obj[i], stack, replacementStack, replacer, key); - } - stack.pop(); - replacementStack.pop(); - return canonicalizedObj; - } - if (obj && obj.toJSON) { - obj = obj.toJSON(); - } - if (_typeof(obj) === 'object' && obj !== null) { - stack.push(obj); - canonicalizedObj = {}; - replacementStack.push(canonicalizedObj); - var sortedKeys = [], - _key; - for (_key in obj) { - /* istanbul ignore else */ - if (Object.prototype.hasOwnProperty.call(obj, _key)) { - sortedKeys.push(_key); - } - } - sortedKeys.sort(); - for (i = 0; i < sortedKeys.length; i += 1) { - _key = sortedKeys[i]; - canonicalizedObj[_key] = canonicalize(obj[_key], stack, replacementStack, replacer, _key); - } - stack.pop(); - replacementStack.pop(); - } else { - canonicalizedObj = obj; - } - return canonicalizedObj; -} - -var arrayDiff = new Diff(); -arrayDiff.tokenize = function (value) { - return value.slice(); -}; -arrayDiff.join = arrayDiff.removeEmpty = function (value) { - return value; -}; -function diffArrays(oldArr, newArr, callback) { - return arrayDiff.diff(oldArr, newArr, callback); -} - -function unixToWin(patch) { - if (Array.isArray(patch)) { - return patch.map(unixToWin); - } - return _objectSpread2(_objectSpread2({}, patch), {}, { - hunks: patch.hunks.map(function (hunk) { - return _objectSpread2(_objectSpread2({}, hunk), {}, { - lines: hunk.lines.map(function (line, i) { - var _hunk$lines; - return line.startsWith('\\') || line.endsWith('\r') || (_hunk$lines = hunk.lines[i + 1]) !== null && _hunk$lines !== void 0 && _hunk$lines.startsWith('\\') ? line : line + '\r'; - }) - }); - }) - }); -} -function winToUnix(patch) { - if (Array.isArray(patch)) { - return patch.map(winToUnix); - } - return _objectSpread2(_objectSpread2({}, patch), {}, { - hunks: patch.hunks.map(function (hunk) { - return _objectSpread2(_objectSpread2({}, hunk), {}, { - lines: hunk.lines.map(function (line) { - return line.endsWith('\r') ? line.substring(0, line.length - 1) : line; - }) - }); - }) - }); -} - -/** - * Returns true if the patch consistently uses Unix line endings (or only involves one line and has - * no line endings). - */ -function isUnix(patch) { - if (!Array.isArray(patch)) { - patch = [patch]; - } - return !patch.some(function (index) { - return index.hunks.some(function (hunk) { - return hunk.lines.some(function (line) { - return !line.startsWith('\\') && line.endsWith('\r'); - }); - }); - }); -} - -/** - * Returns true if the patch uses Windows line endings and only Windows line endings. - */ -function isWin(patch) { - if (!Array.isArray(patch)) { - patch = [patch]; - } - return patch.some(function (index) { - return index.hunks.some(function (hunk) { - return hunk.lines.some(function (line) { - return line.endsWith('\r'); - }); - }); - }) && patch.every(function (index) { - return index.hunks.every(function (hunk) { - return hunk.lines.every(function (line, i) { - var _hunk$lines2; - return line.startsWith('\\') || line.endsWith('\r') || ((_hunk$lines2 = hunk.lines[i + 1]) === null || _hunk$lines2 === void 0 ? void 0 : _hunk$lines2.startsWith('\\')); - }); - }); - }); -} - -function parsePatch(uniDiff) { - var diffstr = uniDiff.split(/\n/), - list = [], - i = 0; - function parseIndex() { - var index = {}; - list.push(index); - - // Parse diff metadata - while (i < diffstr.length) { - var line = diffstr[i]; - - // File header found, end parsing diff metadata - if (/^(\-\-\-|\+\+\+|@@)\s/.test(line)) { - break; - } - - // Diff index - var header = /^(?:Index:|diff(?: -r \w+)+)\s+(.+?)\s*$/.exec(line); - if (header) { - index.index = header[1]; - } - i++; - } - - // Parse file headers if they are defined. Unified diff requires them, but - // there's no technical issues to have an isolated hunk without file header - parseFileHeader(index); - parseFileHeader(index); - - // Parse hunks - index.hunks = []; - while (i < diffstr.length) { - var _line = diffstr[i]; - if (/^(Index:\s|diff\s|\-\-\-\s|\+\+\+\s|===================================================================)/.test(_line)) { - break; - } else if (/^@@/.test(_line)) { - index.hunks.push(parseHunk()); - } else if (_line) { - throw new Error('Unknown line ' + (i + 1) + ' ' + JSON.stringify(_line)); - } else { - i++; - } - } - } - - // Parses the --- and +++ headers, if none are found, no lines - // are consumed. - function parseFileHeader(index) { - var fileHeader = /^(---|\+\+\+)\s+(.*)\r?$/.exec(diffstr[i]); - if (fileHeader) { - var keyPrefix = fileHeader[1] === '---' ? 'old' : 'new'; - var data = fileHeader[2].split('\t', 2); - var fileName = data[0].replace(/\\\\/g, '\\'); - if (/^".*"$/.test(fileName)) { - fileName = fileName.substr(1, fileName.length - 2); - } - index[keyPrefix + 'FileName'] = fileName; - index[keyPrefix + 'Header'] = (data[1] || '').trim(); - i++; - } - } - - // Parses a hunk - // This assumes that we are at the start of a hunk. - function parseHunk() { - var chunkHeaderIndex = i, - chunkHeaderLine = diffstr[i++], - chunkHeader = chunkHeaderLine.split(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/); - var hunk = { - oldStart: +chunkHeader[1], - oldLines: typeof chunkHeader[2] === 'undefined' ? 1 : +chunkHeader[2], - newStart: +chunkHeader[3], - newLines: typeof chunkHeader[4] === 'undefined' ? 1 : +chunkHeader[4], - lines: [] - }; - - // Unified Diff Format quirk: If the chunk size is 0, - // the first number is one lower than one would expect. - // https://www.artima.com/weblogs/viewpost.jsp?thread=164293 - if (hunk.oldLines === 0) { - hunk.oldStart += 1; - } - if (hunk.newLines === 0) { - hunk.newStart += 1; - } - var addCount = 0, - removeCount = 0; - for (; i < diffstr.length && (removeCount < hunk.oldLines || addCount < hunk.newLines || (_diffstr$i = diffstr[i]) !== null && _diffstr$i !== void 0 && _diffstr$i.startsWith('\\')); i++) { - var _diffstr$i; - var operation = diffstr[i].length == 0 && i != diffstr.length - 1 ? ' ' : diffstr[i][0]; - if (operation === '+' || operation === '-' || operation === ' ' || operation === '\\') { - hunk.lines.push(diffstr[i]); - if (operation === '+') { - addCount++; - } else if (operation === '-') { - removeCount++; - } else if (operation === ' ') { - addCount++; - removeCount++; - } - } else { - throw new Error("Hunk at line ".concat(chunkHeaderIndex + 1, " contained invalid line ").concat(diffstr[i])); - } - } - - // Handle the empty block count case - if (!addCount && hunk.newLines === 1) { - hunk.newLines = 0; - } - if (!removeCount && hunk.oldLines === 1) { - hunk.oldLines = 0; - } - - // Perform sanity checking - if (addCount !== hunk.newLines) { - throw new Error('Added line count did not match for hunk at line ' + (chunkHeaderIndex + 1)); - } - if (removeCount !== hunk.oldLines) { - throw new Error('Removed line count did not match for hunk at line ' + (chunkHeaderIndex + 1)); - } - return hunk; - } - while (i < diffstr.length) { - parseIndex(); - } - return list; -} - -// Iterator that traverses in the range of [min, max], stepping -// by distance from a given start position. I.e. for [0, 4], with -// start of 2, this will iterate 2, 3, 1, 4, 0. -function distanceIterator (start, minLine, maxLine) { - var wantForward = true, - backwardExhausted = false, - forwardExhausted = false, - localOffset = 1; - return function iterator() { - if (wantForward && !forwardExhausted) { - if (backwardExhausted) { - localOffset++; - } else { - wantForward = false; - } - - // Check if trying to fit beyond text length, and if not, check it fits - // after offset location (or desired location on first iteration) - if (start + localOffset <= maxLine) { - return start + localOffset; - } - forwardExhausted = true; - } - if (!backwardExhausted) { - if (!forwardExhausted) { - wantForward = true; - } - - // Check if trying to fit before text beginning, and if not, check it fits - // before offset location - if (minLine <= start - localOffset) { - return start - localOffset++; - } - backwardExhausted = true; - return iterator(); - } - - // We tried to fit hunk before text beginning and beyond text length, then - // hunk can't fit on the text. Return undefined - }; -} - -function applyPatch(source, uniDiff) { - var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; - if (typeof uniDiff === 'string') { - uniDiff = parsePatch(uniDiff); - } - if (Array.isArray(uniDiff)) { - if (uniDiff.length > 1) { - throw new Error('applyPatch only works with a single input.'); - } - uniDiff = uniDiff[0]; - } - if (options.autoConvertLineEndings || options.autoConvertLineEndings == null) { - if (hasOnlyWinLineEndings(source) && isUnix(uniDiff)) { - uniDiff = unixToWin(uniDiff); - } else if (hasOnlyUnixLineEndings(source) && isWin(uniDiff)) { - uniDiff = winToUnix(uniDiff); - } - } - - // Apply the diff to the input - var lines = source.split('\n'), - hunks = uniDiff.hunks, - compareLine = options.compareLine || function (lineNumber, line, operation, patchContent) { - return line === patchContent; - }, - fuzzFactor = options.fuzzFactor || 0, - minLine = 0; - if (fuzzFactor < 0 || !Number.isInteger(fuzzFactor)) { - throw new Error('fuzzFactor must be a non-negative integer'); - } - - // Special case for empty patch. - if (!hunks.length) { - return source; - } - - // Before anything else, handle EOFNL insertion/removal. If the patch tells us to make a change - // to the EOFNL that is redundant/impossible - i.e. to remove a newline that's not there, or add a - // newline that already exists - then we either return false and fail to apply the patch (if - // fuzzFactor is 0) or simply ignore the problem and do nothing (if fuzzFactor is >0). - // If we do need to remove/add a newline at EOF, this will always be in the final hunk: - var prevLine = '', - removeEOFNL = false, - addEOFNL = false; - for (var i = 0; i < hunks[hunks.length - 1].lines.length; i++) { - var line = hunks[hunks.length - 1].lines[i]; - if (line[0] == '\\') { - if (prevLine[0] == '+') { - removeEOFNL = true; - } else if (prevLine[0] == '-') { - addEOFNL = true; - } - } - prevLine = line; - } - if (removeEOFNL) { - if (addEOFNL) { - // This means the final line gets changed but doesn't have a trailing newline in either the - // original or patched version. In that case, we do nothing if fuzzFactor > 0, and if - // fuzzFactor is 0, we simply validate that the source file has no trailing newline. - if (!fuzzFactor && lines[lines.length - 1] == '') { - return false; - } - } else if (lines[lines.length - 1] == '') { - lines.pop(); - } else if (!fuzzFactor) { - return false; - } - } else if (addEOFNL) { - if (lines[lines.length - 1] != '') { - lines.push(''); - } else if (!fuzzFactor) { - return false; - } - } - - /** - * Checks if the hunk can be made to fit at the provided location with at most `maxErrors` - * insertions, substitutions, or deletions, while ensuring also that: - * - lines deleted in the hunk match exactly, and - * - wherever an insertion operation or block of insertion operations appears in the hunk, the - * immediately preceding and following lines of context match exactly - * - * `toPos` should be set such that lines[toPos] is meant to match hunkLines[0]. - * - * If the hunk can be applied, returns an object with properties `oldLineLastI` and - * `replacementLines`. Otherwise, returns null. - */ - function applyHunk(hunkLines, toPos, maxErrors) { - var hunkLinesI = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0; - var lastContextLineMatched = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true; - var patchedLines = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : []; - var patchedLinesLength = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : 0; - var nConsecutiveOldContextLines = 0; - var nextContextLineMustMatch = false; - for (; hunkLinesI < hunkLines.length; hunkLinesI++) { - var hunkLine = hunkLines[hunkLinesI], - operation = hunkLine.length > 0 ? hunkLine[0] : ' ', - content = hunkLine.length > 0 ? hunkLine.substr(1) : hunkLine; - if (operation === '-') { - if (compareLine(toPos + 1, lines[toPos], operation, content)) { - toPos++; - nConsecutiveOldContextLines = 0; - } else { - if (!maxErrors || lines[toPos] == null) { - return null; - } - patchedLines[patchedLinesLength] = lines[toPos]; - return applyHunk(hunkLines, toPos + 1, maxErrors - 1, hunkLinesI, false, patchedLines, patchedLinesLength + 1); - } - } - if (operation === '+') { - if (!lastContextLineMatched) { - return null; - } - patchedLines[patchedLinesLength] = content; - patchedLinesLength++; - nConsecutiveOldContextLines = 0; - nextContextLineMustMatch = true; - } - if (operation === ' ') { - nConsecutiveOldContextLines++; - patchedLines[patchedLinesLength] = lines[toPos]; - if (compareLine(toPos + 1, lines[toPos], operation, content)) { - patchedLinesLength++; - lastContextLineMatched = true; - nextContextLineMustMatch = false; - toPos++; - } else { - if (nextContextLineMustMatch || !maxErrors) { - return null; - } - - // Consider 3 possibilities in sequence: - // 1. lines contains a *substitution* not included in the patch context, or - // 2. lines contains an *insertion* not included in the patch context, or - // 3. lines contains a *deletion* not included in the patch context - // The first two options are of course only possible if the line from lines is non-null - - // i.e. only option 3 is possible if we've overrun the end of the old file. - return lines[toPos] && (applyHunk(hunkLines, toPos + 1, maxErrors - 1, hunkLinesI + 1, false, patchedLines, patchedLinesLength + 1) || applyHunk(hunkLines, toPos + 1, maxErrors - 1, hunkLinesI, false, patchedLines, patchedLinesLength + 1)) || applyHunk(hunkLines, toPos, maxErrors - 1, hunkLinesI + 1, false, patchedLines, patchedLinesLength); - } - } - } - - // Before returning, trim any unmodified context lines off the end of patchedLines and reduce - // toPos (and thus oldLineLastI) accordingly. This allows later hunks to be applied to a region - // that starts in this hunk's trailing context. - patchedLinesLength -= nConsecutiveOldContextLines; - toPos -= nConsecutiveOldContextLines; - patchedLines.length = patchedLinesLength; - return { - patchedLines: patchedLines, - oldLineLastI: toPos - 1 - }; - } - var resultLines = []; - - // Search best fit offsets for each hunk based on the previous ones - var prevHunkOffset = 0; - for (var _i = 0; _i < hunks.length; _i++) { - var hunk = hunks[_i]; - var hunkResult = void 0; - var maxLine = lines.length - hunk.oldLines + fuzzFactor; - var toPos = void 0; - for (var maxErrors = 0; maxErrors <= fuzzFactor; maxErrors++) { - toPos = hunk.oldStart + prevHunkOffset - 1; - var iterator = distanceIterator(toPos, minLine, maxLine); - for (; toPos !== undefined; toPos = iterator()) { - hunkResult = applyHunk(hunk.lines, toPos, maxErrors); - if (hunkResult) { - break; - } - } - if (hunkResult) { - break; - } - } - if (!hunkResult) { - return false; - } - - // Copy everything from the end of where we applied the last hunk to the start of this hunk - for (var _i2 = minLine; _i2 < toPos; _i2++) { - resultLines.push(lines[_i2]); - } - - // Add the lines produced by applying the hunk: - for (var _i3 = 0; _i3 < hunkResult.patchedLines.length; _i3++) { - var _line = hunkResult.patchedLines[_i3]; - resultLines.push(_line); - } - - // Set lower text limit to end of the current hunk, so next ones don't try - // to fit over already patched text - minLine = hunkResult.oldLineLastI + 1; - - // Note the offset between where the patch said the hunk should've applied and where we - // applied it, so we can adjust future hunks accordingly: - prevHunkOffset = toPos + 1 - hunk.oldStart; - } - - // Copy over the rest of the lines from the old text - for (var _i4 = minLine; _i4 < lines.length; _i4++) { - resultLines.push(lines[_i4]); - } - return resultLines.join('\n'); -} - -// Wrapper that supports multiple file patches via callbacks. -function applyPatches(uniDiff, options) { - if (typeof uniDiff === 'string') { - uniDiff = parsePatch(uniDiff); - } - var currentIndex = 0; - function processIndex() { - var index = uniDiff[currentIndex++]; - if (!index) { - return options.complete(); - } - options.loadFile(index, function (err, data) { - if (err) { - return options.complete(err); - } - var updatedContent = applyPatch(data, index, options); - options.patched(index, updatedContent, function (err) { - if (err) { - return options.complete(err); - } - processIndex(); - }); - }); - } - processIndex(); -} - -function structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) { - if (!options) { - options = {}; - } - if (typeof options === 'function') { - options = { - callback: options - }; - } - if (typeof options.context === 'undefined') { - options.context = 4; - } - if (options.newlineIsToken) { - throw new Error('newlineIsToken may not be used with patch-generation functions, only with diffing functions'); - } - if (!options.callback) { - return diffLinesResultToPatch(diffLines(oldStr, newStr, options)); - } else { - var _options = options, - _callback = _options.callback; - diffLines(oldStr, newStr, _objectSpread2(_objectSpread2({}, options), {}, { - callback: function callback(diff) { - var patch = diffLinesResultToPatch(diff); - _callback(patch); - } - })); - } - function diffLinesResultToPatch(diff) { - // STEP 1: Build up the patch with no "\ No newline at end of file" lines and with the arrays - // of lines containing trailing newline characters. We'll tidy up later... - - if (!diff) { - return; - } - diff.push({ - value: '', - lines: [] - }); // Append an empty value to make cleanup easier - - function contextLines(lines) { - return lines.map(function (entry) { - return ' ' + entry; - }); - } - var hunks = []; - var oldRangeStart = 0, - newRangeStart = 0, - curRange = [], - oldLine = 1, - newLine = 1; - var _loop = function _loop() { - var current = diff[i], - lines = current.lines || splitLines(current.value); - current.lines = lines; - if (current.added || current.removed) { - var _curRange; - // If we have previous context, start with that - if (!oldRangeStart) { - var prev = diff[i - 1]; - oldRangeStart = oldLine; - newRangeStart = newLine; - if (prev) { - curRange = options.context > 0 ? contextLines(prev.lines.slice(-options.context)) : []; - oldRangeStart -= curRange.length; - newRangeStart -= curRange.length; - } - } - - // Output our changes - (_curRange = curRange).push.apply(_curRange, _toConsumableArray(lines.map(function (entry) { - return (current.added ? '+' : '-') + entry; - }))); - - // Track the updated file position - if (current.added) { - newLine += lines.length; - } else { - oldLine += lines.length; - } - } else { - // Identical context lines. Track line changes - if (oldRangeStart) { - // Close out any changes that have been output (or join overlapping) - if (lines.length <= options.context * 2 && i < diff.length - 2) { - var _curRange2; - // Overlapping - (_curRange2 = curRange).push.apply(_curRange2, _toConsumableArray(contextLines(lines))); - } else { - var _curRange3; - // end the range and output - var contextSize = Math.min(lines.length, options.context); - (_curRange3 = curRange).push.apply(_curRange3, _toConsumableArray(contextLines(lines.slice(0, contextSize)))); - var _hunk = { - oldStart: oldRangeStart, - oldLines: oldLine - oldRangeStart + contextSize, - newStart: newRangeStart, - newLines: newLine - newRangeStart + contextSize, - lines: curRange - }; - hunks.push(_hunk); - oldRangeStart = 0; - newRangeStart = 0; - curRange = []; - } - } - oldLine += lines.length; - newLine += lines.length; - } - }; - for (var i = 0; i < diff.length; i++) { - _loop(); - } - - // Step 2: eliminate the trailing `\n` from each line of each hunk, and, where needed, add - // "\ No newline at end of file". - for (var _i = 0, _hunks = hunks; _i < _hunks.length; _i++) { - var hunk = _hunks[_i]; - for (var _i2 = 0; _i2 < hunk.lines.length; _i2++) { - if (hunk.lines[_i2].endsWith('\n')) { - hunk.lines[_i2] = hunk.lines[_i2].slice(0, -1); - } else { - hunk.lines.splice(_i2 + 1, 0, '\\ No newline at end of file'); - _i2++; // Skip the line we just added, then continue iterating - } - } - } - return { - oldFileName: oldFileName, - newFileName: newFileName, - oldHeader: oldHeader, - newHeader: newHeader, - hunks: hunks - }; - } -} -function formatPatch(diff) { - if (Array.isArray(diff)) { - return diff.map(formatPatch).join('\n'); - } - var ret = []; - if (diff.oldFileName == diff.newFileName) { - ret.push('Index: ' + diff.oldFileName); - } - ret.push('==================================================================='); - ret.push('--- ' + diff.oldFileName + (typeof diff.oldHeader === 'undefined' ? '' : '\t' + diff.oldHeader)); - ret.push('+++ ' + diff.newFileName + (typeof diff.newHeader === 'undefined' ? '' : '\t' + diff.newHeader)); - for (var i = 0; i < diff.hunks.length; i++) { - var hunk = diff.hunks[i]; - // Unified Diff Format quirk: If the chunk size is 0, - // the first number is one lower than one would expect. - // https://www.artima.com/weblogs/viewpost.jsp?thread=164293 - if (hunk.oldLines === 0) { - hunk.oldStart -= 1; - } - if (hunk.newLines === 0) { - hunk.newStart -= 1; - } - ret.push('@@ -' + hunk.oldStart + ',' + hunk.oldLines + ' +' + hunk.newStart + ',' + hunk.newLines + ' @@'); - ret.push.apply(ret, hunk.lines); - } - return ret.join('\n') + '\n'; -} -function createTwoFilesPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) { - var _options2; - if (typeof options === 'function') { - options = { - callback: options - }; - } - if (!((_options2 = options) !== null && _options2 !== void 0 && _options2.callback)) { - var patchObj = structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options); - if (!patchObj) { - return; - } - return formatPatch(patchObj); - } else { - var _options3 = options, - _callback2 = _options3.callback; - structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, _objectSpread2(_objectSpread2({}, options), {}, { - callback: function callback(patchObj) { - if (!patchObj) { - _callback2(); - } else { - _callback2(formatPatch(patchObj)); - } - } - })); - } -} -function createPatch(fileName, oldStr, newStr, oldHeader, newHeader, options) { - return createTwoFilesPatch(fileName, fileName, oldStr, newStr, oldHeader, newHeader, options); -} - -/** - * Split `text` into an array of lines, including the trailing newline character (where present) - */ -function splitLines(text) { - var hasTrailingNl = text.endsWith('\n'); - var result = text.split('\n').map(function (line) { - return line + '\n'; - }); - if (hasTrailingNl) { - result.pop(); - } else { - result.push(result.pop().slice(0, -1)); - } - return result; -} - -function arrayEqual(a, b) { - if (a.length !== b.length) { - return false; - } - return arrayStartsWith(a, b); -} -function arrayStartsWith(array, start) { - if (start.length > array.length) { - return false; - } - for (var i = 0; i < start.length; i++) { - if (start[i] !== array[i]) { - return false; - } - } - return true; -} - -function calcLineCount(hunk) { - var _calcOldNewLineCount = calcOldNewLineCount(hunk.lines), - oldLines = _calcOldNewLineCount.oldLines, - newLines = _calcOldNewLineCount.newLines; - if (oldLines !== undefined) { - hunk.oldLines = oldLines; - } else { - delete hunk.oldLines; - } - if (newLines !== undefined) { - hunk.newLines = newLines; - } else { - delete hunk.newLines; - } -} -function merge(mine, theirs, base) { - mine = loadPatch(mine, base); - theirs = loadPatch(theirs, base); - var ret = {}; - - // For index we just let it pass through as it doesn't have any necessary meaning. - // Leaving sanity checks on this to the API consumer that may know more about the - // meaning in their own context. - if (mine.index || theirs.index) { - ret.index = mine.index || theirs.index; - } - if (mine.newFileName || theirs.newFileName) { - if (!fileNameChanged(mine)) { - // No header or no change in ours, use theirs (and ours if theirs does not exist) - ret.oldFileName = theirs.oldFileName || mine.oldFileName; - ret.newFileName = theirs.newFileName || mine.newFileName; - ret.oldHeader = theirs.oldHeader || mine.oldHeader; - ret.newHeader = theirs.newHeader || mine.newHeader; - } else if (!fileNameChanged(theirs)) { - // No header or no change in theirs, use ours - ret.oldFileName = mine.oldFileName; - ret.newFileName = mine.newFileName; - ret.oldHeader = mine.oldHeader; - ret.newHeader = mine.newHeader; - } else { - // Both changed... figure it out - ret.oldFileName = selectField(ret, mine.oldFileName, theirs.oldFileName); - ret.newFileName = selectField(ret, mine.newFileName, theirs.newFileName); - ret.oldHeader = selectField(ret, mine.oldHeader, theirs.oldHeader); - ret.newHeader = selectField(ret, mine.newHeader, theirs.newHeader); - } - } - ret.hunks = []; - var mineIndex = 0, - theirsIndex = 0, - mineOffset = 0, - theirsOffset = 0; - while (mineIndex < mine.hunks.length || theirsIndex < theirs.hunks.length) { - var mineCurrent = mine.hunks[mineIndex] || { - oldStart: Infinity - }, - theirsCurrent = theirs.hunks[theirsIndex] || { - oldStart: Infinity - }; - if (hunkBefore(mineCurrent, theirsCurrent)) { - // This patch does not overlap with any of the others, yay. - ret.hunks.push(cloneHunk(mineCurrent, mineOffset)); - mineIndex++; - theirsOffset += mineCurrent.newLines - mineCurrent.oldLines; - } else if (hunkBefore(theirsCurrent, mineCurrent)) { - // This patch does not overlap with any of the others, yay. - ret.hunks.push(cloneHunk(theirsCurrent, theirsOffset)); - theirsIndex++; - mineOffset += theirsCurrent.newLines - theirsCurrent.oldLines; - } else { - // Overlap, merge as best we can - var mergedHunk = { - oldStart: Math.min(mineCurrent.oldStart, theirsCurrent.oldStart), - oldLines: 0, - newStart: Math.min(mineCurrent.newStart + mineOffset, theirsCurrent.oldStart + theirsOffset), - newLines: 0, - lines: [] - }; - mergeLines(mergedHunk, mineCurrent.oldStart, mineCurrent.lines, theirsCurrent.oldStart, theirsCurrent.lines); - theirsIndex++; - mineIndex++; - ret.hunks.push(mergedHunk); - } - } - return ret; -} -function loadPatch(param, base) { - if (typeof param === 'string') { - if (/^@@/m.test(param) || /^Index:/m.test(param)) { - return parsePatch(param)[0]; - } - if (!base) { - throw new Error('Must provide a base reference or pass in a patch'); - } - return structuredPatch(undefined, undefined, base, param); - } - return param; -} -function fileNameChanged(patch) { - return patch.newFileName && patch.newFileName !== patch.oldFileName; -} -function selectField(index, mine, theirs) { - if (mine === theirs) { - return mine; - } else { - index.conflict = true; - return { - mine: mine, - theirs: theirs - }; - } -} -function hunkBefore(test, check) { - return test.oldStart < check.oldStart && test.oldStart + test.oldLines < check.oldStart; -} -function cloneHunk(hunk, offset) { - return { - oldStart: hunk.oldStart, - oldLines: hunk.oldLines, - newStart: hunk.newStart + offset, - newLines: hunk.newLines, - lines: hunk.lines - }; -} -function mergeLines(hunk, mineOffset, mineLines, theirOffset, theirLines) { - // This will generally result in a conflicted hunk, but there are cases where the context - // is the only overlap where we can successfully merge the content here. - var mine = { - offset: mineOffset, - lines: mineLines, - index: 0 - }, - their = { - offset: theirOffset, - lines: theirLines, - index: 0 - }; - - // Handle any leading content - insertLeading(hunk, mine, their); - insertLeading(hunk, their, mine); - - // Now in the overlap content. Scan through and select the best changes from each. - while (mine.index < mine.lines.length && their.index < their.lines.length) { - var mineCurrent = mine.lines[mine.index], - theirCurrent = their.lines[their.index]; - if ((mineCurrent[0] === '-' || mineCurrent[0] === '+') && (theirCurrent[0] === '-' || theirCurrent[0] === '+')) { - // Both modified ... - mutualChange(hunk, mine, their); - } else if (mineCurrent[0] === '+' && theirCurrent[0] === ' ') { - var _hunk$lines; - // Mine inserted - (_hunk$lines = hunk.lines).push.apply(_hunk$lines, _toConsumableArray(collectChange(mine))); - } else if (theirCurrent[0] === '+' && mineCurrent[0] === ' ') { - var _hunk$lines2; - // Theirs inserted - (_hunk$lines2 = hunk.lines).push.apply(_hunk$lines2, _toConsumableArray(collectChange(their))); - } else if (mineCurrent[0] === '-' && theirCurrent[0] === ' ') { - // Mine removed or edited - removal(hunk, mine, their); - } else if (theirCurrent[0] === '-' && mineCurrent[0] === ' ') { - // Their removed or edited - removal(hunk, their, mine, true); - } else if (mineCurrent === theirCurrent) { - // Context identity - hunk.lines.push(mineCurrent); - mine.index++; - their.index++; - } else { - // Context mismatch - conflict(hunk, collectChange(mine), collectChange(their)); - } - } - - // Now push anything that may be remaining - insertTrailing(hunk, mine); - insertTrailing(hunk, their); - calcLineCount(hunk); -} -function mutualChange(hunk, mine, their) { - var myChanges = collectChange(mine), - theirChanges = collectChange(their); - if (allRemoves(myChanges) && allRemoves(theirChanges)) { - // Special case for remove changes that are supersets of one another - if (arrayStartsWith(myChanges, theirChanges) && skipRemoveSuperset(their, myChanges, myChanges.length - theirChanges.length)) { - var _hunk$lines3; - (_hunk$lines3 = hunk.lines).push.apply(_hunk$lines3, _toConsumableArray(myChanges)); - return; - } else if (arrayStartsWith(theirChanges, myChanges) && skipRemoveSuperset(mine, theirChanges, theirChanges.length - myChanges.length)) { - var _hunk$lines4; - (_hunk$lines4 = hunk.lines).push.apply(_hunk$lines4, _toConsumableArray(theirChanges)); - return; - } - } else if (arrayEqual(myChanges, theirChanges)) { - var _hunk$lines5; - (_hunk$lines5 = hunk.lines).push.apply(_hunk$lines5, _toConsumableArray(myChanges)); - return; - } - conflict(hunk, myChanges, theirChanges); -} -function removal(hunk, mine, their, swap) { - var myChanges = collectChange(mine), - theirChanges = collectContext(their, myChanges); - if (theirChanges.merged) { - var _hunk$lines6; - (_hunk$lines6 = hunk.lines).push.apply(_hunk$lines6, _toConsumableArray(theirChanges.merged)); - } else { - conflict(hunk, swap ? theirChanges : myChanges, swap ? myChanges : theirChanges); - } -} -function conflict(hunk, mine, their) { - hunk.conflict = true; - hunk.lines.push({ - conflict: true, - mine: mine, - theirs: their - }); -} -function insertLeading(hunk, insert, their) { - while (insert.offset < their.offset && insert.index < insert.lines.length) { - var line = insert.lines[insert.index++]; - hunk.lines.push(line); - insert.offset++; - } -} -function insertTrailing(hunk, insert) { - while (insert.index < insert.lines.length) { - var line = insert.lines[insert.index++]; - hunk.lines.push(line); - } -} -function collectChange(state) { - var ret = [], - operation = state.lines[state.index][0]; - while (state.index < state.lines.length) { - var line = state.lines[state.index]; - - // Group additions that are immediately after subtractions and treat them as one "atomic" modify change. - if (operation === '-' && line[0] === '+') { - operation = '+'; - } - if (operation === line[0]) { - ret.push(line); - state.index++; - } else { - break; - } - } - return ret; -} -function collectContext(state, matchChanges) { - var changes = [], - merged = [], - matchIndex = 0, - contextChanges = false, - conflicted = false; - while (matchIndex < matchChanges.length && state.index < state.lines.length) { - var change = state.lines[state.index], - match = matchChanges[matchIndex]; - - // Once we've hit our add, then we are done - if (match[0] === '+') { - break; - } - contextChanges = contextChanges || change[0] !== ' '; - merged.push(match); - matchIndex++; - - // Consume any additions in the other block as a conflict to attempt - // to pull in the remaining context after this - if (change[0] === '+') { - conflicted = true; - while (change[0] === '+') { - changes.push(change); - change = state.lines[++state.index]; - } - } - if (match.substr(1) === change.substr(1)) { - changes.push(change); - state.index++; - } else { - conflicted = true; - } - } - if ((matchChanges[matchIndex] || '')[0] === '+' && contextChanges) { - conflicted = true; - } - if (conflicted) { - return changes; - } - while (matchIndex < matchChanges.length) { - merged.push(matchChanges[matchIndex++]); - } - return { - merged: merged, - changes: changes - }; -} -function allRemoves(changes) { - return changes.reduce(function (prev, change) { - return prev && change[0] === '-'; - }, true); -} -function skipRemoveSuperset(state, removeChanges, delta) { - for (var i = 0; i < delta; i++) { - var changeContent = removeChanges[removeChanges.length - delta + i].substr(1); - if (state.lines[state.index + i] !== ' ' + changeContent) { - return false; - } - } - state.index += delta; - return true; -} -function calcOldNewLineCount(lines) { - var oldLines = 0; - var newLines = 0; - lines.forEach(function (line) { - if (typeof line !== 'string') { - var myCount = calcOldNewLineCount(line.mine); - var theirCount = calcOldNewLineCount(line.theirs); - if (oldLines !== undefined) { - if (myCount.oldLines === theirCount.oldLines) { - oldLines += myCount.oldLines; - } else { - oldLines = undefined; - } - } - if (newLines !== undefined) { - if (myCount.newLines === theirCount.newLines) { - newLines += myCount.newLines; - } else { - newLines = undefined; - } - } - } else { - if (newLines !== undefined && (line[0] === '+' || line[0] === ' ')) { - newLines++; - } - if (oldLines !== undefined && (line[0] === '-' || line[0] === ' ')) { - oldLines++; - } - } - }); - return { - oldLines: oldLines, - newLines: newLines - }; -} - -function reversePatch(structuredPatch) { - if (Array.isArray(structuredPatch)) { - return structuredPatch.map(reversePatch).reverse(); - } - return _objectSpread2(_objectSpread2({}, structuredPatch), {}, { - oldFileName: structuredPatch.newFileName, - oldHeader: structuredPatch.newHeader, - newFileName: structuredPatch.oldFileName, - newHeader: structuredPatch.oldHeader, - hunks: structuredPatch.hunks.map(function (hunk) { - return { - oldLines: hunk.newLines, - oldStart: hunk.newStart, - newLines: hunk.oldLines, - newStart: hunk.oldStart, - lines: hunk.lines.map(function (l) { - if (l.startsWith('-')) { - return "+".concat(l.slice(1)); - } - if (l.startsWith('+')) { - return "-".concat(l.slice(1)); - } - return l; - }) - }; - }) - }); -} - -// See: http://code.google.com/p/google-diff-match-patch/wiki/API -function convertChangesToDMP(changes) { - var ret = [], - change, - operation; - for (var i = 0; i < changes.length; i++) { - change = changes[i]; - if (change.added) { - operation = 1; - } else if (change.removed) { - operation = -1; - } else { - operation = 0; - } - ret.push([operation, change.value]); - } - return ret; -} - -function convertChangesToXML(changes) { - var ret = []; - for (var i = 0; i < changes.length; i++) { - var change = changes[i]; - if (change.added) { - ret.push(''); - } else if (change.removed) { - ret.push(''); - } - ret.push(escapeHTML(change.value)); - if (change.added) { - ret.push(''); - } else if (change.removed) { - ret.push(''); - } - } - return ret.join(''); -} -function escapeHTML(s) { - var n = s; - n = n.replace(/&/g, '&'); - n = n.replace(//g, '>'); - n = n.replace(/"/g, '"'); - return n; -} - -export { Diff, applyPatch, applyPatches, canonicalize, convertChangesToDMP, convertChangesToXML, createPatch, createTwoFilesPatch, diffArrays, diffChars, diffCss, diffJson, diffLines, diffSentences, diffTrimmedLines, diffWords, diffWordsWithSpace, formatPatch, merge, parsePatch, reversePatch, structuredPatch }; diff --git a/node_modules/mocha/node_modules/diff/lib/index.js b/node_modules/mocha/node_modules/diff/lib/index.js deleted file mode 100644 index 518b3dee..00000000 --- a/node_modules/mocha/node_modules/diff/lib/index.js +++ /dev/null @@ -1,217 +0,0 @@ -/*istanbul ignore start*/ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -Object.defineProperty(exports, "Diff", { - enumerable: true, - get: function get() { - return _base["default"]; - } -}); -Object.defineProperty(exports, "applyPatch", { - enumerable: true, - get: function get() { - return _apply.applyPatch; - } -}); -Object.defineProperty(exports, "applyPatches", { - enumerable: true, - get: function get() { - return _apply.applyPatches; - } -}); -Object.defineProperty(exports, "canonicalize", { - enumerable: true, - get: function get() { - return _json.canonicalize; - } -}); -Object.defineProperty(exports, "convertChangesToDMP", { - enumerable: true, - get: function get() { - return _dmp.convertChangesToDMP; - } -}); -Object.defineProperty(exports, "convertChangesToXML", { - enumerable: true, - get: function get() { - return _xml.convertChangesToXML; - } -}); -Object.defineProperty(exports, "createPatch", { - enumerable: true, - get: function get() { - return _create.createPatch; - } -}); -Object.defineProperty(exports, "createTwoFilesPatch", { - enumerable: true, - get: function get() { - return _create.createTwoFilesPatch; - } -}); -Object.defineProperty(exports, "diffArrays", { - enumerable: true, - get: function get() { - return _array.diffArrays; - } -}); -Object.defineProperty(exports, "diffChars", { - enumerable: true, - get: function get() { - return _character.diffChars; - } -}); -Object.defineProperty(exports, "diffCss", { - enumerable: true, - get: function get() { - return _css.diffCss; - } -}); -Object.defineProperty(exports, "diffJson", { - enumerable: true, - get: function get() { - return _json.diffJson; - } -}); -Object.defineProperty(exports, "diffLines", { - enumerable: true, - get: function get() { - return _line.diffLines; - } -}); -Object.defineProperty(exports, "diffSentences", { - enumerable: true, - get: function get() { - return _sentence.diffSentences; - } -}); -Object.defineProperty(exports, "diffTrimmedLines", { - enumerable: true, - get: function get() { - return _line.diffTrimmedLines; - } -}); -Object.defineProperty(exports, "diffWords", { - enumerable: true, - get: function get() { - return _word.diffWords; - } -}); -Object.defineProperty(exports, "diffWordsWithSpace", { - enumerable: true, - get: function get() { - return _word.diffWordsWithSpace; - } -}); -Object.defineProperty(exports, "formatPatch", { - enumerable: true, - get: function get() { - return _create.formatPatch; - } -}); -Object.defineProperty(exports, "merge", { - enumerable: true, - get: function get() { - return _merge.merge; - } -}); -Object.defineProperty(exports, "parsePatch", { - enumerable: true, - get: function get() { - return _parse.parsePatch; - } -}); -Object.defineProperty(exports, "reversePatch", { - enumerable: true, - get: function get() { - return _reverse.reversePatch; - } -}); -Object.defineProperty(exports, "structuredPatch", { - enumerable: true, - get: function get() { - return _create.structuredPatch; - } -}); -/*istanbul ignore end*/ -var -/*istanbul ignore start*/ -_base = _interopRequireDefault(require("./diff/base")) -/*istanbul ignore end*/ -; -var -/*istanbul ignore start*/ -_character = require("./diff/character") -/*istanbul ignore end*/ -; -var -/*istanbul ignore start*/ -_word = require("./diff/word") -/*istanbul ignore end*/ -; -var -/*istanbul ignore start*/ -_line = require("./diff/line") -/*istanbul ignore end*/ -; -var -/*istanbul ignore start*/ -_sentence = require("./diff/sentence") -/*istanbul ignore end*/ -; -var -/*istanbul ignore start*/ -_css = require("./diff/css") -/*istanbul ignore end*/ -; -var -/*istanbul ignore start*/ -_json = require("./diff/json") -/*istanbul ignore end*/ -; -var -/*istanbul ignore start*/ -_array = require("./diff/array") -/*istanbul ignore end*/ -; -var -/*istanbul ignore start*/ -_apply = require("./patch/apply") -/*istanbul ignore end*/ -; -var -/*istanbul ignore start*/ -_parse = require("./patch/parse") -/*istanbul ignore end*/ -; -var -/*istanbul ignore start*/ -_merge = require("./patch/merge") -/*istanbul ignore end*/ -; -var -/*istanbul ignore start*/ -_reverse = require("./patch/reverse") -/*istanbul ignore end*/ -; -var -/*istanbul ignore start*/ -_create = require("./patch/create") -/*istanbul ignore end*/ -; -var -/*istanbul ignore start*/ -_dmp = require("./convert/dmp") -/*istanbul ignore end*/ -; -var -/*istanbul ignore start*/ -_xml = require("./convert/xml") -/*istanbul ignore end*/ -; -/*istanbul ignore start*/ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } -/*istanbul ignore end*/ -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfYmFzZSIsIl9pbnRlcm9wUmVxdWlyZURlZmF1bHQiLCJyZXF1aXJlIiwiX2NoYXJhY3RlciIsIl93b3JkIiwiX2xpbmUiLCJfc2VudGVuY2UiLCJfY3NzIiwiX2pzb24iLCJfYXJyYXkiLCJfYXBwbHkiLCJfcGFyc2UiLCJfbWVyZ2UiLCJfcmV2ZXJzZSIsIl9jcmVhdGUiLCJfZG1wIiwiX3htbCIsIm9iaiIsIl9fZXNNb2R1bGUiXSwic291cmNlcyI6WyIuLi9zcmMvaW5kZXguanMiXSwic291cmNlc0NvbnRlbnQiOlsiLyogU2VlIExJQ0VOU0UgZmlsZSBmb3IgdGVybXMgb2YgdXNlICovXG5cbi8qXG4gKiBUZXh0IGRpZmYgaW1wbGVtZW50YXRpb24uXG4gKlxuICogVGhpcyBsaWJyYXJ5IHN1cHBvcnRzIHRoZSBmb2xsb3dpbmcgQVBJczpcbiAqIERpZmYuZGlmZkNoYXJzOiBDaGFyYWN0ZXIgYnkgY2hhcmFjdGVyIGRpZmZcbiAqIERpZmYuZGlmZldvcmRzOiBXb3JkIChhcyBkZWZpbmVkIGJ5IFxcYiByZWdleCkgZGlmZiB3aGljaCBpZ25vcmVzIHdoaXRlc3BhY2Vcb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BQUFBLEdBQUE7QUFBQSIsImlnbm9yZUxpc3QiOltdfQ== diff --git a/node_modules/mocha/node_modules/diff/lib/index.mjs b/node_modules/mocha/node_modules/diff/lib/index.mjs deleted file mode 100644 index 6e872723..00000000 --- a/node_modules/mocha/node_modules/diff/lib/index.mjs +++ /dev/null @@ -1,2041 +0,0 @@ -function Diff() {} -Diff.prototype = { - diff: function diff(oldString, newString) { - var _options$timeout; - var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; - var callback = options.callback; - if (typeof options === 'function') { - callback = options; - options = {}; - } - var self = this; - function done(value) { - value = self.postProcess(value, options); - if (callback) { - setTimeout(function () { - callback(value); - }, 0); - return true; - } else { - return value; - } - } - - // Allow subclasses to massage the input prior to running - oldString = this.castInput(oldString, options); - newString = this.castInput(newString, options); - oldString = this.removeEmpty(this.tokenize(oldString, options)); - newString = this.removeEmpty(this.tokenize(newString, options)); - var newLen = newString.length, - oldLen = oldString.length; - var editLength = 1; - var maxEditLength = newLen + oldLen; - if (options.maxEditLength != null) { - maxEditLength = Math.min(maxEditLength, options.maxEditLength); - } - var maxExecutionTime = (_options$timeout = options.timeout) !== null && _options$timeout !== void 0 ? _options$timeout : Infinity; - var abortAfterTimestamp = Date.now() + maxExecutionTime; - var bestPath = [{ - oldPos: -1, - lastComponent: undefined - }]; - - // Seed editLength = 0, i.e. the content starts with the same values - var newPos = this.extractCommon(bestPath[0], newString, oldString, 0, options); - if (bestPath[0].oldPos + 1 >= oldLen && newPos + 1 >= newLen) { - // Identity per the equality and tokenizer - return done(buildValues(self, bestPath[0].lastComponent, newString, oldString, self.useLongestToken)); - } - - // Once we hit the right edge of the edit graph on some diagonal k, we can - // definitely reach the end of the edit graph in no more than k edits, so - // there's no point in considering any moves to diagonal k+1 any more (from - // which we're guaranteed to need at least k+1 more edits). - // Similarly, once we've reached the bottom of the edit graph, there's no - // point considering moves to lower diagonals. - // We record this fact by setting minDiagonalToConsider and - // maxDiagonalToConsider to some finite value once we've hit the edge of - // the edit graph. - // This optimization is not faithful to the original algorithm presented in - // Myers's paper, which instead pointlessly extends D-paths off the end of - // the edit graph - see page 7 of Myers's paper which notes this point - // explicitly and illustrates it with a diagram. This has major performance - // implications for some common scenarios. For instance, to compute a diff - // where the new text simply appends d characters on the end of the - // original text of length n, the true Myers algorithm will take O(n+d^2) - // time while this optimization needs only O(n+d) time. - var minDiagonalToConsider = -Infinity, - maxDiagonalToConsider = Infinity; - - // Main worker method. checks all permutations of a given edit length for acceptance. - function execEditLength() { - for (var diagonalPath = Math.max(minDiagonalToConsider, -editLength); diagonalPath <= Math.min(maxDiagonalToConsider, editLength); diagonalPath += 2) { - var basePath = void 0; - var removePath = bestPath[diagonalPath - 1], - addPath = bestPath[diagonalPath + 1]; - if (removePath) { - // No one else is going to attempt to use this value, clear it - bestPath[diagonalPath - 1] = undefined; - } - var canAdd = false; - if (addPath) { - // what newPos will be after we do an insertion: - var addPathNewPos = addPath.oldPos - diagonalPath; - canAdd = addPath && 0 <= addPathNewPos && addPathNewPos < newLen; - } - var canRemove = removePath && removePath.oldPos + 1 < oldLen; - if (!canAdd && !canRemove) { - // If this path is a terminal then prune - bestPath[diagonalPath] = undefined; - continue; - } - - // Select the diagonal that we want to branch from. We select the prior - // path whose position in the old string is the farthest from the origin - // and does not pass the bounds of the diff graph - if (!canRemove || canAdd && removePath.oldPos < addPath.oldPos) { - basePath = self.addToPath(addPath, true, false, 0, options); - } else { - basePath = self.addToPath(removePath, false, true, 1, options); - } - newPos = self.extractCommon(basePath, newString, oldString, diagonalPath, options); - if (basePath.oldPos + 1 >= oldLen && newPos + 1 >= newLen) { - // If we have hit the end of both strings, then we are done - return done(buildValues(self, basePath.lastComponent, newString, oldString, self.useLongestToken)); - } else { - bestPath[diagonalPath] = basePath; - if (basePath.oldPos + 1 >= oldLen) { - maxDiagonalToConsider = Math.min(maxDiagonalToConsider, diagonalPath - 1); - } - if (newPos + 1 >= newLen) { - minDiagonalToConsider = Math.max(minDiagonalToConsider, diagonalPath + 1); - } - } - } - editLength++; - } - - // Performs the length of edit iteration. Is a bit fugly as this has to support the - // sync and async mode which is never fun. Loops over execEditLength until a value - // is produced, or until the edit length exceeds options.maxEditLength (if given), - // in which case it will return undefined. - if (callback) { - (function exec() { - setTimeout(function () { - if (editLength > maxEditLength || Date.now() > abortAfterTimestamp) { - return callback(); - } - if (!execEditLength()) { - exec(); - } - }, 0); - })(); - } else { - while (editLength <= maxEditLength && Date.now() <= abortAfterTimestamp) { - var ret = execEditLength(); - if (ret) { - return ret; - } - } - } - }, - addToPath: function addToPath(path, added, removed, oldPosInc, options) { - var last = path.lastComponent; - if (last && !options.oneChangePerToken && last.added === added && last.removed === removed) { - return { - oldPos: path.oldPos + oldPosInc, - lastComponent: { - count: last.count + 1, - added: added, - removed: removed, - previousComponent: last.previousComponent - } - }; - } else { - return { - oldPos: path.oldPos + oldPosInc, - lastComponent: { - count: 1, - added: added, - removed: removed, - previousComponent: last - } - }; - } - }, - extractCommon: function extractCommon(basePath, newString, oldString, diagonalPath, options) { - var newLen = newString.length, - oldLen = oldString.length, - oldPos = basePath.oldPos, - newPos = oldPos - diagonalPath, - commonCount = 0; - while (newPos + 1 < newLen && oldPos + 1 < oldLen && this.equals(oldString[oldPos + 1], newString[newPos + 1], options)) { - newPos++; - oldPos++; - commonCount++; - if (options.oneChangePerToken) { - basePath.lastComponent = { - count: 1, - previousComponent: basePath.lastComponent, - added: false, - removed: false - }; - } - } - if (commonCount && !options.oneChangePerToken) { - basePath.lastComponent = { - count: commonCount, - previousComponent: basePath.lastComponent, - added: false, - removed: false - }; - } - basePath.oldPos = oldPos; - return newPos; - }, - equals: function equals(left, right, options) { - if (options.comparator) { - return options.comparator(left, right); - } else { - return left === right || options.ignoreCase && left.toLowerCase() === right.toLowerCase(); - } - }, - removeEmpty: function removeEmpty(array) { - var ret = []; - for (var i = 0; i < array.length; i++) { - if (array[i]) { - ret.push(array[i]); - } - } - return ret; - }, - castInput: function castInput(value) { - return value; - }, - tokenize: function tokenize(value) { - return Array.from(value); - }, - join: function join(chars) { - return chars.join(''); - }, - postProcess: function postProcess(changeObjects) { - return changeObjects; - } -}; -function buildValues(diff, lastComponent, newString, oldString, useLongestToken) { - // First we convert our linked list of components in reverse order to an - // array in the right order: - var components = []; - var nextComponent; - while (lastComponent) { - components.push(lastComponent); - nextComponent = lastComponent.previousComponent; - delete lastComponent.previousComponent; - lastComponent = nextComponent; - } - components.reverse(); - var componentPos = 0, - componentLen = components.length, - newPos = 0, - oldPos = 0; - for (; componentPos < componentLen; componentPos++) { - var component = components[componentPos]; - if (!component.removed) { - if (!component.added && useLongestToken) { - var value = newString.slice(newPos, newPos + component.count); - value = value.map(function (value, i) { - var oldValue = oldString[oldPos + i]; - return oldValue.length > value.length ? oldValue : value; - }); - component.value = diff.join(value); - } else { - component.value = diff.join(newString.slice(newPos, newPos + component.count)); - } - newPos += component.count; - - // Common case - if (!component.added) { - oldPos += component.count; - } - } else { - component.value = diff.join(oldString.slice(oldPos, oldPos + component.count)); - oldPos += component.count; - } - } - return components; -} - -var characterDiff = new Diff(); -function diffChars(oldStr, newStr, options) { - return characterDiff.diff(oldStr, newStr, options); -} - -function longestCommonPrefix(str1, str2) { - var i; - for (i = 0; i < str1.length && i < str2.length; i++) { - if (str1[i] != str2[i]) { - return str1.slice(0, i); - } - } - return str1.slice(0, i); -} -function longestCommonSuffix(str1, str2) { - var i; - - // Unlike longestCommonPrefix, we need a special case to handle all scenarios - // where we return the empty string since str1.slice(-0) will return the - // entire string. - if (!str1 || !str2 || str1[str1.length - 1] != str2[str2.length - 1]) { - return ''; - } - for (i = 0; i < str1.length && i < str2.length; i++) { - if (str1[str1.length - (i + 1)] != str2[str2.length - (i + 1)]) { - return str1.slice(-i); - } - } - return str1.slice(-i); -} -function replacePrefix(string, oldPrefix, newPrefix) { - if (string.slice(0, oldPrefix.length) != oldPrefix) { - throw Error("string ".concat(JSON.stringify(string), " doesn't start with prefix ").concat(JSON.stringify(oldPrefix), "; this is a bug")); - } - return newPrefix + string.slice(oldPrefix.length); -} -function replaceSuffix(string, oldSuffix, newSuffix) { - if (!oldSuffix) { - return string + newSuffix; - } - if (string.slice(-oldSuffix.length) != oldSuffix) { - throw Error("string ".concat(JSON.stringify(string), " doesn't end with suffix ").concat(JSON.stringify(oldSuffix), "; this is a bug")); - } - return string.slice(0, -oldSuffix.length) + newSuffix; -} -function removePrefix(string, oldPrefix) { - return replacePrefix(string, oldPrefix, ''); -} -function removeSuffix(string, oldSuffix) { - return replaceSuffix(string, oldSuffix, ''); -} -function maximumOverlap(string1, string2) { - return string2.slice(0, overlapCount(string1, string2)); -} - -// Nicked from https://stackoverflow.com/a/60422853/1709587 -function overlapCount(a, b) { - // Deal with cases where the strings differ in length - var startA = 0; - if (a.length > b.length) { - startA = a.length - b.length; - } - var endB = b.length; - if (a.length < b.length) { - endB = a.length; - } - // Create a back-reference for each index - // that should be followed in case of a mismatch. - // We only need B to make these references: - var map = Array(endB); - var k = 0; // Index that lags behind j - map[0] = 0; - for (var j = 1; j < endB; j++) { - if (b[j] == b[k]) { - map[j] = map[k]; // skip over the same character (optional optimisation) - } else { - map[j] = k; - } - while (k > 0 && b[j] != b[k]) { - k = map[k]; - } - if (b[j] == b[k]) { - k++; - } - } - // Phase 2: use these references while iterating over A - k = 0; - for (var i = startA; i < a.length; i++) { - while (k > 0 && a[i] != b[k]) { - k = map[k]; - } - if (a[i] == b[k]) { - k++; - } - } - return k; -} - -/** - * Returns true if the string consistently uses Windows line endings. - */ -function hasOnlyWinLineEndings(string) { - return string.includes('\r\n') && !string.startsWith('\n') && !string.match(/[^\r]\n/); -} - -/** - * Returns true if the string consistently uses Unix line endings. - */ -function hasOnlyUnixLineEndings(string) { - return !string.includes('\r\n') && string.includes('\n'); -} - -// Based on https://en.wikipedia.org/wiki/Latin_script_in_Unicode -// -// Ranges and exceptions: -// Latin-1 Supplement, 0080–00FF -// - U+00D7 × Multiplication sign -// - U+00F7 ÷ Division sign -// Latin Extended-A, 0100–017F -// Latin Extended-B, 0180–024F -// IPA Extensions, 0250–02AF -// Spacing Modifier Letters, 02B0–02FF -// - U+02C7 ˇ ˇ Caron -// - U+02D8 ˘ ˘ Breve -// - U+02D9 ˙ ˙ Dot Above -// - U+02DA ˚ ˚ Ring Above -// - U+02DB ˛ ˛ Ogonek -// - U+02DC ˜ ˜ Small Tilde -// - U+02DD ˝ ˝ Double Acute Accent -// Latin Extended Additional, 1E00–1EFF -var extendedWordChars = "a-zA-Z0-9_\\u{C0}-\\u{FF}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}"; - -// Each token is one of the following: -// - A punctuation mark plus the surrounding whitespace -// - A word plus the surrounding whitespace -// - Pure whitespace (but only in the special case where this the entire text -// is just whitespace) -// -// We have to include surrounding whitespace in the tokens because the two -// alternative approaches produce horribly broken results: -// * If we just discard the whitespace, we can't fully reproduce the original -// text from the sequence of tokens and any attempt to render the diff will -// get the whitespace wrong. -// * If we have separate tokens for whitespace, then in a typical text every -// second token will be a single space character. But this often results in -// the optimal diff between two texts being a perverse one that preserves -// the spaces between words but deletes and reinserts actual common words. -// See https://github.com/kpdecker/jsdiff/issues/160#issuecomment-1866099640 -// for an example. -// -// Keeping the surrounding whitespace of course has implications for .equals -// and .join, not just .tokenize. - -// This regex does NOT fully implement the tokenization rules described above. -// Instead, it gives runs of whitespace their own "token". The tokenize method -// then handles stitching whitespace tokens onto adjacent word or punctuation -// tokens. -var tokenizeIncludingWhitespace = new RegExp("[".concat(extendedWordChars, "]+|\\s+|[^").concat(extendedWordChars, "]"), 'ug'); -var wordDiff = new Diff(); -wordDiff.equals = function (left, right, options) { - if (options.ignoreCase) { - left = left.toLowerCase(); - right = right.toLowerCase(); - } - return left.trim() === right.trim(); -}; -wordDiff.tokenize = function (value) { - var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - var parts; - if (options.intlSegmenter) { - if (options.intlSegmenter.resolvedOptions().granularity != 'word') { - throw new Error('The segmenter passed must have a granularity of "word"'); - } - parts = Array.from(options.intlSegmenter.segment(value), function (segment) { - return segment.segment; - }); - } else { - parts = value.match(tokenizeIncludingWhitespace) || []; - } - var tokens = []; - var prevPart = null; - parts.forEach(function (part) { - if (/\s/.test(part)) { - if (prevPart == null) { - tokens.push(part); - } else { - tokens.push(tokens.pop() + part); - } - } else if (/\s/.test(prevPart)) { - if (tokens[tokens.length - 1] == prevPart) { - tokens.push(tokens.pop() + part); - } else { - tokens.push(prevPart + part); - } - } else { - tokens.push(part); - } - prevPart = part; - }); - return tokens; -}; -wordDiff.join = function (tokens) { - // Tokens being joined here will always have appeared consecutively in the - // same text, so we can simply strip off the leading whitespace from all the - // tokens except the first (and except any whitespace-only tokens - but such - // a token will always be the first and only token anyway) and then join them - // and the whitespace around words and punctuation will end up correct. - return tokens.map(function (token, i) { - if (i == 0) { - return token; - } else { - return token.replace(/^\s+/, ''); - } - }).join(''); -}; -wordDiff.postProcess = function (changes, options) { - if (!changes || options.oneChangePerToken) { - return changes; - } - var lastKeep = null; - // Change objects representing any insertion or deletion since the last - // "keep" change object. There can be at most one of each. - var insertion = null; - var deletion = null; - changes.forEach(function (change) { - if (change.added) { - insertion = change; - } else if (change.removed) { - deletion = change; - } else { - if (insertion || deletion) { - // May be false at start of text - dedupeWhitespaceInChangeObjects(lastKeep, deletion, insertion, change); - } - lastKeep = change; - insertion = null; - deletion = null; - } - }); - if (insertion || deletion) { - dedupeWhitespaceInChangeObjects(lastKeep, deletion, insertion, null); - } - return changes; -}; -function diffWords(oldStr, newStr, options) { - // This option has never been documented and never will be (it's clearer to - // just call `diffWordsWithSpace` directly if you need that behavior), but - // has existed in jsdiff for a long time, so we retain support for it here - // for the sake of backwards compatibility. - if ((options === null || options === void 0 ? void 0 : options.ignoreWhitespace) != null && !options.ignoreWhitespace) { - return diffWordsWithSpace(oldStr, newStr, options); - } - return wordDiff.diff(oldStr, newStr, options); -} -function dedupeWhitespaceInChangeObjects(startKeep, deletion, insertion, endKeep) { - // Before returning, we tidy up the leading and trailing whitespace of the - // change objects to eliminate cases where trailing whitespace in one object - // is repeated as leading whitespace in the next. - // Below are examples of the outcomes we want here to explain the code. - // I=insert, K=keep, D=delete - // 1. diffing 'foo bar baz' vs 'foo baz' - // Prior to cleanup, we have K:'foo ' D:' bar ' K:' baz' - // After cleanup, we want: K:'foo ' D:'bar ' K:'baz' - // - // 2. Diffing 'foo bar baz' vs 'foo qux baz' - // Prior to cleanup, we have K:'foo ' D:' bar ' I:' qux ' K:' baz' - // After cleanup, we want K:'foo ' D:'bar' I:'qux' K:' baz' - // - // 3. Diffing 'foo\nbar baz' vs 'foo baz' - // Prior to cleanup, we have K:'foo ' D:'\nbar ' K:' baz' - // After cleanup, we want K'foo' D:'\nbar' K:' baz' - // - // 4. Diffing 'foo baz' vs 'foo\nbar baz' - // Prior to cleanup, we have K:'foo\n' I:'\nbar ' K:' baz' - // After cleanup, we ideally want K'foo' I:'\nbar' K:' baz' - // but don't actually manage this currently (the pre-cleanup change - // objects don't contain enough information to make it possible). - // - // 5. Diffing 'foo bar baz' vs 'foo baz' - // Prior to cleanup, we have K:'foo ' D:' bar ' K:' baz' - // After cleanup, we want K:'foo ' D:' bar ' K:'baz' - // - // Our handling is unavoidably imperfect in the case where there's a single - // indel between keeps and the whitespace has changed. For instance, consider - // diffing 'foo\tbar\nbaz' vs 'foo baz'. Unless we create an extra change - // object to represent the insertion of the space character (which isn't even - // a token), we have no way to avoid losing information about the texts' - // original whitespace in the result we return. Still, we do our best to - // output something that will look sensible if we e.g. print it with - // insertions in green and deletions in red. - - // Between two "keep" change objects (or before the first or after the last - // change object), we can have either: - // * A "delete" followed by an "insert" - // * Just an "insert" - // * Just a "delete" - // We handle the three cases separately. - if (deletion && insertion) { - var oldWsPrefix = deletion.value.match(/^\s*/)[0]; - var oldWsSuffix = deletion.value.match(/\s*$/)[0]; - var newWsPrefix = insertion.value.match(/^\s*/)[0]; - var newWsSuffix = insertion.value.match(/\s*$/)[0]; - if (startKeep) { - var commonWsPrefix = longestCommonPrefix(oldWsPrefix, newWsPrefix); - startKeep.value = replaceSuffix(startKeep.value, newWsPrefix, commonWsPrefix); - deletion.value = removePrefix(deletion.value, commonWsPrefix); - insertion.value = removePrefix(insertion.value, commonWsPrefix); - } - if (endKeep) { - var commonWsSuffix = longestCommonSuffix(oldWsSuffix, newWsSuffix); - endKeep.value = replacePrefix(endKeep.value, newWsSuffix, commonWsSuffix); - deletion.value = removeSuffix(deletion.value, commonWsSuffix); - insertion.value = removeSuffix(insertion.value, commonWsSuffix); - } - } else if (insertion) { - // The whitespaces all reflect what was in the new text rather than - // the old, so we essentially have no information about whitespace - // insertion or deletion. We just want to dedupe the whitespace. - // We do that by having each change object keep its trailing - // whitespace and deleting duplicate leading whitespace where - // present. - if (startKeep) { - insertion.value = insertion.value.replace(/^\s*/, ''); - } - if (endKeep) { - endKeep.value = endKeep.value.replace(/^\s*/, ''); - } - // otherwise we've got a deletion and no insertion - } else if (startKeep && endKeep) { - var newWsFull = endKeep.value.match(/^\s*/)[0], - delWsStart = deletion.value.match(/^\s*/)[0], - delWsEnd = deletion.value.match(/\s*$/)[0]; - - // Any whitespace that comes straight after startKeep in both the old and - // new texts, assign to startKeep and remove from the deletion. - var newWsStart = longestCommonPrefix(newWsFull, delWsStart); - deletion.value = removePrefix(deletion.value, newWsStart); - - // Any whitespace that comes straight before endKeep in both the old and - // new texts, and hasn't already been assigned to startKeep, assign to - // endKeep and remove from the deletion. - var newWsEnd = longestCommonSuffix(removePrefix(newWsFull, newWsStart), delWsEnd); - deletion.value = removeSuffix(deletion.value, newWsEnd); - endKeep.value = replacePrefix(endKeep.value, newWsFull, newWsEnd); - - // If there's any whitespace from the new text that HASN'T already been - // assigned, assign it to the start: - startKeep.value = replaceSuffix(startKeep.value, newWsFull, newWsFull.slice(0, newWsFull.length - newWsEnd.length)); - } else if (endKeep) { - // We are at the start of the text. Preserve all the whitespace on - // endKeep, and just remove whitespace from the end of deletion to the - // extent that it overlaps with the start of endKeep. - var endKeepWsPrefix = endKeep.value.match(/^\s*/)[0]; - var deletionWsSuffix = deletion.value.match(/\s*$/)[0]; - var overlap = maximumOverlap(deletionWsSuffix, endKeepWsPrefix); - deletion.value = removeSuffix(deletion.value, overlap); - } else if (startKeep) { - // We are at the END of the text. Preserve all the whitespace on - // startKeep, and just remove whitespace from the start of deletion to - // the extent that it overlaps with the end of startKeep. - var startKeepWsSuffix = startKeep.value.match(/\s*$/)[0]; - var deletionWsPrefix = deletion.value.match(/^\s*/)[0]; - var _overlap = maximumOverlap(startKeepWsSuffix, deletionWsPrefix); - deletion.value = removePrefix(deletion.value, _overlap); - } -} -var wordWithSpaceDiff = new Diff(); -wordWithSpaceDiff.tokenize = function (value) { - // Slightly different to the tokenizeIncludingWhitespace regex used above in - // that this one treats each individual newline as a distinct tokens, rather - // than merging them into other surrounding whitespace. This was requested - // in https://github.com/kpdecker/jsdiff/issues/180 & - // https://github.com/kpdecker/jsdiff/issues/211 - var regex = new RegExp("(\\r?\\n)|[".concat(extendedWordChars, "]+|[^\\S\\n\\r]+|[^").concat(extendedWordChars, "]"), 'ug'); - return value.match(regex) || []; -}; -function diffWordsWithSpace(oldStr, newStr, options) { - return wordWithSpaceDiff.diff(oldStr, newStr, options); -} - -function generateOptions(options, defaults) { - if (typeof options === 'function') { - defaults.callback = options; - } else if (options) { - for (var name in options) { - /* istanbul ignore else */ - if (options.hasOwnProperty(name)) { - defaults[name] = options[name]; - } - } - } - return defaults; -} - -var lineDiff = new Diff(); -lineDiff.tokenize = function (value, options) { - if (options.stripTrailingCr) { - // remove one \r before \n to match GNU diff's --strip-trailing-cr behavior - value = value.replace(/\r\n/g, '\n'); - } - var retLines = [], - linesAndNewlines = value.split(/(\n|\r\n)/); - - // Ignore the final empty token that occurs if the string ends with a new line - if (!linesAndNewlines[linesAndNewlines.length - 1]) { - linesAndNewlines.pop(); - } - - // Merge the content and line separators into single tokens - for (var i = 0; i < linesAndNewlines.length; i++) { - var line = linesAndNewlines[i]; - if (i % 2 && !options.newlineIsToken) { - retLines[retLines.length - 1] += line; - } else { - retLines.push(line); - } - } - return retLines; -}; -lineDiff.equals = function (left, right, options) { - // If we're ignoring whitespace, we need to normalise lines by stripping - // whitespace before checking equality. (This has an annoying interaction - // with newlineIsToken that requires special handling: if newlines get their - // own token, then we DON'T want to trim the *newline* tokens down to empty - // strings, since this would cause us to treat whitespace-only line content - // as equal to a separator between lines, which would be weird and - // inconsistent with the documented behavior of the options.) - if (options.ignoreWhitespace) { - if (!options.newlineIsToken || !left.includes('\n')) { - left = left.trim(); - } - if (!options.newlineIsToken || !right.includes('\n')) { - right = right.trim(); - } - } else if (options.ignoreNewlineAtEof && !options.newlineIsToken) { - if (left.endsWith('\n')) { - left = left.slice(0, -1); - } - if (right.endsWith('\n')) { - right = right.slice(0, -1); - } - } - return Diff.prototype.equals.call(this, left, right, options); -}; -function diffLines(oldStr, newStr, callback) { - return lineDiff.diff(oldStr, newStr, callback); -} - -// Kept for backwards compatibility. This is a rather arbitrary wrapper method -// that just calls `diffLines` with `ignoreWhitespace: true`. It's confusing to -// have two ways to do exactly the same thing in the API, so we no longer -// document this one (library users should explicitly use `diffLines` with -// `ignoreWhitespace: true` instead) but we keep it around to maintain -// compatibility with code that used old versions. -function diffTrimmedLines(oldStr, newStr, callback) { - var options = generateOptions(callback, { - ignoreWhitespace: true - }); - return lineDiff.diff(oldStr, newStr, options); -} - -var sentenceDiff = new Diff(); -sentenceDiff.tokenize = function (value) { - return value.split(/(\S.+?[.!?])(?=\s+|$)/); -}; -function diffSentences(oldStr, newStr, callback) { - return sentenceDiff.diff(oldStr, newStr, callback); -} - -var cssDiff = new Diff(); -cssDiff.tokenize = function (value) { - return value.split(/([{}:;,]|\s+)/); -}; -function diffCss(oldStr, newStr, callback) { - return cssDiff.diff(oldStr, newStr, callback); -} - -function ownKeys(e, r) { - var t = Object.keys(e); - if (Object.getOwnPropertySymbols) { - var o = Object.getOwnPropertySymbols(e); - r && (o = o.filter(function (r) { - return Object.getOwnPropertyDescriptor(e, r).enumerable; - })), t.push.apply(t, o); - } - return t; -} -function _objectSpread2(e) { - for (var r = 1; r < arguments.length; r++) { - var t = null != arguments[r] ? arguments[r] : {}; - r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { - _defineProperty(e, r, t[r]); - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { - Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); - }); - } - return e; -} -function _toPrimitive(t, r) { - if ("object" != typeof t || !t) return t; - var e = t[Symbol.toPrimitive]; - if (void 0 !== e) { - var i = e.call(t, r || "default"); - if ("object" != typeof i) return i; - throw new TypeError("@@toPrimitive must return a primitive value."); - } - return ("string" === r ? String : Number)(t); -} -function _toPropertyKey(t) { - var i = _toPrimitive(t, "string"); - return "symbol" == typeof i ? i : i + ""; -} -function _typeof(o) { - "@babel/helpers - typeof"; - - return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { - return typeof o; - } : function (o) { - return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; - }, _typeof(o); -} -function _defineProperty(obj, key, value) { - key = _toPropertyKey(key); - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} -function _toConsumableArray(arr) { - return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); -} -function _arrayWithoutHoles(arr) { - if (Array.isArray(arr)) return _arrayLikeToArray(arr); -} -function _iterableToArray(iter) { - 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); - var n = Object.prototype.toString.call(o).slice(8, -1); - if (n === "Object" && o.constructor) n = o.constructor.name; - 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."); -} - -var jsonDiff = new Diff(); -// Discriminate between two lines of pretty-printed, serialized JSON where one of them has a -// dangling comma and the other doesn't. Turns out including the dangling comma yields the nicest output: -jsonDiff.useLongestToken = true; -jsonDiff.tokenize = lineDiff.tokenize; -jsonDiff.castInput = function (value, options) { - var undefinedReplacement = options.undefinedReplacement, - _options$stringifyRep = options.stringifyReplacer, - stringifyReplacer = _options$stringifyRep === void 0 ? function (k, v) { - return typeof v === 'undefined' ? undefinedReplacement : v; - } : _options$stringifyRep; - return typeof value === 'string' ? value : JSON.stringify(canonicalize(value, null, null, stringifyReplacer), stringifyReplacer, ' '); -}; -jsonDiff.equals = function (left, right, options) { - return Diff.prototype.equals.call(jsonDiff, left.replace(/,([\r\n])/g, '$1'), right.replace(/,([\r\n])/g, '$1'), options); -}; -function diffJson(oldObj, newObj, options) { - return jsonDiff.diff(oldObj, newObj, options); -} - -// This function handles the presence of circular references by bailing out when encountering an -// object that is already on the "stack" of items being processed. Accepts an optional replacer -function canonicalize(obj, stack, replacementStack, replacer, key) { - stack = stack || []; - replacementStack = replacementStack || []; - if (replacer) { - obj = replacer(key, obj); - } - var i; - for (i = 0; i < stack.length; i += 1) { - if (stack[i] === obj) { - return replacementStack[i]; - } - } - var canonicalizedObj; - if ('[object Array]' === Object.prototype.toString.call(obj)) { - stack.push(obj); - canonicalizedObj = new Array(obj.length); - replacementStack.push(canonicalizedObj); - for (i = 0; i < obj.length; i += 1) { - canonicalizedObj[i] = canonicalize(obj[i], stack, replacementStack, replacer, key); - } - stack.pop(); - replacementStack.pop(); - return canonicalizedObj; - } - if (obj && obj.toJSON) { - obj = obj.toJSON(); - } - if (_typeof(obj) === 'object' && obj !== null) { - stack.push(obj); - canonicalizedObj = {}; - replacementStack.push(canonicalizedObj); - var sortedKeys = [], - _key; - for (_key in obj) { - /* istanbul ignore else */ - if (Object.prototype.hasOwnProperty.call(obj, _key)) { - sortedKeys.push(_key); - } - } - sortedKeys.sort(); - for (i = 0; i < sortedKeys.length; i += 1) { - _key = sortedKeys[i]; - canonicalizedObj[_key] = canonicalize(obj[_key], stack, replacementStack, replacer, _key); - } - stack.pop(); - replacementStack.pop(); - } else { - canonicalizedObj = obj; - } - return canonicalizedObj; -} - -var arrayDiff = new Diff(); -arrayDiff.tokenize = function (value) { - return value.slice(); -}; -arrayDiff.join = arrayDiff.removeEmpty = function (value) { - return value; -}; -function diffArrays(oldArr, newArr, callback) { - return arrayDiff.diff(oldArr, newArr, callback); -} - -function unixToWin(patch) { - if (Array.isArray(patch)) { - return patch.map(unixToWin); - } - return _objectSpread2(_objectSpread2({}, patch), {}, { - hunks: patch.hunks.map(function (hunk) { - return _objectSpread2(_objectSpread2({}, hunk), {}, { - lines: hunk.lines.map(function (line, i) { - var _hunk$lines; - return line.startsWith('\\') || line.endsWith('\r') || (_hunk$lines = hunk.lines[i + 1]) !== null && _hunk$lines !== void 0 && _hunk$lines.startsWith('\\') ? line : line + '\r'; - }) - }); - }) - }); -} -function winToUnix(patch) { - if (Array.isArray(patch)) { - return patch.map(winToUnix); - } - return _objectSpread2(_objectSpread2({}, patch), {}, { - hunks: patch.hunks.map(function (hunk) { - return _objectSpread2(_objectSpread2({}, hunk), {}, { - lines: hunk.lines.map(function (line) { - return line.endsWith('\r') ? line.substring(0, line.length - 1) : line; - }) - }); - }) - }); -} - -/** - * Returns true if the patch consistently uses Unix line endings (or only involves one line and has - * no line endings). - */ -function isUnix(patch) { - if (!Array.isArray(patch)) { - patch = [patch]; - } - return !patch.some(function (index) { - return index.hunks.some(function (hunk) { - return hunk.lines.some(function (line) { - return !line.startsWith('\\') && line.endsWith('\r'); - }); - }); - }); -} - -/** - * Returns true if the patch uses Windows line endings and only Windows line endings. - */ -function isWin(patch) { - if (!Array.isArray(patch)) { - patch = [patch]; - } - return patch.some(function (index) { - return index.hunks.some(function (hunk) { - return hunk.lines.some(function (line) { - return line.endsWith('\r'); - }); - }); - }) && patch.every(function (index) { - return index.hunks.every(function (hunk) { - return hunk.lines.every(function (line, i) { - var _hunk$lines2; - return line.startsWith('\\') || line.endsWith('\r') || ((_hunk$lines2 = hunk.lines[i + 1]) === null || _hunk$lines2 === void 0 ? void 0 : _hunk$lines2.startsWith('\\')); - }); - }); - }); -} - -function parsePatch(uniDiff) { - var diffstr = uniDiff.split(/\n/), - list = [], - i = 0; - function parseIndex() { - var index = {}; - list.push(index); - - // Parse diff metadata - while (i < diffstr.length) { - var line = diffstr[i]; - - // File header found, end parsing diff metadata - if (/^(\-\-\-|\+\+\+|@@)\s/.test(line)) { - break; - } - - // Diff index - var header = /^(?:Index:|diff(?: -r \w+)+)\s+(.+?)\s*$/.exec(line); - if (header) { - index.index = header[1]; - } - i++; - } - - // Parse file headers if they are defined. Unified diff requires them, but - // there's no technical issues to have an isolated hunk without file header - parseFileHeader(index); - parseFileHeader(index); - - // Parse hunks - index.hunks = []; - while (i < diffstr.length) { - var _line = diffstr[i]; - if (/^(Index:\s|diff\s|\-\-\-\s|\+\+\+\s|===================================================================)/.test(_line)) { - break; - } else if (/^@@/.test(_line)) { - index.hunks.push(parseHunk()); - } else if (_line) { - throw new Error('Unknown line ' + (i + 1) + ' ' + JSON.stringify(_line)); - } else { - i++; - } - } - } - - // Parses the --- and +++ headers, if none are found, no lines - // are consumed. - function parseFileHeader(index) { - var fileHeader = /^(---|\+\+\+)\s+(.*)\r?$/.exec(diffstr[i]); - if (fileHeader) { - var keyPrefix = fileHeader[1] === '---' ? 'old' : 'new'; - var data = fileHeader[2].split('\t', 2); - var fileName = data[0].replace(/\\\\/g, '\\'); - if (/^".*"$/.test(fileName)) { - fileName = fileName.substr(1, fileName.length - 2); - } - index[keyPrefix + 'FileName'] = fileName; - index[keyPrefix + 'Header'] = (data[1] || '').trim(); - i++; - } - } - - // Parses a hunk - // This assumes that we are at the start of a hunk. - function parseHunk() { - var chunkHeaderIndex = i, - chunkHeaderLine = diffstr[i++], - chunkHeader = chunkHeaderLine.split(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/); - var hunk = { - oldStart: +chunkHeader[1], - oldLines: typeof chunkHeader[2] === 'undefined' ? 1 : +chunkHeader[2], - newStart: +chunkHeader[3], - newLines: typeof chunkHeader[4] === 'undefined' ? 1 : +chunkHeader[4], - lines: [] - }; - - // Unified Diff Format quirk: If the chunk size is 0, - // the first number is one lower than one would expect. - // https://www.artima.com/weblogs/viewpost.jsp?thread=164293 - if (hunk.oldLines === 0) { - hunk.oldStart += 1; - } - if (hunk.newLines === 0) { - hunk.newStart += 1; - } - var addCount = 0, - removeCount = 0; - for (; i < diffstr.length && (removeCount < hunk.oldLines || addCount < hunk.newLines || (_diffstr$i = diffstr[i]) !== null && _diffstr$i !== void 0 && _diffstr$i.startsWith('\\')); i++) { - var _diffstr$i; - var operation = diffstr[i].length == 0 && i != diffstr.length - 1 ? ' ' : diffstr[i][0]; - if (operation === '+' || operation === '-' || operation === ' ' || operation === '\\') { - hunk.lines.push(diffstr[i]); - if (operation === '+') { - addCount++; - } else if (operation === '-') { - removeCount++; - } else if (operation === ' ') { - addCount++; - removeCount++; - } - } else { - throw new Error("Hunk at line ".concat(chunkHeaderIndex + 1, " contained invalid line ").concat(diffstr[i])); - } - } - - // Handle the empty block count case - if (!addCount && hunk.newLines === 1) { - hunk.newLines = 0; - } - if (!removeCount && hunk.oldLines === 1) { - hunk.oldLines = 0; - } - - // Perform sanity checking - if (addCount !== hunk.newLines) { - throw new Error('Added line count did not match for hunk at line ' + (chunkHeaderIndex + 1)); - } - if (removeCount !== hunk.oldLines) { - throw new Error('Removed line count did not match for hunk at line ' + (chunkHeaderIndex + 1)); - } - return hunk; - } - while (i < diffstr.length) { - parseIndex(); - } - return list; -} - -// Iterator that traverses in the range of [min, max], stepping -// by distance from a given start position. I.e. for [0, 4], with -// start of 2, this will iterate 2, 3, 1, 4, 0. -function distanceIterator (start, minLine, maxLine) { - var wantForward = true, - backwardExhausted = false, - forwardExhausted = false, - localOffset = 1; - return function iterator() { - if (wantForward && !forwardExhausted) { - if (backwardExhausted) { - localOffset++; - } else { - wantForward = false; - } - - // Check if trying to fit beyond text length, and if not, check it fits - // after offset location (or desired location on first iteration) - if (start + localOffset <= maxLine) { - return start + localOffset; - } - forwardExhausted = true; - } - if (!backwardExhausted) { - if (!forwardExhausted) { - wantForward = true; - } - - // Check if trying to fit before text beginning, and if not, check it fits - // before offset location - if (minLine <= start - localOffset) { - return start - localOffset++; - } - backwardExhausted = true; - return iterator(); - } - - // We tried to fit hunk before text beginning and beyond text length, then - // hunk can't fit on the text. Return undefined - }; -} - -function applyPatch(source, uniDiff) { - var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; - if (typeof uniDiff === 'string') { - uniDiff = parsePatch(uniDiff); - } - if (Array.isArray(uniDiff)) { - if (uniDiff.length > 1) { - throw new Error('applyPatch only works with a single input.'); - } - uniDiff = uniDiff[0]; - } - if (options.autoConvertLineEndings || options.autoConvertLineEndings == null) { - if (hasOnlyWinLineEndings(source) && isUnix(uniDiff)) { - uniDiff = unixToWin(uniDiff); - } else if (hasOnlyUnixLineEndings(source) && isWin(uniDiff)) { - uniDiff = winToUnix(uniDiff); - } - } - - // Apply the diff to the input - var lines = source.split('\n'), - hunks = uniDiff.hunks, - compareLine = options.compareLine || function (lineNumber, line, operation, patchContent) { - return line === patchContent; - }, - fuzzFactor = options.fuzzFactor || 0, - minLine = 0; - if (fuzzFactor < 0 || !Number.isInteger(fuzzFactor)) { - throw new Error('fuzzFactor must be a non-negative integer'); - } - - // Special case for empty patch. - if (!hunks.length) { - return source; - } - - // Before anything else, handle EOFNL insertion/removal. If the patch tells us to make a change - // to the EOFNL that is redundant/impossible - i.e. to remove a newline that's not there, or add a - // newline that already exists - then we either return false and fail to apply the patch (if - // fuzzFactor is 0) or simply ignore the problem and do nothing (if fuzzFactor is >0). - // If we do need to remove/add a newline at EOF, this will always be in the final hunk: - var prevLine = '', - removeEOFNL = false, - addEOFNL = false; - for (var i = 0; i < hunks[hunks.length - 1].lines.length; i++) { - var line = hunks[hunks.length - 1].lines[i]; - if (line[0] == '\\') { - if (prevLine[0] == '+') { - removeEOFNL = true; - } else if (prevLine[0] == '-') { - addEOFNL = true; - } - } - prevLine = line; - } - if (removeEOFNL) { - if (addEOFNL) { - // This means the final line gets changed but doesn't have a trailing newline in either the - // original or patched version. In that case, we do nothing if fuzzFactor > 0, and if - // fuzzFactor is 0, we simply validate that the source file has no trailing newline. - if (!fuzzFactor && lines[lines.length - 1] == '') { - return false; - } - } else if (lines[lines.length - 1] == '') { - lines.pop(); - } else if (!fuzzFactor) { - return false; - } - } else if (addEOFNL) { - if (lines[lines.length - 1] != '') { - lines.push(''); - } else if (!fuzzFactor) { - return false; - } - } - - /** - * Checks if the hunk can be made to fit at the provided location with at most `maxErrors` - * insertions, substitutions, or deletions, while ensuring also that: - * - lines deleted in the hunk match exactly, and - * - wherever an insertion operation or block of insertion operations appears in the hunk, the - * immediately preceding and following lines of context match exactly - * - * `toPos` should be set such that lines[toPos] is meant to match hunkLines[0]. - * - * If the hunk can be applied, returns an object with properties `oldLineLastI` and - * `replacementLines`. Otherwise, returns null. - */ - function applyHunk(hunkLines, toPos, maxErrors) { - var hunkLinesI = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0; - var lastContextLineMatched = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true; - var patchedLines = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : []; - var patchedLinesLength = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : 0; - var nConsecutiveOldContextLines = 0; - var nextContextLineMustMatch = false; - for (; hunkLinesI < hunkLines.length; hunkLinesI++) { - var hunkLine = hunkLines[hunkLinesI], - operation = hunkLine.length > 0 ? hunkLine[0] : ' ', - content = hunkLine.length > 0 ? hunkLine.substr(1) : hunkLine; - if (operation === '-') { - if (compareLine(toPos + 1, lines[toPos], operation, content)) { - toPos++; - nConsecutiveOldContextLines = 0; - } else { - if (!maxErrors || lines[toPos] == null) { - return null; - } - patchedLines[patchedLinesLength] = lines[toPos]; - return applyHunk(hunkLines, toPos + 1, maxErrors - 1, hunkLinesI, false, patchedLines, patchedLinesLength + 1); - } - } - if (operation === '+') { - if (!lastContextLineMatched) { - return null; - } - patchedLines[patchedLinesLength] = content; - patchedLinesLength++; - nConsecutiveOldContextLines = 0; - nextContextLineMustMatch = true; - } - if (operation === ' ') { - nConsecutiveOldContextLines++; - patchedLines[patchedLinesLength] = lines[toPos]; - if (compareLine(toPos + 1, lines[toPos], operation, content)) { - patchedLinesLength++; - lastContextLineMatched = true; - nextContextLineMustMatch = false; - toPos++; - } else { - if (nextContextLineMustMatch || !maxErrors) { - return null; - } - - // Consider 3 possibilities in sequence: - // 1. lines contains a *substitution* not included in the patch context, or - // 2. lines contains an *insertion* not included in the patch context, or - // 3. lines contains a *deletion* not included in the patch context - // The first two options are of course only possible if the line from lines is non-null - - // i.e. only option 3 is possible if we've overrun the end of the old file. - return lines[toPos] && (applyHunk(hunkLines, toPos + 1, maxErrors - 1, hunkLinesI + 1, false, patchedLines, patchedLinesLength + 1) || applyHunk(hunkLines, toPos + 1, maxErrors - 1, hunkLinesI, false, patchedLines, patchedLinesLength + 1)) || applyHunk(hunkLines, toPos, maxErrors - 1, hunkLinesI + 1, false, patchedLines, patchedLinesLength); - } - } - } - - // Before returning, trim any unmodified context lines off the end of patchedLines and reduce - // toPos (and thus oldLineLastI) accordingly. This allows later hunks to be applied to a region - // that starts in this hunk's trailing context. - patchedLinesLength -= nConsecutiveOldContextLines; - toPos -= nConsecutiveOldContextLines; - patchedLines.length = patchedLinesLength; - return { - patchedLines: patchedLines, - oldLineLastI: toPos - 1 - }; - } - var resultLines = []; - - // Search best fit offsets for each hunk based on the previous ones - var prevHunkOffset = 0; - for (var _i = 0; _i < hunks.length; _i++) { - var hunk = hunks[_i]; - var hunkResult = void 0; - var maxLine = lines.length - hunk.oldLines + fuzzFactor; - var toPos = void 0; - for (var maxErrors = 0; maxErrors <= fuzzFactor; maxErrors++) { - toPos = hunk.oldStart + prevHunkOffset - 1; - var iterator = distanceIterator(toPos, minLine, maxLine); - for (; toPos !== undefined; toPos = iterator()) { - hunkResult = applyHunk(hunk.lines, toPos, maxErrors); - if (hunkResult) { - break; - } - } - if (hunkResult) { - break; - } - } - if (!hunkResult) { - return false; - } - - // Copy everything from the end of where we applied the last hunk to the start of this hunk - for (var _i2 = minLine; _i2 < toPos; _i2++) { - resultLines.push(lines[_i2]); - } - - // Add the lines produced by applying the hunk: - for (var _i3 = 0; _i3 < hunkResult.patchedLines.length; _i3++) { - var _line = hunkResult.patchedLines[_i3]; - resultLines.push(_line); - } - - // Set lower text limit to end of the current hunk, so next ones don't try - // to fit over already patched text - minLine = hunkResult.oldLineLastI + 1; - - // Note the offset between where the patch said the hunk should've applied and where we - // applied it, so we can adjust future hunks accordingly: - prevHunkOffset = toPos + 1 - hunk.oldStart; - } - - // Copy over the rest of the lines from the old text - for (var _i4 = minLine; _i4 < lines.length; _i4++) { - resultLines.push(lines[_i4]); - } - return resultLines.join('\n'); -} - -// Wrapper that supports multiple file patches via callbacks. -function applyPatches(uniDiff, options) { - if (typeof uniDiff === 'string') { - uniDiff = parsePatch(uniDiff); - } - var currentIndex = 0; - function processIndex() { - var index = uniDiff[currentIndex++]; - if (!index) { - return options.complete(); - } - options.loadFile(index, function (err, data) { - if (err) { - return options.complete(err); - } - var updatedContent = applyPatch(data, index, options); - options.patched(index, updatedContent, function (err) { - if (err) { - return options.complete(err); - } - processIndex(); - }); - }); - } - processIndex(); -} - -function structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) { - if (!options) { - options = {}; - } - if (typeof options === 'function') { - options = { - callback: options - }; - } - if (typeof options.context === 'undefined') { - options.context = 4; - } - if (options.newlineIsToken) { - throw new Error('newlineIsToken may not be used with patch-generation functions, only with diffing functions'); - } - if (!options.callback) { - return diffLinesResultToPatch(diffLines(oldStr, newStr, options)); - } else { - var _options = options, - _callback = _options.callback; - diffLines(oldStr, newStr, _objectSpread2(_objectSpread2({}, options), {}, { - callback: function callback(diff) { - var patch = diffLinesResultToPatch(diff); - _callback(patch); - } - })); - } - function diffLinesResultToPatch(diff) { - // STEP 1: Build up the patch with no "\ No newline at end of file" lines and with the arrays - // of lines containing trailing newline characters. We'll tidy up later... - - if (!diff) { - return; - } - diff.push({ - value: '', - lines: [] - }); // Append an empty value to make cleanup easier - - function contextLines(lines) { - return lines.map(function (entry) { - return ' ' + entry; - }); - } - var hunks = []; - var oldRangeStart = 0, - newRangeStart = 0, - curRange = [], - oldLine = 1, - newLine = 1; - var _loop = function _loop() { - var current = diff[i], - lines = current.lines || splitLines(current.value); - current.lines = lines; - if (current.added || current.removed) { - var _curRange; - // If we have previous context, start with that - if (!oldRangeStart) { - var prev = diff[i - 1]; - oldRangeStart = oldLine; - newRangeStart = newLine; - if (prev) { - curRange = options.context > 0 ? contextLines(prev.lines.slice(-options.context)) : []; - oldRangeStart -= curRange.length; - newRangeStart -= curRange.length; - } - } - - // Output our changes - (_curRange = curRange).push.apply(_curRange, _toConsumableArray(lines.map(function (entry) { - return (current.added ? '+' : '-') + entry; - }))); - - // Track the updated file position - if (current.added) { - newLine += lines.length; - } else { - oldLine += lines.length; - } - } else { - // Identical context lines. Track line changes - if (oldRangeStart) { - // Close out any changes that have been output (or join overlapping) - if (lines.length <= options.context * 2 && i < diff.length - 2) { - var _curRange2; - // Overlapping - (_curRange2 = curRange).push.apply(_curRange2, _toConsumableArray(contextLines(lines))); - } else { - var _curRange3; - // end the range and output - var contextSize = Math.min(lines.length, options.context); - (_curRange3 = curRange).push.apply(_curRange3, _toConsumableArray(contextLines(lines.slice(0, contextSize)))); - var _hunk = { - oldStart: oldRangeStart, - oldLines: oldLine - oldRangeStart + contextSize, - newStart: newRangeStart, - newLines: newLine - newRangeStart + contextSize, - lines: curRange - }; - hunks.push(_hunk); - oldRangeStart = 0; - newRangeStart = 0; - curRange = []; - } - } - oldLine += lines.length; - newLine += lines.length; - } - }; - for (var i = 0; i < diff.length; i++) { - _loop(); - } - - // Step 2: eliminate the trailing `\n` from each line of each hunk, and, where needed, add - // "\ No newline at end of file". - for (var _i = 0, _hunks = hunks; _i < _hunks.length; _i++) { - var hunk = _hunks[_i]; - for (var _i2 = 0; _i2 < hunk.lines.length; _i2++) { - if (hunk.lines[_i2].endsWith('\n')) { - hunk.lines[_i2] = hunk.lines[_i2].slice(0, -1); - } else { - hunk.lines.splice(_i2 + 1, 0, '\\ No newline at end of file'); - _i2++; // Skip the line we just added, then continue iterating - } - } - } - return { - oldFileName: oldFileName, - newFileName: newFileName, - oldHeader: oldHeader, - newHeader: newHeader, - hunks: hunks - }; - } -} -function formatPatch(diff) { - if (Array.isArray(diff)) { - return diff.map(formatPatch).join('\n'); - } - var ret = []; - if (diff.oldFileName == diff.newFileName) { - ret.push('Index: ' + diff.oldFileName); - } - ret.push('==================================================================='); - ret.push('--- ' + diff.oldFileName + (typeof diff.oldHeader === 'undefined' ? '' : '\t' + diff.oldHeader)); - ret.push('+++ ' + diff.newFileName + (typeof diff.newHeader === 'undefined' ? '' : '\t' + diff.newHeader)); - for (var i = 0; i < diff.hunks.length; i++) { - var hunk = diff.hunks[i]; - // Unified Diff Format quirk: If the chunk size is 0, - // the first number is one lower than one would expect. - // https://www.artima.com/weblogs/viewpost.jsp?thread=164293 - if (hunk.oldLines === 0) { - hunk.oldStart -= 1; - } - if (hunk.newLines === 0) { - hunk.newStart -= 1; - } - ret.push('@@ -' + hunk.oldStart + ',' + hunk.oldLines + ' +' + hunk.newStart + ',' + hunk.newLines + ' @@'); - ret.push.apply(ret, hunk.lines); - } - return ret.join('\n') + '\n'; -} -function createTwoFilesPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) { - var _options2; - if (typeof options === 'function') { - options = { - callback: options - }; - } - if (!((_options2 = options) !== null && _options2 !== void 0 && _options2.callback)) { - var patchObj = structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options); - if (!patchObj) { - return; - } - return formatPatch(patchObj); - } else { - var _options3 = options, - _callback2 = _options3.callback; - structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, _objectSpread2(_objectSpread2({}, options), {}, { - callback: function callback(patchObj) { - if (!patchObj) { - _callback2(); - } else { - _callback2(formatPatch(patchObj)); - } - } - })); - } -} -function createPatch(fileName, oldStr, newStr, oldHeader, newHeader, options) { - return createTwoFilesPatch(fileName, fileName, oldStr, newStr, oldHeader, newHeader, options); -} - -/** - * Split `text` into an array of lines, including the trailing newline character (where present) - */ -function splitLines(text) { - var hasTrailingNl = text.endsWith('\n'); - var result = text.split('\n').map(function (line) { - return line + '\n'; - }); - if (hasTrailingNl) { - result.pop(); - } else { - result.push(result.pop().slice(0, -1)); - } - return result; -} - -function arrayEqual(a, b) { - if (a.length !== b.length) { - return false; - } - return arrayStartsWith(a, b); -} -function arrayStartsWith(array, start) { - if (start.length > array.length) { - return false; - } - for (var i = 0; i < start.length; i++) { - if (start[i] !== array[i]) { - return false; - } - } - return true; -} - -function calcLineCount(hunk) { - var _calcOldNewLineCount = calcOldNewLineCount(hunk.lines), - oldLines = _calcOldNewLineCount.oldLines, - newLines = _calcOldNewLineCount.newLines; - if (oldLines !== undefined) { - hunk.oldLines = oldLines; - } else { - delete hunk.oldLines; - } - if (newLines !== undefined) { - hunk.newLines = newLines; - } else { - delete hunk.newLines; - } -} -function merge(mine, theirs, base) { - mine = loadPatch(mine, base); - theirs = loadPatch(theirs, base); - var ret = {}; - - // For index we just let it pass through as it doesn't have any necessary meaning. - // Leaving sanity checks on this to the API consumer that may know more about the - // meaning in their own context. - if (mine.index || theirs.index) { - ret.index = mine.index || theirs.index; - } - if (mine.newFileName || theirs.newFileName) { - if (!fileNameChanged(mine)) { - // No header or no change in ours, use theirs (and ours if theirs does not exist) - ret.oldFileName = theirs.oldFileName || mine.oldFileName; - ret.newFileName = theirs.newFileName || mine.newFileName; - ret.oldHeader = theirs.oldHeader || mine.oldHeader; - ret.newHeader = theirs.newHeader || mine.newHeader; - } else if (!fileNameChanged(theirs)) { - // No header or no change in theirs, use ours - ret.oldFileName = mine.oldFileName; - ret.newFileName = mine.newFileName; - ret.oldHeader = mine.oldHeader; - ret.newHeader = mine.newHeader; - } else { - // Both changed... figure it out - ret.oldFileName = selectField(ret, mine.oldFileName, theirs.oldFileName); - ret.newFileName = selectField(ret, mine.newFileName, theirs.newFileName); - ret.oldHeader = selectField(ret, mine.oldHeader, theirs.oldHeader); - ret.newHeader = selectField(ret, mine.newHeader, theirs.newHeader); - } - } - ret.hunks = []; - var mineIndex = 0, - theirsIndex = 0, - mineOffset = 0, - theirsOffset = 0; - while (mineIndex < mine.hunks.length || theirsIndex < theirs.hunks.length) { - var mineCurrent = mine.hunks[mineIndex] || { - oldStart: Infinity - }, - theirsCurrent = theirs.hunks[theirsIndex] || { - oldStart: Infinity - }; - if (hunkBefore(mineCurrent, theirsCurrent)) { - // This patch does not overlap with any of the others, yay. - ret.hunks.push(cloneHunk(mineCurrent, mineOffset)); - mineIndex++; - theirsOffset += mineCurrent.newLines - mineCurrent.oldLines; - } else if (hunkBefore(theirsCurrent, mineCurrent)) { - // This patch does not overlap with any of the others, yay. - ret.hunks.push(cloneHunk(theirsCurrent, theirsOffset)); - theirsIndex++; - mineOffset += theirsCurrent.newLines - theirsCurrent.oldLines; - } else { - // Overlap, merge as best we can - var mergedHunk = { - oldStart: Math.min(mineCurrent.oldStart, theirsCurrent.oldStart), - oldLines: 0, - newStart: Math.min(mineCurrent.newStart + mineOffset, theirsCurrent.oldStart + theirsOffset), - newLines: 0, - lines: [] - }; - mergeLines(mergedHunk, mineCurrent.oldStart, mineCurrent.lines, theirsCurrent.oldStart, theirsCurrent.lines); - theirsIndex++; - mineIndex++; - ret.hunks.push(mergedHunk); - } - } - return ret; -} -function loadPatch(param, base) { - if (typeof param === 'string') { - if (/^@@/m.test(param) || /^Index:/m.test(param)) { - return parsePatch(param)[0]; - } - if (!base) { - throw new Error('Must provide a base reference or pass in a patch'); - } - return structuredPatch(undefined, undefined, base, param); - } - return param; -} -function fileNameChanged(patch) { - return patch.newFileName && patch.newFileName !== patch.oldFileName; -} -function selectField(index, mine, theirs) { - if (mine === theirs) { - return mine; - } else { - index.conflict = true; - return { - mine: mine, - theirs: theirs - }; - } -} -function hunkBefore(test, check) { - return test.oldStart < check.oldStart && test.oldStart + test.oldLines < check.oldStart; -} -function cloneHunk(hunk, offset) { - return { - oldStart: hunk.oldStart, - oldLines: hunk.oldLines, - newStart: hunk.newStart + offset, - newLines: hunk.newLines, - lines: hunk.lines - }; -} -function mergeLines(hunk, mineOffset, mineLines, theirOffset, theirLines) { - // This will generally result in a conflicted hunk, but there are cases where the context - // is the only overlap where we can successfully merge the content here. - var mine = { - offset: mineOffset, - lines: mineLines, - index: 0 - }, - their = { - offset: theirOffset, - lines: theirLines, - index: 0 - }; - - // Handle any leading content - insertLeading(hunk, mine, their); - insertLeading(hunk, their, mine); - - // Now in the overlap content. Scan through and select the best changes from each. - while (mine.index < mine.lines.length && their.index < their.lines.length) { - var mineCurrent = mine.lines[mine.index], - theirCurrent = their.lines[their.index]; - if ((mineCurrent[0] === '-' || mineCurrent[0] === '+') && (theirCurrent[0] === '-' || theirCurrent[0] === '+')) { - // Both modified ... - mutualChange(hunk, mine, their); - } else if (mineCurrent[0] === '+' && theirCurrent[0] === ' ') { - var _hunk$lines; - // Mine inserted - (_hunk$lines = hunk.lines).push.apply(_hunk$lines, _toConsumableArray(collectChange(mine))); - } else if (theirCurrent[0] === '+' && mineCurrent[0] === ' ') { - var _hunk$lines2; - // Theirs inserted - (_hunk$lines2 = hunk.lines).push.apply(_hunk$lines2, _toConsumableArray(collectChange(their))); - } else if (mineCurrent[0] === '-' && theirCurrent[0] === ' ') { - // Mine removed or edited - removal(hunk, mine, their); - } else if (theirCurrent[0] === '-' && mineCurrent[0] === ' ') { - // Their removed or edited - removal(hunk, their, mine, true); - } else if (mineCurrent === theirCurrent) { - // Context identity - hunk.lines.push(mineCurrent); - mine.index++; - their.index++; - } else { - // Context mismatch - conflict(hunk, collectChange(mine), collectChange(their)); - } - } - - // Now push anything that may be remaining - insertTrailing(hunk, mine); - insertTrailing(hunk, their); - calcLineCount(hunk); -} -function mutualChange(hunk, mine, their) { - var myChanges = collectChange(mine), - theirChanges = collectChange(their); - if (allRemoves(myChanges) && allRemoves(theirChanges)) { - // Special case for remove changes that are supersets of one another - if (arrayStartsWith(myChanges, theirChanges) && skipRemoveSuperset(their, myChanges, myChanges.length - theirChanges.length)) { - var _hunk$lines3; - (_hunk$lines3 = hunk.lines).push.apply(_hunk$lines3, _toConsumableArray(myChanges)); - return; - } else if (arrayStartsWith(theirChanges, myChanges) && skipRemoveSuperset(mine, theirChanges, theirChanges.length - myChanges.length)) { - var _hunk$lines4; - (_hunk$lines4 = hunk.lines).push.apply(_hunk$lines4, _toConsumableArray(theirChanges)); - return; - } - } else if (arrayEqual(myChanges, theirChanges)) { - var _hunk$lines5; - (_hunk$lines5 = hunk.lines).push.apply(_hunk$lines5, _toConsumableArray(myChanges)); - return; - } - conflict(hunk, myChanges, theirChanges); -} -function removal(hunk, mine, their, swap) { - var myChanges = collectChange(mine), - theirChanges = collectContext(their, myChanges); - if (theirChanges.merged) { - var _hunk$lines6; - (_hunk$lines6 = hunk.lines).push.apply(_hunk$lines6, _toConsumableArray(theirChanges.merged)); - } else { - conflict(hunk, swap ? theirChanges : myChanges, swap ? myChanges : theirChanges); - } -} -function conflict(hunk, mine, their) { - hunk.conflict = true; - hunk.lines.push({ - conflict: true, - mine: mine, - theirs: their - }); -} -function insertLeading(hunk, insert, their) { - while (insert.offset < their.offset && insert.index < insert.lines.length) { - var line = insert.lines[insert.index++]; - hunk.lines.push(line); - insert.offset++; - } -} -function insertTrailing(hunk, insert) { - while (insert.index < insert.lines.length) { - var line = insert.lines[insert.index++]; - hunk.lines.push(line); - } -} -function collectChange(state) { - var ret = [], - operation = state.lines[state.index][0]; - while (state.index < state.lines.length) { - var line = state.lines[state.index]; - - // Group additions that are immediately after subtractions and treat them as one "atomic" modify change. - if (operation === '-' && line[0] === '+') { - operation = '+'; - } - if (operation === line[0]) { - ret.push(line); - state.index++; - } else { - break; - } - } - return ret; -} -function collectContext(state, matchChanges) { - var changes = [], - merged = [], - matchIndex = 0, - contextChanges = false, - conflicted = false; - while (matchIndex < matchChanges.length && state.index < state.lines.length) { - var change = state.lines[state.index], - match = matchChanges[matchIndex]; - - // Once we've hit our add, then we are done - if (match[0] === '+') { - break; - } - contextChanges = contextChanges || change[0] !== ' '; - merged.push(match); - matchIndex++; - - // Consume any additions in the other block as a conflict to attempt - // to pull in the remaining context after this - if (change[0] === '+') { - conflicted = true; - while (change[0] === '+') { - changes.push(change); - change = state.lines[++state.index]; - } - } - if (match.substr(1) === change.substr(1)) { - changes.push(change); - state.index++; - } else { - conflicted = true; - } - } - if ((matchChanges[matchIndex] || '')[0] === '+' && contextChanges) { - conflicted = true; - } - if (conflicted) { - return changes; - } - while (matchIndex < matchChanges.length) { - merged.push(matchChanges[matchIndex++]); - } - return { - merged: merged, - changes: changes - }; -} -function allRemoves(changes) { - return changes.reduce(function (prev, change) { - return prev && change[0] === '-'; - }, true); -} -function skipRemoveSuperset(state, removeChanges, delta) { - for (var i = 0; i < delta; i++) { - var changeContent = removeChanges[removeChanges.length - delta + i].substr(1); - if (state.lines[state.index + i] !== ' ' + changeContent) { - return false; - } - } - state.index += delta; - return true; -} -function calcOldNewLineCount(lines) { - var oldLines = 0; - var newLines = 0; - lines.forEach(function (line) { - if (typeof line !== 'string') { - var myCount = calcOldNewLineCount(line.mine); - var theirCount = calcOldNewLineCount(line.theirs); - if (oldLines !== undefined) { - if (myCount.oldLines === theirCount.oldLines) { - oldLines += myCount.oldLines; - } else { - oldLines = undefined; - } - } - if (newLines !== undefined) { - if (myCount.newLines === theirCount.newLines) { - newLines += myCount.newLines; - } else { - newLines = undefined; - } - } - } else { - if (newLines !== undefined && (line[0] === '+' || line[0] === ' ')) { - newLines++; - } - if (oldLines !== undefined && (line[0] === '-' || line[0] === ' ')) { - oldLines++; - } - } - }); - return { - oldLines: oldLines, - newLines: newLines - }; -} - -function reversePatch(structuredPatch) { - if (Array.isArray(structuredPatch)) { - return structuredPatch.map(reversePatch).reverse(); - } - return _objectSpread2(_objectSpread2({}, structuredPatch), {}, { - oldFileName: structuredPatch.newFileName, - oldHeader: structuredPatch.newHeader, - newFileName: structuredPatch.oldFileName, - newHeader: structuredPatch.oldHeader, - hunks: structuredPatch.hunks.map(function (hunk) { - return { - oldLines: hunk.newLines, - oldStart: hunk.newStart, - newLines: hunk.oldLines, - newStart: hunk.oldStart, - lines: hunk.lines.map(function (l) { - if (l.startsWith('-')) { - return "+".concat(l.slice(1)); - } - if (l.startsWith('+')) { - return "-".concat(l.slice(1)); - } - return l; - }) - }; - }) - }); -} - -// See: http://code.google.com/p/google-diff-match-patch/wiki/API -function convertChangesToDMP(changes) { - var ret = [], - change, - operation; - for (var i = 0; i < changes.length; i++) { - change = changes[i]; - if (change.added) { - operation = 1; - } else if (change.removed) { - operation = -1; - } else { - operation = 0; - } - ret.push([operation, change.value]); - } - return ret; -} - -function convertChangesToXML(changes) { - var ret = []; - for (var i = 0; i < changes.length; i++) { - var change = changes[i]; - if (change.added) { - ret.push(''); - } else if (change.removed) { - ret.push(''); - } - ret.push(escapeHTML(change.value)); - if (change.added) { - ret.push(''); - } else if (change.removed) { - ret.push(''); - } - } - return ret.join(''); -} -function escapeHTML(s) { - var n = s; - n = n.replace(/&/g, '&'); - n = n.replace(//g, '>'); - n = n.replace(/"/g, '"'); - return n; -} - -export { Diff, applyPatch, applyPatches, canonicalize, convertChangesToDMP, convertChangesToXML, createPatch, createTwoFilesPatch, diffArrays, diffChars, diffCss, diffJson, diffLines, diffSentences, diffTrimmedLines, diffWords, diffWordsWithSpace, formatPatch, merge, parsePatch, reversePatch, structuredPatch }; diff --git a/node_modules/mocha/node_modules/diff/lib/patch/apply.js b/node_modules/mocha/node_modules/diff/lib/patch/apply.js deleted file mode 100644 index 619def1f..00000000 --- a/node_modules/mocha/node_modules/diff/lib/patch/apply.js +++ /dev/null @@ -1,393 +0,0 @@ -/*istanbul ignore start*/ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.applyPatch = applyPatch; -exports.applyPatches = applyPatches; -/*istanbul ignore end*/ -var -/*istanbul ignore start*/ -_string = require("../util/string") -/*istanbul ignore end*/ -; -var -/*istanbul ignore start*/ -_lineEndings = require("./line-endings") -/*istanbul ignore end*/ -; -var -/*istanbul ignore start*/ -_parse = require("./parse") -/*istanbul ignore end*/ -; -var -/*istanbul ignore start*/ -_distanceIterator = _interopRequireDefault(require("../util/distance-iterator")) -/*istanbul ignore end*/ -; -/*istanbul ignore start*/ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } -/*istanbul ignore end*/ -function applyPatch(source, uniDiff) { - /*istanbul ignore start*/ - var - /*istanbul ignore end*/ - options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; - if (typeof uniDiff === 'string') { - uniDiff = - /*istanbul ignore start*/ - (0, - /*istanbul ignore end*/ - /*istanbul ignore start*/ - _parse - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - parsePatch) - /*istanbul ignore end*/ - (uniDiff); - } - if (Array.isArray(uniDiff)) { - if (uniDiff.length > 1) { - throw new Error('applyPatch only works with a single input.'); - } - uniDiff = uniDiff[0]; - } - if (options.autoConvertLineEndings || options.autoConvertLineEndings == null) { - if ( - /*istanbul ignore start*/ - (0, - /*istanbul ignore end*/ - /*istanbul ignore start*/ - _string - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - hasOnlyWinLineEndings) - /*istanbul ignore end*/ - (source) && - /*istanbul ignore start*/ - (0, - /*istanbul ignore end*/ - /*istanbul ignore start*/ - _lineEndings - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - isUnix) - /*istanbul ignore end*/ - (uniDiff)) { - uniDiff = - /*istanbul ignore start*/ - (0, - /*istanbul ignore end*/ - /*istanbul ignore start*/ - _lineEndings - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - unixToWin) - /*istanbul ignore end*/ - (uniDiff); - } else if ( - /*istanbul ignore start*/ - (0, - /*istanbul ignore end*/ - /*istanbul ignore start*/ - _string - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - hasOnlyUnixLineEndings) - /*istanbul ignore end*/ - (source) && - /*istanbul ignore start*/ - (0, - /*istanbul ignore end*/ - /*istanbul ignore start*/ - _lineEndings - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - isWin) - /*istanbul ignore end*/ - (uniDiff)) { - uniDiff = - /*istanbul ignore start*/ - (0, - /*istanbul ignore end*/ - /*istanbul ignore start*/ - _lineEndings - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - winToUnix) - /*istanbul ignore end*/ - (uniDiff); - } - } - - // Apply the diff to the input - var lines = source.split('\n'), - hunks = uniDiff.hunks, - compareLine = options.compareLine || function (lineNumber, line, operation, patchContent) - /*istanbul ignore start*/ - { - return ( - /*istanbul ignore end*/ - line === patchContent - ); - }, - fuzzFactor = options.fuzzFactor || 0, - minLine = 0; - if (fuzzFactor < 0 || !Number.isInteger(fuzzFactor)) { - throw new Error('fuzzFactor must be a non-negative integer'); - } - - // Special case for empty patch. - if (!hunks.length) { - return source; - } - - // Before anything else, handle EOFNL insertion/removal. If the patch tells us to make a change - // to the EOFNL that is redundant/impossible - i.e. to remove a newline that's not there, or add a - // newline that already exists - then we either return false and fail to apply the patch (if - // fuzzFactor is 0) or simply ignore the problem and do nothing (if fuzzFactor is >0). - // If we do need to remove/add a newline at EOF, this will always be in the final hunk: - var prevLine = '', - removeEOFNL = false, - addEOFNL = false; - for (var i = 0; i < hunks[hunks.length - 1].lines.length; i++) { - var line = hunks[hunks.length - 1].lines[i]; - if (line[0] == '\\') { - if (prevLine[0] == '+') { - removeEOFNL = true; - } else if (prevLine[0] == '-') { - addEOFNL = true; - } - } - prevLine = line; - } - if (removeEOFNL) { - if (addEOFNL) { - // This means the final line gets changed but doesn't have a trailing newline in either the - // original or patched version. In that case, we do nothing if fuzzFactor > 0, and if - // fuzzFactor is 0, we simply validate that the source file has no trailing newline. - if (!fuzzFactor && lines[lines.length - 1] == '') { - return false; - } - } else if (lines[lines.length - 1] == '') { - lines.pop(); - } else if (!fuzzFactor) { - return false; - } - } else if (addEOFNL) { - if (lines[lines.length - 1] != '') { - lines.push(''); - } else if (!fuzzFactor) { - return false; - } - } - - /** - * Checks if the hunk can be made to fit at the provided location with at most `maxErrors` - * insertions, substitutions, or deletions, while ensuring also that: - * - lines deleted in the hunk match exactly, and - * - wherever an insertion operation or block of insertion operations appears in the hunk, the - * immediately preceding and following lines of context match exactly - * - * `toPos` should be set such that lines[toPos] is meant to match hunkLines[0]. - * - * If the hunk can be applied, returns an object with properties `oldLineLastI` and - * `replacementLines`. Otherwise, returns null. - */ - function applyHunk(hunkLines, toPos, maxErrors) { - /*istanbul ignore start*/ - var - /*istanbul ignore end*/ - hunkLinesI = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0; - /*istanbul ignore start*/ - var - /*istanbul ignore end*/ - lastContextLineMatched = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true; - /*istanbul ignore start*/ - var - /*istanbul ignore end*/ - patchedLines = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : []; - /*istanbul ignore start*/ - var - /*istanbul ignore end*/ - patchedLinesLength = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : 0; - var nConsecutiveOldContextLines = 0; - var nextContextLineMustMatch = false; - for (; hunkLinesI < hunkLines.length; hunkLinesI++) { - var hunkLine = hunkLines[hunkLinesI], - operation = hunkLine.length > 0 ? hunkLine[0] : ' ', - content = hunkLine.length > 0 ? hunkLine.substr(1) : hunkLine; - if (operation === '-') { - if (compareLine(toPos + 1, lines[toPos], operation, content)) { - toPos++; - nConsecutiveOldContextLines = 0; - } else { - if (!maxErrors || lines[toPos] == null) { - return null; - } - patchedLines[patchedLinesLength] = lines[toPos]; - return applyHunk(hunkLines, toPos + 1, maxErrors - 1, hunkLinesI, false, patchedLines, patchedLinesLength + 1); - } - } - if (operation === '+') { - if (!lastContextLineMatched) { - return null; - } - patchedLines[patchedLinesLength] = content; - patchedLinesLength++; - nConsecutiveOldContextLines = 0; - nextContextLineMustMatch = true; - } - if (operation === ' ') { - nConsecutiveOldContextLines++; - patchedLines[patchedLinesLength] = lines[toPos]; - if (compareLine(toPos + 1, lines[toPos], operation, content)) { - patchedLinesLength++; - lastContextLineMatched = true; - nextContextLineMustMatch = false; - toPos++; - } else { - if (nextContextLineMustMatch || !maxErrors) { - return null; - } - - // Consider 3 possibilities in sequence: - // 1. lines contains a *substitution* not included in the patch context, or - // 2. lines contains an *insertion* not included in the patch context, or - // 3. lines contains a *deletion* not included in the patch context - // The first two options are of course only possible if the line from lines is non-null - - // i.e. only option 3 is possible if we've overrun the end of the old file. - return lines[toPos] && (applyHunk(hunkLines, toPos + 1, maxErrors - 1, hunkLinesI + 1, false, patchedLines, patchedLinesLength + 1) || applyHunk(hunkLines, toPos + 1, maxErrors - 1, hunkLinesI, false, patchedLines, patchedLinesLength + 1)) || applyHunk(hunkLines, toPos, maxErrors - 1, hunkLinesI + 1, false, patchedLines, patchedLinesLength); - } - } - } - - // Before returning, trim any unmodified context lines off the end of patchedLines and reduce - // toPos (and thus oldLineLastI) accordingly. This allows later hunks to be applied to a region - // that starts in this hunk's trailing context. - patchedLinesLength -= nConsecutiveOldContextLines; - toPos -= nConsecutiveOldContextLines; - patchedLines.length = patchedLinesLength; - return { - patchedLines: patchedLines, - oldLineLastI: toPos - 1 - }; - } - var resultLines = []; - - // Search best fit offsets for each hunk based on the previous ones - var prevHunkOffset = 0; - for (var _i = 0; _i < hunks.length; _i++) { - var hunk = hunks[_i]; - var hunkResult = - /*istanbul ignore start*/ - void 0 - /*istanbul ignore end*/ - ; - var maxLine = lines.length - hunk.oldLines + fuzzFactor; - var toPos = - /*istanbul ignore start*/ - void 0 - /*istanbul ignore end*/ - ; - for (var maxErrors = 0; maxErrors <= fuzzFactor; maxErrors++) { - toPos = hunk.oldStart + prevHunkOffset - 1; - var iterator = - /*istanbul ignore start*/ - (0, - /*istanbul ignore end*/ - /*istanbul ignore start*/ - _distanceIterator - /*istanbul ignore end*/ - [ - /*istanbul ignore start*/ - "default" - /*istanbul ignore end*/ - ])(toPos, minLine, maxLine); - for (; toPos !== undefined; toPos = iterator()) { - hunkResult = applyHunk(hunk.lines, toPos, maxErrors); - if (hunkResult) { - break; - } - } - if (hunkResult) { - break; - } - } - if (!hunkResult) { - return false; - } - - // Copy everything from the end of where we applied the last hunk to the start of this hunk - for (var _i2 = minLine; _i2 < toPos; _i2++) { - resultLines.push(lines[_i2]); - } - - // Add the lines produced by applying the hunk: - for (var _i3 = 0; _i3 < hunkResult.patchedLines.length; _i3++) { - var _line = hunkResult.patchedLines[_i3]; - resultLines.push(_line); - } - - // Set lower text limit to end of the current hunk, so next ones don't try - // to fit over already patched text - minLine = hunkResult.oldLineLastI + 1; - - // Note the offset between where the patch said the hunk should've applied and where we - // applied it, so we can adjust future hunks accordingly: - prevHunkOffset = toPos + 1 - hunk.oldStart; - } - - // Copy over the rest of the lines from the old text - for (var _i4 = minLine; _i4 < lines.length; _i4++) { - resultLines.push(lines[_i4]); - } - return resultLines.join('\n'); -} - -// Wrapper that supports multiple file patches via callbacks. -function applyPatches(uniDiff, options) { - if (typeof uniDiff === 'string') { - uniDiff = - /*istanbul ignore start*/ - (0, - /*istanbul ignore end*/ - /*istanbul ignore start*/ - _parse - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - parsePatch) - /*istanbul ignore end*/ - (uniDiff); - } - var currentIndex = 0; - function processIndex() { - var index = uniDiff[currentIndex++]; - if (!index) { - return options.complete(); - } - options.loadFile(index, function (err, data) { - if (err) { - return options.complete(err); - } - var updatedContent = applyPatch(data, index, options); - options.patched(index, updatedContent, function (err) { - if (err) { - return options.complete(err); - } - processIndex(); - }); - }); - } - processIndex(); -} -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfc3RyaW5nIiwicmVxdWlyZSIsIl9saW5lRW5kaW5ncyIsIl9wYXJzZSIsIl9kaXN0YW5jZUl0ZXJhdG9yIiwiX2ludGVyb3BSZXF1aXJlRGVmYXVsdCIsIm9iaiIsIl9fZXNNb2R1bGUiLCJhcHBseVBhdGNoIiwic291cmNlIiwidW5pRGlmZiIsIm9wdGlvbnMiLCJhcmd1bWVudHMiLCJsZW5ndGgiLCJ1bmRlZmluZWQiLCJwYXJzZVBhdGNoIiwiQXJyYXkiLCJpc0FycmF5IiwiRXJyb3IiLCJhdXRvQ29udmVydExpbmVFbmRpbmdzIiwiaGFzT25seVdpbkxpbmVFbmRpbmdzIiwiaXNVbml4IiwidW5peFRvV2luIiwiaGFzT25seVVuaXhMaW5lRW5kaW5ncyIsImlzV2luIiwid2luVG9Vbml4IiwibGluZXMiLCJzcGxpdCIsImh1bmtzIiwiY29tcGFyZUxpbmUiLCJsaW5lTnVtYmVyIiwibGluZSIsIm9wZXJhdGlvbiIsInBhdGNoQ29udGVudCIsImZ1enpGYWN0b3IiLCJtaW5MaW5lIiwiTnVtYmVyIiwiaXNJbnRlZ2VyIiwicHJldkxpbmUiLCJyZW1vdmVFT0ZOTCIsImFkZEVPRk5MIiwiaSIsInBvcCIsInB1c2giLCJhcHBseUh1bmsiLCJodW5rTGluZXMiLCJ0b1BvcyIsIm1heEVycm9ycyIsImh1bmtMaW5lc0kiLCJs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FxuICAgIG1heEVycm9ycyxcbiAgICBodW5rTGluZXNJID0gMCxcbiAgICBsYXN0Q29udGV4dExpbmVNYXRjaGVkID0gdHJ1ZSxcbiAgICBwYXRjaGVkTGluZXMgPSBbXSxcbiAgICBwYXRjaGVkTGluZXNMZW5ndGggPSAwLFxuICApIHtcbiAgICBsZXQgbkNvbnNlY3V0aXZlT2xkQ29udGV4dExpbmVzID0gMDtcbiAgICBsZXQgbmV4dENvbnRleHRMaW5lTXVzdE1hdGNoID0gZmFsc2U7XG4gICAgZm9yICg7IGh1bmtMaW5lc0kgPCBodW5rTGluZXMubGVuZ3RoOyBodW5rTGluZXNJKyspIHtcbiAgICAgIGxldCBodW5rTGluZSA9IGh1bmtMaW5lc1todW5rTGluZXNJXSxcbiAgICAgICAgICBvcGVyYXRpb24gPSAoaHVua0xpbmUubGVuZ3RoID4gMCA/IGh1bmtMaW5lWzBdIDogJyAnKSxcbiAgICAgICAgICBjb250ZW50ID0gKGh1bmtMaW5lLmxlbmd0aCA+IDAgPyBodW5rTGluZS5zdWJzdHIoMSkgOiBodW5rTGluZSk7XG5cbiAgICAgIGlmIChvcGVyYXRpb24gPT09ICctJykge1xuICAgICAgICBpZiAoY29tcGFyZUxpbmUodG9Qb3MgKyAxLCBsaW5lc1t0b1Bvc10sIG9wZXJhdGlvbiwgY29udGVudCkpIHtcbiAgICAgICAgICB0b1BvcysrO1xuICAgICAgICAgIG5Db25zZWN1dGl2ZU9sZENvbnRleHRMaW5lcyA9IDA7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgaWYgKCFtYXhFcnJvcnMgfHwgbGluZXNbdG9Qb3NdID09IG51bGwpIHtcbiAgICAgICAgICAgIHJldHVybiBudWxsO1xuICAgICAgICAgIH1cbiAgICAgICAgICBwYXRjaGVkTGluZXNbcGF0Y2hlZExpbmVzTGVuZ3RoXSA9IGxpbmVzW3RvUG9zXTtcbiAgICAgICAgICByZXR1cm4gYXBwbHlIdW5rKFxuICAgICAgICAgIC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iAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICBpZiAobmV4dENvbnRleHRMaW5lTXVzdE1hdGNoIHx8ICFtYXhFcnJvcnMpIHtcbiAgICAgICAgICAgIHJldHVybiBudWxsO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIC8vIENvbnNpZGVyIDMgcG9zc2liaWxpdGllcyBpbiBzZXF1ZW5jZTpcbiAgICAgICAgICAvLyAxLiBsaW5lcyBjb250YWlucyBhICpzdWJzdGl0dXRpb24qIG5vdCBpbmNsdWRlZCBpbiB0aGUgcGF0Y2ggY29udGV4dCwgb3JcbiAgICAgICAgICAvLyAyLiBsaW5lcyBjb250YWlucyBhbiAqaW5zZXJ0aW9uKiBub3QgaW5jbHVkZWQgaW4gdGhlIHBhdGNoIGNvbnRleHQsIG9yXG4gICAgICAgICAgLy8gMy4gbGluZXMgY29udGFpbnMgYSAqZGVsZXRpb24qIG5vdCBpbmNsdWRlZCBpbiB0aGUgcGF0Y2ggY29udGV4dFxuICAgICAgICAgIC8vIFRoZSBmaXJzdCB0d28gb3B0aW9ucyBhcmUgb2YgY291cnNlIG9ubHkgcG9zc2libGUgaWYgdGhlIGxpbmUgZnJvbSBsaW5lcyBpcyBub24tbnVsbCAtXG4gICAgICAgICAgLy8gaS5lLiBvbmx5IG9wdGlvbiAzIGlzIHBvc3NpYmxlIGlmIHdlJ3ZlIG92ZXJydW4gdGhlIGVuZCBvZiB0aGUgb2xkIGZpbGUuXG4gICAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgIGxpbmVzW3RvUG9zXSAmJiAoXG4gICAgICAgICAgICAgIGFwcGx5SHVuayhcbiAgICAgICAgICAgICAgICBodW5rTGluZXMsXG4gICAgICAgICAgICAgICAgdG9Qb3MgKyAxLFxuICAgICAgICAgICAgICAgIG1heEVycm9ycyAtIDEsXG4gICAgICAgICAgICAgICAgaHVua0xpbmVzSSArIDEsXG4gICAgICAgICAgICAgICAgZmFsc2UsXG4gICAgICAgICAgICAgICAgcGF0Y2hlZExpbmVzLFxuICAgICAgICAgICAgICAgIHBhdGNoZWRMaW5lc0xlbmd0aCArIDFcbiAgICAgICAgICAgICAgKSB8fCBhcHBseUh1bmsoXG4gICAgICAgICAgICAgICAgaHVua0xpbmVzLFxuICAgICAgICAgICAgICAgIHRvUG9zICsgMSxcbiAgICAgICAgICAgICAgICBtYXhFcnJvcnMgLSAxLFxuICAgICAgICAgICAgICAgIGh1bmtMaW5lc0ksXG4gICAgICAgICAgICAgICAgZmFsc2UsXG4gICAgICAgICAgICAgICAgcGF0Y2hlZExpbmVzLFxuICAgICAgICAgICAgICAgIHBhdGNoZWRMaW5lc0xlbmd0aCArIDFcbiAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgKSB8fCBhcHBseUh1bmsoXG4gICAgICAgICAgICAgIGh1bmtMaW5lcyxcbiAgICAgICAgICAgICAgdG9Qb3MsXG4gICAgICAgICAgICAgIG1heEVycm9ycyAtIDEsXG4gICAgICAgICAgICAgIGh1bmtMaW5lc0kgKyAxLFxuICAgICAgICAgICAgICBmYWxzZSxcbiAgICAgICAgICAgICAgcGF0Y2hlZExpbmVzLFxuICAgICAgICAgICAgICBwYXRjaGVkTGluZXNMZW5ndGhcbiAgICAgICAgICAgIClcbiAgICAgICAgICApO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgfVxuXG4gICAgLy8gQmVmb3JlIHJldHVybmluZywgdHJpbSBhbnkgdW5tb2RpZmllZCBjb250ZXh0IGxpbmVzIG9mZiB0aGUgZW5kIG9mIHBhdGNoZWRMaW5lcyBhbmQgcmVkdWNlXG4gICAgLy8gdG9Qb3MgKGFuZCB0aHVzIG9sZExpbmVMYXN0SSkgYWNjb3JkaW5nbHkuIFRoaXMgYWxsb3dzIGxhdGVyIGh1bmtzIHRvIGJlIGFwcGxpZWQgdG8gYSByZWdpb25cbiAgICAvLyB0aGF0IHN0YXJ0cyBpbiB0aGlzIGh1bmsncyB0cmFpbGluZyBjb250ZXh0LlxuICAgIHBhdGNoZ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FBVSxDQUFDbUUsSUFBSSxFQUFFSixLQUFLLEVBQUU1RCxPQUFPLENBQUM7TUFDckRBLE9BQU8sQ0FBQ2tFLE9BQU8sQ0FBQ04sS0FBSyxFQUFFSyxjQUFjLEVBQUUsVUFBU0YsR0FBRyxFQUFFO1FBQ25ELElBQUlBLEdBQUcsRUFBRTtVQUNQLE9BQU8vRCxPQUFPLENBQUM2RCxRQUFRLENBQUNFLEdBQUcsQ0FBQztRQUM5QjtRQUVBSixZQUFZLENBQUMsQ0FBQztNQUNoQixDQUFDLENBQUM7SUFDSixDQUFDLENBQUM7RUFDSjtFQUNBQSxZQUFZLENBQUMsQ0FBQztBQUNoQiIsImlnbm9yZUxpc3QiOltdfQ== diff --git a/node_modules/mocha/node_modules/diff/lib/patch/create.js b/node_modules/mocha/node_modules/diff/lib/patch/create.js deleted file mode 100644 index 10ec2d46..00000000 --- a/node_modules/mocha/node_modules/diff/lib/patch/create.js +++ /dev/null @@ -1,369 +0,0 @@ -/*istanbul ignore start*/ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.createPatch = createPatch; -exports.createTwoFilesPatch = createTwoFilesPatch; -exports.formatPatch = formatPatch; -exports.structuredPatch = structuredPatch; -/*istanbul ignore end*/ -var -/*istanbul ignore start*/ -_line = require("../diff/line") -/*istanbul ignore end*/ -; -/*istanbul ignore start*/ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } -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 _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; 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 _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); } -function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } -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 ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } -function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } -function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } -/*istanbul ignore end*/ -function structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) { - if (!options) { - options = {}; - } - if (typeof options === 'function') { - options = { - callback: options - }; - } - if (typeof options.context === 'undefined') { - options.context = 4; - } - if (options.newlineIsToken) { - throw new Error('newlineIsToken may not be used with patch-generation functions, only with diffing functions'); - } - if (!options.callback) { - return diffLinesResultToPatch( - /*istanbul ignore start*/ - (0, - /*istanbul ignore end*/ - /*istanbul ignore start*/ - _line - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - diffLines) - /*istanbul ignore end*/ - (oldStr, newStr, options)); - } else { - var - /*istanbul ignore start*/ - _options = - /*istanbul ignore end*/ - options, - /*istanbul ignore start*/ - /*istanbul ignore end*/ - _callback = _options.callback; - /*istanbul ignore start*/ - (0, - /*istanbul ignore end*/ - /*istanbul ignore start*/ - _line - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - diffLines) - /*istanbul ignore end*/ - (oldStr, newStr, - /*istanbul ignore start*/ - _objectSpread(_objectSpread({}, - /*istanbul ignore end*/ - options), {}, { - callback: function - /*istanbul ignore start*/ - callback - /*istanbul ignore end*/ - (diff) { - var patch = diffLinesResultToPatch(diff); - _callback(patch); - } - })); - } - function diffLinesResultToPatch(diff) { - // STEP 1: Build up the patch with no "\ No newline at end of file" lines and with the arrays - // of lines containing trailing newline characters. We'll tidy up later... - - if (!diff) { - return; - } - diff.push({ - value: '', - lines: [] - }); // Append an empty value to make cleanup easier - - function contextLines(lines) { - return lines.map(function (entry) { - return ' ' + entry; - }); - } - var hunks = []; - var oldRangeStart = 0, - newRangeStart = 0, - curRange = [], - oldLine = 1, - newLine = 1; - /*istanbul ignore start*/ - var _loop = function _loop() - /*istanbul ignore end*/ - { - var current = diff[i], - lines = current.lines || splitLines(current.value); - current.lines = lines; - if (current.added || current.removed) { - /*istanbul ignore start*/ - var _curRange; - /*istanbul ignore end*/ - // If we have previous context, start with that - if (!oldRangeStart) { - var prev = diff[i - 1]; - oldRangeStart = oldLine; - newRangeStart = newLine; - if (prev) { - curRange = options.context > 0 ? contextLines(prev.lines.slice(-options.context)) : []; - oldRangeStart -= curRange.length; - newRangeStart -= curRange.length; - } - } - - // Output our changes - /*istanbul ignore start*/ - /*istanbul ignore end*/ - /*istanbul ignore start*/ - (_curRange = - /*istanbul ignore end*/ - curRange).push.apply( - /*istanbul ignore start*/ - _curRange - /*istanbul ignore end*/ - , - /*istanbul ignore start*/ - _toConsumableArray( - /*istanbul ignore end*/ - lines.map(function (entry) { - return (current.added ? '+' : '-') + entry; - }))); - - // Track the updated file position - if (current.added) { - newLine += lines.length; - } else { - oldLine += lines.length; - } - } else { - // Identical context lines. Track line changes - if (oldRangeStart) { - // Close out any changes that have been output (or join overlapping) - if (lines.length <= options.context * 2 && i < diff.length - 2) { - /*istanbul ignore start*/ - var _curRange2; - /*istanbul ignore end*/ - // Overlapping - /*istanbul ignore start*/ - /*istanbul ignore end*/ - /*istanbul ignore start*/ - (_curRange2 = - /*istanbul ignore end*/ - curRange).push.apply( - /*istanbul ignore start*/ - _curRange2 - /*istanbul ignore end*/ - , - /*istanbul ignore start*/ - _toConsumableArray( - /*istanbul ignore end*/ - contextLines(lines))); - } else { - /*istanbul ignore start*/ - var _curRange3; - /*istanbul ignore end*/ - // end the range and output - var contextSize = Math.min(lines.length, options.context); - /*istanbul ignore start*/ - /*istanbul ignore end*/ - /*istanbul ignore start*/ - (_curRange3 = - /*istanbul ignore end*/ - curRange).push.apply( - /*istanbul ignore start*/ - _curRange3 - /*istanbul ignore end*/ - , - /*istanbul ignore start*/ - _toConsumableArray( - /*istanbul ignore end*/ - contextLines(lines.slice(0, contextSize)))); - var _hunk = { - oldStart: oldRangeStart, - oldLines: oldLine - oldRangeStart + contextSize, - newStart: newRangeStart, - newLines: newLine - newRangeStart + contextSize, - lines: curRange - }; - hunks.push(_hunk); - oldRangeStart = 0; - newRangeStart = 0; - curRange = []; - } - } - oldLine += lines.length; - newLine += lines.length; - } - }; - for (var i = 0; i < diff.length; i++) - /*istanbul ignore start*/ - { - _loop(); - } - - // Step 2: eliminate the trailing `\n` from each line of each hunk, and, where needed, add - // "\ No newline at end of file". - /*istanbul ignore end*/ - for ( - /*istanbul ignore start*/ - var _i = 0, _hunks = - /*istanbul ignore end*/ - hunks; - /*istanbul ignore start*/ - _i < _hunks.length - /*istanbul ignore end*/ - ; - /*istanbul ignore start*/ - _i++ - /*istanbul ignore end*/ - ) { - var hunk = - /*istanbul ignore start*/ - _hunks[_i] - /*istanbul ignore end*/ - ; - for (var _i2 = 0; _i2 < hunk.lines.length; _i2++) { - if (hunk.lines[_i2].endsWith('\n')) { - hunk.lines[_i2] = hunk.lines[_i2].slice(0, -1); - } else { - hunk.lines.splice(_i2 + 1, 0, '\\ No newline at end of file'); - _i2++; // Skip the line we just added, then continue iterating - } - } - } - return { - oldFileName: oldFileName, - newFileName: newFileName, - oldHeader: oldHeader, - newHeader: newHeader, - hunks: hunks - }; - } -} -function formatPatch(diff) { - if (Array.isArray(diff)) { - return diff.map(formatPatch).join('\n'); - } - var ret = []; - if (diff.oldFileName == diff.newFileName) { - ret.push('Index: ' + diff.oldFileName); - } - ret.push('==================================================================='); - ret.push('--- ' + diff.oldFileName + (typeof diff.oldHeader === 'undefined' ? '' : '\t' + diff.oldHeader)); - ret.push('+++ ' + diff.newFileName + (typeof diff.newHeader === 'undefined' ? '' : '\t' + diff.newHeader)); - for (var i = 0; i < diff.hunks.length; i++) { - var hunk = diff.hunks[i]; - // Unified Diff Format quirk: If the chunk size is 0, - // the first number is one lower than one would expect. - // https://www.artima.com/weblogs/viewpost.jsp?thread=164293 - if (hunk.oldLines === 0) { - hunk.oldStart -= 1; - } - if (hunk.newLines === 0) { - hunk.newStart -= 1; - } - ret.push('@@ -' + hunk.oldStart + ',' + hunk.oldLines + ' +' + hunk.newStart + ',' + hunk.newLines + ' @@'); - ret.push.apply(ret, hunk.lines); - } - return ret.join('\n') + '\n'; -} -function createTwoFilesPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) { - /*istanbul ignore start*/ - var _options2; - /*istanbul ignore end*/ - if (typeof options === 'function') { - options = { - callback: options - }; - } - if (! - /*istanbul ignore start*/ - ((_options2 = - /*istanbul ignore end*/ - options) !== null && _options2 !== void 0 && - /*istanbul ignore start*/ - _options2 - /*istanbul ignore end*/ - .callback)) { - var patchObj = structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options); - if (!patchObj) { - return; - } - return formatPatch(patchObj); - } else { - var - /*istanbul ignore start*/ - _options3 = - /*istanbul ignore end*/ - options, - /*istanbul ignore start*/ - /*istanbul ignore end*/ - _callback2 = _options3.callback; - structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, - /*istanbul ignore start*/ - _objectSpread(_objectSpread({}, - /*istanbul ignore end*/ - options), {}, { - callback: function - /*istanbul ignore start*/ - callback - /*istanbul ignore end*/ - (patchObj) { - if (!patchObj) { - _callback2(); - } else { - _callback2(formatPatch(patchObj)); - } - } - })); - } -} -function createPatch(fileName, oldStr, newStr, oldHeader, newHeader, options) { - return createTwoFilesPatch(fileName, fileName, oldStr, newStr, oldHeader, newHeader, options); -} - -/** - * Split `text` into an array of lines, including the trailing newline character (where present) - */ -function splitLines(text) { - var hasTrailingNl = text.endsWith('\n'); - var result = text.split('\n').map(function (line) - /*istanbul ignore start*/ - { - return ( - /*istanbul ignore end*/ - line + '\n' - ); - }); - if (hasTrailingNl) { - result.pop(); - } else { - result.push(result.pop().slice(0, -1)); - } - return result; -} -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfbGluZSIsInJlcXVpcmUiLCJfdHlwZW9mIiwibyIsIlN5bWJvbCIsIml0ZXJhdG9yIiwiY29uc3RydWN0b3IiLCJwcm90b3R5cGUiLCJfdG9Db25zdW1hYmxlQXJyYXkiLCJhcnIiLCJfYXJyYXlXaXRob3V0SG9sZXMiLCJfaXRlcmFibGVUb0FycmF5IiwiX3Vuc3VwcG9ydGVkSXRlcmFibGVUb0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uICAgICAgICAgICAgLy8gZW5kIHRoZSByYW5nZSBhbmQgb3V0cHV0XG4gICAgICAgICAgICBsZXQgY29udGV4dFNpemUgPSBNYXRoLm1pbihsaW5lcy5sZW5ndGgsIG9wdGlvbnMuY29udGV4dCk7XG4gICAgICAgICAgICBjdXJSYW5nZS5wdXNoKC4uLiBjb250ZXh0TGluZXMobGluZXMuc2xpY2UoMCwgY29udGV4dFNpemUpKSk7XG5cbiAgICAgICAgICAgIGxldCBodW5rID0ge1xuICAgICAgICAgICAgICBvbGRTdGFydDogb2xkUmFuZ2VTdGFydCxcbiAgICAgICAgICAgICAgb2xkTGluZXM6IChvbGRMaW5lIC0gb2xkUmFuZ2VTdGFydCArIGNvbnRleHRTaXplKSxcbiAgICAgICAgICAgICAgbmV3U3RhcnQ6IG5ld1JhbmdlU3RhcnQsXG4gICAgICAgICAgICAgIG5ld0xpbmVzOiAobmV3TGluZSAtIG5ld1JhbmdlU3RhcnQgKyBjb250ZXh0U2l6ZSksXG4gICAgICAgICAgICAgIGxpbmVzOiBjdXJSYW5nZVxuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIGh1bmtzLnB1c2goaHVuayk7XG5cbiAgICAgICAgICAgIG9sZFJhbmdlU3RhcnQgPSAwO1xuICAgICAgICAgICAgbmV3UmFuZ2VTdGFydCA9IDA7XG4gICAgICAgICAgICBjdXJSYW5nZSA9IFtdO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBvbGRMaW5lICs9IGxpbmVzLmxlbmd0aDtcbiAgICAgICAgbmV3TGluZSArPSBsaW5lcy5sZW5ndGg7XG4gICAgICB9XG4gICAgfVxuXG4gICAgLy8gU3RlcCAyOiBlbGltaW5hdGUgdGhlIHRyYWlsaW5nIGBcXG5gIGZyb20gZWFjaCBsaW5lIG9mIGVhY2ggaHVuaywgYW5kLCB3aGVyZSBuZWVkZWQsIGFkZFxuICAgIC8vICAgICAgICAgXCJcXCBObyBuZXdsaW5lIGF0IGVuZCBvZi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09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0nKTtcbiAgcmV0LnB1c2goJy0tLSAnICsgZGlmZi5vbGRGaWxlTmFtZSArICh0eXBlb2YgZGlmZi5vbGRIZWFkZXIgPT09ICd1bmRlZmluZWQnID8gJycgOiAnXFx0JyArIGRpZmYub2xkSGVhZGVyKSk7XG4gIHJldC5wdXNoKCcrKysgJyArIGRpZmYubmV3RmlsZU5hbWUgKyAodHlwZW9mIGRpZmYubmV3SGVhZGVyID09PSAndW5kZWZpbmVkJyA/ICcnIDogJ1xcdCcgKyBkaWZmLm5ld0hlYWRlcikpO1xuXG4gIGZvciAobGV0IGkgPSAwOyBpIDwgZGlmZi5odW5rcy5sZW5ndGg7IGkrKykge1xuICAgIGNvbnN0IGh1bmsgPSBkaWZmLmh1bmtzW2ldO1xuICAgIC8vIFVuaWZpZWQgRGlmZiBGb3JtYXQgcXVpcms6IElmIHRoZSBjaHVuayBzaXplIGlzIDAsXG4gICAgLy8gdGhlIGZpcnN0IG51bWJlciBpcyBvbmUgbG93ZXIgdGhhbiBvbmUgd291bGQgZXhwZWN0LlxuICAgIC8vIGh0dHBzOi8vd3d3LmFydGltYS5jb20vd2VibG9ncy92aWV3cG9zdC5qc3A/dGhyZWFkPTE2NDI5M1xuICAgIGlmIChodW5rLm9sZExpbmVzID09PSAwKSB7XG4gICAgICBodW5rLm9sZFN0YXJ0IC09IDE7XG4gICAgfVxuICAgIGlmIChodW5rLm5ld0xpbmVzID09PSAwKSB7XG4gICAgICBodW5rLm5ld1N0YXJ0IC09IDE7XG4gICAgfVxuICAgIHJldC5wdXNoKFxuICAgICAgJ0BAIC0nICsgaHVuay5vbGRTdGFydCArICcsJyArIGh1bmsub2xkTGluZXNcbiAgICAgICsgJyArJyArIGh1bmsubmV3U3RhcnQgKyAnLCcgKyBodW5rLm5ld0xpbmVzXG4gICAgICArICcgQEAnXG4gICAgKTtcbiAgICByZXQucHVzaC5hcHBseShyZXQsIGh1bmsubGluZ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TLEVBQUVDLFNBQVMsRUFBRUMsT0FBTyxDQUFDO0FBQy9GOztBQUVBO0FBQ0E7QUFDQTtBQUNBLFNBQVNzQixVQUFVQSxDQUFDNEIsSUFBSSxFQUFFO0VBQ3hCLElBQU1DLGFBQWEsR0FBR0QsSUFBSSxDQUFDWCxRQUFRLENBQUMsSUFBSSxDQUFDO0VBQ3pDLElBQU1hLE1BQU0sR0FBR0YsSUFBSSxDQUFDRyxLQUFLLENBQUMsSUFBSSxDQUFDLENBQUN6QyxHQUFHLENBQUMsVUFBQTBDLElBQUk7RUFBQTtFQUFBO0lBQUE7TUFBQTtNQUFJQSxJQUFJLEdBQUc7SUFBSTtFQUFBLEVBQUM7RUFDeEQsSUFBSUgsYUFBYSxFQUFFO0lBQ2pCQyxNQUFNLENBQUNHLEdBQUcsQ0FBQyxDQUFDO0VBQ2QsQ0FBQyxNQUFNO0lBQ0xILE1BQU0sQ0FBQzlFLElBQUksQ0FBQzhFLE1BQU0sQ0FBQ0csR0FBRyxDQUFDLENBQUMsQ0FBQ3JHLEtBQUssQ0FBQyxDQUFDLEVBQUUsQ0FBQyxDQUFDLENBQUMsQ0FBQztFQUN4QztFQUNBLE9BQU9rRyxNQUFNO0FBQ2YiLCJpZ25vcmVMaXN0IjpbXX0= diff --git a/node_modules/mocha/node_modules/diff/lib/patch/line-endings.js b/node_modules/mocha/node_modules/diff/lib/patch/line-endings.js deleted file mode 100644 index 8d00bd22..00000000 --- a/node_modules/mocha/node_modules/diff/lib/patch/line-endings.js +++ /dev/null @@ -1,176 +0,0 @@ -/*istanbul ignore start*/ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.isUnix = isUnix; -exports.isWin = isWin; -exports.unixToWin = unixToWin; -exports.winToUnix = winToUnix; -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } -function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } -function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } -/*istanbul ignore end*/ -function unixToWin(patch) { - if (Array.isArray(patch)) { - return patch.map(unixToWin); - } - return ( - /*istanbul ignore start*/ - _objectSpread(_objectSpread({}, - /*istanbul ignore end*/ - patch), {}, { - hunks: patch.hunks.map(function (hunk) - /*istanbul ignore start*/ - { - return _objectSpread(_objectSpread({}, - /*istanbul ignore end*/ - hunk), {}, { - lines: hunk.lines.map(function (line, i) - /*istanbul ignore start*/ - { - var _hunk$lines; - return ( - /*istanbul ignore end*/ - line.startsWith('\\') || line.endsWith('\r') || - /*istanbul ignore start*/ - (_hunk$lines = - /*istanbul ignore end*/ - hunk.lines[i + 1]) !== null && _hunk$lines !== void 0 && - /*istanbul ignore start*/ - _hunk$lines - /*istanbul ignore end*/ - .startsWith('\\') ? line : line + '\r' - ); - }) - }); - }) - }) - ); -} -function winToUnix(patch) { - if (Array.isArray(patch)) { - return patch.map(winToUnix); - } - return ( - /*istanbul ignore start*/ - _objectSpread(_objectSpread({}, - /*istanbul ignore end*/ - patch), {}, { - hunks: patch.hunks.map(function (hunk) - /*istanbul ignore start*/ - { - return _objectSpread(_objectSpread({}, - /*istanbul ignore end*/ - hunk), {}, { - lines: hunk.lines.map(function (line) - /*istanbul ignore start*/ - { - return ( - /*istanbul ignore end*/ - line.endsWith('\r') ? line.substring(0, line.length - 1) : line - ); - }) - }); - }) - }) - ); -} - -/** - * Returns true if the patch consistently uses Unix line endings (or only involves one line and has - * no line endings). - */ -function isUnix(patch) { - if (!Array.isArray(patch)) { - patch = [patch]; - } - return !patch.some(function (index) - /*istanbul ignore start*/ - { - return ( - /*istanbul ignore end*/ - index.hunks.some(function (hunk) - /*istanbul ignore start*/ - { - return ( - /*istanbul ignore end*/ - hunk.lines.some(function (line) - /*istanbul ignore start*/ - { - return ( - /*istanbul ignore end*/ - !line.startsWith('\\') && line.endsWith('\r') - ); - }) - ); - }) - ); - }); -} - -/** - * Returns true if the patch uses Windows line endings and only Windows line endings. - */ -function isWin(patch) { - if (!Array.isArray(patch)) { - patch = [patch]; - } - return patch.some(function (index) - /*istanbul ignore start*/ - { - return ( - /*istanbul ignore end*/ - index.hunks.some(function (hunk) - /*istanbul ignore start*/ - { - return ( - /*istanbul ignore end*/ - hunk.lines.some(function (line) - /*istanbul ignore start*/ - { - return ( - /*istanbul ignore end*/ - line.endsWith('\r') - ); - }) - ); - }) - ); - }) && patch.every(function (index) - /*istanbul ignore start*/ - { - return ( - /*istanbul ignore end*/ - index.hunks.every(function (hunk) - /*istanbul ignore start*/ - { - return ( - /*istanbul ignore end*/ - hunk.lines.every(function (line, i) - /*istanbul ignore start*/ - { - var _hunk$lines2; - return ( - /*istanbul ignore end*/ - line.startsWith('\\') || line.endsWith('\r') || - /*istanbul ignore start*/ - ((_hunk$lines2 = - /*istanbul ignore end*/ - hunk.lines[i + 1]) === null || _hunk$lines2 === void 0 ? void 0 : - /*istanbul ignore start*/ - _hunk$lines2 - /*istanbul ignore end*/ - .startsWith('\\')) - ); - }) - ); - }) - ); - }); -} -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJ1bml4VG9XaW4iLCJwYXRjaCIsIkFycmF5IiwiaXNBcnJheSIsIm1hcCIsIl9vYmplY3RTcHJlYWQiLCJodW5rcyIsImh1bmsiLCJsaW5lcyIsImxpbmUiLCJpIiwiX2h1bmskbGluZXMiLCJzdGFydHNXaXRoIiwiZW5kc1dpdGgiLCJ3aW5Ub1VuaXgiLCJzdWJzdHJpbmciLCJsZW5ndGgiLCJpc1VuaXgiLCJzb21lIiwiaW5kZXgiLCJpc1dpbiIsImV2ZXJ5IiwiX2h1bmskbGluZXMyIl0sInNvdXJjZXMiOlsiLi4vLi4vc3JjL3BhdGNoL2xpbmUtZW5kaW5ncy5qcyJdLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgZnVuY3Rpb24gdW5peFRvV2luKHBhdGNoKSB7XG4gIGlmIChBcnJheS5pc0FycmF5KHBhdGNoKSkge1xuICAgIHJldHVybiBwYXRjaC5tYXAodW5peFRvV2luKTtcbiAgfVxuXG4gIHJldHVybiB7XG4gICAgLi4ucGF0Y2gsXG4gICAgaHVua3M6IHBhdGNoLmh1bmtzLm1hcChodW5rID0+ICh7XG4gICAgICAuLi5odW5rLFxuICAgICAgbGluZXM6IGh1bmsubGluZXMubWFwKFxuICAgICAgICAobGluZSwgaSkgPT5cbiAgICAgICAgICAobGluZS5zdGFydHNXaXRoKCdcXFxcJykgfHwgbGluZS5lbmRzV2l0aCgnXFxyJykgfHwgaHVuay5saW5lc1tpICsgMV0/LnN0YXJ0c1dpdGgoJ1xcXFwnKSlcbiAgICAgICAgICAgID8gbGluZVxuICAgICAgICAgICAgOiBsaW5lICsgJ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js deleted file mode 100644 index fead4e01..00000000 --- a/node_modules/mocha/node_modules/diff/lib/patch/merge.js +++ /dev/null @@ -1,535 +0,0 @@ -/*istanbul ignore start*/ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.calcLineCount = calcLineCount; -exports.merge = merge; -/*istanbul ignore end*/ -var -/*istanbul ignore start*/ -_create = require("./create") -/*istanbul ignore end*/ -; -var -/*istanbul ignore start*/ -_parse = require("./parse") -/*istanbul ignore end*/ -; -var -/*istanbul ignore start*/ -_array = require("../util/array") -/*istanbul ignore end*/ -; -/*istanbul ignore start*/ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } -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 _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; 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 _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); } -function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } -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; } -/*istanbul ignore end*/ -function calcLineCount(hunk) { - var - /*istanbul ignore start*/ - _calcOldNewLineCount = - /*istanbul ignore end*/ - calcOldNewLineCount(hunk.lines), - /*istanbul ignore start*/ - /*istanbul ignore end*/ - oldLines = _calcOldNewLineCount.oldLines, - /*istanbul ignore start*/ - /*istanbul ignore end*/ - newLines = _calcOldNewLineCount.newLines; - if (oldLines !== undefined) { - hunk.oldLines = oldLines; - } else { - delete hunk.oldLines; - } - if (newLines !== undefined) { - hunk.newLines = newLines; - } else { - delete hunk.newLines; - } -} -function merge(mine, theirs, base) { - mine = loadPatch(mine, base); - theirs = loadPatch(theirs, base); - var ret = {}; - - // For index we just let it pass through as it doesn't have any necessary meaning. - // Leaving sanity checks on this to the API consumer that may know more about the - // meaning in their own context. - if (mine.index || theirs.index) { - ret.index = mine.index || theirs.index; - } - if (mine.newFileName || theirs.newFileName) { - if (!fileNameChanged(mine)) { - // No header or no change in ours, use theirs (and ours if theirs does not exist) - ret.oldFileName = theirs.oldFileName || mine.oldFileName; - ret.newFileName = theirs.newFileName || mine.newFileName; - ret.oldHeader = theirs.oldHeader || mine.oldHeader; - ret.newHeader = theirs.newHeader || mine.newHeader; - } else if (!fileNameChanged(theirs)) { - // No header or no change in theirs, use ours - ret.oldFileName = mine.oldFileName; - ret.newFileName = mine.newFileName; - ret.oldHeader = mine.oldHeader; - ret.newHeader = mine.newHeader; - } else { - // Both changed... figure it out - ret.oldFileName = selectField(ret, mine.oldFileName, theirs.oldFileName); - ret.newFileName = selectField(ret, mine.newFileName, theirs.newFileName); - ret.oldHeader = selectField(ret, mine.oldHeader, theirs.oldHeader); - ret.newHeader = selectField(ret, mine.newHeader, theirs.newHeader); - } - } - ret.hunks = []; - var mineIndex = 0, - theirsIndex = 0, - mineOffset = 0, - theirsOffset = 0; - while (mineIndex < mine.hunks.length || theirsIndex < theirs.hunks.length) { - var mineCurrent = mine.hunks[mineIndex] || { - oldStart: Infinity - }, - theirsCurrent = theirs.hunks[theirsIndex] || { - oldStart: Infinity - }; - if (hunkBefore(mineCurrent, theirsCurrent)) { - // This patch does not overlap with any of the others, yay. - ret.hunks.push(cloneHunk(mineCurrent, mineOffset)); - mineIndex++; - theirsOffset += mineCurrent.newLines - mineCurrent.oldLines; - } else if (hunkBefore(theirsCurrent, mineCurrent)) { - // This patch does not overlap with any of the others, yay. - ret.hunks.push(cloneHunk(theirsCurrent, theirsOffset)); - theirsIndex++; - mineOffset += theirsCurrent.newLines - theirsCurrent.oldLines; - } else { - // Overlap, merge as best we can - var mergedHunk = { - oldStart: Math.min(mineCurrent.oldStart, theirsCurrent.oldStart), - oldLines: 0, - newStart: Math.min(mineCurrent.newStart + mineOffset, theirsCurrent.oldStart + theirsOffset), - newLines: 0, - lines: [] - }; - mergeLines(mergedHunk, mineCurrent.oldStart, mineCurrent.lines, theirsCurrent.oldStart, theirsCurrent.lines); - theirsIndex++; - mineIndex++; - ret.hunks.push(mergedHunk); - } - } - return ret; -} -function loadPatch(param, base) { - if (typeof param === 'string') { - if (/^@@/m.test(param) || /^Index:/m.test(param)) { - return ( - /*istanbul ignore start*/ - (0, - /*istanbul ignore end*/ - /*istanbul ignore start*/ - _parse - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - parsePatch) - /*istanbul ignore end*/ - (param)[0] - ); - } - if (!base) { - throw new Error('Must provide a base reference or pass in a patch'); - } - return ( - /*istanbul ignore start*/ - (0, - /*istanbul ignore end*/ - /*istanbul ignore start*/ - _create - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - structuredPatch) - /*istanbul ignore end*/ - (undefined, undefined, base, param) - ); - } - return param; -} -function fileNameChanged(patch) { - return patch.newFileName && patch.newFileName !== patch.oldFileName; -} -function selectField(index, mine, theirs) { - if (mine === theirs) { - return mine; - } else { - index.conflict = true; - return { - mine: mine, - theirs: theirs - }; - } -} -function hunkBefore(test, check) { - return test.oldStart < check.oldStart && test.oldStart + test.oldLines < check.oldStart; -} -function cloneHunk(hunk, offset) { - return { - oldStart: hunk.oldStart, - oldLines: hunk.oldLines, - newStart: hunk.newStart + offset, - newLines: hunk.newLines, - lines: hunk.lines - }; -} -function mergeLines(hunk, mineOffset, mineLines, theirOffset, theirLines) { - // This will generally result in a conflicted hunk, but there are cases where the context - // is the only overlap where we can successfully merge the content here. - var mine = { - offset: mineOffset, - lines: mineLines, - index: 0 - }, - their = { - offset: theirOffset, - lines: theirLines, - index: 0 - }; - - // Handle any leading content - insertLeading(hunk, mine, their); - insertLeading(hunk, their, mine); - - // Now in the overlap content. Scan through and select the best changes from each. - while (mine.index < mine.lines.length && their.index < their.lines.length) { - var mineCurrent = mine.lines[mine.index], - theirCurrent = their.lines[their.index]; - if ((mineCurrent[0] === '-' || mineCurrent[0] === '+') && (theirCurrent[0] === '-' || theirCurrent[0] === '+')) { - // Both modified ... - mutualChange(hunk, mine, their); - } else if (mineCurrent[0] === '+' && theirCurrent[0] === ' ') { - /*istanbul ignore start*/ - var _hunk$lines; - /*istanbul ignore end*/ - // Mine inserted - /*istanbul ignore start*/ - /*istanbul ignore end*/ - /*istanbul ignore start*/ - (_hunk$lines = - /*istanbul ignore end*/ - hunk.lines).push.apply( - /*istanbul ignore start*/ - _hunk$lines - /*istanbul ignore end*/ - , - /*istanbul ignore start*/ - _toConsumableArray( - /*istanbul ignore end*/ - collectChange(mine))); - } else if (theirCurrent[0] === '+' && mineCurrent[0] === ' ') { - /*istanbul ignore start*/ - var _hunk$lines2; - /*istanbul ignore end*/ - // Theirs inserted - /*istanbul ignore start*/ - /*istanbul ignore end*/ - /*istanbul ignore start*/ - (_hunk$lines2 = - /*istanbul ignore end*/ - hunk.lines).push.apply( - /*istanbul ignore start*/ - _hunk$lines2 - /*istanbul ignore end*/ - , - /*istanbul ignore start*/ - _toConsumableArray( - /*istanbul ignore end*/ - collectChange(their))); - } else if (mineCurrent[0] === '-' && theirCurrent[0] === ' ') { - // Mine removed or edited - removal(hunk, mine, their); - } else if (theirCurrent[0] === '-' && mineCurrent[0] === ' ') { - // Their removed or edited - removal(hunk, their, mine, true); - } else if (mineCurrent === theirCurrent) { - // Context identity - hunk.lines.push(mineCurrent); - mine.index++; - their.index++; - } else { - // Context mismatch - conflict(hunk, collectChange(mine), collectChange(their)); - } - } - - // Now push anything that may be remaining - insertTrailing(hunk, mine); - insertTrailing(hunk, their); - calcLineCount(hunk); -} -function mutualChange(hunk, mine, their) { - var myChanges = collectChange(mine), - theirChanges = collectChange(their); - if (allRemoves(myChanges) && allRemoves(theirChanges)) { - // Special case for remove changes that are supersets of one another - if ( - /*istanbul ignore start*/ - (0, - /*istanbul ignore end*/ - /*istanbul ignore start*/ - _array - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - arrayStartsWith) - /*istanbul ignore end*/ - (myChanges, theirChanges) && skipRemoveSuperset(their, myChanges, myChanges.length - theirChanges.length)) { - /*istanbul ignore start*/ - var _hunk$lines3; - /*istanbul ignore end*/ - /*istanbul ignore start*/ - /*istanbul ignore end*/ - /*istanbul ignore start*/ - (_hunk$lines3 = - /*istanbul ignore end*/ - hunk.lines).push.apply( - /*istanbul ignore start*/ - _hunk$lines3 - /*istanbul ignore end*/ - , - /*istanbul ignore start*/ - _toConsumableArray( - /*istanbul ignore end*/ - myChanges)); - return; - } else if ( - /*istanbul ignore start*/ - (0, - /*istanbul ignore end*/ - /*istanbul ignore start*/ - _array - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - arrayStartsWith) - /*istanbul ignore end*/ - (theirChanges, myChanges) && skipRemoveSuperset(mine, theirChanges, theirChanges.length - myChanges.length)) { - /*istanbul ignore start*/ - var _hunk$lines4; - /*istanbul ignore end*/ - /*istanbul ignore start*/ - /*istanbul ignore end*/ - /*istanbul ignore start*/ - (_hunk$lines4 = - /*istanbul ignore end*/ - hunk.lines).push.apply( - /*istanbul ignore start*/ - _hunk$lines4 - /*istanbul ignore end*/ - , - /*istanbul ignore start*/ - _toConsumableArray( - /*istanbul ignore end*/ - theirChanges)); - return; - } - } else if ( - /*istanbul ignore start*/ - (0, - /*istanbul ignore end*/ - /*istanbul ignore start*/ - _array - /*istanbul ignore end*/ - . - /*istanbul ignore start*/ - arrayEqual) - /*istanbul ignore end*/ - (myChanges, theirChanges)) { - /*istanbul ignore start*/ - var _hunk$lines5; - /*istanbul ignore end*/ - /*istanbul ignore start*/ - /*istanbul ignore end*/ - /*istanbul ignore start*/ - (_hunk$lines5 = - /*istanbul ignore end*/ - hunk.lines).push.apply( - /*istanbul ignore start*/ - _hunk$lines5 - /*istanbul ignore end*/ - , - /*istanbul ignore start*/ - _toConsumableArray( - /*istanbul ignore end*/ - myChanges)); - return; - } - conflict(hunk, myChanges, theirChanges); -} -function removal(hunk, mine, their, swap) { - var myChanges = collectChange(mine), - theirChanges = collectContext(their, myChanges); - if (theirChanges.merged) { - /*istanbul ignore start*/ - var _hunk$lines6; - /*istanbul ignore end*/ - /*istanbul ignore start*/ - /*istanbul ignore end*/ - /*istanbul ignore start*/ - (_hunk$lines6 = - /*istanbul ignore end*/ - hunk.lines).push.apply( - /*istanbul ignore start*/ - _hunk$lines6 - /*istanbul ignore end*/ - , - /*istanbul ignore start*/ - _toConsumableArray( - /*istanbul ignore end*/ - theirChanges.merged)); - } else { - conflict(hunk, swap ? theirChanges : myChanges, swap ? myChanges : theirChanges); - } -} -function conflict(hunk, mine, their) { - hunk.conflict = true; - hunk.lines.push({ - conflict: true, - mine: mine, - theirs: their - }); -} -function insertLeading(hunk, insert, their) { - while (insert.offset < their.offset && insert.index < insert.lines.length) { - var line = insert.lines[insert.index++]; - hunk.lines.push(line); - insert.offset++; - } -} -function insertTrailing(hunk, insert) { - while (insert.index < insert.lines.length) { - var line = insert.lines[insert.index++]; - hunk.lines.push(line); - } -} -function collectChange(state) { - var ret = [], - operation = state.lines[state.index][0]; - while (state.index < state.lines.length) { - var line = state.lines[state.index]; - - // Group additions that are immediately after subtractions and treat them as one "atomic" modify change. - if (operation === '-' && line[0] === '+') { - operation = '+'; - } - if (operation === line[0]) { - ret.push(line); - state.index++; - } else { - break; - } - } - return ret; -} -function collectContext(state, matchChanges) { - var changes = [], - merged = [], - matchIndex = 0, - contextChanges = false, - conflicted = false; - while (matchIndex < matchChanges.length && state.index < state.lines.length) { - var change = state.lines[state.index], - match = matchChanges[matchIndex]; - - // Once we've hit our add, then we are done - if (match[0] === '+') { - break; - } - contextChanges = contextChanges || change[0] !== ' '; - merged.push(match); - matchIndex++; - - // Consume any additions in the other block as a conflict to attempt - // to pull in the remaining context after this - if (change[0] === '+') { - conflicted = true; - while (change[0] === '+') { - changes.push(change); - change = state.lines[++state.index]; - } - } - if (match.substr(1) === change.substr(1)) { - changes.push(change); - state.index++; - } else { - conflicted = true; - } - } - if ((matchChanges[matchIndex] || '')[0] === '+' && contextChanges) { - conflicted = true; - } - if (conflicted) { - return changes; - } - while (matchIndex < matchChanges.length) { - merged.push(matchChanges[matchIndex++]); - } - return { - merged: merged, - changes: changes - }; -} -function allRemoves(changes) { - return changes.reduce(function (prev, change) { - return prev && change[0] === '-'; - }, true); -} -function skipRemoveSuperset(state, removeChanges, delta) { - for (var i = 0; i < delta; i++) { - var changeContent = removeChanges[removeChanges.length - delta + i].substr(1); - if (state.lines[state.index + i] !== ' ' + changeContent) { - return false; - } - } - state.index += delta; - return true; -} -function calcOldNewLineCount(lines) { - var oldLines = 0; - var newLines = 0; - lines.forEach(function (line) { - if (typeof line !== 'string') { - var myCount = calcOldNewLineCount(line.mine); - var theirCount = calcOldNewLineCount(line.theirs); - if (oldLines !== undefined) { - if (myCount.oldLines === theirCount.oldLines) { - oldLines += myCount.oldLines; - } else { - oldLines = undefined; - } - } - if (newLines !== undefined) { - if (myCount.newLines === theirCount.newLines) { - newLines += myCount.newLines; - } else { - newLines = undefined; - } - } - } else { - if (newLines !== undefined && (line[0] === '+' || line[0] === ' ')) { - newLines++; - } - if (oldLines !== undefined && (line[0] === '-' || line[0] === ' ')) { - oldLines++; - } - } - }); - return { - oldLines: oldLines, - newLines: newLines - }; -} -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfY3JlYXRlIiwicmVxdWlyZSIsIl9wYXJzZSIsIl9hcnJheSIsIl90b0NvbnN1bWFibGVBcnJheSIsImFyciIsIl9hcnJheVdpdGhvdXRIb2xlcyIsIl9pdGVyYWJsZVRvQXJyYXkiLCJfdW5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xFQUFFO1FBQ2xFbkUsUUFBUSxFQUFFO01BQ1o7TUFDQSxJQUFJRCxRQUFRLEtBQUtFLFNBQVMsS0FBS2tFLElBQUksQ0FBQyxDQUFDLENBQUMsS0FBSyxHQUFHLElBQUlBLElBQUksQ0FBQyxDQUFDLENBQUMsS0FBSyxHQUFHLENBQUMsRUFBRTtRQUNsRXBFLFFBQVEsRUFBRTtNQUNaO0lBQ0Y7RUFDRixDQUFDLENBQUM7RUFFRixPQUFPO0lBQUNBLFFBQVEsRUFBUkEsUUFBUTtJQUFFQyxRQUFRLEVBQVJBO0VBQVEsQ0FBQztBQUM3QiIsImlnbm9yZUxpc3QiOltdfQ== diff --git a/node_modules/mocha/node_modules/diff/lib/patch/parse.js b/node_modules/mocha/node_modules/diff/lib/patch/parse.js deleted file mode 100644 index 15acdd9a..00000000 --- a/node_modules/mocha/node_modules/diff/lib/patch/parse.js +++ /dev/null @@ -1,151 +0,0 @@ -/*istanbul ignore start*/ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.parsePatch = parsePatch; -/*istanbul ignore end*/ -function parsePatch(uniDiff) { - var diffstr = uniDiff.split(/\n/), - list = [], - i = 0; - function parseIndex() { - var index = {}; - list.push(index); - - // Parse diff metadata - while (i < diffstr.length) { - var line = diffstr[i]; - - // File header found, end parsing diff metadata - if (/^(\-\-\-|\+\+\+|@@)\s/.test(line)) { - break; - } - - // Diff index - var header = /^(?:Index:|diff(?: -r \w+)+)\s+(.+?)\s*$/.exec(line); - if (header) { - index.index = header[1]; - } - i++; - } - - // Parse file headers if they are defined. Unified diff requires them, but - // there's no technical issues to have an isolated hunk without file header - parseFileHeader(index); - parseFileHeader(index); - - // Parse hunks - index.hunks = []; - while (i < diffstr.length) { - var _line = diffstr[i]; - if (/^(Index:\s|diff\s|\-\-\-\s|\+\+\+\s|===================================================================)/.test(_line)) { - break; - } else if (/^@@/.test(_line)) { - index.hunks.push(parseHunk()); - } else if (_line) { - throw new Error('Unknown line ' + (i + 1) + ' ' + JSON.stringify(_line)); - } else { - i++; - } - } - } - - // Parses the --- and +++ headers, if none are found, no lines - // are consumed. - function parseFileHeader(index) { - var fileHeader = /^(---|\+\+\+)\s+(.*)\r?$/.exec(diffstr[i]); - if (fileHeader) { - var keyPrefix = fileHeader[1] === '---' ? 'old' : 'new'; - var data = fileHeader[2].split('\t', 2); - var fileName = data[0].replace(/\\\\/g, '\\'); - if (/^".*"$/.test(fileName)) { - fileName = fileName.substr(1, fileName.length - 2); - } - index[keyPrefix + 'FileName'] = fileName; - index[keyPrefix + 'Header'] = (data[1] || '').trim(); - i++; - } - } - - // Parses a hunk - // This assumes that we are at the start of a hunk. - function parseHunk() { - var chunkHeaderIndex = i, - chunkHeaderLine = diffstr[i++], - chunkHeader = chunkHeaderLine.split(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/); - var hunk = { - oldStart: +chunkHeader[1], - oldLines: typeof chunkHeader[2] === 'undefined' ? 1 : +chunkHeader[2], - newStart: +chunkHeader[3], - newLines: typeof chunkHeader[4] === 'undefined' ? 1 : +chunkHeader[4], - lines: [] - }; - - // Unified Diff Format quirk: If the chunk size is 0, - // the first number is one lower than one would expect. - // https://www.artima.com/weblogs/viewpost.jsp?thread=164293 - if (hunk.oldLines === 0) { - hunk.oldStart += 1; - } - if (hunk.newLines === 0) { - hunk.newStart += 1; - } - var addCount = 0, - removeCount = 0; - for (; i < diffstr.length && (removeCount < hunk.oldLines || addCount < hunk.newLines || - /*istanbul ignore start*/ - (_diffstr$i = - /*istanbul ignore end*/ - diffstr[i]) !== null && _diffstr$i !== void 0 && - /*istanbul ignore start*/ - _diffstr$i - /*istanbul ignore end*/ - .startsWith('\\')); i++) { - /*istanbul ignore start*/ - var _diffstr$i; - /*istanbul ignore end*/ - var operation = diffstr[i].length == 0 && i != diffstr.length - 1 ? ' ' : diffstr[i][0]; - if (operation === '+' || operation === '-' || operation === ' ' || operation === '\\') { - hunk.lines.push(diffstr[i]); - if (operation === '+') { - addCount++; - } else if (operation === '-') { - removeCount++; - } else if (operation === ' ') { - addCount++; - removeCount++; - } - } else { - throw new Error( - /*istanbul ignore start*/ - "Hunk at line ".concat( - /*istanbul ignore end*/ - chunkHeaderIndex + 1, " contained invalid line ").concat(diffstr[i])); - } - } - - // Handle the empty block count case - if (!addCount && hunk.newLines === 1) { - hunk.newLines = 0; - } - if (!removeCount && hunk.oldLines === 1) { - hunk.oldLines = 0; - } - - // Perform sanity checking - if (addCount !== hunk.newLines) { - throw new Error('Added line count did not match for hunk at line ' + (chunkHeaderIndex + 1)); - } - if (removeCount !== hunk.oldLines) { - throw new Error('Removed line count did not match for hunk at line ' + (chunkHeaderIndex + 1)); - } - return hunk; - } - while (i < diffstr.length) { - parseIndex(); - } - return list; -} -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJwYXJzZVBhdGNoIiwidW5pRGlmZiIsImRpZmZzdHIiLCJzcGxpdCIsImxpc3QiLCJpIiwicGFyc2VJbmRleCIsImluZGV4IiwicHVzaCIsImxlbmd0aCIsImxpbmUiLCJ0ZXN0IiwiaGVhZGVyIiwiZXhlYyIsInBhcnNlRmlsZUhlYWRlciIsImh1bmtzIiwicGFyc2VIdW5rIiwiRXJyb3IiLCJKU09OIiwic3RyaW5naWZ5IiwiZmlsZUhlYWRlciIsImtleVByZWZpeCIsImRhdGEiLCJmaWxlTmFtZSIsInJlcGxhY2UiLCJzdWJzdHIiLCJ0cmltIiwiY2h1bmtIZWFkZXJJbmRleCIsImNodW5rSGVhZGVyTGluZSIsImNodW5rSGVhZGVyIiwiaHVuayIsIm9sZFN0YXJ0Iiwib2xkTGluZXMiLCJuZXdTdGFydCIsIm5ld0xpbmVzIiwibGluZXMiLCJhZGRDb3VudCIsInJlbW92ZUNvdW50IiwiX2RpZmZzdHIkaSIsInN0YXJ0c1dpdGgiLCJvcGVyYXRpb24iLCJjb25jYXQiXSwic291cmNlcyI6WyIuLi8uLi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1c2goZGlmZnN0cltpXSk7XG5cbiAgICAgICAgaWYgKG9wZXJhdGlvbiA9PT0gJysnKSB7XG4gICAgICAgICAgYWRkQ291bnQrKztcbiAgICAgICAgfSBlbHNlIGlmIChvcGVyYXRpb24gPT09ICctJykge1xuICAgICAgICAgIHJlbW92ZUNvdW50Kys7XG4gICAgICAgIH0gZWxzZSBpZiAob3BlcmF0aW9uID09PSAnICcpIHtcbiAgICAgICAgICBhZGRDb3VudCsrO1xuICAgICAgICAgIHJlbW92ZUNvdW50Kys7XG4gICAgICAgIH1cbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHRocm93IG5ldyBFcnJvcihgSHVuayBhdCBsaW5lICR7Y2h1bmtIZWFkZXJJbmRleCArIDF9IGNvbnRhaW5lZCBpbnZhbGlkIGxpbmUgJHtkaWZmc3RyW2ldfWApO1xuICAgICAgfVxuICAgIH1cblxuICAgIC8vIEhhbmRsZSB0aGUgZW1wdHkgYmxvY2sgY291bnQgY2FzZVxuICAgIGlmICghYWRkQ291bnQgJiYgaHVuay5uZXdMaW5lcyA9PT0gMSkge1xuICAgICAgaHVuay5uZXdMaW5lcyA9IDA7XG4gICAgfVxuICAgIGlmICghcmVtb3ZlQ291bnQgJiYgaHVuay5vbGRMaW5lcyA9PT0gMSkge1xuICAgICAgaHVuay5vbGRMaW5lcyA9IDA7XG4gICAgfVxuXG4gICAgLy8gUGVyZm9ybSBzYW5pdHkgY2hlY2tpbmdcbiAgICBpZiAoYWRkQ291bnQgIT09IGh1bmsubmV3TGluZXMpIHtcbiAgICAgIHRocm93IG5ldyBFcnJvcignQWRkZWQgbGluZSBjb3VudCBkaWQgbm90IG1hdGNoIGZvciBodW5rIGF0IGxpbmUgJyArIChjaHVua0hlYWRlckluZGV4ICsgMSkpO1xuICAgIH1cbiAgICBpZiAocmVtb3ZlQ291bnQgIT09IGh1bmsub2xkTGluZXMpIHtcbiAgICAgIHRocm93IG5ldyBFcnJvcignUmVtb3ZlZCBsaW5lIGNvdW50I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CQUFnQixHQUFHLENBQUMsQ0FBQyxDQUFDO0lBQzlGO0lBQ0EsSUFBSVUsV0FBVyxLQUFLUCxJQUFJLENBQUNFLFFBQVEsRUFBRTtNQUNqQyxNQUFNLElBQUlmLEtBQUssQ0FBQyxvREFBb0QsSUFBSVUsZ0JBQWdCLEdBQUcsQ0FBQyxDQUFDLENBQUM7SUFDaEc7SUFFQSxPQUFPRyxJQUFJO0VBQ2I7RUFFQSxPQUFPekIsQ0FBQyxHQUFHSCxPQUFPLENBQUNPLE1BQU0sRUFBRTtJQUN6QkgsVUFBVSxDQUFDLENBQUM7RUFDZDtFQUVBLE9BQU9GLElBQUk7QUFDYiIsImlnbm9yZUxpc3QiOltdfQ== diff --git a/node_modules/mocha/node_modules/diff/lib/patch/reverse.js b/node_modules/mocha/node_modules/diff/lib/patch/reverse.js deleted file mode 100644 index 3c8723e4..00000000 --- a/node_modules/mocha/node_modules/diff/lib/patch/reverse.js +++ /dev/null @@ -1,58 +0,0 @@ -/*istanbul ignore start*/ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.reversePatch = reversePatch; -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } -function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } -function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } -/*istanbul ignore end*/ -function reversePatch(structuredPatch) { - if (Array.isArray(structuredPatch)) { - return structuredPatch.map(reversePatch).reverse(); - } - return ( - /*istanbul ignore start*/ - _objectSpread(_objectSpread({}, - /*istanbul ignore end*/ - structuredPatch), {}, { - oldFileName: structuredPatch.newFileName, - oldHeader: structuredPatch.newHeader, - newFileName: structuredPatch.oldFileName, - newHeader: structuredPatch.oldHeader, - hunks: structuredPatch.hunks.map(function (hunk) { - return { - oldLines: hunk.newLines, - oldStart: hunk.newStart, - newLines: hunk.oldLines, - newStart: hunk.oldStart, - lines: hunk.lines.map(function (l) { - if (l.startsWith('-')) { - return ( - /*istanbul ignore start*/ - "+".concat( - /*istanbul ignore end*/ - l.slice(1)) - ); - } - if (l.startsWith('+')) { - return ( - /*istanbul ignore start*/ - "-".concat( - /*istanbul ignore end*/ - l.slice(1)) - ); - } - return l; - }) - }; - }) - }) - ); -} -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJyZXZlcnNlUGF0Y2giLCJzdHJ1Y3R1cmVkUGF0Y2giLCJBcnJheSIsImlzQXJyYXkiLCJtYXAiLCJyZXZlcnNlIiwiX29iamVjdFNwcmVhZCIsIm9sZEZpbGVOYW1lIiwibmV3RmlsZU5hbWUiLCJvbGRIZWFkZXIiLCJuZXdIZWFkZXIiLCJodW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FBQyxVQUFBYyxDQUFDLEVBQUk7WUFDekIsSUFBSUEsQ0FBQyxDQUFDQyxVQUFVLENBQUMsR0FBRyxDQUFDLEVBQUU7Y0FBRTtnQkFBQTtnQkFBQSxJQUFBQyxNQUFBO2dCQUFBO2dCQUFXRixDQUFDLENBQUNHLEtBQUssQ0FBQyxDQUFDLENBQUM7Y0FBQTtZQUFJO1lBQ2xELElBQUlILENBQUMsQ0FBQ0MsVUFBVSxDQUFDLEdBQUcsQ0FBQyxFQUFFO2NBQUU7Z0JBQUE7Z0JBQUEsSUFBQUMsTUFBQTtnQkFBQTtnQkFBV0YsQ0FBQyxDQUFDRyxLQUFLLENBQUMsQ0FBQyxDQUFDO2NBQUE7WUFBSTtZQUNsRCxPQUFPSCxDQUFDO1VBQ1YsQ0FBQztRQUNILENBQUM7TUFDSCxDQUFDO0lBQUM7RUFBQTtBQUVOIiwiaWdub3JlTGlzdCI6W119 diff --git a/node_modules/mocha/node_modules/diff/lib/util/array.js b/node_modules/mocha/node_modules/diff/lib/util/array.js deleted file mode 100644 index af10977a..00000000 --- a/node_modules/mocha/node_modules/diff/lib/util/array.js +++ /dev/null @@ -1,27 +0,0 @@ -/*istanbul ignore start*/ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.arrayEqual = arrayEqual; -exports.arrayStartsWith = arrayStartsWith; -/*istanbul ignore end*/ -function arrayEqual(a, b) { - if (a.length !== b.length) { - return false; - } - return arrayStartsWith(a, b); -} -function arrayStartsWith(array, start) { - if (start.length > array.length) { - return false; - } - for (var i = 0; i < start.length; i++) { - if (start[i] !== array[i]) { - return false; - } - } - return true; -} -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJhcnJheUVxdWFsIiwiYSIsImIiLCJsZW5ndGgiLCJhcnJheVN0YXJ0c1dpdGgiLCJhcnJheSIsInN0YXJ0IiwiaSJdLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy91dGls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xDQUFDLEVBQUUsRUFBRTtJQUNyQyxJQUFJRCxLQUFLLENBQUNDLENBQUMsQ0FBQyxLQUFLRixLQUFLLENBQUNFLENBQUMsQ0FBQyxFQUFFO01BQ3pCLE9BQU8sS0FBSztJQUNkO0VBQ0Y7RUFFQSxPQUFPLElBQUk7QUFDYiIsImlnbm9yZUxpc3QiOltdfQ== diff --git a/node_modules/mocha/node_modules/diff/lib/util/distance-iterator.js b/node_modules/mocha/node_modules/diff/lib/util/distance-iterator.js deleted file mode 100644 index 63893731..00000000 --- a/node_modules/mocha/node_modules/diff/lib/util/distance-iterator.js +++ /dev/null @@ -1,54 +0,0 @@ -/*istanbul ignore start*/ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports["default"] = _default; -/*istanbul ignore end*/ -// Iterator that traverses in the range of [min, max], stepping -// by distance from a given start position. I.e. for [0, 4], with -// start of 2, this will iterate 2, 3, 1, 4, 0. -function -/*istanbul ignore start*/ -_default -/*istanbul ignore end*/ -(start, minLine, maxLine) { - var wantForward = true, - backwardExhausted = false, - forwardExhausted = false, - localOffset = 1; - return function iterator() { - if (wantForward && !forwardExhausted) { - if (backwardExhausted) { - localOffset++; - } else { - wantForward = false; - } - - // Check if trying to fit beyond text length, and if not, check it fits - // after offset location (or desired location on first iteration) - if (start + localOffset <= maxLine) { - return start + localOffset; - } - forwardExhausted = true; - } - if (!backwardExhausted) { - if (!forwardExhausted) { - wantForward = true; - } - - // Check if trying to fit before text beginning, and if not, check it fits - // before offset location - if (minLine <= start - localOffset) { - return start - localOffset++; - } - backwardExhausted = true; - return iterator(); - } - - // We tried to fit hunk before text beginning and beyond text length, then - // hunk can't fit on the text. Return undefined - }; -} -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfZGVmYXVsdCIsInN0YXJ0IiwibWluTGluZSIsIm1heExpbmUiLCJ3YW50Rm9yd2FyZCIsImJhY2t3YXJkRXhoYXVzdGVkIi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kMsaUJBQWlCLEdBQUcsS0FBSztJQUN6QkMsZ0JBQWdCLEdBQUcsS0FBSztJQUN4QkMsV0FBVyxHQUFHLENBQUM7RUFFbkIsT0FBTyxTQUFTQyxRQUFRQSxDQUFBLEVBQUc7SUFDekIsSUFBSUosV0FBVyxJQUFJLENBQUNFLGdCQUFnQixFQUFFO01BQ3BDLElBQUlELGlCQUFpQixFQUFFO1FBQ3JCRSxXQUFXLEVBQUU7TUFDZixDQUFDLE1BQU07UUFDTEgsV0FBVyxHQUFHLEtBQUs7TUFDckI7O01BRUE7TUFDQTtNQUNBLElBQUlILEtBQUssR0FBR00sV0FBVyxJQUFJSixPQUFPLEVBQUU7UUFDbEMsT0FBT0YsS0FBSyxHQUFHTSxXQUFXO01BQzVCO01BRUFELGdCQUFnQixHQUFHLElBQUk7SUFDekI7SUFFQSxJQUFJLENBQUNELGlCQUFpQixFQUFFO01BQ3RCLElBQUksQ0FBQ0MsZ0JBQWdCLEVBQUU7UUFDckJGLFdBQVcsR0FBRyxJQUFJO01BQ3BCOztNQUVBO01BQ0E7TUFDQSxJQUFJRixPQUFPLElBQUlELEtBQUssR0FBR00sV0FBVyxFQUFFO1FBQ2xDLE9BQU9OLEtBQUssR0FBR00sV0FBVyxFQUFFO01BQzlCO01BRUFGLGlCQUFpQixHQUFHLElBQUk7TUFDeEIsT0FBT0csUUFBUSxDQUFDLENBQUM7SUFDbkI7O0lBRUE7SUFDQTtFQUNGLENBQUM7QUFDSCIsImlnbm9yZUxpc3QiOltdfQ== diff --git a/node_modules/mocha/node_modules/diff/lib/util/params.js b/node_modules/mocha/node_modules/diff/lib/util/params.js deleted file mode 100644 index 283c2472..00000000 --- a/node_modules/mocha/node_modules/diff/lib/util/params.js +++ /dev/null @@ -1,22 +0,0 @@ -/*istanbul ignore start*/ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.generateOptions = generateOptions; -/*istanbul ignore end*/ -function generateOptions(options, defaults) { - if (typeof options === 'function') { - defaults.callback = options; - } else if (options) { - for (var name in options) { - /* istanbul ignore else */ - if (options.hasOwnProperty(name)) { - defaults[name] = options[name]; - } - } - } - return defaults; -} -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJnZW5lcmF0ZU9wdGlvbnMiLCJvcHRpb25zIiwiZGVmYXVsdHMiLCJjYWxsYmFjayIsIm5hbWUiLCJoYXNPd25Qcm9wZXJ0eSJdLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy91dGlsL3BhcmFtcy5qcyJdLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgZnVuY3Rpb24gZ2VuZXJhdGVPcHRpb25zKG9wdGlvbnMsIGRlZmF1bHRzKSB7XG4gIGlmICh0eXBlb2Ygb3B0aW9ucyA9PT0gJ2Z1bmN0aW9uJykge1xuICAgIGRlZmF1bHRzLmNhbGxiYWNrID0gb3B0aW9ucztcbiAgfSBlbHNlIGlmIChvcHRpb25zKSB7XG4gICAgZm9yIChsZXQgbmFtZSBpbiBvcHRpb25zKSB7XG4gICAgICAvKiBpc3RhbmJ1bCBpZ25vcmUgZWxzZSAqL1xuICAgICAgaWYgKG9wdGlvbnMuaGFzT3duUHJvcGVydHkobmFtZSkpIHtcbiAgICAgICAgZGVmYXVsdHNbbmFtZV0gPSBvcHRpb25zW25hbWVdO1xuICAgICAgfVxuICAgIH1cbiAgfVxuICByZXR1cm4gZGVmYXVsdHM7XG59XG4iXSwibWFwcGluZ3MiOiI7Ozs7Ozs7O0FBQU8sU0FBU0EsZUFBZUEsQ0FBQ0MsT0FBTyxFQUFFQyxRQUFRLEVBQUU7RUFDakQsSUFBSSxPQUFPRCxPQUFPLEtBQUssVUFBVSxFQUFFO0lBQ2pDQyxRQUFRLENBQUNDLFFBQVEsR0FBR0YsT0FBTztFQUM3QixDQUFDLE1BQU0sSUFBSUEsT0FBTyxFQUFFO0lBQ2xCLEtBQUssSUFBSUcsSUFBSSxJQUFJSCxPQUFPLEVBQUU7TUFDeEI7TUFDQSxJQUFJQSxPQUFPLENBQUNJLGNBQWMsQ0FBQ0QsSUFBSSxDQUFDLEVBQUU7UUFDaENGLFFBQVEsQ0FBQ0UsSUFBSSxDQUFDLEdBQUdILE9BQU8sQ0FBQ0csSUFBSSxDQUFDO01BQ2hDO0lBQ0Y7RUFDRjtFQUNBLE9BQU9GLFFBQVE7QUFDakIiLCJpZ25vcmVMaXN0IjpbXX0= diff --git a/node_modules/mocha/node_modules/diff/lib/util/string.js b/node_modules/mocha/node_modules/diff/lib/util/string.js deleted file mode 100644 index f81c6827..00000000 --- a/node_modules/mocha/node_modules/diff/lib/util/string.js +++ /dev/null @@ -1,131 +0,0 @@ -/*istanbul ignore start*/ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.hasOnlyUnixLineEndings = hasOnlyUnixLineEndings; -exports.hasOnlyWinLineEndings = hasOnlyWinLineEndings; -exports.longestCommonPrefix = longestCommonPrefix; -exports.longestCommonSuffix = longestCommonSuffix; -exports.maximumOverlap = maximumOverlap; -exports.removePrefix = removePrefix; -exports.removeSuffix = removeSuffix; -exports.replacePrefix = replacePrefix; -exports.replaceSuffix = replaceSuffix; -/*istanbul ignore end*/ -function longestCommonPrefix(str1, str2) { - var i; - for (i = 0; i < str1.length && i < str2.length; i++) { - if (str1[i] != str2[i]) { - return str1.slice(0, i); - } - } - return str1.slice(0, i); -} -function longestCommonSuffix(str1, str2) { - var i; - - // Unlike longestCommonPrefix, we need a special case to handle all scenarios - // where we return the empty string since str1.slice(-0) will return the - // entire string. - if (!str1 || !str2 || str1[str1.length - 1] != str2[str2.length - 1]) { - return ''; - } - for (i = 0; i < str1.length && i < str2.length; i++) { - if (str1[str1.length - (i + 1)] != str2[str2.length - (i + 1)]) { - return str1.slice(-i); - } - } - return str1.slice(-i); -} -function replacePrefix(string, oldPrefix, newPrefix) { - if (string.slice(0, oldPrefix.length) != oldPrefix) { - throw Error( - /*istanbul ignore start*/ - "string ".concat( - /*istanbul ignore end*/ - JSON.stringify(string), " doesn't start with prefix ").concat(JSON.stringify(oldPrefix), "; this is a bug")); - } - return newPrefix + string.slice(oldPrefix.length); -} -function replaceSuffix(string, oldSuffix, newSuffix) { - if (!oldSuffix) { - return string + newSuffix; - } - if (string.slice(-oldSuffix.length) != oldSuffix) { - throw Error( - /*istanbul ignore start*/ - "string ".concat( - /*istanbul ignore end*/ - JSON.stringify(string), " doesn't end with suffix ").concat(JSON.stringify(oldSuffix), "; this is a bug")); - } - return string.slice(0, -oldSuffix.length) + newSuffix; -} -function removePrefix(string, oldPrefix) { - return replacePrefix(string, oldPrefix, ''); -} -function removeSuffix(string, oldSuffix) { - return replaceSuffix(string, oldSuffix, ''); -} -function maximumOverlap(string1, string2) { - return string2.slice(0, overlapCount(string1, string2)); -} - -// Nicked from https://stackoverflow.com/a/60422853/1709587 -function overlapCount(a, b) { - // Deal with cases where the strings differ in length - var startA = 0; - if (a.length > b.length) { - startA = a.length - b.length; - } - var endB = b.length; - if (a.length < b.length) { - endB = a.length; - } - // Create a back-reference for each index - // that should be followed in case of a mismatch. - // We only need B to make these references: - var map = Array(endB); - var k = 0; // Index that lags behind j - map[0] = 0; - for (var j = 1; j < endB; j++) { - if (b[j] == b[k]) { - map[j] = map[k]; // skip over the same character (optional optimisation) - } else { - map[j] = k; - } - while (k > 0 && b[j] != b[k]) { - k = map[k]; - } - if (b[j] == b[k]) { - k++; - } - } - // Phase 2: use these references while iterating over A - k = 0; - for (var i = startA; i < a.length; i++) { - while (k > 0 && a[i] != b[k]) { - k = map[k]; - } - if (a[i] == b[k]) { - k++; - } - } - return k; -} - -/** - * Returns true if the string consistently uses Windows line endings. - */ -function hasOnlyWinLineEndings(string) { - return string.includes('\r\n') && !string.startsWith('\n') && !string.match(/[^\r]\n/); -} - -/** - * Returns true if the string consistently uses Unix line endings. - */ -function hasOnlyUnixLineEndings(string) { - return !string.includes('\r\n') && string.includes('\n'); -} -//# sourceMappingURL=data:application/json;charset=utf-8;base64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0FBQyxFQUFFO01BQUVBLENBQUMsRUFBRTtJQUFFO0VBQzdCO0VBQ0EsT0FBT0EsQ0FBQztBQUNWOztBQUdBO0FBQ0E7QUFDQTtBQUNPLFNBQVNFLHFCQUFxQkEsQ0FBQ3hCLE1BQU0sRUFBRTtFQUM1QyxPQUFPQSxNQUFNLENBQUN5QixRQUFRLENBQUMsTUFBTSxDQUFDLElBQUksQ0FBQ3pCLE1BQU0sQ0FBQzBCLFVBQVUsQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDMUIsTUFBTSxDQUFDMkIsS0FBSyxDQUFDLFNBQVMsQ0FBQztBQUN4Rjs7QUFFQTtBQUNBO0FBQ0E7QUFDTyxTQUFTQyxzQkFBc0JBLENBQUM1QixNQUFNLEVBQUU7RUFDN0MsT0FBTyxDQUFDQSxNQUFNLENBQUN5QixRQUFRLENBQUMsTUFBTSxDQUFDLElBQUl6QixNQUFNLENBQUN5QixRQUFRLENBQUMsSUFBSSxDQUFDO0FBQzFEIiwiaWdub3JlTGlzdCI6W119 diff --git a/node_modules/mocha/node_modules/diff/libcjs/convert/dmp.d.ts b/node_modules/mocha/node_modules/diff/libcjs/convert/dmp.d.ts new file mode 100644 index 00000000..7760d3ad --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libcjs/convert/dmp.d.ts @@ -0,0 +1,8 @@ +import type { ChangeObject } from '../types.js'; +type DmpOperation = 1 | 0 | -1; +/** + * converts a list of change objects to the format returned by Google's [diff-match-patch](https://github.com/google/diff-match-patch) library + */ +export declare function convertChangesToDMP(changes: ChangeObject[]): [DmpOperation, ValueT][]; +export {}; +//# sourceMappingURL=dmp.d.ts.map \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libcjs/convert/dmp.d.ts.map b/node_modules/mocha/node_modules/diff/libcjs/convert/dmp.d.ts.map new file mode 100644 index 00000000..a3fc1ca7 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libcjs/convert/dmp.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"dmp.d.ts","sourceRoot":"","sources":["../../src/convert/dmp.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,aAAa,CAAC;AAE9C,KAAK,YAAY,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;AAE/B;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,OAAO,EAAE,YAAY,CAAC,MAAM,CAAC,EAAE,GAAG,CAAC,YAAY,EAAE,MAAM,CAAC,EAAE,CAiBrG"} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libcjs/convert/dmp.js b/node_modules/mocha/node_modules/diff/libcjs/convert/dmp.js new file mode 100644 index 00000000..9cbe8fb3 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libcjs/convert/dmp.js @@ -0,0 +1,24 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.convertChangesToDMP = convertChangesToDMP; +/** + * converts a list of change objects to the format returned by Google's [diff-match-patch](https://github.com/google/diff-match-patch) library + */ +function convertChangesToDMP(changes) { + const ret = []; + let change, operation; + for (let i = 0; i < changes.length; i++) { + change = changes[i]; + if (change.added) { + operation = 1; + } + else if (change.removed) { + operation = -1; + } + else { + operation = 0; + } + ret.push([operation, change.value]); + } + return ret; +} diff --git a/node_modules/mocha/node_modules/diff/libcjs/convert/xml.d.ts b/node_modules/mocha/node_modules/diff/libcjs/convert/xml.d.ts new file mode 100644 index 00000000..ac080ced --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libcjs/convert/xml.d.ts @@ -0,0 +1,6 @@ +import type { ChangeObject } from '../types.js'; +/** + * converts a list of change objects to a serialized XML format + */ +export declare function convertChangesToXML(changes: ChangeObject[]): string; +//# sourceMappingURL=xml.d.ts.map \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libcjs/convert/xml.d.ts.map b/node_modules/mocha/node_modules/diff/libcjs/convert/xml.d.ts.map new file mode 100644 index 00000000..4a8ffa99 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libcjs/convert/xml.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"xml.d.ts","sourceRoot":"","sources":["../../src/convert/xml.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,aAAa,CAAC;AAE9C;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,YAAY,CAAC,MAAM,CAAC,EAAE,GAAG,MAAM,CAmB3E"} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libcjs/convert/xml.js b/node_modules/mocha/node_modules/diff/libcjs/convert/xml.js new file mode 100644 index 00000000..4dd42338 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libcjs/convert/xml.js @@ -0,0 +1,34 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.convertChangesToXML = convertChangesToXML; +/** + * converts a list of change objects to a serialized XML format + */ +function convertChangesToXML(changes) { + const ret = []; + for (let i = 0; i < changes.length; i++) { + const change = changes[i]; + if (change.added) { + ret.push(''); + } + else if (change.removed) { + ret.push(''); + } + ret.push(escapeHTML(change.value)); + if (change.added) { + ret.push(''); + } + else if (change.removed) { + ret.push(''); + } + } + return ret.join(''); +} +function escapeHTML(s) { + let n = s; + n = n.replace(/&/g, '&'); + n = n.replace(//g, '>'); + n = n.replace(/"/g, '"'); + return n; +} diff --git a/node_modules/mocha/node_modules/diff/libcjs/diff/array.d.ts b/node_modules/mocha/node_modules/diff/libcjs/diff/array.d.ts new file mode 100644 index 00000000..ebe7fe8b --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libcjs/diff/array.d.ts @@ -0,0 +1,19 @@ +import Diff from './base.js'; +import type { ChangeObject, DiffArraysOptionsNonabortable, CallbackOptionNonabortable, DiffArraysOptionsAbortable, DiffCallbackNonabortable, CallbackOptionAbortable } from '../types.js'; +declare class ArrayDiff extends Diff> { + tokenize(value: Array): T[]; + join(value: Array): T[]; + removeEmpty(value: Array): T[]; +} +export declare const arrayDiff: ArrayDiff; +/** + * diffs two arrays of tokens, comparing each item for strict equality (===). + * @returns a list of change objects. + */ +export declare function diffArrays(oldArr: T[], newArr: T[], options: DiffCallbackNonabortable): undefined; +export declare function diffArrays(oldArr: T[], newArr: T[], options: DiffArraysOptionsAbortable & CallbackOptionAbortable): undefined; +export declare function diffArrays(oldArr: T[], newArr: T[], options: DiffArraysOptionsNonabortable & CallbackOptionNonabortable): undefined; +export declare function diffArrays(oldArr: T[], newArr: T[], options: DiffArraysOptionsAbortable): ChangeObject[] | undefined; +export declare function diffArrays(oldArr: T[], newArr: T[], options?: DiffArraysOptionsNonabortable): ChangeObject[]; +export {}; +//# sourceMappingURL=array.d.ts.map \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libcjs/diff/array.d.ts.map b/node_modules/mocha/node_modules/diff/libcjs/diff/array.d.ts.map new file mode 100644 index 00000000..57ab0787 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libcjs/diff/array.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"array.d.ts","sourceRoot":"","sources":["../../src/diff/array.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,KAAK,EAAC,YAAY,EAAE,6BAA6B,EAAE,0BAA0B,EAAE,0BAA0B,EAAE,wBAAwB,EAAE,uBAAuB,EAAC,MAAM,aAAa,CAAC;AAExL,cAAM,SAAS,CAAC,CAAC,CAAE,SAAQ,IAAI,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;IAC1C,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC;IAIxB,IAAI,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC;IAIpB,WAAW,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC;CAG5B;AAED,eAAO,MAAM,SAAS,oBAAkB,CAAC;AAEzC;;;GAGG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAC1B,MAAM,EAAE,CAAC,EAAE,EACX,MAAM,EAAE,CAAC,EAAE,EACX,OAAO,EAAE,wBAAwB,CAAC,CAAC,EAAE,CAAC,GACrC,SAAS,CAAC;AACb,wBAAgB,UAAU,CAAC,CAAC,EAC1B,MAAM,EAAE,CAAC,EAAE,EACX,MAAM,EAAE,CAAC,EAAE,EACX,OAAO,EAAE,0BAA0B,CAAC,CAAC,CAAC,GAAG,uBAAuB,CAAC,CAAC,EAAE,CAAC,GACpE,SAAS,CAAA;AACZ,wBAAgB,UAAU,CAAC,CAAC,EAC1B,MAAM,EAAE,CAAC,EAAE,EACX,MAAM,EAAE,CAAC,EAAE,EACX,OAAO,EAAE,6BAA6B,CAAC,CAAC,CAAC,GAAG,0BAA0B,CAAC,CAAC,EAAE,CAAC,GAC1E,SAAS,CAAA;AACZ,wBAAgB,UAAU,CAAC,CAAC,EAC1B,MAAM,EAAE,CAAC,EAAE,EACX,MAAM,EAAE,CAAC,EAAE,EACX,OAAO,EAAE,0BAA0B,CAAC,CAAC,CAAC,GACrC,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,SAAS,CAAA;AAClC,wBAAgB,UAAU,CAAC,CAAC,EAC1B,MAAM,EAAE,CAAC,EAAE,EACX,MAAM,EAAE,CAAC,EAAE,EACX,OAAO,CAAC,EAAE,6BAA6B,CAAC,CAAC,CAAC,GACzC,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE,CAAA"} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libcjs/diff/array.js b/node_modules/mocha/node_modules/diff/libcjs/diff/array.js new file mode 100644 index 00000000..36fdd10f --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libcjs/diff/array.js @@ -0,0 +1,23 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.arrayDiff = void 0; +exports.diffArrays = diffArrays; +const base_js_1 = __importDefault(require("./base.js")); +class ArrayDiff extends base_js_1.default { + tokenize(value) { + return value.slice(); + } + join(value) { + return value; + } + removeEmpty(value) { + return value; + } +} +exports.arrayDiff = new ArrayDiff(); +function diffArrays(oldArr, newArr, options) { + return exports.arrayDiff.diff(oldArr, newArr, options); +} diff --git a/node_modules/mocha/node_modules/diff/libcjs/diff/base.d.ts b/node_modules/mocha/node_modules/diff/libcjs/diff/base.d.ts new file mode 100644 index 00000000..b2fac32b --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libcjs/diff/base.d.ts @@ -0,0 +1,20 @@ +import type { ChangeObject, AllDiffOptions, AbortableDiffOptions, DiffCallbackNonabortable, CallbackOptionAbortable, CallbackOptionNonabortable } from '../types.js'; +export default class Diff = Iterable, InputValueT = ValueT> { + diff(oldStr: InputValueT, newStr: InputValueT, options: DiffCallbackNonabortable): undefined; + diff(oldStr: InputValueT, newStr: InputValueT, options: AllDiffOptions & AbortableDiffOptions & CallbackOptionAbortable): undefined; + diff(oldStr: InputValueT, newStr: InputValueT, options: AllDiffOptions & CallbackOptionNonabortable): undefined; + diff(oldStr: InputValueT, newStr: InputValueT, options: AllDiffOptions & AbortableDiffOptions): ChangeObject[] | undefined; + diff(oldStr: InputValueT, newStr: InputValueT, options?: AllDiffOptions): ChangeObject[]; + private diffWithOptionsObj; + private addToPath; + private extractCommon; + equals(left: TokenT, right: TokenT, options: AllDiffOptions): boolean; + removeEmpty(array: TokenT[]): TokenT[]; + castInput(value: InputValueT, options: AllDiffOptions): ValueT; + tokenize(value: ValueT, options: AllDiffOptions): TokenT[]; + join(chars: TokenT[]): ValueT; + postProcess(changeObjects: ChangeObject[], options: AllDiffOptions): ChangeObject[]; + get useLongestToken(): boolean; + private buildValues; +} +//# sourceMappingURL=base.d.ts.map \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libcjs/diff/base.d.ts.map b/node_modules/mocha/node_modules/diff/libcjs/diff/base.d.ts.map new file mode 100644 index 00000000..a3210d3b --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libcjs/diff/base.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/diff/base.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,YAAY,EAAE,cAAc,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,uBAAuB,EAAE,0BAA0B,EAA4D,MAAM,aAAa,CAAC;AAuB9N,MAAM,CAAC,OAAO,OAAO,IAAI,CACvB,MAAM,EACN,MAAM,SAAS,QAAQ,CAAC,MAAM,CAAC,GAAG,QAAQ,CAAC,MAAM,CAAC,EAClD,WAAW,GAAG,MAAM;IAEpB,IAAI,CACF,MAAM,EAAE,WAAW,EACnB,MAAM,EAAE,WAAW,EACnB,OAAO,EAAE,wBAAwB,CAAC,MAAM,CAAC,GACxC,SAAS;IACZ,IAAI,CACF,MAAM,EAAE,WAAW,EACnB,MAAM,EAAE,WAAW,EACnB,OAAO,EAAE,cAAc,GAAG,oBAAoB,GAAG,uBAAuB,CAAC,MAAM,CAAC,GAC/E,SAAS;IACZ,IAAI,CACF,MAAM,EAAE,WAAW,EACnB,MAAM,EAAE,WAAW,EACnB,OAAO,EAAE,cAAc,GAAG,0BAA0B,CAAC,MAAM,CAAC,GAC3D,SAAS;IACZ,IAAI,CACF,MAAM,EAAE,WAAW,EACnB,MAAM,EAAE,WAAW,EACnB,OAAO,EAAE,cAAc,GAAG,oBAAoB,GAC7C,YAAY,CAAC,MAAM,CAAC,EAAE,GAAG,SAAS;IACrC,IAAI,CACF,MAAM,EAAE,WAAW,EACnB,MAAM,EAAE,WAAW,EACnB,OAAO,CAAC,EAAE,cAAc,GACvB,YAAY,CAAC,MAAM,CAAC,EAAE;IAwBzB,OAAO,CAAC,kBAAkB;IA0I1B,OAAO,CAAC,SAAS;IAqBjB,OAAO,CAAC,aAAa;IA8BrB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,GAAG,OAAO;IASrE,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE;IAWtC,SAAS,CAAC,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,cAAc,GAAG,MAAM;IAK9D,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,GAAG,MAAM,EAAE;IAI1D,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM;IAQ7B,WAAW,CACT,aAAa,EAAE,YAAY,CAAC,MAAM,CAAC,EAAE,EAErC,OAAO,EAAE,cAAc,GACtB,YAAY,CAAC,MAAM,CAAC,EAAE;IAIzB,IAAI,eAAe,IAAI,OAAO,CAE7B;IAED,OAAO,CAAC,WAAW;CAkDpB"} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libcjs/diff/base.js b/node_modules/mocha/node_modules/diff/libcjs/diff/base.js new file mode 100644 index 00000000..9719c49a --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libcjs/diff/base.js @@ -0,0 +1,256 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +class Diff { + diff(oldStr, newStr, + // Type below is not accurate/complete - see above for full possibilities - but it compiles + options = {}) { + let callback; + if (typeof options === 'function') { + callback = options; + options = {}; + } + else if ('callback' in options) { + callback = options.callback; + } + // Allow subclasses to massage the input prior to running + const oldString = this.castInput(oldStr, options); + const newString = this.castInput(newStr, options); + const oldTokens = this.removeEmpty(this.tokenize(oldString, options)); + const newTokens = this.removeEmpty(this.tokenize(newString, options)); + return this.diffWithOptionsObj(oldTokens, newTokens, options, callback); + } + diffWithOptionsObj(oldTokens, newTokens, options, callback) { + var _a; + const done = (value) => { + value = this.postProcess(value, options); + if (callback) { + setTimeout(function () { callback(value); }, 0); + return undefined; + } + else { + return value; + } + }; + const newLen = newTokens.length, oldLen = oldTokens.length; + let editLength = 1; + let maxEditLength = newLen + oldLen; + if (options.maxEditLength != null) { + maxEditLength = Math.min(maxEditLength, options.maxEditLength); + } + const maxExecutionTime = (_a = options.timeout) !== null && _a !== void 0 ? _a : Infinity; + const abortAfterTimestamp = Date.now() + maxExecutionTime; + const bestPath = [{ oldPos: -1, lastComponent: undefined }]; + // Seed editLength = 0, i.e. the content starts with the same values + let newPos = this.extractCommon(bestPath[0], newTokens, oldTokens, 0, options); + if (bestPath[0].oldPos + 1 >= oldLen && newPos + 1 >= newLen) { + // Identity per the equality and tokenizer + return done(this.buildValues(bestPath[0].lastComponent, newTokens, oldTokens)); + } + // Once we hit the right edge of the edit graph on some diagonal k, we can + // definitely reach the end of the edit graph in no more than k edits, so + // there's no point in considering any moves to diagonal k+1 any more (from + // which we're guaranteed to need at least k+1 more edits). + // Similarly, once we've reached the bottom of the edit graph, there's no + // point considering moves to lower diagonals. + // We record this fact by setting minDiagonalToConsider and + // maxDiagonalToConsider to some finite value once we've hit the edge of + // the edit graph. + // This optimization is not faithful to the original algorithm presented in + // Myers's paper, which instead pointlessly extends D-paths off the end of + // the edit graph - see page 7 of Myers's paper which notes this point + // explicitly and illustrates it with a diagram. This has major performance + // implications for some common scenarios. For instance, to compute a diff + // where the new text simply appends d characters on the end of the + // original text of length n, the true Myers algorithm will take O(n+d^2) + // time while this optimization needs only O(n+d) time. + let minDiagonalToConsider = -Infinity, maxDiagonalToConsider = Infinity; + // Main worker method. checks all permutations of a given edit length for acceptance. + const execEditLength = () => { + for (let diagonalPath = Math.max(minDiagonalToConsider, -editLength); diagonalPath <= Math.min(maxDiagonalToConsider, editLength); diagonalPath += 2) { + let basePath; + const removePath = bestPath[diagonalPath - 1], addPath = bestPath[diagonalPath + 1]; + if (removePath) { + // No one else is going to attempt to use this value, clear it + // @ts-expect-error - perf optimisation. This type-violating value will never be read. + bestPath[diagonalPath - 1] = undefined; + } + let canAdd = false; + if (addPath) { + // what newPos will be after we do an insertion: + const addPathNewPos = addPath.oldPos - diagonalPath; + canAdd = addPath && 0 <= addPathNewPos && addPathNewPos < newLen; + } + const canRemove = removePath && removePath.oldPos + 1 < oldLen; + if (!canAdd && !canRemove) { + // If this path is a terminal then prune + // @ts-expect-error - perf optimisation. This type-violating value will never be read. + bestPath[diagonalPath] = undefined; + continue; + } + // Select the diagonal that we want to branch from. We select the prior + // path whose position in the old string is the farthest from the origin + // and does not pass the bounds of the diff graph + if (!canRemove || (canAdd && removePath.oldPos < addPath.oldPos)) { + basePath = this.addToPath(addPath, true, false, 0, options); + } + else { + basePath = this.addToPath(removePath, false, true, 1, options); + } + newPos = this.extractCommon(basePath, newTokens, oldTokens, diagonalPath, options); + if (basePath.oldPos + 1 >= oldLen && newPos + 1 >= newLen) { + // If we have hit the end of both strings, then we are done + return done(this.buildValues(basePath.lastComponent, newTokens, oldTokens)) || true; + } + else { + bestPath[diagonalPath] = basePath; + if (basePath.oldPos + 1 >= oldLen) { + maxDiagonalToConsider = Math.min(maxDiagonalToConsider, diagonalPath - 1); + } + if (newPos + 1 >= newLen) { + minDiagonalToConsider = Math.max(minDiagonalToConsider, diagonalPath + 1); + } + } + } + editLength++; + }; + // Performs the length of edit iteration. Is a bit fugly as this has to support the + // sync and async mode which is never fun. Loops over execEditLength until a value + // is produced, or until the edit length exceeds options.maxEditLength (if given), + // in which case it will return undefined. + if (callback) { + (function exec() { + setTimeout(function () { + if (editLength > maxEditLength || Date.now() > abortAfterTimestamp) { + return callback(undefined); + } + if (!execEditLength()) { + exec(); + } + }, 0); + }()); + } + else { + while (editLength <= maxEditLength && Date.now() <= abortAfterTimestamp) { + const ret = execEditLength(); + if (ret) { + return ret; + } + } + } + } + addToPath(path, added, removed, oldPosInc, options) { + const last = path.lastComponent; + if (last && !options.oneChangePerToken && last.added === added && last.removed === removed) { + return { + oldPos: path.oldPos + oldPosInc, + lastComponent: { count: last.count + 1, added: added, removed: removed, previousComponent: last.previousComponent } + }; + } + else { + return { + oldPos: path.oldPos + oldPosInc, + lastComponent: { count: 1, added: added, removed: removed, previousComponent: last } + }; + } + } + extractCommon(basePath, newTokens, oldTokens, diagonalPath, options) { + const newLen = newTokens.length, oldLen = oldTokens.length; + let oldPos = basePath.oldPos, newPos = oldPos - diagonalPath, commonCount = 0; + while (newPos + 1 < newLen && oldPos + 1 < oldLen && this.equals(oldTokens[oldPos + 1], newTokens[newPos + 1], options)) { + newPos++; + oldPos++; + commonCount++; + if (options.oneChangePerToken) { + basePath.lastComponent = { count: 1, previousComponent: basePath.lastComponent, added: false, removed: false }; + } + } + if (commonCount && !options.oneChangePerToken) { + basePath.lastComponent = { count: commonCount, previousComponent: basePath.lastComponent, added: false, removed: false }; + } + basePath.oldPos = oldPos; + return newPos; + } + equals(left, right, options) { + if (options.comparator) { + return options.comparator(left, right); + } + else { + return left === right + || (!!options.ignoreCase && left.toLowerCase() === right.toLowerCase()); + } + } + removeEmpty(array) { + const ret = []; + for (let i = 0; i < array.length; i++) { + if (array[i]) { + ret.push(array[i]); + } + } + return ret; + } + // eslint-disable-next-line @typescript-eslint/no-unused-vars + castInput(value, options) { + return value; + } + // eslint-disable-next-line @typescript-eslint/no-unused-vars + tokenize(value, options) { + return Array.from(value); + } + join(chars) { + // Assumes ValueT is string, which is the case for most subclasses. + // When it's false, e.g. in diffArrays, this method needs to be overridden (e.g. with a no-op) + // Yes, the casts are verbose and ugly, because this pattern - of having the base class SORT OF + // assume tokens and values are strings, but not completely - is weird and janky. + return chars.join(''); + } + postProcess(changeObjects, + // eslint-disable-next-line @typescript-eslint/no-unused-vars + options) { + return changeObjects; + } + get useLongestToken() { + return false; + } + buildValues(lastComponent, newTokens, oldTokens) { + // First we convert our linked list of components in reverse order to an + // array in the right order: + const components = []; + let nextComponent; + while (lastComponent) { + components.push(lastComponent); + nextComponent = lastComponent.previousComponent; + delete lastComponent.previousComponent; + lastComponent = nextComponent; + } + components.reverse(); + const componentLen = components.length; + let componentPos = 0, newPos = 0, oldPos = 0; + for (; componentPos < componentLen; componentPos++) { + const component = components[componentPos]; + if (!component.removed) { + if (!component.added && this.useLongestToken) { + let value = newTokens.slice(newPos, newPos + component.count); + value = value.map(function (value, i) { + const oldValue = oldTokens[oldPos + i]; + return oldValue.length > value.length ? oldValue : value; + }); + component.value = this.join(value); + } + else { + component.value = this.join(newTokens.slice(newPos, newPos + component.count)); + } + newPos += component.count; + // Common case + if (!component.added) { + oldPos += component.count; + } + } + else { + component.value = this.join(oldTokens.slice(oldPos, oldPos + component.count)); + oldPos += component.count; + } + } + return components; + } +} +exports.default = Diff; diff --git a/node_modules/mocha/node_modules/diff/libcjs/diff/character.d.ts b/node_modules/mocha/node_modules/diff/libcjs/diff/character.d.ts new file mode 100644 index 00000000..4f4c2cd7 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libcjs/diff/character.d.ts @@ -0,0 +1,19 @@ +import Diff from './base.js'; +import type { ChangeObject, CallbackOptionAbortable, CallbackOptionNonabortable, DiffCallbackNonabortable, DiffCharsOptionsAbortable, DiffCharsOptionsNonabortable } from '../types.js'; +declare class CharacterDiff extends Diff { +} +export declare const characterDiff: CharacterDiff; +/** + * diffs two blocks of text, treating each character as a token. + * + * ("Characters" here means Unicode code points - the elements you get when you loop over a string with a `for ... of ...` loop.) + * + * @returns a list of change objects. + */ +export declare function diffChars(oldStr: string, newStr: string, options: DiffCallbackNonabortable): undefined; +export declare function diffChars(oldStr: string, newStr: string, options: DiffCharsOptionsAbortable & CallbackOptionAbortable): undefined; +export declare function diffChars(oldStr: string, newStr: string, options: DiffCharsOptionsNonabortable & CallbackOptionNonabortable): undefined; +export declare function diffChars(oldStr: string, newStr: string, options: DiffCharsOptionsAbortable): ChangeObject[] | undefined; +export declare function diffChars(oldStr: string, newStr: string, options?: DiffCharsOptionsNonabortable): ChangeObject[]; +export {}; +//# sourceMappingURL=character.d.ts.map \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libcjs/diff/character.d.ts.map b/node_modules/mocha/node_modules/diff/libcjs/diff/character.d.ts.map new file mode 100644 index 00000000..43b21c42 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libcjs/diff/character.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"character.d.ts","sourceRoot":"","sources":["../../src/diff/character.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,KAAK,EAAE,YAAY,EAAE,uBAAuB,EAAE,0BAA0B,EAAE,wBAAwB,EAAE,yBAAyB,EAAE,4BAA4B,EAAC,MAAM,aAAa,CAAC;AAEvL,cAAM,aAAc,SAAQ,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC;CAAG;AAEnD,eAAO,MAAM,aAAa,eAAsB,CAAC;AAEjD;;;;;;GAMG;AACH,wBAAgB,SAAS,CACvB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,wBAAwB,CAAC,MAAM,CAAC,GACxC,SAAS,CAAC;AACb,wBAAgB,SAAS,CACvB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,yBAAyB,GAAG,uBAAuB,CAAC,MAAM,CAAC,GACnE,SAAS,CAAA;AACZ,wBAAgB,SAAS,CACvB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,4BAA4B,GAAG,0BAA0B,CAAC,MAAM,CAAC,GACzE,SAAS,CAAA;AACZ,wBAAgB,SAAS,CACvB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,yBAAyB,GACjC,YAAY,CAAC,MAAM,CAAC,EAAE,GAAG,SAAS,CAAA;AACrC,wBAAgB,SAAS,CACvB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,4BAA4B,GACrC,YAAY,CAAC,MAAM,CAAC,EAAE,CAAA"} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libcjs/diff/character.js b/node_modules/mocha/node_modules/diff/libcjs/diff/character.js new file mode 100644 index 00000000..91cd4632 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libcjs/diff/character.js @@ -0,0 +1,14 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.characterDiff = void 0; +exports.diffChars = diffChars; +const base_js_1 = __importDefault(require("./base.js")); +class CharacterDiff extends base_js_1.default { +} +exports.characterDiff = new CharacterDiff(); +function diffChars(oldStr, newStr, options) { + return exports.characterDiff.diff(oldStr, newStr, options); +} diff --git a/node_modules/mocha/node_modules/diff/libcjs/diff/css.d.ts b/node_modules/mocha/node_modules/diff/libcjs/diff/css.d.ts new file mode 100644 index 00000000..2c16ed44 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libcjs/diff/css.d.ts @@ -0,0 +1,18 @@ +import Diff from './base.js'; +import type { ChangeObject, CallbackOptionAbortable, CallbackOptionNonabortable, DiffCallbackNonabortable, DiffCssOptionsAbortable, DiffCssOptionsNonabortable } from '../types.js'; +declare class CssDiff extends Diff { + tokenize(value: string): string[]; +} +export declare const cssDiff: CssDiff; +/** + * diffs two blocks of text, comparing CSS tokens. + * + * @returns a list of change objects. + */ +export declare function diffCss(oldStr: string, newStr: string, options: DiffCallbackNonabortable): undefined; +export declare function diffCss(oldStr: string, newStr: string, options: DiffCssOptionsAbortable & CallbackOptionAbortable): undefined; +export declare function diffCss(oldStr: string, newStr: string, options: DiffCssOptionsNonabortable & CallbackOptionNonabortable): undefined; +export declare function diffCss(oldStr: string, newStr: string, options: DiffCssOptionsAbortable): ChangeObject[] | undefined; +export declare function diffCss(oldStr: string, newStr: string, options?: DiffCssOptionsNonabortable): ChangeObject[]; +export {}; +//# sourceMappingURL=css.d.ts.map \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libcjs/diff/css.d.ts.map b/node_modules/mocha/node_modules/diff/libcjs/diff/css.d.ts.map new file mode 100644 index 00000000..58e71667 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libcjs/diff/css.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"css.d.ts","sourceRoot":"","sources":["../../src/diff/css.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,KAAK,EAAE,YAAY,EAAE,uBAAuB,EAAE,0BAA0B,EAAE,wBAAwB,EAAE,uBAAuB,EAAE,0BAA0B,EAAC,MAAM,aAAa,CAAC;AAEnL,cAAM,OAAQ,SAAQ,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC;IACxC,QAAQ,CAAC,KAAK,EAAE,MAAM;CAGvB;AAED,eAAO,MAAM,OAAO,SAAgB,CAAC;AAErC;;;;GAIG;AACH,wBAAgB,OAAO,CACrB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,wBAAwB,CAAC,MAAM,CAAC,GACxC,SAAS,CAAC;AACb,wBAAgB,OAAO,CACrB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,uBAAuB,GAAG,uBAAuB,CAAC,MAAM,CAAC,GACjE,SAAS,CAAA;AACZ,wBAAgB,OAAO,CACrB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,0BAA0B,GAAG,0BAA0B,CAAC,MAAM,CAAC,GACvE,SAAS,CAAA;AACZ,wBAAgB,OAAO,CACrB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,uBAAuB,GAC/B,YAAY,CAAC,MAAM,CAAC,EAAE,GAAG,SAAS,CAAA;AACrC,wBAAgB,OAAO,CACrB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,0BAA0B,GACnC,YAAY,CAAC,MAAM,CAAC,EAAE,CAAA"} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libcjs/diff/css.js b/node_modules/mocha/node_modules/diff/libcjs/diff/css.js new file mode 100644 index 00000000..bd745244 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libcjs/diff/css.js @@ -0,0 +1,17 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.cssDiff = void 0; +exports.diffCss = diffCss; +const base_js_1 = __importDefault(require("./base.js")); +class CssDiff extends base_js_1.default { + tokenize(value) { + return value.split(/([{}:;,]|\s+)/); + } +} +exports.cssDiff = new CssDiff(); +function diffCss(oldStr, newStr, options) { + return exports.cssDiff.diff(oldStr, newStr, options); +} diff --git a/node_modules/mocha/node_modules/diff/libcjs/diff/json.d.ts b/node_modules/mocha/node_modules/diff/libcjs/diff/json.d.ts new file mode 100644 index 00000000..0747a455 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libcjs/diff/json.d.ts @@ -0,0 +1,24 @@ +import Diff from './base.js'; +import type { ChangeObject, CallbackOptionAbortable, CallbackOptionNonabortable, DiffCallbackNonabortable, DiffJsonOptionsAbortable, DiffJsonOptionsNonabortable } from '../types.js'; +import { tokenize } from './line.js'; +declare class JsonDiff extends Diff { + get useLongestToken(): boolean; + tokenize: typeof tokenize; + castInput(value: string | object, options: DiffJsonOptionsNonabortable | DiffJsonOptionsAbortable): string; + equals(left: string, right: string, options: DiffJsonOptionsNonabortable | DiffJsonOptionsAbortable): boolean; +} +export declare const jsonDiff: JsonDiff; +/** + * diffs two JSON-serializable objects by first serializing them to prettily-formatted JSON and then treating each line of the JSON as a token. + * Object properties are ordered alphabetically in the serialized JSON, so the order of properties in the objects being compared doesn't affect the result. + * + * @returns a list of change objects. + */ +export declare function diffJson(oldStr: string | object, newStr: string | object, options: DiffCallbackNonabortable): undefined; +export declare function diffJson(oldStr: string | object, newStr: string | object, options: DiffJsonOptionsAbortable & CallbackOptionAbortable): undefined; +export declare function diffJson(oldStr: string | object, newStr: string | object, options: DiffJsonOptionsNonabortable & CallbackOptionNonabortable): undefined; +export declare function diffJson(oldStr: string | object, newStr: string | object, options: DiffJsonOptionsAbortable): ChangeObject[] | undefined; +export declare function diffJson(oldStr: string | object, newStr: string | object, options?: DiffJsonOptionsNonabortable): ChangeObject[]; +export declare function canonicalize(obj: any, stack: Array | null, replacementStack: Array | null, replacer: (k: string, v: any) => any, key?: string): any; +export {}; +//# sourceMappingURL=json.d.ts.map \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libcjs/diff/json.d.ts.map b/node_modules/mocha/node_modules/diff/libcjs/diff/json.d.ts.map new file mode 100644 index 00000000..5dacfcf8 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libcjs/diff/json.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"json.d.ts","sourceRoot":"","sources":["../../src/diff/json.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,KAAK,EAAE,YAAY,EAAE,uBAAuB,EAAE,0BAA0B,EAAE,wBAAwB,EAAE,wBAAwB,EAAE,2BAA2B,EAAC,MAAM,aAAa,CAAC;AACrL,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAErC,cAAM,QAAS,SAAQ,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IAC1D,IAAI,eAAe,YAIlB;IAED,QAAQ,kBAAY;IAEpB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,OAAO,EAAE,2BAA2B,GAAG,wBAAwB;IAMjG,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,2BAA2B,GAAG,wBAAwB;CAGpG;AAED,eAAO,MAAM,QAAQ,UAAiB,CAAC;AAEvC;;;;;GAKG;AACH,wBAAgB,QAAQ,CACtB,MAAM,EAAE,MAAM,GAAG,MAAM,EACvB,MAAM,EAAE,MAAM,GAAG,MAAM,EACvB,OAAO,EAAE,wBAAwB,CAAC,MAAM,CAAC,GACxC,SAAS,CAAC;AACb,wBAAgB,QAAQ,CACtB,MAAM,EAAE,MAAM,GAAG,MAAM,EACvB,MAAM,EAAE,MAAM,GAAG,MAAM,EACvB,OAAO,EAAE,wBAAwB,GAAG,uBAAuB,CAAC,MAAM,CAAC,GAClE,SAAS,CAAA;AACZ,wBAAgB,QAAQ,CACtB,MAAM,EAAE,MAAM,GAAG,MAAM,EACvB,MAAM,EAAE,MAAM,GAAG,MAAM,EACvB,OAAO,EAAE,2BAA2B,GAAG,0BAA0B,CAAC,MAAM,CAAC,GACxE,SAAS,CAAA;AACZ,wBAAgB,QAAQ,CACtB,MAAM,EAAE,MAAM,GAAG,MAAM,EACvB,MAAM,EAAE,MAAM,GAAG,MAAM,EACvB,OAAO,EAAE,wBAAwB,GAChC,YAAY,CAAC,MAAM,CAAC,EAAE,GAAG,SAAS,CAAA;AACrC,wBAAgB,QAAQ,CACtB,MAAM,EAAE,MAAM,GAAG,MAAM,EACvB,MAAM,EAAE,MAAM,GAAG,MAAM,EACvB,OAAO,CAAC,EAAE,2BAA2B,GACpC,YAAY,CAAC,MAAM,CAAC,EAAE,CAAA;AAQzB,wBAAgB,YAAY,CAC1B,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,IAAI,EAAE,gBAAgB,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,IAAI,EAC7D,QAAQ,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,GAAG,KAAK,GAAG,EACpC,GAAG,CAAC,EAAE,MAAM,OA0Db"} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libcjs/diff/json.js b/node_modules/mocha/node_modules/diff/libcjs/diff/json.js new file mode 100644 index 00000000..c45dd51c --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libcjs/diff/json.js @@ -0,0 +1,86 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.jsonDiff = void 0; +exports.diffJson = diffJson; +exports.canonicalize = canonicalize; +const base_js_1 = __importDefault(require("./base.js")); +const line_js_1 = require("./line.js"); +class JsonDiff extends base_js_1.default { + constructor() { + super(...arguments); + this.tokenize = line_js_1.tokenize; + } + get useLongestToken() { + // Discriminate between two lines of pretty-printed, serialized JSON where one of them has a + // dangling comma and the other doesn't. Turns out including the dangling comma yields the nicest output: + return true; + } + castInput(value, options) { + const { undefinedReplacement, stringifyReplacer = (k, v) => typeof v === 'undefined' ? undefinedReplacement : v } = options; + return typeof value === 'string' ? value : JSON.stringify(canonicalize(value, null, null, stringifyReplacer), null, ' '); + } + equals(left, right, options) { + return super.equals(left.replace(/,([\r\n])/g, '$1'), right.replace(/,([\r\n])/g, '$1'), options); + } +} +exports.jsonDiff = new JsonDiff(); +function diffJson(oldStr, newStr, options) { + return exports.jsonDiff.diff(oldStr, newStr, options); +} +// This function handles the presence of circular references by bailing out when encountering an +// object that is already on the "stack" of items being processed. Accepts an optional replacer +function canonicalize(obj, stack, replacementStack, replacer, key) { + stack = stack || []; + replacementStack = replacementStack || []; + if (replacer) { + obj = replacer(key === undefined ? '' : key, obj); + } + let i; + for (i = 0; i < stack.length; i += 1) { + if (stack[i] === obj) { + return replacementStack[i]; + } + } + let canonicalizedObj; + if ('[object Array]' === Object.prototype.toString.call(obj)) { + stack.push(obj); + canonicalizedObj = new Array(obj.length); + replacementStack.push(canonicalizedObj); + for (i = 0; i < obj.length; i += 1) { + canonicalizedObj[i] = canonicalize(obj[i], stack, replacementStack, replacer, String(i)); + } + stack.pop(); + replacementStack.pop(); + return canonicalizedObj; + } + if (obj && obj.toJSON) { + obj = obj.toJSON(); + } + if (typeof obj === 'object' && obj !== null) { + stack.push(obj); + canonicalizedObj = {}; + replacementStack.push(canonicalizedObj); + const sortedKeys = []; + let key; + for (key in obj) { + /* istanbul ignore else */ + if (Object.prototype.hasOwnProperty.call(obj, key)) { + sortedKeys.push(key); + } + } + sortedKeys.sort(); + for (i = 0; i < sortedKeys.length; i += 1) { + key = sortedKeys[i]; + canonicalizedObj[key] = canonicalize(obj[key], stack, replacementStack, replacer, key); + } + stack.pop(); + replacementStack.pop(); + } + else { + canonicalizedObj = obj; + } + return canonicalizedObj; +} diff --git a/node_modules/mocha/node_modules/diff/libcjs/diff/line.d.ts b/node_modules/mocha/node_modules/diff/libcjs/diff/line.d.ts new file mode 100644 index 00000000..9a4b2768 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libcjs/diff/line.d.ts @@ -0,0 +1,24 @@ +import Diff from './base.js'; +import type { ChangeObject, CallbackOptionAbortable, CallbackOptionNonabortable, DiffCallbackNonabortable, DiffLinesOptionsAbortable, DiffLinesOptionsNonabortable } from '../types.js'; +declare class LineDiff extends Diff { + tokenize: typeof tokenize; + equals(left: string, right: string, options: DiffLinesOptionsAbortable | DiffLinesOptionsNonabortable): boolean; +} +export declare const lineDiff: LineDiff; +/** + * diffs two blocks of text, treating each line as a token. + * @returns a list of change objects. + */ +export declare function diffLines(oldStr: string, newStr: string, options: DiffCallbackNonabortable): undefined; +export declare function diffLines(oldStr: string, newStr: string, options: DiffLinesOptionsAbortable & CallbackOptionAbortable): undefined; +export declare function diffLines(oldStr: string, newStr: string, options: DiffLinesOptionsNonabortable & CallbackOptionNonabortable): undefined; +export declare function diffLines(oldStr: string, newStr: string, options: DiffLinesOptionsAbortable): ChangeObject[] | undefined; +export declare function diffLines(oldStr: string, newStr: string, options?: DiffLinesOptionsNonabortable): ChangeObject[]; +export declare function diffTrimmedLines(oldStr: string, newStr: string, options: DiffCallbackNonabortable): undefined; +export declare function diffTrimmedLines(oldStr: string, newStr: string, options: DiffLinesOptionsAbortable & CallbackOptionAbortable): undefined; +export declare function diffTrimmedLines(oldStr: string, newStr: string, options: DiffLinesOptionsNonabortable & CallbackOptionNonabortable): undefined; +export declare function diffTrimmedLines(oldStr: string, newStr: string, options: DiffLinesOptionsAbortable): ChangeObject[] | undefined; +export declare function diffTrimmedLines(oldStr: string, newStr: string, options?: DiffLinesOptionsNonabortable): ChangeObject[]; +export declare function tokenize(value: string, options: DiffLinesOptionsAbortable | DiffLinesOptionsNonabortable): string[]; +export {}; +//# sourceMappingURL=line.d.ts.map \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libcjs/diff/line.d.ts.map b/node_modules/mocha/node_modules/diff/libcjs/diff/line.d.ts.map new file mode 100644 index 00000000..f5882bf6 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libcjs/diff/line.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"line.d.ts","sourceRoot":"","sources":["../../src/diff/line.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,KAAK,EAAE,YAAY,EAAE,uBAAuB,EAAE,0BAA0B,EAAE,wBAAwB,EAAE,yBAAyB,EAAE,4BAA4B,EAAC,MAAM,aAAa,CAAC;AAGvL,cAAM,QAAS,SAAQ,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC;IACzC,QAAQ,kBAAY;IAEpB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,yBAAyB,GAAG,4BAA4B;CAyBtG;AAED,eAAO,MAAM,QAAQ,UAAiB,CAAC;AAEvC;;;GAGG;AACH,wBAAgB,SAAS,CACvB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,wBAAwB,CAAC,MAAM,CAAC,GACxC,SAAS,CAAC;AACb,wBAAgB,SAAS,CACvB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,yBAAyB,GAAG,uBAAuB,CAAC,MAAM,CAAC,GACnE,SAAS,CAAA;AACZ,wBAAgB,SAAS,CACvB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,4BAA4B,GAAG,0BAA0B,CAAC,MAAM,CAAC,GACzE,SAAS,CAAA;AACZ,wBAAgB,SAAS,CACvB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,yBAAyB,GACjC,YAAY,CAAC,MAAM,CAAC,EAAE,GAAG,SAAS,CAAA;AACrC,wBAAgB,SAAS,CACvB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,4BAA4B,GACrC,YAAY,CAAC,MAAM,CAAC,EAAE,CAAA;AAWzB,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,wBAAwB,CAAC,MAAM,CAAC,GACxC,SAAS,CAAC;AACb,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,yBAAyB,GAAG,uBAAuB,CAAC,MAAM,CAAC,GACnE,SAAS,CAAA;AACZ,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,4BAA4B,GAAG,0BAA0B,CAAC,MAAM,CAAC,GACzE,SAAS,CAAA;AACZ,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,yBAAyB,GACjC,YAAY,CAAC,MAAM,CAAC,EAAE,GAAG,SAAS,CAAA;AACrC,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,4BAA4B,GACrC,YAAY,CAAC,MAAM,CAAC,EAAE,CAAA;AAOzB,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,yBAAyB,GAAG,4BAA4B,YA0BxG"} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libcjs/diff/line.js b/node_modules/mocha/node_modules/diff/libcjs/diff/line.js new file mode 100644 index 00000000..caeef5a8 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libcjs/diff/line.js @@ -0,0 +1,74 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.lineDiff = void 0; +exports.diffLines = diffLines; +exports.diffTrimmedLines = diffTrimmedLines; +exports.tokenize = tokenize; +const base_js_1 = __importDefault(require("./base.js")); +const params_js_1 = require("../util/params.js"); +class LineDiff extends base_js_1.default { + constructor() { + super(...arguments); + this.tokenize = tokenize; + } + equals(left, right, options) { + // If we're ignoring whitespace, we need to normalise lines by stripping + // whitespace before checking equality. (This has an annoying interaction + // with newlineIsToken that requires special handling: if newlines get their + // own token, then we DON'T want to trim the *newline* tokens down to empty + // strings, since this would cause us to treat whitespace-only line content + // as equal to a separator between lines, which would be weird and + // inconsistent with the documented behavior of the options.) + if (options.ignoreWhitespace) { + if (!options.newlineIsToken || !left.includes('\n')) { + left = left.trim(); + } + if (!options.newlineIsToken || !right.includes('\n')) { + right = right.trim(); + } + } + else if (options.ignoreNewlineAtEof && !options.newlineIsToken) { + if (left.endsWith('\n')) { + left = left.slice(0, -1); + } + if (right.endsWith('\n')) { + right = right.slice(0, -1); + } + } + return super.equals(left, right, options); + } +} +exports.lineDiff = new LineDiff(); +function diffLines(oldStr, newStr, options) { + return exports.lineDiff.diff(oldStr, newStr, options); +} +function diffTrimmedLines(oldStr, newStr, options) { + options = (0, params_js_1.generateOptions)(options, { ignoreWhitespace: true }); + return exports.lineDiff.diff(oldStr, newStr, options); +} +// Exported standalone so it can be used from jsonDiff too. +function tokenize(value, options) { + if (options.stripTrailingCr) { + // remove one \r before \n to match GNU diff's --strip-trailing-cr behavior + value = value.replace(/\r\n/g, '\n'); + } + const retLines = [], linesAndNewlines = value.split(/(\n|\r\n)/); + // Ignore the final empty token that occurs if the string ends with a new line + if (!linesAndNewlines[linesAndNewlines.length - 1]) { + linesAndNewlines.pop(); + } + // Merge the content and line separators into single tokens + for (let i = 0; i < linesAndNewlines.length; i++) { + const line = linesAndNewlines[i]; + if (i % 2 && !options.newlineIsToken) { + retLines[retLines.length - 1] += line; + } + else { + retLines.push(line); + } + } + return retLines; +} diff --git a/node_modules/mocha/node_modules/diff/libcjs/diff/sentence.d.ts b/node_modules/mocha/node_modules/diff/libcjs/diff/sentence.d.ts new file mode 100644 index 00000000..2e5e751b --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libcjs/diff/sentence.d.ts @@ -0,0 +1,21 @@ +import Diff from './base.js'; +import type { ChangeObject, CallbackOptionAbortable, CallbackOptionNonabortable, DiffCallbackNonabortable, DiffSentencesOptionsAbortable, DiffSentencesOptionsNonabortable } from '../types.js'; +declare class SentenceDiff extends Diff { + tokenize(value: string): string[]; +} +export declare const sentenceDiff: SentenceDiff; +/** + * diffs two blocks of text, treating each sentence, and the whitespace between each pair of sentences, as a token. + * The characters `.`, `!`, and `?`, when followed by whitespace, are treated as marking the end of a sentence; nothing else besides the end of the string is considered to mark a sentence end. + * + * (For more sophisticated detection of sentence breaks, including support for non-English punctuation, consider instead tokenizing with an [`Intl.Segmenter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter) with `granularity: 'sentence'` and passing the result to `diffArrays`.) + * + * @returns a list of change objects. + */ +export declare function diffSentences(oldStr: string, newStr: string, options: DiffCallbackNonabortable): undefined; +export declare function diffSentences(oldStr: string, newStr: string, options: DiffSentencesOptionsAbortable & CallbackOptionAbortable): undefined; +export declare function diffSentences(oldStr: string, newStr: string, options: DiffSentencesOptionsNonabortable & CallbackOptionNonabortable): undefined; +export declare function diffSentences(oldStr: string, newStr: string, options: DiffSentencesOptionsAbortable): ChangeObject[] | undefined; +export declare function diffSentences(oldStr: string, newStr: string, options?: DiffSentencesOptionsNonabortable): ChangeObject[]; +export {}; +//# sourceMappingURL=sentence.d.ts.map \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libcjs/diff/sentence.d.ts.map b/node_modules/mocha/node_modules/diff/libcjs/diff/sentence.d.ts.map new file mode 100644 index 00000000..78231ed2 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libcjs/diff/sentence.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"sentence.d.ts","sourceRoot":"","sources":["../../src/diff/sentence.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,KAAK,EACV,YAAY,EACZ,uBAAuB,EACvB,0BAA0B,EAC1B,wBAAwB,EACxB,6BAA6B,EAC7B,gCAAgC,EACjC,MAAM,aAAa,CAAC;AAMrB,cAAM,YAAa,SAAQ,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC;IAC7C,QAAQ,CAAC,KAAK,EAAE,MAAM;CAoCvB;AAED,eAAO,MAAM,YAAY,cAAqB,CAAC;AAE/C;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAC3B,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,wBAAwB,CAAC,MAAM,CAAC,GACxC,SAAS,CAAC;AACb,wBAAgB,aAAa,CAC3B,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,6BAA6B,GAAG,uBAAuB,CAAC,MAAM,CAAC,GACvE,SAAS,CAAA;AACZ,wBAAgB,aAAa,CAC3B,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,gCAAgC,GAAG,0BAA0B,CAAC,MAAM,CAAC,GAC7E,SAAS,CAAA;AACZ,wBAAgB,aAAa,CAC3B,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,6BAA6B,GACrC,YAAY,CAAC,MAAM,CAAC,EAAE,GAAG,SAAS,CAAA;AACrC,wBAAgB,aAAa,CAC3B,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,gCAAgC,GACzC,YAAY,CAAC,MAAM,CAAC,EAAE,CAAA"} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libcjs/diff/sentence.js b/node_modules/mocha/node_modules/diff/libcjs/diff/sentence.js new file mode 100644 index 00000000..e394bc29 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libcjs/diff/sentence.js @@ -0,0 +1,50 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.sentenceDiff = void 0; +exports.diffSentences = diffSentences; +const base_js_1 = __importDefault(require("./base.js")); +function isSentenceEndPunct(char) { + return char == '.' || char == '!' || char == '?'; +} +class SentenceDiff extends base_js_1.default { + tokenize(value) { + var _a; + // If in future we drop support for environments that don't support lookbehinds, we can replace + // this entire function with: + // return value.split(/(?<=[.!?])(\s+|$)/); + // but until then, for similar reasons to the trailingWs function in string.ts, we are forced + // to do this verbosely "by hand" instead of using a regex. + const result = []; + let tokenStartI = 0; + for (let i = 0; i < value.length; i++) { + if (i == value.length - 1) { + result.push(value.slice(tokenStartI)); + break; + } + if (isSentenceEndPunct(value[i]) && value[i + 1].match(/\s/)) { + // We've hit a sentence break - i.e. a punctuation mark followed by whitespace. + // We now want to push TWO tokens to the result: + // 1. the sentence + result.push(value.slice(tokenStartI, i + 1)); + // 2. the whitespace + i = tokenStartI = i + 1; + while ((_a = value[i + 1]) === null || _a === void 0 ? void 0 : _a.match(/\s/)) { + i++; + } + result.push(value.slice(tokenStartI, i + 1)); + // Then the next token (a sentence) starts on the character after the whitespace. + // (It's okay if this is off the end of the string - then the outer loop will terminate + // here anyway.) + tokenStartI = i + 1; + } + } + return result; + } +} +exports.sentenceDiff = new SentenceDiff(); +function diffSentences(oldStr, newStr, options) { + return exports.sentenceDiff.diff(oldStr, newStr, options); +} diff --git a/node_modules/mocha/node_modules/diff/libcjs/diff/word.d.ts b/node_modules/mocha/node_modules/diff/libcjs/diff/word.d.ts new file mode 100644 index 00000000..166fae63 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libcjs/diff/word.d.ts @@ -0,0 +1,35 @@ +import Diff from './base.js'; +import type { ChangeObject, CallbackOptionAbortable, CallbackOptionNonabortable, DiffCallbackNonabortable, DiffWordsOptionsAbortable, DiffWordsOptionsNonabortable } from '../types.js'; +declare class WordDiff extends Diff { + equals(left: string, right: string, options: DiffWordsOptionsAbortable | DiffWordsOptionsNonabortable): boolean; + tokenize(value: string, options?: DiffWordsOptionsAbortable | DiffWordsOptionsNonabortable): string[]; + join(tokens: string[]): string; + postProcess(changes: ChangeObject[], options: any): ChangeObject[]; +} +export declare const wordDiff: WordDiff; +/** + * diffs two blocks of text, treating each word and each punctuation mark as a token. + * Whitespace is ignored when computing the diff (but preserved as far as possible in the final change objects). + * + * @returns a list of change objects. + */ +export declare function diffWords(oldStr: string, newStr: string, options: DiffCallbackNonabortable): undefined; +export declare function diffWords(oldStr: string, newStr: string, options: DiffWordsOptionsAbortable & CallbackOptionAbortable): undefined; +export declare function diffWords(oldStr: string, newStr: string, options: DiffWordsOptionsNonabortable & CallbackOptionNonabortable): undefined; +export declare function diffWords(oldStr: string, newStr: string, options: DiffWordsOptionsAbortable): ChangeObject[] | undefined; +export declare function diffWords(oldStr: string, newStr: string, options?: DiffWordsOptionsNonabortable): ChangeObject[]; +declare class WordsWithSpaceDiff extends Diff { + tokenize(value: string): [] | RegExpMatchArray; +} +export declare const wordsWithSpaceDiff: WordsWithSpaceDiff; +/** + * diffs two blocks of text, treating each word, punctuation mark, newline, or run of (non-newline) whitespace as a token. + * @returns a list of change objects + */ +export declare function diffWordsWithSpace(oldStr: string, newStr: string, options: DiffCallbackNonabortable): undefined; +export declare function diffWordsWithSpace(oldStr: string, newStr: string, options: DiffWordsOptionsAbortable & CallbackOptionAbortable): undefined; +export declare function diffWordsWithSpace(oldStr: string, newStr: string, options: DiffWordsOptionsNonabortable & CallbackOptionNonabortable): undefined; +export declare function diffWordsWithSpace(oldStr: string, newStr: string, options: DiffWordsOptionsAbortable): ChangeObject[] | undefined; +export declare function diffWordsWithSpace(oldStr: string, newStr: string, options?: DiffWordsOptionsNonabortable): ChangeObject[]; +export {}; +//# sourceMappingURL=word.d.ts.map \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libcjs/diff/word.d.ts.map b/node_modules/mocha/node_modules/diff/libcjs/diff/word.d.ts.map new file mode 100644 index 00000000..ced53e87 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libcjs/diff/word.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"word.d.ts","sourceRoot":"","sources":["../../src/diff/word.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,KAAK,EAAE,YAAY,EAAE,uBAAuB,EAAE,0BAA0B,EAAE,wBAAwB,EAAE,yBAAyB,EAAE,4BAA4B,EAAC,MAAM,aAAa,CAAC;AAqDvL,cAAM,QAAS,SAAQ,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC;IACzC,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,yBAAyB,GAAG,4BAA4B;IASrG,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,GAAE,yBAAyB,GAAG,4BAAiC;IAwC9F,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE;IAerB,WAAW,CAAC,OAAO,EAAE,YAAY,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE,GAAG;CA6B1D;AAED,eAAO,MAAM,QAAQ,UAAiB,CAAC;AAEvC;;;;;GAKG;AACH,wBAAgB,SAAS,CACvB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,wBAAwB,CAAC,MAAM,CAAC,GACxC,SAAS,CAAC;AACb,wBAAgB,SAAS,CACvB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,yBAAyB,GAAG,uBAAuB,CAAC,MAAM,CAAC,GACnE,SAAS,CAAA;AACZ,wBAA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O,CAAC,EAAE,4BAA4B,GACrC,YAAY,CAAC,MAAM,CAAC,EAAE,CAAA"} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libcjs/diff/word.js b/node_modules/mocha/node_modules/diff/libcjs/diff/word.js new file mode 100644 index 00000000..57c6250b --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libcjs/diff/word.js @@ -0,0 +1,289 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.wordsWithSpaceDiff = exports.wordDiff = void 0; +exports.diffWords = diffWords; +exports.diffWordsWithSpace = diffWordsWithSpace; +const base_js_1 = __importDefault(require("./base.js")); +const string_js_1 = require("../util/string.js"); +// Based on https://en.wikipedia.org/wiki/Latin_script_in_Unicode +// +// Chars/ranges counted as "word" characters by this regex are as follows: +// +// + U+00AD Soft hyphen +// + 00C0–00FF (letters with diacritics from the Latin-1 Supplement), except: +// - U+00D7 × Multiplication sign +// - U+00F7 ÷ Division sign +// + Latin Extended-A, 0100–017F +// + Latin Extended-B, 0180–024F +// + IPA Extensions, 0250–02AF +// + Spacing Modifier Letters, 02B0–02FF, except: +// - U+02C7 ˇ ˇ Caron +// - U+02D8 ˘ ˘ Breve +// - U+02D9 ˙ ˙ Dot Above +// - U+02DA ˚ ˚ Ring Above +// - U+02DB ˛ ˛ Ogonek +// - U+02DC ˜ ˜ Small Tilde +// - U+02DD ˝ ˝ Double Acute Accent +// + Latin Extended Additional, 1E00–1EFF +const extendedWordChars = 'a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}'; +// Each token is one of the following: +// - A punctuation mark plus the surrounding whitespace +// - A word plus the surrounding whitespace +// - Pure whitespace (but only in the special case where the entire text +// is just whitespace) +// +// We have to include surrounding whitespace in the tokens because the two +// alternative approaches produce horribly broken results: +// * If we just discard the whitespace, we can't fully reproduce the original +// text from the sequence of tokens and any attempt to render the diff will +// get the whitespace wrong. +// * If we have separate tokens for whitespace, then in a typical text every +// second token will be a single space character. But this often results in +// the optimal diff between two texts being a perverse one that preserves +// the spaces between words but deletes and reinserts actual common words. +// See https://github.com/kpdecker/jsdiff/issues/160#issuecomment-1866099640 +// for an example. +// +// Keeping the surrounding whitespace of course has implications for .equals +// and .join, not just .tokenize. +// This regex does NOT fully implement the tokenization rules described above. +// Instead, it gives runs of whitespace their own "token". The tokenize method +// then handles stitching whitespace tokens onto adjacent word or punctuation +// tokens. +const tokenizeIncludingWhitespace = new RegExp(`[${extendedWordChars}]+|\\s+|[^${extendedWordChars}]`, 'ug'); +class WordDiff extends base_js_1.default { + equals(left, right, options) { + if (options.ignoreCase) { + left = left.toLowerCase(); + right = right.toLowerCase(); + } + return left.trim() === right.trim(); + } + tokenize(value, options = {}) { + let parts; + if (options.intlSegmenter) { + const segmenter = options.intlSegmenter; + if (segmenter.resolvedOptions().granularity != 'word') { + throw new Error('The segmenter passed must have a granularity of "word"'); + } + // We want `parts` to be an array whose elements alternate between being + // pure whitespace and being pure non-whitespace. This is ALMOST what the + // segments returned by a word-based Intl.Segmenter already look like, + // but not quite - see explanation in the docs of our custom segment() + // function. + parts = (0, string_js_1.segment)(value, segmenter); + } + else { + parts = value.match(tokenizeIncludingWhitespace) || []; + } + const tokens = []; + let prevPart = null; + parts.forEach(part => { + if ((/\s/).test(part)) { + if (prevPart == null) { + tokens.push(part); + } + else { + tokens.push(tokens.pop() + part); + } + } + else if (prevPart != null && (/\s/).test(prevPart)) { + if (tokens[tokens.length - 1] == prevPart) { + tokens.push(tokens.pop() + part); + } + else { + tokens.push(prevPart + part); + } + } + else { + tokens.push(part); + } + prevPart = part; + }); + return tokens; + } + join(tokens) { + // Tokens being joined here will always have appeared consecutively in the + // same text, so we can simply strip off the leading whitespace from all the + // tokens except the first (and except any whitespace-only tokens - but such + // a token will always be the first and only token anyway) and then join them + // and the whitespace around words and punctuation will end up correct. + return tokens.map((token, i) => { + if (i == 0) { + return token; + } + else { + return token.replace((/^\s+/), ''); + } + }).join(''); + } + postProcess(changes, options) { + if (!changes || options.oneChangePerToken) { + return changes; + } + let lastKeep = null; + // Change objects representing any insertion or deletion since the last + // "keep" change object. There can be at most one of each. + let insertion = null; + let deletion = null; + changes.forEach(change => { + if (change.added) { + insertion = change; + } + else if (change.removed) { + deletion = change; + } + else { + if (insertion || deletion) { // May be false at start of text + dedupeWhitespaceInChangeObjects(lastKeep, deletion, insertion, change, options.intlSegmenter); + } + lastKeep = change; + insertion = null; + deletion = null; + } + }); + if (insertion || deletion) { + dedupeWhitespaceInChangeObjects(lastKeep, deletion, insertion, null, options.intlSegmenter); + } + return changes; + } +} +exports.wordDiff = new WordDiff(); +function diffWords(oldStr, newStr, options) { + // This option has never been documented and never will be (it's clearer to + // just call `diffWordsWithSpace` directly if you need that behavior), but + // has existed in jsdiff for a long time, so we retain support for it here + // for the sake of backwards compatibility. + if ((options === null || options === void 0 ? void 0 : options.ignoreWhitespace) != null && !options.ignoreWhitespace) { + return diffWordsWithSpace(oldStr, newStr, options); + } + return exports.wordDiff.diff(oldStr, newStr, options); +} +function dedupeWhitespaceInChangeObjects(startKeep, deletion, insertion, endKeep, segmenter) { + // Before returning, we tidy up the leading and trailing whitespace of the + // change objects to eliminate cases where trailing whitespace in one object + // is repeated as leading whitespace in the next. + // Below are examples of the outcomes we want here to explain the code. + // I=insert, K=keep, D=delete + // 1. diffing 'foo bar baz' vs 'foo baz' + // Prior to cleanup, we have K:'foo ' D:' bar ' K:' baz' + // After cleanup, we want: K:'foo ' D:'bar ' K:'baz' + // + // 2. Diffing 'foo bar baz' vs 'foo qux baz' + // Prior to cleanup, we have K:'foo ' D:' bar ' I:' qux ' K:' baz' + // After cleanup, we want K:'foo ' D:'bar' I:'qux' K:' baz' + // + // 3. Diffing 'foo\nbar baz' vs 'foo baz' + // Prior to cleanup, we have K:'foo ' D:'\nbar ' K:' baz' + // After cleanup, we want K'foo' D:'\nbar' K:' baz' + // + // 4. Diffing 'foo baz' vs 'foo\nbar baz' + // Prior to cleanup, we have K:'foo\n' I:'\nbar ' K:' baz' + // After cleanup, we ideally want K'foo' I:'\nbar' K:' baz' + // but don't actually manage this currently (the pre-cleanup change + // objects don't contain enough information to make it possible). + // + // 5. Diffing 'foo bar baz' vs 'foo baz' + // Prior to cleanup, we have K:'foo ' D:' bar ' K:' baz' + // After cleanup, we want K:'foo ' D:' bar ' K:'baz' + // + // Our handling is unavoidably imperfect in the case where there's a single + // indel between keeps and the whitespace has changed. For instance, consider + // diffing 'foo\tbar\nbaz' vs 'foo baz'. Unless we create an extra change + // object to represent the insertion of the space character (which isn't even + // a token), we have no way to avoid losing information about the texts' + // original whitespace in the result we return. Still, we do our best to + // output something that will look sensible if we e.g. print it with + // insertions in green and deletions in red. + // Between two "keep" change objects (or before the first or after the last + // change object), we can have either: + // * A "delete" followed by an "insert" + // * Just an "insert" + // * Just a "delete" + // We handle the three cases separately. + if (deletion && insertion) { + const [oldWsPrefix, oldWsSuffix] = (0, string_js_1.leadingAndTrailingWs)(deletion.value, segmenter); + const [newWsPrefix, newWsSuffix] = (0, string_js_1.leadingAndTrailingWs)(insertion.value, segmenter); + if (startKeep) { + const commonWsPrefix = (0, string_js_1.longestCommonPrefix)(oldWsPrefix, newWsPrefix); + startKeep.value = (0, string_js_1.replaceSuffix)(startKeep.value, newWsPrefix, commonWsPrefix); + deletion.value = (0, string_js_1.removePrefix)(deletion.value, commonWsPrefix); + insertion.value = (0, string_js_1.removePrefix)(insertion.value, commonWsPrefix); + } + if (endKeep) { + const commonWsSuffix = (0, string_js_1.longestCommonSuffix)(oldWsSuffix, newWsSuffix); + endKeep.value = (0, string_js_1.replacePrefix)(endKeep.value, newWsSuffix, commonWsSuffix); + deletion.value = (0, string_js_1.removeSuffix)(deletion.value, commonWsSuffix); + insertion.value = (0, string_js_1.removeSuffix)(insertion.value, commonWsSuffix); + } + } + else if (insertion) { + // The whitespaces all reflect what was in the new text rather than + // the old, so we essentially have no information about whitespace + // insertion or deletion. We just want to dedupe the whitespace. + // We do that by having each change object keep its trailing + // whitespace and deleting duplicate leading whitespace where + // present. + if (startKeep) { + const ws = (0, string_js_1.leadingWs)(insertion.value, segmenter); + insertion.value = insertion.value.substring(ws.length); + } + if (endKeep) { + const ws = (0, string_js_1.leadingWs)(endKeep.value, segmenter); + endKeep.value = endKeep.value.substring(ws.length); + } + // otherwise we've got a deletion and no insertion + } + else if (startKeep && endKeep) { + const newWsFull = (0, string_js_1.leadingWs)(endKeep.value, segmenter), [delWsStart, delWsEnd] = (0, string_js_1.leadingAndTrailingWs)(deletion.value, segmenter); + // Any whitespace that comes straight after startKeep in both the old and + // new texts, assign to startKeep and remove from the deletion. + const newWsStart = (0, string_js_1.longestCommonPrefix)(newWsFull, delWsStart); + deletion.value = (0, string_js_1.removePrefix)(deletion.value, newWsStart); + // Any whitespace that comes straight before endKeep in both the old and + // new texts, and hasn't already been assigned to startKeep, assign to + // endKeep and remove from the deletion. + const newWsEnd = (0, string_js_1.longestCommonSuffix)((0, string_js_1.removePrefix)(newWsFull, newWsStart), delWsEnd); + deletion.value = (0, string_js_1.removeSuffix)(deletion.value, newWsEnd); + endKeep.value = (0, string_js_1.replacePrefix)(endKeep.value, newWsFull, newWsEnd); + // If there's any whitespace from the new text that HASN'T already been + // assigned, assign it to the start: + startKeep.value = (0, string_js_1.replaceSuffix)(startKeep.value, newWsFull, newWsFull.slice(0, newWsFull.length - newWsEnd.length)); + } + else if (endKeep) { + // We are at the start of the text. Preserve all the whitespace on + // endKeep, and just remove whitespace from the end of deletion to the + // extent that it overlaps with the start of endKeep. + const endKeepWsPrefix = (0, string_js_1.leadingWs)(endKeep.value, segmenter); + const deletionWsSuffix = (0, string_js_1.trailingWs)(deletion.value, segmenter); + const overlap = (0, string_js_1.maximumOverlap)(deletionWsSuffix, endKeepWsPrefix); + deletion.value = (0, string_js_1.removeSuffix)(deletion.value, overlap); + } + else if (startKeep) { + // We are at the END of the text. Preserve all the whitespace on + // startKeep, and just remove whitespace from the start of deletion to + // the extent that it overlaps with the end of startKeep. + const startKeepWsSuffix = (0, string_js_1.trailingWs)(startKeep.value, segmenter); + const deletionWsPrefix = (0, string_js_1.leadingWs)(deletion.value, segmenter); + const overlap = (0, string_js_1.maximumOverlap)(startKeepWsSuffix, deletionWsPrefix); + deletion.value = (0, string_js_1.removePrefix)(deletion.value, overlap); + } +} +class WordsWithSpaceDiff extends base_js_1.default { + tokenize(value) { + // Slightly different to the tokenizeIncludingWhitespace regex used above in + // that this one treats each individual newline as a distinct token, rather + // than merging them into other surrounding whitespace. This was requested + // in https://github.com/kpdecker/jsdiff/issues/180 & + // https://github.com/kpdecker/jsdiff/issues/211 + const regex = new RegExp(`(\\r?\\n)|[${extendedWordChars}]+|[^\\S\\n\\r]+|[^${extendedWordChars}]`, 'ug'); + return value.match(regex) || []; + } +} +exports.wordsWithSpaceDiff = new WordsWithSpaceDiff(); +function diffWordsWithSpace(oldStr, newStr, options) { + return exports.wordsWithSpaceDiff.diff(oldStr, newStr, options); +} diff --git a/node_modules/mocha/node_modules/diff/libcjs/index.d.ts b/node_modules/mocha/node_modules/diff/libcjs/index.d.ts new file mode 100644 index 00000000..96dc8d1a --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libcjs/index.d.ts @@ -0,0 +1,20 @@ +import Diff from './diff/base.js'; +import { diffChars, characterDiff } from './diff/character.js'; +import { diffWords, diffWordsWithSpace, wordDiff, wordsWithSpaceDiff } from './diff/word.js'; +import { diffLines, diffTrimmedLines, lineDiff } from './diff/line.js'; +import { diffSentences, sentenceDiff } from './diff/sentence.js'; +import { diffCss, cssDiff } from './diff/css.js'; +import { diffJson, canonicalize, jsonDiff } from './diff/json.js'; +import { diffArrays, arrayDiff } from './diff/array.js'; +import { applyPatch, applyPatches } from './patch/apply.js'; +import type { ApplyPatchOptions, ApplyPatchesOptions } from './patch/apply.js'; +import { parsePatch } from './patch/parse.js'; +import { reversePatch } from './patch/reverse.js'; +import { structuredPatch, createTwoFilesPatch, createPatch, formatPatch, INCLUDE_HEADERS, FILE_HEADERS_ONLY, OMIT_HEADERS } from './patch/create.js'; +import type { StructuredPatchOptionsAbortable, StructuredPatchOptionsNonabortable, CreatePatchOptionsAbortable, CreatePatchOptionsNonabortable, HeaderOptions } from './patch/create.js'; +import { convertChangesToDMP } from './convert/dmp.js'; +import { convertChangesToXML } from './convert/xml.js'; +import type { ChangeObject, Change, ArrayChange, DiffArraysOptionsAbortable, DiffArraysOptionsNonabortable, DiffCharsOptionsAbortable, DiffCharsOptionsNonabortable, DiffLinesOptionsAbortable, DiffLinesOptionsNonabortable, DiffWordsOptionsAbortable, DiffWordsOptionsNonabortable, DiffSentencesOptionsAbortable, DiffSentencesOptionsNonabortable, DiffJsonOptionsAbortable, DiffJsonOptionsNonabortable, DiffCssOptionsAbortable, DiffCssOptionsNonabortable, StructuredPatch, StructuredPatchHunk } from './types.js'; +export { Diff, diffChars, characterDiff, diffWords, wordDiff, diffWordsWithSpace, wordsWithSpaceDiff, diffLines, lineDiff, diffTrimmedLines, diffSentences, sentenceDiff, diffCss, cssDiff, diffJson, jsonDiff, diffArrays, arrayDiff, structuredPatch, createTwoFilesPatch, createPatch, formatPatch, INCLUDE_HEADERS, FILE_HEADERS_ONLY, OMIT_HEADERS, applyPatch, applyPatches, parsePatch, reversePatch, convertChangesToDMP, convertChangesToXML, canonicalize }; +export type { ChangeObject, Change, ArrayChange, DiffArraysOptionsAbortable, DiffArraysOptionsNonabortable, DiffCharsOptionsAbortable, DiffCharsOptionsNonabortable, DiffLinesOptionsAbortable, DiffLinesOptionsNonabortable, DiffWordsOptionsAbortable, DiffWordsOptionsNonabortable, DiffSentencesOptionsAbortable, DiffSentencesOptionsNonabortable, DiffJsonOptionsAbortable, DiffJsonOptionsNonabortable, DiffCssOptionsAbortable, DiffCssOptionsNonabortable, StructuredPatch, StructuredPatchHunk, ApplyPatchOptions, ApplyPatchesOptions, StructuredPatchOptionsAbortable, StructuredPatchOptionsNonabortable, CreatePatchOptionsAbortable, CreatePatchOptionsNonabortable, HeaderOptions }; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libcjs/index.d.ts.map b/node_modules/mocha/node_modules/diff/libcjs/index.d.ts.map new file mode 100644 index 00000000..4a14d504 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libcjs/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAgBA,OAAO,IAAI,MAAM,gBAAgB,CAAC;AAClC,OAAO,EAAC,SAAS,EAAE,aAAa,EAAC,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAC,SAAS,EAAE,kBAAkB,EAAE,QAAQ,EAAE,kBAAkB,EAAC,MAAM,gBAAgB,CAAC;AAC3F,OAAO,EAAC,SAAS,EAAE,gBAAgB,EAAE,QAAQ,EAAC,MAAM,gBAAgB,CAAC;AACrE,OAAO,EAAC,aAAa,EAAE,YAAY,EAAC,MAAM,oBAAoB,CAAC;AAE/D,OAAO,EAAC,OAAO,EAAE,OAAO,EAAC,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAC,QAAQ,EAAE,YAAY,EAAE,QAAQ,EAAC,MAAM,gBAAgB,CAAC;AAEhE,OAAO,EAAC,UAAU,EAAE,SAAS,EAAC,MAAM,iBAAiB,CAAC;AAEtD,OAAO,EAAC,UAAU,EAAE,YAAY,EAAC,MAAM,kBAAkB,CAAC;AAC1D,OAAO,KAAK,EAAC,iBAAiB,EAAE,mBAAmB,EAAC,MAAM,kBAAkB,CAAC;AAC7E,OAAO,EAAC,UAAU,EAAC,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAC,YAAY,EAAC,MAAM,oBAAoB,CAAC;AAChD,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,WAAW,EACX,WAA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EAC3B,uBAAuB,EACvB,0BAA0B,EAC1B,eAAe,EACf,mBAAmB,EAEnB,iBAAiB,EACjB,mBAAmB,EAEnB,+BAA+B,EAC/B,kCAAkC,EAClC,2BAA2B,EAC3B,8BAA8B,EAC9B,aAAa,EACd,CAAC"} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libcjs/index.js b/node_modules/mocha/node_modules/diff/libcjs/index.js new file mode 100644 index 00000000..cff91db4 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libcjs/index.js @@ -0,0 +1,67 @@ +"use strict"; +/* See LICENSE file for terms of use */ +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.canonicalize = exports.convertChangesToXML = exports.convertChangesToDMP = exports.reversePatch = exports.parsePatch = exports.applyPatches = exports.applyPatch = exports.OMIT_HEADERS = exports.FILE_HEADERS_ONLY = exports.INCLUDE_HEADERS = exports.formatPatch = exports.createPatch = exports.createTwoFilesPatch = exports.structuredPatch = exports.arrayDiff = exports.diffArrays = exports.jsonDiff = exports.diffJson = exports.cssDiff = exports.diffCss = exports.sentenceDiff = exports.diffSentences = exports.diffTrimmedLines = exports.lineDiff = exports.diffLines = exports.wordsWithSpaceDiff = exports.diffWordsWithSpace = exports.wordDiff = exports.diffWords = exports.characterDiff = exports.diffChars = exports.Diff = void 0; +/* + * Text diff implementation. + * + * This library supports the following APIs: + * Diff.diffChars: Character by character diff + * Diff.diffWords: Word (as defined by \b regex) diff which ignores whitespace + * Diff.diffLines: Line based diff + * + * Diff.diffCss: Diff targeted at CSS content + * + * These methods are based on the implementation proposed in + * "An O(ND) Difference Algorithm and its Variations" (Myers, 1986). + * http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.4.6927 + */ +const base_js_1 = __importDefault(require("./diff/base.js")); +exports.Diff = base_js_1.default; +const character_js_1 = require("./diff/character.js"); +Object.defineProperty(exports, "diffChars", { enumerable: true, get: function () { return character_js_1.diffChars; } }); +Object.defineProperty(exports, "characterDiff", { enumerable: true, get: function () { return character_js_1.characterDiff; } }); +const word_js_1 = require("./diff/word.js"); +Object.defineProperty(exports, "diffWords", { enumerable: true, get: function () { return word_js_1.diffWords; } }); +Object.defineProperty(exports, "diffWordsWithSpace", { enumerable: true, get: function () { return word_js_1.diffWordsWithSpace; } }); +Object.defineProperty(exports, "wordDiff", { enumerable: true, get: function () { return word_js_1.wordDiff; } }); +Object.defineProperty(exports, "wordsWithSpaceDiff", { enumerable: true, get: function () { return word_js_1.wordsWithSpaceDiff; } }); +const line_js_1 = require("./diff/line.js"); +Object.defineProperty(exports, "diffLines", { enumerable: true, get: function () { return line_js_1.diffLines; } }); +Object.defineProperty(exports, "diffTrimmedLines", { enumerable: true, get: function () { return line_js_1.diffTrimmedLines; } }); +Object.defineProperty(exports, "lineDiff", { enumerable: true, get: function () { return line_js_1.lineDiff; } }); +const sentence_js_1 = require("./diff/sentence.js"); +Object.defineProperty(exports, "diffSentences", { enumerable: true, get: function () { return sentence_js_1.diffSentences; } }); +Object.defineProperty(exports, "sentenceDiff", { enumerable: true, get: function () { return sentence_js_1.sentenceDiff; } }); +const css_js_1 = require("./diff/css.js"); +Object.defineProperty(exports, "diffCss", { enumerable: true, get: function () { return css_js_1.diffCss; } }); +Object.defineProperty(exports, "cssDiff", { enumerable: true, get: function () { return css_js_1.cssDiff; } }); +const json_js_1 = require("./diff/json.js"); +Object.defineProperty(exports, "diffJson", { enumerable: true, get: function () { return json_js_1.diffJson; } }); +Object.defineProperty(exports, "canonicalize", { enumerable: true, get: function () { return json_js_1.canonicalize; } }); +Object.defineProperty(exports, "jsonDiff", { enumerable: true, get: function () { return json_js_1.jsonDiff; } }); +const array_js_1 = require("./diff/array.js"); +Object.defineProperty(exports, "diffArrays", { enumerable: true, get: function () { return array_js_1.diffArrays; } }); +Object.defineProperty(exports, "arrayDiff", { enumerable: true, get: function () { return array_js_1.arrayDiff; } }); +const apply_js_1 = require("./patch/apply.js"); +Object.defineProperty(exports, "applyPatch", { enumerable: true, get: function () { return apply_js_1.applyPatch; } }); +Object.defineProperty(exports, "applyPatches", { enumerable: true, get: function () { return apply_js_1.applyPatches; } }); +const parse_js_1 = require("./patch/parse.js"); +Object.defineProperty(exports, "parsePatch", { enumerable: true, get: function () { return parse_js_1.parsePatch; } }); +const reverse_js_1 = require("./patch/reverse.js"); +Object.defineProperty(exports, "reversePatch", { enumerable: true, get: function () { return reverse_js_1.reversePatch; } }); +const create_js_1 = require("./patch/create.js"); +Object.defineProperty(exports, "structuredPatch", { enumerable: true, get: function () { return create_js_1.structuredPatch; } }); +Object.defineProperty(exports, "createTwoFilesPatch", { enumerable: true, get: function () { return create_js_1.createTwoFilesPatch; } }); +Object.defineProperty(exports, "createPatch", { enumerable: true, get: function () { return create_js_1.createPatch; } }); +Object.defineProperty(exports, "formatPatch", { enumerable: true, get: function () { return create_js_1.formatPatch; } }); +Object.defineProperty(exports, "INCLUDE_HEADERS", { enumerable: true, get: function () { return create_js_1.INCLUDE_HEADERS; } }); +Object.defineProperty(exports, "FILE_HEADERS_ONLY", { enumerable: true, get: function () { return create_js_1.FILE_HEADERS_ONLY; } }); +Object.defineProperty(exports, "OMIT_HEADERS", { enumerable: true, get: function () { return create_js_1.OMIT_HEADERS; } }); +const dmp_js_1 = require("./convert/dmp.js"); +Object.defineProperty(exports, "convertChangesToDMP", { enumerable: true, get: function () { return dmp_js_1.convertChangesToDMP; } }); +const xml_js_1 = require("./convert/xml.js"); +Object.defineProperty(exports, "convertChangesToXML", { enumerable: true, get: function () { return xml_js_1.convertChangesToXML; } }); diff --git a/node_modules/mocha/node_modules/diff/libcjs/package.json b/node_modules/mocha/node_modules/diff/libcjs/package.json new file mode 100644 index 00000000..731cf3f1 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libcjs/package.json @@ -0,0 +1 @@ +{"type":"commonjs","sideEffects":false} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libcjs/patch/apply.d.ts b/node_modules/mocha/node_modules/diff/libcjs/patch/apply.d.ts new file mode 100644 index 00000000..e953f1fa --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libcjs/patch/apply.d.ts @@ -0,0 +1,62 @@ +import type { StructuredPatch } from '../types.js'; +export interface ApplyPatchOptions { + /** + * Maximum Levenshtein distance (in lines deleted, added, or subtituted) between the context shown in a patch hunk and the lines found in the file. + * @default 0 + */ + fuzzFactor?: number; + /** + * If `true`, and if the file to be patched consistently uses different line endings to the patch (i.e. either the file always uses Unix line endings while the patch uses Windows ones, or vice versa), then `applyPatch` will behave as if the line endings in the patch were the same as those in the source file. + * (If `false`, the patch will usually fail to apply in such circumstances since lines deleted in the patch won't be considered to match those in the source file.) + * @default true + */ + autoConvertLineEndings?: boolean; + /** + * Callback used to compare to given lines to determine if they should be considered equal when patching. + * Defaults to strict equality but may be overridden to provide fuzzier comparison. + * Should return false if the lines should be rejected. + */ + compareLine?: (lineNumber: number, line: string, operation: string, patchContent: string) => boolean; +} +/** + * attempts to apply a unified diff patch. + * + * Hunks are applied first to last. + * `applyPatch` first tries to apply the first hunk at the line number specified in the hunk header, and with all context lines matching exactly. + * If that fails, it tries scanning backwards and forwards, one line at a time, to find a place to apply the hunk where the context lines match exactly. + * If that still fails, and `fuzzFactor` is greater than zero, it increments the maximum number of mismatches (missing, extra, or changed context lines) that there can be between the hunk context and a region where we are trying to apply the patch such that the hunk will still be considered to match. + * Regardless of `fuzzFactor`, lines to be deleted in the hunk *must* be present for a hunk to match, and the context lines *immediately* before and after an insertion must match exactly. + * + * Once a hunk is successfully fitted, the process begins again with the next hunk. + * Regardless of `fuzzFactor`, later hunks must be applied later in the file than earlier hunks. + * + * If a hunk cannot be successfully fitted *anywhere* with fewer than `fuzzFactor` mismatches, `applyPatch` fails and returns `false`. + * + * If a hunk is successfully fitted but not at the line number specified by the hunk header, all subsequent hunks have their target line number adjusted accordingly. + * (e.g. if the first hunk is applied 10 lines below where the hunk header said it should fit, `applyPatch` will *start* looking for somewhere to apply the second hunk 10 lines below where its hunk header says it goes.) + * + * If the patch was applied successfully, returns a string containing the patched text. + * If the patch could not be applied (because some hunks in the patch couldn't be fitted to the text in `source`), `applyPatch` returns false. + * + * @param patch a string diff or the output from the `parsePatch` or `structuredPatch` methods. + */ +export declare function applyPatch(source: string, patch: string | StructuredPatch | [StructuredPatch], options?: ApplyPatchOptions): string | false; +export interface ApplyPatchesOptions extends ApplyPatchOptions { + loadFile: (index: StructuredPatch, callback: (err: any, data: string) => void) => void; + patched: (index: StructuredPatch, content: string | false, callback: (err: any) => void) => void; + complete: (err?: any) => void; +} +/** + * applies one or more patches. + * + * `patch` may be either an array of structured patch objects, or a string representing a patch in unified diff format (which may patch one or more files). + * + * This method will iterate over the contents of the patch and apply to data provided through callbacks. The general flow for each patch index is: + * + * - `options.loadFile(index, callback)` is called. The caller should then load the contents of the file and then pass that to the `callback(err, data)` callback. Passing an `err` will terminate further patch execution. + * - `options.patched(index, content, callback)` is called once the patch has been applied. `content` will be the return value from `applyPatch`. When it's ready, the caller should call `callback(err)` callback. Passing an `err` will terminate further patch execution. + * + * Once all patches have been applied or an error occurs, the `options.complete(err)` callback is made. + */ +export declare function applyPatches(uniDiff: string | StructuredPatch[], options: ApplyPatchesOptions): void; +//# sourceMappingURL=apply.d.ts.map \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libcjs/patch/apply.d.ts.map b/node_modules/mocha/node_modules/diff/libcjs/patch/apply.d.ts.map new file mode 100644 index 00000000..329d144a --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libcjs/patch/apply.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"apply.d.ts","sourceRoot":"","sources":["../../src/patch/apply.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC;;;;OAIG;IACH,WAAW,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,KAAK,OAAO,CAAC;CACtG;AAOD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,UAAU,CACxB,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,GAAG,eAAe,GAAG,CAAC,eAAe,CAAC,EACnD,OAAO,GAAE,iBAAsB,GAC9B,MAAM,GAAG,KAAK,CAehB;AAyPD,MAAM,WAAW,mBAAoB,SAAQ,iBAAiB;IAC5D,QAAQ,EAAE,CAAC,KAAK,EAAE,eAAe,EAAE,QAAQ,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,KAAK,IAAI,CAAC;IACvF,OAAO,EAAE,CAAC,KAAK,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,GAAG,KAAK,EAAE,QAAQ,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,KAAK,IAAI,CAAC;IACjG,QAAQ,EAAE,CAAC,GAAG,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;CAC/B;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,eAAe,EAAE,EAAE,OAAO,EAAE,mBAAmB,GAAG,IAAI,CA0BpG"} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libcjs/patch/apply.js b/node_modules/mocha/node_modules/diff/libcjs/patch/apply.js new file mode 100644 index 00000000..610a072c --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libcjs/patch/apply.js @@ -0,0 +1,264 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.applyPatch = applyPatch; +exports.applyPatches = applyPatches; +const string_js_1 = require("../util/string.js"); +const line_endings_js_1 = require("./line-endings.js"); +const parse_js_1 = require("./parse.js"); +const distance_iterator_js_1 = __importDefault(require("../util/distance-iterator.js")); +/** + * attempts to apply a unified diff patch. + * + * Hunks are applied first to last. + * `applyPatch` first tries to apply the first hunk at the line number specified in the hunk header, and with all context lines matching exactly. + * If that fails, it tries scanning backwards and forwards, one line at a time, to find a place to apply the hunk where the context lines match exactly. + * If that still fails, and `fuzzFactor` is greater than zero, it increments the maximum number of mismatches (missing, extra, or changed context lines) that there can be between the hunk context and a region where we are trying to apply the patch such that the hunk will still be considered to match. + * Regardless of `fuzzFactor`, lines to be deleted in the hunk *must* be present for a hunk to match, and the context lines *immediately* before and after an insertion must match exactly. + * + * Once a hunk is successfully fitted, the process begins again with the next hunk. + * Regardless of `fuzzFactor`, later hunks must be applied later in the file than earlier hunks. + * + * If a hunk cannot be successfully fitted *anywhere* with fewer than `fuzzFactor` mismatches, `applyPatch` fails and returns `false`. + * + * If a hunk is successfully fitted but not at the line number specified by the hunk header, all subsequent hunks have their target line number adjusted accordingly. + * (e.g. if the first hunk is applied 10 lines below where the hunk header said it should fit, `applyPatch` will *start* looking for somewhere to apply the second hunk 10 lines below where its hunk header says it goes.) + * + * If the patch was applied successfully, returns a string containing the patched text. + * If the patch could not be applied (because some hunks in the patch couldn't be fitted to the text in `source`), `applyPatch` returns false. + * + * @param patch a string diff or the output from the `parsePatch` or `structuredPatch` methods. + */ +function applyPatch(source, patch, options = {}) { + let patches; + if (typeof patch === 'string') { + patches = (0, parse_js_1.parsePatch)(patch); + } + else if (Array.isArray(patch)) { + patches = patch; + } + else { + patches = [patch]; + } + if (patches.length > 1) { + throw new Error('applyPatch only works with a single input.'); + } + return applyStructuredPatch(source, patches[0], options); +} +function applyStructuredPatch(source, patch, options = {}) { + if (options.autoConvertLineEndings || options.autoConvertLineEndings == null) { + if ((0, string_js_1.hasOnlyWinLineEndings)(source) && (0, line_endings_js_1.isUnix)(patch)) { + patch = (0, line_endings_js_1.unixToWin)(patch); + } + else if ((0, string_js_1.hasOnlyUnixLineEndings)(source) && (0, line_endings_js_1.isWin)(patch)) { + patch = (0, line_endings_js_1.winToUnix)(patch); + } + } + // Apply the diff to the input + const lines = source.split('\n'), hunks = patch.hunks, compareLine = options.compareLine || ((lineNumber, line, operation, patchContent) => line === patchContent), fuzzFactor = options.fuzzFactor || 0; + let minLine = 0; + if (fuzzFactor < 0 || !Number.isInteger(fuzzFactor)) { + throw new Error('fuzzFactor must be a non-negative integer'); + } + // Special case for empty patch. + if (!hunks.length) { + return source; + } + // Before anything else, handle EOFNL insertion/removal. If the patch tells us to make a change + // to the EOFNL that is redundant/impossible - i.e. to remove a newline that's not there, or add a + // newline that already exists - then we either return false and fail to apply the patch (if + // fuzzFactor is 0) or simply ignore the problem and do nothing (if fuzzFactor is >0). + // If we do need to remove/add a newline at EOF, this will always be in the final hunk: + let prevLine = '', removeEOFNL = false, addEOFNL = false; + for (let i = 0; i < hunks[hunks.length - 1].lines.length; i++) { + const line = hunks[hunks.length - 1].lines[i]; + if (line[0] == '\\') { + if (prevLine[0] == '+') { + removeEOFNL = true; + } + else if (prevLine[0] == '-') { + addEOFNL = true; + } + } + prevLine = line; + } + if (removeEOFNL) { + if (addEOFNL) { + // This means the final line gets changed but doesn't have a trailing newline in either the + // original or patched version. In that case, we do nothing if fuzzFactor > 0, and if + // fuzzFactor is 0, we simply validate that the source file has no trailing newline. + if (!fuzzFactor && lines[lines.length - 1] == '') { + return false; + } + } + else if (lines[lines.length - 1] == '') { + lines.pop(); + } + else if (!fuzzFactor) { + return false; + } + } + else if (addEOFNL) { + if (lines[lines.length - 1] != '') { + lines.push(''); + } + else if (!fuzzFactor) { + return false; + } + } + /** + * Checks if the hunk can be made to fit at the provided location with at most `maxErrors` + * insertions, substitutions, or deletions, while ensuring also that: + * - lines deleted in the hunk match exactly, and + * - wherever an insertion operation or block of insertion operations appears in the hunk, the + * immediately preceding and following lines of context match exactly + * + * `toPos` should be set such that lines[toPos] is meant to match hunkLines[0]. + * + * If the hunk can be applied, returns an object with properties `oldLineLastI` and + * `replacementLines`. Otherwise, returns null. + */ + function applyHunk(hunkLines, toPos, maxErrors, hunkLinesI = 0, lastContextLineMatched = true, patchedLines = [], patchedLinesLength = 0) { + let nConsecutiveOldContextLines = 0; + let nextContextLineMustMatch = false; + for (; hunkLinesI < hunkLines.length; hunkLinesI++) { + const hunkLine = hunkLines[hunkLinesI], operation = (hunkLine.length > 0 ? hunkLine[0] : ' '), content = (hunkLine.length > 0 ? hunkLine.substr(1) : hunkLine); + if (operation === '-') { + if (compareLine(toPos + 1, lines[toPos], operation, content)) { + toPos++; + nConsecutiveOldContextLines = 0; + } + else { + if (!maxErrors || lines[toPos] == null) { + return null; + } + patchedLines[patchedLinesLength] = lines[toPos]; + return applyHunk(hunkLines, toPos + 1, maxErrors - 1, hunkLinesI, false, patchedLines, patchedLinesLength + 1); + } + } + if (operation === '+') { + if (!lastContextLineMatched) { + return null; + } + patchedLines[patchedLinesLength] = content; + patchedLinesLength++; + nConsecutiveOldContextLines = 0; + nextContextLineMustMatch = true; + } + if (operation === ' ') { + nConsecutiveOldContextLines++; + patchedLines[patchedLinesLength] = lines[toPos]; + if (compareLine(toPos + 1, lines[toPos], operation, content)) { + patchedLinesLength++; + lastContextLineMatched = true; + nextContextLineMustMatch = false; + toPos++; + } + else { + if (nextContextLineMustMatch || !maxErrors) { + return null; + } + // Consider 3 possibilities in sequence: + // 1. lines contains a *substitution* not included in the patch context, or + // 2. lines contains an *insertion* not included in the patch context, or + // 3. lines contains a *deletion* not included in the patch context + // The first two options are of course only possible if the line from lines is non-null - + // i.e. only option 3 is possible if we've overrun the end of the old file. + return (lines[toPos] && (applyHunk(hunkLines, toPos + 1, maxErrors - 1, hunkLinesI + 1, false, patchedLines, patchedLinesLength + 1) || applyHunk(hunkLines, toPos + 1, maxErrors - 1, hunkLinesI, false, patchedLines, patchedLinesLength + 1)) || applyHunk(hunkLines, toPos, maxErrors - 1, hunkLinesI + 1, false, patchedLines, patchedLinesLength)); + } + } + } + // Before returning, trim any unmodified context lines off the end of patchedLines and reduce + // toPos (and thus oldLineLastI) accordingly. This allows later hunks to be applied to a region + // that starts in this hunk's trailing context. + patchedLinesLength -= nConsecutiveOldContextLines; + toPos -= nConsecutiveOldContextLines; + patchedLines.length = patchedLinesLength; + return { + patchedLines, + oldLineLastI: toPos - 1 + }; + } + const resultLines = []; + // Search best fit offsets for each hunk based on the previous ones + let prevHunkOffset = 0; + for (let i = 0; i < hunks.length; i++) { + const hunk = hunks[i]; + let hunkResult; + const maxLine = lines.length - hunk.oldLines + fuzzFactor; + let toPos; + for (let maxErrors = 0; maxErrors <= fuzzFactor; maxErrors++) { + toPos = hunk.oldStart + prevHunkOffset - 1; + const iterator = (0, distance_iterator_js_1.default)(toPos, minLine, maxLine); + for (; toPos !== undefined; toPos = iterator()) { + hunkResult = applyHunk(hunk.lines, toPos, maxErrors); + if (hunkResult) { + break; + } + } + if (hunkResult) { + break; + } + } + if (!hunkResult) { + return false; + } + // Copy everything from the end of where we applied the last hunk to the start of this hunk + for (let i = minLine; i < toPos; i++) { + resultLines.push(lines[i]); + } + // Add the lines produced by applying the hunk: + for (let i = 0; i < hunkResult.patchedLines.length; i++) { + const line = hunkResult.patchedLines[i]; + resultLines.push(line); + } + // Set lower text limit to end of the current hunk, so next ones don't try + // to fit over already patched text + minLine = hunkResult.oldLineLastI + 1; + // Note the offset between where the patch said the hunk should've applied and where we + // applied it, so we can adjust future hunks accordingly: + prevHunkOffset = toPos + 1 - hunk.oldStart; + } + // Copy over the rest of the lines from the old text + for (let i = minLine; i < lines.length; i++) { + resultLines.push(lines[i]); + } + return resultLines.join('\n'); +} +/** + * applies one or more patches. + * + * `patch` may be either an array of structured patch objects, or a string representing a patch in unified diff format (which may patch one or more files). + * + * This method will iterate over the contents of the patch and apply to data provided through callbacks. The general flow for each patch index is: + * + * - `options.loadFile(index, callback)` is called. The caller should then load the contents of the file and then pass that to the `callback(err, data)` callback. Passing an `err` will terminate further patch execution. + * - `options.patched(index, content, callback)` is called once the patch has been applied. `content` will be the return value from `applyPatch`. When it's ready, the caller should call `callback(err)` callback. Passing an `err` will terminate further patch execution. + * + * Once all patches have been applied or an error occurs, the `options.complete(err)` callback is made. + */ +function applyPatches(uniDiff, options) { + const spDiff = typeof uniDiff === 'string' ? (0, parse_js_1.parsePatch)(uniDiff) : uniDiff; + let currentIndex = 0; + function processIndex() { + const index = spDiff[currentIndex++]; + if (!index) { + return options.complete(); + } + options.loadFile(index, function (err, data) { + if (err) { + return options.complete(err); + } + const updatedContent = applyPatch(data, index, options); + options.patched(index, updatedContent, function (err) { + if (err) { + return options.complete(err); + } + processIndex(); + }); + }); + } + processIndex(); +} diff --git a/node_modules/mocha/node_modules/diff/libcjs/patch/create.d.ts b/node_modules/mocha/node_modules/diff/libcjs/patch/create.d.ts new file mode 100644 index 00000000..ed401385 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libcjs/patch/create.d.ts @@ -0,0 +1,131 @@ +import type { StructuredPatch, DiffLinesOptionsAbortable, DiffLinesOptionsNonabortable, AbortableDiffOptions } from '../types.js'; +type StructuredPatchCallbackAbortable = (patch: StructuredPatch | undefined) => void; +type StructuredPatchCallbackNonabortable = (patch: StructuredPatch) => void; +export interface HeaderOptions { + includeIndex: boolean; + includeUnderline: boolean; + includeFileHeaders: boolean; +} +export declare const INCLUDE_HEADERS: { + includeIndex: boolean; + includeUnderline: boolean; + includeFileHeaders: boolean; +}; +export declare const FILE_HEADERS_ONLY: { + includeIndex: boolean; + includeUnderline: boolean; + includeFileHeaders: boolean; +}; +export declare const OMIT_HEADERS: { + includeIndex: boolean; + includeUnderline: boolean; + includeFileHeaders: boolean; +}; +interface _StructuredPatchOptionsAbortable extends Pick { + /** + * describes how many lines of context should be included. + * You can set this to `Number.MAX_SAFE_INTEGER` or `Infinity` to include the entire file content in one hunk. + * @default 4 + */ + context?: number; + callback?: StructuredPatchCallbackAbortable; +} +export type StructuredPatchOptionsAbortable = _StructuredPatchOptionsAbortable & AbortableDiffOptions; +export interface StructuredPatchOptionsNonabortable extends Pick { + context?: number; + callback?: StructuredPatchCallbackNonabortable; +} +interface StructuredPatchCallbackOptionAbortable { + /** + * If provided, the diff will be computed in async mode to avoid blocking the event loop while the diff is calculated. + * The value of the `callback` option should be a function and will be passed the computed diff or patch as its first argument. + */ + callback: StructuredPatchCallbackAbortable; +} +interface StructuredPatchCallbackOptionNonabortable { + /** + * If provided, the diff will be computed in async mode to avoid blocking the event loop while the diff is calculated. + * The value of the `callback` option should be a function and will be passed the computed diff or patch as its first argument. + */ + callback: StructuredPatchCallbackNonabortable; +} +/** + * returns an object with an array of hunk objects. + * + * This method is similar to createTwoFilesPatch, but returns a data structure suitable for further processing. + * @param oldFileName String to be output in the filename section of the patch for the removals + * @param newFileName String to be output in the filename section of the patch for the additions + * @param oldStr Original string value + * @param newStr New string value + * @param oldHeader Optional additional information to include in the old file header. + * @param newHeader Optional additional information to include in the new file header. + */ +export declare function structuredPatch(oldFileName: string, newFileName: string, oldStr: string, newStr: string, oldHeader: string | undefined, newHeader: string | undefined, options: StructuredPatchCallbackNonabortable): undefined; +export declare function structuredPatch(oldFileName: string, newFileName: string, oldStr: string, newStr: string, oldHeader: string | undefined, newHeader: string | undefined, options: StructuredPatchOptionsAbortable & StructuredPatchCallbackOptionAbortable): undefined; +export declare function structuredPatch(oldFileName: string, newFileName: string, oldStr: string, newStr: string, oldHeader: string | undefined, newHeader: string | undefined, options: StructuredPatchOptionsNonabortable & StructuredPatchCallbackOptionNonabortable): undefined; +export declare function structuredPatch(oldFileName: string, newFileName: string, oldStr: string, newStr: string, oldHeader: string | undefined, newHeader: string | undefined, options: StructuredPatchOptionsAbortable): StructuredPatch | undefined; +export declare function structuredPatch(oldFileName: string, newFileName: string, oldStr: string, newStr: string, oldHeader?: string, newHeader?: string, options?: StructuredPatchOptionsNonabortable): StructuredPatch; +/** + * creates a unified diff patch. + * + * @param patch either a single structured patch object (as returned by `structuredPatch`) or an + * array of them (as returned by `parsePatch`). + * @param headerOptions behaves the same as the `headerOptions` option of `createTwoFilesPatch`. + * Ignored for patches where `isGit` is `true`. + * + * When a patch has `isGit: true`, `formatPatch` output is changed to more closely match Git's + * output: it emits a `diff --git` header, emits Git extended headers as appropriate based on + * properties like `isRename`, `isCreate`, `newMode`, etc, and will omit `---`/`+++` file + * headers for patches with no hunks (e.g. renames without content changes). + */ +export declare function formatPatch(patch: StructuredPatch | StructuredPatch[], headerOptions?: HeaderOptions): string; +type CreatePatchCallbackAbortable = (patch: string | undefined) => void; +type CreatePatchCallbackNonabortable = (patch: string) => void; +interface _CreatePatchOptionsAbortable extends Pick { + context?: number; + callback?: CreatePatchCallbackAbortable; + headerOptions?: HeaderOptions; +} +export type CreatePatchOptionsAbortable = _CreatePatchOptionsAbortable & AbortableDiffOptions; +export interface CreatePatchOptionsNonabortable extends Pick { + context?: number; + callback?: CreatePatchCallbackNonabortable; + headerOptions?: HeaderOptions; +} +interface CreatePatchCallbackOptionAbortable { + callback: CreatePatchCallbackAbortable; +} +interface CreatePatchCallbackOptionNonabortable { + callback: CreatePatchCallbackNonabortable; +} +/** + * creates a unified diff patch by first computing a diff with `diffLines` and then serializing it to unified diff format. + * @param oldFileName String to be output in the filename section of the patch for the removals + * @param newFileName String to be output in the filename section of the patch for the additions + * @param oldStr Original string value + * @param newStr New string value + * @param oldHeader Optional additional information to include in the old file header. + * @param newHeader Optional additional information to include in the new file header. + */ +export declare function createTwoFilesPatch(oldFileName: string, newFileName: string, oldStr: string, newStr: string, oldHeader: string | undefined, newHeader: string | undefined, options: CreatePatchCallbackNonabortable): undefined; +export declare function createTwoFilesPatch(oldFileName: string, newFileName: string, oldStr: string, newStr: string, oldHeader: string | undefined, newHeader: string | undefined, options: CreatePatchOptionsAbortable & CreatePatchCallbackOptionAbortable): undefined; +export declare function createTwoFilesPatch(oldFileName: string, newFileName: string, oldStr: string, newStr: string, oldHeader: string | undefined, newHeader: string | undefined, options: CreatePatchOptionsNonabortable & CreatePatchCallbackOptionNonabortable): undefined; +export declare function createTwoFilesPatch(oldFileName: string, newFileName: string, oldStr: string, newStr: string, oldHeader: string | undefined, newHeader: string | undefined, options: CreatePatchOptionsAbortable): string | undefined; +export declare function createTwoFilesPatch(oldFileName: string, newFileName: string, oldStr: string, newStr: string, oldHeader?: string, newHeader?: string, options?: CreatePatchOptionsNonabortable): string; +/** + * creates a unified diff patch. + * + * Just like createTwoFilesPatch, but with oldFileName being equal to newFileName. + * @param fileName String to be output in the filename section of the patch + * @param oldStr Original string value + * @param newStr New string value + * @param oldHeader Optional additional information to include in the old file header. + * @param newHeader Optional additional information to include in the new file header. + */ +export declare function createPatch(fileName: string, oldStr: string, newStr: string, oldHeader: string | undefined, newHeader: string | undefined, options: CreatePatchCallbackNonabortable): undefined; +export declare function createPatch(fileName: string, oldStr: string, newStr: string, oldHeader: string | undefined, newHeader: string | undefined, options: CreatePatchOptionsAbortable & CreatePatchCallbackOptionAbortable): undefined; +export declare function createPatch(fileName: string, oldStr: string, newStr: string, oldHeader: string | undefined, newHeader: string | undefined, options: CreatePatchOptionsNonabortable & CreatePatchCallbackOptionNonabortable): undefined; +export declare function createPatch(fileName: string, oldStr: string, newStr: string, oldHeader: string | undefined, newHeader: string | undefined, options: CreatePatchOptionsAbortable): string | undefined; +export declare function createPatch(fileName: string, oldStr: string, newStr: string, oldHeader?: string, newHeader?: string, options?: CreatePatchOptionsNonabortable): string; +export {}; +//# sourceMappingURL=create.d.ts.map \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libcjs/patch/create.d.ts.map b/node_modules/mocha/node_modules/diff/libcjs/patch/create.d.ts.map new file mode 100644 index 00000000..b29ce64a --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libcjs/patch/create.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../src/patch/create.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,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AAM,EACd,SAAS,EAAE,MAAM,GAAG,SAAS,EAC7B,SAAS,EAAE,MAAM,GAAG,SAAS,EAC7B,OAAO,EAAE,8BAA8B,GAAG,qCAAqC,GAC9E,SAAS,CAAA;AACZ,wBAAgB,WAAW,CACzB,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,GAAG,SAAS,EAC7B,SAAS,EAAE,MAAM,GAAG,SAAS,EAC7B,OAAO,EAAE,2BAA2B,GACnC,MAAM,GAAG,SAAS,CAAA;AACrB,wBAAgB,WAAW,CACzB,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,SAAS,CAAC,EAAE,MAAM,EAClB,SAAS,CAAC,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE,8BAA8B,GACvC,MAAM,CAAA"} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libcjs/patch/create.js b/node_modules/mocha/node_modules/diff/libcjs/patch/create.js new file mode 100644 index 00000000..84a160ed --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libcjs/patch/create.js @@ -0,0 +1,364 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.OMIT_HEADERS = exports.FILE_HEADERS_ONLY = exports.INCLUDE_HEADERS = void 0; +exports.structuredPatch = structuredPatch; +exports.formatPatch = formatPatch; +exports.createTwoFilesPatch = createTwoFilesPatch; +exports.createPatch = createPatch; +const line_js_1 = require("../diff/line.js"); +/** + * Returns true if the filename contains characters that require C-style + * quoting (as used by Git and GNU diffutils in diff output). + */ +function needsQuoting(s) { + for (let i = 0; i < s.length; i++) { + if (s[i] < '\x20' || s[i] > '\x7e' || s[i] === '"' || s[i] === '\\') { + return true; + } + } + return false; +} +/** + * C-style quotes a filename, encoding special characters as escape sequences + * and non-ASCII bytes as octal escapes. This is the inverse of + * `parseQuotedFileName` in parse.ts. + * + * Non-ASCII bytes are encoded as UTF-8 before being emitted as octal escapes. + * This matches the behaviour of both Git and GNU diffutils, which always emit + * UTF-8 octal escapes regardless of the underlying filesystem encoding (e.g. + * Git for Windows converts from NTFS's UTF-16 to UTF-8 internally). + * + * If the filename doesn't need quoting, returns it as-is. + */ +function quoteFileNameIfNeeded(s) { + if (!needsQuoting(s)) { + return s; + } + let result = '"'; + const bytes = new TextEncoder().encode(s); + let i = 0; + while (i < bytes.length) { + const b = bytes[i]; + // See https://en.wikipedia.org/wiki/Escape_sequences_in_C#Escape_sequences + if (b === 0x07) { + result += '\\a'; + } + else if (b === 0x08) { + result += '\\b'; + } + else if (b === 0x09) { + result += '\\t'; + } + else if (b === 0x0a) { + result += '\\n'; + } + else if (b === 0x0b) { + result += '\\v'; + } + else if (b === 0x0c) { + result += '\\f'; + } + else if (b === 0x0d) { + result += '\\r'; + } + else if (b === 0x22) { + result += '\\"'; + } + else if (b === 0x5c) { + result += '\\\\'; + } + else if (b >= 0x20 && b <= 0x7e) { + // Just a printable ASCII character that is neither a double quote nor a + // backslash; no need to escape it. + result += String.fromCharCode(b); + } + else { + // Either part of a non-ASCII character or a control character without a + // special escape sequence; needs escaping as a 3-digit octal escape + result += '\\' + b.toString(8).padStart(3, '0'); + } + i++; + } + result += '"'; + return result; +} +exports.INCLUDE_HEADERS = { + includeIndex: true, + includeUnderline: true, + includeFileHeaders: true +}; +exports.FILE_HEADERS_ONLY = { + includeIndex: false, + includeUnderline: false, + includeFileHeaders: true +}; +exports.OMIT_HEADERS = { + includeIndex: false, + includeUnderline: false, + includeFileHeaders: false +}; +function structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) { + let optionsObj; + if (!options) { + optionsObj = {}; + } + else if (typeof options === 'function') { + optionsObj = { callback: options }; + } + else { + optionsObj = options; + } + if (typeof optionsObj.context === 'undefined') { + optionsObj.context = 4; + } + // We copy this into its own variable to placate TypeScript, which thinks + // optionsObj.context might be undefined in the callbacks below. + const context = optionsObj.context; + // @ts-expect-error (runtime check for something that is correctly a static type error) + if (optionsObj.newlineIsToken) { + throw new Error('newlineIsToken may not be used with patch-generation functions, only with diffing functions'); + } + if (!optionsObj.callback) { + return diffLinesResultToPatch((0, line_js_1.diffLines)(oldStr, newStr, optionsObj)); + } + else { + const { callback } = optionsObj; + (0, line_js_1.diffLines)(oldStr, newStr, Object.assign(Object.assign({}, optionsObj), { callback: (diff) => { + const patch = diffLinesResultToPatch(diff); + // TypeScript is unhappy without the cast because it does not understand that `patch` may + // be undefined here only if `callback` is StructuredPatchCallbackAbortable: + callback(patch); + } })); + } + function diffLinesResultToPatch(diff) { + // STEP 1: Build up the patch with no "\ No newline at end of file" lines and with the arrays + // of lines containing trailing newline characters. We'll tidy up later... + if (!diff) { + return; + } + diff.push({ value: '', lines: [] }); // Append an empty value to make cleanup easier + function contextLines(lines) { + return lines.map(function (entry) { return ' ' + entry; }); + } + const hunks = []; + let oldRangeStart = 0, newRangeStart = 0, curRange = [], oldLine = 1, newLine = 1; + for (let i = 0; i < diff.length; i++) { + const current = diff[i], lines = current.lines || splitLines(current.value); + current.lines = lines; + if (current.added || current.removed) { + // If we have previous context, start with that + if (!oldRangeStart) { + const prev = diff[i - 1]; + oldRangeStart = oldLine; + newRangeStart = newLine; + if (prev) { + curRange = context > 0 ? contextLines(prev.lines.slice(-context)) : []; + oldRangeStart -= curRange.length; + newRangeStart -= curRange.length; + } + } + // Output our changes + for (const line of lines) { + curRange.push((current.added ? '+' : '-') + line); + } + // Track the updated file position + if (current.added) { + newLine += lines.length; + } + else { + oldLine += lines.length; + } + } + else { + // Identical context lines. Track line changes + if (oldRangeStart) { + // Close out any changes that have been output (or join overlapping) + if (lines.length <= context * 2 && i < diff.length - 2) { + // Overlapping + for (const line of contextLines(lines)) { + curRange.push(line); + } + } + else { + // end the range and output + const contextSize = Math.min(lines.length, context); + for (const line of contextLines(lines.slice(0, contextSize))) { + curRange.push(line); + } + const hunk = { + oldStart: oldRangeStart, + oldLines: (oldLine - oldRangeStart + contextSize), + newStart: newRangeStart, + newLines: (newLine - newRangeStart + contextSize), + lines: curRange + }; + hunks.push(hunk); + oldRangeStart = 0; + newRangeStart = 0; + curRange = []; + } + } + oldLine += lines.length; + newLine += lines.length; + } + } + // Step 2: eliminate the trailing `\n` from each line of each hunk, and, where needed, add + // "\ No newline at end of file". + for (const hunk of hunks) { + for (let i = 0; i < hunk.lines.length; i++) { + if (hunk.lines[i].endsWith('\n')) { + hunk.lines[i] = hunk.lines[i].slice(0, -1); + } + else { + hunk.lines.splice(i + 1, 0, '\\ No newline at end of file'); + i++; // Skip the line we just added, then continue iterating + } + } + } + return { + oldFileName: oldFileName, newFileName: newFileName, + oldHeader: oldHeader, newHeader: newHeader, + hunks: hunks + }; + } +} +/** + * creates a unified diff patch. + * + * @param patch either a single structured patch object (as returned by `structuredPatch`) or an + * array of them (as returned by `parsePatch`). + * @param headerOptions behaves the same as the `headerOptions` option of `createTwoFilesPatch`. + * Ignored for patches where `isGit` is `true`. + * + * When a patch has `isGit: true`, `formatPatch` output is changed to more closely match Git's + * output: it emits a `diff --git` header, emits Git extended headers as appropriate based on + * properties like `isRename`, `isCreate`, `newMode`, etc, and will omit `---`/`+++` file + * headers for patches with no hunks (e.g. renames without content changes). + */ +function formatPatch(patch, headerOptions) { + var _a, _b, _c, _d, _e, _f; + if (!headerOptions) { + headerOptions = exports.INCLUDE_HEADERS; + } + if (Array.isArray(patch)) { + if (patch.length > 1 && !headerOptions.includeFileHeaders && !patch.every(p => p.isGit)) { + throw new Error('Cannot omit file headers on a multi-file patch. ' + + '(The result would be unparseable; how would a tool trying to apply ' + + 'the patch know which changes are to which file?)'); + } + return patch.map(p => formatPatch(p, headerOptions)).join('\n'); + } + const ret = []; + // Git patches have a fixed header format (diff --git, extended headers, + // and ---/+++ when hunks are present), so headerOptions is ignored. + if (patch.isGit) { + headerOptions = exports.INCLUDE_HEADERS; + // Emit Git-style diff --git header and extended headers. + // Git never puts /dev/null in the "diff --git" line; for file + // creations/deletions it uses the real filename on both sides. + if (!patch.oldFileName) { + throw new Error('oldFileName must be specified for Git patches'); + } + if (!patch.newFileName) { + throw new Error('newFileName must be specified for Git patches'); + } + let gitOldName = patch.oldFileName; + let gitNewName = patch.newFileName; + if (patch.isCreate && gitOldName === '/dev/null') { + gitOldName = gitNewName.replace(/^b\//, 'a/'); + } + else if (patch.isDelete && gitNewName === '/dev/null') { + gitNewName = gitOldName.replace(/^a\//, 'b/'); + } + ret.push('diff --git ' + quoteFileNameIfNeeded(gitOldName) + ' ' + quoteFileNameIfNeeded(gitNewName)); + if (patch.isDelete) { + ret.push('deleted file mode ' + ((_a = patch.oldMode) !== null && _a !== void 0 ? _a : '100644')); + } + if (patch.isCreate) { + ret.push('new file mode ' + ((_b = patch.newMode) !== null && _b !== void 0 ? _b : '100644')); + } + if (patch.oldMode && patch.newMode && !patch.isDelete && !patch.isCreate) { + ret.push('old mode ' + patch.oldMode); + ret.push('new mode ' + patch.newMode); + } + if (patch.isRename) { + ret.push('rename from ' + quoteFileNameIfNeeded(((_c = patch.oldFileName) !== null && _c !== void 0 ? _c : '').replace(/^a\//, ''))); + ret.push('rename to ' + quoteFileNameIfNeeded(((_d = patch.newFileName) !== null && _d !== void 0 ? _d : '').replace(/^b\//, ''))); + } + if (patch.isCopy) { + ret.push('copy from ' + quoteFileNameIfNeeded(((_e = patch.oldFileName) !== null && _e !== void 0 ? _e : '').replace(/^a\//, ''))); + ret.push('copy to ' + quoteFileNameIfNeeded(((_f = patch.newFileName) !== null && _f !== void 0 ? _f : '').replace(/^b\//, ''))); + } + } + else { + if (headerOptions.includeIndex && patch.oldFileName == patch.newFileName && patch.oldFileName !== undefined) { + ret.push('Index: ' + patch.oldFileName); + } + if (headerOptions.includeUnderline) { + ret.push('==================================================================='); + } + } + // Emit --- / +++ file headers. For Git patches with no hunks (e.g. + // pure renames, mode-only changes), Git omits these, so we do too. + const hasHunks = patch.hunks.length > 0; + if (headerOptions.includeFileHeaders && patch.oldFileName !== undefined && patch.newFileName !== undefined + && (!patch.isGit || hasHunks)) { + ret.push('--- ' + quoteFileNameIfNeeded(patch.oldFileName) + (patch.oldHeader ? '\t' + patch.oldHeader : '')); + ret.push('+++ ' + quoteFileNameIfNeeded(patch.newFileName) + (patch.newHeader ? '\t' + patch.newHeader : '')); + } + for (let i = 0; i < patch.hunks.length; i++) { + const hunk = patch.hunks[i]; + // Unified Diff Format quirk: If the chunk size is 0, + // the first number is one lower than one would expect. + // https://www.artima.com/weblogs/viewpost.jsp?thread=164293 + const oldStart = hunk.oldLines === 0 ? hunk.oldStart - 1 : hunk.oldStart; + const newStart = hunk.newLines === 0 ? hunk.newStart - 1 : hunk.newStart; + ret.push('@@ -' + oldStart + ',' + hunk.oldLines + + ' +' + newStart + ',' + hunk.newLines + + ' @@'); + for (const line of hunk.lines) { + ret.push(line); + } + } + return ret.join('\n') + '\n'; +} +function createTwoFilesPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) { + if (typeof options === 'function') { + options = { callback: options }; + } + if (!(options === null || options === void 0 ? void 0 : options.callback)) { + const patchObj = structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options); + if (!patchObj) { + return; + } + return formatPatch(patchObj, options === null || options === void 0 ? void 0 : options.headerOptions); + } + else { + const { callback } = options; + structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, Object.assign(Object.assign({}, options), { callback: patchObj => { + if (!patchObj) { + callback(undefined); + } + else { + callback(formatPatch(patchObj, options.headerOptions)); + } + } })); + } +} +function createPatch(fileName, oldStr, newStr, oldHeader, newHeader, options) { + return createTwoFilesPatch(fileName, fileName, oldStr, newStr, oldHeader, newHeader, options); +} +/** + * Split `text` into an array of lines, including the trailing newline character (where present) + */ +function splitLines(text) { + const hasTrailingNl = text.endsWith('\n'); + const result = text.split('\n').map(line => line + '\n'); + if (hasTrailingNl) { + result.pop(); + } + else { + result.push(result.pop().slice(0, -1)); + } + return result; +} diff --git a/node_modules/mocha/node_modules/diff/libcjs/patch/line-endings.d.ts b/node_modules/mocha/node_modules/diff/libcjs/patch/line-endings.d.ts new file mode 100644 index 00000000..4db82119 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libcjs/patch/line-endings.d.ts @@ -0,0 +1,17 @@ +import type { StructuredPatch } from '../types.js'; +export declare function unixToWin(patch: StructuredPatch): StructuredPatch; +export declare function unixToWin(patches: StructuredPatch[]): StructuredPatch[]; +export declare function unixToWin(patch: StructuredPatch | StructuredPatch[]): StructuredPatch | StructuredPatch[]; +export declare function winToUnix(patch: StructuredPatch): StructuredPatch; +export declare function winToUnix(patches: StructuredPatch[]): StructuredPatch[]; +export declare function winToUnix(patch: StructuredPatch | StructuredPatch[]): StructuredPatch | StructuredPatch[]; +/** + * Returns true if the patch consistently uses Unix line endings (or only involves one line and has + * no line endings). + */ +export declare function isUnix(patch: StructuredPatch | StructuredPatch[]): boolean; +/** + * Returns true if the patch uses Windows line endings and only Windows line endings. + */ +export declare function isWin(patch: StructuredPatch | StructuredPatch[]): boolean; +//# sourceMappingURL=line-endings.d.ts.map \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libcjs/patch/line-endings.d.ts.map b/node_modules/mocha/node_modules/diff/libcjs/patch/line-endings.d.ts.map new file mode 100644 index 00000000..cfcd36fc --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libcjs/patch/line-endings.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"line-endings.d.ts","sourceRoot":"","sources":["../../src/patch/line-endings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,wBAAgB,SAAS,CAAC,KAAK,EAAE,eAAe,GAAG,eAAe,CAAC;AACnE,wBAAgB,SAAS,CAAC,OAAO,EAAE,eAAe,EAAE,GAAG,eAAe,EAAE,CAAC;AACzE,wBAAgB,SAAS,CAAC,KAAK,EAAE,eAAe,GAAG,eAAe,EAAE,GAAG,eAAe,GAAG,eAAe,EAAE,CAAC;AA0B3G,wBAAgB,SAAS,CAAC,KAAK,EAAE,eAAe,GAAG,eAAe,CAAC;AACnE,wBAAgB,SAAS,CAAC,OAAO,EAAE,eAAe,EAAE,GAAG,eAAe,EAAE,CAAC;AACzE,wBAAgB,SAAS,CAAC,KAAK,EAAE,eAAe,GAAG,eAAe,EAAE,GAAG,eAAe,GAAG,eAAe,EAAE,CAAC;AAgB3G;;;GAGG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,eAAe,GAAG,eAAe,EAAE,GAAG,OAAO,CAS1E;AAED;;GAEG;AACH,wBAAgB,KAAK,CAAC,KAAK,EAAE,eAAe,GAAG,eAAe,EAAE,GAAG,OAAO,CAUzE"} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libcjs/patch/line-endings.js b/node_modules/mocha/node_modules/diff/libcjs/patch/line-endings.js new file mode 100644 index 00000000..30e0a772 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libcjs/patch/line-endings.js @@ -0,0 +1,50 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.unixToWin = unixToWin; +exports.winToUnix = winToUnix; +exports.isUnix = isUnix; +exports.isWin = isWin; +function unixToWin(patch) { + if (Array.isArray(patch)) { + // It would be cleaner if instead of the line below we could just write + // return patch.map(unixToWin) + // but mysteriously TypeScript (v5.7.3 at the time of writing) does not like this and it will + // refuse to compile, thinking that unixToWin could then return StructuredPatch[][] and the + // result would be incompatible with the overload signatures. + // See bug report at https://github.com/microsoft/TypeScript/issues/61398. + return patch.map(p => unixToWin(p)); + } + return Object.assign(Object.assign({}, patch), { hunks: patch.hunks.map(hunk => (Object.assign(Object.assign({}, hunk), { lines: hunk.lines.map((line, i) => { + var _a; + return (line.startsWith('\\') || line.endsWith('\r') || ((_a = hunk.lines[i + 1]) === null || _a === void 0 ? void 0 : _a.startsWith('\\'))) + ? line + : line + '\r'; + }) }))) }); +} +function winToUnix(patch) { + if (Array.isArray(patch)) { + // (See comment above equivalent line in unixToWin) + return patch.map(p => winToUnix(p)); + } + return Object.assign(Object.assign({}, patch), { hunks: patch.hunks.map(hunk => (Object.assign(Object.assign({}, hunk), { lines: hunk.lines.map(line => line.endsWith('\r') ? line.substring(0, line.length - 1) : line) }))) }); +} +/** + * Returns true if the patch consistently uses Unix line endings (or only involves one line and has + * no line endings). + */ +function isUnix(patch) { + if (!Array.isArray(patch)) { + patch = [patch]; + } + return !patch.some(index => index.hunks.some(hunk => hunk.lines.some(line => !line.startsWith('\\') && line.endsWith('\r')))); +} +/** + * Returns true if the patch uses Windows line endings and only Windows line endings. + */ +function isWin(patch) { + if (!Array.isArray(patch)) { + patch = [patch]; + } + return patch.some(index => index.hunks.some(hunk => hunk.lines.some(line => line.endsWith('\r')))) + && patch.every(index => index.hunks.every(hunk => hunk.lines.every((line, i) => { var _a; return line.startsWith('\\') || line.endsWith('\r') || ((_a = hunk.lines[i + 1]) === null || _a === void 0 ? void 0 : _a.startsWith('\\')); }))); +} diff --git a/node_modules/mocha/node_modules/diff/libcjs/patch/parse.d.ts b/node_modules/mocha/node_modules/diff/libcjs/patch/parse.d.ts new file mode 100644 index 00000000..a29d4155 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libcjs/patch/parse.d.ts @@ -0,0 +1,16 @@ +import type { StructuredPatch } from '../types.js'; +/** + * Parses a unified diff format patch into a structured patch object. + * + * `parsePatch` has some understanding of Git's particular dialect of unified diff format. + * When parsing a Git patch, each index in the result may contain additional + * fields (`isRename`, `isBinary`, etc) not included in the data structure returned by + * `structuredPatch`; see the `StructuredPatch` interface for a full list. + * + * @return a JSON object representation of the patch, suitable for use with the `applyPatch` + * method. This parses to the same structure returned by `structuredPatch`, except that + * `oldFileName` and `newFileName` may be `undefined` if the patch doesn't contain enough + * information to determine them (e.g. a hunk-only patch with no file headers). + */ +export declare function parsePatch(uniDiff: string): StructuredPatch[]; +//# sourceMappingURL=parse.d.ts.map \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libcjs/patch/parse.d.ts.map b/node_modules/mocha/node_modules/diff/libcjs/patch/parse.d.ts.map new file mode 100644 index 00000000..7f2630b2 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libcjs/patch/parse.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["../../src/patch/parse.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD;;;;;;;;;;;;GAYG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,eAAe,EAAE,CA6f7D"} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libcjs/patch/parse.js b/node_modules/mocha/node_modules/diff/libcjs/patch/parse.js new file mode 100644 index 00000000..f5900303 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libcjs/patch/parse.js @@ -0,0 +1,515 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.parsePatch = parsePatch; +/** + * Parses a unified diff format patch into a structured patch object. + * + * `parsePatch` has some understanding of Git's particular dialect of unified diff format. + * When parsing a Git patch, each index in the result may contain additional + * fields (`isRename`, `isBinary`, etc) not included in the data structure returned by + * `structuredPatch`; see the `StructuredPatch` interface for a full list. + * + * @return a JSON object representation of the patch, suitable for use with the `applyPatch` + * method. This parses to the same structure returned by `structuredPatch`, except that + * `oldFileName` and `newFileName` may be `undefined` if the patch doesn't contain enough + * information to determine them (e.g. a hunk-only patch with no file headers). + */ +function parsePatch(uniDiff) { + const diffstr = uniDiff.split(/\n/), list = []; + let i = 0; + // These helper functions identify line types that can appear between files + // in a multi-file patch. Keeping them in one place avoids subtle + // inconsistencies from having the same regexes duplicated in multiple places. + // Matches `diff --git ...` lines specifically. + function isGitDiffHeader(line) { + return (/^diff --git /).test(line); + } + // Matches lines that denote the start of a new diff's section in a + // multi-file patch: `diff --git ...`, `Index: ...`, or `diff -r ...`. + function isDiffHeader(line) { + return isGitDiffHeader(line) + || (/^Index:\s/).test(line) + || (/^diff(?: -r \w+)+\s/).test(line); + } + // Matches `--- ...` and `+++ ...` file header lines. + function isFileHeader(line) { + return (/^(---|\+\+\+)\s/).test(line); + } + // Matches `@@ ...` hunk header lines. + function isHunkHeader(line) { + return (/^@@\s/).test(line); + } + function parseIndex() { + var _a; + const index = {}; + index.hunks = []; + list.push(index); + // Parse diff metadata + let seenDiffHeader = false; + while (i < diffstr.length) { + const line = diffstr[i]; + // File header (---, +++) or hunk header (@@) found; end parsing diff metadata + if (isFileHeader(line) || isHunkHeader(line)) { + break; + } + // The next two branches handle recognized diff headers. Note that + // isDiffHeader deliberately does NOT match arbitrary `diff` + // commands like `diff -u -p -r1.1 -r1.2`, because in some + // formats (e.g. CVS diffs) such lines appear as metadata within + // a single file's header section, after an `Index:` line. See the + // diffx documentation (https://diffx.org) for examples. + // + // In both branches: if we've already seen a diff header for *this* + // file and now we encounter another one, it must belong to the + // next file, so break. + if (isGitDiffHeader(line)) { + if (seenDiffHeader) { + return; + } + seenDiffHeader = true; + index.isGit = true; + // Parse the old and new filenames from the `diff --git` header and + // tentatively set oldFileName and newFileName from them. These may + // be overridden below by `rename from` / `rename to` or `copy from` / + // `copy to` extended headers, or by --- and +++ lines. But for Git + // diffs that lack all of those (e.g. mode-only changes, binary + // file changes without rename), these are the only filenames we + // get. + // parseGitDiffHeader returns null if the header can't be parsed + // (e.g. unterminated quoted filename, or unexpected format). In + // that case we skip setting filenames here; they may still be + // set from --- / +++ or rename from / rename to lines below. + const paths = parseGitDiffHeader(line); + if (paths) { + index.oldFileName = paths.oldFileName; + index.newFileName = paths.newFileName; + } + // Consume Git extended headers (`old mode`, `new mode`, `rename from`, + // `rename to`, `similarity index`, `index`, `Binary files ... differ`, + // etc.) + i++; + while (i < diffstr.length) { + const extLine = diffstr[i]; + // Stop consuming extended headers if we hit a file header, + // hunk header, or another diff header. + if (isFileHeader(extLine) || isHunkHeader(extLine) || isDiffHeader(extLine)) { + break; + } + // Parse `rename from` / `rename to` lines - these give us + // unambiguous filenames. These lines don't include the + // a/ and b/ prefixes that appear in the `diff --git` header + // and --- / +++ lines, so we add them for consistency. + // Git C-style quotes filenames containing special characters + // (tabs, newlines, backslashes, double quotes), so we must + // unquote them when present. + const renameFromMatch = (/^rename from (.*)/).exec(extLine); + if (renameFromMatch) { + index.oldFileName = 'a/' + unquoteIfQuoted(renameFromMatch[1]); + index.isRename = true; + } + const renameToMatch = (/^rename to (.*)/).exec(extLine); + if (renameToMatch) { + index.newFileName = 'b/' + unquoteIfQuoted(renameToMatch[1]); + index.isRename = true; + } + // Parse copy from / copy to lines similarly + const copyFromMatch = (/^copy from (.*)/).exec(extLine); + if (copyFromMatch) { + index.oldFileName = 'a/' + unquoteIfQuoted(copyFromMatch[1]); + index.isCopy = true; + } + const copyToMatch = (/^copy to (.*)/).exec(extLine); + if (copyToMatch) { + index.newFileName = 'b/' + unquoteIfQuoted(copyToMatch[1]); + index.isCopy = true; + } + const newFileModeMatch = (/^new file mode (\d+)/).exec(extLine); + if (newFileModeMatch) { + index.isCreate = true; + index.newMode = newFileModeMatch[1]; + } + const deletedFileModeMatch = (/^deleted file mode (\d+)/).exec(extLine); + if (deletedFileModeMatch) { + index.isDelete = true; + index.oldMode = deletedFileModeMatch[1]; + } + const oldModeMatch = (/^old mode (\d+)/).exec(extLine); + if (oldModeMatch) { + index.oldMode = oldModeMatch[1]; + } + const newModeMatch = (/^new mode (\d+)/).exec(extLine); + if (newModeMatch) { + index.newMode = newModeMatch[1]; + } + if ((/^Binary files /).test(extLine)) { + index.isBinary = true; + } + i++; + } + continue; + } + else if (isDiffHeader(line)) { + if (seenDiffHeader) { + return; + } + seenDiffHeader = true; + // For Mercurial-style headers like + // diff -r 9117c6561b0b -r 273ce12ad8f1 .hgignore + // or Index: headers like + // Index: something with multiple words + // we extract the trailing filename as the index. + // + // TODO: It seems awkward that we indiscriminately trim off + // trailing whitespace here. Theoretically, couldn't that + // be meaningful - e.g. if the patch represents a diff of a + // file whose name ends with a space? Seems wrong to nuke + // it. But this behaviour has been around since v2.2.1 in + // 2015, so if it's going to change, it should be done + // cautiously and in a new major release, for + // backwards-compat reasons. + // -- ExplodingCabbage + const headerMatch = (/^(?:Index:|diff(?: -r \w+)+)\s+/).exec(line); + if (headerMatch) { + index.index = line.substring(headerMatch[0].length).trim(); + } + } + i++; + } + // Parse file headers if they are defined. Unified diff requires them, but + // there's no technical issues to have an isolated hunk without file header + parseFileHeader(index); + parseFileHeader(index); + // If we got one file header but not the other, that's a malformed patch. + if ((index.oldFileName === undefined) !== (index.newFileName === undefined)) { + throw new Error('Missing ' + (index.oldFileName !== undefined ? '"+++ ..."' : '"--- ..."') + + ' file header for ' + ((_a = index.oldFileName) !== null && _a !== void 0 ? _a : index.newFileName)); + } + while (i < diffstr.length) { + const line = diffstr[i]; + if (isDiffHeader(line) || isFileHeader(line) || (/^===================================================================/).test(line)) { + break; + } + else if (isHunkHeader(line)) { + index.hunks.push(parseHunk()); + } + else { + // Skip blank lines and any other unrecognized content between + // or after hunks. Real-world examples of such content include: + // - `Only in : ` from GNU `diff -r` + // - `Property changes on:` sections from `svn diff` + // - Trailing prose or commentary in email patches + // GNU `patch` tolerates all of these, and so do we. + i++; + } + } + } + /** + * Parses the old and new filenames from a `diff --git` header line. + * + * The format is: + * diff --git a/ b/ + * + * When filenames contain special characters (including newlines, tabs, + * backslashes, or double quotes), Git quotes them with C-style escaping: + * diff --git "a/file\twith\ttabs.txt" "b/file\twith\ttabs.txt" + * + * When filenames don't contain special characters and the old and new names + * are the same, we can unambiguously split on ` b/` by finding where the + * two halves (including their a/ and b/ prefixes) yield matching bare names. + * + * A pathological case exists in which we cannot reliably determine the paths + * from the `diff --git` header. This case is when the following are true: + * - the old and new file paths differ + * - they are both unquoted (i.e. contain no special characters) + * - at least one of the underlying file paths includes the substring ` b/` + * In this scenario, we do not know which occurrence of ` b/` indicates the + * start of the new file path, so the header is inherently ambiguous. We thus + * select a possible interpretation arbitrarily and return that. + * + * Fortunately, this ambiguity should never matter, because in any patch + * genuinely output by Git in which this pathological scenario occurs, there + * must also be `rename from`/`rename to` or `copy from`/`copy to` extended + * headers present below the `diff --git` header. `parseIndex` will parse + * THOSE headers, from which we CAN unambiguously determine the filenames, + * and will discard the result returned by this function. + * + * Returns null if the header can't be parsed at all — e.g. a quoted filename + * has an unterminated quote, or if the unquoted header doesn't match the + * expected `a/... b/...` format. In that case, the caller (parseIndex) + * skips setting oldFileName/newFileName from this header, but they may + * still be set later from `---`/`+++` lines or `rename from`/`rename to` + * extended headers; if none of those are present either, they'll remain + * undefined in the output. + */ + function parseGitDiffHeader(line) { + // Strip the "diff --git " prefix + const rest = line.substring('diff --git '.length); + // Handle quoted paths: "a/path" "b/path" + // Git quotes paths when they contain characters like newlines, tabs, + // backslashes, or double quotes (but notably not spaces). + if (rest.startsWith('"')) { + const oldPath = parseQuotedFileName(rest); + if (oldPath === null) { + return null; + } + const afterOld = rest.substring(oldPath.rawLength + 1); // +1 for space + let newFileName; + if (afterOld.startsWith('"')) { + const newPath = parseQuotedFileName(afterOld); + if (newPath === null) { + return null; + } + newFileName = newPath.fileName; + } + else { + newFileName = afterOld; + } + return { + oldFileName: oldPath.fileName, + newFileName + }; + } + // Check if the second path is quoted + // e.g. diff --git a/simple "b/renamed\nnewline.txt" + const quoteIdx = rest.indexOf('"'); + if (quoteIdx > 0) { + const oldFileName = rest.substring(0, quoteIdx - 1); + const newPath = parseQuotedFileName(rest.substring(quoteIdx)); + if (newPath === null) { + return null; + } + return { + oldFileName, + newFileName: newPath.fileName + }; + } + // Unquoted paths. Try to find the split point. + // The format is: a/ b/ + // + // Note the potential ambiguity caused by the possibility of the file paths + // themselves containing the substring ` b/`, plus the pathological case + // described in the comment above. + // + // Strategy: find all occurrences of " b/" and split on the middle + // one. When old and new names are the same (which is the only case where + // we can't rely on extended headers later in the patch so HAVE to get + // this right), this will always be the correct split. + if (rest.startsWith('a/')) { + const splits = []; + let idx = 0; + while (true) { + idx = rest.indexOf(' b/', idx + 1); + if (idx === -1) { + break; + } + splits.push(idx); + } + if (splits.length > 0) { + const mid = splits[Math.floor(splits.length / 2)]; + return { + oldFileName: rest.substring(0, mid), + newFileName: rest.substring(mid + 1) + }; + } + } + // Fallback: can't parse, return null + return null; + } + /** + * If `s` starts with a double quote, unquotes it using C-style escape + * rules (as used by Git). Otherwise returns `s` as-is. + */ + function unquoteIfQuoted(s) { + if (s.startsWith('"')) { + const parsed = parseQuotedFileName(s); + if (parsed) { + return parsed.fileName; + } + } + return s; + } + /** + * Parses a C-style quoted filename as used by Git or GNU `diff -u`. + * Returns the unescaped filename and the raw length consumed (including quotes). + */ + function parseQuotedFileName(s) { + if (!s.startsWith('"')) { + return null; + } + let result = ''; + let j = 1; // skip opening quote + while (j < s.length) { + if (s[j] === '"') { + return { fileName: result, rawLength: j + 1 }; + } + if (s[j] === '\\' && j + 1 < s.length) { + j++; + switch (s[j]) { + case 'a': + result += '\x07'; + break; + case 'b': + result += '\b'; + break; + case 'f': + result += '\f'; + break; + case 'n': + result += '\n'; + break; + case 'r': + result += '\r'; + break; + case 't': + result += '\t'; + break; + case 'v': + result += '\v'; + break; + case '\\': + result += '\\'; + break; + case '"': + result += '"'; + break; + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': { + // C-style octal escapes represent raw bytes. Collect + // consecutive octal-escaped bytes and decode as UTF-8. + // Validate that we have a full 3-digit octal escape + if (j + 2 >= s.length || s[j + 1] < '0' || s[j + 1] > '7' || s[j + 2] < '0' || s[j + 2] > '7') { + return null; + } + const bytes = [parseInt(s.substring(j, j + 3), 8)]; + j += 3; + while (s[j] === '\\' && s[j + 1] >= '0' && s[j + 1] <= '7') { + if (j + 3 >= s.length || s[j + 2] < '0' || s[j + 2] > '7' || s[j + 3] < '0' || s[j + 3] > '7') { + return null; + } + bytes.push(parseInt(s.substring(j + 1, j + 4), 8)); + j += 4; + } + result += new TextDecoder('utf-8').decode(new Uint8Array(bytes)); + continue; // j already points at the next character + } + // Note that in C, there are also three kinds of hex escape sequences: + // - \xhh + // - \uhhhh + // - \Uhhhhhhhh + // We do not bother to parse them here because, so far as we know, + // they are never emitted by any tools that generate unified diff + // format diffs, and so for now jsdiff does not consider them legal. + default: return null; + } + } + else { + result += s[j]; + } + j++; + } + // Unterminated quote + return null; + } + // Parses the --- and +++ headers, if none are found, no lines + // are consumed. + function parseFileHeader(index) { + const fileHeaderMatch = (/^(---|\+\+\+)\s+/).exec(diffstr[i]); + if (fileHeaderMatch) { + const prefix = fileHeaderMatch[1], data = diffstr[i].substring(3).trim().split('\t', 2), header = (data[1] || '').trim(); + let fileName = data[0]; + if (fileName.startsWith('"')) { + fileName = unquoteIfQuoted(fileName); + } + else { + fileName = fileName.replace(/\\\\/g, '\\'); + } + if (prefix === '---') { + index.oldFileName = fileName; + index.oldHeader = header; + } + else { + index.newFileName = fileName; + index.newHeader = header; + } + i++; + } + } + // Parses a hunk + // This assumes that we are at the start of a hunk. + function parseHunk() { + var _a; + const chunkHeaderIndex = i, chunkHeaderLine = diffstr[i++], chunkHeader = chunkHeaderLine.split(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/); + const hunk = { + oldStart: +chunkHeader[1], + oldLines: typeof chunkHeader[2] === 'undefined' ? 1 : +chunkHeader[2], + newStart: +chunkHeader[3], + newLines: typeof chunkHeader[4] === 'undefined' ? 1 : +chunkHeader[4], + lines: [] + }; + // Unified Diff Format quirk: If the chunk size is 0, + // the first number is one lower than one would expect. + // https://www.artima.com/weblogs/viewpost.jsp?thread=164293 + if (hunk.oldLines === 0) { + hunk.oldStart += 1; + } + if (hunk.newLines === 0) { + hunk.newStart += 1; + } + let addCount = 0, removeCount = 0; + for (; i < diffstr.length && (removeCount < hunk.oldLines || addCount < hunk.newLines || ((_a = diffstr[i]) === null || _a === void 0 ? void 0 : _a.startsWith('\\'))); i++) { + const operation = (diffstr[i].length == 0 && i != (diffstr.length - 1)) ? ' ' : diffstr[i][0]; + if (operation === '+' || operation === '-' || operation === ' ' || operation === '\\') { + hunk.lines.push(diffstr[i]); + if (operation === '+') { + addCount++; + } + else if (operation === '-') { + removeCount++; + } + else if (operation === ' ') { + addCount++; + removeCount++; + } + } + else { + throw new Error(`Hunk at line ${chunkHeaderIndex + 1} contained invalid line ${diffstr[i]}`); + } + } + // Handle the empty block count case + if (!addCount && hunk.newLines === 1) { + hunk.newLines = 0; + } + if (!removeCount && hunk.oldLines === 1) { + hunk.oldLines = 0; + } + // Perform sanity checking + if (addCount !== hunk.newLines) { + throw new Error('Added line count did not match for hunk at line ' + (chunkHeaderIndex + 1)); + } + if (removeCount !== hunk.oldLines) { + throw new Error('Removed line count did not match for hunk at line ' + (chunkHeaderIndex + 1)); + } + // Check for extra hunk-body-like lines after the declared line counts + // were exhausted. If the very next line starts with ' ', '+', or '-', + // the hunk's line counts were probably wrong — unless it's a file + // header (--- or +++), which legitimately appears immediately after a + // hunk in multi-file diffs without Index lines. + if (i < diffstr.length && diffstr[i] && (/^[+ -]/).test(diffstr[i]) + && !isFileHeader(diffstr[i])) { + throw new Error('Hunk at line ' + (chunkHeaderIndex + 1) + + ' has more lines than expected (expected ' + + hunk.oldLines + ' old lines and ' + hunk.newLines + ' new lines)'); + } + return hunk; + } + while (i < diffstr.length) { + parseIndex(); + } + return list; +} diff --git a/node_modules/mocha/node_modules/diff/libcjs/patch/reverse.d.ts b/node_modules/mocha/node_modules/diff/libcjs/patch/reverse.d.ts new file mode 100644 index 00000000..1d287537 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libcjs/patch/reverse.d.ts @@ -0,0 +1,22 @@ +import type { StructuredPatch } from '../types.js'; +/** + * Returns a new structured patch which when applied will undo the original `patch`. + * + * When `patch` is a Git-style patch, `reversePatch` handles extended header information (relating + * to renames, file modes, etc.) to the extent that doing so is possible, but note one fundamental + * limitation: the correct inverse of a patch featuring `copy from`/`copy to` headers cannot, in + * general, be determined based on the information contained in the patch alone, and so + * `reversePatch`'s output when passed such a patch will usually be rejected by `git apply`. (The + * correct inverse would be a patch that deletes the newly-created file, but for Git to apply such + * a patch, the patch must explicitly delete every line of content in the file too, and that + * content cannot be determined from the original patch on its own. `reversePatch` therefore does + * the only vaguely reasonable thing it can do in this scenario: it outputs a patch with a + * `deleted file mode` header - indicating that the file should be deleted - but no hunks.) + * + * @param patch either a single structured patch object (as returned by `structuredPatch`) or an + * array of them (as returned by `parsePatch`). + */ +export declare function reversePatch(structuredPatch: StructuredPatch): StructuredPatch; +export declare function reversePatch(structuredPatch: StructuredPatch[]): StructuredPatch[]; +export declare function reversePatch(structuredPatch: StructuredPatch | StructuredPatch[]): StructuredPatch | StructuredPatch[]; +//# sourceMappingURL=reverse.d.ts.map \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libcjs/patch/reverse.d.ts.map b/node_modules/mocha/node_modules/diff/libcjs/patch/reverse.d.ts.map new file mode 100644 index 00000000..eed44013 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libcjs/patch/reverse.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"reverse.d.ts","sourceRoot":"","sources":["../../src/patch/reverse.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAenD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,YAAY,CAAC,eAAe,EAAE,eAAe,GAAG,eAAe,CAAC;AAChF,wBAAgB,YAAY,CAAC,eAAe,EAAE,eAAe,EAAE,GAAG,eAAe,EAAE,CAAC;AACpF,wBAAgB,YAAY,CAAC,eAAe,EAAE,eAAe,GAAG,eAAe,EAAE,GAAG,eAAe,GAAG,eAAe,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libcjs/patch/reverse.js b/node_modules/mocha/node_modules/diff/libcjs/patch/reverse.js new file mode 100644 index 00000000..f75f4abc --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libcjs/patch/reverse.js @@ -0,0 +1,63 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.reversePatch = reversePatch; +function swapPrefix(fileName) { + if (fileName === undefined || fileName === '/dev/null') { + return fileName; + } + if (fileName.startsWith('a/')) { + return 'b/' + fileName.slice(2); + } + if (fileName.startsWith('b/')) { + return 'a/' + fileName.slice(2); + } + return fileName; +} +function reversePatch(structuredPatch) { + if (Array.isArray(structuredPatch)) { + // (See comment in unixToWin for why we need the pointless-looking anonymous function here) + return structuredPatch.map(patch => reversePatch(patch)).reverse(); + } + const reversed = Object.assign(Object.assign({}, structuredPatch), { oldFileName: structuredPatch.isGit ? swapPrefix(structuredPatch.newFileName) : structuredPatch.newFileName, oldHeader: structuredPatch.newHeader, newFileName: structuredPatch.isGit ? swapPrefix(structuredPatch.oldFileName) : structuredPatch.oldFileName, newHeader: structuredPatch.oldHeader, oldMode: structuredPatch.newMode, newMode: structuredPatch.oldMode, isCreate: structuredPatch.isDelete, isDelete: structuredPatch.isCreate, hunks: structuredPatch.hunks.map(hunk => { + return { + oldLines: hunk.newLines, + oldStart: hunk.newStart, + newLines: hunk.oldLines, + newStart: hunk.oldStart, + lines: hunk.lines.map(l => { + if (l.startsWith('-')) { + return `+${l.slice(1)}`; + } + if (l.startsWith('+')) { + return `-${l.slice(1)}`; + } + return l; + }) + }; + }) }); + if (structuredPatch.isCopy) { + // Reversing a copy means deleting the file that was created by the copy. + // The "old" file in the reversed patch is the copy destination (which + // exists and should be removed), and the "new" file is /dev/null. + // + // Note: we clear the hunks because the original copy's hunks describe + // the diff between the source and destination, not the full content of + // the destination file, so they can't be meaningfully reversed into a + // deletion hunk. This means the resulting patch is not something + // `git apply` will accept (it requires deletion patches to include a + // hunk removing every line). Producing a correct deletion hunk would + // require knowing the full content of the copy destination, which we + // don't have. Consumers that need a `git apply`-compatible patch will + // need to resolve the full file content themselves. + reversed.newFileName = '/dev/null'; + reversed.newHeader = undefined; + reversed.isDelete = true; + delete reversed.isCreate; + delete reversed.isCopy; + delete reversed.isRename; + reversed.hunks = []; + } + // Reversing a rename is just a rename in the opposite direction; + // isRename stays set and the filenames are already swapped above. + return reversed; +} diff --git a/node_modules/mocha/node_modules/diff/libcjs/types.d.ts b/node_modules/mocha/node_modules/diff/libcjs/types.d.ts new file mode 100644 index 00000000..63cb6498 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libcjs/types.d.ts @@ -0,0 +1,260 @@ +export interface ChangeObject { + /** + * The concatenated content of all the tokens represented by this change object - i.e. generally the text that is either added, deleted, or common, as a single string. + * In cases where tokens are considered common but are non-identical (e.g. because an option like `ignoreCase` or a custom `comparator` was used), the value from the *new* string will be provided here. + */ + value: ValueT; + /** + * true if the value was inserted into the new string, otherwise false + */ + added: boolean; + /** + * true if the value was removed from the old string, otherwise false + */ + removed: boolean; + /** + * How many tokens (e.g. chars for `diffChars`, lines for `diffLines`) the value in the change object consists of + */ + count: number; +} +export type Change = ChangeObject; +export type ArrayChange = ChangeObject; +export interface CommonDiffOptions { + /** + * If `true`, the array of change objects returned will contain one change object per token (e.g. one per line if calling `diffLines`), instead of runs of consecutive tokens that are all added / all removed / all conserved being combined into a single change object. + */ + oneChangePerToken?: boolean; +} +export interface TimeoutOption { + /** + * A number of milliseconds after which the diffing algorithm will abort and return `undefined`. + * Supported by the same functions as `maxEditLength`. + */ + timeout: number; +} +export interface MaxEditLengthOption { + /** + * A number specifying the maximum edit distance to consider between the old and new texts. + * You can use this to limit the computational cost of diffing large, very different texts by giving up early if the cost will be huge. + * This option can be passed either to diffing functions (`diffLines`, `diffChars`, etc) or to patch-creation function (`structuredPatch`, `createPatch`, etc), all of which will indicate that the max edit length was reached by returning `undefined` instead of whatever they'd normally return. + */ + maxEditLength: number; +} +export type AbortableDiffOptions = TimeoutOption | MaxEditLengthOption; +export type DiffCallbackNonabortable = (result: ChangeObject[]) => void; +export type DiffCallbackAbortable = (result: ChangeObject[] | undefined) => void; +export interface CallbackOptionNonabortable { + /** + * If provided, the diff will be computed in async mode to avoid blocking the event loop while the diff is calculated. + * The value of the `callback` option should be a function and will be passed the computed diff or patch as its first argument. + */ + callback: DiffCallbackNonabortable; +} +export interface CallbackOptionAbortable { + /** + * If provided, the diff will be computed in async mode to avoid blocking the event loop while the diff is calculated. + * The value of the `callback` option should be a function and will be passed the computed diff or patch as its first argument. + */ + callback: DiffCallbackAbortable; +} +interface DiffArraysOptions extends CommonDiffOptions { + comparator?: (a: T, b: T) => boolean; +} +export interface DiffArraysOptionsNonabortable extends DiffArraysOptions { + /** + * If provided, the diff will be computed in async mode to avoid blocking the event loop while the diff is calculated. + * The value of the `callback` option should be a function and will be passed the computed diff or patch as its first argument. + */ + callback?: DiffCallbackNonabortable; +} +export type DiffArraysOptionsAbortable = DiffArraysOptions & AbortableDiffOptions & Partial>; +interface DiffCharsOptions extends CommonDiffOptions { + /** + * If `true`, the uppercase and lowercase forms of a character are considered equal. + * @default false + */ + ignoreCase?: boolean; +} +export interface DiffCharsOptionsNonabortable extends DiffCharsOptions { + /** + * If provided, the diff will be computed in async mode to avoid blocking the event loop while the diff is calculated. + * The value of the `callback` option should be a function and will be passed the computed diff or patch as its first argument. + */ + callback?: DiffCallbackNonabortable; +} +export type DiffCharsOptionsAbortable = DiffCharsOptions & AbortableDiffOptions & Partial>; +interface DiffLinesOptions extends CommonDiffOptions { + /** + * `true` to remove all trailing CR (`\r`) characters before performing the diff. + * This helps to get a useful diff when diffing UNIX text files against Windows text files. + * @default false + */ + stripTrailingCr?: boolean; + /** + * `true` to treat the newline character at the end of each line as its own token. + * This allows for changes to the newline structure to occur independently of the line content and to be treated as such. + * In general this is the more human friendly form of `diffLines`; the default behavior with this option turned off is better suited for patches and other computer friendly output. + * + * Note that while using `ignoreWhitespace` in combination with `newlineIsToken` is not an error, results may not be as expected. + * With `ignoreWhitespace: true` and `newlineIsToken: false`, changing a completely empty line to contain some spaces is treated as a non-change, but with `ignoreWhitespace: true` and `newlineIsToken: true`, it is treated as an insertion. + * This is because the content of a completely blank line is not a token at all in `newlineIsToken` mode. + * + * @default false + */ + newlineIsToken?: boolean; + /** + * `true` to ignore a missing newline character at the end of the last line when comparing it to other lines. + * (By default, the line `'b\n'` in text `'a\nb\nc'` is not considered equal to the line `'b'` in text `'a\nb'`; this option makes them be considered equal.) + * Ignored if `ignoreWhitespace` or `newlineIsToken` are also true. + * @default false + */ + ignoreNewlineAtEof?: boolean; + /** + * `true` to ignore leading and trailing whitespace characters when checking if two lines are equal. + * @default false + */ + ignoreWhitespace?: boolean; +} +export interface DiffLinesOptionsNonabortable extends DiffLinesOptions { + /** + * If provided, the diff will be computed in async mode to avoid blocking the event loop while the diff is calculated. + * The value of the `callback` option should be a function and will be passed the computed diff or patch as its first argument. + */ + callback?: DiffCallbackNonabortable; +} +export type DiffLinesOptionsAbortable = DiffLinesOptions & AbortableDiffOptions & Partial>; +interface DiffWordsOptions extends CommonDiffOptions { + /** + * Same as in `diffChars`. + * @default false + */ + ignoreCase?: boolean; + /** + * An optional [`Intl.Segmenter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter) object (which must have a `granularity` of `'word'`) for `diffWords` to use to split the text into words. + * + * Note that this is (deliberately) incorrectly typed as `any` to avoid users whose `lib` & `target` settings in tsconfig.json are older than es2022 getting type errors when they build about `Intl.Segmenter` not existing. + * This is kind of ugly, since it makes the type declarations worse for users who genuinely use this feature, but seemed worth it to avoid the majority of the library's users (who probably do not use this particular option) getting confusing errors and being forced to change their `lib` to es2022 (even if their own code doesn't use any es2022 functions). + * + * By default, `diffWords` does not use an `Intl.Segmenter`, just some regexes for splitting text into words. This will tend to give worse results than `Intl.Segmenter` would, but ensures the results are consistent across environments; `Intl.Segmenter` behaviour is only loosely specced and the implementations in browsers could in principle change dramatically in future. If you want to use `diffWords` with an `Intl.Segmenter` but ensure it behaves the same whatever environment you run it in, use an `Intl.Segmenter` polyfill instead of the JavaScript engine's native `Intl.Segmenter` implementation. + * + * Using an `Intl.Segmenter` should allow better word-level diffing of non-English text than the default behaviour. For instance, `Intl.Segmenter`s can generally identify via built-in dictionaries which sequences of adjacent Chinese characters form words, allowing word-level diffing of Chinese. By specifying a language when instantiating the segmenter (e.g. `new Intl.Segmenter('sv', {granularity: 'word'})`) you can also support language-specific rules, like treating Swedish's colon separated contractions (like *k:a* for *kyrka*) as single words; by default this would be seen as two words separated by a colon. + */ + intlSegmenter?: any; +} +export interface DiffWordsOptionsNonabortable extends DiffWordsOptions { + /** + * If provided, the diff will be computed in async mode to avoid blocking the event loop while the diff is calculated. + * The value of the `callback` option should be a function and will be passed the computed diff or patch as its first argument. + */ + callback?: DiffCallbackNonabortable; +} +export type DiffWordsOptionsAbortable = DiffWordsOptions & AbortableDiffOptions & Partial>; +interface DiffSentencesOptions extends CommonDiffOptions { +} +export interface DiffSentencesOptionsNonabortable extends DiffSentencesOptions { + /** + * If provided, the diff will be computed in async mode to avoid blocking the event loop while the diff is calculated. + * The value of the `callback` option should be a function and will be passed the computed diff or patch as its first argument. + */ + callback?: DiffCallbackNonabortable; +} +export type DiffSentencesOptionsAbortable = DiffSentencesOptions & AbortableDiffOptions & Partial>; +interface DiffJsonOptions extends CommonDiffOptions { + /** + * A value to replace `undefined` with. Ignored if a `stringifyReplacer` is provided. + */ + undefinedReplacement?: any; + /** + * A custom replacer function. + * Operates similarly to the `replacer` parameter to [`JSON.stringify()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#the_replacer_parameter), but must be a function. + */ + stringifyReplacer?: (k: string, v: any) => any; +} +export interface DiffJsonOptionsNonabortable extends DiffJsonOptions { + /** + * If provided, the diff will be computed in async mode to avoid blocking the event loop while the diff is calculated. + * The value of the `callback` option should be a function and will be passed the computed diff or patch as its first argument. + */ + callback?: DiffCallbackNonabortable; +} +export type DiffJsonOptionsAbortable = DiffJsonOptions & AbortableDiffOptions & Partial>; +interface DiffCssOptions extends CommonDiffOptions { +} +export interface DiffCssOptionsNonabortable extends DiffCssOptions { + /** + * If provided, the diff will be computed in async mode to avoid blocking the event loop while the diff is calculated. + * The value of the `callback` option should be a function and will be passed the computed diff or patch as its first argument. + */ + callback?: DiffCallbackNonabortable; +} +export type DiffCssOptionsAbortable = DiffCssOptions & AbortableDiffOptions & Partial>; +/** + * Note that this contains the union of ALL options accepted by any of the built-in diffing + * functions. The README notes which options are usable which functions. Using an option with a + * diffing function that doesn't support it might yield unreasonable results. + */ +export type AllDiffOptions = DiffArraysOptions & DiffCharsOptions & DiffWordsOptions & DiffLinesOptions & DiffJsonOptions; +export interface StructuredPatch { + oldFileName: string | undefined; + newFileName: string | undefined; + oldHeader: string | undefined; + newHeader: string | undefined; + hunks: StructuredPatchHunk[]; + index?: string; + /** + * Set to true when the patch was parsed from a Git-style diff (one with a + * `diff --git` header). Controls whether `formatPatch` emits a `diff --git` + * header (instead of `Index:` / underline headers) when formatting the patch. + */ + isGit?: boolean; + /** + * Set to true when parsing a Git diff that includes `rename from`/`rename to` + * extended headers, indicating the file was renamed (and the old file no + * longer exists). Consumers applying the patch should delete the old file. + */ + isRename?: boolean; + /** + * Set to true when parsing a Git diff that includes `copy from`/`copy to` + * extended headers, indicating the file was copied (and the old file still + * exists). Consumers applying the patch should NOT delete the old file. + */ + isCopy?: boolean; + /** + * Set to true when parsing a Git diff that includes a `new file mode` extended + * header, indicating the file was newly created. + */ + isCreate?: boolean; + /** + * Set to true when parsing a Git diff that includes a `deleted file mode` + * extended header, indicating the file was deleted. + */ + isDelete?: boolean; + /** + * The file mode (e.g. `'100644'`, `'100755'`) of the old file, parsed from + * Git extended headers (`old mode` or `deleted file mode`). + */ + oldMode?: string; + /** + * The file mode (e.g. `'100644'`, `'100755'`) of the new file, parsed from + * Git extended headers (`new mode` or `new file mode`). + */ + newMode?: string; + /** + * Set to true when parsing a Git diff that includes a + * `Binary files ... differ` line, indicating a binary file change. + * Binary patches have no hunks, so the patch content alone is not + * sufficient to apply the change; consumers should handle this case + * specially (e.g. by warning the user or fetching the binary content + * separately). + */ + isBinary?: boolean; +} +export interface StructuredPatchHunk { + oldStart: number; + oldLines: number; + newStart: number; + newLines: number; + lines: string[]; +} +export {}; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libcjs/types.d.ts.map b/node_modules/mocha/node_modules/diff/libcjs/types.d.ts.map new file mode 100644 index 00000000..59f1552d --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libcjs/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY,CAAC,MAAM;IAClC;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,EAAE,OAAO,CAAC;IACf;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;CACf;AAMD,MAAM,MAAM,MAAM,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC;AAC1C,MAAM,MAAM,WAAW,CAAC,CAAC,IAAI,YAAY,CAAC,CAAC,EAAE,CAAC,CAAC;AAE/C,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED,MAAM,WAAW,aAAa;IAC5B;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,mBAAmB;IAClC;;;;OAIG;IACH,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,MAAM,oBAAoB,GAAG,aAAa,GAAG,mBAAmB,CAAC;AAEvE,MAAM,MAAM,wBAAwB,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,KAAK,IAAI,CAAC;AAC9E,MAAM,MAAM,qBAAqB,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,GAAG,SAAS,KAAK,IAAI,CAAC;AAEvF,MAAM,WAAW,0BAA0B,CAAC,CAAC;IAC3C;;;OAGG;IACH,QAAQ,EAAE,wB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AAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB"} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libcjs/types.js b/node_modules/mocha/node_modules/diff/libcjs/types.js new file mode 100644 index 00000000..c8ad2e54 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libcjs/types.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/mocha/node_modules/diff/libcjs/util/array.d.ts b/node_modules/mocha/node_modules/diff/libcjs/util/array.d.ts new file mode 100644 index 00000000..380c16f2 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libcjs/util/array.d.ts @@ -0,0 +1,3 @@ +export declare function arrayEqual(a: any[], b: any[]): boolean; +export declare function arrayStartsWith(array: any[], start: any[]): boolean; +//# sourceMappingURL=array.d.ts.map \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libcjs/util/array.d.ts.map b/node_modules/mocha/node_modules/diff/libcjs/util/array.d.ts.map new file mode 100644 index 00000000..31777194 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libcjs/util/array.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"array.d.ts","sourceRoot":"","sources":["../../src/util/array.ts"],"names":[],"mappings":"AAAA,wBAAgB,UAAU,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG,OAAO,CAMtD;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,OAAO,CAYnE"} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libcjs/util/array.js b/node_modules/mocha/node_modules/diff/libcjs/util/array.js new file mode 100644 index 00000000..444d12bd --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libcjs/util/array.js @@ -0,0 +1,21 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.arrayEqual = arrayEqual; +exports.arrayStartsWith = arrayStartsWith; +function arrayEqual(a, b) { + if (a.length !== b.length) { + return false; + } + return arrayStartsWith(a, b); +} +function arrayStartsWith(array, start) { + if (start.length > array.length) { + return false; + } + for (let i = 0; i < start.length; i++) { + if (start[i] !== array[i]) { + return false; + } + } + return true; +} diff --git a/node_modules/mocha/node_modules/diff/libcjs/util/distance-iterator.d.ts b/node_modules/mocha/node_modules/diff/libcjs/util/distance-iterator.d.ts new file mode 100644 index 00000000..b3c8462f --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libcjs/util/distance-iterator.d.ts @@ -0,0 +1,2 @@ +export default function (start: number, minLine: number, maxLine: number): () => number | undefined; +//# sourceMappingURL=distance-iterator.d.ts.map \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libcjs/util/distance-iterator.d.ts.map b/node_modules/mocha/node_modules/diff/libcjs/util/distance-iterator.d.ts.map new file mode 100644 index 00000000..6b66bba1 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libcjs/util/distance-iterator.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"distance-iterator.d.ts","sourceRoot":"","sources":["../../src/util/distance-iterator.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,OAAO,WAAU,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,MAAM,GAAG,SAAS,CA0CjG"} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libcjs/util/distance-iterator.js b/node_modules/mocha/node_modules/diff/libcjs/util/distance-iterator.js new file mode 100644 index 00000000..5ee525ad --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libcjs/util/distance-iterator.js @@ -0,0 +1,40 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = default_1; +// Iterator that traverses in the range of [min, max], stepping +// by distance from a given start position. I.e. for [0, 4], with +// start of 2, this will iterate 2, 3, 1, 4, 0. +function default_1(start, minLine, maxLine) { + let wantForward = true, backwardExhausted = false, forwardExhausted = false, localOffset = 1; + return function iterator() { + if (wantForward && !forwardExhausted) { + if (backwardExhausted) { + localOffset++; + } + else { + wantForward = false; + } + // Check if trying to fit beyond text length, and if not, check it fits + // after offset location (or desired location on first iteration) + if (start + localOffset <= maxLine) { + return start + localOffset; + } + forwardExhausted = true; + } + if (!backwardExhausted) { + if (!forwardExhausted) { + wantForward = true; + } + // Check if trying to fit before text beginning, and if not, check it fits + // before offset location + if (minLine <= start - localOffset) { + return start - localOffset++; + } + backwardExhausted = true; + return iterator(); + } + // We tried to fit hunk before text beginning and beyond text length, then + // hunk can't fit on the text. Return undefined + return undefined; + }; +} diff --git a/node_modules/mocha/node_modules/diff/libcjs/util/params.d.ts b/node_modules/mocha/node_modules/diff/libcjs/util/params.d.ts new file mode 100644 index 00000000..d8b059d8 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libcjs/util/params.d.ts @@ -0,0 +1,4 @@ +export declare function generateOptions(options: { + [key: string]: any; +} | ((_: unknown) => void), defaults: any): object; +//# sourceMappingURL=params.d.ts.map \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libcjs/util/params.d.ts.map b/node_modules/mocha/node_modules/diff/libcjs/util/params.d.ts.map new file mode 100644 index 00000000..1bd0acb6 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libcjs/util/params.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"params.d.ts","sourceRoot":"","sources":["../../src/util/params.ts"],"names":[],"mappings":"AAAA,wBAAgB,eAAe,CAC7B,OAAO,EAAE;IAAC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC,EACtD,QAAQ,EAAE,GAAG,GACZ,MAAM,CAYR"} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libcjs/util/params.js b/node_modules/mocha/node_modules/diff/libcjs/util/params.js new file mode 100644 index 00000000..82da3a03 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libcjs/util/params.js @@ -0,0 +1,17 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.generateOptions = generateOptions; +function generateOptions(options, defaults) { + if (typeof options === 'function') { + defaults.callback = options; + } + else if (options) { + for (const name in options) { + /* istanbul ignore else */ + if (Object.prototype.hasOwnProperty.call(options, name)) { + defaults[name] = options[name]; + } + } + } + return defaults; +} diff --git a/node_modules/mocha/node_modules/diff/libcjs/util/string.d.ts b/node_modules/mocha/node_modules/diff/libcjs/util/string.d.ts new file mode 100644 index 00000000..96c2a922 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libcjs/util/string.d.ts @@ -0,0 +1,30 @@ +export declare function longestCommonPrefix(str1: string, str2: string): string; +export declare function longestCommonSuffix(str1: string, str2: string): string; +export declare function replacePrefix(string: string, oldPrefix: string, newPrefix: string): string; +export declare function replaceSuffix(string: string, oldSuffix: string, newSuffix: string): string; +export declare function removePrefix(string: string, oldPrefix: string): string; +export declare function removeSuffix(string: string, oldSuffix: string): string; +export declare function maximumOverlap(string1: string, string2: string): string; +/** + * Returns true if the string consistently uses Windows line endings. + */ +export declare function hasOnlyWinLineEndings(string: string): boolean; +/** + * Returns true if the string consistently uses Unix line endings. + */ +export declare function hasOnlyUnixLineEndings(string: string): boolean; +/** + * Split a string into segments using a word segmenter, merging consecutive + * segments if they are both whitespace segments. Whitespace segments can + * appear adjacent to one another for two reasons: + * - newlines always get their own segment + * - where a diacritic is attached to a whitespace character in the text, the + * segment ends after the diacritic, so e.g. " \u0300 " becomes two segments. + * This function therefore runs the segmenter's .segment() method and then + * merges consecutive segments of whitespace into a single part. + */ +export declare function segment(string: string, segmenter: Intl.Segmenter): string[]; +export declare function trailingWs(string: string, segmenter?: Intl.Segmenter): string; +export declare function leadingWs(string: string, segmenter?: Intl.Segmenter): string; +export declare function leadingAndTrailingWs(string: string, segmenter?: Intl.Segmenter): [string, string]; +//# sourceMappingURL=string.d.ts.map \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libcjs/util/string.d.ts.map b/node_modules/mocha/node_modules/diff/libcjs/util/string.d.ts.map new file mode 100644 index 00000000..e026fed0 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libcjs/util/string.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"string.d.ts","sourceRoot":"","sources":["../../src/util/string.ts"],"names":[],"mappings":"AAAA,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAQtE;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAgBtE;AAED,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAK1F;AAED,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAS1F;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAEtE;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAEtE;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAEvE;AAkCD;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAE7D;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAE9D;AAED;;;;;;;;;GASG;AACH,wBAAgB,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,GAAG,MAAM,EAAE,CAW3E;AAgBD,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,IAAI,CAAC,SAAS,GAAG,MAAM,CAuB7E;AAED,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,IAAI,CAAC,SAAS,GAAG,MAAM,CAQ5E;AAED,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,MAAM,EACd,SAAS,CAAC,EAAE,IAAI,CAAC,SAAS,GACzB,CAAC,MAAM,EAAE,MAAM,CAAC,CAelB"} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libcjs/util/string.js b/node_modules/mocha/node_modules/diff/libcjs/util/string.js new file mode 100644 index 00000000..fe4b8590 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libcjs/util/string.js @@ -0,0 +1,199 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.longestCommonPrefix = longestCommonPrefix; +exports.longestCommonSuffix = longestCommonSuffix; +exports.replacePrefix = replacePrefix; +exports.replaceSuffix = replaceSuffix; +exports.removePrefix = removePrefix; +exports.removeSuffix = removeSuffix; +exports.maximumOverlap = maximumOverlap; +exports.hasOnlyWinLineEndings = hasOnlyWinLineEndings; +exports.hasOnlyUnixLineEndings = hasOnlyUnixLineEndings; +exports.segment = segment; +exports.trailingWs = trailingWs; +exports.leadingWs = leadingWs; +exports.leadingAndTrailingWs = leadingAndTrailingWs; +function longestCommonPrefix(str1, str2) { + let i; + for (i = 0; i < str1.length && i < str2.length; i++) { + if (str1[i] != str2[i]) { + return str1.slice(0, i); + } + } + return str1.slice(0, i); +} +function longestCommonSuffix(str1, str2) { + let i; + // Unlike longestCommonPrefix, we need a special case to handle all scenarios + // where we return the empty string since str1.slice(-0) will return the + // entire string. + if (!str1 || !str2 || str1[str1.length - 1] != str2[str2.length - 1]) { + return ''; + } + for (i = 0; i < str1.length && i < str2.length; i++) { + if (str1[str1.length - (i + 1)] != str2[str2.length - (i + 1)]) { + return str1.slice(-i); + } + } + return str1.slice(-i); +} +function replacePrefix(string, oldPrefix, newPrefix) { + if (string.slice(0, oldPrefix.length) != oldPrefix) { + throw Error(`string ${JSON.stringify(string)} doesn't start with prefix ${JSON.stringify(oldPrefix)}; this is a bug`); + } + return newPrefix + string.slice(oldPrefix.length); +} +function replaceSuffix(string, oldSuffix, newSuffix) { + if (!oldSuffix) { + return string + newSuffix; + } + if (string.slice(-oldSuffix.length) != oldSuffix) { + throw Error(`string ${JSON.stringify(string)} doesn't end with suffix ${JSON.stringify(oldSuffix)}; this is a bug`); + } + return string.slice(0, -oldSuffix.length) + newSuffix; +} +function removePrefix(string, oldPrefix) { + return replacePrefix(string, oldPrefix, ''); +} +function removeSuffix(string, oldSuffix) { + return replaceSuffix(string, oldSuffix, ''); +} +function maximumOverlap(string1, string2) { + return string2.slice(0, overlapCount(string1, string2)); +} +// Nicked from https://stackoverflow.com/a/60422853/1709587 +function overlapCount(a, b) { + // Deal with cases where the strings differ in length + let startA = 0; + if (a.length > b.length) { + startA = a.length - b.length; + } + let endB = b.length; + if (a.length < b.length) { + endB = a.length; + } + // Create a back-reference for each index + // that should be followed in case of a mismatch. + // We only need B to make these references: + const map = Array(endB); + let k = 0; // Index that lags behind j + map[0] = 0; + for (let j = 1; j < endB; j++) { + if (b[j] == b[k]) { + map[j] = map[k]; // skip over the same character (optional optimisation) + } + else { + map[j] = k; + } + while (k > 0 && b[j] != b[k]) { + k = map[k]; + } + if (b[j] == b[k]) { + k++; + } + } + // Phase 2: use these references while iterating over A + k = 0; + for (let i = startA; i < a.length; i++) { + while (k > 0 && a[i] != b[k]) { + k = map[k]; + } + if (a[i] == b[k]) { + k++; + } + } + return k; +} +/** + * Returns true if the string consistently uses Windows line endings. + */ +function hasOnlyWinLineEndings(string) { + return string.includes('\r\n') && !string.startsWith('\n') && !string.match(/[^\r]\n/); +} +/** + * Returns true if the string consistently uses Unix line endings. + */ +function hasOnlyUnixLineEndings(string) { + return !string.includes('\r\n') && string.includes('\n'); +} +/** + * Split a string into segments using a word segmenter, merging consecutive + * segments if they are both whitespace segments. Whitespace segments can + * appear adjacent to one another for two reasons: + * - newlines always get their own segment + * - where a diacritic is attached to a whitespace character in the text, the + * segment ends after the diacritic, so e.g. " \u0300 " becomes two segments. + * This function therefore runs the segmenter's .segment() method and then + * merges consecutive segments of whitespace into a single part. + */ +function segment(string, segmenter) { + const parts = []; + for (const segmentObj of Array.from(segmenter.segment(string))) { + const segment = segmentObj.segment; + if (parts.length && (/\s/).test(parts[parts.length - 1]) && (/\s/).test(segment)) { + parts[parts.length - 1] += segment; + } + else { + parts.push(segment); + } + } + return parts; +} +// The functions below take a `segmenter` argument so that, when called from +// diffWords when it is using a segmenter, they can use a notion of what +// constitutes "whitespace" that is consistent with the segmenter. +// +// USUALLY this will be identical to the result of the non-segmenter-based +// logic, but it differs in at least one case: when whitespace characters are +// modified by diacritics. A word segmenter considers these diacritics to be +// part of the whitespace, whereas our non-segmenter-based logic does not. +// +// Because the segmenter-based approach necessarily requires segmenting the +// entire string, we offer a leadingAndTrailingWs function to allow getting the +// whitespace prefix AND whitespace suffix with a single call to the segmenter, +// for efficiency's sake. +function trailingWs(string, segmenter) { + if (segmenter) { + return leadingAndTrailingWs(string, segmenter)[1]; + } + // Yes, this looks overcomplicated and dumb - why not replace the whole function with + // return string.match(/\s*$/)[0] + // you ask? Because: + // 1. the trap described at https://markamery.com/blog/quadratic-time-regexes/ would mean doing + // this would cause this function to take O(n²) time in the worst case (specifically when + // there is a massive run of NON-TRAILING whitespace in `string`), and + // 2. the fix proposed in the same blog post, of using a negative lookbehind, is incompatible + // with old Safari versions that we'd like to not break if possible (see + // https://github.com/kpdecker/jsdiff/pull/550) + // It feels absurd to do this with an explicit loop instead of a regex, but I really can't see a + // better way that doesn't result in broken behaviour. + let i; + for (i = string.length - 1; i >= 0; i--) { + if (!string[i].match(/\s/)) { + break; + } + } + return string.substring(i + 1); +} +function leadingWs(string, segmenter) { + if (segmenter) { + return leadingAndTrailingWs(string, segmenter)[0]; + } + // Thankfully the annoying considerations described in trailingWs don't apply here: + const match = string.match(/^\s*/); + return match ? match[0] : ''; +} +function leadingAndTrailingWs(string, segmenter) { + if (!segmenter) { + return [leadingWs(string), trailingWs(string)]; + } + if (segmenter.resolvedOptions().granularity != 'word') { + throw new Error('The segmenter passed must have a granularity of "word"'); + } + const segments = segment(string, segmenter); + const firstSeg = segments[0]; + const lastSeg = segments[segments.length - 1]; + const head = (/\s/).test(firstSeg) ? firstSeg : ''; + const tail = (/\s/).test(lastSeg) ? lastSeg : ''; + return [head, tail]; +} diff --git a/node_modules/mocha/node_modules/diff/libesm/convert/dmp.d.ts b/node_modules/mocha/node_modules/diff/libesm/convert/dmp.d.ts new file mode 100644 index 00000000..7760d3ad --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libesm/convert/dmp.d.ts @@ -0,0 +1,8 @@ +import type { ChangeObject } from '../types.js'; +type DmpOperation = 1 | 0 | -1; +/** + * converts a list of change objects to the format returned by Google's [diff-match-patch](https://github.com/google/diff-match-patch) library + */ +export declare function convertChangesToDMP(changes: ChangeObject[]): [DmpOperation, ValueT][]; +export {}; +//# sourceMappingURL=dmp.d.ts.map \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libesm/convert/dmp.d.ts.map b/node_modules/mocha/node_modules/diff/libesm/convert/dmp.d.ts.map new file mode 100644 index 00000000..a3fc1ca7 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libesm/convert/dmp.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"dmp.d.ts","sourceRoot":"","sources":["../../src/convert/dmp.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,aAAa,CAAC;AAE9C,KAAK,YAAY,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;AAE/B;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,OAAO,EAAE,YAAY,CAAC,MAAM,CAAC,EAAE,GAAG,CAAC,YAAY,EAAE,MAAM,CAAC,EAAE,CAiBrG"} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libesm/convert/dmp.js b/node_modules/mocha/node_modules/diff/libesm/convert/dmp.js new file mode 100644 index 00000000..44d28414 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libesm/convert/dmp.js @@ -0,0 +1,21 @@ +/** + * converts a list of change objects to the format returned by Google's [diff-match-patch](https://github.com/google/diff-match-patch) library + */ +export function convertChangesToDMP(changes) { + const ret = []; + let change, operation; + for (let i = 0; i < changes.length; i++) { + change = changes[i]; + if (change.added) { + operation = 1; + } + else if (change.removed) { + operation = -1; + } + else { + operation = 0; + } + ret.push([operation, change.value]); + } + return ret; +} diff --git a/node_modules/mocha/node_modules/diff/libesm/convert/xml.d.ts b/node_modules/mocha/node_modules/diff/libesm/convert/xml.d.ts new file mode 100644 index 00000000..ac080ced --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libesm/convert/xml.d.ts @@ -0,0 +1,6 @@ +import type { ChangeObject } from '../types.js'; +/** + * converts a list of change objects to a serialized XML format + */ +export declare function convertChangesToXML(changes: ChangeObject[]): string; +//# sourceMappingURL=xml.d.ts.map \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libesm/convert/xml.d.ts.map b/node_modules/mocha/node_modules/diff/libesm/convert/xml.d.ts.map new file mode 100644 index 00000000..4a8ffa99 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libesm/convert/xml.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"xml.d.ts","sourceRoot":"","sources":["../../src/convert/xml.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,aAAa,CAAC;AAE9C;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,YAAY,CAAC,MAAM,CAAC,EAAE,GAAG,MAAM,CAmB3E"} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libesm/convert/xml.js b/node_modules/mocha/node_modules/diff/libesm/convert/xml.js new file mode 100644 index 00000000..90ea8a2b --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libesm/convert/xml.js @@ -0,0 +1,31 @@ +/** + * converts a list of change objects to a serialized XML format + */ +export function convertChangesToXML(changes) { + const ret = []; + for (let i = 0; i < changes.length; i++) { + const change = changes[i]; + if (change.added) { + ret.push(''); + } + else if (change.removed) { + ret.push(''); + } + ret.push(escapeHTML(change.value)); + if (change.added) { + ret.push(''); + } + else if (change.removed) { + ret.push(''); + } + } + return ret.join(''); +} +function escapeHTML(s) { + let n = s; + n = n.replace(/&/g, '&'); + n = n.replace(//g, '>'); + n = n.replace(/"/g, '"'); + return n; +} diff --git a/node_modules/mocha/node_modules/diff/libesm/diff/array.d.ts b/node_modules/mocha/node_modules/diff/libesm/diff/array.d.ts new file mode 100644 index 00000000..ebe7fe8b --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libesm/diff/array.d.ts @@ -0,0 +1,19 @@ +import Diff from './base.js'; +import type { ChangeObject, DiffArraysOptionsNonabortable, CallbackOptionNonabortable, DiffArraysOptionsAbortable, DiffCallbackNonabortable, CallbackOptionAbortable } from '../types.js'; +declare class ArrayDiff extends Diff> { + tokenize(value: Array): T[]; + join(value: Array): T[]; + removeEmpty(value: Array): T[]; +} +export declare const arrayDiff: ArrayDiff; +/** + * diffs two arrays of tokens, comparing each item for strict equality (===). + * @returns a list of change objects. + */ +export declare function diffArrays(oldArr: T[], newArr: T[], options: DiffCallbackNonabortable): undefined; +export declare function diffArrays(oldArr: T[], newArr: T[], options: DiffArraysOptionsAbortable & CallbackOptionAbortable): undefined; +export declare function diffArrays(oldArr: T[], newArr: T[], options: DiffArraysOptionsNonabortable & CallbackOptionNonabortable): undefined; +export declare function diffArrays(oldArr: T[], newArr: T[], options: DiffArraysOptionsAbortable): ChangeObject[] | undefined; +export declare function diffArrays(oldArr: T[], newArr: T[], options?: DiffArraysOptionsNonabortable): ChangeObject[]; +export {}; +//# sourceMappingURL=array.d.ts.map \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libesm/diff/array.d.ts.map b/node_modules/mocha/node_modules/diff/libesm/diff/array.d.ts.map new file mode 100644 index 00000000..57ab0787 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libesm/diff/array.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"array.d.ts","sourceRoot":"","sources":["../../src/diff/array.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,KAAK,EAAC,YAAY,EAAE,6BAA6B,EAAE,0BAA0B,EAAE,0BAA0B,EAAE,wBAAwB,EAAE,uBAAuB,EAAC,MAAM,aAAa,CAAC;AAExL,cAAM,SAAS,CAAC,CAAC,CAAE,SAAQ,IAAI,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;IAC1C,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC;IAIxB,IAAI,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC;IAIpB,WAAW,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC;CAG5B;AAED,eAAO,MAAM,SAAS,oBAAkB,CAAC;AAEzC;;;GAGG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAC1B,MAAM,EAAE,CAAC,EAAE,EACX,MAAM,EAAE,CAAC,EAAE,EACX,OAAO,EAAE,wBAAwB,CAAC,CAAC,EAAE,CAAC,GACrC,SAAS,CAAC;AACb,wBAAgB,UAAU,CAAC,CAAC,EAC1B,MAAM,EAAE,CAAC,EAAE,EACX,MAAM,EAAE,CAAC,EAAE,EACX,OAAO,EAAE,0BAA0B,CAAC,CAAC,CAAC,GAAG,uBAAuB,CAAC,CAAC,EAAE,CAAC,GACpE,SAAS,CAAA;AACZ,wBAAgB,UAAU,CAAC,CAAC,EAC1B,MAAM,EAAE,CAAC,EAAE,EACX,MAAM,EAAE,CAAC,EAAE,EACX,OAAO,EAAE,6BAA6B,CAAC,CAAC,CAAC,GAAG,0BAA0B,CAAC,CAAC,EAAE,CAAC,GAC1E,SAAS,CAAA;AACZ,wBAAgB,UAAU,CAAC,CAAC,EAC1B,MAAM,EAAE,CAAC,EAAE,EACX,MAAM,EAAE,CAAC,EAAE,EACX,OAAO,EAAE,0BAA0B,CAAC,CAAC,CAAC,GACrC,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,SAAS,CAAA;AAClC,wBAAgB,UAAU,CAAC,CAAC,EAC1B,MAAM,EAAE,CAAC,EAAE,EACX,MAAM,EAAE,CAAC,EAAE,EACX,OAAO,CAAC,EAAE,6BAA6B,CAAC,CAAC,CAAC,GACzC,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE,CAAA"} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libesm/diff/array.js b/node_modules/mocha/node_modules/diff/libesm/diff/array.js new file mode 100644 index 00000000..d92aeb48 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libesm/diff/array.js @@ -0,0 +1,16 @@ +import Diff from './base.js'; +class ArrayDiff extends Diff { + tokenize(value) { + return value.slice(); + } + join(value) { + return value; + } + removeEmpty(value) { + return value; + } +} +export const arrayDiff = new ArrayDiff(); +export function diffArrays(oldArr, newArr, options) { + return arrayDiff.diff(oldArr, newArr, options); +} diff --git a/node_modules/mocha/node_modules/diff/libesm/diff/base.d.ts b/node_modules/mocha/node_modules/diff/libesm/diff/base.d.ts new file mode 100644 index 00000000..b2fac32b --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libesm/diff/base.d.ts @@ -0,0 +1,20 @@ +import type { ChangeObject, AllDiffOptions, AbortableDiffOptions, DiffCallbackNonabortable, CallbackOptionAbortable, CallbackOptionNonabortable } from '../types.js'; +export default class Diff = Iterable, InputValueT = ValueT> { + diff(oldStr: InputValueT, newStr: InputValueT, options: DiffCallbackNonabortable): undefined; + diff(oldStr: InputValueT, newStr: InputValueT, options: AllDiffOptions & AbortableDiffOptions & CallbackOptionAbortable): undefined; + diff(oldStr: InputValueT, newStr: InputValueT, options: AllDiffOptions & CallbackOptionNonabortable): undefined; + diff(oldStr: InputValueT, newStr: InputValueT, options: AllDiffOptions & AbortableDiffOptions): ChangeObject[] | undefined; + diff(oldStr: InputValueT, newStr: InputValueT, options?: AllDiffOptions): ChangeObject[]; + private diffWithOptionsObj; + private addToPath; + private extractCommon; + equals(left: TokenT, right: TokenT, options: AllDiffOptions): boolean; + removeEmpty(array: TokenT[]): TokenT[]; + castInput(value: InputValueT, options: AllDiffOptions): ValueT; + tokenize(value: ValueT, options: AllDiffOptions): TokenT[]; + join(chars: TokenT[]): ValueT; + postProcess(changeObjects: ChangeObject[], options: AllDiffOptions): ChangeObject[]; + get useLongestToken(): boolean; + private buildValues; +} +//# sourceMappingURL=base.d.ts.map \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libesm/diff/base.d.ts.map b/node_modules/mocha/node_modules/diff/libesm/diff/base.d.ts.map new file mode 100644 index 00000000..a3210d3b --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libesm/diff/base.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/diff/base.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,YAAY,EAAE,cAAc,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,uBAAuB,EAAE,0BAA0B,EAA4D,MAAM,aAAa,CAAC;AAuB9N,MAAM,CAAC,OAAO,OAAO,IAAI,CACvB,MAAM,EACN,MAAM,SAAS,QAAQ,CAAC,MAAM,CAAC,GAAG,QAAQ,CAAC,MAAM,CAAC,EAClD,WAAW,GAAG,MAAM;IAEpB,IAAI,CACF,MAAM,EAAE,WAAW,EACnB,MAAM,EAAE,WAAW,EACnB,OAAO,EAAE,wBAAwB,CAAC,MAAM,CAAC,GACxC,SAAS;IACZ,IAAI,CACF,MAAM,EAAE,WAAW,EACnB,MAAM,EAAE,WAAW,EACnB,OAAO,EAAE,cAAc,GAAG,oBAAoB,GAAG,uBAAuB,CAAC,MAAM,CAAC,GAC/E,SAAS;IACZ,IAAI,CACF,MAAM,EAAE,WAAW,EACnB,MAAM,EAAE,WAAW,EACnB,OAAO,EAAE,cAAc,GAAG,0BAA0B,CAAC,MAAM,CAAC,GAC3D,SAAS;IACZ,IAAI,CACF,MAAM,EAAE,WAAW,EACnB,MAAM,EAAE,WAAW,EACnB,OAAO,EAAE,cAAc,GAAG,oBAAoB,GAC7C,YAAY,CAAC,MAAM,CAAC,EAAE,GAAG,SAAS;IACrC,IAAI,CACF,MAAM,EAAE,WAAW,EACnB,MAAM,EAAE,WAAW,EACnB,OAAO,CAAC,EAAE,cAAc,GACvB,YAAY,CAAC,MAAM,CAAC,EAAE;IAwBzB,OAAO,CAAC,kBAAkB;IA0I1B,OAAO,CAAC,SAAS;IAqBjB,OAAO,CAAC,aAAa;IA8BrB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,GAAG,OAAO;IASrE,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE;IAWtC,SAAS,CAAC,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,cAAc,GAAG,MAAM;IAK9D,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,GAAG,MAAM,EAAE;IAI1D,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM;IAQ7B,WAAW,CACT,aAAa,EAAE,YAAY,CAAC,MAAM,CAAC,EAAE,EAErC,OAAO,EAAE,cAAc,GACtB,YAAY,CAAC,MAAM,CAAC,EAAE;IAIzB,IAAI,eAAe,IAAI,OAAO,CAE7B;IAED,OAAO,CAAC,WAAW;CAkDpB"} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libesm/diff/base.js b/node_modules/mocha/node_modules/diff/libesm/diff/base.js new file mode 100644 index 00000000..db02845d --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libesm/diff/base.js @@ -0,0 +1,253 @@ +export default class Diff { + diff(oldStr, newStr, + // Type below is not accurate/complete - see above for full possibilities - but it compiles + options = {}) { + let callback; + if (typeof options === 'function') { + callback = options; + options = {}; + } + else if ('callback' in options) { + callback = options.callback; + } + // Allow subclasses to massage the input prior to running + const oldString = this.castInput(oldStr, options); + const newString = this.castInput(newStr, options); + const oldTokens = this.removeEmpty(this.tokenize(oldString, options)); + const newTokens = this.removeEmpty(this.tokenize(newString, options)); + return this.diffWithOptionsObj(oldTokens, newTokens, options, callback); + } + diffWithOptionsObj(oldTokens, newTokens, options, callback) { + var _a; + const done = (value) => { + value = this.postProcess(value, options); + if (callback) { + setTimeout(function () { callback(value); }, 0); + return undefined; + } + else { + return value; + } + }; + const newLen = newTokens.length, oldLen = oldTokens.length; + let editLength = 1; + let maxEditLength = newLen + oldLen; + if (options.maxEditLength != null) { + maxEditLength = Math.min(maxEditLength, options.maxEditLength); + } + const maxExecutionTime = (_a = options.timeout) !== null && _a !== void 0 ? _a : Infinity; + const abortAfterTimestamp = Date.now() + maxExecutionTime; + const bestPath = [{ oldPos: -1, lastComponent: undefined }]; + // Seed editLength = 0, i.e. the content starts with the same values + let newPos = this.extractCommon(bestPath[0], newTokens, oldTokens, 0, options); + if (bestPath[0].oldPos + 1 >= oldLen && newPos + 1 >= newLen) { + // Identity per the equality and tokenizer + return done(this.buildValues(bestPath[0].lastComponent, newTokens, oldTokens)); + } + // Once we hit the right edge of the edit graph on some diagonal k, we can + // definitely reach the end of the edit graph in no more than k edits, so + // there's no point in considering any moves to diagonal k+1 any more (from + // which we're guaranteed to need at least k+1 more edits). + // Similarly, once we've reached the bottom of the edit graph, there's no + // point considering moves to lower diagonals. + // We record this fact by setting minDiagonalToConsider and + // maxDiagonalToConsider to some finite value once we've hit the edge of + // the edit graph. + // This optimization is not faithful to the original algorithm presented in + // Myers's paper, which instead pointlessly extends D-paths off the end of + // the edit graph - see page 7 of Myers's paper which notes this point + // explicitly and illustrates it with a diagram. This has major performance + // implications for some common scenarios. For instance, to compute a diff + // where the new text simply appends d characters on the end of the + // original text of length n, the true Myers algorithm will take O(n+d^2) + // time while this optimization needs only O(n+d) time. + let minDiagonalToConsider = -Infinity, maxDiagonalToConsider = Infinity; + // Main worker method. checks all permutations of a given edit length for acceptance. + const execEditLength = () => { + for (let diagonalPath = Math.max(minDiagonalToConsider, -editLength); diagonalPath <= Math.min(maxDiagonalToConsider, editLength); diagonalPath += 2) { + let basePath; + const removePath = bestPath[diagonalPath - 1], addPath = bestPath[diagonalPath + 1]; + if (removePath) { + // No one else is going to attempt to use this value, clear it + // @ts-expect-error - perf optimisation. This type-violating value will never be read. + bestPath[diagonalPath - 1] = undefined; + } + let canAdd = false; + if (addPath) { + // what newPos will be after we do an insertion: + const addPathNewPos = addPath.oldPos - diagonalPath; + canAdd = addPath && 0 <= addPathNewPos && addPathNewPos < newLen; + } + const canRemove = removePath && removePath.oldPos + 1 < oldLen; + if (!canAdd && !canRemove) { + // If this path is a terminal then prune + // @ts-expect-error - perf optimisation. This type-violating value will never be read. + bestPath[diagonalPath] = undefined; + continue; + } + // Select the diagonal that we want to branch from. We select the prior + // path whose position in the old string is the farthest from the origin + // and does not pass the bounds of the diff graph + if (!canRemove || (canAdd && removePath.oldPos < addPath.oldPos)) { + basePath = this.addToPath(addPath, true, false, 0, options); + } + else { + basePath = this.addToPath(removePath, false, true, 1, options); + } + newPos = this.extractCommon(basePath, newTokens, oldTokens, diagonalPath, options); + if (basePath.oldPos + 1 >= oldLen && newPos + 1 >= newLen) { + // If we have hit the end of both strings, then we are done + return done(this.buildValues(basePath.lastComponent, newTokens, oldTokens)) || true; + } + else { + bestPath[diagonalPath] = basePath; + if (basePath.oldPos + 1 >= oldLen) { + maxDiagonalToConsider = Math.min(maxDiagonalToConsider, diagonalPath - 1); + } + if (newPos + 1 >= newLen) { + minDiagonalToConsider = Math.max(minDiagonalToConsider, diagonalPath + 1); + } + } + } + editLength++; + }; + // Performs the length of edit iteration. Is a bit fugly as this has to support the + // sync and async mode which is never fun. Loops over execEditLength until a value + // is produced, or until the edit length exceeds options.maxEditLength (if given), + // in which case it will return undefined. + if (callback) { + (function exec() { + setTimeout(function () { + if (editLength > maxEditLength || Date.now() > abortAfterTimestamp) { + return callback(undefined); + } + if (!execEditLength()) { + exec(); + } + }, 0); + }()); + } + else { + while (editLength <= maxEditLength && Date.now() <= abortAfterTimestamp) { + const ret = execEditLength(); + if (ret) { + return ret; + } + } + } + } + addToPath(path, added, removed, oldPosInc, options) { + const last = path.lastComponent; + if (last && !options.oneChangePerToken && last.added === added && last.removed === removed) { + return { + oldPos: path.oldPos + oldPosInc, + lastComponent: { count: last.count + 1, added: added, removed: removed, previousComponent: last.previousComponent } + }; + } + else { + return { + oldPos: path.oldPos + oldPosInc, + lastComponent: { count: 1, added: added, removed: removed, previousComponent: last } + }; + } + } + extractCommon(basePath, newTokens, oldTokens, diagonalPath, options) { + const newLen = newTokens.length, oldLen = oldTokens.length; + let oldPos = basePath.oldPos, newPos = oldPos - diagonalPath, commonCount = 0; + while (newPos + 1 < newLen && oldPos + 1 < oldLen && this.equals(oldTokens[oldPos + 1], newTokens[newPos + 1], options)) { + newPos++; + oldPos++; + commonCount++; + if (options.oneChangePerToken) { + basePath.lastComponent = { count: 1, previousComponent: basePath.lastComponent, added: false, removed: false }; + } + } + if (commonCount && !options.oneChangePerToken) { + basePath.lastComponent = { count: commonCount, previousComponent: basePath.lastComponent, added: false, removed: false }; + } + basePath.oldPos = oldPos; + return newPos; + } + equals(left, right, options) { + if (options.comparator) { + return options.comparator(left, right); + } + else { + return left === right + || (!!options.ignoreCase && left.toLowerCase() === right.toLowerCase()); + } + } + removeEmpty(array) { + const ret = []; + for (let i = 0; i < array.length; i++) { + if (array[i]) { + ret.push(array[i]); + } + } + return ret; + } + // eslint-disable-next-line @typescript-eslint/no-unused-vars + castInput(value, options) { + return value; + } + // eslint-disable-next-line @typescript-eslint/no-unused-vars + tokenize(value, options) { + return Array.from(value); + } + join(chars) { + // Assumes ValueT is string, which is the case for most subclasses. + // When it's false, e.g. in diffArrays, this method needs to be overridden (e.g. with a no-op) + // Yes, the casts are verbose and ugly, because this pattern - of having the base class SORT OF + // assume tokens and values are strings, but not completely - is weird and janky. + return chars.join(''); + } + postProcess(changeObjects, + // eslint-disable-next-line @typescript-eslint/no-unused-vars + options) { + return changeObjects; + } + get useLongestToken() { + return false; + } + buildValues(lastComponent, newTokens, oldTokens) { + // First we convert our linked list of components in reverse order to an + // array in the right order: + const components = []; + let nextComponent; + while (lastComponent) { + components.push(lastComponent); + nextComponent = lastComponent.previousComponent; + delete lastComponent.previousComponent; + lastComponent = nextComponent; + } + components.reverse(); + const componentLen = components.length; + let componentPos = 0, newPos = 0, oldPos = 0; + for (; componentPos < componentLen; componentPos++) { + const component = components[componentPos]; + if (!component.removed) { + if (!component.added && this.useLongestToken) { + let value = newTokens.slice(newPos, newPos + component.count); + value = value.map(function (value, i) { + const oldValue = oldTokens[oldPos + i]; + return oldValue.length > value.length ? oldValue : value; + }); + component.value = this.join(value); + } + else { + component.value = this.join(newTokens.slice(newPos, newPos + component.count)); + } + newPos += component.count; + // Common case + if (!component.added) { + oldPos += component.count; + } + } + else { + component.value = this.join(oldTokens.slice(oldPos, oldPos + component.count)); + oldPos += component.count; + } + } + return components; + } +} diff --git a/node_modules/mocha/node_modules/diff/libesm/diff/character.d.ts b/node_modules/mocha/node_modules/diff/libesm/diff/character.d.ts new file mode 100644 index 00000000..4f4c2cd7 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libesm/diff/character.d.ts @@ -0,0 +1,19 @@ +import Diff from './base.js'; +import type { ChangeObject, CallbackOptionAbortable, CallbackOptionNonabortable, DiffCallbackNonabortable, DiffCharsOptionsAbortable, DiffCharsOptionsNonabortable } from '../types.js'; +declare class CharacterDiff extends Diff { +} +export declare const characterDiff: CharacterDiff; +/** + * diffs two blocks of text, treating each character as a token. + * + * ("Characters" here means Unicode code points - the elements you get when you loop over a string with a `for ... of ...` loop.) + * + * @returns a list of change objects. + */ +export declare function diffChars(oldStr: string, newStr: string, options: DiffCallbackNonabortable): undefined; +export declare function diffChars(oldStr: string, newStr: string, options: DiffCharsOptionsAbortable & CallbackOptionAbortable): undefined; +export declare function diffChars(oldStr: string, newStr: string, options: DiffCharsOptionsNonabortable & CallbackOptionNonabortable): undefined; +export declare function diffChars(oldStr: string, newStr: string, options: DiffCharsOptionsAbortable): ChangeObject[] | undefined; +export declare function diffChars(oldStr: string, newStr: string, options?: DiffCharsOptionsNonabortable): ChangeObject[]; +export {}; +//# sourceMappingURL=character.d.ts.map \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libesm/diff/character.d.ts.map b/node_modules/mocha/node_modules/diff/libesm/diff/character.d.ts.map new file mode 100644 index 00000000..43b21c42 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libesm/diff/character.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"character.d.ts","sourceRoot":"","sources":["../../src/diff/character.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,KAAK,EAAE,YAAY,EAAE,uBAAuB,EAAE,0BAA0B,EAAE,wBAAwB,EAAE,yBAAyB,EAAE,4BAA4B,EAAC,MAAM,aAAa,CAAC;AAEvL,cAAM,aAAc,SAAQ,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC;CAAG;AAEnD,eAAO,MAAM,aAAa,eAAsB,CAAC;AAEjD;;;;;;GAMG;AACH,wBAAgB,SAAS,CACvB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,wBAAwB,CAAC,MAAM,CAAC,GACxC,SAAS,CAAC;AACb,wBAAgB,SAAS,CACvB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,yBAAyB,GAAG,uBAAuB,CAAC,MAAM,CAAC,GACnE,SAAS,CAAA;AACZ,wBAAgB,SAAS,CACvB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,4BAA4B,GAAG,0BAA0B,CAAC,MAAM,CAAC,GACzE,SAAS,CAAA;AACZ,wBAAgB,SAAS,CACvB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,yBAAyB,GACjC,YAAY,CAAC,MAAM,CAAC,EAAE,GAAG,SAAS,CAAA;AACrC,wBAAgB,SAAS,CACvB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,4BAA4B,GACrC,YAAY,CAAC,MAAM,CAAC,EAAE,CAAA"} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libesm/diff/character.js b/node_modules/mocha/node_modules/diff/libesm/diff/character.js new file mode 100644 index 00000000..ca70d065 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libesm/diff/character.js @@ -0,0 +1,7 @@ +import Diff from './base.js'; +class CharacterDiff extends Diff { +} +export const characterDiff = new CharacterDiff(); +export function diffChars(oldStr, newStr, options) { + return characterDiff.diff(oldStr, newStr, options); +} diff --git a/node_modules/mocha/node_modules/diff/libesm/diff/css.d.ts b/node_modules/mocha/node_modules/diff/libesm/diff/css.d.ts new file mode 100644 index 00000000..2c16ed44 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libesm/diff/css.d.ts @@ -0,0 +1,18 @@ +import Diff from './base.js'; +import type { ChangeObject, CallbackOptionAbortable, CallbackOptionNonabortable, DiffCallbackNonabortable, DiffCssOptionsAbortable, DiffCssOptionsNonabortable } from '../types.js'; +declare class CssDiff extends Diff { + tokenize(value: string): string[]; +} +export declare const cssDiff: CssDiff; +/** + * diffs two blocks of text, comparing CSS tokens. + * + * @returns a list of change objects. + */ +export declare function diffCss(oldStr: string, newStr: string, options: DiffCallbackNonabortable): undefined; +export declare function diffCss(oldStr: string, newStr: string, options: DiffCssOptionsAbortable & CallbackOptionAbortable): undefined; +export declare function diffCss(oldStr: string, newStr: string, options: DiffCssOptionsNonabortable & CallbackOptionNonabortable): undefined; +export declare function diffCss(oldStr: string, newStr: string, options: DiffCssOptionsAbortable): ChangeObject[] | undefined; +export declare function diffCss(oldStr: string, newStr: string, options?: DiffCssOptionsNonabortable): ChangeObject[]; +export {}; +//# sourceMappingURL=css.d.ts.map \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libesm/diff/css.d.ts.map b/node_modules/mocha/node_modules/diff/libesm/diff/css.d.ts.map new file mode 100644 index 00000000..58e71667 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libesm/diff/css.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"css.d.ts","sourceRoot":"","sources":["../../src/diff/css.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,KAAK,EAAE,YAAY,EAAE,uBAAuB,EAAE,0BAA0B,EAAE,wBAAwB,EAAE,uBAAuB,EAAE,0BAA0B,EAAC,MAAM,aAAa,CAAC;AAEnL,cAAM,OAAQ,SAAQ,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC;IACxC,QAAQ,CAAC,KAAK,EAAE,MAAM;CAGvB;AAED,eAAO,MAAM,OAAO,SAAgB,CAAC;AAErC;;;;GAIG;AACH,wBAAgB,OAAO,CACrB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,wBAAwB,CAAC,MAAM,CAAC,GACxC,SAAS,CAAC;AACb,wBAAgB,OAAO,CACrB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,uBAAuB,GAAG,uBAAuB,CAAC,MAAM,CAAC,GACjE,SAAS,CAAA;AACZ,wBAAgB,OAAO,CACrB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,0BAA0B,GAAG,0BAA0B,CAAC,MAAM,CAAC,GACvE,SAAS,CAAA;AACZ,wBAAgB,OAAO,CACrB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,uBAAuB,GAC/B,YAAY,CAAC,MAAM,CAAC,EAAE,GAAG,SAAS,CAAA;AACrC,wBAAgB,OAAO,CACrB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,0BAA0B,GACnC,YAAY,CAAC,MAAM,CAAC,EAAE,CAAA"} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libesm/diff/css.js b/node_modules/mocha/node_modules/diff/libesm/diff/css.js new file mode 100644 index 00000000..2e7adcc3 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libesm/diff/css.js @@ -0,0 +1,10 @@ +import Diff from './base.js'; +class CssDiff extends Diff { + tokenize(value) { + return value.split(/([{}:;,]|\s+)/); + } +} +export const cssDiff = new CssDiff(); +export function diffCss(oldStr, newStr, options) { + return cssDiff.diff(oldStr, newStr, options); +} diff --git a/node_modules/mocha/node_modules/diff/libesm/diff/json.d.ts b/node_modules/mocha/node_modules/diff/libesm/diff/json.d.ts new file mode 100644 index 00000000..0747a455 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libesm/diff/json.d.ts @@ -0,0 +1,24 @@ +import Diff from './base.js'; +import type { ChangeObject, CallbackOptionAbortable, CallbackOptionNonabortable, DiffCallbackNonabortable, DiffJsonOptionsAbortable, DiffJsonOptionsNonabortable } from '../types.js'; +import { tokenize } from './line.js'; +declare class JsonDiff extends Diff { + get useLongestToken(): boolean; + tokenize: typeof tokenize; + castInput(value: string | object, options: DiffJsonOptionsNonabortable | DiffJsonOptionsAbortable): string; + equals(left: string, right: string, options: DiffJsonOptionsNonabortable | DiffJsonOptionsAbortable): boolean; +} +export declare const jsonDiff: JsonDiff; +/** + * diffs two JSON-serializable objects by first serializing them to prettily-formatted JSON and then treating each line of the JSON as a token. + * Object properties are ordered alphabetically in the serialized JSON, so the order of properties in the objects being compared doesn't affect the result. + * + * @returns a list of change objects. + */ +export declare function diffJson(oldStr: string | object, newStr: string | object, options: DiffCallbackNonabortable): undefined; +export declare function diffJson(oldStr: string | object, newStr: string | object, options: DiffJsonOptionsAbortable & CallbackOptionAbortable): undefined; +export declare function diffJson(oldStr: string | object, newStr: string | object, options: DiffJsonOptionsNonabortable & CallbackOptionNonabortable): undefined; +export declare function diffJson(oldStr: string | object, newStr: string | object, options: DiffJsonOptionsAbortable): ChangeObject[] | undefined; +export declare function diffJson(oldStr: string | object, newStr: string | object, options?: DiffJsonOptionsNonabortable): ChangeObject[]; +export declare function canonicalize(obj: any, stack: Array | null, replacementStack: Array | null, replacer: (k: string, v: any) => any, key?: string): any; +export {}; +//# sourceMappingURL=json.d.ts.map \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libesm/diff/json.d.ts.map b/node_modules/mocha/node_modules/diff/libesm/diff/json.d.ts.map new file mode 100644 index 00000000..5dacfcf8 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libesm/diff/json.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"json.d.ts","sourceRoot":"","sources":["../../src/diff/json.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,KAAK,EAAE,YAAY,EAAE,uBAAuB,EAAE,0BAA0B,EAAE,wBAAwB,EAAE,wBAAwB,EAAE,2BAA2B,EAAC,MAAM,aAAa,CAAC;AACrL,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAErC,cAAM,QAAS,SAAQ,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IAC1D,IAAI,eAAe,YAIlB;IAED,QAAQ,kBAAY;IAEpB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,OAAO,EAAE,2BAA2B,GAAG,wBAAwB;IAMjG,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,2BAA2B,GAAG,wBAAwB;CAGpG;AAED,eAAO,MAAM,QAAQ,UAAiB,CAAC;AAEvC;;;;;GAKG;AACH,wBAAgB,QAAQ,CACtB,MAAM,EAAE,MAAM,GAAG,MAAM,EACvB,MAAM,EAAE,MAAM,GAAG,MAAM,EACvB,OAAO,EAAE,wBAAwB,CAAC,MAAM,CAAC,GACxC,SAAS,CAAC;AACb,wBAAgB,QAAQ,CACtB,MAAM,EAAE,MAAM,GAAG,MAAM,EACvB,MAAM,EAAE,MAAM,GAAG,MAAM,EACvB,OAAO,EAAE,wBAAwB,GAAG,uBAAuB,CAAC,MAAM,CAAC,GAClE,SAAS,CAAA;AACZ,wBAAgB,QAAQ,CACtB,MAAM,EAAE,MAAM,GAAG,MAAM,EACvB,MAAM,EAAE,MAAM,GAAG,MAAM,EACvB,OAAO,EAAE,2BAA2B,GAAG,0BAA0B,CAAC,MAAM,CAAC,GACxE,SAAS,CAAA;AACZ,wBAAgB,QAAQ,CACtB,MAAM,EAAE,MAAM,GAAG,MAAM,EACvB,MAAM,EAAE,MAAM,GAAG,MAAM,EACvB,OAAO,EAAE,wBAAwB,GAChC,YAAY,CAAC,MAAM,CAAC,EAAE,GAAG,SAAS,CAAA;AACrC,wBAAgB,QAAQ,CACtB,MAAM,EAAE,MAAM,GAAG,MAAM,EACvB,MAAM,EAAE,MAAM,GAAG,MAAM,EACvB,OAAO,CAAC,EAAE,2BAA2B,GACpC,YAAY,CAAC,MAAM,CAAC,EAAE,CAAA;AAQzB,wBAAgB,YAAY,CAC1B,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,IAAI,EAAE,gBAAgB,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,IAAI,EAC7D,QAAQ,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,GAAG,KAAK,GAAG,EACpC,GAAG,CAAC,EAAE,MAAM,OA0Db"} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libesm/diff/json.js b/node_modules/mocha/node_modules/diff/libesm/diff/json.js new file mode 100644 index 00000000..be9f7617 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libesm/diff/json.js @@ -0,0 +1,78 @@ +import Diff from './base.js'; +import { tokenize } from './line.js'; +class JsonDiff extends Diff { + constructor() { + super(...arguments); + this.tokenize = tokenize; + } + get useLongestToken() { + // Discriminate between two lines of pretty-printed, serialized JSON where one of them has a + // dangling comma and the other doesn't. Turns out including the dangling comma yields the nicest output: + return true; + } + castInput(value, options) { + const { undefinedReplacement, stringifyReplacer = (k, v) => typeof v === 'undefined' ? undefinedReplacement : v } = options; + return typeof value === 'string' ? value : JSON.stringify(canonicalize(value, null, null, stringifyReplacer), null, ' '); + } + equals(left, right, options) { + return super.equals(left.replace(/,([\r\n])/g, '$1'), right.replace(/,([\r\n])/g, '$1'), options); + } +} +export const jsonDiff = new JsonDiff(); +export function diffJson(oldStr, newStr, options) { + return jsonDiff.diff(oldStr, newStr, options); +} +// This function handles the presence of circular references by bailing out when encountering an +// object that is already on the "stack" of items being processed. Accepts an optional replacer +export function canonicalize(obj, stack, replacementStack, replacer, key) { + stack = stack || []; + replacementStack = replacementStack || []; + if (replacer) { + obj = replacer(key === undefined ? '' : key, obj); + } + let i; + for (i = 0; i < stack.length; i += 1) { + if (stack[i] === obj) { + return replacementStack[i]; + } + } + let canonicalizedObj; + if ('[object Array]' === Object.prototype.toString.call(obj)) { + stack.push(obj); + canonicalizedObj = new Array(obj.length); + replacementStack.push(canonicalizedObj); + for (i = 0; i < obj.length; i += 1) { + canonicalizedObj[i] = canonicalize(obj[i], stack, replacementStack, replacer, String(i)); + } + stack.pop(); + replacementStack.pop(); + return canonicalizedObj; + } + if (obj && obj.toJSON) { + obj = obj.toJSON(); + } + if (typeof obj === 'object' && obj !== null) { + stack.push(obj); + canonicalizedObj = {}; + replacementStack.push(canonicalizedObj); + const sortedKeys = []; + let key; + for (key in obj) { + /* istanbul ignore else */ + if (Object.prototype.hasOwnProperty.call(obj, key)) { + sortedKeys.push(key); + } + } + sortedKeys.sort(); + for (i = 0; i < sortedKeys.length; i += 1) { + key = sortedKeys[i]; + canonicalizedObj[key] = canonicalize(obj[key], stack, replacementStack, replacer, key); + } + stack.pop(); + replacementStack.pop(); + } + else { + canonicalizedObj = obj; + } + return canonicalizedObj; +} diff --git a/node_modules/mocha/node_modules/diff/libesm/diff/line.d.ts b/node_modules/mocha/node_modules/diff/libesm/diff/line.d.ts new file mode 100644 index 00000000..9a4b2768 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libesm/diff/line.d.ts @@ -0,0 +1,24 @@ +import Diff from './base.js'; +import type { ChangeObject, CallbackOptionAbortable, CallbackOptionNonabortable, DiffCallbackNonabortable, DiffLinesOptionsAbortable, DiffLinesOptionsNonabortable } from '../types.js'; +declare class LineDiff extends Diff { + tokenize: typeof tokenize; + equals(left: string, right: string, options: DiffLinesOptionsAbortable | DiffLinesOptionsNonabortable): boolean; +} +export declare const lineDiff: LineDiff; +/** + * diffs two blocks of text, treating each line as a token. + * @returns a list of change objects. + */ +export declare function diffLines(oldStr: string, newStr: string, options: DiffCallbackNonabortable): undefined; +export declare function diffLines(oldStr: string, newStr: string, options: DiffLinesOptionsAbortable & CallbackOptionAbortable): undefined; +export declare function diffLines(oldStr: string, newStr: string, options: DiffLinesOptionsNonabortable & CallbackOptionNonabortable): undefined; +export declare function diffLines(oldStr: string, newStr: string, options: DiffLinesOptionsAbortable): ChangeObject[] | undefined; +export declare function diffLines(oldStr: string, newStr: string, options?: DiffLinesOptionsNonabortable): ChangeObject[]; +export declare function diffTrimmedLines(oldStr: string, newStr: string, options: DiffCallbackNonabortable): undefined; +export declare function diffTrimmedLines(oldStr: string, newStr: string, options: DiffLinesOptionsAbortable & CallbackOptionAbortable): undefined; +export declare function diffTrimmedLines(oldStr: string, newStr: string, options: DiffLinesOptionsNonabortable & CallbackOptionNonabortable): undefined; +export declare function diffTrimmedLines(oldStr: string, newStr: string, options: DiffLinesOptionsAbortable): ChangeObject[] | undefined; +export declare function diffTrimmedLines(oldStr: string, newStr: string, options?: DiffLinesOptionsNonabortable): ChangeObject[]; +export declare function tokenize(value: string, options: DiffLinesOptionsAbortable | DiffLinesOptionsNonabortable): string[]; +export {}; +//# sourceMappingURL=line.d.ts.map \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libesm/diff/line.d.ts.map b/node_modules/mocha/node_modules/diff/libesm/diff/line.d.ts.map new file mode 100644 index 00000000..f5882bf6 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libesm/diff/line.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"line.d.ts","sourceRoot":"","sources":["../../src/diff/line.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,KAAK,EAAE,YAAY,EAAE,uBAAuB,EAAE,0BAA0B,EAAE,wBAAwB,EAAE,yBAAyB,EAAE,4BAA4B,EAAC,MAAM,aAAa,CAAC;AAGvL,cAAM,QAAS,SAAQ,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC;IACzC,QAAQ,kBAAY;IAEpB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,yBAAyB,GAAG,4BAA4B;CAyBtG;AAED,eAAO,MAAM,QAAQ,UAAiB,CAAC;AAEvC;;;GAGG;AACH,wBAAgB,SAAS,CACvB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,wBAAwB,CAAC,MAAM,CAAC,GACxC,SAAS,CAAC;AACb,wBAAgB,SAAS,CACvB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,yBAAyB,GAAG,uBAAuB,CAAC,MAAM,CAAC,GACnE,SAAS,CAAA;AACZ,wBAAgB,SAAS,CACvB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,4BAA4B,GAAG,0BAA0B,CAAC,MAAM,CAAC,GACzE,SAAS,CAAA;AACZ,wBAAgB,SAAS,CACvB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,yBAAyB,GACjC,YAAY,CAAC,MAAM,CAAC,EAAE,GAAG,SAAS,CAAA;AACrC,wBAAgB,SAAS,CACvB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,4BAA4B,GACrC,YAAY,CAAC,MAAM,CAAC,EAAE,CAAA;AAWzB,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,wBAAwB,CAAC,MAAM,CAAC,GACxC,SAAS,CAAC;AACb,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,yBAAyB,GAAG,uBAAuB,CAAC,MAAM,CAAC,GACnE,SAAS,CAAA;AACZ,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,4BAA4B,GAAG,0BAA0B,CAAC,MAAM,CAAC,GACzE,SAAS,CAAA;AACZ,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,yBAAyB,GACjC,YAAY,CAAC,MAAM,CAAC,EAAE,GAAG,SAAS,CAAA;AACrC,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,4BAA4B,GACrC,YAAY,CAAC,MAAM,CAAC,EAAE,CAAA;AAOzB,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,yBAAyB,GAAG,4BAA4B,YA0BxG"} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libesm/diff/line.js b/node_modules/mocha/node_modules/diff/libesm/diff/line.js new file mode 100644 index 00000000..0675d4fb --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libesm/diff/line.js @@ -0,0 +1,65 @@ +import Diff from './base.js'; +import { generateOptions } from '../util/params.js'; +class LineDiff extends Diff { + constructor() { + super(...arguments); + this.tokenize = tokenize; + } + equals(left, right, options) { + // If we're ignoring whitespace, we need to normalise lines by stripping + // whitespace before checking equality. (This has an annoying interaction + // with newlineIsToken that requires special handling: if newlines get their + // own token, then we DON'T want to trim the *newline* tokens down to empty + // strings, since this would cause us to treat whitespace-only line content + // as equal to a separator between lines, which would be weird and + // inconsistent with the documented behavior of the options.) + if (options.ignoreWhitespace) { + if (!options.newlineIsToken || !left.includes('\n')) { + left = left.trim(); + } + if (!options.newlineIsToken || !right.includes('\n')) { + right = right.trim(); + } + } + else if (options.ignoreNewlineAtEof && !options.newlineIsToken) { + if (left.endsWith('\n')) { + left = left.slice(0, -1); + } + if (right.endsWith('\n')) { + right = right.slice(0, -1); + } + } + return super.equals(left, right, options); + } +} +export const lineDiff = new LineDiff(); +export function diffLines(oldStr, newStr, options) { + return lineDiff.diff(oldStr, newStr, options); +} +export function diffTrimmedLines(oldStr, newStr, options) { + options = generateOptions(options, { ignoreWhitespace: true }); + return lineDiff.diff(oldStr, newStr, options); +} +// Exported standalone so it can be used from jsonDiff too. +export function tokenize(value, options) { + if (options.stripTrailingCr) { + // remove one \r before \n to match GNU diff's --strip-trailing-cr behavior + value = value.replace(/\r\n/g, '\n'); + } + const retLines = [], linesAndNewlines = value.split(/(\n|\r\n)/); + // Ignore the final empty token that occurs if the string ends with a new line + if (!linesAndNewlines[linesAndNewlines.length - 1]) { + linesAndNewlines.pop(); + } + // Merge the content and line separators into single tokens + for (let i = 0; i < linesAndNewlines.length; i++) { + const line = linesAndNewlines[i]; + if (i % 2 && !options.newlineIsToken) { + retLines[retLines.length - 1] += line; + } + else { + retLines.push(line); + } + } + return retLines; +} diff --git a/node_modules/mocha/node_modules/diff/libesm/diff/sentence.d.ts b/node_modules/mocha/node_modules/diff/libesm/diff/sentence.d.ts new file mode 100644 index 00000000..2e5e751b --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libesm/diff/sentence.d.ts @@ -0,0 +1,21 @@ +import Diff from './base.js'; +import type { ChangeObject, CallbackOptionAbortable, CallbackOptionNonabortable, DiffCallbackNonabortable, DiffSentencesOptionsAbortable, DiffSentencesOptionsNonabortable } from '../types.js'; +declare class SentenceDiff extends Diff { + tokenize(value: string): string[]; +} +export declare const sentenceDiff: SentenceDiff; +/** + * diffs two blocks of text, treating each sentence, and the whitespace between each pair of sentences, as a token. + * The characters `.`, `!`, and `?`, when followed by whitespace, are treated as marking the end of a sentence; nothing else besides the end of the string is considered to mark a sentence end. + * + * (For more sophisticated detection of sentence breaks, including support for non-English punctuation, consider instead tokenizing with an [`Intl.Segmenter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter) with `granularity: 'sentence'` and passing the result to `diffArrays`.) + * + * @returns a list of change objects. + */ +export declare function diffSentences(oldStr: string, newStr: string, options: DiffCallbackNonabortable): undefined; +export declare function diffSentences(oldStr: string, newStr: string, options: DiffSentencesOptionsAbortable & CallbackOptionAbortable): undefined; +export declare function diffSentences(oldStr: string, newStr: string, options: DiffSentencesOptionsNonabortable & CallbackOptionNonabortable): undefined; +export declare function diffSentences(oldStr: string, newStr: string, options: DiffSentencesOptionsAbortable): ChangeObject[] | undefined; +export declare function diffSentences(oldStr: string, newStr: string, options?: DiffSentencesOptionsNonabortable): ChangeObject[]; +export {}; +//# sourceMappingURL=sentence.d.ts.map \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libesm/diff/sentence.d.ts.map b/node_modules/mocha/node_modules/diff/libesm/diff/sentence.d.ts.map new file mode 100644 index 00000000..78231ed2 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libesm/diff/sentence.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"sentence.d.ts","sourceRoot":"","sources":["../../src/diff/sentence.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,KAAK,EACV,YAAY,EACZ,uBAAuB,EACvB,0BAA0B,EAC1B,wBAAwB,EACxB,6BAA6B,EAC7B,gCAAgC,EACjC,MAAM,aAAa,CAAC;AAMrB,cAAM,YAAa,SAAQ,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC;IAC7C,QAAQ,CAAC,KAAK,EAAE,MAAM;CAoCvB;AAED,eAAO,MAAM,YAAY,cAAqB,CAAC;AAE/C;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAC3B,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,wBAAwB,CAAC,MAAM,CAAC,GACxC,SAAS,CAAC;AACb,wBAAgB,aAAa,CAC3B,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,6BAA6B,GAAG,uBAAuB,CAAC,MAAM,CAAC,GACvE,SAAS,CAAA;AACZ,wBAAgB,aAAa,CAC3B,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,gCAAgC,GAAG,0BAA0B,CAAC,MAAM,CAAC,GAC7E,SAAS,CAAA;AACZ,wBAAgB,aAAa,CAC3B,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,6BAA6B,GACrC,YAAY,CAAC,MAAM,CAAC,EAAE,GAAG,SAAS,CAAA;AACrC,wBAAgB,aAAa,CAC3B,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,gCAAgC,GACzC,YAAY,CAAC,MAAM,CAAC,EAAE,CAAA"} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libesm/diff/sentence.js b/node_modules/mocha/node_modules/diff/libesm/diff/sentence.js new file mode 100644 index 00000000..db37010e --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libesm/diff/sentence.js @@ -0,0 +1,43 @@ +import Diff from './base.js'; +function isSentenceEndPunct(char) { + return char == '.' || char == '!' || char == '?'; +} +class SentenceDiff extends Diff { + tokenize(value) { + var _a; + // If in future we drop support for environments that don't support lookbehinds, we can replace + // this entire function with: + // return value.split(/(?<=[.!?])(\s+|$)/); + // but until then, for similar reasons to the trailingWs function in string.ts, we are forced + // to do this verbosely "by hand" instead of using a regex. + const result = []; + let tokenStartI = 0; + for (let i = 0; i < value.length; i++) { + if (i == value.length - 1) { + result.push(value.slice(tokenStartI)); + break; + } + if (isSentenceEndPunct(value[i]) && value[i + 1].match(/\s/)) { + // We've hit a sentence break - i.e. a punctuation mark followed by whitespace. + // We now want to push TWO tokens to the result: + // 1. the sentence + result.push(value.slice(tokenStartI, i + 1)); + // 2. the whitespace + i = tokenStartI = i + 1; + while ((_a = value[i + 1]) === null || _a === void 0 ? void 0 : _a.match(/\s/)) { + i++; + } + result.push(value.slice(tokenStartI, i + 1)); + // Then the next token (a sentence) starts on the character after the whitespace. + // (It's okay if this is off the end of the string - then the outer loop will terminate + // here anyway.) + tokenStartI = i + 1; + } + } + return result; + } +} +export const sentenceDiff = new SentenceDiff(); +export function diffSentences(oldStr, newStr, options) { + return sentenceDiff.diff(oldStr, newStr, options); +} diff --git a/node_modules/mocha/node_modules/diff/libesm/diff/word.d.ts b/node_modules/mocha/node_modules/diff/libesm/diff/word.d.ts new file mode 100644 index 00000000..166fae63 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libesm/diff/word.d.ts @@ -0,0 +1,35 @@ +import Diff from './base.js'; +import type { ChangeObject, CallbackOptionAbortable, CallbackOptionNonabortable, DiffCallbackNonabortable, DiffWordsOptionsAbortable, DiffWordsOptionsNonabortable } from '../types.js'; +declare class WordDiff extends Diff { + equals(left: string, right: string, options: DiffWordsOptionsAbortable | DiffWordsOptionsNonabortable): boolean; + tokenize(value: string, options?: DiffWordsOptionsAbortable | DiffWordsOptionsNonabortable): string[]; + join(tokens: string[]): string; + postProcess(changes: ChangeObject[], options: any): ChangeObject[]; +} +export declare const wordDiff: WordDiff; +/** + * diffs two blocks of text, treating each word and each punctuation mark as a token. + * Whitespace is ignored when computing the diff (but preserved as far as possible in the final change objects). + * + * @returns a list of change objects. + */ +export declare function diffWords(oldStr: string, newStr: string, options: DiffCallbackNonabortable): undefined; +export declare function diffWords(oldStr: string, newStr: string, options: DiffWordsOptionsAbortable & CallbackOptionAbortable): undefined; +export declare function diffWords(oldStr: string, newStr: string, options: DiffWordsOptionsNonabortable & CallbackOptionNonabortable): undefined; +export declare function diffWords(oldStr: string, newStr: string, options: DiffWordsOptionsAbortable): ChangeObject[] | undefined; +export declare function diffWords(oldStr: string, newStr: string, options?: DiffWordsOptionsNonabortable): ChangeObject[]; +declare class WordsWithSpaceDiff extends Diff { + tokenize(value: string): [] | RegExpMatchArray; +} +export declare const wordsWithSpaceDiff: WordsWithSpaceDiff; +/** + * diffs two blocks of text, treating each word, punctuation mark, newline, or run of (non-newline) whitespace as a token. + * @returns a list of change objects + */ +export declare function diffWordsWithSpace(oldStr: string, newStr: string, options: DiffCallbackNonabortable): undefined; +export declare function diffWordsWithSpace(oldStr: string, newStr: string, options: DiffWordsOptionsAbortable & CallbackOptionAbortable): undefined; +export declare function diffWordsWithSpace(oldStr: string, newStr: string, options: DiffWordsOptionsNonabortable & CallbackOptionNonabortable): undefined; +export declare function diffWordsWithSpace(oldStr: string, newStr: string, options: DiffWordsOptionsAbortable): ChangeObject[] | undefined; +export declare function diffWordsWithSpace(oldStr: string, newStr: string, options?: DiffWordsOptionsNonabortable): ChangeObject[]; +export {}; +//# sourceMappingURL=word.d.ts.map \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libesm/diff/word.d.ts.map b/node_modules/mocha/node_modules/diff/libesm/diff/word.d.ts.map new file mode 100644 index 00000000..ced53e87 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libesm/diff/word.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"word.d.ts","sourceRoot":"","sources":["../../src/diff/word.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,KAAK,EAAE,YAAY,EAAE,uBAAuB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,kBAAmB,SAAQ,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC;IACnD,QAAQ,CAAC,KAAK,EAAE,MAAM;CASvB;AAED,eAAO,MAAM,kBAAkB,oBAA2B,CAAC;AAE3D;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,wBAAwB,CAAC,MAAM,CAAC,GACxC,SAAS,CAAC;AACb,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,yBAAyB,GAAG,uBAAuB,CAAC,MAAM,CAAC,GACnE,SAAS,CAAA;AACZ,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,4BAA4B,GAAG,0BAA0B,CAAC,MAAM,CAAC,GACzE,SAAS,CAAA;AACZ,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,yBAAyB,GACjC,YAAY,CAAC,MAAM,CAAC,EAAE,GAAG,SAAS,CAAA;AACrC,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,4BAA4B,GACrC,YAAY,CAAC,MAAM,CAAC,EAAE,CAAA"} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libesm/diff/word.js b/node_modules/mocha/node_modules/diff/libesm/diff/word.js new file mode 100644 index 00000000..284231ef --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libesm/diff/word.js @@ -0,0 +1,281 @@ +import Diff from './base.js'; +import { longestCommonPrefix, longestCommonSuffix, replacePrefix, replaceSuffix, removePrefix, removeSuffix, maximumOverlap, leadingWs, trailingWs, leadingAndTrailingWs, segment } from '../util/string.js'; +// Based on https://en.wikipedia.org/wiki/Latin_script_in_Unicode +// +// Chars/ranges counted as "word" characters by this regex are as follows: +// +// + U+00AD Soft hyphen +// + 00C0–00FF (letters with diacritics from the Latin-1 Supplement), except: +// - U+00D7 × Multiplication sign +// - U+00F7 ÷ Division sign +// + Latin Extended-A, 0100–017F +// + Latin Extended-B, 0180–024F +// + IPA Extensions, 0250–02AF +// + Spacing Modifier Letters, 02B0–02FF, except: +// - U+02C7 ˇ ˇ Caron +// - U+02D8 ˘ ˘ Breve +// - U+02D9 ˙ ˙ Dot Above +// - U+02DA ˚ ˚ Ring Above +// - U+02DB ˛ ˛ Ogonek +// - U+02DC ˜ ˜ Small Tilde +// - U+02DD ˝ ˝ Double Acute Accent +// + Latin Extended Additional, 1E00–1EFF +const extendedWordChars = 'a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}'; +// Each token is one of the following: +// - A punctuation mark plus the surrounding whitespace +// - A word plus the surrounding whitespace +// - Pure whitespace (but only in the special case where the entire text +// is just whitespace) +// +// We have to include surrounding whitespace in the tokens because the two +// alternative approaches produce horribly broken results: +// * If we just discard the whitespace, we can't fully reproduce the original +// text from the sequence of tokens and any attempt to render the diff will +// get the whitespace wrong. +// * If we have separate tokens for whitespace, then in a typical text every +// second token will be a single space character. But this often results in +// the optimal diff between two texts being a perverse one that preserves +// the spaces between words but deletes and reinserts actual common words. +// See https://github.com/kpdecker/jsdiff/issues/160#issuecomment-1866099640 +// for an example. +// +// Keeping the surrounding whitespace of course has implications for .equals +// and .join, not just .tokenize. +// This regex does NOT fully implement the tokenization rules described above. +// Instead, it gives runs of whitespace their own "token". The tokenize method +// then handles stitching whitespace tokens onto adjacent word or punctuation +// tokens. +const tokenizeIncludingWhitespace = new RegExp(`[${extendedWordChars}]+|\\s+|[^${extendedWordChars}]`, 'ug'); +class WordDiff extends Diff { + equals(left, right, options) { + if (options.ignoreCase) { + left = left.toLowerCase(); + right = right.toLowerCase(); + } + return left.trim() === right.trim(); + } + tokenize(value, options = {}) { + let parts; + if (options.intlSegmenter) { + const segmenter = options.intlSegmenter; + if (segmenter.resolvedOptions().granularity != 'word') { + throw new Error('The segmenter passed must have a granularity of "word"'); + } + // We want `parts` to be an array whose elements alternate between being + // pure whitespace and being pure non-whitespace. This is ALMOST what the + // segments returned by a word-based Intl.Segmenter already look like, + // but not quite - see explanation in the docs of our custom segment() + // function. + parts = segment(value, segmenter); + } + else { + parts = value.match(tokenizeIncludingWhitespace) || []; + } + const tokens = []; + let prevPart = null; + parts.forEach(part => { + if ((/\s/).test(part)) { + if (prevPart == null) { + tokens.push(part); + } + else { + tokens.push(tokens.pop() + part); + } + } + else if (prevPart != null && (/\s/).test(prevPart)) { + if (tokens[tokens.length - 1] == prevPart) { + tokens.push(tokens.pop() + part); + } + else { + tokens.push(prevPart + part); + } + } + else { + tokens.push(part); + } + prevPart = part; + }); + return tokens; + } + join(tokens) { + // Tokens being joined here will always have appeared consecutively in the + // same text, so we can simply strip off the leading whitespace from all the + // tokens except the first (and except any whitespace-only tokens - but such + // a token will always be the first and only token anyway) and then join them + // and the whitespace around words and punctuation will end up correct. + return tokens.map((token, i) => { + if (i == 0) { + return token; + } + else { + return token.replace((/^\s+/), ''); + } + }).join(''); + } + postProcess(changes, options) { + if (!changes || options.oneChangePerToken) { + return changes; + } + let lastKeep = null; + // Change objects representing any insertion or deletion since the last + // "keep" change object. There can be at most one of each. + let insertion = null; + let deletion = null; + changes.forEach(change => { + if (change.added) { + insertion = change; + } + else if (change.removed) { + deletion = change; + } + else { + if (insertion || deletion) { // May be false at start of text + dedupeWhitespaceInChangeObjects(lastKeep, deletion, insertion, change, options.intlSegmenter); + } + lastKeep = change; + insertion = null; + deletion = null; + } + }); + if (insertion || deletion) { + dedupeWhitespaceInChangeObjects(lastKeep, deletion, insertion, null, options.intlSegmenter); + } + return changes; + } +} +export const wordDiff = new WordDiff(); +export function diffWords(oldStr, newStr, options) { + // This option has never been documented and never will be (it's clearer to + // just call `diffWordsWithSpace` directly if you need that behavior), but + // has existed in jsdiff for a long time, so we retain support for it here + // for the sake of backwards compatibility. + if ((options === null || options === void 0 ? void 0 : options.ignoreWhitespace) != null && !options.ignoreWhitespace) { + return diffWordsWithSpace(oldStr, newStr, options); + } + return wordDiff.diff(oldStr, newStr, options); +} +function dedupeWhitespaceInChangeObjects(startKeep, deletion, insertion, endKeep, segmenter) { + // Before returning, we tidy up the leading and trailing whitespace of the + // change objects to eliminate cases where trailing whitespace in one object + // is repeated as leading whitespace in the next. + // Below are examples of the outcomes we want here to explain the code. + // I=insert, K=keep, D=delete + // 1. diffing 'foo bar baz' vs 'foo baz' + // Prior to cleanup, we have K:'foo ' D:' bar ' K:' baz' + // After cleanup, we want: K:'foo ' D:'bar ' K:'baz' + // + // 2. Diffing 'foo bar baz' vs 'foo qux baz' + // Prior to cleanup, we have K:'foo ' D:' bar ' I:' qux ' K:' baz' + // After cleanup, we want K:'foo ' D:'bar' I:'qux' K:' baz' + // + // 3. Diffing 'foo\nbar baz' vs 'foo baz' + // Prior to cleanup, we have K:'foo ' D:'\nbar ' K:' baz' + // After cleanup, we want K'foo' D:'\nbar' K:' baz' + // + // 4. Diffing 'foo baz' vs 'foo\nbar baz' + // Prior to cleanup, we have K:'foo\n' I:'\nbar ' K:' baz' + // After cleanup, we ideally want K'foo' I:'\nbar' K:' baz' + // but don't actually manage this currently (the pre-cleanup change + // objects don't contain enough information to make it possible). + // + // 5. Diffing 'foo bar baz' vs 'foo baz' + // Prior to cleanup, we have K:'foo ' D:' bar ' K:' baz' + // After cleanup, we want K:'foo ' D:' bar ' K:'baz' + // + // Our handling is unavoidably imperfect in the case where there's a single + // indel between keeps and the whitespace has changed. For instance, consider + // diffing 'foo\tbar\nbaz' vs 'foo baz'. Unless we create an extra change + // object to represent the insertion of the space character (which isn't even + // a token), we have no way to avoid losing information about the texts' + // original whitespace in the result we return. Still, we do our best to + // output something that will look sensible if we e.g. print it with + // insertions in green and deletions in red. + // Between two "keep" change objects (or before the first or after the last + // change object), we can have either: + // * A "delete" followed by an "insert" + // * Just an "insert" + // * Just a "delete" + // We handle the three cases separately. + if (deletion && insertion) { + const [oldWsPrefix, oldWsSuffix] = leadingAndTrailingWs(deletion.value, segmenter); + const [newWsPrefix, newWsSuffix] = leadingAndTrailingWs(insertion.value, segmenter); + if (startKeep) { + const commonWsPrefix = longestCommonPrefix(oldWsPrefix, newWsPrefix); + startKeep.value = replaceSuffix(startKeep.value, newWsPrefix, commonWsPrefix); + deletion.value = removePrefix(deletion.value, commonWsPrefix); + insertion.value = removePrefix(insertion.value, commonWsPrefix); + } + if (endKeep) { + const commonWsSuffix = longestCommonSuffix(oldWsSuffix, newWsSuffix); + endKeep.value = replacePrefix(endKeep.value, newWsSuffix, commonWsSuffix); + deletion.value = removeSuffix(deletion.value, commonWsSuffix); + insertion.value = removeSuffix(insertion.value, commonWsSuffix); + } + } + else if (insertion) { + // The whitespaces all reflect what was in the new text rather than + // the old, so we essentially have no information about whitespace + // insertion or deletion. We just want to dedupe the whitespace. + // We do that by having each change object keep its trailing + // whitespace and deleting duplicate leading whitespace where + // present. + if (startKeep) { + const ws = leadingWs(insertion.value, segmenter); + insertion.value = insertion.value.substring(ws.length); + } + if (endKeep) { + const ws = leadingWs(endKeep.value, segmenter); + endKeep.value = endKeep.value.substring(ws.length); + } + // otherwise we've got a deletion and no insertion + } + else if (startKeep && endKeep) { + const newWsFull = leadingWs(endKeep.value, segmenter), [delWsStart, delWsEnd] = leadingAndTrailingWs(deletion.value, segmenter); + // Any whitespace that comes straight after startKeep in both the old and + // new texts, assign to startKeep and remove from the deletion. + const newWsStart = longestCommonPrefix(newWsFull, delWsStart); + deletion.value = removePrefix(deletion.value, newWsStart); + // Any whitespace that comes straight before endKeep in both the old and + // new texts, and hasn't already been assigned to startKeep, assign to + // endKeep and remove from the deletion. + const newWsEnd = longestCommonSuffix(removePrefix(newWsFull, newWsStart), delWsEnd); + deletion.value = removeSuffix(deletion.value, newWsEnd); + endKeep.value = replacePrefix(endKeep.value, newWsFull, newWsEnd); + // If there's any whitespace from the new text that HASN'T already been + // assigned, assign it to the start: + startKeep.value = replaceSuffix(startKeep.value, newWsFull, newWsFull.slice(0, newWsFull.length - newWsEnd.length)); + } + else if (endKeep) { + // We are at the start of the text. Preserve all the whitespace on + // endKeep, and just remove whitespace from the end of deletion to the + // extent that it overlaps with the start of endKeep. + const endKeepWsPrefix = leadingWs(endKeep.value, segmenter); + const deletionWsSuffix = trailingWs(deletion.value, segmenter); + const overlap = maximumOverlap(deletionWsSuffix, endKeepWsPrefix); + deletion.value = removeSuffix(deletion.value, overlap); + } + else if (startKeep) { + // We are at the END of the text. Preserve all the whitespace on + // startKeep, and just remove whitespace from the start of deletion to + // the extent that it overlaps with the end of startKeep. + const startKeepWsSuffix = trailingWs(startKeep.value, segmenter); + const deletionWsPrefix = leadingWs(deletion.value, segmenter); + const overlap = maximumOverlap(startKeepWsSuffix, deletionWsPrefix); + deletion.value = removePrefix(deletion.value, overlap); + } +} +class WordsWithSpaceDiff extends Diff { + tokenize(value) { + // Slightly different to the tokenizeIncludingWhitespace regex used above in + // that this one treats each individual newline as a distinct token, rather + // than merging them into other surrounding whitespace. This was requested + // in https://github.com/kpdecker/jsdiff/issues/180 & + // https://github.com/kpdecker/jsdiff/issues/211 + const regex = new RegExp(`(\\r?\\n)|[${extendedWordChars}]+|[^\\S\\n\\r]+|[^${extendedWordChars}]`, 'ug'); + return value.match(regex) || []; + } +} +export const wordsWithSpaceDiff = new WordsWithSpaceDiff(); +export function diffWordsWithSpace(oldStr, newStr, options) { + return wordsWithSpaceDiff.diff(oldStr, newStr, options); +} diff --git a/node_modules/mocha/node_modules/diff/libesm/index.d.ts b/node_modules/mocha/node_modules/diff/libesm/index.d.ts new file mode 100644 index 00000000..96dc8d1a --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libesm/index.d.ts @@ -0,0 +1,20 @@ +import Diff from './diff/base.js'; +import { diffChars, characterDiff } from './diff/character.js'; +import { diffWords, diffWordsWithSpace, wordDiff, wordsWithSpaceDiff } from './diff/word.js'; +import { diffLines, diffTrimmedLines, lineDiff } from './diff/line.js'; +import { diffSentences, sentenceDiff } from './diff/sentence.js'; +import { diffCss, cssDiff } from './diff/css.js'; +import { diffJson, canonicalize, jsonDiff } from './diff/json.js'; +import { diffArrays, arrayDiff } from './diff/array.js'; +import { applyPatch, applyPatches } from './patch/apply.js'; +import type { ApplyPatchOptions, ApplyPatchesOptions } from './patch/apply.js'; +import { parsePatch } from './patch/parse.js'; +import { reversePatch } from './patch/reverse.js'; +import { structuredPatch, createTwoFilesPatch, createPatch, formatPatch, INCLUDE_HEADERS, FILE_HEADERS_ONLY, OMIT_HEADERS } from './patch/create.js'; +import type { StructuredPatchOptionsAbortable, StructuredPatchOptionsNonabortable, CreatePatchOptionsAbortable, CreatePatchOptionsNonabortable, HeaderOptions } from './patch/create.js'; +import { convertChangesToDMP } from './convert/dmp.js'; +import { convertChangesToXML } from './convert/xml.js'; +import type { ChangeObject, Change, ArrayChange, DiffArraysOptionsAbortable, DiffArraysOptionsNonabortable, DiffCharsOptionsAbortable, DiffCharsOptionsNonabortable, DiffLinesOptionsAbortable, DiffLinesOptionsNonabortable, DiffWordsOptionsAbortable, DiffWordsOptionsNonabortable, DiffSentencesOptionsAbortable, DiffSentencesOptionsNonabortable, DiffJsonOptionsAbortable, DiffJsonOptionsNonabortable, DiffCssOptionsAbortable, DiffCssOptionsNonabortable, StructuredPatch, StructuredPatchHunk } from './types.js'; +export { Diff, diffChars, characterDiff, diffWords, wordDiff, diffWordsWithSpace, wordsWithSpaceDiff, diffLines, lineDiff, diffTrimmedLines, diffSentences, sentenceDiff, diffCss, cssDiff, diffJson, jsonDiff, diffArrays, arrayDiff, structuredPatch, createTwoFilesPatch, createPatch, formatPatch, INCLUDE_HEADERS, FILE_HEADERS_ONLY, OMIT_HEADERS, applyPatch, applyPatches, parsePatch, reversePatch, convertChangesToDMP, convertChangesToXML, canonicalize }; +export type { ChangeObject, Change, ArrayChange, DiffArraysOptionsAbortable, DiffArraysOptionsNonabortable, DiffCharsOptionsAbortable, DiffCharsOptionsNonabortable, DiffLinesOptionsAbortable, DiffLinesOptionsNonabortable, DiffWordsOptionsAbortable, DiffWordsOptionsNonabortable, DiffSentencesOptionsAbortable, DiffSentencesOptionsNonabortable, DiffJsonOptionsAbortable, DiffJsonOptionsNonabortable, DiffCssOptionsAbortable, DiffCssOptionsNonabortable, StructuredPatch, StructuredPatchHunk, ApplyPatchOptions, ApplyPatchesOptions, StructuredPatchOptionsAbortable, StructuredPatchOptionsNonabortable, CreatePatchOptionsAbortable, CreatePatchOptionsNonabortable, HeaderOptions }; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libesm/index.d.ts.map b/node_modules/mocha/node_modules/diff/libesm/index.d.ts.map new file mode 100644 index 00000000..4a14d504 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libesm/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAgBA,OAAO,IAAI,MAAM,gBAAgB,CAAC;AAClC,OAAO,EAAC,SAAS,EAAE,aAAa,EAAC,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAC,SAAS,EAAE,kBAAkB,EAAE,QAAQ,EAAE,kBAAkB,EAAC,MAAM,gBAAgB,CAAC;AAC3F,OAAO,EAAC,SAAS,EAAE,gBAAgB,EAAE,QAAQ,EAAC,MAAM,gBAAgB,CAAC;AACrE,OAAO,EAAC,aAAa,EAAE,YAAY,EAAC,MAAM,oBAAoB,CAAC;AAE/D,OAAO,EAAC,OAAO,EAAE,OAAO,EAAC,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAC,QAAQ,EAAE,YAAY,EAAE,QAAQ,EAAC,MAAM,gBAAgB,CAAC;AAEhE,OAAO,EAAC,UAAU,EAAE,SAAS,EAAC,MAAM,iBAAiB,CAAC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EACZ,UAAU,EACV,YAAY,EACZ,mBAAmB,EACnB,mBAAmB,EACnB,YAAY,EACb,CAAC;AAEF,YAAY,EACV,YAAY,EACZ,MAAM,EACN,WAAW,EACX,0BAA0B,EAC1B,6BAA6B,EAC7B,yBAAyB,EACzB,4BAA4B,EAC5B,yBAAyB,EACzB,4BAA4B,EAC5B,yBAAyB,EACzB,4BAA4B,EAC5B,6BAA6B,EAC7B,gCAAgC,EAChC,wBAAwB,EACxB,2BAA2B,EAC3B,uBAAuB,EACvB,0BAA0B,EAC1B,eAAe,EACf,mBAAmB,EAEnB,iBAAiB,EACjB,mBAAmB,EAEnB,+BAA+B,EAC/B,kCAAkC,EAClC,2BAA2B,EAC3B,8BAA8B,EAC9B,aAAa,EACd,CAAC"} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libesm/index.js b/node_modules/mocha/node_modules/diff/libesm/index.js new file mode 100644 index 00000000..18a495a1 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libesm/index.js @@ -0,0 +1,30 @@ +/* See LICENSE file for terms of use */ +/* + * Text diff implementation. + * + * This library supports the following APIs: + * Diff.diffChars: Character by character diff + * Diff.diffWords: Word (as defined by \b regex) diff which ignores whitespace + * Diff.diffLines: Line based diff + * + * Diff.diffCss: Diff targeted at CSS content + * + * These methods are based on the implementation proposed in + * "An O(ND) Difference Algorithm and its Variations" (Myers, 1986). + * http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.4.6927 + */ +import Diff from './diff/base.js'; +import { diffChars, characterDiff } from './diff/character.js'; +import { diffWords, diffWordsWithSpace, wordDiff, wordsWithSpaceDiff } from './diff/word.js'; +import { diffLines, diffTrimmedLines, lineDiff } from './diff/line.js'; +import { diffSentences, sentenceDiff } from './diff/sentence.js'; +import { diffCss, cssDiff } from './diff/css.js'; +import { diffJson, canonicalize, jsonDiff } from './diff/json.js'; +import { diffArrays, arrayDiff } from './diff/array.js'; +import { applyPatch, applyPatches } from './patch/apply.js'; +import { parsePatch } from './patch/parse.js'; +import { reversePatch } from './patch/reverse.js'; +import { structuredPatch, createTwoFilesPatch, createPatch, formatPatch, INCLUDE_HEADERS, FILE_HEADERS_ONLY, OMIT_HEADERS } from './patch/create.js'; +import { convertChangesToDMP } from './convert/dmp.js'; +import { convertChangesToXML } from './convert/xml.js'; +export { Diff, diffChars, characterDiff, diffWords, wordDiff, diffWordsWithSpace, wordsWithSpaceDiff, diffLines, lineDiff, diffTrimmedLines, diffSentences, sentenceDiff, diffCss, cssDiff, diffJson, jsonDiff, diffArrays, arrayDiff, structuredPatch, createTwoFilesPatch, createPatch, formatPatch, INCLUDE_HEADERS, FILE_HEADERS_ONLY, OMIT_HEADERS, applyPatch, applyPatches, parsePatch, reversePatch, convertChangesToDMP, convertChangesToXML, canonicalize }; diff --git a/node_modules/mocha/node_modules/diff/libesm/package.json b/node_modules/mocha/node_modules/diff/libesm/package.json new file mode 100644 index 00000000..2bd6e509 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libesm/package.json @@ -0,0 +1 @@ +{"type":"module","sideEffects":false} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libesm/patch/apply.d.ts b/node_modules/mocha/node_modules/diff/libesm/patch/apply.d.ts new file mode 100644 index 00000000..e953f1fa --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libesm/patch/apply.d.ts @@ -0,0 +1,62 @@ +import type { StructuredPatch } from '../types.js'; +export interface ApplyPatchOptions { + /** + * Maximum Levenshtein distance (in lines deleted, added, or subtituted) between the context shown in a patch hunk and the lines found in the file. + * @default 0 + */ + fuzzFactor?: number; + /** + * If `true`, and if the file to be patched consistently uses different line endings to the patch (i.e. either the file always uses Unix line endings while the patch uses Windows ones, or vice versa), then `applyPatch` will behave as if the line endings in the patch were the same as those in the source file. + * (If `false`, the patch will usually fail to apply in such circumstances since lines deleted in the patch won't be considered to match those in the source file.) + * @default true + */ + autoConvertLineEndings?: boolean; + /** + * Callback used to compare to given lines to determine if they should be considered equal when patching. + * Defaults to strict equality but may be overridden to provide fuzzier comparison. + * Should return false if the lines should be rejected. + */ + compareLine?: (lineNumber: number, line: string, operation: string, patchContent: string) => boolean; +} +/** + * attempts to apply a unified diff patch. + * + * Hunks are applied first to last. + * `applyPatch` first tries to apply the first hunk at the line number specified in the hunk header, and with all context lines matching exactly. + * If that fails, it tries scanning backwards and forwards, one line at a time, to find a place to apply the hunk where the context lines match exactly. + * If that still fails, and `fuzzFactor` is greater than zero, it increments the maximum number of mismatches (missing, extra, or changed context lines) that there can be between the hunk context and a region where we are trying to apply the patch such that the hunk will still be considered to match. + * Regardless of `fuzzFactor`, lines to be deleted in the hunk *must* be present for a hunk to match, and the context lines *immediately* before and after an insertion must match exactly. + * + * Once a hunk is successfully fitted, the process begins again with the next hunk. + * Regardless of `fuzzFactor`, later hunks must be applied later in the file than earlier hunks. + * + * If a hunk cannot be successfully fitted *anywhere* with fewer than `fuzzFactor` mismatches, `applyPatch` fails and returns `false`. + * + * If a hunk is successfully fitted but not at the line number specified by the hunk header, all subsequent hunks have their target line number adjusted accordingly. + * (e.g. if the first hunk is applied 10 lines below where the hunk header said it should fit, `applyPatch` will *start* looking for somewhere to apply the second hunk 10 lines below where its hunk header says it goes.) + * + * If the patch was applied successfully, returns a string containing the patched text. + * If the patch could not be applied (because some hunks in the patch couldn't be fitted to the text in `source`), `applyPatch` returns false. + * + * @param patch a string diff or the output from the `parsePatch` or `structuredPatch` methods. + */ +export declare function applyPatch(source: string, patch: string | StructuredPatch | [StructuredPatch], options?: ApplyPatchOptions): string | false; +export interface ApplyPatchesOptions extends ApplyPatchOptions { + loadFile: (index: StructuredPatch, callback: (err: any, data: string) => void) => void; + patched: (index: StructuredPatch, content: string | false, callback: (err: any) => void) => void; + complete: (err?: any) => void; +} +/** + * applies one or more patches. + * + * `patch` may be either an array of structured patch objects, or a string representing a patch in unified diff format (which may patch one or more files). + * + * This method will iterate over the contents of the patch and apply to data provided through callbacks. The general flow for each patch index is: + * + * - `options.loadFile(index, callback)` is called. The caller should then load the contents of the file and then pass that to the `callback(err, data)` callback. Passing an `err` will terminate further patch execution. + * - `options.patched(index, content, callback)` is called once the patch has been applied. `content` will be the return value from `applyPatch`. When it's ready, the caller should call `callback(err)` callback. Passing an `err` will terminate further patch execution. + * + * Once all patches have been applied or an error occurs, the `options.complete(err)` callback is made. + */ +export declare function applyPatches(uniDiff: string | StructuredPatch[], options: ApplyPatchesOptions): void; +//# sourceMappingURL=apply.d.ts.map \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libesm/patch/apply.d.ts.map b/node_modules/mocha/node_modules/diff/libesm/patch/apply.d.ts.map new file mode 100644 index 00000000..329d144a --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libesm/patch/apply.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"apply.d.ts","sourceRoot":"","sources":["../../src/patch/apply.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC;;;;OAIG;IACH,WAAW,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,KAAK,OAAO,CAAC;CACtG;AAOD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,UAAU,CACxB,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,GAAG,eAAe,GAAG,CAAC,eAAe,CAAC,EACnD,OAAO,GAAE,iBAAsB,GAC9B,MAAM,GAAG,KAAK,CAehB;AAyPD,MAAM,WAAW,mBAAoB,SAAQ,iBAAiB;IAC5D,QAAQ,EAAE,CAAC,KAAK,EAAE,eAAe,EAAE,QAAQ,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,KAAK,IAAI,CAAC;IACvF,OAAO,EAAE,CAAC,KAAK,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,GAAG,KAAK,EAAE,QAAQ,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,KAAK,IAAI,CAAC;IACjG,QAAQ,EAAE,CAAC,GAAG,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;CAC/B;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,eAAe,EAAE,EAAE,OAAO,EAAE,mBAAmB,GAAG,IAAI,CA0BpG"} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libesm/patch/apply.js b/node_modules/mocha/node_modules/diff/libesm/patch/apply.js new file mode 100644 index 00000000..fe2e8db5 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libesm/patch/apply.js @@ -0,0 +1,257 @@ +import { hasOnlyWinLineEndings, hasOnlyUnixLineEndings } from '../util/string.js'; +import { isWin, isUnix, unixToWin, winToUnix } from './line-endings.js'; +import { parsePatch } from './parse.js'; +import distanceIterator from '../util/distance-iterator.js'; +/** + * attempts to apply a unified diff patch. + * + * Hunks are applied first to last. + * `applyPatch` first tries to apply the first hunk at the line number specified in the hunk header, and with all context lines matching exactly. + * If that fails, it tries scanning backwards and forwards, one line at a time, to find a place to apply the hunk where the context lines match exactly. + * If that still fails, and `fuzzFactor` is greater than zero, it increments the maximum number of mismatches (missing, extra, or changed context lines) that there can be between the hunk context and a region where we are trying to apply the patch such that the hunk will still be considered to match. + * Regardless of `fuzzFactor`, lines to be deleted in the hunk *must* be present for a hunk to match, and the context lines *immediately* before and after an insertion must match exactly. + * + * Once a hunk is successfully fitted, the process begins again with the next hunk. + * Regardless of `fuzzFactor`, later hunks must be applied later in the file than earlier hunks. + * + * If a hunk cannot be successfully fitted *anywhere* with fewer than `fuzzFactor` mismatches, `applyPatch` fails and returns `false`. + * + * If a hunk is successfully fitted but not at the line number specified by the hunk header, all subsequent hunks have their target line number adjusted accordingly. + * (e.g. if the first hunk is applied 10 lines below where the hunk header said it should fit, `applyPatch` will *start* looking for somewhere to apply the second hunk 10 lines below where its hunk header says it goes.) + * + * If the patch was applied successfully, returns a string containing the patched text. + * If the patch could not be applied (because some hunks in the patch couldn't be fitted to the text in `source`), `applyPatch` returns false. + * + * @param patch a string diff or the output from the `parsePatch` or `structuredPatch` methods. + */ +export function applyPatch(source, patch, options = {}) { + let patches; + if (typeof patch === 'string') { + patches = parsePatch(patch); + } + else if (Array.isArray(patch)) { + patches = patch; + } + else { + patches = [patch]; + } + if (patches.length > 1) { + throw new Error('applyPatch only works with a single input.'); + } + return applyStructuredPatch(source, patches[0], options); +} +function applyStructuredPatch(source, patch, options = {}) { + if (options.autoConvertLineEndings || options.autoConvertLineEndings == null) { + if (hasOnlyWinLineEndings(source) && isUnix(patch)) { + patch = unixToWin(patch); + } + else if (hasOnlyUnixLineEndings(source) && isWin(patch)) { + patch = winToUnix(patch); + } + } + // Apply the diff to the input + const lines = source.split('\n'), hunks = patch.hunks, compareLine = options.compareLine || ((lineNumber, line, operation, patchContent) => line === patchContent), fuzzFactor = options.fuzzFactor || 0; + let minLine = 0; + if (fuzzFactor < 0 || !Number.isInteger(fuzzFactor)) { + throw new Error('fuzzFactor must be a non-negative integer'); + } + // Special case for empty patch. + if (!hunks.length) { + return source; + } + // Before anything else, handle EOFNL insertion/removal. If the patch tells us to make a change + // to the EOFNL that is redundant/impossible - i.e. to remove a newline that's not there, or add a + // newline that already exists - then we either return false and fail to apply the patch (if + // fuzzFactor is 0) or simply ignore the problem and do nothing (if fuzzFactor is >0). + // If we do need to remove/add a newline at EOF, this will always be in the final hunk: + let prevLine = '', removeEOFNL = false, addEOFNL = false; + for (let i = 0; i < hunks[hunks.length - 1].lines.length; i++) { + const line = hunks[hunks.length - 1].lines[i]; + if (line[0] == '\\') { + if (prevLine[0] == '+') { + removeEOFNL = true; + } + else if (prevLine[0] == '-') { + addEOFNL = true; + } + } + prevLine = line; + } + if (removeEOFNL) { + if (addEOFNL) { + // This means the final line gets changed but doesn't have a trailing newline in either the + // original or patched version. In that case, we do nothing if fuzzFactor > 0, and if + // fuzzFactor is 0, we simply validate that the source file has no trailing newline. + if (!fuzzFactor && lines[lines.length - 1] == '') { + return false; + } + } + else if (lines[lines.length - 1] == '') { + lines.pop(); + } + else if (!fuzzFactor) { + return false; + } + } + else if (addEOFNL) { + if (lines[lines.length - 1] != '') { + lines.push(''); + } + else if (!fuzzFactor) { + return false; + } + } + /** + * Checks if the hunk can be made to fit at the provided location with at most `maxErrors` + * insertions, substitutions, or deletions, while ensuring also that: + * - lines deleted in the hunk match exactly, and + * - wherever an insertion operation or block of insertion operations appears in the hunk, the + * immediately preceding and following lines of context match exactly + * + * `toPos` should be set such that lines[toPos] is meant to match hunkLines[0]. + * + * If the hunk can be applied, returns an object with properties `oldLineLastI` and + * `replacementLines`. Otherwise, returns null. + */ + function applyHunk(hunkLines, toPos, maxErrors, hunkLinesI = 0, lastContextLineMatched = true, patchedLines = [], patchedLinesLength = 0) { + let nConsecutiveOldContextLines = 0; + let nextContextLineMustMatch = false; + for (; hunkLinesI < hunkLines.length; hunkLinesI++) { + const hunkLine = hunkLines[hunkLinesI], operation = (hunkLine.length > 0 ? hunkLine[0] : ' '), content = (hunkLine.length > 0 ? hunkLine.substr(1) : hunkLine); + if (operation === '-') { + if (compareLine(toPos + 1, lines[toPos], operation, content)) { + toPos++; + nConsecutiveOldContextLines = 0; + } + else { + if (!maxErrors || lines[toPos] == null) { + return null; + } + patchedLines[patchedLinesLength] = lines[toPos]; + return applyHunk(hunkLines, toPos + 1, maxErrors - 1, hunkLinesI, false, patchedLines, patchedLinesLength + 1); + } + } + if (operation === '+') { + if (!lastContextLineMatched) { + return null; + } + patchedLines[patchedLinesLength] = content; + patchedLinesLength++; + nConsecutiveOldContextLines = 0; + nextContextLineMustMatch = true; + } + if (operation === ' ') { + nConsecutiveOldContextLines++; + patchedLines[patchedLinesLength] = lines[toPos]; + if (compareLine(toPos + 1, lines[toPos], operation, content)) { + patchedLinesLength++; + lastContextLineMatched = true; + nextContextLineMustMatch = false; + toPos++; + } + else { + if (nextContextLineMustMatch || !maxErrors) { + return null; + } + // Consider 3 possibilities in sequence: + // 1. lines contains a *substitution* not included in the patch context, or + // 2. lines contains an *insertion* not included in the patch context, or + // 3. lines contains a *deletion* not included in the patch context + // The first two options are of course only possible if the line from lines is non-null - + // i.e. only option 3 is possible if we've overrun the end of the old file. + return (lines[toPos] && (applyHunk(hunkLines, toPos + 1, maxErrors - 1, hunkLinesI + 1, false, patchedLines, patchedLinesLength + 1) || applyHunk(hunkLines, toPos + 1, maxErrors - 1, hunkLinesI, false, patchedLines, patchedLinesLength + 1)) || applyHunk(hunkLines, toPos, maxErrors - 1, hunkLinesI + 1, false, patchedLines, patchedLinesLength)); + } + } + } + // Before returning, trim any unmodified context lines off the end of patchedLines and reduce + // toPos (and thus oldLineLastI) accordingly. This allows later hunks to be applied to a region + // that starts in this hunk's trailing context. + patchedLinesLength -= nConsecutiveOldContextLines; + toPos -= nConsecutiveOldContextLines; + patchedLines.length = patchedLinesLength; + return { + patchedLines, + oldLineLastI: toPos - 1 + }; + } + const resultLines = []; + // Search best fit offsets for each hunk based on the previous ones + let prevHunkOffset = 0; + for (let i = 0; i < hunks.length; i++) { + const hunk = hunks[i]; + let hunkResult; + const maxLine = lines.length - hunk.oldLines + fuzzFactor; + let toPos; + for (let maxErrors = 0; maxErrors <= fuzzFactor; maxErrors++) { + toPos = hunk.oldStart + prevHunkOffset - 1; + const iterator = distanceIterator(toPos, minLine, maxLine); + for (; toPos !== undefined; toPos = iterator()) { + hunkResult = applyHunk(hunk.lines, toPos, maxErrors); + if (hunkResult) { + break; + } + } + if (hunkResult) { + break; + } + } + if (!hunkResult) { + return false; + } + // Copy everything from the end of where we applied the last hunk to the start of this hunk + for (let i = minLine; i < toPos; i++) { + resultLines.push(lines[i]); + } + // Add the lines produced by applying the hunk: + for (let i = 0; i < hunkResult.patchedLines.length; i++) { + const line = hunkResult.patchedLines[i]; + resultLines.push(line); + } + // Set lower text limit to end of the current hunk, so next ones don't try + // to fit over already patched text + minLine = hunkResult.oldLineLastI + 1; + // Note the offset between where the patch said the hunk should've applied and where we + // applied it, so we can adjust future hunks accordingly: + prevHunkOffset = toPos + 1 - hunk.oldStart; + } + // Copy over the rest of the lines from the old text + for (let i = minLine; i < lines.length; i++) { + resultLines.push(lines[i]); + } + return resultLines.join('\n'); +} +/** + * applies one or more patches. + * + * `patch` may be either an array of structured patch objects, or a string representing a patch in unified diff format (which may patch one or more files). + * + * This method will iterate over the contents of the patch and apply to data provided through callbacks. The general flow for each patch index is: + * + * - `options.loadFile(index, callback)` is called. The caller should then load the contents of the file and then pass that to the `callback(err, data)` callback. Passing an `err` will terminate further patch execution. + * - `options.patched(index, content, callback)` is called once the patch has been applied. `content` will be the return value from `applyPatch`. When it's ready, the caller should call `callback(err)` callback. Passing an `err` will terminate further patch execution. + * + * Once all patches have been applied or an error occurs, the `options.complete(err)` callback is made. + */ +export function applyPatches(uniDiff, options) { + const spDiff = typeof uniDiff === 'string' ? parsePatch(uniDiff) : uniDiff; + let currentIndex = 0; + function processIndex() { + const index = spDiff[currentIndex++]; + if (!index) { + return options.complete(); + } + options.loadFile(index, function (err, data) { + if (err) { + return options.complete(err); + } + const updatedContent = applyPatch(data, index, options); + options.patched(index, updatedContent, function (err) { + if (err) { + return options.complete(err); + } + processIndex(); + }); + }); + } + processIndex(); +} diff --git a/node_modules/mocha/node_modules/diff/libesm/patch/create.d.ts b/node_modules/mocha/node_modules/diff/libesm/patch/create.d.ts new file mode 100644 index 00000000..ed401385 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libesm/patch/create.d.ts @@ -0,0 +1,131 @@ +import type { StructuredPatch, DiffLinesOptionsAbortable, DiffLinesOptionsNonabortable, AbortableDiffOptions } from '../types.js'; +type StructuredPatchCallbackAbortable = (patch: StructuredPatch | undefined) => void; +type StructuredPatchCallbackNonabortable = (patch: StructuredPatch) => void; +export interface HeaderOptions { + includeIndex: boolean; + includeUnderline: boolean; + includeFileHeaders: boolean; +} +export declare const INCLUDE_HEADERS: { + includeIndex: boolean; + includeUnderline: boolean; + includeFileHeaders: boolean; +}; +export declare const FILE_HEADERS_ONLY: { + includeIndex: boolean; + includeUnderline: boolean; + includeFileHeaders: boolean; +}; +export declare const OMIT_HEADERS: { + includeIndex: boolean; + includeUnderline: boolean; + includeFileHeaders: boolean; +}; +interface _StructuredPatchOptionsAbortable extends Pick { + /** + * describes how many lines of context should be included. + * You can set this to `Number.MAX_SAFE_INTEGER` or `Infinity` to include the entire file content in one hunk. + * @default 4 + */ + context?: number; + callback?: StructuredPatchCallbackAbortable; +} +export type StructuredPatchOptionsAbortable = _StructuredPatchOptionsAbortable & AbortableDiffOptions; +export interface StructuredPatchOptionsNonabortable extends Pick { + context?: number; + callback?: StructuredPatchCallbackNonabortable; +} +interface StructuredPatchCallbackOptionAbortable { + /** + * If provided, the diff will be computed in async mode to avoid blocking the event loop while the diff is calculated. + * The value of the `callback` option should be a function and will be passed the computed diff or patch as its first argument. + */ + callback: StructuredPatchCallbackAbortable; +} +interface StructuredPatchCallbackOptionNonabortable { + /** + * If provided, the diff will be computed in async mode to avoid blocking the event loop while the diff is calculated. + * The value of the `callback` option should be a function and will be passed the computed diff or patch as its first argument. + */ + callback: StructuredPatchCallbackNonabortable; +} +/** + * returns an object with an array of hunk objects. + * + * This method is similar to createTwoFilesPatch, but returns a data structure suitable for further processing. + * @param oldFileName String to be output in the filename section of the patch for the removals + * @param newFileName String to be output in the filename section of the patch for the additions + * @param oldStr Original string value + * @param newStr New string value + * @param oldHeader Optional additional information to include in the old file header. + * @param newHeader Optional additional information to include in the new file header. + */ +export declare function structuredPatch(oldFileName: string, newFileName: string, oldStr: string, newStr: string, oldHeader: string | undefined, newHeader: string | undefined, options: StructuredPatchCallbackNonabortable): undefined; +export declare function structuredPatch(oldFileName: string, newFileName: string, oldStr: string, newStr: string, oldHeader: string | undefined, newHeader: string | undefined, options: StructuredPatchOptionsAbortable & StructuredPatchCallbackOptionAbortable): undefined; +export declare function structuredPatch(oldFileName: string, newFileName: string, oldStr: string, newStr: string, oldHeader: string | undefined, newHeader: string | undefined, options: StructuredPatchOptionsNonabortable & StructuredPatchCallbackOptionNonabortable): undefined; +export declare function structuredPatch(oldFileName: string, newFileName: string, oldStr: string, newStr: string, oldHeader: string | undefined, newHeader: string | undefined, options: StructuredPatchOptionsAbortable): StructuredPatch | undefined; +export declare function structuredPatch(oldFileName: string, newFileName: string, oldStr: string, newStr: string, oldHeader?: string, newHeader?: string, options?: StructuredPatchOptionsNonabortable): StructuredPatch; +/** + * creates a unified diff patch. + * + * @param patch either a single structured patch object (as returned by `structuredPatch`) or an + * array of them (as returned by `parsePatch`). + * @param headerOptions behaves the same as the `headerOptions` option of `createTwoFilesPatch`. + * Ignored for patches where `isGit` is `true`. + * + * When a patch has `isGit: true`, `formatPatch` output is changed to more closely match Git's + * output: it emits a `diff --git` header, emits Git extended headers as appropriate based on + * properties like `isRename`, `isCreate`, `newMode`, etc, and will omit `---`/`+++` file + * headers for patches with no hunks (e.g. renames without content changes). + */ +export declare function formatPatch(patch: StructuredPatch | StructuredPatch[], headerOptions?: HeaderOptions): string; +type CreatePatchCallbackAbortable = (patch: string | undefined) => void; +type CreatePatchCallbackNonabortable = (patch: string) => void; +interface _CreatePatchOptionsAbortable extends Pick { + context?: number; + callback?: CreatePatchCallbackAbortable; + headerOptions?: HeaderOptions; +} +export type CreatePatchOptionsAbortable = _CreatePatchOptionsAbortable & AbortableDiffOptions; +export interface CreatePatchOptionsNonabortable extends Pick { + context?: number; + callback?: CreatePatchCallbackNonabortable; + headerOptions?: HeaderOptions; +} +interface CreatePatchCallbackOptionAbortable { + callback: CreatePatchCallbackAbortable; +} +interface CreatePatchCallbackOptionNonabortable { + callback: CreatePatchCallbackNonabortable; +} +/** + * creates a unified diff patch by first computing a diff with `diffLines` and then serializing it to unified diff format. + * @param oldFileName String to be output in the filename section of the patch for the removals + * @param newFileName String to be output in the filename section of the patch for the additions + * @param oldStr Original string value + * @param newStr New string value + * @param oldHeader Optional additional information to include in the old file header. + * @param newHeader Optional additional information to include in the new file header. + */ +export declare function createTwoFilesPatch(oldFileName: string, newFileName: string, oldStr: string, newStr: string, oldHeader: string | undefined, newHeader: string | undefined, options: CreatePatchCallbackNonabortable): undefined; +export declare function createTwoFilesPatch(oldFileName: string, newFileName: string, oldStr: string, newStr: string, oldHeader: string | undefined, newHeader: string | undefined, options: CreatePatchOptionsAbortable & CreatePatchCallbackOptionAbortable): undefined; +export declare function createTwoFilesPatch(oldFileName: string, newFileName: string, oldStr: string, newStr: string, oldHeader: string | undefined, newHeader: string | undefined, options: CreatePatchOptionsNonabortable & CreatePatchCallbackOptionNonabortable): undefined; +export declare function createTwoFilesPatch(oldFileName: string, newFileName: string, oldStr: string, newStr: string, oldHeader: string | undefined, newHeader: string | undefined, options: CreatePatchOptionsAbortable): string | undefined; +export declare function createTwoFilesPatch(oldFileName: string, newFileName: string, oldStr: string, newStr: string, oldHeader?: string, newHeader?: string, options?: CreatePatchOptionsNonabortable): string; +/** + * creates a unified diff patch. + * + * Just like createTwoFilesPatch, but with oldFileName being equal to newFileName. + * @param fileName String to be output in the filename section of the patch + * @param oldStr Original string value + * @param newStr New string value + * @param oldHeader Optional additional information to include in the old file header. + * @param newHeader Optional additional information to include in the new file header. + */ +export declare function createPatch(fileName: string, oldStr: string, newStr: string, oldHeader: string | undefined, newHeader: string | undefined, options: CreatePatchCallbackNonabortable): undefined; +export declare function createPatch(fileName: string, oldStr: string, newStr: string, oldHeader: string | undefined, newHeader: string | undefined, options: CreatePatchOptionsAbortable & CreatePatchCallbackOptionAbortable): undefined; +export declare function createPatch(fileName: string, oldStr: string, newStr: string, oldHeader: string | undefined, newHeader: string | undefined, options: CreatePatchOptionsNonabortable & CreatePatchCallbackOptionNonabortable): undefined; +export declare function createPatch(fileName: string, oldStr: string, newStr: string, oldHeader: string | undefined, newHeader: string | undefined, options: CreatePatchOptionsAbortable): string | undefined; +export declare function createPatch(fileName: string, oldStr: string, newStr: string, oldHeader?: string, newHeader?: string, options?: CreatePatchOptionsNonabortable): string; +export {}; +//# sourceMappingURL=create.d.ts.map \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libesm/patch/create.d.ts.map b/node_modules/mocha/node_modules/diff/libesm/patch/create.d.ts.map new file mode 100644 index 00000000..b29ce64a --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libesm/patch/create.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../src/patch/create.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,yBAAyB,EAAE,4BAA4B,EAAE,oBAAoB,EAAgB,MAAM,aAAa,CAAC;AAwEhJ,KAAK,gCAAgC,GAAG,CAAC,KAAK,EAAE,eAAe,GAAG,SAAS,KAAK,IAAI,CAAC;AACrF,KAAK,mCAAmC,GAAG,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,CAAC;AAE5E,MAAM,WAAW,aAAa;IAC5B,YAAY,EAAE,OAAO,CAAC;IACtB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,kBAAkB,EAAE,OAAO,CAAC;CAC7B;AAED,eAAO,MAAM,eAAe;;;;CAI3B,CAAC;AACF,eAAO,MAAM,iBAAiB;;;;CAI7B,CAAC;AACF,eAAO,MAAM,YAAY;;;;CAIxB,CAAC;AAEF,UAAU,gCAAiC,SAAQ,IAAI,CAAC,yBAAyB,EAAE,kBAAkB,GAAG,iBAAiB,CAAC;IACxH;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,gCAAgC,CAAC;CAC7C;AACD,MAAM,MAAM,+BAA+B,GAAG,gCAAgC,GAAG,oBAAoB,CAAC;AACtG,MAAM,WAAW,kCAAmC,SAAQ,IAAI,CAAC,4BAA4B,EAAE,k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AM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,GAAG,SAAS,EAC7B,SAAS,EAAE,MAAM,GAAG,SAAS,EAC7B,OAAO,EAAE,+BAA+B,GACvC,SAAS,CAAC;AACb,wBAAgB,WAAW,CACzB,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,GAAG,SAAS,EAC7B,SAAS,EAAE,MAAM,GAAG,SAAS,EAC7B,OAAO,EAAE,2BAA2B,GAAG,kCAAkC,GACxE,SAAS,CAAA;AACZ,wBAAgB,WAAW,CACzB,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,GAAG,SAAS,EAC7B,SAAS,EAAE,MAAM,GAAG,SAAS,EAC7B,OAAO,EAAE,8BAA8B,GAAG,qCAAqC,GAC9E,SAAS,CAAA;AACZ,wBAAgB,WAAW,CACzB,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,GAAG,SAAS,EAC7B,SAAS,EAAE,MAAM,GAAG,SAAS,EAC7B,OAAO,EAAE,2BAA2B,GACnC,MAAM,GAAG,SAAS,CAAA;AACrB,wBAAgB,WAAW,CACzB,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,SAAS,CAAC,EAAE,MAAM,EAClB,SAAS,CAAC,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE,8BAA8B,GACvC,MAAM,CAAA"} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libesm/patch/create.js b/node_modules/mocha/node_modules/diff/libesm/patch/create.js new file mode 100644 index 00000000..b5cbafe1 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libesm/patch/create.js @@ -0,0 +1,357 @@ +import { diffLines } from '../diff/line.js'; +/** + * Returns true if the filename contains characters that require C-style + * quoting (as used by Git and GNU diffutils in diff output). + */ +function needsQuoting(s) { + for (let i = 0; i < s.length; i++) { + if (s[i] < '\x20' || s[i] > '\x7e' || s[i] === '"' || s[i] === '\\') { + return true; + } + } + return false; +} +/** + * C-style quotes a filename, encoding special characters as escape sequences + * and non-ASCII bytes as octal escapes. This is the inverse of + * `parseQuotedFileName` in parse.ts. + * + * Non-ASCII bytes are encoded as UTF-8 before being emitted as octal escapes. + * This matches the behaviour of both Git and GNU diffutils, which always emit + * UTF-8 octal escapes regardless of the underlying filesystem encoding (e.g. + * Git for Windows converts from NTFS's UTF-16 to UTF-8 internally). + * + * If the filename doesn't need quoting, returns it as-is. + */ +function quoteFileNameIfNeeded(s) { + if (!needsQuoting(s)) { + return s; + } + let result = '"'; + const bytes = new TextEncoder().encode(s); + let i = 0; + while (i < bytes.length) { + const b = bytes[i]; + // See https://en.wikipedia.org/wiki/Escape_sequences_in_C#Escape_sequences + if (b === 0x07) { + result += '\\a'; + } + else if (b === 0x08) { + result += '\\b'; + } + else if (b === 0x09) { + result += '\\t'; + } + else if (b === 0x0a) { + result += '\\n'; + } + else if (b === 0x0b) { + result += '\\v'; + } + else if (b === 0x0c) { + result += '\\f'; + } + else if (b === 0x0d) { + result += '\\r'; + } + else if (b === 0x22) { + result += '\\"'; + } + else if (b === 0x5c) { + result += '\\\\'; + } + else if (b >= 0x20 && b <= 0x7e) { + // Just a printable ASCII character that is neither a double quote nor a + // backslash; no need to escape it. + result += String.fromCharCode(b); + } + else { + // Either part of a non-ASCII character or a control character without a + // special escape sequence; needs escaping as a 3-digit octal escape + result += '\\' + b.toString(8).padStart(3, '0'); + } + i++; + } + result += '"'; + return result; +} +export const INCLUDE_HEADERS = { + includeIndex: true, + includeUnderline: true, + includeFileHeaders: true +}; +export const FILE_HEADERS_ONLY = { + includeIndex: false, + includeUnderline: false, + includeFileHeaders: true +}; +export const OMIT_HEADERS = { + includeIndex: false, + includeUnderline: false, + includeFileHeaders: false +}; +export function structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) { + let optionsObj; + if (!options) { + optionsObj = {}; + } + else if (typeof options === 'function') { + optionsObj = { callback: options }; + } + else { + optionsObj = options; + } + if (typeof optionsObj.context === 'undefined') { + optionsObj.context = 4; + } + // We copy this into its own variable to placate TypeScript, which thinks + // optionsObj.context might be undefined in the callbacks below. + const context = optionsObj.context; + // @ts-expect-error (runtime check for something that is correctly a static type error) + if (optionsObj.newlineIsToken) { + throw new Error('newlineIsToken may not be used with patch-generation functions, only with diffing functions'); + } + if (!optionsObj.callback) { + return diffLinesResultToPatch(diffLines(oldStr, newStr, optionsObj)); + } + else { + const { callback } = optionsObj; + diffLines(oldStr, newStr, Object.assign(Object.assign({}, optionsObj), { callback: (diff) => { + const patch = diffLinesResultToPatch(diff); + // TypeScript is unhappy without the cast because it does not understand that `patch` may + // be undefined here only if `callback` is StructuredPatchCallbackAbortable: + callback(patch); + } })); + } + function diffLinesResultToPatch(diff) { + // STEP 1: Build up the patch with no "\ No newline at end of file" lines and with the arrays + // of lines containing trailing newline characters. We'll tidy up later... + if (!diff) { + return; + } + diff.push({ value: '', lines: [] }); // Append an empty value to make cleanup easier + function contextLines(lines) { + return lines.map(function (entry) { return ' ' + entry; }); + } + const hunks = []; + let oldRangeStart = 0, newRangeStart = 0, curRange = [], oldLine = 1, newLine = 1; + for (let i = 0; i < diff.length; i++) { + const current = diff[i], lines = current.lines || splitLines(current.value); + current.lines = lines; + if (current.added || current.removed) { + // If we have previous context, start with that + if (!oldRangeStart) { + const prev = diff[i - 1]; + oldRangeStart = oldLine; + newRangeStart = newLine; + if (prev) { + curRange = context > 0 ? contextLines(prev.lines.slice(-context)) : []; + oldRangeStart -= curRange.length; + newRangeStart -= curRange.length; + } + } + // Output our changes + for (const line of lines) { + curRange.push((current.added ? '+' : '-') + line); + } + // Track the updated file position + if (current.added) { + newLine += lines.length; + } + else { + oldLine += lines.length; + } + } + else { + // Identical context lines. Track line changes + if (oldRangeStart) { + // Close out any changes that have been output (or join overlapping) + if (lines.length <= context * 2 && i < diff.length - 2) { + // Overlapping + for (const line of contextLines(lines)) { + curRange.push(line); + } + } + else { + // end the range and output + const contextSize = Math.min(lines.length, context); + for (const line of contextLines(lines.slice(0, contextSize))) { + curRange.push(line); + } + const hunk = { + oldStart: oldRangeStart, + oldLines: (oldLine - oldRangeStart + contextSize), + newStart: newRangeStart, + newLines: (newLine - newRangeStart + contextSize), + lines: curRange + }; + hunks.push(hunk); + oldRangeStart = 0; + newRangeStart = 0; + curRange = []; + } + } + oldLine += lines.length; + newLine += lines.length; + } + } + // Step 2: eliminate the trailing `\n` from each line of each hunk, and, where needed, add + // "\ No newline at end of file". + for (const hunk of hunks) { + for (let i = 0; i < hunk.lines.length; i++) { + if (hunk.lines[i].endsWith('\n')) { + hunk.lines[i] = hunk.lines[i].slice(0, -1); + } + else { + hunk.lines.splice(i + 1, 0, '\\ No newline at end of file'); + i++; // Skip the line we just added, then continue iterating + } + } + } + return { + oldFileName: oldFileName, newFileName: newFileName, + oldHeader: oldHeader, newHeader: newHeader, + hunks: hunks + }; + } +} +/** + * creates a unified diff patch. + * + * @param patch either a single structured patch object (as returned by `structuredPatch`) or an + * array of them (as returned by `parsePatch`). + * @param headerOptions behaves the same as the `headerOptions` option of `createTwoFilesPatch`. + * Ignored for patches where `isGit` is `true`. + * + * When a patch has `isGit: true`, `formatPatch` output is changed to more closely match Git's + * output: it emits a `diff --git` header, emits Git extended headers as appropriate based on + * properties like `isRename`, `isCreate`, `newMode`, etc, and will omit `---`/`+++` file + * headers for patches with no hunks (e.g. renames without content changes). + */ +export function formatPatch(patch, headerOptions) { + var _a, _b, _c, _d, _e, _f; + if (!headerOptions) { + headerOptions = INCLUDE_HEADERS; + } + if (Array.isArray(patch)) { + if (patch.length > 1 && !headerOptions.includeFileHeaders && !patch.every(p => p.isGit)) { + throw new Error('Cannot omit file headers on a multi-file patch. ' + + '(The result would be unparseable; how would a tool trying to apply ' + + 'the patch know which changes are to which file?)'); + } + return patch.map(p => formatPatch(p, headerOptions)).join('\n'); + } + const ret = []; + // Git patches have a fixed header format (diff --git, extended headers, + // and ---/+++ when hunks are present), so headerOptions is ignored. + if (patch.isGit) { + headerOptions = INCLUDE_HEADERS; + // Emit Git-style diff --git header and extended headers. + // Git never puts /dev/null in the "diff --git" line; for file + // creations/deletions it uses the real filename on both sides. + if (!patch.oldFileName) { + throw new Error('oldFileName must be specified for Git patches'); + } + if (!patch.newFileName) { + throw new Error('newFileName must be specified for Git patches'); + } + let gitOldName = patch.oldFileName; + let gitNewName = patch.newFileName; + if (patch.isCreate && gitOldName === '/dev/null') { + gitOldName = gitNewName.replace(/^b\//, 'a/'); + } + else if (patch.isDelete && gitNewName === '/dev/null') { + gitNewName = gitOldName.replace(/^a\//, 'b/'); + } + ret.push('diff --git ' + quoteFileNameIfNeeded(gitOldName) + ' ' + quoteFileNameIfNeeded(gitNewName)); + if (patch.isDelete) { + ret.push('deleted file mode ' + ((_a = patch.oldMode) !== null && _a !== void 0 ? _a : '100644')); + } + if (patch.isCreate) { + ret.push('new file mode ' + ((_b = patch.newMode) !== null && _b !== void 0 ? _b : '100644')); + } + if (patch.oldMode && patch.newMode && !patch.isDelete && !patch.isCreate) { + ret.push('old mode ' + patch.oldMode); + ret.push('new mode ' + patch.newMode); + } + if (patch.isRename) { + ret.push('rename from ' + quoteFileNameIfNeeded(((_c = patch.oldFileName) !== null && _c !== void 0 ? _c : '').replace(/^a\//, ''))); + ret.push('rename to ' + quoteFileNameIfNeeded(((_d = patch.newFileName) !== null && _d !== void 0 ? _d : '').replace(/^b\//, ''))); + } + if (patch.isCopy) { + ret.push('copy from ' + quoteFileNameIfNeeded(((_e = patch.oldFileName) !== null && _e !== void 0 ? _e : '').replace(/^a\//, ''))); + ret.push('copy to ' + quoteFileNameIfNeeded(((_f = patch.newFileName) !== null && _f !== void 0 ? _f : '').replace(/^b\//, ''))); + } + } + else { + if (headerOptions.includeIndex && patch.oldFileName == patch.newFileName && patch.oldFileName !== undefined) { + ret.push('Index: ' + patch.oldFileName); + } + if (headerOptions.includeUnderline) { + ret.push('==================================================================='); + } + } + // Emit --- / +++ file headers. For Git patches with no hunks (e.g. + // pure renames, mode-only changes), Git omits these, so we do too. + const hasHunks = patch.hunks.length > 0; + if (headerOptions.includeFileHeaders && patch.oldFileName !== undefined && patch.newFileName !== undefined + && (!patch.isGit || hasHunks)) { + ret.push('--- ' + quoteFileNameIfNeeded(patch.oldFileName) + (patch.oldHeader ? '\t' + patch.oldHeader : '')); + ret.push('+++ ' + quoteFileNameIfNeeded(patch.newFileName) + (patch.newHeader ? '\t' + patch.newHeader : '')); + } + for (let i = 0; i < patch.hunks.length; i++) { + const hunk = patch.hunks[i]; + // Unified Diff Format quirk: If the chunk size is 0, + // the first number is one lower than one would expect. + // https://www.artima.com/weblogs/viewpost.jsp?thread=164293 + const oldStart = hunk.oldLines === 0 ? hunk.oldStart - 1 : hunk.oldStart; + const newStart = hunk.newLines === 0 ? hunk.newStart - 1 : hunk.newStart; + ret.push('@@ -' + oldStart + ',' + hunk.oldLines + + ' +' + newStart + ',' + hunk.newLines + + ' @@'); + for (const line of hunk.lines) { + ret.push(line); + } + } + return ret.join('\n') + '\n'; +} +export function createTwoFilesPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) { + if (typeof options === 'function') { + options = { callback: options }; + } + if (!(options === null || options === void 0 ? void 0 : options.callback)) { + const patchObj = structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options); + if (!patchObj) { + return; + } + return formatPatch(patchObj, options === null || options === void 0 ? void 0 : options.headerOptions); + } + else { + const { callback } = options; + structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, Object.assign(Object.assign({}, options), { callback: patchObj => { + if (!patchObj) { + callback(undefined); + } + else { + callback(formatPatch(patchObj, options.headerOptions)); + } + } })); + } +} +export function createPatch(fileName, oldStr, newStr, oldHeader, newHeader, options) { + return createTwoFilesPatch(fileName, fileName, oldStr, newStr, oldHeader, newHeader, options); +} +/** + * Split `text` into an array of lines, including the trailing newline character (where present) + */ +function splitLines(text) { + const hasTrailingNl = text.endsWith('\n'); + const result = text.split('\n').map(line => line + '\n'); + if (hasTrailingNl) { + result.pop(); + } + else { + result.push(result.pop().slice(0, -1)); + } + return result; +} diff --git a/node_modules/mocha/node_modules/diff/libesm/patch/line-endings.d.ts b/node_modules/mocha/node_modules/diff/libesm/patch/line-endings.d.ts new file mode 100644 index 00000000..4db82119 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libesm/patch/line-endings.d.ts @@ -0,0 +1,17 @@ +import type { StructuredPatch } from '../types.js'; +export declare function unixToWin(patch: StructuredPatch): StructuredPatch; +export declare function unixToWin(patches: StructuredPatch[]): StructuredPatch[]; +export declare function unixToWin(patch: StructuredPatch | StructuredPatch[]): StructuredPatch | StructuredPatch[]; +export declare function winToUnix(patch: StructuredPatch): StructuredPatch; +export declare function winToUnix(patches: StructuredPatch[]): StructuredPatch[]; +export declare function winToUnix(patch: StructuredPatch | StructuredPatch[]): StructuredPatch | StructuredPatch[]; +/** + * Returns true if the patch consistently uses Unix line endings (or only involves one line and has + * no line endings). + */ +export declare function isUnix(patch: StructuredPatch | StructuredPatch[]): boolean; +/** + * Returns true if the patch uses Windows line endings and only Windows line endings. + */ +export declare function isWin(patch: StructuredPatch | StructuredPatch[]): boolean; +//# sourceMappingURL=line-endings.d.ts.map \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libesm/patch/line-endings.d.ts.map b/node_modules/mocha/node_modules/diff/libesm/patch/line-endings.d.ts.map new file mode 100644 index 00000000..cfcd36fc --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libesm/patch/line-endings.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"line-endings.d.ts","sourceRoot":"","sources":["../../src/patch/line-endings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,wBAAgB,SAAS,CAAC,KAAK,EAAE,eAAe,GAAG,eAAe,CAAC;AACnE,wBAAgB,SAAS,CAAC,OAAO,EAAE,eAAe,EAAE,GAAG,eAAe,EAAE,CAAC;AACzE,wBAAgB,SAAS,CAAC,KAAK,EAAE,eAAe,GAAG,eAAe,EAAE,GAAG,eAAe,GAAG,eAAe,EAAE,CAAC;AA0B3G,wBAAgB,SAAS,CAAC,KAAK,EAAE,eAAe,GAAG,eAAe,CAAC;AACnE,wBAAgB,SAAS,CAAC,OAAO,EAAE,eAAe,EAAE,GAAG,eAAe,EAAE,CAAC;AACzE,wBAAgB,SAAS,CAAC,KAAK,EAAE,eAAe,GAAG,eAAe,EAAE,GAAG,eAAe,GAAG,eAAe,EAAE,CAAC;AAgB3G;;;GAGG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,eAAe,GAAG,eAAe,EAAE,GAAG,OAAO,CAS1E;AAED;;GAEG;AACH,wBAAgB,KAAK,CAAC,KAAK,EAAE,eAAe,GAAG,eAAe,EAAE,GAAG,OAAO,CAUzE"} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libesm/patch/line-endings.js b/node_modules/mocha/node_modules/diff/libesm/patch/line-endings.js new file mode 100644 index 00000000..ab54b715 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libesm/patch/line-endings.js @@ -0,0 +1,44 @@ +export function unixToWin(patch) { + if (Array.isArray(patch)) { + // It would be cleaner if instead of the line below we could just write + // return patch.map(unixToWin) + // but mysteriously TypeScript (v5.7.3 at the time of writing) does not like this and it will + // refuse to compile, thinking that unixToWin could then return StructuredPatch[][] and the + // result would be incompatible with the overload signatures. + // See bug report at https://github.com/microsoft/TypeScript/issues/61398. + return patch.map(p => unixToWin(p)); + } + return Object.assign(Object.assign({}, patch), { hunks: patch.hunks.map(hunk => (Object.assign(Object.assign({}, hunk), { lines: hunk.lines.map((line, i) => { + var _a; + return (line.startsWith('\\') || line.endsWith('\r') || ((_a = hunk.lines[i + 1]) === null || _a === void 0 ? void 0 : _a.startsWith('\\'))) + ? line + : line + '\r'; + }) }))) }); +} +export function winToUnix(patch) { + if (Array.isArray(patch)) { + // (See comment above equivalent line in unixToWin) + return patch.map(p => winToUnix(p)); + } + return Object.assign(Object.assign({}, patch), { hunks: patch.hunks.map(hunk => (Object.assign(Object.assign({}, hunk), { lines: hunk.lines.map(line => line.endsWith('\r') ? line.substring(0, line.length - 1) : line) }))) }); +} +/** + * Returns true if the patch consistently uses Unix line endings (or only involves one line and has + * no line endings). + */ +export function isUnix(patch) { + if (!Array.isArray(patch)) { + patch = [patch]; + } + return !patch.some(index => index.hunks.some(hunk => hunk.lines.some(line => !line.startsWith('\\') && line.endsWith('\r')))); +} +/** + * Returns true if the patch uses Windows line endings and only Windows line endings. + */ +export function isWin(patch) { + if (!Array.isArray(patch)) { + patch = [patch]; + } + return patch.some(index => index.hunks.some(hunk => hunk.lines.some(line => line.endsWith('\r')))) + && patch.every(index => index.hunks.every(hunk => hunk.lines.every((line, i) => { var _a; return line.startsWith('\\') || line.endsWith('\r') || ((_a = hunk.lines[i + 1]) === null || _a === void 0 ? void 0 : _a.startsWith('\\')); }))); +} diff --git a/node_modules/mocha/node_modules/diff/libesm/patch/parse.d.ts b/node_modules/mocha/node_modules/diff/libesm/patch/parse.d.ts new file mode 100644 index 00000000..a29d4155 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libesm/patch/parse.d.ts @@ -0,0 +1,16 @@ +import type { StructuredPatch } from '../types.js'; +/** + * Parses a unified diff format patch into a structured patch object. + * + * `parsePatch` has some understanding of Git's particular dialect of unified diff format. + * When parsing a Git patch, each index in the result may contain additional + * fields (`isRename`, `isBinary`, etc) not included in the data structure returned by + * `structuredPatch`; see the `StructuredPatch` interface for a full list. + * + * @return a JSON object representation of the patch, suitable for use with the `applyPatch` + * method. This parses to the same structure returned by `structuredPatch`, except that + * `oldFileName` and `newFileName` may be `undefined` if the patch doesn't contain enough + * information to determine them (e.g. a hunk-only patch with no file headers). + */ +export declare function parsePatch(uniDiff: string): StructuredPatch[]; +//# sourceMappingURL=parse.d.ts.map \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libesm/patch/parse.d.ts.map b/node_modules/mocha/node_modules/diff/libesm/patch/parse.d.ts.map new file mode 100644 index 00000000..7f2630b2 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libesm/patch/parse.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["../../src/patch/parse.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD;;;;;;;;;;;;GAYG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,eAAe,EAAE,CA6f7D"} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libesm/patch/parse.js b/node_modules/mocha/node_modules/diff/libesm/patch/parse.js new file mode 100644 index 00000000..deb98f26 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libesm/patch/parse.js @@ -0,0 +1,512 @@ +/** + * Parses a unified diff format patch into a structured patch object. + * + * `parsePatch` has some understanding of Git's particular dialect of unified diff format. + * When parsing a Git patch, each index in the result may contain additional + * fields (`isRename`, `isBinary`, etc) not included in the data structure returned by + * `structuredPatch`; see the `StructuredPatch` interface for a full list. + * + * @return a JSON object representation of the patch, suitable for use with the `applyPatch` + * method. This parses to the same structure returned by `structuredPatch`, except that + * `oldFileName` and `newFileName` may be `undefined` if the patch doesn't contain enough + * information to determine them (e.g. a hunk-only patch with no file headers). + */ +export function parsePatch(uniDiff) { + const diffstr = uniDiff.split(/\n/), list = []; + let i = 0; + // These helper functions identify line types that can appear between files + // in a multi-file patch. Keeping them in one place avoids subtle + // inconsistencies from having the same regexes duplicated in multiple places. + // Matches `diff --git ...` lines specifically. + function isGitDiffHeader(line) { + return (/^diff --git /).test(line); + } + // Matches lines that denote the start of a new diff's section in a + // multi-file patch: `diff --git ...`, `Index: ...`, or `diff -r ...`. + function isDiffHeader(line) { + return isGitDiffHeader(line) + || (/^Index:\s/).test(line) + || (/^diff(?: -r \w+)+\s/).test(line); + } + // Matches `--- ...` and `+++ ...` file header lines. + function isFileHeader(line) { + return (/^(---|\+\+\+)\s/).test(line); + } + // Matches `@@ ...` hunk header lines. + function isHunkHeader(line) { + return (/^@@\s/).test(line); + } + function parseIndex() { + var _a; + const index = {}; + index.hunks = []; + list.push(index); + // Parse diff metadata + let seenDiffHeader = false; + while (i < diffstr.length) { + const line = diffstr[i]; + // File header (---, +++) or hunk header (@@) found; end parsing diff metadata + if (isFileHeader(line) || isHunkHeader(line)) { + break; + } + // The next two branches handle recognized diff headers. Note that + // isDiffHeader deliberately does NOT match arbitrary `diff` + // commands like `diff -u -p -r1.1 -r1.2`, because in some + // formats (e.g. CVS diffs) such lines appear as metadata within + // a single file's header section, after an `Index:` line. See the + // diffx documentation (https://diffx.org) for examples. + // + // In both branches: if we've already seen a diff header for *this* + // file and now we encounter another one, it must belong to the + // next file, so break. + if (isGitDiffHeader(line)) { + if (seenDiffHeader) { + return; + } + seenDiffHeader = true; + index.isGit = true; + // Parse the old and new filenames from the `diff --git` header and + // tentatively set oldFileName and newFileName from them. These may + // be overridden below by `rename from` / `rename to` or `copy from` / + // `copy to` extended headers, or by --- and +++ lines. But for Git + // diffs that lack all of those (e.g. mode-only changes, binary + // file changes without rename), these are the only filenames we + // get. + // parseGitDiffHeader returns null if the header can't be parsed + // (e.g. unterminated quoted filename, or unexpected format). In + // that case we skip setting filenames here; they may still be + // set from --- / +++ or rename from / rename to lines below. + const paths = parseGitDiffHeader(line); + if (paths) { + index.oldFileName = paths.oldFileName; + index.newFileName = paths.newFileName; + } + // Consume Git extended headers (`old mode`, `new mode`, `rename from`, + // `rename to`, `similarity index`, `index`, `Binary files ... differ`, + // etc.) + i++; + while (i < diffstr.length) { + const extLine = diffstr[i]; + // Stop consuming extended headers if we hit a file header, + // hunk header, or another diff header. + if (isFileHeader(extLine) || isHunkHeader(extLine) || isDiffHeader(extLine)) { + break; + } + // Parse `rename from` / `rename to` lines - these give us + // unambiguous filenames. These lines don't include the + // a/ and b/ prefixes that appear in the `diff --git` header + // and --- / +++ lines, so we add them for consistency. + // Git C-style quotes filenames containing special characters + // (tabs, newlines, backslashes, double quotes), so we must + // unquote them when present. + const renameFromMatch = (/^rename from (.*)/).exec(extLine); + if (renameFromMatch) { + index.oldFileName = 'a/' + unquoteIfQuoted(renameFromMatch[1]); + index.isRename = true; + } + const renameToMatch = (/^rename to (.*)/).exec(extLine); + if (renameToMatch) { + index.newFileName = 'b/' + unquoteIfQuoted(renameToMatch[1]); + index.isRename = true; + } + // Parse copy from / copy to lines similarly + const copyFromMatch = (/^copy from (.*)/).exec(extLine); + if (copyFromMatch) { + index.oldFileName = 'a/' + unquoteIfQuoted(copyFromMatch[1]); + index.isCopy = true; + } + const copyToMatch = (/^copy to (.*)/).exec(extLine); + if (copyToMatch) { + index.newFileName = 'b/' + unquoteIfQuoted(copyToMatch[1]); + index.isCopy = true; + } + const newFileModeMatch = (/^new file mode (\d+)/).exec(extLine); + if (newFileModeMatch) { + index.isCreate = true; + index.newMode = newFileModeMatch[1]; + } + const deletedFileModeMatch = (/^deleted file mode (\d+)/).exec(extLine); + if (deletedFileModeMatch) { + index.isDelete = true; + index.oldMode = deletedFileModeMatch[1]; + } + const oldModeMatch = (/^old mode (\d+)/).exec(extLine); + if (oldModeMatch) { + index.oldMode = oldModeMatch[1]; + } + const newModeMatch = (/^new mode (\d+)/).exec(extLine); + if (newModeMatch) { + index.newMode = newModeMatch[1]; + } + if ((/^Binary files /).test(extLine)) { + index.isBinary = true; + } + i++; + } + continue; + } + else if (isDiffHeader(line)) { + if (seenDiffHeader) { + return; + } + seenDiffHeader = true; + // For Mercurial-style headers like + // diff -r 9117c6561b0b -r 273ce12ad8f1 .hgignore + // or Index: headers like + // Index: something with multiple words + // we extract the trailing filename as the index. + // + // TODO: It seems awkward that we indiscriminately trim off + // trailing whitespace here. Theoretically, couldn't that + // be meaningful - e.g. if the patch represents a diff of a + // file whose name ends with a space? Seems wrong to nuke + // it. But this behaviour has been around since v2.2.1 in + // 2015, so if it's going to change, it should be done + // cautiously and in a new major release, for + // backwards-compat reasons. + // -- ExplodingCabbage + const headerMatch = (/^(?:Index:|diff(?: -r \w+)+)\s+/).exec(line); + if (headerMatch) { + index.index = line.substring(headerMatch[0].length).trim(); + } + } + i++; + } + // Parse file headers if they are defined. Unified diff requires them, but + // there's no technical issues to have an isolated hunk without file header + parseFileHeader(index); + parseFileHeader(index); + // If we got one file header but not the other, that's a malformed patch. + if ((index.oldFileName === undefined) !== (index.newFileName === undefined)) { + throw new Error('Missing ' + (index.oldFileName !== undefined ? '"+++ ..."' : '"--- ..."') + + ' file header for ' + ((_a = index.oldFileName) !== null && _a !== void 0 ? _a : index.newFileName)); + } + while (i < diffstr.length) { + const line = diffstr[i]; + if (isDiffHeader(line) || isFileHeader(line) || (/^===================================================================/).test(line)) { + break; + } + else if (isHunkHeader(line)) { + index.hunks.push(parseHunk()); + } + else { + // Skip blank lines and any other unrecognized content between + // or after hunks. Real-world examples of such content include: + // - `Only in : ` from GNU `diff -r` + // - `Property changes on:` sections from `svn diff` + // - Trailing prose or commentary in email patches + // GNU `patch` tolerates all of these, and so do we. + i++; + } + } + } + /** + * Parses the old and new filenames from a `diff --git` header line. + * + * The format is: + * diff --git a/ b/ + * + * When filenames contain special characters (including newlines, tabs, + * backslashes, or double quotes), Git quotes them with C-style escaping: + * diff --git "a/file\twith\ttabs.txt" "b/file\twith\ttabs.txt" + * + * When filenames don't contain special characters and the old and new names + * are the same, we can unambiguously split on ` b/` by finding where the + * two halves (including their a/ and b/ prefixes) yield matching bare names. + * + * A pathological case exists in which we cannot reliably determine the paths + * from the `diff --git` header. This case is when the following are true: + * - the old and new file paths differ + * - they are both unquoted (i.e. contain no special characters) + * - at least one of the underlying file paths includes the substring ` b/` + * In this scenario, we do not know which occurrence of ` b/` indicates the + * start of the new file path, so the header is inherently ambiguous. We thus + * select a possible interpretation arbitrarily and return that. + * + * Fortunately, this ambiguity should never matter, because in any patch + * genuinely output by Git in which this pathological scenario occurs, there + * must also be `rename from`/`rename to` or `copy from`/`copy to` extended + * headers present below the `diff --git` header. `parseIndex` will parse + * THOSE headers, from which we CAN unambiguously determine the filenames, + * and will discard the result returned by this function. + * + * Returns null if the header can't be parsed at all — e.g. a quoted filename + * has an unterminated quote, or if the unquoted header doesn't match the + * expected `a/... b/...` format. In that case, the caller (parseIndex) + * skips setting oldFileName/newFileName from this header, but they may + * still be set later from `---`/`+++` lines or `rename from`/`rename to` + * extended headers; if none of those are present either, they'll remain + * undefined in the output. + */ + function parseGitDiffHeader(line) { + // Strip the "diff --git " prefix + const rest = line.substring('diff --git '.length); + // Handle quoted paths: "a/path" "b/path" + // Git quotes paths when they contain characters like newlines, tabs, + // backslashes, or double quotes (but notably not spaces). + if (rest.startsWith('"')) { + const oldPath = parseQuotedFileName(rest); + if (oldPath === null) { + return null; + } + const afterOld = rest.substring(oldPath.rawLength + 1); // +1 for space + let newFileName; + if (afterOld.startsWith('"')) { + const newPath = parseQuotedFileName(afterOld); + if (newPath === null) { + return null; + } + newFileName = newPath.fileName; + } + else { + newFileName = afterOld; + } + return { + oldFileName: oldPath.fileName, + newFileName + }; + } + // Check if the second path is quoted + // e.g. diff --git a/simple "b/renamed\nnewline.txt" + const quoteIdx = rest.indexOf('"'); + if (quoteIdx > 0) { + const oldFileName = rest.substring(0, quoteIdx - 1); + const newPath = parseQuotedFileName(rest.substring(quoteIdx)); + if (newPath === null) { + return null; + } + return { + oldFileName, + newFileName: newPath.fileName + }; + } + // Unquoted paths. Try to find the split point. + // The format is: a/ b/ + // + // Note the potential ambiguity caused by the possibility of the file paths + // themselves containing the substring ` b/`, plus the pathological case + // described in the comment above. + // + // Strategy: find all occurrences of " b/" and split on the middle + // one. When old and new names are the same (which is the only case where + // we can't rely on extended headers later in the patch so HAVE to get + // this right), this will always be the correct split. + if (rest.startsWith('a/')) { + const splits = []; + let idx = 0; + while (true) { + idx = rest.indexOf(' b/', idx + 1); + if (idx === -1) { + break; + } + splits.push(idx); + } + if (splits.length > 0) { + const mid = splits[Math.floor(splits.length / 2)]; + return { + oldFileName: rest.substring(0, mid), + newFileName: rest.substring(mid + 1) + }; + } + } + // Fallback: can't parse, return null + return null; + } + /** + * If `s` starts with a double quote, unquotes it using C-style escape + * rules (as used by Git). Otherwise returns `s` as-is. + */ + function unquoteIfQuoted(s) { + if (s.startsWith('"')) { + const parsed = parseQuotedFileName(s); + if (parsed) { + return parsed.fileName; + } + } + return s; + } + /** + * Parses a C-style quoted filename as used by Git or GNU `diff -u`. + * Returns the unescaped filename and the raw length consumed (including quotes). + */ + function parseQuotedFileName(s) { + if (!s.startsWith('"')) { + return null; + } + let result = ''; + let j = 1; // skip opening quote + while (j < s.length) { + if (s[j] === '"') { + return { fileName: result, rawLength: j + 1 }; + } + if (s[j] === '\\' && j + 1 < s.length) { + j++; + switch (s[j]) { + case 'a': + result += '\x07'; + break; + case 'b': + result += '\b'; + break; + case 'f': + result += '\f'; + break; + case 'n': + result += '\n'; + break; + case 'r': + result += '\r'; + break; + case 't': + result += '\t'; + break; + case 'v': + result += '\v'; + break; + case '\\': + result += '\\'; + break; + case '"': + result += '"'; + break; + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': { + // C-style octal escapes represent raw bytes. Collect + // consecutive octal-escaped bytes and decode as UTF-8. + // Validate that we have a full 3-digit octal escape + if (j + 2 >= s.length || s[j + 1] < '0' || s[j + 1] > '7' || s[j + 2] < '0' || s[j + 2] > '7') { + return null; + } + const bytes = [parseInt(s.substring(j, j + 3), 8)]; + j += 3; + while (s[j] === '\\' && s[j + 1] >= '0' && s[j + 1] <= '7') { + if (j + 3 >= s.length || s[j + 2] < '0' || s[j + 2] > '7' || s[j + 3] < '0' || s[j + 3] > '7') { + return null; + } + bytes.push(parseInt(s.substring(j + 1, j + 4), 8)); + j += 4; + } + result += new TextDecoder('utf-8').decode(new Uint8Array(bytes)); + continue; // j already points at the next character + } + // Note that in C, there are also three kinds of hex escape sequences: + // - \xhh + // - \uhhhh + // - \Uhhhhhhhh + // We do not bother to parse them here because, so far as we know, + // they are never emitted by any tools that generate unified diff + // format diffs, and so for now jsdiff does not consider them legal. + default: return null; + } + } + else { + result += s[j]; + } + j++; + } + // Unterminated quote + return null; + } + // Parses the --- and +++ headers, if none are found, no lines + // are consumed. + function parseFileHeader(index) { + const fileHeaderMatch = (/^(---|\+\+\+)\s+/).exec(diffstr[i]); + if (fileHeaderMatch) { + const prefix = fileHeaderMatch[1], data = diffstr[i].substring(3).trim().split('\t', 2), header = (data[1] || '').trim(); + let fileName = data[0]; + if (fileName.startsWith('"')) { + fileName = unquoteIfQuoted(fileName); + } + else { + fileName = fileName.replace(/\\\\/g, '\\'); + } + if (prefix === '---') { + index.oldFileName = fileName; + index.oldHeader = header; + } + else { + index.newFileName = fileName; + index.newHeader = header; + } + i++; + } + } + // Parses a hunk + // This assumes that we are at the start of a hunk. + function parseHunk() { + var _a; + const chunkHeaderIndex = i, chunkHeaderLine = diffstr[i++], chunkHeader = chunkHeaderLine.split(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/); + const hunk = { + oldStart: +chunkHeader[1], + oldLines: typeof chunkHeader[2] === 'undefined' ? 1 : +chunkHeader[2], + newStart: +chunkHeader[3], + newLines: typeof chunkHeader[4] === 'undefined' ? 1 : +chunkHeader[4], + lines: [] + }; + // Unified Diff Format quirk: If the chunk size is 0, + // the first number is one lower than one would expect. + // https://www.artima.com/weblogs/viewpost.jsp?thread=164293 + if (hunk.oldLines === 0) { + hunk.oldStart += 1; + } + if (hunk.newLines === 0) { + hunk.newStart += 1; + } + let addCount = 0, removeCount = 0; + for (; i < diffstr.length && (removeCount < hunk.oldLines || addCount < hunk.newLines || ((_a = diffstr[i]) === null || _a === void 0 ? void 0 : _a.startsWith('\\'))); i++) { + const operation = (diffstr[i].length == 0 && i != (diffstr.length - 1)) ? ' ' : diffstr[i][0]; + if (operation === '+' || operation === '-' || operation === ' ' || operation === '\\') { + hunk.lines.push(diffstr[i]); + if (operation === '+') { + addCount++; + } + else if (operation === '-') { + removeCount++; + } + else if (operation === ' ') { + addCount++; + removeCount++; + } + } + else { + throw new Error(`Hunk at line ${chunkHeaderIndex + 1} contained invalid line ${diffstr[i]}`); + } + } + // Handle the empty block count case + if (!addCount && hunk.newLines === 1) { + hunk.newLines = 0; + } + if (!removeCount && hunk.oldLines === 1) { + hunk.oldLines = 0; + } + // Perform sanity checking + if (addCount !== hunk.newLines) { + throw new Error('Added line count did not match for hunk at line ' + (chunkHeaderIndex + 1)); + } + if (removeCount !== hunk.oldLines) { + throw new Error('Removed line count did not match for hunk at line ' + (chunkHeaderIndex + 1)); + } + // Check for extra hunk-body-like lines after the declared line counts + // were exhausted. If the very next line starts with ' ', '+', or '-', + // the hunk's line counts were probably wrong — unless it's a file + // header (--- or +++), which legitimately appears immediately after a + // hunk in multi-file diffs without Index lines. + if (i < diffstr.length && diffstr[i] && (/^[+ -]/).test(diffstr[i]) + && !isFileHeader(diffstr[i])) { + throw new Error('Hunk at line ' + (chunkHeaderIndex + 1) + + ' has more lines than expected (expected ' + + hunk.oldLines + ' old lines and ' + hunk.newLines + ' new lines)'); + } + return hunk; + } + while (i < diffstr.length) { + parseIndex(); + } + return list; +} diff --git a/node_modules/mocha/node_modules/diff/libesm/patch/reverse.d.ts b/node_modules/mocha/node_modules/diff/libesm/patch/reverse.d.ts new file mode 100644 index 00000000..1d287537 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libesm/patch/reverse.d.ts @@ -0,0 +1,22 @@ +import type { StructuredPatch } from '../types.js'; +/** + * Returns a new structured patch which when applied will undo the original `patch`. + * + * When `patch` is a Git-style patch, `reversePatch` handles extended header information (relating + * to renames, file modes, etc.) to the extent that doing so is possible, but note one fundamental + * limitation: the correct inverse of a patch featuring `copy from`/`copy to` headers cannot, in + * general, be determined based on the information contained in the patch alone, and so + * `reversePatch`'s output when passed such a patch will usually be rejected by `git apply`. (The + * correct inverse would be a patch that deletes the newly-created file, but for Git to apply such + * a patch, the patch must explicitly delete every line of content in the file too, and that + * content cannot be determined from the original patch on its own. `reversePatch` therefore does + * the only vaguely reasonable thing it can do in this scenario: it outputs a patch with a + * `deleted file mode` header - indicating that the file should be deleted - but no hunks.) + * + * @param patch either a single structured patch object (as returned by `structuredPatch`) or an + * array of them (as returned by `parsePatch`). + */ +export declare function reversePatch(structuredPatch: StructuredPatch): StructuredPatch; +export declare function reversePatch(structuredPatch: StructuredPatch[]): StructuredPatch[]; +export declare function reversePatch(structuredPatch: StructuredPatch | StructuredPatch[]): StructuredPatch | StructuredPatch[]; +//# sourceMappingURL=reverse.d.ts.map \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libesm/patch/reverse.d.ts.map b/node_modules/mocha/node_modules/diff/libesm/patch/reverse.d.ts.map new file mode 100644 index 00000000..eed44013 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libesm/patch/reverse.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"reverse.d.ts","sourceRoot":"","sources":["../../src/patch/reverse.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAenD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,YAAY,CAAC,eAAe,EAAE,eAAe,GAAG,eAAe,CAAC;AAChF,wBAAgB,YAAY,CAAC,eAAe,EAAE,eAAe,EAAE,GAAG,eAAe,EAAE,CAAC;AACpF,wBAAgB,YAAY,CAAC,eAAe,EAAE,eAAe,GAAG,eAAe,EAAE,GAAG,eAAe,GAAG,eAAe,EAAE,CAAC"} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libesm/patch/reverse.js b/node_modules/mocha/node_modules/diff/libesm/patch/reverse.js new file mode 100644 index 00000000..8e32194b --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libesm/patch/reverse.js @@ -0,0 +1,60 @@ +function swapPrefix(fileName) { + if (fileName === undefined || fileName === '/dev/null') { + return fileName; + } + if (fileName.startsWith('a/')) { + return 'b/' + fileName.slice(2); + } + if (fileName.startsWith('b/')) { + return 'a/' + fileName.slice(2); + } + return fileName; +} +export function reversePatch(structuredPatch) { + if (Array.isArray(structuredPatch)) { + // (See comment in unixToWin for why we need the pointless-looking anonymous function here) + return structuredPatch.map(patch => reversePatch(patch)).reverse(); + } + const reversed = Object.assign(Object.assign({}, structuredPatch), { oldFileName: structuredPatch.isGit ? swapPrefix(structuredPatch.newFileName) : structuredPatch.newFileName, oldHeader: structuredPatch.newHeader, newFileName: structuredPatch.isGit ? swapPrefix(structuredPatch.oldFileName) : structuredPatch.oldFileName, newHeader: structuredPatch.oldHeader, oldMode: structuredPatch.newMode, newMode: structuredPatch.oldMode, isCreate: structuredPatch.isDelete, isDelete: structuredPatch.isCreate, hunks: structuredPatch.hunks.map(hunk => { + return { + oldLines: hunk.newLines, + oldStart: hunk.newStart, + newLines: hunk.oldLines, + newStart: hunk.oldStart, + lines: hunk.lines.map(l => { + if (l.startsWith('-')) { + return `+${l.slice(1)}`; + } + if (l.startsWith('+')) { + return `-${l.slice(1)}`; + } + return l; + }) + }; + }) }); + if (structuredPatch.isCopy) { + // Reversing a copy means deleting the file that was created by the copy. + // The "old" file in the reversed patch is the copy destination (which + // exists and should be removed), and the "new" file is /dev/null. + // + // Note: we clear the hunks because the original copy's hunks describe + // the diff between the source and destination, not the full content of + // the destination file, so they can't be meaningfully reversed into a + // deletion hunk. This means the resulting patch is not something + // `git apply` will accept (it requires deletion patches to include a + // hunk removing every line). Producing a correct deletion hunk would + // require knowing the full content of the copy destination, which we + // don't have. Consumers that need a `git apply`-compatible patch will + // need to resolve the full file content themselves. + reversed.newFileName = '/dev/null'; + reversed.newHeader = undefined; + reversed.isDelete = true; + delete reversed.isCreate; + delete reversed.isCopy; + delete reversed.isRename; + reversed.hunks = []; + } + // Reversing a rename is just a rename in the opposite direction; + // isRename stays set and the filenames are already swapped above. + return reversed; +} diff --git a/node_modules/mocha/node_modules/diff/libesm/types.d.ts b/node_modules/mocha/node_modules/diff/libesm/types.d.ts new file mode 100644 index 00000000..63cb6498 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libesm/types.d.ts @@ -0,0 +1,260 @@ +export interface ChangeObject { + /** + * The concatenated content of all the tokens represented by this change object - i.e. generally the text that is either added, deleted, or common, as a single string. + * In cases where tokens are considered common but are non-identical (e.g. because an option like `ignoreCase` or a custom `comparator` was used), the value from the *new* string will be provided here. + */ + value: ValueT; + /** + * true if the value was inserted into the new string, otherwise false + */ + added: boolean; + /** + * true if the value was removed from the old string, otherwise false + */ + removed: boolean; + /** + * How many tokens (e.g. chars for `diffChars`, lines for `diffLines`) the value in the change object consists of + */ + count: number; +} +export type Change = ChangeObject; +export type ArrayChange = ChangeObject; +export interface CommonDiffOptions { + /** + * If `true`, the array of change objects returned will contain one change object per token (e.g. one per line if calling `diffLines`), instead of runs of consecutive tokens that are all added / all removed / all conserved being combined into a single change object. + */ + oneChangePerToken?: boolean; +} +export interface TimeoutOption { + /** + * A number of milliseconds after which the diffing algorithm will abort and return `undefined`. + * Supported by the same functions as `maxEditLength`. + */ + timeout: number; +} +export interface MaxEditLengthOption { + /** + * A number specifying the maximum edit distance to consider between the old and new texts. + * You can use this to limit the computational cost of diffing large, very different texts by giving up early if the cost will be huge. + * This option can be passed either to diffing functions (`diffLines`, `diffChars`, etc) or to patch-creation function (`structuredPatch`, `createPatch`, etc), all of which will indicate that the max edit length was reached by returning `undefined` instead of whatever they'd normally return. + */ + maxEditLength: number; +} +export type AbortableDiffOptions = TimeoutOption | MaxEditLengthOption; +export type DiffCallbackNonabortable = (result: ChangeObject[]) => void; +export type DiffCallbackAbortable = (result: ChangeObject[] | undefined) => void; +export interface CallbackOptionNonabortable { + /** + * If provided, the diff will be computed in async mode to avoid blocking the event loop while the diff is calculated. + * The value of the `callback` option should be a function and will be passed the computed diff or patch as its first argument. + */ + callback: DiffCallbackNonabortable; +} +export interface CallbackOptionAbortable { + /** + * If provided, the diff will be computed in async mode to avoid blocking the event loop while the diff is calculated. + * The value of the `callback` option should be a function and will be passed the computed diff or patch as its first argument. + */ + callback: DiffCallbackAbortable; +} +interface DiffArraysOptions extends CommonDiffOptions { + comparator?: (a: T, b: T) => boolean; +} +export interface DiffArraysOptionsNonabortable extends DiffArraysOptions { + /** + * If provided, the diff will be computed in async mode to avoid blocking the event loop while the diff is calculated. + * The value of the `callback` option should be a function and will be passed the computed diff or patch as its first argument. + */ + callback?: DiffCallbackNonabortable; +} +export type DiffArraysOptionsAbortable = DiffArraysOptions & AbortableDiffOptions & Partial>; +interface DiffCharsOptions extends CommonDiffOptions { + /** + * If `true`, the uppercase and lowercase forms of a character are considered equal. + * @default false + */ + ignoreCase?: boolean; +} +export interface DiffCharsOptionsNonabortable extends DiffCharsOptions { + /** + * If provided, the diff will be computed in async mode to avoid blocking the event loop while the diff is calculated. + * The value of the `callback` option should be a function and will be passed the computed diff or patch as its first argument. + */ + callback?: DiffCallbackNonabortable; +} +export type DiffCharsOptionsAbortable = DiffCharsOptions & AbortableDiffOptions & Partial>; +interface DiffLinesOptions extends CommonDiffOptions { + /** + * `true` to remove all trailing CR (`\r`) characters before performing the diff. + * This helps to get a useful diff when diffing UNIX text files against Windows text files. + * @default false + */ + stripTrailingCr?: boolean; + /** + * `true` to treat the newline character at the end of each line as its own token. + * This allows for changes to the newline structure to occur independently of the line content and to be treated as such. + * In general this is the more human friendly form of `diffLines`; the default behavior with this option turned off is better suited for patches and other computer friendly output. + * + * Note that while using `ignoreWhitespace` in combination with `newlineIsToken` is not an error, results may not be as expected. + * With `ignoreWhitespace: true` and `newlineIsToken: false`, changing a completely empty line to contain some spaces is treated as a non-change, but with `ignoreWhitespace: true` and `newlineIsToken: true`, it is treated as an insertion. + * This is because the content of a completely blank line is not a token at all in `newlineIsToken` mode. + * + * @default false + */ + newlineIsToken?: boolean; + /** + * `true` to ignore a missing newline character at the end of the last line when comparing it to other lines. + * (By default, the line `'b\n'` in text `'a\nb\nc'` is not considered equal to the line `'b'` in text `'a\nb'`; this option makes them be considered equal.) + * Ignored if `ignoreWhitespace` or `newlineIsToken` are also true. + * @default false + */ + ignoreNewlineAtEof?: boolean; + /** + * `true` to ignore leading and trailing whitespace characters when checking if two lines are equal. + * @default false + */ + ignoreWhitespace?: boolean; +} +export interface DiffLinesOptionsNonabortable extends DiffLinesOptions { + /** + * If provided, the diff will be computed in async mode to avoid blocking the event loop while the diff is calculated. + * The value of the `callback` option should be a function and will be passed the computed diff or patch as its first argument. + */ + callback?: DiffCallbackNonabortable; +} +export type DiffLinesOptionsAbortable = DiffLinesOptions & AbortableDiffOptions & Partial>; +interface DiffWordsOptions extends CommonDiffOptions { + /** + * Same as in `diffChars`. + * @default false + */ + ignoreCase?: boolean; + /** + * An optional [`Intl.Segmenter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter) object (which must have a `granularity` of `'word'`) for `diffWords` to use to split the text into words. + * + * Note that this is (deliberately) incorrectly typed as `any` to avoid users whose `lib` & `target` settings in tsconfig.json are older than es2022 getting type errors when they build about `Intl.Segmenter` not existing. + * This is kind of ugly, since it makes the type declarations worse for users who genuinely use this feature, but seemed worth it to avoid the majority of the library's users (who probably do not use this particular option) getting confusing errors and being forced to change their `lib` to es2022 (even if their own code doesn't use any es2022 functions). + * + * By default, `diffWords` does not use an `Intl.Segmenter`, just some regexes for splitting text into words. This will tend to give worse results than `Intl.Segmenter` would, but ensures the results are consistent across environments; `Intl.Segmenter` behaviour is only loosely specced and the implementations in browsers could in principle change dramatically in future. If you want to use `diffWords` with an `Intl.Segmenter` but ensure it behaves the same whatever environment you run it in, use an `Intl.Segmenter` polyfill instead of the JavaScript engine's native `Intl.Segmenter` implementation. + * + * Using an `Intl.Segmenter` should allow better word-level diffing of non-English text than the default behaviour. For instance, `Intl.Segmenter`s can generally identify via built-in dictionaries which sequences of adjacent Chinese characters form words, allowing word-level diffing of Chinese. By specifying a language when instantiating the segmenter (e.g. `new Intl.Segmenter('sv', {granularity: 'word'})`) you can also support language-specific rules, like treating Swedish's colon separated contractions (like *k:a* for *kyrka*) as single words; by default this would be seen as two words separated by a colon. + */ + intlSegmenter?: any; +} +export interface DiffWordsOptionsNonabortable extends DiffWordsOptions { + /** + * If provided, the diff will be computed in async mode to avoid blocking the event loop while the diff is calculated. + * The value of the `callback` option should be a function and will be passed the computed diff or patch as its first argument. + */ + callback?: DiffCallbackNonabortable; +} +export type DiffWordsOptionsAbortable = DiffWordsOptions & AbortableDiffOptions & Partial>; +interface DiffSentencesOptions extends CommonDiffOptions { +} +export interface DiffSentencesOptionsNonabortable extends DiffSentencesOptions { + /** + * If provided, the diff will be computed in async mode to avoid blocking the event loop while the diff is calculated. + * The value of the `callback` option should be a function and will be passed the computed diff or patch as its first argument. + */ + callback?: DiffCallbackNonabortable; +} +export type DiffSentencesOptionsAbortable = DiffSentencesOptions & AbortableDiffOptions & Partial>; +interface DiffJsonOptions extends CommonDiffOptions { + /** + * A value to replace `undefined` with. Ignored if a `stringifyReplacer` is provided. + */ + undefinedReplacement?: any; + /** + * A custom replacer function. + * Operates similarly to the `replacer` parameter to [`JSON.stringify()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#the_replacer_parameter), but must be a function. + */ + stringifyReplacer?: (k: string, v: any) => any; +} +export interface DiffJsonOptionsNonabortable extends DiffJsonOptions { + /** + * If provided, the diff will be computed in async mode to avoid blocking the event loop while the diff is calculated. + * The value of the `callback` option should be a function and will be passed the computed diff or patch as its first argument. + */ + callback?: DiffCallbackNonabortable; +} +export type DiffJsonOptionsAbortable = DiffJsonOptions & AbortableDiffOptions & Partial>; +interface DiffCssOptions extends CommonDiffOptions { +} +export interface DiffCssOptionsNonabortable extends DiffCssOptions { + /** + * If provided, the diff will be computed in async mode to avoid blocking the event loop while the diff is calculated. + * The value of the `callback` option should be a function and will be passed the computed diff or patch as its first argument. + */ + callback?: DiffCallbackNonabortable; +} +export type DiffCssOptionsAbortable = DiffCssOptions & AbortableDiffOptions & Partial>; +/** + * Note that this contains the union of ALL options accepted by any of the built-in diffing + * functions. The README notes which options are usable which functions. Using an option with a + * diffing function that doesn't support it might yield unreasonable results. + */ +export type AllDiffOptions = DiffArraysOptions & DiffCharsOptions & DiffWordsOptions & DiffLinesOptions & DiffJsonOptions; +export interface StructuredPatch { + oldFileName: string | undefined; + newFileName: string | undefined; + oldHeader: string | undefined; + newHeader: string | undefined; + hunks: StructuredPatchHunk[]; + index?: string; + /** + * Set to true when the patch was parsed from a Git-style diff (one with a + * `diff --git` header). Controls whether `formatPatch` emits a `diff --git` + * header (instead of `Index:` / underline headers) when formatting the patch. + */ + isGit?: boolean; + /** + * Set to true when parsing a Git diff that includes `rename from`/`rename to` + * extended headers, indicating the file was renamed (and the old file no + * longer exists). Consumers applying the patch should delete the old file. + */ + isRename?: boolean; + /** + * Set to true when parsing a Git diff that includes `copy from`/`copy to` + * extended headers, indicating the file was copied (and the old file still + * exists). Consumers applying the patch should NOT delete the old file. + */ + isCopy?: boolean; + /** + * Set to true when parsing a Git diff that includes a `new file mode` extended + * header, indicating the file was newly created. + */ + isCreate?: boolean; + /** + * Set to true when parsing a Git diff that includes a `deleted file mode` + * extended header, indicating the file was deleted. + */ + isDelete?: boolean; + /** + * The file mode (e.g. `'100644'`, `'100755'`) of the old file, parsed from + * Git extended headers (`old mode` or `deleted file mode`). + */ + oldMode?: string; + /** + * The file mode (e.g. `'100644'`, `'100755'`) of the new file, parsed from + * Git extended headers (`new mode` or `new file mode`). + */ + newMode?: string; + /** + * Set to true when parsing a Git diff that includes a + * `Binary files ... differ` line, indicating a binary file change. + * Binary patches have no hunks, so the patch content alone is not + * sufficient to apply the change; consumers should handle this case + * specially (e.g. by warning the user or fetching the binary content + * separately). + */ + isBinary?: boolean; +} +export interface StructuredPatchHunk { + oldStart: number; + oldLines: number; + newStart: number; + newLines: number; + lines: string[]; +} +export {}; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libesm/types.d.ts.map b/node_modules/mocha/node_modules/diff/libesm/types.d.ts.map new file mode 100644 index 00000000..59f1552d --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libesm/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY,CAAC,MAAM;IAClC;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,EAAE,OAAO,CAAC;IACf;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;CACf;AAMD,MAAM,MAAM,MAAM,GAAG,YAAY,CAAC,MA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AS,CAAC;IAChC,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,KAAK,EAAE,mBAAmB,EAAE,CAAC;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB"} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libesm/types.js b/node_modules/mocha/node_modules/diff/libesm/types.js new file mode 100644 index 00000000..cb0ff5c3 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libesm/types.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/mocha/node_modules/diff/libesm/util/array.d.ts b/node_modules/mocha/node_modules/diff/libesm/util/array.d.ts new file mode 100644 index 00000000..380c16f2 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libesm/util/array.d.ts @@ -0,0 +1,3 @@ +export declare function arrayEqual(a: any[], b: any[]): boolean; +export declare function arrayStartsWith(array: any[], start: any[]): boolean; +//# sourceMappingURL=array.d.ts.map \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libesm/util/array.d.ts.map b/node_modules/mocha/node_modules/diff/libesm/util/array.d.ts.map new file mode 100644 index 00000000..31777194 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libesm/util/array.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"array.d.ts","sourceRoot":"","sources":["../../src/util/array.ts"],"names":[],"mappings":"AAAA,wBAAgB,UAAU,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG,OAAO,CAMtD;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,OAAO,CAYnE"} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libesm/util/array.js b/node_modules/mocha/node_modules/diff/libesm/util/array.js new file mode 100644 index 00000000..c3e00f85 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libesm/util/array.js @@ -0,0 +1,17 @@ +export function arrayEqual(a, b) { + if (a.length !== b.length) { + return false; + } + return arrayStartsWith(a, b); +} +export function arrayStartsWith(array, start) { + if (start.length > array.length) { + return false; + } + for (let i = 0; i < start.length; i++) { + if (start[i] !== array[i]) { + return false; + } + } + return true; +} diff --git a/node_modules/mocha/node_modules/diff/libesm/util/distance-iterator.d.ts b/node_modules/mocha/node_modules/diff/libesm/util/distance-iterator.d.ts new file mode 100644 index 00000000..b3c8462f --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libesm/util/distance-iterator.d.ts @@ -0,0 +1,2 @@ +export default function (start: number, minLine: number, maxLine: number): () => number | undefined; +//# sourceMappingURL=distance-iterator.d.ts.map \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libesm/util/distance-iterator.d.ts.map b/node_modules/mocha/node_modules/diff/libesm/util/distance-iterator.d.ts.map new file mode 100644 index 00000000..6b66bba1 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libesm/util/distance-iterator.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"distance-iterator.d.ts","sourceRoot":"","sources":["../../src/util/distance-iterator.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,OAAO,WAAU,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,MAAM,GAAG,SAAS,CA0CjG"} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libesm/util/distance-iterator.js b/node_modules/mocha/node_modules/diff/libesm/util/distance-iterator.js new file mode 100644 index 00000000..afa63814 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libesm/util/distance-iterator.js @@ -0,0 +1,37 @@ +// Iterator that traverses in the range of [min, max], stepping +// by distance from a given start position. I.e. for [0, 4], with +// start of 2, this will iterate 2, 3, 1, 4, 0. +export default function (start, minLine, maxLine) { + let wantForward = true, backwardExhausted = false, forwardExhausted = false, localOffset = 1; + return function iterator() { + if (wantForward && !forwardExhausted) { + if (backwardExhausted) { + localOffset++; + } + else { + wantForward = false; + } + // Check if trying to fit beyond text length, and if not, check it fits + // after offset location (or desired location on first iteration) + if (start + localOffset <= maxLine) { + return start + localOffset; + } + forwardExhausted = true; + } + if (!backwardExhausted) { + if (!forwardExhausted) { + wantForward = true; + } + // Check if trying to fit before text beginning, and if not, check it fits + // before offset location + if (minLine <= start - localOffset) { + return start - localOffset++; + } + backwardExhausted = true; + return iterator(); + } + // We tried to fit hunk before text beginning and beyond text length, then + // hunk can't fit on the text. Return undefined + return undefined; + }; +} diff --git a/node_modules/mocha/node_modules/diff/libesm/util/params.d.ts b/node_modules/mocha/node_modules/diff/libesm/util/params.d.ts new file mode 100644 index 00000000..d8b059d8 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libesm/util/params.d.ts @@ -0,0 +1,4 @@ +export declare function generateOptions(options: { + [key: string]: any; +} | ((_: unknown) => void), defaults: any): object; +//# sourceMappingURL=params.d.ts.map \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libesm/util/params.d.ts.map b/node_modules/mocha/node_modules/diff/libesm/util/params.d.ts.map new file mode 100644 index 00000000..1bd0acb6 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libesm/util/params.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"params.d.ts","sourceRoot":"","sources":["../../src/util/params.ts"],"names":[],"mappings":"AAAA,wBAAgB,eAAe,CAC7B,OAAO,EAAE;IAAC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC,EACtD,QAAQ,EAAE,GAAG,GACZ,MAAM,CAYR"} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libesm/util/params.js b/node_modules/mocha/node_modules/diff/libesm/util/params.js new file mode 100644 index 00000000..c9921a21 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libesm/util/params.js @@ -0,0 +1,14 @@ +export function generateOptions(options, defaults) { + if (typeof options === 'function') { + defaults.callback = options; + } + else if (options) { + for (const name in options) { + /* istanbul ignore else */ + if (Object.prototype.hasOwnProperty.call(options, name)) { + defaults[name] = options[name]; + } + } + } + return defaults; +} diff --git a/node_modules/mocha/node_modules/diff/libesm/util/string.d.ts b/node_modules/mocha/node_modules/diff/libesm/util/string.d.ts new file mode 100644 index 00000000..96c2a922 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libesm/util/string.d.ts @@ -0,0 +1,30 @@ +export declare function longestCommonPrefix(str1: string, str2: string): string; +export declare function longestCommonSuffix(str1: string, str2: string): string; +export declare function replacePrefix(string: string, oldPrefix: string, newPrefix: string): string; +export declare function replaceSuffix(string: string, oldSuffix: string, newSuffix: string): string; +export declare function removePrefix(string: string, oldPrefix: string): string; +export declare function removeSuffix(string: string, oldSuffix: string): string; +export declare function maximumOverlap(string1: string, string2: string): string; +/** + * Returns true if the string consistently uses Windows line endings. + */ +export declare function hasOnlyWinLineEndings(string: string): boolean; +/** + * Returns true if the string consistently uses Unix line endings. + */ +export declare function hasOnlyUnixLineEndings(string: string): boolean; +/** + * Split a string into segments using a word segmenter, merging consecutive + * segments if they are both whitespace segments. Whitespace segments can + * appear adjacent to one another for two reasons: + * - newlines always get their own segment + * - where a diacritic is attached to a whitespace character in the text, the + * segment ends after the diacritic, so e.g. " \u0300 " becomes two segments. + * This function therefore runs the segmenter's .segment() method and then + * merges consecutive segments of whitespace into a single part. + */ +export declare function segment(string: string, segmenter: Intl.Segmenter): string[]; +export declare function trailingWs(string: string, segmenter?: Intl.Segmenter): string; +export declare function leadingWs(string: string, segmenter?: Intl.Segmenter): string; +export declare function leadingAndTrailingWs(string: string, segmenter?: Intl.Segmenter): [string, string]; +//# sourceMappingURL=string.d.ts.map \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libesm/util/string.d.ts.map b/node_modules/mocha/node_modules/diff/libesm/util/string.d.ts.map new file mode 100644 index 00000000..e026fed0 --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libesm/util/string.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"string.d.ts","sourceRoot":"","sources":["../../src/util/string.ts"],"names":[],"mappings":"AAAA,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAQtE;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAgBtE;AAED,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAK1F;AAED,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAS1F;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAEtE;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAEtE;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAEvE;AAkCD;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAE7D;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAE9D;AAED;;;;;;;;;GASG;AACH,wBAAgB,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,GAAG,MAAM,EAAE,CAW3E;AAgBD,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,IAAI,CAAC,SAAS,GAAG,MAAM,CAuB7E;AAED,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,IAAI,CAAC,SAAS,GAAG,MAAM,CAQ5E;AAED,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,MAAM,EACd,SAAS,CAAC,EAAE,IAAI,CAAC,SAAS,GACzB,CAAC,MAAM,EAAE,MAAM,CAAC,CAelB"} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/libesm/util/string.js b/node_modules/mocha/node_modules/diff/libesm/util/string.js new file mode 100644 index 00000000..edb6d14a --- /dev/null +++ b/node_modules/mocha/node_modules/diff/libesm/util/string.js @@ -0,0 +1,184 @@ +export function longestCommonPrefix(str1, str2) { + let i; + for (i = 0; i < str1.length && i < str2.length; i++) { + if (str1[i] != str2[i]) { + return str1.slice(0, i); + } + } + return str1.slice(0, i); +} +export function longestCommonSuffix(str1, str2) { + let i; + // Unlike longestCommonPrefix, we need a special case to handle all scenarios + // where we return the empty string since str1.slice(-0) will return the + // entire string. + if (!str1 || !str2 || str1[str1.length - 1] != str2[str2.length - 1]) { + return ''; + } + for (i = 0; i < str1.length && i < str2.length; i++) { + if (str1[str1.length - (i + 1)] != str2[str2.length - (i + 1)]) { + return str1.slice(-i); + } + } + return str1.slice(-i); +} +export function replacePrefix(string, oldPrefix, newPrefix) { + if (string.slice(0, oldPrefix.length) != oldPrefix) { + throw Error(`string ${JSON.stringify(string)} doesn't start with prefix ${JSON.stringify(oldPrefix)}; this is a bug`); + } + return newPrefix + string.slice(oldPrefix.length); +} +export function replaceSuffix(string, oldSuffix, newSuffix) { + if (!oldSuffix) { + return string + newSuffix; + } + if (string.slice(-oldSuffix.length) != oldSuffix) { + throw Error(`string ${JSON.stringify(string)} doesn't end with suffix ${JSON.stringify(oldSuffix)}; this is a bug`); + } + return string.slice(0, -oldSuffix.length) + newSuffix; +} +export function removePrefix(string, oldPrefix) { + return replacePrefix(string, oldPrefix, ''); +} +export function removeSuffix(string, oldSuffix) { + return replaceSuffix(string, oldSuffix, ''); +} +export function maximumOverlap(string1, string2) { + return string2.slice(0, overlapCount(string1, string2)); +} +// Nicked from https://stackoverflow.com/a/60422853/1709587 +function overlapCount(a, b) { + // Deal with cases where the strings differ in length + let startA = 0; + if (a.length > b.length) { + startA = a.length - b.length; + } + let endB = b.length; + if (a.length < b.length) { + endB = a.length; + } + // Create a back-reference for each index + // that should be followed in case of a mismatch. + // We only need B to make these references: + const map = Array(endB); + let k = 0; // Index that lags behind j + map[0] = 0; + for (let j = 1; j < endB; j++) { + if (b[j] == b[k]) { + map[j] = map[k]; // skip over the same character (optional optimisation) + } + else { + map[j] = k; + } + while (k > 0 && b[j] != b[k]) { + k = map[k]; + } + if (b[j] == b[k]) { + k++; + } + } + // Phase 2: use these references while iterating over A + k = 0; + for (let i = startA; i < a.length; i++) { + while (k > 0 && a[i] != b[k]) { + k = map[k]; + } + if (a[i] == b[k]) { + k++; + } + } + return k; +} +/** + * Returns true if the string consistently uses Windows line endings. + */ +export function hasOnlyWinLineEndings(string) { + return string.includes('\r\n') && !string.startsWith('\n') && !string.match(/[^\r]\n/); +} +/** + * Returns true if the string consistently uses Unix line endings. + */ +export function hasOnlyUnixLineEndings(string) { + return !string.includes('\r\n') && string.includes('\n'); +} +/** + * Split a string into segments using a word segmenter, merging consecutive + * segments if they are both whitespace segments. Whitespace segments can + * appear adjacent to one another for two reasons: + * - newlines always get their own segment + * - where a diacritic is attached to a whitespace character in the text, the + * segment ends after the diacritic, so e.g. " \u0300 " becomes two segments. + * This function therefore runs the segmenter's .segment() method and then + * merges consecutive segments of whitespace into a single part. + */ +export function segment(string, segmenter) { + const parts = []; + for (const segmentObj of Array.from(segmenter.segment(string))) { + const segment = segmentObj.segment; + if (parts.length && (/\s/).test(parts[parts.length - 1]) && (/\s/).test(segment)) { + parts[parts.length - 1] += segment; + } + else { + parts.push(segment); + } + } + return parts; +} +// The functions below take a `segmenter` argument so that, when called from +// diffWords when it is using a segmenter, they can use a notion of what +// constitutes "whitespace" that is consistent with the segmenter. +// +// USUALLY this will be identical to the result of the non-segmenter-based +// logic, but it differs in at least one case: when whitespace characters are +// modified by diacritics. A word segmenter considers these diacritics to be +// part of the whitespace, whereas our non-segmenter-based logic does not. +// +// Because the segmenter-based approach necessarily requires segmenting the +// entire string, we offer a leadingAndTrailingWs function to allow getting the +// whitespace prefix AND whitespace suffix with a single call to the segmenter, +// for efficiency's sake. +export function trailingWs(string, segmenter) { + if (segmenter) { + return leadingAndTrailingWs(string, segmenter)[1]; + } + // Yes, this looks overcomplicated and dumb - why not replace the whole function with + // return string.match(/\s*$/)[0] + // you ask? Because: + // 1. the trap described at https://markamery.com/blog/quadratic-time-regexes/ would mean doing + // this would cause this function to take O(n²) time in the worst case (specifically when + // there is a massive run of NON-TRAILING whitespace in `string`), and + // 2. the fix proposed in the same blog post, of using a negative lookbehind, is incompatible + // with old Safari versions that we'd like to not break if possible (see + // https://github.com/kpdecker/jsdiff/pull/550) + // It feels absurd to do this with an explicit loop instead of a regex, but I really can't see a + // better way that doesn't result in broken behaviour. + let i; + for (i = string.length - 1; i >= 0; i--) { + if (!string[i].match(/\s/)) { + break; + } + } + return string.substring(i + 1); +} +export function leadingWs(string, segmenter) { + if (segmenter) { + return leadingAndTrailingWs(string, segmenter)[0]; + } + // Thankfully the annoying considerations described in trailingWs don't apply here: + const match = string.match(/^\s*/); + return match ? match[0] : ''; +} +export function leadingAndTrailingWs(string, segmenter) { + if (!segmenter) { + return [leadingWs(string), trailingWs(string)]; + } + if (segmenter.resolvedOptions().granularity != 'word') { + throw new Error('The segmenter passed must have a granularity of "word"'); + } + const segments = segment(string, segmenter); + const firstSeg = segments[0]; + const lastSeg = segments[segments.length - 1]; + const head = (/\s/).test(firstSeg) ? firstSeg : ''; + const tail = (/\s/).test(lastSeg) ? lastSeg : ''; + return [head, tail]; +} diff --git a/node_modules/mocha/node_modules/diff/package.json b/node_modules/mocha/node_modules/diff/package.json index 400c8dd8..c319eee9 100644 --- a/node_modules/mocha/node_modules/diff/package.json +++ b/node_modules/mocha/node_modules/diff/package.json @@ -1,6 +1,6 @@ { "name": "diff", - "version": "7.0.0", + "version": "9.0.0", "description": "A JavaScript text diff implementation.", "keywords": [ "diff", @@ -23,66 +23,108 @@ "license": "BSD-3-Clause", "repository": { "type": "git", - "url": "git://github.com/kpdecker/jsdiff.git" + "url": "https://github.com/kpdecker/jsdiff.git" }, "engines": { "node": ">=0.3.1" }, - "main": "./lib/index.js", - "module": "./lib/index.es6.js", + "main": "./libcjs/index.js", + "module": "./libesm/index.js", "browser": "./dist/diff.js", "unpkg": "./dist/diff.js", "exports": { ".": { - "import": "./lib/index.mjs", - "require": "./lib/index.js" + "import": { + "types": "./libesm/index.d.ts", + "default": "./libesm/index.js" + }, + "require": { + "types": "./libcjs/index.d.ts", + "default": "./libcjs/index.js" + } }, "./package.json": "./package.json", - "./": "./", - "./*": "./*" + "./lib/*.js": { + "import": { + "types": "./libesm/*.d.ts", + "default": "./libesm/*.js" + }, + "require": { + "types": "./libcjs/*.d.ts", + "default": "./libcjs/*.js" + } + }, + "./lib/": { + "import": { + "types": "./libesm/", + "default": "./libesm/" + }, + "require": { + "types": "./libcjs/", + "default": "./libcjs/" + } + } }, + "type": "module", + "types": "libcjs/index.d.ts", "scripts": { - "clean": "rm -rf lib/ dist/", - "build:node": "yarn babel --out-dir lib --source-maps=inline src", - "test": "grunt" + "clean": "rm -rf libcjs/ libesm/ dist/ coverage/ .nyc_output/", + "lint": "yarn eslint", + "build": "yarn lint && yarn generate-esm && yarn generate-cjs && yarn check-types && yarn run-rollup && yarn run-uglify", + "generate-cjs": "yarn tsc --module commonjs --outDir libcjs && node --eval \"fs.writeFileSync('libcjs/package.json', JSON.stringify({type:'commonjs',sideEffects:false}))\"", + "generate-esm": "yarn tsc --module nodenext --outDir libesm --target es6 && node --eval \"fs.writeFileSync('libesm/package.json', JSON.stringify({type:'module',sideEffects:false}))\"", + "check-types": "yarn run-tsd && yarn run-attw", + "test": "nyc yarn _test", + "_test": "yarn build && cross-env NODE_ENV=test yarn run-mocha", + "run-attw": "yarn attw --pack --entrypoints . && yarn attw --pack --entrypoints lib/diff/word.js --profile node16", + "run-tsd": "yarn tsd --typings libesm/ && yarn tsd --files test-d/", + "run-rollup": "rollup -c rollup.config.mjs", + "run-uglify": "uglifyjs dist/diff.js -c -o dist/diff.min.js", + "run-mocha": "mocha --require ./runtime 'test/**/*.js'" }, "devDependencies": { - "@babel/cli": "^7.24.1", - "@babel/core": "^7.24.1", - "@babel/plugin-transform-modules-commonjs": "^7.24.1", - "@babel/preset-env": "^7.24.1", - "@babel/register": "^7.23.7", + "@arethetypeswrong/cli": "^0.18.2", + "@babel/core": "^7.29.0", + "@babel/preset-env": "^7.29.2", + "@babel/register": "^7.28.6", "@colors/colors": "^1.6.0", - "babel-eslint": "^10.0.1", - "babel-loader": "^9.1.3", - "chai": "^4.2.0", - "eslint": "^5.12.0", - "grunt": "^1.6.1", - "grunt-babel": "^8.0.0", - "grunt-cli": "^1.4.3", - "grunt-contrib-clean": "^2.0.1", - "grunt-contrib-copy": "^1.0.0", - "grunt-contrib-uglify": "^5.2.2", - "grunt-contrib-watch": "^1.1.0", - "grunt-eslint": "^24.3.0", - "grunt-exec": "^3.0.0", - "grunt-karma": "^4.0.2", - "grunt-mocha-istanbul": "^5.0.2", - "grunt-mocha-test": "^0.13.3", - "grunt-webpack": "^6.0.0", - "istanbul": "github:kpdecker/istanbul", - "karma": "^6.4.3", - "karma-chrome-launcher": "^3.2.0", + "@eslint/js": "^10.0.1", + "babel-loader": "^10.1.1", + "babel-plugin-istanbul": "8.0.0", + "chai": "^6.2.2", + "cross-env": "^10.1.0", + "eslint": "^10.2.0", + "globals": "^17.5.0", + "karma": "^6.4.4", "karma-mocha": "^2.0.1", "karma-mocha-reporter": "^2.2.5", "karma-sourcemap-loader": "^0.4.0", "karma-webpack": "^5.0.1", - "mocha": "^7.0.0", - "rollup": "^4.13.0", - "rollup-plugin-babel": "^4.2.0", - "semver": "^7.6.0", - "webpack": "^5.90.3", - "webpack-dev-server": "^5.0.3" + "mocha": "^11.7.5", + "nyc": "^18.0.0", + "rollup": "^4.60.1", + "tsd": "^0.33.0", + "typescript": "^6.0.2", + "typescript-eslint": "^8.58.1", + "uglify-js": "^3.19.3", + "webpack": "^5.106.1", + "webpack-dev-server": "^5.2.3" + }, + "nyc": { + "require": [ + "@babel/register" + ], + "reporter": [ + "lcov", + "text" + ], + "sourceMap": false, + "instrument": false, + "check-coverage": true, + "branches": 100, + "lines": 100, + "functions": 100, + "statements": 100 }, - "optionalDependencies": {} -} + "packageManager": "yarn@4.12.0" +} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/diff/release-notes.md b/node_modules/mocha/node_modules/diff/release-notes.md index 21b5d41d..425bbae1 100644 --- a/node_modules/mocha/node_modules/diff/release-notes.md +++ b/node_modules/mocha/node_modules/diff/release-notes.md @@ -1,5 +1,94 @@ # Release Notes +## 9.0.0 + +(All changes part of PR [#672](https://github.com/kpdecker/jsdiff/pull/672).) + +- **ES5 support is dropped**. `parsePatch` now uses `TextDecoder` and `Uint8Array`, which are not available in ES5, and TypeScript is now compiled with the "es6" `target`. From now on, I intend to freely use any features that are deemed "Widely available" by [Baseline](https://web.dev/baseline). Users who need ES5 support should stick to version 8. + +- **C-style quoted strings in filename headers are now properly supported**. + + When the name of either the old or new file in a patch contains "special characters", both GNU `diff` and Git quote the filename in the patch's headers and escape special characters using the same escape sequences that are used in string literals in C, including octal escapes for all non-ASCII characters. Previously, jsdiff had very little support for this; `parsePatch` would remove the quotes, and unescape any escaped backslashes, but would not unescape other escape sequences. `formatPatch`, meanwhile, did not quote or escape special characters at all. + + Now, `parsePatch` parses all the possible escape sequences that GNU diff (or Git) ever output, and `formatPatch` quotes and escapes filenames containing special characters in the same way GNU diff does. + +- **`formatPatch` now omits file headers when `oldFileName` or `newFileName` in the provided patch object are `undefined`**, regardless of the `headerOptions` parameter. (Previously, it would treat the absence of `oldFileName` or `newFileName` as indicating the filename was the word "undefined" and emit headers `--- undefined` / `+++ undefined`.) + +- **`formatPatch` no longer outputs trailing tab characters at the end of `---`/`+++` headers.** + + Previously, if `formatPatch` was passed a patch object to serialize that had empty strings for the `oldHeader` or `newHeader` property, it would include a trailing tab character after the filename in the `---` and/or `+++` file header. Now, this scenario is treated the same as when `oldHeader`/`newHeader` is `undefined` - i.e. the trailing tab is omitted. + +- **`formatPatch` no longer mutates its input** when serializing a patch containing a hunk where either the old or new content contained zero lines. (Such a hunk occurs only when the hunk has no context lines and represents a pure insertion or pure deletion, which for instance will occur whenever one of the two files being diffed is completely empty.) Previously `formatPatch` would provide the correct output but also mutate the `oldLines` or `newLines` property on the hunk, changing the meaning of the underlying patch. + +- **Git-style patches are now supported by `parsePatch`, `formatPatch`, and `reversePatch`**. + + Patches output by `git diff` can include some features that are unlike those output by GNU `diff`, and therefore not handled by an ordinary unified diff format parser. An ordinary diff simply describes the differences between the *content* of two files, but Git diffs can also indicate, via "extended headers", the creation or deletion of (potentially empty) files, indicate that a file was renamed, and contain information about file mode changes. Furthermore, when these changes appear in a diff in the absence of a content change (e.g. when an empty file is created, or a file is renamed without content changes), the patch will contain no associated `---`/`+++` file headers nor any hunks. + + jsdiff previously did not support parsing Git's extended headers, nor hunkless patches. Now `parsePatch` parses some of the extended headers, parses hunkless Git patches, and can determine filenames (e.g. from the extended headers) when parsing a patch that includes no `---` or `+++` file headers. The additional information conveyed by the extended headers we support is recorded on new fields on the result object returned by `parsePatch`. See `isGit` and subsequent properties in the docs in the README.md file. + + `formatPatch` now outputs extended headers based on these new Git-specific properties, and `reversePatch` respects them as far as possible (with one unavoidable caveat noted in the README.md file). + +- **Unpaired file headers now cause `parsePatch` to throw**. + + It remains acceptable to have a patch with no file headers whatsoever (e.g. one that begins with a `@@` hunk header on the very first line), but a patch with *only* a `---` header or only a `+++` header is now considered an error. + +- **`parsePatch` is now more tolerant of "trailing garbage"** + + That is: after a patch, or between files/indexes in a patch, it is now acceptable to have arbitrary lines of "garbage" (so long as they unambiguously have no syntactic meaning - e.g. trailing garbage that leads with a `+`, `-`, or ` ` and thus is interpretable as part of a hunk still triggers a throw). + + This means we no longer reject patches output by tools that include extra data in "garbage" lines not understood by generic unified diff parsers. (For example, SVN patches can include "Property changes on:" lines that generic unified diff parsers should discard as garbage; jsdiff previously threw errors when encountering them.) + + This change brings jsdiff's behaviour more in line with GNU `patch`, which is highly permissive of "garbage". + +- **The `oldFileName` and `newFileName` fields of `StructuredPatch` are now typed as `string | undefined` instead of `string`**. This type change reflects the (pre-existing) reality that `parsePatch` can produce patches without filenames (e.g. when parsing a patch that simply contains hunks with no file headers). + +## 8.0.4 + +- [#667](https://github.com/kpdecker/jsdiff/pull/667) - **fix another bug in `diffWords` when used with an `Intl.Segmenter`**. If the text to be diffed included a combining mark after a whitespace character (i.e. roughly speaking, an accented space), `diffWords` would previously crash. Now this case is handled correctly. + +## 8.0.3 + +- [#631](https://github.com/kpdecker/jsdiff/pull/631) - **fix support for using an `Intl.Segmenter` with `diffWords`**. This has been almost completely broken since the feature was added in v6.0.0, since it would outright crash on any text that featured two consecutive newlines between a pair of words (a very common case). +- [#635](https://github.com/kpdecker/jsdiff/pull/635) - **small tweaks to tokenization behaviour of `diffWords`** when used *without* an `Intl.Segmenter`. Specifically, the soft hyphen (U+00AD) is no longer considered to be a word break, and the multiplication and division signs (`×` and `÷`) are now treated as punctuation instead of as letters / word characters. +- [#641](https://github.com/kpdecker/jsdiff/pull/641) - **the format of file headers in `createPatch` etc. patches can now be customised somewhat**. It now takes a `headerOptions` option that can be used to disable the file headers entirely, or omit the `Index:` line and/or the underline. In particular, this was motivated by a request to make jsdiff patches compatible with react-diff-view, which they now are if produced with `headerOptions: FILE_HEADERS_ONLY`. +- [#647](https://github.com/kpdecker/jsdiff/pull/647) and [#649](https://github.com/kpdecker/jsdiff/pull/649) - **fix denial-of-service vulnerabilities in `parsePatch` whereby adversarial input could cause a memory-leaking infinite loop, typically crashing the calling process**. Also fixed ReDOS vulnerabilities whereby adversarially-crafted patch headers could take cubic time to parse. Now, `parsePatch` should reliably take linear time. (Handling of headers that include the line break characters `\r`, `\u2028`, or `\u2029` in non-trailing positions is also now more reasonable as side effect of the fix.) + +## 8.0.2 + +- [#616](https://github.com/kpdecker/jsdiff/pull/616) **Restored compatibility of `diffSentences` with old Safari versions.** This was broken in 8.0.0 by the introduction of a regex with a [lookbehind assertion](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Regular_expressions/Lookbehind_assertion); these weren't supported in Safari prior to version 16.4. +- [#612](https://github.com/kpdecker/jsdiff/pull/612) **Improved tree shakeability** by marking the built CJS and ESM packages with `sideEffects: false`. + +## 8.0.1 + +- [#610](https://github.com/kpdecker/jsdiff/pull/610) **Fixes types for `diffJson` which were broken by 8.0.0**. The new bundled types in 8.0.0 only allowed `diffJson` to be passed string arguments, but it should've been possible to pass either strings or objects (and now is). Thanks to Josh Kelley for the fix. + +## 8.0.0 + +- [#580](https://github.com/kpdecker/jsdiff/pull/580) **Multiple tweaks to `diffSentences`**: + * tokenization no longer takes quadratic time on pathological inputs (reported as a ReDOS vulnerability by Snyk); is now linear instead + * the final sentence in the string is now handled the same by the tokenizer regardless of whether it has a trailing punctuation mark or not. (Previously, "foo. bar." tokenized to `["foo.", " ", "bar."]` but "foo. bar" tokenized to `["foo.", " bar"]` - i.e. whether the space between sentences was treated as a separate token depended upon whether the final sentence had trailing punctuation or not. This was arbitrary and surprising; it is no longer the case.) + * in a string that starts with a sentence end, like "! hello.", the "!" is now treated as a separate sentence + * the README now correctly documents the tokenization behaviour (it was wrong before) +- [#581](https://github.com/kpdecker/jsdiff/pull/581) - **fixed some regex operations used for tokenization in `diffWords` taking O(n^2) time** in pathological cases +- [#595](https://github.com/kpdecker/jsdiff/pull/595) - **fixed a crash in patch creation functions when handling a single hunk consisting of a very large number (e.g. >130k) of lines**. (This was caused by spreading indefinitely-large arrays to `.push()` using `.apply` or the spread operator and hitting the JS-implementation-specific limit on the maximum number of arguments to a function, as shown at https://stackoverflow.com/a/56809779/1709587; thus the exact threshold to hit the error will depend on the environment in which you were running JsDiff.) +- [#596](https://github.com/kpdecker/jsdiff/pull/596) - **removed the `merge` function**. Previously JsDiff included an undocumented function called `merge` that was meant to, in some sense, merge patches. It had at least a couple of serious bugs that could lead to it returning unambiguously wrong results, and it was difficult to simply "fix" because it was [unclear precisely what it was meant to do](https://github.com/kpdecker/jsdiff/issues/181#issuecomment-2198319542). For now, the fix is to remove it entirely. +- [#591](https://github.com/kpdecker/jsdiff/pull/591) - JsDiff's source code has been rewritten in TypeScript. This change entails the following changes for end users: + * **the `diff` package on npm now includes its own TypeScript type definitions**. Users who previously used the `@types/diff` npm package from DefinitelyTyped should remove that dependency when upgrading JsDiff to v8. + + Note that the transition from the DefinitelyTyped types to JsDiff's own type definitions includes multiple fixes and also removes many exported types previously used for `options` arguments to diffing and patch-generation functions. (There are now different exported options types for abortable calls - ones with a `timeout` or `maxEditLength` that may give a result of `undefined` - and non-abortable calls.) See the TypeScript section of the README for some usage tips. + + * **The `Diff` object is now a class**. Custom extensions of `Diff`, as described in the "Defining custom diffing behaviors" section of the README, can therefore now be done by writing a `class CustomDiff extends Diff` and overriding methods, instead of the old way based on prototype inheritance. (I *think* code that did things the old way should still work, though!) + + * **`diff/lib/index.es6.js` and `diff/lib/index.mjs` no longer exist, and the ESM version of the library is no longer bundled into a single file.** + + * **The `ignoreWhitespace` option for `diffWords` is no longer included in the type declarations**. The effect of passing `ignoreWhitespace: true` has always been to make `diffWords` just call `diffWordsWithSpace` instead, which was confusing, because that behaviour doesn't seem properly described as "ignoring" whitespace at all. The property remains available to non-TypeScript applications for the sake of backwards compatibility, but TypeScript applications will now see a type error if they try to pass `ignoreWhitespace: true` to `diffWords` and should change their code to call `diffWordsWithSpace` instead. + + * JsDiff no longer purports to support ES3 environments. (I'm pretty sure it never truly did, despite claiming to in its README, since even the 1.0.0 release used `Array.map` which was added in ES5.) +- [#601](https://github.com/kpdecker/jsdiff/pull/601) - **`diffJson`'s `stringifyReplacer` option behaves more like `JSON.stringify`'s `replacer` argument now.** In particular: + * Each key/value pair now gets passed through the replacer once instead of twice + * The `key` passed to the replacer when the top-level object is passed in as `value` is now `""` (previously, was `undefined`), and the `key` passed with an array element is the array index as a string, like `"0"` or `"1"` (previously was whatever the key for the entire array was). Both the new behaviours match that of `JSON.stringify`. +- [#602](https://github.com/kpdecker/jsdiff/pull/602) - **diffing functions now consistently return `undefined` when called in async mode** (i.e. with a callback). Previously, there was an odd quirk where they would return `true` if the strings being diffed were equal and `undefined` otherwise. + ## 7.0.0 Just a single (breaking) bugfix, undoing a behaviour change introduced accidentally in 6.0.0: @@ -31,25 +120,33 @@ This is a release containing many, *many* breaking changes. The objective of thi - [#480](https://github.com/kpdecker/jsdiff/pull/480) **Passing `maxEditLength` to `createPatch` & `createTwoFilesPatch` now works properly** (i.e. returns undefined if the max edit distance is exceeded; previous behavior was to crash with a `TypeError` if the edit distance was exceeded). - [#486](https://github.com/kpdecker/jsdiff/pull/486) **The `ignoreWhitespace` option of `diffLines` behaves more sensibly now.** `value`s in returned change objects now include leading/trailing whitespace even when `ignoreWhitespace` is used, just like how with `ignoreCase` the `value`s still reflect the case of one of the original texts instead of being all-lowercase. `ignoreWhitespace` is also now compatible with `newlineIsToken`. Finally, **`diffTrimmedLines` is deprecated** (and removed from the docs) in favour of using `diffLines` with `ignoreWhitespace: true`; the two are, and always have been, equivalent. - [#490](https://github.com/kpdecker/jsdiff/pull/490) **When calling diffing functions in async mode by passing a `callback` option, the diff result will now be passed as the *first* argument to the callback instead of the second.** (Previously, the first argument was never used at all and would always have value `undefined`.) -- [#489](github.com/kpdecker/jsdiff/pull/489) **`this.options` no longer exists on `Diff` objects.** Instead, `options` is now passed as an argument to methods that rely on options, like `equals(left, right, options)`. This fixes a race condition in async mode, where diffing behaviour could be changed mid-execution if a concurrent usage of the same `Diff` instances overwrote its `options`. +- [#489](https://github.com/kpdecker/jsdiff/pull/489) **`this.options` no longer exists on `Diff` objects.** Instead, `options` is now passed as an argument to methods that rely on options, like `equals(left, right, options)`. This fixes a race condition in async mode, where diffing behaviour could be changed mid-execution if a concurrent usage of the same `Diff` instances overwrote its `options`. - [#518](https://github.com/kpdecker/jsdiff/pull/518) **`linedelimiters` no longer exists** on patch objects; instead, when a patch with Windows-style CRLF line endings is parsed, **the lines in `lines` will end with `\r`**. There is now a **new `autoConvertLineEndings` option, on by default**, which makes it so that when a patch with Windows-style line endings is applied to a source file with Unix style line endings, the patch gets autoconverted to use Unix-style line endings, and when a patch with Unix-style line endings is applied to a source file with Windows-style line endings, it gets autoconverted to use Windows-style line endings. -- [#521](https://github.com/kpdecker/jsdiff/pull/521) **the `callback` option is now supported by `structuredPatch`, `createPatch +- [#521](https://github.com/kpdecker/jsdiff/pull/521) **the `callback` option is now supported by `structuredPatch`, `createPatch`, and `createTwoFilesPatch`** - [#529](https://github.com/kpdecker/jsdiff/pull/529) **`parsePatch` can now parse patches where lines starting with `--` or `++` are deleted/inserted**; previously, there were edge cases where the parser would choke on valid patches or give wrong results. -- [#530](https://github.com/kpdecker/jsdiff/pull/530) **Added `ignoreNewlineAtEof` option` to `diffLines`** +- [#530](https://github.com/kpdecker/jsdiff/pull/530) **Added `ignoreNewlineAtEof` option to `diffLines`** - [#533](https://github.com/kpdecker/jsdiff/pull/533) **`applyPatch` uses an entirely new algorithm for fuzzy matching.** Differences between the old and new algorithm are as follows: * The `fuzzFactor` now indicates the maximum [*Levenshtein* distance](https://en.wikipedia.org/wiki/Levenshtein_distance) that there can be between the context shown in a hunk and the actual file content at a location where we try to apply the hunk. (Previously, it represented a maximum [*Hamming* distance](https://en.wikipedia.org/wiki/Hamming_distance), meaning that a single insertion or deletion in the source file could stop a hunk from applying even with a high `fuzzFactor`.) * A hunk containing a deletion can now only be applied in a context where the line to be deleted actually appears verbatim. (Previously, as long as enough context lines in the hunk matched, `applyPatch` would apply the hunk anyway and delete a completely different line.) * The context line immediately before and immediately after an insertion must match exactly between the hunk and the file for a hunk to apply. (Previously this was not required.) -- [#535](https://github.com/kpdecker/jsdiff/pull/535) **A bug in patch generation functions is now fixed** that would sometimes previously cause `\ No newline at end of file` to appear in the wrong place in the generated patch, resulting in the patch being invalid. +- [#535](https://github.com/kpdecker/jsdiff/pull/535) **A bug in patch generation functions is now fixed** that would sometimes previously cause `\ No newline at end of file` to appear in the wrong place in the generated patch, resulting in the patch being invalid. **These invalid patches can also no longer be applied successfully with `applyPatch`.** (It was already the case that tools other than jsdiff, like GNU `patch`, would consider them malformed and refuse to apply them; versions of jsdiff with this fix now do the same thing if you ask them to apply a malformed patch emitted by jsdiff v5.) - [#535](https://github.com/kpdecker/jsdiff/pull/535) **Passing `newlineIsToken: true` to *patch*-generation functions is no longer allowed.** (Passing it to `diffLines` is still supported - it's only functions like `createPatch` where passing `newlineIsToken` is now an error.) Allowing it to be passed never really made sense, since in cases where the option had any effect on the output at all, the effect tended to be causing a garbled patch to be created that couldn't actually be applied to the source file. - [#539](https://github.com/kpdecker/jsdiff/pull/539) **`diffWords` now takes an optional `intlSegmenter` option** which should be an `Intl.Segmenter` with word-level granularity. This provides better tokenization of text into words than the default behaviour, even for English but especially for some other languages for which the default behaviour is poor. +## v5.2.2 - January 2026 + +Only change from 5.2.0 is a backport of the fix to https://github.com/kpdecker/jsdiff/security/advisories/GHSA-73rr-hh4g-fpgx. + +## v5.2.1 (deprecated) + +Accidental release - do not use. + ## v5.2.0 [Commits](https://github.com/kpdecker/jsdiff/compare/v5.1.0...v5.2.0) - [#411](https://github.com/kpdecker/jsdiff/pull/411) Big performance improvement. Previously an O(n) array-copying operation inside the innermost loop of jsdiff's base diffing code increased the overall worst-case time complexity of computing a diff from O(n²) to O(n³). This is now fixed, bringing the worst-case time complexity down to what it theoretically should be for a Myers diff implementation. -- [#448](https://github.com/kpdecker/jsdiff/pull/411) Performance improvement. Diagonals whose furthest-reaching D-path would go off the edge of the edit graph are now skipped, rather than being pointlessly considered as called for by the original Myers diff algorithm. This dramatically speeds up computing diffs where the new text just appends or truncates content at the end of the old text. +- [#448](https://github.com/kpdecker/jsdiff/pull/448) Performance improvement. Diagonals whose furthest-reaching D-path would go off the edge of the edit graph are now skipped, rather than being pointlessly considered as called for by the original Myers diff algorithm. This dramatically speeds up computing diffs where the new text just appends or truncates content at the end of the old text. - [#351](https://github.com/kpdecker/jsdiff/issues/351) Importing from the lib folder - e.g. `require("diff/lib/diff/word.js")` - will work again now. This had been broken for users on the latest version of Node since Node 17.5.0, which changed how Node interprets the `exports` property in jsdiff's `package.json` file. - [#344](https://github.com/kpdecker/jsdiff/issues/344) `diffLines`, `createTwoFilesPatch`, and other patch-creation methods now take an optional `stripTrailingCr: true` option which causes Windows-style `\r\n` line endings to be replaced with Unix-style `\n` line endings before calculating the diff, just like GNU `diff`'s `--strip-trailing-cr` flag. - [#451](https://github.com/kpdecker/jsdiff/pull/451) Added `diff.formatPatch`. @@ -70,6 +167,18 @@ This is a release containing many, *many* breaking changes. The objective of thi [Commits](https://github.com/kpdecker/jsdiff/compare/v4.0.1...v5.0.0) +## v4.0.4 - January 2026 + +Only change from 4.0.2 is a backport of the fix to https://github.com/kpdecker/jsdiff/security/advisories/GHSA-73rr-hh4g-fpgx. + +## v4.0.3 (deprecated) + +Accidental release - do not use. + +## v4.0.2 + +No meaningful changes from v4.0.1 - just removed some cruft that shouldn't've been published. + ## v4.0.1 - January 6th, 2019 - Fix main reference path - b826104 @@ -95,6 +204,10 @@ Compatibility notes: [Commits](https://github.com/kpdecker/jsdiff/compare/v3.5.0...v4.0.0) +## v3.5.1 - January 2026 + +Only change from 3.5.0 is a backport of the fix to https://github.com/kpdecker/jsdiff/security/advisories/GHSA-73rr-hh4g-fpgx. + ## v3.5.0 - March 4th, 2018 - Omit redundant slice in join method of diffArrays - 1023590 diff --git a/node_modules/mocha/node_modules/diff/runtime.js b/node_modules/mocha/node_modules/diff/runtime.js deleted file mode 100644 index 82ea7e69..00000000 --- a/node_modules/mocha/node_modules/diff/runtime.js +++ /dev/null @@ -1,3 +0,0 @@ -require('@babel/register')({ - ignore: ['lib', 'node_modules'] -}); diff --git a/node_modules/mocha/node_modules/escape-string-regexp/index.d.ts b/node_modules/mocha/node_modules/escape-string-regexp/index.d.ts deleted file mode 100644 index 7d34edc7..00000000 --- a/node_modules/mocha/node_modules/escape-string-regexp/index.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** -Escape RegExp special characters. - -You can also use this to escape a string that is inserted into the middle of a regex, for example, into a character class. - -@example -``` -import escapeStringRegexp = require('escape-string-regexp'); - -const escapedString = escapeStringRegexp('How much $ for a 🦄?'); -//=> 'How much \\$ for a 🦄\\?' - -new RegExp(escapedString); -``` -*/ -declare const escapeStringRegexp: (string: string) => string; - -export = escapeStringRegexp; diff --git a/node_modules/mocha/node_modules/escape-string-regexp/index.js b/node_modules/mocha/node_modules/escape-string-regexp/index.js deleted file mode 100644 index 387c5615..00000000 --- a/node_modules/mocha/node_modules/escape-string-regexp/index.js +++ /dev/null @@ -1,13 +0,0 @@ -'use strict'; - -module.exports = string => { - if (typeof string !== 'string') { - throw new TypeError('Expected a string'); - } - - // Escape characters with special meaning either inside or outside character sets. - // Use a simple backslash escape when it’s always valid, and a \unnnn escape when the simpler form would be disallowed by Unicode patterns’ stricter grammar. - return string - .replace(/[|\\{}()[\]^$+*?.]/g, '\\$&') - .replace(/-/g, '\\x2d'); -}; diff --git a/node_modules/mocha/node_modules/escape-string-regexp/license b/node_modules/mocha/node_modules/escape-string-regexp/license deleted file mode 100644 index fa7ceba3..00000000 --- a/node_modules/mocha/node_modules/escape-string-regexp/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (https://sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/mocha/node_modules/escape-string-regexp/package.json b/node_modules/mocha/node_modules/escape-string-regexp/package.json deleted file mode 100644 index c6eb4a91..00000000 --- a/node_modules/mocha/node_modules/escape-string-regexp/package.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "escape-string-regexp", - "version": "4.0.0", - "description": "Escape RegExp special characters", - "license": "MIT", - "repository": "sindresorhus/escape-string-regexp", - "funding": "https://github.com/sponsors/sindresorhus", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "https://sindresorhus.com" - }, - "engines": { - "node": ">=10" - }, - "scripts": { - "test": "xo && ava && tsd" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "keywords": [ - "escape", - "regex", - "regexp", - "regular", - "expression", - "string", - "special", - "characters" - ], - "devDependencies": { - "ava": "^1.4.1", - "tsd": "^0.11.0", - "xo": "^0.28.3" - } -} diff --git a/node_modules/mocha/node_modules/escape-string-regexp/readme.md b/node_modules/mocha/node_modules/escape-string-regexp/readme.md deleted file mode 100644 index 2945dfcb..00000000 --- a/node_modules/mocha/node_modules/escape-string-regexp/readme.md +++ /dev/null @@ -1,34 +0,0 @@ -# escape-string-regexp [![Build Status](https://travis-ci.org/sindresorhus/escape-string-regexp.svg?branch=master)](https://travis-ci.org/sindresorhus/escape-string-regexp) - -> Escape RegExp special characters - -## Install - -``` -$ npm install escape-string-regexp -``` - -## Usage - -```js -const escapeStringRegexp = require('escape-string-regexp'); - -const escapedString = escapeStringRegexp('How much $ for a 🦄?'); -//=> 'How much \\$ for a 🦄\\?' - -new RegExp(escapedString); -``` - -You can also use this to escape a string that is inserted into the middle of a regex, for example, into a character class. - ---- - -
              - - Get professional support for this package with a Tidelift subscription - -
              - - Tidelift helps make open source sustainable for maintainers while giving companies
              assurances about security, maintenance, and licensing for their dependencies. -
              -
              diff --git a/node_modules/mocha/node_modules/glob/LICENSE b/node_modules/mocha/node_modules/glob/LICENSE deleted file mode 100644 index ec7df933..00000000 --- a/node_modules/mocha/node_modules/glob/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) 2009-2023 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/mocha/node_modules/glob/README.md b/node_modules/mocha/node_modules/glob/README.md deleted file mode 100644 index 023cd779..00000000 --- a/node_modules/mocha/node_modules/glob/README.md +++ /dev/null @@ -1,1265 +0,0 @@ -# Glob - -Match files using the patterns the shell uses. - -The most correct and second fastest glob implementation in -JavaScript. (See **Comparison to Other JavaScript Glob -Implementations** at the bottom of this readme.) - -![a fun cartoon logo made of glob characters](https://github.com/isaacs/node-glob/raw/main/logo/glob.png) - -## Usage - -Install with npm - -``` -npm i glob -``` - -**Note** the npm package name is _not_ `node-glob` that's a -different thing that was abandoned years ago. Just `glob`. - -```js -// load using import -import { glob, globSync, globStream, globStreamSync, Glob } from 'glob' -// or using commonjs, that's fine, too -const { - glob, - globSync, - globStream, - globStreamSync, - Glob, -} = require('glob') - -// the main glob() and globSync() resolve/return array of filenames - -// all js files, but don't look in node_modules -const jsfiles = await glob('**/*.js', { ignore: 'node_modules/**' }) - -// pass in a signal to cancel the glob walk -const stopAfter100ms = await glob('**/*.css', { - signal: AbortSignal.timeout(100), -}) - -// multiple patterns supported as well -const images = await glob(['css/*.{png,jpeg}', 'public/*.{png,jpeg}']) - -// but of course you can do that with the glob pattern also -// the sync function is the same, just returns a string[] instead -// of Promise -const imagesAlt = globSync('{css,public}/*.{png,jpeg}') - -// you can also stream them, this is a Minipass stream -const filesStream = globStream(['**/*.dat', 'logs/**/*.log']) - -// construct a Glob object if you wanna do it that way, which -// allows for much faster walks if you have to look in the same -// folder multiple times. -const g = new Glob('**/foo', {}) -// glob objects are async iterators, can also do globIterate() or -// g.iterate(), same deal -for await (const file of g) { - console.log('found a foo file:', file) -} -// pass a glob as the glob options to reuse its settings and caches -const g2 = new Glob('**/bar', g) -// sync iteration works as well -for (const file of g2) { - console.log('found a bar file:', file) -} - -// you can also pass withFileTypes: true to get Path objects -// these are like a Dirent, but with some more added powers -// check out http://npm.im/path-scurry for more info on their API -const g3 = new Glob('**/baz/**', { withFileTypes: true }) -g3.stream().on('data', path => { - console.log( - 'got a path object', - path.fullpath(), - path.isDirectory(), - path.readdirSync().map(e => e.name), - ) -}) - -// if you use stat:true and withFileTypes, you can sort results -// by things like modified time, filter by permission mode, etc. -// All Stats fields will be available in that case. Slightly -// slower, though. -// For example: -const results = await glob('**', { stat: true, withFileTypes: true }) - -const timeSortedFiles = results - .sort((a, b) => a.mtimeMs - b.mtimeMs) - .map(path => path.fullpath()) - -const groupReadableFiles = results - .filter(path => path.mode & 0o040) - .map(path => path.fullpath()) - -// custom ignores can be done like this, for example by saying -// you'll ignore all markdown files, and all folders named 'docs' -const customIgnoreResults = await glob('**', { - ignore: { - ignored: p => /\.md$/.test(p.name), - childrenIgnored: p => p.isNamed('docs'), - }, -}) - -// another fun use case, only return files with the same name as -// their parent folder, plus either `.ts` or `.js` -const folderNamedModules = await glob('**/*.{ts,js}', { - ignore: { - ignored: p => { - const pp = p.parent - return !(p.isNamed(pp.name + '.ts') || p.isNamed(pp.name + '.js')) - }, - }, -}) - -// find all files edited in the last hour, to do this, we ignore -// all of them that are more than an hour old -const newFiles = await glob('**', { - // need stat so we have mtime - stat: true, - // only want the files, not the dirs - nodir: true, - ignore: { - ignored: p => { - return new Date() - p.mtime > 60 * 60 * 1000 - }, - // could add similar childrenIgnored here as well, but - // directory mtime is inconsistent across platforms, so - // probably better not to, unless you know the system - // tracks this reliably. - }, -}) -``` - -**Note** Glob patterns should always use `/` as a path separator, -even on Windows systems, as `\` is used to escape glob -characters. If you wish to use `\` as a path separator _instead -of_ using it as an escape character on Windows platforms, you may -set `windowsPathsNoEscape:true` in the options. In this mode, -special glob characters cannot be escaped, making it impossible -to match a literal `*` `?` and so on in filenames. - -## Command Line Interface - -``` -$ glob -h - -Usage: - glob [options] [ [ ...]] - -Expand the positional glob expression arguments into any matching file system -paths found. - - -c --cmd= - Run the command provided, passing the glob expression - matches as arguments. - - -A --all By default, the glob cli command will not expand any - arguments that are an exact match to a file on disk. - - This prevents double-expanding, in case the shell - expands an argument whose filename is a glob - expression. - - For example, if 'app/*.ts' would match 'app/[id].ts', - then on Windows powershell or cmd.exe, 'glob app/*.ts' - will expand to 'app/[id].ts', as expected. However, in - posix shells such as bash or zsh, the shell will first - expand 'app/*.ts' to a list of filenames. Then glob - will look for a file matching 'app/[id].ts' (ie, - 'app/i.ts' or 'app/d.ts'), which is unexpected. - - Setting '--all' prevents this behavior, causing glob to - treat ALL patterns as glob expressions to be expanded, - even if they are an exact match to a file on disk. - - When setting this option, be sure to enquote arguments - so that the shell will not expand them prior to passing - them to the glob command process. - - -a --absolute Expand to absolute paths - -d --dot-relative Prepend './' on relative matches - -m --mark Append a / on any directories matched - -x --posix Always resolve to posix style paths, using '/' as the - directory separator, even on Windows. Drive letter - absolute matches on Windows will be expanded to their - full resolved UNC maths, eg instead of 'C:\foo\bar', it - will expand to '//?/C:/foo/bar'. - - -f --follow Follow symlinked directories when expanding '**' - -R --realpath Call 'fs.realpath' on all of the results. In the case - of an entry that cannot be resolved, the entry is - omitted. This incurs a slight performance penalty, of - course, because of the added system calls. - - -s --stat Call 'fs.lstat' on all entries, whether required or not - to determine if it's a valid match. - - -b --match-base Perform a basename-only match if the pattern does not - contain any slash characters. That is, '*.js' would be - treated as equivalent to '**/*.js', matching js files - in all directories. - - --dot Allow patterns to match files/directories that start - with '.', even if the pattern does not start with '.' - - --nobrace Do not expand {...} patterns - --nocase Perform a case-insensitive match. This defaults to - 'true' on macOS and Windows platforms, and false on all - others. - - Note: 'nocase' should only be explicitly set when it is - known that the filesystem's case sensitivity differs - from the platform default. If set 'true' on - case-insensitive file systems, then the walk may return - more or less results than expected. - - --nodir Do not match directories, only files. - - Note: to *only* match directories, append a '/' at the - end of the pattern. - - --noext Do not expand extglob patterns, such as '+(a|b)' - --noglobstar Do not expand '**' against multiple path portions. Ie, - treat it as a normal '*' instead. - - --windows-path-no-escape - Use '\' as a path separator *only*, and *never* as an - escape character. If set, all '\' characters are - replaced with '/' in the pattern. - - -D --max-depth= Maximum depth to traverse from the current working - directory - - -C --cwd= Current working directory to execute/match in - -r --root= A string path resolved against the 'cwd', which is used - as the starting point for absolute patterns that start - with '/' (but not drive letters or UNC paths on - Windows). - - Note that this *doesn't* necessarily limit the walk to - the 'root' directory, and doesn't affect the cwd - starting point for non-absolute patterns. A pattern - containing '..' will still be able to traverse out of - the root directory, if it is not an actual root - directory on the filesystem, and any non-absolute - patterns will still be matched in the 'cwd'. - - To start absolute and non-absolute patterns in the same - path, you can use '--root=' to set it to the empty - string. However, be aware that on Windows systems, a - pattern like 'x:/*' or '//host/share/*' will *always* - start in the 'x:/' or '//host/share/' directory, - regardless of the --root setting. - - --platform= Defaults to the value of 'process.platform' if - available, or 'linux' if not. Setting --platform=win32 - on non-Windows systems may cause strange behavior! - - -i --ignore= - Glob patterns to ignore Can be set multiple times - -v --debug Output a huge amount of noisy debug information about - patterns as they are parsed and used to match files. - - -h --help Show this usage information -``` - -## `glob(pattern: string | string[], options?: GlobOptions) => Promise` - -Perform an asynchronous glob search for the pattern(s) specified. -Returns -[Path](https://isaacs.github.io/path-scurry/classes/PathBase) -objects if the `withFileTypes` option is set to `true`. See below -for full options field desciptions. - -## `globSync(pattern: string | string[], options?: GlobOptions) => string[] | Path[]` - -Synchronous form of `glob()`. - -Alias: `glob.sync()` - -## `globIterate(pattern: string | string[], options?: GlobOptions) => AsyncGenerator` - -Return an async iterator for walking glob pattern matches. - -Alias: `glob.iterate()` - -## `globIterateSync(pattern: string | string[], options?: GlobOptions) => Generator` - -Return a sync iterator for walking glob pattern matches. - -Alias: `glob.iterate.sync()`, `glob.sync.iterate()` - -## `globStream(pattern: string | string[], options?: GlobOptions) => Minipass` - -Return a stream that emits all the strings or `Path` objects and -then emits `end` when completed. - -Alias: `glob.stream()` - -## `globStreamSync(pattern: string | string[], options?: GlobOptions) => Minipass` - -Syncronous form of `globStream()`. Will read all the matches as -fast as you consume them, even all in a single tick if you -consume them immediately, but will still respond to backpressure -if they're not consumed immediately. - -Alias: `glob.stream.sync()`, `glob.sync.stream()` - -## `hasMagic(pattern: string | string[], options?: GlobOptions) => boolean` - -Returns `true` if the provided pattern contains any "magic" glob -characters, given the options provided. - -Brace expansion is not considered "magic" unless the -`magicalBraces` option is set, as brace expansion just turns one -string into an array of strings. So a pattern like `'x{a,b}y'` -would return `false`, because `'xay'` and `'xby'` both do not -contain any magic glob characters, and it's treated the same as -if you had called it on `['xay', 'xby']`. When -`magicalBraces:true` is in the options, brace expansion _is_ -treated as a pattern having magic. - -## `escape(pattern: string, options?: GlobOptions) => string` - -Escape all magic characters in a glob pattern, so that it will -only ever match literal strings - -If the `windowsPathsNoEscape` option is used, then characters are -escaped by wrapping in `[]`, because a magic character wrapped in -a character class can only be satisfied by that exact character. - -Slashes (and backslashes in `windowsPathsNoEscape` mode) cannot -be escaped or unescaped. - -## `unescape(pattern: string, options?: GlobOptions) => string` - -Un-escape a glob string that may contain some escaped characters. - -If the `windowsPathsNoEscape` option is used, then square-brace -escapes are removed, but not backslash escapes. For example, it -will turn the string `'[*]'` into `*`, but it will not turn -`'\\*'` into `'*'`, because `\` is a path separator in -`windowsPathsNoEscape` mode. - -When `windowsPathsNoEscape` is not set, then both brace escapes -and backslash escapes are removed. - -Slashes (and backslashes in `windowsPathsNoEscape` mode) cannot -be escaped or unescaped. - -## Class `Glob` - -An object that can perform glob pattern traversals. - -### `const g = new Glob(pattern: string | string[], options: GlobOptions)` - -Options object is required. - -See full options descriptions below. - -Note that a previous `Glob` object can be passed as the -`GlobOptions` to another `Glob` instantiation to re-use settings -and caches with a new pattern. - -Traversal functions can be called multiple times to run the walk -again. - -### `g.stream()` - -Stream results asynchronously, - -### `g.streamSync()` - -Stream results synchronously. - -### `g.iterate()` - -Default async iteration function. Returns an AsyncGenerator that -iterates over the results. - -### `g.iterateSync()` - -Default sync iteration function. Returns a Generator that -iterates over the results. - -### `g.walk()` - -Returns a Promise that resolves to the results array. - -### `g.walkSync()` - -Returns a results array. - -### Properties - -All options are stored as properties on the `Glob` object. - -- `opts` The options provided to the constructor. -- `patterns` An array of parsed immutable `Pattern` objects. - -## Options - -Exported as `GlobOptions` TypeScript interface. A `GlobOptions` -object may be provided to any of the exported methods, and must -be provided to the `Glob` constructor. - -All options are optional, boolean, and false by default, unless -otherwise noted. - -All resolved options are added to the Glob object as properties. - -If you are running many `glob` operations, you can pass a Glob -object as the `options` argument to a subsequent operation to -share the previously loaded cache. - -- `cwd` String path or `file://` string or URL object. The - current working directory in which to search. Defaults to - `process.cwd()`. See also: "Windows, CWDs, Drive Letters, and - UNC Paths", below. - - This option may be either a string path or a `file://` URL - object or string. - -- `root` A string path resolved against the `cwd` option, which - is used as the starting point for absolute patterns that start - with `/`, (but not drive letters or UNC paths on Windows). - - Note that this _doesn't_ necessarily limit the walk to the - `root` directory, and doesn't affect the cwd starting point for - non-absolute patterns. A pattern containing `..` will still be - able to traverse out of the root directory, if it is not an - actual root directory on the filesystem, and any non-absolute - patterns will be matched in the `cwd`. For example, the - pattern `/../*` with `{root:'/some/path'}` will return all - files in `/some`, not all files in `/some/path`. The pattern - `*` with `{root:'/some/path'}` will return all the entries in - the cwd, not the entries in `/some/path`. - - To start absolute and non-absolute patterns in the same - path, you can use `{root:''}`. However, be aware that on - Windows systems, a pattern like `x:/*` or `//host/share/*` will - _always_ start in the `x:/` or `//host/share` directory, - regardless of the `root` setting. - -- `windowsPathsNoEscape` Use `\\` as a path separator _only_, and - _never_ as an escape character. If set, all `\\` characters are - replaced with `/` in the pattern. - - Note that this makes it **impossible** to match against paths - containing literal glob pattern characters, but allows matching - with patterns constructed using `path.join()` and - `path.resolve()` on Windows platforms, mimicking the (buggy!) - behavior of Glob v7 and before on Windows. Please use with - caution, and be mindful of [the caveat below about Windows - paths](#windows). (For legacy reasons, this is also set if - `allowWindowsEscape` is set to the exact value `false`.) - -- `dot` Include `.dot` files in normal matches and `globstar` - matches. Note that an explicit dot in a portion of the pattern - will always match dot files. - -- `magicalBraces` Treat brace expansion like `{a,b}` as a "magic" - pattern. Has no effect if {@link nobrace} is set. - - Only has effect on the {@link hasMagic} function, no effect on - glob pattern matching itself. - -- `dotRelative` Prepend all relative path strings with `./` (or - `.\` on Windows). - - Without this option, returned relative paths are "bare", so - instead of returning `'./foo/bar'`, they are returned as - `'foo/bar'`. - - Relative patterns starting with `'../'` are not prepended with - `./`, even if this option is set. - -- `mark` Add a `/` character to directory matches. Note that this - requires additional stat calls. - -- `nobrace` Do not expand `{a,b}` and `{1..3}` brace sets. - -- `noglobstar` Do not match `**` against multiple filenames. (Ie, - treat it as a normal `*` instead.) - -- `noext` Do not match "extglob" patterns such as `+(a|b)`. - -- `nocase` Perform a case-insensitive match. This defaults to - `true` on macOS and Windows systems, and `false` on all others. - - **Note** `nocase` should only be explicitly set when it is - known that the filesystem's case sensitivity differs from the - platform default. If set `true` on case-sensitive file - systems, or `false` on case-insensitive file systems, then the - walk may return more or less results than expected. - -- `maxDepth` Specify a number to limit the depth of the directory - traversal to this many levels below the `cwd`. - -- `matchBase` Perform a basename-only match if the pattern does - not contain any slash characters. That is, `*.js` would be - treated as equivalent to `**/*.js`, matching all js files in - all directories. - -- `nodir` Do not match directories, only files. (Note: to match - _only_ directories, put a `/` at the end of the pattern.) - - Note: when `follow` and `nodir` are both set, then symbolic - links to directories are also omitted. - -- `stat` Call `lstat()` on all entries, whether required or not - to determine whether it's a valid match. When used with - `withFileTypes`, this means that matches will include data such - as modified time, permissions, and so on. Note that this will - incur a performance cost due to the added system calls. - -- `ignore` string or string[], or an object with `ignore` and - `ignoreChildren` methods. - - If a string or string[] is provided, then this is treated as a - glob pattern or array of glob patterns to exclude from matches. - To ignore all children within a directory, as well as the entry - itself, append `'/**'` to the ignore pattern. - - **Note** `ignore` patterns are _always_ in `dot:true` mode, - regardless of any other settings. - - If an object is provided that has `ignored(path)` and/or - `childrenIgnored(path)` methods, then these methods will be - called to determine whether any Path is a match or if its - children should be traversed, respectively. - -- `follow` Follow symlinked directories when expanding `**` - patterns. This can result in a lot of duplicate references in - the presence of cyclic links, and make performance quite bad. - - By default, a `**` in a pattern will follow 1 symbolic link if - it is not the first item in the pattern, or none if it is the - first item in the pattern, following the same behavior as Bash. - - Note: when `follow` and `nodir` are both set, then symbolic - links to directories are also omitted. - -- `realpath` Set to true to call `fs.realpath` on all of the - results. In the case of an entry that cannot be resolved, the - entry is omitted. This incurs a slight performance penalty, of - course, because of the added system calls. - -- `absolute` Set to true to always receive absolute paths for - matched files. Set to `false` to always receive relative paths - for matched files. - - By default, when this option is not set, absolute paths are - returned for patterns that are absolute, and otherwise paths - are returned that are relative to the `cwd` setting. - - This does _not_ make an extra system call to get the realpath, - it only does string path resolution. - - `absolute` may not be used along with `withFileTypes`. - -- `posix` Set to true to use `/` as the path separator in - returned results. On posix systems, this has no effect. On - Windows systems, this will return `/` delimited path results, - and absolute paths will be returned in their full resolved UNC - path form, eg insted of `'C:\\foo\\bar'`, it will return - `//?/C:/foo/bar`. - -- `platform` Defaults to value of `process.platform` if - available, or `'linux'` if not. Setting `platform:'win32'` on - non-Windows systems may cause strange behavior. - -- `withFileTypes` Return [PathScurry](http://npm.im/path-scurry) - `Path` objects instead of strings. These are similar to a - NodeJS `Dirent` object, but with additional methods and - properties. - - `withFileTypes` may not be used along with `absolute`. - -- `signal` An AbortSignal which will cancel the Glob walk when - triggered. - -- `fs` An override object to pass in custom filesystem methods. - See [PathScurry docs](http://npm.im/path-scurry) for what can - be overridden. - -- `scurry` A [PathScurry](http://npm.im/path-scurry) object used - to traverse the file system. If the `nocase` option is set - explicitly, then any provided `scurry` object must match this - setting. - -- `includeChildMatches` boolean, default `true`. Do not match any - children of any matches. For example, the pattern `**\/foo` - would match `a/foo`, but not `a/foo/b/foo` in this mode. - - This is especially useful for cases like "find all - `node_modules` folders, but not the ones in `node_modules`". - - In order to support this, the `Ignore` implementation must - support an `add(pattern: string)` method. If using the default - `Ignore` class, then this is fine, but if this is set to - `false`, and a custom `Ignore` is provided that does not have - an `add()` method, then it will throw an error. - - **Caveat** It _only_ ignores matches that would be a descendant - of a previous match, and only if that descendant is matched - _after_ the ancestor is encountered. Since the file system walk - happens in indeterminate order, it's possible that a match will - already be added before its ancestor, if multiple or braced - patterns are used. - - For example: - - ```js - const results = await glob( - [ - // likely to match first, since it's just a stat - 'a/b/c/d/e/f', - - // this pattern is more complicated! It must to various readdir() - // calls and test the results against a regular expression, and that - // is certainly going to take a little bit longer. - // - // So, later on, it encounters a match at 'a/b/c/d/e', but it's too - // late to ignore a/b/c/d/e/f, because it's already been emitted. - 'a/[bdf]/?/[a-z]/*', - ], - { includeChildMatches: false }, - ) - ``` - - It's best to only set this to `false` if you can be reasonably - sure that no components of the pattern will potentially match - one another's file system descendants, or if the occasional - included child entry will not cause problems. - -## Glob Primer - -Much more information about glob pattern expansion can be found -by running `man bash` and searching for `Pattern Matching`. - -"Globs" are the patterns you type when you do stuff like `ls -*.js` on the command line, or put `build/*` in a `.gitignore` -file. - -Before parsing the path part patterns, braced sections are -expanded into a set. Braced sections start with `{` and end with -`}`, with 2 or more comma-delimited sections within. Braced -sections may contain slash characters, so `a{/b/c,bcd}` would -expand into `a/b/c` and `abcd`. - -The following characters have special magic meaning when used in -a path portion. With the exception of `**`, none of these match -path separators (ie, `/` on all platforms, and `\` on Windows). - -- `*` Matches 0 or more characters in a single path portion. - When alone in a path portion, it must match at least 1 - character. If `dot:true` is not specified, then `*` will not - match against a `.` character at the start of a path portion. -- `?` Matches 1 character. If `dot:true` is not specified, then - `?` will not match against a `.` character at the start of a - path portion. -- `[...]` Matches a range of characters, similar to a RegExp - range. If the first character of the range is `!` or `^` then - it matches any character not in the range. If the first - character is `]`, then it will be considered the same as `\]`, - rather than the end of the character class. -- `!(pattern|pattern|pattern)` Matches anything that does not - match any of the patterns provided. May _not_ contain `/` - characters. Similar to `*`, if alone in a path portion, then - the path portion must have at least one character. -- `?(pattern|pattern|pattern)` Matches zero or one occurrence of - the patterns provided. May _not_ contain `/` characters. -- `+(pattern|pattern|pattern)` Matches one or more occurrences of - the patterns provided. May _not_ contain `/` characters. -- `*(a|b|c)` Matches zero or more occurrences of the patterns - provided. May _not_ contain `/` characters. -- `@(pattern|pat*|pat?erN)` Matches exactly one of the patterns - provided. May _not_ contain `/` characters. -- `**` If a "globstar" is alone in a path portion, then it - matches zero or more directories and subdirectories searching - for matches. It does not crawl symlinked directories, unless - `{follow:true}` is passed in the options object. A pattern - like `a/b/**` will only match `a/b` if it is a directory. - Follows 1 symbolic link if not the first item in the pattern, - or 0 if it is the first item, unless `follow:true` is set, in - which case it follows all symbolic links. - -`[:class:]` patterns are supported by this implementation, but -`[=c=]` and `[.symbol.]` style class patterns are not. - -### Dots - -If a file or directory path portion has a `.` as the first -character, then it will not match any glob pattern unless that -pattern's corresponding path part also has a `.` as its first -character. - -For example, the pattern `a/.*/c` would match the file at -`a/.b/c`. However the pattern `a/*/c` would not, because `*` does -not start with a dot character. - -You can make glob treat dots as normal characters by setting -`dot:true` in the options. - -### Basename Matching - -If you set `matchBase:true` in the options, and the pattern has -no slashes in it, then it will seek for any file anywhere in the -tree with a matching basename. For example, `*.js` would match -`test/simple/basic.js`. - -### Empty Sets - -If no matching files are found, then an empty array is returned. -This differs from the shell, where the pattern itself is -returned. For example: - -```sh -$ echo a*s*d*f -a*s*d*f -``` - -## Comparisons to other fnmatch/glob implementations - -While strict compliance with the existing standards is a -worthwhile goal, some discrepancies exist between node-glob and -other implementations, and are intentional. - -The double-star character `**` is supported by default, unless -the `noglobstar` flag is set. This is supported in the manner of -bsdglob and bash 5, where `**` only has special significance if -it is the only thing in a path part. That is, `a/**/b` will match -`a/x/y/b`, but `a/**b` will not. - -Note that symlinked directories are not traversed as part of a -`**`, though their contents may match against subsequent portions -of the pattern. This prevents infinite loops and duplicates and -the like. You can force glob to traverse symlinks with `**` by -setting `{follow:true}` in the options. - -There is no equivalent of the `nonull` option. A pattern that -does not find any matches simply resolves to nothing. (An empty -array, immediately ended stream, etc.) - -If brace expansion is not disabled, then it is performed before -any other interpretation of the glob pattern. Thus, a pattern -like `+(a|{b),c)}`, which would not be valid in bash or zsh, is -expanded **first** into the set of `+(a|b)` and `+(a|c)`, and -those patterns are checked for validity. Since those two are -valid, matching proceeds. - -The character class patterns `[:class:]` (posix standard named -classes) style class patterns are supported and unicode-aware, -but `[=c=]` (locale-specific character collation weight), and -`[.symbol.]` (collating symbol), are not. - -### Repeated Slashes - -Unlike Bash and zsh, repeated `/` are always coalesced into a -single path separator. - -### Comments and Negation - -Previously, this module let you mark a pattern as a "comment" if -it started with a `#` character, or a "negated" pattern if it -started with a `!` character. - -These options were deprecated in version 5, and removed in -version 6. - -To specify things that should not match, use the `ignore` option. - -## Windows - -**Please only use forward-slashes in glob expressions.** - -Though windows uses either `/` or `\` as its path separator, only -`/` characters are used by this glob implementation. You must use -forward-slashes **only** in glob expressions. Back-slashes will -always be interpreted as escape characters, not path separators. - -Results from absolute patterns such as `/foo/*` are mounted onto -the root setting using `path.join`. On windows, this will by -default result in `/foo/*` matching `C:\foo\bar.txt`. - -To automatically coerce all `\` characters to `/` in pattern -strings, **thus making it impossible to escape literal glob -characters**, you may set the `windowsPathsNoEscape` option to -`true`. - -### Windows, CWDs, Drive Letters, and UNC Paths - -On posix systems, when a pattern starts with `/`, any `cwd` -option is ignored, and the traversal starts at `/`, plus any -non-magic path portions specified in the pattern. - -On Windows systems, the behavior is similar, but the concept of -an "absolute path" is somewhat more involved. - -#### UNC Paths - -A UNC path may be used as the start of a pattern on Windows -platforms. For example, a pattern like: `//?/x:/*` will return -all file entries in the root of the `x:` drive. A pattern like -`//ComputerName/Share/*` will return all files in the associated -share. - -UNC path roots are always compared case insensitively. - -#### Drive Letters - -A pattern starting with a drive letter, like `c:/*`, will search -in that drive, regardless of any `cwd` option provided. - -If the pattern starts with `/`, and is not a UNC path, and there -is an explicit `cwd` option set with a drive letter, then the -drive letter in the `cwd` is used as the root of the directory -traversal. - -For example, `glob('/tmp', { cwd: 'c:/any/thing' })` will return -`['c:/tmp']` as the result. - -If an explicit `cwd` option is not provided, and the pattern -starts with `/`, then the traversal will run on the root of the -drive provided as the `cwd` option. (That is, it is the result of -`path.resolve('/')`.) - -## Race Conditions - -Glob searching, by its very nature, is susceptible to race -conditions, since it relies on directory walking. - -As a result, it is possible that a file that exists when glob -looks for it may have been deleted or modified by the time it -returns the result. - -By design, this implementation caches all readdir calls that it -makes, in order to cut down on system overhead. However, this -also makes it even more susceptible to races, especially if the -cache object is reused between glob calls. - -Users are thus advised not to use a glob result as a guarantee of -filesystem state in the face of rapid changes. For the vast -majority of operations, this is never a problem. - -### See Also: - -- `man sh` -- `man bash` [Pattern - Matching](https://www.gnu.org/software/bash/manual/html_node/Pattern-Matching.html) -- `man 3 fnmatch` -- `man 5 gitignore` -- [minimatch documentation](https://github.com/isaacs/minimatch) - -## Glob Logo - -Glob's logo was created by [Tanya -Brassie](http://tanyabrassie.com/). Logo files can be found -[here](https://github.com/isaacs/node-glob/tree/master/logo). - -The logo is licensed under a [Creative Commons -Attribution-ShareAlike 4.0 International -License](https://creativecommons.org/licenses/by-sa/4.0/). - -## Contributing - -Any change to behavior (including bugfixes) must come with a -test. - -Patches that fail tests or reduce performance will be rejected. - -```sh -# to run tests -npm test - -# to re-generate test fixtures -npm run test-regen - -# run the benchmarks -npm run bench - -# to profile javascript -npm run prof -``` - -## Comparison to Other JavaScript Glob Implementations - -**tl;dr** - -- If you want glob matching that is as faithful as possible to - Bash pattern expansion semantics, and as fast as possible - within that constraint, _use this module_. -- If you are reasonably sure that the patterns you will encounter - are relatively simple, and want the absolutely fastest glob - matcher out there, _use [fast-glob](http://npm.im/fast-glob)_. -- If you are reasonably sure that the patterns you will encounter - are relatively simple, and want the convenience of - automatically respecting `.gitignore` files, _use - [globby](http://npm.im/globby)_. - -There are some other glob matcher libraries on npm, but these -three are (in my opinion, as of 2023) the best. - ---- - -**full explanation** - -Every library reflects a set of opinions and priorities in the -trade-offs it makes. Other than this library, I can personally -recommend both [globby](http://npm.im/globby) and -[fast-glob](http://npm.im/fast-glob), though they differ in their -benefits and drawbacks. - -Both have very nice APIs and are reasonably fast. - -`fast-glob` is, as far as I am aware, the fastest glob -implementation in JavaScript today. However, there are many -cases where the choices that `fast-glob` makes in pursuit of -speed mean that its results differ from the results returned by -Bash and other sh-like shells, which may be surprising. - -In my testing, `fast-glob` is around 10-20% faster than this -module when walking over 200k files nested 4 directories -deep[1](#fn-webscale). However, there are some inconsistencies -with Bash matching behavior that this module does not suffer -from: - -- `**` only matches files, not directories -- `..` path portions are not handled unless they appear at the - start of the pattern -- `./!()` will not match any files that _start_ with - ``, even if they do not match ``. For - example, `!(9).txt` will not match `9999.txt`. -- Some brace patterns in the middle of a pattern will result in - failing to find certain matches. -- Extglob patterns are allowed to contain `/` characters. - -Globby exhibits all of the same pattern semantics as fast-glob, -(as it is a wrapper around fast-glob) and is slightly slower than -node-glob (by about 10-20% in the benchmark test set, or in other -words, anywhere from 20-50% slower than fast-glob). However, it -adds some API conveniences that may be worth the costs. - -- Support for `.gitignore` and other ignore files. -- Support for negated globs (ie, patterns starting with `!` - rather than using a separate `ignore` option). - -The priority of this module is "correctness" in the sense of -performing a glob pattern expansion as faithfully as possible to -the behavior of Bash and other sh-like shells, with as much speed -as possible. - -Note that prior versions of `node-glob` are _not_ on this list. -Former versions of this module are far too slow for any cases -where performance matters at all, and were designed with APIs -that are extremely dated by current JavaScript standards. - ---- - -[1]: In the cases where this module -returns results and `fast-glob` doesn't, it's even faster, of -course. - -![lumpy space princess saying 'oh my GLOB'](https://github.com/isaacs/node-glob/raw/main/oh-my-glob.gif) - -### Benchmark Results - -First number is time, smaller is better. - -Second number is the count of results returned. - -``` ---- pattern: '**' --- -~~ sync ~~ -node fast-glob sync 0m0.598s 200364 -node globby sync 0m0.765s 200364 -node current globSync mjs 0m0.683s 222656 -node current glob syncStream 0m0.649s 222656 -~~ async ~~ -node fast-glob async 0m0.350s 200364 -node globby async 0m0.509s 200364 -node current glob async mjs 0m0.463s 222656 -node current glob stream 0m0.411s 222656 - ---- pattern: '**/..' --- -~~ sync ~~ -node fast-glob sync 0m0.486s 0 -node globby sync 0m0.769s 200364 -node current globSync mjs 0m0.564s 2242 -node current glob syncStream 0m0.583s 2242 -~~ async ~~ -node fast-glob async 0m0.283s 0 -node globby async 0m0.512s 200364 -node current glob async mjs 0m0.299s 2242 -node current glob stream 0m0.312s 2242 - ---- pattern: './**/0/**/0/**/0/**/0/**/*.txt' --- -~~ sync ~~ -node fast-glob sync 0m0.490s 10 -node globby sync 0m0.517s 10 -node current globSync mjs 0m0.540s 10 -node current glob syncStream 0m0.550s 10 -~~ async ~~ -node fast-glob async 0m0.290s 10 -node globby async 0m0.296s 10 -node current glob async mjs 0m0.278s 10 -node current glob stream 0m0.302s 10 - ---- pattern: './**/[01]/**/[12]/**/[23]/**/[45]/**/*.txt' --- -~~ sync ~~ -node fast-glob sync 0m0.500s 160 -node globby sync 0m0.528s 160 -node current globSync mjs 0m0.556s 160 -node current glob syncStream 0m0.573s 160 -~~ async ~~ -node fast-glob async 0m0.283s 160 -node globby async 0m0.301s 160 -node current glob async mjs 0m0.306s 160 -node current glob stream 0m0.322s 160 - ---- pattern: './**/0/**/0/**/*.txt' --- -~~ sync ~~ -node fast-glob sync 0m0.502s 5230 -node globby sync 0m0.527s 5230 -node current globSync mjs 0m0.544s 5230 -node current glob syncStream 0m0.557s 5230 -~~ async ~~ -node fast-glob async 0m0.285s 5230 -node globby async 0m0.305s 5230 -node current glob async mjs 0m0.304s 5230 -node current glob stream 0m0.310s 5230 - ---- pattern: '**/*.txt' --- -~~ sync ~~ -node fast-glob sync 0m0.580s 200023 -node globby sync 0m0.771s 200023 -node current globSync mjs 0m0.685s 200023 -node current glob syncStream 0m0.649s 200023 -~~ async ~~ -node fast-glob async 0m0.349s 200023 -node globby async 0m0.509s 200023 -node current glob async mjs 0m0.427s 200023 -node current glob stream 0m0.388s 200023 - ---- pattern: '{**/*.txt,**/?/**/*.txt,**/?/**/?/**/*.txt,**/?/**/?/**/?/**/*.txt,**/?/**/?/**/?/**/?/**/*.txt}' --- -~~ sync ~~ -node fast-glob sync 0m0.589s 200023 -node globby sync 0m0.771s 200023 -node current globSync mjs 0m0.716s 200023 -node current glob syncStream 0m0.684s 200023 -~~ async ~~ -node fast-glob async 0m0.351s 200023 -node globby async 0m0.518s 200023 -node current glob async mjs 0m0.462s 200023 -node current glob stream 0m0.468s 200023 - ---- pattern: '**/5555/0000/*.txt' --- -~~ sync ~~ -node fast-glob sync 0m0.496s 1000 -node globby sync 0m0.519s 1000 -node current globSync mjs 0m0.539s 1000 -node current glob syncStream 0m0.567s 1000 -~~ async ~~ -node fast-glob async 0m0.285s 1000 -node globby async 0m0.299s 1000 -node current glob async mjs 0m0.305s 1000 -node current glob stream 0m0.301s 1000 - ---- pattern: './**/0/**/../[01]/**/0/../**/0/*.txt' --- -~~ sync ~~ -node fast-glob sync 0m0.484s 0 -node globby sync 0m0.507s 0 -node current globSync mjs 0m0.577s 4880 -node current glob syncStream 0m0.586s 4880 -~~ async ~~ -node fast-glob async 0m0.280s 0 -node globby async 0m0.298s 0 -node current glob async mjs 0m0.327s 4880 -node current glob stream 0m0.324s 4880 - ---- pattern: '**/????/????/????/????/*.txt' --- -~~ sync ~~ -node fast-glob sync 0m0.547s 100000 -node globby sync 0m0.673s 100000 -node current globSync mjs 0m0.626s 100000 -node current glob syncStream 0m0.618s 100000 -~~ async ~~ -node fast-glob async 0m0.315s 100000 -node globby async 0m0.414s 100000 -node current glob async mjs 0m0.366s 100000 -node current glob stream 0m0.345s 100000 - ---- pattern: './{**/?{/**/?{/**/?{/**/?,,,,},,,,},,,,},,,}/**/*.txt' --- -~~ sync ~~ -node fast-glob sync 0m0.588s 100000 -node globby sync 0m0.670s 100000 -node current globSync mjs 0m0.717s 200023 -node current glob syncStream 0m0.687s 200023 -~~ async ~~ -node fast-glob async 0m0.343s 100000 -node globby async 0m0.418s 100000 -node current glob async mjs 0m0.519s 200023 -node current glob stream 0m0.451s 200023 - ---- pattern: '**/!(0|9).txt' --- -~~ sync ~~ -node fast-glob sync 0m0.573s 160023 -node globby sync 0m0.731s 160023 -node current globSync mjs 0m0.680s 180023 -node current glob syncStream 0m0.659s 180023 -~~ async ~~ -node fast-glob async 0m0.345s 160023 -node globby async 0m0.476s 160023 -node current glob async mjs 0m0.427s 180023 -node current glob stream 0m0.388s 180023 - ---- pattern: './{*/**/../{*/**/../{*/**/../{*/**/../{*/**,,,,},,,,},,,,},,,,},,,,}/*.txt' --- -~~ sync ~~ -node fast-glob sync 0m0.483s 0 -node globby sync 0m0.512s 0 -node current globSync mjs 0m0.811s 200023 -node current glob syncStream 0m0.773s 200023 -~~ async ~~ -node fast-glob async 0m0.280s 0 -node globby async 0m0.299s 0 -node current glob async mjs 0m0.617s 200023 -node current glob stream 0m0.568s 200023 - ---- pattern: './*/**/../*/**/../*/**/../*/**/../*/**/../*/**/../*/**/../*/**/*.txt' --- -~~ sync ~~ -node fast-glob sync 0m0.485s 0 -node globby sync 0m0.507s 0 -node current globSync mjs 0m0.759s 200023 -node current glob syncStream 0m0.740s 200023 -~~ async ~~ -node fast-glob async 0m0.281s 0 -node globby async 0m0.297s 0 -node current glob async mjs 0m0.544s 200023 -node current glob stream 0m0.464s 200023 - ---- pattern: './*/**/../*/**/../*/**/../*/**/../*/**/*.txt' --- -~~ sync ~~ -node fast-glob sync 0m0.486s 0 -node globby sync 0m0.513s 0 -node current globSync mjs 0m0.734s 200023 -node current glob syncStream 0m0.696s 200023 -~~ async ~~ -node fast-glob async 0m0.286s 0 -node globby async 0m0.296s 0 -node current glob async mjs 0m0.506s 200023 -node current glob stream 0m0.483s 200023 - ---- pattern: './0/**/../1/**/../2/**/../3/**/../4/**/../5/**/../6/**/../7/**/*.txt' --- -~~ sync ~~ -node fast-glob sync 0m0.060s 0 -node globby sync 0m0.074s 0 -node current globSync mjs 0m0.067s 0 -node current glob syncStream 0m0.066s 0 -~~ async ~~ -node fast-glob async 0m0.060s 0 -node globby async 0m0.075s 0 -node current glob async mjs 0m0.066s 0 -node current glob stream 0m0.067s 0 - ---- pattern: './**/?/**/?/**/?/**/?/**/*.txt' --- -~~ sync ~~ -node fast-glob sync 0m0.568s 100000 -node globby sync 0m0.651s 100000 -node current globSync mjs 0m0.619s 100000 -node current glob syncStream 0m0.617s 100000 -~~ async ~~ -node fast-glob async 0m0.332s 100000 -node globby async 0m0.409s 100000 -node current glob async mjs 0m0.372s 100000 -node current glob stream 0m0.351s 100000 - ---- pattern: '**/*/**/*/**/*/**/*/**' --- -~~ sync ~~ -node fast-glob sync 0m0.603s 200113 -node globby sync 0m0.798s 200113 -node current globSync mjs 0m0.730s 222137 -node current glob syncStream 0m0.693s 222137 -~~ async ~~ -node fast-glob async 0m0.356s 200113 -node globby async 0m0.525s 200113 -node current glob async mjs 0m0.508s 222137 -node current glob stream 0m0.455s 222137 - ---- pattern: './**/*/**/*/**/*/**/*/**/*.txt' --- -~~ sync ~~ -node fast-glob sync 0m0.622s 200000 -node globby sync 0m0.792s 200000 -node current globSync mjs 0m0.722s 200000 -node current glob syncStream 0m0.695s 200000 -~~ async ~~ -node fast-glob async 0m0.369s 200000 -node globby async 0m0.527s 200000 -node current glob async mjs 0m0.502s 200000 -node current glob stream 0m0.481s 200000 - ---- pattern: '**/*.txt' --- -~~ sync ~~ -node fast-glob sync 0m0.588s 200023 -node globby sync 0m0.771s 200023 -node current globSync mjs 0m0.684s 200023 -node current glob syncStream 0m0.658s 200023 -~~ async ~~ -node fast-glob async 0m0.352s 200023 -node globby async 0m0.516s 200023 -node current glob async mjs 0m0.432s 200023 -node current glob stream 0m0.384s 200023 - ---- pattern: './**/**/**/**/**/**/**/**/*.txt' --- -~~ sync ~~ -node fast-glob sync 0m0.589s 200023 -node globby sync 0m0.766s 200023 -node current globSync mjs 0m0.682s 200023 -node current glob syncStream 0m0.652s 200023 -~~ async ~~ -node fast-glob async 0m0.352s 200023 -node globby async 0m0.523s 200023 -node current glob async mjs 0m0.436s 200023 -node current glob stream 0m0.380s 200023 - ---- pattern: '**/*/*.txt' --- -~~ sync ~~ -node fast-glob sync 0m0.592s 200023 -node globby sync 0m0.776s 200023 -node current globSync mjs 0m0.691s 200023 -node current glob syncStream 0m0.659s 200023 -~~ async ~~ -node fast-glob async 0m0.357s 200023 -node globby async 0m0.513s 200023 -node current glob async mjs 0m0.471s 200023 -node current glob stream 0m0.424s 200023 - ---- pattern: '**/*/**/*.txt' --- -~~ sync ~~ -node fast-glob sync 0m0.585s 200023 -node globby sync 0m0.766s 200023 -node current globSync mjs 0m0.694s 200023 -node current glob syncStream 0m0.664s 200023 -~~ async ~~ -node fast-glob async 0m0.350s 200023 -node globby async 0m0.514s 200023 -node current glob async mjs 0m0.472s 200023 -node current glob stream 0m0.424s 200023 - ---- pattern: '**/[0-9]/**/*.txt' --- -~~ sync ~~ -node fast-glob sync 0m0.544s 100000 -node globby sync 0m0.636s 100000 -node current globSync mjs 0m0.626s 100000 -node current glob syncStream 0m0.621s 100000 -~~ async ~~ -node fast-glob async 0m0.322s 100000 -node globby async 0m0.404s 100000 -node current glob async mjs 0m0.360s 100000 -node current glob stream 0m0.352s 100000 -``` diff --git a/node_modules/mocha/node_modules/glob/dist/commonjs/glob.d.ts b/node_modules/mocha/node_modules/glob/dist/commonjs/glob.d.ts deleted file mode 100644 index 25262b3d..00000000 --- a/node_modules/mocha/node_modules/glob/dist/commonjs/glob.d.ts +++ /dev/null @@ -1,388 +0,0 @@ -import { Minimatch } from 'minimatch'; -import { Minipass } from 'minipass'; -import { FSOption, Path, PathScurry } from 'path-scurry'; -import { IgnoreLike } from './ignore.js'; -import { Pattern } from './pattern.js'; -export type MatchSet = Minimatch['set']; -export type GlobParts = Exclude; -/** - * A `GlobOptions` object may be provided to any of the exported methods, and - * must be provided to the `Glob` constructor. - * - * All options are optional, boolean, and false by default, unless otherwise - * noted. - * - * All resolved options are added to the Glob object as properties. - * - * If you are running many `glob` operations, you can pass a Glob object as the - * `options` argument to a subsequent operation to share the previously loaded - * cache. - */ -export interface GlobOptions { - /** - * Set to `true` to always receive absolute paths for - * matched files. Set to `false` to always return relative paths. - * - * When this option is not set, absolute paths are returned for patterns - * that are absolute, and otherwise paths are returned that are relative - * to the `cwd` setting. - * - * This does _not_ make an extra system call to get - * the realpath, it only does string path resolution. - * - * Conflicts with {@link withFileTypes} - */ - absolute?: boolean; - /** - * Set to false to enable {@link windowsPathsNoEscape} - * - * @deprecated - */ - allowWindowsEscape?: boolean; - /** - * The current working directory in which to search. Defaults to - * `process.cwd()`. - * - * May be eiher a string path or a `file://` URL object or string. - */ - cwd?: string | URL; - /** - * Include `.dot` files in normal matches and `globstar` - * matches. Note that an explicit dot in a portion of the pattern - * will always match dot files. - */ - dot?: boolean; - /** - * Prepend all relative path strings with `./` (or `.\` on Windows). - * - * Without this option, returned relative paths are "bare", so instead of - * returning `'./foo/bar'`, they are returned as `'foo/bar'`. - * - * Relative patterns starting with `'../'` are not prepended with `./`, even - * if this option is set. - */ - dotRelative?: boolean; - /** - * Follow symlinked directories when expanding `**` - * patterns. This can result in a lot of duplicate references in - * the presence of cyclic links, and make performance quite bad. - * - * By default, a `**` in a pattern will follow 1 symbolic link if - * it is not the first item in the pattern, or none if it is the - * first item in the pattern, following the same behavior as Bash. - */ - follow?: boolean; - /** - * string or string[], or an object with `ignore` and `ignoreChildren` - * methods. - * - * If a string or string[] is provided, then this is treated as a glob - * pattern or array of glob patterns to exclude from matches. To ignore all - * children within a directory, as well as the entry itself, append `'/**'` - * to the ignore pattern. - * - * **Note** `ignore` patterns are _always_ in `dot:true` mode, regardless of - * any other settings. - * - * If an object is provided that has `ignored(path)` and/or - * `childrenIgnored(path)` methods, then these methods will be called to - * determine whether any Path is a match or if its children should be - * traversed, respectively. - */ - ignore?: string | string[] | IgnoreLike; - /** - * Treat brace expansion like `{a,b}` as a "magic" pattern. Has no - * effect if {@link nobrace} is set. - * - * Only has effect on the {@link hasMagic} function. - */ - magicalBraces?: boolean; - /** - * Add a `/` character to directory matches. Note that this requires - * additional stat calls in some cases. - */ - mark?: boolean; - /** - * Perform a basename-only match if the pattern does not contain any slash - * characters. That is, `*.js` would be treated as equivalent to - * `**\/*.js`, matching all js files in all directories. - */ - matchBase?: boolean; - /** - * Limit the directory traversal to a given depth below the cwd. - * Note that this does NOT prevent traversal to sibling folders, - * root patterns, and so on. It only limits the maximum folder depth - * that the walk will descend, relative to the cwd. - */ - maxDepth?: number; - /** - * Do not expand `{a,b}` and `{1..3}` brace sets. - */ - nobrace?: boolean; - /** - * Perform a case-insensitive match. This defaults to `true` on macOS and - * Windows systems, and `false` on all others. - * - * **Note** `nocase` should only be explicitly set when it is - * known that the filesystem's case sensitivity differs from the - * platform default. If set `true` on case-sensitive file - * systems, or `false` on case-insensitive file systems, then the - * walk may return more or less results than expected. - */ - nocase?: boolean; - /** - * Do not match directories, only files. (Note: to match - * _only_ directories, put a `/` at the end of the pattern.) - */ - nodir?: boolean; - /** - * Do not match "extglob" patterns such as `+(a|b)`. - */ - noext?: boolean; - /** - * Do not match `**` against multiple filenames. (Ie, treat it as a normal - * `*` instead.) - * - * Conflicts with {@link matchBase} - */ - noglobstar?: boolean; - /** - * Defaults to value of `process.platform` if available, or `'linux'` if - * not. Setting `platform:'win32'` on non-Windows systems may cause strange - * behavior. - */ - platform?: NodeJS.Platform; - /** - * Set to true to call `fs.realpath` on all of the - * results. In the case of an entry that cannot be resolved, the - * entry is omitted. This incurs a slight performance penalty, of - * course, because of the added system calls. - */ - realpath?: boolean; - /** - * - * A string path resolved against the `cwd` option, which - * is used as the starting point for absolute patterns that start - * with `/`, (but not drive letters or UNC paths on Windows). - * - * Note that this _doesn't_ necessarily limit the walk to the - * `root` directory, and doesn't affect the cwd starting point for - * non-absolute patterns. A pattern containing `..` will still be - * able to traverse out of the root directory, if it is not an - * actual root directory on the filesystem, and any non-absolute - * patterns will be matched in the `cwd`. For example, the - * pattern `/../*` with `{root:'/some/path'}` will return all - * files in `/some`, not all files in `/some/path`. The pattern - * `*` with `{root:'/some/path'}` will return all the entries in - * the cwd, not the entries in `/some/path`. - * - * To start absolute and non-absolute patterns in the same - * path, you can use `{root:''}`. However, be aware that on - * Windows systems, a pattern like `x:/*` or `//host/share/*` will - * _always_ start in the `x:/` or `//host/share` directory, - * regardless of the `root` setting. - */ - root?: string; - /** - * A [PathScurry](http://npm.im/path-scurry) object used - * to traverse the file system. If the `nocase` option is set - * explicitly, then any provided `scurry` object must match this - * setting. - */ - scurry?: PathScurry; - /** - * Call `lstat()` on all entries, whether required or not to determine - * if it's a valid match. When used with {@link withFileTypes}, this means - * that matches will include data such as modified time, permissions, and - * so on. Note that this will incur a performance cost due to the added - * system calls. - */ - stat?: boolean; - /** - * An AbortSignal which will cancel the Glob walk when - * triggered. - */ - signal?: AbortSignal; - /** - * Use `\\` as a path separator _only_, and - * _never_ as an escape character. If set, all `\\` characters are - * replaced with `/` in the pattern. - * - * Note that this makes it **impossible** to match against paths - * containing literal glob pattern characters, but allows matching - * with patterns constructed using `path.join()` and - * `path.resolve()` on Windows platforms, mimicking the (buggy!) - * behavior of Glob v7 and before on Windows. Please use with - * caution, and be mindful of [the caveat below about Windows - * paths](#windows). (For legacy reasons, this is also set if - * `allowWindowsEscape` is set to the exact value `false`.) - */ - windowsPathsNoEscape?: boolean; - /** - * Return [PathScurry](http://npm.im/path-scurry) - * `Path` objects instead of strings. These are similar to a - * NodeJS `Dirent` object, but with additional methods and - * properties. - * - * Conflicts with {@link absolute} - */ - withFileTypes?: boolean; - /** - * An fs implementation to override some or all of the defaults. See - * http://npm.im/path-scurry for details about what can be overridden. - */ - fs?: FSOption; - /** - * Just passed along to Minimatch. Note that this makes all pattern - * matching operations slower and *extremely* noisy. - */ - debug?: boolean; - /** - * Return `/` delimited paths, even on Windows. - * - * On posix systems, this has no effect. But, on Windows, it means that - * paths will be `/` delimited, and absolute paths will be their full - * resolved UNC forms, eg instead of `'C:\\foo\\bar'`, it would return - * `'//?/C:/foo/bar'` - */ - posix?: boolean; - /** - * Do not match any children of any matches. For example, the pattern - * `**\/foo` would match `a/foo`, but not `a/foo/b/foo` in this mode. - * - * This is especially useful for cases like "find all `node_modules` - * folders, but not the ones in `node_modules`". - * - * In order to support this, the `Ignore` implementation must support an - * `add(pattern: string)` method. If using the default `Ignore` class, then - * this is fine, but if this is set to `false`, and a custom `Ignore` is - * provided that does not have an `add()` method, then it will throw an - * error. - * - * **Caveat** It *only* ignores matches that would be a descendant of a - * previous match, and only if that descendant is matched *after* the - * ancestor is encountered. Since the file system walk happens in - * indeterminate order, it's possible that a match will already be added - * before its ancestor, if multiple or braced patterns are used. - * - * For example: - * - * ```ts - * const results = await glob([ - * // likely to match first, since it's just a stat - * 'a/b/c/d/e/f', - * - * // this pattern is more complicated! It must to various readdir() - * // calls and test the results against a regular expression, and that - * // is certainly going to take a little bit longer. - * // - * // So, later on, it encounters a match at 'a/b/c/d/e', but it's too - * // late to ignore a/b/c/d/e/f, because it's already been emitted. - * 'a/[bdf]/?/[a-z]/*', - * ], { includeChildMatches: false }) - * ``` - * - * It's best to only set this to `false` if you can be reasonably sure that - * no components of the pattern will potentially match one another's file - * system descendants, or if the occasional included child entry will not - * cause problems. - * - * @default true - */ - includeChildMatches?: boolean; -} -export type GlobOptionsWithFileTypesTrue = GlobOptions & { - withFileTypes: true; - absolute?: undefined; - mark?: undefined; - posix?: undefined; -}; -export type GlobOptionsWithFileTypesFalse = GlobOptions & { - withFileTypes?: false; -}; -export type GlobOptionsWithFileTypesUnset = GlobOptions & { - withFileTypes?: undefined; -}; -export type Result = Opts extends GlobOptionsWithFileTypesTrue ? Path : Opts extends GlobOptionsWithFileTypesFalse ? string : Opts extends GlobOptionsWithFileTypesUnset ? string : string | Path; -export type Results = Result[]; -export type FileTypes = Opts extends GlobOptionsWithFileTypesTrue ? true : Opts extends GlobOptionsWithFileTypesFalse ? false : Opts extends GlobOptionsWithFileTypesUnset ? false : boolean; -/** - * An object that can perform glob pattern traversals. - */ -export declare class Glob implements GlobOptions { - absolute?: boolean; - cwd: string; - root?: string; - dot: boolean; - dotRelative: boolean; - follow: boolean; - ignore?: string | string[] | IgnoreLike; - magicalBraces: boolean; - mark?: boolean; - matchBase: boolean; - maxDepth: number; - nobrace: boolean; - nocase: boolean; - nodir: boolean; - noext: boolean; - noglobstar: boolean; - pattern: string[]; - platform: NodeJS.Platform; - realpath: boolean; - scurry: PathScurry; - stat: boolean; - signal?: AbortSignal; - windowsPathsNoEscape: boolean; - withFileTypes: FileTypes; - includeChildMatches: boolean; - /** - * The options provided to the constructor. - */ - opts: Opts; - /** - * An array of parsed immutable {@link Pattern} objects. - */ - patterns: Pattern[]; - /** - * All options are stored as properties on the `Glob` object. - * - * See {@link GlobOptions} for full options descriptions. - * - * Note that a previous `Glob` object can be passed as the - * `GlobOptions` to another `Glob` instantiation to re-use settings - * and caches with a new pattern. - * - * Traversal functions can be called multiple times to run the walk - * again. - */ - constructor(pattern: string | string[], opts: Opts); - /** - * Returns a Promise that resolves to the results array. - */ - walk(): Promise>; - /** - * synchronous {@link Glob.walk} - */ - walkSync(): Results; - /** - * Stream results asynchronously. - */ - stream(): Minipass, Result>; - /** - * Stream results synchronously. - */ - streamSync(): Minipass, Result>; - /** - * Default sync iteration function. Returns a Generator that - * iterates over the results. - */ - iterateSync(): Generator, void, void>; - [Symbol.iterator](): Generator, void, void>; - /** - * Default async iteration function. Returns an AsyncGenerator that - * iterates over the results. - */ - iterate(): AsyncGenerator, void, void>; - [Symbol.asyncIterator](): AsyncGenerator, void, void>; -} -//# sourceMappingURL=glob.d.ts.map \ No newline at end of file diff --git a/node_modules/mocha/node_modules/glob/dist/commonjs/glob.d.ts.map b/node_modules/mocha/node_modules/glob/dist/commonjs/glob.d.ts.map deleted file mode 100644 index c32dc74c..00000000 --- a/node_modules/mocha/node_modules/glob/dist/commonjs/glob.d.ts.map +++ /dev/null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AE,OAAO,CAAA;IACjB,MAAM,EAAE,UAAU,CAAA;IAClB,IAAI,EAAE,OAAO,CAAA;IACb,MAAM,CAAC,EAAE,WAAW,CAAA;IACpB,oBAAoB,EAAE,OAAO,CAAA;IAC7B,aAAa,EAAE,SAAS,CAAC,IAAI,CAAC,CAAA;IAC9B,mBAAmB,EAAE,OAAO,CAAA;IAE5B;;OAEG;IACH,IAAI,EAAE,IAAI,CAAA;IAEV;;OAEG;IACH,QAAQ,EAAE,OAAO,EAAE,CAAA;IAEnB;;;;;;;;;;;OAWG;gBACS,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,IAAI,EAAE,IAAI;IA2HlD;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAoBpC;;OAEG;IACH,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAgBzB;;OAEG;IACH,MAAM,IAAI,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;IAc9C;;OAEG;IACH,UAAU,IAAI,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;IAclD;;;OAGG;IACH,WAAW,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC;IAGlD,CAAC,MAAM,CAAC,QAAQ,CAAC;IAIjB;;;OAGG;IACH,OAAO,IAAI,cAAc,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC;IAGnD,CAAC,MAAM,CAAC,aAAa,CAAC;CAGvB"} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/glob/dist/commonjs/glob.js b/node_modules/mocha/node_modules/glob/dist/commonjs/glob.js deleted file mode 100644 index e1339bbb..00000000 --- a/node_modules/mocha/node_modules/glob/dist/commonjs/glob.js +++ /dev/null @@ -1,247 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Glob = void 0; -const minimatch_1 = require("minimatch"); -const node_url_1 = require("node:url"); -const path_scurry_1 = require("path-scurry"); -const pattern_js_1 = require("./pattern.js"); -const walker_js_1 = require("./walker.js"); -// if no process global, just call it linux. -// so we default to case-sensitive, / separators -const defaultPlatform = (typeof process === 'object' && - process && - typeof process.platform === 'string') ? - process.platform - : 'linux'; -/** - * An object that can perform glob pattern traversals. - */ -class Glob { - absolute; - cwd; - root; - dot; - dotRelative; - follow; - ignore; - magicalBraces; - mark; - matchBase; - maxDepth; - nobrace; - nocase; - nodir; - noext; - noglobstar; - pattern; - platform; - realpath; - scurry; - stat; - signal; - windowsPathsNoEscape; - withFileTypes; - includeChildMatches; - /** - * The options provided to the constructor. - */ - opts; - /** - * An array of parsed immutable {@link Pattern} objects. - */ - patterns; - /** - * All options are stored as properties on the `Glob` object. - * - * See {@link GlobOptions} for full options descriptions. - * - * Note that a previous `Glob` object can be passed as the - * `GlobOptions` to another `Glob` instantiation to re-use settings - * and caches with a new pattern. - * - * Traversal functions can be called multiple times to run the walk - * again. - */ - constructor(pattern, opts) { - /* c8 ignore start */ - if (!opts) - throw new TypeError('glob options required'); - /* c8 ignore stop */ - this.withFileTypes = !!opts.withFileTypes; - this.signal = opts.signal; - this.follow = !!opts.follow; - this.dot = !!opts.dot; - this.dotRelative = !!opts.dotRelative; - this.nodir = !!opts.nodir; - this.mark = !!opts.mark; - if (!opts.cwd) { - this.cwd = ''; - } - else if (opts.cwd instanceof URL || opts.cwd.startsWith('file://')) { - opts.cwd = (0, node_url_1.fileURLToPath)(opts.cwd); - } - this.cwd = opts.cwd || ''; - this.root = opts.root; - this.magicalBraces = !!opts.magicalBraces; - this.nobrace = !!opts.nobrace; - this.noext = !!opts.noext; - this.realpath = !!opts.realpath; - this.absolute = opts.absolute; - this.includeChildMatches = opts.includeChildMatches !== false; - this.noglobstar = !!opts.noglobstar; - this.matchBase = !!opts.matchBase; - this.maxDepth = - typeof opts.maxDepth === 'number' ? opts.maxDepth : Infinity; - this.stat = !!opts.stat; - this.ignore = opts.ignore; - if (this.withFileTypes && this.absolute !== undefined) { - throw new Error('cannot set absolute and withFileTypes:true'); - } - if (typeof pattern === 'string') { - pattern = [pattern]; - } - this.windowsPathsNoEscape = - !!opts.windowsPathsNoEscape || - opts.allowWindowsEscape === - false; - if (this.windowsPathsNoEscape) { - pattern = pattern.map(p => p.replace(/\\/g, '/')); - } - if (this.matchBase) { - if (opts.noglobstar) { - throw new TypeError('base matching requires globstar'); - } - pattern = pattern.map(p => (p.includes('/') ? p : `./**/${p}`)); - } - this.pattern = pattern; - this.platform = opts.platform || defaultPlatform; - this.opts = { ...opts, platform: this.platform }; - if (opts.scurry) { - this.scurry = opts.scurry; - if (opts.nocase !== undefined && - opts.nocase !== opts.scurry.nocase) { - throw new Error('nocase option contradicts provided scurry option'); - } - } - else { - const Scurry = opts.platform === 'win32' ? path_scurry_1.PathScurryWin32 - : opts.platform === 'darwin' ? path_scurry_1.PathScurryDarwin - : opts.platform ? path_scurry_1.PathScurryPosix - : path_scurry_1.PathScurry; - this.scurry = new Scurry(this.cwd, { - nocase: opts.nocase, - fs: opts.fs, - }); - } - this.nocase = this.scurry.nocase; - // If you do nocase:true on a case-sensitive file system, then - // we need to use regexps instead of strings for non-magic - // path portions, because statting `aBc` won't return results - // for the file `AbC` for example. - const nocaseMagicOnly = this.platform === 'darwin' || this.platform === 'win32'; - const mmo = { - // default nocase based on platform - ...opts, - dot: this.dot, - matchBase: this.matchBase, - nobrace: this.nobrace, - nocase: this.nocase, - nocaseMagicOnly, - nocomment: true, - noext: this.noext, - nonegate: true, - optimizationLevel: 2, - platform: this.platform, - windowsPathsNoEscape: this.windowsPathsNoEscape, - debug: !!this.opts.debug, - }; - const mms = this.pattern.map(p => new minimatch_1.Minimatch(p, mmo)); - const [matchSet, globParts] = mms.reduce((set, m) => { - set[0].push(...m.set); - set[1].push(...m.globParts); - return set; - }, [[], []]); - this.patterns = matchSet.map((set, i) => { - const g = globParts[i]; - /* c8 ignore start */ - if (!g) - throw new Error('invalid pattern object'); - /* c8 ignore stop */ - return new pattern_js_1.Pattern(set, g, 0, this.platform); - }); - } - async walk() { - // Walkers always return array of Path objects, so we just have to - // coerce them into the right shape. It will have already called - // realpath() if the option was set to do so, so we know that's cached. - // start out knowing the cwd, at least - return [ - ...(await new walker_js_1.GlobWalker(this.patterns, this.scurry.cwd, { - ...this.opts, - maxDepth: this.maxDepth !== Infinity ? - this.maxDepth + this.scurry.cwd.depth() - : Infinity, - platform: this.platform, - nocase: this.nocase, - includeChildMatches: this.includeChildMatches, - }).walk()), - ]; - } - walkSync() { - return [ - ...new walker_js_1.GlobWalker(this.patterns, this.scurry.cwd, { - ...this.opts, - maxDepth: this.maxDepth !== Infinity ? - this.maxDepth + this.scurry.cwd.depth() - : Infinity, - platform: this.platform, - nocase: this.nocase, - includeChildMatches: this.includeChildMatches, - }).walkSync(), - ]; - } - stream() { - return new walker_js_1.GlobStream(this.patterns, this.scurry.cwd, { - ...this.opts, - maxDepth: this.maxDepth !== Infinity ? - this.maxDepth + this.scurry.cwd.depth() - : Infinity, - platform: this.platform, - nocase: this.nocase, - includeChildMatches: this.includeChildMatches, - }).stream(); - } - streamSync() { - return new walker_js_1.GlobStream(this.patterns, this.scurry.cwd, { - ...this.opts, - maxDepth: this.maxDepth !== Infinity ? - this.maxDepth + this.scurry.cwd.depth() - : Infinity, - platform: this.platform, - nocase: this.nocase, - includeChildMatches: this.includeChildMatches, - }).streamSync(); - } - /** - * Default sync iteration function. Returns a Generator that - * iterates over the results. - */ - iterateSync() { - return this.streamSync()[Symbol.iterator](); - } - [Symbol.iterator]() { - return this.iterateSync(); - } - /** - * Default async iteration function. Returns an AsyncGenerator that - * iterates over the results. - */ - iterate() { - return this.stream()[Symbol.asyncIterator](); - } - [Symbol.asyncIterator]() { - return this.iterate(); - } -} -exports.Glob = Glob; -//# sourceMappingURL=glob.js.map \ No newline at end of file diff --git a/node_modules/mocha/node_modules/glob/dist/commonjs/glob.js.map b/node_modules/mocha/node_modules/glob/dist/commonjs/glob.js.map deleted file mode 100644 index ddab4197..00000000 --- a/node_modules/mocha/node_modules/glob/dist/commonjs/glob.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"glob.js","sourceRoot":"","sources":["../../src/glob.ts"],"names":[],"mappings":";;;AAAA,yCAAuD;AAEvD,uCAAwC;AACxC,6CAOoB;AAEpB,6CAAsC;AACtC,2CAAoD;AAKpD,4CAA4C;AAC5C,gDAAgD;AAChD,MAAM,eAAe,GACnB,CACE,OAAO,OAAO,KAAK,QAAQ;IAC3B,OAAO;IACP,OAAO,OAAO,CAAC,QAAQ,KAAK,QAAQ,CACrC,CAAC,CAAC;IACD,OAAO,CAAC,QAAQ;IAClB,CAAC,CAAC,OAAO,CAAA;AAyVX;;GAEG;AACH,MAAa,IAAI;IACf,QAAQ,CAAU;IAClB,GAAG,CAAQ;IACX,IAAI,CAAS;IACb,GAAG,CAAS;IACZ,WAAW,CAAS;IACpB,MAAM,CAAS;IACf,MAAM,CAAiC;IACvC,aAAa,CAAS;IACtB,IAAI,CAAU;IACd,SAAS,CAAS;IAClB,QAAQ,CAAQ;IAChB,OAAO,CAAS;IAChB,MAAM,CAAS;IACf,KAAK,CAAS;IACd,KAAK,CAAS;IACd,UAAU,CAAS;IACnB,OAAO,CAAU;IACjB,QAAQ,CAAiB;IACzB,QAAQ,CAAS;IACjB,MAAM,CAAY;IAClB,IAAI,CAAS;IACb,MAAM,CAAc;IACpB,oBAAoB,CAAS;IAC7B,aAAa,CAAiB;IAC9B,mBAAmB,CAAS;IAE5B;;OAEG;IACH,IAAI,CAAM;IAEV;;OAEG;IACH,QAAQ,CAAW;IAEnB;;;;;;;;;;;OAWG;IACH,YAAY,OAA0B,EAAE,IAAU;QAChD,qBAAqB;QACrB,IAAI,CAAC,IAAI;YAAE,MAAM,IAAI,SAAS,CAAC,uBAAuB,CAAC,CAAA;QACvD,oBAAoB;QACpB,IAA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CAAC;IACD,CAAC,MAAM,CAAC,aAAa,CAAC;QACpB,OAAO,IAAI,CAAC,OAAO,EAAE,CAAA;IACvB,CAAC;CACF;AA7QD,oBA6QC","sourcesContent":["import { Minimatch, MinimatchOptions } from 'minimatch'\nimport { Minipass } from 'minipass'\nimport { fileURLToPath } from 'node:url'\nimport {\n FSOption,\n Path,\n PathScurry,\n PathScurryDarwin,\n PathScurryPosix,\n PathScurryWin32,\n} from 'path-scurry'\nimport { IgnoreLike } from './ignore.js'\nimport { Pattern } from './pattern.js'\nimport { GlobStream, GlobWalker } from './walker.js'\n\nexport type MatchSet = Minimatch['set']\nexport type GlobParts = Exclude\n\n// if no process global, just call it linux.\n// so we default to case-sensitive, / separators\nconst defaultPlatform: NodeJS.Platform =\n (\n typeof process === 'object' &&\n process &&\n typeof process.platform === 'string'\n ) ?\n process.platform\n : 'linux'\n\n/**\n * A `GlobOptions` object may be provided to any of the exported methods, and\n * must be provided to the `Glob` constructor.\n *\n * All options are optional, boolean, and false by default, unless otherwise\n * noted.\n *\n * All resolved options are added to the Glob object as properties.\n *\n * If you are running many `glob` operations, you can pass a Glob object as the\n * `options` argument to a subsequent operation to share the previously loaded\n * cache.\n */\nexport interface GlobOptions {\n /**\n * Set to `true` to always receive absolute paths for\n * matched files. Set to `false` to always return relative paths.\n *\n * When this option is not set, absolute paths are returned for patterns\n * that are absolute, and otherwise paths are returned that are relative\n * to the `cwd` setting.\n *\n * This does _not_ make an extra system call to get\n * the realpath, it only does string path resolution.\n *\n * Conflicts with {@link withFileTypes}\n */\n absolute?: boolean\n\n /**\n * Set to false to enable {@link windowsPathsNoEscape}\n *\n * @deprecated\n */\n allowWindowsEscape?: boolean\n\n /**\n * The current working directory in which to search. Defaults to\n * `process.cwd()`.\n *\n * May be eiher a string path or a `file://` URL object or string.\n */\n cwd?: string | URL\n\n /**\n * Include `.dot` files in normal matches and `globstar`\n * matches. Note that an explicit dot in a portion of the pattern\n * will always match dot files.\n */\n dot?: boolean\n\n /**\n * Prepend all relative path strings with `./` (or `.\\` on Windows).\n *\n * Without this option, returned relative paths are \"bare\", so instead of\n * returning `'./foo/bar'`, they are returned as `'foo/bar'`.\n *\n * Relative patterns starting with `'../'` are not prepended with `./`, even\n * if this option is set.\n */\n dotRelative?: boolean\n\n /**\n * Follow symlinked directories when expanding `**`\n * patterns. This can result in a lot of duplicate references in\n * the presence of cyclic links, and make performance quite bad.\n *\n * By default, a `**` in a pattern will follow 1 symbolic link if\n * it is not the first item in the pattern, or none if it is the\n * first item in the pattern, following the same behavior as Bash.\n */\n follow?: boolean\n\n /**\n * string or string[], or an object with `ignore` and `ignoreChildren`\n * methods.\n *\n * If a string or string[] is provided, then this is treated as a glob\n * pattern or array of glob patterns to exclude from matches. To ignore all\n * children within a directory, as well as the entry itself, append `'/**'`\n * to the ignore pattern.\n *\n * **Note** `ignore` patterns are _always_ in `dot:true` mode, regardless of\n * any other settings.\n *\n * If an object is provided that has `ignored(path)` and/or\n * `childrenIgnored(path)` methods, then these methods will be called to\n * determine whether any Path is a match or if its children should be\n * traversed, respectively.\n */\n ignore?: string | string[] | IgnoreLike\n\n /**\n * Treat brace expansion like `{a,b}` as a \"magic\" pattern. Has no\n * effect if {@link nobrace} is set.\n *\n * Only has effect on the {@link hasMagic} function.\n */\n magicalBraces?: boolean\n\n /**\n * Add a `/` character to directory matches. Note that this requires\n * additional stat calls in some cases.\n */\n mark?: boolean\n\n /**\n * Perform a basename-only match if the pattern does not contain any slash\n * characters. That is, `*.js` would be treated as equivalent to\n * `**\\/*.js`, matching all js files in all directories.\n */\n matchBase?: boolean\n\n /**\n * Limit the directory traversal to a given depth below the cwd.\n * Note that this does NOT prevent traversal to sibling folders,\n * root patterns, and so on. It only limits the maximum folder depth\n * that the walk will descend, relative to the cwd.\n */\n maxDepth?: number\n\n /**\n * Do not expand `{a,b}` and `{1..3}` brace sets.\n */\n nobrace?: boolean\n\n /**\n * Perform a case-insensitive match. This defaults to `true` on macOS and\n * Windows systems, and `false` on all others.\n *\n * **Note** `nocase` should only be explicitly set when it is\n * known that the filesystem's case sensitivity differs from the\n * platform default. If set `true` on case-sensitive file\n * systems, or `false` on case-insensitive file systems, then the\n * walk may return more or less results than expected.\n */\n nocase?: boolean\n\n /**\n * Do not match directories, only files. (Note: to match\n * _only_ directories, put a `/` at the end of the pattern.)\n */\n nodir?: boolean\n\n /**\n * Do not match \"extglob\" patterns such as `+(a|b)`.\n */\n noext?: boolean\n\n /**\n * Do not match `**` against multiple filenames. (Ie, treat it as a normal\n * `*` instead.)\n *\n * Conflicts with {@link matchBase}\n */\n noglobstar?: boolean\n\n /**\n * Defaults to value of `process.platform` if available, or `'linux'` if\n * not. Setting `platform:'win32'` on non-Windows systems may cause strange\n * behavior.\n */\n platform?: NodeJS.Platform\n\n /**\n * Set to true to call `fs.realpath` on all of the\n * results. In the case of an entry that cannot be resolved, the\n * entry is omitted. This incurs a slight performance penalty, of\n * course, because of the added system calls.\n */\n realpath?: boolean\n\n /**\n *\n * A string path resolved against the `cwd` option, which\n * is used as the starting point for absolute patterns that start\n * with `/`, (but not drive letters or UNC paths on Windows).\n *\n * Note that this _doesn't_ necessarily limit the walk to the\n * `root` directory, and doesn't affect the cwd starting point for\n * non-absolute patterns. A pattern containing `..` will still be\n * able to traverse out of the root directory, if it is not an\n * actual root directory on the filesystem, and any non-absolute\n * patterns will be matched in the `cwd`. For example, the\n * pattern `/../*` with `{root:'/some/path'}` will return all\n * files in `/some`, not all files in `/some/path`. The pattern\n * `*` with `{root:'/some/path'}` will return all the entries in\n * the cwd, not the entries in `/some/path`.\n *\n * To start absolute and non-absolute patterns in the same\n * path, you can use `{root:''}`. However, be aware that on\n * Windows systems, a pattern like `x:/*` or `//host/share/*` will\n * _always_ start in the `x:/` or `//host/share` directory,\n * regardless of the `root` setting.\n */\n root?: string\n\n /**\n * A [PathScurry](http://npm.im/path-scurry) object used\n * to traverse the file system. If the `nocase` option is set\n * explicitly, then any provided `scurry` object must match this\n * setting.\n */\n scurry?: PathScurry\n\n /**\n * Call `lstat()` on all entries, whether required or not to determine\n * if it's a valid match. When used with {@link withFileTypes}, this means\n * that matches will include data such as modified time, permissions, and\n * so on. Note that this will incur a performance cost due to the added\n * system calls.\n */\n stat?: boolean\n\n /**\n * An AbortSignal which will cancel the Glob walk when\n * triggered.\n */\n signal?: AbortSignal\n\n /**\n * Use `\\\\` as a path separator _only_, and\n * _never_ as an escape character. If set, all `\\\\` characters are\n * replaced with `/` in the pattern.\n *\n * Note that this makes it **impossible** to match against paths\n * containing literal glob pattern characters, but allows matching\n * with patterns constructed using `path.join()` and\n * `path.resolve()` on Windows platforms, mimicking the (buggy!)\n * behavior of Glob v7 and before on Windows. Please use with\n * caution, and be mindful of [the caveat below about Windows\n * paths](#windows). (For legacy reasons, this is also set if\n * `allowWindowsEscape` is set to the exact value `false`.)\n */\n windowsPathsNoEscape?: boolean\n\n /**\n * Return [PathScurry](http://npm.im/path-scurry)\n * `Path` objects instead of strings. These are similar to a\n * NodeJS `Dirent` object, but with additional methods and\n * properties.\n *\n * Conflicts with {@link absolute}\n */\n withFileTypes?: boolean\n\n /**\n * An fs implementation to override some or all of the defaults. See\n * http://npm.im/path-scurry for details about what can be overridden.\n */\n fs?: FSOption\n\n /**\n * Just passed along to Minimatch. Note that this makes all pattern\n * matching operations slower and *extremely* noisy.\n */\n debug?: boolean\n\n /**\n * Return `/` delimited paths, even on Windows.\n *\n * On posix systems, this has no effect. But, on Windows, it means that\n * paths will be `/` delimited, and absolute paths will be their full\n * resolved UNC forms, eg instead of `'C:\\\\foo\\\\bar'`, it would return\n * `'//?/C:/foo/bar'`\n */\n posix?: boolean\n\n /**\n * Do not match any children of any matches. For example, the pattern\n * `**\\/foo` would match `a/foo`, but not `a/foo/b/foo` in this mode.\n *\n * This is especially useful for cases like \"find all `node_modules`\n * folders, but not the ones in `node_modules`\".\n *\n * In order to support this, the `Ignore` implementation must support an\n * `add(pattern: string)` method. If using the default `Ignore` class, then\n * this is fine, but if this is set to `false`, and a custom `Ignore` is\n * provided that does not have an `add()` method, then it will throw an\n * error.\n *\n * **Caveat** It *only* ignores matches that would be a descendant of a\n * previous match, and only if that descendant is matched *after* the\n * ancestor is encountered. Since the file system walk happens in\n * indeterminate order, it's possible that a match will already be added\n * before its ancestor, if multiple or braced patterns are used.\n *\n * For example:\n *\n * ```ts\n * const results = await glob([\n * // likely to match first, since it's just a stat\n * 'a/b/c/d/e/f',\n *\n * // this pattern is more complicated! It must to various readdir()\n * // calls and test the results against a regular expression, and that\n * // is certainly going to take a little bit longer.\n * //\n * // So, later on, it encounters a match at 'a/b/c/d/e', but it's too\n * // late to ignore a/b/c/d/e/f, because it's already been emitted.\n * 'a/[bdf]/?/[a-z]/*',\n * ], { includeChildMatches: false })\n * ```\n *\n * It's best to only set this to `false` if you can be reasonably sure that\n * no components of the pattern will potentially match one another's file\n * system descendants, or if the occasional included child entry will not\n * cause problems.\n *\n * @default true\n */\n includeChildMatches?: boolean\n}\n\nexport type GlobOptionsWithFileTypesTrue = GlobOptions & {\n withFileTypes: true\n // string options not relevant if returning Path objects.\n absolute?: undefined\n mark?: undefined\n posix?: undefined\n}\n\nexport type GlobOptionsWithFileTypesFalse = GlobOptions & {\n withFileTypes?: false\n}\n\nexport type GlobOptionsWithFileTypesUnset = GlobOptions & {\n withFileTypes?: undefined\n}\n\nexport type Result =\n Opts extends GlobOptionsWithFileTypesTrue ? Path\n : Opts extends GlobOptionsWithFileTypesFalse ? string\n : Opts extends GlobOptionsWithFileTypesUnset ? string\n : string | Path\nexport type Results = Result[]\n\nexport type FileTypes =\n Opts extends GlobOptionsWithFileTypesTrue ? true\n : Opts extends GlobOptionsWithFileTypesFalse ? false\n : Opts extends GlobOptionsWithFileTypesUnset ? false\n : boolean\n\n/**\n * An object that can perform glob pattern traversals.\n */\nexport class Glob implements GlobOptions {\n absolute?: boolean\n cwd: string\n root?: string\n dot: boolean\n dotRelative: boolean\n follow: boolean\n ignore?: string | string[] | IgnoreLike\n magicalBraces: boolean\n mark?: boolean\n matchBase: boolean\n maxDepth: number\n nobrace: boolean\n nocase: boolean\n nodir: boolean\n noext: boolean\n noglobstar: boolean\n pattern: string[]\n platform: NodeJS.Platform\n realpath: boolean\n scurry: PathScurry\n stat: boolean\n signal?: AbortSignal\n windowsPathsNoEscape: boolean\n withFileTypes: FileTypes\n includeChildMatches: boolean\n\n /**\n * The options provided to the constructor.\n */\n opts: Opts\n\n /**\n * An array of parsed immutable {@link Pattern} objects.\n */\n patterns: Pattern[]\n\n /**\n * All options are stored as properties on the `Glob` object.\n *\n * See {@link GlobOptions} for full options descriptions.\n *\n * Note that a previous `Glob` object can be passed as the\n * `GlobOptions` to another `Glob` instantiation to re-use settings\n * and caches with a new pattern.\n *\n * Traversal functions can be called multiple times to run the walk\n * again.\n */\n constructor(pattern: string | string[], opts: Opts) {\n /* c8 ignore start */\n if (!opts) throw new TypeError('glob options required')\n /* c8 ignore stop */\n this.withFileTypes = !!opts.withFileTypes as FileTypes\n this.signal = opts.signal\n this.follow = !!opts.follow\n this.dot = !!opts.dot\n this.dotRelative = !!opts.dotRelative\n this.nodir = !!opts.nodir\n this.mark = !!opts.mark\n if (!opts.cwd) {\n this.cwd = ''\n } else if (opts.cwd instanceof URL || opts.cwd.startsWith('file://')) {\n opts.cwd = fileURLToPath(opts.cwd)\n }\n this.cwd = opts.cwd || ''\n this.root = opts.root\n this.magicalBraces = !!opts.magicalBraces\n this.nobrace = !!opts.nobrace\n this.noext = !!opts.noext\n this.realpath = !!opts.realpath\n this.absolute = opts.absolute\n this.includeChildMatches = opts.includeChildMatches !== false\n\n this.noglobstar = !!opts.noglobstar\n this.matchBase = !!opts.matchBase\n this.maxDepth =\n typeof opts.maxDepth === 'number' ? opts.maxDepth : Infinity\n this.stat = !!opts.stat\n this.ignore = opts.ignore\n\n if (this.withFileTypes && this.absolute !== undefined) {\n throw new Error('cannot set absolute and withFileTypes:true')\n }\n\n if (typeof pattern === 'string') {\n pattern = [pattern]\n }\n\n this.windowsPathsNoEscape =\n !!opts.windowsPathsNoEscape ||\n (opts as { allowWindowsEscape?: boolean }).allowWindowsEscape ===\n false\n\n if (this.windowsPathsNoEscape) {\n pattern = pattern.map(p => p.replace(/\\\\/g, '/'))\n }\n\n if (this.matchBase) {\n if (opts.noglobstar) {\n throw new TypeError('base matching requires globstar')\n }\n pattern = pattern.map(p => (p.includes('/') ? p : `./**/${p}`))\n }\n\n this.pattern = pattern\n\n this.platform = opts.platform || defaultPlatform\n this.opts = { ...opts, platform: this.platform }\n if (opts.scurry) {\n this.scurry = opts.scurry\n if (\n opts.nocase !== undefined &&\n opts.nocase !== opts.scurry.nocase\n ) {\n throw new Error('nocase option contradicts provided scurry option')\n }\n } else {\n const Scurry =\n opts.platform === 'win32' ? PathScurryWin32\n : opts.platform === 'darwin' ? PathScurryDarwin\n : opts.platform ? PathScurryPosix\n : PathScurry\n this.scurry = new Scurry(this.cwd, {\n nocase: opts.nocase,\n fs: opts.fs,\n })\n }\n this.nocase = this.scurry.nocase\n\n // If you do nocase:true on a case-sensitive file system, then\n // we need to use regexps instead of strings for non-magic\n // path portions, because statting `aBc` won't return results\n // for the file `AbC` for example.\n const nocaseMagicOnly =\n this.platform === 'darwin' || this.platform === 'win32'\n\n const mmo: MinimatchOptions = {\n // default nocase based on platform\n ...opts,\n dot: this.dot,\n matchBase: this.matchBase,\n nobrace: this.nobrace,\n nocase: this.nocase,\n nocaseMagicOnly,\n nocomment: true,\n noext: this.noext,\n nonegate: true,\n optimizationLevel: 2,\n platform: this.platform,\n windowsPathsNoEscape: this.windowsPathsNoEscape,\n debug: !!this.opts.debug,\n }\n\n const mms = this.pattern.map(p => new Minimatch(p, mmo))\n const [matchSet, globParts] = mms.reduce(\n (set: [MatchSet, GlobParts], m) => {\n set[0].push(...m.set)\n set[1].push(...m.globParts)\n return set\n },\n [[], []],\n )\n this.patterns = matchSet.map((set, i) => {\n const g = globParts[i]\n /* c8 ignore start */\n if (!g) throw new Error('invalid pattern object')\n /* c8 ignore stop */\n return new Pattern(set, g, 0, this.platform)\n })\n }\n\n /**\n * Returns a Promise that resolves to the results array.\n */\n async walk(): Promise>\n async walk(): Promise<(string | Path)[]> {\n // Walkers always return array of Path objects, so we just have to\n // coerce them into the right shape. It will have already called\n // realpath() if the option was set to do so, so we know that's cached.\n // start out knowing the cwd, at least\n return [\n ...(await new GlobWalker(this.patterns, this.scurry.cwd, {\n ...this.opts,\n maxDepth:\n this.maxDepth !== Infinity ?\n this.maxDepth + this.scurry.cwd.depth()\n : Infinity,\n platform: this.platform,\n nocase: this.nocase,\n includeChildMatches: this.includeChildMatches,\n }).walk()),\n ]\n }\n\n /**\n * synchronous {@link Glob.walk}\n */\n walkSync(): Results\n walkSync(): (string | Path)[] {\n return [\n ...new GlobWalker(this.patterns, this.scurry.cwd, {\n ...this.opts,\n maxDepth:\n this.maxDepth !== Infinity ?\n this.maxDepth + this.scurry.cwd.depth()\n : Infinity,\n platform: this.platform,\n nocase: this.nocase,\n includeChildMatches: this.includeChildMatches,\n }).walkSync(),\n ]\n }\n\n /**\n * Stream results asynchronously.\n */\n stream(): Minipass, Result>\n stream(): Minipass {\n return new GlobStream(this.patterns, this.scurry.cwd, {\n ...this.opts,\n maxDepth:\n this.maxDepth !== Infinity ?\n this.maxDepth + this.scurry.cwd.depth()\n : Infinity,\n platform: this.platform,\n nocase: this.nocase,\n includeChildMatches: this.includeChildMatches,\n }).stream()\n }\n\n /**\n * Stream results synchronously.\n */\n streamSync(): Minipass, Result>\n streamSync(): Minipass {\n return new GlobStream(this.patterns, this.scurry.cwd, {\n ...this.opts,\n maxDepth:\n this.maxDepth !== Infinity ?\n this.maxDepth + this.scurry.cwd.depth()\n : Infinity,\n platform: this.platform,\n nocase: this.nocase,\n includeChildMatches: this.includeChildMatches,\n }).streamSync()\n }\n\n /**\n * Default sync iteration function. Returns a Generator that\n * iterates over the results.\n */\n iterateSync(): Generator, void, void> {\n return this.streamSync()[Symbol.iterator]()\n }\n [Symbol.iterator]() {\n return this.iterateSync()\n }\n\n /**\n * Default async iteration function. Returns an AsyncGenerator that\n * iterates over the results.\n */\n iterate(): AsyncGenerator, void, void> {\n return this.stream()[Symbol.asyncIterator]()\n }\n [Symbol.asyncIterator]() {\n return this.iterate()\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/glob/dist/commonjs/has-magic.d.ts b/node_modules/mocha/node_modules/glob/dist/commonjs/has-magic.d.ts deleted file mode 100644 index 8aec3bd9..00000000 --- a/node_modules/mocha/node_modules/glob/dist/commonjs/has-magic.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { GlobOptions } from './glob.js'; -/** - * Return true if the patterns provided contain any magic glob characters, - * given the options provided. - * - * Brace expansion is not considered "magic" unless the `magicalBraces` option - * is set, as brace expansion just turns one string into an array of strings. - * So a pattern like `'x{a,b}y'` would return `false`, because `'xay'` and - * `'xby'` both do not contain any magic glob characters, and it's treated the - * same as if you had called it on `['xay', 'xby']`. When `magicalBraces:true` - * is in the options, brace expansion _is_ treated as a pattern having magic. - */ -export declare const hasMagic: (pattern: string | string[], options?: GlobOptions) => boolean; -//# sourceMappingURL=has-magic.d.ts.map \ No newline at end of file diff --git a/node_modules/mocha/node_modules/glob/dist/commonjs/has-magic.d.ts.map b/node_modules/mocha/node_modules/glob/dist/commonjs/has-magic.d.ts.map deleted file mode 100644 index b24dd4ec..00000000 --- a/node_modules/mocha/node_modules/glob/dist/commonjs/has-magic.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"has-magic.d.ts","sourceRoot":"","sources":["../../src/has-magic.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAEvC;;;;;;;;;;GAUG;AACH,eAAO,MAAM,QAAQ,YACV,MAAM,GAAG,MAAM,EAAE,YACjB,WAAW,KACnB,OAQF,CAAA"} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/glob/dist/commonjs/has-magic.js b/node_modules/mocha/node_modules/glob/dist/commonjs/has-magic.js deleted file mode 100644 index 0918bd57..00000000 --- a/node_modules/mocha/node_modules/glob/dist/commonjs/has-magic.js +++ /dev/null @@ -1,27 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.hasMagic = void 0; -const minimatch_1 = require("minimatch"); -/** - * Return true if the patterns provided contain any magic glob characters, - * given the options provided. - * - * Brace expansion is not considered "magic" unless the `magicalBraces` option - * is set, as brace expansion just turns one string into an array of strings. - * So a pattern like `'x{a,b}y'` would return `false`, because `'xay'` and - * `'xby'` both do not contain any magic glob characters, and it's treated the - * same as if you had called it on `['xay', 'xby']`. When `magicalBraces:true` - * is in the options, brace expansion _is_ treated as a pattern having magic. - */ -const hasMagic = (pattern, options = {}) => { - if (!Array.isArray(pattern)) { - pattern = [pattern]; - } - for (const p of pattern) { - if (new minimatch_1.Minimatch(p, options).hasMagic()) - return true; - } - return false; -}; -exports.hasMagic = hasMagic; -//# sourceMappingURL=has-magic.js.map \ No newline at end of file diff --git a/node_modules/mocha/node_modules/glob/dist/commonjs/has-magic.js.map b/node_modules/mocha/node_modules/glob/dist/commonjs/has-magic.js.map deleted file mode 100644 index 44deab29..00000000 --- a/node_modules/mocha/node_modules/glob/dist/commonjs/has-magic.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"has-magic.js","sourceRoot":"","sources":["../../src/has-magic.ts"],"names":[],"mappings":";;;AAAA,yCAAqC;AAGrC;;;;;;;;;;GAUG;AACI,MAAM,QAAQ,GAAG,CACtB,OAA0B,EAC1B,UAAuB,EAAE,EAChB,EAAE;IACX,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;QAC5B,OAAO,GAAG,CAAC,OAAO,CAAC,CAAA;IACrB,CAAC;IACD,KAAK,MAAM,CAAC,IAAI,OAAO,EAAE,CAAC;QACxB,IAAI,IAAI,qBAAS,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,QAAQ,EAAE;YAAE,OAAO,IAAI,CAAA;IACvD,CAAC;IACD,OAAO,KAAK,CAAA;AACd,CAAC,CAAA;AAXY,QAAA,QAAQ,YAWpB","sourcesContent":["import { Minimatch } from 'minimatch'\nimport { GlobOptions } from './glob.js'\n\n/**\n * Return true if the patterns provided contain any magic glob characters,\n * given the options provided.\n *\n * Brace expansion is not considered \"magic\" unless the `magicalBraces` option\n * is set, as brace expansion just turns one string into an array of strings.\n * So a pattern like `'x{a,b}y'` would return `false`, because `'xay'` and\n * `'xby'` both do not contain any magic glob characters, and it's treated the\n * same as if you had called it on `['xay', 'xby']`. When `magicalBraces:true`\n * is in the options, brace expansion _is_ treated as a pattern having magic.\n */\nexport const hasMagic = (\n pattern: string | string[],\n options: GlobOptions = {},\n): boolean => {\n if (!Array.isArray(pattern)) {\n pattern = [pattern]\n }\n for (const p of pattern) {\n if (new Minimatch(p, options).hasMagic()) return true\n }\n return false\n}\n"]} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/glob/dist/commonjs/ignore.d.ts b/node_modules/mocha/node_modules/glob/dist/commonjs/ignore.d.ts deleted file mode 100644 index 1893b16d..00000000 --- a/node_modules/mocha/node_modules/glob/dist/commonjs/ignore.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { Minimatch, MinimatchOptions } from 'minimatch'; -import { Path } from 'path-scurry'; -import { GlobWalkerOpts } from './walker.js'; -export interface IgnoreLike { - ignored?: (p: Path) => boolean; - childrenIgnored?: (p: Path) => boolean; - add?: (ignore: string) => void; -} -/** - * Class used to process ignored patterns - */ -export declare class Ignore implements IgnoreLike { - relative: Minimatch[]; - relativeChildren: Minimatch[]; - absolute: Minimatch[]; - absoluteChildren: Minimatch[]; - platform: NodeJS.Platform; - mmopts: MinimatchOptions; - constructor(ignored: string[], { nobrace, nocase, noext, noglobstar, platform, }: GlobWalkerOpts); - add(ign: string): void; - ignored(p: Path): boolean; - childrenIgnored(p: Path): boolean; -} -//# sourceMappingURL=ignore.d.ts.map \ No newline at end of file diff --git a/node_modules/mocha/node_modules/glob/dist/commonjs/ignore.d.ts.map b/node_modules/mocha/node_modules/glob/dist/commonjs/ignore.d.ts.map deleted file mode 100644 index 57d6ab61..00000000 --- a/node_modules/mocha/node_modules/glob/dist/commonjs/ignore.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ignore.d.ts","sourceRoot":"","sources":["../../src/ignore.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAA;AACvD,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAElC,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAE5C,MAAM,WAAW,UAAU;IACzB,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,KAAK,OAAO,CAAA;IAC9B,eAAe,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,KAAK,OAAO,CAAA;IACtC,GAAG,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAA;CAC/B;AAWD;;GAEG;AACH,qBAAa,MAAO,YAAW,UAAU;IACvC,QAAQ,EAAE,SAAS,EAAE,CAAA;IACrB,gBAAgB,EAAE,SAAS,EAAE,CAAA;IAC7B,QAAQ,EAAE,SAAS,EAAE,CAAA;IACrB,gBAAgB,EAAE,SAAS,EAAE,CAAA;IAC7B,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAA;IACzB,MAAM,EAAE,gBAAgB,CAAA;gBAGtB,OAAO,EAAE,MAAM,EAAE,EACjB,EACE,OAAO,EACP,MAAM,EACN,KAAK,EACL,UAAU,EACV,QAA0B,GAC3B,EAAE,cAAc;IAqBnB,GAAG,CAAC,GAAG,EAAE,MAAM;IAyCf,OAAO,CAAC,CAAC,EAAE,IAAI,GAAG,OAAO;IAczB,eAAe,CAAC,CAAC,EAAE,IAAI,GAAG,OAAO;CAWlC"} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/glob/dist/commonjs/ignore.js b/node_modules/mocha/node_modules/glob/dist/commonjs/ignore.js deleted file mode 100644 index 5f1fde06..00000000 --- a/node_modules/mocha/node_modules/glob/dist/commonjs/ignore.js +++ /dev/null @@ -1,119 +0,0 @@ -"use strict"; -// give it a pattern, and it'll be able to tell you if -// a given path should be ignored. -// Ignoring a path ignores its children if the pattern ends in /** -// Ignores are always parsed in dot:true mode -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Ignore = void 0; -const minimatch_1 = require("minimatch"); -const pattern_js_1 = require("./pattern.js"); -const defaultPlatform = (typeof process === 'object' && - process && - typeof process.platform === 'string') ? - process.platform - : 'linux'; -/** - * Class used to process ignored patterns - */ -class Ignore { - relative; - relativeChildren; - absolute; - absoluteChildren; - platform; - mmopts; - constructor(ignored, { nobrace, nocase, noext, noglobstar, platform = defaultPlatform, }) { - this.relative = []; - this.absolute = []; - this.relativeChildren = []; - this.absoluteChildren = []; - this.platform = platform; - this.mmopts = { - dot: true, - nobrace, - nocase, - noext, - noglobstar, - optimizationLevel: 2, - platform, - nocomment: true, - nonegate: true, - }; - for (const ign of ignored) - this.add(ign); - } - add(ign) { - // this is a little weird, but it gives us a clean set of optimized - // minimatch matchers, without getting tripped up if one of them - // ends in /** inside a brace section, and it's only inefficient at - // the start of the walk, not along it. - // It'd be nice if the Pattern class just had a .test() method, but - // handling globstars is a bit of a pita, and that code already lives - // in minimatch anyway. - // Another way would be if maybe Minimatch could take its set/globParts - // as an option, and then we could at least just use Pattern to test - // for absolute-ness. - // Yet another way, Minimatch could take an array of glob strings, and - // a cwd option, and do the right thing. - const mm = new minimatch_1.Minimatch(ign, this.mmopts); - for (let i = 0; i < mm.set.length; i++) { - const parsed = mm.set[i]; - const globParts = mm.globParts[i]; - /* c8 ignore start */ - if (!parsed || !globParts) { - throw new Error('invalid pattern object'); - } - // strip off leading ./ portions - // https://github.com/isaacs/node-glob/issues/570 - while (parsed[0] === '.' && globParts[0] === '.') { - parsed.shift(); - globParts.shift(); - } - /* c8 ignore stop */ - const p = new pattern_js_1.Pattern(parsed, globParts, 0, this.platform); - const m = new minimatch_1.Minimatch(p.globString(), this.mmopts); - const children = globParts[globParts.length - 1] === '**'; - const absolute = p.isAbsolute(); - if (absolute) - this.absolute.push(m); - else - this.relative.push(m); - if (children) { - if (absolute) - this.absoluteChildren.push(m); - else - this.relativeChildren.push(m); - } - } - } - ignored(p) { - const fullpath = p.fullpath(); - const fullpaths = `${fullpath}/`; - const relative = p.relative() || '.'; - const relatives = `${relative}/`; - for (const m of this.relative) { - if (m.match(relative) || m.match(relatives)) - return true; - } - for (const m of this.absolute) { - if (m.match(fullpath) || m.match(fullpaths)) - return true; - } - return false; - } - childrenIgnored(p) { - const fullpath = p.fullpath() + '/'; - const relative = (p.relative() || '.') + '/'; - for (const m of this.relativeChildren) { - if (m.match(relative)) - return true; - } - for (const m of this.absoluteChildren) { - if (m.match(fullpath)) - return true; - } - return false; - } -} -exports.Ignore = Ignore; -//# sourceMappingURL=ignore.js.map \ No newline at end of file diff --git a/node_modules/mocha/node_modules/glob/dist/commonjs/ignore.js.map b/node_modules/mocha/node_modules/glob/dist/commonjs/ignore.js.map deleted file mode 100644 index d9dfdfa3..00000000 --- a/node_modules/mocha/node_modules/glob/dist/commonjs/ignore.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ignore.js","sourceRoot":"","sources":["../../src/ignore.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,kCAAkC;AAClC,kEAAkE;AAClE,6CAA6C;;;AAE7C,yCAAuD;AAEvD,6CAAsC;AAStC,MAAM,eAAe,GACnB,CACE,OAAO,OAAO,KAAK,QAAQ;IAC3B,OAAO;IACP,OAAO,OAAO,CAAC,QAAQ,KAAK,QAAQ,CACrC,CAAC,CAAC;IACD,OAAO,CAAC,QAAQ;IAClB,CAAC,CAAC,OAAO,CAAA;AAEX;;GAEG;AACH,MAAa,MAAM;IACjB,QAAQ,CAAa;IACrB,gBAAgB,CAAa;IAC7B,QAAQ,CAAa;IACrB,gBAAgB,CAAa;IAC7B,QAAQ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AAS,GAAG,GAAG,QAAQ,GAAG,CAAA;QAChC,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAC9B,IAAI,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC;gBAAE,OAAO,IAAI,CAAA;QAC1D,CAAC;QACD,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAC9B,IAAI,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC;gBAAE,OAAO,IAAI,CAAA;QAC1D,CAAC;QACD,OAAO,KAAK,CAAA;IACd,CAAC;IAED,eAAe,CAAC,CAAO;QACrB,MAAM,QAAQ,GAAG,CAAC,CAAC,QAAQ,EAAE,GAAG,GAAG,CAAA;QACnC,MAAM,QAAQ,GAAG,CAAC,CAAC,CAAC,QAAQ,EAAE,IAAI,GAAG,CAAC,GAAG,GAAG,CAAA;QAC5C,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,gBAAgB,EAAE,CAAC;YACtC,IAAI,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC;gBAAE,OAAO,IAAI,CAAA;QACpC,CAAC;QACD,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,gBAAgB,EAAE,CAAC;YACtC,IAAI,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC;gBAAE,OAAO,IAAI,CAAA;QACpC,CAAC;QACD,OAAO,KAAK,CAAA;IACd,CAAC;CACF;AAvGD,wBAuGC","sourcesContent":["// give it a pattern, and it'll be able to tell you if\n// a given path should be ignored.\n// Ignoring a path ignores its children if the pattern ends in /**\n// Ignores are always parsed in dot:true mode\n\nimport { Minimatch, MinimatchOptions } from 'minimatch'\nimport { Path } from 'path-scurry'\nimport { Pattern } from './pattern.js'\nimport { GlobWalkerOpts } from './walker.js'\n\nexport interface IgnoreLike {\n ignored?: (p: Path) => boolean\n childrenIgnored?: (p: Path) => boolean\n add?: (ignore: string) => void\n}\n\nconst defaultPlatform: NodeJS.Platform =\n (\n typeof process === 'object' &&\n process &&\n typeof process.platform === 'string'\n ) ?\n process.platform\n : 'linux'\n\n/**\n * Class used to process ignored patterns\n */\nexport class Ignore implements IgnoreLike {\n relative: Minimatch[]\n relativeChildren: Minimatch[]\n absolute: Minimatch[]\n absoluteChildren: Minimatch[]\n platform: NodeJS.Platform\n mmopts: MinimatchOptions\n\n constructor(\n ignored: string[],\n {\n nobrace,\n nocase,\n noext,\n noglobstar,\n platform = defaultPlatform,\n }: GlobWalkerOpts,\n ) {\n this.relative = []\n this.absolute = []\n this.relativeChildren = []\n this.absoluteChildren = []\n this.platform = platform\n this.mmopts = {\n dot: true,\n nobrace,\n nocase,\n noext,\n noglobstar,\n optimizationLevel: 2,\n platform,\n nocomment: true,\n nonegate: true,\n }\n for (const ign of ignored) this.add(ign)\n }\n\n add(ign: string) {\n // this is a little weird, but it gives us a clean set of optimized\n // minimatch matchers, without getting tripped up if one of them\n // ends in /** inside a brace section, and it's only inefficient at\n // the start of the walk, not along it.\n // It'd be nice if the Pattern class just had a .test() method, but\n // handling globstars is a bit of a pita, and that code already lives\n // in minimatch anyway.\n // Another way would be if maybe Minimatch could take its set/globParts\n // as an option, and then we could at least just use Pattern to test\n // for absolute-ness.\n // Yet another way, Minimatch could take an array of glob strings, and\n // a cwd option, and do the right thing.\n const mm = new Minimatch(ign, this.mmopts)\n for (let i = 0; i < mm.set.length; i++) {\n const parsed = mm.set[i]\n const globParts = mm.globParts[i]\n /* c8 ignore start */\n if (!parsed || !globParts) {\n throw new Error('invalid pattern object')\n }\n // strip off leading ./ portions\n // https://github.com/isaacs/node-glob/issues/570\n while (parsed[0] === '.' && globParts[0] === '.') {\n parsed.shift()\n globParts.shift()\n }\n /* c8 ignore stop */\n const p = new Pattern(parsed, globParts, 0, this.platform)\n const m = new Minimatch(p.globString(), this.mmopts)\n const children = globParts[globParts.length - 1] === '**'\n const absolute = p.isAbsolute()\n if (absolute) this.absolute.push(m)\n else this.relative.push(m)\n if (children) {\n if (absolute) this.absoluteChildren.push(m)\n else this.relativeChildren.push(m)\n }\n }\n }\n\n ignored(p: Path): boolean {\n const fullpath = p.fullpath()\n const fullpaths = `${fullpath}/`\n const relative = p.relative() || '.'\n const relatives = `${relative}/`\n for (const m of this.relative) {\n if (m.match(relative) || m.match(relatives)) return true\n }\n for (const m of this.absolute) {\n if (m.match(fullpath) || m.match(fullpaths)) return true\n }\n return false\n }\n\n childrenIgnored(p: Path): boolean {\n const fullpath = p.fullpath() + '/'\n const relative = (p.relative() || '.') + '/'\n for (const m of this.relativeChildren) {\n if (m.match(relative)) return true\n }\n for (const m of this.absoluteChildren) {\n if (m.match(fullpath)) return true\n }\n return false\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/glob/dist/commonjs/index.d.ts b/node_modules/mocha/node_modules/glob/dist/commonjs/index.d.ts deleted file mode 100644 index 9c326ddc..00000000 --- a/node_modules/mocha/node_modules/glob/dist/commonjs/index.d.ts +++ /dev/null @@ -1,97 +0,0 @@ -import { Minipass } from 'minipass'; -import { Path } from 'path-scurry'; -import type { GlobOptions, GlobOptionsWithFileTypesFalse, GlobOptionsWithFileTypesTrue, GlobOptionsWithFileTypesUnset } from './glob.js'; -import { Glob } from './glob.js'; -export { escape, unescape } from 'minimatch'; -export type { FSOption, Path, WalkOptions, WalkOptionsWithFileTypesTrue, WalkOptionsWithFileTypesUnset, } from 'path-scurry'; -export { Glob } from './glob.js'; -export type { GlobOptions, GlobOptionsWithFileTypesFalse, GlobOptionsWithFileTypesTrue, GlobOptionsWithFileTypesUnset, } from './glob.js'; -export { hasMagic } from './has-magic.js'; -export { Ignore } from './ignore.js'; -export type { IgnoreLike } from './ignore.js'; -export type { MatchStream } from './walker.js'; -/** - * Syncronous form of {@link globStream}. Will read all the matches as fast as - * you consume them, even all in a single tick if you consume them immediately, - * but will still respond to backpressure if they're not consumed immediately. - */ -export declare function globStreamSync(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): Minipass; -export declare function globStreamSync(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): Minipass; -export declare function globStreamSync(pattern: string | string[], options: GlobOptionsWithFileTypesUnset): Minipass; -export declare function globStreamSync(pattern: string | string[], options: GlobOptions): Minipass | Minipass; -/** - * Return a stream that emits all the strings or `Path` objects and - * then emits `end` when completed. - */ -export declare function globStream(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): Minipass; -export declare function globStream(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): Minipass; -export declare function globStream(pattern: string | string[], options?: GlobOptionsWithFileTypesUnset | undefined): Minipass; -export declare function globStream(pattern: string | string[], options: GlobOptions): Minipass | Minipass; -/** - * Synchronous form of {@link glob} - */ -export declare function globSync(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): string[]; -export declare function globSync(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): Path[]; -export declare function globSync(pattern: string | string[], options?: GlobOptionsWithFileTypesUnset | undefined): string[]; -export declare function globSync(pattern: string | string[], options: GlobOptions): Path[] | string[]; -/** - * Perform an asynchronous glob search for the pattern(s) specified. Returns - * [Path](https://isaacs.github.io/path-scurry/classes/PathBase) objects if the - * {@link withFileTypes} option is set to `true`. See {@link GlobOptions} for - * full option descriptions. - */ -declare function glob_(pattern: string | string[], options?: GlobOptionsWithFileTypesUnset | undefined): Promise; -declare function glob_(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): Promise; -declare function glob_(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): Promise; -declare function glob_(pattern: string | string[], options: GlobOptions): Promise; -/** - * Return a sync iterator for walking glob pattern matches. - */ -export declare function globIterateSync(pattern: string | string[], options?: GlobOptionsWithFileTypesUnset | undefined): Generator; -export declare function globIterateSync(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): Generator; -export declare function globIterateSync(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): Generator; -export declare function globIterateSync(pattern: string | string[], options: GlobOptions): Generator | Generator; -/** - * Return an async iterator for walking glob pattern matches. - */ -export declare function globIterate(pattern: string | string[], options?: GlobOptionsWithFileTypesUnset | undefined): AsyncGenerator; -export declare function globIterate(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): AsyncGenerator; -export declare function globIterate(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): AsyncGenerator; -export declare function globIterate(pattern: string | string[], options: GlobOptions): AsyncGenerator | AsyncGenerator; -export declare const streamSync: typeof globStreamSync; -export declare const stream: typeof globStream & { - sync: typeof globStreamSync; -}; -export declare const iterateSync: typeof globIterateSync; -export declare const iterate: typeof globIterate & { - sync: typeof globIterateSync; -}; -export declare const sync: typeof globSync & { - stream: typeof globStreamSync; - iterate: typeof globIterateSync; -}; -export declare const glob: typeof glob_ & { - glob: typeof glob_; - globSync: typeof globSync; - sync: typeof globSync & { - stream: typeof globStreamSync; - iterate: typeof globIterateSync; - }; - globStream: typeof globStream; - stream: typeof globStream & { - sync: typeof globStreamSync; - }; - globStreamSync: typeof globStreamSync; - streamSync: typeof globStreamSync; - globIterate: typeof globIterate; - iterate: typeof globIterate & { - sync: typeof globIterateSync; - }; - globIterateSync: typeof globIterateSync; - iterateSync: typeof globIterateSync; - Glob: typeof Glob; - hasMagic: (pattern: string | string[], options?: GlobOptions) => boolean; - escape: (s: string, { windowsPathsNoEscape, }?: Pick) => string; - unescape: (s: string, { windowsPathsNoEscape, }?: Pick) => string; -}; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/mocha/node_modules/glob/dist/commonjs/index.d.ts.map b/node_modules/mocha/node_modules/glob/dist/commonjs/index.d.ts.map deleted file mode 100644 index 5fb32252..00000000 --- a/node_modules/mocha/node_modules/glob/dist/commonjs/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MA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AC,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;AAQ9D;;GAEG;AACH,wBAAgB,WAAW,CACzB,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,OAAO,CAAC,EAAE,6BAA6B,GAAG,SAAS,GAClD,cAAc,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;AACrC,wBAAgB,WAAW,CACzB,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,OAAO,EAAE,4BAA4B,GACpC,cAAc,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;AACnC,wBAAgB,WAAW,CACzB,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,OAAO,EAAE,6BAA6B,GACrC,cAAc,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;AACrC,wBAAgB,WAAW,CACzB,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,OAAO,EAAE,WAAW,GACnB,cAAc,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,GAAG,cAAc,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;AASxE,eAAO,MAAM,UAAU,uBAAiB,CAAA;AACxC,eAAO,MAAM,MAAM;;CAAsD,CAAA;AACzE,eAAO,MAAM,WAAW,wBAAkB,CAAA;AAC1C,eAAO,MAAM,OAAO;;CAElB,CAAA;AACF,eAAO,MAAM,IAAI;;;CAGf,CAAA;AAEF,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;CAgBf,CAAA"} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/glob/dist/commonjs/index.js b/node_modules/mocha/node_modules/glob/dist/commonjs/index.js deleted file mode 100644 index 151495d1..00000000 --- a/node_modules/mocha/node_modules/glob/dist/commonjs/index.js +++ /dev/null @@ -1,68 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.glob = exports.sync = exports.iterate = exports.iterateSync = exports.stream = exports.streamSync = exports.Ignore = exports.hasMagic = exports.Glob = exports.unescape = exports.escape = void 0; -exports.globStreamSync = globStreamSync; -exports.globStream = globStream; -exports.globSync = globSync; -exports.globIterateSync = globIterateSync; -exports.globIterate = globIterate; -const minimatch_1 = require("minimatch"); -const glob_js_1 = require("./glob.js"); -const has_magic_js_1 = require("./has-magic.js"); -var minimatch_2 = require("minimatch"); -Object.defineProperty(exports, "escape", { enumerable: true, get: function () { return minimatch_2.escape; } }); -Object.defineProperty(exports, "unescape", { enumerable: true, get: function () { return minimatch_2.unescape; } }); -var glob_js_2 = require("./glob.js"); -Object.defineProperty(exports, "Glob", { enumerable: true, get: function () { return glob_js_2.Glob; } }); -var has_magic_js_2 = require("./has-magic.js"); -Object.defineProperty(exports, "hasMagic", { enumerable: true, get: function () { return has_magic_js_2.hasMagic; } }); -var ignore_js_1 = require("./ignore.js"); -Object.defineProperty(exports, "Ignore", { enumerable: true, get: function () { return ignore_js_1.Ignore; } }); -function globStreamSync(pattern, options = {}) { - return new glob_js_1.Glob(pattern, options).streamSync(); -} -function globStream(pattern, options = {}) { - return new glob_js_1.Glob(pattern, options).stream(); -} -function globSync(pattern, options = {}) { - return new glob_js_1.Glob(pattern, options).walkSync(); -} -async function glob_(pattern, options = {}) { - return new glob_js_1.Glob(pattern, options).walk(); -} -function globIterateSync(pattern, options = {}) { - return new glob_js_1.Glob(pattern, options).iterateSync(); -} -function globIterate(pattern, options = {}) { - return new glob_js_1.Glob(pattern, options).iterate(); -} -// aliases: glob.sync.stream() glob.stream.sync() glob.sync() etc -exports.streamSync = globStreamSync; -exports.stream = Object.assign(globStream, { sync: globStreamSync }); -exports.iterateSync = globIterateSync; -exports.iterate = Object.assign(globIterate, { - sync: globIterateSync, -}); -exports.sync = Object.assign(globSync, { - stream: globStreamSync, - iterate: globIterateSync, -}); -exports.glob = Object.assign(glob_, { - glob: glob_, - globSync, - sync: exports.sync, - globStream, - stream: exports.stream, - globStreamSync, - streamSync: exports.streamSync, - globIterate, - iterate: exports.iterate, - globIterateSync, - iterateSync: exports.iterateSync, - Glob: glob_js_1.Glob, - hasMagic: has_magic_js_1.hasMagic, - escape: minimatch_1.escape, - unescape: minimatch_1.unescape, -}); -exports.glob.glob = exports.glob; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/mocha/node_modules/glob/dist/commonjs/index.js.map b/node_modules/mocha/node_modules/glob/dist/commonjs/index.js.map deleted file mode 100644 index e648b1d0..00000000 --- a/node_modules/mocha/node_modules/glob/dist/commonjs/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAqDA,wCAKC;AAsBD,gCAKC;AAqBD,4BAKC;AAkDD,0CAKC;AAqBD,kCAKC;AAhMD,yCAA4C;AAS5C,uCAAgC;AAChC,iDAAyC;AAEzC,uCAA4C;AAAnC,mGAAA,MAAM,OAAA;AAAE,qGAAA,QAAQ,OAAA;AAQzB,qCAAgC;AAAvB,+FAAA,IAAI,OAAA;AAOb,+CAAyC;AAAhC,wGAAA,QAAQ,OAAA;AACjB,yCAAoC;AAA3B,mGAAA,MAAM,OAAA;AAyBf,SAAgB,cAAc,CAC5B,OAA0B,EAC1B,UAAuB,EAAE;IAEzB,OAAO,IAAI,cAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,UAAU,EAAE,CAAA;AAChD,CAAC;AAsBD,SAAgB,UAAU,CACxB,OAA0B,EAC1B,UAAuB,EAAE;IAEzB,OAAO,IAAI,cAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,MAAM,EAAE,CAAA;AAC5C,CAAC;AAqBD,SAAgB,QAAQ,CACtB,OAA0B,EAC1B,UAAuB,EAAE;IAEzB,OAAO,IAAI,cAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,QAAQ,EAAE,CAAA;AAC9C,CAAC;AAwBD,KAAK,UAAU,KAAK,CAClB,OAA0B,EAC1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AI,CAAA","sourcesContent":["import { escape, unescape } from 'minimatch'\nimport { Minipass } from 'minipass'\nimport { Path } from 'path-scurry'\nimport type {\n GlobOptions,\n GlobOptionsWithFileTypesFalse,\n GlobOptionsWithFileTypesTrue,\n GlobOptionsWithFileTypesUnset,\n} from './glob.js'\nimport { Glob } from './glob.js'\nimport { hasMagic } from './has-magic.js'\n\nexport { escape, unescape } from 'minimatch'\nexport type {\n FSOption,\n Path,\n WalkOptions,\n WalkOptionsWithFileTypesTrue,\n WalkOptionsWithFileTypesUnset,\n} from 'path-scurry'\nexport { Glob } from './glob.js'\nexport type {\n GlobOptions,\n GlobOptionsWithFileTypesFalse,\n GlobOptionsWithFileTypesTrue,\n GlobOptionsWithFileTypesUnset,\n} from './glob.js'\nexport { hasMagic } from './has-magic.js'\nexport { Ignore } from './ignore.js'\nexport type { IgnoreLike } from './ignore.js'\nexport type { MatchStream } from './walker.js'\n\n/**\n * Syncronous form of {@link globStream}. Will read all the matches as fast as\n * you consume them, even all in a single tick if you consume them immediately,\n * but will still respond to backpressure if they're not consumed immediately.\n */\nexport function globStreamSync(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesTrue,\n): Minipass\nexport function globStreamSync(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesFalse,\n): Minipass\nexport function globStreamSync(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesUnset,\n): Minipass\nexport function globStreamSync(\n pattern: string | string[],\n options: GlobOptions,\n): Minipass | Minipass\nexport function globStreamSync(\n pattern: string | string[],\n options: GlobOptions = {},\n) {\n return new Glob(pattern, options).streamSync()\n}\n\n/**\n * Return a stream that emits all the strings or `Path` objects and\n * then emits `end` when completed.\n */\nexport function globStream(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesFalse,\n): Minipass\nexport function globStream(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesTrue,\n): Minipass\nexport function globStream(\n pattern: string | string[],\n options?: GlobOptionsWithFileTypesUnset | undefined,\n): Minipass\nexport function globStream(\n pattern: string | string[],\n options: GlobOptions,\n): Minipass | Minipass\nexport function globStream(\n pattern: string | string[],\n options: GlobOptions = {},\n) {\n return new Glob(pattern, options).stream()\n}\n\n/**\n * Synchronous form of {@link glob}\n */\nexport function globSync(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesFalse,\n): string[]\nexport function globSync(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesTrue,\n): Path[]\nexport function globSync(\n pattern: string | string[],\n options?: GlobOptionsWithFileTypesUnset | undefined,\n): string[]\nexport function globSync(\n pattern: string | string[],\n options: GlobOptions,\n): Path[] | string[]\nexport function globSync(\n pattern: string | string[],\n options: GlobOptions = {},\n) {\n return new Glob(pattern, options).walkSync()\n}\n\n/**\n * Perform an asynchronous glob search for the pattern(s) specified. Returns\n * [Path](https://isaacs.github.io/path-scurry/classes/PathBase) objects if the\n * {@link withFileTypes} option is set to `true`. See {@link GlobOptions} for\n * full option descriptions.\n */\nasync function glob_(\n pattern: string | string[],\n options?: GlobOptionsWithFileTypesUnset | undefined,\n): Promise\nasync function glob_(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesTrue,\n): Promise\nasync function glob_(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesFalse,\n): Promise\nasync function glob_(\n pattern: string | string[],\n options: GlobOptions,\n): Promise\nasync function glob_(\n pattern: string | string[],\n options: GlobOptions = {},\n) {\n return new Glob(pattern, options).walk()\n}\n\n/**\n * Return a sync iterator for walking glob pattern matches.\n */\nexport function globIterateSync(\n pattern: string | string[],\n options?: GlobOptionsWithFileTypesUnset | undefined,\n): Generator\nexport function globIterateSync(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesTrue,\n): Generator\nexport function globIterateSync(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesFalse,\n): Generator\nexport function globIterateSync(\n pattern: string | string[],\n options: GlobOptions,\n): Generator | Generator\nexport function globIterateSync(\n pattern: string | string[],\n options: GlobOptions = {},\n) {\n return new Glob(pattern, options).iterateSync()\n}\n\n/**\n * Return an async iterator for walking glob pattern matches.\n */\nexport function globIterate(\n pattern: string | string[],\n options?: GlobOptionsWithFileTypesUnset | undefined,\n): AsyncGenerator\nexport function globIterate(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesTrue,\n): AsyncGenerator\nexport function globIterate(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesFalse,\n): AsyncGenerator\nexport function globIterate(\n pattern: string | string[],\n options: GlobOptions,\n): AsyncGenerator | AsyncGenerator\nexport function globIterate(\n pattern: string | string[],\n options: GlobOptions = {},\n) {\n return new Glob(pattern, options).iterate()\n}\n\n// aliases: glob.sync.stream() glob.stream.sync() glob.sync() etc\nexport const streamSync = globStreamSync\nexport const stream = Object.assign(globStream, { sync: globStreamSync })\nexport const iterateSync = globIterateSync\nexport const iterate = Object.assign(globIterate, {\n sync: globIterateSync,\n})\nexport const sync = Object.assign(globSync, {\n stream: globStreamSync,\n iterate: globIterateSync,\n})\n\nexport const glob = Object.assign(glob_, {\n glob: glob_,\n globSync,\n sync,\n globStream,\n stream,\n globStreamSync,\n streamSync,\n globIterate,\n iterate,\n globIterateSync,\n iterateSync,\n Glob,\n hasMagic,\n escape,\n unescape,\n})\nglob.glob = glob\n"]} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/glob/dist/commonjs/package.json b/node_modules/mocha/node_modules/glob/dist/commonjs/package.json deleted file mode 100644 index 5bbefffb..00000000 --- a/node_modules/mocha/node_modules/glob/dist/commonjs/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "type": "commonjs" -} diff --git a/node_modules/mocha/node_modules/glob/dist/commonjs/pattern.d.ts b/node_modules/mocha/node_modules/glob/dist/commonjs/pattern.d.ts deleted file mode 100644 index 9636df3b..00000000 --- a/node_modules/mocha/node_modules/glob/dist/commonjs/pattern.d.ts +++ /dev/null @@ -1,76 +0,0 @@ -import { GLOBSTAR } from 'minimatch'; -export type MMPattern = string | RegExp | typeof GLOBSTAR; -export type PatternList = [p: MMPattern, ...rest: MMPattern[]]; -export type UNCPatternList = [ - p0: '', - p1: '', - p2: string, - p3: string, - ...rest: MMPattern[] -]; -export type DrivePatternList = [p0: string, ...rest: MMPattern[]]; -export type AbsolutePatternList = [p0: '', ...rest: MMPattern[]]; -export type GlobList = [p: string, ...rest: string[]]; -/** - * An immutable-ish view on an array of glob parts and their parsed - * results - */ -export declare class Pattern { - #private; - readonly length: number; - constructor(patternList: MMPattern[], globList: string[], index: number, platform: NodeJS.Platform); - /** - * The first entry in the parsed list of patterns - */ - pattern(): MMPattern; - /** - * true of if pattern() returns a string - */ - isString(): boolean; - /** - * true of if pattern() returns GLOBSTAR - */ - isGlobstar(): boolean; - /** - * true if pattern() returns a regexp - */ - isRegExp(): boolean; - /** - * The /-joined set of glob parts that make up this pattern - */ - globString(): string; - /** - * true if there are more pattern parts after this one - */ - hasMore(): boolean; - /** - * The rest of the pattern after this part, or null if this is the end - */ - rest(): Pattern | null; - /** - * true if the pattern represents a //unc/path/ on windows - */ - isUNC(): boolean; - /** - * True if the pattern starts with a drive letter on Windows - */ - isDrive(): boolean; - /** - * True if the pattern is rooted on an absolute path - */ - isAbsolute(): boolean; - /** - * consume the root of the pattern, and return it - */ - root(): string; - /** - * Check to see if the current globstar pattern is allowed to follow - * a symbolic link. - */ - checkFollowGlobstar(): boolean; - /** - * Mark that the current globstar pattern is following a symbolic link - */ - markFollowGlobstar(): boolean; -} -//# sourceMappingURL=pattern.d.ts.map \ No newline at end of file diff --git a/node_modules/mocha/node_modules/glob/dist/commonjs/pattern.d.ts.map b/node_modules/mocha/node_modules/glob/dist/commonjs/pattern.d.ts.map deleted file mode 100644 index cdf32234..00000000 --- a/node_modules/mocha/node_modules/glob/dist/commonjs/pattern.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"pattern.d.ts","sourceRoot":"","sources":["../../src/pattern.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AACpC,MAAM,MAAM,SAAS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rB;;OAEG;IACH,IAAI,IAAI,MAAM;IASd;;;OAGG;IACH,mBAAmB,IAAI,OAAO;IAQ9B;;OAEG;IACH,kBAAkB,IAAI,OAAO;CAM9B"} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/glob/dist/commonjs/pattern.js b/node_modules/mocha/node_modules/glob/dist/commonjs/pattern.js deleted file mode 100644 index f0de35fb..00000000 --- a/node_modules/mocha/node_modules/glob/dist/commonjs/pattern.js +++ /dev/null @@ -1,219 +0,0 @@ -"use strict"; -// this is just a very light wrapper around 2 arrays with an offset index -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Pattern = void 0; -const minimatch_1 = require("minimatch"); -const isPatternList = (pl) => pl.length >= 1; -const isGlobList = (gl) => gl.length >= 1; -/** - * An immutable-ish view on an array of glob parts and their parsed - * results - */ -class Pattern { - #patternList; - #globList; - #index; - length; - #platform; - #rest; - #globString; - #isDrive; - #isUNC; - #isAbsolute; - #followGlobstar = true; - constructor(patternList, globList, index, platform) { - if (!isPatternList(patternList)) { - throw new TypeError('empty pattern list'); - } - if (!isGlobList(globList)) { - throw new TypeError('empty glob list'); - } - if (globList.length !== patternList.length) { - throw new TypeError('mismatched pattern list and glob list lengths'); - } - this.length = patternList.length; - if (index < 0 || index >= this.length) { - throw new TypeError('index out of range'); - } - this.#patternList = patternList; - this.#globList = globList; - this.#index = index; - this.#platform = platform; - // normalize root entries of absolute patterns on initial creation. - if (this.#index === 0) { - // c: => ['c:/'] - // C:/ => ['C:/'] - // C:/x => ['C:/', 'x'] - // //host/share => ['//host/share/'] - // //host/share/ => ['//host/share/'] - // //host/share/x => ['//host/share/', 'x'] - // /etc => ['/', 'etc'] - // / => ['/'] - if (this.isUNC()) { - // '' / '' / 'host' / 'share' - const [p0, p1, p2, p3, ...prest] = this.#patternList; - const [g0, g1, g2, g3, ...grest] = this.#globList; - if (prest[0] === '') { - // ends in / - prest.shift(); - grest.shift(); - } - const p = [p0, p1, p2, p3, ''].join('/'); - const g = [g0, g1, g2, g3, ''].join('/'); - this.#patternList = [p, ...prest]; - this.#globList = [g, ...grest]; - this.length = this.#patternList.length; - } - else if (this.isDrive() || this.isAbsolute()) { - const [p1, ...prest] = this.#patternList; - const [g1, ...grest] = this.#globList; - if (prest[0] === '') { - // ends in / - prest.shift(); - grest.shift(); - } - const p = p1 + '/'; - const g = g1 + '/'; - this.#patternList = [p, ...prest]; - this.#globList = [g, ...grest]; - this.length = this.#patternList.length; - } - } - } - /** - * The first entry in the parsed list of patterns - */ - pattern() { - return this.#patternList[this.#index]; - } - /** - * true of if pattern() returns a string - */ - isString() { - return typeof this.#patternList[this.#index] === 'string'; - } - /** - * true of if pattern() returns GLOBSTAR - */ - isGlobstar() { - return this.#patternList[this.#index] === minimatch_1.GLOBSTAR; - } - /** - * true if pattern() returns a regexp - */ - isRegExp() { - return this.#patternList[this.#index] instanceof RegExp; - } - /** - * The /-joined set of glob parts that make up this pattern - */ - globString() { - return (this.#globString = - this.#globString || - (this.#index === 0 ? - this.isAbsolute() ? - this.#globList[0] + this.#globList.slice(1).join('/') - : this.#globList.join('/') - : this.#globList.slice(this.#index).join('/'))); - } - /** - * true if there are more pattern parts after this one - */ - hasMore() { - return this.length > this.#index + 1; - } - /** - * The rest of the pattern after this part, or null if this is the end - */ - rest() { - if (this.#rest !== undefined) - return this.#rest; - if (!this.hasMore()) - return (this.#rest = null); - this.#rest = new Pattern(this.#patternList, this.#globList, this.#index + 1, this.#platform); - this.#rest.#isAbsolute = this.#isAbsolute; - this.#rest.#isUNC = this.#isUNC; - this.#rest.#isDrive = this.#isDrive; - return this.#rest; - } - /** - * true if the pattern represents a //unc/path/ on windows - */ - isUNC() { - const pl = this.#patternList; - return this.#isUNC !== undefined ? - this.#isUNC - : (this.#isUNC = - this.#platform === 'win32' && - this.#index === 0 && - pl[0] === '' && - pl[1] === '' && - typeof pl[2] === 'string' && - !!pl[2] && - typeof pl[3] === 'string' && - !!pl[3]); - } - // pattern like C:/... - // split = ['C:', ...] - // XXX: would be nice to handle patterns like `c:*` to test the cwd - // in c: for *, but I don't know of a way to even figure out what that - // cwd is without actually chdir'ing into it? - /** - * True if the pattern starts with a drive letter on Windows - */ - isDrive() { - const pl = this.#patternList; - return this.#isDrive !== undefined ? - this.#isDrive - : (this.#isDrive = - this.#platform === 'win32' && - this.#index === 0 && - this.length > 1 && - typeof pl[0] === 'string' && - /^[a-z]:$/i.test(pl[0])); - } - // pattern = '/' or '/...' or '/x/...' - // split = ['', ''] or ['', ...] or ['', 'x', ...] - // Drive and UNC both considered absolute on windows - /** - * True if the pattern is rooted on an absolute path - */ - isAbsolute() { - const pl = this.#patternList; - return this.#isAbsolute !== undefined ? - this.#isAbsolute - : (this.#isAbsolute = - (pl[0] === '' && pl.length > 1) || - this.isDrive() || - this.isUNC()); - } - /** - * consume the root of the pattern, and return it - */ - root() { - const p = this.#patternList[0]; - return (typeof p === 'string' && this.isAbsolute() && this.#index === 0) ? - p - : ''; - } - /** - * Check to see if the current globstar pattern is allowed to follow - * a symbolic link. - */ - checkFollowGlobstar() { - return !(this.#index === 0 || - !this.isGlobstar() || - !this.#followGlobstar); - } - /** - * Mark that the current globstar pattern is following a symbolic link - */ - markFollowGlobstar() { - if (this.#index === 0 || !this.isGlobstar() || !this.#followGlobstar) - return false; - this.#followGlobstar = false; - return true; - } -} -exports.Pattern = Pattern; -//# sourceMappingURL=pattern.js.map \ No newline at end of file diff --git a/node_modules/mocha/node_modules/glob/dist/commonjs/pattern.js.map b/node_modules/mocha/node_modules/glob/dist/commonjs/pattern.js.map deleted file mode 100644 index fc10ea5d..00000000 --- a/node_modules/mocha/node_modules/glob/dist/commonjs/pattern.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"pattern.js","sourceRoot":"","sources":["../../src/pattern.ts"],"names":[],"mappings":";AAAA,yEAAyE;;;AAEzE,yCAAoC;AAgBpC,MAAM,aAAa,GAAG,CAAC,EAAe,EAAqB,EAAE,CAC3D,EAAE,CAAC,MAAM,IAAI,CAAC,CA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rB,CAAC;IAED;;OAEG;IACH,IAAI;QACF,MAAM,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAA;QAC9B,OAAO,CACH,OAAO,CAAC,KAAK,QAAQ,IAAI,IAAI,CAAC,UAAU,EAAE,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,CAChE,CAAC,CAAC;YACD,CAAC;YACH,CAAC,CAAC,EAAE,CAAA;IACR,CAAC;IAED;;;OAGG;IACH,mBAAmB;QACjB,OAAO,CAAC,CACN,IAAI,CAAC,MAAM,KAAK,CAAC;YACjB,CAAC,IAAI,CAAC,UAAU,EAAE;YAClB,CAAC,IAAI,CAAC,eAAe,CACtB,CAAA;IACH,CAAC;IAED;;OAEG;IACH,kBAAkB;QAChB,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,IAAI,CAAC,eAAe;YAClE,OAAO,KAAK,CAAA;QACd,IAAI,CAAC,eAAe,GAAG,KAAK,CAAA;QAC5B,OAAO,IAAI,CAAA;IACb,CAAC;CACF;AArOD,0BAqOC","sourcesContent":["// this is just a very light wrapper around 2 arrays with an offset index\n\nimport { GLOBSTAR } from 'minimatch'\nexport type MMPattern = string | RegExp | typeof GLOBSTAR\n\n// an array of length >= 1\nexport type PatternList = [p: MMPattern, ...rest: MMPattern[]]\nexport type UNCPatternList = [\n p0: '',\n p1: '',\n p2: string,\n p3: string,\n ...rest: MMPattern[],\n]\nexport type DrivePatternList = [p0: string, ...rest: MMPattern[]]\nexport type AbsolutePatternList = [p0: '', ...rest: MMPattern[]]\nexport type GlobList = [p: string, ...rest: string[]]\n\nconst isPatternList = (pl: MMPattern[]): pl is PatternList =>\n pl.length >= 1\nconst isGlobList = (gl: string[]): gl is GlobList => gl.length >= 1\n\n/**\n * An immutable-ish view on an array of glob parts and their parsed\n * results\n */\nexport class Pattern {\n readonly #patternList: PatternList\n readonly #globList: GlobList\n readonly #index: number\n readonly length: number\n readonly #platform: NodeJS.Platform\n #rest?: Pattern | null\n #globString?: string\n #isDrive?: boolean\n #isUNC?: boolean\n #isAbsolute?: boolean\n #followGlobstar: boolean = true\n\n constructor(\n patternList: MMPattern[],\n globList: string[],\n index: number,\n platform: NodeJS.Platform,\n ) {\n if (!isPatternList(patternList)) {\n throw new TypeError('empty pattern list')\n }\n if (!isGlobList(globList)) {\n throw new TypeError('empty glob list')\n }\n if (globList.length !== patternList.length) {\n throw new TypeError('mismatched pattern list and glob list lengths')\n }\n this.length = patternList.length\n if (index < 0 || index >= this.length) {\n throw new TypeError('index out of range')\n }\n this.#patternList = patternList\n this.#globList = globList\n this.#index = index\n this.#platform = platform\n\n // normalize root entries of absolute patterns on initial creation.\n if (this.#index === 0) {\n // c: => ['c:/']\n // C:/ => ['C:/']\n // C:/x => ['C:/', 'x']\n // //host/share => ['//host/share/']\n // //host/share/ => ['//host/share/']\n // //host/share/x => ['//host/share/', 'x']\n // /etc => ['/', 'etc']\n // / => ['/']\n if (this.isUNC()) {\n // '' / '' / 'host' / 'share'\n const [p0, p1, p2, p3, ...prest] = this.#patternList\n const [g0, g1, g2, g3, ...grest] = this.#globList\n if (prest[0] === '') {\n // ends in /\n prest.shift()\n grest.shift()\n }\n const p = [p0, p1, p2, p3, ''].join('/')\n const g = [g0, g1, g2, g3, ''].join('/')\n this.#patternList = [p, ...prest]\n this.#globList = [g, ...grest]\n this.length = this.#patternList.length\n } else if (this.isDrive() || this.isAbsolute()) {\n const [p1, ...prest] = this.#patternList\n const [g1, ...grest] = this.#globList\n if (prest[0] === '') {\n // ends in /\n prest.shift()\n grest.shift()\n }\n const p = (p1 as string) + '/'\n const g = g1 + '/'\n this.#patternList = [p, ...prest]\n this.#globList = [g, ...grest]\n this.length = this.#patternList.length\n }\n }\n }\n\n /**\n * The first entry in the parsed list of patterns\n */\n pattern(): MMPattern {\n return this.#patternList[this.#index] as MMPattern\n }\n\n /**\n * true of if pattern() returns a string\n */\n isString(): boolean {\n return typeof this.#patternList[this.#index] === 'string'\n }\n /**\n * true of if pattern() returns GLOBSTAR\n */\n isGlobstar(): boolean {\n return this.#patternList[this.#index] === GLOBSTAR\n }\n /**\n * true if pattern() returns a regexp\n */\n isRegExp(): boolean {\n return this.#patternList[this.#index] instanceof RegExp\n }\n\n /**\n * The /-joined set of glob parts that make up this pattern\n */\n globString(): string {\n return (this.#globString =\n this.#globString ||\n (this.#index === 0 ?\n this.isAbsolute() ?\n this.#globList[0] + this.#globList.slice(1).join('/')\n : this.#globList.join('/')\n : this.#globList.slice(this.#index).join('/')))\n }\n\n /**\n * true if there are more pattern parts after this one\n */\n hasMore(): boolean {\n return this.length > this.#index + 1\n }\n\n /**\n * The rest of the pattern after this part, or null if this is the end\n */\n rest(): Pattern | null {\n if (this.#rest !== undefined) return this.#rest\n if (!this.hasMore()) return (this.#rest = null)\n this.#rest = new Pattern(\n this.#patternList,\n this.#globList,\n this.#index + 1,\n this.#platform,\n )\n this.#rest.#isAbsolute = this.#isAbsolute\n this.#rest.#isUNC = this.#isUNC\n this.#rest.#isDrive = this.#isDrive\n return this.#rest\n }\n\n /**\n * true if the pattern represents a //unc/path/ on windows\n */\n isUNC(): boolean {\n const pl = this.#patternList\n return this.#isUNC !== undefined ?\n this.#isUNC\n : (this.#isUNC =\n this.#platform === 'win32' &&\n this.#index === 0 &&\n pl[0] === '' &&\n pl[1] === '' &&\n typeof pl[2] === 'string' &&\n !!pl[2] &&\n typeof pl[3] === 'string' &&\n !!pl[3])\n }\n\n // pattern like C:/...\n // split = ['C:', ...]\n // XXX: would be nice to handle patterns like `c:*` to test the cwd\n // in c: for *, but I don't know of a way to even figure out what that\n // cwd is without actually chdir'ing into it?\n /**\n * True if the pattern starts with a drive letter on Windows\n */\n isDrive(): boolean {\n const pl = this.#patternList\n return this.#isDrive !== undefined ?\n this.#isDrive\n : (this.#isDrive =\n this.#platform === 'win32' &&\n this.#index === 0 &&\n this.length > 1 &&\n typeof pl[0] === 'string' &&\n /^[a-z]:$/i.test(pl[0]))\n }\n\n // pattern = '/' or '/...' or '/x/...'\n // split = ['', ''] or ['', ...] or ['', 'x', ...]\n // Drive and UNC both considered absolute on windows\n /**\n * True if the pattern is rooted on an absolute path\n */\n isAbsolute(): boolean {\n const pl = this.#patternList\n return this.#isAbsolute !== undefined ?\n this.#isAbsolute\n : (this.#isAbsolute =\n (pl[0] === '' && pl.length > 1) ||\n this.isDrive() ||\n this.isUNC())\n }\n\n /**\n * consume the root of the pattern, and return it\n */\n root(): string {\n const p = this.#patternList[0]\n return (\n typeof p === 'string' && this.isAbsolute() && this.#index === 0\n ) ?\n p\n : ''\n }\n\n /**\n * Check to see if the current globstar pattern is allowed to follow\n * a symbolic link.\n */\n checkFollowGlobstar(): boolean {\n return !(\n this.#index === 0 ||\n !this.isGlobstar() ||\n !this.#followGlobstar\n )\n }\n\n /**\n * Mark that the current globstar pattern is following a symbolic link\n */\n markFollowGlobstar(): boolean {\n if (this.#index === 0 || !this.isGlobstar() || !this.#followGlobstar)\n return false\n this.#followGlobstar = false\n return true\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/glob/dist/commonjs/processor.d.ts b/node_modules/mocha/node_modules/glob/dist/commonjs/processor.d.ts deleted file mode 100644 index ccedfbf2..00000000 --- a/node_modules/mocha/node_modules/glob/dist/commonjs/processor.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { MMRegExp } from 'minimatch'; -import { Path } from 'path-scurry'; -import { Pattern } from './pattern.js'; -import { GlobWalkerOpts } from './walker.js'; -/** - * A cache of which patterns have been processed for a given Path - */ -export declare class HasWalkedCache { - store: Map>; - constructor(store?: Map>); - copy(): HasWalkedCache; - hasWalked(target: Path, pattern: Pattern): boolean | undefined; - storeWalked(target: Path, pattern: Pattern): void; -} -/** - * A record of which paths have been matched in a given walk step, - * and whether they only are considered a match if they are a directory, - * and whether their absolute or relative path should be returned. - */ -export declare class MatchRecord { - store: Map; - add(target: Path, absolute: boolean, ifDir: boolean): void; - entries(): [Path, boolean, boolean][]; -} -/** - * A collection of patterns that must be processed in a subsequent step - * for a given path. - */ -export declare class SubWalks { - store: Map; - add(target: Path, pattern: Pattern): void; - get(target: Path): Pattern[]; - entries(): [Path, Pattern[]][]; - keys(): Path[]; -} -/** - * The class that processes patterns for a given path. - * - * Handles child entry filtering, and determining whether a path's - * directory contents must be read. - */ -export declare class Processor { - hasWalkedCache: HasWalkedCache; - matches: MatchRecord; - subwalks: SubWalks; - patterns?: Pattern[]; - follow: boolean; - dot: boolean; - opts: GlobWalkerOpts; - constructor(opts: GlobWalkerOpts, hasWalkedCache?: HasWalkedCache); - processPatterns(target: Path, patterns: Pattern[]): this; - subwalkTargets(): Path[]; - child(): Processor; - filterEntries(parent: Path, entries: Path[]): Processor; - testGlobstar(e: Path, pattern: Pattern, rest: Pattern | null, absolute: boolean): void; - testRegExp(e: Path, p: MMRegExp, rest: Pattern | null, absolute: boolean): void; - testString(e: Path, p: string, rest: Pattern | null, absolute: boolean): void; -} -//# sourceMappingURL=processor.d.ts.map \ No newline at end of file diff --git a/node_modules/mocha/node_modules/glob/dist/commonjs/processor.d.ts.map b/node_modules/mocha/node_modules/glob/dist/commonjs/processor.d.ts.map deleted file mode 100644 index aa266fee..00000000 --- a/node_modules/mocha/node_modules/glob/dist/commonjs/processor.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"processor.d.ts","sourceRoot":"","sources":["../../src/processor.ts"],"names":[],"mappings":"AAEA,OAAO,EAAY,QAAQ,EAAE,MAAM,WAAW,CAAA;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAClC,OAAO,EAAa,OAAO,EAAE,MAAM,cAAc,CAAA;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAE5C;;GAEG;AACH,qBAAa,cAAc;IACzB,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,CAAA;gBACnB,KAAK,GAAE,GAAG,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AG,SAAS;IAqBvD,YAAY,CACV,CAAC,EAAE,IAAI,EACP,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,OAAO,GAAG,IAAI,EACpB,QAAQ,EAAE,OAAO;IA8CnB,UAAU,CACR,CAAC,EAAE,IAAI,EACP,CAAC,EAAE,QAAQ,EACX,IAAI,EAAE,OAAO,GAAG,IAAI,EACpB,QAAQ,EAAE,OAAO;IAUnB,UAAU,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,IAAI,EAAE,QAAQ,EAAE,OAAO;CASvE"} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/glob/dist/commonjs/processor.js b/node_modules/mocha/node_modules/glob/dist/commonjs/processor.js deleted file mode 100644 index ee3bb439..00000000 --- a/node_modules/mocha/node_modules/glob/dist/commonjs/processor.js +++ /dev/null @@ -1,301 +0,0 @@ -"use strict"; -// synchronous utility for filtering entries and calculating subwalks -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Processor = exports.SubWalks = exports.MatchRecord = exports.HasWalkedCache = void 0; -const minimatch_1 = require("minimatch"); -/** - * A cache of which patterns have been processed for a given Path - */ -class HasWalkedCache { - store; - constructor(store = new Map()) { - this.store = store; - } - copy() { - return new HasWalkedCache(new Map(this.store)); - } - hasWalked(target, pattern) { - return this.store.get(target.fullpath())?.has(pattern.globString()); - } - storeWalked(target, pattern) { - const fullpath = target.fullpath(); - const cached = this.store.get(fullpath); - if (cached) - cached.add(pattern.globString()); - else - this.store.set(fullpath, new Set([pattern.globString()])); - } -} -exports.HasWalkedCache = HasWalkedCache; -/** - * A record of which paths have been matched in a given walk step, - * and whether they only are considered a match if they are a directory, - * and whether their absolute or relative path should be returned. - */ -class MatchRecord { - store = new Map(); - add(target, absolute, ifDir) { - const n = (absolute ? 2 : 0) | (ifDir ? 1 : 0); - const current = this.store.get(target); - this.store.set(target, current === undefined ? n : n & current); - } - // match, absolute, ifdir - entries() { - return [...this.store.entries()].map(([path, n]) => [ - path, - !!(n & 2), - !!(n & 1), - ]); - } -} -exports.MatchRecord = MatchRecord; -/** - * A collection of patterns that must be processed in a subsequent step - * for a given path. - */ -class SubWalks { - store = new Map(); - add(target, pattern) { - if (!target.canReaddir()) { - return; - } - const subs = this.store.get(target); - if (subs) { - if (!subs.find(p => p.globString() === pattern.globString())) { - subs.push(pattern); - } - } - else - this.store.set(target, [pattern]); - } - get(target) { - const subs = this.store.get(target); - /* c8 ignore start */ - if (!subs) { - throw new Error('attempting to walk unknown path'); - } - /* c8 ignore stop */ - return subs; - } - entries() { - return this.keys().map(k => [k, this.store.get(k)]); - } - keys() { - return [...this.store.keys()].filter(t => t.canReaddir()); - } -} -exports.SubWalks = SubWalks; -/** - * The class that processes patterns for a given path. - * - * Handles child entry filtering, and determining whether a path's - * directory contents must be read. - */ -class Processor { - hasWalkedCache; - matches = new MatchRecord(); - subwalks = new SubWalks(); - patterns; - follow; - dot; - opts; - constructor(opts, hasWalkedCache) { - this.opts = opts; - this.follow = !!opts.follow; - this.dot = !!opts.dot; - this.hasWalkedCache = - hasWalkedCache ? hasWalkedCache.copy() : new HasWalkedCache(); - } - processPatterns(target, patterns) { - this.patterns = patterns; - const processingSet = patterns.map(p => [target, p]); - // map of paths to the magic-starting subwalks they need to walk - // first item in patterns is the filter - for (let [t, pattern] of processingSet) { - this.hasWalkedCache.storeWalked(t, pattern); - const root = pattern.root(); - const absolute = pattern.isAbsolute() && this.opts.absolute !== false; - // start absolute patterns at root - if (root) { - t = t.resolve(root === '/' && this.opts.root !== undefined ? - this.opts.root - : root); - const rest = pattern.rest(); - if (!rest) { - this.matches.add(t, true, false); - continue; - } - else { - pattern = rest; - } - } - if (t.isENOENT()) - continue; - let p; - let rest; - let changed = false; - while (typeof (p = pattern.pattern()) === 'string' && - (rest = pattern.rest())) { - const c = t.resolve(p); - t = c; - pattern = rest; - changed = true; - } - p = pattern.pattern(); - rest = pattern.rest(); - if (changed) { - if (this.hasWalkedCache.hasWalked(t, pattern)) - continue; - this.hasWalkedCache.storeWalked(t, pattern); - } - // now we have either a final string for a known entry, - // more strings for an unknown entry, - // or a pattern starting with magic, mounted on t. - if (typeof p === 'string') { - // must not be final entry, otherwise we would have - // concatenated it earlier. - const ifDir = p === '..' || p === '' || p === '.'; - this.matches.add(t.resolve(p), absolute, ifDir); - continue; - } - else if (p === minimatch_1.GLOBSTAR) { - // if no rest, match and subwalk pattern - // if rest, process rest and subwalk pattern - // if it's a symlink, but we didn't get here by way of a - // globstar match (meaning it's the first time THIS globstar - // has traversed a symlink), then we follow it. Otherwise, stop. - if (!t.isSymbolicLink() || - this.follow || - pattern.checkFollowGlobstar()) { - this.subwalks.add(t, pattern); - } - const rp = rest?.pattern(); - const rrest = rest?.rest(); - if (!rest || ((rp === '' || rp === '.') && !rrest)) { - // only HAS to be a dir if it ends in **/ or **/. - // but ending in ** will match files as well. - this.matches.add(t, absolute, rp === '' || rp === '.'); - } - else { - if (rp === '..') { - // this would mean you're matching **/.. at the fs root, - // and no thanks, I'm not gonna test that specific case. - /* c8 ignore start */ - const tp = t.parent || t; - /* c8 ignore stop */ - if (!rrest) - this.matches.add(tp, absolute, true); - else if (!this.hasWalkedCache.hasWalked(tp, rrest)) { - this.subwalks.add(tp, rrest); - } - } - } - } - else if (p instanceof RegExp) { - this.subwalks.add(t, pattern); - } - } - return this; - } - subwalkTargets() { - return this.subwalks.keys(); - } - child() { - return new Processor(this.opts, this.hasWalkedCache); - } - // return a new Processor containing the subwalks for each - // child entry, and a set of matches, and - // a hasWalkedCache that's a copy of this one - // then we're going to call - filterEntries(parent, entries) { - const patterns = this.subwalks.get(parent); - // put matches and entry walks into the results processor - const results = this.child(); - for (const e of entries) { - for (const pattern of patterns) { - const absolute = pattern.isAbsolute(); - const p = pattern.pattern(); - const rest = pattern.rest(); - if (p === minimatch_1.GLOBSTAR) { - results.testGlobstar(e, pattern, rest, absolute); - } - else if (p instanceof RegExp) { - results.testRegExp(e, p, rest, absolute); - } - else { - results.testString(e, p, rest, absolute); - } - } - } - return results; - } - testGlobstar(e, pattern, rest, absolute) { - if (this.dot || !e.name.startsWith('.')) { - if (!pattern.hasMore()) { - this.matches.add(e, absolute, false); - } - if (e.canReaddir()) { - // if we're in follow mode or it's not a symlink, just keep - // testing the same pattern. If there's more after the globstar, - // then this symlink consumes the globstar. If not, then we can - // follow at most ONE symlink along the way, so we mark it, which - // also checks to ensure that it wasn't already marked. - if (this.follow || !e.isSymbolicLink()) { - this.subwalks.add(e, pattern); - } - else if (e.isSymbolicLink()) { - if (rest && pattern.checkFollowGlobstar()) { - this.subwalks.add(e, rest); - } - else if (pattern.markFollowGlobstar()) { - this.subwalks.add(e, pattern); - } - } - } - } - // if the NEXT thing matches this entry, then also add - // the rest. - if (rest) { - const rp = rest.pattern(); - if (typeof rp === 'string' && - // dots and empty were handled already - rp !== '..' && - rp !== '' && - rp !== '.') { - this.testString(e, rp, rest.rest(), absolute); - } - else if (rp === '..') { - /* c8 ignore start */ - const ep = e.parent || e; - /* c8 ignore stop */ - this.subwalks.add(ep, rest); - } - else if (rp instanceof RegExp) { - this.testRegExp(e, rp, rest.rest(), absolute); - } - } - } - testRegExp(e, p, rest, absolute) { - if (!p.test(e.name)) - return; - if (!rest) { - this.matches.add(e, absolute, false); - } - else { - this.subwalks.add(e, rest); - } - } - testString(e, p, rest, absolute) { - // should never happen? - if (!e.isNamed(p)) - return; - if (!rest) { - this.matches.add(e, absolute, false); - } - else { - this.subwalks.add(e, rest); - } - } -} -exports.Processor = Processor; -//# sourceMappingURL=processor.js.map \ No newline at end of file diff --git a/node_modules/mocha/node_modules/glob/dist/commonjs/processor.js.map b/node_modules/mocha/node_modules/glob/dist/commonjs/processor.js.map deleted file mode 100644 index 58a70882..00000000 --- a/node_modules/mocha/node_modules/glob/dist/commonjs/processor.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"processor.js","sourceRoot":"","sources":["../../src/processor.ts"],"names":[],"mappings":";AAAA,qEAAqE;;;AA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AE,CAAC;gBAChC,IAAI,CAAC,UAAU,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,CAAC,IAAI,EAAE,EAAE,QAAQ,CAAC,CAAA;YAC/C,CAAC;QACH,CAAC;IACH,CAAC;IAED,UAAU,CACR,CAAO,EACP,CAAW,EACX,IAAoB,EACpB,QAAiB;QAEjB,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;YAAE,OAAM;QAC3B,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAA;QACtC,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,CAAA;QAC5B,CAAC;IACH,CAAC;IAED,UAAU,CAAC,CAAO,EAAE,CAAS,EAAE,IAAoB,EAAE,QAAiB;QACpE,uBAAuB;QACvB,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;YAAE,OAAM;QACzB,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAA;QACtC,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,CAAA;QAC5B,CAAC;IACH,CAAC;CACF;AA9ND,8BA8NC","sourcesContent":["// synchronous utility for filtering entries and calculating subwalks\n\nimport { GLOBSTAR, MMRegExp } from 'minimatch'\nimport { Path } from 'path-scurry'\nimport { MMPattern, Pattern } from './pattern.js'\nimport { GlobWalkerOpts } from './walker.js'\n\n/**\n * A cache of which patterns have been processed for a given Path\n */\nexport class HasWalkedCache {\n store: Map>\n constructor(store: Map> = new Map()) {\n this.store = store\n }\n copy() {\n return new HasWalkedCache(new Map(this.store))\n }\n hasWalked(target: Path, pattern: Pattern) {\n return this.store.get(target.fullpath())?.has(pattern.globString())\n }\n storeWalked(target: Path, pattern: Pattern) {\n const fullpath = target.fullpath()\n const cached = this.store.get(fullpath)\n if (cached) cached.add(pattern.globString())\n else this.store.set(fullpath, new Set([pattern.globString()]))\n }\n}\n\n/**\n * A record of which paths have been matched in a given walk step,\n * and whether they only are considered a match if they are a directory,\n * and whether their absolute or relative path should be returned.\n */\nexport class MatchRecord {\n store: Map = new Map()\n add(target: Path, absolute: boolean, ifDir: boolean) {\n const n = (absolute ? 2 : 0) | (ifDir ? 1 : 0)\n const current = this.store.get(target)\n this.store.set(target, current === undefined ? n : n & current)\n }\n // match, absolute, ifdir\n entries(): [Path, boolean, boolean][] {\n return [...this.store.entries()].map(([path, n]) => [\n path,\n !!(n & 2),\n !!(n & 1),\n ])\n }\n}\n\n/**\n * A collection of patterns that must be processed in a subsequent step\n * for a given path.\n */\nexport class SubWalks {\n store: Map = new Map()\n add(target: Path, pattern: Pattern) {\n if (!target.canReaddir()) {\n return\n }\n const subs = this.store.get(target)\n if (subs) {\n if (!subs.find(p => p.globString() === pattern.globString())) {\n subs.push(pattern)\n }\n } else this.store.set(target, [pattern])\n }\n get(target: Path): Pattern[] {\n const subs = this.store.get(target)\n /* c8 ignore start */\n if (!subs) {\n throw new Error('attempting to walk unknown path')\n }\n /* c8 ignore stop */\n return subs\n }\n entries(): [Path, Pattern[]][] {\n return this.keys().map(k => [k, this.store.get(k) as Pattern[]])\n }\n keys(): Path[] {\n return [...this.store.keys()].filter(t => t.canReaddir())\n }\n}\n\n/**\n * The class that processes patterns for a given path.\n *\n * Handles child entry filtering, and determining whether a path's\n * directory contents must be read.\n */\nexport class Processor {\n hasWalkedCache: HasWalkedCache\n matches = new MatchRecord()\n subwalks = new SubWalks()\n patterns?: Pattern[]\n follow: boolean\n dot: boolean\n opts: GlobWalkerOpts\n\n constructor(opts: GlobWalkerOpts, hasWalkedCache?: HasWalkedCache) {\n this.opts = opts\n this.follow = !!opts.follow\n this.dot = !!opts.dot\n this.hasWalkedCache =\n hasWalkedCache ? hasWalkedCache.copy() : new HasWalkedCache()\n }\n\n processPatterns(target: Path, patterns: Pattern[]) {\n this.patterns = patterns\n const processingSet: [Path, Pattern][] = patterns.map(p => [target, p])\n\n // map of paths to the magic-starting subwalks they need to walk\n // first item in patterns is the filter\n\n for (let [t, pattern] of processingSet) {\n this.hasWalkedCache.storeWalked(t, pattern)\n\n const root = pattern.root()\n const absolute = pattern.isAbsolute() && this.opts.absolute !== false\n\n // start absolute patterns at root\n if (root) {\n t = t.resolve(\n root === '/' && this.opts.root !== undefined ?\n this.opts.root\n : root,\n )\n const rest = pattern.rest()\n if (!rest) {\n this.matches.add(t, true, false)\n continue\n } else {\n pattern = rest\n }\n }\n\n if (t.isENOENT()) continue\n\n let p: MMPattern\n let rest: Pattern | null\n let changed = false\n while (\n typeof (p = pattern.pattern()) === 'string' &&\n (rest = pattern.rest())\n ) {\n const c = t.resolve(p)\n t = c\n pattern = rest\n changed = true\n }\n p = pattern.pattern()\n rest = pattern.rest()\n if (changed) {\n if (this.hasWalkedCache.hasWalked(t, pattern)) continue\n this.hasWalkedCache.storeWalked(t, pattern)\n }\n\n // now we have either a final string for a known entry,\n // more strings for an unknown entry,\n // or a pattern starting with magic, mounted on t.\n if (typeof p === 'string') {\n // must not be final entry, otherwise we would have\n // concatenated it earlier.\n const ifDir = p === '..' || p === '' || p === '.'\n this.matches.add(t.resolve(p), absolute, ifDir)\n continue\n } else if (p === GLOBSTAR) {\n // if no rest, match and subwalk pattern\n // if rest, process rest and subwalk pattern\n // if it's a symlink, but we didn't get here by way of a\n // globstar match (meaning it's the first time THIS globstar\n // has traversed a symlink), then we follow it. Otherwise, stop.\n if (\n !t.isSymbolicLink() ||\n this.follow ||\n pattern.checkFollowGlobstar()\n ) {\n this.subwalks.add(t, pattern)\n }\n const rp = rest?.pattern()\n const rrest = rest?.rest()\n if (!rest || ((rp === '' || rp === '.') && !rrest)) {\n // only HAS to be a dir if it ends in **/ or **/.\n // but ending in ** will match files as well.\n this.matches.add(t, absolute, rp === '' || rp === '.')\n } else {\n if (rp === '..') {\n // this would mean you're matching **/.. at the fs root,\n // and no thanks, I'm not gonna test that specific case.\n /* c8 ignore start */\n const tp = t.parent || t\n /* c8 ignore stop */\n if (!rrest) this.matches.add(tp, absolute, true)\n else if (!this.hasWalkedCache.hasWalked(tp, rrest)) {\n this.subwalks.add(tp, rrest)\n }\n }\n }\n } else if (p instanceof RegExp) {\n this.subwalks.add(t, pattern)\n }\n }\n\n return this\n }\n\n subwalkTargets(): Path[] {\n return this.subwalks.keys()\n }\n\n child() {\n return new Processor(this.opts, this.hasWalkedCache)\n }\n\n // return a new Processor containing the subwalks for each\n // child entry, and a set of matches, and\n // a hasWalkedCache that's a copy of this one\n // then we're going to call\n filterEntries(parent: Path, entries: Path[]): Processor {\n const patterns = this.subwalks.get(parent)\n // put matches and entry walks into the results processor\n const results = this.child()\n for (const e of entries) {\n for (const pattern of patterns) {\n const absolute = pattern.isAbsolute()\n const p = pattern.pattern()\n const rest = pattern.rest()\n if (p === GLOBSTAR) {\n results.testGlobstar(e, pattern, rest, absolute)\n } else if (p instanceof RegExp) {\n results.testRegExp(e, p, rest, absolute)\n } else {\n results.testString(e, p, rest, absolute)\n }\n }\n }\n return results\n }\n\n testGlobstar(\n e: Path,\n pattern: Pattern,\n rest: Pattern | null,\n absolute: boolean,\n ) {\n if (this.dot || !e.name.startsWith('.')) {\n if (!pattern.hasMore()) {\n this.matches.add(e, absolute, false)\n }\n if (e.canReaddir()) {\n // if we're in follow mode or it's not a symlink, just keep\n // testing the same pattern. If there's more after the globstar,\n // then this symlink consumes the globstar. If not, then we can\n // follow at most ONE symlink along the way, so we mark it, which\n // also checks to ensure that it wasn't already marked.\n if (this.follow || !e.isSymbolicLink()) {\n this.subwalks.add(e, pattern)\n } else if (e.isSymbolicLink()) {\n if (rest && pattern.checkFollowGlobstar()) {\n this.subwalks.add(e, rest)\n } else if (pattern.markFollowGlobstar()) {\n this.subwalks.add(e, pattern)\n }\n }\n }\n }\n // if the NEXT thing matches this entry, then also add\n // the rest.\n if (rest) {\n const rp = rest.pattern()\n if (\n typeof rp === 'string' &&\n // dots and empty were handled already\n rp !== '..' &&\n rp !== '' &&\n rp !== '.'\n ) {\n this.testString(e, rp, rest.rest(), absolute)\n } else if (rp === '..') {\n /* c8 ignore start */\n const ep = e.parent || e\n /* c8 ignore stop */\n this.subwalks.add(ep, rest)\n } else if (rp instanceof RegExp) {\n this.testRegExp(e, rp, rest.rest(), absolute)\n }\n }\n }\n\n testRegExp(\n e: Path,\n p: MMRegExp,\n rest: Pattern | null,\n absolute: boolean,\n ) {\n if (!p.test(e.name)) return\n if (!rest) {\n this.matches.add(e, absolute, false)\n } else {\n this.subwalks.add(e, rest)\n }\n }\n\n testString(e: Path, p: string, rest: Pattern | null, absolute: boolean) {\n // should never happen?\n if (!e.isNamed(p)) return\n if (!rest) {\n this.matches.add(e, absolute, false)\n } else {\n this.subwalks.add(e, rest)\n }\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/glob/dist/commonjs/walker.d.ts b/node_modules/mocha/node_modules/glob/dist/commonjs/walker.d.ts deleted file mode 100644 index 499c8f49..00000000 --- a/node_modules/mocha/node_modules/glob/dist/commonjs/walker.d.ts +++ /dev/null @@ -1,97 +0,0 @@ -/** - * Single-use utility classes to provide functionality to the {@link Glob} - * methods. - * - * @module - */ -import { Minipass } from 'minipass'; -import { Path } from 'path-scurry'; -import { IgnoreLike } from './ignore.js'; -import { Pattern } from './pattern.js'; -import { Processor } from './processor.js'; -export interface GlobWalkerOpts { - absolute?: boolean; - allowWindowsEscape?: boolean; - cwd?: string | URL; - dot?: boolean; - dotRelative?: boolean; - follow?: boolean; - ignore?: string | string[] | IgnoreLike; - mark?: boolean; - matchBase?: boolean; - maxDepth?: number; - nobrace?: boolean; - nocase?: boolean; - nodir?: boolean; - noext?: boolean; - noglobstar?: boolean; - platform?: NodeJS.Platform; - posix?: boolean; - realpath?: boolean; - root?: string; - stat?: boolean; - signal?: AbortSignal; - windowsPathsNoEscape?: boolean; - withFileTypes?: boolean; - includeChildMatches?: boolean; -} -export type GWOFileTypesTrue = GlobWalkerOpts & { - withFileTypes: true; -}; -export type GWOFileTypesFalse = GlobWalkerOpts & { - withFileTypes: false; -}; -export type GWOFileTypesUnset = GlobWalkerOpts & { - withFileTypes?: undefined; -}; -export type Result = O extends GWOFileTypesTrue ? Path : O extends GWOFileTypesFalse ? string : O extends GWOFileTypesUnset ? string : Path | string; -export type Matches = O extends GWOFileTypesTrue ? Set : O extends GWOFileTypesFalse ? Set : O extends GWOFileTypesUnset ? Set : Set; -export type MatchStream = Minipass, Result>; -/** - * basic walking utilities that all the glob walker types use - */ -export declare abstract class GlobUtil { - #private; - path: Path; - patterns: Pattern[]; - opts: O; - seen: Set; - paused: boolean; - aborted: boolean; - signal?: AbortSignal; - maxDepth: number; - includeChildMatches: boolean; - constructor(patterns: Pattern[], path: Path, opts: O); - pause(): void; - resume(): void; - onResume(fn: () => any): void; - matchCheck(e: Path, ifDir: boolean): Promise; - matchCheckTest(e: Path | undefined, ifDir: boolean): Path | undefined; - matchCheckSync(e: Path, ifDir: boolean): Path | undefined; - abstract matchEmit(p: Result): void; - abstract matchEmit(p: string | Path): void; - matchFinish(e: Path, absolute: boolean): void; - match(e: Path, absolute: boolean, ifDir: boolean): Promise; - matchSync(e: Path, absolute: boolean, ifDir: boolean): void; - walkCB(target: Path, patterns: Pattern[], cb: () => any): void; - walkCB2(target: Path, patterns: Pattern[], processor: Processor, cb: () => any): any; - walkCB3(target: Path, entries: Path[], processor: Processor, cb: () => any): void; - walkCBSync(target: Path, patterns: Pattern[], cb: () => any): void; - walkCB2Sync(target: Path, patterns: Pattern[], processor: Processor, cb: () => any): any; - walkCB3Sync(target: Path, entries: Path[], processor: Processor, cb: () => any): void; -} -export declare class GlobWalker extends GlobUtil { - matches: Set>; - constructor(patterns: Pattern[], path: Path, opts: O); - matchEmit(e: Result): void; - walk(): Promise>>; - walkSync(): Set>; -} -export declare class GlobStream extends GlobUtil { - results: Minipass, Result>; - constructor(patterns: Pattern[], path: Path, opts: O); - matchEmit(e: Result): void; - stream(): MatchStream; - streamSync(): MatchStream; -} -//# sourceMappingURL=walker.d.ts.map \ No newline at end of file diff --git a/node_modules/mocha/node_modules/glob/dist/commonjs/walker.d.ts.map b/node_modules/mocha/node_modules/glob/dist/commonjs/walker.d.ts.map deleted file mode 100644 index 769957bd..00000000 --- a/node_modules/mocha/node_modules/glob/dist/commonjs/walker.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"walker.d.ts","sourceRoot":"","sources":["../../src/walker.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AACnC,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAClC,OAAO,EAAU,UAAU,EAAE,MAAM,aAAa,CAAA;AAOhD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAE1C,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,GAAG,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;IAClB,GAAG,CAAC,EAAE,OAAO,CAAA;IACb,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,UAAU,CAAA;IACvC,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,SAAS,CAAC,EAAE,OAAO,CAAA;IAGnB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,KAAK,CAAC,EAAE,OA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Ac,CACzC,SAAQ,QAAQ,CAAC,CAAC,CAAC;IACnB,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAA;gBAE3B,QAAQ,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IAUpD,SAAS,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,GAAG,IAAI;IAK7B,MAAM,IAAI,WAAW,CAAC,CAAC,CAAC;IAYxB,UAAU,IAAI,WAAW,CAAC,CAAC,CAAC;CAO7B"} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/glob/dist/commonjs/walker.js b/node_modules/mocha/node_modules/glob/dist/commonjs/walker.js deleted file mode 100644 index cb15946d..00000000 --- a/node_modules/mocha/node_modules/glob/dist/commonjs/walker.js +++ /dev/null @@ -1,387 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.GlobStream = exports.GlobWalker = exports.GlobUtil = void 0; -/** - * Single-use utility classes to provide functionality to the {@link Glob} - * methods. - * - * @module - */ -const minipass_1 = require("minipass"); -const ignore_js_1 = require("./ignore.js"); -const processor_js_1 = require("./processor.js"); -const makeIgnore = (ignore, opts) => typeof ignore === 'string' ? new ignore_js_1.Ignore([ignore], opts) - : Array.isArray(ignore) ? new ignore_js_1.Ignore(ignore, opts) - : ignore; -/** - * basic walking utilities that all the glob walker types use - */ -class GlobUtil { - path; - patterns; - opts; - seen = new Set(); - paused = false; - aborted = false; - #onResume = []; - #ignore; - #sep; - signal; - maxDepth; - includeChildMatches; - constructor(patterns, path, opts) { - this.patterns = patterns; - this.path = path; - this.opts = opts; - this.#sep = !opts.posix && opts.platform === 'win32' ? '\\' : '/'; - this.includeChildMatches = opts.includeChildMatches !== false; - if (opts.ignore || !this.includeChildMatches) { - this.#ignore = makeIgnore(opts.ignore ?? [], opts); - if (!this.includeChildMatches && - typeof this.#ignore.add !== 'function') { - const m = 'cannot ignore child matches, ignore lacks add() method.'; - throw new Error(m); - } - } - // ignore, always set with maxDepth, but it's optional on the - // GlobOptions type - /* c8 ignore start */ - this.maxDepth = opts.maxDepth || Infinity; - /* c8 ignore stop */ - if (opts.signal) { - this.signal = opts.signal; - this.signal.addEventListener('abort', () => { - this.#onResume.length = 0; - }); - } - } - #ignored(path) { - return this.seen.has(path) || !!this.#ignore?.ignored?.(path); - } - #childrenIgnored(path) { - return !!this.#ignore?.childrenIgnored?.(path); - } - // backpressure mechanism - pause() { - this.paused = true; - } - resume() { - /* c8 ignore start */ - if (this.signal?.aborted) - return; - /* c8 ignore stop */ - this.paused = false; - let fn = undefined; - while (!this.paused && (fn = this.#onResume.shift())) { - fn(); - } - } - onResume(fn) { - if (this.signal?.aborted) - return; - /* c8 ignore start */ - if (!this.paused) { - fn(); - } - else { - /* c8 ignore stop */ - this.#onResume.push(fn); - } - } - // do the requisite realpath/stat checking, and return the path - // to add or undefined to filter it out. - async matchCheck(e, ifDir) { - if (ifDir && this.opts.nodir) - return undefined; - let rpc; - if (this.opts.realpath) { - rpc = e.realpathCached() || (await e.realpath()); - if (!rpc) - return undefined; - e = rpc; - } - const needStat = e.isUnknown() || this.opts.stat; - const s = needStat ? await e.lstat() : e; - if (this.opts.follow && this.opts.nodir && s?.isSymbolicLink()) { - const target = await s.realpath(); - /* c8 ignore start */ - if (target && (target.isUnknown() || this.opts.stat)) { - await target.lstat(); - } - /* c8 ignore stop */ - } - return this.matchCheckTest(s, ifDir); - } - matchCheckTest(e, ifDir) { - return (e && - (this.maxDepth === Infinity || e.depth() <= this.maxDepth) && - (!ifDir || e.canReaddir()) && - (!this.opts.nodir || !e.isDirectory()) && - (!this.opts.nodir || - !this.opts.follow || - !e.isSymbolicLink() || - !e.realpathCached()?.isDirectory()) && - !this.#ignored(e)) ? - e - : undefined; - } - matchCheckSync(e, ifDir) { - if (ifDir && this.opts.nodir) - return undefined; - let rpc; - if (this.opts.realpath) { - rpc = e.realpathCached() || e.realpathSync(); - if (!rpc) - return undefined; - e = rpc; - } - const needStat = e.isUnknown() || this.opts.stat; - const s = needStat ? e.lstatSync() : e; - if (this.opts.follow && this.opts.nodir && s?.isSymbolicLink()) { - const target = s.realpathSync(); - if (target && (target?.isUnknown() || this.opts.stat)) { - target.lstatSync(); - } - } - return this.matchCheckTest(s, ifDir); - } - matchFinish(e, absolute) { - if (this.#ignored(e)) - return; - // we know we have an ignore if this is false, but TS doesn't - if (!this.includeChildMatches && this.#ignore?.add) { - const ign = `${e.relativePosix()}/**`; - this.#ignore.add(ign); - } - const abs = this.opts.absolute === undefined ? absolute : this.opts.absolute; - this.seen.add(e); - const mark = this.opts.mark && e.isDirectory() ? this.#sep : ''; - // ok, we have what we need! - if (this.opts.withFileTypes) { - this.matchEmit(e); - } - else if (abs) { - const abs = this.opts.posix ? e.fullpathPosix() : e.fullpath(); - this.matchEmit(abs + mark); - } - else { - const rel = this.opts.posix ? e.relativePosix() : e.relative(); - const pre = this.opts.dotRelative && !rel.startsWith('..' + this.#sep) ? - '.' + this.#sep - : ''; - this.matchEmit(!rel ? '.' + mark : pre + rel + mark); - } - } - async match(e, absolute, ifDir) { - const p = await this.matchCheck(e, ifDir); - if (p) - this.matchFinish(p, absolute); - } - matchSync(e, absolute, ifDir) { - const p = this.matchCheckSync(e, ifDir); - if (p) - this.matchFinish(p, absolute); - } - walkCB(target, patterns, cb) { - /* c8 ignore start */ - if (this.signal?.aborted) - cb(); - /* c8 ignore stop */ - this.walkCB2(target, patterns, new processor_js_1.Processor(this.opts), cb); - } - walkCB2(target, patterns, processor, cb) { - if (this.#childrenIgnored(target)) - return cb(); - if (this.signal?.aborted) - cb(); - if (this.paused) { - this.onResume(() => this.walkCB2(target, patterns, processor, cb)); - return; - } - processor.processPatterns(target, patterns); - // done processing. all of the above is sync, can be abstracted out. - // subwalks is a map of paths to the entry filters they need - // matches is a map of paths to [absolute, ifDir] tuples. - let tasks = 1; - const next = () => { - if (--tasks === 0) - cb(); - }; - for (const [m, absolute, ifDir] of processor.matches.entries()) { - if (this.#ignored(m)) - continue; - tasks++; - this.match(m, absolute, ifDir).then(() => next()); - } - for (const t of processor.subwalkTargets()) { - if (this.maxDepth !== Infinity && t.depth() >= this.maxDepth) { - continue; - } - tasks++; - const childrenCached = t.readdirCached(); - if (t.calledReaddir()) - this.walkCB3(t, childrenCached, processor, next); - else { - t.readdirCB((_, entries) => this.walkCB3(t, entries, processor, next), true); - } - } - next(); - } - walkCB3(target, entries, processor, cb) { - processor = processor.filterEntries(target, entries); - let tasks = 1; - const next = () => { - if (--tasks === 0) - cb(); - }; - for (const [m, absolute, ifDir] of processor.matches.entries()) { - if (this.#ignored(m)) - continue; - tasks++; - this.match(m, absolute, ifDir).then(() => next()); - } - for (const [target, patterns] of processor.subwalks.entries()) { - tasks++; - this.walkCB2(target, patterns, processor.child(), next); - } - next(); - } - walkCBSync(target, patterns, cb) { - /* c8 ignore start */ - if (this.signal?.aborted) - cb(); - /* c8 ignore stop */ - this.walkCB2Sync(target, patterns, new processor_js_1.Processor(this.opts), cb); - } - walkCB2Sync(target, patterns, processor, cb) { - if (this.#childrenIgnored(target)) - return cb(); - if (this.signal?.aborted) - cb(); - if (this.paused) { - this.onResume(() => this.walkCB2Sync(target, patterns, processor, cb)); - return; - } - processor.processPatterns(target, patterns); - // done processing. all of the above is sync, can be abstracted out. - // subwalks is a map of paths to the entry filters they need - // matches is a map of paths to [absolute, ifDir] tuples. - let tasks = 1; - const next = () => { - if (--tasks === 0) - cb(); - }; - for (const [m, absolute, ifDir] of processor.matches.entries()) { - if (this.#ignored(m)) - continue; - this.matchSync(m, absolute, ifDir); - } - for (const t of processor.subwalkTargets()) { - if (this.maxDepth !== Infinity && t.depth() >= this.maxDepth) { - continue; - } - tasks++; - const children = t.readdirSync(); - this.walkCB3Sync(t, children, processor, next); - } - next(); - } - walkCB3Sync(target, entries, processor, cb) { - processor = processor.filterEntries(target, entries); - let tasks = 1; - const next = () => { - if (--tasks === 0) - cb(); - }; - for (const [m, absolute, ifDir] of processor.matches.entries()) { - if (this.#ignored(m)) - continue; - this.matchSync(m, absolute, ifDir); - } - for (const [target, patterns] of processor.subwalks.entries()) { - tasks++; - this.walkCB2Sync(target, patterns, processor.child(), next); - } - next(); - } -} -exports.GlobUtil = GlobUtil; -class GlobWalker extends GlobUtil { - matches = new Set(); - constructor(patterns, path, opts) { - super(patterns, path, opts); - } - matchEmit(e) { - this.matches.add(e); - } - async walk() { - if (this.signal?.aborted) - throw this.signal.reason; - if (this.path.isUnknown()) { - await this.path.lstat(); - } - await new Promise((res, rej) => { - this.walkCB(this.path, this.patterns, () => { - if (this.signal?.aborted) { - rej(this.signal.reason); - } - else { - res(this.matches); - } - }); - }); - return this.matches; - } - walkSync() { - if (this.signal?.aborted) - throw this.signal.reason; - if (this.path.isUnknown()) { - this.path.lstatSync(); - } - // nothing for the callback to do, because this never pauses - this.walkCBSync(this.path, this.patterns, () => { - if (this.signal?.aborted) - throw this.signal.reason; - }); - return this.matches; - } -} -exports.GlobWalker = GlobWalker; -class GlobStream extends GlobUtil { - results; - constructor(patterns, path, opts) { - super(patterns, path, opts); - this.results = new minipass_1.Minipass({ - signal: this.signal, - objectMode: true, - }); - this.results.on('drain', () => this.resume()); - this.results.on('resume', () => this.resume()); - } - matchEmit(e) { - this.results.write(e); - if (!this.results.flowing) - this.pause(); - } - stream() { - const target = this.path; - if (target.isUnknown()) { - target.lstat().then(() => { - this.walkCB(target, this.patterns, () => this.results.end()); - }); - } - else { - this.walkCB(target, this.patterns, () => this.results.end()); - } - return this.results; - } - streamSync() { - if (this.path.isUnknown()) { - this.path.lstatSync(); - } - this.walkCBSync(this.path, this.patterns, () => this.results.end()); - return this.results; - } -} -exports.GlobStream = GlobStream; -//# sourceMappingURL=walker.js.map \ No newline at end of file diff --git a/node_modules/mocha/node_modules/glob/dist/commonjs/walker.js.map b/node_modules/mocha/node_modules/glob/dist/commonjs/walker.js.map deleted file mode 100644 index 49b01386..00000000 --- a/node_modules/moc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EAAE,CAAC,CAAA;QACnE,OAAO,IAAI,CAAC,OAAO,CAAA;IACrB,CAAC;CACF;AAvCD,gCAuCC","sourcesContent":["/**\n * Single-use utility classes to provide functionality to the {@link Glob}\n * methods.\n *\n * @module\n */\nimport { Minipass } from 'minipass'\nimport { Path } from 'path-scurry'\nimport { Ignore, IgnoreLike } from './ignore.js'\n\n// XXX can we somehow make it so that it NEVER processes a given path more than\n// once, enough that the match set tracking is no longer needed? that'd speed\n// things up a lot. Or maybe bring back nounique, and skip it in that case?\n\n// a single minimatch set entry with 1 or more parts\nimport { Pattern } from './pattern.js'\nimport { Processor } from './processor.js'\n\nexport interface GlobWalkerOpts {\n absolute?: boolean\n allowWindowsEscape?: boolean\n cwd?: string | URL\n dot?: boolean\n dotRelative?: boolean\n follow?: boolean\n ignore?: string | string[] | IgnoreLike\n mark?: boolean\n matchBase?: boolean\n // Note: maxDepth here means \"maximum actual Path.depth()\",\n // not \"maximum depth beyond cwd\"\n maxDepth?: number\n nobrace?: boolean\n nocase?: boolean\n nodir?: boolean\n noext?: boolean\n noglobstar?: boolean\n platform?: NodeJS.Platform\n posix?: boolean\n realpath?: boolean\n root?: string\n stat?: boolean\n signal?: AbortSignal\n windowsPathsNoEscape?: boolean\n withFileTypes?: boolean\n includeChildMatches?: boolean\n}\n\nexport type GWOFileTypesTrue = GlobWalkerOpts & {\n withFileTypes: true\n}\nexport type GWOFileTypesFalse = GlobWalkerOpts & {\n withFileTypes: false\n}\nexport type GWOFileTypesUnset = GlobWalkerOpts & {\n withFileTypes?: undefined\n}\n\nexport type Result =\n O extends GWOFileTypesTrue ? Path\n : O extends GWOFileTypesFalse ? string\n : O extends GWOFileTypesUnset ? string\n : Path | string\n\nexport type Matches =\n O extends GWOFileTypesTrue ? Set\n : O extends GWOFileTypesFalse ? Set\n : O extends GWOFileTypesUnset ? Set\n : Set\n\nexport type MatchStream = Minipass<\n Result,\n Result\n>\n\nconst makeIgnore = (\n ignore: string | string[] | IgnoreLike,\n opts: GlobWalkerOpts,\n): IgnoreLike =>\n typeof ignore === 'string' ? new Ignore([ignore], opts)\n : Array.isArray(ignore) ? new Ignore(ignore, opts)\n : ignore\n\n/**\n * basic walking utilities that all the glob walker types use\n */\nexport abstract class GlobUtil {\n path: Path\n patterns: Pattern[]\n opts: O\n seen: Set = new Set()\n paused: boolean = false\n aborted: boolean = false\n #onResume: (() => any)[] = []\n #ignore?: IgnoreLike\n #sep: '\\\\' | '/'\n signal?: AbortSignal\n maxDepth: number\n includeChildMatches: boolean\n\n constructor(patterns: Pattern[], path: Path, opts: O)\n constructor(patterns: Pattern[], path: Path, opts: O) {\n this.patterns = patterns\n this.path = path\n this.opts = opts\n this.#sep = !opts.posix && opts.platform === 'win32' ? '\\\\' : '/'\n this.includeChildMatches = opts.includeChildMatches !== false\n if (opts.ignore || !this.includeChildMatches) {\n this.#ignore = makeIgnore(opts.ignore ?? [], opts)\n if (\n !this.includeChildMatches &&\n typeof this.#ignore.add !== 'function'\n ) {\n const m = 'cannot ignore child matches, ignore lacks add() method.'\n throw new Error(m)\n }\n }\n // ignore, always set with maxDepth, but it's optional on the\n // GlobOptions type\n /* c8 ignore start */\n this.maxDepth = opts.maxDepth || Infinity\n /* c8 ignore stop */\n if (opts.signal) {\n this.signal = opts.signal\n this.signal.addEventListener('abort', () => {\n this.#onResume.length = 0\n })\n }\n }\n\n #ignored(path: Path): boolean {\n return this.seen.has(path) || !!this.#ignore?.ignored?.(path)\n }\n #childrenIgnored(path: Path): boolean {\n return !!this.#ignore?.childrenIgnored?.(path)\n }\n\n // backpressure mechanism\n pause() {\n this.paused = true\n }\n resume() {\n /* c8 ignore start */\n if (this.signal?.aborted) return\n /* c8 ignore stop */\n this.paused = false\n let fn: (() => any) | undefined = undefined\n while (!this.paused && (fn = this.#onResume.shift())) {\n fn()\n }\n }\n onResume(fn: () => any) {\n if (this.signal?.aborted) return\n /* c8 ignore start */\n if (!this.paused) {\n fn()\n } else {\n /* c8 ignore stop */\n this.#onResume.push(fn)\n }\n }\n\n // do the requisite realpath/stat checking, and return the path\n // to add or undefined to filter it out.\n async matchCheck(e: Path, ifDir: boolean): Promise {\n if (ifDir && this.opts.nodir) return undefined\n let rpc: Path | undefined\n if (this.opts.realpath) {\n rpc = e.realpathCached() || (await e.realpath())\n if (!rpc) return undefined\n e = rpc\n }\n const needStat = e.isUnknown() || this.opts.stat\n const s = needStat ? await e.lstat() : e\n if (this.opts.follow && this.opts.nodir && s?.isSymbolicLink()) {\n const target = await s.realpath()\n /* c8 ignore start */\n if (target && (target.isUnknown() || this.opts.stat)) {\n await target.lstat()\n }\n /* c8 ignore stop */\n }\n return this.matchCheckTest(s, ifDir)\n }\n\n matchCheckTest(e: Path | undefined, ifDir: boolean): Path | undefined {\n return (\n e &&\n (this.maxDepth === Infinity || e.depth() <= this.maxDepth) &&\n (!ifDir || e.canReaddir()) &&\n (!this.opts.nodir || !e.isDirectory()) &&\n (!this.opts.nodir ||\n !this.opts.follow ||\n !e.isSymbolicLink() ||\n !e.realpathCached()?.isDirectory()) &&\n !this.#ignored(e)\n ) ?\n e\n : undefined\n }\n\n matchCheckSync(e: Path, ifDir: boolean): Path | undefined {\n if (ifDir && this.opts.nodir) return undefined\n let rpc: Path | undefined\n if (this.opts.realpath) {\n rpc = e.realpathCached() || e.realpathSync()\n if (!rpc) return undefined\n e = rpc\n }\n const needStat = e.isUnknown() || this.opts.stat\n const s = needStat ? e.lstatSync() : e\n if (this.opts.follow && this.opts.nodir && s?.isSymbolicLink()) {\n const target = s.realpathSync()\n if (target && (target?.isUnknown() || this.opts.stat)) {\n target.lstatSync()\n }\n }\n return this.matchCheckTest(s, ifDir)\n }\n\n abstract matchEmit(p: Result): void\n abstract matchEmit(p: string | Path): void\n\n matchFinish(e: Path, absolute: boolean) {\n if (this.#ignored(e)) return\n // we know we have an ignore if this is false, but TS doesn't\n if (!this.includeChildMatches && this.#ignore?.add) {\n const ign = `${e.relativePosix()}/**`\n this.#ignore.add(ign)\n }\n const abs =\n this.opts.absolute === undefined ? absolute : this.opts.absolute\n this.seen.add(e)\n const mark = this.opts.mark && e.isDirectory() ? this.#sep : ''\n // ok, we have what we need!\n if (this.opts.withFileTypes) {\n this.matchEmit(e)\n } else if (abs) {\n const abs = this.opts.posix ? e.fullpathPosix() : e.fullpath()\n this.matchEmit(abs + mark)\n } else {\n const rel = this.opts.posix ? e.relativePosix() : e.relative()\n const pre =\n this.opts.dotRelative && !rel.startsWith('..' + this.#sep) ?\n '.' + this.#sep\n : ''\n this.matchEmit(!rel ? '.' + mark : pre + rel + mark)\n }\n }\n\n async match(e: Path, absolute: boolean, ifDir: boolean): Promise {\n const p = await this.matchCheck(e, ifDir)\n if (p) this.matchFinish(p, absolute)\n }\n\n matchSync(e: Path, absolute: boolean, ifDir: boolean): void {\n const p = this.matchCheckSync(e, ifDir)\n if (p) this.matchFinish(p, absolute)\n }\n\n walkCB(target: Path, patterns: Pattern[], cb: () => any) {\n /* c8 ignore start */\n if (this.signal?.aborted) cb()\n /* c8 ignore stop */\n this.walkCB2(target, patterns, new Processor(this.opts), cb)\n }\n\n walkCB2(\n target: Path,\n patterns: Pattern[],\n processor: Processor,\n cb: () => any,\n ) {\n if (this.#childrenIgnored(target)) return cb()\n if (this.signal?.aborted) cb()\n if (this.paused) {\n this.onResume(() => this.walkCB2(target, patterns, processor, cb))\n return\n }\n processor.processPatterns(target, patterns)\n\n // done processing. all of the above is sync, can be abstracted out.\n // subwalks is a map of paths to the entry filters they need\n // matches is a map of paths to [absolute, ifDir] tuples.\n let tasks = 1\n const next = () => {\n if (--tasks === 0) cb()\n }\n\n for (const [m, absolute, ifDir] of processor.matches.entries()) {\n if (this.#ignored(m)) continue\n tasks++\n this.match(m, absolute, ifDir).then(() => next())\n }\n\n for (const t of processor.subwalkTargets()) {\n if (this.maxDepth !== Infinity && t.depth() >= this.maxDepth) {\n continue\n }\n tasks++\n const childrenCached = t.readdirCached()\n if (t.calledReaddir())\n this.walkCB3(t, childrenCached, processor, next)\n else {\n t.readdirCB(\n (_, entries) => this.walkCB3(t, entries, processor, next),\n true,\n )\n }\n }\n\n next()\n }\n\n walkCB3(\n target: Path,\n entries: Path[],\n processor: Processor,\n cb: () => any,\n ) {\n processor = processor.filterEntries(target, entries)\n\n let tasks = 1\n const next = () => {\n if (--tasks === 0) cb()\n }\n\n for (const [m, absolute, ifDir] of processor.matches.entries()) {\n if (this.#ignored(m)) continue\n tasks++\n this.match(m, absolute, ifDir).then(() => next())\n }\n for (const [target, patterns] of processor.subwalks.entries()) {\n tasks++\n this.walkCB2(target, patterns, processor.child(), next)\n }\n\n next()\n }\n\n walkCBSync(target: Path, patterns: Pattern[], cb: () => any) {\n /* c8 ignore start */\n if (this.signal?.aborted) cb()\n /* c8 ignore stop */\n this.walkCB2Sync(target, patterns, new Processor(this.opts), cb)\n }\n\n walkCB2Sync(\n target: Path,\n patterns: Pattern[],\n processor: Processor,\n cb: () => any,\n ) {\n if (this.#childrenIgnored(target)) return cb()\n if (this.signal?.aborted) cb()\n if (this.paused) {\n this.onResume(() =>\n this.walkCB2Sync(target, patterns, processor, cb),\n )\n return\n }\n processor.processPatterns(target, patterns)\n\n // done processing. all of the above is sync, can be abstracted out.\n // subwalks is a map of paths to the entry filters they need\n // matches is a map of paths to [absolute, ifDir] tuples.\n let tasks = 1\n const next = () => {\n if (--tasks === 0) cb()\n }\n\n for (const [m, absolute, ifDir] of processor.matches.entries()) {\n if (this.#ignored(m)) continue\n this.matchSync(m, absolute, ifDir)\n }\n\n for (const t of processor.subwalkTargets()) {\n if (this.maxDepth !== Infinity && t.depth() >= this.maxDepth) {\n continue\n }\n tasks++\n const children = t.readdirSync()\n this.walkCB3Sync(t, children, processor, next)\n }\n\n next()\n }\n\n walkCB3Sync(\n target: Path,\n entries: Path[],\n processor: Processor,\n cb: () => any,\n ) {\n processor = processor.filterEntries(target, entries)\n\n let tasks = 1\n const next = () => {\n if (--tasks === 0) cb()\n }\n\n for (const [m, absolute, ifDir] of processor.matches.entries()) {\n if (this.#ignored(m)) continue\n this.matchSync(m, absolute, ifDir)\n }\n for (const [target, patterns] of processor.subwalks.entries()) {\n tasks++\n this.walkCB2Sync(target, patterns, processor.child(), next)\n }\n\n next()\n }\n}\n\nexport class GlobWalker<\n O extends GlobWalkerOpts = GlobWalkerOpts,\n> extends GlobUtil {\n matches = new Set>()\n\n constructor(patterns: Pattern[], path: Path, opts: O) {\n super(patterns, path, opts)\n }\n\n matchEmit(e: Result): void {\n this.matches.add(e)\n }\n\n async walk(): Promise>> {\n if (this.signal?.aborted) throw this.signal.reason\n if (this.path.isUnknown()) {\n await this.path.lstat()\n }\n await new Promise((res, rej) => {\n this.walkCB(this.path, this.patterns, () => {\n if (this.signal?.aborted) {\n rej(this.signal.reason)\n } else {\n res(this.matches)\n }\n })\n })\n return this.matches\n }\n\n walkSync(): Set> {\n if (this.signal?.aborted) throw this.signal.reason\n if (this.path.isUnknown()) {\n this.path.lstatSync()\n }\n // nothing for the callback to do, because this never pauses\n this.walkCBSync(this.path, this.patterns, () => {\n if (this.signal?.aborted) throw this.signal.reason\n })\n return this.matches\n }\n}\n\nexport class GlobStream<\n O extends GlobWalkerOpts = GlobWalkerOpts,\n> extends GlobUtil {\n results: Minipass, Result>\n\n constructor(patterns: Pattern[], path: Path, opts: O) {\n super(patterns, path, opts)\n this.results = new Minipass, Result>({\n signal: this.signal,\n objectMode: true,\n })\n this.results.on('drain', () => this.resume())\n this.results.on('resume', () => this.resume())\n }\n\n matchEmit(e: Result): void {\n this.results.write(e)\n if (!this.results.flowing) this.pause()\n }\n\n stream(): MatchStream {\n const target = this.path\n if (target.isUnknown()) {\n target.lstat().then(() => {\n this.walkCB(target, this.patterns, () => this.results.end())\n })\n } else {\n this.walkCB(target, this.patterns, () => this.results.end())\n }\n return this.results\n }\n\n streamSync(): MatchStream {\n if (this.path.isUnknown()) {\n this.path.lstatSync()\n }\n this.walkCBSync(this.path, this.patterns, () => this.results.end())\n return this.results\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/glob/dist/esm/bin.d.mts b/node_modules/mocha/node_modules/glob/dist/esm/bin.d.mts deleted file mode 100644 index 77298e47..00000000 --- a/node_modules/mocha/node_modules/glob/dist/esm/bin.d.mts +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env node -export {}; -//# sourceMappingURL=bin.d.mts.map \ No newline at end of file diff --git a/node_modules/mocha/node_modules/glob/dist/esm/bin.d.mts.map b/node_modules/mocha/node_modules/glob/dist/esm/bin.d.mts.map deleted file mode 100644 index ec64bdda..00000000 --- a/node_modules/mocha/node_modules/glob/dist/esm/bin.d.mts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"bin.d.mts","sourceRoot":"","sources":["../../src/bin.mts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/glob/dist/esm/bin.mjs b/node_modules/mocha/node_modules/glob/dist/esm/bin.mjs deleted file mode 100755 index 5c7bf1e9..00000000 --- a/node_modules/mocha/node_modules/glob/dist/esm/bin.mjs +++ /dev/null @@ -1,270 +0,0 @@ -#!/usr/bin/env node -import { foregroundChild } from 'foreground-child'; -import { existsSync } from 'fs'; -import { jack } from 'jackspeak'; -import { loadPackageJson } from 'package-json-from-dist'; -import { join } from 'path'; -import { globStream } from './index.js'; -const { version } = loadPackageJson(import.meta.url, '../package.json'); -const j = jack({ - usage: 'glob [options] [ [ ...]]', -}) - .description(` - Glob v${version} - - Expand the positional glob expression arguments into any matching file - system paths found. - `) - .opt({ - cmd: { - short: 'c', - hint: 'command', - description: `Run the command provided, passing the glob expression - matches as arguments.`, - }, -}) - .opt({ - default: { - short: 'p', - hint: 'pattern', - description: `If no positional arguments are provided, glob will use - this pattern`, - }, -}) - .flag({ - all: { - short: 'A', - description: `By default, the glob cli command will not expand any - arguments that are an exact match to a file on disk. - - This prevents double-expanding, in case the shell expands - an argument whose filename is a glob expression. - - For example, if 'app/*.ts' would match 'app/[id].ts', then - on Windows powershell or cmd.exe, 'glob app/*.ts' will - expand to 'app/[id].ts', as expected. However, in posix - shells such as bash or zsh, the shell will first expand - 'app/*.ts' to a list of filenames. Then glob will look - for a file matching 'app/[id].ts' (ie, 'app/i.ts' or - 'app/d.ts'), which is unexpected. - - Setting '--all' prevents this behavior, causing glob - to treat ALL patterns as glob expressions to be expanded, - even if they are an exact match to a file on disk. - - When setting this option, be sure to enquote arguments - so that the shell will not expand them prior to passing - them to the glob command process. - `, - }, - absolute: { - short: 'a', - description: 'Expand to absolute paths', - }, - 'dot-relative': { - short: 'd', - description: `Prepend './' on relative matches`, - }, - mark: { - short: 'm', - description: `Append a / on any directories matched`, - }, - posix: { - short: 'x', - description: `Always resolve to posix style paths, using '/' as the - directory separator, even on Windows. Drive letter - absolute matches on Windows will be expanded to their - full resolved UNC maths, eg instead of 'C:\\foo\\bar', - it will expand to '//?/C:/foo/bar'. - `, - }, - follow: { - short: 'f', - description: `Follow symlinked directories when expanding '**'`, - }, - realpath: { - short: 'R', - description: `Call 'fs.realpath' on all of the results. In the case - of an entry that cannot be resolved, the entry is - omitted. This incurs a slight performance penalty, of - course, because of the added system calls.`, - }, - stat: { - short: 's', - description: `Call 'fs.lstat' on all entries, whether required or not - to determine if it's a valid match.`, - }, - 'match-base': { - short: 'b', - description: `Perform a basename-only match if the pattern does not - contain any slash characters. That is, '*.js' would be - treated as equivalent to '**/*.js', matching js files - in all directories. - `, - }, - dot: { - description: `Allow patterns to match files/directories that start - with '.', even if the pattern does not start with '.' - `, - }, - nobrace: { - description: 'Do not expand {...} patterns', - }, - nocase: { - description: `Perform a case-insensitive match. This defaults to - 'true' on macOS and Windows platforms, and false on - all others. - - Note: 'nocase' should only be explicitly set when it is - known that the filesystem's case sensitivity differs - from the platform default. If set 'true' on - case-insensitive file systems, then the walk may return - more or less results than expected. - `, - }, - nodir: { - description: `Do not match directories, only files. - - Note: to *only* match directories, append a '/' at the - end of the pattern. - `, - }, - noext: { - description: `Do not expand extglob patterns, such as '+(a|b)'`, - }, - noglobstar: { - description: `Do not expand '**' against multiple path portions. - Ie, treat it as a normal '*' instead.`, - }, - 'windows-path-no-escape': { - description: `Use '\\' as a path separator *only*, and *never* as an - escape character. If set, all '\\' characters are - replaced with '/' in the pattern.`, - }, -}) - .num({ - 'max-depth': { - short: 'D', - description: `Maximum depth to traverse from the current - working directory`, - }, -}) - .opt({ - cwd: { - short: 'C', - description: 'Current working directory to execute/match in', - default: process.cwd(), - }, - root: { - short: 'r', - description: `A string path resolved against the 'cwd', which is - used as the starting point for absolute patterns that - start with '/' (but not drive letters or UNC paths - on Windows). - - Note that this *doesn't* necessarily limit the walk to - the 'root' directory, and doesn't affect the cwd - starting point for non-absolute patterns. A pattern - containing '..' will still be able to traverse out of - the root directory, if it is not an actual root directory - on the filesystem, and any non-absolute patterns will - still be matched in the 'cwd'. - - To start absolute and non-absolute patterns in the same - path, you can use '--root=' to set it to the empty - string. However, be aware that on Windows systems, a - pattern like 'x:/*' or '//host/share/*' will *always* - start in the 'x:/' or '//host/share/' directory, - regardless of the --root setting. - `, - }, - platform: { - description: `Defaults to the value of 'process.platform' if - available, or 'linux' if not. Setting --platform=win32 - on non-Windows systems may cause strange behavior!`, - validOptions: [ - 'aix', - 'android', - 'darwin', - 'freebsd', - 'haiku', - 'linux', - 'openbsd', - 'sunos', - 'win32', - 'cygwin', - 'netbsd', - ], - }, -}) - .optList({ - ignore: { - short: 'i', - description: `Glob patterns to ignore`, - }, -}) - .flag({ - debug: { - short: 'v', - description: `Output a huge amount of noisy debug information about - patterns as they are parsed and used to match files.`, - }, -}) - .flag({ - help: { - short: 'h', - description: 'Show this usage information', - }, -}); -try { - const { positionals, values } = j.parse(); - if (values.help) { - console.log(j.usage()); - process.exit(0); - } - if (positionals.length === 0 && !values.default) - throw 'No patterns provided'; - if (positionals.length === 0 && values.default) - positionals.push(values.default); - const patterns = values.all ? positionals : positionals.filter(p => !existsSync(p)); - const matches = values.all ? - [] - : positionals.filter(p => existsSync(p)).map(p => join(p)); - const stream = globStream(patterns, { - absolute: values.absolute, - cwd: values.cwd, - dot: values.dot, - dotRelative: values['dot-relative'], - follow: values.follow, - ignore: values.ignore, - mark: values.mark, - matchBase: values['match-base'], - maxDepth: values['max-depth'], - nobrace: values.nobrace, - nocase: values.nocase, - nodir: values.nodir, - noext: values.noext, - noglobstar: values.noglobstar, - platform: values.platform, - realpath: values.realpath, - root: values.root, - stat: values.stat, - debug: values.debug, - posix: values.posix, - }); - const cmd = values.cmd; - if (!cmd) { - matches.forEach(m => console.log(m)); - stream.on('data', f => console.log(f)); - } - else { - stream.on('data', f => matches.push(f)); - stream.on('end', () => foregroundChild(cmd, matches, { shell: true })); - } -} -catch (e) { - console.error(j.usage()); - console.error(e instanceof Error ? e.message : String(e)); - process.exit(1); -} -//# sourceMappingURL=bin.mjs.map \ No newline at end of file diff --git a/node_modules/mocha/node_modules/glob/dist/esm/bin.mjs.map b/node_modules/mocha/node_modules/glob/dist/esm/bin.mjs.map deleted file mode 100644 index 67247d5b..00000000 --- a/node_modules/mocha/node_modules/glob/dist/esm/bin.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"bin.mjs","sourceRoot":"","sources":["../../src/bin.mts"],"names":[],"mappings":";AACA,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,IAAI,CAAA;AAC/B,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAEvC,MAAM,EAAE,OAAO,EAAE,GAAG,eAAe,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,iBAAiB,CAAC,CAAA;AAEvE,MAAM,CAAC,GAAG,IAAI,CAAC;IACb,KAAK,EAAE,4CAA4C;CACpD,CAAC;KACC,WAAW,CACV;YACQ,OAAO;;;;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;QACzB,IAAI,EAAE,MAAM,CAAC,IAAI;QACjB,IAAI,EAAE,MAAM,CAAC,IAAI;QACjB,KAAK,EAAE,MAAM,CAAC,KAAK;QACnB,KAAK,EAAE,MAAM,CAAC,KAAK;KACpB,CAAC,CAAA;IAEF,MAAM,GAAG,GAAG,MAAM,CAAC,GAAG,CAAA;IACtB,IAAI,CAAC,GAAG,EAAE,CAAC;QACT,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;QACpC,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;IACxC,CAAC;SAAM,CAAC;QACN,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAA;QACvC,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC,eAAe,CAAC,GAAG,EAAE,OAAO,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,CAAA;IACxE,CAAC;AACH,CAAC;AAAC,OAAO,CAAC,EAAE,CAAC;IACX,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAA;IACxB,OAAO,CAAC,KAAK,CAAC,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAA;IACzD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;AACjB,CAAC","sourcesContent":["#!/usr/bin/env node\nimport { foregroundChild } from 'foreground-child'\nimport { existsSync } from 'fs'\nimport { jack } from 'jackspeak'\nimport { loadPackageJson } from 'package-json-from-dist'\nimport { join } from 'path'\nimport { globStream } from './index.js'\n\nconst { version } = loadPackageJson(import.meta.url, '../package.json')\n\nconst j = jack({\n usage: 'glob [options] [ [ ...]]',\n})\n .description(\n `\n Glob v${version}\n\n Expand the positional glob expression arguments into any matching file\n system paths found.\n `,\n )\n .opt({\n cmd: {\n short: 'c',\n hint: 'command',\n description: `Run the command provided, passing the glob expression\n matches as arguments.`,\n },\n })\n .opt({\n default: {\n short: 'p',\n hint: 'pattern',\n description: `If no positional arguments are provided, glob will use\n this pattern`,\n },\n })\n .flag({\n all: {\n short: 'A',\n description: `By default, the glob cli command will not expand any\n arguments that are an exact match to a file on disk.\n\n This prevents double-expanding, in case the shell expands\n an argument whose filename is a glob expression.\n\n For example, if 'app/*.ts' would match 'app/[id].ts', then\n on Windows powershell or cmd.exe, 'glob app/*.ts' will\n expand to 'app/[id].ts', as expected. However, in posix\n shells such as bash or zsh, the shell will first expand\n 'app/*.ts' to a list of filenames. Then glob will look\n for a file matching 'app/[id].ts' (ie, 'app/i.ts' or\n 'app/d.ts'), which is unexpected.\n\n Setting '--all' prevents this behavior, causing glob\n to treat ALL patterns as glob expressions to be expanded,\n even if they are an exact match to a file on disk.\n\n When setting this option, be sure to enquote arguments\n so that the shell will not expand them prior to passing\n them to the glob command process.\n `,\n },\n absolute: {\n short: 'a',\n description: 'Expand to absolute paths',\n },\n 'dot-relative': {\n short: 'd',\n description: `Prepend './' on relative matches`,\n },\n mark: {\n short: 'm',\n description: `Append a / on any directories matched`,\n },\n posix: {\n short: 'x',\n description: `Always resolve to posix style paths, using '/' as the\n directory separator, even on Windows. Drive letter\n absolute matches on Windows will be expanded to their\n full resolved UNC maths, eg instead of 'C:\\\\foo\\\\bar',\n it will expand to '//?/C:/foo/bar'.\n `,\n },\n\n follow: {\n short: 'f',\n description: `Follow symlinked directories when expanding '**'`,\n },\n realpath: {\n short: 'R',\n description: `Call 'fs.realpath' on all of the results. In the case\n of an entry that cannot be resolved, the entry is\n omitted. This incurs a slight performance penalty, of\n course, because of the added system calls.`,\n },\n stat: {\n short: 's',\n description: `Call 'fs.lstat' on all entries, whether required or not\n to determine if it's a valid match.`,\n },\n 'match-base': {\n short: 'b',\n description: `Perform a basename-only match if the pattern does not\n contain any slash characters. That is, '*.js' would be\n treated as equivalent to '**/*.js', matching js files\n in all directories.\n `,\n },\n\n dot: {\n description: `Allow patterns to match files/directories that start\n with '.', even if the pattern does not start with '.'\n `,\n },\n nobrace: {\n description: 'Do not expand {...} patterns',\n },\n nocase: {\n description: `Perform a case-insensitive match. This defaults to\n 'true' on macOS and Windows platforms, and false on\n all others.\n\n Note: 'nocase' should only be explicitly set when it is\n known that the filesystem's case sensitivity differs\n from the platform default. If set 'true' on\n case-insensitive file systems, then the walk may return\n more or less results than expected.\n `,\n },\n nodir: {\n description: `Do not match directories, only files.\n\n Note: to *only* match directories, append a '/' at the\n end of the pattern.\n `,\n },\n noext: {\n description: `Do not expand extglob patterns, such as '+(a|b)'`,\n },\n noglobstar: {\n description: `Do not expand '**' against multiple path portions.\n Ie, treat it as a normal '*' instead.`,\n },\n 'windows-path-no-escape': {\n description: `Use '\\\\' as a path separator *only*, and *never* as an\n escape character. If set, all '\\\\' characters are\n replaced with '/' in the pattern.`,\n },\n })\n .num({\n 'max-depth': {\n short: 'D',\n description: `Maximum depth to traverse from the current\n working directory`,\n },\n })\n .opt({\n cwd: {\n short: 'C',\n description: 'Current working directory to execute/match in',\n default: process.cwd(),\n },\n root: {\n short: 'r',\n description: `A string path resolved against the 'cwd', which is\n used as the starting point for absolute patterns that\n start with '/' (but not drive letters or UNC paths\n on Windows).\n\n Note that this *doesn't* necessarily limit the walk to\n the 'root' directory, and doesn't affect the cwd\n starting point for non-absolute patterns. A pattern\n containing '..' will still be able to traverse out of\n the root directory, if it is not an actual root directory\n on the filesystem, and any non-absolute patterns will\n still be matched in the 'cwd'.\n\n To start absolute and non-absolute patterns in the same\n path, you can use '--root=' to set it to the empty\n string. However, be aware that on Windows systems, a\n pattern like 'x:/*' or '//host/share/*' will *always*\n start in the 'x:/' or '//host/share/' directory,\n regardless of the --root setting.\n `,\n },\n platform: {\n description: `Defaults to the value of 'process.platform' if\n available, or 'linux' if not. Setting --platform=win32\n on non-Windows systems may cause strange behavior!`,\n validOptions: [\n 'aix',\n 'android',\n 'darwin',\n 'freebsd',\n 'haiku',\n 'linux',\n 'openbsd',\n 'sunos',\n 'win32',\n 'cygwin',\n 'netbsd',\n ],\n },\n })\n .optList({\n ignore: {\n short: 'i',\n description: `Glob patterns to ignore`,\n },\n })\n .flag({\n debug: {\n short: 'v',\n description: `Output a huge amount of noisy debug information about\n patterns as they are parsed and used to match files.`,\n },\n })\n .flag({\n help: {\n short: 'h',\n description: 'Show this usage information',\n },\n })\n\ntry {\n const { positionals, values } = j.parse()\n if (values.help) {\n console.log(j.usage())\n process.exit(0)\n }\n if (positionals.length === 0 && !values.default)\n throw 'No patterns provided'\n if (positionals.length === 0 && values.default)\n positionals.push(values.default)\n const patterns =\n values.all ? positionals : positionals.filter(p => !existsSync(p))\n const matches =\n values.all ?\n []\n : positionals.filter(p => existsSync(p)).map(p => join(p))\n const stream = globStream(patterns, {\n absolute: values.absolute,\n cwd: values.cwd,\n dot: values.dot,\n dotRelative: values['dot-relative'],\n follow: values.follow,\n ignore: values.ignore,\n mark: values.mark,\n matchBase: values['match-base'],\n maxDepth: values['max-depth'],\n nobrace: values.nobrace,\n nocase: values.nocase,\n nodir: values.nodir,\n noext: values.noext,\n noglobstar: values.noglobstar,\n platform: values.platform as undefined | NodeJS.Platform,\n realpath: values.realpath,\n root: values.root,\n stat: values.stat,\n debug: values.debug,\n posix: values.posix,\n })\n\n const cmd = values.cmd\n if (!cmd) {\n matches.forEach(m => console.log(m))\n stream.on('data', f => console.log(f))\n } else {\n stream.on('data', f => matches.push(f))\n stream.on('end', () => foregroundChild(cmd, matches, { shell: true }))\n }\n} catch (e) {\n console.error(j.usage())\n console.error(e instanceof Error ? e.message : String(e))\n process.exit(1)\n}\n"]} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/glob/dist/esm/glob.d.ts b/node_modules/mocha/node_modules/glob/dist/esm/glob.d.ts deleted file mode 100644 index 25262b3d..00000000 --- a/node_modules/mocha/node_modules/glob/dist/esm/glob.d.ts +++ /dev/null @@ -1,388 +0,0 @@ -import { Minimatch } from 'minimatch'; -import { Minipass } from 'minipass'; -import { FSOption, Path, PathScurry } from 'path-scurry'; -import { IgnoreLike } from './ignore.js'; -import { Pattern } from './pattern.js'; -export type MatchSet = Minimatch['set']; -export type GlobParts = Exclude; -/** - * A `GlobOptions` object may be provided to any of the exported methods, and - * must be provided to the `Glob` constructor. - * - * All options are optional, boolean, and false by default, unless otherwise - * noted. - * - * All resolved options are added to the Glob object as properties. - * - * If you are running many `glob` operations, you can pass a Glob object as the - * `options` argument to a subsequent operation to share the previously loaded - * cache. - */ -export interface GlobOptions { - /** - * Set to `true` to always receive absolute paths for - * matched files. Set to `false` to always return relative paths. - * - * When this option is not set, absolute paths are returned for patterns - * that are absolute, and otherwise paths are returned that are relative - * to the `cwd` setting. - * - * This does _not_ make an extra system call to get - * the realpath, it only does string path resolution. - * - * Conflicts with {@link withFileTypes} - */ - absolute?: boolean; - /** - * Set to false to enable {@link windowsPathsNoEscape} - * - * @deprecated - */ - allowWindowsEscape?: boolean; - /** - * The current working directory in which to search. Defaults to - * `process.cwd()`. - * - * May be eiher a string path or a `file://` URL object or string. - */ - cwd?: string | URL; - /** - * Include `.dot` files in normal matches and `globstar` - * matches. Note that an explicit dot in a portion of the pattern - * will always match dot files. - */ - dot?: boolean; - /** - * Prepend all relative path strings with `./` (or `.\` on Windows). - * - * Without this option, returned relative paths are "bare", so instead of - * returning `'./foo/bar'`, they are returned as `'foo/bar'`. - * - * Relative patterns starting with `'../'` are not prepended with `./`, even - * if this option is set. - */ - dotRelative?: boolean; - /** - * Follow symlinked directories when expanding `**` - * patterns. This can result in a lot of duplicate references in - * the presence of cyclic links, and make performance quite bad. - * - * By default, a `**` in a pattern will follow 1 symbolic link if - * it is not the first item in the pattern, or none if it is the - * first item in the pattern, following the same behavior as Bash. - */ - follow?: boolean; - /** - * string or string[], or an object with `ignore` and `ignoreChildren` - * methods. - * - * If a string or string[] is provided, then this is treated as a glob - * pattern or array of glob patterns to exclude from matches. To ignore all - * children within a directory, as well as the entry itself, append `'/**'` - * to the ignore pattern. - * - * **Note** `ignore` patterns are _always_ in `dot:true` mode, regardless of - * any other settings. - * - * If an object is provided that has `ignored(path)` and/or - * `childrenIgnored(path)` methods, then these methods will be called to - * determine whether any Path is a match or if its children should be - * traversed, respectively. - */ - ignore?: string | string[] | IgnoreLike; - /** - * Treat brace expansion like `{a,b}` as a "magic" pattern. Has no - * effect if {@link nobrace} is set. - * - * Only has effect on the {@link hasMagic} function. - */ - magicalBraces?: boolean; - /** - * Add a `/` character to directory matches. Note that this requires - * additional stat calls in some cases. - */ - mark?: boolean; - /** - * Perform a basename-only match if the pattern does not contain any slash - * characters. That is, `*.js` would be treated as equivalent to - * `**\/*.js`, matching all js files in all directories. - */ - matchBase?: boolean; - /** - * Limit the directory traversal to a given depth below the cwd. - * Note that this does NOT prevent traversal to sibling folders, - * root patterns, and so on. It only limits the maximum folder depth - * that the walk will descend, relative to the cwd. - */ - maxDepth?: number; - /** - * Do not expand `{a,b}` and `{1..3}` brace sets. - */ - nobrace?: boolean; - /** - * Perform a case-insensitive match. This defaults to `true` on macOS and - * Windows systems, and `false` on all others. - * - * **Note** `nocase` should only be explicitly set when it is - * known that the filesystem's case sensitivity differs from the - * platform default. If set `true` on case-sensitive file - * systems, or `false` on case-insensitive file systems, then the - * walk may return more or less results than expected. - */ - nocase?: boolean; - /** - * Do not match directories, only files. (Note: to match - * _only_ directories, put a `/` at the end of the pattern.) - */ - nodir?: boolean; - /** - * Do not match "extglob" patterns such as `+(a|b)`. - */ - noext?: boolean; - /** - * Do not match `**` against multiple filenames. (Ie, treat it as a normal - * `*` instead.) - * - * Conflicts with {@link matchBase} - */ - noglobstar?: boolean; - /** - * Defaults to value of `process.platform` if available, or `'linux'` if - * not. Setting `platform:'win32'` on non-Windows systems may cause strange - * behavior. - */ - platform?: NodeJS.Platform; - /** - * Set to true to call `fs.realpath` on all of the - * results. In the case of an entry that cannot be resolved, the - * entry is omitted. This incurs a slight performance penalty, of - * course, because of the added system calls. - */ - realpath?: boolean; - /** - * - * A string path resolved against the `cwd` option, which - * is used as the starting point for absolute patterns that start - * with `/`, (but not drive letters or UNC paths on Windows). - * - * Note that this _doesn't_ necessarily limit the walk to the - * `root` directory, and doesn't affect the cwd starting point for - * non-absolute patterns. A pattern containing `..` will still be - * able to traverse out of the root directory, if it is not an - * actual root directory on the filesystem, and any non-absolute - * patterns will be matched in the `cwd`. For example, the - * pattern `/../*` with `{root:'/some/path'}` will return all - * files in `/some`, not all files in `/some/path`. The pattern - * `*` with `{root:'/some/path'}` will return all the entries in - * the cwd, not the entries in `/some/path`. - * - * To start absolute and non-absolute patterns in the same - * path, you can use `{root:''}`. However, be aware that on - * Windows systems, a pattern like `x:/*` or `//host/share/*` will - * _always_ start in the `x:/` or `//host/share` directory, - * regardless of the `root` setting. - */ - root?: string; - /** - * A [PathScurry](http://npm.im/path-scurry) object used - * to traverse the file system. If the `nocase` option is set - * explicitly, then any provided `scurry` object must match this - * setting. - */ - scurry?: PathScurry; - /** - * Call `lstat()` on all entries, whether required or not to determine - * if it's a valid match. When used with {@link withFileTypes}, this means - * that matches will include data such as modified time, permissions, and - * so on. Note that this will incur a performance cost due to the added - * system calls. - */ - stat?: boolean; - /** - * An AbortSignal which will cancel the Glob walk when - * triggered. - */ - signal?: AbortSignal; - /** - * Use `\\` as a path separator _only_, and - * _never_ as an escape character. If set, all `\\` characters are - * replaced with `/` in the pattern. - * - * Note that this makes it **impossible** to match against paths - * containing literal glob pattern characters, but allows matching - * with patterns constructed using `path.join()` and - * `path.resolve()` on Windows platforms, mimicking the (buggy!) - * behavior of Glob v7 and before on Windows. Please use with - * caution, and be mindful of [the caveat below about Windows - * paths](#windows). (For legacy reasons, this is also set if - * `allowWindowsEscape` is set to the exact value `false`.) - */ - windowsPathsNoEscape?: boolean; - /** - * Return [PathScurry](http://npm.im/path-scurry) - * `Path` objects instead of strings. These are similar to a - * NodeJS `Dirent` object, but with additional methods and - * properties. - * - * Conflicts with {@link absolute} - */ - withFileTypes?: boolean; - /** - * An fs implementation to override some or all of the defaults. See - * http://npm.im/path-scurry for details about what can be overridden. - */ - fs?: FSOption; - /** - * Just passed along to Minimatch. Note that this makes all pattern - * matching operations slower and *extremely* noisy. - */ - debug?: boolean; - /** - * Return `/` delimited paths, even on Windows. - * - * On posix systems, this has no effect. But, on Windows, it means that - * paths will be `/` delimited, and absolute paths will be their full - * resolved UNC forms, eg instead of `'C:\\foo\\bar'`, it would return - * `'//?/C:/foo/bar'` - */ - posix?: boolean; - /** - * Do not match any children of any matches. For example, the pattern - * `**\/foo` would match `a/foo`, but not `a/foo/b/foo` in this mode. - * - * This is especially useful for cases like "find all `node_modules` - * folders, but not the ones in `node_modules`". - * - * In order to support this, the `Ignore` implementation must support an - * `add(pattern: string)` method. If using the default `Ignore` class, then - * this is fine, but if this is set to `false`, and a custom `Ignore` is - * provided that does not have an `add()` method, then it will throw an - * error. - * - * **Caveat** It *only* ignores matches that would be a descendant of a - * previous match, and only if that descendant is matched *after* the - * ancestor is encountered. Since the file system walk happens in - * indeterminate order, it's possible that a match will already be added - * before its ancestor, if multiple or braced patterns are used. - * - * For example: - * - * ```ts - * const results = await glob([ - * // likely to match first, since it's just a stat - * 'a/b/c/d/e/f', - * - * // this pattern is more complicated! It must to various readdir() - * // calls and test the results against a regular expression, and that - * // is certainly going to take a little bit longer. - * // - * // So, later on, it encounters a match at 'a/b/c/d/e', but it's too - * // late to ignore a/b/c/d/e/f, because it's already been emitted. - * 'a/[bdf]/?/[a-z]/*', - * ], { includeChildMatches: false }) - * ``` - * - * It's best to only set this to `false` if you can be reasonably sure that - * no components of the pattern will potentially match one another's file - * system descendants, or if the occasional included child entry will not - * cause problems. - * - * @default true - */ - includeChildMatches?: boolean; -} -export type GlobOptionsWithFileTypesTrue = GlobOptions & { - withFileTypes: true; - absolute?: undefined; - mark?: undefined; - posix?: undefined; -}; -export type GlobOptionsWithFileTypesFalse = GlobOptions & { - withFileTypes?: false; -}; -export type GlobOptionsWithFileTypesUnset = GlobOptions & { - withFileTypes?: undefined; -}; -export type Result = Opts extends GlobOptionsWithFileTypesTrue ? Path : Opts extends GlobOptionsWithFileTypesFalse ? string : Opts extends GlobOptionsWithFileTypesUnset ? string : string | Path; -export type Results = Result[]; -export type FileTypes = Opts extends GlobOptionsWithFileTypesTrue ? true : Opts extends GlobOptionsWithFileTypesFalse ? false : Opts extends GlobOptionsWithFileTypesUnset ? false : boolean; -/** - * An object that can perform glob pattern traversals. - */ -export declare class Glob implements GlobOptions { - absolute?: boolean; - cwd: string; - root?: string; - dot: boolean; - dotRelative: boolean; - follow: boolean; - ignore?: string | string[] | IgnoreLike; - magicalBraces: boolean; - mark?: boolean; - matchBase: boolean; - maxDepth: number; - nobrace: boolean; - nocase: boolean; - nodir: boolean; - noext: boolean; - noglobstar: boolean; - pattern: string[]; - platform: NodeJS.Platform; - realpath: boolean; - scurry: PathScurry; - stat: boolean; - signal?: AbortSignal; - windowsPathsNoEscape: boolean; - withFileTypes: FileTypes; - includeChildMatches: boolean; - /** - * The options provided to the constructor. - */ - opts: Opts; - /** - * An array of parsed immutable {@link Pattern} objects. - */ - patterns: Pattern[]; - /** - * All options are stored as properties on the `Glob` object. - * - * See {@link GlobOptions} for full options descriptions. - * - * Note that a previous `Glob` object can be passed as the - * `GlobOptions` to another `Glob` instantiation to re-use settings - * and caches with a new pattern. - * - * Traversal functions can be called multiple times to run the walk - * again. - */ - constructor(pattern: string | string[], opts: Opts); - /** - * Returns a Promise that resolves to the results array. - */ - walk(): Promise>; - /** - * synchronous {@link Glob.walk} - */ - walkSync(): Results; - /** - * Stream results asynchronously. - */ - stream(): Minipass, Result>; - /** - * Stream results synchronously. - */ - streamSync(): Minipass, Result>; - /** - * Default sync iteration function. Returns a Generator that - * iterates over the results. - */ - iterateSync(): Generator, void, void>; - [Symbol.iterator](): Generator, void, void>; - /** - * Default async iteration function. Returns an AsyncGenerator that - * iterates over the results. - */ - iterate(): AsyncGenerator, void, void>; - [Symbol.asyncIterator](): AsyncGenerator, void, void>; -} -//# sourceMappingURL=glob.d.ts.map \ No newline at end of file diff --git a/node_modules/mocha/node_modules/glob/dist/esm/glob.d.ts.map b/node_modules/mocha/node_modules/glob/dist/esm/glob.d.ts.map deleted file mode 100644 index c32dc74c..00000000 --- a/node_modules/mocha/node_modules/glob/dist/esm/glob.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"glob.d.ts","sourceRoot":"","sources":["../../src/glob.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAoB,MAAM,WAAW,CAAA;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAEnC,OAAO,EACL,QAAQ,EACR,IAAI,EACJ,UAAU,EAIX,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAGtC,MAAM,MAAM,QAAQ,GAAG,SAAS,CAAC,KAAK,CAAC,CAAA;AACvC,MAAM,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC,WAAW,CAAC,EAAE,SAAS,CAAC,CAAA;AAalE;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,WAAW;IAC1B;;;;;;;;;;;;OAYG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAE5B;;;;;OAKG;IACH,GAAG,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;IAElB;;;;OAIG;IACH,GAAG,CAAC,EAAE,OAAO,CAAA;IAEb;;;;;;;;OAQG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;IAErB;;;;;;;;OAQG;IACH,MAAM,CAAC,EAAE,OAAO,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AC;IAIjB;;;OAGG;IACH,OAAO,IAAI,cAAc,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC;IAGnD,CAAC,MAAM,CAAC,aAAa,CAAC;CAGvB"} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/glob/dist/esm/glob.js b/node_modules/mocha/node_modules/glob/dist/esm/glob.js deleted file mode 100644 index c9ff3b00..00000000 --- a/node_modules/mocha/node_modules/glob/dist/esm/glob.js +++ /dev/null @@ -1,243 +0,0 @@ -import { Minimatch } from 'minimatch'; -import { fileURLToPath } from 'node:url'; -import { PathScurry, PathScurryDarwin, PathScurryPosix, PathScurryWin32, } from 'path-scurry'; -import { Pattern } from './pattern.js'; -import { GlobStream, GlobWalker } from './walker.js'; -// if no process global, just call it linux. -// so we default to case-sensitive, / separators -const defaultPlatform = (typeof process === 'object' && - process && - typeof process.platform === 'string') ? - process.platform - : 'linux'; -/** - * An object that can perform glob pattern traversals. - */ -export class Glob { - absolute; - cwd; - root; - dot; - dotRelative; - follow; - ignore; - magicalBraces; - mark; - matchBase; - maxDepth; - nobrace; - nocase; - nodir; - noext; - noglobstar; - pattern; - platform; - realpath; - scurry; - stat; - signal; - windowsPathsNoEscape; - withFileTypes; - includeChildMatches; - /** - * The options provided to the constructor. - */ - opts; - /** - * An array of parsed immutable {@link Pattern} objects. - */ - patterns; - /** - * All options are stored as properties on the `Glob` object. - * - * See {@link GlobOptions} for full options descriptions. - * - * Note that a previous `Glob` object can be passed as the - * `GlobOptions` to another `Glob` instantiation to re-use settings - * and caches with a new pattern. - * - * Traversal functions can be called multiple times to run the walk - * again. - */ - constructor(pattern, opts) { - /* c8 ignore start */ - if (!opts) - throw new TypeError('glob options required'); - /* c8 ignore stop */ - this.withFileTypes = !!opts.withFileTypes; - this.signal = opts.signal; - this.follow = !!opts.follow; - this.dot = !!opts.dot; - this.dotRelative = !!opts.dotRelative; - this.nodir = !!opts.nodir; - this.mark = !!opts.mark; - if (!opts.cwd) { - this.cwd = ''; - } - else if (opts.cwd instanceof URL || opts.cwd.startsWith('file://')) { - opts.cwd = fileURLToPath(opts.cwd); - } - this.cwd = opts.cwd || ''; - this.root = opts.root; - this.magicalBraces = !!opts.magicalBraces; - this.nobrace = !!opts.nobrace; - this.noext = !!opts.noext; - this.realpath = !!opts.realpath; - this.absolute = opts.absolute; - this.includeChildMatches = opts.includeChildMatches !== false; - this.noglobstar = !!opts.noglobstar; - this.matchBase = !!opts.matchBase; - this.maxDepth = - typeof opts.maxDepth === 'number' ? opts.maxDepth : Infinity; - this.stat = !!opts.stat; - this.ignore = opts.ignore; - if (this.withFileTypes && this.absolute !== undefined) { - throw new Error('cannot set absolute and withFileTypes:true'); - } - if (typeof pattern === 'string') { - pattern = [pattern]; - } - this.windowsPathsNoEscape = - !!opts.windowsPathsNoEscape || - opts.allowWindowsEscape === - false; - if (this.windowsPathsNoEscape) { - pattern = pattern.map(p => p.replace(/\\/g, '/')); - } - if (this.matchBase) { - if (opts.noglobstar) { - throw new TypeError('base matching requires globstar'); - } - pattern = pattern.map(p => (p.includes('/') ? p : `./**/${p}`)); - } - this.pattern = pattern; - this.platform = opts.platform || defaultPlatform; - this.opts = { ...opts, platform: this.platform }; - if (opts.scurry) { - this.scurry = opts.scurry; - if (opts.nocase !== undefined && - opts.nocase !== opts.scurry.nocase) { - throw new Error('nocase option contradicts provided scurry option'); - } - } - else { - const Scurry = opts.platform === 'win32' ? PathScurryWin32 - : opts.platform === 'darwin' ? PathScurryDarwin - : opts.platform ? PathScurryPosix - : PathScurry; - this.scurry = new Scurry(this.cwd, { - nocase: opts.nocase, - fs: opts.fs, - }); - } - this.nocase = this.scurry.nocase; - // If you do nocase:true on a case-sensitive file system, then - // we need to use regexps instead of strings for non-magic - // path portions, because statting `aBc` won't return results - // for the file `AbC` for example. - const nocaseMagicOnly = this.platform === 'darwin' || this.platform === 'win32'; - const mmo = { - // default nocase based on platform - ...opts, - dot: this.dot, - matchBase: this.matchBase, - nobrace: this.nobrace, - nocase: this.nocase, - nocaseMagicOnly, - nocomment: true, - noext: this.noext, - nonegate: true, - optimizationLevel: 2, - platform: this.platform, - windowsPathsNoEscape: this.windowsPathsNoEscape, - debug: !!this.opts.debug, - }; - const mms = this.pattern.map(p => new Minimatch(p, mmo)); - const [matchSet, globParts] = mms.reduce((set, m) => { - set[0].push(...m.set); - set[1].push(...m.globParts); - return set; - }, [[], []]); - this.patterns = matchSet.map((set, i) => { - const g = globParts[i]; - /* c8 ignore start */ - if (!g) - throw new Error('invalid pattern object'); - /* c8 ignore stop */ - return new Pattern(set, g, 0, this.platform); - }); - } - async walk() { - // Walkers always return array of Path objects, so we just have to - // coerce them into the right shape. It will have already called - // realpath() if the option was set to do so, so we know that's cached. - // start out knowing the cwd, at least - return [ - ...(await new GlobWalker(this.patterns, this.scurry.cwd, { - ...this.opts, - maxDepth: this.maxDepth !== Infinity ? - this.maxDepth + this.scurry.cwd.depth() - : Infinity, - platform: this.platform, - nocase: this.nocase, - includeChildMatches: this.includeChildMatches, - }).walk()), - ]; - } - walkSync() { - return [ - ...new GlobWalker(this.patterns, this.scurry.cwd, { - ...this.opts, - maxDepth: this.maxDepth !== Infinity ? - this.maxDepth + this.scurry.cwd.depth() - : Infinity, - platform: this.platform, - nocase: this.nocase, - includeChildMatches: this.includeChildMatches, - }).walkSync(), - ]; - } - stream() { - return new GlobStream(this.patterns, this.scurry.cwd, { - ...this.opts, - maxDepth: this.maxDepth !== Infinity ? - this.maxDepth + this.scurry.cwd.depth() - : Infinity, - platform: this.platform, - nocase: this.nocase, - includeChildMatches: this.includeChildMatches, - }).stream(); - } - streamSync() { - return new GlobStream(this.patterns, this.scurry.cwd, { - ...this.opts, - maxDepth: this.maxDepth !== Infinity ? - this.maxDepth + this.scurry.cwd.depth() - : Infinity, - platform: this.platform, - nocase: this.nocase, - includeChildMatches: this.includeChildMatches, - }).streamSync(); - } - /** - * Default sync iteration function. Returns a Generator that - * iterates over the results. - */ - iterateSync() { - return this.streamSync()[Symbol.iterator](); - } - [Symbol.iterator]() { - return this.iterateSync(); - } - /** - * Default async iteration function. Returns an AsyncGenerator that - * iterates over the results. - */ - iterate() { - return this.stream()[Symbol.asyncIterator](); - } - [Symbol.asyncIterator]() { - return this.iterate(); - } -} -//# sourceMappingURL=glob.js.map \ No newline at end of file diff --git a/node_modules/mocha/node_modules/glob/dist/esm/glob.js.map b/node_modules/mocha/node_modules/glob/dist/esm/glob.js.map deleted file mode 100644 index a62c3239..00000000 --- a/node_modules/mocha/node_modules/glob/dist/esm/glob.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"glob.js","sourceRoot":"","sources":["../../src/glob.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAoB,MAAM,WAAW,CAAA;AAEvD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AACxC,OAAO,EAGL,UAAU,EACV,gBAAgB,EAChB,eAAe,EACf,eAAe,GAChB,MAAM,aAAa,CAAA;AAEpB,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACtC,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAKpD,4CAA4C;AAC5C,gDAAgD;AAChD,MAAM,eAAe,GACnB,CACE,OAAO,OAAO,KAAK,QAAQ;IAC3B,OAAO;IACP,OAAO,OAAO,CAAC,QAAQ,KAAK,QAAQ,CACrC,CAAC,CAAC;IACD,OAAO,CAAC,QAAQ;IAClB,CAAC,CAAC,OAAO,CAAA;AAyVX;;GAEG;AACH,MAAM,OAAO,IAAI;IACf,QAAQ,CAAU;IAClB,GAAG,CAAQ;IACX,IAAI,CAAS;IACb,GAAG,CAAS;IACZ,WAAW,CAAS;IACpB,MAAM,CAAS;IACf,MAAM,CAAiC;IACvC,aAAa,CAAS;IACtB,IAAI,CAAU;IACd,SAAS,CAAS;IAClB,QAAQ,CAAQ;IAChB,OAAO,CAAS;IAChB,MAAM,CAAS;IACf,KAAK,CAAS;IACd,KAAK,CA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M;YACnB,mBAAmB,EAAE,IAAI,CAAC,mBAAmB;SAC9C,CAAC,CAAC,UAAU,EAAE,CAAA;IACjB,CAAC;IAED;;;OAGG;IACH,WAAW;QACT,OAAO,IAAI,CAAC,UAAU,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAA;IAC7C,CAAC;IACD,CAAC,MAAM,CAAC,QAAQ,CAAC;QACf,OAAO,IAAI,CAAC,WAAW,EAAE,CAAA;IAC3B,CAAC;IAED;;;OAGG;IACH,OAAO;QACL,OAAO,IAAI,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,CAAA;IAC9C,CAAC;IACD,CAAC,MAAM,CAAC,aAAa,CAAC;QACpB,OAAO,IAAI,CAAC,OAAO,EAAE,CAAA;IACvB,CAAC;CACF","sourcesContent":["import { Minimatch, MinimatchOptions } from 'minimatch'\nimport { Minipass } from 'minipass'\nimport { fileURLToPath } from 'node:url'\nimport {\n FSOption,\n Path,\n PathScurry,\n PathScurryDarwin,\n PathScurryPosix,\n PathScurryWin32,\n} from 'path-scurry'\nimport { IgnoreLike } from './ignore.js'\nimport { Pattern } from './pattern.js'\nimport { GlobStream, GlobWalker } from './walker.js'\n\nexport type MatchSet = Minimatch['set']\nexport type GlobParts = Exclude\n\n// if no process global, just call it linux.\n// so we default to case-sensitive, / separators\nconst defaultPlatform: NodeJS.Platform =\n (\n typeof process === 'object' &&\n process &&\n typeof process.platform === 'string'\n ) ?\n process.platform\n : 'linux'\n\n/**\n * A `GlobOptions` object may be provided to any of the exported methods, and\n * must be provided to the `Glob` constructor.\n *\n * All options are optional, boolean, and false by default, unless otherwise\n * noted.\n *\n * All resolved options are added to the Glob object as properties.\n *\n * If you are running many `glob` operations, you can pass a Glob object as the\n * `options` argument to a subsequent operation to share the previously loaded\n * cache.\n */\nexport interface GlobOptions {\n /**\n * Set to `true` to always receive absolute paths for\n * matched files. Set to `false` to always return relative paths.\n *\n * When this option is not set, absolute paths are returned for patterns\n * that are absolute, and otherwise paths are returned that are relative\n * to the `cwd` setting.\n *\n * This does _not_ make an extra system call to get\n * the realpath, it only does string path resolution.\n *\n * Conflicts with {@link withFileTypes}\n */\n absolute?: boolean\n\n /**\n * Set to false to enable {@link windowsPathsNoEscape}\n *\n * @deprecated\n */\n allowWindowsEscape?: boolean\n\n /**\n * The current working directory in which to search. Defaults to\n * `process.cwd()`.\n *\n * May be eiher a string path or a `file://` URL object or string.\n */\n cwd?: string | URL\n\n /**\n * Include `.dot` files in normal matches and `globstar`\n * matches. Note that an explicit dot in a portion of the pattern\n * will always match dot files.\n */\n dot?: boolean\n\n /**\n * Prepend all relative path strings with `./` (or `.\\` on Windows).\n *\n * Without this option, returned relative paths are \"bare\", so instead of\n * returning `'./foo/bar'`, they are returned as `'foo/bar'`.\n *\n * Relative patterns starting with `'../'` are not prepended with `./`, even\n * if this option is set.\n */\n dotRelative?: boolean\n\n /**\n * Follow symlinked directories when expanding `**`\n * patterns. This can result in a lot of duplicate references in\n * the presence of cyclic links, and make performance quite bad.\n *\n * By default, a `**` in a pattern will follow 1 symbolic link if\n * it is not the first item in the pattern, or none if it is the\n * first item in the pattern, following the same behavior as Bash.\n */\n follow?: boolean\n\n /**\n * string or string[], or an object with `ignore` and `ignoreChildren`\n * methods.\n *\n * If a string or string[] is provided, then this is treated as a glob\n * pattern or array of glob patterns to exclude from matches. To ignore all\n * children within a directory, as well as the entry itself, append `'/**'`\n * to the ignore pattern.\n *\n * **Note** `ignore` patterns are _always_ in `dot:true` mode, regardless of\n * any other settings.\n *\n * If an object is provided that has `ignored(path)` and/or\n * `childrenIgnored(path)` methods, then these methods will be called to\n * determine whether any Path is a match or if its children should be\n * traversed, respectively.\n */\n ignore?: string | string[] | IgnoreLike\n\n /**\n * Treat brace expansion like `{a,b}` as a \"magic\" pattern. Has no\n * effect if {@link nobrace} is set.\n *\n * Only has effect on the {@link hasMagic} function.\n */\n magicalBraces?: boolean\n\n /**\n * Add a `/` character to directory matches. Note that this requires\n * additional stat calls in some cases.\n */\n mark?: boolean\n\n /**\n * Perform a basename-only match if the pattern does not contain any slash\n * characters. That is, `*.js` would be treated as equivalent to\n * `**\\/*.js`, matching all js files in all directories.\n */\n matchBase?: boolean\n\n /**\n * Limit the directory traversal to a given depth below the cwd.\n * Note that this does NOT prevent traversal to sibling folders,\n * root patterns, and so on. It only limits the maximum folder depth\n * that the walk will descend, relative to the cwd.\n */\n maxDepth?: number\n\n /**\n * Do not expand `{a,b}` and `{1..3}` brace sets.\n */\n nobrace?: boolean\n\n /**\n * Perform a case-insensitive match. This defaults to `true` on macOS and\n * Windows systems, and `false` on all others.\n *\n * **Note** `nocase` should only be explicitly set when it is\n * known that the filesystem's case sensitivity differs from the\n * platform default. If set `true` on case-sensitive file\n * systems, or `false` on case-insensitive file systems, then the\n * walk may return more or less results than expected.\n */\n nocase?: boolean\n\n /**\n * Do not match directories, only files. (Note: to match\n * _only_ directories, put a `/` at the end of the pattern.)\n */\n nodir?: boolean\n\n /**\n * Do not match \"extglob\" patterns such as `+(a|b)`.\n */\n noext?: boolean\n\n /**\n * Do not match `**` against multiple filenames. (Ie, treat it as a normal\n * `*` instead.)\n *\n * Conflicts with {@link matchBase}\n */\n noglobstar?: boolean\n\n /**\n * Defaults to value of `process.platform` if available, or `'linux'` if\n * not. Setting `platform:'win32'` on non-Windows systems may cause strange\n * behavior.\n */\n platform?: NodeJS.Platform\n\n /**\n * Set to true to call `fs.realpath` on all of the\n * results. In the case of an entry that cannot be resolved, the\n * entry is omitted. This incurs a slight performance penalty, of\n * course, because of the added system calls.\n */\n realpath?: boolean\n\n /**\n *\n * A string path resolved against the `cwd` option, which\n * is used as the starting point for absolute patterns that start\n * with `/`, (but not drive letters or UNC paths on Windows).\n *\n * Note that this _doesn't_ necessarily limit the walk to the\n * `root` directory, and doesn't affect the cwd starting point for\n * non-absolute patterns. A pattern containing `..` will still be\n * able to traverse out of the root directory, if it is not an\n * actual root directory on the filesystem, and any non-absolute\n * patterns will be matched in the `cwd`. For example, the\n * pattern `/../*` with `{root:'/some/path'}` will return all\n * files in `/some`, not all files in `/some/path`. The pattern\n * `*` with `{root:'/some/path'}` will return all the entries in\n * the cwd, not the entries in `/some/path`.\n *\n * To start absolute and non-absolute patterns in the same\n * path, you can use `{root:''}`. However, be aware that on\n * Windows systems, a pattern like `x:/*` or `//host/share/*` will\n * _always_ start in the `x:/` or `//host/share` directory,\n * regardless of the `root` setting.\n */\n root?: string\n\n /**\n * A [PathScurry](http://npm.im/path-scurry) object used\n * to traverse the file system. If the `nocase` option is set\n * explicitly, then any provided `scurry` object must match this\n * setting.\n */\n scurry?: PathScurry\n\n /**\n * Call `lstat()` on all entries, whether required or not to determine\n * if it's a valid match. When used with {@link withFileTypes}, this means\n * that matches will include data such as modified time, permissions, and\n * so on. Note that this will incur a performance cost due to the added\n * system calls.\n */\n stat?: boolean\n\n /**\n * An AbortSignal which will cancel the Glob walk when\n * triggered.\n */\n signal?: AbortSignal\n\n /**\n * Use `\\\\` as a path separator _only_, and\n * _never_ as an escape character. If set, all `\\\\` characters are\n * replaced with `/` in the pattern.\n *\n * Note that this makes it **impossible** to match against paths\n * containing literal glob pattern characters, but allows matching\n * with patterns constructed using `path.join()` and\n * `path.resolve()` on Windows platforms, mimicking the (buggy!)\n * behavior of Glob v7 and before on Windows. Please use with\n * caution, and be mindful of [the caveat below about Windows\n * paths](#windows). (For legacy reasons, this is also set if\n * `allowWindowsEscape` is set to the exact value `false`.)\n */\n windowsPathsNoEscape?: boolean\n\n /**\n * Return [PathScurry](http://npm.im/path-scurry)\n * `Path` objects instead of strings. These are similar to a\n * NodeJS `Dirent` object, but with additional methods and\n * properties.\n *\n * Conflicts with {@link absolute}\n */\n withFileTypes?: boolean\n\n /**\n * An fs implementation to override some or all of the defaults. See\n * http://npm.im/path-scurry for details about what can be overridden.\n */\n fs?: FSOption\n\n /**\n * Just passed along to Minimatch. Note that this makes all pattern\n * matching operations slower and *extremely* noisy.\n */\n debug?: boolean\n\n /**\n * Return `/` delimited paths, even on Windows.\n *\n * On posix systems, this has no effect. But, on Windows, it means that\n * paths will be `/` delimited, and absolute paths will be their full\n * resolved UNC forms, eg instead of `'C:\\\\foo\\\\bar'`, it would return\n * `'//?/C:/foo/bar'`\n */\n posix?: boolean\n\n /**\n * Do not match any children of any matches. For example, the pattern\n * `**\\/foo` would match `a/foo`, but not `a/foo/b/foo` in this mode.\n *\n * This is especially useful for cases like \"find all `node_modules`\n * folders, but not the ones in `node_modules`\".\n *\n * In order to support this, the `Ignore` implementation must support an\n * `add(pattern: string)` method. If using the default `Ignore` class, then\n * this is fine, but if this is set to `false`, and a custom `Ignore` is\n * provided that does not have an `add()` method, then it will throw an\n * error.\n *\n * **Caveat** It *only* ignores matches that would be a descendant of a\n * previous match, and only if that descendant is matched *after* the\n * ancestor is encountered. Since the file system walk happens in\n * indeterminate order, it's possible that a match will already be added\n * before its ancestor, if multiple or braced patterns are used.\n *\n * For example:\n *\n * ```ts\n * const results = await glob([\n * // likely to match first, since it's just a stat\n * 'a/b/c/d/e/f',\n *\n * // this pattern is more complicated! It must to various readdir()\n * // calls and test the results against a regular expression, and that\n * // is certainly going to take a little bit longer.\n * //\n * // So, later on, it encounters a match at 'a/b/c/d/e', but it's too\n * // late to ignore a/b/c/d/e/f, because it's already been emitted.\n * 'a/[bdf]/?/[a-z]/*',\n * ], { includeChildMatches: false })\n * ```\n *\n * It's best to only set this to `false` if you can be reasonably sure that\n * no components of the pattern will potentially match one another's file\n * system descendants, or if the occasional included child entry will not\n * cause problems.\n *\n * @default true\n */\n includeChildMatches?: boolean\n}\n\nexport type GlobOptionsWithFileTypesTrue = GlobOptions & {\n withFileTypes: true\n // string options not relevant if returning Path objects.\n absolute?: undefined\n mark?: undefined\n posix?: undefined\n}\n\nexport type GlobOptionsWithFileTypesFalse = GlobOptions & {\n withFileTypes?: false\n}\n\nexport type GlobOptionsWithFileTypesUnset = GlobOptions & {\n withFileTypes?: undefined\n}\n\nexport type Result =\n Opts extends GlobOptionsWithFileTypesTrue ? Path\n : Opts extends GlobOptionsWithFileTypesFalse ? string\n : Opts extends GlobOptionsWithFileTypesUnset ? string\n : string | Path\nexport type Results = Result[]\n\nexport type FileTypes =\n Opts extends GlobOptionsWithFileTypesTrue ? true\n : Opts extends GlobOptionsWithFileTypesFalse ? false\n : Opts extends GlobOptionsWithFileTypesUnset ? false\n : boolean\n\n/**\n * An object that can perform glob pattern traversals.\n */\nexport class Glob implements GlobOptions {\n absolute?: boolean\n cwd: string\n root?: string\n dot: boolean\n dotRelative: boolean\n follow: boolean\n ignore?: string | string[] | IgnoreLike\n magicalBraces: boolean\n mark?: boolean\n matchBase: boolean\n maxDepth: number\n nobrace: boolean\n nocase: boolean\n nodir: boolean\n noext: boolean\n noglobstar: boolean\n pattern: string[]\n platform: NodeJS.Platform\n realpath: boolean\n scurry: PathScurry\n stat: boolean\n signal?: AbortSignal\n windowsPathsNoEscape: boolean\n withFileTypes: FileTypes\n includeChildMatches: boolean\n\n /**\n * The options provided to the constructor.\n */\n opts: Opts\n\n /**\n * An array of parsed immutable {@link Pattern} objects.\n */\n patterns: Pattern[]\n\n /**\n * All options are stored as properties on the `Glob` object.\n *\n * See {@link GlobOptions} for full options descriptions.\n *\n * Note that a previous `Glob` object can be passed as the\n * `GlobOptions` to another `Glob` instantiation to re-use settings\n * and caches with a new pattern.\n *\n * Traversal functions can be called multiple times to run the walk\n * again.\n */\n constructor(pattern: string | string[], opts: Opts) {\n /* c8 ignore start */\n if (!opts) throw new TypeError('glob options required')\n /* c8 ignore stop */\n this.withFileTypes = !!opts.withFileTypes as FileTypes\n this.signal = opts.signal\n this.follow = !!opts.follow\n this.dot = !!opts.dot\n this.dotRelative = !!opts.dotRelative\n this.nodir = !!opts.nodir\n this.mark = !!opts.mark\n if (!opts.cwd) {\n this.cwd = ''\n } else if (opts.cwd instanceof URL || opts.cwd.startsWith('file://')) {\n opts.cwd = fileURLToPath(opts.cwd)\n }\n this.cwd = opts.cwd || ''\n this.root = opts.root\n this.magicalBraces = !!opts.magicalBraces\n this.nobrace = !!opts.nobrace\n this.noext = !!opts.noext\n this.realpath = !!opts.realpath\n this.absolute = opts.absolute\n this.includeChildMatches = opts.includeChildMatches !== false\n\n this.noglobstar = !!opts.noglobstar\n this.matchBase = !!opts.matchBase\n this.maxDepth =\n typeof opts.maxDepth === 'number' ? opts.maxDepth : Infinity\n this.stat = !!opts.stat\n this.ignore = opts.ignore\n\n if (this.withFileTypes && this.absolute !== undefined) {\n throw new Error('cannot set absolute and withFileTypes:true')\n }\n\n if (typeof pattern === 'string') {\n pattern = [pattern]\n }\n\n this.windowsPathsNoEscape =\n !!opts.windowsPathsNoEscape ||\n (opts as { allowWindowsEscape?: boolean }).allowWindowsEscape ===\n false\n\n if (this.windowsPathsNoEscape) {\n pattern = pattern.map(p => p.replace(/\\\\/g, '/'))\n }\n\n if (this.matchBase) {\n if (opts.noglobstar) {\n throw new TypeError('base matching requires globstar')\n }\n pattern = pattern.map(p => (p.includes('/') ? p : `./**/${p}`))\n }\n\n this.pattern = pattern\n\n this.platform = opts.platform || defaultPlatform\n this.opts = { ...opts, platform: this.platform }\n if (opts.scurry) {\n this.scurry = opts.scurry\n if (\n opts.nocase !== undefined &&\n opts.nocase !== opts.scurry.nocase\n ) {\n throw new Error('nocase option contradicts provided scurry option')\n }\n } else {\n const Scurry =\n opts.platform === 'win32' ? PathScurryWin32\n : opts.platform === 'darwin' ? PathScurryDarwin\n : opts.platform ? PathScurryPosix\n : PathScurry\n this.scurry = new Scurry(this.cwd, {\n nocase: opts.nocase,\n fs: opts.fs,\n })\n }\n this.nocase = this.scurry.nocase\n\n // If you do nocase:true on a case-sensitive file system, then\n // we need to use regexps instead of strings for non-magic\n // path portions, because statting `aBc` won't return results\n // for the file `AbC` for example.\n const nocaseMagicOnly =\n this.platform === 'darwin' || this.platform === 'win32'\n\n const mmo: MinimatchOptions = {\n // default nocase based on platform\n ...opts,\n dot: this.dot,\n matchBase: this.matchBase,\n nobrace: this.nobrace,\n nocase: this.nocase,\n nocaseMagicOnly,\n nocomment: true,\n noext: this.noext,\n nonegate: true,\n optimizationLevel: 2,\n platform: this.platform,\n windowsPathsNoEscape: this.windowsPathsNoEscape,\n debug: !!this.opts.debug,\n }\n\n const mms = this.pattern.map(p => new Minimatch(p, mmo))\n const [matchSet, globParts] = mms.reduce(\n (set: [MatchSet, GlobParts], m) => {\n set[0].push(...m.set)\n set[1].push(...m.globParts)\n return set\n },\n [[], []],\n )\n this.patterns = matchSet.map((set, i) => {\n const g = globParts[i]\n /* c8 ignore start */\n if (!g) throw new Error('invalid pattern object')\n /* c8 ignore stop */\n return new Pattern(set, g, 0, this.platform)\n })\n }\n\n /**\n * Returns a Promise that resolves to the results array.\n */\n async walk(): Promise>\n async walk(): Promise<(string | Path)[]> {\n // Walkers always return array of Path objects, so we just have to\n // coerce them into the right shape. It will have already called\n // realpath() if the option was set to do so, so we know that's cached.\n // start out knowing the cwd, at least\n return [\n ...(await new GlobWalker(this.patterns, this.scurry.cwd, {\n ...this.opts,\n maxDepth:\n this.maxDepth !== Infinity ?\n this.maxDepth + this.scurry.cwd.depth()\n : Infinity,\n platform: this.platform,\n nocase: this.nocase,\n includeChildMatches: this.includeChildMatches,\n }).walk()),\n ]\n }\n\n /**\n * synchronous {@link Glob.walk}\n */\n walkSync(): Results\n walkSync(): (string | Path)[] {\n return [\n ...new GlobWalker(this.patterns, this.scurry.cwd, {\n ...this.opts,\n maxDepth:\n this.maxDepth !== Infinity ?\n this.maxDepth + this.scurry.cwd.depth()\n : Infinity,\n platform: this.platform,\n nocase: this.nocase,\n includeChildMatches: this.includeChildMatches,\n }).walkSync(),\n ]\n }\n\n /**\n * Stream results asynchronously.\n */\n stream(): Minipass, Result>\n stream(): Minipass {\n return new GlobStream(this.patterns, this.scurry.cwd, {\n ...this.opts,\n maxDepth:\n this.maxDepth !== Infinity ?\n this.maxDepth + this.scurry.cwd.depth()\n : Infinity,\n platform: this.platform,\n nocase: this.nocase,\n includeChildMatches: this.includeChildMatches,\n }).stream()\n }\n\n /**\n * Stream results synchronously.\n */\n streamSync(): Minipass, Result>\n streamSync(): Minipass {\n return new GlobStream(this.patterns, this.scurry.cwd, {\n ...this.opts,\n maxDepth:\n this.maxDepth !== Infinity ?\n this.maxDepth + this.scurry.cwd.depth()\n : Infinity,\n platform: this.platform,\n nocase: this.nocase,\n includeChildMatches: this.includeChildMatches,\n }).streamSync()\n }\n\n /**\n * Default sync iteration function. Returns a Generator that\n * iterates over the results.\n */\n iterateSync(): Generator, void, void> {\n return this.streamSync()[Symbol.iterator]()\n }\n [Symbol.iterator]() {\n return this.iterateSync()\n }\n\n /**\n * Default async iteration function. Returns an AsyncGenerator that\n * iterates over the results.\n */\n iterate(): AsyncGenerator, void, void> {\n return this.stream()[Symbol.asyncIterator]()\n }\n [Symbol.asyncIterator]() {\n return this.iterate()\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/glob/dist/esm/has-magic.d.ts b/node_modules/mocha/node_modules/glob/dist/esm/has-magic.d.ts deleted file mode 100644 index 8aec3bd9..00000000 --- a/node_modules/mocha/node_modules/glob/dist/esm/has-magic.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { GlobOptions } from './glob.js'; -/** - * Return true if the patterns provided contain any magic glob characters, - * given the options provided. - * - * Brace expansion is not considered "magic" unless the `magicalBraces` option - * is set, as brace expansion just turns one string into an array of strings. - * So a pattern like `'x{a,b}y'` would return `false`, because `'xay'` and - * `'xby'` both do not contain any magic glob characters, and it's treated the - * same as if you had called it on `['xay', 'xby']`. When `magicalBraces:true` - * is in the options, brace expansion _is_ treated as a pattern having magic. - */ -export declare const hasMagic: (pattern: string | string[], options?: GlobOptions) => boolean; -//# sourceMappingURL=has-magic.d.ts.map \ No newline at end of file diff --git a/node_modules/mocha/node_modules/glob/dist/esm/has-magic.d.ts.map b/node_modules/mocha/node_modules/glob/dist/esm/has-magic.d.ts.map deleted file mode 100644 index b24dd4ec..00000000 --- a/node_modules/mocha/node_modules/glob/dist/esm/has-magic.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"has-magic.d.ts","sourceRoot":"","sources":["../../src/has-magic.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAEvC;;;;;;;;;;GAUG;AACH,eAAO,MAAM,QAAQ,YACV,MAAM,GAAG,MAAM,EAAE,YACjB,WAAW,KACnB,OAQF,CAAA"} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/glob/dist/esm/has-magic.js b/node_modules/mocha/node_modules/glob/dist/esm/has-magic.js deleted file mode 100644 index ba2321ab..00000000 --- a/node_modules/mocha/node_modules/glob/dist/esm/has-magic.js +++ /dev/null @@ -1,23 +0,0 @@ -import { Minimatch } from 'minimatch'; -/** - * Return true if the patterns provided contain any magic glob characters, - * given the options provided. - * - * Brace expansion is not considered "magic" unless the `magicalBraces` option - * is set, as brace expansion just turns one string into an array of strings. - * So a pattern like `'x{a,b}y'` would return `false`, because `'xay'` and - * `'xby'` both do not contain any magic glob characters, and it's treated the - * same as if you had called it on `['xay', 'xby']`. When `magicalBraces:true` - * is in the options, brace expansion _is_ treated as a pattern having magic. - */ -export const hasMagic = (pattern, options = {}) => { - if (!Array.isArray(pattern)) { - pattern = [pattern]; - } - for (const p of pattern) { - if (new Minimatch(p, options).hasMagic()) - return true; - } - return false; -}; -//# sourceMappingURL=has-magic.js.map \ No newline at end of file diff --git a/node_modules/mocha/node_modules/glob/dist/esm/has-magic.js.map b/node_modules/mocha/node_modules/glob/dist/esm/has-magic.js.map deleted file mode 100644 index a20f5aa2..00000000 --- a/node_modules/mocha/node_modules/glob/dist/esm/has-magic.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"has-magic.js","sourceRoot":"","sources":["../../src/has-magic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AAGrC;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,CACtB,OAA0B,EAC1B,UAAuB,EAAE,EAChB,EAAE;IACX,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;QAC5B,OAAO,GAAG,CAAC,OAAO,CAAC,CAAA;IACrB,CAAC;IACD,KAAK,MAAM,CAAC,IAAI,OAAO,EAAE,CAAC;QACxB,IAAI,IAAI,SAAS,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,QAAQ,EAAE;YAAE,OAAO,IAAI,CAAA;IACvD,CAAC;IACD,OAAO,KAAK,CAAA;AACd,CAAC,CAAA","sourcesContent":["import { Minimatch } from 'minimatch'\nimport { GlobOptions } from './glob.js'\n\n/**\n * Return true if the patterns provided contain any magic glob characters,\n * given the options provided.\n *\n * Brace expansion is not considered \"magic\" unless the `magicalBraces` option\n * is set, as brace expansion just turns one string into an array of strings.\n * So a pattern like `'x{a,b}y'` would return `false`, because `'xay'` and\n * `'xby'` both do not contain any magic glob characters, and it's treated the\n * same as if you had called it on `['xay', 'xby']`. When `magicalBraces:true`\n * is in the options, brace expansion _is_ treated as a pattern having magic.\n */\nexport const hasMagic = (\n pattern: string | string[],\n options: GlobOptions = {},\n): boolean => {\n if (!Array.isArray(pattern)) {\n pattern = [pattern]\n }\n for (const p of pattern) {\n if (new Minimatch(p, options).hasMagic()) return true\n }\n return false\n}\n"]} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/glob/dist/esm/ignore.d.ts b/node_modules/mocha/node_modules/glob/dist/esm/ignore.d.ts deleted file mode 100644 index 1893b16d..00000000 --- a/node_modules/mocha/node_modules/glob/dist/esm/ignore.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { Minimatch, MinimatchOptions } from 'minimatch'; -import { Path } from 'path-scurry'; -import { GlobWalkerOpts } from './walker.js'; -export interface IgnoreLike { - ignored?: (p: Path) => boolean; - childrenIgnored?: (p: Path) => boolean; - add?: (ignore: string) => void; -} -/** - * Class used to process ignored patterns - */ -export declare class Ignore implements IgnoreLike { - relative: Minimatch[]; - relativeChildren: Minimatch[]; - absolute: Minimatch[]; - absoluteChildren: Minimatch[]; - platform: NodeJS.Platform; - mmopts: MinimatchOptions; - constructor(ignored: string[], { nobrace, nocase, noext, noglobstar, platform, }: GlobWalkerOpts); - add(ign: string): void; - ignored(p: Path): boolean; - childrenIgnored(p: Path): boolean; -} -//# sourceMappingURL=ignore.d.ts.map \ No newline at end of file diff --git a/node_modules/mocha/node_modules/glob/dist/esm/ignore.d.ts.map b/node_modules/mocha/node_modules/glob/dist/esm/ignore.d.ts.map deleted file mode 100644 index 57d6ab61..00000000 --- a/node_modules/mocha/node_modules/glob/dist/esm/ignore.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ignore.d.ts","sourceRoot":"","sources":["../../src/ignore.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAA;AACvD,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAElC,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAE5C,MAAM,WAAW,UAAU;IACzB,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,KAAK,OAAO,CAAA;IAC9B,eAAe,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,KAAK,OAAO,CAAA;IACtC,GAAG,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAA;CAC/B;AAWD;;GAEG;AACH,qBAAa,MAAO,YAAW,UAAU;IACvC,QAAQ,EAAE,SAAS,EAAE,CAAA;IACrB,gBAAgB,EAAE,SAAS,EAAE,CAAA;IAC7B,QAAQ,EAAE,SAAS,EAAE,CAAA;IACrB,gBAAgB,EAAE,SAAS,EAAE,CAAA;IAC7B,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAA;IACzB,MAAM,EAAE,gBAAgB,CAAA;gBAGtB,OAAO,EAAE,MAAM,EAAE,EACjB,EACE,OAAO,EACP,MAAM,EACN,KAAK,EACL,UAAU,EACV,QAA0B,GAC3B,EAAE,cAAc;IAqBnB,GAAG,CAAC,GAAG,EAAE,MAAM;IAyCf,OAAO,CAAC,CAAC,EAAE,IAAI,GAAG,OAAO;IAczB,eAAe,CAAC,CAAC,EAAE,IAAI,GAAG,OAAO;CAWlC"} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/glob/dist/esm/ignore.js b/node_modules/mocha/node_modules/glob/dist/esm/ignore.js deleted file mode 100644 index 539c4a4f..00000000 --- a/node_modules/mocha/node_modules/glob/dist/esm/ignore.js +++ /dev/null @@ -1,115 +0,0 @@ -// give it a pattern, and it'll be able to tell you if -// a given path should be ignored. -// Ignoring a path ignores its children if the pattern ends in /** -// Ignores are always parsed in dot:true mode -import { Minimatch } from 'minimatch'; -import { Pattern } from './pattern.js'; -const defaultPlatform = (typeof process === 'object' && - process && - typeof process.platform === 'string') ? - process.platform - : 'linux'; -/** - * Class used to process ignored patterns - */ -export class Ignore { - relative; - relativeChildren; - absolute; - absoluteChildren; - platform; - mmopts; - constructor(ignored, { nobrace, nocase, noext, noglobstar, platform = defaultPlatform, }) { - this.relative = []; - this.absolute = []; - this.relativeChildren = []; - this.absoluteChildren = []; - this.platform = platform; - this.mmopts = { - dot: true, - nobrace, - nocase, - noext, - noglobstar, - optimizationLevel: 2, - platform, - nocomment: true, - nonegate: true, - }; - for (const ign of ignored) - this.add(ign); - } - add(ign) { - // this is a little weird, but it gives us a clean set of optimized - // minimatch matchers, without getting tripped up if one of them - // ends in /** inside a brace section, and it's only inefficient at - // the start of the walk, not along it. - // It'd be nice if the Pattern class just had a .test() method, but - // handling globstars is a bit of a pita, and that code already lives - // in minimatch anyway. - // Another way would be if maybe Minimatch could take its set/globParts - // as an option, and then we could at least just use Pattern to test - // for absolute-ness. - // Yet another way, Minimatch could take an array of glob strings, and - // a cwd option, and do the right thing. - const mm = new Minimatch(ign, this.mmopts); - for (let i = 0; i < mm.set.length; i++) { - const parsed = mm.set[i]; - const globParts = mm.globParts[i]; - /* c8 ignore start */ - if (!parsed || !globParts) { - throw new Error('invalid pattern object'); - } - // strip off leading ./ portions - // https://github.com/isaacs/node-glob/issues/570 - while (parsed[0] === '.' && globParts[0] === '.') { - parsed.shift(); - globParts.shift(); - } - /* c8 ignore stop */ - const p = new Pattern(parsed, globParts, 0, this.platform); - const m = new Minimatch(p.globString(), this.mmopts); - const children = globParts[globParts.length - 1] === '**'; - const absolute = p.isAbsolute(); - if (absolute) - this.absolute.push(m); - else - this.relative.push(m); - if (children) { - if (absolute) - this.absoluteChildren.push(m); - else - this.relativeChildren.push(m); - } - } - } - ignored(p) { - const fullpath = p.fullpath(); - const fullpaths = `${fullpath}/`; - const relative = p.relative() || '.'; - const relatives = `${relative}/`; - for (const m of this.relative) { - if (m.match(relative) || m.match(relatives)) - return true; - } - for (const m of this.absolute) { - if (m.match(fullpath) || m.match(fullpaths)) - return true; - } - return false; - } - childrenIgnored(p) { - const fullpath = p.fullpath() + '/'; - const relative = (p.relative() || '.') + '/'; - for (const m of this.relativeChildren) { - if (m.match(relative)) - return true; - } - for (const m of this.absoluteChildren) { - if (m.match(fullpath)) - return true; - } - return false; - } -} -//# sourceMappingURL=ignore.js.map \ No newline at end of file diff --git a/node_modules/mocha/node_modules/glob/dist/esm/ignore.js.map b/node_modules/mocha/node_modules/glob/dist/esm/ignore.js.map deleted file mode 100644 index 2cddba2e..00000000 --- a/node_modules/mocha/node_modules/glob/dist/esm/ignore.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ignore.js","sourceRoot":"","sources":["../../src/ignore.ts"],"names":[],"mappings":"AAAA,sDAAsD;AACtD,kCAAkC;AAClC,kEAAkE;AAClE,6CAA6C;AAE7C,OAAO,EAAE,SAAS,EAAoB,MAAM,WAAW,CAAA;AAEvD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAStC,MAAM,eAAe,GACnB,CACE,OAAO,OAAO,KAAK,QAAQ;IAC3B,OAAO;IACP,O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'll be able to tell you if\n// a given path should be ignored.\n// Ignoring a path ignores its children if the pattern ends in /**\n// Ignores are always parsed in dot:true mode\n\nimport { Minimatch, MinimatchOptions } from 'minimatch'\nimport { Path } from 'path-scurry'\nimport { Pattern } from './pattern.js'\nimport { GlobWalkerOpts } from './walker.js'\n\nexport interface IgnoreLike {\n ignored?: (p: Path) => boolean\n childrenIgnored?: (p: Path) => boolean\n add?: (ignore: string) => void\n}\n\nconst defaultPlatform: NodeJS.Platform =\n (\n typeof process === 'object' &&\n process &&\n typeof process.platform === 'string'\n ) ?\n process.platform\n : 'linux'\n\n/**\n * Class used to process ignored patterns\n */\nexport class Ignore implements IgnoreLike {\n relative: Minimatch[]\n relativeChildren: Minimatch[]\n absolute: Minimatch[]\n absoluteChildren: Minimatch[]\n platform: NodeJS.Platform\n mmopts: MinimatchOptions\n\n constructor(\n ignored: string[],\n {\n nobrace,\n nocase,\n noext,\n noglobstar,\n platform = defaultPlatform,\n }: GlobWalkerOpts,\n ) {\n this.relative = []\n this.absolute = []\n this.relativeChildren = []\n this.absoluteChildren = []\n this.platform = platform\n this.mmopts = {\n dot: true,\n nobrace,\n nocase,\n noext,\n noglobstar,\n optimizationLevel: 2,\n platform,\n nocomment: true,\n nonegate: true,\n }\n for (const ign of ignored) this.add(ign)\n }\n\n add(ign: string) {\n // this is a little weird, but it gives us a clean set of optimized\n // minimatch matchers, without getting tripped up if one of them\n // ends in /** inside a brace section, and it's only inefficient at\n // the start of the walk, not along it.\n // It'd be nice if the Pattern class just had a .test() method, but\n // handling globstars is a bit of a pita, and that code already lives\n // in minimatch anyway.\n // Another way would be if maybe Minimatch could take its set/globParts\n // as an option, and then we could at least just use Pattern to test\n // for absolute-ness.\n // Yet another way, Minimatch could take an array of glob strings, and\n // a cwd option, and do the right thing.\n const mm = new Minimatch(ign, this.mmopts)\n for (let i = 0; i < mm.set.length; i++) {\n const parsed = mm.set[i]\n const globParts = mm.globParts[i]\n /* c8 ignore start */\n if (!parsed || !globParts) {\n throw new Error('invalid pattern object')\n }\n // strip off leading ./ portions\n // https://github.com/isaacs/node-glob/issues/570\n while (parsed[0] === '.' && globParts[0] === '.') {\n parsed.shift()\n globParts.shift()\n }\n /* c8 ignore stop */\n const p = new Pattern(parsed, globParts, 0, this.platform)\n const m = new Minimatch(p.globString(), this.mmopts)\n const children = globParts[globParts.length - 1] === '**'\n const absolute = p.isAbsolute()\n if (absolute) this.absolute.push(m)\n else this.relative.push(m)\n if (children) {\n if (absolute) this.absoluteChildren.push(m)\n else this.relativeChildren.push(m)\n }\n }\n }\n\n ignored(p: Path): boolean {\n const fullpath = p.fullpath()\n const fullpaths = `${fullpath}/`\n const relative = p.relative() || '.'\n const relatives = `${relative}/`\n for (const m of this.relative) {\n if (m.match(relative) || m.match(relatives)) return true\n }\n for (const m of this.absolute) {\n if (m.match(fullpath) || m.match(fullpaths)) return true\n }\n return false\n }\n\n childrenIgnored(p: Path): boolean {\n const fullpath = p.fullpath() + '/'\n const relative = (p.relative() || '.') + '/'\n for (const m of this.relativeChildren) {\n if (m.match(relative)) return true\n }\n for (const m of this.absoluteChildren) {\n if (m.match(fullpath)) return true\n }\n return false\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/glob/dist/esm/index.d.ts b/node_modules/mocha/node_modules/glob/dist/esm/index.d.ts deleted file mode 100644 index 9c326ddc..00000000 --- a/node_modules/mocha/node_modules/glob/dist/esm/index.d.ts +++ /dev/null @@ -1,97 +0,0 @@ -import { Minipass } from 'minipass'; -import { Path } from 'path-scurry'; -import type { GlobOptions, GlobOptionsWithFileTypesFalse, GlobOptionsWithFileTypesTrue, GlobOptionsWithFileTypesUnset } from './glob.js'; -import { Glob } from './glob.js'; -export { escape, unescape } from 'minimatch'; -export type { FSOption, Path, WalkOptions, WalkOptionsWithFileTypesTrue, WalkOptionsWithFileTypesUnset, } from 'path-scurry'; -export { Glob } from './glob.js'; -export type { GlobOptions, GlobOptionsWithFileTypesFalse, GlobOptionsWithFileTypesTrue, GlobOptionsWithFileTypesUnset, } from './glob.js'; -export { hasMagic } from './has-magic.js'; -export { Ignore } from './ignore.js'; -export type { IgnoreLike } from './ignore.js'; -export type { MatchStream } from './walker.js'; -/** - * Syncronous form of {@link globStream}. Will read all the matches as fast as - * you consume them, even all in a single tick if you consume them immediately, - * but will still respond to backpressure if they're not consumed immediately. - */ -export declare function globStreamSync(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): Minipass; -export declare function globStreamSync(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): Minipass; -export declare function globStreamSync(pattern: string | string[], options: GlobOptionsWithFileTypesUnset): Minipass; -export declare function globStreamSync(pattern: string | string[], options: GlobOptions): Minipass | Minipass; -/** - * Return a stream that emits all the strings or `Path` objects and - * then emits `end` when completed. - */ -export declare function globStream(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): Minipass; -export declare function globStream(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): Minipass; -export declare function globStream(pattern: string | string[], options?: GlobOptionsWithFileTypesUnset | undefined): Minipass; -export declare function globStream(pattern: string | string[], options: GlobOptions): Minipass | Minipass; -/** - * Synchronous form of {@link glob} - */ -export declare function globSync(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): string[]; -export declare function globSync(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): Path[]; -export declare function globSync(pattern: string | string[], options?: GlobOptionsWithFileTypesUnset | undefined): string[]; -export declare function globSync(pattern: string | string[], options: GlobOptions): Path[] | string[]; -/** - * Perform an asynchronous glob search for the pattern(s) specified. Returns - * [Path](https://isaacs.github.io/path-scurry/classes/PathBase) objects if the - * {@link withFileTypes} option is set to `true`. See {@link GlobOptions} for - * full option descriptions. - */ -declare function glob_(pattern: string | string[], options?: GlobOptionsWithFileTypesUnset | undefined): Promise; -declare function glob_(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): Promise; -declare function glob_(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): Promise; -declare function glob_(pattern: string | string[], options: GlobOptions): Promise; -/** - * Return a sync iterator for walking glob pattern matches. - */ -export declare function globIterateSync(pattern: string | string[], options?: GlobOptionsWithFileTypesUnset | undefined): Generator; -export declare function globIterateSync(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): Generator; -export declare function globIterateSync(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): Generator; -export declare function globIterateSync(pattern: string | string[], options: GlobOptions): Generator | Generator; -/** - * Return an async iterator for walking glob pattern matches. - */ -export declare function globIterate(pattern: string | string[], options?: GlobOptionsWithFileTypesUnset | undefined): AsyncGenerator; -export declare function globIterate(pattern: string | string[], options: GlobOptionsWithFileTypesTrue): AsyncGenerator; -export declare function globIterate(pattern: string | string[], options: GlobOptionsWithFileTypesFalse): AsyncGenerator; -export declare function globIterate(pattern: string | string[], options: GlobOptions): AsyncGenerator | AsyncGenerator; -export declare const streamSync: typeof globStreamSync; -export declare const stream: typeof globStream & { - sync: typeof globStreamSync; -}; -export declare const iterateSync: typeof globIterateSync; -export declare const iterate: typeof globIterate & { - sync: typeof globIterateSync; -}; -export declare const sync: typeof globSync & { - stream: typeof globStreamSync; - iterate: typeof globIterateSync; -}; -export declare const glob: typeof glob_ & { - glob: typeof glob_; - globSync: typeof globSync; - sync: typeof globSync & { - stream: typeof globStreamSync; - iterate: typeof globIterateSync; - }; - globStream: typeof globStream; - stream: typeof globStream & { - sync: typeof globStreamSync; - }; - globStreamSync: typeof globStreamSync; - streamSync: typeof globStreamSync; - globIterate: typeof globIterate; - iterate: typeof globIterate & { - sync: typeof globIterateSync; - }; - globIterateSync: typeof globIterateSync; - iterateSync: typeof globIterateSync; - Glob: typeof Glob; - hasMagic: (pattern: string | string[], options?: GlobOptions) => boolean; - escape: (s: string, { windowsPathsNoEscape, }?: Pick) => string; - unescape: (s: string, { windowsPathsNoEscape, }?: Pick) => string; -}; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/mocha/node_modules/glob/dist/esm/index.d.ts.map b/node_modules/mocha/node_modules/glob/dist/esm/index.d.ts.map deleted file mode 100644 index 5fb32252..00000000 --- a/node_modules/mocha/node_modules/glob/dist/esm/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AACnC,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAClC,OAAO,KAAK,EACV,WAAW,EACX,6BAA6B,EAC7B,4BAA4B,EAC5B,6BAA6B,EAC9B,MAAM,WAAW,CAAA;AAClB,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAGhC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AAC5C,YAAY,EACV,QAAQ,EACR,IAAI,EACJ,WAAW,EACX,4BAA4B,EAC5B,6BAA6B,GAC9B,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,YAAY,EACV,WAAW,EACX,6BAA6B,EAC7B,4BAA4B,EAC5B,6BAA6B,GAC9B,MAAM,WAAW,CAAA;AAClB,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,YAAY,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAC7C,YAAY,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAE9C;;;;GAIG;AACH,wBAAgB,cAAc,CAC5B,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,OAAO,EAAE,4BAA4B,GACpC,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;AACvB,wBAAgB,cAAc,CAC5B,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAC1B,OAAO,EAAE,6BAA6B,GACrC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;AAC3B,wBAAgB,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dist/esm/index.js b/node_modules/mocha/node_modules/glob/dist/esm/index.js deleted file mode 100644 index e15c1f9c..00000000 --- a/node_modules/mocha/node_modules/glob/dist/esm/index.js +++ /dev/null @@ -1,55 +0,0 @@ -import { escape, unescape } from 'minimatch'; -import { Glob } from './glob.js'; -import { hasMagic } from './has-magic.js'; -export { escape, unescape } from 'minimatch'; -export { Glob } from './glob.js'; -export { hasMagic } from './has-magic.js'; -export { Ignore } from './ignore.js'; -export function globStreamSync(pattern, options = {}) { - return new Glob(pattern, options).streamSync(); -} -export function globStream(pattern, options = {}) { - return new Glob(pattern, options).stream(); -} -export function globSync(pattern, options = {}) { - return new Glob(pattern, options).walkSync(); -} -async function glob_(pattern, options = {}) { - return new Glob(pattern, options).walk(); -} -export function globIterateSync(pattern, options = {}) { - return new Glob(pattern, options).iterateSync(); -} -export function globIterate(pattern, options = {}) { - return new Glob(pattern, options).iterate(); -} -// aliases: glob.sync.stream() glob.stream.sync() glob.sync() etc -export const streamSync = globStreamSync; -export const stream = Object.assign(globStream, { sync: globStreamSync }); -export const iterateSync = globIterateSync; -export const iterate = Object.assign(globIterate, { - sync: globIterateSync, -}); -export const sync = Object.assign(globSync, { - stream: globStreamSync, - iterate: globIterateSync, -}); -export const glob = Object.assign(glob_, { - glob: glob_, - globSync, - sync, - globStream, - stream, - globStreamSync, - streamSync, - globIterate, - iterate, - globIterateSync, - iterateSync, - Glob, - hasMagic, - escape, - unescape, -}); -glob.glob = glob; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/mocha/node_modules/glob/dist/esm/index.js.map b/node_modules/mocha/node_modules/glob/dist/esm/index.js.map deleted file mode 100644 index a4f93dd0..00000000 --- a/node_modules/mocha/node_modules/glob/dist/esm/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AAS5C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iE;AACjE,MAAM,CAAC,MAAM,UAAU,GAAG,cAAc,CAAA;AACxC,MAAM,CAAC,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE,CAAC,CAAA;AACzE,MAAM,CAAC,MAAM,WAAW,GAAG,eAAe,CAAA;AAC1C,MAAM,CAAC,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,WAAW,EAAE;IAChD,IAAI,EAAE,eAAe;CACtB,CAAC,CAAA;AACF,MAAM,CAAC,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE;IAC1C,MAAM,EAAE,cAAc;IACtB,OAAO,EAAE,eAAe;CACzB,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE;IACvC,IAAI,EAAE,KAAK;IACX,QAAQ;IACR,IAAI;IACJ,UAAU;IACV,MAAM;IACN,cAAc;IACd,UAAU;IACV,WAAW;IACX,OAAO;IACP,eAAe;IACf,WAAW;IACX,IAAI;IACJ,QAAQ;IACR,MAAM;IACN,QAAQ;CACT,CAAC,CAAA;AACF,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA","sourcesContent":["import { escape, unescape } from 'minimatch'\nimport { Minipass } from 'minipass'\nimport { Path } from 'path-scurry'\nimport type {\n GlobOptions,\n GlobOptionsWithFileTypesFalse,\n GlobOptionsWithFileTypesTrue,\n GlobOptionsWithFileTypesUnset,\n} from './glob.js'\nimport { Glob } from './glob.js'\nimport { hasMagic } from './has-magic.js'\n\nexport { escape, unescape } from 'minimatch'\nexport type {\n FSOption,\n Path,\n WalkOptions,\n WalkOptionsWithFileTypesTrue,\n WalkOptionsWithFileTypesUnset,\n} from 'path-scurry'\nexport { Glob } from './glob.js'\nexport type {\n GlobOptions,\n GlobOptionsWithFileTypesFalse,\n GlobOptionsWithFileTypesTrue,\n GlobOptionsWithFileTypesUnset,\n} from './glob.js'\nexport { hasMagic } from './has-magic.js'\nexport { Ignore } from './ignore.js'\nexport type { IgnoreLike } from './ignore.js'\nexport type { MatchStream } from './walker.js'\n\n/**\n * Syncronous form of {@link globStream}. Will read all the matches as fast as\n * you consume them, even all in a single tick if you consume them immediately,\n * but will still respond to backpressure if they're not consumed immediately.\n */\nexport function globStreamSync(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesTrue,\n): Minipass\nexport function globStreamSync(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesFalse,\n): Minipass\nexport function globStreamSync(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesUnset,\n): Minipass\nexport function globStreamSync(\n pattern: string | string[],\n options: GlobOptions,\n): Minipass | Minipass\nexport function globStreamSync(\n pattern: string | string[],\n options: GlobOptions = {},\n) {\n return new Glob(pattern, options).streamSync()\n}\n\n/**\n * Return a stream that emits all the strings or `Path` objects and\n * then emits `end` when completed.\n */\nexport function globStream(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesFalse,\n): Minipass\nexport function globStream(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesTrue,\n): Minipass\nexport function globStream(\n pattern: string | string[],\n options?: GlobOptionsWithFileTypesUnset | undefined,\n): Minipass\nexport function globStream(\n pattern: string | string[],\n options: GlobOptions,\n): Minipass | Minipass\nexport function globStream(\n pattern: string | string[],\n options: GlobOptions = {},\n) {\n return new Glob(pattern, options).stream()\n}\n\n/**\n * Synchronous form of {@link glob}\n */\nexport function globSync(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesFalse,\n): string[]\nexport function globSync(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesTrue,\n): Path[]\nexport function globSync(\n pattern: string | string[],\n options?: GlobOptionsWithFileTypesUnset | undefined,\n): string[]\nexport function globSync(\n pattern: string | string[],\n options: GlobOptions,\n): Path[] | string[]\nexport function globSync(\n pattern: string | string[],\n options: GlobOptions = {},\n) {\n return new Glob(pattern, options).walkSync()\n}\n\n/**\n * Perform an asynchronous glob search for the pattern(s) specified. Returns\n * [Path](https://isaacs.github.io/path-scurry/classes/PathBase) objects if the\n * {@link withFileTypes} option is set to `true`. See {@link GlobOptions} for\n * full option descriptions.\n */\nasync function glob_(\n pattern: string | string[],\n options?: GlobOptionsWithFileTypesUnset | undefined,\n): Promise\nasync function glob_(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesTrue,\n): Promise\nasync function glob_(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesFalse,\n): Promise\nasync function glob_(\n pattern: string | string[],\n options: GlobOptions,\n): Promise\nasync function glob_(\n pattern: string | string[],\n options: GlobOptions = {},\n) {\n return new Glob(pattern, options).walk()\n}\n\n/**\n * Return a sync iterator for walking glob pattern matches.\n */\nexport function globIterateSync(\n pattern: string | string[],\n options?: GlobOptionsWithFileTypesUnset | undefined,\n): Generator\nexport function globIterateSync(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesTrue,\n): Generator\nexport function globIterateSync(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesFalse,\n): Generator\nexport function globIterateSync(\n pattern: string | string[],\n options: GlobOptions,\n): Generator | Generator\nexport function globIterateSync(\n pattern: string | string[],\n options: GlobOptions = {},\n) {\n return new Glob(pattern, options).iterateSync()\n}\n\n/**\n * Return an async iterator for walking glob pattern matches.\n */\nexport function globIterate(\n pattern: string | string[],\n options?: GlobOptionsWithFileTypesUnset | undefined,\n): AsyncGenerator\nexport function globIterate(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesTrue,\n): AsyncGenerator\nexport function globIterate(\n pattern: string | string[],\n options: GlobOptionsWithFileTypesFalse,\n): AsyncGenerator\nexport function globIterate(\n pattern: string | string[],\n options: GlobOptions,\n): AsyncGenerator | AsyncGenerator\nexport function globIterate(\n pattern: string | string[],\n options: GlobOptions = {},\n) {\n return new Glob(pattern, options).iterate()\n}\n\n// aliases: glob.sync.stream() glob.stream.sync() glob.sync() etc\nexport const streamSync = globStreamSync\nexport const stream = Object.assign(globStream, { sync: globStreamSync })\nexport const iterateSync = globIterateSync\nexport const iterate = Object.assign(globIterate, {\n sync: globIterateSync,\n})\nexport const sync = Object.assign(globSync, {\n stream: globStreamSync,\n iterate: globIterateSync,\n})\n\nexport const glob = Object.assign(glob_, {\n glob: glob_,\n globSync,\n sync,\n globStream,\n stream,\n globStreamSync,\n streamSync,\n globIterate,\n iterate,\n globIterateSync,\n iterateSync,\n Glob,\n hasMagic,\n escape,\n unescape,\n})\nglob.glob = glob\n"]} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/glob/dist/esm/package.json b/node_modules/mocha/node_modules/glob/dist/esm/package.json deleted file mode 100644 index 3dbc1ca5..00000000 --- a/node_modules/mocha/node_modules/glob/dist/esm/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "type": "module" -} diff --git a/node_modules/mocha/node_modules/glob/dist/esm/pattern.d.ts b/node_modules/mocha/node_modules/glob/dist/esm/pattern.d.ts deleted file mode 100644 index 9636df3b..00000000 --- a/node_modules/mocha/node_modules/glob/dist/esm/pattern.d.ts +++ /dev/null @@ -1,76 +0,0 @@ -import { GLOBSTAR } from 'minimatch'; -export type MMPattern = string | RegExp | typeof GLOBSTAR; -export type PatternList = [p: MMPattern, ...rest: MMPattern[]]; -export type UNCPatternList = [ - p0: '', - p1: '', - p2: string, - p3: string, - ...rest: MMPattern[] -]; -export type DrivePatternList = [p0: string, ...rest: MMPattern[]]; -export type AbsolutePatternList = [p0: '', ...rest: MMPattern[]]; -export type GlobList = [p: string, ...rest: string[]]; -/** - * An immutable-ish view on an array of glob parts and their parsed - * results - */ -export declare class Pattern { - #private; - readonly length: number; - constructor(patternList: MMPattern[], globList: string[], index: number, platform: NodeJS.Platform); - /** - * The first entry in the parsed list of patterns - */ - pattern(): MMPattern; - /** - * true of if pattern() returns a string - */ - isString(): boolean; - /** - * true of if pattern() returns GLOBSTAR - */ - isGlobstar(): boolean; - /** - * true if pattern() returns a regexp - */ - isRegExp(): boolean; - /** - * The /-joined set of glob parts that make up this pattern - */ - globString(): string; - /** - * true if there are more pattern parts after this one - */ - hasMore(): boolean; - /** - * The rest of the pattern after this part, or null if this is the end - */ - rest(): Pattern | null; - /** - * true if the pattern represents a //unc/path/ on windows - */ - isUNC(): boolean; - /** - * True if the pattern starts with a drive letter on Windows - */ - isDrive(): boolean; - /** - * True if the pattern is rooted on an absolute path - */ - isAbsolute(): boolean; - /** - * consume the root of the pattern, and return it - */ - root(): string; - /** - * Check to see if the current globstar pattern is allowed to follow - * a symbolic link. - */ - checkFollowGlobstar(): boolean; - /** - * Mark that the current globstar pattern is following a symbolic link - */ - markFollowGlobstar(): boolean; -} -//# sourceMappingURL=pattern.d.ts.map \ No newline at end of file diff --git a/node_modules/mocha/node_modules/glob/dist/esm/pattern.d.ts.map b/node_modules/mocha/node_modules/glob/dist/esm/pattern.d.ts.map deleted file mode 100644 index cdf32234..00000000 --- a/node_modules/mocha/node_modules/glob/dist/esm/pattern.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"pattern.d.ts","sourceRoot":"","sources":["../../src/pattern.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AACpC,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,QAAQ,CAAA;AAGzD,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,SAAS,EAAE,CAAC,CAAA;AAC9D,MAAM,MAAM,cAAc,GAAG;IAC3B,EAAE,EAAE,EAAE;IACN,EAAE,EAAE,EAAE;IACN,EAAE,EAAE,MAAM;IACV,EAAE,EAAE,MAAM;IACV,GAAG,IAAI,EAAE,SAAS,EAAE;CACrB,CAAA;AACD,MAAM,MAAM,gBAAgB,GAAG,CAAC,EAAE,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,SAAS,EAAE,CAAC,CAAA;AACjE,MAAM,MAAM,mBAAmB,GAAG,CAAC,EAAE,EAAE,EAAE,EAAE,GAAG,IAAI,EAAE,SAAS,EAAE,CAAC,CAAA;AAChE,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,CAAC,CAAA;AAMrD;;;GAGG;AACH,qBAAa,OAAO;;IAIlB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;gBAUrB,WAAW,EAAE,SAAS,EAAE,EACxB,QAAQ,EAAE,MAAM,EAAE,EAClB,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,MAAM,CAAC,QAAQ;IA6D3B;;OAEG;IACH,OAAO,IAAI,SAAS;IAIpB;;OAEG;IACH,QAAQ,IAAI,OAAO;IAGnB;;OAEG;IACH,UAAU,IAAI,OAAO;IAGrB;;OAEG;IACH,QAAQ,IAAI,OAAO;IAInB;;OAEG;IACH,UAAU,IAAI,MAAM;IAUpB;;OAEG;IACH,OAAO,IAAI,OAAO;IAIlB;;OAEG;IACH,IAAI,IAAI,OAAO,GAAG,IAAI;IAetB;;OAEG;IACH,KAAK,IAAI,OAAO;IAoBhB;;OAEG;IACH,OAAO,IAAI,OAAO;IAelB;;OAEG;IACH,UAAU,IAAI,OAAO;IAUrB;;OAEG;IACH,IAAI,IAAI,MAAM;IASd;;;OAGG;IACH,mBAAmB,IAAI,OAAO;IAQ9B;;OAEG;IACH,kBAAkB,IAAI,OAAO;CAM9B"} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/glob/dist/esm/pattern.js b/node_modules/mocha/node_modules/glob/dist/esm/pattern.js deleted file mode 100644 index b41defa1..00000000 --- a/node_modules/mocha/node_modules/glob/dist/esm/pattern.js +++ /dev/null @@ -1,215 +0,0 @@ -// this is just a very light wrapper around 2 arrays with an offset index -import { GLOBSTAR } from 'minimatch'; -const isPatternList = (pl) => pl.length >= 1; -const isGlobList = (gl) => gl.length >= 1; -/** - * An immutable-ish view on an array of glob parts and their parsed - * results - */ -export class Pattern { - #patternList; - #globList; - #index; - length; - #platform; - #rest; - #globString; - #isDrive; - #isUNC; - #isAbsolute; - #followGlobstar = true; - constructor(patternList, globList, index, platform) { - if (!isPatternList(patternList)) { - throw new TypeError('empty pattern list'); - } - if (!isGlobList(globList)) { - throw new TypeError('empty glob list'); - } - if (globList.length !== patternList.length) { - throw new TypeError('mismatched pattern list and glob list lengths'); - } - this.length = patternList.length; - if (index < 0 || index >= this.length) { - throw new TypeError('index out of range'); - } - this.#patternList = patternList; - this.#globList = globList; - this.#index = index; - this.#platform = platform; - // normalize root entries of absolute patterns on initial creation. - if (this.#index === 0) { - // c: => ['c:/'] - // C:/ => ['C:/'] - // C:/x => ['C:/', 'x'] - // //host/share => ['//host/share/'] - // //host/share/ => ['//host/share/'] - // //host/share/x => ['//host/share/', 'x'] - // /etc => ['/', 'etc'] - // / => ['/'] - if (this.isUNC()) { - // '' / '' / 'host' / 'share' - const [p0, p1, p2, p3, ...prest] = this.#patternList; - const [g0, g1, g2, g3, ...grest] = this.#globList; - if (prest[0] === '') { - // ends in / - prest.shift(); - grest.shift(); - } - const p = [p0, p1, p2, p3, ''].join('/'); - const g = [g0, g1, g2, g3, ''].join('/'); - this.#patternList = [p, ...prest]; - this.#globList = [g, ...grest]; - this.length = this.#patternList.length; - } - else if (this.isDrive() || this.isAbsolute()) { - const [p1, ...prest] = this.#patternList; - const [g1, ...grest] = this.#globList; - if (prest[0] === '') { - // ends in / - prest.shift(); - grest.shift(); - } - const p = p1 + '/'; - const g = g1 + '/'; - this.#patternList = [p, ...prest]; - this.#globList = [g, ...grest]; - this.length = this.#patternList.length; - } - } - } - /** - * The first entry in the parsed list of patterns - */ - pattern() { - return this.#patternList[this.#index]; - } - /** - * true of if pattern() returns a string - */ - isString() { - return typeof this.#patternList[this.#index] === 'string'; - } - /** - * true of if pattern() returns GLOBSTAR - */ - isGlobstar() { - return this.#patternList[this.#index] === GLOBSTAR; - } - /** - * true if pattern() returns a regexp - */ - isRegExp() { - return this.#patternList[this.#index] instanceof RegExp; - } - /** - * The /-joined set of glob parts that make up this pattern - */ - globString() { - return (this.#globString = - this.#globString || - (this.#index === 0 ? - this.isAbsolute() ? - this.#globList[0] + this.#globList.slice(1).join('/') - : this.#globList.join('/') - : this.#globList.slice(this.#index).join('/'))); - } - /** - * true if there are more pattern parts after this one - */ - hasMore() { - return this.length > this.#index + 1; - } - /** - * The rest of the pattern after this part, or null if this is the end - */ - rest() { - if (this.#rest !== undefined) - return this.#rest; - if (!this.hasMore()) - return (this.#rest = null); - this.#rest = new Pattern(this.#patternList, this.#globList, this.#index + 1, this.#platform); - this.#rest.#isAbsolute = this.#isAbsolute; - this.#rest.#isUNC = this.#isUNC; - this.#rest.#isDrive = this.#isDrive; - return this.#rest; - } - /** - * true if the pattern represents a //unc/path/ on windows - */ - isUNC() { - const pl = this.#patternList; - return this.#isUNC !== undefined ? - this.#isUNC - : (this.#isUNC = - this.#platform === 'win32' && - this.#index === 0 && - pl[0] === '' && - pl[1] === '' && - typeof pl[2] === 'string' && - !!pl[2] && - typeof pl[3] === 'string' && - !!pl[3]); - } - // pattern like C:/... - // split = ['C:', ...] - // XXX: would be nice to handle patterns like `c:*` to test the cwd - // in c: for *, but I don't know of a way to even figure out what that - // cwd is without actually chdir'ing into it? - /** - * True if the pattern starts with a drive letter on Windows - */ - isDrive() { - const pl = this.#patternList; - return this.#isDrive !== undefined ? - this.#isDrive - : (this.#isDrive = - this.#platform === 'win32' && - this.#index === 0 && - this.length > 1 && - typeof pl[0] === 'string' && - /^[a-z]:$/i.test(pl[0])); - } - // pattern = '/' or '/...' or '/x/...' - // split = ['', ''] or ['', ...] or ['', 'x', ...] - // Drive and UNC both considered absolute on windows - /** - * True if the pattern is rooted on an absolute path - */ - isAbsolute() { - const pl = this.#patternList; - return this.#isAbsolute !== undefined ? - this.#isAbsolute - : (this.#isAbsolute = - (pl[0] === '' && pl.length > 1) || - this.isDrive() || - this.isUNC()); - } - /** - * consume the root of the pattern, and return it - */ - root() { - const p = this.#patternList[0]; - return (typeof p === 'string' && this.isAbsolute() && this.#index === 0) ? - p - : ''; - } - /** - * Check to see if the current globstar pattern is allowed to follow - * a symbolic link. - */ - checkFollowGlobstar() { - return !(this.#index === 0 || - !this.isGlobstar() || - !this.#followGlobstar); - } - /** - * Mark that the current globstar pattern is following a symbolic link - */ - markFollowGlobstar() { - if (this.#index === 0 || !this.isGlobstar() || !this.#followGlobstar) - return false; - this.#followGlobstar = false; - return true; - } -} -//# sourceMappingURL=pattern.js.map \ No newline at end of file diff --git a/node_modules/mocha/node_modules/glob/dist/esm/pattern.js.map b/node_modules/mocha/node_modules/glob/dist/esm/pattern.js.map deleted file mode 100644 index 566a306a..00000000 --- a/node_modules/mocha/node_modules/glob/dist/esm/pattern.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"pattern.js","sourceRoot":"","sources":["../../src/pattern.ts"],"names":[],"mappings":"AAAA,yEAAyE;AAEzE,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AAgBpC,MAAM,aAAa,GAAG,CAAC,EAAe,EAAqB,EAAE,CAC3D,EAAE,CAAC,MAAM,IAAI,CAAC,CAAA;AAChB,MAAM,UAAU,GAAG,CAAC,EAAY,EAAkB,EAAE,CAAC,EAAE,CAAC,MAAM,IAAI,CAAC,CAAA;AAEnE;;;GAGG;AACH,MAAM,OAAO,OAAO;IACT,YAAY,CAAa;IACzB,SAAS,CAAU;IACnB,MAAM,CAAQ;IACd,MAAM,CAAQ;IACd,SAAS,CAAiB;IACnC,KAAK,CAAiB;IACtB,WAAW,CAAS;IACpB,QAAQ,CAAU;IAClB,MAAM,CAAU;IAChB,WAAW,CAAU;IACrB,eAAe,GAAY,IAAI,CAAA;IAE/B,YACE,WAAwB,EACxB,QAAkB,EAClB,KAAa,EACb,QAAyB;QAEzB,IAAI,CAAC,aAAa,CAAC,WAAW,CAAC,EAAE,CAAC;YAChC,MAAM,IAAI,SAAS,CAAC,oBAAoB,CAAC,CAAA;QAC3C,CAAC;QACD,IAAI,CAAC,UAAU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U,EAAE,IAAI,CAAC,IAAI,CAAC,eAAe;YAClE,OAAO,KAAK,CAAA;QACd,IAAI,CAAC,eAAe,GAAG,KAAK,CAAA;QAC5B,OAAO,IAAI,CAAA;IACb,CAAC;CACF","sourcesContent":["// this is just a very light wrapper around 2 arrays with an offset index\n\nimport { GLOBSTAR } from 'minimatch'\nexport type MMPattern = string | RegExp | typeof GLOBSTAR\n\n// an array of length >= 1\nexport type PatternList = [p: MMPattern, ...rest: MMPattern[]]\nexport type UNCPatternList = [\n p0: '',\n p1: '',\n p2: string,\n p3: string,\n ...rest: MMPattern[],\n]\nexport type DrivePatternList = [p0: string, ...rest: MMPattern[]]\nexport type AbsolutePatternList = [p0: '', ...rest: MMPattern[]]\nexport type GlobList = [p: string, ...rest: string[]]\n\nconst isPatternList = (pl: MMPattern[]): pl is PatternList =>\n pl.length >= 1\nconst isGlobList = (gl: string[]): gl is GlobList => gl.length >= 1\n\n/**\n * An immutable-ish view on an array of glob parts and their parsed\n * results\n */\nexport class Pattern {\n readonly #patternList: PatternList\n readonly #globList: GlobList\n readonly #index: number\n readonly length: number\n readonly #platform: NodeJS.Platform\n #rest?: Pattern | null\n #globString?: string\n #isDrive?: boolean\n #isUNC?: boolean\n #isAbsolute?: boolean\n #followGlobstar: boolean = true\n\n constructor(\n patternList: MMPattern[],\n globList: string[],\n index: number,\n platform: NodeJS.Platform,\n ) {\n if (!isPatternList(patternList)) {\n throw new TypeError('empty pattern list')\n }\n if (!isGlobList(globList)) {\n throw new TypeError('empty glob list')\n }\n if (globList.length !== patternList.length) {\n throw new TypeError('mismatched pattern list and glob list lengths')\n }\n this.length = patternList.length\n if (index < 0 || index >= this.length) {\n throw new TypeError('index out of range')\n }\n this.#patternList = patternList\n this.#globList = globList\n this.#index = index\n this.#platform = platform\n\n // normalize root entries of absolute patterns on initial creation.\n if (this.#index === 0) {\n // c: => ['c:/']\n // C:/ => ['C:/']\n // C:/x => ['C:/', 'x']\n // //host/share => ['//host/share/']\n // //host/share/ => ['//host/share/']\n // //host/share/x => ['//host/share/', 'x']\n // /etc => ['/', 'etc']\n // / => ['/']\n if (this.isUNC()) {\n // '' / '' / 'host' / 'share'\n const [p0, p1, p2, p3, ...prest] = this.#patternList\n const [g0, g1, g2, g3, ...grest] = this.#globList\n if (prest[0] === '') {\n // ends in /\n prest.shift()\n grest.shift()\n }\n const p = [p0, p1, p2, p3, ''].join('/')\n const g = [g0, g1, g2, g3, ''].join('/')\n this.#patternList = [p, ...prest]\n this.#globList = [g, ...grest]\n this.length = this.#patternList.length\n } else if (this.isDrive() || this.isAbsolute()) {\n const [p1, ...prest] = this.#patternList\n const [g1, ...grest] = this.#globList\n if (prest[0] === '') {\n // ends in /\n prest.shift()\n grest.shift()\n }\n const p = (p1 as string) + '/'\n const g = g1 + '/'\n this.#patternList = [p, ...prest]\n this.#globList = [g, ...grest]\n this.length = this.#patternList.length\n }\n }\n }\n\n /**\n * The first entry in the parsed list of patterns\n */\n pattern(): MMPattern {\n return this.#patternList[this.#index] as MMPattern\n }\n\n /**\n * true of if pattern() returns a string\n */\n isString(): boolean {\n return typeof this.#patternList[this.#index] === 'string'\n }\n /**\n * true of if pattern() returns GLOBSTAR\n */\n isGlobstar(): boolean {\n return this.#patternList[this.#index] === GLOBSTAR\n }\n /**\n * true if pattern() returns a regexp\n */\n isRegExp(): boolean {\n return this.#patternList[this.#index] instanceof RegExp\n }\n\n /**\n * The /-joined set of glob parts that make up this pattern\n */\n globString(): string {\n return (this.#globString =\n this.#globString ||\n (this.#index === 0 ?\n this.isAbsolute() ?\n this.#globList[0] + this.#globList.slice(1).join('/')\n : this.#globList.join('/')\n : this.#globList.slice(this.#index).join('/')))\n }\n\n /**\n * true if there are more pattern parts after this one\n */\n hasMore(): boolean {\n return this.length > this.#index + 1\n }\n\n /**\n * The rest of the pattern after this part, or null if this is the end\n */\n rest(): Pattern | null {\n if (this.#rest !== undefined) return this.#rest\n if (!this.hasMore()) return (this.#rest = null)\n this.#rest = new Pattern(\n this.#patternList,\n this.#globList,\n this.#index + 1,\n this.#platform,\n )\n this.#rest.#isAbsolute = this.#isAbsolute\n this.#rest.#isUNC = this.#isUNC\n this.#rest.#isDrive = this.#isDrive\n return this.#rest\n }\n\n /**\n * true if the pattern represents a //unc/path/ on windows\n */\n isUNC(): boolean {\n const pl = this.#patternList\n return this.#isUNC !== undefined ?\n this.#isUNC\n : (this.#isUNC =\n this.#platform === 'win32' &&\n this.#index === 0 &&\n pl[0] === '' &&\n pl[1] === '' &&\n typeof pl[2] === 'string' &&\n !!pl[2] &&\n typeof pl[3] === 'string' &&\n !!pl[3])\n }\n\n // pattern like C:/...\n // split = ['C:', ...]\n // XXX: would be nice to handle patterns like `c:*` to test the cwd\n // in c: for *, but I don't know of a way to even figure out what that\n // cwd is without actually chdir'ing into it?\n /**\n * True if the pattern starts with a drive letter on Windows\n */\n isDrive(): boolean {\n const pl = this.#patternList\n return this.#isDrive !== undefined ?\n this.#isDrive\n : (this.#isDrive =\n this.#platform === 'win32' &&\n this.#index === 0 &&\n this.length > 1 &&\n typeof pl[0] === 'string' &&\n /^[a-z]:$/i.test(pl[0]))\n }\n\n // pattern = '/' or '/...' or '/x/...'\n // split = ['', ''] or ['', ...] or ['', 'x', ...]\n // Drive and UNC both considered absolute on windows\n /**\n * True if the pattern is rooted on an absolute path\n */\n isAbsolute(): boolean {\n const pl = this.#patternList\n return this.#isAbsolute !== undefined ?\n this.#isAbsolute\n : (this.#isAbsolute =\n (pl[0] === '' && pl.length > 1) ||\n this.isDrive() ||\n this.isUNC())\n }\n\n /**\n * consume the root of the pattern, and return it\n */\n root(): string {\n const p = this.#patternList[0]\n return (\n typeof p === 'string' && this.isAbsolute() && this.#index === 0\n ) ?\n p\n : ''\n }\n\n /**\n * Check to see if the current globstar pattern is allowed to follow\n * a symbolic link.\n */\n checkFollowGlobstar(): boolean {\n return !(\n this.#index === 0 ||\n !this.isGlobstar() ||\n !this.#followGlobstar\n )\n }\n\n /**\n * Mark that the current globstar pattern is following a symbolic link\n */\n markFollowGlobstar(): boolean {\n if (this.#index === 0 || !this.isGlobstar() || !this.#followGlobstar)\n return false\n this.#followGlobstar = false\n return true\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/glob/dist/esm/processor.d.ts b/node_modules/mocha/node_modules/glob/dist/esm/processor.d.ts deleted file mode 100644 index ccedfbf2..00000000 --- a/node_modules/mocha/node_modules/glob/dist/esm/processor.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { MMRegExp } from 'minimatch'; -import { Path } from 'path-scurry'; -import { Pattern } from './pattern.js'; -import { GlobWalkerOpts } from './walker.js'; -/** - * A cache of which patterns have been processed for a given Path - */ -export declare class HasWalkedCache { - store: Map>; - constructor(store?: Map>); - copy(): HasWalkedCache; - hasWalked(target: Path, pattern: Pattern): boolean | undefined; - storeWalked(target: Path, pattern: Pattern): void; -} -/** - * A record of which paths have been matched in a given walk step, - * and whether they only are considered a match if they are a directory, - * and whether their absolute or relative path should be returned. - */ -export declare class MatchRecord { - store: Map; - add(target: Path, absolute: boolean, ifDir: boolean): void; - entries(): [Path, boolean, boolean][]; -} -/** - * A collection of patterns that must be processed in a subsequent step - * for a given path. - */ -export declare class SubWalks { - store: Map; - add(target: Path, pattern: Pattern): void; - get(target: Path): Pattern[]; - entries(): [Path, Pattern[]][]; - keys(): Path[]; -} -/** - * The class that processes patterns for a given path. - * - * Handles child entry filtering, and determining whether a path's - * directory contents must be read. - */ -export declare class Processor { - hasWalkedCache: HasWalkedCache; - matches: MatchRecord; - subwalks: SubWalks; - patterns?: Pattern[]; - follow: boolean; - dot: boolean; - opts: GlobWalkerOpts; - constructor(opts: GlobWalkerOpts, hasWalkedCache?: HasWalkedCache); - processPatterns(target: Path, patterns: Pattern[]): this; - subwalkTargets(): Path[]; - child(): Processor; - filterEntries(parent: Path, entries: Path[]): Processor; - testGlobstar(e: Path, pattern: Pattern, rest: Pattern | null, absolute: boolean): void; - testRegExp(e: Path, p: MMRegExp, rest: Pattern | null, absolute: boolean): void; - testString(e: Path, p: string, rest: Pattern | null, absolute: boolean): void; -} -//# sourceMappingURL=processor.d.ts.map \ No newline at end of file diff --git a/node_modules/mocha/node_modules/glob/dist/esm/processor.d.ts.map b/node_modules/mocha/node_modules/glob/dist/esm/processor.d.ts.map deleted file mode 100644 index aa266fee..00000000 --- a/node_modules/mocha/node_modules/glob/dist/esm/processor.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"processor.d.ts","sourceRoot":"","sources":["../../src/processor.ts"],"names":[],"mappings":"AAEA,OAAO,EAAY,QAAQ,EAAE,MAAM,WAAW,CAAA;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAClC,OAAO,EAAa,OAAO,EAAE,MAAM,cAAc,CAAA;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAE5C;;GAEG;AACH,qBAAa,cAAc;IACzB,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,CAAA;gBACnB,KAAK,GAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAa;IAGvD,IAAI;IAGJ,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO;IAGxC,WAAW,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO;CAM3C;AAED;;;;GAIG;AACH,qBAAa,WAAW;IACtB,KAAK,EAAE,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,CAAY;IACpC,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO;IAMnD,OAAO,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE;CAOtC;AAED;;;GAGG;AACH,qBAAa,QAAQ;IACnB,KAAK,EAAE,GAAG,CAAC,IAAI,EAAE,OAAO,EAAE,CAAC,CAAY;IACvC,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO;IAWlC,GAAG,CAAC,MAAM,EAAE,IAAI,GAAG,OAAO,EAAE;IAS5B,OAAO,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,CAAC,EAAE;IAG9B,IAAI,IAAI,IAAI,EAAE;CAGf;AAED;;;;;GAKG;AACH,qBAAa,SAAS;IACpB,cAAc,EAAE,cAAc,CAAA;IAC9B,OAAO,cAAoB;IAC3B,QAAQ,WAAiB;IACzB,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAA;IACpB,MAAM,EAAE,OAAO,CAAA;IACf,GAAG,EAAE,OAAO,CAAA;IACZ,IAAI,EAAE,cAAc,CAAA;gBAER,IAAI,EAAE,cAAc,EAAE,cAAc,CAAC,EAAE,cAAc;IAQjE,eAAe,CAAC,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE;IAmGjD,cAAc,IAAI,IAAI,EAAE;IAIxB,KAAK;IAQL,aAAa,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,SAAS;IAqBvD,YAAY,CACV,CAAC,EAAE,IAAI,EACP,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,OAAO,GAAG,IAAI,EACpB,QAAQ,EAAE,OAAO;IA8CnB,UAAU,CACR,CAAC,EAAE,IAAI,EACP,CAAC,EAAE,QAAQ,EACX,IAAI,EAAE,OAAO,GAAG,IAAI,EACpB,QAAQ,EAAE,OAAO;IAUnB,UAAU,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,IAAI,EAAE,QAAQ,EAAE,OAAO;CASvE"} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/glob/dist/esm/processor.js b/node_modules/mocha/node_modules/glob/dist/esm/processor.js deleted file mode 100644 index f874892f..00000000 --- a/node_modules/mocha/node_modules/glob/dist/esm/processor.js +++ /dev/null @@ -1,294 +0,0 @@ -// synchronous utility for filtering entries and calculating subwalks -import { GLOBSTAR } from 'minimatch'; -/** - * A cache of which patterns have been processed for a given Path - */ -export class HasWalkedCache { - store; - constructor(store = new Map()) { - this.store = store; - } - copy() { - return new HasWalkedCache(new Map(this.store)); - } - hasWalked(target, pattern) { - return this.store.get(target.fullpath())?.has(pattern.globString()); - } - storeWalked(target, pattern) { - const fullpath = target.fullpath(); - const cached = this.store.get(fullpath); - if (cached) - cached.add(pattern.globString()); - else - this.store.set(fullpath, new Set([pattern.globString()])); - } -} -/** - * A record of which paths have been matched in a given walk step, - * and whether they only are considered a match if they are a directory, - * and whether their absolute or relative path should be returned. - */ -export class MatchRecord { - store = new Map(); - add(target, absolute, ifDir) { - const n = (absolute ? 2 : 0) | (ifDir ? 1 : 0); - const current = this.store.get(target); - this.store.set(target, current === undefined ? n : n & current); - } - // match, absolute, ifdir - entries() { - return [...this.store.entries()].map(([path, n]) => [ - path, - !!(n & 2), - !!(n & 1), - ]); - } -} -/** - * A collection of patterns that must be processed in a subsequent step - * for a given path. - */ -export class SubWalks { - store = new Map(); - add(target, pattern) { - if (!target.canReaddir()) { - return; - } - const subs = this.store.get(target); - if (subs) { - if (!subs.find(p => p.globString() === pattern.globString())) { - subs.push(pattern); - } - } - else - this.store.set(target, [pattern]); - } - get(target) { - const subs = this.store.get(target); - /* c8 ignore start */ - if (!subs) { - throw new Error('attempting to walk unknown path'); - } - /* c8 ignore stop */ - return subs; - } - entries() { - return this.keys().map(k => [k, this.store.get(k)]); - } - keys() { - return [...this.store.keys()].filter(t => t.canReaddir()); - } -} -/** - * The class that processes patterns for a given path. - * - * Handles child entry filtering, and determining whether a path's - * directory contents must be read. - */ -export class Processor { - hasWalkedCache; - matches = new MatchRecord(); - subwalks = new SubWalks(); - patterns; - follow; - dot; - opts; - constructor(opts, hasWalkedCache) { - this.opts = opts; - this.follow = !!opts.follow; - this.dot = !!opts.dot; - this.hasWalkedCache = - hasWalkedCache ? hasWalkedCache.copy() : new HasWalkedCache(); - } - processPatterns(target, patterns) { - this.patterns = patterns; - const processingSet = patterns.map(p => [target, p]); - // map of paths to the magic-starting subwalks they need to walk - // first item in patterns is the filter - for (let [t, pattern] of processingSet) { - this.hasWalkedCache.storeWalked(t, pattern); - const root = pattern.root(); - const absolute = pattern.isAbsolute() && this.opts.absolute !== false; - // start absolute patterns at root - if (root) { - t = t.resolve(root === '/' && this.opts.root !== undefined ? - this.opts.root - : root); - const rest = pattern.rest(); - if (!rest) { - this.matches.add(t, true, false); - continue; - } - else { - pattern = rest; - } - } - if (t.isENOENT()) - continue; - let p; - let rest; - let changed = false; - while (typeof (p = pattern.pattern()) === 'string' && - (rest = pattern.rest())) { - const c = t.resolve(p); - t = c; - pattern = rest; - changed = true; - } - p = pattern.pattern(); - rest = pattern.rest(); - if (changed) { - if (this.hasWalkedCache.hasWalked(t, pattern)) - continue; - this.hasWalkedCache.storeWalked(t, pattern); - } - // now we have either a final string for a known entry, - // more strings for an unknown entry, - // or a pattern starting with magic, mounted on t. - if (typeof p === 'string') { - // must not be final entry, otherwise we would have - // concatenated it earlier. - const ifDir = p === '..' || p === '' || p === '.'; - this.matches.add(t.resolve(p), absolute, ifDir); - continue; - } - else if (p === GLOBSTAR) { - // if no rest, match and subwalk pattern - // if rest, process rest and subwalk pattern - // if it's a symlink, but we didn't get here by way of a - // globstar match (meaning it's the first time THIS globstar - // has traversed a symlink), then we follow it. Otherwise, stop. - if (!t.isSymbolicLink() || - this.follow || - pattern.checkFollowGlobstar()) { - this.subwalks.add(t, pattern); - } - const rp = rest?.pattern(); - const rrest = rest?.rest(); - if (!rest || ((rp === '' || rp === '.') && !rrest)) { - // only HAS to be a dir if it ends in **/ or **/. - // but ending in ** will match files as well. - this.matches.add(t, absolute, rp === '' || rp === '.'); - } - else { - if (rp === '..') { - // this would mean you're matching **/.. at the fs root, - // and no thanks, I'm not gonna test that specific case. - /* c8 ignore start */ - const tp = t.parent || t; - /* c8 ignore stop */ - if (!rrest) - this.matches.add(tp, absolute, true); - else if (!this.hasWalkedCache.hasWalked(tp, rrest)) { - this.subwalks.add(tp, rrest); - } - } - } - } - else if (p instanceof RegExp) { - this.subwalks.add(t, pattern); - } - } - return this; - } - subwalkTargets() { - return this.subwalks.keys(); - } - child() { - return new Processor(this.opts, this.hasWalkedCache); - } - // return a new Processor containing the subwalks for each - // child entry, and a set of matches, and - // a hasWalkedCache that's a copy of this one - // then we're going to call - filterEntries(parent, entries) { - const patterns = this.subwalks.get(parent); - // put matches and entry walks into the results processor - const results = this.child(); - for (const e of entries) { - for (const pattern of patterns) { - const absolute = pattern.isAbsolute(); - const p = pattern.pattern(); - const rest = pattern.rest(); - if (p === GLOBSTAR) { - results.testGlobstar(e, pattern, rest, absolute); - } - else if (p instanceof RegExp) { - results.testRegExp(e, p, rest, absolute); - } - else { - results.testString(e, p, rest, absolute); - } - } - } - return results; - } - testGlobstar(e, pattern, rest, absolute) { - if (this.dot || !e.name.startsWith('.')) { - if (!pattern.hasMore()) { - this.matches.add(e, absolute, false); - } - if (e.canReaddir()) { - // if we're in follow mode or it's not a symlink, just keep - // testing the same pattern. If there's more after the globstar, - // then this symlink consumes the globstar. If not, then we can - // follow at most ONE symlink along the way, so we mark it, which - // also checks to ensure that it wasn't already marked. - if (this.follow || !e.isSymbolicLink()) { - this.subwalks.add(e, pattern); - } - else if (e.isSymbolicLink()) { - if (rest && pattern.checkFollowGlobstar()) { - this.subwalks.add(e, rest); - } - else if (pattern.markFollowGlobstar()) { - this.subwalks.add(e, pattern); - } - } - } - } - // if the NEXT thing matches this entry, then also add - // the rest. - if (rest) { - const rp = rest.pattern(); - if (typeof rp === 'string' && - // dots and empty were handled already - rp !== '..' && - rp !== '' && - rp !== '.') { - this.testString(e, rp, rest.rest(), absolute); - } - else if (rp === '..') { - /* c8 ignore start */ - const ep = e.parent || e; - /* c8 ignore stop */ - this.subwalks.add(ep, rest); - } - else if (rp instanceof RegExp) { - this.testRegExp(e, rp, rest.rest(), absolute); - } - } - } - testRegExp(e, p, rest, absolute) { - if (!p.test(e.name)) - return; - if (!rest) { - this.matches.add(e, absolute, false); - } - else { - this.subwalks.add(e, rest); - } - } - testString(e, p, rest, absolute) { - // should never happen? - if (!e.isNamed(p)) - return; - if (!rest) { - this.matches.add(e, absolute, false); - } - else { - this.subwalks.add(e, rest); - } - } -} -//# sourceMappingURL=processor.js.map \ No newline at end of file diff --git a/node_modules/mocha/node_modules/glob/dist/esm/processor.js.map b/node_modules/mocha/node_modules/glob/dist/esm/processor.js.map deleted file mode 100644 index 05a83242..00000000 --- a/node_modules/mocha/node_modules/glob/dist/esm/processor.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"processor.js","sourceRoot":"","sources":["../../src/processor.ts"],"names":[],"mappings":"AAAA,qEAAqE;AAErE,OAAO,EAAE,QAAQ,EAAY,MAAM,WAAW,CAAA;AAK9C;;GAEG;AACH,MAAM,OAAO,cAAc;IACzB,KAAK,CAA0B;IAC/B,YAAY,QAAkC,IAAI,GAAG,EAAE;QACrD,IAAI,CAAC,KAAK,GAAG,KAAK,CAAA;IACpB,CAAC;IACD,IAAI;QACF,OAAO,IAAI,cAAc,CAAC,IAAI,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAA;IAChD,CAAC;IACD,SAAS,CAAC,MAAY,EAAE,OAAgB;QACtC,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC,CAAA;IACrE,CAAC;IACD,WAAW,CAAC,MAAY,EAAE,OAAgB;QACxC,MAAM,QAAQ,GAAG,MAAM,CAAC,QAAQ,EAAE,CAAA;QAClC,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA;QACvC,IAAI,MAAM;YAAE,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC,CAAA;;YACvC,IAAI,CAAC,KAAK,CA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AE,QAAQ,EAAE,KAAK,CAAC,CAAA;QACtC,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,CAAA;QAC5B,CAAC;IACH,CAAC;CACF","sourcesContent":["// synchronous utility for filtering entries and calculating subwalks\n\nimport { GLOBSTAR, MMRegExp } from 'minimatch'\nimport { Path } from 'path-scurry'\nimport { MMPattern, Pattern } from './pattern.js'\nimport { GlobWalkerOpts } from './walker.js'\n\n/**\n * A cache of which patterns have been processed for a given Path\n */\nexport class HasWalkedCache {\n store: Map>\n constructor(store: Map> = new Map()) {\n this.store = store\n }\n copy() {\n return new HasWalkedCache(new Map(this.store))\n }\n hasWalked(target: Path, pattern: Pattern) {\n return this.store.get(target.fullpath())?.has(pattern.globString())\n }\n storeWalked(target: Path, pattern: Pattern) {\n const fullpath = target.fullpath()\n const cached = this.store.get(fullpath)\n if (cached) cached.add(pattern.globString())\n else this.store.set(fullpath, new Set([pattern.globString()]))\n }\n}\n\n/**\n * A record of which paths have been matched in a given walk step,\n * and whether they only are considered a match if they are a directory,\n * and whether their absolute or relative path should be returned.\n */\nexport class MatchRecord {\n store: Map = new Map()\n add(target: Path, absolute: boolean, ifDir: boolean) {\n const n = (absolute ? 2 : 0) | (ifDir ? 1 : 0)\n const current = this.store.get(target)\n this.store.set(target, current === undefined ? n : n & current)\n }\n // match, absolute, ifdir\n entries(): [Path, boolean, boolean][] {\n return [...this.store.entries()].map(([path, n]) => [\n path,\n !!(n & 2),\n !!(n & 1),\n ])\n }\n}\n\n/**\n * A collection of patterns that must be processed in a subsequent step\n * for a given path.\n */\nexport class SubWalks {\n store: Map = new Map()\n add(target: Path, pattern: Pattern) {\n if (!target.canReaddir()) {\n return\n }\n const subs = this.store.get(target)\n if (subs) {\n if (!subs.find(p => p.globString() === pattern.globString())) {\n subs.push(pattern)\n }\n } else this.store.set(target, [pattern])\n }\n get(target: Path): Pattern[] {\n const subs = this.store.get(target)\n /* c8 ignore start */\n if (!subs) {\n throw new Error('attempting to walk unknown path')\n }\n /* c8 ignore stop */\n return subs\n }\n entries(): [Path, Pattern[]][] {\n return this.keys().map(k => [k, this.store.get(k) as Pattern[]])\n }\n keys(): Path[] {\n return [...this.store.keys()].filter(t => t.canReaddir())\n }\n}\n\n/**\n * The class that processes patterns for a given path.\n *\n * Handles child entry filtering, and determining whether a path's\n * directory contents must be read.\n */\nexport class Processor {\n hasWalkedCache: HasWalkedCache\n matches = new MatchRecord()\n subwalks = new SubWalks()\n patterns?: Pattern[]\n follow: boolean\n dot: boolean\n opts: GlobWalkerOpts\n\n constructor(opts: GlobWalkerOpts, hasWalkedCache?: HasWalkedCache) {\n this.opts = opts\n this.follow = !!opts.follow\n this.dot = !!opts.dot\n this.hasWalkedCache =\n hasWalkedCache ? hasWalkedCache.copy() : new HasWalkedCache()\n }\n\n processPatterns(target: Path, patterns: Pattern[]) {\n this.patterns = patterns\n const processingSet: [Path, Pattern][] = patterns.map(p => [target, p])\n\n // map of paths to the magic-starting subwalks they need to walk\n // first item in patterns is the filter\n\n for (let [t, pattern] of processingSet) {\n this.hasWalkedCache.storeWalked(t, pattern)\n\n const root = pattern.root()\n const absolute = pattern.isAbsolute() && this.opts.absolute !== false\n\n // start absolute patterns at root\n if (root) {\n t = t.resolve(\n root === '/' && this.opts.root !== undefined ?\n this.opts.root\n : root,\n )\n const rest = pattern.rest()\n if (!rest) {\n this.matches.add(t, true, false)\n continue\n } else {\n pattern = rest\n }\n }\n\n if (t.isENOENT()) continue\n\n let p: MMPattern\n let rest: Pattern | null\n let changed = false\n while (\n typeof (p = pattern.pattern()) === 'string' &&\n (rest = pattern.rest())\n ) {\n const c = t.resolve(p)\n t = c\n pattern = rest\n changed = true\n }\n p = pattern.pattern()\n rest = pattern.rest()\n if (changed) {\n if (this.hasWalkedCache.hasWalked(t, pattern)) continue\n this.hasWalkedCache.storeWalked(t, pattern)\n }\n\n // now we have either a final string for a known entry,\n // more strings for an unknown entry,\n // or a pattern starting with magic, mounted on t.\n if (typeof p === 'string') {\n // must not be final entry, otherwise we would have\n // concatenated it earlier.\n const ifDir = p === '..' || p === '' || p === '.'\n this.matches.add(t.resolve(p), absolute, ifDir)\n continue\n } else if (p === GLOBSTAR) {\n // if no rest, match and subwalk pattern\n // if rest, process rest and subwalk pattern\n // if it's a symlink, but we didn't get here by way of a\n // globstar match (meaning it's the first time THIS globstar\n // has traversed a symlink), then we follow it. Otherwise, stop.\n if (\n !t.isSymbolicLink() ||\n this.follow ||\n pattern.checkFollowGlobstar()\n ) {\n this.subwalks.add(t, pattern)\n }\n const rp = rest?.pattern()\n const rrest = rest?.rest()\n if (!rest || ((rp === '' || rp === '.') && !rrest)) {\n // only HAS to be a dir if it ends in **/ or **/.\n // but ending in ** will match files as well.\n this.matches.add(t, absolute, rp === '' || rp === '.')\n } else {\n if (rp === '..') {\n // this would mean you're matching **/.. at the fs root,\n // and no thanks, I'm not gonna test that specific case.\n /* c8 ignore start */\n const tp = t.parent || t\n /* c8 ignore stop */\n if (!rrest) this.matches.add(tp, absolute, true)\n else if (!this.hasWalkedCache.hasWalked(tp, rrest)) {\n this.subwalks.add(tp, rrest)\n }\n }\n }\n } else if (p instanceof RegExp) {\n this.subwalks.add(t, pattern)\n }\n }\n\n return this\n }\n\n subwalkTargets(): Path[] {\n return this.subwalks.keys()\n }\n\n child() {\n return new Processor(this.opts, this.hasWalkedCache)\n }\n\n // return a new Processor containing the subwalks for each\n // child entry, and a set of matches, and\n // a hasWalkedCache that's a copy of this one\n // then we're going to call\n filterEntries(parent: Path, entries: Path[]): Processor {\n const patterns = this.subwalks.get(parent)\n // put matches and entry walks into the results processor\n const results = this.child()\n for (const e of entries) {\n for (const pattern of patterns) {\n const absolute = pattern.isAbsolute()\n const p = pattern.pattern()\n const rest = pattern.rest()\n if (p === GLOBSTAR) {\n results.testGlobstar(e, pattern, rest, absolute)\n } else if (p instanceof RegExp) {\n results.testRegExp(e, p, rest, absolute)\n } else {\n results.testString(e, p, rest, absolute)\n }\n }\n }\n return results\n }\n\n testGlobstar(\n e: Path,\n pattern: Pattern,\n rest: Pattern | null,\n absolute: boolean,\n ) {\n if (this.dot || !e.name.startsWith('.')) {\n if (!pattern.hasMore()) {\n this.matches.add(e, absolute, false)\n }\n if (e.canReaddir()) {\n // if we're in follow mode or it's not a symlink, just keep\n // testing the same pattern. If there's more after the globstar,\n // then this symlink consumes the globstar. If not, then we can\n // follow at most ONE symlink along the way, so we mark it, which\n // also checks to ensure that it wasn't already marked.\n if (this.follow || !e.isSymbolicLink()) {\n this.subwalks.add(e, pattern)\n } else if (e.isSymbolicLink()) {\n if (rest && pattern.checkFollowGlobstar()) {\n this.subwalks.add(e, rest)\n } else if (pattern.markFollowGlobstar()) {\n this.subwalks.add(e, pattern)\n }\n }\n }\n }\n // if the NEXT thing matches this entry, then also add\n // the rest.\n if (rest) {\n const rp = rest.pattern()\n if (\n typeof rp === 'string' &&\n // dots and empty were handled already\n rp !== '..' &&\n rp !== '' &&\n rp !== '.'\n ) {\n this.testString(e, rp, rest.rest(), absolute)\n } else if (rp === '..') {\n /* c8 ignore start */\n const ep = e.parent || e\n /* c8 ignore stop */\n this.subwalks.add(ep, rest)\n } else if (rp instanceof RegExp) {\n this.testRegExp(e, rp, rest.rest(), absolute)\n }\n }\n }\n\n testRegExp(\n e: Path,\n p: MMRegExp,\n rest: Pattern | null,\n absolute: boolean,\n ) {\n if (!p.test(e.name)) return\n if (!rest) {\n this.matches.add(e, absolute, false)\n } else {\n this.subwalks.add(e, rest)\n }\n }\n\n testString(e: Path, p: string, rest: Pattern | null, absolute: boolean) {\n // should never happen?\n if (!e.isNamed(p)) return\n if (!rest) {\n this.matches.add(e, absolute, false)\n } else {\n this.subwalks.add(e, rest)\n }\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/glob/dist/esm/walker.d.ts b/node_modules/mocha/node_modules/glob/dist/esm/walker.d.ts deleted file mode 100644 index 499c8f49..00000000 --- a/node_modules/mocha/node_modules/glob/dist/esm/walker.d.ts +++ /dev/null @@ -1,97 +0,0 @@ -/** - * Single-use utility classes to provide functionality to the {@link Glob} - * methods. - * - * @module - */ -import { Minipass } from 'minipass'; -import { Path } from 'path-scurry'; -import { IgnoreLike } from './ignore.js'; -import { Pattern } from './pattern.js'; -import { Processor } from './processor.js'; -export interface GlobWalkerOpts { - absolute?: boolean; - allowWindowsEscape?: boolean; - cwd?: string | URL; - dot?: boolean; - dotRelative?: boolean; - follow?: boolean; - ignore?: string | string[] | IgnoreLike; - mark?: boolean; - matchBase?: boolean; - maxDepth?: number; - nobrace?: boolean; - nocase?: boolean; - nodir?: boolean; - noext?: boolean; - noglobstar?: boolean; - platform?: NodeJS.Platform; - posix?: boolean; - realpath?: boolean; - root?: string; - stat?: boolean; - signal?: AbortSignal; - windowsPathsNoEscape?: boolean; - withFileTypes?: boolean; - includeChildMatches?: boolean; -} -export type GWOFileTypesTrue = GlobWalkerOpts & { - withFileTypes: true; -}; -export type GWOFileTypesFalse = GlobWalkerOpts & { - withFileTypes: false; -}; -export type GWOFileTypesUnset = GlobWalkerOpts & { - withFileTypes?: undefined; -}; -export type Result = O extends GWOFileTypesTrue ? Path : O extends GWOFileTypesFalse ? string : O extends GWOFileTypesUnset ? string : Path | string; -export type Matches = O extends GWOFileTypesTrue ? Set : O extends GWOFileTypesFalse ? Set : O extends GWOFileTypesUnset ? Set : Set; -export type MatchStream = Minipass, Result>; -/** - * basic walking utilities that all the glob walker types use - */ -export declare abstract class GlobUtil { - #private; - path: Path; - patterns: Pattern[]; - opts: O; - seen: Set; - paused: boolean; - aborted: boolean; - signal?: AbortSignal; - maxDepth: number; - includeChildMatches: boolean; - constructor(patterns: Pattern[], path: Path, opts: O); - pause(): void; - resume(): void; - onResume(fn: () => any): void; - matchCheck(e: Path, ifDir: boolean): Promise; - matchCheckTest(e: Path | undefined, ifDir: boolean): Path | undefined; - matchCheckSync(e: Path, ifDir: boolean): Path | undefined; - abstract matchEmit(p: Result): void; - abstract matchEmit(p: string | Path): void; - matchFinish(e: Path, absolute: boolean): void; - match(e: Path, absolute: boolean, ifDir: boolean): Promise; - matchSync(e: Path, absolute: boolean, ifDir: boolean): void; - walkCB(target: Path, patterns: Pattern[], cb: () => any): void; - walkCB2(target: Path, patterns: Pattern[], processor: Processor, cb: () => any): any; - walkCB3(target: Path, entries: Path[], processor: Processor, cb: () => any): void; - walkCBSync(target: Path, patterns: Pattern[], cb: () => any): void; - walkCB2Sync(target: Path, patterns: Pattern[], processor: Processor, cb: () => any): any; - walkCB3Sync(target: Path, entries: Path[], processor: Processor, cb: () => any): void; -} -export declare class GlobWalker extends GlobUtil { - matches: Set>; - constructor(patterns: Pattern[], path: Path, opts: O); - matchEmit(e: Result): void; - walk(): Promise>>; - walkSync(): Set>; -} -export declare class GlobStream extends GlobUtil { - results: Minipass, Result>; - constructor(patterns: Pattern[], path: Path, opts: O); - matchEmit(e: Result): void; - stream(): MatchStream; - streamSync(): MatchStream; -} -//# sourceMappingURL=walker.d.ts.map \ No newline at end of file diff --git a/node_modules/mocha/node_modules/glob/dist/esm/walker.d.ts.map b/node_modules/mocha/node_modules/glob/dist/esm/walker.d.ts.map deleted file mode 100644 index 769957bd..00000000 --- a/node_modules/mocha/node_modules/glob/dist/esm/walker.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"walker.d.ts","sourceRoot":"","sources":["../../src/walker.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AACnC,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAClC,OAAO,EAAU,UAAU,EAAE,MAAM,aAAa,CAAA;AAOhD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAE1C,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,kBAAkB,CAAC,EA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U,CACrB,CAAC,SAAS,cAAc,GAAG,cAAc,CACzC,SAAQ,QAAQ,CAAC,CAAC,CAAC;IACnB,OAAO,iBAAuB;gBAElB,QAAQ,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IAIpD,SAAS,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,GAAG,IAAI;IAIvB,IAAI,IAAI,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;IAiBrC,QAAQ,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;CAW3B;AAED,qBAAa,UAAU,CACrB,CAAC,SAAS,cAAc,GAAG,cAAc,CACzC,SAAQ,QAAQ,CAAC,CAAC,CAAC;IACnB,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAA;gBAE3B,QAAQ,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IAUpD,SAAS,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,GAAG,IAAI;IAK7B,MAAM,IAAI,WAAW,CAAC,CAAC,CAAC;IAYxB,UAAU,IAAI,WAAW,CAAC,CAAC,CAAC;CAO7B"} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/glob/dist/esm/walker.js b/node_modules/mocha/node_modules/glob/dist/esm/walker.js deleted file mode 100644 index 3d68196c..00000000 --- a/node_modules/mocha/node_modules/glob/dist/esm/walker.js +++ /dev/null @@ -1,381 +0,0 @@ -/** - * Single-use utility classes to provide functionality to the {@link Glob} - * methods. - * - * @module - */ -import { Minipass } from 'minipass'; -import { Ignore } from './ignore.js'; -import { Processor } from './processor.js'; -const makeIgnore = (ignore, opts) => typeof ignore === 'string' ? new Ignore([ignore], opts) - : Array.isArray(ignore) ? new Ignore(ignore, opts) - : ignore; -/** - * basic walking utilities that all the glob walker types use - */ -export class GlobUtil { - path; - patterns; - opts; - seen = new Set(); - paused = false; - aborted = false; - #onResume = []; - #ignore; - #sep; - signal; - maxDepth; - includeChildMatches; - constructor(patterns, path, opts) { - this.patterns = patterns; - this.path = path; - this.opts = opts; - this.#sep = !opts.posix && opts.platform === 'win32' ? '\\' : '/'; - this.includeChildMatches = opts.includeChildMatches !== false; - if (opts.ignore || !this.includeChildMatches) { - this.#ignore = makeIgnore(opts.ignore ?? [], opts); - if (!this.includeChildMatches && - typeof this.#ignore.add !== 'function') { - const m = 'cannot ignore child matches, ignore lacks add() method.'; - throw new Error(m); - } - } - // ignore, always set with maxDepth, but it's optional on the - // GlobOptions type - /* c8 ignore start */ - this.maxDepth = opts.maxDepth || Infinity; - /* c8 ignore stop */ - if (opts.signal) { - this.signal = opts.signal; - this.signal.addEventListener('abort', () => { - this.#onResume.length = 0; - }); - } - } - #ignored(path) { - return this.seen.has(path) || !!this.#ignore?.ignored?.(path); - } - #childrenIgnored(path) { - return !!this.#ignore?.childrenIgnored?.(path); - } - // backpressure mechanism - pause() { - this.paused = true; - } - resume() { - /* c8 ignore start */ - if (this.signal?.aborted) - return; - /* c8 ignore stop */ - this.paused = false; - let fn = undefined; - while (!this.paused && (fn = this.#onResume.shift())) { - fn(); - } - } - onResume(fn) { - if (this.signal?.aborted) - return; - /* c8 ignore start */ - if (!this.paused) { - fn(); - } - else { - /* c8 ignore stop */ - this.#onResume.push(fn); - } - } - // do the requisite realpath/stat checking, and return the path - // to add or undefined to filter it out. - async matchCheck(e, ifDir) { - if (ifDir && this.opts.nodir) - return undefined; - let rpc; - if (this.opts.realpath) { - rpc = e.realpathCached() || (await e.realpath()); - if (!rpc) - return undefined; - e = rpc; - } - const needStat = e.isUnknown() || this.opts.stat; - const s = needStat ? await e.lstat() : e; - if (this.opts.follow && this.opts.nodir && s?.isSymbolicLink()) { - const target = await s.realpath(); - /* c8 ignore start */ - if (target && (target.isUnknown() || this.opts.stat)) { - await target.lstat(); - } - /* c8 ignore stop */ - } - return this.matchCheckTest(s, ifDir); - } - matchCheckTest(e, ifDir) { - return (e && - (this.maxDepth === Infinity || e.depth() <= this.maxDepth) && - (!ifDir || e.canReaddir()) && - (!this.opts.nodir || !e.isDirectory()) && - (!this.opts.nodir || - !this.opts.follow || - !e.isSymbolicLink() || - !e.realpathCached()?.isDirectory()) && - !this.#ignored(e)) ? - e - : undefined; - } - matchCheckSync(e, ifDir) { - if (ifDir && this.opts.nodir) - return undefined; - let rpc; - if (this.opts.realpath) { - rpc = e.realpathCached() || e.realpathSync(); - if (!rpc) - return undefined; - e = rpc; - } - const needStat = e.isUnknown() || this.opts.stat; - const s = needStat ? e.lstatSync() : e; - if (this.opts.follow && this.opts.nodir && s?.isSymbolicLink()) { - const target = s.realpathSync(); - if (target && (target?.isUnknown() || this.opts.stat)) { - target.lstatSync(); - } - } - return this.matchCheckTest(s, ifDir); - } - matchFinish(e, absolute) { - if (this.#ignored(e)) - return; - // we know we have an ignore if this is false, but TS doesn't - if (!this.includeChildMatches && this.#ignore?.add) { - const ign = `${e.relativePosix()}/**`; - this.#ignore.add(ign); - } - const abs = this.opts.absolute === undefined ? absolute : this.opts.absolute; - this.seen.add(e); - const mark = this.opts.mark && e.isDirectory() ? this.#sep : ''; - // ok, we have what we need! - if (this.opts.withFileTypes) { - this.matchEmit(e); - } - else if (abs) { - const abs = this.opts.posix ? e.fullpathPosix() : e.fullpath(); - this.matchEmit(abs + mark); - } - else { - const rel = this.opts.posix ? e.relativePosix() : e.relative(); - const pre = this.opts.dotRelative && !rel.startsWith('..' + this.#sep) ? - '.' + this.#sep - : ''; - this.matchEmit(!rel ? '.' + mark : pre + rel + mark); - } - } - async match(e, absolute, ifDir) { - const p = await this.matchCheck(e, ifDir); - if (p) - this.matchFinish(p, absolute); - } - matchSync(e, absolute, ifDir) { - const p = this.matchCheckSync(e, ifDir); - if (p) - this.matchFinish(p, absolute); - } - walkCB(target, patterns, cb) { - /* c8 ignore start */ - if (this.signal?.aborted) - cb(); - /* c8 ignore stop */ - this.walkCB2(target, patterns, new Processor(this.opts), cb); - } - walkCB2(target, patterns, processor, cb) { - if (this.#childrenIgnored(target)) - return cb(); - if (this.signal?.aborted) - cb(); - if (this.paused) { - this.onResume(() => this.walkCB2(target, patterns, processor, cb)); - return; - } - processor.processPatterns(target, patterns); - // done processing. all of the above is sync, can be abstracted out. - // subwalks is a map of paths to the entry filters they need - // matches is a map of paths to [absolute, ifDir] tuples. - let tasks = 1; - const next = () => { - if (--tasks === 0) - cb(); - }; - for (const [m, absolute, ifDir] of processor.matches.entries()) { - if (this.#ignored(m)) - continue; - tasks++; - this.match(m, absolute, ifDir).then(() => next()); - } - for (const t of processor.subwalkTargets()) { - if (this.maxDepth !== Infinity && t.depth() >= this.maxDepth) { - continue; - } - tasks++; - const childrenCached = t.readdirCached(); - if (t.calledReaddir()) - this.walkCB3(t, childrenCached, processor, next); - else { - t.readdirCB((_, entries) => this.walkCB3(t, entries, processor, next), true); - } - } - next(); - } - walkCB3(target, entries, processor, cb) { - processor = processor.filterEntries(target, entries); - let tasks = 1; - const next = () => { - if (--tasks === 0) - cb(); - }; - for (const [m, absolute, ifDir] of processor.matches.entries()) { - if (this.#ignored(m)) - continue; - tasks++; - this.match(m, absolute, ifDir).then(() => next()); - } - for (const [target, patterns] of processor.subwalks.entries()) { - tasks++; - this.walkCB2(target, patterns, processor.child(), next); - } - next(); - } - walkCBSync(target, patterns, cb) { - /* c8 ignore start */ - if (this.signal?.aborted) - cb(); - /* c8 ignore stop */ - this.walkCB2Sync(target, patterns, new Processor(this.opts), cb); - } - walkCB2Sync(target, patterns, processor, cb) { - if (this.#childrenIgnored(target)) - return cb(); - if (this.signal?.aborted) - cb(); - if (this.paused) { - this.onResume(() => this.walkCB2Sync(target, patterns, processor, cb)); - return; - } - processor.processPatterns(target, patterns); - // done processing. all of the above is sync, can be abstracted out. - // subwalks is a map of paths to the entry filters they need - // matches is a map of paths to [absolute, ifDir] tuples. - let tasks = 1; - const next = () => { - if (--tasks === 0) - cb(); - }; - for (const [m, absolute, ifDir] of processor.matches.entries()) { - if (this.#ignored(m)) - continue; - this.matchSync(m, absolute, ifDir); - } - for (const t of processor.subwalkTargets()) { - if (this.maxDepth !== Infinity && t.depth() >= this.maxDepth) { - continue; - } - tasks++; - const children = t.readdirSync(); - this.walkCB3Sync(t, children, processor, next); - } - next(); - } - walkCB3Sync(target, entries, processor, cb) { - processor = processor.filterEntries(target, entries); - let tasks = 1; - const next = () => { - if (--tasks === 0) - cb(); - }; - for (const [m, absolute, ifDir] of processor.matches.entries()) { - if (this.#ignored(m)) - continue; - this.matchSync(m, absolute, ifDir); - } - for (const [target, patterns] of processor.subwalks.entries()) { - tasks++; - this.walkCB2Sync(target, patterns, processor.child(), next); - } - next(); - } -} -export class GlobWalker extends GlobUtil { - matches = new Set(); - constructor(patterns, path, opts) { - super(patterns, path, opts); - } - matchEmit(e) { - this.matches.add(e); - } - async walk() { - if (this.signal?.aborted) - throw this.signal.reason; - if (this.path.isUnknown()) { - await this.path.lstat(); - } - await new Promise((res, rej) => { - this.walkCB(this.path, this.patterns, () => { - if (this.signal?.aborted) { - rej(this.signal.reason); - } - else { - res(this.matches); - } - }); - }); - return this.matches; - } - walkSync() { - if (this.signal?.aborted) - throw this.signal.reason; - if (this.path.isUnknown()) { - this.path.lstatSync(); - } - // nothing for the callback to do, because this never pauses - this.walkCBSync(this.path, this.patterns, () => { - if (this.signal?.aborted) - throw this.signal.reason; - }); - return this.matches; - } -} -export class GlobStream extends GlobUtil { - results; - constructor(patterns, path, opts) { - super(patterns, path, opts); - this.results = new Minipass({ - signal: this.signal, - objectMode: true, - }); - this.results.on('drain', () => this.resume()); - this.results.on('resume', () => this.resume()); - } - matchEmit(e) { - this.results.write(e); - if (!this.results.flowing) - this.pause(); - } - stream() { - const target = this.path; - if (target.isUnknown()) { - target.lstat().then(() => { - this.walkCB(target, this.patterns, () => this.results.end()); - }); - } - else { - this.walkCB(target, this.patterns, () => this.results.end()); - } - return this.results; - } - streamSync() { - if (this.path.isUnknown()) { - this.path.lstatSync(); - } - this.walkCBSync(this.path, this.patterns, () => this.results.end()); - return this.results; - } -} -//# sourceMappingURL=walker.js.map \ No newline at end of file diff --git a/node_modules/mocha/node_modules/glob/dist/esm/walker.js.map b/node_modules/mocha/node_modules/glob/dist/esm/walker.js.map deleted file mode 100644 index daeeda67..00000000 --- a/node_modules/mocha/node_modules/glob/dist/esm/walker.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"walker.js","sourceRoot":"","sources":["../../src/walker.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAEnC,OAAO,EAAE,MAAM,EAAc,MAAM,aAAa,CAAA;AAQhD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AA0D1C,MAAM,UAAU,GAAG,CACjB,MAAsC,EACtC,IAAoB,EACR,EAAE,CACd,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC;IACvD,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC;QAClD,CAAC,CAAC,MAAM,CAAA;AAEV;;GAEG;AACH,MAAM,OAAgB,QAAQ;IAC5B,IAAI,CAAM;IACV,QAAQ,CAAW;IACnB,IAAI,CAAG;IACP,IAAI,GAAc,IAAI,GAAG,EAAQ,CAAA;IACjC,MAAM,GAAY,KAAK,CAAA;IACvB,OAAO,GAAY,KAAK,CAAA;IACxB,SAAS,GAAkB,EAAE,CAAA;IAC7B,OAAO,CAAa;IACpB,IAAI,CAAY;IAChB,MAAM,CAAc;IACpB,QAAQ,CAAQ;IAChB,mBAAmB,CAAS;IAG5B,YAAY,QAAmB,EAAE,IAAU,EAAE,IAAO;QAClD,IAAI,CAAC,QAAQ,GAA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,CAAA;QAC9D,CAAC;QACD,OAAO,IAAI,CAAC,OAAO,CAAA;IACrB,CAAC;IAED,UAAU;QACR,IAAI,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,CAAC;YAC1B,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,CAAA;QACvB,CAAC;QACD,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAA;QACnE,OAAO,IAAI,CAAC,OAAO,CAAA;IACrB,CAAC;CACF","sourcesContent":["/**\n * Single-use utility classes to provide functionality to the {@link Glob}\n * methods.\n *\n * @module\n */\nimport { Minipass } from 'minipass'\nimport { Path } from 'path-scurry'\nimport { Ignore, IgnoreLike } from './ignore.js'\n\n// XXX can we somehow make it so that it NEVER processes a given path more than\n// once, enough that the match set tracking is no longer needed? that'd speed\n// things up a lot. Or maybe bring back nounique, and skip it in that case?\n\n// a single minimatch set entry with 1 or more parts\nimport { Pattern } from './pattern.js'\nimport { Processor } from './processor.js'\n\nexport interface GlobWalkerOpts {\n absolute?: boolean\n allowWindowsEscape?: boolean\n cwd?: string | URL\n dot?: boolean\n dotRelative?: boolean\n follow?: boolean\n ignore?: string | string[] | IgnoreLike\n mark?: boolean\n matchBase?: boolean\n // Note: maxDepth here means \"maximum actual Path.depth()\",\n // not \"maximum depth beyond cwd\"\n maxDepth?: number\n nobrace?: boolean\n nocase?: boolean\n nodir?: boolean\n noext?: boolean\n noglobstar?: boolean\n platform?: NodeJS.Platform\n posix?: boolean\n realpath?: boolean\n root?: string\n stat?: boolean\n signal?: AbortSignal\n windowsPathsNoEscape?: boolean\n withFileTypes?: boolean\n includeChildMatches?: boolean\n}\n\nexport type GWOFileTypesTrue = GlobWalkerOpts & {\n withFileTypes: true\n}\nexport type GWOFileTypesFalse = GlobWalkerOpts & {\n withFileTypes: false\n}\nexport type GWOFileTypesUnset = GlobWalkerOpts & {\n withFileTypes?: undefined\n}\n\nexport type Result =\n O extends GWOFileTypesTrue ? Path\n : O extends GWOFileTypesFalse ? string\n : O extends GWOFileTypesUnset ? string\n : Path | string\n\nexport type Matches =\n O extends GWOFileTypesTrue ? Set\n : O extends GWOFileTypesFalse ? Set\n : O extends GWOFileTypesUnset ? Set\n : Set\n\nexport type MatchStream = Minipass<\n Result,\n Result\n>\n\nconst makeIgnore = (\n ignore: string | string[] | IgnoreLike,\n opts: GlobWalkerOpts,\n): IgnoreLike =>\n typeof ignore === 'string' ? new Ignore([ignore], opts)\n : Array.isArray(ignore) ? new Ignore(ignore, opts)\n : ignore\n\n/**\n * basic walking utilities that all the glob walker types use\n */\nexport abstract class GlobUtil {\n path: Path\n patterns: Pattern[]\n opts: O\n seen: Set = new Set()\n paused: boolean = false\n aborted: boolean = false\n #onResume: (() => any)[] = []\n #ignore?: IgnoreLike\n #sep: '\\\\' | '/'\n signal?: AbortSignal\n maxDepth: number\n includeChildMatches: boolean\n\n constructor(patterns: Pattern[], path: Path, opts: O)\n constructor(patterns: Pattern[], path: Path, opts: O) {\n this.patterns = patterns\n this.path = path\n this.opts = opts\n this.#sep = !opts.posix && opts.platform === 'win32' ? '\\\\' : '/'\n this.includeChildMatches = opts.includeChildMatches !== false\n if (opts.ignore || !this.includeChildMatches) {\n this.#ignore = makeIgnore(opts.ignore ?? [], opts)\n if (\n !this.includeChildMatches &&\n typeof this.#ignore.add !== 'function'\n ) {\n const m = 'cannot ignore child matches, ignore lacks add() method.'\n throw new Error(m)\n }\n }\n // ignore, always set with maxDepth, but it's optional on the\n // GlobOptions type\n /* c8 ignore start */\n this.maxDepth = opts.maxDepth || Infinity\n /* c8 ignore stop */\n if (opts.signal) {\n this.signal = opts.signal\n this.signal.addEventListener('abort', () => {\n this.#onResume.length = 0\n })\n }\n }\n\n #ignored(path: Path): boolean {\n return this.seen.has(path) || !!this.#ignore?.ignored?.(path)\n }\n #childrenIgnored(path: Path): boolean {\n return !!this.#ignore?.childrenIgnored?.(path)\n }\n\n // backpressure mechanism\n pause() {\n this.paused = true\n }\n resume() {\n /* c8 ignore start */\n if (this.signal?.aborted) return\n /* c8 ignore stop */\n this.paused = false\n let fn: (() => any) | undefined = undefined\n while (!this.paused && (fn = this.#onResume.shift())) {\n fn()\n }\n }\n onResume(fn: () => any) {\n if (this.signal?.aborted) return\n /* c8 ignore start */\n if (!this.paused) {\n fn()\n } else {\n /* c8 ignore stop */\n this.#onResume.push(fn)\n }\n }\n\n // do the requisite realpath/stat checking, and return the path\n // to add or undefined to filter it out.\n async matchCheck(e: Path, ifDir: boolean): Promise {\n if (ifDir && this.opts.nodir) return undefined\n let rpc: Path | undefined\n if (this.opts.realpath) {\n rpc = e.realpathCached() || (await e.realpath())\n if (!rpc) return undefined\n e = rpc\n }\n const needStat = e.isUnknown() || this.opts.stat\n const s = needStat ? await e.lstat() : e\n if (this.opts.follow && this.opts.nodir && s?.isSymbolicLink()) {\n const target = await s.realpath()\n /* c8 ignore start */\n if (target && (target.isUnknown() || this.opts.stat)) {\n await target.lstat()\n }\n /* c8 ignore stop */\n }\n return this.matchCheckTest(s, ifDir)\n }\n\n matchCheckTest(e: Path | undefined, ifDir: boolean): Path | undefined {\n return (\n e &&\n (this.maxDepth === Infinity || e.depth() <= this.maxDepth) &&\n (!ifDir || e.canReaddir()) &&\n (!this.opts.nodir || !e.isDirectory()) &&\n (!this.opts.nodir ||\n !this.opts.follow ||\n !e.isSymbolicLink() ||\n !e.realpathCached()?.isDirectory()) &&\n !this.#ignored(e)\n ) ?\n e\n : undefined\n }\n\n matchCheckSync(e: Path, ifDir: boolean): Path | undefined {\n if (ifDir && this.opts.nodir) return undefined\n let rpc: Path | undefined\n if (this.opts.realpath) {\n rpc = e.realpathCached() || e.realpathSync()\n if (!rpc) return undefined\n e = rpc\n }\n const needStat = e.isUnknown() || this.opts.stat\n const s = needStat ? e.lstatSync() : e\n if (this.opts.follow && this.opts.nodir && s?.isSymbolicLink()) {\n const target = s.realpathSync()\n if (target && (target?.isUnknown() || this.opts.stat)) {\n target.lstatSync()\n }\n }\n return this.matchCheckTest(s, ifDir)\n }\n\n abstract matchEmit(p: Result): void\n abstract matchEmit(p: string | Path): void\n\n matchFinish(e: Path, absolute: boolean) {\n if (this.#ignored(e)) return\n // we know we have an ignore if this is false, but TS doesn't\n if (!this.includeChildMatches && this.#ignore?.add) {\n const ign = `${e.relativePosix()}/**`\n this.#ignore.add(ign)\n }\n const abs =\n this.opts.absolute === undefined ? absolute : this.opts.absolute\n this.seen.add(e)\n const mark = this.opts.mark && e.isDirectory() ? this.#sep : ''\n // ok, we have what we need!\n if (this.opts.withFileTypes) {\n this.matchEmit(e)\n } else if (abs) {\n const abs = this.opts.posix ? e.fullpathPosix() : e.fullpath()\n this.matchEmit(abs + mark)\n } else {\n const rel = this.opts.posix ? e.relativePosix() : e.relative()\n const pre =\n this.opts.dotRelative && !rel.startsWith('..' + this.#sep) ?\n '.' + this.#sep\n : ''\n this.matchEmit(!rel ? '.' + mark : pre + rel + mark)\n }\n }\n\n async match(e: Path, absolute: boolean, ifDir: boolean): Promise {\n const p = await this.matchCheck(e, ifDir)\n if (p) this.matchFinish(p, absolute)\n }\n\n matchSync(e: Path, absolute: boolean, ifDir: boolean): void {\n const p = this.matchCheckSync(e, ifDir)\n if (p) this.matchFinish(p, absolute)\n }\n\n walkCB(target: Path, patterns: Pattern[], cb: () => any) {\n /* c8 ignore start */\n if (this.signal?.aborted) cb()\n /* c8 ignore stop */\n this.walkCB2(target, patterns, new Processor(this.opts), cb)\n }\n\n walkCB2(\n target: Path,\n patterns: Pattern[],\n processor: Processor,\n cb: () => any,\n ) {\n if (this.#childrenIgnored(target)) return cb()\n if (this.signal?.aborted) cb()\n if (this.paused) {\n this.onResume(() => this.walkCB2(target, patterns, processor, cb))\n return\n }\n processor.processPatterns(target, patterns)\n\n // done processing. all of the above is sync, can be abstracted out.\n // subwalks is a map of paths to the entry filters they need\n // matches is a map of paths to [absolute, ifDir] tuples.\n let tasks = 1\n const next = () => {\n if (--tasks === 0) cb()\n }\n\n for (const [m, absolute, ifDir] of processor.matches.entries()) {\n if (this.#ignored(m)) continue\n tasks++\n this.match(m, absolute, ifDir).then(() => next())\n }\n\n for (const t of processor.subwalkTargets()) {\n if (this.maxDepth !== Infinity && t.depth() >= this.maxDepth) {\n continue\n }\n tasks++\n const childrenCached = t.readdirCached()\n if (t.calledReaddir())\n this.walkCB3(t, childrenCached, processor, next)\n else {\n t.readdirCB(\n (_, entries) => this.walkCB3(t, entries, processor, next),\n true,\n )\n }\n }\n\n next()\n }\n\n walkCB3(\n target: Path,\n entries: Path[],\n processor: Processor,\n cb: () => any,\n ) {\n processor = processor.filterEntries(target, entries)\n\n let tasks = 1\n const next = () => {\n if (--tasks === 0) cb()\n }\n\n for (const [m, absolute, ifDir] of processor.matches.entries()) {\n if (this.#ignored(m)) continue\n tasks++\n this.match(m, absolute, ifDir).then(() => next())\n }\n for (const [target, patterns] of processor.subwalks.entries()) {\n tasks++\n this.walkCB2(target, patterns, processor.child(), next)\n }\n\n next()\n }\n\n walkCBSync(target: Path, patterns: Pattern[], cb: () => any) {\n /* c8 ignore start */\n if (this.signal?.aborted) cb()\n /* c8 ignore stop */\n this.walkCB2Sync(target, patterns, new Processor(this.opts), cb)\n }\n\n walkCB2Sync(\n target: Path,\n patterns: Pattern[],\n processor: Processor,\n cb: () => any,\n ) {\n if (this.#childrenIgnored(target)) return cb()\n if (this.signal?.aborted) cb()\n if (this.paused) {\n this.onResume(() =>\n this.walkCB2Sync(target, patterns, processor, cb),\n )\n return\n }\n processor.processPatterns(target, patterns)\n\n // done processing. all of the above is sync, can be abstracted out.\n // subwalks is a map of paths to the entry filters they need\n // matches is a map of paths to [absolute, ifDir] tuples.\n let tasks = 1\n const next = () => {\n if (--tasks === 0) cb()\n }\n\n for (const [m, absolute, ifDir] of processor.matches.entries()) {\n if (this.#ignored(m)) continue\n this.matchSync(m, absolute, ifDir)\n }\n\n for (const t of processor.subwalkTargets()) {\n if (this.maxDepth !== Infinity && t.depth() >= this.maxDepth) {\n continue\n }\n tasks++\n const children = t.readdirSync()\n this.walkCB3Sync(t, children, processor, next)\n }\n\n next()\n }\n\n walkCB3Sync(\n target: Path,\n entries: Path[],\n processor: Processor,\n cb: () => any,\n ) {\n processor = processor.filterEntries(target, entries)\n\n let tasks = 1\n const next = () => {\n if (--tasks === 0) cb()\n }\n\n for (const [m, absolute, ifDir] of processor.matches.entries()) {\n if (this.#ignored(m)) continue\n this.matchSync(m, absolute, ifDir)\n }\n for (const [target, patterns] of processor.subwalks.entries()) {\n tasks++\n this.walkCB2Sync(target, patterns, processor.child(), next)\n }\n\n next()\n }\n}\n\nexport class GlobWalker<\n O extends GlobWalkerOpts = GlobWalkerOpts,\n> extends GlobUtil {\n matches = new Set>()\n\n constructor(patterns: Pattern[], path: Path, opts: O) {\n super(patterns, path, opts)\n }\n\n matchEmit(e: Result): void {\n this.matches.add(e)\n }\n\n async walk(): Promise>> {\n if (this.signal?.aborted) throw this.signal.reason\n if (this.path.isUnknown()) {\n await this.path.lstat()\n }\n await new Promise((res, rej) => {\n this.walkCB(this.path, this.patterns, () => {\n if (this.signal?.aborted) {\n rej(this.signal.reason)\n } else {\n res(this.matches)\n }\n })\n })\n return this.matches\n }\n\n walkSync(): Set> {\n if (this.signal?.aborted) throw this.signal.reason\n if (this.path.isUnknown()) {\n this.path.lstatSync()\n }\n // nothing for the callback to do, because this never pauses\n this.walkCBSync(this.path, this.patterns, () => {\n if (this.signal?.aborted) throw this.signal.reason\n })\n return this.matches\n }\n}\n\nexport class GlobStream<\n O extends GlobWalkerOpts = GlobWalkerOpts,\n> extends GlobUtil {\n results: Minipass, Result>\n\n constructor(patterns: Pattern[], path: Path, opts: O) {\n super(patterns, path, opts)\n this.results = new Minipass, Result>({\n signal: this.signal,\n objectMode: true,\n })\n this.results.on('drain', () => this.resume())\n this.results.on('resume', () => this.resume())\n }\n\n matchEmit(e: Result): void {\n this.results.write(e)\n if (!this.results.flowing) this.pause()\n }\n\n stream(): MatchStream {\n const target = this.path\n if (target.isUnknown()) {\n target.lstat().then(() => {\n this.walkCB(target, this.patterns, () => this.results.end())\n })\n } else {\n this.walkCB(target, this.patterns, () => this.results.end())\n }\n return this.results\n }\n\n streamSync(): MatchStream {\n if (this.path.isUnknown()) {\n this.path.lstatSync()\n }\n this.walkCBSync(this.path, this.patterns, () => this.results.end())\n return this.results\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/glob/package.json b/node_modules/mocha/node_modules/glob/package.json deleted file mode 100644 index 6d4893b5..00000000 --- a/node_modules/mocha/node_modules/glob/package.json +++ /dev/null @@ -1,99 +0,0 @@ -{ - "author": "Isaac Z. Schlueter (https://blog.izs.me/)", - "publishConfig": { - "tag": "legacy-v10" - }, - "name": "glob", - "description": "the most correct and second fastest glob implementation in JavaScript", - "version": "10.4.5", - "type": "module", - "tshy": { - "main": true, - "exports": { - "./package.json": "./package.json", - ".": "./src/index.ts" - } - }, - "bin": "./dist/esm/bin.mjs", - "main": "./dist/commonjs/index.js", - "types": "./dist/commonjs/index.d.ts", - "exports": { - "./package.json": "./package.json", - ".": { - "import": { - "types": "./dist/esm/index.d.ts", - "default": "./dist/esm/index.js" - }, - "require": { - "types": "./dist/commonjs/index.d.ts", - "default": "./dist/commonjs/index.js" - } - } - }, - "repository": { - "type": "git", - "url": "git://github.com/isaacs/node-glob.git" - }, - "files": [ - "dist" - ], - "scripts": { - "preversion": "npm test", - "postversion": "npm publish", - "prepublishOnly": "git push origin --follow-tags", - "prepare": "tshy", - "pretest": "npm run prepare", - "presnap": "npm run prepare", - "test": "tap", - "snap": "tap", - "format": "prettier --write . --log-level warn", - "typedoc": "typedoc --tsconfig .tshy/esm.json ./src/*.ts", - "prepublish": "npm run benchclean", - "profclean": "rm -f v8.log profile.txt", - "test-regen": "npm run profclean && TEST_REGEN=1 node --no-warnings --loader ts-node/esm test/00-setup.ts", - "prebench": "npm run prepare", - "bench": "bash benchmark.sh", - "preprof": "npm run prepare", - "prof": "bash prof.sh", - "benchclean": "node benchclean.cjs" - }, - "prettier": { - "experimentalTernaries": true, - "semi": false, - "printWidth": 75, - "tabWidth": 2, - "useTabs": false, - "singleQuote": true, - "jsxSingleQuote": false, - "bracketSameLine": true, - "arrowParens": "avoid", - "endOfLine": "lf" - }, - "dependencies": { - "foreground-child": "^3.1.0", - "jackspeak": "^3.1.2", - "minimatch": "^9.0.4", - "minipass": "^7.1.2", - "package-json-from-dist": "^1.0.0", - "path-scurry": "^1.11.1" - }, - "devDependencies": { - "@types/node": "^20.11.30", - "memfs": "^3.4.13", - "mkdirp": "^3.0.1", - "prettier": "^3.2.5", - "rimraf": "^5.0.7", - "sync-content": "^1.0.2", - "tap": "^19.0.0", - "tshy": "^1.14.0", - "typedoc": "^0.25.12" - }, - "tap": { - "before": "test/00-setup.ts" - }, - "license": "ISC", - "funding": { - "url": "https://github.com/sponsors/isaacs" - }, - "module": "./dist/esm/index.js" -} diff --git a/node_modules/mocha/node_modules/minimatch/LICENSE b/node_modules/mocha/node_modules/minimatch/LICENSE deleted file mode 100644 index 1493534e..00000000 --- a/node_modules/mocha/node_modules/minimatch/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) 2011-2023 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/mocha/node_modules/minimatch/README.md b/node_modules/mocha/node_modules/minimatch/README.md deleted file mode 100644 index 3c97a02f..00000000 --- a/node_modules/mocha/node_modules/minimatch/README.md +++ /dev/null @@ -1,454 +0,0 @@ -# minimatch - -A minimal matching utility. - -This is the matching library used internally by npm. - -It works by converting glob expressions into JavaScript `RegExp` -objects. - -## Usage - -```js -// hybrid module, load with require() or import -import { minimatch } from 'minimatch' -// or: -const { minimatch } = require('minimatch') - -minimatch('bar.foo', '*.foo') // true! -minimatch('bar.foo', '*.bar') // false! -minimatch('bar.foo', '*.+(bar|foo)', { debug: true }) // true, and noisy! -``` - -## Features - -Supports these glob features: - -- Brace Expansion -- Extended glob matching -- "Globstar" `**` matching -- [Posix character - classes](https://www.gnu.org/software/bash/manual/html_node/Pattern-Matching.html), - like `[[:alpha:]]`, supporting the full range of Unicode - characters. For example, `[[:alpha:]]` will match against - `'é'`, though `[a-zA-Z]` will not. Collating symbol and set - matching is not supported, so `[[=e=]]` will _not_ match `'é'` - and `[[.ch.]]` will not match `'ch'` in locales where `ch` is - considered a single character. - -See: - -- `man sh` -- `man bash` [Pattern - Matching](https://www.gnu.org/software/bash/manual/html_node/Pattern-Matching.html) -- `man 3 fnmatch` -- `man 5 gitignore` - -## Windows - -**Please only use forward-slashes in glob expressions.** - -Though windows uses either `/` or `\` as its path separator, only `/` -characters are used by this glob implementation. You must use -forward-slashes **only** in glob expressions. Back-slashes in patterns -will always be interpreted as escape characters, not path separators. - -Note that `\` or `/` _will_ be interpreted as path separators in paths on -Windows, and will match against `/` in glob expressions. - -So just always use `/` in patterns. - -### UNC Paths - -On Windows, UNC paths like `//?/c:/...` or -`//ComputerName/Share/...` are handled specially. - -- Patterns starting with a double-slash followed by some - non-slash characters will preserve their double-slash. As a - result, a pattern like `//*` will match `//x`, but not `/x`. -- Patterns staring with `//?/:` will _not_ treat - the `?` as a wildcard character. Instead, it will be treated - as a normal string. -- Patterns starting with `//?/:/...` will match - file paths starting with `:/...`, and vice versa, - as if the `//?/` was not present. This behavior only is - present when the drive letters are a case-insensitive match to - one another. The remaining portions of the path/pattern are - compared case sensitively, unless `nocase:true` is set. - -Note that specifying a UNC path using `\` characters as path -separators is always allowed in the file path argument, but only -allowed in the pattern argument when `windowsPathsNoEscape: true` -is set in the options. - -## Minimatch Class - -Create a minimatch object by instantiating the `minimatch.Minimatch` class. - -```javascript -var Minimatch = require('minimatch').Minimatch -var mm = new Minimatch(pattern, options) -``` - -### Properties - -- `pattern` The original pattern the minimatch object represents. -- `options` The options supplied to the constructor. -- `set` A 2-dimensional array of regexp or string expressions. - Each row in the - array corresponds to a brace-expanded pattern. Each item in the row - corresponds to a single path-part. For example, the pattern - `{a,b/c}/d` would expand to a set of patterns like: - - [ [ a, d ] - , [ b, c, d ] ] - - If a portion of the pattern doesn't have any "magic" in it - (that is, it's something like `"foo"` rather than `fo*o?`), then it - will be left as a string rather than converted to a regular - expression. - -- `regexp` Created by the `makeRe` method. A single regular expression - expressing the entire pattern. This is useful in cases where you wish - to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled. -- `negate` True if the pattern is negated. -- `comment` True if the pattern is a comment. -- `empty` True if the pattern is `""`. - -### Methods - -- `makeRe()` Generate the `regexp` member if necessary, and return it. - Will return `false` if the pattern is invalid. -- `match(fname)` Return true if the filename matches the pattern, or - false otherwise. -- `matchOne(fileArray, patternArray, partial)` Take a `/`-split - filename, and match it against a single row in the `regExpSet`. This - method is mainly for internal use, but is exposed so that it can be - used by a glob-walker that needs to avoid excessive filesystem calls. -- `hasMagic()` Returns true if the parsed pattern contains any - magic characters. Returns false if all comparator parts are - string literals. If the `magicalBraces` option is set on the - constructor, then it will consider brace expansions which are - not otherwise magical to be magic. If not set, then a pattern - like `a{b,c}d` will return `false`, because neither `abd` nor - `acd` contain any special glob characters. - - This does **not** mean that the pattern string can be used as a - literal filename, as it may contain magic glob characters that - are escaped. For example, the pattern `\\*` or `[*]` would not - be considered to have magic, as the matching portion parses to - the literal string `'*'` and would match a path named `'*'`, - not `'\\*'` or `'[*]'`. The `minimatch.unescape()` method may - be used to remove escape characters. - -All other methods are internal, and will be called as necessary. - -### minimatch(path, pattern, options) - -Main export. Tests a path against the pattern using the options. - -```javascript -var isJS = minimatch(file, '*.js', { matchBase: true }) -``` - -### minimatch.filter(pattern, options) - -Returns a function that tests its -supplied argument, suitable for use with `Array.filter`. Example: - -```javascript -var javascripts = fileList.filter(minimatch.filter('*.js', { matchBase: true })) -``` - -### minimatch.escape(pattern, options = {}) - -Escape all magic characters in a glob pattern, so that it will -only ever match literal strings - -If the `windowsPathsNoEscape` option is used, then characters are -escaped by wrapping in `[]`, because a magic character wrapped in -a character class can only be satisfied by that exact character. - -Slashes (and backslashes in `windowsPathsNoEscape` mode) cannot -be escaped or unescaped. - -### minimatch.unescape(pattern, options = {}) - -Un-escape a glob string that may contain some escaped characters. - -If the `windowsPathsNoEscape` option is used, then square-brace -escapes are removed, but not backslash escapes. For example, it -will turn the string `'[*]'` into `*`, but it will not turn -`'\\*'` into `'*'`, because `\` is a path separator in -`windowsPathsNoEscape` mode. - -When `windowsPathsNoEscape` is not set, then both brace escapes -and backslash escapes are removed. - -Slashes (and backslashes in `windowsPathsNoEscape` mode) cannot -be escaped or unescaped. - -### minimatch.match(list, pattern, options) - -Match against the list of -files, in the style of fnmatch or glob. If nothing is matched, and -options.nonull is set, then return a list containing the pattern itself. - -```javascript -var javascripts = minimatch.match(fileList, '*.js', { matchBase: true }) -``` - -### minimatch.makeRe(pattern, options) - -Make a regular expression object from the pattern. - -## Options - -All options are `false` by default. - -### debug - -Dump a ton of stuff to stderr. - -### nobrace - -Do not expand `{a,b}` and `{1..3}` brace sets. - -### noglobstar - -Disable `**` matching against multiple folder names. - -### dot - -Allow patterns to match filenames starting with a period, even if -the pattern does not explicitly have a period in that spot. - -Note that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot` -is set. - -### noext - -Disable "extglob" style patterns like `+(a|b)`. - -### nocase - -Perform a case-insensitive match. - -### nocaseMagicOnly - -When used with `{nocase: true}`, create regular expressions that -are case-insensitive, but leave string match portions untouched. -Has no effect when used without `{nocase: true}` - -Useful when some other form of case-insensitive matching is used, -or if the original string representation is useful in some other -way. - -### nonull - -When a match is not found by `minimatch.match`, return a list containing -the pattern itself if this option is set. When not set, an empty list -is returned if there are no matches. - -### magicalBraces - -This only affects the results of the `Minimatch.hasMagic` method. - -If the pattern contains brace expansions, such as `a{b,c}d`, but -no other magic characters, then the `Minimatch.hasMagic()` method -will return `false` by default. When this option set, it will -return `true` for brace expansion as well as other magic glob -characters. - -### matchBase - -If set, then patterns without slashes will be matched -against the basename of the path if it contains slashes. For example, -`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`. - -### nocomment - -Suppress the behavior of treating `#` at the start of a pattern as a -comment. - -### nonegate - -Suppress the behavior of treating a leading `!` character as negation. - -### flipNegate - -Returns from negate expressions the same as if they were not negated. -(Ie, true on a hit, false on a miss.) - -### partial - -Compare a partial path to a pattern. As long as the parts of the path that -are present are not contradicted by the pattern, it will be treated as a -match. This is useful in applications where you're walking through a -folder structure, and don't yet have the full path, but want to ensure that -you do not walk down paths that can never be a match. - -For example, - -```js -minimatch('/a/b', '/a/*/c/d', { partial: true }) // true, might be /a/b/c/d -minimatch('/a/b', '/**/d', { partial: true }) // true, might be /a/b/.../d -minimatch('/x/y/z', '/a/**/z', { partial: true }) // false, because x !== a -``` - -### windowsPathsNoEscape - -Use `\\` as a path separator _only_, and _never_ as an escape -character. If set, all `\\` characters are replaced with `/` in -the pattern. Note that this makes it **impossible** to match -against paths containing literal glob pattern characters, but -allows matching with patterns constructed using `path.join()` and -`path.resolve()` on Windows platforms, mimicking the (buggy!) -behavior of earlier versions on Windows. Please use with -caution, and be mindful of [the caveat about Windows -paths](#windows). - -For legacy reasons, this is also set if -`options.allowWindowsEscape` is set to the exact value `false`. - -### windowsNoMagicRoot - -When a pattern starts with a UNC path or drive letter, and in -`nocase:true` mode, do not convert the root portions of the -pattern into a case-insensitive regular expression, and instead -leave them as strings. - -This is the default when the platform is `win32` and -`nocase:true` is set. - -### preserveMultipleSlashes - -By default, multiple `/` characters (other than the leading `//` -in a UNC path, see "UNC Paths" above) are treated as a single -`/`. - -That is, a pattern like `a///b` will match the file path `a/b`. - -Set `preserveMultipleSlashes: true` to suppress this behavior. - -### optimizationLevel - -A number indicating the level of optimization that should be done -to the pattern prior to parsing and using it for matches. - -Globstar parts `**` are always converted to `*` when `noglobstar` -is set, and multiple adjacent `**` parts are converted into a -single `**` (ie, `a/**/**/b` will be treated as `a/**/b`, as this -is equivalent in all cases). - -- `0` - Make no further changes. In this mode, `.` and `..` are - maintained in the pattern, meaning that they must also appear - in the same position in the test path string. Eg, a pattern - like `a/*/../c` will match the string `a/b/../c` but not the - string `a/c`. -- `1` - (default) Remove cases where a double-dot `..` follows a - pattern portion that is not `**`, `.`, `..`, or empty `''`. For - example, the pattern `./a/b/../*` is converted to `./a/*`, and - so it will match the path string `./a/c`, but not the path - string `./a/b/../c`. Dots and empty path portions in the - pattern are preserved. -- `2` (or higher) - Much more aggressive optimizations, suitable - for use with file-walking cases: - - - Remove cases where a double-dot `..` follows a pattern - portion that is not `**`, `.`, or empty `''`. Remove empty - and `.` portions of the pattern, where safe to do so (ie, - anywhere other than the last position, the first position, or - the second position in a pattern starting with `/`, as this - may indicate a UNC path on Windows). - - Convert patterns containing `
              /**/../

              /` into the - equivalent `

              /{..,**}/

              /`, where `

              ` is a - a pattern portion other than `.`, `..`, `**`, or empty - `''`. - - Dedupe patterns where a `**` portion is present in one and - omitted in another, and it is not the final path portion, and - they are otherwise equivalent. So `{a/**/b,a/b}` becomes - `a/**/b`, because `**` matches against an empty path portion. - - Dedupe patterns where a `*` portion is present in one, and a - non-dot pattern other than `**`, `.`, `..`, or `''` is in the - same position in the other. So `a/{*,x}/b` becomes `a/*/b`, - because `*` can match against `x`. - - While these optimizations improve the performance of - file-walking use cases such as [glob](http://npm.im/glob) (ie, - the reason this module exists), there are cases where it will - fail to match a literal string that would have been matched in - optimization level 1 or 0. - - Specifically, while the `Minimatch.match()` method will - optimize the file path string in the same ways, resulting in - the same matches, it will fail when tested with the regular - expression provided by `Minimatch.makeRe()`, unless the path - string is first processed with - `minimatch.levelTwoFileOptimize()` or similar. - -### platform - -When set to `win32`, this will trigger all windows-specific -behaviors (special handling for UNC paths, and treating `\` as -separators in file paths for comparison.) - -Defaults to the value of `process.platform`. - -## Comparisons to other fnmatch/glob implementations - -While strict compliance with the existing standards is a -worthwhile goal, some discrepancies exist between minimatch and -other implementations. Some are intentional, and some are -unavoidable. - -If the pattern starts with a `!` character, then it is negated. Set the -`nonegate` flag to suppress this behavior, and treat leading `!` -characters normally. This is perhaps relevant if you wish to start the -pattern with a negative extglob pattern like `!(a|B)`. Multiple `!` -characters at the start of a pattern will negate the pattern multiple -times. - -If a pattern starts with `#`, then it is treated as a comment, and -will not match anything. Use `\#` to match a literal `#` at the -start of a line, or set the `nocomment` flag to suppress this behavior. - -The double-star character `**` is supported by default, unless the -`noglobstar` flag is set. This is supported in the manner of bsdglob -and bash 4.1, where `**` only has special significance if it is the only -thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but -`a/**b` will not. - -If an escaped pattern has no matches, and the `nonull` flag is set, -then minimatch.match returns the pattern as-provided, rather than -interpreting the character escapes. For example, -`minimatch.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than -`"*a?"`. This is akin to setting the `nullglob` option in bash, except -that it does not resolve escaped pattern characters. - -If brace expansion is not disabled, then it is performed before any -other interpretation of the glob pattern. Thus, a pattern like -`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded -**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are -checked for validity. Since those two are valid, matching proceeds. - -Negated extglob patterns are handled as closely as possible to -Bash semantics, but there are some cases with negative extglobs -which are exceedingly difficult to express in a JavaScript -regular expression. In particular the negated pattern -`!(*|)*` will in bash match anything that does -not start with ``. However, -`!(*)*` _will_ match paths starting with -``, because the empty string can match against -the negated portion. In this library, `!(*|)*` -will _not_ match any pattern starting with ``, due to a -difference in precisely which patterns are considered "greedy" in -Regular Expressions vs bash path expansion. This may be fixable, -but not without incurring some complexity and performance costs, -and the trade-off seems to not be worth pursuing. - -Note that `fnmatch(3)` in libc is an extremely naive string comparison -matcher, which does not do anything special for slashes. This library is -designed to be used in glob searching and file walkers, and so it does do -special things with `/`. Thus, `foo*` will not match `foo/bar` in this -library, even though it would in `fnmatch(3)`. diff --git a/node_modules/mocha/node_modules/minimatch/dist/commonjs/assert-valid-pattern.d.ts b/node_modules/mocha/node_modules/minimatch/dist/commonjs/assert-valid-pattern.d.ts deleted file mode 100644 index 8e318b23..00000000 --- a/node_modules/mocha/node_modules/minimatch/dist/commonjs/assert-valid-pattern.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export declare const assertValidPattern: (pattern: any) => void; -//# sourceMappingURL=assert-valid-pattern.d.ts.map \ No newline at end of file diff --git a/node_modules/mocha/node_modules/minimatch/dist/commonjs/assert-valid-pattern.d.ts.map b/node_modules/mocha/node_modules/minimatch/dist/commonjs/assert-valid-pattern.d.ts.map deleted file mode 100644 index c61c0310..00000000 --- a/node_modules/mocha/node_modules/minimatch/dist/commonjs/assert-valid-pattern.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"assert-valid-pattern.d.ts","sourceRoot":"","sources":["../../src/assert-valid-pattern.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,kBAAkB,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,IAUlD,CAAA"} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js b/node_modules/mocha/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js deleted file mode 100644 index 5fc86bbd..00000000 --- a/node_modules/mocha/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.assertValidPattern = void 0; -const MAX_PATTERN_LENGTH = 1024 * 64; -const assertValidPattern = (pattern) => { - if (typeof pattern !== 'string') { - throw new TypeError('invalid pattern'); - } - if (pattern.length > MAX_PATTERN_LENGTH) { - throw new TypeError('pattern is too long'); - } -}; -exports.assertValidPattern = assertValidPattern; -//# sourceMappingURL=assert-valid-pattern.js.map \ No newline at end of file diff --git a/node_modules/mocha/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js.map b/node_modules/mocha/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js.map deleted file mode 100644 index d43215c6..00000000 --- a/node_modules/mocha/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"assert-valid-pattern.js","sourceRoot":"","sources":["../../src/assert-valid-pattern.ts"],"names":[],"mappings":";;;AAAA,MAAM,kBAAkB,GAAG,IAAI,GAAG,EAAE,CAAA;AAC7B,MAAM,kBAAkB,GAA2B,CACxD,OAAY,EACe,EAAE;IAC7B,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE;QAC/B,MAAM,IAAI,SAAS,CAAC,iBAAiB,CAAC,CAAA;KACvC;IAED,IAAI,OAAO,CAAC,MAAM,GAAG,kBAAkB,EAAE;QACvC,MAAM,IAAI,SAAS,CAAC,qBAAqB,CAAC,CAAA;KAC3C;AACH,CAAC,CAAA;AAVY,QAAA,kBAAkB,sBAU9B","sourcesContent":["const MAX_PATTERN_LENGTH = 1024 * 64\nexport const assertValidPattern: (pattern: any) => void = (\n pattern: any\n): asserts pattern is string => {\n if (typeof pattern !== 'string') {\n throw new TypeError('invalid pattern')\n }\n\n if (pattern.length > MAX_PATTERN_LENGTH) {\n throw new TypeError('pattern is too long')\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/minimatch/dist/commonjs/ast.d.ts b/node_modules/mocha/node_modules/minimatch/dist/commonjs/ast.d.ts deleted file mode 100644 index b8c1e544..00000000 --- a/node_modules/mocha/node_modules/minimatch/dist/commonjs/ast.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { MinimatchOptions, MMRegExp } from './index.js'; -export type ExtglobType = '!' | '?' | '+' | '*' | '@'; -export declare class AST { - #private; - type: ExtglobType | null; - constructor(type: ExtglobType | null, parent?: AST, options?: MinimatchOptions); - get hasMagic(): boolean | undefined; - toString(): string; - push(...parts: (string | AST)[]): void; - toJSON(): any[]; - isStart(): boolean; - isEnd(): boolean; - copyIn(part: AST | string): void; - clone(parent: AST): AST; - static fromGlob(pattern: string, options?: MinimatchOptions): AST; - toMMPattern(): MMRegExp | string; - get options(): MinimatchOptions; - toRegExpSource(allowDot?: boolean): [re: string, body: string, hasMagic: boolean, uflag: boolean]; -} -//# sourceMappingURL=ast.d.ts.map \ No newline at end of file diff --git a/node_modules/mocha/node_modules/minimatch/dist/commonjs/ast.d.ts.map b/node_modules/mocha/node_modules/minimatch/dist/commonjs/ast.d.ts.map deleted file mode 100644 index 9e7bfb9a..00000000 --- a/node_modules/mocha/node_modules/minimatch/dist/commonjs/ast.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ast.d.ts","sourceRoot":"","sources":["../../src/ast.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAwCvD,MAAM,MAAM,WAAW,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAA;AAkCrD,qBAAa,GAAG;;IACd,IAAI,EAAE,WAAW,GAAG,IAAI,CAAA;gBAiBtB,IAAI,EAAE,WAAW,GAAG,IAAI,EACxB,MAAM,CAAC,EAAE,GAAG,EACZ,OAAO,GAAE,gBAAqB;IAahC,IAAI,QAAQ,IAAI,OAAO,GAAG,SAAS,CAUlC;IAGD,QAAQ,IAAI,MAAM;IA+ClB,IAAI,CAAC,GAAG,KAAK,EAAE,CAAC,MAAM,GAAG,GAAG,CAAC,EAAE;IAY/B,MAAM;IAgBN,OAAO,IAAI,OAAO;IAgBlB,KAAK,IAAI,OAAO;IAYhB,MAAM,CAAC,IAAI,EAAE,GAAG,GAAG,MAAM;IAKzB,KAAK,CAAC,MAAM,EAAE,GAAG;IAsIjB,MAAM,CAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,GAAE,gBAAqB;IAQ/D,WAAW,IAAI,QAAQ,GAAG,MAAM;IA2BhC,IAAI,OAAO,qBAEV;IAuED,cAAc,CACZ,QAAQ,CAAC,EAAE,OAAO,GACjB,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC;CAiMjE"} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/minimatch/dist/commonjs/ast.js b/node_modules/mocha/node_modules/minimatch/dist/commonjs/ast.js deleted file mode 100644 index 7b210962..00000000 --- a/node_modules/mocha/node_modules/minimatch/dist/commonjs/ast.js +++ /dev/null @@ -1,592 +0,0 @@ -"use strict"; -// parse a single path portion -Object.defineProperty(exports, "__esModule", { value: true }); -exports.AST = void 0; -const brace_expressions_js_1 = require("./brace-expressions.js"); -const unescape_js_1 = require("./unescape.js"); -const types = new Set(['!', '?', '+', '*', '@']); -const isExtglobType = (c) => types.has(c); -// Patterns that get prepended to bind to the start of either the -// entire string, or just a single path portion, to prevent dots -// and/or traversal patterns, when needed. -// Exts don't need the ^ or / bit, because the root binds that already. -const startNoTraversal = '(?!(?:^|/)\\.\\.?(?:$|/))'; -const startNoDot = '(?!\\.)'; -// characters that indicate a start of pattern needs the "no dots" bit, -// because a dot *might* be matched. ( is not in the list, because in -// the case of a child extglob, it will handle the prevention itself. -const addPatternStart = new Set(['[', '.']); -// cases where traversal is A-OK, no dot prevention needed -const justDots = new Set(['..', '.']); -const reSpecials = new Set('().*{}+?[]^$\\!'); -const regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&'); -// any single thing other than / -const qmark = '[^/]'; -// * => any number of characters -const star = qmark + '*?'; -// use + when we need to ensure that *something* matches, because the * is -// the only thing in the path portion. -const starNoEmpty = qmark + '+?'; -// remove the \ chars that we added if we end up doing a nonmagic compare -// const deslash = (s: string) => s.replace(/\\(.)/g, '$1') -class AST { - type; - #root; - #hasMagic; - #uflag = false; - #parts = []; - #parent; - #parentIndex; - #negs; - #filledNegs = false; - #options; - #toString; - // set to true if it's an extglob with no children - // (which really means one child of '') - #emptyExt = false; - constructor(type, parent, options = {}) { - this.type = type; - // extglobs are inherently magical - if (type) - this.#hasMagic = true; - this.#parent = parent; - this.#root = this.#parent ? this.#parent.#root : this; - this.#options = this.#root === this ? options : this.#root.#options; - this.#negs = this.#root === this ? [] : this.#root.#negs; - if (type === '!' && !this.#root.#filledNegs) - this.#negs.push(this); - this.#parentIndex = this.#parent ? this.#parent.#parts.length : 0; - } - get hasMagic() { - /* c8 ignore start */ - if (this.#hasMagic !== undefined) - return this.#hasMagic; - /* c8 ignore stop */ - for (const p of this.#parts) { - if (typeof p === 'string') - continue; - if (p.type || p.hasMagic) - return (this.#hasMagic = true); - } - // note: will be undefined until we generate the regexp src and find out - return this.#hasMagic; - } - // reconstructs the pattern - toString() { - if (this.#toString !== undefined) - return this.#toString; - if (!this.type) { - return (this.#toString = this.#parts.map(p => String(p)).join('')); - } - else { - return (this.#toString = - this.type + '(' + this.#parts.map(p => String(p)).join('|') + ')'); - } - } - #fillNegs() { - /* c8 ignore start */ - if (this !== this.#root) - throw new Error('should only call on root'); - if (this.#filledNegs) - return this; - /* c8 ignore stop */ - // call toString() once to fill this out - this.toString(); - this.#filledNegs = true; - let n; - while ((n = this.#negs.pop())) { - if (n.type !== '!') - continue; - // walk up the tree, appending everthing that comes AFTER parentIndex - let p = n; - let pp = p.#parent; - while (pp) { - for (let i = p.#parentIndex + 1; !pp.type && i < pp.#parts.length; i++) { - for (const part of n.#parts) { - /* c8 ignore start */ - if (typeof part === 'string') { - throw new Error('string part in extglob AST??'); - } - /* c8 ignore stop */ - part.copyIn(pp.#parts[i]); - } - } - p = pp; - pp = p.#parent; - } - } - return this; - } - push(...parts) { - for (const p of parts) { - if (p === '') - continue; - /* c8 ignore start */ - if (typeof p !== 'string' && !(p instanceof AST && p.#parent === this)) { - throw new Error('invalid part: ' + p); - } - /* c8 ignore stop */ - this.#parts.push(p); - } - } - toJSON() { - const ret = this.type === null - ? this.#parts.slice().map(p => (typeof p === 'string' ? p : p.toJSON())) - : [this.type, ...this.#parts.map(p => p.toJSON())]; - if (this.isStart() && !this.type) - ret.unshift([]); - if (this.isEnd() && - (this === this.#root || - (this.#root.#filledNegs && this.#parent?.type === '!'))) { - ret.push({}); - } - return ret; - } - isStart() { - if (this.#root === this) - return true; - // if (this.type) return !!this.#parent?.isStart() - if (!this.#parent?.isStart()) - return false; - if (this.#parentIndex === 0) - return true; - // if everything AHEAD of this is a negation, then it's still the "start" - const p = this.#parent; - for (let i = 0; i < this.#parentIndex; i++) { - const pp = p.#parts[i]; - if (!(pp instanceof AST && pp.type === '!')) { - return false; - } - } - return true; - } - isEnd() { - if (this.#root === this) - return true; - if (this.#parent?.type === '!') - return true; - if (!this.#parent?.isEnd()) - return false; - if (!this.type) - return this.#parent?.isEnd(); - // if not root, it'll always have a parent - /* c8 ignore start */ - const pl = this.#parent ? this.#parent.#parts.length : 0; - /* c8 ignore stop */ - return this.#parentIndex === pl - 1; - } - copyIn(part) { - if (typeof part === 'string') - this.push(part); - else - this.push(part.clone(this)); - } - clone(parent) { - const c = new AST(this.type, parent); - for (const p of this.#parts) { - c.copyIn(p); - } - return c; - } - static #parseAST(str, ast, pos, opt) { - let escaping = false; - let inBrace = false; - let braceStart = -1; - let braceNeg = false; - if (ast.type === null) { - // outside of a extglob, append until we find a start - let i = pos; - let acc = ''; - while (i < str.length) { - const c = str.charAt(i++); - // still accumulate escapes at this point, but we do ignore - // starts that are escaped - if (escaping || c === '\\') { - escaping = !escaping; - acc += c; - continue; - } - if (inBrace) { - if (i === braceStart + 1) { - if (c === '^' || c === '!') { - braceNeg = true; - } - } - else if (c === ']' && !(i === braceStart + 2 && braceNeg)) { - inBrace = false; - } - acc += c; - continue; - } - else if (c === '[') { - inBrace = true; - braceStart = i; - braceNeg = false; - acc += c; - continue; - } - if (!opt.noext && isExtglobType(c) && str.charAt(i) === '(') { - ast.push(acc); - acc = ''; - const ext = new AST(c, ast); - i = AST.#parseAST(str, ext, i, opt); - ast.push(ext); - continue; - } - acc += c; - } - ast.push(acc); - return i; - } - // some kind of extglob, pos is at the ( - // find the next | or ) - let i = pos + 1; - let part = new AST(null, ast); - const parts = []; - let acc = ''; - while (i < str.length) { - const c = str.charAt(i++); - // still accumulate escapes at this point, but we do ignore - // starts that are escaped - if (escaping || c === '\\') { - escaping = !escaping; - acc += c; - continue; - } - if (inBrace) { - if (i === braceStart + 1) { - if (c === '^' || c === '!') { - braceNeg = true; - } - } - else if (c === ']' && !(i === braceStart + 2 && braceNeg)) { - inBrace = false; - } - acc += c; - continue; - } - else if (c === '[') { - inBrace = true; - braceStart = i; - braceNeg = false; - acc += c; - continue; - } - if (isExtglobType(c) && str.charAt(i) === '(') { - part.push(acc); - acc = ''; - const ext = new AST(c, part); - part.push(ext); - i = AST.#parseAST(str, ext, i, opt); - continue; - } - if (c === '|') { - part.push(acc); - acc = ''; - parts.push(part); - part = new AST(null, ast); - continue; - } - if (c === ')') { - if (acc === '' && ast.#parts.length === 0) { - ast.#emptyExt = true; - } - part.push(acc); - acc = ''; - ast.push(...parts, part); - return i; - } - acc += c; - } - // unfinished extglob - // if we got here, it was a malformed extglob! not an extglob, but - // maybe something else in there. - ast.type = null; - ast.#hasMagic = undefined; - ast.#parts = [str.substring(pos - 1)]; - return i; - } - static fromGlob(pattern, options = {}) { - const ast = new AST(null, undefined, options); - AST.#parseAST(pattern, ast, 0, options); - return ast; - } - // returns the regular expression if there's magic, or the unescaped - // string if not. - toMMPattern() { - // should only be called on root - /* c8 ignore start */ - if (this !== this.#root) - return this.#root.toMMPattern(); - /* c8 ignore stop */ - const glob = this.toString(); - const [re, body, hasMagic, uflag] = this.toRegExpSource(); - // if we're in nocase mode, and not nocaseMagicOnly, then we do - // still need a regular expression if we have to case-insensitively - // match capital/lowercase characters. - const anyMagic = hasMagic || - this.#hasMagic || - (this.#options.nocase && - !this.#options.nocaseMagicOnly && - glob.toUpperCase() !== glob.toLowerCase()); - if (!anyMagic) { - return body; - } - const flags = (this.#options.nocase ? 'i' : '') + (uflag ? 'u' : ''); - return Object.assign(new RegExp(`^${re}$`, flags), { - _src: re, - _glob: glob, - }); - } - get options() { - return this.#options; - } - // returns the string match, the regexp source, whether there's magic - // in the regexp (so a regular expression is required) and whether or - // not the uflag is needed for the regular expression (for posix classes) - // TODO: instead of injecting the start/end at this point, just return - // the BODY of the regexp, along with the start/end portions suitable - // for binding the start/end in either a joined full-path makeRe context - // (where we bind to (^|/), or a standalone matchPart context (where - // we bind to ^, and not /). Otherwise slashes get duped! - // - // In part-matching mode, the start is: - // - if not isStart: nothing - // - if traversal possible, but not allowed: ^(?!\.\.?$) - // - if dots allowed or not possible: ^ - // - if dots possible and not allowed: ^(?!\.) - // end is: - // - if not isEnd(): nothing - // - else: $ - // - // In full-path matching mode, we put the slash at the START of the - // pattern, so start is: - // - if first pattern: same as part-matching mode - // - if not isStart(): nothing - // - if traversal possible, but not allowed: /(?!\.\.?(?:$|/)) - // - if dots allowed or not possible: / - // - if dots possible and not allowed: /(?!\.) - // end is: - // - if last pattern, same as part-matching mode - // - else nothing - // - // Always put the (?:$|/) on negated tails, though, because that has to be - // there to bind the end of the negated pattern portion, and it's easier to - // just stick it in now rather than try to inject it later in the middle of - // the pattern. - // - // We can just always return the same end, and leave it up to the caller - // to know whether it's going to be used joined or in parts. - // And, if the start is adjusted slightly, can do the same there: - // - if not isStart: nothing - // - if traversal possible, but not allowed: (?:/|^)(?!\.\.?$) - // - if dots allowed or not possible: (?:/|^) - // - if dots possible and not allowed: (?:/|^)(?!\.) - // - // But it's better to have a simpler binding without a conditional, for - // performance, so probably better to return both start options. - // - // Then the caller just ignores the end if it's not the first pattern, - // and the start always gets applied. - // - // But that's always going to be $ if it's the ending pattern, or nothing, - // so the caller can just attach $ at the end of the pattern when building. - // - // So the todo is: - // - better detect what kind of start is needed - // - return both flavors of starting pattern - // - attach $ at the end of the pattern when creating the actual RegExp - // - // Ah, but wait, no, that all only applies to the root when the first pattern - // is not an extglob. If the first pattern IS an extglob, then we need all - // that dot prevention biz to live in the extglob portions, because eg - // +(*|.x*) can match .xy but not .yx. - // - // So, return the two flavors if it's #root and the first child is not an - // AST, otherwise leave it to the child AST to handle it, and there, - // use the (?:^|/) style of start binding. - // - // Even simplified further: - // - Since the start for a join is eg /(?!\.) and the start for a part - // is ^(?!\.), we can just prepend (?!\.) to the pattern (either root - // or start or whatever) and prepend ^ or / at the Regexp construction. - toRegExpSource(allowDot) { - const dot = allowDot ?? !!this.#options.dot; - if (this.#root === this) - this.#fillNegs(); - if (!this.type) { - const noEmpty = this.isStart() && this.isEnd(); - const src = this.#parts - .map(p => { - const [re, _, hasMagic, uflag] = typeof p === 'string' - ? AST.#parseGlob(p, this.#hasMagic, noEmpty) - : p.toRegExpSource(allowDot); - this.#hasMagic = this.#hasMagic || hasMagic; - this.#uflag = this.#uflag || uflag; - return re; - }) - .join(''); - let start = ''; - if (this.isStart()) { - if (typeof this.#parts[0] === 'string') { - // this is the string that will match the start of the pattern, - // so we need to protect against dots and such. - // '.' and '..' cannot match unless the pattern is that exactly, - // even if it starts with . or dot:true is set. - const dotTravAllowed = this.#parts.length === 1 && justDots.has(this.#parts[0]); - if (!dotTravAllowed) { - const aps = addPatternStart; - // check if we have a possibility of matching . or .., - // and prevent that. - const needNoTrav = - // dots are allowed, and the pattern starts with [ or . - (dot && aps.has(src.charAt(0))) || - // the pattern starts with \., and then [ or . - (src.startsWith('\\.') && aps.has(src.charAt(2))) || - // the pattern starts with \.\., and then [ or . - (src.startsWith('\\.\\.') && aps.has(src.charAt(4))); - // no need to prevent dots if it can't match a dot, or if a - // sub-pattern will be preventing it anyway. - const needNoDot = !dot && !allowDot && aps.has(src.charAt(0)); - start = needNoTrav ? startNoTraversal : needNoDot ? startNoDot : ''; - } - } - } - // append the "end of path portion" pattern to negation tails - let end = ''; - if (this.isEnd() && - this.#root.#filledNegs && - this.#parent?.type === '!') { - end = '(?:$|\\/)'; - } - const final = start + src + end; - return [ - final, - (0, unescape_js_1.unescape)(src), - (this.#hasMagic = !!this.#hasMagic), - this.#uflag, - ]; - } - // We need to calculate the body *twice* if it's a repeat pattern - // at the start, once in nodot mode, then again in dot mode, so a - // pattern like *(?) can match 'x.y' - const repeated = this.type === '*' || this.type === '+'; - // some kind of extglob - const start = this.type === '!' ? '(?:(?!(?:' : '(?:'; - let body = this.#partsToRegExp(dot); - if (this.isStart() && this.isEnd() && !body && this.type !== '!') { - // invalid extglob, has to at least be *something* present, if it's - // the entire path portion. - const s = this.toString(); - this.#parts = [s]; - this.type = null; - this.#hasMagic = undefined; - return [s, (0, unescape_js_1.unescape)(this.toString()), false, false]; - } - // XXX abstract out this map method - let bodyDotAllowed = !repeated || allowDot || dot || !startNoDot - ? '' - : this.#partsToRegExp(true); - if (bodyDotAllowed === body) { - bodyDotAllowed = ''; - } - if (bodyDotAllowed) { - body = `(?:${body})(?:${bodyDotAllowed})*?`; - } - // an empty !() is exactly equivalent to a starNoEmpty - let final = ''; - if (this.type === '!' && this.#emptyExt) { - final = (this.isStart() && !dot ? startNoDot : '') + starNoEmpty; - } - else { - const close = this.type === '!' - ? // !() must match something,but !(x) can match '' - '))' + - (this.isStart() && !dot && !allowDot ? startNoDot : '') + - star + - ')' - : this.type === '@' - ? ')' - : this.type === '?' - ? ')?' - : this.type === '+' && bodyDotAllowed - ? ')' - : this.type === '*' && bodyDotAllowed - ? `)?` - : `)${this.type}`; - final = start + body + close; - } - return [ - final, - (0, unescape_js_1.unescape)(body), - (this.#hasMagic = !!this.#hasMagic), - this.#uflag, - ]; - } - #partsToRegExp(dot) { - return this.#parts - .map(p => { - // extglob ASTs should only contain parent ASTs - /* c8 ignore start */ - if (typeof p === 'string') { - throw new Error('string type in extglob ast??'); - } - /* c8 ignore stop */ - // can ignore hasMagic, because extglobs are already always magic - const [re, _, _hasMagic, uflag] = p.toRegExpSource(dot); - this.#uflag = this.#uflag || uflag; - return re; - }) - .filter(p => !(this.isStart() && this.isEnd()) || !!p) - .join('|'); - } - static #parseGlob(glob, hasMagic, noEmpty = false) { - let escaping = false; - let re = ''; - let uflag = false; - for (let i = 0; i < glob.length; i++) { - const c = glob.charAt(i); - if (escaping) { - escaping = false; - re += (reSpecials.has(c) ? '\\' : '') + c; - continue; - } - if (c === '\\') { - if (i === glob.length - 1) { - re += '\\\\'; - } - else { - escaping = true; - } - continue; - } - if (c === '[') { - const [src, needUflag, consumed, magic] = (0, brace_expressions_js_1.parseClass)(glob, i); - if (consumed) { - re += src; - uflag = uflag || needUflag; - i += consumed - 1; - hasMagic = hasMagic || magic; - continue; - } - } - if (c === '*') { - if (noEmpty && glob === '*') - re += starNoEmpty; - else - re += star; - hasMagic = true; - continue; - } - if (c === '?') { - re += qmark; - hasMagic = true; - continue; - } - re += regExpEscape(c); - } - return [re, (0, unescape_js_1.unescape)(glob), !!hasMagic, uflag]; - } -} -exports.AST = AST; -//# sourceMappingURL=ast.js.map \ No newline at end of file diff --git a/node_modules/mocha/node_modules/minimatch/dist/commonjs/ast.js.map b/node_modules/mocha/node_modules/minimatch/dist/commonjs/ast.js.map deleted file mode 100644 index 8383e433..00000000 --- a/node_modules/mocha/node_modules/minimatch/dist/commonjs/ast.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ast.js","sourceRoot":"","sources":["../../src/ast.ts"],"names":[],"mappings":";AAAA,8BAA8B;;;AAE9B,iEAAmD;AAEnD,+CAAwC;AAwCxC,MAAM,KAAK,GAAG,IAAI,GAAG,CAAc,CAAC,GAAG,EAAE,GAAG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qBAAM;oBACL,QAAQ,GAAG,IAAI,CAAA;iBAChB;gBACD,SAAQ;aACT;YACD,IAAI,CAAC,KAAK,GAAG,EAAE;gBACb,MAAM,CAAC,GAAG,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,CAAC,GAAG,IAAA,iCAAU,EAAC,IAAI,EAAE,CAAC,CAAC,CAAA;gBAC7D,IAAI,QAAQ,EAAE;oBACZ,EAAE,IAAI,GAAG,CAAA;oBACT,KAAK,GAAG,KAAK,IAAI,SAAS,CAAA;oBAC1B,CAAC,IAAI,QAAQ,GAAG,CAAC,CAAA;oBACjB,QAAQ,GAAG,QAAQ,IAAI,KAAK,CAAA;oBAC5B,SAAQ;iBACT;aACF;YACD,IAAI,CAAC,KAAK,GAAG,EAAE;gBACb,IAAI,OAAO,IAAI,IAAI,KAAK,GAAG;oBAAE,EAAE,IAAI,WAAW,CAAA;;oBACzC,EAAE,IAAI,IAAI,CAAA;gBACf,QAAQ,GAAG,IAAI,CAAA;gBACf,SAAQ;aACT;YACD,IAAI,CAAC,KAAK,GAAG,EAAE;gBACb,EAAE,IAAI,KAAK,CAAA;gBACX,QAAQ,GAAG,IAAI,CAAA;gBACf,SAAQ;aACT;YACD,EAAE,IAAI,YAAY,CAAC,CAAC,CAAC,CAAA;SACtB;QACD,OAAO,CAAC,EAAE,EAAE,IAAA,sBAAQ,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAA;IAChD,CAAC;CACF;AA/kBD,kBA+kBC","sourcesContent":["// parse a single path portion\n\nimport { parseClass } from './brace-expressions.js'\nimport { MinimatchOptions, MMRegExp } from './index.js'\nimport { unescape } from './unescape.js'\n\n// classes [] are handled by the parseClass method\n// for positive extglobs, we sub-parse the contents, and combine,\n// with the appropriate regexp close.\n// for negative extglobs, we sub-parse the contents, but then\n// have to include the rest of the pattern, then the parent, etc.,\n// as the thing that cannot be because RegExp negative lookaheads\n// are different from globs.\n//\n// So for example:\n// a@(i|w!(x|y)z|j)b => ^a(i|w((!?(x|y)zb).*)z|j)b$\n// 1 2 3 4 5 6 1 2 3 46 5 6\n//\n// Assembling the extglob requires not just the negated patterns themselves,\n// but also anything following the negative patterns up to the boundary\n// of the current pattern, plus anything following in the parent pattern.\n//\n//\n// So, first, we parse the string into an AST of extglobs, without turning\n// anything into regexps yet.\n//\n// ['a', {@ [['i'], ['w', {!['x', 'y']}, 'z'], ['j']]}, 'b']\n//\n// Then, for all the negative extglobs, we append whatever comes after in\n// each parent as their tail\n//\n// ['a', {@ [['i'], ['w', {!['x', 'y'], 'z', 'b'}, 'z'], ['j']]}, 'b']\n//\n// Lastly, we turn each of these pieces into a regexp, and join\n//\n// v----- .* because there's more following,\n// v v otherwise, .+ because it must be\n// v v *something* there.\n// ['^a', {@ ['i', 'w(?:(!?(?:x|y).*zb$).*)z', 'j' ]}, 'b$']\n// copy what follows into here--^^^^^\n// ['^a', '(?:i|w(?:(?!(?:x|y).*zb$).*)z|j)', 'b$']\n// ['^a(?:i|w(?:(?!(?:x|y).*zb$).*)z|j)b$']\n\nexport type ExtglobType = '!' | '?' | '+' | '*' | '@'\nconst types = new Set(['!', '?', '+', '*', '@'])\nconst isExtglobType = (c: string): c is ExtglobType =>\n types.has(c as ExtglobType)\n\n// Patterns that get prepended to bind to the start of either the\n// entire string, or just a single path portion, to prevent dots\n// and/or traversal patterns, when needed.\n// Exts don't need the ^ or / bit, because the root binds that already.\nconst startNoTraversal = '(?!(?:^|/)\\\\.\\\\.?(?:$|/))'\nconst startNoDot = '(?!\\\\.)'\n\n// characters that indicate a start of pattern needs the \"no dots\" bit,\n// because a dot *might* be matched. ( is not in the list, because in\n// the case of a child extglob, it will handle the prevention itself.\nconst addPatternStart = new Set(['[', '.'])\n// cases where traversal is A-OK, no dot prevention needed\nconst justDots = new Set(['..', '.'])\nconst reSpecials = new Set('().*{}+?[]^$\\\\!')\nconst regExpEscape = (s: string) =>\n s.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&')\n\n// any single thing other than /\nconst qmark = '[^/]'\n\n// * => any number of characters\nconst star = qmark + '*?'\n// use + when we need to ensure that *something* matches, because the * is\n// the only thing in the path portion.\nconst starNoEmpty = qmark + '+?'\n\n// remove the \\ chars that we added if we end up doing a nonmagic compare\n// const deslash = (s: string) => s.replace(/\\\\(.)/g, '$1')\n\nexport class AST {\n type: ExtglobType | null\n readonly #root: AST\n\n #hasMagic?: boolean\n #uflag: boolean = false\n #parts: (string | AST)[] = []\n readonly #parent?: AST\n readonly #parentIndex: number\n #negs: AST[]\n #filledNegs: boolean = false\n #options: MinimatchOptions\n #toString?: string\n // set to true if it's an extglob with no children\n // (which really means one child of '')\n #emptyExt: boolean = false\n\n constructor(\n type: ExtglobType | null,\n parent?: AST,\n options: MinimatchOptions = {}\n ) {\n this.type = type\n // extglobs are inherently magical\n if (type) this.#hasMagic = true\n this.#parent = parent\n this.#root = this.#parent ? this.#parent.#root : this\n this.#options = this.#root === this ? options : this.#root.#options\n this.#negs = this.#root === this ? [] : this.#root.#negs\n if (type === '!' && !this.#root.#filledNegs) this.#negs.push(this)\n this.#parentIndex = this.#parent ? this.#parent.#parts.length : 0\n }\n\n get hasMagic(): boolean | undefined {\n /* c8 ignore start */\n if (this.#hasMagic !== undefined) return this.#hasMagic\n /* c8 ignore stop */\n for (const p of this.#parts) {\n if (typeof p === 'string') continue\n if (p.type || p.hasMagic) return (this.#hasMagic = true)\n }\n // note: will be undefined until we generate the regexp src and find out\n return this.#hasMagic\n }\n\n // reconstructs the pattern\n toString(): string {\n if (this.#toString !== undefined) return this.#toString\n if (!this.type) {\n return (this.#toString = this.#parts.map(p => String(p)).join(''))\n } else {\n return (this.#toString =\n this.type + '(' + this.#parts.map(p => String(p)).join('|') + ')')\n }\n }\n\n #fillNegs() {\n /* c8 ignore start */\n if (this !== this.#root) throw new Error('should only call on root')\n if (this.#filledNegs) return this\n /* c8 ignore stop */\n\n // call toString() once to fill this out\n this.toString()\n this.#filledNegs = true\n let n: AST | undefined\n while ((n = this.#negs.pop())) {\n if (n.type !== '!') continue\n // walk up the tree, appending everthing that comes AFTER parentIndex\n let p: AST | undefined = n\n let pp = p.#parent\n while (pp) {\n for (\n let i = p.#parentIndex + 1;\n !pp.type && i < pp.#parts.length;\n i++\n ) {\n for (const part of n.#parts) {\n /* c8 ignore start */\n if (typeof part === 'string') {\n throw new Error('string part in extglob AST??')\n }\n /* c8 ignore stop */\n part.copyIn(pp.#parts[i])\n }\n }\n p = pp\n pp = p.#parent\n }\n }\n return this\n }\n\n push(...parts: (string | AST)[]) {\n for (const p of parts) {\n if (p === '') continue\n /* c8 ignore start */\n if (typeof p !== 'string' && !(p instanceof AST && p.#parent === this)) {\n throw new Error('invalid part: ' + p)\n }\n /* c8 ignore stop */\n this.#parts.push(p)\n }\n }\n\n toJSON() {\n const ret: any[] =\n this.type === null\n ? this.#parts.slice().map(p => (typeof p === 'string' ? p : p.toJSON()))\n : [this.type, ...this.#parts.map(p => (p as AST).toJSON())]\n if (this.isStart() && !this.type) ret.unshift([])\n if (\n this.isEnd() &&\n (this === this.#root ||\n (this.#root.#filledNegs && this.#parent?.type === '!'))\n ) {\n ret.push({})\n }\n return ret\n }\n\n isStart(): boolean {\n if (this.#root === this) return true\n // if (this.type) return !!this.#parent?.isStart()\n if (!this.#parent?.isStart()) return false\n if (this.#parentIndex === 0) return true\n // if everything AHEAD of this is a negation, then it's still the \"start\"\n const p = this.#parent\n for (let i = 0; i < this.#parentIndex; i++) {\n const pp = p.#parts[i]\n if (!(pp instanceof AST && pp.type === '!')) {\n return false\n }\n }\n return true\n }\n\n isEnd(): boolean {\n if (this.#root === this) return true\n if (this.#parent?.type === '!') return true\n if (!this.#parent?.isEnd()) return false\n if (!this.type) return this.#parent?.isEnd()\n // if not root, it'll always have a parent\n /* c8 ignore start */\n const pl = this.#parent ? this.#parent.#parts.length : 0\n /* c8 ignore stop */\n return this.#parentIndex === pl - 1\n }\n\n copyIn(part: AST | string) {\n if (typeof part === 'string') this.push(part)\n else this.push(part.clone(this))\n }\n\n clone(parent: AST) {\n const c = new AST(this.type, parent)\n for (const p of this.#parts) {\n c.copyIn(p)\n }\n return c\n }\n\n static #parseAST(\n str: string,\n ast: AST,\n pos: number,\n opt: MinimatchOptions\n ): number {\n let escaping = false\n let inBrace = false\n let braceStart = -1\n let braceNeg = false\n if (ast.type === null) {\n // outside of a extglob, append until we find a start\n let i = pos\n let acc = ''\n while (i < str.length) {\n const c = str.charAt(i++)\n // still accumulate escapes at this point, but we do ignore\n // starts that are escaped\n if (escaping || c === '\\\\') {\n escaping = !escaping\n acc += c\n continue\n }\n\n if (inBrace) {\n if (i === braceStart + 1) {\n if (c === '^' || c === '!') {\n braceNeg = true\n }\n } else if (c === ']' && !(i === braceStart + 2 && braceNeg)) {\n inBrace = false\n }\n acc += c\n continue\n } else if (c === '[') {\n inBrace = true\n braceStart = i\n braceNeg = false\n acc += c\n continue\n }\n\n if (!opt.noext && isExtglobType(c) && str.charAt(i) === '(') {\n ast.push(acc)\n acc = ''\n const ext = new AST(c, ast)\n i = AST.#parseAST(str, ext, i, opt)\n ast.push(ext)\n continue\n }\n acc += c\n }\n ast.push(acc)\n return i\n }\n\n // some kind of extglob, pos is at the (\n // find the next | or )\n let i = pos + 1\n let part = new AST(null, ast)\n const parts: AST[] = []\n let acc = ''\n while (i < str.length) {\n const c = str.charAt(i++)\n // still accumulate escapes at this point, but we do ignore\n // starts that are escaped\n if (escaping || c === '\\\\') {\n escaping = !escaping\n acc += c\n continue\n }\n\n if (inBrace) {\n if (i === braceStart + 1) {\n if (c === '^' || c === '!') {\n braceNeg = true\n }\n } else if (c === ']' && !(i === braceStart + 2 && braceNeg)) {\n inBrace = false\n }\n acc += c\n continue\n } else if (c === '[') {\n inBrace = true\n braceStart = i\n braceNeg = false\n acc += c\n continue\n }\n\n if (isExtglobType(c) && str.charAt(i) === '(') {\n part.push(acc)\n acc = ''\n const ext = new AST(c, part)\n part.push(ext)\n i = AST.#parseAST(str, ext, i, opt)\n continue\n }\n if (c === '|') {\n part.push(acc)\n acc = ''\n parts.push(part)\n part = new AST(null, ast)\n continue\n }\n if (c === ')') {\n if (acc === '' && ast.#parts.length === 0) {\n ast.#emptyExt = true\n }\n part.push(acc)\n acc = ''\n ast.push(...parts, part)\n return i\n }\n acc += c\n }\n\n // unfinished extglob\n // if we got here, it was a malformed extglob! not an extglob, but\n // maybe something else in there.\n ast.type = null\n ast.#hasMagic = undefined\n ast.#parts = [str.substring(pos - 1)]\n return i\n }\n\n static fromGlob(pattern: string, options: MinimatchOptions = {}) {\n const ast = new AST(null, undefined, options)\n AST.#parseAST(pattern, ast, 0, options)\n return ast\n }\n\n // returns the regular expression if there's magic, or the unescaped\n // string if not.\n toMMPattern(): MMRegExp | string {\n // should only be called on root\n /* c8 ignore start */\n if (this !== this.#root) return this.#root.toMMPattern()\n /* c8 ignore stop */\n const glob = this.toString()\n const [re, body, hasMagic, uflag] = this.toRegExpSource()\n // if we're in nocase mode, and not nocaseMagicOnly, then we do\n // still need a regular expression if we have to case-insensitively\n // match capital/lowercase characters.\n const anyMagic =\n hasMagic ||\n this.#hasMagic ||\n (this.#options.nocase &&\n !this.#options.nocaseMagicOnly &&\n glob.toUpperCase() !== glob.toLowerCase())\n if (!anyMagic) {\n return body\n }\n\n const flags = (this.#options.nocase ? 'i' : '') + (uflag ? 'u' : '')\n return Object.assign(new RegExp(`^${re}$`, flags), {\n _src: re,\n _glob: glob,\n })\n }\n\n get options() {\n return this.#options\n }\n\n // returns the string match, the regexp source, whether there's magic\n // in the regexp (so a regular expression is required) and whether or\n // not the uflag is needed for the regular expression (for posix classes)\n // TODO: instead of injecting the start/end at this point, just return\n // the BODY of the regexp, along with the start/end portions suitable\n // for binding the start/end in either a joined full-path makeRe context\n // (where we bind to (^|/), or a standalone matchPart context (where\n // we bind to ^, and not /). Otherwise slashes get duped!\n //\n // In part-matching mode, the start is:\n // - if not isStart: nothing\n // - if traversal possible, but not allowed: ^(?!\\.\\.?$)\n // - if dots allowed or not possible: ^\n // - if dots possible and not allowed: ^(?!\\.)\n // end is:\n // - if not isEnd(): nothing\n // - else: $\n //\n // In full-path matching mode, we put the slash at the START of the\n // pattern, so start is:\n // - if first pattern: same as part-matching mode\n // - if not isStart(): nothing\n // - if traversal possible, but not allowed: /(?!\\.\\.?(?:$|/))\n // - if dots allowed or not possible: /\n // - if dots possible and not allowed: /(?!\\.)\n // end is:\n // - if last pattern, same as part-matching mode\n // - else nothing\n //\n // Always put the (?:$|/) on negated tails, though, because that has to be\n // there to bind the end of the negated pattern portion, and it's easier to\n // just stick it in now rather than try to inject it later in the middle of\n // the pattern.\n //\n // We can just always return the same end, and leave it up to the caller\n // to know whether it's going to be used joined or in parts.\n // And, if the start is adjusted slightly, can do the same there:\n // - if not isStart: nothing\n // - if traversal possible, but not allowed: (?:/|^)(?!\\.\\.?$)\n // - if dots allowed or not possible: (?:/|^)\n // - if dots possible and not allowed: (?:/|^)(?!\\.)\n //\n // But it's better to have a simpler binding without a conditional, for\n // performance, so probably better to return both start options.\n //\n // Then the caller just ignores the end if it's not the first pattern,\n // and the start always gets applied.\n //\n // But that's always going to be $ if it's the ending pattern, or nothing,\n // so the caller can just attach $ at the end of the pattern when building.\n //\n // So the todo is:\n // - better detect what kind of start is needed\n // - return both flavors of starting pattern\n // - attach $ at the end of the pattern when creating the actual RegExp\n //\n // Ah, but wait, no, that all only applies to the root when the first pattern\n // is not an extglob. If the first pattern IS an extglob, then we need all\n // that dot prevention biz to live in the extglob portions, because eg\n // +(*|.x*) can match .xy but not .yx.\n //\n // So, return the two flavors if it's #root and the first child is not an\n // AST, otherwise leave it to the child AST to handle it, and there,\n // use the (?:^|/) style of start binding.\n //\n // Even simplified further:\n // - Since the start for a join is eg /(?!\\.) and the start for a part\n // is ^(?!\\.), we can just prepend (?!\\.) to the pattern (either root\n // or start or whatever) and prepend ^ or / at the Regexp construction.\n toRegExpSource(\n allowDot?: boolean\n ): [re: string, body: string, hasMagic: boolean, uflag: boolean] {\n const dot = allowDot ?? !!this.#options.dot\n if (this.#root === this) this.#fillNegs()\n if (!this.type) {\n const noEmpty = this.isStart() && this.isEnd()\n const src = this.#parts\n .map(p => {\n const [re, _, hasMagic, uflag] =\n typeof p === 'string'\n ? AST.#parseGlob(p, this.#hasMagic, noEmpty)\n : p.toRegExpSource(allowDot)\n this.#hasMagic = this.#hasMagic || hasMagic\n this.#uflag = this.#uflag || uflag\n return re\n })\n .join('')\n\n let start = ''\n if (this.isStart()) {\n if (typeof this.#parts[0] === 'string') {\n // this is the string that will match the start of the pattern,\n // so we need to protect against dots and such.\n\n // '.' and '..' cannot match unless the pattern is that exactly,\n // even if it starts with . or dot:true is set.\n const dotTravAllowed =\n this.#parts.length === 1 && justDots.has(this.#parts[0])\n if (!dotTravAllowed) {\n const aps = addPatternStart\n // check if we have a possibility of matching . or ..,\n // and prevent that.\n const needNoTrav =\n // dots are allowed, and the pattern starts with [ or .\n (dot && aps.has(src.charAt(0))) ||\n // the pattern starts with \\., and then [ or .\n (src.startsWith('\\\\.') && aps.has(src.charAt(2))) ||\n // the pattern starts with \\.\\., and then [ or .\n (src.startsWith('\\\\.\\\\.') && aps.has(src.charAt(4)))\n // no need to prevent dots if it can't match a dot, or if a\n // sub-pattern will be preventing it anyway.\n const needNoDot = !dot && !allowDot && aps.has(src.charAt(0))\n\n start = needNoTrav ? startNoTraversal : needNoDot ? startNoDot : ''\n }\n }\n }\n\n // append the \"end of path portion\" pattern to negation tails\n let end = ''\n if (\n this.isEnd() &&\n this.#root.#filledNegs &&\n this.#parent?.type === '!'\n ) {\n end = '(?:$|\\\\/)'\n }\n const final = start + src + end\n return [\n final,\n unescape(src),\n (this.#hasMagic = !!this.#hasMagic),\n this.#uflag,\n ]\n }\n\n // We need to calculate the body *twice* if it's a repeat pattern\n // at the start, once in nodot mode, then again in dot mode, so a\n // pattern like *(?) can match 'x.y'\n\n const repeated = this.type === '*' || this.type === '+'\n // some kind of extglob\n const start = this.type === '!' ? '(?:(?!(?:' : '(?:'\n let body = this.#partsToRegExp(dot)\n\n if (this.isStart() && this.isEnd() && !body && this.type !== '!') {\n // invalid extglob, has to at least be *something* present, if it's\n // the entire path portion.\n const s = this.toString()\n this.#parts = [s]\n this.type = null\n this.#hasMagic = undefined\n return [s, unescape(this.toString()), false, false]\n }\n\n // XXX abstract out this map method\n let bodyDotAllowed =\n !repeated || allowDot || dot || !startNoDot\n ? ''\n : this.#partsToRegExp(true)\n if (bodyDotAllowed === body) {\n bodyDotAllowed = ''\n }\n if (bodyDotAllowed) {\n body = `(?:${body})(?:${bodyDotAllowed})*?`\n }\n\n // an empty !() is exactly equivalent to a starNoEmpty\n let final = ''\n if (this.type === '!' && this.#emptyExt) {\n final = (this.isStart() && !dot ? startNoDot : '') + starNoEmpty\n } else {\n const close =\n this.type === '!'\n ? // !() must match something,but !(x) can match ''\n '))' +\n (this.isStart() && !dot && !allowDot ? startNoDot : '') +\n star +\n ')'\n : this.type === '@'\n ? ')'\n : this.type === '?'\n ? ')?'\n : this.type === '+' && bodyDotAllowed\n ? ')'\n : this.type === '*' && bodyDotAllowed\n ? `)?`\n : `)${this.type}`\n final = start + body + close\n }\n return [\n final,\n unescape(body),\n (this.#hasMagic = !!this.#hasMagic),\n this.#uflag,\n ]\n }\n\n #partsToRegExp(dot: boolean) {\n return this.#parts\n .map(p => {\n // extglob ASTs should only contain parent ASTs\n /* c8 ignore start */\n if (typeof p === 'string') {\n throw new Error('string type in extglob ast??')\n }\n /* c8 ignore stop */\n // can ignore hasMagic, because extglobs are already always magic\n const [re, _, _hasMagic, uflag] = p.toRegExpSource(dot)\n this.#uflag = this.#uflag || uflag\n return re\n })\n .filter(p => !(this.isStart() && this.isEnd()) || !!p)\n .join('|')\n }\n\n static #parseGlob(\n glob: string,\n hasMagic: boolean | undefined,\n noEmpty: boolean = false\n ): [re: string, body: string, hasMagic: boolean, uflag: boolean] {\n let escaping = false\n let re = ''\n let uflag = false\n for (let i = 0; i < glob.length; i++) {\n const c = glob.charAt(i)\n if (escaping) {\n escaping = false\n re += (reSpecials.has(c) ? '\\\\' : '') + c\n continue\n }\n if (c === '\\\\') {\n if (i === glob.length - 1) {\n re += '\\\\\\\\'\n } else {\n escaping = true\n }\n continue\n }\n if (c === '[') {\n const [src, needUflag, consumed, magic] = parseClass(glob, i)\n if (consumed) {\n re += src\n uflag = uflag || needUflag\n i += consumed - 1\n hasMagic = hasMagic || magic\n continue\n }\n }\n if (c === '*') {\n if (noEmpty && glob === '*') re += starNoEmpty\n else re += star\n hasMagic = true\n continue\n }\n if (c === '?') {\n re += qmark\n hasMagic = true\n continue\n }\n re += regExpEscape(c)\n }\n return [re, unescape(glob), !!hasMagic, uflag]\n }\n}\n"]} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/minimatch/dist/commonjs/brace-expressions.d.ts b/node_modules/mocha/node_modules/minimatch/dist/commonjs/brace-expressions.d.ts deleted file mode 100644 index b1572deb..00000000 --- a/node_modules/mocha/node_modules/minimatch/dist/commonjs/brace-expressions.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -export type ParseClassResult = [ - src: string, - uFlag: boolean, - consumed: number, - hasMagic: boolean -]; -export declare const parseClass: (glob: string, position: number) => ParseClassResult; -//# sourceMappingURL=brace-expressions.d.ts.map \ No newline at end of file diff --git a/node_modules/mocha/node_modules/minimatch/dist/commonjs/brace-expressions.d.ts.map b/node_modules/mocha/node_modules/minimatch/dist/commonjs/brace-expressions.d.ts.map deleted file mode 100644 index d3949648..00000000 --- a/node_modules/mocha/node_modules/minimatch/dist/commonjs/brace-expressions.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"brace-expressions.d.ts","sourceRoot":"","sources":["../../src/brace-expressions.ts"],"names":[],"mappings":"AA+BA,MAAM,MAAM,gBAAgB,GAAG;IAC7B,GAAG,EAAE,MAAM;IACX,KAAK,EAAE,OAAO;IACd,QAAQ,EAAE,MAAM;IAChB,QAAQ,EAAE,OAAO;CAClB,CAAA;AAQD,eAAO,MAAM,UAAU,SACf,MAAM,YACF,MAAM,qBA8HjB,CAAA"} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/minimatch/dist/commonjs/brace-expressions.js b/node_modules/mocha/node_modules/minimatch/dist/commonjs/brace-expressions.js deleted file mode 100644 index 0e13eefc..00000000 --- a/node_modules/mocha/node_modules/minimatch/dist/commonjs/brace-expressions.js +++ /dev/null @@ -1,152 +0,0 @@ -"use strict"; -// translate the various posix character classes into unicode properties -// this works across all unicode locales -Object.defineProperty(exports, "__esModule", { value: true }); -exports.parseClass = void 0; -// { : [, /u flag required, negated] -const posixClasses = { - '[:alnum:]': ['\\p{L}\\p{Nl}\\p{Nd}', true], - '[:alpha:]': ['\\p{L}\\p{Nl}', true], - '[:ascii:]': ['\\x' + '00-\\x' + '7f', false], - '[:blank:]': ['\\p{Zs}\\t', true], - '[:cntrl:]': ['\\p{Cc}', true], - '[:digit:]': ['\\p{Nd}', true], - '[:graph:]': ['\\p{Z}\\p{C}', true, true], - '[:lower:]': ['\\p{Ll}', true], - '[:print:]': ['\\p{C}', true], - '[:punct:]': ['\\p{P}', true], - '[:space:]': ['\\p{Z}\\t\\r\\n\\v\\f', true], - '[:upper:]': ['\\p{Lu}', true], - '[:word:]': ['\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}', true], - '[:xdigit:]': ['A-Fa-f0-9', false], -}; -// only need to escape a few things inside of brace expressions -// escapes: [ \ ] - -const braceEscape = (s) => s.replace(/[[\]\\-]/g, '\\$&'); -// escape all regexp magic characters -const regexpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&'); -// everything has already been escaped, we just have to join -const rangesToString = (ranges) => ranges.join(''); -// takes a glob string at a posix brace expression, and returns -// an equivalent regular expression source, and boolean indicating -// whether the /u flag needs to be applied, and the number of chars -// consumed to parse the character class. -// This also removes out of order ranges, and returns ($.) if the -// entire class just no good. -const parseClass = (glob, position) => { - const pos = position; - /* c8 ignore start */ - if (glob.charAt(pos) !== '[') { - throw new Error('not in a brace expression'); - } - /* c8 ignore stop */ - const ranges = []; - const negs = []; - let i = pos + 1; - let sawStart = false; - let uflag = false; - let escaping = false; - let negate = false; - let endPos = pos; - let rangeStart = ''; - WHILE: while (i < glob.length) { - const c = glob.charAt(i); - if ((c === '!' || c === '^') && i === pos + 1) { - negate = true; - i++; - continue; - } - if (c === ']' && sawStart && !escaping) { - endPos = i + 1; - break; - } - sawStart = true; - if (c === '\\') { - if (!escaping) { - escaping = true; - i++; - continue; - } - // escaped \ char, fall through and treat like normal char - } - if (c === '[' && !escaping) { - // either a posix class, a collation equivalent, or just a [ - for (const [cls, [unip, u, neg]] of Object.entries(posixClasses)) { - if (glob.startsWith(cls, i)) { - // invalid, [a-[] is fine, but not [a-[:alpha]] - if (rangeStart) { - return ['$.', false, glob.length - pos, true]; - } - i += cls.length; - if (neg) - negs.push(unip); - else - ranges.push(unip); - uflag = uflag || u; - continue WHILE; - } - } - } - // now it's just a normal character, effectively - escaping = false; - if (rangeStart) { - // throw this range away if it's not valid, but others - // can still match. - if (c > rangeStart) { - ranges.push(braceEscape(rangeStart) + '-' + braceEscape(c)); - } - else if (c === rangeStart) { - ranges.push(braceEscape(c)); - } - rangeStart = ''; - i++; - continue; - } - // now might be the start of a range. - // can be either c-d or c-] or c] or c] at this point - if (glob.startsWith('-]', i + 1)) { - ranges.push(braceEscape(c + '-')); - i += 2; - continue; - } - if (glob.startsWith('-', i + 1)) { - rangeStart = c; - i += 2; - continue; - } - // not the start of a range, just a single character - ranges.push(braceEscape(c)); - i++; - } - if (endPos < i) { - // didn't see the end of the class, not a valid class, - // but might still be valid as a literal match. - return ['', false, 0, false]; - } - // if we got no ranges and no negates, then we have a range that - // cannot possibly match anything, and that poisons the whole glob - if (!ranges.length && !negs.length) { - return ['$.', false, glob.length - pos, true]; - } - // if we got one positive range, and it's a single character, then that's - // not actually a magic pattern, it's just that one literal character. - // we should not treat that as "magic", we should just return the literal - // character. [_] is a perfectly valid way to escape glob magic chars. - if (negs.length === 0 && - ranges.length === 1 && - /^\\?.$/.test(ranges[0]) && - !negate) { - const r = ranges[0].length === 2 ? ranges[0].slice(-1) : ranges[0]; - return [regexpEscape(r), false, endPos - pos, false]; - } - const sranges = '[' + (negate ? '^' : '') + rangesToString(ranges) + ']'; - const snegs = '[' + (negate ? '' : '^') + rangesToString(negs) + ']'; - const comb = ranges.length && negs.length - ? '(' + sranges + '|' + snegs + ')' - : ranges.length - ? sranges - : snegs; - return [comb, uflag, endPos - pos, true]; -}; -exports.parseClass = parseClass; -//# sourceMappingURL=brace-expressions.js.map \ No newline at end of file diff --git a/node_modules/mocha/node_modules/minimatch/dist/commonjs/brace-expressions.js.map b/node_modules/mocha/node_modules/minimatch/dist/commonjs/brace-expressions.js.map deleted file mode 100644 index 86b04756..00000000 --- a/node_modules/mocha/node_modules/minimatch/dist/commonjs/brace-expressions.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"brace-expressions.js","sourceRoot":"","sources":["../../src/brace-expressions.ts"],"names":[],"mappings":";AAAA,wEAAwE;AACxE,wCAAwC;;;AAExC,8DAA8D;AAC9D,MAAM,YAAY,GAA0D;IAC1E,WAAW,EAAE,CAAC,sBAAsB,EAAE,IAAI,CAAC;IAC3C,WAAW,EAAE,CAAC,eAAe,EAAE,IAAI,CAAC;IACpC,WAAW,EAAE,CAAC,KAAK,GAAG,QAAQ,GAAG,IAAI,EAAE,KAAK,CAAC;IAC7C,WAAW,EAAE,CAAC,YAAY,EAAE,IAAI,CAAC;IACjC,WAAW,EAAE,CAAC,SAAS,EAAE,IAAI,CAAC;IAC9B,WAAW,EAAE,CAAC,SAAS,EAAE,IAAI,CAAC;IAC9B,WAAW,EAAE,CAAC,cAAc,EAAE,IAAI,EAAE,IAAI,CAAC;IACzC,WAAW,EAAE,CAAC,SAAS,EAAE,IAAI,CAAC;IAC9B,WAAW,EAAE,CAAC,QAAQ,EAAE,IAAI,CAAC;IAC7B,WAAW,EAAE,CAAC,QAAQ,EAAE,IAAI,CAAC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G,GAAG,EAAE,IAAI,CAAC,CAAA;AAC1C,CAAC,CAAA;AAhIY,QAAA,UAAU,cAgItB","sourcesContent":["// translate the various posix character classes into unicode properties\n// this works across all unicode locales\n\n// { : [, /u flag required, negated]\nconst posixClasses: { [k: string]: [e: string, u: boolean, n?: boolean] } = {\n '[:alnum:]': ['\\\\p{L}\\\\p{Nl}\\\\p{Nd}', true],\n '[:alpha:]': ['\\\\p{L}\\\\p{Nl}', true],\n '[:ascii:]': ['\\\\x' + '00-\\\\x' + '7f', false],\n '[:blank:]': ['\\\\p{Zs}\\\\t', true],\n '[:cntrl:]': ['\\\\p{Cc}', true],\n '[:digit:]': ['\\\\p{Nd}', true],\n '[:graph:]': ['\\\\p{Z}\\\\p{C}', true, true],\n '[:lower:]': ['\\\\p{Ll}', true],\n '[:print:]': ['\\\\p{C}', true],\n '[:punct:]': ['\\\\p{P}', true],\n '[:space:]': ['\\\\p{Z}\\\\t\\\\r\\\\n\\\\v\\\\f', true],\n '[:upper:]': ['\\\\p{Lu}', true],\n '[:word:]': ['\\\\p{L}\\\\p{Nl}\\\\p{Nd}\\\\p{Pc}', true],\n '[:xdigit:]': ['A-Fa-f0-9', false],\n}\n\n// only need to escape a few things inside of brace expressions\n// escapes: [ \\ ] -\nconst braceEscape = (s: string) => s.replace(/[[\\]\\\\-]/g, '\\\\$&')\n// escape all regexp magic characters\nconst regexpEscape = (s: string) =>\n s.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&')\n\n// everything has already been escaped, we just have to join\nconst rangesToString = (ranges: string[]): string => ranges.join('')\n\nexport type ParseClassResult = [\n src: string,\n uFlag: boolean,\n consumed: number,\n hasMagic: boolean\n]\n\n// takes a glob string at a posix brace expression, and returns\n// an equivalent regular expression source, and boolean indicating\n// whether the /u flag needs to be applied, and the number of chars\n// consumed to parse the character class.\n// This also removes out of order ranges, and returns ($.) if the\n// entire class just no good.\nexport const parseClass = (\n glob: string,\n position: number\n): ParseClassResult => {\n const pos = position\n /* c8 ignore start */\n if (glob.charAt(pos) !== '[') {\n throw new Error('not in a brace expression')\n }\n /* c8 ignore stop */\n const ranges: string[] = []\n const negs: string[] = []\n\n let i = pos + 1\n let sawStart = false\n let uflag = false\n let escaping = false\n let negate = false\n let endPos = pos\n let rangeStart = ''\n WHILE: while (i < glob.length) {\n const c = glob.charAt(i)\n if ((c === '!' || c === '^') && i === pos + 1) {\n negate = true\n i++\n continue\n }\n\n if (c === ']' && sawStart && !escaping) {\n endPos = i + 1\n break\n }\n\n sawStart = true\n if (c === '\\\\') {\n if (!escaping) {\n escaping = true\n i++\n continue\n }\n // escaped \\ char, fall through and treat like normal char\n }\n if (c === '[' && !escaping) {\n // either a posix class, a collation equivalent, or just a [\n for (const [cls, [unip, u, neg]] of Object.entries(posixClasses)) {\n if (glob.startsWith(cls, i)) {\n // invalid, [a-[] is fine, but not [a-[:alpha]]\n if (rangeStart) {\n return ['$.', false, glob.length - pos, true]\n }\n i += cls.length\n if (neg) negs.push(unip)\n else ranges.push(unip)\n uflag = uflag || u\n continue WHILE\n }\n }\n }\n\n // now it's just a normal character, effectively\n escaping = false\n if (rangeStart) {\n // throw this range away if it's not valid, but others\n // can still match.\n if (c > rangeStart) {\n ranges.push(braceEscape(rangeStart) + '-' + braceEscape(c))\n } else if (c === rangeStart) {\n ranges.push(braceEscape(c))\n }\n rangeStart = ''\n i++\n continue\n }\n\n // now might be the start of a range.\n // can be either c-d or c-] or c] or c] at this point\n if (glob.startsWith('-]', i + 1)) {\n ranges.push(braceEscape(c + '-'))\n i += 2\n continue\n }\n if (glob.startsWith('-', i + 1)) {\n rangeStart = c\n i += 2\n continue\n }\n\n // not the start of a range, just a single character\n ranges.push(braceEscape(c))\n i++\n }\n\n if (endPos < i) {\n // didn't see the end of the class, not a valid class,\n // but might still be valid as a literal match.\n return ['', false, 0, false]\n }\n\n // if we got no ranges and no negates, then we have a range that\n // cannot possibly match anything, and that poisons the whole glob\n if (!ranges.length && !negs.length) {\n return ['$.', false, glob.length - pos, true]\n }\n\n // if we got one positive range, and it's a single character, then that's\n // not actually a magic pattern, it's just that one literal character.\n // we should not treat that as \"magic\", we should just return the literal\n // character. [_] is a perfectly valid way to escape glob magic chars.\n if (\n negs.length === 0 &&\n ranges.length === 1 &&\n /^\\\\?.$/.test(ranges[0]) &&\n !negate\n ) {\n const r = ranges[0].length === 2 ? ranges[0].slice(-1) : ranges[0]\n return [regexpEscape(r), false, endPos - pos, false]\n }\n\n const sranges = '[' + (negate ? '^' : '') + rangesToString(ranges) + ']'\n const snegs = '[' + (negate ? '' : '^') + rangesToString(negs) + ']'\n const comb =\n ranges.length && negs.length\n ? '(' + sranges + '|' + snegs + ')'\n : ranges.length\n ? sranges\n : snegs\n\n return [comb, uflag, endPos - pos, true]\n}\n"]} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/minimatch/dist/commonjs/escape.d.ts b/node_modules/mocha/node_modules/minimatch/dist/commonjs/escape.d.ts deleted file mode 100644 index dc3e3163..00000000 --- a/node_modules/mocha/node_modules/minimatch/dist/commonjs/escape.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { MinimatchOptions } from './index.js'; -/** - * Escape all magic characters in a glob pattern. - * - * If the {@link windowsPathsNoEscape | GlobOptions.windowsPathsNoEscape} - * option is used, then characters are escaped by wrapping in `[]`, because - * a magic character wrapped in a character class can only be satisfied by - * that exact character. In this mode, `\` is _not_ escaped, because it is - * not interpreted as a magic character, but instead as a path separator. - */ -export declare const escape: (s: string, { windowsPathsNoEscape, }?: Pick) => string; -//# sourceMappingURL=escape.d.ts.map \ No newline at end of file diff --git a/node_modules/mocha/node_modules/minimatch/dist/commonjs/escape.d.ts.map b/node_modules/mocha/node_modules/minimatch/dist/commonjs/escape.d.ts.map deleted file mode 100644 index 0779dae7..00000000 --- a/node_modules/mocha/node_modules/minimatch/dist/commonjs/escape.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"escape.d.ts","sourceRoot":"","sources":["../../src/escape.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAC7C;;;;;;;;GAQG;AACH,eAAO,MAAM,MAAM,MACd,MAAM,8BAGN,KAAK,gBAAgB,EAAE,sBAAsB,CAAC,WAQlD,CAAA"} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/minimatch/dist/commonjs/escape.js b/node_modules/mocha/node_modules/minimatch/dist/commonjs/escape.js deleted file mode 100644 index 02a4f8a8..00000000 --- a/node_modules/mocha/node_modules/minimatch/dist/commonjs/escape.js +++ /dev/null @@ -1,22 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.escape = void 0; -/** - * Escape all magic characters in a glob pattern. - * - * If the {@link windowsPathsNoEscape | GlobOptions.windowsPathsNoEscape} - * option is used, then characters are escaped by wrapping in `[]`, because - * a magic character wrapped in a character class can only be satisfied by - * that exact character. In this mode, `\` is _not_ escaped, because it is - * not interpreted as a magic character, but instead as a path separator. - */ -const escape = (s, { windowsPathsNoEscape = false, } = {}) => { - // don't need to escape +@! because we escape the parens - // that make those magic, and escaping ! as [!] isn't valid, - // because [!]] is a valid glob class meaning not ']'. - return windowsPathsNoEscape - ? s.replace(/[?*()[\]]/g, '[$&]') - : s.replace(/[?*()[\]\\]/g, '\\$&'); -}; -exports.escape = escape; -//# sourceMappingURL=escape.js.map \ No newline at end of file diff --git a/node_modules/mocha/node_modules/minimatch/dist/commonjs/escape.js.map b/node_modules/mocha/node_modules/minimatch/dist/commonjs/escape.js.map deleted file mode 100644 index 264b2ea5..00000000 --- a/node_modules/mocha/node_modules/minimatch/dist/commonjs/escape.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"escape.js","sourceRoot":"","sources":["../../src/escape.ts"],"names":[],"mappings":";;;AACA;;;;;;;;GAQG;AACI,MAAM,MAAM,GAAG,CACpB,CAAS,EACT,EACE,oBAAoB,GAAG,KAAK,MACsB,EAAE,EACtD,EAAE;IACF,wDAAwD;IACxD,4DAA4D;IAC5D,sDAAsD;IACtD,OAAO,oBAAoB;QACzB,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,YAAY,EAAE,MAAM,CAAC;QACjC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,cAAc,EAAE,MAAM,CAAC,CAAA;AACvC,CAAC,CAAA;AAZY,QAAA,MAAM,UAYlB","sourcesContent":["import { MinimatchOptions } from './index.js'\n/**\n * Escape all magic characters in a glob pattern.\n *\n * If the {@link windowsPathsNoEscape | GlobOptions.windowsPathsNoEscape}\n * option is used, then characters are escaped by wrapping in `[]`, because\n * a magic character wrapped in a character class can only be satisfied by\n * that exact character. In this mode, `\\` is _not_ escaped, because it is\n * not interpreted as a magic character, but instead as a path separator.\n */\nexport const escape = (\n s: string,\n {\n windowsPathsNoEscape = false,\n }: Pick = {}\n) => {\n // don't need to escape +@! because we escape the parens\n // that make those magic, and escaping ! as [!] isn't valid,\n // because [!]] is a valid glob class meaning not ']'.\n return windowsPathsNoEscape\n ? s.replace(/[?*()[\\]]/g, '[$&]')\n : s.replace(/[?*()[\\]\\\\]/g, '\\\\$&')\n}\n"]} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/minimatch/dist/commonjs/index.d.ts b/node_modules/mocha/node_modules/minimatch/dist/commonjs/index.d.ts deleted file mode 100644 index 41d16a98..00000000 --- a/node_modules/mocha/node_modules/minimatch/dist/commonjs/index.d.ts +++ /dev/null @@ -1,94 +0,0 @@ -import { AST } from './ast.js'; -type Platform = 'aix' | 'android' | 'darwin' | 'freebsd' | 'haiku' | 'linux' | 'openbsd' | 'sunos' | 'win32' | 'cygwin' | 'netbsd'; -export interface MinimatchOptions { - nobrace?: boolean; - nocomment?: boolean; - nonegate?: boolean; - debug?: boolean; - noglobstar?: boolean; - noext?: boolean; - nonull?: boolean; - windowsPathsNoEscape?: boolean; - allowWindowsEscape?: boolean; - partial?: boolean; - dot?: boolean; - nocase?: boolean; - nocaseMagicOnly?: boolean; - magicalBraces?: boolean; - matchBase?: boolean; - flipNegate?: boolean; - preserveMultipleSlashes?: boolean; - optimizationLevel?: number; - platform?: Platform; - windowsNoMagicRoot?: boolean; -} -export declare const minimatch: { - (p: string, pattern: string, options?: MinimatchOptions): boolean; - sep: Sep; - GLOBSTAR: typeof GLOBSTAR; - filter: (pattern: string, options?: MinimatchOptions) => (p: string) => boolean; - defaults: (def: MinimatchOptions) => typeof minimatch; - braceExpand: (pattern: string, options?: MinimatchOptions) => string[]; - makeRe: (pattern: string, options?: MinimatchOptions) => false | MMRegExp; - match: (list: string[], pattern: string, options?: MinimatchOptions) => string[]; - AST: typeof AST; - Minimatch: typeof Minimatch; - escape: (s: string, { windowsPathsNoEscape, }?: Pick) => string; - unescape: (s: string, { windowsPathsNoEscape, }?: Pick) => string; -}; -type Sep = '\\' | '/'; -export declare const sep: Sep; -export declare const GLOBSTAR: unique symbol; -export declare const filter: (pattern: string, options?: MinimatchOptions) => (p: string) => boolean; -export declare const defaults: (def: MinimatchOptions) => typeof minimatch; -export declare const braceExpand: (pattern: string, options?: MinimatchOptions) => string[]; -export declare const makeRe: (pattern: string, options?: MinimatchOptions) => false | MMRegExp; -export declare const match: (list: string[], pattern: string, options?: MinimatchOptions) => string[]; -export type MMRegExp = RegExp & { - _src?: string; - _glob?: string; -}; -export type ParseReturnFiltered = string | MMRegExp | typeof GLOBSTAR; -export type ParseReturn = ParseReturnFiltered | false; -export declare class Minimatch { - options: MinimatchOptions; - set: ParseReturnFiltered[][]; - pattern: string; - windowsPathsNoEscape: boolean; - nonegate: boolean; - negate: boolean; - comment: boolean; - empty: boolean; - preserveMultipleSlashes: boolean; - partial: boolean; - globSet: string[]; - globParts: string[][]; - nocase: boolean; - isWindows: boolean; - platform: Platform; - windowsNoMagicRoot: boolean; - regexp: false | null | MMRegExp; - constructor(pattern: string, options?: MinimatchOptions); - hasMagic(): boolean; - debug(..._: any[]): void; - make(): void; - preprocess(globParts: string[][]): string[][]; - adjascentGlobstarOptimize(globParts: string[][]): string[][]; - levelOneOptimize(globParts: string[][]): string[][]; - levelTwoFileOptimize(parts: string | string[]): string[]; - firstPhasePreProcess(globParts: string[][]): string[][]; - secondPhasePreProcess(globParts: string[][]): string[][]; - partsMatch(a: string[], b: string[], emptyGSMatch?: boolean): false | string[]; - parseNegate(): void; - matchOne(file: string[], pattern: ParseReturn[], partial?: boolean): boolean; - braceExpand(): string[]; - parse(pattern: string): ParseReturn; - makeRe(): false | MMRegExp; - slashSplit(p: string): string[]; - match(f: string, partial?: boolean): boolean; - static defaults(def: MinimatchOptions): typeof Minimatch; -} -export { AST } from './ast.js'; -export { escape } from './escape.js'; -export { unescape } from './unescape.js'; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/mocha/node_modules/minimatch/dist/commonjs/index.d.ts.map b/node_modules/mocha/node_modules/minimatch/dist/commonjs/index.d.ts.map deleted file mode 100644 index 195491d8..00000000 --- a/node_modules/mocha/node_modules/minimatch/dist/commonjs/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,GAAG,EAAe,MAAM,UAAU,CAAA;AAI3C,KAAK,QAAQ,GACT,KAAK,GACL,SAAS,GACT,QAAQ,GACR,SAAS,GACT,OAAO,GACP,OAAO,GACP,SAAS,GACT,OAAO,GACP,OAAO,GACP,QAAQ,GACR,QAAQ,CAAA;AAEZ,MAAM,WAAW,gBAAgB;IAC/B,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,kBAAkB,CAAC,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,MAAM,EAAE,EAAE,GAAG,MAAM,EAAE,EAAE;IAkBxD,UAAU,CACR,CAAC,EAAE,MAAM,EAAE,EACX,CAAC,EAAE,MAAM,EAAE,EACX,YAAY,GAAE,OAAe,GAC5B,KAAK,GAAG,MAAM,EAAE;IA+CnB,WAAW;IAqBX,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,WAAW,EAAE,EAAE,OAAO,GAAE,OAAe;IAiNzE,WAAW;IAIX,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,WAAW;IAiDnC,MAAM;IAsFN,UAAU,CAAC,CAAC,EAAE,MAAM;IAepB,KAAK,CAAC,CAAC,EAAE,MAAM,EAAE,OAAO,UAAe;IAiEvC,MAAM,CAAC,QAAQ,CAAC,GAAG,EAAE,gBAAgB;CAGtC;AAED,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAC9B,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA"} \ No newline at end of file diff --git a/node_modules/mocha/node_modules/minimatch/dist/commonjs/index.js b/node_modules/mocha/node_modules/minimatch/dist/commonjs/index.js deleted file mode 100644 index 64a0f1f8..00000000 --- a/node_modules/mocha/node_modules/minimatch/dist/commonjs/index.js +++ /dev/null @@ -1,1017 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.unescape = exports.escape = exports.AST = exports.Minimatch = exports.match = exports.makeRe = exports.braceExpand = exports.defaults = exports.filter = exports.GLOBSTAR = exports.sep = exports.minimatch = void 0; -const brace_expansion_1 = __importDefault(require("brace-expansion")); -const assert_valid_pattern_js_1 = require("./assert-valid-pattern.js"); -const ast_js_1 = require("./ast.js"); -const escape_js_1 = require("./escape.js"); -const unescape_js_1 = require("./unescape.js"); -const minimatch = (p, pattern, options = {}) => { - (0, assert_valid_pattern_js_1.assertValidPattern)(pattern); - // shortcut: comments match nothing. - if (!options.nocomment && pattern.charAt(0) === '#') { - return false; - } - return new Minimatch(pattern, options).match(p); -}; -exports.minimatch = minimatch; -// Optimized checking for the most common glob patterns. -const starDotExtRE = /^\*+([^+@!?\*\[\(]*)$/; -const starDotExtTest = (ext) => (f) => !f.startsWith('.') && f.endsWith(ext); -const starDotExtTestDot = (ext) => (f) => f.endsWith(ext); -const starDotExtTestNocase = (ext) => { - ext = ext.toLowerCase(); - return (f) => !f.startsWith('.') && f.toLowerCase().endsWith(ext); -}; -const starDotExtTestNocaseDot = (ext) => { - ext = ext.toLowerCase(); - return (f) => f.toLowerCase().endsWith(ext); -}; -const starDotStarRE = /^\*+\.\*+$/; -const starDotStarTest = (f) => !f.startsWith('.') && f.includes('.'); -const starDotStarTestDot = (f) => f !== '.' && f !== '..' && f.includes('.'); -const dotStarRE = /^\.\*+$/; -const dotStarTest = (f) => f !== '.' && f !== '..' && f.startsWith('.'); -const starRE = /^\*+$/; -const starTest = (f) => f.length !== 0 && !f.startsWith('.'); -const starTestDot = (f) => f.length !== 0 && f !== '.' && f !== '..'; -const qmarksRE = /^\?+([^+@!?\*\[\(]*)?$/; -const qmarksTestNocase = ([$0, ext = '']) => { - const noext = qmarksTestNoExt([$0]); - if (!ext) - return noext; - ext = ext.toLowerCase(); - return (f) => noext(f) && f.toLowerCase().endsWith(ext); -}; -const qmarksTestNocaseDot = ([$0, ext = '']) => { - const noext = qmarksTestNoExtDot([$0]); - if (!ext) - return noext; - ext = ext.toLowerCase(); - return (f) => noext(f) && f.toLowerCase().endsWith(ext); -}; -const qmarksTestDot = ([$0, ext = '']) => { - const noext = qmarksTestNoExtDot([$0]); - return !ext ? noext : (f) => noext(f) && f.endsWith(ext); -}; -const qmarksTest = ([$0, ext = '']) => { - const noext = qmarksTestNoExt([$0]); - return !ext ? noext : (f) => noext(f) && f.endsWith(ext); -}; -const qmarksTestNoExt = ([$0]) => { - const len = $0.length; - return (f) => f.length === len && !f.startsWith('.'); -}; -const qmarksTestNoExtDot = ([$0]) => { - const len = $0.length; - return (f) => f.length === len && f !== '.' && f !== '..'; -}; -/* c8 ignore start */ -const defaultPlatform = (typeof process === 'object' && process - ? (typeof process.env === 'object' && - process.env && - process.env.__MINIMATCH_TESTING_PLATFORM__) || - process.platform - : 'posix'); -const path = { - win32: { sep: '\\' }, - posix: { sep: '/' }, -}; -/* c8 ignore stop */ -exports.sep = defaultPlatform === 'win32' ? path.win32.sep : path.posix.sep; -exports.minimatch.sep = exports.sep; -exports.GLOBSTAR = Symbol('globstar **'); -exports.minimatch.GLOBSTAR = exports.GLOBSTAR; -// any single thing other than / -// don't need to escape / when using new RegExp() -const qmark = '[^/]'; -// * => any number of characters -const star = qmark + '*?'; -// ** when dots are allowed. Anything goes, except .. and . -// not (^ or / followed by one or two dots followed by $ or /), -// followed by anything, any number of times. -const twoStarDot = '(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?'; -// not a ^ or / followed by a dot, -// followed by anything, any number of times. -const twoStarNoDot = '(?:(?!(?:\\/|^)\\.).)*?'; -const filter = (pattern, options = {}) => (p) => (0, exports.minimatch)(p, pattern, options); -exports.filter = filter; -exports.minimatch.filter = exports.filter; -const ext = (a, b = {}) => Object.assign({}, a, b); -const defaults = (def) => { - if (!def || typeof def !== 'object' || !Object.keys(def).length) { - return exports.minimatch; - } - const orig = exports.minimatch; - const m = (p, pattern, options = {}) => orig(p, pattern, ext(def, options)); - return Object.assign(m, { - Minimatch: class Minimatch extends orig.Minimatch { - constructor(pattern, options = {}) { - super(pattern, ext(def, options)); - } - static defaults(options) { - return orig.defaults(ext(def, options)).Minimatch; - } - }, - AST: class AST extends orig.AST { - /* c8 ignore start */ - constructor(type, parent, options = {}) { - super(type, parent, ext(def, options)); - } - /* c8 ignore stop */ - static fromGlob(pattern, options = {}) { - return orig.AST.fromGlob(pattern, ext(def, options)); - } - }, - unescape: (s, options = {}) => orig.unescape(s, ext(def, options)), - escape: (s, options = {}) => orig.escape(s, ext(def, options)), - filter: (pattern, options = {}) => orig.filter(pattern, ext(def, options)), - defaults: (options) => orig.defaults(ext(def, options)), - makeRe: (pattern, options = {}) => orig.makeRe(pattern, ext(def, options)), - braceExpand: (pattern, options = {}) => orig.braceExpand(pattern, ext(def, options)), - match: (list, pattern, options = {}) => orig.match(list, pattern, ext(def, options)), - sep: orig.sep, - GLOBSTAR: exports.GLOBSTAR, - }); -}; -exports.defaults = defaults; -exports.minimatch.defaults = exports.defaults; -// Brace expansion: -// a{b,c}d -> abd acd -// a{b,}c -> abc ac -// a{0..3}d -> a0d a1d a2d a3d -// a{b,c{d,e}f}g -> abg acdfg acefg -// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg -// -// Invalid sets are not expanded. -// a{2..}b -> a{2..}b -// a{b}c -> a{b}c -const braceExpand = (pattern, options = {}) => { - (0, assert_valid_pattern_js_1.assertValidPattern)(pattern); - // Thanks to Yeting Li for - // improving this regexp to avoid a ReDOS vulnerability. - if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) { - // shortcut. no need to expand. - return [pattern]; - } - return (0, brace_expansion_1.default)(pattern); -}; -exports.braceExpand = braceExpand; -exports.minimatch.braceExpand = exports.braceExpand; -// parse a component of the expanded set. -// At this point, no pattern may contain "/" in it -// so we're going to return a 2d array, where each entry is the full -// pattern, split on '/', and then turned into a regular expression. -// A regexp is made at the end which joins each array with an -// escaped /, and another full one which joins each regexp with |. -// -// Following the lead of Bash 4.1, note that "**" only has special meaning -// when it is the *only* thing in a path portion. Otherwise, any series -// of * is equivalent to a single *. Globstar behavior is enabled by -// default, and can be disabled by setting options.noglobstar. -const makeRe = (pattern, options = {}) => new Minimatch(pattern, options).makeRe(); -exports.makeRe = makeRe; -exports.minimatch.makeRe = exports.makeRe; -const match = (list, pattern, options = {}) => { - const mm = new Minimatch(pattern, options); - list = list.filter(f => mm.match(f)); - if (mm.options.nonull && !list.length) { - list.push(pattern); - } - return list; -}; -exports.match = match; -exports.minimatch.match = exports.match; -// replace stuff like \* with * -const globMagic = /[?*]|[+@!]\(.*?\)|\[|\]/; -const regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&'); -class Minimatch { - options; - set; - pattern; - windowsPathsNoEscape; - nonegate; - negate; - comment; - empty; - preserveMultipleSlashes; - partial; - globSet; - globParts; - nocase; - isWindows; - platform; - windowsNoMagicRoot; - regexp; - constructor(pattern, options = {}) { - (0, assert_valid_pattern_js_1.assertValidPattern)(pattern); - options = options || {}; - this.options = options; - this.pattern = pattern; - this.platform = options.platform || defaultPlatform; - this.isWindows = this.platform === 'win32'; - this.windowsPathsNoEscape = - !!options.windowsPathsNoEscape || options.allowWindowsEscape === false; - if (this.windowsPathsNoEscape) { - this.pattern = this.pattern.replace(/\\/g, '/'); - } - this.preserveMultipleSlashes = !!options.preserveMultipleSlashes; - this.regexp = null; - this.negate = false; - this.nonegate = !!options.nonegate; - this.comment = false; - this.empty = false; - this.partial = !!options.partial; - this.nocase = !!this.options.nocase; - this.windowsNoMagicRoot = - options.windowsNoMagicRoot !== undefined - ? options.windowsNoMagicRoot - : !!(this.isWindows && this.nocase); - this.globSet = []; - this.globParts = []; - this.set = []; - // make the set of regexps etc. - this.make(); - } - hasMagic() { - if (this.options.magicalBraces && this.set.length > 1) { - return true; - } - for (const pattern of this.set) { - for (const part of pattern) { - if (typeof part !== 'string') - return true; - } - } - return false; - } - debug(..._) { } - make() { - const pattern = this.pattern; - const options = this.options; - // empty patterns and comments match nothing. - if (!options.nocomment && pattern.charAt(0) === '#') { - this.comment = true; - return; - } - if (!pattern) { - this.empty = true; - return; - } - // step 1: figure out negation, etc. - this.parseNegate(); - // step 2: expand braces - this.globSet = [...new Set(this.braceExpand())]; - if (options.debug) { - this.debug = (...args) => console.error(...args); - } - this.debug(this.pattern, this.globSet); - // step 3: now we have a set, so turn each one into a series of - // path-portion matching patterns. - // These will be regexps, except in the case of "**", which is - // set to the GLOBSTAR object for globstar behavior, - // and will not contain any / characters - // - // First, we preprocess to make the glob pattern sets a bit simpler - // and deduped. There are some perf-killing patterns that can cause - // problems with a glob walk, but we can simplify them down a bit. - const rawGlobParts = this.globSet.map(s => this.slashSplit(s)); - this.globParts = this.preprocess(rawGlobParts); - this.debug(this.pattern, this.globParts); - // glob --> regexps - let set = this.globParts.map((s, _, __) => { - if (this.isWindows && this.windowsNoMagicRoot) { - // check if it's a drive or unc path. - const isUNC = s[0] === '' && - s[1] === '' && - (s[2] === '?' || !globMagic.test(s[2])) && - !globMagic.test(s[3]); - const isDrive = /^[a-z]:/i.test(s[0]); - if (isUNC) { - return [...s.slice(0, 4), ...s.slice(4).map(ss => this.parse(ss))]; - } - else if (isDrive) { - return [s[0], ...s.slice(1).map(ss => this.parse(ss))]; - } - } - return s.map(ss => this.parse(ss)); - }); - this.debug(this.pattern, set); - // filter out everything that didn't compile properly. - this.set = set.filter(s => s.indexOf(false) === -1); - // do not treat the ? in UNC paths as magic - if (this.isWindows) { - for (let i = 0; i < this.set.length; i++) { - const p = this.set[i]; - if (p[0] === '' && - p[1] === '' && - this.globParts[i][2] === '?' && - typeof p[3] === 'string' && - /^[a-z]:$/i.test(p[3])) { - p[2] = '?'; - } - } - } - this.debug(this.pattern, this.set); - } - // various transforms to equivalent pattern sets that are - // faster to process in a filesystem walk. The goal is to - // eliminate what we can, and push all ** patterns as far - // to the right as possible, even if it increases the number - // of patterns that we have to process. - preprocess(globParts) { - // if we're not in globstar mode, then turn all ** into * - if (this.options.noglobstar) { - for (let i = 0; i < globParts.length; i++) { - for (let j = 0; j < globParts[i].length; j++) { - if (globParts[i][j] === '**') { - globParts[i][j] = '*'; - } - } - } - } - const { optimizationLevel = 1 } = this.options; - if (optimizationLevel >= 2) { - // aggressive optimization for the purpose of fs walking - globParts = this.firstPhasePreProcess(globParts); - globParts = this.secondPhasePreProcess(globParts); - } - else if (optimizationLevel >= 1) { - // just basic optimizations to remove some .. parts - globParts = this.levelOneOptimize(globParts); - } - else { - // just collapse multiple ** portions into one - globParts = this.adjascentGlobstarOptimize(globParts); - } - return globParts; - } - // just get rid of adjascent ** portions - adjascentGlobstarOptimize(globParts) { - return globParts.map(parts => { - let gs = -1; - while (-1 !== (gs = parts.indexOf('**', gs + 1))) { - let i = gs; - while (parts[i + 1] === '**') { - i++; - } - if (i !== gs) { - parts.splice(gs, i - gs); - } - } - return parts; - }); - } - // get rid of adjascent ** and resolve .. portions - levelOneOptimize(globParts) { - return globParts.map(parts => { - parts = parts.reduce((set, part) => { - const prev = set[set.length - 1]; - if (part === '**' && prev === '**') { - return set; - } - if (part === '..') { - if (prev && prev !== '..' && prev !== '.' && prev !== '**') { - set.pop(); - return set; - } - } - set.push(part); - return set; - }, []); - return parts.length === 0 ? [''] : parts; - }); - } - levelTwoFileOptimize(parts) { - if (!Array.isArray(parts)) { - parts = this.slashSplit(parts); - } - let didSomething = false; - do { - didSomething = false; - //

              // -> 
              /
              -            if (!this.preserveMultipleSlashes) {
              -                for (let i = 1; i < parts.length - 1; i++) {
              -                    const p = parts[i];
              -                    // don't squeeze out UNC patterns
              -                    if (i === 1 && p === '' && parts[0] === '')
              -                        continue;
              -                    if (p === '.' || p === '') {
              -                        didSomething = true;
              -                        parts.splice(i, 1);
              -                        i--;
              -                    }
              -                }
              -                if (parts[0] === '.' &&
              -                    parts.length === 2 &&
              -                    (parts[1] === '.' || parts[1] === '')) {
              -                    didSomething = true;
              -                    parts.pop();
              -                }
              -            }
              -            // 
              /

              /../ ->

              /
              -            let dd = 0;
              -            while (-1 !== (dd = parts.indexOf('..', dd + 1))) {
              -                const p = parts[dd - 1];
              -                if (p && p !== '.' && p !== '..' && p !== '**') {
              -                    didSomething = true;
              -                    parts.splice(dd - 1, 2);
              -                    dd -= 2;
              -                }
              -            }
              -        } while (didSomething);
              -        return parts.length === 0 ? [''] : parts;
              -    }
              -    // First phase: single-pattern processing
              -    // 
               is 1 or more portions
              -    //  is 1 or more portions
              -    // 

              is any portion other than ., .., '', or ** - // is . or '' - // - // **/.. is *brutal* for filesystem walking performance, because - // it effectively resets the recursive walk each time it occurs, - // and ** cannot be reduced out by a .. pattern part like a regexp - // or most strings (other than .., ., and '') can be. - // - //

              /**/../

              /

              / -> {

              /../

              /

              /,

              /**/

              /

              /} - //

              // -> 
              /
              -    // 
              /

              /../ ->

              /
              -    // **/**/ -> **/
              -    //
              -    // **/*/ -> */**/ <== not valid because ** doesn't follow
              -    // this WOULD be allowed if ** did follow symlinks, or * didn't
              -    firstPhasePreProcess(globParts) {
              -        let didSomething = false;
              -        do {
              -            didSomething = false;
              -            // 
              /**/../

              /

              / -> {

              /../

              /

              /,

              /**/

              /

              /} - for (let parts of globParts) { - let gs = -1; - while (-1 !== (gs = parts.indexOf('**', gs + 1))) { - let gss = gs; - while (parts[gss + 1] === '**') { - //

              /**/**/ -> 
              /**/
              -                        gss++;
              -                    }
              -                    // eg, if gs is 2 and gss is 4, that means we have 3 **
              -                    // parts, and can remove 2 of them.
              -                    if (gss > gs) {
              -                        parts.splice(gs + 1, gss - gs);
              -                    }
              -                    let next = parts[gs + 1];
              -                    const p = parts[gs + 2];
              -                    const p2 = parts[gs + 3];
              -                    if (next !== '..')
              -                        continue;
              -                    if (!p ||
              -                        p === '.' ||
              -                        p === '..' ||
              -                        !p2 ||
              -                        p2 === '.' ||
              -                        p2 === '..') {
              -                        continue;
              -                    }
              -                    didSomething = true;
              -                    // edit parts in place, and push the new one
              -                    parts.splice(gs, 1);
              -                    const other = parts.slice(0);
              -                    other[gs] = '**';
              -                    globParts.push(other);
              -                    gs--;
              -                }
              -                // 
              // -> 
              /
              -                if (!this.preserveMultipleSlashes) {
              -                    for (let i = 1; i < parts.length - 1; i++) {
              -                        const p = parts[i];
              -                        // don't squeeze out UNC patterns
              -                        if (i === 1 && p === '' && parts[0] === '')
              -                            continue;
              -                        if (p === '.' || p === '') {
              -                            didSomething = true;
              -                            parts.splice(i, 1);
              -                            i--;
              -                        }
              -                    }
              -                    if (parts[0] === '.' &&
              -                        parts.length === 2 &&
              -                        (parts[1] === '.' || parts[1] === '')) {
              -                        didSomething = true;
              -                        parts.pop();
              -                    }
              -                }
              -                // 
              /

              /../ ->

              /
              -                let dd = 0;
              -                while (-1 !== (dd = parts.indexOf('..', dd + 1))) {
              -                    const p = parts[dd - 1];
              -                    if (p && p !== '.' && p !== '..' && p !== '**') {
              -                        didSomething = true;
              -                        const needDot = dd === 1 && parts[dd + 1] === '**';
              -                        const splin = needDot ? ['.'] : [];
              -                        parts.splice(dd - 1, 2, ...splin);
              -                        if (parts.length === 0)
              -                            parts.push('');
              -                        dd -= 2;
              -                    }
              -                }
              -            }
              -        } while (didSomething);
              -        return globParts;
              -    }
              -    // second phase: multi-pattern dedupes
              -    // {
              /*/,
              /

              /} ->

              /*/
              -    // {
              /,
              /} -> 
              /
              -    // {
              /**/,
              /} -> 
              /**/
              -    //
              -    // {
              /**/,
              /**/

              /} ->

              /**/
              -    // ^-- not valid because ** doens't follow symlinks
              -    secondPhasePreProcess(globParts) {
              -        for (let i = 0; i < globParts.length - 1; i++) {
              -            for (let j = i + 1; j < globParts.length; j++) {
              -                const matched = this.partsMatch(globParts[i], globParts[j], !this.preserveMultipleSlashes);
              -                if (matched) {
              -                    globParts[i] = [];
              -                    globParts[j] = matched;
              -                    break;
              -                }
              -            }
              -        }
              -        return globParts.filter(gs => gs.length);
              -    }
              -    partsMatch(a, b, emptyGSMatch = false) {
              -        let ai = 0;
              -        let bi = 0;
              -        let result = [];
              -        let which = '';
              -        while (ai < a.length && bi < b.length) {
              -            if (a[ai] === b[bi]) {
              -                result.push(which === 'b' ? b[bi] : a[ai]);
              -                ai++;
              -                bi++;
              -            }
              -            else if (emptyGSMatch && a[ai] === '**' && b[bi] === a[ai + 1]) {
              -                result.push(a[ai]);
              -                ai++;
              -            }
              -            else if (emptyGSMatch && b[bi] === '**' && a[ai] === b[bi + 1]) {
              -                result.push(b[bi]);
              -                bi++;
              -            }
              -            else if (a[ai] === '*' &&
              -                b[bi] &&
              -                (this.options.dot || !b[bi].startsWith('.')) &&
              -                b[bi] !== '**') {
              -                if (which === 'b')
              -                    return false;
              -                which = 'a';
              -                result.push(a[ai]);
              -                ai++;
              -                bi++;
              -            }
              -            else if (b[bi] === '*' &&
              -                a[ai] &&
              -                (this.options.dot || !a[ai].startsWith('.')) &&
              -                a[ai] !== '**') {
              -                if (which === 'a')
              -                    return false;
              -                which = 'b';
              -                result.push(b[bi]);
              -                ai++;
              -                bi++;
              -            }
              -            else {
              -                return false;
              -            }
              -        }
              -        // if we fall out of the loop, it means they two are identical
              -        // as long as their lengths match
              -        return a.length === b.length && result;
              -    }
              -    parseNegate() {
              -        if (this.nonegate)
              -            return;
              -        const pattern = this.pattern;
              -        let negate = false;
              -        let negateOffset = 0;
              -        for (let i = 0; i < pattern.length && pattern.charAt(i) === '!'; i++) {
              -            negate = !negate;
              -            negateOffset++;
              -        }
              -        if (negateOffset)
              -            this.pattern = pattern.slice(negateOffset);
              -        this.negate = negate;
              -    }
              -    // set partial to true to test if, for example,
              -    // "/a/b" matches the start of "/*/b/*/d"
              -    // Partial means, if you run out of file before you run
              -    // out of pattern, then that's fine, as long as all
              -    // the parts match.
              -    matchOne(file, pattern, partial = false) {
              -        const options = this.options;
              -        // UNC paths like //?/X:/... can match X:/... and vice versa
              -        // Drive letters in absolute drive or unc paths are always compared
              -        // case-insensitively.
              -        if (this.isWindows) {
              -            const fileDrive = typeof file[0] === 'string' && /^[a-z]:$/i.test(file[0]);
              -            const fileUNC = !fileDrive &&
              -                file[0] === '' &&
              -                file[1] === '' &&
              -                file[2] === '?' &&
              -                /^[a-z]:$/i.test(file[3]);
              -            const patternDrive = typeof pattern[0] === 'string' && /^[a-z]:$/i.test(pattern[0]);
              -            const patternUNC = !patternDrive &&
              -                pattern[0] === '' &&
              -                pattern[1] === '' &&
              -                pattern[2] === '?' &&
              -                typeof pattern[3] === 'string' &&
              -                /^[a-z]:$/i.test(pattern[3]);
              -            const fdi = fileUNC ? 3 : fileDrive ? 0 : undefined;
              -            const pdi = patternUNC ? 3 : patternDrive ? 0 : undefined;
              -            if (typeof fdi === 'number' && typeof pdi === 'number') {
              -                const [fd, pd] = [file[fdi], pattern[pdi]];
              -                if (fd.toLowerCase() === pd.toLowerCase()) {
              -                    pattern[pdi] = fd;
              -                    if (pdi > fdi) {
              -                        pattern = pattern.slice(pdi);
              -                    }
              -                    else if (fdi > pdi) {
              -                        file = file.slice(fdi);
              -                    }
              -                }
              -            }
              -        }
              -        // resolve and reduce . and .. portions in the file as well.
              -        // dont' need to do the second phase, because it's only one string[]
              -        const { optimizationLevel = 1 } = this.options;
              -        if (optimizationLevel >= 2) {
              -            file = this.levelTwoFileOptimize(file);
              -        }
              -        this.debug('matchOne', this, { file, pattern });
              -        this.debug('matchOne', file.length, pattern.length);
              -        for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
              -            this.debug('matchOne loop');
              -            var p = pattern[pi];
              -            var f = file[fi];
              -            this.debug(pattern, p, f);
              -            // should be impossible.
              -            // some invalid regexp stuff in the set.
              -            /* c8 ignore start */
              -            if (p === false) {
              -                return false;
              -            }
              -            /* c8 ignore stop */
              -            if (p === exports.GLOBSTAR) {
              -                this.debug('GLOBSTAR', [pattern, p, f]);
              -                // "**"
              -                // a/**/b/**/c would match the following:
              -                // a/b/x/y/z/c
              -                // a/x/y/z/b/c
              -                // a/b/x/b/x/c
              -                // a/b/c
              -                // To do this, take the rest of the pattern after
              -                // the **, and see if it would match the file remainder.
              -                // If so, return success.
              -                // If not, the ** "swallows" a segment, and try again.
              -                // This is recursively awful.
              -                //
              -                // a/**/b/**/c matching a/b/x/y/z/c
              -                // - a matches a
              -                // - doublestar
              -                //   - matchOne(b/x/y/z/c, b/**/c)
              -                //     - b matches b
              -                //     - doublestar
              -                //       - matchOne(x/y/z/c, c) -> no
              -                //       - matchOne(y/z/c, c) -> no
              -                //       - matchOne(z/c, c) -> no
              -                //       - matchOne(c, c) yes, hit
              -                var fr = fi;
              -                var pr = pi + 1;
              -                if (pr === pl) {
              -                    this.debug('** at the end');
              -                    // a ** at the end will just swallow the rest.
              -                    // We have found a match.
              -                    // however, it will not swallow /.x, unless
              -                    // options.dot is set.
              -                    // . and .. are *never* matched by **, for explosively
              -                    // exponential reasons.
              -                    for (; fi < fl; fi++) {
              -                        if (file[fi] === '.' ||
              -                            file[fi] === '..' ||
              -                            (!options.dot && file[fi].charAt(0) === '.'))
              -                            return false;
              -                    }
              -                    return true;
              -                }
              -                // ok, let's see if we can swallow whatever we can.
              -                while (fr < fl) {
              -                    var swallowee = file[fr];
              -                    this.debug('\nglobstar while', file, fr, pattern, pr, swallowee);
              -                    // XXX remove this slice.  Just pass the start index.
              -                    if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
              -                        this.debug('globstar found match!', fr, fl, swallowee);
              -                        // found a match.
              -                        return true;
              -                    }
              -                    else {
              -                        // can't swallow "." or ".." ever.
              -                        // can only swallow ".foo" when explicitly asked.
              -                        if (swallowee === '.' ||
              -                            swallowee === '..' ||
              -                            (!options.dot && swallowee.charAt(0) === '.')) {
              -                            this.debug('dot detected!', file, fr, pattern, pr);
              -                            break;
              -                        }
              -                        // ** swallows a segment, and continue.
              -                        this.debug('globstar swallow a segment, and continue');
              -                        fr++;
              -                    }
              -                }
              -                // no match was found.
              -                // However, in partial mode, we can't say this is necessarily over.
              -                /* c8 ignore start */
              -                if (partial) {
              -                    // ran out of file
              -                    this.debug('\n>>> no match, partial?', file, fr, pattern, pr);
              -                    if (fr === fl) {
              -                        return true;
              -                    }
              -                }
              -                /* c8 ignore stop */
              -                return false;
              -            }
              -            // something other than **
              -            // non-magic patterns just have to match exactly
              -            // patterns with magic have been turned into regexps.
              -            let hit;
              -            if (typeof p === 'string') {
              -                hit = f === p;
              -                this.debug('string match', p, f, hit);
              -            }
              -            else {
              -                hit = p.test(f);
              -                this.debug('pattern match', p, f, hit);
              -            }
              -            if (!hit)
              -                return false;
              -        }
              -        // Note: ending in / means that we'll get a final ""
              -        // at the end of the pattern.  This can only match a
              -        // corresponding "" at the end of the file.
              -        // If the file ends in /, then it can only match a
              -        // a pattern that ends in /, unless the pattern just
              -        // doesn't have any more for it. But, a/b/ should *not*
              -        // match "a/b/*", even though "" matches against the
              -        // [^/]*? pattern, except in partial mode, where it might
              -        // simply not be reached yet.
              -        // However, a/b/ should still satisfy a/*
              -        // now either we fell off the end of the pattern, or we're done.
              -        if (fi === fl && pi === pl) {
              -            // ran out of pattern and filename at the same time.
              -            // an exact hit!
              -            return true;
              -        }
              -        else if (fi === fl) {
              -            // ran out of file, but still had pattern left.
              -            // this is ok if we're doing the match as part of
              -            // a glob fs traversal.
              -            return partial;
              -        }
              -        else if (pi === pl) {
              -            // ran out of pattern, still have file left.
              -            // this is only acceptable if we're on the very last
              -            // empty segment of a file with a trailing slash.
              -            // a/* should match a/b/
              -            return fi === fl - 1 && file[fi] === '';
              -            /* c8 ignore start */
              -        }
              -        else {
              -            // should be unreachable.
              -            throw new Error('wtf?');
              -        }
              -        /* c8 ignore stop */
              -    }
              -    braceExpand() {
              -        return (0, exports.braceExpand)(this.pattern, this.options);
              -    }
              -    parse(pattern) {
              -        (0, assert_valid_pattern_js_1.assertValidPattern)(pattern);
              -        const options = this.options;
              -        // shortcuts
              -        if (pattern === '**')
              -            return exports.GLOBSTAR;
              -        if (pattern === '')
              -            return '';
              -        // far and away, the most common glob pattern parts are
              -        // *, *.*, and *.  Add a fast check method for those.
              -        let m;
              -        let fastTest = null;
              -        if ((m = pattern.match(starRE))) {
              -            fastTest = options.dot ? starTestDot : starTest;
              -        }
              -        else if ((m = pattern.match(starDotExtRE))) {
              -            fastTest = (options.nocase
              -                ? options.dot
              -                    ? starDotExtTestNocaseDot
              -                    : starDotExtTestNocase
              -                : options.dot
              -                    ? starDotExtTestDot
              -                    : starDotExtTest)(m[1]);
              -        }
              -        else if ((m = pattern.match(qmarksRE))) {
              -            fastTest = (options.nocase
              -                ? options.dot
              -                    ? qmarksTestNocaseDot
              -                    : qmarksTestNocase
              -                : options.dot
              -                    ? qmarksTestDot
              -                    : qmarksTest)(m);
              -        }
              -        else if ((m = pattern.match(starDotStarRE))) {
              -            fastTest = options.dot ? starDotStarTestDot : starDotStarTest;
              -        }
              -        else if ((m = pattern.match(dotStarRE))) {
              -            fastTest = dotStarTest;
              -        }
              -        const re = ast_js_1.AST.fromGlob(pattern, this.options).toMMPattern();
              -        if (fastTest && typeof re === 'object') {
              -            // Avoids overriding in frozen environments
              -            Reflect.defineProperty(re, 'test', { value: fastTest });
              -        }
              -        return re;
              -    }
              -    makeRe() {
              -        if (this.regexp || this.regexp === false)
              -            return this.regexp;
              -        // at this point, this.set is a 2d array of partial
              -        // pattern strings, or "**".
              -        //
              -        // It's better to use .match().  This function shouldn't
              -        // be used, really, but it's pretty convenient sometimes,
              -        // when you just want to work with a regex.
              -        const set = this.set;
              -        if (!set.length) {
              -            this.regexp = false;
              -            return this.regexp;
              -        }
              -        const options = this.options;
              -        const twoStar = options.noglobstar
              -            ? star
              -            : options.dot
              -                ? twoStarDot
              -                : twoStarNoDot;
              -        const flags = new Set(options.nocase ? ['i'] : []);
              -        // regexpify non-globstar patterns
              -        // if ** is only item, then we just do one twoStar
              -        // if ** is first, and there are more, prepend (\/|twoStar\/)? to next
              -        // if ** is last, append (\/twoStar|) to previous
              -        // if ** is in the middle, append (\/|\/twoStar\/) to previous
              -        // then filter out GLOBSTAR symbols
              -        let re = set
              -            .map(pattern => {
              -            const pp = pattern.map(p => {
              -                if (p instanceof RegExp) {
              -                    for (const f of p.flags.split(''))
              -                        flags.add(f);
              -                }
              -                return typeof p === 'string'
              -                    ? regExpEscape(p)
              -                    : p === exports.GLOBSTAR
              -                        ? exports.GLOBSTAR
              -                        : p._src;
              -            });
              -            pp.forEach((p, i) => {
              -                const next = pp[i + 1];
              -                const prev = pp[i - 1];
              -                if (p !== exports.GLOBSTAR || prev === exports.GLOBSTAR) {
              -                    return;
              -                }
              -                if (prev === undefined) {
              -                    if (next !== undefined && next !== exports.GLOBSTAR) {
              -                        pp[i + 1] = '(?:\\/|' + twoStar + '\\/)?' + next;
              -                    }
              -                    else {
              -                        pp[i] = twoStar;
              -                    }
              -                }
              -                else if (next === undefined) {
              -                    pp[i - 1] = prev + '(?:\\/|' + twoStar + ')?';
              -                }
              -                else if (next !== exports.GLOBSTAR) {
              -                    pp[i - 1] = prev + '(?:\\/|\\/' + twoStar + '\\/)' + next;
              -                    pp[i + 1] = exports.GLOBSTAR;
              -                }
              -            });
              -            return pp.filter(p => p !== exports.GLOBSTAR).join('/');
              -        })
              -            .join('|');
              -        // need to wrap in parens if we had more than one thing with |,
              -        // otherwise only the first will be anchored to ^ and the last to $
              -        const [open, close] = set.length > 1 ? ['(?:', ')'] : ['', ''];
              -        // must match entire pattern
              -        // ending in a * or ** will make it less strict.
              -        re = '^' + open + re + close + '$';
              -        // can match anything, as long as it's not this.
              -        if (this.negate)
              -            re = '^(?!' + re + ').+$';
              -        try {
              -            this.regexp = new RegExp(re, [...flags].join(''));
              -            /* c8 ignore start */
              -        }
              -        catch (ex) {
              -            // should be impossible
              -            this.regexp = false;
              -        }
              -        /* c8 ignore stop */
              -        return this.regexp;
              -    }
              -    slashSplit(p) {
              -        // if p starts with // on windows, we preserve that
              -        // so that UNC paths aren't broken.  Otherwise, any number of
              -        // / characters are coalesced into one, unless
              -        // preserveMultipleSlashes is set to true.
              -        if (this.preserveMultipleSlashes) {
              -            return p.split('/');
              -        }
              -        else if (this.isWindows && /^\/\/[^\/]+/.test(p)) {
              -            // add an extra '' for the one we lose
              -            return ['', ...p.split(/\/+/)];
              -        }
              -        else {
              -            return p.split(/\/+/);
              -        }
              -    }
              -    match(f, partial = this.partial) {
              -        this.debug('match', f, this.pattern);
              -        // short-circuit in the case of busted things.
              -        // comments, etc.
              -        if (this.comment) {
              -            return false;
              -        }
              -        if (this.empty) {
              -            return f === '';
              -        }
              -        if (f === '/' && partial) {
              -            return true;
              -        }
              -        const options = this.options;
              -        // windows: need to use /, not \
              -        if (this.isWindows) {
              -            f = f.split('\\').join('/');
              -        }
              -        // treat the test path as a set of pathparts.
              -        const ff = this.slashSplit(f);
              -        this.debug(this.pattern, 'split', ff);
              -        // just ONE of the pattern sets in this.set needs to match
              -        // in order for it to be valid.  If negating, then just one
              -        // match means that we have failed.
              -        // Either way, return on the first hit.
              -        const set = this.set;
              -        this.debug(this.pattern, 'set', set);
              -        // Find the basename of the path by looking for the last non-empty segment
              -        let filename = ff[ff.length - 1];
              -        if (!filename) {
              -            for (let i = ff.length - 2; !filename && i >= 0; i--) {
              -                filename = ff[i];
              -            }
              -        }
              -        for (let i = 0; i < set.length; i++) {
              -            const pattern = set[i];
              -            let file = ff;
              -            if (options.matchBase && pattern.length === 1) {
              -                file = [filename];
              -            }
              -            const hit = this.matchOne(file, pattern, partial);
              -            if (hit) {
              -                if (options.flipNegate) {
              -                    return true;
              -                }
              -                return !this.negate;
              -            }
              -        }
              -        // didn't get any hits.  this is success if it's a negative
              -        // pattern, failure otherwise.
              -        if (options.flipNegate) {
              -            return false;
              -        }
              -        return this.negate;
              -    }
              -    static defaults(def) {
              -        return exports.minimatch.defaults(def).Minimatch;
              -    }
              -}
              -exports.Minimatch = Minimatch;
              -/* c8 ignore start */
              -var ast_js_2 = require("./ast.js");
              -Object.defineProperty(exports, "AST", { enumerable: true, get: function () { return ast_js_2.AST; } });
              -var escape_js_2 = require("./escape.js");
              -Object.defineProperty(exports, "escape", { enumerable: true, get: function () { return escape_js_2.escape; } });
              -var unescape_js_2 = require("./unescape.js");
              -Object.defineProperty(exports, "unescape", { enumerable: true, get: function () { return unescape_js_2.unescape; } });
              -/* c8 ignore stop */
              -exports.minimatch.AST = ast_js_1.AST;
              -exports.minimatch.Minimatch = Minimatch;
              -exports.minimatch.escape = escape_js_1.escape;
              -exports.minimatch.unescape = unescape_js_1.unescape;
              -//# sourceMappingURL=index.js.map
              \ No newline at end of file
              diff --git a/node_modules/mocha/node_modules/minimatch/dist/commonjs/index.js.map b/node_modules/mocha/node_modules/minimatch/dist/commonjs/index.js.map
              deleted file mode 100644
              index d4f6a870..00000000
              --- a/node_modules/mocha/node_modules/minimatch/dist/commonjs/index.js.map
              +++ /dev/null
              @@ -1 +0,0 @@
              -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;AAAA,sEAAoC;AACpC,uEAA8D;AAC9D,qCAA2C;AAC3C,2CAAoC;AACpC,+CAAwC;AAsCjC,MAAM,SAAS,GAAG,CACvB,CAAS,EACT,OAAe,EACf,UAA4B,EAAE,EAC9B,EAAE;IACF,IAAA,4CAAkB,EAAC,OAAO,CAAC,CAAA;IAE3B,oCAAoC;IACpC,IAAI,CAAC,OAAO,CAAC,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE;QACnD,OAAO,KAAK,CAAA;KACb;IAED,OAAO,IAAI,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;AACjD,CAAC,CAAA;AAbY,QAAA,SAAS,aAarB;AAED,wDAAwD;AACxD,MAAM,YAAY,GAAG,uBAAuB,CAAA;AAC5C,MAAM,cAAc,GAAG,CAAC,GAAW,EAAE,EAAE,CAAC,CAAC,CAAS,EAAE,EAAE,CACpD,CAAC,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAA;AACvC,MAAM,iBAAiB,GAAG,CAAC,GAAW,EAAE,EAAE,CAAC,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAA;AACzE,MAAM,oBAAoB,GAAG,CAAC,GAAW,EAAE,EAAE;IAC3C,GAAG,GAAG,GAAG,CAAC,WAAW,EAAE,CAAA;IACvB,OAAO,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,I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AAQ,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,CAAA;YACjD,IAAI,GAAG,EAAE;gBACP,IAAI,OAAO,CAAC,UAAU,EAAE;oBACtB,OAAO,IAAI,CAAA;iBACZ;gBACD,OAAO,CAAC,IAAI,CAAC,MAAM,CAAA;aACpB;SACF;QAED,2DAA2D;QAC3D,8BAA8B;QAC9B,IAAI,OAAO,CAAC,UAAU,EAAE;YACtB,OAAO,KAAK,CAAA;SACb;QACD,OAAO,IAAI,CAAC,MAAM,CAAA;IACpB,CAAC;IAED,MAAM,CAAC,QAAQ,CAAC,GAAqB;QACnC,OAAO,iBAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,SAAS,CAAA;IAC1C,CAAC;CACF;AAl4BD,8BAk4BC;AACD,qBAAqB;AACrB,mCAA8B;AAArB,6FAAA,GAAG,OAAA;AACZ,yCAAoC;AAA3B,mGAAA,MAAM,OAAA;AACf,6CAAwC;AAA/B,uGAAA,QAAQ,OAAA;AACjB,oBAAoB;AACpB,iBAAS,CAAC,GAAG,GAAG,YAAG,CAAA;AACnB,iBAAS,CAAC,SAAS,GAAG,SAAS,CAAA;AAC/B,iBAAS,CAAC,MAAM,GAAG,kBAAM,CAAA;AACzB,iBAAS,CAAC,QAAQ,GAAG,sBAAQ,CAAA","sourcesContent":["import expand from 'brace-expansion'\nimport { assertValidPattern } from './assert-valid-pattern.js'\nimport { AST, ExtglobType } from './ast.js'\nimport { escape } from './escape.js'\nimport { unescape } from './unescape.js'\n\ntype Platform =\n  | 'aix'\n  | 'android'\n  | 'darwin'\n  | 'freebsd'\n  | 'haiku'\n  | 'linux'\n  | 'openbsd'\n  | 'sunos'\n  | 'win32'\n  | 'cygwin'\n  | 'netbsd'\n\nexport interface MinimatchOptions {\n  nobrace?: boolean\n  nocomment?: boolean\n  nonegate?: boolean\n  debug?: boolean\n  noglobstar?: boolean\n  noext?: boolean\n  nonull?: boolean\n  windowsPathsNoEscape?: boolean\n  allowWindowsEscape?: boolean\n  partial?: boolean\n  dot?: boolean\n  nocase?: boolean\n  nocaseMagicOnly?: boolean\n  magicalBraces?: boolean\n  matchBase?: boolean\n  flipNegate?: boolean\n  preserveMultipleSlashes?: boolean\n  optimizationLevel?: number\n  platform?: Platform\n  windowsNoMagicRoot?: boolean\n}\n\nexport const minimatch = (\n  p: string,\n  pattern: string,\n  options: MinimatchOptions = {}\n) => {\n  assertValidPattern(pattern)\n\n  // shortcut: comments match nothing.\n  if (!options.nocomment && pattern.charAt(0) === '#') {\n    return false\n  }\n\n  return new Minimatch(pattern, options).match(p)\n}\n\n// Optimized checking for the most common glob patterns.\nconst starDotExtRE = /^\\*+([^+@!?\\*\\[\\(]*)$/\nconst starDotExtTest = (ext: string) => (f: string) =>\n  !f.startsWith('.') && f.endsWith(ext)\nconst starDotExtTestDot = (ext: string) => (f: string) => f.endsWith(ext)\nconst starDotExtTestNocase = (ext: string) => {\n  ext = ext.toLowerCase()\n  return (f: string) => !f.startsWith('.') && f.toLowerCase().endsWith(ext)\n}\nconst starDotExtTestNocaseDot = (ext: string) => {\n  ext = ext.toLowerCase()\n  return (f: string) => f.toLowerCase().endsWith(ext)\n}\nconst starDotStarRE = /^\\*+\\.\\*+$/\nconst starDotStarTest = (f: string) => !f.startsWith('.') && f.includes('.')\nconst starDotStarTestDot = (f: string) =>\n  f !== '.' && f !== '..' && f.includes('.')\nconst dotStarRE = /^\\.\\*+$/\nconst dotStarTest = (f: string) => f !== '.' && f !== '..' && f.startsWith('.')\nconst starRE = /^\\*+$/\nconst starTest = (f: string) => f.length !== 0 && !f.startsWith('.')\nconst starTestDot = (f: string) => f.length !== 0 && f !== '.' && f !== '..'\nconst qmarksRE = /^\\?+([^+@!?\\*\\[\\(]*)?$/\nconst qmarksTestNocase = ([$0, ext = '']: RegExpMatchArray) => {\n  const noext = qmarksTestNoExt([$0])\n  if (!ext) return noext\n  ext = ext.toLowerCase()\n  return (f: string) => noext(f) && f.toLowerCase().endsWith(ext)\n}\nconst qmarksTestNocaseDot = ([$0, ext = '']: RegExpMatchArray) => {\n  const noext = qmarksTestNoExtDot([$0])\n  if (!ext) return noext\n  ext = ext.toLowerCase()\n  return (f: string) => noext(f) && f.toLowerCase().endsWith(ext)\n}\nconst qmarksTestDot = ([$0, ext = '']: RegExpMatchArray) => {\n  const noext = qmarksTestNoExtDot([$0])\n  return !ext ? noext : (f: string) => noext(f) && f.endsWith(ext)\n}\nconst qmarksTest = ([$0, ext = '']: RegExpMatchArray) => {\n  const noext = qmarksTestNoExt([$0])\n  return !ext ? noext : (f: string) => noext(f) && f.endsWith(ext)\n}\nconst qmarksTestNoExt = ([$0]: RegExpMatchArray) => {\n  const len = $0.length\n  return (f: string) => f.length === len && !f.startsWith('.')\n}\nconst qmarksTestNoExtDot = ([$0]: RegExpMatchArray) => {\n  const len = $0.length\n  return (f: string) => f.length === len && f !== '.' && f !== '..'\n}\n\n/* c8 ignore start */\nconst defaultPlatform: Platform = (\n  typeof process === 'object' && process\n    ? (typeof process.env === 'object' &&\n        process.env &&\n        process.env.__MINIMATCH_TESTING_PLATFORM__) ||\n      process.platform\n    : 'posix'\n) as Platform\ntype Sep = '\\\\' | '/'\nconst path: { [k: string]: { sep: Sep } } = {\n  win32: { sep: '\\\\' },\n  posix: { sep: '/' },\n}\n/* c8 ignore stop */\n\nexport const sep = defaultPlatform === 'win32' ? path.win32.sep : path.posix.sep\nminimatch.sep = sep\n\nexport const GLOBSTAR = Symbol('globstar **')\nminimatch.GLOBSTAR = GLOBSTAR\n\n// any single thing other than /\n// don't need to escape / when using new RegExp()\nconst qmark = '[^/]'\n\n// * => any number of characters\nconst star = qmark + '*?'\n\n// ** when dots are allowed.  Anything goes, except .. and .\n// not (^ or / followed by one or two dots followed by $ or /),\n// followed by anything, any number of times.\nconst twoStarDot = '(?:(?!(?:\\\\/|^)(?:\\\\.{1,2})($|\\\\/)).)*?'\n\n// not a ^ or / followed by a dot,\n// followed by anything, any number of times.\nconst twoStarNoDot = '(?:(?!(?:\\\\/|^)\\\\.).)*?'\n\nexport const filter =\n  (pattern: string, options: MinimatchOptions = {}) =>\n  (p: string) =>\n    minimatch(p, pattern, options)\nminimatch.filter = filter\n\nconst ext = (a: MinimatchOptions, b: MinimatchOptions = {}) =>\n  Object.assign({}, a, b)\n\nexport const defaults = (def: MinimatchOptions): typeof minimatch => {\n  if (!def || typeof def !== 'object' || !Object.keys(def).length) {\n    return minimatch\n  }\n\n  const orig = minimatch\n\n  const m = (p: string, pattern: string, options: MinimatchOptions = {}) =>\n    orig(p, pattern, ext(def, options))\n\n  return Object.assign(m, {\n    Minimatch: class Minimatch extends orig.Minimatch {\n      constructor(pattern: string, options: MinimatchOptions = {}) {\n        super(pattern, ext(def, options))\n      }\n      static defaults(options: MinimatchOptions) {\n        return orig.defaults(ext(def, options)).Minimatch\n      }\n    },\n\n    AST: class AST extends orig.AST {\n      /* c8 ignore start */\n      constructor(\n        type: ExtglobType | null,\n        parent?: AST,\n        options: MinimatchOptions = {}\n      ) {\n        super(type, parent, ext(def, options))\n      }\n      /* c8 ignore stop */\n\n      static fromGlob(pattern: string, options: MinimatchOptions = {}) {\n        return orig.AST.fromGlob(pattern, ext(def, options))\n      }\n    },\n\n    unescape: (\n      s: string,\n      options: Pick = {}\n    ) => orig.unescape(s, ext(def, options)),\n\n    escape: (\n      s: string,\n      options: Pick = {}\n    ) => orig.escape(s, ext(def, options)),\n\n    filter: (pattern: string, options: MinimatchOptions = {}) =>\n      orig.filter(pattern, ext(def, options)),\n\n    defaults: (options: MinimatchOptions) => orig.defaults(ext(def, options)),\n\n    makeRe: (pattern: string, options: MinimatchOptions = {}) =>\n      orig.makeRe(pattern, ext(def, options)),\n\n    braceExpand: (pattern: string, options: MinimatchOptions = {}) =>\n      orig.braceExpand(pattern, ext(def, options)),\n\n    match: (list: string[], pattern: string, options: MinimatchOptions = {}) =>\n      orig.match(list, pattern, ext(def, options)),\n\n    sep: orig.sep,\n    GLOBSTAR: GLOBSTAR as typeof GLOBSTAR,\n  })\n}\nminimatch.defaults = defaults\n\n// Brace expansion:\n// a{b,c}d -> abd acd\n// a{b,}c -> abc ac\n// a{0..3}d -> a0d a1d a2d a3d\n// a{b,c{d,e}f}g -> abg acdfg acefg\n// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg\n//\n// Invalid sets are not expanded.\n// a{2..}b -> a{2..}b\n// a{b}c -> a{b}c\nexport const braceExpand = (\n  pattern: string,\n  options: MinimatchOptions = {}\n) => {\n  assertValidPattern(pattern)\n\n  // Thanks to Yeting Li  for\n  // improving this regexp to avoid a ReDOS vulnerability.\n  if (options.nobrace || !/\\{(?:(?!\\{).)*\\}/.test(pattern)) {\n    // shortcut. no need to expand.\n    return [pattern]\n  }\n\n  return expand(pattern)\n}\nminimatch.braceExpand = braceExpand\n\n// parse a component of the expanded set.\n// At this point, no pattern may contain \"/\" in it\n// so we're going to return a 2d array, where each entry is the full\n// pattern, split on '/', and then turned into a regular expression.\n// A regexp is made at the end which joins each array with an\n// escaped /, and another full one which joins each regexp with |.\n//\n// Following the lead of Bash 4.1, note that \"**\" only has special meaning\n// when it is the *only* thing in a path portion.  Otherwise, any series\n// of * is equivalent to a single *.  Globstar behavior is enabled by\n// default, and can be disabled by setting options.noglobstar.\n\nexport const makeRe = (pattern: string, options: MinimatchOptions = {}) =>\n  new Minimatch(pattern, options).makeRe()\nminimatch.makeRe = makeRe\n\nexport const match = (\n  list: string[],\n  pattern: string,\n  options: MinimatchOptions = {}\n) => {\n  const mm = new Minimatch(pattern, options)\n  list = list.filter(f => mm.match(f))\n  if (mm.options.nonull && !list.length) {\n    list.push(pattern)\n  }\n  return list\n}\nminimatch.match = match\n\n// replace stuff like \\* with *\nconst globMagic = /[?*]|[+@!]\\(.*?\\)|\\[|\\]/\nconst regExpEscape = (s: string) =>\n  s.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&')\n\nexport type MMRegExp = RegExp & {\n  _src?: string\n  _glob?: string\n}\n\nexport type ParseReturnFiltered = string | MMRegExp | typeof GLOBSTAR\nexport type ParseReturn = ParseReturnFiltered | false\n\nexport class Minimatch {\n  options: MinimatchOptions\n  set: ParseReturnFiltered[][]\n  pattern: string\n\n  windowsPathsNoEscape: boolean\n  nonegate: boolean\n  negate: boolean\n  comment: boolean\n  empty: boolean\n  preserveMultipleSlashes: boolean\n  partial: boolean\n  globSet: string[]\n  globParts: string[][]\n  nocase: boolean\n\n  isWindows: boolean\n  platform: Platform\n  windowsNoMagicRoot: boolean\n\n  regexp: false | null | MMRegExp\n  constructor(pattern: string, options: MinimatchOptions = {}) {\n    assertValidPattern(pattern)\n\n    options = options || {}\n    this.options = options\n    this.pattern = pattern\n    this.platform = options.platform || defaultPlatform\n    this.isWindows = this.platform === 'win32'\n    this.windowsPathsNoEscape =\n      !!options.windowsPathsNoEscape || options.allowWindowsEscape === false\n    if (this.windowsPathsNoEscape) {\n      this.pattern = this.pattern.replace(/\\\\/g, '/')\n    }\n    this.preserveMultipleSlashes = !!options.preserveMultipleSlashes\n    this.regexp = null\n    this.negate = false\n    this.nonegate = !!options.nonegate\n    this.comment = false\n    this.empty = false\n    this.partial = !!options.partial\n    this.nocase = !!this.options.nocase\n    this.windowsNoMagicRoot =\n      options.windowsNoMagicRoot !== undefined\n        ? options.windowsNoMagicRoot\n        : !!(this.isWindows && this.nocase)\n\n    this.globSet = []\n    this.globParts = []\n    this.set = []\n\n    // make the set of regexps etc.\n    this.make()\n  }\n\n  hasMagic(): boolean {\n    if (this.options.magicalBraces && this.set.length > 1) {\n      return true\n    }\n    for (const pattern of this.set) {\n      for (const part of pattern) {\n        if (typeof part !== 'string') return true\n      }\n    }\n    return false\n  }\n\n  debug(..._: any[]) {}\n\n  make() {\n    const pattern = this.pattern\n    const options = this.options\n\n    // empty patterns and comments match nothing.\n    if (!options.nocomment && pattern.charAt(0) === '#') {\n      this.comment = true\n      return\n    }\n\n    if (!pattern) {\n      this.empty = true\n      return\n    }\n\n    // step 1: figure out negation, etc.\n    this.parseNegate()\n\n    // step 2: expand braces\n    this.globSet = [...new Set(this.braceExpand())]\n\n    if (options.debug) {\n      this.debug = (...args: any[]) => console.error(...args)\n    }\n\n    this.debug(this.pattern, this.globSet)\n\n    // step 3: now we have a set, so turn each one into a series of\n    // path-portion matching patterns.\n    // These will be regexps, except in the case of \"**\", which is\n    // set to the GLOBSTAR object for globstar behavior,\n    // and will not contain any / characters\n    //\n    // First, we preprocess to make the glob pattern sets a bit simpler\n    // and deduped.  There are some perf-killing patterns that can cause\n    // problems with a glob walk, but we can simplify them down a bit.\n    const rawGlobParts = this.globSet.map(s => this.slashSplit(s))\n    this.globParts = this.preprocess(rawGlobParts)\n    this.debug(this.pattern, this.globParts)\n\n    // glob --> regexps\n    let set = this.globParts.map((s, _, __) => {\n      if (this.isWindows && this.windowsNoMagicRoot) {\n        // check if it's a drive or unc path.\n        const isUNC =\n          s[0] === '' &&\n          s[1] === '' &&\n          (s[2] === '?' || !globMagic.test(s[2])) &&\n          !globMagic.test(s[3])\n        const isDrive = /^[a-z]:/i.test(s[0])\n        if (isUNC) {\n          return [...s.slice(0, 4), ...s.slice(4).map(ss => this.parse(ss))]\n        } else if (isDrive) {\n          return [s[0], ...s.slice(1).map(ss => this.parse(ss))]\n        }\n      }\n      return s.map(ss => this.parse(ss))\n    })\n\n    this.debug(this.pattern, set)\n\n    // filter out everything that didn't compile properly.\n    this.set = set.filter(\n      s => s.indexOf(false) === -1\n    ) as ParseReturnFiltered[][]\n\n    // do not treat the ? in UNC paths as magic\n    if (this.isWindows) {\n      for (let i = 0; i < this.set.length; i++) {\n        const p = this.set[i]\n        if (\n          p[0] === '' &&\n          p[1] === '' &&\n          this.globParts[i][2] === '?' &&\n          typeof p[3] === 'string' &&\n          /^[a-z]:$/i.test(p[3])\n        ) {\n          p[2] = '?'\n        }\n      }\n    }\n\n    this.debug(this.pattern, this.set)\n  }\n\n  // various transforms to equivalent pattern sets that are\n  // faster to process in a filesystem walk.  The goal is to\n  // eliminate what we can, and push all ** patterns as far\n  // to the right as possible, even if it increases the number\n  // of patterns that we have to process.\n  preprocess(globParts: string[][]) {\n    // if we're not in globstar mode, then turn all ** into *\n    if (this.options.noglobstar) {\n      for (let i = 0; i < globParts.length; i++) {\n        for (let j = 0; j < globParts[i].length; j++) {\n          if (globParts[i][j] === '**') {\n            globParts[i][j] = '*'\n          }\n        }\n      }\n    }\n\n    const { optimizationLevel = 1 } = this.options\n\n    if (optimizationLevel >= 2) {\n      // aggressive optimization for the purpose of fs walking\n      globParts = this.firstPhasePreProcess(globParts)\n      globParts = this.secondPhasePreProcess(globParts)\n    } else if (optimizationLevel >= 1) {\n      // just basic optimizations to remove some .. parts\n      globParts = this.levelOneOptimize(globParts)\n    } else {\n      // just collapse multiple ** portions into one\n      globParts = this.adjascentGlobstarOptimize(globParts)\n    }\n\n    return globParts\n  }\n\n  // just get rid of adjascent ** portions\n  adjascentGlobstarOptimize(globParts: string[][]) {\n    return globParts.map(parts => {\n      let gs: number = -1\n      while (-1 !== (gs = parts.indexOf('**', gs + 1))) {\n        let i = gs\n        while (parts[i + 1] === '**') {\n          i++\n        }\n        if (i !== gs) {\n          parts.splice(gs, i - gs)\n        }\n      }\n      return parts\n    })\n  }\n\n  // get rid of adjascent ** and resolve .. portions\n  levelOneOptimize(globParts: string[][]) {\n    return globParts.map(parts => {\n      parts = parts.reduce((set: string[], part) => {\n        const prev = set[set.length - 1]\n        if (part === '**' && prev === '**') {\n          return set\n        }\n        if (part === '..') {\n          if (prev && prev !== '..' && prev !== '.' && prev !== '**') {\n            set.pop()\n            return set\n          }\n        }\n        set.push(part)\n        return set\n      }, [])\n      return parts.length === 0 ? [''] : parts\n    })\n  }\n\n  levelTwoFileOptimize(parts: string | string[]) {\n    if (!Array.isArray(parts)) {\n      parts = this.slashSplit(parts)\n    }\n    let didSomething: boolean = false\n    do {\n      didSomething = false\n      // 
              // -> 
              /\n      if (!this.preserveMultipleSlashes) {\n        for (let i = 1; i < parts.length - 1; i++) {\n          const p = parts[i]\n          // don't squeeze out UNC patterns\n          if (i === 1 && p === '' && parts[0] === '') continue\n          if (p === '.' || p === '') {\n            didSomething = true\n            parts.splice(i, 1)\n            i--\n          }\n        }\n        if (\n          parts[0] === '.' &&\n          parts.length === 2 &&\n          (parts[1] === '.' || parts[1] === '')\n        ) {\n          didSomething = true\n          parts.pop()\n        }\n      }\n\n      // 
              /

              /../ ->

              /\n      let dd: number = 0\n      while (-1 !== (dd = parts.indexOf('..', dd + 1))) {\n        const p = parts[dd - 1]\n        if (p && p !== '.' && p !== '..' && p !== '**') {\n          didSomething = true\n          parts.splice(dd - 1, 2)\n          dd -= 2\n        }\n      }\n    } while (didSomething)\n    return parts.length === 0 ? [''] : parts\n  }\n\n  // First phase: single-pattern processing\n  // 
               is 1 or more portions\n  //  is 1 or more portions\n  // 

              is any portion other than ., .., '', or **\n // is . or ''\n //\n // **/.. is *brutal* for filesystem walking performance, because\n // it effectively resets the recursive walk each time it occurs,\n // and ** cannot be reduced out by a .. pattern part like a regexp\n // or most strings (other than .., ., and '') can be.\n //\n //

              /**/../

              /

              / -> {

              /../

              /

              /,

              /**/

              /

              /}\n //

              // -> 
              /\n  // 
              /

              /../ ->

              /\n  // **/**/ -> **/\n  //\n  // **/*/ -> */**/ <== not valid because ** doesn't follow\n  // this WOULD be allowed if ** did follow symlinks, or * didn't\n  firstPhasePreProcess(globParts: string[][]) {\n    let didSomething = false\n    do {\n      didSomething = false\n      // 
              /**/../

              /

              / -> {

              /../

              /

              /,

              /**/

              /

              /}\n for (let parts of globParts) {\n let gs: number = -1\n while (-1 !== (gs = parts.indexOf('**', gs + 1))) {\n let gss: number = gs\n while (parts[gss + 1] === '**') {\n //

              /**/**/ -> 
              /**/\n            gss++\n          }\n          // eg, if gs is 2 and gss is 4, that means we have 3 **\n          // parts, and can remove 2 of them.\n          if (gss > gs) {\n            parts.splice(gs + 1, gss - gs)\n          }\n\n          let next = parts[gs + 1]\n          const p = parts[gs + 2]\n          const p2 = parts[gs + 3]\n          if (next !== '..') continue\n          if (\n            !p ||\n            p === '.' ||\n            p === '..' ||\n            !p2 ||\n            p2 === '.' ||\n            p2 === '..'\n          ) {\n            continue\n          }\n          didSomething = true\n          // edit parts in place, and push the new one\n          parts.splice(gs, 1)\n          const other = parts.slice(0)\n          other[gs] = '**'\n          globParts.push(other)\n          gs--\n        }\n\n        // 
              // -> 
              /\n        if (!this.preserveMultipleSlashes) {\n          for (let i = 1; i < parts.length - 1; i++) {\n            const p = parts[i]\n            // don't squeeze out UNC patterns\n            if (i === 1 && p === '' && parts[0] === '') continue\n            if (p === '.' || p === '') {\n              didSomething = true\n              parts.splice(i, 1)\n              i--\n            }\n          }\n          if (\n            parts[0] === '.' &&\n            parts.length === 2 &&\n            (parts[1] === '.' || parts[1] === '')\n          ) {\n            didSomething = true\n            parts.pop()\n          }\n        }\n\n        // 
              /

              /../ ->

              /\n        let dd: number = 0\n        while (-1 !== (dd = parts.indexOf('..', dd + 1))) {\n          const p = parts[dd - 1]\n          if (p && p !== '.' && p !== '..' && p !== '**') {\n            didSomething = true\n            const needDot = dd === 1 && parts[dd + 1] === '**'\n            const splin = needDot ? ['.'] : []\n            parts.splice(dd - 1, 2, ...splin)\n            if (parts.length === 0) parts.push('')\n            dd -= 2\n          }\n        }\n      }\n    } while (didSomething)\n\n    return globParts\n  }\n\n  // second phase: multi-pattern dedupes\n  // {
              /*/,
              /

              /} ->

              /*/\n  // {
              /,
              /} -> 
              /\n  // {
              /**/,
              /} -> 
              /**/\n  //\n  // {
              /**/,
              /**/

              /} ->

              /**/\n  // ^-- not valid because ** doens't follow symlinks\n  secondPhasePreProcess(globParts: string[][]): string[][] {\n    for (let i = 0; i < globParts.length - 1; i++) {\n      for (let j = i + 1; j < globParts.length; j++) {\n        const matched = this.partsMatch(\n          globParts[i],\n          globParts[j],\n          !this.preserveMultipleSlashes\n        )\n        if (matched) {\n          globParts[i] = []\n          globParts[j] = matched\n          break\n        }\n      }\n    }\n    return globParts.filter(gs => gs.length)\n  }\n\n  partsMatch(\n    a: string[],\n    b: string[],\n    emptyGSMatch: boolean = false\n  ): false | string[] {\n    let ai = 0\n    let bi = 0\n    let result: string[] = []\n    let which: string = ''\n    while (ai < a.length && bi < b.length) {\n      if (a[ai] === b[bi]) {\n        result.push(which === 'b' ? b[bi] : a[ai])\n        ai++\n        bi++\n      } else if (emptyGSMatch && a[ai] === '**' && b[bi] === a[ai + 1]) {\n        result.push(a[ai])\n        ai++\n      } else if (emptyGSMatch && b[bi] === '**' && a[ai] === b[bi + 1]) {\n        result.push(b[bi])\n        bi++\n      } else if (\n        a[ai] === '*' &&\n        b[bi] &&\n        (this.options.dot || !b[bi].startsWith('.')) &&\n        b[bi] !== '**'\n      ) {\n        if (which === 'b') return false\n        which = 'a'\n        result.push(a[ai])\n        ai++\n        bi++\n      } else if (\n        b[bi] === '*' &&\n        a[ai] &&\n        (this.options.dot || !a[ai].startsWith('.')) &&\n        a[ai] !== '**'\n      ) {\n        if (which === 'a') return false\n        which = 'b'\n        result.push(b[bi])\n        ai++\n        bi++\n      } else {\n        return false\n      }\n    }\n    // if we fall out of the loop, it means they two are identical\n    // as long as their lengths match\n    return a.length === b.length && result\n  }\n\n  parseNegate() {\n    if (this.nonegate) return\n\n    const pattern = this.pattern\n    let negate = false\n    let negateOffset = 0\n\n    for (let i = 0; i < pattern.length && pattern.charAt(i) === '!'; i++) {\n      negate = !negate\n      negateOffset++\n    }\n\n    if (negateOffset) this.pattern = pattern.slice(negateOffset)\n    this.negate = negate\n  }\n\n  // set partial to true to test if, for example,\n  // \"/a/b\" matches the start of \"/*/b/*/d\"\n  // Partial means, if you run out of file before you run\n  // out of pattern, then that's fine, as long as all\n  // the parts match.\n  matchOne(file: string[], pattern: ParseReturn[], partial: boolean = false) {\n    const options = this.options\n\n    // UNC paths like //?/X:/... can match X:/... and vice versa\n    // Drive letters in absolute drive or unc paths are always compared\n    // case-insensitively.\n    if (this.isWindows) {\n      const fileDrive = typeof file[0] === 'string' && /^[a-z]:$/i.test(file[0])\n      const fileUNC =\n        !fileDrive &&\n        file[0] === '' &&\n        file[1] === '' &&\n        file[2] === '?' &&\n        /^[a-z]:$/i.test(file[3])\n\n      const patternDrive =\n        typeof pattern[0] === 'string' && /^[a-z]:$/i.test(pattern[0])\n      const patternUNC =\n        !patternDrive &&\n        pattern[0] === '' &&\n        pattern[1] === '' &&\n        pattern[2] === '?' &&\n        typeof pattern[3] === 'string' &&\n        /^[a-z]:$/i.test(pattern[3])\n\n      const fdi = fileUNC ? 3 : fileDrive ? 0 : undefined\n      const pdi = patternUNC ? 3 : patternDrive ? 0 : undefined\n      if (typeof fdi === 'number' && typeof pdi === 'number') {\n        const [fd, pd]: [string, string] = [file[fdi], pattern[pdi] as string]\n        if (fd.toLowerCase() === pd.toLowerCase()) {\n          pattern[pdi] = fd\n          if (pdi > fdi) {\n            pattern = pattern.slice(pdi)\n          } else if (fdi > pdi) {\n            file = file.slice(fdi)\n          }\n        }\n      }\n    }\n\n    // resolve and reduce . and .. portions in the file as well.\n    // dont' need to do the second phase, because it's only one string[]\n    const { optimizationLevel = 1 } = this.options\n    if (optimizationLevel >= 2) {\n      file = this.levelTwoFileOptimize(file)\n    }\n\n    this.debug('matchOne', this, { file, pattern })\n    this.debug('matchOne', file.length, pattern.length)\n\n    for (\n      var fi = 0, pi = 0, fl = file.length, pl = pattern.length;\n      fi < fl && pi < pl;\n      fi++, pi++\n    ) {\n      this.debug('matchOne loop')\n      var p = pattern[pi]\n      var f = file[fi]\n\n      this.debug(pattern, p, f)\n\n      // should be impossible.\n      // some invalid regexp stuff in the set.\n      /* c8 ignore start */\n      if (p === false) {\n        return false\n      }\n      /* c8 ignore stop */\n\n      if (p === GLOBSTAR) {\n        this.debug('GLOBSTAR', [pattern, p, f])\n\n        // \"**\"\n        // a/**/b/**/c would match the following:\n        // a/b/x/y/z/c\n        // a/x/y/z/b/c\n        // a/b/x/b/x/c\n        // a/b/c\n        // To do this, take the rest of the pattern after\n        // the **, and see if it would match the file remainder.\n        // If so, return success.\n        // If not, the ** \"swallows\" a segment, and try again.\n        // This is recursively awful.\n        //\n        // a/**/b/**/c matching a/b/x/y/z/c\n        // - a matches a\n        // - doublestar\n        //   - matchOne(b/x/y/z/c, b/**/c)\n        //     - b matches b\n        //     - doublestar\n        //       - matchOne(x/y/z/c, c) -> no\n        //       - matchOne(y/z/c, c) -> no\n        //       - matchOne(z/c, c) -> no\n        //       - matchOne(c, c) yes, hit\n        var fr = fi\n        var pr = pi + 1\n        if (pr === pl) {\n          this.debug('** at the end')\n          // a ** at the end will just swallow the rest.\n          // We have found a match.\n          // however, it will not swallow /.x, unless\n          // options.dot is set.\n          // . and .. are *never* matched by **, for explosively\n          // exponential reasons.\n          for (; fi < fl; fi++) {\n            if (\n              file[fi] === '.' ||\n              file[fi] === '..' ||\n              (!options.dot && file[fi].charAt(0) === '.')\n            )\n              return false\n          }\n          return true\n        }\n\n        // ok, let's see if we can swallow whatever we can.\n        while (fr < fl) {\n          var swallowee = file[fr]\n\n          this.debug('\\nglobstar while', file, fr, pattern, pr, swallowee)\n\n          // XXX remove this slice.  Just pass the start index.\n          if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {\n            this.debug('globstar found match!', fr, fl, swallowee)\n            // found a match.\n            return true\n          } else {\n            // can't swallow \".\" or \"..\" ever.\n            // can only swallow \".foo\" when explicitly asked.\n            if (\n              swallowee === '.' ||\n              swallowee === '..' ||\n              (!options.dot && swallowee.charAt(0) === '.')\n            ) {\n              this.debug('dot detected!', file, fr, pattern, pr)\n              break\n            }\n\n            // ** swallows a segment, and continue.\n            this.debug('globstar swallow a segment, and continue')\n            fr++\n          }\n        }\n\n        // no match was found.\n        // However, in partial mode, we can't say this is necessarily over.\n        /* c8 ignore start */\n        if (partial) {\n          // ran out of file\n          this.debug('\\n>>> no match, partial?', file, fr, pattern, pr)\n          if (fr === fl) {\n            return true\n          }\n        }\n        /* c8 ignore stop */\n        return false\n      }\n\n      // something other than **\n      // non-magic patterns just have to match exactly\n      // patterns with magic have been turned into regexps.\n      let hit: boolean\n      if (typeof p === 'string') {\n        hit = f === p\n        this.debug('string match', p, f, hit)\n      } else {\n        hit = p.test(f)\n        this.debug('pattern match', p, f, hit)\n      }\n\n      if (!hit) return false\n    }\n\n    // Note: ending in / means that we'll get a final \"\"\n    // at the end of the pattern.  This can only match a\n    // corresponding \"\" at the end of the file.\n    // If the file ends in /, then it can only match a\n    // a pattern that ends in /, unless the pattern just\n    // doesn't have any more for it. But, a/b/ should *not*\n    // match \"a/b/*\", even though \"\" matches against the\n    // [^/]*? pattern, except in partial mode, where it might\n    // simply not be reached yet.\n    // However, a/b/ should still satisfy a/*\n\n    // now either we fell off the end of the pattern, or we're done.\n    if (fi === fl && pi === pl) {\n      // ran out of pattern and filename at the same time.\n      // an exact hit!\n      return true\n    } else if (fi === fl) {\n      // ran out of file, but still had pattern left.\n      // this is ok if we're doing the match as part of\n      // a glob fs traversal.\n      return partial\n    } else if (pi === pl) {\n      // ran out of pattern, still have file left.\n      // this is only acceptable if we're on the very last\n      // empty segment of a file with a trailing slash.\n      // a/* should match a/b/\n      return fi === fl - 1 && file[fi] === ''\n\n      /* c8 ignore start */\n    } else {\n      // should be unreachable.\n      throw new Error('wtf?')\n    }\n    /* c8 ignore stop */\n  }\n\n  braceExpand() {\n    return braceExpand(this.pattern, this.options)\n  }\n\n  parse(pattern: string): ParseReturn {\n    assertValidPattern(pattern)\n\n    const options = this.options\n\n    // shortcuts\n    if (pattern === '**') return GLOBSTAR\n    if (pattern === '') return ''\n\n    // far and away, the most common glob pattern parts are\n    // *, *.*, and *.  Add a fast check method for those.\n    let m: RegExpMatchArray | null\n    let fastTest: null | ((f: string) => boolean) = null\n    if ((m = pattern.match(starRE))) {\n      fastTest = options.dot ? starTestDot : starTest\n    } else if ((m = pattern.match(starDotExtRE))) {\n      fastTest = (\n        options.nocase\n          ? options.dot\n            ? starDotExtTestNocaseDot\n            : starDotExtTestNocase\n          : options.dot\n          ? starDotExtTestDot\n          : starDotExtTest\n      )(m[1])\n    } else if ((m = pattern.match(qmarksRE))) {\n      fastTest = (\n        options.nocase\n          ? options.dot\n            ? qmarksTestNocaseDot\n            : qmarksTestNocase\n          : options.dot\n          ? qmarksTestDot\n          : qmarksTest\n      )(m)\n    } else if ((m = pattern.match(starDotStarRE))) {\n      fastTest = options.dot ? starDotStarTestDot : starDotStarTest\n    } else if ((m = pattern.match(dotStarRE))) {\n      fastTest = dotStarTest\n    }\n\n    const re = AST.fromGlob(pattern, this.options).toMMPattern()\n    if (fastTest && typeof re === 'object') {\n      // Avoids overriding in frozen environments\n      Reflect.defineProperty(re, 'test', { value: fastTest })\n    }\n    return re\n  }\n\n  makeRe() {\n    if (this.regexp || this.regexp === false) return this.regexp\n\n    // at this point, this.set is a 2d array of partial\n    // pattern strings, or \"**\".\n    //\n    // It's better to use .match().  This function shouldn't\n    // be used, really, but it's pretty convenient sometimes,\n    // when you just want to work with a regex.\n    const set = this.set\n\n    if (!set.length) {\n      this.regexp = false\n      return this.regexp\n    }\n    const options = this.options\n\n    const twoStar = options.noglobstar\n      ? star\n      : options.dot\n      ? twoStarDot\n      : twoStarNoDot\n    const flags = new Set(options.nocase ? ['i'] : [])\n\n    // regexpify non-globstar patterns\n    // if ** is only item, then we just do one twoStar\n    // if ** is first, and there are more, prepend (\\/|twoStar\\/)? to next\n    // if ** is last, append (\\/twoStar|) to previous\n    // if ** is in the middle, append (\\/|\\/twoStar\\/) to previous\n    // then filter out GLOBSTAR symbols\n    let re = set\n      .map(pattern => {\n        const pp: (string | typeof GLOBSTAR)[] = pattern.map(p => {\n          if (p instanceof RegExp) {\n            for (const f of p.flags.split('')) flags.add(f)\n          }\n          return typeof p === 'string'\n            ? regExpEscape(p)\n            : p === GLOBSTAR\n            ? GLOBSTAR\n            : p._src\n        }) as (string | typeof GLOBSTAR)[]\n        pp.forEach((p, i) => {\n          const next = pp[i + 1]\n          const prev = pp[i - 1]\n          if (p !== GLOBSTAR || prev === GLOBSTAR) {\n            return\n          }\n          if (prev === undefined) {\n            if (next !== undefined && next !== GLOBSTAR) {\n              pp[i + 1] = '(?:\\\\/|' + twoStar + '\\\\/)?' + next\n            } else {\n              pp[i] = twoStar\n            }\n          } else if (next === undefined) {\n            pp[i - 1] = prev + '(?:\\\\/|' + twoStar + ')?'\n          } else if (next !== GLOBSTAR) {\n            pp[i - 1] = prev + '(?:\\\\/|\\\\/' + twoStar + '\\\\/)' + next\n            pp[i + 1] = GLOBSTAR\n          }\n        })\n        return pp.filter(p => p !== GLOBSTAR).join('/')\n      })\n      .join('|')\n\n    // need to wrap in parens if we had more than one thing with |,\n    // otherwise only the first will be anchored to ^ and the last to $\n    const [open, close] = set.length > 1 ? ['(?:', ')'] : ['', '']\n    // must match entire pattern\n    // ending in a * or ** will make it less strict.\n    re = '^' + open + re + close + '$'\n\n    // can match anything, as long as it's not this.\n    if (this.negate) re = '^(?!' + re + ').+$'\n\n    try {\n      this.regexp = new RegExp(re, [...flags].join(''))\n      /* c8 ignore start */\n    } catch (ex) {\n      // should be impossible\n      this.regexp = false\n    }\n    /* c8 ignore stop */\n    return this.regexp\n  }\n\n  slashSplit(p: string) {\n    // if p starts with // on windows, we preserve that\n    // so that UNC paths aren't broken.  Otherwise, any number of\n    // / characters are coalesced into one, unless\n    // preserveMultipleSlashes is set to true.\n    if (this.preserveMultipleSlashes) {\n      return p.split('/')\n    } else if (this.isWindows && /^\\/\\/[^\\/]+/.test(p)) {\n      // add an extra '' for the one we lose\n      return ['', ...p.split(/\\/+/)]\n    } else {\n      return p.split(/\\/+/)\n    }\n  }\n\n  match(f: string, partial = this.partial) {\n    this.debug('match', f, this.pattern)\n    // short-circuit in the case of busted things.\n    // comments, etc.\n    if (this.comment) {\n      return false\n    }\n    if (this.empty) {\n      return f === ''\n    }\n\n    if (f === '/' && partial) {\n      return true\n    }\n\n    const options = this.options\n\n    // windows: need to use /, not \\\n    if (this.isWindows) {\n      f = f.split('\\\\').join('/')\n    }\n\n    // treat the test path as a set of pathparts.\n    const ff = this.slashSplit(f)\n    this.debug(this.pattern, 'split', ff)\n\n    // just ONE of the pattern sets in this.set needs to match\n    // in order for it to be valid.  If negating, then just one\n    // match means that we have failed.\n    // Either way, return on the first hit.\n\n    const set = this.set\n    this.debug(this.pattern, 'set', set)\n\n    // Find the basename of the path by looking for the last non-empty segment\n    let filename: string = ff[ff.length - 1]\n    if (!filename) {\n      for (let i = ff.length - 2; !filename && i >= 0; i--) {\n        filename = ff[i]\n      }\n    }\n\n    for (let i = 0; i < set.length; i++) {\n      const pattern = set[i]\n      let file = ff\n      if (options.matchBase && pattern.length === 1) {\n        file = [filename]\n      }\n      const hit = this.matchOne(file, pattern, partial)\n      if (hit) {\n        if (options.flipNegate) {\n          return true\n        }\n        return !this.negate\n      }\n    }\n\n    // didn't get any hits.  this is success if it's a negative\n    // pattern, failure otherwise.\n    if (options.flipNegate) {\n      return false\n    }\n    return this.negate\n  }\n\n  static defaults(def: MinimatchOptions) {\n    return minimatch.defaults(def).Minimatch\n  }\n}\n/* c8 ignore start */\nexport { AST } from './ast.js'\nexport { escape } from './escape.js'\nexport { unescape } from './unescape.js'\n/* c8 ignore stop */\nminimatch.AST = AST\nminimatch.Minimatch = Minimatch\nminimatch.escape = escape\nminimatch.unescape = unescape\n"]}
              \ No newline at end of file
              diff --git a/node_modules/mocha/node_modules/minimatch/dist/commonjs/package.json b/node_modules/mocha/node_modules/minimatch/dist/commonjs/package.json
              deleted file mode 100644
              index 5bbefffb..00000000
              --- a/node_modules/mocha/node_modules/minimatch/dist/commonjs/package.json
              +++ /dev/null
              @@ -1,3 +0,0 @@
              -{
              -  "type": "commonjs"
              -}
              diff --git a/node_modules/mocha/node_modules/minimatch/dist/commonjs/unescape.d.ts b/node_modules/mocha/node_modules/minimatch/dist/commonjs/unescape.d.ts
              deleted file mode 100644
              index 23a7b387..00000000
              --- a/node_modules/mocha/node_modules/minimatch/dist/commonjs/unescape.d.ts
              +++ /dev/null
              @@ -1,17 +0,0 @@
              -import { MinimatchOptions } from './index.js';
              -/**
              - * Un-escape a string that has been escaped with {@link escape}.
              - *
              - * If the {@link windowsPathsNoEscape} option is used, then square-brace
              - * escapes are removed, but not backslash escapes.  For example, it will turn
              - * the string `'[*]'` into `*`, but it will not turn `'\\*'` into `'*'`,
              - * becuase `\` is a path separator in `windowsPathsNoEscape` mode.
              - *
              - * When `windowsPathsNoEscape` is not set, then both brace escapes and
              - * backslash escapes are removed.
              - *
              - * Slashes (and backslashes in `windowsPathsNoEscape` mode) cannot be escaped
              - * or unescaped.
              - */
              -export declare const unescape: (s: string, { windowsPathsNoEscape, }?: Pick) => string;
              -//# sourceMappingURL=unescape.d.ts.map
              \ No newline at end of file
              diff --git a/node_modules/mocha/node_modules/minimatch/dist/commonjs/unescape.d.ts.map b/node_modules/mocha/node_modules/minimatch/dist/commonjs/unescape.d.ts.map
              deleted file mode 100644
              index 7ace0701..00000000
              --- a/node_modules/mocha/node_modules/minimatch/dist/commonjs/unescape.d.ts.map
              +++ /dev/null
              @@ -1 +0,0 @@
              -{"version":3,"file":"unescape.d.ts","sourceRoot":"","sources":["../../src/unescape.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAC7C;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,QAAQ,MAChB,MAAM,8BAGN,KAAK,gBAAgB,EAAE,sBAAsB,CAAC,WAKlD,CAAA"}
              \ No newline at end of file
              diff --git a/node_modules/mocha/node_modules/minimatch/dist/commonjs/unescape.js b/node_modules/mocha/node_modules/minimatch/dist/commonjs/unescape.js
              deleted file mode 100644
              index 47c36bce..00000000
              --- a/node_modules/mocha/node_modules/minimatch/dist/commonjs/unescape.js
              +++ /dev/null
              @@ -1,24 +0,0 @@
              -"use strict";
              -Object.defineProperty(exports, "__esModule", { value: true });
              -exports.unescape = void 0;
              -/**
              - * Un-escape a string that has been escaped with {@link escape}.
              - *
              - * If the {@link windowsPathsNoEscape} option is used, then square-brace
              - * escapes are removed, but not backslash escapes.  For example, it will turn
              - * the string `'[*]'` into `*`, but it will not turn `'\\*'` into `'*'`,
              - * becuase `\` is a path separator in `windowsPathsNoEscape` mode.
              - *
              - * When `windowsPathsNoEscape` is not set, then both brace escapes and
              - * backslash escapes are removed.
              - *
              - * Slashes (and backslashes in `windowsPathsNoEscape` mode) cannot be escaped
              - * or unescaped.
              - */
              -const unescape = (s, { windowsPathsNoEscape = false, } = {}) => {
              -    return windowsPathsNoEscape
              -        ? s.replace(/\[([^\/\\])\]/g, '$1')
              -        : s.replace(/((?!\\).|^)\[([^\/\\])\]/g, '$1$2').replace(/\\([^\/])/g, '$1');
              -};
              -exports.unescape = unescape;
              -//# sourceMappingURL=unescape.js.map
              \ No newline at end of file
              diff --git a/node_modules/mocha/node_modules/minimatch/dist/commonjs/unescape.js.map b/node_modules/mocha/node_modules/minimatch/dist/commonjs/unescape.js.map
              deleted file mode 100644
              index 353d3aa0..00000000
              --- a/node_modules/mocha/node_modules/minimatch/dist/commonjs/unescape.js.map
              +++ /dev/null
              @@ -1 +0,0 @@
              -{"version":3,"file":"unescape.js","sourceRoot":"","sources":["../../src/unescape.ts"],"names":[],"mappings":";;;AACA;;;;;;;;;;;;;GAaG;AACI,MAAM,QAAQ,GAAG,CACtB,CAAS,EACT,EACE,oBAAoB,GAAG,KAAK,MACsB,EAAE,EACtD,EAAE;IACF,OAAO,oBAAoB;QACzB,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,gBAAgB,EAAE,IAAI,CAAC;QACnC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,2BAA2B,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,YAAY,EAAE,IAAI,CAAC,CAAA;AAChF,CAAC,CAAA;AATY,QAAA,QAAQ,YASpB","sourcesContent":["import { MinimatchOptions } from './index.js'\n/**\n * Un-escape a string that has been escaped with {@link escape}.\n *\n * If the {@link windowsPathsNoEscape} option is used, then square-brace\n * escapes are removed, but not backslash escapes.  For example, it will turn\n * the string `'[*]'` into `*`, but it will not turn `'\\\\*'` into `'*'`,\n * becuase `\\` is a path separator in `windowsPathsNoEscape` mode.\n *\n * When `windowsPathsNoEscape` is not set, then both brace escapes and\n * backslash escapes are removed.\n *\n * Slashes (and backslashes in `windowsPathsNoEscape` mode) cannot be escaped\n * or unescaped.\n */\nexport const unescape = (\n  s: string,\n  {\n    windowsPathsNoEscape = false,\n  }: Pick = {}\n) => {\n  return windowsPathsNoEscape\n    ? s.replace(/\\[([^\\/\\\\])\\]/g, '$1')\n    : s.replace(/((?!\\\\).|^)\\[([^\\/\\\\])\\]/g, '$1$2').replace(/\\\\([^\\/])/g, '$1')\n}\n"]}
              \ No newline at end of file
              diff --git a/node_modules/mocha/node_modules/minimatch/dist/esm/assert-valid-pattern.d.ts b/node_modules/mocha/node_modules/minimatch/dist/esm/assert-valid-pattern.d.ts
              deleted file mode 100644
              index 8e318b23..00000000
              --- a/node_modules/mocha/node_modules/minimatch/dist/esm/assert-valid-pattern.d.ts
              +++ /dev/null
              @@ -1,2 +0,0 @@
              -export declare const assertValidPattern: (pattern: any) => void;
              -//# sourceMappingURL=assert-valid-pattern.d.ts.map
              \ No newline at end of file
              diff --git a/node_modules/mocha/node_modules/minimatch/dist/esm/assert-valid-pattern.d.ts.map b/node_modules/mocha/node_modules/minimatch/dist/esm/assert-valid-pattern.d.ts.map
              deleted file mode 100644
              index c61c0310..00000000
              --- a/node_modules/mocha/node_modules/minimatch/dist/esm/assert-valid-pattern.d.ts.map
              +++ /dev/null
              @@ -1 +0,0 @@
              -{"version":3,"file":"assert-valid-pattern.d.ts","sourceRoot":"","sources":["../../src/assert-valid-pattern.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,kBAAkB,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,IAUlD,CAAA"}
              \ No newline at end of file
              diff --git a/node_modules/mocha/node_modules/minimatch/dist/esm/assert-valid-pattern.js b/node_modules/mocha/node_modules/minimatch/dist/esm/assert-valid-pattern.js
              deleted file mode 100644
              index 7b534fc3..00000000
              --- a/node_modules/mocha/node_modules/minimatch/dist/esm/assert-valid-pattern.js
              +++ /dev/null
              @@ -1,10 +0,0 @@
              -const MAX_PATTERN_LENGTH = 1024 * 64;
              -export const assertValidPattern = (pattern) => {
              -    if (typeof pattern !== 'string') {
              -        throw new TypeError('invalid pattern');
              -    }
              -    if (pattern.length > MAX_PATTERN_LENGTH) {
              -        throw new TypeError('pattern is too long');
              -    }
              -};
              -//# sourceMappingURL=assert-valid-pattern.js.map
              \ No newline at end of file
              diff --git a/node_modules/mocha/node_modules/minimatch/dist/esm/assert-valid-pattern.js.map b/node_modules/mocha/node_modules/minimatch/dist/esm/assert-valid-pattern.js.map
              deleted file mode 100644
              index b1a5a0b9..00000000
              --- a/node_modules/mocha/node_modules/minimatch/dist/esm/assert-valid-pattern.js.map
              +++ /dev/null
              @@ -1 +0,0 @@
              -{"version":3,"file":"assert-valid-pattern.js","sourceRoot":"","sources":["../../src/assert-valid-pattern.ts"],"names":[],"mappings":"AAAA,MAAM,kBAAkB,GAAG,IAAI,GAAG,EAAE,CAAA;AACpC,MAAM,CAAC,MAAM,kBAAkB,GAA2B,CACxD,OAAY,EACe,EAAE;IAC7B,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE;QAC/B,MAAM,IAAI,SAAS,CAAC,iBAAiB,CAAC,CAAA;KACvC;IAED,IAAI,OAAO,CAAC,MAAM,GAAG,kBAAkB,EAAE;QACvC,MAAM,IAAI,SAAS,CAAC,qBAAqB,CAAC,CAAA;KAC3C;AACH,CAAC,CAAA","sourcesContent":["const MAX_PATTERN_LENGTH = 1024 * 64\nexport const assertValidPattern: (pattern: any) => void = (\n  pattern: any\n): asserts pattern is string => {\n  if (typeof pattern !== 'string') {\n    throw new TypeError('invalid pattern')\n  }\n\n  if (pattern.length > MAX_PATTERN_LENGTH) {\n    throw new TypeError('pattern is too long')\n  }\n}\n"]}
              \ No newline at end of file
              diff --git a/node_modules/mocha/node_modules/minimatch/dist/esm/ast.d.ts b/node_modules/mocha/node_modules/minimatch/dist/esm/ast.d.ts
              deleted file mode 100644
              index b8c1e544..00000000
              --- a/node_modules/mocha/node_modules/minimatch/dist/esm/ast.d.ts
              +++ /dev/null
              @@ -1,20 +0,0 @@
              -import { MinimatchOptions, MMRegExp } from './index.js';
              -export type ExtglobType = '!' | '?' | '+' | '*' | '@';
              -export declare class AST {
              -    #private;
              -    type: ExtglobType | null;
              -    constructor(type: ExtglobType | null, parent?: AST, options?: MinimatchOptions);
              -    get hasMagic(): boolean | undefined;
              -    toString(): string;
              -    push(...parts: (string | AST)[]): void;
              -    toJSON(): any[];
              -    isStart(): boolean;
              -    isEnd(): boolean;
              -    copyIn(part: AST | string): void;
              -    clone(parent: AST): AST;
              -    static fromGlob(pattern: string, options?: MinimatchOptions): AST;
              -    toMMPattern(): MMRegExp | string;
              -    get options(): MinimatchOptions;
              -    toRegExpSource(allowDot?: boolean): [re: string, body: string, hasMagic: boolean, uflag: boolean];
              -}
              -//# sourceMappingURL=ast.d.ts.map
              \ No newline at end of file
              diff --git a/node_modules/mocha/node_modules/minimatch/dist/esm/ast.d.ts.map b/node_modules/mocha/node_modules/minimatch/dist/esm/ast.d.ts.map
              deleted file mode 100644
              index 9e7bfb9a..00000000
              --- a/node_modules/mocha/node_modules/minimatch/dist/esm/ast.d.ts.map
              +++ /dev/null
              @@ -1 +0,0 @@
              -{"version":3,"file":"ast.d.ts","sourceRoot":"","sources":["../../src/ast.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAwCvD,MAAM,MAAM,WAAW,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAA;AAkCrD,qBAAa,GAAG;;IACd,IAAI,EAAE,WAAW,GAAG,IAAI,CAAA;gBAiBtB,IAAI,EAAE,WAAW,GAAG,IAAI,EACxB,MAAM,CAAC,EAAE,GAAG,EACZ,OAAO,GAAE,gBAAqB;IAahC,IAAI,QAAQ,IAAI,OAAO,GAAG,SAAS,CAUlC;IAGD,QAAQ,IAAI,MAAM;IA+ClB,IAAI,CAAC,GAAG,KAAK,EAAE,CAAC,MAAM,GAAG,GAAG,CAAC,EAAE;IAY/B,MAAM;IAgBN,OAAO,IAAI,OAAO;IAgBlB,KAAK,IAAI,OAAO;IAYhB,MAAM,CAAC,IAAI,EAAE,GAAG,GAAG,MAAM;IAKzB,KAAK,CAAC,MAAM,EAAE,GAAG;IAsIjB,MAAM,CAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,GAAE,gBAAqB;IAQ/D,WAAW,IAAI,QAAQ,GAAG,MAAM;IA2BhC,IAAI,OAAO,qBAEV;IAuED,cAAc,CACZ,QAAQ,CAAC,EAAE,OAAO,GACjB,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC;CAiMjE"}
              \ No newline at end of file
              diff --git a/node_modules/mocha/node_modules/minimatch/dist/esm/ast.js b/node_modules/mocha/node_modules/minimatch/dist/esm/ast.js
              deleted file mode 100644
              index 2d2bced6..00000000
              --- a/node_modules/mocha/node_modules/minimatch/dist/esm/ast.js
              +++ /dev/null
              @@ -1,588 +0,0 @@
              -// parse a single path portion
              -import { parseClass } from './brace-expressions.js';
              -import { unescape } from './unescape.js';
              -const types = new Set(['!', '?', '+', '*', '@']);
              -const isExtglobType = (c) => types.has(c);
              -// Patterns that get prepended to bind to the start of either the
              -// entire string, or just a single path portion, to prevent dots
              -// and/or traversal patterns, when needed.
              -// Exts don't need the ^ or / bit, because the root binds that already.
              -const startNoTraversal = '(?!(?:^|/)\\.\\.?(?:$|/))';
              -const startNoDot = '(?!\\.)';
              -// characters that indicate a start of pattern needs the "no dots" bit,
              -// because a dot *might* be matched. ( is not in the list, because in
              -// the case of a child extglob, it will handle the prevention itself.
              -const addPatternStart = new Set(['[', '.']);
              -// cases where traversal is A-OK, no dot prevention needed
              -const justDots = new Set(['..', '.']);
              -const reSpecials = new Set('().*{}+?[]^$\\!');
              -const regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&');
              -// any single thing other than /
              -const qmark = '[^/]';
              -// * => any number of characters
              -const star = qmark + '*?';
              -// use + when we need to ensure that *something* matches, because the * is
              -// the only thing in the path portion.
              -const starNoEmpty = qmark + '+?';
              -// remove the \ chars that we added if we end up doing a nonmagic compare
              -// const deslash = (s: string) => s.replace(/\\(.)/g, '$1')
              -export class AST {
              -    type;
              -    #root;
              -    #hasMagic;
              -    #uflag = false;
              -    #parts = [];
              -    #parent;
              -    #parentIndex;
              -    #negs;
              -    #filledNegs = false;
              -    #options;
              -    #toString;
              -    // set to true if it's an extglob with no children
              -    // (which really means one child of '')
              -    #emptyExt = false;
              -    constructor(type, parent, options = {}) {
              -        this.type = type;
              -        // extglobs are inherently magical
              -        if (type)
              -            this.#hasMagic = true;
              -        this.#parent = parent;
              -        this.#root = this.#parent ? this.#parent.#root : this;
              -        this.#options = this.#root === this ? options : this.#root.#options;
              -        this.#negs = this.#root === this ? [] : this.#root.#negs;
              -        if (type === '!' && !this.#root.#filledNegs)
              -            this.#negs.push(this);
              -        this.#parentIndex = this.#parent ? this.#parent.#parts.length : 0;
              -    }
              -    get hasMagic() {
              -        /* c8 ignore start */
              -        if (this.#hasMagic !== undefined)
              -            return this.#hasMagic;
              -        /* c8 ignore stop */
              -        for (const p of this.#parts) {
              -            if (typeof p === 'string')
              -                continue;
              -            if (p.type || p.hasMagic)
              -                return (this.#hasMagic = true);
              -        }
              -        // note: will be undefined until we generate the regexp src and find out
              -        return this.#hasMagic;
              -    }
              -    // reconstructs the pattern
              -    toString() {
              -        if (this.#toString !== undefined)
              -            return this.#toString;
              -        if (!this.type) {
              -            return (this.#toString = this.#parts.map(p => String(p)).join(''));
              -        }
              -        else {
              -            return (this.#toString =
              -                this.type + '(' + this.#parts.map(p => String(p)).join('|') + ')');
              -        }
              -    }
              -    #fillNegs() {
              -        /* c8 ignore start */
              -        if (this !== this.#root)
              -            throw new Error('should only call on root');
              -        if (this.#filledNegs)
              -            return this;
              -        /* c8 ignore stop */
              -        // call toString() once to fill this out
              -        this.toString();
              -        this.#filledNegs = true;
              -        let n;
              -        while ((n = this.#negs.pop())) {
              -            if (n.type !== '!')
              -                continue;
              -            // walk up the tree, appending everthing that comes AFTER parentIndex
              -            let p = n;
              -            let pp = p.#parent;
              -            while (pp) {
              -                for (let i = p.#parentIndex + 1; !pp.type && i < pp.#parts.length; i++) {
              -                    for (const part of n.#parts) {
              -                        /* c8 ignore start */
              -                        if (typeof part === 'string') {
              -                            throw new Error('string part in extglob AST??');
              -                        }
              -                        /* c8 ignore stop */
              -                        part.copyIn(pp.#parts[i]);
              -                    }
              -                }
              -                p = pp;
              -                pp = p.#parent;
              -            }
              -        }
              -        return this;
              -    }
              -    push(...parts) {
              -        for (const p of parts) {
              -            if (p === '')
              -                continue;
              -            /* c8 ignore start */
              -            if (typeof p !== 'string' && !(p instanceof AST && p.#parent === this)) {
              -                throw new Error('invalid part: ' + p);
              -            }
              -            /* c8 ignore stop */
              -            this.#parts.push(p);
              -        }
              -    }
              -    toJSON() {
              -        const ret = this.type === null
              -            ? this.#parts.slice().map(p => (typeof p === 'string' ? p : p.toJSON()))
              -            : [this.type, ...this.#parts.map(p => p.toJSON())];
              -        if (this.isStart() && !this.type)
              -            ret.unshift([]);
              -        if (this.isEnd() &&
              -            (this === this.#root ||
              -                (this.#root.#filledNegs && this.#parent?.type === '!'))) {
              -            ret.push({});
              -        }
              -        return ret;
              -    }
              -    isStart() {
              -        if (this.#root === this)
              -            return true;
              -        // if (this.type) return !!this.#parent?.isStart()
              -        if (!this.#parent?.isStart())
              -            return false;
              -        if (this.#parentIndex === 0)
              -            return true;
              -        // if everything AHEAD of this is a negation, then it's still the "start"
              -        const p = this.#parent;
              -        for (let i = 0; i < this.#parentIndex; i++) {
              -            const pp = p.#parts[i];
              -            if (!(pp instanceof AST && pp.type === '!')) {
              -                return false;
              -            }
              -        }
              -        return true;
              -    }
              -    isEnd() {
              -        if (this.#root === this)
              -            return true;
              -        if (this.#parent?.type === '!')
              -            return true;
              -        if (!this.#parent?.isEnd())
              -            return false;
              -        if (!this.type)
              -            return this.#parent?.isEnd();
              -        // if not root, it'll always have a parent
              -        /* c8 ignore start */
              -        const pl = this.#parent ? this.#parent.#parts.length : 0;
              -        /* c8 ignore stop */
              -        return this.#parentIndex === pl - 1;
              -    }
              -    copyIn(part) {
              -        if (typeof part === 'string')
              -            this.push(part);
              -        else
              -            this.push(part.clone(this));
              -    }
              -    clone(parent) {
              -        const c = new AST(this.type, parent);
              -        for (const p of this.#parts) {
              -            c.copyIn(p);
              -        }
              -        return c;
              -    }
              -    static #parseAST(str, ast, pos, opt) {
              -        let escaping = false;
              -        let inBrace = false;
              -        let braceStart = -1;
              -        let braceNeg = false;
              -        if (ast.type === null) {
              -            // outside of a extglob, append until we find a start
              -            let i = pos;
              -            let acc = '';
              -            while (i < str.length) {
              -                const c = str.charAt(i++);
              -                // still accumulate escapes at this point, but we do ignore
              -                // starts that are escaped
              -                if (escaping || c === '\\') {
              -                    escaping = !escaping;
              -                    acc += c;
              -                    continue;
              -                }
              -                if (inBrace) {
              -                    if (i === braceStart + 1) {
              -                        if (c === '^' || c === '!') {
              -                            braceNeg = true;
              -                        }
              -                    }
              -                    else if (c === ']' && !(i === braceStart + 2 && braceNeg)) {
              -                        inBrace = false;
              -                    }
              -                    acc += c;
              -                    continue;
              -                }
              -                else if (c === '[') {
              -                    inBrace = true;
              -                    braceStart = i;
              -                    braceNeg = false;
              -                    acc += c;
              -                    continue;
              -                }
              -                if (!opt.noext && isExtglobType(c) && str.charAt(i) === '(') {
              -                    ast.push(acc);
              -                    acc = '';
              -                    const ext = new AST(c, ast);
              -                    i = AST.#parseAST(str, ext, i, opt);
              -                    ast.push(ext);
              -                    continue;
              -                }
              -                acc += c;
              -            }
              -            ast.push(acc);
              -            return i;
              -        }
              -        // some kind of extglob, pos is at the (
              -        // find the next | or )
              -        let i = pos + 1;
              -        let part = new AST(null, ast);
              -        const parts = [];
              -        let acc = '';
              -        while (i < str.length) {
              -            const c = str.charAt(i++);
              -            // still accumulate escapes at this point, but we do ignore
              -            // starts that are escaped
              -            if (escaping || c === '\\') {
              -                escaping = !escaping;
              -                acc += c;
              -                continue;
              -            }
              -            if (inBrace) {
              -                if (i === braceStart + 1) {
              -                    if (c === '^' || c === '!') {
              -                        braceNeg = true;
              -                    }
              -                }
              -                else if (c === ']' && !(i === braceStart + 2 && braceNeg)) {
              -                    inBrace = false;
              -                }
              -                acc += c;
              -                continue;
              -            }
              -            else if (c === '[') {
              -                inBrace = true;
              -                braceStart = i;
              -                braceNeg = false;
              -                acc += c;
              -                continue;
              -            }
              -            if (isExtglobType(c) && str.charAt(i) === '(') {
              -                part.push(acc);
              -                acc = '';
              -                const ext = new AST(c, part);
              -                part.push(ext);
              -                i = AST.#parseAST(str, ext, i, opt);
              -                continue;
              -            }
              -            if (c === '|') {
              -                part.push(acc);
              -                acc = '';
              -                parts.push(part);
              -                part = new AST(null, ast);
              -                continue;
              -            }
              -            if (c === ')') {
              -                if (acc === '' && ast.#parts.length === 0) {
              -                    ast.#emptyExt = true;
              -                }
              -                part.push(acc);
              -                acc = '';
              -                ast.push(...parts, part);
              -                return i;
              -            }
              -            acc += c;
              -        }
              -        // unfinished extglob
              -        // if we got here, it was a malformed extglob! not an extglob, but
              -        // maybe something else in there.
              -        ast.type = null;
              -        ast.#hasMagic = undefined;
              -        ast.#parts = [str.substring(pos - 1)];
              -        return i;
              -    }
              -    static fromGlob(pattern, options = {}) {
              -        const ast = new AST(null, undefined, options);
              -        AST.#parseAST(pattern, ast, 0, options);
              -        return ast;
              -    }
              -    // returns the regular expression if there's magic, or the unescaped
              -    // string if not.
              -    toMMPattern() {
              -        // should only be called on root
              -        /* c8 ignore start */
              -        if (this !== this.#root)
              -            return this.#root.toMMPattern();
              -        /* c8 ignore stop */
              -        const glob = this.toString();
              -        const [re, body, hasMagic, uflag] = this.toRegExpSource();
              -        // if we're in nocase mode, and not nocaseMagicOnly, then we do
              -        // still need a regular expression if we have to case-insensitively
              -        // match capital/lowercase characters.
              -        const anyMagic = hasMagic ||
              -            this.#hasMagic ||
              -            (this.#options.nocase &&
              -                !this.#options.nocaseMagicOnly &&
              -                glob.toUpperCase() !== glob.toLowerCase());
              -        if (!anyMagic) {
              -            return body;
              -        }
              -        const flags = (this.#options.nocase ? 'i' : '') + (uflag ? 'u' : '');
              -        return Object.assign(new RegExp(`^${re}$`, flags), {
              -            _src: re,
              -            _glob: glob,
              -        });
              -    }
              -    get options() {
              -        return this.#options;
              -    }
              -    // returns the string match, the regexp source, whether there's magic
              -    // in the regexp (so a regular expression is required) and whether or
              -    // not the uflag is needed for the regular expression (for posix classes)
              -    // TODO: instead of injecting the start/end at this point, just return
              -    // the BODY of the regexp, along with the start/end portions suitable
              -    // for binding the start/end in either a joined full-path makeRe context
              -    // (where we bind to (^|/), or a standalone matchPart context (where
              -    // we bind to ^, and not /).  Otherwise slashes get duped!
              -    //
              -    // In part-matching mode, the start is:
              -    // - if not isStart: nothing
              -    // - if traversal possible, but not allowed: ^(?!\.\.?$)
              -    // - if dots allowed or not possible: ^
              -    // - if dots possible and not allowed: ^(?!\.)
              -    // end is:
              -    // - if not isEnd(): nothing
              -    // - else: $
              -    //
              -    // In full-path matching mode, we put the slash at the START of the
              -    // pattern, so start is:
              -    // - if first pattern: same as part-matching mode
              -    // - if not isStart(): nothing
              -    // - if traversal possible, but not allowed: /(?!\.\.?(?:$|/))
              -    // - if dots allowed or not possible: /
              -    // - if dots possible and not allowed: /(?!\.)
              -    // end is:
              -    // - if last pattern, same as part-matching mode
              -    // - else nothing
              -    //
              -    // Always put the (?:$|/) on negated tails, though, because that has to be
              -    // there to bind the end of the negated pattern portion, and it's easier to
              -    // just stick it in now rather than try to inject it later in the middle of
              -    // the pattern.
              -    //
              -    // We can just always return the same end, and leave it up to the caller
              -    // to know whether it's going to be used joined or in parts.
              -    // And, if the start is adjusted slightly, can do the same there:
              -    // - if not isStart: nothing
              -    // - if traversal possible, but not allowed: (?:/|^)(?!\.\.?$)
              -    // - if dots allowed or not possible: (?:/|^)
              -    // - if dots possible and not allowed: (?:/|^)(?!\.)
              -    //
              -    // But it's better to have a simpler binding without a conditional, for
              -    // performance, so probably better to return both start options.
              -    //
              -    // Then the caller just ignores the end if it's not the first pattern,
              -    // and the start always gets applied.
              -    //
              -    // But that's always going to be $ if it's the ending pattern, or nothing,
              -    // so the caller can just attach $ at the end of the pattern when building.
              -    //
              -    // So the todo is:
              -    // - better detect what kind of start is needed
              -    // - return both flavors of starting pattern
              -    // - attach $ at the end of the pattern when creating the actual RegExp
              -    //
              -    // Ah, but wait, no, that all only applies to the root when the first pattern
              -    // is not an extglob. If the first pattern IS an extglob, then we need all
              -    // that dot prevention biz to live in the extglob portions, because eg
              -    // +(*|.x*) can match .xy but not .yx.
              -    //
              -    // So, return the two flavors if it's #root and the first child is not an
              -    // AST, otherwise leave it to the child AST to handle it, and there,
              -    // use the (?:^|/) style of start binding.
              -    //
              -    // Even simplified further:
              -    // - Since the start for a join is eg /(?!\.) and the start for a part
              -    // is ^(?!\.), we can just prepend (?!\.) to the pattern (either root
              -    // or start or whatever) and prepend ^ or / at the Regexp construction.
              -    toRegExpSource(allowDot) {
              -        const dot = allowDot ?? !!this.#options.dot;
              -        if (this.#root === this)
              -            this.#fillNegs();
              -        if (!this.type) {
              -            const noEmpty = this.isStart() && this.isEnd();
              -            const src = this.#parts
              -                .map(p => {
              -                const [re, _, hasMagic, uflag] = typeof p === 'string'
              -                    ? AST.#parseGlob(p, this.#hasMagic, noEmpty)
              -                    : p.toRegExpSource(allowDot);
              -                this.#hasMagic = this.#hasMagic || hasMagic;
              -                this.#uflag = this.#uflag || uflag;
              -                return re;
              -            })
              -                .join('');
              -            let start = '';
              -            if (this.isStart()) {
              -                if (typeof this.#parts[0] === 'string') {
              -                    // this is the string that will match the start of the pattern,
              -                    // so we need to protect against dots and such.
              -                    // '.' and '..' cannot match unless the pattern is that exactly,
              -                    // even if it starts with . or dot:true is set.
              -                    const dotTravAllowed = this.#parts.length === 1 && justDots.has(this.#parts[0]);
              -                    if (!dotTravAllowed) {
              -                        const aps = addPatternStart;
              -                        // check if we have a possibility of matching . or ..,
              -                        // and prevent that.
              -                        const needNoTrav = 
              -                        // dots are allowed, and the pattern starts with [ or .
              -                        (dot && aps.has(src.charAt(0))) ||
              -                            // the pattern starts with \., and then [ or .
              -                            (src.startsWith('\\.') && aps.has(src.charAt(2))) ||
              -                            // the pattern starts with \.\., and then [ or .
              -                            (src.startsWith('\\.\\.') && aps.has(src.charAt(4)));
              -                        // no need to prevent dots if it can't match a dot, or if a
              -                        // sub-pattern will be preventing it anyway.
              -                        const needNoDot = !dot && !allowDot && aps.has(src.charAt(0));
              -                        start = needNoTrav ? startNoTraversal : needNoDot ? startNoDot : '';
              -                    }
              -                }
              -            }
              -            // append the "end of path portion" pattern to negation tails
              -            let end = '';
              -            if (this.isEnd() &&
              -                this.#root.#filledNegs &&
              -                this.#parent?.type === '!') {
              -                end = '(?:$|\\/)';
              -            }
              -            const final = start + src + end;
              -            return [
              -                final,
              -                unescape(src),
              -                (this.#hasMagic = !!this.#hasMagic),
              -                this.#uflag,
              -            ];
              -        }
              -        // We need to calculate the body *twice* if it's a repeat pattern
              -        // at the start, once in nodot mode, then again in dot mode, so a
              -        // pattern like *(?) can match 'x.y'
              -        const repeated = this.type === '*' || this.type === '+';
              -        // some kind of extglob
              -        const start = this.type === '!' ? '(?:(?!(?:' : '(?:';
              -        let body = this.#partsToRegExp(dot);
              -        if (this.isStart() && this.isEnd() && !body && this.type !== '!') {
              -            // invalid extglob, has to at least be *something* present, if it's
              -            // the entire path portion.
              -            const s = this.toString();
              -            this.#parts = [s];
              -            this.type = null;
              -            this.#hasMagic = undefined;
              -            return [s, unescape(this.toString()), false, false];
              -        }
              -        // XXX abstract out this map method
              -        let bodyDotAllowed = !repeated || allowDot || dot || !startNoDot
              -            ? ''
              -            : this.#partsToRegExp(true);
              -        if (bodyDotAllowed === body) {
              -            bodyDotAllowed = '';
              -        }
              -        if (bodyDotAllowed) {
              -            body = `(?:${body})(?:${bodyDotAllowed})*?`;
              -        }
              -        // an empty !() is exactly equivalent to a starNoEmpty
              -        let final = '';
              -        if (this.type === '!' && this.#emptyExt) {
              -            final = (this.isStart() && !dot ? startNoDot : '') + starNoEmpty;
              -        }
              -        else {
              -            const close = this.type === '!'
              -                ? // !() must match something,but !(x) can match ''
              -                    '))' +
              -                        (this.isStart() && !dot && !allowDot ? startNoDot : '') +
              -                        star +
              -                        ')'
              -                : this.type === '@'
              -                    ? ')'
              -                    : this.type === '?'
              -                        ? ')?'
              -                        : this.type === '+' && bodyDotAllowed
              -                            ? ')'
              -                            : this.type === '*' && bodyDotAllowed
              -                                ? `)?`
              -                                : `)${this.type}`;
              -            final = start + body + close;
              -        }
              -        return [
              -            final,
              -            unescape(body),
              -            (this.#hasMagic = !!this.#hasMagic),
              -            this.#uflag,
              -        ];
              -    }
              -    #partsToRegExp(dot) {
              -        return this.#parts
              -            .map(p => {
              -            // extglob ASTs should only contain parent ASTs
              -            /* c8 ignore start */
              -            if (typeof p === 'string') {
              -                throw new Error('string type in extglob ast??');
              -            }
              -            /* c8 ignore stop */
              -            // can ignore hasMagic, because extglobs are already always magic
              -            const [re, _, _hasMagic, uflag] = p.toRegExpSource(dot);
              -            this.#uflag = this.#uflag || uflag;
              -            return re;
              -        })
              -            .filter(p => !(this.isStart() && this.isEnd()) || !!p)
              -            .join('|');
              -    }
              -    static #parseGlob(glob, hasMagic, noEmpty = false) {
              -        let escaping = false;
              -        let re = '';
              -        let uflag = false;
              -        for (let i = 0; i < glob.length; i++) {
              -            const c = glob.charAt(i);
              -            if (escaping) {
              -                escaping = false;
              -                re += (reSpecials.has(c) ? '\\' : '') + c;
              -                continue;
              -            }
              -            if (c === '\\') {
              -                if (i === glob.length - 1) {
              -                    re += '\\\\';
              -                }
              -                else {
              -                    escaping = true;
              -                }
              -                continue;
              -            }
              -            if (c === '[') {
              -                const [src, needUflag, consumed, magic] = parseClass(glob, i);
              -                if (consumed) {
              -                    re += src;
              -                    uflag = uflag || needUflag;
              -                    i += consumed - 1;
              -                    hasMagic = hasMagic || magic;
              -                    continue;
              -                }
              -            }
              -            if (c === '*') {
              -                if (noEmpty && glob === '*')
              -                    re += starNoEmpty;
              -                else
              -                    re += star;
              -                hasMagic = true;
              -                continue;
              -            }
              -            if (c === '?') {
              -                re += qmark;
              -                hasMagic = true;
              -                continue;
              -            }
              -            re += regExpEscape(c);
              -        }
              -        return [re, unescape(glob), !!hasMagic, uflag];
              -    }
              -}
              -//# sourceMappingURL=ast.js.map
              \ No newline at end of file
              diff --git a/node_modules/mocha/node_modules/minimatch/dist/esm/ast.js.map b/node_modules/mocha/node_modules/minimatch/dist/esm/ast.js.map
              deleted file mode 100644
              index f1f8b34c..00000000
              --- a/node_modules/mocha/node_modules/minimatch/dist/esm/ast.js.map
              +++ /dev/null
              @@ -1 +0,0 @@
              -{"version":3,"file":"ast.js","sourceRoot":"","sources":["../../src/ast.ts"],"names":[],"mappings":"AAAA,8BAA8B;AAE9B,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAEnD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAwCxC,MAAM,KAAK,GAAG,IAAI,GAAG,CAAc,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAA;AAC7D,MAAM,aAAa,GAAG,CAAC,CAAS,EAAoB,EAAE,CACpD,KAAK,CAAC,GAAG,CAAC,CAAgB,CAAC,CAAA;AAE7B,iEAAiE;AACjE,gEAAgE;AAChE,0CAA0C;AAC1C,uEAAuE;AACvE,MAAM,gBAAgB,GAAG,2BAA2B,CAAA;AACpD,MAAM,UAAU,GAAG,SAAS,CAAA;AAE5B,uEAAuE;AACvE,qEAAqE;AACrE,qEA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,CAAC,CAAA;oBACjB,QAAQ,GAAG,QAAQ,IAAI,KAAK,CAAA;oBAC5B,SAAQ;iBACT;aACF;YACD,IAAI,CAAC,KAAK,GAAG,EAAE;gBACb,IAAI,OAAO,IAAI,IAAI,KAAK,GAAG;oBAAE,EAAE,IAAI,WAAW,CAAA;;oBACzC,EAAE,IAAI,IAAI,CAAA;gBACf,QAAQ,GAAG,IAAI,CAAA;gBACf,SAAQ;aACT;YACD,IAAI,CAAC,KAAK,GAAG,EAAE;gBACb,EAAE,IAAI,KAAK,CAAA;gBACX,QAAQ,GAAG,IAAI,CAAA;gBACf,SAAQ;aACT;YACD,EAAE,IAAI,YAAY,CAAC,CAAC,CAAC,CAAA;SACtB;QACD,OAAO,CAAC,EAAE,EAAE,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAA;IAChD,CAAC;CACF","sourcesContent":["// parse a single path portion\n\nimport { parseClass } from './brace-expressions.js'\nimport { MinimatchOptions, MMRegExp } from './index.js'\nimport { unescape } from './unescape.js'\n\n// classes [] are handled by the parseClass method\n// for positive extglobs, we sub-parse the contents, and combine,\n// with the appropriate regexp close.\n// for negative extglobs, we sub-parse the contents, but then\n// have to include the rest of the pattern, then the parent, etc.,\n// as the thing that cannot be because RegExp negative lookaheads\n// are different from globs.\n//\n// So for example:\n// a@(i|w!(x|y)z|j)b => ^a(i|w((!?(x|y)zb).*)z|j)b$\n//   1   2 3   4 5 6      1   2    3   46      5 6\n//\n// Assembling the extglob requires not just the negated patterns themselves,\n// but also anything following the negative patterns up to the boundary\n// of the current pattern, plus anything following in the parent pattern.\n//\n//\n// So, first, we parse the string into an AST of extglobs, without turning\n// anything into regexps yet.\n//\n// ['a', {@ [['i'], ['w', {!['x', 'y']}, 'z'], ['j']]}, 'b']\n//\n// Then, for all the negative extglobs, we append whatever comes after in\n// each parent as their tail\n//\n// ['a', {@ [['i'], ['w', {!['x', 'y'], 'z', 'b'}, 'z'], ['j']]}, 'b']\n//\n// Lastly, we turn each of these pieces into a regexp, and join\n//\n//                                 v----- .* because there's more following,\n//                                 v    v  otherwise, .+ because it must be\n//                                 v    v  *something* there.\n// ['^a', {@ ['i', 'w(?:(!?(?:x|y).*zb$).*)z', 'j' ]}, 'b$']\n//   copy what follows into here--^^^^^\n// ['^a', '(?:i|w(?:(?!(?:x|y).*zb$).*)z|j)', 'b$']\n// ['^a(?:i|w(?:(?!(?:x|y).*zb$).*)z|j)b$']\n\nexport type ExtglobType = '!' | '?' | '+' | '*' | '@'\nconst types = new Set(['!', '?', '+', '*', '@'])\nconst isExtglobType = (c: string): c is ExtglobType =>\n  types.has(c as ExtglobType)\n\n// Patterns that get prepended to bind to the start of either the\n// entire string, or just a single path portion, to prevent dots\n// and/or traversal patterns, when needed.\n// Exts don't need the ^ or / bit, because the root binds that already.\nconst startNoTraversal = '(?!(?:^|/)\\\\.\\\\.?(?:$|/))'\nconst startNoDot = '(?!\\\\.)'\n\n// characters that indicate a start of pattern needs the \"no dots\" bit,\n// because a dot *might* be matched. ( is not in the list, because in\n// the case of a child extglob, it will handle the prevention itself.\nconst addPatternStart = new Set(['[', '.'])\n// cases where traversal is A-OK, no dot prevention needed\nconst justDots = new Set(['..', '.'])\nconst reSpecials = new Set('().*{}+?[]^$\\\\!')\nconst regExpEscape = (s: string) =>\n  s.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&')\n\n// any single thing other than /\nconst qmark = '[^/]'\n\n// * => any number of characters\nconst star = qmark + '*?'\n// use + when we need to ensure that *something* matches, because the * is\n// the only thing in the path portion.\nconst starNoEmpty = qmark + '+?'\n\n// remove the \\ chars that we added if we end up doing a nonmagic compare\n// const deslash = (s: string) => s.replace(/\\\\(.)/g, '$1')\n\nexport class AST {\n  type: ExtglobType | null\n  readonly #root: AST\n\n  #hasMagic?: boolean\n  #uflag: boolean = false\n  #parts: (string | AST)[] = []\n  readonly #parent?: AST\n  readonly #parentIndex: number\n  #negs: AST[]\n  #filledNegs: boolean = false\n  #options: MinimatchOptions\n  #toString?: string\n  // set to true if it's an extglob with no children\n  // (which really means one child of '')\n  #emptyExt: boolean = false\n\n  constructor(\n    type: ExtglobType | null,\n    parent?: AST,\n    options: MinimatchOptions = {}\n  ) {\n    this.type = type\n    // extglobs are inherently magical\n    if (type) this.#hasMagic = true\n    this.#parent = parent\n    this.#root = this.#parent ? this.#parent.#root : this\n    this.#options = this.#root === this ? options : this.#root.#options\n    this.#negs = this.#root === this ? [] : this.#root.#negs\n    if (type === '!' && !this.#root.#filledNegs) this.#negs.push(this)\n    this.#parentIndex = this.#parent ? this.#parent.#parts.length : 0\n  }\n\n  get hasMagic(): boolean | undefined {\n    /* c8 ignore start */\n    if (this.#hasMagic !== undefined) return this.#hasMagic\n    /* c8 ignore stop */\n    for (const p of this.#parts) {\n      if (typeof p === 'string') continue\n      if (p.type || p.hasMagic) return (this.#hasMagic = true)\n    }\n    // note: will be undefined until we generate the regexp src and find out\n    return this.#hasMagic\n  }\n\n  // reconstructs the pattern\n  toString(): string {\n    if (this.#toString !== undefined) return this.#toString\n    if (!this.type) {\n      return (this.#toString = this.#parts.map(p => String(p)).join(''))\n    } else {\n      return (this.#toString =\n        this.type + '(' + this.#parts.map(p => String(p)).join('|') + ')')\n    }\n  }\n\n  #fillNegs() {\n    /* c8 ignore start */\n    if (this !== this.#root) throw new Error('should only call on root')\n    if (this.#filledNegs) return this\n    /* c8 ignore stop */\n\n    // call toString() once to fill this out\n    this.toString()\n    this.#filledNegs = true\n    let n: AST | undefined\n    while ((n = this.#negs.pop())) {\n      if (n.type !== '!') continue\n      // walk up the tree, appending everthing that comes AFTER parentIndex\n      let p: AST | undefined = n\n      let pp = p.#parent\n      while (pp) {\n        for (\n          let i = p.#parentIndex + 1;\n          !pp.type && i < pp.#parts.length;\n          i++\n        ) {\n          for (const part of n.#parts) {\n            /* c8 ignore start */\n            if (typeof part === 'string') {\n              throw new Error('string part in extglob AST??')\n            }\n            /* c8 ignore stop */\n            part.copyIn(pp.#parts[i])\n          }\n        }\n        p = pp\n        pp = p.#parent\n      }\n    }\n    return this\n  }\n\n  push(...parts: (string | AST)[]) {\n    for (const p of parts) {\n      if (p === '') continue\n      /* c8 ignore start */\n      if (typeof p !== 'string' && !(p instanceof AST && p.#parent === this)) {\n        throw new Error('invalid part: ' + p)\n      }\n      /* c8 ignore stop */\n      this.#parts.push(p)\n    }\n  }\n\n  toJSON() {\n    const ret: any[] =\n      this.type === null\n        ? this.#parts.slice().map(p => (typeof p === 'string' ? p : p.toJSON()))\n        : [this.type, ...this.#parts.map(p => (p as AST).toJSON())]\n    if (this.isStart() && !this.type) ret.unshift([])\n    if (\n      this.isEnd() &&\n      (this === this.#root ||\n        (this.#root.#filledNegs && this.#parent?.type === '!'))\n    ) {\n      ret.push({})\n    }\n    return ret\n  }\n\n  isStart(): boolean {\n    if (this.#root === this) return true\n    // if (this.type) return !!this.#parent?.isStart()\n    if (!this.#parent?.isStart()) return false\n    if (this.#parentIndex === 0) return true\n    // if everything AHEAD of this is a negation, then it's still the \"start\"\n    const p = this.#parent\n    for (let i = 0; i < this.#parentIndex; i++) {\n      const pp = p.#parts[i]\n      if (!(pp instanceof AST && pp.type === '!')) {\n        return false\n      }\n    }\n    return true\n  }\n\n  isEnd(): boolean {\n    if (this.#root === this) return true\n    if (this.#parent?.type === '!') return true\n    if (!this.#parent?.isEnd()) return false\n    if (!this.type) return this.#parent?.isEnd()\n    // if not root, it'll always have a parent\n    /* c8 ignore start */\n    const pl = this.#parent ? this.#parent.#parts.length : 0\n    /* c8 ignore stop */\n    return this.#parentIndex === pl - 1\n  }\n\n  copyIn(part: AST | string) {\n    if (typeof part === 'string') this.push(part)\n    else this.push(part.clone(this))\n  }\n\n  clone(parent: AST) {\n    const c = new AST(this.type, parent)\n    for (const p of this.#parts) {\n      c.copyIn(p)\n    }\n    return c\n  }\n\n  static #parseAST(\n    str: string,\n    ast: AST,\n    pos: number,\n    opt: MinimatchOptions\n  ): number {\n    let escaping = false\n    let inBrace = false\n    let braceStart = -1\n    let braceNeg = false\n    if (ast.type === null) {\n      // outside of a extglob, append until we find a start\n      let i = pos\n      let acc = ''\n      while (i < str.length) {\n        const c = str.charAt(i++)\n        // still accumulate escapes at this point, but we do ignore\n        // starts that are escaped\n        if (escaping || c === '\\\\') {\n          escaping = !escaping\n          acc += c\n          continue\n        }\n\n        if (inBrace) {\n          if (i === braceStart + 1) {\n            if (c === '^' || c === '!') {\n              braceNeg = true\n            }\n          } else if (c === ']' && !(i === braceStart + 2 && braceNeg)) {\n            inBrace = false\n          }\n          acc += c\n          continue\n        } else if (c === '[') {\n          inBrace = true\n          braceStart = i\n          braceNeg = false\n          acc += c\n          continue\n        }\n\n        if (!opt.noext && isExtglobType(c) && str.charAt(i) === '(') {\n          ast.push(acc)\n          acc = ''\n          const ext = new AST(c, ast)\n          i = AST.#parseAST(str, ext, i, opt)\n          ast.push(ext)\n          continue\n        }\n        acc += c\n      }\n      ast.push(acc)\n      return i\n    }\n\n    // some kind of extglob, pos is at the (\n    // find the next | or )\n    let i = pos + 1\n    let part = new AST(null, ast)\n    const parts: AST[] = []\n    let acc = ''\n    while (i < str.length) {\n      const c = str.charAt(i++)\n      // still accumulate escapes at this point, but we do ignore\n      // starts that are escaped\n      if (escaping || c === '\\\\') {\n        escaping = !escaping\n        acc += c\n        continue\n      }\n\n      if (inBrace) {\n        if (i === braceStart + 1) {\n          if (c === '^' || c === '!') {\n            braceNeg = true\n          }\n        } else if (c === ']' && !(i === braceStart + 2 && braceNeg)) {\n          inBrace = false\n        }\n        acc += c\n        continue\n      } else if (c === '[') {\n        inBrace = true\n        braceStart = i\n        braceNeg = false\n        acc += c\n        continue\n      }\n\n      if (isExtglobType(c) && str.charAt(i) === '(') {\n        part.push(acc)\n        acc = ''\n        const ext = new AST(c, part)\n        part.push(ext)\n        i = AST.#parseAST(str, ext, i, opt)\n        continue\n      }\n      if (c === '|') {\n        part.push(acc)\n        acc = ''\n        parts.push(part)\n        part = new AST(null, ast)\n        continue\n      }\n      if (c === ')') {\n        if (acc === '' && ast.#parts.length === 0) {\n          ast.#emptyExt = true\n        }\n        part.push(acc)\n        acc = ''\n        ast.push(...parts, part)\n        return i\n      }\n      acc += c\n    }\n\n    // unfinished extglob\n    // if we got here, it was a malformed extglob! not an extglob, but\n    // maybe something else in there.\n    ast.type = null\n    ast.#hasMagic = undefined\n    ast.#parts = [str.substring(pos - 1)]\n    return i\n  }\n\n  static fromGlob(pattern: string, options: MinimatchOptions = {}) {\n    const ast = new AST(null, undefined, options)\n    AST.#parseAST(pattern, ast, 0, options)\n    return ast\n  }\n\n  // returns the regular expression if there's magic, or the unescaped\n  // string if not.\n  toMMPattern(): MMRegExp | string {\n    // should only be called on root\n    /* c8 ignore start */\n    if (this !== this.#root) return this.#root.toMMPattern()\n    /* c8 ignore stop */\n    const glob = this.toString()\n    const [re, body, hasMagic, uflag] = this.toRegExpSource()\n    // if we're in nocase mode, and not nocaseMagicOnly, then we do\n    // still need a regular expression if we have to case-insensitively\n    // match capital/lowercase characters.\n    const anyMagic =\n      hasMagic ||\n      this.#hasMagic ||\n      (this.#options.nocase &&\n        !this.#options.nocaseMagicOnly &&\n        glob.toUpperCase() !== glob.toLowerCase())\n    if (!anyMagic) {\n      return body\n    }\n\n    const flags = (this.#options.nocase ? 'i' : '') + (uflag ? 'u' : '')\n    return Object.assign(new RegExp(`^${re}$`, flags), {\n      _src: re,\n      _glob: glob,\n    })\n  }\n\n  get options() {\n    return this.#options\n  }\n\n  // returns the string match, the regexp source, whether there's magic\n  // in the regexp (so a regular expression is required) and whether or\n  // not the uflag is needed for the regular expression (for posix classes)\n  // TODO: instead of injecting the start/end at this point, just return\n  // the BODY of the regexp, along with the start/end portions suitable\n  // for binding the start/end in either a joined full-path makeRe context\n  // (where we bind to (^|/), or a standalone matchPart context (where\n  // we bind to ^, and not /).  Otherwise slashes get duped!\n  //\n  // In part-matching mode, the start is:\n  // - if not isStart: nothing\n  // - if traversal possible, but not allowed: ^(?!\\.\\.?$)\n  // - if dots allowed or not possible: ^\n  // - if dots possible and not allowed: ^(?!\\.)\n  // end is:\n  // - if not isEnd(): nothing\n  // - else: $\n  //\n  // In full-path matching mode, we put the slash at the START of the\n  // pattern, so start is:\n  // - if first pattern: same as part-matching mode\n  // - if not isStart(): nothing\n  // - if traversal possible, but not allowed: /(?!\\.\\.?(?:$|/))\n  // - if dots allowed or not possible: /\n  // - if dots possible and not allowed: /(?!\\.)\n  // end is:\n  // - if last pattern, same as part-matching mode\n  // - else nothing\n  //\n  // Always put the (?:$|/) on negated tails, though, because that has to be\n  // there to bind the end of the negated pattern portion, and it's easier to\n  // just stick it in now rather than try to inject it later in the middle of\n  // the pattern.\n  //\n  // We can just always return the same end, and leave it up to the caller\n  // to know whether it's going to be used joined or in parts.\n  // And, if the start is adjusted slightly, can do the same there:\n  // - if not isStart: nothing\n  // - if traversal possible, but not allowed: (?:/|^)(?!\\.\\.?$)\n  // - if dots allowed or not possible: (?:/|^)\n  // - if dots possible and not allowed: (?:/|^)(?!\\.)\n  //\n  // But it's better to have a simpler binding without a conditional, for\n  // performance, so probably better to return both start options.\n  //\n  // Then the caller just ignores the end if it's not the first pattern,\n  // and the start always gets applied.\n  //\n  // But that's always going to be $ if it's the ending pattern, or nothing,\n  // so the caller can just attach $ at the end of the pattern when building.\n  //\n  // So the todo is:\n  // - better detect what kind of start is needed\n  // - return both flavors of starting pattern\n  // - attach $ at the end of the pattern when creating the actual RegExp\n  //\n  // Ah, but wait, no, that all only applies to the root when the first pattern\n  // is not an extglob. If the first pattern IS an extglob, then we need all\n  // that dot prevention biz to live in the extglob portions, because eg\n  // +(*|.x*) can match .xy but not .yx.\n  //\n  // So, return the two flavors if it's #root and the first child is not an\n  // AST, otherwise leave it to the child AST to handle it, and there,\n  // use the (?:^|/) style of start binding.\n  //\n  // Even simplified further:\n  // - Since the start for a join is eg /(?!\\.) and the start for a part\n  // is ^(?!\\.), we can just prepend (?!\\.) to the pattern (either root\n  // or start or whatever) and prepend ^ or / at the Regexp construction.\n  toRegExpSource(\n    allowDot?: boolean\n  ): [re: string, body: string, hasMagic: boolean, uflag: boolean] {\n    const dot = allowDot ?? !!this.#options.dot\n    if (this.#root === this) this.#fillNegs()\n    if (!this.type) {\n      const noEmpty = this.isStart() && this.isEnd()\n      const src = this.#parts\n        .map(p => {\n          const [re, _, hasMagic, uflag] =\n            typeof p === 'string'\n              ? AST.#parseGlob(p, this.#hasMagic, noEmpty)\n              : p.toRegExpSource(allowDot)\n          this.#hasMagic = this.#hasMagic || hasMagic\n          this.#uflag = this.#uflag || uflag\n          return re\n        })\n        .join('')\n\n      let start = ''\n      if (this.isStart()) {\n        if (typeof this.#parts[0] === 'string') {\n          // this is the string that will match the start of the pattern,\n          // so we need to protect against dots and such.\n\n          // '.' and '..' cannot match unless the pattern is that exactly,\n          // even if it starts with . or dot:true is set.\n          const dotTravAllowed =\n            this.#parts.length === 1 && justDots.has(this.#parts[0])\n          if (!dotTravAllowed) {\n            const aps = addPatternStart\n            // check if we have a possibility of matching . or ..,\n            // and prevent that.\n            const needNoTrav =\n              // dots are allowed, and the pattern starts with [ or .\n              (dot && aps.has(src.charAt(0))) ||\n              // the pattern starts with \\., and then [ or .\n              (src.startsWith('\\\\.') && aps.has(src.charAt(2))) ||\n              // the pattern starts with \\.\\., and then [ or .\n              (src.startsWith('\\\\.\\\\.') && aps.has(src.charAt(4)))\n            // no need to prevent dots if it can't match a dot, or if a\n            // sub-pattern will be preventing it anyway.\n            const needNoDot = !dot && !allowDot && aps.has(src.charAt(0))\n\n            start = needNoTrav ? startNoTraversal : needNoDot ? startNoDot : ''\n          }\n        }\n      }\n\n      // append the \"end of path portion\" pattern to negation tails\n      let end = ''\n      if (\n        this.isEnd() &&\n        this.#root.#filledNegs &&\n        this.#parent?.type === '!'\n      ) {\n        end = '(?:$|\\\\/)'\n      }\n      const final = start + src + end\n      return [\n        final,\n        unescape(src),\n        (this.#hasMagic = !!this.#hasMagic),\n        this.#uflag,\n      ]\n    }\n\n    // We need to calculate the body *twice* if it's a repeat pattern\n    // at the start, once in nodot mode, then again in dot mode, so a\n    // pattern like *(?) can match 'x.y'\n\n    const repeated = this.type === '*' || this.type === '+'\n    // some kind of extglob\n    const start = this.type === '!' ? '(?:(?!(?:' : '(?:'\n    let body = this.#partsToRegExp(dot)\n\n    if (this.isStart() && this.isEnd() && !body && this.type !== '!') {\n      // invalid extglob, has to at least be *something* present, if it's\n      // the entire path portion.\n      const s = this.toString()\n      this.#parts = [s]\n      this.type = null\n      this.#hasMagic = undefined\n      return [s, unescape(this.toString()), false, false]\n    }\n\n    // XXX abstract out this map method\n    let bodyDotAllowed =\n      !repeated || allowDot || dot || !startNoDot\n        ? ''\n        : this.#partsToRegExp(true)\n    if (bodyDotAllowed === body) {\n      bodyDotAllowed = ''\n    }\n    if (bodyDotAllowed) {\n      body = `(?:${body})(?:${bodyDotAllowed})*?`\n    }\n\n    // an empty !() is exactly equivalent to a starNoEmpty\n    let final = ''\n    if (this.type === '!' && this.#emptyExt) {\n      final = (this.isStart() && !dot ? startNoDot : '') + starNoEmpty\n    } else {\n      const close =\n        this.type === '!'\n          ? // !() must match something,but !(x) can match ''\n            '))' +\n            (this.isStart() && !dot && !allowDot ? startNoDot : '') +\n            star +\n            ')'\n          : this.type === '@'\n          ? ')'\n          : this.type === '?'\n          ? ')?'\n          : this.type === '+' && bodyDotAllowed\n          ? ')'\n          : this.type === '*' && bodyDotAllowed\n          ? `)?`\n          : `)${this.type}`\n      final = start + body + close\n    }\n    return [\n      final,\n      unescape(body),\n      (this.#hasMagic = !!this.#hasMagic),\n      this.#uflag,\n    ]\n  }\n\n  #partsToRegExp(dot: boolean) {\n    return this.#parts\n      .map(p => {\n        // extglob ASTs should only contain parent ASTs\n        /* c8 ignore start */\n        if (typeof p === 'string') {\n          throw new Error('string type in extglob ast??')\n        }\n        /* c8 ignore stop */\n        // can ignore hasMagic, because extglobs are already always magic\n        const [re, _, _hasMagic, uflag] = p.toRegExpSource(dot)\n        this.#uflag = this.#uflag || uflag\n        return re\n      })\n      .filter(p => !(this.isStart() && this.isEnd()) || !!p)\n      .join('|')\n  }\n\n  static #parseGlob(\n    glob: string,\n    hasMagic: boolean | undefined,\n    noEmpty: boolean = false\n  ): [re: string, body: string, hasMagic: boolean, uflag: boolean] {\n    let escaping = false\n    let re = ''\n    let uflag = false\n    for (let i = 0; i < glob.length; i++) {\n      const c = glob.charAt(i)\n      if (escaping) {\n        escaping = false\n        re += (reSpecials.has(c) ? '\\\\' : '') + c\n        continue\n      }\n      if (c === '\\\\') {\n        if (i === glob.length - 1) {\n          re += '\\\\\\\\'\n        } else {\n          escaping = true\n        }\n        continue\n      }\n      if (c === '[') {\n        const [src, needUflag, consumed, magic] = parseClass(glob, i)\n        if (consumed) {\n          re += src\n          uflag = uflag || needUflag\n          i += consumed - 1\n          hasMagic = hasMagic || magic\n          continue\n        }\n      }\n      if (c === '*') {\n        if (noEmpty && glob === '*') re += starNoEmpty\n        else re += star\n        hasMagic = true\n        continue\n      }\n      if (c === '?') {\n        re += qmark\n        hasMagic = true\n        continue\n      }\n      re += regExpEscape(c)\n    }\n    return [re, unescape(glob), !!hasMagic, uflag]\n  }\n}\n"]}
              \ No newline at end of file
              diff --git a/node_modules/mocha/node_modules/minimatch/dist/esm/brace-expressions.d.ts b/node_modules/mocha/node_modules/minimatch/dist/esm/brace-expressions.d.ts
              deleted file mode 100644
              index b1572deb..00000000
              --- a/node_modules/mocha/node_modules/minimatch/dist/esm/brace-expressions.d.ts
              +++ /dev/null
              @@ -1,8 +0,0 @@
              -export type ParseClassResult = [
              -    src: string,
              -    uFlag: boolean,
              -    consumed: number,
              -    hasMagic: boolean
              -];
              -export declare const parseClass: (glob: string, position: number) => ParseClassResult;
              -//# sourceMappingURL=brace-expressions.d.ts.map
              \ No newline at end of file
              diff --git a/node_modules/mocha/node_modules/minimatch/dist/esm/brace-expressions.d.ts.map b/node_modules/mocha/node_modules/minimatch/dist/esm/brace-expressions.d.ts.map
              deleted file mode 100644
              index d3949648..00000000
              --- a/node_modules/mocha/node_modules/minimatch/dist/esm/brace-expressions.d.ts.map
              +++ /dev/null
              @@ -1 +0,0 @@
              -{"version":3,"file":"brace-expressions.d.ts","sourceRoot":"","sources":["../../src/brace-expressions.ts"],"names":[],"mappings":"AA+BA,MAAM,MAAM,gBAAgB,GAAG;IAC7B,GAAG,EAAE,MAAM;IACX,KAAK,EAAE,OAAO;IACd,QAAQ,EAAE,MAAM;IAChB,QAAQ,EAAE,OAAO;CAClB,CAAA;AAQD,eAAO,MAAM,UAAU,SACf,MAAM,YACF,MAAM,qBA8HjB,CAAA"}
              \ No newline at end of file
              diff --git a/node_modules/mocha/node_modules/minimatch/dist/esm/brace-expressions.js b/node_modules/mocha/node_modules/minimatch/dist/esm/brace-expressions.js
              deleted file mode 100644
              index c629d6ae..00000000
              --- a/node_modules/mocha/node_modules/minimatch/dist/esm/brace-expressions.js
              +++ /dev/null
              @@ -1,148 +0,0 @@
              -// translate the various posix character classes into unicode properties
              -// this works across all unicode locales
              -// { : [, /u flag required, negated]
              -const posixClasses = {
              -    '[:alnum:]': ['\\p{L}\\p{Nl}\\p{Nd}', true],
              -    '[:alpha:]': ['\\p{L}\\p{Nl}', true],
              -    '[:ascii:]': ['\\x' + '00-\\x' + '7f', false],
              -    '[:blank:]': ['\\p{Zs}\\t', true],
              -    '[:cntrl:]': ['\\p{Cc}', true],
              -    '[:digit:]': ['\\p{Nd}', true],
              -    '[:graph:]': ['\\p{Z}\\p{C}', true, true],
              -    '[:lower:]': ['\\p{Ll}', true],
              -    '[:print:]': ['\\p{C}', true],
              -    '[:punct:]': ['\\p{P}', true],
              -    '[:space:]': ['\\p{Z}\\t\\r\\n\\v\\f', true],
              -    '[:upper:]': ['\\p{Lu}', true],
              -    '[:word:]': ['\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}', true],
              -    '[:xdigit:]': ['A-Fa-f0-9', false],
              -};
              -// only need to escape a few things inside of brace expressions
              -// escapes: [ \ ] -
              -const braceEscape = (s) => s.replace(/[[\]\\-]/g, '\\$&');
              -// escape all regexp magic characters
              -const regexpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&');
              -// everything has already been escaped, we just have to join
              -const rangesToString = (ranges) => ranges.join('');
              -// takes a glob string at a posix brace expression, and returns
              -// an equivalent regular expression source, and boolean indicating
              -// whether the /u flag needs to be applied, and the number of chars
              -// consumed to parse the character class.
              -// This also removes out of order ranges, and returns ($.) if the
              -// entire class just no good.
              -export const parseClass = (glob, position) => {
              -    const pos = position;
              -    /* c8 ignore start */
              -    if (glob.charAt(pos) !== '[') {
              -        throw new Error('not in a brace expression');
              -    }
              -    /* c8 ignore stop */
              -    const ranges = [];
              -    const negs = [];
              -    let i = pos + 1;
              -    let sawStart = false;
              -    let uflag = false;
              -    let escaping = false;
              -    let negate = false;
              -    let endPos = pos;
              -    let rangeStart = '';
              -    WHILE: while (i < glob.length) {
              -        const c = glob.charAt(i);
              -        if ((c === '!' || c === '^') && i === pos + 1) {
              -            negate = true;
              -            i++;
              -            continue;
              -        }
              -        if (c === ']' && sawStart && !escaping) {
              -            endPos = i + 1;
              -            break;
              -        }
              -        sawStart = true;
              -        if (c === '\\') {
              -            if (!escaping) {
              -                escaping = true;
              -                i++;
              -                continue;
              -            }
              -            // escaped \ char, fall through and treat like normal char
              -        }
              -        if (c === '[' && !escaping) {
              -            // either a posix class, a collation equivalent, or just a [
              -            for (const [cls, [unip, u, neg]] of Object.entries(posixClasses)) {
              -                if (glob.startsWith(cls, i)) {
              -                    // invalid, [a-[] is fine, but not [a-[:alpha]]
              -                    if (rangeStart) {
              -                        return ['$.', false, glob.length - pos, true];
              -                    }
              -                    i += cls.length;
              -                    if (neg)
              -                        negs.push(unip);
              -                    else
              -                        ranges.push(unip);
              -                    uflag = uflag || u;
              -                    continue WHILE;
              -                }
              -            }
              -        }
              -        // now it's just a normal character, effectively
              -        escaping = false;
              -        if (rangeStart) {
              -            // throw this range away if it's not valid, but others
              -            // can still match.
              -            if (c > rangeStart) {
              -                ranges.push(braceEscape(rangeStart) + '-' + braceEscape(c));
              -            }
              -            else if (c === rangeStart) {
              -                ranges.push(braceEscape(c));
              -            }
              -            rangeStart = '';
              -            i++;
              -            continue;
              -        }
              -        // now might be the start of a range.
              -        // can be either c-d or c-] or c] or c] at this point
              -        if (glob.startsWith('-]', i + 1)) {
              -            ranges.push(braceEscape(c + '-'));
              -            i += 2;
              -            continue;
              -        }
              -        if (glob.startsWith('-', i + 1)) {
              -            rangeStart = c;
              -            i += 2;
              -            continue;
              -        }
              -        // not the start of a range, just a single character
              -        ranges.push(braceEscape(c));
              -        i++;
              -    }
              -    if (endPos < i) {
              -        // didn't see the end of the class, not a valid class,
              -        // but might still be valid as a literal match.
              -        return ['', false, 0, false];
              -    }
              -    // if we got no ranges and no negates, then we have a range that
              -    // cannot possibly match anything, and that poisons the whole glob
              -    if (!ranges.length && !negs.length) {
              -        return ['$.', false, glob.length - pos, true];
              -    }
              -    // if we got one positive range, and it's a single character, then that's
              -    // not actually a magic pattern, it's just that one literal character.
              -    // we should not treat that as "magic", we should just return the literal
              -    // character. [_] is a perfectly valid way to escape glob magic chars.
              -    if (negs.length === 0 &&
              -        ranges.length === 1 &&
              -        /^\\?.$/.test(ranges[0]) &&
              -        !negate) {
              -        const r = ranges[0].length === 2 ? ranges[0].slice(-1) : ranges[0];
              -        return [regexpEscape(r), false, endPos - pos, false];
              -    }
              -    const sranges = '[' + (negate ? '^' : '') + rangesToString(ranges) + ']';
              -    const snegs = '[' + (negate ? '' : '^') + rangesToString(negs) + ']';
              -    const comb = ranges.length && negs.length
              -        ? '(' + sranges + '|' + snegs + ')'
              -        : ranges.length
              -            ? sranges
              -            : snegs;
              -    return [comb, uflag, endPos - pos, true];
              -};
              -//# sourceMappingURL=brace-expressions.js.map
              \ No newline at end of file
              diff --git a/node_modules/mocha/node_modules/minimatch/dist/esm/brace-expressions.js.map b/node_modules/mocha/node_modules/minimatch/dist/esm/brace-expressions.js.map
              deleted file mode 100644
              index cdba30da..00000000
              --- a/node_modules/mocha/node_modules/minimatch/dist/esm/brace-expressions.js.map
              +++ /dev/null
              @@ -1 +0,0 @@
              -{"version":3,"file":"brace-expressions.js","sourceRoot":"","sources":["../../src/brace-expressions.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,wCAAwC;AAExC,8DAA8D;AAC9D,MAAM,YAAY,GAA0D;IAC1E,WAAW,EAAE,CAAC,sBAAsB,EAAE,IAAI,CAAC;IAC3C,WAAW,EAAE,CAAC,eAAe,EAAE,IAAI,CAAC;IACpC,WAAW,EAAE,CAAC,KAAK,GAAG,QAAQ,GAAG,IAAI,EAAE,KAAK,CAAC;IAC7C,WAAW,EAAE,CAAC,YAAY,EAAE,IAAI,CAAC;IACjC,WAAW,EAAE,CAAC,SAAS,EAAE,IAAI,CAAC;IAC9B,WAAW,EAAE,CAAC,SAAS,EAAE,IAAI,CAAC;IAC9B,WAAW,EAAE,CAAC,cAAc,EAAE,IAAI,EAAE,IAAI,CAAC;IACzC,WAAW,EAAE,CAAC,SAAS,EAAE,IAAI,CAAC;IAC9B,WAAW,EAAE,CAAC,QAAQ,EAAE,IAAI,CAAC;IAC7B,WAAW,EAAE,CAAC,QAAQ,EAAE,IAAI,CAAC;IAC7B,WAAW,EAAE,CAAC,uBAAuB,EAAE,IAAI,CAAC;IAC5C,WAAW,EAAE,CAAC,SAAS,EAAE,IAAI,CAAC;IAC9B,UAAU,EAAE,CAAC,6BAA6B,EAAE,IAAI,CAAC;IACjD,YAAY,EAAE,CAAC,WAAW,EAAE,KAAK,CAAC;CACnC,CAAA;AAED,+DAA+D;AAC/D,mBAAmB;AACnB,MAAM,WAAW,GAAG,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,WAAW,EAAE,MAAM,CAAC,CAAA;AACjE,qCAAqC;AACrC,MAAM,YAAY,GAAG,CAAC,CAAS,EAAE,EAAE,CACjC,CAAC,CAAC,OAAO,CAAC,0BA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AC,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;QAClE,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,GAAG,EAAE,KAAK,CAAC,CAAA;KACrD;IAED,MAAM,OAAO,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,cAAc,CAAC,MAAM,CAAC,GAAG,GAAG,CAAA;IACxE,MAAM,KAAK,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,cAAc,CAAC,IAAI,CAAC,GAAG,GAAG,CAAA;IACpE,MAAM,IAAI,GACR,MAAM,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM;QAC1B,CAAC,CAAC,GAAG,GAAG,OAAO,GAAG,GAAG,GAAG,KAAK,GAAG,GAAG;QACnC,CAAC,CAAC,MAAM,CAAC,MAAM;YACf,CAAC,CAAC,OAAO;YACT,CAAC,CAAC,KAAK,CAAA;IAEX,OAAO,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,GAAG,GAAG,EAAE,IAAI,CAAC,CAAA;AAC1C,CAAC,CAAA","sourcesContent":["// translate the various posix character classes into unicode properties\n// this works across all unicode locales\n\n// { : [, /u flag required, negated]\nconst posixClasses: { [k: string]: [e: string, u: boolean, n?: boolean] } = {\n  '[:alnum:]': ['\\\\p{L}\\\\p{Nl}\\\\p{Nd}', true],\n  '[:alpha:]': ['\\\\p{L}\\\\p{Nl}', true],\n  '[:ascii:]': ['\\\\x' + '00-\\\\x' + '7f', false],\n  '[:blank:]': ['\\\\p{Zs}\\\\t', true],\n  '[:cntrl:]': ['\\\\p{Cc}', true],\n  '[:digit:]': ['\\\\p{Nd}', true],\n  '[:graph:]': ['\\\\p{Z}\\\\p{C}', true, true],\n  '[:lower:]': ['\\\\p{Ll}', true],\n  '[:print:]': ['\\\\p{C}', true],\n  '[:punct:]': ['\\\\p{P}', true],\n  '[:space:]': ['\\\\p{Z}\\\\t\\\\r\\\\n\\\\v\\\\f', true],\n  '[:upper:]': ['\\\\p{Lu}', true],\n  '[:word:]': ['\\\\p{L}\\\\p{Nl}\\\\p{Nd}\\\\p{Pc}', true],\n  '[:xdigit:]': ['A-Fa-f0-9', false],\n}\n\n// only need to escape a few things inside of brace expressions\n// escapes: [ \\ ] -\nconst braceEscape = (s: string) => s.replace(/[[\\]\\\\-]/g, '\\\\$&')\n// escape all regexp magic characters\nconst regexpEscape = (s: string) =>\n  s.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&')\n\n// everything has already been escaped, we just have to join\nconst rangesToString = (ranges: string[]): string => ranges.join('')\n\nexport type ParseClassResult = [\n  src: string,\n  uFlag: boolean,\n  consumed: number,\n  hasMagic: boolean\n]\n\n// takes a glob string at a posix brace expression, and returns\n// an equivalent regular expression source, and boolean indicating\n// whether the /u flag needs to be applied, and the number of chars\n// consumed to parse the character class.\n// This also removes out of order ranges, and returns ($.) if the\n// entire class just no good.\nexport const parseClass = (\n  glob: string,\n  position: number\n): ParseClassResult => {\n  const pos = position\n  /* c8 ignore start */\n  if (glob.charAt(pos) !== '[') {\n    throw new Error('not in a brace expression')\n  }\n  /* c8 ignore stop */\n  const ranges: string[] = []\n  const negs: string[] = []\n\n  let i = pos + 1\n  let sawStart = false\n  let uflag = false\n  let escaping = false\n  let negate = false\n  let endPos = pos\n  let rangeStart = ''\n  WHILE: while (i < glob.length) {\n    const c = glob.charAt(i)\n    if ((c === '!' || c === '^') && i === pos + 1) {\n      negate = true\n      i++\n      continue\n    }\n\n    if (c === ']' && sawStart && !escaping) {\n      endPos = i + 1\n      break\n    }\n\n    sawStart = true\n    if (c === '\\\\') {\n      if (!escaping) {\n        escaping = true\n        i++\n        continue\n      }\n      // escaped \\ char, fall through and treat like normal char\n    }\n    if (c === '[' && !escaping) {\n      // either a posix class, a collation equivalent, or just a [\n      for (const [cls, [unip, u, neg]] of Object.entries(posixClasses)) {\n        if (glob.startsWith(cls, i)) {\n          // invalid, [a-[] is fine, but not [a-[:alpha]]\n          if (rangeStart) {\n            return ['$.', false, glob.length - pos, true]\n          }\n          i += cls.length\n          if (neg) negs.push(unip)\n          else ranges.push(unip)\n          uflag = uflag || u\n          continue WHILE\n        }\n      }\n    }\n\n    // now it's just a normal character, effectively\n    escaping = false\n    if (rangeStart) {\n      // throw this range away if it's not valid, but others\n      // can still match.\n      if (c > rangeStart) {\n        ranges.push(braceEscape(rangeStart) + '-' + braceEscape(c))\n      } else if (c === rangeStart) {\n        ranges.push(braceEscape(c))\n      }\n      rangeStart = ''\n      i++\n      continue\n    }\n\n    // now might be the start of a range.\n    // can be either c-d or c-] or c] or c] at this point\n    if (glob.startsWith('-]', i + 1)) {\n      ranges.push(braceEscape(c + '-'))\n      i += 2\n      continue\n    }\n    if (glob.startsWith('-', i + 1)) {\n      rangeStart = c\n      i += 2\n      continue\n    }\n\n    // not the start of a range, just a single character\n    ranges.push(braceEscape(c))\n    i++\n  }\n\n  if (endPos < i) {\n    // didn't see the end of the class, not a valid class,\n    // but might still be valid as a literal match.\n    return ['', false, 0, false]\n  }\n\n  // if we got no ranges and no negates, then we have a range that\n  // cannot possibly match anything, and that poisons the whole glob\n  if (!ranges.length && !negs.length) {\n    return ['$.', false, glob.length - pos, true]\n  }\n\n  // if we got one positive range, and it's a single character, then that's\n  // not actually a magic pattern, it's just that one literal character.\n  // we should not treat that as \"magic\", we should just return the literal\n  // character. [_] is a perfectly valid way to escape glob magic chars.\n  if (\n    negs.length === 0 &&\n    ranges.length === 1 &&\n    /^\\\\?.$/.test(ranges[0]) &&\n    !negate\n  ) {\n    const r = ranges[0].length === 2 ? ranges[0].slice(-1) : ranges[0]\n    return [regexpEscape(r), false, endPos - pos, false]\n  }\n\n  const sranges = '[' + (negate ? '^' : '') + rangesToString(ranges) + ']'\n  const snegs = '[' + (negate ? '' : '^') + rangesToString(negs) + ']'\n  const comb =\n    ranges.length && negs.length\n      ? '(' + sranges + '|' + snegs + ')'\n      : ranges.length\n      ? sranges\n      : snegs\n\n  return [comb, uflag, endPos - pos, true]\n}\n"]}
              \ No newline at end of file
              diff --git a/node_modules/mocha/node_modules/minimatch/dist/esm/escape.d.ts b/node_modules/mocha/node_modules/minimatch/dist/esm/escape.d.ts
              deleted file mode 100644
              index dc3e3163..00000000
              --- a/node_modules/mocha/node_modules/minimatch/dist/esm/escape.d.ts
              +++ /dev/null
              @@ -1,12 +0,0 @@
              -import { MinimatchOptions } from './index.js';
              -/**
              - * Escape all magic characters in a glob pattern.
              - *
              - * If the {@link windowsPathsNoEscape | GlobOptions.windowsPathsNoEscape}
              - * option is used, then characters are escaped by wrapping in `[]`, because
              - * a magic character wrapped in a character class can only be satisfied by
              - * that exact character.  In this mode, `\` is _not_ escaped, because it is
              - * not interpreted as a magic character, but instead as a path separator.
              - */
              -export declare const escape: (s: string, { windowsPathsNoEscape, }?: Pick) => string;
              -//# sourceMappingURL=escape.d.ts.map
              \ No newline at end of file
              diff --git a/node_modules/mocha/node_modules/minimatch/dist/esm/escape.d.ts.map b/node_modules/mocha/node_modules/minimatch/dist/esm/escape.d.ts.map
              deleted file mode 100644
              index 0779dae7..00000000
              --- a/node_modules/mocha/node_modules/minimatch/dist/esm/escape.d.ts.map
              +++ /dev/null
              @@ -1 +0,0 @@
              -{"version":3,"file":"escape.d.ts","sourceRoot":"","sources":["../../src/escape.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAC7C;;;;;;;;GAQG;AACH,eAAO,MAAM,MAAM,MACd,MAAM,8BAGN,KAAK,gBAAgB,EAAE,sBAAsB,CAAC,WAQlD,CAAA"}
              \ No newline at end of file
              diff --git a/node_modules/mocha/node_modules/minimatch/dist/esm/escape.js b/node_modules/mocha/node_modules/minimatch/dist/esm/escape.js
              deleted file mode 100644
              index 16f7c8c7..00000000
              --- a/node_modules/mocha/node_modules/minimatch/dist/esm/escape.js
              +++ /dev/null
              @@ -1,18 +0,0 @@
              -/**
              - * Escape all magic characters in a glob pattern.
              - *
              - * If the {@link windowsPathsNoEscape | GlobOptions.windowsPathsNoEscape}
              - * option is used, then characters are escaped by wrapping in `[]`, because
              - * a magic character wrapped in a character class can only be satisfied by
              - * that exact character.  In this mode, `\` is _not_ escaped, because it is
              - * not interpreted as a magic character, but instead as a path separator.
              - */
              -export const escape = (s, { windowsPathsNoEscape = false, } = {}) => {
              -    // don't need to escape +@! because we escape the parens
              -    // that make those magic, and escaping ! as [!] isn't valid,
              -    // because [!]] is a valid glob class meaning not ']'.
              -    return windowsPathsNoEscape
              -        ? s.replace(/[?*()[\]]/g, '[$&]')
              -        : s.replace(/[?*()[\]\\]/g, '\\$&');
              -};
              -//# sourceMappingURL=escape.js.map
              \ No newline at end of file
              diff --git a/node_modules/mocha/node_modules/minimatch/dist/esm/escape.js.map b/node_modules/mocha/node_modules/minimatch/dist/esm/escape.js.map
              deleted file mode 100644
              index 170fd1ad..00000000
              --- a/node_modules/mocha/node_modules/minimatch/dist/esm/escape.js.map
              +++ /dev/null
              @@ -1 +0,0 @@
              -{"version":3,"file":"escape.js","sourceRoot":"","sources":["../../src/escape.ts"],"names":[],"mappings":"AACA;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,CACpB,CAAS,EACT,EACE,oBAAoB,GAAG,KAAK,MACsB,EAAE,EACtD,EAAE;IACF,wDAAwD;IACxD,4DAA4D;IAC5D,sDAAsD;IACtD,OAAO,oBAAoB;QACzB,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,YAAY,EAAE,MAAM,CAAC;QACjC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,cAAc,EAAE,MAAM,CAAC,CAAA;AACvC,CAAC,CAAA","sourcesContent":["import { MinimatchOptions } from './index.js'\n/**\n * Escape all magic characters in a glob pattern.\n *\n * If the {@link windowsPathsNoEscape | GlobOptions.windowsPathsNoEscape}\n * option is used, then characters are escaped by wrapping in `[]`, because\n * a magic character wrapped in a character class can only be satisfied by\n * that exact character.  In this mode, `\\` is _not_ escaped, because it is\n * not interpreted as a magic character, but instead as a path separator.\n */\nexport const escape = (\n  s: string,\n  {\n    windowsPathsNoEscape = false,\n  }: Pick = {}\n) => {\n  // don't need to escape +@! because we escape the parens\n  // that make those magic, and escaping ! as [!] isn't valid,\n  // because [!]] is a valid glob class meaning not ']'.\n  return windowsPathsNoEscape\n    ? s.replace(/[?*()[\\]]/g, '[$&]')\n    : s.replace(/[?*()[\\]\\\\]/g, '\\\\$&')\n}\n"]}
              \ No newline at end of file
              diff --git a/node_modules/mocha/node_modules/minimatch/dist/esm/index.d.ts b/node_modules/mocha/node_modules/minimatch/dist/esm/index.d.ts
              deleted file mode 100644
              index 41d16a98..00000000
              --- a/node_modules/mocha/node_modules/minimatch/dist/esm/index.d.ts
              +++ /dev/null
              @@ -1,94 +0,0 @@
              -import { AST } from './ast.js';
              -type Platform = 'aix' | 'android' | 'darwin' | 'freebsd' | 'haiku' | 'linux' | 'openbsd' | 'sunos' | 'win32' | 'cygwin' | 'netbsd';
              -export interface MinimatchOptions {
              -    nobrace?: boolean;
              -    nocomment?: boolean;
              -    nonegate?: boolean;
              -    debug?: boolean;
              -    noglobstar?: boolean;
              -    noext?: boolean;
              -    nonull?: boolean;
              -    windowsPathsNoEscape?: boolean;
              -    allowWindowsEscape?: boolean;
              -    partial?: boolean;
              -    dot?: boolean;
              -    nocase?: boolean;
              -    nocaseMagicOnly?: boolean;
              -    magicalBraces?: boolean;
              -    matchBase?: boolean;
              -    flipNegate?: boolean;
              -    preserveMultipleSlashes?: boolean;
              -    optimizationLevel?: number;
              -    platform?: Platform;
              -    windowsNoMagicRoot?: boolean;
              -}
              -export declare const minimatch: {
              -    (p: string, pattern: string, options?: MinimatchOptions): boolean;
              -    sep: Sep;
              -    GLOBSTAR: typeof GLOBSTAR;
              -    filter: (pattern: string, options?: MinimatchOptions) => (p: string) => boolean;
              -    defaults: (def: MinimatchOptions) => typeof minimatch;
              -    braceExpand: (pattern: string, options?: MinimatchOptions) => string[];
              -    makeRe: (pattern: string, options?: MinimatchOptions) => false | MMRegExp;
              -    match: (list: string[], pattern: string, options?: MinimatchOptions) => string[];
              -    AST: typeof AST;
              -    Minimatch: typeof Minimatch;
              -    escape: (s: string, { windowsPathsNoEscape, }?: Pick) => string;
              -    unescape: (s: string, { windowsPathsNoEscape, }?: Pick) => string;
              -};
              -type Sep = '\\' | '/';
              -export declare const sep: Sep;
              -export declare const GLOBSTAR: unique symbol;
              -export declare const filter: (pattern: string, options?: MinimatchOptions) => (p: string) => boolean;
              -export declare const defaults: (def: MinimatchOptions) => typeof minimatch;
              -export declare const braceExpand: (pattern: string, options?: MinimatchOptions) => string[];
              -export declare const makeRe: (pattern: string, options?: MinimatchOptions) => false | MMRegExp;
              -export declare const match: (list: string[], pattern: string, options?: MinimatchOptions) => string[];
              -export type MMRegExp = RegExp & {
              -    _src?: string;
              -    _glob?: string;
              -};
              -export type ParseReturnFiltered = string | MMRegExp | typeof GLOBSTAR;
              -export type ParseReturn = ParseReturnFiltered | false;
              -export declare class Minimatch {
              -    options: MinimatchOptions;
              -    set: ParseReturnFiltered[][];
              -    pattern: string;
              -    windowsPathsNoEscape: boolean;
              -    nonegate: boolean;
              -    negate: boolean;
              -    comment: boolean;
              -    empty: boolean;
              -    preserveMultipleSlashes: boolean;
              -    partial: boolean;
              -    globSet: string[];
              -    globParts: string[][];
              -    nocase: boolean;
              -    isWindows: boolean;
              -    platform: Platform;
              -    windowsNoMagicRoot: boolean;
              -    regexp: false | null | MMRegExp;
              -    constructor(pattern: string, options?: MinimatchOptions);
              -    hasMagic(): boolean;
              -    debug(..._: any[]): void;
              -    make(): void;
              -    preprocess(globParts: string[][]): string[][];
              -    adjascentGlobstarOptimize(globParts: string[][]): string[][];
              -    levelOneOptimize(globParts: string[][]): string[][];
              -    levelTwoFileOptimize(parts: string | string[]): string[];
              -    firstPhasePreProcess(globParts: string[][]): string[][];
              -    secondPhasePreProcess(globParts: string[][]): string[][];
              -    partsMatch(a: string[], b: string[], emptyGSMatch?: boolean): false | string[];
              -    parseNegate(): void;
              -    matchOne(file: string[], pattern: ParseReturn[], partial?: boolean): boolean;
              -    braceExpand(): string[];
              -    parse(pattern: string): ParseReturn;
              -    makeRe(): false | MMRegExp;
              -    slashSplit(p: string): string[];
              -    match(f: string, partial?: boolean): boolean;
              -    static defaults(def: MinimatchOptions): typeof Minimatch;
              -}
              -export { AST } from './ast.js';
              -export { escape } from './escape.js';
              -export { unescape } from './unescape.js';
              -//# sourceMappingURL=index.d.ts.map
              \ No newline at end of file
              diff --git a/node_modules/mocha/node_modules/minimatch/dist/esm/index.d.ts.map b/node_modules/mocha/node_modules/minimatch/dist/esm/index.d.ts.map
              deleted file mode 100644
              index 195491d8..00000000
              --- a/node_modules/mocha/node_modules/minimatch/dist/esm/index.d.ts.map
              +++ /dev/null
              @@ -1 +0,0 @@
              -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,GAAG,EAAe,MAAM,UAAU,CAAA;AAI3C,KAAK,QAAQ,GACT,KAAK,GACL,SAAS,GACT,QAAQ,GACR,SAAS,GACT,OAAO,GACP,OAAO,GACP,SAAS,GACT,OAAO,GACP,OAAO,GACP,QAAQ,GACR,QAAQ,CAAA;AAEZ,MAAM,WAAW,gBAAgB;IAC/B,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,oBAAoB,CAAC,EAA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E;IA0F1C,qBAAqB,CAAC,SAAS,EAAE,MAAM,EAAE,EAAE,GAAG,MAAM,EAAE,EAAE;IAkBxD,UAAU,CACR,CAAC,EAAE,MAAM,EAAE,EACX,CAAC,EAAE,MAAM,EAAE,EACX,YAAY,GAAE,OAAe,GAC5B,KAAK,GAAG,MAAM,EAAE;IA+CnB,WAAW;IAqBX,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,WAAW,EAAE,EAAE,OAAO,GAAE,OAAe;IAiNzE,WAAW;IAIX,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,WAAW;IAiDnC,MAAM;IAsFN,UAAU,CAAC,CAAC,EAAE,MAAM;IAepB,KAAK,CAAC,CAAC,EAAE,MAAM,EAAE,OAAO,UAAe;IAiEvC,MAAM,CAAC,QAAQ,CAAC,GAAG,EAAE,gBAAgB;CAGtC;AAED,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAC9B,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA"}
              \ No newline at end of file
              diff --git a/node_modules/mocha/node_modules/minimatch/dist/esm/index.js b/node_modules/mocha/node_modules/minimatch/dist/esm/index.js
              deleted file mode 100644
              index 84b577b0..00000000
              --- a/node_modules/mocha/node_modules/minimatch/dist/esm/index.js
              +++ /dev/null
              @@ -1,1001 +0,0 @@
              -import expand from 'brace-expansion';
              -import { assertValidPattern } from './assert-valid-pattern.js';
              -import { AST } from './ast.js';
              -import { escape } from './escape.js';
              -import { unescape } from './unescape.js';
              -export const minimatch = (p, pattern, options = {}) => {
              -    assertValidPattern(pattern);
              -    // shortcut: comments match nothing.
              -    if (!options.nocomment && pattern.charAt(0) === '#') {
              -        return false;
              -    }
              -    return new Minimatch(pattern, options).match(p);
              -};
              -// Optimized checking for the most common glob patterns.
              -const starDotExtRE = /^\*+([^+@!?\*\[\(]*)$/;
              -const starDotExtTest = (ext) => (f) => !f.startsWith('.') && f.endsWith(ext);
              -const starDotExtTestDot = (ext) => (f) => f.endsWith(ext);
              -const starDotExtTestNocase = (ext) => {
              -    ext = ext.toLowerCase();
              -    return (f) => !f.startsWith('.') && f.toLowerCase().endsWith(ext);
              -};
              -const starDotExtTestNocaseDot = (ext) => {
              -    ext = ext.toLowerCase();
              -    return (f) => f.toLowerCase().endsWith(ext);
              -};
              -const starDotStarRE = /^\*+\.\*+$/;
              -const starDotStarTest = (f) => !f.startsWith('.') && f.includes('.');
              -const starDotStarTestDot = (f) => f !== '.' && f !== '..' && f.includes('.');
              -const dotStarRE = /^\.\*+$/;
              -const dotStarTest = (f) => f !== '.' && f !== '..' && f.startsWith('.');
              -const starRE = /^\*+$/;
              -const starTest = (f) => f.length !== 0 && !f.startsWith('.');
              -const starTestDot = (f) => f.length !== 0 && f !== '.' && f !== '..';
              -const qmarksRE = /^\?+([^+@!?\*\[\(]*)?$/;
              -const qmarksTestNocase = ([$0, ext = '']) => {
              -    const noext = qmarksTestNoExt([$0]);
              -    if (!ext)
              -        return noext;
              -    ext = ext.toLowerCase();
              -    return (f) => noext(f) && f.toLowerCase().endsWith(ext);
              -};
              -const qmarksTestNocaseDot = ([$0, ext = '']) => {
              -    const noext = qmarksTestNoExtDot([$0]);
              -    if (!ext)
              -        return noext;
              -    ext = ext.toLowerCase();
              -    return (f) => noext(f) && f.toLowerCase().endsWith(ext);
              -};
              -const qmarksTestDot = ([$0, ext = '']) => {
              -    const noext = qmarksTestNoExtDot([$0]);
              -    return !ext ? noext : (f) => noext(f) && f.endsWith(ext);
              -};
              -const qmarksTest = ([$0, ext = '']) => {
              -    const noext = qmarksTestNoExt([$0]);
              -    return !ext ? noext : (f) => noext(f) && f.endsWith(ext);
              -};
              -const qmarksTestNoExt = ([$0]) => {
              -    const len = $0.length;
              -    return (f) => f.length === len && !f.startsWith('.');
              -};
              -const qmarksTestNoExtDot = ([$0]) => {
              -    const len = $0.length;
              -    return (f) => f.length === len && f !== '.' && f !== '..';
              -};
              -/* c8 ignore start */
              -const defaultPlatform = (typeof process === 'object' && process
              -    ? (typeof process.env === 'object' &&
              -        process.env &&
              -        process.env.__MINIMATCH_TESTING_PLATFORM__) ||
              -        process.platform
              -    : 'posix');
              -const path = {
              -    win32: { sep: '\\' },
              -    posix: { sep: '/' },
              -};
              -/* c8 ignore stop */
              -export const sep = defaultPlatform === 'win32' ? path.win32.sep : path.posix.sep;
              -minimatch.sep = sep;
              -export const GLOBSTAR = Symbol('globstar **');
              -minimatch.GLOBSTAR = GLOBSTAR;
              -// any single thing other than /
              -// don't need to escape / when using new RegExp()
              -const qmark = '[^/]';
              -// * => any number of characters
              -const star = qmark + '*?';
              -// ** when dots are allowed.  Anything goes, except .. and .
              -// not (^ or / followed by one or two dots followed by $ or /),
              -// followed by anything, any number of times.
              -const twoStarDot = '(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?';
              -// not a ^ or / followed by a dot,
              -// followed by anything, any number of times.
              -const twoStarNoDot = '(?:(?!(?:\\/|^)\\.).)*?';
              -export const filter = (pattern, options = {}) => (p) => minimatch(p, pattern, options);
              -minimatch.filter = filter;
              -const ext = (a, b = {}) => Object.assign({}, a, b);
              -export const defaults = (def) => {
              -    if (!def || typeof def !== 'object' || !Object.keys(def).length) {
              -        return minimatch;
              -    }
              -    const orig = minimatch;
              -    const m = (p, pattern, options = {}) => orig(p, pattern, ext(def, options));
              -    return Object.assign(m, {
              -        Minimatch: class Minimatch extends orig.Minimatch {
              -            constructor(pattern, options = {}) {
              -                super(pattern, ext(def, options));
              -            }
              -            static defaults(options) {
              -                return orig.defaults(ext(def, options)).Minimatch;
              -            }
              -        },
              -        AST: class AST extends orig.AST {
              -            /* c8 ignore start */
              -            constructor(type, parent, options = {}) {
              -                super(type, parent, ext(def, options));
              -            }
              -            /* c8 ignore stop */
              -            static fromGlob(pattern, options = {}) {
              -                return orig.AST.fromGlob(pattern, ext(def, options));
              -            }
              -        },
              -        unescape: (s, options = {}) => orig.unescape(s, ext(def, options)),
              -        escape: (s, options = {}) => orig.escape(s, ext(def, options)),
              -        filter: (pattern, options = {}) => orig.filter(pattern, ext(def, options)),
              -        defaults: (options) => orig.defaults(ext(def, options)),
              -        makeRe: (pattern, options = {}) => orig.makeRe(pattern, ext(def, options)),
              -        braceExpand: (pattern, options = {}) => orig.braceExpand(pattern, ext(def, options)),
              -        match: (list, pattern, options = {}) => orig.match(list, pattern, ext(def, options)),
              -        sep: orig.sep,
              -        GLOBSTAR: GLOBSTAR,
              -    });
              -};
              -minimatch.defaults = defaults;
              -// Brace expansion:
              -// a{b,c}d -> abd acd
              -// a{b,}c -> abc ac
              -// a{0..3}d -> a0d a1d a2d a3d
              -// a{b,c{d,e}f}g -> abg acdfg acefg
              -// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg
              -//
              -// Invalid sets are not expanded.
              -// a{2..}b -> a{2..}b
              -// a{b}c -> a{b}c
              -export const braceExpand = (pattern, options = {}) => {
              -    assertValidPattern(pattern);
              -    // Thanks to Yeting Li  for
              -    // improving this regexp to avoid a ReDOS vulnerability.
              -    if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) {
              -        // shortcut. no need to expand.
              -        return [pattern];
              -    }
              -    return expand(pattern);
              -};
              -minimatch.braceExpand = braceExpand;
              -// parse a component of the expanded set.
              -// At this point, no pattern may contain "/" in it
              -// so we're going to return a 2d array, where each entry is the full
              -// pattern, split on '/', and then turned into a regular expression.
              -// A regexp is made at the end which joins each array with an
              -// escaped /, and another full one which joins each regexp with |.
              -//
              -// Following the lead of Bash 4.1, note that "**" only has special meaning
              -// when it is the *only* thing in a path portion.  Otherwise, any series
              -// of * is equivalent to a single *.  Globstar behavior is enabled by
              -// default, and can be disabled by setting options.noglobstar.
              -export const makeRe = (pattern, options = {}) => new Minimatch(pattern, options).makeRe();
              -minimatch.makeRe = makeRe;
              -export const match = (list, pattern, options = {}) => {
              -    const mm = new Minimatch(pattern, options);
              -    list = list.filter(f => mm.match(f));
              -    if (mm.options.nonull && !list.length) {
              -        list.push(pattern);
              -    }
              -    return list;
              -};
              -minimatch.match = match;
              -// replace stuff like \* with *
              -const globMagic = /[?*]|[+@!]\(.*?\)|\[|\]/;
              -const regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&');
              -export class Minimatch {
              -    options;
              -    set;
              -    pattern;
              -    windowsPathsNoEscape;
              -    nonegate;
              -    negate;
              -    comment;
              -    empty;
              -    preserveMultipleSlashes;
              -    partial;
              -    globSet;
              -    globParts;
              -    nocase;
              -    isWindows;
              -    platform;
              -    windowsNoMagicRoot;
              -    regexp;
              -    constructor(pattern, options = {}) {
              -        assertValidPattern(pattern);
              -        options = options || {};
              -        this.options = options;
              -        this.pattern = pattern;
              -        this.platform = options.platform || defaultPlatform;
              -        this.isWindows = this.platform === 'win32';
              -        this.windowsPathsNoEscape =
              -            !!options.windowsPathsNoEscape || options.allowWindowsEscape === false;
              -        if (this.windowsPathsNoEscape) {
              -            this.pattern = this.pattern.replace(/\\/g, '/');
              -        }
              -        this.preserveMultipleSlashes = !!options.preserveMultipleSlashes;
              -        this.regexp = null;
              -        this.negate = false;
              -        this.nonegate = !!options.nonegate;
              -        this.comment = false;
              -        this.empty = false;
              -        this.partial = !!options.partial;
              -        this.nocase = !!this.options.nocase;
              -        this.windowsNoMagicRoot =
              -            options.windowsNoMagicRoot !== undefined
              -                ? options.windowsNoMagicRoot
              -                : !!(this.isWindows && this.nocase);
              -        this.globSet = [];
              -        this.globParts = [];
              -        this.set = [];
              -        // make the set of regexps etc.
              -        this.make();
              -    }
              -    hasMagic() {
              -        if (this.options.magicalBraces && this.set.length > 1) {
              -            return true;
              -        }
              -        for (const pattern of this.set) {
              -            for (const part of pattern) {
              -                if (typeof part !== 'string')
              -                    return true;
              -            }
              -        }
              -        return false;
              -    }
              -    debug(..._) { }
              -    make() {
              -        const pattern = this.pattern;
              -        const options = this.options;
              -        // empty patterns and comments match nothing.
              -        if (!options.nocomment && pattern.charAt(0) === '#') {
              -            this.comment = true;
              -            return;
              -        }
              -        if (!pattern) {
              -            this.empty = true;
              -            return;
              -        }
              -        // step 1: figure out negation, etc.
              -        this.parseNegate();
              -        // step 2: expand braces
              -        this.globSet = [...new Set(this.braceExpand())];
              -        if (options.debug) {
              -            this.debug = (...args) => console.error(...args);
              -        }
              -        this.debug(this.pattern, this.globSet);
              -        // step 3: now we have a set, so turn each one into a series of
              -        // path-portion matching patterns.
              -        // These will be regexps, except in the case of "**", which is
              -        // set to the GLOBSTAR object for globstar behavior,
              -        // and will not contain any / characters
              -        //
              -        // First, we preprocess to make the glob pattern sets a bit simpler
              -        // and deduped.  There are some perf-killing patterns that can cause
              -        // problems with a glob walk, but we can simplify them down a bit.
              -        const rawGlobParts = this.globSet.map(s => this.slashSplit(s));
              -        this.globParts = this.preprocess(rawGlobParts);
              -        this.debug(this.pattern, this.globParts);
              -        // glob --> regexps
              -        let set = this.globParts.map((s, _, __) => {
              -            if (this.isWindows && this.windowsNoMagicRoot) {
              -                // check if it's a drive or unc path.
              -                const isUNC = s[0] === '' &&
              -                    s[1] === '' &&
              -                    (s[2] === '?' || !globMagic.test(s[2])) &&
              -                    !globMagic.test(s[3]);
              -                const isDrive = /^[a-z]:/i.test(s[0]);
              -                if (isUNC) {
              -                    return [...s.slice(0, 4), ...s.slice(4).map(ss => this.parse(ss))];
              -                }
              -                else if (isDrive) {
              -                    return [s[0], ...s.slice(1).map(ss => this.parse(ss))];
              -                }
              -            }
              -            return s.map(ss => this.parse(ss));
              -        });
              -        this.debug(this.pattern, set);
              -        // filter out everything that didn't compile properly.
              -        this.set = set.filter(s => s.indexOf(false) === -1);
              -        // do not treat the ? in UNC paths as magic
              -        if (this.isWindows) {
              -            for (let i = 0; i < this.set.length; i++) {
              -                const p = this.set[i];
              -                if (p[0] === '' &&
              -                    p[1] === '' &&
              -                    this.globParts[i][2] === '?' &&
              -                    typeof p[3] === 'string' &&
              -                    /^[a-z]:$/i.test(p[3])) {
              -                    p[2] = '?';
              -                }
              -            }
              -        }
              -        this.debug(this.pattern, this.set);
              -    }
              -    // various transforms to equivalent pattern sets that are
              -    // faster to process in a filesystem walk.  The goal is to
              -    // eliminate what we can, and push all ** patterns as far
              -    // to the right as possible, even if it increases the number
              -    // of patterns that we have to process.
              -    preprocess(globParts) {
              -        // if we're not in globstar mode, then turn all ** into *
              -        if (this.options.noglobstar) {
              -            for (let i = 0; i < globParts.length; i++) {
              -                for (let j = 0; j < globParts[i].length; j++) {
              -                    if (globParts[i][j] === '**') {
              -                        globParts[i][j] = '*';
              -                    }
              -                }
              -            }
              -        }
              -        const { optimizationLevel = 1 } = this.options;
              -        if (optimizationLevel >= 2) {
              -            // aggressive optimization for the purpose of fs walking
              -            globParts = this.firstPhasePreProcess(globParts);
              -            globParts = this.secondPhasePreProcess(globParts);
              -        }
              -        else if (optimizationLevel >= 1) {
              -            // just basic optimizations to remove some .. parts
              -            globParts = this.levelOneOptimize(globParts);
              -        }
              -        else {
              -            // just collapse multiple ** portions into one
              -            globParts = this.adjascentGlobstarOptimize(globParts);
              -        }
              -        return globParts;
              -    }
              -    // just get rid of adjascent ** portions
              -    adjascentGlobstarOptimize(globParts) {
              -        return globParts.map(parts => {
              -            let gs = -1;
              -            while (-1 !== (gs = parts.indexOf('**', gs + 1))) {
              -                let i = gs;
              -                while (parts[i + 1] === '**') {
              -                    i++;
              -                }
              -                if (i !== gs) {
              -                    parts.splice(gs, i - gs);
              -                }
              -            }
              -            return parts;
              -        });
              -    }
              -    // get rid of adjascent ** and resolve .. portions
              -    levelOneOptimize(globParts) {
              -        return globParts.map(parts => {
              -            parts = parts.reduce((set, part) => {
              -                const prev = set[set.length - 1];
              -                if (part === '**' && prev === '**') {
              -                    return set;
              -                }
              -                if (part === '..') {
              -                    if (prev && prev !== '..' && prev !== '.' && prev !== '**') {
              -                        set.pop();
              -                        return set;
              -                    }
              -                }
              -                set.push(part);
              -                return set;
              -            }, []);
              -            return parts.length === 0 ? [''] : parts;
              -        });
              -    }
              -    levelTwoFileOptimize(parts) {
              -        if (!Array.isArray(parts)) {
              -            parts = this.slashSplit(parts);
              -        }
              -        let didSomething = false;
              -        do {
              -            didSomething = false;
              -            // 
              // -> 
              /
              -            if (!this.preserveMultipleSlashes) {
              -                for (let i = 1; i < parts.length - 1; i++) {
              -                    const p = parts[i];
              -                    // don't squeeze out UNC patterns
              -                    if (i === 1 && p === '' && parts[0] === '')
              -                        continue;
              -                    if (p === '.' || p === '') {
              -                        didSomething = true;
              -                        parts.splice(i, 1);
              -                        i--;
              -                    }
              -                }
              -                if (parts[0] === '.' &&
              -                    parts.length === 2 &&
              -                    (parts[1] === '.' || parts[1] === '')) {
              -                    didSomething = true;
              -                    parts.pop();
              -                }
              -            }
              -            // 
              /

              /../ ->

              /
              -            let dd = 0;
              -            while (-1 !== (dd = parts.indexOf('..', dd + 1))) {
              -                const p = parts[dd - 1];
              -                if (p && p !== '.' && p !== '..' && p !== '**') {
              -                    didSomething = true;
              -                    parts.splice(dd - 1, 2);
              -                    dd -= 2;
              -                }
              -            }
              -        } while (didSomething);
              -        return parts.length === 0 ? [''] : parts;
              -    }
              -    // First phase: single-pattern processing
              -    // 
               is 1 or more portions
              -    //  is 1 or more portions
              -    // 

              is any portion other than ., .., '', or ** - // is . or '' - // - // **/.. is *brutal* for filesystem walking performance, because - // it effectively resets the recursive walk each time it occurs, - // and ** cannot be reduced out by a .. pattern part like a regexp - // or most strings (other than .., ., and '') can be. - // - //

              /**/../

              /

              / -> {

              /../

              /

              /,

              /**/

              /

              /} - //

              // -> 
              /
              -    // 
              /

              /../ ->

              /
              -    // **/**/ -> **/
              -    //
              -    // **/*/ -> */**/ <== not valid because ** doesn't follow
              -    // this WOULD be allowed if ** did follow symlinks, or * didn't
              -    firstPhasePreProcess(globParts) {
              -        let didSomething = false;
              -        do {
              -            didSomething = false;
              -            // 
              /**/../

              /

              / -> {

              /../

              /

              /,

              /**/

              /

              /} - for (let parts of globParts) { - let gs = -1; - while (-1 !== (gs = parts.indexOf('**', gs + 1))) { - let gss = gs; - while (parts[gss + 1] === '**') { - //

              /**/**/ -> 
              /**/
              -                        gss++;
              -                    }
              -                    // eg, if gs is 2 and gss is 4, that means we have 3 **
              -                    // parts, and can remove 2 of them.
              -                    if (gss > gs) {
              -                        parts.splice(gs + 1, gss - gs);
              -                    }
              -                    let next = parts[gs + 1];
              -                    const p = parts[gs + 2];
              -                    const p2 = parts[gs + 3];
              -                    if (next !== '..')
              -                        continue;
              -                    if (!p ||
              -                        p === '.' ||
              -                        p === '..' ||
              -                        !p2 ||
              -                        p2 === '.' ||
              -                        p2 === '..') {
              -                        continue;
              -                    }
              -                    didSomething = true;
              -                    // edit parts in place, and push the new one
              -                    parts.splice(gs, 1);
              -                    const other = parts.slice(0);
              -                    other[gs] = '**';
              -                    globParts.push(other);
              -                    gs--;
              -                }
              -                // 
              // -> 
              /
              -                if (!this.preserveMultipleSlashes) {
              -                    for (let i = 1; i < parts.length - 1; i++) {
              -                        const p = parts[i];
              -                        // don't squeeze out UNC patterns
              -                        if (i === 1 && p === '' && parts[0] === '')
              -                            continue;
              -                        if (p === '.' || p === '') {
              -                            didSomething = true;
              -                            parts.splice(i, 1);
              -                            i--;
              -                        }
              -                    }
              -                    if (parts[0] === '.' &&
              -                        parts.length === 2 &&
              -                        (parts[1] === '.' || parts[1] === '')) {
              -                        didSomething = true;
              -                        parts.pop();
              -                    }
              -                }
              -                // 
              /

              /../ ->

              /
              -                let dd = 0;
              -                while (-1 !== (dd = parts.indexOf('..', dd + 1))) {
              -                    const p = parts[dd - 1];
              -                    if (p && p !== '.' && p !== '..' && p !== '**') {
              -                        didSomething = true;
              -                        const needDot = dd === 1 && parts[dd + 1] === '**';
              -                        const splin = needDot ? ['.'] : [];
              -                        parts.splice(dd - 1, 2, ...splin);
              -                        if (parts.length === 0)
              -                            parts.push('');
              -                        dd -= 2;
              -                    }
              -                }
              -            }
              -        } while (didSomething);
              -        return globParts;
              -    }
              -    // second phase: multi-pattern dedupes
              -    // {
              /*/,
              /

              /} ->

              /*/
              -    // {
              /,
              /} -> 
              /
              -    // {
              /**/,
              /} -> 
              /**/
              -    //
              -    // {
              /**/,
              /**/

              /} ->

              /**/
              -    // ^-- not valid because ** doens't follow symlinks
              -    secondPhasePreProcess(globParts) {
              -        for (let i = 0; i < globParts.length - 1; i++) {
              -            for (let j = i + 1; j < globParts.length; j++) {
              -                const matched = this.partsMatch(globParts[i], globParts[j], !this.preserveMultipleSlashes);
              -                if (matched) {
              -                    globParts[i] = [];
              -                    globParts[j] = matched;
              -                    break;
              -                }
              -            }
              -        }
              -        return globParts.filter(gs => gs.length);
              -    }
              -    partsMatch(a, b, emptyGSMatch = false) {
              -        let ai = 0;
              -        let bi = 0;
              -        let result = [];
              -        let which = '';
              -        while (ai < a.length && bi < b.length) {
              -            if (a[ai] === b[bi]) {
              -                result.push(which === 'b' ? b[bi] : a[ai]);
              -                ai++;
              -                bi++;
              -            }
              -            else if (emptyGSMatch && a[ai] === '**' && b[bi] === a[ai + 1]) {
              -                result.push(a[ai]);
              -                ai++;
              -            }
              -            else if (emptyGSMatch && b[bi] === '**' && a[ai] === b[bi + 1]) {
              -                result.push(b[bi]);
              -                bi++;
              -            }
              -            else if (a[ai] === '*' &&
              -                b[bi] &&
              -                (this.options.dot || !b[bi].startsWith('.')) &&
              -                b[bi] !== '**') {
              -                if (which === 'b')
              -                    return false;
              -                which = 'a';
              -                result.push(a[ai]);
              -                ai++;
              -                bi++;
              -            }
              -            else if (b[bi] === '*' &&
              -                a[ai] &&
              -                (this.options.dot || !a[ai].startsWith('.')) &&
              -                a[ai] !== '**') {
              -                if (which === 'a')
              -                    return false;
              -                which = 'b';
              -                result.push(b[bi]);
              -                ai++;
              -                bi++;
              -            }
              -            else {
              -                return false;
              -            }
              -        }
              -        // if we fall out of the loop, it means they two are identical
              -        // as long as their lengths match
              -        return a.length === b.length && result;
              -    }
              -    parseNegate() {
              -        if (this.nonegate)
              -            return;
              -        const pattern = this.pattern;
              -        let negate = false;
              -        let negateOffset = 0;
              -        for (let i = 0; i < pattern.length && pattern.charAt(i) === '!'; i++) {
              -            negate = !negate;
              -            negateOffset++;
              -        }
              -        if (negateOffset)
              -            this.pattern = pattern.slice(negateOffset);
              -        this.negate = negate;
              -    }
              -    // set partial to true to test if, for example,
              -    // "/a/b" matches the start of "/*/b/*/d"
              -    // Partial means, if you run out of file before you run
              -    // out of pattern, then that's fine, as long as all
              -    // the parts match.
              -    matchOne(file, pattern, partial = false) {
              -        const options = this.options;
              -        // UNC paths like //?/X:/... can match X:/... and vice versa
              -        // Drive letters in absolute drive or unc paths are always compared
              -        // case-insensitively.
              -        if (this.isWindows) {
              -            const fileDrive = typeof file[0] === 'string' && /^[a-z]:$/i.test(file[0]);
              -            const fileUNC = !fileDrive &&
              -                file[0] === '' &&
              -                file[1] === '' &&
              -                file[2] === '?' &&
              -                /^[a-z]:$/i.test(file[3]);
              -            const patternDrive = typeof pattern[0] === 'string' && /^[a-z]:$/i.test(pattern[0]);
              -            const patternUNC = !patternDrive &&
              -                pattern[0] === '' &&
              -                pattern[1] === '' &&
              -                pattern[2] === '?' &&
              -                typeof pattern[3] === 'string' &&
              -                /^[a-z]:$/i.test(pattern[3]);
              -            const fdi = fileUNC ? 3 : fileDrive ? 0 : undefined;
              -            const pdi = patternUNC ? 3 : patternDrive ? 0 : undefined;
              -            if (typeof fdi === 'number' && typeof pdi === 'number') {
              -                const [fd, pd] = [file[fdi], pattern[pdi]];
              -                if (fd.toLowerCase() === pd.toLowerCase()) {
              -                    pattern[pdi] = fd;
              -                    if (pdi > fdi) {
              -                        pattern = pattern.slice(pdi);
              -                    }
              -                    else if (fdi > pdi) {
              -                        file = file.slice(fdi);
              -                    }
              -                }
              -            }
              -        }
              -        // resolve and reduce . and .. portions in the file as well.
              -        // dont' need to do the second phase, because it's only one string[]
              -        const { optimizationLevel = 1 } = this.options;
              -        if (optimizationLevel >= 2) {
              -            file = this.levelTwoFileOptimize(file);
              -        }
              -        this.debug('matchOne', this, { file, pattern });
              -        this.debug('matchOne', file.length, pattern.length);
              -        for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
              -            this.debug('matchOne loop');
              -            var p = pattern[pi];
              -            var f = file[fi];
              -            this.debug(pattern, p, f);
              -            // should be impossible.
              -            // some invalid regexp stuff in the set.
              -            /* c8 ignore start */
              -            if (p === false) {
              -                return false;
              -            }
              -            /* c8 ignore stop */
              -            if (p === GLOBSTAR) {
              -                this.debug('GLOBSTAR', [pattern, p, f]);
              -                // "**"
              -                // a/**/b/**/c would match the following:
              -                // a/b/x/y/z/c
              -                // a/x/y/z/b/c
              -                // a/b/x/b/x/c
              -                // a/b/c
              -                // To do this, take the rest of the pattern after
              -                // the **, and see if it would match the file remainder.
              -                // If so, return success.
              -                // If not, the ** "swallows" a segment, and try again.
              -                // This is recursively awful.
              -                //
              -                // a/**/b/**/c matching a/b/x/y/z/c
              -                // - a matches a
              -                // - doublestar
              -                //   - matchOne(b/x/y/z/c, b/**/c)
              -                //     - b matches b
              -                //     - doublestar
              -                //       - matchOne(x/y/z/c, c) -> no
              -                //       - matchOne(y/z/c, c) -> no
              -                //       - matchOne(z/c, c) -> no
              -                //       - matchOne(c, c) yes, hit
              -                var fr = fi;
              -                var pr = pi + 1;
              -                if (pr === pl) {
              -                    this.debug('** at the end');
              -                    // a ** at the end will just swallow the rest.
              -                    // We have found a match.
              -                    // however, it will not swallow /.x, unless
              -                    // options.dot is set.
              -                    // . and .. are *never* matched by **, for explosively
              -                    // exponential reasons.
              -                    for (; fi < fl; fi++) {
              -                        if (file[fi] === '.' ||
              -                            file[fi] === '..' ||
              -                            (!options.dot && file[fi].charAt(0) === '.'))
              -                            return false;
              -                    }
              -                    return true;
              -                }
              -                // ok, let's see if we can swallow whatever we can.
              -                while (fr < fl) {
              -                    var swallowee = file[fr];
              -                    this.debug('\nglobstar while', file, fr, pattern, pr, swallowee);
              -                    // XXX remove this slice.  Just pass the start index.
              -                    if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
              -                        this.debug('globstar found match!', fr, fl, swallowee);
              -                        // found a match.
              -                        return true;
              -                    }
              -                    else {
              -                        // can't swallow "." or ".." ever.
              -                        // can only swallow ".foo" when explicitly asked.
              -                        if (swallowee === '.' ||
              -                            swallowee === '..' ||
              -                            (!options.dot && swallowee.charAt(0) === '.')) {
              -                            this.debug('dot detected!', file, fr, pattern, pr);
              -                            break;
              -                        }
              -                        // ** swallows a segment, and continue.
              -                        this.debug('globstar swallow a segment, and continue');
              -                        fr++;
              -                    }
              -                }
              -                // no match was found.
              -                // However, in partial mode, we can't say this is necessarily over.
              -                /* c8 ignore start */
              -                if (partial) {
              -                    // ran out of file
              -                    this.debug('\n>>> no match, partial?', file, fr, pattern, pr);
              -                    if (fr === fl) {
              -                        return true;
              -                    }
              -                }
              -                /* c8 ignore stop */
              -                return false;
              -            }
              -            // something other than **
              -            // non-magic patterns just have to match exactly
              -            // patterns with magic have been turned into regexps.
              -            let hit;
              -            if (typeof p === 'string') {
              -                hit = f === p;
              -                this.debug('string match', p, f, hit);
              -            }
              -            else {
              -                hit = p.test(f);
              -                this.debug('pattern match', p, f, hit);
              -            }
              -            if (!hit)
              -                return false;
              -        }
              -        // Note: ending in / means that we'll get a final ""
              -        // at the end of the pattern.  This can only match a
              -        // corresponding "" at the end of the file.
              -        // If the file ends in /, then it can only match a
              -        // a pattern that ends in /, unless the pattern just
              -        // doesn't have any more for it. But, a/b/ should *not*
              -        // match "a/b/*", even though "" matches against the
              -        // [^/]*? pattern, except in partial mode, where it might
              -        // simply not be reached yet.
              -        // However, a/b/ should still satisfy a/*
              -        // now either we fell off the end of the pattern, or we're done.
              -        if (fi === fl && pi === pl) {
              -            // ran out of pattern and filename at the same time.
              -            // an exact hit!
              -            return true;
              -        }
              -        else if (fi === fl) {
              -            // ran out of file, but still had pattern left.
              -            // this is ok if we're doing the match as part of
              -            // a glob fs traversal.
              -            return partial;
              -        }
              -        else if (pi === pl) {
              -            // ran out of pattern, still have file left.
              -            // this is only acceptable if we're on the very last
              -            // empty segment of a file with a trailing slash.
              -            // a/* should match a/b/
              -            return fi === fl - 1 && file[fi] === '';
              -            /* c8 ignore start */
              -        }
              -        else {
              -            // should be unreachable.
              -            throw new Error('wtf?');
              -        }
              -        /* c8 ignore stop */
              -    }
              -    braceExpand() {
              -        return braceExpand(this.pattern, this.options);
              -    }
              -    parse(pattern) {
              -        assertValidPattern(pattern);
              -        const options = this.options;
              -        // shortcuts
              -        if (pattern === '**')
              -            return GLOBSTAR;
              -        if (pattern === '')
              -            return '';
              -        // far and away, the most common glob pattern parts are
              -        // *, *.*, and *.  Add a fast check method for those.
              -        let m;
              -        let fastTest = null;
              -        if ((m = pattern.match(starRE))) {
              -            fastTest = options.dot ? starTestDot : starTest;
              -        }
              -        else if ((m = pattern.match(starDotExtRE))) {
              -            fastTest = (options.nocase
              -                ? options.dot
              -                    ? starDotExtTestNocaseDot
              -                    : starDotExtTestNocase
              -                : options.dot
              -                    ? starDotExtTestDot
              -                    : starDotExtTest)(m[1]);
              -        }
              -        else if ((m = pattern.match(qmarksRE))) {
              -            fastTest = (options.nocase
              -                ? options.dot
              -                    ? qmarksTestNocaseDot
              -                    : qmarksTestNocase
              -                : options.dot
              -                    ? qmarksTestDot
              -                    : qmarksTest)(m);
              -        }
              -        else if ((m = pattern.match(starDotStarRE))) {
              -            fastTest = options.dot ? starDotStarTestDot : starDotStarTest;
              -        }
              -        else if ((m = pattern.match(dotStarRE))) {
              -            fastTest = dotStarTest;
              -        }
              -        const re = AST.fromGlob(pattern, this.options).toMMPattern();
              -        if (fastTest && typeof re === 'object') {
              -            // Avoids overriding in frozen environments
              -            Reflect.defineProperty(re, 'test', { value: fastTest });
              -        }
              -        return re;
              -    }
              -    makeRe() {
              -        if (this.regexp || this.regexp === false)
              -            return this.regexp;
              -        // at this point, this.set is a 2d array of partial
              -        // pattern strings, or "**".
              -        //
              -        // It's better to use .match().  This function shouldn't
              -        // be used, really, but it's pretty convenient sometimes,
              -        // when you just want to work with a regex.
              -        const set = this.set;
              -        if (!set.length) {
              -            this.regexp = false;
              -            return this.regexp;
              -        }
              -        const options = this.options;
              -        const twoStar = options.noglobstar
              -            ? star
              -            : options.dot
              -                ? twoStarDot
              -                : twoStarNoDot;
              -        const flags = new Set(options.nocase ? ['i'] : []);
              -        // regexpify non-globstar patterns
              -        // if ** is only item, then we just do one twoStar
              -        // if ** is first, and there are more, prepend (\/|twoStar\/)? to next
              -        // if ** is last, append (\/twoStar|) to previous
              -        // if ** is in the middle, append (\/|\/twoStar\/) to previous
              -        // then filter out GLOBSTAR symbols
              -        let re = set
              -            .map(pattern => {
              -            const pp = pattern.map(p => {
              -                if (p instanceof RegExp) {
              -                    for (const f of p.flags.split(''))
              -                        flags.add(f);
              -                }
              -                return typeof p === 'string'
              -                    ? regExpEscape(p)
              -                    : p === GLOBSTAR
              -                        ? GLOBSTAR
              -                        : p._src;
              -            });
              -            pp.forEach((p, i) => {
              -                const next = pp[i + 1];
              -                const prev = pp[i - 1];
              -                if (p !== GLOBSTAR || prev === GLOBSTAR) {
              -                    return;
              -                }
              -                if (prev === undefined) {
              -                    if (next !== undefined && next !== GLOBSTAR) {
              -                        pp[i + 1] = '(?:\\/|' + twoStar + '\\/)?' + next;
              -                    }
              -                    else {
              -                        pp[i] = twoStar;
              -                    }
              -                }
              -                else if (next === undefined) {
              -                    pp[i - 1] = prev + '(?:\\/|' + twoStar + ')?';
              -                }
              -                else if (next !== GLOBSTAR) {
              -                    pp[i - 1] = prev + '(?:\\/|\\/' + twoStar + '\\/)' + next;
              -                    pp[i + 1] = GLOBSTAR;
              -                }
              -            });
              -            return pp.filter(p => p !== GLOBSTAR).join('/');
              -        })
              -            .join('|');
              -        // need to wrap in parens if we had more than one thing with |,
              -        // otherwise only the first will be anchored to ^ and the last to $
              -        const [open, close] = set.length > 1 ? ['(?:', ')'] : ['', ''];
              -        // must match entire pattern
              -        // ending in a * or ** will make it less strict.
              -        re = '^' + open + re + close + '$';
              -        // can match anything, as long as it's not this.
              -        if (this.negate)
              -            re = '^(?!' + re + ').+$';
              -        try {
              -            this.regexp = new RegExp(re, [...flags].join(''));
              -            /* c8 ignore start */
              -        }
              -        catch (ex) {
              -            // should be impossible
              -            this.regexp = false;
              -        }
              -        /* c8 ignore stop */
              -        return this.regexp;
              -    }
              -    slashSplit(p) {
              -        // if p starts with // on windows, we preserve that
              -        // so that UNC paths aren't broken.  Otherwise, any number of
              -        // / characters are coalesced into one, unless
              -        // preserveMultipleSlashes is set to true.
              -        if (this.preserveMultipleSlashes) {
              -            return p.split('/');
              -        }
              -        else if (this.isWindows && /^\/\/[^\/]+/.test(p)) {
              -            // add an extra '' for the one we lose
              -            return ['', ...p.split(/\/+/)];
              -        }
              -        else {
              -            return p.split(/\/+/);
              -        }
              -    }
              -    match(f, partial = this.partial) {
              -        this.debug('match', f, this.pattern);
              -        // short-circuit in the case of busted things.
              -        // comments, etc.
              -        if (this.comment) {
              -            return false;
              -        }
              -        if (this.empty) {
              -            return f === '';
              -        }
              -        if (f === '/' && partial) {
              -            return true;
              -        }
              -        const options = this.options;
              -        // windows: need to use /, not \
              -        if (this.isWindows) {
              -            f = f.split('\\').join('/');
              -        }
              -        // treat the test path as a set of pathparts.
              -        const ff = this.slashSplit(f);
              -        this.debug(this.pattern, 'split', ff);
              -        // just ONE of the pattern sets in this.set needs to match
              -        // in order for it to be valid.  If negating, then just one
              -        // match means that we have failed.
              -        // Either way, return on the first hit.
              -        const set = this.set;
              -        this.debug(this.pattern, 'set', set);
              -        // Find the basename of the path by looking for the last non-empty segment
              -        let filename = ff[ff.length - 1];
              -        if (!filename) {
              -            for (let i = ff.length - 2; !filename && i >= 0; i--) {
              -                filename = ff[i];
              -            }
              -        }
              -        for (let i = 0; i < set.length; i++) {
              -            const pattern = set[i];
              -            let file = ff;
              -            if (options.matchBase && pattern.length === 1) {
              -                file = [filename];
              -            }
              -            const hit = this.matchOne(file, pattern, partial);
              -            if (hit) {
              -                if (options.flipNegate) {
              -                    return true;
              -                }
              -                return !this.negate;
              -            }
              -        }
              -        // didn't get any hits.  this is success if it's a negative
              -        // pattern, failure otherwise.
              -        if (options.flipNegate) {
              -            return false;
              -        }
              -        return this.negate;
              -    }
              -    static defaults(def) {
              -        return minimatch.defaults(def).Minimatch;
              -    }
              -}
              -/* c8 ignore start */
              -export { AST } from './ast.js';
              -export { escape } from './escape.js';
              -export { unescape } from './unescape.js';
              -/* c8 ignore stop */
              -minimatch.AST = AST;
              -minimatch.Minimatch = Minimatch;
              -minimatch.escape = escape;
              -minimatch.unescape = unescape;
              -//# sourceMappingURL=index.js.map
              \ No newline at end of file
              diff --git a/node_modules/mocha/node_modules/minimatch/dist/esm/index.js.map b/node_modules/mocha/node_modules/minimatch/dist/esm/index.js.map
              deleted file mode 100644
              index ff82a0d3..00000000
              --- a/node_modules/mocha/node_modules/minimatch/dist/esm/index.js.map
              +++ /dev/null
              @@ -1 +0,0 @@
              -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,iBAAiB,CAAA;AACpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAC9D,OAAO,EAAE,GAAG,EAAe,MAAM,UAAU,CAAA;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAsCxC,MAAM,CAAC,MAAM,SAAS,GAAG,CACvB,CAAS,EACT,OAAe,EACf,UAA4B,EAAE,EAC9B,EAAE;IACF,kBAAkB,CAAC,OAAO,CAAC,CAAA;IAE3B,oCAAoC;IACpC,IAAI,CAAC,OAAO,CAAC,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE;QACnD,OAAO,KAAK,CAAA;KACb;IAED,OAAO,IAAI,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,KAAK,C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GAAG,MAAM,CAAA;AACzB,SAAS,CAAC,QAAQ,GAAG,QAAQ,CAAA","sourcesContent":["import expand from 'brace-expansion'\nimport { assertValidPattern } from './assert-valid-pattern.js'\nimport { AST, ExtglobType } from './ast.js'\nimport { escape } from './escape.js'\nimport { unescape } from './unescape.js'\n\ntype Platform =\n  | 'aix'\n  | 'android'\n  | 'darwin'\n  | 'freebsd'\n  | 'haiku'\n  | 'linux'\n  | 'openbsd'\n  | 'sunos'\n  | 'win32'\n  | 'cygwin'\n  | 'netbsd'\n\nexport interface MinimatchOptions {\n  nobrace?: boolean\n  nocomment?: boolean\n  nonegate?: boolean\n  debug?: boolean\n  noglobstar?: boolean\n  noext?: boolean\n  nonull?: boolean\n  windowsPathsNoEscape?: boolean\n  allowWindowsEscape?: boolean\n  partial?: boolean\n  dot?: boolean\n  nocase?: boolean\n  nocaseMagicOnly?: boolean\n  magicalBraces?: boolean\n  matchBase?: boolean\n  flipNegate?: boolean\n  preserveMultipleSlashes?: boolean\n  optimizationLevel?: number\n  platform?: Platform\n  windowsNoMagicRoot?: boolean\n}\n\nexport const minimatch = (\n  p: string,\n  pattern: string,\n  options: MinimatchOptions = {}\n) => {\n  assertValidPattern(pattern)\n\n  // shortcut: comments match nothing.\n  if (!options.nocomment && pattern.charAt(0) === '#') {\n    return false\n  }\n\n  return new Minimatch(pattern, options).match(p)\n}\n\n// Optimized checking for the most common glob patterns.\nconst starDotExtRE = /^\\*+([^+@!?\\*\\[\\(]*)$/\nconst starDotExtTest = (ext: string) => (f: string) =>\n  !f.startsWith('.') && f.endsWith(ext)\nconst starDotExtTestDot = (ext: string) => (f: string) => f.endsWith(ext)\nconst starDotExtTestNocase = (ext: string) => {\n  ext = ext.toLowerCase()\n  return (f: string) => !f.startsWith('.') && f.toLowerCase().endsWith(ext)\n}\nconst starDotExtTestNocaseDot = (ext: string) => {\n  ext = ext.toLowerCase()\n  return (f: string) => f.toLowerCase().endsWith(ext)\n}\nconst starDotStarRE = /^\\*+\\.\\*+$/\nconst starDotStarTest = (f: string) => !f.startsWith('.') && f.includes('.')\nconst starDotStarTestDot = (f: string) =>\n  f !== '.' && f !== '..' && f.includes('.')\nconst dotStarRE = /^\\.\\*+$/\nconst dotStarTest = (f: string) => f !== '.' && f !== '..' && f.startsWith('.')\nconst starRE = /^\\*+$/\nconst starTest = (f: string) => f.length !== 0 && !f.startsWith('.')\nconst starTestDot = (f: string) => f.length !== 0 && f !== '.' && f !== '..'\nconst qmarksRE = /^\\?+([^+@!?\\*\\[\\(]*)?$/\nconst qmarksTestNocase = ([$0, ext = '']: RegExpMatchArray) => {\n  const noext = qmarksTestNoExt([$0])\n  if (!ext) return noext\n  ext = ext.toLowerCase()\n  return (f: string) => noext(f) && f.toLowerCase().endsWith(ext)\n}\nconst qmarksTestNocaseDot = ([$0, ext = '']: RegExpMatchArray) => {\n  const noext = qmarksTestNoExtDot([$0])\n  if (!ext) return noext\n  ext = ext.toLowerCase()\n  return (f: string) => noext(f) && f.toLowerCase().endsWith(ext)\n}\nconst qmarksTestDot = ([$0, ext = '']: RegExpMatchArray) => {\n  const noext = qmarksTestNoExtDot([$0])\n  return !ext ? noext : (f: string) => noext(f) && f.endsWith(ext)\n}\nconst qmarksTest = ([$0, ext = '']: RegExpMatchArray) => {\n  const noext = qmarksTestNoExt([$0])\n  return !ext ? noext : (f: string) => noext(f) && f.endsWith(ext)\n}\nconst qmarksTestNoExt = ([$0]: RegExpMatchArray) => {\n  const len = $0.length\n  return (f: string) => f.length === len && !f.startsWith('.')\n}\nconst qmarksTestNoExtDot = ([$0]: RegExpMatchArray) => {\n  const len = $0.length\n  return (f: string) => f.length === len && f !== '.' && f !== '..'\n}\n\n/* c8 ignore start */\nconst defaultPlatform: Platform = (\n  typeof process === 'object' && process\n    ? (typeof process.env === 'object' &&\n        process.env &&\n        process.env.__MINIMATCH_TESTING_PLATFORM__) ||\n      process.platform\n    : 'posix'\n) as Platform\ntype Sep = '\\\\' | '/'\nconst path: { [k: string]: { sep: Sep } } = {\n  win32: { sep: '\\\\' },\n  posix: { sep: '/' },\n}\n/* c8 ignore stop */\n\nexport const sep = defaultPlatform === 'win32' ? path.win32.sep : path.posix.sep\nminimatch.sep = sep\n\nexport const GLOBSTAR = Symbol('globstar **')\nminimatch.GLOBSTAR = GLOBSTAR\n\n// any single thing other than /\n// don't need to escape / when using new RegExp()\nconst qmark = '[^/]'\n\n// * => any number of characters\nconst star = qmark + '*?'\n\n// ** when dots are allowed.  Anything goes, except .. and .\n// not (^ or / followed by one or two dots followed by $ or /),\n// followed by anything, any number of times.\nconst twoStarDot = '(?:(?!(?:\\\\/|^)(?:\\\\.{1,2})($|\\\\/)).)*?'\n\n// not a ^ or / followed by a dot,\n// followed by anything, any number of times.\nconst twoStarNoDot = '(?:(?!(?:\\\\/|^)\\\\.).)*?'\n\nexport const filter =\n  (pattern: string, options: MinimatchOptions = {}) =>\n  (p: string) =>\n    minimatch(p, pattern, options)\nminimatch.filter = filter\n\nconst ext = (a: MinimatchOptions, b: MinimatchOptions = {}) =>\n  Object.assign({}, a, b)\n\nexport const defaults = (def: MinimatchOptions): typeof minimatch => {\n  if (!def || typeof def !== 'object' || !Object.keys(def).length) {\n    return minimatch\n  }\n\n  const orig = minimatch\n\n  const m = (p: string, pattern: string, options: MinimatchOptions = {}) =>\n    orig(p, pattern, ext(def, options))\n\n  return Object.assign(m, {\n    Minimatch: class Minimatch extends orig.Minimatch {\n      constructor(pattern: string, options: MinimatchOptions = {}) {\n        super(pattern, ext(def, options))\n      }\n      static defaults(options: MinimatchOptions) {\n        return orig.defaults(ext(def, options)).Minimatch\n      }\n    },\n\n    AST: class AST extends orig.AST {\n      /* c8 ignore start */\n      constructor(\n        type: ExtglobType | null,\n        parent?: AST,\n        options: MinimatchOptions = {}\n      ) {\n        super(type, parent, ext(def, options))\n      }\n      /* c8 ignore stop */\n\n      static fromGlob(pattern: string, options: MinimatchOptions = {}) {\n        return orig.AST.fromGlob(pattern, ext(def, options))\n      }\n    },\n\n    unescape: (\n      s: string,\n      options: Pick = {}\n    ) => orig.unescape(s, ext(def, options)),\n\n    escape: (\n      s: string,\n      options: Pick = {}\n    ) => orig.escape(s, ext(def, options)),\n\n    filter: (pattern: string, options: MinimatchOptions = {}) =>\n      orig.filter(pattern, ext(def, options)),\n\n    defaults: (options: MinimatchOptions) => orig.defaults(ext(def, options)),\n\n    makeRe: (pattern: string, options: MinimatchOptions = {}) =>\n      orig.makeRe(pattern, ext(def, options)),\n\n    braceExpand: (pattern: string, options: MinimatchOptions = {}) =>\n      orig.braceExpand(pattern, ext(def, options)),\n\n    match: (list: string[], pattern: string, options: MinimatchOptions = {}) =>\n      orig.match(list, pattern, ext(def, options)),\n\n    sep: orig.sep,\n    GLOBSTAR: GLOBSTAR as typeof GLOBSTAR,\n  })\n}\nminimatch.defaults = defaults\n\n// Brace expansion:\n// a{b,c}d -> abd acd\n// a{b,}c -> abc ac\n// a{0..3}d -> a0d a1d a2d a3d\n// a{b,c{d,e}f}g -> abg acdfg acefg\n// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg\n//\n// Invalid sets are not expanded.\n// a{2..}b -> a{2..}b\n// a{b}c -> a{b}c\nexport const braceExpand = (\n  pattern: string,\n  options: MinimatchOptions = {}\n) => {\n  assertValidPattern(pattern)\n\n  // Thanks to Yeting Li  for\n  // improving this regexp to avoid a ReDOS vulnerability.\n  if (options.nobrace || !/\\{(?:(?!\\{).)*\\}/.test(pattern)) {\n    // shortcut. no need to expand.\n    return [pattern]\n  }\n\n  return expand(pattern)\n}\nminimatch.braceExpand = braceExpand\n\n// parse a component of the expanded set.\n// At this point, no pattern may contain \"/\" in it\n// so we're going to return a 2d array, where each entry is the full\n// pattern, split on '/', and then turned into a regular expression.\n// A regexp is made at the end which joins each array with an\n// escaped /, and another full one which joins each regexp with |.\n//\n// Following the lead of Bash 4.1, note that \"**\" only has special meaning\n// when it is the *only* thing in a path portion.  Otherwise, any series\n// of * is equivalent to a single *.  Globstar behavior is enabled by\n// default, and can be disabled by setting options.noglobstar.\n\nexport const makeRe = (pattern: string, options: MinimatchOptions = {}) =>\n  new Minimatch(pattern, options).makeRe()\nminimatch.makeRe = makeRe\n\nexport const match = (\n  list: string[],\n  pattern: string,\n  options: MinimatchOptions = {}\n) => {\n  const mm = new Minimatch(pattern, options)\n  list = list.filter(f => mm.match(f))\n  if (mm.options.nonull && !list.length) {\n    list.push(pattern)\n  }\n  return list\n}\nminimatch.match = match\n\n// replace stuff like \\* with *\nconst globMagic = /[?*]|[+@!]\\(.*?\\)|\\[|\\]/\nconst regExpEscape = (s: string) =>\n  s.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&')\n\nexport type MMRegExp = RegExp & {\n  _src?: string\n  _glob?: string\n}\n\nexport type ParseReturnFiltered = string | MMRegExp | typeof GLOBSTAR\nexport type ParseReturn = ParseReturnFiltered | false\n\nexport class Minimatch {\n  options: MinimatchOptions\n  set: ParseReturnFiltered[][]\n  pattern: string\n\n  windowsPathsNoEscape: boolean\n  nonegate: boolean\n  negate: boolean\n  comment: boolean\n  empty: boolean\n  preserveMultipleSlashes: boolean\n  partial: boolean\n  globSet: string[]\n  globParts: string[][]\n  nocase: boolean\n\n  isWindows: boolean\n  platform: Platform\n  windowsNoMagicRoot: boolean\n\n  regexp: false | null | MMRegExp\n  constructor(pattern: string, options: MinimatchOptions = {}) {\n    assertValidPattern(pattern)\n\n    options = options || {}\n    this.options = options\n    this.pattern = pattern\n    this.platform = options.platform || defaultPlatform\n    this.isWindows = this.platform === 'win32'\n    this.windowsPathsNoEscape =\n      !!options.windowsPathsNoEscape || options.allowWindowsEscape === false\n    if (this.windowsPathsNoEscape) {\n      this.pattern = this.pattern.replace(/\\\\/g, '/')\n    }\n    this.preserveMultipleSlashes = !!options.preserveMultipleSlashes\n    this.regexp = null\n    this.negate = false\n    this.nonegate = !!options.nonegate\n    this.comment = false\n    this.empty = false\n    this.partial = !!options.partial\n    this.nocase = !!this.options.nocase\n    this.windowsNoMagicRoot =\n      options.windowsNoMagicRoot !== undefined\n        ? options.windowsNoMagicRoot\n        : !!(this.isWindows && this.nocase)\n\n    this.globSet = []\n    this.globParts = []\n    this.set = []\n\n    // make the set of regexps etc.\n    this.make()\n  }\n\n  hasMagic(): boolean {\n    if (this.options.magicalBraces && this.set.length > 1) {\n      return true\n    }\n    for (const pattern of this.set) {\n      for (const part of pattern) {\n        if (typeof part !== 'string') return true\n      }\n    }\n    return false\n  }\n\n  debug(..._: any[]) {}\n\n  make() {\n    const pattern = this.pattern\n    const options = this.options\n\n    // empty patterns and comments match nothing.\n    if (!options.nocomment && pattern.charAt(0) === '#') {\n      this.comment = true\n      return\n    }\n\n    if (!pattern) {\n      this.empty = true\n      return\n    }\n\n    // step 1: figure out negation, etc.\n    this.parseNegate()\n\n    // step 2: expand braces\n    this.globSet = [...new Set(this.braceExpand())]\n\n    if (options.debug) {\n      this.debug = (...args: any[]) => console.error(...args)\n    }\n\n    this.debug(this.pattern, this.globSet)\n\n    // step 3: now we have a set, so turn each one into a series of\n    // path-portion matching patterns.\n    // These will be regexps, except in the case of \"**\", which is\n    // set to the GLOBSTAR object for globstar behavior,\n    // and will not contain any / characters\n    //\n    // First, we preprocess to make the glob pattern sets a bit simpler\n    // and deduped.  There are some perf-killing patterns that can cause\n    // problems with a glob walk, but we can simplify them down a bit.\n    const rawGlobParts = this.globSet.map(s => this.slashSplit(s))\n    this.globParts = this.preprocess(rawGlobParts)\n    this.debug(this.pattern, this.globParts)\n\n    // glob --> regexps\n    let set = this.globParts.map((s, _, __) => {\n      if (this.isWindows && this.windowsNoMagicRoot) {\n        // check if it's a drive or unc path.\n        const isUNC =\n          s[0] === '' &&\n          s[1] === '' &&\n          (s[2] === '?' || !globMagic.test(s[2])) &&\n          !globMagic.test(s[3])\n        const isDrive = /^[a-z]:/i.test(s[0])\n        if (isUNC) {\n          return [...s.slice(0, 4), ...s.slice(4).map(ss => this.parse(ss))]\n        } else if (isDrive) {\n          return [s[0], ...s.slice(1).map(ss => this.parse(ss))]\n        }\n      }\n      return s.map(ss => this.parse(ss))\n    })\n\n    this.debug(this.pattern, set)\n\n    // filter out everything that didn't compile properly.\n    this.set = set.filter(\n      s => s.indexOf(false) === -1\n    ) as ParseReturnFiltered[][]\n\n    // do not treat the ? in UNC paths as magic\n    if (this.isWindows) {\n      for (let i = 0; i < this.set.length; i++) {\n        const p = this.set[i]\n        if (\n          p[0] === '' &&\n          p[1] === '' &&\n          this.globParts[i][2] === '?' &&\n          typeof p[3] === 'string' &&\n          /^[a-z]:$/i.test(p[3])\n        ) {\n          p[2] = '?'\n        }\n      }\n    }\n\n    this.debug(this.pattern, this.set)\n  }\n\n  // various transforms to equivalent pattern sets that are\n  // faster to process in a filesystem walk.  The goal is to\n  // eliminate what we can, and push all ** patterns as far\n  // to the right as possible, even if it increases the number\n  // of patterns that we have to process.\n  preprocess(globParts: string[][]) {\n    // if we're not in globstar mode, then turn all ** into *\n    if (this.options.noglobstar) {\n      for (let i = 0; i < globParts.length; i++) {\n        for (let j = 0; j < globParts[i].length; j++) {\n          if (globParts[i][j] === '**') {\n            globParts[i][j] = '*'\n          }\n        }\n      }\n    }\n\n    const { optimizationLevel = 1 } = this.options\n\n    if (optimizationLevel >= 2) {\n      // aggressive optimization for the purpose of fs walking\n      globParts = this.firstPhasePreProcess(globParts)\n      globParts = this.secondPhasePreProcess(globParts)\n    } else if (optimizationLevel >= 1) {\n      // just basic optimizations to remove some .. parts\n      globParts = this.levelOneOptimize(globParts)\n    } else {\n      // just collapse multiple ** portions into one\n      globParts = this.adjascentGlobstarOptimize(globParts)\n    }\n\n    return globParts\n  }\n\n  // just get rid of adjascent ** portions\n  adjascentGlobstarOptimize(globParts: string[][]) {\n    return globParts.map(parts => {\n      let gs: number = -1\n      while (-1 !== (gs = parts.indexOf('**', gs + 1))) {\n        let i = gs\n        while (parts[i + 1] === '**') {\n          i++\n        }\n        if (i !== gs) {\n          parts.splice(gs, i - gs)\n        }\n      }\n      return parts\n    })\n  }\n\n  // get rid of adjascent ** and resolve .. portions\n  levelOneOptimize(globParts: string[][]) {\n    return globParts.map(parts => {\n      parts = parts.reduce((set: string[], part) => {\n        const prev = set[set.length - 1]\n        if (part === '**' && prev === '**') {\n          return set\n        }\n        if (part === '..') {\n          if (prev && prev !== '..' && prev !== '.' && prev !== '**') {\n            set.pop()\n            return set\n          }\n        }\n        set.push(part)\n        return set\n      }, [])\n      return parts.length === 0 ? [''] : parts\n    })\n  }\n\n  levelTwoFileOptimize(parts: string | string[]) {\n    if (!Array.isArray(parts)) {\n      parts = this.slashSplit(parts)\n    }\n    let didSomething: boolean = false\n    do {\n      didSomething = false\n      // 
              // -> 
              /\n      if (!this.preserveMultipleSlashes) {\n        for (let i = 1; i < parts.length - 1; i++) {\n          const p = parts[i]\n          // don't squeeze out UNC patterns\n          if (i === 1 && p === '' && parts[0] === '') continue\n          if (p === '.' || p === '') {\n            didSomething = true\n            parts.splice(i, 1)\n            i--\n          }\n        }\n        if (\n          parts[0] === '.' &&\n          parts.length === 2 &&\n          (parts[1] === '.' || parts[1] === '')\n        ) {\n          didSomething = true\n          parts.pop()\n        }\n      }\n\n      // 
              /

              /../ ->

              /\n      let dd: number = 0\n      while (-1 !== (dd = parts.indexOf('..', dd + 1))) {\n        const p = parts[dd - 1]\n        if (p && p !== '.' && p !== '..' && p !== '**') {\n          didSomething = true\n          parts.splice(dd - 1, 2)\n          dd -= 2\n        }\n      }\n    } while (didSomething)\n    return parts.length === 0 ? [''] : parts\n  }\n\n  // First phase: single-pattern processing\n  // 
               is 1 or more portions\n  //  is 1 or more portions\n  // 

              is any portion other than ., .., '', or **\n // is . or ''\n //\n // **/.. is *brutal* for filesystem walking performance, because\n // it effectively resets the recursive walk each time it occurs,\n // and ** cannot be reduced out by a .. pattern part like a regexp\n // or most strings (other than .., ., and '') can be.\n //\n //

              /**/../

              /

              / -> {

              /../

              /

              /,

              /**/

              /

              /}\n //

              // -> 
              /\n  // 
              /

              /../ ->

              /\n  // **/**/ -> **/\n  //\n  // **/*/ -> */**/ <== not valid because ** doesn't follow\n  // this WOULD be allowed if ** did follow symlinks, or * didn't\n  firstPhasePreProcess(globParts: string[][]) {\n    let didSomething = false\n    do {\n      didSomething = false\n      // 
              /**/../

              /

              / -> {

              /../

              /

              /,

              /**/

              /

              /}\n for (let parts of globParts) {\n let gs: number = -1\n while (-1 !== (gs = parts.indexOf('**', gs + 1))) {\n let gss: number = gs\n while (parts[gss + 1] === '**') {\n //

              /**/**/ -> 
              /**/\n            gss++\n          }\n          // eg, if gs is 2 and gss is 4, that means we have 3 **\n          // parts, and can remove 2 of them.\n          if (gss > gs) {\n            parts.splice(gs + 1, gss - gs)\n          }\n\n          let next = parts[gs + 1]\n          const p = parts[gs + 2]\n          const p2 = parts[gs + 3]\n          if (next !== '..') continue\n          if (\n            !p ||\n            p === '.' ||\n            p === '..' ||\n            !p2 ||\n            p2 === '.' ||\n            p2 === '..'\n          ) {\n            continue\n          }\n          didSomething = true\n          // edit parts in place, and push the new one\n          parts.splice(gs, 1)\n          const other = parts.slice(0)\n          other[gs] = '**'\n          globParts.push(other)\n          gs--\n        }\n\n        // 
              // -> 
              /\n        if (!this.preserveMultipleSlashes) {\n          for (let i = 1; i < parts.length - 1; i++) {\n            const p = parts[i]\n            // don't squeeze out UNC patterns\n            if (i === 1 && p === '' && parts[0] === '') continue\n            if (p === '.' || p === '') {\n              didSomething = true\n              parts.splice(i, 1)\n              i--\n            }\n          }\n          if (\n            parts[0] === '.' &&\n            parts.length === 2 &&\n            (parts[1] === '.' || parts[1] === '')\n          ) {\n            didSomething = true\n            parts.pop()\n          }\n        }\n\n        // 
              /

              /../ ->

              /\n        let dd: number = 0\n        while (-1 !== (dd = parts.indexOf('..', dd + 1))) {\n          const p = parts[dd - 1]\n          if (p && p !== '.' && p !== '..' && p !== '**') {\n            didSomething = true\n            const needDot = dd === 1 && parts[dd + 1] === '**'\n            const splin = needDot ? ['.'] : []\n            parts.splice(dd - 1, 2, ...splin)\n            if (parts.length === 0) parts.push('')\n            dd -= 2\n          }\n        }\n      }\n    } while (didSomething)\n\n    return globParts\n  }\n\n  // second phase: multi-pattern dedupes\n  // {
              /*/,
              /

              /} ->

              /*/\n  // {
              /,
              /} -> 
              /\n  // {
              /**/,
              /} -> 
              /**/\n  //\n  // {
              /**/,
              /**/

              /} ->

              /**/\n  // ^-- not valid because ** doens't follow symlinks\n  secondPhasePreProcess(globParts: string[][]): string[][] {\n    for (let i = 0; i < globParts.length - 1; i++) {\n      for (let j = i + 1; j < globParts.length; j++) {\n        const matched = this.partsMatch(\n          globParts[i],\n          globParts[j],\n          !this.preserveMultipleSlashes\n        )\n        if (matched) {\n          globParts[i] = []\n          globParts[j] = matched\n          break\n        }\n      }\n    }\n    return globParts.filter(gs => gs.length)\n  }\n\n  partsMatch(\n    a: string[],\n    b: string[],\n    emptyGSMatch: boolean = false\n  ): false | string[] {\n    let ai = 0\n    let bi = 0\n    let result: string[] = []\n    let which: string = ''\n    while (ai < a.length && bi < b.length) {\n      if (a[ai] === b[bi]) {\n        result.push(which === 'b' ? b[bi] : a[ai])\n        ai++\n        bi++\n      } else if (emptyGSMatch && a[ai] === '**' && b[bi] === a[ai + 1]) {\n        result.push(a[ai])\n        ai++\n      } else if (emptyGSMatch && b[bi] === '**' && a[ai] === b[bi + 1]) {\n        result.push(b[bi])\n        bi++\n      } else if (\n        a[ai] === '*' &&\n        b[bi] &&\n        (this.options.dot || !b[bi].startsWith('.')) &&\n        b[bi] !== '**'\n      ) {\n        if (which === 'b') return false\n        which = 'a'\n        result.push(a[ai])\n        ai++\n        bi++\n      } else if (\n        b[bi] === '*' &&\n        a[ai] &&\n        (this.options.dot || !a[ai].startsWith('.')) &&\n        a[ai] !== '**'\n      ) {\n        if (which === 'a') return false\n        which = 'b'\n        result.push(b[bi])\n        ai++\n        bi++\n      } else {\n        return false\n      }\n    }\n    // if we fall out of the loop, it means they two are identical\n    // as long as their lengths match\n    return a.length === b.length && result\n  }\n\n  parseNegate() {\n    if (this.nonegate) return\n\n    const pattern = this.pattern\n    let negate = false\n    let negateOffset = 0\n\n    for (let i = 0; i < pattern.length && pattern.charAt(i) === '!'; i++) {\n      negate = !negate\n      negateOffset++\n    }\n\n    if (negateOffset) this.pattern = pattern.slice(negateOffset)\n    this.negate = negate\n  }\n\n  // set partial to true to test if, for example,\n  // \"/a/b\" matches the start of \"/*/b/*/d\"\n  // Partial means, if you run out of file before you run\n  // out of pattern, then that's fine, as long as all\n  // the parts match.\n  matchOne(file: string[], pattern: ParseReturn[], partial: boolean = false) {\n    const options = this.options\n\n    // UNC paths like //?/X:/... can match X:/... and vice versa\n    // Drive letters in absolute drive or unc paths are always compared\n    // case-insensitively.\n    if (this.isWindows) {\n      const fileDrive = typeof file[0] === 'string' && /^[a-z]:$/i.test(file[0])\n      const fileUNC =\n        !fileDrive &&\n        file[0] === '' &&\n        file[1] === '' &&\n        file[2] === '?' &&\n        /^[a-z]:$/i.test(file[3])\n\n      const patternDrive =\n        typeof pattern[0] === 'string' && /^[a-z]:$/i.test(pattern[0])\n      const patternUNC =\n        !patternDrive &&\n        pattern[0] === '' &&\n        pattern[1] === '' &&\n        pattern[2] === '?' &&\n        typeof pattern[3] === 'string' &&\n        /^[a-z]:$/i.test(pattern[3])\n\n      const fdi = fileUNC ? 3 : fileDrive ? 0 : undefined\n      const pdi = patternUNC ? 3 : patternDrive ? 0 : undefined\n      if (typeof fdi === 'number' && typeof pdi === 'number') {\n        const [fd, pd]: [string, string] = [file[fdi], pattern[pdi] as string]\n        if (fd.toLowerCase() === pd.toLowerCase()) {\n          pattern[pdi] = fd\n          if (pdi > fdi) {\n            pattern = pattern.slice(pdi)\n          } else if (fdi > pdi) {\n            file = file.slice(fdi)\n          }\n        }\n      }\n    }\n\n    // resolve and reduce . and .. portions in the file as well.\n    // dont' need to do the second phase, because it's only one string[]\n    const { optimizationLevel = 1 } = this.options\n    if (optimizationLevel >= 2) {\n      file = this.levelTwoFileOptimize(file)\n    }\n\n    this.debug('matchOne', this, { file, pattern })\n    this.debug('matchOne', file.length, pattern.length)\n\n    for (\n      var fi = 0, pi = 0, fl = file.length, pl = pattern.length;\n      fi < fl && pi < pl;\n      fi++, pi++\n    ) {\n      this.debug('matchOne loop')\n      var p = pattern[pi]\n      var f = file[fi]\n\n      this.debug(pattern, p, f)\n\n      // should be impossible.\n      // some invalid regexp stuff in the set.\n      /* c8 ignore start */\n      if (p === false) {\n        return false\n      }\n      /* c8 ignore stop */\n\n      if (p === GLOBSTAR) {\n        this.debug('GLOBSTAR', [pattern, p, f])\n\n        // \"**\"\n        // a/**/b/**/c would match the following:\n        // a/b/x/y/z/c\n        // a/x/y/z/b/c\n        // a/b/x/b/x/c\n        // a/b/c\n        // To do this, take the rest of the pattern after\n        // the **, and see if it would match the file remainder.\n        // If so, return success.\n        // If not, the ** \"swallows\" a segment, and try again.\n        // This is recursively awful.\n        //\n        // a/**/b/**/c matching a/b/x/y/z/c\n        // - a matches a\n        // - doublestar\n        //   - matchOne(b/x/y/z/c, b/**/c)\n        //     - b matches b\n        //     - doublestar\n        //       - matchOne(x/y/z/c, c) -> no\n        //       - matchOne(y/z/c, c) -> no\n        //       - matchOne(z/c, c) -> no\n        //       - matchOne(c, c) yes, hit\n        var fr = fi\n        var pr = pi + 1\n        if (pr === pl) {\n          this.debug('** at the end')\n          // a ** at the end will just swallow the rest.\n          // We have found a match.\n          // however, it will not swallow /.x, unless\n          // options.dot is set.\n          // . and .. are *never* matched by **, for explosively\n          // exponential reasons.\n          for (; fi < fl; fi++) {\n            if (\n              file[fi] === '.' ||\n              file[fi] === '..' ||\n              (!options.dot && file[fi].charAt(0) === '.')\n            )\n              return false\n          }\n          return true\n        }\n\n        // ok, let's see if we can swallow whatever we can.\n        while (fr < fl) {\n          var swallowee = file[fr]\n\n          this.debug('\\nglobstar while', file, fr, pattern, pr, swallowee)\n\n          // XXX remove this slice.  Just pass the start index.\n          if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {\n            this.debug('globstar found match!', fr, fl, swallowee)\n            // found a match.\n            return true\n          } else {\n            // can't swallow \".\" or \"..\" ever.\n            // can only swallow \".foo\" when explicitly asked.\n            if (\n              swallowee === '.' ||\n              swallowee === '..' ||\n              (!options.dot && swallowee.charAt(0) === '.')\n            ) {\n              this.debug('dot detected!', file, fr, pattern, pr)\n              break\n            }\n\n            // ** swallows a segment, and continue.\n            this.debug('globstar swallow a segment, and continue')\n            fr++\n          }\n        }\n\n        // no match was found.\n        // However, in partial mode, we can't say this is necessarily over.\n        /* c8 ignore start */\n        if (partial) {\n          // ran out of file\n          this.debug('\\n>>> no match, partial?', file, fr, pattern, pr)\n          if (fr === fl) {\n            return true\n          }\n        }\n        /* c8 ignore stop */\n        return false\n      }\n\n      // something other than **\n      // non-magic patterns just have to match exactly\n      // patterns with magic have been turned into regexps.\n      let hit: boolean\n      if (typeof p === 'string') {\n        hit = f === p\n        this.debug('string match', p, f, hit)\n      } else {\n        hit = p.test(f)\n        this.debug('pattern match', p, f, hit)\n      }\n\n      if (!hit) return false\n    }\n\n    // Note: ending in / means that we'll get a final \"\"\n    // at the end of the pattern.  This can only match a\n    // corresponding \"\" at the end of the file.\n    // If the file ends in /, then it can only match a\n    // a pattern that ends in /, unless the pattern just\n    // doesn't have any more for it. But, a/b/ should *not*\n    // match \"a/b/*\", even though \"\" matches against the\n    // [^/]*? pattern, except in partial mode, where it might\n    // simply not be reached yet.\n    // However, a/b/ should still satisfy a/*\n\n    // now either we fell off the end of the pattern, or we're done.\n    if (fi === fl && pi === pl) {\n      // ran out of pattern and filename at the same time.\n      // an exact hit!\n      return true\n    } else if (fi === fl) {\n      // ran out of file, but still had pattern left.\n      // this is ok if we're doing the match as part of\n      // a glob fs traversal.\n      return partial\n    } else if (pi === pl) {\n      // ran out of pattern, still have file left.\n      // this is only acceptable if we're on the very last\n      // empty segment of a file with a trailing slash.\n      // a/* should match a/b/\n      return fi === fl - 1 && file[fi] === ''\n\n      /* c8 ignore start */\n    } else {\n      // should be unreachable.\n      throw new Error('wtf?')\n    }\n    /* c8 ignore stop */\n  }\n\n  braceExpand() {\n    return braceExpand(this.pattern, this.options)\n  }\n\n  parse(pattern: string): ParseReturn {\n    assertValidPattern(pattern)\n\n    const options = this.options\n\n    // shortcuts\n    if (pattern === '**') return GLOBSTAR\n    if (pattern === '') return ''\n\n    // far and away, the most common glob pattern parts are\n    // *, *.*, and *.  Add a fast check method for those.\n    let m: RegExpMatchArray | null\n    let fastTest: null | ((f: string) => boolean) = null\n    if ((m = pattern.match(starRE))) {\n      fastTest = options.dot ? starTestDot : starTest\n    } else if ((m = pattern.match(starDotExtRE))) {\n      fastTest = (\n        options.nocase\n          ? options.dot\n            ? starDotExtTestNocaseDot\n            : starDotExtTestNocase\n          : options.dot\n          ? starDotExtTestDot\n          : starDotExtTest\n      )(m[1])\n    } else if ((m = pattern.match(qmarksRE))) {\n      fastTest = (\n        options.nocase\n          ? options.dot\n            ? qmarksTestNocaseDot\n            : qmarksTestNocase\n          : options.dot\n          ? qmarksTestDot\n          : qmarksTest\n      )(m)\n    } else if ((m = pattern.match(starDotStarRE))) {\n      fastTest = options.dot ? starDotStarTestDot : starDotStarTest\n    } else if ((m = pattern.match(dotStarRE))) {\n      fastTest = dotStarTest\n    }\n\n    const re = AST.fromGlob(pattern, this.options).toMMPattern()\n    if (fastTest && typeof re === 'object') {\n      // Avoids overriding in frozen environments\n      Reflect.defineProperty(re, 'test', { value: fastTest })\n    }\n    return re\n  }\n\n  makeRe() {\n    if (this.regexp || this.regexp === false) return this.regexp\n\n    // at this point, this.set is a 2d array of partial\n    // pattern strings, or \"**\".\n    //\n    // It's better to use .match().  This function shouldn't\n    // be used, really, but it's pretty convenient sometimes,\n    // when you just want to work with a regex.\n    const set = this.set\n\n    if (!set.length) {\n      this.regexp = false\n      return this.regexp\n    }\n    const options = this.options\n\n    const twoStar = options.noglobstar\n      ? star\n      : options.dot\n      ? twoStarDot\n      : twoStarNoDot\n    const flags = new Set(options.nocase ? ['i'] : [])\n\n    // regexpify non-globstar patterns\n    // if ** is only item, then we just do one twoStar\n    // if ** is first, and there are more, prepend (\\/|twoStar\\/)? to next\n    // if ** is last, append (\\/twoStar|) to previous\n    // if ** is in the middle, append (\\/|\\/twoStar\\/) to previous\n    // then filter out GLOBSTAR symbols\n    let re = set\n      .map(pattern => {\n        const pp: (string | typeof GLOBSTAR)[] = pattern.map(p => {\n          if (p instanceof RegExp) {\n            for (const f of p.flags.split('')) flags.add(f)\n          }\n          return typeof p === 'string'\n            ? regExpEscape(p)\n            : p === GLOBSTAR\n            ? GLOBSTAR\n            : p._src\n        }) as (string | typeof GLOBSTAR)[]\n        pp.forEach((p, i) => {\n          const next = pp[i + 1]\n          const prev = pp[i - 1]\n          if (p !== GLOBSTAR || prev === GLOBSTAR) {\n            return\n          }\n          if (prev === undefined) {\n            if (next !== undefined && next !== GLOBSTAR) {\n              pp[i + 1] = '(?:\\\\/|' + twoStar + '\\\\/)?' + next\n            } else {\n              pp[i] = twoStar\n            }\n          } else if (next === undefined) {\n            pp[i - 1] = prev + '(?:\\\\/|' + twoStar + ')?'\n          } else if (next !== GLOBSTAR) {\n            pp[i - 1] = prev + '(?:\\\\/|\\\\/' + twoStar + '\\\\/)' + next\n            pp[i + 1] = GLOBSTAR\n          }\n        })\n        return pp.filter(p => p !== GLOBSTAR).join('/')\n      })\n      .join('|')\n\n    // need to wrap in parens if we had more than one thing with |,\n    // otherwise only the first will be anchored to ^ and the last to $\n    const [open, close] = set.length > 1 ? ['(?:', ')'] : ['', '']\n    // must match entire pattern\n    // ending in a * or ** will make it less strict.\n    re = '^' + open + re + close + '$'\n\n    // can match anything, as long as it's not this.\n    if (this.negate) re = '^(?!' + re + ').+$'\n\n    try {\n      this.regexp = new RegExp(re, [...flags].join(''))\n      /* c8 ignore start */\n    } catch (ex) {\n      // should be impossible\n      this.regexp = false\n    }\n    /* c8 ignore stop */\n    return this.regexp\n  }\n\n  slashSplit(p: string) {\n    // if p starts with // on windows, we preserve that\n    // so that UNC paths aren't broken.  Otherwise, any number of\n    // / characters are coalesced into one, unless\n    // preserveMultipleSlashes is set to true.\n    if (this.preserveMultipleSlashes) {\n      return p.split('/')\n    } else if (this.isWindows && /^\\/\\/[^\\/]+/.test(p)) {\n      // add an extra '' for the one we lose\n      return ['', ...p.split(/\\/+/)]\n    } else {\n      return p.split(/\\/+/)\n    }\n  }\n\n  match(f: string, partial = this.partial) {\n    this.debug('match', f, this.pattern)\n    // short-circuit in the case of busted things.\n    // comments, etc.\n    if (this.comment) {\n      return false\n    }\n    if (this.empty) {\n      return f === ''\n    }\n\n    if (f === '/' && partial) {\n      return true\n    }\n\n    const options = this.options\n\n    // windows: need to use /, not \\\n    if (this.isWindows) {\n      f = f.split('\\\\').join('/')\n    }\n\n    // treat the test path as a set of pathparts.\n    const ff = this.slashSplit(f)\n    this.debug(this.pattern, 'split', ff)\n\n    // just ONE of the pattern sets in this.set needs to match\n    // in order for it to be valid.  If negating, then just one\n    // match means that we have failed.\n    // Either way, return on the first hit.\n\n    const set = this.set\n    this.debug(this.pattern, 'set', set)\n\n    // Find the basename of the path by looking for the last non-empty segment\n    let filename: string = ff[ff.length - 1]\n    if (!filename) {\n      for (let i = ff.length - 2; !filename && i >= 0; i--) {\n        filename = ff[i]\n      }\n    }\n\n    for (let i = 0; i < set.length; i++) {\n      const pattern = set[i]\n      let file = ff\n      if (options.matchBase && pattern.length === 1) {\n        file = [filename]\n      }\n      const hit = this.matchOne(file, pattern, partial)\n      if (hit) {\n        if (options.flipNegate) {\n          return true\n        }\n        return !this.negate\n      }\n    }\n\n    // didn't get any hits.  this is success if it's a negative\n    // pattern, failure otherwise.\n    if (options.flipNegate) {\n      return false\n    }\n    return this.negate\n  }\n\n  static defaults(def: MinimatchOptions) {\n    return minimatch.defaults(def).Minimatch\n  }\n}\n/* c8 ignore start */\nexport { AST } from './ast.js'\nexport { escape } from './escape.js'\nexport { unescape } from './unescape.js'\n/* c8 ignore stop */\nminimatch.AST = AST\nminimatch.Minimatch = Minimatch\nminimatch.escape = escape\nminimatch.unescape = unescape\n"]}
              \ No newline at end of file
              diff --git a/node_modules/mocha/node_modules/minimatch/dist/esm/package.json b/node_modules/mocha/node_modules/minimatch/dist/esm/package.json
              deleted file mode 100644
              index 3dbc1ca5..00000000
              --- a/node_modules/mocha/node_modules/minimatch/dist/esm/package.json
              +++ /dev/null
              @@ -1,3 +0,0 @@
              -{
              -  "type": "module"
              -}
              diff --git a/node_modules/mocha/node_modules/minimatch/dist/esm/unescape.d.ts b/node_modules/mocha/node_modules/minimatch/dist/esm/unescape.d.ts
              deleted file mode 100644
              index 23a7b387..00000000
              --- a/node_modules/mocha/node_modules/minimatch/dist/esm/unescape.d.ts
              +++ /dev/null
              @@ -1,17 +0,0 @@
              -import { MinimatchOptions } from './index.js';
              -/**
              - * Un-escape a string that has been escaped with {@link escape}.
              - *
              - * If the {@link windowsPathsNoEscape} option is used, then square-brace
              - * escapes are removed, but not backslash escapes.  For example, it will turn
              - * the string `'[*]'` into `*`, but it will not turn `'\\*'` into `'*'`,
              - * becuase `\` is a path separator in `windowsPathsNoEscape` mode.
              - *
              - * When `windowsPathsNoEscape` is not set, then both brace escapes and
              - * backslash escapes are removed.
              - *
              - * Slashes (and backslashes in `windowsPathsNoEscape` mode) cannot be escaped
              - * or unescaped.
              - */
              -export declare const unescape: (s: string, { windowsPathsNoEscape, }?: Pick) => string;
              -//# sourceMappingURL=unescape.d.ts.map
              \ No newline at end of file
              diff --git a/node_modules/mocha/node_modules/minimatch/dist/esm/unescape.d.ts.map b/node_modules/mocha/node_modules/minimatch/dist/esm/unescape.d.ts.map
              deleted file mode 100644
              index 7ace0701..00000000
              --- a/node_modules/mocha/node_modules/minimatch/dist/esm/unescape.d.ts.map
              +++ /dev/null
              @@ -1 +0,0 @@
              -{"version":3,"file":"unescape.d.ts","sourceRoot":"","sources":["../../src/unescape.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAC7C;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,QAAQ,MAChB,MAAM,8BAGN,KAAK,gBAAgB,EAAE,sBAAsB,CAAC,WAKlD,CAAA"}
              \ No newline at end of file
              diff --git a/node_modules/mocha/node_modules/minimatch/dist/esm/unescape.js b/node_modules/mocha/node_modules/minimatch/dist/esm/unescape.js
              deleted file mode 100644
              index 0faf9a2b..00000000
              --- a/node_modules/mocha/node_modules/minimatch/dist/esm/unescape.js
              +++ /dev/null
              @@ -1,20 +0,0 @@
              -/**
              - * Un-escape a string that has been escaped with {@link escape}.
              - *
              - * If the {@link windowsPathsNoEscape} option is used, then square-brace
              - * escapes are removed, but not backslash escapes.  For example, it will turn
              - * the string `'[*]'` into `*`, but it will not turn `'\\*'` into `'*'`,
              - * becuase `\` is a path separator in `windowsPathsNoEscape` mode.
              - *
              - * When `windowsPathsNoEscape` is not set, then both brace escapes and
              - * backslash escapes are removed.
              - *
              - * Slashes (and backslashes in `windowsPathsNoEscape` mode) cannot be escaped
              - * or unescaped.
              - */
              -export const unescape = (s, { windowsPathsNoEscape = false, } = {}) => {
              -    return windowsPathsNoEscape
              -        ? s.replace(/\[([^\/\\])\]/g, '$1')
              -        : s.replace(/((?!\\).|^)\[([^\/\\])\]/g, '$1$2').replace(/\\([^\/])/g, '$1');
              -};
              -//# sourceMappingURL=unescape.js.map
              \ No newline at end of file
              diff --git a/node_modules/mocha/node_modules/minimatch/dist/esm/unescape.js.map b/node_modules/mocha/node_modules/minimatch/dist/esm/unescape.js.map
              deleted file mode 100644
              index eb146c20..00000000
              --- a/node_modules/mocha/node_modules/minimatch/dist/esm/unescape.js.map
              +++ /dev/null
              @@ -1 +0,0 @@
              -{"version":3,"file":"unescape.js","sourceRoot":"","sources":["../../src/unescape.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,CACtB,CAAS,EACT,EACE,oBAAoB,GAAG,KAAK,MACsB,EAAE,EACtD,EAAE;IACF,OAAO,oBAAoB;QACzB,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,gBAAgB,EAAE,IAAI,CAAC;QACnC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,2BAA2B,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,YAAY,EAAE,IAAI,CAAC,CAAA;AAChF,CAAC,CAAA","sourcesContent":["import { MinimatchOptions } from './index.js'\n/**\n * Un-escape a string that has been escaped with {@link escape}.\n *\n * If the {@link windowsPathsNoEscape} option is used, then square-brace\n * escapes are removed, but not backslash escapes.  For example, it will turn\n * the string `'[*]'` into `*`, but it will not turn `'\\\\*'` into `'*'`,\n * becuase `\\` is a path separator in `windowsPathsNoEscape` mode.\n *\n * When `windowsPathsNoEscape` is not set, then both brace escapes and\n * backslash escapes are removed.\n *\n * Slashes (and backslashes in `windowsPathsNoEscape` mode) cannot be escaped\n * or unescaped.\n */\nexport const unescape = (\n  s: string,\n  {\n    windowsPathsNoEscape = false,\n  }: Pick = {}\n) => {\n  return windowsPathsNoEscape\n    ? s.replace(/\\[([^\\/\\\\])\\]/g, '$1')\n    : s.replace(/((?!\\\\).|^)\\[([^\\/\\\\])\\]/g, '$1$2').replace(/\\\\([^\\/])/g, '$1')\n}\n"]}
              \ No newline at end of file
              diff --git a/node_modules/mocha/node_modules/minimatch/package.json b/node_modules/mocha/node_modules/minimatch/package.json
              deleted file mode 100644
              index 01fc48ec..00000000
              --- a/node_modules/mocha/node_modules/minimatch/package.json
              +++ /dev/null
              @@ -1,82 +0,0 @@
              -{
              -  "author": "Isaac Z. Schlueter  (http://blog.izs.me)",
              -  "name": "minimatch",
              -  "description": "a glob matcher in javascript",
              -  "version": "9.0.5",
              -  "repository": {
              -    "type": "git",
              -    "url": "git://github.com/isaacs/minimatch.git"
              -  },
              -  "main": "./dist/commonjs/index.js",
              -  "types": "./dist/commonjs/index.d.ts",
              -  "exports": {
              -    "./package.json": "./package.json",
              -    ".": {
              -      "import": {
              -        "types": "./dist/esm/index.d.ts",
              -        "default": "./dist/esm/index.js"
              -      },
              -      "require": {
              -        "types": "./dist/commonjs/index.d.ts",
              -        "default": "./dist/commonjs/index.js"
              -      }
              -    }
              -  },
              -  "files": [
              -    "dist"
              -  ],
              -  "scripts": {
              -    "preversion": "npm test",
              -    "postversion": "npm publish",
              -    "prepublishOnly": "git push origin --follow-tags",
              -    "prepare": "tshy",
              -    "pretest": "npm run prepare",
              -    "presnap": "npm run prepare",
              -    "test": "tap",
              -    "snap": "tap",
              -    "format": "prettier --write . --loglevel warn",
              -    "benchmark": "node benchmark/index.js",
              -    "typedoc": "typedoc --tsconfig tsconfig-esm.json ./src/*.ts"
              -  },
              -  "prettier": {
              -    "semi": false,
              -    "printWidth": 80,
              -    "tabWidth": 2,
              -    "useTabs": false,
              -    "singleQuote": true,
              -    "jsxSingleQuote": false,
              -    "bracketSameLine": true,
              -    "arrowParens": "avoid",
              -    "endOfLine": "lf"
              -  },
              -  "engines": {
              -    "node": ">=16 || 14 >=14.17"
              -  },
              -  "dependencies": {
              -    "brace-expansion": "^2.0.1"
              -  },
              -  "devDependencies": {
              -    "@types/brace-expansion": "^1.1.0",
              -    "@types/node": "^18.15.11",
              -    "@types/tap": "^15.0.8",
              -    "eslint-config-prettier": "^8.6.0",
              -    "mkdirp": "1",
              -    "prettier": "^2.8.2",
              -    "tap": "^18.7.2",
              -    "ts-node": "^10.9.1",
              -    "tshy": "^1.12.0",
              -    "typedoc": "^0.23.21",
              -    "typescript": "^4.9.3"
              -  },
              -  "funding": {
              -    "url": "https://github.com/sponsors/isaacs"
              -  },
              -  "license": "ISC",
              -  "tshy": {
              -    "exports": {
              -      "./package.json": "./package.json",
              -      ".": "./src/index.ts"
              -    }
              -  },
              -  "type": "module"
              -}
              diff --git a/node_modules/mocha/package.json b/node_modules/mocha/package.json
              index a1986840..0014e9f8 100644
              --- a/node_modules/mocha/package.json
              +++ b/node_modules/mocha/package.json
              @@ -1,8 +1,8 @@
               {
                 "name": "mocha",
              -  "version": "11.8.0",
              -  "type": "commonjs",
              -  "description": "simple, flexible, fun test framework",
              +  "version": "12.0.0",
              +  "type": "module",
              +  "description": "Classic, reliable, trusted test framework for Node.js and the browser",
                 "keywords": [
                   "mocha",
                   "test",
              @@ -16,7 +16,7 @@
                   "jest",
                   "tape",
                   "jasmine",
              -    "karma"
              +    "playwright"
                 ],
                 "author": "TJ Holowaychuk ",
                 "license": "MIT",
              @@ -31,50 +31,40 @@
                 "homepage": "https://mochajs.org/",
                 "logo": "https://cldup.com/S9uQ-cOLYz.svg",
                 "notifyLogo": "https://ibin.co/4QuRuGjXvl36.png",
              +  "main": "./index.js",
                 "bin": {
              -    "mocha": "./bin/mocha.js",
              -    "_mocha": "./bin/_mocha"
              +    "mocha": "./bin/mocha.js"
                 },
                 "directories": {
                   "lib": "./lib",
                   "test": "./test"
                 },
                 "engines": {
              -    "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
              +    "node": "^20.19.0 || >=22.12.0"
                 },
                 "scripts": {
                   "build": "rollup -c ./rollup.config.js",
                   "clean": "rimraf mocha.js mocha.js.map",
              -    "docs-clean": "rimraf docs/_site docs/api",
              -    "docs-watch": "eleventy --serve",
              -    "docs:api": "jsdoc -c jsdoc.conf.json",
              -    "docs:build": "eleventy",
              -    "docs:preview": "http-server docs/_site -o",
              -    "docs": "run-s docs-clean docs:api docs:build docs:build-new",
              +    "docs": "cd docs; npm run docs",
                   "format:check": "prettier --check .",
                   "format:fix": "prettier --write .",
              -    "lint:installed-check": "installed-check --engine-check",
              +    "lint:installed-check": "installed-check --engine-check --ignore-dev",
                   "lint:knip": "knip --cache",
              -    "lint:code": "eslint . \"bin/*\" --max-warnings 0",
              -    "lint:markdown": "markdownlint \"*.md\" \"docs/**/*.md\" \".github/*.md\" \"lib/**/*.md\" \"test/**/*.md\" \"example/**/*.md\" -i CHANGELOG.md",
              -    "lint": "run-p lint:*",
              +    "lint:knip-docs": "cd docs && npm run lint:knip",
              +    "lint:code": "eslint . --max-warnings 0",
              +    "prelint": "npm run clean",
              +    "lint": "run-p --aggregate-output --continue-on-error lint:*",
                   "prepublishOnly": "run-s clean build version",
              -    "test-browser-run": "cross-env NODE_PATH=. karma start ./karma.conf.js --single-run",
              -    "test-browser:reporters:bdd": "cross-env MOCHA_TEST=bdd npm run -s test-browser-run",
              -    "test-browser:reporters:esm": "cross-env MOCHA_TEST=esm npm run -s test-browser-run",
              -    "test-browser:reporters:qunit": "cross-env MOCHA_TEST=qunit npm run -s test-browser-run",
              -    "test-browser:reporters:tdd": "cross-env MOCHA_TEST=tdd npm run -s test-browser-run",
              -    "test-browser:reporters": "run-s test-browser:reporters:*",
              -    "test-browser:webpack-compat": "webpack --mode development --config ./test/browser-specific/fixtures/webpack/webpack.config.js",
              +    "pretest-browser:playwright": "playwright install chromium --with-deps",
              +    "test-browser:playwright": "playwright test",
              +    "test-browser:webpack-compat": "webpack --mode development --config ./test/browser-specific/fixtures/webpack/webpack.config.cjs",
                   "test-browser": "run-s clean build test-browser:*",
                   "test-coverage-clean": "rimraf .nyc_output coverage",
                   "test-coverage-generate": "nyc report --reporter=lcov --reporter=text",
              -    "test-node-run-only": "nyc --no-clean --reporter=json node bin/mocha.js",
              -    "test-node-run": "nyc --no-clean --reporter=json node bin/mocha.js --forbid-only",
              -    "test-node-run:bare": "node bin/mocha.js --grep @bare",
              -    "test-node:integration": "run-s clean build && npm run -s test-node-run -- --parallel --timeout 10000 --slow 3750 \"test/integration/**/*.spec.js\"",
              -    "test-node:integration:bare": "run-s clean build && npm run -s test-node-run:bare -- --parallel --timeout 10000 --slow 3750 \"test/integration/**/*.spec.js\"",
              -    "test-node:integration:watch": "run-s clean build && npm run -s test-node-run -- --parallel --timeout 10000 --slow 3750 \"test/integration/options/watch.spec.js\"",
              +    "test-node-run-only": "cross-env NODE_OPTIONS=--enable-source-maps nyc --no-clean --reporter=json node bin/mocha.js --no-forbid-only",
              +    "test-node-run": "cross-env NODE_OPTIONS=--enable-source-maps nyc --no-clean --reporter=json node bin/mocha.js --forbid-only",
              +    "test-node:integration": "run-s clean build && npm run -s test-node-run -- --parallel --timeout 10000 --slow 3750 \"test/integration/**/*.spec.cjs\"",
              +    "test-node:integration:watch": "run-s clean build && npm run -s test-node-run -- --parallel --timeout 10000 --slow 3750 \"test/integration/options/watch.spec.cjs\"",
                   "test-node:interfaces:bdd": "npm run -s test-node-run -- --ui bdd test/interfaces/bdd.spec",
                   "test-node:interfaces:exports": "npm run -s test-node-run -- --ui exports test/interfaces/exports.spec",
                   "test-node:interfaces:qunit": "npm run -s test-node-run -- --ui qunit test/interfaces/qunit.spec",
              @@ -86,111 +76,85 @@
                   "test-node:only:globalQunit": "npm run -s test-node-run-only -- --ui qunit test/only/global/qunit.spec --no-parallel",
                   "test-node:only:globalTdd": "npm run -s test-node-run-only -- --ui tdd test/only/global/tdd.spec --no-parallel",
                   "test-node:only": "run-p test-node:only:*",
              -    "test-node:reporters": "npm run -s test-node-run -- \"test/reporters/*.spec.js\"",
              -    "test-node:requires": "npm run -s test-node-run -- --require coffeescript/register --require test/require/a.js --require test/require/b.coffee --require test/require/c.js --require test/require/d.coffee test/require/require.spec.js",
              -    "test-node:unit": "npm run -s test-node-run -- \"test/unit/*.spec.js\" \"test/node-unit/**/*.spec.js\"",
              +    "test-node:reporters": "npm run -s test-node-run -- \"test/reporters/*.spec.{cjs,js}\"",
              +    "test-node:requires": "npm run -s test-node-run -- --require coffeescript/register --require test/require/a.cjs --require test/require/b.coffee --require test/require/c.cjs --require test/require/d.coffee test/require/require.spec.cjs",
              +    "test-node:unit": "npm run -s test-node-run -- \"test/unit/**/*.spec.cjs\" \"test/node-unit/**/*.spec.{cjs,js}\"",
                   "test-node": "run-s test-coverage-clean test-node:* test-coverage-generate",
              -    "test-smoke": "node ./bin/mocha --no-config test/smoke/smoke.spec.js",
              +    "test-smoke": "node ./bin/mocha.js --no-config test/smoke/smoke.spec.cjs",
                   "test": "run-s lint test-node test-browser",
                   "tsc": "tsc",
              -    "version:linkify-changelog": "node scripts/linkify-changelog.mjs",
              -    "version:update-authors": "node scripts/update-authors.js",
              +    "version:linkify-changelog": "node scripts/linkify-changelog.js",
              +    "version:update-authors": "node scripts/update-authors.cjs",
                   "version": "run-p version:* && git add -A ./AUTHORS ./CHANGELOG.md"
                 },
                 "dependencies": {
                   "browser-stdout": "^1.3.1",
              -    "chokidar": "^4.0.1",
              +    "chokidar": "^5.0.0",
                   "debug": "^4.3.5",
              -    "diff": "^7.0.0",
              -    "escape-string-regexp": "^4.0.0",
              +    "diff": "^9.0.0",
                   "find-up": "^5.0.0",
              -    "glob": "^10.4.5",
              -    "he": "^1.2.0",
              +    "glob": "^13.0.0",
                   "is-path-inside": "^3.0.3",
              -    "js-yaml": "^4.1.0",
              -    "log-symbols": "^4.1.0",
              -    "minimatch": "^9.0.5",
              +    "is-unicode-supported": "^0.1.0",
              +    "js-yaml": "^5.0.0",
              +    "minimatch": "^10.2.2",
                   "ms": "^2.1.3",
                   "picocolors": "^1.1.1",
              -    "serialize-javascript": "^6.0.2",
              -    "strip-json-comments": "^3.1.1",
              +    "serialize-javascript": "^7.0.2",
              +    "strip-json-comments": "^5.0.3",
                   "supports-color": "^8.1.1",
              -    "workerpool": "^9.2.0",
              -    "yargs": "^17.7.2",
              -    "yargs-parser": "^21.1.1",
              -    "yargs-unparser": "^2.0.0"
              +    "workerpool": "^10.0.0"
                 },
                 "devDependencies": {
              -    "@11ty/eleventy": "^1.0.0",
              -    "@11ty/eleventy-plugin-inclusive-language": "^1.0.3",
              -    "@eslint/js": "^8.56.0",
              -    "@mocha/docdash": "^4.0.1",
              -    "@rollup/plugin-alias": "^5.1.1",
              -    "@rollup/plugin-commonjs": "^21.0.2",
              -    "@rollup/plugin-json": "^4.1.0",
              -    "@rollup/plugin-multi-entry": "^4.0.1",
              -    "@rollup/plugin-node-resolve": "^13.1.3",
              +    "@eslint/js": "^10.0.0",
              +    "@eslint/markdown": "^8.0.0",
              +    "@playwright/test": "^1.60.0",
              +    "@rollup/plugin-alias": "^6.0.0",
              +    "@rollup/plugin-commonjs": "^29.0.0",
              +    "@rollup/plugin-json": "^6.1.0",
              +    "@rollup/plugin-node-resolve": "^16.0.3",
                   "@test/esm-only-loader": "./test/compiler-fixtures/esm-only-loader",
              -    "@types/node": "^22.15.3",
              -    "@types/yargs": "^17.0.33",
              -    "@vscode/windows-process-tree": "^0.6.3",
              -    "chai": "^4.3.4",
              +    "@types/node": "^24.0.0",
              +    "chai": "^6.0.0",
                   "coffeescript": "^2.6.1",
              -    "cross-env": "^7.0.2",
              -    "eslint": "^8.56.0",
              -    "eslint-plugin-n": "^17.15.1",
              -    "fail-on-errors-webpack-plugin": "^3.0.0",
              -    "globals": "^13.24.0",
              -    "http-server": "^14.1.1",
              -    "installed-check": "^9.3.0",
              -    "jsdoc": "^3.6.7",
              -    "jsdoc-ts-utils": "^2.0.1",
              -    "karma": "^6.4.2",
              -    "karma-chrome-launcher": "^3.2.0",
              -    "karma-mocha": "^2.0.1",
              -    "karma-mocha-reporter": "^2.2.5",
              -    "karma-sauce-launcher": "^4.3.6",
              -    "knip": "^5.61.3",
              -    "markdown-it": "^12.3.2",
              -    "markdown-it-anchor": "^8.4.1",
              -    "markdown-it-attrs": "^4.1.3",
              -    "markdown-it-emoji": "^2.0.0",
              -    "markdown-it-prism": "^2.2.2",
              -    "markdown-toc": "^1.2.0",
              -    "markdownlint-cli": "^0.30.0",
              -    "needle": "^2.5.0",
              -    "npm-run-all2": "^6.2.0",
              -    "nyc": "^15.1.0",
              -    "pidtree": "^0.5.0",
              -    "prettier": "3.6.2",
              -    "remark": "^14.0.2",
              -    "remark-github": "^11.2.2",
              -    "remark-inline-links": "^6.0.1",
              +    "cross-env": "^10.0.0",
              +    "eslint": "^10.0.0",
              +    "eslint-plugin-n": "^18.0.0",
              +    "globals": "^17.0.0",
              +    "installed-check": "^10.0.0",
              +    "knip": "^6.0.0",
              +    "npm-run-all2": "^8.0.0",
              +    "nyc": "^18.0.0",
              +    "prettier": "3.9.5",
              +    "ps-list": "^9.0.0",
              +    "remark": "^15.0.0",
              +    "remark-github": "^12.0.0",
              +    "remark-inline-links": "^7.0.0",
                   "rewiremock": "^3.14.3",
              -    "rimraf": "^3.0.2",
              -    "rollup": "^2.70.1",
              -    "rollup-plugin-node-globals": "^1.4.0",
              -    "rollup-plugin-polyfill-node": "^0.8.0",
              -    "rollup-plugin-visualizer": "^5.6.0",
              +    "rimraf": "^6.0.0",
              +    "rollup": "^4.52.3",
              +    "rollup-plugin-polyfill-node": "^0.13.0",
              +    "rollup-plugin-visualizer": "^6.0.5",
                   "semver": "^7.7.2",
              -    "sinon": "^9.0.3",
              +    "sinon": "^22.0.0",
                   "typescript": "^5.8.3",
              -    "unexpected": "^11.14.0",
              -    "unexpected-eventemitter": "^2.2.0",
              -    "unexpected-map": "^2.0.0",
              -    "unexpected-set": "^3.0.0",
              -    "unexpected-sinon": "^10.11.2",
              -    "uslug": "^1.0.4",
              +    "unexpected": "^13.2.1",
              +    "unexpected-eventemitter": "^2.4.0",
              +    "unexpected-sinon": "^11.1.0",
                   "webpack": "^5.67.0",
              -    "webpack-cli": "^4.9.1"
              +    "webpack-cli": "^7.0.2"
                 },
                 "files": [
                   "bin/*mocha*",
              -    "lib/**/*.{js,html,json}",
              +    "lib/**/*.html",
              +    "lib/**/*.js",
              +    "lib/**/*.json",
              +    "lib/**/*.cjs",
                   "index.js",
                   "mocha.css",
                   "mocha.js",
                   "mocha.js.map",
              +    "mocha.mjs",
                   "browser-entry.js"
                 ],
                 "browser": {
              @@ -198,18 +162,18 @@
                   "fs": false,
                   "path": false,
                   "supports-color": false,
              -    "./lib/nodejs/buffered-worker-pool.js": false,
              -    "./lib/nodejs/esm-utils.js": false,
              -    "./lib/nodejs/file-unloader.js": false,
              -    "./lib/nodejs/parallel-buffered-runner.js": false,
              +    "./lib/nodejs/buffered-worker-pool.cjs": false,
              +    "./lib/nodejs/esm-utils.cjs": false,
              +    "./lib/nodejs/file-unloader.cjs": false,
              +    "./lib/nodejs/parallel-buffered-runner.cjs": false,
                   "./lib/nodejs/serializer.js": false,
              -    "./lib/nodejs/worker.js": false,
              -    "./lib/nodejs/reporters/parallel-buffered.js": false,
              -    "./lib/cli/index.js": false
              +    "./lib/nodejs/worker.cjs": false,
              +    "./lib/nodejs/reporters/parallel-buffered.cjs": false,
              +    "./lib/cli/index.cjs": false
                 },
                 "overrides": {
                   "@types/eslint": "^9.6.1",
                   "@types/estree": "^1.0.7",
              -    "webdriverio": "^7.33.0"
              +    "webdriverio": "^9.0.0"
                 }
               }
              diff --git a/node_modules/package-json-from-dist/LICENSE.md b/node_modules/package-json-from-dist/LICENSE.md
              deleted file mode 100644
              index 881248b6..00000000
              --- a/node_modules/package-json-from-dist/LICENSE.md
              +++ /dev/null
              @@ -1,63 +0,0 @@
              -All packages under `src/` are licensed according to the terms in
              -their respective `LICENSE` or `LICENSE.md` files.
              -
              -The remainder of this project is licensed under the Blue Oak
              -Model License, as follows:
              -
              ------
              -
              -# Blue Oak Model License
              -
              -Version 1.0.0
              -
              -## Purpose
              -
              -This license gives everyone as much permission to work with
              -this software as possible, while protecting contributors
              -from liability.
              -
              -## Acceptance
              -
              -In order to receive this license, you must agree to its
              -rules.  The rules of this license are both obligations
              -under that agreement and conditions to your license.
              -You must not do anything with this software that triggers
              -a rule that you cannot or will not follow.
              -
              -## Copyright
              -
              -Each contributor licenses you to do everything with this
              -software that would otherwise infringe that contributor's
              -copyright in it.
              -
              -## Notices
              -
              -You must ensure that everyone who gets a copy of
              -any part of this software from you, with or without
              -changes, also gets the text of this license or a link to
              -.
              -
              -## Excuse
              -
              -If anyone notifies you in writing that you have not
              -complied with [Notices](#notices), you can keep your
              -license by taking all practical steps to comply within 30
              -days after the notice.  If you do not do so, your license
              -ends immediately.
              -
              -## Patent
              -
              -Each contributor licenses you to do everything with this
              -software that would otherwise infringe any patent claims
              -they can license or become able to license.
              -
              -## Reliability
              -
              -No contributor can revoke this license.
              -
              -## No Liability
              -
              -***As far as the law allows, this software comes as is,
              -without any warranty or condition, and no contributor
              -will be liable to anyone for any damages related to this
              -software or this license, under any kind of legal claim.***
              diff --git a/node_modules/package-json-from-dist/README.md b/node_modules/package-json-from-dist/README.md
              deleted file mode 100644
              index a9e13448..00000000
              --- a/node_modules/package-json-from-dist/README.md
              +++ /dev/null
              @@ -1,110 +0,0 @@
              -# package-json-from-dist
              -
              -Sometimes you want to load the `package.json` into your
              -TypeScript program, and it's tempting to just `import
              -'../package.json'`, since that seems to work.
              -
              -However, this requires `tsc` to make an entire copy of your
              -`package.json` file into the `dist` folder, which is a problem if
              -you're using something like
              -[tshy](https://github.com/isaacs/tshy), which uses the
              -`package.json` file in dist for another purpose. Even when that
              -does work, it's asking the module system to do a bunch of extra
              -fs system calls, just to load a version number or something. (See
              -[this issue](https://github.com/isaacs/tshy/issues/61).)
              -
              -This module helps by just finding the package.json file
              -appropriately, and reading and parsing it in the most normal
              -fashion.
              -
              -## Caveats
              -
              -This _only_ works if your code builds into a target folder called
              -`dist`, which is in the root of the package. It also requires
              -that you do not have a folder named `node_modules` anywhere
              -within your dev environment, or else it'll get the wrong answers
              -there. (But, at least, that'll be in dev, so you're pretty likely
              -to notice.)
              -
              -If you build to some other location, then you'll need a different
              -approach. (Feel free to fork this module and make it your own, or
              -just put the code right inline, there's not much of it.)
              -
              -## USAGE
              -
              -```js
              -// src/index.ts
              -import {
              -  findPackageJson,
              -  loadPackageJson,
              -} from 'package-json-from-dist'
              -
              -const pj = findPackageJson(import.meta.url)
              -console.log(`package.json found at ${pj}`)
              -
              -const pkg = loadPackageJson(import.meta.url)
              -console.log(`Hello from ${pkg.name}@${pkg.version}`)
              -```
              -
              -If your module is not directly in the `./src` folder, then you need
              -to specify the path that you would expect to find the
              -`package.json` when it's _not_ built to the `dist` folder.
              -
              -```js
              -// src/components/something.ts
              -import {
              -  findPackageJson,
              -  loadPackageJson,
              -} from 'package-json-from-dist'
              -
              -const pj = findPackageJson(import.meta.url, '../../package.json')
              -console.log(`package.json found at ${pj}`)
              -
              -const pkg = loadPackageJson(import.meta.url, '../../package.json')
              -console.log(`Hello from ${pkg.name}@${pkg.version}`)
              -```
              -
              -When running from CommmonJS, use `__filename` instead of
              -`import.meta.url`.
              -
              -```js
              -// src/index.cts
              -import {
              -  findPackageJson,
              -  loadPackageJson,
              -} from 'package-json-from-dist'
              -
              -const pj = findPackageJson(__filename)
              -console.log(`package.json found at ${pj}`)
              -
              -const pkg = loadPackageJson(__filename)
              -console.log(`Hello from ${pkg.name}@${pkg.version}`)
              -```
              -
              -Since [tshy](https://github.com/isaacs/tshy) builds _both_
              -CommonJS and ESM by default, you may find that you need a
              -CommonJS override and some `//@ts-ignore` magic to make it work.
              -
              -`src/pkg.ts`:
              -
              -```js
              -import {
              -  findPackageJson,
              -  loadPackageJson,
              -} from 'package-json-from-dist'
              -//@ts-ignore
              -export const pkg = loadPackageJson(import.meta.url)
              -//@ts-ignore
              -export const pj = findPackageJson(import.meta.url)
              -```
              -
              -`src/pkg-cjs.cts`:
              -
              -```js
              -import {
              -  findPackageJson,
              -  loadPackageJson,
              -} from 'package-json-from-dist'
              -export const pkg = loadPackageJson(__filename)
              -export const pj = findPackageJson(__filename)
              -```
              diff --git a/node_modules/package-json-from-dist/dist/commonjs/index.d.ts b/node_modules/package-json-from-dist/dist/commonjs/index.d.ts
              deleted file mode 100644
              index d486ffd2..00000000
              --- a/node_modules/package-json-from-dist/dist/commonjs/index.d.ts
              +++ /dev/null
              @@ -1,89 +0,0 @@
              -/**
              - * Find the package.json file, either from a TypeScript file somewhere not
              - * in a 'dist' folder, or a built and/or installed 'dist' folder.
              - *
              - * Note: this *only* works if you build your code into `'./dist'`, and that the
              - * source path does not also contain `'dist'`! If you don't build into
              - * `'./dist'`, or if you have files at `./src/dist/dist.ts`, then this will
              - * not work properly!
              - *
              - * The default `pathFromSrc` option assumes that the calling code lives one
              - * folder below the root of the package. Otherwise, it must be specified.
              - *
              - * Example:
              - *
              - * ```ts
              - * // src/index.ts
              - * import { findPackageJson } from 'package-json-from-dist'
              - *
              - * const pj = findPackageJson(import.meta.url)
              - * console.log(`package.json found at ${pj}`)
              - * ```
              - *
              - * If the caller is deeper within the project source, then you must provide
              - * the appropriate fallback path:
              - *
              - * ```ts
              - * // src/components/something.ts
              - * import { findPackageJson } from 'package-json-from-dist'
              - *
              - * const pj = findPackageJson(import.meta.url, '../../package.json')
              - * console.log(`package.json found at ${pj}`)
              - * ```
              - *
              - * When running from CommmonJS, use `__filename` instead of `import.meta.url`
              - *
              - * ```ts
              - * // src/index.cts
              - * import { findPackageJson } from 'package-json-from-dist'
              - *
              - * const pj = findPackageJson(__filename)
              - * console.log(`package.json found at ${pj}`)
              - * ```
              - */
              -export declare const findPackageJson: (from: string | URL, pathFromSrc?: string) => string;
              -/**
              - * Load the package.json file, either from a TypeScript file somewhere not
              - * in a 'dist' folder, or a built and/or installed 'dist' folder.
              - *
              - * Note: this *only* works if you build your code into `'./dist'`, and that the
              - * source path does not also contain `'dist'`! If you don't build into
              - * `'./dist'`, or if you have files at `./src/dist/dist.ts`, then this will
              - * not work properly!
              - *
              - * The default `pathFromSrc` option assumes that the calling code lives one
              - * folder below the root of the package. Otherwise, it must be specified.
              - *
              - * Example:
              - *
              - * ```ts
              - * // src/index.ts
              - * import { loadPackageJson } from 'package-json-from-dist'
              - *
              - * const pj = loadPackageJson(import.meta.url)
              - * console.log(`Hello from ${pj.name}@${pj.version}`)
              - * ```
              - *
              - * If the caller is deeper within the project source, then you must provide
              - * the appropriate fallback path:
              - *
              - * ```ts
              - * // src/components/something.ts
              - * import { loadPackageJson } from 'package-json-from-dist'
              - *
              - * const pj = loadPackageJson(import.meta.url, '../../package.json')
              - * console.log(`Hello from ${pj.name}@${pj.version}`)
              - * ```
              - *
              - * When running from CommmonJS, use `__filename` instead of `import.meta.url`
              - *
              - * ```ts
              - * // src/index.cts
              - * import { loadPackageJson } from 'package-json-from-dist'
              - *
              - * const pj = loadPackageJson(__filename)
              - * console.log(`Hello from ${pj.name}@${pj.version}`)
              - * ```
              - */
              -export declare const loadPackageJson: (from: string | URL, pathFromSrc?: string) => any;
              -//# sourceMappingURL=index.d.ts.map
              \ No newline at end of file
              diff --git a/node_modules/package-json-from-dist/dist/commonjs/index.d.ts.map b/node_modules/package-json-from-dist/dist/commonjs/index.d.ts.map
              deleted file mode 100644
              index ca3e21c7..00000000
              --- a/node_modules/package-json-from-dist/dist/commonjs/index.d.ts.map
              +++ /dev/null
              @@ -1 +0,0 @@
              -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AASA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,eAAO,MAAM,eAAe,SACpB,MAAM,GAAG,GAAG,gBACL,MAAM,KAClB,MAsCF,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,eAAO,MAAM,eAAe,SACpB,MAAM,GAAG,GAAG,gBACL,MAAM,QAEiD,CAAA"}
              \ No newline at end of file
              diff --git a/node_modules/package-json-from-dist/dist/commonjs/index.js b/node_modules/package-json-from-dist/dist/commonjs/index.js
              deleted file mode 100644
              index b966ac9f..00000000
              --- a/node_modules/package-json-from-dist/dist/commonjs/index.js
              +++ /dev/null
              @@ -1,134 +0,0 @@
              -"use strict";
              -Object.defineProperty(exports, "__esModule", { value: true });
              -exports.loadPackageJson = exports.findPackageJson = void 0;
              -const node_fs_1 = require("node:fs");
              -const node_path_1 = require("node:path");
              -const node_url_1 = require("node:url");
              -const NM = `${node_path_1.sep}node_modules${node_path_1.sep}`;
              -const STORE = `.store${node_path_1.sep}`;
              -const PKG = `${node_path_1.sep}package${node_path_1.sep}`;
              -const DIST = `${node_path_1.sep}dist${node_path_1.sep}`;
              -/**
              - * Find the package.json file, either from a TypeScript file somewhere not
              - * in a 'dist' folder, or a built and/or installed 'dist' folder.
              - *
              - * Note: this *only* works if you build your code into `'./dist'`, and that the
              - * source path does not also contain `'dist'`! If you don't build into
              - * `'./dist'`, or if you have files at `./src/dist/dist.ts`, then this will
              - * not work properly!
              - *
              - * The default `pathFromSrc` option assumes that the calling code lives one
              - * folder below the root of the package. Otherwise, it must be specified.
              - *
              - * Example:
              - *
              - * ```ts
              - * // src/index.ts
              - * import { findPackageJson } from 'package-json-from-dist'
              - *
              - * const pj = findPackageJson(import.meta.url)
              - * console.log(`package.json found at ${pj}`)
              - * ```
              - *
              - * If the caller is deeper within the project source, then you must provide
              - * the appropriate fallback path:
              - *
              - * ```ts
              - * // src/components/something.ts
              - * import { findPackageJson } from 'package-json-from-dist'
              - *
              - * const pj = findPackageJson(import.meta.url, '../../package.json')
              - * console.log(`package.json found at ${pj}`)
              - * ```
              - *
              - * When running from CommmonJS, use `__filename` instead of `import.meta.url`
              - *
              - * ```ts
              - * // src/index.cts
              - * import { findPackageJson } from 'package-json-from-dist'
              - *
              - * const pj = findPackageJson(__filename)
              - * console.log(`package.json found at ${pj}`)
              - * ```
              - */
              -const findPackageJson = (from, pathFromSrc = '../package.json') => {
              -    const f = typeof from === 'object' || from.startsWith('file://') ?
              -        (0, node_url_1.fileURLToPath)(from)
              -        : from;
              -    const __dirname = (0, node_path_1.dirname)(f);
              -    const nms = __dirname.lastIndexOf(NM);
              -    if (nms !== -1) {
              -        // inside of node_modules. find the dist directly under package name.
              -        const nm = __dirname.substring(0, nms + NM.length);
              -        const pkgDir = __dirname.substring(nms + NM.length);
              -        // affordance for yarn berry, which puts package contents in
              -        // '.../node_modules/.store/${id}-${hash}/package/...'
              -        if (pkgDir.startsWith(STORE)) {
              -            const pkg = pkgDir.indexOf(PKG, STORE.length);
              -            if (pkg) {
              -                return (0, node_path_1.resolve)(nm, pkgDir.substring(0, pkg + PKG.length), 'package.json');
              -            }
              -        }
              -        const pkgName = pkgDir.startsWith('@') ?
              -            pkgDir.split(node_path_1.sep, 2).join(node_path_1.sep)
              -            : String(pkgDir.split(node_path_1.sep)[0]);
              -        return (0, node_path_1.resolve)(nm, pkgName, 'package.json');
              -    }
              -    else {
              -        // see if we are in a dist folder.
              -        const d = __dirname.lastIndexOf(DIST);
              -        if (d !== -1) {
              -            return (0, node_path_1.resolve)(__dirname.substring(0, d), 'package.json');
              -        }
              -        else {
              -            return (0, node_path_1.resolve)(__dirname, pathFromSrc);
              -        }
              -    }
              -};
              -exports.findPackageJson = findPackageJson;
              -/**
              - * Load the package.json file, either from a TypeScript file somewhere not
              - * in a 'dist' folder, or a built and/or installed 'dist' folder.
              - *
              - * Note: this *only* works if you build your code into `'./dist'`, and that the
              - * source path does not also contain `'dist'`! If you don't build into
              - * `'./dist'`, or if you have files at `./src/dist/dist.ts`, then this will
              - * not work properly!
              - *
              - * The default `pathFromSrc` option assumes that the calling code lives one
              - * folder below the root of the package. Otherwise, it must be specified.
              - *
              - * Example:
              - *
              - * ```ts
              - * // src/index.ts
              - * import { loadPackageJson } from 'package-json-from-dist'
              - *
              - * const pj = loadPackageJson(import.meta.url)
              - * console.log(`Hello from ${pj.name}@${pj.version}`)
              - * ```
              - *
              - * If the caller is deeper within the project source, then you must provide
              - * the appropriate fallback path:
              - *
              - * ```ts
              - * // src/components/something.ts
              - * import { loadPackageJson } from 'package-json-from-dist'
              - *
              - * const pj = loadPackageJson(import.meta.url, '../../package.json')
              - * console.log(`Hello from ${pj.name}@${pj.version}`)
              - * ```
              - *
              - * When running from CommmonJS, use `__filename` instead of `import.meta.url`
              - *
              - * ```ts
              - * // src/index.cts
              - * import { loadPackageJson } from 'package-json-from-dist'
              - *
              - * const pj = loadPackageJson(__filename)
              - * console.log(`Hello from ${pj.name}@${pj.version}`)
              - * ```
              - */
              -const loadPackageJson = (from, pathFromSrc = '../package.json') => JSON.parse((0, node_fs_1.readFileSync)((0, exports.findPackageJson)(from, pathFromSrc), 'utf8'));
              -exports.loadPackageJson = loadPackageJson;
              -//# sourceMappingURL=index.js.map
              \ No newline at end of file
              diff --git a/node_modules/package-json-from-dist/dist/commonjs/index.js.map b/node_modules/package-json-from-dist/dist/commonjs/index.js.map
              deleted file mode 100644
              index 2fb5d23c..00000000
              --- a/node_modules/package-json-from-dist/dist/commonjs/index.js.map
              +++ /dev/null
              @@ -1 +0,0 @@
              -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,qCAAsC;AACtC,yCAAiD;AACjD,uCAAwC;AAExC,MAAM,EAAE,GAAG,GAAG,eAAG,eAAe,eAAG,EAAE,CAAA;AACrC,MAAM,KAAK,GAAG,SAAS,eAAG,EAAE,CAAA;AAC5B,MAAM,GAAG,GAAG,GAAG,eAAG,UAAU,eAAG,EAAE,CAAA;AACjC,MAAM,IAAI,GAAG,GAAG,eAAG,OAAO,eAAG,EAAE,CAAA;AAE/B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACI,MAAM,eAAe,GAAG,CAC7B,IAAkB,EAClB,cAAsB,iBAAiB,EAC/B,EAAE;IACV,MAAM,CAAC,GACL,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC;QACtD,IAAA,wBAAa,EAAC,IAAI,CAAC;QACrB,CAAC,CAAC,IAAI,CAAA;IACR,MAAM,SAAS,GAAG,IAAA,mBAAO,EAAC,CAAC,CAAC,CAAA;IAE5B,MAAM,GAAG,GAAG,SAAS,CAAC,WAAW,CAAC,EAAE,CAAC,CAAA;IACrC,IAAI,GAAG,KAAK,CAAC,CAAC,EAAE,CAAC;QACf,qEAAqE;QACrE,MAAM,EAAE,GAAG,SAAS,CAAC,SAAS,CAAC,CAAC,EAAE,GAAG,GAAG,EAAE,CAAC,MAAM,CAAC,CAAA;QAClD,MAAM,MAAM,GAAG,SAAS,CAAC,SAAS,CAAC,GAAG,GAAG,EAAE,CAAC,MAAM,CAAC,CAAA;QACnD,4DAA4D;QAC5D,sDAAsD;QACtD,IAAI,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC;YAC7B,MAAM,GAAG,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,K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","sourcesContent":["import { readFileSync } from 'node:fs'\nimport { dirname, resolve, sep } from 'node:path'\nimport { fileURLToPath } from 'node:url'\n\nconst NM = `${sep}node_modules${sep}`\nconst STORE = `.store${sep}`\nconst PKG = `${sep}package${sep}`\nconst DIST = `${sep}dist${sep}`\n\n/**\n * Find the package.json file, either from a TypeScript file somewhere not\n * in a 'dist' folder, or a built and/or installed 'dist' folder.\n *\n * Note: this *only* works if you build your code into `'./dist'`, and that the\n * source path does not also contain `'dist'`! If you don't build into\n * `'./dist'`, or if you have files at `./src/dist/dist.ts`, then this will\n * not work properly!\n *\n * The default `pathFromSrc` option assumes that the calling code lives one\n * folder below the root of the package. Otherwise, it must be specified.\n *\n * Example:\n *\n * ```ts\n * // src/index.ts\n * import { findPackageJson } from 'package-json-from-dist'\n *\n * const pj = findPackageJson(import.meta.url)\n * console.log(`package.json found at ${pj}`)\n * ```\n *\n * If the caller is deeper within the project source, then you must provide\n * the appropriate fallback path:\n *\n * ```ts\n * // src/components/something.ts\n * import { findPackageJson } from 'package-json-from-dist'\n *\n * const pj = findPackageJson(import.meta.url, '../../package.json')\n * console.log(`package.json found at ${pj}`)\n * ```\n *\n * When running from CommmonJS, use `__filename` instead of `import.meta.url`\n *\n * ```ts\n * // src/index.cts\n * import { findPackageJson } from 'package-json-from-dist'\n *\n * const pj = findPackageJson(__filename)\n * console.log(`package.json found at ${pj}`)\n * ```\n */\nexport const findPackageJson = (\n  from: string | URL,\n  pathFromSrc: string = '../package.json',\n): string => {\n  const f =\n    typeof from === 'object' || from.startsWith('file://') ?\n      fileURLToPath(from)\n    : from\n  const __dirname = dirname(f)\n\n  const nms = __dirname.lastIndexOf(NM)\n  if (nms !== -1) {\n    // inside of node_modules. find the dist directly under package name.\n    const nm = __dirname.substring(0, nms + NM.length)\n    const pkgDir = __dirname.substring(nms + NM.length)\n    // affordance for yarn berry, which puts package contents in\n    // '.../node_modules/.store/${id}-${hash}/package/...'\n    if (pkgDir.startsWith(STORE)) {\n      const pkg = pkgDir.indexOf(PKG, STORE.length)\n      if (pkg) {\n        return resolve(\n          nm,\n          pkgDir.substring(0, pkg + PKG.length),\n          'package.json',\n        )\n      }\n    }\n    const pkgName =\n      pkgDir.startsWith('@') ?\n        pkgDir.split(sep, 2).join(sep)\n      : String(pkgDir.split(sep)[0])\n    return resolve(nm, pkgName, 'package.json')\n  } else {\n    // see if we are in a dist folder.\n    const d = __dirname.lastIndexOf(DIST)\n    if (d !== -1) {\n      return resolve(__dirname.substring(0, d), 'package.json')\n    } else {\n      return resolve(__dirname, pathFromSrc)\n    }\n  }\n}\n\n/**\n * Load the package.json file, either from a TypeScript file somewhere not\n * in a 'dist' folder, or a built and/or installed 'dist' folder.\n *\n * Note: this *only* works if you build your code into `'./dist'`, and that the\n * source path does not also contain `'dist'`! If you don't build into\n * `'./dist'`, or if you have files at `./src/dist/dist.ts`, then this will\n * not work properly!\n *\n * The default `pathFromSrc` option assumes that the calling code lives one\n * folder below the root of the package. Otherwise, it must be specified.\n *\n * Example:\n *\n * ```ts\n * // src/index.ts\n * import { loadPackageJson } from 'package-json-from-dist'\n *\n * const pj = loadPackageJson(import.meta.url)\n * console.log(`Hello from ${pj.name}@${pj.version}`)\n * ```\n *\n * If the caller is deeper within the project source, then you must provide\n * the appropriate fallback path:\n *\n * ```ts\n * // src/components/something.ts\n * import { loadPackageJson } from 'package-json-from-dist'\n *\n * const pj = loadPackageJson(import.meta.url, '../../package.json')\n * console.log(`Hello from ${pj.name}@${pj.version}`)\n * ```\n *\n * When running from CommmonJS, use `__filename` instead of `import.meta.url`\n *\n * ```ts\n * // src/index.cts\n * import { loadPackageJson } from 'package-json-from-dist'\n *\n * const pj = loadPackageJson(__filename)\n * console.log(`Hello from ${pj.name}@${pj.version}`)\n * ```\n */\nexport const loadPackageJson = (\n  from: string | URL,\n  pathFromSrc: string = '../package.json',\n) =>\n  JSON.parse(readFileSync(findPackageJson(from, pathFromSrc), 'utf8'))\n"]}
              \ No newline at end of file
              diff --git a/node_modules/package-json-from-dist/dist/commonjs/package.json b/node_modules/package-json-from-dist/dist/commonjs/package.json
              deleted file mode 100644
              index 5bbefffb..00000000
              --- a/node_modules/package-json-from-dist/dist/commonjs/package.json
              +++ /dev/null
              @@ -1,3 +0,0 @@
              -{
              -  "type": "commonjs"
              -}
              diff --git a/node_modules/package-json-from-dist/dist/esm/index.d.ts b/node_modules/package-json-from-dist/dist/esm/index.d.ts
              deleted file mode 100644
              index d486ffd2..00000000
              --- a/node_modules/package-json-from-dist/dist/esm/index.d.ts
              +++ /dev/null
              @@ -1,89 +0,0 @@
              -/**
              - * Find the package.json file, either from a TypeScript file somewhere not
              - * in a 'dist' folder, or a built and/or installed 'dist' folder.
              - *
              - * Note: this *only* works if you build your code into `'./dist'`, and that the
              - * source path does not also contain `'dist'`! If you don't build into
              - * `'./dist'`, or if you have files at `./src/dist/dist.ts`, then this will
              - * not work properly!
              - *
              - * The default `pathFromSrc` option assumes that the calling code lives one
              - * folder below the root of the package. Otherwise, it must be specified.
              - *
              - * Example:
              - *
              - * ```ts
              - * // src/index.ts
              - * import { findPackageJson } from 'package-json-from-dist'
              - *
              - * const pj = findPackageJson(import.meta.url)
              - * console.log(`package.json found at ${pj}`)
              - * ```
              - *
              - * If the caller is deeper within the project source, then you must provide
              - * the appropriate fallback path:
              - *
              - * ```ts
              - * // src/components/something.ts
              - * import { findPackageJson } from 'package-json-from-dist'
              - *
              - * const pj = findPackageJson(import.meta.url, '../../package.json')
              - * console.log(`package.json found at ${pj}`)
              - * ```
              - *
              - * When running from CommmonJS, use `__filename` instead of `import.meta.url`
              - *
              - * ```ts
              - * // src/index.cts
              - * import { findPackageJson } from 'package-json-from-dist'
              - *
              - * const pj = findPackageJson(__filename)
              - * console.log(`package.json found at ${pj}`)
              - * ```
              - */
              -export declare const findPackageJson: (from: string | URL, pathFromSrc?: string) => string;
              -/**
              - * Load the package.json file, either from a TypeScript file somewhere not
              - * in a 'dist' folder, or a built and/or installed 'dist' folder.
              - *
              - * Note: this *only* works if you build your code into `'./dist'`, and that the
              - * source path does not also contain `'dist'`! If you don't build into
              - * `'./dist'`, or if you have files at `./src/dist/dist.ts`, then this will
              - * not work properly!
              - *
              - * The default `pathFromSrc` option assumes that the calling code lives one
              - * folder below the root of the package. Otherwise, it must be specified.
              - *
              - * Example:
              - *
              - * ```ts
              - * // src/index.ts
              - * import { loadPackageJson } from 'package-json-from-dist'
              - *
              - * const pj = loadPackageJson(import.meta.url)
              - * console.log(`Hello from ${pj.name}@${pj.version}`)
              - * ```
              - *
              - * If the caller is deeper within the project source, then you must provide
              - * the appropriate fallback path:
              - *
              - * ```ts
              - * // src/components/something.ts
              - * import { loadPackageJson } from 'package-json-from-dist'
              - *
              - * const pj = loadPackageJson(import.meta.url, '../../package.json')
              - * console.log(`Hello from ${pj.name}@${pj.version}`)
              - * ```
              - *
              - * When running from CommmonJS, use `__filename` instead of `import.meta.url`
              - *
              - * ```ts
              - * // src/index.cts
              - * import { loadPackageJson } from 'package-json-from-dist'
              - *
              - * const pj = loadPackageJson(__filename)
              - * console.log(`Hello from ${pj.name}@${pj.version}`)
              - * ```
              - */
              -export declare const loadPackageJson: (from: string | URL, pathFromSrc?: string) => any;
              -//# sourceMappingURL=index.d.ts.map
              \ No newline at end of file
              diff --git a/node_modules/package-json-from-dist/dist/esm/index.d.ts.map b/node_modules/package-json-from-dist/dist/esm/index.d.ts.map
              deleted file mode 100644
              index ca3e21c7..00000000
              --- a/node_modules/package-json-from-dist/dist/esm/index.d.ts.map
              +++ /dev/null
              @@ -1 +0,0 @@
              -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AASA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,eAAO,MAAM,eAAe,SACpB,MAAM,GAAG,GAAG,gBACL,MAAM,KAClB,MAsCF,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,eAAO,MAAM,eAAe,SACpB,MAAM,GAAG,GAAG,gBACL,MAAM,QAEiD,CAAA"}
              \ No newline at end of file
              diff --git a/node_modules/package-json-from-dist/dist/esm/index.js b/node_modules/package-json-from-dist/dist/esm/index.js
              deleted file mode 100644
              index 426ad3c2..00000000
              --- a/node_modules/package-json-from-dist/dist/esm/index.js
              +++ /dev/null
              @@ -1,129 +0,0 @@
              -import { readFileSync } from 'node:fs';
              -import { dirname, resolve, sep } from 'node:path';
              -import { fileURLToPath } from 'node:url';
              -const NM = `${sep}node_modules${sep}`;
              -const STORE = `.store${sep}`;
              -const PKG = `${sep}package${sep}`;
              -const DIST = `${sep}dist${sep}`;
              -/**
              - * Find the package.json file, either from a TypeScript file somewhere not
              - * in a 'dist' folder, or a built and/or installed 'dist' folder.
              - *
              - * Note: this *only* works if you build your code into `'./dist'`, and that the
              - * source path does not also contain `'dist'`! If you don't build into
              - * `'./dist'`, or if you have files at `./src/dist/dist.ts`, then this will
              - * not work properly!
              - *
              - * The default `pathFromSrc` option assumes that the calling code lives one
              - * folder below the root of the package. Otherwise, it must be specified.
              - *
              - * Example:
              - *
              - * ```ts
              - * // src/index.ts
              - * import { findPackageJson } from 'package-json-from-dist'
              - *
              - * const pj = findPackageJson(import.meta.url)
              - * console.log(`package.json found at ${pj}`)
              - * ```
              - *
              - * If the caller is deeper within the project source, then you must provide
              - * the appropriate fallback path:
              - *
              - * ```ts
              - * // src/components/something.ts
              - * import { findPackageJson } from 'package-json-from-dist'
              - *
              - * const pj = findPackageJson(import.meta.url, '../../package.json')
              - * console.log(`package.json found at ${pj}`)
              - * ```
              - *
              - * When running from CommmonJS, use `__filename` instead of `import.meta.url`
              - *
              - * ```ts
              - * // src/index.cts
              - * import { findPackageJson } from 'package-json-from-dist'
              - *
              - * const pj = findPackageJson(__filename)
              - * console.log(`package.json found at ${pj}`)
              - * ```
              - */
              -export const findPackageJson = (from, pathFromSrc = '../package.json') => {
              -    const f = typeof from === 'object' || from.startsWith('file://') ?
              -        fileURLToPath(from)
              -        : from;
              -    const __dirname = dirname(f);
              -    const nms = __dirname.lastIndexOf(NM);
              -    if (nms !== -1) {
              -        // inside of node_modules. find the dist directly under package name.
              -        const nm = __dirname.substring(0, nms + NM.length);
              -        const pkgDir = __dirname.substring(nms + NM.length);
              -        // affordance for yarn berry, which puts package contents in
              -        // '.../node_modules/.store/${id}-${hash}/package/...'
              -        if (pkgDir.startsWith(STORE)) {
              -            const pkg = pkgDir.indexOf(PKG, STORE.length);
              -            if (pkg) {
              -                return resolve(nm, pkgDir.substring(0, pkg + PKG.length), 'package.json');
              -            }
              -        }
              -        const pkgName = pkgDir.startsWith('@') ?
              -            pkgDir.split(sep, 2).join(sep)
              -            : String(pkgDir.split(sep)[0]);
              -        return resolve(nm, pkgName, 'package.json');
              -    }
              -    else {
              -        // see if we are in a dist folder.
              -        const d = __dirname.lastIndexOf(DIST);
              -        if (d !== -1) {
              -            return resolve(__dirname.substring(0, d), 'package.json');
              -        }
              -        else {
              -            return resolve(__dirname, pathFromSrc);
              -        }
              -    }
              -};
              -/**
              - * Load the package.json file, either from a TypeScript file somewhere not
              - * in a 'dist' folder, or a built and/or installed 'dist' folder.
              - *
              - * Note: this *only* works if you build your code into `'./dist'`, and that the
              - * source path does not also contain `'dist'`! If you don't build into
              - * `'./dist'`, or if you have files at `./src/dist/dist.ts`, then this will
              - * not work properly!
              - *
              - * The default `pathFromSrc` option assumes that the calling code lives one
              - * folder below the root of the package. Otherwise, it must be specified.
              - *
              - * Example:
              - *
              - * ```ts
              - * // src/index.ts
              - * import { loadPackageJson } from 'package-json-from-dist'
              - *
              - * const pj = loadPackageJson(import.meta.url)
              - * console.log(`Hello from ${pj.name}@${pj.version}`)
              - * ```
              - *
              - * If the caller is deeper within the project source, then you must provide
              - * the appropriate fallback path:
              - *
              - * ```ts
              - * // src/components/something.ts
              - * import { loadPackageJson } from 'package-json-from-dist'
              - *
              - * const pj = loadPackageJson(import.meta.url, '../../package.json')
              - * console.log(`Hello from ${pj.name}@${pj.version}`)
              - * ```
              - *
              - * When running from CommmonJS, use `__filename` instead of `import.meta.url`
              - *
              - * ```ts
              - * // src/index.cts
              - * import { loadPackageJson } from 'package-json-from-dist'
              - *
              - * const pj = loadPackageJson(__filename)
              - * console.log(`Hello from ${pj.name}@${pj.version}`)
              - * ```
              - */
              -export const loadPackageJson = (from, pathFromSrc = '../package.json') => JSON.parse(readFileSync(findPackageJson(from, pathFromSrc), 'utf8'));
              -//# sourceMappingURL=index.js.map
              \ No newline at end of file
              diff --git a/node_modules/package-json-from-dist/dist/esm/index.js.map b/node_modules/package-json-from-dist/dist/esm/index.js.map
              deleted file mode 100644
              index 53b6ce7a..00000000
              --- a/node_modules/package-json-from-dist/dist/esm/index.js.map
              +++ /dev/null
              @@ -1 +0,0 @@
              -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAA;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAExC,MAAM,EAAE,GAAG,GAAG,GAAG,eAAe,GAAG,EAAE,CAAA;AACrC,MAAM,KAAK,GAAG,SAAS,GAAG,EAAE,CAAA;AAC5B,MAAM,GAAG,GAAG,GAAG,GAAG,UAAU,GAAG,EAAE,CAAA;AACjC,MAAM,IAAI,GAAG,GAAG,GAAG,OAAO,GAAG,EAAE,CAAA;AAE/B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAC7B,IAAkB,EAClB,cAAsB,iBAAiB,EAC/B,EAAE;IACV,MAAM,CAAC,GACL,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC;QACtD,aAAa,CAAC,IAAI,CAAC;QACrB,CAAC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OAAO,OAAO,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,cAAc,CAAC,CAAA;QAC3D,CAAC;aAAM,CAAC;YACN,OAAO,OAAO,CAAC,SAAS,EAAE,WAAW,CAAC,CAAA;QACxC,CAAC;IACH,CAAC;AACH,CAAC,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAC7B,IAAkB,EAClB,cAAsB,iBAAiB,EACvC,EAAE,CACF,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,eAAe,CAAC,IAAI,EAAE,WAAW,CAAC,EAAE,MAAM,CAAC,CAAC,CAAA","sourcesContent":["import { readFileSync } from 'node:fs'\nimport { dirname, resolve, sep } from 'node:path'\nimport { fileURLToPath } from 'node:url'\n\nconst NM = `${sep}node_modules${sep}`\nconst STORE = `.store${sep}`\nconst PKG = `${sep}package${sep}`\nconst DIST = `${sep}dist${sep}`\n\n/**\n * Find the package.json file, either from a TypeScript file somewhere not\n * in a 'dist' folder, or a built and/or installed 'dist' folder.\n *\n * Note: this *only* works if you build your code into `'./dist'`, and that the\n * source path does not also contain `'dist'`! If you don't build into\n * `'./dist'`, or if you have files at `./src/dist/dist.ts`, then this will\n * not work properly!\n *\n * The default `pathFromSrc` option assumes that the calling code lives one\n * folder below the root of the package. Otherwise, it must be specified.\n *\n * Example:\n *\n * ```ts\n * // src/index.ts\n * import { findPackageJson } from 'package-json-from-dist'\n *\n * const pj = findPackageJson(import.meta.url)\n * console.log(`package.json found at ${pj}`)\n * ```\n *\n * If the caller is deeper within the project source, then you must provide\n * the appropriate fallback path:\n *\n * ```ts\n * // src/components/something.ts\n * import { findPackageJson } from 'package-json-from-dist'\n *\n * const pj = findPackageJson(import.meta.url, '../../package.json')\n * console.log(`package.json found at ${pj}`)\n * ```\n *\n * When running from CommmonJS, use `__filename` instead of `import.meta.url`\n *\n * ```ts\n * // src/index.cts\n * import { findPackageJson } from 'package-json-from-dist'\n *\n * const pj = findPackageJson(__filename)\n * console.log(`package.json found at ${pj}`)\n * ```\n */\nexport const findPackageJson = (\n  from: string | URL,\n  pathFromSrc: string = '../package.json',\n): string => {\n  const f =\n    typeof from === 'object' || from.startsWith('file://') ?\n      fileURLToPath(from)\n    : from\n  const __dirname = dirname(f)\n\n  const nms = __dirname.lastIndexOf(NM)\n  if (nms !== -1) {\n    // inside of node_modules. find the dist directly under package name.\n    const nm = __dirname.substring(0, nms + NM.length)\n    const pkgDir = __dirname.substring(nms + NM.length)\n    // affordance for yarn berry, which puts package contents in\n    // '.../node_modules/.store/${id}-${hash}/package/...'\n    if (pkgDir.startsWith(STORE)) {\n      const pkg = pkgDir.indexOf(PKG, STORE.length)\n      if (pkg) {\n        return resolve(\n          nm,\n          pkgDir.substring(0, pkg + PKG.length),\n          'package.json',\n        )\n      }\n    }\n    const pkgName =\n      pkgDir.startsWith('@') ?\n        pkgDir.split(sep, 2).join(sep)\n      : String(pkgDir.split(sep)[0])\n    return resolve(nm, pkgName, 'package.json')\n  } else {\n    // see if we are in a dist folder.\n    const d = __dirname.lastIndexOf(DIST)\n    if (d !== -1) {\n      return resolve(__dirname.substring(0, d), 'package.json')\n    } else {\n      return resolve(__dirname, pathFromSrc)\n    }\n  }\n}\n\n/**\n * Load the package.json file, either from a TypeScript file somewhere not\n * in a 'dist' folder, or a built and/or installed 'dist' folder.\n *\n * Note: this *only* works if you build your code into `'./dist'`, and that the\n * source path does not also contain `'dist'`! If you don't build into\n * `'./dist'`, or if you have files at `./src/dist/dist.ts`, then this will\n * not work properly!\n *\n * The default `pathFromSrc` option assumes that the calling code lives one\n * folder below the root of the package. Otherwise, it must be specified.\n *\n * Example:\n *\n * ```ts\n * // src/index.ts\n * import { loadPackageJson } from 'package-json-from-dist'\n *\n * const pj = loadPackageJson(import.meta.url)\n * console.log(`Hello from ${pj.name}@${pj.version}`)\n * ```\n *\n * If the caller is deeper within the project source, then you must provide\n * the appropriate fallback path:\n *\n * ```ts\n * // src/components/something.ts\n * import { loadPackageJson } from 'package-json-from-dist'\n *\n * const pj = loadPackageJson(import.meta.url, '../../package.json')\n * console.log(`Hello from ${pj.name}@${pj.version}`)\n * ```\n *\n * When running from CommmonJS, use `__filename` instead of `import.meta.url`\n *\n * ```ts\n * // src/index.cts\n * import { loadPackageJson } from 'package-json-from-dist'\n *\n * const pj = loadPackageJson(__filename)\n * console.log(`Hello from ${pj.name}@${pj.version}`)\n * ```\n */\nexport const loadPackageJson = (\n  from: string | URL,\n  pathFromSrc: string = '../package.json',\n) =>\n  JSON.parse(readFileSync(findPackageJson(from, pathFromSrc), 'utf8'))\n"]}
              \ No newline at end of file
              diff --git a/node_modules/package-json-from-dist/dist/esm/package.json b/node_modules/package-json-from-dist/dist/esm/package.json
              deleted file mode 100644
              index 3dbc1ca5..00000000
              --- a/node_modules/package-json-from-dist/dist/esm/package.json
              +++ /dev/null
              @@ -1,3 +0,0 @@
              -{
              -  "type": "module"
              -}
              diff --git a/node_modules/package-json-from-dist/package.json b/node_modules/package-json-from-dist/package.json
              deleted file mode 100644
              index a2d03c32..00000000
              --- a/node_modules/package-json-from-dist/package.json
              +++ /dev/null
              @@ -1,68 +0,0 @@
              -{
              -  "name": "package-json-from-dist",
              -  "version": "1.0.1",
              -  "description": "Load the local package.json from either src or dist folder",
              -  "main": "./dist/commonjs/index.js",
              -  "exports": {
              -    "./package.json": "./package.json",
              -    ".": {
              -      "import": {
              -        "types": "./dist/esm/index.d.ts",
              -        "default": "./dist/esm/index.js"
              -      },
              -      "require": {
              -        "types": "./dist/commonjs/index.d.ts",
              -        "default": "./dist/commonjs/index.js"
              -      }
              -    }
              -  },
              -  "files": [
              -    "dist"
              -  ],
              -  "scripts": {
              -    "preversion": "npm test",
              -    "postversion": "npm publish",
              -    "prepublishOnly": "git push origin --follow-tags",
              -    "prepare": "tshy",
              -    "pretest": "npm run prepare",
              -    "presnap": "npm run prepare",
              -    "test": "tap",
              -    "snap": "tap",
              -    "format": "prettier --write . --log-level warn",
              -    "typedoc": "typedoc"
              -  },
              -  "author": "Isaac Z. Schlueter  (https://izs.me)",
              -  "license": "BlueOak-1.0.0",
              -  "repository": {
              -    "type": "git",
              -    "url": "git+https://github.com/isaacs/package-json-from-dist.git"
              -  },
              -  "devDependencies": {
              -    "@types/node": "^20.12.12",
              -    "prettier": "^3.2.5",
              -    "tap": "^18.5.3",
              -    "typedoc": "^0.24.8",
              -    "typescript": "^5.1.6",
              -    "tshy": "^1.14.0"
              -  },
              -  "prettier": {
              -    "semi": false,
              -    "printWidth": 70,
              -    "tabWidth": 2,
              -    "useTabs": false,
              -    "singleQuote": true,
              -    "jsxSingleQuote": false,
              -    "bracketSameLine": true,
              -    "arrowParens": "avoid",
              -    "endOfLine": "lf",
              -    "experimentalTernaries": true
              -  },
              -  "tshy": {
              -    "exports": {
              -      "./package.json": "./package.json",
              -      ".": "./src/index.ts"
              -    }
              -  },
              -  "types": "./dist/commonjs/index.d.ts",
              -  "type": "module"
              -}
              diff --git a/node_modules/path-scurry/LICENSE.md b/node_modules/path-scurry/LICENSE.md
              deleted file mode 100644
              index c5402b95..00000000
              --- a/node_modules/path-scurry/LICENSE.md
              +++ /dev/null
              @@ -1,55 +0,0 @@
              -# Blue Oak Model License
              -
              -Version 1.0.0
              -
              -## Purpose
              -
              -This license gives everyone as much permission to work with
              -this software as possible, while protecting contributors
              -from liability.
              -
              -## Acceptance
              -
              -In order to receive this license, you must agree to its
              -rules.  The rules of this license are both obligations
              -under that agreement and conditions to your license.
              -You must not do anything with this software that triggers
              -a rule that you cannot or will not follow.
              -
              -## Copyright
              -
              -Each contributor licenses you to do everything with this
              -software that would otherwise infringe that contributor's
              -copyright in it.
              -
              -## Notices
              -
              -You must ensure that everyone who gets a copy of
              -any part of this software from you, with or without
              -changes, also gets the text of this license or a link to
              -.
              -
              -## Excuse
              -
              -If anyone notifies you in writing that you have not
              -complied with [Notices](#notices), you can keep your
              -license by taking all practical steps to comply within 30
              -days after the notice.  If you do not do so, your license
              -ends immediately.
              -
              -## Patent
              -
              -Each contributor licenses you to do everything with this
              -software that would otherwise infringe any patent claims
              -they can license or become able to license.
              -
              -## Reliability
              -
              -No contributor can revoke this license.
              -
              -## No Liability
              -
              -***As far as the law allows, this software comes as is,
              -without any warranty or condition, and no contributor
              -will be liable to anyone for any damages related to this
              -software or this license, under any kind of legal claim.***
              diff --git a/node_modules/path-scurry/README.md b/node_modules/path-scurry/README.md
              deleted file mode 100644
              index b5cb495c..00000000
              --- a/node_modules/path-scurry/README.md
              +++ /dev/null
              @@ -1,636 +0,0 @@
              -# path-scurry
              -
              -Extremely high performant utility for building tools that read
              -the file system, minimizing filesystem and path string munging
              -operations to the greatest degree possible.
              -
              -## Ugh, yet another file traversal thing on npm?
              -
              -Yes. None of the existing ones gave me exactly what I wanted.
              -
              -## Well what is it you wanted?
              -
              -While working on [glob](http://npm.im/glob), I found that I
              -needed a module to very efficiently manage the traversal over a
              -folder tree, such that:
              -
              -1. No `readdir()` or `stat()` would ever be called on the same
              -   file or directory more than one time.
              -2. No `readdir()` calls would be made if we can be reasonably
              -   sure that the path is not a directory. (Ie, a previous
              -   `readdir()` or `stat()` covered the path, and
              -   `ent.isDirectory()` is false.)
              -3. `path.resolve()`, `dirname()`, `basename()`, and other
              -   string-parsing/munging operations are be minimized. This means
              -   it has to track "provisional" child nodes that may not exist
              -   (and if we find that they _don't_ exist, store that
              -   information as well, so we don't have to ever check again).
              -4. The API is not limited to use as a stream/iterator/etc. There
              -   are many cases where an API like node's `fs` is preferrable.
              -5. It's more important to prevent excess syscalls than to be up
              -   to date, but it should be smart enough to know what it
              -   _doesn't_ know, and go get it seamlessly when requested.
              -6. Do not blow up the JS heap allocation if operating on a
              -   directory with a huge number of entries.
              -7. Handle all the weird aspects of Windows paths, like UNC paths
              -   and drive letters and wrongway slashes, so that the consumer
              -   can return canonical platform-specific paths without having to
              -   parse or join or do any error-prone string munging.
              -
              -## PERFORMANCE
              -
              -JavaScript people throw around the word "blazing" a lot. I hope
              -that this module doesn't blaze anyone. But it does go very fast,
              -in the cases it's optimized for, if used properly.
              -
              -PathScurry provides ample opportunities to get extremely good
              -performance, as well as several options to trade performance for
              -convenience.
              -
              -Benchmarks can be run by executing `npm run bench`.
              -
              -As is always the case, doing more means going slower, doing less
              -means going faster, and there are trade offs between speed and
              -memory usage.
              -
              -PathScurry makes heavy use of [LRUCache](http://npm.im/lru-cache)
              -to efficiently cache whatever it can, and `Path` objects remain
              -in the graph for the lifetime of the walker, so repeated calls
              -with a single PathScurry object will be extremely fast. However,
              -adding items to a cold cache means "doing more", so in those
              -cases, we pay a price. Nothing is free, but every effort has been
              -made to reduce costs wherever possible.
              -
              -Also, note that a "cache as long as possible" approach means that
              -changes to the filesystem may not be reflected in the results of
              -repeated PathScurry operations.
              -
              -For resolving string paths, `PathScurry` ranges from 5-50 times
              -faster than `path.resolve` on repeated resolutions, but around
              -100 to 1000 times _slower_ on the first resolution. If your
              -program is spending a lot of time resolving the _same_ paths
              -repeatedly (like, thousands or millions of times), then this can
              -be beneficial. But both implementations are pretty fast, and
              -speeding up an infrequent operation from 4µs to 400ns is not
              -going to move the needle on your app's performance.
              -
              -For walking file system directory trees, a lot depends on how
              -often a given PathScurry object will be used, and also on the
              -walk method used.
              -
              -With default settings on a folder tree of 100,000 items,
              -consisting of around a 10-to-1 ratio of normal files to
              -directories, PathScurry performs comparably to
              -[@nodelib/fs.walk](http://npm.im/@nodelib/fs.walk), which is the
              -fastest and most reliable file system walker I could find. As far
              -as I can tell, it's almost impossible to go much faster in a
              -Node.js program, just based on how fast you can push syscalls out
              -to the fs thread pool.
              -
              -On my machine, that is about 1000-1200 completed walks per second
              -for async or stream walks, and around 500-600 walks per second
              -synchronously.
              -
              -In the warm cache state, PathScurry's performance increases
              -around 4x for async `for await` iteration, 10-15x faster for
              -streams and synchronous `for of` iteration, and anywhere from 30x
              -to 80x faster for the rest.
              -
              -```
              -# walk 100,000 fs entries, 10/1 file/dir ratio
              -# operations / ms
              - New PathScurry object  |  Reuse PathScurry object
              -     stream:  1112.589  |  13974.917
              -sync stream:   492.718  |  15028.343
              - async walk:  1095.648  |  32706.395
              -  sync walk:   527.632  |  46129.772
              - async iter:  1288.821  |   5045.510
              -  sync iter:   498.496  |  17920.746
              -```
              -
              -A hand-rolled walk calling `entry.readdir()` and recursing
              -through the entries can benefit even more from caching, with
              -greater flexibility and without the overhead of streams or
              -generators.
              -
              -The cold cache state is still limited by the costs of file system
              -operations, but with a warm cache, the only bottleneck is CPU
              -speed and VM optimizations. Of course, in that case, some care
              -must be taken to ensure that you don't lose performance as a
              -result of silly mistakes, like calling `readdir()` on entries
              -that you know are not directories.
              -
              -```
              -# manual recursive iteration functions
              -      cold cache  |  warm cache
              -async:  1164.901  |  17923.320
              -   cb:  1101.127  |  40999.344
              -zalgo:  1082.240  |  66689.936
              - sync:   526.935  |  87097.591
              -```
              -
              -In this case, the speed improves by around 10-20x in the async
              -case, 40x in the case of using `entry.readdirCB` with protections
              -against synchronous callbacks, and 50-100x with callback
              -deferrals disabled, and _several hundred times faster_ for
              -synchronous iteration.
              -
              -If you can think of a case that is not covered in these
              -benchmarks, or an implementation that performs significantly
              -better than PathScurry, please [let me
              -know](https://github.com/isaacs/path-scurry/issues).
              -
              -## USAGE
              -
              -```ts
              -// hybrid module, load with either method
              -import { PathScurry, Path } from 'path-scurry'
              -// or:
              -const { PathScurry, Path } = require('path-scurry')
              -
              -// very simple example, say we want to find and
              -// delete all the .DS_Store files in a given path
              -// note that the API is very similar to just a
              -// naive walk with fs.readdir()
              -import { unlink } from 'fs/promises'
              -
              -// easy way, iterate over the directory and do the thing
              -const pw = new PathScurry(process.cwd())
              -for await (const entry of pw) {
              -  if (entry.isFile() && entry.name === '.DS_Store') {
              -    unlink(entry.fullpath())
              -  }
              -}
              -
              -// here it is as a manual recursive method
              -const walk = async (entry: Path) => {
              -  const promises: Promise = []
              -  // readdir doesn't throw on non-directories, it just doesn't
              -  // return any entries, to save stack trace costs.
              -  // Items are returned in arbitrary unsorted order
              -  for (const child of await pw.readdir(entry)) {
              -    // each child is a Path object
              -    if (child.name === '.DS_Store' && child.isFile()) {
              -      // could also do pw.resolve(entry, child.name),
              -      // just like fs.readdir walking, but .fullpath is
              -      // a *slightly* more efficient shorthand.
              -      promises.push(unlink(child.fullpath()))
              -    } else if (child.isDirectory()) {
              -      promises.push(walk(child))
              -    }
              -  }
              -  return Promise.all(promises)
              -}
              -
              -walk(pw.cwd).then(() => {
              -  console.log('all .DS_Store files removed')
              -})
              -
              -const pw2 = new PathScurry('/a/b/c') // pw2.cwd is the Path for /a/b/c
              -const relativeDir = pw2.cwd.resolve('../x') // Path entry for '/a/b/x'
              -const relative2 = pw2.cwd.resolve('/a/b/d/../x') // same path, same entry
              -assert.equal(relativeDir, relative2)
              -```
              -
              -## API
              -
              -[Full TypeDoc API](https://isaacs.github.io/path-scurry)
              -
              -There are platform-specific classes exported, but for the most
              -part, the default `PathScurry` and `Path` exports are what you
              -most likely need, unless you are testing behavior for other
              -platforms.
              -
              -Intended public API is documented here, but the full
              -documentation does include internal types, which should not be
              -accessed directly.
              -
              -### Interface `PathScurryOpts`
              -
              -The type of the `options` argument passed to the `PathScurry`
              -constructor.
              -
              -- `nocase`: Boolean indicating that file names should be compared
              -  case-insensitively. Defaults to `true` on darwin and win32
              -  implementations, `false` elsewhere.
              -
              -  **Warning** Performing case-insensitive matching on a
              -  case-sensitive filesystem will result in occasionally very
              -  bizarre behavior. Performing case-sensitive matching on a
              -  case-insensitive filesystem may negatively impact performance.
              -
              -- `childrenCacheSize`: Number of child entries to cache, in order
              -  to speed up `resolve()` and `readdir()` calls. Defaults to
              -  `16 * 1024` (ie, `16384`).
              -
              -  Setting it to a higher value will run the risk of JS heap
              -  allocation errors on large directory trees. Setting it to `256`
              -  or smaller will significantly reduce the construction time and
              -  data consumption overhead, but with the downside of operations
              -  being slower on large directory trees. Setting it to `0` will
              -  mean that effectively no operations are cached, and this module
              -  will be roughly the same speed as `fs` for file system
              -  operations, and _much_ slower than `path.resolve()` for
              -  repeated path resolution.
              -
              -- `fs` An object that will be used to override the default `fs`
              -  methods. Any methods that are not overridden will use Node's
              -  built-in implementations.
              -
              -  - lstatSync
              -  - readdir (callback `withFileTypes` Dirent variant, used for
              -    readdirCB and most walks)
              -  - readdirSync
              -  - readlinkSync
              -  - realpathSync
              -  - promises: Object containing the following async methods:
              -    - lstat
              -    - readdir (Dirent variant only)
              -    - readlink
              -    - realpath
              -
              -### Interface `WalkOptions`
              -
              -The options object that may be passed to all walk methods.
              -
              -- `withFileTypes`: Boolean, default true. Indicates that `Path`
              -  objects should be returned. Set to `false` to get string paths
              -  instead.
              -- `follow`: Boolean, default false. Attempt to read directory
              -  entries from symbolic links. Otherwise, only actual directories
              -  are traversed. Regardless of this setting, a given target path
              -  will only ever be walked once, meaning that a symbolic link to
              -  a previously traversed directory will never be followed.
              -
              -  Setting this imposes a slight performance penalty, because
              -  `readlink` must be called on all symbolic links encountered, in
              -  order to avoid infinite cycles.
              -
              -- `filter`: Function `(entry: Path) => boolean`. If provided,
              -  will prevent the inclusion of any entry for which it returns a
              -  falsey value. This will not prevent directories from being
              -  traversed if they do not pass the filter, though it will
              -  prevent the directories themselves from being included in the
              -  results. By default, if no filter is provided, then all entries
              -  are included in the results.
              -- `walkFilter`: Function `(entry: Path) => boolean`. If provided,
              -  will prevent the traversal of any directory (or in the case of
              -  `follow:true` symbolic links to directories) for which the
              -  function returns false. This will not prevent the directories
              -  themselves from being included in the result set. Use `filter`
              -  for that.
              -
              -Note that TypeScript return types will only be inferred properly
              -from static analysis if the `withFileTypes` option is omitted, or
              -a constant `true` or `false` value.
              -
              -### Class `PathScurry`
              -
              -The main interface. Defaults to an appropriate class based on the
              -current platform.
              -
              -Use `PathScurryWin32`, `PathScurryDarwin`, or `PathScurryPosix`
              -if implementation-specific behavior is desired.
              -
              -All walk methods may be called with a `WalkOptions` argument to
              -walk over the object's current working directory with the
              -supplied options.
              -
              -#### `async pw.walk(entry?: string | Path | WalkOptions, opts?: WalkOptions)`
              -
              -Walk the directory tree according to the options provided,
              -resolving to an array of all entries found.
              -
              -#### `pw.walkSync(entry?: string | Path | WalkOptions, opts?: WalkOptions)`
              -
              -Walk the directory tree according to the options provided,
              -returning an array of all entries found.
              -
              -#### `pw.iterate(entry?: string | Path | WalkOptions, opts?: WalkOptions)`
              -
              -Iterate over the directory asynchronously, for use with `for
              -await of`. This is also the default async iterator method.
              -
              -#### `pw.iterateSync(entry?: string | Path | WalkOptions, opts?: WalkOptions)`
              -
              -Iterate over the directory synchronously, for use with `for of`.
              -This is also the default sync iterator method.
              -
              -#### `pw.stream(entry?: string | Path | WalkOptions, opts?: WalkOptions)`
              -
              -Return a [Minipass](http://npm.im/minipass) stream that emits
              -each entry or path string in the walk. Results are made available
              -asynchronously.
              -
              -#### `pw.streamSync(entry?: string | Path | WalkOptions, opts?: WalkOptions)`
              -
              -Return a [Minipass](http://npm.im/minipass) stream that emits
              -each entry or path string in the walk. Results are made available
              -synchronously, meaning that the walk will complete in a single
              -tick if the stream is fully consumed.
              -
              -#### `pw.cwd`
              -
              -Path object representing the current working directory for the
              -PathScurry.
              -
              -#### `pw.chdir(path: string)`
              -
              -Set the new effective current working directory for the scurry
              -object, so that `path.relative()` and `path.relativePosix()`
              -return values relative to the new cwd path.
              -
              -#### `pw.depth(path?: Path | string): number`
              -
              -Return the depth of the specified path (or the PathScurry cwd)
              -within the directory tree.
              -
              -Root entries have a depth of `0`.
              -
              -#### `pw.resolve(...paths: string[])`
              -
              -Caching `path.resolve()`.
              -
              -Significantly faster than `path.resolve()` if called repeatedly
              -with the same paths. Significantly slower otherwise, as it builds
              -out the cached Path entries.
              -
              -To get a `Path` object resolved from the `PathScurry`, use
              -`pw.cwd.resolve(path)`. Note that `Path.resolve` only takes a
              -single string argument, not multiple.
              -
              -#### `pw.resolvePosix(...paths: string[])`
              -
              -Caching `path.resolve()`, but always using posix style paths.
              -
              -This is identical to `pw.resolve(...paths)` on posix systems (ie,
              -everywhere except Windows).
              -
              -On Windows, it returns the full absolute UNC path using `/`
              -separators. Ie, instead of `'C:\\foo\\bar`, it would return
              -`//?/C:/foo/bar`.
              -
              -#### `pw.relative(path: string | Path): string`
              -
              -Return the relative path from the PathWalker cwd to the supplied
              -path string or entry.
              -
              -If the nearest common ancestor is the root, then an absolute path
              -is returned.
              -
              -#### `pw.relativePosix(path: string | Path): string`
              -
              -Return the relative path from the PathWalker cwd to the supplied
              -path string or entry, using `/` path separators.
              -
              -If the nearest common ancestor is the root, then an absolute path
              -is returned.
              -
              -On posix platforms (ie, all platforms except Windows), this is
              -identical to `pw.relative(path)`.
              -
              -On Windows systems, it returns the resulting string as a
              -`/`-delimited path. If an absolute path is returned (because the
              -target does not share a common ancestor with `pw.cwd`), then a
              -full absolute UNC path will be returned. Ie, instead of
              -`'C:\\foo\\bar`, it would return `//?/C:/foo/bar`.
              -
              -#### `pw.basename(path: string | Path): string`
              -
              -Return the basename of the provided string or Path.
              -
              -#### `pw.dirname(path: string | Path): string`
              -
              -Return the parent directory of the supplied string or Path.
              -
              -#### `async pw.readdir(dir = pw.cwd, opts = { withFileTypes: true })`
              -
              -Read the directory and resolve to an array of strings if
              -`withFileTypes` is explicitly set to `false` or Path objects
              -otherwise.
              -
              -Can be called as `pw.readdir({ withFileTypes: boolean })` as
              -well.
              -
              -Returns `[]` if no entries are found, or if any error occurs.
              -
              -Note that TypeScript return types will only be inferred properly
              -from static analysis if the `withFileTypes` option is omitted, or
              -a constant `true` or `false` value.
              -
              -#### `pw.readdirSync(dir = pw.cwd, opts = { withFileTypes: true })`
              -
              -Synchronous `pw.readdir()`
              -
              -#### `async pw.readlink(link = pw.cwd, opts = { withFileTypes: false })`
              -
              -Call `fs.readlink` on the supplied string or Path object, and
              -return the result.
              -
              -Can be called as `pw.readlink({ withFileTypes: boolean })` as
              -well.
              -
              -Returns `undefined` if any error occurs (for example, if the
              -argument is not a symbolic link), or a `Path` object if
              -`withFileTypes` is explicitly set to `true`, or a string
              -otherwise.
              -
              -Note that TypeScript return types will only be inferred properly
              -from static analysis if the `withFileTypes` option is omitted, or
              -a constant `true` or `false` value.
              -
              -#### `pw.readlinkSync(link = pw.cwd, opts = { withFileTypes: false })`
              -
              -Synchronous `pw.readlink()`
              -
              -#### `async pw.lstat(entry = pw.cwd)`
              -
              -Call `fs.lstat` on the supplied string or Path object, and fill
              -in as much information as possible, returning the updated `Path`
              -object.
              -
              -Returns `undefined` if the entry does not exist, or if any error
              -is encountered.
              -
              -Note that some `Stats` data (such as `ino`, `dev`, and `mode`)
              -will not be supplied. For those things, you'll need to call
              -`fs.lstat` yourself.
              -
              -#### `pw.lstatSync(entry = pw.cwd)`
              -
              -Synchronous `pw.lstat()`
              -
              -#### `pw.realpath(entry = pw.cwd, opts = { withFileTypes: false })`
              -
              -Call `fs.realpath` on the supplied string or Path object, and
              -return the realpath if available.
              -
              -Returns `undefined` if any error occurs.
              -
              -May be called as `pw.realpath({ withFileTypes: boolean })` to run
              -on `pw.cwd`.
              -
              -#### `pw.realpathSync(entry = pw.cwd, opts = { withFileTypes: false })`
              -
              -Synchronous `pw.realpath()`
              -
              -### Class `Path` implements [fs.Dirent](https://nodejs.org/docs/latest/api/fs.html#class-fsdirent)
              -
              -Object representing a given path on the filesystem, which may or
              -may not exist.
              -
              -Note that the actual class in use will be either `PathWin32` or
              -`PathPosix`, depending on the implementation of `PathScurry` in
              -use. They differ in the separators used to split and join path
              -strings, and the handling of root paths.
              -
              -In `PathPosix` implementations, paths are split and joined using
              -the `'/'` character, and `'/'` is the only root path ever in use.
              -
              -In `PathWin32` implementations, paths are split using either
              -`'/'` or `'\\'` and joined using `'\\'`, and multiple roots may
              -be in use based on the drives and UNC paths encountered. UNC
              -paths such as `//?/C:/` that identify a drive letter, will be
              -treated as an alias for the same root entry as their associated
              -drive letter (in this case `'C:\\'`).
              -
              -#### `path.name`
              -
              -Name of this file system entry.
              -
              -**Important**: _always_ test the path name against any test
              -string using the `isNamed` method, and not by directly comparing
              -this string. Otherwise, unicode path strings that the system sees
              -as identical will not be properly treated as the same path,
              -leading to incorrect behavior and possible security issues.
              -
              -#### `path.isNamed(name: string): boolean`
              -
              -Return true if the path is a match for the given path name. This
              -handles case sensitivity and unicode normalization.
              -
              -Note: even on case-sensitive systems, it is **not** safe to test
              -the equality of the `.name` property to determine whether a given
              -pathname matches, due to unicode normalization mismatches.
              -
              -Always use this method instead of testing the `path.name`
              -property directly.
              -
              -#### `path.isCWD`
              -
              -Set to true if this `Path` object is the current working
              -directory of the `PathScurry` collection that contains it.
              -
              -#### `path.getType()`
              -
              -Returns the type of the Path object, `'File'`, `'Directory'`,
              -etc.
              -
              -#### `path.isType(t: type)`
              -
              -Returns true if `is{t}()` returns true.
              -
              -For example, `path.isType('Directory')` is equivalent to
              -`path.isDirectory()`.
              -
              -#### `path.depth()`
              -
              -Return the depth of the Path entry within the directory tree.
              -Root paths have a depth of `0`.
              -
              -#### `path.fullpath()`
              -
              -The fully resolved path to the entry.
              -
              -#### `path.fullpathPosix()`
              -
              -The fully resolved path to the entry, using `/` separators.
              -
              -On posix systems, this is identical to `path.fullpath()`. On
              -windows, this will return a fully resolved absolute UNC path
              -using `/` separators. Eg, instead of `'C:\\foo\\bar'`, it will
              -return `'//?/C:/foo/bar'`.
              -
              -#### `path.isFile()`, `path.isDirectory()`, etc.
              -
              -Same as the identical `fs.Dirent.isX()` methods.
              -
              -#### `path.isUnknown()`
              -
              -Returns true if the path's type is unknown. Always returns true
              -when the path is known to not exist.
              -
              -#### `path.resolve(p: string)`
              -
              -Return a `Path` object associated with the provided path string
              -as resolved from the current Path object.
              -
              -#### `path.relative(): string`
              -
              -Return the relative path from the PathWalker cwd to the supplied
              -path string or entry.
              -
              -If the nearest common ancestor is the root, then an absolute path
              -is returned.
              -
              -#### `path.relativePosix(): string`
              -
              -Return the relative path from the PathWalker cwd to the supplied
              -path string or entry, using `/` path separators.
              -
              -If the nearest common ancestor is the root, then an absolute path
              -is returned.
              -
              -On posix platforms (ie, all platforms except Windows), this is
              -identical to `pw.relative(path)`.
              -
              -On Windows systems, it returns the resulting string as a
              -`/`-delimited path. If an absolute path is returned (because the
              -target does not share a common ancestor with `pw.cwd`), then a
              -full absolute UNC path will be returned. Ie, instead of
              -`'C:\\foo\\bar`, it would return `//?/C:/foo/bar`.
              -
              -#### `async path.readdir()`
              -
              -Return an array of `Path` objects found by reading the associated
              -path entry.
              -
              -If path is not a directory, or if any error occurs, returns `[]`,
              -and marks all children as provisional and non-existent.
              -
              -#### `path.readdirSync()`
              -
              -Synchronous `path.readdir()`
              -
              -#### `async path.readlink()`
              -
              -Return the `Path` object referenced by the `path` as a symbolic
              -link.
              -
              -If the `path` is not a symbolic link, or any error occurs,
              -returns `undefined`.
              -
              -#### `path.readlinkSync()`
              -
              -Synchronous `path.readlink()`
              -
              -#### `async path.lstat()`
              -
              -Call `lstat` on the path object, and fill it in with details
              -determined.
              -
              -If path does not exist, or any other error occurs, returns
              -`undefined`, and marks the path as "unknown" type.
              -
              -#### `path.lstatSync()`
              -
              -Synchronous `path.lstat()`
              -
              -#### `async path.realpath()`
              -
              -Call `realpath` on the path, and return a Path object
              -corresponding to the result, or `undefined` if any error occurs.
              -
              -#### `path.realpathSync()`
              -
              -Synchornous `path.realpath()`
              diff --git a/node_modules/path-scurry/dist/commonjs/index.d.ts b/node_modules/path-scurry/dist/commonjs/index.d.ts
              deleted file mode 100644
              index 3ad4aa5b..00000000
              --- a/node_modules/path-scurry/dist/commonjs/index.d.ts
              +++ /dev/null
              @@ -1,1116 +0,0 @@
              -/// 
              -/// 
              -/// 
              -import { LRUCache } from 'lru-cache';
              -import { posix, win32 } from 'node:path';
              -import { Minipass } from 'minipass';
              -import type { Dirent, Stats } from 'node:fs';
              -/**
              - * An object that will be used to override the default `fs`
              - * methods.  Any methods that are not overridden will use Node's
              - * built-in implementations.
              - *
              - * - lstatSync
              - * - readdir (callback `withFileTypes` Dirent variant, used for
              - *   readdirCB and most walks)
              - * - readdirSync
              - * - readlinkSync
              - * - realpathSync
              - * - promises: Object containing the following async methods:
              - *   - lstat
              - *   - readdir (Dirent variant only)
              - *   - readlink
              - *   - realpath
              - */
              -export interface FSOption {
              -    lstatSync?: (path: string) => Stats;
              -    readdir?: (path: string, options: {
              -        withFileTypes: true;
              -    }, cb: (er: NodeJS.ErrnoException | null, entries?: Dirent[]) => any) => void;
              -    readdirSync?: (path: string, options: {
              -        withFileTypes: true;
              -    }) => Dirent[];
              -    readlinkSync?: (path: string) => string;
              -    realpathSync?: (path: string) => string;
              -    promises?: {
              -        lstat?: (path: string) => Promise;
              -        readdir?: (path: string, options: {
              -            withFileTypes: true;
              -        }) => Promise;
              -        readlink?: (path: string) => Promise;
              -        realpath?: (path: string) => Promise;
              -        [k: string]: any;
              -    };
              -    [k: string]: any;
              -}
              -interface FSValue {
              -    lstatSync: (path: string) => Stats;
              -    readdir: (path: string, options: {
              -        withFileTypes: true;
              -    }, cb: (er: NodeJS.ErrnoException | null, entries?: Dirent[]) => any) => void;
              -    readdirSync: (path: string, options: {
              -        withFileTypes: true;
              -    }) => Dirent[];
              -    readlinkSync: (path: string) => string;
              -    realpathSync: (path: string) => string;
              -    promises: {
              -        lstat: (path: string) => Promise;
              -        readdir: (path: string, options: {
              -            withFileTypes: true;
              -        }) => Promise;
              -        readlink: (path: string) => Promise;
              -        realpath: (path: string) => Promise;
              -        [k: string]: any;
              -    };
              -    [k: string]: any;
              -}
              -export type Type = 'Unknown' | 'FIFO' | 'CharacterDevice' | 'Directory' | 'BlockDevice' | 'File' | 'SymbolicLink' | 'Socket';
              -/**
              - * Options that may be provided to the Path constructor
              - */
              -export interface PathOpts {
              -    fullpath?: string;
              -    relative?: string;
              -    relativePosix?: string;
              -    parent?: PathBase;
              -    /**
              -     * See {@link FSOption}
              -     */
              -    fs?: FSOption;
              -}
              -/**
              - * An LRUCache for storing resolved path strings or Path objects.
              - * @internal
              - */
              -export declare class ResolveCache extends LRUCache {
              -    constructor();
              -}
              -/**
              - * an LRUCache for storing child entries.
              - * @internal
              - */
              -export declare class ChildrenCache extends LRUCache {
              -    constructor(maxSize?: number);
              -}
              -/**
              - * Array of Path objects, plus a marker indicating the first provisional entry
              - *
              - * @internal
              - */
              -export type Children = PathBase[] & {
              -    provisional: number;
              -};
              -declare const setAsCwd: unique symbol;
              -/**
              - * Path objects are sort of like a super-powered
              - * {@link https://nodejs.org/docs/latest/api/fs.html#class-fsdirent fs.Dirent}
              - *
              - * Each one represents a single filesystem entry on disk, which may or may not
              - * exist. It includes methods for reading various types of information via
              - * lstat, readlink, and readdir, and caches all information to the greatest
              - * degree possible.
              - *
              - * Note that fs operations that would normally throw will instead return an
              - * "empty" value. This is in order to prevent excessive overhead from error
              - * stack traces.
              - */
              -export declare abstract class PathBase implements Dirent {
              -    #private;
              -    /**
              -     * the basename of this path
              -     *
              -     * **Important**: *always* test the path name against any test string
              -     * usingthe {@link isNamed} method, and not by directly comparing this
              -     * string. Otherwise, unicode path strings that the system sees as identical
              -     * will not be properly treated as the same path, leading to incorrect
              -     * behavior and possible security issues.
              -     */
              -    name: string;
              -    /**
              -     * the Path entry corresponding to the path root.
              -     *
              -     * @internal
              -     */
              -    root: PathBase;
              -    /**
              -     * All roots found within the current PathScurry family
              -     *
              -     * @internal
              -     */
              -    roots: {
              -        [k: string]: PathBase;
              -    };
              -    /**
              -     * a reference to the parent path, or undefined in the case of root entries
              -     *
              -     * @internal
              -     */
              -    parent?: PathBase;
              -    /**
              -     * boolean indicating whether paths are compared case-insensitively
              -     * @internal
              -     */
              -    nocase: boolean;
              -    /**
              -     * boolean indicating that this path is the current working directory
              -     * of the PathScurry collection that contains it.
              -     */
              -    isCWD: boolean;
              -    /**
              -     * the string or regexp used to split paths. On posix, it is `'/'`, and on
              -     * windows it is a RegExp matching either `'/'` or `'\\'`
              -     */
              -    abstract splitSep: string | RegExp;
              -    /**
              -     * The path separator string to use when joining paths
              -     */
              -    abstract sep: string;
              -    get dev(): number | undefined;
              -    get mode(): number | undefined;
              -    get nlink(): number | undefined;
              -    get uid(): number | undefined;
              -    get gid(): number | undefined;
              -    get rdev(): number | undefined;
              -    get blksize(): number | undefined;
              -    get ino(): number | undefined;
              -    get size(): number | undefined;
              -    get blocks(): number | undefined;
              -    get atimeMs(): number | undefined;
              -    get mtimeMs(): number | undefined;
              -    get ctimeMs(): number | undefined;
              -    get birthtimeMs(): number | undefined;
              -    get atime(): Date | undefined;
              -    get mtime(): Date | undefined;
              -    get ctime(): Date | undefined;
              -    get birthtime(): Date | undefined;
              -    /**
              -     * This property is for compatibility with the Dirent class as of
              -     * Node v20, where Dirent['parentPath'] refers to the path of the
              -     * directory that was passed to readdir. For root entries, it's the path
              -     * to the entry itself.
              -     */
              -    get parentPath(): string;
              -    /**
              -     * Deprecated alias for Dirent['parentPath'] Somewhat counterintuitively,
              -     * this property refers to the *parent* path, not the path object itself.
              -     */
              -    get path(): string;
              -    /**
              -     * Do not create new Path objects directly.  They should always be accessed
              -     * via the PathScurry class or other methods on the Path class.
              -     *
              -     * @internal
              -     */
              -    constructor(name: string, type: number | undefined, root: PathBase | undefined, roots: {
              -        [k: string]: PathBase;
              -    }, nocase: boolean, children: ChildrenCache, opts: PathOpts);
              -    /**
              -     * Returns the depth of the Path object from its root.
              -     *
              -     * For example, a path at `/foo/bar` would have a depth of 2.
              -     */
              -    depth(): number;
              -    /**
              -     * @internal
              -     */
              -    abstract getRootString(path: string): string;
              -    /**
              -     * @internal
              -     */
              -    abstract getRoot(rootPath: string): PathBase;
              -    /**
              -     * @internal
              -     */
              -    abstract newChild(name: string, type?: number, opts?: PathOpts): PathBase;
              -    /**
              -     * @internal
              -     */
              -    childrenCache(): ChildrenCache;
              -    /**
              -     * Get the Path object referenced by the string path, resolved from this Path
              -     */
              -    resolve(path?: string): PathBase;
              -    /**
              -     * Returns the cached children Path objects, if still available.  If they
              -     * have fallen out of the cache, then returns an empty array, and resets the
              -     * READDIR_CALLED bit, so that future calls to readdir() will require an fs
              -     * lookup.
              -     *
              -     * @internal
              -     */
              -    children(): Children;
              -    /**
              -     * Resolves a path portion and returns or creates the child Path.
              -     *
              -     * Returns `this` if pathPart is `''` or `'.'`, or `parent` if pathPart is
              -     * `'..'`.
              -     *
              -     * This should not be called directly.  If `pathPart` contains any path
              -     * separators, it will lead to unsafe undefined behavior.
              -     *
              -     * Use `Path.resolve()` instead.
              -     *
              -     * @internal
              -     */
              -    child(pathPart: string, opts?: PathOpts): PathBase;
              -    /**
              -     * The relative path from the cwd. If it does not share an ancestor with
              -     * the cwd, then this ends up being equivalent to the fullpath()
              -     */
              -    relative(): string;
              -    /**
              -     * The relative path from the cwd, using / as the path separator.
              -     * If it does not share an ancestor with
              -     * the cwd, then this ends up being equivalent to the fullpathPosix()
              -     * On posix systems, this is identical to relative().
              -     */
              -    relativePosix(): string;
              -    /**
              -     * The fully resolved path string for this Path entry
              -     */
              -    fullpath(): string;
              -    /**
              -     * On platforms other than windows, this is identical to fullpath.
              -     *
              -     * On windows, this is overridden to return the forward-slash form of the
              -     * full UNC path.
              -     */
              -    fullpathPosix(): string;
              -    /**
              -     * Is the Path of an unknown type?
              -     *
              -     * Note that we might know *something* about it if there has been a previous
              -     * filesystem operation, for example that it does not exist, or is not a
              -     * link, or whether it has child entries.
              -     */
              -    isUnknown(): boolean;
              -    isType(type: Type): boolean;
              -    getType(): Type;
              -    /**
              -     * Is the Path a regular file?
              -     */
              -    isFile(): boolean;
              -    /**
              -     * Is the Path a directory?
              -     */
              -    isDirectory(): boolean;
              -    /**
              -     * Is the path a character device?
              -     */
              -    isCharacterDevice(): boolean;
              -    /**
              -     * Is the path a block device?
              -     */
              -    isBlockDevice(): boolean;
              -    /**
              -     * Is the path a FIFO pipe?
              -     */
              -    isFIFO(): boolean;
              -    /**
              -     * Is the path a socket?
              -     */
              -    isSocket(): boolean;
              -    /**
              -     * Is the path a symbolic link?
              -     */
              -    isSymbolicLink(): boolean;
              -    /**
              -     * Return the entry if it has been subject of a successful lstat, or
              -     * undefined otherwise.
              -     *
              -     * Does not read the filesystem, so an undefined result *could* simply
              -     * mean that we haven't called lstat on it.
              -     */
              -    lstatCached(): PathBase | undefined;
              -    /**
              -     * Return the cached link target if the entry has been the subject of a
              -     * successful readlink, or undefined otherwise.
              -     *
              -     * Does not read the filesystem, so an undefined result *could* just mean we
              -     * don't have any cached data. Only use it if you are very sure that a
              -     * readlink() has been called at some point.
              -     */
              -    readlinkCached(): PathBase | undefined;
              -    /**
              -     * Returns the cached realpath target if the entry has been the subject
              -     * of a successful realpath, or undefined otherwise.
              -     *
              -     * Does not read the filesystem, so an undefined result *could* just mean we
              -     * don't have any cached data. Only use it if you are very sure that a
              -     * realpath() has been called at some point.
              -     */
              -    realpathCached(): PathBase | undefined;
              -    /**
              -     * Returns the cached child Path entries array if the entry has been the
              -     * subject of a successful readdir(), or [] otherwise.
              -     *
              -     * Does not read the filesystem, so an empty array *could* just mean we
              -     * don't have any cached data. Only use it if you are very sure that a
              -     * readdir() has been called recently enough to still be valid.
              -     */
              -    readdirCached(): PathBase[];
              -    /**
              -     * Return true if it's worth trying to readlink.  Ie, we don't (yet) have
              -     * any indication that readlink will definitely fail.
              -     *
              -     * Returns false if the path is known to not be a symlink, if a previous
              -     * readlink failed, or if the entry does not exist.
              -     */
              -    canReadlink(): boolean;
              -    /**
              -     * Return true if readdir has previously been successfully called on this
              -     * path, indicating that cachedReaddir() is likely valid.
              -     */
              -    calledReaddir(): boolean;
              -    /**
              -     * Returns true if the path is known to not exist. That is, a previous lstat
              -     * or readdir failed to verify its existence when that would have been
              -     * expected, or a parent entry was marked either enoent or enotdir.
              -     */
              -    isENOENT(): boolean;
              -    /**
              -     * Return true if the path is a match for the given path name.  This handles
              -     * case sensitivity and unicode normalization.
              -     *
              -     * Note: even on case-sensitive systems, it is **not** safe to test the
              -     * equality of the `.name` property to determine whether a given pathname
              -     * matches, due to unicode normalization mismatches.
              -     *
              -     * Always use this method instead of testing the `path.name` property
              -     * directly.
              -     */
              -    isNamed(n: string): boolean;
              -    /**
              -     * Return the Path object corresponding to the target of a symbolic link.
              -     *
              -     * If the Path is not a symbolic link, or if the readlink call fails for any
              -     * reason, `undefined` is returned.
              -     *
              -     * Result is cached, and thus may be outdated if the filesystem is mutated.
              -     */
              -    readlink(): Promise;
              -    /**
              -     * Synchronous {@link PathBase.readlink}
              -     */
              -    readlinkSync(): PathBase | undefined;
              -    /**
              -     * Call lstat() on this Path, and update all known information that can be
              -     * determined.
              -     *
              -     * Note that unlike `fs.lstat()`, the returned value does not contain some
              -     * information, such as `mode`, `dev`, `nlink`, and `ino`.  If that
              -     * information is required, you will need to call `fs.lstat` yourself.
              -     *
              -     * If the Path refers to a nonexistent file, or if the lstat call fails for
              -     * any reason, `undefined` is returned.  Otherwise the updated Path object is
              -     * returned.
              -     *
              -     * Results are cached, and thus may be out of date if the filesystem is
              -     * mutated.
              -     */
              -    lstat(): Promise;
              -    /**
              -     * synchronous {@link PathBase.lstat}
              -     */
              -    lstatSync(): PathBase | undefined;
              -    /**
              -     * Standard node-style callback interface to get list of directory entries.
              -     *
              -     * If the Path cannot or does not contain any children, then an empty array
              -     * is returned.
              -     *
              -     * Results are cached, and thus may be out of date if the filesystem is
              -     * mutated.
              -     *
              -     * @param cb The callback called with (er, entries).  Note that the `er`
              -     * param is somewhat extraneous, as all readdir() errors are handled and
              -     * simply result in an empty set of entries being returned.
              -     * @param allowZalgo Boolean indicating that immediately known results should
              -     * *not* be deferred with `queueMicrotask`. Defaults to `false`. Release
              -     * zalgo at your peril, the dark pony lord is devious and unforgiving.
              -     */
              -    readdirCB(cb: (er: NodeJS.ErrnoException | null, entries: PathBase[]) => any, allowZalgo?: boolean): void;
              -    /**
              -     * Return an array of known child entries.
              -     *
              -     * If the Path cannot or does not contain any children, then an empty array
              -     * is returned.
              -     *
              -     * Results are cached, and thus may be out of date if the filesystem is
              -     * mutated.
              -     */
              -    readdir(): Promise;
              -    /**
              -     * synchronous {@link PathBase.readdir}
              -     */
              -    readdirSync(): PathBase[];
              -    canReaddir(): boolean;
              -    shouldWalk(dirs: Set, walkFilter?: (e: PathBase) => boolean): boolean;
              -    /**
              -     * Return the Path object corresponding to path as resolved
              -     * by realpath(3).
              -     *
              -     * If the realpath call fails for any reason, `undefined` is returned.
              -     *
              -     * Result is cached, and thus may be outdated if the filesystem is mutated.
              -     * On success, returns a Path object.
              -     */
              -    realpath(): Promise;
              -    /**
              -     * Synchronous {@link realpath}
              -     */
              -    realpathSync(): PathBase | undefined;
              -    /**
              -     * Internal method to mark this Path object as the scurry cwd,
              -     * called by {@link PathScurry#chdir}
              -     *
              -     * @internal
              -     */
              -    [setAsCwd](oldCwd: PathBase): void;
              -}
              -/**
              - * Path class used on win32 systems
              - *
              - * Uses `'\\'` as the path separator for returned paths, either `'\\'` or `'/'`
              - * as the path separator for parsing paths.
              - */
              -export declare class PathWin32 extends PathBase {
              -    /**
              -     * Separator for generating path strings.
              -     */
              -    sep: '\\';
              -    /**
              -     * Separator for parsing path strings.
              -     */
              -    splitSep: RegExp;
              -    /**
              -     * Do not create new Path objects directly.  They should always be accessed
              -     * via the PathScurry class or other methods on the Path class.
              -     *
              -     * @internal
              -     */
              -    constructor(name: string, type: number | undefined, root: PathBase | undefined, roots: {
              -        [k: string]: PathBase;
              -    }, nocase: boolean, children: ChildrenCache, opts: PathOpts);
              -    /**
              -     * @internal
              -     */
              -    newChild(name: string, type?: number, opts?: PathOpts): PathWin32;
              -    /**
              -     * @internal
              -     */
              -    getRootString(path: string): string;
              -    /**
              -     * @internal
              -     */
              -    getRoot(rootPath: string): PathBase;
              -    /**
              -     * @internal
              -     */
              -    sameRoot(rootPath: string, compare?: string): boolean;
              -}
              -/**
              - * Path class used on all posix systems.
              - *
              - * Uses `'/'` as the path separator.
              - */
              -export declare class PathPosix extends PathBase {
              -    /**
              -     * separator for parsing path strings
              -     */
              -    splitSep: '/';
              -    /**
              -     * separator for generating path strings
              -     */
              -    sep: '/';
              -    /**
              -     * Do not create new Path objects directly.  They should always be accessed
              -     * via the PathScurry class or other methods on the Path class.
              -     *
              -     * @internal
              -     */
              -    constructor(name: string, type: number | undefined, root: PathBase | undefined, roots: {
              -        [k: string]: PathBase;
              -    }, nocase: boolean, children: ChildrenCache, opts: PathOpts);
              -    /**
              -     * @internal
              -     */
              -    getRootString(path: string): string;
              -    /**
              -     * @internal
              -     */
              -    getRoot(_rootPath: string): PathBase;
              -    /**
              -     * @internal
              -     */
              -    newChild(name: string, type?: number, opts?: PathOpts): PathPosix;
              -}
              -/**
              - * Options that may be provided to the PathScurry constructor
              - */
              -export interface PathScurryOpts {
              -    /**
              -     * perform case-insensitive path matching. Default based on platform
              -     * subclass.
              -     */
              -    nocase?: boolean;
              -    /**
              -     * Number of Path entries to keep in the cache of Path child references.
              -     *
              -     * Setting this higher than 65536 will dramatically increase the data
              -     * consumption and construction time overhead of each PathScurry.
              -     *
              -     * Setting this value to 256 or lower will significantly reduce the data
              -     * consumption and construction time overhead, but may also reduce resolve()
              -     * and readdir() performance on large filesystems.
              -     *
              -     * Default `16384`.
              -     */
              -    childrenCacheSize?: number;
              -    /**
              -     * An object that overrides the built-in functions from the fs and
              -     * fs/promises modules.
              -     *
              -     * See {@link FSOption}
              -     */
              -    fs?: FSOption;
              -}
              -/**
              - * The base class for all PathScurry classes, providing the interface for path
              - * resolution and filesystem operations.
              - *
              - * Typically, you should *not* instantiate this class directly, but rather one
              - * of the platform-specific classes, or the exported {@link PathScurry} which
              - * defaults to the current platform.
              - */
              -export declare abstract class PathScurryBase {
              -    #private;
              -    /**
              -     * The root Path entry for the current working directory of this Scurry
              -     */
              -    root: PathBase;
              -    /**
              -     * The string path for the root of this Scurry's current working directory
              -     */
              -    rootPath: string;
              -    /**
              -     * A collection of all roots encountered, referenced by rootPath
              -     */
              -    roots: {
              -        [k: string]: PathBase;
              -    };
              -    /**
              -     * The Path entry corresponding to this PathScurry's current working directory.
              -     */
              -    cwd: PathBase;
              -    /**
              -     * Perform path comparisons case-insensitively.
              -     *
              -     * Defaults true on Darwin and Windows systems, false elsewhere.
              -     */
              -    nocase: boolean;
              -    /**
              -     * The path separator used for parsing paths
              -     *
              -     * `'/'` on Posix systems, either `'/'` or `'\\'` on Windows
              -     */
              -    abstract sep: string | RegExp;
              -    /**
              -     * This class should not be instantiated directly.
              -     *
              -     * Use PathScurryWin32, PathScurryDarwin, PathScurryPosix, or PathScurry
              -     *
              -     * @internal
              -     */
              -    constructor(cwd: string | URL | undefined, pathImpl: typeof win32 | typeof posix, sep: string | RegExp, { nocase, childrenCacheSize, fs, }?: PathScurryOpts);
              -    /**
              -     * Get the depth of a provided path, string, or the cwd
              -     */
              -    depth(path?: Path | string): number;
              -    /**
              -     * Parse the root portion of a path string
              -     *
              -     * @internal
              -     */
              -    abstract parseRootPath(dir: string): string;
              -    /**
              -     * create a new Path to use as root during construction.
              -     *
              -     * @internal
              -     */
              -    abstract newRoot(fs: FSValue): PathBase;
              -    /**
              -     * Determine whether a given path string is absolute
              -     */
              -    abstract isAbsolute(p: string): boolean;
              -    /**
              -     * Return the cache of child entries.  Exposed so subclasses can create
              -     * child Path objects in a platform-specific way.
              -     *
              -     * @internal
              -     */
              -    childrenCache(): ChildrenCache;
              -    /**
              -     * Resolve one or more path strings to a resolved string
              -     *
              -     * Same interface as require('path').resolve.
              -     *
              -     * Much faster than path.resolve() when called multiple times for the same
              -     * path, because the resolved Path objects are cached.  Much slower
              -     * otherwise.
              -     */
              -    resolve(...paths: string[]): string;
              -    /**
              -     * Resolve one or more path strings to a resolved string, returning
              -     * the posix path.  Identical to .resolve() on posix systems, but on
              -     * windows will return a forward-slash separated UNC path.
              -     *
              -     * Same interface as require('path').resolve.
              -     *
              -     * Much faster than path.resolve() when called multiple times for the same
              -     * path, because the resolved Path objects are cached.  Much slower
              -     * otherwise.
              -     */
              -    resolvePosix(...paths: string[]): string;
              -    /**
              -     * find the relative path from the cwd to the supplied path string or entry
              -     */
              -    relative(entry?: PathBase | string): string;
              -    /**
              -     * find the relative path from the cwd to the supplied path string or
              -     * entry, using / as the path delimiter, even on Windows.
              -     */
              -    relativePosix(entry?: PathBase | string): string;
              -    /**
              -     * Return the basename for the provided string or Path object
              -     */
              -    basename(entry?: PathBase | string): string;
              -    /**
              -     * Return the dirname for the provided string or Path object
              -     */
              -    dirname(entry?: PathBase | string): string;
              -    /**
              -     * Return an array of known child entries.
              -     *
              -     * First argument may be either a string, or a Path object.
              -     *
              -     * If the Path cannot or does not contain any children, then an empty array
              -     * is returned.
              -     *
              -     * Results are cached, and thus may be out of date if the filesystem is
              -     * mutated.
              -     *
              -     * Unlike `fs.readdir()`, the `withFileTypes` option defaults to `true`. Set
              -     * `{ withFileTypes: false }` to return strings.
              -     */
              -    readdir(): Promise;
              -    readdir(opts: {
              -        withFileTypes: true;
              -    }): Promise;
              -    readdir(opts: {
              -        withFileTypes: false;
              -    }): Promise;
              -    readdir(opts: {
              -        withFileTypes: boolean;
              -    }): Promise;
              -    readdir(entry: PathBase | string): Promise;
              -    readdir(entry: PathBase | string, opts: {
              -        withFileTypes: true;
              -    }): Promise;
              -    readdir(entry: PathBase | string, opts: {
              -        withFileTypes: false;
              -    }): Promise;
              -    readdir(entry: PathBase | string, opts: {
              -        withFileTypes: boolean;
              -    }): Promise;
              -    /**
              -     * synchronous {@link PathScurryBase.readdir}
              -     */
              -    readdirSync(): PathBase[];
              -    readdirSync(opts: {
              -        withFileTypes: true;
              -    }): PathBase[];
              -    readdirSync(opts: {
              -        withFileTypes: false;
              -    }): string[];
              -    readdirSync(opts: {
              -        withFileTypes: boolean;
              -    }): PathBase[] | string[];
              -    readdirSync(entry: PathBase | string): PathBase[];
              -    readdirSync(entry: PathBase | string, opts: {
              -        withFileTypes: true;
              -    }): PathBase[];
              -    readdirSync(entry: PathBase | string, opts: {
              -        withFileTypes: false;
              -    }): string[];
              -    readdirSync(entry: PathBase | string, opts: {
              -        withFileTypes: boolean;
              -    }): PathBase[] | string[];
              -    /**
              -     * Call lstat() on the string or Path object, and update all known
              -     * information that can be determined.
              -     *
              -     * Note that unlike `fs.lstat()`, the returned value does not contain some
              -     * information, such as `mode`, `dev`, `nlink`, and `ino`.  If that
              -     * information is required, you will need to call `fs.lstat` yourself.
              -     *
              -     * If the Path refers to a nonexistent file, or if the lstat call fails for
              -     * any reason, `undefined` is returned.  Otherwise the updated Path object is
              -     * returned.
              -     *
              -     * Results are cached, and thus may be out of date if the filesystem is
              -     * mutated.
              -     */
              -    lstat(entry?: string | PathBase): Promise;
              -    /**
              -     * synchronous {@link PathScurryBase.lstat}
              -     */
              -    lstatSync(entry?: string | PathBase): PathBase | undefined;
              -    /**
              -     * Return the Path object or string path corresponding to the target of a
              -     * symbolic link.
              -     *
              -     * If the path is not a symbolic link, or if the readlink call fails for any
              -     * reason, `undefined` is returned.
              -     *
              -     * Result is cached, and thus may be outdated if the filesystem is mutated.
              -     *
              -     * `{withFileTypes}` option defaults to `false`.
              -     *
              -     * On success, returns a Path object if `withFileTypes` option is true,
              -     * otherwise a string.
              -     */
              -    readlink(): Promise;
              -    readlink(opt: {
              -        withFileTypes: false;
              -    }): Promise;
              -    readlink(opt: {
              -        withFileTypes: true;
              -    }): Promise;
              -    readlink(opt: {
              -        withFileTypes: boolean;
              -    }): Promise;
              -    readlink(entry: string | PathBase, opt?: {
              -        withFileTypes: false;
              -    }): Promise;
              -    readlink(entry: string | PathBase, opt: {
              -        withFileTypes: true;
              -    }): Promise;
              -    readlink(entry: string | PathBase, opt: {
              -        withFileTypes: boolean;
              -    }): Promise;
              -    /**
              -     * synchronous {@link PathScurryBase.readlink}
              -     */
              -    readlinkSync(): string | undefined;
              -    readlinkSync(opt: {
              -        withFileTypes: false;
              -    }): string | undefined;
              -    readlinkSync(opt: {
              -        withFileTypes: true;
              -    }): PathBase | undefined;
              -    readlinkSync(opt: {
              -        withFileTypes: boolean;
              -    }): PathBase | string | undefined;
              -    readlinkSync(entry: string | PathBase, opt?: {
              -        withFileTypes: false;
              -    }): string | undefined;
              -    readlinkSync(entry: string | PathBase, opt: {
              -        withFileTypes: true;
              -    }): PathBase | undefined;
              -    readlinkSync(entry: string | PathBase, opt: {
              -        withFileTypes: boolean;
              -    }): string | PathBase | undefined;
              -    /**
              -     * Return the Path object or string path corresponding to path as resolved
              -     * by realpath(3).
              -     *
              -     * If the realpath call fails for any reason, `undefined` is returned.
              -     *
              -     * Result is cached, and thus may be outdated if the filesystem is mutated.
              -     *
              -     * `{withFileTypes}` option defaults to `false`.
              -     *
              -     * On success, returns a Path object if `withFileTypes` option is true,
              -     * otherwise a string.
              -     */
              -    realpath(): Promise;
              -    realpath(opt: {
              -        withFileTypes: false;
              -    }): Promise;
              -    realpath(opt: {
              -        withFileTypes: true;
              -    }): Promise;
              -    realpath(opt: {
              -        withFileTypes: boolean;
              -    }): Promise;
              -    realpath(entry: string | PathBase, opt?: {
              -        withFileTypes: false;
              -    }): Promise;
              -    realpath(entry: string | PathBase, opt: {
              -        withFileTypes: true;
              -    }): Promise;
              -    realpath(entry: string | PathBase, opt: {
              -        withFileTypes: boolean;
              -    }): Promise;
              -    realpathSync(): string | undefined;
              -    realpathSync(opt: {
              -        withFileTypes: false;
              -    }): string | undefined;
              -    realpathSync(opt: {
              -        withFileTypes: true;
              -    }): PathBase | undefined;
              -    realpathSync(opt: {
              -        withFileTypes: boolean;
              -    }): PathBase | string | undefined;
              -    realpathSync(entry: string | PathBase, opt?: {
              -        withFileTypes: false;
              -    }): string | undefined;
              -    realpathSync(entry: string | PathBase, opt: {
              -        withFileTypes: true;
              -    }): PathBase | undefined;
              -    realpathSync(entry: string | PathBase, opt: {
              -        withFileTypes: boolean;
              -    }): string | PathBase | undefined;
              -    /**
              -     * Asynchronously walk the directory tree, returning an array of
              -     * all path strings or Path objects found.
              -     *
              -     * Note that this will be extremely memory-hungry on large filesystems.
              -     * In such cases, it may be better to use the stream or async iterator
              -     * walk implementation.
              -     */
              -    walk(): Promise;
              -    walk(opts: WalkOptionsWithFileTypesTrue | WalkOptionsWithFileTypesUnset): Promise;
              -    walk(opts: WalkOptionsWithFileTypesFalse): Promise;
              -    walk(opts: WalkOptions): Promise;
              -    walk(entry: string | PathBase): Promise;
              -    walk(entry: string | PathBase, opts: WalkOptionsWithFileTypesTrue | WalkOptionsWithFileTypesUnset): Promise;
              -    walk(entry: string | PathBase, opts: WalkOptionsWithFileTypesFalse): Promise;
              -    walk(entry: string | PathBase, opts: WalkOptions): Promise;
              -    /**
              -     * Synchronously walk the directory tree, returning an array of
              -     * all path strings or Path objects found.
              -     *
              -     * Note that this will be extremely memory-hungry on large filesystems.
              -     * In such cases, it may be better to use the stream or async iterator
              -     * walk implementation.
              -     */
              -    walkSync(): PathBase[];
              -    walkSync(opts: WalkOptionsWithFileTypesTrue | WalkOptionsWithFileTypesUnset): PathBase[];
              -    walkSync(opts: WalkOptionsWithFileTypesFalse): string[];
              -    walkSync(opts: WalkOptions): string[] | PathBase[];
              -    walkSync(entry: string | PathBase): PathBase[];
              -    walkSync(entry: string | PathBase, opts: WalkOptionsWithFileTypesUnset | WalkOptionsWithFileTypesTrue): PathBase[];
              -    walkSync(entry: string | PathBase, opts: WalkOptionsWithFileTypesFalse): string[];
              -    walkSync(entry: string | PathBase, opts: WalkOptions): PathBase[] | string[];
              -    /**
              -     * Support for `for await`
              -     *
              -     * Alias for {@link PathScurryBase.iterate}
              -     *
              -     * Note: As of Node 19, this is very slow, compared to other methods of
              -     * walking.  Consider using {@link PathScurryBase.stream} if memory overhead
              -     * and backpressure are concerns, or {@link PathScurryBase.walk} if not.
              -     */
              -    [Symbol.asyncIterator](): AsyncGenerator;
              -    /**
              -     * Async generator form of {@link PathScurryBase.walk}
              -     *
              -     * Note: As of Node 19, this is very slow, compared to other methods of
              -     * walking, especially if most/all of the directory tree has been previously
              -     * walked.  Consider using {@link PathScurryBase.stream} if memory overhead
              -     * and backpressure are concerns, or {@link PathScurryBase.walk} if not.
              -     */
              -    iterate(): AsyncGenerator;
              -    iterate(opts: WalkOptionsWithFileTypesTrue | WalkOptionsWithFileTypesUnset): AsyncGenerator;
              -    iterate(opts: WalkOptionsWithFileTypesFalse): AsyncGenerator;
              -    iterate(opts: WalkOptions): AsyncGenerator;
              -    iterate(entry: string | PathBase): AsyncGenerator;
              -    iterate(entry: string | PathBase, opts: WalkOptionsWithFileTypesTrue | WalkOptionsWithFileTypesUnset): AsyncGenerator;
              -    iterate(entry: string | PathBase, opts: WalkOptionsWithFileTypesFalse): AsyncGenerator;
              -    iterate(entry: string | PathBase, opts: WalkOptions): AsyncGenerator;
              -    /**
              -     * Iterating over a PathScurry performs a synchronous walk.
              -     *
              -     * Alias for {@link PathScurryBase.iterateSync}
              -     */
              -    [Symbol.iterator](): Generator;
              -    iterateSync(): Generator;
              -    iterateSync(opts: WalkOptionsWithFileTypesTrue | WalkOptionsWithFileTypesUnset): Generator;
              -    iterateSync(opts: WalkOptionsWithFileTypesFalse): Generator;
              -    iterateSync(opts: WalkOptions): Generator;
              -    iterateSync(entry: string | PathBase): Generator;
              -    iterateSync(entry: string | PathBase, opts: WalkOptionsWithFileTypesTrue | WalkOptionsWithFileTypesUnset): Generator;
              -    iterateSync(entry: string | PathBase, opts: WalkOptionsWithFileTypesFalse): Generator;
              -    iterateSync(entry: string | PathBase, opts: WalkOptions): Generator;
              -    /**
              -     * Stream form of {@link PathScurryBase.walk}
              -     *
              -     * Returns a Minipass stream that emits {@link PathBase} objects by default,
              -     * or strings if `{ withFileTypes: false }` is set in the options.
              -     */
              -    stream(): Minipass;
              -    stream(opts: WalkOptionsWithFileTypesTrue | WalkOptionsWithFileTypesUnset): Minipass;
              -    stream(opts: WalkOptionsWithFileTypesFalse): Minipass;
              -    stream(opts: WalkOptions): Minipass;
              -    stream(entry: string | PathBase): Minipass;
              -    stream(entry: string | PathBase, opts: WalkOptionsWithFileTypesUnset | WalkOptionsWithFileTypesTrue): Minipass;
              -    stream(entry: string | PathBase, opts: WalkOptionsWithFileTypesFalse): Minipass;
              -    stream(entry: string | PathBase, opts: WalkOptions): Minipass | Minipass;
              -    /**
              -     * Synchronous form of {@link PathScurryBase.stream}
              -     *
              -     * Returns a Minipass stream that emits {@link PathBase} objects by default,
              -     * or strings if `{ withFileTypes: false }` is set in the options.
              -     *
              -     * Will complete the walk in a single tick if the stream is consumed fully.
              -     * Otherwise, will pause as needed for stream backpressure.
              -     */
              -    streamSync(): Minipass;
              -    streamSync(opts: WalkOptionsWithFileTypesTrue | WalkOptionsWithFileTypesUnset): Minipass;
              -    streamSync(opts: WalkOptionsWithFileTypesFalse): Minipass;
              -    streamSync(opts: WalkOptions): Minipass;
              -    streamSync(entry: string | PathBase): Minipass;
              -    streamSync(entry: string | PathBase, opts: WalkOptionsWithFileTypesUnset | WalkOptionsWithFileTypesTrue): Minipass;
              -    streamSync(entry: string | PathBase, opts: WalkOptionsWithFileTypesFalse): Minipass;
              -    streamSync(entry: string | PathBase, opts: WalkOptions): Minipass | Minipass;
              -    chdir(path?: string | Path): void;
              -}
              -/**
              - * Options provided to all walk methods.
              - */
              -export interface WalkOptions {
              -    /**
              -     * Return results as {@link PathBase} objects rather than strings.
              -     * When set to false, results are fully resolved paths, as returned by
              -     * {@link PathBase.fullpath}.
              -     * @default true
              -     */
              -    withFileTypes?: boolean;
              -    /**
              -     *  Attempt to read directory entries from symbolic links. Otherwise, only
              -     *  actual directories are traversed. Regardless of this setting, a given
              -     *  target path will only ever be walked once, meaning that a symbolic link
              -     *  to a previously traversed directory will never be followed.
              -     *
              -     *  Setting this imposes a slight performance penalty, because `readlink`
              -     *  must be called on all symbolic links encountered, in order to avoid
              -     *  infinite cycles.
              -     * @default false
              -     */
              -    follow?: boolean;
              -    /**
              -     * Only return entries where the provided function returns true.
              -     *
              -     * This will not prevent directories from being traversed, even if they do
              -     * not pass the filter, though it will prevent directories themselves from
              -     * being included in the result set.  See {@link walkFilter}
              -     *
              -     * Asynchronous functions are not supported here.
              -     *
              -     * By default, if no filter is provided, all entries and traversed
              -     * directories are included.
              -     */
              -    filter?: (entry: PathBase) => boolean;
              -    /**
              -     * Only traverse directories (and in the case of {@link follow} being set to
              -     * true, symbolic links to directories) if the provided function returns
              -     * true.
              -     *
              -     * This will not prevent directories from being included in the result set,
              -     * even if they do not pass the supplied filter function.  See {@link filter}
              -     * to do that.
              -     *
              -     * Asynchronous functions are not supported here.
              -     */
              -    walkFilter?: (entry: PathBase) => boolean;
              -}
              -export type WalkOptionsWithFileTypesUnset = WalkOptions & {
              -    withFileTypes?: undefined;
              -};
              -export type WalkOptionsWithFileTypesTrue = WalkOptions & {
              -    withFileTypes: true;
              -};
              -export type WalkOptionsWithFileTypesFalse = WalkOptions & {
              -    withFileTypes: false;
              -};
              -/**
              - * Windows implementation of {@link PathScurryBase}
              - *
              - * Defaults to case insensitve, uses `'\\'` to generate path strings.  Uses
              - * {@link PathWin32} for Path objects.
              - */
              -export declare class PathScurryWin32 extends PathScurryBase {
              -    /**
              -     * separator for generating path strings
              -     */
              -    sep: '\\';
              -    constructor(cwd?: URL | string, opts?: PathScurryOpts);
              -    /**
              -     * @internal
              -     */
              -    parseRootPath(dir: string): string;
              -    /**
              -     * @internal
              -     */
              -    newRoot(fs: FSValue): PathWin32;
              -    /**
              -     * Return true if the provided path string is an absolute path
              -     */
              -    isAbsolute(p: string): boolean;
              -}
              -/**
              - * {@link PathScurryBase} implementation for all posix systems other than Darwin.
              - *
              - * Defaults to case-sensitive matching, uses `'/'` to generate path strings.
              - *
              - * Uses {@link PathPosix} for Path objects.
              - */
              -export declare class PathScurryPosix extends PathScurryBase {
              -    /**
              -     * separator for generating path strings
              -     */
              -    sep: '/';
              -    constructor(cwd?: URL | string, opts?: PathScurryOpts);
              -    /**
              -     * @internal
              -     */
              -    parseRootPath(_dir: string): string;
              -    /**
              -     * @internal
              -     */
              -    newRoot(fs: FSValue): PathPosix;
              -    /**
              -     * Return true if the provided path string is an absolute path
              -     */
              -    isAbsolute(p: string): boolean;
              -}
              -/**
              - * {@link PathScurryBase} implementation for Darwin (macOS) systems.
              - *
              - * Defaults to case-insensitive matching, uses `'/'` for generating path
              - * strings.
              - *
              - * Uses {@link PathPosix} for Path objects.
              - */
              -export declare class PathScurryDarwin extends PathScurryPosix {
              -    constructor(cwd?: URL | string, opts?: PathScurryOpts);
              -}
              -/**
              - * Default {@link PathBase} implementation for the current platform.
              - *
              - * {@link PathWin32} on Windows systems, {@link PathPosix} on all others.
              - */
              -export declare const Path: typeof PathWin32 | typeof PathPosix;
              -export type Path = PathBase | InstanceType;
              -/**
              - * Default {@link PathScurryBase} implementation for the current platform.
              - *
              - * {@link PathScurryWin32} on Windows systems, {@link PathScurryDarwin} on
              - * Darwin (macOS) systems, {@link PathScurryPosix} on all others.
              - */
              -export declare const PathScurry: typeof PathScurryWin32 | typeof PathScurryDarwin | typeof PathScurryPosix;
              -export type PathScurry = PathScurryBase | InstanceType;
              -export {};
              -//# sourceMappingURL=index.d.ts.map
              \ No newline at end of file
              diff --git a/node_modules/path-scurry/dist/commonjs/index.d.ts.map b/node_modules/path-scurry/dist/commonjs/index.d.ts.map
              deleted file mode 100644
              index 1f59f8f4..00000000
              --- a/node_modules/path-scurry/dist/commonjs/index.d.ts.map
              +++ /dev/null
              @@ -1 +0,0 @@
              -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AACpC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,WAAW,CAAA;AAmBxC,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AACnC,OAAO,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAE5C;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,WAAW,QAAQ;IACvB,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,KAAK,CAAA;IACnC,OAAO,CAAC,EAAE,CACR,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE;QAAE,aAAa,EAAE,IAAI,CAAA;KAAE,EAChC,EAAE,EAAE,CAAC,EAAE,EAAE,MAAM,CAAC,cAAc,GAAG,IAAI,E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GAAG,YAAY,CAAC,OAAO,UAAU,CAAC,CAAA"}
              \ No newline at end of file
              diff --git a/node_modules/path-scurry/dist/commonjs/index.js b/node_modules/path-scurry/dist/commonjs/index.js
              deleted file mode 100644
              index 555de62f..00000000
              --- a/node_modules/path-scurry/dist/commonjs/index.js
              +++ /dev/null
              @@ -1,2014 +0,0 @@
              -"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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
              -    Object.defineProperty(o, "default", { enumerable: true, value: v });
              -}) : function(o, v) {
              -    o["default"] = v;
              -});
              -var __importStar = (this && this.__importStar) || function (mod) {
              -    if (mod && mod.__esModule) return mod;
              -    var result = {};
              -    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
              -    __setModuleDefault(result, mod);
              -    return result;
              -};
              -Object.defineProperty(exports, "__esModule", { value: true });
              -exports.PathScurry = exports.Path = exports.PathScurryDarwin = exports.PathScurryPosix = exports.PathScurryWin32 = exports.PathScurryBase = exports.PathPosix = exports.PathWin32 = exports.PathBase = exports.ChildrenCache = exports.ResolveCache = void 0;
              -const lru_cache_1 = require("lru-cache");
              -const node_path_1 = require("node:path");
              -const node_url_1 = require("node:url");
              -const fs_1 = require("fs");
              -const actualFS = __importStar(require("node:fs"));
              -const realpathSync = fs_1.realpathSync.native;
              -// TODO: test perf of fs/promises realpath vs realpathCB,
              -// since the promises one uses realpath.native
              -const promises_1 = require("node:fs/promises");
              -const minipass_1 = require("minipass");
              -const defaultFS = {
              -    lstatSync: fs_1.lstatSync,
              -    readdir: fs_1.readdir,
              -    readdirSync: fs_1.readdirSync,
              -    readlinkSync: fs_1.readlinkSync,
              -    realpathSync,
              -    promises: {
              -        lstat: promises_1.lstat,
              -        readdir: promises_1.readdir,
              -        readlink: promises_1.readlink,
              -        realpath: promises_1.realpath,
              -    },
              -};
              -// if they just gave us require('fs') then use our default
              -const fsFromOption = (fsOption) => !fsOption || fsOption === defaultFS || fsOption === actualFS ?
              -    defaultFS
              -    : {
              -        ...defaultFS,
              -        ...fsOption,
              -        promises: {
              -            ...defaultFS.promises,
              -            ...(fsOption.promises || {}),
              -        },
              -    };
              -// turn something like //?/c:/ into c:\
              -const uncDriveRegexp = /^\\\\\?\\([a-z]:)\\?$/i;
              -const uncToDrive = (rootPath) => rootPath.replace(/\//g, '\\').replace(uncDriveRegexp, '$1\\');
              -// windows paths are separated by either / or \
              -const eitherSep = /[\\\/]/;
              -const UNKNOWN = 0; // may not even exist, for all we know
              -const IFIFO = 0b0001;
              -const IFCHR = 0b0010;
              -const IFDIR = 0b0100;
              -const IFBLK = 0b0110;
              -const IFREG = 0b1000;
              -const IFLNK = 0b1010;
              -const IFSOCK = 0b1100;
              -const IFMT = 0b1111;
              -// mask to unset low 4 bits
              -const IFMT_UNKNOWN = ~IFMT;
              -// set after successfully calling readdir() and getting entries.
              -const READDIR_CALLED = 0b0000_0001_0000;
              -// set after a successful lstat()
              -const LSTAT_CALLED = 0b0000_0010_0000;
              -// set if an entry (or one of its parents) is definitely not a dir
              -const ENOTDIR = 0b0000_0100_0000;
              -// set if an entry (or one of its parents) does not exist
              -// (can also be set on lstat errors like EACCES or ENAMETOOLONG)
              -const ENOENT = 0b0000_1000_0000;
              -// cannot have child entries -- also verify &IFMT is either IFDIR or IFLNK
              -// set if we fail to readlink
              -const ENOREADLINK = 0b0001_0000_0000;
              -// set if we know realpath() will fail
              -const ENOREALPATH = 0b0010_0000_0000;
              -const ENOCHILD = ENOTDIR | ENOENT | ENOREALPATH;
              -const TYPEMASK = 0b0011_1111_1111;
              -const entToType = (s) => s.isFile() ? IFREG
              -    : s.isDirectory() ? IFDIR
              -        : s.isSymbolicLink() ? IFLNK
              -            : s.isCharacterDevice() ? IFCHR
              -                : s.isBlockDevice() ? IFBLK
              -                    : s.isSocket() ? IFSOCK
              -                        : s.isFIFO() ? IFIFO
              -                            : UNKNOWN;
              -// normalize unicode path names
              -const normalizeCache = new Map();
              -const normalize = (s) => {
              -    const c = normalizeCache.get(s);
              -    if (c)
              -        return c;
              -    const n = s.normalize('NFKD');
              -    normalizeCache.set(s, n);
              -    return n;
              -};
              -const normalizeNocaseCache = new Map();
              -const normalizeNocase = (s) => {
              -    const c = normalizeNocaseCache.get(s);
              -    if (c)
              -        return c;
              -    const n = normalize(s.toLowerCase());
              -    normalizeNocaseCache.set(s, n);
              -    return n;
              -};
              -/**
              - * An LRUCache for storing resolved path strings or Path objects.
              - * @internal
              - */
              -class ResolveCache extends lru_cache_1.LRUCache {
              -    constructor() {
              -        super({ max: 256 });
              -    }
              -}
              -exports.ResolveCache = ResolveCache;
              -// In order to prevent blowing out the js heap by allocating hundreds of
              -// thousands of Path entries when walking extremely large trees, the "children"
              -// in this tree are represented by storing an array of Path entries in an
              -// LRUCache, indexed by the parent.  At any time, Path.children() may return an
              -// empty array, indicating that it doesn't know about any of its children, and
              -// thus has to rebuild that cache.  This is fine, it just means that we don't
              -// benefit as much from having the cached entries, but huge directory walks
              -// don't blow out the stack, and smaller ones are still as fast as possible.
              -//
              -//It does impose some complexity when building up the readdir data, because we
              -//need to pass a reference to the children array that we started with.
              -/**
              - * an LRUCache for storing child entries.
              - * @internal
              - */
              -class ChildrenCache extends lru_cache_1.LRUCache {
              -    constructor(maxSize = 16 * 1024) {
              -        super({
              -            maxSize,
              -            // parent + children
              -            sizeCalculation: a => a.length + 1,
              -        });
              -    }
              -}
              -exports.ChildrenCache = ChildrenCache;
              -const setAsCwd = Symbol('PathScurry setAsCwd');
              -/**
              - * Path objects are sort of like a super-powered
              - * {@link https://nodejs.org/docs/latest/api/fs.html#class-fsdirent fs.Dirent}
              - *
              - * Each one represents a single filesystem entry on disk, which may or may not
              - * exist. It includes methods for reading various types of information via
              - * lstat, readlink, and readdir, and caches all information to the greatest
              - * degree possible.
              - *
              - * Note that fs operations that would normally throw will instead return an
              - * "empty" value. This is in order to prevent excessive overhead from error
              - * stack traces.
              - */
              -class PathBase {
              -    /**
              -     * the basename of this path
              -     *
              -     * **Important**: *always* test the path name against any test string
              -     * usingthe {@link isNamed} method, and not by directly comparing this
              -     * string. Otherwise, unicode path strings that the system sees as identical
              -     * will not be properly treated as the same path, leading to incorrect
              -     * behavior and possible security issues.
              -     */
              -    name;
              -    /**
              -     * the Path entry corresponding to the path root.
              -     *
              -     * @internal
              -     */
              -    root;
              -    /**
              -     * All roots found within the current PathScurry family
              -     *
              -     * @internal
              -     */
              -    roots;
              -    /**
              -     * a reference to the parent path, or undefined in the case of root entries
              -     *
              -     * @internal
              -     */
              -    parent;
              -    /**
              -     * boolean indicating whether paths are compared case-insensitively
              -     * @internal
              -     */
              -    nocase;
              -    /**
              -     * boolean indicating that this path is the current working directory
              -     * of the PathScurry collection that contains it.
              -     */
              -    isCWD = false;
              -    // potential default fs override
              -    #fs;
              -    // Stats fields
              -    #dev;
              -    get dev() {
              -        return this.#dev;
              -    }
              -    #mode;
              -    get mode() {
              -        return this.#mode;
              -    }
              -    #nlink;
              -    get nlink() {
              -        return this.#nlink;
              -    }
              -    #uid;
              -    get uid() {
              -        return this.#uid;
              -    }
              -    #gid;
              -    get gid() {
              -        return this.#gid;
              -    }
              -    #rdev;
              -    get rdev() {
              -        return this.#rdev;
              -    }
              -    #blksize;
              -    get blksize() {
              -        return this.#blksize;
              -    }
              -    #ino;
              -    get ino() {
              -        return this.#ino;
              -    }
              -    #size;
              -    get size() {
              -        return this.#size;
              -    }
              -    #blocks;
              -    get blocks() {
              -        return this.#blocks;
              -    }
              -    #atimeMs;
              -    get atimeMs() {
              -        return this.#atimeMs;
              -    }
              -    #mtimeMs;
              -    get mtimeMs() {
              -        return this.#mtimeMs;
              -    }
              -    #ctimeMs;
              -    get ctimeMs() {
              -        return this.#ctimeMs;
              -    }
              -    #birthtimeMs;
              -    get birthtimeMs() {
              -        return this.#birthtimeMs;
              -    }
              -    #atime;
              -    get atime() {
              -        return this.#atime;
              -    }
              -    #mtime;
              -    get mtime() {
              -        return this.#mtime;
              -    }
              -    #ctime;
              -    get ctime() {
              -        return this.#ctime;
              -    }
              -    #birthtime;
              -    get birthtime() {
              -        return this.#birthtime;
              -    }
              -    #matchName;
              -    #depth;
              -    #fullpath;
              -    #fullpathPosix;
              -    #relative;
              -    #relativePosix;
              -    #type;
              -    #children;
              -    #linkTarget;
              -    #realpath;
              -    /**
              -     * This property is for compatibility with the Dirent class as of
              -     * Node v20, where Dirent['parentPath'] refers to the path of the
              -     * directory that was passed to readdir. For root entries, it's the path
              -     * to the entry itself.
              -     */
              -    get parentPath() {
              -        return (this.parent || this).fullpath();
              -    }
              -    /**
              -     * Deprecated alias for Dirent['parentPath'] Somewhat counterintuitively,
              -     * this property refers to the *parent* path, not the path object itself.
              -     */
              -    get path() {
              -        return this.parentPath;
              -    }
              -    /**
              -     * Do not create new Path objects directly.  They should always be accessed
              -     * via the PathScurry class or other methods on the Path class.
              -     *
              -     * @internal
              -     */
              -    constructor(name, type = UNKNOWN, root, roots, nocase, children, opts) {
              -        this.name = name;
              -        this.#matchName = nocase ? normalizeNocase(name) : normalize(name);
              -        this.#type = type & TYPEMASK;
              -        this.nocase = nocase;
              -        this.roots = roots;
              -        this.root = root || this;
              -        this.#children = children;
              -        this.#fullpath = opts.fullpath;
              -        this.#relative = opts.relative;
              -        this.#relativePosix = opts.relativePosix;
              -        this.parent = opts.parent;
              -        if (this.parent) {
              -            this.#fs = this.parent.#fs;
              -        }
              -        else {
              -            this.#fs = fsFromOption(opts.fs);
              -        }
              -    }
              -    /**
              -     * Returns the depth of the Path object from its root.
              -     *
              -     * For example, a path at `/foo/bar` would have a depth of 2.
              -     */
              -    depth() {
              -        if (this.#depth !== undefined)
              -            return this.#depth;
              -        if (!this.parent)
              -            return (this.#depth = 0);
              -        return (this.#depth = this.parent.depth() + 1);
              -    }
              -    /**
              -     * @internal
              -     */
              -    childrenCache() {
              -        return this.#children;
              -    }
              -    /**
              -     * Get the Path object referenced by the string path, resolved from this Path
              -     */
              -    resolve(path) {
              -        if (!path) {
              -            return this;
              -        }
              -        const rootPath = this.getRootString(path);
              -        const dir = path.substring(rootPath.length);
              -        const dirParts = dir.split(this.splitSep);
              -        const result = rootPath ?
              -            this.getRoot(rootPath).#resolveParts(dirParts)
              -            : this.#resolveParts(dirParts);
              -        return result;
              -    }
              -    #resolveParts(dirParts) {
              -        let p = this;
              -        for (const part of dirParts) {
              -            p = p.child(part);
              -        }
              -        return p;
              -    }
              -    /**
              -     * Returns the cached children Path objects, if still available.  If they
              -     * have fallen out of the cache, then returns an empty array, and resets the
              -     * READDIR_CALLED bit, so that future calls to readdir() will require an fs
              -     * lookup.
              -     *
              -     * @internal
              -     */
              -    children() {
              -        const cached = this.#children.get(this);
              -        if (cached) {
              -            return cached;
              -        }
              -        const children = Object.assign([], { provisional: 0 });
              -        this.#children.set(this, children);
              -        this.#type &= ~READDIR_CALLED;
              -        return children;
              -    }
              -    /**
              -     * Resolves a path portion and returns or creates the child Path.
              -     *
              -     * Returns `this` if pathPart is `''` or `'.'`, or `parent` if pathPart is
              -     * `'..'`.
              -     *
              -     * This should not be called directly.  If `pathPart` contains any path
              -     * separators, it will lead to unsafe undefined behavior.
              -     *
              -     * Use `Path.resolve()` instead.
              -     *
              -     * @internal
              -     */
              -    child(pathPart, opts) {
              -        if (pathPart === '' || pathPart === '.') {
              -            return this;
              -        }
              -        if (pathPart === '..') {
              -            return this.parent || this;
              -        }
              -        // find the child
              -        const children = this.children();
              -        const name = this.nocase ? normalizeNocase(pathPart) : normalize(pathPart);
              -        for (const p of children) {
              -            if (p.#matchName === name) {
              -                return p;
              -            }
              -        }
              -        // didn't find it, create provisional child, since it might not
              -        // actually exist.  If we know the parent isn't a dir, then
              -        // in fact it CAN'T exist.
              -        const s = this.parent ? this.sep : '';
              -        const fullpath = this.#fullpath ? this.#fullpath + s + pathPart : undefined;
              -        const pchild = this.newChild(pathPart, UNKNOWN, {
              -            ...opts,
              -            parent: this,
              -            fullpath,
              -        });
              -        if (!this.canReaddir()) {
              -            pchild.#type |= ENOENT;
              -        }
              -        // don't have to update provisional, because if we have real children,
              -        // then provisional is set to children.length, otherwise a lower number
              -        children.push(pchild);
              -        return pchild;
              -    }
              -    /**
              -     * The relative path from the cwd. If it does not share an ancestor with
              -     * the cwd, then this ends up being equivalent to the fullpath()
              -     */
              -    relative() {
              -        if (this.isCWD)
              -            return '';
              -        if (this.#relative !== undefined) {
              -            return this.#relative;
              -        }
              -        const name = this.name;
              -        const p = this.parent;
              -        if (!p) {
              -            return (this.#relative = this.name);
              -        }
              -        const pv = p.relative();
              -        return pv + (!pv || !p.parent ? '' : this.sep) + name;
              -    }
              -    /**
              -     * The relative path from the cwd, using / as the path separator.
              -     * If it does not share an ancestor with
              -     * the cwd, then this ends up being equivalent to the fullpathPosix()
              -     * On posix systems, this is identical to relative().
              -     */
              -    relativePosix() {
              -        if (this.sep === '/')
              -            return this.relative();
              -        if (this.isCWD)
              -            return '';
              -        if (this.#relativePosix !== undefined)
              -            return this.#relativePosix;
              -        const name = this.name;
              -        const p = this.parent;
              -        if (!p) {
              -            return (this.#relativePosix = this.fullpathPosix());
              -        }
              -        const pv = p.relativePosix();
              -        return pv + (!pv || !p.parent ? '' : '/') + name;
              -    }
              -    /**
              -     * The fully resolved path string for this Path entry
              -     */
              -    fullpath() {
              -        if (this.#fullpath !== undefined) {
              -            return this.#fullpath;
              -        }
              -        const name = this.name;
              -        const p = this.parent;
              -        if (!p) {
              -            return (this.#fullpath = this.name);
              -        }
              -        const pv = p.fullpath();
              -        const fp = pv + (!p.parent ? '' : this.sep) + name;
              -        return (this.#fullpath = fp);
              -    }
              -    /**
              -     * On platforms other than windows, this is identical to fullpath.
              -     *
              -     * On windows, this is overridden to return the forward-slash form of the
              -     * full UNC path.
              -     */
              -    fullpathPosix() {
              -        if (this.#fullpathPosix !== undefined)
              -            return this.#fullpathPosix;
              -        if (this.sep === '/')
              -            return (this.#fullpathPosix = this.fullpath());
              -        if (!this.parent) {
              -            const p = this.fullpath().replace(/\\/g, '/');
              -            if (/^[a-z]:\//i.test(p)) {
              -                return (this.#fullpathPosix = `//?/${p}`);
              -            }
              -            else {
              -                return (this.#fullpathPosix = p);
              -            }
              -        }
              -        const p = this.parent;
              -        const pfpp = p.fullpathPosix();
              -        const fpp = pfpp + (!pfpp || !p.parent ? '' : '/') + this.name;
              -        return (this.#fullpathPosix = fpp);
              -    }
              -    /**
              -     * Is the Path of an unknown type?
              -     *
              -     * Note that we might know *something* about it if there has been a previous
              -     * filesystem operation, for example that it does not exist, or is not a
              -     * link, or whether it has child entries.
              -     */
              -    isUnknown() {
              -        return (this.#type & IFMT) === UNKNOWN;
              -    }
              -    isType(type) {
              -        return this[`is${type}`]();
              -    }
              -    getType() {
              -        return (this.isUnknown() ? 'Unknown'
              -            : this.isDirectory() ? 'Directory'
              -                : this.isFile() ? 'File'
              -                    : this.isSymbolicLink() ? 'SymbolicLink'
              -                        : this.isFIFO() ? 'FIFO'
              -                            : this.isCharacterDevice() ? 'CharacterDevice'
              -                                : this.isBlockDevice() ? 'BlockDevice'
              -                                    : /* c8 ignore start */ this.isSocket() ? 'Socket'
              -                                        : 'Unknown');
              -        /* c8 ignore stop */
              -    }
              -    /**
              -     * Is the Path a regular file?
              -     */
              -    isFile() {
              -        return (this.#type & IFMT) === IFREG;
              -    }
              -    /**
              -     * Is the Path a directory?
              -     */
              -    isDirectory() {
              -        return (this.#type & IFMT) === IFDIR;
              -    }
              -    /**
              -     * Is the path a character device?
              -     */
              -    isCharacterDevice() {
              -        return (this.#type & IFMT) === IFCHR;
              -    }
              -    /**
              -     * Is the path a block device?
              -     */
              -    isBlockDevice() {
              -        return (this.#type & IFMT) === IFBLK;
              -    }
              -    /**
              -     * Is the path a FIFO pipe?
              -     */
              -    isFIFO() {
              -        return (this.#type & IFMT) === IFIFO;
              -    }
              -    /**
              -     * Is the path a socket?
              -     */
              -    isSocket() {
              -        return (this.#type & IFMT) === IFSOCK;
              -    }
              -    /**
              -     * Is the path a symbolic link?
              -     */
              -    isSymbolicLink() {
              -        return (this.#type & IFLNK) === IFLNK;
              -    }
              -    /**
              -     * Return the entry if it has been subject of a successful lstat, or
              -     * undefined otherwise.
              -     *
              -     * Does not read the filesystem, so an undefined result *could* simply
              -     * mean that we haven't called lstat on it.
              -     */
              -    lstatCached() {
              -        return this.#type & LSTAT_CALLED ? this : undefined;
              -    }
              -    /**
              -     * Return the cached link target if the entry has been the subject of a
              -     * successful readlink, or undefined otherwise.
              -     *
              -     * Does not read the filesystem, so an undefined result *could* just mean we
              -     * don't have any cached data. Only use it if you are very sure that a
              -     * readlink() has been called at some point.
              -     */
              -    readlinkCached() {
              -        return this.#linkTarget;
              -    }
              -    /**
              -     * Returns the cached realpath target if the entry has been the subject
              -     * of a successful realpath, or undefined otherwise.
              -     *
              -     * Does not read the filesystem, so an undefined result *could* just mean we
              -     * don't have any cached data. Only use it if you are very sure that a
              -     * realpath() has been called at some point.
              -     */
              -    realpathCached() {
              -        return this.#realpath;
              -    }
              -    /**
              -     * Returns the cached child Path entries array if the entry has been the
              -     * subject of a successful readdir(), or [] otherwise.
              -     *
              -     * Does not read the filesystem, so an empty array *could* just mean we
              -     * don't have any cached data. Only use it if you are very sure that a
              -     * readdir() has been called recently enough to still be valid.
              -     */
              -    readdirCached() {
              -        const children = this.children();
              -        return children.slice(0, children.provisional);
              -    }
              -    /**
              -     * Return true if it's worth trying to readlink.  Ie, we don't (yet) have
              -     * any indication that readlink will definitely fail.
              -     *
              -     * Returns false if the path is known to not be a symlink, if a previous
              -     * readlink failed, or if the entry does not exist.
              -     */
              -    canReadlink() {
              -        if (this.#linkTarget)
              -            return true;
              -        if (!this.parent)
              -            return false;
              -        // cases where it cannot possibly succeed
              -        const ifmt = this.#type & IFMT;
              -        return !((ifmt !== UNKNOWN && ifmt !== IFLNK) ||
              -            this.#type & ENOREADLINK ||
              -            this.#type & ENOENT);
              -    }
              -    /**
              -     * Return true if readdir has previously been successfully called on this
              -     * path, indicating that cachedReaddir() is likely valid.
              -     */
              -    calledReaddir() {
              -        return !!(this.#type & READDIR_CALLED);
              -    }
              -    /**
              -     * Returns true if the path is known to not exist. That is, a previous lstat
              -     * or readdir failed to verify its existence when that would have been
              -     * expected, or a parent entry was marked either enoent or enotdir.
              -     */
              -    isENOENT() {
              -        return !!(this.#type & ENOENT);
              -    }
              -    /**
              -     * Return true if the path is a match for the given path name.  This handles
              -     * case sensitivity and unicode normalization.
              -     *
              -     * Note: even on case-sensitive systems, it is **not** safe to test the
              -     * equality of the `.name` property to determine whether a given pathname
              -     * matches, due to unicode normalization mismatches.
              -     *
              -     * Always use this method instead of testing the `path.name` property
              -     * directly.
              -     */
              -    isNamed(n) {
              -        return !this.nocase ?
              -            this.#matchName === normalize(n)
              -            : this.#matchName === normalizeNocase(n);
              -    }
              -    /**
              -     * Return the Path object corresponding to the target of a symbolic link.
              -     *
              -     * If the Path is not a symbolic link, or if the readlink call fails for any
              -     * reason, `undefined` is returned.
              -     *
              -     * Result is cached, and thus may be outdated if the filesystem is mutated.
              -     */
              -    async readlink() {
              -        const target = this.#linkTarget;
              -        if (target) {
              -            return target;
              -        }
              -        if (!this.canReadlink()) {
              -            return undefined;
              -        }
              -        /* c8 ignore start */
              -        // already covered by the canReadlink test, here for ts grumples
              -        if (!this.parent) {
              -            return undefined;
              -        }
              -        /* c8 ignore stop */
              -        try {
              -            const read = await this.#fs.promises.readlink(this.fullpath());
              -            const linkTarget = (await this.parent.realpath())?.resolve(read);
              -            if (linkTarget) {
              -                return (this.#linkTarget = linkTarget);
              -            }
              -        }
              -        catch (er) {
              -            this.#readlinkFail(er.code);
              -            return undefined;
              -        }
              -    }
              -    /**
              -     * Synchronous {@link PathBase.readlink}
              -     */
              -    readlinkSync() {
              -        const target = this.#linkTarget;
              -        if (target) {
              -            return target;
              -        }
              -        if (!this.canReadlink()) {
              -            return undefined;
              -        }
              -        /* c8 ignore start */
              -        // already covered by the canReadlink test, here for ts grumples
              -        if (!this.parent) {
              -            return undefined;
              -        }
              -        /* c8 ignore stop */
              -        try {
              -            const read = this.#fs.readlinkSync(this.fullpath());
              -            const linkTarget = this.parent.realpathSync()?.resolve(read);
              -            if (linkTarget) {
              -                return (this.#linkTarget = linkTarget);
              -            }
              -        }
              -        catch (er) {
              -            this.#readlinkFail(er.code);
              -            return undefined;
              -        }
              -    }
              -    #readdirSuccess(children) {
              -        // succeeded, mark readdir called bit
              -        this.#type |= READDIR_CALLED;
              -        // mark all remaining provisional children as ENOENT
              -        for (let p = children.provisional; p < children.length; p++) {
              -            const c = children[p];
              -            if (c)
              -                c.#markENOENT();
              -        }
              -    }
              -    #markENOENT() {
              -        // mark as UNKNOWN and ENOENT
              -        if (this.#type & ENOENT)
              -            return;
              -        this.#type = (this.#type | ENOENT) & IFMT_UNKNOWN;
              -        this.#markChildrenENOENT();
              -    }
              -    #markChildrenENOENT() {
              -        // all children are provisional and do not exist
              -        const children = this.children();
              -        children.provisional = 0;
              -        for (const p of children) {
              -            p.#markENOENT();
              -        }
              -    }
              -    #markENOREALPATH() {
              -        this.#type |= ENOREALPATH;
              -        this.#markENOTDIR();
              -    }
              -    // save the information when we know the entry is not a dir
              -    #markENOTDIR() {
              -        // entry is not a directory, so any children can't exist.
              -        // this *should* be impossible, since any children created
              -        // after it's been marked ENOTDIR should be marked ENOENT,
              -        // so it won't even get to this point.
              -        /* c8 ignore start */
              -        if (this.#type & ENOTDIR)
              -            return;
              -        /* c8 ignore stop */
              -        let t = this.#type;
              -        // this could happen if we stat a dir, then delete it,
              -        // then try to read it or one of its children.
              -        if ((t & IFMT) === IFDIR)
              -            t &= IFMT_UNKNOWN;
              -        this.#type = t | ENOTDIR;
              -        this.#markChildrenENOENT();
              -    }
              -    #readdirFail(code = '') {
              -        // markENOTDIR and markENOENT also set provisional=0
              -        if (code === 'ENOTDIR' || code === 'EPERM') {
              -            this.#markENOTDIR();
              -        }
              -        else if (code === 'ENOENT') {
              -            this.#markENOENT();
              -        }
              -        else {
              -            this.children().provisional = 0;
              -        }
              -    }
              -    #lstatFail(code = '') {
              -        // Windows just raises ENOENT in this case, disable for win CI
              -        /* c8 ignore start */
              -        if (code === 'ENOTDIR') {
              -            // already know it has a parent by this point
              -            const p = this.parent;
              -            p.#markENOTDIR();
              -        }
              -        else if (code === 'ENOENT') {
              -            /* c8 ignore stop */
              -            this.#markENOENT();
              -        }
              -    }
              -    #readlinkFail(code = '') {
              -        let ter = this.#type;
              -        ter |= ENOREADLINK;
              -        if (code === 'ENOENT')
              -            ter |= ENOENT;
              -        // windows gets a weird error when you try to readlink a file
              -        if (code === 'EINVAL' || code === 'UNKNOWN') {
              -            // exists, but not a symlink, we don't know WHAT it is, so remove
              -            // all IFMT bits.
              -            ter &= IFMT_UNKNOWN;
              -        }
              -        this.#type = ter;
              -        // windows just gets ENOENT in this case.  We do cover the case,
              -        // just disabled because it's impossible on Windows CI
              -        /* c8 ignore start */
              -        if (code === 'ENOTDIR' && this.parent) {
              -            this.parent.#markENOTDIR();
              -        }
              -        /* c8 ignore stop */
              -    }
              -    #readdirAddChild(e, c) {
              -        return (this.#readdirMaybePromoteChild(e, c) ||
              -            this.#readdirAddNewChild(e, c));
              -    }
              -    #readdirAddNewChild(e, c) {
              -        // alloc new entry at head, so it's never provisional
              -        const type = entToType(e);
              -        const child = this.newChild(e.name, type, { parent: this });
              -        const ifmt = child.#type & IFMT;
              -        if (ifmt !== IFDIR && ifmt !== IFLNK && ifmt !== UNKNOWN) {
              -            child.#type |= ENOTDIR;
              -        }
              -        c.unshift(child);
              -        c.provisional++;
              -        return child;
              -    }
              -    #readdirMaybePromoteChild(e, c) {
              -        for (let p = c.provisional; p < c.length; p++) {
              -            const pchild = c[p];
              -            const name = this.nocase ? normalizeNocase(e.name) : normalize(e.name);
              -            if (name !== pchild.#matchName) {
              -                continue;
              -            }
              -            return this.#readdirPromoteChild(e, pchild, p, c);
              -        }
              -    }
              -    #readdirPromoteChild(e, p, index, c) {
              -        const v = p.name;
              -        // retain any other flags, but set ifmt from dirent
              -        p.#type = (p.#type & IFMT_UNKNOWN) | entToType(e);
              -        // case sensitivity fixing when we learn the true name.
              -        if (v !== e.name)
              -            p.name = e.name;
              -        // just advance provisional index (potentially off the list),
              -        // otherwise we have to splice/pop it out and re-insert at head
              -        if (index !== c.provisional) {
              -            if (index === c.length - 1)
              -                c.pop();
              -            else
              -                c.splice(index, 1);
              -            c.unshift(p);
              -        }
              -        c.provisional++;
              -        return p;
              -    }
              -    /**
              -     * Call lstat() on this Path, and update all known information that can be
              -     * determined.
              -     *
              -     * Note that unlike `fs.lstat()`, the returned value does not contain some
              -     * information, such as `mode`, `dev`, `nlink`, and `ino`.  If that
              -     * information is required, you will need to call `fs.lstat` yourself.
              -     *
              -     * If the Path refers to a nonexistent file, or if the lstat call fails for
              -     * any reason, `undefined` is returned.  Otherwise the updated Path object is
              -     * returned.
              -     *
              -     * Results are cached, and thus may be out of date if the filesystem is
              -     * mutated.
              -     */
              -    async lstat() {
              -        if ((this.#type & ENOENT) === 0) {
              -            try {
              -                this.#applyStat(await this.#fs.promises.lstat(this.fullpath()));
              -                return this;
              -            }
              -            catch (er) {
              -                this.#lstatFail(er.code);
              -            }
              -        }
              -    }
              -    /**
              -     * synchronous {@link PathBase.lstat}
              -     */
              -    lstatSync() {
              -        if ((this.#type & ENOENT) === 0) {
              -            try {
              -                this.#applyStat(this.#fs.lstatSync(this.fullpath()));
              -                return this;
              -            }
              -            catch (er) {
              -                this.#lstatFail(er.code);
              -            }
              -        }
              -    }
              -    #applyStat(st) {
              -        const { atime, atimeMs, birthtime, birthtimeMs, blksize, blocks, ctime, ctimeMs, dev, gid, ino, mode, mtime, mtimeMs, nlink, rdev, size, uid, } = st;
              -        this.#atime = atime;
              -        this.#atimeMs = atimeMs;
              -        this.#birthtime = birthtime;
              -        this.#birthtimeMs = birthtimeMs;
              -        this.#blksize = blksize;
              -        this.#blocks = blocks;
              -        this.#ctime = ctime;
              -        this.#ctimeMs = ctimeMs;
              -        this.#dev = dev;
              -        this.#gid = gid;
              -        this.#ino = ino;
              -        this.#mode = mode;
              -        this.#mtime = mtime;
              -        this.#mtimeMs = mtimeMs;
              -        this.#nlink = nlink;
              -        this.#rdev = rdev;
              -        this.#size = size;
              -        this.#uid = uid;
              -        const ifmt = entToType(st);
              -        // retain any other flags, but set the ifmt
              -        this.#type = (this.#type & IFMT_UNKNOWN) | ifmt | LSTAT_CALLED;
              -        if (ifmt !== UNKNOWN && ifmt !== IFDIR && ifmt !== IFLNK) {
              -            this.#type |= ENOTDIR;
              -        }
              -    }
              -    #onReaddirCB = [];
              -    #readdirCBInFlight = false;
              -    #callOnReaddirCB(children) {
              -        this.#readdirCBInFlight = false;
              -        const cbs = this.#onReaddirCB.slice();
              -        this.#onReaddirCB.length = 0;
              -        cbs.forEach(cb => cb(null, children));
              -    }
              -    /**
              -     * Standard node-style callback interface to get list of directory entries.
              -     *
              -     * If the Path cannot or does not contain any children, then an empty array
              -     * is returned.
              -     *
              -     * Results are cached, and thus may be out of date if the filesystem is
              -     * mutated.
              -     *
              -     * @param cb The callback called with (er, entries).  Note that the `er`
              -     * param is somewhat extraneous, as all readdir() errors are handled and
              -     * simply result in an empty set of entries being returned.
              -     * @param allowZalgo Boolean indicating that immediately known results should
              -     * *not* be deferred with `queueMicrotask`. Defaults to `false`. Release
              -     * zalgo at your peril, the dark pony lord is devious and unforgiving.
              -     */
              -    readdirCB(cb, allowZalgo = false) {
              -        if (!this.canReaddir()) {
              -            if (allowZalgo)
              -                cb(null, []);
              -            else
              -                queueMicrotask(() => cb(null, []));
              -            return;
              -        }
              -        const children = this.children();
              -        if (this.calledReaddir()) {
              -            const c = children.slice(0, children.provisional);
              -            if (allowZalgo)
              -                cb(null, c);
              -            else
              -                queueMicrotask(() => cb(null, c));
              -            return;
              -        }
              -        // don't have to worry about zalgo at this point.
              -        this.#onReaddirCB.push(cb);
              -        if (this.#readdirCBInFlight) {
              -            return;
              -        }
              -        this.#readdirCBInFlight = true;
              -        // else read the directory, fill up children
              -        // de-provisionalize any provisional children.
              -        const fullpath = this.fullpath();
              -        this.#fs.readdir(fullpath, { withFileTypes: true }, (er, entries) => {
              -            if (er) {
              -                this.#readdirFail(er.code);
              -                children.provisional = 0;
              -            }
              -            else {
              -                // if we didn't get an error, we always get entries.
              -                //@ts-ignore
              -                for (const e of entries) {
              -                    this.#readdirAddChild(e, children);
              -                }
              -                this.#readdirSuccess(children);
              -            }
              -            this.#callOnReaddirCB(children.slice(0, children.provisional));
              -            return;
              -        });
              -    }
              -    #asyncReaddirInFlight;
              -    /**
              -     * Return an array of known child entries.
              -     *
              -     * If the Path cannot or does not contain any children, then an empty array
              -     * is returned.
              -     *
              -     * Results are cached, and thus may be out of date if the filesystem is
              -     * mutated.
              -     */
              -    async readdir() {
              -        if (!this.canReaddir()) {
              -            return [];
              -        }
              -        const children = this.children();
              -        if (this.calledReaddir()) {
              -            return children.slice(0, children.provisional);
              -        }
              -        // else read the directory, fill up children
              -        // de-provisionalize any provisional children.
              -        const fullpath = this.fullpath();
              -        if (this.#asyncReaddirInFlight) {
              -            await this.#asyncReaddirInFlight;
              -        }
              -        else {
              -            /* c8 ignore start */
              -            let resolve = () => { };
              -            /* c8 ignore stop */
              -            this.#asyncReaddirInFlight = new Promise(res => (resolve = res));
              -            try {
              -                for (const e of await this.#fs.promises.readdir(fullpath, {
              -                    withFileTypes: true,
              -                })) {
              -                    this.#readdirAddChild(e, children);
              -                }
              -                this.#readdirSuccess(children);
              -            }
              -            catch (er) {
              -                this.#readdirFail(er.code);
              -                children.provisional = 0;
              -            }
              -            this.#asyncReaddirInFlight = undefined;
              -            resolve();
              -        }
              -        return children.slice(0, children.provisional);
              -    }
              -    /**
              -     * synchronous {@link PathBase.readdir}
              -     */
              -    readdirSync() {
              -        if (!this.canReaddir()) {
              -            return [];
              -        }
              -        const children = this.children();
              -        if (this.calledReaddir()) {
              -            return children.slice(0, children.provisional);
              -        }
              -        // else read the directory, fill up children
              -        // de-provisionalize any provisional children.
              -        const fullpath = this.fullpath();
              -        try {
              -            for (const e of this.#fs.readdirSync(fullpath, {
              -                withFileTypes: true,
              -            })) {
              -                this.#readdirAddChild(e, children);
              -            }
              -            this.#readdirSuccess(children);
              -        }
              -        catch (er) {
              -            this.#readdirFail(er.code);
              -            children.provisional = 0;
              -        }
              -        return children.slice(0, children.provisional);
              -    }
              -    canReaddir() {
              -        if (this.#type & ENOCHILD)
              -            return false;
              -        const ifmt = IFMT & this.#type;
              -        // we always set ENOTDIR when setting IFMT, so should be impossible
              -        /* c8 ignore start */
              -        if (!(ifmt === UNKNOWN || ifmt === IFDIR || ifmt === IFLNK)) {
              -            return false;
              -        }
              -        /* c8 ignore stop */
              -        return true;
              -    }
              -    shouldWalk(dirs, walkFilter) {
              -        return ((this.#type & IFDIR) === IFDIR &&
              -            !(this.#type & ENOCHILD) &&
              -            !dirs.has(this) &&
              -            (!walkFilter || walkFilter(this)));
              -    }
              -    /**
              -     * Return the Path object corresponding to path as resolved
              -     * by realpath(3).
              -     *
              -     * If the realpath call fails for any reason, `undefined` is returned.
              -     *
              -     * Result is cached, and thus may be outdated if the filesystem is mutated.
              -     * On success, returns a Path object.
              -     */
              -    async realpath() {
              -        if (this.#realpath)
              -            return this.#realpath;
              -        if ((ENOREALPATH | ENOREADLINK | ENOENT) & this.#type)
              -            return undefined;
              -        try {
              -            const rp = await this.#fs.promises.realpath(this.fullpath());
              -            return (this.#realpath = this.resolve(rp));
              -        }
              -        catch (_) {
              -            this.#markENOREALPATH();
              -        }
              -    }
              -    /**
              -     * Synchronous {@link realpath}
              -     */
              -    realpathSync() {
              -        if (this.#realpath)
              -            return this.#realpath;
              -        if ((ENOREALPATH | ENOREADLINK | ENOENT) & this.#type)
              -            return undefined;
              -        try {
              -            const rp = this.#fs.realpathSync(this.fullpath());
              -            return (this.#realpath = this.resolve(rp));
              -        }
              -        catch (_) {
              -            this.#markENOREALPATH();
              -        }
              -    }
              -    /**
              -     * Internal method to mark this Path object as the scurry cwd,
              -     * called by {@link PathScurry#chdir}
              -     *
              -     * @internal
              -     */
              -    [setAsCwd](oldCwd) {
              -        if (oldCwd === this)
              -            return;
              -        oldCwd.isCWD = false;
              -        this.isCWD = true;
              -        const changed = new Set([]);
              -        let rp = [];
              -        let p = this;
              -        while (p && p.parent) {
              -            changed.add(p);
              -            p.#relative = rp.join(this.sep);
              -            p.#relativePosix = rp.join('/');
              -            p = p.parent;
              -            rp.push('..');
              -        }
              -        // now un-memoize parents of old cwd
              -        p = oldCwd;
              -        while (p && p.parent && !changed.has(p)) {
              -            p.#relative = undefined;
              -            p.#relativePosix = undefined;
              -            p = p.parent;
              -        }
              -    }
              -}
              -exports.PathBase = PathBase;
              -/**
              - * Path class used on win32 systems
              - *
              - * Uses `'\\'` as the path separator for returned paths, either `'\\'` or `'/'`
              - * as the path separator for parsing paths.
              - */
              -class PathWin32 extends PathBase {
              -    /**
              -     * Separator for generating path strings.
              -     */
              -    sep = '\\';
              -    /**
              -     * Separator for parsing path strings.
              -     */
              -    splitSep = eitherSep;
              -    /**
              -     * Do not create new Path objects directly.  They should always be accessed
              -     * via the PathScurry class or other methods on the Path class.
              -     *
              -     * @internal
              -     */
              -    constructor(name, type = UNKNOWN, root, roots, nocase, children, opts) {
              -        super(name, type, root, roots, nocase, children, opts);
              -    }
              -    /**
              -     * @internal
              -     */
              -    newChild(name, type = UNKNOWN, opts = {}) {
              -        return new PathWin32(name, type, this.root, this.roots, this.nocase, this.childrenCache(), opts);
              -    }
              -    /**
              -     * @internal
              -     */
              -    getRootString(path) {
              -        return node_path_1.win32.parse(path).root;
              -    }
              -    /**
              -     * @internal
              -     */
              -    getRoot(rootPath) {
              -        rootPath = uncToDrive(rootPath.toUpperCase());
              -        if (rootPath === this.root.name) {
              -            return this.root;
              -        }
              -        // ok, not that one, check if it matches another we know about
              -        for (const [compare, root] of Object.entries(this.roots)) {
              -            if (this.sameRoot(rootPath, compare)) {
              -                return (this.roots[rootPath] = root);
              -            }
              -        }
              -        // otherwise, have to create a new one.
              -        return (this.roots[rootPath] = new PathScurryWin32(rootPath, this).root);
              -    }
              -    /**
              -     * @internal
              -     */
              -    sameRoot(rootPath, compare = this.root.name) {
              -        // windows can (rarely) have case-sensitive filesystem, but
              -        // UNC and drive letters are always case-insensitive, and canonically
              -        // represented uppercase.
              -        rootPath = rootPath
              -            .toUpperCase()
              -            .replace(/\//g, '\\')
              -            .replace(uncDriveRegexp, '$1\\');
              -        return rootPath === compare;
              -    }
              -}
              -exports.PathWin32 = PathWin32;
              -/**
              - * Path class used on all posix systems.
              - *
              - * Uses `'/'` as the path separator.
              - */
              -class PathPosix extends PathBase {
              -    /**
              -     * separator for parsing path strings
              -     */
              -    splitSep = '/';
              -    /**
              -     * separator for generating path strings
              -     */
              -    sep = '/';
              -    /**
              -     * Do not create new Path objects directly.  They should always be accessed
              -     * via the PathScurry class or other methods on the Path class.
              -     *
              -     * @internal
              -     */
              -    constructor(name, type = UNKNOWN, root, roots, nocase, children, opts) {
              -        super(name, type, root, roots, nocase, children, opts);
              -    }
              -    /**
              -     * @internal
              -     */
              -    getRootString(path) {
              -        return path.startsWith('/') ? '/' : '';
              -    }
              -    /**
              -     * @internal
              -     */
              -    getRoot(_rootPath) {
              -        return this.root;
              -    }
              -    /**
              -     * @internal
              -     */
              -    newChild(name, type = UNKNOWN, opts = {}) {
              -        return new PathPosix(name, type, this.root, this.roots, this.nocase, this.childrenCache(), opts);
              -    }
              -}
              -exports.PathPosix = PathPosix;
              -/**
              - * The base class for all PathScurry classes, providing the interface for path
              - * resolution and filesystem operations.
              - *
              - * Typically, you should *not* instantiate this class directly, but rather one
              - * of the platform-specific classes, or the exported {@link PathScurry} which
              - * defaults to the current platform.
              - */
              -class PathScurryBase {
              -    /**
              -     * The root Path entry for the current working directory of this Scurry
              -     */
              -    root;
              -    /**
              -     * The string path for the root of this Scurry's current working directory
              -     */
              -    rootPath;
              -    /**
              -     * A collection of all roots encountered, referenced by rootPath
              -     */
              -    roots;
              -    /**
              -     * The Path entry corresponding to this PathScurry's current working directory.
              -     */
              -    cwd;
              -    #resolveCache;
              -    #resolvePosixCache;
              -    #children;
              -    /**
              -     * Perform path comparisons case-insensitively.
              -     *
              -     * Defaults true on Darwin and Windows systems, false elsewhere.
              -     */
              -    nocase;
              -    #fs;
              -    /**
              -     * This class should not be instantiated directly.
              -     *
              -     * Use PathScurryWin32, PathScurryDarwin, PathScurryPosix, or PathScurry
              -     *
              -     * @internal
              -     */
              -    constructor(cwd = process.cwd(), pathImpl, sep, { nocase, childrenCacheSize = 16 * 1024, fs = defaultFS, } = {}) {
              -        this.#fs = fsFromOption(fs);
              -        if (cwd instanceof URL || cwd.startsWith('file://')) {
              -            cwd = (0, node_url_1.fileURLToPath)(cwd);
              -        }
              -        // resolve and split root, and then add to the store.
              -        // this is the only time we call path.resolve()
              -        const cwdPath = pathImpl.resolve(cwd);
              -        this.roots = Object.create(null);
              -        this.rootPath = this.parseRootPath(cwdPath);
              -        this.#resolveCache = new ResolveCache();
              -        this.#resolvePosixCache = new ResolveCache();
              -        this.#children = new ChildrenCache(childrenCacheSize);
              -        const split = cwdPath.substring(this.rootPath.length).split(sep);
              -        // resolve('/') leaves '', splits to [''], we don't want that.
              -        if (split.length === 1 && !split[0]) {
              -            split.pop();
              -        }
              -        /* c8 ignore start */
              -        if (nocase === undefined) {
              -            throw new TypeError('must provide nocase setting to PathScurryBase ctor');
              -        }
              -        /* c8 ignore stop */
              -        this.nocase = nocase;
              -        this.root = this.newRoot(this.#fs);
              -        this.roots[this.rootPath] = this.root;
              -        let prev = this.root;
              -        let len = split.length - 1;
              -        const joinSep = pathImpl.sep;
              -        let abs = this.rootPath;
              -        let sawFirst = false;
              -        for (const part of split) {
              -            const l = len--;
              -            prev = prev.child(part, {
              -                relative: new Array(l).fill('..').join(joinSep),
              -                relativePosix: new Array(l).fill('..').join('/'),
              -                fullpath: (abs += (sawFirst ? '' : joinSep) + part),
              -            });
              -            sawFirst = true;
              -        }
              -        this.cwd = prev;
              -    }
              -    /**
              -     * Get the depth of a provided path, string, or the cwd
              -     */
              -    depth(path = this.cwd) {
              -        if (typeof path === 'string') {
              -            path = this.cwd.resolve(path);
              -        }
              -        return path.depth();
              -    }
              -    /**
              -     * Return the cache of child entries.  Exposed so subclasses can create
              -     * child Path objects in a platform-specific way.
              -     *
              -     * @internal
              -     */
              -    childrenCache() {
              -        return this.#children;
              -    }
              -    /**
              -     * Resolve one or more path strings to a resolved string
              -     *
              -     * Same interface as require('path').resolve.
              -     *
              -     * Much faster than path.resolve() when called multiple times for the same
              -     * path, because the resolved Path objects are cached.  Much slower
              -     * otherwise.
              -     */
              -    resolve(...paths) {
              -        // first figure out the minimum number of paths we have to test
              -        // we always start at cwd, but any absolutes will bump the start
              -        let r = '';
              -        for (let i = paths.length - 1; i >= 0; i--) {
              -            const p = paths[i];
              -            if (!p || p === '.')
              -                continue;
              -            r = r ? `${p}/${r}` : p;
              -            if (this.isAbsolute(p)) {
              -                break;
              -            }
              -        }
              -        const cached = this.#resolveCache.get(r);
              -        if (cached !== undefined) {
              -            return cached;
              -        }
              -        const result = this.cwd.resolve(r).fullpath();
              -        this.#resolveCache.set(r, result);
              -        return result;
              -    }
              -    /**
              -     * Resolve one or more path strings to a resolved string, returning
              -     * the posix path.  Identical to .resolve() on posix systems, but on
              -     * windows will return a forward-slash separated UNC path.
              -     *
              -     * Same interface as require('path').resolve.
              -     *
              -     * Much faster than path.resolve() when called multiple times for the same
              -     * path, because the resolved Path objects are cached.  Much slower
              -     * otherwise.
              -     */
              -    resolvePosix(...paths) {
              -        // first figure out the minimum number of paths we have to test
              -        // we always start at cwd, but any absolutes will bump the start
              -        let r = '';
              -        for (let i = paths.length - 1; i >= 0; i--) {
              -            const p = paths[i];
              -            if (!p || p === '.')
              -                continue;
              -            r = r ? `${p}/${r}` : p;
              -            if (this.isAbsolute(p)) {
              -                break;
              -            }
              -        }
              -        const cached = this.#resolvePosixCache.get(r);
              -        if (cached !== undefined) {
              -            return cached;
              -        }
              -        const result = this.cwd.resolve(r).fullpathPosix();
              -        this.#resolvePosixCache.set(r, result);
              -        return result;
              -    }
              -    /**
              -     * find the relative path from the cwd to the supplied path string or entry
              -     */
              -    relative(entry = this.cwd) {
              -        if (typeof entry === 'string') {
              -            entry = this.cwd.resolve(entry);
              -        }
              -        return entry.relative();
              -    }
              -    /**
              -     * find the relative path from the cwd to the supplied path string or
              -     * entry, using / as the path delimiter, even on Windows.
              -     */
              -    relativePosix(entry = this.cwd) {
              -        if (typeof entry === 'string') {
              -            entry = this.cwd.resolve(entry);
              -        }
              -        return entry.relativePosix();
              -    }
              -    /**
              -     * Return the basename for the provided string or Path object
              -     */
              -    basename(entry = this.cwd) {
              -        if (typeof entry === 'string') {
              -            entry = this.cwd.resolve(entry);
              -        }
              -        return entry.name;
              -    }
              -    /**
              -     * Return the dirname for the provided string or Path object
              -     */
              -    dirname(entry = this.cwd) {
              -        if (typeof entry === 'string') {
              -            entry = this.cwd.resolve(entry);
              -        }
              -        return (entry.parent || entry).fullpath();
              -    }
              -    async readdir(entry = this.cwd, opts = {
              -        withFileTypes: true,
              -    }) {
              -        if (typeof entry === 'string') {
              -            entry = this.cwd.resolve(entry);
              -        }
              -        else if (!(entry instanceof PathBase)) {
              -            opts = entry;
              -            entry = this.cwd;
              -        }
              -        const { withFileTypes } = opts;
              -        if (!entry.canReaddir()) {
              -            return [];
              -        }
              -        else {
              -            const p = await entry.readdir();
              -            return withFileTypes ? p : p.map(e => e.name);
              -        }
              -    }
              -    readdirSync(entry = this.cwd, opts = {
              -        withFileTypes: true,
              -    }) {
              -        if (typeof entry === 'string') {
              -            entry = this.cwd.resolve(entry);
              -        }
              -        else if (!(entry instanceof PathBase)) {
              -            opts = entry;
              -            entry = this.cwd;
              -        }
              -        const { withFileTypes = true } = opts;
              -        if (!entry.canReaddir()) {
              -            return [];
              -        }
              -        else if (withFileTypes) {
              -            return entry.readdirSync();
              -        }
              -        else {
              -            return entry.readdirSync().map(e => e.name);
              -        }
              -    }
              -    /**
              -     * Call lstat() on the string or Path object, and update all known
              -     * information that can be determined.
              -     *
              -     * Note that unlike `fs.lstat()`, the returned value does not contain some
              -     * information, such as `mode`, `dev`, `nlink`, and `ino`.  If that
              -     * information is required, you will need to call `fs.lstat` yourself.
              -     *
              -     * If the Path refers to a nonexistent file, or if the lstat call fails for
              -     * any reason, `undefined` is returned.  Otherwise the updated Path object is
              -     * returned.
              -     *
              -     * Results are cached, and thus may be out of date if the filesystem is
              -     * mutated.
              -     */
              -    async lstat(entry = this.cwd) {
              -        if (typeof entry === 'string') {
              -            entry = this.cwd.resolve(entry);
              -        }
              -        return entry.lstat();
              -    }
              -    /**
              -     * synchronous {@link PathScurryBase.lstat}
              -     */
              -    lstatSync(entry = this.cwd) {
              -        if (typeof entry === 'string') {
              -            entry = this.cwd.resolve(entry);
              -        }
              -        return entry.lstatSync();
              -    }
              -    async readlink(entry = this.cwd, { withFileTypes } = {
              -        withFileTypes: false,
              -    }) {
              -        if (typeof entry === 'string') {
              -            entry = this.cwd.resolve(entry);
              -        }
              -        else if (!(entry instanceof PathBase)) {
              -            withFileTypes = entry.withFileTypes;
              -            entry = this.cwd;
              -        }
              -        const e = await entry.readlink();
              -        return withFileTypes ? e : e?.fullpath();
              -    }
              -    readlinkSync(entry = this.cwd, { withFileTypes } = {
              -        withFileTypes: false,
              -    }) {
              -        if (typeof entry === 'string') {
              -            entry = this.cwd.resolve(entry);
              -        }
              -        else if (!(entry instanceof PathBase)) {
              -            withFileTypes = entry.withFileTypes;
              -            entry = this.cwd;
              -        }
              -        const e = entry.readlinkSync();
              -        return withFileTypes ? e : e?.fullpath();
              -    }
              -    async realpath(entry = this.cwd, { withFileTypes } = {
              -        withFileTypes: false,
              -    }) {
              -        if (typeof entry === 'string') {
              -            entry = this.cwd.resolve(entry);
              -        }
              -        else if (!(entry instanceof PathBase)) {
              -            withFileTypes = entry.withFileTypes;
              -            entry = this.cwd;
              -        }
              -        const e = await entry.realpath();
              -        return withFileTypes ? e : e?.fullpath();
              -    }
              -    realpathSync(entry = this.cwd, { withFileTypes } = {
              -        withFileTypes: false,
              -    }) {
              -        if (typeof entry === 'string') {
              -            entry = this.cwd.resolve(entry);
              -        }
              -        else if (!(entry instanceof PathBase)) {
              -            withFileTypes = entry.withFileTypes;
              -            entry = this.cwd;
              -        }
              -        const e = entry.realpathSync();
              -        return withFileTypes ? e : e?.fullpath();
              -    }
              -    async walk(entry = this.cwd, opts = {}) {
              -        if (typeof entry === 'string') {
              -            entry = this.cwd.resolve(entry);
              -        }
              -        else if (!(entry instanceof PathBase)) {
              -            opts = entry;
              -            entry = this.cwd;
              -        }
              -        const { withFileTypes = true, follow = false, filter, walkFilter, } = opts;
              -        const results = [];
              -        if (!filter || filter(entry)) {
              -            results.push(withFileTypes ? entry : entry.fullpath());
              -        }
              -        const dirs = new Set();
              -        const walk = (dir, cb) => {
              -            dirs.add(dir);
              -            dir.readdirCB((er, entries) => {
              -                /* c8 ignore start */
              -                if (er) {
              -                    return cb(er);
              -                }
              -                /* c8 ignore stop */
              -                let len = entries.length;
              -                if (!len)
              -                    return cb();
              -                const next = () => {
              -                    if (--len === 0) {
              -                        cb();
              -                    }
              -                };
              -                for (const e of entries) {
              -                    if (!filter || filter(e)) {
              -                        results.push(withFileTypes ? e : e.fullpath());
              -                    }
              -                    if (follow && e.isSymbolicLink()) {
              -                        e.realpath()
              -                            .then(r => (r?.isUnknown() ? r.lstat() : r))
              -                            .then(r => r?.shouldWalk(dirs, walkFilter) ? walk(r, next) : next());
              -                    }
              -                    else {
              -                        if (e.shouldWalk(dirs, walkFilter)) {
              -                            walk(e, next);
              -                        }
              -                        else {
              -                            next();
              -                        }
              -                    }
              -                }
              -            }, true); // zalgooooooo
              -        };
              -        const start = entry;
              -        return new Promise((res, rej) => {
              -            walk(start, er => {
              -                /* c8 ignore start */
              -                if (er)
              -                    return rej(er);
              -                /* c8 ignore stop */
              -                res(results);
              -            });
              -        });
              -    }
              -    walkSync(entry = this.cwd, opts = {}) {
              -        if (typeof entry === 'string') {
              -            entry = this.cwd.resolve(entry);
              -        }
              -        else if (!(entry instanceof PathBase)) {
              -            opts = entry;
              -            entry = this.cwd;
              -        }
              -        const { withFileTypes = true, follow = false, filter, walkFilter, } = opts;
              -        const results = [];
              -        if (!filter || filter(entry)) {
              -            results.push(withFileTypes ? entry : entry.fullpath());
              -        }
              -        const dirs = new Set([entry]);
              -        for (const dir of dirs) {
              -            const entries = dir.readdirSync();
              -            for (const e of entries) {
              -                if (!filter || filter(e)) {
              -                    results.push(withFileTypes ? e : e.fullpath());
              -                }
              -                let r = e;
              -                if (e.isSymbolicLink()) {
              -                    if (!(follow && (r = e.realpathSync())))
              -                        continue;
              -                    if (r.isUnknown())
              -                        r.lstatSync();
              -                }
              -                if (r.shouldWalk(dirs, walkFilter)) {
              -                    dirs.add(r);
              -                }
              -            }
              -        }
              -        return results;
              -    }
              -    /**
              -     * Support for `for await`
              -     *
              -     * Alias for {@link PathScurryBase.iterate}
              -     *
              -     * Note: As of Node 19, this is very slow, compared to other methods of
              -     * walking.  Consider using {@link PathScurryBase.stream} if memory overhead
              -     * and backpressure are concerns, or {@link PathScurryBase.walk} if not.
              -     */
              -    [Symbol.asyncIterator]() {
              -        return this.iterate();
              -    }
              -    iterate(entry = this.cwd, options = {}) {
              -        // iterating async over the stream is significantly more performant,
              -        // especially in the warm-cache scenario, because it buffers up directory
              -        // entries in the background instead of waiting for a yield for each one.
              -        if (typeof entry === 'string') {
              -            entry = this.cwd.resolve(entry);
              -        }
              -        else if (!(entry instanceof PathBase)) {
              -            options = entry;
              -            entry = this.cwd;
              -        }
              -        return this.stream(entry, options)[Symbol.asyncIterator]();
              -    }
              -    /**
              -     * Iterating over a PathScurry performs a synchronous walk.
              -     *
              -     * Alias for {@link PathScurryBase.iterateSync}
              -     */
              -    [Symbol.iterator]() {
              -        return this.iterateSync();
              -    }
              -    *iterateSync(entry = this.cwd, opts = {}) {
              -        if (typeof entry === 'string') {
              -            entry = this.cwd.resolve(entry);
              -        }
              -        else if (!(entry instanceof PathBase)) {
              -            opts = entry;
              -            entry = this.cwd;
              -        }
              -        const { withFileTypes = true, follow = false, filter, walkFilter, } = opts;
              -        if (!filter || filter(entry)) {
              -            yield withFileTypes ? entry : entry.fullpath();
              -        }
              -        const dirs = new Set([entry]);
              -        for (const dir of dirs) {
              -            const entries = dir.readdirSync();
              -            for (const e of entries) {
              -                if (!filter || filter(e)) {
              -                    yield withFileTypes ? e : e.fullpath();
              -                }
              -                let r = e;
              -                if (e.isSymbolicLink()) {
              -                    if (!(follow && (r = e.realpathSync())))
              -                        continue;
              -                    if (r.isUnknown())
              -                        r.lstatSync();
              -                }
              -                if (r.shouldWalk(dirs, walkFilter)) {
              -                    dirs.add(r);
              -                }
              -            }
              -        }
              -    }
              -    stream(entry = this.cwd, opts = {}) {
              -        if (typeof entry === 'string') {
              -            entry = this.cwd.resolve(entry);
              -        }
              -        else if (!(entry instanceof PathBase)) {
              -            opts = entry;
              -            entry = this.cwd;
              -        }
              -        const { withFileTypes = true, follow = false, filter, walkFilter, } = opts;
              -        const results = new minipass_1.Minipass({ objectMode: true });
              -        if (!filter || filter(entry)) {
              -            results.write(withFileTypes ? entry : entry.fullpath());
              -        }
              -        const dirs = new Set();
              -        const queue = [entry];
              -        let processing = 0;
              -        const process = () => {
              -            let paused = false;
              -            while (!paused) {
              -                const dir = queue.shift();
              -                if (!dir) {
              -                    if (processing === 0)
              -                        results.end();
              -                    return;
              -                }
              -                processing++;
              -                dirs.add(dir);
              -                const onReaddir = (er, entries, didRealpaths = false) => {
              -                    /* c8 ignore start */
              -                    if (er)
              -                        return results.emit('error', er);
              -                    /* c8 ignore stop */
              -                    if (follow && !didRealpaths) {
              -                        const promises = [];
              -                        for (const e of entries) {
              -                            if (e.isSymbolicLink()) {
              -                                promises.push(e
              -                                    .realpath()
              -                                    .then((r) => r?.isUnknown() ? r.lstat() : r));
              -                            }
              -                        }
              -                        if (promises.length) {
              -                            Promise.all(promises).then(() => onReaddir(null, entries, true));
              -                            return;
              -                        }
              -                    }
              -                    for (const e of entries) {
              -                        if (e && (!filter || filter(e))) {
              -                            if (!results.write(withFileTypes ? e : e.fullpath())) {
              -                                paused = true;
              -                            }
              -                        }
              -                    }
              -                    processing--;
              -                    for (const e of entries) {
              -                        const r = e.realpathCached() || e;
              -                        if (r.shouldWalk(dirs, walkFilter)) {
              -                            queue.push(r);
              -                        }
              -                    }
              -                    if (paused && !results.flowing) {
              -                        results.once('drain', process);
              -                    }
              -                    else if (!sync) {
              -                        process();
              -                    }
              -                };
              -                // zalgo containment
              -                let sync = true;
              -                dir.readdirCB(onReaddir, true);
              -                sync = false;
              -            }
              -        };
              -        process();
              -        return results;
              -    }
              -    streamSync(entry = this.cwd, opts = {}) {
              -        if (typeof entry === 'string') {
              -            entry = this.cwd.resolve(entry);
              -        }
              -        else if (!(entry instanceof PathBase)) {
              -            opts = entry;
              -            entry = this.cwd;
              -        }
              -        const { withFileTypes = true, follow = false, filter, walkFilter, } = opts;
              -        const results = new minipass_1.Minipass({ objectMode: true });
              -        const dirs = new Set();
              -        if (!filter || filter(entry)) {
              -            results.write(withFileTypes ? entry : entry.fullpath());
              -        }
              -        const queue = [entry];
              -        let processing = 0;
              -        const process = () => {
              -            let paused = false;
              -            while (!paused) {
              -                const dir = queue.shift();
              -                if (!dir) {
              -                    if (processing === 0)
              -                        results.end();
              -                    return;
              -                }
              -                processing++;
              -                dirs.add(dir);
              -                const entries = dir.readdirSync();
              -                for (const e of entries) {
              -                    if (!filter || filter(e)) {
              -                        if (!results.write(withFileTypes ? e : e.fullpath())) {
              -                            paused = true;
              -                        }
              -                    }
              -                }
              -                processing--;
              -                for (const e of entries) {
              -                    let r = e;
              -                    if (e.isSymbolicLink()) {
              -                        if (!(follow && (r = e.realpathSync())))
              -                            continue;
              -                        if (r.isUnknown())
              -                            r.lstatSync();
              -                    }
              -                    if (r.shouldWalk(dirs, walkFilter)) {
              -                        queue.push(r);
              -                    }
              -                }
              -            }
              -            if (paused && !results.flowing)
              -                results.once('drain', process);
              -        };
              -        process();
              -        return results;
              -    }
              -    chdir(path = this.cwd) {
              -        const oldCwd = this.cwd;
              -        this.cwd = typeof path === 'string' ? this.cwd.resolve(path) : path;
              -        this.cwd[setAsCwd](oldCwd);
              -    }
              -}
              -exports.PathScurryBase = PathScurryBase;
              -/**
              - * Windows implementation of {@link PathScurryBase}
              - *
              - * Defaults to case insensitve, uses `'\\'` to generate path strings.  Uses
              - * {@link PathWin32} for Path objects.
              - */
              -class PathScurryWin32 extends PathScurryBase {
              -    /**
              -     * separator for generating path strings
              -     */
              -    sep = '\\';
              -    constructor(cwd = process.cwd(), opts = {}) {
              -        const { nocase = true } = opts;
              -        super(cwd, node_path_1.win32, '\\', { ...opts, nocase });
              -        this.nocase = nocase;
              -        for (let p = this.cwd; p; p = p.parent) {
              -            p.nocase = this.nocase;
              -        }
              -    }
              -    /**
              -     * @internal
              -     */
              -    parseRootPath(dir) {
              -        // if the path starts with a single separator, it's not a UNC, and we'll
              -        // just get separator as the root, and driveFromUNC will return \
              -        // In that case, mount \ on the root from the cwd.
              -        return node_path_1.win32.parse(dir).root.toUpperCase();
              -    }
              -    /**
              -     * @internal
              -     */
              -    newRoot(fs) {
              -        return new PathWin32(this.rootPath, IFDIR, undefined, this.roots, this.nocase, this.childrenCache(), { fs });
              -    }
              -    /**
              -     * Return true if the provided path string is an absolute path
              -     */
              -    isAbsolute(p) {
              -        return (p.startsWith('/') || p.startsWith('\\') || /^[a-z]:(\/|\\)/i.test(p));
              -    }
              -}
              -exports.PathScurryWin32 = PathScurryWin32;
              -/**
              - * {@link PathScurryBase} implementation for all posix systems other than Darwin.
              - *
              - * Defaults to case-sensitive matching, uses `'/'` to generate path strings.
              - *
              - * Uses {@link PathPosix} for Path objects.
              - */
              -class PathScurryPosix extends PathScurryBase {
              -    /**
              -     * separator for generating path strings
              -     */
              -    sep = '/';
              -    constructor(cwd = process.cwd(), opts = {}) {
              -        const { nocase = false } = opts;
              -        super(cwd, node_path_1.posix, '/', { ...opts, nocase });
              -        this.nocase = nocase;
              -    }
              -    /**
              -     * @internal
              -     */
              -    parseRootPath(_dir) {
              -        return '/';
              -    }
              -    /**
              -     * @internal
              -     */
              -    newRoot(fs) {
              -        return new PathPosix(this.rootPath, IFDIR, undefined, this.roots, this.nocase, this.childrenCache(), { fs });
              -    }
              -    /**
              -     * Return true if the provided path string is an absolute path
              -     */
              -    isAbsolute(p) {
              -        return p.startsWith('/');
              -    }
              -}
              -exports.PathScurryPosix = PathScurryPosix;
              -/**
              - * {@link PathScurryBase} implementation for Darwin (macOS) systems.
              - *
              - * Defaults to case-insensitive matching, uses `'/'` for generating path
              - * strings.
              - *
              - * Uses {@link PathPosix} for Path objects.
              - */
              -class PathScurryDarwin extends PathScurryPosix {
              -    constructor(cwd = process.cwd(), opts = {}) {
              -        const { nocase = true } = opts;
              -        super(cwd, { ...opts, nocase });
              -    }
              -}
              -exports.PathScurryDarwin = PathScurryDarwin;
              -/**
              - * Default {@link PathBase} implementation for the current platform.
              - *
              - * {@link PathWin32} on Windows systems, {@link PathPosix} on all others.
              - */
              -exports.Path = process.platform === 'win32' ? PathWin32 : PathPosix;
              -/**
              - * Default {@link PathScurryBase} implementation for the current platform.
              - *
              - * {@link PathScurryWin32} on Windows systems, {@link PathScurryDarwin} on
              - * Darwin (macOS) systems, {@link PathScurryPosix} on all others.
              - */
              -exports.PathScurry = process.platform === 'win32' ? PathScurryWin32
              -    : process.platform === 'darwin' ? PathScurryDarwin
              -        : PathScurryPosix;
              -//# sourceMappingURL=index.js.map
              \ No newline at end of file
              diff --git a/node_modules/path-scurry/dist/commonjs/index.js.map b/node_modules/path-scurry/dist/commonjs/index.js.map
              deleted file mode 100644
              index fdeca217..00000000
              --- a/node_modules/path-scurry/dist/commonjs/index.js.map
              +++ /dev/null
              @@ -1 +0,0 @@
              -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAAoC;AACpC,yCAAwC;AAExC,uCAAwC;AAExC,2BAMW;AACX,kDAAmC;AAEnC,MAAM,YAAY,GAAG,iBAAG,CAAC,MAAM,CAAA;AAC/B,yDAAyD;AACzD,8CAA8C;AAE9C,+CAAqE;AAErE,uCAAmC;AAqEnC,MAAM,SAAS,GAAY;IACzB,SAAS,EAAT,cAAS;IACT,OAAO,EAAE,YAAS;IAClB,WAAW,EAAX,gBAAW;IACX,YAAY,EAAZ,iBAAY;IACZ,YAAY;IACZ,QAAQ,EAAE;QACR,KAAK,EAAL,gBAAK;QACL,OAAO,EAAP,kBAAO;QACP,QAAQ,EAAR,mBAAQ;QACR,QAAQ,EAAR,mBAAQ;KACT;CACF,CAAA;AAED,0DAA0D;AAC1D,MAAM,YAAY,GAAG,CAAC,QAAmB,EAAW,EAAE,CACpD,CAAC,QAAQ,IAAI,QAAQ,KAAK,SAAS,IAAI,QAAQ,KAAK,QAAQ,CAAC,CAAC;IAC5D,SAAS;IACX,CAAC,CAAC;QACE,GAAG,SAAS;QACZ,GAAG,QAAQ;QACX,QAAQ,EAAE;YACR,GAAG,SAAS,CAAC,QAAQ;YACrB,GAAG,CAAC,QAAQ,CAAC,QAAQ,IAAI,EAAE,CAAC;SAC7B;KACF,CAAA;AAEL,uCAAuC;AACvC,MAAM,cAAc,GAAG,wBAAwB,CAAA;AAC/C,MAAM,UAAU,GAAG,CAAC,QAAgB,EAAU,EAAE,CAC9C,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,OAAO,CAAC,cAAc,EAAE,MAAM,CAAC,CAAA;AAE/D,+CAA+C;AAC/C,MAAM,SAAS,GAAG,QAA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E,MAAoB,OAAO,CAAC,GAAG,EAAE,EACjC,OAAuB,EAAE;QAEzB,MAAM,EAAE,MAAM,GAAG,IAAI,EAAE,GAAG,IAAI,CAAA;QAC9B,KAAK,CAAC,GAAG,EAAE,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,CAAC,CAAA;IACjC,CAAC;CACF;AARD,4CAQC;AAED;;;;GAIG;AACU,QAAA,IAAI,GAAG,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAA;AAGxE;;;;;GAKG;AACU,QAAA,UAAU,GAIrB,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,eAAe;IAC9C,CAAC,CAAC,OAAO,CAAC,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,gBAAgB;QAClD,CAAC,CAAC,eAAe,CAAA","sourcesContent":["import { LRUCache } from 'lru-cache'\nimport { posix, win32 } from 'node:path'\n\nimport { fileURLToPath } from 'node:url'\n\nimport {\n  lstatSync,\n  readdir as readdirCB,\n  readdirSync,\n  readlinkSync,\n  realpathSync as rps,\n} from 'fs'\nimport * as actualFS from 'node:fs'\n\nconst realpathSync = rps.native\n// TODO: test perf of fs/promises realpath vs realpathCB,\n// since the promises one uses realpath.native\n\nimport { lstat, readdir, readlink, realpath } from 'node:fs/promises'\n\nimport { Minipass } from 'minipass'\nimport type { Dirent, Stats } from 'node:fs'\n\n/**\n * An object that will be used to override the default `fs`\n * methods.  Any methods that are not overridden will use Node's\n * built-in implementations.\n *\n * - lstatSync\n * - readdir (callback `withFileTypes` Dirent variant, used for\n *   readdirCB and most walks)\n * - readdirSync\n * - readlinkSync\n * - realpathSync\n * - promises: Object containing the following async methods:\n *   - lstat\n *   - readdir (Dirent variant only)\n *   - readlink\n *   - realpath\n */\nexport interface FSOption {\n  lstatSync?: (path: string) => Stats\n  readdir?: (\n    path: string,\n    options: { withFileTypes: true },\n    cb: (er: NodeJS.ErrnoException | null, entries?: Dirent[]) => any,\n  ) => void\n  readdirSync?: (\n    path: string,\n    options: { withFileTypes: true },\n  ) => Dirent[]\n  readlinkSync?: (path: string) => string\n  realpathSync?: (path: string) => string\n  promises?: {\n    lstat?: (path: string) => Promise\n    readdir?: (\n      path: string,\n      options: { withFileTypes: true },\n    ) => Promise\n    readlink?: (path: string) => Promise\n    realpath?: (path: string) => Promise\n    [k: string]: any\n  }\n  [k: string]: any\n}\n\ninterface FSValue {\n  lstatSync: (path: string) => Stats\n  readdir: (\n    path: string,\n    options: { withFileTypes: true },\n    cb: (er: NodeJS.ErrnoException | null, entries?: Dirent[]) => any,\n  ) => void\n  readdirSync: (path: string, options: { withFileTypes: true }) => Dirent[]\n  readlinkSync: (path: string) => string\n  realpathSync: (path: string) => string\n  promises: {\n    lstat: (path: string) => Promise\n    readdir: (\n      path: string,\n      options: { withFileTypes: true },\n    ) => Promise\n    readlink: (path: string) => Promise\n    realpath: (path: string) => Promise\n    [k: string]: any\n  }\n  [k: string]: any\n}\n\nconst defaultFS: FSValue = {\n  lstatSync,\n  readdir: readdirCB,\n  readdirSync,\n  readlinkSync,\n  realpathSync,\n  promises: {\n    lstat,\n    readdir,\n    readlink,\n    realpath,\n  },\n}\n\n// if they just gave us require('fs') then use our default\nconst fsFromOption = (fsOption?: FSOption): FSValue =>\n  !fsOption || fsOption === defaultFS || fsOption === actualFS ?\n    defaultFS\n  : {\n      ...defaultFS,\n      ...fsOption,\n      promises: {\n        ...defaultFS.promises,\n        ...(fsOption.promises || {}),\n      },\n    }\n\n// turn something like //?/c:/ into c:\\\nconst uncDriveRegexp = /^\\\\\\\\\\?\\\\([a-z]:)\\\\?$/i\nconst uncToDrive = (rootPath: string): string =>\n  rootPath.replace(/\\//g, '\\\\').replace(uncDriveRegexp, '$1\\\\')\n\n// windows paths are separated by either / or \\\nconst eitherSep = /[\\\\\\/]/\n\nconst UNKNOWN = 0 // may not even exist, for all we know\nconst IFIFO = 0b0001\nconst IFCHR = 0b0010\nconst IFDIR = 0b0100\nconst IFBLK = 0b0110\nconst IFREG = 0b1000\nconst IFLNK = 0b1010\nconst IFSOCK = 0b1100\nconst IFMT = 0b1111\n\nexport type Type =\n  | 'Unknown'\n  | 'FIFO'\n  | 'CharacterDevice'\n  | 'Directory'\n  | 'BlockDevice'\n  | 'File'\n  | 'SymbolicLink'\n  | 'Socket'\n\n// mask to unset low 4 bits\nconst IFMT_UNKNOWN = ~IFMT\n\n// set after successfully calling readdir() and getting entries.\nconst READDIR_CALLED = 0b0000_0001_0000\n// set after a successful lstat()\nconst LSTAT_CALLED = 0b0000_0010_0000\n// set if an entry (or one of its parents) is definitely not a dir\nconst ENOTDIR = 0b0000_0100_0000\n// set if an entry (or one of its parents) does not exist\n// (can also be set on lstat errors like EACCES or ENAMETOOLONG)\nconst ENOENT = 0b0000_1000_0000\n// cannot have child entries -- also verify &IFMT is either IFDIR or IFLNK\n// set if we fail to readlink\nconst ENOREADLINK = 0b0001_0000_0000\n// set if we know realpath() will fail\nconst ENOREALPATH = 0b0010_0000_0000\n\nconst ENOCHILD = ENOTDIR | ENOENT | ENOREALPATH\nconst TYPEMASK = 0b0011_1111_1111\n\nconst entToType = (s: Dirent | Stats) =>\n  s.isFile() ? IFREG\n  : s.isDirectory() ? IFDIR\n  : s.isSymbolicLink() ? IFLNK\n  : s.isCharacterDevice() ? IFCHR\n  : s.isBlockDevice() ? IFBLK\n  : s.isSocket() ? IFSOCK\n  : s.isFIFO() ? IFIFO\n  : UNKNOWN\n\n// normalize unicode path names\nconst normalizeCache = new Map()\nconst normalize = (s: string) => {\n  const c = normalizeCache.get(s)\n  if (c) return c\n  const n = s.normalize('NFKD')\n  normalizeCache.set(s, n)\n  return n\n}\n\nconst normalizeNocaseCache = new Map()\nconst normalizeNocase = (s: string) => {\n  const c = normalizeNocaseCache.get(s)\n  if (c) return c\n  const n = normalize(s.toLowerCase())\n  normalizeNocaseCache.set(s, n)\n  return n\n}\n\n/**\n * Options that may be provided to the Path constructor\n */\nexport interface PathOpts {\n  fullpath?: string\n  relative?: string\n  relativePosix?: string\n  parent?: PathBase\n  /**\n   * See {@link FSOption}\n   */\n  fs?: FSOption\n}\n\n/**\n * An LRUCache for storing resolved path strings or Path objects.\n * @internal\n */\nexport class ResolveCache extends LRUCache {\n  constructor() {\n    super({ max: 256 })\n  }\n}\n\n// In order to prevent blowing out the js heap by allocating hundreds of\n// thousands of Path entries when walking extremely large trees, the \"children\"\n// in this tree are represented by storing an array of Path entries in an\n// LRUCache, indexed by the parent.  At any time, Path.children() may return an\n// empty array, indicating that it doesn't know about any of its children, and\n// thus has to rebuild that cache.  This is fine, it just means that we don't\n// benefit as much from having the cached entries, but huge directory walks\n// don't blow out the stack, and smaller ones are still as fast as possible.\n//\n//It does impose some complexity when building up the readdir data, because we\n//need to pass a reference to the children array that we started with.\n\n/**\n * an LRUCache for storing child entries.\n * @internal\n */\nexport class ChildrenCache extends LRUCache {\n  constructor(maxSize: number = 16 * 1024) {\n    super({\n      maxSize,\n      // parent + children\n      sizeCalculation: a => a.length + 1,\n    })\n  }\n}\n\n/**\n * Array of Path objects, plus a marker indicating the first provisional entry\n *\n * @internal\n */\nexport type Children = PathBase[] & { provisional: number }\n\nconst setAsCwd = Symbol('PathScurry setAsCwd')\n\n/**\n * Path objects are sort of like a super-powered\n * {@link https://nodejs.org/docs/latest/api/fs.html#class-fsdirent fs.Dirent}\n *\n * Each one represents a single filesystem entry on disk, which may or may not\n * exist. It includes methods for reading various types of information via\n * lstat, readlink, and readdir, and caches all information to the greatest\n * degree possible.\n *\n * Note that fs operations that would normally throw will instead return an\n * \"empty\" value. This is in order to prevent excessive overhead from error\n * stack traces.\n */\nexport abstract class PathBase implements Dirent {\n  /**\n   * the basename of this path\n   *\n   * **Important**: *always* test the path name against any test string\n   * usingthe {@link isNamed} method, and not by directly comparing this\n   * string. Otherwise, unicode path strings that the system sees as identical\n   * will not be properly treated as the same path, leading to incorrect\n   * behavior and possible security issues.\n   */\n  name: string\n  /**\n   * the Path entry corresponding to the path root.\n   *\n   * @internal\n   */\n  root: PathBase\n  /**\n   * All roots found within the current PathScurry family\n   *\n   * @internal\n   */\n  roots: { [k: string]: PathBase }\n  /**\n   * a reference to the parent path, or undefined in the case of root entries\n   *\n   * @internal\n   */\n  parent?: PathBase\n  /**\n   * boolean indicating whether paths are compared case-insensitively\n   * @internal\n   */\n  nocase: boolean\n\n  /**\n   * boolean indicating that this path is the current working directory\n   * of the PathScurry collection that contains it.\n   */\n  isCWD: boolean = false\n\n  /**\n   * the string or regexp used to split paths. On posix, it is `'/'`, and on\n   * windows it is a RegExp matching either `'/'` or `'\\\\'`\n   */\n  abstract splitSep: string | RegExp\n  /**\n   * The path separator string to use when joining paths\n   */\n  abstract sep: string\n\n  // potential default fs override\n  #fs: FSValue\n\n  // Stats fields\n  #dev?: number\n  get dev() {\n    return this.#dev\n  }\n  #mode?: number\n  get mode() {\n    return this.#mode\n  }\n  #nlink?: number\n  get nlink() {\n    return this.#nlink\n  }\n  #uid?: number\n  get uid() {\n    return this.#uid\n  }\n  #gid?: number\n  get gid() {\n    return this.#gid\n  }\n  #rdev?: number\n  get rdev() {\n    return this.#rdev\n  }\n  #blksize?: number\n  get blksize() {\n    return this.#blksize\n  }\n  #ino?: number\n  get ino() {\n    return this.#ino\n  }\n  #size?: number\n  get size() {\n    return this.#size\n  }\n  #blocks?: number\n  get blocks() {\n    return this.#blocks\n  }\n  #atimeMs?: number\n  get atimeMs() {\n    return this.#atimeMs\n  }\n  #mtimeMs?: number\n  get mtimeMs() {\n    return this.#mtimeMs\n  }\n  #ctimeMs?: number\n  get ctimeMs() {\n    return this.#ctimeMs\n  }\n  #birthtimeMs?: number\n  get birthtimeMs() {\n    return this.#birthtimeMs\n  }\n  #atime?: Date\n  get atime() {\n    return this.#atime\n  }\n  #mtime?: Date\n  get mtime() {\n    return this.#mtime\n  }\n  #ctime?: Date\n  get ctime() {\n    return this.#ctime\n  }\n  #birthtime?: Date\n  get birthtime() {\n    return this.#birthtime\n  }\n\n  #matchName: string\n  #depth?: number\n  #fullpath?: string\n  #fullpathPosix?: string\n  #relative?: string\n  #relativePosix?: string\n  #type: number\n  #children: ChildrenCache\n  #linkTarget?: PathBase\n  #realpath?: PathBase\n\n  /**\n   * This property is for compatibility with the Dirent class as of\n   * Node v20, where Dirent['parentPath'] refers to the path of the\n   * directory that was passed to readdir. For root entries, it's the path\n   * to the entry itself.\n   */\n  get parentPath(): string {\n    return (this.parent || this).fullpath()\n  }\n\n  /**\n   * Deprecated alias for Dirent['parentPath'] Somewhat counterintuitively,\n   * this property refers to the *parent* path, not the path object itself.\n   */\n  get path(): string {\n    return this.parentPath\n  }\n\n  /**\n   * Do not create new Path objects directly.  They should always be accessed\n   * via the PathScurry class or other methods on the Path class.\n   *\n   * @internal\n   */\n  constructor(\n    name: string,\n    type: number = UNKNOWN,\n    root: PathBase | undefined,\n    roots: { [k: string]: PathBase },\n    nocase: boolean,\n    children: ChildrenCache,\n    opts: PathOpts,\n  ) {\n    this.name = name\n    this.#matchName = nocase ? normalizeNocase(name) : normalize(name)\n    this.#type = type & TYPEMASK\n    this.nocase = nocase\n    this.roots = roots\n    this.root = root || this\n    this.#children = children\n    this.#fullpath = opts.fullpath\n    this.#relative = opts.relative\n    this.#relativePosix = opts.relativePosix\n    this.parent = opts.parent\n    if (this.parent) {\n      this.#fs = this.parent.#fs\n    } else {\n      this.#fs = fsFromOption(opts.fs)\n    }\n  }\n\n  /**\n   * Returns the depth of the Path object from its root.\n   *\n   * For example, a path at `/foo/bar` would have a depth of 2.\n   */\n  depth(): number {\n    if (this.#depth !== undefined) return this.#depth\n    if (!this.parent) return (this.#depth = 0)\n    return (this.#depth = this.parent.depth() + 1)\n  }\n\n  /**\n   * @internal\n   */\n  abstract getRootString(path: string): string\n  /**\n   * @internal\n   */\n  abstract getRoot(rootPath: string): PathBase\n  /**\n   * @internal\n   */\n  abstract newChild(name: string, type?: number, opts?: PathOpts): PathBase\n\n  /**\n   * @internal\n   */\n  childrenCache() {\n    return this.#children\n  }\n\n  /**\n   * Get the Path object referenced by the string path, resolved from this Path\n   */\n  resolve(path?: string): PathBase {\n    if (!path) {\n      return this\n    }\n    const rootPath = this.getRootString(path)\n    const dir = path.substring(rootPath.length)\n    const dirParts = dir.split(this.splitSep)\n    const result: PathBase =\n      rootPath ?\n        this.getRoot(rootPath).#resolveParts(dirParts)\n      : this.#resolveParts(dirParts)\n    return result\n  }\n\n  #resolveParts(dirParts: string[]) {\n    let p: PathBase = this\n    for (const part of dirParts) {\n      p = p.child(part)\n    }\n    return p\n  }\n\n  /**\n   * Returns the cached children Path objects, if still available.  If they\n   * have fallen out of the cache, then returns an empty array, and resets the\n   * READDIR_CALLED bit, so that future calls to readdir() will require an fs\n   * lookup.\n   *\n   * @internal\n   */\n  children(): Children {\n    const cached = this.#children.get(this)\n    if (cached) {\n      return cached\n    }\n    const children: Children = Object.assign([], { provisional: 0 })\n    this.#children.set(this, children)\n    this.#type &= ~READDIR_CALLED\n    return children\n  }\n\n  /**\n   * Resolves a path portion and returns or creates the child Path.\n   *\n   * Returns `this` if pathPart is `''` or `'.'`, or `parent` if pathPart is\n   * `'..'`.\n   *\n   * This should not be called directly.  If `pathPart` contains any path\n   * separators, it will lead to unsafe undefined behavior.\n   *\n   * Use `Path.resolve()` instead.\n   *\n   * @internal\n   */\n  child(pathPart: string, opts?: PathOpts): PathBase {\n    if (pathPart === '' || pathPart === '.') {\n      return this\n    }\n    if (pathPart === '..') {\n      return this.parent || this\n    }\n\n    // find the child\n    const children = this.children()\n    const name =\n      this.nocase ? normalizeNocase(pathPart) : normalize(pathPart)\n    for (const p of children) {\n      if (p.#matchName === name) {\n        return p\n      }\n    }\n\n    // didn't find it, create provisional child, since it might not\n    // actually exist.  If we know the parent isn't a dir, then\n    // in fact it CAN'T exist.\n    const s = this.parent ? this.sep : ''\n    const fullpath =\n      this.#fullpath ? this.#fullpath + s + pathPart : undefined\n    const pchild = this.newChild(pathPart, UNKNOWN, {\n      ...opts,\n      parent: this,\n      fullpath,\n    })\n\n    if (!this.canReaddir()) {\n      pchild.#type |= ENOENT\n    }\n\n    // don't have to update provisional, because if we have real children,\n    // then provisional is set to children.length, otherwise a lower number\n    children.push(pchild)\n    return pchild\n  }\n\n  /**\n   * The relative path from the cwd. If it does not share an ancestor with\n   * the cwd, then this ends up being equivalent to the fullpath()\n   */\n  relative(): string {\n    if (this.isCWD) return ''\n    if (this.#relative !== undefined) {\n      return this.#relative\n    }\n    const name = this.name\n    const p = this.parent\n    if (!p) {\n      return (this.#relative = this.name)\n    }\n    const pv = p.relative()\n    return pv + (!pv || !p.parent ? '' : this.sep) + name\n  }\n\n  /**\n   * The relative path from the cwd, using / as the path separator.\n   * If it does not share an ancestor with\n   * the cwd, then this ends up being equivalent to the fullpathPosix()\n   * On posix systems, this is identical to relative().\n   */\n  relativePosix(): string {\n    if (this.sep === '/') return this.relative()\n    if (this.isCWD) return ''\n    if (this.#relativePosix !== undefined) return this.#relativePosix\n    const name = this.name\n    const p = this.parent\n    if (!p) {\n      return (this.#relativePosix = this.fullpathPosix())\n    }\n    const pv = p.relativePosix()\n    return pv + (!pv || !p.parent ? '' : '/') + name\n  }\n\n  /**\n   * The fully resolved path string for this Path entry\n   */\n  fullpath(): string {\n    if (this.#fullpath !== undefined) {\n      return this.#fullpath\n    }\n    const name = this.name\n    const p = this.parent\n    if (!p) {\n      return (this.#fullpath = this.name)\n    }\n    const pv = p.fullpath()\n    const fp = pv + (!p.parent ? '' : this.sep) + name\n    return (this.#fullpath = fp)\n  }\n\n  /**\n   * On platforms other than windows, this is identical to fullpath.\n   *\n   * On windows, this is overridden to return the forward-slash form of the\n   * full UNC path.\n   */\n  fullpathPosix(): string {\n    if (this.#fullpathPosix !== undefined) return this.#fullpathPosix\n    if (this.sep === '/') return (this.#fullpathPosix = this.fullpath())\n    if (!this.parent) {\n      const p = this.fullpath().replace(/\\\\/g, '/')\n      if (/^[a-z]:\\//i.test(p)) {\n        return (this.#fullpathPosix = `//?/${p}`)\n      } else {\n        return (this.#fullpathPosix = p)\n      }\n    }\n    const p = this.parent\n    const pfpp = p.fullpathPosix()\n    const fpp = pfpp + (!pfpp || !p.parent ? '' : '/') + this.name\n    return (this.#fullpathPosix = fpp)\n  }\n\n  /**\n   * Is the Path of an unknown type?\n   *\n   * Note that we might know *something* about it if there has been a previous\n   * filesystem operation, for example that it does not exist, or is not a\n   * link, or whether it has child entries.\n   */\n  isUnknown(): boolean {\n    return (this.#type & IFMT) === UNKNOWN\n  }\n\n  isType(type: Type): boolean {\n    return this[`is${type}`]()\n  }\n\n  getType(): Type {\n    return (\n      this.isUnknown() ? 'Unknown'\n      : this.isDirectory() ? 'Directory'\n      : this.isFile() ? 'File'\n      : this.isSymbolicLink() ? 'SymbolicLink'\n      : this.isFIFO() ? 'FIFO'\n      : this.isCharacterDevice() ? 'CharacterDevice'\n      : this.isBlockDevice() ? 'BlockDevice'\n      : /* c8 ignore start */ this.isSocket() ? 'Socket'\n      : 'Unknown'\n    )\n    /* c8 ignore stop */\n  }\n\n  /**\n   * Is the Path a regular file?\n   */\n  isFile(): boolean {\n    return (this.#type & IFMT) === IFREG\n  }\n\n  /**\n   * Is the Path a directory?\n   */\n  isDirectory(): boolean {\n    return (this.#type & IFMT) === IFDIR\n  }\n\n  /**\n   * Is the path a character device?\n   */\n  isCharacterDevice(): boolean {\n    return (this.#type & IFMT) === IFCHR\n  }\n\n  /**\n   * Is the path a block device?\n   */\n  isBlockDevice(): boolean {\n    return (this.#type & IFMT) === IFBLK\n  }\n\n  /**\n   * Is the path a FIFO pipe?\n   */\n  isFIFO(): boolean {\n    return (this.#type & IFMT) === IFIFO\n  }\n\n  /**\n   * Is the path a socket?\n   */\n  isSocket(): boolean {\n    return (this.#type & IFMT) === IFSOCK\n  }\n\n  /**\n   * Is the path a symbolic link?\n   */\n  isSymbolicLink(): boolean {\n    return (this.#type & IFLNK) === IFLNK\n  }\n\n  /**\n   * Return the entry if it has been subject of a successful lstat, or\n   * undefined otherwise.\n   *\n   * Does not read the filesystem, so an undefined result *could* simply\n   * mean that we haven't called lstat on it.\n   */\n  lstatCached(): PathBase | undefined {\n    return this.#type & LSTAT_CALLED ? this : undefined\n  }\n\n  /**\n   * Return the cached link target if the entry has been the subject of a\n   * successful readlink, or undefined otherwise.\n   *\n   * Does not read the filesystem, so an undefined result *could* just mean we\n   * don't have any cached data. Only use it if you are very sure that a\n   * readlink() has been called at some point.\n   */\n  readlinkCached(): PathBase | undefined {\n    return this.#linkTarget\n  }\n\n  /**\n   * Returns the cached realpath target if the entry has been the subject\n   * of a successful realpath, or undefined otherwise.\n   *\n   * Does not read the filesystem, so an undefined result *could* just mean we\n   * don't have any cached data. Only use it if you are very sure that a\n   * realpath() has been called at some point.\n   */\n  realpathCached(): PathBase | undefined {\n    return this.#realpath\n  }\n\n  /**\n   * Returns the cached child Path entries array if the entry has been the\n   * subject of a successful readdir(), or [] otherwise.\n   *\n   * Does not read the filesystem, so an empty array *could* just mean we\n   * don't have any cached data. Only use it if you are very sure that a\n   * readdir() has been called recently enough to still be valid.\n   */\n  readdirCached(): PathBase[] {\n    const children = this.children()\n    return children.slice(0, children.provisional)\n  }\n\n  /**\n   * Return true if it's worth trying to readlink.  Ie, we don't (yet) have\n   * any indication that readlink will definitely fail.\n   *\n   * Returns false if the path is known to not be a symlink, if a previous\n   * readlink failed, or if the entry does not exist.\n   */\n  canReadlink(): boolean {\n    if (this.#linkTarget) return true\n    if (!this.parent) return false\n    // cases where it cannot possibly succeed\n    const ifmt = this.#type & IFMT\n    return !(\n      (ifmt !== UNKNOWN && ifmt !== IFLNK) ||\n      this.#type & ENOREADLINK ||\n      this.#type & ENOENT\n    )\n  }\n\n  /**\n   * Return true if readdir has previously been successfully called on this\n   * path, indicating that cachedReaddir() is likely valid.\n   */\n  calledReaddir(): boolean {\n    return !!(this.#type & READDIR_CALLED)\n  }\n\n  /**\n   * Returns true if the path is known to not exist. That is, a previous lstat\n   * or readdir failed to verify its existence when that would have been\n   * expected, or a parent entry was marked either enoent or enotdir.\n   */\n  isENOENT(): boolean {\n    return !!(this.#type & ENOENT)\n  }\n\n  /**\n   * Return true if the path is a match for the given path name.  This handles\n   * case sensitivity and unicode normalization.\n   *\n   * Note: even on case-sensitive systems, it is **not** safe to test the\n   * equality of the `.name` property to determine whether a given pathname\n   * matches, due to unicode normalization mismatches.\n   *\n   * Always use this method instead of testing the `path.name` property\n   * directly.\n   */\n  isNamed(n: string): boolean {\n    return !this.nocase ?\n        this.#matchName === normalize(n)\n      : this.#matchName === normalizeNocase(n)\n  }\n\n  /**\n   * Return the Path object corresponding to the target of a symbolic link.\n   *\n   * If the Path is not a symbolic link, or if the readlink call fails for any\n   * reason, `undefined` is returned.\n   *\n   * Result is cached, and thus may be outdated if the filesystem is mutated.\n   */\n  async readlink(): Promise {\n    const target = this.#linkTarget\n    if (target) {\n      return target\n    }\n    if (!this.canReadlink()) {\n      return undefined\n    }\n    /* c8 ignore start */\n    // already covered by the canReadlink test, here for ts grumples\n    if (!this.parent) {\n      return undefined\n    }\n    /* c8 ignore stop */\n    try {\n      const read = await this.#fs.promises.readlink(this.fullpath())\n      const linkTarget = (await this.parent.realpath())?.resolve(read)\n      if (linkTarget) {\n        return (this.#linkTarget = linkTarget)\n      }\n    } catch (er) {\n      this.#readlinkFail((er as NodeJS.ErrnoException).code)\n      return undefined\n    }\n  }\n\n  /**\n   * Synchronous {@link PathBase.readlink}\n   */\n  readlinkSync(): PathBase | undefined {\n    const target = this.#linkTarget\n    if (target) {\n      return target\n    }\n    if (!this.canReadlink()) {\n      return undefined\n    }\n    /* c8 ignore start */\n    // already covered by the canReadlink test, here for ts grumples\n    if (!this.parent) {\n      return undefined\n    }\n    /* c8 ignore stop */\n    try {\n      const read = this.#fs.readlinkSync(this.fullpath())\n      const linkTarget = this.parent.realpathSync()?.resolve(read)\n      if (linkTarget) {\n        return (this.#linkTarget = linkTarget)\n      }\n    } catch (er) {\n      this.#readlinkFail((er as NodeJS.ErrnoException).code)\n      return undefined\n    }\n  }\n\n  #readdirSuccess(children: Children) {\n    // succeeded, mark readdir called bit\n    this.#type |= READDIR_CALLED\n    // mark all remaining provisional children as ENOENT\n    for (let p = children.provisional; p < children.length; p++) {\n      const c = children[p]\n      if (c) c.#markENOENT()\n    }\n  }\n\n  #markENOENT() {\n    // mark as UNKNOWN and ENOENT\n    if (this.#type & ENOENT) return\n    this.#type = (this.#type | ENOENT) & IFMT_UNKNOWN\n    this.#markChildrenENOENT()\n  }\n\n  #markChildrenENOENT() {\n    // all children are provisional and do not exist\n    const children = this.children()\n    children.provisional = 0\n    for (const p of children) {\n      p.#markENOENT()\n    }\n  }\n\n  #markENOREALPATH() {\n    this.#type |= ENOREALPATH\n    this.#markENOTDIR()\n  }\n\n  // save the information when we know the entry is not a dir\n  #markENOTDIR() {\n    // entry is not a directory, so any children can't exist.\n    // this *should* be impossible, since any children created\n    // after it's been marked ENOTDIR should be marked ENOENT,\n    // so it won't even get to this point.\n    /* c8 ignore start */\n    if (this.#type & ENOTDIR) return\n    /* c8 ignore stop */\n    let t = this.#type\n    // this could happen if we stat a dir, then delete it,\n    // then try to read it or one of its children.\n    if ((t & IFMT) === IFDIR) t &= IFMT_UNKNOWN\n    this.#type = t | ENOTDIR\n    this.#markChildrenENOENT()\n  }\n\n  #readdirFail(code: string = '') {\n    // markENOTDIR and markENOENT also set provisional=0\n    if (code === 'ENOTDIR' || code === 'EPERM') {\n      this.#markENOTDIR()\n    } else if (code === 'ENOENT') {\n      this.#markENOENT()\n    } else {\n      this.children().provisional = 0\n    }\n  }\n\n  #lstatFail(code: string = '') {\n    // Windows just raises ENOENT in this case, disable for win CI\n    /* c8 ignore start */\n    if (code === 'ENOTDIR') {\n      // already know it has a parent by this point\n      const p = this.parent as PathBase\n      p.#markENOTDIR()\n    } else if (code === 'ENOENT') {\n      /* c8 ignore stop */\n      this.#markENOENT()\n    }\n  }\n\n  #readlinkFail(code: string = '') {\n    let ter = this.#type\n    ter |= ENOREADLINK\n    if (code === 'ENOENT') ter |= ENOENT\n    // windows gets a weird error when you try to readlink a file\n    if (code === 'EINVAL' || code === 'UNKNOWN') {\n      // exists, but not a symlink, we don't know WHAT it is, so remove\n      // all IFMT bits.\n      ter &= IFMT_UNKNOWN\n    }\n    this.#type = ter\n    // windows just gets ENOENT in this case.  We do cover the case,\n    // just disabled because it's impossible on Windows CI\n    /* c8 ignore start */\n    if (code === 'ENOTDIR' && this.parent) {\n      this.parent.#markENOTDIR()\n    }\n    /* c8 ignore stop */\n  }\n\n  #readdirAddChild(e: Dirent, c: Children) {\n    return (\n      this.#readdirMaybePromoteChild(e, c) ||\n      this.#readdirAddNewChild(e, c)\n    )\n  }\n\n  #readdirAddNewChild(e: Dirent, c: Children): PathBase {\n    // alloc new entry at head, so it's never provisional\n    const type = entToType(e)\n    const child = this.newChild(e.name, type, { parent: this })\n    const ifmt = child.#type & IFMT\n    if (ifmt !== IFDIR && ifmt !== IFLNK && ifmt !== UNKNOWN) {\n      child.#type |= ENOTDIR\n    }\n    c.unshift(child)\n    c.provisional++\n    return child\n  }\n\n  #readdirMaybePromoteChild(e: Dirent, c: Children): PathBase | undefined {\n    for (let p = c.provisional; p < c.length; p++) {\n      const pchild = c[p]\n      const name =\n        this.nocase ? normalizeNocase(e.name) : normalize(e.name)\n      if (name !== pchild!.#matchName) {\n        continue\n      }\n\n      return this.#readdirPromoteChild(e, pchild!, p, c)\n    }\n  }\n\n  #readdirPromoteChild(\n    e: Dirent,\n    p: PathBase,\n    index: number,\n    c: Children,\n  ): PathBase {\n    const v = p.name\n    // retain any other flags, but set ifmt from dirent\n    p.#type = (p.#type & IFMT_UNKNOWN) | entToType(e)\n    // case sensitivity fixing when we learn the true name.\n    if (v !== e.name) p.name = e.name\n\n    // just advance provisional index (potentially off the list),\n    // otherwise we have to splice/pop it out and re-insert at head\n    if (index !== c.provisional) {\n      if (index === c.length - 1) c.pop()\n      else c.splice(index, 1)\n      c.unshift(p)\n    }\n    c.provisional++\n    return p\n  }\n\n  /**\n   * Call lstat() on this Path, and update all known information that can be\n   * determined.\n   *\n   * Note that unlike `fs.lstat()`, the returned value does not contain some\n   * information, such as `mode`, `dev`, `nlink`, and `ino`.  If that\n   * information is required, you will need to call `fs.lstat` yourself.\n   *\n   * If the Path refers to a nonexistent file, or if the lstat call fails for\n   * any reason, `undefined` is returned.  Otherwise the updated Path object is\n   * returned.\n   *\n   * Results are cached, and thus may be out of date if the filesystem is\n   * mutated.\n   */\n  async lstat(): Promise {\n    if ((this.#type & ENOENT) === 0) {\n      try {\n        this.#applyStat(await this.#fs.promises.lstat(this.fullpath()))\n        return this\n      } catch (er) {\n        this.#lstatFail((er as NodeJS.ErrnoException).code)\n      }\n    }\n  }\n\n  /**\n   * synchronous {@link PathBase.lstat}\n   */\n  lstatSync(): PathBase | undefined {\n    if ((this.#type & ENOENT) === 0) {\n      try {\n        this.#applyStat(this.#fs.lstatSync(this.fullpath()))\n        return this\n      } catch (er) {\n        this.#lstatFail((er as NodeJS.ErrnoException).code)\n      }\n    }\n  }\n\n  #applyStat(st: Stats) {\n    const {\n      atime,\n      atimeMs,\n      birthtime,\n      birthtimeMs,\n      blksize,\n      blocks,\n      ctime,\n      ctimeMs,\n      dev,\n      gid,\n      ino,\n      mode,\n      mtime,\n      mtimeMs,\n      nlink,\n      rdev,\n      size,\n      uid,\n    } = st\n    this.#atime = atime\n    this.#atimeMs = atimeMs\n    this.#birthtime = birthtime\n    this.#birthtimeMs = birthtimeMs\n    this.#blksize = blksize\n    this.#blocks = blocks\n    this.#ctime = ctime\n    this.#ctimeMs = ctimeMs\n    this.#dev = dev\n    this.#gid = gid\n    this.#ino = ino\n    this.#mode = mode\n    this.#mtime = mtime\n    this.#mtimeMs = mtimeMs\n    this.#nlink = nlink\n    this.#rdev = rdev\n    this.#size = size\n    this.#uid = uid\n    const ifmt = entToType(st)\n    // retain any other flags, but set the ifmt\n    this.#type = (this.#type & IFMT_UNKNOWN) | ifmt | LSTAT_CALLED\n    if (ifmt !== UNKNOWN && ifmt !== IFDIR && ifmt !== IFLNK) {\n      this.#type |= ENOTDIR\n    }\n  }\n\n  #onReaddirCB: ((\n    er: NodeJS.ErrnoException | null,\n    entries: Path[],\n  ) => any)[] = []\n  #readdirCBInFlight: boolean = false\n  #callOnReaddirCB(children: Path[]) {\n    this.#readdirCBInFlight = false\n    const cbs = this.#onReaddirCB.slice()\n    this.#onReaddirCB.length = 0\n    cbs.forEach(cb => cb(null, children))\n  }\n\n  /**\n   * Standard node-style callback interface to get list of directory entries.\n   *\n   * If the Path cannot or does not contain any children, then an empty array\n   * is returned.\n   *\n   * Results are cached, and thus may be out of date if the filesystem is\n   * mutated.\n   *\n   * @param cb The callback called with (er, entries).  Note that the `er`\n   * param is somewhat extraneous, as all readdir() errors are handled and\n   * simply result in an empty set of entries being returned.\n   * @param allowZalgo Boolean indicating that immediately known results should\n   * *not* be deferred with `queueMicrotask`. Defaults to `false`. Release\n   * zalgo at your peril, the dark pony lord is devious and unforgiving.\n   */\n  readdirCB(\n    cb: (er: NodeJS.ErrnoException | null, entries: PathBase[]) => any,\n    allowZalgo: boolean = false,\n  ): void {\n    if (!this.canReaddir()) {\n      if (allowZalgo) cb(null, [])\n      else queueMicrotask(() => cb(null, []))\n      return\n    }\n\n    const children = this.children()\n    if (this.calledReaddir()) {\n      const c = children.slice(0, children.provisional)\n      if (allowZalgo) cb(null, c)\n      else queueMicrotask(() => cb(null, c))\n      return\n    }\n\n    // don't have to worry about zalgo at this point.\n    this.#onReaddirCB.push(cb)\n    if (this.#readdirCBInFlight) {\n      return\n    }\n    this.#readdirCBInFlight = true\n\n    // else read the directory, fill up children\n    // de-provisionalize any provisional children.\n    const fullpath = this.fullpath()\n    this.#fs.readdir(fullpath, { withFileTypes: true }, (er, entries) => {\n      if (er) {\n        this.#readdirFail((er as NodeJS.ErrnoException).code)\n        children.provisional = 0\n      } else {\n        // if we didn't get an error, we always get entries.\n        //@ts-ignore\n        for (const e of entries) {\n          this.#readdirAddChild(e, children)\n        }\n        this.#readdirSuccess(children)\n      }\n      this.#callOnReaddirCB(children.slice(0, children.provisional))\n      return\n    })\n  }\n\n  #asyncReaddirInFlight?: Promise\n\n  /**\n   * Return an array of known child entries.\n   *\n   * If the Path cannot or does not contain any children, then an empty array\n   * is returned.\n   *\n   * Results are cached, and thus may be out of date if the filesystem is\n   * mutated.\n   */\n  async readdir(): Promise {\n    if (!this.canReaddir()) {\n      return []\n    }\n\n    const children = this.children()\n    if (this.calledReaddir()) {\n      return children.slice(0, children.provisional)\n    }\n\n    // else read the directory, fill up children\n    // de-provisionalize any provisional children.\n    const fullpath = this.fullpath()\n    if (this.#asyncReaddirInFlight) {\n      await this.#asyncReaddirInFlight\n    } else {\n      /* c8 ignore start */\n      let resolve: () => void = () => {}\n      /* c8 ignore stop */\n      this.#asyncReaddirInFlight = new Promise(\n        res => (resolve = res),\n      )\n      try {\n        for (const e of await this.#fs.promises.readdir(fullpath, {\n          withFileTypes: true,\n        })) {\n          this.#readdirAddChild(e, children)\n        }\n        this.#readdirSuccess(children)\n      } catch (er) {\n        this.#readdirFail((er as NodeJS.ErrnoException).code)\n        children.provisional = 0\n      }\n      this.#asyncReaddirInFlight = undefined\n      resolve()\n    }\n    return children.slice(0, children.provisional)\n  }\n\n  /**\n   * synchronous {@link PathBase.readdir}\n   */\n  readdirSync(): PathBase[] {\n    if (!this.canReaddir()) {\n      return []\n    }\n\n    const children = this.children()\n    if (this.calledReaddir()) {\n      return children.slice(0, children.provisional)\n    }\n\n    // else read the directory, fill up children\n    // de-provisionalize any provisional children.\n    const fullpath = this.fullpath()\n    try {\n      for (const e of this.#fs.readdirSync(fullpath, {\n        withFileTypes: true,\n      })) {\n        this.#readdirAddChild(e, children)\n      }\n      this.#readdirSuccess(children)\n    } catch (er) {\n      this.#readdirFail((er as NodeJS.ErrnoException).code)\n      children.provisional = 0\n    }\n    return children.slice(0, children.provisional)\n  }\n\n  canReaddir() {\n    if (this.#type & ENOCHILD) return false\n    const ifmt = IFMT & this.#type\n    // we always set ENOTDIR when setting IFMT, so should be impossible\n    /* c8 ignore start */\n    if (!(ifmt === UNKNOWN || ifmt === IFDIR || ifmt === IFLNK)) {\n      return false\n    }\n    /* c8 ignore stop */\n    return true\n  }\n\n  shouldWalk(\n    dirs: Set,\n    walkFilter?: (e: PathBase) => boolean,\n  ): boolean {\n    return (\n      (this.#type & IFDIR) === IFDIR &&\n      !(this.#type & ENOCHILD) &&\n      !dirs.has(this) &&\n      (!walkFilter || walkFilter(this))\n    )\n  }\n\n  /**\n   * Return the Path object corresponding to path as resolved\n   * by realpath(3).\n   *\n   * If the realpath call fails for any reason, `undefined` is returned.\n   *\n   * Result is cached, and thus may be outdated if the filesystem is mutated.\n   * On success, returns a Path object.\n   */\n  async realpath(): Promise {\n    if (this.#realpath) return this.#realpath\n    if ((ENOREALPATH | ENOREADLINK | ENOENT) & this.#type) return undefined\n    try {\n      const rp = await this.#fs.promises.realpath(this.fullpath())\n      return (this.#realpath = this.resolve(rp))\n    } catch (_) {\n      this.#markENOREALPATH()\n    }\n  }\n\n  /**\n   * Synchronous {@link realpath}\n   */\n  realpathSync(): PathBase | undefined {\n    if (this.#realpath) return this.#realpath\n    if ((ENOREALPATH | ENOREADLINK | ENOENT) & this.#type) return undefined\n    try {\n      const rp = this.#fs.realpathSync(this.fullpath())\n      return (this.#realpath = this.resolve(rp))\n    } catch (_) {\n      this.#markENOREALPATH()\n    }\n  }\n\n  /**\n   * Internal method to mark this Path object as the scurry cwd,\n   * called by {@link PathScurry#chdir}\n   *\n   * @internal\n   */\n  [setAsCwd](oldCwd: PathBase): void {\n    if (oldCwd === this) return\n    oldCwd.isCWD = false\n    this.isCWD = true\n\n    const changed = new Set([])\n    let rp = []\n    let p: PathBase = this\n    while (p && p.parent) {\n      changed.add(p)\n      p.#relative = rp.join(this.sep)\n      p.#relativePosix = rp.join('/')\n      p = p.parent\n      rp.push('..')\n    }\n    // now un-memoize parents of old cwd\n    p = oldCwd\n    while (p && p.parent && !changed.has(p)) {\n      p.#relative = undefined\n      p.#relativePosix = undefined\n      p = p.parent\n    }\n  }\n}\n\n/**\n * Path class used on win32 systems\n *\n * Uses `'\\\\'` as the path separator for returned paths, either `'\\\\'` or `'/'`\n * as the path separator for parsing paths.\n */\nexport class PathWin32 extends PathBase {\n  /**\n   * Separator for generating path strings.\n   */\n  sep: '\\\\' = '\\\\'\n  /**\n   * Separator for parsing path strings.\n   */\n  splitSep: RegExp = eitherSep\n\n  /**\n   * Do not create new Path objects directly.  They should always be accessed\n   * via the PathScurry class or other methods on the Path class.\n   *\n   * @internal\n   */\n  constructor(\n    name: string,\n    type: number = UNKNOWN,\n    root: PathBase | undefined,\n    roots: { [k: string]: PathBase },\n    nocase: boolean,\n    children: ChildrenCache,\n    opts: PathOpts,\n  ) {\n    super(name, type, root, roots, nocase, children, opts)\n  }\n\n  /**\n   * @internal\n   */\n  newChild(name: string, type: number = UNKNOWN, opts: PathOpts = {}) {\n    return new PathWin32(\n      name,\n      type,\n      this.root,\n      this.roots,\n      this.nocase,\n      this.childrenCache(),\n      opts,\n    )\n  }\n\n  /**\n   * @internal\n   */\n  getRootString(path: string): string {\n    return win32.parse(path).root\n  }\n\n  /**\n   * @internal\n   */\n  getRoot(rootPath: string): PathBase {\n    rootPath = uncToDrive(rootPath.toUpperCase())\n    if (rootPath === this.root.name) {\n      return this.root\n    }\n    // ok, not that one, check if it matches another we know about\n    for (const [compare, root] of Object.entries(this.roots)) {\n      if (this.sameRoot(rootPath, compare)) {\n        return (this.roots[rootPath] = root)\n      }\n    }\n    // otherwise, have to create a new one.\n    return (this.roots[rootPath] = new PathScurryWin32(\n      rootPath,\n      this,\n    ).root)\n  }\n\n  /**\n   * @internal\n   */\n  sameRoot(rootPath: string, compare: string = this.root.name): boolean {\n    // windows can (rarely) have case-sensitive filesystem, but\n    // UNC and drive letters are always case-insensitive, and canonically\n    // represented uppercase.\n    rootPath = rootPath\n      .toUpperCase()\n      .replace(/\\//g, '\\\\')\n      .replace(uncDriveRegexp, '$1\\\\')\n    return rootPath === compare\n  }\n}\n\n/**\n * Path class used on all posix systems.\n *\n * Uses `'/'` as the path separator.\n */\nexport class PathPosix extends PathBase {\n  /**\n   * separator for parsing path strings\n   */\n  splitSep: '/' = '/'\n  /**\n   * separator for generating path strings\n   */\n  sep: '/' = '/'\n\n  /**\n   * Do not create new Path objects directly.  They should always be accessed\n   * via the PathScurry class or other methods on the Path class.\n   *\n   * @internal\n   */\n  constructor(\n    name: string,\n    type: number = UNKNOWN,\n    root: PathBase | undefined,\n    roots: { [k: string]: PathBase },\n    nocase: boolean,\n    children: ChildrenCache,\n    opts: PathOpts,\n  ) {\n    super(name, type, root, roots, nocase, children, opts)\n  }\n\n  /**\n   * @internal\n   */\n  getRootString(path: string): string {\n    return path.startsWith('/') ? '/' : ''\n  }\n\n  /**\n   * @internal\n   */\n  getRoot(_rootPath: string): PathBase {\n    return this.root\n  }\n\n  /**\n   * @internal\n   */\n  newChild(name: string, type: number = UNKNOWN, opts: PathOpts = {}) {\n    return new PathPosix(\n      name,\n      type,\n      this.root,\n      this.roots,\n      this.nocase,\n      this.childrenCache(),\n      opts,\n    )\n  }\n}\n\n/**\n * Options that may be provided to the PathScurry constructor\n */\nexport interface PathScurryOpts {\n  /**\n   * perform case-insensitive path matching. Default based on platform\n   * subclass.\n   */\n  nocase?: boolean\n  /**\n   * Number of Path entries to keep in the cache of Path child references.\n   *\n   * Setting this higher than 65536 will dramatically increase the data\n   * consumption and construction time overhead of each PathScurry.\n   *\n   * Setting this value to 256 or lower will significantly reduce the data\n   * consumption and construction time overhead, but may also reduce resolve()\n   * and readdir() performance on large filesystems.\n   *\n   * Default `16384`.\n   */\n  childrenCacheSize?: number\n  /**\n   * An object that overrides the built-in functions from the fs and\n   * fs/promises modules.\n   *\n   * See {@link FSOption}\n   */\n  fs?: FSOption\n}\n\n/**\n * The base class for all PathScurry classes, providing the interface for path\n * resolution and filesystem operations.\n *\n * Typically, you should *not* instantiate this class directly, but rather one\n * of the platform-specific classes, or the exported {@link PathScurry} which\n * defaults to the current platform.\n */\nexport abstract class PathScurryBase {\n  /**\n   * The root Path entry for the current working directory of this Scurry\n   */\n  root: PathBase\n  /**\n   * The string path for the root of this Scurry's current working directory\n   */\n  rootPath: string\n  /**\n   * A collection of all roots encountered, referenced by rootPath\n   */\n  roots: { [k: string]: PathBase }\n  /**\n   * The Path entry corresponding to this PathScurry's current working directory.\n   */\n  cwd: PathBase\n  #resolveCache: ResolveCache\n  #resolvePosixCache: ResolveCache\n  #children: ChildrenCache\n  /**\n   * Perform path comparisons case-insensitively.\n   *\n   * Defaults true on Darwin and Windows systems, false elsewhere.\n   */\n  nocase: boolean\n\n  /**\n   * The path separator used for parsing paths\n   *\n   * `'/'` on Posix systems, either `'/'` or `'\\\\'` on Windows\n   */\n  abstract sep: string | RegExp\n\n  #fs: FSValue\n\n  /**\n   * This class should not be instantiated directly.\n   *\n   * Use PathScurryWin32, PathScurryDarwin, PathScurryPosix, or PathScurry\n   *\n   * @internal\n   */\n  constructor(\n    cwd: URL | string = process.cwd(),\n    pathImpl: typeof win32 | typeof posix,\n    sep: string | RegExp,\n    {\n      nocase,\n      childrenCacheSize = 16 * 1024,\n      fs = defaultFS,\n    }: PathScurryOpts = {},\n  ) {\n    this.#fs = fsFromOption(fs)\n    if (cwd instanceof URL || cwd.startsWith('file://')) {\n      cwd = fileURLToPath(cwd)\n    }\n    // resolve and split root, and then add to the store.\n    // this is the only time we call path.resolve()\n    const cwdPath = pathImpl.resolve(cwd)\n    this.roots = Object.create(null)\n    this.rootPath = this.parseRootPath(cwdPath)\n    this.#resolveCache = new ResolveCache()\n    this.#resolvePosixCache = new ResolveCache()\n    this.#children = new ChildrenCache(childrenCacheSize)\n\n    const split = cwdPath.substring(this.rootPath.length).split(sep)\n    // resolve('/') leaves '', splits to [''], we don't want that.\n    if (split.length === 1 && !split[0]) {\n      split.pop()\n    }\n    /* c8 ignore start */\n    if (nocase === undefined) {\n      throw new TypeError(\n        'must provide nocase setting to PathScurryBase ctor',\n      )\n    }\n    /* c8 ignore stop */\n    this.nocase = nocase\n    this.root = this.newRoot(this.#fs)\n    this.roots[this.rootPath] = this.root\n    let prev: PathBase = this.root\n    let len = split.length - 1\n    const joinSep = pathImpl.sep\n    let abs = this.rootPath\n    let sawFirst = false\n    for (const part of split) {\n      const l = len--\n      prev = prev.child(part, {\n        relative: new Array(l).fill('..').join(joinSep),\n        relativePosix: new Array(l).fill('..').join('/'),\n        fullpath: (abs += (sawFirst ? '' : joinSep) + part),\n      })\n      sawFirst = true\n    }\n    this.cwd = prev\n  }\n\n  /**\n   * Get the depth of a provided path, string, or the cwd\n   */\n  depth(path: Path | string = this.cwd): number {\n    if (typeof path === 'string') {\n      path = this.cwd.resolve(path)\n    }\n    return path.depth()\n  }\n\n  /**\n   * Parse the root portion of a path string\n   *\n   * @internal\n   */\n  abstract parseRootPath(dir: string): string\n  /**\n   * create a new Path to use as root during construction.\n   *\n   * @internal\n   */\n  abstract newRoot(fs: FSValue): PathBase\n  /**\n   * Determine whether a given path string is absolute\n   */\n  abstract isAbsolute(p: string): boolean\n\n  /**\n   * Return the cache of child entries.  Exposed so subclasses can create\n   * child Path objects in a platform-specific way.\n   *\n   * @internal\n   */\n  childrenCache() {\n    return this.#children\n  }\n\n  /**\n   * Resolve one or more path strings to a resolved string\n   *\n   * Same interface as require('path').resolve.\n   *\n   * Much faster than path.resolve() when called multiple times for the same\n   * path, because the resolved Path objects are cached.  Much slower\n   * otherwise.\n   */\n  resolve(...paths: string[]): string {\n    // first figure out the minimum number of paths we have to test\n    // we always start at cwd, but any absolutes will bump the start\n    let r = ''\n    for (let i = paths.length - 1; i >= 0; i--) {\n      const p = paths[i]\n      if (!p || p === '.') continue\n      r = r ? `${p}/${r}` : p\n      if (this.isAbsolute(p)) {\n        break\n      }\n    }\n    const cached = this.#resolveCache.get(r)\n    if (cached !== undefined) {\n      return cached\n    }\n    const result = this.cwd.resolve(r).fullpath()\n    this.#resolveCache.set(r, result)\n    return result\n  }\n\n  /**\n   * Resolve one or more path strings to a resolved string, returning\n   * the posix path.  Identical to .resolve() on posix systems, but on\n   * windows will return a forward-slash separated UNC path.\n   *\n   * Same interface as require('path').resolve.\n   *\n   * Much faster than path.resolve() when called multiple times for the same\n   * path, because the resolved Path objects are cached.  Much slower\n   * otherwise.\n   */\n  resolvePosix(...paths: string[]): string {\n    // first figure out the minimum number of paths we have to test\n    // we always start at cwd, but any absolutes will bump the start\n    let r = ''\n    for (let i = paths.length - 1; i >= 0; i--) {\n      const p = paths[i]\n      if (!p || p === '.') continue\n      r = r ? `${p}/${r}` : p\n      if (this.isAbsolute(p)) {\n        break\n      }\n    }\n    const cached = this.#resolvePosixCache.get(r)\n    if (cached !== undefined) {\n      return cached\n    }\n    const result = this.cwd.resolve(r).fullpathPosix()\n    this.#resolvePosixCache.set(r, result)\n    return result\n  }\n\n  /**\n   * find the relative path from the cwd to the supplied path string or entry\n   */\n  relative(entry: PathBase | string = this.cwd): string {\n    if (typeof entry === 'string') {\n      entry = this.cwd.resolve(entry)\n    }\n    return entry.relative()\n  }\n\n  /**\n   * find the relative path from the cwd to the supplied path string or\n   * entry, using / as the path delimiter, even on Windows.\n   */\n  relativePosix(entry: PathBase | string = this.cwd): string {\n    if (typeof entry === 'string') {\n      entry = this.cwd.resolve(entry)\n    }\n    return entry.relativePosix()\n  }\n\n  /**\n   * Return the basename for the provided string or Path object\n   */\n  basename(entry: PathBase | string = this.cwd): string {\n    if (typeof entry === 'string') {\n      entry = this.cwd.resolve(entry)\n    }\n    return entry.name\n  }\n\n  /**\n   * Return the dirname for the provided string or Path object\n   */\n  dirname(entry: PathBase | string = this.cwd): string {\n    if (typeof entry === 'string') {\n      entry = this.cwd.resolve(entry)\n    }\n    return (entry.parent || entry).fullpath()\n  }\n\n  /**\n   * Return an array of known child entries.\n   *\n   * First argument may be either a string, or a Path object.\n   *\n   * If the Path cannot or does not contain any children, then an empty array\n   * is returned.\n   *\n   * Results are cached, and thus may be out of date if the filesystem is\n   * mutated.\n   *\n   * Unlike `fs.readdir()`, the `withFileTypes` option defaults to `true`. Set\n   * `{ withFileTypes: false }` to return strings.\n   */\n\n  readdir(): Promise\n  readdir(opts: { withFileTypes: true }): Promise\n  readdir(opts: { withFileTypes: false }): Promise\n  readdir(opts: { withFileTypes: boolean }): Promise\n  readdir(entry: PathBase | string): Promise\n  readdir(\n    entry: PathBase | string,\n    opts: { withFileTypes: true },\n  ): Promise\n  readdir(\n    entry: PathBase | string,\n    opts: { withFileTypes: false },\n  ): Promise\n  readdir(\n    entry: PathBase | string,\n    opts: { withFileTypes: boolean },\n  ): Promise\n  async readdir(\n    entry: PathBase | string | { withFileTypes: boolean } = this.cwd,\n    opts: { withFileTypes: boolean } = {\n      withFileTypes: true,\n    },\n  ): Promise {\n    if (typeof entry === 'string') {\n      entry = this.cwd.resolve(entry)\n    } else if (!(entry instanceof PathBase)) {\n      opts = entry\n      entry = this.cwd\n    }\n    const { withFileTypes } = opts\n    if (!entry.canReaddir()) {\n      return []\n    } else {\n      const p = await entry.readdir()\n      return withFileTypes ? p : p.map(e => e.name)\n    }\n  }\n\n  /**\n   * synchronous {@link PathScurryBase.readdir}\n   */\n  readdirSync(): PathBase[]\n  readdirSync(opts: { withFileTypes: true }): PathBase[]\n  readdirSync(opts: { withFileTypes: false }): string[]\n  readdirSync(opts: { withFileTypes: boolean }): PathBase[] | string[]\n  readdirSync(entry: PathBase | string): PathBase[]\n  readdirSync(\n    entry: PathBase | string,\n    opts: { withFileTypes: true },\n  ): PathBase[]\n  readdirSync(\n    entry: PathBase | string,\n    opts: { withFileTypes: false },\n  ): string[]\n  readdirSync(\n    entry: PathBase | string,\n    opts: { withFileTypes: boolean },\n  ): PathBase[] | string[]\n  readdirSync(\n    entry: PathBase | string | { withFileTypes: boolean } = this.cwd,\n    opts: { withFileTypes: boolean } = {\n      withFileTypes: true,\n    },\n  ): PathBase[] | string[] {\n    if (typeof entry === 'string') {\n      entry = this.cwd.resolve(entry)\n    } else if (!(entry instanceof PathBase)) {\n      opts = entry\n      entry = this.cwd\n    }\n    const { withFileTypes = true } = opts\n    if (!entry.canReaddir()) {\n      return []\n    } else if (withFileTypes) {\n      return entry.readdirSync()\n    } else {\n      return entry.readdirSync().map(e => e.name)\n    }\n  }\n\n  /**\n   * Call lstat() on the string or Path object, and update all known\n   * information that can be determined.\n   *\n   * Note that unlike `fs.lstat()`, the returned value does not contain some\n   * information, such as `mode`, `dev`, `nlink`, and `ino`.  If that\n   * information is required, you will need to call `fs.lstat` yourself.\n   *\n   * If the Path refers to a nonexistent file, or if the lstat call fails for\n   * any reason, `undefined` is returned.  Otherwise the updated Path object is\n   * returned.\n   *\n   * Results are cached, and thus may be out of date if the filesystem is\n   * mutated.\n   */\n  async lstat(\n    entry: string | PathBase = this.cwd,\n  ): Promise {\n    if (typeof entry === 'string') {\n      entry = this.cwd.resolve(entry)\n    }\n    return entry.lstat()\n  }\n\n  /**\n   * synchronous {@link PathScurryBase.lstat}\n   */\n  lstatSync(entry: string | PathBase = this.cwd): PathBase | undefined {\n    if (typeof entry === 'string') {\n      entry = this.cwd.resolve(entry)\n    }\n    return entry.lstatSync()\n  }\n\n  /**\n   * Return the Path object or string path corresponding to the target of a\n   * symbolic link.\n   *\n   * If the path is not a symbolic link, or if the readlink call fails for any\n   * reason, `undefined` is returned.\n   *\n   * Result is cached, and thus may be outdated if the filesystem is mutated.\n   *\n   * `{withFileTypes}` option defaults to `false`.\n   *\n   * On success, returns a Path object if `withFileTypes` option is true,\n   * otherwise a string.\n   */\n  readlink(): Promise\n  readlink(opt: { withFileTypes: false }): Promise\n  readlink(opt: { withFileTypes: true }): Promise\n  readlink(opt: {\n    withFileTypes: boolean\n  }): Promise\n  readlink(\n    entry: string | PathBase,\n    opt?: { withFileTypes: false },\n  ): Promise\n  readlink(\n    entry: string | PathBase,\n    opt: { withFileTypes: true },\n  ): Promise\n  readlink(\n    entry: string | PathBase,\n    opt: { withFileTypes: boolean },\n  ): Promise\n  async readlink(\n    entry: string | PathBase | { withFileTypes: boolean } = this.cwd,\n    { withFileTypes }: { withFileTypes: boolean } = {\n      withFileTypes: false,\n    },\n  ): Promise {\n    if (typeof entry === 'string') {\n      entry = this.cwd.resolve(entry)\n    } else if (!(entry instanceof PathBase)) {\n      withFileTypes = entry.withFileTypes\n      entry = this.cwd\n    }\n    const e = await entry.readlink()\n    return withFileTypes ? e : e?.fullpath()\n  }\n\n  /**\n   * synchronous {@link PathScurryBase.readlink}\n   */\n  readlinkSync(): string | undefined\n  readlinkSync(opt: { withFileTypes: false }): string | undefined\n  readlinkSync(opt: { withFileTypes: true }): PathBase | undefined\n  readlinkSync(opt: {\n    withFileTypes: boolean\n  }): PathBase | string | undefined\n  readlinkSync(\n    entry: string | PathBase,\n    opt?: { withFileTypes: false },\n  ): string | undefined\n  readlinkSync(\n    entry: string | PathBase,\n    opt: { withFileTypes: true },\n  ): PathBase | undefined\n  readlinkSync(\n    entry: string | PathBase,\n    opt: { withFileTypes: boolean },\n  ): string | PathBase | undefined\n  readlinkSync(\n    entry: string | PathBase | { withFileTypes: boolean } = this.cwd,\n    { withFileTypes }: { withFileTypes: boolean } = {\n      withFileTypes: false,\n    },\n  ): string | PathBase | undefined {\n    if (typeof entry === 'string') {\n      entry = this.cwd.resolve(entry)\n    } else if (!(entry instanceof PathBase)) {\n      withFileTypes = entry.withFileTypes\n      entry = this.cwd\n    }\n    const e = entry.readlinkSync()\n    return withFileTypes ? e : e?.fullpath()\n  }\n\n  /**\n   * Return the Path object or string path corresponding to path as resolved\n   * by realpath(3).\n   *\n   * If the realpath call fails for any reason, `undefined` is returned.\n   *\n   * Result is cached, and thus may be outdated if the filesystem is mutated.\n   *\n   * `{withFileTypes}` option defaults to `false`.\n   *\n   * On success, returns a Path object if `withFileTypes` option is true,\n   * otherwise a string.\n   */\n  realpath(): Promise\n  realpath(opt: { withFileTypes: false }): Promise\n  realpath(opt: { withFileTypes: true }): Promise\n  realpath(opt: {\n    withFileTypes: boolean\n  }): Promise\n  realpath(\n    entry: string | PathBase,\n    opt?: { withFileTypes: false },\n  ): Promise\n  realpath(\n    entry: string | PathBase,\n    opt: { withFileTypes: true },\n  ): Promise\n  realpath(\n    entry: string | PathBase,\n    opt: { withFileTypes: boolean },\n  ): Promise\n  async realpath(\n    entry: string | PathBase | { withFileTypes: boolean } = this.cwd,\n    { withFileTypes }: { withFileTypes: boolean } = {\n      withFileTypes: false,\n    },\n  ): Promise {\n    if (typeof entry === 'string') {\n      entry = this.cwd.resolve(entry)\n    } else if (!(entry instanceof PathBase)) {\n      withFileTypes = entry.withFileTypes\n      entry = this.cwd\n    }\n    const e = await entry.realpath()\n    return withFileTypes ? e : e?.fullpath()\n  }\n\n  realpathSync(): string | undefined\n  realpathSync(opt: { withFileTypes: false }): string | undefined\n  realpathSync(opt: { withFileTypes: true }): PathBase | undefined\n  realpathSync(opt: {\n    withFileTypes: boolean\n  }): PathBase | string | undefined\n  realpathSync(\n    entry: string | PathBase,\n    opt?: { withFileTypes: false },\n  ): string | undefined\n  realpathSync(\n    entry: string | PathBase,\n    opt: { withFileTypes: true },\n  ): PathBase | undefined\n  realpathSync(\n    entry: string | PathBase,\n    opt: { withFileTypes: boolean },\n  ): string | PathBase | undefined\n  realpathSync(\n    entry: string | PathBase | { withFileTypes: boolean } = this.cwd,\n    { withFileTypes }: { withFileTypes: boolean } = {\n      withFileTypes: false,\n    },\n  ): string | PathBase | undefined {\n    if (typeof entry === 'string') {\n      entry = this.cwd.resolve(entry)\n    } else if (!(entry instanceof PathBase)) {\n      withFileTypes = entry.withFileTypes\n      entry = this.cwd\n    }\n    const e = entry.realpathSync()\n    return withFileTypes ? e : e?.fullpath()\n  }\n\n  /**\n   * Asynchronously walk the directory tree, returning an array of\n   * all path strings or Path objects found.\n   *\n   * Note that this will be extremely memory-hungry on large filesystems.\n   * In such cases, it may be better to use the stream or async iterator\n   * walk implementation.\n   */\n  walk(): Promise\n  walk(\n    opts: WalkOptionsWithFileTypesTrue | WalkOptionsWithFileTypesUnset,\n  ): Promise\n  walk(opts: WalkOptionsWithFileTypesFalse): Promise\n  walk(opts: WalkOptions): Promise\n  walk(entry: string | PathBase): Promise\n  walk(\n    entry: string | PathBase,\n    opts: WalkOptionsWithFileTypesTrue | WalkOptionsWithFileTypesUnset,\n  ): Promise\n  walk(\n    entry: string | PathBase,\n    opts: WalkOptionsWithFileTypesFalse,\n  ): Promise\n  walk(\n    entry: string | PathBase,\n    opts: WalkOptions,\n  ): Promise\n  async walk(\n    entry: string | PathBase | WalkOptions = this.cwd,\n    opts: WalkOptions = {},\n  ): Promise {\n    if (typeof entry === 'string') {\n      entry = this.cwd.resolve(entry)\n    } else if (!(entry instanceof PathBase)) {\n      opts = entry\n      entry = this.cwd\n    }\n    const {\n      withFileTypes = true,\n      follow = false,\n      filter,\n      walkFilter,\n    } = opts\n    const results: (string | PathBase)[] = []\n    if (!filter || filter(entry)) {\n      results.push(withFileTypes ? entry : entry.fullpath())\n    }\n    const dirs = new Set()\n    const walk = (\n      dir: PathBase,\n      cb: (er?: NodeJS.ErrnoException) => void,\n    ) => {\n      dirs.add(dir)\n      dir.readdirCB((er, entries) => {\n        /* c8 ignore start */\n        if (er) {\n          return cb(er)\n        }\n        /* c8 ignore stop */\n        let len = entries.length\n        if (!len) return cb()\n        const next = () => {\n          if (--len === 0) {\n            cb()\n          }\n        }\n        for (const e of entries) {\n          if (!filter || filter(e)) {\n            results.push(withFileTypes ? e : e.fullpath())\n          }\n          if (follow && e.isSymbolicLink()) {\n            e.realpath()\n              .then(r => (r?.isUnknown() ? r.lstat() : r))\n              .then(r =>\n                r?.shouldWalk(dirs, walkFilter) ? walk(r, next) : next(),\n              )\n          } else {\n            if (e.shouldWalk(dirs, walkFilter)) {\n              walk(e, next)\n            } else {\n              next()\n            }\n          }\n        }\n      }, true) // zalgooooooo\n    }\n\n    const start = entry\n    return new Promise((res, rej) => {\n      walk(start, er => {\n        /* c8 ignore start */\n        if (er) return rej(er)\n        /* c8 ignore stop */\n        res(results as PathBase[] | string[])\n      })\n    })\n  }\n\n  /**\n   * Synchronously walk the directory tree, returning an array of\n   * all path strings or Path objects found.\n   *\n   * Note that this will be extremely memory-hungry on large filesystems.\n   * In such cases, it may be better to use the stream or async iterator\n   * walk implementation.\n   */\n  walkSync(): PathBase[]\n  walkSync(\n    opts: WalkOptionsWithFileTypesTrue | WalkOptionsWithFileTypesUnset,\n  ): PathBase[]\n  walkSync(opts: WalkOptionsWithFileTypesFalse): string[]\n  walkSync(opts: WalkOptions): string[] | PathBase[]\n  walkSync(entry: string | PathBase): PathBase[]\n  walkSync(\n    entry: string | PathBase,\n    opts: WalkOptionsWithFileTypesUnset | WalkOptionsWithFileTypesTrue,\n  ): PathBase[]\n  walkSync(\n    entry: string | PathBase,\n    opts: WalkOptionsWithFileTypesFalse,\n  ): string[]\n  walkSync(\n    entry: string | PathBase,\n    opts: WalkOptions,\n  ): PathBase[] | string[]\n  walkSync(\n    entry: string | PathBase | WalkOptions = this.cwd,\n    opts: WalkOptions = {},\n  ): PathBase[] | string[] {\n    if (typeof entry === 'string') {\n      entry = this.cwd.resolve(entry)\n    } else if (!(entry instanceof PathBase)) {\n      opts = entry\n      entry = this.cwd\n    }\n    const {\n      withFileTypes = true,\n      follow = false,\n      filter,\n      walkFilter,\n    } = opts\n    const results: (string | PathBase)[] = []\n    if (!filter || filter(entry)) {\n      results.push(withFileTypes ? entry : entry.fullpath())\n    }\n    const dirs = new Set([entry])\n    for (const dir of dirs) {\n      const entries = dir.readdirSync()\n      for (const e of entries) {\n        if (!filter || filter(e)) {\n          results.push(withFileTypes ? e : e.fullpath())\n        }\n        let r: PathBase | undefined = e\n        if (e.isSymbolicLink()) {\n          if (!(follow && (r = e.realpathSync()))) continue\n          if (r.isUnknown()) r.lstatSync()\n        }\n        if (r.shouldWalk(dirs, walkFilter)) {\n          dirs.add(r)\n        }\n      }\n    }\n    return results as string[] | PathBase[]\n  }\n\n  /**\n   * Support for `for await`\n   *\n   * Alias for {@link PathScurryBase.iterate}\n   *\n   * Note: As of Node 19, this is very slow, compared to other methods of\n   * walking.  Consider using {@link PathScurryBase.stream} if memory overhead\n   * and backpressure are concerns, or {@link PathScurryBase.walk} if not.\n   */\n  [Symbol.asyncIterator]() {\n    return this.iterate()\n  }\n\n  /**\n   * Async generator form of {@link PathScurryBase.walk}\n   *\n   * Note: As of Node 19, this is very slow, compared to other methods of\n   * walking, especially if most/all of the directory tree has been previously\n   * walked.  Consider using {@link PathScurryBase.stream} if memory overhead\n   * and backpressure are concerns, or {@link PathScurryBase.walk} if not.\n   */\n  iterate(): AsyncGenerator\n  iterate(\n    opts: WalkOptionsWithFileTypesTrue | WalkOptionsWithFileTypesUnset,\n  ): AsyncGenerator\n  iterate(\n    opts: WalkOptionsWithFileTypesFalse,\n  ): AsyncGenerator\n  iterate(opts: WalkOptions): AsyncGenerator\n  iterate(entry: string | PathBase): AsyncGenerator\n  iterate(\n    entry: string | PathBase,\n    opts: WalkOptionsWithFileTypesTrue | WalkOptionsWithFileTypesUnset,\n  ): AsyncGenerator\n  iterate(\n    entry: string | PathBase,\n    opts: WalkOptionsWithFileTypesFalse,\n  ): AsyncGenerator\n  iterate(\n    entry: string | PathBase,\n    opts: WalkOptions,\n  ): AsyncGenerator\n  iterate(\n    entry: string | PathBase | WalkOptions = this.cwd,\n    options: WalkOptions = {},\n  ): AsyncGenerator {\n    // iterating async over the stream is significantly more performant,\n    // especially in the warm-cache scenario, because it buffers up directory\n    // entries in the background instead of waiting for a yield for each one.\n    if (typeof entry === 'string') {\n      entry = this.cwd.resolve(entry)\n    } else if (!(entry instanceof PathBase)) {\n      options = entry\n      entry = this.cwd\n    }\n    return this.stream(entry, options)[Symbol.asyncIterator]()\n  }\n\n  /**\n   * Iterating over a PathScurry performs a synchronous walk.\n   *\n   * Alias for {@link PathScurryBase.iterateSync}\n   */\n  [Symbol.iterator]() {\n    return this.iterateSync()\n  }\n\n  iterateSync(): Generator\n  iterateSync(\n    opts: WalkOptionsWithFileTypesTrue | WalkOptionsWithFileTypesUnset,\n  ): Generator\n  iterateSync(\n    opts: WalkOptionsWithFileTypesFalse,\n  ): Generator\n  iterateSync(opts: WalkOptions): Generator\n  iterateSync(entry: string | PathBase): Generator\n  iterateSync(\n    entry: string | PathBase,\n    opts: WalkOptionsWithFileTypesTrue | WalkOptionsWithFileTypesUnset,\n  ): Generator\n  iterateSync(\n    entry: string | PathBase,\n    opts: WalkOptionsWithFileTypesFalse,\n  ): Generator\n  iterateSync(\n    entry: string | PathBase,\n    opts: WalkOptions,\n  ): Generator\n  *iterateSync(\n    entry: string | PathBase | WalkOptions = this.cwd,\n    opts: WalkOptions = {},\n  ): Generator {\n    if (typeof entry === 'string') {\n      entry = this.cwd.resolve(entry)\n    } else if (!(entry instanceof PathBase)) {\n      opts = entry\n      entry = this.cwd\n    }\n    const {\n      withFileTypes = true,\n      follow = false,\n      filter,\n      walkFilter,\n    } = opts\n    if (!filter || filter(entry)) {\n      yield withFileTypes ? entry : entry.fullpath()\n    }\n    const dirs = new Set([entry])\n    for (const dir of dirs) {\n      const entries = dir.readdirSync()\n      for (const e of entries) {\n        if (!filter || filter(e)) {\n          yield withFileTypes ? e : e.fullpath()\n        }\n        let r: PathBase | undefined = e\n        if (e.isSymbolicLink()) {\n          if (!(follow && (r = e.realpathSync()))) continue\n          if (r.isUnknown()) r.lstatSync()\n        }\n        if (r.shouldWalk(dirs, walkFilter)) {\n          dirs.add(r)\n        }\n      }\n    }\n  }\n\n  /**\n   * Stream form of {@link PathScurryBase.walk}\n   *\n   * Returns a Minipass stream that emits {@link PathBase} objects by default,\n   * or strings if `{ withFileTypes: false }` is set in the options.\n   */\n  stream(): Minipass\n  stream(\n    opts: WalkOptionsWithFileTypesTrue | WalkOptionsWithFileTypesUnset,\n  ): Minipass\n  stream(opts: WalkOptionsWithFileTypesFalse): Minipass\n  stream(opts: WalkOptions): Minipass\n  stream(entry: string | PathBase): Minipass\n  stream(\n    entry: string | PathBase,\n    opts: WalkOptionsWithFileTypesUnset | WalkOptionsWithFileTypesTrue,\n  ): Minipass\n  stream(\n    entry: string | PathBase,\n    opts: WalkOptionsWithFileTypesFalse,\n  ): Minipass\n  stream(\n    entry: string | PathBase,\n    opts: WalkOptions,\n  ): Minipass | Minipass\n  stream(\n    entry: string | PathBase | WalkOptions = this.cwd,\n    opts: WalkOptions = {},\n  ): Minipass | Minipass {\n    if (typeof entry === 'string') {\n      entry = this.cwd.resolve(entry)\n    } else if (!(entry instanceof PathBase)) {\n      opts = entry\n      entry = this.cwd\n    }\n    const {\n      withFileTypes = true,\n      follow = false,\n      filter,\n      walkFilter,\n    } = opts\n    const results = new Minipass({ objectMode: true })\n    if (!filter || filter(entry)) {\n      results.write(withFileTypes ? entry : entry.fullpath())\n    }\n    const dirs = new Set()\n    const queue: PathBase[] = [entry]\n    let processing = 0\n    const process = () => {\n      let paused = false\n      while (!paused) {\n        const dir = queue.shift()\n        if (!dir) {\n          if (processing === 0) results.end()\n          return\n        }\n\n        processing++\n        dirs.add(dir)\n\n        const onReaddir = (\n          er: null | NodeJS.ErrnoException,\n          entries: PathBase[],\n          didRealpaths: boolean = false,\n        ) => {\n          /* c8 ignore start */\n          if (er) return results.emit('error', er)\n          /* c8 ignore stop */\n          if (follow && !didRealpaths) {\n            const promises: Promise[] = []\n            for (const e of entries) {\n              if (e.isSymbolicLink()) {\n                promises.push(\n                  e\n                    .realpath()\n                    .then((r: PathBase | undefined) =>\n                      r?.isUnknown() ? r.lstat() : r,\n                    ),\n                )\n              }\n            }\n            if (promises.length) {\n              Promise.all(promises).then(() =>\n                onReaddir(null, entries, true),\n              )\n              return\n            }\n          }\n\n          for (const e of entries) {\n            if (e && (!filter || filter(e))) {\n              if (!results.write(withFileTypes ? e : e.fullpath())) {\n                paused = true\n              }\n            }\n          }\n\n          processing--\n          for (const e of entries) {\n            const r = e.realpathCached() || e\n            if (r.shouldWalk(dirs, walkFilter)) {\n              queue.push(r)\n            }\n          }\n          if (paused && !results.flowing) {\n            results.once('drain', process)\n          } else if (!sync) {\n            process()\n          }\n        }\n\n        // zalgo containment\n        let sync = true\n        dir.readdirCB(onReaddir, true)\n        sync = false\n      }\n    }\n    process()\n    return results as Minipass | Minipass\n  }\n\n  /**\n   * Synchronous form of {@link PathScurryBase.stream}\n   *\n   * Returns a Minipass stream that emits {@link PathBase} objects by default,\n   * or strings if `{ withFileTypes: false }` is set in the options.\n   *\n   * Will complete the walk in a single tick if the stream is consumed fully.\n   * Otherwise, will pause as needed for stream backpressure.\n   */\n  streamSync(): Minipass\n  streamSync(\n    opts: WalkOptionsWithFileTypesTrue | WalkOptionsWithFileTypesUnset,\n  ): Minipass\n  streamSync(opts: WalkOptionsWithFileTypesFalse): Minipass\n  streamSync(opts: WalkOptions): Minipass\n  streamSync(entry: string | PathBase): Minipass\n  streamSync(\n    entry: string | PathBase,\n    opts: WalkOptionsWithFileTypesUnset | WalkOptionsWithFileTypesTrue,\n  ): Minipass\n  streamSync(\n    entry: string | PathBase,\n    opts: WalkOptionsWithFileTypesFalse,\n  ): Minipass\n  streamSync(\n    entry: string | PathBase,\n    opts: WalkOptions,\n  ): Minipass | Minipass\n  streamSync(\n    entry: string | PathBase | WalkOptions = this.cwd,\n    opts: WalkOptions = {},\n  ): Minipass | Minipass {\n    if (typeof entry === 'string') {\n      entry = this.cwd.resolve(entry)\n    } else if (!(entry instanceof PathBase)) {\n      opts = entry\n      entry = this.cwd\n    }\n    const {\n      withFileTypes = true,\n      follow = false,\n      filter,\n      walkFilter,\n    } = opts\n    const results = new Minipass({ objectMode: true })\n    const dirs = new Set()\n    if (!filter || filter(entry)) {\n      results.write(withFileTypes ? entry : entry.fullpath())\n    }\n    const queue: PathBase[] = [entry]\n    let processing = 0\n    const process = () => {\n      let paused = false\n      while (!paused) {\n        const dir = queue.shift()\n        if (!dir) {\n          if (processing === 0) results.end()\n          return\n        }\n        processing++\n        dirs.add(dir)\n\n        const entries = dir.readdirSync()\n        for (const e of entries) {\n          if (!filter || filter(e)) {\n            if (!results.write(withFileTypes ? e : e.fullpath())) {\n              paused = true\n            }\n          }\n        }\n        processing--\n        for (const e of entries) {\n          let r: PathBase | undefined = e\n          if (e.isSymbolicLink()) {\n            if (!(follow && (r = e.realpathSync()))) continue\n            if (r.isUnknown()) r.lstatSync()\n          }\n          if (r.shouldWalk(dirs, walkFilter)) {\n            queue.push(r)\n          }\n        }\n      }\n      if (paused && !results.flowing) results.once('drain', process)\n    }\n    process()\n    return results as Minipass | Minipass\n  }\n\n  chdir(path: string | Path = this.cwd) {\n    const oldCwd = this.cwd\n    this.cwd = typeof path === 'string' ? this.cwd.resolve(path) : path\n    this.cwd[setAsCwd](oldCwd)\n  }\n}\n\n/**\n * Options provided to all walk methods.\n */\nexport interface WalkOptions {\n  /**\n   * Return results as {@link PathBase} objects rather than strings.\n   * When set to false, results are fully resolved paths, as returned by\n   * {@link PathBase.fullpath}.\n   * @default true\n   */\n  withFileTypes?: boolean\n\n  /**\n   *  Attempt to read directory entries from symbolic links. Otherwise, only\n   *  actual directories are traversed. Regardless of this setting, a given\n   *  target path will only ever be walked once, meaning that a symbolic link\n   *  to a previously traversed directory will never be followed.\n   *\n   *  Setting this imposes a slight performance penalty, because `readlink`\n   *  must be called on all symbolic links encountered, in order to avoid\n   *  infinite cycles.\n   * @default false\n   */\n  follow?: boolean\n\n  /**\n   * Only return entries where the provided function returns true.\n   *\n   * This will not prevent directories from being traversed, even if they do\n   * not pass the filter, though it will prevent directories themselves from\n   * being included in the result set.  See {@link walkFilter}\n   *\n   * Asynchronous functions are not supported here.\n   *\n   * By default, if no filter is provided, all entries and traversed\n   * directories are included.\n   */\n  filter?: (entry: PathBase) => boolean\n\n  /**\n   * Only traverse directories (and in the case of {@link follow} being set to\n   * true, symbolic links to directories) if the provided function returns\n   * true.\n   *\n   * This will not prevent directories from being included in the result set,\n   * even if they do not pass the supplied filter function.  See {@link filter}\n   * to do that.\n   *\n   * Asynchronous functions are not supported here.\n   */\n  walkFilter?: (entry: PathBase) => boolean\n}\n\nexport type WalkOptionsWithFileTypesUnset = WalkOptions & {\n  withFileTypes?: undefined\n}\nexport type WalkOptionsWithFileTypesTrue = WalkOptions & {\n  withFileTypes: true\n}\nexport type WalkOptionsWithFileTypesFalse = WalkOptions & {\n  withFileTypes: false\n}\n\n/**\n * Windows implementation of {@link PathScurryBase}\n *\n * Defaults to case insensitve, uses `'\\\\'` to generate path strings.  Uses\n * {@link PathWin32} for Path objects.\n */\nexport class PathScurryWin32 extends PathScurryBase {\n  /**\n   * separator for generating path strings\n   */\n  sep: '\\\\' = '\\\\'\n\n  constructor(\n    cwd: URL | string = process.cwd(),\n    opts: PathScurryOpts = {},\n  ) {\n    const { nocase = true } = opts\n    super(cwd, win32, '\\\\', { ...opts, nocase })\n    this.nocase = nocase\n    for (let p: PathBase | undefined = this.cwd; p; p = p.parent) {\n      p.nocase = this.nocase\n    }\n  }\n\n  /**\n   * @internal\n   */\n  parseRootPath(dir: string): string {\n    // if the path starts with a single separator, it's not a UNC, and we'll\n    // just get separator as the root, and driveFromUNC will return \\\n    // In that case, mount \\ on the root from the cwd.\n    return win32.parse(dir).root.toUpperCase()\n  }\n\n  /**\n   * @internal\n   */\n  newRoot(fs: FSValue) {\n    return new PathWin32(\n      this.rootPath,\n      IFDIR,\n      undefined,\n      this.roots,\n      this.nocase,\n      this.childrenCache(),\n      { fs },\n    )\n  }\n\n  /**\n   * Return true if the provided path string is an absolute path\n   */\n  isAbsolute(p: string): boolean {\n    return (\n      p.startsWith('/') || p.startsWith('\\\\') || /^[a-z]:(\\/|\\\\)/i.test(p)\n    )\n  }\n}\n\n/**\n * {@link PathScurryBase} implementation for all posix systems other than Darwin.\n *\n * Defaults to case-sensitive matching, uses `'/'` to generate path strings.\n *\n * Uses {@link PathPosix} for Path objects.\n */\nexport class PathScurryPosix extends PathScurryBase {\n  /**\n   * separator for generating path strings\n   */\n  sep: '/' = '/'\n  constructor(\n    cwd: URL | string = process.cwd(),\n    opts: PathScurryOpts = {},\n  ) {\n    const { nocase = false } = opts\n    super(cwd, posix, '/', { ...opts, nocase })\n    this.nocase = nocase\n  }\n\n  /**\n   * @internal\n   */\n  parseRootPath(_dir: string): string {\n    return '/'\n  }\n\n  /**\n   * @internal\n   */\n  newRoot(fs: FSValue) {\n    return new PathPosix(\n      this.rootPath,\n      IFDIR,\n      undefined,\n      this.roots,\n      this.nocase,\n      this.childrenCache(),\n      { fs },\n    )\n  }\n\n  /**\n   * Return true if the provided path string is an absolute path\n   */\n  isAbsolute(p: string): boolean {\n    return p.startsWith('/')\n  }\n}\n\n/**\n * {@link PathScurryBase} implementation for Darwin (macOS) systems.\n *\n * Defaults to case-insensitive matching, uses `'/'` for generating path\n * strings.\n *\n * Uses {@link PathPosix} for Path objects.\n */\nexport class PathScurryDarwin extends PathScurryPosix {\n  constructor(\n    cwd: URL | string = process.cwd(),\n    opts: PathScurryOpts = {},\n  ) {\n    const { nocase = true } = opts\n    super(cwd, { ...opts, nocase })\n  }\n}\n\n/**\n * Default {@link PathBase} implementation for the current platform.\n *\n * {@link PathWin32} on Windows systems, {@link PathPosix} on all others.\n */\nexport const Path = process.platform === 'win32' ? PathWin32 : PathPosix\nexport type Path = PathBase | InstanceType\n\n/**\n * Default {@link PathScurryBase} implementation for the current platform.\n *\n * {@link PathScurryWin32} on Windows systems, {@link PathScurryDarwin} on\n * Darwin (macOS) systems, {@link PathScurryPosix} on all others.\n */\nexport const PathScurry:\n  | typeof PathScurryWin32\n  | typeof PathScurryDarwin\n  | typeof PathScurryPosix =\n  process.platform === 'win32' ? PathScurryWin32\n  : process.platform === 'darwin' ? PathScurryDarwin\n  : PathScurryPosix\nexport type PathScurry = PathScurryBase | InstanceType\n"]}
              \ No newline at end of file
              diff --git a/node_modules/path-scurry/dist/commonjs/package.json b/node_modules/path-scurry/dist/commonjs/package.json
              deleted file mode 100644
              index 5bbefffb..00000000
              --- a/node_modules/path-scurry/dist/commonjs/package.json
              +++ /dev/null
              @@ -1,3 +0,0 @@
              -{
              -  "type": "commonjs"
              -}
              diff --git a/node_modules/path-scurry/dist/esm/index.d.ts b/node_modules/path-scurry/dist/esm/index.d.ts
              deleted file mode 100644
              index 33b3edbd..00000000
              --- a/node_modules/path-scurry/dist/esm/index.d.ts
              +++ /dev/null
              @@ -1,1116 +0,0 @@
              -/// 
              -/// 
              -/// 
              -import { LRUCache } from 'lru-cache';
              -import { posix, win32 } from 'node:path';
              -import { Minipass } from 'minipass';
              -import type { Dirent, Stats } from 'node:fs';
              -/**
              - * An object that will be used to override the default `fs`
              - * methods.  Any methods that are not overridden will use Node's
              - * built-in implementations.
              - *
              - * - lstatSync
              - * - readdir (callback `withFileTypes` Dirent variant, used for
              - *   readdirCB and most walks)
              - * - readdirSync
              - * - readlinkSync
              - * - realpathSync
              - * - promises: Object containing the following async methods:
              - *   - lstat
              - *   - readdir (Dirent variant only)
              - *   - readlink
              - *   - realpath
              - */
              -export interface FSOption {
              -    lstatSync?: (path: string) => Stats;
              -    readdir?: (path: string, options: {
              -        withFileTypes: true;
              -    }, cb: (er: NodeJS.ErrnoException | null, entries?: Dirent[]) => any) => void;
              -    readdirSync?: (path: string, options: {
              -        withFileTypes: true;
              -    }) => Dirent[];
              -    readlinkSync?: (path: string) => string;
              -    realpathSync?: (path: string) => string;
              -    promises?: {
              -        lstat?: (path: string) => Promise;
              -        readdir?: (path: string, options: {
              -            withFileTypes: true;
              -        }) => Promise;
              -        readlink?: (path: string) => Promise;
              -        realpath?: (path: string) => Promise;
              -        [k: string]: any;
              -    };
              -    [k: string]: any;
              -}
              -interface FSValue {
              -    lstatSync: (path: string) => Stats;
              -    readdir: (path: string, options: {
              -        withFileTypes: true;
              -    }, cb: (er: NodeJS.ErrnoException | null, entries?: Dirent[]) => any) => void;
              -    readdirSync: (path: string, options: {
              -        withFileTypes: true;
              -    }) => Dirent[];
              -    readlinkSync: (path: string) => string;
              -    realpathSync: (path: string) => string;
              -    promises: {
              -        lstat: (path: string) => Promise;
              -        readdir: (path: string, options: {
              -            withFileTypes: true;
              -        }) => Promise;
              -        readlink: (path: string) => Promise;
              -        realpath: (path: string) => Promise;
              -        [k: string]: any;
              -    };
              -    [k: string]: any;
              -}
              -export type Type = 'Unknown' | 'FIFO' | 'CharacterDevice' | 'Directory' | 'BlockDevice' | 'File' | 'SymbolicLink' | 'Socket';
              -/**
              - * Options that may be provided to the Path constructor
              - */
              -export interface PathOpts {
              -    fullpath?: string;
              -    relative?: string;
              -    relativePosix?: string;
              -    parent?: PathBase;
              -    /**
              -     * See {@link FSOption}
              -     */
              -    fs?: FSOption;
              -}
              -/**
              - * An LRUCache for storing resolved path strings or Path objects.
              - * @internal
              - */
              -export declare class ResolveCache extends LRUCache {
              -    constructor();
              -}
              -/**
              - * an LRUCache for storing child entries.
              - * @internal
              - */
              -export declare class ChildrenCache extends LRUCache {
              -    constructor(maxSize?: number);
              -}
              -/**
              - * Array of Path objects, plus a marker indicating the first provisional entry
              - *
              - * @internal
              - */
              -export type Children = PathBase[] & {
              -    provisional: number;
              -};
              -declare const setAsCwd: unique symbol;
              -/**
              - * Path objects are sort of like a super-powered
              - * {@link https://nodejs.org/docs/latest/api/fs.html#class-fsdirent fs.Dirent}
              - *
              - * Each one represents a single filesystem entry on disk, which may or may not
              - * exist. It includes methods for reading various types of information via
              - * lstat, readlink, and readdir, and caches all information to the greatest
              - * degree possible.
              - *
              - * Note that fs operations that would normally throw will instead return an
              - * "empty" value. This is in order to prevent excessive overhead from error
              - * stack traces.
              - */
              -export declare abstract class PathBase implements Dirent {
              -    #private;
              -    /**
              -     * the basename of this path
              -     *
              -     * **Important**: *always* test the path name against any test string
              -     * usingthe {@link isNamed} method, and not by directly comparing this
              -     * string. Otherwise, unicode path strings that the system sees as identical
              -     * will not be properly treated as the same path, leading to incorrect
              -     * behavior and possible security issues.
              -     */
              -    name: string;
              -    /**
              -     * the Path entry corresponding to the path root.
              -     *
              -     * @internal
              -     */
              -    root: PathBase;
              -    /**
              -     * All roots found within the current PathScurry family
              -     *
              -     * @internal
              -     */
              -    roots: {
              -        [k: string]: PathBase;
              -    };
              -    /**
              -     * a reference to the parent path, or undefined in the case of root entries
              -     *
              -     * @internal
              -     */
              -    parent?: PathBase;
              -    /**
              -     * boolean indicating whether paths are compared case-insensitively
              -     * @internal
              -     */
              -    nocase: boolean;
              -    /**
              -     * boolean indicating that this path is the current working directory
              -     * of the PathScurry collection that contains it.
              -     */
              -    isCWD: boolean;
              -    /**
              -     * the string or regexp used to split paths. On posix, it is `'/'`, and on
              -     * windows it is a RegExp matching either `'/'` or `'\\'`
              -     */
              -    abstract splitSep: string | RegExp;
              -    /**
              -     * The path separator string to use when joining paths
              -     */
              -    abstract sep: string;
              -    get dev(): number | undefined;
              -    get mode(): number | undefined;
              -    get nlink(): number | undefined;
              -    get uid(): number | undefined;
              -    get gid(): number | undefined;
              -    get rdev(): number | undefined;
              -    get blksize(): number | undefined;
              -    get ino(): number | undefined;
              -    get size(): number | undefined;
              -    get blocks(): number | undefined;
              -    get atimeMs(): number | undefined;
              -    get mtimeMs(): number | undefined;
              -    get ctimeMs(): number | undefined;
              -    get birthtimeMs(): number | undefined;
              -    get atime(): Date | undefined;
              -    get mtime(): Date | undefined;
              -    get ctime(): Date | undefined;
              -    get birthtime(): Date | undefined;
              -    /**
              -     * This property is for compatibility with the Dirent class as of
              -     * Node v20, where Dirent['parentPath'] refers to the path of the
              -     * directory that was passed to readdir. For root entries, it's the path
              -     * to the entry itself.
              -     */
              -    get parentPath(): string;
              -    /**
              -     * Deprecated alias for Dirent['parentPath'] Somewhat counterintuitively,
              -     * this property refers to the *parent* path, not the path object itself.
              -     */
              -    get path(): string;
              -    /**
              -     * Do not create new Path objects directly.  They should always be accessed
              -     * via the PathScurry class or other methods on the Path class.
              -     *
              -     * @internal
              -     */
              -    constructor(name: string, type: number | undefined, root: PathBase | undefined, roots: {
              -        [k: string]: PathBase;
              -    }, nocase: boolean, children: ChildrenCache, opts: PathOpts);
              -    /**
              -     * Returns the depth of the Path object from its root.
              -     *
              -     * For example, a path at `/foo/bar` would have a depth of 2.
              -     */
              -    depth(): number;
              -    /**
              -     * @internal
              -     */
              -    abstract getRootString(path: string): string;
              -    /**
              -     * @internal
              -     */
              -    abstract getRoot(rootPath: string): PathBase;
              -    /**
              -     * @internal
              -     */
              -    abstract newChild(name: string, type?: number, opts?: PathOpts): PathBase;
              -    /**
              -     * @internal
              -     */
              -    childrenCache(): ChildrenCache;
              -    /**
              -     * Get the Path object referenced by the string path, resolved from this Path
              -     */
              -    resolve(path?: string): PathBase;
              -    /**
              -     * Returns the cached children Path objects, if still available.  If they
              -     * have fallen out of the cache, then returns an empty array, and resets the
              -     * READDIR_CALLED bit, so that future calls to readdir() will require an fs
              -     * lookup.
              -     *
              -     * @internal
              -     */
              -    children(): Children;
              -    /**
              -     * Resolves a path portion and returns or creates the child Path.
              -     *
              -     * Returns `this` if pathPart is `''` or `'.'`, or `parent` if pathPart is
              -     * `'..'`.
              -     *
              -     * This should not be called directly.  If `pathPart` contains any path
              -     * separators, it will lead to unsafe undefined behavior.
              -     *
              -     * Use `Path.resolve()` instead.
              -     *
              -     * @internal
              -     */
              -    child(pathPart: string, opts?: PathOpts): PathBase;
              -    /**
              -     * The relative path from the cwd. If it does not share an ancestor with
              -     * the cwd, then this ends up being equivalent to the fullpath()
              -     */
              -    relative(): string;
              -    /**
              -     * The relative path from the cwd, using / as the path separator.
              -     * If it does not share an ancestor with
              -     * the cwd, then this ends up being equivalent to the fullpathPosix()
              -     * On posix systems, this is identical to relative().
              -     */
              -    relativePosix(): string;
              -    /**
              -     * The fully resolved path string for this Path entry
              -     */
              -    fullpath(): string;
              -    /**
              -     * On platforms other than windows, this is identical to fullpath.
              -     *
              -     * On windows, this is overridden to return the forward-slash form of the
              -     * full UNC path.
              -     */
              -    fullpathPosix(): string;
              -    /**
              -     * Is the Path of an unknown type?
              -     *
              -     * Note that we might know *something* about it if there has been a previous
              -     * filesystem operation, for example that it does not exist, or is not a
              -     * link, or whether it has child entries.
              -     */
              -    isUnknown(): boolean;
              -    isType(type: Type): boolean;
              -    getType(): Type;
              -    /**
              -     * Is the Path a regular file?
              -     */
              -    isFile(): boolean;
              -    /**
              -     * Is the Path a directory?
              -     */
              -    isDirectory(): boolean;
              -    /**
              -     * Is the path a character device?
              -     */
              -    isCharacterDevice(): boolean;
              -    /**
              -     * Is the path a block device?
              -     */
              -    isBlockDevice(): boolean;
              -    /**
              -     * Is the path a FIFO pipe?
              -     */
              -    isFIFO(): boolean;
              -    /**
              -     * Is the path a socket?
              -     */
              -    isSocket(): boolean;
              -    /**
              -     * Is the path a symbolic link?
              -     */
              -    isSymbolicLink(): boolean;
              -    /**
              -     * Return the entry if it has been subject of a successful lstat, or
              -     * undefined otherwise.
              -     *
              -     * Does not read the filesystem, so an undefined result *could* simply
              -     * mean that we haven't called lstat on it.
              -     */
              -    lstatCached(): PathBase | undefined;
              -    /**
              -     * Return the cached link target if the entry has been the subject of a
              -     * successful readlink, or undefined otherwise.
              -     *
              -     * Does not read the filesystem, so an undefined result *could* just mean we
              -     * don't have any cached data. Only use it if you are very sure that a
              -     * readlink() has been called at some point.
              -     */
              -    readlinkCached(): PathBase | undefined;
              -    /**
              -     * Returns the cached realpath target if the entry has been the subject
              -     * of a successful realpath, or undefined otherwise.
              -     *
              -     * Does not read the filesystem, so an undefined result *could* just mean we
              -     * don't have any cached data. Only use it if you are very sure that a
              -     * realpath() has been called at some point.
              -     */
              -    realpathCached(): PathBase | undefined;
              -    /**
              -     * Returns the cached child Path entries array if the entry has been the
              -     * subject of a successful readdir(), or [] otherwise.
              -     *
              -     * Does not read the filesystem, so an empty array *could* just mean we
              -     * don't have any cached data. Only use it if you are very sure that a
              -     * readdir() has been called recently enough to still be valid.
              -     */
              -    readdirCached(): PathBase[];
              -    /**
              -     * Return true if it's worth trying to readlink.  Ie, we don't (yet) have
              -     * any indication that readlink will definitely fail.
              -     *
              -     * Returns false if the path is known to not be a symlink, if a previous
              -     * readlink failed, or if the entry does not exist.
              -     */
              -    canReadlink(): boolean;
              -    /**
              -     * Return true if readdir has previously been successfully called on this
              -     * path, indicating that cachedReaddir() is likely valid.
              -     */
              -    calledReaddir(): boolean;
              -    /**
              -     * Returns true if the path is known to not exist. That is, a previous lstat
              -     * or readdir failed to verify its existence when that would have been
              -     * expected, or a parent entry was marked either enoent or enotdir.
              -     */
              -    isENOENT(): boolean;
              -    /**
              -     * Return true if the path is a match for the given path name.  This handles
              -     * case sensitivity and unicode normalization.
              -     *
              -     * Note: even on case-sensitive systems, it is **not** safe to test the
              -     * equality of the `.name` property to determine whether a given pathname
              -     * matches, due to unicode normalization mismatches.
              -     *
              -     * Always use this method instead of testing the `path.name` property
              -     * directly.
              -     */
              -    isNamed(n: string): boolean;
              -    /**
              -     * Return the Path object corresponding to the target of a symbolic link.
              -     *
              -     * If the Path is not a symbolic link, or if the readlink call fails for any
              -     * reason, `undefined` is returned.
              -     *
              -     * Result is cached, and thus may be outdated if the filesystem is mutated.
              -     */
              -    readlink(): Promise;
              -    /**
              -     * Synchronous {@link PathBase.readlink}
              -     */
              -    readlinkSync(): PathBase | undefined;
              -    /**
              -     * Call lstat() on this Path, and update all known information that can be
              -     * determined.
              -     *
              -     * Note that unlike `fs.lstat()`, the returned value does not contain some
              -     * information, such as `mode`, `dev`, `nlink`, and `ino`.  If that
              -     * information is required, you will need to call `fs.lstat` yourself.
              -     *
              -     * If the Path refers to a nonexistent file, or if the lstat call fails for
              -     * any reason, `undefined` is returned.  Otherwise the updated Path object is
              -     * returned.
              -     *
              -     * Results are cached, and thus may be out of date if the filesystem is
              -     * mutated.
              -     */
              -    lstat(): Promise;
              -    /**
              -     * synchronous {@link PathBase.lstat}
              -     */
              -    lstatSync(): PathBase | undefined;
              -    /**
              -     * Standard node-style callback interface to get list of directory entries.
              -     *
              -     * If the Path cannot or does not contain any children, then an empty array
              -     * is returned.
              -     *
              -     * Results are cached, and thus may be out of date if the filesystem is
              -     * mutated.
              -     *
              -     * @param cb The callback called with (er, entries).  Note that the `er`
              -     * param is somewhat extraneous, as all readdir() errors are handled and
              -     * simply result in an empty set of entries being returned.
              -     * @param allowZalgo Boolean indicating that immediately known results should
              -     * *not* be deferred with `queueMicrotask`. Defaults to `false`. Release
              -     * zalgo at your peril, the dark pony lord is devious and unforgiving.
              -     */
              -    readdirCB(cb: (er: NodeJS.ErrnoException | null, entries: PathBase[]) => any, allowZalgo?: boolean): void;
              -    /**
              -     * Return an array of known child entries.
              -     *
              -     * If the Path cannot or does not contain any children, then an empty array
              -     * is returned.
              -     *
              -     * Results are cached, and thus may be out of date if the filesystem is
              -     * mutated.
              -     */
              -    readdir(): Promise;
              -    /**
              -     * synchronous {@link PathBase.readdir}
              -     */
              -    readdirSync(): PathBase[];
              -    canReaddir(): boolean;
              -    shouldWalk(dirs: Set, walkFilter?: (e: PathBase) => boolean): boolean;
              -    /**
              -     * Return the Path object corresponding to path as resolved
              -     * by realpath(3).
              -     *
              -     * If the realpath call fails for any reason, `undefined` is returned.
              -     *
              -     * Result is cached, and thus may be outdated if the filesystem is mutated.
              -     * On success, returns a Path object.
              -     */
              -    realpath(): Promise;
              -    /**
              -     * Synchronous {@link realpath}
              -     */
              -    realpathSync(): PathBase | undefined;
              -    /**
              -     * Internal method to mark this Path object as the scurry cwd,
              -     * called by {@link PathScurry#chdir}
              -     *
              -     * @internal
              -     */
              -    [setAsCwd](oldCwd: PathBase): void;
              -}
              -/**
              - * Path class used on win32 systems
              - *
              - * Uses `'\\'` as the path separator for returned paths, either `'\\'` or `'/'`
              - * as the path separator for parsing paths.
              - */
              -export declare class PathWin32 extends PathBase {
              -    /**
              -     * Separator for generating path strings.
              -     */
              -    sep: '\\';
              -    /**
              -     * Separator for parsing path strings.
              -     */
              -    splitSep: RegExp;
              -    /**
              -     * Do not create new Path objects directly.  They should always be accessed
              -     * via the PathScurry class or other methods on the Path class.
              -     *
              -     * @internal
              -     */
              -    constructor(name: string, type: number | undefined, root: PathBase | undefined, roots: {
              -        [k: string]: PathBase;
              -    }, nocase: boolean, children: ChildrenCache, opts: PathOpts);
              -    /**
              -     * @internal
              -     */
              -    newChild(name: string, type?: number, opts?: PathOpts): PathWin32;
              -    /**
              -     * @internal
              -     */
              -    getRootString(path: string): string;
              -    /**
              -     * @internal
              -     */
              -    getRoot(rootPath: string): PathBase;
              -    /**
              -     * @internal
              -     */
              -    sameRoot(rootPath: string, compare?: string): boolean;
              -}
              -/**
              - * Path class used on all posix systems.
              - *
              - * Uses `'/'` as the path separator.
              - */
              -export declare class PathPosix extends PathBase {
              -    /**
              -     * separator for parsing path strings
              -     */
              -    splitSep: '/';
              -    /**
              -     * separator for generating path strings
              -     */
              -    sep: '/';
              -    /**
              -     * Do not create new Path objects directly.  They should always be accessed
              -     * via the PathScurry class or other methods on the Path class.
              -     *
              -     * @internal
              -     */
              -    constructor(name: string, type: number | undefined, root: PathBase | undefined, roots: {
              -        [k: string]: PathBase;
              -    }, nocase: boolean, children: ChildrenCache, opts: PathOpts);
              -    /**
              -     * @internal
              -     */
              -    getRootString(path: string): string;
              -    /**
              -     * @internal
              -     */
              -    getRoot(_rootPath: string): PathBase;
              -    /**
              -     * @internal
              -     */
              -    newChild(name: string, type?: number, opts?: PathOpts): PathPosix;
              -}
              -/**
              - * Options that may be provided to the PathScurry constructor
              - */
              -export interface PathScurryOpts {
              -    /**
              -     * perform case-insensitive path matching. Default based on platform
              -     * subclass.
              -     */
              -    nocase?: boolean;
              -    /**
              -     * Number of Path entries to keep in the cache of Path child references.
              -     *
              -     * Setting this higher than 65536 will dramatically increase the data
              -     * consumption and construction time overhead of each PathScurry.
              -     *
              -     * Setting this value to 256 or lower will significantly reduce the data
              -     * consumption and construction time overhead, but may also reduce resolve()
              -     * and readdir() performance on large filesystems.
              -     *
              -     * Default `16384`.
              -     */
              -    childrenCacheSize?: number;
              -    /**
              -     * An object that overrides the built-in functions from the fs and
              -     * fs/promises modules.
              -     *
              -     * See {@link FSOption}
              -     */
              -    fs?: FSOption;
              -}
              -/**
              - * The base class for all PathScurry classes, providing the interface for path
              - * resolution and filesystem operations.
              - *
              - * Typically, you should *not* instantiate this class directly, but rather one
              - * of the platform-specific classes, or the exported {@link PathScurry} which
              - * defaults to the current platform.
              - */
              -export declare abstract class PathScurryBase {
              -    #private;
              -    /**
              -     * The root Path entry for the current working directory of this Scurry
              -     */
              -    root: PathBase;
              -    /**
              -     * The string path for the root of this Scurry's current working directory
              -     */
              -    rootPath: string;
              -    /**
              -     * A collection of all roots encountered, referenced by rootPath
              -     */
              -    roots: {
              -        [k: string]: PathBase;
              -    };
              -    /**
              -     * The Path entry corresponding to this PathScurry's current working directory.
              -     */
              -    cwd: PathBase;
              -    /**
              -     * Perform path comparisons case-insensitively.
              -     *
              -     * Defaults true on Darwin and Windows systems, false elsewhere.
              -     */
              -    nocase: boolean;
              -    /**
              -     * The path separator used for parsing paths
              -     *
              -     * `'/'` on Posix systems, either `'/'` or `'\\'` on Windows
              -     */
              -    abstract sep: string | RegExp;
              -    /**
              -     * This class should not be instantiated directly.
              -     *
              -     * Use PathScurryWin32, PathScurryDarwin, PathScurryPosix, or PathScurry
              -     *
              -     * @internal
              -     */
              -    constructor(cwd: string | URL | undefined, pathImpl: typeof win32 | typeof posix, sep: string | RegExp, { nocase, childrenCacheSize, fs, }?: PathScurryOpts);
              -    /**
              -     * Get the depth of a provided path, string, or the cwd
              -     */
              -    depth(path?: Path | string): number;
              -    /**
              -     * Parse the root portion of a path string
              -     *
              -     * @internal
              -     */
              -    abstract parseRootPath(dir: string): string;
              -    /**
              -     * create a new Path to use as root during construction.
              -     *
              -     * @internal
              -     */
              -    abstract newRoot(fs: FSValue): PathBase;
              -    /**
              -     * Determine whether a given path string is absolute
              -     */
              -    abstract isAbsolute(p: string): boolean;
              -    /**
              -     * Return the cache of child entries.  Exposed so subclasses can create
              -     * child Path objects in a platform-specific way.
              -     *
              -     * @internal
              -     */
              -    childrenCache(): ChildrenCache;
              -    /**
              -     * Resolve one or more path strings to a resolved string
              -     *
              -     * Same interface as require('path').resolve.
              -     *
              -     * Much faster than path.resolve() when called multiple times for the same
              -     * path, because the resolved Path objects are cached.  Much slower
              -     * otherwise.
              -     */
              -    resolve(...paths: string[]): string;
              -    /**
              -     * Resolve one or more path strings to a resolved string, returning
              -     * the posix path.  Identical to .resolve() on posix systems, but on
              -     * windows will return a forward-slash separated UNC path.
              -     *
              -     * Same interface as require('path').resolve.
              -     *
              -     * Much faster than path.resolve() when called multiple times for the same
              -     * path, because the resolved Path objects are cached.  Much slower
              -     * otherwise.
              -     */
              -    resolvePosix(...paths: string[]): string;
              -    /**
              -     * find the relative path from the cwd to the supplied path string or entry
              -     */
              -    relative(entry?: PathBase | string): string;
              -    /**
              -     * find the relative path from the cwd to the supplied path string or
              -     * entry, using / as the path delimiter, even on Windows.
              -     */
              -    relativePosix(entry?: PathBase | string): string;
              -    /**
              -     * Return the basename for the provided string or Path object
              -     */
              -    basename(entry?: PathBase | string): string;
              -    /**
              -     * Return the dirname for the provided string or Path object
              -     */
              -    dirname(entry?: PathBase | string): string;
              -    /**
              -     * Return an array of known child entries.
              -     *
              -     * First argument may be either a string, or a Path object.
              -     *
              -     * If the Path cannot or does not contain any children, then an empty array
              -     * is returned.
              -     *
              -     * Results are cached, and thus may be out of date if the filesystem is
              -     * mutated.
              -     *
              -     * Unlike `fs.readdir()`, the `withFileTypes` option defaults to `true`. Set
              -     * `{ withFileTypes: false }` to return strings.
              -     */
              -    readdir(): Promise;
              -    readdir(opts: {
              -        withFileTypes: true;
              -    }): Promise;
              -    readdir(opts: {
              -        withFileTypes: false;
              -    }): Promise;
              -    readdir(opts: {
              -        withFileTypes: boolean;
              -    }): Promise;
              -    readdir(entry: PathBase | string): Promise;
              -    readdir(entry: PathBase | string, opts: {
              -        withFileTypes: true;
              -    }): Promise;
              -    readdir(entry: PathBase | string, opts: {
              -        withFileTypes: false;
              -    }): Promise;
              -    readdir(entry: PathBase | string, opts: {
              -        withFileTypes: boolean;
              -    }): Promise;
              -    /**
              -     * synchronous {@link PathScurryBase.readdir}
              -     */
              -    readdirSync(): PathBase[];
              -    readdirSync(opts: {
              -        withFileTypes: true;
              -    }): PathBase[];
              -    readdirSync(opts: {
              -        withFileTypes: false;
              -    }): string[];
              -    readdirSync(opts: {
              -        withFileTypes: boolean;
              -    }): PathBase[] | string[];
              -    readdirSync(entry: PathBase | string): PathBase[];
              -    readdirSync(entry: PathBase | string, opts: {
              -        withFileTypes: true;
              -    }): PathBase[];
              -    readdirSync(entry: PathBase | string, opts: {
              -        withFileTypes: false;
              -    }): string[];
              -    readdirSync(entry: PathBase | string, opts: {
              -        withFileTypes: boolean;
              -    }): PathBase[] | string[];
              -    /**
              -     * Call lstat() on the string or Path object, and update all known
              -     * information that can be determined.
              -     *
              -     * Note that unlike `fs.lstat()`, the returned value does not contain some
              -     * information, such as `mode`, `dev`, `nlink`, and `ino`.  If that
              -     * information is required, you will need to call `fs.lstat` yourself.
              -     *
              -     * If the Path refers to a nonexistent file, or if the lstat call fails for
              -     * any reason, `undefined` is returned.  Otherwise the updated Path object is
              -     * returned.
              -     *
              -     * Results are cached, and thus may be out of date if the filesystem is
              -     * mutated.
              -     */
              -    lstat(entry?: string | PathBase): Promise;
              -    /**
              -     * synchronous {@link PathScurryBase.lstat}
              -     */
              -    lstatSync(entry?: string | PathBase): PathBase | undefined;
              -    /**
              -     * Return the Path object or string path corresponding to the target of a
              -     * symbolic link.
              -     *
              -     * If the path is not a symbolic link, or if the readlink call fails for any
              -     * reason, `undefined` is returned.
              -     *
              -     * Result is cached, and thus may be outdated if the filesystem is mutated.
              -     *
              -     * `{withFileTypes}` option defaults to `false`.
              -     *
              -     * On success, returns a Path object if `withFileTypes` option is true,
              -     * otherwise a string.
              -     */
              -    readlink(): Promise;
              -    readlink(opt: {
              -        withFileTypes: false;
              -    }): Promise;
              -    readlink(opt: {
              -        withFileTypes: true;
              -    }): Promise;
              -    readlink(opt: {
              -        withFileTypes: boolean;
              -    }): Promise;
              -    readlink(entry: string | PathBase, opt?: {
              -        withFileTypes: false;
              -    }): Promise;
              -    readlink(entry: string | PathBase, opt: {
              -        withFileTypes: true;
              -    }): Promise;
              -    readlink(entry: string | PathBase, opt: {
              -        withFileTypes: boolean;
              -    }): Promise;
              -    /**
              -     * synchronous {@link PathScurryBase.readlink}
              -     */
              -    readlinkSync(): string | undefined;
              -    readlinkSync(opt: {
              -        withFileTypes: false;
              -    }): string | undefined;
              -    readlinkSync(opt: {
              -        withFileTypes: true;
              -    }): PathBase | undefined;
              -    readlinkSync(opt: {
              -        withFileTypes: boolean;
              -    }): PathBase | string | undefined;
              -    readlinkSync(entry: string | PathBase, opt?: {
              -        withFileTypes: false;
              -    }): string | undefined;
              -    readlinkSync(entry: string | PathBase, opt: {
              -        withFileTypes: true;
              -    }): PathBase | undefined;
              -    readlinkSync(entry: string | PathBase, opt: {
              -        withFileTypes: boolean;
              -    }): string | PathBase | undefined;
              -    /**
              -     * Return the Path object or string path corresponding to path as resolved
              -     * by realpath(3).
              -     *
              -     * If the realpath call fails for any reason, `undefined` is returned.
              -     *
              -     * Result is cached, and thus may be outdated if the filesystem is mutated.
              -     *
              -     * `{withFileTypes}` option defaults to `false`.
              -     *
              -     * On success, returns a Path object if `withFileTypes` option is true,
              -     * otherwise a string.
              -     */
              -    realpath(): Promise;
              -    realpath(opt: {
              -        withFileTypes: false;
              -    }): Promise;
              -    realpath(opt: {
              -        withFileTypes: true;
              -    }): Promise;
              -    realpath(opt: {
              -        withFileTypes: boolean;
              -    }): Promise;
              -    realpath(entry: string | PathBase, opt?: {
              -        withFileTypes: false;
              -    }): Promise;
              -    realpath(entry: string | PathBase, opt: {
              -        withFileTypes: true;
              -    }): Promise;
              -    realpath(entry: string | PathBase, opt: {
              -        withFileTypes: boolean;
              -    }): Promise;
              -    realpathSync(): string | undefined;
              -    realpathSync(opt: {
              -        withFileTypes: false;
              -    }): string | undefined;
              -    realpathSync(opt: {
              -        withFileTypes: true;
              -    }): PathBase | undefined;
              -    realpathSync(opt: {
              -        withFileTypes: boolean;
              -    }): PathBase | string | undefined;
              -    realpathSync(entry: string | PathBase, opt?: {
              -        withFileTypes: false;
              -    }): string | undefined;
              -    realpathSync(entry: string | PathBase, opt: {
              -        withFileTypes: true;
              -    }): PathBase | undefined;
              -    realpathSync(entry: string | PathBase, opt: {
              -        withFileTypes: boolean;
              -    }): string | PathBase | undefined;
              -    /**
              -     * Asynchronously walk the directory tree, returning an array of
              -     * all path strings or Path objects found.
              -     *
              -     * Note that this will be extremely memory-hungry on large filesystems.
              -     * In such cases, it may be better to use the stream or async iterator
              -     * walk implementation.
              -     */
              -    walk(): Promise;
              -    walk(opts: WalkOptionsWithFileTypesTrue | WalkOptionsWithFileTypesUnset): Promise;
              -    walk(opts: WalkOptionsWithFileTypesFalse): Promise;
              -    walk(opts: WalkOptions): Promise;
              -    walk(entry: string | PathBase): Promise;
              -    walk(entry: string | PathBase, opts: WalkOptionsWithFileTypesTrue | WalkOptionsWithFileTypesUnset): Promise;
              -    walk(entry: string | PathBase, opts: WalkOptionsWithFileTypesFalse): Promise;
              -    walk(entry: string | PathBase, opts: WalkOptions): Promise;
              -    /**
              -     * Synchronously walk the directory tree, returning an array of
              -     * all path strings or Path objects found.
              -     *
              -     * Note that this will be extremely memory-hungry on large filesystems.
              -     * In such cases, it may be better to use the stream or async iterator
              -     * walk implementation.
              -     */
              -    walkSync(): PathBase[];
              -    walkSync(opts: WalkOptionsWithFileTypesTrue | WalkOptionsWithFileTypesUnset): PathBase[];
              -    walkSync(opts: WalkOptionsWithFileTypesFalse): string[];
              -    walkSync(opts: WalkOptions): string[] | PathBase[];
              -    walkSync(entry: string | PathBase): PathBase[];
              -    walkSync(entry: string | PathBase, opts: WalkOptionsWithFileTypesUnset | WalkOptionsWithFileTypesTrue): PathBase[];
              -    walkSync(entry: string | PathBase, opts: WalkOptionsWithFileTypesFalse): string[];
              -    walkSync(entry: string | PathBase, opts: WalkOptions): PathBase[] | string[];
              -    /**
              -     * Support for `for await`
              -     *
              -     * Alias for {@link PathScurryBase.iterate}
              -     *
              -     * Note: As of Node 19, this is very slow, compared to other methods of
              -     * walking.  Consider using {@link PathScurryBase.stream} if memory overhead
              -     * and backpressure are concerns, or {@link PathScurryBase.walk} if not.
              -     */
              -    [Symbol.asyncIterator](): AsyncGenerator;
              -    /**
              -     * Async generator form of {@link PathScurryBase.walk}
              -     *
              -     * Note: As of Node 19, this is very slow, compared to other methods of
              -     * walking, especially if most/all of the directory tree has been previously
              -     * walked.  Consider using {@link PathScurryBase.stream} if memory overhead
              -     * and backpressure are concerns, or {@link PathScurryBase.walk} if not.
              -     */
              -    iterate(): AsyncGenerator;
              -    iterate(opts: WalkOptionsWithFileTypesTrue | WalkOptionsWithFileTypesUnset): AsyncGenerator;
              -    iterate(opts: WalkOptionsWithFileTypesFalse): AsyncGenerator;
              -    iterate(opts: WalkOptions): AsyncGenerator;
              -    iterate(entry: string | PathBase): AsyncGenerator;
              -    iterate(entry: string | PathBase, opts: WalkOptionsWithFileTypesTrue | WalkOptionsWithFileTypesUnset): AsyncGenerator;
              -    iterate(entry: string | PathBase, opts: WalkOptionsWithFileTypesFalse): AsyncGenerator;
              -    iterate(entry: string | PathBase, opts: WalkOptions): AsyncGenerator;
              -    /**
              -     * Iterating over a PathScurry performs a synchronous walk.
              -     *
              -     * Alias for {@link PathScurryBase.iterateSync}
              -     */
              -    [Symbol.iterator](): Generator;
              -    iterateSync(): Generator;
              -    iterateSync(opts: WalkOptionsWithFileTypesTrue | WalkOptionsWithFileTypesUnset): Generator;
              -    iterateSync(opts: WalkOptionsWithFileTypesFalse): Generator;
              -    iterateSync(opts: WalkOptions): Generator;
              -    iterateSync(entry: string | PathBase): Generator;
              -    iterateSync(entry: string | PathBase, opts: WalkOptionsWithFileTypesTrue | WalkOptionsWithFileTypesUnset): Generator;
              -    iterateSync(entry: string | PathBase, opts: WalkOptionsWithFileTypesFalse): Generator;
              -    iterateSync(entry: string | PathBase, opts: WalkOptions): Generator;
              -    /**
              -     * Stream form of {@link PathScurryBase.walk}
              -     *
              -     * Returns a Minipass stream that emits {@link PathBase} objects by default,
              -     * or strings if `{ withFileTypes: false }` is set in the options.
              -     */
              -    stream(): Minipass;
              -    stream(opts: WalkOptionsWithFileTypesTrue | WalkOptionsWithFileTypesUnset): Minipass;
              -    stream(opts: WalkOptionsWithFileTypesFalse): Minipass;
              -    stream(opts: WalkOptions): Minipass;
              -    stream(entry: string | PathBase): Minipass;
              -    stream(entry: string | PathBase, opts: WalkOptionsWithFileTypesUnset | WalkOptionsWithFileTypesTrue): Minipass;
              -    stream(entry: string | PathBase, opts: WalkOptionsWithFileTypesFalse): Minipass;
              -    stream(entry: string | PathBase, opts: WalkOptions): Minipass | Minipass;
              -    /**
              -     * Synchronous form of {@link PathScurryBase.stream}
              -     *
              -     * Returns a Minipass stream that emits {@link PathBase} objects by default,
              -     * or strings if `{ withFileTypes: false }` is set in the options.
              -     *
              -     * Will complete the walk in a single tick if the stream is consumed fully.
              -     * Otherwise, will pause as needed for stream backpressure.
              -     */
              -    streamSync(): Minipass;
              -    streamSync(opts: WalkOptionsWithFileTypesTrue | WalkOptionsWithFileTypesUnset): Minipass;
              -    streamSync(opts: WalkOptionsWithFileTypesFalse): Minipass;
              -    streamSync(opts: WalkOptions): Minipass;
              -    streamSync(entry: string | PathBase): Minipass;
              -    streamSync(entry: string | PathBase, opts: WalkOptionsWithFileTypesUnset | WalkOptionsWithFileTypesTrue): Minipass;
              -    streamSync(entry: string | PathBase, opts: WalkOptionsWithFileTypesFalse): Minipass;
              -    streamSync(entry: string | PathBase, opts: WalkOptions): Minipass | Minipass;
              -    chdir(path?: string | Path): void;
              -}
              -/**
              - * Options provided to all walk methods.
              - */
              -export interface WalkOptions {
              -    /**
              -     * Return results as {@link PathBase} objects rather than strings.
              -     * When set to false, results are fully resolved paths, as returned by
              -     * {@link PathBase.fullpath}.
              -     * @default true
              -     */
              -    withFileTypes?: boolean;
              -    /**
              -     *  Attempt to read directory entries from symbolic links. Otherwise, only
              -     *  actual directories are traversed. Regardless of this setting, a given
              -     *  target path will only ever be walked once, meaning that a symbolic link
              -     *  to a previously traversed directory will never be followed.
              -     *
              -     *  Setting this imposes a slight performance penalty, because `readlink`
              -     *  must be called on all symbolic links encountered, in order to avoid
              -     *  infinite cycles.
              -     * @default false
              -     */
              -    follow?: boolean;
              -    /**
              -     * Only return entries where the provided function returns true.
              -     *
              -     * This will not prevent directories from being traversed, even if they do
              -     * not pass the filter, though it will prevent directories themselves from
              -     * being included in the result set.  See {@link walkFilter}
              -     *
              -     * Asynchronous functions are not supported here.
              -     *
              -     * By default, if no filter is provided, all entries and traversed
              -     * directories are included.
              -     */
              -    filter?: (entry: PathBase) => boolean;
              -    /**
              -     * Only traverse directories (and in the case of {@link follow} being set to
              -     * true, symbolic links to directories) if the provided function returns
              -     * true.
              -     *
              -     * This will not prevent directories from being included in the result set,
              -     * even if they do not pass the supplied filter function.  See {@link filter}
              -     * to do that.
              -     *
              -     * Asynchronous functions are not supported here.
              -     */
              -    walkFilter?: (entry: PathBase) => boolean;
              -}
              -export type WalkOptionsWithFileTypesUnset = WalkOptions & {
              -    withFileTypes?: undefined;
              -};
              -export type WalkOptionsWithFileTypesTrue = WalkOptions & {
              -    withFileTypes: true;
              -};
              -export type WalkOptionsWithFileTypesFalse = WalkOptions & {
              -    withFileTypes: false;
              -};
              -/**
              - * Windows implementation of {@link PathScurryBase}
              - *
              - * Defaults to case insensitve, uses `'\\'` to generate path strings.  Uses
              - * {@link PathWin32} for Path objects.
              - */
              -export declare class PathScurryWin32 extends PathScurryBase {
              -    /**
              -     * separator for generating path strings
              -     */
              -    sep: '\\';
              -    constructor(cwd?: URL | string, opts?: PathScurryOpts);
              -    /**
              -     * @internal
              -     */
              -    parseRootPath(dir: string): string;
              -    /**
              -     * @internal
              -     */
              -    newRoot(fs: FSValue): PathWin32;
              -    /**
              -     * Return true if the provided path string is an absolute path
              -     */
              -    isAbsolute(p: string): boolean;
              -}
              -/**
              - * {@link PathScurryBase} implementation for all posix systems other than Darwin.
              - *
              - * Defaults to case-sensitive matching, uses `'/'` to generate path strings.
              - *
              - * Uses {@link PathPosix} for Path objects.
              - */
              -export declare class PathScurryPosix extends PathScurryBase {
              -    /**
              -     * separator for generating path strings
              -     */
              -    sep: '/';
              -    constructor(cwd?: URL | string, opts?: PathScurryOpts);
              -    /**
              -     * @internal
              -     */
              -    parseRootPath(_dir: string): string;
              -    /**
              -     * @internal
              -     */
              -    newRoot(fs: FSValue): PathPosix;
              -    /**
              -     * Return true if the provided path string is an absolute path
              -     */
              -    isAbsolute(p: string): boolean;
              -}
              -/**
              - * {@link PathScurryBase} implementation for Darwin (macOS) systems.
              - *
              - * Defaults to case-insensitive matching, uses `'/'` for generating path
              - * strings.
              - *
              - * Uses {@link PathPosix} for Path objects.
              - */
              -export declare class PathScurryDarwin extends PathScurryPosix {
              -    constructor(cwd?: URL | string, opts?: PathScurryOpts);
              -}
              -/**
              - * Default {@link PathBase} implementation for the current platform.
              - *
              - * {@link PathWin32} on Windows systems, {@link PathPosix} on all others.
              - */
              -export declare const Path: typeof PathWin32 | typeof PathPosix;
              -export type Path = PathBase | InstanceType;
              -/**
              - * Default {@link PathScurryBase} implementation for the current platform.
              - *
              - * {@link PathScurryWin32} on Windows systems, {@link PathScurryDarwin} on
              - * Darwin (macOS) systems, {@link PathScurryPosix} on all others.
              - */
              -export declare const PathScurry: typeof PathScurryWin32 | typeof PathScurryDarwin | typeof PathScurryPosix;
              -export type PathScurry = PathScurryBase | InstanceType;
              -export {};
              -//# sourceMappingURL=index.d.ts.map
              \ No newline at end of file
              diff --git a/node_modules/path-scurry/dist/esm/index.d.ts.map b/node_modules/path-scurry/dist/esm/index.d.ts.map
              deleted file mode 100644
              index 1f59f8f4..00000000
              --- a/node_modules/path-scurry/dist/esm/index.d.ts.map
              +++ /dev/null
              @@ -1 +0,0 @@
              -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AACpC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,WAAW,CAAA;AAmBxC,OAAO,EAAE,QAAQ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GAOG;AACH,qBAAa,gBAAiB,SAAQ,eAAe;gBAEjD,GAAG,GAAE,GAAG,GAAG,MAAsB,EACjC,IAAI,GAAE,cAAmB;CAK5B;AAED;;;;GAIG;AACH,eAAO,MAAM,IAAI,qCAAuD,CAAA;AACxE,MAAM,MAAM,IAAI,GAAG,QAAQ,GAAG,YAAY,CAAC,OAAO,IAAI,CAAC,CAAA;AAEvD;;;;;GAKG;AACH,eAAO,MAAM,UAAU,EACnB,OAAO,eAAe,GACtB,OAAO,gBAAgB,GACvB,OAAO,eAGQ,CAAA;AACnB,MAAM,MAAM,UAAU,GAAG,cAAc,GAAG,YAAY,CAAC,OAAO,UAAU,CAAC,CAAA"}
              \ No newline at end of file
              diff --git a/node_modules/path-scurry/dist/esm/index.js b/node_modules/path-scurry/dist/esm/index.js
              deleted file mode 100644
              index 3b11b819..00000000
              --- a/node_modules/path-scurry/dist/esm/index.js
              +++ /dev/null
              @@ -1,1979 +0,0 @@
              -import { LRUCache } from 'lru-cache';
              -import { posix, win32 } from 'node:path';
              -import { fileURLToPath } from 'node:url';
              -import { lstatSync, readdir as readdirCB, readdirSync, readlinkSync, realpathSync as rps, } from 'fs';
              -import * as actualFS from 'node:fs';
              -const realpathSync = rps.native;
              -// TODO: test perf of fs/promises realpath vs realpathCB,
              -// since the promises one uses realpath.native
              -import { lstat, readdir, readlink, realpath } from 'node:fs/promises';
              -import { Minipass } from 'minipass';
              -const defaultFS = {
              -    lstatSync,
              -    readdir: readdirCB,
              -    readdirSync,
              -    readlinkSync,
              -    realpathSync,
              -    promises: {
              -        lstat,
              -        readdir,
              -        readlink,
              -        realpath,
              -    },
              -};
              -// if they just gave us require('fs') then use our default
              -const fsFromOption = (fsOption) => !fsOption || fsOption === defaultFS || fsOption === actualFS ?
              -    defaultFS
              -    : {
              -        ...defaultFS,
              -        ...fsOption,
              -        promises: {
              -            ...defaultFS.promises,
              -            ...(fsOption.promises || {}),
              -        },
              -    };
              -// turn something like //?/c:/ into c:\
              -const uncDriveRegexp = /^\\\\\?\\([a-z]:)\\?$/i;
              -const uncToDrive = (rootPath) => rootPath.replace(/\//g, '\\').replace(uncDriveRegexp, '$1\\');
              -// windows paths are separated by either / or \
              -const eitherSep = /[\\\/]/;
              -const UNKNOWN = 0; // may not even exist, for all we know
              -const IFIFO = 0b0001;
              -const IFCHR = 0b0010;
              -const IFDIR = 0b0100;
              -const IFBLK = 0b0110;
              -const IFREG = 0b1000;
              -const IFLNK = 0b1010;
              -const IFSOCK = 0b1100;
              -const IFMT = 0b1111;
              -// mask to unset low 4 bits
              -const IFMT_UNKNOWN = ~IFMT;
              -// set after successfully calling readdir() and getting entries.
              -const READDIR_CALLED = 0b0000_0001_0000;
              -// set after a successful lstat()
              -const LSTAT_CALLED = 0b0000_0010_0000;
              -// set if an entry (or one of its parents) is definitely not a dir
              -const ENOTDIR = 0b0000_0100_0000;
              -// set if an entry (or one of its parents) does not exist
              -// (can also be set on lstat errors like EACCES or ENAMETOOLONG)
              -const ENOENT = 0b0000_1000_0000;
              -// cannot have child entries -- also verify &IFMT is either IFDIR or IFLNK
              -// set if we fail to readlink
              -const ENOREADLINK = 0b0001_0000_0000;
              -// set if we know realpath() will fail
              -const ENOREALPATH = 0b0010_0000_0000;
              -const ENOCHILD = ENOTDIR | ENOENT | ENOREALPATH;
              -const TYPEMASK = 0b0011_1111_1111;
              -const entToType = (s) => s.isFile() ? IFREG
              -    : s.isDirectory() ? IFDIR
              -        : s.isSymbolicLink() ? IFLNK
              -            : s.isCharacterDevice() ? IFCHR
              -                : s.isBlockDevice() ? IFBLK
              -                    : s.isSocket() ? IFSOCK
              -                        : s.isFIFO() ? IFIFO
              -                            : UNKNOWN;
              -// normalize unicode path names
              -const normalizeCache = new Map();
              -const normalize = (s) => {
              -    const c = normalizeCache.get(s);
              -    if (c)
              -        return c;
              -    const n = s.normalize('NFKD');
              -    normalizeCache.set(s, n);
              -    return n;
              -};
              -const normalizeNocaseCache = new Map();
              -const normalizeNocase = (s) => {
              -    const c = normalizeNocaseCache.get(s);
              -    if (c)
              -        return c;
              -    const n = normalize(s.toLowerCase());
              -    normalizeNocaseCache.set(s, n);
              -    return n;
              -};
              -/**
              - * An LRUCache for storing resolved path strings or Path objects.
              - * @internal
              - */
              -export class ResolveCache extends LRUCache {
              -    constructor() {
              -        super({ max: 256 });
              -    }
              -}
              -// In order to prevent blowing out the js heap by allocating hundreds of
              -// thousands of Path entries when walking extremely large trees, the "children"
              -// in this tree are represented by storing an array of Path entries in an
              -// LRUCache, indexed by the parent.  At any time, Path.children() may return an
              -// empty array, indicating that it doesn't know about any of its children, and
              -// thus has to rebuild that cache.  This is fine, it just means that we don't
              -// benefit as much from having the cached entries, but huge directory walks
              -// don't blow out the stack, and smaller ones are still as fast as possible.
              -//
              -//It does impose some complexity when building up the readdir data, because we
              -//need to pass a reference to the children array that we started with.
              -/**
              - * an LRUCache for storing child entries.
              - * @internal
              - */
              -export class ChildrenCache extends LRUCache {
              -    constructor(maxSize = 16 * 1024) {
              -        super({
              -            maxSize,
              -            // parent + children
              -            sizeCalculation: a => a.length + 1,
              -        });
              -    }
              -}
              -const setAsCwd = Symbol('PathScurry setAsCwd');
              -/**
              - * Path objects are sort of like a super-powered
              - * {@link https://nodejs.org/docs/latest/api/fs.html#class-fsdirent fs.Dirent}
              - *
              - * Each one represents a single filesystem entry on disk, which may or may not
              - * exist. It includes methods for reading various types of information via
              - * lstat, readlink, and readdir, and caches all information to the greatest
              - * degree possible.
              - *
              - * Note that fs operations that would normally throw will instead return an
              - * "empty" value. This is in order to prevent excessive overhead from error
              - * stack traces.
              - */
              -export class PathBase {
              -    /**
              -     * the basename of this path
              -     *
              -     * **Important**: *always* test the path name against any test string
              -     * usingthe {@link isNamed} method, and not by directly comparing this
              -     * string. Otherwise, unicode path strings that the system sees as identical
              -     * will not be properly treated as the same path, leading to incorrect
              -     * behavior and possible security issues.
              -     */
              -    name;
              -    /**
              -     * the Path entry corresponding to the path root.
              -     *
              -     * @internal
              -     */
              -    root;
              -    /**
              -     * All roots found within the current PathScurry family
              -     *
              -     * @internal
              -     */
              -    roots;
              -    /**
              -     * a reference to the parent path, or undefined in the case of root entries
              -     *
              -     * @internal
              -     */
              -    parent;
              -    /**
              -     * boolean indicating whether paths are compared case-insensitively
              -     * @internal
              -     */
              -    nocase;
              -    /**
              -     * boolean indicating that this path is the current working directory
              -     * of the PathScurry collection that contains it.
              -     */
              -    isCWD = false;
              -    // potential default fs override
              -    #fs;
              -    // Stats fields
              -    #dev;
              -    get dev() {
              -        return this.#dev;
              -    }
              -    #mode;
              -    get mode() {
              -        return this.#mode;
              -    }
              -    #nlink;
              -    get nlink() {
              -        return this.#nlink;
              -    }
              -    #uid;
              -    get uid() {
              -        return this.#uid;
              -    }
              -    #gid;
              -    get gid() {
              -        return this.#gid;
              -    }
              -    #rdev;
              -    get rdev() {
              -        return this.#rdev;
              -    }
              -    #blksize;
              -    get blksize() {
              -        return this.#blksize;
              -    }
              -    #ino;
              -    get ino() {
              -        return this.#ino;
              -    }
              -    #size;
              -    get size() {
              -        return this.#size;
              -    }
              -    #blocks;
              -    get blocks() {
              -        return this.#blocks;
              -    }
              -    #atimeMs;
              -    get atimeMs() {
              -        return this.#atimeMs;
              -    }
              -    #mtimeMs;
              -    get mtimeMs() {
              -        return this.#mtimeMs;
              -    }
              -    #ctimeMs;
              -    get ctimeMs() {
              -        return this.#ctimeMs;
              -    }
              -    #birthtimeMs;
              -    get birthtimeMs() {
              -        return this.#birthtimeMs;
              -    }
              -    #atime;
              -    get atime() {
              -        return this.#atime;
              -    }
              -    #mtime;
              -    get mtime() {
              -        return this.#mtime;
              -    }
              -    #ctime;
              -    get ctime() {
              -        return this.#ctime;
              -    }
              -    #birthtime;
              -    get birthtime() {
              -        return this.#birthtime;
              -    }
              -    #matchName;
              -    #depth;
              -    #fullpath;
              -    #fullpathPosix;
              -    #relative;
              -    #relativePosix;
              -    #type;
              -    #children;
              -    #linkTarget;
              -    #realpath;
              -    /**
              -     * This property is for compatibility with the Dirent class as of
              -     * Node v20, where Dirent['parentPath'] refers to the path of the
              -     * directory that was passed to readdir. For root entries, it's the path
              -     * to the entry itself.
              -     */
              -    get parentPath() {
              -        return (this.parent || this).fullpath();
              -    }
              -    /**
              -     * Deprecated alias for Dirent['parentPath'] Somewhat counterintuitively,
              -     * this property refers to the *parent* path, not the path object itself.
              -     */
              -    get path() {
              -        return this.parentPath;
              -    }
              -    /**
              -     * Do not create new Path objects directly.  They should always be accessed
              -     * via the PathScurry class or other methods on the Path class.
              -     *
              -     * @internal
              -     */
              -    constructor(name, type = UNKNOWN, root, roots, nocase, children, opts) {
              -        this.name = name;
              -        this.#matchName = nocase ? normalizeNocase(name) : normalize(name);
              -        this.#type = type & TYPEMASK;
              -        this.nocase = nocase;
              -        this.roots = roots;
              -        this.root = root || this;
              -        this.#children = children;
              -        this.#fullpath = opts.fullpath;
              -        this.#relative = opts.relative;
              -        this.#relativePosix = opts.relativePosix;
              -        this.parent = opts.parent;
              -        if (this.parent) {
              -            this.#fs = this.parent.#fs;
              -        }
              -        else {
              -            this.#fs = fsFromOption(opts.fs);
              -        }
              -    }
              -    /**
              -     * Returns the depth of the Path object from its root.
              -     *
              -     * For example, a path at `/foo/bar` would have a depth of 2.
              -     */
              -    depth() {
              -        if (this.#depth !== undefined)
              -            return this.#depth;
              -        if (!this.parent)
              -            return (this.#depth = 0);
              -        return (this.#depth = this.parent.depth() + 1);
              -    }
              -    /**
              -     * @internal
              -     */
              -    childrenCache() {
              -        return this.#children;
              -    }
              -    /**
              -     * Get the Path object referenced by the string path, resolved from this Path
              -     */
              -    resolve(path) {
              -        if (!path) {
              -            return this;
              -        }
              -        const rootPath = this.getRootString(path);
              -        const dir = path.substring(rootPath.length);
              -        const dirParts = dir.split(this.splitSep);
              -        const result = rootPath ?
              -            this.getRoot(rootPath).#resolveParts(dirParts)
              -            : this.#resolveParts(dirParts);
              -        return result;
              -    }
              -    #resolveParts(dirParts) {
              -        let p = this;
              -        for (const part of dirParts) {
              -            p = p.child(part);
              -        }
              -        return p;
              -    }
              -    /**
              -     * Returns the cached children Path objects, if still available.  If they
              -     * have fallen out of the cache, then returns an empty array, and resets the
              -     * READDIR_CALLED bit, so that future calls to readdir() will require an fs
              -     * lookup.
              -     *
              -     * @internal
              -     */
              -    children() {
              -        const cached = this.#children.get(this);
              -        if (cached) {
              -            return cached;
              -        }
              -        const children = Object.assign([], { provisional: 0 });
              -        this.#children.set(this, children);
              -        this.#type &= ~READDIR_CALLED;
              -        return children;
              -    }
              -    /**
              -     * Resolves a path portion and returns or creates the child Path.
              -     *
              -     * Returns `this` if pathPart is `''` or `'.'`, or `parent` if pathPart is
              -     * `'..'`.
              -     *
              -     * This should not be called directly.  If `pathPart` contains any path
              -     * separators, it will lead to unsafe undefined behavior.
              -     *
              -     * Use `Path.resolve()` instead.
              -     *
              -     * @internal
              -     */
              -    child(pathPart, opts) {
              -        if (pathPart === '' || pathPart === '.') {
              -            return this;
              -        }
              -        if (pathPart === '..') {
              -            return this.parent || this;
              -        }
              -        // find the child
              -        const children = this.children();
              -        const name = this.nocase ? normalizeNocase(pathPart) : normalize(pathPart);
              -        for (const p of children) {
              -            if (p.#matchName === name) {
              -                return p;
              -            }
              -        }
              -        // didn't find it, create provisional child, since it might not
              -        // actually exist.  If we know the parent isn't a dir, then
              -        // in fact it CAN'T exist.
              -        const s = this.parent ? this.sep : '';
              -        const fullpath = this.#fullpath ? this.#fullpath + s + pathPart : undefined;
              -        const pchild = this.newChild(pathPart, UNKNOWN, {
              -            ...opts,
              -            parent: this,
              -            fullpath,
              -        });
              -        if (!this.canReaddir()) {
              -            pchild.#type |= ENOENT;
              -        }
              -        // don't have to update provisional, because if we have real children,
              -        // then provisional is set to children.length, otherwise a lower number
              -        children.push(pchild);
              -        return pchild;
              -    }
              -    /**
              -     * The relative path from the cwd. If it does not share an ancestor with
              -     * the cwd, then this ends up being equivalent to the fullpath()
              -     */
              -    relative() {
              -        if (this.isCWD)
              -            return '';
              -        if (this.#relative !== undefined) {
              -            return this.#relative;
              -        }
              -        const name = this.name;
              -        const p = this.parent;
              -        if (!p) {
              -            return (this.#relative = this.name);
              -        }
              -        const pv = p.relative();
              -        return pv + (!pv || !p.parent ? '' : this.sep) + name;
              -    }
              -    /**
              -     * The relative path from the cwd, using / as the path separator.
              -     * If it does not share an ancestor with
              -     * the cwd, then this ends up being equivalent to the fullpathPosix()
              -     * On posix systems, this is identical to relative().
              -     */
              -    relativePosix() {
              -        if (this.sep === '/')
              -            return this.relative();
              -        if (this.isCWD)
              -            return '';
              -        if (this.#relativePosix !== undefined)
              -            return this.#relativePosix;
              -        const name = this.name;
              -        const p = this.parent;
              -        if (!p) {
              -            return (this.#relativePosix = this.fullpathPosix());
              -        }
              -        const pv = p.relativePosix();
              -        return pv + (!pv || !p.parent ? '' : '/') + name;
              -    }
              -    /**
              -     * The fully resolved path string for this Path entry
              -     */
              -    fullpath() {
              -        if (this.#fullpath !== undefined) {
              -            return this.#fullpath;
              -        }
              -        const name = this.name;
              -        const p = this.parent;
              -        if (!p) {
              -            return (this.#fullpath = this.name);
              -        }
              -        const pv = p.fullpath();
              -        const fp = pv + (!p.parent ? '' : this.sep) + name;
              -        return (this.#fullpath = fp);
              -    }
              -    /**
              -     * On platforms other than windows, this is identical to fullpath.
              -     *
              -     * On windows, this is overridden to return the forward-slash form of the
              -     * full UNC path.
              -     */
              -    fullpathPosix() {
              -        if (this.#fullpathPosix !== undefined)
              -            return this.#fullpathPosix;
              -        if (this.sep === '/')
              -            return (this.#fullpathPosix = this.fullpath());
              -        if (!this.parent) {
              -            const p = this.fullpath().replace(/\\/g, '/');
              -            if (/^[a-z]:\//i.test(p)) {
              -                return (this.#fullpathPosix = `//?/${p}`);
              -            }
              -            else {
              -                return (this.#fullpathPosix = p);
              -            }
              -        }
              -        const p = this.parent;
              -        const pfpp = p.fullpathPosix();
              -        const fpp = pfpp + (!pfpp || !p.parent ? '' : '/') + this.name;
              -        return (this.#fullpathPosix = fpp);
              -    }
              -    /**
              -     * Is the Path of an unknown type?
              -     *
              -     * Note that we might know *something* about it if there has been a previous
              -     * filesystem operation, for example that it does not exist, or is not a
              -     * link, or whether it has child entries.
              -     */
              -    isUnknown() {
              -        return (this.#type & IFMT) === UNKNOWN;
              -    }
              -    isType(type) {
              -        return this[`is${type}`]();
              -    }
              -    getType() {
              -        return (this.isUnknown() ? 'Unknown'
              -            : this.isDirectory() ? 'Directory'
              -                : this.isFile() ? 'File'
              -                    : this.isSymbolicLink() ? 'SymbolicLink'
              -                        : this.isFIFO() ? 'FIFO'
              -                            : this.isCharacterDevice() ? 'CharacterDevice'
              -                                : this.isBlockDevice() ? 'BlockDevice'
              -                                    : /* c8 ignore start */ this.isSocket() ? 'Socket'
              -                                        : 'Unknown');
              -        /* c8 ignore stop */
              -    }
              -    /**
              -     * Is the Path a regular file?
              -     */
              -    isFile() {
              -        return (this.#type & IFMT) === IFREG;
              -    }
              -    /**
              -     * Is the Path a directory?
              -     */
              -    isDirectory() {
              -        return (this.#type & IFMT) === IFDIR;
              -    }
              -    /**
              -     * Is the path a character device?
              -     */
              -    isCharacterDevice() {
              -        return (this.#type & IFMT) === IFCHR;
              -    }
              -    /**
              -     * Is the path a block device?
              -     */
              -    isBlockDevice() {
              -        return (this.#type & IFMT) === IFBLK;
              -    }
              -    /**
              -     * Is the path a FIFO pipe?
              -     */
              -    isFIFO() {
              -        return (this.#type & IFMT) === IFIFO;
              -    }
              -    /**
              -     * Is the path a socket?
              -     */
              -    isSocket() {
              -        return (this.#type & IFMT) === IFSOCK;
              -    }
              -    /**
              -     * Is the path a symbolic link?
              -     */
              -    isSymbolicLink() {
              -        return (this.#type & IFLNK) === IFLNK;
              -    }
              -    /**
              -     * Return the entry if it has been subject of a successful lstat, or
              -     * undefined otherwise.
              -     *
              -     * Does not read the filesystem, so an undefined result *could* simply
              -     * mean that we haven't called lstat on it.
              -     */
              -    lstatCached() {
              -        return this.#type & LSTAT_CALLED ? this : undefined;
              -    }
              -    /**
              -     * Return the cached link target if the entry has been the subject of a
              -     * successful readlink, or undefined otherwise.
              -     *
              -     * Does not read the filesystem, so an undefined result *could* just mean we
              -     * don't have any cached data. Only use it if you are very sure that a
              -     * readlink() has been called at some point.
              -     */
              -    readlinkCached() {
              -        return this.#linkTarget;
              -    }
              -    /**
              -     * Returns the cached realpath target if the entry has been the subject
              -     * of a successful realpath, or undefined otherwise.
              -     *
              -     * Does not read the filesystem, so an undefined result *could* just mean we
              -     * don't have any cached data. Only use it if you are very sure that a
              -     * realpath() has been called at some point.
              -     */
              -    realpathCached() {
              -        return this.#realpath;
              -    }
              -    /**
              -     * Returns the cached child Path entries array if the entry has been the
              -     * subject of a successful readdir(), or [] otherwise.
              -     *
              -     * Does not read the filesystem, so an empty array *could* just mean we
              -     * don't have any cached data. Only use it if you are very sure that a
              -     * readdir() has been called recently enough to still be valid.
              -     */
              -    readdirCached() {
              -        const children = this.children();
              -        return children.slice(0, children.provisional);
              -    }
              -    /**
              -     * Return true if it's worth trying to readlink.  Ie, we don't (yet) have
              -     * any indication that readlink will definitely fail.
              -     *
              -     * Returns false if the path is known to not be a symlink, if a previous
              -     * readlink failed, or if the entry does not exist.
              -     */
              -    canReadlink() {
              -        if (this.#linkTarget)
              -            return true;
              -        if (!this.parent)
              -            return false;
              -        // cases where it cannot possibly succeed
              -        const ifmt = this.#type & IFMT;
              -        return !((ifmt !== UNKNOWN && ifmt !== IFLNK) ||
              -            this.#type & ENOREADLINK ||
              -            this.#type & ENOENT);
              -    }
              -    /**
              -     * Return true if readdir has previously been successfully called on this
              -     * path, indicating that cachedReaddir() is likely valid.
              -     */
              -    calledReaddir() {
              -        return !!(this.#type & READDIR_CALLED);
              -    }
              -    /**
              -     * Returns true if the path is known to not exist. That is, a previous lstat
              -     * or readdir failed to verify its existence when that would have been
              -     * expected, or a parent entry was marked either enoent or enotdir.
              -     */
              -    isENOENT() {
              -        return !!(this.#type & ENOENT);
              -    }
              -    /**
              -     * Return true if the path is a match for the given path name.  This handles
              -     * case sensitivity and unicode normalization.
              -     *
              -     * Note: even on case-sensitive systems, it is **not** safe to test the
              -     * equality of the `.name` property to determine whether a given pathname
              -     * matches, due to unicode normalization mismatches.
              -     *
              -     * Always use this method instead of testing the `path.name` property
              -     * directly.
              -     */
              -    isNamed(n) {
              -        return !this.nocase ?
              -            this.#matchName === normalize(n)
              -            : this.#matchName === normalizeNocase(n);
              -    }
              -    /**
              -     * Return the Path object corresponding to the target of a symbolic link.
              -     *
              -     * If the Path is not a symbolic link, or if the readlink call fails for any
              -     * reason, `undefined` is returned.
              -     *
              -     * Result is cached, and thus may be outdated if the filesystem is mutated.
              -     */
              -    async readlink() {
              -        const target = this.#linkTarget;
              -        if (target) {
              -            return target;
              -        }
              -        if (!this.canReadlink()) {
              -            return undefined;
              -        }
              -        /* c8 ignore start */
              -        // already covered by the canReadlink test, here for ts grumples
              -        if (!this.parent) {
              -            return undefined;
              -        }
              -        /* c8 ignore stop */
              -        try {
              -            const read = await this.#fs.promises.readlink(this.fullpath());
              -            const linkTarget = (await this.parent.realpath())?.resolve(read);
              -            if (linkTarget) {
              -                return (this.#linkTarget = linkTarget);
              -            }
              -        }
              -        catch (er) {
              -            this.#readlinkFail(er.code);
              -            return undefined;
              -        }
              -    }
              -    /**
              -     * Synchronous {@link PathBase.readlink}
              -     */
              -    readlinkSync() {
              -        const target = this.#linkTarget;
              -        if (target) {
              -            return target;
              -        }
              -        if (!this.canReadlink()) {
              -            return undefined;
              -        }
              -        /* c8 ignore start */
              -        // already covered by the canReadlink test, here for ts grumples
              -        if (!this.parent) {
              -            return undefined;
              -        }
              -        /* c8 ignore stop */
              -        try {
              -            const read = this.#fs.readlinkSync(this.fullpath());
              -            const linkTarget = this.parent.realpathSync()?.resolve(read);
              -            if (linkTarget) {
              -                return (this.#linkTarget = linkTarget);
              -            }
              -        }
              -        catch (er) {
              -            this.#readlinkFail(er.code);
              -            return undefined;
              -        }
              -    }
              -    #readdirSuccess(children) {
              -        // succeeded, mark readdir called bit
              -        this.#type |= READDIR_CALLED;
              -        // mark all remaining provisional children as ENOENT
              -        for (let p = children.provisional; p < children.length; p++) {
              -            const c = children[p];
              -            if (c)
              -                c.#markENOENT();
              -        }
              -    }
              -    #markENOENT() {
              -        // mark as UNKNOWN and ENOENT
              -        if (this.#type & ENOENT)
              -            return;
              -        this.#type = (this.#type | ENOENT) & IFMT_UNKNOWN;
              -        this.#markChildrenENOENT();
              -    }
              -    #markChildrenENOENT() {
              -        // all children are provisional and do not exist
              -        const children = this.children();
              -        children.provisional = 0;
              -        for (const p of children) {
              -            p.#markENOENT();
              -        }
              -    }
              -    #markENOREALPATH() {
              -        this.#type |= ENOREALPATH;
              -        this.#markENOTDIR();
              -    }
              -    // save the information when we know the entry is not a dir
              -    #markENOTDIR() {
              -        // entry is not a directory, so any children can't exist.
              -        // this *should* be impossible, since any children created
              -        // after it's been marked ENOTDIR should be marked ENOENT,
              -        // so it won't even get to this point.
              -        /* c8 ignore start */
              -        if (this.#type & ENOTDIR)
              -            return;
              -        /* c8 ignore stop */
              -        let t = this.#type;
              -        // this could happen if we stat a dir, then delete it,
              -        // then try to read it or one of its children.
              -        if ((t & IFMT) === IFDIR)
              -            t &= IFMT_UNKNOWN;
              -        this.#type = t | ENOTDIR;
              -        this.#markChildrenENOENT();
              -    }
              -    #readdirFail(code = '') {
              -        // markENOTDIR and markENOENT also set provisional=0
              -        if (code === 'ENOTDIR' || code === 'EPERM') {
              -            this.#markENOTDIR();
              -        }
              -        else if (code === 'ENOENT') {
              -            this.#markENOENT();
              -        }
              -        else {
              -            this.children().provisional = 0;
              -        }
              -    }
              -    #lstatFail(code = '') {
              -        // Windows just raises ENOENT in this case, disable for win CI
              -        /* c8 ignore start */
              -        if (code === 'ENOTDIR') {
              -            // already know it has a parent by this point
              -            const p = this.parent;
              -            p.#markENOTDIR();
              -        }
              -        else if (code === 'ENOENT') {
              -            /* c8 ignore stop */
              -            this.#markENOENT();
              -        }
              -    }
              -    #readlinkFail(code = '') {
              -        let ter = this.#type;
              -        ter |= ENOREADLINK;
              -        if (code === 'ENOENT')
              -            ter |= ENOENT;
              -        // windows gets a weird error when you try to readlink a file
              -        if (code === 'EINVAL' || code === 'UNKNOWN') {
              -            // exists, but not a symlink, we don't know WHAT it is, so remove
              -            // all IFMT bits.
              -            ter &= IFMT_UNKNOWN;
              -        }
              -        this.#type = ter;
              -        // windows just gets ENOENT in this case.  We do cover the case,
              -        // just disabled because it's impossible on Windows CI
              -        /* c8 ignore start */
              -        if (code === 'ENOTDIR' && this.parent) {
              -            this.parent.#markENOTDIR();
              -        }
              -        /* c8 ignore stop */
              -    }
              -    #readdirAddChild(e, c) {
              -        return (this.#readdirMaybePromoteChild(e, c) ||
              -            this.#readdirAddNewChild(e, c));
              -    }
              -    #readdirAddNewChild(e, c) {
              -        // alloc new entry at head, so it's never provisional
              -        const type = entToType(e);
              -        const child = this.newChild(e.name, type, { parent: this });
              -        const ifmt = child.#type & IFMT;
              -        if (ifmt !== IFDIR && ifmt !== IFLNK && ifmt !== UNKNOWN) {
              -            child.#type |= ENOTDIR;
              -        }
              -        c.unshift(child);
              -        c.provisional++;
              -        return child;
              -    }
              -    #readdirMaybePromoteChild(e, c) {
              -        for (let p = c.provisional; p < c.length; p++) {
              -            const pchild = c[p];
              -            const name = this.nocase ? normalizeNocase(e.name) : normalize(e.name);
              -            if (name !== pchild.#matchName) {
              -                continue;
              -            }
              -            return this.#readdirPromoteChild(e, pchild, p, c);
              -        }
              -    }
              -    #readdirPromoteChild(e, p, index, c) {
              -        const v = p.name;
              -        // retain any other flags, but set ifmt from dirent
              -        p.#type = (p.#type & IFMT_UNKNOWN) | entToType(e);
              -        // case sensitivity fixing when we learn the true name.
              -        if (v !== e.name)
              -            p.name = e.name;
              -        // just advance provisional index (potentially off the list),
              -        // otherwise we have to splice/pop it out and re-insert at head
              -        if (index !== c.provisional) {
              -            if (index === c.length - 1)
              -                c.pop();
              -            else
              -                c.splice(index, 1);
              -            c.unshift(p);
              -        }
              -        c.provisional++;
              -        return p;
              -    }
              -    /**
              -     * Call lstat() on this Path, and update all known information that can be
              -     * determined.
              -     *
              -     * Note that unlike `fs.lstat()`, the returned value does not contain some
              -     * information, such as `mode`, `dev`, `nlink`, and `ino`.  If that
              -     * information is required, you will need to call `fs.lstat` yourself.
              -     *
              -     * If the Path refers to a nonexistent file, or if the lstat call fails for
              -     * any reason, `undefined` is returned.  Otherwise the updated Path object is
              -     * returned.
              -     *
              -     * Results are cached, and thus may be out of date if the filesystem is
              -     * mutated.
              -     */
              -    async lstat() {
              -        if ((this.#type & ENOENT) === 0) {
              -            try {
              -                this.#applyStat(await this.#fs.promises.lstat(this.fullpath()));
              -                return this;
              -            }
              -            catch (er) {
              -                this.#lstatFail(er.code);
              -            }
              -        }
              -    }
              -    /**
              -     * synchronous {@link PathBase.lstat}
              -     */
              -    lstatSync() {
              -        if ((this.#type & ENOENT) === 0) {
              -            try {
              -                this.#applyStat(this.#fs.lstatSync(this.fullpath()));
              -                return this;
              -            }
              -            catch (er) {
              -                this.#lstatFail(er.code);
              -            }
              -        }
              -    }
              -    #applyStat(st) {
              -        const { atime, atimeMs, birthtime, birthtimeMs, blksize, blocks, ctime, ctimeMs, dev, gid, ino, mode, mtime, mtimeMs, nlink, rdev, size, uid, } = st;
              -        this.#atime = atime;
              -        this.#atimeMs = atimeMs;
              -        this.#birthtime = birthtime;
              -        this.#birthtimeMs = birthtimeMs;
              -        this.#blksize = blksize;
              -        this.#blocks = blocks;
              -        this.#ctime = ctime;
              -        this.#ctimeMs = ctimeMs;
              -        this.#dev = dev;
              -        this.#gid = gid;
              -        this.#ino = ino;
              -        this.#mode = mode;
              -        this.#mtime = mtime;
              -        this.#mtimeMs = mtimeMs;
              -        this.#nlink = nlink;
              -        this.#rdev = rdev;
              -        this.#size = size;
              -        this.#uid = uid;
              -        const ifmt = entToType(st);
              -        // retain any other flags, but set the ifmt
              -        this.#type = (this.#type & IFMT_UNKNOWN) | ifmt | LSTAT_CALLED;
              -        if (ifmt !== UNKNOWN && ifmt !== IFDIR && ifmt !== IFLNK) {
              -            this.#type |= ENOTDIR;
              -        }
              -    }
              -    #onReaddirCB = [];
              -    #readdirCBInFlight = false;
              -    #callOnReaddirCB(children) {
              -        this.#readdirCBInFlight = false;
              -        const cbs = this.#onReaddirCB.slice();
              -        this.#onReaddirCB.length = 0;
              -        cbs.forEach(cb => cb(null, children));
              -    }
              -    /**
              -     * Standard node-style callback interface to get list of directory entries.
              -     *
              -     * If the Path cannot or does not contain any children, then an empty array
              -     * is returned.
              -     *
              -     * Results are cached, and thus may be out of date if the filesystem is
              -     * mutated.
              -     *
              -     * @param cb The callback called with (er, entries).  Note that the `er`
              -     * param is somewhat extraneous, as all readdir() errors are handled and
              -     * simply result in an empty set of entries being returned.
              -     * @param allowZalgo Boolean indicating that immediately known results should
              -     * *not* be deferred with `queueMicrotask`. Defaults to `false`. Release
              -     * zalgo at your peril, the dark pony lord is devious and unforgiving.
              -     */
              -    readdirCB(cb, allowZalgo = false) {
              -        if (!this.canReaddir()) {
              -            if (allowZalgo)
              -                cb(null, []);
              -            else
              -                queueMicrotask(() => cb(null, []));
              -            return;
              -        }
              -        const children = this.children();
              -        if (this.calledReaddir()) {
              -            const c = children.slice(0, children.provisional);
              -            if (allowZalgo)
              -                cb(null, c);
              -            else
              -                queueMicrotask(() => cb(null, c));
              -            return;
              -        }
              -        // don't have to worry about zalgo at this point.
              -        this.#onReaddirCB.push(cb);
              -        if (this.#readdirCBInFlight) {
              -            return;
              -        }
              -        this.#readdirCBInFlight = true;
              -        // else read the directory, fill up children
              -        // de-provisionalize any provisional children.
              -        const fullpath = this.fullpath();
              -        this.#fs.readdir(fullpath, { withFileTypes: true }, (er, entries) => {
              -            if (er) {
              -                this.#readdirFail(er.code);
              -                children.provisional = 0;
              -            }
              -            else {
              -                // if we didn't get an error, we always get entries.
              -                //@ts-ignore
              -                for (const e of entries) {
              -                    this.#readdirAddChild(e, children);
              -                }
              -                this.#readdirSuccess(children);
              -            }
              -            this.#callOnReaddirCB(children.slice(0, children.provisional));
              -            return;
              -        });
              -    }
              -    #asyncReaddirInFlight;
              -    /**
              -     * Return an array of known child entries.
              -     *
              -     * If the Path cannot or does not contain any children, then an empty array
              -     * is returned.
              -     *
              -     * Results are cached, and thus may be out of date if the filesystem is
              -     * mutated.
              -     */
              -    async readdir() {
              -        if (!this.canReaddir()) {
              -            return [];
              -        }
              -        const children = this.children();
              -        if (this.calledReaddir()) {
              -            return children.slice(0, children.provisional);
              -        }
              -        // else read the directory, fill up children
              -        // de-provisionalize any provisional children.
              -        const fullpath = this.fullpath();
              -        if (this.#asyncReaddirInFlight) {
              -            await this.#asyncReaddirInFlight;
              -        }
              -        else {
              -            /* c8 ignore start */
              -            let resolve = () => { };
              -            /* c8 ignore stop */
              -            this.#asyncReaddirInFlight = new Promise(res => (resolve = res));
              -            try {
              -                for (const e of await this.#fs.promises.readdir(fullpath, {
              -                    withFileTypes: true,
              -                })) {
              -                    this.#readdirAddChild(e, children);
              -                }
              -                this.#readdirSuccess(children);
              -            }
              -            catch (er) {
              -                this.#readdirFail(er.code);
              -                children.provisional = 0;
              -            }
              -            this.#asyncReaddirInFlight = undefined;
              -            resolve();
              -        }
              -        return children.slice(0, children.provisional);
              -    }
              -    /**
              -     * synchronous {@link PathBase.readdir}
              -     */
              -    readdirSync() {
              -        if (!this.canReaddir()) {
              -            return [];
              -        }
              -        const children = this.children();
              -        if (this.calledReaddir()) {
              -            return children.slice(0, children.provisional);
              -        }
              -        // else read the directory, fill up children
              -        // de-provisionalize any provisional children.
              -        const fullpath = this.fullpath();
              -        try {
              -            for (const e of this.#fs.readdirSync(fullpath, {
              -                withFileTypes: true,
              -            })) {
              -                this.#readdirAddChild(e, children);
              -            }
              -            this.#readdirSuccess(children);
              -        }
              -        catch (er) {
              -            this.#readdirFail(er.code);
              -            children.provisional = 0;
              -        }
              -        return children.slice(0, children.provisional);
              -    }
              -    canReaddir() {
              -        if (this.#type & ENOCHILD)
              -            return false;
              -        const ifmt = IFMT & this.#type;
              -        // we always set ENOTDIR when setting IFMT, so should be impossible
              -        /* c8 ignore start */
              -        if (!(ifmt === UNKNOWN || ifmt === IFDIR || ifmt === IFLNK)) {
              -            return false;
              -        }
              -        /* c8 ignore stop */
              -        return true;
              -    }
              -    shouldWalk(dirs, walkFilter) {
              -        return ((this.#type & IFDIR) === IFDIR &&
              -            !(this.#type & ENOCHILD) &&
              -            !dirs.has(this) &&
              -            (!walkFilter || walkFilter(this)));
              -    }
              -    /**
              -     * Return the Path object corresponding to path as resolved
              -     * by realpath(3).
              -     *
              -     * If the realpath call fails for any reason, `undefined` is returned.
              -     *
              -     * Result is cached, and thus may be outdated if the filesystem is mutated.
              -     * On success, returns a Path object.
              -     */
              -    async realpath() {
              -        if (this.#realpath)
              -            return this.#realpath;
              -        if ((ENOREALPATH | ENOREADLINK | ENOENT) & this.#type)
              -            return undefined;
              -        try {
              -            const rp = await this.#fs.promises.realpath(this.fullpath());
              -            return (this.#realpath = this.resolve(rp));
              -        }
              -        catch (_) {
              -            this.#markENOREALPATH();
              -        }
              -    }
              -    /**
              -     * Synchronous {@link realpath}
              -     */
              -    realpathSync() {
              -        if (this.#realpath)
              -            return this.#realpath;
              -        if ((ENOREALPATH | ENOREADLINK | ENOENT) & this.#type)
              -            return undefined;
              -        try {
              -            const rp = this.#fs.realpathSync(this.fullpath());
              -            return (this.#realpath = this.resolve(rp));
              -        }
              -        catch (_) {
              -            this.#markENOREALPATH();
              -        }
              -    }
              -    /**
              -     * Internal method to mark this Path object as the scurry cwd,
              -     * called by {@link PathScurry#chdir}
              -     *
              -     * @internal
              -     */
              -    [setAsCwd](oldCwd) {
              -        if (oldCwd === this)
              -            return;
              -        oldCwd.isCWD = false;
              -        this.isCWD = true;
              -        const changed = new Set([]);
              -        let rp = [];
              -        let p = this;
              -        while (p && p.parent) {
              -            changed.add(p);
              -            p.#relative = rp.join(this.sep);
              -            p.#relativePosix = rp.join('/');
              -            p = p.parent;
              -            rp.push('..');
              -        }
              -        // now un-memoize parents of old cwd
              -        p = oldCwd;
              -        while (p && p.parent && !changed.has(p)) {
              -            p.#relative = undefined;
              -            p.#relativePosix = undefined;
              -            p = p.parent;
              -        }
              -    }
              -}
              -/**
              - * Path class used on win32 systems
              - *
              - * Uses `'\\'` as the path separator for returned paths, either `'\\'` or `'/'`
              - * as the path separator for parsing paths.
              - */
              -export class PathWin32 extends PathBase {
              -    /**
              -     * Separator for generating path strings.
              -     */
              -    sep = '\\';
              -    /**
              -     * Separator for parsing path strings.
              -     */
              -    splitSep = eitherSep;
              -    /**
              -     * Do not create new Path objects directly.  They should always be accessed
              -     * via the PathScurry class or other methods on the Path class.
              -     *
              -     * @internal
              -     */
              -    constructor(name, type = UNKNOWN, root, roots, nocase, children, opts) {
              -        super(name, type, root, roots, nocase, children, opts);
              -    }
              -    /**
              -     * @internal
              -     */
              -    newChild(name, type = UNKNOWN, opts = {}) {
              -        return new PathWin32(name, type, this.root, this.roots, this.nocase, this.childrenCache(), opts);
              -    }
              -    /**
              -     * @internal
              -     */
              -    getRootString(path) {
              -        return win32.parse(path).root;
              -    }
              -    /**
              -     * @internal
              -     */
              -    getRoot(rootPath) {
              -        rootPath = uncToDrive(rootPath.toUpperCase());
              -        if (rootPath === this.root.name) {
              -            return this.root;
              -        }
              -        // ok, not that one, check if it matches another we know about
              -        for (const [compare, root] of Object.entries(this.roots)) {
              -            if (this.sameRoot(rootPath, compare)) {
              -                return (this.roots[rootPath] = root);
              -            }
              -        }
              -        // otherwise, have to create a new one.
              -        return (this.roots[rootPath] = new PathScurryWin32(rootPath, this).root);
              -    }
              -    /**
              -     * @internal
              -     */
              -    sameRoot(rootPath, compare = this.root.name) {
              -        // windows can (rarely) have case-sensitive filesystem, but
              -        // UNC and drive letters are always case-insensitive, and canonically
              -        // represented uppercase.
              -        rootPath = rootPath
              -            .toUpperCase()
              -            .replace(/\//g, '\\')
              -            .replace(uncDriveRegexp, '$1\\');
              -        return rootPath === compare;
              -    }
              -}
              -/**
              - * Path class used on all posix systems.
              - *
              - * Uses `'/'` as the path separator.
              - */
              -export class PathPosix extends PathBase {
              -    /**
              -     * separator for parsing path strings
              -     */
              -    splitSep = '/';
              -    /**
              -     * separator for generating path strings
              -     */
              -    sep = '/';
              -    /**
              -     * Do not create new Path objects directly.  They should always be accessed
              -     * via the PathScurry class or other methods on the Path class.
              -     *
              -     * @internal
              -     */
              -    constructor(name, type = UNKNOWN, root, roots, nocase, children, opts) {
              -        super(name, type, root, roots, nocase, children, opts);
              -    }
              -    /**
              -     * @internal
              -     */
              -    getRootString(path) {
              -        return path.startsWith('/') ? '/' : '';
              -    }
              -    /**
              -     * @internal
              -     */
              -    getRoot(_rootPath) {
              -        return this.root;
              -    }
              -    /**
              -     * @internal
              -     */
              -    newChild(name, type = UNKNOWN, opts = {}) {
              -        return new PathPosix(name, type, this.root, this.roots, this.nocase, this.childrenCache(), opts);
              -    }
              -}
              -/**
              - * The base class for all PathScurry classes, providing the interface for path
              - * resolution and filesystem operations.
              - *
              - * Typically, you should *not* instantiate this class directly, but rather one
              - * of the platform-specific classes, or the exported {@link PathScurry} which
              - * defaults to the current platform.
              - */
              -export class PathScurryBase {
              -    /**
              -     * The root Path entry for the current working directory of this Scurry
              -     */
              -    root;
              -    /**
              -     * The string path for the root of this Scurry's current working directory
              -     */
              -    rootPath;
              -    /**
              -     * A collection of all roots encountered, referenced by rootPath
              -     */
              -    roots;
              -    /**
              -     * The Path entry corresponding to this PathScurry's current working directory.
              -     */
              -    cwd;
              -    #resolveCache;
              -    #resolvePosixCache;
              -    #children;
              -    /**
              -     * Perform path comparisons case-insensitively.
              -     *
              -     * Defaults true on Darwin and Windows systems, false elsewhere.
              -     */
              -    nocase;
              -    #fs;
              -    /**
              -     * This class should not be instantiated directly.
              -     *
              -     * Use PathScurryWin32, PathScurryDarwin, PathScurryPosix, or PathScurry
              -     *
              -     * @internal
              -     */
              -    constructor(cwd = process.cwd(), pathImpl, sep, { nocase, childrenCacheSize = 16 * 1024, fs = defaultFS, } = {}) {
              -        this.#fs = fsFromOption(fs);
              -        if (cwd instanceof URL || cwd.startsWith('file://')) {
              -            cwd = fileURLToPath(cwd);
              -        }
              -        // resolve and split root, and then add to the store.
              -        // this is the only time we call path.resolve()
              -        const cwdPath = pathImpl.resolve(cwd);
              -        this.roots = Object.create(null);
              -        this.rootPath = this.parseRootPath(cwdPath);
              -        this.#resolveCache = new ResolveCache();
              -        this.#resolvePosixCache = new ResolveCache();
              -        this.#children = new ChildrenCache(childrenCacheSize);
              -        const split = cwdPath.substring(this.rootPath.length).split(sep);
              -        // resolve('/') leaves '', splits to [''], we don't want that.
              -        if (split.length === 1 && !split[0]) {
              -            split.pop();
              -        }
              -        /* c8 ignore start */
              -        if (nocase === undefined) {
              -            throw new TypeError('must provide nocase setting to PathScurryBase ctor');
              -        }
              -        /* c8 ignore stop */
              -        this.nocase = nocase;
              -        this.root = this.newRoot(this.#fs);
              -        this.roots[this.rootPath] = this.root;
              -        let prev = this.root;
              -        let len = split.length - 1;
              -        const joinSep = pathImpl.sep;
              -        let abs = this.rootPath;
              -        let sawFirst = false;
              -        for (const part of split) {
              -            const l = len--;
              -            prev = prev.child(part, {
              -                relative: new Array(l).fill('..').join(joinSep),
              -                relativePosix: new Array(l).fill('..').join('/'),
              -                fullpath: (abs += (sawFirst ? '' : joinSep) + part),
              -            });
              -            sawFirst = true;
              -        }
              -        this.cwd = prev;
              -    }
              -    /**
              -     * Get the depth of a provided path, string, or the cwd
              -     */
              -    depth(path = this.cwd) {
              -        if (typeof path === 'string') {
              -            path = this.cwd.resolve(path);
              -        }
              -        return path.depth();
              -    }
              -    /**
              -     * Return the cache of child entries.  Exposed so subclasses can create
              -     * child Path objects in a platform-specific way.
              -     *
              -     * @internal
              -     */
              -    childrenCache() {
              -        return this.#children;
              -    }
              -    /**
              -     * Resolve one or more path strings to a resolved string
              -     *
              -     * Same interface as require('path').resolve.
              -     *
              -     * Much faster than path.resolve() when called multiple times for the same
              -     * path, because the resolved Path objects are cached.  Much slower
              -     * otherwise.
              -     */
              -    resolve(...paths) {
              -        // first figure out the minimum number of paths we have to test
              -        // we always start at cwd, but any absolutes will bump the start
              -        let r = '';
              -        for (let i = paths.length - 1; i >= 0; i--) {
              -            const p = paths[i];
              -            if (!p || p === '.')
              -                continue;
              -            r = r ? `${p}/${r}` : p;
              -            if (this.isAbsolute(p)) {
              -                break;
              -            }
              -        }
              -        const cached = this.#resolveCache.get(r);
              -        if (cached !== undefined) {
              -            return cached;
              -        }
              -        const result = this.cwd.resolve(r).fullpath();
              -        this.#resolveCache.set(r, result);
              -        return result;
              -    }
              -    /**
              -     * Resolve one or more path strings to a resolved string, returning
              -     * the posix path.  Identical to .resolve() on posix systems, but on
              -     * windows will return a forward-slash separated UNC path.
              -     *
              -     * Same interface as require('path').resolve.
              -     *
              -     * Much faster than path.resolve() when called multiple times for the same
              -     * path, because the resolved Path objects are cached.  Much slower
              -     * otherwise.
              -     */
              -    resolvePosix(...paths) {
              -        // first figure out the minimum number of paths we have to test
              -        // we always start at cwd, but any absolutes will bump the start
              -        let r = '';
              -        for (let i = paths.length - 1; i >= 0; i--) {
              -            const p = paths[i];
              -            if (!p || p === '.')
              -                continue;
              -            r = r ? `${p}/${r}` : p;
              -            if (this.isAbsolute(p)) {
              -                break;
              -            }
              -        }
              -        const cached = this.#resolvePosixCache.get(r);
              -        if (cached !== undefined) {
              -            return cached;
              -        }
              -        const result = this.cwd.resolve(r).fullpathPosix();
              -        this.#resolvePosixCache.set(r, result);
              -        return result;
              -    }
              -    /**
              -     * find the relative path from the cwd to the supplied path string or entry
              -     */
              -    relative(entry = this.cwd) {
              -        if (typeof entry === 'string') {
              -            entry = this.cwd.resolve(entry);
              -        }
              -        return entry.relative();
              -    }
              -    /**
              -     * find the relative path from the cwd to the supplied path string or
              -     * entry, using / as the path delimiter, even on Windows.
              -     */
              -    relativePosix(entry = this.cwd) {
              -        if (typeof entry === 'string') {
              -            entry = this.cwd.resolve(entry);
              -        }
              -        return entry.relativePosix();
              -    }
              -    /**
              -     * Return the basename for the provided string or Path object
              -     */
              -    basename(entry = this.cwd) {
              -        if (typeof entry === 'string') {
              -            entry = this.cwd.resolve(entry);
              -        }
              -        return entry.name;
              -    }
              -    /**
              -     * Return the dirname for the provided string or Path object
              -     */
              -    dirname(entry = this.cwd) {
              -        if (typeof entry === 'string') {
              -            entry = this.cwd.resolve(entry);
              -        }
              -        return (entry.parent || entry).fullpath();
              -    }
              -    async readdir(entry = this.cwd, opts = {
              -        withFileTypes: true,
              -    }) {
              -        if (typeof entry === 'string') {
              -            entry = this.cwd.resolve(entry);
              -        }
              -        else if (!(entry instanceof PathBase)) {
              -            opts = entry;
              -            entry = this.cwd;
              -        }
              -        const { withFileTypes } = opts;
              -        if (!entry.canReaddir()) {
              -            return [];
              -        }
              -        else {
              -            const p = await entry.readdir();
              -            return withFileTypes ? p : p.map(e => e.name);
              -        }
              -    }
              -    readdirSync(entry = this.cwd, opts = {
              -        withFileTypes: true,
              -    }) {
              -        if (typeof entry === 'string') {
              -            entry = this.cwd.resolve(entry);
              -        }
              -        else if (!(entry instanceof PathBase)) {
              -            opts = entry;
              -            entry = this.cwd;
              -        }
              -        const { withFileTypes = true } = opts;
              -        if (!entry.canReaddir()) {
              -            return [];
              -        }
              -        else if (withFileTypes) {
              -            return entry.readdirSync();
              -        }
              -        else {
              -            return entry.readdirSync().map(e => e.name);
              -        }
              -    }
              -    /**
              -     * Call lstat() on the string or Path object, and update all known
              -     * information that can be determined.
              -     *
              -     * Note that unlike `fs.lstat()`, the returned value does not contain some
              -     * information, such as `mode`, `dev`, `nlink`, and `ino`.  If that
              -     * information is required, you will need to call `fs.lstat` yourself.
              -     *
              -     * If the Path refers to a nonexistent file, or if the lstat call fails for
              -     * any reason, `undefined` is returned.  Otherwise the updated Path object is
              -     * returned.
              -     *
              -     * Results are cached, and thus may be out of date if the filesystem is
              -     * mutated.
              -     */
              -    async lstat(entry = this.cwd) {
              -        if (typeof entry === 'string') {
              -            entry = this.cwd.resolve(entry);
              -        }
              -        return entry.lstat();
              -    }
              -    /**
              -     * synchronous {@link PathScurryBase.lstat}
              -     */
              -    lstatSync(entry = this.cwd) {
              -        if (typeof entry === 'string') {
              -            entry = this.cwd.resolve(entry);
              -        }
              -        return entry.lstatSync();
              -    }
              -    async readlink(entry = this.cwd, { withFileTypes } = {
              -        withFileTypes: false,
              -    }) {
              -        if (typeof entry === 'string') {
              -            entry = this.cwd.resolve(entry);
              -        }
              -        else if (!(entry instanceof PathBase)) {
              -            withFileTypes = entry.withFileTypes;
              -            entry = this.cwd;
              -        }
              -        const e = await entry.readlink();
              -        return withFileTypes ? e : e?.fullpath();
              -    }
              -    readlinkSync(entry = this.cwd, { withFileTypes } = {
              -        withFileTypes: false,
              -    }) {
              -        if (typeof entry === 'string') {
              -            entry = this.cwd.resolve(entry);
              -        }
              -        else if (!(entry instanceof PathBase)) {
              -            withFileTypes = entry.withFileTypes;
              -            entry = this.cwd;
              -        }
              -        const e = entry.readlinkSync();
              -        return withFileTypes ? e : e?.fullpath();
              -    }
              -    async realpath(entry = this.cwd, { withFileTypes } = {
              -        withFileTypes: false,
              -    }) {
              -        if (typeof entry === 'string') {
              -            entry = this.cwd.resolve(entry);
              -        }
              -        else if (!(entry instanceof PathBase)) {
              -            withFileTypes = entry.withFileTypes;
              -            entry = this.cwd;
              -        }
              -        const e = await entry.realpath();
              -        return withFileTypes ? e : e?.fullpath();
              -    }
              -    realpathSync(entry = this.cwd, { withFileTypes } = {
              -        withFileTypes: false,
              -    }) {
              -        if (typeof entry === 'string') {
              -            entry = this.cwd.resolve(entry);
              -        }
              -        else if (!(entry instanceof PathBase)) {
              -            withFileTypes = entry.withFileTypes;
              -            entry = this.cwd;
              -        }
              -        const e = entry.realpathSync();
              -        return withFileTypes ? e : e?.fullpath();
              -    }
              -    async walk(entry = this.cwd, opts = {}) {
              -        if (typeof entry === 'string') {
              -            entry = this.cwd.resolve(entry);
              -        }
              -        else if (!(entry instanceof PathBase)) {
              -            opts = entry;
              -            entry = this.cwd;
              -        }
              -        const { withFileTypes = true, follow = false, filter, walkFilter, } = opts;
              -        const results = [];
              -        if (!filter || filter(entry)) {
              -            results.push(withFileTypes ? entry : entry.fullpath());
              -        }
              -        const dirs = new Set();
              -        const walk = (dir, cb) => {
              -            dirs.add(dir);
              -            dir.readdirCB((er, entries) => {
              -                /* c8 ignore start */
              -                if (er) {
              -                    return cb(er);
              -                }
              -                /* c8 ignore stop */
              -                let len = entries.length;
              -                if (!len)
              -                    return cb();
              -                const next = () => {
              -                    if (--len === 0) {
              -                        cb();
              -                    }
              -                };
              -                for (const e of entries) {
              -                    if (!filter || filter(e)) {
              -                        results.push(withFileTypes ? e : e.fullpath());
              -                    }
              -                    if (follow && e.isSymbolicLink()) {
              -                        e.realpath()
              -                            .then(r => (r?.isUnknown() ? r.lstat() : r))
              -                            .then(r => r?.shouldWalk(dirs, walkFilter) ? walk(r, next) : next());
              -                    }
              -                    else {
              -                        if (e.shouldWalk(dirs, walkFilter)) {
              -                            walk(e, next);
              -                        }
              -                        else {
              -                            next();
              -                        }
              -                    }
              -                }
              -            }, true); // zalgooooooo
              -        };
              -        const start = entry;
              -        return new Promise((res, rej) => {
              -            walk(start, er => {
              -                /* c8 ignore start */
              -                if (er)
              -                    return rej(er);
              -                /* c8 ignore stop */
              -                res(results);
              -            });
              -        });
              -    }
              -    walkSync(entry = this.cwd, opts = {}) {
              -        if (typeof entry === 'string') {
              -            entry = this.cwd.resolve(entry);
              -        }
              -        else if (!(entry instanceof PathBase)) {
              -            opts = entry;
              -            entry = this.cwd;
              -        }
              -        const { withFileTypes = true, follow = false, filter, walkFilter, } = opts;
              -        const results = [];
              -        if (!filter || filter(entry)) {
              -            results.push(withFileTypes ? entry : entry.fullpath());
              -        }
              -        const dirs = new Set([entry]);
              -        for (const dir of dirs) {
              -            const entries = dir.readdirSync();
              -            for (const e of entries) {
              -                if (!filter || filter(e)) {
              -                    results.push(withFileTypes ? e : e.fullpath());
              -                }
              -                let r = e;
              -                if (e.isSymbolicLink()) {
              -                    if (!(follow && (r = e.realpathSync())))
              -                        continue;
              -                    if (r.isUnknown())
              -                        r.lstatSync();
              -                }
              -                if (r.shouldWalk(dirs, walkFilter)) {
              -                    dirs.add(r);
              -                }
              -            }
              -        }
              -        return results;
              -    }
              -    /**
              -     * Support for `for await`
              -     *
              -     * Alias for {@link PathScurryBase.iterate}
              -     *
              -     * Note: As of Node 19, this is very slow, compared to other methods of
              -     * walking.  Consider using {@link PathScurryBase.stream} if memory overhead
              -     * and backpressure are concerns, or {@link PathScurryBase.walk} if not.
              -     */
              -    [Symbol.asyncIterator]() {
              -        return this.iterate();
              -    }
              -    iterate(entry = this.cwd, options = {}) {
              -        // iterating async over the stream is significantly more performant,
              -        // especially in the warm-cache scenario, because it buffers up directory
              -        // entries in the background instead of waiting for a yield for each one.
              -        if (typeof entry === 'string') {
              -            entry = this.cwd.resolve(entry);
              -        }
              -        else if (!(entry instanceof PathBase)) {
              -            options = entry;
              -            entry = this.cwd;
              -        }
              -        return this.stream(entry, options)[Symbol.asyncIterator]();
              -    }
              -    /**
              -     * Iterating over a PathScurry performs a synchronous walk.
              -     *
              -     * Alias for {@link PathScurryBase.iterateSync}
              -     */
              -    [Symbol.iterator]() {
              -        return this.iterateSync();
              -    }
              -    *iterateSync(entry = this.cwd, opts = {}) {
              -        if (typeof entry === 'string') {
              -            entry = this.cwd.resolve(entry);
              -        }
              -        else if (!(entry instanceof PathBase)) {
              -            opts = entry;
              -            entry = this.cwd;
              -        }
              -        const { withFileTypes = true, follow = false, filter, walkFilter, } = opts;
              -        if (!filter || filter(entry)) {
              -            yield withFileTypes ? entry : entry.fullpath();
              -        }
              -        const dirs = new Set([entry]);
              -        for (const dir of dirs) {
              -            const entries = dir.readdirSync();
              -            for (const e of entries) {
              -                if (!filter || filter(e)) {
              -                    yield withFileTypes ? e : e.fullpath();
              -                }
              -                let r = e;
              -                if (e.isSymbolicLink()) {
              -                    if (!(follow && (r = e.realpathSync())))
              -                        continue;
              -                    if (r.isUnknown())
              -                        r.lstatSync();
              -                }
              -                if (r.shouldWalk(dirs, walkFilter)) {
              -                    dirs.add(r);
              -                }
              -            }
              -        }
              -    }
              -    stream(entry = this.cwd, opts = {}) {
              -        if (typeof entry === 'string') {
              -            entry = this.cwd.resolve(entry);
              -        }
              -        else if (!(entry instanceof PathBase)) {
              -            opts = entry;
              -            entry = this.cwd;
              -        }
              -        const { withFileTypes = true, follow = false, filter, walkFilter, } = opts;
              -        const results = new Minipass({ objectMode: true });
              -        if (!filter || filter(entry)) {
              -            results.write(withFileTypes ? entry : entry.fullpath());
              -        }
              -        const dirs = new Set();
              -        const queue = [entry];
              -        let processing = 0;
              -        const process = () => {
              -            let paused = false;
              -            while (!paused) {
              -                const dir = queue.shift();
              -                if (!dir) {
              -                    if (processing === 0)
              -                        results.end();
              -                    return;
              -                }
              -                processing++;
              -                dirs.add(dir);
              -                const onReaddir = (er, entries, didRealpaths = false) => {
              -                    /* c8 ignore start */
              -                    if (er)
              -                        return results.emit('error', er);
              -                    /* c8 ignore stop */
              -                    if (follow && !didRealpaths) {
              -                        const promises = [];
              -                        for (const e of entries) {
              -                            if (e.isSymbolicLink()) {
              -                                promises.push(e
              -                                    .realpath()
              -                                    .then((r) => r?.isUnknown() ? r.lstat() : r));
              -                            }
              -                        }
              -                        if (promises.length) {
              -                            Promise.all(promises).then(() => onReaddir(null, entries, true));
              -                            return;
              -                        }
              -                    }
              -                    for (const e of entries) {
              -                        if (e && (!filter || filter(e))) {
              -                            if (!results.write(withFileTypes ? e : e.fullpath())) {
              -                                paused = true;
              -                            }
              -                        }
              -                    }
              -                    processing--;
              -                    for (const e of entries) {
              -                        const r = e.realpathCached() || e;
              -                        if (r.shouldWalk(dirs, walkFilter)) {
              -                            queue.push(r);
              -                        }
              -                    }
              -                    if (paused && !results.flowing) {
              -                        results.once('drain', process);
              -                    }
              -                    else if (!sync) {
              -                        process();
              -                    }
              -                };
              -                // zalgo containment
              -                let sync = true;
              -                dir.readdirCB(onReaddir, true);
              -                sync = false;
              -            }
              -        };
              -        process();
              -        return results;
              -    }
              -    streamSync(entry = this.cwd, opts = {}) {
              -        if (typeof entry === 'string') {
              -            entry = this.cwd.resolve(entry);
              -        }
              -        else if (!(entry instanceof PathBase)) {
              -            opts = entry;
              -            entry = this.cwd;
              -        }
              -        const { withFileTypes = true, follow = false, filter, walkFilter, } = opts;
              -        const results = new Minipass({ objectMode: true });
              -        const dirs = new Set();
              -        if (!filter || filter(entry)) {
              -            results.write(withFileTypes ? entry : entry.fullpath());
              -        }
              -        const queue = [entry];
              -        let processing = 0;
              -        const process = () => {
              -            let paused = false;
              -            while (!paused) {
              -                const dir = queue.shift();
              -                if (!dir) {
              -                    if (processing === 0)
              -                        results.end();
              -                    return;
              -                }
              -                processing++;
              -                dirs.add(dir);
              -                const entries = dir.readdirSync();
              -                for (const e of entries) {
              -                    if (!filter || filter(e)) {
              -                        if (!results.write(withFileTypes ? e : e.fullpath())) {
              -                            paused = true;
              -                        }
              -                    }
              -                }
              -                processing--;
              -                for (const e of entries) {
              -                    let r = e;
              -                    if (e.isSymbolicLink()) {
              -                        if (!(follow && (r = e.realpathSync())))
              -                            continue;
              -                        if (r.isUnknown())
              -                            r.lstatSync();
              -                    }
              -                    if (r.shouldWalk(dirs, walkFilter)) {
              -                        queue.push(r);
              -                    }
              -                }
              -            }
              -            if (paused && !results.flowing)
              -                results.once('drain', process);
              -        };
              -        process();
              -        return results;
              -    }
              -    chdir(path = this.cwd) {
              -        const oldCwd = this.cwd;
              -        this.cwd = typeof path === 'string' ? this.cwd.resolve(path) : path;
              -        this.cwd[setAsCwd](oldCwd);
              -    }
              -}
              -/**
              - * Windows implementation of {@link PathScurryBase}
              - *
              - * Defaults to case insensitve, uses `'\\'` to generate path strings.  Uses
              - * {@link PathWin32} for Path objects.
              - */
              -export class PathScurryWin32 extends PathScurryBase {
              -    /**
              -     * separator for generating path strings
              -     */
              -    sep = '\\';
              -    constructor(cwd = process.cwd(), opts = {}) {
              -        const { nocase = true } = opts;
              -        super(cwd, win32, '\\', { ...opts, nocase });
              -        this.nocase = nocase;
              -        for (let p = this.cwd; p; p = p.parent) {
              -            p.nocase = this.nocase;
              -        }
              -    }
              -    /**
              -     * @internal
              -     */
              -    parseRootPath(dir) {
              -        // if the path starts with a single separator, it's not a UNC, and we'll
              -        // just get separator as the root, and driveFromUNC will return \
              -        // In that case, mount \ on the root from the cwd.
              -        return win32.parse(dir).root.toUpperCase();
              -    }
              -    /**
              -     * @internal
              -     */
              -    newRoot(fs) {
              -        return new PathWin32(this.rootPath, IFDIR, undefined, this.roots, this.nocase, this.childrenCache(), { fs });
              -    }
              -    /**
              -     * Return true if the provided path string is an absolute path
              -     */
              -    isAbsolute(p) {
              -        return (p.startsWith('/') || p.startsWith('\\') || /^[a-z]:(\/|\\)/i.test(p));
              -    }
              -}
              -/**
              - * {@link PathScurryBase} implementation for all posix systems other than Darwin.
              - *
              - * Defaults to case-sensitive matching, uses `'/'` to generate path strings.
              - *
              - * Uses {@link PathPosix} for Path objects.
              - */
              -export class PathScurryPosix extends PathScurryBase {
              -    /**
              -     * separator for generating path strings
              -     */
              -    sep = '/';
              -    constructor(cwd = process.cwd(), opts = {}) {
              -        const { nocase = false } = opts;
              -        super(cwd, posix, '/', { ...opts, nocase });
              -        this.nocase = nocase;
              -    }
              -    /**
              -     * @internal
              -     */
              -    parseRootPath(_dir) {
              -        return '/';
              -    }
              -    /**
              -     * @internal
              -     */
              -    newRoot(fs) {
              -        return new PathPosix(this.rootPath, IFDIR, undefined, this.roots, this.nocase, this.childrenCache(), { fs });
              -    }
              -    /**
              -     * Return true if the provided path string is an absolute path
              -     */
              -    isAbsolute(p) {
              -        return p.startsWith('/');
              -    }
              -}
              -/**
              - * {@link PathScurryBase} implementation for Darwin (macOS) systems.
              - *
              - * Defaults to case-insensitive matching, uses `'/'` for generating path
              - * strings.
              - *
              - * Uses {@link PathPosix} for Path objects.
              - */
              -export class PathScurryDarwin extends PathScurryPosix {
              -    constructor(cwd = process.cwd(), opts = {}) {
              -        const { nocase = true } = opts;
              -        super(cwd, { ...opts, nocase });
              -    }
              -}
              -/**
              - * Default {@link PathBase} implementation for the current platform.
              - *
              - * {@link PathWin32} on Windows systems, {@link PathPosix} on all others.
              - */
              -export const Path = process.platform === 'win32' ? PathWin32 : PathPosix;
              -/**
              - * Default {@link PathScurryBase} implementation for the current platform.
              - *
              - * {@link PathScurryWin32} on Windows systems, {@link PathScurryDarwin} on
              - * Darwin (macOS) systems, {@link PathScurryPosix} on all others.
              - */
              -export const PathScurry = process.platform === 'win32' ? PathScurryWin32
              -    : process.platform === 'darwin' ? PathScurryDarwin
              -        : PathScurryPosix;
              -//# sourceMappingURL=index.js.map
              \ No newline at end of file
              diff --git a/node_modules/path-scurry/dist/esm/index.js.map b/node_modules/path-scurry/dist/esm/index.js.map
              deleted file mode 100644
              index 7e01bd25..00000000
              --- a/node_modules/path-scurry/dist/esm/index.js.map
              +++ /dev/null
              @@ -1 +0,0 @@
              -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AACpC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,WAAW,CAAA;AAExC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAExC,OAAO,EACL,SAAS,EACT,OAAO,IAAI,SAAS,EACpB,WAAW,EACX,YAAY,EACZ,YAAY,IAAI,GAAG,GACpB,MAAM,IAAI,CAAA;AACX,OAAO,KAAK,QAAQ,MAAM,SAAS,CAAA;AAEnC,MAAM,YAAY,GAAG,GAAG,CAAC,MAAM,CAAA;AAC/B,yDAAyD;AACzD,8CAA8C;AAE9C,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAErE,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAqEnC,MAAM,SAAS,GAAY;IACzB,SAAS;IACT,OAAO,E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, win32 } from 'node:path'\n\nimport { fileURLToPath } from 'node:url'\n\nimport {\n  lstatSync,\n  readdir as readdirCB,\n  readdirSync,\n  readlinkSync,\n  realpathSync as rps,\n} from 'fs'\nimport * as actualFS from 'node:fs'\n\nconst realpathSync = rps.native\n// TODO: test perf of fs/promises realpath vs realpathCB,\n// since the promises one uses realpath.native\n\nimport { lstat, readdir, readlink, realpath } from 'node:fs/promises'\n\nimport { Minipass } from 'minipass'\nimport type { Dirent, Stats } from 'node:fs'\n\n/**\n * An object that will be used to override the default `fs`\n * methods.  Any methods that are not overridden will use Node's\n * built-in implementations.\n *\n * - lstatSync\n * - readdir (callback `withFileTypes` Dirent variant, used for\n *   readdirCB and most walks)\n * - readdirSync\n * - readlinkSync\n * - realpathSync\n * - promises: Object containing the following async methods:\n *   - lstat\n *   - readdir (Dirent variant only)\n *   - readlink\n *   - realpath\n */\nexport interface FSOption {\n  lstatSync?: (path: string) => Stats\n  readdir?: (\n    path: string,\n    options: { withFileTypes: true },\n    cb: (er: NodeJS.ErrnoException | null, entries?: Dirent[]) => any,\n  ) => void\n  readdirSync?: (\n    path: string,\n    options: { withFileTypes: true },\n  ) => Dirent[]\n  readlinkSync?: (path: string) => string\n  realpathSync?: (path: string) => string\n  promises?: {\n    lstat?: (path: string) => Promise\n    readdir?: (\n      path: string,\n      options: { withFileTypes: true },\n    ) => Promise\n    readlink?: (path: string) => Promise\n    realpath?: (path: string) => Promise\n    [k: string]: any\n  }\n  [k: string]: any\n}\n\ninterface FSValue {\n  lstatSync: (path: string) => Stats\n  readdir: (\n    path: string,\n    options: { withFileTypes: true },\n    cb: (er: NodeJS.ErrnoException | null, entries?: Dirent[]) => any,\n  ) => void\n  readdirSync: (path: string, options: { withFileTypes: true }) => Dirent[]\n  readlinkSync: (path: string) => string\n  realpathSync: (path: string) => string\n  promises: {\n    lstat: (path: string) => Promise\n    readdir: (\n      path: string,\n      options: { withFileTypes: true },\n    ) => Promise\n    readlink: (path: string) => Promise\n    realpath: (path: string) => Promise\n    [k: string]: any\n  }\n  [k: string]: any\n}\n\nconst defaultFS: FSValue = {\n  lstatSync,\n  readdir: readdirCB,\n  readdirSync,\n  readlinkSync,\n  realpathSync,\n  promises: {\n    lstat,\n    readdir,\n    readlink,\n    realpath,\n  },\n}\n\n// if they just gave us require('fs') then use our default\nconst fsFromOption = (fsOption?: FSOption): FSValue =>\n  !fsOption || fsOption === defaultFS || fsOption === actualFS ?\n    defaultFS\n  : {\n      ...defaultFS,\n      ...fsOption,\n      promises: {\n        ...defaultFS.promises,\n        ...(fsOption.promises || {}),\n      },\n    }\n\n// turn something like //?/c:/ into c:\\\nconst uncDriveRegexp = /^\\\\\\\\\\?\\\\([a-z]:)\\\\?$/i\nconst uncToDrive = (rootPath: string): string =>\n  rootPath.replace(/\\//g, '\\\\').replace(uncDriveRegexp, '$1\\\\')\n\n// windows paths are separated by either / or \\\nconst eitherSep = /[\\\\\\/]/\n\nconst UNKNOWN = 0 // may not even exist, for all we know\nconst IFIFO = 0b0001\nconst IFCHR = 0b0010\nconst IFDIR = 0b0100\nconst IFBLK = 0b0110\nconst IFREG = 0b1000\nconst IFLNK = 0b1010\nconst IFSOCK = 0b1100\nconst IFMT = 0b1111\n\nexport type Type =\n  | 'Unknown'\n  | 'FIFO'\n  | 'CharacterDevice'\n  | 'Directory'\n  | 'BlockDevice'\n  | 'File'\n  | 'SymbolicLink'\n  | 'Socket'\n\n// mask to unset low 4 bits\nconst IFMT_UNKNOWN = ~IFMT\n\n// set after successfully calling readdir() and getting entries.\nconst READDIR_CALLED = 0b0000_0001_0000\n// set after a successful lstat()\nconst LSTAT_CALLED = 0b0000_0010_0000\n// set if an entry (or one of its parents) is definitely not a dir\nconst ENOTDIR = 0b0000_0100_0000\n// set if an entry (or one of its parents) does not exist\n// (can also be set on lstat errors like EACCES or ENAMETOOLONG)\nconst ENOENT = 0b0000_1000_0000\n// cannot have child entries -- also verify &IFMT is either IFDIR or IFLNK\n// set if we fail to readlink\nconst ENOREADLINK = 0b0001_0000_0000\n// set if we know realpath() will fail\nconst ENOREALPATH = 0b0010_0000_0000\n\nconst ENOCHILD = ENOTDIR | ENOENT | ENOREALPATH\nconst TYPEMASK = 0b0011_1111_1111\n\nconst entToType = (s: Dirent | Stats) =>\n  s.isFile() ? IFREG\n  : s.isDirectory() ? IFDIR\n  : s.isSymbolicLink() ? IFLNK\n  : s.isCharacterDevice() ? IFCHR\n  : s.isBlockDevice() ? IFBLK\n  : s.isSocket() ? IFSOCK\n  : s.isFIFO() ? IFIFO\n  : UNKNOWN\n\n// normalize unicode path names\nconst normalizeCache = new Map()\nconst normalize = (s: string) => {\n  const c = normalizeCache.get(s)\n  if (c) return c\n  const n = s.normalize('NFKD')\n  normalizeCache.set(s, n)\n  return n\n}\n\nconst normalizeNocaseCache = new Map()\nconst normalizeNocase = (s: string) => {\n  const c = normalizeNocaseCache.get(s)\n  if (c) return c\n  const n = normalize(s.toLowerCase())\n  normalizeNocaseCache.set(s, n)\n  return n\n}\n\n/**\n * Options that may be provided to the Path constructor\n */\nexport interface PathOpts {\n  fullpath?: string\n  relative?: string\n  relativePosix?: string\n  parent?: PathBase\n  /**\n   * See {@link FSOption}\n   */\n  fs?: FSOption\n}\n\n/**\n * An LRUCache for storing resolved path strings or Path objects.\n * @internal\n */\nexport class ResolveCache extends LRUCache {\n  constructor() {\n    super({ max: 256 })\n  }\n}\n\n// In order to prevent blowing out the js heap by allocating hundreds of\n// thousands of Path entries when walking extremely large trees, the \"children\"\n// in this tree are represented by storing an array of Path entries in an\n// LRUCache, indexed by the parent.  At any time, Path.children() may return an\n// empty array, indicating that it doesn't know about any of its children, and\n// thus has to rebuild that cache.  This is fine, it just means that we don't\n// benefit as much from having the cached entries, but huge directory walks\n// don't blow out the stack, and smaller ones are still as fast as possible.\n//\n//It does impose some complexity when building up the readdir data, because we\n//need to pass a reference to the children array that we started with.\n\n/**\n * an LRUCache for storing child entries.\n * @internal\n */\nexport class ChildrenCache extends LRUCache {\n  constructor(maxSize: number = 16 * 1024) {\n    super({\n      maxSize,\n      // parent + children\n      sizeCalculation: a => a.length + 1,\n    })\n  }\n}\n\n/**\n * Array of Path objects, plus a marker indicating the first provisional entry\n *\n * @internal\n */\nexport type Children = PathBase[] & { provisional: number }\n\nconst setAsCwd = Symbol('PathScurry setAsCwd')\n\n/**\n * Path objects are sort of like a super-powered\n * {@link https://nodejs.org/docs/latest/api/fs.html#class-fsdirent fs.Dirent}\n *\n * Each one represents a single filesystem entry on disk, which may or may not\n * exist. It includes methods for reading various types of information via\n * lstat, readlink, and readdir, and caches all information to the greatest\n * degree possible.\n *\n * Note that fs operations that would normally throw will instead return an\n * \"empty\" value. This is in order to prevent excessive overhead from error\n * stack traces.\n */\nexport abstract class PathBase implements Dirent {\n  /**\n   * the basename of this path\n   *\n   * **Important**: *always* test the path name against any test string\n   * usingthe {@link isNamed} method, and not by directly comparing this\n   * string. Otherwise, unicode path strings that the system sees as identical\n   * will not be properly treated as the same path, leading to incorrect\n   * behavior and possible security issues.\n   */\n  name: string\n  /**\n   * the Path entry corresponding to the path root.\n   *\n   * @internal\n   */\n  root: PathBase\n  /**\n   * All roots found within the current PathScurry family\n   *\n   * @internal\n   */\n  roots: { [k: string]: PathBase }\n  /**\n   * a reference to the parent path, or undefined in the case of root entries\n   *\n   * @internal\n   */\n  parent?: PathBase\n  /**\n   * boolean indicating whether paths are compared case-insensitively\n   * @internal\n   */\n  nocase: boolean\n\n  /**\n   * boolean indicating that this path is the current working directory\n   * of the PathScurry collection that contains it.\n   */\n  isCWD: boolean = false\n\n  /**\n   * the string or regexp used to split paths. On posix, it is `'/'`, and on\n   * windows it is a RegExp matching either `'/'` or `'\\\\'`\n   */\n  abstract splitSep: string | RegExp\n  /**\n   * The path separator string to use when joining paths\n   */\n  abstract sep: string\n\n  // potential default fs override\n  #fs: FSValue\n\n  // Stats fields\n  #dev?: number\n  get dev() {\n    return this.#dev\n  }\n  #mode?: number\n  get mode() {\n    return this.#mode\n  }\n  #nlink?: number\n  get nlink() {\n    return this.#nlink\n  }\n  #uid?: number\n  get uid() {\n    return this.#uid\n  }\n  #gid?: number\n  get gid() {\n    return this.#gid\n  }\n  #rdev?: number\n  get rdev() {\n    return this.#rdev\n  }\n  #blksize?: number\n  get blksize() {\n    return this.#blksize\n  }\n  #ino?: number\n  get ino() {\n    return this.#ino\n  }\n  #size?: number\n  get size() {\n    return this.#size\n  }\n  #blocks?: number\n  get blocks() {\n    return this.#blocks\n  }\n  #atimeMs?: number\n  get atimeMs() {\n    return this.#atimeMs\n  }\n  #mtimeMs?: number\n  get mtimeMs() {\n    return this.#mtimeMs\n  }\n  #ctimeMs?: number\n  get ctimeMs() {\n    return this.#ctimeMs\n  }\n  #birthtimeMs?: number\n  get birthtimeMs() {\n    return this.#birthtimeMs\n  }\n  #atime?: Date\n  get atime() {\n    return this.#atime\n  }\n  #mtime?: Date\n  get mtime() {\n    return this.#mtime\n  }\n  #ctime?: Date\n  get ctime() {\n    return this.#ctime\n  }\n  #birthtime?: Date\n  get birthtime() {\n    return this.#birthtime\n  }\n\n  #matchName: string\n  #depth?: number\n  #fullpath?: string\n  #fullpathPosix?: string\n  #relative?: string\n  #relativePosix?: string\n  #type: number\n  #children: ChildrenCache\n  #linkTarget?: PathBase\n  #realpath?: PathBase\n\n  /**\n   * This property is for compatibility with the Dirent class as of\n   * Node v20, where Dirent['parentPath'] refers to the path of the\n   * directory that was passed to readdir. For root entries, it's the path\n   * to the entry itself.\n   */\n  get parentPath(): string {\n    return (this.parent || this).fullpath()\n  }\n\n  /**\n   * Deprecated alias for Dirent['parentPath'] Somewhat counterintuitively,\n   * this property refers to the *parent* path, not the path object itself.\n   */\n  get path(): string {\n    return this.parentPath\n  }\n\n  /**\n   * Do not create new Path objects directly.  They should always be accessed\n   * via the PathScurry class or other methods on the Path class.\n   *\n   * @internal\n   */\n  constructor(\n    name: string,\n    type: number = UNKNOWN,\n    root: PathBase | undefined,\n    roots: { [k: string]: PathBase },\n    nocase: boolean,\n    children: ChildrenCache,\n    opts: PathOpts,\n  ) {\n    this.name = name\n    this.#matchName = nocase ? normalizeNocase(name) : normalize(name)\n    this.#type = type & TYPEMASK\n    this.nocase = nocase\n    this.roots = roots\n    this.root = root || this\n    this.#children = children\n    this.#fullpath = opts.fullpath\n    this.#relative = opts.relative\n    this.#relativePosix = opts.relativePosix\n    this.parent = opts.parent\n    if (this.parent) {\n      this.#fs = this.parent.#fs\n    } else {\n      this.#fs = fsFromOption(opts.fs)\n    }\n  }\n\n  /**\n   * Returns the depth of the Path object from its root.\n   *\n   * For example, a path at `/foo/bar` would have a depth of 2.\n   */\n  depth(): number {\n    if (this.#depth !== undefined) return this.#depth\n    if (!this.parent) return (this.#depth = 0)\n    return (this.#depth = this.parent.depth() + 1)\n  }\n\n  /**\n   * @internal\n   */\n  abstract getRootString(path: string): string\n  /**\n   * @internal\n   */\n  abstract getRoot(rootPath: string): PathBase\n  /**\n   * @internal\n   */\n  abstract newChild(name: string, type?: number, opts?: PathOpts): PathBase\n\n  /**\n   * @internal\n   */\n  childrenCache() {\n    return this.#children\n  }\n\n  /**\n   * Get the Path object referenced by the string path, resolved from this Path\n   */\n  resolve(path?: string): PathBase {\n    if (!path) {\n      return this\n    }\n    const rootPath = this.getRootString(path)\n    const dir = path.substring(rootPath.length)\n    const dirParts = dir.split(this.splitSep)\n    const result: PathBase =\n      rootPath ?\n        this.getRoot(rootPath).#resolveParts(dirParts)\n      : this.#resolveParts(dirParts)\n    return result\n  }\n\n  #resolveParts(dirParts: string[]) {\n    let p: PathBase = this\n    for (const part of dirParts) {\n      p = p.child(part)\n    }\n    return p\n  }\n\n  /**\n   * Returns the cached children Path objects, if still available.  If they\n   * have fallen out of the cache, then returns an empty array, and resets the\n   * READDIR_CALLED bit, so that future calls to readdir() will require an fs\n   * lookup.\n   *\n   * @internal\n   */\n  children(): Children {\n    const cached = this.#children.get(this)\n    if (cached) {\n      return cached\n    }\n    const children: Children = Object.assign([], { provisional: 0 })\n    this.#children.set(this, children)\n    this.#type &= ~READDIR_CALLED\n    return children\n  }\n\n  /**\n   * Resolves a path portion and returns or creates the child Path.\n   *\n   * Returns `this` if pathPart is `''` or `'.'`, or `parent` if pathPart is\n   * `'..'`.\n   *\n   * This should not be called directly.  If `pathPart` contains any path\n   * separators, it will lead to unsafe undefined behavior.\n   *\n   * Use `Path.resolve()` instead.\n   *\n   * @internal\n   */\n  child(pathPart: string, opts?: PathOpts): PathBase {\n    if (pathPart === '' || pathPart === '.') {\n      return this\n    }\n    if (pathPart === '..') {\n      return this.parent || this\n    }\n\n    // find the child\n    const children = this.children()\n    const name =\n      this.nocase ? normalizeNocase(pathPart) : normalize(pathPart)\n    for (const p of children) {\n      if (p.#matchName === name) {\n        return p\n      }\n    }\n\n    // didn't find it, create provisional child, since it might not\n    // actually exist.  If we know the parent isn't a dir, then\n    // in fact it CAN'T exist.\n    const s = this.parent ? this.sep : ''\n    const fullpath =\n      this.#fullpath ? this.#fullpath + s + pathPart : undefined\n    const pchild = this.newChild(pathPart, UNKNOWN, {\n      ...opts,\n      parent: this,\n      fullpath,\n    })\n\n    if (!this.canReaddir()) {\n      pchild.#type |= ENOENT\n    }\n\n    // don't have to update provisional, because if we have real children,\n    // then provisional is set to children.length, otherwise a lower number\n    children.push(pchild)\n    return pchild\n  }\n\n  /**\n   * The relative path from the cwd. If it does not share an ancestor with\n   * the cwd, then this ends up being equivalent to the fullpath()\n   */\n  relative(): string {\n    if (this.isCWD) return ''\n    if (this.#relative !== undefined) {\n      return this.#relative\n    }\n    const name = this.name\n    const p = this.parent\n    if (!p) {\n      return (this.#relative = this.name)\n    }\n    const pv = p.relative()\n    return pv + (!pv || !p.parent ? '' : this.sep) + name\n  }\n\n  /**\n   * The relative path from the cwd, using / as the path separator.\n   * If it does not share an ancestor with\n   * the cwd, then this ends up being equivalent to the fullpathPosix()\n   * On posix systems, this is identical to relative().\n   */\n  relativePosix(): string {\n    if (this.sep === '/') return this.relative()\n    if (this.isCWD) return ''\n    if (this.#relativePosix !== undefined) return this.#relativePosix\n    const name = this.name\n    const p = this.parent\n    if (!p) {\n      return (this.#relativePosix = this.fullpathPosix())\n    }\n    const pv = p.relativePosix()\n    return pv + (!pv || !p.parent ? '' : '/') + name\n  }\n\n  /**\n   * The fully resolved path string for this Path entry\n   */\n  fullpath(): string {\n    if (this.#fullpath !== undefined) {\n      return this.#fullpath\n    }\n    const name = this.name\n    const p = this.parent\n    if (!p) {\n      return (this.#fullpath = this.name)\n    }\n    const pv = p.fullpath()\n    const fp = pv + (!p.parent ? '' : this.sep) + name\n    return (this.#fullpath = fp)\n  }\n\n  /**\n   * On platforms other than windows, this is identical to fullpath.\n   *\n   * On windows, this is overridden to return the forward-slash form of the\n   * full UNC path.\n   */\n  fullpathPosix(): string {\n    if (this.#fullpathPosix !== undefined) return this.#fullpathPosix\n    if (this.sep === '/') return (this.#fullpathPosix = this.fullpath())\n    if (!this.parent) {\n      const p = this.fullpath().replace(/\\\\/g, '/')\n      if (/^[a-z]:\\//i.test(p)) {\n        return (this.#fullpathPosix = `//?/${p}`)\n      } else {\n        return (this.#fullpathPosix = p)\n      }\n    }\n    const p = this.parent\n    const pfpp = p.fullpathPosix()\n    const fpp = pfpp + (!pfpp || !p.parent ? '' : '/') + this.name\n    return (this.#fullpathPosix = fpp)\n  }\n\n  /**\n   * Is the Path of an unknown type?\n   *\n   * Note that we might know *something* about it if there has been a previous\n   * filesystem operation, for example that it does not exist, or is not a\n   * link, or whether it has child entries.\n   */\n  isUnknown(): boolean {\n    return (this.#type & IFMT) === UNKNOWN\n  }\n\n  isType(type: Type): boolean {\n    return this[`is${type}`]()\n  }\n\n  getType(): Type {\n    return (\n      this.isUnknown() ? 'Unknown'\n      : this.isDirectory() ? 'Directory'\n      : this.isFile() ? 'File'\n      : this.isSymbolicLink() ? 'SymbolicLink'\n      : this.isFIFO() ? 'FIFO'\n      : this.isCharacterDevice() ? 'CharacterDevice'\n      : this.isBlockDevice() ? 'BlockDevice'\n      : /* c8 ignore start */ this.isSocket() ? 'Socket'\n      : 'Unknown'\n    )\n    /* c8 ignore stop */\n  }\n\n  /**\n   * Is the Path a regular file?\n   */\n  isFile(): boolean {\n    return (this.#type & IFMT) === IFREG\n  }\n\n  /**\n   * Is the Path a directory?\n   */\n  isDirectory(): boolean {\n    return (this.#type & IFMT) === IFDIR\n  }\n\n  /**\n   * Is the path a character device?\n   */\n  isCharacterDevice(): boolean {\n    return (this.#type & IFMT) === IFCHR\n  }\n\n  /**\n   * Is the path a block device?\n   */\n  isBlockDevice(): boolean {\n    return (this.#type & IFMT) === IFBLK\n  }\n\n  /**\n   * Is the path a FIFO pipe?\n   */\n  isFIFO(): boolean {\n    return (this.#type & IFMT) === IFIFO\n  }\n\n  /**\n   * Is the path a socket?\n   */\n  isSocket(): boolean {\n    return (this.#type & IFMT) === IFSOCK\n  }\n\n  /**\n   * Is the path a symbolic link?\n   */\n  isSymbolicLink(): boolean {\n    return (this.#type & IFLNK) === IFLNK\n  }\n\n  /**\n   * Return the entry if it has been subject of a successful lstat, or\n   * undefined otherwise.\n   *\n   * Does not read the filesystem, so an undefined result *could* simply\n   * mean that we haven't called lstat on it.\n   */\n  lstatCached(): PathBase | undefined {\n    return this.#type & LSTAT_CALLED ? this : undefined\n  }\n\n  /**\n   * Return the cached link target if the entry has been the subject of a\n   * successful readlink, or undefined otherwise.\n   *\n   * Does not read the filesystem, so an undefined result *could* just mean we\n   * don't have any cached data. Only use it if you are very sure that a\n   * readlink() has been called at some point.\n   */\n  readlinkCached(): PathBase | undefined {\n    return this.#linkTarget\n  }\n\n  /**\n   * Returns the cached realpath target if the entry has been the subject\n   * of a successful realpath, or undefined otherwise.\n   *\n   * Does not read the filesystem, so an undefined result *could* just mean we\n   * don't have any cached data. Only use it if you are very sure that a\n   * realpath() has been called at some point.\n   */\n  realpathCached(): PathBase | undefined {\n    return this.#realpath\n  }\n\n  /**\n   * Returns the cached child Path entries array if the entry has been the\n   * subject of a successful readdir(), or [] otherwise.\n   *\n   * Does not read the filesystem, so an empty array *could* just mean we\n   * don't have any cached data. Only use it if you are very sure that a\n   * readdir() has been called recently enough to still be valid.\n   */\n  readdirCached(): PathBase[] {\n    const children = this.children()\n    return children.slice(0, children.provisional)\n  }\n\n  /**\n   * Return true if it's worth trying to readlink.  Ie, we don't (yet) have\n   * any indication that readlink will definitely fail.\n   *\n   * Returns false if the path is known to not be a symlink, if a previous\n   * readlink failed, or if the entry does not exist.\n   */\n  canReadlink(): boolean {\n    if (this.#linkTarget) return true\n    if (!this.parent) return false\n    // cases where it cannot possibly succeed\n    const ifmt = this.#type & IFMT\n    return !(\n      (ifmt !== UNKNOWN && ifmt !== IFLNK) ||\n      this.#type & ENOREADLINK ||\n      this.#type & ENOENT\n    )\n  }\n\n  /**\n   * Return true if readdir has previously been successfully called on this\n   * path, indicating that cachedReaddir() is likely valid.\n   */\n  calledReaddir(): boolean {\n    return !!(this.#type & READDIR_CALLED)\n  }\n\n  /**\n   * Returns true if the path is known to not exist. That is, a previous lstat\n   * or readdir failed to verify its existence when that would have been\n   * expected, or a parent entry was marked either enoent or enotdir.\n   */\n  isENOENT(): boolean {\n    return !!(this.#type & ENOENT)\n  }\n\n  /**\n   * Return true if the path is a match for the given path name.  This handles\n   * case sensitivity and unicode normalization.\n   *\n   * Note: even on case-sensitive systems, it is **not** safe to test the\n   * equality of the `.name` property to determine whether a given pathname\n   * matches, due to unicode normalization mismatches.\n   *\n   * Always use this method instead of testing the `path.name` property\n   * directly.\n   */\n  isNamed(n: string): boolean {\n    return !this.nocase ?\n        this.#matchName === normalize(n)\n      : this.#matchName === normalizeNocase(n)\n  }\n\n  /**\n   * Return the Path object corresponding to the target of a symbolic link.\n   *\n   * If the Path is not a symbolic link, or if the readlink call fails for any\n   * reason, `undefined` is returned.\n   *\n   * Result is cached, and thus may be outdated if the filesystem is mutated.\n   */\n  async readlink(): Promise {\n    const target = this.#linkTarget\n    if (target) {\n      return target\n    }\n    if (!this.canReadlink()) {\n      return undefined\n    }\n    /* c8 ignore start */\n    // already covered by the canReadlink test, here for ts grumples\n    if (!this.parent) {\n      return undefined\n    }\n    /* c8 ignore stop */\n    try {\n      const read = await this.#fs.promises.readlink(this.fullpath())\n      const linkTarget = (await this.parent.realpath())?.resolve(read)\n      if (linkTarget) {\n        return (this.#linkTarget = linkTarget)\n      }\n    } catch (er) {\n      this.#readlinkFail((er as NodeJS.ErrnoException).code)\n      return undefined\n    }\n  }\n\n  /**\n   * Synchronous {@link PathBase.readlink}\n   */\n  readlinkSync(): PathBase | undefined {\n    const target = this.#linkTarget\n    if (target) {\n      return target\n    }\n    if (!this.canReadlink()) {\n      return undefined\n    }\n    /* c8 ignore start */\n    // already covered by the canReadlink test, here for ts grumples\n    if (!this.parent) {\n      return undefined\n    }\n    /* c8 ignore stop */\n    try {\n      const read = this.#fs.readlinkSync(this.fullpath())\n      const linkTarget = this.parent.realpathSync()?.resolve(read)\n      if (linkTarget) {\n        return (this.#linkTarget = linkTarget)\n      }\n    } catch (er) {\n      this.#readlinkFail((er as NodeJS.ErrnoException).code)\n      return undefined\n    }\n  }\n\n  #readdirSuccess(children: Children) {\n    // succeeded, mark readdir called bit\n    this.#type |= READDIR_CALLED\n    // mark all remaining provisional children as ENOENT\n    for (let p = children.provisional; p < children.length; p++) {\n      const c = children[p]\n      if (c) c.#markENOENT()\n    }\n  }\n\n  #markENOENT() {\n    // mark as UNKNOWN and ENOENT\n    if (this.#type & ENOENT) return\n    this.#type = (this.#type | ENOENT) & IFMT_UNKNOWN\n    this.#markChildrenENOENT()\n  }\n\n  #markChildrenENOENT() {\n    // all children are provisional and do not exist\n    const children = this.children()\n    children.provisional = 0\n    for (const p of children) {\n      p.#markENOENT()\n    }\n  }\n\n  #markENOREALPATH() {\n    this.#type |= ENOREALPATH\n    this.#markENOTDIR()\n  }\n\n  // save the information when we know the entry is not a dir\n  #markENOTDIR() {\n    // entry is not a directory, so any children can't exist.\n    // this *should* be impossible, since any children created\n    // after it's been marked ENOTDIR should be marked ENOENT,\n    // so it won't even get to this point.\n    /* c8 ignore start */\n    if (this.#type & ENOTDIR) return\n    /* c8 ignore stop */\n    let t = this.#type\n    // this could happen if we stat a dir, then delete it,\n    // then try to read it or one of its children.\n    if ((t & IFMT) === IFDIR) t &= IFMT_UNKNOWN\n    this.#type = t | ENOTDIR\n    this.#markChildrenENOENT()\n  }\n\n  #readdirFail(code: string = '') {\n    // markENOTDIR and markENOENT also set provisional=0\n    if (code === 'ENOTDIR' || code === 'EPERM') {\n      this.#markENOTDIR()\n    } else if (code === 'ENOENT') {\n      this.#markENOENT()\n    } else {\n      this.children().provisional = 0\n    }\n  }\n\n  #lstatFail(code: string = '') {\n    // Windows just raises ENOENT in this case, disable for win CI\n    /* c8 ignore start */\n    if (code === 'ENOTDIR') {\n      // already know it has a parent by this point\n      const p = this.parent as PathBase\n      p.#markENOTDIR()\n    } else if (code === 'ENOENT') {\n      /* c8 ignore stop */\n      this.#markENOENT()\n    }\n  }\n\n  #readlinkFail(code: string = '') {\n    let ter = this.#type\n    ter |= ENOREADLINK\n    if (code === 'ENOENT') ter |= ENOENT\n    // windows gets a weird error when you try to readlink a file\n    if (code === 'EINVAL' || code === 'UNKNOWN') {\n      // exists, but not a symlink, we don't know WHAT it is, so remove\n      // all IFMT bits.\n      ter &= IFMT_UNKNOWN\n    }\n    this.#type = ter\n    // windows just gets ENOENT in this case.  We do cover the case,\n    // just disabled because it's impossible on Windows CI\n    /* c8 ignore start */\n    if (code === 'ENOTDIR' && this.parent) {\n      this.parent.#markENOTDIR()\n    }\n    /* c8 ignore stop */\n  }\n\n  #readdirAddChild(e: Dirent, c: Children) {\n    return (\n      this.#readdirMaybePromoteChild(e, c) ||\n      this.#readdirAddNewChild(e, c)\n    )\n  }\n\n  #readdirAddNewChild(e: Dirent, c: Children): PathBase {\n    // alloc new entry at head, so it's never provisional\n    const type = entToType(e)\n    const child = this.newChild(e.name, type, { parent: this })\n    const ifmt = child.#type & IFMT\n    if (ifmt !== IFDIR && ifmt !== IFLNK && ifmt !== UNKNOWN) {\n      child.#type |= ENOTDIR\n    }\n    c.unshift(child)\n    c.provisional++\n    return child\n  }\n\n  #readdirMaybePromoteChild(e: Dirent, c: Children): PathBase | undefined {\n    for (let p = c.provisional; p < c.length; p++) {\n      const pchild = c[p]\n      const name =\n        this.nocase ? normalizeNocase(e.name) : normalize(e.name)\n      if (name !== pchild!.#matchName) {\n        continue\n      }\n\n      return this.#readdirPromoteChild(e, pchild!, p, c)\n    }\n  }\n\n  #readdirPromoteChild(\n    e: Dirent,\n    p: PathBase,\n    index: number,\n    c: Children,\n  ): PathBase {\n    const v = p.name\n    // retain any other flags, but set ifmt from dirent\n    p.#type = (p.#type & IFMT_UNKNOWN) | entToType(e)\n    // case sensitivity fixing when we learn the true name.\n    if (v !== e.name) p.name = e.name\n\n    // just advance provisional index (potentially off the list),\n    // otherwise we have to splice/pop it out and re-insert at head\n    if (index !== c.provisional) {\n      if (index === c.length - 1) c.pop()\n      else c.splice(index, 1)\n      c.unshift(p)\n    }\n    c.provisional++\n    return p\n  }\n\n  /**\n   * Call lstat() on this Path, and update all known information that can be\n   * determined.\n   *\n   * Note that unlike `fs.lstat()`, the returned value does not contain some\n   * information, such as `mode`, `dev`, `nlink`, and `ino`.  If that\n   * information is required, you will need to call `fs.lstat` yourself.\n   *\n   * If the Path refers to a nonexistent file, or if the lstat call fails for\n   * any reason, `undefined` is returned.  Otherwise the updated Path object is\n   * returned.\n   *\n   * Results are cached, and thus may be out of date if the filesystem is\n   * mutated.\n   */\n  async lstat(): Promise {\n    if ((this.#type & ENOENT) === 0) {\n      try {\n        this.#applyStat(await this.#fs.promises.lstat(this.fullpath()))\n        return this\n      } catch (er) {\n        this.#lstatFail((er as NodeJS.ErrnoException).code)\n      }\n    }\n  }\n\n  /**\n   * synchronous {@link PathBase.lstat}\n   */\n  lstatSync(): PathBase | undefined {\n    if ((this.#type & ENOENT) === 0) {\n      try {\n        this.#applyStat(this.#fs.lstatSync(this.fullpath()))\n        return this\n      } catch (er) {\n        this.#lstatFail((er as NodeJS.ErrnoException).code)\n      }\n    }\n  }\n\n  #applyStat(st: Stats) {\n    const {\n      atime,\n      atimeMs,\n      birthtime,\n      birthtimeMs,\n      blksize,\n      blocks,\n      ctime,\n      ctimeMs,\n      dev,\n      gid,\n      ino,\n      mode,\n      mtime,\n      mtimeMs,\n      nlink,\n      rdev,\n      size,\n      uid,\n    } = st\n    this.#atime = atime\n    this.#atimeMs = atimeMs\n    this.#birthtime = birthtime\n    this.#birthtimeMs = birthtimeMs\n    this.#blksize = blksize\n    this.#blocks = blocks\n    this.#ctime = ctime\n    this.#ctimeMs = ctimeMs\n    this.#dev = dev\n    this.#gid = gid\n    this.#ino = ino\n    this.#mode = mode\n    this.#mtime = mtime\n    this.#mtimeMs = mtimeMs\n    this.#nlink = nlink\n    this.#rdev = rdev\n    this.#size = size\n    this.#uid = uid\n    const ifmt = entToType(st)\n    // retain any other flags, but set the ifmt\n    this.#type = (this.#type & IFMT_UNKNOWN) | ifmt | LSTAT_CALLED\n    if (ifmt !== UNKNOWN && ifmt !== IFDIR && ifmt !== IFLNK) {\n      this.#type |= ENOTDIR\n    }\n  }\n\n  #onReaddirCB: ((\n    er: NodeJS.ErrnoException | null,\n    entries: Path[],\n  ) => any)[] = []\n  #readdirCBInFlight: boolean = false\n  #callOnReaddirCB(children: Path[]) {\n    this.#readdirCBInFlight = false\n    const cbs = this.#onReaddirCB.slice()\n    this.#onReaddirCB.length = 0\n    cbs.forEach(cb => cb(null, children))\n  }\n\n  /**\n   * Standard node-style callback interface to get list of directory entries.\n   *\n   * If the Path cannot or does not contain any children, then an empty array\n   * is returned.\n   *\n   * Results are cached, and thus may be out of date if the filesystem is\n   * mutated.\n   *\n   * @param cb The callback called with (er, entries).  Note that the `er`\n   * param is somewhat extraneous, as all readdir() errors are handled and\n   * simply result in an empty set of entries being returned.\n   * @param allowZalgo Boolean indicating that immediately known results should\n   * *not* be deferred with `queueMicrotask`. Defaults to `false`. Release\n   * zalgo at your peril, the dark pony lord is devious and unforgiving.\n   */\n  readdirCB(\n    cb: (er: NodeJS.ErrnoException | null, entries: PathBase[]) => any,\n    allowZalgo: boolean = false,\n  ): void {\n    if (!this.canReaddir()) {\n      if (allowZalgo) cb(null, [])\n      else queueMicrotask(() => cb(null, []))\n      return\n    }\n\n    const children = this.children()\n    if (this.calledReaddir()) {\n      const c = children.slice(0, children.provisional)\n      if (allowZalgo) cb(null, c)\n      else queueMicrotask(() => cb(null, c))\n      return\n    }\n\n    // don't have to worry about zalgo at this point.\n    this.#onReaddirCB.push(cb)\n    if (this.#readdirCBInFlight) {\n      return\n    }\n    this.#readdirCBInFlight = true\n\n    // else read the directory, fill up children\n    // de-provisionalize any provisional children.\n    const fullpath = this.fullpath()\n    this.#fs.readdir(fullpath, { withFileTypes: true }, (er, entries) => {\n      if (er) {\n        this.#readdirFail((er as NodeJS.ErrnoException).code)\n        children.provisional = 0\n      } else {\n        // if we didn't get an error, we always get entries.\n        //@ts-ignore\n        for (const e of entries) {\n          this.#readdirAddChild(e, children)\n        }\n        this.#readdirSuccess(children)\n      }\n      this.#callOnReaddirCB(children.slice(0, children.provisional))\n      return\n    })\n  }\n\n  #asyncReaddirInFlight?: Promise\n\n  /**\n   * Return an array of known child entries.\n   *\n   * If the Path cannot or does not contain any children, then an empty array\n   * is returned.\n   *\n   * Results are cached, and thus may be out of date if the filesystem is\n   * mutated.\n   */\n  async readdir(): Promise {\n    if (!this.canReaddir()) {\n      return []\n    }\n\n    const children = this.children()\n    if (this.calledReaddir()) {\n      return children.slice(0, children.provisional)\n    }\n\n    // else read the directory, fill up children\n    // de-provisionalize any provisional children.\n    const fullpath = this.fullpath()\n    if (this.#asyncReaddirInFlight) {\n      await this.#asyncReaddirInFlight\n    } else {\n      /* c8 ignore start */\n      let resolve: () => void = () => {}\n      /* c8 ignore stop */\n      this.#asyncReaddirInFlight = new Promise(\n        res => (resolve = res),\n      )\n      try {\n        for (const e of await this.#fs.promises.readdir(fullpath, {\n          withFileTypes: true,\n        })) {\n          this.#readdirAddChild(e, children)\n        }\n        this.#readdirSuccess(children)\n      } catch (er) {\n        this.#readdirFail((er as NodeJS.ErrnoException).code)\n        children.provisional = 0\n      }\n      this.#asyncReaddirInFlight = undefined\n      resolve()\n    }\n    return children.slice(0, children.provisional)\n  }\n\n  /**\n   * synchronous {@link PathBase.readdir}\n   */\n  readdirSync(): PathBase[] {\n    if (!this.canReaddir()) {\n      return []\n    }\n\n    const children = this.children()\n    if (this.calledReaddir()) {\n      return children.slice(0, children.provisional)\n    }\n\n    // else read the directory, fill up children\n    // de-provisionalize any provisional children.\n    const fullpath = this.fullpath()\n    try {\n      for (const e of this.#fs.readdirSync(fullpath, {\n        withFileTypes: true,\n      })) {\n        this.#readdirAddChild(e, children)\n      }\n      this.#readdirSuccess(children)\n    } catch (er) {\n      this.#readdirFail((er as NodeJS.ErrnoException).code)\n      children.provisional = 0\n    }\n    return children.slice(0, children.provisional)\n  }\n\n  canReaddir() {\n    if (this.#type & ENOCHILD) return false\n    const ifmt = IFMT & this.#type\n    // we always set ENOTDIR when setting IFMT, so should be impossible\n    /* c8 ignore start */\n    if (!(ifmt === UNKNOWN || ifmt === IFDIR || ifmt === IFLNK)) {\n      return false\n    }\n    /* c8 ignore stop */\n    return true\n  }\n\n  shouldWalk(\n    dirs: Set,\n    walkFilter?: (e: PathBase) => boolean,\n  ): boolean {\n    return (\n      (this.#type & IFDIR) === IFDIR &&\n      !(this.#type & ENOCHILD) &&\n      !dirs.has(this) &&\n      (!walkFilter || walkFilter(this))\n    )\n  }\n\n  /**\n   * Return the Path object corresponding to path as resolved\n   * by realpath(3).\n   *\n   * If the realpath call fails for any reason, `undefined` is returned.\n   *\n   * Result is cached, and thus may be outdated if the filesystem is mutated.\n   * On success, returns a Path object.\n   */\n  async realpath(): Promise {\n    if (this.#realpath) return this.#realpath\n    if ((ENOREALPATH | ENOREADLINK | ENOENT) & this.#type) return undefined\n    try {\n      const rp = await this.#fs.promises.realpath(this.fullpath())\n      return (this.#realpath = this.resolve(rp))\n    } catch (_) {\n      this.#markENOREALPATH()\n    }\n  }\n\n  /**\n   * Synchronous {@link realpath}\n   */\n  realpathSync(): PathBase | undefined {\n    if (this.#realpath) return this.#realpath\n    if ((ENOREALPATH | ENOREADLINK | ENOENT) & this.#type) return undefined\n    try {\n      const rp = this.#fs.realpathSync(this.fullpath())\n      return (this.#realpath = this.resolve(rp))\n    } catch (_) {\n      this.#markENOREALPATH()\n    }\n  }\n\n  /**\n   * Internal method to mark this Path object as the scurry cwd,\n   * called by {@link PathScurry#chdir}\n   *\n   * @internal\n   */\n  [setAsCwd](oldCwd: PathBase): void {\n    if (oldCwd === this) return\n    oldCwd.isCWD = false\n    this.isCWD = true\n\n    const changed = new Set([])\n    let rp = []\n    let p: PathBase = this\n    while (p && p.parent) {\n      changed.add(p)\n      p.#relative = rp.join(this.sep)\n      p.#relativePosix = rp.join('/')\n      p = p.parent\n      rp.push('..')\n    }\n    // now un-memoize parents of old cwd\n    p = oldCwd\n    while (p && p.parent && !changed.has(p)) {\n      p.#relative = undefined\n      p.#relativePosix = undefined\n      p = p.parent\n    }\n  }\n}\n\n/**\n * Path class used on win32 systems\n *\n * Uses `'\\\\'` as the path separator for returned paths, either `'\\\\'` or `'/'`\n * as the path separator for parsing paths.\n */\nexport class PathWin32 extends PathBase {\n  /**\n   * Separator for generating path strings.\n   */\n  sep: '\\\\' = '\\\\'\n  /**\n   * Separator for parsing path strings.\n   */\n  splitSep: RegExp = eitherSep\n\n  /**\n   * Do not create new Path objects directly.  They should always be accessed\n   * via the PathScurry class or other methods on the Path class.\n   *\n   * @internal\n   */\n  constructor(\n    name: string,\n    type: number = UNKNOWN,\n    root: PathBase | undefined,\n    roots: { [k: string]: PathBase },\n    nocase: boolean,\n    children: ChildrenCache,\n    opts: PathOpts,\n  ) {\n    super(name, type, root, roots, nocase, children, opts)\n  }\n\n  /**\n   * @internal\n   */\n  newChild(name: string, type: number = UNKNOWN, opts: PathOpts = {}) {\n    return new PathWin32(\n      name,\n      type,\n      this.root,\n      this.roots,\n      this.nocase,\n      this.childrenCache(),\n      opts,\n    )\n  }\n\n  /**\n   * @internal\n   */\n  getRootString(path: string): string {\n    return win32.parse(path).root\n  }\n\n  /**\n   * @internal\n   */\n  getRoot(rootPath: string): PathBase {\n    rootPath = uncToDrive(rootPath.toUpperCase())\n    if (rootPath === this.root.name) {\n      return this.root\n    }\n    // ok, not that one, check if it matches another we know about\n    for (const [compare, root] of Object.entries(this.roots)) {\n      if (this.sameRoot(rootPath, compare)) {\n        return (this.roots[rootPath] = root)\n      }\n    }\n    // otherwise, have to create a new one.\n    return (this.roots[rootPath] = new PathScurryWin32(\n      rootPath,\n      this,\n    ).root)\n  }\n\n  /**\n   * @internal\n   */\n  sameRoot(rootPath: string, compare: string = this.root.name): boolean {\n    // windows can (rarely) have case-sensitive filesystem, but\n    // UNC and drive letters are always case-insensitive, and canonically\n    // represented uppercase.\n    rootPath = rootPath\n      .toUpperCase()\n      .replace(/\\//g, '\\\\')\n      .replace(uncDriveRegexp, '$1\\\\')\n    return rootPath === compare\n  }\n}\n\n/**\n * Path class used on all posix systems.\n *\n * Uses `'/'` as the path separator.\n */\nexport class PathPosix extends PathBase {\n  /**\n   * separator for parsing path strings\n   */\n  splitSep: '/' = '/'\n  /**\n   * separator for generating path strings\n   */\n  sep: '/' = '/'\n\n  /**\n   * Do not create new Path objects directly.  They should always be accessed\n   * via the PathScurry class or other methods on the Path class.\n   *\n   * @internal\n   */\n  constructor(\n    name: string,\n    type: number = UNKNOWN,\n    root: PathBase | undefined,\n    roots: { [k: string]: PathBase },\n    nocase: boolean,\n    children: ChildrenCache,\n    opts: PathOpts,\n  ) {\n    super(name, type, root, roots, nocase, children, opts)\n  }\n\n  /**\n   * @internal\n   */\n  getRootString(path: string): string {\n    return path.startsWith('/') ? '/' : ''\n  }\n\n  /**\n   * @internal\n   */\n  getRoot(_rootPath: string): PathBase {\n    return this.root\n  }\n\n  /**\n   * @internal\n   */\n  newChild(name: string, type: number = UNKNOWN, opts: PathOpts = {}) {\n    return new PathPosix(\n      name,\n      type,\n      this.root,\n      this.roots,\n      this.nocase,\n      this.childrenCache(),\n      opts,\n    )\n  }\n}\n\n/**\n * Options that may be provided to the PathScurry constructor\n */\nexport interface PathScurryOpts {\n  /**\n   * perform case-insensitive path matching. Default based on platform\n   * subclass.\n   */\n  nocase?: boolean\n  /**\n   * Number of Path entries to keep in the cache of Path child references.\n   *\n   * Setting this higher than 65536 will dramatically increase the data\n   * consumption and construction time overhead of each PathScurry.\n   *\n   * Setting this value to 256 or lower will significantly reduce the data\n   * consumption and construction time overhead, but may also reduce resolve()\n   * and readdir() performance on large filesystems.\n   *\n   * Default `16384`.\n   */\n  childrenCacheSize?: number\n  /**\n   * An object that overrides the built-in functions from the fs and\n   * fs/promises modules.\n   *\n   * See {@link FSOption}\n   */\n  fs?: FSOption\n}\n\n/**\n * The base class for all PathScurry classes, providing the interface for path\n * resolution and filesystem operations.\n *\n * Typically, you should *not* instantiate this class directly, but rather one\n * of the platform-specific classes, or the exported {@link PathScurry} which\n * defaults to the current platform.\n */\nexport abstract class PathScurryBase {\n  /**\n   * The root Path entry for the current working directory of this Scurry\n   */\n  root: PathBase\n  /**\n   * The string path for the root of this Scurry's current working directory\n   */\n  rootPath: string\n  /**\n   * A collection of all roots encountered, referenced by rootPath\n   */\n  roots: { [k: string]: PathBase }\n  /**\n   * The Path entry corresponding to this PathScurry's current working directory.\n   */\n  cwd: PathBase\n  #resolveCache: ResolveCache\n  #resolvePosixCache: ResolveCache\n  #children: ChildrenCache\n  /**\n   * Perform path comparisons case-insensitively.\n   *\n   * Defaults true on Darwin and Windows systems, false elsewhere.\n   */\n  nocase: boolean\n\n  /**\n   * The path separator used for parsing paths\n   *\n   * `'/'` on Posix systems, either `'/'` or `'\\\\'` on Windows\n   */\n  abstract sep: string | RegExp\n\n  #fs: FSValue\n\n  /**\n   * This class should not be instantiated directly.\n   *\n   * Use PathScurryWin32, PathScurryDarwin, PathScurryPosix, or PathScurry\n   *\n   * @internal\n   */\n  constructor(\n    cwd: URL | string = process.cwd(),\n    pathImpl: typeof win32 | typeof posix,\n    sep: string | RegExp,\n    {\n      nocase,\n      childrenCacheSize = 16 * 1024,\n      fs = defaultFS,\n    }: PathScurryOpts = {},\n  ) {\n    this.#fs = fsFromOption(fs)\n    if (cwd instanceof URL || cwd.startsWith('file://')) {\n      cwd = fileURLToPath(cwd)\n    }\n    // resolve and split root, and then add to the store.\n    // this is the only time we call path.resolve()\n    const cwdPath = pathImpl.resolve(cwd)\n    this.roots = Object.create(null)\n    this.rootPath = this.parseRootPath(cwdPath)\n    this.#resolveCache = new ResolveCache()\n    this.#resolvePosixCache = new ResolveCache()\n    this.#children = new ChildrenCache(childrenCacheSize)\n\n    const split = cwdPath.substring(this.rootPath.length).split(sep)\n    // resolve('/') leaves '', splits to [''], we don't want that.\n    if (split.length === 1 && !split[0]) {\n      split.pop()\n    }\n    /* c8 ignore start */\n    if (nocase === undefined) {\n      throw new TypeError(\n        'must provide nocase setting to PathScurryBase ctor',\n      )\n    }\n    /* c8 ignore stop */\n    this.nocase = nocase\n    this.root = this.newRoot(this.#fs)\n    this.roots[this.rootPath] = this.root\n    let prev: PathBase = this.root\n    let len = split.length - 1\n    const joinSep = pathImpl.sep\n    let abs = this.rootPath\n    let sawFirst = false\n    for (const part of split) {\n      const l = len--\n      prev = prev.child(part, {\n        relative: new Array(l).fill('..').join(joinSep),\n        relativePosix: new Array(l).fill('..').join('/'),\n        fullpath: (abs += (sawFirst ? '' : joinSep) + part),\n      })\n      sawFirst = true\n    }\n    this.cwd = prev\n  }\n\n  /**\n   * Get the depth of a provided path, string, or the cwd\n   */\n  depth(path: Path | string = this.cwd): number {\n    if (typeof path === 'string') {\n      path = this.cwd.resolve(path)\n    }\n    return path.depth()\n  }\n\n  /**\n   * Parse the root portion of a path string\n   *\n   * @internal\n   */\n  abstract parseRootPath(dir: string): string\n  /**\n   * create a new Path to use as root during construction.\n   *\n   * @internal\n   */\n  abstract newRoot(fs: FSValue): PathBase\n  /**\n   * Determine whether a given path string is absolute\n   */\n  abstract isAbsolute(p: string): boolean\n\n  /**\n   * Return the cache of child entries.  Exposed so subclasses can create\n   * child Path objects in a platform-specific way.\n   *\n   * @internal\n   */\n  childrenCache() {\n    return this.#children\n  }\n\n  /**\n   * Resolve one or more path strings to a resolved string\n   *\n   * Same interface as require('path').resolve.\n   *\n   * Much faster than path.resolve() when called multiple times for the same\n   * path, because the resolved Path objects are cached.  Much slower\n   * otherwise.\n   */\n  resolve(...paths: string[]): string {\n    // first figure out the minimum number of paths we have to test\n    // we always start at cwd, but any absolutes will bump the start\n    let r = ''\n    for (let i = paths.length - 1; i >= 0; i--) {\n      const p = paths[i]\n      if (!p || p === '.') continue\n      r = r ? `${p}/${r}` : p\n      if (this.isAbsolute(p)) {\n        break\n      }\n    }\n    const cached = this.#resolveCache.get(r)\n    if (cached !== undefined) {\n      return cached\n    }\n    const result = this.cwd.resolve(r).fullpath()\n    this.#resolveCache.set(r, result)\n    return result\n  }\n\n  /**\n   * Resolve one or more path strings to a resolved string, returning\n   * the posix path.  Identical to .resolve() on posix systems, but on\n   * windows will return a forward-slash separated UNC path.\n   *\n   * Same interface as require('path').resolve.\n   *\n   * Much faster than path.resolve() when called multiple times for the same\n   * path, because the resolved Path objects are cached.  Much slower\n   * otherwise.\n   */\n  resolvePosix(...paths: string[]): string {\n    // first figure out the minimum number of paths we have to test\n    // we always start at cwd, but any absolutes will bump the start\n    let r = ''\n    for (let i = paths.length - 1; i >= 0; i--) {\n      const p = paths[i]\n      if (!p || p === '.') continue\n      r = r ? `${p}/${r}` : p\n      if (this.isAbsolute(p)) {\n        break\n      }\n    }\n    const cached = this.#resolvePosixCache.get(r)\n    if (cached !== undefined) {\n      return cached\n    }\n    const result = this.cwd.resolve(r).fullpathPosix()\n    this.#resolvePosixCache.set(r, result)\n    return result\n  }\n\n  /**\n   * find the relative path from the cwd to the supplied path string or entry\n   */\n  relative(entry: PathBase | string = this.cwd): string {\n    if (typeof entry === 'string') {\n      entry = this.cwd.resolve(entry)\n    }\n    return entry.relative()\n  }\n\n  /**\n   * find the relative path from the cwd to the supplied path string or\n   * entry, using / as the path delimiter, even on Windows.\n   */\n  relativePosix(entry: PathBase | string = this.cwd): string {\n    if (typeof entry === 'string') {\n      entry = this.cwd.resolve(entry)\n    }\n    return entry.relativePosix()\n  }\n\n  /**\n   * Return the basename for the provided string or Path object\n   */\n  basename(entry: PathBase | string = this.cwd): string {\n    if (typeof entry === 'string') {\n      entry = this.cwd.resolve(entry)\n    }\n    return entry.name\n  }\n\n  /**\n   * Return the dirname for the provided string or Path object\n   */\n  dirname(entry: PathBase | string = this.cwd): string {\n    if (typeof entry === 'string') {\n      entry = this.cwd.resolve(entry)\n    }\n    return (entry.parent || entry).fullpath()\n  }\n\n  /**\n   * Return an array of known child entries.\n   *\n   * First argument may be either a string, or a Path object.\n   *\n   * If the Path cannot or does not contain any children, then an empty array\n   * is returned.\n   *\n   * Results are cached, and thus may be out of date if the filesystem is\n   * mutated.\n   *\n   * Unlike `fs.readdir()`, the `withFileTypes` option defaults to `true`. Set\n   * `{ withFileTypes: false }` to return strings.\n   */\n\n  readdir(): Promise\n  readdir(opts: { withFileTypes: true }): Promise\n  readdir(opts: { withFileTypes: false }): Promise\n  readdir(opts: { withFileTypes: boolean }): Promise\n  readdir(entry: PathBase | string): Promise\n  readdir(\n    entry: PathBase | string,\n    opts: { withFileTypes: true },\n  ): Promise\n  readdir(\n    entry: PathBase | string,\n    opts: { withFileTypes: false },\n  ): Promise\n  readdir(\n    entry: PathBase | string,\n    opts: { withFileTypes: boolean },\n  ): Promise\n  async readdir(\n    entry: PathBase | string | { withFileTypes: boolean } = this.cwd,\n    opts: { withFileTypes: boolean } = {\n      withFileTypes: true,\n    },\n  ): Promise {\n    if (typeof entry === 'string') {\n      entry = this.cwd.resolve(entry)\n    } else if (!(entry instanceof PathBase)) {\n      opts = entry\n      entry = this.cwd\n    }\n    const { withFileTypes } = opts\n    if (!entry.canReaddir()) {\n      return []\n    } else {\n      const p = await entry.readdir()\n      return withFileTypes ? p : p.map(e => e.name)\n    }\n  }\n\n  /**\n   * synchronous {@link PathScurryBase.readdir}\n   */\n  readdirSync(): PathBase[]\n  readdirSync(opts: { withFileTypes: true }): PathBase[]\n  readdirSync(opts: { withFileTypes: false }): string[]\n  readdirSync(opts: { withFileTypes: boolean }): PathBase[] | string[]\n  readdirSync(entry: PathBase | string): PathBase[]\n  readdirSync(\n    entry: PathBase | string,\n    opts: { withFileTypes: true },\n  ): PathBase[]\n  readdirSync(\n    entry: PathBase | string,\n    opts: { withFileTypes: false },\n  ): string[]\n  readdirSync(\n    entry: PathBase | string,\n    opts: { withFileTypes: boolean },\n  ): PathBase[] | string[]\n  readdirSync(\n    entry: PathBase | string | { withFileTypes: boolean } = this.cwd,\n    opts: { withFileTypes: boolean } = {\n      withFileTypes: true,\n    },\n  ): PathBase[] | string[] {\n    if (typeof entry === 'string') {\n      entry = this.cwd.resolve(entry)\n    } else if (!(entry instanceof PathBase)) {\n      opts = entry\n      entry = this.cwd\n    }\n    const { withFileTypes = true } = opts\n    if (!entry.canReaddir()) {\n      return []\n    } else if (withFileTypes) {\n      return entry.readdirSync()\n    } else {\n      return entry.readdirSync().map(e => e.name)\n    }\n  }\n\n  /**\n   * Call lstat() on the string or Path object, and update all known\n   * information that can be determined.\n   *\n   * Note that unlike `fs.lstat()`, the returned value does not contain some\n   * information, such as `mode`, `dev`, `nlink`, and `ino`.  If that\n   * information is required, you will need to call `fs.lstat` yourself.\n   *\n   * If the Path refers to a nonexistent file, or if the lstat call fails for\n   * any reason, `undefined` is returned.  Otherwise the updated Path object is\n   * returned.\n   *\n   * Results are cached, and thus may be out of date if the filesystem is\n   * mutated.\n   */\n  async lstat(\n    entry: string | PathBase = this.cwd,\n  ): Promise {\n    if (typeof entry === 'string') {\n      entry = this.cwd.resolve(entry)\n    }\n    return entry.lstat()\n  }\n\n  /**\n   * synchronous {@link PathScurryBase.lstat}\n   */\n  lstatSync(entry: string | PathBase = this.cwd): PathBase | undefined {\n    if (typeof entry === 'string') {\n      entry = this.cwd.resolve(entry)\n    }\n    return entry.lstatSync()\n  }\n\n  /**\n   * Return the Path object or string path corresponding to the target of a\n   * symbolic link.\n   *\n   * If the path is not a symbolic link, or if the readlink call fails for any\n   * reason, `undefined` is returned.\n   *\n   * Result is cached, and thus may be outdated if the filesystem is mutated.\n   *\n   * `{withFileTypes}` option defaults to `false`.\n   *\n   * On success, returns a Path object if `withFileTypes` option is true,\n   * otherwise a string.\n   */\n  readlink(): Promise\n  readlink(opt: { withFileTypes: false }): Promise\n  readlink(opt: { withFileTypes: true }): Promise\n  readlink(opt: {\n    withFileTypes: boolean\n  }): Promise\n  readlink(\n    entry: string | PathBase,\n    opt?: { withFileTypes: false },\n  ): Promise\n  readlink(\n    entry: string | PathBase,\n    opt: { withFileTypes: true },\n  ): Promise\n  readlink(\n    entry: string | PathBase,\n    opt: { withFileTypes: boolean },\n  ): Promise\n  async readlink(\n    entry: string | PathBase | { withFileTypes: boolean } = this.cwd,\n    { withFileTypes }: { withFileTypes: boolean } = {\n      withFileTypes: false,\n    },\n  ): Promise {\n    if (typeof entry === 'string') {\n      entry = this.cwd.resolve(entry)\n    } else if (!(entry instanceof PathBase)) {\n      withFileTypes = entry.withFileTypes\n      entry = this.cwd\n    }\n    const e = await entry.readlink()\n    return withFileTypes ? e : e?.fullpath()\n  }\n\n  /**\n   * synchronous {@link PathScurryBase.readlink}\n   */\n  readlinkSync(): string | undefined\n  readlinkSync(opt: { withFileTypes: false }): string | undefined\n  readlinkSync(opt: { withFileTypes: true }): PathBase | undefined\n  readlinkSync(opt: {\n    withFileTypes: boolean\n  }): PathBase | string | undefined\n  readlinkSync(\n    entry: string | PathBase,\n    opt?: { withFileTypes: false },\n  ): string | undefined\n  readlinkSync(\n    entry: string | PathBase,\n    opt: { withFileTypes: true },\n  ): PathBase | undefined\n  readlinkSync(\n    entry: string | PathBase,\n    opt: { withFileTypes: boolean },\n  ): string | PathBase | undefined\n  readlinkSync(\n    entry: string | PathBase | { withFileTypes: boolean } = this.cwd,\n    { withFileTypes }: { withFileTypes: boolean } = {\n      withFileTypes: false,\n    },\n  ): string | PathBase | undefined {\n    if (typeof entry === 'string') {\n      entry = this.cwd.resolve(entry)\n    } else if (!(entry instanceof PathBase)) {\n      withFileTypes = entry.withFileTypes\n      entry = this.cwd\n    }\n    const e = entry.readlinkSync()\n    return withFileTypes ? e : e?.fullpath()\n  }\n\n  /**\n   * Return the Path object or string path corresponding to path as resolved\n   * by realpath(3).\n   *\n   * If the realpath call fails for any reason, `undefined` is returned.\n   *\n   * Result is cached, and thus may be outdated if the filesystem is mutated.\n   *\n   * `{withFileTypes}` option defaults to `false`.\n   *\n   * On success, returns a Path object if `withFileTypes` option is true,\n   * otherwise a string.\n   */\n  realpath(): Promise\n  realpath(opt: { withFileTypes: false }): Promise\n  realpath(opt: { withFileTypes: true }): Promise\n  realpath(opt: {\n    withFileTypes: boolean\n  }): Promise\n  realpath(\n    entry: string | PathBase,\n    opt?: { withFileTypes: false },\n  ): Promise\n  realpath(\n    entry: string | PathBase,\n    opt: { withFileTypes: true },\n  ): Promise\n  realpath(\n    entry: string | PathBase,\n    opt: { withFileTypes: boolean },\n  ): Promise\n  async realpath(\n    entry: string | PathBase | { withFileTypes: boolean } = this.cwd,\n    { withFileTypes }: { withFileTypes: boolean } = {\n      withFileTypes: false,\n    },\n  ): Promise {\n    if (typeof entry === 'string') {\n      entry = this.cwd.resolve(entry)\n    } else if (!(entry instanceof PathBase)) {\n      withFileTypes = entry.withFileTypes\n      entry = this.cwd\n    }\n    const e = await entry.realpath()\n    return withFileTypes ? e : e?.fullpath()\n  }\n\n  realpathSync(): string | undefined\n  realpathSync(opt: { withFileTypes: false }): string | undefined\n  realpathSync(opt: { withFileTypes: true }): PathBase | undefined\n  realpathSync(opt: {\n    withFileTypes: boolean\n  }): PathBase | string | undefined\n  realpathSync(\n    entry: string | PathBase,\n    opt?: { withFileTypes: false },\n  ): string | undefined\n  realpathSync(\n    entry: string | PathBase,\n    opt: { withFileTypes: true },\n  ): PathBase | undefined\n  realpathSync(\n    entry: string | PathBase,\n    opt: { withFileTypes: boolean },\n  ): string | PathBase | undefined\n  realpathSync(\n    entry: string | PathBase | { withFileTypes: boolean } = this.cwd,\n    { withFileTypes }: { withFileTypes: boolean } = {\n      withFileTypes: false,\n    },\n  ): string | PathBase | undefined {\n    if (typeof entry === 'string') {\n      entry = this.cwd.resolve(entry)\n    } else if (!(entry instanceof PathBase)) {\n      withFileTypes = entry.withFileTypes\n      entry = this.cwd\n    }\n    const e = entry.realpathSync()\n    return withFileTypes ? e : e?.fullpath()\n  }\n\n  /**\n   * Asynchronously walk the directory tree, returning an array of\n   * all path strings or Path objects found.\n   *\n   * Note that this will be extremely memory-hungry on large filesystems.\n   * In such cases, it may be better to use the stream or async iterator\n   * walk implementation.\n   */\n  walk(): Promise\n  walk(\n    opts: WalkOptionsWithFileTypesTrue | WalkOptionsWithFileTypesUnset,\n  ): Promise\n  walk(opts: WalkOptionsWithFileTypesFalse): Promise\n  walk(opts: WalkOptions): Promise\n  walk(entry: string | PathBase): Promise\n  walk(\n    entry: string | PathBase,\n    opts: WalkOptionsWithFileTypesTrue | WalkOptionsWithFileTypesUnset,\n  ): Promise\n  walk(\n    entry: string | PathBase,\n    opts: WalkOptionsWithFileTypesFalse,\n  ): Promise\n  walk(\n    entry: string | PathBase,\n    opts: WalkOptions,\n  ): Promise\n  async walk(\n    entry: string | PathBase | WalkOptions = this.cwd,\n    opts: WalkOptions = {},\n  ): Promise {\n    if (typeof entry === 'string') {\n      entry = this.cwd.resolve(entry)\n    } else if (!(entry instanceof PathBase)) {\n      opts = entry\n      entry = this.cwd\n    }\n    const {\n      withFileTypes = true,\n      follow = false,\n      filter,\n      walkFilter,\n    } = opts\n    const results: (string | PathBase)[] = []\n    if (!filter || filter(entry)) {\n      results.push(withFileTypes ? entry : entry.fullpath())\n    }\n    const dirs = new Set()\n    const walk = (\n      dir: PathBase,\n      cb: (er?: NodeJS.ErrnoException) => void,\n    ) => {\n      dirs.add(dir)\n      dir.readdirCB((er, entries) => {\n        /* c8 ignore start */\n        if (er) {\n          return cb(er)\n        }\n        /* c8 ignore stop */\n        let len = entries.length\n        if (!len) return cb()\n        const next = () => {\n          if (--len === 0) {\n            cb()\n          }\n        }\n        for (const e of entries) {\n          if (!filter || filter(e)) {\n            results.push(withFileTypes ? e : e.fullpath())\n          }\n          if (follow && e.isSymbolicLink()) {\n            e.realpath()\n              .then(r => (r?.isUnknown() ? r.lstat() : r))\n              .then(r =>\n                r?.shouldWalk(dirs, walkFilter) ? walk(r, next) : next(),\n              )\n          } else {\n            if (e.shouldWalk(dirs, walkFilter)) {\n              walk(e, next)\n            } else {\n              next()\n            }\n          }\n        }\n      }, true) // zalgooooooo\n    }\n\n    const start = entry\n    return new Promise((res, rej) => {\n      walk(start, er => {\n        /* c8 ignore start */\n        if (er) return rej(er)\n        /* c8 ignore stop */\n        res(results as PathBase[] | string[])\n      })\n    })\n  }\n\n  /**\n   * Synchronously walk the directory tree, returning an array of\n   * all path strings or Path objects found.\n   *\n   * Note that this will be extremely memory-hungry on large filesystems.\n   * In such cases, it may be better to use the stream or async iterator\n   * walk implementation.\n   */\n  walkSync(): PathBase[]\n  walkSync(\n    opts: WalkOptionsWithFileTypesTrue | WalkOptionsWithFileTypesUnset,\n  ): PathBase[]\n  walkSync(opts: WalkOptionsWithFileTypesFalse): string[]\n  walkSync(opts: WalkOptions): string[] | PathBase[]\n  walkSync(entry: string | PathBase): PathBase[]\n  walkSync(\n    entry: string | PathBase,\n    opts: WalkOptionsWithFileTypesUnset | WalkOptionsWithFileTypesTrue,\n  ): PathBase[]\n  walkSync(\n    entry: string | PathBase,\n    opts: WalkOptionsWithFileTypesFalse,\n  ): string[]\n  walkSync(\n    entry: string | PathBase,\n    opts: WalkOptions,\n  ): PathBase[] | string[]\n  walkSync(\n    entry: string | PathBase | WalkOptions = this.cwd,\n    opts: WalkOptions = {},\n  ): PathBase[] | string[] {\n    if (typeof entry === 'string') {\n      entry = this.cwd.resolve(entry)\n    } else if (!(entry instanceof PathBase)) {\n      opts = entry\n      entry = this.cwd\n    }\n    const {\n      withFileTypes = true,\n      follow = false,\n      filter,\n      walkFilter,\n    } = opts\n    const results: (string | PathBase)[] = []\n    if (!filter || filter(entry)) {\n      results.push(withFileTypes ? entry : entry.fullpath())\n    }\n    const dirs = new Set([entry])\n    for (const dir of dirs) {\n      const entries = dir.readdirSync()\n      for (const e of entries) {\n        if (!filter || filter(e)) {\n          results.push(withFileTypes ? e : e.fullpath())\n        }\n        let r: PathBase | undefined = e\n        if (e.isSymbolicLink()) {\n          if (!(follow && (r = e.realpathSync()))) continue\n          if (r.isUnknown()) r.lstatSync()\n        }\n        if (r.shouldWalk(dirs, walkFilter)) {\n          dirs.add(r)\n        }\n      }\n    }\n    return results as string[] | PathBase[]\n  }\n\n  /**\n   * Support for `for await`\n   *\n   * Alias for {@link PathScurryBase.iterate}\n   *\n   * Note: As of Node 19, this is very slow, compared to other methods of\n   * walking.  Consider using {@link PathScurryBase.stream} if memory overhead\n   * and backpressure are concerns, or {@link PathScurryBase.walk} if not.\n   */\n  [Symbol.asyncIterator]() {\n    return this.iterate()\n  }\n\n  /**\n   * Async generator form of {@link PathScurryBase.walk}\n   *\n   * Note: As of Node 19, this is very slow, compared to other methods of\n   * walking, especially if most/all of the directory tree has been previously\n   * walked.  Consider using {@link PathScurryBase.stream} if memory overhead\n   * and backpressure are concerns, or {@link PathScurryBase.walk} if not.\n   */\n  iterate(): AsyncGenerator\n  iterate(\n    opts: WalkOptionsWithFileTypesTrue | WalkOptionsWithFileTypesUnset,\n  ): AsyncGenerator\n  iterate(\n    opts: WalkOptionsWithFileTypesFalse,\n  ): AsyncGenerator\n  iterate(opts: WalkOptions): AsyncGenerator\n  iterate(entry: string | PathBase): AsyncGenerator\n  iterate(\n    entry: string | PathBase,\n    opts: WalkOptionsWithFileTypesTrue | WalkOptionsWithFileTypesUnset,\n  ): AsyncGenerator\n  iterate(\n    entry: string | PathBase,\n    opts: WalkOptionsWithFileTypesFalse,\n  ): AsyncGenerator\n  iterate(\n    entry: string | PathBase,\n    opts: WalkOptions,\n  ): AsyncGenerator\n  iterate(\n    entry: string | PathBase | WalkOptions = this.cwd,\n    options: WalkOptions = {},\n  ): AsyncGenerator {\n    // iterating async over the stream is significantly more performant,\n    // especially in the warm-cache scenario, because it buffers up directory\n    // entries in the background instead of waiting for a yield for each one.\n    if (typeof entry === 'string') {\n      entry = this.cwd.resolve(entry)\n    } else if (!(entry instanceof PathBase)) {\n      options = entry\n      entry = this.cwd\n    }\n    return this.stream(entry, options)[Symbol.asyncIterator]()\n  }\n\n  /**\n   * Iterating over a PathScurry performs a synchronous walk.\n   *\n   * Alias for {@link PathScurryBase.iterateSync}\n   */\n  [Symbol.iterator]() {\n    return this.iterateSync()\n  }\n\n  iterateSync(): Generator\n  iterateSync(\n    opts: WalkOptionsWithFileTypesTrue | WalkOptionsWithFileTypesUnset,\n  ): Generator\n  iterateSync(\n    opts: WalkOptionsWithFileTypesFalse,\n  ): Generator\n  iterateSync(opts: WalkOptions): Generator\n  iterateSync(entry: string | PathBase): Generator\n  iterateSync(\n    entry: string | PathBase,\n    opts: WalkOptionsWithFileTypesTrue | WalkOptionsWithFileTypesUnset,\n  ): Generator\n  iterateSync(\n    entry: string | PathBase,\n    opts: WalkOptionsWithFileTypesFalse,\n  ): Generator\n  iterateSync(\n    entry: string | PathBase,\n    opts: WalkOptions,\n  ): Generator\n  *iterateSync(\n    entry: string | PathBase | WalkOptions = this.cwd,\n    opts: WalkOptions = {},\n  ): Generator {\n    if (typeof entry === 'string') {\n      entry = this.cwd.resolve(entry)\n    } else if (!(entry instanceof PathBase)) {\n      opts = entry\n      entry = this.cwd\n    }\n    const {\n      withFileTypes = true,\n      follow = false,\n      filter,\n      walkFilter,\n    } = opts\n    if (!filter || filter(entry)) {\n      yield withFileTypes ? entry : entry.fullpath()\n    }\n    const dirs = new Set([entry])\n    for (const dir of dirs) {\n      const entries = dir.readdirSync()\n      for (const e of entries) {\n        if (!filter || filter(e)) {\n          yield withFileTypes ? e : e.fullpath()\n        }\n        let r: PathBase | undefined = e\n        if (e.isSymbolicLink()) {\n          if (!(follow && (r = e.realpathSync()))) continue\n          if (r.isUnknown()) r.lstatSync()\n        }\n        if (r.shouldWalk(dirs, walkFilter)) {\n          dirs.add(r)\n        }\n      }\n    }\n  }\n\n  /**\n   * Stream form of {@link PathScurryBase.walk}\n   *\n   * Returns a Minipass stream that emits {@link PathBase} objects by default,\n   * or strings if `{ withFileTypes: false }` is set in the options.\n   */\n  stream(): Minipass\n  stream(\n    opts: WalkOptionsWithFileTypesTrue | WalkOptionsWithFileTypesUnset,\n  ): Minipass\n  stream(opts: WalkOptionsWithFileTypesFalse): Minipass\n  stream(opts: WalkOptions): Minipass\n  stream(entry: string | PathBase): Minipass\n  stream(\n    entry: string | PathBase,\n    opts: WalkOptionsWithFileTypesUnset | WalkOptionsWithFileTypesTrue,\n  ): Minipass\n  stream(\n    entry: string | PathBase,\n    opts: WalkOptionsWithFileTypesFalse,\n  ): Minipass\n  stream(\n    entry: string | PathBase,\n    opts: WalkOptions,\n  ): Minipass | Minipass\n  stream(\n    entry: string | PathBase | WalkOptions = this.cwd,\n    opts: WalkOptions = {},\n  ): Minipass | Minipass {\n    if (typeof entry === 'string') {\n      entry = this.cwd.resolve(entry)\n    } else if (!(entry instanceof PathBase)) {\n      opts = entry\n      entry = this.cwd\n    }\n    const {\n      withFileTypes = true,\n      follow = false,\n      filter,\n      walkFilter,\n    } = opts\n    const results = new Minipass({ objectMode: true })\n    if (!filter || filter(entry)) {\n      results.write(withFileTypes ? entry : entry.fullpath())\n    }\n    const dirs = new Set()\n    const queue: PathBase[] = [entry]\n    let processing = 0\n    const process = () => {\n      let paused = false\n      while (!paused) {\n        const dir = queue.shift()\n        if (!dir) {\n          if (processing === 0) results.end()\n          return\n        }\n\n        processing++\n        dirs.add(dir)\n\n        const onReaddir = (\n          er: null | NodeJS.ErrnoException,\n          entries: PathBase[],\n          didRealpaths: boolean = false,\n        ) => {\n          /* c8 ignore start */\n          if (er) return results.emit('error', er)\n          /* c8 ignore stop */\n          if (follow && !didRealpaths) {\n            const promises: Promise[] = []\n            for (const e of entries) {\n              if (e.isSymbolicLink()) {\n                promises.push(\n                  e\n                    .realpath()\n                    .then((r: PathBase | undefined) =>\n                      r?.isUnknown() ? r.lstat() : r,\n                    ),\n                )\n              }\n            }\n            if (promises.length) {\n              Promise.all(promises).then(() =>\n                onReaddir(null, entries, true),\n              )\n              return\n            }\n          }\n\n          for (const e of entries) {\n            if (e && (!filter || filter(e))) {\n              if (!results.write(withFileTypes ? e : e.fullpath())) {\n                paused = true\n              }\n            }\n          }\n\n          processing--\n          for (const e of entries) {\n            const r = e.realpathCached() || e\n            if (r.shouldWalk(dirs, walkFilter)) {\n              queue.push(r)\n            }\n          }\n          if (paused && !results.flowing) {\n            results.once('drain', process)\n          } else if (!sync) {\n            process()\n          }\n        }\n\n        // zalgo containment\n        let sync = true\n        dir.readdirCB(onReaddir, true)\n        sync = false\n      }\n    }\n    process()\n    return results as Minipass | Minipass\n  }\n\n  /**\n   * Synchronous form of {@link PathScurryBase.stream}\n   *\n   * Returns a Minipass stream that emits {@link PathBase} objects by default,\n   * or strings if `{ withFileTypes: false }` is set in the options.\n   *\n   * Will complete the walk in a single tick if the stream is consumed fully.\n   * Otherwise, will pause as needed for stream backpressure.\n   */\n  streamSync(): Minipass\n  streamSync(\n    opts: WalkOptionsWithFileTypesTrue | WalkOptionsWithFileTypesUnset,\n  ): Minipass\n  streamSync(opts: WalkOptionsWithFileTypesFalse): Minipass\n  streamSync(opts: WalkOptions): Minipass\n  streamSync(entry: string | PathBase): Minipass\n  streamSync(\n    entry: string | PathBase,\n    opts: WalkOptionsWithFileTypesUnset | WalkOptionsWithFileTypesTrue,\n  ): Minipass\n  streamSync(\n    entry: string | PathBase,\n    opts: WalkOptionsWithFileTypesFalse,\n  ): Minipass\n  streamSync(\n    entry: string | PathBase,\n    opts: WalkOptions,\n  ): Minipass | Minipass\n  streamSync(\n    entry: string | PathBase | WalkOptions = this.cwd,\n    opts: WalkOptions = {},\n  ): Minipass | Minipass {\n    if (typeof entry === 'string') {\n      entry = this.cwd.resolve(entry)\n    } else if (!(entry instanceof PathBase)) {\n      opts = entry\n      entry = this.cwd\n    }\n    const {\n      withFileTypes = true,\n      follow = false,\n      filter,\n      walkFilter,\n    } = opts\n    const results = new Minipass({ objectMode: true })\n    const dirs = new Set()\n    if (!filter || filter(entry)) {\n      results.write(withFileTypes ? entry : entry.fullpath())\n    }\n    const queue: PathBase[] = [entry]\n    let processing = 0\n    const process = () => {\n      let paused = false\n      while (!paused) {\n        const dir = queue.shift()\n        if (!dir) {\n          if (processing === 0) results.end()\n          return\n        }\n        processing++\n        dirs.add(dir)\n\n        const entries = dir.readdirSync()\n        for (const e of entries) {\n          if (!filter || filter(e)) {\n            if (!results.write(withFileTypes ? e : e.fullpath())) {\n              paused = true\n            }\n          }\n        }\n        processing--\n        for (const e of entries) {\n          let r: PathBase | undefined = e\n          if (e.isSymbolicLink()) {\n            if (!(follow && (r = e.realpathSync()))) continue\n            if (r.isUnknown()) r.lstatSync()\n          }\n          if (r.shouldWalk(dirs, walkFilter)) {\n            queue.push(r)\n          }\n        }\n      }\n      if (paused && !results.flowing) results.once('drain', process)\n    }\n    process()\n    return results as Minipass | Minipass\n  }\n\n  chdir(path: string | Path = this.cwd) {\n    const oldCwd = this.cwd\n    this.cwd = typeof path === 'string' ? this.cwd.resolve(path) : path\n    this.cwd[setAsCwd](oldCwd)\n  }\n}\n\n/**\n * Options provided to all walk methods.\n */\nexport interface WalkOptions {\n  /**\n   * Return results as {@link PathBase} objects rather than strings.\n   * When set to false, results are fully resolved paths, as returned by\n   * {@link PathBase.fullpath}.\n   * @default true\n   */\n  withFileTypes?: boolean\n\n  /**\n   *  Attempt to read directory entries from symbolic links. Otherwise, only\n   *  actual directories are traversed. Regardless of this setting, a given\n   *  target path will only ever be walked once, meaning that a symbolic link\n   *  to a previously traversed directory will never be followed.\n   *\n   *  Setting this imposes a slight performance penalty, because `readlink`\n   *  must be called on all symbolic links encountered, in order to avoid\n   *  infinite cycles.\n   * @default false\n   */\n  follow?: boolean\n\n  /**\n   * Only return entries where the provided function returns true.\n   *\n   * This will not prevent directories from being traversed, even if they do\n   * not pass the filter, though it will prevent directories themselves from\n   * being included in the result set.  See {@link walkFilter}\n   *\n   * Asynchronous functions are not supported here.\n   *\n   * By default, if no filter is provided, all entries and traversed\n   * directories are included.\n   */\n  filter?: (entry: PathBase) => boolean\n\n  /**\n   * Only traverse directories (and in the case of {@link follow} being set to\n   * true, symbolic links to directories) if the provided function returns\n   * true.\n   *\n   * This will not prevent directories from being included in the result set,\n   * even if they do not pass the supplied filter function.  See {@link filter}\n   * to do that.\n   *\n   * Asynchronous functions are not supported here.\n   */\n  walkFilter?: (entry: PathBase) => boolean\n}\n\nexport type WalkOptionsWithFileTypesUnset = WalkOptions & {\n  withFileTypes?: undefined\n}\nexport type WalkOptionsWithFileTypesTrue = WalkOptions & {\n  withFileTypes: true\n}\nexport type WalkOptionsWithFileTypesFalse = WalkOptions & {\n  withFileTypes: false\n}\n\n/**\n * Windows implementation of {@link PathScurryBase}\n *\n * Defaults to case insensitve, uses `'\\\\'` to generate path strings.  Uses\n * {@link PathWin32} for Path objects.\n */\nexport class PathScurryWin32 extends PathScurryBase {\n  /**\n   * separator for generating path strings\n   */\n  sep: '\\\\' = '\\\\'\n\n  constructor(\n    cwd: URL | string = process.cwd(),\n    opts: PathScurryOpts = {},\n  ) {\n    const { nocase = true } = opts\n    super(cwd, win32, '\\\\', { ...opts, nocase })\n    this.nocase = nocase\n    for (let p: PathBase | undefined = this.cwd; p; p = p.parent) {\n      p.nocase = this.nocase\n    }\n  }\n\n  /**\n   * @internal\n   */\n  parseRootPath(dir: string): string {\n    // if the path starts with a single separator, it's not a UNC, and we'll\n    // just get separator as the root, and driveFromUNC will return \\\n    // In that case, mount \\ on the root from the cwd.\n    return win32.parse(dir).root.toUpperCase()\n  }\n\n  /**\n   * @internal\n   */\n  newRoot(fs: FSValue) {\n    return new PathWin32(\n      this.rootPath,\n      IFDIR,\n      undefined,\n      this.roots,\n      this.nocase,\n      this.childrenCache(),\n      { fs },\n    )\n  }\n\n  /**\n   * Return true if the provided path string is an absolute path\n   */\n  isAbsolute(p: string): boolean {\n    return (\n      p.startsWith('/') || p.startsWith('\\\\') || /^[a-z]:(\\/|\\\\)/i.test(p)\n    )\n  }\n}\n\n/**\n * {@link PathScurryBase} implementation for all posix systems other than Darwin.\n *\n * Defaults to case-sensitive matching, uses `'/'` to generate path strings.\n *\n * Uses {@link PathPosix} for Path objects.\n */\nexport class PathScurryPosix extends PathScurryBase {\n  /**\n   * separator for generating path strings\n   */\n  sep: '/' = '/'\n  constructor(\n    cwd: URL | string = process.cwd(),\n    opts: PathScurryOpts = {},\n  ) {\n    const { nocase = false } = opts\n    super(cwd, posix, '/', { ...opts, nocase })\n    this.nocase = nocase\n  }\n\n  /**\n   * @internal\n   */\n  parseRootPath(_dir: string): string {\n    return '/'\n  }\n\n  /**\n   * @internal\n   */\n  newRoot(fs: FSValue) {\n    return new PathPosix(\n      this.rootPath,\n      IFDIR,\n      undefined,\n      this.roots,\n      this.nocase,\n      this.childrenCache(),\n      { fs },\n    )\n  }\n\n  /**\n   * Return true if the provided path string is an absolute path\n   */\n  isAbsolute(p: string): boolean {\n    return p.startsWith('/')\n  }\n}\n\n/**\n * {@link PathScurryBase} implementation for Darwin (macOS) systems.\n *\n * Defaults to case-insensitive matching, uses `'/'` for generating path\n * strings.\n *\n * Uses {@link PathPosix} for Path objects.\n */\nexport class PathScurryDarwin extends PathScurryPosix {\n  constructor(\n    cwd: URL | string = process.cwd(),\n    opts: PathScurryOpts = {},\n  ) {\n    const { nocase = true } = opts\n    super(cwd, { ...opts, nocase })\n  }\n}\n\n/**\n * Default {@link PathBase} implementation for the current platform.\n *\n * {@link PathWin32} on Windows systems, {@link PathPosix} on all others.\n */\nexport const Path = process.platform === 'win32' ? PathWin32 : PathPosix\nexport type Path = PathBase | InstanceType\n\n/**\n * Default {@link PathScurryBase} implementation for the current platform.\n *\n * {@link PathScurryWin32} on Windows systems, {@link PathScurryDarwin} on\n * Darwin (macOS) systems, {@link PathScurryPosix} on all others.\n */\nexport const PathScurry:\n  | typeof PathScurryWin32\n  | typeof PathScurryDarwin\n  | typeof PathScurryPosix =\n  process.platform === 'win32' ? PathScurryWin32\n  : process.platform === 'darwin' ? PathScurryDarwin\n  : PathScurryPosix\nexport type PathScurry = PathScurryBase | InstanceType\n"]}
              \ No newline at end of file
              diff --git a/node_modules/path-scurry/dist/esm/package.json b/node_modules/path-scurry/dist/esm/package.json
              deleted file mode 100644
              index 3dbc1ca5..00000000
              --- a/node_modules/path-scurry/dist/esm/package.json
              +++ /dev/null
              @@ -1,3 +0,0 @@
              -{
              -  "type": "module"
              -}
              diff --git a/node_modules/path-scurry/node_modules/lru-cache/LICENSE b/node_modules/path-scurry/node_modules/lru-cache/LICENSE
              deleted file mode 100644
              index f785757c..00000000
              --- a/node_modules/path-scurry/node_modules/lru-cache/LICENSE
              +++ /dev/null
              @@ -1,15 +0,0 @@
              -The ISC License
              -
              -Copyright (c) 2010-2023 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/path-scurry/node_modules/lru-cache/README.md b/node_modules/path-scurry/node_modules/lru-cache/README.md
              deleted file mode 100644
              index 931822f3..00000000
              --- a/node_modules/path-scurry/node_modules/lru-cache/README.md
              +++ /dev/null
              @@ -1,331 +0,0 @@
              -# lru-cache
              -
              -A cache object that deletes the least-recently-used items.
              -
              -Specify a max number of the most recently used items that you
              -want to keep, and this cache will keep that many of the most
              -recently accessed items.
              -
              -This is not primarily a TTL cache, and does not make strong TTL
              -guarantees. There is no preemptive pruning of expired items by
              -default, but you _may_ set a TTL on the cache or on a single
              -`set`. If you do so, it will treat expired items as missing, and
              -delete them when fetched. If you are more interested in TTL
              -caching than LRU caching, check out
              -[@isaacs/ttlcache](http://npm.im/@isaacs/ttlcache).
              -
              -As of version 7, this is one of the most performant LRU
              -implementations available in JavaScript, and supports a wide
              -diversity of use cases. However, note that using some of the
              -features will necessarily impact performance, by causing the
              -cache to have to do more work. See the "Performance" section
              -below.
              -
              -## Installation
              -
              -```bash
              -npm install lru-cache --save
              -```
              -
              -## Usage
              -
              -```js
              -// hybrid module, either works
              -import { LRUCache } from 'lru-cache'
              -// or:
              -const { LRUCache } = require('lru-cache')
              -// or in minified form for web browsers:
              -import { LRUCache } from 'http://unpkg.com/lru-cache@9/dist/mjs/index.min.mjs'
              -
              -// At least one of 'max', 'ttl', or 'maxSize' is required, to prevent
              -// unsafe unbounded storage.
              -//
              -// In most cases, it's best to specify a max for performance, so all
              -// the required memory allocation is done up-front.
              -//
              -// All the other options are optional, see the sections below for
              -// documentation on what each one does.  Most of them can be
              -// overridden for specific items in get()/set()
              -const options = {
              -  max: 500,
              -
              -  // for use with tracking overall storage size
              -  maxSize: 5000,
              -  sizeCalculation: (value, key) => {
              -    return 1
              -  },
              -
              -  // for use when you need to clean up something when objects
              -  // are evicted from the cache
              -  dispose: (value, key) => {
              -    freeFromMemoryOrWhatever(value)
              -  },
              -
              -  // how long to live in ms
              -  ttl: 1000 * 60 * 5,
              -
              -  // return stale items before removing from cache?
              -  allowStale: false,
              -
              -  updateAgeOnGet: false,
              -  updateAgeOnHas: false,
              -
              -  // async method to use for cache.fetch(), for
              -  // stale-while-revalidate type of behavior
              -  fetchMethod: async (
              -    key,
              -    staleValue,
              -    { options, signal, context }
              -  ) => {},
              -}
              -
              -const cache = new LRUCache(options)
              -
              -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.clear() // empty the cache
              -```
              -
              -If you put more stuff in the cache, then less recently used items
              -will fall out. That's what an LRU cache is.
              -
              -For full description of the API and all options, please see [the
              -LRUCache typedocs](https://isaacs.github.io/node-lru-cache/)
              -
              -## Storage Bounds Safety
              -
              -This implementation aims to be as flexible as possible, within
              -the limits of safe memory consumption and optimal performance.
              -
              -At initial object creation, storage is allocated for `max` items.
              -If `max` is set to zero, then some performance is lost, and item
              -count is unbounded. Either `maxSize` or `ttl` _must_ be set if
              -`max` is not specified.
              -
              -If `maxSize` is set, then this creates a safe limit on the
              -maximum storage consumed, but without the performance benefits of
              -pre-allocation. When `maxSize` is set, every item _must_ provide
              -a size, either via the `sizeCalculation` method provided to the
              -constructor, or via a `size` or `sizeCalculation` option provided
              -to `cache.set()`. The size of every item _must_ be a positive
              -integer.
              -
              -If neither `max` nor `maxSize` are set, then `ttl` tracking must
              -be enabled. Note that, even when tracking item `ttl`, items are
              -_not_ preemptively deleted when they become stale, unless
              -`ttlAutopurge` is enabled. Instead, they are only purged the
              -next time the key is requested. Thus, if `ttlAutopurge`, `max`,
              -and `maxSize` are all not set, then the cache will potentially
              -grow unbounded.
              -
              -In this case, a warning is printed to standard error. Future
              -versions may require the use of `ttlAutopurge` if `max` and
              -`maxSize` are not specified.
              -
              -If you truly wish to use a cache that is bound _only_ by TTL
              -expiration, consider using a `Map` object, and calling
              -`setTimeout` to delete entries when they expire. It will perform
              -much better than an LRU cache.
              -
              -Here is an implementation you may use, under the same
              -[license](./LICENSE) as this package:
              -
              -```js
              -// a storage-unbounded ttl cache that is not an lru-cache
              -const cache = {
              -  data: new Map(),
              -  timers: new Map(),
              -  set: (k, v, ttl) => {
              -    if (cache.timers.has(k)) {
              -      clearTimeout(cache.timers.get(k))
              -    }
              -    cache.timers.set(
              -      k,
              -      setTimeout(() => cache.delete(k), ttl)
              -    )
              -    cache.data.set(k, v)
              -  },
              -  get: k => cache.data.get(k),
              -  has: k => cache.data.has(k),
              -  delete: k => {
              -    if (cache.timers.has(k)) {
              -      clearTimeout(cache.timers.get(k))
              -    }
              -    cache.timers.delete(k)
              -    return cache.data.delete(k)
              -  },
              -  clear: () => {
              -    cache.data.clear()
              -    for (const v of cache.timers.values()) {
              -      clearTimeout(v)
              -    }
              -    cache.timers.clear()
              -  },
              -}
              -```
              -
              -If that isn't to your liking, check out
              -[@isaacs/ttlcache](http://npm.im/@isaacs/ttlcache).
              -
              -## Storing Undefined Values
              -
              -This cache never stores undefined values, as `undefined` is used
              -internally in a few places to indicate that a key is not in the
              -cache.
              -
              -You may call `cache.set(key, undefined)`, but this is just
              -an alias for `cache.delete(key)`. Note that this has the effect
              -that `cache.has(key)` will return _false_ after setting it to
              -undefined.
              -
              -```js
              -cache.set(myKey, undefined)
              -cache.has(myKey) // false!
              -```
              -
              -If you need to track `undefined` values, and still note that the
              -key is in the cache, an easy workaround is to use a sigil object
              -of your own.
              -
              -```js
              -import { LRUCache } from 'lru-cache'
              -const undefinedValue = Symbol('undefined')
              -const cache = new LRUCache(...)
              -const mySet = (key, value) =>
              -  cache.set(key, value === undefined ? undefinedValue : value)
              -const myGet = (key, value) => {
              -  const v = cache.get(key)
              -  return v === undefinedValue ? undefined : v
              -}
              -```
              -
              -## Performance
              -
              -As of January 2022, version 7 of this library is one of the most
              -performant LRU cache implementations in JavaScript.
              -
              -Benchmarks can be extremely difficult to get right. In
              -particular, the performance of set/get/delete operations on
              -objects will vary _wildly_ depending on the type of key used. V8
              -is highly optimized for objects with keys that are short strings,
              -especially integer numeric strings. Thus any benchmark which
              -tests _solely_ using numbers as keys will tend to find that an
              -object-based approach performs the best.
              -
              -Note that coercing _anything_ to strings to use as object keys is
              -unsafe, unless you can be 100% certain that no other type of
              -value will be used. For example:
              -
              -```js
              -const myCache = {}
              -const set = (k, v) => (myCache[k] = v)
              -const get = k => myCache[k]
              -
              -set({}, 'please hang onto this for me')
              -set('[object Object]', 'oopsie')
              -```
              -
              -Also beware of "Just So" stories regarding performance. Garbage
              -collection of large (especially: deep) object graphs can be
              -incredibly costly, with several "tipping points" where it
              -increases exponentially. As a result, putting that off until
              -later can make it much worse, and less predictable. If a library
              -performs well, but only in a scenario where the object graph is
              -kept shallow, then that won't help you if you are using large
              -objects as keys.
              -
              -In general, when attempting to use a library to improve
              -performance (such as a cache like this one), it's best to choose
              -an option that will perform well in the sorts of scenarios where
              -you'll actually use it.
              -
              -This library is optimized for repeated gets and minimizing
              -eviction time, since that is the expected need of a LRU. Set
              -operations are somewhat slower on average than a few other
              -options, in part because of that optimization. It is assumed
              -that you'll be caching some costly operation, ideally as rarely
              -as possible, so optimizing set over get would be unwise.
              -
              -If performance matters to you:
              -
              -1. If it's at all possible to use small integer values as keys,
              -   and you can guarantee that no other types of values will be
              -   used as keys, then do that, and use a cache such as
              -   [lru-fast](https://npmjs.com/package/lru-fast), or
              -   [mnemonist's
              -   LRUCache](https://yomguithereal.github.io/mnemonist/lru-cache)
              -   which uses an Object as its data store.
              -
              -2. Failing that, if at all possible, use short non-numeric
              -   strings (ie, less than 256 characters) as your keys, and use
              -   [mnemonist's
              -   LRUCache](https://yomguithereal.github.io/mnemonist/lru-cache).
              -
              -3. If the types of your keys will be anything else, especially
              -   long strings, strings that look like floats, objects, or some
              -   mix of types, or if you aren't sure, then this library will
              -   work well for you.
              -
              -   If you do not need the features that this library provides
              -   (like asynchronous fetching, a variety of TTL staleness
              -   options, and so on), then [mnemonist's
              -   LRUMap](https://yomguithereal.github.io/mnemonist/lru-map) is
              -   a very good option, and just slightly faster than this module
              -   (since it does considerably less).
              -
              -4. Do not use a `dispose` function, size tracking, or especially
              -   ttl behavior, unless absolutely needed. These features are
              -   convenient, and necessary in some use cases, and every attempt
              -   has been made to make the performance impact minimal, but it
              -   isn't nothing.
              -
              -## Breaking Changes in Version 7
              -
              -This library changed to a different algorithm and internal data
              -structure in version 7, yielding significantly better
              -performance, albeit with some subtle changes as a result.
              -
              -If you were relying on the internals of LRUCache in version 6 or
              -before, it probably will not work in version 7 and above.
              -
              -## Breaking Changes in Version 8
              -
              -- The `fetchContext` option was renamed to `context`, and may no
              -  longer be set on the cache instance itself.
              -- Rewritten in TypeScript, so pretty much all the types moved
              -  around a lot.
              -- The AbortController/AbortSignal polyfill was removed. For this
              -  reason, **Node version 16.14.0 or higher is now required**.
              -- Internal properties were moved to actual private class
              -  properties.
              -- Keys and values must not be `null` or `undefined`.
              -- Minified export available at `'lru-cache/min'`, for both CJS
              -  and MJS builds.
              -
              -## Breaking Changes in Version 9
              -
              -- Named export only, no default export.
              -- AbortController polyfill returned, albeit with a warning when
              -  used.
              -
              -## Breaking Changes in Version 10
              -
              -- `cache.fetch()` return type is now `Promise`
              -  instead of `Promise`. This is an irrelevant change
              -  practically speaking, but can require changes for TypeScript
              -  users.
              -
              -For more info, see the [change log](CHANGELOG.md).
              diff --git a/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/index.d.ts b/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/index.d.ts
              deleted file mode 100644
              index f59de760..00000000
              --- a/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/index.d.ts
              +++ /dev/null
              @@ -1,1277 +0,0 @@
              -/**
              - * @module LRUCache
              - */
              -declare const TYPE: unique symbol;
              -export type PosInt = number & {
              -    [TYPE]: 'Positive Integer';
              -};
              -export type Index = number & {
              -    [TYPE]: 'LRUCache Index';
              -};
              -export type UintArray = Uint8Array | Uint16Array | Uint32Array;
              -export type NumberArray = UintArray | number[];
              -declare class ZeroArray extends Array {
              -    constructor(size: number);
              -}
              -export type { ZeroArray };
              -export type { Stack };
              -export type StackLike = Stack | Index[];
              -declare class Stack {
              -    #private;
              -    heap: NumberArray;
              -    length: number;
              -    static create(max: number): StackLike;
              -    constructor(max: number, HeapCls: {
              -        new (n: number): NumberArray;
              -    });
              -    push(n: Index): void;
              -    pop(): Index;
              -}
              -/**
              - * Promise representing an in-progress {@link LRUCache#fetch} call
              - */
              -export type BackgroundFetch = Promise & {
              -    __returned: BackgroundFetch | undefined;
              -    __abortController: AbortController;
              -    __staleWhileFetching: V | undefined;
              -};
              -export type DisposeTask = [
              -    value: V,
              -    key: K,
              -    reason: LRUCache.DisposeReason
              -];
              -export declare namespace LRUCache {
              -    /**
              -     * An integer greater than 0, reflecting the calculated size of items
              -     */
              -    type Size = number;
              -    /**
              -     * Integer greater than 0, representing some number of milliseconds, or the
              -     * time at which a TTL started counting from.
              -     */
              -    type Milliseconds = number;
              -    /**
              -     * An integer greater than 0, reflecting a number of items
              -     */
              -    type Count = number;
              -    /**
              -     * The reason why an item was removed from the cache, passed
              -     * to the {@link Disposer} methods.
              -     *
              -     * - `evict`: The item was evicted because it is the least recently used,
              -     *   and the cache is full.
              -     * - `set`: A new value was set, overwriting the old value being disposed.
              -     * - `delete`: The item was explicitly deleted, either by calling
              -     *   {@link LRUCache#delete}, {@link LRUCache#clear}, or
              -     *   {@link LRUCache#set} with an undefined value.
              -     * - `expire`: The item was removed due to exceeding its TTL.
              -     * - `fetch`: A {@link OptionsBase#fetchMethod} operation returned
              -     *   `undefined` or was aborted, causing the item to be deleted.
              -     */
              -    type DisposeReason = 'evict' | 'set' | 'delete' | 'expire' | 'fetch';
              -    /**
              -     * A method called upon item removal, passed as the
              -     * {@link OptionsBase.dispose} and/or
              -     * {@link OptionsBase.disposeAfter} options.
              -     */
              -    type Disposer = (value: V, key: K, reason: DisposeReason) => void;
              -    /**
              -     * A function that returns the effective calculated size
              -     * of an entry in the cache.
              -     */
              -    type SizeCalculator = (value: V, key: K) => Size;
              -    /**
              -     * Options provided to the
              -     * {@link OptionsBase.fetchMethod} function.
              -     */
              -    interface FetcherOptions {
              -        signal: AbortSignal;
              -        options: FetcherFetchOptions;
              -        /**
              -         * Object provided in the {@link FetchOptions.context} option to
              -         * {@link LRUCache#fetch}
              -         */
              -        context: FC;
              -    }
              -    /**
              -     * Occasionally, it may be useful to track the internal behavior of the
              -     * cache, particularly for logging, debugging, or for behavior within the
              -     * `fetchMethod`. To do this, you can pass a `status` object to the
              -     * {@link LRUCache#fetch}, {@link LRUCache#get}, {@link LRUCache#set},
              -     * {@link LRUCache#memo}, and {@link LRUCache#has} methods.
              -     *
              -     * The `status` option should be a plain JavaScript object. The following
              -     * fields will be set on it appropriately, depending on the situation.
              -     */
              -    interface Status {
              -        /**
              -         * The status of a set() operation.
              -         *
              -         * - add: the item was not found in the cache, and was added
              -         * - update: the item was in the cache, with the same value provided
              -         * - replace: the item was in the cache, and replaced
              -         * - miss: the item was not added to the cache for some reason
              -         */
              -        set?: 'add' | 'update' | 'replace' | 'miss';
              -        /**
              -         * the ttl stored for the item, or undefined if ttls are not used.
              -         */
              -        ttl?: Milliseconds;
              -        /**
              -         * the start time for the item, or undefined if ttls are not used.
              -         */
              -        start?: Milliseconds;
              -        /**
              -         * The timestamp used for TTL calculation
              -         */
              -        now?: Milliseconds;
              -        /**
              -         * the remaining ttl for the item, or undefined if ttls are not used.
              -         */
              -        remainingTTL?: Milliseconds;
              -        /**
              -         * The calculated size for the item, if sizes are used.
              -         */
              -        entrySize?: Size;
              -        /**
              -         * The total calculated size of the cache, if sizes are used.
              -         */
              -        totalCalculatedSize?: Size;
              -        /**
              -         * A flag indicating that the item was not stored, due to exceeding the
              -         * {@link OptionsBase.maxEntrySize}
              -         */
              -        maxEntrySizeExceeded?: true;
              -        /**
              -         * The old value, specified in the case of `set:'update'` or
              -         * `set:'replace'`
              -         */
              -        oldValue?: V;
              -        /**
              -         * The results of a {@link LRUCache#has} operation
              -         *
              -         * - hit: the item was found in the cache
              -         * - stale: the item was found in the cache, but is stale
              -         * - miss: the item was not found in the cache
              -         */
              -        has?: 'hit' | 'stale' | 'miss';
              -        /**
              -         * The status of a {@link LRUCache#fetch} operation.
              -         * Note that this can change as the underlying fetch() moves through
              -         * various states.
              -         *
              -         * - inflight: there is another fetch() for this key which is in process
              -         * - get: there is no {@link OptionsBase.fetchMethod}, so
              -         *   {@link LRUCache#get} was called.
              -         * - miss: the item is not in cache, and will be fetched.
              -         * - hit: the item is in the cache, and was resolved immediately.
              -         * - stale: the item is in the cache, but stale.
              -         * - refresh: the item is in the cache, and not stale, but
              -         *   {@link FetchOptions.forceRefresh} was specified.
              -         */
              -        fetch?: 'get' | 'inflight' | 'miss' | 'hit' | 'stale' | 'refresh';
              -        /**
              -         * The {@link OptionsBase.fetchMethod} was called
              -         */
              -        fetchDispatched?: true;
              -        /**
              -         * The cached value was updated after a successful call to
              -         * {@link OptionsBase.fetchMethod}
              -         */
              -        fetchUpdated?: true;
              -        /**
              -         * The reason for a fetch() rejection.  Either the error raised by the
              -         * {@link OptionsBase.fetchMethod}, or the reason for an
              -         * AbortSignal.
              -         */
              -        fetchError?: Error;
              -        /**
              -         * The fetch received an abort signal
              -         */
              -        fetchAborted?: true;
              -        /**
              -         * The abort signal received was ignored, and the fetch was allowed to
              -         * continue.
              -         */
              -        fetchAbortIgnored?: true;
              -        /**
              -         * The fetchMethod promise resolved successfully
              -         */
              -        fetchResolved?: true;
              -        /**
              -         * The fetchMethod promise was rejected
              -         */
              -        fetchRejected?: true;
              -        /**
              -         * The status of a {@link LRUCache#get} operation.
              -         *
              -         * - fetching: The item is currently being fetched.  If a previous value
              -         *   is present and allowed, that will be returned.
              -         * - stale: The item is in the cache, and is stale.
              -         * - hit: the item is in the cache
              -         * - miss: the item is not in the cache
              -         */
              -        get?: 'stale' | 'hit' | 'miss';
              -        /**
              -         * A fetch or get operation returned a stale value.
              -         */
              -        returnedStale?: true;
              -    }
              -    /**
              -     * options which override the options set in the LRUCache constructor
              -     * when calling {@link LRUCache#fetch}.
              -     *
              -     * This is the union of {@link GetOptions} and {@link SetOptions}, plus
              -     * {@link OptionsBase.noDeleteOnFetchRejection},
              -     * {@link OptionsBase.allowStaleOnFetchRejection},
              -     * {@link FetchOptions.forceRefresh}, and
              -     * {@link FetcherOptions.context}
              -     *
              -     * Any of these may be modified in the {@link OptionsBase.fetchMethod}
              -     * function, but the {@link GetOptions} fields will of course have no
              -     * effect, as the {@link LRUCache#get} call already happened by the time
              -     * the fetchMethod is called.
              -     */
              -    interface FetcherFetchOptions extends Pick, 'allowStale' | 'updateAgeOnGet' | 'noDeleteOnStaleGet' | 'sizeCalculation' | 'ttl' | 'noDisposeOnSet' | 'noUpdateTTL' | 'noDeleteOnFetchRejection' | 'allowStaleOnFetchRejection' | 'ignoreFetchAbort' | 'allowStaleOnFetchAbort'> {
              -        status?: Status;
              -        size?: Size;
              -    }
              -    /**
              -     * Options that may be passed to the {@link LRUCache#fetch} method.
              -     */
              -    interface FetchOptions extends FetcherFetchOptions {
              -        /**
              -         * Set to true to force a re-load of the existing data, even if it
              -         * is not yet stale.
              -         */
              -        forceRefresh?: boolean;
              -        /**
              -         * Context provided to the {@link OptionsBase.fetchMethod} as
              -         * the {@link FetcherOptions.context} param.
              -         *
              -         * If the FC type is specified as unknown (the default),
              -         * undefined or void, then this is optional.  Otherwise, it will
              -         * be required.
              -         */
              -        context?: FC;
              -        signal?: AbortSignal;
              -        status?: Status;
              -    }
              -    /**
              -     * Options provided to {@link LRUCache#fetch} when the FC type is something
              -     * other than `unknown`, `undefined`, or `void`
              -     */
              -    interface FetchOptionsWithContext extends FetchOptions {
              -        context: FC;
              -    }
              -    /**
              -     * Options provided to {@link LRUCache#fetch} when the FC type is
              -     * `undefined` or `void`
              -     */
              -    interface FetchOptionsNoContext extends FetchOptions {
              -        context?: undefined;
              -    }
              -    interface MemoOptions extends Pick, 'allowStale' | 'updateAgeOnGet' | 'noDeleteOnStaleGet' | 'sizeCalculation' | 'ttl' | 'noDisposeOnSet' | 'noUpdateTTL' | 'noDeleteOnFetchRejection' | 'allowStaleOnFetchRejection' | 'ignoreFetchAbort' | 'allowStaleOnFetchAbort'> {
              -        /**
              -         * Set to true to force a re-load of the existing data, even if it
              -         * is not yet stale.
              -         */
              -        forceRefresh?: boolean;
              -        /**
              -         * Context provided to the {@link OptionsBase.memoMethod} as
              -         * the {@link MemoizerOptions.context} param.
              -         *
              -         * If the FC type is specified as unknown (the default),
              -         * undefined or void, then this is optional.  Otherwise, it will
              -         * be required.
              -         */
              -        context?: FC;
              -        status?: Status;
              -    }
              -    /**
              -     * Options provided to {@link LRUCache#memo} when the FC type is something
              -     * other than `unknown`, `undefined`, or `void`
              -     */
              -    interface MemoOptionsWithContext extends MemoOptions {
              -        context: FC;
              -    }
              -    /**
              -     * Options provided to {@link LRUCache#memo} when the FC type is
              -     * `undefined` or `void`
              -     */
              -    interface MemoOptionsNoContext extends MemoOptions {
              -        context?: undefined;
              -    }
              -    /**
              -     * Options provided to the
              -     * {@link OptionsBase.memoMethod} function.
              -     */
              -    interface MemoizerOptions {
              -        options: MemoizerMemoOptions;
              -        /**
              -         * Object provided in the {@link MemoOptions.context} option to
              -         * {@link LRUCache#memo}
              -         */
              -        context: FC;
              -    }
              -    /**
              -     * options which override the options set in the LRUCache constructor
              -     * when calling {@link LRUCache#memo}.
              -     *
              -     * This is the union of {@link GetOptions} and {@link SetOptions}, plus
              -     * {@link MemoOptions.forceRefresh}, and
              -     * {@link MemoerOptions.context}
              -     *
              -     * Any of these may be modified in the {@link OptionsBase.memoMethod}
              -     * function, but the {@link GetOptions} fields will of course have no
              -     * effect, as the {@link LRUCache#get} call already happened by the time
              -     * the memoMethod is called.
              -     */
              -    interface MemoizerMemoOptions extends Pick, 'allowStale' | 'updateAgeOnGet' | 'noDeleteOnStaleGet' | 'sizeCalculation' | 'ttl' | 'noDisposeOnSet' | 'noUpdateTTL'> {
              -        status?: Status;
              -        size?: Size;
              -        start?: Milliseconds;
              -    }
              -    /**
              -     * Options that may be passed to the {@link LRUCache#has} method.
              -     */
              -    interface HasOptions extends Pick, 'updateAgeOnHas'> {
              -        status?: Status;
              -    }
              -    /**
              -     * Options that may be passed to the {@link LRUCache#get} method.
              -     */
              -    interface GetOptions extends Pick, 'allowStale' | 'updateAgeOnGet' | 'noDeleteOnStaleGet'> {
              -        status?: Status;
              -    }
              -    /**
              -     * Options that may be passed to the {@link LRUCache#peek} method.
              -     */
              -    interface PeekOptions extends Pick, 'allowStale'> {
              -    }
              -    /**
              -     * Options that may be passed to the {@link LRUCache#set} method.
              -     */
              -    interface SetOptions extends Pick, 'sizeCalculation' | 'ttl' | 'noDisposeOnSet' | 'noUpdateTTL'> {
              -        /**
              -         * If size tracking is enabled, then setting an explicit size
              -         * in the {@link LRUCache#set} call will prevent calling the
              -         * {@link OptionsBase.sizeCalculation} function.
              -         */
              -        size?: Size;
              -        /**
              -         * If TTL tracking is enabled, then setting an explicit start
              -         * time in the {@link LRUCache#set} call will override the
              -         * default time from `performance.now()` or `Date.now()`.
              -         *
              -         * Note that it must be a valid value for whichever time-tracking
              -         * method is in use.
              -         */
              -        start?: Milliseconds;
              -        status?: Status;
              -    }
              -    /**
              -     * The type signature for the {@link OptionsBase.fetchMethod} option.
              -     */
              -    type Fetcher = (key: K, staleValue: V | undefined, options: FetcherOptions) => Promise | V | undefined | void;
              -    /**
              -     * the type signature for the {@link OptionsBase.memoMethod} option.
              -     */
              -    type Memoizer = (key: K, staleValue: V | undefined, options: MemoizerOptions) => V;
              -    /**
              -     * Options which may be passed to the {@link LRUCache} constructor.
              -     *
              -     * Most of these may be overridden in the various options that use
              -     * them.
              -     *
              -     * Despite all being technically optional, the constructor requires that
              -     * a cache is at minimum limited by one or more of {@link OptionsBase.max},
              -     * {@link OptionsBase.ttl}, or {@link OptionsBase.maxSize}.
              -     *
              -     * If {@link OptionsBase.ttl} is used alone, then it is strongly advised
              -     * (and in fact required by the type definitions here) that the cache
              -     * also set {@link OptionsBase.ttlAutopurge}, to prevent potentially
              -     * unbounded storage.
              -     *
              -     * All options are also available on the {@link LRUCache} instance, making
              -     * it safe to pass an LRUCache instance as the options argumemnt to
              -     * make another empty cache of the same type.
              -     *
              -     * Some options are marked as read-only, because changing them after
              -     * instantiation is not safe. Changing any of the other options will of
              -     * course only have an effect on subsequent method calls.
              -     */
              -    interface OptionsBase {
              -        /**
              -         * The maximum number of items to store in the cache before evicting
              -         * old entries. This is read-only on the {@link LRUCache} instance,
              -         * and may not be overridden.
              -         *
              -         * If set, then storage space will be pre-allocated at construction
              -         * time, and the cache will perform significantly faster.
              -         *
              -         * Note that significantly fewer items may be stored, if
              -         * {@link OptionsBase.maxSize} and/or {@link OptionsBase.ttl} are also
              -         * set.
              -         *
              -         * **It is strongly recommended to set a `max` to prevent unbounded growth
              -         * of the cache.**
              -         */
              -        max?: Count;
              -        /**
              -         * Max time in milliseconds for items to live in cache before they are
              -         * considered stale.  Note that stale items are NOT preemptively removed by
              -         * default, and MAY live in the cache, contributing to its LRU max, long
              -         * after they have expired, unless {@link OptionsBase.ttlAutopurge} is
              -         * set.
              -         *
              -         * If set to `0` (the default value), then that means "do not track
              -         * TTL", not "expire immediately".
              -         *
              -         * Also, as this cache is optimized for LRU/MRU operations, some of
              -         * the staleness/TTL checks will reduce performance, as they will incur
              -         * overhead by deleting items.
              -         *
              -         * This is not primarily a TTL cache, and does not make strong TTL
              -         * guarantees. There is no pre-emptive pruning of expired items, but you
              -         * _may_ set a TTL on the cache, and it will treat expired items as missing
              -         * when they are fetched, and delete them.
              -         *
              -         * Optional, but must be a non-negative integer in ms if specified.
              -         *
              -         * This may be overridden by passing an options object to `cache.set()`.
              -         *
              -         * At least one of `max`, `maxSize`, or `TTL` is required. This must be a
              -         * positive integer if set.
              -         *
              -         * Even if ttl tracking is enabled, **it is strongly recommended to set a
              -         * `max` to prevent unbounded growth of the cache.**
              -         *
              -         * If ttl tracking is enabled, and `max` and `maxSize` are not set,
              -         * and `ttlAutopurge` is not set, then a warning will be emitted
              -         * cautioning about the potential for unbounded memory consumption.
              -         * (The TypeScript definitions will also discourage this.)
              -         */
              -        ttl?: Milliseconds;
              -        /**
              -         * Minimum amount of time in ms in which to check for staleness.
              -         * Defaults to 1, which means that the current time is checked
              -         * at most once per millisecond.
              -         *
              -         * Set to 0 to check the current time every time staleness is tested.
              -         * (This reduces performance, and is theoretically unnecessary.)
              -         *
              -         * Setting this to a higher value will improve performance somewhat
              -         * while using ttl tracking, albeit at the expense of keeping stale
              -         * items around a bit longer than their TTLs would indicate.
              -         *
              -         * @default 1
              -         */
              -        ttlResolution?: Milliseconds;
              -        /**
              -         * Preemptively remove stale items from the cache.
              -         *
              -         * Note that this may *significantly* degrade performance, especially if
              -         * the cache is storing a large number of items. It is almost always best
              -         * to just leave the stale items in the cache, and let them fall out as new
              -         * items are added.
              -         *
              -         * Note that this means that {@link OptionsBase.allowStale} is a bit
              -         * pointless, as stale items will be deleted almost as soon as they
              -         * expire.
              -         *
              -         * Use with caution!
              -         */
              -        ttlAutopurge?: boolean;
              -        /**
              -         * When using time-expiring entries with `ttl`, setting this to `true` will
              -         * make each item's age reset to 0 whenever it is retrieved from cache with
              -         * {@link LRUCache#get}, causing it to not expire. (It can still fall out
              -         * of cache based on recency of use, of course.)
              -         *
              -         * Has no effect if {@link OptionsBase.ttl} is not set.
              -         *
              -         * This may be overridden by passing an options object to `cache.get()`.
              -         */
              -        updateAgeOnGet?: boolean;
              -        /**
              -         * When using time-expiring entries with `ttl`, setting this to `true` will
              -         * make each item's age reset to 0 whenever its presence in the cache is
              -         * checked with {@link LRUCache#has}, causing it to not expire. (It can
              -         * still fall out of cache based on recency of use, of course.)
              -         *
              -         * Has no effect if {@link OptionsBase.ttl} is not set.
              -         */
              -        updateAgeOnHas?: boolean;
              -        /**
              -         * Allow {@link LRUCache#get} and {@link LRUCache#fetch} calls to return
              -         * stale data, if available.
              -         *
              -         * By default, if you set `ttl`, stale items will only be deleted from the
              -         * cache when you `get(key)`. That is, it's not preemptively pruning items,
              -         * unless {@link OptionsBase.ttlAutopurge} is set.
              -         *
              -         * If you set `allowStale:true`, it'll return the stale value *as well as*
              -         * deleting it. If you don't set this, then it'll return `undefined` when
              -         * you try to get a stale entry.
              -         *
              -         * Note that when a stale entry is fetched, _even if it is returned due to
              -         * `allowStale` being set_, it is removed from the cache immediately. You
              -         * can suppress this behavior by setting
              -         * {@link OptionsBase.noDeleteOnStaleGet}, either in the constructor, or in
              -         * the options provided to {@link LRUCache#get}.
              -         *
              -         * This may be overridden by passing an options object to `cache.get()`.
              -         * The `cache.has()` method will always return `false` for stale items.
              -         *
              -         * Only relevant if a ttl is set.
              -         */
              -        allowStale?: boolean;
              -        /**
              -         * Function that is called on items when they are dropped from the
              -         * cache, as `dispose(value, key, reason)`.
              -         *
              -         * This can be handy if you want to close file descriptors or do
              -         * other cleanup tasks when items are no longer stored in the cache.
              -         *
              -         * **NOTE**: It is called _before_ the item has been fully removed
              -         * from the cache, so if you want to put it right back in, you need
              -         * to wait until the next tick. If you try to add it back in during
              -         * the `dispose()` function call, it will break things in subtle and
              -         * weird ways.
              -         *
              -         * Unlike several other options, this may _not_ be overridden by
              -         * passing an option to `set()`, for performance reasons.
              -         *
              -         * The `reason` will be one of the following strings, corresponding
              -         * to the reason for the item's deletion:
              -         *
              -         * - `evict` Item was evicted to make space for a new addition
              -         * - `set` Item was overwritten by a new value
              -         * - `expire` Item expired its TTL
              -         * - `fetch` Item was deleted due to a failed or aborted fetch, or a
              -         *   fetchMethod returning `undefined.
              -         * - `delete` Item was removed by explicit `cache.delete(key)`,
              -         *   `cache.clear()`, or `cache.set(key, undefined)`.
              -         */
              -        dispose?: Disposer;
              -        /**
              -         * The same as {@link OptionsBase.dispose}, but called *after* the entry
              -         * is completely removed and the cache is once again in a clean state.
              -         *
              -         * It is safe to add an item right back into the cache at this point.
              -         * However, note that it is *very* easy to inadvertently create infinite
              -         * recursion this way.
              -         */
              -        disposeAfter?: Disposer;
              -        /**
              -         * Set to true to suppress calling the
              -         * {@link OptionsBase.dispose} function if the entry key is
              -         * still accessible within the cache.
              -         *
              -         * This may be overridden by passing an options object to
              -         * {@link LRUCache#set}.
              -         *
              -         * Only relevant if `dispose` or `disposeAfter` are set.
              -         */
              -        noDisposeOnSet?: boolean;
              -        /**
              -         * Boolean flag to tell the cache to not update the TTL when setting a new
              -         * value for an existing key (ie, when updating a value rather than
              -         * inserting a new value).  Note that the TTL value is _always_ set (if
              -         * provided) when adding a new entry into the cache.
              -         *
              -         * Has no effect if a {@link OptionsBase.ttl} is not set.
              -         *
              -         * May be passed as an option to {@link LRUCache#set}.
              -         */
              -        noUpdateTTL?: boolean;
              -        /**
              -         * Set to a positive integer to track the sizes of items added to the
              -         * cache, and automatically evict items in order to stay below this size.
              -         * Note that this may result in fewer than `max` items being stored.
              -         *
              -         * Attempting to add an item to the cache whose calculated size is greater
              -         * that this amount will be a no-op. The item will not be cached, and no
              -         * other items will be evicted.
              -         *
              -         * Optional, must be a positive integer if provided.
              -         *
              -         * Sets `maxEntrySize` to the same value, unless a different value is
              -         * provided for `maxEntrySize`.
              -         *
              -         * At least one of `max`, `maxSize`, or `TTL` is required. This must be a
              -         * positive integer if set.
              -         *
              -         * Even if size tracking is enabled, **it is strongly recommended to set a
              -         * `max` to prevent unbounded growth of the cache.**
              -         *
              -         * Note also that size tracking can negatively impact performance,
              -         * though for most cases, only minimally.
              -         */
              -        maxSize?: Size;
              -        /**
              -         * The maximum allowed size for any single item in the cache.
              -         *
              -         * If a larger item is passed to {@link LRUCache#set} or returned by a
              -         * {@link OptionsBase.fetchMethod} or {@link OptionsBase.memoMethod}, then
              -         * it will not be stored in the cache.
              -         *
              -         * Attempting to add an item whose calculated size is greater than
              -         * this amount will not cache the item or evict any old items, but
              -         * WILL delete an existing value if one is already present.
              -         *
              -         * Optional, must be a positive integer if provided. Defaults to
              -         * the value of `maxSize` if provided.
              -         */
              -        maxEntrySize?: Size;
              -        /**
              -         * A function that returns a number indicating the item's size.
              -         *
              -         * Requires {@link OptionsBase.maxSize} to be set.
              -         *
              -         * If not provided, and {@link OptionsBase.maxSize} or
              -         * {@link OptionsBase.maxEntrySize} are set, then all
              -         * {@link LRUCache#set} calls **must** provide an explicit
              -         * {@link SetOptions.size} or sizeCalculation param.
              -         */
              -        sizeCalculation?: SizeCalculator;
              -        /**
              -         * Method that provides the implementation for {@link LRUCache#fetch}
              -         *
              -         * ```ts
              -         * fetchMethod(key, staleValue, { signal, options, context })
              -         * ```
              -         *
              -         * If `fetchMethod` is not provided, then `cache.fetch(key)` is equivalent
              -         * to `Promise.resolve(cache.get(key))`.
              -         *
              -         * If at any time, `signal.aborted` is set to `true`, or if the
              -         * `signal.onabort` method is called, or if it emits an `'abort'` event
              -         * which you can listen to with `addEventListener`, then that means that
              -         * the fetch should be abandoned. This may be passed along to async
              -         * functions aware of AbortController/AbortSignal behavior.
              -         *
              -         * The `fetchMethod` should **only** return `undefined` or a Promise
              -         * resolving to `undefined` if the AbortController signaled an `abort`
              -         * event. In all other cases, it should return or resolve to a value
              -         * suitable for adding to the cache.
              -         *
              -         * The `options` object is a union of the options that may be provided to
              -         * `set()` and `get()`. If they are modified, then that will result in
              -         * modifying the settings to `cache.set()` when the value is resolved, and
              -         * in the case of
              -         * {@link OptionsBase.noDeleteOnFetchRejection} and
              -         * {@link OptionsBase.allowStaleOnFetchRejection}, the handling of
              -         * `fetchMethod` failures.
              -         *
              -         * For example, a DNS cache may update the TTL based on the value returned
              -         * from a remote DNS server by changing `options.ttl` in the `fetchMethod`.
              -         */
              -        fetchMethod?: Fetcher;
              -        /**
              -         * Method that provides the implementation for {@link LRUCache#memo}
              -         */
              -        memoMethod?: Memoizer;
              -        /**
              -         * Set to true to suppress the deletion of stale data when a
              -         * {@link OptionsBase.fetchMethod} returns a rejected promise.
              -         */
              -        noDeleteOnFetchRejection?: boolean;
              -        /**
              -         * Do not delete stale items when they are retrieved with
              -         * {@link LRUCache#get}.
              -         *
              -         * Note that the `get` return value will still be `undefined`
              -         * unless {@link OptionsBase.allowStale} is true.
              -         *
              -         * When using time-expiring entries with `ttl`, by default stale
              -         * items will be removed from the cache when the key is accessed
              -         * with `cache.get()`.
              -         *
              -         * Setting this option will cause stale items to remain in the cache, until
              -         * they are explicitly deleted with `cache.delete(key)`, or retrieved with
              -         * `noDeleteOnStaleGet` set to `false`.
              -         *
              -         * This may be overridden by passing an options object to `cache.get()`.
              -         *
              -         * Only relevant if a ttl is used.
              -         */
              -        noDeleteOnStaleGet?: boolean;
              -        /**
              -         * Set to true to allow returning stale data when a
              -         * {@link OptionsBase.fetchMethod} throws an error or returns a rejected
              -         * promise.
              -         *
              -         * This differs from using {@link OptionsBase.allowStale} in that stale
              -         * data will ONLY be returned in the case that the {@link LRUCache#fetch}
              -         * fails, not any other times.
              -         *
              -         * If a `fetchMethod` fails, and there is no stale value available, the
              -         * `fetch()` will resolve to `undefined`. Ie, all `fetchMethod` errors are
              -         * suppressed.
              -         *
              -         * Implies `noDeleteOnFetchRejection`.
              -         *
              -         * This may be set in calls to `fetch()`, or defaulted on the constructor,
              -         * or overridden by modifying the options object in the `fetchMethod`.
              -         */
              -        allowStaleOnFetchRejection?: boolean;
              -        /**
              -         * Set to true to return a stale value from the cache when the
              -         * `AbortSignal` passed to the {@link OptionsBase.fetchMethod} dispatches
              -         * an `'abort'` event, whether user-triggered, or due to internal cache
              -         * behavior.
              -         *
              -         * Unless {@link OptionsBase.ignoreFetchAbort} is also set, the underlying
              -         * {@link OptionsBase.fetchMethod} will still be considered canceled, and
              -         * any value it returns will be ignored and not cached.
              -         *
              -         * Caveat: since fetches are aborted when a new value is explicitly
              -         * set in the cache, this can lead to fetch returning a stale value,
              -         * since that was the fallback value _at the moment the `fetch()` was
              -         * initiated_, even though the new updated value is now present in
              -         * the cache.
              -         *
              -         * For example:
              -         *
              -         * ```ts
              -         * const cache = new LRUCache({
              -         *   ttl: 100,
              -         *   fetchMethod: async (url, oldValue, { signal }) =>  {
              -         *     const res = await fetch(url, { signal })
              -         *     return await res.json()
              -         *   }
              -         * })
              -         * cache.set('https://example.com/', { some: 'data' })
              -         * // 100ms go by...
              -         * const result = cache.fetch('https://example.com/')
              -         * cache.set('https://example.com/', { other: 'thing' })
              -         * console.log(await result) // { some: 'data' }
              -         * console.log(cache.get('https://example.com/')) // { other: 'thing' }
              -         * ```
              -         */
              -        allowStaleOnFetchAbort?: boolean;
              -        /**
              -         * Set to true to ignore the `abort` event emitted by the `AbortSignal`
              -         * object passed to {@link OptionsBase.fetchMethod}, and still cache the
              -         * resulting resolution value, as long as it is not `undefined`.
              -         *
              -         * When used on its own, this means aborted {@link LRUCache#fetch} calls
              -         * are not immediately resolved or rejected when they are aborted, and
              -         * instead take the full time to await.
              -         *
              -         * When used with {@link OptionsBase.allowStaleOnFetchAbort}, aborted
              -         * {@link LRUCache#fetch} calls will resolve immediately to their stale
              -         * cached value or `undefined`, and will continue to process and eventually
              -         * update the cache when they resolve, as long as the resulting value is
              -         * not `undefined`, thus supporting a "return stale on timeout while
              -         * refreshing" mechanism by passing `AbortSignal.timeout(n)` as the signal.
              -         *
              -         * For example:
              -         *
              -         * ```ts
              -         * const c = new LRUCache({
              -         *   ttl: 100,
              -         *   ignoreFetchAbort: true,
              -         *   allowStaleOnFetchAbort: true,
              -         *   fetchMethod: async (key, oldValue, { signal }) => {
              -         *     // note: do NOT pass the signal to fetch()!
              -         *     // let's say this fetch can take a long time.
              -         *     const res = await fetch(`https://slow-backend-server/${key}`)
              -         *     return await res.json()
              -         *   },
              -         * })
              -         *
              -         * // this will return the stale value after 100ms, while still
              -         * // updating in the background for next time.
              -         * const val = await c.fetch('key', { signal: AbortSignal.timeout(100) })
              -         * ```
              -         *
              -         * **Note**: regardless of this setting, an `abort` event _is still
              -         * emitted on the `AbortSignal` object_, so may result in invalid results
              -         * when passed to other underlying APIs that use AbortSignals.
              -         *
              -         * This may be overridden in the {@link OptionsBase.fetchMethod} or the
              -         * call to {@link LRUCache#fetch}.
              -         */
              -        ignoreFetchAbort?: boolean;
              -    }
              -    interface OptionsMaxLimit extends OptionsBase {
              -        max: Count;
              -    }
              -    interface OptionsTTLLimit extends OptionsBase {
              -        ttl: Milliseconds;
              -        ttlAutopurge: boolean;
              -    }
              -    interface OptionsSizeLimit extends OptionsBase {
              -        maxSize: Size;
              -    }
              -    /**
              -     * The valid safe options for the {@link LRUCache} constructor
              -     */
              -    type Options = OptionsMaxLimit | OptionsSizeLimit | OptionsTTLLimit;
              -    /**
              -     * Entry objects used by {@link LRUCache#load} and {@link LRUCache#dump},
              -     * and returned by {@link LRUCache#info}.
              -     */
              -    interface Entry {
              -        value: V;
              -        ttl?: Milliseconds;
              -        size?: Size;
              -        start?: Milliseconds;
              -    }
              -}
              -/**
              - * Default export, the thing you're using this module to get.
              - *
              - * The `K` and `V` types define the key and value types, respectively. The
              - * optional `FC` type defines the type of the `context` object passed to
              - * `cache.fetch()` and `cache.memo()`.
              - *
              - * Keys and values **must not** be `null` or `undefined`.
              - *
              - * All properties from the options object (with the exception of `max`,
              - * `maxSize`, `fetchMethod`, `memoMethod`, `dispose` and `disposeAfter`) are
              - * added as normal public members. (The listed options are read-only getters.)
              - *
              - * Changing any of these will alter the defaults for subsequent method calls.
              - */
              -export declare class LRUCache implements Map {
              -    #private;
              -    /**
              -     * {@link LRUCache.OptionsBase.ttl}
              -     */
              -    ttl: LRUCache.Milliseconds;
              -    /**
              -     * {@link LRUCache.OptionsBase.ttlResolution}
              -     */
              -    ttlResolution: LRUCache.Milliseconds;
              -    /**
              -     * {@link LRUCache.OptionsBase.ttlAutopurge}
              -     */
              -    ttlAutopurge: boolean;
              -    /**
              -     * {@link LRUCache.OptionsBase.updateAgeOnGet}
              -     */
              -    updateAgeOnGet: boolean;
              -    /**
              -     * {@link LRUCache.OptionsBase.updateAgeOnHas}
              -     */
              -    updateAgeOnHas: boolean;
              -    /**
              -     * {@link LRUCache.OptionsBase.allowStale}
              -     */
              -    allowStale: boolean;
              -    /**
              -     * {@link LRUCache.OptionsBase.noDisposeOnSet}
              -     */
              -    noDisposeOnSet: boolean;
              -    /**
              -     * {@link LRUCache.OptionsBase.noUpdateTTL}
              -     */
              -    noUpdateTTL: boolean;
              -    /**
              -     * {@link LRUCache.OptionsBase.maxEntrySize}
              -     */
              -    maxEntrySize: LRUCache.Size;
              -    /**
              -     * {@link LRUCache.OptionsBase.sizeCalculation}
              -     */
              -    sizeCalculation?: LRUCache.SizeCalculator;
              -    /**
              -     * {@link LRUCache.OptionsBase.noDeleteOnFetchRejection}
              -     */
              -    noDeleteOnFetchRejection: boolean;
              -    /**
              -     * {@link LRUCache.OptionsBase.noDeleteOnStaleGet}
              -     */
              -    noDeleteOnStaleGet: boolean;
              -    /**
              -     * {@link LRUCache.OptionsBase.allowStaleOnFetchAbort}
              -     */
              -    allowStaleOnFetchAbort: boolean;
              -    /**
              -     * {@link LRUCache.OptionsBase.allowStaleOnFetchRejection}
              -     */
              -    allowStaleOnFetchRejection: boolean;
              -    /**
              -     * {@link LRUCache.OptionsBase.ignoreFetchAbort}
              -     */
              -    ignoreFetchAbort: boolean;
              -    /**
              -     * Do not call this method unless you need to inspect the
              -     * inner workings of the cache.  If anything returned by this
              -     * object is modified in any way, strange breakage may occur.
              -     *
              -     * These fields are private for a reason!
              -     *
              -     * @internal
              -     */
              -    static unsafeExposeInternals(c: LRUCache): {
              -        starts: ZeroArray | undefined;
              -        ttls: ZeroArray | undefined;
              -        sizes: ZeroArray | undefined;
              -        keyMap: Map;
              -        keyList: (K | undefined)[];
              -        valList: (V | BackgroundFetch | undefined)[];
              -        next: NumberArray;
              -        prev: NumberArray;
              -        readonly head: Index;
              -        readonly tail: Index;
              -        free: StackLike;
              -        isBackgroundFetch: (p: any) => boolean;
              -        backgroundFetch: (k: K, index: number | undefined, options: LRUCache.FetchOptions, context: any) => BackgroundFetch;
              -        moveToTail: (index: number) => void;
              -        indexes: (options?: {
              -            allowStale: boolean;
              -        }) => Generator;
              -        rindexes: (options?: {
              -            allowStale: boolean;
              -        }) => Generator;
              -        isStale: (index: number | undefined) => boolean;
              -    };
              -    /**
              -     * {@link LRUCache.OptionsBase.max} (read-only)
              -     */
              -    get max(): LRUCache.Count;
              -    /**
              -     * {@link LRUCache.OptionsBase.maxSize} (read-only)
              -     */
              -    get maxSize(): LRUCache.Count;
              -    /**
              -     * The total computed size of items in the cache (read-only)
              -     */
              -    get calculatedSize(): LRUCache.Size;
              -    /**
              -     * The number of items stored in the cache (read-only)
              -     */
              -    get size(): LRUCache.Count;
              -    /**
              -     * {@link LRUCache.OptionsBase.fetchMethod} (read-only)
              -     */
              -    get fetchMethod(): LRUCache.Fetcher | undefined;
              -    get memoMethod(): LRUCache.Memoizer | undefined;
              -    /**
              -     * {@link LRUCache.OptionsBase.dispose} (read-only)
              -     */
              -    get dispose(): LRUCache.Disposer | undefined;
              -    /**
              -     * {@link LRUCache.OptionsBase.disposeAfter} (read-only)
              -     */
              -    get disposeAfter(): LRUCache.Disposer | undefined;
              -    constructor(options: LRUCache.Options | LRUCache);
              -    /**
              -     * Return the number of ms left in the item's TTL. If item is not in cache,
              -     * returns `0`. Returns `Infinity` if item is in cache without a defined TTL.
              -     */
              -    getRemainingTTL(key: K): number;
              -    /**
              -     * Return a generator yielding `[key, value]` pairs,
              -     * in order from most recently used to least recently used.
              -     */
              -    entries(): Generator<[K, V], void, unknown>;
              -    /**
              -     * Inverse order version of {@link LRUCache.entries}
              -     *
              -     * Return a generator yielding `[key, value]` pairs,
              -     * in order from least recently used to most recently used.
              -     */
              -    rentries(): Generator<(K | V | BackgroundFetch | undefined)[], void, unknown>;
              -    /**
              -     * Return a generator yielding the keys in the cache,
              -     * in order from most recently used to least recently used.
              -     */
              -    keys(): Generator;
              -    /**
              -     * Inverse order version of {@link LRUCache.keys}
              -     *
              -     * Return a generator yielding the keys in the cache,
              -     * in order from least recently used to most recently used.
              -     */
              -    rkeys(): Generator;
              -    /**
              -     * Return a generator yielding the values in the cache,
              -     * in order from most recently used to least recently used.
              -     */
              -    values(): Generator;
              -    /**
              -     * Inverse order version of {@link LRUCache.values}
              -     *
              -     * Return a generator yielding the values in the cache,
              -     * in order from least recently used to most recently used.
              -     */
              -    rvalues(): Generator | undefined, void, unknown>;
              -    /**
              -     * Iterating over the cache itself yields the same results as
              -     * {@link LRUCache.entries}
              -     */
              -    [Symbol.iterator](): Generator<[K, V], void, unknown>;
              -    /**
              -     * A String value that is used in the creation of the default string
              -     * description of an object. Called by the built-in method
              -     * `Object.prototype.toString`.
              -     */
              -    [Symbol.toStringTag]: string;
              -    /**
              -     * Find a value for which the supplied fn method returns a truthy value,
              -     * similar to `Array.find()`. fn is called as `fn(value, key, cache)`.
              -     */
              -    find(fn: (v: V, k: K, self: LRUCache) => boolean, getOptions?: LRUCache.GetOptions): V | undefined;
              -    /**
              -     * Call the supplied function on each item in the cache, in order from most
              -     * recently used to least recently used.
              -     *
              -     * `fn` is called as `fn(value, key, cache)`.
              -     *
              -     * If `thisp` is provided, function will be called in the `this`-context of
              -     * the provided object, or the cache if no `thisp` object is provided.
              -     *
              -     * Does not update age or recenty of use, or iterate over stale values.
              -     */
              -    forEach(fn: (v: V, k: K, self: LRUCache) => any, thisp?: any): void;
              -    /**
              -     * The same as {@link LRUCache.forEach} but items are iterated over in
              -     * reverse order.  (ie, less recently used items are iterated over first.)
              -     */
              -    rforEach(fn: (v: V, k: K, self: LRUCache) => any, thisp?: any): void;
              -    /**
              -     * Delete any stale entries. Returns true if anything was removed,
              -     * false otherwise.
              -     */
              -    purgeStale(): boolean;
              -    /**
              -     * Get the extended info about a given entry, to get its value, size, and
              -     * TTL info simultaneously. Returns `undefined` if the key is not present.
              -     *
              -     * Unlike {@link LRUCache#dump}, which is designed to be portable and survive
              -     * serialization, the `start` value is always the current timestamp, and the
              -     * `ttl` is a calculated remaining time to live (negative if expired).
              -     *
              -     * Always returns stale values, if their info is found in the cache, so be
              -     * sure to check for expirations (ie, a negative {@link LRUCache.Entry#ttl})
              -     * if relevant.
              -     */
              -    info(key: K): LRUCache.Entry | undefined;
              -    /**
              -     * Return an array of [key, {@link LRUCache.Entry}] tuples which can be
              -     * passed to {@link LRLUCache#load}.
              -     *
              -     * The `start` fields are calculated relative to a portable `Date.now()`
              -     * timestamp, even if `performance.now()` is available.
              -     *
              -     * Stale entries are always included in the `dump`, even if
              -     * {@link LRUCache.OptionsBase.allowStale} is false.
              -     *
              -     * Note: this returns an actual array, not a generator, so it can be more
              -     * easily passed around.
              -     */
              -    dump(): [K, LRUCache.Entry][];
              -    /**
              -     * Reset the cache and load in the items in entries in the order listed.
              -     *
              -     * The shape of the resulting cache may be different if the same options are
              -     * not used in both caches.
              -     *
              -     * The `start` fields are assumed to be calculated relative to a portable
              -     * `Date.now()` timestamp, even if `performance.now()` is available.
              -     */
              -    load(arr: [K, LRUCache.Entry][]): void;
              -    /**
              -     * Add a value to the cache.
              -     *
              -     * Note: if `undefined` is specified as a value, this is an alias for
              -     * {@link LRUCache#delete}
              -     *
              -     * Fields on the {@link LRUCache.SetOptions} options param will override
              -     * their corresponding values in the constructor options for the scope
              -     * of this single `set()` operation.
              -     *
              -     * If `start` is provided, then that will set the effective start
              -     * time for the TTL calculation. Note that this must be a previous
              -     * value of `performance.now()` if supported, or a previous value of
              -     * `Date.now()` if not.
              -     *
              -     * Options object may also include `size`, which will prevent
              -     * calling the `sizeCalculation` function and just use the specified
              -     * number if it is a positive integer, and `noDisposeOnSet` which
              -     * will prevent calling a `dispose` function in the case of
              -     * overwrites.
              -     *
              -     * If the `size` (or return value of `sizeCalculation`) for a given
              -     * entry is greater than `maxEntrySize`, then the item will not be
              -     * added to the cache.
              -     *
              -     * Will update the recency of the entry.
              -     *
              -     * If the value is `undefined`, then this is an alias for
              -     * `cache.delete(key)`. `undefined` is never stored in the cache.
              -     */
              -    set(k: K, v: V | BackgroundFetch | undefined, setOptions?: LRUCache.SetOptions): this;
              -    /**
              -     * Evict the least recently used item, returning its value or
              -     * `undefined` if cache is empty.
              -     */
              -    pop(): V | undefined;
              -    /**
              -     * Check if a key is in the cache, without updating the recency of use.
              -     * Will return false if the item is stale, even though it is technically
              -     * in the cache.
              -     *
              -     * Check if a key is in the cache, without updating the recency of
              -     * use. Age is updated if {@link LRUCache.OptionsBase.updateAgeOnHas} is set
              -     * to `true` in either the options or the constructor.
              -     *
              -     * Will return `false` if the item is stale, even though it is technically in
              -     * the cache. The difference can be determined (if it matters) by using a
              -     * `status` argument, and inspecting the `has` field.
              -     *
              -     * Will not update item age unless
              -     * {@link LRUCache.OptionsBase.updateAgeOnHas} is set.
              -     */
              -    has(k: K, hasOptions?: LRUCache.HasOptions): boolean;
              -    /**
              -     * Like {@link LRUCache#get} but doesn't update recency or delete stale
              -     * items.
              -     *
              -     * Returns `undefined` if the item is stale, unless
              -     * {@link LRUCache.OptionsBase.allowStale} is set.
              -     */
              -    peek(k: K, peekOptions?: LRUCache.PeekOptions): V | undefined;
              -    /**
              -     * Make an asynchronous cached fetch using the
              -     * {@link LRUCache.OptionsBase.fetchMethod} function.
              -     *
              -     * If the value is in the cache and not stale, then the returned
              -     * Promise resolves to the value.
              -     *
              -     * If not in the cache, or beyond its TTL staleness, then
              -     * `fetchMethod(key, staleValue, { options, signal, context })` is
              -     * called, and the value returned will be added to the cache once
              -     * resolved.
              -     *
              -     * If called with `allowStale`, and an asynchronous fetch is
              -     * currently in progress to reload a stale value, then the former
              -     * stale value will be returned.
              -     *
              -     * If called with `forceRefresh`, then the cached item will be
              -     * re-fetched, even if it is not stale. However, if `allowStale` is also
              -     * set, then the old value will still be returned. This is useful
              -     * in cases where you want to force a reload of a cached value. If
              -     * a background fetch is already in progress, then `forceRefresh`
              -     * has no effect.
              -     *
              -     * If multiple fetches for the same key are issued, then they will all be
              -     * coalesced into a single call to fetchMethod.
              -     *
              -     * Note that this means that handling options such as
              -     * {@link LRUCache.OptionsBase.allowStaleOnFetchAbort},
              -     * {@link LRUCache.FetchOptions.signal},
              -     * and {@link LRUCache.OptionsBase.allowStaleOnFetchRejection} will be
              -     * determined by the FIRST fetch() call for a given key.
              -     *
              -     * This is a known (fixable) shortcoming which will be addresed on when
              -     * someone complains about it, as the fix would involve added complexity and
              -     * may not be worth the costs for this edge case.
              -     *
              -     * If {@link LRUCache.OptionsBase.fetchMethod} is not specified, then this is
              -     * effectively an alias for `Promise.resolve(cache.get(key))`.
              -     *
              -     * When the fetch method resolves to a value, if the fetch has not
              -     * been aborted due to deletion, eviction, or being overwritten,
              -     * then it is added to the cache using the options provided.
              -     *
              -     * If the key is evicted or deleted before the `fetchMethod`
              -     * resolves, then the AbortSignal passed to the `fetchMethod` will
              -     * receive an `abort` event, and the promise returned by `fetch()`
              -     * will reject with the reason for the abort.
              -     *
              -     * If a `signal` is passed to the `fetch()` call, then aborting the
              -     * signal will abort the fetch and cause the `fetch()` promise to
              -     * reject with the reason provided.
              -     *
              -     * **Setting `context`**
              -     *
              -     * If an `FC` type is set to a type other than `unknown`, `void`, or
              -     * `undefined` in the {@link LRUCache} constructor, then all
              -     * calls to `cache.fetch()` _must_ provide a `context` option. If
              -     * set to `undefined` or `void`, then calls to fetch _must not_
              -     * provide a `context` option.
              -     *
              -     * The `context` param allows you to provide arbitrary data that
              -     * might be relevant in the course of fetching the data. It is only
              -     * relevant for the course of a single `fetch()` operation, and
              -     * discarded afterwards.
              -     *
              -     * **Note: `fetch()` calls are inflight-unique**
              -     *
              -     * If you call `fetch()` multiple times with the same key value,
              -     * then every call after the first will resolve on the same
              -     * promise1,
              -     * _even if they have different settings that would otherwise change
              -     * the behavior of the fetch_, such as `noDeleteOnFetchRejection`
              -     * or `ignoreFetchAbort`.
              -     *
              -     * In most cases, this is not a problem (in fact, only fetching
              -     * something once is what you probably want, if you're caching in
              -     * the first place). If you are changing the fetch() options
              -     * dramatically between runs, there's a good chance that you might
              -     * be trying to fit divergent semantics into a single object, and
              -     * would be better off with multiple cache instances.
              -     *
              -     * **1**: Ie, they're not the "same Promise", but they resolve at
              -     * the same time, because they're both waiting on the same
              -     * underlying fetchMethod response.
              -     */
              -    fetch(k: K, fetchOptions: unknown extends FC ? LRUCache.FetchOptions : FC extends undefined | void ? LRUCache.FetchOptionsNoContext : LRUCache.FetchOptionsWithContext): Promise;
              -    fetch(k: unknown extends FC ? K : FC extends undefined | void ? K : never, fetchOptions?: unknown extends FC ? LRUCache.FetchOptions : FC extends undefined | void ? LRUCache.FetchOptionsNoContext : never): Promise;
              -    /**
              -     * In some cases, `cache.fetch()` may resolve to `undefined`, either because
              -     * a {@link LRUCache.OptionsBase#fetchMethod} was not provided (turning
              -     * `cache.fetch(k)` into just an async wrapper around `cache.get(k)`) or
              -     * because `ignoreFetchAbort` was specified (either to the constructor or
              -     * in the {@link LRUCache.FetchOptions}). Also, the
              -     * {@link OptionsBase.fetchMethod} may return `undefined` or `void`, making
              -     * the test even more complicated.
              -     *
              -     * Because inferring the cases where `undefined` might be returned are so
              -     * cumbersome, but testing for `undefined` can also be annoying, this method
              -     * can be used, which will reject if `this.fetch()` resolves to undefined.
              -     */
              -    forceFetch(k: K, fetchOptions: unknown extends FC ? LRUCache.FetchOptions : FC extends undefined | void ? LRUCache.FetchOptionsNoContext : LRUCache.FetchOptionsWithContext): Promise;
              -    forceFetch(k: unknown extends FC ? K : FC extends undefined | void ? K : never, fetchOptions?: unknown extends FC ? LRUCache.FetchOptions : FC extends undefined | void ? LRUCache.FetchOptionsNoContext : never): Promise;
              -    /**
              -     * If the key is found in the cache, then this is equivalent to
              -     * {@link LRUCache#get}. If not, in the cache, then calculate the value using
              -     * the {@link LRUCache.OptionsBase.memoMethod}, and add it to the cache.
              -     *
              -     * If an `FC` type is set to a type other than `unknown`, `void`, or
              -     * `undefined` in the LRUCache constructor, then all calls to `cache.memo()`
              -     * _must_ provide a `context` option. If set to `undefined` or `void`, then
              -     * calls to memo _must not_ provide a `context` option.
              -     *
              -     * The `context` param allows you to provide arbitrary data that might be
              -     * relevant in the course of fetching the data. It is only relevant for the
              -     * course of a single `memo()` operation, and discarded afterwards.
              -     */
              -    memo(k: K, memoOptions: unknown extends FC ? LRUCache.MemoOptions : FC extends undefined | void ? LRUCache.MemoOptionsNoContext : LRUCache.MemoOptionsWithContext): V;
              -    memo(k: unknown extends FC ? K : FC extends undefined | void ? K : never, memoOptions?: unknown extends FC ? LRUCache.MemoOptions : FC extends undefined | void ? LRUCache.MemoOptionsNoContext : never): V;
              -    /**
              -     * Return a value from the cache. Will update the recency of the cache
              -     * entry found.
              -     *
              -     * If the key is not found, get() will return `undefined`.
              -     */
              -    get(k: K, getOptions?: LRUCache.GetOptions): V | undefined;
              -    /**
              -     * Deletes a key out of the cache.
              -     *
              -     * Returns true if the key was deleted, false otherwise.
              -     */
              -    delete(k: K): boolean;
              -    /**
              -     * Clear the cache entirely, throwing away all values.
              -     */
              -    clear(): void;
              -}
              -//# sourceMappingURL=index.d.ts.map
              \ No newline at end of file
              diff --git a/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/index.d.ts.map b/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/index.d.ts.map
              deleted file mode 100644
              index 34d60c50..00000000
              --- a/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/index.d.ts.map
              +++ /dev/null
              @@ -1 +0,0 @@
              -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AA0FH,QAAA,MAAM,IAAI,eAAiB,CAAA;AAC3B,MAAM,MAAM,MAAM,GAAG,MAAM,GAAG;IAAE,CAAC,IAAI,CAAC,EAAE,kBAAkB,CAAA;CAAE,CAAA;AAC5D,MAAM,MAAM,KAAK,GAAG,MAAM,GAAG;IAAE,CAAC,IAAI,CAAC,EAAE,gBAAgB,CA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OAIG;IACH,MAAM,CAAC,CAAC,EAAE,CAAC;IAqDX;;OAEG;IACH,KAAK;CA0CN"}
              \ No newline at end of file
              diff --git a/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/index.js b/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/index.js
              deleted file mode 100644
              index 05892318..00000000
              --- a/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/index.js
              +++ /dev/null
              @@ -1,1546 +0,0 @@
              -"use strict";
              -/**
              - * @module LRUCache
              - */
              -Object.defineProperty(exports, "__esModule", { value: true });
              -exports.LRUCache = void 0;
              -const perf = typeof performance === 'object' &&
              -    performance &&
              -    typeof performance.now === 'function'
              -    ? performance
              -    : Date;
              -const warned = new Set();
              -/* c8 ignore start */
              -const PROCESS = (typeof process === 'object' && !!process ? process : {});
              -/* c8 ignore start */
              -const emitWarning = (msg, type, code, fn) => {
              -    typeof PROCESS.emitWarning === 'function'
              -        ? PROCESS.emitWarning(msg, type, code, fn)
              -        : console.error(`[${code}] ${type}: ${msg}`);
              -};
              -let AC = globalThis.AbortController;
              -let AS = globalThis.AbortSignal;
              -/* c8 ignore start */
              -if (typeof AC === 'undefined') {
              -    //@ts-ignore
              -    AS = class AbortSignal {
              -        onabort;
              -        _onabort = [];
              -        reason;
              -        aborted = false;
              -        addEventListener(_, fn) {
              -            this._onabort.push(fn);
              -        }
              -    };
              -    //@ts-ignore
              -    AC = class AbortController {
              -        constructor() {
              -            warnACPolyfill();
              -        }
              -        signal = new AS();
              -        abort(reason) {
              -            if (this.signal.aborted)
              -                return;
              -            //@ts-ignore
              -            this.signal.reason = reason;
              -            //@ts-ignore
              -            this.signal.aborted = true;
              -            //@ts-ignore
              -            for (const fn of this.signal._onabort) {
              -                fn(reason);
              -            }
              -            this.signal.onabort?.(reason);
              -        }
              -    };
              -    let printACPolyfillWarning = PROCESS.env?.LRU_CACHE_IGNORE_AC_WARNING !== '1';
              -    const warnACPolyfill = () => {
              -        if (!printACPolyfillWarning)
              -            return;
              -        printACPolyfillWarning = false;
              -        emitWarning('AbortController is not defined. If using lru-cache in ' +
              -            'node 14, load an AbortController polyfill from the ' +
              -            '`node-abort-controller` package. A minimal polyfill is ' +
              -            'provided for use by LRUCache.fetch(), but it should not be ' +
              -            'relied upon in other contexts (eg, passing it to other APIs that ' +
              -            'use AbortController/AbortSignal might have undesirable effects). ' +
              -            'You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.', 'NO_ABORT_CONTROLLER', 'ENOTSUP', warnACPolyfill);
              -    };
              -}
              -/* c8 ignore stop */
              -const shouldWarn = (code) => !warned.has(code);
              -const TYPE = Symbol('type');
              -const isPosInt = (n) => n && n === Math.floor(n) && n > 0 && isFinite(n);
              -/* c8 ignore start */
              -// This is a little bit ridiculous, tbh.
              -// The maximum array length is 2^32-1 or thereabouts on most JS impls.
              -// And well before that point, you're caching the entire world, I mean,
              -// that's ~32GB of just integers for the next/prev links, plus whatever
              -// else to hold that many keys and values.  Just filling the memory with
              -// zeroes at init time is brutal when you get that big.
              -// But why not be complete?
              -// Maybe in the future, these limits will have expanded.
              -const getUintArray = (max) => !isPosInt(max)
              -    ? null
              -    : max <= Math.pow(2, 8)
              -        ? Uint8Array
              -        : max <= Math.pow(2, 16)
              -            ? Uint16Array
              -            : max <= Math.pow(2, 32)
              -                ? Uint32Array
              -                : max <= Number.MAX_SAFE_INTEGER
              -                    ? ZeroArray
              -                    : null;
              -/* c8 ignore stop */
              -class ZeroArray extends Array {
              -    constructor(size) {
              -        super(size);
              -        this.fill(0);
              -    }
              -}
              -class Stack {
              -    heap;
              -    length;
              -    // private constructor
              -    static #constructing = false;
              -    static create(max) {
              -        const HeapCls = getUintArray(max);
              -        if (!HeapCls)
              -            return [];
              -        Stack.#constructing = true;
              -        const s = new Stack(max, HeapCls);
              -        Stack.#constructing = false;
              -        return s;
              -    }
              -    constructor(max, HeapCls) {
              -        /* c8 ignore start */
              -        if (!Stack.#constructing) {
              -            throw new TypeError('instantiate Stack using Stack.create(n)');
              -        }
              -        /* c8 ignore stop */
              -        this.heap = new HeapCls(max);
              -        this.length = 0;
              -    }
              -    push(n) {
              -        this.heap[this.length++] = n;
              -    }
              -    pop() {
              -        return this.heap[--this.length];
              -    }
              -}
              -/**
              - * Default export, the thing you're using this module to get.
              - *
              - * The `K` and `V` types define the key and value types, respectively. The
              - * optional `FC` type defines the type of the `context` object passed to
              - * `cache.fetch()` and `cache.memo()`.
              - *
              - * Keys and values **must not** be `null` or `undefined`.
              - *
              - * All properties from the options object (with the exception of `max`,
              - * `maxSize`, `fetchMethod`, `memoMethod`, `dispose` and `disposeAfter`) are
              - * added as normal public members. (The listed options are read-only getters.)
              - *
              - * Changing any of these will alter the defaults for subsequent method calls.
              - */
              -class LRUCache {
              -    // options that cannot be changed without disaster
              -    #max;
              -    #maxSize;
              -    #dispose;
              -    #disposeAfter;
              -    #fetchMethod;
              -    #memoMethod;
              -    /**
              -     * {@link LRUCache.OptionsBase.ttl}
              -     */
              -    ttl;
              -    /**
              -     * {@link LRUCache.OptionsBase.ttlResolution}
              -     */
              -    ttlResolution;
              -    /**
              -     * {@link LRUCache.OptionsBase.ttlAutopurge}
              -     */
              -    ttlAutopurge;
              -    /**
              -     * {@link LRUCache.OptionsBase.updateAgeOnGet}
              -     */
              -    updateAgeOnGet;
              -    /**
              -     * {@link LRUCache.OptionsBase.updateAgeOnHas}
              -     */
              -    updateAgeOnHas;
              -    /**
              -     * {@link LRUCache.OptionsBase.allowStale}
              -     */
              -    allowStale;
              -    /**
              -     * {@link LRUCache.OptionsBase.noDisposeOnSet}
              -     */
              -    noDisposeOnSet;
              -    /**
              -     * {@link LRUCache.OptionsBase.noUpdateTTL}
              -     */
              -    noUpdateTTL;
              -    /**
              -     * {@link LRUCache.OptionsBase.maxEntrySize}
              -     */
              -    maxEntrySize;
              -    /**
              -     * {@link LRUCache.OptionsBase.sizeCalculation}
              -     */
              -    sizeCalculation;
              -    /**
              -     * {@link LRUCache.OptionsBase.noDeleteOnFetchRejection}
              -     */
              -    noDeleteOnFetchRejection;
              -    /**
              -     * {@link LRUCache.OptionsBase.noDeleteOnStaleGet}
              -     */
              -    noDeleteOnStaleGet;
              -    /**
              -     * {@link LRUCache.OptionsBase.allowStaleOnFetchAbort}
              -     */
              -    allowStaleOnFetchAbort;
              -    /**
              -     * {@link LRUCache.OptionsBase.allowStaleOnFetchRejection}
              -     */
              -    allowStaleOnFetchRejection;
              -    /**
              -     * {@link LRUCache.OptionsBase.ignoreFetchAbort}
              -     */
              -    ignoreFetchAbort;
              -    // computed properties
              -    #size;
              -    #calculatedSize;
              -    #keyMap;
              -    #keyList;
              -    #valList;
              -    #next;
              -    #prev;
              -    #head;
              -    #tail;
              -    #free;
              -    #disposed;
              -    #sizes;
              -    #starts;
              -    #ttls;
              -    #hasDispose;
              -    #hasFetchMethod;
              -    #hasDisposeAfter;
              -    /**
              -     * Do not call this method unless you need to inspect the
              -     * inner workings of the cache.  If anything returned by this
              -     * object is modified in any way, strange breakage may occur.
              -     *
              -     * These fields are private for a reason!
              -     *
              -     * @internal
              -     */
              -    static unsafeExposeInternals(c) {
              -        return {
              -            // properties
              -            starts: c.#starts,
              -            ttls: c.#ttls,
              -            sizes: c.#sizes,
              -            keyMap: c.#keyMap,
              -            keyList: c.#keyList,
              -            valList: c.#valList,
              -            next: c.#next,
              -            prev: c.#prev,
              -            get head() {
              -                return c.#head;
              -            },
              -            get tail() {
              -                return c.#tail;
              -            },
              -            free: c.#free,
              -            // methods
              -            isBackgroundFetch: (p) => c.#isBackgroundFetch(p),
              -            backgroundFetch: (k, index, options, context) => c.#backgroundFetch(k, index, options, context),
              -            moveToTail: (index) => c.#moveToTail(index),
              -            indexes: (options) => c.#indexes(options),
              -            rindexes: (options) => c.#rindexes(options),
              -            isStale: (index) => c.#isStale(index),
              -        };
              -    }
              -    // Protected read-only members
              -    /**
              -     * {@link LRUCache.OptionsBase.max} (read-only)
              -     */
              -    get max() {
              -        return this.#max;
              -    }
              -    /**
              -     * {@link LRUCache.OptionsBase.maxSize} (read-only)
              -     */
              -    get maxSize() {
              -        return this.#maxSize;
              -    }
              -    /**
              -     * The total computed size of items in the cache (read-only)
              -     */
              -    get calculatedSize() {
              -        return this.#calculatedSize;
              -    }
              -    /**
              -     * The number of items stored in the cache (read-only)
              -     */
              -    get size() {
              -        return this.#size;
              -    }
              -    /**
              -     * {@link LRUCache.OptionsBase.fetchMethod} (read-only)
              -     */
              -    get fetchMethod() {
              -        return this.#fetchMethod;
              -    }
              -    get memoMethod() {
              -        return this.#memoMethod;
              -    }
              -    /**
              -     * {@link LRUCache.OptionsBase.dispose} (read-only)
              -     */
              -    get dispose() {
              -        return this.#dispose;
              -    }
              -    /**
              -     * {@link LRUCache.OptionsBase.disposeAfter} (read-only)
              -     */
              -    get disposeAfter() {
              -        return this.#disposeAfter;
              -    }
              -    constructor(options) {
              -        const { max = 0, ttl, ttlResolution = 1, ttlAutopurge, updateAgeOnGet, updateAgeOnHas, allowStale, dispose, disposeAfter, noDisposeOnSet, noUpdateTTL, maxSize = 0, maxEntrySize = 0, sizeCalculation, fetchMethod, memoMethod, noDeleteOnFetchRejection, noDeleteOnStaleGet, allowStaleOnFetchRejection, allowStaleOnFetchAbort, ignoreFetchAbort, } = options;
              -        if (max !== 0 && !isPosInt(max)) {
              -            throw new TypeError('max option must be a nonnegative integer');
              -        }
              -        const UintArray = max ? getUintArray(max) : Array;
              -        if (!UintArray) {
              -            throw new Error('invalid max value: ' + max);
              -        }
              -        this.#max = max;
              -        this.#maxSize = maxSize;
              -        this.maxEntrySize = maxEntrySize || this.#maxSize;
              -        this.sizeCalculation = sizeCalculation;
              -        if (this.sizeCalculation) {
              -            if (!this.#maxSize && !this.maxEntrySize) {
              -                throw new TypeError('cannot set sizeCalculation without setting maxSize or maxEntrySize');
              -            }
              -            if (typeof this.sizeCalculation !== 'function') {
              -                throw new TypeError('sizeCalculation set to non-function');
              -            }
              -        }
              -        if (memoMethod !== undefined &&
              -            typeof memoMethod !== 'function') {
              -            throw new TypeError('memoMethod must be a function if defined');
              -        }
              -        this.#memoMethod = memoMethod;
              -        if (fetchMethod !== undefined &&
              -            typeof fetchMethod !== 'function') {
              -            throw new TypeError('fetchMethod must be a function if specified');
              -        }
              -        this.#fetchMethod = fetchMethod;
              -        this.#hasFetchMethod = !!fetchMethod;
              -        this.#keyMap = new Map();
              -        this.#keyList = new Array(max).fill(undefined);
              -        this.#valList = new Array(max).fill(undefined);
              -        this.#next = new UintArray(max);
              -        this.#prev = new UintArray(max);
              -        this.#head = 0;
              -        this.#tail = 0;
              -        this.#free = Stack.create(max);
              -        this.#size = 0;
              -        this.#calculatedSize = 0;
              -        if (typeof dispose === 'function') {
              -            this.#dispose = dispose;
              -        }
              -        if (typeof disposeAfter === 'function') {
              -            this.#disposeAfter = disposeAfter;
              -            this.#disposed = [];
              -        }
              -        else {
              -            this.#disposeAfter = undefined;
              -            this.#disposed = undefined;
              -        }
              -        this.#hasDispose = !!this.#dispose;
              -        this.#hasDisposeAfter = !!this.#disposeAfter;
              -        this.noDisposeOnSet = !!noDisposeOnSet;
              -        this.noUpdateTTL = !!noUpdateTTL;
              -        this.noDeleteOnFetchRejection = !!noDeleteOnFetchRejection;
              -        this.allowStaleOnFetchRejection = !!allowStaleOnFetchRejection;
              -        this.allowStaleOnFetchAbort = !!allowStaleOnFetchAbort;
              -        this.ignoreFetchAbort = !!ignoreFetchAbort;
              -        // NB: maxEntrySize is set to maxSize if it's set
              -        if (this.maxEntrySize !== 0) {
              -            if (this.#maxSize !== 0) {
              -                if (!isPosInt(this.#maxSize)) {
              -                    throw new TypeError('maxSize must be a positive integer if specified');
              -                }
              -            }
              -            if (!isPosInt(this.maxEntrySize)) {
              -                throw new TypeError('maxEntrySize must be a positive integer if specified');
              -            }
              -            this.#initializeSizeTracking();
              -        }
              -        this.allowStale = !!allowStale;
              -        this.noDeleteOnStaleGet = !!noDeleteOnStaleGet;
              -        this.updateAgeOnGet = !!updateAgeOnGet;
              -        this.updateAgeOnHas = !!updateAgeOnHas;
              -        this.ttlResolution =
              -            isPosInt(ttlResolution) || ttlResolution === 0
              -                ? ttlResolution
              -                : 1;
              -        this.ttlAutopurge = !!ttlAutopurge;
              -        this.ttl = ttl || 0;
              -        if (this.ttl) {
              -            if (!isPosInt(this.ttl)) {
              -                throw new TypeError('ttl must be a positive integer if specified');
              -            }
              -            this.#initializeTTLTracking();
              -        }
              -        // do not allow completely unbounded caches
              -        if (this.#max === 0 && this.ttl === 0 && this.#maxSize === 0) {
              -            throw new TypeError('At least one of max, maxSize, or ttl is required');
              -        }
              -        if (!this.ttlAutopurge && !this.#max && !this.#maxSize) {
              -            const code = 'LRU_CACHE_UNBOUNDED';
              -            if (shouldWarn(code)) {
              -                warned.add(code);
              -                const msg = 'TTL caching without ttlAutopurge, max, or maxSize can ' +
              -                    'result in unbounded memory consumption.';
              -                emitWarning(msg, 'UnboundedCacheWarning', code, LRUCache);
              -            }
              -        }
              -    }
              -    /**
              -     * Return the number of ms left in the item's TTL. If item is not in cache,
              -     * returns `0`. Returns `Infinity` if item is in cache without a defined TTL.
              -     */
              -    getRemainingTTL(key) {
              -        return this.#keyMap.has(key) ? Infinity : 0;
              -    }
              -    #initializeTTLTracking() {
              -        const ttls = new ZeroArray(this.#max);
              -        const starts = new ZeroArray(this.#max);
              -        this.#ttls = ttls;
              -        this.#starts = starts;
              -        this.#setItemTTL = (index, ttl, start = perf.now()) => {
              -            starts[index] = ttl !== 0 ? start : 0;
              -            ttls[index] = ttl;
              -            if (ttl !== 0 && this.ttlAutopurge) {
              -                const t = setTimeout(() => {
              -                    if (this.#isStale(index)) {
              -                        this.#delete(this.#keyList[index], 'expire');
              -                    }
              -                }, ttl + 1);
              -                // unref() not supported on all platforms
              -                /* c8 ignore start */
              -                if (t.unref) {
              -                    t.unref();
              -                }
              -                /* c8 ignore stop */
              -            }
              -        };
              -        this.#updateItemAge = index => {
              -            starts[index] = ttls[index] !== 0 ? perf.now() : 0;
              -        };
              -        this.#statusTTL = (status, index) => {
              -            if (ttls[index]) {
              -                const ttl = ttls[index];
              -                const start = starts[index];
              -                /* c8 ignore next */
              -                if (!ttl || !start)
              -                    return;
              -                status.ttl = ttl;
              -                status.start = start;
              -                status.now = cachedNow || getNow();
              -                const age = status.now - start;
              -                status.remainingTTL = ttl - age;
              -            }
              -        };
              -        // debounce calls to perf.now() to 1s so we're not hitting
              -        // that costly call repeatedly.
              -        let cachedNow = 0;
              -        const getNow = () => {
              -            const n = perf.now();
              -            if (this.ttlResolution > 0) {
              -                cachedNow = n;
              -                const t = setTimeout(() => (cachedNow = 0), this.ttlResolution);
              -                // not available on all platforms
              -                /* c8 ignore start */
              -                if (t.unref) {
              -                    t.unref();
              -                }
              -                /* c8 ignore stop */
              -            }
              -            return n;
              -        };
              -        this.getRemainingTTL = key => {
              -            const index = this.#keyMap.get(key);
              -            if (index === undefined) {
              -                return 0;
              -            }
              -            const ttl = ttls[index];
              -            const start = starts[index];
              -            if (!ttl || !start) {
              -                return Infinity;
              -            }
              -            const age = (cachedNow || getNow()) - start;
              -            return ttl - age;
              -        };
              -        this.#isStale = index => {
              -            const s = starts[index];
              -            const t = ttls[index];
              -            return !!t && !!s && (cachedNow || getNow()) - s > t;
              -        };
              -    }
              -    // conditionally set private methods related to TTL
              -    #updateItemAge = () => { };
              -    #statusTTL = () => { };
              -    #setItemTTL = () => { };
              -    /* c8 ignore stop */
              -    #isStale = () => false;
              -    #initializeSizeTracking() {
              -        const sizes = new ZeroArray(this.#max);
              -        this.#calculatedSize = 0;
              -        this.#sizes = sizes;
              -        this.#removeItemSize = index => {
              -            this.#calculatedSize -= sizes[index];
              -            sizes[index] = 0;
              -        };
              -        this.#requireSize = (k, v, size, sizeCalculation) => {
              -            // provisionally accept background fetches.
              -            // actual value size will be checked when they return.
              -            if (this.#isBackgroundFetch(v)) {
              -                return 0;
              -            }
              -            if (!isPosInt(size)) {
              -                if (sizeCalculation) {
              -                    if (typeof sizeCalculation !== 'function') {
              -                        throw new TypeError('sizeCalculation must be a function');
              -                    }
              -                    size = sizeCalculation(v, k);
              -                    if (!isPosInt(size)) {
              -                        throw new TypeError('sizeCalculation return invalid (expect positive integer)');
              -                    }
              -                }
              -                else {
              -                    throw new TypeError('invalid size value (must be positive integer). ' +
              -                        'When maxSize or maxEntrySize is used, sizeCalculation ' +
              -                        'or size must be set.');
              -                }
              -            }
              -            return size;
              -        };
              -        this.#addItemSize = (index, size, status) => {
              -            sizes[index] = size;
              -            if (this.#maxSize) {
              -                const maxSize = this.#maxSize - sizes[index];
              -                while (this.#calculatedSize > maxSize) {
              -                    this.#evict(true);
              -                }
              -            }
              -            this.#calculatedSize += sizes[index];
              -            if (status) {
              -                status.entrySize = size;
              -                status.totalCalculatedSize = this.#calculatedSize;
              -            }
              -        };
              -    }
              -    #removeItemSize = _i => { };
              -    #addItemSize = (_i, _s, _st) => { };
              -    #requireSize = (_k, _v, size, sizeCalculation) => {
              -        if (size || sizeCalculation) {
              -            throw new TypeError('cannot set size without setting maxSize or maxEntrySize on cache');
              -        }
              -        return 0;
              -    };
              -    *#indexes({ allowStale = this.allowStale } = {}) {
              -        if (this.#size) {
              -            for (let i = this.#tail; true;) {
              -                if (!this.#isValidIndex(i)) {
              -                    break;
              -                }
              -                if (allowStale || !this.#isStale(i)) {
              -                    yield i;
              -                }
              -                if (i === this.#head) {
              -                    break;
              -                }
              -                else {
              -                    i = this.#prev[i];
              -                }
              -            }
              -        }
              -    }
              -    *#rindexes({ allowStale = this.allowStale } = {}) {
              -        if (this.#size) {
              -            for (let i = this.#head; true;) {
              -                if (!this.#isValidIndex(i)) {
              -                    break;
              -                }
              -                if (allowStale || !this.#isStale(i)) {
              -                    yield i;
              -                }
              -                if (i === this.#tail) {
              -                    break;
              -                }
              -                else {
              -                    i = this.#next[i];
              -                }
              -            }
              -        }
              -    }
              -    #isValidIndex(index) {
              -        return (index !== undefined &&
              -            this.#keyMap.get(this.#keyList[index]) === index);
              -    }
              -    /**
              -     * Return a generator yielding `[key, value]` pairs,
              -     * in order from most recently used to least recently used.
              -     */
              -    *entries() {
              -        for (const i of this.#indexes()) {
              -            if (this.#valList[i] !== undefined &&
              -                this.#keyList[i] !== undefined &&
              -                !this.#isBackgroundFetch(this.#valList[i])) {
              -                yield [this.#keyList[i], this.#valList[i]];
              -            }
              -        }
              -    }
              -    /**
              -     * Inverse order version of {@link LRUCache.entries}
              -     *
              -     * Return a generator yielding `[key, value]` pairs,
              -     * in order from least recently used to most recently used.
              -     */
              -    *rentries() {
              -        for (const i of this.#rindexes()) {
              -            if (this.#valList[i] !== undefined &&
              -                this.#keyList[i] !== undefined &&
              -                !this.#isBackgroundFetch(this.#valList[i])) {
              -                yield [this.#keyList[i], this.#valList[i]];
              -            }
              -        }
              -    }
              -    /**
              -     * Return a generator yielding the keys in the cache,
              -     * in order from most recently used to least recently used.
              -     */
              -    *keys() {
              -        for (const i of this.#indexes()) {
              -            const k = this.#keyList[i];
              -            if (k !== undefined &&
              -                !this.#isBackgroundFetch(this.#valList[i])) {
              -                yield k;
              -            }
              -        }
              -    }
              -    /**
              -     * Inverse order version of {@link LRUCache.keys}
              -     *
              -     * Return a generator yielding the keys in the cache,
              -     * in order from least recently used to most recently used.
              -     */
              -    *rkeys() {
              -        for (const i of this.#rindexes()) {
              -            const k = this.#keyList[i];
              -            if (k !== undefined &&
              -                !this.#isBackgroundFetch(this.#valList[i])) {
              -                yield k;
              -            }
              -        }
              -    }
              -    /**
              -     * Return a generator yielding the values in the cache,
              -     * in order from most recently used to least recently used.
              -     */
              -    *values() {
              -        for (const i of this.#indexes()) {
              -            const v = this.#valList[i];
              -            if (v !== undefined &&
              -                !this.#isBackgroundFetch(this.#valList[i])) {
              -                yield this.#valList[i];
              -            }
              -        }
              -    }
              -    /**
              -     * Inverse order version of {@link LRUCache.values}
              -     *
              -     * Return a generator yielding the values in the cache,
              -     * in order from least recently used to most recently used.
              -     */
              -    *rvalues() {
              -        for (const i of this.#rindexes()) {
              -            const v = this.#valList[i];
              -            if (v !== undefined &&
              -                !this.#isBackgroundFetch(this.#valList[i])) {
              -                yield this.#valList[i];
              -            }
              -        }
              -    }
              -    /**
              -     * Iterating over the cache itself yields the same results as
              -     * {@link LRUCache.entries}
              -     */
              -    [Symbol.iterator]() {
              -        return this.entries();
              -    }
              -    /**
              -     * A String value that is used in the creation of the default string
              -     * description of an object. Called by the built-in method
              -     * `Object.prototype.toString`.
              -     */
              -    [Symbol.toStringTag] = 'LRUCache';
              -    /**
              -     * Find a value for which the supplied fn method returns a truthy value,
              -     * similar to `Array.find()`. fn is called as `fn(value, key, cache)`.
              -     */
              -    find(fn, getOptions = {}) {
              -        for (const i of this.#indexes()) {
              -            const v = this.#valList[i];
              -            const value = this.#isBackgroundFetch(v)
              -                ? v.__staleWhileFetching
              -                : v;
              -            if (value === undefined)
              -                continue;
              -            if (fn(value, this.#keyList[i], this)) {
              -                return this.get(this.#keyList[i], getOptions);
              -            }
              -        }
              -    }
              -    /**
              -     * Call the supplied function on each item in the cache, in order from most
              -     * recently used to least recently used.
              -     *
              -     * `fn` is called as `fn(value, key, cache)`.
              -     *
              -     * If `thisp` is provided, function will be called in the `this`-context of
              -     * the provided object, or the cache if no `thisp` object is provided.
              -     *
              -     * Does not update age or recenty of use, or iterate over stale values.
              -     */
              -    forEach(fn, thisp = this) {
              -        for (const i of this.#indexes()) {
              -            const v = this.#valList[i];
              -            const value = this.#isBackgroundFetch(v)
              -                ? v.__staleWhileFetching
              -                : v;
              -            if (value === undefined)
              -                continue;
              -            fn.call(thisp, value, this.#keyList[i], this);
              -        }
              -    }
              -    /**
              -     * The same as {@link LRUCache.forEach} but items are iterated over in
              -     * reverse order.  (ie, less recently used items are iterated over first.)
              -     */
              -    rforEach(fn, thisp = this) {
              -        for (const i of this.#rindexes()) {
              -            const v = this.#valList[i];
              -            const value = this.#isBackgroundFetch(v)
              -                ? v.__staleWhileFetching
              -                : v;
              -            if (value === undefined)
              -                continue;
              -            fn.call(thisp, value, this.#keyList[i], this);
              -        }
              -    }
              -    /**
              -     * Delete any stale entries. Returns true if anything was removed,
              -     * false otherwise.
              -     */
              -    purgeStale() {
              -        let deleted = false;
              -        for (const i of this.#rindexes({ allowStale: true })) {
              -            if (this.#isStale(i)) {
              -                this.#delete(this.#keyList[i], 'expire');
              -                deleted = true;
              -            }
              -        }
              -        return deleted;
              -    }
              -    /**
              -     * Get the extended info about a given entry, to get its value, size, and
              -     * TTL info simultaneously. Returns `undefined` if the key is not present.
              -     *
              -     * Unlike {@link LRUCache#dump}, which is designed to be portable and survive
              -     * serialization, the `start` value is always the current timestamp, and the
              -     * `ttl` is a calculated remaining time to live (negative if expired).
              -     *
              -     * Always returns stale values, if their info is found in the cache, so be
              -     * sure to check for expirations (ie, a negative {@link LRUCache.Entry#ttl})
              -     * if relevant.
              -     */
              -    info(key) {
              -        const i = this.#keyMap.get(key);
              -        if (i === undefined)
              -            return undefined;
              -        const v = this.#valList[i];
              -        const value = this.#isBackgroundFetch(v)
              -            ? v.__staleWhileFetching
              -            : v;
              -        if (value === undefined)
              -            return undefined;
              -        const entry = { value };
              -        if (this.#ttls && this.#starts) {
              -            const ttl = this.#ttls[i];
              -            const start = this.#starts[i];
              -            if (ttl && start) {
              -                const remain = ttl - (perf.now() - start);
              -                entry.ttl = remain;
              -                entry.start = Date.now();
              -            }
              -        }
              -        if (this.#sizes) {
              -            entry.size = this.#sizes[i];
              -        }
              -        return entry;
              -    }
              -    /**
              -     * Return an array of [key, {@link LRUCache.Entry}] tuples which can be
              -     * passed to {@link LRLUCache#load}.
              -     *
              -     * The `start` fields are calculated relative to a portable `Date.now()`
              -     * timestamp, even if `performance.now()` is available.
              -     *
              -     * Stale entries are always included in the `dump`, even if
              -     * {@link LRUCache.OptionsBase.allowStale} is false.
              -     *
              -     * Note: this returns an actual array, not a generator, so it can be more
              -     * easily passed around.
              -     */
              -    dump() {
              -        const arr = [];
              -        for (const i of this.#indexes({ allowStale: true })) {
              -            const key = this.#keyList[i];
              -            const v = this.#valList[i];
              -            const value = this.#isBackgroundFetch(v)
              -                ? v.__staleWhileFetching
              -                : v;
              -            if (value === undefined || key === undefined)
              -                continue;
              -            const entry = { value };
              -            if (this.#ttls && this.#starts) {
              -                entry.ttl = this.#ttls[i];
              -                // always dump the start relative to a portable timestamp
              -                // it's ok for this to be a bit slow, it's a rare operation.
              -                const age = perf.now() - this.#starts[i];
              -                entry.start = Math.floor(Date.now() - age);
              -            }
              -            if (this.#sizes) {
              -                entry.size = this.#sizes[i];
              -            }
              -            arr.unshift([key, entry]);
              -        }
              -        return arr;
              -    }
              -    /**
              -     * Reset the cache and load in the items in entries in the order listed.
              -     *
              -     * The shape of the resulting cache may be different if the same options are
              -     * not used in both caches.
              -     *
              -     * The `start` fields are assumed to be calculated relative to a portable
              -     * `Date.now()` timestamp, even if `performance.now()` is available.
              -     */
              -    load(arr) {
              -        this.clear();
              -        for (const [key, entry] of arr) {
              -            if (entry.start) {
              -                // entry.start is a portable timestamp, but we may be using
              -                // node's performance.now(), so calculate the offset, so that
              -                // we get the intended remaining TTL, no matter how long it's
              -                // been on ice.
              -                //
              -                // it's ok for this to be a bit slow, it's a rare operation.
              -                const age = Date.now() - entry.start;
              -                entry.start = perf.now() - age;
              -            }
              -            this.set(key, entry.value, entry);
              -        }
              -    }
              -    /**
              -     * Add a value to the cache.
              -     *
              -     * Note: if `undefined` is specified as a value, this is an alias for
              -     * {@link LRUCache#delete}
              -     *
              -     * Fields on the {@link LRUCache.SetOptions} options param will override
              -     * their corresponding values in the constructor options for the scope
              -     * of this single `set()` operation.
              -     *
              -     * If `start` is provided, then that will set the effective start
              -     * time for the TTL calculation. Note that this must be a previous
              -     * value of `performance.now()` if supported, or a previous value of
              -     * `Date.now()` if not.
              -     *
              -     * Options object may also include `size`, which will prevent
              -     * calling the `sizeCalculation` function and just use the specified
              -     * number if it is a positive integer, and `noDisposeOnSet` which
              -     * will prevent calling a `dispose` function in the case of
              -     * overwrites.
              -     *
              -     * If the `size` (or return value of `sizeCalculation`) for a given
              -     * entry is greater than `maxEntrySize`, then the item will not be
              -     * added to the cache.
              -     *
              -     * Will update the recency of the entry.
              -     *
              -     * If the value is `undefined`, then this is an alias for
              -     * `cache.delete(key)`. `undefined` is never stored in the cache.
              -     */
              -    set(k, v, setOptions = {}) {
              -        if (v === undefined) {
              -            this.delete(k);
              -            return this;
              -        }
              -        const { ttl = this.ttl, start, noDisposeOnSet = this.noDisposeOnSet, sizeCalculation = this.sizeCalculation, status, } = setOptions;
              -        let { noUpdateTTL = this.noUpdateTTL } = setOptions;
              -        const size = this.#requireSize(k, v, setOptions.size || 0, sizeCalculation);
              -        // if the item doesn't fit, don't do anything
              -        // NB: maxEntrySize set to maxSize by default
              -        if (this.maxEntrySize && size > this.maxEntrySize) {
              -            if (status) {
              -                status.set = 'miss';
              -                status.maxEntrySizeExceeded = true;
              -            }
              -            // have to delete, in case something is there already.
              -            this.#delete(k, 'set');
              -            return this;
              -        }
              -        let index = this.#size === 0 ? undefined : this.#keyMap.get(k);
              -        if (index === undefined) {
              -            // addition
              -            index = (this.#size === 0
              -                ? this.#tail
              -                : this.#free.length !== 0
              -                    ? this.#free.pop()
              -                    : this.#size === this.#max
              -                        ? this.#evict(false)
              -                        : this.#size);
              -            this.#keyList[index] = k;
              -            this.#valList[index] = v;
              -            this.#keyMap.set(k, index);
              -            this.#next[this.#tail] = index;
              -            this.#prev[index] = this.#tail;
              -            this.#tail = index;
              -            this.#size++;
              -            this.#addItemSize(index, size, status);
              -            if (status)
              -                status.set = 'add';
              -            noUpdateTTL = false;
              -        }
              -        else {
              -            // update
              -            this.#moveToTail(index);
              -            const oldVal = this.#valList[index];
              -            if (v !== oldVal) {
              -                if (this.#hasFetchMethod && this.#isBackgroundFetch(oldVal)) {
              -                    oldVal.__abortController.abort(new Error('replaced'));
              -                    const { __staleWhileFetching: s } = oldVal;
              -                    if (s !== undefined && !noDisposeOnSet) {
              -                        if (this.#hasDispose) {
              -                            this.#dispose?.(s, k, 'set');
              -                        }
              -                        if (this.#hasDisposeAfter) {
              -                            this.#disposed?.push([s, k, 'set']);
              -                        }
              -                    }
              -                }
              -                else if (!noDisposeOnSet) {
              -                    if (this.#hasDispose) {
              -                        this.#dispose?.(oldVal, k, 'set');
              -                    }
              -                    if (this.#hasDisposeAfter) {
              -                        this.#disposed?.push([oldVal, k, 'set']);
              -                    }
              -                }
              -                this.#removeItemSize(index);
              -                this.#addItemSize(index, size, status);
              -                this.#valList[index] = v;
              -                if (status) {
              -                    status.set = 'replace';
              -                    const oldValue = oldVal && this.#isBackgroundFetch(oldVal)
              -                        ? oldVal.__staleWhileFetching
              -                        : oldVal;
              -                    if (oldValue !== undefined)
              -                        status.oldValue = oldValue;
              -                }
              -            }
              -            else if (status) {
              -                status.set = 'update';
              -            }
              -        }
              -        if (ttl !== 0 && !this.#ttls) {
              -            this.#initializeTTLTracking();
              -        }
              -        if (this.#ttls) {
              -            if (!noUpdateTTL) {
              -                this.#setItemTTL(index, ttl, start);
              -            }
              -            if (status)
              -                this.#statusTTL(status, index);
              -        }
              -        if (!noDisposeOnSet && this.#hasDisposeAfter && this.#disposed) {
              -            const dt = this.#disposed;
              -            let task;
              -            while ((task = dt?.shift())) {
              -                this.#disposeAfter?.(...task);
              -            }
              -        }
              -        return this;
              -    }
              -    /**
              -     * Evict the least recently used item, returning its value or
              -     * `undefined` if cache is empty.
              -     */
              -    pop() {
              -        try {
              -            while (this.#size) {
              -                const val = this.#valList[this.#head];
              -                this.#evict(true);
              -                if (this.#isBackgroundFetch(val)) {
              -                    if (val.__staleWhileFetching) {
              -                        return val.__staleWhileFetching;
              -                    }
              -                }
              -                else if (val !== undefined) {
              -                    return val;
              -                }
              -            }
              -        }
              -        finally {
              -            if (this.#hasDisposeAfter && this.#disposed) {
              -                const dt = this.#disposed;
              -                let task;
              -                while ((task = dt?.shift())) {
              -                    this.#disposeAfter?.(...task);
              -                }
              -            }
              -        }
              -    }
              -    #evict(free) {
              -        const head = this.#head;
              -        const k = this.#keyList[head];
              -        const v = this.#valList[head];
              -        if (this.#hasFetchMethod && this.#isBackgroundFetch(v)) {
              -            v.__abortController.abort(new Error('evicted'));
              -        }
              -        else if (this.#hasDispose || this.#hasDisposeAfter) {
              -            if (this.#hasDispose) {
              -                this.#dispose?.(v, k, 'evict');
              -            }
              -            if (this.#hasDisposeAfter) {
              -                this.#disposed?.push([v, k, 'evict']);
              -            }
              -        }
              -        this.#removeItemSize(head);
              -        // if we aren't about to use the index, then null these out
              -        if (free) {
              -            this.#keyList[head] = undefined;
              -            this.#valList[head] = undefined;
              -            this.#free.push(head);
              -        }
              -        if (this.#size === 1) {
              -            this.#head = this.#tail = 0;
              -            this.#free.length = 0;
              -        }
              -        else {
              -            this.#head = this.#next[head];
              -        }
              -        this.#keyMap.delete(k);
              -        this.#size--;
              -        return head;
              -    }
              -    /**
              -     * Check if a key is in the cache, without updating the recency of use.
              -     * Will return false if the item is stale, even though it is technically
              -     * in the cache.
              -     *
              -     * Check if a key is in the cache, without updating the recency of
              -     * use. Age is updated if {@link LRUCache.OptionsBase.updateAgeOnHas} is set
              -     * to `true` in either the options or the constructor.
              -     *
              -     * Will return `false` if the item is stale, even though it is technically in
              -     * the cache. The difference can be determined (if it matters) by using a
              -     * `status` argument, and inspecting the `has` field.
              -     *
              -     * Will not update item age unless
              -     * {@link LRUCache.OptionsBase.updateAgeOnHas} is set.
              -     */
              -    has(k, hasOptions = {}) {
              -        const { updateAgeOnHas = this.updateAgeOnHas, status } = hasOptions;
              -        const index = this.#keyMap.get(k);
              -        if (index !== undefined) {
              -            const v = this.#valList[index];
              -            if (this.#isBackgroundFetch(v) &&
              -                v.__staleWhileFetching === undefined) {
              -                return false;
              -            }
              -            if (!this.#isStale(index)) {
              -                if (updateAgeOnHas) {
              -                    this.#updateItemAge(index);
              -                }
              -                if (status) {
              -                    status.has = 'hit';
              -                    this.#statusTTL(status, index);
              -                }
              -                return true;
              -            }
              -            else if (status) {
              -                status.has = 'stale';
              -                this.#statusTTL(status, index);
              -            }
              -        }
              -        else if (status) {
              -            status.has = 'miss';
              -        }
              -        return false;
              -    }
              -    /**
              -     * Like {@link LRUCache#get} but doesn't update recency or delete stale
              -     * items.
              -     *
              -     * Returns `undefined` if the item is stale, unless
              -     * {@link LRUCache.OptionsBase.allowStale} is set.
              -     */
              -    peek(k, peekOptions = {}) {
              -        const { allowStale = this.allowStale } = peekOptions;
              -        const index = this.#keyMap.get(k);
              -        if (index === undefined ||
              -            (!allowStale && this.#isStale(index))) {
              -            return;
              -        }
              -        const v = this.#valList[index];
              -        // either stale and allowed, or forcing a refresh of non-stale value
              -        return this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v;
              -    }
              -    #backgroundFetch(k, index, options, context) {
              -        const v = index === undefined ? undefined : this.#valList[index];
              -        if (this.#isBackgroundFetch(v)) {
              -            return v;
              -        }
              -        const ac = new AC();
              -        const { signal } = options;
              -        // when/if our AC signals, then stop listening to theirs.
              -        signal?.addEventListener('abort', () => ac.abort(signal.reason), {
              -            signal: ac.signal,
              -        });
              -        const fetchOpts = {
              -            signal: ac.signal,
              -            options,
              -            context,
              -        };
              -        const cb = (v, updateCache = false) => {
              -            const { aborted } = ac.signal;
              -            const ignoreAbort = options.ignoreFetchAbort && v !== undefined;
              -            if (options.status) {
              -                if (aborted && !updateCache) {
              -                    options.status.fetchAborted = true;
              -                    options.status.fetchError = ac.signal.reason;
              -                    if (ignoreAbort)
              -                        options.status.fetchAbortIgnored = true;
              -                }
              -                else {
              -                    options.status.fetchResolved = true;
              -                }
              -            }
              -            if (aborted && !ignoreAbort && !updateCache) {
              -                return fetchFail(ac.signal.reason);
              -            }
              -            // either we didn't abort, and are still here, or we did, and ignored
              -            const bf = p;
              -            if (this.#valList[index] === p) {
              -                if (v === undefined) {
              -                    if (bf.__staleWhileFetching) {
              -                        this.#valList[index] = bf.__staleWhileFetching;
              -                    }
              -                    else {
              -                        this.#delete(k, 'fetch');
              -                    }
              -                }
              -                else {
              -                    if (options.status)
              -                        options.status.fetchUpdated = true;
              -                    this.set(k, v, fetchOpts.options);
              -                }
              -            }
              -            return v;
              -        };
              -        const eb = (er) => {
              -            if (options.status) {
              -                options.status.fetchRejected = true;
              -                options.status.fetchError = er;
              -            }
              -            return fetchFail(er);
              -        };
              -        const fetchFail = (er) => {
              -            const { aborted } = ac.signal;
              -            const allowStaleAborted = aborted && options.allowStaleOnFetchAbort;
              -            const allowStale = allowStaleAborted || options.allowStaleOnFetchRejection;
              -            const noDelete = allowStale || options.noDeleteOnFetchRejection;
              -            const bf = p;
              -            if (this.#valList[index] === p) {
              -                // if we allow stale on fetch rejections, then we need to ensure that
              -                // the stale value is not removed from the cache when the fetch fails.
              -                const del = !noDelete || bf.__staleWhileFetching === undefined;
              -                if (del) {
              -                    this.#delete(k, 'fetch');
              -                }
              -                else if (!allowStaleAborted) {
              -                    // still replace the *promise* with the stale value,
              -                    // since we are done with the promise at this point.
              -                    // leave it untouched if we're still waiting for an
              -                    // aborted background fetch that hasn't yet returned.
              -                    this.#valList[index] = bf.__staleWhileFetching;
              -                }
              -            }
              -            if (allowStale) {
              -                if (options.status && bf.__staleWhileFetching !== undefined) {
              -                    options.status.returnedStale = true;
              -                }
              -                return bf.__staleWhileFetching;
              -            }
              -            else if (bf.__returned === bf) {
              -                throw er;
              -            }
              -        };
              -        const pcall = (res, rej) => {
              -            const fmp = this.#fetchMethod?.(k, v, fetchOpts);
              -            if (fmp && fmp instanceof Promise) {
              -                fmp.then(v => res(v === undefined ? undefined : v), rej);
              -            }
              -            // ignored, we go until we finish, regardless.
              -            // defer check until we are actually aborting,
              -            // so fetchMethod can override.
              -            ac.signal.addEventListener('abort', () => {
              -                if (!options.ignoreFetchAbort ||
              -                    options.allowStaleOnFetchAbort) {
              -                    res(undefined);
              -                    // when it eventually resolves, update the cache.
              -                    if (options.allowStaleOnFetchAbort) {
              -                        res = v => cb(v, true);
              -                    }
              -                }
              -            });
              -        };
              -        if (options.status)
              -            options.status.fetchDispatched = true;
              -        const p = new Promise(pcall).then(cb, eb);
              -        const bf = Object.assign(p, {
              -            __abortController: ac,
              -            __staleWhileFetching: v,
              -            __returned: undefined,
              -        });
              -        if (index === undefined) {
              -            // internal, don't expose status.
              -            this.set(k, bf, { ...fetchOpts.options, status: undefined });
              -            index = this.#keyMap.get(k);
              -        }
              -        else {
              -            this.#valList[index] = bf;
              -        }
              -        return bf;
              -    }
              -    #isBackgroundFetch(p) {
              -        if (!this.#hasFetchMethod)
              -            return false;
              -        const b = p;
              -        return (!!b &&
              -            b instanceof Promise &&
              -            b.hasOwnProperty('__staleWhileFetching') &&
              -            b.__abortController instanceof AC);
              -    }
              -    async fetch(k, fetchOptions = {}) {
              -        const { 
              -        // get options
              -        allowStale = this.allowStale, updateAgeOnGet = this.updateAgeOnGet, noDeleteOnStaleGet = this.noDeleteOnStaleGet, 
              -        // set options
              -        ttl = this.ttl, noDisposeOnSet = this.noDisposeOnSet, size = 0, sizeCalculation = this.sizeCalculation, noUpdateTTL = this.noUpdateTTL, 
              -        // fetch exclusive options
              -        noDeleteOnFetchRejection = this.noDeleteOnFetchRejection, allowStaleOnFetchRejection = this.allowStaleOnFetchRejection, ignoreFetchAbort = this.ignoreFetchAbort, allowStaleOnFetchAbort = this.allowStaleOnFetchAbort, context, forceRefresh = false, status, signal, } = fetchOptions;
              -        if (!this.#hasFetchMethod) {
              -            if (status)
              -                status.fetch = 'get';
              -            return this.get(k, {
              -                allowStale,
              -                updateAgeOnGet,
              -                noDeleteOnStaleGet,
              -                status,
              -            });
              -        }
              -        const options = {
              -            allowStale,
              -            updateAgeOnGet,
              -            noDeleteOnStaleGet,
              -            ttl,
              -            noDisposeOnSet,
              -            size,
              -            sizeCalculation,
              -            noUpdateTTL,
              -            noDeleteOnFetchRejection,
              -            allowStaleOnFetchRejection,
              -            allowStaleOnFetchAbort,
              -            ignoreFetchAbort,
              -            status,
              -            signal,
              -        };
              -        let index = this.#keyMap.get(k);
              -        if (index === undefined) {
              -            if (status)
              -                status.fetch = 'miss';
              -            const p = this.#backgroundFetch(k, index, options, context);
              -            return (p.__returned = p);
              -        }
              -        else {
              -            // in cache, maybe already fetching
              -            const v = this.#valList[index];
              -            if (this.#isBackgroundFetch(v)) {
              -                const stale = allowStale && v.__staleWhileFetching !== undefined;
              -                if (status) {
              -                    status.fetch = 'inflight';
              -                    if (stale)
              -                        status.returnedStale = true;
              -                }
              -                return stale ? v.__staleWhileFetching : (v.__returned = v);
              -            }
              -            // if we force a refresh, that means do NOT serve the cached value,
              -            // unless we are already in the process of refreshing the cache.
              -            const isStale = this.#isStale(index);
              -            if (!forceRefresh && !isStale) {
              -                if (status)
              -                    status.fetch = 'hit';
              -                this.#moveToTail(index);
              -                if (updateAgeOnGet) {
              -                    this.#updateItemAge(index);
              -                }
              -                if (status)
              -                    this.#statusTTL(status, index);
              -                return v;
              -            }
              -            // ok, it is stale or a forced refresh, and not already fetching.
              -            // refresh the cache.
              -            const p = this.#backgroundFetch(k, index, options, context);
              -            const hasStale = p.__staleWhileFetching !== undefined;
              -            const staleVal = hasStale && allowStale;
              -            if (status) {
              -                status.fetch = isStale ? 'stale' : 'refresh';
              -                if (staleVal && isStale)
              -                    status.returnedStale = true;
              -            }
              -            return staleVal ? p.__staleWhileFetching : (p.__returned = p);
              -        }
              -    }
              -    async forceFetch(k, fetchOptions = {}) {
              -        const v = await this.fetch(k, fetchOptions);
              -        if (v === undefined)
              -            throw new Error('fetch() returned undefined');
              -        return v;
              -    }
              -    memo(k, memoOptions = {}) {
              -        const memoMethod = this.#memoMethod;
              -        if (!memoMethod) {
              -            throw new Error('no memoMethod provided to constructor');
              -        }
              -        const { context, forceRefresh, ...options } = memoOptions;
              -        const v = this.get(k, options);
              -        if (!forceRefresh && v !== undefined)
              -            return v;
              -        const vv = memoMethod(k, v, {
              -            options,
              -            context,
              -        });
              -        this.set(k, vv, options);
              -        return vv;
              -    }
              -    /**
              -     * Return a value from the cache. Will update the recency of the cache
              -     * entry found.
              -     *
              -     * If the key is not found, get() will return `undefined`.
              -     */
              -    get(k, getOptions = {}) {
              -        const { allowStale = this.allowStale, updateAgeOnGet = this.updateAgeOnGet, noDeleteOnStaleGet = this.noDeleteOnStaleGet, status, } = getOptions;
              -        const index = this.#keyMap.get(k);
              -        if (index !== undefined) {
              -            const value = this.#valList[index];
              -            const fetching = this.#isBackgroundFetch(value);
              -            if (status)
              -                this.#statusTTL(status, index);
              -            if (this.#isStale(index)) {
              -                if (status)
              -                    status.get = 'stale';
              -                // delete only if not an in-flight background fetch
              -                if (!fetching) {
              -                    if (!noDeleteOnStaleGet) {
              -                        this.#delete(k, 'expire');
              -                    }
              -                    if (status && allowStale)
              -                        status.returnedStale = true;
              -                    return allowStale ? value : undefined;
              -                }
              -                else {
              -                    if (status &&
              -                        allowStale &&
              -                        value.__staleWhileFetching !== undefined) {
              -                        status.returnedStale = true;
              -                    }
              -                    return allowStale ? value.__staleWhileFetching : undefined;
              -                }
              -            }
              -            else {
              -                if (status)
              -                    status.get = 'hit';
              -                // if we're currently fetching it, we don't actually have it yet
              -                // it's not stale, which means this isn't a staleWhileRefetching.
              -                // If it's not stale, and fetching, AND has a __staleWhileFetching
              -                // value, then that means the user fetched with {forceRefresh:true},
              -                // so it's safe to return that value.
              -                if (fetching) {
              -                    return value.__staleWhileFetching;
              -                }
              -                this.#moveToTail(index);
              -                if (updateAgeOnGet) {
              -                    this.#updateItemAge(index);
              -                }
              -                return value;
              -            }
              -        }
              -        else if (status) {
              -            status.get = 'miss';
              -        }
              -    }
              -    #connect(p, n) {
              -        this.#prev[n] = p;
              -        this.#next[p] = n;
              -    }
              -    #moveToTail(index) {
              -        // if tail already, nothing to do
              -        // if head, move head to next[index]
              -        // else
              -        //   move next[prev[index]] to next[index] (head has no prev)
              -        //   move prev[next[index]] to prev[index]
              -        // prev[index] = tail
              -        // next[tail] = index
              -        // tail = index
              -        if (index !== this.#tail) {
              -            if (index === this.#head) {
              -                this.#head = this.#next[index];
              -            }
              -            else {
              -                this.#connect(this.#prev[index], this.#next[index]);
              -            }
              -            this.#connect(this.#tail, index);
              -            this.#tail = index;
              -        }
              -    }
              -    /**
              -     * Deletes a key out of the cache.
              -     *
              -     * Returns true if the key was deleted, false otherwise.
              -     */
              -    delete(k) {
              -        return this.#delete(k, 'delete');
              -    }
              -    #delete(k, reason) {
              -        let deleted = false;
              -        if (this.#size !== 0) {
              -            const index = this.#keyMap.get(k);
              -            if (index !== undefined) {
              -                deleted = true;
              -                if (this.#size === 1) {
              -                    this.#clear(reason);
              -                }
              -                else {
              -                    this.#removeItemSize(index);
              -                    const v = this.#valList[index];
              -                    if (this.#isBackgroundFetch(v)) {
              -                        v.__abortController.abort(new Error('deleted'));
              -                    }
              -                    else if (this.#hasDispose || this.#hasDisposeAfter) {
              -                        if (this.#hasDispose) {
              -                            this.#dispose?.(v, k, reason);
              -                        }
              -                        if (this.#hasDisposeAfter) {
              -                            this.#disposed?.push([v, k, reason]);
              -                        }
              -                    }
              -                    this.#keyMap.delete(k);
              -                    this.#keyList[index] = undefined;
              -                    this.#valList[index] = undefined;
              -                    if (index === this.#tail) {
              -                        this.#tail = this.#prev[index];
              -                    }
              -                    else if (index === this.#head) {
              -                        this.#head = this.#next[index];
              -                    }
              -                    else {
              -                        const pi = this.#prev[index];
              -                        this.#next[pi] = this.#next[index];
              -                        const ni = this.#next[index];
              -                        this.#prev[ni] = this.#prev[index];
              -                    }
              -                    this.#size--;
              -                    this.#free.push(index);
              -                }
              -            }
              -        }
              -        if (this.#hasDisposeAfter && this.#disposed?.length) {
              -            const dt = this.#disposed;
              -            let task;
              -            while ((task = dt?.shift())) {
              -                this.#disposeAfter?.(...task);
              -            }
              -        }
              -        return deleted;
              -    }
              -    /**
              -     * Clear the cache entirely, throwing away all values.
              -     */
              -    clear() {
              -        return this.#clear('delete');
              -    }
              -    #clear(reason) {
              -        for (const index of this.#rindexes({ allowStale: true })) {
              -            const v = this.#valList[index];
              -            if (this.#isBackgroundFetch(v)) {
              -                v.__abortController.abort(new Error('deleted'));
              -            }
              -            else {
              -                const k = this.#keyList[index];
              -                if (this.#hasDispose) {
              -                    this.#dispose?.(v, k, reason);
              -                }
              -                if (this.#hasDisposeAfter) {
              -                    this.#disposed?.push([v, k, reason]);
              -                }
              -            }
              -        }
              -        this.#keyMap.clear();
              -        this.#valList.fill(undefined);
              -        this.#keyList.fill(undefined);
              -        if (this.#ttls && this.#starts) {
              -            this.#ttls.fill(0);
              -            this.#starts.fill(0);
              -        }
              -        if (this.#sizes) {
              -            this.#sizes.fill(0);
              -        }
              -        this.#head = 0;
              -        this.#tail = 0;
              -        this.#free.length = 0;
              -        this.#calculatedSize = 0;
              -        this.#size = 0;
              -        if (this.#hasDisposeAfter && this.#disposed) {
              -            const dt = this.#disposed;
              -            let task;
              -            while ((task = dt?.shift())) {
              -                this.#disposeAfter?.(...task);
              -            }
              -        }
              -    }
              -}
              -exports.LRUCache = LRUCache;
              -//# sourceMappingURL=index.js.map
              \ No newline at end of file
              diff --git a/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/index.js.map b/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/index.js.map
              deleted file mode 100644
              index 557c6161..00000000
              --- a/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/index.js.map
              +++ /dev/null
              @@ -1 +0,0 @@
              -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAIH,MAAM,IAAI,GACR,OAAO,WAAW,KAAK,QAAQ;IAC/B,WAAW;IACX,OAAO,WAAW,CAAC,GAAG,KAAK,UAAU;IACnC,CAAC,CAAC,WAAW;IACb,CAAC,CAAC,IAAI,CAAA;AAEV,MAAM,MAAM,GAAG,IAAI,GAAG,EAAU,CAAA;AAKhC,qBAAqB;AACrB,MAAM,OAAO,GAAG,CACd,OAAO,OAAO,KAAK,QAAQ,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAChC,CAAA;AACzB,qBAAqB;AAErB,MAAM,WAAW,GAAG,CAClB,GAAW,EACX,IAAY,EACZ,IAAY,E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AC,CAAA;QACxB,IAAI,CAAC,KAAK,GAAG,CAAC,CAAA;QACd,IAAI,IAAI,CAAC,gBAAgB,IAAI,IAAI,CAAC,SAAS,EAAE;YAC3C,MAAM,EAAE,GAAG,IAAI,CAAC,SAAS,CAAA;YACzB,IAAI,IAAmC,CAAA;YACvC,OAAO,CAAC,IAAI,GAAG,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE;gBAC3B,IAAI,CAAC,aAAa,EAAE,CAAC,GAAG,IAAI,CAAC,CAAA;aAC9B;SACF;IACH,CAAC;CACF;AAxwDD,4BAwwDC","sourcesContent":["/**\n * @module LRUCache\n */\n\n// module-private names and types\ntype Perf = { now: () => number }\nconst perf: Perf =\n  typeof performance === 'object' &&\n  performance &&\n  typeof performance.now === 'function'\n    ? performance\n    : Date\n\nconst warned = new Set()\n\n// either a function or a class\ntype ForC = ((...a: any[]) => any) | { new (...a: any[]): any }\n\n/* c8 ignore start */\nconst PROCESS = (\n  typeof process === 'object' && !!process ? process : {}\n) as { [k: string]: any }\n/* c8 ignore start */\n\nconst emitWarning = (\n  msg: string,\n  type: string,\n  code: string,\n  fn: ForC\n) => {\n  typeof PROCESS.emitWarning === 'function'\n    ? PROCESS.emitWarning(msg, type, code, fn)\n    : console.error(`[${code}] ${type}: ${msg}`)\n}\n\nlet AC = globalThis.AbortController\nlet AS = globalThis.AbortSignal\n\n/* c8 ignore start */\nif (typeof AC === 'undefined') {\n  //@ts-ignore\n  AS = class AbortSignal {\n    onabort?: (...a: any[]) => any\n    _onabort: ((...a: any[]) => any)[] = []\n    reason?: any\n    aborted: boolean = false\n    addEventListener(_: string, fn: (...a: any[]) => any) {\n      this._onabort.push(fn)\n    }\n  }\n  //@ts-ignore\n  AC = class AbortController {\n    constructor() {\n      warnACPolyfill()\n    }\n    signal = new AS()\n    abort(reason: any) {\n      if (this.signal.aborted) return\n      //@ts-ignore\n      this.signal.reason = reason\n      //@ts-ignore\n      this.signal.aborted = true\n      //@ts-ignore\n      for (const fn of this.signal._onabort) {\n        fn(reason)\n      }\n      this.signal.onabort?.(reason)\n    }\n  }\n  let printACPolyfillWarning =\n    PROCESS.env?.LRU_CACHE_IGNORE_AC_WARNING !== '1'\n  const warnACPolyfill = () => {\n    if (!printACPolyfillWarning) return\n    printACPolyfillWarning = false\n    emitWarning(\n      'AbortController is not defined. If using lru-cache in ' +\n        'node 14, load an AbortController polyfill from the ' +\n        '`node-abort-controller` package. A minimal polyfill is ' +\n        'provided for use by LRUCache.fetch(), but it should not be ' +\n        'relied upon in other contexts (eg, passing it to other APIs that ' +\n        'use AbortController/AbortSignal might have undesirable effects). ' +\n        'You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.',\n      'NO_ABORT_CONTROLLER',\n      'ENOTSUP',\n      warnACPolyfill\n    )\n  }\n}\n/* c8 ignore stop */\n\nconst shouldWarn = (code: string) => !warned.has(code)\n\nconst TYPE = Symbol('type')\nexport type PosInt = number & { [TYPE]: 'Positive Integer' }\nexport type Index = number & { [TYPE]: 'LRUCache Index' }\n\nconst isPosInt = (n: any): n is PosInt =>\n  n && n === Math.floor(n) && n > 0 && isFinite(n)\n\nexport type UintArray = Uint8Array | Uint16Array | Uint32Array\nexport type NumberArray = UintArray | number[]\n\n/* c8 ignore start */\n// This is a little bit ridiculous, tbh.\n// The maximum array length is 2^32-1 or thereabouts on most JS impls.\n// And well before that point, you're caching the entire world, I mean,\n// that's ~32GB of just integers for the next/prev links, plus whatever\n// else to hold that many keys and values.  Just filling the memory with\n// zeroes at init time is brutal when you get that big.\n// But why not be complete?\n// Maybe in the future, these limits will have expanded.\nconst getUintArray = (max: number) =>\n  !isPosInt(max)\n    ? null\n    : max <= Math.pow(2, 8)\n    ? Uint8Array\n    : max <= Math.pow(2, 16)\n    ? Uint16Array\n    : max <= Math.pow(2, 32)\n    ? Uint32Array\n    : max <= Number.MAX_SAFE_INTEGER\n    ? ZeroArray\n    : null\n/* c8 ignore stop */\n\nclass ZeroArray extends Array {\n  constructor(size: number) {\n    super(size)\n    this.fill(0)\n  }\n}\nexport type { ZeroArray }\nexport type { Stack }\n\nexport type StackLike = Stack | Index[]\nclass Stack {\n  heap: NumberArray\n  length: number\n  // private constructor\n  static #constructing: boolean = false\n  static create(max: number): StackLike {\n    const HeapCls = getUintArray(max)\n    if (!HeapCls) return []\n    Stack.#constructing = true\n    const s = new Stack(max, HeapCls)\n    Stack.#constructing = false\n    return s\n  }\n  constructor(\n    max: number,\n    HeapCls: { new (n: number): NumberArray }\n  ) {\n    /* c8 ignore start */\n    if (!Stack.#constructing) {\n      throw new TypeError('instantiate Stack using Stack.create(n)')\n    }\n    /* c8 ignore stop */\n    this.heap = new HeapCls(max)\n    this.length = 0\n  }\n  push(n: Index) {\n    this.heap[this.length++] = n\n  }\n  pop(): Index {\n    return this.heap[--this.length] as Index\n  }\n}\n\n/**\n * Promise representing an in-progress {@link LRUCache#fetch} call\n */\nexport type BackgroundFetch = Promise & {\n  __returned: BackgroundFetch | undefined\n  __abortController: AbortController\n  __staleWhileFetching: V | undefined\n}\n\nexport type DisposeTask = [\n  value: V,\n  key: K,\n  reason: LRUCache.DisposeReason\n]\n\nexport namespace LRUCache {\n  /**\n   * An integer greater than 0, reflecting the calculated size of items\n   */\n  export type Size = number\n\n  /**\n   * Integer greater than 0, representing some number of milliseconds, or the\n   * time at which a TTL started counting from.\n   */\n  export type Milliseconds = number\n\n  /**\n   * An integer greater than 0, reflecting a number of items\n   */\n  export type Count = number\n\n  /**\n   * The reason why an item was removed from the cache, passed\n   * to the {@link Disposer} methods.\n   *\n   * - `evict`: The item was evicted because it is the least recently used,\n   *   and the cache is full.\n   * - `set`: A new value was set, overwriting the old value being disposed.\n   * - `delete`: The item was explicitly deleted, either by calling\n   *   {@link LRUCache#delete}, {@link LRUCache#clear}, or\n   *   {@link LRUCache#set} with an undefined value.\n   * - `expire`: The item was removed due to exceeding its TTL.\n   * - `fetch`: A {@link OptionsBase#fetchMethod} operation returned\n   *   `undefined` or was aborted, causing the item to be deleted.\n   */\n  export type DisposeReason =\n    | 'evict'\n    | 'set'\n    | 'delete'\n    | 'expire'\n    | 'fetch'\n  /**\n   * A method called upon item removal, passed as the\n   * {@link OptionsBase.dispose} and/or\n   * {@link OptionsBase.disposeAfter} options.\n   */\n  export type Disposer = (\n    value: V,\n    key: K,\n    reason: DisposeReason\n  ) => void\n\n  /**\n   * A function that returns the effective calculated size\n   * of an entry in the cache.\n   */\n  export type SizeCalculator = (value: V, key: K) => Size\n\n  /**\n   * Options provided to the\n   * {@link OptionsBase.fetchMethod} function.\n   */\n  export interface FetcherOptions {\n    signal: AbortSignal\n    options: FetcherFetchOptions\n    /**\n     * Object provided in the {@link FetchOptions.context} option to\n     * {@link LRUCache#fetch}\n     */\n    context: FC\n  }\n\n  /**\n   * Occasionally, it may be useful to track the internal behavior of the\n   * cache, particularly for logging, debugging, or for behavior within the\n   * `fetchMethod`. To do this, you can pass a `status` object to the\n   * {@link LRUCache#fetch}, {@link LRUCache#get}, {@link LRUCache#set},\n   * {@link LRUCache#memo}, and {@link LRUCache#has} methods.\n   *\n   * The `status` option should be a plain JavaScript object. The following\n   * fields will be set on it appropriately, depending on the situation.\n   */\n  export interface Status {\n    /**\n     * The status of a set() operation.\n     *\n     * - add: the item was not found in the cache, and was added\n     * - update: the item was in the cache, with the same value provided\n     * - replace: the item was in the cache, and replaced\n     * - miss: the item was not added to the cache for some reason\n     */\n    set?: 'add' | 'update' | 'replace' | 'miss'\n\n    /**\n     * the ttl stored for the item, or undefined if ttls are not used.\n     */\n    ttl?: Milliseconds\n\n    /**\n     * the start time for the item, or undefined if ttls are not used.\n     */\n    start?: Milliseconds\n\n    /**\n     * The timestamp used for TTL calculation\n     */\n    now?: Milliseconds\n\n    /**\n     * the remaining ttl for the item, or undefined if ttls are not used.\n     */\n    remainingTTL?: Milliseconds\n\n    /**\n     * The calculated size for the item, if sizes are used.\n     */\n    entrySize?: Size\n\n    /**\n     * The total calculated size of the cache, if sizes are used.\n     */\n    totalCalculatedSize?: Size\n\n    /**\n     * A flag indicating that the item was not stored, due to exceeding the\n     * {@link OptionsBase.maxEntrySize}\n     */\n    maxEntrySizeExceeded?: true\n\n    /**\n     * The old value, specified in the case of `set:'update'` or\n     * `set:'replace'`\n     */\n    oldValue?: V\n\n    /**\n     * The results of a {@link LRUCache#has} operation\n     *\n     * - hit: the item was found in the cache\n     * - stale: the item was found in the cache, but is stale\n     * - miss: the item was not found in the cache\n     */\n    has?: 'hit' | 'stale' | 'miss'\n\n    /**\n     * The status of a {@link LRUCache#fetch} operation.\n     * Note that this can change as the underlying fetch() moves through\n     * various states.\n     *\n     * - inflight: there is another fetch() for this key which is in process\n     * - get: there is no {@link OptionsBase.fetchMethod}, so\n     *   {@link LRUCache#get} was called.\n     * - miss: the item is not in cache, and will be fetched.\n     * - hit: the item is in the cache, and was resolved immediately.\n     * - stale: the item is in the cache, but stale.\n     * - refresh: the item is in the cache, and not stale, but\n     *   {@link FetchOptions.forceRefresh} was specified.\n     */\n    fetch?: 'get' | 'inflight' | 'miss' | 'hit' | 'stale' | 'refresh'\n\n    /**\n     * The {@link OptionsBase.fetchMethod} was called\n     */\n    fetchDispatched?: true\n\n    /**\n     * The cached value was updated after a successful call to\n     * {@link OptionsBase.fetchMethod}\n     */\n    fetchUpdated?: true\n\n    /**\n     * The reason for a fetch() rejection.  Either the error raised by the\n     * {@link OptionsBase.fetchMethod}, or the reason for an\n     * AbortSignal.\n     */\n    fetchError?: Error\n\n    /**\n     * The fetch received an abort signal\n     */\n    fetchAborted?: true\n\n    /**\n     * The abort signal received was ignored, and the fetch was allowed to\n     * continue.\n     */\n    fetchAbortIgnored?: true\n\n    /**\n     * The fetchMethod promise resolved successfully\n     */\n    fetchResolved?: true\n\n    /**\n     * The fetchMethod promise was rejected\n     */\n    fetchRejected?: true\n\n    /**\n     * The status of a {@link LRUCache#get} operation.\n     *\n     * - fetching: The item is currently being fetched.  If a previous value\n     *   is present and allowed, that will be returned.\n     * - stale: The item is in the cache, and is stale.\n     * - hit: the item is in the cache\n     * - miss: the item is not in the cache\n     */\n    get?: 'stale' | 'hit' | 'miss'\n\n    /**\n     * A fetch or get operation returned a stale value.\n     */\n    returnedStale?: true\n  }\n\n  /**\n   * options which override the options set in the LRUCache constructor\n   * when calling {@link LRUCache#fetch}.\n   *\n   * This is the union of {@link GetOptions} and {@link SetOptions}, plus\n   * {@link OptionsBase.noDeleteOnFetchRejection},\n   * {@link OptionsBase.allowStaleOnFetchRejection},\n   * {@link FetchOptions.forceRefresh}, and\n   * {@link FetcherOptions.context}\n   *\n   * Any of these may be modified in the {@link OptionsBase.fetchMethod}\n   * function, but the {@link GetOptions} fields will of course have no\n   * effect, as the {@link LRUCache#get} call already happened by the time\n   * the fetchMethod is called.\n   */\n  export interface FetcherFetchOptions\n    extends Pick<\n      OptionsBase,\n      | 'allowStale'\n      | 'updateAgeOnGet'\n      | 'noDeleteOnStaleGet'\n      | 'sizeCalculation'\n      | 'ttl'\n      | 'noDisposeOnSet'\n      | 'noUpdateTTL'\n      | 'noDeleteOnFetchRejection'\n      | 'allowStaleOnFetchRejection'\n      | 'ignoreFetchAbort'\n      | 'allowStaleOnFetchAbort'\n    > {\n    status?: Status\n    size?: Size\n  }\n\n  /**\n   * Options that may be passed to the {@link LRUCache#fetch} method.\n   */\n  export interface FetchOptions\n    extends FetcherFetchOptions {\n    /**\n     * Set to true to force a re-load of the existing data, even if it\n     * is not yet stale.\n     */\n    forceRefresh?: boolean\n    /**\n     * Context provided to the {@link OptionsBase.fetchMethod} as\n     * the {@link FetcherOptions.context} param.\n     *\n     * If the FC type is specified as unknown (the default),\n     * undefined or void, then this is optional.  Otherwise, it will\n     * be required.\n     */\n    context?: FC\n    signal?: AbortSignal\n    status?: Status\n  }\n  /**\n   * Options provided to {@link LRUCache#fetch} when the FC type is something\n   * other than `unknown`, `undefined`, or `void`\n   */\n  export interface FetchOptionsWithContext\n    extends FetchOptions {\n    context: FC\n  }\n  /**\n   * Options provided to {@link LRUCache#fetch} when the FC type is\n   * `undefined` or `void`\n   */\n  export interface FetchOptionsNoContext\n    extends FetchOptions {\n    context?: undefined\n  }\n\n  export interface MemoOptions\n    extends Pick<\n      OptionsBase,\n      | 'allowStale'\n      | 'updateAgeOnGet'\n      | 'noDeleteOnStaleGet'\n      | 'sizeCalculation'\n      | 'ttl'\n      | 'noDisposeOnSet'\n      | 'noUpdateTTL'\n      | 'noDeleteOnFetchRejection'\n      | 'allowStaleOnFetchRejection'\n      | 'ignoreFetchAbort'\n      | 'allowStaleOnFetchAbort'\n    > {\n    /**\n     * Set to true to force a re-load of the existing data, even if it\n     * is not yet stale.\n     */\n    forceRefresh?: boolean\n    /**\n     * Context provided to the {@link OptionsBase.memoMethod} as\n     * the {@link MemoizerOptions.context} param.\n     *\n     * If the FC type is specified as unknown (the default),\n     * undefined or void, then this is optional.  Otherwise, it will\n     * be required.\n     */\n    context?: FC\n    status?: Status\n  }\n  /**\n   * Options provided to {@link LRUCache#memo} when the FC type is something\n   * other than `unknown`, `undefined`, or `void`\n   */\n  export interface MemoOptionsWithContext\n    extends MemoOptions {\n    context: FC\n  }\n  /**\n   * Options provided to {@link LRUCache#memo} when the FC type is\n   * `undefined` or `void`\n   */\n  export interface MemoOptionsNoContext\n    extends MemoOptions {\n    context?: undefined\n  }\n\n  /**\n   * Options provided to the\n   * {@link OptionsBase.memoMethod} function.\n   */\n  export interface MemoizerOptions {\n    options: MemoizerMemoOptions\n    /**\n     * Object provided in the {@link MemoOptions.context} option to\n     * {@link LRUCache#memo}\n     */\n    context: FC\n  }\n\n  /**\n   * options which override the options set in the LRUCache constructor\n   * when calling {@link LRUCache#memo}.\n   *\n   * This is the union of {@link GetOptions} and {@link SetOptions}, plus\n   * {@link MemoOptions.forceRefresh}, and\n   * {@link MemoerOptions.context}\n   *\n   * Any of these may be modified in the {@link OptionsBase.memoMethod}\n   * function, but the {@link GetOptions} fields will of course have no\n   * effect, as the {@link LRUCache#get} call already happened by the time\n   * the memoMethod is called.\n   */\n  export interface MemoizerMemoOptions\n    extends Pick<\n      OptionsBase,\n      | 'allowStale'\n      | 'updateAgeOnGet'\n      | 'noDeleteOnStaleGet'\n      | 'sizeCalculation'\n      | 'ttl'\n      | 'noDisposeOnSet'\n      | 'noUpdateTTL'\n    > {\n    status?: Status\n    size?: Size\n    start?: Milliseconds\n  }\n\n  /**\n   * Options that may be passed to the {@link LRUCache#has} method.\n   */\n  export interface HasOptions\n    extends Pick, 'updateAgeOnHas'> {\n    status?: Status\n  }\n\n  /**\n   * Options that may be passed to the {@link LRUCache#get} method.\n   */\n  export interface GetOptions\n    extends Pick<\n      OptionsBase,\n      'allowStale' | 'updateAgeOnGet' | 'noDeleteOnStaleGet'\n    > {\n    status?: Status\n  }\n\n  /**\n   * Options that may be passed to the {@link LRUCache#peek} method.\n   */\n  export interface PeekOptions\n    extends Pick, 'allowStale'> {}\n\n  /**\n   * Options that may be passed to the {@link LRUCache#set} method.\n   */\n  export interface SetOptions\n    extends Pick<\n      OptionsBase,\n      'sizeCalculation' | 'ttl' | 'noDisposeOnSet' | 'noUpdateTTL'\n    > {\n    /**\n     * If size tracking is enabled, then setting an explicit size\n     * in the {@link LRUCache#set} call will prevent calling the\n     * {@link OptionsBase.sizeCalculation} function.\n     */\n    size?: Size\n    /**\n     * If TTL tracking is enabled, then setting an explicit start\n     * time in the {@link LRUCache#set} call will override the\n     * default time from `performance.now()` or `Date.now()`.\n     *\n     * Note that it must be a valid value for whichever time-tracking\n     * method is in use.\n     */\n    start?: Milliseconds\n    status?: Status\n  }\n\n  /**\n   * The type signature for the {@link OptionsBase.fetchMethod} option.\n   */\n  export type Fetcher = (\n    key: K,\n    staleValue: V | undefined,\n    options: FetcherOptions\n  ) => Promise | V | undefined | void\n\n  /**\n   * the type signature for the {@link OptionsBase.memoMethod} option.\n   */\n  export type Memoizer = (\n    key: K,\n    staleValue: V | undefined,\n    options: MemoizerOptions\n  ) => V\n\n  /**\n   * Options which may be passed to the {@link LRUCache} constructor.\n   *\n   * Most of these may be overridden in the various options that use\n   * them.\n   *\n   * Despite all being technically optional, the constructor requires that\n   * a cache is at minimum limited by one or more of {@link OptionsBase.max},\n   * {@link OptionsBase.ttl}, or {@link OptionsBase.maxSize}.\n   *\n   * If {@link OptionsBase.ttl} is used alone, then it is strongly advised\n   * (and in fact required by the type definitions here) that the cache\n   * also set {@link OptionsBase.ttlAutopurge}, to prevent potentially\n   * unbounded storage.\n   *\n   * All options are also available on the {@link LRUCache} instance, making\n   * it safe to pass an LRUCache instance as the options argumemnt to\n   * make another empty cache of the same type.\n   *\n   * Some options are marked as read-only, because changing them after\n   * instantiation is not safe. Changing any of the other options will of\n   * course only have an effect on subsequent method calls.\n   */\n  export interface OptionsBase {\n    /**\n     * The maximum number of items to store in the cache before evicting\n     * old entries. This is read-only on the {@link LRUCache} instance,\n     * and may not be overridden.\n     *\n     * If set, then storage space will be pre-allocated at construction\n     * time, and the cache will perform significantly faster.\n     *\n     * Note that significantly fewer items may be stored, if\n     * {@link OptionsBase.maxSize} and/or {@link OptionsBase.ttl} are also\n     * set.\n     *\n     * **It is strongly recommended to set a `max` to prevent unbounded growth\n     * of the cache.**\n     */\n    max?: Count\n\n    /**\n     * Max time in milliseconds for items to live in cache before they are\n     * considered stale.  Note that stale items are NOT preemptively removed by\n     * default, and MAY live in the cache, contributing to its LRU max, long\n     * after they have expired, unless {@link OptionsBase.ttlAutopurge} is\n     * set.\n     *\n     * If set to `0` (the default value), then that means \"do not track\n     * TTL\", not \"expire immediately\".\n     *\n     * Also, as this cache is optimized for LRU/MRU operations, some of\n     * the staleness/TTL checks will reduce performance, as they will incur\n     * overhead by deleting items.\n     *\n     * This is not primarily a TTL cache, and does not make strong TTL\n     * guarantees. There is no pre-emptive pruning of expired items, but you\n     * _may_ set a TTL on the cache, and it will treat expired items as missing\n     * when they are fetched, and delete them.\n     *\n     * Optional, but must be a non-negative integer in ms if specified.\n     *\n     * This may be overridden by passing an options object to `cache.set()`.\n     *\n     * At least one of `max`, `maxSize`, or `TTL` is required. This must be a\n     * positive integer if set.\n     *\n     * Even if ttl tracking is enabled, **it is strongly recommended to set a\n     * `max` to prevent unbounded growth of the cache.**\n     *\n     * If ttl tracking is enabled, and `max` and `maxSize` are not set,\n     * and `ttlAutopurge` is not set, then a warning will be emitted\n     * cautioning about the potential for unbounded memory consumption.\n     * (The TypeScript definitions will also discourage this.)\n     */\n    ttl?: Milliseconds\n\n    /**\n     * Minimum amount of time in ms in which to check for staleness.\n     * Defaults to 1, which means that the current time is checked\n     * at most once per millisecond.\n     *\n     * Set to 0 to check the current time every time staleness is tested.\n     * (This reduces performance, and is theoretically unnecessary.)\n     *\n     * Setting this to a higher value will improve performance somewhat\n     * while using ttl tracking, albeit at the expense of keeping stale\n     * items around a bit longer than their TTLs would indicate.\n     *\n     * @default 1\n     */\n    ttlResolution?: Milliseconds\n\n    /**\n     * Preemptively remove stale items from the cache.\n     *\n     * Note that this may *significantly* degrade performance, especially if\n     * the cache is storing a large number of items. It is almost always best\n     * to just leave the stale items in the cache, and let them fall out as new\n     * items are added.\n     *\n     * Note that this means that {@link OptionsBase.allowStale} is a bit\n     * pointless, as stale items will be deleted almost as soon as they\n     * expire.\n     *\n     * Use with caution!\n     */\n    ttlAutopurge?: boolean\n\n    /**\n     * When using time-expiring entries with `ttl`, setting this to `true` will\n     * make each item's age reset to 0 whenever it is retrieved from cache with\n     * {@link LRUCache#get}, causing it to not expire. (It can still fall out\n     * of cache based on recency of use, of course.)\n     *\n     * Has no effect if {@link OptionsBase.ttl} is not set.\n     *\n     * This may be overridden by passing an options object to `cache.get()`.\n     */\n    updateAgeOnGet?: boolean\n\n    /**\n     * When using time-expiring entries with `ttl`, setting this to `true` will\n     * make each item's age reset to 0 whenever its presence in the cache is\n     * checked with {@link LRUCache#has}, causing it to not expire. (It can\n     * still fall out of cache based on recency of use, of course.)\n     *\n     * Has no effect if {@link OptionsBase.ttl} is not set.\n     */\n    updateAgeOnHas?: boolean\n\n    /**\n     * Allow {@link LRUCache#get} and {@link LRUCache#fetch} calls to return\n     * stale data, if available.\n     *\n     * By default, if you set `ttl`, stale items will only be deleted from the\n     * cache when you `get(key)`. That is, it's not preemptively pruning items,\n     * unless {@link OptionsBase.ttlAutopurge} is set.\n     *\n     * If you set `allowStale:true`, it'll return the stale value *as well as*\n     * deleting it. If you don't set this, then it'll return `undefined` when\n     * you try to get a stale entry.\n     *\n     * Note that when a stale entry is fetched, _even if it is returned due to\n     * `allowStale` being set_, it is removed from the cache immediately. You\n     * can suppress this behavior by setting\n     * {@link OptionsBase.noDeleteOnStaleGet}, either in the constructor, or in\n     * the options provided to {@link LRUCache#get}.\n     *\n     * This may be overridden by passing an options object to `cache.get()`.\n     * The `cache.has()` method will always return `false` for stale items.\n     *\n     * Only relevant if a ttl is set.\n     */\n    allowStale?: boolean\n\n    /**\n     * Function that is called on items when they are dropped from the\n     * cache, as `dispose(value, key, reason)`.\n     *\n     * This can be handy if you want to close file descriptors or do\n     * other cleanup tasks when items are no longer stored in the cache.\n     *\n     * **NOTE**: It is called _before_ the item has been fully removed\n     * from the cache, so if you want to put it right back in, you need\n     * to wait until the next tick. If you try to add it back in during\n     * the `dispose()` function call, it will break things in subtle and\n     * weird ways.\n     *\n     * Unlike several other options, this may _not_ be overridden by\n     * passing an option to `set()`, for performance reasons.\n     *\n     * The `reason` will be one of the following strings, corresponding\n     * to the reason for the item's deletion:\n     *\n     * - `evict` Item was evicted to make space for a new addition\n     * - `set` Item was overwritten by a new value\n     * - `expire` Item expired its TTL\n     * - `fetch` Item was deleted due to a failed or aborted fetch, or a\n     *   fetchMethod returning `undefined.\n     * - `delete` Item was removed by explicit `cache.delete(key)`,\n     *   `cache.clear()`, or `cache.set(key, undefined)`.\n     */\n    dispose?: Disposer\n\n    /**\n     * The same as {@link OptionsBase.dispose}, but called *after* the entry\n     * is completely removed and the cache is once again in a clean state.\n     *\n     * It is safe to add an item right back into the cache at this point.\n     * However, note that it is *very* easy to inadvertently create infinite\n     * recursion this way.\n     */\n    disposeAfter?: Disposer\n\n    /**\n     * Set to true to suppress calling the\n     * {@link OptionsBase.dispose} function if the entry key is\n     * still accessible within the cache.\n     *\n     * This may be overridden by passing an options object to\n     * {@link LRUCache#set}.\n     *\n     * Only relevant if `dispose` or `disposeAfter` are set.\n     */\n    noDisposeOnSet?: boolean\n\n    /**\n     * Boolean flag to tell the cache to not update the TTL when setting a new\n     * value for an existing key (ie, when updating a value rather than\n     * inserting a new value).  Note that the TTL value is _always_ set (if\n     * provided) when adding a new entry into the cache.\n     *\n     * Has no effect if a {@link OptionsBase.ttl} is not set.\n     *\n     * May be passed as an option to {@link LRUCache#set}.\n     */\n    noUpdateTTL?: boolean\n\n    /**\n     * Set to a positive integer to track the sizes of items added to the\n     * cache, and automatically evict items in order to stay below this size.\n     * Note that this may result in fewer than `max` items being stored.\n     *\n     * Attempting to add an item to the cache whose calculated size is greater\n     * that this amount will be a no-op. The item will not be cached, and no\n     * other items will be evicted.\n     *\n     * Optional, must be a positive integer if provided.\n     *\n     * Sets `maxEntrySize` to the same value, unless a different value is\n     * provided for `maxEntrySize`.\n     *\n     * At least one of `max`, `maxSize`, or `TTL` is required. This must be a\n     * positive integer if set.\n     *\n     * Even if size tracking is enabled, **it is strongly recommended to set a\n     * `max` to prevent unbounded growth of the cache.**\n     *\n     * Note also that size tracking can negatively impact performance,\n     * though for most cases, only minimally.\n     */\n    maxSize?: Size\n\n    /**\n     * The maximum allowed size for any single item in the cache.\n     *\n     * If a larger item is passed to {@link LRUCache#set} or returned by a\n     * {@link OptionsBase.fetchMethod} or {@link OptionsBase.memoMethod}, then\n     * it will not be stored in the cache.\n     *\n     * Attempting to add an item whose calculated size is greater than\n     * this amount will not cache the item or evict any old items, but\n     * WILL delete an existing value if one is already present.\n     *\n     * Optional, must be a positive integer if provided. Defaults to\n     * the value of `maxSize` if provided.\n     */\n    maxEntrySize?: Size\n\n    /**\n     * A function that returns a number indicating the item's size.\n     *\n     * Requires {@link OptionsBase.maxSize} to be set.\n     *\n     * If not provided, and {@link OptionsBase.maxSize} or\n     * {@link OptionsBase.maxEntrySize} are set, then all\n     * {@link LRUCache#set} calls **must** provide an explicit\n     * {@link SetOptions.size} or sizeCalculation param.\n     */\n    sizeCalculation?: SizeCalculator\n\n    /**\n     * Method that provides the implementation for {@link LRUCache#fetch}\n     *\n     * ```ts\n     * fetchMethod(key, staleValue, { signal, options, context })\n     * ```\n     *\n     * If `fetchMethod` is not provided, then `cache.fetch(key)` is equivalent\n     * to `Promise.resolve(cache.get(key))`.\n     *\n     * If at any time, `signal.aborted` is set to `true`, or if the\n     * `signal.onabort` method is called, or if it emits an `'abort'` event\n     * which you can listen to with `addEventListener`, then that means that\n     * the fetch should be abandoned. This may be passed along to async\n     * functions aware of AbortController/AbortSignal behavior.\n     *\n     * The `fetchMethod` should **only** return `undefined` or a Promise\n     * resolving to `undefined` if the AbortController signaled an `abort`\n     * event. In all other cases, it should return or resolve to a value\n     * suitable for adding to the cache.\n     *\n     * The `options` object is a union of the options that may be provided to\n     * `set()` and `get()`. If they are modified, then that will result in\n     * modifying the settings to `cache.set()` when the value is resolved, and\n     * in the case of\n     * {@link OptionsBase.noDeleteOnFetchRejection} and\n     * {@link OptionsBase.allowStaleOnFetchRejection}, the handling of\n     * `fetchMethod` failures.\n     *\n     * For example, a DNS cache may update the TTL based on the value returned\n     * from a remote DNS server by changing `options.ttl` in the `fetchMethod`.\n     */\n    fetchMethod?: Fetcher\n\n    /**\n     * Method that provides the implementation for {@link LRUCache#memo}\n     */\n    memoMethod?: Memoizer\n\n    /**\n     * Set to true to suppress the deletion of stale data when a\n     * {@link OptionsBase.fetchMethod} returns a rejected promise.\n     */\n    noDeleteOnFetchRejection?: boolean\n\n    /**\n     * Do not delete stale items when they are retrieved with\n     * {@link LRUCache#get}.\n     *\n     * Note that the `get` return value will still be `undefined`\n     * unless {@link OptionsBase.allowStale} is true.\n     *\n     * When using time-expiring entries with `ttl`, by default stale\n     * items will be removed from the cache when the key is accessed\n     * with `cache.get()`.\n     *\n     * Setting this option will cause stale items to remain in the cache, until\n     * they are explicitly deleted with `cache.delete(key)`, or retrieved with\n     * `noDeleteOnStaleGet` set to `false`.\n     *\n     * This may be overridden by passing an options object to `cache.get()`.\n     *\n     * Only relevant if a ttl is used.\n     */\n    noDeleteOnStaleGet?: boolean\n\n    /**\n     * Set to true to allow returning stale data when a\n     * {@link OptionsBase.fetchMethod} throws an error or returns a rejected\n     * promise.\n     *\n     * This differs from using {@link OptionsBase.allowStale} in that stale\n     * data will ONLY be returned in the case that the {@link LRUCache#fetch}\n     * fails, not any other times.\n     *\n     * If a `fetchMethod` fails, and there is no stale value available, the\n     * `fetch()` will resolve to `undefined`. Ie, all `fetchMethod` errors are\n     * suppressed.\n     *\n     * Implies `noDeleteOnFetchRejection`.\n     *\n     * This may be set in calls to `fetch()`, or defaulted on the constructor,\n     * or overridden by modifying the options object in the `fetchMethod`.\n     */\n    allowStaleOnFetchRejection?: boolean\n\n    /**\n     * Set to true to return a stale value from the cache when the\n     * `AbortSignal` passed to the {@link OptionsBase.fetchMethod} dispatches\n     * an `'abort'` event, whether user-triggered, or due to internal cache\n     * behavior.\n     *\n     * Unless {@link OptionsBase.ignoreFetchAbort} is also set, the underlying\n     * {@link OptionsBase.fetchMethod} will still be considered canceled, and\n     * any value it returns will be ignored and not cached.\n     *\n     * Caveat: since fetches are aborted when a new value is explicitly\n     * set in the cache, this can lead to fetch returning a stale value,\n     * since that was the fallback value _at the moment the `fetch()` was\n     * initiated_, even though the new updated value is now present in\n     * the cache.\n     *\n     * For example:\n     *\n     * ```ts\n     * const cache = new LRUCache({\n     *   ttl: 100,\n     *   fetchMethod: async (url, oldValue, { signal }) =>  {\n     *     const res = await fetch(url, { signal })\n     *     return await res.json()\n     *   }\n     * })\n     * cache.set('https://example.com/', { some: 'data' })\n     * // 100ms go by...\n     * const result = cache.fetch('https://example.com/')\n     * cache.set('https://example.com/', { other: 'thing' })\n     * console.log(await result) // { some: 'data' }\n     * console.log(cache.get('https://example.com/')) // { other: 'thing' }\n     * ```\n     */\n    allowStaleOnFetchAbort?: boolean\n\n    /**\n     * Set to true to ignore the `abort` event emitted by the `AbortSignal`\n     * object passed to {@link OptionsBase.fetchMethod}, and still cache the\n     * resulting resolution value, as long as it is not `undefined`.\n     *\n     * When used on its own, this means aborted {@link LRUCache#fetch} calls\n     * are not immediately resolved or rejected when they are aborted, and\n     * instead take the full time to await.\n     *\n     * When used with {@link OptionsBase.allowStaleOnFetchAbort}, aborted\n     * {@link LRUCache#fetch} calls will resolve immediately to their stale\n     * cached value or `undefined`, and will continue to process and eventually\n     * update the cache when they resolve, as long as the resulting value is\n     * not `undefined`, thus supporting a \"return stale on timeout while\n     * refreshing\" mechanism by passing `AbortSignal.timeout(n)` as the signal.\n     *\n     * For example:\n     *\n     * ```ts\n     * const c = new LRUCache({\n     *   ttl: 100,\n     *   ignoreFetchAbort: true,\n     *   allowStaleOnFetchAbort: true,\n     *   fetchMethod: async (key, oldValue, { signal }) => {\n     *     // note: do NOT pass the signal to fetch()!\n     *     // let's say this fetch can take a long time.\n     *     const res = await fetch(`https://slow-backend-server/${key}`)\n     *     return await res.json()\n     *   },\n     * })\n     *\n     * // this will return the stale value after 100ms, while still\n     * // updating in the background for next time.\n     * const val = await c.fetch('key', { signal: AbortSignal.timeout(100) })\n     * ```\n     *\n     * **Note**: regardless of this setting, an `abort` event _is still\n     * emitted on the `AbortSignal` object_, so may result in invalid results\n     * when passed to other underlying APIs that use AbortSignals.\n     *\n     * This may be overridden in the {@link OptionsBase.fetchMethod} or the\n     * call to {@link LRUCache#fetch}.\n     */\n    ignoreFetchAbort?: boolean\n  }\n\n  export interface OptionsMaxLimit\n    extends OptionsBase {\n    max: Count\n  }\n  export interface OptionsTTLLimit\n    extends OptionsBase {\n    ttl: Milliseconds\n    ttlAutopurge: boolean\n  }\n  export interface OptionsSizeLimit\n    extends OptionsBase {\n    maxSize: Size\n  }\n\n  /**\n   * The valid safe options for the {@link LRUCache} constructor\n   */\n  export type Options =\n    | OptionsMaxLimit\n    | OptionsSizeLimit\n    | OptionsTTLLimit\n\n  /**\n   * Entry objects used by {@link LRUCache#load} and {@link LRUCache#dump},\n   * and returned by {@link LRUCache#info}.\n   */\n  export interface Entry {\n    value: V\n    ttl?: Milliseconds\n    size?: Size\n    start?: Milliseconds\n  }\n}\n\n/**\n * Default export, the thing you're using this module to get.\n *\n * The `K` and `V` types define the key and value types, respectively. The\n * optional `FC` type defines the type of the `context` object passed to\n * `cache.fetch()` and `cache.memo()`.\n *\n * Keys and values **must not** be `null` or `undefined`.\n *\n * All properties from the options object (with the exception of `max`,\n * `maxSize`, `fetchMethod`, `memoMethod`, `dispose` and `disposeAfter`) are\n * added as normal public members. (The listed options are read-only getters.)\n *\n * Changing any of these will alter the defaults for subsequent method calls.\n */\nexport class LRUCache\n  implements Map\n{\n  // options that cannot be changed without disaster\n  readonly #max: LRUCache.Count\n  readonly #maxSize: LRUCache.Size\n  readonly #dispose?: LRUCache.Disposer\n  readonly #disposeAfter?: LRUCache.Disposer\n  readonly #fetchMethod?: LRUCache.Fetcher\n  readonly #memoMethod?: LRUCache.Memoizer\n\n  /**\n   * {@link LRUCache.OptionsBase.ttl}\n   */\n  ttl: LRUCache.Milliseconds\n\n  /**\n   * {@link LRUCache.OptionsBase.ttlResolution}\n   */\n  ttlResolution: LRUCache.Milliseconds\n  /**\n   * {@link LRUCache.OptionsBase.ttlAutopurge}\n   */\n  ttlAutopurge: boolean\n  /**\n   * {@link LRUCache.OptionsBase.updateAgeOnGet}\n   */\n  updateAgeOnGet: boolean\n  /**\n   * {@link LRUCache.OptionsBase.updateAgeOnHas}\n   */\n  updateAgeOnHas: boolean\n  /**\n   * {@link LRUCache.OptionsBase.allowStale}\n   */\n  allowStale: boolean\n\n  /**\n   * {@link LRUCache.OptionsBase.noDisposeOnSet}\n   */\n  noDisposeOnSet: boolean\n  /**\n   * {@link LRUCache.OptionsBase.noUpdateTTL}\n   */\n  noUpdateTTL: boolean\n  /**\n   * {@link LRUCache.OptionsBase.maxEntrySize}\n   */\n  maxEntrySize: LRUCache.Size\n  /**\n   * {@link LRUCache.OptionsBase.sizeCalculation}\n   */\n  sizeCalculation?: LRUCache.SizeCalculator\n  /**\n   * {@link LRUCache.OptionsBase.noDeleteOnFetchRejection}\n   */\n  noDeleteOnFetchRejection: boolean\n  /**\n   * {@link LRUCache.OptionsBase.noDeleteOnStaleGet}\n   */\n  noDeleteOnStaleGet: boolean\n  /**\n   * {@link LRUCache.OptionsBase.allowStaleOnFetchAbort}\n   */\n  allowStaleOnFetchAbort: boolean\n  /**\n   * {@link LRUCache.OptionsBase.allowStaleOnFetchRejection}\n   */\n  allowStaleOnFetchRejection: boolean\n  /**\n   * {@link LRUCache.OptionsBase.ignoreFetchAbort}\n   */\n  ignoreFetchAbort: boolean\n\n  // computed properties\n  #size: LRUCache.Count\n  #calculatedSize: LRUCache.Size\n  #keyMap: Map\n  #keyList: (K | undefined)[]\n  #valList: (V | BackgroundFetch | undefined)[]\n  #next: NumberArray\n  #prev: NumberArray\n  #head: Index\n  #tail: Index\n  #free: StackLike\n  #disposed?: DisposeTask[]\n  #sizes?: ZeroArray\n  #starts?: ZeroArray\n  #ttls?: ZeroArray\n\n  #hasDispose: boolean\n  #hasFetchMethod: boolean\n  #hasDisposeAfter: boolean\n\n  /**\n   * Do not call this method unless you need to inspect the\n   * inner workings of the cache.  If anything returned by this\n   * object is modified in any way, strange breakage may occur.\n   *\n   * These fields are private for a reason!\n   *\n   * @internal\n   */\n  static unsafeExposeInternals<\n    K extends {},\n    V extends {},\n    FC extends unknown = unknown\n  >(c: LRUCache) {\n    return {\n      // properties\n      starts: c.#starts,\n      ttls: c.#ttls,\n      sizes: c.#sizes,\n      keyMap: c.#keyMap as Map,\n      keyList: c.#keyList,\n      valList: c.#valList,\n      next: c.#next,\n      prev: c.#prev,\n      get head() {\n        return c.#head\n      },\n      get tail() {\n        return c.#tail\n      },\n      free: c.#free,\n      // methods\n      isBackgroundFetch: (p: any) => c.#isBackgroundFetch(p),\n      backgroundFetch: (\n        k: K,\n        index: number | undefined,\n        options: LRUCache.FetchOptions,\n        context: any\n      ): BackgroundFetch =>\n        c.#backgroundFetch(\n          k,\n          index as Index | undefined,\n          options,\n          context\n        ),\n      moveToTail: (index: number): void =>\n        c.#moveToTail(index as Index),\n      indexes: (options?: { allowStale: boolean }) =>\n        c.#indexes(options),\n      rindexes: (options?: { allowStale: boolean }) =>\n        c.#rindexes(options),\n      isStale: (index: number | undefined) =>\n        c.#isStale(index as Index),\n    }\n  }\n\n  // Protected read-only members\n\n  /**\n   * {@link LRUCache.OptionsBase.max} (read-only)\n   */\n  get max(): LRUCache.Count {\n    return this.#max\n  }\n  /**\n   * {@link LRUCache.OptionsBase.maxSize} (read-only)\n   */\n  get maxSize(): LRUCache.Count {\n    return this.#maxSize\n  }\n  /**\n   * The total computed size of items in the cache (read-only)\n   */\n  get calculatedSize(): LRUCache.Size {\n    return this.#calculatedSize\n  }\n  /**\n   * The number of items stored in the cache (read-only)\n   */\n  get size(): LRUCache.Count {\n    return this.#size\n  }\n  /**\n   * {@link LRUCache.OptionsBase.fetchMethod} (read-only)\n   */\n  get fetchMethod(): LRUCache.Fetcher | undefined {\n    return this.#fetchMethod\n  }\n  get memoMethod(): LRUCache.Memoizer | undefined {\n    return this.#memoMethod\n  }\n  /**\n   * {@link LRUCache.OptionsBase.dispose} (read-only)\n   */\n  get dispose() {\n    return this.#dispose\n  }\n  /**\n   * {@link LRUCache.OptionsBase.disposeAfter} (read-only)\n   */\n  get disposeAfter() {\n    return this.#disposeAfter\n  }\n\n  constructor(\n    options: LRUCache.Options | LRUCache\n  ) {\n    const {\n      max = 0,\n      ttl,\n      ttlResolution = 1,\n      ttlAutopurge,\n      updateAgeOnGet,\n      updateAgeOnHas,\n      allowStale,\n      dispose,\n      disposeAfter,\n      noDisposeOnSet,\n      noUpdateTTL,\n      maxSize = 0,\n      maxEntrySize = 0,\n      sizeCalculation,\n      fetchMethod,\n      memoMethod,\n      noDeleteOnFetchRejection,\n      noDeleteOnStaleGet,\n      allowStaleOnFetchRejection,\n      allowStaleOnFetchAbort,\n      ignoreFetchAbort,\n    } = options\n\n    if (max !== 0 && !isPosInt(max)) {\n      throw new TypeError('max option must be a nonnegative integer')\n    }\n\n    const UintArray = max ? getUintArray(max) : Array\n    if (!UintArray) {\n      throw new Error('invalid max value: ' + max)\n    }\n\n    this.#max = max\n    this.#maxSize = maxSize\n    this.maxEntrySize = maxEntrySize || this.#maxSize\n    this.sizeCalculation = sizeCalculation\n    if (this.sizeCalculation) {\n      if (!this.#maxSize && !this.maxEntrySize) {\n        throw new TypeError(\n          'cannot set sizeCalculation without setting maxSize or maxEntrySize'\n        )\n      }\n      if (typeof this.sizeCalculation !== 'function') {\n        throw new TypeError('sizeCalculation set to non-function')\n      }\n    }\n\n    if (\n      memoMethod !== undefined &&\n      typeof memoMethod !== 'function'\n    ) {\n      throw new TypeError('memoMethod must be a function if defined')\n    }\n    this.#memoMethod = memoMethod\n\n    if (\n      fetchMethod !== undefined &&\n      typeof fetchMethod !== 'function'\n    ) {\n      throw new TypeError(\n        'fetchMethod must be a function if specified'\n      )\n    }\n    this.#fetchMethod = fetchMethod\n    this.#hasFetchMethod = !!fetchMethod\n\n    this.#keyMap = new Map()\n    this.#keyList = new Array(max).fill(undefined)\n    this.#valList = new Array(max).fill(undefined)\n    this.#next = new UintArray(max)\n    this.#prev = new UintArray(max)\n    this.#head = 0 as Index\n    this.#tail = 0 as Index\n    this.#free = Stack.create(max)\n    this.#size = 0\n    this.#calculatedSize = 0\n\n    if (typeof dispose === 'function') {\n      this.#dispose = dispose\n    }\n    if (typeof disposeAfter === 'function') {\n      this.#disposeAfter = disposeAfter\n      this.#disposed = []\n    } else {\n      this.#disposeAfter = undefined\n      this.#disposed = undefined\n    }\n    this.#hasDispose = !!this.#dispose\n    this.#hasDisposeAfter = !!this.#disposeAfter\n\n    this.noDisposeOnSet = !!noDisposeOnSet\n    this.noUpdateTTL = !!noUpdateTTL\n    this.noDeleteOnFetchRejection = !!noDeleteOnFetchRejection\n    this.allowStaleOnFetchRejection = !!allowStaleOnFetchRejection\n    this.allowStaleOnFetchAbort = !!allowStaleOnFetchAbort\n    this.ignoreFetchAbort = !!ignoreFetchAbort\n\n    // NB: maxEntrySize is set to maxSize if it's set\n    if (this.maxEntrySize !== 0) {\n      if (this.#maxSize !== 0) {\n        if (!isPosInt(this.#maxSize)) {\n          throw new TypeError(\n            'maxSize must be a positive integer if specified'\n          )\n        }\n      }\n      if (!isPosInt(this.maxEntrySize)) {\n        throw new TypeError(\n          'maxEntrySize must be a positive integer if specified'\n        )\n      }\n      this.#initializeSizeTracking()\n    }\n\n    this.allowStale = !!allowStale\n    this.noDeleteOnStaleGet = !!noDeleteOnStaleGet\n    this.updateAgeOnGet = !!updateAgeOnGet\n    this.updateAgeOnHas = !!updateAgeOnHas\n    this.ttlResolution =\n      isPosInt(ttlResolution) || ttlResolution === 0\n        ? ttlResolution\n        : 1\n    this.ttlAutopurge = !!ttlAutopurge\n    this.ttl = ttl || 0\n    if (this.ttl) {\n      if (!isPosInt(this.ttl)) {\n        throw new TypeError(\n          'ttl must be a positive integer if specified'\n        )\n      }\n      this.#initializeTTLTracking()\n    }\n\n    // do not allow completely unbounded caches\n    if (this.#max === 0 && this.ttl === 0 && this.#maxSize === 0) {\n      throw new TypeError(\n        'At least one of max, maxSize, or ttl is required'\n      )\n    }\n    if (!this.ttlAutopurge && !this.#max && !this.#maxSize) {\n      const code = 'LRU_CACHE_UNBOUNDED'\n      if (shouldWarn(code)) {\n        warned.add(code)\n        const msg =\n          'TTL caching without ttlAutopurge, max, or maxSize can ' +\n          'result in unbounded memory consumption.'\n        emitWarning(msg, 'UnboundedCacheWarning', code, LRUCache)\n      }\n    }\n  }\n\n  /**\n   * Return the number of ms left in the item's TTL. If item is not in cache,\n   * returns `0`. Returns `Infinity` if item is in cache without a defined TTL.\n   */\n  getRemainingTTL(key: K) {\n    return this.#keyMap.has(key) ? Infinity : 0\n  }\n\n  #initializeTTLTracking() {\n    const ttls = new ZeroArray(this.#max)\n    const starts = new ZeroArray(this.#max)\n    this.#ttls = ttls\n    this.#starts = starts\n\n    this.#setItemTTL = (index, ttl, start = perf.now()) => {\n      starts[index] = ttl !== 0 ? start : 0\n      ttls[index] = ttl\n      if (ttl !== 0 && this.ttlAutopurge) {\n        const t = setTimeout(() => {\n          if (this.#isStale(index)) {\n            this.#delete(this.#keyList[index] as K, 'expire')\n          }\n        }, ttl + 1)\n        // unref() not supported on all platforms\n        /* c8 ignore start */\n        if (t.unref) {\n          t.unref()\n        }\n        /* c8 ignore stop */\n      }\n    }\n\n    this.#updateItemAge = index => {\n      starts[index] = ttls[index] !== 0 ? perf.now() : 0\n    }\n\n    this.#statusTTL = (status, index) => {\n      if (ttls[index]) {\n        const ttl = ttls[index]\n        const start = starts[index]\n        /* c8 ignore next */\n        if (!ttl || !start) return\n        status.ttl = ttl\n        status.start = start\n        status.now = cachedNow || getNow()\n        const age = status.now - start\n        status.remainingTTL = ttl - age\n      }\n    }\n\n    // debounce calls to perf.now() to 1s so we're not hitting\n    // that costly call repeatedly.\n    let cachedNow = 0\n    const getNow = () => {\n      const n = perf.now()\n      if (this.ttlResolution > 0) {\n        cachedNow = n\n        const t = setTimeout(\n          () => (cachedNow = 0),\n          this.ttlResolution\n        )\n        // not available on all platforms\n        /* c8 ignore start */\n        if (t.unref) {\n          t.unref()\n        }\n        /* c8 ignore stop */\n      }\n      return n\n    }\n\n    this.getRemainingTTL = key => {\n      const index = this.#keyMap.get(key)\n      if (index === undefined) {\n        return 0\n      }\n      const ttl = ttls[index]\n      const start = starts[index]\n      if (!ttl || !start) {\n        return Infinity\n      }\n      const age = (cachedNow || getNow()) - start\n      return ttl - age\n    }\n\n    this.#isStale = index => {\n      const s = starts[index]\n      const t = ttls[index]\n      return !!t && !!s && (cachedNow || getNow()) - s > t\n    }\n  }\n\n  // conditionally set private methods related to TTL\n  #updateItemAge: (index: Index) => void = () => {}\n  #statusTTL: (status: LRUCache.Status, index: Index) => void =\n    () => {}\n  #setItemTTL: (\n    index: Index,\n    ttl: LRUCache.Milliseconds,\n    start?: LRUCache.Milliseconds\n    // ignore because we never call this if we're not already in TTL mode\n    /* c8 ignore start */\n  ) => void = () => {}\n  /* c8 ignore stop */\n\n  #isStale: (index: Index) => boolean = () => false\n\n  #initializeSizeTracking() {\n    const sizes = new ZeroArray(this.#max)\n    this.#calculatedSize = 0\n    this.#sizes = sizes\n    this.#removeItemSize = index => {\n      this.#calculatedSize -= sizes[index] as number\n      sizes[index] = 0\n    }\n    this.#requireSize = (k, v, size, sizeCalculation) => {\n      // provisionally accept background fetches.\n      // actual value size will be checked when they return.\n      if (this.#isBackgroundFetch(v)) {\n        return 0\n      }\n      if (!isPosInt(size)) {\n        if (sizeCalculation) {\n          if (typeof sizeCalculation !== 'function') {\n            throw new TypeError('sizeCalculation must be a function')\n          }\n          size = sizeCalculation(v, k)\n          if (!isPosInt(size)) {\n            throw new TypeError(\n              'sizeCalculation return invalid (expect positive integer)'\n            )\n          }\n        } else {\n          throw new TypeError(\n            'invalid size value (must be positive integer). ' +\n              'When maxSize or maxEntrySize is used, sizeCalculation ' +\n              'or size must be set.'\n          )\n        }\n      }\n      return size\n    }\n    this.#addItemSize = (\n      index: Index,\n      size: LRUCache.Size,\n      status?: LRUCache.Status\n    ) => {\n      sizes[index] = size\n      if (this.#maxSize) {\n        const maxSize = this.#maxSize - (sizes[index] as number)\n        while (this.#calculatedSize > maxSize) {\n          this.#evict(true)\n        }\n      }\n      this.#calculatedSize += sizes[index] as number\n      if (status) {\n        status.entrySize = size\n        status.totalCalculatedSize = this.#calculatedSize\n      }\n    }\n  }\n\n  #removeItemSize: (index: Index) => void = _i => {}\n  #addItemSize: (\n    index: Index,\n    size: LRUCache.Size,\n    status?: LRUCache.Status\n  ) => void = (_i, _s, _st) => {}\n  #requireSize: (\n    k: K,\n    v: V | BackgroundFetch,\n    size?: LRUCache.Size,\n    sizeCalculation?: LRUCache.SizeCalculator\n  ) => LRUCache.Size = (\n    _k: K,\n    _v: V | BackgroundFetch,\n    size?: LRUCache.Size,\n    sizeCalculation?: LRUCache.SizeCalculator\n  ) => {\n    if (size || sizeCalculation) {\n      throw new TypeError(\n        'cannot set size without setting maxSize or maxEntrySize on cache'\n      )\n    }\n    return 0\n  };\n\n  *#indexes({ allowStale = this.allowStale } = {}) {\n    if (this.#size) {\n      for (let i = this.#tail; true; ) {\n        if (!this.#isValidIndex(i)) {\n          break\n        }\n        if (allowStale || !this.#isStale(i)) {\n          yield i\n        }\n        if (i === this.#head) {\n          break\n        } else {\n          i = this.#prev[i] as Index\n        }\n      }\n    }\n  }\n\n  *#rindexes({ allowStale = this.allowStale } = {}) {\n    if (this.#size) {\n      for (let i = this.#head; true; ) {\n        if (!this.#isValidIndex(i)) {\n          break\n        }\n        if (allowStale || !this.#isStale(i)) {\n          yield i\n        }\n        if (i === this.#tail) {\n          break\n        } else {\n          i = this.#next[i] as Index\n        }\n      }\n    }\n  }\n\n  #isValidIndex(index: Index) {\n    return (\n      index !== undefined &&\n      this.#keyMap.get(this.#keyList[index] as K) === index\n    )\n  }\n\n  /**\n   * Return a generator yielding `[key, value]` pairs,\n   * in order from most recently used to least recently used.\n   */\n  *entries() {\n    for (const i of this.#indexes()) {\n      if (\n        this.#valList[i] !== undefined &&\n        this.#keyList[i] !== undefined &&\n        !this.#isBackgroundFetch(this.#valList[i])\n      ) {\n        yield [this.#keyList[i], this.#valList[i]] as [K, V]\n      }\n    }\n  }\n\n  /**\n   * Inverse order version of {@link LRUCache.entries}\n   *\n   * Return a generator yielding `[key, value]` pairs,\n   * in order from least recently used to most recently used.\n   */\n  *rentries() {\n    for (const i of this.#rindexes()) {\n      if (\n        this.#valList[i] !== undefined &&\n        this.#keyList[i] !== undefined &&\n        !this.#isBackgroundFetch(this.#valList[i])\n      ) {\n        yield [this.#keyList[i], this.#valList[i]]\n      }\n    }\n  }\n\n  /**\n   * Return a generator yielding the keys in the cache,\n   * in order from most recently used to least recently used.\n   */\n  *keys() {\n    for (const i of this.#indexes()) {\n      const k = this.#keyList[i]\n      if (\n        k !== undefined &&\n        !this.#isBackgroundFetch(this.#valList[i])\n      ) {\n        yield k\n      }\n    }\n  }\n\n  /**\n   * Inverse order version of {@link LRUCache.keys}\n   *\n   * Return a generator yielding the keys in the cache,\n   * in order from least recently used to most recently used.\n   */\n  *rkeys() {\n    for (const i of this.#rindexes()) {\n      const k = this.#keyList[i]\n      if (\n        k !== undefined &&\n        !this.#isBackgroundFetch(this.#valList[i])\n      ) {\n        yield k\n      }\n    }\n  }\n\n  /**\n   * Return a generator yielding the values in the cache,\n   * in order from most recently used to least recently used.\n   */\n  *values() {\n    for (const i of this.#indexes()) {\n      const v = this.#valList[i]\n      if (\n        v !== undefined &&\n        !this.#isBackgroundFetch(this.#valList[i])\n      ) {\n        yield this.#valList[i] as V\n      }\n    }\n  }\n\n  /**\n   * Inverse order version of {@link LRUCache.values}\n   *\n   * Return a generator yielding the values in the cache,\n   * in order from least recently used to most recently used.\n   */\n  *rvalues() {\n    for (const i of this.#rindexes()) {\n      const v = this.#valList[i]\n      if (\n        v !== undefined &&\n        !this.#isBackgroundFetch(this.#valList[i])\n      ) {\n        yield this.#valList[i]\n      }\n    }\n  }\n\n  /**\n   * Iterating over the cache itself yields the same results as\n   * {@link LRUCache.entries}\n   */\n  [Symbol.iterator]() {\n    return this.entries()\n  }\n\n  /**\n   * A String value that is used in the creation of the default string\n   * description of an object. Called by the built-in method\n   * `Object.prototype.toString`.\n   */\n  [Symbol.toStringTag] = 'LRUCache'\n\n  /**\n   * Find a value for which the supplied fn method returns a truthy value,\n   * similar to `Array.find()`. fn is called as `fn(value, key, cache)`.\n   */\n  find(\n    fn: (v: V, k: K, self: LRUCache) => boolean,\n    getOptions: LRUCache.GetOptions = {}\n  ) {\n    for (const i of this.#indexes()) {\n      const v = this.#valList[i]\n      const value = this.#isBackgroundFetch(v)\n        ? v.__staleWhileFetching\n        : v\n      if (value === undefined) continue\n      if (fn(value, this.#keyList[i] as K, this)) {\n        return this.get(this.#keyList[i] as K, getOptions)\n      }\n    }\n  }\n\n  /**\n   * Call the supplied function on each item in the cache, in order from most\n   * recently used to least recently used.\n   *\n   * `fn` is called as `fn(value, key, cache)`.\n   *\n   * If `thisp` is provided, function will be called in the `this`-context of\n   * the provided object, or the cache if no `thisp` object is provided.\n   *\n   * Does not update age or recenty of use, or iterate over stale values.\n   */\n  forEach(\n    fn: (v: V, k: K, self: LRUCache) => any,\n    thisp: any = this\n  ) {\n    for (const i of this.#indexes()) {\n      const v = this.#valList[i]\n      const value = this.#isBackgroundFetch(v)\n        ? v.__staleWhileFetching\n        : v\n      if (value === undefined) continue\n      fn.call(thisp, value, this.#keyList[i] as K, this)\n    }\n  }\n\n  /**\n   * The same as {@link LRUCache.forEach} but items are iterated over in\n   * reverse order.  (ie, less recently used items are iterated over first.)\n   */\n  rforEach(\n    fn: (v: V, k: K, self: LRUCache) => any,\n    thisp: any = this\n  ) {\n    for (const i of this.#rindexes()) {\n      const v = this.#valList[i]\n      const value = this.#isBackgroundFetch(v)\n        ? v.__staleWhileFetching\n        : v\n      if (value === undefined) continue\n      fn.call(thisp, value, this.#keyList[i] as K, this)\n    }\n  }\n\n  /**\n   * Delete any stale entries. Returns true if anything was removed,\n   * false otherwise.\n   */\n  purgeStale() {\n    let deleted = false\n    for (const i of this.#rindexes({ allowStale: true })) {\n      if (this.#isStale(i)) {\n        this.#delete(this.#keyList[i] as K, 'expire')\n        deleted = true\n      }\n    }\n    return deleted\n  }\n\n  /**\n   * Get the extended info about a given entry, to get its value, size, and\n   * TTL info simultaneously. Returns `undefined` if the key is not present.\n   *\n   * Unlike {@link LRUCache#dump}, which is designed to be portable and survive\n   * serialization, the `start` value is always the current timestamp, and the\n   * `ttl` is a calculated remaining time to live (negative if expired).\n   *\n   * Always returns stale values, if their info is found in the cache, so be\n   * sure to check for expirations (ie, a negative {@link LRUCache.Entry#ttl})\n   * if relevant.\n   */\n  info(key: K): LRUCache.Entry | undefined {\n    const i = this.#keyMap.get(key)\n    if (i === undefined) return undefined\n    const v = this.#valList[i]\n    const value: V | undefined = this.#isBackgroundFetch(v)\n      ? v.__staleWhileFetching\n      : v\n    if (value === undefined) return undefined\n    const entry: LRUCache.Entry = { value }\n    if (this.#ttls && this.#starts) {\n      const ttl = this.#ttls[i]\n      const start = this.#starts[i]\n      if (ttl && start) {\n        const remain = ttl - (perf.now() - start)\n        entry.ttl = remain\n        entry.start = Date.now()\n      }\n    }\n    if (this.#sizes) {\n      entry.size = this.#sizes[i]\n    }\n    return entry\n  }\n\n  /**\n   * Return an array of [key, {@link LRUCache.Entry}] tuples which can be\n   * passed to {@link LRLUCache#load}.\n   *\n   * The `start` fields are calculated relative to a portable `Date.now()`\n   * timestamp, even if `performance.now()` is available.\n   *\n   * Stale entries are always included in the `dump`, even if\n   * {@link LRUCache.OptionsBase.allowStale} is false.\n   *\n   * Note: this returns an actual array, not a generator, so it can be more\n   * easily passed around.\n   */\n  dump() {\n    const arr: [K, LRUCache.Entry][] = []\n    for (const i of this.#indexes({ allowStale: true })) {\n      const key = this.#keyList[i]\n      const v = this.#valList[i]\n      const value: V | undefined = this.#isBackgroundFetch(v)\n        ? v.__staleWhileFetching\n        : v\n      if (value === undefined || key === undefined) continue\n      const entry: LRUCache.Entry = { value }\n      if (this.#ttls && this.#starts) {\n        entry.ttl = this.#ttls[i]\n        // always dump the start relative to a portable timestamp\n        // it's ok for this to be a bit slow, it's a rare operation.\n        const age = perf.now() - (this.#starts[i] as number)\n        entry.start = Math.floor(Date.now() - age)\n      }\n      if (this.#sizes) {\n        entry.size = this.#sizes[i]\n      }\n      arr.unshift([key, entry])\n    }\n    return arr\n  }\n\n  /**\n   * Reset the cache and load in the items in entries in the order listed.\n   *\n   * The shape of the resulting cache may be different if the same options are\n   * not used in both caches.\n   *\n   * The `start` fields are assumed to be calculated relative to a portable\n   * `Date.now()` timestamp, even if `performance.now()` is available.\n   */\n  load(arr: [K, LRUCache.Entry][]) {\n    this.clear()\n    for (const [key, entry] of arr) {\n      if (entry.start) {\n        // entry.start is a portable timestamp, but we may be using\n        // node's performance.now(), so calculate the offset, so that\n        // we get the intended remaining TTL, no matter how long it's\n        // been on ice.\n        //\n        // it's ok for this to be a bit slow, it's a rare operation.\n        const age = Date.now() - entry.start\n        entry.start = perf.now() - age\n      }\n      this.set(key, entry.value, entry)\n    }\n  }\n\n  /**\n   * Add a value to the cache.\n   *\n   * Note: if `undefined` is specified as a value, this is an alias for\n   * {@link LRUCache#delete}\n   *\n   * Fields on the {@link LRUCache.SetOptions} options param will override\n   * their corresponding values in the constructor options for the scope\n   * of this single `set()` operation.\n   *\n   * If `start` is provided, then that will set the effective start\n   * time for the TTL calculation. Note that this must be a previous\n   * value of `performance.now()` if supported, or a previous value of\n   * `Date.now()` if not.\n   *\n   * Options object may also include `size`, which will prevent\n   * calling the `sizeCalculation` function and just use the specified\n   * number if it is a positive integer, and `noDisposeOnSet` which\n   * will prevent calling a `dispose` function in the case of\n   * overwrites.\n   *\n   * If the `size` (or return value of `sizeCalculation`) for a given\n   * entry is greater than `maxEntrySize`, then the item will not be\n   * added to the cache.\n   *\n   * Will update the recency of the entry.\n   *\n   * If the value is `undefined`, then this is an alias for\n   * `cache.delete(key)`. `undefined` is never stored in the cache.\n   */\n  set(\n    k: K,\n    v: V | BackgroundFetch | undefined,\n    setOptions: LRUCache.SetOptions = {}\n  ) {\n    if (v === undefined) {\n      this.delete(k)\n      return this\n    }\n    const {\n      ttl = this.ttl,\n      start,\n      noDisposeOnSet = this.noDisposeOnSet,\n      sizeCalculation = this.sizeCalculation,\n      status,\n    } = setOptions\n    let { noUpdateTTL = this.noUpdateTTL } = setOptions\n\n    const size = this.#requireSize(\n      k,\n      v,\n      setOptions.size || 0,\n      sizeCalculation\n    )\n    // if the item doesn't fit, don't do anything\n    // NB: maxEntrySize set to maxSize by default\n    if (this.maxEntrySize && size > this.maxEntrySize) {\n      if (status) {\n        status.set = 'miss'\n        status.maxEntrySizeExceeded = true\n      }\n      // have to delete, in case something is there already.\n      this.#delete(k, 'set')\n      return this\n    }\n    let index = this.#size === 0 ? undefined : this.#keyMap.get(k)\n    if (index === undefined) {\n      // addition\n      index = (\n        this.#size === 0\n          ? this.#tail\n          : this.#free.length !== 0\n          ? this.#free.pop()\n          : this.#size === this.#max\n          ? this.#evict(false)\n          : this.#size\n      ) as Index\n      this.#keyList[index] = k\n      this.#valList[index] = v\n      this.#keyMap.set(k, index)\n      this.#next[this.#tail] = index\n      this.#prev[index] = this.#tail\n      this.#tail = index\n      this.#size++\n      this.#addItemSize(index, size, status)\n      if (status) status.set = 'add'\n      noUpdateTTL = false\n    } else {\n      // update\n      this.#moveToTail(index)\n      const oldVal = this.#valList[index] as V | BackgroundFetch\n      if (v !== oldVal) {\n        if (this.#hasFetchMethod && this.#isBackgroundFetch(oldVal)) {\n          oldVal.__abortController.abort(new Error('replaced'))\n          const { __staleWhileFetching: s } = oldVal\n          if (s !== undefined && !noDisposeOnSet) {\n            if (this.#hasDispose) {\n              this.#dispose?.(s as V, k, 'set')\n            }\n            if (this.#hasDisposeAfter) {\n              this.#disposed?.push([s as V, k, 'set'])\n            }\n          }\n        } else if (!noDisposeOnSet) {\n          if (this.#hasDispose) {\n            this.#dispose?.(oldVal as V, k, 'set')\n          }\n          if (this.#hasDisposeAfter) {\n            this.#disposed?.push([oldVal as V, k, 'set'])\n          }\n        }\n        this.#removeItemSize(index)\n        this.#addItemSize(index, size, status)\n        this.#valList[index] = v\n        if (status) {\n          status.set = 'replace'\n          const oldValue =\n            oldVal && this.#isBackgroundFetch(oldVal)\n              ? oldVal.__staleWhileFetching\n              : oldVal\n          if (oldValue !== undefined) status.oldValue = oldValue\n        }\n      } else if (status) {\n        status.set = 'update'\n      }\n    }\n    if (ttl !== 0 && !this.#ttls) {\n      this.#initializeTTLTracking()\n    }\n    if (this.#ttls) {\n      if (!noUpdateTTL) {\n        this.#setItemTTL(index, ttl, start)\n      }\n      if (status) this.#statusTTL(status, index)\n    }\n    if (!noDisposeOnSet && this.#hasDisposeAfter && this.#disposed) {\n      const dt = this.#disposed\n      let task: DisposeTask | undefined\n      while ((task = dt?.shift())) {\n        this.#disposeAfter?.(...task)\n      }\n    }\n    return this\n  }\n\n  /**\n   * Evict the least recently used item, returning its value or\n   * `undefined` if cache is empty.\n   */\n  pop(): V | undefined {\n    try {\n      while (this.#size) {\n        const val = this.#valList[this.#head]\n        this.#evict(true)\n        if (this.#isBackgroundFetch(val)) {\n          if (val.__staleWhileFetching) {\n            return val.__staleWhileFetching\n          }\n        } else if (val !== undefined) {\n          return val\n        }\n      }\n    } finally {\n      if (this.#hasDisposeAfter && this.#disposed) {\n        const dt = this.#disposed\n        let task: DisposeTask | undefined\n        while ((task = dt?.shift())) {\n          this.#disposeAfter?.(...task)\n        }\n      }\n    }\n  }\n\n  #evict(free: boolean) {\n    const head = this.#head\n    const k = this.#keyList[head] as K\n    const v = this.#valList[head] as V\n    if (this.#hasFetchMethod && this.#isBackgroundFetch(v)) {\n      v.__abortController.abort(new Error('evicted'))\n    } else if (this.#hasDispose || this.#hasDisposeAfter) {\n      if (this.#hasDispose) {\n        this.#dispose?.(v, k, 'evict')\n      }\n      if (this.#hasDisposeAfter) {\n        this.#disposed?.push([v, k, 'evict'])\n      }\n    }\n    this.#removeItemSize(head)\n    // if we aren't about to use the index, then null these out\n    if (free) {\n      this.#keyList[head] = undefined\n      this.#valList[head] = undefined\n      this.#free.push(head)\n    }\n    if (this.#size === 1) {\n      this.#head = this.#tail = 0 as Index\n      this.#free.length = 0\n    } else {\n      this.#head = this.#next[head] as Index\n    }\n    this.#keyMap.delete(k)\n    this.#size--\n    return head\n  }\n\n  /**\n   * Check if a key is in the cache, without updating the recency of use.\n   * Will return false if the item is stale, even though it is technically\n   * in the cache.\n   *\n   * Check if a key is in the cache, without updating the recency of\n   * use. Age is updated if {@link LRUCache.OptionsBase.updateAgeOnHas} is set\n   * to `true` in either the options or the constructor.\n   *\n   * Will return `false` if the item is stale, even though it is technically in\n   * the cache. The difference can be determined (if it matters) by using a\n   * `status` argument, and inspecting the `has` field.\n   *\n   * Will not update item age unless\n   * {@link LRUCache.OptionsBase.updateAgeOnHas} is set.\n   */\n  has(k: K, hasOptions: LRUCache.HasOptions = {}) {\n    const { updateAgeOnHas = this.updateAgeOnHas, status } =\n      hasOptions\n    const index = this.#keyMap.get(k)\n    if (index !== undefined) {\n      const v = this.#valList[index]\n      if (\n        this.#isBackgroundFetch(v) &&\n        v.__staleWhileFetching === undefined\n      ) {\n        return false\n      }\n      if (!this.#isStale(index)) {\n        if (updateAgeOnHas) {\n          this.#updateItemAge(index)\n        }\n        if (status) {\n          status.has = 'hit'\n          this.#statusTTL(status, index)\n        }\n        return true\n      } else if (status) {\n        status.has = 'stale'\n        this.#statusTTL(status, index)\n      }\n    } else if (status) {\n      status.has = 'miss'\n    }\n    return false\n  }\n\n  /**\n   * Like {@link LRUCache#get} but doesn't update recency or delete stale\n   * items.\n   *\n   * Returns `undefined` if the item is stale, unless\n   * {@link LRUCache.OptionsBase.allowStale} is set.\n   */\n  peek(k: K, peekOptions: LRUCache.PeekOptions = {}) {\n    const { allowStale = this.allowStale } = peekOptions\n    const index = this.#keyMap.get(k)\n    if (\n      index === undefined ||\n      (!allowStale && this.#isStale(index))\n    ) {\n      return\n    }\n    const v = this.#valList[index]\n    // either stale and allowed, or forcing a refresh of non-stale value\n    return this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v\n  }\n\n  #backgroundFetch(\n    k: K,\n    index: Index | undefined,\n    options: LRUCache.FetchOptions,\n    context: any\n  ): BackgroundFetch {\n    const v = index === undefined ? undefined : this.#valList[index]\n    if (this.#isBackgroundFetch(v)) {\n      return v\n    }\n\n    const ac = new AC()\n    const { signal } = options\n    // when/if our AC signals, then stop listening to theirs.\n    signal?.addEventListener('abort', () => ac.abort(signal.reason), {\n      signal: ac.signal,\n    })\n\n    const fetchOpts = {\n      signal: ac.signal,\n      options,\n      context,\n    }\n\n    const cb = (\n      v: V | undefined,\n      updateCache = false\n    ): V | undefined => {\n      const { aborted } = ac.signal\n      const ignoreAbort = options.ignoreFetchAbort && v !== undefined\n      if (options.status) {\n        if (aborted && !updateCache) {\n          options.status.fetchAborted = true\n          options.status.fetchError = ac.signal.reason\n          if (ignoreAbort) options.status.fetchAbortIgnored = true\n        } else {\n          options.status.fetchResolved = true\n        }\n      }\n      if (aborted && !ignoreAbort && !updateCache) {\n        return fetchFail(ac.signal.reason)\n      }\n      // either we didn't abort, and are still here, or we did, and ignored\n      const bf = p as BackgroundFetch\n      if (this.#valList[index as Index] === p) {\n        if (v === undefined) {\n          if (bf.__staleWhileFetching) {\n            this.#valList[index as Index] = bf.__staleWhileFetching\n          } else {\n            this.#delete(k, 'fetch')\n          }\n        } else {\n          if (options.status) options.status.fetchUpdated = true\n          this.set(k, v, fetchOpts.options)\n        }\n      }\n      return v\n    }\n\n    const eb = (er: any) => {\n      if (options.status) {\n        options.status.fetchRejected = true\n        options.status.fetchError = er\n      }\n      return fetchFail(er)\n    }\n\n    const fetchFail = (er: any): V | undefined => {\n      const { aborted } = ac.signal\n      const allowStaleAborted =\n        aborted && options.allowStaleOnFetchAbort\n      const allowStale =\n        allowStaleAborted || options.allowStaleOnFetchRejection\n      const noDelete = allowStale || options.noDeleteOnFetchRejection\n      const bf = p as BackgroundFetch\n      if (this.#valList[index as Index] === p) {\n        // if we allow stale on fetch rejections, then we need to ensure that\n        // the stale value is not removed from the cache when the fetch fails.\n        const del = !noDelete || bf.__staleWhileFetching === undefined\n        if (del) {\n          this.#delete(k, 'fetch')\n        } else if (!allowStaleAborted) {\n          // still replace the *promise* with the stale value,\n          // since we are done with the promise at this point.\n          // leave it untouched if we're still waiting for an\n          // aborted background fetch that hasn't yet returned.\n          this.#valList[index as Index] = bf.__staleWhileFetching\n        }\n      }\n      if (allowStale) {\n        if (options.status && bf.__staleWhileFetching !== undefined) {\n          options.status.returnedStale = true\n        }\n        return bf.__staleWhileFetching\n      } else if (bf.__returned === bf) {\n        throw er\n      }\n    }\n\n    const pcall = (\n      res: (v: V | undefined) => void,\n      rej: (e: any) => void\n    ) => {\n      const fmp = this.#fetchMethod?.(k, v, fetchOpts)\n      if (fmp && fmp instanceof Promise) {\n        fmp.then(v => res(v === undefined ? undefined : v), rej)\n      }\n      // ignored, we go until we finish, regardless.\n      // defer check until we are actually aborting,\n      // so fetchMethod can override.\n      ac.signal.addEventListener('abort', () => {\n        if (\n          !options.ignoreFetchAbort ||\n          options.allowStaleOnFetchAbort\n        ) {\n          res(undefined)\n          // when it eventually resolves, update the cache.\n          if (options.allowStaleOnFetchAbort) {\n            res = v => cb(v, true)\n          }\n        }\n      })\n    }\n\n    if (options.status) options.status.fetchDispatched = true\n    const p = new Promise(pcall).then(cb, eb)\n    const bf: BackgroundFetch = Object.assign(p, {\n      __abortController: ac,\n      __staleWhileFetching: v,\n      __returned: undefined,\n    })\n\n    if (index === undefined) {\n      // internal, don't expose status.\n      this.set(k, bf, { ...fetchOpts.options, status: undefined })\n      index = this.#keyMap.get(k)\n    } else {\n      this.#valList[index] = bf\n    }\n    return bf\n  }\n\n  #isBackgroundFetch(p: any): p is BackgroundFetch {\n    if (!this.#hasFetchMethod) return false\n    const b = p as BackgroundFetch\n    return (\n      !!b &&\n      b instanceof Promise &&\n      b.hasOwnProperty('__staleWhileFetching') &&\n      b.__abortController instanceof AC\n    )\n  }\n\n  /**\n   * Make an asynchronous cached fetch using the\n   * {@link LRUCache.OptionsBase.fetchMethod} function.\n   *\n   * If the value is in the cache and not stale, then the returned\n   * Promise resolves to the value.\n   *\n   * If not in the cache, or beyond its TTL staleness, then\n   * `fetchMethod(key, staleValue, { options, signal, context })` is\n   * called, and the value returned will be added to the cache once\n   * resolved.\n   *\n   * If called with `allowStale`, and an asynchronous fetch is\n   * currently in progress to reload a stale value, then the former\n   * stale value will be returned.\n   *\n   * If called with `forceRefresh`, then the cached item will be\n   * re-fetched, even if it is not stale. However, if `allowStale` is also\n   * set, then the old value will still be returned. This is useful\n   * in cases where you want to force a reload of a cached value. If\n   * a background fetch is already in progress, then `forceRefresh`\n   * has no effect.\n   *\n   * If multiple fetches for the same key are issued, then they will all be\n   * coalesced into a single call to fetchMethod.\n   *\n   * Note that this means that handling options such as\n   * {@link LRUCache.OptionsBase.allowStaleOnFetchAbort},\n   * {@link LRUCache.FetchOptions.signal},\n   * and {@link LRUCache.OptionsBase.allowStaleOnFetchRejection} will be\n   * determined by the FIRST fetch() call for a given key.\n   *\n   * This is a known (fixable) shortcoming which will be addresed on when\n   * someone complains about it, as the fix would involve added complexity and\n   * may not be worth the costs for this edge case.\n   *\n   * If {@link LRUCache.OptionsBase.fetchMethod} is not specified, then this is\n   * effectively an alias for `Promise.resolve(cache.get(key))`.\n   *\n   * When the fetch method resolves to a value, if the fetch has not\n   * been aborted due to deletion, eviction, or being overwritten,\n   * then it is added to the cache using the options provided.\n   *\n   * If the key is evicted or deleted before the `fetchMethod`\n   * resolves, then the AbortSignal passed to the `fetchMethod` will\n   * receive an `abort` event, and the promise returned by `fetch()`\n   * will reject with the reason for the abort.\n   *\n   * If a `signal` is passed to the `fetch()` call, then aborting the\n   * signal will abort the fetch and cause the `fetch()` promise to\n   * reject with the reason provided.\n   *\n   * **Setting `context`**\n   *\n   * If an `FC` type is set to a type other than `unknown`, `void`, or\n   * `undefined` in the {@link LRUCache} constructor, then all\n   * calls to `cache.fetch()` _must_ provide a `context` option. If\n   * set to `undefined` or `void`, then calls to fetch _must not_\n   * provide a `context` option.\n   *\n   * The `context` param allows you to provide arbitrary data that\n   * might be relevant in the course of fetching the data. It is only\n   * relevant for the course of a single `fetch()` operation, and\n   * discarded afterwards.\n   *\n   * **Note: `fetch()` calls are inflight-unique**\n   *\n   * If you call `fetch()` multiple times with the same key value,\n   * then every call after the first will resolve on the same\n   * promise1,\n   * _even if they have different settings that would otherwise change\n   * the behavior of the fetch_, such as `noDeleteOnFetchRejection`\n   * or `ignoreFetchAbort`.\n   *\n   * In most cases, this is not a problem (in fact, only fetching\n   * something once is what you probably want, if you're caching in\n   * the first place). If you are changing the fetch() options\n   * dramatically between runs, there's a good chance that you might\n   * be trying to fit divergent semantics into a single object, and\n   * would be better off with multiple cache instances.\n   *\n   * **1**: Ie, they're not the \"same Promise\", but they resolve at\n   * the same time, because they're both waiting on the same\n   * underlying fetchMethod response.\n   */\n\n  fetch(\n    k: K,\n    fetchOptions: unknown extends FC\n      ? LRUCache.FetchOptions\n      : FC extends undefined | void\n      ? LRUCache.FetchOptionsNoContext\n      : LRUCache.FetchOptionsWithContext\n  ): Promise\n\n  // this overload not allowed if context is required\n  fetch(\n    k: unknown extends FC\n      ? K\n      : FC extends undefined | void\n      ? K\n      : never,\n    fetchOptions?: unknown extends FC\n      ? LRUCache.FetchOptions\n      : FC extends undefined | void\n      ? LRUCache.FetchOptionsNoContext\n      : never\n  ): Promise\n\n  async fetch(\n    k: K,\n    fetchOptions: LRUCache.FetchOptions = {}\n  ): Promise {\n    const {\n      // get options\n      allowStale = this.allowStale,\n      updateAgeOnGet = this.updateAgeOnGet,\n      noDeleteOnStaleGet = this.noDeleteOnStaleGet,\n      // set options\n      ttl = this.ttl,\n      noDisposeOnSet = this.noDisposeOnSet,\n      size = 0,\n      sizeCalculation = this.sizeCalculation,\n      noUpdateTTL = this.noUpdateTTL,\n      // fetch exclusive options\n      noDeleteOnFetchRejection = this.noDeleteOnFetchRejection,\n      allowStaleOnFetchRejection = this.allowStaleOnFetchRejection,\n      ignoreFetchAbort = this.ignoreFetchAbort,\n      allowStaleOnFetchAbort = this.allowStaleOnFetchAbort,\n      context,\n      forceRefresh = false,\n      status,\n      signal,\n    } = fetchOptions\n\n    if (!this.#hasFetchMethod) {\n      if (status) status.fetch = 'get'\n      return this.get(k, {\n        allowStale,\n        updateAgeOnGet,\n        noDeleteOnStaleGet,\n        status,\n      })\n    }\n\n    const options = {\n      allowStale,\n      updateAgeOnGet,\n      noDeleteOnStaleGet,\n      ttl,\n      noDisposeOnSet,\n      size,\n      sizeCalculation,\n      noUpdateTTL,\n      noDeleteOnFetchRejection,\n      allowStaleOnFetchRejection,\n      allowStaleOnFetchAbort,\n      ignoreFetchAbort,\n      status,\n      signal,\n    }\n\n    let index = this.#keyMap.get(k)\n    if (index === undefined) {\n      if (status) status.fetch = 'miss'\n      const p = this.#backgroundFetch(k, index, options, context)\n      return (p.__returned = p)\n    } else {\n      // in cache, maybe already fetching\n      const v = this.#valList[index]\n      if (this.#isBackgroundFetch(v)) {\n        const stale =\n          allowStale && v.__staleWhileFetching !== undefined\n        if (status) {\n          status.fetch = 'inflight'\n          if (stale) status.returnedStale = true\n        }\n        return stale ? v.__staleWhileFetching : (v.__returned = v)\n      }\n\n      // if we force a refresh, that means do NOT serve the cached value,\n      // unless we are already in the process of refreshing the cache.\n      const isStale = this.#isStale(index)\n      if (!forceRefresh && !isStale) {\n        if (status) status.fetch = 'hit'\n        this.#moveToTail(index)\n        if (updateAgeOnGet) {\n          this.#updateItemAge(index)\n        }\n        if (status) this.#statusTTL(status, index)\n        return v\n      }\n\n      // ok, it is stale or a forced refresh, and not already fetching.\n      // refresh the cache.\n      const p = this.#backgroundFetch(k, index, options, context)\n      const hasStale = p.__staleWhileFetching !== undefined\n      const staleVal = hasStale && allowStale\n      if (status) {\n        status.fetch = isStale ? 'stale' : 'refresh'\n        if (staleVal && isStale) status.returnedStale = true\n      }\n      return staleVal ? p.__staleWhileFetching : (p.__returned = p)\n    }\n  }\n\n  /**\n   * In some cases, `cache.fetch()` may resolve to `undefined`, either because\n   * a {@link LRUCache.OptionsBase#fetchMethod} was not provided (turning\n   * `cache.fetch(k)` into just an async wrapper around `cache.get(k)`) or\n   * because `ignoreFetchAbort` was specified (either to the constructor or\n   * in the {@link LRUCache.FetchOptions}). Also, the\n   * {@link OptionsBase.fetchMethod} may return `undefined` or `void`, making\n   * the test even more complicated.\n   *\n   * Because inferring the cases where `undefined` might be returned are so\n   * cumbersome, but testing for `undefined` can also be annoying, this method\n   * can be used, which will reject if `this.fetch()` resolves to undefined.\n   */\n  forceFetch(\n    k: K,\n    fetchOptions: unknown extends FC\n      ? LRUCache.FetchOptions\n      : FC extends undefined | void\n      ? LRUCache.FetchOptionsNoContext\n      : LRUCache.FetchOptionsWithContext\n  ): Promise\n  // this overload not allowed if context is required\n  forceFetch(\n    k: unknown extends FC\n      ? K\n      : FC extends undefined | void\n      ? K\n      : never,\n    fetchOptions?: unknown extends FC\n      ? LRUCache.FetchOptions\n      : FC extends undefined | void\n      ? LRUCache.FetchOptionsNoContext\n      : never\n  ): Promise\n  async forceFetch(\n    k: K,\n    fetchOptions: LRUCache.FetchOptions = {}\n  ): Promise {\n    const v = await this.fetch(\n      k,\n      fetchOptions as unknown extends FC\n        ? LRUCache.FetchOptions\n        : FC extends undefined | void\n        ? LRUCache.FetchOptionsNoContext\n        : LRUCache.FetchOptionsWithContext\n    )\n    if (v === undefined) throw new Error('fetch() returned undefined')\n    return v\n  }\n\n  /**\n   * If the key is found in the cache, then this is equivalent to\n   * {@link LRUCache#get}. If not, in the cache, then calculate the value using\n   * the {@link LRUCache.OptionsBase.memoMethod}, and add it to the cache.\n   *\n   * If an `FC` type is set to a type other than `unknown`, `void`, or\n   * `undefined` in the LRUCache constructor, then all calls to `cache.memo()`\n   * _must_ provide a `context` option. If set to `undefined` or `void`, then\n   * calls to memo _must not_ provide a `context` option.\n   *\n   * The `context` param allows you to provide arbitrary data that might be\n   * relevant in the course of fetching the data. It is only relevant for the\n   * course of a single `memo()` operation, and discarded afterwards.\n   */\n  memo(\n    k: K,\n    memoOptions: unknown extends FC\n      ? LRUCache.MemoOptions\n      : FC extends undefined | void\n      ? LRUCache.MemoOptionsNoContext\n      : LRUCache.MemoOptionsWithContext\n  ): V\n  // this overload not allowed if context is required\n  memo(\n    k: unknown extends FC\n      ? K\n      : FC extends undefined | void\n      ? K\n      : never,\n    memoOptions?: unknown extends FC\n      ? LRUCache.MemoOptions\n      : FC extends undefined | void\n      ? LRUCache.MemoOptionsNoContext\n      : never\n  ): V\n  memo(k: K, memoOptions: LRUCache.MemoOptions = {}) {\n    const memoMethod = this.#memoMethod\n    if (!memoMethod) {\n      throw new Error('no memoMethod provided to constructor')\n    }\n    const { context, forceRefresh, ...options } = memoOptions\n    const v = this.get(k, options)\n    if (!forceRefresh && v !== undefined) return v\n    const vv = memoMethod(k, v, {\n      options,\n      context,\n    } as LRUCache.MemoizerOptions)\n    this.set(k, vv, options)\n    return vv\n  }\n\n  /**\n   * Return a value from the cache. Will update the recency of the cache\n   * entry found.\n   *\n   * If the key is not found, get() will return `undefined`.\n   */\n  get(k: K, getOptions: LRUCache.GetOptions = {}) {\n    const {\n      allowStale = this.allowStale,\n      updateAgeOnGet = this.updateAgeOnGet,\n      noDeleteOnStaleGet = this.noDeleteOnStaleGet,\n      status,\n    } = getOptions\n    const index = this.#keyMap.get(k)\n    if (index !== undefined) {\n      const value = this.#valList[index]\n      const fetching = this.#isBackgroundFetch(value)\n      if (status) this.#statusTTL(status, index)\n      if (this.#isStale(index)) {\n        if (status) status.get = 'stale'\n        // delete only if not an in-flight background fetch\n        if (!fetching) {\n          if (!noDeleteOnStaleGet) {\n            this.#delete(k, 'expire')\n          }\n          if (status && allowStale) status.returnedStale = true\n          return allowStale ? value : undefined\n        } else {\n          if (\n            status &&\n            allowStale &&\n            value.__staleWhileFetching !== undefined\n          ) {\n            status.returnedStale = true\n          }\n          return allowStale ? value.__staleWhileFetching : undefined\n        }\n      } else {\n        if (status) status.get = 'hit'\n        // if we're currently fetching it, we don't actually have it yet\n        // it's not stale, which means this isn't a staleWhileRefetching.\n        // If it's not stale, and fetching, AND has a __staleWhileFetching\n        // value, then that means the user fetched with {forceRefresh:true},\n        // so it's safe to return that value.\n        if (fetching) {\n          return value.__staleWhileFetching\n        }\n        this.#moveToTail(index)\n        if (updateAgeOnGet) {\n          this.#updateItemAge(index)\n        }\n        return value\n      }\n    } else if (status) {\n      status.get = 'miss'\n    }\n  }\n\n  #connect(p: Index, n: Index) {\n    this.#prev[n] = p\n    this.#next[p] = n\n  }\n\n  #moveToTail(index: Index): void {\n    // if tail already, nothing to do\n    // if head, move head to next[index]\n    // else\n    //   move next[prev[index]] to next[index] (head has no prev)\n    //   move prev[next[index]] to prev[index]\n    // prev[index] = tail\n    // next[tail] = index\n    // tail = index\n    if (index !== this.#tail) {\n      if (index === this.#head) {\n        this.#head = this.#next[index] as Index\n      } else {\n        this.#connect(\n          this.#prev[index] as Index,\n          this.#next[index] as Index\n        )\n      }\n      this.#connect(this.#tail, index)\n      this.#tail = index\n    }\n  }\n\n  /**\n   * Deletes a key out of the cache.\n   *\n   * Returns true if the key was deleted, false otherwise.\n   */\n  delete(k: K) {\n    return this.#delete(k, 'delete')\n  }\n\n  #delete(k: K, reason: LRUCache.DisposeReason) {\n    let deleted = false\n    if (this.#size !== 0) {\n      const index = this.#keyMap.get(k)\n      if (index !== undefined) {\n        deleted = true\n        if (this.#size === 1) {\n          this.#clear(reason)\n        } else {\n          this.#removeItemSize(index)\n          const v = this.#valList[index]\n          if (this.#isBackgroundFetch(v)) {\n            v.__abortController.abort(new Error('deleted'))\n          } else if (this.#hasDispose || this.#hasDisposeAfter) {\n            if (this.#hasDispose) {\n              this.#dispose?.(v as V, k, reason)\n            }\n            if (this.#hasDisposeAfter) {\n              this.#disposed?.push([v as V, k, reason])\n            }\n          }\n          this.#keyMap.delete(k)\n          this.#keyList[index] = undefined\n          this.#valList[index] = undefined\n          if (index === this.#tail) {\n            this.#tail = this.#prev[index] as Index\n          } else if (index === this.#head) {\n            this.#head = this.#next[index] as Index\n          } else {\n            const pi = this.#prev[index] as number\n            this.#next[pi] = this.#next[index] as number\n            const ni = this.#next[index] as number\n            this.#prev[ni] = this.#prev[index] as number\n          }\n          this.#size--\n          this.#free.push(index)\n        }\n      }\n    }\n    if (this.#hasDisposeAfter && this.#disposed?.length) {\n      const dt = this.#disposed\n      let task: DisposeTask | undefined\n      while ((task = dt?.shift())) {\n        this.#disposeAfter?.(...task)\n      }\n    }\n    return deleted\n  }\n\n  /**\n   * Clear the cache entirely, throwing away all values.\n   */\n  clear() {\n    return this.#clear('delete')\n  }\n  #clear(reason: LRUCache.DisposeReason) {\n    for (const index of this.#rindexes({ allowStale: true })) {\n      const v = this.#valList[index]\n      if (this.#isBackgroundFetch(v)) {\n        v.__abortController.abort(new Error('deleted'))\n      } else {\n        const k = this.#keyList[index]\n        if (this.#hasDispose) {\n          this.#dispose?.(v as V, k as K, reason)\n        }\n        if (this.#hasDisposeAfter) {\n          this.#disposed?.push([v as V, k as K, reason])\n        }\n      }\n    }\n\n    this.#keyMap.clear()\n    this.#valList.fill(undefined)\n    this.#keyList.fill(undefined)\n    if (this.#ttls && this.#starts) {\n      this.#ttls.fill(0)\n      this.#starts.fill(0)\n    }\n    if (this.#sizes) {\n      this.#sizes.fill(0)\n    }\n    this.#head = 0 as Index\n    this.#tail = 0 as Index\n    this.#free.length = 0\n    this.#calculatedSize = 0\n    this.#size = 0\n    if (this.#hasDisposeAfter && this.#disposed) {\n      const dt = this.#disposed\n      let task: DisposeTask | undefined\n      while ((task = dt?.shift())) {\n        this.#disposeAfter?.(...task)\n      }\n    }\n  }\n}\n"]}
              \ No newline at end of file
              diff --git a/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/index.min.js b/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/index.min.js
              deleted file mode 100644
              index ad643b0b..00000000
              --- a/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/index.min.js
              +++ /dev/null
              @@ -1,2 +0,0 @@
              -"use strict";var G=(l,t,e)=>{if(!t.has(l))throw TypeError("Cannot "+e)};var j=(l,t,e)=>(G(l,t,"read from private field"),e?e.call(l):t.get(l)),I=(l,t,e)=>{if(t.has(l))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(l):t.set(l,e)},x=(l,t,e,i)=>(G(l,t,"write to private field"),i?i.call(l,e):t.set(l,e),e);Object.defineProperty(exports,"__esModule",{value:!0});exports.LRUCache=void 0;var T=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,P=new Set,U=typeof process=="object"&&process?process:{},H=(l,t,e,i)=>{typeof U.emitWarning=="function"?U.emitWarning(l,t,e,i):console.error(`[${e}] ${t}: ${l}`)},D=globalThis.AbortController,N=globalThis.AbortSignal;if(typeof D>"u"){N=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(i,s){this._onabort.push(s)}},D=class{constructor(){t()}signal=new N;abort(i){if(!this.signal.aborted){this.signal.reason=i,this.signal.aborted=!0;for(let s of this.signal._onabort)s(i);this.signal.onabort?.(i)}}};let l=U.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",t=()=>{l&&(l=!1,H("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",t))}}var V=l=>!P.has(l),Y=Symbol("type"),A=l=>l&&l===Math.floor(l)&&l>0&&isFinite(l),k=l=>A(l)?l<=Math.pow(2,8)?Uint8Array:l<=Math.pow(2,16)?Uint16Array:l<=Math.pow(2,32)?Uint32Array:l<=Number.MAX_SAFE_INTEGER?E:null:null,E=class extends Array{constructor(t){super(t),this.fill(0)}},v,O=class{heap;length;static create(t){let e=k(t);if(!e)return[];x(O,v,!0);let i=new O(t,e);return x(O,v,!1),i}constructor(t,e){if(!j(O,v))throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new e(t),this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}},W=O;v=new WeakMap,I(W,v,!1);var C=class{#g;#f;#p;#w;#R;#W;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#n;#S;#s;#i;#t;#l;#c;#o;#h;#_;#r;#b;#m;#u;#y;#E;#a;static unsafeExposeInternals(t){return{starts:t.#m,ttls:t.#u,sizes:t.#b,keyMap:t.#s,keyList:t.#i,valList:t.#t,next:t.#l,prev:t.#c,get head(){return t.#o},get tail(){return t.#h},free:t.#_,isBackgroundFetch:e=>t.#e(e),backgroundFetch:(e,i,s,n)=>t.#x(e,i,s,n),moveToTail:e=>t.#C(e),indexes:e=>t.#A(e),rindexes:e=>t.#F(e),isStale:e=>t.#d(e)}}get max(){return this.#g}get maxSize(){return this.#f}get calculatedSize(){return this.#S}get size(){return this.#n}get fetchMethod(){return this.#R}get memoMethod(){return this.#W}get dispose(){return this.#p}get disposeAfter(){return this.#w}constructor(t){let{max:e=0,ttl:i,ttlResolution:s=1,ttlAutopurge:n,updateAgeOnGet:h,updateAgeOnHas:o,allowStale:r,dispose:g,disposeAfter:b,noDisposeOnSet:f,noUpdateTTL:u,maxSize:c=0,maxEntrySize:F=0,sizeCalculation:d,fetchMethod:S,memoMethod:a,noDeleteOnFetchRejection:w,noDeleteOnStaleGet:m,allowStaleOnFetchRejection:p,allowStaleOnFetchAbort:_,ignoreFetchAbort:z}=t;if(e!==0&&!A(e))throw new TypeError("max option must be a nonnegative integer");let y=e?k(e):Array;if(!y)throw new Error("invalid max value: "+e);if(this.#g=e,this.#f=c,this.maxEntrySize=F||this.#f,this.sizeCalculation=d,this.sizeCalculation){if(!this.#f&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(a!==void 0&&typeof a!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#W=a,S!==void 0&&typeof S!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#R=S,this.#E=!!S,this.#s=new Map,this.#i=new Array(e).fill(void 0),this.#t=new Array(e).fill(void 0),this.#l=new y(e),this.#c=new y(e),this.#o=0,this.#h=0,this.#_=W.create(e),this.#n=0,this.#S=0,typeof g=="function"&&(this.#p=g),typeof b=="function"?(this.#w=b,this.#r=[]):(this.#w=void 0,this.#r=void 0),this.#y=!!this.#p,this.#a=!!this.#w,this.noDisposeOnSet=!!f,this.noUpdateTTL=!!u,this.noDeleteOnFetchRejection=!!w,this.allowStaleOnFetchRejection=!!p,this.allowStaleOnFetchAbort=!!_,this.ignoreFetchAbort=!!z,this.maxEntrySize!==0){if(this.#f!==0&&!A(this.#f))throw new TypeError("maxSize must be a positive integer if specified");if(!A(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#P()}if(this.allowStale=!!r,this.noDeleteOnStaleGet=!!m,this.updateAgeOnGet=!!h,this.updateAgeOnHas=!!o,this.ttlResolution=A(s)||s===0?s:1,this.ttlAutopurge=!!n,this.ttl=i||0,this.ttl){if(!A(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#U()}if(this.#g===0&&this.ttl===0&&this.#f===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#g&&!this.#f){let R="LRU_CACHE_UNBOUNDED";V(R)&&(P.add(R),H("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",R,C))}}getRemainingTTL(t){return this.#s.has(t)?1/0:0}#U(){let t=new E(this.#g),e=new E(this.#g);this.#u=t,this.#m=e,this.#M=(n,h,o=T.now())=>{if(e[n]=h!==0?o:0,t[n]=h,h!==0&&this.ttlAutopurge){let r=setTimeout(()=>{this.#d(n)&&this.#T(this.#i[n],"expire")},h+1);r.unref&&r.unref()}},this.#v=n=>{e[n]=t[n]!==0?T.now():0},this.#O=(n,h)=>{if(t[h]){let o=t[h],r=e[h];if(!o||!r)return;n.ttl=o,n.start=r,n.now=i||s();let g=n.now-r;n.remainingTTL=o-g}};let i=0,s=()=>{let n=T.now();if(this.ttlResolution>0){i=n;let h=setTimeout(()=>i=0,this.ttlResolution);h.unref&&h.unref()}return n};this.getRemainingTTL=n=>{let h=this.#s.get(n);if(h===void 0)return 0;let o=t[h],r=e[h];if(!o||!r)return 1/0;let g=(i||s())-r;return o-g},this.#d=n=>{let h=e[n],o=t[n];return!!o&&!!h&&(i||s())-h>o}}#v=()=>{};#O=()=>{};#M=()=>{};#d=()=>!1;#P(){let t=new E(this.#g);this.#S=0,this.#b=t,this.#z=e=>{this.#S-=t[e],t[e]=0},this.#G=(e,i,s,n)=>{if(this.#e(i))return 0;if(!A(s))if(n){if(typeof n!="function")throw new TypeError("sizeCalculation must be a function");if(s=n(i,e),!A(s))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return s},this.#D=(e,i,s)=>{if(t[e]=i,this.#f){let n=this.#f-t[e];for(;this.#S>n;)this.#L(!0)}this.#S+=t[e],s&&(s.entrySize=i,s.totalCalculatedSize=this.#S)}}#z=t=>{};#D=(t,e,i)=>{};#G=(t,e,i,s)=>{if(i||s)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#A({allowStale:t=this.allowStale}={}){if(this.#n)for(let e=this.#h;!(!this.#j(e)||((t||!this.#d(e))&&(yield e),e===this.#o));)e=this.#c[e]}*#F({allowStale:t=this.allowStale}={}){if(this.#n)for(let e=this.#o;!(!this.#j(e)||((t||!this.#d(e))&&(yield e),e===this.#h));)e=this.#l[e]}#j(t){return t!==void 0&&this.#s.get(this.#i[t])===t}*entries(){for(let t of this.#A())this.#t[t]!==void 0&&this.#i[t]!==void 0&&!this.#e(this.#t[t])&&(yield[this.#i[t],this.#t[t]])}*rentries(){for(let t of this.#F())this.#t[t]!==void 0&&this.#i[t]!==void 0&&!this.#e(this.#t[t])&&(yield[this.#i[t],this.#t[t]])}*keys(){for(let t of this.#A()){let e=this.#i[t];e!==void 0&&!this.#e(this.#t[t])&&(yield e)}}*rkeys(){for(let t of this.#F()){let e=this.#i[t];e!==void 0&&!this.#e(this.#t[t])&&(yield e)}}*values(){for(let t of this.#A())this.#t[t]!==void 0&&!this.#e(this.#t[t])&&(yield this.#t[t])}*rvalues(){for(let t of this.#F())this.#t[t]!==void 0&&!this.#e(this.#t[t])&&(yield this.#t[t])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(t,e={}){for(let i of this.#A()){let s=this.#t[i],n=this.#e(s)?s.__staleWhileFetching:s;if(n!==void 0&&t(n,this.#i[i],this))return this.get(this.#i[i],e)}}forEach(t,e=this){for(let i of this.#A()){let s=this.#t[i],n=this.#e(s)?s.__staleWhileFetching:s;n!==void 0&&t.call(e,n,this.#i[i],this)}}rforEach(t,e=this){for(let i of this.#F()){let s=this.#t[i],n=this.#e(s)?s.__staleWhileFetching:s;n!==void 0&&t.call(e,n,this.#i[i],this)}}purgeStale(){let t=!1;for(let e of this.#F({allowStale:!0}))this.#d(e)&&(this.#T(this.#i[e],"expire"),t=!0);return t}info(t){let e=this.#s.get(t);if(e===void 0)return;let i=this.#t[e],s=this.#e(i)?i.__staleWhileFetching:i;if(s===void 0)return;let n={value:s};if(this.#u&&this.#m){let h=this.#u[e],o=this.#m[e];if(h&&o){let r=h-(T.now()-o);n.ttl=r,n.start=Date.now()}}return this.#b&&(n.size=this.#b[e]),n}dump(){let t=[];for(let e of this.#A({allowStale:!0})){let i=this.#i[e],s=this.#t[e],n=this.#e(s)?s.__staleWhileFetching:s;if(n===void 0||i===void 0)continue;let h={value:n};if(this.#u&&this.#m){h.ttl=this.#u[e];let o=T.now()-this.#m[e];h.start=Math.floor(Date.now()-o)}this.#b&&(h.size=this.#b[e]),t.unshift([i,h])}return t}load(t){this.clear();for(let[e,i]of t){if(i.start){let s=Date.now()-i.start;i.start=T.now()-s}this.set(e,i.value,i)}}set(t,e,i={}){if(e===void 0)return this.delete(t),this;let{ttl:s=this.ttl,start:n,noDisposeOnSet:h=this.noDisposeOnSet,sizeCalculation:o=this.sizeCalculation,status:r}=i,{noUpdateTTL:g=this.noUpdateTTL}=i,b=this.#G(t,e,i.size||0,o);if(this.maxEntrySize&&b>this.maxEntrySize)return r&&(r.set="miss",r.maxEntrySizeExceeded=!0),this.#T(t,"set"),this;let f=this.#n===0?void 0:this.#s.get(t);if(f===void 0)f=this.#n===0?this.#h:this.#_.length!==0?this.#_.pop():this.#n===this.#g?this.#L(!1):this.#n,this.#i[f]=t,this.#t[f]=e,this.#s.set(t,f),this.#l[this.#h]=f,this.#c[f]=this.#h,this.#h=f,this.#n++,this.#D(f,b,r),r&&(r.set="add"),g=!1;else{this.#C(f);let u=this.#t[f];if(e!==u){if(this.#E&&this.#e(u)){u.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:c}=u;c!==void 0&&!h&&(this.#y&&this.#p?.(c,t,"set"),this.#a&&this.#r?.push([c,t,"set"]))}else h||(this.#y&&this.#p?.(u,t,"set"),this.#a&&this.#r?.push([u,t,"set"]));if(this.#z(f),this.#D(f,b,r),this.#t[f]=e,r){r.set="replace";let c=u&&this.#e(u)?u.__staleWhileFetching:u;c!==void 0&&(r.oldValue=c)}}else r&&(r.set="update")}if(s!==0&&!this.#u&&this.#U(),this.#u&&(g||this.#M(f,s,n),r&&this.#O(r,f)),!h&&this.#a&&this.#r){let u=this.#r,c;for(;c=u?.shift();)this.#w?.(...c)}return this}pop(){try{for(;this.#n;){let t=this.#t[this.#o];if(this.#L(!0),this.#e(t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(t!==void 0)return t}}finally{if(this.#a&&this.#r){let t=this.#r,e;for(;e=t?.shift();)this.#w?.(...e)}}}#L(t){let e=this.#o,i=this.#i[e],s=this.#t[e];return this.#E&&this.#e(s)?s.__abortController.abort(new Error("evicted")):(this.#y||this.#a)&&(this.#y&&this.#p?.(s,i,"evict"),this.#a&&this.#r?.push([s,i,"evict"])),this.#z(e),t&&(this.#i[e]=void 0,this.#t[e]=void 0,this.#_.push(e)),this.#n===1?(this.#o=this.#h=0,this.#_.length=0):this.#o=this.#l[e],this.#s.delete(i),this.#n--,e}has(t,e={}){let{updateAgeOnHas:i=this.updateAgeOnHas,status:s}=e,n=this.#s.get(t);if(n!==void 0){let h=this.#t[n];if(this.#e(h)&&h.__staleWhileFetching===void 0)return!1;if(this.#d(n))s&&(s.has="stale",this.#O(s,n));else return i&&this.#v(n),s&&(s.has="hit",this.#O(s,n)),!0}else s&&(s.has="miss");return!1}peek(t,e={}){let{allowStale:i=this.allowStale}=e,s=this.#s.get(t);if(s===void 0||!i&&this.#d(s))return;let n=this.#t[s];return this.#e(n)?n.__staleWhileFetching:n}#x(t,e,i,s){let n=e===void 0?void 0:this.#t[e];if(this.#e(n))return n;let h=new D,{signal:o}=i;o?.addEventListener("abort",()=>h.abort(o.reason),{signal:h.signal});let r={signal:h.signal,options:i,context:s},g=(d,S=!1)=>{let{aborted:a}=h.signal,w=i.ignoreFetchAbort&&d!==void 0;if(i.status&&(a&&!S?(i.status.fetchAborted=!0,i.status.fetchError=h.signal.reason,w&&(i.status.fetchAbortIgnored=!0)):i.status.fetchResolved=!0),a&&!w&&!S)return f(h.signal.reason);let m=c;return this.#t[e]===c&&(d===void 0?m.__staleWhileFetching?this.#t[e]=m.__staleWhileFetching:this.#T(t,"fetch"):(i.status&&(i.status.fetchUpdated=!0),this.set(t,d,r.options))),d},b=d=>(i.status&&(i.status.fetchRejected=!0,i.status.fetchError=d),f(d)),f=d=>{let{aborted:S}=h.signal,a=S&&i.allowStaleOnFetchAbort,w=a||i.allowStaleOnFetchRejection,m=w||i.noDeleteOnFetchRejection,p=c;if(this.#t[e]===c&&(!m||p.__staleWhileFetching===void 0?this.#T(t,"fetch"):a||(this.#t[e]=p.__staleWhileFetching)),w)return i.status&&p.__staleWhileFetching!==void 0&&(i.status.returnedStale=!0),p.__staleWhileFetching;if(p.__returned===p)throw d},u=(d,S)=>{let a=this.#R?.(t,n,r);a&&a instanceof Promise&&a.then(w=>d(w===void 0?void 0:w),S),h.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(d(void 0),i.allowStaleOnFetchAbort&&(d=w=>g(w,!0)))})};i.status&&(i.status.fetchDispatched=!0);let c=new Promise(u).then(g,b),F=Object.assign(c,{__abortController:h,__staleWhileFetching:n,__returned:void 0});return e===void 0?(this.set(t,F,{...r.options,status:void 0}),e=this.#s.get(t)):this.#t[e]=F,F}#e(t){if(!this.#E)return!1;let e=t;return!!e&&e instanceof Promise&&e.hasOwnProperty("__staleWhileFetching")&&e.__abortController instanceof D}async fetch(t,e={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,ttl:h=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:r=0,sizeCalculation:g=this.sizeCalculation,noUpdateTTL:b=this.noUpdateTTL,noDeleteOnFetchRejection:f=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:u=this.allowStaleOnFetchRejection,ignoreFetchAbort:c=this.ignoreFetchAbort,allowStaleOnFetchAbort:F=this.allowStaleOnFetchAbort,context:d,forceRefresh:S=!1,status:a,signal:w}=e;if(!this.#E)return a&&(a.fetch="get"),this.get(t,{allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:n,status:a});let m={allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:n,ttl:h,noDisposeOnSet:o,size:r,sizeCalculation:g,noUpdateTTL:b,noDeleteOnFetchRejection:f,allowStaleOnFetchRejection:u,allowStaleOnFetchAbort:F,ignoreFetchAbort:c,status:a,signal:w},p=this.#s.get(t);if(p===void 0){a&&(a.fetch="miss");let _=this.#x(t,p,m,d);return _.__returned=_}else{let _=this.#t[p];if(this.#e(_)){let M=i&&_.__staleWhileFetching!==void 0;return a&&(a.fetch="inflight",M&&(a.returnedStale=!0)),M?_.__staleWhileFetching:_.__returned=_}let z=this.#d(p);if(!S&&!z)return a&&(a.fetch="hit"),this.#C(p),s&&this.#v(p),a&&this.#O(a,p),_;let y=this.#x(t,p,m,d),L=y.__staleWhileFetching!==void 0&&i;return a&&(a.fetch=z?"stale":"refresh",L&&z&&(a.returnedStale=!0)),L?y.__staleWhileFetching:y.__returned=y}}async forceFetch(t,e={}){let i=await this.fetch(t,e);if(i===void 0)throw new Error("fetch() returned undefined");return i}memo(t,e={}){let i=this.#W;if(!i)throw new Error("no memoMethod provided to constructor");let{context:s,forceRefresh:n,...h}=e,o=this.get(t,h);if(!n&&o!==void 0)return o;let r=i(t,o,{options:h,context:s});return this.set(t,r,h),r}get(t,e={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,status:h}=e,o=this.#s.get(t);if(o!==void 0){let r=this.#t[o],g=this.#e(r);return h&&this.#O(h,o),this.#d(o)?(h&&(h.get="stale"),g?(h&&i&&r.__staleWhileFetching!==void 0&&(h.returnedStale=!0),i?r.__staleWhileFetching:void 0):(n||this.#T(t,"expire"),h&&i&&(h.returnedStale=!0),i?r:void 0)):(h&&(h.get="hit"),g?r.__staleWhileFetching:(this.#C(o),s&&this.#v(o),r))}else h&&(h.get="miss")}#I(t,e){this.#c[e]=t,this.#l[t]=e}#C(t){t!==this.#h&&(t===this.#o?this.#o=this.#l[t]:this.#I(this.#c[t],this.#l[t]),this.#I(this.#h,t),this.#h=t)}delete(t){return this.#T(t,"delete")}#T(t,e){let i=!1;if(this.#n!==0){let s=this.#s.get(t);if(s!==void 0)if(i=!0,this.#n===1)this.#N(e);else{this.#z(s);let n=this.#t[s];if(this.#e(n)?n.__abortController.abort(new Error("deleted")):(this.#y||this.#a)&&(this.#y&&this.#p?.(n,t,e),this.#a&&this.#r?.push([n,t,e])),this.#s.delete(t),this.#i[s]=void 0,this.#t[s]=void 0,s===this.#h)this.#h=this.#c[s];else if(s===this.#o)this.#o=this.#l[s];else{let h=this.#c[s];this.#l[h]=this.#l[s];let o=this.#l[s];this.#c[o]=this.#c[s]}this.#n--,this.#_.push(s)}}if(this.#a&&this.#r?.length){let s=this.#r,n;for(;n=s?.shift();)this.#w?.(...n)}return i}clear(){return this.#N("delete")}#N(t){for(let e of this.#F({allowStale:!0})){let i=this.#t[e];if(this.#e(i))i.__abortController.abort(new Error("deleted"));else{let s=this.#i[e];this.#y&&this.#p?.(i,s,t),this.#a&&this.#r?.push([i,s,t])}}if(this.#s.clear(),this.#t.fill(void 0),this.#i.fill(void 0),this.#u&&this.#m&&(this.#u.fill(0),this.#m.fill(0)),this.#b&&this.#b.fill(0),this.#o=0,this.#h=0,this.#_.length=0,this.#S=0,this.#n=0,this.#a&&this.#r){let e=this.#r,i;for(;i=e?.shift();)this.#w?.(...i)}}};exports.LRUCache=C;
              -//# sourceMappingURL=index.min.js.map
              diff --git a/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/index.min.js.map b/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/index.min.js.map
              deleted file mode 100644
              index 11b43a09..00000000
              --- a/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/index.min.js.map
              +++ /dev/null
              @@ -1,7 +0,0 @@
              -{
              -  "version": 3,
              -  "sources": ["../../src/index.ts"],
              -  "sourcesContent": ["/**\n * @module LRUCache\n */\n\n// module-private names and types\ntype Perf = { now: () => number }\nconst perf: Perf =\n  typeof performance === 'object' &&\n  performance &&\n  typeof performance.now === 'function'\n    ? performance\n    : Date\n\nconst warned = new Set()\n\n// either a function or a class\ntype ForC = ((...a: any[]) => any) | { new (...a: any[]): any }\n\n/* c8 ignore start */\nconst PROCESS = (\n  typeof process === 'object' && !!process ? process : {}\n) as { [k: string]: any }\n/* c8 ignore start */\n\nconst emitWarning = (\n  msg: string,\n  type: string,\n  code: string,\n  fn: ForC\n) => {\n  typeof PROCESS.emitWarning === 'function'\n    ? PROCESS.emitWarning(msg, type, code, fn)\n    : console.error(`[${code}] ${type}: ${msg}`)\n}\n\nlet AC = globalThis.AbortController\nlet AS = globalThis.AbortSignal\n\n/* c8 ignore start */\nif (typeof AC === 'undefined') {\n  //@ts-ignore\n  AS = class AbortSignal {\n    onabort?: (...a: any[]) => any\n    _onabort: ((...a: any[]) => any)[] = []\n    reason?: any\n    aborted: boolean = false\n    addEventListener(_: string, fn: (...a: any[]) => any) {\n      this._onabort.push(fn)\n    }\n  }\n  //@ts-ignore\n  AC = class AbortController {\n    constructor() {\n      warnACPolyfill()\n    }\n    signal = new AS()\n    abort(reason: any) {\n      if (this.signal.aborted) return\n      //@ts-ignore\n      this.signal.reason = reason\n      //@ts-ignore\n      this.signal.aborted = true\n      //@ts-ignore\n      for (const fn of this.signal._onabort) {\n        fn(reason)\n      }\n      this.signal.onabort?.(reason)\n    }\n  }\n  let printACPolyfillWarning =\n    PROCESS.env?.LRU_CACHE_IGNORE_AC_WARNING !== '1'\n  const warnACPolyfill = () => {\n    if (!printACPolyfillWarning) return\n    printACPolyfillWarning = false\n    emitWarning(\n      'AbortController is not defined. If using lru-cache in ' +\n        'node 14, load an AbortController polyfill from the ' +\n        '`node-abort-controller` package. A minimal polyfill is ' +\n        'provided for use by LRUCache.fetch(), but it should not be ' +\n        'relied upon in other contexts (eg, passing it to other APIs that ' +\n        'use AbortController/AbortSignal might have undesirable effects). ' +\n        'You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.',\n      'NO_ABORT_CONTROLLER',\n      'ENOTSUP',\n      warnACPolyfill\n    )\n  }\n}\n/* c8 ignore stop */\n\nconst shouldWarn = (code: string) => !warned.has(code)\n\nconst TYPE = Symbol('type')\nexport type PosInt = number & { [TYPE]: 'Positive Integer' }\nexport type Index = number & { [TYPE]: 'LRUCache Index' }\n\nconst isPosInt = (n: any): n is PosInt =>\n  n && n === Math.floor(n) && n > 0 && isFinite(n)\n\nexport type UintArray = Uint8Array | Uint16Array | Uint32Array\nexport type NumberArray = UintArray | number[]\n\n/* c8 ignore start */\n// This is a little bit ridiculous, tbh.\n// The maximum array length is 2^32-1 or thereabouts on most JS impls.\n// And well before that point, you're caching the entire world, I mean,\n// that's ~32GB of just integers for the next/prev links, plus whatever\n// else to hold that many keys and values.  Just filling the memory with\n// zeroes at init time is brutal when you get that big.\n// But why not be complete?\n// Maybe in the future, these limits will have expanded.\nconst getUintArray = (max: number) =>\n  !isPosInt(max)\n    ? null\n    : max <= Math.pow(2, 8)\n    ? Uint8Array\n    : max <= Math.pow(2, 16)\n    ? Uint16Array\n    : max <= Math.pow(2, 32)\n    ? Uint32Array\n    : max <= Number.MAX_SAFE_INTEGER\n    ? ZeroArray\n    : null\n/* c8 ignore stop */\n\nclass ZeroArray extends Array {\n  constructor(size: number) {\n    super(size)\n    this.fill(0)\n  }\n}\nexport type { ZeroArray }\nexport type { Stack }\n\nexport type StackLike = Stack | Index[]\nclass Stack {\n  heap: NumberArray\n  length: number\n  // private constructor\n  static #constructing: boolean = false\n  static create(max: number): StackLike {\n    const HeapCls = getUintArray(max)\n    if (!HeapCls) return []\n    Stack.#constructing = true\n    const s = new Stack(max, HeapCls)\n    Stack.#constructing = false\n    return s\n  }\n  constructor(\n    max: number,\n    HeapCls: { new (n: number): NumberArray }\n  ) {\n    /* c8 ignore start */\n    if (!Stack.#constructing) {\n      throw new TypeError('instantiate Stack using Stack.create(n)')\n    }\n    /* c8 ignore stop */\n    this.heap = new HeapCls(max)\n    this.length = 0\n  }\n  push(n: Index) {\n    this.heap[this.length++] = n\n  }\n  pop(): Index {\n    return this.heap[--this.length] as Index\n  }\n}\n\n/**\n * Promise representing an in-progress {@link LRUCache#fetch} call\n */\nexport type BackgroundFetch = Promise & {\n  __returned: BackgroundFetch | undefined\n  __abortController: AbortController\n  __staleWhileFetching: V | undefined\n}\n\nexport type DisposeTask = [\n  value: V,\n  key: K,\n  reason: LRUCache.DisposeReason\n]\n\nexport namespace LRUCache {\n  /**\n   * An integer greater than 0, reflecting the calculated size of items\n   */\n  export type Size = number\n\n  /**\n   * Integer greater than 0, representing some number of milliseconds, or the\n   * time at which a TTL started counting from.\n   */\n  export type Milliseconds = number\n\n  /**\n   * An integer greater than 0, reflecting a number of items\n   */\n  export type Count = number\n\n  /**\n   * The reason why an item was removed from the cache, passed\n   * to the {@link Disposer} methods.\n   *\n   * - `evict`: The item was evicted because it is the least recently used,\n   *   and the cache is full.\n   * - `set`: A new value was set, overwriting the old value being disposed.\n   * - `delete`: The item was explicitly deleted, either by calling\n   *   {@link LRUCache#delete}, {@link LRUCache#clear}, or\n   *   {@link LRUCache#set} with an undefined value.\n   * - `expire`: The item was removed due to exceeding its TTL.\n   * - `fetch`: A {@link OptionsBase#fetchMethod} operation returned\n   *   `undefined` or was aborted, causing the item to be deleted.\n   */\n  export type DisposeReason =\n    | 'evict'\n    | 'set'\n    | 'delete'\n    | 'expire'\n    | 'fetch'\n  /**\n   * A method called upon item removal, passed as the\n   * {@link OptionsBase.dispose} and/or\n   * {@link OptionsBase.disposeAfter} options.\n   */\n  export type Disposer = (\n    value: V,\n    key: K,\n    reason: DisposeReason\n  ) => void\n\n  /**\n   * A function that returns the effective calculated size\n   * of an entry in the cache.\n   */\n  export type SizeCalculator = (value: V, key: K) => Size\n\n  /**\n   * Options provided to the\n   * {@link OptionsBase.fetchMethod} function.\n   */\n  export interface FetcherOptions {\n    signal: AbortSignal\n    options: FetcherFetchOptions\n    /**\n     * Object provided in the {@link FetchOptions.context} option to\n     * {@link LRUCache#fetch}\n     */\n    context: FC\n  }\n\n  /**\n   * Occasionally, it may be useful to track the internal behavior of the\n   * cache, particularly for logging, debugging, or for behavior within the\n   * `fetchMethod`. To do this, you can pass a `status` object to the\n   * {@link LRUCache#fetch}, {@link LRUCache#get}, {@link LRUCache#set},\n   * {@link LRUCache#memo}, and {@link LRUCache#has} methods.\n   *\n   * The `status` option should be a plain JavaScript object. The following\n   * fields will be set on it appropriately, depending on the situation.\n   */\n  export interface Status {\n    /**\n     * The status of a set() operation.\n     *\n     * - add: the item was not found in the cache, and was added\n     * - update: the item was in the cache, with the same value provided\n     * - replace: the item was in the cache, and replaced\n     * - miss: the item was not added to the cache for some reason\n     */\n    set?: 'add' | 'update' | 'replace' | 'miss'\n\n    /**\n     * the ttl stored for the item, or undefined if ttls are not used.\n     */\n    ttl?: Milliseconds\n\n    /**\n     * the start time for the item, or undefined if ttls are not used.\n     */\n    start?: Milliseconds\n\n    /**\n     * The timestamp used for TTL calculation\n     */\n    now?: Milliseconds\n\n    /**\n     * the remaining ttl for the item, or undefined if ttls are not used.\n     */\n    remainingTTL?: Milliseconds\n\n    /**\n     * The calculated size for the item, if sizes are used.\n     */\n    entrySize?: Size\n\n    /**\n     * The total calculated size of the cache, if sizes are used.\n     */\n    totalCalculatedSize?: Size\n\n    /**\n     * A flag indicating that the item was not stored, due to exceeding the\n     * {@link OptionsBase.maxEntrySize}\n     */\n    maxEntrySizeExceeded?: true\n\n    /**\n     * The old value, specified in the case of `set:'update'` or\n     * `set:'replace'`\n     */\n    oldValue?: V\n\n    /**\n     * The results of a {@link LRUCache#has} operation\n     *\n     * - hit: the item was found in the cache\n     * - stale: the item was found in the cache, but is stale\n     * - miss: the item was not found in the cache\n     */\n    has?: 'hit' | 'stale' | 'miss'\n\n    /**\n     * The status of a {@link LRUCache#fetch} operation.\n     * Note that this can change as the underlying fetch() moves through\n     * various states.\n     *\n     * - inflight: there is another fetch() for this key which is in process\n     * - get: there is no {@link OptionsBase.fetchMethod}, so\n     *   {@link LRUCache#get} was called.\n     * - miss: the item is not in cache, and will be fetched.\n     * - hit: the item is in the cache, and was resolved immediately.\n     * - stale: the item is in the cache, but stale.\n     * - refresh: the item is in the cache, and not stale, but\n     *   {@link FetchOptions.forceRefresh} was specified.\n     */\n    fetch?: 'get' | 'inflight' | 'miss' | 'hit' | 'stale' | 'refresh'\n\n    /**\n     * The {@link OptionsBase.fetchMethod} was called\n     */\n    fetchDispatched?: true\n\n    /**\n     * The cached value was updated after a successful call to\n     * {@link OptionsBase.fetchMethod}\n     */\n    fetchUpdated?: true\n\n    /**\n     * The reason for a fetch() rejection.  Either the error raised by the\n     * {@link OptionsBase.fetchMethod}, or the reason for an\n     * AbortSignal.\n     */\n    fetchError?: Error\n\n    /**\n     * The fetch received an abort signal\n     */\n    fetchAborted?: true\n\n    /**\n     * The abort signal received was ignored, and the fetch was allowed to\n     * continue.\n     */\n    fetchAbortIgnored?: true\n\n    /**\n     * The fetchMethod promise resolved successfully\n     */\n    fetchResolved?: true\n\n    /**\n     * The fetchMethod promise was rejected\n     */\n    fetchRejected?: true\n\n    /**\n     * The status of a {@link LRUCache#get} operation.\n     *\n     * - fetching: The item is currently being fetched.  If a previous value\n     *   is present and allowed, that will be returned.\n     * - stale: The item is in the cache, and is stale.\n     * - hit: the item is in the cache\n     * - miss: the item is not in the cache\n     */\n    get?: 'stale' | 'hit' | 'miss'\n\n    /**\n     * A fetch or get operation returned a stale value.\n     */\n    returnedStale?: true\n  }\n\n  /**\n   * options which override the options set in the LRUCache constructor\n   * when calling {@link LRUCache#fetch}.\n   *\n   * This is the union of {@link GetOptions} and {@link SetOptions}, plus\n   * {@link OptionsBase.noDeleteOnFetchRejection},\n   * {@link OptionsBase.allowStaleOnFetchRejection},\n   * {@link FetchOptions.forceRefresh}, and\n   * {@link FetcherOptions.context}\n   *\n   * Any of these may be modified in the {@link OptionsBase.fetchMethod}\n   * function, but the {@link GetOptions} fields will of course have no\n   * effect, as the {@link LRUCache#get} call already happened by the time\n   * the fetchMethod is called.\n   */\n  export interface FetcherFetchOptions\n    extends Pick<\n      OptionsBase,\n      | 'allowStale'\n      | 'updateAgeOnGet'\n      | 'noDeleteOnStaleGet'\n      | 'sizeCalculation'\n      | 'ttl'\n      | 'noDisposeOnSet'\n      | 'noUpdateTTL'\n      | 'noDeleteOnFetchRejection'\n      | 'allowStaleOnFetchRejection'\n      | 'ignoreFetchAbort'\n      | 'allowStaleOnFetchAbort'\n    > {\n    status?: Status\n    size?: Size\n  }\n\n  /**\n   * Options that may be passed to the {@link LRUCache#fetch} method.\n   */\n  export interface FetchOptions\n    extends FetcherFetchOptions {\n    /**\n     * Set to true to force a re-load of the existing data, even if it\n     * is not yet stale.\n     */\n    forceRefresh?: boolean\n    /**\n     * Context provided to the {@link OptionsBase.fetchMethod} as\n     * the {@link FetcherOptions.context} param.\n     *\n     * If the FC type is specified as unknown (the default),\n     * undefined or void, then this is optional.  Otherwise, it will\n     * be required.\n     */\n    context?: FC\n    signal?: AbortSignal\n    status?: Status\n  }\n  /**\n   * Options provided to {@link LRUCache#fetch} when the FC type is something\n   * other than `unknown`, `undefined`, or `void`\n   */\n  export interface FetchOptionsWithContext\n    extends FetchOptions {\n    context: FC\n  }\n  /**\n   * Options provided to {@link LRUCache#fetch} when the FC type is\n   * `undefined` or `void`\n   */\n  export interface FetchOptionsNoContext\n    extends FetchOptions {\n    context?: undefined\n  }\n\n  export interface MemoOptions\n    extends Pick<\n      OptionsBase,\n      | 'allowStale'\n      | 'updateAgeOnGet'\n      | 'noDeleteOnStaleGet'\n      | 'sizeCalculation'\n      | 'ttl'\n      | 'noDisposeOnSet'\n      | 'noUpdateTTL'\n      | 'noDeleteOnFetchRejection'\n      | 'allowStaleOnFetchRejection'\n      | 'ignoreFetchAbort'\n      | 'allowStaleOnFetchAbort'\n    > {\n    /**\n     * Set to true to force a re-load of the existing data, even if it\n     * is not yet stale.\n     */\n    forceRefresh?: boolean\n    /**\n     * Context provided to the {@link OptionsBase.memoMethod} as\n     * the {@link MemoizerOptions.context} param.\n     *\n     * If the FC type is specified as unknown (the default),\n     * undefined or void, then this is optional.  Otherwise, it will\n     * be required.\n     */\n    context?: FC\n    status?: Status\n  }\n  /**\n   * Options provided to {@link LRUCache#memo} when the FC type is something\n   * other than `unknown`, `undefined`, or `void`\n   */\n  export interface MemoOptionsWithContext\n    extends MemoOptions {\n    context: FC\n  }\n  /**\n   * Options provided to {@link LRUCache#memo} when the FC type is\n   * `undefined` or `void`\n   */\n  export interface MemoOptionsNoContext\n    extends MemoOptions {\n    context?: undefined\n  }\n\n  /**\n   * Options provided to the\n   * {@link OptionsBase.memoMethod} function.\n   */\n  export interface MemoizerOptions {\n    options: MemoizerMemoOptions\n    /**\n     * Object provided in the {@link MemoOptions.context} option to\n     * {@link LRUCache#memo}\n     */\n    context: FC\n  }\n\n  /**\n   * options which override the options set in the LRUCache constructor\n   * when calling {@link LRUCache#memo}.\n   *\n   * This is the union of {@link GetOptions} and {@link SetOptions}, plus\n   * {@link MemoOptions.forceRefresh}, and\n   * {@link MemoerOptions.context}\n   *\n   * Any of these may be modified in the {@link OptionsBase.memoMethod}\n   * function, but the {@link GetOptions} fields will of course have no\n   * effect, as the {@link LRUCache#get} call already happened by the time\n   * the memoMethod is called.\n   */\n  export interface MemoizerMemoOptions\n    extends Pick<\n      OptionsBase,\n      | 'allowStale'\n      | 'updateAgeOnGet'\n      | 'noDeleteOnStaleGet'\n      | 'sizeCalculation'\n      | 'ttl'\n      | 'noDisposeOnSet'\n      | 'noUpdateTTL'\n    > {\n    status?: Status\n    size?: Size\n    start?: Milliseconds\n  }\n\n  /**\n   * Options that may be passed to the {@link LRUCache#has} method.\n   */\n  export interface HasOptions\n    extends Pick, 'updateAgeOnHas'> {\n    status?: Status\n  }\n\n  /**\n   * Options that may be passed to the {@link LRUCache#get} method.\n   */\n  export interface GetOptions\n    extends Pick<\n      OptionsBase,\n      'allowStale' | 'updateAgeOnGet' | 'noDeleteOnStaleGet'\n    > {\n    status?: Status\n  }\n\n  /**\n   * Options that may be passed to the {@link LRUCache#peek} method.\n   */\n  export interface PeekOptions\n    extends Pick, 'allowStale'> {}\n\n  /**\n   * Options that may be passed to the {@link LRUCache#set} method.\n   */\n  export interface SetOptions\n    extends Pick<\n      OptionsBase,\n      'sizeCalculation' | 'ttl' | 'noDisposeOnSet' | 'noUpdateTTL'\n    > {\n    /**\n     * If size tracking is enabled, then setting an explicit size\n     * in the {@link LRUCache#set} call will prevent calling the\n     * {@link OptionsBase.sizeCalculation} function.\n     */\n    size?: Size\n    /**\n     * If TTL tracking is enabled, then setting an explicit start\n     * time in the {@link LRUCache#set} call will override the\n     * default time from `performance.now()` or `Date.now()`.\n     *\n     * Note that it must be a valid value for whichever time-tracking\n     * method is in use.\n     */\n    start?: Milliseconds\n    status?: Status\n  }\n\n  /**\n   * The type signature for the {@link OptionsBase.fetchMethod} option.\n   */\n  export type Fetcher = (\n    key: K,\n    staleValue: V | undefined,\n    options: FetcherOptions\n  ) => Promise | V | undefined | void\n\n  /**\n   * the type signature for the {@link OptionsBase.memoMethod} option.\n   */\n  export type Memoizer = (\n    key: K,\n    staleValue: V | undefined,\n    options: MemoizerOptions\n  ) => V\n\n  /**\n   * Options which may be passed to the {@link LRUCache} constructor.\n   *\n   * Most of these may be overridden in the various options that use\n   * them.\n   *\n   * Despite all being technically optional, the constructor requires that\n   * a cache is at minimum limited by one or more of {@link OptionsBase.max},\n   * {@link OptionsBase.ttl}, or {@link OptionsBase.maxSize}.\n   *\n   * If {@link OptionsBase.ttl} is used alone, then it is strongly advised\n   * (and in fact required by the type definitions here) that the cache\n   * also set {@link OptionsBase.ttlAutopurge}, to prevent potentially\n   * unbounded storage.\n   *\n   * All options are also available on the {@link LRUCache} instance, making\n   * it safe to pass an LRUCache instance as the options argumemnt to\n   * make another empty cache of the same type.\n   *\n   * Some options are marked as read-only, because changing them after\n   * instantiation is not safe. Changing any of the other options will of\n   * course only have an effect on subsequent method calls.\n   */\n  export interface OptionsBase {\n    /**\n     * The maximum number of items to store in the cache before evicting\n     * old entries. This is read-only on the {@link LRUCache} instance,\n     * and may not be overridden.\n     *\n     * If set, then storage space will be pre-allocated at construction\n     * time, and the cache will perform significantly faster.\n     *\n     * Note that significantly fewer items may be stored, if\n     * {@link OptionsBase.maxSize} and/or {@link OptionsBase.ttl} are also\n     * set.\n     *\n     * **It is strongly recommended to set a `max` to prevent unbounded growth\n     * of the cache.**\n     */\n    max?: Count\n\n    /**\n     * Max time in milliseconds for items to live in cache before they are\n     * considered stale.  Note that stale items are NOT preemptively removed by\n     * default, and MAY live in the cache, contributing to its LRU max, long\n     * after they have expired, unless {@link OptionsBase.ttlAutopurge} is\n     * set.\n     *\n     * If set to `0` (the default value), then that means \"do not track\n     * TTL\", not \"expire immediately\".\n     *\n     * Also, as this cache is optimized for LRU/MRU operations, some of\n     * the staleness/TTL checks will reduce performance, as they will incur\n     * overhead by deleting items.\n     *\n     * This is not primarily a TTL cache, and does not make strong TTL\n     * guarantees. There is no pre-emptive pruning of expired items, but you\n     * _may_ set a TTL on the cache, and it will treat expired items as missing\n     * when they are fetched, and delete them.\n     *\n     * Optional, but must be a non-negative integer in ms if specified.\n     *\n     * This may be overridden by passing an options object to `cache.set()`.\n     *\n     * At least one of `max`, `maxSize`, or `TTL` is required. This must be a\n     * positive integer if set.\n     *\n     * Even if ttl tracking is enabled, **it is strongly recommended to set a\n     * `max` to prevent unbounded growth of the cache.**\n     *\n     * If ttl tracking is enabled, and `max` and `maxSize` are not set,\n     * and `ttlAutopurge` is not set, then a warning will be emitted\n     * cautioning about the potential for unbounded memory consumption.\n     * (The TypeScript definitions will also discourage this.)\n     */\n    ttl?: Milliseconds\n\n    /**\n     * Minimum amount of time in ms in which to check for staleness.\n     * Defaults to 1, which means that the current time is checked\n     * at most once per millisecond.\n     *\n     * Set to 0 to check the current time every time staleness is tested.\n     * (This reduces performance, and is theoretically unnecessary.)\n     *\n     * Setting this to a higher value will improve performance somewhat\n     * while using ttl tracking, albeit at the expense of keeping stale\n     * items around a bit longer than their TTLs would indicate.\n     *\n     * @default 1\n     */\n    ttlResolution?: Milliseconds\n\n    /**\n     * Preemptively remove stale items from the cache.\n     *\n     * Note that this may *significantly* degrade performance, especially if\n     * the cache is storing a large number of items. It is almost always best\n     * to just leave the stale items in the cache, and let them fall out as new\n     * items are added.\n     *\n     * Note that this means that {@link OptionsBase.allowStale} is a bit\n     * pointless, as stale items will be deleted almost as soon as they\n     * expire.\n     *\n     * Use with caution!\n     */\n    ttlAutopurge?: boolean\n\n    /**\n     * When using time-expiring entries with `ttl`, setting this to `true` will\n     * make each item's age reset to 0 whenever it is retrieved from cache with\n     * {@link LRUCache#get}, causing it to not expire. (It can still fall out\n     * of cache based on recency of use, of course.)\n     *\n     * Has no effect if {@link OptionsBase.ttl} is not set.\n     *\n     * This may be overridden by passing an options object to `cache.get()`.\n     */\n    updateAgeOnGet?: boolean\n\n    /**\n     * When using time-expiring entries with `ttl`, setting this to `true` will\n     * make each item's age reset to 0 whenever its presence in the cache is\n     * checked with {@link LRUCache#has}, causing it to not expire. (It can\n     * still fall out of cache based on recency of use, of course.)\n     *\n     * Has no effect if {@link OptionsBase.ttl} is not set.\n     */\n    updateAgeOnHas?: boolean\n\n    /**\n     * Allow {@link LRUCache#get} and {@link LRUCache#fetch} calls to return\n     * stale data, if available.\n     *\n     * By default, if you set `ttl`, stale items will only be deleted from the\n     * cache when you `get(key)`. That is, it's not preemptively pruning items,\n     * unless {@link OptionsBase.ttlAutopurge} is set.\n     *\n     * If you set `allowStale:true`, it'll return the stale value *as well as*\n     * deleting it. If you don't set this, then it'll return `undefined` when\n     * you try to get a stale entry.\n     *\n     * Note that when a stale entry is fetched, _even if it is returned due to\n     * `allowStale` being set_, it is removed from the cache immediately. You\n     * can suppress this behavior by setting\n     * {@link OptionsBase.noDeleteOnStaleGet}, either in the constructor, or in\n     * the options provided to {@link LRUCache#get}.\n     *\n     * This may be overridden by passing an options object to `cache.get()`.\n     * The `cache.has()` method will always return `false` for stale items.\n     *\n     * Only relevant if a ttl is set.\n     */\n    allowStale?: boolean\n\n    /**\n     * Function that is called on items when they are dropped from the\n     * cache, as `dispose(value, key, reason)`.\n     *\n     * This can be handy if you want to close file descriptors or do\n     * other cleanup tasks when items are no longer stored in the cache.\n     *\n     * **NOTE**: It is called _before_ the item has been fully removed\n     * from the cache, so if you want to put it right back in, you need\n     * to wait until the next tick. If you try to add it back in during\n     * the `dispose()` function call, it will break things in subtle and\n     * weird ways.\n     *\n     * Unlike several other options, this may _not_ be overridden by\n     * passing an option to `set()`, for performance reasons.\n     *\n     * The `reason` will be one of the following strings, corresponding\n     * to the reason for the item's deletion:\n     *\n     * - `evict` Item was evicted to make space for a new addition\n     * - `set` Item was overwritten by a new value\n     * - `expire` Item expired its TTL\n     * - `fetch` Item was deleted due to a failed or aborted fetch, or a\n     *   fetchMethod returning `undefined.\n     * - `delete` Item was removed by explicit `cache.delete(key)`,\n     *   `cache.clear()`, or `cache.set(key, undefined)`.\n     */\n    dispose?: Disposer\n\n    /**\n     * The same as {@link OptionsBase.dispose}, but called *after* the entry\n     * is completely removed and the cache is once again in a clean state.\n     *\n     * It is safe to add an item right back into the cache at this point.\n     * However, note that it is *very* easy to inadvertently create infinite\n     * recursion this way.\n     */\n    disposeAfter?: Disposer\n\n    /**\n     * Set to true to suppress calling the\n     * {@link OptionsBase.dispose} function if the entry key is\n     * still accessible within the cache.\n     *\n     * This may be overridden by passing an options object to\n     * {@link LRUCache#set}.\n     *\n     * Only relevant if `dispose` or `disposeAfter` are set.\n     */\n    noDisposeOnSet?: boolean\n\n    /**\n     * Boolean flag to tell the cache to not update the TTL when setting a new\n     * value for an existing key (ie, when updating a value rather than\n     * inserting a new value).  Note that the TTL value is _always_ set (if\n     * provided) when adding a new entry into the cache.\n     *\n     * Has no effect if a {@link OptionsBase.ttl} is not set.\n     *\n     * May be passed as an option to {@link LRUCache#set}.\n     */\n    noUpdateTTL?: boolean\n\n    /**\n     * Set to a positive integer to track the sizes of items added to the\n     * cache, and automatically evict items in order to stay below this size.\n     * Note that this may result in fewer than `max` items being stored.\n     *\n     * Attempting to add an item to the cache whose calculated size is greater\n     * that this amount will be a no-op. The item will not be cached, and no\n     * other items will be evicted.\n     *\n     * Optional, must be a positive integer if provided.\n     *\n     * Sets `maxEntrySize` to the same value, unless a different value is\n     * provided for `maxEntrySize`.\n     *\n     * At least one of `max`, `maxSize`, or `TTL` is required. This must be a\n     * positive integer if set.\n     *\n     * Even if size tracking is enabled, **it is strongly recommended to set a\n     * `max` to prevent unbounded growth of the cache.**\n     *\n     * Note also that size tracking can negatively impact performance,\n     * though for most cases, only minimally.\n     */\n    maxSize?: Size\n\n    /**\n     * The maximum allowed size for any single item in the cache.\n     *\n     * If a larger item is passed to {@link LRUCache#set} or returned by a\n     * {@link OptionsBase.fetchMethod} or {@link OptionsBase.memoMethod}, then\n     * it will not be stored in the cache.\n     *\n     * Attempting to add an item whose calculated size is greater than\n     * this amount will not cache the item or evict any old items, but\n     * WILL delete an existing value if one is already present.\n     *\n     * Optional, must be a positive integer if provided. Defaults to\n     * the value of `maxSize` if provided.\n     */\n    maxEntrySize?: Size\n\n    /**\n     * A function that returns a number indicating the item's size.\n     *\n     * Requires {@link OptionsBase.maxSize} to be set.\n     *\n     * If not provided, and {@link OptionsBase.maxSize} or\n     * {@link OptionsBase.maxEntrySize} are set, then all\n     * {@link LRUCache#set} calls **must** provide an explicit\n     * {@link SetOptions.size} or sizeCalculation param.\n     */\n    sizeCalculation?: SizeCalculator\n\n    /**\n     * Method that provides the implementation for {@link LRUCache#fetch}\n     *\n     * ```ts\n     * fetchMethod(key, staleValue, { signal, options, context })\n     * ```\n     *\n     * If `fetchMethod` is not provided, then `cache.fetch(key)` is equivalent\n     * to `Promise.resolve(cache.get(key))`.\n     *\n     * If at any time, `signal.aborted` is set to `true`, or if the\n     * `signal.onabort` method is called, or if it emits an `'abort'` event\n     * which you can listen to with `addEventListener`, then that means that\n     * the fetch should be abandoned. This may be passed along to async\n     * functions aware of AbortController/AbortSignal behavior.\n     *\n     * The `fetchMethod` should **only** return `undefined` or a Promise\n     * resolving to `undefined` if the AbortController signaled an `abort`\n     * event. In all other cases, it should return or resolve to a value\n     * suitable for adding to the cache.\n     *\n     * The `options` object is a union of the options that may be provided to\n     * `set()` and `get()`. If they are modified, then that will result in\n     * modifying the settings to `cache.set()` when the value is resolved, and\n     * in the case of\n     * {@link OptionsBase.noDeleteOnFetchRejection} and\n     * {@link OptionsBase.allowStaleOnFetchRejection}, the handling of\n     * `fetchMethod` failures.\n     *\n     * For example, a DNS cache may update the TTL based on the value returned\n     * from a remote DNS server by changing `options.ttl` in the `fetchMethod`.\n     */\n    fetchMethod?: Fetcher\n\n    /**\n     * Method that provides the implementation for {@link LRUCache#memo}\n     */\n    memoMethod?: Memoizer\n\n    /**\n     * Set to true to suppress the deletion of stale data when a\n     * {@link OptionsBase.fetchMethod} returns a rejected promise.\n     */\n    noDeleteOnFetchRejection?: boolean\n\n    /**\n     * Do not delete stale items when they are retrieved with\n     * {@link LRUCache#get}.\n     *\n     * Note that the `get` return value will still be `undefined`\n     * unless {@link OptionsBase.allowStale} is true.\n     *\n     * When using time-expiring entries with `ttl`, by default stale\n     * items will be removed from the cache when the key is accessed\n     * with `cache.get()`.\n     *\n     * Setting this option will cause stale items to remain in the cache, until\n     * they are explicitly deleted with `cache.delete(key)`, or retrieved with\n     * `noDeleteOnStaleGet` set to `false`.\n     *\n     * This may be overridden by passing an options object to `cache.get()`.\n     *\n     * Only relevant if a ttl is used.\n     */\n    noDeleteOnStaleGet?: boolean\n\n    /**\n     * Set to true to allow returning stale data when a\n     * {@link OptionsBase.fetchMethod} throws an error or returns a rejected\n     * promise.\n     *\n     * This differs from using {@link OptionsBase.allowStale} in that stale\n     * data will ONLY be returned in the case that the {@link LRUCache#fetch}\n     * fails, not any other times.\n     *\n     * If a `fetchMethod` fails, and there is no stale value available, the\n     * `fetch()` will resolve to `undefined`. Ie, all `fetchMethod` errors are\n     * suppressed.\n     *\n     * Implies `noDeleteOnFetchRejection`.\n     *\n     * This may be set in calls to `fetch()`, or defaulted on the constructor,\n     * or overridden by modifying the options object in the `fetchMethod`.\n     */\n    allowStaleOnFetchRejection?: boolean\n\n    /**\n     * Set to true to return a stale value from the cache when the\n     * `AbortSignal` passed to the {@link OptionsBase.fetchMethod} dispatches\n     * an `'abort'` event, whether user-triggered, or due to internal cache\n     * behavior.\n     *\n     * Unless {@link OptionsBase.ignoreFetchAbort} is also set, the underlying\n     * {@link OptionsBase.fetchMethod} will still be considered canceled, and\n     * any value it returns will be ignored and not cached.\n     *\n     * Caveat: since fetches are aborted when a new value is explicitly\n     * set in the cache, this can lead to fetch returning a stale value,\n     * since that was the fallback value _at the moment the `fetch()` was\n     * initiated_, even though the new updated value is now present in\n     * the cache.\n     *\n     * For example:\n     *\n     * ```ts\n     * const cache = new LRUCache({\n     *   ttl: 100,\n     *   fetchMethod: async (url, oldValue, { signal }) =>  {\n     *     const res = await fetch(url, { signal })\n     *     return await res.json()\n     *   }\n     * })\n     * cache.set('https://example.com/', { some: 'data' })\n     * // 100ms go by...\n     * const result = cache.fetch('https://example.com/')\n     * cache.set('https://example.com/', { other: 'thing' })\n     * console.log(await result) // { some: 'data' }\n     * console.log(cache.get('https://example.com/')) // { other: 'thing' }\n     * ```\n     */\n    allowStaleOnFetchAbort?: boolean\n\n    /**\n     * Set to true to ignore the `abort` event emitted by the `AbortSignal`\n     * object passed to {@link OptionsBase.fetchMethod}, and still cache the\n     * resulting resolution value, as long as it is not `undefined`.\n     *\n     * When used on its own, this means aborted {@link LRUCache#fetch} calls\n     * are not immediately resolved or rejected when they are aborted, and\n     * instead take the full time to await.\n     *\n     * When used with {@link OptionsBase.allowStaleOnFetchAbort}, aborted\n     * {@link LRUCache#fetch} calls will resolve immediately to their stale\n     * cached value or `undefined`, and will continue to process and eventually\n     * update the cache when they resolve, as long as the resulting value is\n     * not `undefined`, thus supporting a \"return stale on timeout while\n     * refreshing\" mechanism by passing `AbortSignal.timeout(n)` as the signal.\n     *\n     * For example:\n     *\n     * ```ts\n     * const c = new LRUCache({\n     *   ttl: 100,\n     *   ignoreFetchAbort: true,\n     *   allowStaleOnFetchAbort: true,\n     *   fetchMethod: async (key, oldValue, { signal }) => {\n     *     // note: do NOT pass the signal to fetch()!\n     *     // let's say this fetch can take a long time.\n     *     const res = await fetch(`https://slow-backend-server/${key}`)\n     *     return await res.json()\n     *   },\n     * })\n     *\n     * // this will return the stale value after 100ms, while still\n     * // updating in the background for next time.\n     * const val = await c.fetch('key', { signal: AbortSignal.timeout(100) })\n     * ```\n     *\n     * **Note**: regardless of this setting, an `abort` event _is still\n     * emitted on the `AbortSignal` object_, so may result in invalid results\n     * when passed to other underlying APIs that use AbortSignals.\n     *\n     * This may be overridden in the {@link OptionsBase.fetchMethod} or the\n     * call to {@link LRUCache#fetch}.\n     */\n    ignoreFetchAbort?: boolean\n  }\n\n  export interface OptionsMaxLimit\n    extends OptionsBase {\n    max: Count\n  }\n  export interface OptionsTTLLimit\n    extends OptionsBase {\n    ttl: Milliseconds\n    ttlAutopurge: boolean\n  }\n  export interface OptionsSizeLimit\n    extends OptionsBase {\n    maxSize: Size\n  }\n\n  /**\n   * The valid safe options for the {@link LRUCache} constructor\n   */\n  export type Options =\n    | OptionsMaxLimit\n    | OptionsSizeLimit\n    | OptionsTTLLimit\n\n  /**\n   * Entry objects used by {@link LRUCache#load} and {@link LRUCache#dump},\n   * and returned by {@link LRUCache#info}.\n   */\n  export interface Entry {\n    value: V\n    ttl?: Milliseconds\n    size?: Size\n    start?: Milliseconds\n  }\n}\n\n/**\n * Default export, the thing you're using this module to get.\n *\n * The `K` and `V` types define the key and value types, respectively. The\n * optional `FC` type defines the type of the `context` object passed to\n * `cache.fetch()` and `cache.memo()`.\n *\n * Keys and values **must not** be `null` or `undefined`.\n *\n * All properties from the options object (with the exception of `max`,\n * `maxSize`, `fetchMethod`, `memoMethod`, `dispose` and `disposeAfter`) are\n * added as normal public members. (The listed options are read-only getters.)\n *\n * Changing any of these will alter the defaults for subsequent method calls.\n */\nexport class LRUCache\n  implements Map\n{\n  // options that cannot be changed without disaster\n  readonly #max: LRUCache.Count\n  readonly #maxSize: LRUCache.Size\n  readonly #dispose?: LRUCache.Disposer\n  readonly #disposeAfter?: LRUCache.Disposer\n  readonly #fetchMethod?: LRUCache.Fetcher\n  readonly #memoMethod?: LRUCache.Memoizer\n\n  /**\n   * {@link LRUCache.OptionsBase.ttl}\n   */\n  ttl: LRUCache.Milliseconds\n\n  /**\n   * {@link LRUCache.OptionsBase.ttlResolution}\n   */\n  ttlResolution: LRUCache.Milliseconds\n  /**\n   * {@link LRUCache.OptionsBase.ttlAutopurge}\n   */\n  ttlAutopurge: boolean\n  /**\n   * {@link LRUCache.OptionsBase.updateAgeOnGet}\n   */\n  updateAgeOnGet: boolean\n  /**\n   * {@link LRUCache.OptionsBase.updateAgeOnHas}\n   */\n  updateAgeOnHas: boolean\n  /**\n   * {@link LRUCache.OptionsBase.allowStale}\n   */\n  allowStale: boolean\n\n  /**\n   * {@link LRUCache.OptionsBase.noDisposeOnSet}\n   */\n  noDisposeOnSet: boolean\n  /**\n   * {@link LRUCache.OptionsBase.noUpdateTTL}\n   */\n  noUpdateTTL: boolean\n  /**\n   * {@link LRUCache.OptionsBase.maxEntrySize}\n   */\n  maxEntrySize: LRUCache.Size\n  /**\n   * {@link LRUCache.OptionsBase.sizeCalculation}\n   */\n  sizeCalculation?: LRUCache.SizeCalculator\n  /**\n   * {@link LRUCache.OptionsBase.noDeleteOnFetchRejection}\n   */\n  noDeleteOnFetchRejection: boolean\n  /**\n   * {@link LRUCache.OptionsBase.noDeleteOnStaleGet}\n   */\n  noDeleteOnStaleGet: boolean\n  /**\n   * {@link LRUCache.OptionsBase.allowStaleOnFetchAbort}\n   */\n  allowStaleOnFetchAbort: boolean\n  /**\n   * {@link LRUCache.OptionsBase.allowStaleOnFetchRejection}\n   */\n  allowStaleOnFetchRejection: boolean\n  /**\n   * {@link LRUCache.OptionsBase.ignoreFetchAbort}\n   */\n  ignoreFetchAbort: boolean\n\n  // computed properties\n  #size: LRUCache.Count\n  #calculatedSize: LRUCache.Size\n  #keyMap: Map\n  #keyList: (K | undefined)[]\n  #valList: (V | BackgroundFetch | undefined)[]\n  #next: NumberArray\n  #prev: NumberArray\n  #head: Index\n  #tail: Index\n  #free: StackLike\n  #disposed?: DisposeTask[]\n  #sizes?: ZeroArray\n  #starts?: ZeroArray\n  #ttls?: ZeroArray\n\n  #hasDispose: boolean\n  #hasFetchMethod: boolean\n  #hasDisposeAfter: boolean\n\n  /**\n   * Do not call this method unless you need to inspect the\n   * inner workings of the cache.  If anything returned by this\n   * object is modified in any way, strange breakage may occur.\n   *\n   * These fields are private for a reason!\n   *\n   * @internal\n   */\n  static unsafeExposeInternals<\n    K extends {},\n    V extends {},\n    FC extends unknown = unknown\n  >(c: LRUCache) {\n    return {\n      // properties\n      starts: c.#starts,\n      ttls: c.#ttls,\n      sizes: c.#sizes,\n      keyMap: c.#keyMap as Map,\n      keyList: c.#keyList,\n      valList: c.#valList,\n      next: c.#next,\n      prev: c.#prev,\n      get head() {\n        return c.#head\n      },\n      get tail() {\n        return c.#tail\n      },\n      free: c.#free,\n      // methods\n      isBackgroundFetch: (p: any) => c.#isBackgroundFetch(p),\n      backgroundFetch: (\n        k: K,\n        index: number | undefined,\n        options: LRUCache.FetchOptions,\n        context: any\n      ): BackgroundFetch =>\n        c.#backgroundFetch(\n          k,\n          index as Index | undefined,\n          options,\n          context\n        ),\n      moveToTail: (index: number): void =>\n        c.#moveToTail(index as Index),\n      indexes: (options?: { allowStale: boolean }) =>\n        c.#indexes(options),\n      rindexes: (options?: { allowStale: boolean }) =>\n        c.#rindexes(options),\n      isStale: (index: number | undefined) =>\n        c.#isStale(index as Index),\n    }\n  }\n\n  // Protected read-only members\n\n  /**\n   * {@link LRUCache.OptionsBase.max} (read-only)\n   */\n  get max(): LRUCache.Count {\n    return this.#max\n  }\n  /**\n   * {@link LRUCache.OptionsBase.maxSize} (read-only)\n   */\n  get maxSize(): LRUCache.Count {\n    return this.#maxSize\n  }\n  /**\n   * The total computed size of items in the cache (read-only)\n   */\n  get calculatedSize(): LRUCache.Size {\n    return this.#calculatedSize\n  }\n  /**\n   * The number of items stored in the cache (read-only)\n   */\n  get size(): LRUCache.Count {\n    return this.#size\n  }\n  /**\n   * {@link LRUCache.OptionsBase.fetchMethod} (read-only)\n   */\n  get fetchMethod(): LRUCache.Fetcher | undefined {\n    return this.#fetchMethod\n  }\n  get memoMethod(): LRUCache.Memoizer | undefined {\n    return this.#memoMethod\n  }\n  /**\n   * {@link LRUCache.OptionsBase.dispose} (read-only)\n   */\n  get dispose() {\n    return this.#dispose\n  }\n  /**\n   * {@link LRUCache.OptionsBase.disposeAfter} (read-only)\n   */\n  get disposeAfter() {\n    return this.#disposeAfter\n  }\n\n  constructor(\n    options: LRUCache.Options | LRUCache\n  ) {\n    const {\n      max = 0,\n      ttl,\n      ttlResolution = 1,\n      ttlAutopurge,\n      updateAgeOnGet,\n      updateAgeOnHas,\n      allowStale,\n      dispose,\n      disposeAfter,\n      noDisposeOnSet,\n      noUpdateTTL,\n      maxSize = 0,\n      maxEntrySize = 0,\n      sizeCalculation,\n      fetchMethod,\n      memoMethod,\n      noDeleteOnFetchRejection,\n      noDeleteOnStaleGet,\n      allowStaleOnFetchRejection,\n      allowStaleOnFetchAbort,\n      ignoreFetchAbort,\n    } = options\n\n    if (max !== 0 && !isPosInt(max)) {\n      throw new TypeError('max option must be a nonnegative integer')\n    }\n\n    const UintArray = max ? getUintArray(max) : Array\n    if (!UintArray) {\n      throw new Error('invalid max value: ' + max)\n    }\n\n    this.#max = max\n    this.#maxSize = maxSize\n    this.maxEntrySize = maxEntrySize || this.#maxSize\n    this.sizeCalculation = sizeCalculation\n    if (this.sizeCalculation) {\n      if (!this.#maxSize && !this.maxEntrySize) {\n        throw new TypeError(\n          'cannot set sizeCalculation without setting maxSize or maxEntrySize'\n        )\n      }\n      if (typeof this.sizeCalculation !== 'function') {\n        throw new TypeError('sizeCalculation set to non-function')\n      }\n    }\n\n    if (\n      memoMethod !== undefined &&\n      typeof memoMethod !== 'function'\n    ) {\n      throw new TypeError('memoMethod must be a function if defined')\n    }\n    this.#memoMethod = memoMethod\n\n    if (\n      fetchMethod !== undefined &&\n      typeof fetchMethod !== 'function'\n    ) {\n      throw new TypeError(\n        'fetchMethod must be a function if specified'\n      )\n    }\n    this.#fetchMethod = fetchMethod\n    this.#hasFetchMethod = !!fetchMethod\n\n    this.#keyMap = new Map()\n    this.#keyList = new Array(max).fill(undefined)\n    this.#valList = new Array(max).fill(undefined)\n    this.#next = new UintArray(max)\n    this.#prev = new UintArray(max)\n    this.#head = 0 as Index\n    this.#tail = 0 as Index\n    this.#free = Stack.create(max)\n    this.#size = 0\n    this.#calculatedSize = 0\n\n    if (typeof dispose === 'function') {\n      this.#dispose = dispose\n    }\n    if (typeof disposeAfter === 'function') {\n      this.#disposeAfter = disposeAfter\n      this.#disposed = []\n    } else {\n      this.#disposeAfter = undefined\n      this.#disposed = undefined\n    }\n    this.#hasDispose = !!this.#dispose\n    this.#hasDisposeAfter = !!this.#disposeAfter\n\n    this.noDisposeOnSet = !!noDisposeOnSet\n    this.noUpdateTTL = !!noUpdateTTL\n    this.noDeleteOnFetchRejection = !!noDeleteOnFetchRejection\n    this.allowStaleOnFetchRejection = !!allowStaleOnFetchRejection\n    this.allowStaleOnFetchAbort = !!allowStaleOnFetchAbort\n    this.ignoreFetchAbort = !!ignoreFetchAbort\n\n    // NB: maxEntrySize is set to maxSize if it's set\n    if (this.maxEntrySize !== 0) {\n      if (this.#maxSize !== 0) {\n        if (!isPosInt(this.#maxSize)) {\n          throw new TypeError(\n            'maxSize must be a positive integer if specified'\n          )\n        }\n      }\n      if (!isPosInt(this.maxEntrySize)) {\n        throw new TypeError(\n          'maxEntrySize must be a positive integer if specified'\n        )\n      }\n      this.#initializeSizeTracking()\n    }\n\n    this.allowStale = !!allowStale\n    this.noDeleteOnStaleGet = !!noDeleteOnStaleGet\n    this.updateAgeOnGet = !!updateAgeOnGet\n    this.updateAgeOnHas = !!updateAgeOnHas\n    this.ttlResolution =\n      isPosInt(ttlResolution) || ttlResolution === 0\n        ? ttlResolution\n        : 1\n    this.ttlAutopurge = !!ttlAutopurge\n    this.ttl = ttl || 0\n    if (this.ttl) {\n      if (!isPosInt(this.ttl)) {\n        throw new TypeError(\n          'ttl must be a positive integer if specified'\n        )\n      }\n      this.#initializeTTLTracking()\n    }\n\n    // do not allow completely unbounded caches\n    if (this.#max === 0 && this.ttl === 0 && this.#maxSize === 0) {\n      throw new TypeError(\n        'At least one of max, maxSize, or ttl is required'\n      )\n    }\n    if (!this.ttlAutopurge && !this.#max && !this.#maxSize) {\n      const code = 'LRU_CACHE_UNBOUNDED'\n      if (shouldWarn(code)) {\n        warned.add(code)\n        const msg =\n          'TTL caching without ttlAutopurge, max, or maxSize can ' +\n          'result in unbounded memory consumption.'\n        emitWarning(msg, 'UnboundedCacheWarning', code, LRUCache)\n      }\n    }\n  }\n\n  /**\n   * Return the number of ms left in the item's TTL. If item is not in cache,\n   * returns `0`. Returns `Infinity` if item is in cache without a defined TTL.\n   */\n  getRemainingTTL(key: K) {\n    return this.#keyMap.has(key) ? Infinity : 0\n  }\n\n  #initializeTTLTracking() {\n    const ttls = new ZeroArray(this.#max)\n    const starts = new ZeroArray(this.#max)\n    this.#ttls = ttls\n    this.#starts = starts\n\n    this.#setItemTTL = (index, ttl, start = perf.now()) => {\n      starts[index] = ttl !== 0 ? start : 0\n      ttls[index] = ttl\n      if (ttl !== 0 && this.ttlAutopurge) {\n        const t = setTimeout(() => {\n          if (this.#isStale(index)) {\n            this.#delete(this.#keyList[index] as K, 'expire')\n          }\n        }, ttl + 1)\n        // unref() not supported on all platforms\n        /* c8 ignore start */\n        if (t.unref) {\n          t.unref()\n        }\n        /* c8 ignore stop */\n      }\n    }\n\n    this.#updateItemAge = index => {\n      starts[index] = ttls[index] !== 0 ? perf.now() : 0\n    }\n\n    this.#statusTTL = (status, index) => {\n      if (ttls[index]) {\n        const ttl = ttls[index]\n        const start = starts[index]\n        /* c8 ignore next */\n        if (!ttl || !start) return\n        status.ttl = ttl\n        status.start = start\n        status.now = cachedNow || getNow()\n        const age = status.now - start\n        status.remainingTTL = ttl - age\n      }\n    }\n\n    // debounce calls to perf.now() to 1s so we're not hitting\n    // that costly call repeatedly.\n    let cachedNow = 0\n    const getNow = () => {\n      const n = perf.now()\n      if (this.ttlResolution > 0) {\n        cachedNow = n\n        const t = setTimeout(\n          () => (cachedNow = 0),\n          this.ttlResolution\n        )\n        // not available on all platforms\n        /* c8 ignore start */\n        if (t.unref) {\n          t.unref()\n        }\n        /* c8 ignore stop */\n      }\n      return n\n    }\n\n    this.getRemainingTTL = key => {\n      const index = this.#keyMap.get(key)\n      if (index === undefined) {\n        return 0\n      }\n      const ttl = ttls[index]\n      const start = starts[index]\n      if (!ttl || !start) {\n        return Infinity\n      }\n      const age = (cachedNow || getNow()) - start\n      return ttl - age\n    }\n\n    this.#isStale = index => {\n      const s = starts[index]\n      const t = ttls[index]\n      return !!t && !!s && (cachedNow || getNow()) - s > t\n    }\n  }\n\n  // conditionally set private methods related to TTL\n  #updateItemAge: (index: Index) => void = () => {}\n  #statusTTL: (status: LRUCache.Status, index: Index) => void =\n    () => {}\n  #setItemTTL: (\n    index: Index,\n    ttl: LRUCache.Milliseconds,\n    start?: LRUCache.Milliseconds\n    // ignore because we never call this if we're not already in TTL mode\n    /* c8 ignore start */\n  ) => void = () => {}\n  /* c8 ignore stop */\n\n  #isStale: (index: Index) => boolean = () => false\n\n  #initializeSizeTracking() {\n    const sizes = new ZeroArray(this.#max)\n    this.#calculatedSize = 0\n    this.#sizes = sizes\n    this.#removeItemSize = index => {\n      this.#calculatedSize -= sizes[index] as number\n      sizes[index] = 0\n    }\n    this.#requireSize = (k, v, size, sizeCalculation) => {\n      // provisionally accept background fetches.\n      // actual value size will be checked when they return.\n      if (this.#isBackgroundFetch(v)) {\n        return 0\n      }\n      if (!isPosInt(size)) {\n        if (sizeCalculation) {\n          if (typeof sizeCalculation !== 'function') {\n            throw new TypeError('sizeCalculation must be a function')\n          }\n          size = sizeCalculation(v, k)\n          if (!isPosInt(size)) {\n            throw new TypeError(\n              'sizeCalculation return invalid (expect positive integer)'\n            )\n          }\n        } else {\n          throw new TypeError(\n            'invalid size value (must be positive integer). ' +\n              'When maxSize or maxEntrySize is used, sizeCalculation ' +\n              'or size must be set.'\n          )\n        }\n      }\n      return size\n    }\n    this.#addItemSize = (\n      index: Index,\n      size: LRUCache.Size,\n      status?: LRUCache.Status\n    ) => {\n      sizes[index] = size\n      if (this.#maxSize) {\n        const maxSize = this.#maxSize - (sizes[index] as number)\n        while (this.#calculatedSize > maxSize) {\n          this.#evict(true)\n        }\n      }\n      this.#calculatedSize += sizes[index] as number\n      if (status) {\n        status.entrySize = size\n        status.totalCalculatedSize = this.#calculatedSize\n      }\n    }\n  }\n\n  #removeItemSize: (index: Index) => void = _i => {}\n  #addItemSize: (\n    index: Index,\n    size: LRUCache.Size,\n    status?: LRUCache.Status\n  ) => void = (_i, _s, _st) => {}\n  #requireSize: (\n    k: K,\n    v: V | BackgroundFetch,\n    size?: LRUCache.Size,\n    sizeCalculation?: LRUCache.SizeCalculator\n  ) => LRUCache.Size = (\n    _k: K,\n    _v: V | BackgroundFetch,\n    size?: LRUCache.Size,\n    sizeCalculation?: LRUCache.SizeCalculator\n  ) => {\n    if (size || sizeCalculation) {\n      throw new TypeError(\n        'cannot set size without setting maxSize or maxEntrySize on cache'\n      )\n    }\n    return 0\n  };\n\n  *#indexes({ allowStale = this.allowStale } = {}) {\n    if (this.#size) {\n      for (let i = this.#tail; true; ) {\n        if (!this.#isValidIndex(i)) {\n          break\n        }\n        if (allowStale || !this.#isStale(i)) {\n          yield i\n        }\n        if (i === this.#head) {\n          break\n        } else {\n          i = this.#prev[i] as Index\n        }\n      }\n    }\n  }\n\n  *#rindexes({ allowStale = this.allowStale } = {}) {\n    if (this.#size) {\n      for (let i = this.#head; true; ) {\n        if (!this.#isValidIndex(i)) {\n          break\n        }\n        if (allowStale || !this.#isStale(i)) {\n          yield i\n        }\n        if (i === this.#tail) {\n          break\n        } else {\n          i = this.#next[i] as Index\n        }\n      }\n    }\n  }\n\n  #isValidIndex(index: Index) {\n    return (\n      index !== undefined &&\n      this.#keyMap.get(this.#keyList[index] as K) === index\n    )\n  }\n\n  /**\n   * Return a generator yielding `[key, value]` pairs,\n   * in order from most recently used to least recently used.\n   */\n  *entries() {\n    for (const i of this.#indexes()) {\n      if (\n        this.#valList[i] !== undefined &&\n        this.#keyList[i] !== undefined &&\n        !this.#isBackgroundFetch(this.#valList[i])\n      ) {\n        yield [this.#keyList[i], this.#valList[i]] as [K, V]\n      }\n    }\n  }\n\n  /**\n   * Inverse order version of {@link LRUCache.entries}\n   *\n   * Return a generator yielding `[key, value]` pairs,\n   * in order from least recently used to most recently used.\n   */\n  *rentries() {\n    for (const i of this.#rindexes()) {\n      if (\n        this.#valList[i] !== undefined &&\n        this.#keyList[i] !== undefined &&\n        !this.#isBackgroundFetch(this.#valList[i])\n      ) {\n        yield [this.#keyList[i], this.#valList[i]]\n      }\n    }\n  }\n\n  /**\n   * Return a generator yielding the keys in the cache,\n   * in order from most recently used to least recently used.\n   */\n  *keys() {\n    for (const i of this.#indexes()) {\n      const k = this.#keyList[i]\n      if (\n        k !== undefined &&\n        !this.#isBackgroundFetch(this.#valList[i])\n      ) {\n        yield k\n      }\n    }\n  }\n\n  /**\n   * Inverse order version of {@link LRUCache.keys}\n   *\n   * Return a generator yielding the keys in the cache,\n   * in order from least recently used to most recently used.\n   */\n  *rkeys() {\n    for (const i of this.#rindexes()) {\n      const k = this.#keyList[i]\n      if (\n        k !== undefined &&\n        !this.#isBackgroundFetch(this.#valList[i])\n      ) {\n        yield k\n      }\n    }\n  }\n\n  /**\n   * Return a generator yielding the values in the cache,\n   * in order from most recently used to least recently used.\n   */\n  *values() {\n    for (const i of this.#indexes()) {\n      const v = this.#valList[i]\n      if (\n        v !== undefined &&\n        !this.#isBackgroundFetch(this.#valList[i])\n      ) {\n        yield this.#valList[i] as V\n      }\n    }\n  }\n\n  /**\n   * Inverse order version of {@link LRUCache.values}\n   *\n   * Return a generator yielding the values in the cache,\n   * in order from least recently used to most recently used.\n   */\n  *rvalues() {\n    for (const i of this.#rindexes()) {\n      const v = this.#valList[i]\n      if (\n        v !== undefined &&\n        !this.#isBackgroundFetch(this.#valList[i])\n      ) {\n        yield this.#valList[i]\n      }\n    }\n  }\n\n  /**\n   * Iterating over the cache itself yields the same results as\n   * {@link LRUCache.entries}\n   */\n  [Symbol.iterator]() {\n    return this.entries()\n  }\n\n  /**\n   * A String value that is used in the creation of the default string\n   * description of an object. Called by the built-in method\n   * `Object.prototype.toString`.\n   */\n  [Symbol.toStringTag] = 'LRUCache'\n\n  /**\n   * Find a value for which the supplied fn method returns a truthy value,\n   * similar to `Array.find()`. fn is called as `fn(value, key, cache)`.\n   */\n  find(\n    fn: (v: V, k: K, self: LRUCache) => boolean,\n    getOptions: LRUCache.GetOptions = {}\n  ) {\n    for (const i of this.#indexes()) {\n      const v = this.#valList[i]\n      const value = this.#isBackgroundFetch(v)\n        ? v.__staleWhileFetching\n        : v\n      if (value === undefined) continue\n      if (fn(value, this.#keyList[i] as K, this)) {\n        return this.get(this.#keyList[i] as K, getOptions)\n      }\n    }\n  }\n\n  /**\n   * Call the supplied function on each item in the cache, in order from most\n   * recently used to least recently used.\n   *\n   * `fn` is called as `fn(value, key, cache)`.\n   *\n   * If `thisp` is provided, function will be called in the `this`-context of\n   * the provided object, or the cache if no `thisp` object is provided.\n   *\n   * Does not update age or recenty of use, or iterate over stale values.\n   */\n  forEach(\n    fn: (v: V, k: K, self: LRUCache) => any,\n    thisp: any = this\n  ) {\n    for (const i of this.#indexes()) {\n      const v = this.#valList[i]\n      const value = this.#isBackgroundFetch(v)\n        ? v.__staleWhileFetching\n        : v\n      if (value === undefined) continue\n      fn.call(thisp, value, this.#keyList[i] as K, this)\n    }\n  }\n\n  /**\n   * The same as {@link LRUCache.forEach} but items are iterated over in\n   * reverse order.  (ie, less recently used items are iterated over first.)\n   */\n  rforEach(\n    fn: (v: V, k: K, self: LRUCache) => any,\n    thisp: any = this\n  ) {\n    for (const i of this.#rindexes()) {\n      const v = this.#valList[i]\n      const value = this.#isBackgroundFetch(v)\n        ? v.__staleWhileFetching\n        : v\n      if (value === undefined) continue\n      fn.call(thisp, value, this.#keyList[i] as K, this)\n    }\n  }\n\n  /**\n   * Delete any stale entries. Returns true if anything was removed,\n   * false otherwise.\n   */\n  purgeStale() {\n    let deleted = false\n    for (const i of this.#rindexes({ allowStale: true })) {\n      if (this.#isStale(i)) {\n        this.#delete(this.#keyList[i] as K, 'expire')\n        deleted = true\n      }\n    }\n    return deleted\n  }\n\n  /**\n   * Get the extended info about a given entry, to get its value, size, and\n   * TTL info simultaneously. Returns `undefined` if the key is not present.\n   *\n   * Unlike {@link LRUCache#dump}, which is designed to be portable and survive\n   * serialization, the `start` value is always the current timestamp, and the\n   * `ttl` is a calculated remaining time to live (negative if expired).\n   *\n   * Always returns stale values, if their info is found in the cache, so be\n   * sure to check for expirations (ie, a negative {@link LRUCache.Entry#ttl})\n   * if relevant.\n   */\n  info(key: K): LRUCache.Entry | undefined {\n    const i = this.#keyMap.get(key)\n    if (i === undefined) return undefined\n    const v = this.#valList[i]\n    const value: V | undefined = this.#isBackgroundFetch(v)\n      ? v.__staleWhileFetching\n      : v\n    if (value === undefined) return undefined\n    const entry: LRUCache.Entry = { value }\n    if (this.#ttls && this.#starts) {\n      const ttl = this.#ttls[i]\n      const start = this.#starts[i]\n      if (ttl && start) {\n        const remain = ttl - (perf.now() - start)\n        entry.ttl = remain\n        entry.start = Date.now()\n      }\n    }\n    if (this.#sizes) {\n      entry.size = this.#sizes[i]\n    }\n    return entry\n  }\n\n  /**\n   * Return an array of [key, {@link LRUCache.Entry}] tuples which can be\n   * passed to {@link LRLUCache#load}.\n   *\n   * The `start` fields are calculated relative to a portable `Date.now()`\n   * timestamp, even if `performance.now()` is available.\n   *\n   * Stale entries are always included in the `dump`, even if\n   * {@link LRUCache.OptionsBase.allowStale} is false.\n   *\n   * Note: this returns an actual array, not a generator, so it can be more\n   * easily passed around.\n   */\n  dump() {\n    const arr: [K, LRUCache.Entry][] = []\n    for (const i of this.#indexes({ allowStale: true })) {\n      const key = this.#keyList[i]\n      const v = this.#valList[i]\n      const value: V | undefined = this.#isBackgroundFetch(v)\n        ? v.__staleWhileFetching\n        : v\n      if (value === undefined || key === undefined) continue\n      const entry: LRUCache.Entry = { value }\n      if (this.#ttls && this.#starts) {\n        entry.ttl = this.#ttls[i]\n        // always dump the start relative to a portable timestamp\n        // it's ok for this to be a bit slow, it's a rare operation.\n        const age = perf.now() - (this.#starts[i] as number)\n        entry.start = Math.floor(Date.now() - age)\n      }\n      if (this.#sizes) {\n        entry.size = this.#sizes[i]\n      }\n      arr.unshift([key, entry])\n    }\n    return arr\n  }\n\n  /**\n   * Reset the cache and load in the items in entries in the order listed.\n   *\n   * The shape of the resulting cache may be different if the same options are\n   * not used in both caches.\n   *\n   * The `start` fields are assumed to be calculated relative to a portable\n   * `Date.now()` timestamp, even if `performance.now()` is available.\n   */\n  load(arr: [K, LRUCache.Entry][]) {\n    this.clear()\n    for (const [key, entry] of arr) {\n      if (entry.start) {\n        // entry.start is a portable timestamp, but we may be using\n        // node's performance.now(), so calculate the offset, so that\n        // we get the intended remaining TTL, no matter how long it's\n        // been on ice.\n        //\n        // it's ok for this to be a bit slow, it's a rare operation.\n        const age = Date.now() - entry.start\n        entry.start = perf.now() - age\n      }\n      this.set(key, entry.value, entry)\n    }\n  }\n\n  /**\n   * Add a value to the cache.\n   *\n   * Note: if `undefined` is specified as a value, this is an alias for\n   * {@link LRUCache#delete}\n   *\n   * Fields on the {@link LRUCache.SetOptions} options param will override\n   * their corresponding values in the constructor options for the scope\n   * of this single `set()` operation.\n   *\n   * If `start` is provided, then that will set the effective start\n   * time for the TTL calculation. Note that this must be a previous\n   * value of `performance.now()` if supported, or a previous value of\n   * `Date.now()` if not.\n   *\n   * Options object may also include `size`, which will prevent\n   * calling the `sizeCalculation` function and just use the specified\n   * number if it is a positive integer, and `noDisposeOnSet` which\n   * will prevent calling a `dispose` function in the case of\n   * overwrites.\n   *\n   * If the `size` (or return value of `sizeCalculation`) for a given\n   * entry is greater than `maxEntrySize`, then the item will not be\n   * added to the cache.\n   *\n   * Will update the recency of the entry.\n   *\n   * If the value is `undefined`, then this is an alias for\n   * `cache.delete(key)`. `undefined` is never stored in the cache.\n   */\n  set(\n    k: K,\n    v: V | BackgroundFetch | undefined,\n    setOptions: LRUCache.SetOptions = {}\n  ) {\n    if (v === undefined) {\n      this.delete(k)\n      return this\n    }\n    const {\n      ttl = this.ttl,\n      start,\n      noDisposeOnSet = this.noDisposeOnSet,\n      sizeCalculation = this.sizeCalculation,\n      status,\n    } = setOptions\n    let { noUpdateTTL = this.noUpdateTTL } = setOptions\n\n    const size = this.#requireSize(\n      k,\n      v,\n      setOptions.size || 0,\n      sizeCalculation\n    )\n    // if the item doesn't fit, don't do anything\n    // NB: maxEntrySize set to maxSize by default\n    if (this.maxEntrySize && size > this.maxEntrySize) {\n      if (status) {\n        status.set = 'miss'\n        status.maxEntrySizeExceeded = true\n      }\n      // have to delete, in case something is there already.\n      this.#delete(k, 'set')\n      return this\n    }\n    let index = this.#size === 0 ? undefined : this.#keyMap.get(k)\n    if (index === undefined) {\n      // addition\n      index = (\n        this.#size === 0\n          ? this.#tail\n          : this.#free.length !== 0\n          ? this.#free.pop()\n          : this.#size === this.#max\n          ? this.#evict(false)\n          : this.#size\n      ) as Index\n      this.#keyList[index] = k\n      this.#valList[index] = v\n      this.#keyMap.set(k, index)\n      this.#next[this.#tail] = index\n      this.#prev[index] = this.#tail\n      this.#tail = index\n      this.#size++\n      this.#addItemSize(index, size, status)\n      if (status) status.set = 'add'\n      noUpdateTTL = false\n    } else {\n      // update\n      this.#moveToTail(index)\n      const oldVal = this.#valList[index] as V | BackgroundFetch\n      if (v !== oldVal) {\n        if (this.#hasFetchMethod && this.#isBackgroundFetch(oldVal)) {\n          oldVal.__abortController.abort(new Error('replaced'))\n          const { __staleWhileFetching: s } = oldVal\n          if (s !== undefined && !noDisposeOnSet) {\n            if (this.#hasDispose) {\n              this.#dispose?.(s as V, k, 'set')\n            }\n            if (this.#hasDisposeAfter) {\n              this.#disposed?.push([s as V, k, 'set'])\n            }\n          }\n        } else if (!noDisposeOnSet) {\n          if (this.#hasDispose) {\n            this.#dispose?.(oldVal as V, k, 'set')\n          }\n          if (this.#hasDisposeAfter) {\n            this.#disposed?.push([oldVal as V, k, 'set'])\n          }\n        }\n        this.#removeItemSize(index)\n        this.#addItemSize(index, size, status)\n        this.#valList[index] = v\n        if (status) {\n          status.set = 'replace'\n          const oldValue =\n            oldVal && this.#isBackgroundFetch(oldVal)\n              ? oldVal.__staleWhileFetching\n              : oldVal\n          if (oldValue !== undefined) status.oldValue = oldValue\n        }\n      } else if (status) {\n        status.set = 'update'\n      }\n    }\n    if (ttl !== 0 && !this.#ttls) {\n      this.#initializeTTLTracking()\n    }\n    if (this.#ttls) {\n      if (!noUpdateTTL) {\n        this.#setItemTTL(index, ttl, start)\n      }\n      if (status) this.#statusTTL(status, index)\n    }\n    if (!noDisposeOnSet && this.#hasDisposeAfter && this.#disposed) {\n      const dt = this.#disposed\n      let task: DisposeTask | undefined\n      while ((task = dt?.shift())) {\n        this.#disposeAfter?.(...task)\n      }\n    }\n    return this\n  }\n\n  /**\n   * Evict the least recently used item, returning its value or\n   * `undefined` if cache is empty.\n   */\n  pop(): V | undefined {\n    try {\n      while (this.#size) {\n        const val = this.#valList[this.#head]\n        this.#evict(true)\n        if (this.#isBackgroundFetch(val)) {\n          if (val.__staleWhileFetching) {\n            return val.__staleWhileFetching\n          }\n        } else if (val !== undefined) {\n          return val\n        }\n      }\n    } finally {\n      if (this.#hasDisposeAfter && this.#disposed) {\n        const dt = this.#disposed\n        let task: DisposeTask | undefined\n        while ((task = dt?.shift())) {\n          this.#disposeAfter?.(...task)\n        }\n      }\n    }\n  }\n\n  #evict(free: boolean) {\n    const head = this.#head\n    const k = this.#keyList[head] as K\n    const v = this.#valList[head] as V\n    if (this.#hasFetchMethod && this.#isBackgroundFetch(v)) {\n      v.__abortController.abort(new Error('evicted'))\n    } else if (this.#hasDispose || this.#hasDisposeAfter) {\n      if (this.#hasDispose) {\n        this.#dispose?.(v, k, 'evict')\n      }\n      if (this.#hasDisposeAfter) {\n        this.#disposed?.push([v, k, 'evict'])\n      }\n    }\n    this.#removeItemSize(head)\n    // if we aren't about to use the index, then null these out\n    if (free) {\n      this.#keyList[head] = undefined\n      this.#valList[head] = undefined\n      this.#free.push(head)\n    }\n    if (this.#size === 1) {\n      this.#head = this.#tail = 0 as Index\n      this.#free.length = 0\n    } else {\n      this.#head = this.#next[head] as Index\n    }\n    this.#keyMap.delete(k)\n    this.#size--\n    return head\n  }\n\n  /**\n   * Check if a key is in the cache, without updating the recency of use.\n   * Will return false if the item is stale, even though it is technically\n   * in the cache.\n   *\n   * Check if a key is in the cache, without updating the recency of\n   * use. Age is updated if {@link LRUCache.OptionsBase.updateAgeOnHas} is set\n   * to `true` in either the options or the constructor.\n   *\n   * Will return `false` if the item is stale, even though it is technically in\n   * the cache. The difference can be determined (if it matters) by using a\n   * `status` argument, and inspecting the `has` field.\n   *\n   * Will not update item age unless\n   * {@link LRUCache.OptionsBase.updateAgeOnHas} is set.\n   */\n  has(k: K, hasOptions: LRUCache.HasOptions = {}) {\n    const { updateAgeOnHas = this.updateAgeOnHas, status } =\n      hasOptions\n    const index = this.#keyMap.get(k)\n    if (index !== undefined) {\n      const v = this.#valList[index]\n      if (\n        this.#isBackgroundFetch(v) &&\n        v.__staleWhileFetching === undefined\n      ) {\n        return false\n      }\n      if (!this.#isStale(index)) {\n        if (updateAgeOnHas) {\n          this.#updateItemAge(index)\n        }\n        if (status) {\n          status.has = 'hit'\n          this.#statusTTL(status, index)\n        }\n        return true\n      } else if (status) {\n        status.has = 'stale'\n        this.#statusTTL(status, index)\n      }\n    } else if (status) {\n      status.has = 'miss'\n    }\n    return false\n  }\n\n  /**\n   * Like {@link LRUCache#get} but doesn't update recency or delete stale\n   * items.\n   *\n   * Returns `undefined` if the item is stale, unless\n   * {@link LRUCache.OptionsBase.allowStale} is set.\n   */\n  peek(k: K, peekOptions: LRUCache.PeekOptions = {}) {\n    const { allowStale = this.allowStale } = peekOptions\n    const index = this.#keyMap.get(k)\n    if (\n      index === undefined ||\n      (!allowStale && this.#isStale(index))\n    ) {\n      return\n    }\n    const v = this.#valList[index]\n    // either stale and allowed, or forcing a refresh of non-stale value\n    return this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v\n  }\n\n  #backgroundFetch(\n    k: K,\n    index: Index | undefined,\n    options: LRUCache.FetchOptions,\n    context: any\n  ): BackgroundFetch {\n    const v = index === undefined ? undefined : this.#valList[index]\n    if (this.#isBackgroundFetch(v)) {\n      return v\n    }\n\n    const ac = new AC()\n    const { signal } = options\n    // when/if our AC signals, then stop listening to theirs.\n    signal?.addEventListener('abort', () => ac.abort(signal.reason), {\n      signal: ac.signal,\n    })\n\n    const fetchOpts = {\n      signal: ac.signal,\n      options,\n      context,\n    }\n\n    const cb = (\n      v: V | undefined,\n      updateCache = false\n    ): V | undefined => {\n      const { aborted } = ac.signal\n      const ignoreAbort = options.ignoreFetchAbort && v !== undefined\n      if (options.status) {\n        if (aborted && !updateCache) {\n          options.status.fetchAborted = true\n          options.status.fetchError = ac.signal.reason\n          if (ignoreAbort) options.status.fetchAbortIgnored = true\n        } else {\n          options.status.fetchResolved = true\n        }\n      }\n      if (aborted && !ignoreAbort && !updateCache) {\n        return fetchFail(ac.signal.reason)\n      }\n      // either we didn't abort, and are still here, or we did, and ignored\n      const bf = p as BackgroundFetch\n      if (this.#valList[index as Index] === p) {\n        if (v === undefined) {\n          if (bf.__staleWhileFetching) {\n            this.#valList[index as Index] = bf.__staleWhileFetching\n          } else {\n            this.#delete(k, 'fetch')\n          }\n        } else {\n          if (options.status) options.status.fetchUpdated = true\n          this.set(k, v, fetchOpts.options)\n        }\n      }\n      return v\n    }\n\n    const eb = (er: any) => {\n      if (options.status) {\n        options.status.fetchRejected = true\n        options.status.fetchError = er\n      }\n      return fetchFail(er)\n    }\n\n    const fetchFail = (er: any): V | undefined => {\n      const { aborted } = ac.signal\n      const allowStaleAborted =\n        aborted && options.allowStaleOnFetchAbort\n      const allowStale =\n        allowStaleAborted || options.allowStaleOnFetchRejection\n      const noDelete = allowStale || options.noDeleteOnFetchRejection\n      const bf = p as BackgroundFetch\n      if (this.#valList[index as Index] === p) {\n        // if we allow stale on fetch rejections, then we need to ensure that\n        // the stale value is not removed from the cache when the fetch fails.\n        const del = !noDelete || bf.__staleWhileFetching === undefined\n        if (del) {\n          this.#delete(k, 'fetch')\n        } else if (!allowStaleAborted) {\n          // still replace the *promise* with the stale value,\n          // since we are done with the promise at this point.\n          // leave it untouched if we're still waiting for an\n          // aborted background fetch that hasn't yet returned.\n          this.#valList[index as Index] = bf.__staleWhileFetching\n        }\n      }\n      if (allowStale) {\n        if (options.status && bf.__staleWhileFetching !== undefined) {\n          options.status.returnedStale = true\n        }\n        return bf.__staleWhileFetching\n      } else if (bf.__returned === bf) {\n        throw er\n      }\n    }\n\n    const pcall = (\n      res: (v: V | undefined) => void,\n      rej: (e: any) => void\n    ) => {\n      const fmp = this.#fetchMethod?.(k, v, fetchOpts)\n      if (fmp && fmp instanceof Promise) {\n        fmp.then(v => res(v === undefined ? undefined : v), rej)\n      }\n      // ignored, we go until we finish, regardless.\n      // defer check until we are actually aborting,\n      // so fetchMethod can override.\n      ac.signal.addEventListener('abort', () => {\n        if (\n          !options.ignoreFetchAbort ||\n          options.allowStaleOnFetchAbort\n        ) {\n          res(undefined)\n          // when it eventually resolves, update the cache.\n          if (options.allowStaleOnFetchAbort) {\n            res = v => cb(v, true)\n          }\n        }\n      })\n    }\n\n    if (options.status) options.status.fetchDispatched = true\n    const p = new Promise(pcall).then(cb, eb)\n    const bf: BackgroundFetch = Object.assign(p, {\n      __abortController: ac,\n      __staleWhileFetching: v,\n      __returned: undefined,\n    })\n\n    if (index === undefined) {\n      // internal, don't expose status.\n      this.set(k, bf, { ...fetchOpts.options, status: undefined })\n      index = this.#keyMap.get(k)\n    } else {\n      this.#valList[index] = bf\n    }\n    return bf\n  }\n\n  #isBackgroundFetch(p: any): p is BackgroundFetch {\n    if (!this.#hasFetchMethod) return false\n    const b = p as BackgroundFetch\n    return (\n      !!b &&\n      b instanceof Promise &&\n      b.hasOwnProperty('__staleWhileFetching') &&\n      b.__abortController instanceof AC\n    )\n  }\n\n  /**\n   * Make an asynchronous cached fetch using the\n   * {@link LRUCache.OptionsBase.fetchMethod} function.\n   *\n   * If the value is in the cache and not stale, then the returned\n   * Promise resolves to the value.\n   *\n   * If not in the cache, or beyond its TTL staleness, then\n   * `fetchMethod(key, staleValue, { options, signal, context })` is\n   * called, and the value returned will be added to the cache once\n   * resolved.\n   *\n   * If called with `allowStale`, and an asynchronous fetch is\n   * currently in progress to reload a stale value, then the former\n   * stale value will be returned.\n   *\n   * If called with `forceRefresh`, then the cached item will be\n   * re-fetched, even if it is not stale. However, if `allowStale` is also\n   * set, then the old value will still be returned. This is useful\n   * in cases where you want to force a reload of a cached value. If\n   * a background fetch is already in progress, then `forceRefresh`\n   * has no effect.\n   *\n   * If multiple fetches for the same key are issued, then they will all be\n   * coalesced into a single call to fetchMethod.\n   *\n   * Note that this means that handling options such as\n   * {@link LRUCache.OptionsBase.allowStaleOnFetchAbort},\n   * {@link LRUCache.FetchOptions.signal},\n   * and {@link LRUCache.OptionsBase.allowStaleOnFetchRejection} will be\n   * determined by the FIRST fetch() call for a given key.\n   *\n   * This is a known (fixable) shortcoming which will be addresed on when\n   * someone complains about it, as the fix would involve added complexity and\n   * may not be worth the costs for this edge case.\n   *\n   * If {@link LRUCache.OptionsBase.fetchMethod} is not specified, then this is\n   * effectively an alias for `Promise.resolve(cache.get(key))`.\n   *\n   * When the fetch method resolves to a value, if the fetch has not\n   * been aborted due to deletion, eviction, or being overwritten,\n   * then it is added to the cache using the options provided.\n   *\n   * If the key is evicted or deleted before the `fetchMethod`\n   * resolves, then the AbortSignal passed to the `fetchMethod` will\n   * receive an `abort` event, and the promise returned by `fetch()`\n   * will reject with the reason for the abort.\n   *\n   * If a `signal` is passed to the `fetch()` call, then aborting the\n   * signal will abort the fetch and cause the `fetch()` promise to\n   * reject with the reason provided.\n   *\n   * **Setting `context`**\n   *\n   * If an `FC` type is set to a type other than `unknown`, `void`, or\n   * `undefined` in the {@link LRUCache} constructor, then all\n   * calls to `cache.fetch()` _must_ provide a `context` option. If\n   * set to `undefined` or `void`, then calls to fetch _must not_\n   * provide a `context` option.\n   *\n   * The `context` param allows you to provide arbitrary data that\n   * might be relevant in the course of fetching the data. It is only\n   * relevant for the course of a single `fetch()` operation, and\n   * discarded afterwards.\n   *\n   * **Note: `fetch()` calls are inflight-unique**\n   *\n   * If you call `fetch()` multiple times with the same key value,\n   * then every call after the first will resolve on the same\n   * promise1,\n   * _even if they have different settings that would otherwise change\n   * the behavior of the fetch_, such as `noDeleteOnFetchRejection`\n   * or `ignoreFetchAbort`.\n   *\n   * In most cases, this is not a problem (in fact, only fetching\n   * something once is what you probably want, if you're caching in\n   * the first place). If you are changing the fetch() options\n   * dramatically between runs, there's a good chance that you might\n   * be trying to fit divergent semantics into a single object, and\n   * would be better off with multiple cache instances.\n   *\n   * **1**: Ie, they're not the \"same Promise\", but they resolve at\n   * the same time, because they're both waiting on the same\n   * underlying fetchMethod response.\n   */\n\n  fetch(\n    k: K,\n    fetchOptions: unknown extends FC\n      ? LRUCache.FetchOptions\n      : FC extends undefined | void\n      ? LRUCache.FetchOptionsNoContext\n      : LRUCache.FetchOptionsWithContext\n  ): Promise\n\n  // this overload not allowed if context is required\n  fetch(\n    k: unknown extends FC\n      ? K\n      : FC extends undefined | void\n      ? K\n      : never,\n    fetchOptions?: unknown extends FC\n      ? LRUCache.FetchOptions\n      : FC extends undefined | void\n      ? LRUCache.FetchOptionsNoContext\n      : never\n  ): Promise\n\n  async fetch(\n    k: K,\n    fetchOptions: LRUCache.FetchOptions = {}\n  ): Promise {\n    const {\n      // get options\n      allowStale = this.allowStale,\n      updateAgeOnGet = this.updateAgeOnGet,\n      noDeleteOnStaleGet = this.noDeleteOnStaleGet,\n      // set options\n      ttl = this.ttl,\n      noDisposeOnSet = this.noDisposeOnSet,\n      size = 0,\n      sizeCalculation = this.sizeCalculation,\n      noUpdateTTL = this.noUpdateTTL,\n      // fetch exclusive options\n      noDeleteOnFetchRejection = this.noDeleteOnFetchRejection,\n      allowStaleOnFetchRejection = this.allowStaleOnFetchRejection,\n      ignoreFetchAbort = this.ignoreFetchAbort,\n      allowStaleOnFetchAbort = this.allowStaleOnFetchAbort,\n      context,\n      forceRefresh = false,\n      status,\n      signal,\n    } = fetchOptions\n\n    if (!this.#hasFetchMethod) {\n      if (status) status.fetch = 'get'\n      return this.get(k, {\n        allowStale,\n        updateAgeOnGet,\n        noDeleteOnStaleGet,\n        status,\n      })\n    }\n\n    const options = {\n      allowStale,\n      updateAgeOnGet,\n      noDeleteOnStaleGet,\n      ttl,\n      noDisposeOnSet,\n      size,\n      sizeCalculation,\n      noUpdateTTL,\n      noDeleteOnFetchRejection,\n      allowStaleOnFetchRejection,\n      allowStaleOnFetchAbort,\n      ignoreFetchAbort,\n      status,\n      signal,\n    }\n\n    let index = this.#keyMap.get(k)\n    if (index === undefined) {\n      if (status) status.fetch = 'miss'\n      const p = this.#backgroundFetch(k, index, options, context)\n      return (p.__returned = p)\n    } else {\n      // in cache, maybe already fetching\n      const v = this.#valList[index]\n      if (this.#isBackgroundFetch(v)) {\n        const stale =\n          allowStale && v.__staleWhileFetching !== undefined\n        if (status) {\n          status.fetch = 'inflight'\n          if (stale) status.returnedStale = true\n        }\n        return stale ? v.__staleWhileFetching : (v.__returned = v)\n      }\n\n      // if we force a refresh, that means do NOT serve the cached value,\n      // unless we are already in the process of refreshing the cache.\n      const isStale = this.#isStale(index)\n      if (!forceRefresh && !isStale) {\n        if (status) status.fetch = 'hit'\n        this.#moveToTail(index)\n        if (updateAgeOnGet) {\n          this.#updateItemAge(index)\n        }\n        if (status) this.#statusTTL(status, index)\n        return v\n      }\n\n      // ok, it is stale or a forced refresh, and not already fetching.\n      // refresh the cache.\n      const p = this.#backgroundFetch(k, index, options, context)\n      const hasStale = p.__staleWhileFetching !== undefined\n      const staleVal = hasStale && allowStale\n      if (status) {\n        status.fetch = isStale ? 'stale' : 'refresh'\n        if (staleVal && isStale) status.returnedStale = true\n      }\n      return staleVal ? p.__staleWhileFetching : (p.__returned = p)\n    }\n  }\n\n  /**\n   * In some cases, `cache.fetch()` may resolve to `undefined`, either because\n   * a {@link LRUCache.OptionsBase#fetchMethod} was not provided (turning\n   * `cache.fetch(k)` into just an async wrapper around `cache.get(k)`) or\n   * because `ignoreFetchAbort` was specified (either to the constructor or\n   * in the {@link LRUCache.FetchOptions}). Also, the\n   * {@link OptionsBase.fetchMethod} may return `undefined` or `void`, making\n   * the test even more complicated.\n   *\n   * Because inferring the cases where `undefined` might be returned are so\n   * cumbersome, but testing for `undefined` can also be annoying, this method\n   * can be used, which will reject if `this.fetch()` resolves to undefined.\n   */\n  forceFetch(\n    k: K,\n    fetchOptions: unknown extends FC\n      ? LRUCache.FetchOptions\n      : FC extends undefined | void\n      ? LRUCache.FetchOptionsNoContext\n      : LRUCache.FetchOptionsWithContext\n  ): Promise\n  // this overload not allowed if context is required\n  forceFetch(\n    k: unknown extends FC\n      ? K\n      : FC extends undefined | void\n      ? K\n      : never,\n    fetchOptions?: unknown extends FC\n      ? LRUCache.FetchOptions\n      : FC extends undefined | void\n      ? LRUCache.FetchOptionsNoContext\n      : never\n  ): Promise\n  async forceFetch(\n    k: K,\n    fetchOptions: LRUCache.FetchOptions = {}\n  ): Promise {\n    const v = await this.fetch(\n      k,\n      fetchOptions as unknown extends FC\n        ? LRUCache.FetchOptions\n        : FC extends undefined | void\n        ? LRUCache.FetchOptionsNoContext\n        : LRUCache.FetchOptionsWithContext\n    )\n    if (v === undefined) throw new Error('fetch() returned undefined')\n    return v\n  }\n\n  /**\n   * If the key is found in the cache, then this is equivalent to\n   * {@link LRUCache#get}. If not, in the cache, then calculate the value using\n   * the {@link LRUCache.OptionsBase.memoMethod}, and add it to the cache.\n   *\n   * If an `FC` type is set to a type other than `unknown`, `void`, or\n   * `undefined` in the LRUCache constructor, then all calls to `cache.memo()`\n   * _must_ provide a `context` option. If set to `undefined` or `void`, then\n   * calls to memo _must not_ provide a `context` option.\n   *\n   * The `context` param allows you to provide arbitrary data that might be\n   * relevant in the course of fetching the data. It is only relevant for the\n   * course of a single `memo()` operation, and discarded afterwards.\n   */\n  memo(\n    k: K,\n    memoOptions: unknown extends FC\n      ? LRUCache.MemoOptions\n      : FC extends undefined | void\n      ? LRUCache.MemoOptionsNoContext\n      : LRUCache.MemoOptionsWithContext\n  ): V\n  // this overload not allowed if context is required\n  memo(\n    k: unknown extends FC\n      ? K\n      : FC extends undefined | void\n      ? K\n      : never,\n    memoOptions?: unknown extends FC\n      ? LRUCache.MemoOptions\n      : FC extends undefined | void\n      ? LRUCache.MemoOptionsNoContext\n      : never\n  ): V\n  memo(k: K, memoOptions: LRUCache.MemoOptions = {}) {\n    const memoMethod = this.#memoMethod\n    if (!memoMethod) {\n      throw new Error('no memoMethod provided to constructor')\n    }\n    const { context, forceRefresh, ...options } = memoOptions\n    const v = this.get(k, options)\n    if (!forceRefresh && v !== undefined) return v\n    const vv = memoMethod(k, v, {\n      options,\n      context,\n    } as LRUCache.MemoizerOptions)\n    this.set(k, vv, options)\n    return vv\n  }\n\n  /**\n   * Return a value from the cache. Will update the recency of the cache\n   * entry found.\n   *\n   * If the key is not found, get() will return `undefined`.\n   */\n  get(k: K, getOptions: LRUCache.GetOptions = {}) {\n    const {\n      allowStale = this.allowStale,\n      updateAgeOnGet = this.updateAgeOnGet,\n      noDeleteOnStaleGet = this.noDeleteOnStaleGet,\n      status,\n    } = getOptions\n    const index = this.#keyMap.get(k)\n    if (index !== undefined) {\n      const value = this.#valList[index]\n      const fetching = this.#isBackgroundFetch(value)\n      if (status) this.#statusTTL(status, index)\n      if (this.#isStale(index)) {\n        if (status) status.get = 'stale'\n        // delete only if not an in-flight background fetch\n        if (!fetching) {\n          if (!noDeleteOnStaleGet) {\n            this.#delete(k, 'expire')\n          }\n          if (status && allowStale) status.returnedStale = true\n          return allowStale ? value : undefined\n        } else {\n          if (\n            status &&\n            allowStale &&\n            value.__staleWhileFetching !== undefined\n          ) {\n            status.returnedStale = true\n          }\n          return allowStale ? value.__staleWhileFetching : undefined\n        }\n      } else {\n        if (status) status.get = 'hit'\n        // if we're currently fetching it, we don't actually have it yet\n        // it's not stale, which means this isn't a staleWhileRefetching.\n        // If it's not stale, and fetching, AND has a __staleWhileFetching\n        // value, then that means the user fetched with {forceRefresh:true},\n        // so it's safe to return that value.\n        if (fetching) {\n          return value.__staleWhileFetching\n        }\n        this.#moveToTail(index)\n        if (updateAgeOnGet) {\n          this.#updateItemAge(index)\n        }\n        return value\n      }\n    } else if (status) {\n      status.get = 'miss'\n    }\n  }\n\n  #connect(p: Index, n: Index) {\n    this.#prev[n] = p\n    this.#next[p] = n\n  }\n\n  #moveToTail(index: Index): void {\n    // if tail already, nothing to do\n    // if head, move head to next[index]\n    // else\n    //   move next[prev[index]] to next[index] (head has no prev)\n    //   move prev[next[index]] to prev[index]\n    // prev[index] = tail\n    // next[tail] = index\n    // tail = index\n    if (index !== this.#tail) {\n      if (index === this.#head) {\n        this.#head = this.#next[index] as Index\n      } else {\n        this.#connect(\n          this.#prev[index] as Index,\n          this.#next[index] as Index\n        )\n      }\n      this.#connect(this.#tail, index)\n      this.#tail = index\n    }\n  }\n\n  /**\n   * Deletes a key out of the cache.\n   *\n   * Returns true if the key was deleted, false otherwise.\n   */\n  delete(k: K) {\n    return this.#delete(k, 'delete')\n  }\n\n  #delete(k: K, reason: LRUCache.DisposeReason) {\n    let deleted = false\n    if (this.#size !== 0) {\n      const index = this.#keyMap.get(k)\n      if (index !== undefined) {\n        deleted = true\n        if (this.#size === 1) {\n          this.#clear(reason)\n        } else {\n          this.#removeItemSize(index)\n          const v = this.#valList[index]\n          if (this.#isBackgroundFetch(v)) {\n            v.__abortController.abort(new Error('deleted'))\n          } else if (this.#hasDispose || this.#hasDisposeAfter) {\n            if (this.#hasDispose) {\n              this.#dispose?.(v as V, k, reason)\n            }\n            if (this.#hasDisposeAfter) {\n              this.#disposed?.push([v as V, k, reason])\n            }\n          }\n          this.#keyMap.delete(k)\n          this.#keyList[index] = undefined\n          this.#valList[index] = undefined\n          if (index === this.#tail) {\n            this.#tail = this.#prev[index] as Index\n          } else if (index === this.#head) {\n            this.#head = this.#next[index] as Index\n          } else {\n            const pi = this.#prev[index] as number\n            this.#next[pi] = this.#next[index] as number\n            const ni = this.#next[index] as number\n            this.#prev[ni] = this.#prev[index] as number\n          }\n          this.#size--\n          this.#free.push(index)\n        }\n      }\n    }\n    if (this.#hasDisposeAfter && this.#disposed?.length) {\n      const dt = this.#disposed\n      let task: DisposeTask | undefined\n      while ((task = dt?.shift())) {\n        this.#disposeAfter?.(...task)\n      }\n    }\n    return deleted\n  }\n\n  /**\n   * Clear the cache entirely, throwing away all values.\n   */\n  clear() {\n    return this.#clear('delete')\n  }\n  #clear(reason: LRUCache.DisposeReason) {\n    for (const index of this.#rindexes({ allowStale: true })) {\n      const v = this.#valList[index]\n      if (this.#isBackgroundFetch(v)) {\n        v.__abortController.abort(new Error('deleted'))\n      } else {\n        const k = this.#keyList[index]\n        if (this.#hasDispose) {\n          this.#dispose?.(v as V, k as K, reason)\n        }\n        if (this.#hasDisposeAfter) {\n          this.#disposed?.push([v as V, k as K, reason])\n        }\n      }\n    }\n\n    this.#keyMap.clear()\n    this.#valList.fill(undefined)\n    this.#keyList.fill(undefined)\n    if (this.#ttls && this.#starts) {\n      this.#ttls.fill(0)\n      this.#starts.fill(0)\n    }\n    if (this.#sizes) {\n      this.#sizes.fill(0)\n    }\n    this.#head = 0 as Index\n    this.#tail = 0 as Index\n    this.#free.length = 0\n    this.#calculatedSize = 0\n    this.#size = 0\n    if (this.#hasDisposeAfter && this.#disposed) {\n      const dt = this.#disposed\n      let task: DisposeTask | undefined\n      while ((task = dt?.shift())) {\n        this.#disposeAfter?.(...task)\n      }\n    }\n  }\n}\n"],
              -  "mappings": "+aAMA,IAAMA,EACJ,OAAO,aAAgB,UACvB,aACA,OAAO,YAAY,KAAQ,WACvB,YACA,KAEAC,EAAS,IAAI,IAMbC,EACJ,OAAO,SAAY,UAAc,QAAU,QAAU,CAAA,EAIjDC,EAAc,CAClBC,EACAC,EACAC,EACAC,IACE,CACF,OAAOL,EAAQ,aAAgB,WAC3BA,EAAQ,YAAYE,EAAKC,EA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U,CAAE,WAAY,EAAI,CAAE,EAAG,CACxD,IAAMyC,EAAI,KAAKhE,GAASiB,CAAK,EAC7B,GAAI,KAAKF,GAAmBiD,CAAC,EAC3BA,EAAE,kBAAkB,MAAM,IAAI,MAAM,SAAS,CAAC,MACzC,CACL,IAAMhD,EAAI,KAAKjB,GAASkB,CAAK,EACzB,KAAKP,IACP,KAAKlB,KAAWwE,EAAQhD,EAAQ7C,CAAM,EAEpC,KAAKyC,IACP,KAAKN,IAAW,KAAK,CAAC0D,EAAQhD,EAAQ7C,CAAM,CAAC,GAoBnD,GAfA,KAAK2B,GAAQ,MAAK,EAClB,KAAKE,GAAS,KAAK,MAAS,EAC5B,KAAKD,GAAS,KAAK,MAAS,EACxB,KAAKU,IAAS,KAAKD,KACrB,KAAKC,GAAM,KAAK,CAAC,EACjB,KAAKD,GAAQ,KAAK,CAAC,GAEjB,KAAKD,IACP,KAAKA,GAAO,KAAK,CAAC,EAEpB,KAAKJ,GAAQ,EACb,KAAKC,GAAQ,EACb,KAAKC,GAAM,OAAS,EACpB,KAAKR,GAAkB,EACvB,KAAKD,GAAQ,EACT,KAAKgB,IAAoB,KAAKN,GAAW,CAC3C,IAAM8E,EAAK,KAAK9E,GACZ+E,EACJ,KAAQA,EAAOD,GAAI,MAAK,GACtB,KAAK3F,KAAgB,GAAG4F,CAAI,EAGlC,GAvwDF,QAAA,SAAAhG",
              -  "names": ["perf", "warned", "PROCESS", "emitWarning", "msg", "type", "code", "fn", "AC", "AS", "_", "warnACPolyfill", "reason", "printACPolyfillWarning", "shouldWarn", "TYPE", "isPosInt", "n", "getUintArray", "max", "ZeroArray", "size", "_Stack", "HeapCls", "__privateSet", "_constructing", "s", "__privateGet", "Stack", "__privateAdd", "LRUCache", "#max", "#maxSize", "#dispose", "#disposeAfter", "#fetchMethod", "#memoMethod", "#size", "#calculatedSize", "#keyMap", "#keyList", "#valList", "#next", "#prev", "#head", "#tail", "#free", "#disposed", "#sizes", "#starts", "#ttls", "#hasDispose", "#hasFetchMethod", "#hasDisposeAfter", "c", "p", "#isBackgroundFetch", "k", "index", "options", "context", "#backgroundFetch", "#moveToTail", "#indexes", "#rindexes", "#isStale", "ttl", "ttlResolution", "ttlAutopurge", "updateAgeOnGet", "updateAgeOnHas", "allowStale", "dispose", "disposeAfter", "noDisposeOnSet", "noUpdateTTL", "maxSize", "maxEntrySize", "sizeCalculation", "fetchMethod", "memoMethod", "noDeleteOnFetchRejection", "noDeleteOnStaleGet", "allowStaleOnFetchRejection", "allowStaleOnFetchAbort", "ignoreFetchAbort", "UintArray", "#initializeSizeTracking", "#initializeTTLTracking", "key", "ttls", "starts", "#setItemTTL", "start", "t", "#delete", "#updateItemAge", "#statusTTL", "status", "cachedNow", "getNow", "age", "sizes", "#removeItemSize", "#requireSize", "v", "#addItemSize", "#evict", "_i", "_s", "_st", "_k", "_v", "i", "#isValidIndex", "getOptions", "value", "thisp", "deleted", "entry", "remain", "arr", "setOptions", "oldVal", "oldValue", "dt", "task", "val", "free", "head", "hasOptions", "peekOptions", "ac", "signal", "fetchOpts", "cb", "updateCache", "aborted", "ignoreAbort", "fetchFail", "bf", "eb", "er", "allowStaleAborted", "noDelete", "pcall", "res", "rej", "fmp", "b", "fetchOptions", "forceRefresh", "stale", "isStale", "staleVal", "memoOptions", "vv", "fetching", "#connect", "#clear", "pi", "ni"]
              -}
              diff --git a/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/package.json b/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/package.json
              deleted file mode 100644
              index 5bbefffb..00000000
              --- a/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/package.json
              +++ /dev/null
              @@ -1,3 +0,0 @@
              -{
              -  "type": "commonjs"
              -}
              diff --git a/node_modules/path-scurry/node_modules/lru-cache/dist/esm/index.d.ts b/node_modules/path-scurry/node_modules/lru-cache/dist/esm/index.d.ts
              deleted file mode 100644
              index f59de760..00000000
              --- a/node_modules/path-scurry/node_modules/lru-cache/dist/esm/index.d.ts
              +++ /dev/null
              @@ -1,1277 +0,0 @@
              -/**
              - * @module LRUCache
              - */
              -declare const TYPE: unique symbol;
              -export type PosInt = number & {
              -    [TYPE]: 'Positive Integer';
              -};
              -export type Index = number & {
              -    [TYPE]: 'LRUCache Index';
              -};
              -export type UintArray = Uint8Array | Uint16Array | Uint32Array;
              -export type NumberArray = UintArray | number[];
              -declare class ZeroArray extends Array {
              -    constructor(size: number);
              -}
              -export type { ZeroArray };
              -export type { Stack };
              -export type StackLike = Stack | Index[];
              -declare class Stack {
              -    #private;
              -    heap: NumberArray;
              -    length: number;
              -    static create(max: number): StackLike;
              -    constructor(max: number, HeapCls: {
              -        new (n: number): NumberArray;
              -    });
              -    push(n: Index): void;
              -    pop(): Index;
              -}
              -/**
              - * Promise representing an in-progress {@link LRUCache#fetch} call
              - */
              -export type BackgroundFetch = Promise & {
              -    __returned: BackgroundFetch | undefined;
              -    __abortController: AbortController;
              -    __staleWhileFetching: V | undefined;
              -};
              -export type DisposeTask = [
              -    value: V,
              -    key: K,
              -    reason: LRUCache.DisposeReason
              -];
              -export declare namespace LRUCache {
              -    /**
              -     * An integer greater than 0, reflecting the calculated size of items
              -     */
              -    type Size = number;
              -    /**
              -     * Integer greater than 0, representing some number of milliseconds, or the
              -     * time at which a TTL started counting from.
              -     */
              -    type Milliseconds = number;
              -    /**
              -     * An integer greater than 0, reflecting a number of items
              -     */
              -    type Count = number;
              -    /**
              -     * The reason why an item was removed from the cache, passed
              -     * to the {@link Disposer} methods.
              -     *
              -     * - `evict`: The item was evicted because it is the least recently used,
              -     *   and the cache is full.
              -     * - `set`: A new value was set, overwriting the old value being disposed.
              -     * - `delete`: The item was explicitly deleted, either by calling
              -     *   {@link LRUCache#delete}, {@link LRUCache#clear}, or
              -     *   {@link LRUCache#set} with an undefined value.
              -     * - `expire`: The item was removed due to exceeding its TTL.
              -     * - `fetch`: A {@link OptionsBase#fetchMethod} operation returned
              -     *   `undefined` or was aborted, causing the item to be deleted.
              -     */
              -    type DisposeReason = 'evict' | 'set' | 'delete' | 'expire' | 'fetch';
              -    /**
              -     * A method called upon item removal, passed as the
              -     * {@link OptionsBase.dispose} and/or
              -     * {@link OptionsBase.disposeAfter} options.
              -     */
              -    type Disposer = (value: V, key: K, reason: DisposeReason) => void;
              -    /**
              -     * A function that returns the effective calculated size
              -     * of an entry in the cache.
              -     */
              -    type SizeCalculator = (value: V, key: K) => Size;
              -    /**
              -     * Options provided to the
              -     * {@link OptionsBase.fetchMethod} function.
              -     */
              -    interface FetcherOptions {
              -        signal: AbortSignal;
              -        options: FetcherFetchOptions;
              -        /**
              -         * Object provided in the {@link FetchOptions.context} option to
              -         * {@link LRUCache#fetch}
              -         */
              -        context: FC;
              -    }
              -    /**
              -     * Occasionally, it may be useful to track the internal behavior of the
              -     * cache, particularly for logging, debugging, or for behavior within the
              -     * `fetchMethod`. To do this, you can pass a `status` object to the
              -     * {@link LRUCache#fetch}, {@link LRUCache#get}, {@link LRUCache#set},
              -     * {@link LRUCache#memo}, and {@link LRUCache#has} methods.
              -     *
              -     * The `status` option should be a plain JavaScript object. The following
              -     * fields will be set on it appropriately, depending on the situation.
              -     */
              -    interface Status {
              -        /**
              -         * The status of a set() operation.
              -         *
              -         * - add: the item was not found in the cache, and was added
              -         * - update: the item was in the cache, with the same value provided
              -         * - replace: the item was in the cache, and replaced
              -         * - miss: the item was not added to the cache for some reason
              -         */
              -        set?: 'add' | 'update' | 'replace' | 'miss';
              -        /**
              -         * the ttl stored for the item, or undefined if ttls are not used.
              -         */
              -        ttl?: Milliseconds;
              -        /**
              -         * the start time for the item, or undefined if ttls are not used.
              -         */
              -        start?: Milliseconds;
              -        /**
              -         * The timestamp used for TTL calculation
              -         */
              -        now?: Milliseconds;
              -        /**
              -         * the remaining ttl for the item, or undefined if ttls are not used.
              -         */
              -        remainingTTL?: Milliseconds;
              -        /**
              -         * The calculated size for the item, if sizes are used.
              -         */
              -        entrySize?: Size;
              -        /**
              -         * The total calculated size of the cache, if sizes are used.
              -         */
              -        totalCalculatedSize?: Size;
              -        /**
              -         * A flag indicating that the item was not stored, due to exceeding the
              -         * {@link OptionsBase.maxEntrySize}
              -         */
              -        maxEntrySizeExceeded?: true;
              -        /**
              -         * The old value, specified in the case of `set:'update'` or
              -         * `set:'replace'`
              -         */
              -        oldValue?: V;
              -        /**
              -         * The results of a {@link LRUCache#has} operation
              -         *
              -         * - hit: the item was found in the cache
              -         * - stale: the item was found in the cache, but is stale
              -         * - miss: the item was not found in the cache
              -         */
              -        has?: 'hit' | 'stale' | 'miss';
              -        /**
              -         * The status of a {@link LRUCache#fetch} operation.
              -         * Note that this can change as the underlying fetch() moves through
              -         * various states.
              -         *
              -         * - inflight: there is another fetch() for this key which is in process
              -         * - get: there is no {@link OptionsBase.fetchMethod}, so
              -         *   {@link LRUCache#get} was called.
              -         * - miss: the item is not in cache, and will be fetched.
              -         * - hit: the item is in the cache, and was resolved immediately.
              -         * - stale: the item is in the cache, but stale.
              -         * - refresh: the item is in the cache, and not stale, but
              -         *   {@link FetchOptions.forceRefresh} was specified.
              -         */
              -        fetch?: 'get' | 'inflight' | 'miss' | 'hit' | 'stale' | 'refresh';
              -        /**
              -         * The {@link OptionsBase.fetchMethod} was called
              -         */
              -        fetchDispatched?: true;
              -        /**
              -         * The cached value was updated after a successful call to
              -         * {@link OptionsBase.fetchMethod}
              -         */
              -        fetchUpdated?: true;
              -        /**
              -         * The reason for a fetch() rejection.  Either the error raised by the
              -         * {@link OptionsBase.fetchMethod}, or the reason for an
              -         * AbortSignal.
              -         */
              -        fetchError?: Error;
              -        /**
              -         * The fetch received an abort signal
              -         */
              -        fetchAborted?: true;
              -        /**
              -         * The abort signal received was ignored, and the fetch was allowed to
              -         * continue.
              -         */
              -        fetchAbortIgnored?: true;
              -        /**
              -         * The fetchMethod promise resolved successfully
              -         */
              -        fetchResolved?: true;
              -        /**
              -         * The fetchMethod promise was rejected
              -         */
              -        fetchRejected?: true;
              -        /**
              -         * The status of a {@link LRUCache#get} operation.
              -         *
              -         * - fetching: The item is currently being fetched.  If a previous value
              -         *   is present and allowed, that will be returned.
              -         * - stale: The item is in the cache, and is stale.
              -         * - hit: the item is in the cache
              -         * - miss: the item is not in the cache
              -         */
              -        get?: 'stale' | 'hit' | 'miss';
              -        /**
              -         * A fetch or get operation returned a stale value.
              -         */
              -        returnedStale?: true;
              -    }
              -    /**
              -     * options which override the options set in the LRUCache constructor
              -     * when calling {@link LRUCache#fetch}.
              -     *
              -     * This is the union of {@link GetOptions} and {@link SetOptions}, plus
              -     * {@link OptionsBase.noDeleteOnFetchRejection},
              -     * {@link OptionsBase.allowStaleOnFetchRejection},
              -     * {@link FetchOptions.forceRefresh}, and
              -     * {@link FetcherOptions.context}
              -     *
              -     * Any of these may be modified in the {@link OptionsBase.fetchMethod}
              -     * function, but the {@link GetOptions} fields will of course have no
              -     * effect, as the {@link LRUCache#get} call already happened by the time
              -     * the fetchMethod is called.
              -     */
              -    interface FetcherFetchOptions extends Pick, 'allowStale' | 'updateAgeOnGet' | 'noDeleteOnStaleGet' | 'sizeCalculation' | 'ttl' | 'noDisposeOnSet' | 'noUpdateTTL' | 'noDeleteOnFetchRejection' | 'allowStaleOnFetchRejection' | 'ignoreFetchAbort' | 'allowStaleOnFetchAbort'> {
              -        status?: Status;
              -        size?: Size;
              -    }
              -    /**
              -     * Options that may be passed to the {@link LRUCache#fetch} method.
              -     */
              -    interface FetchOptions extends FetcherFetchOptions {
              -        /**
              -         * Set to true to force a re-load of the existing data, even if it
              -         * is not yet stale.
              -         */
              -        forceRefresh?: boolean;
              -        /**
              -         * Context provided to the {@link OptionsBase.fetchMethod} as
              -         * the {@link FetcherOptions.context} param.
              -         *
              -         * If the FC type is specified as unknown (the default),
              -         * undefined or void, then this is optional.  Otherwise, it will
              -         * be required.
              -         */
              -        context?: FC;
              -        signal?: AbortSignal;
              -        status?: Status;
              -    }
              -    /**
              -     * Options provided to {@link LRUCache#fetch} when the FC type is something
              -     * other than `unknown`, `undefined`, or `void`
              -     */
              -    interface FetchOptionsWithContext extends FetchOptions {
              -        context: FC;
              -    }
              -    /**
              -     * Options provided to {@link LRUCache#fetch} when the FC type is
              -     * `undefined` or `void`
              -     */
              -    interface FetchOptionsNoContext extends FetchOptions {
              -        context?: undefined;
              -    }
              -    interface MemoOptions extends Pick, 'allowStale' | 'updateAgeOnGet' | 'noDeleteOnStaleGet' | 'sizeCalculation' | 'ttl' | 'noDisposeOnSet' | 'noUpdateTTL' | 'noDeleteOnFetchRejection' | 'allowStaleOnFetchRejection' | 'ignoreFetchAbort' | 'allowStaleOnFetchAbort'> {
              -        /**
              -         * Set to true to force a re-load of the existing data, even if it
              -         * is not yet stale.
              -         */
              -        forceRefresh?: boolean;
              -        /**
              -         * Context provided to the {@link OptionsBase.memoMethod} as
              -         * the {@link MemoizerOptions.context} param.
              -         *
              -         * If the FC type is specified as unknown (the default),
              -         * undefined or void, then this is optional.  Otherwise, it will
              -         * be required.
              -         */
              -        context?: FC;
              -        status?: Status;
              -    }
              -    /**
              -     * Options provided to {@link LRUCache#memo} when the FC type is something
              -     * other than `unknown`, `undefined`, or `void`
              -     */
              -    interface MemoOptionsWithContext extends MemoOptions {
              -        context: FC;
              -    }
              -    /**
              -     * Options provided to {@link LRUCache#memo} when the FC type is
              -     * `undefined` or `void`
              -     */
              -    interface MemoOptionsNoContext extends MemoOptions {
              -        context?: undefined;
              -    }
              -    /**
              -     * Options provided to the
              -     * {@link OptionsBase.memoMethod} function.
              -     */
              -    interface MemoizerOptions {
              -        options: MemoizerMemoOptions;
              -        /**
              -         * Object provided in the {@link MemoOptions.context} option to
              -         * {@link LRUCache#memo}
              -         */
              -        context: FC;
              -    }
              -    /**
              -     * options which override the options set in the LRUCache constructor
              -     * when calling {@link LRUCache#memo}.
              -     *
              -     * This is the union of {@link GetOptions} and {@link SetOptions}, plus
              -     * {@link MemoOptions.forceRefresh}, and
              -     * {@link MemoerOptions.context}
              -     *
              -     * Any of these may be modified in the {@link OptionsBase.memoMethod}
              -     * function, but the {@link GetOptions} fields will of course have no
              -     * effect, as the {@link LRUCache#get} call already happened by the time
              -     * the memoMethod is called.
              -     */
              -    interface MemoizerMemoOptions extends Pick, 'allowStale' | 'updateAgeOnGet' | 'noDeleteOnStaleGet' | 'sizeCalculation' | 'ttl' | 'noDisposeOnSet' | 'noUpdateTTL'> {
              -        status?: Status;
              -        size?: Size;
              -        start?: Milliseconds;
              -    }
              -    /**
              -     * Options that may be passed to the {@link LRUCache#has} method.
              -     */
              -    interface HasOptions extends Pick, 'updateAgeOnHas'> {
              -        status?: Status;
              -    }
              -    /**
              -     * Options that may be passed to the {@link LRUCache#get} method.
              -     */
              -    interface GetOptions extends Pick, 'allowStale' | 'updateAgeOnGet' | 'noDeleteOnStaleGet'> {
              -        status?: Status;
              -    }
              -    /**
              -     * Options that may be passed to the {@link LRUCache#peek} method.
              -     */
              -    interface PeekOptions extends Pick, 'allowStale'> {
              -    }
              -    /**
              -     * Options that may be passed to the {@link LRUCache#set} method.
              -     */
              -    interface SetOptions extends Pick, 'sizeCalculation' | 'ttl' | 'noDisposeOnSet' | 'noUpdateTTL'> {
              -        /**
              -         * If size tracking is enabled, then setting an explicit size
              -         * in the {@link LRUCache#set} call will prevent calling the
              -         * {@link OptionsBase.sizeCalculation} function.
              -         */
              -        size?: Size;
              -        /**
              -         * If TTL tracking is enabled, then setting an explicit start
              -         * time in the {@link LRUCache#set} call will override the
              -         * default time from `performance.now()` or `Date.now()`.
              -         *
              -         * Note that it must be a valid value for whichever time-tracking
              -         * method is in use.
              -         */
              -        start?: Milliseconds;
              -        status?: Status;
              -    }
              -    /**
              -     * The type signature for the {@link OptionsBase.fetchMethod} option.
              -     */
              -    type Fetcher = (key: K, staleValue: V | undefined, options: FetcherOptions) => Promise | V | undefined | void;
              -    /**
              -     * the type signature for the {@link OptionsBase.memoMethod} option.
              -     */
              -    type Memoizer = (key: K, staleValue: V | undefined, options: MemoizerOptions) => V;
              -    /**
              -     * Options which may be passed to the {@link LRUCache} constructor.
              -     *
              -     * Most of these may be overridden in the various options that use
              -     * them.
              -     *
              -     * Despite all being technically optional, the constructor requires that
              -     * a cache is at minimum limited by one or more of {@link OptionsBase.max},
              -     * {@link OptionsBase.ttl}, or {@link OptionsBase.maxSize}.
              -     *
              -     * If {@link OptionsBase.ttl} is used alone, then it is strongly advised
              -     * (and in fact required by the type definitions here) that the cache
              -     * also set {@link OptionsBase.ttlAutopurge}, to prevent potentially
              -     * unbounded storage.
              -     *
              -     * All options are also available on the {@link LRUCache} instance, making
              -     * it safe to pass an LRUCache instance as the options argumemnt to
              -     * make another empty cache of the same type.
              -     *
              -     * Some options are marked as read-only, because changing them after
              -     * instantiation is not safe. Changing any of the other options will of
              -     * course only have an effect on subsequent method calls.
              -     */
              -    interface OptionsBase {
              -        /**
              -         * The maximum number of items to store in the cache before evicting
              -         * old entries. This is read-only on the {@link LRUCache} instance,
              -         * and may not be overridden.
              -         *
              -         * If set, then storage space will be pre-allocated at construction
              -         * time, and the cache will perform significantly faster.
              -         *
              -         * Note that significantly fewer items may be stored, if
              -         * {@link OptionsBase.maxSize} and/or {@link OptionsBase.ttl} are also
              -         * set.
              -         *
              -         * **It is strongly recommended to set a `max` to prevent unbounded growth
              -         * of the cache.**
              -         */
              -        max?: Count;
              -        /**
              -         * Max time in milliseconds for items to live in cache before they are
              -         * considered stale.  Note that stale items are NOT preemptively removed by
              -         * default, and MAY live in the cache, contributing to its LRU max, long
              -         * after they have expired, unless {@link OptionsBase.ttlAutopurge} is
              -         * set.
              -         *
              -         * If set to `0` (the default value), then that means "do not track
              -         * TTL", not "expire immediately".
              -         *
              -         * Also, as this cache is optimized for LRU/MRU operations, some of
              -         * the staleness/TTL checks will reduce performance, as they will incur
              -         * overhead by deleting items.
              -         *
              -         * This is not primarily a TTL cache, and does not make strong TTL
              -         * guarantees. There is no pre-emptive pruning of expired items, but you
              -         * _may_ set a TTL on the cache, and it will treat expired items as missing
              -         * when they are fetched, and delete them.
              -         *
              -         * Optional, but must be a non-negative integer in ms if specified.
              -         *
              -         * This may be overridden by passing an options object to `cache.set()`.
              -         *
              -         * At least one of `max`, `maxSize`, or `TTL` is required. This must be a
              -         * positive integer if set.
              -         *
              -         * Even if ttl tracking is enabled, **it is strongly recommended to set a
              -         * `max` to prevent unbounded growth of the cache.**
              -         *
              -         * If ttl tracking is enabled, and `max` and `maxSize` are not set,
              -         * and `ttlAutopurge` is not set, then a warning will be emitted
              -         * cautioning about the potential for unbounded memory consumption.
              -         * (The TypeScript definitions will also discourage this.)
              -         */
              -        ttl?: Milliseconds;
              -        /**
              -         * Minimum amount of time in ms in which to check for staleness.
              -         * Defaults to 1, which means that the current time is checked
              -         * at most once per millisecond.
              -         *
              -         * Set to 0 to check the current time every time staleness is tested.
              -         * (This reduces performance, and is theoretically unnecessary.)
              -         *
              -         * Setting this to a higher value will improve performance somewhat
              -         * while using ttl tracking, albeit at the expense of keeping stale
              -         * items around a bit longer than their TTLs would indicate.
              -         *
              -         * @default 1
              -         */
              -        ttlResolution?: Milliseconds;
              -        /**
              -         * Preemptively remove stale items from the cache.
              -         *
              -         * Note that this may *significantly* degrade performance, especially if
              -         * the cache is storing a large number of items. It is almost always best
              -         * to just leave the stale items in the cache, and let them fall out as new
              -         * items are added.
              -         *
              -         * Note that this means that {@link OptionsBase.allowStale} is a bit
              -         * pointless, as stale items will be deleted almost as soon as they
              -         * expire.
              -         *
              -         * Use with caution!
              -         */
              -        ttlAutopurge?: boolean;
              -        /**
              -         * When using time-expiring entries with `ttl`, setting this to `true` will
              -         * make each item's age reset to 0 whenever it is retrieved from cache with
              -         * {@link LRUCache#get}, causing it to not expire. (It can still fall out
              -         * of cache based on recency of use, of course.)
              -         *
              -         * Has no effect if {@link OptionsBase.ttl} is not set.
              -         *
              -         * This may be overridden by passing an options object to `cache.get()`.
              -         */
              -        updateAgeOnGet?: boolean;
              -        /**
              -         * When using time-expiring entries with `ttl`, setting this to `true` will
              -         * make each item's age reset to 0 whenever its presence in the cache is
              -         * checked with {@link LRUCache#has}, causing it to not expire. (It can
              -         * still fall out of cache based on recency of use, of course.)
              -         *
              -         * Has no effect if {@link OptionsBase.ttl} is not set.
              -         */
              -        updateAgeOnHas?: boolean;
              -        /**
              -         * Allow {@link LRUCache#get} and {@link LRUCache#fetch} calls to return
              -         * stale data, if available.
              -         *
              -         * By default, if you set `ttl`, stale items will only be deleted from the
              -         * cache when you `get(key)`. That is, it's not preemptively pruning items,
              -         * unless {@link OptionsBase.ttlAutopurge} is set.
              -         *
              -         * If you set `allowStale:true`, it'll return the stale value *as well as*
              -         * deleting it. If you don't set this, then it'll return `undefined` when
              -         * you try to get a stale entry.
              -         *
              -         * Note that when a stale entry is fetched, _even if it is returned due to
              -         * `allowStale` being set_, it is removed from the cache immediately. You
              -         * can suppress this behavior by setting
              -         * {@link OptionsBase.noDeleteOnStaleGet}, either in the constructor, or in
              -         * the options provided to {@link LRUCache#get}.
              -         *
              -         * This may be overridden by passing an options object to `cache.get()`.
              -         * The `cache.has()` method will always return `false` for stale items.
              -         *
              -         * Only relevant if a ttl is set.
              -         */
              -        allowStale?: boolean;
              -        /**
              -         * Function that is called on items when they are dropped from the
              -         * cache, as `dispose(value, key, reason)`.
              -         *
              -         * This can be handy if you want to close file descriptors or do
              -         * other cleanup tasks when items are no longer stored in the cache.
              -         *
              -         * **NOTE**: It is called _before_ the item has been fully removed
              -         * from the cache, so if you want to put it right back in, you need
              -         * to wait until the next tick. If you try to add it back in during
              -         * the `dispose()` function call, it will break things in subtle and
              -         * weird ways.
              -         *
              -         * Unlike several other options, this may _not_ be overridden by
              -         * passing an option to `set()`, for performance reasons.
              -         *
              -         * The `reason` will be one of the following strings, corresponding
              -         * to the reason for the item's deletion:
              -         *
              -         * - `evict` Item was evicted to make space for a new addition
              -         * - `set` Item was overwritten by a new value
              -         * - `expire` Item expired its TTL
              -         * - `fetch` Item was deleted due to a failed or aborted fetch, or a
              -         *   fetchMethod returning `undefined.
              -         * - `delete` Item was removed by explicit `cache.delete(key)`,
              -         *   `cache.clear()`, or `cache.set(key, undefined)`.
              -         */
              -        dispose?: Disposer;
              -        /**
              -         * The same as {@link OptionsBase.dispose}, but called *after* the entry
              -         * is completely removed and the cache is once again in a clean state.
              -         *
              -         * It is safe to add an item right back into the cache at this point.
              -         * However, note that it is *very* easy to inadvertently create infinite
              -         * recursion this way.
              -         */
              -        disposeAfter?: Disposer;
              -        /**
              -         * Set to true to suppress calling the
              -         * {@link OptionsBase.dispose} function if the entry key is
              -         * still accessible within the cache.
              -         *
              -         * This may be overridden by passing an options object to
              -         * {@link LRUCache#set}.
              -         *
              -         * Only relevant if `dispose` or `disposeAfter` are set.
              -         */
              -        noDisposeOnSet?: boolean;
              -        /**
              -         * Boolean flag to tell the cache to not update the TTL when setting a new
              -         * value for an existing key (ie, when updating a value rather than
              -         * inserting a new value).  Note that the TTL value is _always_ set (if
              -         * provided) when adding a new entry into the cache.
              -         *
              -         * Has no effect if a {@link OptionsBase.ttl} is not set.
              -         *
              -         * May be passed as an option to {@link LRUCache#set}.
              -         */
              -        noUpdateTTL?: boolean;
              -        /**
              -         * Set to a positive integer to track the sizes of items added to the
              -         * cache, and automatically evict items in order to stay below this size.
              -         * Note that this may result in fewer than `max` items being stored.
              -         *
              -         * Attempting to add an item to the cache whose calculated size is greater
              -         * that this amount will be a no-op. The item will not be cached, and no
              -         * other items will be evicted.
              -         *
              -         * Optional, must be a positive integer if provided.
              -         *
              -         * Sets `maxEntrySize` to the same value, unless a different value is
              -         * provided for `maxEntrySize`.
              -         *
              -         * At least one of `max`, `maxSize`, or `TTL` is required. This must be a
              -         * positive integer if set.
              -         *
              -         * Even if size tracking is enabled, **it is strongly recommended to set a
              -         * `max` to prevent unbounded growth of the cache.**
              -         *
              -         * Note also that size tracking can negatively impact performance,
              -         * though for most cases, only minimally.
              -         */
              -        maxSize?: Size;
              -        /**
              -         * The maximum allowed size for any single item in the cache.
              -         *
              -         * If a larger item is passed to {@link LRUCache#set} or returned by a
              -         * {@link OptionsBase.fetchMethod} or {@link OptionsBase.memoMethod}, then
              -         * it will not be stored in the cache.
              -         *
              -         * Attempting to add an item whose calculated size is greater than
              -         * this amount will not cache the item or evict any old items, but
              -         * WILL delete an existing value if one is already present.
              -         *
              -         * Optional, must be a positive integer if provided. Defaults to
              -         * the value of `maxSize` if provided.
              -         */
              -        maxEntrySize?: Size;
              -        /**
              -         * A function that returns a number indicating the item's size.
              -         *
              -         * Requires {@link OptionsBase.maxSize} to be set.
              -         *
              -         * If not provided, and {@link OptionsBase.maxSize} or
              -         * {@link OptionsBase.maxEntrySize} are set, then all
              -         * {@link LRUCache#set} calls **must** provide an explicit
              -         * {@link SetOptions.size} or sizeCalculation param.
              -         */
              -        sizeCalculation?: SizeCalculator;
              -        /**
              -         * Method that provides the implementation for {@link LRUCache#fetch}
              -         *
              -         * ```ts
              -         * fetchMethod(key, staleValue, { signal, options, context })
              -         * ```
              -         *
              -         * If `fetchMethod` is not provided, then `cache.fetch(key)` is equivalent
              -         * to `Promise.resolve(cache.get(key))`.
              -         *
              -         * If at any time, `signal.aborted` is set to `true`, or if the
              -         * `signal.onabort` method is called, or if it emits an `'abort'` event
              -         * which you can listen to with `addEventListener`, then that means that
              -         * the fetch should be abandoned. This may be passed along to async
              -         * functions aware of AbortController/AbortSignal behavior.
              -         *
              -         * The `fetchMethod` should **only** return `undefined` or a Promise
              -         * resolving to `undefined` if the AbortController signaled an `abort`
              -         * event. In all other cases, it should return or resolve to a value
              -         * suitable for adding to the cache.
              -         *
              -         * The `options` object is a union of the options that may be provided to
              -         * `set()` and `get()`. If they are modified, then that will result in
              -         * modifying the settings to `cache.set()` when the value is resolved, and
              -         * in the case of
              -         * {@link OptionsBase.noDeleteOnFetchRejection} and
              -         * {@link OptionsBase.allowStaleOnFetchRejection}, the handling of
              -         * `fetchMethod` failures.
              -         *
              -         * For example, a DNS cache may update the TTL based on the value returned
              -         * from a remote DNS server by changing `options.ttl` in the `fetchMethod`.
              -         */
              -        fetchMethod?: Fetcher;
              -        /**
              -         * Method that provides the implementation for {@link LRUCache#memo}
              -         */
              -        memoMethod?: Memoizer;
              -        /**
              -         * Set to true to suppress the deletion of stale data when a
              -         * {@link OptionsBase.fetchMethod} returns a rejected promise.
              -         */
              -        noDeleteOnFetchRejection?: boolean;
              -        /**
              -         * Do not delete stale items when they are retrieved with
              -         * {@link LRUCache#get}.
              -         *
              -         * Note that the `get` return value will still be `undefined`
              -         * unless {@link OptionsBase.allowStale} is true.
              -         *
              -         * When using time-expiring entries with `ttl`, by default stale
              -         * items will be removed from the cache when the key is accessed
              -         * with `cache.get()`.
              -         *
              -         * Setting this option will cause stale items to remain in the cache, until
              -         * they are explicitly deleted with `cache.delete(key)`, or retrieved with
              -         * `noDeleteOnStaleGet` set to `false`.
              -         *
              -         * This may be overridden by passing an options object to `cache.get()`.
              -         *
              -         * Only relevant if a ttl is used.
              -         */
              -        noDeleteOnStaleGet?: boolean;
              -        /**
              -         * Set to true to allow returning stale data when a
              -         * {@link OptionsBase.fetchMethod} throws an error or returns a rejected
              -         * promise.
              -         *
              -         * This differs from using {@link OptionsBase.allowStale} in that stale
              -         * data will ONLY be returned in the case that the {@link LRUCache#fetch}
              -         * fails, not any other times.
              -         *
              -         * If a `fetchMethod` fails, and there is no stale value available, the
              -         * `fetch()` will resolve to `undefined`. Ie, all `fetchMethod` errors are
              -         * suppressed.
              -         *
              -         * Implies `noDeleteOnFetchRejection`.
              -         *
              -         * This may be set in calls to `fetch()`, or defaulted on the constructor,
              -         * or overridden by modifying the options object in the `fetchMethod`.
              -         */
              -        allowStaleOnFetchRejection?: boolean;
              -        /**
              -         * Set to true to return a stale value from the cache when the
              -         * `AbortSignal` passed to the {@link OptionsBase.fetchMethod} dispatches
              -         * an `'abort'` event, whether user-triggered, or due to internal cache
              -         * behavior.
              -         *
              -         * Unless {@link OptionsBase.ignoreFetchAbort} is also set, the underlying
              -         * {@link OptionsBase.fetchMethod} will still be considered canceled, and
              -         * any value it returns will be ignored and not cached.
              -         *
              -         * Caveat: since fetches are aborted when a new value is explicitly
              -         * set in the cache, this can lead to fetch returning a stale value,
              -         * since that was the fallback value _at the moment the `fetch()` was
              -         * initiated_, even though the new updated value is now present in
              -         * the cache.
              -         *
              -         * For example:
              -         *
              -         * ```ts
              -         * const cache = new LRUCache({
              -         *   ttl: 100,
              -         *   fetchMethod: async (url, oldValue, { signal }) =>  {
              -         *     const res = await fetch(url, { signal })
              -         *     return await res.json()
              -         *   }
              -         * })
              -         * cache.set('https://example.com/', { some: 'data' })
              -         * // 100ms go by...
              -         * const result = cache.fetch('https://example.com/')
              -         * cache.set('https://example.com/', { other: 'thing' })
              -         * console.log(await result) // { some: 'data' }
              -         * console.log(cache.get('https://example.com/')) // { other: 'thing' }
              -         * ```
              -         */
              -        allowStaleOnFetchAbort?: boolean;
              -        /**
              -         * Set to true to ignore the `abort` event emitted by the `AbortSignal`
              -         * object passed to {@link OptionsBase.fetchMethod}, and still cache the
              -         * resulting resolution value, as long as it is not `undefined`.
              -         *
              -         * When used on its own, this means aborted {@link LRUCache#fetch} calls
              -         * are not immediately resolved or rejected when they are aborted, and
              -         * instead take the full time to await.
              -         *
              -         * When used with {@link OptionsBase.allowStaleOnFetchAbort}, aborted
              -         * {@link LRUCache#fetch} calls will resolve immediately to their stale
              -         * cached value or `undefined`, and will continue to process and eventually
              -         * update the cache when they resolve, as long as the resulting value is
              -         * not `undefined`, thus supporting a "return stale on timeout while
              -         * refreshing" mechanism by passing `AbortSignal.timeout(n)` as the signal.
              -         *
              -         * For example:
              -         *
              -         * ```ts
              -         * const c = new LRUCache({
              -         *   ttl: 100,
              -         *   ignoreFetchAbort: true,
              -         *   allowStaleOnFetchAbort: true,
              -         *   fetchMethod: async (key, oldValue, { signal }) => {
              -         *     // note: do NOT pass the signal to fetch()!
              -         *     // let's say this fetch can take a long time.
              -         *     const res = await fetch(`https://slow-backend-server/${key}`)
              -         *     return await res.json()
              -         *   },
              -         * })
              -         *
              -         * // this will return the stale value after 100ms, while still
              -         * // updating in the background for next time.
              -         * const val = await c.fetch('key', { signal: AbortSignal.timeout(100) })
              -         * ```
              -         *
              -         * **Note**: regardless of this setting, an `abort` event _is still
              -         * emitted on the `AbortSignal` object_, so may result in invalid results
              -         * when passed to other underlying APIs that use AbortSignals.
              -         *
              -         * This may be overridden in the {@link OptionsBase.fetchMethod} or the
              -         * call to {@link LRUCache#fetch}.
              -         */
              -        ignoreFetchAbort?: boolean;
              -    }
              -    interface OptionsMaxLimit extends OptionsBase {
              -        max: Count;
              -    }
              -    interface OptionsTTLLimit extends OptionsBase {
              -        ttl: Milliseconds;
              -        ttlAutopurge: boolean;
              -    }
              -    interface OptionsSizeLimit extends OptionsBase {
              -        maxSize: Size;
              -    }
              -    /**
              -     * The valid safe options for the {@link LRUCache} constructor
              -     */
              -    type Options = OptionsMaxLimit | OptionsSizeLimit | OptionsTTLLimit;
              -    /**
              -     * Entry objects used by {@link LRUCache#load} and {@link LRUCache#dump},
              -     * and returned by {@link LRUCache#info}.
              -     */
              -    interface Entry {
              -        value: V;
              -        ttl?: Milliseconds;
              -        size?: Size;
              -        start?: Milliseconds;
              -    }
              -}
              -/**
              - * Default export, the thing you're using this module to get.
              - *
              - * The `K` and `V` types define the key and value types, respectively. The
              - * optional `FC` type defines the type of the `context` object passed to
              - * `cache.fetch()` and `cache.memo()`.
              - *
              - * Keys and values **must not** be `null` or `undefined`.
              - *
              - * All properties from the options object (with the exception of `max`,
              - * `maxSize`, `fetchMethod`, `memoMethod`, `dispose` and `disposeAfter`) are
              - * added as normal public members. (The listed options are read-only getters.)
              - *
              - * Changing any of these will alter the defaults for subsequent method calls.
              - */
              -export declare class LRUCache implements Map {
              -    #private;
              -    /**
              -     * {@link LRUCache.OptionsBase.ttl}
              -     */
              -    ttl: LRUCache.Milliseconds;
              -    /**
              -     * {@link LRUCache.OptionsBase.ttlResolution}
              -     */
              -    ttlResolution: LRUCache.Milliseconds;
              -    /**
              -     * {@link LRUCache.OptionsBase.ttlAutopurge}
              -     */
              -    ttlAutopurge: boolean;
              -    /**
              -     * {@link LRUCache.OptionsBase.updateAgeOnGet}
              -     */
              -    updateAgeOnGet: boolean;
              -    /**
              -     * {@link LRUCache.OptionsBase.updateAgeOnHas}
              -     */
              -    updateAgeOnHas: boolean;
              -    /**
              -     * {@link LRUCache.OptionsBase.allowStale}
              -     */
              -    allowStale: boolean;
              -    /**
              -     * {@link LRUCache.OptionsBase.noDisposeOnSet}
              -     */
              -    noDisposeOnSet: boolean;
              -    /**
              -     * {@link LRUCache.OptionsBase.noUpdateTTL}
              -     */
              -    noUpdateTTL: boolean;
              -    /**
              -     * {@link LRUCache.OptionsBase.maxEntrySize}
              -     */
              -    maxEntrySize: LRUCache.Size;
              -    /**
              -     * {@link LRUCache.OptionsBase.sizeCalculation}
              -     */
              -    sizeCalculation?: LRUCache.SizeCalculator;
              -    /**
              -     * {@link LRUCache.OptionsBase.noDeleteOnFetchRejection}
              -     */
              -    noDeleteOnFetchRejection: boolean;
              -    /**
              -     * {@link LRUCache.OptionsBase.noDeleteOnStaleGet}
              -     */
              -    noDeleteOnStaleGet: boolean;
              -    /**
              -     * {@link LRUCache.OptionsBase.allowStaleOnFetchAbort}
              -     */
              -    allowStaleOnFetchAbort: boolean;
              -    /**
              -     * {@link LRUCache.OptionsBase.allowStaleOnFetchRejection}
              -     */
              -    allowStaleOnFetchRejection: boolean;
              -    /**
              -     * {@link LRUCache.OptionsBase.ignoreFetchAbort}
              -     */
              -    ignoreFetchAbort: boolean;
              -    /**
              -     * Do not call this method unless you need to inspect the
              -     * inner workings of the cache.  If anything returned by this
              -     * object is modified in any way, strange breakage may occur.
              -     *
              -     * These fields are private for a reason!
              -     *
              -     * @internal
              -     */
              -    static unsafeExposeInternals(c: LRUCache): {
              -        starts: ZeroArray | undefined;
              -        ttls: ZeroArray | undefined;
              -        sizes: ZeroArray | undefined;
              -        keyMap: Map;
              -        keyList: (K | undefined)[];
              -        valList: (V | BackgroundFetch | undefined)[];
              -        next: NumberArray;
              -        prev: NumberArray;
              -        readonly head: Index;
              -        readonly tail: Index;
              -        free: StackLike;
              -        isBackgroundFetch: (p: any) => boolean;
              -        backgroundFetch: (k: K, index: number | undefined, options: LRUCache.FetchOptions, context: any) => BackgroundFetch;
              -        moveToTail: (index: number) => void;
              -        indexes: (options?: {
              -            allowStale: boolean;
              -        }) => Generator;
              -        rindexes: (options?: {
              -            allowStale: boolean;
              -        }) => Generator;
              -        isStale: (index: number | undefined) => boolean;
              -    };
              -    /**
              -     * {@link LRUCache.OptionsBase.max} (read-only)
              -     */
              -    get max(): LRUCache.Count;
              -    /**
              -     * {@link LRUCache.OptionsBase.maxSize} (read-only)
              -     */
              -    get maxSize(): LRUCache.Count;
              -    /**
              -     * The total computed size of items in the cache (read-only)
              -     */
              -    get calculatedSize(): LRUCache.Size;
              -    /**
              -     * The number of items stored in the cache (read-only)
              -     */
              -    get size(): LRUCache.Count;
              -    /**
              -     * {@link LRUCache.OptionsBase.fetchMethod} (read-only)
              -     */
              -    get fetchMethod(): LRUCache.Fetcher | undefined;
              -    get memoMethod(): LRUCache.Memoizer | undefined;
              -    /**
              -     * {@link LRUCache.OptionsBase.dispose} (read-only)
              -     */
              -    get dispose(): LRUCache.Disposer | undefined;
              -    /**
              -     * {@link LRUCache.OptionsBase.disposeAfter} (read-only)
              -     */
              -    get disposeAfter(): LRUCache.Disposer | undefined;
              -    constructor(options: LRUCache.Options | LRUCache);
              -    /**
              -     * Return the number of ms left in the item's TTL. If item is not in cache,
              -     * returns `0`. Returns `Infinity` if item is in cache without a defined TTL.
              -     */
              -    getRemainingTTL(key: K): number;
              -    /**
              -     * Return a generator yielding `[key, value]` pairs,
              -     * in order from most recently used to least recently used.
              -     */
              -    entries(): Generator<[K, V], void, unknown>;
              -    /**
              -     * Inverse order version of {@link LRUCache.entries}
              -     *
              -     * Return a generator yielding `[key, value]` pairs,
              -     * in order from least recently used to most recently used.
              -     */
              -    rentries(): Generator<(K | V | BackgroundFetch | undefined)[], void, unknown>;
              -    /**
              -     * Return a generator yielding the keys in the cache,
              -     * in order from most recently used to least recently used.
              -     */
              -    keys(): Generator;
              -    /**
              -     * Inverse order version of {@link LRUCache.keys}
              -     *
              -     * Return a generator yielding the keys in the cache,
              -     * in order from least recently used to most recently used.
              -     */
              -    rkeys(): Generator;
              -    /**
              -     * Return a generator yielding the values in the cache,
              -     * in order from most recently used to least recently used.
              -     */
              -    values(): Generator;
              -    /**
              -     * Inverse order version of {@link LRUCache.values}
              -     *
              -     * Return a generator yielding the values in the cache,
              -     * in order from least recently used to most recently used.
              -     */
              -    rvalues(): Generator | undefined, void, unknown>;
              -    /**
              -     * Iterating over the cache itself yields the same results as
              -     * {@link LRUCache.entries}
              -     */
              -    [Symbol.iterator](): Generator<[K, V], void, unknown>;
              -    /**
              -     * A String value that is used in the creation of the default string
              -     * description of an object. Called by the built-in method
              -     * `Object.prototype.toString`.
              -     */
              -    [Symbol.toStringTag]: string;
              -    /**
              -     * Find a value for which the supplied fn method returns a truthy value,
              -     * similar to `Array.find()`. fn is called as `fn(value, key, cache)`.
              -     */
              -    find(fn: (v: V, k: K, self: LRUCache) => boolean, getOptions?: LRUCache.GetOptions): V | undefined;
              -    /**
              -     * Call the supplied function on each item in the cache, in order from most
              -     * recently used to least recently used.
              -     *
              -     * `fn` is called as `fn(value, key, cache)`.
              -     *
              -     * If `thisp` is provided, function will be called in the `this`-context of
              -     * the provided object, or the cache if no `thisp` object is provided.
              -     *
              -     * Does not update age or recenty of use, or iterate over stale values.
              -     */
              -    forEach(fn: (v: V, k: K, self: LRUCache) => any, thisp?: any): void;
              -    /**
              -     * The same as {@link LRUCache.forEach} but items are iterated over in
              -     * reverse order.  (ie, less recently used items are iterated over first.)
              -     */
              -    rforEach(fn: (v: V, k: K, self: LRUCache) => any, thisp?: any): void;
              -    /**
              -     * Delete any stale entries. Returns true if anything was removed,
              -     * false otherwise.
              -     */
              -    purgeStale(): boolean;
              -    /**
              -     * Get the extended info about a given entry, to get its value, size, and
              -     * TTL info simultaneously. Returns `undefined` if the key is not present.
              -     *
              -     * Unlike {@link LRUCache#dump}, which is designed to be portable and survive
              -     * serialization, the `start` value is always the current timestamp, and the
              -     * `ttl` is a calculated remaining time to live (negative if expired).
              -     *
              -     * Always returns stale values, if their info is found in the cache, so be
              -     * sure to check for expirations (ie, a negative {@link LRUCache.Entry#ttl})
              -     * if relevant.
              -     */
              -    info(key: K): LRUCache.Entry | undefined;
              -    /**
              -     * Return an array of [key, {@link LRUCache.Entry}] tuples which can be
              -     * passed to {@link LRLUCache#load}.
              -     *
              -     * The `start` fields are calculated relative to a portable `Date.now()`
              -     * timestamp, even if `performance.now()` is available.
              -     *
              -     * Stale entries are always included in the `dump`, even if
              -     * {@link LRUCache.OptionsBase.allowStale} is false.
              -     *
              -     * Note: this returns an actual array, not a generator, so it can be more
              -     * easily passed around.
              -     */
              -    dump(): [K, LRUCache.Entry][];
              -    /**
              -     * Reset the cache and load in the items in entries in the order listed.
              -     *
              -     * The shape of the resulting cache may be different if the same options are
              -     * not used in both caches.
              -     *
              -     * The `start` fields are assumed to be calculated relative to a portable
              -     * `Date.now()` timestamp, even if `performance.now()` is available.
              -     */
              -    load(arr: [K, LRUCache.Entry][]): void;
              -    /**
              -     * Add a value to the cache.
              -     *
              -     * Note: if `undefined` is specified as a value, this is an alias for
              -     * {@link LRUCache#delete}
              -     *
              -     * Fields on the {@link LRUCache.SetOptions} options param will override
              -     * their corresponding values in the constructor options for the scope
              -     * of this single `set()` operation.
              -     *
              -     * If `start` is provided, then that will set the effective start
              -     * time for the TTL calculation. Note that this must be a previous
              -     * value of `performance.now()` if supported, or a previous value of
              -     * `Date.now()` if not.
              -     *
              -     * Options object may also include `size`, which will prevent
              -     * calling the `sizeCalculation` function and just use the specified
              -     * number if it is a positive integer, and `noDisposeOnSet` which
              -     * will prevent calling a `dispose` function in the case of
              -     * overwrites.
              -     *
              -     * If the `size` (or return value of `sizeCalculation`) for a given
              -     * entry is greater than `maxEntrySize`, then the item will not be
              -     * added to the cache.
              -     *
              -     * Will update the recency of the entry.
              -     *
              -     * If the value is `undefined`, then this is an alias for
              -     * `cache.delete(key)`. `undefined` is never stored in the cache.
              -     */
              -    set(k: K, v: V | BackgroundFetch | undefined, setOptions?: LRUCache.SetOptions): this;
              -    /**
              -     * Evict the least recently used item, returning its value or
              -     * `undefined` if cache is empty.
              -     */
              -    pop(): V | undefined;
              -    /**
              -     * Check if a key is in the cache, without updating the recency of use.
              -     * Will return false if the item is stale, even though it is technically
              -     * in the cache.
              -     *
              -     * Check if a key is in the cache, without updating the recency of
              -     * use. Age is updated if {@link LRUCache.OptionsBase.updateAgeOnHas} is set
              -     * to `true` in either the options or the constructor.
              -     *
              -     * Will return `false` if the item is stale, even though it is technically in
              -     * the cache. The difference can be determined (if it matters) by using a
              -     * `status` argument, and inspecting the `has` field.
              -     *
              -     * Will not update item age unless
              -     * {@link LRUCache.OptionsBase.updateAgeOnHas} is set.
              -     */
              -    has(k: K, hasOptions?: LRUCache.HasOptions): boolean;
              -    /**
              -     * Like {@link LRUCache#get} but doesn't update recency or delete stale
              -     * items.
              -     *
              -     * Returns `undefined` if the item is stale, unless
              -     * {@link LRUCache.OptionsBase.allowStale} is set.
              -     */
              -    peek(k: K, peekOptions?: LRUCache.PeekOptions): V | undefined;
              -    /**
              -     * Make an asynchronous cached fetch using the
              -     * {@link LRUCache.OptionsBase.fetchMethod} function.
              -     *
              -     * If the value is in the cache and not stale, then the returned
              -     * Promise resolves to the value.
              -     *
              -     * If not in the cache, or beyond its TTL staleness, then
              -     * `fetchMethod(key, staleValue, { options, signal, context })` is
              -     * called, and the value returned will be added to the cache once
              -     * resolved.
              -     *
              -     * If called with `allowStale`, and an asynchronous fetch is
              -     * currently in progress to reload a stale value, then the former
              -     * stale value will be returned.
              -     *
              -     * If called with `forceRefresh`, then the cached item will be
              -     * re-fetched, even if it is not stale. However, if `allowStale` is also
              -     * set, then the old value will still be returned. This is useful
              -     * in cases where you want to force a reload of a cached value. If
              -     * a background fetch is already in progress, then `forceRefresh`
              -     * has no effect.
              -     *
              -     * If multiple fetches for the same key are issued, then they will all be
              -     * coalesced into a single call to fetchMethod.
              -     *
              -     * Note that this means that handling options such as
              -     * {@link LRUCache.OptionsBase.allowStaleOnFetchAbort},
              -     * {@link LRUCache.FetchOptions.signal},
              -     * and {@link LRUCache.OptionsBase.allowStaleOnFetchRejection} will be
              -     * determined by the FIRST fetch() call for a given key.
              -     *
              -     * This is a known (fixable) shortcoming which will be addresed on when
              -     * someone complains about it, as the fix would involve added complexity and
              -     * may not be worth the costs for this edge case.
              -     *
              -     * If {@link LRUCache.OptionsBase.fetchMethod} is not specified, then this is
              -     * effectively an alias for `Promise.resolve(cache.get(key))`.
              -     *
              -     * When the fetch method resolves to a value, if the fetch has not
              -     * been aborted due to deletion, eviction, or being overwritten,
              -     * then it is added to the cache using the options provided.
              -     *
              -     * If the key is evicted or deleted before the `fetchMethod`
              -     * resolves, then the AbortSignal passed to the `fetchMethod` will
              -     * receive an `abort` event, and the promise returned by `fetch()`
              -     * will reject with the reason for the abort.
              -     *
              -     * If a `signal` is passed to the `fetch()` call, then aborting the
              -     * signal will abort the fetch and cause the `fetch()` promise to
              -     * reject with the reason provided.
              -     *
              -     * **Setting `context`**
              -     *
              -     * If an `FC` type is set to a type other than `unknown`, `void`, or
              -     * `undefined` in the {@link LRUCache} constructor, then all
              -     * calls to `cache.fetch()` _must_ provide a `context` option. If
              -     * set to `undefined` or `void`, then calls to fetch _must not_
              -     * provide a `context` option.
              -     *
              -     * The `context` param allows you to provide arbitrary data that
              -     * might be relevant in the course of fetching the data. It is only
              -     * relevant for the course of a single `fetch()` operation, and
              -     * discarded afterwards.
              -     *
              -     * **Note: `fetch()` calls are inflight-unique**
              -     *
              -     * If you call `fetch()` multiple times with the same key value,
              -     * then every call after the first will resolve on the same
              -     * promise1,
              -     * _even if they have different settings that would otherwise change
              -     * the behavior of the fetch_, such as `noDeleteOnFetchRejection`
              -     * or `ignoreFetchAbort`.
              -     *
              -     * In most cases, this is not a problem (in fact, only fetching
              -     * something once is what you probably want, if you're caching in
              -     * the first place). If you are changing the fetch() options
              -     * dramatically between runs, there's a good chance that you might
              -     * be trying to fit divergent semantics into a single object, and
              -     * would be better off with multiple cache instances.
              -     *
              -     * **1**: Ie, they're not the "same Promise", but they resolve at
              -     * the same time, because they're both waiting on the same
              -     * underlying fetchMethod response.
              -     */
              -    fetch(k: K, fetchOptions: unknown extends FC ? LRUCache.FetchOptions : FC extends undefined | void ? LRUCache.FetchOptionsNoContext : LRUCache.FetchOptionsWithContext): Promise;
              -    fetch(k: unknown extends FC ? K : FC extends undefined | void ? K : never, fetchOptions?: unknown extends FC ? LRUCache.FetchOptions : FC extends undefined | void ? LRUCache.FetchOptionsNoContext : never): Promise;
              -    /**
              -     * In some cases, `cache.fetch()` may resolve to `undefined`, either because
              -     * a {@link LRUCache.OptionsBase#fetchMethod} was not provided (turning
              -     * `cache.fetch(k)` into just an async wrapper around `cache.get(k)`) or
              -     * because `ignoreFetchAbort` was specified (either to the constructor or
              -     * in the {@link LRUCache.FetchOptions}). Also, the
              -     * {@link OptionsBase.fetchMethod} may return `undefined` or `void`, making
              -     * the test even more complicated.
              -     *
              -     * Because inferring the cases where `undefined` might be returned are so
              -     * cumbersome, but testing for `undefined` can also be annoying, this method
              -     * can be used, which will reject if `this.fetch()` resolves to undefined.
              -     */
              -    forceFetch(k: K, fetchOptions: unknown extends FC ? LRUCache.FetchOptions : FC extends undefined | void ? LRUCache.FetchOptionsNoContext : LRUCache.FetchOptionsWithContext): Promise;
              -    forceFetch(k: unknown extends FC ? K : FC extends undefined | void ? K : never, fetchOptions?: unknown extends FC ? LRUCache.FetchOptions : FC extends undefined | void ? LRUCache.FetchOptionsNoContext : never): Promise;
              -    /**
              -     * If the key is found in the cache, then this is equivalent to
              -     * {@link LRUCache#get}. If not, in the cache, then calculate the value using
              -     * the {@link LRUCache.OptionsBase.memoMethod}, and add it to the cache.
              -     *
              -     * If an `FC` type is set to a type other than `unknown`, `void`, or
              -     * `undefined` in the LRUCache constructor, then all calls to `cache.memo()`
              -     * _must_ provide a `context` option. If set to `undefined` or `void`, then
              -     * calls to memo _must not_ provide a `context` option.
              -     *
              -     * The `context` param allows you to provide arbitrary data that might be
              -     * relevant in the course of fetching the data. It is only relevant for the
              -     * course of a single `memo()` operation, and discarded afterwards.
              -     */
              -    memo(k: K, memoOptions: unknown extends FC ? LRUCache.MemoOptions : FC extends undefined | void ? LRUCache.MemoOptionsNoContext : LRUCache.MemoOptionsWithContext): V;
              -    memo(k: unknown extends FC ? K : FC extends undefined | void ? K : never, memoOptions?: unknown extends FC ? LRUCache.MemoOptions : FC extends undefined | void ? LRUCache.MemoOptionsNoContext : never): V;
              -    /**
              -     * Return a value from the cache. Will update the recency of the cache
              -     * entry found.
              -     *
              -     * If the key is not found, get() will return `undefined`.
              -     */
              -    get(k: K, getOptions?: LRUCache.GetOptions): V | undefined;
              -    /**
              -     * Deletes a key out of the cache.
              -     *
              -     * Returns true if the key was deleted, false otherwise.
              -     */
              -    delete(k: K): boolean;
              -    /**
              -     * Clear the cache entirely, throwing away all values.
              -     */
              -    clear(): void;
              -}
              -//# sourceMappingURL=index.d.ts.map
              \ No newline at end of file
              diff --git a/node_modules/path-scurry/node_modules/lru-cache/dist/esm/index.d.ts.map b/node_modules/path-scurry/node_modules/lru-cache/dist/esm/index.d.ts.map
              deleted file mode 100644
              index 34d60c50..00000000
              --- a/node_modules/path-scurry/node_modules/lru-cache/dist/esm/index.d.ts.map
              +++ /dev/null
              @@ -1 +0,0 @@
              -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AA0FH,QAAA,MAAM,IAAI,eAAiB,CAAA;AAC3B,MAAM,MAAM,MAAM,GAAG,MAAM,GAAG;IAAE,CAAC,IAAI,CAAC,EAAE,kBAAkB,CAAA;CAAE,CAAA;AAC5D,MAAM,MAAM,KAAK,GAAG,MAAM,GAAG;IAAE,CAAC,IAAI,CAAC,EAAE,gBAAgB,CAAA;CAAE,CAAA;AAKzD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,CAAC,EAAE,CAAC;IAqDX;;OAEG;IACH,KAAK;CA0CN"}
              \ No newline at end of file
              diff --git a/node_modules/path-scurry/node_modules/lru-cache/dist/esm/index.js b/node_modules/path-scurry/node_modules/lru-cache/dist/esm/index.js
              deleted file mode 100644
              index 555654a5..00000000
              --- a/node_modules/path-scurry/node_modules/lru-cache/dist/esm/index.js
              +++ /dev/null
              @@ -1,1542 +0,0 @@
              -/**
              - * @module LRUCache
              - */
              -const perf = typeof performance === 'object' &&
              -    performance &&
              -    typeof performance.now === 'function'
              -    ? performance
              -    : Date;
              -const warned = new Set();
              -/* c8 ignore start */
              -const PROCESS = (typeof process === 'object' && !!process ? process : {});
              -/* c8 ignore start */
              -const emitWarning = (msg, type, code, fn) => {
              -    typeof PROCESS.emitWarning === 'function'
              -        ? PROCESS.emitWarning(msg, type, code, fn)
              -        : console.error(`[${code}] ${type}: ${msg}`);
              -};
              -let AC = globalThis.AbortController;
              -let AS = globalThis.AbortSignal;
              -/* c8 ignore start */
              -if (typeof AC === 'undefined') {
              -    //@ts-ignore
              -    AS = class AbortSignal {
              -        onabort;
              -        _onabort = [];
              -        reason;
              -        aborted = false;
              -        addEventListener(_, fn) {
              -            this._onabort.push(fn);
              -        }
              -    };
              -    //@ts-ignore
              -    AC = class AbortController {
              -        constructor() {
              -            warnACPolyfill();
              -        }
              -        signal = new AS();
              -        abort(reason) {
              -            if (this.signal.aborted)
              -                return;
              -            //@ts-ignore
              -            this.signal.reason = reason;
              -            //@ts-ignore
              -            this.signal.aborted = true;
              -            //@ts-ignore
              -            for (const fn of this.signal._onabort) {
              -                fn(reason);
              -            }
              -            this.signal.onabort?.(reason);
              -        }
              -    };
              -    let printACPolyfillWarning = PROCESS.env?.LRU_CACHE_IGNORE_AC_WARNING !== '1';
              -    const warnACPolyfill = () => {
              -        if (!printACPolyfillWarning)
              -            return;
              -        printACPolyfillWarning = false;
              -        emitWarning('AbortController is not defined. If using lru-cache in ' +
              -            'node 14, load an AbortController polyfill from the ' +
              -            '`node-abort-controller` package. A minimal polyfill is ' +
              -            'provided for use by LRUCache.fetch(), but it should not be ' +
              -            'relied upon in other contexts (eg, passing it to other APIs that ' +
              -            'use AbortController/AbortSignal might have undesirable effects). ' +
              -            'You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.', 'NO_ABORT_CONTROLLER', 'ENOTSUP', warnACPolyfill);
              -    };
              -}
              -/* c8 ignore stop */
              -const shouldWarn = (code) => !warned.has(code);
              -const TYPE = Symbol('type');
              -const isPosInt = (n) => n && n === Math.floor(n) && n > 0 && isFinite(n);
              -/* c8 ignore start */
              -// This is a little bit ridiculous, tbh.
              -// The maximum array length is 2^32-1 or thereabouts on most JS impls.
              -// And well before that point, you're caching the entire world, I mean,
              -// that's ~32GB of just integers for the next/prev links, plus whatever
              -// else to hold that many keys and values.  Just filling the memory with
              -// zeroes at init time is brutal when you get that big.
              -// But why not be complete?
              -// Maybe in the future, these limits will have expanded.
              -const getUintArray = (max) => !isPosInt(max)
              -    ? null
              -    : max <= Math.pow(2, 8)
              -        ? Uint8Array
              -        : max <= Math.pow(2, 16)
              -            ? Uint16Array
              -            : max <= Math.pow(2, 32)
              -                ? Uint32Array
              -                : max <= Number.MAX_SAFE_INTEGER
              -                    ? ZeroArray
              -                    : null;
              -/* c8 ignore stop */
              -class ZeroArray extends Array {
              -    constructor(size) {
              -        super(size);
              -        this.fill(0);
              -    }
              -}
              -class Stack {
              -    heap;
              -    length;
              -    // private constructor
              -    static #constructing = false;
              -    static create(max) {
              -        const HeapCls = getUintArray(max);
              -        if (!HeapCls)
              -            return [];
              -        Stack.#constructing = true;
              -        const s = new Stack(max, HeapCls);
              -        Stack.#constructing = false;
              -        return s;
              -    }
              -    constructor(max, HeapCls) {
              -        /* c8 ignore start */
              -        if (!Stack.#constructing) {
              -            throw new TypeError('instantiate Stack using Stack.create(n)');
              -        }
              -        /* c8 ignore stop */
              -        this.heap = new HeapCls(max);
              -        this.length = 0;
              -    }
              -    push(n) {
              -        this.heap[this.length++] = n;
              -    }
              -    pop() {
              -        return this.heap[--this.length];
              -    }
              -}
              -/**
              - * Default export, the thing you're using this module to get.
              - *
              - * The `K` and `V` types define the key and value types, respectively. The
              - * optional `FC` type defines the type of the `context` object passed to
              - * `cache.fetch()` and `cache.memo()`.
              - *
              - * Keys and values **must not** be `null` or `undefined`.
              - *
              - * All properties from the options object (with the exception of `max`,
              - * `maxSize`, `fetchMethod`, `memoMethod`, `dispose` and `disposeAfter`) are
              - * added as normal public members. (The listed options are read-only getters.)
              - *
              - * Changing any of these will alter the defaults for subsequent method calls.
              - */
              -export class LRUCache {
              -    // options that cannot be changed without disaster
              -    #max;
              -    #maxSize;
              -    #dispose;
              -    #disposeAfter;
              -    #fetchMethod;
              -    #memoMethod;
              -    /**
              -     * {@link LRUCache.OptionsBase.ttl}
              -     */
              -    ttl;
              -    /**
              -     * {@link LRUCache.OptionsBase.ttlResolution}
              -     */
              -    ttlResolution;
              -    /**
              -     * {@link LRUCache.OptionsBase.ttlAutopurge}
              -     */
              -    ttlAutopurge;
              -    /**
              -     * {@link LRUCache.OptionsBase.updateAgeOnGet}
              -     */
              -    updateAgeOnGet;
              -    /**
              -     * {@link LRUCache.OptionsBase.updateAgeOnHas}
              -     */
              -    updateAgeOnHas;
              -    /**
              -     * {@link LRUCache.OptionsBase.allowStale}
              -     */
              -    allowStale;
              -    /**
              -     * {@link LRUCache.OptionsBase.noDisposeOnSet}
              -     */
              -    noDisposeOnSet;
              -    /**
              -     * {@link LRUCache.OptionsBase.noUpdateTTL}
              -     */
              -    noUpdateTTL;
              -    /**
              -     * {@link LRUCache.OptionsBase.maxEntrySize}
              -     */
              -    maxEntrySize;
              -    /**
              -     * {@link LRUCache.OptionsBase.sizeCalculation}
              -     */
              -    sizeCalculation;
              -    /**
              -     * {@link LRUCache.OptionsBase.noDeleteOnFetchRejection}
              -     */
              -    noDeleteOnFetchRejection;
              -    /**
              -     * {@link LRUCache.OptionsBase.noDeleteOnStaleGet}
              -     */
              -    noDeleteOnStaleGet;
              -    /**
              -     * {@link LRUCache.OptionsBase.allowStaleOnFetchAbort}
              -     */
              -    allowStaleOnFetchAbort;
              -    /**
              -     * {@link LRUCache.OptionsBase.allowStaleOnFetchRejection}
              -     */
              -    allowStaleOnFetchRejection;
              -    /**
              -     * {@link LRUCache.OptionsBase.ignoreFetchAbort}
              -     */
              -    ignoreFetchAbort;
              -    // computed properties
              -    #size;
              -    #calculatedSize;
              -    #keyMap;
              -    #keyList;
              -    #valList;
              -    #next;
              -    #prev;
              -    #head;
              -    #tail;
              -    #free;
              -    #disposed;
              -    #sizes;
              -    #starts;
              -    #ttls;
              -    #hasDispose;
              -    #hasFetchMethod;
              -    #hasDisposeAfter;
              -    /**
              -     * Do not call this method unless you need to inspect the
              -     * inner workings of the cache.  If anything returned by this
              -     * object is modified in any way, strange breakage may occur.
              -     *
              -     * These fields are private for a reason!
              -     *
              -     * @internal
              -     */
              -    static unsafeExposeInternals(c) {
              -        return {
              -            // properties
              -            starts: c.#starts,
              -            ttls: c.#ttls,
              -            sizes: c.#sizes,
              -            keyMap: c.#keyMap,
              -            keyList: c.#keyList,
              -            valList: c.#valList,
              -            next: c.#next,
              -            prev: c.#prev,
              -            get head() {
              -                return c.#head;
              -            },
              -            get tail() {
              -                return c.#tail;
              -            },
              -            free: c.#free,
              -            // methods
              -            isBackgroundFetch: (p) => c.#isBackgroundFetch(p),
              -            backgroundFetch: (k, index, options, context) => c.#backgroundFetch(k, index, options, context),
              -            moveToTail: (index) => c.#moveToTail(index),
              -            indexes: (options) => c.#indexes(options),
              -            rindexes: (options) => c.#rindexes(options),
              -            isStale: (index) => c.#isStale(index),
              -        };
              -    }
              -    // Protected read-only members
              -    /**
              -     * {@link LRUCache.OptionsBase.max} (read-only)
              -     */
              -    get max() {
              -        return this.#max;
              -    }
              -    /**
              -     * {@link LRUCache.OptionsBase.maxSize} (read-only)
              -     */
              -    get maxSize() {
              -        return this.#maxSize;
              -    }
              -    /**
              -     * The total computed size of items in the cache (read-only)
              -     */
              -    get calculatedSize() {
              -        return this.#calculatedSize;
              -    }
              -    /**
              -     * The number of items stored in the cache (read-only)
              -     */
              -    get size() {
              -        return this.#size;
              -    }
              -    /**
              -     * {@link LRUCache.OptionsBase.fetchMethod} (read-only)
              -     */
              -    get fetchMethod() {
              -        return this.#fetchMethod;
              -    }
              -    get memoMethod() {
              -        return this.#memoMethod;
              -    }
              -    /**
              -     * {@link LRUCache.OptionsBase.dispose} (read-only)
              -     */
              -    get dispose() {
              -        return this.#dispose;
              -    }
              -    /**
              -     * {@link LRUCache.OptionsBase.disposeAfter} (read-only)
              -     */
              -    get disposeAfter() {
              -        return this.#disposeAfter;
              -    }
              -    constructor(options) {
              -        const { max = 0, ttl, ttlResolution = 1, ttlAutopurge, updateAgeOnGet, updateAgeOnHas, allowStale, dispose, disposeAfter, noDisposeOnSet, noUpdateTTL, maxSize = 0, maxEntrySize = 0, sizeCalculation, fetchMethod, memoMethod, noDeleteOnFetchRejection, noDeleteOnStaleGet, allowStaleOnFetchRejection, allowStaleOnFetchAbort, ignoreFetchAbort, } = options;
              -        if (max !== 0 && !isPosInt(max)) {
              -            throw new TypeError('max option must be a nonnegative integer');
              -        }
              -        const UintArray = max ? getUintArray(max) : Array;
              -        if (!UintArray) {
              -            throw new Error('invalid max value: ' + max);
              -        }
              -        this.#max = max;
              -        this.#maxSize = maxSize;
              -        this.maxEntrySize = maxEntrySize || this.#maxSize;
              -        this.sizeCalculation = sizeCalculation;
              -        if (this.sizeCalculation) {
              -            if (!this.#maxSize && !this.maxEntrySize) {
              -                throw new TypeError('cannot set sizeCalculation without setting maxSize or maxEntrySize');
              -            }
              -            if (typeof this.sizeCalculation !== 'function') {
              -                throw new TypeError('sizeCalculation set to non-function');
              -            }
              -        }
              -        if (memoMethod !== undefined &&
              -            typeof memoMethod !== 'function') {
              -            throw new TypeError('memoMethod must be a function if defined');
              -        }
              -        this.#memoMethod = memoMethod;
              -        if (fetchMethod !== undefined &&
              -            typeof fetchMethod !== 'function') {
              -            throw new TypeError('fetchMethod must be a function if specified');
              -        }
              -        this.#fetchMethod = fetchMethod;
              -        this.#hasFetchMethod = !!fetchMethod;
              -        this.#keyMap = new Map();
              -        this.#keyList = new Array(max).fill(undefined);
              -        this.#valList = new Array(max).fill(undefined);
              -        this.#next = new UintArray(max);
              -        this.#prev = new UintArray(max);
              -        this.#head = 0;
              -        this.#tail = 0;
              -        this.#free = Stack.create(max);
              -        this.#size = 0;
              -        this.#calculatedSize = 0;
              -        if (typeof dispose === 'function') {
              -            this.#dispose = dispose;
              -        }
              -        if (typeof disposeAfter === 'function') {
              -            this.#disposeAfter = disposeAfter;
              -            this.#disposed = [];
              -        }
              -        else {
              -            this.#disposeAfter = undefined;
              -            this.#disposed = undefined;
              -        }
              -        this.#hasDispose = !!this.#dispose;
              -        this.#hasDisposeAfter = !!this.#disposeAfter;
              -        this.noDisposeOnSet = !!noDisposeOnSet;
              -        this.noUpdateTTL = !!noUpdateTTL;
              -        this.noDeleteOnFetchRejection = !!noDeleteOnFetchRejection;
              -        this.allowStaleOnFetchRejection = !!allowStaleOnFetchRejection;
              -        this.allowStaleOnFetchAbort = !!allowStaleOnFetchAbort;
              -        this.ignoreFetchAbort = !!ignoreFetchAbort;
              -        // NB: maxEntrySize is set to maxSize if it's set
              -        if (this.maxEntrySize !== 0) {
              -            if (this.#maxSize !== 0) {
              -                if (!isPosInt(this.#maxSize)) {
              -                    throw new TypeError('maxSize must be a positive integer if specified');
              -                }
              -            }
              -            if (!isPosInt(this.maxEntrySize)) {
              -                throw new TypeError('maxEntrySize must be a positive integer if specified');
              -            }
              -            this.#initializeSizeTracking();
              -        }
              -        this.allowStale = !!allowStale;
              -        this.noDeleteOnStaleGet = !!noDeleteOnStaleGet;
              -        this.updateAgeOnGet = !!updateAgeOnGet;
              -        this.updateAgeOnHas = !!updateAgeOnHas;
              -        this.ttlResolution =
              -            isPosInt(ttlResolution) || ttlResolution === 0
              -                ? ttlResolution
              -                : 1;
              -        this.ttlAutopurge = !!ttlAutopurge;
              -        this.ttl = ttl || 0;
              -        if (this.ttl) {
              -            if (!isPosInt(this.ttl)) {
              -                throw new TypeError('ttl must be a positive integer if specified');
              -            }
              -            this.#initializeTTLTracking();
              -        }
              -        // do not allow completely unbounded caches
              -        if (this.#max === 0 && this.ttl === 0 && this.#maxSize === 0) {
              -            throw new TypeError('At least one of max, maxSize, or ttl is required');
              -        }
              -        if (!this.ttlAutopurge && !this.#max && !this.#maxSize) {
              -            const code = 'LRU_CACHE_UNBOUNDED';
              -            if (shouldWarn(code)) {
              -                warned.add(code);
              -                const msg = 'TTL caching without ttlAutopurge, max, or maxSize can ' +
              -                    'result in unbounded memory consumption.';
              -                emitWarning(msg, 'UnboundedCacheWarning', code, LRUCache);
              -            }
              -        }
              -    }
              -    /**
              -     * Return the number of ms left in the item's TTL. If item is not in cache,
              -     * returns `0`. Returns `Infinity` if item is in cache without a defined TTL.
              -     */
              -    getRemainingTTL(key) {
              -        return this.#keyMap.has(key) ? Infinity : 0;
              -    }
              -    #initializeTTLTracking() {
              -        const ttls = new ZeroArray(this.#max);
              -        const starts = new ZeroArray(this.#max);
              -        this.#ttls = ttls;
              -        this.#starts = starts;
              -        this.#setItemTTL = (index, ttl, start = perf.now()) => {
              -            starts[index] = ttl !== 0 ? start : 0;
              -            ttls[index] = ttl;
              -            if (ttl !== 0 && this.ttlAutopurge) {
              -                const t = setTimeout(() => {
              -                    if (this.#isStale(index)) {
              -                        this.#delete(this.#keyList[index], 'expire');
              -                    }
              -                }, ttl + 1);
              -                // unref() not supported on all platforms
              -                /* c8 ignore start */
              -                if (t.unref) {
              -                    t.unref();
              -                }
              -                /* c8 ignore stop */
              -            }
              -        };
              -        this.#updateItemAge = index => {
              -            starts[index] = ttls[index] !== 0 ? perf.now() : 0;
              -        };
              -        this.#statusTTL = (status, index) => {
              -            if (ttls[index]) {
              -                const ttl = ttls[index];
              -                const start = starts[index];
              -                /* c8 ignore next */
              -                if (!ttl || !start)
              -                    return;
              -                status.ttl = ttl;
              -                status.start = start;
              -                status.now = cachedNow || getNow();
              -                const age = status.now - start;
              -                status.remainingTTL = ttl - age;
              -            }
              -        };
              -        // debounce calls to perf.now() to 1s so we're not hitting
              -        // that costly call repeatedly.
              -        let cachedNow = 0;
              -        const getNow = () => {
              -            const n = perf.now();
              -            if (this.ttlResolution > 0) {
              -                cachedNow = n;
              -                const t = setTimeout(() => (cachedNow = 0), this.ttlResolution);
              -                // not available on all platforms
              -                /* c8 ignore start */
              -                if (t.unref) {
              -                    t.unref();
              -                }
              -                /* c8 ignore stop */
              -            }
              -            return n;
              -        };
              -        this.getRemainingTTL = key => {
              -            const index = this.#keyMap.get(key);
              -            if (index === undefined) {
              -                return 0;
              -            }
              -            const ttl = ttls[index];
              -            const start = starts[index];
              -            if (!ttl || !start) {
              -                return Infinity;
              -            }
              -            const age = (cachedNow || getNow()) - start;
              -            return ttl - age;
              -        };
              -        this.#isStale = index => {
              -            const s = starts[index];
              -            const t = ttls[index];
              -            return !!t && !!s && (cachedNow || getNow()) - s > t;
              -        };
              -    }
              -    // conditionally set private methods related to TTL
              -    #updateItemAge = () => { };
              -    #statusTTL = () => { };
              -    #setItemTTL = () => { };
              -    /* c8 ignore stop */
              -    #isStale = () => false;
              -    #initializeSizeTracking() {
              -        const sizes = new ZeroArray(this.#max);
              -        this.#calculatedSize = 0;
              -        this.#sizes = sizes;
              -        this.#removeItemSize = index => {
              -            this.#calculatedSize -= sizes[index];
              -            sizes[index] = 0;
              -        };
              -        this.#requireSize = (k, v, size, sizeCalculation) => {
              -            // provisionally accept background fetches.
              -            // actual value size will be checked when they return.
              -            if (this.#isBackgroundFetch(v)) {
              -                return 0;
              -            }
              -            if (!isPosInt(size)) {
              -                if (sizeCalculation) {
              -                    if (typeof sizeCalculation !== 'function') {
              -                        throw new TypeError('sizeCalculation must be a function');
              -                    }
              -                    size = sizeCalculation(v, k);
              -                    if (!isPosInt(size)) {
              -                        throw new TypeError('sizeCalculation return invalid (expect positive integer)');
              -                    }
              -                }
              -                else {
              -                    throw new TypeError('invalid size value (must be positive integer). ' +
              -                        'When maxSize or maxEntrySize is used, sizeCalculation ' +
              -                        'or size must be set.');
              -                }
              -            }
              -            return size;
              -        };
              -        this.#addItemSize = (index, size, status) => {
              -            sizes[index] = size;
              -            if (this.#maxSize) {
              -                const maxSize = this.#maxSize - sizes[index];
              -                while (this.#calculatedSize > maxSize) {
              -                    this.#evict(true);
              -                }
              -            }
              -            this.#calculatedSize += sizes[index];
              -            if (status) {
              -                status.entrySize = size;
              -                status.totalCalculatedSize = this.#calculatedSize;
              -            }
              -        };
              -    }
              -    #removeItemSize = _i => { };
              -    #addItemSize = (_i, _s, _st) => { };
              -    #requireSize = (_k, _v, size, sizeCalculation) => {
              -        if (size || sizeCalculation) {
              -            throw new TypeError('cannot set size without setting maxSize or maxEntrySize on cache');
              -        }
              -        return 0;
              -    };
              -    *#indexes({ allowStale = this.allowStale } = {}) {
              -        if (this.#size) {
              -            for (let i = this.#tail; true;) {
              -                if (!this.#isValidIndex(i)) {
              -                    break;
              -                }
              -                if (allowStale || !this.#isStale(i)) {
              -                    yield i;
              -                }
              -                if (i === this.#head) {
              -                    break;
              -                }
              -                else {
              -                    i = this.#prev[i];
              -                }
              -            }
              -        }
              -    }
              -    *#rindexes({ allowStale = this.allowStale } = {}) {
              -        if (this.#size) {
              -            for (let i = this.#head; true;) {
              -                if (!this.#isValidIndex(i)) {
              -                    break;
              -                }
              -                if (allowStale || !this.#isStale(i)) {
              -                    yield i;
              -                }
              -                if (i === this.#tail) {
              -                    break;
              -                }
              -                else {
              -                    i = this.#next[i];
              -                }
              -            }
              -        }
              -    }
              -    #isValidIndex(index) {
              -        return (index !== undefined &&
              -            this.#keyMap.get(this.#keyList[index]) === index);
              -    }
              -    /**
              -     * Return a generator yielding `[key, value]` pairs,
              -     * in order from most recently used to least recently used.
              -     */
              -    *entries() {
              -        for (const i of this.#indexes()) {
              -            if (this.#valList[i] !== undefined &&
              -                this.#keyList[i] !== undefined &&
              -                !this.#isBackgroundFetch(this.#valList[i])) {
              -                yield [this.#keyList[i], this.#valList[i]];
              -            }
              -        }
              -    }
              -    /**
              -     * Inverse order version of {@link LRUCache.entries}
              -     *
              -     * Return a generator yielding `[key, value]` pairs,
              -     * in order from least recently used to most recently used.
              -     */
              -    *rentries() {
              -        for (const i of this.#rindexes()) {
              -            if (this.#valList[i] !== undefined &&
              -                this.#keyList[i] !== undefined &&
              -                !this.#isBackgroundFetch(this.#valList[i])) {
              -                yield [this.#keyList[i], this.#valList[i]];
              -            }
              -        }
              -    }
              -    /**
              -     * Return a generator yielding the keys in the cache,
              -     * in order from most recently used to least recently used.
              -     */
              -    *keys() {
              -        for (const i of this.#indexes()) {
              -            const k = this.#keyList[i];
              -            if (k !== undefined &&
              -                !this.#isBackgroundFetch(this.#valList[i])) {
              -                yield k;
              -            }
              -        }
              -    }
              -    /**
              -     * Inverse order version of {@link LRUCache.keys}
              -     *
              -     * Return a generator yielding the keys in the cache,
              -     * in order from least recently used to most recently used.
              -     */
              -    *rkeys() {
              -        for (const i of this.#rindexes()) {
              -            const k = this.#keyList[i];
              -            if (k !== undefined &&
              -                !this.#isBackgroundFetch(this.#valList[i])) {
              -                yield k;
              -            }
              -        }
              -    }
              -    /**
              -     * Return a generator yielding the values in the cache,
              -     * in order from most recently used to least recently used.
              -     */
              -    *values() {
              -        for (const i of this.#indexes()) {
              -            const v = this.#valList[i];
              -            if (v !== undefined &&
              -                !this.#isBackgroundFetch(this.#valList[i])) {
              -                yield this.#valList[i];
              -            }
              -        }
              -    }
              -    /**
              -     * Inverse order version of {@link LRUCache.values}
              -     *
              -     * Return a generator yielding the values in the cache,
              -     * in order from least recently used to most recently used.
              -     */
              -    *rvalues() {
              -        for (const i of this.#rindexes()) {
              -            const v = this.#valList[i];
              -            if (v !== undefined &&
              -                !this.#isBackgroundFetch(this.#valList[i])) {
              -                yield this.#valList[i];
              -            }
              -        }
              -    }
              -    /**
              -     * Iterating over the cache itself yields the same results as
              -     * {@link LRUCache.entries}
              -     */
              -    [Symbol.iterator]() {
              -        return this.entries();
              -    }
              -    /**
              -     * A String value that is used in the creation of the default string
              -     * description of an object. Called by the built-in method
              -     * `Object.prototype.toString`.
              -     */
              -    [Symbol.toStringTag] = 'LRUCache';
              -    /**
              -     * Find a value for which the supplied fn method returns a truthy value,
              -     * similar to `Array.find()`. fn is called as `fn(value, key, cache)`.
              -     */
              -    find(fn, getOptions = {}) {
              -        for (const i of this.#indexes()) {
              -            const v = this.#valList[i];
              -            const value = this.#isBackgroundFetch(v)
              -                ? v.__staleWhileFetching
              -                : v;
              -            if (value === undefined)
              -                continue;
              -            if (fn(value, this.#keyList[i], this)) {
              -                return this.get(this.#keyList[i], getOptions);
              -            }
              -        }
              -    }
              -    /**
              -     * Call the supplied function on each item in the cache, in order from most
              -     * recently used to least recently used.
              -     *
              -     * `fn` is called as `fn(value, key, cache)`.
              -     *
              -     * If `thisp` is provided, function will be called in the `this`-context of
              -     * the provided object, or the cache if no `thisp` object is provided.
              -     *
              -     * Does not update age or recenty of use, or iterate over stale values.
              -     */
              -    forEach(fn, thisp = this) {
              -        for (const i of this.#indexes()) {
              -            const v = this.#valList[i];
              -            const value = this.#isBackgroundFetch(v)
              -                ? v.__staleWhileFetching
              -                : v;
              -            if (value === undefined)
              -                continue;
              -            fn.call(thisp, value, this.#keyList[i], this);
              -        }
              -    }
              -    /**
              -     * The same as {@link LRUCache.forEach} but items are iterated over in
              -     * reverse order.  (ie, less recently used items are iterated over first.)
              -     */
              -    rforEach(fn, thisp = this) {
              -        for (const i of this.#rindexes()) {
              -            const v = this.#valList[i];
              -            const value = this.#isBackgroundFetch(v)
              -                ? v.__staleWhileFetching
              -                : v;
              -            if (value === undefined)
              -                continue;
              -            fn.call(thisp, value, this.#keyList[i], this);
              -        }
              -    }
              -    /**
              -     * Delete any stale entries. Returns true if anything was removed,
              -     * false otherwise.
              -     */
              -    purgeStale() {
              -        let deleted = false;
              -        for (const i of this.#rindexes({ allowStale: true })) {
              -            if (this.#isStale(i)) {
              -                this.#delete(this.#keyList[i], 'expire');
              -                deleted = true;
              -            }
              -        }
              -        return deleted;
              -    }
              -    /**
              -     * Get the extended info about a given entry, to get its value, size, and
              -     * TTL info simultaneously. Returns `undefined` if the key is not present.
              -     *
              -     * Unlike {@link LRUCache#dump}, which is designed to be portable and survive
              -     * serialization, the `start` value is always the current timestamp, and the
              -     * `ttl` is a calculated remaining time to live (negative if expired).
              -     *
              -     * Always returns stale values, if their info is found in the cache, so be
              -     * sure to check for expirations (ie, a negative {@link LRUCache.Entry#ttl})
              -     * if relevant.
              -     */
              -    info(key) {
              -        const i = this.#keyMap.get(key);
              -        if (i === undefined)
              -            return undefined;
              -        const v = this.#valList[i];
              -        const value = this.#isBackgroundFetch(v)
              -            ? v.__staleWhileFetching
              -            : v;
              -        if (value === undefined)
              -            return undefined;
              -        const entry = { value };
              -        if (this.#ttls && this.#starts) {
              -            const ttl = this.#ttls[i];
              -            const start = this.#starts[i];
              -            if (ttl && start) {
              -                const remain = ttl - (perf.now() - start);
              -                entry.ttl = remain;
              -                entry.start = Date.now();
              -            }
              -        }
              -        if (this.#sizes) {
              -            entry.size = this.#sizes[i];
              -        }
              -        return entry;
              -    }
              -    /**
              -     * Return an array of [key, {@link LRUCache.Entry}] tuples which can be
              -     * passed to {@link LRLUCache#load}.
              -     *
              -     * The `start` fields are calculated relative to a portable `Date.now()`
              -     * timestamp, even if `performance.now()` is available.
              -     *
              -     * Stale entries are always included in the `dump`, even if
              -     * {@link LRUCache.OptionsBase.allowStale} is false.
              -     *
              -     * Note: this returns an actual array, not a generator, so it can be more
              -     * easily passed around.
              -     */
              -    dump() {
              -        const arr = [];
              -        for (const i of this.#indexes({ allowStale: true })) {
              -            const key = this.#keyList[i];
              -            const v = this.#valList[i];
              -            const value = this.#isBackgroundFetch(v)
              -                ? v.__staleWhileFetching
              -                : v;
              -            if (value === undefined || key === undefined)
              -                continue;
              -            const entry = { value };
              -            if (this.#ttls && this.#starts) {
              -                entry.ttl = this.#ttls[i];
              -                // always dump the start relative to a portable timestamp
              -                // it's ok for this to be a bit slow, it's a rare operation.
              -                const age = perf.now() - this.#starts[i];
              -                entry.start = Math.floor(Date.now() - age);
              -            }
              -            if (this.#sizes) {
              -                entry.size = this.#sizes[i];
              -            }
              -            arr.unshift([key, entry]);
              -        }
              -        return arr;
              -    }
              -    /**
              -     * Reset the cache and load in the items in entries in the order listed.
              -     *
              -     * The shape of the resulting cache may be different if the same options are
              -     * not used in both caches.
              -     *
              -     * The `start` fields are assumed to be calculated relative to a portable
              -     * `Date.now()` timestamp, even if `performance.now()` is available.
              -     */
              -    load(arr) {
              -        this.clear();
              -        for (const [key, entry] of arr) {
              -            if (entry.start) {
              -                // entry.start is a portable timestamp, but we may be using
              -                // node's performance.now(), so calculate the offset, so that
              -                // we get the intended remaining TTL, no matter how long it's
              -                // been on ice.
              -                //
              -                // it's ok for this to be a bit slow, it's a rare operation.
              -                const age = Date.now() - entry.start;
              -                entry.start = perf.now() - age;
              -            }
              -            this.set(key, entry.value, entry);
              -        }
              -    }
              -    /**
              -     * Add a value to the cache.
              -     *
              -     * Note: if `undefined` is specified as a value, this is an alias for
              -     * {@link LRUCache#delete}
              -     *
              -     * Fields on the {@link LRUCache.SetOptions} options param will override
              -     * their corresponding values in the constructor options for the scope
              -     * of this single `set()` operation.
              -     *
              -     * If `start` is provided, then that will set the effective start
              -     * time for the TTL calculation. Note that this must be a previous
              -     * value of `performance.now()` if supported, or a previous value of
              -     * `Date.now()` if not.
              -     *
              -     * Options object may also include `size`, which will prevent
              -     * calling the `sizeCalculation` function and just use the specified
              -     * number if it is a positive integer, and `noDisposeOnSet` which
              -     * will prevent calling a `dispose` function in the case of
              -     * overwrites.
              -     *
              -     * If the `size` (or return value of `sizeCalculation`) for a given
              -     * entry is greater than `maxEntrySize`, then the item will not be
              -     * added to the cache.
              -     *
              -     * Will update the recency of the entry.
              -     *
              -     * If the value is `undefined`, then this is an alias for
              -     * `cache.delete(key)`. `undefined` is never stored in the cache.
              -     */
              -    set(k, v, setOptions = {}) {
              -        if (v === undefined) {
              -            this.delete(k);
              -            return this;
              -        }
              -        const { ttl = this.ttl, start, noDisposeOnSet = this.noDisposeOnSet, sizeCalculation = this.sizeCalculation, status, } = setOptions;
              -        let { noUpdateTTL = this.noUpdateTTL } = setOptions;
              -        const size = this.#requireSize(k, v, setOptions.size || 0, sizeCalculation);
              -        // if the item doesn't fit, don't do anything
              -        // NB: maxEntrySize set to maxSize by default
              -        if (this.maxEntrySize && size > this.maxEntrySize) {
              -            if (status) {
              -                status.set = 'miss';
              -                status.maxEntrySizeExceeded = true;
              -            }
              -            // have to delete, in case something is there already.
              -            this.#delete(k, 'set');
              -            return this;
              -        }
              -        let index = this.#size === 0 ? undefined : this.#keyMap.get(k);
              -        if (index === undefined) {
              -            // addition
              -            index = (this.#size === 0
              -                ? this.#tail
              -                : this.#free.length !== 0
              -                    ? this.#free.pop()
              -                    : this.#size === this.#max
              -                        ? this.#evict(false)
              -                        : this.#size);
              -            this.#keyList[index] = k;
              -            this.#valList[index] = v;
              -            this.#keyMap.set(k, index);
              -            this.#next[this.#tail] = index;
              -            this.#prev[index] = this.#tail;
              -            this.#tail = index;
              -            this.#size++;
              -            this.#addItemSize(index, size, status);
              -            if (status)
              -                status.set = 'add';
              -            noUpdateTTL = false;
              -        }
              -        else {
              -            // update
              -            this.#moveToTail(index);
              -            const oldVal = this.#valList[index];
              -            if (v !== oldVal) {
              -                if (this.#hasFetchMethod && this.#isBackgroundFetch(oldVal)) {
              -                    oldVal.__abortController.abort(new Error('replaced'));
              -                    const { __staleWhileFetching: s } = oldVal;
              -                    if (s !== undefined && !noDisposeOnSet) {
              -                        if (this.#hasDispose) {
              -                            this.#dispose?.(s, k, 'set');
              -                        }
              -                        if (this.#hasDisposeAfter) {
              -                            this.#disposed?.push([s, k, 'set']);
              -                        }
              -                    }
              -                }
              -                else if (!noDisposeOnSet) {
              -                    if (this.#hasDispose) {
              -                        this.#dispose?.(oldVal, k, 'set');
              -                    }
              -                    if (this.#hasDisposeAfter) {
              -                        this.#disposed?.push([oldVal, k, 'set']);
              -                    }
              -                }
              -                this.#removeItemSize(index);
              -                this.#addItemSize(index, size, status);
              -                this.#valList[index] = v;
              -                if (status) {
              -                    status.set = 'replace';
              -                    const oldValue = oldVal && this.#isBackgroundFetch(oldVal)
              -                        ? oldVal.__staleWhileFetching
              -                        : oldVal;
              -                    if (oldValue !== undefined)
              -                        status.oldValue = oldValue;
              -                }
              -            }
              -            else if (status) {
              -                status.set = 'update';
              -            }
              -        }
              -        if (ttl !== 0 && !this.#ttls) {
              -            this.#initializeTTLTracking();
              -        }
              -        if (this.#ttls) {
              -            if (!noUpdateTTL) {
              -                this.#setItemTTL(index, ttl, start);
              -            }
              -            if (status)
              -                this.#statusTTL(status, index);
              -        }
              -        if (!noDisposeOnSet && this.#hasDisposeAfter && this.#disposed) {
              -            const dt = this.#disposed;
              -            let task;
              -            while ((task = dt?.shift())) {
              -                this.#disposeAfter?.(...task);
              -            }
              -        }
              -        return this;
              -    }
              -    /**
              -     * Evict the least recently used item, returning its value or
              -     * `undefined` if cache is empty.
              -     */
              -    pop() {
              -        try {
              -            while (this.#size) {
              -                const val = this.#valList[this.#head];
              -                this.#evict(true);
              -                if (this.#isBackgroundFetch(val)) {
              -                    if (val.__staleWhileFetching) {
              -                        return val.__staleWhileFetching;
              -                    }
              -                }
              -                else if (val !== undefined) {
              -                    return val;
              -                }
              -            }
              -        }
              -        finally {
              -            if (this.#hasDisposeAfter && this.#disposed) {
              -                const dt = this.#disposed;
              -                let task;
              -                while ((task = dt?.shift())) {
              -                    this.#disposeAfter?.(...task);
              -                }
              -            }
              -        }
              -    }
              -    #evict(free) {
              -        const head = this.#head;
              -        const k = this.#keyList[head];
              -        const v = this.#valList[head];
              -        if (this.#hasFetchMethod && this.#isBackgroundFetch(v)) {
              -            v.__abortController.abort(new Error('evicted'));
              -        }
              -        else if (this.#hasDispose || this.#hasDisposeAfter) {
              -            if (this.#hasDispose) {
              -                this.#dispose?.(v, k, 'evict');
              -            }
              -            if (this.#hasDisposeAfter) {
              -                this.#disposed?.push([v, k, 'evict']);
              -            }
              -        }
              -        this.#removeItemSize(head);
              -        // if we aren't about to use the index, then null these out
              -        if (free) {
              -            this.#keyList[head] = undefined;
              -            this.#valList[head] = undefined;
              -            this.#free.push(head);
              -        }
              -        if (this.#size === 1) {
              -            this.#head = this.#tail = 0;
              -            this.#free.length = 0;
              -        }
              -        else {
              -            this.#head = this.#next[head];
              -        }
              -        this.#keyMap.delete(k);
              -        this.#size--;
              -        return head;
              -    }
              -    /**
              -     * Check if a key is in the cache, without updating the recency of use.
              -     * Will return false if the item is stale, even though it is technically
              -     * in the cache.
              -     *
              -     * Check if a key is in the cache, without updating the recency of
              -     * use. Age is updated if {@link LRUCache.OptionsBase.updateAgeOnHas} is set
              -     * to `true` in either the options or the constructor.
              -     *
              -     * Will return `false` if the item is stale, even though it is technically in
              -     * the cache. The difference can be determined (if it matters) by using a
              -     * `status` argument, and inspecting the `has` field.
              -     *
              -     * Will not update item age unless
              -     * {@link LRUCache.OptionsBase.updateAgeOnHas} is set.
              -     */
              -    has(k, hasOptions = {}) {
              -        const { updateAgeOnHas = this.updateAgeOnHas, status } = hasOptions;
              -        const index = this.#keyMap.get(k);
              -        if (index !== undefined) {
              -            const v = this.#valList[index];
              -            if (this.#isBackgroundFetch(v) &&
              -                v.__staleWhileFetching === undefined) {
              -                return false;
              -            }
              -            if (!this.#isStale(index)) {
              -                if (updateAgeOnHas) {
              -                    this.#updateItemAge(index);
              -                }
              -                if (status) {
              -                    status.has = 'hit';
              -                    this.#statusTTL(status, index);
              -                }
              -                return true;
              -            }
              -            else if (status) {
              -                status.has = 'stale';
              -                this.#statusTTL(status, index);
              -            }
              -        }
              -        else if (status) {
              -            status.has = 'miss';
              -        }
              -        return false;
              -    }
              -    /**
              -     * Like {@link LRUCache#get} but doesn't update recency or delete stale
              -     * items.
              -     *
              -     * Returns `undefined` if the item is stale, unless
              -     * {@link LRUCache.OptionsBase.allowStale} is set.
              -     */
              -    peek(k, peekOptions = {}) {
              -        const { allowStale = this.allowStale } = peekOptions;
              -        const index = this.#keyMap.get(k);
              -        if (index === undefined ||
              -            (!allowStale && this.#isStale(index))) {
              -            return;
              -        }
              -        const v = this.#valList[index];
              -        // either stale and allowed, or forcing a refresh of non-stale value
              -        return this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v;
              -    }
              -    #backgroundFetch(k, index, options, context) {
              -        const v = index === undefined ? undefined : this.#valList[index];
              -        if (this.#isBackgroundFetch(v)) {
              -            return v;
              -        }
              -        const ac = new AC();
              -        const { signal } = options;
              -        // when/if our AC signals, then stop listening to theirs.
              -        signal?.addEventListener('abort', () => ac.abort(signal.reason), {
              -            signal: ac.signal,
              -        });
              -        const fetchOpts = {
              -            signal: ac.signal,
              -            options,
              -            context,
              -        };
              -        const cb = (v, updateCache = false) => {
              -            const { aborted } = ac.signal;
              -            const ignoreAbort = options.ignoreFetchAbort && v !== undefined;
              -            if (options.status) {
              -                if (aborted && !updateCache) {
              -                    options.status.fetchAborted = true;
              -                    options.status.fetchError = ac.signal.reason;
              -                    if (ignoreAbort)
              -                        options.status.fetchAbortIgnored = true;
              -                }
              -                else {
              -                    options.status.fetchResolved = true;
              -                }
              -            }
              -            if (aborted && !ignoreAbort && !updateCache) {
              -                return fetchFail(ac.signal.reason);
              -            }
              -            // either we didn't abort, and are still here, or we did, and ignored
              -            const bf = p;
              -            if (this.#valList[index] === p) {
              -                if (v === undefined) {
              -                    if (bf.__staleWhileFetching) {
              -                        this.#valList[index] = bf.__staleWhileFetching;
              -                    }
              -                    else {
              -                        this.#delete(k, 'fetch');
              -                    }
              -                }
              -                else {
              -                    if (options.status)
              -                        options.status.fetchUpdated = true;
              -                    this.set(k, v, fetchOpts.options);
              -                }
              -            }
              -            return v;
              -        };
              -        const eb = (er) => {
              -            if (options.status) {
              -                options.status.fetchRejected = true;
              -                options.status.fetchError = er;
              -            }
              -            return fetchFail(er);
              -        };
              -        const fetchFail = (er) => {
              -            const { aborted } = ac.signal;
              -            const allowStaleAborted = aborted && options.allowStaleOnFetchAbort;
              -            const allowStale = allowStaleAborted || options.allowStaleOnFetchRejection;
              -            const noDelete = allowStale || options.noDeleteOnFetchRejection;
              -            const bf = p;
              -            if (this.#valList[index] === p) {
              -                // if we allow stale on fetch rejections, then we need to ensure that
              -                // the stale value is not removed from the cache when the fetch fails.
              -                const del = !noDelete || bf.__staleWhileFetching === undefined;
              -                if (del) {
              -                    this.#delete(k, 'fetch');
              -                }
              -                else if (!allowStaleAborted) {
              -                    // still replace the *promise* with the stale value,
              -                    // since we are done with the promise at this point.
              -                    // leave it untouched if we're still waiting for an
              -                    // aborted background fetch that hasn't yet returned.
              -                    this.#valList[index] = bf.__staleWhileFetching;
              -                }
              -            }
              -            if (allowStale) {
              -                if (options.status && bf.__staleWhileFetching !== undefined) {
              -                    options.status.returnedStale = true;
              -                }
              -                return bf.__staleWhileFetching;
              -            }
              -            else if (bf.__returned === bf) {
              -                throw er;
              -            }
              -        };
              -        const pcall = (res, rej) => {
              -            const fmp = this.#fetchMethod?.(k, v, fetchOpts);
              -            if (fmp && fmp instanceof Promise) {
              -                fmp.then(v => res(v === undefined ? undefined : v), rej);
              -            }
              -            // ignored, we go until we finish, regardless.
              -            // defer check until we are actually aborting,
              -            // so fetchMethod can override.
              -            ac.signal.addEventListener('abort', () => {
              -                if (!options.ignoreFetchAbort ||
              -                    options.allowStaleOnFetchAbort) {
              -                    res(undefined);
              -                    // when it eventually resolves, update the cache.
              -                    if (options.allowStaleOnFetchAbort) {
              -                        res = v => cb(v, true);
              -                    }
              -                }
              -            });
              -        };
              -        if (options.status)
              -            options.status.fetchDispatched = true;
              -        const p = new Promise(pcall).then(cb, eb);
              -        const bf = Object.assign(p, {
              -            __abortController: ac,
              -            __staleWhileFetching: v,
              -            __returned: undefined,
              -        });
              -        if (index === undefined) {
              -            // internal, don't expose status.
              -            this.set(k, bf, { ...fetchOpts.options, status: undefined });
              -            index = this.#keyMap.get(k);
              -        }
              -        else {
              -            this.#valList[index] = bf;
              -        }
              -        return bf;
              -    }
              -    #isBackgroundFetch(p) {
              -        if (!this.#hasFetchMethod)
              -            return false;
              -        const b = p;
              -        return (!!b &&
              -            b instanceof Promise &&
              -            b.hasOwnProperty('__staleWhileFetching') &&
              -            b.__abortController instanceof AC);
              -    }
              -    async fetch(k, fetchOptions = {}) {
              -        const { 
              -        // get options
              -        allowStale = this.allowStale, updateAgeOnGet = this.updateAgeOnGet, noDeleteOnStaleGet = this.noDeleteOnStaleGet, 
              -        // set options
              -        ttl = this.ttl, noDisposeOnSet = this.noDisposeOnSet, size = 0, sizeCalculation = this.sizeCalculation, noUpdateTTL = this.noUpdateTTL, 
              -        // fetch exclusive options
              -        noDeleteOnFetchRejection = this.noDeleteOnFetchRejection, allowStaleOnFetchRejection = this.allowStaleOnFetchRejection, ignoreFetchAbort = this.ignoreFetchAbort, allowStaleOnFetchAbort = this.allowStaleOnFetchAbort, context, forceRefresh = false, status, signal, } = fetchOptions;
              -        if (!this.#hasFetchMethod) {
              -            if (status)
              -                status.fetch = 'get';
              -            return this.get(k, {
              -                allowStale,
              -                updateAgeOnGet,
              -                noDeleteOnStaleGet,
              -                status,
              -            });
              -        }
              -        const options = {
              -            allowStale,
              -            updateAgeOnGet,
              -            noDeleteOnStaleGet,
              -            ttl,
              -            noDisposeOnSet,
              -            size,
              -            sizeCalculation,
              -            noUpdateTTL,
              -            noDeleteOnFetchRejection,
              -            allowStaleOnFetchRejection,
              -            allowStaleOnFetchAbort,
              -            ignoreFetchAbort,
              -            status,
              -            signal,
              -        };
              -        let index = this.#keyMap.get(k);
              -        if (index === undefined) {
              -            if (status)
              -                status.fetch = 'miss';
              -            const p = this.#backgroundFetch(k, index, options, context);
              -            return (p.__returned = p);
              -        }
              -        else {
              -            // in cache, maybe already fetching
              -            const v = this.#valList[index];
              -            if (this.#isBackgroundFetch(v)) {
              -                const stale = allowStale && v.__staleWhileFetching !== undefined;
              -                if (status) {
              -                    status.fetch = 'inflight';
              -                    if (stale)
              -                        status.returnedStale = true;
              -                }
              -                return stale ? v.__staleWhileFetching : (v.__returned = v);
              -            }
              -            // if we force a refresh, that means do NOT serve the cached value,
              -            // unless we are already in the process of refreshing the cache.
              -            const isStale = this.#isStale(index);
              -            if (!forceRefresh && !isStale) {
              -                if (status)
              -                    status.fetch = 'hit';
              -                this.#moveToTail(index);
              -                if (updateAgeOnGet) {
              -                    this.#updateItemAge(index);
              -                }
              -                if (status)
              -                    this.#statusTTL(status, index);
              -                return v;
              -            }
              -            // ok, it is stale or a forced refresh, and not already fetching.
              -            // refresh the cache.
              -            const p = this.#backgroundFetch(k, index, options, context);
              -            const hasStale = p.__staleWhileFetching !== undefined;
              -            const staleVal = hasStale && allowStale;
              -            if (status) {
              -                status.fetch = isStale ? 'stale' : 'refresh';
              -                if (staleVal && isStale)
              -                    status.returnedStale = true;
              -            }
              -            return staleVal ? p.__staleWhileFetching : (p.__returned = p);
              -        }
              -    }
              -    async forceFetch(k, fetchOptions = {}) {
              -        const v = await this.fetch(k, fetchOptions);
              -        if (v === undefined)
              -            throw new Error('fetch() returned undefined');
              -        return v;
              -    }
              -    memo(k, memoOptions = {}) {
              -        const memoMethod = this.#memoMethod;
              -        if (!memoMethod) {
              -            throw new Error('no memoMethod provided to constructor');
              -        }
              -        const { context, forceRefresh, ...options } = memoOptions;
              -        const v = this.get(k, options);
              -        if (!forceRefresh && v !== undefined)
              -            return v;
              -        const vv = memoMethod(k, v, {
              -            options,
              -            context,
              -        });
              -        this.set(k, vv, options);
              -        return vv;
              -    }
              -    /**
              -     * Return a value from the cache. Will update the recency of the cache
              -     * entry found.
              -     *
              -     * If the key is not found, get() will return `undefined`.
              -     */
              -    get(k, getOptions = {}) {
              -        const { allowStale = this.allowStale, updateAgeOnGet = this.updateAgeOnGet, noDeleteOnStaleGet = this.noDeleteOnStaleGet, status, } = getOptions;
              -        const index = this.#keyMap.get(k);
              -        if (index !== undefined) {
              -            const value = this.#valList[index];
              -            const fetching = this.#isBackgroundFetch(value);
              -            if (status)
              -                this.#statusTTL(status, index);
              -            if (this.#isStale(index)) {
              -                if (status)
              -                    status.get = 'stale';
              -                // delete only if not an in-flight background fetch
              -                if (!fetching) {
              -                    if (!noDeleteOnStaleGet) {
              -                        this.#delete(k, 'expire');
              -                    }
              -                    if (status && allowStale)
              -                        status.returnedStale = true;
              -                    return allowStale ? value : undefined;
              -                }
              -                else {
              -                    if (status &&
              -                        allowStale &&
              -                        value.__staleWhileFetching !== undefined) {
              -                        status.returnedStale = true;
              -                    }
              -                    return allowStale ? value.__staleWhileFetching : undefined;
              -                }
              -            }
              -            else {
              -                if (status)
              -                    status.get = 'hit';
              -                // if we're currently fetching it, we don't actually have it yet
              -                // it's not stale, which means this isn't a staleWhileRefetching.
              -                // If it's not stale, and fetching, AND has a __staleWhileFetching
              -                // value, then that means the user fetched with {forceRefresh:true},
              -                // so it's safe to return that value.
              -                if (fetching) {
              -                    return value.__staleWhileFetching;
              -                }
              -                this.#moveToTail(index);
              -                if (updateAgeOnGet) {
              -                    this.#updateItemAge(index);
              -                }
              -                return value;
              -            }
              -        }
              -        else if (status) {
              -            status.get = 'miss';
              -        }
              -    }
              -    #connect(p, n) {
              -        this.#prev[n] = p;
              -        this.#next[p] = n;
              -    }
              -    #moveToTail(index) {
              -        // if tail already, nothing to do
              -        // if head, move head to next[index]
              -        // else
              -        //   move next[prev[index]] to next[index] (head has no prev)
              -        //   move prev[next[index]] to prev[index]
              -        // prev[index] = tail
              -        // next[tail] = index
              -        // tail = index
              -        if (index !== this.#tail) {
              -            if (index === this.#head) {
              -                this.#head = this.#next[index];
              -            }
              -            else {
              -                this.#connect(this.#prev[index], this.#next[index]);
              -            }
              -            this.#connect(this.#tail, index);
              -            this.#tail = index;
              -        }
              -    }
              -    /**
              -     * Deletes a key out of the cache.
              -     *
              -     * Returns true if the key was deleted, false otherwise.
              -     */
              -    delete(k) {
              -        return this.#delete(k, 'delete');
              -    }
              -    #delete(k, reason) {
              -        let deleted = false;
              -        if (this.#size !== 0) {
              -            const index = this.#keyMap.get(k);
              -            if (index !== undefined) {
              -                deleted = true;
              -                if (this.#size === 1) {
              -                    this.#clear(reason);
              -                }
              -                else {
              -                    this.#removeItemSize(index);
              -                    const v = this.#valList[index];
              -                    if (this.#isBackgroundFetch(v)) {
              -                        v.__abortController.abort(new Error('deleted'));
              -                    }
              -                    else if (this.#hasDispose || this.#hasDisposeAfter) {
              -                        if (this.#hasDispose) {
              -                            this.#dispose?.(v, k, reason);
              -                        }
              -                        if (this.#hasDisposeAfter) {
              -                            this.#disposed?.push([v, k, reason]);
              -                        }
              -                    }
              -                    this.#keyMap.delete(k);
              -                    this.#keyList[index] = undefined;
              -                    this.#valList[index] = undefined;
              -                    if (index === this.#tail) {
              -                        this.#tail = this.#prev[index];
              -                    }
              -                    else if (index === this.#head) {
              -                        this.#head = this.#next[index];
              -                    }
              -                    else {
              -                        const pi = this.#prev[index];
              -                        this.#next[pi] = this.#next[index];
              -                        const ni = this.#next[index];
              -                        this.#prev[ni] = this.#prev[index];
              -                    }
              -                    this.#size--;
              -                    this.#free.push(index);
              -                }
              -            }
              -        }
              -        if (this.#hasDisposeAfter && this.#disposed?.length) {
              -            const dt = this.#disposed;
              -            let task;
              -            while ((task = dt?.shift())) {
              -                this.#disposeAfter?.(...task);
              -            }
              -        }
              -        return deleted;
              -    }
              -    /**
              -     * Clear the cache entirely, throwing away all values.
              -     */
              -    clear() {
              -        return this.#clear('delete');
              -    }
              -    #clear(reason) {
              -        for (const index of this.#rindexes({ allowStale: true })) {
              -            const v = this.#valList[index];
              -            if (this.#isBackgroundFetch(v)) {
              -                v.__abortController.abort(new Error('deleted'));
              -            }
              -            else {
              -                const k = this.#keyList[index];
              -                if (this.#hasDispose) {
              -                    this.#dispose?.(v, k, reason);
              -                }
              -                if (this.#hasDisposeAfter) {
              -                    this.#disposed?.push([v, k, reason]);
              -                }
              -            }
              -        }
              -        this.#keyMap.clear();
              -        this.#valList.fill(undefined);
              -        this.#keyList.fill(undefined);
              -        if (this.#ttls && this.#starts) {
              -            this.#ttls.fill(0);
              -            this.#starts.fill(0);
              -        }
              -        if (this.#sizes) {
              -            this.#sizes.fill(0);
              -        }
              -        this.#head = 0;
              -        this.#tail = 0;
              -        this.#free.length = 0;
              -        this.#calculatedSize = 0;
              -        this.#size = 0;
              -        if (this.#hasDisposeAfter && this.#disposed) {
              -            const dt = this.#disposed;
              -            let task;
              -            while ((task = dt?.shift())) {
              -                this.#disposeAfter?.(...task);
              -            }
              -        }
              -    }
              -}
              -//# sourceMappingURL=index.js.map
              \ No newline at end of file
              diff --git a/node_modules/path-scurry/node_modules/lru-cache/dist/esm/index.js.map b/node_modules/path-scurry/node_modules/lru-cache/dist/esm/index.js.map
              deleted file mode 100644
              index 8f7ac531..00000000
              --- a/node_modules/path-scurry/node_modules/lru-cache/dist/esm/index.js.map
              +++ /dev/null
              @@ -1 +0,0 @@
              -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,MAAM,IAAI,GACR,OAAO,WAAW,KAAK,QAAQ;IAC/B,WAAW;IACX,OAAO,WAAW,CAAC,GAAG,KAAK,UAAU;IACnC,CAAC,CAAC,WAAW;IACb,CAAC,CAAC,IAAI,CAAA;AAEV,MAAM,MAAM,GAAG,IAAI,GAAG,EAAU,CAAA;AAKhC,qBAAqB;AACrB,MAAM,OAAO,GAAG,CACd,OAAO,OAAO,KAAK,QAAQ,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAChC,CAAA;AACzB,qBAAqB;AAErB,MAAM,WAAW,GAAG,CAClB,GAAW,EACX,IAAY,EACZ,IAAY,EACZ,EAAQ,EACR,EAAE;IACF,OAAO,OAAO,CAAC,WAAW,KAAK,UAAU;QACvC,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC,GAAG,EAA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AE;YAC3C,MAAM,EAAE,GAAG,IAAI,CAAC,SAAS,CAAA;YACzB,IAAI,IAAmC,CAAA;YACvC,OAAO,CAAC,IAAI,GAAG,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE;gBAC3B,IAAI,CAAC,aAAa,EAAE,CAAC,GAAG,IAAI,CAAC,CAAA;aAC9B;SACF;IACH,CAAC;CACF","sourcesContent":["/**\n * @module LRUCache\n */\n\n// module-private names and types\ntype Perf = { now: () => number }\nconst perf: Perf =\n  typeof performance === 'object' &&\n  performance &&\n  typeof performance.now === 'function'\n    ? performance\n    : Date\n\nconst warned = new Set()\n\n// either a function or a class\ntype ForC = ((...a: any[]) => any) | { new (...a: any[]): any }\n\n/* c8 ignore start */\nconst PROCESS = (\n  typeof process === 'object' && !!process ? process : {}\n) as { [k: string]: any }\n/* c8 ignore start */\n\nconst emitWarning = (\n  msg: string,\n  type: string,\n  code: string,\n  fn: ForC\n) => {\n  typeof PROCESS.emitWarning === 'function'\n    ? PROCESS.emitWarning(msg, type, code, fn)\n    : console.error(`[${code}] ${type}: ${msg}`)\n}\n\nlet AC = globalThis.AbortController\nlet AS = globalThis.AbortSignal\n\n/* c8 ignore start */\nif (typeof AC === 'undefined') {\n  //@ts-ignore\n  AS = class AbortSignal {\n    onabort?: (...a: any[]) => any\n    _onabort: ((...a: any[]) => any)[] = []\n    reason?: any\n    aborted: boolean = false\n    addEventListener(_: string, fn: (...a: any[]) => any) {\n      this._onabort.push(fn)\n    }\n  }\n  //@ts-ignore\n  AC = class AbortController {\n    constructor() {\n      warnACPolyfill()\n    }\n    signal = new AS()\n    abort(reason: any) {\n      if (this.signal.aborted) return\n      //@ts-ignore\n      this.signal.reason = reason\n      //@ts-ignore\n      this.signal.aborted = true\n      //@ts-ignore\n      for (const fn of this.signal._onabort) {\n        fn(reason)\n      }\n      this.signal.onabort?.(reason)\n    }\n  }\n  let printACPolyfillWarning =\n    PROCESS.env?.LRU_CACHE_IGNORE_AC_WARNING !== '1'\n  const warnACPolyfill = () => {\n    if (!printACPolyfillWarning) return\n    printACPolyfillWarning = false\n    emitWarning(\n      'AbortController is not defined. If using lru-cache in ' +\n        'node 14, load an AbortController polyfill from the ' +\n        '`node-abort-controller` package. A minimal polyfill is ' +\n        'provided for use by LRUCache.fetch(), but it should not be ' +\n        'relied upon in other contexts (eg, passing it to other APIs that ' +\n        'use AbortController/AbortSignal might have undesirable effects). ' +\n        'You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.',\n      'NO_ABORT_CONTROLLER',\n      'ENOTSUP',\n      warnACPolyfill\n    )\n  }\n}\n/* c8 ignore stop */\n\nconst shouldWarn = (code: string) => !warned.has(code)\n\nconst TYPE = Symbol('type')\nexport type PosInt = number & { [TYPE]: 'Positive Integer' }\nexport type Index = number & { [TYPE]: 'LRUCache Index' }\n\nconst isPosInt = (n: any): n is PosInt =>\n  n && n === Math.floor(n) && n > 0 && isFinite(n)\n\nexport type UintArray = Uint8Array | Uint16Array | Uint32Array\nexport type NumberArray = UintArray | number[]\n\n/* c8 ignore start */\n// This is a little bit ridiculous, tbh.\n// The maximum array length is 2^32-1 or thereabouts on most JS impls.\n// And well before that point, you're caching the entire world, I mean,\n// that's ~32GB of just integers for the next/prev links, plus whatever\n// else to hold that many keys and values.  Just filling the memory with\n// zeroes at init time is brutal when you get that big.\n// But why not be complete?\n// Maybe in the future, these limits will have expanded.\nconst getUintArray = (max: number) =>\n  !isPosInt(max)\n    ? null\n    : max <= Math.pow(2, 8)\n    ? Uint8Array\n    : max <= Math.pow(2, 16)\n    ? Uint16Array\n    : max <= Math.pow(2, 32)\n    ? Uint32Array\n    : max <= Number.MAX_SAFE_INTEGER\n    ? ZeroArray\n    : null\n/* c8 ignore stop */\n\nclass ZeroArray extends Array {\n  constructor(size: number) {\n    super(size)\n    this.fill(0)\n  }\n}\nexport type { ZeroArray }\nexport type { Stack }\n\nexport type StackLike = Stack | Index[]\nclass Stack {\n  heap: NumberArray\n  length: number\n  // private constructor\n  static #constructing: boolean = false\n  static create(max: number): StackLike {\n    const HeapCls = getUintArray(max)\n    if (!HeapCls) return []\n    Stack.#constructing = true\n    const s = new Stack(max, HeapCls)\n    Stack.#constructing = false\n    return s\n  }\n  constructor(\n    max: number,\n    HeapCls: { new (n: number): NumberArray }\n  ) {\n    /* c8 ignore start */\n    if (!Stack.#constructing) {\n      throw new TypeError('instantiate Stack using Stack.create(n)')\n    }\n    /* c8 ignore stop */\n    this.heap = new HeapCls(max)\n    this.length = 0\n  }\n  push(n: Index) {\n    this.heap[this.length++] = n\n  }\n  pop(): Index {\n    return this.heap[--this.length] as Index\n  }\n}\n\n/**\n * Promise representing an in-progress {@link LRUCache#fetch} call\n */\nexport type BackgroundFetch = Promise & {\n  __returned: BackgroundFetch | undefined\n  __abortController: AbortController\n  __staleWhileFetching: V | undefined\n}\n\nexport type DisposeTask = [\n  value: V,\n  key: K,\n  reason: LRUCache.DisposeReason\n]\n\nexport namespace LRUCache {\n  /**\n   * An integer greater than 0, reflecting the calculated size of items\n   */\n  export type Size = number\n\n  /**\n   * Integer greater than 0, representing some number of milliseconds, or the\n   * time at which a TTL started counting from.\n   */\n  export type Milliseconds = number\n\n  /**\n   * An integer greater than 0, reflecting a number of items\n   */\n  export type Count = number\n\n  /**\n   * The reason why an item was removed from the cache, passed\n   * to the {@link Disposer} methods.\n   *\n   * - `evict`: The item was evicted because it is the least recently used,\n   *   and the cache is full.\n   * - `set`: A new value was set, overwriting the old value being disposed.\n   * - `delete`: The item was explicitly deleted, either by calling\n   *   {@link LRUCache#delete}, {@link LRUCache#clear}, or\n   *   {@link LRUCache#set} with an undefined value.\n   * - `expire`: The item was removed due to exceeding its TTL.\n   * - `fetch`: A {@link OptionsBase#fetchMethod} operation returned\n   *   `undefined` or was aborted, causing the item to be deleted.\n   */\n  export type DisposeReason =\n    | 'evict'\n    | 'set'\n    | 'delete'\n    | 'expire'\n    | 'fetch'\n  /**\n   * A method called upon item removal, passed as the\n   * {@link OptionsBase.dispose} and/or\n   * {@link OptionsBase.disposeAfter} options.\n   */\n  export type Disposer = (\n    value: V,\n    key: K,\n    reason: DisposeReason\n  ) => void\n\n  /**\n   * A function that returns the effective calculated size\n   * of an entry in the cache.\n   */\n  export type SizeCalculator = (value: V, key: K) => Size\n\n  /**\n   * Options provided to the\n   * {@link OptionsBase.fetchMethod} function.\n   */\n  export interface FetcherOptions {\n    signal: AbortSignal\n    options: FetcherFetchOptions\n    /**\n     * Object provided in the {@link FetchOptions.context} option to\n     * {@link LRUCache#fetch}\n     */\n    context: FC\n  }\n\n  /**\n   * Occasionally, it may be useful to track the internal behavior of the\n   * cache, particularly for logging, debugging, or for behavior within the\n   * `fetchMethod`. To do this, you can pass a `status` object to the\n   * {@link LRUCache#fetch}, {@link LRUCache#get}, {@link LRUCache#set},\n   * {@link LRUCache#memo}, and {@link LRUCache#has} methods.\n   *\n   * The `status` option should be a plain JavaScript object. The following\n   * fields will be set on it appropriately, depending on the situation.\n   */\n  export interface Status {\n    /**\n     * The status of a set() operation.\n     *\n     * - add: the item was not found in the cache, and was added\n     * - update: the item was in the cache, with the same value provided\n     * - replace: the item was in the cache, and replaced\n     * - miss: the item was not added to the cache for some reason\n     */\n    set?: 'add' | 'update' | 'replace' | 'miss'\n\n    /**\n     * the ttl stored for the item, or undefined if ttls are not used.\n     */\n    ttl?: Milliseconds\n\n    /**\n     * the start time for the item, or undefined if ttls are not used.\n     */\n    start?: Milliseconds\n\n    /**\n     * The timestamp used for TTL calculation\n     */\n    now?: Milliseconds\n\n    /**\n     * the remaining ttl for the item, or undefined if ttls are not used.\n     */\n    remainingTTL?: Milliseconds\n\n    /**\n     * The calculated size for the item, if sizes are used.\n     */\n    entrySize?: Size\n\n    /**\n     * The total calculated size of the cache, if sizes are used.\n     */\n    totalCalculatedSize?: Size\n\n    /**\n     * A flag indicating that the item was not stored, due to exceeding the\n     * {@link OptionsBase.maxEntrySize}\n     */\n    maxEntrySizeExceeded?: true\n\n    /**\n     * The old value, specified in the case of `set:'update'` or\n     * `set:'replace'`\n     */\n    oldValue?: V\n\n    /**\n     * The results of a {@link LRUCache#has} operation\n     *\n     * - hit: the item was found in the cache\n     * - stale: the item was found in the cache, but is stale\n     * - miss: the item was not found in the cache\n     */\n    has?: 'hit' | 'stale' | 'miss'\n\n    /**\n     * The status of a {@link LRUCache#fetch} operation.\n     * Note that this can change as the underlying fetch() moves through\n     * various states.\n     *\n     * - inflight: there is another fetch() for this key which is in process\n     * - get: there is no {@link OptionsBase.fetchMethod}, so\n     *   {@link LRUCache#get} was called.\n     * - miss: the item is not in cache, and will be fetched.\n     * - hit: the item is in the cache, and was resolved immediately.\n     * - stale: the item is in the cache, but stale.\n     * - refresh: the item is in the cache, and not stale, but\n     *   {@link FetchOptions.forceRefresh} was specified.\n     */\n    fetch?: 'get' | 'inflight' | 'miss' | 'hit' | 'stale' | 'refresh'\n\n    /**\n     * The {@link OptionsBase.fetchMethod} was called\n     */\n    fetchDispatched?: true\n\n    /**\n     * The cached value was updated after a successful call to\n     * {@link OptionsBase.fetchMethod}\n     */\n    fetchUpdated?: true\n\n    /**\n     * The reason for a fetch() rejection.  Either the error raised by the\n     * {@link OptionsBase.fetchMethod}, or the reason for an\n     * AbortSignal.\n     */\n    fetchError?: Error\n\n    /**\n     * The fetch received an abort signal\n     */\n    fetchAborted?: true\n\n    /**\n     * The abort signal received was ignored, and the fetch was allowed to\n     * continue.\n     */\n    fetchAbortIgnored?: true\n\n    /**\n     * The fetchMethod promise resolved successfully\n     */\n    fetchResolved?: true\n\n    /**\n     * The fetchMethod promise was rejected\n     */\n    fetchRejected?: true\n\n    /**\n     * The status of a {@link LRUCache#get} operation.\n     *\n     * - fetching: The item is currently being fetched.  If a previous value\n     *   is present and allowed, that will be returned.\n     * - stale: The item is in the cache, and is stale.\n     * - hit: the item is in the cache\n     * - miss: the item is not in the cache\n     */\n    get?: 'stale' | 'hit' | 'miss'\n\n    /**\n     * A fetch or get operation returned a stale value.\n     */\n    returnedStale?: true\n  }\n\n  /**\n   * options which override the options set in the LRUCache constructor\n   * when calling {@link LRUCache#fetch}.\n   *\n   * This is the union of {@link GetOptions} and {@link SetOptions}, plus\n   * {@link OptionsBase.noDeleteOnFetchRejection},\n   * {@link OptionsBase.allowStaleOnFetchRejection},\n   * {@link FetchOptions.forceRefresh}, and\n   * {@link FetcherOptions.context}\n   *\n   * Any of these may be modified in the {@link OptionsBase.fetchMethod}\n   * function, but the {@link GetOptions} fields will of course have no\n   * effect, as the {@link LRUCache#get} call already happened by the time\n   * the fetchMethod is called.\n   */\n  export interface FetcherFetchOptions\n    extends Pick<\n      OptionsBase,\n      | 'allowStale'\n      | 'updateAgeOnGet'\n      | 'noDeleteOnStaleGet'\n      | 'sizeCalculation'\n      | 'ttl'\n      | 'noDisposeOnSet'\n      | 'noUpdateTTL'\n      | 'noDeleteOnFetchRejection'\n      | 'allowStaleOnFetchRejection'\n      | 'ignoreFetchAbort'\n      | 'allowStaleOnFetchAbort'\n    > {\n    status?: Status\n    size?: Size\n  }\n\n  /**\n   * Options that may be passed to the {@link LRUCache#fetch} method.\n   */\n  export interface FetchOptions\n    extends FetcherFetchOptions {\n    /**\n     * Set to true to force a re-load of the existing data, even if it\n     * is not yet stale.\n     */\n    forceRefresh?: boolean\n    /**\n     * Context provided to the {@link OptionsBase.fetchMethod} as\n     * the {@link FetcherOptions.context} param.\n     *\n     * If the FC type is specified as unknown (the default),\n     * undefined or void, then this is optional.  Otherwise, it will\n     * be required.\n     */\n    context?: FC\n    signal?: AbortSignal\n    status?: Status\n  }\n  /**\n   * Options provided to {@link LRUCache#fetch} when the FC type is something\n   * other than `unknown`, `undefined`, or `void`\n   */\n  export interface FetchOptionsWithContext\n    extends FetchOptions {\n    context: FC\n  }\n  /**\n   * Options provided to {@link LRUCache#fetch} when the FC type is\n   * `undefined` or `void`\n   */\n  export interface FetchOptionsNoContext\n    extends FetchOptions {\n    context?: undefined\n  }\n\n  export interface MemoOptions\n    extends Pick<\n      OptionsBase,\n      | 'allowStale'\n      | 'updateAgeOnGet'\n      | 'noDeleteOnStaleGet'\n      | 'sizeCalculation'\n      | 'ttl'\n      | 'noDisposeOnSet'\n      | 'noUpdateTTL'\n      | 'noDeleteOnFetchRejection'\n      | 'allowStaleOnFetchRejection'\n      | 'ignoreFetchAbort'\n      | 'allowStaleOnFetchAbort'\n    > {\n    /**\n     * Set to true to force a re-load of the existing data, even if it\n     * is not yet stale.\n     */\n    forceRefresh?: boolean\n    /**\n     * Context provided to the {@link OptionsBase.memoMethod} as\n     * the {@link MemoizerOptions.context} param.\n     *\n     * If the FC type is specified as unknown (the default),\n     * undefined or void, then this is optional.  Otherwise, it will\n     * be required.\n     */\n    context?: FC\n    status?: Status\n  }\n  /**\n   * Options provided to {@link LRUCache#memo} when the FC type is something\n   * other than `unknown`, `undefined`, or `void`\n   */\n  export interface MemoOptionsWithContext\n    extends MemoOptions {\n    context: FC\n  }\n  /**\n   * Options provided to {@link LRUCache#memo} when the FC type is\n   * `undefined` or `void`\n   */\n  export interface MemoOptionsNoContext\n    extends MemoOptions {\n    context?: undefined\n  }\n\n  /**\n   * Options provided to the\n   * {@link OptionsBase.memoMethod} function.\n   */\n  export interface MemoizerOptions {\n    options: MemoizerMemoOptions\n    /**\n     * Object provided in the {@link MemoOptions.context} option to\n     * {@link LRUCache#memo}\n     */\n    context: FC\n  }\n\n  /**\n   * options which override the options set in the LRUCache constructor\n   * when calling {@link LRUCache#memo}.\n   *\n   * This is the union of {@link GetOptions} and {@link SetOptions}, plus\n   * {@link MemoOptions.forceRefresh}, and\n   * {@link MemoerOptions.context}\n   *\n   * Any of these may be modified in the {@link OptionsBase.memoMethod}\n   * function, but the {@link GetOptions} fields will of course have no\n   * effect, as the {@link LRUCache#get} call already happened by the time\n   * the memoMethod is called.\n   */\n  export interface MemoizerMemoOptions\n    extends Pick<\n      OptionsBase,\n      | 'allowStale'\n      | 'updateAgeOnGet'\n      | 'noDeleteOnStaleGet'\n      | 'sizeCalculation'\n      | 'ttl'\n      | 'noDisposeOnSet'\n      | 'noUpdateTTL'\n    > {\n    status?: Status\n    size?: Size\n    start?: Milliseconds\n  }\n\n  /**\n   * Options that may be passed to the {@link LRUCache#has} method.\n   */\n  export interface HasOptions\n    extends Pick, 'updateAgeOnHas'> {\n    status?: Status\n  }\n\n  /**\n   * Options that may be passed to the {@link LRUCache#get} method.\n   */\n  export interface GetOptions\n    extends Pick<\n      OptionsBase,\n      'allowStale' | 'updateAgeOnGet' | 'noDeleteOnStaleGet'\n    > {\n    status?: Status\n  }\n\n  /**\n   * Options that may be passed to the {@link LRUCache#peek} method.\n   */\n  export interface PeekOptions\n    extends Pick, 'allowStale'> {}\n\n  /**\n   * Options that may be passed to the {@link LRUCache#set} method.\n   */\n  export interface SetOptions\n    extends Pick<\n      OptionsBase,\n      'sizeCalculation' | 'ttl' | 'noDisposeOnSet' | 'noUpdateTTL'\n    > {\n    /**\n     * If size tracking is enabled, then setting an explicit size\n     * in the {@link LRUCache#set} call will prevent calling the\n     * {@link OptionsBase.sizeCalculation} function.\n     */\n    size?: Size\n    /**\n     * If TTL tracking is enabled, then setting an explicit start\n     * time in the {@link LRUCache#set} call will override the\n     * default time from `performance.now()` or `Date.now()`.\n     *\n     * Note that it must be a valid value for whichever time-tracking\n     * method is in use.\n     */\n    start?: Milliseconds\n    status?: Status\n  }\n\n  /**\n   * The type signature for the {@link OptionsBase.fetchMethod} option.\n   */\n  export type Fetcher = (\n    key: K,\n    staleValue: V | undefined,\n    options: FetcherOptions\n  ) => Promise | V | undefined | void\n\n  /**\n   * the type signature for the {@link OptionsBase.memoMethod} option.\n   */\n  export type Memoizer = (\n    key: K,\n    staleValue: V | undefined,\n    options: MemoizerOptions\n  ) => V\n\n  /**\n   * Options which may be passed to the {@link LRUCache} constructor.\n   *\n   * Most of these may be overridden in the various options that use\n   * them.\n   *\n   * Despite all being technically optional, the constructor requires that\n   * a cache is at minimum limited by one or more of {@link OptionsBase.max},\n   * {@link OptionsBase.ttl}, or {@link OptionsBase.maxSize}.\n   *\n   * If {@link OptionsBase.ttl} is used alone, then it is strongly advised\n   * (and in fact required by the type definitions here) that the cache\n   * also set {@link OptionsBase.ttlAutopurge}, to prevent potentially\n   * unbounded storage.\n   *\n   * All options are also available on the {@link LRUCache} instance, making\n   * it safe to pass an LRUCache instance as the options argumemnt to\n   * make another empty cache of the same type.\n   *\n   * Some options are marked as read-only, because changing them after\n   * instantiation is not safe. Changing any of the other options will of\n   * course only have an effect on subsequent method calls.\n   */\n  export interface OptionsBase {\n    /**\n     * The maximum number of items to store in the cache before evicting\n     * old entries. This is read-only on the {@link LRUCache} instance,\n     * and may not be overridden.\n     *\n     * If set, then storage space will be pre-allocated at construction\n     * time, and the cache will perform significantly faster.\n     *\n     * Note that significantly fewer items may be stored, if\n     * {@link OptionsBase.maxSize} and/or {@link OptionsBase.ttl} are also\n     * set.\n     *\n     * **It is strongly recommended to set a `max` to prevent unbounded growth\n     * of the cache.**\n     */\n    max?: Count\n\n    /**\n     * Max time in milliseconds for items to live in cache before they are\n     * considered stale.  Note that stale items are NOT preemptively removed by\n     * default, and MAY live in the cache, contributing to its LRU max, long\n     * after they have expired, unless {@link OptionsBase.ttlAutopurge} is\n     * set.\n     *\n     * If set to `0` (the default value), then that means \"do not track\n     * TTL\", not \"expire immediately\".\n     *\n     * Also, as this cache is optimized for LRU/MRU operations, some of\n     * the staleness/TTL checks will reduce performance, as they will incur\n     * overhead by deleting items.\n     *\n     * This is not primarily a TTL cache, and does not make strong TTL\n     * guarantees. There is no pre-emptive pruning of expired items, but you\n     * _may_ set a TTL on the cache, and it will treat expired items as missing\n     * when they are fetched, and delete them.\n     *\n     * Optional, but must be a non-negative integer in ms if specified.\n     *\n     * This may be overridden by passing an options object to `cache.set()`.\n     *\n     * At least one of `max`, `maxSize`, or `TTL` is required. This must be a\n     * positive integer if set.\n     *\n     * Even if ttl tracking is enabled, **it is strongly recommended to set a\n     * `max` to prevent unbounded growth of the cache.**\n     *\n     * If ttl tracking is enabled, and `max` and `maxSize` are not set,\n     * and `ttlAutopurge` is not set, then a warning will be emitted\n     * cautioning about the potential for unbounded memory consumption.\n     * (The TypeScript definitions will also discourage this.)\n     */\n    ttl?: Milliseconds\n\n    /**\n     * Minimum amount of time in ms in which to check for staleness.\n     * Defaults to 1, which means that the current time is checked\n     * at most once per millisecond.\n     *\n     * Set to 0 to check the current time every time staleness is tested.\n     * (This reduces performance, and is theoretically unnecessary.)\n     *\n     * Setting this to a higher value will improve performance somewhat\n     * while using ttl tracking, albeit at the expense of keeping stale\n     * items around a bit longer than their TTLs would indicate.\n     *\n     * @default 1\n     */\n    ttlResolution?: Milliseconds\n\n    /**\n     * Preemptively remove stale items from the cache.\n     *\n     * Note that this may *significantly* degrade performance, especially if\n     * the cache is storing a large number of items. It is almost always best\n     * to just leave the stale items in the cache, and let them fall out as new\n     * items are added.\n     *\n     * Note that this means that {@link OptionsBase.allowStale} is a bit\n     * pointless, as stale items will be deleted almost as soon as they\n     * expire.\n     *\n     * Use with caution!\n     */\n    ttlAutopurge?: boolean\n\n    /**\n     * When using time-expiring entries with `ttl`, setting this to `true` will\n     * make each item's age reset to 0 whenever it is retrieved from cache with\n     * {@link LRUCache#get}, causing it to not expire. (It can still fall out\n     * of cache based on recency of use, of course.)\n     *\n     * Has no effect if {@link OptionsBase.ttl} is not set.\n     *\n     * This may be overridden by passing an options object to `cache.get()`.\n     */\n    updateAgeOnGet?: boolean\n\n    /**\n     * When using time-expiring entries with `ttl`, setting this to `true` will\n     * make each item's age reset to 0 whenever its presence in the cache is\n     * checked with {@link LRUCache#has}, causing it to not expire. (It can\n     * still fall out of cache based on recency of use, of course.)\n     *\n     * Has no effect if {@link OptionsBase.ttl} is not set.\n     */\n    updateAgeOnHas?: boolean\n\n    /**\n     * Allow {@link LRUCache#get} and {@link LRUCache#fetch} calls to return\n     * stale data, if available.\n     *\n     * By default, if you set `ttl`, stale items will only be deleted from the\n     * cache when you `get(key)`. That is, it's not preemptively pruning items,\n     * unless {@link OptionsBase.ttlAutopurge} is set.\n     *\n     * If you set `allowStale:true`, it'll return the stale value *as well as*\n     * deleting it. If you don't set this, then it'll return `undefined` when\n     * you try to get a stale entry.\n     *\n     * Note that when a stale entry is fetched, _even if it is returned due to\n     * `allowStale` being set_, it is removed from the cache immediately. You\n     * can suppress this behavior by setting\n     * {@link OptionsBase.noDeleteOnStaleGet}, either in the constructor, or in\n     * the options provided to {@link LRUCache#get}.\n     *\n     * This may be overridden by passing an options object to `cache.get()`.\n     * The `cache.has()` method will always return `false` for stale items.\n     *\n     * Only relevant if a ttl is set.\n     */\n    allowStale?: boolean\n\n    /**\n     * Function that is called on items when they are dropped from the\n     * cache, as `dispose(value, key, reason)`.\n     *\n     * This can be handy if you want to close file descriptors or do\n     * other cleanup tasks when items are no longer stored in the cache.\n     *\n     * **NOTE**: It is called _before_ the item has been fully removed\n     * from the cache, so if you want to put it right back in, you need\n     * to wait until the next tick. If you try to add it back in during\n     * the `dispose()` function call, it will break things in subtle and\n     * weird ways.\n     *\n     * Unlike several other options, this may _not_ be overridden by\n     * passing an option to `set()`, for performance reasons.\n     *\n     * The `reason` will be one of the following strings, corresponding\n     * to the reason for the item's deletion:\n     *\n     * - `evict` Item was evicted to make space for a new addition\n     * - `set` Item was overwritten by a new value\n     * - `expire` Item expired its TTL\n     * - `fetch` Item was deleted due to a failed or aborted fetch, or a\n     *   fetchMethod returning `undefined.\n     * - `delete` Item was removed by explicit `cache.delete(key)`,\n     *   `cache.clear()`, or `cache.set(key, undefined)`.\n     */\n    dispose?: Disposer\n\n    /**\n     * The same as {@link OptionsBase.dispose}, but called *after* the entry\n     * is completely removed and the cache is once again in a clean state.\n     *\n     * It is safe to add an item right back into the cache at this point.\n     * However, note that it is *very* easy to inadvertently create infinite\n     * recursion this way.\n     */\n    disposeAfter?: Disposer\n\n    /**\n     * Set to true to suppress calling the\n     * {@link OptionsBase.dispose} function if the entry key is\n     * still accessible within the cache.\n     *\n     * This may be overridden by passing an options object to\n     * {@link LRUCache#set}.\n     *\n     * Only relevant if `dispose` or `disposeAfter` are set.\n     */\n    noDisposeOnSet?: boolean\n\n    /**\n     * Boolean flag to tell the cache to not update the TTL when setting a new\n     * value for an existing key (ie, when updating a value rather than\n     * inserting a new value).  Note that the TTL value is _always_ set (if\n     * provided) when adding a new entry into the cache.\n     *\n     * Has no effect if a {@link OptionsBase.ttl} is not set.\n     *\n     * May be passed as an option to {@link LRUCache#set}.\n     */\n    noUpdateTTL?: boolean\n\n    /**\n     * Set to a positive integer to track the sizes of items added to the\n     * cache, and automatically evict items in order to stay below this size.\n     * Note that this may result in fewer than `max` items being stored.\n     *\n     * Attempting to add an item to the cache whose calculated size is greater\n     * that this amount will be a no-op. The item will not be cached, and no\n     * other items will be evicted.\n     *\n     * Optional, must be a positive integer if provided.\n     *\n     * Sets `maxEntrySize` to the same value, unless a different value is\n     * provided for `maxEntrySize`.\n     *\n     * At least one of `max`, `maxSize`, or `TTL` is required. This must be a\n     * positive integer if set.\n     *\n     * Even if size tracking is enabled, **it is strongly recommended to set a\n     * `max` to prevent unbounded growth of the cache.**\n     *\n     * Note also that size tracking can negatively impact performance,\n     * though for most cases, only minimally.\n     */\n    maxSize?: Size\n\n    /**\n     * The maximum allowed size for any single item in the cache.\n     *\n     * If a larger item is passed to {@link LRUCache#set} or returned by a\n     * {@link OptionsBase.fetchMethod} or {@link OptionsBase.memoMethod}, then\n     * it will not be stored in the cache.\n     *\n     * Attempting to add an item whose calculated size is greater than\n     * this amount will not cache the item or evict any old items, but\n     * WILL delete an existing value if one is already present.\n     *\n     * Optional, must be a positive integer if provided. Defaults to\n     * the value of `maxSize` if provided.\n     */\n    maxEntrySize?: Size\n\n    /**\n     * A function that returns a number indicating the item's size.\n     *\n     * Requires {@link OptionsBase.maxSize} to be set.\n     *\n     * If not provided, and {@link OptionsBase.maxSize} or\n     * {@link OptionsBase.maxEntrySize} are set, then all\n     * {@link LRUCache#set} calls **must** provide an explicit\n     * {@link SetOptions.size} or sizeCalculation param.\n     */\n    sizeCalculation?: SizeCalculator\n\n    /**\n     * Method that provides the implementation for {@link LRUCache#fetch}\n     *\n     * ```ts\n     * fetchMethod(key, staleValue, { signal, options, context })\n     * ```\n     *\n     * If `fetchMethod` is not provided, then `cache.fetch(key)` is equivalent\n     * to `Promise.resolve(cache.get(key))`.\n     *\n     * If at any time, `signal.aborted` is set to `true`, or if the\n     * `signal.onabort` method is called, or if it emits an `'abort'` event\n     * which you can listen to with `addEventListener`, then that means that\n     * the fetch should be abandoned. This may be passed along to async\n     * functions aware of AbortController/AbortSignal behavior.\n     *\n     * The `fetchMethod` should **only** return `undefined` or a Promise\n     * resolving to `undefined` if the AbortController signaled an `abort`\n     * event. In all other cases, it should return or resolve to a value\n     * suitable for adding to the cache.\n     *\n     * The `options` object is a union of the options that may be provided to\n     * `set()` and `get()`. If they are modified, then that will result in\n     * modifying the settings to `cache.set()` when the value is resolved, and\n     * in the case of\n     * {@link OptionsBase.noDeleteOnFetchRejection} and\n     * {@link OptionsBase.allowStaleOnFetchRejection}, the handling of\n     * `fetchMethod` failures.\n     *\n     * For example, a DNS cache may update the TTL based on the value returned\n     * from a remote DNS server by changing `options.ttl` in the `fetchMethod`.\n     */\n    fetchMethod?: Fetcher\n\n    /**\n     * Method that provides the implementation for {@link LRUCache#memo}\n     */\n    memoMethod?: Memoizer\n\n    /**\n     * Set to true to suppress the deletion of stale data when a\n     * {@link OptionsBase.fetchMethod} returns a rejected promise.\n     */\n    noDeleteOnFetchRejection?: boolean\n\n    /**\n     * Do not delete stale items when they are retrieved with\n     * {@link LRUCache#get}.\n     *\n     * Note that the `get` return value will still be `undefined`\n     * unless {@link OptionsBase.allowStale} is true.\n     *\n     * When using time-expiring entries with `ttl`, by default stale\n     * items will be removed from the cache when the key is accessed\n     * with `cache.get()`.\n     *\n     * Setting this option will cause stale items to remain in the cache, until\n     * they are explicitly deleted with `cache.delete(key)`, or retrieved with\n     * `noDeleteOnStaleGet` set to `false`.\n     *\n     * This may be overridden by passing an options object to `cache.get()`.\n     *\n     * Only relevant if a ttl is used.\n     */\n    noDeleteOnStaleGet?: boolean\n\n    /**\n     * Set to true to allow returning stale data when a\n     * {@link OptionsBase.fetchMethod} throws an error or returns a rejected\n     * promise.\n     *\n     * This differs from using {@link OptionsBase.allowStale} in that stale\n     * data will ONLY be returned in the case that the {@link LRUCache#fetch}\n     * fails, not any other times.\n     *\n     * If a `fetchMethod` fails, and there is no stale value available, the\n     * `fetch()` will resolve to `undefined`. Ie, all `fetchMethod` errors are\n     * suppressed.\n     *\n     * Implies `noDeleteOnFetchRejection`.\n     *\n     * This may be set in calls to `fetch()`, or defaulted on the constructor,\n     * or overridden by modifying the options object in the `fetchMethod`.\n     */\n    allowStaleOnFetchRejection?: boolean\n\n    /**\n     * Set to true to return a stale value from the cache when the\n     * `AbortSignal` passed to the {@link OptionsBase.fetchMethod} dispatches\n     * an `'abort'` event, whether user-triggered, or due to internal cache\n     * behavior.\n     *\n     * Unless {@link OptionsBase.ignoreFetchAbort} is also set, the underlying\n     * {@link OptionsBase.fetchMethod} will still be considered canceled, and\n     * any value it returns will be ignored and not cached.\n     *\n     * Caveat: since fetches are aborted when a new value is explicitly\n     * set in the cache, this can lead to fetch returning a stale value,\n     * since that was the fallback value _at the moment the `fetch()` was\n     * initiated_, even though the new updated value is now present in\n     * the cache.\n     *\n     * For example:\n     *\n     * ```ts\n     * const cache = new LRUCache({\n     *   ttl: 100,\n     *   fetchMethod: async (url, oldValue, { signal }) =>  {\n     *     const res = await fetch(url, { signal })\n     *     return await res.json()\n     *   }\n     * })\n     * cache.set('https://example.com/', { some: 'data' })\n     * // 100ms go by...\n     * const result = cache.fetch('https://example.com/')\n     * cache.set('https://example.com/', { other: 'thing' })\n     * console.log(await result) // { some: 'data' }\n     * console.log(cache.get('https://example.com/')) // { other: 'thing' }\n     * ```\n     */\n    allowStaleOnFetchAbort?: boolean\n\n    /**\n     * Set to true to ignore the `abort` event emitted by the `AbortSignal`\n     * object passed to {@link OptionsBase.fetchMethod}, and still cache the\n     * resulting resolution value, as long as it is not `undefined`.\n     *\n     * When used on its own, this means aborted {@link LRUCache#fetch} calls\n     * are not immediately resolved or rejected when they are aborted, and\n     * instead take the full time to await.\n     *\n     * When used with {@link OptionsBase.allowStaleOnFetchAbort}, aborted\n     * {@link LRUCache#fetch} calls will resolve immediately to their stale\n     * cached value or `undefined`, and will continue to process and eventually\n     * update the cache when they resolve, as long as the resulting value is\n     * not `undefined`, thus supporting a \"return stale on timeout while\n     * refreshing\" mechanism by passing `AbortSignal.timeout(n)` as the signal.\n     *\n     * For example:\n     *\n     * ```ts\n     * const c = new LRUCache({\n     *   ttl: 100,\n     *   ignoreFetchAbort: true,\n     *   allowStaleOnFetchAbort: true,\n     *   fetchMethod: async (key, oldValue, { signal }) => {\n     *     // note: do NOT pass the signal to fetch()!\n     *     // let's say this fetch can take a long time.\n     *     const res = await fetch(`https://slow-backend-server/${key}`)\n     *     return await res.json()\n     *   },\n     * })\n     *\n     * // this will return the stale value after 100ms, while still\n     * // updating in the background for next time.\n     * const val = await c.fetch('key', { signal: AbortSignal.timeout(100) })\n     * ```\n     *\n     * **Note**: regardless of this setting, an `abort` event _is still\n     * emitted on the `AbortSignal` object_, so may result in invalid results\n     * when passed to other underlying APIs that use AbortSignals.\n     *\n     * This may be overridden in the {@link OptionsBase.fetchMethod} or the\n     * call to {@link LRUCache#fetch}.\n     */\n    ignoreFetchAbort?: boolean\n  }\n\n  export interface OptionsMaxLimit\n    extends OptionsBase {\n    max: Count\n  }\n  export interface OptionsTTLLimit\n    extends OptionsBase {\n    ttl: Milliseconds\n    ttlAutopurge: boolean\n  }\n  export interface OptionsSizeLimit\n    extends OptionsBase {\n    maxSize: Size\n  }\n\n  /**\n   * The valid safe options for the {@link LRUCache} constructor\n   */\n  export type Options =\n    | OptionsMaxLimit\n    | OptionsSizeLimit\n    | OptionsTTLLimit\n\n  /**\n   * Entry objects used by {@link LRUCache#load} and {@link LRUCache#dump},\n   * and returned by {@link LRUCache#info}.\n   */\n  export interface Entry {\n    value: V\n    ttl?: Milliseconds\n    size?: Size\n    start?: Milliseconds\n  }\n}\n\n/**\n * Default export, the thing you're using this module to get.\n *\n * The `K` and `V` types define the key and value types, respectively. The\n * optional `FC` type defines the type of the `context` object passed to\n * `cache.fetch()` and `cache.memo()`.\n *\n * Keys and values **must not** be `null` or `undefined`.\n *\n * All properties from the options object (with the exception of `max`,\n * `maxSize`, `fetchMethod`, `memoMethod`, `dispose` and `disposeAfter`) are\n * added as normal public members. (The listed options are read-only getters.)\n *\n * Changing any of these will alter the defaults for subsequent method calls.\n */\nexport class LRUCache\n  implements Map\n{\n  // options that cannot be changed without disaster\n  readonly #max: LRUCache.Count\n  readonly #maxSize: LRUCache.Size\n  readonly #dispose?: LRUCache.Disposer\n  readonly #disposeAfter?: LRUCache.Disposer\n  readonly #fetchMethod?: LRUCache.Fetcher\n  readonly #memoMethod?: LRUCache.Memoizer\n\n  /**\n   * {@link LRUCache.OptionsBase.ttl}\n   */\n  ttl: LRUCache.Milliseconds\n\n  /**\n   * {@link LRUCache.OptionsBase.ttlResolution}\n   */\n  ttlResolution: LRUCache.Milliseconds\n  /**\n   * {@link LRUCache.OptionsBase.ttlAutopurge}\n   */\n  ttlAutopurge: boolean\n  /**\n   * {@link LRUCache.OptionsBase.updateAgeOnGet}\n   */\n  updateAgeOnGet: boolean\n  /**\n   * {@link LRUCache.OptionsBase.updateAgeOnHas}\n   */\n  updateAgeOnHas: boolean\n  /**\n   * {@link LRUCache.OptionsBase.allowStale}\n   */\n  allowStale: boolean\n\n  /**\n   * {@link LRUCache.OptionsBase.noDisposeOnSet}\n   */\n  noDisposeOnSet: boolean\n  /**\n   * {@link LRUCache.OptionsBase.noUpdateTTL}\n   */\n  noUpdateTTL: boolean\n  /**\n   * {@link LRUCache.OptionsBase.maxEntrySize}\n   */\n  maxEntrySize: LRUCache.Size\n  /**\n   * {@link LRUCache.OptionsBase.sizeCalculation}\n   */\n  sizeCalculation?: LRUCache.SizeCalculator\n  /**\n   * {@link LRUCache.OptionsBase.noDeleteOnFetchRejection}\n   */\n  noDeleteOnFetchRejection: boolean\n  /**\n   * {@link LRUCache.OptionsBase.noDeleteOnStaleGet}\n   */\n  noDeleteOnStaleGet: boolean\n  /**\n   * {@link LRUCache.OptionsBase.allowStaleOnFetchAbort}\n   */\n  allowStaleOnFetchAbort: boolean\n  /**\n   * {@link LRUCache.OptionsBase.allowStaleOnFetchRejection}\n   */\n  allowStaleOnFetchRejection: boolean\n  /**\n   * {@link LRUCache.OptionsBase.ignoreFetchAbort}\n   */\n  ignoreFetchAbort: boolean\n\n  // computed properties\n  #size: LRUCache.Count\n  #calculatedSize: LRUCache.Size\n  #keyMap: Map\n  #keyList: (K | undefined)[]\n  #valList: (V | BackgroundFetch | undefined)[]\n  #next: NumberArray\n  #prev: NumberArray\n  #head: Index\n  #tail: Index\n  #free: StackLike\n  #disposed?: DisposeTask[]\n  #sizes?: ZeroArray\n  #starts?: ZeroArray\n  #ttls?: ZeroArray\n\n  #hasDispose: boolean\n  #hasFetchMethod: boolean\n  #hasDisposeAfter: boolean\n\n  /**\n   * Do not call this method unless you need to inspect the\n   * inner workings of the cache.  If anything returned by this\n   * object is modified in any way, strange breakage may occur.\n   *\n   * These fields are private for a reason!\n   *\n   * @internal\n   */\n  static unsafeExposeInternals<\n    K extends {},\n    V extends {},\n    FC extends unknown = unknown\n  >(c: LRUCache) {\n    return {\n      // properties\n      starts: c.#starts,\n      ttls: c.#ttls,\n      sizes: c.#sizes,\n      keyMap: c.#keyMap as Map,\n      keyList: c.#keyList,\n      valList: c.#valList,\n      next: c.#next,\n      prev: c.#prev,\n      get head() {\n        return c.#head\n      },\n      get tail() {\n        return c.#tail\n      },\n      free: c.#free,\n      // methods\n      isBackgroundFetch: (p: any) => c.#isBackgroundFetch(p),\n      backgroundFetch: (\n        k: K,\n        index: number | undefined,\n        options: LRUCache.FetchOptions,\n        context: any\n      ): BackgroundFetch =>\n        c.#backgroundFetch(\n          k,\n          index as Index | undefined,\n          options,\n          context\n        ),\n      moveToTail: (index: number): void =>\n        c.#moveToTail(index as Index),\n      indexes: (options?: { allowStale: boolean }) =>\n        c.#indexes(options),\n      rindexes: (options?: { allowStale: boolean }) =>\n        c.#rindexes(options),\n      isStale: (index: number | undefined) =>\n        c.#isStale(index as Index),\n    }\n  }\n\n  // Protected read-only members\n\n  /**\n   * {@link LRUCache.OptionsBase.max} (read-only)\n   */\n  get max(): LRUCache.Count {\n    return this.#max\n  }\n  /**\n   * {@link LRUCache.OptionsBase.maxSize} (read-only)\n   */\n  get maxSize(): LRUCache.Count {\n    return this.#maxSize\n  }\n  /**\n   * The total computed size of items in the cache (read-only)\n   */\n  get calculatedSize(): LRUCache.Size {\n    return this.#calculatedSize\n  }\n  /**\n   * The number of items stored in the cache (read-only)\n   */\n  get size(): LRUCache.Count {\n    return this.#size\n  }\n  /**\n   * {@link LRUCache.OptionsBase.fetchMethod} (read-only)\n   */\n  get fetchMethod(): LRUCache.Fetcher | undefined {\n    return this.#fetchMethod\n  }\n  get memoMethod(): LRUCache.Memoizer | undefined {\n    return this.#memoMethod\n  }\n  /**\n   * {@link LRUCache.OptionsBase.dispose} (read-only)\n   */\n  get dispose() {\n    return this.#dispose\n  }\n  /**\n   * {@link LRUCache.OptionsBase.disposeAfter} (read-only)\n   */\n  get disposeAfter() {\n    return this.#disposeAfter\n  }\n\n  constructor(\n    options: LRUCache.Options | LRUCache\n  ) {\n    const {\n      max = 0,\n      ttl,\n      ttlResolution = 1,\n      ttlAutopurge,\n      updateAgeOnGet,\n      updateAgeOnHas,\n      allowStale,\n      dispose,\n      disposeAfter,\n      noDisposeOnSet,\n      noUpdateTTL,\n      maxSize = 0,\n      maxEntrySize = 0,\n      sizeCalculation,\n      fetchMethod,\n      memoMethod,\n      noDeleteOnFetchRejection,\n      noDeleteOnStaleGet,\n      allowStaleOnFetchRejection,\n      allowStaleOnFetchAbort,\n      ignoreFetchAbort,\n    } = options\n\n    if (max !== 0 && !isPosInt(max)) {\n      throw new TypeError('max option must be a nonnegative integer')\n    }\n\n    const UintArray = max ? getUintArray(max) : Array\n    if (!UintArray) {\n      throw new Error('invalid max value: ' + max)\n    }\n\n    this.#max = max\n    this.#maxSize = maxSize\n    this.maxEntrySize = maxEntrySize || this.#maxSize\n    this.sizeCalculation = sizeCalculation\n    if (this.sizeCalculation) {\n      if (!this.#maxSize && !this.maxEntrySize) {\n        throw new TypeError(\n          'cannot set sizeCalculation without setting maxSize or maxEntrySize'\n        )\n      }\n      if (typeof this.sizeCalculation !== 'function') {\n        throw new TypeError('sizeCalculation set to non-function')\n      }\n    }\n\n    if (\n      memoMethod !== undefined &&\n      typeof memoMethod !== 'function'\n    ) {\n      throw new TypeError('memoMethod must be a function if defined')\n    }\n    this.#memoMethod = memoMethod\n\n    if (\n      fetchMethod !== undefined &&\n      typeof fetchMethod !== 'function'\n    ) {\n      throw new TypeError(\n        'fetchMethod must be a function if specified'\n      )\n    }\n    this.#fetchMethod = fetchMethod\n    this.#hasFetchMethod = !!fetchMethod\n\n    this.#keyMap = new Map()\n    this.#keyList = new Array(max).fill(undefined)\n    this.#valList = new Array(max).fill(undefined)\n    this.#next = new UintArray(max)\n    this.#prev = new UintArray(max)\n    this.#head = 0 as Index\n    this.#tail = 0 as Index\n    this.#free = Stack.create(max)\n    this.#size = 0\n    this.#calculatedSize = 0\n\n    if (typeof dispose === 'function') {\n      this.#dispose = dispose\n    }\n    if (typeof disposeAfter === 'function') {\n      this.#disposeAfter = disposeAfter\n      this.#disposed = []\n    } else {\n      this.#disposeAfter = undefined\n      this.#disposed = undefined\n    }\n    this.#hasDispose = !!this.#dispose\n    this.#hasDisposeAfter = !!this.#disposeAfter\n\n    this.noDisposeOnSet = !!noDisposeOnSet\n    this.noUpdateTTL = !!noUpdateTTL\n    this.noDeleteOnFetchRejection = !!noDeleteOnFetchRejection\n    this.allowStaleOnFetchRejection = !!allowStaleOnFetchRejection\n    this.allowStaleOnFetchAbort = !!allowStaleOnFetchAbort\n    this.ignoreFetchAbort = !!ignoreFetchAbort\n\n    // NB: maxEntrySize is set to maxSize if it's set\n    if (this.maxEntrySize !== 0) {\n      if (this.#maxSize !== 0) {\n        if (!isPosInt(this.#maxSize)) {\n          throw new TypeError(\n            'maxSize must be a positive integer if specified'\n          )\n        }\n      }\n      if (!isPosInt(this.maxEntrySize)) {\n        throw new TypeError(\n          'maxEntrySize must be a positive integer if specified'\n        )\n      }\n      this.#initializeSizeTracking()\n    }\n\n    this.allowStale = !!allowStale\n    this.noDeleteOnStaleGet = !!noDeleteOnStaleGet\n    this.updateAgeOnGet = !!updateAgeOnGet\n    this.updateAgeOnHas = !!updateAgeOnHas\n    this.ttlResolution =\n      isPosInt(ttlResolution) || ttlResolution === 0\n        ? ttlResolution\n        : 1\n    this.ttlAutopurge = !!ttlAutopurge\n    this.ttl = ttl || 0\n    if (this.ttl) {\n      if (!isPosInt(this.ttl)) {\n        throw new TypeError(\n          'ttl must be a positive integer if specified'\n        )\n      }\n      this.#initializeTTLTracking()\n    }\n\n    // do not allow completely unbounded caches\n    if (this.#max === 0 && this.ttl === 0 && this.#maxSize === 0) {\n      throw new TypeError(\n        'At least one of max, maxSize, or ttl is required'\n      )\n    }\n    if (!this.ttlAutopurge && !this.#max && !this.#maxSize) {\n      const code = 'LRU_CACHE_UNBOUNDED'\n      if (shouldWarn(code)) {\n        warned.add(code)\n        const msg =\n          'TTL caching without ttlAutopurge, max, or maxSize can ' +\n          'result in unbounded memory consumption.'\n        emitWarning(msg, 'UnboundedCacheWarning', code, LRUCache)\n      }\n    }\n  }\n\n  /**\n   * Return the number of ms left in the item's TTL. If item is not in cache,\n   * returns `0`. Returns `Infinity` if item is in cache without a defined TTL.\n   */\n  getRemainingTTL(key: K) {\n    return this.#keyMap.has(key) ? Infinity : 0\n  }\n\n  #initializeTTLTracking() {\n    const ttls = new ZeroArray(this.#max)\n    const starts = new ZeroArray(this.#max)\n    this.#ttls = ttls\n    this.#starts = starts\n\n    this.#setItemTTL = (index, ttl, start = perf.now()) => {\n      starts[index] = ttl !== 0 ? start : 0\n      ttls[index] = ttl\n      if (ttl !== 0 && this.ttlAutopurge) {\n        const t = setTimeout(() => {\n          if (this.#isStale(index)) {\n            this.#delete(this.#keyList[index] as K, 'expire')\n          }\n        }, ttl + 1)\n        // unref() not supported on all platforms\n        /* c8 ignore start */\n        if (t.unref) {\n          t.unref()\n        }\n        /* c8 ignore stop */\n      }\n    }\n\n    this.#updateItemAge = index => {\n      starts[index] = ttls[index] !== 0 ? perf.now() : 0\n    }\n\n    this.#statusTTL = (status, index) => {\n      if (ttls[index]) {\n        const ttl = ttls[index]\n        const start = starts[index]\n        /* c8 ignore next */\n        if (!ttl || !start) return\n        status.ttl = ttl\n        status.start = start\n        status.now = cachedNow || getNow()\n        const age = status.now - start\n        status.remainingTTL = ttl - age\n      }\n    }\n\n    // debounce calls to perf.now() to 1s so we're not hitting\n    // that costly call repeatedly.\n    let cachedNow = 0\n    const getNow = () => {\n      const n = perf.now()\n      if (this.ttlResolution > 0) {\n        cachedNow = n\n        const t = setTimeout(\n          () => (cachedNow = 0),\n          this.ttlResolution\n        )\n        // not available on all platforms\n        /* c8 ignore start */\n        if (t.unref) {\n          t.unref()\n        }\n        /* c8 ignore stop */\n      }\n      return n\n    }\n\n    this.getRemainingTTL = key => {\n      const index = this.#keyMap.get(key)\n      if (index === undefined) {\n        return 0\n      }\n      const ttl = ttls[index]\n      const start = starts[index]\n      if (!ttl || !start) {\n        return Infinity\n      }\n      const age = (cachedNow || getNow()) - start\n      return ttl - age\n    }\n\n    this.#isStale = index => {\n      const s = starts[index]\n      const t = ttls[index]\n      return !!t && !!s && (cachedNow || getNow()) - s > t\n    }\n  }\n\n  // conditionally set private methods related to TTL\n  #updateItemAge: (index: Index) => void = () => {}\n  #statusTTL: (status: LRUCache.Status, index: Index) => void =\n    () => {}\n  #setItemTTL: (\n    index: Index,\n    ttl: LRUCache.Milliseconds,\n    start?: LRUCache.Milliseconds\n    // ignore because we never call this if we're not already in TTL mode\n    /* c8 ignore start */\n  ) => void = () => {}\n  /* c8 ignore stop */\n\n  #isStale: (index: Index) => boolean = () => false\n\n  #initializeSizeTracking() {\n    const sizes = new ZeroArray(this.#max)\n    this.#calculatedSize = 0\n    this.#sizes = sizes\n    this.#removeItemSize = index => {\n      this.#calculatedSize -= sizes[index] as number\n      sizes[index] = 0\n    }\n    this.#requireSize = (k, v, size, sizeCalculation) => {\n      // provisionally accept background fetches.\n      // actual value size will be checked when they return.\n      if (this.#isBackgroundFetch(v)) {\n        return 0\n      }\n      if (!isPosInt(size)) {\n        if (sizeCalculation) {\n          if (typeof sizeCalculation !== 'function') {\n            throw new TypeError('sizeCalculation must be a function')\n          }\n          size = sizeCalculation(v, k)\n          if (!isPosInt(size)) {\n            throw new TypeError(\n              'sizeCalculation return invalid (expect positive integer)'\n            )\n          }\n        } else {\n          throw new TypeError(\n            'invalid size value (must be positive integer). ' +\n              'When maxSize or maxEntrySize is used, sizeCalculation ' +\n              'or size must be set.'\n          )\n        }\n      }\n      return size\n    }\n    this.#addItemSize = (\n      index: Index,\n      size: LRUCache.Size,\n      status?: LRUCache.Status\n    ) => {\n      sizes[index] = size\n      if (this.#maxSize) {\n        const maxSize = this.#maxSize - (sizes[index] as number)\n        while (this.#calculatedSize > maxSize) {\n          this.#evict(true)\n        }\n      }\n      this.#calculatedSize += sizes[index] as number\n      if (status) {\n        status.entrySize = size\n        status.totalCalculatedSize = this.#calculatedSize\n      }\n    }\n  }\n\n  #removeItemSize: (index: Index) => void = _i => {}\n  #addItemSize: (\n    index: Index,\n    size: LRUCache.Size,\n    status?: LRUCache.Status\n  ) => void = (_i, _s, _st) => {}\n  #requireSize: (\n    k: K,\n    v: V | BackgroundFetch,\n    size?: LRUCache.Size,\n    sizeCalculation?: LRUCache.SizeCalculator\n  ) => LRUCache.Size = (\n    _k: K,\n    _v: V | BackgroundFetch,\n    size?: LRUCache.Size,\n    sizeCalculation?: LRUCache.SizeCalculator\n  ) => {\n    if (size || sizeCalculation) {\n      throw new TypeError(\n        'cannot set size without setting maxSize or maxEntrySize on cache'\n      )\n    }\n    return 0\n  };\n\n  *#indexes({ allowStale = this.allowStale } = {}) {\n    if (this.#size) {\n      for (let i = this.#tail; true; ) {\n        if (!this.#isValidIndex(i)) {\n          break\n        }\n        if (allowStale || !this.#isStale(i)) {\n          yield i\n        }\n        if (i === this.#head) {\n          break\n        } else {\n          i = this.#prev[i] as Index\n        }\n      }\n    }\n  }\n\n  *#rindexes({ allowStale = this.allowStale } = {}) {\n    if (this.#size) {\n      for (let i = this.#head; true; ) {\n        if (!this.#isValidIndex(i)) {\n          break\n        }\n        if (allowStale || !this.#isStale(i)) {\n          yield i\n        }\n        if (i === this.#tail) {\n          break\n        } else {\n          i = this.#next[i] as Index\n        }\n      }\n    }\n  }\n\n  #isValidIndex(index: Index) {\n    return (\n      index !== undefined &&\n      this.#keyMap.get(this.#keyList[index] as K) === index\n    )\n  }\n\n  /**\n   * Return a generator yielding `[key, value]` pairs,\n   * in order from most recently used to least recently used.\n   */\n  *entries() {\n    for (const i of this.#indexes()) {\n      if (\n        this.#valList[i] !== undefined &&\n        this.#keyList[i] !== undefined &&\n        !this.#isBackgroundFetch(this.#valList[i])\n      ) {\n        yield [this.#keyList[i], this.#valList[i]] as [K, V]\n      }\n    }\n  }\n\n  /**\n   * Inverse order version of {@link LRUCache.entries}\n   *\n   * Return a generator yielding `[key, value]` pairs,\n   * in order from least recently used to most recently used.\n   */\n  *rentries() {\n    for (const i of this.#rindexes()) {\n      if (\n        this.#valList[i] !== undefined &&\n        this.#keyList[i] !== undefined &&\n        !this.#isBackgroundFetch(this.#valList[i])\n      ) {\n        yield [this.#keyList[i], this.#valList[i]]\n      }\n    }\n  }\n\n  /**\n   * Return a generator yielding the keys in the cache,\n   * in order from most recently used to least recently used.\n   */\n  *keys() {\n    for (const i of this.#indexes()) {\n      const k = this.#keyList[i]\n      if (\n        k !== undefined &&\n        !this.#isBackgroundFetch(this.#valList[i])\n      ) {\n        yield k\n      }\n    }\n  }\n\n  /**\n   * Inverse order version of {@link LRUCache.keys}\n   *\n   * Return a generator yielding the keys in the cache,\n   * in order from least recently used to most recently used.\n   */\n  *rkeys() {\n    for (const i of this.#rindexes()) {\n      const k = this.#keyList[i]\n      if (\n        k !== undefined &&\n        !this.#isBackgroundFetch(this.#valList[i])\n      ) {\n        yield k\n      }\n    }\n  }\n\n  /**\n   * Return a generator yielding the values in the cache,\n   * in order from most recently used to least recently used.\n   */\n  *values() {\n    for (const i of this.#indexes()) {\n      const v = this.#valList[i]\n      if (\n        v !== undefined &&\n        !this.#isBackgroundFetch(this.#valList[i])\n      ) {\n        yield this.#valList[i] as V\n      }\n    }\n  }\n\n  /**\n   * Inverse order version of {@link LRUCache.values}\n   *\n   * Return a generator yielding the values in the cache,\n   * in order from least recently used to most recently used.\n   */\n  *rvalues() {\n    for (const i of this.#rindexes()) {\n      const v = this.#valList[i]\n      if (\n        v !== undefined &&\n        !this.#isBackgroundFetch(this.#valList[i])\n      ) {\n        yield this.#valList[i]\n      }\n    }\n  }\n\n  /**\n   * Iterating over the cache itself yields the same results as\n   * {@link LRUCache.entries}\n   */\n  [Symbol.iterator]() {\n    return this.entries()\n  }\n\n  /**\n   * A String value that is used in the creation of the default string\n   * description of an object. Called by the built-in method\n   * `Object.prototype.toString`.\n   */\n  [Symbol.toStringTag] = 'LRUCache'\n\n  /**\n   * Find a value for which the supplied fn method returns a truthy value,\n   * similar to `Array.find()`. fn is called as `fn(value, key, cache)`.\n   */\n  find(\n    fn: (v: V, k: K, self: LRUCache) => boolean,\n    getOptions: LRUCache.GetOptions = {}\n  ) {\n    for (const i of this.#indexes()) {\n      const v = this.#valList[i]\n      const value = this.#isBackgroundFetch(v)\n        ? v.__staleWhileFetching\n        : v\n      if (value === undefined) continue\n      if (fn(value, this.#keyList[i] as K, this)) {\n        return this.get(this.#keyList[i] as K, getOptions)\n      }\n    }\n  }\n\n  /**\n   * Call the supplied function on each item in the cache, in order from most\n   * recently used to least recently used.\n   *\n   * `fn` is called as `fn(value, key, cache)`.\n   *\n   * If `thisp` is provided, function will be called in the `this`-context of\n   * the provided object, or the cache if no `thisp` object is provided.\n   *\n   * Does not update age or recenty of use, or iterate over stale values.\n   */\n  forEach(\n    fn: (v: V, k: K, self: LRUCache) => any,\n    thisp: any = this\n  ) {\n    for (const i of this.#indexes()) {\n      const v = this.#valList[i]\n      const value = this.#isBackgroundFetch(v)\n        ? v.__staleWhileFetching\n        : v\n      if (value === undefined) continue\n      fn.call(thisp, value, this.#keyList[i] as K, this)\n    }\n  }\n\n  /**\n   * The same as {@link LRUCache.forEach} but items are iterated over in\n   * reverse order.  (ie, less recently used items are iterated over first.)\n   */\n  rforEach(\n    fn: (v: V, k: K, self: LRUCache) => any,\n    thisp: any = this\n  ) {\n    for (const i of this.#rindexes()) {\n      const v = this.#valList[i]\n      const value = this.#isBackgroundFetch(v)\n        ? v.__staleWhileFetching\n        : v\n      if (value === undefined) continue\n      fn.call(thisp, value, this.#keyList[i] as K, this)\n    }\n  }\n\n  /**\n   * Delete any stale entries. Returns true if anything was removed,\n   * false otherwise.\n   */\n  purgeStale() {\n    let deleted = false\n    for (const i of this.#rindexes({ allowStale: true })) {\n      if (this.#isStale(i)) {\n        this.#delete(this.#keyList[i] as K, 'expire')\n        deleted = true\n      }\n    }\n    return deleted\n  }\n\n  /**\n   * Get the extended info about a given entry, to get its value, size, and\n   * TTL info simultaneously. Returns `undefined` if the key is not present.\n   *\n   * Unlike {@link LRUCache#dump}, which is designed to be portable and survive\n   * serialization, the `start` value is always the current timestamp, and the\n   * `ttl` is a calculated remaining time to live (negative if expired).\n   *\n   * Always returns stale values, if their info is found in the cache, so be\n   * sure to check for expirations (ie, a negative {@link LRUCache.Entry#ttl})\n   * if relevant.\n   */\n  info(key: K): LRUCache.Entry | undefined {\n    const i = this.#keyMap.get(key)\n    if (i === undefined) return undefined\n    const v = this.#valList[i]\n    const value: V | undefined = this.#isBackgroundFetch(v)\n      ? v.__staleWhileFetching\n      : v\n    if (value === undefined) return undefined\n    const entry: LRUCache.Entry = { value }\n    if (this.#ttls && this.#starts) {\n      const ttl = this.#ttls[i]\n      const start = this.#starts[i]\n      if (ttl && start) {\n        const remain = ttl - (perf.now() - start)\n        entry.ttl = remain\n        entry.start = Date.now()\n      }\n    }\n    if (this.#sizes) {\n      entry.size = this.#sizes[i]\n    }\n    return entry\n  }\n\n  /**\n   * Return an array of [key, {@link LRUCache.Entry}] tuples which can be\n   * passed to {@link LRLUCache#load}.\n   *\n   * The `start` fields are calculated relative to a portable `Date.now()`\n   * timestamp, even if `performance.now()` is available.\n   *\n   * Stale entries are always included in the `dump`, even if\n   * {@link LRUCache.OptionsBase.allowStale} is false.\n   *\n   * Note: this returns an actual array, not a generator, so it can be more\n   * easily passed around.\n   */\n  dump() {\n    const arr: [K, LRUCache.Entry][] = []\n    for (const i of this.#indexes({ allowStale: true })) {\n      const key = this.#keyList[i]\n      const v = this.#valList[i]\n      const value: V | undefined = this.#isBackgroundFetch(v)\n        ? v.__staleWhileFetching\n        : v\n      if (value === undefined || key === undefined) continue\n      const entry: LRUCache.Entry = { value }\n      if (this.#ttls && this.#starts) {\n        entry.ttl = this.#ttls[i]\n        // always dump the start relative to a portable timestamp\n        // it's ok for this to be a bit slow, it's a rare operation.\n        const age = perf.now() - (this.#starts[i] as number)\n        entry.start = Math.floor(Date.now() - age)\n      }\n      if (this.#sizes) {\n        entry.size = this.#sizes[i]\n      }\n      arr.unshift([key, entry])\n    }\n    return arr\n  }\n\n  /**\n   * Reset the cache and load in the items in entries in the order listed.\n   *\n   * The shape of the resulting cache may be different if the same options are\n   * not used in both caches.\n   *\n   * The `start` fields are assumed to be calculated relative to a portable\n   * `Date.now()` timestamp, even if `performance.now()` is available.\n   */\n  load(arr: [K, LRUCache.Entry][]) {\n    this.clear()\n    for (const [key, entry] of arr) {\n      if (entry.start) {\n        // entry.start is a portable timestamp, but we may be using\n        // node's performance.now(), so calculate the offset, so that\n        // we get the intended remaining TTL, no matter how long it's\n        // been on ice.\n        //\n        // it's ok for this to be a bit slow, it's a rare operation.\n        const age = Date.now() - entry.start\n        entry.start = perf.now() - age\n      }\n      this.set(key, entry.value, entry)\n    }\n  }\n\n  /**\n   * Add a value to the cache.\n   *\n   * Note: if `undefined` is specified as a value, this is an alias for\n   * {@link LRUCache#delete}\n   *\n   * Fields on the {@link LRUCache.SetOptions} options param will override\n   * their corresponding values in the constructor options for the scope\n   * of this single `set()` operation.\n   *\n   * If `start` is provided, then that will set the effective start\n   * time for the TTL calculation. Note that this must be a previous\n   * value of `performance.now()` if supported, or a previous value of\n   * `Date.now()` if not.\n   *\n   * Options object may also include `size`, which will prevent\n   * calling the `sizeCalculation` function and just use the specified\n   * number if it is a positive integer, and `noDisposeOnSet` which\n   * will prevent calling a `dispose` function in the case of\n   * overwrites.\n   *\n   * If the `size` (or return value of `sizeCalculation`) for a given\n   * entry is greater than `maxEntrySize`, then the item will not be\n   * added to the cache.\n   *\n   * Will update the recency of the entry.\n   *\n   * If the value is `undefined`, then this is an alias for\n   * `cache.delete(key)`. `undefined` is never stored in the cache.\n   */\n  set(\n    k: K,\n    v: V | BackgroundFetch | undefined,\n    setOptions: LRUCache.SetOptions = {}\n  ) {\n    if (v === undefined) {\n      this.delete(k)\n      return this\n    }\n    const {\n      ttl = this.ttl,\n      start,\n      noDisposeOnSet = this.noDisposeOnSet,\n      sizeCalculation = this.sizeCalculation,\n      status,\n    } = setOptions\n    let { noUpdateTTL = this.noUpdateTTL } = setOptions\n\n    const size = this.#requireSize(\n      k,\n      v,\n      setOptions.size || 0,\n      sizeCalculation\n    )\n    // if the item doesn't fit, don't do anything\n    // NB: maxEntrySize set to maxSize by default\n    if (this.maxEntrySize && size > this.maxEntrySize) {\n      if (status) {\n        status.set = 'miss'\n        status.maxEntrySizeExceeded = true\n      }\n      // have to delete, in case something is there already.\n      this.#delete(k, 'set')\n      return this\n    }\n    let index = this.#size === 0 ? undefined : this.#keyMap.get(k)\n    if (index === undefined) {\n      // addition\n      index = (\n        this.#size === 0\n          ? this.#tail\n          : this.#free.length !== 0\n          ? this.#free.pop()\n          : this.#size === this.#max\n          ? this.#evict(false)\n          : this.#size\n      ) as Index\n      this.#keyList[index] = k\n      this.#valList[index] = v\n      this.#keyMap.set(k, index)\n      this.#next[this.#tail] = index\n      this.#prev[index] = this.#tail\n      this.#tail = index\n      this.#size++\n      this.#addItemSize(index, size, status)\n      if (status) status.set = 'add'\n      noUpdateTTL = false\n    } else {\n      // update\n      this.#moveToTail(index)\n      const oldVal = this.#valList[index] as V | BackgroundFetch\n      if (v !== oldVal) {\n        if (this.#hasFetchMethod && this.#isBackgroundFetch(oldVal)) {\n          oldVal.__abortController.abort(new Error('replaced'))\n          const { __staleWhileFetching: s } = oldVal\n          if (s !== undefined && !noDisposeOnSet) {\n            if (this.#hasDispose) {\n              this.#dispose?.(s as V, k, 'set')\n            }\n            if (this.#hasDisposeAfter) {\n              this.#disposed?.push([s as V, k, 'set'])\n            }\n          }\n        } else if (!noDisposeOnSet) {\n          if (this.#hasDispose) {\n            this.#dispose?.(oldVal as V, k, 'set')\n          }\n          if (this.#hasDisposeAfter) {\n            this.#disposed?.push([oldVal as V, k, 'set'])\n          }\n        }\n        this.#removeItemSize(index)\n        this.#addItemSize(index, size, status)\n        this.#valList[index] = v\n        if (status) {\n          status.set = 'replace'\n          const oldValue =\n            oldVal && this.#isBackgroundFetch(oldVal)\n              ? oldVal.__staleWhileFetching\n              : oldVal\n          if (oldValue !== undefined) status.oldValue = oldValue\n        }\n      } else if (status) {\n        status.set = 'update'\n      }\n    }\n    if (ttl !== 0 && !this.#ttls) {\n      this.#initializeTTLTracking()\n    }\n    if (this.#ttls) {\n      if (!noUpdateTTL) {\n        this.#setItemTTL(index, ttl, start)\n      }\n      if (status) this.#statusTTL(status, index)\n    }\n    if (!noDisposeOnSet && this.#hasDisposeAfter && this.#disposed) {\n      const dt = this.#disposed\n      let task: DisposeTask | undefined\n      while ((task = dt?.shift())) {\n        this.#disposeAfter?.(...task)\n      }\n    }\n    return this\n  }\n\n  /**\n   * Evict the least recently used item, returning its value or\n   * `undefined` if cache is empty.\n   */\n  pop(): V | undefined {\n    try {\n      while (this.#size) {\n        const val = this.#valList[this.#head]\n        this.#evict(true)\n        if (this.#isBackgroundFetch(val)) {\n          if (val.__staleWhileFetching) {\n            return val.__staleWhileFetching\n          }\n        } else if (val !== undefined) {\n          return val\n        }\n      }\n    } finally {\n      if (this.#hasDisposeAfter && this.#disposed) {\n        const dt = this.#disposed\n        let task: DisposeTask | undefined\n        while ((task = dt?.shift())) {\n          this.#disposeAfter?.(...task)\n        }\n      }\n    }\n  }\n\n  #evict(free: boolean) {\n    const head = this.#head\n    const k = this.#keyList[head] as K\n    const v = this.#valList[head] as V\n    if (this.#hasFetchMethod && this.#isBackgroundFetch(v)) {\n      v.__abortController.abort(new Error('evicted'))\n    } else if (this.#hasDispose || this.#hasDisposeAfter) {\n      if (this.#hasDispose) {\n        this.#dispose?.(v, k, 'evict')\n      }\n      if (this.#hasDisposeAfter) {\n        this.#disposed?.push([v, k, 'evict'])\n      }\n    }\n    this.#removeItemSize(head)\n    // if we aren't about to use the index, then null these out\n    if (free) {\n      this.#keyList[head] = undefined\n      this.#valList[head] = undefined\n      this.#free.push(head)\n    }\n    if (this.#size === 1) {\n      this.#head = this.#tail = 0 as Index\n      this.#free.length = 0\n    } else {\n      this.#head = this.#next[head] as Index\n    }\n    this.#keyMap.delete(k)\n    this.#size--\n    return head\n  }\n\n  /**\n   * Check if a key is in the cache, without updating the recency of use.\n   * Will return false if the item is stale, even though it is technically\n   * in the cache.\n   *\n   * Check if a key is in the cache, without updating the recency of\n   * use. Age is updated if {@link LRUCache.OptionsBase.updateAgeOnHas} is set\n   * to `true` in either the options or the constructor.\n   *\n   * Will return `false` if the item is stale, even though it is technically in\n   * the cache. The difference can be determined (if it matters) by using a\n   * `status` argument, and inspecting the `has` field.\n   *\n   * Will not update item age unless\n   * {@link LRUCache.OptionsBase.updateAgeOnHas} is set.\n   */\n  has(k: K, hasOptions: LRUCache.HasOptions = {}) {\n    const { updateAgeOnHas = this.updateAgeOnHas, status } =\n      hasOptions\n    const index = this.#keyMap.get(k)\n    if (index !== undefined) {\n      const v = this.#valList[index]\n      if (\n        this.#isBackgroundFetch(v) &&\n        v.__staleWhileFetching === undefined\n      ) {\n        return false\n      }\n      if (!this.#isStale(index)) {\n        if (updateAgeOnHas) {\n          this.#updateItemAge(index)\n        }\n        if (status) {\n          status.has = 'hit'\n          this.#statusTTL(status, index)\n        }\n        return true\n      } else if (status) {\n        status.has = 'stale'\n        this.#statusTTL(status, index)\n      }\n    } else if (status) {\n      status.has = 'miss'\n    }\n    return false\n  }\n\n  /**\n   * Like {@link LRUCache#get} but doesn't update recency or delete stale\n   * items.\n   *\n   * Returns `undefined` if the item is stale, unless\n   * {@link LRUCache.OptionsBase.allowStale} is set.\n   */\n  peek(k: K, peekOptions: LRUCache.PeekOptions = {}) {\n    const { allowStale = this.allowStale } = peekOptions\n    const index = this.#keyMap.get(k)\n    if (\n      index === undefined ||\n      (!allowStale && this.#isStale(index))\n    ) {\n      return\n    }\n    const v = this.#valList[index]\n    // either stale and allowed, or forcing a refresh of non-stale value\n    return this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v\n  }\n\n  #backgroundFetch(\n    k: K,\n    index: Index | undefined,\n    options: LRUCache.FetchOptions,\n    context: any\n  ): BackgroundFetch {\n    const v = index === undefined ? undefined : this.#valList[index]\n    if (this.#isBackgroundFetch(v)) {\n      return v\n    }\n\n    const ac = new AC()\n    const { signal } = options\n    // when/if our AC signals, then stop listening to theirs.\n    signal?.addEventListener('abort', () => ac.abort(signal.reason), {\n      signal: ac.signal,\n    })\n\n    const fetchOpts = {\n      signal: ac.signal,\n      options,\n      context,\n    }\n\n    const cb = (\n      v: V | undefined,\n      updateCache = false\n    ): V | undefined => {\n      const { aborted } = ac.signal\n      const ignoreAbort = options.ignoreFetchAbort && v !== undefined\n      if (options.status) {\n        if (aborted && !updateCache) {\n          options.status.fetchAborted = true\n          options.status.fetchError = ac.signal.reason\n          if (ignoreAbort) options.status.fetchAbortIgnored = true\n        } else {\n          options.status.fetchResolved = true\n        }\n      }\n      if (aborted && !ignoreAbort && !updateCache) {\n        return fetchFail(ac.signal.reason)\n      }\n      // either we didn't abort, and are still here, or we did, and ignored\n      const bf = p as BackgroundFetch\n      if (this.#valList[index as Index] === p) {\n        if (v === undefined) {\n          if (bf.__staleWhileFetching) {\n            this.#valList[index as Index] = bf.__staleWhileFetching\n          } else {\n            this.#delete(k, 'fetch')\n          }\n        } else {\n          if (options.status) options.status.fetchUpdated = true\n          this.set(k, v, fetchOpts.options)\n        }\n      }\n      return v\n    }\n\n    const eb = (er: any) => {\n      if (options.status) {\n        options.status.fetchRejected = true\n        options.status.fetchError = er\n      }\n      return fetchFail(er)\n    }\n\n    const fetchFail = (er: any): V | undefined => {\n      const { aborted } = ac.signal\n      const allowStaleAborted =\n        aborted && options.allowStaleOnFetchAbort\n      const allowStale =\n        allowStaleAborted || options.allowStaleOnFetchRejection\n      const noDelete = allowStale || options.noDeleteOnFetchRejection\n      const bf = p as BackgroundFetch\n      if (this.#valList[index as Index] === p) {\n        // if we allow stale on fetch rejections, then we need to ensure that\n        // the stale value is not removed from the cache when the fetch fails.\n        const del = !noDelete || bf.__staleWhileFetching === undefined\n        if (del) {\n          this.#delete(k, 'fetch')\n        } else if (!allowStaleAborted) {\n          // still replace the *promise* with the stale value,\n          // since we are done with the promise at this point.\n          // leave it untouched if we're still waiting for an\n          // aborted background fetch that hasn't yet returned.\n          this.#valList[index as Index] = bf.__staleWhileFetching\n        }\n      }\n      if (allowStale) {\n        if (options.status && bf.__staleWhileFetching !== undefined) {\n          options.status.returnedStale = true\n        }\n        return bf.__staleWhileFetching\n      } else if (bf.__returned === bf) {\n        throw er\n      }\n    }\n\n    const pcall = (\n      res: (v: V | undefined) => void,\n      rej: (e: any) => void\n    ) => {\n      const fmp = this.#fetchMethod?.(k, v, fetchOpts)\n      if (fmp && fmp instanceof Promise) {\n        fmp.then(v => res(v === undefined ? undefined : v), rej)\n      }\n      // ignored, we go until we finish, regardless.\n      // defer check until we are actually aborting,\n      // so fetchMethod can override.\n      ac.signal.addEventListener('abort', () => {\n        if (\n          !options.ignoreFetchAbort ||\n          options.allowStaleOnFetchAbort\n        ) {\n          res(undefined)\n          // when it eventually resolves, update the cache.\n          if (options.allowStaleOnFetchAbort) {\n            res = v => cb(v, true)\n          }\n        }\n      })\n    }\n\n    if (options.status) options.status.fetchDispatched = true\n    const p = new Promise(pcall).then(cb, eb)\n    const bf: BackgroundFetch = Object.assign(p, {\n      __abortController: ac,\n      __staleWhileFetching: v,\n      __returned: undefined,\n    })\n\n    if (index === undefined) {\n      // internal, don't expose status.\n      this.set(k, bf, { ...fetchOpts.options, status: undefined })\n      index = this.#keyMap.get(k)\n    } else {\n      this.#valList[index] = bf\n    }\n    return bf\n  }\n\n  #isBackgroundFetch(p: any): p is BackgroundFetch {\n    if (!this.#hasFetchMethod) return false\n    const b = p as BackgroundFetch\n    return (\n      !!b &&\n      b instanceof Promise &&\n      b.hasOwnProperty('__staleWhileFetching') &&\n      b.__abortController instanceof AC\n    )\n  }\n\n  /**\n   * Make an asynchronous cached fetch using the\n   * {@link LRUCache.OptionsBase.fetchMethod} function.\n   *\n   * If the value is in the cache and not stale, then the returned\n   * Promise resolves to the value.\n   *\n   * If not in the cache, or beyond its TTL staleness, then\n   * `fetchMethod(key, staleValue, { options, signal, context })` is\n   * called, and the value returned will be added to the cache once\n   * resolved.\n   *\n   * If called with `allowStale`, and an asynchronous fetch is\n   * currently in progress to reload a stale value, then the former\n   * stale value will be returned.\n   *\n   * If called with `forceRefresh`, then the cached item will be\n   * re-fetched, even if it is not stale. However, if `allowStale` is also\n   * set, then the old value will still be returned. This is useful\n   * in cases where you want to force a reload of a cached value. If\n   * a background fetch is already in progress, then `forceRefresh`\n   * has no effect.\n   *\n   * If multiple fetches for the same key are issued, then they will all be\n   * coalesced into a single call to fetchMethod.\n   *\n   * Note that this means that handling options such as\n   * {@link LRUCache.OptionsBase.allowStaleOnFetchAbort},\n   * {@link LRUCache.FetchOptions.signal},\n   * and {@link LRUCache.OptionsBase.allowStaleOnFetchRejection} will be\n   * determined by the FIRST fetch() call for a given key.\n   *\n   * This is a known (fixable) shortcoming which will be addresed on when\n   * someone complains about it, as the fix would involve added complexity and\n   * may not be worth the costs for this edge case.\n   *\n   * If {@link LRUCache.OptionsBase.fetchMethod} is not specified, then this is\n   * effectively an alias for `Promise.resolve(cache.get(key))`.\n   *\n   * When the fetch method resolves to a value, if the fetch has not\n   * been aborted due to deletion, eviction, or being overwritten,\n   * then it is added to the cache using the options provided.\n   *\n   * If the key is evicted or deleted before the `fetchMethod`\n   * resolves, then the AbortSignal passed to the `fetchMethod` will\n   * receive an `abort` event, and the promise returned by `fetch()`\n   * will reject with the reason for the abort.\n   *\n   * If a `signal` is passed to the `fetch()` call, then aborting the\n   * signal will abort the fetch and cause the `fetch()` promise to\n   * reject with the reason provided.\n   *\n   * **Setting `context`**\n   *\n   * If an `FC` type is set to a type other than `unknown`, `void`, or\n   * `undefined` in the {@link LRUCache} constructor, then all\n   * calls to `cache.fetch()` _must_ provide a `context` option. If\n   * set to `undefined` or `void`, then calls to fetch _must not_\n   * provide a `context` option.\n   *\n   * The `context` param allows you to provide arbitrary data that\n   * might be relevant in the course of fetching the data. It is only\n   * relevant for the course of a single `fetch()` operation, and\n   * discarded afterwards.\n   *\n   * **Note: `fetch()` calls are inflight-unique**\n   *\n   * If you call `fetch()` multiple times with the same key value,\n   * then every call after the first will resolve on the same\n   * promise1,\n   * _even if they have different settings that would otherwise change\n   * the behavior of the fetch_, such as `noDeleteOnFetchRejection`\n   * or `ignoreFetchAbort`.\n   *\n   * In most cases, this is not a problem (in fact, only fetching\n   * something once is what you probably want, if you're caching in\n   * the first place). If you are changing the fetch() options\n   * dramatically between runs, there's a good chance that you might\n   * be trying to fit divergent semantics into a single object, and\n   * would be better off with multiple cache instances.\n   *\n   * **1**: Ie, they're not the \"same Promise\", but they resolve at\n   * the same time, because they're both waiting on the same\n   * underlying fetchMethod response.\n   */\n\n  fetch(\n    k: K,\n    fetchOptions: unknown extends FC\n      ? LRUCache.FetchOptions\n      : FC extends undefined | void\n      ? LRUCache.FetchOptionsNoContext\n      : LRUCache.FetchOptionsWithContext\n  ): Promise\n\n  // this overload not allowed if context is required\n  fetch(\n    k: unknown extends FC\n      ? K\n      : FC extends undefined | void\n      ? K\n      : never,\n    fetchOptions?: unknown extends FC\n      ? LRUCache.FetchOptions\n      : FC extends undefined | void\n      ? LRUCache.FetchOptionsNoContext\n      : never\n  ): Promise\n\n  async fetch(\n    k: K,\n    fetchOptions: LRUCache.FetchOptions = {}\n  ): Promise {\n    const {\n      // get options\n      allowStale = this.allowStale,\n      updateAgeOnGet = this.updateAgeOnGet,\n      noDeleteOnStaleGet = this.noDeleteOnStaleGet,\n      // set options\n      ttl = this.ttl,\n      noDisposeOnSet = this.noDisposeOnSet,\n      size = 0,\n      sizeCalculation = this.sizeCalculation,\n      noUpdateTTL = this.noUpdateTTL,\n      // fetch exclusive options\n      noDeleteOnFetchRejection = this.noDeleteOnFetchRejection,\n      allowStaleOnFetchRejection = this.allowStaleOnFetchRejection,\n      ignoreFetchAbort = this.ignoreFetchAbort,\n      allowStaleOnFetchAbort = this.allowStaleOnFetchAbort,\n      context,\n      forceRefresh = false,\n      status,\n      signal,\n    } = fetchOptions\n\n    if (!this.#hasFetchMethod) {\n      if (status) status.fetch = 'get'\n      return this.get(k, {\n        allowStale,\n        updateAgeOnGet,\n        noDeleteOnStaleGet,\n        status,\n      })\n    }\n\n    const options = {\n      allowStale,\n      updateAgeOnGet,\n      noDeleteOnStaleGet,\n      ttl,\n      noDisposeOnSet,\n      size,\n      sizeCalculation,\n      noUpdateTTL,\n      noDeleteOnFetchRejection,\n      allowStaleOnFetchRejection,\n      allowStaleOnFetchAbort,\n      ignoreFetchAbort,\n      status,\n      signal,\n    }\n\n    let index = this.#keyMap.get(k)\n    if (index === undefined) {\n      if (status) status.fetch = 'miss'\n      const p = this.#backgroundFetch(k, index, options, context)\n      return (p.__returned = p)\n    } else {\n      // in cache, maybe already fetching\n      const v = this.#valList[index]\n      if (this.#isBackgroundFetch(v)) {\n        const stale =\n          allowStale && v.__staleWhileFetching !== undefined\n        if (status) {\n          status.fetch = 'inflight'\n          if (stale) status.returnedStale = true\n        }\n        return stale ? v.__staleWhileFetching : (v.__returned = v)\n      }\n\n      // if we force a refresh, that means do NOT serve the cached value,\n      // unless we are already in the process of refreshing the cache.\n      const isStale = this.#isStale(index)\n      if (!forceRefresh && !isStale) {\n        if (status) status.fetch = 'hit'\n        this.#moveToTail(index)\n        if (updateAgeOnGet) {\n          this.#updateItemAge(index)\n        }\n        if (status) this.#statusTTL(status, index)\n        return v\n      }\n\n      // ok, it is stale or a forced refresh, and not already fetching.\n      // refresh the cache.\n      const p = this.#backgroundFetch(k, index, options, context)\n      const hasStale = p.__staleWhileFetching !== undefined\n      const staleVal = hasStale && allowStale\n      if (status) {\n        status.fetch = isStale ? 'stale' : 'refresh'\n        if (staleVal && isStale) status.returnedStale = true\n      }\n      return staleVal ? p.__staleWhileFetching : (p.__returned = p)\n    }\n  }\n\n  /**\n   * In some cases, `cache.fetch()` may resolve to `undefined`, either because\n   * a {@link LRUCache.OptionsBase#fetchMethod} was not provided (turning\n   * `cache.fetch(k)` into just an async wrapper around `cache.get(k)`) or\n   * because `ignoreFetchAbort` was specified (either to the constructor or\n   * in the {@link LRUCache.FetchOptions}). Also, the\n   * {@link OptionsBase.fetchMethod} may return `undefined` or `void`, making\n   * the test even more complicated.\n   *\n   * Because inferring the cases where `undefined` might be returned are so\n   * cumbersome, but testing for `undefined` can also be annoying, this method\n   * can be used, which will reject if `this.fetch()` resolves to undefined.\n   */\n  forceFetch(\n    k: K,\n    fetchOptions: unknown extends FC\n      ? LRUCache.FetchOptions\n      : FC extends undefined | void\n      ? LRUCache.FetchOptionsNoContext\n      : LRUCache.FetchOptionsWithContext\n  ): Promise\n  // this overload not allowed if context is required\n  forceFetch(\n    k: unknown extends FC\n      ? K\n      : FC extends undefined | void\n      ? K\n      : never,\n    fetchOptions?: unknown extends FC\n      ? LRUCache.FetchOptions\n      : FC extends undefined | void\n      ? LRUCache.FetchOptionsNoContext\n      : never\n  ): Promise\n  async forceFetch(\n    k: K,\n    fetchOptions: LRUCache.FetchOptions = {}\n  ): Promise {\n    const v = await this.fetch(\n      k,\n      fetchOptions as unknown extends FC\n        ? LRUCache.FetchOptions\n        : FC extends undefined | void\n        ? LRUCache.FetchOptionsNoContext\n        : LRUCache.FetchOptionsWithContext\n    )\n    if (v === undefined) throw new Error('fetch() returned undefined')\n    return v\n  }\n\n  /**\n   * If the key is found in the cache, then this is equivalent to\n   * {@link LRUCache#get}. If not, in the cache, then calculate the value using\n   * the {@link LRUCache.OptionsBase.memoMethod}, and add it to the cache.\n   *\n   * If an `FC` type is set to a type other than `unknown`, `void`, or\n   * `undefined` in the LRUCache constructor, then all calls to `cache.memo()`\n   * _must_ provide a `context` option. If set to `undefined` or `void`, then\n   * calls to memo _must not_ provide a `context` option.\n   *\n   * The `context` param allows you to provide arbitrary data that might be\n   * relevant in the course of fetching the data. It is only relevant for the\n   * course of a single `memo()` operation, and discarded afterwards.\n   */\n  memo(\n    k: K,\n    memoOptions: unknown extends FC\n      ? LRUCache.MemoOptions\n      : FC extends undefined | void\n      ? LRUCache.MemoOptionsNoContext\n      : LRUCache.MemoOptionsWithContext\n  ): V\n  // this overload not allowed if context is required\n  memo(\n    k: unknown extends FC\n      ? K\n      : FC extends undefined | void\n      ? K\n      : never,\n    memoOptions?: unknown extends FC\n      ? LRUCache.MemoOptions\n      : FC extends undefined | void\n      ? LRUCache.MemoOptionsNoContext\n      : never\n  ): V\n  memo(k: K, memoOptions: LRUCache.MemoOptions = {}) {\n    const memoMethod = this.#memoMethod\n    if (!memoMethod) {\n      throw new Error('no memoMethod provided to constructor')\n    }\n    const { context, forceRefresh, ...options } = memoOptions\n    const v = this.get(k, options)\n    if (!forceRefresh && v !== undefined) return v\n    const vv = memoMethod(k, v, {\n      options,\n      context,\n    } as LRUCache.MemoizerOptions)\n    this.set(k, vv, options)\n    return vv\n  }\n\n  /**\n   * Return a value from the cache. Will update the recency of the cache\n   * entry found.\n   *\n   * If the key is not found, get() will return `undefined`.\n   */\n  get(k: K, getOptions: LRUCache.GetOptions = {}) {\n    const {\n      allowStale = this.allowStale,\n      updateAgeOnGet = this.updateAgeOnGet,\n      noDeleteOnStaleGet = this.noDeleteOnStaleGet,\n      status,\n    } = getOptions\n    const index = this.#keyMap.get(k)\n    if (index !== undefined) {\n      const value = this.#valList[index]\n      const fetching = this.#isBackgroundFetch(value)\n      if (status) this.#statusTTL(status, index)\n      if (this.#isStale(index)) {\n        if (status) status.get = 'stale'\n        // delete only if not an in-flight background fetch\n        if (!fetching) {\n          if (!noDeleteOnStaleGet) {\n            this.#delete(k, 'expire')\n          }\n          if (status && allowStale) status.returnedStale = true\n          return allowStale ? value : undefined\n        } else {\n          if (\n            status &&\n            allowStale &&\n            value.__staleWhileFetching !== undefined\n          ) {\n            status.returnedStale = true\n          }\n          return allowStale ? value.__staleWhileFetching : undefined\n        }\n      } else {\n        if (status) status.get = 'hit'\n        // if we're currently fetching it, we don't actually have it yet\n        // it's not stale, which means this isn't a staleWhileRefetching.\n        // If it's not stale, and fetching, AND has a __staleWhileFetching\n        // value, then that means the user fetched with {forceRefresh:true},\n        // so it's safe to return that value.\n        if (fetching) {\n          return value.__staleWhileFetching\n        }\n        this.#moveToTail(index)\n        if (updateAgeOnGet) {\n          this.#updateItemAge(index)\n        }\n        return value\n      }\n    } else if (status) {\n      status.get = 'miss'\n    }\n  }\n\n  #connect(p: Index, n: Index) {\n    this.#prev[n] = p\n    this.#next[p] = n\n  }\n\n  #moveToTail(index: Index): void {\n    // if tail already, nothing to do\n    // if head, move head to next[index]\n    // else\n    //   move next[prev[index]] to next[index] (head has no prev)\n    //   move prev[next[index]] to prev[index]\n    // prev[index] = tail\n    // next[tail] = index\n    // tail = index\n    if (index !== this.#tail) {\n      if (index === this.#head) {\n        this.#head = this.#next[index] as Index\n      } else {\n        this.#connect(\n          this.#prev[index] as Index,\n          this.#next[index] as Index\n        )\n      }\n      this.#connect(this.#tail, index)\n      this.#tail = index\n    }\n  }\n\n  /**\n   * Deletes a key out of the cache.\n   *\n   * Returns true if the key was deleted, false otherwise.\n   */\n  delete(k: K) {\n    return this.#delete(k, 'delete')\n  }\n\n  #delete(k: K, reason: LRUCache.DisposeReason) {\n    let deleted = false\n    if (this.#size !== 0) {\n      const index = this.#keyMap.get(k)\n      if (index !== undefined) {\n        deleted = true\n        if (this.#size === 1) {\n          this.#clear(reason)\n        } else {\n          this.#removeItemSize(index)\n          const v = this.#valList[index]\n          if (this.#isBackgroundFetch(v)) {\n            v.__abortController.abort(new Error('deleted'))\n          } else if (this.#hasDispose || this.#hasDisposeAfter) {\n            if (this.#hasDispose) {\n              this.#dispose?.(v as V, k, reason)\n            }\n            if (this.#hasDisposeAfter) {\n              this.#disposed?.push([v as V, k, reason])\n            }\n          }\n          this.#keyMap.delete(k)\n          this.#keyList[index] = undefined\n          this.#valList[index] = undefined\n          if (index === this.#tail) {\n            this.#tail = this.#prev[index] as Index\n          } else if (index === this.#head) {\n            this.#head = this.#next[index] as Index\n          } else {\n            const pi = this.#prev[index] as number\n            this.#next[pi] = this.#next[index] as number\n            const ni = this.#next[index] as number\n            this.#prev[ni] = this.#prev[index] as number\n          }\n          this.#size--\n          this.#free.push(index)\n        }\n      }\n    }\n    if (this.#hasDisposeAfter && this.#disposed?.length) {\n      const dt = this.#disposed\n      let task: DisposeTask | undefined\n      while ((task = dt?.shift())) {\n        this.#disposeAfter?.(...task)\n      }\n    }\n    return deleted\n  }\n\n  /**\n   * Clear the cache entirely, throwing away all values.\n   */\n  clear() {\n    return this.#clear('delete')\n  }\n  #clear(reason: LRUCache.DisposeReason) {\n    for (const index of this.#rindexes({ allowStale: true })) {\n      const v = this.#valList[index]\n      if (this.#isBackgroundFetch(v)) {\n        v.__abortController.abort(new Error('deleted'))\n      } else {\n        const k = this.#keyList[index]\n        if (this.#hasDispose) {\n          this.#dispose?.(v as V, k as K, reason)\n        }\n        if (this.#hasDisposeAfter) {\n          this.#disposed?.push([v as V, k as K, reason])\n        }\n      }\n    }\n\n    this.#keyMap.clear()\n    this.#valList.fill(undefined)\n    this.#keyList.fill(undefined)\n    if (this.#ttls && this.#starts) {\n      this.#ttls.fill(0)\n      this.#starts.fill(0)\n    }\n    if (this.#sizes) {\n      this.#sizes.fill(0)\n    }\n    this.#head = 0 as Index\n    this.#tail = 0 as Index\n    this.#free.length = 0\n    this.#calculatedSize = 0\n    this.#size = 0\n    if (this.#hasDisposeAfter && this.#disposed) {\n      const dt = this.#disposed\n      let task: DisposeTask | undefined\n      while ((task = dt?.shift())) {\n        this.#disposeAfter?.(...task)\n      }\n    }\n  }\n}\n"]}
              \ No newline at end of file
              diff --git a/node_modules/path-scurry/node_modules/lru-cache/dist/esm/index.min.js b/node_modules/path-scurry/node_modules/lru-cache/dist/esm/index.min.js
              deleted file mode 100644
              index 4571d025..00000000
              --- a/node_modules/path-scurry/node_modules/lru-cache/dist/esm/index.min.js
              +++ /dev/null
              @@ -1,2 +0,0 @@
              -var G=(l,t,e)=>{if(!t.has(l))throw TypeError("Cannot "+e)};var I=(l,t,e)=>(G(l,t,"read from private field"),e?e.call(l):t.get(l)),j=(l,t,e)=>{if(t.has(l))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(l):t.set(l,e)},x=(l,t,e,i)=>(G(l,t,"write to private field"),i?i.call(l,e):t.set(l,e),e);var T=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,P=new Set,M=typeof process=="object"&&process?process:{},H=(l,t,e,i)=>{typeof M.emitWarning=="function"?M.emitWarning(l,t,e,i):console.error(`[${e}] ${t}: ${l}`)},W=globalThis.AbortController,N=globalThis.AbortSignal;if(typeof W>"u"){N=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(i,s){this._onabort.push(s)}},W=class{constructor(){t()}signal=new N;abort(i){if(!this.signal.aborted){this.signal.reason=i,this.signal.aborted=!0;for(let s of this.signal._onabort)s(i);this.signal.onabort?.(i)}}};let l=M.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",t=()=>{l&&(l=!1,H("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",t))}}var V=l=>!P.has(l),Y=Symbol("type"),A=l=>l&&l===Math.floor(l)&&l>0&&isFinite(l),k=l=>A(l)?l<=Math.pow(2,8)?Uint8Array:l<=Math.pow(2,16)?Uint16Array:l<=Math.pow(2,32)?Uint32Array:l<=Number.MAX_SAFE_INTEGER?O:null:null,O=class extends Array{constructor(t){super(t),this.fill(0)}},z,E=class{heap;length;static create(t){let e=k(t);if(!e)return[];x(E,z,!0);let i=new E(t,e);return x(E,z,!1),i}constructor(t,e){if(!I(E,z))throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new e(t),this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}},R=E;z=new WeakMap,j(R,z,!1);var D=class{#g;#f;#p;#w;#R;#W;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#n;#S;#s;#i;#t;#l;#c;#o;#h;#_;#r;#m;#b;#u;#y;#O;#a;static unsafeExposeInternals(t){return{starts:t.#b,ttls:t.#u,sizes:t.#m,keyMap:t.#s,keyList:t.#i,valList:t.#t,next:t.#l,prev:t.#c,get head(){return t.#o},get tail(){return t.#h},free:t.#_,isBackgroundFetch:e=>t.#e(e),backgroundFetch:(e,i,s,n)=>t.#x(e,i,s,n),moveToTail:e=>t.#C(e),indexes:e=>t.#A(e),rindexes:e=>t.#F(e),isStale:e=>t.#d(e)}}get max(){return this.#g}get maxSize(){return this.#f}get calculatedSize(){return this.#S}get size(){return this.#n}get fetchMethod(){return this.#R}get memoMethod(){return this.#W}get dispose(){return this.#p}get disposeAfter(){return this.#w}constructor(t){let{max:e=0,ttl:i,ttlResolution:s=1,ttlAutopurge:n,updateAgeOnGet:h,updateAgeOnHas:o,allowStale:r,dispose:g,disposeAfter:m,noDisposeOnSet:f,noUpdateTTL:u,maxSize:c=0,maxEntrySize:F=0,sizeCalculation:d,fetchMethod:S,memoMethod:a,noDeleteOnFetchRejection:w,noDeleteOnStaleGet:b,allowStaleOnFetchRejection:p,allowStaleOnFetchAbort:_,ignoreFetchAbort:v}=t;if(e!==0&&!A(e))throw new TypeError("max option must be a nonnegative integer");let y=e?k(e):Array;if(!y)throw new Error("invalid max value: "+e);if(this.#g=e,this.#f=c,this.maxEntrySize=F||this.#f,this.sizeCalculation=d,this.sizeCalculation){if(!this.#f&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(a!==void 0&&typeof a!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#W=a,S!==void 0&&typeof S!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#R=S,this.#O=!!S,this.#s=new Map,this.#i=new Array(e).fill(void 0),this.#t=new Array(e).fill(void 0),this.#l=new y(e),this.#c=new y(e),this.#o=0,this.#h=0,this.#_=R.create(e),this.#n=0,this.#S=0,typeof g=="function"&&(this.#p=g),typeof m=="function"?(this.#w=m,this.#r=[]):(this.#w=void 0,this.#r=void 0),this.#y=!!this.#p,this.#a=!!this.#w,this.noDisposeOnSet=!!f,this.noUpdateTTL=!!u,this.noDeleteOnFetchRejection=!!w,this.allowStaleOnFetchRejection=!!p,this.allowStaleOnFetchAbort=!!_,this.ignoreFetchAbort=!!v,this.maxEntrySize!==0){if(this.#f!==0&&!A(this.#f))throw new TypeError("maxSize must be a positive integer if specified");if(!A(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#P()}if(this.allowStale=!!r,this.noDeleteOnStaleGet=!!b,this.updateAgeOnGet=!!h,this.updateAgeOnHas=!!o,this.ttlResolution=A(s)||s===0?s:1,this.ttlAutopurge=!!n,this.ttl=i||0,this.ttl){if(!A(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#M()}if(this.#g===0&&this.ttl===0&&this.#f===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#g&&!this.#f){let C="LRU_CACHE_UNBOUNDED";V(C)&&(P.add(C),H("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",C,D))}}getRemainingTTL(t){return this.#s.has(t)?1/0:0}#M(){let t=new O(this.#g),e=new O(this.#g);this.#u=t,this.#b=e,this.#U=(n,h,o=T.now())=>{if(e[n]=h!==0?o:0,t[n]=h,h!==0&&this.ttlAutopurge){let r=setTimeout(()=>{this.#d(n)&&this.#T(this.#i[n],"expire")},h+1);r.unref&&r.unref()}},this.#z=n=>{e[n]=t[n]!==0?T.now():0},this.#E=(n,h)=>{if(t[h]){let o=t[h],r=e[h];if(!o||!r)return;n.ttl=o,n.start=r,n.now=i||s();let g=n.now-r;n.remainingTTL=o-g}};let i=0,s=()=>{let n=T.now();if(this.ttlResolution>0){i=n;let h=setTimeout(()=>i=0,this.ttlResolution);h.unref&&h.unref()}return n};this.getRemainingTTL=n=>{let h=this.#s.get(n);if(h===void 0)return 0;let o=t[h],r=e[h];if(!o||!r)return 1/0;let g=(i||s())-r;return o-g},this.#d=n=>{let h=e[n],o=t[n];return!!o&&!!h&&(i||s())-h>o}}#z=()=>{};#E=()=>{};#U=()=>{};#d=()=>!1;#P(){let t=new O(this.#g);this.#S=0,this.#m=t,this.#v=e=>{this.#S-=t[e],t[e]=0},this.#G=(e,i,s,n)=>{if(this.#e(i))return 0;if(!A(s))if(n){if(typeof n!="function")throw new TypeError("sizeCalculation must be a function");if(s=n(i,e),!A(s))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return s},this.#D=(e,i,s)=>{if(t[e]=i,this.#f){let n=this.#f-t[e];for(;this.#S>n;)this.#L(!0)}this.#S+=t[e],s&&(s.entrySize=i,s.totalCalculatedSize=this.#S)}}#v=t=>{};#D=(t,e,i)=>{};#G=(t,e,i,s)=>{if(i||s)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#A({allowStale:t=this.allowStale}={}){if(this.#n)for(let e=this.#h;!(!this.#I(e)||((t||!this.#d(e))&&(yield e),e===this.#o));)e=this.#c[e]}*#F({allowStale:t=this.allowStale}={}){if(this.#n)for(let e=this.#o;!(!this.#I(e)||((t||!this.#d(e))&&(yield e),e===this.#h));)e=this.#l[e]}#I(t){return t!==void 0&&this.#s.get(this.#i[t])===t}*entries(){for(let t of this.#A())this.#t[t]!==void 0&&this.#i[t]!==void 0&&!this.#e(this.#t[t])&&(yield[this.#i[t],this.#t[t]])}*rentries(){for(let t of this.#F())this.#t[t]!==void 0&&this.#i[t]!==void 0&&!this.#e(this.#t[t])&&(yield[this.#i[t],this.#t[t]])}*keys(){for(let t of this.#A()){let e=this.#i[t];e!==void 0&&!this.#e(this.#t[t])&&(yield e)}}*rkeys(){for(let t of this.#F()){let e=this.#i[t];e!==void 0&&!this.#e(this.#t[t])&&(yield e)}}*values(){for(let t of this.#A())this.#t[t]!==void 0&&!this.#e(this.#t[t])&&(yield this.#t[t])}*rvalues(){for(let t of this.#F())this.#t[t]!==void 0&&!this.#e(this.#t[t])&&(yield this.#t[t])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(t,e={}){for(let i of this.#A()){let s=this.#t[i],n=this.#e(s)?s.__staleWhileFetching:s;if(n!==void 0&&t(n,this.#i[i],this))return this.get(this.#i[i],e)}}forEach(t,e=this){for(let i of this.#A()){let s=this.#t[i],n=this.#e(s)?s.__staleWhileFetching:s;n!==void 0&&t.call(e,n,this.#i[i],this)}}rforEach(t,e=this){for(let i of this.#F()){let s=this.#t[i],n=this.#e(s)?s.__staleWhileFetching:s;n!==void 0&&t.call(e,n,this.#i[i],this)}}purgeStale(){let t=!1;for(let e of this.#F({allowStale:!0}))this.#d(e)&&(this.#T(this.#i[e],"expire"),t=!0);return t}info(t){let e=this.#s.get(t);if(e===void 0)return;let i=this.#t[e],s=this.#e(i)?i.__staleWhileFetching:i;if(s===void 0)return;let n={value:s};if(this.#u&&this.#b){let h=this.#u[e],o=this.#b[e];if(h&&o){let r=h-(T.now()-o);n.ttl=r,n.start=Date.now()}}return this.#m&&(n.size=this.#m[e]),n}dump(){let t=[];for(let e of this.#A({allowStale:!0})){let i=this.#i[e],s=this.#t[e],n=this.#e(s)?s.__staleWhileFetching:s;if(n===void 0||i===void 0)continue;let h={value:n};if(this.#u&&this.#b){h.ttl=this.#u[e];let o=T.now()-this.#b[e];h.start=Math.floor(Date.now()-o)}this.#m&&(h.size=this.#m[e]),t.unshift([i,h])}return t}load(t){this.clear();for(let[e,i]of t){if(i.start){let s=Date.now()-i.start;i.start=T.now()-s}this.set(e,i.value,i)}}set(t,e,i={}){if(e===void 0)return this.delete(t),this;let{ttl:s=this.ttl,start:n,noDisposeOnSet:h=this.noDisposeOnSet,sizeCalculation:o=this.sizeCalculation,status:r}=i,{noUpdateTTL:g=this.noUpdateTTL}=i,m=this.#G(t,e,i.size||0,o);if(this.maxEntrySize&&m>this.maxEntrySize)return r&&(r.set="miss",r.maxEntrySizeExceeded=!0),this.#T(t,"set"),this;let f=this.#n===0?void 0:this.#s.get(t);if(f===void 0)f=this.#n===0?this.#h:this.#_.length!==0?this.#_.pop():this.#n===this.#g?this.#L(!1):this.#n,this.#i[f]=t,this.#t[f]=e,this.#s.set(t,f),this.#l[this.#h]=f,this.#c[f]=this.#h,this.#h=f,this.#n++,this.#D(f,m,r),r&&(r.set="add"),g=!1;else{this.#C(f);let u=this.#t[f];if(e!==u){if(this.#O&&this.#e(u)){u.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:c}=u;c!==void 0&&!h&&(this.#y&&this.#p?.(c,t,"set"),this.#a&&this.#r?.push([c,t,"set"]))}else h||(this.#y&&this.#p?.(u,t,"set"),this.#a&&this.#r?.push([u,t,"set"]));if(this.#v(f),this.#D(f,m,r),this.#t[f]=e,r){r.set="replace";let c=u&&this.#e(u)?u.__staleWhileFetching:u;c!==void 0&&(r.oldValue=c)}}else r&&(r.set="update")}if(s!==0&&!this.#u&&this.#M(),this.#u&&(g||this.#U(f,s,n),r&&this.#E(r,f)),!h&&this.#a&&this.#r){let u=this.#r,c;for(;c=u?.shift();)this.#w?.(...c)}return this}pop(){try{for(;this.#n;){let t=this.#t[this.#o];if(this.#L(!0),this.#e(t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(t!==void 0)return t}}finally{if(this.#a&&this.#r){let t=this.#r,e;for(;e=t?.shift();)this.#w?.(...e)}}}#L(t){let e=this.#o,i=this.#i[e],s=this.#t[e];return this.#O&&this.#e(s)?s.__abortController.abort(new Error("evicted")):(this.#y||this.#a)&&(this.#y&&this.#p?.(s,i,"evict"),this.#a&&this.#r?.push([s,i,"evict"])),this.#v(e),t&&(this.#i[e]=void 0,this.#t[e]=void 0,this.#_.push(e)),this.#n===1?(this.#o=this.#h=0,this.#_.length=0):this.#o=this.#l[e],this.#s.delete(i),this.#n--,e}has(t,e={}){let{updateAgeOnHas:i=this.updateAgeOnHas,status:s}=e,n=this.#s.get(t);if(n!==void 0){let h=this.#t[n];if(this.#e(h)&&h.__staleWhileFetching===void 0)return!1;if(this.#d(n))s&&(s.has="stale",this.#E(s,n));else return i&&this.#z(n),s&&(s.has="hit",this.#E(s,n)),!0}else s&&(s.has="miss");return!1}peek(t,e={}){let{allowStale:i=this.allowStale}=e,s=this.#s.get(t);if(s===void 0||!i&&this.#d(s))return;let n=this.#t[s];return this.#e(n)?n.__staleWhileFetching:n}#x(t,e,i,s){let n=e===void 0?void 0:this.#t[e];if(this.#e(n))return n;let h=new W,{signal:o}=i;o?.addEventListener("abort",()=>h.abort(o.reason),{signal:h.signal});let r={signal:h.signal,options:i,context:s},g=(d,S=!1)=>{let{aborted:a}=h.signal,w=i.ignoreFetchAbort&&d!==void 0;if(i.status&&(a&&!S?(i.status.fetchAborted=!0,i.status.fetchError=h.signal.reason,w&&(i.status.fetchAbortIgnored=!0)):i.status.fetchResolved=!0),a&&!w&&!S)return f(h.signal.reason);let b=c;return this.#t[e]===c&&(d===void 0?b.__staleWhileFetching?this.#t[e]=b.__staleWhileFetching:this.#T(t,"fetch"):(i.status&&(i.status.fetchUpdated=!0),this.set(t,d,r.options))),d},m=d=>(i.status&&(i.status.fetchRejected=!0,i.status.fetchError=d),f(d)),f=d=>{let{aborted:S}=h.signal,a=S&&i.allowStaleOnFetchAbort,w=a||i.allowStaleOnFetchRejection,b=w||i.noDeleteOnFetchRejection,p=c;if(this.#t[e]===c&&(!b||p.__staleWhileFetching===void 0?this.#T(t,"fetch"):a||(this.#t[e]=p.__staleWhileFetching)),w)return i.status&&p.__staleWhileFetching!==void 0&&(i.status.returnedStale=!0),p.__staleWhileFetching;if(p.__returned===p)throw d},u=(d,S)=>{let a=this.#R?.(t,n,r);a&&a instanceof Promise&&a.then(w=>d(w===void 0?void 0:w),S),h.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(d(void 0),i.allowStaleOnFetchAbort&&(d=w=>g(w,!0)))})};i.status&&(i.status.fetchDispatched=!0);let c=new Promise(u).then(g,m),F=Object.assign(c,{__abortController:h,__staleWhileFetching:n,__returned:void 0});return e===void 0?(this.set(t,F,{...r.options,status:void 0}),e=this.#s.get(t)):this.#t[e]=F,F}#e(t){if(!this.#O)return!1;let e=t;return!!e&&e instanceof Promise&&e.hasOwnProperty("__staleWhileFetching")&&e.__abortController instanceof W}async fetch(t,e={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,ttl:h=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:r=0,sizeCalculation:g=this.sizeCalculation,noUpdateTTL:m=this.noUpdateTTL,noDeleteOnFetchRejection:f=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:u=this.allowStaleOnFetchRejection,ignoreFetchAbort:c=this.ignoreFetchAbort,allowStaleOnFetchAbort:F=this.allowStaleOnFetchAbort,context:d,forceRefresh:S=!1,status:a,signal:w}=e;if(!this.#O)return a&&(a.fetch="get"),this.get(t,{allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:n,status:a});let b={allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:n,ttl:h,noDisposeOnSet:o,size:r,sizeCalculation:g,noUpdateTTL:m,noDeleteOnFetchRejection:f,allowStaleOnFetchRejection:u,allowStaleOnFetchAbort:F,ignoreFetchAbort:c,status:a,signal:w},p=this.#s.get(t);if(p===void 0){a&&(a.fetch="miss");let _=this.#x(t,p,b,d);return _.__returned=_}else{let _=this.#t[p];if(this.#e(_)){let U=i&&_.__staleWhileFetching!==void 0;return a&&(a.fetch="inflight",U&&(a.returnedStale=!0)),U?_.__staleWhileFetching:_.__returned=_}let v=this.#d(p);if(!S&&!v)return a&&(a.fetch="hit"),this.#C(p),s&&this.#z(p),a&&this.#E(a,p),_;let y=this.#x(t,p,b,d),L=y.__staleWhileFetching!==void 0&&i;return a&&(a.fetch=v?"stale":"refresh",L&&v&&(a.returnedStale=!0)),L?y.__staleWhileFetching:y.__returned=y}}async forceFetch(t,e={}){let i=await this.fetch(t,e);if(i===void 0)throw new Error("fetch() returned undefined");return i}memo(t,e={}){let i=this.#W;if(!i)throw new Error("no memoMethod provided to constructor");let{context:s,forceRefresh:n,...h}=e,o=this.get(t,h);if(!n&&o!==void 0)return o;let r=i(t,o,{options:h,context:s});return this.set(t,r,h),r}get(t,e={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,status:h}=e,o=this.#s.get(t);if(o!==void 0){let r=this.#t[o],g=this.#e(r);return h&&this.#E(h,o),this.#d(o)?(h&&(h.get="stale"),g?(h&&i&&r.__staleWhileFetching!==void 0&&(h.returnedStale=!0),i?r.__staleWhileFetching:void 0):(n||this.#T(t,"expire"),h&&i&&(h.returnedStale=!0),i?r:void 0)):(h&&(h.get="hit"),g?r.__staleWhileFetching:(this.#C(o),s&&this.#z(o),r))}else h&&(h.get="miss")}#j(t,e){this.#c[e]=t,this.#l[t]=e}#C(t){t!==this.#h&&(t===this.#o?this.#o=this.#l[t]:this.#j(this.#c[t],this.#l[t]),this.#j(this.#h,t),this.#h=t)}delete(t){return this.#T(t,"delete")}#T(t,e){let i=!1;if(this.#n!==0){let s=this.#s.get(t);if(s!==void 0)if(i=!0,this.#n===1)this.#N(e);else{this.#v(s);let n=this.#t[s];if(this.#e(n)?n.__abortController.abort(new Error("deleted")):(this.#y||this.#a)&&(this.#y&&this.#p?.(n,t,e),this.#a&&this.#r?.push([n,t,e])),this.#s.delete(t),this.#i[s]=void 0,this.#t[s]=void 0,s===this.#h)this.#h=this.#c[s];else if(s===this.#o)this.#o=this.#l[s];else{let h=this.#c[s];this.#l[h]=this.#l[s];let o=this.#l[s];this.#c[o]=this.#c[s]}this.#n--,this.#_.push(s)}}if(this.#a&&this.#r?.length){let s=this.#r,n;for(;n=s?.shift();)this.#w?.(...n)}return i}clear(){return this.#N("delete")}#N(t){for(let e of this.#F({allowStale:!0})){let i=this.#t[e];if(this.#e(i))i.__abortController.abort(new Error("deleted"));else{let s=this.#i[e];this.#y&&this.#p?.(i,s,t),this.#a&&this.#r?.push([i,s,t])}}if(this.#s.clear(),this.#t.fill(void 0),this.#i.fill(void 0),this.#u&&this.#b&&(this.#u.fill(0),this.#b.fill(0)),this.#m&&this.#m.fill(0),this.#o=0,this.#h=0,this.#_.length=0,this.#S=0,this.#n=0,this.#a&&this.#r){let e=this.#r,i;for(;i=e?.shift();)this.#w?.(...i)}}};export{D as LRUCache};
              -//# sourceMappingURL=index.min.js.map
              diff --git a/node_modules/path-scurry/node_modules/lru-cache/dist/esm/index.min.js.map b/node_modules/path-scurry/node_modules/lru-cache/dist/esm/index.min.js.map
              deleted file mode 100644
              index 117a9dec..00000000
              --- a/node_modules/path-scurry/node_modules/lru-cache/dist/esm/index.min.js.map
              +++ /dev/null
              @@ -1,7 +0,0 @@
              -{
              -  "version": 3,
              -  "sources": ["../../src/index.ts"],
              -  "sourcesContent": ["/**\n * @module LRUCache\n */\n\n// module-private names and types\ntype Perf = { now: () => number }\nconst perf: Perf =\n  typeof performance === 'object' &&\n  performance &&\n  typeof performance.now === 'function'\n    ? performance\n    : Date\n\nconst warned = new Set()\n\n// either a function or a class\ntype ForC = ((...a: any[]) => any) | { new (...a: any[]): any }\n\n/* c8 ignore start */\nconst PROCESS = (\n  typeof process === 'object' && !!process ? process : {}\n) as { [k: string]: any }\n/* c8 ignore start */\n\nconst emitWarning = (\n  msg: string,\n  type: string,\n  code: string,\n  fn: ForC\n) => {\n  typeof PROCESS.emitWarning === 'function'\n    ? PROCESS.emitWarning(msg, type, code, fn)\n    : console.error(`[${code}] ${type}: ${msg}`)\n}\n\nlet AC = globalThis.AbortController\nlet AS = globalThis.AbortSignal\n\n/* c8 ignore start */\nif (typeof AC === 'undefined') {\n  //@ts-ignore\n  AS = class AbortSignal {\n    onabort?: (...a: any[]) => any\n    _onabort: ((...a: any[]) => any)[] = []\n    reason?: any\n    aborted: boolean = false\n    addEventListener(_: string, fn: (...a: any[]) => any) {\n      this._onabort.push(fn)\n    }\n  }\n  //@ts-ignore\n  AC = class AbortController {\n    constructor() {\n      warnACPolyfill()\n    }\n    signal = new AS()\n    abort(reason: any) {\n      if (this.signal.aborted) return\n      //@ts-ignore\n      this.signal.reason = reason\n      //@ts-ignore\n      this.signal.aborted = true\n      //@ts-ignore\n      for (const fn of this.signal._onabort) {\n        fn(reason)\n      }\n      this.signal.onabort?.(reason)\n    }\n  }\n  let printACPolyfillWarning =\n    PROCESS.env?.LRU_CACHE_IGNORE_AC_WARNING !== '1'\n  const warnACPolyfill = () => {\n    if (!printACPolyfillWarning) return\n    printACPolyfillWarning = false\n    emitWarning(\n      'AbortController is not defined. If using lru-cache in ' +\n        'node 14, load an AbortController polyfill from the ' +\n        '`node-abort-controller` package. A minimal polyfill is ' +\n        'provided for use by LRUCache.fetch(), but it should not be ' +\n        'relied upon in other contexts (eg, passing it to other APIs that ' +\n        'use AbortController/AbortSignal might have undesirable effects). ' +\n        'You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.',\n      'NO_ABORT_CONTROLLER',\n      'ENOTSUP',\n      warnACPolyfill\n    )\n  }\n}\n/* c8 ignore stop */\n\nconst shouldWarn = (code: string) => !warned.has(code)\n\nconst TYPE = Symbol('type')\nexport type PosInt = number & { [TYPE]: 'Positive Integer' }\nexport type Index = number & { [TYPE]: 'LRUCache Index' }\n\nconst isPosInt = (n: any): n is PosInt =>\n  n && n === Math.floor(n) && n > 0 && isFinite(n)\n\nexport type UintArray = Uint8Array | Uint16Array | Uint32Array\nexport type NumberArray = UintArray | number[]\n\n/* c8 ignore start */\n// This is a little bit ridiculous, tbh.\n// The maximum array length is 2^32-1 or thereabouts on most JS impls.\n// And well before that point, you're caching the entire world, I mean,\n// that's ~32GB of just integers for the next/prev links, plus whatever\n// else to hold that many keys and values.  Just filling the memory with\n// zeroes at init time is brutal when you get that big.\n// But why not be complete?\n// Maybe in the future, these limits will have expanded.\nconst getUintArray = (max: number) =>\n  !isPosInt(max)\n    ? null\n    : max <= Math.pow(2, 8)\n    ? Uint8Array\n    : max <= Math.pow(2, 16)\n    ? Uint16Array\n    : max <= Math.pow(2, 32)\n    ? Uint32Array\n    : max <= Number.MAX_SAFE_INTEGER\n    ? ZeroArray\n    : null\n/* c8 ignore stop */\n\nclass ZeroArray extends Array {\n  constructor(size: number) {\n    super(size)\n    this.fill(0)\n  }\n}\nexport type { ZeroArray }\nexport type { Stack }\n\nexport type StackLike = Stack | Index[]\nclass Stack {\n  heap: NumberArray\n  length: number\n  // private constructor\n  static #constructing: boolean = false\n  static create(max: number): StackLike {\n    const HeapCls = getUintArray(max)\n    if (!HeapCls) return []\n    Stack.#constructing = true\n    const s = new Stack(max, HeapCls)\n    Stack.#constructing = false\n    return s\n  }\n  constructor(\n    max: number,\n    HeapCls: { new (n: number): NumberArray }\n  ) {\n    /* c8 ignore start */\n    if (!Stack.#constructing) {\n      throw new TypeError('instantiate Stack using Stack.create(n)')\n    }\n    /* c8 ignore stop */\n    this.heap = new HeapCls(max)\n    this.length = 0\n  }\n  push(n: Index) {\n    this.heap[this.length++] = n\n  }\n  pop(): Index {\n    return this.heap[--this.length] as Index\n  }\n}\n\n/**\n * Promise representing an in-progress {@link LRUCache#fetch} call\n */\nexport type BackgroundFetch = Promise & {\n  __returned: BackgroundFetch | undefined\n  __abortController: AbortController\n  __staleWhileFetching: V | undefined\n}\n\nexport type DisposeTask = [\n  value: V,\n  key: K,\n  reason: LRUCache.DisposeReason\n]\n\nexport namespace LRUCache {\n  /**\n   * An integer greater than 0, reflecting the calculated size of items\n   */\n  export type Size = number\n\n  /**\n   * Integer greater than 0, representing some number of milliseconds, or the\n   * time at which a TTL started counting from.\n   */\n  export type Milliseconds = number\n\n  /**\n   * An integer greater than 0, reflecting a number of items\n   */\n  export type Count = number\n\n  /**\n   * The reason why an item was removed from the cache, passed\n   * to the {@link Disposer} methods.\n   *\n   * - `evict`: The item was evicted because it is the least recently used,\n   *   and the cache is full.\n   * - `set`: A new value was set, overwriting the old value being disposed.\n   * - `delete`: The item was explicitly deleted, either by calling\n   *   {@link LRUCache#delete}, {@link LRUCache#clear}, or\n   *   {@link LRUCache#set} with an undefined value.\n   * - `expire`: The item was removed due to exceeding its TTL.\n   * - `fetch`: A {@link OptionsBase#fetchMethod} operation returned\n   *   `undefined` or was aborted, causing the item to be deleted.\n   */\n  export type DisposeReason =\n    | 'evict'\n    | 'set'\n    | 'delete'\n    | 'expire'\n    | 'fetch'\n  /**\n   * A method called upon item removal, passed as the\n   * {@link OptionsBase.dispose} and/or\n   * {@link OptionsBase.disposeAfter} options.\n   */\n  export type Disposer = (\n    value: V,\n    key: K,\n    reason: DisposeReason\n  ) => void\n\n  /**\n   * A function that returns the effective calculated size\n   * of an entry in the cache.\n   */\n  export type SizeCalculator = (value: V, key: K) => Size\n\n  /**\n   * Options provided to the\n   * {@link OptionsBase.fetchMethod} function.\n   */\n  export interface FetcherOptions {\n    signal: AbortSignal\n    options: FetcherFetchOptions\n    /**\n     * Object provided in the {@link FetchOptions.context} option to\n     * {@link LRUCache#fetch}\n     */\n    context: FC\n  }\n\n  /**\n   * Occasionally, it may be useful to track the internal behavior of the\n   * cache, particularly for logging, debugging, or for behavior within the\n   * `fetchMethod`. To do this, you can pass a `status` object to the\n   * {@link LRUCache#fetch}, {@link LRUCache#get}, {@link LRUCache#set},\n   * {@link LRUCache#memo}, and {@link LRUCache#has} methods.\n   *\n   * The `status` option should be a plain JavaScript object. The following\n   * fields will be set on it appropriately, depending on the situation.\n   */\n  export interface Status {\n    /**\n     * The status of a set() operation.\n     *\n     * - add: the item was not found in the cache, and was added\n     * - update: the item was in the cache, with the same value provided\n     * - replace: the item was in the cache, and replaced\n     * - miss: the item was not added to the cache for some reason\n     */\n    set?: 'add' | 'update' | 'replace' | 'miss'\n\n    /**\n     * the ttl stored for the item, or undefined if ttls are not used.\n     */\n    ttl?: Milliseconds\n\n    /**\n     * the start time for the item, or undefined if ttls are not used.\n     */\n    start?: Milliseconds\n\n    /**\n     * The timestamp used for TTL calculation\n     */\n    now?: Milliseconds\n\n    /**\n     * the remaining ttl for the item, or undefined if ttls are not used.\n     */\n    remainingTTL?: Milliseconds\n\n    /**\n     * The calculated size for the item, if sizes are used.\n     */\n    entrySize?: Size\n\n    /**\n     * The total calculated size of the cache, if sizes are used.\n     */\n    totalCalculatedSize?: Size\n\n    /**\n     * A flag indicating that the item was not stored, due to exceeding the\n     * {@link OptionsBase.maxEntrySize}\n     */\n    maxEntrySizeExceeded?: true\n\n    /**\n     * The old value, specified in the case of `set:'update'` or\n     * `set:'replace'`\n     */\n    oldValue?: V\n\n    /**\n     * The results of a {@link LRUCache#has} operation\n     *\n     * - hit: the item was found in the cache\n     * - stale: the item was found in the cache, but is stale\n     * - miss: the item was not found in the cache\n     */\n    has?: 'hit' | 'stale' | 'miss'\n\n    /**\n     * The status of a {@link LRUCache#fetch} operation.\n     * Note that this can change as the underlying fetch() moves through\n     * various states.\n     *\n     * - inflight: there is another fetch() for this key which is in process\n     * - get: there is no {@link OptionsBase.fetchMethod}, so\n     *   {@link LRUCache#get} was called.\n     * - miss: the item is not in cache, and will be fetched.\n     * - hit: the item is in the cache, and was resolved immediately.\n     * - stale: the item is in the cache, but stale.\n     * - refresh: the item is in the cache, and not stale, but\n     *   {@link FetchOptions.forceRefresh} was specified.\n     */\n    fetch?: 'get' | 'inflight' | 'miss' | 'hit' | 'stale' | 'refresh'\n\n    /**\n     * The {@link OptionsBase.fetchMethod} was called\n     */\n    fetchDispatched?: true\n\n    /**\n     * The cached value was updated after a successful call to\n     * {@link OptionsBase.fetchMethod}\n     */\n    fetchUpdated?: true\n\n    /**\n     * The reason for a fetch() rejection.  Either the error raised by the\n     * {@link OptionsBase.fetchMethod}, or the reason for an\n     * AbortSignal.\n     */\n    fetchError?: Error\n\n    /**\n     * The fetch received an abort signal\n     */\n    fetchAborted?: true\n\n    /**\n     * The abort signal received was ignored, and the fetch was allowed to\n     * continue.\n     */\n    fetchAbortIgnored?: true\n\n    /**\n     * The fetchMethod promise resolved successfully\n     */\n    fetchResolved?: true\n\n    /**\n     * The fetchMethod promise was rejected\n     */\n    fetchRejected?: true\n\n    /**\n     * The status of a {@link LRUCache#get} operation.\n     *\n     * - fetching: The item is currently being fetched.  If a previous value\n     *   is present and allowed, that will be returned.\n     * - stale: The item is in the cache, and is stale.\n     * - hit: the item is in the cache\n     * - miss: the item is not in the cache\n     */\n    get?: 'stale' | 'hit' | 'miss'\n\n    /**\n     * A fetch or get operation returned a stale value.\n     */\n    returnedStale?: true\n  }\n\n  /**\n   * options which override the options set in the LRUCache constructor\n   * when calling {@link LRUCache#fetch}.\n   *\n   * This is the union of {@link GetOptions} and {@link SetOptions}, plus\n   * {@link OptionsBase.noDeleteOnFetchRejection},\n   * {@link OptionsBase.allowStaleOnFetchRejection},\n   * {@link FetchOptions.forceRefresh}, and\n   * {@link FetcherOptions.context}\n   *\n   * Any of these may be modified in the {@link OptionsBase.fetchMethod}\n   * function, but the {@link GetOptions} fields will of course have no\n   * effect, as the {@link LRUCache#get} call already happened by the time\n   * the fetchMethod is called.\n   */\n  export interface FetcherFetchOptions\n    extends Pick<\n      OptionsBase,\n      | 'allowStale'\n      | 'updateAgeOnGet'\n      | 'noDeleteOnStaleGet'\n      | 'sizeCalculation'\n      | 'ttl'\n      | 'noDisposeOnSet'\n      | 'noUpdateTTL'\n      | 'noDeleteOnFetchRejection'\n      | 'allowStaleOnFetchRejection'\n      | 'ignoreFetchAbort'\n      | 'allowStaleOnFetchAbort'\n    > {\n    status?: Status\n    size?: Size\n  }\n\n  /**\n   * Options that may be passed to the {@link LRUCache#fetch} method.\n   */\n  export interface FetchOptions\n    extends FetcherFetchOptions {\n    /**\n     * Set to true to force a re-load of the existing data, even if it\n     * is not yet stale.\n     */\n    forceRefresh?: boolean\n    /**\n     * Context provided to the {@link OptionsBase.fetchMethod} as\n     * the {@link FetcherOptions.context} param.\n     *\n     * If the FC type is specified as unknown (the default),\n     * undefined or void, then this is optional.  Otherwise, it will\n     * be required.\n     */\n    context?: FC\n    signal?: AbortSignal\n    status?: Status\n  }\n  /**\n   * Options provided to {@link LRUCache#fetch} when the FC type is something\n   * other than `unknown`, `undefined`, or `void`\n   */\n  export interface FetchOptionsWithContext\n    extends FetchOptions {\n    context: FC\n  }\n  /**\n   * Options provided to {@link LRUCache#fetch} when the FC type is\n   * `undefined` or `void`\n   */\n  export interface FetchOptionsNoContext\n    extends FetchOptions {\n    context?: undefined\n  }\n\n  export interface MemoOptions\n    extends Pick<\n      OptionsBase,\n      | 'allowStale'\n      | 'updateAgeOnGet'\n      | 'noDeleteOnStaleGet'\n      | 'sizeCalculation'\n      | 'ttl'\n      | 'noDisposeOnSet'\n      | 'noUpdateTTL'\n      | 'noDeleteOnFetchRejection'\n      | 'allowStaleOnFetchRejection'\n      | 'ignoreFetchAbort'\n      | 'allowStaleOnFetchAbort'\n    > {\n    /**\n     * Set to true to force a re-load of the existing data, even if it\n     * is not yet stale.\n     */\n    forceRefresh?: boolean\n    /**\n     * Context provided to the {@link OptionsBase.memoMethod} as\n     * the {@link MemoizerOptions.context} param.\n     *\n     * If the FC type is specified as unknown (the default),\n     * undefined or void, then this is optional.  Otherwise, it will\n     * be required.\n     */\n    context?: FC\n    status?: Status\n  }\n  /**\n   * Options provided to {@link LRUCache#memo} when the FC type is something\n   * other than `unknown`, `undefined`, or `void`\n   */\n  export interface MemoOptionsWithContext\n    extends MemoOptions {\n    context: FC\n  }\n  /**\n   * Options provided to {@link LRUCache#memo} when the FC type is\n   * `undefined` or `void`\n   */\n  export interface MemoOptionsNoContext\n    extends MemoOptions {\n    context?: undefined\n  }\n\n  /**\n   * Options provided to the\n   * {@link OptionsBase.memoMethod} function.\n   */\n  export interface MemoizerOptions {\n    options: MemoizerMemoOptions\n    /**\n     * Object provided in the {@link MemoOptions.context} option to\n     * {@link LRUCache#memo}\n     */\n    context: FC\n  }\n\n  /**\n   * options which override the options set in the LRUCache constructor\n   * when calling {@link LRUCache#memo}.\n   *\n   * This is the union of {@link GetOptions} and {@link SetOptions}, plus\n   * {@link MemoOptions.forceRefresh}, and\n   * {@link MemoerOptions.context}\n   *\n   * Any of these may be modified in the {@link OptionsBase.memoMethod}\n   * function, but the {@link GetOptions} fields will of course have no\n   * effect, as the {@link LRUCache#get} call already happened by the time\n   * the memoMethod is called.\n   */\n  export interface MemoizerMemoOptions\n    extends Pick<\n      OptionsBase,\n      | 'allowStale'\n      | 'updateAgeOnGet'\n      | 'noDeleteOnStaleGet'\n      | 'sizeCalculation'\n      | 'ttl'\n      | 'noDisposeOnSet'\n      | 'noUpdateTTL'\n    > {\n    status?: Status\n    size?: Size\n    start?: Milliseconds\n  }\n\n  /**\n   * Options that may be passed to the {@link LRUCache#has} method.\n   */\n  export interface HasOptions\n    extends Pick, 'updateAgeOnHas'> {\n    status?: Status\n  }\n\n  /**\n   * Options that may be passed to the {@link LRUCache#get} method.\n   */\n  export interface GetOptions\n    extends Pick<\n      OptionsBase,\n      'allowStale' | 'updateAgeOnGet' | 'noDeleteOnStaleGet'\n    > {\n    status?: Status\n  }\n\n  /**\n   * Options that may be passed to the {@link LRUCache#peek} method.\n   */\n  export interface PeekOptions\n    extends Pick, 'allowStale'> {}\n\n  /**\n   * Options that may be passed to the {@link LRUCache#set} method.\n   */\n  export interface SetOptions\n    extends Pick<\n      OptionsBase,\n      'sizeCalculation' | 'ttl' | 'noDisposeOnSet' | 'noUpdateTTL'\n    > {\n    /**\n     * If size tracking is enabled, then setting an explicit size\n     * in the {@link LRUCache#set} call will prevent calling the\n     * {@link OptionsBase.sizeCalculation} function.\n     */\n    size?: Size\n    /**\n     * If TTL tracking is enabled, then setting an explicit start\n     * time in the {@link LRUCache#set} call will override the\n     * default time from `performance.now()` or `Date.now()`.\n     *\n     * Note that it must be a valid value for whichever time-tracking\n     * method is in use.\n     */\n    start?: Milliseconds\n    status?: Status\n  }\n\n  /**\n   * The type signature for the {@link OptionsBase.fetchMethod} option.\n   */\n  export type Fetcher = (\n    key: K,\n    staleValue: V | undefined,\n    options: FetcherOptions\n  ) => Promise | V | undefined | void\n\n  /**\n   * the type signature for the {@link OptionsBase.memoMethod} option.\n   */\n  export type Memoizer = (\n    key: K,\n    staleValue: V | undefined,\n    options: MemoizerOptions\n  ) => V\n\n  /**\n   * Options which may be passed to the {@link LRUCache} constructor.\n   *\n   * Most of these may be overridden in the various options that use\n   * them.\n   *\n   * Despite all being technically optional, the constructor requires that\n   * a cache is at minimum limited by one or more of {@link OptionsBase.max},\n   * {@link OptionsBase.ttl}, or {@link OptionsBase.maxSize}.\n   *\n   * If {@link OptionsBase.ttl} is used alone, then it is strongly advised\n   * (and in fact required by the type definitions here) that the cache\n   * also set {@link OptionsBase.ttlAutopurge}, to prevent potentially\n   * unbounded storage.\n   *\n   * All options are also available on the {@link LRUCache} instance, making\n   * it safe to pass an LRUCache instance as the options argumemnt to\n   * make another empty cache of the same type.\n   *\n   * Some options are marked as read-only, because changing them after\n   * instantiation is not safe. Changing any of the other options will of\n   * course only have an effect on subsequent method calls.\n   */\n  export interface OptionsBase {\n    /**\n     * The maximum number of items to store in the cache before evicting\n     * old entries. This is read-only on the {@link LRUCache} instance,\n     * and may not be overridden.\n     *\n     * If set, then storage space will be pre-allocated at construction\n     * time, and the cache will perform significantly faster.\n     *\n     * Note that significantly fewer items may be stored, if\n     * {@link OptionsBase.maxSize} and/or {@link OptionsBase.ttl} are also\n     * set.\n     *\n     * **It is strongly recommended to set a `max` to prevent unbounded growth\n     * of the cache.**\n     */\n    max?: Count\n\n    /**\n     * Max time in milliseconds for items to live in cache before they are\n     * considered stale.  Note that stale items are NOT preemptively removed by\n     * default, and MAY live in the cache, contributing to its LRU max, long\n     * after they have expired, unless {@link OptionsBase.ttlAutopurge} is\n     * set.\n     *\n     * If set to `0` (the default value), then that means \"do not track\n     * TTL\", not \"expire immediately\".\n     *\n     * Also, as this cache is optimized for LRU/MRU operations, some of\n     * the staleness/TTL checks will reduce performance, as they will incur\n     * overhead by deleting items.\n     *\n     * This is not primarily a TTL cache, and does not make strong TTL\n     * guarantees. There is no pre-emptive pruning of expired items, but you\n     * _may_ set a TTL on the cache, and it will treat expired items as missing\n     * when they are fetched, and delete them.\n     *\n     * Optional, but must be a non-negative integer in ms if specified.\n     *\n     * This may be overridden by passing an options object to `cache.set()`.\n     *\n     * At least one of `max`, `maxSize`, or `TTL` is required. This must be a\n     * positive integer if set.\n     *\n     * Even if ttl tracking is enabled, **it is strongly recommended to set a\n     * `max` to prevent unbounded growth of the cache.**\n     *\n     * If ttl tracking is enabled, and `max` and `maxSize` are not set,\n     * and `ttlAutopurge` is not set, then a warning will be emitted\n     * cautioning about the potential for unbounded memory consumption.\n     * (The TypeScript definitions will also discourage this.)\n     */\n    ttl?: Milliseconds\n\n    /**\n     * Minimum amount of time in ms in which to check for staleness.\n     * Defaults to 1, which means that the current time is checked\n     * at most once per millisecond.\n     *\n     * Set to 0 to check the current time every time staleness is tested.\n     * (This reduces performance, and is theoretically unnecessary.)\n     *\n     * Setting this to a higher value will improve performance somewhat\n     * while using ttl tracking, albeit at the expense of keeping stale\n     * items around a bit longer than their TTLs would indicate.\n     *\n     * @default 1\n     */\n    ttlResolution?: Milliseconds\n\n    /**\n     * Preemptively remove stale items from the cache.\n     *\n     * Note that this may *significantly* degrade performance, especially if\n     * the cache is storing a large number of items. It is almost always best\n     * to just leave the stale items in the cache, and let them fall out as new\n     * items are added.\n     *\n     * Note that this means that {@link OptionsBase.allowStale} is a bit\n     * pointless, as stale items will be deleted almost as soon as they\n     * expire.\n     *\n     * Use with caution!\n     */\n    ttlAutopurge?: boolean\n\n    /**\n     * When using time-expiring entries with `ttl`, setting this to `true` will\n     * make each item's age reset to 0 whenever it is retrieved from cache with\n     * {@link LRUCache#get}, causing it to not expire. (It can still fall out\n     * of cache based on recency of use, of course.)\n     *\n     * Has no effect if {@link OptionsBase.ttl} is not set.\n     *\n     * This may be overridden by passing an options object to `cache.get()`.\n     */\n    updateAgeOnGet?: boolean\n\n    /**\n     * When using time-expiring entries with `ttl`, setting this to `true` will\n     * make each item's age reset to 0 whenever its presence in the cache is\n     * checked with {@link LRUCache#has}, causing it to not expire. (It can\n     * still fall out of cache based on recency of use, of course.)\n     *\n     * Has no effect if {@link OptionsBase.ttl} is not set.\n     */\n    updateAgeOnHas?: boolean\n\n    /**\n     * Allow {@link LRUCache#get} and {@link LRUCache#fetch} calls to return\n     * stale data, if available.\n     *\n     * By default, if you set `ttl`, stale items will only be deleted from the\n     * cache when you `get(key)`. That is, it's not preemptively pruning items,\n     * unless {@link OptionsBase.ttlAutopurge} is set.\n     *\n     * If you set `allowStale:true`, it'll return the stale value *as well as*\n     * deleting it. If you don't set this, then it'll return `undefined` when\n     * you try to get a stale entry.\n     *\n     * Note that when a stale entry is fetched, _even if it is returned due to\n     * `allowStale` being set_, it is removed from the cache immediately. You\n     * can suppress this behavior by setting\n     * {@link OptionsBase.noDeleteOnStaleGet}, either in the constructor, or in\n     * the options provided to {@link LRUCache#get}.\n     *\n     * This may be overridden by passing an options object to `cache.get()`.\n     * The `cache.has()` method will always return `false` for stale items.\n     *\n     * Only relevant if a ttl is set.\n     */\n    allowStale?: boolean\n\n    /**\n     * Function that is called on items when they are dropped from the\n     * cache, as `dispose(value, key, reason)`.\n     *\n     * This can be handy if you want to close file descriptors or do\n     * other cleanup tasks when items are no longer stored in the cache.\n     *\n     * **NOTE**: It is called _before_ the item has been fully removed\n     * from the cache, so if you want to put it right back in, you need\n     * to wait until the next tick. If you try to add it back in during\n     * the `dispose()` function call, it will break things in subtle and\n     * weird ways.\n     *\n     * Unlike several other options, this may _not_ be overridden by\n     * passing an option to `set()`, for performance reasons.\n     *\n     * The `reason` will be one of the following strings, corresponding\n     * to the reason for the item's deletion:\n     *\n     * - `evict` Item was evicted to make space for a new addition\n     * - `set` Item was overwritten by a new value\n     * - `expire` Item expired its TTL\n     * - `fetch` Item was deleted due to a failed or aborted fetch, or a\n     *   fetchMethod returning `undefined.\n     * - `delete` Item was removed by explicit `cache.delete(key)`,\n     *   `cache.clear()`, or `cache.set(key, undefined)`.\n     */\n    dispose?: Disposer\n\n    /**\n     * The same as {@link OptionsBase.dispose}, but called *after* the entry\n     * is completely removed and the cache is once again in a clean state.\n     *\n     * It is safe to add an item right back into the cache at this point.\n     * However, note that it is *very* easy to inadvertently create infinite\n     * recursion this way.\n     */\n    disposeAfter?: Disposer\n\n    /**\n     * Set to true to suppress calling the\n     * {@link OptionsBase.dispose} function if the entry key is\n     * still accessible within the cache.\n     *\n     * This may be overridden by passing an options object to\n     * {@link LRUCache#set}.\n     *\n     * Only relevant if `dispose` or `disposeAfter` are set.\n     */\n    noDisposeOnSet?: boolean\n\n    /**\n     * Boolean flag to tell the cache to not update the TTL when setting a new\n     * value for an existing key (ie, when updating a value rather than\n     * inserting a new value).  Note that the TTL value is _always_ set (if\n     * provided) when adding a new entry into the cache.\n     *\n     * Has no effect if a {@link OptionsBase.ttl} is not set.\n     *\n     * May be passed as an option to {@link LRUCache#set}.\n     */\n    noUpdateTTL?: boolean\n\n    /**\n     * Set to a positive integer to track the sizes of items added to the\n     * cache, and automatically evict items in order to stay below this size.\n     * Note that this may result in fewer than `max` items being stored.\n     *\n     * Attempting to add an item to the cache whose calculated size is greater\n     * that this amount will be a no-op. The item will not be cached, and no\n     * other items will be evicted.\n     *\n     * Optional, must be a positive integer if provided.\n     *\n     * Sets `maxEntrySize` to the same value, unless a different value is\n     * provided for `maxEntrySize`.\n     *\n     * At least one of `max`, `maxSize`, or `TTL` is required. This must be a\n     * positive integer if set.\n     *\n     * Even if size tracking is enabled, **it is strongly recommended to set a\n     * `max` to prevent unbounded growth of the cache.**\n     *\n     * Note also that size tracking can negatively impact performance,\n     * though for most cases, only minimally.\n     */\n    maxSize?: Size\n\n    /**\n     * The maximum allowed size for any single item in the cache.\n     *\n     * If a larger item is passed to {@link LRUCache#set} or returned by a\n     * {@link OptionsBase.fetchMethod} or {@link OptionsBase.memoMethod}, then\n     * it will not be stored in the cache.\n     *\n     * Attempting to add an item whose calculated size is greater than\n     * this amount will not cache the item or evict any old items, but\n     * WILL delete an existing value if one is already present.\n     *\n     * Optional, must be a positive integer if provided. Defaults to\n     * the value of `maxSize` if provided.\n     */\n    maxEntrySize?: Size\n\n    /**\n     * A function that returns a number indicating the item's size.\n     *\n     * Requires {@link OptionsBase.maxSize} to be set.\n     *\n     * If not provided, and {@link OptionsBase.maxSize} or\n     * {@link OptionsBase.maxEntrySize} are set, then all\n     * {@link LRUCache#set} calls **must** provide an explicit\n     * {@link SetOptions.size} or sizeCalculation param.\n     */\n    sizeCalculation?: SizeCalculator\n\n    /**\n     * Method that provides the implementation for {@link LRUCache#fetch}\n     *\n     * ```ts\n     * fetchMethod(key, staleValue, { signal, options, context })\n     * ```\n     *\n     * If `fetchMethod` is not provided, then `cache.fetch(key)` is equivalent\n     * to `Promise.resolve(cache.get(key))`.\n     *\n     * If at any time, `signal.aborted` is set to `true`, or if the\n     * `signal.onabort` method is called, or if it emits an `'abort'` event\n     * which you can listen to with `addEventListener`, then that means that\n     * the fetch should be abandoned. This may be passed along to async\n     * functions aware of AbortController/AbortSignal behavior.\n     *\n     * The `fetchMethod` should **only** return `undefined` or a Promise\n     * resolving to `undefined` if the AbortController signaled an `abort`\n     * event. In all other cases, it should return or resolve to a value\n     * suitable for adding to the cache.\n     *\n     * The `options` object is a union of the options that may be provided to\n     * `set()` and `get()`. If they are modified, then that will result in\n     * modifying the settings to `cache.set()` when the value is resolved, and\n     * in the case of\n     * {@link OptionsBase.noDeleteOnFetchRejection} and\n     * {@link OptionsBase.allowStaleOnFetchRejection}, the handling of\n     * `fetchMethod` failures.\n     *\n     * For example, a DNS cache may update the TTL based on the value returned\n     * from a remote DNS server by changing `options.ttl` in the `fetchMethod`.\n     */\n    fetchMethod?: Fetcher\n\n    /**\n     * Method that provides the implementation for {@link LRUCache#memo}\n     */\n    memoMethod?: Memoizer\n\n    /**\n     * Set to true to suppress the deletion of stale data when a\n     * {@link OptionsBase.fetchMethod} returns a rejected promise.\n     */\n    noDeleteOnFetchRejection?: boolean\n\n    /**\n     * Do not delete stale items when they are retrieved with\n     * {@link LRUCache#get}.\n     *\n     * Note that the `get` return value will still be `undefined`\n     * unless {@link OptionsBase.allowStale} is true.\n     *\n     * When using time-expiring entries with `ttl`, by default stale\n     * items will be removed from the cache when the key is accessed\n     * with `cache.get()`.\n     *\n     * Setting this option will cause stale items to remain in the cache, until\n     * they are explicitly deleted with `cache.delete(key)`, or retrieved with\n     * `noDeleteOnStaleGet` set to `false`.\n     *\n     * This may be overridden by passing an options object to `cache.get()`.\n     *\n     * Only relevant if a ttl is used.\n     */\n    noDeleteOnStaleGet?: boolean\n\n    /**\n     * Set to true to allow returning stale data when a\n     * {@link OptionsBase.fetchMethod} throws an error or returns a rejected\n     * promise.\n     *\n     * This differs from using {@link OptionsBase.allowStale} in that stale\n     * data will ONLY be returned in the case that the {@link LRUCache#fetch}\n     * fails, not any other times.\n     *\n     * If a `fetchMethod` fails, and there is no stale value available, the\n     * `fetch()` will resolve to `undefined`. Ie, all `fetchMethod` errors are\n     * suppressed.\n     *\n     * Implies `noDeleteOnFetchRejection`.\n     *\n     * This may be set in calls to `fetch()`, or defaulted on the constructor,\n     * or overridden by modifying the options object in the `fetchMethod`.\n     */\n    allowStaleOnFetchRejection?: boolean\n\n    /**\n     * Set to true to return a stale value from the cache when the\n     * `AbortSignal` passed to the {@link OptionsBase.fetchMethod} dispatches\n     * an `'abort'` event, whether user-triggered, or due to internal cache\n     * behavior.\n     *\n     * Unless {@link OptionsBase.ignoreFetchAbort} is also set, the underlying\n     * {@link OptionsBase.fetchMethod} will still be considered canceled, and\n     * any value it returns will be ignored and not cached.\n     *\n     * Caveat: since fetches are aborted when a new value is explicitly\n     * set in the cache, this can lead to fetch returning a stale value,\n     * since that was the fallback value _at the moment the `fetch()` was\n     * initiated_, even though the new updated value is now present in\n     * the cache.\n     *\n     * For example:\n     *\n     * ```ts\n     * const cache = new LRUCache({\n     *   ttl: 100,\n     *   fetchMethod: async (url, oldValue, { signal }) =>  {\n     *     const res = await fetch(url, { signal })\n     *     return await res.json()\n     *   }\n     * })\n     * cache.set('https://example.com/', { some: 'data' })\n     * // 100ms go by...\n     * const result = cache.fetch('https://example.com/')\n     * cache.set('https://example.com/', { other: 'thing' })\n     * console.log(await result) // { some: 'data' }\n     * console.log(cache.get('https://example.com/')) // { other: 'thing' }\n     * ```\n     */\n    allowStaleOnFetchAbort?: boolean\n\n    /**\n     * Set to true to ignore the `abort` event emitted by the `AbortSignal`\n     * object passed to {@link OptionsBase.fetchMethod}, and still cache the\n     * resulting resolution value, as long as it is not `undefined`.\n     *\n     * When used on its own, this means aborted {@link LRUCache#fetch} calls\n     * are not immediately resolved or rejected when they are aborted, and\n     * instead take the full time to await.\n     *\n     * When used with {@link OptionsBase.allowStaleOnFetchAbort}, aborted\n     * {@link LRUCache#fetch} calls will resolve immediately to their stale\n     * cached value or `undefined`, and will continue to process and eventually\n     * update the cache when they resolve, as long as the resulting value is\n     * not `undefined`, thus supporting a \"return stale on timeout while\n     * refreshing\" mechanism by passing `AbortSignal.timeout(n)` as the signal.\n     *\n     * For example:\n     *\n     * ```ts\n     * const c = new LRUCache({\n     *   ttl: 100,\n     *   ignoreFetchAbort: true,\n     *   allowStaleOnFetchAbort: true,\n     *   fetchMethod: async (key, oldValue, { signal }) => {\n     *     // note: do NOT pass the signal to fetch()!\n     *     // let's say this fetch can take a long time.\n     *     const res = await fetch(`https://slow-backend-server/${key}`)\n     *     return await res.json()\n     *   },\n     * })\n     *\n     * // this will return the stale value after 100ms, while still\n     * // updating in the background for next time.\n     * const val = await c.fetch('key', { signal: AbortSignal.timeout(100) })\n     * ```\n     *\n     * **Note**: regardless of this setting, an `abort` event _is still\n     * emitted on the `AbortSignal` object_, so may result in invalid results\n     * when passed to other underlying APIs that use AbortSignals.\n     *\n     * This may be overridden in the {@link OptionsBase.fetchMethod} or the\n     * call to {@link LRUCache#fetch}.\n     */\n    ignoreFetchAbort?: boolean\n  }\n\n  export interface OptionsMaxLimit\n    extends OptionsBase {\n    max: Count\n  }\n  export interface OptionsTTLLimit\n    extends OptionsBase {\n    ttl: Milliseconds\n    ttlAutopurge: boolean\n  }\n  export interface OptionsSizeLimit\n    extends OptionsBase {\n    maxSize: Size\n  }\n\n  /**\n   * The valid safe options for the {@link LRUCache} constructor\n   */\n  export type Options =\n    | OptionsMaxLimit\n    | OptionsSizeLimit\n    | OptionsTTLLimit\n\n  /**\n   * Entry objects used by {@link LRUCache#load} and {@link LRUCache#dump},\n   * and returned by {@link LRUCache#info}.\n   */\n  export interface Entry {\n    value: V\n    ttl?: Milliseconds\n    size?: Size\n    start?: Milliseconds\n  }\n}\n\n/**\n * Default export, the thing you're using this module to get.\n *\n * The `K` and `V` types define the key and value types, respectively. The\n * optional `FC` type defines the type of the `context` object passed to\n * `cache.fetch()` and `cache.memo()`.\n *\n * Keys and values **must not** be `null` or `undefined`.\n *\n * All properties from the options object (with the exception of `max`,\n * `maxSize`, `fetchMethod`, `memoMethod`, `dispose` and `disposeAfter`) are\n * added as normal public members. (The listed options are read-only getters.)\n *\n * Changing any of these will alter the defaults for subsequent method calls.\n */\nexport class LRUCache\n  implements Map\n{\n  // options that cannot be changed without disaster\n  readonly #max: LRUCache.Count\n  readonly #maxSize: LRUCache.Size\n  readonly #dispose?: LRUCache.Disposer\n  readonly #disposeAfter?: LRUCache.Disposer\n  readonly #fetchMethod?: LRUCache.Fetcher\n  readonly #memoMethod?: LRUCache.Memoizer\n\n  /**\n   * {@link LRUCache.OptionsBase.ttl}\n   */\n  ttl: LRUCache.Milliseconds\n\n  /**\n   * {@link LRUCache.OptionsBase.ttlResolution}\n   */\n  ttlResolution: LRUCache.Milliseconds\n  /**\n   * {@link LRUCache.OptionsBase.ttlAutopurge}\n   */\n  ttlAutopurge: boolean\n  /**\n   * {@link LRUCache.OptionsBase.updateAgeOnGet}\n   */\n  updateAgeOnGet: boolean\n  /**\n   * {@link LRUCache.OptionsBase.updateAgeOnHas}\n   */\n  updateAgeOnHas: boolean\n  /**\n   * {@link LRUCache.OptionsBase.allowStale}\n   */\n  allowStale: boolean\n\n  /**\n   * {@link LRUCache.OptionsBase.noDisposeOnSet}\n   */\n  noDisposeOnSet: boolean\n  /**\n   * {@link LRUCache.OptionsBase.noUpdateTTL}\n   */\n  noUpdateTTL: boolean\n  /**\n   * {@link LRUCache.OptionsBase.maxEntrySize}\n   */\n  maxEntrySize: LRUCache.Size\n  /**\n   * {@link LRUCache.OptionsBase.sizeCalculation}\n   */\n  sizeCalculation?: LRUCache.SizeCalculator\n  /**\n   * {@link LRUCache.OptionsBase.noDeleteOnFetchRejection}\n   */\n  noDeleteOnFetchRejection: boolean\n  /**\n   * {@link LRUCache.OptionsBase.noDeleteOnStaleGet}\n   */\n  noDeleteOnStaleGet: boolean\n  /**\n   * {@link LRUCache.OptionsBase.allowStaleOnFetchAbort}\n   */\n  allowStaleOnFetchAbort: boolean\n  /**\n   * {@link LRUCache.OptionsBase.allowStaleOnFetchRejection}\n   */\n  allowStaleOnFetchRejection: boolean\n  /**\n   * {@link LRUCache.OptionsBase.ignoreFetchAbort}\n   */\n  ignoreFetchAbort: boolean\n\n  // computed properties\n  #size: LRUCache.Count\n  #calculatedSize: LRUCache.Size\n  #keyMap: Map\n  #keyList: (K | undefined)[]\n  #valList: (V | BackgroundFetch | undefined)[]\n  #next: NumberArray\n  #prev: NumberArray\n  #head: Index\n  #tail: Index\n  #free: StackLike\n  #disposed?: DisposeTask[]\n  #sizes?: ZeroArray\n  #starts?: ZeroArray\n  #ttls?: ZeroArray\n\n  #hasDispose: boolean\n  #hasFetchMethod: boolean\n  #hasDisposeAfter: boolean\n\n  /**\n   * Do not call this method unless you need to inspect the\n   * inner workings of the cache.  If anything returned by this\n   * object is modified in any way, strange breakage may occur.\n   *\n   * These fields are private for a reason!\n   *\n   * @internal\n   */\n  static unsafeExposeInternals<\n    K extends {},\n    V extends {},\n    FC extends unknown = unknown\n  >(c: LRUCache) {\n    return {\n      // properties\n      starts: c.#starts,\n      ttls: c.#ttls,\n      sizes: c.#sizes,\n      keyMap: c.#keyMap as Map,\n      keyList: c.#keyList,\n      valList: c.#valList,\n      next: c.#next,\n      prev: c.#prev,\n      get head() {\n        return c.#head\n      },\n      get tail() {\n        return c.#tail\n      },\n      free: c.#free,\n      // methods\n      isBackgroundFetch: (p: any) => c.#isBackgroundFetch(p),\n      backgroundFetch: (\n        k: K,\n        index: number | undefined,\n        options: LRUCache.FetchOptions,\n        context: any\n      ): BackgroundFetch =>\n        c.#backgroundFetch(\n          k,\n          index as Index | undefined,\n          options,\n          context\n        ),\n      moveToTail: (index: number): void =>\n        c.#moveToTail(index as Index),\n      indexes: (options?: { allowStale: boolean }) =>\n        c.#indexes(options),\n      rindexes: (options?: { allowStale: boolean }) =>\n        c.#rindexes(options),\n      isStale: (index: number | undefined) =>\n        c.#isStale(index as Index),\n    }\n  }\n\n  // Protected read-only members\n\n  /**\n   * {@link LRUCache.OptionsBase.max} (read-only)\n   */\n  get max(): LRUCache.Count {\n    return this.#max\n  }\n  /**\n   * {@link LRUCache.OptionsBase.maxSize} (read-only)\n   */\n  get maxSize(): LRUCache.Count {\n    return this.#maxSize\n  }\n  /**\n   * The total computed size of items in the cache (read-only)\n   */\n  get calculatedSize(): LRUCache.Size {\n    return this.#calculatedSize\n  }\n  /**\n   * The number of items stored in the cache (read-only)\n   */\n  get size(): LRUCache.Count {\n    return this.#size\n  }\n  /**\n   * {@link LRUCache.OptionsBase.fetchMethod} (read-only)\n   */\n  get fetchMethod(): LRUCache.Fetcher | undefined {\n    return this.#fetchMethod\n  }\n  get memoMethod(): LRUCache.Memoizer | undefined {\n    return this.#memoMethod\n  }\n  /**\n   * {@link LRUCache.OptionsBase.dispose} (read-only)\n   */\n  get dispose() {\n    return this.#dispose\n  }\n  /**\n   * {@link LRUCache.OptionsBase.disposeAfter} (read-only)\n   */\n  get disposeAfter() {\n    return this.#disposeAfter\n  }\n\n  constructor(\n    options: LRUCache.Options | LRUCache\n  ) {\n    const {\n      max = 0,\n      ttl,\n      ttlResolution = 1,\n      ttlAutopurge,\n      updateAgeOnGet,\n      updateAgeOnHas,\n      allowStale,\n      dispose,\n      disposeAfter,\n      noDisposeOnSet,\n      noUpdateTTL,\n      maxSize = 0,\n      maxEntrySize = 0,\n      sizeCalculation,\n      fetchMethod,\n      memoMethod,\n      noDeleteOnFetchRejection,\n      noDeleteOnStaleGet,\n      allowStaleOnFetchRejection,\n      allowStaleOnFetchAbort,\n      ignoreFetchAbort,\n    } = options\n\n    if (max !== 0 && !isPosInt(max)) {\n      throw new TypeError('max option must be a nonnegative integer')\n    }\n\n    const UintArray = max ? getUintArray(max) : Array\n    if (!UintArray) {\n      throw new Error('invalid max value: ' + max)\n    }\n\n    this.#max = max\n    this.#maxSize = maxSize\n    this.maxEntrySize = maxEntrySize || this.#maxSize\n    this.sizeCalculation = sizeCalculation\n    if (this.sizeCalculation) {\n      if (!this.#maxSize && !this.maxEntrySize) {\n        throw new TypeError(\n          'cannot set sizeCalculation without setting maxSize or maxEntrySize'\n        )\n      }\n      if (typeof this.sizeCalculation !== 'function') {\n        throw new TypeError('sizeCalculation set to non-function')\n      }\n    }\n\n    if (\n      memoMethod !== undefined &&\n      typeof memoMethod !== 'function'\n    ) {\n      throw new TypeError('memoMethod must be a function if defined')\n    }\n    this.#memoMethod = memoMethod\n\n    if (\n      fetchMethod !== undefined &&\n      typeof fetchMethod !== 'function'\n    ) {\n      throw new TypeError(\n        'fetchMethod must be a function if specified'\n      )\n    }\n    this.#fetchMethod = fetchMethod\n    this.#hasFetchMethod = !!fetchMethod\n\n    this.#keyMap = new Map()\n    this.#keyList = new Array(max).fill(undefined)\n    this.#valList = new Array(max).fill(undefined)\n    this.#next = new UintArray(max)\n    this.#prev = new UintArray(max)\n    this.#head = 0 as Index\n    this.#tail = 0 as Index\n    this.#free = Stack.create(max)\n    this.#size = 0\n    this.#calculatedSize = 0\n\n    if (typeof dispose === 'function') {\n      this.#dispose = dispose\n    }\n    if (typeof disposeAfter === 'function') {\n      this.#disposeAfter = disposeAfter\n      this.#disposed = []\n    } else {\n      this.#disposeAfter = undefined\n      this.#disposed = undefined\n    }\n    this.#hasDispose = !!this.#dispose\n    this.#hasDisposeAfter = !!this.#disposeAfter\n\n    this.noDisposeOnSet = !!noDisposeOnSet\n    this.noUpdateTTL = !!noUpdateTTL\n    this.noDeleteOnFetchRejection = !!noDeleteOnFetchRejection\n    this.allowStaleOnFetchRejection = !!allowStaleOnFetchRejection\n    this.allowStaleOnFetchAbort = !!allowStaleOnFetchAbort\n    this.ignoreFetchAbort = !!ignoreFetchAbort\n\n    // NB: maxEntrySize is set to maxSize if it's set\n    if (this.maxEntrySize !== 0) {\n      if (this.#maxSize !== 0) {\n        if (!isPosInt(this.#maxSize)) {\n          throw new TypeError(\n            'maxSize must be a positive integer if specified'\n          )\n        }\n      }\n      if (!isPosInt(this.maxEntrySize)) {\n        throw new TypeError(\n          'maxEntrySize must be a positive integer if specified'\n        )\n      }\n      this.#initializeSizeTracking()\n    }\n\n    this.allowStale = !!allowStale\n    this.noDeleteOnStaleGet = !!noDeleteOnStaleGet\n    this.updateAgeOnGet = !!updateAgeOnGet\n    this.updateAgeOnHas = !!updateAgeOnHas\n    this.ttlResolution =\n      isPosInt(ttlResolution) || ttlResolution === 0\n        ? ttlResolution\n        : 1\n    this.ttlAutopurge = !!ttlAutopurge\n    this.ttl = ttl || 0\n    if (this.ttl) {\n      if (!isPosInt(this.ttl)) {\n        throw new TypeError(\n          'ttl must be a positive integer if specified'\n        )\n      }\n      this.#initializeTTLTracking()\n    }\n\n    // do not allow completely unbounded caches\n    if (this.#max === 0 && this.ttl === 0 && this.#maxSize === 0) {\n      throw new TypeError(\n        'At least one of max, maxSize, or ttl is required'\n      )\n    }\n    if (!this.ttlAutopurge && !this.#max && !this.#maxSize) {\n      const code = 'LRU_CACHE_UNBOUNDED'\n      if (shouldWarn(code)) {\n        warned.add(code)\n        const msg =\n          'TTL caching without ttlAutopurge, max, or maxSize can ' +\n          'result in unbounded memory consumption.'\n        emitWarning(msg, 'UnboundedCacheWarning', code, LRUCache)\n      }\n    }\n  }\n\n  /**\n   * Return the number of ms left in the item's TTL. If item is not in cache,\n   * returns `0`. Returns `Infinity` if item is in cache without a defined TTL.\n   */\n  getRemainingTTL(key: K) {\n    return this.#keyMap.has(key) ? Infinity : 0\n  }\n\n  #initializeTTLTracking() {\n    const ttls = new ZeroArray(this.#max)\n    const starts = new ZeroArray(this.#max)\n    this.#ttls = ttls\n    this.#starts = starts\n\n    this.#setItemTTL = (index, ttl, start = perf.now()) => {\n      starts[index] = ttl !== 0 ? start : 0\n      ttls[index] = ttl\n      if (ttl !== 0 && this.ttlAutopurge) {\n        const t = setTimeout(() => {\n          if (this.#isStale(index)) {\n            this.#delete(this.#keyList[index] as K, 'expire')\n          }\n        }, ttl + 1)\n        // unref() not supported on all platforms\n        /* c8 ignore start */\n        if (t.unref) {\n          t.unref()\n        }\n        /* c8 ignore stop */\n      }\n    }\n\n    this.#updateItemAge = index => {\n      starts[index] = ttls[index] !== 0 ? perf.now() : 0\n    }\n\n    this.#statusTTL = (status, index) => {\n      if (ttls[index]) {\n        const ttl = ttls[index]\n        const start = starts[index]\n        /* c8 ignore next */\n        if (!ttl || !start) return\n        status.ttl = ttl\n        status.start = start\n        status.now = cachedNow || getNow()\n        const age = status.now - start\n        status.remainingTTL = ttl - age\n      }\n    }\n\n    // debounce calls to perf.now() to 1s so we're not hitting\n    // that costly call repeatedly.\n    let cachedNow = 0\n    const getNow = () => {\n      const n = perf.now()\n      if (this.ttlResolution > 0) {\n        cachedNow = n\n        const t = setTimeout(\n          () => (cachedNow = 0),\n          this.ttlResolution\n        )\n        // not available on all platforms\n        /* c8 ignore start */\n        if (t.unref) {\n          t.unref()\n        }\n        /* c8 ignore stop */\n      }\n      return n\n    }\n\n    this.getRemainingTTL = key => {\n      const index = this.#keyMap.get(key)\n      if (index === undefined) {\n        return 0\n      }\n      const ttl = ttls[index]\n      const start = starts[index]\n      if (!ttl || !start) {\n        return Infinity\n      }\n      const age = (cachedNow || getNow()) - start\n      return ttl - age\n    }\n\n    this.#isStale = index => {\n      const s = starts[index]\n      const t = ttls[index]\n      return !!t && !!s && (cachedNow || getNow()) - s > t\n    }\n  }\n\n  // conditionally set private methods related to TTL\n  #updateItemAge: (index: Index) => void = () => {}\n  #statusTTL: (status: LRUCache.Status, index: Index) => void =\n    () => {}\n  #setItemTTL: (\n    index: Index,\n    ttl: LRUCache.Milliseconds,\n    start?: LRUCache.Milliseconds\n    // ignore because we never call this if we're not already in TTL mode\n    /* c8 ignore start */\n  ) => void = () => {}\n  /* c8 ignore stop */\n\n  #isStale: (index: Index) => boolean = () => false\n\n  #initializeSizeTracking() {\n    const sizes = new ZeroArray(this.#max)\n    this.#calculatedSize = 0\n    this.#sizes = sizes\n    this.#removeItemSize = index => {\n      this.#calculatedSize -= sizes[index] as number\n      sizes[index] = 0\n    }\n    this.#requireSize = (k, v, size, sizeCalculation) => {\n      // provisionally accept background fetches.\n      // actual value size will be checked when they return.\n      if (this.#isBackgroundFetch(v)) {\n        return 0\n      }\n      if (!isPosInt(size)) {\n        if (sizeCalculation) {\n          if (typeof sizeCalculation !== 'function') {\n            throw new TypeError('sizeCalculation must be a function')\n          }\n          size = sizeCalculation(v, k)\n          if (!isPosInt(size)) {\n            throw new TypeError(\n              'sizeCalculation return invalid (expect positive integer)'\n            )\n          }\n        } else {\n          throw new TypeError(\n            'invalid size value (must be positive integer). ' +\n              'When maxSize or maxEntrySize is used, sizeCalculation ' +\n              'or size must be set.'\n          )\n        }\n      }\n      return size\n    }\n    this.#addItemSize = (\n      index: Index,\n      size: LRUCache.Size,\n      status?: LRUCache.Status\n    ) => {\n      sizes[index] = size\n      if (this.#maxSize) {\n        const maxSize = this.#maxSize - (sizes[index] as number)\n        while (this.#calculatedSize > maxSize) {\n          this.#evict(true)\n        }\n      }\n      this.#calculatedSize += sizes[index] as number\n      if (status) {\n        status.entrySize = size\n        status.totalCalculatedSize = this.#calculatedSize\n      }\n    }\n  }\n\n  #removeItemSize: (index: Index) => void = _i => {}\n  #addItemSize: (\n    index: Index,\n    size: LRUCache.Size,\n    status?: LRUCache.Status\n  ) => void = (_i, _s, _st) => {}\n  #requireSize: (\n    k: K,\n    v: V | BackgroundFetch,\n    size?: LRUCache.Size,\n    sizeCalculation?: LRUCache.SizeCalculator\n  ) => LRUCache.Size = (\n    _k: K,\n    _v: V | BackgroundFetch,\n    size?: LRUCache.Size,\n    sizeCalculation?: LRUCache.SizeCalculator\n  ) => {\n    if (size || sizeCalculation) {\n      throw new TypeError(\n        'cannot set size without setting maxSize or maxEntrySize on cache'\n      )\n    }\n    return 0\n  };\n\n  *#indexes({ allowStale = this.allowStale } = {}) {\n    if (this.#size) {\n      for (let i = this.#tail; true; ) {\n        if (!this.#isValidIndex(i)) {\n          break\n        }\n        if (allowStale || !this.#isStale(i)) {\n          yield i\n        }\n        if (i === this.#head) {\n          break\n        } else {\n          i = this.#prev[i] as Index\n        }\n      }\n    }\n  }\n\n  *#rindexes({ allowStale = this.allowStale } = {}) {\n    if (this.#size) {\n      for (let i = this.#head; true; ) {\n        if (!this.#isValidIndex(i)) {\n          break\n        }\n        if (allowStale || !this.#isStale(i)) {\n          yield i\n        }\n        if (i === this.#tail) {\n          break\n        } else {\n          i = this.#next[i] as Index\n        }\n      }\n    }\n  }\n\n  #isValidIndex(index: Index) {\n    return (\n      index !== undefined &&\n      this.#keyMap.get(this.#keyList[index] as K) === index\n    )\n  }\n\n  /**\n   * Return a generator yielding `[key, value]` pairs,\n   * in order from most recently used to least recently used.\n   */\n  *entries() {\n    for (const i of this.#indexes()) {\n      if (\n        this.#valList[i] !== undefined &&\n        this.#keyList[i] !== undefined &&\n        !this.#isBackgroundFetch(this.#valList[i])\n      ) {\n        yield [this.#keyList[i], this.#valList[i]] as [K, V]\n      }\n    }\n  }\n\n  /**\n   * Inverse order version of {@link LRUCache.entries}\n   *\n   * Return a generator yielding `[key, value]` pairs,\n   * in order from least recently used to most recently used.\n   */\n  *rentries() {\n    for (const i of this.#rindexes()) {\n      if (\n        this.#valList[i] !== undefined &&\n        this.#keyList[i] !== undefined &&\n        !this.#isBackgroundFetch(this.#valList[i])\n      ) {\n        yield [this.#keyList[i], this.#valList[i]]\n      }\n    }\n  }\n\n  /**\n   * Return a generator yielding the keys in the cache,\n   * in order from most recently used to least recently used.\n   */\n  *keys() {\n    for (const i of this.#indexes()) {\n      const k = this.#keyList[i]\n      if (\n        k !== undefined &&\n        !this.#isBackgroundFetch(this.#valList[i])\n      ) {\n        yield k\n      }\n    }\n  }\n\n  /**\n   * Inverse order version of {@link LRUCache.keys}\n   *\n   * Return a generator yielding the keys in the cache,\n   * in order from least recently used to most recently used.\n   */\n  *rkeys() {\n    for (const i of this.#rindexes()) {\n      const k = this.#keyList[i]\n      if (\n        k !== undefined &&\n        !this.#isBackgroundFetch(this.#valList[i])\n      ) {\n        yield k\n      }\n    }\n  }\n\n  /**\n   * Return a generator yielding the values in the cache,\n   * in order from most recently used to least recently used.\n   */\n  *values() {\n    for (const i of this.#indexes()) {\n      const v = this.#valList[i]\n      if (\n        v !== undefined &&\n        !this.#isBackgroundFetch(this.#valList[i])\n      ) {\n        yield this.#valList[i] as V\n      }\n    }\n  }\n\n  /**\n   * Inverse order version of {@link LRUCache.values}\n   *\n   * Return a generator yielding the values in the cache,\n   * in order from least recently used to most recently used.\n   */\n  *rvalues() {\n    for (const i of this.#rindexes()) {\n      const v = this.#valList[i]\n      if (\n        v !== undefined &&\n        !this.#isBackgroundFetch(this.#valList[i])\n      ) {\n        yield this.#valList[i]\n      }\n    }\n  }\n\n  /**\n   * Iterating over the cache itself yields the same results as\n   * {@link LRUCache.entries}\n   */\n  [Symbol.iterator]() {\n    return this.entries()\n  }\n\n  /**\n   * A String value that is used in the creation of the default string\n   * description of an object. Called by the built-in method\n   * `Object.prototype.toString`.\n   */\n  [Symbol.toStringTag] = 'LRUCache'\n\n  /**\n   * Find a value for which the supplied fn method returns a truthy value,\n   * similar to `Array.find()`. fn is called as `fn(value, key, cache)`.\n   */\n  find(\n    fn: (v: V, k: K, self: LRUCache) => boolean,\n    getOptions: LRUCache.GetOptions = {}\n  ) {\n    for (const i of this.#indexes()) {\n      const v = this.#valList[i]\n      const value = this.#isBackgroundFetch(v)\n        ? v.__staleWhileFetching\n        : v\n      if (value === undefined) continue\n      if (fn(value, this.#keyList[i] as K, this)) {\n        return this.get(this.#keyList[i] as K, getOptions)\n      }\n    }\n  }\n\n  /**\n   * Call the supplied function on each item in the cache, in order from most\n   * recently used to least recently used.\n   *\n   * `fn` is called as `fn(value, key, cache)`.\n   *\n   * If `thisp` is provided, function will be called in the `this`-context of\n   * the provided object, or the cache if no `thisp` object is provided.\n   *\n   * Does not update age or recenty of use, or iterate over stale values.\n   */\n  forEach(\n    fn: (v: V, k: K, self: LRUCache) => any,\n    thisp: any = this\n  ) {\n    for (const i of this.#indexes()) {\n      const v = this.#valList[i]\n      const value = this.#isBackgroundFetch(v)\n        ? v.__staleWhileFetching\n        : v\n      if (value === undefined) continue\n      fn.call(thisp, value, this.#keyList[i] as K, this)\n    }\n  }\n\n  /**\n   * The same as {@link LRUCache.forEach} but items are iterated over in\n   * reverse order.  (ie, less recently used items are iterated over first.)\n   */\n  rforEach(\n    fn: (v: V, k: K, self: LRUCache) => any,\n    thisp: any = this\n  ) {\n    for (const i of this.#rindexes()) {\n      const v = this.#valList[i]\n      const value = this.#isBackgroundFetch(v)\n        ? v.__staleWhileFetching\n        : v\n      if (value === undefined) continue\n      fn.call(thisp, value, this.#keyList[i] as K, this)\n    }\n  }\n\n  /**\n   * Delete any stale entries. Returns true if anything was removed,\n   * false otherwise.\n   */\n  purgeStale() {\n    let deleted = false\n    for (const i of this.#rindexes({ allowStale: true })) {\n      if (this.#isStale(i)) {\n        this.#delete(this.#keyList[i] as K, 'expire')\n        deleted = true\n      }\n    }\n    return deleted\n  }\n\n  /**\n   * Get the extended info about a given entry, to get its value, size, and\n   * TTL info simultaneously. Returns `undefined` if the key is not present.\n   *\n   * Unlike {@link LRUCache#dump}, which is designed to be portable and survive\n   * serialization, the `start` value is always the current timestamp, and the\n   * `ttl` is a calculated remaining time to live (negative if expired).\n   *\n   * Always returns stale values, if their info is found in the cache, so be\n   * sure to check for expirations (ie, a negative {@link LRUCache.Entry#ttl})\n   * if relevant.\n   */\n  info(key: K): LRUCache.Entry | undefined {\n    const i = this.#keyMap.get(key)\n    if (i === undefined) return undefined\n    const v = this.#valList[i]\n    const value: V | undefined = this.#isBackgroundFetch(v)\n      ? v.__staleWhileFetching\n      : v\n    if (value === undefined) return undefined\n    const entry: LRUCache.Entry = { value }\n    if (this.#ttls && this.#starts) {\n      const ttl = this.#ttls[i]\n      const start = this.#starts[i]\n      if (ttl && start) {\n        const remain = ttl - (perf.now() - start)\n        entry.ttl = remain\n        entry.start = Date.now()\n      }\n    }\n    if (this.#sizes) {\n      entry.size = this.#sizes[i]\n    }\n    return entry\n  }\n\n  /**\n   * Return an array of [key, {@link LRUCache.Entry}] tuples which can be\n   * passed to {@link LRLUCache#load}.\n   *\n   * The `start` fields are calculated relative to a portable `Date.now()`\n   * timestamp, even if `performance.now()` is available.\n   *\n   * Stale entries are always included in the `dump`, even if\n   * {@link LRUCache.OptionsBase.allowStale} is false.\n   *\n   * Note: this returns an actual array, not a generator, so it can be more\n   * easily passed around.\n   */\n  dump() {\n    const arr: [K, LRUCache.Entry][] = []\n    for (const i of this.#indexes({ allowStale: true })) {\n      const key = this.#keyList[i]\n      const v = this.#valList[i]\n      const value: V | undefined = this.#isBackgroundFetch(v)\n        ? v.__staleWhileFetching\n        : v\n      if (value === undefined || key === undefined) continue\n      const entry: LRUCache.Entry = { value }\n      if (this.#ttls && this.#starts) {\n        entry.ttl = this.#ttls[i]\n        // always dump the start relative to a portable timestamp\n        // it's ok for this to be a bit slow, it's a rare operation.\n        const age = perf.now() - (this.#starts[i] as number)\n        entry.start = Math.floor(Date.now() - age)\n      }\n      if (this.#sizes) {\n        entry.size = this.#sizes[i]\n      }\n      arr.unshift([key, entry])\n    }\n    return arr\n  }\n\n  /**\n   * Reset the cache and load in the items in entries in the order listed.\n   *\n   * The shape of the resulting cache may be different if the same options are\n   * not used in both caches.\n   *\n   * The `start` fields are assumed to be calculated relative to a portable\n   * `Date.now()` timestamp, even if `performance.now()` is available.\n   */\n  load(arr: [K, LRUCache.Entry][]) {\n    this.clear()\n    for (const [key, entry] of arr) {\n      if (entry.start) {\n        // entry.start is a portable timestamp, but we may be using\n        // node's performance.now(), so calculate the offset, so that\n        // we get the intended remaining TTL, no matter how long it's\n        // been on ice.\n        //\n        // it's ok for this to be a bit slow, it's a rare operation.\n        const age = Date.now() - entry.start\n        entry.start = perf.now() - age\n      }\n      this.set(key, entry.value, entry)\n    }\n  }\n\n  /**\n   * Add a value to the cache.\n   *\n   * Note: if `undefined` is specified as a value, this is an alias for\n   * {@link LRUCache#delete}\n   *\n   * Fields on the {@link LRUCache.SetOptions} options param will override\n   * their corresponding values in the constructor options for the scope\n   * of this single `set()` operation.\n   *\n   * If `start` is provided, then that will set the effective start\n   * time for the TTL calculation. Note that this must be a previous\n   * value of `performance.now()` if supported, or a previous value of\n   * `Date.now()` if not.\n   *\n   * Options object may also include `size`, which will prevent\n   * calling the `sizeCalculation` function and just use the specified\n   * number if it is a positive integer, and `noDisposeOnSet` which\n   * will prevent calling a `dispose` function in the case of\n   * overwrites.\n   *\n   * If the `size` (or return value of `sizeCalculation`) for a given\n   * entry is greater than `maxEntrySize`, then the item will not be\n   * added to the cache.\n   *\n   * Will update the recency of the entry.\n   *\n   * If the value is `undefined`, then this is an alias for\n   * `cache.delete(key)`. `undefined` is never stored in the cache.\n   */\n  set(\n    k: K,\n    v: V | BackgroundFetch | undefined,\n    setOptions: LRUCache.SetOptions = {}\n  ) {\n    if (v === undefined) {\n      this.delete(k)\n      return this\n    }\n    const {\n      ttl = this.ttl,\n      start,\n      noDisposeOnSet = this.noDisposeOnSet,\n      sizeCalculation = this.sizeCalculation,\n      status,\n    } = setOptions\n    let { noUpdateTTL = this.noUpdateTTL } = setOptions\n\n    const size = this.#requireSize(\n      k,\n      v,\n      setOptions.size || 0,\n      sizeCalculation\n    )\n    // if the item doesn't fit, don't do anything\n    // NB: maxEntrySize set to maxSize by default\n    if (this.maxEntrySize && size > this.maxEntrySize) {\n      if (status) {\n        status.set = 'miss'\n        status.maxEntrySizeExceeded = true\n      }\n      // have to delete, in case something is there already.\n      this.#delete(k, 'set')\n      return this\n    }\n    let index = this.#size === 0 ? undefined : this.#keyMap.get(k)\n    if (index === undefined) {\n      // addition\n      index = (\n        this.#size === 0\n          ? this.#tail\n          : this.#free.length !== 0\n          ? this.#free.pop()\n          : this.#size === this.#max\n          ? this.#evict(false)\n          : this.#size\n      ) as Index\n      this.#keyList[index] = k\n      this.#valList[index] = v\n      this.#keyMap.set(k, index)\n      this.#next[this.#tail] = index\n      this.#prev[index] = this.#tail\n      this.#tail = index\n      this.#size++\n      this.#addItemSize(index, size, status)\n      if (status) status.set = 'add'\n      noUpdateTTL = false\n    } else {\n      // update\n      this.#moveToTail(index)\n      const oldVal = this.#valList[index] as V | BackgroundFetch\n      if (v !== oldVal) {\n        if (this.#hasFetchMethod && this.#isBackgroundFetch(oldVal)) {\n          oldVal.__abortController.abort(new Error('replaced'))\n          const { __staleWhileFetching: s } = oldVal\n          if (s !== undefined && !noDisposeOnSet) {\n            if (this.#hasDispose) {\n              this.#dispose?.(s as V, k, 'set')\n            }\n            if (this.#hasDisposeAfter) {\n              this.#disposed?.push([s as V, k, 'set'])\n            }\n          }\n        } else if (!noDisposeOnSet) {\n          if (this.#hasDispose) {\n            this.#dispose?.(oldVal as V, k, 'set')\n          }\n          if (this.#hasDisposeAfter) {\n            this.#disposed?.push([oldVal as V, k, 'set'])\n          }\n        }\n        this.#removeItemSize(index)\n        this.#addItemSize(index, size, status)\n        this.#valList[index] = v\n        if (status) {\n          status.set = 'replace'\n          const oldValue =\n            oldVal && this.#isBackgroundFetch(oldVal)\n              ? oldVal.__staleWhileFetching\n              : oldVal\n          if (oldValue !== undefined) status.oldValue = oldValue\n        }\n      } else if (status) {\n        status.set = 'update'\n      }\n    }\n    if (ttl !== 0 && !this.#ttls) {\n      this.#initializeTTLTracking()\n    }\n    if (this.#ttls) {\n      if (!noUpdateTTL) {\n        this.#setItemTTL(index, ttl, start)\n      }\n      if (status) this.#statusTTL(status, index)\n    }\n    if (!noDisposeOnSet && this.#hasDisposeAfter && this.#disposed) {\n      const dt = this.#disposed\n      let task: DisposeTask | undefined\n      while ((task = dt?.shift())) {\n        this.#disposeAfter?.(...task)\n      }\n    }\n    return this\n  }\n\n  /**\n   * Evict the least recently used item, returning its value or\n   * `undefined` if cache is empty.\n   */\n  pop(): V | undefined {\n    try {\n      while (this.#size) {\n        const val = this.#valList[this.#head]\n        this.#evict(true)\n        if (this.#isBackgroundFetch(val)) {\n          if (val.__staleWhileFetching) {\n            return val.__staleWhileFetching\n          }\n        } else if (val !== undefined) {\n          return val\n        }\n      }\n    } finally {\n      if (this.#hasDisposeAfter && this.#disposed) {\n        const dt = this.#disposed\n        let task: DisposeTask | undefined\n        while ((task = dt?.shift())) {\n          this.#disposeAfter?.(...task)\n        }\n      }\n    }\n  }\n\n  #evict(free: boolean) {\n    const head = this.#head\n    const k = this.#keyList[head] as K\n    const v = this.#valList[head] as V\n    if (this.#hasFetchMethod && this.#isBackgroundFetch(v)) {\n      v.__abortController.abort(new Error('evicted'))\n    } else if (this.#hasDispose || this.#hasDisposeAfter) {\n      if (this.#hasDispose) {\n        this.#dispose?.(v, k, 'evict')\n      }\n      if (this.#hasDisposeAfter) {\n        this.#disposed?.push([v, k, 'evict'])\n      }\n    }\n    this.#removeItemSize(head)\n    // if we aren't about to use the index, then null these out\n    if (free) {\n      this.#keyList[head] = undefined\n      this.#valList[head] = undefined\n      this.#free.push(head)\n    }\n    if (this.#size === 1) {\n      this.#head = this.#tail = 0 as Index\n      this.#free.length = 0\n    } else {\n      this.#head = this.#next[head] as Index\n    }\n    this.#keyMap.delete(k)\n    this.#size--\n    return head\n  }\n\n  /**\n   * Check if a key is in the cache, without updating the recency of use.\n   * Will return false if the item is stale, even though it is technically\n   * in the cache.\n   *\n   * Check if a key is in the cache, without updating the recency of\n   * use. Age is updated if {@link LRUCache.OptionsBase.updateAgeOnHas} is set\n   * to `true` in either the options or the constructor.\n   *\n   * Will return `false` if the item is stale, even though it is technically in\n   * the cache. The difference can be determined (if it matters) by using a\n   * `status` argument, and inspecting the `has` field.\n   *\n   * Will not update item age unless\n   * {@link LRUCache.OptionsBase.updateAgeOnHas} is set.\n   */\n  has(k: K, hasOptions: LRUCache.HasOptions = {}) {\n    const { updateAgeOnHas = this.updateAgeOnHas, status } =\n      hasOptions\n    const index = this.#keyMap.get(k)\n    if (index !== undefined) {\n      const v = this.#valList[index]\n      if (\n        this.#isBackgroundFetch(v) &&\n        v.__staleWhileFetching === undefined\n      ) {\n        return false\n      }\n      if (!this.#isStale(index)) {\n        if (updateAgeOnHas) {\n          this.#updateItemAge(index)\n        }\n        if (status) {\n          status.has = 'hit'\n          this.#statusTTL(status, index)\n        }\n        return true\n      } else if (status) {\n        status.has = 'stale'\n        this.#statusTTL(status, index)\n      }\n    } else if (status) {\n      status.has = 'miss'\n    }\n    return false\n  }\n\n  /**\n   * Like {@link LRUCache#get} but doesn't update recency or delete stale\n   * items.\n   *\n   * Returns `undefined` if the item is stale, unless\n   * {@link LRUCache.OptionsBase.allowStale} is set.\n   */\n  peek(k: K, peekOptions: LRUCache.PeekOptions = {}) {\n    const { allowStale = this.allowStale } = peekOptions\n    const index = this.#keyMap.get(k)\n    if (\n      index === undefined ||\n      (!allowStale && this.#isStale(index))\n    ) {\n      return\n    }\n    const v = this.#valList[index]\n    // either stale and allowed, or forcing a refresh of non-stale value\n    return this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v\n  }\n\n  #backgroundFetch(\n    k: K,\n    index: Index | undefined,\n    options: LRUCache.FetchOptions,\n    context: any\n  ): BackgroundFetch {\n    const v = index === undefined ? undefined : this.#valList[index]\n    if (this.#isBackgroundFetch(v)) {\n      return v\n    }\n\n    const ac = new AC()\n    const { signal } = options\n    // when/if our AC signals, then stop listening to theirs.\n    signal?.addEventListener('abort', () => ac.abort(signal.reason), {\n      signal: ac.signal,\n    })\n\n    const fetchOpts = {\n      signal: ac.signal,\n      options,\n      context,\n    }\n\n    const cb = (\n      v: V | undefined,\n      updateCache = false\n    ): V | undefined => {\n      const { aborted } = ac.signal\n      const ignoreAbort = options.ignoreFetchAbort && v !== undefined\n      if (options.status) {\n        if (aborted && !updateCache) {\n          options.status.fetchAborted = true\n          options.status.fetchError = ac.signal.reason\n          if (ignoreAbort) options.status.fetchAbortIgnored = true\n        } else {\n          options.status.fetchResolved = true\n        }\n      }\n      if (aborted && !ignoreAbort && !updateCache) {\n        return fetchFail(ac.signal.reason)\n      }\n      // either we didn't abort, and are still here, or we did, and ignored\n      const bf = p as BackgroundFetch\n      if (this.#valList[index as Index] === p) {\n        if (v === undefined) {\n          if (bf.__staleWhileFetching) {\n            this.#valList[index as Index] = bf.__staleWhileFetching\n          } else {\n            this.#delete(k, 'fetch')\n          }\n        } else {\n          if (options.status) options.status.fetchUpdated = true\n          this.set(k, v, fetchOpts.options)\n        }\n      }\n      return v\n    }\n\n    const eb = (er: any) => {\n      if (options.status) {\n        options.status.fetchRejected = true\n        options.status.fetchError = er\n      }\n      return fetchFail(er)\n    }\n\n    const fetchFail = (er: any): V | undefined => {\n      const { aborted } = ac.signal\n      const allowStaleAborted =\n        aborted && options.allowStaleOnFetchAbort\n      const allowStale =\n        allowStaleAborted || options.allowStaleOnFetchRejection\n      const noDelete = allowStale || options.noDeleteOnFetchRejection\n      const bf = p as BackgroundFetch\n      if (this.#valList[index as Index] === p) {\n        // if we allow stale on fetch rejections, then we need to ensure that\n        // the stale value is not removed from the cache when the fetch fails.\n        const del = !noDelete || bf.__staleWhileFetching === undefined\n        if (del) {\n          this.#delete(k, 'fetch')\n        } else if (!allowStaleAborted) {\n          // still replace the *promise* with the stale value,\n          // since we are done with the promise at this point.\n          // leave it untouched if we're still waiting for an\n          // aborted background fetch that hasn't yet returned.\n          this.#valList[index as Index] = bf.__staleWhileFetching\n        }\n      }\n      if (allowStale) {\n        if (options.status && bf.__staleWhileFetching !== undefined) {\n          options.status.returnedStale = true\n        }\n        return bf.__staleWhileFetching\n      } else if (bf.__returned === bf) {\n        throw er\n      }\n    }\n\n    const pcall = (\n      res: (v: V | undefined) => void,\n      rej: (e: any) => void\n    ) => {\n      const fmp = this.#fetchMethod?.(k, v, fetchOpts)\n      if (fmp && fmp instanceof Promise) {\n        fmp.then(v => res(v === undefined ? undefined : v), rej)\n      }\n      // ignored, we go until we finish, regardless.\n      // defer check until we are actually aborting,\n      // so fetchMethod can override.\n      ac.signal.addEventListener('abort', () => {\n        if (\n          !options.ignoreFetchAbort ||\n          options.allowStaleOnFetchAbort\n        ) {\n          res(undefined)\n          // when it eventually resolves, update the cache.\n          if (options.allowStaleOnFetchAbort) {\n            res = v => cb(v, true)\n          }\n        }\n      })\n    }\n\n    if (options.status) options.status.fetchDispatched = true\n    const p = new Promise(pcall).then(cb, eb)\n    const bf: BackgroundFetch = Object.assign(p, {\n      __abortController: ac,\n      __staleWhileFetching: v,\n      __returned: undefined,\n    })\n\n    if (index === undefined) {\n      // internal, don't expose status.\n      this.set(k, bf, { ...fetchOpts.options, status: undefined })\n      index = this.#keyMap.get(k)\n    } else {\n      this.#valList[index] = bf\n    }\n    return bf\n  }\n\n  #isBackgroundFetch(p: any): p is BackgroundFetch {\n    if (!this.#hasFetchMethod) return false\n    const b = p as BackgroundFetch\n    return (\n      !!b &&\n      b instanceof Promise &&\n      b.hasOwnProperty('__staleWhileFetching') &&\n      b.__abortController instanceof AC\n    )\n  }\n\n  /**\n   * Make an asynchronous cached fetch using the\n   * {@link LRUCache.OptionsBase.fetchMethod} function.\n   *\n   * If the value is in the cache and not stale, then the returned\n   * Promise resolves to the value.\n   *\n   * If not in the cache, or beyond its TTL staleness, then\n   * `fetchMethod(key, staleValue, { options, signal, context })` is\n   * called, and the value returned will be added to the cache once\n   * resolved.\n   *\n   * If called with `allowStale`, and an asynchronous fetch is\n   * currently in progress to reload a stale value, then the former\n   * stale value will be returned.\n   *\n   * If called with `forceRefresh`, then the cached item will be\n   * re-fetched, even if it is not stale. However, if `allowStale` is also\n   * set, then the old value will still be returned. This is useful\n   * in cases where you want to force a reload of a cached value. If\n   * a background fetch is already in progress, then `forceRefresh`\n   * has no effect.\n   *\n   * If multiple fetches for the same key are issued, then they will all be\n   * coalesced into a single call to fetchMethod.\n   *\n   * Note that this means that handling options such as\n   * {@link LRUCache.OptionsBase.allowStaleOnFetchAbort},\n   * {@link LRUCache.FetchOptions.signal},\n   * and {@link LRUCache.OptionsBase.allowStaleOnFetchRejection} will be\n   * determined by the FIRST fetch() call for a given key.\n   *\n   * This is a known (fixable) shortcoming which will be addresed on when\n   * someone complains about it, as the fix would involve added complexity and\n   * may not be worth the costs for this edge case.\n   *\n   * If {@link LRUCache.OptionsBase.fetchMethod} is not specified, then this is\n   * effectively an alias for `Promise.resolve(cache.get(key))`.\n   *\n   * When the fetch method resolves to a value, if the fetch has not\n   * been aborted due to deletion, eviction, or being overwritten,\n   * then it is added to the cache using the options provided.\n   *\n   * If the key is evicted or deleted before the `fetchMethod`\n   * resolves, then the AbortSignal passed to the `fetchMethod` will\n   * receive an `abort` event, and the promise returned by `fetch()`\n   * will reject with the reason for the abort.\n   *\n   * If a `signal` is passed to the `fetch()` call, then aborting the\n   * signal will abort the fetch and cause the `fetch()` promise to\n   * reject with the reason provided.\n   *\n   * **Setting `context`**\n   *\n   * If an `FC` type is set to a type other than `unknown`, `void`, or\n   * `undefined` in the {@link LRUCache} constructor, then all\n   * calls to `cache.fetch()` _must_ provide a `context` option. If\n   * set to `undefined` or `void`, then calls to fetch _must not_\n   * provide a `context` option.\n   *\n   * The `context` param allows you to provide arbitrary data that\n   * might be relevant in the course of fetching the data. It is only\n   * relevant for the course of a single `fetch()` operation, and\n   * discarded afterwards.\n   *\n   * **Note: `fetch()` calls are inflight-unique**\n   *\n   * If you call `fetch()` multiple times with the same key value,\n   * then every call after the first will resolve on the same\n   * promise1,\n   * _even if they have different settings that would otherwise change\n   * the behavior of the fetch_, such as `noDeleteOnFetchRejection`\n   * or `ignoreFetchAbort`.\n   *\n   * In most cases, this is not a problem (in fact, only fetching\n   * something once is what you probably want, if you're caching in\n   * the first place). If you are changing the fetch() options\n   * dramatically between runs, there's a good chance that you might\n   * be trying to fit divergent semantics into a single object, and\n   * would be better off with multiple cache instances.\n   *\n   * **1**: Ie, they're not the \"same Promise\", but they resolve at\n   * the same time, because they're both waiting on the same\n   * underlying fetchMethod response.\n   */\n\n  fetch(\n    k: K,\n    fetchOptions: unknown extends FC\n      ? LRUCache.FetchOptions\n      : FC extends undefined | void\n      ? LRUCache.FetchOptionsNoContext\n      : LRUCache.FetchOptionsWithContext\n  ): Promise\n\n  // this overload not allowed if context is required\n  fetch(\n    k: unknown extends FC\n      ? K\n      : FC extends undefined | void\n      ? K\n      : never,\n    fetchOptions?: unknown extends FC\n      ? LRUCache.FetchOptions\n      : FC extends undefined | void\n      ? LRUCache.FetchOptionsNoContext\n      : never\n  ): Promise\n\n  async fetch(\n    k: K,\n    fetchOptions: LRUCache.FetchOptions = {}\n  ): Promise {\n    const {\n      // get options\n      allowStale = this.allowStale,\n      updateAgeOnGet = this.updateAgeOnGet,\n      noDeleteOnStaleGet = this.noDeleteOnStaleGet,\n      // set options\n      ttl = this.ttl,\n      noDisposeOnSet = this.noDisposeOnSet,\n      size = 0,\n      sizeCalculation = this.sizeCalculation,\n      noUpdateTTL = this.noUpdateTTL,\n      // fetch exclusive options\n      noDeleteOnFetchRejection = this.noDeleteOnFetchRejection,\n      allowStaleOnFetchRejection = this.allowStaleOnFetchRejection,\n      ignoreFetchAbort = this.ignoreFetchAbort,\n      allowStaleOnFetchAbort = this.allowStaleOnFetchAbort,\n      context,\n      forceRefresh = false,\n      status,\n      signal,\n    } = fetchOptions\n\n    if (!this.#hasFetchMethod) {\n      if (status) status.fetch = 'get'\n      return this.get(k, {\n        allowStale,\n        updateAgeOnGet,\n        noDeleteOnStaleGet,\n        status,\n      })\n    }\n\n    const options = {\n      allowStale,\n      updateAgeOnGet,\n      noDeleteOnStaleGet,\n      ttl,\n      noDisposeOnSet,\n      size,\n      sizeCalculation,\n      noUpdateTTL,\n      noDeleteOnFetchRejection,\n      allowStaleOnFetchRejection,\n      allowStaleOnFetchAbort,\n      ignoreFetchAbort,\n      status,\n      signal,\n    }\n\n    let index = this.#keyMap.get(k)\n    if (index === undefined) {\n      if (status) status.fetch = 'miss'\n      const p = this.#backgroundFetch(k, index, options, context)\n      return (p.__returned = p)\n    } else {\n      // in cache, maybe already fetching\n      const v = this.#valList[index]\n      if (this.#isBackgroundFetch(v)) {\n        const stale =\n          allowStale && v.__staleWhileFetching !== undefined\n        if (status) {\n          status.fetch = 'inflight'\n          if (stale) status.returnedStale = true\n        }\n        return stale ? v.__staleWhileFetching : (v.__returned = v)\n      }\n\n      // if we force a refresh, that means do NOT serve the cached value,\n      // unless we are already in the process of refreshing the cache.\n      const isStale = this.#isStale(index)\n      if (!forceRefresh && !isStale) {\n        if (status) status.fetch = 'hit'\n        this.#moveToTail(index)\n        if (updateAgeOnGet) {\n          this.#updateItemAge(index)\n        }\n        if (status) this.#statusTTL(status, index)\n        return v\n      }\n\n      // ok, it is stale or a forced refresh, and not already fetching.\n      // refresh the cache.\n      const p = this.#backgroundFetch(k, index, options, context)\n      const hasStale = p.__staleWhileFetching !== undefined\n      const staleVal = hasStale && allowStale\n      if (status) {\n        status.fetch = isStale ? 'stale' : 'refresh'\n        if (staleVal && isStale) status.returnedStale = true\n      }\n      return staleVal ? p.__staleWhileFetching : (p.__returned = p)\n    }\n  }\n\n  /**\n   * In some cases, `cache.fetch()` may resolve to `undefined`, either because\n   * a {@link LRUCache.OptionsBase#fetchMethod} was not provided (turning\n   * `cache.fetch(k)` into just an async wrapper around `cache.get(k)`) or\n   * because `ignoreFetchAbort` was specified (either to the constructor or\n   * in the {@link LRUCache.FetchOptions}). Also, the\n   * {@link OptionsBase.fetchMethod} may return `undefined` or `void`, making\n   * the test even more complicated.\n   *\n   * Because inferring the cases where `undefined` might be returned are so\n   * cumbersome, but testing for `undefined` can also be annoying, this method\n   * can be used, which will reject if `this.fetch()` resolves to undefined.\n   */\n  forceFetch(\n    k: K,\n    fetchOptions: unknown extends FC\n      ? LRUCache.FetchOptions\n      : FC extends undefined | void\n      ? LRUCache.FetchOptionsNoContext\n      : LRUCache.FetchOptionsWithContext\n  ): Promise\n  // this overload not allowed if context is required\n  forceFetch(\n    k: unknown extends FC\n      ? K\n      : FC extends undefined | void\n      ? K\n      : never,\n    fetchOptions?: unknown extends FC\n      ? LRUCache.FetchOptions\n      : FC extends undefined | void\n      ? LRUCache.FetchOptionsNoContext\n      : never\n  ): Promise\n  async forceFetch(\n    k: K,\n    fetchOptions: LRUCache.FetchOptions = {}\n  ): Promise {\n    const v = await this.fetch(\n      k,\n      fetchOptions as unknown extends FC\n        ? LRUCache.FetchOptions\n        : FC extends undefined | void\n        ? LRUCache.FetchOptionsNoContext\n        : LRUCache.FetchOptionsWithContext\n    )\n    if (v === undefined) throw new Error('fetch() returned undefined')\n    return v\n  }\n\n  /**\n   * If the key is found in the cache, then this is equivalent to\n   * {@link LRUCache#get}. If not, in the cache, then calculate the value using\n   * the {@link LRUCache.OptionsBase.memoMethod}, and add it to the cache.\n   *\n   * If an `FC` type is set to a type other than `unknown`, `void`, or\n   * `undefined` in the LRUCache constructor, then all calls to `cache.memo()`\n   * _must_ provide a `context` option. If set to `undefined` or `void`, then\n   * calls to memo _must not_ provide a `context` option.\n   *\n   * The `context` param allows you to provide arbitrary data that might be\n   * relevant in the course of fetching the data. It is only relevant for the\n   * course of a single `memo()` operation, and discarded afterwards.\n   */\n  memo(\n    k: K,\n    memoOptions: unknown extends FC\n      ? LRUCache.MemoOptions\n      : FC extends undefined | void\n      ? LRUCache.MemoOptionsNoContext\n      : LRUCache.MemoOptionsWithContext\n  ): V\n  // this overload not allowed if context is required\n  memo(\n    k: unknown extends FC\n      ? K\n      : FC extends undefined | void\n      ? K\n      : never,\n    memoOptions?: unknown extends FC\n      ? LRUCache.MemoOptions\n      : FC extends undefined | void\n      ? LRUCache.MemoOptionsNoContext\n      : never\n  ): V\n  memo(k: K, memoOptions: LRUCache.MemoOptions = {}) {\n    const memoMethod = this.#memoMethod\n    if (!memoMethod) {\n      throw new Error('no memoMethod provided to constructor')\n    }\n    const { context, forceRefresh, ...options } = memoOptions\n    const v = this.get(k, options)\n    if (!forceRefresh && v !== undefined) return v\n    const vv = memoMethod(k, v, {\n      options,\n      context,\n    } as LRUCache.MemoizerOptions)\n    this.set(k, vv, options)\n    return vv\n  }\n\n  /**\n   * Return a value from the cache. Will update the recency of the cache\n   * entry found.\n   *\n   * If the key is not found, get() will return `undefined`.\n   */\n  get(k: K, getOptions: LRUCache.GetOptions = {}) {\n    const {\n      allowStale = this.allowStale,\n      updateAgeOnGet = this.updateAgeOnGet,\n      noDeleteOnStaleGet = this.noDeleteOnStaleGet,\n      status,\n    } = getOptions\n    const index = this.#keyMap.get(k)\n    if (index !== undefined) {\n      const value = this.#valList[index]\n      const fetching = this.#isBackgroundFetch(value)\n      if (status) this.#statusTTL(status, index)\n      if (this.#isStale(index)) {\n        if (status) status.get = 'stale'\n        // delete only if not an in-flight background fetch\n        if (!fetching) {\n          if (!noDeleteOnStaleGet) {\n            this.#delete(k, 'expire')\n          }\n          if (status && allowStale) status.returnedStale = true\n          return allowStale ? value : undefined\n        } else {\n          if (\n            status &&\n            allowStale &&\n            value.__staleWhileFetching !== undefined\n          ) {\n            status.returnedStale = true\n          }\n          return allowStale ? value.__staleWhileFetching : undefined\n        }\n      } else {\n        if (status) status.get = 'hit'\n        // if we're currently fetching it, we don't actually have it yet\n        // it's not stale, which means this isn't a staleWhileRefetching.\n        // If it's not stale, and fetching, AND has a __staleWhileFetching\n        // value, then that means the user fetched with {forceRefresh:true},\n        // so it's safe to return that value.\n        if (fetching) {\n          return value.__staleWhileFetching\n        }\n        this.#moveToTail(index)\n        if (updateAgeOnGet) {\n          this.#updateItemAge(index)\n        }\n        return value\n      }\n    } else if (status) {\n      status.get = 'miss'\n    }\n  }\n\n  #connect(p: Index, n: Index) {\n    this.#prev[n] = p\n    this.#next[p] = n\n  }\n\n  #moveToTail(index: Index): void {\n    // if tail already, nothing to do\n    // if head, move head to next[index]\n    // else\n    //   move next[prev[index]] to next[index] (head has no prev)\n    //   move prev[next[index]] to prev[index]\n    // prev[index] = tail\n    // next[tail] = index\n    // tail = index\n    if (index !== this.#tail) {\n      if (index === this.#head) {\n        this.#head = this.#next[index] as Index\n      } else {\n        this.#connect(\n          this.#prev[index] as Index,\n          this.#next[index] as Index\n        )\n      }\n      this.#connect(this.#tail, index)\n      this.#tail = index\n    }\n  }\n\n  /**\n   * Deletes a key out of the cache.\n   *\n   * Returns true if the key was deleted, false otherwise.\n   */\n  delete(k: K) {\n    return this.#delete(k, 'delete')\n  }\n\n  #delete(k: K, reason: LRUCache.DisposeReason) {\n    let deleted = false\n    if (this.#size !== 0) {\n      const index = this.#keyMap.get(k)\n      if (index !== undefined) {\n        deleted = true\n        if (this.#size === 1) {\n          this.#clear(reason)\n        } else {\n          this.#removeItemSize(index)\n          const v = this.#valList[index]\n          if (this.#isBackgroundFetch(v)) {\n            v.__abortController.abort(new Error('deleted'))\n          } else if (this.#hasDispose || this.#hasDisposeAfter) {\n            if (this.#hasDispose) {\n              this.#dispose?.(v as V, k, reason)\n            }\n            if (this.#hasDisposeAfter) {\n              this.#disposed?.push([v as V, k, reason])\n            }\n          }\n          this.#keyMap.delete(k)\n          this.#keyList[index] = undefined\n          this.#valList[index] = undefined\n          if (index === this.#tail) {\n            this.#tail = this.#prev[index] as Index\n          } else if (index === this.#head) {\n            this.#head = this.#next[index] as Index\n          } else {\n            const pi = this.#prev[index] as number\n            this.#next[pi] = this.#next[index] as number\n            const ni = this.#next[index] as number\n            this.#prev[ni] = this.#prev[index] as number\n          }\n          this.#size--\n          this.#free.push(index)\n        }\n      }\n    }\n    if (this.#hasDisposeAfter && this.#disposed?.length) {\n      const dt = this.#disposed\n      let task: DisposeTask | undefined\n      while ((task = dt?.shift())) {\n        this.#disposeAfter?.(...task)\n      }\n    }\n    return deleted\n  }\n\n  /**\n   * Clear the cache entirely, throwing away all values.\n   */\n  clear() {\n    return this.#clear('delete')\n  }\n  #clear(reason: LRUCache.DisposeReason) {\n    for (const index of this.#rindexes({ allowStale: true })) {\n      const v = this.#valList[index]\n      if (this.#isBackgroundFetch(v)) {\n        v.__abortController.abort(new Error('deleted'))\n      } else {\n        const k = this.#keyList[index]\n        if (this.#hasDispose) {\n          this.#dispose?.(v as V, k as K, reason)\n        }\n        if (this.#hasDisposeAfter) {\n          this.#disposed?.push([v as V, k as K, reason])\n        }\n      }\n    }\n\n    this.#keyMap.clear()\n    this.#valList.fill(undefined)\n    this.#keyList.fill(undefined)\n    if (this.#ttls && this.#starts) {\n      this.#ttls.fill(0)\n      this.#starts.fill(0)\n    }\n    if (this.#sizes) {\n      this.#sizes.fill(0)\n    }\n    this.#head = 0 as Index\n    this.#tail = 0 as Index\n    this.#free.length = 0\n    this.#calculatedSize = 0\n    this.#size = 0\n    if (this.#hasDisposeAfter && this.#disposed) {\n      const dt = this.#disposed\n      let task: DisposeTask | undefined\n      while ((task = dt?.shift())) {\n        this.#disposeAfter?.(...task)\n      }\n    }\n  }\n}\n"],
              -  "mappings": "mVAMA,IAAMA,EACJ,OAAO,aAAgB,UACvB,aACA,OAAO,YAAY,KAAQ,WACvB,YACA,KAEAC,EAAS,IAAI,IAMbC,EACJ,OAAO,SAAY,UAAc,QAAU,QAAU,CAAA,EAIjDC,EAAc,CAClBC,EACAC,EACAC,EACAC,IACE,CACF,OAAOL,EAAQ,aAAgB,WAC3BA,EAAQ,YAAYE,EAAKC,EAAMC,EAAMC,CAAE,EACvC,QAAQ,MAAM,IAAID,MAASD,MAASD,GAAK,CAC/C,EAEII,EAAK,WAAW,gBAChBC,EAAK,WAAW,YAGpB,GAAI,OAAOD,EAAO,IAAa,CAE7BC,EAAK,KAAiB,CACpB,QACA,SAAqC,CAAA,EACrC,OACA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AAI,KAAKjB,GAASkB,CAAK,EACzB,KAAKP,IACP,KAAKlB,KAAWwE,EAAQhD,EAAQ7C,CAAM,EAEpC,KAAKyC,IACP,KAAKN,IAAW,KAAK,CAAC0D,EAAQhD,EAAQ7C,CAAM,CAAC,GAoBnD,GAfA,KAAK2B,GAAQ,MAAK,EAClB,KAAKE,GAAS,KAAK,MAAS,EAC5B,KAAKD,GAAS,KAAK,MAAS,EACxB,KAAKU,IAAS,KAAKD,KACrB,KAAKC,GAAM,KAAK,CAAC,EACjB,KAAKD,GAAQ,KAAK,CAAC,GAEjB,KAAKD,IACP,KAAKA,GAAO,KAAK,CAAC,EAEpB,KAAKJ,GAAQ,EACb,KAAKC,GAAQ,EACb,KAAKC,GAAM,OAAS,EACpB,KAAKR,GAAkB,EACvB,KAAKD,GAAQ,EACT,KAAKgB,IAAoB,KAAKN,GAAW,CAC3C,IAAM8E,EAAK,KAAK9E,GACZ+E,EACJ,KAAQA,EAAOD,GAAI,MAAK,GACtB,KAAK3F,KAAgB,GAAG4F,CAAI,EAGlC",
              -  "names": ["perf", "warned", "PROCESS", "emitWarning", "msg", "type", "code", "fn", "AC", "AS", "_", "warnACPolyfill", "reason", "printACPolyfillWarning", "shouldWarn", "TYPE", "isPosInt", "n", "getUintArray", "max", "ZeroArray", "size", "_constructing", "_Stack", "HeapCls", "__privateSet", "s", "__privateGet", "Stack", "__privateAdd", "LRUCache", "#max", "#maxSize", "#dispose", "#disposeAfter", "#fetchMethod", "#memoMethod", "#size", "#calculatedSize", "#keyMap", "#keyList", "#valList", "#next", "#prev", "#head", "#tail", "#free", "#disposed", "#sizes", "#starts", "#ttls", "#hasDispose", "#hasFetchMethod", "#hasDisposeAfter", "c", "p", "#isBackgroundFetch", "k", "index", "options", "context", "#backgroundFetch", "#moveToTail", "#indexes", "#rindexes", "#isStale", "ttl", "ttlResolution", "ttlAutopurge", "updateAgeOnGet", "updateAgeOnHas", "allowStale", "dispose", "disposeAfter", "noDisposeOnSet", "noUpdateTTL", "maxSize", "maxEntrySize", "sizeCalculation", "fetchMethod", "memoMethod", "noDeleteOnFetchRejection", "noDeleteOnStaleGet", "allowStaleOnFetchRejection", "allowStaleOnFetchAbort", "ignoreFetchAbort", "UintArray", "#initializeSizeTracking", "#initializeTTLTracking", "key", "ttls", "starts", "#setItemTTL", "start", "t", "#delete", "#updateItemAge", "#statusTTL", "status", "cachedNow", "getNow", "age", "sizes", "#removeItemSize", "#requireSize", "v", "#addItemSize", "#evict", "_i", "_s", "_st", "_k", "_v", "i", "#isValidIndex", "getOptions", "value", "thisp", "deleted", "entry", "remain", "arr", "setOptions", "oldVal", "oldValue", "dt", "task", "val", "free", "head", "hasOptions", "peekOptions", "ac", "signal", "fetchOpts", "cb", "updateCache", "aborted", "ignoreAbort", "fetchFail", "bf", "eb", "er", "allowStaleAborted", "noDelete", "pcall", "res", "rej", "fmp", "b", "fetchOptions", "forceRefresh", "stale", "isStale", "staleVal", "memoOptions", "vv", "fetching", "#connect", "#clear", "pi", "ni"]
              -}
              diff --git a/node_modules/path-scurry/node_modules/lru-cache/dist/esm/package.json b/node_modules/path-scurry/node_modules/lru-cache/dist/esm/package.json
              deleted file mode 100644
              index 3dbc1ca5..00000000
              --- a/node_modules/path-scurry/node_modules/lru-cache/dist/esm/package.json
              +++ /dev/null
              @@ -1,3 +0,0 @@
              -{
              -  "type": "module"
              -}
              diff --git a/node_modules/path-scurry/node_modules/lru-cache/package.json b/node_modules/path-scurry/node_modules/lru-cache/package.json
              deleted file mode 100644
              index f3cd4c0c..00000000
              --- a/node_modules/path-scurry/node_modules/lru-cache/package.json
              +++ /dev/null
              @@ -1,116 +0,0 @@
              -{
              -  "name": "lru-cache",
              -  "publishConfig": {
              -    "tag": "legacy-v10"
              -  },
              -  "description": "A cache object that deletes the least-recently-used items.",
              -  "version": "10.4.3",
              -  "author": "Isaac Z. Schlueter ",
              -  "keywords": [
              -    "mru",
              -    "lru",
              -    "cache"
              -  ],
              -  "sideEffects": false,
              -  "scripts": {
              -    "build": "npm run prepare",
              -    "prepare": "tshy && bash fixup.sh",
              -    "pretest": "npm run prepare",
              -    "presnap": "npm run prepare",
              -    "test": "tap",
              -    "snap": "tap",
              -    "preversion": "npm test",
              -    "postversion": "npm publish",
              -    "prepublishOnly": "git push origin --follow-tags",
              -    "format": "prettier --write .",
              -    "typedoc": "typedoc --tsconfig ./.tshy/esm.json ./src/*.ts",
              -    "benchmark-results-typedoc": "bash scripts/benchmark-results-typedoc.sh",
              -    "prebenchmark": "npm run prepare",
              -    "benchmark": "make -C benchmark",
              -    "preprofile": "npm run prepare",
              -    "profile": "make -C benchmark profile"
              -  },
              -  "main": "./dist/commonjs/index.js",
              -  "types": "./dist/commonjs/index.d.ts",
              -  "tshy": {
              -    "exports": {
              -      ".": "./src/index.ts",
              -      "./min": {
              -        "import": {
              -          "types": "./dist/esm/index.d.ts",
              -          "default": "./dist/esm/index.min.js"
              -        },
              -        "require": {
              -          "types": "./dist/commonjs/index.d.ts",
              -          "default": "./dist/commonjs/index.min.js"
              -        }
              -      }
              -    }
              -  },
              -  "repository": {
              -    "type": "git",
              -    "url": "git://github.com/isaacs/node-lru-cache.git"
              -  },
              -  "devDependencies": {
              -    "@types/node": "^20.2.5",
              -    "@types/tap": "^15.0.6",
              -    "benchmark": "^2.1.4",
              -    "esbuild": "^0.17.11",
              -    "eslint-config-prettier": "^8.5.0",
              -    "marked": "^4.2.12",
              -    "mkdirp": "^2.1.5",
              -    "prettier": "^2.6.2",
              -    "tap": "^20.0.3",
              -    "tshy": "^2.0.0",
              -    "tslib": "^2.4.0",
              -    "typedoc": "^0.25.3",
              -    "typescript": "^5.2.2"
              -  },
              -  "license": "ISC",
              -  "files": [
              -    "dist"
              -  ],
              -  "prettier": {
              -    "semi": false,
              -    "printWidth": 70,
              -    "tabWidth": 2,
              -    "useTabs": false,
              -    "singleQuote": true,
              -    "jsxSingleQuote": false,
              -    "bracketSameLine": true,
              -    "arrowParens": "avoid",
              -    "endOfLine": "lf"
              -  },
              -  "tap": {
              -    "node-arg": [
              -      "--expose-gc"
              -    ],
              -    "plugin": [
              -      "@tapjs/clock"
              -    ]
              -  },
              -  "exports": {
              -    ".": {
              -      "import": {
              -        "types": "./dist/esm/index.d.ts",
              -        "default": "./dist/esm/index.js"
              -      },
              -      "require": {
              -        "types": "./dist/commonjs/index.d.ts",
              -        "default": "./dist/commonjs/index.js"
              -      }
              -    },
              -    "./min": {
              -      "import": {
              -        "types": "./dist/esm/index.d.ts",
              -        "default": "./dist/esm/index.min.js"
              -      },
              -      "require": {
              -        "types": "./dist/commonjs/index.d.ts",
              -        "default": "./dist/commonjs/index.min.js"
              -      }
              -    }
              -  },
              -  "type": "module",
              -  "module": "./dist/esm/index.js"
              -}
              diff --git a/node_modules/path-scurry/package.json b/node_modules/path-scurry/package.json
              deleted file mode 100644
              index e1766157..00000000
              --- a/node_modules/path-scurry/package.json
              +++ /dev/null
              @@ -1,89 +0,0 @@
              -{
              -  "name": "path-scurry",
              -  "version": "1.11.1",
              -  "description": "walk paths fast and efficiently",
              -  "author": "Isaac Z. Schlueter  (https://blog.izs.me)",
              -  "main": "./dist/commonjs/index.js",
              -  "type": "module",
              -  "exports": {
              -    "./package.json": "./package.json",
              -    ".": {
              -      "import": {
              -        "types": "./dist/esm/index.d.ts",
              -        "default": "./dist/esm/index.js"
              -      },
              -      "require": {
              -        "types": "./dist/commonjs/index.d.ts",
              -        "default": "./dist/commonjs/index.js"
              -      }
              -    }
              -  },
              -  "files": [
              -    "dist"
              -  ],
              -  "license": "BlueOak-1.0.0",
              -  "scripts": {
              -    "preversion": "npm test",
              -    "postversion": "npm publish",
              -    "prepublishOnly": "git push origin --follow-tags",
              -    "prepare": "tshy",
              -    "pretest": "npm run prepare",
              -    "presnap": "npm run prepare",
              -    "test": "tap",
              -    "snap": "tap",
              -    "format": "prettier --write . --loglevel warn",
              -    "typedoc": "typedoc --tsconfig tsconfig-esm.json ./src/*.ts",
              -    "bench": "bash ./scripts/bench.sh"
              -  },
              -  "prettier": {
              -    "experimentalTernaries": true,
              -    "semi": false,
              -    "printWidth": 75,
              -    "tabWidth": 2,
              -    "useTabs": false,
              -    "singleQuote": true,
              -    "jsxSingleQuote": false,
              -    "bracketSameLine": true,
              -    "arrowParens": "avoid",
              -    "endOfLine": "lf"
              -  },
              -  "devDependencies": {
              -    "@nodelib/fs.walk": "^1.2.8",
              -    "@types/node": "^20.12.11",
              -    "c8": "^7.12.0",
              -    "eslint-config-prettier": "^8.6.0",
              -    "mkdirp": "^3.0.0",
              -    "prettier": "^3.2.5",
              -    "rimraf": "^5.0.1",
              -    "tap": "^18.7.2",
              -    "ts-node": "^10.9.2",
              -    "tshy": "^1.14.0",
              -    "typedoc": "^0.25.12",
              -    "typescript": "^5.4.3"
              -  },
              -  "tap": {
              -    "typecheck": true
              -  },
              -  "engines": {
              -    "node": ">=16 || 14 >=14.18"
              -  },
              -  "funding": {
              -    "url": "https://github.com/sponsors/isaacs"
              -  },
              -  "repository": {
              -    "type": "git",
              -    "url": "git+https://github.com/isaacs/path-scurry"
              -  },
              -  "dependencies": {
              -    "lru-cache": "^10.2.0",
              -    "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0"
              -  },
              -  "tshy": {
              -    "selfLink": false,
              -    "exports": {
              -      "./package.json": "./package.json",
              -      ".": "./src/index.ts"
              -    }
              -  },
              -  "types": "./dist/commonjs/index.d.ts"
              -}
              diff --git a/node_modules/randombytes/.travis.yml b/node_modules/randombytes/.travis.yml
              deleted file mode 100644
              index 69fdf713..00000000
              --- a/node_modules/randombytes/.travis.yml
              +++ /dev/null
              @@ -1,15 +0,0 @@
              -sudo: false
              -language: node_js
              -matrix:
              -  include:
              -    - node_js: '7'
              -      env: TEST_SUITE=test
              -    - node_js: '6'
              -      env: TEST_SUITE=test
              -    - node_js: '5'
              -      env: TEST_SUITE=test
              -    - node_js: '4'
              -      env: TEST_SUITE=test
              -    - node_js: '4'
              -      env: TEST_SUITE=phantom
              -script: "npm run-script $TEST_SUITE"
              diff --git a/node_modules/randombytes/.zuul.yml b/node_modules/randombytes/.zuul.yml
              deleted file mode 100644
              index 96d9cfbd..00000000
              --- a/node_modules/randombytes/.zuul.yml
              +++ /dev/null
              @@ -1 +0,0 @@
              -ui: tape
              diff --git a/node_modules/randombytes/LICENSE b/node_modules/randombytes/LICENSE
              deleted file mode 100644
              index fea9d48a..00000000
              --- a/node_modules/randombytes/LICENSE
              +++ /dev/null
              @@ -1,21 +0,0 @@
              -MIT License
              -
              -Copyright (c) 2017 crypto-browserify
              -
              -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/randombytes/README.md b/node_modules/randombytes/README.md
              deleted file mode 100644
              index 3bacba4d..00000000
              --- a/node_modules/randombytes/README.md
              +++ /dev/null
              @@ -1,14 +0,0 @@
              -randombytes
              -===
              -
              -[![Version](http://img.shields.io/npm/v/randombytes.svg)](https://www.npmjs.org/package/randombytes) [![Build Status](https://travis-ci.org/crypto-browserify/randombytes.svg?branch=master)](https://travis-ci.org/crypto-browserify/randombytes)
              -
              -randombytes from node that works in the browser.  In node you just get crypto.randomBytes, but in the browser it uses .crypto/msCrypto.getRandomValues
              -
              -```js
              -var randomBytes = require('randombytes');
              -randomBytes(16);//get 16 random bytes
              -randomBytes(16, function (err, resp) {
              -  // resp is 16 random bytes
              -});
              -```
              diff --git a/node_modules/randombytes/browser.js b/node_modules/randombytes/browser.js
              deleted file mode 100644
              index 0fb0b715..00000000
              --- a/node_modules/randombytes/browser.js
              +++ /dev/null
              @@ -1,50 +0,0 @@
              -'use strict'
              -
              -// limit of Crypto.getRandomValues()
              -// https://developer.mozilla.org/en-US/docs/Web/API/Crypto/getRandomValues
              -var MAX_BYTES = 65536
              -
              -// Node supports requesting up to this number of bytes
              -// https://github.com/nodejs/node/blob/master/lib/internal/crypto/random.js#L48
              -var MAX_UINT32 = 4294967295
              -
              -function oldBrowser () {
              -  throw new Error('Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11')
              -}
              -
              -var Buffer = require('safe-buffer').Buffer
              -var crypto = global.crypto || global.msCrypto
              -
              -if (crypto && crypto.getRandomValues) {
              -  module.exports = randomBytes
              -} else {
              -  module.exports = oldBrowser
              -}
              -
              -function randomBytes (size, cb) {
              -  // phantomjs needs to throw
              -  if (size > MAX_UINT32) throw new RangeError('requested too many random bytes')
              -
              -  var bytes = Buffer.allocUnsafe(size)
              -
              -  if (size > 0) {  // getRandomValues fails on IE if size == 0
              -    if (size > MAX_BYTES) { // this is the max bytes crypto.getRandomValues
              -      // can do at once see https://developer.mozilla.org/en-US/docs/Web/API/window.crypto.getRandomValues
              -      for (var generated = 0; generated < size; generated += MAX_BYTES) {
              -        // buffer.slice automatically checks if the end is past the end of
              -        // the buffer so we don't have to here
              -        crypto.getRandomValues(bytes.slice(generated, generated + MAX_BYTES))
              -      }
              -    } else {
              -      crypto.getRandomValues(bytes)
              -    }
              -  }
              -
              -  if (typeof cb === 'function') {
              -    return process.nextTick(function () {
              -      cb(null, bytes)
              -    })
              -  }
              -
              -  return bytes
              -}
              diff --git a/node_modules/randombytes/index.js b/node_modules/randombytes/index.js
              deleted file mode 100644
              index a2d9e391..00000000
              --- a/node_modules/randombytes/index.js
              +++ /dev/null
              @@ -1 +0,0 @@
              -module.exports = require('crypto').randomBytes
              diff --git a/node_modules/randombytes/package.json b/node_modules/randombytes/package.json
              deleted file mode 100644
              index 36236526..00000000
              --- a/node_modules/randombytes/package.json
              +++ /dev/null
              @@ -1,36 +0,0 @@
              -{
              -  "name": "randombytes",
              -  "version": "2.1.0",
              -  "description": "random bytes from browserify stand alone",
              -  "main": "index.js",
              -  "scripts": {
              -    "test": "standard && node test.js | tspec",
              -    "phantom": "zuul --phantom -- test.js",
              -    "local": "zuul --local --no-coverage -- test.js"
              -  },
              -  "repository": {
              -    "type": "git",
              -    "url": "git@github.com:crypto-browserify/randombytes.git"
              -  },
              -  "keywords": [
              -    "crypto",
              -    "random"
              -  ],
              -  "author": "",
              -  "license": "MIT",
              -  "bugs": {
              -    "url": "https://github.com/crypto-browserify/randombytes/issues"
              -  },
              -  "homepage": "https://github.com/crypto-browserify/randombytes",
              -  "browser": "browser.js",
              -  "devDependencies": {
              -    "phantomjs": "^1.9.9",
              -    "standard": "^10.0.2",
              -    "tap-spec": "^2.1.2",
              -    "tape": "^4.6.3",
              -    "zuul": "^3.7.2"
              -  },
              -  "dependencies": {
              -    "safe-buffer": "^5.1.0"
              -  }
              -}
              diff --git a/node_modules/randombytes/test.js b/node_modules/randombytes/test.js
              deleted file mode 100644
              index f2669769..00000000
              --- a/node_modules/randombytes/test.js
              +++ /dev/null
              @@ -1,81 +0,0 @@
              -var test = require('tape')
              -var randomBytes = require('./')
              -var MAX_BYTES = 65536
              -var MAX_UINT32 = 4294967295
              -
              -test('sync', function (t) {
              -  t.plan(9)
              -  t.equals(randomBytes(0).length, 0, 'len: ' + 0)
              -  t.equals(randomBytes(3).length, 3, 'len: ' + 3)
              -  t.equals(randomBytes(30).length, 30, 'len: ' + 30)
              -  t.equals(randomBytes(300).length, 300, 'len: ' + 300)
              -  t.equals(randomBytes(17 + MAX_BYTES).length, 17 + MAX_BYTES, 'len: ' + 17 + MAX_BYTES)
              -  t.equals(randomBytes(MAX_BYTES * 100).length, MAX_BYTES * 100, 'len: ' + MAX_BYTES * 100)
              -  t.throws(function () {
              -    randomBytes(MAX_UINT32 + 1)
              -  })
              -  t.throws(function () {
              -    t.equals(randomBytes(-1))
              -  })
              -  t.throws(function () {
              -    t.equals(randomBytes('hello'))
              -  })
              -})
              -
              -test('async', function (t) {
              -  t.plan(9)
              -
              -  randomBytes(0, function (err, resp) {
              -    if (err) throw err
              -
              -    t.equals(resp.length, 0, 'len: ' + 0)
              -  })
              -
              -  randomBytes(3, function (err, resp) {
              -    if (err) throw err
              -
              -    t.equals(resp.length, 3, 'len: ' + 3)
              -  })
              -
              -  randomBytes(30, function (err, resp) {
              -    if (err) throw err
              -
              -    t.equals(resp.length, 30, 'len: ' + 30)
              -  })
              -
              -  randomBytes(300, function (err, resp) {
              -    if (err) throw err
              -
              -    t.equals(resp.length, 300, 'len: ' + 300)
              -  })
              -
              -  randomBytes(17 + MAX_BYTES, function (err, resp) {
              -    if (err) throw err
              -
              -    t.equals(resp.length, 17 + MAX_BYTES, 'len: ' + 17 + MAX_BYTES)
              -  })
              -
              -  randomBytes(MAX_BYTES * 100, function (err, resp) {
              -    if (err) throw err
              -
              -    t.equals(resp.length, MAX_BYTES * 100, 'len: ' + MAX_BYTES * 100)
              -  })
              -
              -  t.throws(function () {
              -    randomBytes(MAX_UINT32 + 1, function () {
              -      t.ok(false, 'should not get here')
              -    })
              -  })
              -
              -  t.throws(function () {
              -    randomBytes(-1, function () {
              -      t.ok(false, 'should not get here')
              -    })
              -  })
              -
              -  t.throws(function () {
              -    randomBytes('hello', function () {
              -      t.ok(false, 'should not get here')
              -    })
              -  })
              -})
              diff --git a/node_modules/readdirp/README.md b/node_modules/readdirp/README.md
              index df8d32df..c45b91d6 100644
              --- a/node_modules/readdirp/README.md
              +++ b/node_modules/readdirp/README.md
              @@ -2,6 +2,8 @@
               
               Recursive version of fs.readdir. Exposes a **stream API** (with small RAM & CPU footprint) and a **promise API**.
               
              +Faster than built-in `fs.readdir recursive: true`, and uses less RAM.
              +
               ```sh
               npm install readdirp
               jsr add jsr:@paulmillr/readdirp
              diff --git a/node_modules/readdirp/esm/index.d.ts b/node_modules/readdirp/esm/index.d.ts
              deleted file mode 100644
              index df939404..00000000
              --- a/node_modules/readdirp/esm/index.d.ts
              +++ /dev/null
              @@ -1,108 +0,0 @@
              -/**
              - * Recursive version of readdir. Exposes a streaming API and promise API.
              - * Streaming API allows to use a small amount of RAM.
              - *
              - * @module
              - * @example
              -```js
              -import readdirp from 'readdirp';
              -for await (const entry of readdirp('.')) {
              -  const {path} = entry;
              -  console.log(`${JSON.stringify({path})}`);
              -}
              -```
              - */
              -/*! readdirp - MIT License (c) 2012-2019 Thorsten Lorenz, Paul Miller (https://paulmillr.com) */
              -import type { Stats, Dirent } from 'node:fs';
              -import { Readable } from 'node:stream';
              -/** Path in file system. */
              -export type Path = string;
              -/** Emitted entry. Contains relative & absolute path, basename, and either stats or dirent. */
              -export interface EntryInfo {
              -    path: string;
              -    fullPath: string;
              -    stats?: Stats;
              -    dirent?: Dirent;
              -    basename: string;
              -}
              -/** Path or dir entries (files) */
              -export type PathOrDirent = Dirent | Path;
              -/** Filterer for files */
              -export type Tester = (entryInfo: EntryInfo) => boolean;
              -export type Predicate = string[] | string | Tester;
              -export declare const EntryTypes: {
              -    readonly FILE_TYPE: "files";
              -    readonly DIR_TYPE: "directories";
              -    readonly FILE_DIR_TYPE: "files_directories";
              -    readonly EVERYTHING_TYPE: "all";
              -};
              -export type EntryType = (typeof EntryTypes)[keyof typeof EntryTypes];
              -/**
              - * Options for readdirp.
              - * * type: files, directories, or both
              - * * lstat: whether to use symlink-friendly stat
              - * * depth: max depth
              - * * alwaysStat: whether to use stat (more resources) or dirent
              - * * highWaterMark: streaming param, specifies max amount of resources per entry
              - */
              -export type ReaddirpOptions = {
              -    root: string;
              -    fileFilter?: Predicate;
              -    directoryFilter?: Predicate;
              -    type?: EntryType;
              -    lstat?: boolean;
              -    depth?: number;
              -    alwaysStat?: boolean;
              -    highWaterMark?: number;
              -};
              -/** Directory entry. Contains path, depth count, and files. */
              -export interface DirEntry {
              -    files: PathOrDirent[];
              -    depth: number;
              -    path: Path;
              -}
              -/** Readable readdir stream, emitting new files as they're being listed. */
              -export declare class ReaddirpStream extends Readable {
              -    parents: any[];
              -    reading: boolean;
              -    parent?: DirEntry;
              -    _stat: Function;
              -    _maxDepth: number;
              -    _wantsDir: boolean;
              -    _wantsFile: boolean;
              -    _wantsEverything: boolean;
              -    _root: Path;
              -    _isDirent: boolean;
              -    _statsProp: 'dirent' | 'stats';
              -    _rdOptions: {
              -        encoding: 'utf8';
              -        withFileTypes: boolean;
              -    };
              -    _fileFilter: Tester;
              -    _directoryFilter: Tester;
              -    constructor(options?: Partial);
              -    _read(batch: number): Promise;
              -    _exploreDir(path: Path, depth: number): Promise<{
              -        files: string[] | undefined;
              -        depth: number;
              -        path: string;
              -    }>;
              -    _formatEntry(dirent: PathOrDirent, path: Path): Promise;
              -    _onError(err: Error): void;
              -    _getEntryType(entry: EntryInfo): Promise;
              -    _includeAsFile(entry: EntryInfo): boolean | undefined;
              -}
              -/**
              - * Streaming version: Reads all files and directories in given root recursively.
              - * Consumes ~constant small amount of RAM.
              - * @param root Root directory
              - * @param options Options to specify root (start directory), filters and recursion depth
              - */
              -export declare function readdirp(root: Path, options?: Partial): ReaddirpStream;
              -/**
              - * Promise version: Reads all files and directories in given root recursively.
              - * Compared to streaming version, will consume a lot of RAM e.g. when 1 million files are listed.
              - * @returns array of paths and their entry infos
              - */
              -export declare function readdirpPromise(root: Path, options?: Partial): Promise;
              -export default readdirp;
              diff --git a/node_modules/readdirp/esm/index.js b/node_modules/readdirp/esm/index.js
              deleted file mode 100644
              index ae8ca782..00000000
              --- a/node_modules/readdirp/esm/index.js
              +++ /dev/null
              @@ -1,257 +0,0 @@
              -import { stat, lstat, readdir, realpath } from 'node:fs/promises';
              -import { Readable } from 'node:stream';
              -import { resolve as presolve, relative as prelative, join as pjoin, sep as psep } from 'node:path';
              -export const EntryTypes = {
              -    FILE_TYPE: 'files',
              -    DIR_TYPE: 'directories',
              -    FILE_DIR_TYPE: 'files_directories',
              -    EVERYTHING_TYPE: 'all',
              -};
              -const defaultOptions = {
              -    root: '.',
              -    fileFilter: (_entryInfo) => true,
              -    directoryFilter: (_entryInfo) => true,
              -    type: EntryTypes.FILE_TYPE,
              -    lstat: false,
              -    depth: 2147483648,
              -    alwaysStat: false,
              -    highWaterMark: 4096,
              -};
              -Object.freeze(defaultOptions);
              -const RECURSIVE_ERROR_CODE = 'READDIRP_RECURSIVE_ERROR';
              -const NORMAL_FLOW_ERRORS = new Set(['ENOENT', 'EPERM', 'EACCES', 'ELOOP', RECURSIVE_ERROR_CODE]);
              -const ALL_TYPES = [
              -    EntryTypes.DIR_TYPE,
              -    EntryTypes.EVERYTHING_TYPE,
              -    EntryTypes.FILE_DIR_TYPE,
              -    EntryTypes.FILE_TYPE,
              -];
              -const DIR_TYPES = new Set([
              -    EntryTypes.DIR_TYPE,
              -    EntryTypes.EVERYTHING_TYPE,
              -    EntryTypes.FILE_DIR_TYPE,
              -]);
              -const FILE_TYPES = new Set([
              -    EntryTypes.EVERYTHING_TYPE,
              -    EntryTypes.FILE_DIR_TYPE,
              -    EntryTypes.FILE_TYPE,
              -]);
              -const isNormalFlowError = (error) => NORMAL_FLOW_ERRORS.has(error.code);
              -const wantBigintFsStats = process.platform === 'win32';
              -const emptyFn = (_entryInfo) => true;
              -const normalizeFilter = (filter) => {
              -    if (filter === undefined)
              -        return emptyFn;
              -    if (typeof filter === 'function')
              -        return filter;
              -    if (typeof filter === 'string') {
              -        const fl = filter.trim();
              -        return (entry) => entry.basename === fl;
              -    }
              -    if (Array.isArray(filter)) {
              -        const trItems = filter.map((item) => item.trim());
              -        return (entry) => trItems.some((f) => entry.basename === f);
              -    }
              -    return emptyFn;
              -};
              -/** Readable readdir stream, emitting new files as they're being listed. */
              -export class ReaddirpStream extends Readable {
              -    constructor(options = {}) {
              -        super({
              -            objectMode: true,
              -            autoDestroy: true,
              -            highWaterMark: options.highWaterMark,
              -        });
              -        const opts = { ...defaultOptions, ...options };
              -        const { root, type } = opts;
              -        this._fileFilter = normalizeFilter(opts.fileFilter);
              -        this._directoryFilter = normalizeFilter(opts.directoryFilter);
              -        const statMethod = opts.lstat ? lstat : stat;
              -        // Use bigint stats if it's windows and stat() supports options (node 10+).
              -        if (wantBigintFsStats) {
              -            this._stat = (path) => statMethod(path, { bigint: true });
              -        }
              -        else {
              -            this._stat = statMethod;
              -        }
              -        this._maxDepth = opts.depth ?? defaultOptions.depth;
              -        this._wantsDir = type ? DIR_TYPES.has(type) : false;
              -        this._wantsFile = type ? FILE_TYPES.has(type) : false;
              -        this._wantsEverything = type === EntryTypes.EVERYTHING_TYPE;
              -        this._root = presolve(root);
              -        this._isDirent = !opts.alwaysStat;
              -        this._statsProp = this._isDirent ? 'dirent' : 'stats';
              -        this._rdOptions = { encoding: 'utf8', withFileTypes: this._isDirent };
              -        // Launch stream with one parent, the root dir.
              -        this.parents = [this._exploreDir(root, 1)];
              -        this.reading = false;
              -        this.parent = undefined;
              -    }
              -    async _read(batch) {
              -        if (this.reading)
              -            return;
              -        this.reading = true;
              -        try {
              -            while (!this.destroyed && batch > 0) {
              -                const par = this.parent;
              -                const fil = par && par.files;
              -                if (fil && fil.length > 0) {
              -                    const { path, depth } = par;
              -                    const slice = fil.splice(0, batch).map((dirent) => this._formatEntry(dirent, path));
              -                    const awaited = await Promise.all(slice);
              -                    for (const entry of awaited) {
              -                        if (!entry)
              -                            continue;
              -                        if (this.destroyed)
              -                            return;
              -                        const entryType = await this._getEntryType(entry);
              -                        if (entryType === 'directory' && this._directoryFilter(entry)) {
              -                            if (depth <= this._maxDepth) {
              -                                this.parents.push(this._exploreDir(entry.fullPath, depth + 1));
              -                            }
              -                            if (this._wantsDir) {
              -                                this.push(entry);
              -                                batch--;
              -                            }
              -                        }
              -                        else if ((entryType === 'file' || this._includeAsFile(entry)) &&
              -                            this._fileFilter(entry)) {
              -                            if (this._wantsFile) {
              -                                this.push(entry);
              -                                batch--;
              -                            }
              -                        }
              -                    }
              -                }
              -                else {
              -                    const parent = this.parents.pop();
              -                    if (!parent) {
              -                        this.push(null);
              -                        break;
              -                    }
              -                    this.parent = await parent;
              -                    if (this.destroyed)
              -                        return;
              -                }
              -            }
              -        }
              -        catch (error) {
              -            this.destroy(error);
              -        }
              -        finally {
              -            this.reading = false;
              -        }
              -    }
              -    async _exploreDir(path, depth) {
              -        let files;
              -        try {
              -            files = await readdir(path, this._rdOptions);
              -        }
              -        catch (error) {
              -            this._onError(error);
              -        }
              -        return { files, depth, path };
              -    }
              -    async _formatEntry(dirent, path) {
              -        let entry;
              -        const basename = this._isDirent ? dirent.name : dirent;
              -        try {
              -            const fullPath = presolve(pjoin(path, basename));
              -            entry = { path: prelative(this._root, fullPath), fullPath, basename };
              -            entry[this._statsProp] = this._isDirent ? dirent : await this._stat(fullPath);
              -        }
              -        catch (err) {
              -            this._onError(err);
              -            return;
              -        }
              -        return entry;
              -    }
              -    _onError(err) {
              -        if (isNormalFlowError(err) && !this.destroyed) {
              -            this.emit('warn', err);
              -        }
              -        else {
              -            this.destroy(err);
              -        }
              -    }
              -    async _getEntryType(entry) {
              -        // entry may be undefined, because a warning or an error were emitted
              -        // and the statsProp is undefined
              -        if (!entry && this._statsProp in entry) {
              -            return '';
              -        }
              -        const stats = entry[this._statsProp];
              -        if (stats.isFile())
              -            return 'file';
              -        if (stats.isDirectory())
              -            return 'directory';
              -        if (stats && stats.isSymbolicLink()) {
              -            const full = entry.fullPath;
              -            try {
              -                const entryRealPath = await realpath(full);
              -                const entryRealPathStats = await lstat(entryRealPath);
              -                if (entryRealPathStats.isFile()) {
              -                    return 'file';
              -                }
              -                if (entryRealPathStats.isDirectory()) {
              -                    const len = entryRealPath.length;
              -                    if (full.startsWith(entryRealPath) && full.substr(len, 1) === psep) {
              -                        const recursiveError = new Error(`Circular symlink detected: "${full}" points to "${entryRealPath}"`);
              -                        // @ts-ignore
              -                        recursiveError.code = RECURSIVE_ERROR_CODE;
              -                        return this._onError(recursiveError);
              -                    }
              -                    return 'directory';
              -                }
              -            }
              -            catch (error) {
              -                this._onError(error);
              -                return '';
              -            }
              -        }
              -    }
              -    _includeAsFile(entry) {
              -        const stats = entry && entry[this._statsProp];
              -        return stats && this._wantsEverything && !stats.isDirectory();
              -    }
              -}
              -/**
              - * Streaming version: Reads all files and directories in given root recursively.
              - * Consumes ~constant small amount of RAM.
              - * @param root Root directory
              - * @param options Options to specify root (start directory), filters and recursion depth
              - */
              -export function readdirp(root, options = {}) {
              -    // @ts-ignore
              -    let type = options.entryType || options.type;
              -    if (type === 'both')
              -        type = EntryTypes.FILE_DIR_TYPE; // backwards-compatibility
              -    if (type)
              -        options.type = type;
              -    if (!root) {
              -        throw new Error('readdirp: root argument is required. Usage: readdirp(root, options)');
              -    }
              -    else if (typeof root !== 'string') {
              -        throw new TypeError('readdirp: root argument must be a string. Usage: readdirp(root, options)');
              -    }
              -    else if (type && !ALL_TYPES.includes(type)) {
              -        throw new Error(`readdirp: Invalid type passed. Use one of ${ALL_TYPES.join(', ')}`);
              -    }
              -    options.root = root;
              -    return new ReaddirpStream(options);
              -}
              -/**
              - * Promise version: Reads all files and directories in given root recursively.
              - * Compared to streaming version, will consume a lot of RAM e.g. when 1 million files are listed.
              - * @returns array of paths and their entry infos
              - */
              -export function readdirpPromise(root, options = {}) {
              -    return new Promise((resolve, reject) => {
              -        const files = [];
              -        readdirp(root, options)
              -            .on('data', (entry) => files.push(entry))
              -            .on('end', () => resolve(files))
              -            .on('error', (error) => reject(error));
              -    });
              -}
              -export default readdirp;
              diff --git a/node_modules/readdirp/esm/package.json b/node_modules/readdirp/esm/package.json
              deleted file mode 100644
              index 87696418..00000000
              --- a/node_modules/readdirp/esm/package.json
              +++ /dev/null
              @@ -1 +0,0 @@
              -{ "type": "module", "sideEffects": false }
              diff --git a/node_modules/readdirp/index.d.ts b/node_modules/readdirp/index.d.ts
              index df939404..d0d1d35a 100644
              --- a/node_modules/readdirp/index.d.ts
              +++ b/node_modules/readdirp/index.d.ts
              @@ -13,7 +13,7 @@ for await (const entry of readdirp('.')) {
               ```
                */
               /*! readdirp - MIT License (c) 2012-2019 Thorsten Lorenz, Paul Miller (https://paulmillr.com) */
              -import type { Stats, Dirent } from 'node:fs';
              +import type { Dirent, Stats } from 'node:fs';
               import { Readable } from 'node:stream';
               /** Path in file system. */
               export type Path = string;
              @@ -57,13 +57,24 @@ export type ReaddirpOptions = {
               };
               /** Directory entry. Contains path, depth count, and files. */
               export interface DirEntry {
              -    files: PathOrDirent[];
              +    /** Undefined when the directory could not be read (a 'warn' was emitted). */
              +    files: PathOrDirent[] | undefined;
                   depth: number;
                   path: Path;
               }
               /** Readable readdir stream, emitting new files as they're being listed. */
              +interface PendingDir {
              +    path: Path;
              +    depth: number;
              +    pending?: Promise;
              +}
               export declare class ReaddirpStream extends Readable {
              -    parents: any[];
              +    /**
              +     * Directories discovered but not yet emitted from. Listings are read
              +     * lazily (on pop, plus one prefetch) instead of eagerly on discovery:
              +     * keeping whole listings for every queued dir balloons RAM on wide trees.
              +     */
              +    parents: PendingDir[];
                   reading: boolean;
                   parent?: DirEntry;
                   _stat: Function;
              @@ -80,16 +91,14 @@ export declare class ReaddirpStream extends Readable {
                   };
                   _fileFilter: Tester;
                   _directoryFilter: Tester;
              +    _relStart: number;
                   constructor(options?: Partial);
                   _read(batch: number): Promise;
              -    _exploreDir(path: Path, depth: number): Promise<{
              -        files: string[] | undefined;
              -        depth: number;
              -        path: string;
              -    }>;
              -    _formatEntry(dirent: PathOrDirent, path: Path): Promise;
              +    _exploreDir(path: Path, depth: number): Promise;
              +    _formatEntry(dirent: PathOrDirent, path: Path): EntryInfo | undefined | Promise;
                   _onError(err: Error): void;
              -    _getEntryType(entry: EntryInfo): Promise;
              +    _getEntryType(entry: EntryInfo): '' | 'file' | 'directory' | Promise<'' | 'file' | 'directory'>;
              +    _getSymlinkEntryType(entry: EntryInfo): Promise<'' | 'file' | 'directory'>;
                   _includeAsFile(entry: EntryInfo): boolean | undefined;
               }
               /**
              diff --git a/node_modules/readdirp/index.js b/node_modules/readdirp/index.js
              index 0e08e137..ef0ec517 100644
              --- a/node_modules/readdirp/index.js
              +++ b/node_modules/readdirp/index.js
              @@ -1,12 +1,7 @@
              -"use strict";
              -Object.defineProperty(exports, "__esModule", { value: true });
              -exports.ReaddirpStream = exports.EntryTypes = void 0;
              -exports.readdirp = readdirp;
              -exports.readdirpPromise = readdirpPromise;
              -const promises_1 = require("node:fs/promises");
              -const node_stream_1 = require("node:stream");
              -const node_path_1 = require("node:path");
              -exports.EntryTypes = {
              +import { lstat, readdir, realpath, stat } from 'node:fs/promises';
              +import { join as pjoin, resolve as presolve, sep as psep } from 'node:path';
              +import { Readable } from 'node:stream';
              +export const EntryTypes = {
                   FILE_TYPE: 'files',
                   DIR_TYPE: 'directories',
                   FILE_DIR_TYPE: 'files_directories',
              @@ -16,30 +11,32 @@ const defaultOptions = {
                   root: '.',
                   fileFilter: (_entryInfo) => true,
                   directoryFilter: (_entryInfo) => true,
              -    type: exports.EntryTypes.FILE_TYPE,
              +    type: EntryTypes.FILE_TYPE,
                   lstat: false,
                   depth: 2147483648,
                   alwaysStat: false,
              -    highWaterMark: 4096,
              +    // Throughput is flat from 16 to 65536 (traversal is I/O-bound), but
              +    // batches of 1024+ entries survive young-gen GC and bloat RSS ~20-60%.
              +    highWaterMark: 256,
               };
               Object.freeze(defaultOptions);
               const RECURSIVE_ERROR_CODE = 'READDIRP_RECURSIVE_ERROR';
               const NORMAL_FLOW_ERRORS = new Set(['ENOENT', 'EPERM', 'EACCES', 'ELOOP', RECURSIVE_ERROR_CODE]);
               const ALL_TYPES = [
              -    exports.EntryTypes.DIR_TYPE,
              -    exports.EntryTypes.EVERYTHING_TYPE,
              -    exports.EntryTypes.FILE_DIR_TYPE,
              -    exports.EntryTypes.FILE_TYPE,
              +    EntryTypes.DIR_TYPE,
              +    EntryTypes.EVERYTHING_TYPE,
              +    EntryTypes.FILE_DIR_TYPE,
              +    EntryTypes.FILE_TYPE,
               ];
               const DIR_TYPES = new Set([
              -    exports.EntryTypes.DIR_TYPE,
              -    exports.EntryTypes.EVERYTHING_TYPE,
              -    exports.EntryTypes.FILE_DIR_TYPE,
              +    EntryTypes.DIR_TYPE,
              +    EntryTypes.EVERYTHING_TYPE,
              +    EntryTypes.FILE_DIR_TYPE,
               ]);
               const FILE_TYPES = new Set([
              -    exports.EntryTypes.EVERYTHING_TYPE,
              -    exports.EntryTypes.FILE_DIR_TYPE,
              -    exports.EntryTypes.FILE_TYPE,
              +    EntryTypes.EVERYTHING_TYPE,
              +    EntryTypes.FILE_DIR_TYPE,
              +    EntryTypes.FILE_TYPE,
               ]);
               const isNormalFlowError = (error) => NORMAL_FLOW_ERRORS.has(error.code);
               const wantBigintFsStats = process.platform === 'win32';
              @@ -59,19 +56,40 @@ const normalizeFilter = (filter) => {
                   }
                   return emptyFn;
               };
              -/** Readable readdir stream, emitting new files as they're being listed. */
              -class ReaddirpStream extends node_stream_1.Readable {
              +export class ReaddirpStream extends Readable {
              +    /**
              +     * Directories discovered but not yet emitted from. Listings are read
              +     * lazily (on pop, plus one prefetch) instead of eagerly on discovery:
              +     * keeping whole listings for every queued dir balloons RAM on wide trees.
              +     */
              +    parents;
              +    reading;
              +    parent;
              +    _stat;
              +    _maxDepth;
              +    _wantsDir;
              +    _wantsFile;
              +    _wantsEverything;
              +    _root;
              +    _isDirent;
              +    _statsProp;
              +    _rdOptions;
              +    _fileFilter;
              +    _directoryFilter;
              +    _relStart;
                   constructor(options = {}) {
                       super({
                           objectMode: true,
                           autoDestroy: true,
              -            highWaterMark: options.highWaterMark,
              +            highWaterMark: options.highWaterMark ?? defaultOptions.highWaterMark,
                       });
                       const opts = { ...defaultOptions, ...options };
              -        const { root, type } = opts;
              +        // Use ?? so an explicit `undefined` in user options doesn't shadow defaults.
              +        const root = opts.root ?? defaultOptions.root;
              +        const type = opts.type ?? defaultOptions.type;
                       this._fileFilter = normalizeFilter(opts.fileFilter);
                       this._directoryFilter = normalizeFilter(opts.directoryFilter);
              -        const statMethod = opts.lstat ? promises_1.lstat : promises_1.stat;
              +        const statMethod = opts.lstat ? lstat : stat;
                       // Use bigint stats if it's windows and stat() supports options (node 10+).
                       if (wantBigintFsStats) {
                           this._stat = (path) => statMethod(path, { bigint: true });
              @@ -79,16 +97,25 @@ class ReaddirpStream extends node_stream_1.Readable {
                       else {
                           this._stat = statMethod;
                       }
              -        this._maxDepth = opts.depth ?? defaultOptions.depth;
              -        this._wantsDir = type ? DIR_TYPES.has(type) : false;
              -        this._wantsFile = type ? FILE_TYPES.has(type) : false;
              -        this._wantsEverything = type === exports.EntryTypes.EVERYTHING_TYPE;
              -        this._root = (0, node_path_1.resolve)(root);
              +        this._maxDepth =
              +            opts.depth != null && Number.isSafeInteger(opts.depth) ? opts.depth : defaultOptions.depth;
              +        this._wantsDir = DIR_TYPES.has(type);
              +        this._wantsFile = FILE_TYPES.has(type);
              +        this._wantsEverything = type === EntryTypes.EVERYTHING_TYPE;
              +        this._root = presolve(root);
              +        // Every fullPath is `_root + sep + relative path` (see _formatEntry), so
              +        // the relative path is a slice starting past the root and its trailing
              +        // separator (which resolved paths lack, except fs roots like '/', 'C:\').
              +        this._relStart = this._root.endsWith(psep) ? this._root.length : this._root.length + 1;
                       this._isDirent = !opts.alwaysStat;
                       this._statsProp = this._isDirent ? 'dirent' : 'stats';
                       this._rdOptions = { encoding: 'utf8', withFileTypes: this._isDirent };
              -        // Launch stream with one parent, the root dir.
              -        this.parents = [this._exploreDir(root, 1)];
              +        // Launch stream with one parent, the root dir, whose readdir starts
              +        // right away. Explore the resolved root so all parent paths stay
              +        // absolute even if process.cwd() changes mid-iteration.
              +        const rootDir = { path: this._root, depth: 1 };
              +        rootDir.pending = this._exploreDir(this._root, 1);
              +        this.parents = [rootDir];
                       this.reading = false;
                       this.parent = undefined;
                   }
              @@ -103,16 +130,25 @@ class ReaddirpStream extends node_stream_1.Readable {
                               if (fil && fil.length > 0) {
                                   const { path, depth } = par;
                                   const slice = fil.splice(0, batch).map((dirent) => this._formatEntry(dirent, path));
              -                    const awaited = await Promise.all(slice);
              +                    // In dirent mode _formatEntry is synchronous: skip Promise.all and
              +                    // its per-entry microtask overhead.
              +                    const awaited = this._isDirent
              +                        ? slice
              +                        : await Promise.all(slice);
                                   for (const entry of awaited) {
                                       if (!entry)
                                           continue;
                                       if (this.destroyed)
                                           return;
              -                        const entryType = await this._getEntryType(entry);
              +                        // Only symlinks require async work; plain files / dirs resolve synchronously.
              +                        let entryType = this._getEntryType(entry);
              +                        if (typeof entryType !== 'string')
              +                            entryType = await entryType;
                                       if (entryType === 'directory' && this._directoryFilter(entry)) {
                                           if (depth <= this._maxDepth) {
              -                                this.parents.push(this._exploreDir(entry.fullPath, depth + 1));
              +                                // Lazy: don't readdir until this dir is popped. Keeping whole
              +                                // listings for every queued dir would balloon RAM on wide trees.
              +                                this.parents.push({ path: entry.fullPath, depth: depth + 1 });
                                           }
                                           if (this._wantsDir) {
                                               this.push(entry);
              @@ -134,7 +170,15 @@ class ReaddirpStream extends node_stream_1.Readable {
                                       this.push(null);
                                       break;
                                   }
              -                    this.parent = await parent;
              +                    const dir = parent.pending ?? this._exploreDir(parent.path, parent.depth);
              +                    // Prefetch the next dir so its readdir overlaps with processing
              +                    // this one's entries. Only the stack top is prefetched, keeping at
              +                    // most a handful of listings (~tree depth) in RAM at once.
              +                    const next = this.parents[this.parents.length - 1];
              +                    if (next && !next.pending) {
              +                        next.pending = this._exploreDir(next.path, next.depth);
              +                    }
              +                    this.parent = await dir;
                                   if (this.destroyed)
                                       return;
                               }
              @@ -147,29 +191,49 @@ class ReaddirpStream extends node_stream_1.Readable {
                           this.reading = false;
                       }
                   }
              +    // NOTE: native `readdir(path, { recursive: true })` was evaluated as a
              +    // replacement for this per-directory traversal and rejected:
              +    // - Not faster: node implements it in JS, walking directories sequentially
              +    //   just like this loop, but with extra path bookkeeping. Benchmarks
              +    //   (node 24): ~10% slower on wide trees, ~40% slower on small ones,
              +    //   parity on deep ones.
              +    // - Much more RAM: it buffers the entire subtree listing in one array,
              +    //   instead of one directory at a time, defeating streaming.
              +    // - Semantics diverge: it can't limit depth, can't skip directories a
              +    //   directoryFilter rejects, doesn't follow symlinked dirs, and fails
              +    //   wholesale (all entries lost) if anything in the subtree is unreadable,
              +    //   instead of emitting a 'warn' and continuing.
                   async _exploreDir(path, depth) {
                       let files;
                       try {
              -            files = await (0, promises_1.readdir)(path, this._rdOptions);
              +            files = await readdir(path, this._rdOptions);
                       }
                       catch (error) {
                           this._onError(error);
                       }
                       return { files, depth, path };
                   }
              -    async _formatEntry(dirent, path) {
              -        let entry;
              +    // Synchronous in dirent mode; returns a promise only when stats are needed.
              +    _formatEntry(dirent, path) {
                       const basename = this._isDirent ? dirent.name : dirent;
              -        try {
              -            const fullPath = (0, node_path_1.resolve)((0, node_path_1.join)(path, basename));
              -            entry = { path: (0, node_path_1.relative)(this._root, fullPath), fullPath, basename };
              -            entry[this._statsProp] = this._isDirent ? dirent : await this._stat(fullPath);
              +        // `path` is always an absolute, normalized parent dir (see _exploreDir
              +        // seeding in the constructor), so a plain join is enough — resolve()
              +        // would re-read cwd on every entry.
              +        const fullPath = pjoin(path, basename);
              +        // Slice instead of path.relative(): equivalent here (fullPath is always
              +        // under _root) and avoids several intermediate allocations per entry.
              +        const entry = { path: fullPath.slice(this._relStart), fullPath, basename };
              +        if (this._isDirent) {
              +            entry.dirent = dirent;
              +            return entry;
                       }
              -        catch (err) {
              +        return this._stat(fullPath).then((stats) => {
              +            entry.stats = stats;
              +            return entry;
              +        }, (err) => {
                           this._onError(err);
              -            return;
              -        }
              -        return entry;
              +            return undefined;
              +        });
                   }
                   _onError(err) {
                       if (isNormalFlowError(err) && !this.destroyed) {
              @@ -179,10 +243,12 @@ class ReaddirpStream extends node_stream_1.Readable {
                           this.destroy(err);
                       }
                   }
              -    async _getEntryType(entry) {
              +    // Synchronous for regular files and directories; returns a promise only for
              +    // symlinks, which need realpath() to be classified.
              +    _getEntryType(entry) {
                       // entry may be undefined, because a warning or an error were emitted
                       // and the statsProp is undefined
              -        if (!entry && this._statsProp in entry) {
              +        if (!entry || !(this._statsProp in entry)) {
                           return '';
                       }
                       const stats = entry[this._statsProp];
              @@ -190,50 +256,51 @@ class ReaddirpStream extends node_stream_1.Readable {
                           return 'file';
                       if (stats.isDirectory())
                           return 'directory';
              -        if (stats && stats.isSymbolicLink()) {
              -            const full = entry.fullPath;
              -            try {
              -                const entryRealPath = await (0, promises_1.realpath)(full);
              -                const entryRealPathStats = await (0, promises_1.lstat)(entryRealPath);
              -                if (entryRealPathStats.isFile()) {
              -                    return 'file';
              -                }
              -                if (entryRealPathStats.isDirectory()) {
              -                    const len = entryRealPath.length;
              -                    if (full.startsWith(entryRealPath) && full.substr(len, 1) === node_path_1.sep) {
              -                        const recursiveError = new Error(`Circular symlink detected: "${full}" points to "${entryRealPath}"`);
              -                        // @ts-ignore
              -                        recursiveError.code = RECURSIVE_ERROR_CODE;
              -                        return this._onError(recursiveError);
              -                    }
              -                    return 'directory';
              -                }
              +        if (stats.isSymbolicLink())
              +            return this._getSymlinkEntryType(entry);
              +        return '';
              +    }
              +    async _getSymlinkEntryType(entry) {
              +        const full = entry.fullPath;
              +        try {
              +            const entryRealPath = await realpath(full);
              +            const entryRealPathStats = await lstat(entryRealPath);
              +            if (entryRealPathStats.isFile()) {
              +                return 'file';
                           }
              -            catch (error) {
              -                this._onError(error);
              -                return '';
              +            if (entryRealPathStats.isDirectory()) {
              +                const len = entryRealPath.length;
              +                if (full.startsWith(entryRealPath) && full[len] === psep) {
              +                    const recursiveError = new Error(`Circular symlink detected: "${full}" points to "${entryRealPath}"`);
              +                    // @ts-ignore
              +                    recursiveError.code = RECURSIVE_ERROR_CODE;
              +                    this._onError(recursiveError);
              +                    return '';
              +                }
              +                return 'directory';
                           }
                       }
              +        catch (error) {
              +            this._onError(error);
              +        }
              +        return '';
                   }
                   _includeAsFile(entry) {
                       const stats = entry && entry[this._statsProp];
                       return stats && this._wantsEverything && !stats.isDirectory();
                   }
               }
              -exports.ReaddirpStream = ReaddirpStream;
               /**
                * Streaming version: Reads all files and directories in given root recursively.
                * Consumes ~constant small amount of RAM.
                * @param root Root directory
                * @param options Options to specify root (start directory), filters and recursion depth
                */
              -function readdirp(root, options = {}) {
              +export function readdirp(root, options = {}) {
                   // @ts-ignore
                   let type = options.entryType || options.type;
                   if (type === 'both')
              -        type = exports.EntryTypes.FILE_DIR_TYPE; // backwards-compatibility
              -    if (type)
              -        options.type = type;
              +        type = EntryTypes.FILE_DIR_TYPE; // backwards-compatibility
                   if (!root) {
                       throw new Error('readdirp: root argument is required. Usage: readdirp(root, options)');
                   }
              @@ -243,15 +310,18 @@ function readdirp(root, options = {}) {
                   else if (type && !ALL_TYPES.includes(type)) {
                       throw new Error(`readdirp: Invalid type passed. Use one of ${ALL_TYPES.join(', ')}`);
                   }
              -    options.root = root;
              -    return new ReaddirpStream(options);
              +    // Copy options instead of mutating the caller's object.
              +    const opts = { ...options, root };
              +    if (type)
              +        opts.type = type;
              +    return new ReaddirpStream(opts);
               }
               /**
                * Promise version: Reads all files and directories in given root recursively.
                * Compared to streaming version, will consume a lot of RAM e.g. when 1 million files are listed.
                * @returns array of paths and their entry infos
                */
              -function readdirpPromise(root, options = {}) {
              +export function readdirpPromise(root, options = {}) {
                   return new Promise((resolve, reject) => {
                       const files = [];
                       readdirp(root, options)
              @@ -260,4 +330,4 @@ function readdirpPromise(root, options = {}) {
                           .on('error', (error) => reject(error));
                   });
               }
              -exports.default = readdirp;
              +export default readdirp;
              diff --git a/node_modules/readdirp/package.json b/node_modules/readdirp/package.json
              index 118177c0..81f04b2b 100644
              --- a/node_modules/readdirp/package.json
              +++ b/node_modules/readdirp/package.json
              @@ -1,11 +1,11 @@
               {
                 "name": "readdirp",
              -  "description": "Recursive version of fs.readdir with small RAM & CPU footprint.",
              -  "version": "4.1.2",
              +  "description": "Recursive version of fs.readdir with small RAM & CPU footprint",
              +  "version": "5.1.1",
                 "homepage": "https://github.com/paulmillr/readdirp",
                 "repository": {
                   "type": "git",
              -    "url": "git://github.com/paulmillr/readdirp.git"
              +    "url": "https://github.com/paulmillr/readdirp.git"
                 },
                 "license": "MIT",
                 "bugs": {
              @@ -17,23 +17,18 @@
                   "Paul Miller (https://paulmillr.com)"
                 ],
                 "engines": {
              -    "node": ">= 14.18.0"
              +    "node": ">= 20.19.0"
                 },
                 "files": [
                   "index.js",
              -    "index.d.ts",
              -    "index.d.ts.map",
              -    "index.js.map",
              -    "esm"
              +    "index.d.ts"
                 ],
              +  "type": "module",
                 "main": "./index.js",
              -  "module": "./esm/index.js",
              +  "module": "./index.js",
                 "types": "./index.d.ts",
                 "exports": {
              -    ".": {
              -      "import": "./esm/index.js",
              -      "require": "./index.js"
              -    }
              +    ".": "./index.js"
                 },
                 "sideEffects": false,
                 "keywords": [
              @@ -47,24 +42,21 @@
                   "filter"
                 ],
                 "scripts": {
              -    "build": "tsc && tsc -p tsconfig.cjs.json",
              -    "lint": "prettier --check index.ts test/index.test.js",
              +    "build": "tsc",
                   "format": "prettier --write index.ts test/index.test.js",
              -    "test": "node test/index.test.js",
              -    "test:coverage": "c8 node test/index.test.js"
              +    "test": "node test/index.test.js"
                 },
                 "devDependencies": {
              -    "@paulmillr/jsbt": "0.3.1",
              -    "@types/node": "20.14.8",
              +    "@paulmillr/jsbt": "0.6.1",
              +    "@types/node": "24.10.1",
                   "c8": "10.1.3",
                   "chai": "4.3.4",
                   "chai-subset": "1.6.0",
              -    "micro-should": "0.5.0",
                   "prettier": "3.1.1",
              -    "typescript": "5.5.2"
              +    "typescript": "5.9.2"
                 },
                 "funding": {
                   "type": "individual",
                   "url": "https://paulmillr.com/funding/"
                 }
              -}
              \ No newline at end of file
              +}
              diff --git a/node_modules/serialize-javascript/README.md b/node_modules/serialize-javascript/README.md
              index e6523ba8..42aa4b28 100644
              --- a/node_modules/serialize-javascript/README.md
              +++ b/node_modules/serialize-javascript/README.md
              @@ -4,14 +4,13 @@ Serialize JavaScript
               Serialize JavaScript to a _superset_ of JSON that includes regular expressions, dates and functions.
               
               [![npm Version][npm-badge]][npm]
              -[![Dependency Status][david-badge]][david]
               ![Test](https://github.com/yahoo/serialize-javascript/workflows/Test/badge.svg)
               
               ## Overview
               
               The code in this package began its life as an internal module to [express-state][]. To expand its usefulness, it now lives as `serialize-javascript` — an independent package on npm.
               
              -You're probably wondering: **What about `JSON.stringify()`!?** We've found that sometimes we need to serialize JavaScript **functions**, **regexps**, **dates**, **sets** or **maps**. A great example is a web app that uses client-side URL routing where the route definitions are regexps that need to be shared from the server to the client. But this module is also great for communicating between node processes.
              +You're probably wondering: **What about `JSON.stringify()`!?** We've found that sometimes we need to serialize JavaScript **functions**, **regexps**, **dates**, **sets** or **maps**. A great example is a web app that uses client-side URL routing where the route definitions are regexps that need to be shared from the server to the client.
               
               The string returned from this package's single export function is literal JavaScript which can be saved to a `.js` file, or be embedded into an HTML document by making the content of a `

              Day.js

              - - Get professional support for this package with a Tidelift subscription - -
              - - Tidelift helps make open source sustainable for maintainers while giving companies
              assurances about security, maintenance, and licensing for their dependencies. -
              -