stylelint-config-inspector 2.3.2 → 2.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.remarkrc.mjs +9 -0
- package/README.md +2 -0
- package/dist/cli.cjs +46 -8
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.mjs +46 -8
- package/dist/cli.mjs.map +1 -1
- package/dist/nitro.json +1 -1
- package/dist/public/200.html +1 -1
- package/dist/public/404.html +1 -1
- package/dist/public/_nuxt/BG8RThME.js +1 -0
- package/dist/public/_nuxt/BOTxb_Tf.js +1 -0
- package/dist/public/_nuxt/BRAxAp2P.js +1 -0
- package/dist/public/_nuxt/{7D0DbyYU.js → B_EQLqN6.js} +1 -1
- package/dist/public/_nuxt/{DnbyOYzK.js → BhAtDtkD.js} +1 -1
- package/dist/public/_nuxt/C5Bg1PZi.js +1 -0
- package/dist/public/_nuxt/{CTlsJWmu.js → CRalrgW8.js} +3 -3
- package/dist/public/_nuxt/{B_--1KNk.js → D6fk1agw.js} +2 -2
- package/dist/public/_nuxt/{CylubNoK.js → DLNrKDe5.js} +1 -1
- package/dist/public/_nuxt/DXuC58iQ.js +1 -0
- package/dist/public/_nuxt/DYK0VwDN.js +1 -0
- package/dist/public/_nuxt/DusisEyH.js +1 -0
- package/dist/public/_nuxt/{CwpEErv4.js → DvuBpx-x.js} +3 -3
- package/dist/public/_nuxt/{CNcjyXqQ.js → IbiyzGrr.js} +1 -1
- package/dist/public/_nuxt/PnIxnNo9.js +1 -0
- package/dist/public/_nuxt/RuleList.QG5M7cTF.css +1 -0
- package/dist/public/_nuxt/V5SopCgz.js +1 -0
- package/dist/public/_nuxt/builds/latest.json +1 -1
- package/dist/public/_nuxt/builds/meta/163a5255-1f6f-4e70-99a4-8b3d32cbba2b.json +1 -0
- package/dist/public/_nuxt/entry.uDIoEhfx.css +1 -0
- package/dist/public/index.html +1 -1
- package/package.json +28 -92
- package/prettier.config.mjs +8 -0
- package/stylelint.config.mjs +7 -1279
- package/dist/public/_nuxt/AZzY_dlm.js +0 -1
- package/dist/public/_nuxt/BODynBkg.js +0 -1
- package/dist/public/_nuxt/Bi3wFMiD.js +0 -1
- package/dist/public/_nuxt/CMLop-UK.js +0 -1
- package/dist/public/_nuxt/DPS593LP.js +0 -1
- package/dist/public/_nuxt/DVycKPW-.js +0 -1
- package/dist/public/_nuxt/Dwb58Uvi.js +0 -1
- package/dist/public/_nuxt/Dx9mJWQW.js +0 -1
- package/dist/public/_nuxt/MP0zp0f7.js +0 -1
- package/dist/public/_nuxt/RuleList.D_Xl00T3.css +0 -1
- package/dist/public/_nuxt/builds/meta/ae984270-210f-4368-bbdf-917b20a8bcb4.json +0 -1
- package/dist/public/_nuxt/entry.D_oaAR-A.css +0 -1
package/dist/cli.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.cjs","names":["fs","process","os","fs","execFile","childProcess","powerShellPath","process","Buffer","execFile","childProcess","fs","fsConstants","isWsl","windowsPowerShellPath","execFileAsync","execFile","process","execFileAsync","execFile","process","execFileAsync","execFile","defaultBrowser","execFile","process","windows","process","__dirname","path","process","isWsl","fs","fsConstants","childProcess","normalize","isAbsolute","normalizeString","join","resolve","extname","relative","dirname","basename","c","process","#head","#tail","#size","toPath","process","fsPromises","path","execFileCallback","path","assertPath","stripSuffix","lastPathSegment","assertArgs$1","assertArg$3","fromFileUrl","stripTrailingSeparators","CHAR_DOT","CHAR_FORWARD_SLASH","isPosixPathSeparator","basename","DELIMITER","SEPARATOR","SEPARATOR_PATTERN","assertArg$2","dirname","extname","_format","assertArg$1","format","isAbsolute","assertArg","normalizeString","normalize","join","parse","resolve","assertArgs","relative","WHITESPACE_ENCODINGS","encodeWhitespace","toFileUrl","toNamespacedPath","common$1","common","REG_EXP_ESCAPE_CHARS","RANGE_ESCAPE_CHARS","_globToRegExp","constants","globToRegExp","isGlob","normalizeGlob","joinGlobs","isAbsolute","normalize","regExpEscape","star","#parent","#root","#parts","#hasMagic","#options","#negs","#filledNegs","#parentIndex","#toString","#parseAST","#canAdoptType","#emptyExt","#canAdopt","#adopt","#canUsurpType","#flatten","#fillNegs","#parseGlob","#uflag","#partsToRegExp","#canAdoptWithSpace","#adoptWithSpace","#canUsurp","#usurp","minimatch","#matchGlobstar","#matchOne","#matchGlobStarBodySections","tty","#definitions","#requiredKeys","posixPath","windowsPath","#path","#namespacedBasePath","c","require","normalize","basename","resolve","process","relative","dirname","c","dirname","join","WebSocketServer","ws","relative","normalize","join","extname","process","resolve","fs","relative"],"sources":["../node_modules/get-port-please/dist/index.mjs","../node_modules/is-docker/index.js","../node_modules/is-inside-container/index.js","../node_modules/is-wsl/index.js","../node_modules/powershell-utils/index.js","../node_modules/wsl-utils/utilities.js","../node_modules/wsl-utils/index.js","../node_modules/define-lazy-prop/index.js","../node_modules/default-browser-id/index.js","../node_modules/run-applescript/index.js","../node_modules/bundle-name/index.js","../node_modules/default-browser/windows.js","../node_modules/default-browser/index.js","../node_modules/is-in-ssh/index.js","../node_modules/open/index.js","../node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs","../src/build-static-html.ts","../src/constants.ts","../src/cli-options.ts","../node_modules/yocto-queue/index.js","../node_modules/p-limit/index.js","../node_modules/p-locate/index.js","../node_modules/locate-path/index.js","../node_modules/unicorn-magic/node.js","../node_modules/find-up/index.js","../node_modules/@eslint/config-array/dist/esm/std__path/posix.js","../node_modules/@eslint/config-array/dist/esm/std__path/windows.js","../node_modules/balanced-match/dist/esm/index.js","../node_modules/brace-expansion/dist/esm/index.js","../node_modules/minimatch/dist/esm/assert-valid-pattern.js","../node_modules/minimatch/dist/esm/brace-expressions.js","../node_modules/minimatch/dist/esm/unescape.js","../node_modules/minimatch/dist/esm/ast.js","../node_modules/minimatch/dist/esm/escape.js","../node_modules/minimatch/dist/esm/index.js","../node_modules/ms/index.js","../node_modules/debug/src/common.js","../node_modules/debug/src/browser.js","../node_modules/has-flag/index.js","../node_modules/supports-color/index.js","../node_modules/debug/src/node.js","../node_modules/debug/src/index.js","../node_modules/@eslint/object-schema/dist/esm/index.js","../node_modules/@eslint/config-array/dist/esm/index.js","../shared/configs.ts","../src/errors.ts","../src/inspectors/stylelint.ts","../src/configs.ts","../src/dirs.ts","../node_modules/mrmime/index.mjs","../src/ws.ts","../src/server.ts","../src/cli.ts"],"sourcesContent":["import { createServer, Server } from 'node:net';\nimport { networkInterfaces, tmpdir } from 'node:os';\nimport { join } from 'node:path';\nimport { rm } from 'node:fs/promises';\n\nconst unsafePorts = /* @__PURE__ */ new Set([\n 1,\n // tcpmux\n 7,\n // echo\n 9,\n // discard\n 11,\n // systat\n 13,\n // daytime\n 15,\n // netstat\n 17,\n // qotd\n 19,\n // chargen\n 20,\n // ftp data\n 21,\n // ftp access\n 22,\n // ssh\n 23,\n // telnet\n 25,\n // smtp\n 37,\n // time\n 42,\n // name\n 43,\n // nicname\n 53,\n // domain\n 69,\n // tftp\n 77,\n // priv-rjs\n 79,\n // finger\n 87,\n // ttylink\n 95,\n // supdup\n 101,\n // hostriame\n 102,\n // iso-tsap\n 103,\n // gppitnp\n 104,\n // acr-nema\n 109,\n // pop2\n 110,\n // pop3\n 111,\n // sunrpc\n 113,\n // auth\n 115,\n // sftp\n 117,\n // uucp-path\n 119,\n // nntp\n 123,\n // NTP\n 135,\n // loc-srv /epmap\n 137,\n // netbios\n 139,\n // netbios\n 143,\n // imap2\n 161,\n // snmp\n 179,\n // BGP\n 389,\n // ldap\n 427,\n // SLP (Also used by Apple Filing Protocol)\n 465,\n // smtp+ssl\n 512,\n // print / exec\n 513,\n // login\n 514,\n // shell\n 515,\n // printer\n 526,\n // tempo\n 530,\n // courier\n 531,\n // chat\n 532,\n // netnews\n 540,\n // uucp\n 548,\n // AFP (Apple Filing Protocol)\n 554,\n // rtsp\n 556,\n // remotefs\n 563,\n // nntp+ssl\n 587,\n // smtp (rfc6409)\n 601,\n // syslog-conn (rfc3195)\n 636,\n // ldap+ssl\n 989,\n // ftps-data\n 990,\n // ftps\n 993,\n // ldap+ssl\n 995,\n // pop3+ssl\n 1719,\n // h323gatestat\n 1720,\n // h323hostcall\n 1723,\n // pptp\n 2049,\n // nfs\n 3659,\n // apple-sasl / PasswordServer\n 4045,\n // lockd\n 5060,\n // sip\n 5061,\n // sips\n 6e3,\n // X11\n 6566,\n // sane-port\n 6665,\n // Alternate IRC [Apple addition]\n 6666,\n // Alternate IRC [Apple addition]\n 6667,\n // Standard IRC [Apple addition]\n 6668,\n // Alternate IRC [Apple addition]\n 6669,\n // Alternate IRC [Apple addition]\n 6697,\n // IRC + TLS\n 10080\n // Amanda\n]);\nfunction isUnsafePort(port) {\n return unsafePorts.has(port);\n}\nfunction isSafePort(port) {\n return !isUnsafePort(port);\n}\n\nclass GetPortError extends Error {\n constructor(message, opts) {\n super(message, opts);\n this.message = message;\n }\n name = \"GetPortError\";\n}\nfunction _log(verbose, message) {\n if (verbose) {\n console.log(`[get-port] ${message}`);\n }\n}\nfunction _generateRange(from, to) {\n if (to < from) {\n return [];\n }\n const r = [];\n for (let index = from; index <= to; index++) {\n r.push(index);\n }\n return r;\n}\nfunction _tryPort(port, host) {\n return new Promise((resolve) => {\n const server = createServer();\n server.unref();\n server.on(\"error\", () => {\n resolve(false);\n });\n server.listen({ port, host }, () => {\n const { port: port2 } = server.address();\n server.close(() => {\n resolve(isSafePort(port2) && port2);\n });\n });\n });\n}\nfunction _getLocalHosts(additional) {\n const hosts = new Set(additional);\n for (const _interface of Object.values(networkInterfaces())) {\n for (const config of _interface || []) {\n if (config.address && !config.internal && !config.address.startsWith(\"fe80::\") && // Link-Local\n !config.address.startsWith(\"169.254\")) {\n hosts.add(config.address);\n }\n }\n }\n return [...hosts];\n}\nasync function _findPort(ports, host) {\n for (const port of ports) {\n const r = await _tryPort(port, host);\n if (r) {\n return r;\n }\n }\n}\nfunction _fmtOnHost(hostname) {\n return hostname ? `on host ${JSON.stringify(hostname)}` : \"on any host\";\n}\nconst HOSTNAME_RE = /^(?!-)[\\d.:A-Za-z-]{1,63}(?<!-)$/;\nfunction _validateHostname(hostname, _public, verbose) {\n if (hostname && !HOSTNAME_RE.test(hostname)) {\n const fallbackHost = _public ? \"0.0.0.0\" : \"127.0.0.1\";\n _log(\n verbose,\n `Invalid hostname: ${JSON.stringify(hostname)}. Using ${JSON.stringify(\n fallbackHost\n )} as fallback.`\n );\n return fallbackHost;\n }\n return hostname;\n}\n\nasync function getPort(_userOptions = {}) {\n if (typeof _userOptions === \"number\" || typeof _userOptions === \"string\") {\n _userOptions = { port: Number.parseInt(_userOptions + \"\") || 0 };\n }\n const _port = Number(_userOptions.port ?? process.env.PORT);\n const _userSpecifiedAnyPort = Boolean(\n _userOptions.port || _userOptions.ports?.length || _userOptions.portRange?.length\n );\n const options = {\n random: _port === 0,\n ports: [],\n portRange: [],\n alternativePortRange: _userSpecifiedAnyPort ? [] : [3e3, 3100],\n verbose: false,\n ..._userOptions,\n port: _port,\n host: _validateHostname(\n _userOptions.host ?? process.env.HOST,\n _userOptions.public,\n _userOptions.verbose\n )\n };\n if (options.random && !_userSpecifiedAnyPort) {\n return getRandomPort(options.host);\n }\n const portsToCheck = [\n options.port,\n ...options.ports,\n ..._generateRange(...options.portRange)\n ].filter((port) => {\n if (!port) {\n return false;\n }\n if (!isSafePort(port)) {\n _log(options.verbose, `Ignoring unsafe port: ${port}`);\n return false;\n }\n return true;\n });\n if (portsToCheck.length === 0) {\n portsToCheck.push(3e3);\n }\n let availablePort = await _findPort(portsToCheck, options.host);\n if (!availablePort && options.alternativePortRange.length > 0) {\n availablePort = await _findPort(\n _generateRange(...options.alternativePortRange),\n options.host\n );\n if (portsToCheck.length > 0) {\n let message = `Unable to find an available port (tried ${portsToCheck.join(\n \"-\"\n )} ${_fmtOnHost(options.host)}).`;\n if (availablePort) {\n message += ` Using alternative port ${availablePort}.`;\n }\n _log(options.verbose, message);\n }\n }\n if (!availablePort && _userOptions.random !== false) {\n availablePort = await getRandomPort(options.host);\n if (availablePort) {\n _log(options.verbose, `Using random port ${availablePort}`);\n }\n }\n if (!availablePort) {\n const triedRanges = [\n options.port,\n options.portRange.join(\"-\"),\n options.alternativePortRange.join(\"-\")\n ].filter(Boolean).join(\", \");\n throw new GetPortError(\n `Unable to find an available port ${_fmtOnHost(\n options.host\n )} (tried ${triedRanges})`\n );\n }\n return availablePort;\n}\nasync function getRandomPort(host) {\n const port = await checkPort(0, host);\n if (port === false) {\n throw new GetPortError(`Unable to find a random port ${_fmtOnHost(host)}`);\n }\n return port;\n}\nasync function waitForPort(port, options = {}) {\n const delay = options.delay || 500;\n const retries = options.retries || 4;\n for (let index = retries; index > 0; index--) {\n if (await _tryPort(port, options.host) === false) {\n return;\n }\n await new Promise((resolve) => setTimeout(resolve, delay));\n }\n throw new GetPortError(\n `Timeout waiting for port ${port} after ${retries} retries with ${delay}ms interval.`\n );\n}\nasync function checkPort(port, host = process.env.HOST, verbose) {\n if (!host) {\n host = _getLocalHosts([void 0, \"0.0.0.0\"]);\n }\n if (!Array.isArray(host)) {\n return _tryPort(port, host);\n }\n for (const _host of host) {\n const _port = await _tryPort(port, _host);\n if (_port === false) {\n if (port < 1024 && verbose) {\n _log(\n verbose,\n `Unable to listen to the privileged port ${port} ${_fmtOnHost(\n _host\n )}`\n );\n }\n return false;\n }\n if (port === 0 && _port !== 0) {\n port = _port;\n }\n }\n return port;\n}\n\nlet _nodeMajorVersion;\nlet _isSocketSupported;\nfunction getSocketAddress(opts) {\n const parts = [\n opts.name,\n opts.pid ? process.pid : void 0,\n opts.random ? Math.round(Math.random() * 1e4) : void 0\n ].filter(Boolean);\n const socketName = `${parts.join(\"-\")}.sock`;\n if (process.platform === \"win32\") {\n return join(String.raw`\\\\.\\pipe`, socketName);\n }\n if (process.platform === \"linux\") {\n if (_nodeMajorVersion === void 0) {\n _nodeMajorVersion = +process.versions.node.split(\".\")[0];\n }\n if (_nodeMajorVersion >= 20) {\n return `\\0${socketName}`;\n }\n }\n return join(tmpdir(), socketName);\n}\nasync function isSocketSupported() {\n if (_isSocketSupported !== void 0) {\n return _isSocketSupported;\n }\n if (globalThis.process?.versions?.webcontainer) {\n return false;\n }\n const socketAddress = getSocketAddress({ name: \"get-port\", random: true });\n const server = new Server();\n try {\n await new Promise((resolve, reject) => {\n server.on(\"error\", reject);\n server.listen(socketAddress, resolve);\n });\n _isSocketSupported = true;\n return true;\n } catch {\n _isSocketSupported = false;\n return false;\n } finally {\n if (server.listening) {\n server.close();\n await cleanSocket(socketAddress);\n }\n }\n}\nasync function cleanSocket(path) {\n if (!path || path[0] === \"\\0\" || path.startsWith(String.raw`\\\\.\\pipe`)) {\n return;\n }\n return rm(path, { force: true, recursive: true }).catch(console.error);\n}\n\nexport { checkPort, cleanSocket, getPort, getRandomPort, getSocketAddress, isSafePort, isSocketSupported, isUnsafePort, waitForPort };\n","import fs from 'node:fs';\n\nlet isDockerCached;\n\nfunction hasDockerEnv() {\n\ttry {\n\t\tfs.statSync('/.dockerenv');\n\t\treturn true;\n\t} catch {\n\t\treturn false;\n\t}\n}\n\nfunction hasDockerCGroup() {\n\ttry {\n\t\treturn fs.readFileSync('/proc/self/cgroup', 'utf8').includes('docker');\n\t} catch {\n\t\treturn false;\n\t}\n}\n\nexport default function isDocker() {\n\t// TODO: Use `??=` when targeting Node.js 16.\n\tif (isDockerCached === undefined) {\n\t\tisDockerCached = hasDockerEnv() || hasDockerCGroup();\n\t}\n\n\treturn isDockerCached;\n}\n","import fs from 'node:fs';\nimport isDocker from 'is-docker';\n\nlet cachedResult;\n\n// Podman detection\nconst hasContainerEnv = () => {\n\ttry {\n\t\tfs.statSync('/run/.containerenv');\n\t\treturn true;\n\t} catch {\n\t\treturn false;\n\t}\n};\n\nexport default function isInsideContainer() {\n\t// TODO: Use `??=` when targeting Node.js 16.\n\tif (cachedResult === undefined) {\n\t\tcachedResult = hasContainerEnv() || isDocker();\n\t}\n\n\treturn cachedResult;\n}\n","import process from 'node:process';\nimport os from 'node:os';\nimport fs from 'node:fs';\nimport isInsideContainer from 'is-inside-container';\n\nconst isWsl = () => {\n\tif (process.platform !== 'linux') {\n\t\treturn false;\n\t}\n\n\tif (os.release().toLowerCase().includes('microsoft')) {\n\t\tif (isInsideContainer()) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}\n\n\ttry {\n\t\tif (fs.readFileSync('/proc/version', 'utf8').toLowerCase().includes('microsoft')) {\n\t\t\treturn !isInsideContainer();\n\t\t}\n\t} catch {}\n\n\t// Fallback for custom kernels: check WSL-specific paths.\n\tif (\n\t\tfs.existsSync('/proc/sys/fs/binfmt_misc/WSLInterop')\n\t\t|| fs.existsSync('/run/WSL')\n\t) {\n\t\treturn !isInsideContainer();\n\t}\n\n\treturn false;\n};\n\nexport default process.env.__IS_WSL_TEST__ ? isWsl : isWsl();\n","import process from 'node:process';\nimport {Buffer} from 'node:buffer';\nimport {promisify} from 'node:util';\nimport childProcess from 'node:child_process';\nimport fs, {constants as fsConstants} from 'node:fs/promises';\n\nconst execFile = promisify(childProcess.execFile);\n\nexport const powerShellPath = () => `${process.env.SYSTEMROOT || process.env.windir || String.raw`C:\\Windows`}\\\\System32\\\\WindowsPowerShell\\\\v1.0\\\\powershell.exe`;\n\n// Cache for PowerShell accessibility check\nlet canAccessCache;\n\nexport const canAccessPowerShell = async () => {\n\tcanAccessCache ??= (async () => {\n\t\ttry {\n\t\t\tawait fs.access(powerShellPath(), fsConstants.X_OK);\n\t\t\treturn true;\n\t\t} catch {\n\t\t\treturn false;\n\t\t}\n\t})();\n\n\treturn canAccessCache;\n};\n\nexport const executePowerShell = async (command, options = {}) => {\n\tconst {\n\t\tpowerShellPath: psPath,\n\t\t...execFileOptions\n\t} = options;\n\n\tconst encodedCommand = executePowerShell.encodeCommand(command);\n\n\treturn execFile(\n\t\tpsPath ?? powerShellPath(),\n\t\t[\n\t\t\t...executePowerShell.argumentsPrefix,\n\t\t\tencodedCommand,\n\t\t],\n\t\t{\n\t\t\tencoding: 'utf8',\n\t\t\t...execFileOptions,\n\t\t},\n\t);\n};\n\nexecutePowerShell.argumentsPrefix = [\n\t'-NoProfile',\n\t'-NonInteractive',\n\t'-ExecutionPolicy',\n\t'Bypass',\n\t'-EncodedCommand',\n];\n\nexecutePowerShell.encodeCommand = command => Buffer.from(command, 'utf16le').toString('base64');\n\nexecutePowerShell.escapeArgument = value => `'${String(value).replaceAll('\\'', '\\'\\'')}'`;\n","export function parseMountPointFromConfig(content) {\n\tfor (const line of content.split('\\n')) {\n\t\t// Skip comment lines\n\t\tif (/^\\s*#/.test(line)) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t// Match root at start of line (after optional whitespace)\n\t\tconst match = /^\\s*root\\s*=\\s*(?<mountPoint>\"[^\"]*\"|'[^']*'|[^#]*)/.exec(line);\n\t\tif (!match) {\n\t\t\tcontinue;\n\t\t}\n\n\t\treturn match.groups.mountPoint\n\t\t\t.trim()\n\t\t\t// Strip surrounding quotes\n\t\t\t.replaceAll(/^[\"']|[\"']$/g, '');\n\t}\n}\n","import {promisify} from 'node:util';\nimport childProcess from 'node:child_process';\nimport fs, {constants as fsConstants} from 'node:fs/promises';\nimport isWsl from 'is-wsl';\nimport {powerShellPath as windowsPowerShellPath, executePowerShell} from 'powershell-utils';\nimport {parseMountPointFromConfig} from './utilities.js';\n\nconst execFile = promisify(childProcess.execFile);\n\nexport const wslDrivesMountPoint = (() => {\n\t// Default value for \"root\" param\n\t// according to https://docs.microsoft.com/en-us/windows/wsl/wsl-config\n\tconst defaultMountPoint = '/mnt/';\n\n\tlet mountPoint;\n\n\treturn async function () {\n\t\tif (mountPoint) {\n\t\t\t// Return memoized mount point value\n\t\t\treturn mountPoint;\n\t\t}\n\n\t\tconst configFilePath = '/etc/wsl.conf';\n\n\t\tlet isConfigFileExists = false;\n\t\ttry {\n\t\t\tawait fs.access(configFilePath, fsConstants.F_OK);\n\t\t\tisConfigFileExists = true;\n\t\t} catch {}\n\n\t\tif (!isConfigFileExists) {\n\t\t\treturn defaultMountPoint;\n\t\t}\n\n\t\tconst configContent = await fs.readFile(configFilePath, {encoding: 'utf8'});\n\t\tconst parsedMountPoint = parseMountPointFromConfig(configContent);\n\n\t\tif (parsedMountPoint === undefined) {\n\t\t\treturn defaultMountPoint;\n\t\t}\n\n\t\tmountPoint = parsedMountPoint;\n\t\tmountPoint = mountPoint.endsWith('/') ? mountPoint : `${mountPoint}/`;\n\n\t\treturn mountPoint;\n\t};\n})();\n\nexport const powerShellPathFromWsl = async () => {\n\tconst mountPoint = await wslDrivesMountPoint();\n\treturn `${mountPoint}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`;\n};\n\nexport const powerShellPath = isWsl ? powerShellPathFromWsl : windowsPowerShellPath;\n\n// Cache for PowerShell accessibility check\nlet canAccessPowerShellPromise;\n\nexport const canAccessPowerShell = async () => {\n\tcanAccessPowerShellPromise ??= (async () => {\n\t\ttry {\n\t\t\tconst psPath = await powerShellPath();\n\t\t\tawait fs.access(psPath, fsConstants.X_OK);\n\t\t\treturn true;\n\t\t} catch {\n\t\t\t// PowerShell is not accessible (either doesn't exist, no execute permission, or other error)\n\t\t\treturn false;\n\t\t}\n\t})();\n\n\treturn canAccessPowerShellPromise;\n};\n\nexport const wslDefaultBrowser = async () => {\n\tconst psPath = await powerShellPath();\n\tconst command = String.raw`(Get-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations\\http\\UserChoice\").ProgId`;\n\n\tconst {stdout} = await executePowerShell(command, {powerShellPath: psPath});\n\n\treturn stdout.trim();\n};\n\nexport const convertWslPathToWindows = async path => {\n\t// Don't convert URLs\n\tif (/^[a-z]+:\\/\\//i.test(path)) {\n\t\treturn path;\n\t}\n\n\ttry {\n\t\tconst {stdout} = await execFile('wslpath', ['-aw', path], {encoding: 'utf8'});\n\t\treturn stdout.trim();\n\t} catch {\n\t\t// If wslpath fails, return the original path\n\t\treturn path;\n\t}\n};\n\nexport {default as isWsl} from 'is-wsl';\n","export default function defineLazyProperty(object, propertyName, valueGetter) {\n\tconst define = value => Object.defineProperty(object, propertyName, {value, enumerable: true, writable: true});\n\n\tObject.defineProperty(object, propertyName, {\n\t\tconfigurable: true,\n\t\tenumerable: true,\n\t\tget() {\n\t\t\tconst result = valueGetter();\n\t\t\tdefine(result);\n\t\t\treturn result;\n\t\t},\n\t\tset(value) {\n\t\t\tdefine(value);\n\t\t}\n\t});\n\n\treturn object;\n}\n","import {promisify} from 'node:util';\nimport process from 'node:process';\nimport {execFile} from 'node:child_process';\n\nconst execFileAsync = promisify(execFile);\n\nexport default async function defaultBrowserId() {\n\tif (process.platform !== 'darwin') {\n\t\tthrow new Error('macOS only');\n\t}\n\n\tconst {stdout} = await execFileAsync('defaults', ['read', 'com.apple.LaunchServices/com.apple.launchservices.secure', 'LSHandlers']);\n\n\t// `(?!-)` is to prevent matching `LSHandlerRoleAll = \"-\";`.\n\tconst match = /LSHandlerRoleAll = \"(?!-)(?<id>[^\"]+?)\";\\s+?LSHandlerURLScheme = (?:http|https);/.exec(stdout);\n\n\tconst browserId = match?.groups.id ?? 'com.apple.Safari';\n\n\t// Correct the case for Safari's bundle identifier\n\tif (browserId === 'com.apple.safari') {\n\t\treturn 'com.apple.Safari';\n\t}\n\n\treturn browserId;\n}\n","import process from 'node:process';\nimport {promisify} from 'node:util';\nimport {execFile, execFileSync} from 'node:child_process';\n\nconst execFileAsync = promisify(execFile);\n\nexport async function runAppleScript(script, {humanReadableOutput = true, signal} = {}) {\n\tif (process.platform !== 'darwin') {\n\t\tthrow new Error('macOS only');\n\t}\n\n\tconst outputArguments = humanReadableOutput ? [] : ['-ss'];\n\n\tconst execOptions = {};\n\tif (signal) {\n\t\texecOptions.signal = signal;\n\t}\n\n\tconst {stdout} = await execFileAsync('osascript', ['-e', script, outputArguments], execOptions);\n\treturn stdout.trim();\n}\n\nexport function runAppleScriptSync(script, {humanReadableOutput = true} = {}) {\n\tif (process.platform !== 'darwin') {\n\t\tthrow new Error('macOS only');\n\t}\n\n\tconst outputArguments = humanReadableOutput ? [] : ['-ss'];\n\n\tconst stdout = execFileSync('osascript', ['-e', script, ...outputArguments], {\n\t\tencoding: 'utf8',\n\t\tstdio: ['ignore', 'pipe', 'ignore'],\n\t\ttimeout: 500,\n\t});\n\n\treturn stdout.trim();\n}\n","import {runAppleScript} from 'run-applescript';\n\nexport default async function bundleName(bundleId) {\n\treturn runAppleScript(`tell application \"Finder\" to set app_path to application file id \"${bundleId}\" as string\\ntell application \"System Events\" to get value of property list item \"CFBundleName\" of property list file (app_path & \":Contents:Info.plist\")`);\n}\n","import {promisify} from 'node:util';\nimport {execFile} from 'node:child_process';\n\nconst execFileAsync = promisify(execFile);\n\n// TODO: Fix the casing of bundle identifiers in the next major version.\n\n// Windows doesn't have browser IDs in the same way macOS/Linux does so we give fake\n// ones that look real and match the macOS/Linux versions for cross-platform apps.\nconst windowsBrowserProgIds = {\n\tMSEdgeHTM: {name: 'Edge', id: 'com.microsoft.edge'}, // The missing `L` is correct.\n\tMSEdgeBHTML: {name: 'Edge Beta', id: 'com.microsoft.edge.beta'},\n\tMSEdgeDHTML: {name: 'Edge Dev', id: 'com.microsoft.edge.dev'},\n\tAppXq0fevzme2pys62n3e0fbqa7peapykr8v: {name: 'Edge', id: 'com.microsoft.edge.old'},\n\tChromeHTML: {name: 'Chrome', id: 'com.google.chrome'},\n\tChromeBHTML: {name: 'Chrome Beta', id: 'com.google.chrome.beta'},\n\tChromeDHTML: {name: 'Chrome Dev', id: 'com.google.chrome.dev'},\n\tChromiumHTM: {name: 'Chromium', id: 'org.chromium.Chromium'},\n\tBraveHTML: {name: 'Brave', id: 'com.brave.Browser'},\n\tBraveBHTML: {name: 'Brave Beta', id: 'com.brave.Browser.beta'},\n\tBraveDHTML: {name: 'Brave Dev', id: 'com.brave.Browser.dev'},\n\tBraveSSHTM: {name: 'Brave Nightly', id: 'com.brave.Browser.nightly'},\n\tFirefoxURL: {name: 'Firefox', id: 'org.mozilla.firefox'},\n\tOperaStable: {name: 'Opera', id: 'com.operasoftware.Opera'},\n\tVivaldiHTM: {name: 'Vivaldi', id: 'com.vivaldi.Vivaldi'},\n\t'IE.HTTP': {name: 'Internet Explorer', id: 'com.microsoft.ie'},\n};\n\nexport const _windowsBrowserProgIdMap = new Map(Object.entries(windowsBrowserProgIds));\n\nexport class UnknownBrowserError extends Error {}\n\nexport default async function defaultBrowser(_execFileAsync = execFileAsync) {\n\tconst {stdout} = await _execFileAsync('reg', [\n\t\t'QUERY',\n\t\t' HKEY_CURRENT_USER\\\\Software\\\\Microsoft\\\\Windows\\\\Shell\\\\Associations\\\\UrlAssociations\\\\http\\\\UserChoice',\n\t\t'/v',\n\t\t'ProgId',\n\t]);\n\n\tconst match = /ProgId\\s*REG_SZ\\s*(?<id>\\S+)/.exec(stdout);\n\tif (!match) {\n\t\tthrow new UnknownBrowserError(`Cannot find Windows browser in stdout: ${JSON.stringify(stdout)}`);\n\t}\n\n\tconst {id} = match.groups;\n\n\t// Windows can append a hash suffix to ProgIds using a dot or hyphen\n\t// (e.g., `ChromeHTML.ABC123`, `FirefoxURL-6F193CCC56814779`).\n\t// Try exact match first, then try without the suffix.\n\tconst dotIndex = id.lastIndexOf('.');\n\tconst hyphenIndex = id.lastIndexOf('-');\n\tconst baseIdByDot = dotIndex === -1 ? undefined : id.slice(0, dotIndex);\n\tconst baseIdByHyphen = hyphenIndex === -1 ? undefined : id.slice(0, hyphenIndex);\n\n\treturn windowsBrowserProgIds[id] ?? windowsBrowserProgIds[baseIdByDot] ?? windowsBrowserProgIds[baseIdByHyphen] ?? {name: id, id};\n}\n","import {promisify} from 'node:util';\nimport process from 'node:process';\nimport {execFile} from 'node:child_process';\nimport defaultBrowserId from 'default-browser-id';\nimport bundleName from 'bundle-name';\nimport windows from './windows.js';\n\nexport {_windowsBrowserProgIdMap} from './windows.js';\n\nconst execFileAsync = promisify(execFile);\n\n// Inlined: https://github.com/sindresorhus/titleize/blob/main/index.js\nconst titleize = string => string.toLowerCase().replaceAll(/(?:^|\\s|-)\\S/g, x => x.toUpperCase());\n\nexport default async function defaultBrowser() {\n\tif (process.platform === 'darwin') {\n\t\tconst id = await defaultBrowserId();\n\t\tconst name = await bundleName(id);\n\t\treturn {name, id};\n\t}\n\n\tif (process.platform === 'linux') {\n\t\tconst {stdout} = await execFileAsync('xdg-mime', ['query', 'default', 'x-scheme-handler/http']);\n\t\tconst id = stdout.trim();\n\t\tconst name = titleize(id.replace(/.desktop$/, '').replace('-', ' '));\n\t\treturn {name, id};\n\t}\n\n\tif (process.platform === 'win32') {\n\t\treturn windows();\n\t}\n\n\tthrow new Error('Only macOS, Linux, and Windows are supported');\n}\n","import process from 'node:process';\n\nconst isInSsh = Boolean(process.env.SSH_CONNECTION\n\t|| process.env.SSH_CLIENT\n\t|| process.env.SSH_TTY);\n\nexport default isInSsh;\n","import process from 'node:process';\nimport path from 'node:path';\nimport {fileURLToPath} from 'node:url';\nimport childProcess from 'node:child_process';\nimport fs, {constants as fsConstants} from 'node:fs/promises';\nimport {\n\tisWsl,\n\tpowerShellPath,\n\tconvertWslPathToWindows,\n\tcanAccessPowerShell,\n\twslDefaultBrowser,\n} from 'wsl-utils';\nimport {executePowerShell} from 'powershell-utils';\nimport defineLazyProperty from 'define-lazy-prop';\nimport defaultBrowser, {_windowsBrowserProgIdMap} from 'default-browser';\nimport isInsideContainer from 'is-inside-container';\nimport isInSsh from 'is-in-ssh';\n\nconst fallbackAttemptSymbol = Symbol('fallbackAttempt');\n\n// Path to included `xdg-open`.\nconst __dirname = import.meta.url ? path.dirname(fileURLToPath(import.meta.url)) : '';\nconst localXdgOpenPath = path.join(__dirname, 'xdg-open');\n\nconst {platform, arch} = process;\n\nconst tryEachApp = async (apps, opener) => {\n\tif (apps.length === 0) {\n\t\t// No app was provided\n\t\treturn;\n\t}\n\n\tconst errors = [];\n\n\tfor (const app of apps) {\n\t\ttry {\n\t\t\treturn await opener(app); // eslint-disable-line no-await-in-loop\n\t\t} catch (error) {\n\t\t\terrors.push(error);\n\t\t}\n\t}\n\n\tthrow new AggregateError(errors, 'Failed to open in all supported apps');\n};\n\n// eslint-disable-next-line complexity\nconst baseOpen = async options => {\n\toptions = {\n\t\twait: false,\n\t\tbackground: false,\n\t\tnewInstance: false,\n\t\tallowNonzeroExitCode: false,\n\t\t...options,\n\t};\n\n\tconst isFallbackAttempt = options[fallbackAttemptSymbol] === true;\n\tdelete options[fallbackAttemptSymbol];\n\n\tif (Array.isArray(options.app)) {\n\t\treturn tryEachApp(options.app, singleApp => baseOpen({\n\t\t\t...options,\n\t\t\tapp: singleApp,\n\t\t\t[fallbackAttemptSymbol]: true,\n\t\t}));\n\t}\n\n\tlet {name: app, arguments: appArguments = []} = options.app ?? {};\n\tappArguments = [...appArguments];\n\n\tif (Array.isArray(app)) {\n\t\treturn tryEachApp(app, appName => baseOpen({\n\t\t\t...options,\n\t\t\tapp: {\n\t\t\t\tname: appName,\n\t\t\t\targuments: appArguments,\n\t\t\t},\n\t\t\t[fallbackAttemptSymbol]: true,\n\t\t}));\n\t}\n\n\tif (app === 'browser' || app === 'browserPrivate') {\n\t\t// IDs from default-browser for macOS and windows are the same.\n\t\t// IDs are lowercased to increase chances of a match.\n\t\tconst ids = {\n\t\t\t'com.google.chrome': 'chrome',\n\t\t\t'google-chrome.desktop': 'chrome',\n\t\t\t'com.brave.browser': 'brave',\n\t\t\t'org.mozilla.firefox': 'firefox',\n\t\t\t'firefox.desktop': 'firefox',\n\t\t\t'com.microsoft.msedge': 'edge',\n\t\t\t'com.microsoft.edge': 'edge',\n\t\t\t'com.microsoft.edgemac': 'edge',\n\t\t\t'microsoft-edge.desktop': 'edge',\n\t\t\t'com.apple.safari': 'safari',\n\t\t};\n\n\t\t// Incognito flags for each browser in `apps`.\n\t\tconst flags = {\n\t\t\tchrome: '--incognito',\n\t\t\tbrave: '--incognito',\n\t\t\tfirefox: '--private-window',\n\t\t\tedge: '--inPrivate',\n\t\t\t// Safari doesn't support private mode via command line\n\t\t};\n\n\t\tlet browser;\n\t\tif (isWsl) {\n\t\t\tconst progId = await wslDefaultBrowser();\n\t\t\tconst browserInfo = _windowsBrowserProgIdMap.get(progId);\n\t\t\tbrowser = browserInfo ?? {};\n\t\t} else {\n\t\t\tbrowser = await defaultBrowser();\n\t\t}\n\n\t\tif (browser.id in ids) {\n\t\t\tconst browserName = ids[browser.id.toLowerCase()];\n\n\t\t\tif (app === 'browserPrivate') {\n\t\t\t\t// Safari doesn't support private mode via command line\n\t\t\t\tif (browserName === 'safari') {\n\t\t\t\t\tthrow new Error('Safari doesn\\'t support opening in private mode via command line');\n\t\t\t\t}\n\n\t\t\t\tappArguments.push(flags[browserName]);\n\t\t\t}\n\n\t\t\treturn baseOpen({\n\t\t\t\t...options,\n\t\t\t\tapp: {\n\t\t\t\t\tname: apps[browserName],\n\t\t\t\t\targuments: appArguments,\n\t\t\t\t},\n\t\t\t});\n\t\t}\n\n\t\tthrow new Error(`${browser.name} is not supported as a default browser`);\n\t}\n\n\tlet command;\n\tconst cliArguments = [];\n\tconst childProcessOptions = {};\n\n\t// Determine if we should use Windows/PowerShell behavior in WSL.\n\t// We only use Windows integration if PowerShell is actually accessible.\n\t// This allows the package to work in sandboxed WSL environments where Windows access is restricted.\n\tlet shouldUseWindowsInWsl = false;\n\tif (isWsl && !isInsideContainer() && !isInSsh && !app) {\n\t\tshouldUseWindowsInWsl = await canAccessPowerShell();\n\t}\n\n\tif (platform === 'darwin') {\n\t\tcommand = 'open';\n\n\t\tif (options.wait) {\n\t\t\tcliArguments.push('--wait-apps');\n\t\t}\n\n\t\tif (options.background) {\n\t\t\tcliArguments.push('--background');\n\t\t}\n\n\t\tif (options.newInstance) {\n\t\t\tcliArguments.push('--new');\n\t\t}\n\n\t\tif (app) {\n\t\t\tcliArguments.push('-a', app);\n\t\t}\n\t} else if (platform === 'win32' || shouldUseWindowsInWsl) {\n\t\tcommand = await powerShellPath();\n\n\t\tcliArguments.push(...executePowerShell.argumentsPrefix);\n\n\t\tif (!isWsl) {\n\t\t\tchildProcessOptions.windowsVerbatimArguments = true;\n\t\t}\n\n\t\t// Convert WSL Linux paths to Windows paths\n\t\tif (isWsl && options.target) {\n\t\t\toptions.target = await convertWslPathToWindows(options.target);\n\t\t}\n\n\t\t// Suppress PowerShell progress messages that are written to stderr\n\t\tconst encodedArguments = ['$ProgressPreference = \\'SilentlyContinue\\';', 'Start'];\n\n\t\tif (options.wait) {\n\t\t\tencodedArguments.push('-Wait');\n\t\t}\n\n\t\tif (app) {\n\t\t\tencodedArguments.push(executePowerShell.escapeArgument(app));\n\t\t\tif (options.target) {\n\t\t\t\tappArguments.push(options.target);\n\t\t\t}\n\t\t} else if (options.target) {\n\t\t\tencodedArguments.push(executePowerShell.escapeArgument(options.target));\n\t\t}\n\n\t\tif (appArguments.length > 0) {\n\t\t\tappArguments = appArguments.map(argument => executePowerShell.escapeArgument(argument));\n\t\t\tencodedArguments.push('-ArgumentList', appArguments.join(','));\n\t\t}\n\n\t\t// Using Base64-encoded command, accepted by PowerShell, to allow special characters.\n\t\toptions.target = executePowerShell.encodeCommand(encodedArguments.join(' '));\n\n\t\tif (!options.wait) {\n\t\t\t// PowerShell will keep the parent process alive unless stdio is ignored.\n\t\t\tchildProcessOptions.stdio = 'ignore';\n\t\t}\n\t} else {\n\t\tif (app) {\n\t\t\tcommand = app;\n\t\t} else {\n\t\t\t// When bundled by Webpack, there's no actual package file path and no local `xdg-open`.\n\t\t\tconst isBundled = !__dirname || __dirname === '/';\n\n\t\t\t// Check if local `xdg-open` exists and is executable.\n\t\t\tlet exeLocalXdgOpen = false;\n\t\t\ttry {\n\t\t\t\tawait fs.access(localXdgOpenPath, fsConstants.X_OK);\n\t\t\t\texeLocalXdgOpen = true;\n\t\t\t} catch {}\n\n\t\t\tconst useSystemXdgOpen = process.versions.electron\n\t\t\t\t?? (platform === 'android' || isBundled || !exeLocalXdgOpen);\n\t\t\tcommand = useSystemXdgOpen ? 'xdg-open' : localXdgOpenPath;\n\t\t}\n\n\t\tif (appArguments.length > 0) {\n\t\t\tcliArguments.push(...appArguments);\n\t\t}\n\n\t\tif (!options.wait) {\n\t\t\t// `xdg-open` will block the process unless stdio is ignored\n\t\t\t// and it's detached from the parent even if it's unref'd.\n\t\t\tchildProcessOptions.stdio = 'ignore';\n\t\t\tchildProcessOptions.detached = true;\n\t\t}\n\t}\n\n\tif (platform === 'darwin' && appArguments.length > 0) {\n\t\tcliArguments.push('--args', ...appArguments);\n\t}\n\n\t// IMPORTANT: On macOS, the target MUST come AFTER '--args'.\n\t// When using --args, ALL following arguments are passed to the app.\n\t// Example: open -a \"chrome\" --args --incognito https://site.com\n\t// This passes BOTH --incognito AND https://site.com to Chrome.\n\t// Without this order, Chrome won't open in incognito. See #332.\n\tif (options.target) {\n\t\tcliArguments.push(options.target);\n\t}\n\n\tconst subprocess = childProcess.spawn(command, cliArguments, childProcessOptions);\n\n\tif (options.wait) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tsubprocess.once('error', reject);\n\n\t\t\tsubprocess.once('close', exitCode => {\n\t\t\t\tif (!options.allowNonzeroExitCode && exitCode !== 0) {\n\t\t\t\t\treject(new Error(`Exited with code ${exitCode}`));\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tresolve(subprocess);\n\t\t\t});\n\t\t});\n\t}\n\n\t// When we're in a fallback attempt, we need to detect launch failures before trying the next app.\n\t// Wait for the close event to check the exit code before unreffing.\n\t// The launcher (open/xdg-open/PowerShell) exits quickly (~10-30ms) even on success.\n\tif (isFallbackAttempt) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tsubprocess.once('error', reject);\n\n\t\t\tsubprocess.once('spawn', () => {\n\t\t\t\t// Keep error handler active for post-spawn errors\n\t\t\t\tsubprocess.once('close', exitCode => {\n\t\t\t\t\tsubprocess.off('error', reject);\n\n\t\t\t\t\tif (exitCode !== 0) {\n\t\t\t\t\t\treject(new Error(`Exited with code ${exitCode}`));\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tsubprocess.unref();\n\t\t\t\t\tresolve(subprocess);\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t}\n\n\tsubprocess.unref();\n\n\t// Handle spawn errors before the caller can attach listeners.\n\t// This prevents unhandled error events from crashing the process.\n\treturn new Promise((resolve, reject) => {\n\t\tsubprocess.once('error', reject);\n\n\t\t// Wait for the subprocess to spawn before resolving.\n\t\t// This ensures the process is established before the caller continues,\n\t\t// preventing issues when process.exit() is called immediately after.\n\t\tsubprocess.once('spawn', () => {\n\t\t\tsubprocess.off('error', reject);\n\t\t\tresolve(subprocess);\n\t\t});\n\t});\n};\n\nconst open = (target, options) => {\n\tif (typeof target !== 'string') {\n\t\tthrow new TypeError('Expected a `target`');\n\t}\n\n\treturn baseOpen({\n\t\t...options,\n\t\ttarget,\n\t});\n};\n\nexport const openApp = (name, options) => {\n\tif (typeof name !== 'string' && !Array.isArray(name)) {\n\t\tthrow new TypeError('Expected a valid `name`');\n\t}\n\n\tconst {arguments: appArguments = []} = options ?? {};\n\tif (appArguments !== undefined && appArguments !== null && !Array.isArray(appArguments)) {\n\t\tthrow new TypeError('Expected `appArguments` as Array type');\n\t}\n\n\treturn baseOpen({\n\t\t...options,\n\t\tapp: {\n\t\t\tname,\n\t\t\targuments: appArguments,\n\t\t},\n\t});\n};\n\nfunction detectArchBinary(binary) {\n\tif (typeof binary === 'string' || Array.isArray(binary)) {\n\t\treturn binary;\n\t}\n\n\tconst {[arch]: archBinary} = binary;\n\n\tif (!archBinary) {\n\t\tthrow new Error(`${arch} is not supported`);\n\t}\n\n\treturn archBinary;\n}\n\nfunction detectPlatformBinary({[platform]: platformBinary}, {wsl} = {}) {\n\tif (wsl && isWsl) {\n\t\treturn detectArchBinary(wsl);\n\t}\n\n\tif (!platformBinary) {\n\t\tthrow new Error(`${platform} is not supported`);\n\t}\n\n\treturn detectArchBinary(platformBinary);\n}\n\nexport const apps = {\n\tbrowser: 'browser',\n\tbrowserPrivate: 'browserPrivate',\n};\n\ndefineLazyProperty(apps, 'chrome', () => detectPlatformBinary({\n\tdarwin: 'google chrome',\n\twin32: 'chrome',\n\t// `chromium-browser` is the older deb package name used by Ubuntu/Debian before snap.\n\tlinux: ['google-chrome', 'google-chrome-stable', 'chromium', 'chromium-browser'],\n}, {\n\twsl: {\n\t\tia32: '/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe',\n\t\tx64: ['/mnt/c/Program Files/Google/Chrome/Application/chrome.exe', '/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe'],\n\t},\n}));\n\ndefineLazyProperty(apps, 'brave', () => detectPlatformBinary({\n\tdarwin: 'brave browser',\n\twin32: 'brave',\n\tlinux: ['brave-browser', 'brave'],\n}, {\n\twsl: {\n\t\tia32: '/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe',\n\t\tx64: ['/mnt/c/Program Files/BraveSoftware/Brave-Browser/Application/brave.exe', '/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe'],\n\t},\n}));\n\ndefineLazyProperty(apps, 'firefox', () => detectPlatformBinary({\n\tdarwin: 'firefox',\n\twin32: String.raw`C:\\Program Files\\Mozilla Firefox\\firefox.exe`,\n\tlinux: 'firefox',\n}, {\n\twsl: '/mnt/c/Program Files/Mozilla Firefox/firefox.exe',\n}));\n\ndefineLazyProperty(apps, 'edge', () => detectPlatformBinary({\n\tdarwin: 'microsoft edge',\n\twin32: 'msedge',\n\tlinux: ['microsoft-edge', 'microsoft-edge-dev'],\n}, {\n\twsl: '/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe',\n}));\n\ndefineLazyProperty(apps, 'safari', () => detectPlatformBinary({\n\tdarwin: 'Safari',\n}));\n\nexport default open;\n","let _lazyMatch = () => { var __lib__=(()=>{var m=Object.defineProperty,V=Object.getOwnPropertyDescriptor,G=Object.getOwnPropertyNames,T=Object.prototype.hasOwnProperty,q=(r,e)=>{for(var n in e)m(r,n,{get:e[n],enumerable:true});},H=(r,e,n,a)=>{if(e&&typeof e==\"object\"||typeof e==\"function\")for(let t of G(e))!T.call(r,t)&&t!==n&&m(r,t,{get:()=>e[t],enumerable:!(a=V(e,t))||a.enumerable});return r},J=r=>H(m({},\"__esModule\",{value:true}),r),w={};q(w,{default:()=>re});var A=r=>Array.isArray(r),d=r=>typeof r==\"function\",Q=r=>r.length===0,W=r=>typeof r==\"number\",K=r=>typeof r==\"object\"&&r!==null,X=r=>r instanceof RegExp,b=r=>typeof r==\"string\",h=r=>r===void 0,Y=r=>{const e=new Map;return n=>{const a=e.get(n);if(a)return a;const t=r(n);return e.set(n,t),t}},rr=(r,e,n={})=>{const a={cache:{},input:r,index:0,indexMax:0,options:n,output:[]};if(v(e)(a)&&a.index===r.length)return a.output;throw new Error(`Failed to parse at index ${a.indexMax}`)},i=(r,e)=>A(r)?er(r,e):b(r)?ar(r,e):nr(r,e),er=(r,e)=>{const n={};for(const a of r){if(a.length!==1)throw new Error(`Invalid character: \"${a}\"`);const t=a.charCodeAt(0);n[t]=true;}return a=>{const t=a.index,o=a.input;for(;a.index<o.length&&o.charCodeAt(a.index)in n;)a.index+=1;const u=a.index;if(u>t){if(!h(e)&&!a.options.silent){const s=a.input.slice(t,u),c=d(e)?e(s,o,String(t)):e;h(c)||a.output.push(c);}a.indexMax=Math.max(a.indexMax,a.index);}return true}},nr=(r,e)=>{const n=r.source,a=r.flags.replace(/y|$/,\"y\"),t=new RegExp(n,a);return g(o=>{t.lastIndex=o.index;const u=t.exec(o.input);if(u){if(!h(e)&&!o.options.silent){const s=d(e)?e(...u,o.input,String(o.index)):e;h(s)||o.output.push(s);}return o.index+=u[0].length,o.indexMax=Math.max(o.indexMax,o.index),true}else return false})},ar=(r,e)=>n=>{if(n.input.startsWith(r,n.index)){if(!h(e)&&!n.options.silent){const t=d(e)?e(r,n.input,String(n.index)):e;h(t)||n.output.push(t);}return n.index+=r.length,n.indexMax=Math.max(n.indexMax,n.index),true}else return false},C=(r,e,n,a)=>{const t=v(r);return g(_(M(o=>{let u=0;for(;u<n;){const s=o.index;if(!t(o)||(u+=1,o.index===s))break}return u>=e})))},tr=(r,e)=>C(r,0,1),f=(r,e)=>C(r,0,1/0),x=(r,e)=>{const n=r.map(v);return g(_(M(a=>{for(let t=0,o=n.length;t<o;t++)if(!n[t](a))return false;return true})))},l=(r,e)=>{const n=r.map(v);return g(_(a=>{for(let t=0,o=n.length;t<o;t++)if(n[t](a))return true;return false}))},M=(r,e=false)=>{const n=v(r);return a=>{const t=a.index,o=a.output.length,u=n(a);return (!u||e)&&(a.index=t,a.output.length!==o&&(a.output.length=o)),u}},_=(r,e)=>{const n=v(r);return n},g=(()=>{let r=0;return e=>{const n=v(e),a=r+=1;return t=>{var o;if(t.options.memoization===false)return n(t);const u=t.index,s=(o=t.cache)[a]||(o[a]=new Map),c=s.get(u);if(c===false)return false;if(W(c))return t.index=c,true;if(c)return t.index=c.index,c.output?.length&&t.output.push(...c.output),true;{const Z=t.output.length;if(n(t)){const D=t.index,U=t.output.length;if(U>Z){const ee=t.output.slice(Z,U);s.set(u,{index:D,output:ee});}else s.set(u,D);return true}else return s.set(u,false),false}}}})(),E=r=>{let e;return n=>(e||(e=v(r())),e(n))},v=Y(r=>{if(d(r))return Q(r)?E(r):r;if(b(r)||X(r))return i(r);if(A(r))return x(r);if(K(r))return l(Object.values(r));throw new Error(\"Invalid rule\")}),P=\"abcdefghijklmnopqrstuvwxyz\",ir=r=>{let e=\"\";for(;r>0;){const n=(r-1)%26;e=P[n]+e,r=Math.floor((r-1)/26);}return e},O=r=>{let e=0;for(let n=0,a=r.length;n<a;n++)e=e*26+P.indexOf(r[n])+1;return e},S=(r,e)=>{if(e<r)return S(e,r);const n=[];for(;r<=e;)n.push(r++);return n},or=(r,e,n)=>S(r,e).map(a=>String(a).padStart(n,\"0\")),R=(r,e)=>S(O(r),O(e)).map(ir),p=r=>r,z=r=>ur(e=>rr(e,r,{memoization:false}).join(\"\")),ur=r=>{const e={};return n=>e[n]??(e[n]=r(n))},sr=i(/^\\*\\*\\/\\*$/,\".*\"),cr=i(/^\\*\\*\\/(\\*)?([ a-zA-Z0-9._-]+)$/,(r,e,n)=>`.*${e?\"\":\"(?:^|/)\"}${n.replaceAll(\".\",\"\\\\.\")}`),lr=i(/^\\*\\*\\/(\\*)?([ a-zA-Z0-9._-]*)\\{([ a-zA-Z0-9._-]+(?:,[ a-zA-Z0-9._-]+)*)\\}$/,(r,e,n,a)=>`.*${e?\"\":\"(?:^|/)\"}${n.replaceAll(\".\",\"\\\\.\")}(?:${a.replaceAll(\",\",\"|\").replaceAll(\".\",\"\\\\.\")})`),y=i(/\\\\./,p),pr=i(/[$.*+?^(){}[\\]\\|]/,r=>`\\\\${r}`),vr=i(/./,p),hr=i(/^(?:!!)*!(.*)$/,(r,e)=>`(?!^${L(e)}$).*?`),dr=i(/^(!!)+/,\"\"),fr=l([hr,dr]),xr=i(/\\/(\\*\\*\\/)+/,\"(?:/.+/|/)\"),gr=i(/^(\\*\\*\\/)+/,\"(?:^|.*/)\"),mr=i(/\\/(\\*\\*)$/,\"(?:/.*|$)\"),_r=i(/\\*\\*/,\".*\"),j=l([xr,gr,mr,_r]),Sr=i(/\\*\\/(?!\\*\\*\\/)/,\"[^/]*/\"),yr=i(/\\*/,\"[^/]*\"),N=l([Sr,yr]),k=i(\"?\",\"[^/]\"),$r=i(\"[\",p),wr=i(\"]\",p),Ar=i(/[!^]/,\"^/\"),br=i(/[a-z]-[a-z]|[0-9]-[0-9]/i,p),Cr=i(/[$.*+?^(){}[\\|]/,r=>`\\\\${r}`),Mr=i(/[^\\]]/,p),Er=l([y,Cr,br,Mr]),B=x([$r,tr(Ar),f(Er),wr]),Pr=i(\"{\",\"(?:\"),Or=i(\"}\",\")\"),Rr=i(/(\\d+)\\.\\.(\\d+)/,(r,e,n)=>or(+e,+n,Math.min(e.length,n.length)).join(\"|\")),zr=i(/([a-z]+)\\.\\.([a-z]+)/,(r,e,n)=>R(e,n).join(\"|\")),jr=i(/([A-Z]+)\\.\\.([A-Z]+)/,(r,e,n)=>R(e.toLowerCase(),n.toLowerCase()).join(\"|\").toUpperCase()),Nr=l([Rr,zr,jr]),I=x([Pr,Nr,Or]),kr=i(\"{\",\"(?:\"),Br=i(\"}\",\")\"),Ir=i(\",\",\"|\"),Fr=i(/[$.*+?^(){[\\]\\|]/,r=>`\\\\${r}`),Lr=i(/[^}]/,p),Zr=E(()=>F),Dr=l([j,N,k,B,I,Zr,y,Fr,Ir,Lr]),F=x([kr,f(Dr),Br]),Ur=f(l([sr,cr,lr,fr,j,N,k,B,I,F,y,pr,vr])),Vr=Ur,Gr=z(Vr),L=Gr,Tr=i(/\\\\./,p),qr=i(/./,p),Hr=i(/\\*\\*\\*+/,\"*\"),Jr=i(/([^/{[(!])\\*\\*/,(r,e)=>`${e}*`),Qr=i(/(^|.)\\*\\*(?=[^*/)\\]}])/,(r,e)=>`${e}*`),Wr=f(l([Tr,Hr,Jr,Qr,qr])),Kr=Wr,Xr=z(Kr),Yr=Xr,$=(r,e)=>{const n=Array.isArray(r)?r:[r];if(!n.length)return false;const a=n.map($.compile),t=n.every(s=>/(\\/(?:\\*\\*)?|\\[\\/\\])$/.test(s)),o=e.replace(/[\\\\\\/]+/g,\"/\").replace(/\\/$/,t?\"/\":\"\");return a.some(s=>s.test(o))};$.compile=r=>new RegExp(`^${L(Yr(r))}$`,\"s\");var re=$;return J(w)})();\n return __lib__.default || __lib__; };\nlet _match;\nconst zeptomatch = (path, pattern) => {\n if (!_match) {\n _match = _lazyMatch();\n _lazyMatch = null;\n }\n return _match(path, pattern);\n};\n\nconst _DRIVE_LETTER_START_RE = /^[A-Za-z]:\\//;\nfunction normalizeWindowsPath(input = \"\") {\n if (!input) {\n return input;\n }\n return input.replace(/\\\\/g, \"/\").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());\n}\n\nconst _UNC_REGEX = /^[/\\\\]{2}/;\nconst _IS_ABSOLUTE_RE = /^[/\\\\](?![/\\\\])|^[/\\\\]{2}(?!\\.)|^[A-Za-z]:[/\\\\]/;\nconst _DRIVE_LETTER_RE = /^[A-Za-z]:$/;\nconst _ROOT_FOLDER_RE = /^\\/([A-Za-z]:)?$/;\nconst _EXTNAME_RE = /.(\\.[^./]+|\\.)$/;\nconst _PATH_ROOT_RE = /^[/\\\\]|^[a-zA-Z]:[/\\\\]/;\nconst sep = \"/\";\nconst normalize = function(path) {\n if (path.length === 0) {\n return \".\";\n }\n path = normalizeWindowsPath(path);\n const isUNCPath = path.match(_UNC_REGEX);\n const isPathAbsolute = isAbsolute(path);\n const trailingSeparator = path[path.length - 1] === \"/\";\n path = normalizeString(path, !isPathAbsolute);\n if (path.length === 0) {\n if (isPathAbsolute) {\n return \"/\";\n }\n return trailingSeparator ? \"./\" : \".\";\n }\n if (trailingSeparator) {\n path += \"/\";\n }\n if (_DRIVE_LETTER_RE.test(path)) {\n path += \"/\";\n }\n if (isUNCPath) {\n if (!isPathAbsolute) {\n return `//./${path}`;\n }\n return `//${path}`;\n }\n return isPathAbsolute && !isAbsolute(path) ? `/${path}` : path;\n};\nconst join = function(...segments) {\n let path = \"\";\n for (const seg of segments) {\n if (!seg) {\n continue;\n }\n if (path.length > 0) {\n const pathTrailing = path[path.length - 1] === \"/\";\n const segLeading = seg[0] === \"/\";\n const both = pathTrailing && segLeading;\n if (both) {\n path += seg.slice(1);\n } else {\n path += pathTrailing || segLeading ? seg : `/${seg}`;\n }\n } else {\n path += seg;\n }\n }\n return normalize(path);\n};\nfunction cwd() {\n if (typeof process !== \"undefined\" && typeof process.cwd === \"function\") {\n return process.cwd().replace(/\\\\/g, \"/\");\n }\n return \"/\";\n}\nconst resolve = function(...arguments_) {\n arguments_ = arguments_.map((argument) => normalizeWindowsPath(argument));\n let resolvedPath = \"\";\n let resolvedAbsolute = false;\n for (let index = arguments_.length - 1; index >= -1 && !resolvedAbsolute; index--) {\n const path = index >= 0 ? arguments_[index] : cwd();\n if (!path || path.length === 0) {\n continue;\n }\n resolvedPath = `${path}/${resolvedPath}`;\n resolvedAbsolute = isAbsolute(path);\n }\n resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute);\n if (resolvedAbsolute && !isAbsolute(resolvedPath)) {\n return `/${resolvedPath}`;\n }\n return resolvedPath.length > 0 ? resolvedPath : \".\";\n};\nfunction normalizeString(path, allowAboveRoot) {\n let res = \"\";\n let lastSegmentLength = 0;\n let lastSlash = -1;\n let dots = 0;\n let char = null;\n for (let index = 0; index <= path.length; ++index) {\n if (index < path.length) {\n char = path[index];\n } else if (char === \"/\") {\n break;\n } else {\n char = \"/\";\n }\n if (char === \"/\") {\n if (lastSlash === index - 1 || dots === 1) ; else if (dots === 2) {\n if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== \".\" || res[res.length - 2] !== \".\") {\n if (res.length > 2) {\n const lastSlashIndex = res.lastIndexOf(\"/\");\n if (lastSlashIndex === -1) {\n res = \"\";\n lastSegmentLength = 0;\n } else {\n res = res.slice(0, lastSlashIndex);\n lastSegmentLength = res.length - 1 - res.lastIndexOf(\"/\");\n }\n lastSlash = index;\n dots = 0;\n continue;\n } else if (res.length > 0) {\n res = \"\";\n lastSegmentLength = 0;\n lastSlash = index;\n dots = 0;\n continue;\n }\n }\n if (allowAboveRoot) {\n res += res.length > 0 ? \"/..\" : \"..\";\n lastSegmentLength = 2;\n }\n } else {\n if (res.length > 0) {\n res += `/${path.slice(lastSlash + 1, index)}`;\n } else {\n res = path.slice(lastSlash + 1, index);\n }\n lastSegmentLength = index - lastSlash - 1;\n }\n lastSlash = index;\n dots = 0;\n } else if (char === \".\" && dots !== -1) {\n ++dots;\n } else {\n dots = -1;\n }\n }\n return res;\n}\nconst isAbsolute = function(p) {\n return _IS_ABSOLUTE_RE.test(p);\n};\nconst toNamespacedPath = function(p) {\n return normalizeWindowsPath(p);\n};\nconst extname = function(p) {\n if (p === \"..\") return \"\";\n const match = _EXTNAME_RE.exec(normalizeWindowsPath(p));\n return match && match[1] || \"\";\n};\nconst relative = function(from, to) {\n const _from = resolve(from).replace(_ROOT_FOLDER_RE, \"$1\").split(\"/\");\n const _to = resolve(to).replace(_ROOT_FOLDER_RE, \"$1\").split(\"/\");\n if (_to[0][1] === \":\" && _from[0][1] === \":\" && _from[0] !== _to[0]) {\n return _to.join(\"/\");\n }\n const _fromCopy = [..._from];\n for (const segment of _fromCopy) {\n if (_to[0] !== segment) {\n break;\n }\n _from.shift();\n _to.shift();\n }\n return [..._from.map(() => \"..\"), ..._to].join(\"/\");\n};\nconst dirname = function(p) {\n const segments = normalizeWindowsPath(p).replace(/\\/$/, \"\").split(\"/\").slice(0, -1);\n if (segments.length === 1 && _DRIVE_LETTER_RE.test(segments[0])) {\n segments[0] += \"/\";\n }\n return segments.join(\"/\") || (isAbsolute(p) ? \"/\" : \".\");\n};\nconst format = function(p) {\n const ext = p.ext ? p.ext.startsWith(\".\") ? p.ext : `.${p.ext}` : \"\";\n const segments = [p.root, p.dir, p.base ?? (p.name ?? \"\") + ext].filter(\n Boolean\n );\n return normalizeWindowsPath(\n p.root ? resolve(...segments) : segments.join(\"/\")\n );\n};\nconst basename = function(p, extension) {\n const segments = normalizeWindowsPath(p).split(\"/\");\n let lastSegment = \"\";\n for (let i = segments.length - 1; i >= 0; i--) {\n const val = segments[i];\n if (val) {\n lastSegment = val;\n break;\n }\n }\n return extension && lastSegment.endsWith(extension) ? lastSegment.slice(0, -extension.length) : lastSegment;\n};\nconst parse = function(p) {\n const root = _PATH_ROOT_RE.exec(p)?.[0]?.replace(/\\\\/g, \"/\") || \"\";\n const base = basename(p);\n const extension = extname(base);\n return {\n root,\n dir: dirname(p),\n base,\n ext: extension,\n name: base.slice(0, base.length - extension.length)\n };\n};\nconst matchesGlob = (path, pattern) => {\n return zeptomatch(pattern, normalize(path));\n};\n\nconst _path = {\n __proto__: null,\n basename: basename,\n dirname: dirname,\n extname: extname,\n format: format,\n isAbsolute: isAbsolute,\n join: join,\n matchesGlob: matchesGlob,\n normalize: normalize,\n normalizeString: normalizeString,\n parse: parse,\n relative: relative,\n resolve: resolve,\n sep: sep,\n toNamespacedPath: toNamespacedPath\n};\n\nexport { _path as _, normalizeString as a, relative as b, basename as c, dirname as d, extname as e, format as f, normalizeWindowsPath as g, isAbsolute as i, join as j, matchesGlob as m, normalize as n, parse as p, resolve as r, sep as s, toNamespacedPath as t };\n","const RE_ABSOLUTE_ASSET_ATTR = /\\s(href|src)=\"\\//g;\nconst RE_IMPORTMAP_ENTRY = /(\"#entry\"\\s*:\\s*\")\\/_nuxt\\//g;\n\nexport function rewriteStaticHtmlWithBase(\n content: string,\n baseURL: string\n): string {\n if (baseURL === \"/\") return content;\n\n return content\n .replaceAll(RE_ABSOLUTE_ASSET_ATTR, ` $1=\"${baseURL}`)\n .replaceAll('baseURL:\"/\"', `baseURL:\"${baseURL}\"`)\n .replaceAll(RE_IMPORTMAP_ENTRY, `$1${baseURL}_nuxt/`);\n}\n","import c from \"ansis\";\n\nexport const stylelintConfigFilenames: readonly string[] = [\n \"stylelint.config.js\",\n \"stylelint.config.mjs\",\n \"stylelint.config.cjs\",\n \"stylelint.config.ts\",\n \"stylelint.config.mts\",\n \"stylelint.config.cts\",\n];\n\nexport const stylelintLegacyConfigFilenames: readonly string[] = [\n \".stylelintrc\",\n \".stylelintrc.js\",\n \".stylelintrc.mjs\",\n \".stylelintrc.cjs\",\n \".stylelintrc.yaml\",\n \".stylelintrc.yml\",\n \".stylelintrc.json\",\n];\n\nexport const configFilenames: readonly string[] = stylelintConfigFilenames;\nexport const legacyConfigFilenames: readonly string[] =\n stylelintLegacyConfigFilenames;\nexport const DEFAULT_TARGET_FILE = \"stylelint-inspector-target.css\";\n\nexport const MARK_CHECK: string = c.green(\"✔\");\nexport const MARK_INFO: string = c.blue(\"ℹ\");\nexport const MARK_ERROR: string = c.red(\"✖\");\n","import process from \"node:process\";\nimport { DEFAULT_TARGET_FILE } from \"./constants\";\n\nexport interface CliInspectorOptions {\n basePath?: string;\n config?: string;\n file?: string;\n target?: string;\n}\n\nfunction getEnvValue(primary: string, legacy: string): string | undefined {\n return process.env[primary] || process.env[legacy];\n}\n\n/**\n * Normalizes CLI options so explicit flags win over env vars, `--file` works as\n * a true alias for `--target`, and the inspector keeps a stable default target\n * when neither is supplied.\n */\nexport function normalizeCliInspectorOptions<T extends CliInspectorOptions>(\n options: T\n): T & Required<Pick<CliInspectorOptions, \"target\">> {\n return {\n ...options,\n config:\n options.config ?? getEnvValue(\"STYLELINT_CONFIG\", \"ESLINT_CONFIG\"),\n basePath:\n options.basePath ??\n getEnvValue(\"STYLELINT_BASE_PATH\", \"ESLINT_BASE_PATH\"),\n target:\n options.target ??\n options.file ??\n getEnvValue(\"STYLELINT_TARGET\", \"ESLINT_TARGET\") ??\n DEFAULT_TARGET_FILE,\n };\n}\n","/*\nHow it works:\n`this.#head` is an instance of `Node` which keeps track of its current value and nests another instance of `Node` that keeps the value that comes after it. When a value is provided to `.enqueue()`, the code needs to iterate through `this.#head`, going deeper and deeper to find the last value. However, iterating through every single item is slow. This problem is solved by saving a reference to the last value as `this.#tail` so that it can reference it to add a new value.\n*/\n\nclass Node {\n\tvalue;\n\tnext;\n\n\tconstructor(value) {\n\t\tthis.value = value;\n\t}\n}\n\nexport default class Queue {\n\t#head;\n\t#tail;\n\t#size;\n\n\tconstructor() {\n\t\tthis.clear();\n\t}\n\n\tenqueue(value) {\n\t\tconst node = new Node(value);\n\n\t\tif (this.#head) {\n\t\t\tthis.#tail.next = node;\n\t\t\tthis.#tail = node;\n\t\t} else {\n\t\t\tthis.#head = node;\n\t\t\tthis.#tail = node;\n\t\t}\n\n\t\tthis.#size++;\n\t}\n\n\tdequeue() {\n\t\tconst current = this.#head;\n\t\tif (!current) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.#head = this.#head.next;\n\t\tthis.#size--;\n\n\t\t// Clean up tail reference when queue becomes empty\n\t\tif (!this.#head) {\n\t\t\tthis.#tail = undefined;\n\t\t}\n\n\t\treturn current.value;\n\t}\n\n\tpeek() {\n\t\tif (!this.#head) {\n\t\t\treturn;\n\t\t}\n\n\t\treturn this.#head.value;\n\n\t\t// TODO: Node.js 18.\n\t\t// return this.#head?.value;\n\t}\n\n\tclear() {\n\t\tthis.#head = undefined;\n\t\tthis.#tail = undefined;\n\t\tthis.#size = 0;\n\t}\n\n\tget size() {\n\t\treturn this.#size;\n\t}\n\n\t* [Symbol.iterator]() {\n\t\tlet current = this.#head;\n\n\t\twhile (current) {\n\t\t\tyield current.value;\n\t\t\tcurrent = current.next;\n\t\t}\n\t}\n\n\t* drain() {\n\t\twhile (this.#head) {\n\t\t\tyield this.dequeue();\n\t\t}\n\t}\n}\n","import Queue from 'yocto-queue';\n\nexport default function pLimit(concurrency) {\n\tif (!((Number.isInteger(concurrency) || concurrency === Number.POSITIVE_INFINITY) && concurrency > 0)) {\n\t\tthrow new TypeError('Expected `concurrency` to be a number from 1 and up');\n\t}\n\n\tconst queue = new Queue();\n\tlet activeCount = 0;\n\n\tconst next = () => {\n\t\tactiveCount--;\n\n\t\tif (queue.size > 0) {\n\t\t\tqueue.dequeue()();\n\t\t}\n\t};\n\n\tconst run = async (fn, resolve, args) => {\n\t\tactiveCount++;\n\n\t\tconst result = (async () => fn(...args))();\n\n\t\tresolve(result);\n\n\t\ttry {\n\t\t\tawait result;\n\t\t} catch {}\n\n\t\tnext();\n\t};\n\n\tconst enqueue = (fn, resolve, args) => {\n\t\tqueue.enqueue(run.bind(undefined, fn, resolve, args));\n\n\t\t(async () => {\n\t\t\t// This function needs to wait until the next microtask before comparing\n\t\t\t// `activeCount` to `concurrency`, because `activeCount` is updated asynchronously\n\t\t\t// when the run function is dequeued and called. The comparison in the if-statement\n\t\t\t// needs to happen asynchronously as well to get an up-to-date value for `activeCount`.\n\t\t\tawait Promise.resolve();\n\n\t\t\tif (activeCount < concurrency && queue.size > 0) {\n\t\t\t\tqueue.dequeue()();\n\t\t\t}\n\t\t})();\n\t};\n\n\tconst generator = (fn, ...args) => new Promise(resolve => {\n\t\tenqueue(fn, resolve, args);\n\t});\n\n\tObject.defineProperties(generator, {\n\t\tactiveCount: {\n\t\t\tget: () => activeCount,\n\t\t},\n\t\tpendingCount: {\n\t\t\tget: () => queue.size,\n\t\t},\n\t\tclearQueue: {\n\t\t\tvalue: () => {\n\t\t\t\tqueue.clear();\n\t\t\t},\n\t\t},\n\t});\n\n\treturn generator;\n}\n","import pLimit from 'p-limit';\n\nclass EndError extends Error {\n\tconstructor(value) {\n\t\tsuper();\n\t\tthis.value = value;\n\t}\n}\n\n// The input can also be a promise, so we await it.\nconst testElement = async (element, tester) => tester(await element);\n\n// The input can also be a promise, so we `Promise.all()` them both.\nconst finder = async element => {\n\tconst values = await Promise.all(element);\n\tif (values[1] === true) {\n\t\tthrow new EndError(values[0]);\n\t}\n\n\treturn false;\n};\n\nexport default async function pLocate(\n\titerable,\n\ttester,\n\t{\n\t\tconcurrency = Number.POSITIVE_INFINITY,\n\t\tpreserveOrder = true,\n\t} = {},\n) {\n\tconst limit = pLimit(concurrency);\n\n\t// Start all the promises concurrently with optional limit.\n\tconst items = [...iterable].map(element => [element, limit(testElement, element, tester)]);\n\n\t// Check the promises either serially or concurrently.\n\tconst checkLimit = pLimit(preserveOrder ? 1 : Number.POSITIVE_INFINITY);\n\n\ttry {\n\t\tawait Promise.all(items.map(element => checkLimit(finder, element)));\n\t} catch (error) {\n\t\tif (error instanceof EndError) {\n\t\t\treturn error.value;\n\t\t}\n\n\t\tthrow error;\n\t}\n}\n","import process from 'node:process';\nimport path from 'node:path';\nimport fs, {promises as fsPromises} from 'node:fs';\nimport {fileURLToPath} from 'node:url';\nimport pLocate from 'p-locate';\n\nconst typeMappings = {\n\tdirectory: 'isDirectory',\n\tfile: 'isFile',\n};\n\nfunction checkType(type) {\n\tif (type === 'both' || Object.hasOwn(typeMappings, type)) {\n\t\treturn;\n\t}\n\n\tthrow new Error(`Invalid type specified: ${type}`);\n}\n\nconst matchType = (type, stat) => type === 'both' ? (stat.isFile() || stat.isDirectory()) : stat[typeMappings[type]]();\n\nconst toPath = urlOrPath => urlOrPath instanceof URL ? fileURLToPath(urlOrPath) : urlOrPath;\n\nexport async function locatePath(\n\tpaths,\n\t{\n\t\tcwd = process.cwd(),\n\t\ttype = 'file',\n\t\tallowSymlinks = true,\n\t\tconcurrency,\n\t\tpreserveOrder,\n\t} = {},\n) {\n\tcheckType(type);\n\tcwd = toPath(cwd);\n\n\tconst statFunction = allowSymlinks ? fsPromises.stat : fsPromises.lstat;\n\n\treturn pLocate(paths, async path_ => {\n\t\ttry {\n\t\t\tconst stat = await statFunction(path.resolve(cwd, path_));\n\t\t\treturn matchType(type, stat);\n\t\t} catch {\n\t\t\treturn false;\n\t\t}\n\t}, {concurrency, preserveOrder});\n}\n\nexport function locatePathSync(\n\tpaths,\n\t{\n\t\tcwd = process.cwd(),\n\t\ttype = 'file',\n\t\tallowSymlinks = true,\n\t} = {},\n) {\n\tcheckType(type);\n\tcwd = toPath(cwd);\n\n\tconst statFunction = allowSymlinks ? fs.statSync : fs.lstatSync;\n\n\tfor (const path_ of paths) {\n\t\ttry {\n\t\t\tconst stat = statFunction(path.resolve(cwd, path_), {\n\t\t\t\tthrowIfNoEntry: false,\n\t\t\t});\n\n\t\t\tif (!stat) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (matchType(type, stat)) {\n\t\t\t\treturn path_;\n\t\t\t}\n\t\t} catch {}\n\t}\n}\n","import {promisify} from 'node:util';\nimport {execFile as execFileCallback, execFileSync as execFileSyncOriginal} from 'node:child_process';\nimport path from 'node:path';\nimport {fileURLToPath} from 'node:url';\n\nconst execFileOriginal = promisify(execFileCallback);\n\nexport function toPath(urlOrPath) {\n\treturn urlOrPath instanceof URL ? fileURLToPath(urlOrPath) : urlOrPath;\n}\n\nexport function rootDirectory(pathInput) {\n\treturn path.parse(toPath(pathInput)).root;\n}\n\nexport function traversePathUp(startPath) {\n\treturn {\n\t\t* [Symbol.iterator]() {\n\t\t\tlet currentPath = path.resolve(toPath(startPath));\n\t\t\tlet previousPath;\n\n\t\t\twhile (previousPath !== currentPath) {\n\t\t\t\tyield currentPath;\n\t\t\t\tpreviousPath = currentPath;\n\t\t\t\tcurrentPath = path.resolve(currentPath, '..');\n\t\t\t}\n\t\t},\n\t};\n}\n\nconst TEN_MEGABYTES_IN_BYTES = 10 * 1024 * 1024;\n\nexport async function execFile(file, arguments_, options = {}) {\n\treturn execFileOriginal(file, arguments_, {\n\t\tmaxBuffer: TEN_MEGABYTES_IN_BYTES,\n\t\t...options,\n\t});\n}\n\nexport function execFileSync(file, arguments_ = [], options = {}) {\n\treturn execFileSyncOriginal(file, arguments_, {\n\t\tmaxBuffer: TEN_MEGABYTES_IN_BYTES,\n\t\tencoding: 'utf8',\n\t\tstdio: 'pipe',\n\t\t...options,\n\t});\n}\n\nexport * from './default.js';\n","import path from 'node:path';\nimport fs from 'node:fs';\nimport {locatePath, locatePathSync} from 'locate-path';\nimport {toPath} from 'unicorn-magic';\n\nexport const findUpStop = Symbol('findUpStop');\n\nexport async function findUpMultiple(name, options = {}) {\n\tlet directory = path.resolve(toPath(options.cwd) ?? '');\n\tconst {root} = path.parse(directory);\n\tconst stopAt = path.resolve(directory, toPath(options.stopAt) ?? root);\n\tconst limit = options.limit ?? Number.POSITIVE_INFINITY;\n\tconst paths = [name].flat();\n\n\tconst runMatcher = async locateOptions => {\n\t\tif (typeof name !== 'function') {\n\t\t\treturn locatePath(paths, locateOptions);\n\t\t}\n\n\t\tconst foundPath = await name(locateOptions.cwd);\n\t\tif (typeof foundPath === 'string') {\n\t\t\treturn locatePath([foundPath], locateOptions);\n\t\t}\n\n\t\treturn foundPath;\n\t};\n\n\tconst matches = [];\n\twhile (true) {\n\t\t// eslint-disable-next-line no-await-in-loop\n\t\tconst foundPath = await runMatcher({...options, cwd: directory});\n\n\t\tif (foundPath === findUpStop) {\n\t\t\tbreak;\n\t\t}\n\n\t\tif (foundPath) {\n\t\t\tmatches.push(path.resolve(directory, foundPath));\n\t\t}\n\n\t\tif (directory === stopAt || matches.length >= limit) {\n\t\t\tbreak;\n\t\t}\n\n\t\tdirectory = path.dirname(directory);\n\t}\n\n\treturn matches;\n}\n\nexport function findUpMultipleSync(name, options = {}) {\n\tlet directory = path.resolve(toPath(options.cwd) ?? '');\n\tconst {root} = path.parse(directory);\n\tconst stopAt = path.resolve(directory, toPath(options.stopAt) ?? root);\n\tconst limit = options.limit ?? Number.POSITIVE_INFINITY;\n\tconst paths = [name].flat();\n\n\tconst runMatcher = locateOptions => {\n\t\tif (typeof name !== 'function') {\n\t\t\treturn locatePathSync(paths, locateOptions);\n\t\t}\n\n\t\tconst foundPath = name(locateOptions.cwd);\n\t\tif (typeof foundPath === 'string') {\n\t\t\treturn locatePathSync([foundPath], locateOptions);\n\t\t}\n\n\t\treturn foundPath;\n\t};\n\n\tconst matches = [];\n\twhile (true) {\n\t\tconst foundPath = runMatcher({...options, cwd: directory});\n\n\t\tif (foundPath === findUpStop) {\n\t\t\tbreak;\n\t\t}\n\n\t\tif (foundPath) {\n\t\t\tmatches.push(path.resolve(directory, foundPath));\n\t\t}\n\n\t\tif (directory === stopAt || matches.length >= limit) {\n\t\t\tbreak;\n\t\t}\n\n\t\tdirectory = path.dirname(directory);\n\t}\n\n\treturn matches;\n}\n\nexport async function findUp(name, options = {}) {\n\tconst matches = await findUpMultiple(name, {...options, limit: 1});\n\treturn matches[0];\n}\n\nexport function findUpSync(name, options = {}) {\n\tconst matches = findUpMultipleSync(name, {...options, limit: 1});\n\treturn matches[0];\n}\n\nasync function findDownDepthFirst(directory, paths, maxDepth, locateOptions, currentDepth = 0) {\n\tconst found = await locatePath(paths, {cwd: directory, ...locateOptions});\n\tif (found) {\n\t\treturn path.resolve(directory, found);\n\t}\n\n\tif (currentDepth >= maxDepth) {\n\t\treturn undefined;\n\t}\n\n\ttry {\n\t\tconst entries = await fs.promises.readdir(directory, {withFileTypes: true});\n\t\tfor (const entry of entries) {\n\t\t\tif (entry.isDirectory()) {\n\t\t\t\t// eslint-disable-next-line no-await-in-loop\n\t\t\t\tconst result = await findDownDepthFirst(\n\t\t\t\t\tpath.join(directory, entry.name),\n\t\t\t\t\tpaths,\n\t\t\t\t\tmaxDepth,\n\t\t\t\t\tlocateOptions,\n\t\t\t\t\tcurrentDepth + 1,\n\t\t\t\t);\n\t\t\t\tif (result) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} catch {}\n\n\treturn undefined;\n}\n\nfunction findDownDepthFirstSync(directory, paths, maxDepth, locateOptions, currentDepth = 0) {\n\tconst found = locatePathSync(paths, {cwd: directory, ...locateOptions});\n\tif (found) {\n\t\treturn path.resolve(directory, found);\n\t}\n\n\tif (currentDepth >= maxDepth) {\n\t\treturn undefined;\n\t}\n\n\ttry {\n\t\tconst entries = fs.readdirSync(directory, {withFileTypes: true});\n\t\tfor (const entry of entries) {\n\t\t\tif (entry.isDirectory()) {\n\t\t\t\tconst result = findDownDepthFirstSync(\n\t\t\t\t\tpath.join(directory, entry.name),\n\t\t\t\t\tpaths,\n\t\t\t\t\tmaxDepth,\n\t\t\t\t\tlocateOptions,\n\t\t\t\t\tcurrentDepth + 1,\n\t\t\t\t);\n\t\t\t\tif (result) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} catch {}\n\n\treturn undefined;\n}\n\nfunction prepareFindDownOptions(name, options) {\n\tconst startDirectory = path.resolve(toPath(options.cwd) ?? '');\n\tconst maxDepth = Math.max(0, options.depth ?? 1);\n\tconst paths = [name].flat();\n\tconst {type = 'file', allowSymlinks = true, strategy = 'breadth'} = options;\n\tconst locateOptions = {type, allowSymlinks};\n\treturn {\n\t\tstartDirectory,\n\t\tmaxDepth,\n\t\tpaths,\n\t\tlocateOptions,\n\t\tstrategy,\n\t};\n}\n\nasync function findDownBreadthFirst(startDirectory, paths, maxDepth, locateOptions) {\n\tconst queue = [{directory: startDirectory, depth: 0}];\n\n\twhile (queue.length > 0) {\n\t\tconst {directory, depth} = queue.shift();\n\n\t\t// eslint-disable-next-line no-await-in-loop\n\t\tconst found = await locatePath(paths, {cwd: directory, ...locateOptions});\n\t\tif (found) {\n\t\t\treturn path.resolve(directory, found);\n\t\t}\n\n\t\tif (depth >= maxDepth) {\n\t\t\tcontinue;\n\t\t}\n\n\t\ttry {\n\t\t\t// eslint-disable-next-line no-await-in-loop\n\t\t\tconst entries = await fs.promises.readdir(directory, {withFileTypes: true});\n\t\t\tfor (const entry of entries) {\n\t\t\t\tif (entry.isDirectory()) {\n\t\t\t\t\tqueue.push({directory: path.join(directory, entry.name), depth: depth + 1});\n\t\t\t\t}\n\t\t\t}\n\t\t} catch {}\n\t}\n\n\treturn undefined;\n}\n\nfunction findDownBreadthFirstSync(startDirectory, paths, maxDepth, locateOptions) {\n\tconst queue = [{directory: startDirectory, depth: 0}];\n\n\twhile (queue.length > 0) {\n\t\tconst {directory, depth} = queue.shift();\n\n\t\tconst found = locatePathSync(paths, {cwd: directory, ...locateOptions});\n\t\tif (found) {\n\t\t\treturn path.resolve(directory, found);\n\t\t}\n\n\t\tif (depth >= maxDepth) {\n\t\t\tcontinue;\n\t\t}\n\n\t\ttry {\n\t\t\tconst entries = fs.readdirSync(directory, {withFileTypes: true});\n\t\t\tfor (const entry of entries) {\n\t\t\t\tif (entry.isDirectory()) {\n\t\t\t\t\tqueue.push({directory: path.join(directory, entry.name), depth: depth + 1});\n\t\t\t\t}\n\t\t\t}\n\t\t} catch {}\n\t}\n\n\treturn undefined;\n}\n\nexport async function findDown(name, options = {}) {\n\tconst {startDirectory, maxDepth, paths, locateOptions, strategy} = prepareFindDownOptions(name, options);\n\n\treturn strategy === 'depth'\n\t\t? findDownDepthFirst(startDirectory, paths, maxDepth, locateOptions)\n\t\t: findDownBreadthFirst(startDirectory, paths, maxDepth, locateOptions);\n}\n\nexport function findDownSync(name, options = {}) {\n\tconst {startDirectory, maxDepth, paths, locateOptions, strategy} = prepareFindDownOptions(name, options);\n\n\treturn strategy === 'depth'\n\t\t? findDownDepthFirstSync(startDirectory, paths, maxDepth, locateOptions)\n\t\t: findDownBreadthFirstSync(startDirectory, paths, maxDepth, locateOptions);\n}\n\n","// @ts-nocheck\n// Copyright 2018-2025 the Deno authors. MIT license.\n// Copyright the Browserify authors. MIT License.\nfunction assertPath(path) {\n if (typeof path !== \"string\") {\n throw new TypeError(`Path must be a string, received \"${JSON.stringify(path)}\"`);\n }\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\nfunction stripSuffix(name, suffix) {\n if (suffix.length >= name.length) {\n return name;\n }\n const lenDiff = name.length - suffix.length;\n for(let i = suffix.length - 1; i >= 0; --i){\n if (name.charCodeAt(lenDiff + i) !== suffix.charCodeAt(i)) {\n return name;\n }\n }\n return name.slice(0, -suffix.length);\n}\nfunction lastPathSegment(path, isSep, start = 0) {\n let matchedNonSeparator = false;\n let end = path.length;\n for(let i = path.length - 1; i >= start; --i){\n if (isSep(path.charCodeAt(i))) {\n if (matchedNonSeparator) {\n start = i + 1;\n break;\n }\n } else if (!matchedNonSeparator) {\n matchedNonSeparator = true;\n end = i + 1;\n }\n }\n return path.slice(start, end);\n}\nfunction assertArgs$1(path, suffix) {\n assertPath(path);\n if (path.length === 0) return path;\n if (typeof suffix !== \"string\") {\n throw new TypeError(`Suffix must be a string, received \"${JSON.stringify(suffix)}\"`);\n }\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\nfunction assertArg$3(url) {\n url = url instanceof URL ? url : new URL(url);\n if (url.protocol !== \"file:\") {\n throw new TypeError(`URL must be a file URL: received \"${url.protocol}\"`);\n }\n return url;\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\n/**\n * Converts a file URL to a path string.\n *\n * @example Usage\n * ```ts\n * import { fromFileUrl } from \"@std/path/posix/from-file-url\";\n * import { assertEquals } from \"@std/assert\";\n *\n * assertEquals(fromFileUrl(new URL(\"file:///home/foo\")), \"/home/foo\");\n * ```\n *\n * @param url The file URL to convert.\n * @returns The path string.\n */ function fromFileUrl(url) {\n url = assertArg$3(url);\n return decodeURIComponent(url.pathname.replace(/%(?![0-9A-Fa-f]{2})/g, \"%25\"));\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// Copyright the Browserify authors. MIT License.\n// Ported from https://github.com/browserify/path-browserify/\n// This module is browser compatible.\nfunction stripTrailingSeparators(segment, isSep) {\n if (segment.length <= 1) {\n return segment;\n }\n let end = segment.length;\n for(let i = segment.length - 1; i > 0; i--){\n if (isSep(segment.charCodeAt(i))) {\n end = i;\n } else {\n break;\n }\n }\n return segment.slice(0, end);\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// Copyright the Browserify authors. MIT License.\n// Ported from https://github.com/browserify/path-browserify/\n// This module is browser compatible.\n// Alphabet chars.\n// Non-alphabetic chars.\nconst CHAR_DOT = 46; /* . */ \nconst CHAR_FORWARD_SLASH = 47; /* / */\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// Copyright the Browserify authors. MIT License.\n// Ported from https://github.com/browserify/path-browserify/\n// This module is browser compatible.\nfunction isPosixPathSeparator(code) {\n return code === CHAR_FORWARD_SLASH;\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\n/**\n * Return the last portion of a `path`.\n * Trailing directory separators are ignored, and optional suffix is removed.\n *\n * @example Usage\n * ```ts\n * import { basename } from \"@std/path/posix/basename\";\n * import { assertEquals } from \"@std/assert\";\n *\n * assertEquals(basename(\"/home/user/Documents/\"), \"Documents\");\n * assertEquals(basename(\"/home/user/Documents/image.png\"), \"image.png\");\n * assertEquals(basename(\"/home/user/Documents/image.png\", \".png\"), \"image\");\n * assertEquals(basename(new URL(\"file:///home/user/Documents/image.png\")), \"image.png\");\n * assertEquals(basename(new URL(\"file:///home/user/Documents/image.png\"), \".png\"), \"image\");\n * ```\n *\n * @example Working with URLs\n *\n * Note: This function doesn't automatically strip hash and query parts from\n * URLs. If your URL contains a hash or query, remove them before passing the\n * URL to the function. This can be done by passing the URL to `new URL(url)`,\n * and setting the `hash` and `search` properties to empty strings.\n *\n * ```ts\n * import { basename } from \"@std/path/posix/basename\";\n * import { assertEquals } from \"@std/assert\";\n *\n * assertEquals(basename(\"https://deno.land/std/path/mod.ts\"), \"mod.ts\");\n * assertEquals(basename(\"https://deno.land/std/path/mod.ts\", \".ts\"), \"mod\");\n * assertEquals(basename(\"https://deno.land/std/path/mod.ts?a=b\"), \"mod.ts?a=b\");\n * assertEquals(basename(\"https://deno.land/std/path/mod.ts#header\"), \"mod.ts#header\");\n * ```\n *\n * @param path The path to extract the name from.\n * @param suffix The suffix to remove from extracted name.\n * @returns The extracted name.\n */ function basename(path, suffix = \"\") {\n if (path instanceof URL) {\n path = fromFileUrl(path);\n }\n assertArgs$1(path, suffix);\n const lastSegment = lastPathSegment(path, isPosixPathSeparator);\n const strippedSegment = stripTrailingSeparators(lastSegment, isPosixPathSeparator);\n return suffix ? stripSuffix(strippedSegment, suffix) : strippedSegment;\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\n/**\n * The character used to separate entries in the PATH environment variable.\n */ const DELIMITER = \":\";\n/**\n * The character used to separate components of a file path.\n */ const SEPARATOR = \"/\";\n/**\n * A regular expression that matches one or more path separators.\n */ const SEPARATOR_PATTERN = /\\/+/;\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\nfunction assertArg$2(path) {\n assertPath(path);\n if (path.length === 0) return \".\";\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\n/**\n * Return the directory path of a `path`.\n *\n * @example Usage\n * ```ts\n * import { dirname } from \"@std/path/posix/dirname\";\n * import { assertEquals } from \"@std/assert\";\n *\n * assertEquals(dirname(\"/home/user/Documents/\"), \"/home/user\");\n * assertEquals(dirname(\"/home/user/Documents/image.png\"), \"/home/user/Documents\");\n * assertEquals(dirname(\"https://deno.land/std/path/mod.ts\"), \"https://deno.land/std/path\");\n * assertEquals(dirname(new URL(\"file:///home/user/Documents/image.png\")), \"/home/user/Documents\");\n * ```\n *\n * @example Working with URLs\n *\n * ```ts\n * import { dirname } from \"@std/path/posix/dirname\";\n * import { assertEquals } from \"@std/assert\";\n *\n * assertEquals(dirname(\"https://deno.land/std/path/mod.ts\"), \"https://deno.land/std/path\");\n * assertEquals(dirname(\"https://deno.land/std/path/mod.ts?a=b\"), \"https://deno.land/std/path\");\n * assertEquals(dirname(\"https://deno.land/std/path/mod.ts#header\"), \"https://deno.land/std/path\");\n * ```\n *\n * @param path The path to get the directory from.\n * @returns The directory path.\n */ function dirname(path) {\n if (path instanceof URL) {\n path = fromFileUrl(path);\n }\n assertArg$2(path);\n let end = -1;\n let matchedNonSeparator = false;\n for(let i = path.length - 1; i >= 1; --i){\n if (isPosixPathSeparator(path.charCodeAt(i))) {\n if (matchedNonSeparator) {\n end = i;\n break;\n }\n } else {\n matchedNonSeparator = true;\n }\n }\n // No matches. Fallback based on provided path:\n //\n // - leading slashes paths\n // \"/foo\" => \"/\"\n // \"///foo\" => \"/\"\n // - no slash path\n // \"foo\" => \".\"\n if (end === -1) {\n return isPosixPathSeparator(path.charCodeAt(0)) ? \"/\" : \".\";\n }\n return stripTrailingSeparators(path.slice(0, end), isPosixPathSeparator);\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\n/**\n * Return the extension of the `path` with leading period.\n *\n * @example Usage\n * ```ts\n * import { extname } from \"@std/path/posix/extname\";\n * import { assertEquals } from \"@std/assert\";\n *\n * assertEquals(extname(\"/home/user/Documents/file.ts\"), \".ts\");\n * assertEquals(extname(\"/home/user/Documents/\"), \"\");\n * assertEquals(extname(\"/home/user/Documents/image.png\"), \".png\");\n * assertEquals(extname(new URL(\"file:///home/user/Documents/file.ts\")), \".ts\");\n * assertEquals(extname(new URL(\"file:///home/user/Documents/file.ts?a=b\")), \".ts\");\n * assertEquals(extname(new URL(\"file:///home/user/Documents/file.ts#header\")), \".ts\");\n * ```\n *\n * @example Working with URLs\n *\n * Note: This function doesn't automatically strip hash and query parts from\n * URLs. If your URL contains a hash or query, remove them before passing the\n * URL to the function. This can be done by passing the URL to `new URL(url)`,\n * and setting the `hash` and `search` properties to empty strings.\n *\n * ```ts\n * import { extname } from \"@std/path/posix/extname\";\n * import { assertEquals } from \"@std/assert\";\n *\n * assertEquals(extname(\"https://deno.land/std/path/mod.ts\"), \".ts\");\n * assertEquals(extname(\"https://deno.land/std/path/mod.ts?a=b\"), \".ts?a=b\");\n * assertEquals(extname(\"https://deno.land/std/path/mod.ts#header\"), \".ts#header\");\n * ```\n *\n * @param path The path to get the extension from.\n * @returns The extension (ex. for `file.ts` returns `.ts`).\n */ function extname(path) {\n if (path instanceof URL) {\n path = fromFileUrl(path);\n }\n assertPath(path);\n let startDot = -1;\n let startPart = 0;\n let end = -1;\n let matchedSlash = true;\n // Track the state of characters (if any) we see before our first dot and\n // after any path separator we find\n let preDotState = 0;\n for(let i = path.length - 1; i >= 0; --i){\n const code = path.charCodeAt(i);\n if (isPosixPathSeparator(code)) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n startPart = i + 1;\n break;\n }\n continue;\n }\n if (end === -1) {\n // We saw the first non-path separator, mark this as the end of our\n // extension\n matchedSlash = false;\n end = i + 1;\n }\n if (code === CHAR_DOT) {\n // If this is our first dot, mark it as the start of our extension\n if (startDot === -1) startDot = i;\n else if (preDotState !== 1) preDotState = 1;\n } else if (startDot !== -1) {\n // We saw a non-dot and non-path separator before our dot, so we should\n // have a good chance at having a non-empty extension\n preDotState = -1;\n }\n }\n if (startDot === -1 || end === -1 || // We saw a non-dot character immediately before the dot\n preDotState === 0 || // The (right-most) trimmed path component is exactly '..'\n preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {\n return \"\";\n }\n return path.slice(startDot, end);\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\nfunction _format(sep, pathObject) {\n const dir = pathObject.dir || pathObject.root;\n const base = pathObject.base || (pathObject.name ?? \"\") + (pathObject.ext ?? \"\");\n if (!dir) return base;\n if (base === sep) return dir;\n if (dir === pathObject.root) return dir + base;\n return dir + sep + base;\n}\nfunction assertArg$1(pathObject) {\n if (pathObject === null || typeof pathObject !== \"object\") {\n throw new TypeError(`The \"pathObject\" argument must be of type Object, received type \"${typeof pathObject}\"`);\n }\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\n/**\n * Generate a path from `ParsedPath` object.\n *\n * @example Usage\n * ```ts\n * import { format } from \"@std/path/posix/format\";\n * import { assertEquals } from \"@std/assert\";\n *\n * const path = format({\n * root: \"/\",\n * dir: \"/path/dir\",\n * base: \"file.txt\",\n * ext: \".txt\",\n * name: \"file\"\n * });\n * assertEquals(path, \"/path/dir/file.txt\");\n * ```\n *\n * @param pathObject The path object to format.\n * @returns The formatted path.\n */ function format(pathObject) {\n assertArg$1(pathObject);\n return _format(\"/\", pathObject);\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\n/**\n * Verifies whether provided path is absolute.\n *\n * @example Usage\n * ```ts\n * import { isAbsolute } from \"@std/path/posix/is-absolute\";\n * import { assert, assertFalse } from \"@std/assert\";\n *\n * assert(isAbsolute(\"/home/user/Documents/\"));\n * assertFalse(isAbsolute(\"home/user/Documents/\"));\n * ```\n *\n * @param path The path to verify.\n * @returns Whether the path is absolute.\n */ function isAbsolute(path) {\n assertPath(path);\n return path.length > 0 && isPosixPathSeparator(path.charCodeAt(0));\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\nfunction assertArg(path) {\n assertPath(path);\n if (path.length === 0) return \".\";\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// Copyright the Browserify authors. MIT License.\n// Ported from https://github.com/browserify/path-browserify/\n// This module is browser compatible.\n// Resolves . and .. elements in a path with directory names\nfunction normalizeString(path, allowAboveRoot, separator, isPathSeparator) {\n let res = \"\";\n let lastSegmentLength = 0;\n let lastSlash = -1;\n let dots = 0;\n let code;\n for(let i = 0; i <= path.length; ++i){\n if (i < path.length) code = path.charCodeAt(i);\n else if (isPathSeparator(code)) break;\n else code = CHAR_FORWARD_SLASH;\n if (isPathSeparator(code)) {\n if (lastSlash === i - 1 || dots === 1) ; else if (lastSlash !== i - 1 && dots === 2) {\n if (res.length < 2 || lastSegmentLength !== 2 || res.charCodeAt(res.length - 1) !== CHAR_DOT || res.charCodeAt(res.length - 2) !== CHAR_DOT) {\n if (res.length > 2) {\n const lastSlashIndex = res.lastIndexOf(separator);\n if (lastSlashIndex === -1) {\n res = \"\";\n lastSegmentLength = 0;\n } else {\n res = res.slice(0, lastSlashIndex);\n lastSegmentLength = res.length - 1 - res.lastIndexOf(separator);\n }\n lastSlash = i;\n dots = 0;\n continue;\n } else if (res.length === 2 || res.length === 1) {\n res = \"\";\n lastSegmentLength = 0;\n lastSlash = i;\n dots = 0;\n continue;\n }\n }\n if (allowAboveRoot) {\n if (res.length > 0) res += `${separator}..`;\n else res = \"..\";\n lastSegmentLength = 2;\n }\n } else {\n if (res.length > 0) res += separator + path.slice(lastSlash + 1, i);\n else res = path.slice(lastSlash + 1, i);\n lastSegmentLength = i - lastSlash - 1;\n }\n lastSlash = i;\n dots = 0;\n } else if (code === CHAR_DOT && dots !== -1) {\n ++dots;\n } else {\n dots = -1;\n }\n }\n return res;\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\n/**\n * Normalize the `path`, resolving `'..'` and `'.'` segments.\n * Note that resolving these segments does not necessarily mean that all will be eliminated.\n * A `'..'` at the top-level will be preserved, and an empty path is canonically `'.'`.\n *\n * @example Usage\n * ```ts\n * import { normalize } from \"@std/path/posix/normalize\";\n * import { assertEquals } from \"@std/assert\";\n *\n * assertEquals(normalize(\"/foo/bar//baz/asdf/quux/..\"), \"/foo/bar/baz/asdf\");\n * assertEquals(normalize(new URL(\"file:///foo/bar//baz/asdf/quux/..\")), \"/foo/bar/baz/asdf/\");\n * ```\n *\n * @example Working with URLs\n *\n * Note: This function will remove the double slashes from a URL's scheme.\n * Hence, do not pass a full URL to this function. Instead, pass the pathname of\n * the URL.\n *\n * ```ts\n * import { normalize } from \"@std/path/posix/normalize\";\n * import { assertEquals } from \"@std/assert\";\n *\n * const url = new URL(\"https://deno.land\");\n * url.pathname = normalize(\"//std//assert//.//mod.ts\");\n * assertEquals(url.href, \"https://deno.land/std/assert/mod.ts\");\n *\n * url.pathname = normalize(\"std/assert/../async/retry.ts\");\n * assertEquals(url.href, \"https://deno.land/std/async/retry.ts\");\n * ```\n *\n * @param path The path to normalize.\n * @returns The normalized path.\n */ function normalize(path) {\n if (path instanceof URL) {\n path = fromFileUrl(path);\n }\n assertArg(path);\n const isAbsolute = isPosixPathSeparator(path.charCodeAt(0));\n const trailingSeparator = isPosixPathSeparator(path.charCodeAt(path.length - 1));\n // Normalize the path\n path = normalizeString(path, !isAbsolute, \"/\", isPosixPathSeparator);\n if (path.length === 0 && !isAbsolute) path = \".\";\n if (path.length > 0 && trailingSeparator) path += \"/\";\n if (isAbsolute) return `/${path}`;\n return path;\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\n/**\n * Join all given a sequence of `paths`,then normalizes the resulting path.\n *\n * @example Usage\n * ```ts\n * import { join } from \"@std/path/posix/join\";\n * import { assertEquals } from \"@std/assert\";\n *\n * assertEquals(join(\"/foo\", \"bar\", \"baz/asdf\", \"quux\", \"..\"), \"/foo/bar/baz/asdf\");\n * assertEquals(join(new URL(\"file:///foo\"), \"bar\", \"baz/asdf\", \"quux\", \"..\"), \"/foo/bar/baz/asdf\");\n * ```\n *\n * @example Working with URLs\n * ```ts\n * import { join } from \"@std/path/posix/join\";\n * import { assertEquals } from \"@std/assert\";\n *\n * const url = new URL(\"https://deno.land\");\n * url.pathname = join(\"std\", \"path\", \"mod.ts\");\n * assertEquals(url.href, \"https://deno.land/std/path/mod.ts\");\n *\n * url.pathname = join(\"//std\", \"path/\", \"/mod.ts\");\n * assertEquals(url.href, \"https://deno.land/std/path/mod.ts\");\n * ```\n *\n * @param path The path to join. This can be string or file URL.\n * @param paths The paths to join.\n * @returns The joined path.\n */ function join(path, ...paths) {\n if (path === undefined) return \".\";\n if (path instanceof URL) {\n path = fromFileUrl(path);\n }\n paths = path ? [\n path,\n ...paths\n ] : paths;\n paths.forEach((path)=>assertPath(path));\n const joined = paths.filter((path)=>path.length > 0).join(\"/\");\n return joined === \"\" ? \".\" : normalize(joined);\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\n/**\n * Return a `ParsedPath` object of the `path`.\n *\n * @example Usage\n * ```ts\n * import { parse } from \"@std/path/posix/parse\";\n * import { assertEquals } from \"@std/assert\";\n *\n * const path = parse(\"/home/user/file.txt\");\n * assertEquals(path, {\n * root: \"/\",\n * dir: \"/home/user\",\n * base: \"file.txt\",\n * ext: \".txt\",\n * name: \"file\"\n * });\n * ```\n *\n * @param path The path to parse.\n * @returns The parsed path object.\n */ function parse(path) {\n assertPath(path);\n const ret = {\n root: \"\",\n dir: \"\",\n base: \"\",\n ext: \"\",\n name: \"\"\n };\n if (path.length === 0) return ret;\n const isAbsolute = isPosixPathSeparator(path.charCodeAt(0));\n let start;\n if (isAbsolute) {\n ret.root = \"/\";\n start = 1;\n } else {\n start = 0;\n }\n let startDot = -1;\n let startPart = 0;\n let end = -1;\n let matchedSlash = true;\n let i = path.length - 1;\n // Track the state of characters (if any) we see before our first dot and\n // after any path separator we find\n let preDotState = 0;\n // Get non-dir info\n for(; i >= start; --i){\n const code = path.charCodeAt(i);\n if (isPosixPathSeparator(code)) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n startPart = i + 1;\n break;\n }\n continue;\n }\n if (end === -1) {\n // We saw the first non-path separator, mark this as the end of our\n // extension\n matchedSlash = false;\n end = i + 1;\n }\n if (code === CHAR_DOT) {\n // If this is our first dot, mark it as the start of our extension\n if (startDot === -1) startDot = i;\n else if (preDotState !== 1) preDotState = 1;\n } else if (startDot !== -1) {\n // We saw a non-dot and non-path separator before our dot, so we should\n // have a good chance at having a non-empty extension\n preDotState = -1;\n }\n }\n if (startDot === -1 || end === -1 || // We saw a non-dot character immediately before the dot\n preDotState === 0 || // The (right-most) trimmed path component is exactly '..'\n preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {\n if (end !== -1) {\n if (startPart === 0 && isAbsolute) {\n ret.base = ret.name = path.slice(1, end);\n } else {\n ret.base = ret.name = path.slice(startPart, end);\n }\n }\n // Fallback to '/' in case there is no basename\n ret.base = ret.base || \"/\";\n } else {\n if (startPart === 0 && isAbsolute) {\n ret.name = path.slice(1, startDot);\n ret.base = path.slice(1, end);\n } else {\n ret.name = path.slice(startPart, startDot);\n ret.base = path.slice(startPart, end);\n }\n ret.ext = path.slice(startDot, end);\n }\n if (startPart > 0) {\n ret.dir = stripTrailingSeparators(path.slice(0, startPart - 1), isPosixPathSeparator);\n } else if (isAbsolute) ret.dir = \"/\";\n return ret;\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\n/**\n * Resolves path segments into a `path`.\n *\n * @example Usage\n * ```ts\n * import { resolve } from \"@std/path/posix/resolve\";\n * import { assertEquals } from \"@std/assert\";\n *\n * const path = resolve(\"/foo\", \"bar\", \"baz/asdf\", \"quux\", \"..\");\n * assertEquals(path, \"/foo/bar/baz/asdf\");\n * ```\n *\n * @param pathSegments The path segments to resolve.\n * @returns The resolved path.\n */ function resolve(...pathSegments) {\n let resolvedPath = \"\";\n let resolvedAbsolute = false;\n for(let i = pathSegments.length - 1; i >= -1 && !resolvedAbsolute; i--){\n let path;\n if (i >= 0) path = pathSegments[i];\n else {\n // deno-lint-ignore no-explicit-any\n const { Deno } = globalThis;\n if (typeof Deno?.cwd !== \"function\") {\n throw new TypeError(\"Resolved a relative path without a current working directory (CWD)\");\n }\n path = Deno.cwd();\n }\n assertPath(path);\n // Skip empty entries\n if (path.length === 0) {\n continue;\n }\n resolvedPath = `${path}/${resolvedPath}`;\n resolvedAbsolute = isPosixPathSeparator(path.charCodeAt(0));\n }\n // At this point the path should be resolved to a full absolute path, but\n // handle relative paths to be safe (might happen when Deno.cwd() fails)\n // Normalize the path\n resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute, \"/\", isPosixPathSeparator);\n if (resolvedAbsolute) {\n if (resolvedPath.length > 0) return `/${resolvedPath}`;\n else return \"/\";\n } else if (resolvedPath.length > 0) return resolvedPath;\n else return \".\";\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\nfunction assertArgs(from, to) {\n assertPath(from);\n assertPath(to);\n if (from === to) return \"\";\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\n/**\n * Return the relative path from `from` to `to` based on current working directory.\n *\n * If `from` and `to` are the same, return an empty string.\n *\n * @example Usage\n * ```ts\n * import { relative } from \"@std/path/posix/relative\";\n * import { assertEquals } from \"@std/assert\";\n *\n * const path = relative(\"/data/orandea/test/aaa\", \"/data/orandea/impl/bbb\");\n * assertEquals(path, \"../../impl/bbb\");\n * ```\n *\n * @param from The path to start from.\n * @param to The path to reach.\n * @returns The relative path.\n */ function relative(from, to) {\n assertArgs(from, to);\n from = resolve(from);\n to = resolve(to);\n if (from === to) return \"\";\n // Trim any leading backslashes\n let fromStart = 1;\n const fromEnd = from.length;\n for(; fromStart < fromEnd; ++fromStart){\n if (!isPosixPathSeparator(from.charCodeAt(fromStart))) break;\n }\n const fromLen = fromEnd - fromStart;\n // Trim any leading backslashes\n let toStart = 1;\n const toEnd = to.length;\n for(; toStart < toEnd; ++toStart){\n if (!isPosixPathSeparator(to.charCodeAt(toStart))) break;\n }\n const toLen = toEnd - toStart;\n // Compare paths to find the longest common path from root\n const length = fromLen < toLen ? fromLen : toLen;\n let lastCommonSep = -1;\n let i = 0;\n for(; i <= length; ++i){\n if (i === length) {\n if (toLen > length) {\n if (isPosixPathSeparator(to.charCodeAt(toStart + i))) {\n // We get here if `from` is the exact base path for `to`.\n // For example: from='/foo/bar'; to='/foo/bar/baz'\n return to.slice(toStart + i + 1);\n } else if (i === 0) {\n // We get here if `from` is the root\n // For example: from='/'; to='/foo'\n return to.slice(toStart + i);\n }\n } else if (fromLen > length) {\n if (isPosixPathSeparator(from.charCodeAt(fromStart + i))) {\n // We get here if `to` is the exact base path for `from`.\n // For example: from='/foo/bar/baz'; to='/foo/bar'\n lastCommonSep = i;\n } else if (i === 0) {\n // We get here if `to` is the root.\n // For example: from='/foo'; to='/'\n lastCommonSep = 0;\n }\n }\n break;\n }\n const fromCode = from.charCodeAt(fromStart + i);\n const toCode = to.charCodeAt(toStart + i);\n if (fromCode !== toCode) break;\n else if (isPosixPathSeparator(fromCode)) lastCommonSep = i;\n }\n let out = \"\";\n // Generate the relative path based on the path difference between `to`\n // and `from`\n for(i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i){\n if (i === fromEnd || isPosixPathSeparator(from.charCodeAt(i))) {\n if (out.length === 0) out += \"..\";\n else out += \"/..\";\n }\n }\n // Lastly, append the rest of the destination (`to`) path that comes after\n // the common path parts\n if (out.length > 0) return out + to.slice(toStart + lastCommonSep);\n else {\n toStart += lastCommonSep;\n if (isPosixPathSeparator(to.charCodeAt(toStart))) ++toStart;\n return to.slice(toStart);\n }\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\nconst WHITESPACE_ENCODINGS = {\n \"\\u0009\": \"%09\",\n \"\\u000A\": \"%0A\",\n \"\\u000B\": \"%0B\",\n \"\\u000C\": \"%0C\",\n \"\\u000D\": \"%0D\",\n \"\\u0020\": \"%20\"\n};\nfunction encodeWhitespace(string) {\n return string.replaceAll(/[\\s]/g, (c)=>{\n return WHITESPACE_ENCODINGS[c] ?? c;\n });\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\n/**\n * Converts a path string to a file URL.\n *\n * @example Usage\n * ```ts\n * import { toFileUrl } from \"@std/path/posix/to-file-url\";\n * import { assertEquals } from \"@std/assert\";\n *\n * assertEquals(toFileUrl(\"/home/foo\"), new URL(\"file:///home/foo\"));\n * assertEquals(toFileUrl(\"/home/foo bar\"), new URL(\"file:///home/foo%20bar\"));\n * ```\n *\n * @param path The path to convert.\n * @returns The file URL.\n */ function toFileUrl(path) {\n if (!isAbsolute(path)) {\n throw new TypeError(`Path must be absolute: received \"${path}\"`);\n }\n const url = new URL(\"file:///\");\n url.pathname = encodeWhitespace(path.replace(/%/g, \"%25\").replace(/\\\\/g, \"%5C\"));\n return url;\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\n/**\n * Converts a path to a namespaced path. This function returns the path as is on posix.\n *\n * @example Usage\n * ```ts\n * import { toNamespacedPath } from \"@std/path/posix/to-namespaced-path\";\n * import { assertEquals } from \"@std/assert\";\n *\n * assertEquals(toNamespacedPath(\"/home/foo\"), \"/home/foo\");\n * ```\n *\n * @param path The path.\n * @returns The namespaced path.\n */ function toNamespacedPath(path) {\n // Non-op on posix systems\n return path;\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\nfunction common$1(paths, sep) {\n const [first = \"\", ...remaining] = paths;\n const parts = first.split(sep);\n let endOfPrefix = parts.length;\n let append = \"\";\n for (const path of remaining){\n const compare = path.split(sep);\n if (compare.length <= endOfPrefix) {\n endOfPrefix = compare.length;\n append = \"\";\n }\n for(let i = 0; i < endOfPrefix; i++){\n if (compare[i] !== parts[i]) {\n endOfPrefix = i;\n append = i === 0 ? \"\" : sep;\n break;\n }\n }\n }\n return parts.slice(0, endOfPrefix).join(sep) + append;\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\n/** Determines the common path from a set of paths for POSIX systems.\n *\n * @example Usage\n * ```ts\n * import { common } from \"@std/path/posix/common\";\n * import { assertEquals } from \"@std/assert\";\n *\n * const path = common([\n * \"./deno/std/path/mod.ts\",\n * \"./deno/std/fs/mod.ts\",\n * ]);\n * assertEquals(path, \"./deno/std/\");\n * ```\n *\n * @param paths The paths to compare.\n * @returns The common path.\n */ function common(paths) {\n return common$1(paths, SEPARATOR);\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\n/**\n * Options for {@linkcode globToRegExp}, {@linkcode joinGlobs},\n * {@linkcode normalizeGlob} and {@linkcode expandGlob}.\n */ const REG_EXP_ESCAPE_CHARS = [\n \"!\",\n \"$\",\n \"(\",\n \")\",\n \"*\",\n \"+\",\n \".\",\n \"=\",\n \"?\",\n \"[\",\n \"\\\\\",\n \"^\",\n \"{\",\n \"|\"\n];\nconst RANGE_ESCAPE_CHARS = [\n \"-\",\n \"\\\\\",\n \"]\"\n];\nfunction _globToRegExp(c, glob, { extended = true, globstar: globstarOption = true, // os = osType,\ncaseInsensitive = false } = {}) {\n if (glob === \"\") {\n return /(?!)/;\n }\n // Remove trailing separators.\n let newLength = glob.length;\n for(; newLength > 1 && c.seps.includes(glob[newLength - 1]); newLength--);\n glob = glob.slice(0, newLength);\n let regExpString = \"\";\n // Terminates correctly. Trust that `j` is incremented every iteration.\n for(let j = 0; j < glob.length;){\n let segment = \"\";\n const groupStack = [];\n let inRange = false;\n let inEscape = false;\n let endsWithSep = false;\n let i = j;\n // Terminates with `i` at the non-inclusive end of the current segment.\n for(; i < glob.length && !(c.seps.includes(glob[i]) && groupStack.length === 0); i++){\n if (inEscape) {\n inEscape = false;\n const escapeChars = inRange ? RANGE_ESCAPE_CHARS : REG_EXP_ESCAPE_CHARS;\n segment += escapeChars.includes(glob[i]) ? `\\\\${glob[i]}` : glob[i];\n continue;\n }\n if (glob[i] === c.escapePrefix) {\n inEscape = true;\n continue;\n }\n if (glob[i] === \"[\") {\n if (!inRange) {\n inRange = true;\n segment += \"[\";\n if (glob[i + 1] === \"!\") {\n i++;\n segment += \"^\";\n } else if (glob[i + 1] === \"^\") {\n i++;\n segment += \"\\\\^\";\n }\n continue;\n } else if (glob[i + 1] === \":\") {\n let k = i + 1;\n let value = \"\";\n while(glob[k + 1] !== undefined && glob[k + 1] !== \":\"){\n value += glob[k + 1];\n k++;\n }\n if (glob[k + 1] === \":\" && glob[k + 2] === \"]\") {\n i = k + 2;\n if (value === \"alnum\") segment += \"\\\\dA-Za-z\";\n else if (value === \"alpha\") segment += \"A-Za-z\";\n else if (value === \"ascii\") segment += \"\\x00-\\x7F\";\n else if (value === \"blank\") segment += \"\\t \";\n else if (value === \"cntrl\") segment += \"\\x00-\\x1F\\x7F\";\n else if (value === \"digit\") segment += \"\\\\d\";\n else if (value === \"graph\") segment += \"\\x21-\\x7E\";\n else if (value === \"lower\") segment += \"a-z\";\n else if (value === \"print\") segment += \"\\x20-\\x7E\";\n else if (value === \"punct\") {\n segment += \"!\\\"#$%&'()*+,\\\\-./:;<=>?@[\\\\\\\\\\\\]^_‘{|}~\";\n } else if (value === \"space\") segment += \"\\\\s\\v\";\n else if (value === \"upper\") segment += \"A-Z\";\n else if (value === \"word\") segment += \"\\\\w\";\n else if (value === \"xdigit\") segment += \"\\\\dA-Fa-f\";\n continue;\n }\n }\n }\n if (glob[i] === \"]\" && inRange) {\n inRange = false;\n segment += \"]\";\n continue;\n }\n if (inRange) {\n segment += glob[i];\n continue;\n }\n if (glob[i] === \")\" && groupStack.length > 0 && groupStack[groupStack.length - 1] !== \"BRACE\") {\n segment += \")\";\n const type = groupStack.pop();\n if (type === \"!\") {\n segment += c.wildcard;\n } else if (type !== \"@\") {\n segment += type;\n }\n continue;\n }\n if (glob[i] === \"|\" && groupStack.length > 0 && groupStack[groupStack.length - 1] !== \"BRACE\") {\n segment += \"|\";\n continue;\n }\n if (glob[i] === \"+\" && extended && glob[i + 1] === \"(\") {\n i++;\n groupStack.push(\"+\");\n segment += \"(?:\";\n continue;\n }\n if (glob[i] === \"@\" && extended && glob[i + 1] === \"(\") {\n i++;\n groupStack.push(\"@\");\n segment += \"(?:\";\n continue;\n }\n if (glob[i] === \"?\") {\n if (extended && glob[i + 1] === \"(\") {\n i++;\n groupStack.push(\"?\");\n segment += \"(?:\";\n } else {\n segment += \".\";\n }\n continue;\n }\n if (glob[i] === \"!\" && extended && glob[i + 1] === \"(\") {\n i++;\n groupStack.push(\"!\");\n segment += \"(?!\";\n continue;\n }\n if (glob[i] === \"{\") {\n groupStack.push(\"BRACE\");\n segment += \"(?:\";\n continue;\n }\n if (glob[i] === \"}\" && groupStack[groupStack.length - 1] === \"BRACE\") {\n groupStack.pop();\n segment += \")\";\n continue;\n }\n if (glob[i] === \",\" && groupStack[groupStack.length - 1] === \"BRACE\") {\n segment += \"|\";\n continue;\n }\n if (glob[i] === \"*\") {\n if (extended && glob[i + 1] === \"(\") {\n i++;\n groupStack.push(\"*\");\n segment += \"(?:\";\n } else {\n const prevChar = glob[i - 1];\n let numStars = 1;\n while(glob[i + 1] === \"*\"){\n i++;\n numStars++;\n }\n const nextChar = glob[i + 1];\n if (globstarOption && numStars === 2 && [\n ...c.seps,\n undefined\n ].includes(prevChar) && [\n ...c.seps,\n undefined\n ].includes(nextChar)) {\n segment += c.globstar;\n endsWithSep = true;\n } else {\n segment += c.wildcard;\n }\n }\n continue;\n }\n segment += REG_EXP_ESCAPE_CHARS.includes(glob[i]) ? `\\\\${glob[i]}` : glob[i];\n }\n // Check for unclosed groups or a dangling backslash.\n if (groupStack.length > 0 || inRange || inEscape) {\n // Parse failure. Take all characters from this segment literally.\n segment = \"\";\n for (const c of glob.slice(j, i)){\n segment += REG_EXP_ESCAPE_CHARS.includes(c) ? `\\\\${c}` : c;\n endsWithSep = false;\n }\n }\n regExpString += segment;\n if (!endsWithSep) {\n regExpString += i < glob.length ? c.sep : c.sepMaybe;\n endsWithSep = true;\n }\n // Terminates with `i` at the start of the next segment.\n while(c.seps.includes(glob[i]))i++;\n j = i;\n }\n regExpString = `^${regExpString}$`;\n return new RegExp(regExpString, caseInsensitive ? \"i\" : \"\");\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\nconst constants = {\n sep: \"/+\",\n sepMaybe: \"/*\",\n seps: [\n \"/\"\n ],\n globstar: \"(?:[^/]*(?:/|$)+)*\",\n wildcard: \"[^/]*\",\n escapePrefix: \"\\\\\"\n};\n/** Convert a glob string to a regular expression.\n *\n * Tries to match bash glob expansion as closely as possible.\n *\n * Basic glob syntax:\n * - `*` - Matches everything without leaving the path segment.\n * - `?` - Matches any single character.\n * - `{foo,bar}` - Matches `foo` or `bar`.\n * - `[abcd]` - Matches `a`, `b`, `c` or `d`.\n * - `[a-d]` - Matches `a`, `b`, `c` or `d`.\n * - `[!abcd]` - Matches any single character besides `a`, `b`, `c` or `d`.\n * - `[[:<class>:]]` - Matches any character belonging to `<class>`.\n * - `[[:alnum:]]` - Matches any digit or letter.\n * - `[[:digit:]abc]` - Matches any digit, `a`, `b` or `c`.\n * - See https://facelessuser.github.io/wcmatch/glob/#posix-character-classes\n * for a complete list of supported character classes.\n * - `\\` - Escapes the next character for an `os` other than `\"windows\"`.\n * - \\` - Escapes the next character for `os` set to `\"windows\"`.\n * - `/` - Path separator.\n * - `\\` - Additional path separator only for `os` set to `\"windows\"`.\n *\n * Extended syntax:\n * - Requires `{ extended: true }`.\n * - `?(foo|bar)` - Matches 0 or 1 instance of `{foo,bar}`.\n * - `@(foo|bar)` - Matches 1 instance of `{foo,bar}`. They behave the same.\n * - `*(foo|bar)` - Matches _n_ instances of `{foo,bar}`.\n * - `+(foo|bar)` - Matches _n > 0_ instances of `{foo,bar}`.\n * - `!(foo|bar)` - Matches anything other than `{foo,bar}`.\n * - See https://www.linuxjournal.com/content/bash-extended-globbing.\n *\n * Globstar syntax:\n * - Requires `{ globstar: true }`.\n * - `**` - Matches any number of any path segments.\n * - Must comprise its entire path segment in the provided glob.\n * - See https://www.linuxjournal.com/content/globstar-new-bash-globbing-option.\n *\n * Note the following properties:\n * - The generated `RegExp` is anchored at both start and end.\n * - Repeating and trailing separators are tolerated. Trailing separators in the\n * provided glob have no meaning and are discarded.\n * - Absolute globs will only match absolute paths, etc.\n * - Empty globs will match nothing.\n * - Any special glob syntax must be contained to one path segment. For example,\n * `?(foo|bar/baz)` is invalid. The separator will take precedence and the\n * first segment ends with an unclosed group.\n * - If a path segment ends with unclosed groups or a dangling escape prefix, a\n * parse error has occurred. Every character for that segment is taken\n * literally in this event.\n *\n * Limitations:\n * - A negative group like `!(foo|bar)` will wrongly be converted to a negative\n * look-ahead followed by a wildcard. This means that `!(foo).js` will wrongly\n * fail to match `foobar.js`, even though `foobar` is not `foo`. Effectively,\n * `!(foo|bar)` is treated like `!(@(foo|bar)*)`. This will work correctly if\n * the group occurs not nested at the end of the segment.\n *\n * @example Usage\n * ```ts\n * import { globToRegExp } from \"@std/path/posix/glob-to-regexp\";\n * import { assertEquals } from \"@std/assert\";\n *\n * assertEquals(globToRegExp(\"*.js\"), /^[^/]*\\.js\\/*$/);\n * ```\n *\n * @param glob Glob string to convert.\n * @param options Conversion options.\n * @returns The regular expression equivalent to the glob.\n */ function globToRegExp(glob, options = {}) {\n return _globToRegExp(constants, glob, options);\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\n/**\n * Test whether the given string is a glob.\n *\n * @example Usage\n * ```ts\n * import { isGlob } from \"@std/path/is-glob\";\n * import { assert } from \"@std/assert\";\n *\n * assert(!isGlob(\"foo/bar/../baz\"));\n * assert(isGlob(\"foo/*ar/../baz\"));\n * ```\n *\n * @param str String to test.\n * @returns `true` if the given string is a glob, otherwise `false`\n */ function isGlob(str) {\n const chars = {\n \"{\": \"}\",\n \"(\": \")\",\n \"[\": \"]\"\n };\n const regex = /\\\\(.)|(^!|\\*|\\?|[\\].+)]\\?|\\[[^[\\\\\\]]+\\]|\\{[^{\\\\}]+\\}|\\(\\?[:!=][^\\\\)]+\\)|\\([^(|]+\\|[^\\\\)]+\\)|@\\([^)]+\\))/;\n if (str === \"\") {\n return false;\n }\n let match;\n while(match = regex.exec(str)){\n if (match[2]) return true;\n let idx = match.index + match[0].length;\n // if an open bracket/brace/paren is escaped,\n // set the index to the next closing character\n const open = match[1];\n const close = open ? chars[open] : null;\n if (open && close) {\n const n = str.indexOf(close, idx);\n if (n !== -1) {\n idx = n + 1;\n }\n }\n str = str.slice(idx);\n }\n return false;\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\n/**\n * Like normalize(), but doesn't collapse \"**\\/..\" when `globstar` is true.\n *\n * @example Usage\n * ```ts\n * import { normalizeGlob } from \"@std/path/posix/normalize-glob\";\n * import { assertEquals } from \"@std/assert\";\n *\n * const path = normalizeGlob(\"foo/bar/../*\", { globstar: true });\n * assertEquals(path, \"foo/*\");\n * ```\n *\n * @param glob The glob to normalize.\n * @param options The options to use.\n * @returns The normalized path.\n */ function normalizeGlob(glob, options = {}) {\n const { globstar = false } = options;\n if (glob.match(/\\0/g)) {\n throw new Error(`Glob contains invalid characters: \"${glob}\"`);\n }\n if (!globstar) {\n return normalize(glob);\n }\n const s = SEPARATOR_PATTERN.source;\n const badParentPattern = new RegExp(`(?<=(${s}|^)\\\\*\\\\*${s})\\\\.\\\\.(?=${s}|$)`, \"g\");\n return normalize(glob.replace(badParentPattern, \"\\0\")).replace(/\\0/g, \"..\");\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\n/**\n * Like join(), but doesn't collapse \"**\\/..\" when `globstar` is true.\n *\n * @example Usage\n * ```ts\n * import { joinGlobs } from \"@std/path/posix/join-globs\";\n * import { assertEquals } from \"@std/assert\";\n *\n * const path = joinGlobs([\"foo\", \"bar\", \"**\"], { globstar: true });\n * assertEquals(path, \"foo/bar/**\");\n * ```\n *\n * @param globs The globs to join.\n * @param options The options to use.\n * @returns The joined path.\n */ function joinGlobs(globs, options = {}) {\n const { globstar = false } = options;\n if (!globstar || globs.length === 0) {\n return join(...globs);\n }\n let joined;\n for (const glob of globs){\n const path = glob;\n if (path.length > 0) {\n if (!joined) joined = path;\n else joined += `${SEPARATOR}${path}`;\n }\n }\n if (!joined) return \".\";\n return normalizeGlob(joined, {\n globstar\n });\n}\n\nexport { DELIMITER, SEPARATOR, SEPARATOR_PATTERN, basename, common, dirname, extname, format, fromFileUrl, globToRegExp, isAbsolute, isGlob, join, joinGlobs, normalize, normalizeGlob, parse, relative, resolve, toFileUrl, toNamespacedPath };\n","// @ts-nocheck\n// Copyright 2018-2025 the Deno authors. MIT license.\n// Copyright the Browserify authors. MIT License.\nfunction assertPath(path) {\n if (typeof path !== \"string\") {\n throw new TypeError(`Path must be a string, received \"${JSON.stringify(path)}\"`);\n }\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\nfunction stripSuffix(name, suffix) {\n if (suffix.length >= name.length) {\n return name;\n }\n const lenDiff = name.length - suffix.length;\n for(let i = suffix.length - 1; i >= 0; --i){\n if (name.charCodeAt(lenDiff + i) !== suffix.charCodeAt(i)) {\n return name;\n }\n }\n return name.slice(0, -suffix.length);\n}\nfunction lastPathSegment(path, isSep, start = 0) {\n let matchedNonSeparator = false;\n let end = path.length;\n for(let i = path.length - 1; i >= start; --i){\n if (isSep(path.charCodeAt(i))) {\n if (matchedNonSeparator) {\n start = i + 1;\n break;\n }\n } else if (!matchedNonSeparator) {\n matchedNonSeparator = true;\n end = i + 1;\n }\n }\n return path.slice(start, end);\n}\nfunction assertArgs$1(path, suffix) {\n assertPath(path);\n if (path.length === 0) return path;\n if (typeof suffix !== \"string\") {\n throw new TypeError(`Suffix must be a string, received \"${JSON.stringify(suffix)}\"`);\n }\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// Copyright the Browserify authors. MIT License.\n// Ported from https://github.com/browserify/path-browserify/\n// This module is browser compatible.\n// Alphabet chars.\nconst CHAR_UPPERCASE_A = 65; /* A */ \nconst CHAR_LOWERCASE_A = 97; /* a */ \nconst CHAR_UPPERCASE_Z = 90; /* Z */ \nconst CHAR_LOWERCASE_Z = 122; /* z */ \n// Non-alphabetic chars.\nconst CHAR_DOT = 46; /* . */ \nconst CHAR_FORWARD_SLASH = 47; /* / */ \nconst CHAR_BACKWARD_SLASH = 92; /* \\ */ \nconst CHAR_COLON = 58; /* : */ \nconst CHAR_QUESTION_MARK = 63; /* ? */\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// Copyright the Browserify authors. MIT License.\n// Ported from https://github.com/browserify/path-browserify/\n// This module is browser compatible.\nfunction stripTrailingSeparators(segment, isSep) {\n if (segment.length <= 1) {\n return segment;\n }\n let end = segment.length;\n for(let i = segment.length - 1; i > 0; i--){\n if (isSep(segment.charCodeAt(i))) {\n end = i;\n } else {\n break;\n }\n }\n return segment.slice(0, end);\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// Copyright the Browserify authors. MIT License.\n// Ported from https://github.com/browserify/path-browserify/\n// This module is browser compatible.\nfunction isPosixPathSeparator(code) {\n return code === CHAR_FORWARD_SLASH;\n}\nfunction isPathSeparator(code) {\n return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;\n}\nfunction isWindowsDeviceRoot(code) {\n return code >= CHAR_LOWERCASE_A && code <= CHAR_LOWERCASE_Z || code >= CHAR_UPPERCASE_A && code <= CHAR_UPPERCASE_Z;\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\nfunction assertArg$3(url) {\n url = url instanceof URL ? url : new URL(url);\n if (url.protocol !== \"file:\") {\n throw new TypeError(`URL must be a file URL: received \"${url.protocol}\"`);\n }\n return url;\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\n/**\n * Converts a file URL to a path string.\n *\n * @example Usage\n * ```ts\n * import { fromFileUrl } from \"@std/path/windows/from-file-url\";\n * import { assertEquals } from \"@std/assert\";\n *\n * assertEquals(fromFileUrl(\"file:///home/foo\"), \"\\\\home\\\\foo\");\n * assertEquals(fromFileUrl(\"file:///C:/Users/foo\"), \"C:\\\\Users\\\\foo\");\n * assertEquals(fromFileUrl(\"file://localhost/home/foo\"), \"\\\\home\\\\foo\");\n * ```\n *\n * @param url The file URL to convert.\n * @returns The path string.\n */ function fromFileUrl(url) {\n url = assertArg$3(url);\n let path = decodeURIComponent(url.pathname.replace(/\\//g, \"\\\\\").replace(/%(?![0-9A-Fa-f]{2})/g, \"%25\")).replace(/^\\\\*([A-Za-z]:)(\\\\|$)/, \"$1\\\\\");\n if (url.hostname !== \"\") {\n // Note: The `URL` implementation guarantees that the drive letter and\n // hostname are mutually exclusive. Otherwise it would not have been valid\n // to append the hostname and path like this.\n path = `\\\\\\\\${url.hostname}${path}`;\n }\n return path;\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\n/**\n * Return the last portion of a `path`.\n * Trailing directory separators are ignored, and optional suffix is removed.\n *\n * @example Usage\n * ```ts\n * import { basename } from \"@std/path/windows/basename\";\n * import { assertEquals } from \"@std/assert\";\n *\n * assertEquals(basename(\"C:\\\\user\\\\Documents\\\\\"), \"Documents\");\n * assertEquals(basename(\"C:\\\\user\\\\Documents\\\\image.png\"), \"image.png\");\n * assertEquals(basename(\"C:\\\\user\\\\Documents\\\\image.png\", \".png\"), \"image\");\n * assertEquals(basename(new URL(\"file:///C:/user/Documents/image.png\")), \"image.png\");\n * assertEquals(basename(new URL(\"file:///C:/user/Documents/image.png\"), \".png\"), \"image\");\n * ```\n *\n * @param path The path to extract the name from.\n * @param suffix The suffix to remove from extracted name.\n * @returns The extracted name.\n */ function basename(path, suffix = \"\") {\n if (path instanceof URL) {\n path = fromFileUrl(path);\n }\n assertArgs$1(path, suffix);\n // Check for a drive letter prefix so as not to mistake the following\n // path separator as an extra separator at the end of the path that can be\n // disregarded\n let start = 0;\n if (path.length >= 2) {\n const drive = path.charCodeAt(0);\n if (isWindowsDeviceRoot(drive)) {\n if (path.charCodeAt(1) === CHAR_COLON) start = 2;\n }\n }\n const lastSegment = lastPathSegment(path, isPathSeparator, start);\n const strippedSegment = stripTrailingSeparators(lastSegment, isPathSeparator);\n return suffix ? stripSuffix(strippedSegment, suffix) : strippedSegment;\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\n/**\n * The character used to separate entries in the PATH environment variable.\n */ const DELIMITER = \";\";\n/**\n * The character used to separate components of a file path.\n */ const SEPARATOR = \"\\\\\";\n/**\n * A regular expression that matches one or more path separators.\n */ const SEPARATOR_PATTERN = /[\\\\/]+/;\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\nfunction assertArg$2(path) {\n assertPath(path);\n if (path.length === 0) return \".\";\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\n/**\n * Return the directory path of a `path`.\n *\n * @example Usage\n * ```ts\n * import { dirname } from \"@std/path/windows/dirname\";\n * import { assertEquals } from \"@std/assert\";\n *\n * assertEquals(dirname(\"C:\\\\foo\\\\bar\\\\baz.ext\"), \"C:\\\\foo\\\\bar\");\n * assertEquals(dirname(new URL(\"file:///C:/foo/bar/baz.ext\")), \"C:\\\\foo\\\\bar\");\n * ```\n *\n * @param path The path to get the directory from.\n * @returns The directory path.\n */ function dirname(path) {\n if (path instanceof URL) {\n path = fromFileUrl(path);\n }\n assertArg$2(path);\n const len = path.length;\n let rootEnd = -1;\n let end = -1;\n let matchedSlash = true;\n let offset = 0;\n const code = path.charCodeAt(0);\n // Try to match a root\n if (len > 1) {\n if (isPathSeparator(code)) {\n // Possible UNC root\n rootEnd = offset = 1;\n if (isPathSeparator(path.charCodeAt(1))) {\n // Matched double path separator at beginning\n let j = 2;\n let last = j;\n // Match 1 or more non-path separators\n for(; j < len; ++j){\n if (isPathSeparator(path.charCodeAt(j))) break;\n }\n if (j < len && j !== last) {\n // Matched!\n last = j;\n // Match 1 or more path separators\n for(; j < len; ++j){\n if (!isPathSeparator(path.charCodeAt(j))) break;\n }\n if (j < len && j !== last) {\n // Matched!\n last = j;\n // Match 1 or more non-path separators\n for(; j < len; ++j){\n if (isPathSeparator(path.charCodeAt(j))) break;\n }\n if (j === len) {\n // We matched a UNC root only\n return path;\n }\n if (j !== last) {\n // We matched a UNC root with leftovers\n // Offset by 1 to include the separator after the UNC root to\n // treat it as a \"normal root\" on top of a (UNC) root\n rootEnd = offset = j + 1;\n }\n }\n }\n }\n } else if (isWindowsDeviceRoot(code)) {\n // Possible device root\n if (path.charCodeAt(1) === CHAR_COLON) {\n rootEnd = offset = 2;\n if (len > 2) {\n if (isPathSeparator(path.charCodeAt(2))) rootEnd = offset = 3;\n }\n }\n }\n } else if (isPathSeparator(code)) {\n // `path` contains just a path separator, exit early to avoid\n // unnecessary work\n return path;\n }\n for(let i = len - 1; i >= offset; --i){\n if (isPathSeparator(path.charCodeAt(i))) {\n if (!matchedSlash) {\n end = i;\n break;\n }\n } else {\n // We saw the first non-path separator\n matchedSlash = false;\n }\n }\n if (end === -1) {\n if (rootEnd === -1) return \".\";\n else end = rootEnd;\n }\n return stripTrailingSeparators(path.slice(0, end), isPosixPathSeparator);\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\n/**\n * Return the extension of the `path` with leading period.\n *\n * @example Usage\n * ```ts\n * import { extname } from \"@std/path/windows/extname\";\n * import { assertEquals } from \"@std/assert\";\n *\n * assertEquals(extname(\"file.ts\"), \".ts\");\n * assertEquals(extname(new URL(\"file:///C:/foo/bar/baz.ext\")), \".ext\");\n * ```\n *\n * @param path The path to get the extension from.\n * @returns The extension of the `path`.\n */ function extname(path) {\n if (path instanceof URL) {\n path = fromFileUrl(path);\n }\n assertPath(path);\n let start = 0;\n let startDot = -1;\n let startPart = 0;\n let end = -1;\n let matchedSlash = true;\n // Track the state of characters (if any) we see before our first dot and\n // after any path separator we find\n let preDotState = 0;\n // Check for a drive letter prefix so as not to mistake the following\n // path separator as an extra separator at the end of the path that can be\n // disregarded\n if (path.length >= 2 && path.charCodeAt(1) === CHAR_COLON && isWindowsDeviceRoot(path.charCodeAt(0))) {\n start = startPart = 2;\n }\n for(let i = path.length - 1; i >= start; --i){\n const code = path.charCodeAt(i);\n if (isPathSeparator(code)) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n startPart = i + 1;\n break;\n }\n continue;\n }\n if (end === -1) {\n // We saw the first non-path separator, mark this as the end of our\n // extension\n matchedSlash = false;\n end = i + 1;\n }\n if (code === CHAR_DOT) {\n // If this is our first dot, mark it as the start of our extension\n if (startDot === -1) startDot = i;\n else if (preDotState !== 1) preDotState = 1;\n } else if (startDot !== -1) {\n // We saw a non-dot and non-path separator before our dot, so we should\n // have a good chance at having a non-empty extension\n preDotState = -1;\n }\n }\n if (startDot === -1 || end === -1 || // We saw a non-dot character immediately before the dot\n preDotState === 0 || // The (right-most) trimmed path component is exactly '..'\n preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {\n return \"\";\n }\n return path.slice(startDot, end);\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\nfunction _format(sep, pathObject) {\n const dir = pathObject.dir || pathObject.root;\n const base = pathObject.base || (pathObject.name ?? \"\") + (pathObject.ext ?? \"\");\n if (!dir) return base;\n if (base === sep) return dir;\n if (dir === pathObject.root) return dir + base;\n return dir + sep + base;\n}\nfunction assertArg$1(pathObject) {\n if (pathObject === null || typeof pathObject !== \"object\") {\n throw new TypeError(`The \"pathObject\" argument must be of type Object, received type \"${typeof pathObject}\"`);\n }\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\n/**\n * Generate a path from `ParsedPath` object.\n *\n * @example Usage\n * ```ts\n * import { format } from \"@std/path/windows/format\";\n * import { assertEquals } from \"@std/assert\";\n *\n * const path = format({\n * root: \"C:\\\\\",\n * dir: \"C:\\\\path\\\\dir\",\n * base: \"file.txt\",\n * ext: \".txt\",\n * name: \"file\"\n * });\n * assertEquals(path, \"C:\\\\path\\\\dir\\\\file.txt\");\n * ```\n *\n * @param pathObject The path object to format.\n * @returns The formatted path.\n */ function format(pathObject) {\n assertArg$1(pathObject);\n return _format(\"\\\\\", pathObject);\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\n/**\n * Verifies whether provided path is absolute.\n *\n * @example Usage\n * ```ts\n * import { isAbsolute } from \"@std/path/windows/is-absolute\";\n * import { assert, assertFalse } from \"@std/assert\";\n *\n * assert(isAbsolute(\"C:\\\\foo\\\\bar\"));\n * assertFalse(isAbsolute(\"..\\\\baz\"));\n * ```\n *\n * @param path The path to verify.\n * @returns `true` if the path is absolute, `false` otherwise.\n */ function isAbsolute(path) {\n assertPath(path);\n const len = path.length;\n if (len === 0) return false;\n const code = path.charCodeAt(0);\n if (isPathSeparator(code)) {\n return true;\n } else if (isWindowsDeviceRoot(code)) {\n // Possible device root\n if (len > 2 && path.charCodeAt(1) === CHAR_COLON) {\n if (isPathSeparator(path.charCodeAt(2))) return true;\n }\n }\n return false;\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\nfunction assertArg(path) {\n assertPath(path);\n if (path.length === 0) return \".\";\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// Copyright the Browserify authors. MIT License.\n// Ported from https://github.com/browserify/path-browserify/\n// This module is browser compatible.\n// Resolves . and .. elements in a path with directory names\nfunction normalizeString(path, allowAboveRoot, separator, isPathSeparator) {\n let res = \"\";\n let lastSegmentLength = 0;\n let lastSlash = -1;\n let dots = 0;\n let code;\n for(let i = 0; i <= path.length; ++i){\n if (i < path.length) code = path.charCodeAt(i);\n else if (isPathSeparator(code)) break;\n else code = CHAR_FORWARD_SLASH;\n if (isPathSeparator(code)) {\n if (lastSlash === i - 1 || dots === 1) ; else if (lastSlash !== i - 1 && dots === 2) {\n if (res.length < 2 || lastSegmentLength !== 2 || res.charCodeAt(res.length - 1) !== CHAR_DOT || res.charCodeAt(res.length - 2) !== CHAR_DOT) {\n if (res.length > 2) {\n const lastSlashIndex = res.lastIndexOf(separator);\n if (lastSlashIndex === -1) {\n res = \"\";\n lastSegmentLength = 0;\n } else {\n res = res.slice(0, lastSlashIndex);\n lastSegmentLength = res.length - 1 - res.lastIndexOf(separator);\n }\n lastSlash = i;\n dots = 0;\n continue;\n } else if (res.length === 2 || res.length === 1) {\n res = \"\";\n lastSegmentLength = 0;\n lastSlash = i;\n dots = 0;\n continue;\n }\n }\n if (allowAboveRoot) {\n if (res.length > 0) res += `${separator}..`;\n else res = \"..\";\n lastSegmentLength = 2;\n }\n } else {\n if (res.length > 0) res += separator + path.slice(lastSlash + 1, i);\n else res = path.slice(lastSlash + 1, i);\n lastSegmentLength = i - lastSlash - 1;\n }\n lastSlash = i;\n dots = 0;\n } else if (code === CHAR_DOT && dots !== -1) {\n ++dots;\n } else {\n dots = -1;\n }\n }\n return res;\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\n/**\n * Normalize the `path`, resolving `'..'` and `'.'` segments.\n * Note that resolving these segments does not necessarily mean that all will be eliminated.\n * A `'..'` at the top-level will be preserved, and an empty path is canonically `'.'`.\n *\n * @example Usage\n * ```ts\n * import { normalize } from \"@std/path/windows/normalize\";\n * import { assertEquals } from \"@std/assert\";\n *\n * assertEquals(normalize(\"C:\\\\foo\\\\..\\\\bar\"), \"C:\\\\bar\");\n * assertEquals(normalize(new URL(\"file:///C:/foo/../bar\")), \"C:\\\\bar\");\n * ```\n *\n * @param path The path to normalize\n * @returns The normalized path\n */ function normalize(path) {\n if (path instanceof URL) {\n path = fromFileUrl(path);\n }\n assertArg(path);\n const len = path.length;\n let rootEnd = 0;\n let device;\n let isAbsolute = false;\n const code = path.charCodeAt(0);\n // Try to match a root\n if (len > 1) {\n if (isPathSeparator(code)) {\n // Possible UNC root\n // If we started with a separator, we know we at least have an absolute\n // path of some kind (UNC or otherwise)\n isAbsolute = true;\n if (isPathSeparator(path.charCodeAt(1))) {\n // Matched double path separator at beginning\n let j = 2;\n let last = j;\n // Match 1 or more non-path separators\n for(; j < len; ++j){\n if (isPathSeparator(path.charCodeAt(j))) break;\n }\n if (j < len && j !== last) {\n const firstPart = path.slice(last, j);\n // Matched!\n last = j;\n // Match 1 or more path separators\n for(; j < len; ++j){\n if (!isPathSeparator(path.charCodeAt(j))) break;\n }\n if (j < len && j !== last) {\n // Matched!\n last = j;\n // Match 1 or more non-path separators\n for(; j < len; ++j){\n if (isPathSeparator(path.charCodeAt(j))) break;\n }\n if (j === len) {\n // We matched a UNC root only\n // Return the normalized version of the UNC root since there\n // is nothing left to process\n return `\\\\\\\\${firstPart}\\\\${path.slice(last)}\\\\`;\n } else if (j !== last) {\n // We matched a UNC root with leftovers\n device = `\\\\\\\\${firstPart}\\\\${path.slice(last, j)}`;\n rootEnd = j;\n }\n }\n }\n } else {\n rootEnd = 1;\n }\n } else if (isWindowsDeviceRoot(code)) {\n // Possible device root\n if (path.charCodeAt(1) === CHAR_COLON) {\n device = path.slice(0, 2);\n rootEnd = 2;\n if (len > 2) {\n if (isPathSeparator(path.charCodeAt(2))) {\n // Treat separator following drive name as an absolute path\n // indicator\n isAbsolute = true;\n rootEnd = 3;\n }\n }\n }\n }\n } else if (isPathSeparator(code)) {\n // `path` contains just a path separator, exit early to avoid unnecessary\n // work\n return \"\\\\\";\n }\n let tail;\n if (rootEnd < len) {\n tail = normalizeString(path.slice(rootEnd), !isAbsolute, \"\\\\\", isPathSeparator);\n } else {\n tail = \"\";\n }\n if (tail.length === 0 && !isAbsolute) tail = \".\";\n if (tail.length > 0 && isPathSeparator(path.charCodeAt(len - 1))) {\n tail += \"\\\\\";\n }\n if (device === undefined) {\n if (isAbsolute) {\n if (tail.length > 0) return `\\\\${tail}`;\n else return \"\\\\\";\n }\n return tail;\n } else if (isAbsolute) {\n if (tail.length > 0) return `${device}\\\\${tail}`;\n else return `${device}\\\\`;\n }\n return device + tail;\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\n/**\n * Join all given a sequence of `paths`,then normalizes the resulting path.\n *\n * @example Usage\n * ```ts\n * import { join } from \"@std/path/windows/join\";\n * import { assertEquals } from \"@std/assert\";\n *\n * assertEquals(join(\"C:\\\\foo\", \"bar\", \"baz\\\\..\"), \"C:\\\\foo\\\\bar\");\n * assertEquals(join(new URL(\"file:///C:/foo\"), \"bar\", \"baz\\\\..\"), \"C:\\\\foo\\\\bar\");\n * ```\n *\n * @param path The path to join. This can be string or file URL.\n * @param paths The paths to join.\n * @returns The joined path.\n */ function join(path, ...paths) {\n if (path instanceof URL) {\n path = fromFileUrl(path);\n }\n paths = path ? [\n path,\n ...paths\n ] : paths;\n paths.forEach((path)=>assertPath(path));\n paths = paths.filter((path)=>path.length > 0);\n if (paths.length === 0) return \".\";\n // Make sure that the joined path doesn't start with two slashes, because\n // normalize() will mistake it for an UNC path then.\n //\n // This step is skipped when it is very clear that the user actually\n // intended to point at an UNC path. This is assumed when the first\n // non-empty string arguments starts with exactly two slashes followed by\n // at least one more non-slash character.\n //\n // Note that for normalize() to treat a path as an UNC path it needs to\n // have at least 2 components, so we don't filter for that here.\n // This means that the user can use join to construct UNC paths from\n // a server name and a share name; for example:\n // path.join('//server', 'share') -> '\\\\\\\\server\\\\share\\\\'\n let needsReplace = true;\n let slashCount = 0;\n const firstPart = paths[0];\n if (isPathSeparator(firstPart.charCodeAt(0))) {\n ++slashCount;\n const firstLen = firstPart.length;\n if (firstLen > 1) {\n if (isPathSeparator(firstPart.charCodeAt(1))) {\n ++slashCount;\n if (firstLen > 2) {\n if (isPathSeparator(firstPart.charCodeAt(2))) ++slashCount;\n else {\n // We matched a UNC path in the first part\n needsReplace = false;\n }\n }\n }\n }\n }\n let joined = paths.join(\"\\\\\");\n if (needsReplace) {\n // Find any more consecutive slashes we need to replace\n for(; slashCount < joined.length; ++slashCount){\n if (!isPathSeparator(joined.charCodeAt(slashCount))) break;\n }\n // Replace the slashes if needed\n if (slashCount >= 2) joined = `\\\\${joined.slice(slashCount)}`;\n }\n return normalize(joined);\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\n/**\n * Return a `ParsedPath` object of the `path`.\n *\n * @example Usage\n * ```ts\n * import { parse } from \"@std/path/windows/parse\";\n * import { assertEquals } from \"@std/assert\";\n *\n * const parsed = parse(\"C:\\\\foo\\\\bar\\\\baz.ext\");\n * assertEquals(parsed, {\n * root: \"C:\\\\\",\n * dir: \"C:\\\\foo\\\\bar\",\n * base: \"baz.ext\",\n * ext: \".ext\",\n * name: \"baz\",\n * });\n * ```\n *\n * @param path The path to parse.\n * @returns The `ParsedPath` object.\n */ function parse(path) {\n assertPath(path);\n const ret = {\n root: \"\",\n dir: \"\",\n base: \"\",\n ext: \"\",\n name: \"\"\n };\n const len = path.length;\n if (len === 0) return ret;\n let rootEnd = 0;\n let code = path.charCodeAt(0);\n // Try to match a root\n if (len > 1) {\n if (isPathSeparator(code)) {\n // Possible UNC root\n rootEnd = 1;\n if (isPathSeparator(path.charCodeAt(1))) {\n // Matched double path separator at beginning\n let j = 2;\n let last = j;\n // Match 1 or more non-path separators\n for(; j < len; ++j){\n if (isPathSeparator(path.charCodeAt(j))) break;\n }\n if (j < len && j !== last) {\n // Matched!\n last = j;\n // Match 1 or more path separators\n for(; j < len; ++j){\n if (!isPathSeparator(path.charCodeAt(j))) break;\n }\n if (j < len && j !== last) {\n // Matched!\n last = j;\n // Match 1 or more non-path separators\n for(; j < len; ++j){\n if (isPathSeparator(path.charCodeAt(j))) break;\n }\n if (j === len) {\n // We matched a UNC root only\n rootEnd = j;\n } else if (j !== last) {\n // We matched a UNC root with leftovers\n rootEnd = j + 1;\n }\n }\n }\n }\n } else if (isWindowsDeviceRoot(code)) {\n // Possible device root\n if (path.charCodeAt(1) === CHAR_COLON) {\n rootEnd = 2;\n if (len > 2) {\n if (isPathSeparator(path.charCodeAt(2))) {\n if (len === 3) {\n // `path` contains just a drive root, exit early to avoid\n // unnecessary work\n ret.root = ret.dir = path;\n ret.base = \"\\\\\";\n return ret;\n }\n rootEnd = 3;\n }\n } else {\n // `path` contains just a relative drive root, exit early to avoid\n // unnecessary work\n ret.root = ret.dir = path;\n return ret;\n }\n }\n }\n } else if (isPathSeparator(code)) {\n // `path` contains just a path separator, exit early to avoid\n // unnecessary work\n ret.root = ret.dir = path;\n ret.base = \"\\\\\";\n return ret;\n }\n if (rootEnd > 0) ret.root = path.slice(0, rootEnd);\n let startDot = -1;\n let startPart = rootEnd;\n let end = -1;\n let matchedSlash = true;\n let i = path.length - 1;\n // Track the state of characters (if any) we see before our first dot and\n // after any path separator we find\n let preDotState = 0;\n // Get non-dir info\n for(; i >= rootEnd; --i){\n code = path.charCodeAt(i);\n if (isPathSeparator(code)) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n startPart = i + 1;\n break;\n }\n continue;\n }\n if (end === -1) {\n // We saw the first non-path separator, mark this as the end of our\n // extension\n matchedSlash = false;\n end = i + 1;\n }\n if (code === CHAR_DOT) {\n // If this is our first dot, mark it as the start of our extension\n if (startDot === -1) startDot = i;\n else if (preDotState !== 1) preDotState = 1;\n } else if (startDot !== -1) {\n // We saw a non-dot and non-path separator before our dot, so we should\n // have a good chance at having a non-empty extension\n preDotState = -1;\n }\n }\n if (startDot === -1 || end === -1 || // We saw a non-dot character immediately before the dot\n preDotState === 0 || // The (right-most) trimmed path component is exactly '..'\n preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {\n if (end !== -1) {\n ret.base = ret.name = path.slice(startPart, end);\n }\n } else {\n ret.name = path.slice(startPart, startDot);\n ret.base = path.slice(startPart, end);\n ret.ext = path.slice(startDot, end);\n }\n // Fallback to '\\' in case there is no basename\n ret.base = ret.base || \"\\\\\";\n // If the directory is the root, use the entire root as the `dir` including\n // the trailing slash if any (`C:\\abc` -> `C:\\`). Otherwise, strip out the\n // trailing slash (`C:\\abc\\def` -> `C:\\abc`).\n if (startPart > 0 && startPart !== rootEnd) {\n ret.dir = path.slice(0, startPart - 1);\n } else ret.dir = ret.root;\n return ret;\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\n/**\n * Resolves path segments into a `path`.\n *\n * @example Usage\n * ```ts\n * import { resolve } from \"@std/path/windows/resolve\";\n * import { assertEquals } from \"@std/assert\";\n *\n * const resolved = resolve(\"C:\\\\foo\\\\bar\", \"..\\\\baz\");\n * assertEquals(resolved, \"C:\\\\foo\\\\baz\");\n * ```\n *\n * @param pathSegments The path segments to process to path\n * @returns The resolved path\n */ function resolve(...pathSegments) {\n let resolvedDevice = \"\";\n let resolvedTail = \"\";\n let resolvedAbsolute = false;\n for(let i = pathSegments.length - 1; i >= -1; i--){\n let path;\n // deno-lint-ignore no-explicit-any\n const { Deno } = globalThis;\n if (i >= 0) {\n path = pathSegments[i];\n } else if (!resolvedDevice) {\n if (typeof Deno?.cwd !== \"function\") {\n throw new TypeError(\"Resolved a drive-letter-less path without a current working directory (CWD)\");\n }\n path = Deno.cwd();\n } else {\n if (typeof Deno?.env?.get !== \"function\" || typeof Deno?.cwd !== \"function\") {\n throw new TypeError(\"Resolved a relative path without a current working directory (CWD)\");\n }\n path = Deno.cwd();\n // Verify that a cwd was found and that it actually points\n // to our drive. If not, default to the drive's root.\n if (path === undefined || path.slice(0, 3).toLowerCase() !== `${resolvedDevice.toLowerCase()}\\\\`) {\n path = `${resolvedDevice}\\\\`;\n }\n }\n assertPath(path);\n const len = path.length;\n // Skip empty entries\n if (len === 0) continue;\n let rootEnd = 0;\n let device = \"\";\n let isAbsolute = false;\n const code = path.charCodeAt(0);\n // Try to match a root\n if (len > 1) {\n if (isPathSeparator(code)) {\n // Possible UNC root\n // If we started with a separator, we know we at least have an\n // absolute path of some kind (UNC or otherwise)\n isAbsolute = true;\n if (isPathSeparator(path.charCodeAt(1))) {\n // Matched double path separator at beginning\n let j = 2;\n let last = j;\n // Match 1 or more non-path separators\n for(; j < len; ++j){\n if (isPathSeparator(path.charCodeAt(j))) break;\n }\n if (j < len && j !== last) {\n const firstPart = path.slice(last, j);\n // Matched!\n last = j;\n // Match 1 or more path separators\n for(; j < len; ++j){\n if (!isPathSeparator(path.charCodeAt(j))) break;\n }\n if (j < len && j !== last) {\n // Matched!\n last = j;\n // Match 1 or more non-path separators\n for(; j < len; ++j){\n if (isPathSeparator(path.charCodeAt(j))) break;\n }\n if (j === len) {\n // We matched a UNC root only\n device = `\\\\\\\\${firstPart}\\\\${path.slice(last)}`;\n rootEnd = j;\n } else if (j !== last) {\n // We matched a UNC root with leftovers\n device = `\\\\\\\\${firstPart}\\\\${path.slice(last, j)}`;\n rootEnd = j;\n }\n }\n }\n } else {\n rootEnd = 1;\n }\n } else if (isWindowsDeviceRoot(code)) {\n // Possible device root\n if (path.charCodeAt(1) === CHAR_COLON) {\n device = path.slice(0, 2);\n rootEnd = 2;\n if (len > 2) {\n if (isPathSeparator(path.charCodeAt(2))) {\n // Treat separator following drive name as an absolute path\n // indicator\n isAbsolute = true;\n rootEnd = 3;\n }\n }\n }\n }\n } else if (isPathSeparator(code)) {\n // `path` contains just a path separator\n rootEnd = 1;\n isAbsolute = true;\n }\n if (device.length > 0 && resolvedDevice.length > 0 && device.toLowerCase() !== resolvedDevice.toLowerCase()) {\n continue;\n }\n if (resolvedDevice.length === 0 && device.length > 0) {\n resolvedDevice = device;\n }\n if (!resolvedAbsolute) {\n resolvedTail = `${path.slice(rootEnd)}\\\\${resolvedTail}`;\n resolvedAbsolute = isAbsolute;\n }\n if (resolvedAbsolute && resolvedDevice.length > 0) break;\n }\n // At this point the path should be resolved to a full absolute path,\n // but handle relative paths to be safe (might happen when Deno.cwd()\n // fails)\n // Normalize the tail path\n resolvedTail = normalizeString(resolvedTail, !resolvedAbsolute, \"\\\\\", isPathSeparator);\n return resolvedDevice + (resolvedAbsolute ? \"\\\\\" : \"\") + resolvedTail || \".\";\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\nfunction assertArgs(from, to) {\n assertPath(from);\n assertPath(to);\n if (from === to) return \"\";\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\n/**\n * Return the relative path from `from` to `to` based on current working directory.\n *\n * An example in windows, for instance:\n * from = 'C:\\\\orandea\\\\test\\\\aaa'\n * to = 'C:\\\\orandea\\\\impl\\\\bbb'\n * The output of the function should be: '..\\\\..\\\\impl\\\\bbb'\n *\n * @example Usage\n * ```ts\n * import { relative } from \"@std/path/windows/relative\";\n * import { assertEquals } from \"@std/assert\";\n *\n * const relativePath = relative(\"C:\\\\foobar\\\\test\\\\aaa\", \"C:\\\\foobar\\\\impl\\\\bbb\");\n * assertEquals(relativePath, \"..\\\\..\\\\impl\\\\bbb\");\n * ```\n *\n * @param from The path from which to calculate the relative path\n * @param to The path to which to calculate the relative path\n * @returns The relative path from `from` to `to`\n */ function relative(from, to) {\n assertArgs(from, to);\n const fromOrig = resolve(from);\n const toOrig = resolve(to);\n if (fromOrig === toOrig) return \"\";\n from = fromOrig.toLowerCase();\n to = toOrig.toLowerCase();\n if (from === to) return \"\";\n // Trim any leading backslashes\n let fromStart = 0;\n let fromEnd = from.length;\n for(; fromStart < fromEnd; ++fromStart){\n if (from.charCodeAt(fromStart) !== CHAR_BACKWARD_SLASH) break;\n }\n // Trim trailing backslashes (applicable to UNC paths only)\n for(; fromEnd - 1 > fromStart; --fromEnd){\n if (from.charCodeAt(fromEnd - 1) !== CHAR_BACKWARD_SLASH) break;\n }\n const fromLen = fromEnd - fromStart;\n // Trim any leading backslashes\n let toStart = 0;\n let toEnd = to.length;\n for(; toStart < toEnd; ++toStart){\n if (to.charCodeAt(toStart) !== CHAR_BACKWARD_SLASH) break;\n }\n // Trim trailing backslashes (applicable to UNC paths only)\n for(; toEnd - 1 > toStart; --toEnd){\n if (to.charCodeAt(toEnd - 1) !== CHAR_BACKWARD_SLASH) break;\n }\n const toLen = toEnd - toStart;\n // Compare paths to find the longest common path from root\n const length = fromLen < toLen ? fromLen : toLen;\n let lastCommonSep = -1;\n let i = 0;\n for(; i <= length; ++i){\n if (i === length) {\n if (toLen > length) {\n if (to.charCodeAt(toStart + i) === CHAR_BACKWARD_SLASH) {\n // We get here if `from` is the exact base path for `to`.\n // For example: from='C:\\\\foo\\\\bar'; to='C:\\\\foo\\\\bar\\\\baz'\n return toOrig.slice(toStart + i + 1);\n } else if (i === 2) {\n // We get here if `from` is the device root.\n // For example: from='C:\\\\'; to='C:\\\\foo'\n return toOrig.slice(toStart + i);\n }\n }\n if (fromLen > length) {\n if (from.charCodeAt(fromStart + i) === CHAR_BACKWARD_SLASH) {\n // We get here if `to` is the exact base path for `from`.\n // For example: from='C:\\\\foo\\\\bar'; to='C:\\\\foo'\n lastCommonSep = i;\n } else if (i === 2) {\n // We get here if `to` is the device root.\n // For example: from='C:\\\\foo\\\\bar'; to='C:\\\\'\n lastCommonSep = 3;\n }\n }\n break;\n }\n const fromCode = from.charCodeAt(fromStart + i);\n const toCode = to.charCodeAt(toStart + i);\n if (fromCode !== toCode) break;\n else if (fromCode === CHAR_BACKWARD_SLASH) lastCommonSep = i;\n }\n // We found a mismatch before the first common path separator was seen, so\n // return the original `to`.\n if (i !== length && lastCommonSep === -1) {\n return toOrig;\n }\n let out = \"\";\n if (lastCommonSep === -1) lastCommonSep = 0;\n // Generate the relative path based on the path difference between `to` and\n // `from`\n for(i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i){\n if (i === fromEnd || from.charCodeAt(i) === CHAR_BACKWARD_SLASH) {\n if (out.length === 0) out += \"..\";\n else out += \"\\\\..\";\n }\n }\n // Lastly, append the rest of the destination (`to`) path that comes after\n // the common path parts\n if (out.length > 0) {\n return out + toOrig.slice(toStart + lastCommonSep, toEnd);\n } else {\n toStart += lastCommonSep;\n if (toOrig.charCodeAt(toStart) === CHAR_BACKWARD_SLASH) ++toStart;\n return toOrig.slice(toStart, toEnd);\n }\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\nconst WHITESPACE_ENCODINGS = {\n \"\\u0009\": \"%09\",\n \"\\u000A\": \"%0A\",\n \"\\u000B\": \"%0B\",\n \"\\u000C\": \"%0C\",\n \"\\u000D\": \"%0D\",\n \"\\u0020\": \"%20\"\n};\nfunction encodeWhitespace(string) {\n return string.replaceAll(/[\\s]/g, (c)=>{\n return WHITESPACE_ENCODINGS[c] ?? c;\n });\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\n/**\n * Converts a path string to a file URL.\n *\n * @example Usage\n * ```ts\n * import { toFileUrl } from \"@std/path/windows/to-file-url\";\n * import { assertEquals } from \"@std/assert\";\n *\n * assertEquals(toFileUrl(\"\\\\home\\\\foo\"), new URL(\"file:///home/foo\"));\n * assertEquals(toFileUrl(\"C:\\\\Users\\\\foo\"), new URL(\"file:///C:/Users/foo\"));\n * assertEquals(toFileUrl(\"\\\\\\\\127.0.0.1\\\\home\\\\foo\"), new URL(\"file://127.0.0.1/home/foo\"));\n * ```\n * @param path The path to convert.\n * @returns The file URL.\n */ function toFileUrl(path) {\n if (!isAbsolute(path)) {\n throw new TypeError(`Path must be absolute: received \"${path}\"`);\n }\n const [, hostname, pathname] = path.match(/^(?:[/\\\\]{2}([^/\\\\]+)(?=[/\\\\](?:[^/\\\\]|$)))?(.*)/);\n const url = new URL(\"file:///\");\n url.pathname = encodeWhitespace(pathname.replace(/%/g, \"%25\"));\n if (hostname !== undefined && hostname !== \"localhost\") {\n url.hostname = hostname;\n if (!url.hostname) {\n throw new TypeError(`Invalid hostname: \"${url.hostname}\"`);\n }\n }\n return url;\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\n/**\n * Resolves path to a namespace path\n *\n * @example Usage\n * ```ts\n * import { toNamespacedPath } from \"@std/path/windows/to-namespaced-path\";\n * import { assertEquals } from \"@std/assert\";\n *\n * const namespaced = toNamespacedPath(\"C:\\\\foo\\\\bar\");\n * assertEquals(namespaced, \"\\\\\\\\?\\\\C:\\\\foo\\\\bar\");\n * ```\n *\n * @param path The path to resolve to namespaced path\n * @returns The resolved namespaced path\n */ function toNamespacedPath(path) {\n // Note: this will *probably* throw somewhere.\n if (typeof path !== \"string\") return path;\n if (path.length === 0) return \"\";\n const resolvedPath = resolve(path);\n if (resolvedPath.length >= 3) {\n if (resolvedPath.charCodeAt(0) === CHAR_BACKWARD_SLASH) {\n // Possible UNC root\n if (resolvedPath.charCodeAt(1) === CHAR_BACKWARD_SLASH) {\n const code = resolvedPath.charCodeAt(2);\n if (code !== CHAR_QUESTION_MARK && code !== CHAR_DOT) {\n // Matched non-long UNC root, convert the path to a long UNC path\n return `\\\\\\\\?\\\\UNC\\\\${resolvedPath.slice(2)}`;\n }\n }\n } else if (isWindowsDeviceRoot(resolvedPath.charCodeAt(0))) {\n // Possible device root\n if (resolvedPath.charCodeAt(1) === CHAR_COLON && resolvedPath.charCodeAt(2) === CHAR_BACKWARD_SLASH) {\n // Matched device root, convert the path to a long UNC path\n return `\\\\\\\\?\\\\${resolvedPath}`;\n }\n }\n }\n return path;\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\nfunction common$1(paths, sep) {\n const [first = \"\", ...remaining] = paths;\n const parts = first.split(sep);\n let endOfPrefix = parts.length;\n let append = \"\";\n for (const path of remaining){\n const compare = path.split(sep);\n if (compare.length <= endOfPrefix) {\n endOfPrefix = compare.length;\n append = \"\";\n }\n for(let i = 0; i < endOfPrefix; i++){\n if (compare[i] !== parts[i]) {\n endOfPrefix = i;\n append = i === 0 ? \"\" : sep;\n break;\n }\n }\n }\n return parts.slice(0, endOfPrefix).join(sep) + append;\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\n/**\n * Determines the common path from a set of paths for Windows systems.\n *\n * @example Usage\n * ```ts\n * import { common } from \"@std/path/windows/common\";\n * import { assertEquals } from \"@std/assert\";\n *\n * const path = common([\n * \"C:\\\\foo\\\\bar\",\n * \"C:\\\\foo\\\\baz\",\n * ]);\n * assertEquals(path, \"C:\\\\foo\\\\\");\n * ```\n *\n * @param paths The paths to compare.\n * @returns The common path.\n */ function common(paths) {\n return common$1(paths, SEPARATOR);\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\n/**\n * Options for {@linkcode globToRegExp}, {@linkcode joinGlobs},\n * {@linkcode normalizeGlob} and {@linkcode expandGlob}.\n */ const REG_EXP_ESCAPE_CHARS = [\n \"!\",\n \"$\",\n \"(\",\n \")\",\n \"*\",\n \"+\",\n \".\",\n \"=\",\n \"?\",\n \"[\",\n \"\\\\\",\n \"^\",\n \"{\",\n \"|\"\n];\nconst RANGE_ESCAPE_CHARS = [\n \"-\",\n \"\\\\\",\n \"]\"\n];\nfunction _globToRegExp(c, glob, { extended = true, globstar: globstarOption = true, // os = osType,\ncaseInsensitive = false } = {}) {\n if (glob === \"\") {\n return /(?!)/;\n }\n // Remove trailing separators.\n let newLength = glob.length;\n for(; newLength > 1 && c.seps.includes(glob[newLength - 1]); newLength--);\n glob = glob.slice(0, newLength);\n let regExpString = \"\";\n // Terminates correctly. Trust that `j` is incremented every iteration.\n for(let j = 0; j < glob.length;){\n let segment = \"\";\n const groupStack = [];\n let inRange = false;\n let inEscape = false;\n let endsWithSep = false;\n let i = j;\n // Terminates with `i` at the non-inclusive end of the current segment.\n for(; i < glob.length && !(c.seps.includes(glob[i]) && groupStack.length === 0); i++){\n if (inEscape) {\n inEscape = false;\n const escapeChars = inRange ? RANGE_ESCAPE_CHARS : REG_EXP_ESCAPE_CHARS;\n segment += escapeChars.includes(glob[i]) ? `\\\\${glob[i]}` : glob[i];\n continue;\n }\n if (glob[i] === c.escapePrefix) {\n inEscape = true;\n continue;\n }\n if (glob[i] === \"[\") {\n if (!inRange) {\n inRange = true;\n segment += \"[\";\n if (glob[i + 1] === \"!\") {\n i++;\n segment += \"^\";\n } else if (glob[i + 1] === \"^\") {\n i++;\n segment += \"\\\\^\";\n }\n continue;\n } else if (glob[i + 1] === \":\") {\n let k = i + 1;\n let value = \"\";\n while(glob[k + 1] !== undefined && glob[k + 1] !== \":\"){\n value += glob[k + 1];\n k++;\n }\n if (glob[k + 1] === \":\" && glob[k + 2] === \"]\") {\n i = k + 2;\n if (value === \"alnum\") segment += \"\\\\dA-Za-z\";\n else if (value === \"alpha\") segment += \"A-Za-z\";\n else if (value === \"ascii\") segment += \"\\x00-\\x7F\";\n else if (value === \"blank\") segment += \"\\t \";\n else if (value === \"cntrl\") segment += \"\\x00-\\x1F\\x7F\";\n else if (value === \"digit\") segment += \"\\\\d\";\n else if (value === \"graph\") segment += \"\\x21-\\x7E\";\n else if (value === \"lower\") segment += \"a-z\";\n else if (value === \"print\") segment += \"\\x20-\\x7E\";\n else if (value === \"punct\") {\n segment += \"!\\\"#$%&'()*+,\\\\-./:;<=>?@[\\\\\\\\\\\\]^_‘{|}~\";\n } else if (value === \"space\") segment += \"\\\\s\\v\";\n else if (value === \"upper\") segment += \"A-Z\";\n else if (value === \"word\") segment += \"\\\\w\";\n else if (value === \"xdigit\") segment += \"\\\\dA-Fa-f\";\n continue;\n }\n }\n }\n if (glob[i] === \"]\" && inRange) {\n inRange = false;\n segment += \"]\";\n continue;\n }\n if (inRange) {\n segment += glob[i];\n continue;\n }\n if (glob[i] === \")\" && groupStack.length > 0 && groupStack[groupStack.length - 1] !== \"BRACE\") {\n segment += \")\";\n const type = groupStack.pop();\n if (type === \"!\") {\n segment += c.wildcard;\n } else if (type !== \"@\") {\n segment += type;\n }\n continue;\n }\n if (glob[i] === \"|\" && groupStack.length > 0 && groupStack[groupStack.length - 1] !== \"BRACE\") {\n segment += \"|\";\n continue;\n }\n if (glob[i] === \"+\" && extended && glob[i + 1] === \"(\") {\n i++;\n groupStack.push(\"+\");\n segment += \"(?:\";\n continue;\n }\n if (glob[i] === \"@\" && extended && glob[i + 1] === \"(\") {\n i++;\n groupStack.push(\"@\");\n segment += \"(?:\";\n continue;\n }\n if (glob[i] === \"?\") {\n if (extended && glob[i + 1] === \"(\") {\n i++;\n groupStack.push(\"?\");\n segment += \"(?:\";\n } else {\n segment += \".\";\n }\n continue;\n }\n if (glob[i] === \"!\" && extended && glob[i + 1] === \"(\") {\n i++;\n groupStack.push(\"!\");\n segment += \"(?!\";\n continue;\n }\n if (glob[i] === \"{\") {\n groupStack.push(\"BRACE\");\n segment += \"(?:\";\n continue;\n }\n if (glob[i] === \"}\" && groupStack[groupStack.length - 1] === \"BRACE\") {\n groupStack.pop();\n segment += \")\";\n continue;\n }\n if (glob[i] === \",\" && groupStack[groupStack.length - 1] === \"BRACE\") {\n segment += \"|\";\n continue;\n }\n if (glob[i] === \"*\") {\n if (extended && glob[i + 1] === \"(\") {\n i++;\n groupStack.push(\"*\");\n segment += \"(?:\";\n } else {\n const prevChar = glob[i - 1];\n let numStars = 1;\n while(glob[i + 1] === \"*\"){\n i++;\n numStars++;\n }\n const nextChar = glob[i + 1];\n if (globstarOption && numStars === 2 && [\n ...c.seps,\n undefined\n ].includes(prevChar) && [\n ...c.seps,\n undefined\n ].includes(nextChar)) {\n segment += c.globstar;\n endsWithSep = true;\n } else {\n segment += c.wildcard;\n }\n }\n continue;\n }\n segment += REG_EXP_ESCAPE_CHARS.includes(glob[i]) ? `\\\\${glob[i]}` : glob[i];\n }\n // Check for unclosed groups or a dangling backslash.\n if (groupStack.length > 0 || inRange || inEscape) {\n // Parse failure. Take all characters from this segment literally.\n segment = \"\";\n for (const c of glob.slice(j, i)){\n segment += REG_EXP_ESCAPE_CHARS.includes(c) ? `\\\\${c}` : c;\n endsWithSep = false;\n }\n }\n regExpString += segment;\n if (!endsWithSep) {\n regExpString += i < glob.length ? c.sep : c.sepMaybe;\n endsWithSep = true;\n }\n // Terminates with `i` at the start of the next segment.\n while(c.seps.includes(glob[i]))i++;\n j = i;\n }\n regExpString = `^${regExpString}$`;\n return new RegExp(regExpString, caseInsensitive ? \"i\" : \"\");\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\nconst constants = {\n sep: \"(?:\\\\\\\\|/)+\",\n sepMaybe: \"(?:\\\\\\\\|/)*\",\n seps: [\n \"\\\\\",\n \"/\"\n ],\n globstar: \"(?:[^\\\\\\\\/]*(?:\\\\\\\\|/|$)+)*\",\n wildcard: \"[^\\\\\\\\/]*\",\n escapePrefix: \"`\"\n};\n/** Convert a glob string to a regular expression.\n *\n * Tries to match bash glob expansion as closely as possible.\n *\n * Basic glob syntax:\n * - `*` - Matches everything without leaving the path segment.\n * - `?` - Matches any single character.\n * - `{foo,bar}` - Matches `foo` or `bar`.\n * - `[abcd]` - Matches `a`, `b`, `c` or `d`.\n * - `[a-d]` - Matches `a`, `b`, `c` or `d`.\n * - `[!abcd]` - Matches any single character besides `a`, `b`, `c` or `d`.\n * - `[[:<class>:]]` - Matches any character belonging to `<class>`.\n * - `[[:alnum:]]` - Matches any digit or letter.\n * - `[[:digit:]abc]` - Matches any digit, `a`, `b` or `c`.\n * - See https://facelessuser.github.io/wcmatch/glob/#posix-character-classes\n * for a complete list of supported character classes.\n * - `\\` - Escapes the next character for an `os` other than `\"windows\"`.\n * - \\` - Escapes the next character for `os` set to `\"windows\"`.\n * - `/` - Path separator.\n * - `\\` - Additional path separator only for `os` set to `\"windows\"`.\n *\n * Extended syntax:\n * - Requires `{ extended: true }`.\n * - `?(foo|bar)` - Matches 0 or 1 instance of `{foo,bar}`.\n * - `@(foo|bar)` - Matches 1 instance of `{foo,bar}`. They behave the same.\n * - `*(foo|bar)` - Matches _n_ instances of `{foo,bar}`.\n * - `+(foo|bar)` - Matches _n > 0_ instances of `{foo,bar}`.\n * - `!(foo|bar)` - Matches anything other than `{foo,bar}`.\n * - See https://www.linuxjournal.com/content/bash-extended-globbing.\n *\n * Globstar syntax:\n * - Requires `{ globstar: true }`.\n * - `**` - Matches any number of any path segments.\n * - Must comprise its entire path segment in the provided glob.\n * - See https://www.linuxjournal.com/content/globstar-new-bash-globbing-option.\n *\n * Note the following properties:\n * - The generated `RegExp` is anchored at both start and end.\n * - Repeating and trailing separators are tolerated. Trailing separators in the\n * provided glob have no meaning and are discarded.\n * - Absolute globs will only match absolute paths, etc.\n * - Empty globs will match nothing.\n * - Any special glob syntax must be contained to one path segment. For example,\n * `?(foo|bar/baz)` is invalid. The separator will take precedence and the\n * first segment ends with an unclosed group.\n * - If a path segment ends with unclosed groups or a dangling escape prefix, a\n * parse error has occurred. Every character for that segment is taken\n * literally in this event.\n *\n * Limitations:\n * - A negative group like `!(foo|bar)` will wrongly be converted to a negative\n * look-ahead followed by a wildcard. This means that `!(foo).js` will wrongly\n * fail to match `foobar.js`, even though `foobar` is not `foo`. Effectively,\n * `!(foo|bar)` is treated like `!(@(foo|bar)*)`. This will work correctly if\n * the group occurs not nested at the end of the segment.\n *\n * @example Usage\n * ```ts\n * import { globToRegExp } from \"@std/path/windows/glob-to-regexp\";\n * import { assertEquals } from \"@std/assert\";\n *\n * assertEquals(globToRegExp(\"*.js\"), /^[^\\\\/]*\\.js(?:\\\\|\\/)*$/);\n * ```\n *\n * @param glob Glob string to convert.\n * @param options Conversion options.\n * @returns The regular expression equivalent to the glob.\n */ function globToRegExp(glob, options = {}) {\n return _globToRegExp(constants, glob, options);\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\n/**\n * Test whether the given string is a glob.\n *\n * @example Usage\n * ```ts\n * import { isGlob } from \"@std/path/is-glob\";\n * import { assert } from \"@std/assert\";\n *\n * assert(!isGlob(\"foo/bar/../baz\"));\n * assert(isGlob(\"foo/*ar/../baz\"));\n * ```\n *\n * @param str String to test.\n * @returns `true` if the given string is a glob, otherwise `false`\n */ function isGlob(str) {\n const chars = {\n \"{\": \"}\",\n \"(\": \")\",\n \"[\": \"]\"\n };\n const regex = /\\\\(.)|(^!|\\*|\\?|[\\].+)]\\?|\\[[^[\\\\\\]]+\\]|\\{[^{\\\\}]+\\}|\\(\\?[:!=][^\\\\)]+\\)|\\([^(|]+\\|[^\\\\)]+\\)|@\\([^)]+\\))/;\n if (str === \"\") {\n return false;\n }\n let match;\n while(match = regex.exec(str)){\n if (match[2]) return true;\n let idx = match.index + match[0].length;\n // if an open bracket/brace/paren is escaped,\n // set the index to the next closing character\n const open = match[1];\n const close = open ? chars[open] : null;\n if (open && close) {\n const n = str.indexOf(close, idx);\n if (n !== -1) {\n idx = n + 1;\n }\n }\n str = str.slice(idx);\n }\n return false;\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\n/**\n * Like normalize(), but doesn't collapse \"**\\/..\" when `globstar` is true.\n *\n * @example Usage\n * ```ts\n * import { normalizeGlob } from \"@std/path/windows/normalize-glob\";\n * import { assertEquals } from \"@std/assert\";\n *\n * const normalized = normalizeGlob(\"**\\\\foo\\\\..\\\\bar\", { globstar: true });\n * assertEquals(normalized, \"**\\\\bar\");\n * ```\n *\n * @param glob The glob pattern to normalize.\n * @param options The options for glob pattern.\n * @returns The normalized glob pattern.\n */ function normalizeGlob(glob, options = {}) {\n const { globstar = false } = options;\n if (glob.match(/\\0/g)) {\n throw new Error(`Glob contains invalid characters: \"${glob}\"`);\n }\n if (!globstar) {\n return normalize(glob);\n }\n const s = SEPARATOR_PATTERN.source;\n const badParentPattern = new RegExp(`(?<=(${s}|^)\\\\*\\\\*${s})\\\\.\\\\.(?=${s}|$)`, \"g\");\n return normalize(glob.replace(badParentPattern, \"\\0\")).replace(/\\0/g, \"..\");\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\n/**\n * Like join(), but doesn't collapse \"**\\/..\" when `globstar` is true.\n *\n * @example Usage\n *\n * ```ts\n * import { joinGlobs } from \"@std/path/windows/join-globs\";\n * import { assertEquals } from \"@std/assert\";\n *\n * const joined = joinGlobs([\"foo\", \"**\", \"bar\"], { globstar: true });\n * assertEquals(joined, \"foo\\\\**\\\\bar\");\n * ```\n *\n * @param globs The globs to join.\n * @param options The options for glob pattern.\n * @returns The joined glob pattern.\n */ function joinGlobs(globs, options = {}) {\n const { globstar = false } = options;\n if (!globstar || globs.length === 0) {\n return join(...globs);\n }\n let joined;\n for (const glob of globs){\n const path = glob;\n if (path.length > 0) {\n if (!joined) joined = path;\n else joined += `${SEPARATOR}${path}`;\n }\n }\n if (!joined) return \".\";\n return normalizeGlob(joined, {\n globstar\n });\n}\n\nexport { DELIMITER, SEPARATOR, SEPARATOR_PATTERN, basename, common, dirname, extname, format, fromFileUrl, globToRegExp, isAbsolute, isGlob, join, joinGlobs, normalize, normalizeGlob, parse, relative, resolve, toFileUrl, toNamespacedPath };\n","export const balanced = (a, b, str) => {\n const ma = a instanceof RegExp ? maybeMatch(a, str) : a;\n const mb = b instanceof RegExp ? maybeMatch(b, str) : b;\n const r = ma !== null && mb != null && range(ma, mb, str);\n return (r && {\n start: r[0],\n end: r[1],\n pre: str.slice(0, r[0]),\n body: str.slice(r[0] + ma.length, r[1]),\n post: str.slice(r[1] + mb.length),\n });\n};\nconst maybeMatch = (reg, str) => {\n const m = str.match(reg);\n return m ? m[0] : null;\n};\nexport const range = (a, b, str) => {\n let begs, beg, left, right = undefined, result;\n let ai = str.indexOf(a);\n let bi = str.indexOf(b, ai + 1);\n let i = ai;\n if (ai >= 0 && bi > 0) {\n if (a === b) {\n return [ai, bi];\n }\n begs = [];\n left = str.length;\n while (i >= 0 && !result) {\n if (i === ai) {\n begs.push(i);\n ai = str.indexOf(a, i + 1);\n }\n else if (begs.length === 1) {\n const r = begs.pop();\n if (r !== undefined)\n result = [r, bi];\n }\n else {\n beg = begs.pop();\n if (beg !== undefined && beg < left) {\n left = beg;\n right = bi;\n }\n bi = str.indexOf(b, i + 1);\n }\n i = ai < bi && ai >= 0 ? ai : bi;\n }\n if (begs.length && right !== undefined) {\n result = [left, right];\n }\n }\n return result;\n};\n//# sourceMappingURL=index.js.map","import { balanced } from 'balanced-match';\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;\nexport const EXPANSION_MAX = 100_000;\nfunction numeric(str) {\n return !isNaN(str) ? parseInt(str, 10) : str.charCodeAt(0);\n}\nfunction escapeBraces(str) {\n return str\n .replace(slashPattern, escSlash)\n .replace(openPattern, escOpen)\n .replace(closePattern, escClose)\n .replace(commaPattern, escComma)\n .replace(periodPattern, escPeriod);\n}\nfunction unescapeBraces(str) {\n return str\n .replace(escSlashPattern, '\\\\')\n .replace(escOpenPattern, '{')\n .replace(escClosePattern, '}')\n .replace(escCommaPattern, ',')\n .replace(escPeriodPattern, '.');\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) {\n if (!str) {\n return [''];\n }\n const parts = [];\n const m = balanced('{', '}', str);\n if (!m) {\n return str.split(',');\n }\n const { pre, body, post } = m;\n const p = pre.split(',');\n p[p.length - 1] += '{' + body + '}';\n const postParts = parseCommaParts(post);\n if (post.length) {\n ;\n p[p.length - 1] += postParts.shift();\n p.push.apply(p, postParts);\n }\n parts.push.apply(parts, p);\n return parts;\n}\nexport function expand(str, options = {}) {\n if (!str) {\n return [];\n }\n const { max = EXPANSION_MAX } = options;\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 return expand_(escapeBraces(str), max, true).map(unescapeBraces);\n}\nfunction embrace(str) {\n return '{' + str + '}';\n}\nfunction isPadded(el) {\n return /^-?0\\d/.test(el);\n}\nfunction lte(i, y) {\n return i <= y;\n}\nfunction gte(i, y) {\n return i >= y;\n}\nfunction expand_(str, max, isTop) {\n /** @type {string[]} */\n const expansions = [];\n const m = balanced('{', '}', str);\n if (!m)\n return [str];\n // no need to expand pre, since it is guaranteed to be free of brace-sets\n const pre = m.pre;\n const post = m.post.length ? expand_(m.post, max, false) : [''];\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 }\n else {\n const isNumericSequence = /^-?\\d+\\.\\.-?\\d+(?:\\.\\.-?\\d+)?$/.test(m.body);\n const isAlphaSequence = /^[a-zA-Z]\\.\\.[a-zA-Z](?:\\.\\.-?\\d+)?$/.test(m.body);\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 let n;\n if (isSequence) {\n n = m.body.split(/\\.\\./);\n }\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 // at this point, n is the parts, and we know it's not a comma set\n // with a single entry.\n let 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.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 = [];\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 }\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 }\n else {\n c = z + c;\n }\n }\n }\n }\n N.push(c);\n }\n }\n else {\n N = [];\n for (let j = 0; j < n.length; j++) {\n N.push.apply(N, expand_(n[j], max, false));\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 return expansions;\n}\n//# sourceMappingURL=index.js.map","const MAX_PATTERN_LENGTH = 1024 * 64;\nexport const assertValidPattern = (pattern) => {\n if (typeof pattern !== 'string') {\n throw new TypeError('invalid pattern');\n }\n if (pattern.length > MAX_PATTERN_LENGTH) {\n throw new TypeError('pattern is too long');\n }\n};\n//# sourceMappingURL=assert-valid-pattern.js.map","// translate the various posix character classes into unicode properties\n// this works across all unicode locales\n// { <posix class>: [<translation>, /u flag required, negated]\nconst posixClasses = {\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// only need to escape a few things inside of brace expressions\n// escapes: [ \\ ] -\nconst braceEscape = (s) => s.replace(/[[\\]\\\\-]/g, '\\\\$&');\n// escape all regexp magic characters\nconst regexpEscape = (s) => s.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&');\n// everything has already been escaped, we just have to join\nconst rangesToString = (ranges) => ranges.join('');\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 = (glob, position) => {\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 = [];\n const negs = [];\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 if (c === ']' && sawStart && !escaping) {\n endPos = i + 1;\n break;\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)\n negs.push(unip);\n else\n ranges.push(unip);\n uflag = uflag || u;\n continue WHILE;\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 }\n else if (c === rangeStart) {\n ranges.push(braceEscape(c));\n }\n rangeStart = '';\n i++;\n continue;\n }\n // now might be the start of a range.\n // can be either c-d or c-] or c<more...>] 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 // not the start of a range, just a single character\n ranges.push(braceEscape(c));\n i++;\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 // 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 // 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 (negs.length === 0 &&\n ranges.length === 1 &&\n /^\\\\?.$/.test(ranges[0]) &&\n !negate) {\n const r = ranges[0].length === 2 ? ranges[0].slice(-1) : ranges[0];\n return [regexpEscape(r), false, endPos - pos, false];\n }\n const sranges = '[' + (negate ? '^' : '') + rangesToString(ranges) + ']';\n const snegs = '[' + (negate ? '' : '^') + rangesToString(negs) + ']';\n const comb = ranges.length && negs.length ? '(' + sranges + '|' + snegs + ')'\n : ranges.length ? sranges\n : snegs;\n return [comb, uflag, endPos - pos, true];\n};\n//# sourceMappingURL=brace-expressions.js.map","/**\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 */\nexport const unescape = (s, { windowsPathsNoEscape = false, magicalBraces = true, } = {}) => {\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//# sourceMappingURL=unescape.js.map","// parse a single path portion\nvar _a;\nimport { parseClass } from './brace-expressions.js';\nimport { unescape } from './unescape.js';\nconst types = new Set(['!', '?', '+', '*', '@']);\nconst isExtglobType = (c) => types.has(c);\nconst isExtglobAST = (c) => isExtglobType(c.type);\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// 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// union of the previous two maps\nconst adoptionAnyMap = new Map([\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 ['!', 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// 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// 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) => s.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&');\n// any single thing other than /\nconst qmark = '[^/]';\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// remove the \\ chars that we added if we end up doing a nonmagic compare\n// const deslash = (s: string) => s.replace(/\\\\(.)/g, '$1')\nlet ID = 0;\nexport class AST {\n type;\n #root;\n #hasMagic;\n #uflag = false;\n #parts = [];\n #parent;\n #parentIndex;\n #negs;\n #filledNegs = false;\n #options;\n #toString;\n // set to true if it's an extglob with no children\n // (which really means one child of '')\n #emptyExt = false;\n id = ++ID;\n get depth() {\n return (this.#parent?.depth ?? -1) + 1;\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 constructor(type, parent, options = {}) {\n this.type = type;\n // extglobs are inherently magical\n if (type)\n 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)\n this.#negs.push(this);\n this.#parentIndex = this.#parent ? this.#parent.#parts.length : 0;\n }\n get hasMagic() {\n /* c8 ignore start */\n if (this.#hasMagic !== undefined)\n return this.#hasMagic;\n /* c8 ignore stop */\n for (const p of this.#parts) {\n if (typeof p === 'string')\n continue;\n if (p.type || p.hasMagic)\n 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 // reconstructs the pattern\n toString() {\n return (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 #fillNegs() {\n /* c8 ignore start */\n if (this !== this.#root)\n throw new Error('should only call on root');\n if (this.#filledNegs)\n return this;\n /* c8 ignore stop */\n // call toString() once to fill this out\n this.toString();\n this.#filledNegs = true;\n let n;\n while ((n = this.#negs.pop())) {\n if (n.type !== '!')\n continue;\n // walk up the tree, appending everthing that comes AFTER parentIndex\n let p = n;\n let pp = p.#parent;\n while (pp) {\n for (let i = p.#parentIndex + 1; !pp.type && i < pp.#parts.length; i++) {\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 push(...parts) {\n for (const p of parts) {\n if (p === '')\n continue;\n /* c8 ignore start */\n if (typeof p !== 'string' &&\n !(p instanceof _a && p.#parent === this)) {\n throw new Error('invalid part: ' + p);\n }\n /* c8 ignore stop */\n this.#parts.push(p);\n }\n }\n toJSON() {\n const ret = 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.toJSON())];\n if (this.isStart() && !this.type)\n ret.unshift([]);\n if (this.isEnd() &&\n (this === this.#root ||\n (this.#root.#filledNegs && this.#parent?.type === '!'))) {\n ret.push({});\n }\n return ret;\n }\n isStart() {\n if (this.#root === this)\n return true;\n // if (this.type) return !!this.#parent?.isStart()\n if (!this.#parent?.isStart())\n return false;\n if (this.#parentIndex === 0)\n 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 _a && pp.type === '!')) {\n return false;\n }\n }\n return true;\n }\n isEnd() {\n if (this.#root === this)\n return true;\n if (this.#parent?.type === '!')\n return true;\n if (!this.#parent?.isEnd())\n return false;\n if (!this.type)\n 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 copyIn(part) {\n if (typeof part === 'string')\n this.push(part);\n else\n this.push(part.clone(this));\n }\n clone(parent) {\n const c = new _a(this.type, parent);\n for (const p of this.#parts) {\n c.copyIn(p);\n }\n return c;\n }\n static #parseAST(str, ast, pos, opt, extDepth) {\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 if (inBrace) {\n if (i === braceStart + 1) {\n if (c === '^' || c === '!') {\n braceNeg = true;\n }\n }\n else if (c === ']' && !(i === braceStart + 2 && braceNeg)) {\n inBrace = false;\n }\n acc += c;\n continue;\n }\n else if (c === '[') {\n inBrace = true;\n braceStart = i;\n braceNeg = false;\n acc += c;\n continue;\n }\n // we don't have to check for adoption here, because that's\n // done at the other recursion point.\n const doRecurse = !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 _a(c, ast);\n i = _a.#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 // some kind of extglob, pos is at the (\n // find the next | or )\n let i = pos + 1;\n let part = new _a(null, ast);\n const parts = [];\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 if (inBrace) {\n if (i === braceStart + 1) {\n if (c === '^' || c === '!') {\n braceNeg = true;\n }\n }\n else if (c === ']' && !(i === braceStart + 2 && braceNeg)) {\n inBrace = false;\n }\n acc += c;\n continue;\n }\n else if (c === '[') {\n inBrace = true;\n braceStart = i;\n braceNeg = false;\n acc += c;\n continue;\n }\n const doRecurse = !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 _a(c, part);\n part.push(ext);\n i = _a.#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 _a(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 // 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 #canAdoptWithSpace(child) {\n return this.#canAdopt(child, adoptionWithSpaceMap);\n }\n #canAdopt(child, map = adoptionMap) {\n if (!child ||\n typeof child !== 'object' ||\n child.type !== null ||\n child.#parts.length !== 1 ||\n this.type === null) {\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.#canAdoptType(gc.type, map);\n }\n #canAdoptType(c, map = adoptionAnyMap) {\n return !!map.get(this.type)?.includes(c);\n }\n #adoptWithSpace(child, index) {\n const gc = child.#parts[0];\n const blank = new _a(null, gc, this.options);\n blank.#parts.push('');\n gc.push(blank);\n this.#adopt(child, index);\n }\n #adopt(child, index) {\n const gc = child.#parts[0];\n this.#parts.splice(index, 1, ...gc.#parts);\n for (const p of gc.#parts) {\n if (typeof p === 'object')\n p.#parent = this;\n }\n this.#toString = undefined;\n }\n #canUsurpType(c) {\n const m = usurpMap.get(this.type);\n return !!m?.has(c);\n }\n #canUsurp(child) {\n if (!child ||\n typeof child !== 'object' ||\n child.type !== null ||\n child.#parts.length !== 1 ||\n this.type === null ||\n this.#parts.length !== 1) {\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.#canUsurpType(gc.type);\n }\n #usurp(child) {\n const m = usurpMap.get(this.type);\n const gc = child.#parts[0];\n const nt = m?.get(gc.type);\n /* c8 ignore start - impossible */\n if (!nt)\n 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 static fromGlob(pattern, options = {}) {\n const ast = new _a(null, undefined, options);\n _a.#parseAST(pattern, ast, 0, options, 0);\n return ast;\n }\n // returns the regular expression if there's magic, or the unescaped\n // string if not.\n toMMPattern() {\n // should only be called on root\n /* c8 ignore start */\n if (this !== this.#root)\n 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 = 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 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 get options() {\n return this.#options;\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(allowDot) {\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 = 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] = typeof p === 'string' ?\n _a.#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 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 // '.' and '..' cannot match unless the pattern is that exactly,\n // even if it starts with . or dot:true is set.\n const dotTravAllowed = 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 start =\n needNoTrav ? startNoTraversal\n : needNoDot ? startNoDot\n : '';\n }\n }\n }\n // append the \"end of path portion\" pattern to negation tails\n let end = '';\n if (this.isEnd() &&\n this.#root.#filledNegs &&\n this.#parent?.type === '!') {\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 // 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 const repeated = this.type === '*' || this.type === '+';\n // some kind of extglob\n const start = this.type === '!' ? '(?:(?!(?:' : '(?:';\n let body = this.#partsToRegExp(dot);\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;\n me.#parts = [s];\n me.type = null;\n me.#hasMagic = undefined;\n return [s, unescape(this.toString()), false, false];\n }\n let bodyDotAllowed = !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 // 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 }\n else {\n const close = 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 #flatten() {\n if (!isExtglobAST(this)) {\n for (const p of this.#parts) {\n if (typeof p === 'object') {\n p.#flatten();\n }\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 }\n else if (this.#canAdoptWithSpace(c)) {\n done = false;\n this.#adoptWithSpace(c, i);\n }\n else if (this.#canUsurp(c)) {\n done = false;\n this.#usurp(c);\n }\n }\n }\n } while (!done && ++iterations < 10);\n }\n this.#toString = undefined;\n }\n #partsToRegExp(dot) {\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 static #parseGlob(glob, hasMagic, noEmpty = false) {\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)\n continue;\n inStar = true;\n re += noEmpty && /^[*]+$/.test(glob) ? starNoEmpty : star;\n hasMagic = true;\n continue;\n }\n else {\n inStar = false;\n }\n if (c === '\\\\') {\n if (i === glob.length - 1) {\n re += '\\\\\\\\';\n }\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_a = AST;\n//# sourceMappingURL=ast.js.map","/**\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 = (s, { windowsPathsNoEscape = false, magicalBraces = false, } = {}) => {\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//# sourceMappingURL=escape.js.map","import { expand } from 'brace-expansion';\nimport { assertValidPattern } from './assert-valid-pattern.js';\nimport { AST } from './ast.js';\nimport { escape } from './escape.js';\nimport { unescape } from './unescape.js';\nexport const minimatch = (p, pattern, options = {}) => {\n assertValidPattern(pattern);\n // shortcut: comments match nothing.\n if (!options.nocomment && pattern.charAt(0) === '#') {\n return false;\n }\n return new Minimatch(pattern, options).match(p);\n};\n// Optimized checking for the most common glob patterns.\nconst starDotExtRE = /^\\*+([^+@!?*[(]*)$/;\nconst starDotExtTest = (ext) => (f) => !f.startsWith('.') && f.endsWith(ext);\nconst starDotExtTestDot = (ext) => (f) => f.endsWith(ext);\nconst starDotExtTestNocase = (ext) => {\n ext = ext.toLowerCase();\n return (f) => !f.startsWith('.') && f.toLowerCase().endsWith(ext);\n};\nconst starDotExtTestNocaseDot = (ext) => {\n ext = ext.toLowerCase();\n return (f) => f.toLowerCase().endsWith(ext);\n};\nconst starDotStarRE = /^\\*+\\.\\*+$/;\nconst starDotStarTest = (f) => !f.startsWith('.') && f.includes('.');\nconst starDotStarTestDot = (f) => f !== '.' && f !== '..' && f.includes('.');\nconst dotStarRE = /^\\.\\*+$/;\nconst dotStarTest = (f) => f !== '.' && f !== '..' && f.startsWith('.');\nconst starRE = /^\\*+$/;\nconst starTest = (f) => f.length !== 0 && !f.startsWith('.');\nconst starTestDot = (f) => f.length !== 0 && f !== '.' && f !== '..';\nconst qmarksRE = /^\\?+([^+@!?*[(]*)?$/;\nconst qmarksTestNocase = ([$0, ext = '']) => {\n const noext = qmarksTestNoExt([$0]);\n if (!ext)\n return noext;\n ext = ext.toLowerCase();\n return (f) => noext(f) && f.toLowerCase().endsWith(ext);\n};\nconst qmarksTestNocaseDot = ([$0, ext = '']) => {\n const noext = qmarksTestNoExtDot([$0]);\n if (!ext)\n return noext;\n ext = ext.toLowerCase();\n return (f) => noext(f) && f.toLowerCase().endsWith(ext);\n};\nconst qmarksTestDot = ([$0, ext = '']) => {\n const noext = qmarksTestNoExtDot([$0]);\n return !ext ? noext : (f) => noext(f) && f.endsWith(ext);\n};\nconst qmarksTest = ([$0, ext = '']) => {\n const noext = qmarksTestNoExt([$0]);\n return !ext ? noext : (f) => noext(f) && f.endsWith(ext);\n};\nconst qmarksTestNoExt = ([$0]) => {\n const len = $0.length;\n return (f) => f.length === len && !f.startsWith('.');\n};\nconst qmarksTestNoExtDot = ([$0]) => {\n const len = $0.length;\n return (f) => f.length === len && f !== '.' && f !== '..';\n};\n/* c8 ignore start */\nconst defaultPlatform = (typeof process === 'object' && process ?\n (typeof process.env === 'object' &&\n process.env &&\n process.env.__MINIMATCH_TESTING_PLATFORM__) ||\n process.platform\n : 'posix');\nconst path = {\n win32: { sep: '\\\\' },\n posix: { sep: '/' },\n};\n/* c8 ignore stop */\nexport const sep = defaultPlatform === 'win32' ? path.win32.sep : path.posix.sep;\nminimatch.sep = sep;\nexport const GLOBSTAR = Symbol('globstar **');\nminimatch.GLOBSTAR = GLOBSTAR;\n// any single thing other than /\n// don't need to escape / when using new RegExp()\nconst qmark = '[^/]';\n// * => any number of characters\nconst star = qmark + '*?';\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// not a ^ or / followed by a dot,\n// followed by anything, any number of times.\nconst twoStarNoDot = '(?:(?!(?:\\\\/|^)\\\\.).)*?';\nexport const filter = (pattern, options = {}) => (p) => minimatch(p, pattern, options);\nminimatch.filter = filter;\nconst ext = (a, b = {}) => Object.assign({}, a, b);\nexport const defaults = (def) => {\n if (!def || typeof def !== 'object' || !Object.keys(def).length) {\n return minimatch;\n }\n const orig = minimatch;\n const m = (p, pattern, options = {}) => orig(p, pattern, ext(def, options));\n return Object.assign(m, {\n Minimatch: class Minimatch extends orig.Minimatch {\n constructor(pattern, options = {}) {\n super(pattern, ext(def, options));\n }\n static defaults(options) {\n return orig.defaults(ext(def, options)).Minimatch;\n }\n },\n AST: class AST extends orig.AST {\n /* c8 ignore start */\n constructor(type, parent, options = {}) {\n super(type, parent, ext(def, options));\n }\n /* c8 ignore stop */\n static fromGlob(pattern, options = {}) {\n return orig.AST.fromGlob(pattern, ext(def, options));\n }\n },\n unescape: (s, options = {}) => orig.unescape(s, ext(def, options)),\n escape: (s, options = {}) => orig.escape(s, ext(def, options)),\n filter: (pattern, options = {}) => orig.filter(pattern, ext(def, options)),\n defaults: (options) => orig.defaults(ext(def, options)),\n makeRe: (pattern, options = {}) => orig.makeRe(pattern, ext(def, options)),\n braceExpand: (pattern, options = {}) => orig.braceExpand(pattern, ext(def, options)),\n match: (list, pattern, options = {}) => orig.match(list, pattern, ext(def, options)),\n sep: orig.sep,\n GLOBSTAR: GLOBSTAR,\n });\n};\nminimatch.defaults = defaults;\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 = (pattern, options = {}) => {\n assertValidPattern(pattern);\n // Thanks to Yeting Li <https://github.com/yetingli> 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 return expand(pattern, { max: options.braceExpandMax });\n};\nminimatch.braceExpand = braceExpand;\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.\nexport const makeRe = (pattern, options = {}) => new Minimatch(pattern, options).makeRe();\nminimatch.makeRe = makeRe;\nexport const match = (list, pattern, options = {}) => {\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// replace stuff like \\* with *\nconst globMagic = /[?*]|[+@!]\\(.*?\\)|\\[|\\]/;\nconst regExpEscape = (s) => s.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&');\nexport class Minimatch {\n options;\n set;\n pattern;\n windowsPathsNoEscape;\n nonegate;\n negate;\n comment;\n empty;\n preserveMultipleSlashes;\n partial;\n globSet;\n globParts;\n nocase;\n isWindows;\n platform;\n windowsNoMagicRoot;\n maxGlobstarRecursion;\n regexp;\n constructor(pattern, options = {}) {\n assertValidPattern(pattern);\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');\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 this.globSet = [];\n this.globParts = [];\n this.set = [];\n // make the set of regexps etc.\n this.make();\n }\n hasMagic() {\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')\n return true;\n }\n }\n return false;\n }\n debug(..._) { }\n make() {\n const pattern = this.pattern;\n const options = this.options;\n // empty patterns and comments match nothing.\n if (!options.nocomment && pattern.charAt(0) === '#') {\n this.comment = true;\n return;\n }\n if (!pattern) {\n this.empty = true;\n return;\n }\n // step 1: figure out negation, etc.\n this.parseNegate();\n // step 2: expand braces\n this.globSet = [...new Set(this.braceExpand())];\n if (options.debug) {\n //oxlint-disable-next-line no-console\n this.debug = (...args) => console.error(...args);\n }\n this.debug(this.pattern, this.globSet);\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 // 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 = 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 }\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 this.debug(this.pattern, set);\n // filter out everything that didn't compile properly.\n this.set = set.filter(s => s.indexOf(false) === -1);\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 (p[0] === '' &&\n p[1] === '' &&\n this.globParts[i][2] === '?' &&\n typeof p[3] === 'string' &&\n /^[a-z]:$/i.test(p[3])) {\n p[2] = '?';\n }\n }\n }\n this.debug(this.pattern, this.set);\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) {\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 const { optimizationLevel = 1 } = this.options;\n if (optimizationLevel >= 2) {\n // aggressive optimization for the purpose of fs walking\n globParts = this.firstPhasePreProcess(globParts);\n globParts = this.secondPhasePreProcess(globParts);\n }\n else if (optimizationLevel >= 1) {\n // just basic optimizations to remove some .. parts\n globParts = this.levelOneOptimize(globParts);\n }\n else {\n // just collapse multiple ** portions into one\n globParts = this.adjascentGlobstarOptimize(globParts);\n }\n return globParts;\n }\n // just get rid of adjascent ** portions\n adjascentGlobstarOptimize(globParts) {\n return globParts.map(parts => {\n let gs = -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 // get rid of adjascent ** and resolve .. portions\n levelOneOptimize(globParts) {\n return globParts.map(parts => {\n parts = parts.reduce((set, 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 levelTwoFileOptimize(parts) {\n if (!Array.isArray(parts)) {\n parts = this.slashSplit(parts);\n }\n let didSomething = false;\n do {\n didSomething = false;\n // <pre>/<e>/<rest> -> <pre>/<rest>\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] === '')\n continue;\n if (p === '.' || p === '') {\n didSomething = true;\n parts.splice(i, 1);\n i--;\n }\n }\n if (parts[0] === '.' &&\n parts.length === 2 &&\n (parts[1] === '.' || parts[1] === '')) {\n didSomething = true;\n parts.pop();\n }\n }\n // <pre>/<p>/../<rest> -> <pre>/<rest>\n let dd = 0;\n while (-1 !== (dd = parts.indexOf('..', dd + 1))) {\n const p = parts[dd - 1];\n if (p &&\n p !== '.' &&\n p !== '..' &&\n p !== '**' &&\n !(this.isWindows && /^[a-z]:$/i.test(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 // First phase: single-pattern processing\n // <pre> is 1 or more portions\n // <rest> is 1 or more portions\n // <p> is any portion other than ., .., '', or **\n // <e> 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 // <pre>/**/../<p>/<p>/<rest> -> {<pre>/../<p>/<p>/<rest>,<pre>/**/<p>/<p>/<rest>}\n // <pre>/<e>/<rest> -> <pre>/<rest>\n // <pre>/<p>/../<rest> -> <pre>/<rest>\n // **/**/<rest> -> **/<rest>\n //\n // **/*/<rest> -> */**/<rest> <== not valid because ** doesn't follow\n // this WOULD be allowed if ** did follow symlinks, or * didn't\n firstPhasePreProcess(globParts) {\n let didSomething = false;\n do {\n didSomething = false;\n // <pre>/**/../<p>/<p>/<rest> -> {<pre>/../<p>/<p>/<rest>,<pre>/**/<p>/<p>/<rest>}\n for (let parts of globParts) {\n let gs = -1;\n while (-1 !== (gs = parts.indexOf('**', gs + 1))) {\n let gss = gs;\n while (parts[gss + 1] === '**') {\n // <pre>/**/**/<rest> -> <pre>/**/<rest>\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 let next = parts[gs + 1];\n const p = parts[gs + 2];\n const p2 = parts[gs + 3];\n if (next !== '..')\n continue;\n if (!p ||\n p === '.' ||\n p === '..' ||\n !p2 ||\n p2 === '.' ||\n p2 === '..') {\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 // <pre>/<e>/<rest> -> <pre>/<rest>\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] === '')\n continue;\n if (p === '.' || p === '') {\n didSomething = true;\n parts.splice(i, 1);\n i--;\n }\n }\n if (parts[0] === '.' &&\n parts.length === 2 &&\n (parts[1] === '.' || parts[1] === '')) {\n didSomething = true;\n parts.pop();\n }\n }\n // <pre>/<p>/../<rest> -> <pre>/<rest>\n let dd = 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)\n parts.push('');\n dd -= 2;\n }\n }\n }\n } while (didSomething);\n return globParts;\n }\n // second phase: multi-pattern dedupes\n // {<pre>/*/<rest>,<pre>/<p>/<rest>} -> <pre>/*/<rest>\n // {<pre>/<rest>,<pre>/<rest>} -> <pre>/<rest>\n // {<pre>/**/<rest>,<pre>/<rest>} -> <pre>/**/<rest>\n //\n // {<pre>/**/<rest>,<pre>/**/<p>/<rest>} -> <pre>/**/<rest>\n // ^-- not valid because ** doens't follow symlinks\n secondPhasePreProcess(globParts) {\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(globParts[i], globParts[j], !this.preserveMultipleSlashes);\n if (matched) {\n globParts[i] = [];\n globParts[j] = matched;\n break;\n }\n }\n }\n return globParts.filter(gs => gs.length);\n }\n partsMatch(a, b, emptyGSMatch = false) {\n let ai = 0;\n let bi = 0;\n let result = [];\n let which = '';\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 }\n else if (emptyGSMatch && a[ai] === '**' && b[bi] === a[ai + 1]) {\n result.push(a[ai]);\n ai++;\n }\n else if (emptyGSMatch && b[bi] === '**' && a[ai] === b[bi + 1]) {\n result.push(b[bi]);\n bi++;\n }\n else if (a[ai] === '*' &&\n b[bi] &&\n (this.options.dot || !b[bi].startsWith('.')) &&\n b[bi] !== '**') {\n if (which === 'b')\n return false;\n which = 'a';\n result.push(a[ai]);\n ai++;\n bi++;\n }\n else if (b[bi] === '*' &&\n a[ai] &&\n (this.options.dot || !a[ai].startsWith('.')) &&\n a[ai] !== '**') {\n if (which === 'a')\n return false;\n which = 'b';\n result.push(b[bi]);\n ai++;\n bi++;\n }\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 parseNegate() {\n if (this.nonegate)\n return;\n const pattern = this.pattern;\n let negate = false;\n let negateOffset = 0;\n for (let i = 0; i < pattern.length && pattern.charAt(i) === '!'; i++) {\n negate = !negate;\n negateOffset++;\n }\n if (negateOffset)\n this.pattern = pattern.slice(negateOffset);\n this.negate = negate;\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, pattern, partial = false) {\n let fileStartIndex = 0;\n let patternStartIndex = 0;\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 = !fileDrive &&\n file[0] === '' &&\n file[1] === '' &&\n file[2] === '?' &&\n /^[a-z]:$/i.test(file[3]);\n const patternDrive = typeof pattern[0] === 'string' && /^[a-z]:$/i.test(pattern[0]);\n const patternUNC = !patternDrive &&\n pattern[0] === '' &&\n pattern[1] === '' &&\n pattern[2] === '?' &&\n typeof pattern[3] === 'string' &&\n /^[a-z]:$/i.test(pattern[3]);\n const fdi = fileUNC ? 3\n : fileDrive ? 0\n : undefined;\n const pdi = patternUNC ? 3\n : patternDrive ? 0\n : undefined;\n if (typeof fdi === 'number' && typeof pdi === 'number') {\n const [fd, pd] = [\n file[fdi],\n pattern[pdi],\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 // 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 if (pattern.includes(GLOBSTAR)) {\n return this.#matchGlobstar(file, pattern, partial, fileStartIndex, patternStartIndex);\n }\n return this.#matchOne(file, pattern, partial, fileStartIndex, patternStartIndex);\n }\n #matchGlobstar(file, pattern, partial, fileIndex, patternIndex) {\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 // 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] = 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 // 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 // if the last portion is not empty, it MUST match the end\n // check the tail\n let fileTailMatch = 0;\n if (tail.length) {\n // if head + tail > file, then we cannot possibly match\n if (tail.length + fileIndex > file.length)\n return false;\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 }\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 (file[file.length - 1] !== '' ||\n fileIndex + tail.length === file.length) {\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 // now we know the tail matches!\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 (f === '.' ||\n f === '..' ||\n (!this.options.dot && f.startsWith('.'))) {\n return false;\n }\n }\n // in partial mode, we just need to get past all file parts\n return partial || sawSome;\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 = [[[], 0]];\n let currentBody = bodySegments[0];\n let nonGsParts = 0;\n const nonGsPartsSums = [0];\n for (const b of body) {\n if (b === GLOBSTAR) {\n nonGsPartsSums.push(nonGsParts);\n currentBody = [[], 0];\n bodySegments.push(currentBody);\n }\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--] + b[0].length);\n }\n return !!this.#matchGlobStarBodySections(file, bodySegments, fileIndex, 0, partial, 0, !!fileTailMatch);\n }\n // return false for \"nope, not matching\"\n // return null for \"not matching, cannot keep trying\"\n #matchGlobStarBodySections(file, \n // pattern section, last possible position for it\n bodySegments, fileIndex, bodyIndex, partial, globStarDepth, sawTail) {\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 (f === '.' ||\n f === '..' ||\n (!this.options.dot && f.startsWith('.'))) {\n return false;\n }\n }\n return sawTail;\n }\n // have a non-globstar body section to test\n const [body, after] = bs;\n while (fileIndex <= after) {\n const m = this.#matchOne(file.slice(0, fileIndex + body.length), body, partial, fileIndex, 0);\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(file, bodySegments, fileIndex + body.length, bodyIndex + 1, partial, globStarDepth + 1, sawTail);\n if (sub !== false) {\n return sub;\n }\n }\n const f = file[fileIndex];\n if (f === '.' ||\n f === '..' ||\n (!this.options.dot && f.startsWith('.'))) {\n return false;\n }\n fileIndex++;\n }\n // walked off. no point continuing\n return partial || null;\n }\n #matchOne(file, pattern, partial, fileIndex, patternIndex) {\n let fi;\n let pi;\n let pl;\n let fl;\n for (fi = fileIndex,\n pi = patternIndex,\n fl = file.length,\n pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {\n this.debug('matchOne loop');\n let p = pattern[pi];\n let f = file[fi];\n this.debug(pattern, p, f);\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 // something other than **\n // non-magic patterns just have to match exactly\n // patterns with magic have been turned into regexps.\n let hit;\n if (typeof p === 'string') {\n hit = f === p;\n this.debug('string match', p, f, hit);\n }\n else {\n hit = p.test(f);\n this.debug('pattern match', p, f, hit);\n }\n if (!hit)\n return false;\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 // 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 }\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 }\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 /* c8 ignore start */\n }\n else {\n // should be unreachable.\n throw new Error('wtf?');\n }\n /* c8 ignore stop */\n }\n braceExpand() {\n return braceExpand(this.pattern, this.options);\n }\n parse(pattern) {\n assertValidPattern(pattern);\n const options = this.options;\n // shortcuts\n if (pattern === '**')\n return GLOBSTAR;\n if (pattern === '')\n return '';\n // far and away, the most common glob pattern parts are\n // *, *.*, and *.<ext> Add a fast check method for those.\n let m;\n let fastTest = null;\n if ((m = pattern.match(starRE))) {\n fastTest = options.dot ? starTestDot : starTest;\n }\n else if ((m = pattern.match(starDotExtRE))) {\n fastTest = (options.nocase ?\n options.dot ?\n starDotExtTestNocaseDot\n : starDotExtTestNocase\n : options.dot ? starDotExtTestDot\n : starDotExtTest)(m[1]);\n }\n else if ((m = pattern.match(qmarksRE))) {\n fastTest = (options.nocase ?\n options.dot ?\n qmarksTestNocaseDot\n : qmarksTestNocase\n : options.dot ? qmarksTestDot\n : qmarksTest)(m);\n }\n else if ((m = pattern.match(starDotStarRE))) {\n fastTest = options.dot ? starDotStarTestDot : starDotStarTest;\n }\n else if ((m = pattern.match(dotStarRE))) {\n fastTest = dotStarTest;\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 makeRe() {\n if (this.regexp || this.regexp === false)\n return this.regexp;\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 if (!set.length) {\n this.regexp = false;\n return this.regexp;\n }\n const options = this.options;\n const twoStar = options.noglobstar ? star\n : options.dot ? twoStarDot\n : twoStarNoDot;\n const flags = new Set(options.nocase ? ['i'] : []);\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 = pattern.map(p => {\n if (p instanceof RegExp) {\n for (const f of p.flags.split(''))\n flags.add(f);\n }\n return (typeof p === 'string' ? regExpEscape(p)\n : p === GLOBSTAR ? GLOBSTAR\n : p._src);\n });\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 }\n else {\n pp[i] = twoStar;\n }\n }\n else if (next === undefined) {\n pp[i - 1] = prev + '(?:\\\\/|\\\\/' + twoStar + ')?';\n }\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 // 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 = [];\n for (let i = 1; i <= filtered.length; i++) {\n prefixes.push(filtered.slice(0, i).join('/'));\n }\n return '(?:' + prefixes.join('|') + ')';\n }\n return filtered.join('/');\n })\n .join('|');\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 // 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 // can match anything, as long as it's not this.\n if (this.negate)\n re = '^(?!' + re + ').+$';\n try {\n this.regexp = new RegExp(re, [...flags].join(''));\n /* c8 ignore start */\n }\n catch {\n // should be impossible\n this.regexp = false;\n }\n /* c8 ignore stop */\n return this.regexp;\n }\n slashSplit(p) {\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 }\n else if (this.isWindows && /^\\/\\/[^/]+/.test(p)) {\n // add an extra '' for the one we lose\n return ['', ...p.split(/\\/+/)];\n }\n else {\n return p.split(/\\/+/);\n }\n }\n match(f, 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 if (f === '/' && partial) {\n return true;\n }\n const options = this.options;\n // windows: need to use /, not \\\n if (this.isWindows) {\n f = f.split('\\\\').join('/');\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 // 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 const set = this.set;\n this.debug(this.pattern, 'set', set);\n // Find the basename of the path by looking for the last non-empty segment\n let filename = 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 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 // 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 static defaults(def) {\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//# sourceMappingURL=index.js.map","/**\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\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","'use strict';\n\nmodule.exports = (flag, argv = process.argv) => {\n\tconst prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');\n\tconst position = argv.indexOf(prefix + flag);\n\tconst terminatorPosition = argv.indexOf('--');\n\treturn position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);\n};\n","'use strict';\nconst os = require('os');\nconst tty = require('tty');\nconst hasFlag = require('has-flag');\n\nconst {env} = process;\n\nlet forceColor;\nif (hasFlag('no-color') ||\n\thasFlag('no-colors') ||\n\thasFlag('color=false') ||\n\thasFlag('color=never')) {\n\tforceColor = 0;\n} else if (hasFlag('color') ||\n\thasFlag('colors') ||\n\thasFlag('color=true') ||\n\thasFlag('color=always')) {\n\tforceColor = 1;\n}\n\nif ('FORCE_COLOR' in env) {\n\tif (env.FORCE_COLOR === 'true') {\n\t\tforceColor = 1;\n\t} else if (env.FORCE_COLOR === 'false') {\n\t\tforceColor = 0;\n\t} else {\n\t\tforceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);\n\t}\n}\n\nfunction translateLevel(level) {\n\tif (level === 0) {\n\t\treturn false;\n\t}\n\n\treturn {\n\t\tlevel,\n\t\thasBasic: true,\n\t\thas256: level >= 2,\n\t\thas16m: level >= 3\n\t};\n}\n\nfunction supportsColor(haveStream, streamIsTTY) {\n\tif (forceColor === 0) {\n\t\treturn 0;\n\t}\n\n\tif (hasFlag('color=16m') ||\n\t\thasFlag('color=full') ||\n\t\thasFlag('color=truecolor')) {\n\t\treturn 3;\n\t}\n\n\tif (hasFlag('color=256')) {\n\t\treturn 2;\n\t}\n\n\tif (haveStream && !streamIsTTY && forceColor === undefined) {\n\t\treturn 0;\n\t}\n\n\tconst min = forceColor || 0;\n\n\tif (env.TERM === 'dumb') {\n\t\treturn min;\n\t}\n\n\tif (process.platform === 'win32') {\n\t\t// Windows 10 build 10586 is the first Windows release that supports 256 colors.\n\t\t// Windows 10 build 14931 is the first release that supports 16m/TrueColor.\n\t\tconst osRelease = os.release().split('.');\n\t\tif (\n\t\t\tNumber(osRelease[0]) >= 10 &&\n\t\t\tNumber(osRelease[2]) >= 10586\n\t\t) {\n\t\t\treturn Number(osRelease[2]) >= 14931 ? 3 : 2;\n\t\t}\n\n\t\treturn 1;\n\t}\n\n\tif ('CI' in env) {\n\t\tif (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI', 'GITHUB_ACTIONS', 'BUILDKITE'].some(sign => sign in env) || env.CI_NAME === 'codeship') {\n\t\t\treturn 1;\n\t\t}\n\n\t\treturn min;\n\t}\n\n\tif ('TEAMCITY_VERSION' in env) {\n\t\treturn /^(9\\.(0*[1-9]\\d*)\\.|\\d{2,}\\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;\n\t}\n\n\tif (env.COLORTERM === 'truecolor') {\n\t\treturn 3;\n\t}\n\n\tif ('TERM_PROGRAM' in env) {\n\t\tconst version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);\n\n\t\tswitch (env.TERM_PROGRAM) {\n\t\t\tcase 'iTerm.app':\n\t\t\t\treturn version >= 3 ? 3 : 2;\n\t\t\tcase 'Apple_Terminal':\n\t\t\t\treturn 2;\n\t\t\t// No default\n\t\t}\n\t}\n\n\tif (/-256(color)?$/i.test(env.TERM)) {\n\t\treturn 2;\n\t}\n\n\tif (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {\n\t\treturn 1;\n\t}\n\n\tif ('COLORTERM' in env) {\n\t\treturn 1;\n\t}\n\n\treturn min;\n}\n\nfunction getSupportLevel(stream) {\n\tconst level = supportsColor(stream, stream && stream.isTTY);\n\treturn translateLevel(level);\n}\n\nmodule.exports = {\n\tsupportsColor: getSupportLevel,\n\tstdout: translateLevel(supportsColor(true, tty.isatty(1))),\n\tstderr: translateLevel(supportsColor(true, tty.isatty(2)))\n};\n","/**\n * Module dependencies.\n */\n\nconst tty = require('tty');\nconst util = require('util');\n\n/**\n * This is the Node.js implementation of `debug()`.\n */\n\nexports.init = init;\nexports.log = log;\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.destroy = util.deprecate(\n\t() => {},\n\t'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'\n);\n\n/**\n * Colors.\n */\n\nexports.colors = [6, 2, 3, 4, 5, 1];\n\ntry {\n\t// Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)\n\t// eslint-disable-next-line import/no-extraneous-dependencies\n\tconst supportsColor = require('supports-color');\n\n\tif (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {\n\t\texports.colors = [\n\t\t\t20,\n\t\t\t21,\n\t\t\t26,\n\t\t\t27,\n\t\t\t32,\n\t\t\t33,\n\t\t\t38,\n\t\t\t39,\n\t\t\t40,\n\t\t\t41,\n\t\t\t42,\n\t\t\t43,\n\t\t\t44,\n\t\t\t45,\n\t\t\t56,\n\t\t\t57,\n\t\t\t62,\n\t\t\t63,\n\t\t\t68,\n\t\t\t69,\n\t\t\t74,\n\t\t\t75,\n\t\t\t76,\n\t\t\t77,\n\t\t\t78,\n\t\t\t79,\n\t\t\t80,\n\t\t\t81,\n\t\t\t92,\n\t\t\t93,\n\t\t\t98,\n\t\t\t99,\n\t\t\t112,\n\t\t\t113,\n\t\t\t128,\n\t\t\t129,\n\t\t\t134,\n\t\t\t135,\n\t\t\t148,\n\t\t\t149,\n\t\t\t160,\n\t\t\t161,\n\t\t\t162,\n\t\t\t163,\n\t\t\t164,\n\t\t\t165,\n\t\t\t166,\n\t\t\t167,\n\t\t\t168,\n\t\t\t169,\n\t\t\t170,\n\t\t\t171,\n\t\t\t172,\n\t\t\t173,\n\t\t\t178,\n\t\t\t179,\n\t\t\t184,\n\t\t\t185,\n\t\t\t196,\n\t\t\t197,\n\t\t\t198,\n\t\t\t199,\n\t\t\t200,\n\t\t\t201,\n\t\t\t202,\n\t\t\t203,\n\t\t\t204,\n\t\t\t205,\n\t\t\t206,\n\t\t\t207,\n\t\t\t208,\n\t\t\t209,\n\t\t\t214,\n\t\t\t215,\n\t\t\t220,\n\t\t\t221\n\t\t];\n\t}\n} catch (error) {\n\t// Swallow - we only care if `supports-color` is available; it doesn't have to be.\n}\n\n/**\n * Build up the default `inspectOpts` object from the environment variables.\n *\n * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js\n */\n\nexports.inspectOpts = Object.keys(process.env).filter(key => {\n\treturn /^debug_/i.test(key);\n}).reduce((obj, key) => {\n\t// Camel-case\n\tconst prop = key\n\t\t.substring(6)\n\t\t.toLowerCase()\n\t\t.replace(/_([a-z])/g, (_, k) => {\n\t\t\treturn k.toUpperCase();\n\t\t});\n\n\t// Coerce string value into JS value\n\tlet val = process.env[key];\n\tif (/^(yes|on|true|enabled)$/i.test(val)) {\n\t\tval = true;\n\t} else if (/^(no|off|false|disabled)$/i.test(val)) {\n\t\tval = false;\n\t} else if (val === 'null') {\n\t\tval = null;\n\t} else {\n\t\tval = Number(val);\n\t}\n\n\tobj[prop] = val;\n\treturn obj;\n}, {});\n\n/**\n * Is stdout a TTY? Colored output is enabled when `true`.\n */\n\nfunction useColors() {\n\treturn 'colors' in exports.inspectOpts ?\n\t\tBoolean(exports.inspectOpts.colors) :\n\t\ttty.isatty(process.stderr.fd);\n}\n\n/**\n * Adds ANSI color escape codes if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n\tconst {namespace: name, useColors} = this;\n\n\tif (useColors) {\n\t\tconst c = this.color;\n\t\tconst colorCode = '\\u001B[3' + (c < 8 ? c : '8;5;' + c);\n\t\tconst prefix = ` ${colorCode};1m${name} \\u001B[0m`;\n\n\t\targs[0] = prefix + args[0].split('\\n').join('\\n' + prefix);\n\t\targs.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\\u001B[0m');\n\t} else {\n\t\targs[0] = getDate() + name + ' ' + args[0];\n\t}\n}\n\nfunction getDate() {\n\tif (exports.inspectOpts.hideDate) {\n\t\treturn '';\n\t}\n\treturn new Date().toISOString() + ' ';\n}\n\n/**\n * Invokes `util.formatWithOptions()` with the specified arguments and writes to stderr.\n */\n\nfunction log(...args) {\n\treturn process.stderr.write(util.formatWithOptions(exports.inspectOpts, ...args) + '\\n');\n}\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\nfunction save(namespaces) {\n\tif (namespaces) {\n\t\tprocess.env.DEBUG = namespaces;\n\t} else {\n\t\t// If you set a process.env field to null or undefined, it gets cast to the\n\t\t// string 'null' or 'undefined'. Just delete instead.\n\t\tdelete process.env.DEBUG;\n\t}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\n\nfunction load() {\n\treturn process.env.DEBUG;\n}\n\n/**\n * Init logic for `debug` instances.\n *\n * Create a new `inspectOpts` object in case `useColors` is set\n * differently for a particular `debug` instance.\n */\n\nfunction init(debug) {\n\tdebug.inspectOpts = {};\n\n\tconst keys = Object.keys(exports.inspectOpts);\n\tfor (let i = 0; i < keys.length; i++) {\n\t\tdebug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];\n\t}\n}\n\nmodule.exports = require('./common')(exports);\n\nconst {formatters} = module.exports;\n\n/**\n * Map %o to `util.inspect()`, all on a single line.\n */\n\nformatters.o = function (v) {\n\tthis.inspectOpts.colors = this.useColors;\n\treturn util.inspect(v, this.inspectOpts)\n\t\t.split('\\n')\n\t\t.map(str => str.trim())\n\t\t.join(' ');\n};\n\n/**\n * Map %O to `util.inspect()`, allowing multiple lines if needed.\n */\n\nformatters.O = function (v) {\n\tthis.inspectOpts.colors = this.useColors;\n\treturn util.inspect(v, this.inspectOpts);\n};\n","/**\n * Detect Electron renderer / nwjs process, which is node, but we should\n * treat as a browser.\n */\n\nif (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) {\n\tmodule.exports = require('./browser.js');\n} else {\n\tmodule.exports = require('./node.js');\n}\n","// @ts-self-types=\"./index.d.ts\"\n/**\n * @fileoverview Merge Strategy\n */\n\n//-----------------------------------------------------------------------------\n// Class\n//-----------------------------------------------------------------------------\n\n/**\n * Container class for several different merge strategies.\n */\nclass MergeStrategy {\n\t/**\n\t * Merges two keys by overwriting the first with the second.\n\t * @template TValue1 The type of the value from the first object key.\n\t * @template TValue2 The type of the value from the second object key.\n\t * @param {TValue1} value1 The value from the first object key.\n\t * @param {TValue2} value2 The value from the second object key.\n\t * @returns {TValue2} The second value.\n\t */\n\tstatic overwrite(value1, value2) {\n\t\treturn value2;\n\t}\n\n\t/**\n\t * Merges two keys by replacing the first with the second only if the\n\t * second is defined.\n\t * @template TValue1 The type of the value from the first object key.\n\t * @template TValue2 The type of the value from the second object key.\n\t * @param {TValue1} value1 The value from the first object key.\n\t * @param {TValue2} value2 The value from the second object key.\n\t * @returns {TValue1 | TValue2} The second value if it is defined.\n\t */\n\tstatic replace(value1, value2) {\n\t\tif (typeof value2 !== \"undefined\") {\n\t\t\treturn value2;\n\t\t}\n\n\t\treturn value1;\n\t}\n\n\t/**\n\t * Merges two properties by assigning properties from the second to the first.\n\t * @template {Record<string | number | symbol, unknown> | undefined} TValue1 The type of the value from the first object key.\n\t * @template {Record<string | number | symbol, unknown>} TValue2 The type of the value from the second object key.\n\t * @param {TValue1} value1 The value from the first object key.\n\t * @param {TValue2} value2 The value from the second object key.\n\t * @returns {Omit<TValue1, keyof TValue2> & TValue2} A new object containing properties from both value1 and\n\t * value2.\n\t */\n\tstatic assign(value1, value2) {\n\t\treturn Object.assign({}, value1, value2);\n\t}\n}\n\n/**\n * @fileoverview Validation Strategy\n */\n\n//-----------------------------------------------------------------------------\n// Class\n//-----------------------------------------------------------------------------\n\n/**\n * Container class for several different validation strategies.\n */\nclass ValidationStrategy {\n\t/**\n\t * Validates that a value is an array.\n\t * @param {unknown} value The value to validate.\n\t * @returns {void}\n\t * @throws {TypeError} If the value is invalid.\n\t */\n\tstatic array(value) {\n\t\tif (!Array.isArray(value)) {\n\t\t\tthrow new TypeError(\"Expected an array.\");\n\t\t}\n\t}\n\n\t/**\n\t * Validates that a value is a boolean.\n\t * @param {unknown} value The value to validate.\n\t * @returns {void}\n\t * @throws {TypeError} If the value is invalid.\n\t */\n\tstatic boolean(value) {\n\t\tif (typeof value !== \"boolean\") {\n\t\t\tthrow new TypeError(\"Expected a boolean.\");\n\t\t}\n\t}\n\n\t/**\n\t * Validates that a value is a number.\n\t * @param {unknown} value The value to validate.\n\t * @returns {void}\n\t * @throws {TypeError} If the value is invalid.\n\t */\n\tstatic number(value) {\n\t\tif (typeof value !== \"number\") {\n\t\t\tthrow new TypeError(\"Expected a number.\");\n\t\t}\n\t}\n\n\t/**\n\t * Validates that a value is an object.\n\t * @param {unknown} value The value to validate.\n\t * @returns {void}\n\t * @throws {TypeError} If the value is invalid.\n\t */\n\tstatic object(value) {\n\t\tif (!value || typeof value !== \"object\") {\n\t\t\tthrow new TypeError(\"Expected an object.\");\n\t\t}\n\t}\n\n\t/**\n\t * Validates that a value is an object or null.\n\t * @param {unknown} value The value to validate.\n\t * @returns {void}\n\t * @throws {TypeError} If the value is invalid.\n\t */\n\tstatic \"object?\"(value) {\n\t\tif (typeof value !== \"object\") {\n\t\t\tthrow new TypeError(\"Expected an object or null.\");\n\t\t}\n\t}\n\n\t/**\n\t * Validates that a value is a string.\n\t * @param {unknown} value The value to validate.\n\t * @returns {void}\n\t * @throws {TypeError} If the value is invalid.\n\t */\n\tstatic string(value) {\n\t\tif (typeof value !== \"string\") {\n\t\t\tthrow new TypeError(\"Expected a string.\");\n\t\t}\n\t}\n\n\t/**\n\t * Validates that a value is a non-empty string.\n\t * @param {unknown} value The value to validate.\n\t * @returns {void}\n\t * @throws {TypeError} If the value is invalid.\n\t */\n\tstatic \"string!\"(value) {\n\t\tif (typeof value !== \"string\" || value.length === 0) {\n\t\t\tthrow new TypeError(\"Expected a non-empty string.\");\n\t\t}\n\t}\n}\n\n/**\n * @fileoverview Object Schema\n */\n\n\n//-----------------------------------------------------------------------------\n// Types\n//-----------------------------------------------------------------------------\n\n/** @import * as $typests from \"./types.ts\"; */\n/** @typedef {$typests.BuiltInMergeStrategy} BuiltInMergeStrategy */\n/** @typedef {$typests.BuiltInValidationStrategy} BuiltInValidationStrategy */\n/** @typedef {$typests.CustomMergeStrategy} CustomMergeStrategy */\n/** @typedef {$typests.CustomValidationStrategy} CustomValidationStrategy */\n/** @typedef {$typests.ObjectDefinition} ObjectDefinition */\n/** @typedef {$typests.PropertyDefinition} PropertyDefinition */\n/** @typedef {$typests.PropertyDefinitionWithSchema} PropertyDefinitionWithSchema */\n/** @typedef {$typests.PropertyDefinitionWithStrategies} PropertyDefinitionWithStrategies */\n\n//-----------------------------------------------------------------------------\n// Private\n//-----------------------------------------------------------------------------\n\n/**\n * Validates a schema strategy.\n * @param {string} name The name of the key this strategy is for.\n * @param {PropertyDefinition} definition The strategy for the object key.\n * @returns {void}\n * @throws {TypeError} When the strategy is missing a name.\n * @throws {TypeError} When the strategy is missing a merge() method.\n * @throws {TypeError} When the strategy is missing a validate() method.\n */\nfunction validateDefinition(name, definition) {\n\tlet hasSchema = false;\n\tif (definition.schema) {\n\t\tif (typeof definition.schema === \"object\") {\n\t\t\thasSchema = true;\n\t\t} else {\n\t\t\tthrow new TypeError(\"Schema must be an object.\");\n\t\t}\n\t}\n\n\tif (typeof definition.merge === \"string\") {\n\t\tif (!(definition.merge in MergeStrategy)) {\n\t\t\tthrow new TypeError(\n\t\t\t\t`Definition for key \"${name}\" missing valid merge strategy.`,\n\t\t\t);\n\t\t}\n\t} else if (!hasSchema && typeof definition.merge !== \"function\") {\n\t\tthrow new TypeError(\n\t\t\t`Definition for key \"${name}\" must have a merge property.`,\n\t\t);\n\t}\n\n\tif (typeof definition.validate === \"string\") {\n\t\tif (!(definition.validate in ValidationStrategy)) {\n\t\t\tthrow new TypeError(\n\t\t\t\t`Definition for key \"${name}\" missing valid validation strategy.`,\n\t\t\t);\n\t\t}\n\t} else if (!hasSchema && typeof definition.validate !== \"function\") {\n\t\tthrow new TypeError(\n\t\t\t`Definition for key \"${name}\" must have a validate() method.`,\n\t\t);\n\t}\n}\n\n//-----------------------------------------------------------------------------\n// Errors\n//-----------------------------------------------------------------------------\n\n/**\n * Error when an unexpected key is found.\n */\nclass UnexpectedKeyError extends Error {\n\t/**\n\t * Creates a new instance.\n\t * @param {string} key The key that was unexpected.\n\t */\n\tconstructor(key) {\n\t\tsuper(`Unexpected key \"${key}\" found.`);\n\t}\n}\n\n/**\n * Error when a required key is missing.\n */\nclass MissingKeyError extends Error {\n\t/**\n\t * Creates a new instance.\n\t * @param {string} key The key that was missing.\n\t */\n\tconstructor(key) {\n\t\tsuper(`Missing required key \"${key}\".`);\n\t}\n}\n\n/**\n * Error when a key requires other keys that are missing.\n */\nclass MissingDependentKeysError extends Error {\n\t/**\n\t * Creates a new instance.\n\t * @param {string} key The key that was unexpected.\n\t * @param {Array<string>} requiredKeys The keys that are required.\n\t */\n\tconstructor(key, requiredKeys) {\n\t\tsuper(`Key \"${key}\" requires keys \"${requiredKeys.join('\", \"')}\".`);\n\t}\n}\n\n/**\n * Wrapper error for errors occuring during a merge or validate operation.\n */\nclass WrapperError extends Error {\n\t/**\n\t * Creates a new instance.\n\t * @param {string} key The object key causing the error.\n\t * @param {Error} source The source error.\n\t */\n\tconstructor(key, source) {\n\t\tsuper(`Key \"${key}\": ${source.message}`, { cause: source });\n\n\t\t// copy over custom properties that aren't represented\n\t\tfor (const sourceKey of Object.keys(source)) {\n\t\t\tif (!(sourceKey in this)) {\n\t\t\t\tthis[sourceKey] = source[sourceKey];\n\t\t\t}\n\t\t}\n\t}\n}\n\n//-----------------------------------------------------------------------------\n// Main\n//-----------------------------------------------------------------------------\n\n/**\n * Represents an object validation/merging schema.\n */\nclass ObjectSchema {\n\t/**\n\t * Track all definitions in the schema by key.\n\t * @type {Map<string, PropertyDefinition>}\n\t */\n\t#definitions = new Map();\n\n\t/**\n\t * Separately track any keys that are required for faster validation.\n\t * @type {Map<string, PropertyDefinition>}\n\t */\n\t#requiredKeys = new Map();\n\n\t/**\n\t * Creates a new instance.\n\t * @param {ObjectDefinition} definitions The schema definitions.\n\t * @throws {Error} When the definitions are missing or invalid.\n\t */\n\tconstructor(definitions) {\n\t\tif (!definitions) {\n\t\t\tthrow new Error(\"Schema definitions missing.\");\n\t\t}\n\n\t\t// add in all strategies\n\t\tfor (const key of Object.keys(definitions)) {\n\t\t\tconst definition = definitions[key];\n\n\t\t\tvalidateDefinition(key, definition);\n\n\t\t\tlet normalizedDefinition = definition;\n\n\t\t\t// normalize merge and validate methods if subschema is present\n\t\t\tif (typeof normalizedDefinition.schema === \"object\") {\n\t\t\t\tconst schema = new ObjectSchema(normalizedDefinition.schema);\n\t\t\t\tnormalizedDefinition = {\n\t\t\t\t\t...normalizedDefinition,\n\t\t\t\t\tmerge(first = {}, second = {}) {\n\t\t\t\t\t\treturn schema.merge(first, second);\n\t\t\t\t\t},\n\t\t\t\t\tvalidate(value) {\n\t\t\t\t\t\tValidationStrategy.object(value);\n\t\t\t\t\t\tschema.validate(value);\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t}\n\n\t\t\t// normalize the merge method in case there's a string\n\t\t\tif (typeof normalizedDefinition.merge === \"string\") {\n\t\t\t\tnormalizedDefinition = {\n\t\t\t\t\t...normalizedDefinition,\n\t\t\t\t\tmerge: MergeStrategy[normalizedDefinition.merge],\n\t\t\t\t};\n\t\t\t}\n\n\t\t\t// normalize the validate method in case there's a string\n\t\t\tif (typeof normalizedDefinition.validate === \"string\") {\n\t\t\t\tnormalizedDefinition = {\n\t\t\t\t\t...normalizedDefinition,\n\t\t\t\t\tvalidate: ValidationStrategy[normalizedDefinition.validate],\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tthis.#definitions.set(key, normalizedDefinition);\n\n\t\t\tif (normalizedDefinition.required) {\n\t\t\t\tthis.#requiredKeys.set(key, normalizedDefinition);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Determines if a strategy has been registered for the given object key.\n\t * @param {string} key The object key to find a strategy for.\n\t * @returns {boolean} True if the key has a strategy registered, false if not.\n\t */\n\thasKey(key) {\n\t\treturn this.#definitions.has(key);\n\t}\n\n\t/**\n\t * Merges objects together to create a new object comprised of the keys\n\t * of the all objects. Keys are merged based on the each key's merge\n\t * strategy.\n\t * @param {...Object} objects The objects to merge.\n\t * @returns {Object} A new object with a mix of all objects' keys.\n\t * @throws {TypeError} If any object is invalid.\n\t */\n\tmerge(...objects) {\n\t\t// double check arguments\n\t\tif (objects.length < 2) {\n\t\t\tthrow new TypeError(\"merge() requires at least two arguments.\");\n\t\t}\n\n\t\tif (\n\t\t\tobjects.some(\n\t\t\t\tobject => object === null || typeof object !== \"object\",\n\t\t\t)\n\t\t) {\n\t\t\tthrow new TypeError(\"All arguments must be objects.\");\n\t\t}\n\n\t\treturn objects.reduce((result, object) => {\n\t\t\tthis.validate(object);\n\n\t\t\tfor (const [key, strategy] of this.#definitions) {\n\t\t\t\ttry {\n\t\t\t\t\tif (key in result || key in object) {\n\t\t\t\t\t\tconst merge = /** @type {Function} */ (strategy.merge);\n\t\t\t\t\t\tconst value = merge.call(\n\t\t\t\t\t\t\tthis,\n\t\t\t\t\t\t\tresult[key],\n\t\t\t\t\t\t\tobject[key],\n\t\t\t\t\t\t);\n\t\t\t\t\t\tif (value !== undefined) {\n\t\t\t\t\t\t\tresult[key] = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} catch (ex) {\n\t\t\t\t\tthrow new WrapperError(key, ex);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn result;\n\t\t}, {});\n\t}\n\n\t/**\n\t * Validates an object's keys based on the validate strategy for each key.\n\t * @param {Object} object The object to validate.\n\t * @returns {void}\n\t * @throws {Error} When the object is invalid.\n\t */\n\tvalidate(object) {\n\t\t// check existing keys first\n\t\tfor (const key of Object.keys(object)) {\n\t\t\t// check to see if the key is defined\n\t\t\tif (!this.hasKey(key)) {\n\t\t\t\tthrow new UnexpectedKeyError(key);\n\t\t\t}\n\n\t\t\t// validate existing keys\n\t\t\tconst definition = /** @type {PropertyDefinition} */ (\n\t\t\t\tthis.#definitions.get(key)\n\t\t\t); // `definition` is guaranteed to exist since we check with `hasKey()` above.\n\n\t\t\t// first check to see if any other keys are required\n\t\t\tif (Array.isArray(definition.requires)) {\n\t\t\t\tif (\n\t\t\t\t\t!definition.requires.every(otherKey => otherKey in object)\n\t\t\t\t) {\n\t\t\t\t\tthrow new MissingDependentKeysError(\n\t\t\t\t\t\tkey,\n\t\t\t\t\t\tdefinition.requires,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// now apply remaining validation strategy\n\t\t\ttry {\n\t\t\t\tconst validate = /** @type {Function} */ (definition.validate);\n\t\t\t\tvalidate.call(definition, object[key]);\n\t\t\t} catch (ex) {\n\t\t\t\tthrow new WrapperError(key, ex);\n\t\t\t}\n\t\t}\n\n\t\t// ensure required keys aren't missing\n\t\tfor (const [key] of this.#requiredKeys) {\n\t\t\tif (!(key in object)) {\n\t\t\t\tthrow new MissingKeyError(key);\n\t\t\t}\n\t\t}\n\t}\n}\n\nexport { MergeStrategy, ObjectSchema, ValidationStrategy };\n","// @ts-self-types=\"./index.d.ts\"\nimport * as posixPath from './std__path/posix.js';\nimport * as windowsPath from './std__path/windows.js';\nimport { Minimatch } from 'minimatch';\nimport createDebug from 'debug';\nimport { ObjectSchema } from '@eslint/object-schema';\nexport { ObjectSchema } from '@eslint/object-schema';\n\n/**\n * @fileoverview ConfigSchema\n * @author Nicholas C. Zakas\n */\n\n//------------------------------------------------------------------------------\n// Types\n//------------------------------------------------------------------------------\n\n/** @import * as $eslintobjectschema from \"@eslint/object-schema\"; */\n/** @typedef {$eslintobjectschema.PropertyDefinition} PropertyDefinition */\n/** @typedef {$eslintobjectschema.ObjectDefinition} ObjectDefinition */\n\n//------------------------------------------------------------------------------\n// Helpers\n//------------------------------------------------------------------------------\n\n/**\n * A strategy that does nothing.\n * @type {PropertyDefinition}\n */\nconst NOOP_STRATEGY = {\n\trequired: false,\n\tmerge() {\n\t\treturn undefined;\n\t},\n\tvalidate() {},\n};\n\n//------------------------------------------------------------------------------\n// Exports\n//------------------------------------------------------------------------------\n\n/**\n * The base schema that every ConfigArray uses.\n * @type {ObjectDefinition}\n */\nconst baseSchema = Object.freeze({\n\tname: {\n\t\trequired: false,\n\t\tmerge() {\n\t\t\treturn undefined;\n\t\t},\n\t\tvalidate(value) {\n\t\t\tif (typeof value !== \"string\") {\n\t\t\t\tthrow new TypeError(\"Property must be a string.\");\n\t\t\t}\n\t\t},\n\t},\n\tbasePath: NOOP_STRATEGY,\n\tfiles: NOOP_STRATEGY,\n\tignores: NOOP_STRATEGY,\n});\n\n/**\n * @fileoverview ConfigSchema\n * @author Nicholas C. Zakas\n */\n\n//------------------------------------------------------------------------------\n// Types\n//------------------------------------------------------------------------------\n\n\n//------------------------------------------------------------------------------\n// Helpers\n//------------------------------------------------------------------------------\n\n/**\n * Asserts that a given value is an array.\n * @param {*} value The value to check.\n * @returns {void}\n * @throws {TypeError} When the value is not an array.\n */\nfunction assertIsArray(value) {\n\tif (!Array.isArray(value)) {\n\t\tthrow new TypeError(\"Expected value to be an array.\");\n\t}\n}\n\n/**\n * Asserts that a given value is an array containing only strings and functions.\n * @param {*} value The value to check.\n * @returns {void}\n * @throws {TypeError} When the value is not an array of strings and functions.\n */\nfunction assertIsArrayOfStringsAndFunctions(value) {\n\tassertIsArray(value);\n\n\tif (\n\t\tvalue.some(\n\t\t\titem => typeof item !== \"string\" && typeof item !== \"function\",\n\t\t)\n\t) {\n\t\tthrow new TypeError(\n\t\t\t\"Expected array to only contain strings and functions.\",\n\t\t);\n\t}\n}\n\n/**\n * Asserts that a given value is a non-empty array.\n * @param {*} value The value to check.\n * @returns {void}\n * @throws {TypeError} When the value is not an array or an empty array.\n */\nfunction assertIsNonEmptyArray(value) {\n\tif (!Array.isArray(value) || value.length === 0) {\n\t\tthrow new TypeError(\"Expected value to be a non-empty array.\");\n\t}\n}\n\n//------------------------------------------------------------------------------\n// Exports\n//------------------------------------------------------------------------------\n\n/**\n * The schema for `files` and `ignores` that every ConfigArray uses.\n * @type {ObjectDefinition}\n */\nconst filesAndIgnoresSchema = Object.freeze({\n\tbasePath: {\n\t\trequired: false,\n\t\tmerge() {\n\t\t\treturn undefined;\n\t\t},\n\t\tvalidate(value) {\n\t\t\tif (typeof value !== \"string\") {\n\t\t\t\tthrow new TypeError(\"Expected value to be a string.\");\n\t\t\t}\n\t\t},\n\t},\n\tfiles: {\n\t\trequired: false,\n\t\tmerge() {\n\t\t\treturn undefined;\n\t\t},\n\t\tvalidate(value) {\n\t\t\t// first check if it's an array\n\t\t\tassertIsNonEmptyArray(value);\n\n\t\t\t// then check each member\n\t\t\tvalue.forEach(item => {\n\t\t\t\tif (Array.isArray(item)) {\n\t\t\t\t\tassertIsArrayOfStringsAndFunctions(item);\n\t\t\t\t} else if (\n\t\t\t\t\ttypeof item !== \"string\" &&\n\t\t\t\t\ttypeof item !== \"function\"\n\t\t\t\t) {\n\t\t\t\t\tthrow new TypeError(\n\t\t\t\t\t\t\"Items must be a string, a function, or an array of strings and functions.\",\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t},\n\tignores: {\n\t\trequired: false,\n\t\tmerge() {\n\t\t\treturn undefined;\n\t\t},\n\t\tvalidate: assertIsArrayOfStringsAndFunctions,\n\t},\n});\n\n/**\n * @fileoverview ConfigArray\n * @author Nicholas C. Zakas\n */\n\n\n//------------------------------------------------------------------------------\n// Types\n//------------------------------------------------------------------------------\n\n/** @import * as $typests from \"./types.ts\"; */\n/** @typedef {$typests.ConfigObject} ConfigObject */\n/** @typedef {$typests.FileMatcher} FileMatcher */\n/** @typedef {$typests.FilesMatcher} FilesMatcher */\n/** @typedef {$typests.ExtraConfigType} ExtraConfigType */\n/** @import * as $minimatch from \"minimatch\"; */\n/** @typedef {$minimatch.MinimatchOptions} MinimatchOptions */\n/** @import * as PathImpl from \"@jsr/std__path\" */\n\n/*\n * This is a bit of a hack to make TypeScript happy with the Rollup-created\n * CommonJS file. Rollup doesn't do object destructuring for imported files\n * and instead imports the default via `require()`. This messes up type checking\n * for `ObjectSchema`. To work around that, we just import the type manually\n * and give it a different name to use in the JSDoc comments.\n */\n/** @typedef {ObjectSchema} ObjectSchemaInstance */\n\n//------------------------------------------------------------------------------\n// Helpers\n//------------------------------------------------------------------------------\n\nconst debug = createDebug(\"@eslint/config-array\");\n\n/**\n * A cache for minimatch instances.\n * @type {Map<string, Minimatch>}\n */\nconst minimatchCache = new Map();\n\n/**\n * A cache for negated minimatch instances.\n * @type {Map<string, Minimatch>}\n */\nconst negatedMinimatchCache = new Map();\n\n/**\n * Options to use with minimatch.\n * @type {MinimatchOptions}\n */\nconst MINIMATCH_OPTIONS = {\n\t// matchBase: true,\n\tdot: true,\n};\n\n/**\n * The types of config objects that are supported.\n * @type {Set<ExtraConfigType>}\n */\nconst CONFIG_TYPES = new Set([\"array\", \"function\"]);\n\n/**\n * Fields that are considered metadata and not part of the config object.\n * @type {Set<string>}\n */\nconst META_FIELDS = new Set([\"name\", \"basePath\"]);\n\n/**\n * A schema containing just files and ignores for early validation.\n * @type {ObjectSchemaInstance}\n */\nconst FILES_AND_IGNORES_SCHEMA = new ObjectSchema(filesAndIgnoresSchema);\n\n// Precomputed constant objects returned by `ConfigArray.getConfigWithStatus`.\n\nconst CONFIG_WITH_STATUS_EXTERNAL = Object.freeze({ status: \"external\" });\nconst CONFIG_WITH_STATUS_IGNORED = Object.freeze({ status: \"ignored\" });\nconst CONFIG_WITH_STATUS_UNCONFIGURED = Object.freeze({\n\tstatus: \"unconfigured\",\n});\n\n// Match two leading dots followed by a slash or the end of input.\nconst EXTERNAL_PATH_REGEX = /^\\.\\.(?:\\/|$)/u;\n\n/**\n * Wrapper error for config validation errors that adds a name to the front of the\n * error message.\n */\nclass ConfigError extends Error {\n\t/**\n\t * Creates a new instance.\n\t * @param {string} name The config object name causing the error.\n\t * @param {number} index The index of the config object in the array.\n\t * @param {Object} options The options for the error.\n\t * @param {Error} [options.cause] The error that caused this error.\n\t * @param {string} [options.message] The message to use for the error.\n\t */\n\tconstructor(name, index, { cause, message }) {\n\t\tconst finalMessage = message || cause.message;\n\n\t\tsuper(`Config ${name}: ${finalMessage}`, { cause });\n\n\t\t// copy over custom properties that aren't represented\n\t\tif (cause) {\n\t\t\tfor (const key of Object.keys(cause)) {\n\t\t\t\tif (!(key in this)) {\n\t\t\t\t\tthis[key] = cause[key];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * The name of the error.\n\t\t * @type {string}\n\t\t * @readonly\n\t\t */\n\t\tthis.name = \"ConfigError\";\n\n\t\t/**\n\t\t * The index of the config object in the array.\n\t\t * @type {number}\n\t\t * @readonly\n\t\t */\n\t\tthis.index = index;\n\t}\n}\n\n/**\n * Gets the name of a config object.\n * @param {ConfigObject} config The config object to get the name of.\n * @returns {string} The name of the config object.\n */\nfunction getConfigName(config) {\n\tif (config && typeof config.name === \"string\" && config.name) {\n\t\treturn `\"${config.name}\"`;\n\t}\n\n\treturn \"(unnamed)\";\n}\n\n/**\n * Rethrows a config error with additional information about the config object.\n * @param {ConfigObject} config The config object to get the name of.\n * @param {number} index The index of the config object in the array.\n * @param {Error} error The error to rethrow.\n * @throws {ConfigError} When the error is rethrown for a config.\n */\nfunction rethrowConfigError(config, index, error) {\n\tconst configName = getConfigName(config);\n\tthrow new ConfigError(configName, index, { cause: error });\n}\n\n/**\n * Shorthand for checking if a value is a string.\n * @param {any} value The value to check.\n * @returns {value is string} True if a string, false if not.\n */\nfunction isString(value) {\n\treturn typeof value === \"string\";\n}\n\n/**\n * Creates a function that asserts that the config is valid\n * during normalization. This checks that the config is not nullish\n * and that files and ignores keys of a config object are valid as per base schema.\n * @param {Object} config The config object to check.\n * @param {number} index The index of the config object in the array.\n * @returns {void}\n * @throws {ConfigError} If the files and ignores keys of a config object are not valid.\n */\nfunction assertValidBaseConfig(config, index) {\n\tif (config === null) {\n\t\tthrow new ConfigError(getConfigName(config), index, {\n\t\t\tmessage: \"Unexpected null config.\",\n\t\t});\n\t}\n\n\tif (config === undefined) {\n\t\tthrow new ConfigError(getConfigName(config), index, {\n\t\t\tmessage: \"Unexpected undefined config.\",\n\t\t});\n\t}\n\n\tif (typeof config !== \"object\") {\n\t\tthrow new ConfigError(getConfigName(config), index, {\n\t\t\tmessage: \"Unexpected non-object config.\",\n\t\t});\n\t}\n\n\tconst validateConfig = {};\n\n\tif (\"basePath\" in config) {\n\t\tvalidateConfig.basePath = config.basePath;\n\t}\n\n\tif (\"files\" in config) {\n\t\tvalidateConfig.files = config.files;\n\t}\n\n\tif (\"ignores\" in config) {\n\t\tvalidateConfig.ignores = config.ignores;\n\t}\n\n\ttry {\n\t\tFILES_AND_IGNORES_SCHEMA.validate(validateConfig);\n\t} catch (validationError) {\n\t\trethrowConfigError(config, index, validationError);\n\t}\n}\n\n/**\n * Wrapper around minimatch that caches minimatch patterns for\n * faster matching speed over multiple file path evaluations.\n * @param {string} filepath The file path to match.\n * @param {string} pattern The glob pattern to match against.\n * @param {MinimatchOptions} options The minimatch options to use.\n * @returns {boolean} True if the file path matches, false if not.\n */\nfunction doMatch(filepath, pattern, options = {}) {\n\tlet cache = minimatchCache;\n\n\tif (options.flipNegate) {\n\t\tcache = negatedMinimatchCache;\n\t}\n\n\tlet matcher = cache.get(pattern);\n\n\tif (!matcher) {\n\t\tmatcher = new Minimatch(\n\t\t\tpattern,\n\t\t\tObject.assign({}, MINIMATCH_OPTIONS, options),\n\t\t);\n\t\tcache.set(pattern, matcher);\n\t}\n\n\treturn matcher.match(filepath);\n}\n\n/**\n * Normalizes a pattern by removing the leading \"./\" if present.\n * @param {FileMatcher} pattern The pattern to normalize.\n * @returns {FileMatcher} The normalized pattern.\n */\nfunction normalizePattern(pattern) {\n\tif (isString(pattern)) {\n\t\tif (pattern.startsWith(\"./\")) {\n\t\t\treturn pattern.slice(2);\n\t\t}\n\n\t\tif (pattern.startsWith(\"!./\")) {\n\t\t\treturn `!${pattern.slice(3)}`;\n\t\t}\n\t}\n\n\treturn pattern;\n}\n\n/**\n * Checks if a given pattern requires normalization.\n * @param {any} pattern The pattern to check.\n * @returns {boolean} True if the pattern needs normalization, false otherwise.\n *\n */\nfunction needsPatternNormalization(pattern) {\n\treturn (\n\t\tisString(pattern) &&\n\t\t(pattern.startsWith(\"./\") || pattern.startsWith(\"!./\"))\n\t);\n}\n\n/**\n * Normalizes `files` and `ignores` patterns in a config by removing \"./\" prefixes.\n * @param {Object} config The config object to normalize patterns in.\n * @param {string} namespacedBasePath The namespaced base path of the directory to which config base path is relative.\n * @param {PathImpl} path Path-handling implementation.\n * @returns {Object} The normalized config object.\n */\nfunction normalizeConfigPatterns(config, namespacedBasePath, path) {\n\tif (!config) {\n\t\treturn config;\n\t}\n\n\tconst hasBasePath = typeof config.basePath === \"string\";\n\n\tlet needsNormalization = false;\n\n\tif (hasBasePath) {\n\t\tneedsNormalization = true;\n\t}\n\n\tif (!needsNormalization && Array.isArray(config.files)) {\n\t\tneedsNormalization = config.files.some(pattern => {\n\t\t\tif (Array.isArray(pattern)) {\n\t\t\t\treturn pattern.some(needsPatternNormalization);\n\t\t\t}\n\t\t\treturn needsPatternNormalization(pattern);\n\t\t});\n\t}\n\n\tif (!needsNormalization && Array.isArray(config.ignores)) {\n\t\tneedsNormalization = config.ignores.some(needsPatternNormalization);\n\t}\n\n\tif (!needsNormalization) {\n\t\treturn config;\n\t}\n\n\tconst newConfig = { ...config };\n\n\tif (hasBasePath) {\n\t\tif (path.isAbsolute(config.basePath)) {\n\t\t\tnewConfig.basePath = path.toNamespacedPath(config.basePath);\n\t\t} else {\n\t\t\tnewConfig.basePath = path.resolve(\n\t\t\t\tnamespacedBasePath,\n\t\t\t\tconfig.basePath,\n\t\t\t);\n\t\t}\n\t}\n\n\tif (Array.isArray(newConfig.files)) {\n\t\tnewConfig.files = newConfig.files.map(pattern => {\n\t\t\tif (Array.isArray(pattern)) {\n\t\t\t\treturn pattern.map(normalizePattern);\n\t\t\t}\n\t\t\treturn normalizePattern(pattern);\n\t\t});\n\t}\n\n\tif (Array.isArray(newConfig.ignores)) {\n\t\tnewConfig.ignores = newConfig.ignores.map(normalizePattern);\n\t}\n\n\treturn newConfig;\n}\n\n/**\n * Normalizes a `ConfigArray` by flattening it and executing any functions\n * that are found inside.\n * @param {Array} items The items in a `ConfigArray`.\n * @param {Object} context The context object to pass into any function\n * found.\n * @param {ReadonlyArray<ExtraConfigType>} extraConfigTypes The config types to check.\n * @param {string} namespacedBasePath The namespaced base path of the directory to which config base paths are relative.\n * @param {PathImpl} path Path-handling implementation.\n * @returns {Promise<Array>} A flattened array containing only config objects.\n * @throws {TypeError} When a config function returns a function.\n */\nasync function normalize(\n\titems,\n\tcontext,\n\textraConfigTypes,\n\tnamespacedBasePath,\n\tpath,\n) {\n\tconst allowFunctions = extraConfigTypes.includes(\"function\");\n\tconst allowArrays = extraConfigTypes.includes(\"array\");\n\n\tasync function* flatTraverse(array) {\n\t\tfor (let item of array) {\n\t\t\tif (typeof item === \"function\") {\n\t\t\t\tif (!allowFunctions) {\n\t\t\t\t\tthrow new TypeError(\"Unexpected function.\");\n\t\t\t\t}\n\n\t\t\t\titem = item(context);\n\t\t\t\tif (item.then) {\n\t\t\t\t\titem = await item;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (Array.isArray(item)) {\n\t\t\t\tif (!allowArrays) {\n\t\t\t\t\tthrow new TypeError(\"Unexpected array.\");\n\t\t\t\t}\n\t\t\t\tyield* flatTraverse(item);\n\t\t\t} else if (typeof item === \"function\") {\n\t\t\t\tthrow new TypeError(\n\t\t\t\t\t\"A config function can only return an object or array.\",\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tyield item;\n\t\t\t}\n\t\t}\n\t}\n\n\t/*\n\t * Async iterables cannot be used with the spread operator, so we need to manually\n\t * create the array to return.\n\t */\n\tconst asyncIterable = flatTraverse(items);\n\tconst configs = [];\n\n\tfor await (const config of asyncIterable) {\n\t\tconfigs.push(normalizeConfigPatterns(config, namespacedBasePath, path));\n\t}\n\n\treturn configs;\n}\n\n/**\n * Normalizes a `ConfigArray` by flattening it and executing any functions\n * that are found inside.\n * @param {Array} items The items in a `ConfigArray`.\n * @param {Object} context The context object to pass into any function\n * found.\n * @param {ReadonlyArray<ExtraConfigType>} extraConfigTypes The config types to check.\n * @param {string} namespacedBasePath The namespaced base path of the directory to which config base paths are relative.\n * @param {PathImpl} path Path-handling implementation\n * @returns {Array} A flattened array containing only config objects.\n * @throws {TypeError} When a config function returns a function.\n */\nfunction normalizeSync(\n\titems,\n\tcontext,\n\textraConfigTypes,\n\tnamespacedBasePath,\n\tpath,\n) {\n\tconst allowFunctions = extraConfigTypes.includes(\"function\");\n\tconst allowArrays = extraConfigTypes.includes(\"array\");\n\n\tfunction* flatTraverse(array) {\n\t\tfor (let item of array) {\n\t\t\tif (typeof item === \"function\") {\n\t\t\t\tif (!allowFunctions) {\n\t\t\t\t\tthrow new TypeError(\"Unexpected function.\");\n\t\t\t\t}\n\n\t\t\t\titem = item(context);\n\t\t\t\tif (item.then) {\n\t\t\t\t\tthrow new TypeError(\n\t\t\t\t\t\t\"Async config functions are not supported.\",\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (Array.isArray(item)) {\n\t\t\t\tif (!allowArrays) {\n\t\t\t\t\tthrow new TypeError(\"Unexpected array.\");\n\t\t\t\t}\n\n\t\t\t\tyield* flatTraverse(item);\n\t\t\t} else if (typeof item === \"function\") {\n\t\t\t\tthrow new TypeError(\n\t\t\t\t\t\"A config function can only return an object or array.\",\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tyield item;\n\t\t\t}\n\t\t}\n\t}\n\n\tconst configs = [];\n\n\tfor (const config of flatTraverse(items)) {\n\t\tconfigs.push(normalizeConfigPatterns(config, namespacedBasePath, path));\n\t}\n\n\treturn configs;\n}\n\n/**\n * Converts a given path to a relative path with all separator characters replaced by forward slashes (`\"/\"`).\n * @param {string} fileOrDirPath The unprocessed path to convert.\n * @param {string} namespacedBasePath The namespaced base path of the directory to which the calculated path shall be relative.\n * @param {PathImpl} path Path-handling implementations.\n * @returns {string} A relative path with all separator characters replaced by forward slashes.\n */\nfunction toRelativePath(fileOrDirPath, namespacedBasePath, path) {\n\tconst fullPath = path.resolve(namespacedBasePath, fileOrDirPath);\n\tconst namespacedFullPath = path.toNamespacedPath(fullPath);\n\tconst relativePath = path.relative(namespacedBasePath, namespacedFullPath);\n\treturn relativePath.replaceAll(path.SEPARATOR, \"/\");\n}\n\n/**\n * Determines if a given file path should be ignored based on the given\n * matcher.\n * @param {Array<{ basePath?: string, ignores: FileMatcher[] }>} configs Configuration objects containing `ignores`.\n * @param {string} filePath The unprocessed file path to check.\n * @param {string} relativeFilePath The path of the file to check relative to the base path,\n * \t\tusing forward slash (`\"/\"`) as a separator.\n * @param {Object} [basePathData] Additional data needed to recalculate paths for configuration objects\n * \tthat have `basePath` property.\n * @param {string} [basePathData.basePath] Namespaced path to which `relativeFilePath` is relative.\n * @param {PathImpl} [basePathData.path] Path-handling implementation.\n * @returns {boolean} True if the path should be ignored and false if not.\n */\nfunction shouldIgnorePath(\n\tconfigs,\n\tfilePath,\n\trelativeFilePath,\n\t{ basePath, path } = {},\n) {\n\tlet shouldIgnore = false;\n\n\tfor (const config of configs) {\n\t\tlet relativeFilePathToCheck = relativeFilePath;\n\t\tif (config.basePath) {\n\t\t\trelativeFilePathToCheck = toRelativePath(\n\t\t\t\tpath.resolve(basePath, relativeFilePath),\n\t\t\t\tconfig.basePath,\n\t\t\t\tpath,\n\t\t\t);\n\n\t\t\tif (\n\t\t\t\trelativeFilePathToCheck === \"\" ||\n\t\t\t\tEXTERNAL_PATH_REGEX.test(relativeFilePathToCheck)\n\t\t\t) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (relativeFilePath.endsWith(\"/\")) {\n\t\t\t\trelativeFilePathToCheck += \"/\";\n\t\t\t}\n\t\t}\n\t\tshouldIgnore = config.ignores.reduce((ignored, matcher) => {\n\t\t\tif (!ignored) {\n\t\t\t\tif (typeof matcher === \"function\") {\n\t\t\t\t\treturn matcher(filePath);\n\t\t\t\t}\n\n\t\t\t\t// don't check negated patterns because we're not ignored yet\n\t\t\t\tif (!matcher.startsWith(\"!\")) {\n\t\t\t\t\treturn doMatch(relativeFilePathToCheck, matcher);\n\t\t\t\t}\n\n\t\t\t\t// otherwise we're still not ignored\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// only need to check negated patterns because we're ignored\n\t\t\tif (typeof matcher === \"string\" && matcher.startsWith(\"!\")) {\n\t\t\t\treturn !doMatch(relativeFilePathToCheck, matcher, {\n\t\t\t\t\tflipNegate: true,\n\t\t\t\t});\n\t\t\t}\n\n\t\t\treturn ignored;\n\t\t}, shouldIgnore);\n\t}\n\n\treturn shouldIgnore;\n}\n\n/**\n * Determines if a given file path is matched by a config. If the config\n * has no `files` field, then it matches; otherwise, if a `files` field\n * is present then we match the globs in `files` and exclude any globs in\n * `ignores`.\n * @param {string} filePath The unprocessed file path to check.\n * @param {string} relativeFilePath The path of the file to check relative to the base path,\n * \t\tusing forward slash (`\"/\"`) as a separator.\n * @param {ConfigObject & { files: FilesMatcher[] }} config The config object to check.\n * @returns {boolean} True if the file path is matched by the config,\n * false if not.\n */\nfunction pathMatches(filePath, relativeFilePath, config) {\n\t// match both strings and functions\n\tfunction match(pattern) {\n\t\tif (isString(pattern)) {\n\t\t\treturn doMatch(relativeFilePath, pattern);\n\t\t}\n\n\t\tif (typeof pattern === \"function\") {\n\t\t\treturn pattern(filePath);\n\t\t}\n\n\t\tthrow new TypeError(`Unexpected matcher type ${pattern}.`);\n\t}\n\n\t// check for all matches to config.files\n\tlet filePathMatchesPattern = config.files.some(pattern => {\n\t\tif (Array.isArray(pattern)) {\n\t\t\treturn pattern.every(match);\n\t\t}\n\n\t\treturn match(pattern);\n\t});\n\n\t/*\n\t * If the file path matches the config.files patterns, then check to see\n\t * if there are any files to ignore.\n\t */\n\tif (filePathMatchesPattern && config.ignores) {\n\t\t/*\n\t\t * Pass config object without `basePath`, because `relativeFilePath` is already\n\t\t * calculated as relative to it.\n\t\t */\n\t\tfilePathMatchesPattern = !shouldIgnorePath(\n\t\t\t[{ ignores: config.ignores }],\n\t\t\tfilePath,\n\t\t\trelativeFilePath,\n\t\t);\n\t}\n\n\treturn filePathMatchesPattern;\n}\n\n/**\n * Ensures that a ConfigArray has been normalized.\n * @param {ConfigArray} configArray The ConfigArray to check.\n * @returns {void}\n * @throws {Error} When the `ConfigArray` is not normalized.\n */\nfunction assertNormalized(configArray) {\n\t// TODO: Throw more verbose error\n\tif (!configArray.isNormalized()) {\n\t\tthrow new Error(\n\t\t\t\"ConfigArray must be normalized to perform this operation.\",\n\t\t);\n\t}\n}\n\n/**\n * Ensures that config types are valid.\n * @param {ReadonlyArray<ExtraConfigType>} extraConfigTypes The config types to check.\n * @returns {void}\n * @throws {TypeError} When the config types array is invalid.\n */\nfunction assertExtraConfigTypes(extraConfigTypes) {\n\tif (!Array.isArray(extraConfigTypes)) {\n\t\tthrow new TypeError(\"extraConfigTypes must be an array.\");\n\t}\n\n\tif (extraConfigTypes.length > 2) {\n\t\tthrow new TypeError(\"extraConfigTypes must contain at most two items.\");\n\t}\n\n\tfor (const configType of extraConfigTypes) {\n\t\tif (!CONFIG_TYPES.has(configType)) {\n\t\t\tthrow new TypeError(\n\t\t\t\t`Unexpected config type \"${configType}\" in extraConfigTypes. Expected one of: \"array\", \"function\".`,\n\t\t\t);\n\t\t}\n\t}\n}\n\n/**\n * Returns path-handling implementations for Unix or Windows, depending on a given absolute path.\n * @param {string} fileOrDirPath The absolute path to check.\n * @returns {PathImpl} Path-handling implementations for the specified path.\n * @throws {Error} An error is thrown if the specified argument is not an absolute path.\n */\nfunction getPathImpl(fileOrDirPath) {\n\t// Posix absolute paths always start with a slash.\n\tif (fileOrDirPath.startsWith(\"/\")) {\n\t\treturn posixPath;\n\t}\n\n\t// Windows absolute paths start with a letter followed by a colon and at least one backslash,\n\t// or with two backslashes in the case of UNC paths.\n\t// Forward slashed are automatically normalized to backslashes.\n\tif (/^(?:[A-Za-z]:[/\\\\]|[/\\\\]{2})/u.test(fileOrDirPath)) {\n\t\treturn windowsPath;\n\t}\n\n\tthrow new Error(\n\t\t`Expected an absolute path but received \"${fileOrDirPath}\"`,\n\t);\n}\n\n//------------------------------------------------------------------------------\n// Public Interface\n//------------------------------------------------------------------------------\n\nconst ConfigArraySymbol = {\n\tisNormalized: Symbol(\"isNormalized\"),\n\tconfigCache: Symbol(\"configCache\"),\n\tschema: Symbol(\"schema\"),\n\tfinalizeConfig: Symbol(\"finalizeConfig\"),\n\tpreprocessConfig: Symbol(\"preprocessConfig\"),\n};\n\n// used to store calculate data for faster lookup\nconst dataCache = new WeakMap();\n\n/**\n * Represents an array of config objects and provides method for working with\n * those config objects.\n */\nclass ConfigArray extends Array {\n\t/**\n\t * The namespaced path of the config file directory.\n\t * @type {string}\n\t */\n\t#namespacedBasePath;\n\n\t/**\n\t * Path-handling implementations.\n\t * @type {PathImpl}\n\t */\n\t#path;\n\n\t/**\n\t * Creates a new instance of ConfigArray.\n\t * @param {Iterable|Function|Object} configs An iterable yielding config\n\t * objects, or a config function, or a config object.\n\t * @param {Object} options The options for the ConfigArray.\n\t * @param {string} [options.basePath=\"/\"] The absolute path of the config file directory.\n\t * \t\tDefaults to `\"/\"`.\n\t * @param {boolean} [options.normalized=false] Flag indicating if the\n\t * configs have already been normalized.\n\t * @param {ObjectDefinition} [options.schema] The additional schema\n\t * definitions to use for the ConfigArray schema.\n\t * @param {ReadonlyArray<ExtraConfigType>} [options.extraConfigTypes] List of config types supported.\n\t * @throws {TypeError} When the `basePath` is not a non-empty string,\n\t */\n\tconstructor(\n\t\tconfigs,\n\t\t{\n\t\t\tbasePath = \"/\",\n\t\t\tnormalized = false,\n\t\t\tschema: customSchema,\n\t\t\textraConfigTypes = [],\n\t\t} = {},\n\t) {\n\t\tsuper();\n\n\t\t/**\n\t\t * Tracks if the array has been normalized.\n\t\t * @property isNormalized\n\t\t * @type {boolean}\n\t\t * @private\n\t\t */\n\t\tthis[ConfigArraySymbol.isNormalized] = normalized;\n\n\t\t/**\n\t\t * The schema used for validating and merging configs.\n\t\t * @property schema\n\t\t * @type {ObjectSchemaInstance}\n\t\t * @private\n\t\t */\n\t\tthis[ConfigArraySymbol.schema] = new ObjectSchema(\n\t\t\tObject.assign({}, customSchema, baseSchema),\n\t\t);\n\n\t\tif (!isString(basePath) || !basePath) {\n\t\t\tthrow new TypeError(\"basePath must be a non-empty string\");\n\t\t}\n\n\t\t/**\n\t\t * The path of the config file that this array was loaded from.\n\t\t * This is used to calculate filename matches.\n\t\t * @property basePath\n\t\t * @type {string}\n\t\t */\n\t\tthis.basePath = basePath;\n\n\t\tassertExtraConfigTypes(extraConfigTypes);\n\n\t\t/**\n\t\t * The supported config types.\n\t\t * @type {ReadonlyArray<ExtraConfigType>}\n\t\t */\n\t\tthis.extraConfigTypes = [...extraConfigTypes];\n\t\tObject.freeze(this.extraConfigTypes);\n\n\t\t/**\n\t\t * A cache to store calculated configs for faster repeat lookup.\n\t\t * @property configCache\n\t\t * @type {Map<string, Object>}\n\t\t * @private\n\t\t */\n\t\tthis[ConfigArraySymbol.configCache] = new Map();\n\n\t\t// init cache\n\t\tdataCache.set(this, {\n\t\t\texplicitMatches: new Map(),\n\t\t\tdirectoryMatches: new Map(),\n\t\t\tfiles: undefined,\n\t\t\tignores: undefined,\n\t\t});\n\n\t\t// load the configs into this array\n\t\tif (Array.isArray(configs)) {\n\t\t\tthis.push(...configs);\n\t\t} else {\n\t\t\tthis.push(configs);\n\t\t}\n\n\t\t// select path-handling implementations depending on the base path\n\t\tthis.#path = getPathImpl(basePath);\n\n\t\t// On Windows, `path.relative()` returns an absolute path when given two paths on different drives.\n\t\t// The namespaced base path is useful to make sure that calculated relative paths are always relative.\n\t\t// On Unix, it is identical to the base path.\n\t\tthis.#namespacedBasePath = this.#path.toNamespacedPath(basePath);\n\t}\n\n\t/**\n\t * Prevent normal array methods from creating a new `ConfigArray` instance.\n\t * This is to ensure that methods such as `slice()` won't try to create a\n\t * new instance of `ConfigArray` behind the scenes as doing so may throw\n\t * an error due to the different constructor signature.\n\t * @type {ArrayConstructor} The `Array` constructor.\n\t */\n\tstatic get [Symbol.species]() {\n\t\treturn Array;\n\t}\n\n\t/**\n\t * Returns the `files` globs from every config object in the array.\n\t * This can be used to determine which files will be matched by a\n\t * config array or to use as a glob pattern when no patterns are provided\n\t * for a command line interface.\n\t * @returns {Array<FilesMatcher>} An array of matchers.\n\t */\n\tget files() {\n\t\tassertNormalized(this);\n\n\t\t// if this data has been cached, retrieve it\n\t\tconst cache = dataCache.get(this);\n\n\t\tif (cache.files) {\n\t\t\treturn cache.files;\n\t\t}\n\n\t\t// otherwise calculate it\n\n\t\tconst result = [];\n\n\t\tfor (const config of this) {\n\t\t\tif (config.files) {\n\t\t\t\tconfig.files.forEach(filePattern => {\n\t\t\t\t\tresult.push(filePattern);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\t// store result\n\t\tcache.files = result;\n\t\tdataCache.set(this, cache);\n\n\t\treturn result;\n\t}\n\n\t/**\n\t * Returns ignore matchers that should always be ignored regardless of\n\t * the matching `files` fields in any configs. This is necessary to mimic\n\t * the behavior of things like .gitignore and .eslintignore, allowing a\n\t * globbing operation to be faster.\n\t * @returns {Array<{ basePath?: string, name?: string, ignores: FileMatcher[] }>} An array of config objects representing global ignores.\n\t */\n\tget ignores() {\n\t\tassertNormalized(this);\n\n\t\t// if this data has been cached, retrieve it\n\t\tconst cache = dataCache.get(this);\n\n\t\tif (cache.ignores) {\n\t\t\treturn cache.ignores;\n\t\t}\n\n\t\t// otherwise calculate it\n\n\t\tconst result = [];\n\n\t\tfor (const config of this) {\n\t\t\t/*\n\t\t\t * We only count ignores if there are no other keys in the object.\n\t\t\t * In this case, it acts like a globally ignored pattern. If there\n\t\t\t * are additional keys, then ignores act like exclusions.\n\t\t\t */\n\t\t\tif (\n\t\t\t\tconfig.ignores &&\n\t\t\t\tObject.keys(config).filter(key => !META_FIELDS.has(key))\n\t\t\t\t\t.length === 1\n\t\t\t) {\n\t\t\t\tresult.push(config);\n\t\t\t}\n\t\t}\n\n\t\t// store result\n\t\tcache.ignores = result;\n\t\tdataCache.set(this, cache);\n\n\t\treturn result;\n\t}\n\n\t/**\n\t * Indicates if the config array has been normalized.\n\t * @returns {boolean} True if the config array is normalized, false if not.\n\t */\n\tisNormalized() {\n\t\treturn this[ConfigArraySymbol.isNormalized];\n\t}\n\n\t/**\n\t * Normalizes a config array by flattening embedded arrays and executing\n\t * config functions.\n\t * @param {Object} [context] The context object for config functions.\n\t * @returns {Promise<ConfigArray>} The current ConfigArray instance.\n\t */\n\tasync normalize(context = {}) {\n\t\tif (!this.isNormalized()) {\n\t\t\tconst normalizedConfigs = await normalize(\n\t\t\t\tthis,\n\t\t\t\tcontext,\n\t\t\t\tthis.extraConfigTypes,\n\t\t\t\tthis.#namespacedBasePath,\n\t\t\t\tthis.#path,\n\t\t\t);\n\t\t\tthis.length = 0;\n\t\t\tthis.push(\n\t\t\t\t...normalizedConfigs.map(\n\t\t\t\t\tthis[ConfigArraySymbol.preprocessConfig].bind(this),\n\t\t\t\t),\n\t\t\t);\n\t\t\tthis.forEach(assertValidBaseConfig);\n\t\t\tthis[ConfigArraySymbol.isNormalized] = true;\n\n\t\t\t// prevent further changes\n\t\t\tObject.freeze(this);\n\t\t}\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Normalizes a config array by flattening embedded arrays and executing\n\t * config functions.\n\t * @param {Object} [context] The context object for config functions.\n\t * @returns {ConfigArray} The current ConfigArray instance.\n\t */\n\tnormalizeSync(context = {}) {\n\t\tif (!this.isNormalized()) {\n\t\t\tconst normalizedConfigs = normalizeSync(\n\t\t\t\tthis,\n\t\t\t\tcontext,\n\t\t\t\tthis.extraConfigTypes,\n\t\t\t\tthis.#namespacedBasePath,\n\t\t\t\tthis.#path,\n\t\t\t);\n\t\t\tthis.length = 0;\n\t\t\tthis.push(\n\t\t\t\t...normalizedConfigs.map(\n\t\t\t\t\tthis[ConfigArraySymbol.preprocessConfig].bind(this),\n\t\t\t\t),\n\t\t\t);\n\t\t\tthis.forEach(assertValidBaseConfig);\n\t\t\tthis[ConfigArraySymbol.isNormalized] = true;\n\n\t\t\t// prevent further changes\n\t\t\tObject.freeze(this);\n\t\t}\n\n\t\treturn this;\n\t}\n\n\t/* eslint-disable class-methods-use-this -- Desired as instance methods */\n\n\t/**\n\t * Finalizes the state of a config before being cached and returned by\n\t * `getConfig()`. Does nothing by default but is provided to be\n\t * overridden by subclasses as necessary.\n\t * @param {Object} config The config to finalize.\n\t * @returns {Object} The finalized config.\n\t */\n\t// Cast key to `never` to prevent TypeScript from adding the signature `[x: symbol]: (config: any) => any` to the type of the class.\n\t[/** @type {never} */ (ConfigArraySymbol.finalizeConfig)](config) {\n\t\treturn config;\n\t}\n\n\t/**\n\t * Preprocesses a config during the normalization process. This is the\n\t * method to override if you want to convert an array item before it is\n\t * validated for the first time. For example, if you want to replace a\n\t * string with an object, this is the method to override.\n\t * @param {Object} config The config to preprocess.\n\t * @returns {Object} The config to use in place of the argument.\n\t */\n\t// Cast key to `never` to prevent TypeScript from adding the signature `[x: symbol]: (config: any) => any` to the type of the class.\n\t[/** @type {never} */ (ConfigArraySymbol.preprocessConfig)](config) {\n\t\treturn config;\n\t}\n\n\t/* eslint-enable class-methods-use-this -- Desired as instance methods */\n\n\t/**\n\t * Returns the config object for a given file path and a status that can be used to determine why a file has no config.\n\t * @param {string} filePath The path of a file to get a config for.\n\t * @returns {{ config?: Object, status: \"ignored\"|\"external\"|\"unconfigured\"|\"matched\" }}\n\t * An object with an optional property `config` and property `status`.\n\t * `config` is the config object for the specified file as returned by {@linkcode ConfigArray.getConfig},\n\t * `status` a is one of the constants returned by {@linkcode ConfigArray.getConfigStatus}.\n\t */\n\tgetConfigWithStatus(filePath) {\n\t\tassertNormalized(this);\n\n\t\tconst cache = this[ConfigArraySymbol.configCache];\n\n\t\t// first check the cache for a filename match to avoid duplicate work\n\t\tif (cache.has(filePath)) {\n\t\t\treturn cache.get(filePath);\n\t\t}\n\n\t\t// check to see if the file is outside the base path\n\n\t\tconst relativeToBaseFilePath = toRelativePath(\n\t\t\tfilePath,\n\t\t\tthis.#namespacedBasePath,\n\t\t\tthis.#path,\n\t\t);\n\n\t\tif (EXTERNAL_PATH_REGEX.test(relativeToBaseFilePath)) {\n\t\t\tdebug(`No config for file ${filePath} outside of base path`);\n\n\t\t\t// cache and return result\n\t\t\tcache.set(filePath, CONFIG_WITH_STATUS_EXTERNAL);\n\t\t\treturn CONFIG_WITH_STATUS_EXTERNAL;\n\t\t}\n\n\t\t// next check to see if the file should be ignored\n\n\t\t// check if this should be ignored due to its directory\n\t\tif (this.isDirectoryIgnored(this.#path.dirname(filePath))) {\n\t\t\tdebug(`Ignoring ${filePath} based on directory pattern`);\n\n\t\t\t// cache and return result\n\t\t\tcache.set(filePath, CONFIG_WITH_STATUS_IGNORED);\n\t\t\treturn CONFIG_WITH_STATUS_IGNORED;\n\t\t}\n\n\t\tif (\n\t\t\tshouldIgnorePath(this.ignores, filePath, relativeToBaseFilePath, {\n\t\t\t\tbasePath: this.#namespacedBasePath,\n\t\t\t\tpath: this.#path,\n\t\t\t})\n\t\t) {\n\t\t\tdebug(`Ignoring ${filePath} based on file pattern`);\n\n\t\t\t// cache and return result\n\t\t\tcache.set(filePath, CONFIG_WITH_STATUS_IGNORED);\n\t\t\treturn CONFIG_WITH_STATUS_IGNORED;\n\t\t}\n\n\t\t// filePath isn't automatically ignored, so try to construct config\n\n\t\tconst matchingConfigIndices = [];\n\t\tlet matchFound = false;\n\t\tconst universalPattern = /^\\*$|^!|\\/\\*{1,2}$/u;\n\n\t\tthis.forEach((config, index) => {\n\t\t\tconst relativeFilePath = config.basePath\n\t\t\t\t? toRelativePath(\n\t\t\t\t\t\tthis.#path.resolve(this.#namespacedBasePath, filePath),\n\t\t\t\t\t\tconfig.basePath,\n\t\t\t\t\t\tthis.#path,\n\t\t\t\t\t)\n\t\t\t\t: relativeToBaseFilePath;\n\n\t\t\tif (config.basePath && EXTERNAL_PATH_REGEX.test(relativeFilePath)) {\n\t\t\t\tdebug(\n\t\t\t\t\t`Skipped config found for ${filePath} (based on config's base path: ${config.basePath}`,\n\t\t\t\t);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (!config.files) {\n\t\t\t\tif (!config.ignores) {\n\t\t\t\t\tdebug(`Universal config found for ${filePath}`);\n\t\t\t\t\tmatchingConfigIndices.push(index);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\tObject.keys(config).filter(key => !META_FIELDS.has(key))\n\t\t\t\t\t\t.length === 1\n\t\t\t\t) {\n\t\t\t\t\tdebug(\n\t\t\t\t\t\t`Skipped config found for ${filePath} (global ignores)`,\n\t\t\t\t\t);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t/*\n\t\t\t\t * Pass config object without `basePath`, because `relativeFilePath` is already\n\t\t\t\t * calculated as relative to it.\n\t\t\t\t */\n\t\t\t\tif (\n\t\t\t\t\tshouldIgnorePath(\n\t\t\t\t\t\t[{ ignores: config.ignores }],\n\t\t\t\t\t\tfilePath,\n\t\t\t\t\t\trelativeFilePath,\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\tdebug(\n\t\t\t\t\t\t`Skipped config found for ${filePath} (based on ignores: ${config.ignores})`,\n\t\t\t\t\t);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tdebug(\n\t\t\t\t\t`Matching config found for ${filePath} (based on ignores: ${config.ignores})`,\n\t\t\t\t);\n\t\t\t\tmatchingConfigIndices.push(index);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t/*\n\t\t\t * If a config has a files pattern * or patterns ending in /** or /*,\n\t\t\t * and the filePath only matches those patterns, then the config is only\n\t\t\t * applied if there is another config where the filePath matches\n\t\t\t * a file with a specific extensions such as *.js.\n\t\t\t */\n\n\t\t\tconst nonUniversalFiles = [];\n\t\t\tconst universalFiles = config.files.filter(element => {\n\t\t\t\tif (Array.isArray(element)) {\n\t\t\t\t\t/*\n\t\t\t\t\t * filePath matches an element that is an array only if it matches\n\t\t\t\t\t * all patterns in it (AND operation). Therefore, if there is at least\n\t\t\t\t\t * one non-universal pattern in the array, and filePath matches the array,\n\t\t\t\t\t * then we know for sure that filePath matches at least one non-universal\n\t\t\t\t\t * pattern, so we can consider the entire array to be non-universal.\n\t\t\t\t\t * In other words, all patterns in the array need to be universal\n\t\t\t\t\t * for it to be considered universal.\n\t\t\t\t\t */\n\t\t\t\t\tif (\n\t\t\t\t\t\telement.every(pattern => universalPattern.test(pattern))\n\t\t\t\t\t) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\n\t\t\t\t\tnonUniversalFiles.push(element);\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\t// element is a string\n\n\t\t\t\tif (universalPattern.test(element)) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\tnonUniversalFiles.push(element);\n\t\t\t\treturn false;\n\t\t\t});\n\n\t\t\t// universal patterns were found so we need to check the config twice\n\t\t\tif (universalFiles.length) {\n\t\t\t\tdebug(\"Universal files patterns found. Checking carefully.\");\n\n\t\t\t\t// check that the config matches without the non-universal files first\n\t\t\t\tif (\n\t\t\t\t\tnonUniversalFiles.length &&\n\t\t\t\t\tpathMatches(filePath, relativeFilePath, {\n\t\t\t\t\t\tfiles: nonUniversalFiles,\n\t\t\t\t\t\tignores: config.ignores,\n\t\t\t\t\t})\n\t\t\t\t) {\n\t\t\t\t\tdebug(`Matching config found for ${filePath}`);\n\t\t\t\t\tmatchingConfigIndices.push(index);\n\t\t\t\t\tmatchFound = true;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// if there wasn't a match then check if it matches with universal files\n\t\t\t\tif (\n\t\t\t\t\tuniversalFiles.length &&\n\t\t\t\t\tpathMatches(filePath, relativeFilePath, {\n\t\t\t\t\t\tfiles: universalFiles,\n\t\t\t\t\t\tignores: config.ignores,\n\t\t\t\t\t})\n\t\t\t\t) {\n\t\t\t\t\tdebug(`Matching config found for ${filePath}`);\n\t\t\t\t\tmatchingConfigIndices.push(index);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// if we make here, then there was no match\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// the normal case\n\t\t\tif (pathMatches(filePath, relativeFilePath, config)) {\n\t\t\t\tdebug(`Matching config found for ${filePath}`);\n\t\t\t\tmatchingConfigIndices.push(index);\n\t\t\t\tmatchFound = true;\n\t\t\t}\n\t\t});\n\n\t\t// if matching both files and ignores, there will be no config to create\n\t\tif (!matchFound) {\n\t\t\tdebug(`No matching configs found for ${filePath}`);\n\n\t\t\t// cache and return result\n\t\t\tcache.set(filePath, CONFIG_WITH_STATUS_UNCONFIGURED);\n\t\t\treturn CONFIG_WITH_STATUS_UNCONFIGURED;\n\t\t}\n\n\t\t// check to see if there is a config cached by indices\n\t\tconst indicesKey = matchingConfigIndices.toString();\n\t\tlet configWithStatus = cache.get(indicesKey);\n\n\t\tif (configWithStatus) {\n\t\t\t// also store for filename for faster lookup next time\n\t\t\tcache.set(filePath, configWithStatus);\n\n\t\t\treturn configWithStatus;\n\t\t}\n\n\t\t// otherwise construct the config\n\n\t\t// eslint-disable-next-line array-callback-return, consistent-return -- rethrowConfigError always throws an error\n\t\tlet finalConfig = matchingConfigIndices.reduce((result, index) => {\n\t\t\ttry {\n\t\t\t\treturn this[ConfigArraySymbol.schema].merge(\n\t\t\t\t\tresult,\n\t\t\t\t\tthis[index],\n\t\t\t\t);\n\t\t\t} catch (validationError) {\n\t\t\t\trethrowConfigError(this[index], index, validationError);\n\t\t\t}\n\t\t}, {});\n\n\t\tfinalConfig = this[ConfigArraySymbol.finalizeConfig](finalConfig);\n\n\t\tconfigWithStatus = Object.freeze({\n\t\t\tconfig: finalConfig,\n\t\t\tstatus: \"matched\",\n\t\t});\n\t\tcache.set(filePath, configWithStatus);\n\t\tcache.set(indicesKey, configWithStatus);\n\n\t\treturn configWithStatus;\n\t}\n\n\t/**\n\t * Returns the config object for a given file path.\n\t * @param {string} filePath The path of a file to get a config for.\n\t * @returns {Object|undefined} The config object for this file or `undefined`.\n\t */\n\tgetConfig(filePath) {\n\t\treturn this.getConfigWithStatus(filePath).config;\n\t}\n\n\t/**\n\t * Determines whether a file has a config or why it doesn't.\n\t * @param {string} filePath The path of the file to check.\n\t * @returns {\"ignored\"|\"external\"|\"unconfigured\"|\"matched\"} One of the following values:\n\t * * `\"ignored\"`: the file is ignored\n\t * * `\"external\"`: the file is outside the base path\n\t * * `\"unconfigured\"`: the file is not matched by any config\n\t * * `\"matched\"`: the file has a matching config\n\t */\n\tgetConfigStatus(filePath) {\n\t\treturn this.getConfigWithStatus(filePath).status;\n\t}\n\n\t/**\n\t * Determines if the given filepath is ignored based on the configs.\n\t * @param {string} filePath The path of a file to check.\n\t * @returns {boolean} True if the path is ignored, false if not.\n\t * @deprecated Use `isFileIgnored` instead.\n\t */\n\tisIgnored(filePath) {\n\t\treturn this.isFileIgnored(filePath);\n\t}\n\n\t/**\n\t * Determines if the given filepath is ignored based on the configs.\n\t * @param {string} filePath The path of a file to check.\n\t * @returns {boolean} True if the path is ignored, false if not.\n\t */\n\tisFileIgnored(filePath) {\n\t\treturn this.getConfigStatus(filePath) === \"ignored\";\n\t}\n\n\t/**\n\t * Determines if the given directory is ignored based on the configs.\n\t * This checks only default `ignores` that don't have `files` in the\n\t * same config. A pattern such as `/foo` be considered to ignore the directory\n\t * while a pattern such as `/foo/**` is not considered to ignore the\n\t * directory because it is matching files.\n\t * @param {string} directoryPath The path of a directory to check.\n\t * @returns {boolean} True if the directory is ignored, false if not. Will\n\t * \t\treturn true for any directory that is not inside of `basePath`.\n\t * @throws {Error} When the `ConfigArray` is not normalized.\n\t */\n\tisDirectoryIgnored(directoryPath) {\n\t\tassertNormalized(this);\n\n\t\tconst relativeDirectoryPath = toRelativePath(\n\t\t\tdirectoryPath,\n\t\t\tthis.#namespacedBasePath,\n\t\t\tthis.#path,\n\t\t);\n\n\t\t// basePath directory can never be ignored\n\t\tif (relativeDirectoryPath === \"\") {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (EXTERNAL_PATH_REGEX.test(relativeDirectoryPath)) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// first check the cache\n\t\tconst cache = dataCache.get(this).directoryMatches;\n\n\t\tif (cache.has(relativeDirectoryPath)) {\n\t\t\treturn cache.get(relativeDirectoryPath);\n\t\t}\n\n\t\tconst directoryParts = relativeDirectoryPath.split(\"/\");\n\t\tlet relativeDirectoryToCheck = \"\";\n\t\tlet result;\n\n\t\t/*\n\t\t * In order to get the correct gitignore-style ignores, where an\n\t\t * ignored parent directory cannot have any descendants unignored,\n\t\t * we need to check every directory starting at the parent all\n\t\t * the way down to the actual requested directory.\n\t\t *\n\t\t * We aggressively cache all of this info to make sure we don't\n\t\t * have to recalculate everything for every call.\n\t\t */\n\t\tdo {\n\t\t\trelativeDirectoryToCheck += `${directoryParts.shift()}/`;\n\n\t\t\tresult = shouldIgnorePath(\n\t\t\t\tthis.ignores,\n\t\t\t\tthis.#path.join(this.basePath, relativeDirectoryToCheck),\n\t\t\t\trelativeDirectoryToCheck,\n\t\t\t\t{\n\t\t\t\t\tbasePath: this.#namespacedBasePath,\n\t\t\t\t\tpath: this.#path,\n\t\t\t\t},\n\t\t\t);\n\n\t\t\tcache.set(relativeDirectoryToCheck, result);\n\t\t} while (!result && directoryParts.length);\n\n\t\t// also cache the result for the requested path\n\t\tcache.set(relativeDirectoryPath, result);\n\n\t\treturn result;\n\t}\n}\n\nexport { ConfigArray, ConfigArraySymbol };\n","import type { MinimatchOptions } from \"minimatch\";\nimport type { FlatConfigItem, MatchedFile } from \"./types\";\nimport { ConfigArray } from \"@eslint/config-array\";\nimport { Minimatch } from \"minimatch\";\n\nexport const DEFAULT_WORKSPACE_SCAN_GLOBS: readonly string[] = [\n \"**/*.{css,scss,sass,less,pcss,sss,styl,stylus,vue,svelte,astro,html}\",\n];\n\nconst minimatchOpts: MinimatchOptions = { dot: true };\nconst _matchInstances = new Map<string, Minimatch>();\n\nfunction minimatch(file: string, pattern: string) {\n const normalizedPattern = pattern.startsWith(\"!\")\n ? pattern.slice(1)\n : pattern;\n\n let m = _matchInstances.get(normalizedPattern);\n if (!m) {\n m = new Minimatch(normalizedPattern, minimatchOpts);\n _matchInstances.set(normalizedPattern, m);\n }\n return m.match(file);\n}\n\nexport function getMatchedGlobs(file: string, globs: string[]): string[] {\n return globs.filter((glob) => minimatch(file, glob));\n}\n\nfunction getParentDirectories(filepath: string): string[] {\n const parts = filepath.split(\"/\").filter(Boolean);\n if (parts.length <= 1) return [];\n\n const directories: string[] = [];\n for (let i = 1; i < parts.length; i += 1)\n directories.push(`${parts.slice(0, i).join(\"/\")}/`);\n\n return directories;\n}\n\nfunction isIgnoredByGlobalIgnoreGlobs(\n filepath: string,\n globs: string[]\n): boolean {\n const parentDirectories = getParentDirectories(filepath);\n let isFileIgnored = false;\n const ignoredDirectories = new Map<string, boolean>(\n parentDirectories.map((directory) => [directory, false])\n );\n\n for (const glob of globs) {\n const isUnignore = glob.startsWith(\"!\");\n const nextIgnored = !isUnignore;\n\n if (minimatch(filepath, glob)) isFileIgnored = nextIgnored;\n\n parentDirectories.forEach((directory) => {\n if (minimatch(directory, glob))\n ignoredDirectories.set(directory, nextIgnored);\n });\n }\n\n return isFileIgnored || [...ignoredDirectories.values()].some(Boolean);\n}\n\nfunction isIgnoredByConfigGlobs(filepath: string, globs: string[]): boolean {\n const matchedGlobs = getMatchedGlobs(filepath, globs);\n return matchedGlobs.length > 0 && !matchedGlobs.at(-1)?.startsWith(\"!\");\n}\n\nconst META_KEYS = new Set([\"name\", \"index\"]);\n\n/**\n * Config with only `ignores` property\n */\nexport function isIgnoreOnlyConfig(config: FlatConfigItem): boolean {\n const keys = Object.keys(config).filter((i) => !META_KEYS.has(i));\n return keys.length === 1 && keys[0] === \"ignores\";\n}\n\n/**\n * Config without `files` and `ignores` properties or with only `ignores`\n * property\n */\nexport function isGeneralConfig(config: FlatConfigItem): boolean {\n return (!config.files && !config.ignores) || isIgnoreOnlyConfig(config);\n}\n\nexport function matchFile(\n filepath: string,\n configs: FlatConfigItem[],\n _basePath: string\n): MatchedFile {\n const result: MatchedFile = {\n filepath,\n globs: [],\n configs: [],\n };\n\n const globalIgnoreGlobs = configs\n .filter((config) => isIgnoreOnlyConfig(config))\n .flatMap((config) => config.ignores ?? []);\n const isGloballyIgnored = isIgnoredByGlobalIgnoreGlobs(\n filepath,\n globalIgnoreGlobs\n );\n\n configs.forEach((config) => {\n if (isIgnoreOnlyConfig(config)) {\n result.globs.push(\n ...getMatchedGlobs(filepath, config.ignores ?? [])\n );\n return;\n }\n\n const positive = getMatchedGlobs(filepath, config.files || []);\n const negative = getMatchedGlobs(filepath, config.ignores || []);\n const isIgnoredByConfig = isIgnoredByConfigGlobs(\n filepath,\n config.ignores ?? []\n );\n\n const hasNoFilesConstraint = !config.files?.length;\n const matchesByFiles = hasNoFilesConstraint || positive.length > 0;\n\n const isMatched =\n !isGloballyIgnored && matchesByFiles && !isIgnoredByConfig;\n\n if (isMatched) {\n result.configs.push(config.index);\n\n // Push positive globs only when config is matched and has explicit files globs.\n result.globs.push(...positive);\n }\n\n result.globs.push(...negative);\n });\n\n result.globs = [...new Set(result.globs)];\n\n return result;\n}\n\nconst NOOP_SCHEMA = {\n merge: \"replace\",\n validate() {},\n};\n\nconst FLAT_CONFIG_NOOP_SCHEMA = {\n settings: NOOP_SCHEMA,\n linterOptions: NOOP_SCHEMA,\n language: NOOP_SCHEMA,\n languageOptions: NOOP_SCHEMA,\n processor: NOOP_SCHEMA,\n plugins: NOOP_SCHEMA,\n extends: NOOP_SCHEMA,\n customSyntax: NOOP_SCHEMA,\n overrides: NOOP_SCHEMA,\n ignoreFiles: NOOP_SCHEMA,\n defaultSeverity: NOOP_SCHEMA,\n processors: NOOP_SCHEMA,\n reportDescriptionlessDisables: NOOP_SCHEMA,\n reportInvalidScopeDisables: NOOP_SCHEMA,\n reportNeedlessDisables: NOOP_SCHEMA,\n reportUnscopedDisables: NOOP_SCHEMA,\n configurationComment: NOOP_SCHEMA,\n ignoreDisables: NOOP_SCHEMA,\n allowEmptyInput: NOOP_SCHEMA,\n cache: NOOP_SCHEMA,\n fix: NOOP_SCHEMA,\n formatter: NOOP_SCHEMA,\n index: {\n ...NOOP_SCHEMA,\n // accumulate the matched config index to an array\n merge(v1: number | number[], v2: number | number[]) {\n return [...[v1].flat(), ...[v2].flat()];\n },\n },\n rules: NOOP_SCHEMA,\n};\n\nexport function buildConfigArray(\n configs: Array<Record<string, unknown>>,\n basePath: string\n): ConfigArray {\n return new ConfigArray(configs, {\n basePath,\n schema: FLAT_CONFIG_NOOP_SCHEMA as unknown as never,\n }).normalizeSync();\n}\n","import c from \"ansis\";\nimport { MARK_ERROR } from \"./constants\";\n\nexport class ConfigInspectorError extends Error {\n prettyPrint(): void {\n console.error(MARK_ERROR, this.message);\n }\n}\n\nexport class ConfigPathError extends ConfigInspectorError {\n override name = \"ConfigPathError\" as const;\n\n constructor(\n public basePath: string,\n public configFilenames: readonly string[]\n ) {\n super(\"Cannot find Stylelint config file\");\n }\n\n override prettyPrint(): void {\n console.error(\n MARK_ERROR,\n this.message,\n c.dim(`\n\nLooked in ${c.underline(this.basePath)} and parent folders for:\n\n * ${this.configFilenames.join(\"\\n * \")}`)\n );\n }\n}\n\nexport class ConfigPathLegacyError extends ConfigInspectorError {\n override name = \"ConfigPathLegacyError\" as const;\n\n constructor(\n public basePath: string,\n public configFilename: string\n ) {\n super(\"Found legacy Stylelint config file\");\n }\n\n override prettyPrint(): void {\n console.error(\n MARK_ERROR,\n this.message,\n c.dim(`\n\nEncountered legacy Stylelint config ${c.underline(this.configFilename)} in ${c.underline(this.basePath)}\n\nPrefer modern Stylelint config filenames:\nhttps://stylelint.io/user-guide/configure`)\n );\n }\n}\n","import type { Config as StylelintConfig } from \"stylelint\";\nimport type {\n ExtendsInfo,\n FlatConfigItem,\n MatchedFile,\n Payload,\n RuleDescriptionSource,\n RuleDocsUrlSource,\n RuleInfo,\n RulesRecord,\n StylelintIgnoreInfo,\n} from \"../../shared/types\";\nimport type {\n InspectorAdapter,\n InspectorReadResult,\n ReadConfigOptions,\n ResolveConfigPathOptions,\n ResolvedConfigPath,\n} from \"./contracts\";\nimport { readFile, stat } from \"node:fs/promises\";\nimport { createRequire } from \"node:module\";\nimport { isAbsolute } from \"node:path\";\nimport process from \"node:process\";\nimport { pathToFileURL } from \"node:url\";\nimport c from \"ansis\";\nimport { bundleRequire } from \"bundle-require\";\nimport { findUp } from \"find-up\";\nimport { basename, dirname, normalize, relative, resolve } from \"pathe\";\nimport stylelint from \"stylelint\";\nimport { glob } from \"tinyglobby\";\nimport {\n DEFAULT_WORKSPACE_SCAN_GLOBS,\n isGeneralConfig,\n isIgnoreOnlyConfig,\n matchFile,\n} from \"../../shared/configs\";\nimport {\n DEFAULT_TARGET_FILE,\n MARK_CHECK,\n MARK_INFO,\n stylelintConfigFilenames,\n stylelintLegacyConfigFilenames,\n} from \"../constants\";\nimport { ConfigPathError } from \"../errors\";\n\nconst DEFAULT_WORKSPACE_SCAN_IGNORES = [\n \"**/node_modules/**\",\n \"**/.git/**\",\n \"**/.nuxt/**\",\n \"**/.output/**\",\n \"**/dist/**\",\n \"**/coverage/**\",\n];\nconst MAX_WORKSPACE_MATCHED_FILES = 5000;\nconst FILE_EXTENSION_RE = /\\.[^.]+$/;\nconst REGEXP_SPECIAL_CHARS_RE = /[.*+?^${}()|[\\]\\\\]/g;\nconst AT_PREFIX_RE = /^@/;\nconst STYLELINT_PLUGIN_PREFIX_RE = /^stylelint-plugin-/;\nconst STYLELINT_PACKAGE_PREFIX_RE = /^stylelint-/;\nconst SCOPED_STYLELINT_PLUGIN_PACKAGE_RE =\n /^(@[^/]+)\\/stylelint-plugin(?:-(.+))?$/;\nconst SCOPED_STYLELINT_PACKAGE_RE = /^(@[^/]+)\\/stylelint-(.+)$/;\nconst GENERIC_PLUGIN_PREFIXES = new Set([\n \"plugin\",\n \"rule\",\n \"rules\",\n]);\nconst UNSAFE_MESSAGE_DESCRIPTION_RE =\n /^Expected\\s+\"undefined\"\\s+to\\s+be\\s+one\\s+of\\s+\"undefined\"/i;\nconst MESSAGE_PLACEHOLDER_RE = /%[a-z]/i;\nconst MESSAGE_UNDEFINED_RE = /\\bundefined\\b/i;\nconst TRAILING_RULE_REFERENCE_RE = /\\s*\\(([^()]+)\\)\\s*$/;\nconst DESCRIPTION_TEMPLATE_TOKEN_RE = /<([a-z][\\w-]*)>/gi;\nconst QUOTED_GENERATED_PLACEHOLDER_RE = /([\"'])(‹[^›]+›)\\1/g;\nconst MULTIPLE_WHITESPACE_RE = /\\s+/g;\nconst LINE_SPLIT_RE = /\\r?\\n/u;\nconst GIT_SUFFIX_RE = /\\.git$/i;\nconst GIT_PROTOCOL_PREFIX_RE = /^git\\+/i;\nconst MESSAGE_CALL_ARGS: readonly unknown[][] = [\n [],\n [\"<value>\"],\n [\"<value>\", \"<value>\"],\n [\n \"<value>\",\n \"<value>\",\n \"<value>\",\n ],\n];\nconst PRIORITIZED_MESSAGE_KEYS = new Set([\n \"rejected\",\n \"unexpected\",\n \"expected\",\n \"message\",\n \"default\",\n]);\nconst GENERATED_VALUE_PLACEHOLDERS = [\n \"‹foo›\",\n \"‹bar›\",\n \"‹baz›\",\n \"‹qux›\",\n] as const;\n\nconst require = createRequire(import.meta.url);\n\ninterface StylelintConfigLike extends Record<string, unknown> {\n files?: unknown;\n ignoreFiles?: unknown;\n rules?: unknown;\n plugins?: unknown;\n extends?: unknown;\n customSyntax?: unknown;\n name?: unknown;\n overrides?: unknown;\n}\n\ninterface ResolveConfigOptionsSubset {\n cwd?: string;\n config?: StylelintConfig;\n configBasedir?: string;\n customSyntax?: string;\n}\n\ninterface RuleMetaLike extends Record<string, unknown> {\n url?: unknown;\n fixable?: unknown;\n deprecated?: unknown;\n description?: unknown;\n recommended?: unknown;\n}\n\ninterface RuleFunctionLike {\n (...args: unknown[]): unknown;\n ruleName?: unknown;\n meta?: unknown;\n messages?: unknown;\n primaryOptionArray?: unknown;\n}\n\ninterface RuleDefinitionLike {\n ruleName: string;\n meta?: RuleMetaLike;\n messages?: Record<string, unknown>;\n primaryOptionArray?: unknown[];\n}\n\ninterface PluginRuleDefinitionSource {\n definition: RuleDefinitionLike;\n sourcePlugin: string;\n sourcePackageName?: string;\n sourceDocsUrl?: string;\n sourceDocsUrlSource?: RuleDocsUrlSource;\n}\n\ninterface RuleDescriptionResult {\n text: string;\n missingDescription: boolean;\n source: RuleDescriptionSource;\n}\n\ninterface PluginPackageDocsMetadata {\n packageName?: string;\n docsUrl?: string;\n docsUrlSource?: RuleDocsUrlSource;\n}\n\ninterface ResolvedExtendsSpecifier {\n specifier: string;\n packageName?: string;\n packageRoot?: string;\n resolvedPath?: string;\n source: ExtendsInfo[\"source\"];\n}\n\nlet _recommendedCoreRulesPromise: Promise<Set<string>> | undefined;\n\nconst OMITTED_EXTRA_CONFIG_KEYS = new Set([\n \"pluginFunctions\",\n \"processors\",\n \"result\",\n \"formatter\",\n]);\n\nfunction isNoConfigError(error: unknown): boolean {\n return (\n error instanceof Error &&\n error.message.includes(\"No configuration provided for\")\n );\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === \"object\" && value !== null;\n}\n\nfunction isScalarValue(\n value: unknown\n): value is string | number | boolean | null {\n return (\n value === null ||\n typeof value === \"string\" ||\n typeof value === \"number\" ||\n typeof value === \"boolean\"\n );\n}\n\nfunction isPlainSerializableObject(\n value: unknown\n): value is Record<string, string | number | boolean | null> {\n if (!isRecord(value)) return false;\n\n return Object.values(value).every(isScalarValue);\n}\n\nfunction isSerializableExtraValue(value: unknown): boolean {\n if (isScalarValue(value)) return true;\n\n if (Array.isArray(value)) return value.every(isScalarValue);\n\n if (isPlainSerializableObject(value)) return true;\n\n return false;\n}\n\nfunction sanitizeExtraConfigFields(\n value: Record<string, unknown>\n): Record<string, unknown> {\n return Object.fromEntries(\n Object.entries(value)\n .filter(([key]) => !OMITTED_EXTRA_CONFIG_KEYS.has(key))\n .filter(([, fieldValue]) => isSerializableExtraValue(fieldValue))\n );\n}\n\nfunction getPackageNameFromPath(pathLike: string): string | undefined {\n const normalized = normalize(pathLike).replaceAll(\"\\\\\", \"/\");\n const nodeModulesToken = \"/node_modules/\";\n const nodeModulesIndex = normalized.lastIndexOf(nodeModulesToken);\n\n if (nodeModulesIndex === -1) return undefined;\n\n const packagePath = normalized.slice(\n nodeModulesIndex + nodeModulesToken.length\n );\n const parts = packagePath.split(\"/\").filter(Boolean);\n if (!parts.length) return undefined;\n\n if (parts[0]?.startsWith(\"@\")) {\n const scope = parts[0];\n const name = parts[1];\n if (scope && name) return `${scope}/${name}`;\n }\n\n return parts[0];\n}\n\nfunction sanitizePluginName(name: string): string {\n if (!name.includes(\"/\") && !name.includes(\"\\\\\")) return name;\n\n const packageName = getPackageNameFromPath(name);\n if (packageName) return packageName;\n\n const normalized = normalize(name).replaceAll(\"\\\\\", \"/\");\n const stem = basename(normalized).replace(FILE_EXTENSION_RE, \"\");\n return stem || name;\n}\n\nfunction normalizePluginPackageName(name: string): string {\n const trimmed = name.trim();\n if (!trimmed) return trimmed;\n\n if (trimmed === \"stylelint\") return trimmed;\n\n const scopedPluginMatch = SCOPED_STYLELINT_PLUGIN_PACKAGE_RE.exec(trimmed);\n if (scopedPluginMatch) {\n const scope = scopedPluginMatch[1];\n const suffix = scopedPluginMatch[2];\n if (!scope) return trimmed;\n return suffix ? `${scope}/${suffix}` : scope;\n }\n\n const scopedStylelintMatch = SCOPED_STYLELINT_PACKAGE_RE.exec(trimmed);\n if (scopedStylelintMatch) {\n const scope = scopedStylelintMatch[1];\n const suffix = scopedStylelintMatch[2];\n if (!scope) return trimmed;\n return suffix ? `${scope}/${suffix}` : scope;\n }\n\n if (STYLELINT_PLUGIN_PREFIX_RE.test(trimmed))\n return trimmed.replace(STYLELINT_PLUGIN_PREFIX_RE, \"\");\n\n if (STYLELINT_PACKAGE_PREFIX_RE.test(trimmed))\n return trimmed.replace(STYLELINT_PACKAGE_PREFIX_RE, \"\");\n\n return trimmed;\n}\n\nfunction isBareModuleSpecifier(specifier: string): boolean {\n return (\n !isAbsolute(specifier) &&\n !specifier.startsWith(\".\") &&\n !specifier.startsWith(\"file:\")\n );\n}\n\nfunction toPackageNameFromSpecifier(specifier: string): string | undefined {\n if (!isBareModuleSpecifier(specifier)) return undefined;\n\n const trimmed = specifier.trim();\n if (!trimmed) return undefined;\n\n const parts = trimmed.split(\"/\").filter(Boolean);\n if (!parts.length) return undefined;\n\n if (parts[0]?.startsWith(\"@\")) {\n const scope = parts[0];\n const name = parts[1];\n return scope && name ? `${scope}/${name}` : undefined;\n }\n\n return parts[0];\n}\n\nfunction getPackageRootFromResolvedPath(\n resolvedPath: string\n): string | undefined {\n const normalized = normalize(resolvedPath).replaceAll(\"\\\\\", \"/\");\n const nodeModulesToken = \"/node_modules/\";\n const nodeModulesIndex = normalized.lastIndexOf(nodeModulesToken);\n if (nodeModulesIndex === -1) return undefined;\n\n const modulesRoot = normalized.slice(\n 0,\n nodeModulesIndex + nodeModulesToken.length\n );\n const packagePath = normalized.slice(\n nodeModulesIndex + nodeModulesToken.length\n );\n const parts = packagePath.split(\"/\").filter(Boolean);\n if (!parts.length) return undefined;\n\n if (parts[0]?.startsWith(\"@\")) {\n const scope = parts[0];\n const name = parts[1];\n if (!scope || !name) return undefined;\n return resolve(modulesRoot, scope, name);\n }\n\n const packageName = parts[0];\n return packageName ? resolve(modulesRoot, packageName) : undefined;\n}\n\nfunction normalizeAbsoluteUrl(value: string | undefined): string | undefined {\n if (!value) return undefined;\n\n const trimmed = value.trim();\n if (!trimmed) return undefined;\n\n if (trimmed.startsWith(\"http://\") || trimmed.startsWith(\"https://\"))\n return trimmed;\n\n if (trimmed.startsWith(\"//\")) return `https:${trimmed}`;\n\n return undefined;\n}\n\nfunction normalizeRepositoryUrl(repository: unknown): string | undefined {\n const raw = (() => {\n if (typeof repository === \"string\") return repository;\n\n if (isRecord(repository) && typeof repository[\"url\"] === \"string\")\n return repository[\"url\"];\n\n return undefined;\n })();\n\n if (!raw) return undefined;\n\n const trimmed = raw.trim();\n if (!trimmed) return undefined;\n\n if (trimmed.startsWith(\"github:\"))\n return `https://github.com/${trimmed.slice(\"github:\".length)}`;\n\n if (trimmed.startsWith(\"git@github.com:\"))\n return `https://github.com/${trimmed.slice(\"git@github.com:\".length).replace(GIT_SUFFIX_RE, \"\")}`;\n\n const withoutGitPrefix = trimmed.replace(GIT_PROTOCOL_PREFIX_RE, \"\");\n const normalized =\n withoutGitPrefix.startsWith(\"http://\") ||\n withoutGitPrefix.startsWith(\"https://\")\n ? withoutGitPrefix\n : undefined;\n\n if (!normalized) return undefined;\n\n return normalized.replace(GIT_SUFFIX_RE, \"\");\n}\n\nasync function readPluginPackageDocsMetadata(\n pluginEntry: string\n): Promise<PluginPackageDocsMetadata | undefined> {\n const resolvedPluginEntry = (() => {\n if (isAbsolute(pluginEntry)) return pluginEntry;\n\n if (!isBareModuleSpecifier(pluginEntry)) return undefined;\n\n try {\n return require.resolve(pluginEntry, { paths: [process.cwd()] });\n } catch {\n return undefined;\n }\n })();\n\n const packageName = (() => {\n const fromSpecifier = toPackageNameFromSpecifier(pluginEntry);\n if (fromSpecifier) return fromSpecifier;\n\n if (!resolvedPluginEntry) return undefined;\n\n return getPackageNameFromPath(resolvedPluginEntry);\n })();\n\n if (!packageName) return undefined;\n\n const packageRoot = resolvedPluginEntry\n ? getPackageRootFromResolvedPath(resolvedPluginEntry)\n : undefined;\n\n const packageJsonPath = packageRoot\n ? resolve(packageRoot, \"package.json\")\n : undefined;\n\n const packageJsonContent = packageJsonPath\n ? await readFile(packageJsonPath, \"utf-8\").catch(() => undefined)\n : undefined;\n\n if (!packageJsonContent) {\n return {\n packageName,\n docsUrl: `https://www.npmjs.com/package/${packageName}`,\n docsUrlSource: \"inferred\",\n };\n }\n\n let packageJson: unknown;\n try {\n packageJson = JSON.parse(packageJsonContent);\n } catch {\n packageJson = undefined;\n }\n\n const homepageUrl = normalizeAbsoluteUrl(\n isRecord(packageJson) && typeof packageJson[\"homepage\"] === \"string\"\n ? packageJson[\"homepage\"]\n : undefined\n );\n const repositoryUrl = normalizeRepositoryUrl(\n isRecord(packageJson) ? packageJson[\"repository\"] : undefined\n );\n const docsUrl =\n homepageUrl ??\n repositoryUrl ??\n `https://www.npmjs.com/package/${packageName}`;\n\n return {\n packageName,\n docsUrl,\n docsUrlSource: \"inferred\",\n };\n}\n\nasync function readJsonFile(path: string): Promise<unknown> {\n const content = await readFile(path, \"utf-8\").catch(() => undefined);\n if (!content) return undefined;\n\n try {\n return JSON.parse(content) as unknown;\n } catch {\n return undefined;\n }\n}\n\nasync function readPackageManifest(\n packageRoot: string\n): Promise<Record<string, unknown> | undefined> {\n const packageJson = await readJsonFile(\n resolve(packageRoot, \"package.json\")\n );\n return isRecord(packageJson) ? packageJson : undefined;\n}\n\nasync function resolvePackageRoot(\n packageName: string,\n searchPaths: readonly string[]\n): Promise<string | undefined> {\n for (const searchPath of searchPaths) {\n const candidate = resolve(searchPath, \"node_modules\", packageName);\n if (await exists(candidate)) return candidate;\n }\n\n return undefined;\n}\n\nasync function resolveExtendsSpecifier(\n specifier: string,\n configBasePath: string,\n workspaceBasePath: string\n): Promise<ResolvedExtendsSpecifier> {\n const packageName = toPackageNameFromSpecifier(specifier);\n const searchPaths = [\n ...new Set([\n configBasePath,\n workspaceBasePath,\n process.cwd(),\n ]),\n ];\n\n let resolvedPath: string | undefined;\n\n if (isAbsolute(specifier)) {\n resolvedPath = specifier;\n } else {\n try {\n resolvedPath = require.resolve(specifier, { paths: searchPaths });\n } catch {\n resolvedPath = undefined;\n }\n }\n\n const packageRoot = resolvedPath\n ? getPackageRootFromResolvedPath(resolvedPath)\n : packageName\n ? await resolvePackageRoot(packageName, searchPaths)\n : undefined;\n\n let source: \"package\" | \"local\" | \"unknown\" = \"unknown\";\n if (packageName) {\n source = \"package\";\n } else if (specifier.startsWith(\".\") || isAbsolute(specifier)) {\n source = \"local\";\n }\n\n return {\n specifier,\n ...(packageName !== undefined && { packageName }),\n ...(packageRoot !== undefined && { packageRoot }),\n ...(resolvedPath !== undefined && { resolvedPath }),\n source,\n };\n}\n\nasync function resolvePackageEntryPath(\n packageRoot: string\n): Promise<string | undefined> {\n const packageJson = await readPackageManifest(packageRoot);\n const entryCandidates = [\n typeof packageJson?.[\"main\"] === \"string\"\n ? packageJson[\"main\"]\n : undefined,\n \"index.js\",\n \"index.cjs\",\n \"index.mjs\",\n ].filter(\n (candidate): candidate is string =>\n typeof candidate === \"string\" && candidate.length > 0\n );\n\n for (const candidate of entryCandidates) {\n const entryPath = resolve(packageRoot, candidate);\n if (await exists(entryPath)) return entryPath;\n }\n\n return undefined;\n}\n\nasync function loadExtendsConfig(\n resolvedSpecifier: ResolvedExtendsSpecifier,\n configBasePath: string\n): Promise<StylelintConfigLike | undefined> {\n const entryPath =\n resolvedSpecifier.resolvedPath ??\n (resolvedSpecifier.packageRoot\n ? await resolvePackageEntryPath(resolvedSpecifier.packageRoot)\n : undefined);\n\n if (!entryPath) return undefined;\n\n try {\n const loaded = await loadConfigFromPath(entryPath, configBasePath);\n return loaded.config as StylelintConfigLike;\n } catch {\n return undefined;\n }\n}\n\nasync function readExtendsPackageMetadata(\n resolvedSpecifier: ResolvedExtendsSpecifier\n): Promise<{\n description?: string;\n docsUrl?: string;\n docsUrlSource?: RuleDocsUrlSource;\n}> {\n const packageRoot = resolvedSpecifier.packageRoot;\n const packageName = resolvedSpecifier.packageName;\n\n if (!packageRoot && !packageName) return {};\n\n const packageJson = packageRoot\n ? await readPackageManifest(packageRoot)\n : undefined;\n\n const description =\n typeof packageJson?.[\"description\"] === \"string\"\n ? packageJson[\"description\"].trim() || undefined\n : undefined;\n const homepageUrl = normalizeAbsoluteUrl(\n typeof packageJson?.[\"homepage\"] === \"string\"\n ? packageJson[\"homepage\"]\n : undefined\n );\n const repositoryUrl = normalizeRepositoryUrl(packageJson?.[\"repository\"]);\n const docsUrl =\n homepageUrl ??\n repositoryUrl ??\n (packageName\n ? `https://www.npmjs.com/package/${packageName}`\n : undefined);\n\n return {\n ...(description !== undefined && { description }),\n ...(docsUrl !== undefined && { docsUrl }),\n ...(docsUrl ? { docsUrlSource: \"inferred\" as const } : {}),\n };\n}\n\nasync function buildExtendsInfo(\n configs: FlatConfigItem[],\n workspaceBasePath: string,\n configBasePath: string\n): Promise<ExtendsInfo[]> {\n const usedBy = new Map<string, Set<number>>();\n\n for (const config of configs) {\n for (const specifier of config.extends ?? []) {\n if (!usedBy.has(specifier))\n usedBy.set(specifier, new Set<number>());\n usedBy.get(specifier)?.add(config.index);\n }\n }\n\n const entries = await Promise.all(\n Array.from(usedBy.entries(), async ([specifier, indexes]) => {\n const resolvedSpecifier = await resolveExtendsSpecifier(\n specifier,\n configBasePath,\n workspaceBasePath\n );\n const [packageMetadata, loadedConfig] = await Promise.all([\n readExtendsPackageMetadata(resolvedSpecifier),\n loadExtendsConfig(resolvedSpecifier, configBasePath),\n ]);\n\n const normalizedPlugins = toPluginRecord(loadedConfig?.plugins);\n const directExtends = toStringArray(loadedConfig?.extends);\n const customSyntax =\n typeof loadedConfig?.customSyntax === \"string\"\n ? loadedConfig.customSyntax\n : undefined;\n const rules = toRulesRecord(loadedConfig?.rules);\n const ruleNames = rules\n ? Object.keys(rules).toSorted((left, right) =>\n left.localeCompare(right)\n )\n : undefined;\n\n return {\n specifier,\n ...(resolvedSpecifier.packageName !== undefined && {\n packageName: resolvedSpecifier.packageName,\n }),\n ...(packageMetadata.description !== undefined && {\n description: packageMetadata.description,\n }),\n ...(packageMetadata.docsUrl !== undefined && {\n docsUrl: packageMetadata.docsUrl,\n }),\n ...(packageMetadata.docsUrlSource !== undefined && {\n docsUrlSource: packageMetadata.docsUrlSource,\n }),\n source: resolvedSpecifier.source,\n ...(directExtends ? { directExtends } : {}),\n ...(normalizedPlugins\n ? { plugins: Object.keys(normalizedPlugins) }\n : {}),\n ...(customSyntax ? { customSyntax } : {}),\n ...(rules ? { ruleCount: Object.keys(rules).length } : {}),\n ...(ruleNames ? { rules: ruleNames } : {}),\n usedByConfigIndexes: [...indexes].toSorted(\n (left, right) => left - right\n ),\n } satisfies ExtendsInfo;\n })\n );\n\n return entries.toSorted((left, right) =>\n left.specifier.localeCompare(right.specifier)\n );\n}\n\nasync function readStylelintIgnoreInfo(\n basePath: string\n): Promise<StylelintIgnoreInfo | undefined> {\n const ignorePath = await findUp(\".stylelintignore\", { cwd: basePath });\n if (!ignorePath) return undefined;\n\n const content = await readFile(ignorePath, \"utf-8\").catch(() => undefined);\n if (!content) return undefined;\n\n const patterns = content\n .split(LINE_SPLIT_RE)\n .map((line) => line.trim())\n .filter((line) => line.length > 0 && !line.startsWith(\"#\"));\n\n return {\n path: getRelativeFilepath(basePath, ignorePath),\n patterns,\n };\n}\n\nfunction toStringArray(value: unknown): string[] | undefined {\n if (typeof value === \"string\") return [value];\n\n if (!Array.isArray(value)) return undefined;\n\n const items = value.filter(\n (item): item is string => typeof item === \"string\"\n );\n return items.length ? items : undefined;\n}\n\nfunction toRulesRecord(value: unknown): RulesRecord | undefined {\n if (!isRecord(value)) return undefined;\n return value;\n}\n\nfunction getPluginName(entry: unknown, index: number): string {\n if (typeof entry === \"string\") return sanitizePluginName(entry);\n\n if (typeof entry === \"function\" && entry.name) return entry.name;\n\n if (isRecord(entry) && typeof entry[\"ruleName\"] === \"string\")\n return entry[\"ruleName\"].split(\"/\")[0] ?? entry[\"ruleName\"];\n\n return `plugin-${index + 1}`;\n}\n\nfunction toPluginRecord(value: unknown): Record<string, unknown> | undefined {\n if (!Array.isArray(value)) return undefined;\n\n const entries = value\n .map((entry, index) => getPluginName(entry, index))\n .filter(Boolean);\n\n if (!entries.length) return undefined;\n\n return Object.fromEntries(entries.map((name) => [name, {}]));\n}\n\nfunction getRulePlugin(ruleName: string): string {\n return ruleName.includes(\"/\")\n ? (ruleName.split(\"/\")[0] ?? \"stylelint\")\n : \"stylelint\";\n}\n\nfunction getDisplayPluginName(ruleName: string, sourcePlugin?: string): string {\n const rulePlugin = getRulePlugin(ruleName);\n if (!sourcePlugin) return rulePlugin;\n\n return GENERIC_PLUGIN_PREFIXES.has(rulePlugin) ? sourcePlugin : rulePlugin;\n}\n\nfunction toUnknownArray(value: unknown): unknown[] | undefined {\n return Array.isArray(value) ? value : undefined;\n}\n\nfunction toUnknownRecord(value: unknown): Record<string, unknown> | undefined {\n return isRecord(value) ? value : undefined;\n}\n\nfunction toRuleMeta(value: unknown): RuleMetaLike | undefined {\n return isRecord(value) ? value : undefined;\n}\n\nfunction toRuleFunction(value: unknown): RuleFunctionLike | undefined {\n return typeof value === \"function\"\n ? (value as RuleFunctionLike)\n : undefined;\n}\n\nfunction getRuleNameFromUnknown(value: unknown): string | undefined {\n if (isRecord(value) && typeof value[\"ruleName\"] === \"string\")\n return value[\"ruleName\"];\n\n const functionValue = toRuleFunction(value);\n if (typeof functionValue?.ruleName === \"string\")\n return functionValue.ruleName;\n\n return undefined;\n}\n\nfunction toRuleDefinition(\n value: unknown,\n fallbackRuleName?: string\n): RuleDefinitionLike | undefined {\n const functionValue = toRuleFunction(value);\n if (functionValue) {\n const ruleName =\n typeof functionValue.ruleName === \"string\"\n ? functionValue.ruleName\n : fallbackRuleName;\n\n if (!ruleName) return undefined;\n\n const meta = toRuleMeta(functionValue.meta);\n const messages = toUnknownRecord(functionValue.messages);\n const primaryOptionArray = toUnknownArray(\n functionValue.primaryOptionArray\n );\n return {\n ruleName,\n ...(meta !== undefined && { meta }),\n ...(messages !== undefined && { messages }),\n ...(primaryOptionArray !== undefined && { primaryOptionArray }),\n };\n }\n\n if (!isRecord(value)) return undefined;\n\n const nestedRule = toRuleFunction(value[\"rule\"]);\n let ruleName = fallbackRuleName;\n if (typeof value[\"ruleName\"] === \"string\") {\n ruleName = value[\"ruleName\"];\n } else if (typeof nestedRule?.ruleName === \"string\") {\n ruleName = nestedRule.ruleName;\n }\n\n if (!ruleName) return undefined;\n\n const meta = toRuleMeta(value[\"meta\"]) ?? toRuleMeta(nestedRule?.meta);\n const messages =\n toUnknownRecord(value[\"messages\"]) ??\n toUnknownRecord(nestedRule?.messages);\n const primaryOptionArray =\n toUnknownArray(value[\"primaryOptionArray\"]) ??\n toUnknownArray(nestedRule?.primaryOptionArray);\n return {\n ruleName,\n ...(meta !== undefined && { meta }),\n ...(messages !== undefined && { messages }),\n ...(primaryOptionArray !== undefined && { primaryOptionArray }),\n };\n}\n\nfunction resolveMessageText(message: unknown): string | undefined {\n if (typeof message === \"string\") return message;\n\n if (typeof message === \"function\") {\n const resolvedCandidates: string[] = [];\n\n for (const args of MESSAGE_CALL_ARGS) {\n try {\n const resolved = message(...args);\n if (typeof resolved === \"string\" && resolved.trim().length > 0)\n resolvedCandidates.push(resolved.trim());\n } catch {\n // Ignore plugin message invocation failures and continue trying alternatives.\n }\n }\n\n if (resolvedCandidates.length > 0) {\n return resolvedCandidates.toSorted((a, b) => {\n const scoreA = getMessageDescriptionScore(\"message\", a);\n const scoreB = getMessageDescriptionScore(\"message\", b);\n if (scoreA !== scoreB) return scoreA - scoreB;\n\n if (a.length !== b.length) return a.length - b.length;\n\n return a.localeCompare(b);\n })[0];\n }\n }\n\n return undefined;\n}\n\nfunction normalizeRuleMessages(\n messages: Record<string, unknown> | undefined\n): Record<string, string> | undefined {\n if (!messages) return undefined;\n\n const entries = Object.entries(messages)\n .map(([key, value]) => {\n const text = resolveMessageText(value);\n return text ? ([key, text] as const) : undefined;\n })\n .filter(\n (entry): entry is readonly [string, string] => entry !== undefined\n );\n\n return entries.length ? Object.fromEntries(entries) : undefined;\n}\n\nfunction humanizeRuleName(ruleName: string): string {\n const shortName = ruleName.includes(\"/\")\n ? (ruleName.split(\"/\").at(-1) ?? ruleName)\n : ruleName;\n\n return shortName.replaceAll(\"-\", \" \");\n}\n\nfunction toDescriptionPrefixCandidates(\n ruleName: string,\n plugin: string\n): string[] {\n const unscopedPlugin = plugin.replace(AT_PREFIX_RE, \"\");\n const shortRuleName = ruleName.split(\"/\").at(-1) ?? ruleName;\n const candidates = [\n plugin,\n unscopedPlugin,\n ruleName,\n shortRuleName,\n ].filter(Boolean);\n\n const deduplicatedCandidates = [...new Set(candidates)];\n return deduplicatedCandidates;\n}\n\nfunction isUnsafeGeneratedDescription(description: string): boolean {\n return UNSAFE_MESSAGE_DESCRIPTION_RE.test(description);\n}\n\nfunction escapeRegExp(value: string): string {\n return value.replaceAll(REGEXP_SPECIAL_CHARS_RE, String.raw`\\$&`);\n}\n\nfunction sanitizeDescription(ruleName: string, description: string): string {\n const plugin = getRulePlugin(ruleName);\n const sanitized = description.trim();\n if (!sanitized.length) return humanizeRuleName(ruleName);\n\n if (isUnsafeGeneratedDescription(sanitized))\n return humanizeRuleName(ruleName);\n\n const prefixCandidates = toDescriptionPrefixCandidates(ruleName, plugin);\n const withoutPrefix = prefixCandidates.reduce((acc, candidate) => {\n if (!acc.length) return acc;\n\n return acc\n .replace(\n new RegExp(\n String.raw`^${escapeRegExp(candidate)}[\\s:/-]+`,\n \"i\"\n ),\n \"\"\n )\n .trim();\n }, sanitized);\n\n if (!withoutPrefix.length) return humanizeRuleName(ruleName);\n\n let valuePlaceholderIndex = 0;\n const normalizedDescription = withoutPrefix\n .replace(DESCRIPTION_TEMPLATE_TOKEN_RE, (_match, token: string) => {\n const lowerToken = token.toLowerCase();\n if (lowerToken === \"value\") {\n const placeholder =\n GENERATED_VALUE_PLACEHOLDERS[valuePlaceholderIndex] ??\n `‹value ${valuePlaceholderIndex + 1}›`;\n valuePlaceholderIndex += 1;\n return placeholder;\n }\n return token.replaceAll(\"-\", \" \");\n })\n .replaceAll(QUOTED_GENERATED_PLACEHOLDER_RE, \"$2\")\n .replaceAll(MULTIPLE_WHITESPACE_RE, \" \")\n .trim();\n\n if (!normalizedDescription.length) return humanizeRuleName(ruleName);\n\n const lower = normalizedDescription.toLowerCase();\n if (\n lower === ruleName.toLowerCase() ||\n lower === humanizeRuleName(ruleName).toLowerCase()\n ) {\n return humanizeRuleName(ruleName);\n }\n\n const shortRuleName = ruleName.split(\"/\").at(-1) ?? ruleName;\n const trailingRuleReference = TRAILING_RULE_REFERENCE_RE.exec(\n normalizedDescription\n );\n if (trailingRuleReference?.[1]) {\n const referencedRule = trailingRuleReference[1].trim().toLowerCase();\n if (\n referencedRule === ruleName.toLowerCase() ||\n referencedRule === shortRuleName.toLowerCase()\n ) {\n return normalizedDescription\n .slice(0, trailingRuleReference.index)\n .trim();\n }\n }\n\n return normalizedDescription;\n}\n\nfunction getMessageDescriptionScore(key: string, description: string): number {\n let score = PRIORITIZED_MESSAGE_KEYS.has(key) ? 0 : 10;\n\n if (MESSAGE_PLACEHOLDER_RE.test(description)) score += 20;\n\n if (MESSAGE_UNDEFINED_RE.test(description)) score += 40;\n\n if (isUnsafeGeneratedDescription(description)) score += 100;\n\n if (description.length < 8) score += 5;\n\n return score;\n}\n\nfunction getDescriptionFromMessages(\n ruleName: string,\n messages: Record<string, string> | undefined\n): string | undefined {\n if (!messages) return undefined;\n\n const fallbackDescription = humanizeRuleName(ruleName);\n const candidates = Object.entries(messages)\n .map(([key, value]) => ({ key, value: value.trim() }))\n .filter((candidate) => candidate.value.length > 0)\n .toSorted((a, b) => {\n const scoreDiff =\n getMessageDescriptionScore(a.key, a.value) -\n getMessageDescriptionScore(b.key, b.value);\n if (scoreDiff !== 0) return scoreDiff;\n\n if (a.value.length !== b.value.length)\n return a.value.length - b.value.length;\n\n return a.key.localeCompare(b.key);\n });\n\n for (const candidate of candidates) {\n const description = sanitizeDescription(ruleName, candidate.value);\n if (description !== fallbackDescription) return description;\n }\n\n return undefined;\n}\n\nfunction getRuleDescription(\n ruleName: string,\n meta: RuleMetaLike | undefined,\n messages: Record<string, string> | undefined\n): RuleDescriptionResult {\n const fallbackDescription = humanizeRuleName(ruleName);\n\n if (\n typeof meta?.description === \"string\" &&\n meta.description.trim().length > 0\n ) {\n const description = sanitizeDescription(ruleName, meta.description);\n return {\n text: description,\n missingDescription: false,\n source: \"meta\",\n };\n }\n\n const messageDescription = getDescriptionFromMessages(ruleName, messages);\n if (messageDescription) {\n return {\n text: messageDescription,\n missingDescription: false,\n source: \"message\",\n };\n }\n\n return {\n text: fallbackDescription,\n missingDescription: true,\n source: \"generated\",\n };\n}\n\nfunction normalizeRuleDeprecated(\n deprecated: unknown\n): RuleInfo[\"deprecated\"] | undefined {\n if (typeof deprecated === \"boolean\") return deprecated;\n\n if (isRecord(deprecated)) {\n return deprecated;\n }\n\n return undefined;\n}\n\nfunction normalizeRuleFixable(\n fixable: unknown\n): RuleInfo[\"fixable\"] | undefined {\n if (typeof fixable === \"boolean\" || typeof fixable === \"string\")\n return fixable;\n return undefined;\n}\n\nfunction buildRuleInfo(\n name: string,\n definition: RuleDefinitionLike | undefined,\n recommendedRuleNames: Set<string>,\n configuredRuleNames: Set<string>,\n sourcePlugin?: string,\n sourcePackageName?: string,\n sourceDocsUrl?: string,\n sourceDocsUrlSource?: RuleDocsUrlSource\n): RuleInfo {\n const plugin = getDisplayPluginName(name, sourcePlugin);\n const meta = definition?.meta;\n const messages = normalizeRuleMessages(definition?.messages);\n const metaDocsUrl =\n typeof meta?.url === \"string\" && meta.url.length ? meta.url : undefined;\n const docsUrl = metaDocsUrl ?? sourceDocsUrl;\n const docsUrlSource: RuleDocsUrlSource | undefined = metaDocsUrl\n ? \"meta\"\n : sourceDocsUrlSource;\n const description = getRuleDescription(name, meta, messages);\n const isRecommended =\n recommendedRuleNames.has(name) || meta?.recommended === true;\n\n const info: RuleInfo = {\n name,\n plugin,\n ...(sourcePackageName ? { pluginPackageName: sourcePackageName } : {}),\n docs: {\n description: description.text,\n descriptionSource: description.source,\n ...(description.missingDescription\n ? { descriptionMissing: true }\n : {}),\n ...(isRecommended ? { recommended: true } : {}),\n ...(docsUrl ? { url: docsUrl } : {}),\n ...(docsUrl && docsUrlSource ? { urlSource: docsUrlSource } : {}),\n },\n };\n\n if (messages) info.messages = messages;\n\n const defaultOptions = definition?.primaryOptionArray;\n if (defaultOptions) info.defaultOptions = defaultOptions;\n\n const fixable = normalizeRuleFixable(meta?.fixable);\n if (fixable !== undefined) info.fixable = fixable;\n\n const deprecated = normalizeRuleDeprecated(meta?.deprecated);\n if (deprecated !== undefined) info.deprecated = deprecated;\n\n if (!definition && configuredRuleNames.has(name)) info.invalid = true;\n\n return info;\n}\n\nfunction resolveCoreRuleNames(): string[] {\n const rules = stylelint.rules as Record<string, unknown>;\n return Object.keys(rules);\n}\n\nasync function resolveRecommendedCoreRuleNames(): Promise<Set<string>> {\n if (_recommendedCoreRulesPromise) return await _recommendedCoreRulesPromise;\n\n _recommendedCoreRulesPromise = (async () => {\n try {\n const moduleValue = await import(\"stylelint-config-recommended\");\n const configValue = (moduleValue.default ?? moduleValue) as unknown;\n if (!isRecord(configValue) || !isRecord(configValue[\"rules\"]))\n return new Set<string>();\n\n return new Set(Object.keys(configValue[\"rules\"]));\n } catch {\n return new Set<string>();\n }\n })();\n\n return await _recommendedCoreRulesPromise;\n}\n\nasync function resolveCoreRuleDefinition(\n ruleName: string\n): Promise<RuleDefinitionLike | undefined> {\n const rules = stylelint.rules as Record<string, unknown>;\n const ruleEntry = rules[ruleName];\n if (!ruleEntry) return undefined;\n\n const resolvedRule = await Promise.resolve(ruleEntry).catch(\n () => undefined\n );\n return toRuleDefinition(resolvedRule, ruleName);\n}\n\nasync function importPluginModule(pluginPath: string): Promise<unknown> {\n const specifier = isAbsolute(pluginPath)\n ? pathToFileURL(pluginPath).href\n : pluginPath;\n\n const moduleValue = await import(specifier);\n return moduleValue.default ?? moduleValue;\n}\n\nfunction collectPluginRuleDefinitions(value: unknown): RuleDefinitionLike[] {\n const queue: unknown[] = [];\n const seen = new Set<unknown>();\n\n function enqueue(candidate: unknown) {\n if (candidate === undefined || candidate === null) return;\n if (seen.has(candidate)) return;\n seen.add(candidate);\n queue.push(candidate);\n }\n\n enqueue(value);\n\n const definitions = new Map<string, RuleDefinitionLike>();\n\n while (queue.length > 0) {\n const current = queue.shift();\n if (current === undefined) continue;\n\n if (Array.isArray(current)) {\n current.forEach(enqueue);\n continue;\n }\n\n const definition = toRuleDefinition(current);\n if (definition) definitions.set(definition.ruleName, definition);\n\n if (!isRecord(current)) continue;\n\n if (isRecord(current[\"rules\"]))\n Object.values(current[\"rules\"]).forEach(enqueue);\n\n Object.values(current).forEach((entry) => {\n if (getRuleNameFromUnknown(entry)) enqueue(entry);\n });\n }\n\n return [...definitions.values()];\n}\n\nasync function resolvePluginRuleDefinitions(\n plugins: unknown\n): Promise<Map<string, PluginRuleDefinitionSource>> {\n const definitions = new Map<string, PluginRuleDefinitionSource>();\n\n if (!Array.isArray(plugins)) return definitions;\n\n const loaded = await Promise.all(\n plugins.map(async (pluginEntry, index) => {\n const sourcePlugin = normalizePluginPackageName(\n getPluginName(pluginEntry, index)\n );\n try {\n if (typeof pluginEntry === \"string\") {\n const packageDocsMetadata =\n await readPluginPackageDocsMetadata(pluginEntry);\n return {\n sourcePlugin,\n module: await importPluginModule(pluginEntry),\n packageDocsMetadata,\n };\n }\n\n return {\n sourcePlugin,\n module: pluginEntry,\n packageDocsMetadata: undefined,\n };\n } catch {\n return undefined;\n }\n })\n );\n\n loaded.forEach((pluginLoaded) => {\n if (!pluginLoaded) return;\n\n const { sourcePlugin, module, packageDocsMetadata } = pluginLoaded;\n\n collectPluginRuleDefinitions(module).forEach((definition) => {\n definitions.set(definition.ruleName, {\n definition,\n sourcePlugin,\n ...(packageDocsMetadata?.packageName !== undefined && {\n sourcePackageName: packageDocsMetadata.packageName,\n }),\n ...(packageDocsMetadata?.docsUrl !== undefined && {\n sourceDocsUrl: packageDocsMetadata.docsUrl,\n }),\n ...(packageDocsMetadata?.docsUrlSource !== undefined && {\n sourceDocsUrlSource: packageDocsMetadata.docsUrlSource,\n }),\n });\n });\n });\n\n return definitions;\n}\n\nfunction normalizeConfigItem(\n rawConfig: StylelintConfigLike,\n index: number,\n fallbackName: string\n): FlatConfigItem {\n const {\n files,\n ignoreFiles,\n rules,\n plugins,\n extends: extendsValue,\n customSyntax,\n overrides: _overrides,\n name,\n ...rest\n } = rawConfig;\n\n const sanitizedExtraFields = sanitizeExtraConfigFields(rest);\n\n const config: FlatConfigItem = {\n index,\n name: typeof name === \"string\" && name.length ? name : fallbackName,\n ...sanitizedExtraFields,\n };\n\n const fileGlobs = toStringArray(files);\n if (fileGlobs) config.files = fileGlobs;\n\n const ignoreGlobs = toStringArray(ignoreFiles);\n if (ignoreGlobs) config.ignores = ignoreGlobs;\n\n const normalizedRules = toRulesRecord(rules);\n if (normalizedRules) config.rules = normalizedRules;\n\n const normalizedPlugins = toPluginRecord(plugins);\n if (normalizedPlugins) config.plugins = normalizedPlugins;\n\n const normalizedExtends = toStringArray(extendsValue);\n if (normalizedExtends) config.extends = normalizedExtends;\n\n if (typeof customSyntax === \"string\") config.customSyntax = customSyntax;\n\n return config;\n}\n\nfunction mergeConfigForDisplay(\n resolvedConfig: StylelintConfigLike,\n sourceConfig?: StylelintConfigLike\n): StylelintConfigLike {\n if (!sourceConfig) return resolvedConfig;\n\n return {\n ...resolvedConfig,\n ...sourceConfig,\n rules: resolvedConfig.rules ?? sourceConfig.rules,\n files: sourceConfig.files ?? resolvedConfig.files,\n ignoreFiles: sourceConfig.ignoreFiles ?? resolvedConfig.ignoreFiles,\n plugins: sourceConfig.plugins ?? resolvedConfig.plugins,\n extends: sourceConfig.extends ?? resolvedConfig.extends,\n customSyntax: sourceConfig.customSyntax ?? resolvedConfig.customSyntax,\n name: sourceConfig.name ?? resolvedConfig.name,\n };\n}\n\nfunction extractConfigs(\n resolvedConfig: StylelintConfigLike,\n sourceConfig?: StylelintConfigLike\n): FlatConfigItem[] {\n const { overrides: _resolvedOverrides, ...rootConfig } = resolvedConfig;\n const { overrides: _sourceOverrides, ...sourceRootConfig } =\n sourceConfig ?? {};\n\n const configs: FlatConfigItem[] = [\n normalizeConfigItem(\n mergeConfigForDisplay(\n rootConfig,\n sourceConfig ? sourceRootConfig : undefined\n ),\n 0,\n \"stylelint/root\"\n ),\n ];\n\n const resolvedOverrides = Array.isArray(_resolvedOverrides)\n ? _resolvedOverrides\n : [];\n const overrideSource = Array.isArray(sourceConfig?.overrides)\n ? sourceConfig.overrides\n : resolvedOverrides;\n\n if (Array.isArray(overrideSource)) {\n overrideSource.forEach((override, index) => {\n const sourceOverride = isRecord(override)\n ? (override as StylelintConfigLike)\n : undefined;\n const resolvedOverride = isRecord(resolvedOverrides[index])\n ? (resolvedOverrides[index] as StylelintConfigLike)\n : undefined;\n\n if (!sourceOverride && !resolvedOverride) return;\n\n const fallbackName = `stylelint/override-${index + 1}`;\n\n configs.push(\n normalizeConfigItem(\n mergeConfigForDisplay(\n resolvedOverride ?? sourceOverride ?? {},\n sourceOverride\n ),\n index + 1,\n fallbackName\n )\n );\n });\n }\n\n return configs;\n}\n\nasync function buildRuleCatalog(\n configs: FlatConfigItem[],\n resolvedConfig: StylelintConfigLike\n): Promise<Record<string, RuleInfo>> {\n const configuredRuleNames = new Set(\n configs.flatMap((config) => Object.keys(config.rules ?? {}))\n );\n const pluginRuleDefinitions = await resolvePluginRuleDefinitions(\n resolvedConfig.plugins\n );\n const coreRuleNames = resolveCoreRuleNames();\n const recommendedCoreRuleNames = await resolveRecommendedCoreRuleNames();\n const recommendedPluginRuleNames = Array.from(\n pluginRuleDefinitions.values(),\n (entry) => entry.definition\n )\n .filter((definition) => definition.meta?.recommended === true)\n .map((definition) => definition.ruleName);\n const recommendedRuleNames = new Set<string>([\n ...recommendedCoreRuleNames,\n ...recommendedPluginRuleNames,\n ]);\n\n const ruleNames = [\n ...new Set([\n ...configuredRuleNames,\n ...coreRuleNames,\n ...pluginRuleDefinitions.keys(),\n ]),\n ];\n const coreRuleDefinitions = new Map<string, RuleDefinitionLike>();\n\n await Promise.all(\n ruleNames\n .filter((ruleName) => getRulePlugin(ruleName) === \"stylelint\")\n .map(async (ruleName) => {\n const definition = await resolveCoreRuleDefinition(ruleName);\n if (definition) coreRuleDefinitions.set(ruleName, definition);\n })\n );\n\n const ruleInfoEntries = ruleNames.map((ruleName) => {\n const pluginDefinition = pluginRuleDefinitions.get(ruleName);\n const definition =\n getRulePlugin(ruleName) === \"stylelint\"\n ? coreRuleDefinitions.get(ruleName)\n : pluginDefinition?.definition;\n\n return [\n ruleName,\n buildRuleInfo(\n ruleName,\n definition,\n recommendedRuleNames,\n configuredRuleNames,\n pluginDefinition?.sourcePlugin,\n pluginDefinition?.sourcePackageName,\n pluginDefinition?.sourceDocsUrl,\n pluginDefinition?.sourceDocsUrlSource\n ),\n ] as const;\n });\n\n return Object.fromEntries(ruleInfoEntries);\n}\n\nfunction normalizeWorkspaceFilepath(path: string): string {\n return normalize(path).replaceAll(\"\\\\\", \"/\");\n}\n\nfunction toWorkspaceScanGlobs(configs: FlatConfigItem[]): string[] {\n const fileGlobs = configs.flatMap((config) => config.files ?? []);\n const positiveGlobs = fileGlobs.filter(\n (glob) => typeof glob === \"string\" && !glob.startsWith(\"!\")\n );\n return [...new Set(positiveGlobs)];\n}\n\nasync function resolveMatchedFiles(\n configs: FlatConfigItem[],\n basePath: string\n): Promise<{ files: MatchedFile[]; diagnostics: string[] }> {\n const diagnostics: string[] = [];\n const configuredGlobs = toWorkspaceScanGlobs(configs);\n const hasGeneralConfig = configs.some(\n (config) => isGeneralConfig(config) && !isIgnoreOnlyConfig(config)\n );\n const scanGlobs = configuredGlobs.length\n ? [\n ...new Set(\n hasGeneralConfig\n ? [...configuredGlobs, ...DEFAULT_WORKSPACE_SCAN_GLOBS]\n : configuredGlobs\n ),\n ]\n : DEFAULT_WORKSPACE_SCAN_GLOBS;\n\n if (!configuredGlobs.length) {\n diagnostics.push(\n \"No explicit `files` globs found in resolved config items; scanned common style-related extensions for workspace matching.\"\n );\n } else if (hasGeneralConfig) {\n diagnostics.push(\n \"General config items were detected; included common style-related extensions in workspace scan alongside configured `files` globs.\"\n );\n }\n\n const discoveredFiles = await glob(scanGlobs, {\n cwd: basePath,\n onlyFiles: true,\n dot: true,\n ignore: DEFAULT_WORKSPACE_SCAN_IGNORES,\n });\n\n if (discoveredFiles.length > MAX_WORKSPACE_MATCHED_FILES) {\n diagnostics.push(\n `Workspace matching was truncated to the first ${MAX_WORKSPACE_MATCHED_FILES} files (found ${discoveredFiles.length}).`\n );\n }\n\n const generalConfigIndexes = configs\n .filter(\n (config) => isGeneralConfig(config) && !isIgnoreOnlyConfig(config)\n )\n .map((config) => config.index);\n\n const files = discoveredFiles\n .slice(0, MAX_WORKSPACE_MATCHED_FILES)\n .map(normalizeWorkspaceFilepath)\n .map((filepath) => {\n const matched = matchFile(filepath, configs, basePath);\n if (\n matched.configs.length === 0 &&\n matched.globs.length === 0 &&\n generalConfigIndexes.length\n ) {\n matched.configs.push(...generalConfigIndexes);\n }\n return matched;\n })\n .filter((result) => result.configs.length > 0)\n .toSorted((a, b) => a.filepath.localeCompare(b.filepath));\n\n return {\n files,\n diagnostics,\n };\n}\n\nfunction getRelativeFilepath(basePath: string, filePath: string): string {\n const result = relative(basePath, filePath).replaceAll(\"\\\\\", \"/\");\n return result.length ? result : filePath;\n}\n\nasync function exists(path: string): Promise<boolean> {\n return await stat(path)\n .then(() => true)\n .catch(() => false);\n}\n\nasync function loadConfigFromPath(\n configPath: string,\n basePath: string\n): Promise<{ config: StylelintConfig; dependencies: string[] }> {\n if (basename(configPath) === \"package.json\") {\n const pkg = await readFile(configPath, \"utf-8\");\n const parsed = JSON.parse(pkg) as unknown;\n\n if (!isRecord(parsed) || !isRecord(parsed[\"stylelint\"])) {\n throw new Error(`No \"stylelint\" field found in ${configPath}`);\n }\n\n return {\n config: parsed[\"stylelint\"] as StylelintConfig,\n dependencies: [configPath],\n };\n }\n\n const { mod, dependencies } = await bundleRequire({\n filepath: configPath,\n cwd: basePath,\n tsconfig: false,\n });\n\n const configValue = (mod.default ?? mod) as unknown;\n if (!isRecord(configValue)) {\n throw new Error(`Expected Stylelint config object from ${configPath}`);\n }\n\n return {\n config: configValue as StylelintConfig,\n dependencies,\n };\n}\n\nasync function findDiscoveredConfigPath(\n cwd: string\n): Promise<string | undefined> {\n const configFilePath = await findUp(stylelintConfigFilenames, { cwd });\n if (configFilePath) return normalize(configFilePath);\n\n const legacyFilePath = await findUp(stylelintLegacyConfigFilenames, {\n cwd,\n });\n if (legacyFilePath) return normalize(legacyFilePath);\n\n const packageJsonPath = await findUp(\"package.json\", { cwd });\n if (!packageJsonPath) return undefined;\n\n const packageJsonContent = await readFile(packageJsonPath, \"utf-8\").catch(\n () => undefined\n );\n if (!packageJsonContent) return undefined;\n\n let packageJson: unknown;\n try {\n packageJson = JSON.parse(packageJsonContent) as unknown;\n } catch {\n return undefined;\n }\n\n if (isRecord(packageJson) && isRecord(packageJson[\"stylelint\"]))\n return normalize(packageJsonPath);\n\n return undefined;\n}\n\nclass StylelintInspectorAdapter implements InspectorAdapter {\n readonly engine = \"stylelint\" as const;\n\n async resolveConfigPath(\n options: ResolveConfigPathOptions\n ): Promise<ResolvedConfigPath> {\n const { cwd, userConfigPath, userBasePath } = options;\n\n const resolvedUserBasePath = userBasePath\n ? normalize(resolve(cwd, userBasePath))\n : undefined;\n const lookupBasePath = resolvedUserBasePath ?? cwd;\n\n let configPath: string | undefined;\n if (userConfigPath) {\n const candidate = normalize(resolve(cwd, userConfigPath));\n\n if (!(await exists(candidate))) {\n throw new ConfigPathError(\n `${relative(cwd, dirname(candidate))}/`,\n stylelintConfigFilenames\n );\n }\n\n configPath = candidate;\n } else {\n configPath = await findDiscoveredConfigPath(lookupBasePath);\n }\n\n const basePath = normalize(\n resolvedUserBasePath ??\n (userConfigPath\n ? cwd\n : configPath\n ? dirname(configPath)\n : lookupBasePath)\n );\n\n return {\n basePath,\n ...(configPath !== undefined && { configPath }),\n };\n }\n\n async readConfig(options: ReadConfigOptions): Promise<InspectorReadResult> {\n const {\n chdir = true,\n globMatchedFiles: shouldGlobMatchedFiles = true,\n } = options;\n\n const { basePath, configPath } = await this.resolveConfigPath(options);\n const configPathRelative = configPath\n ? getRelativeFilepath(options.cwd, configPath)\n : \"\";\n\n if (chdir && basePath !== process.cwd()) process.chdir(basePath);\n\n const targetFilePath = normalize(\n resolve(basePath, options.targetFilePath ?? DEFAULT_TARGET_FILE)\n );\n const targetFilepathRelative = getRelativeFilepath(\n basePath,\n targetFilePath\n );\n\n console.log(\n MARK_INFO,\n `Resolving Stylelint config for`,\n c.blue(targetFilepathRelative)\n );\n\n const dependencies = new Set<string>();\n const diagnostics: string[] = [];\n let config: StylelintConfig | undefined;\n\n if (configPath) {\n try {\n const loaded = await loadConfigFromPath(configPath, basePath);\n config = loaded.config;\n\n if (options.userConfigPath)\n loaded.dependencies.forEach((dep) => dependencies.add(dep));\n else dependencies.add(configPath);\n } catch (error) {\n if (options.userConfigPath) throw error;\n\n dependencies.add(configPath);\n diagnostics.push(\n \"Could not parse discovered config directly; using resolved output only for config item extraction.\"\n );\n }\n }\n\n const resolveOptions: ResolveConfigOptionsSubset = {\n cwd: basePath,\n };\n\n if (config) {\n resolveOptions.config = config;\n resolveOptions.configBasedir = configPath\n ? dirname(configPath)\n : basePath;\n }\n if (options.customSyntax)\n resolveOptions.customSyntax = options.customSyntax;\n\n let resolved: StylelintConfig | undefined;\n try {\n resolved = await stylelint.resolveConfig(\n targetFilePath,\n resolveOptions\n );\n } catch (error) {\n if (!isNoConfigError(error)) throw error;\n }\n\n if (options.userBasePath) {\n diagnostics.push(\n `Base path overridden to ${getRelativeFilepath(options.cwd, basePath)}.`\n );\n }\n\n if (!resolved) {\n const payload: Payload = {\n configs: [],\n rules: {},\n diagnostics,\n meta: {\n engine: this.engine,\n lastUpdate: Date.now(),\n basePath,\n configPath: configPathRelative,\n targetFilePath: targetFilepathRelative,\n configNotFound: true,\n },\n };\n\n return {\n configs: [],\n payload,\n dependencies: [...dependencies],\n };\n }\n\n const configs = extractConfigs(\n resolved as StylelintConfigLike,\n config as StylelintConfigLike | undefined\n );\n const configBasePath = configPath ? dirname(configPath) : basePath;\n const [\n rules,\n stylelintIgnore,\n extendsInfo,\n ] = await Promise.all([\n buildRuleCatalog(configs, resolved as StylelintConfigLike),\n readStylelintIgnoreInfo(basePath),\n buildExtendsInfo(configs, basePath, configBasePath),\n ]);\n\n let files: MatchedFile[] | undefined;\n if (shouldGlobMatchedFiles) {\n const resolvedFiles = await resolveMatchedFiles(configs, basePath);\n files = resolvedFiles.files;\n diagnostics.push(...resolvedFiles.diagnostics);\n }\n\n console.log(\n MARK_CHECK,\n \"Loaded with\",\n configs.length,\n \"config items and\",\n Object.keys(rules).length,\n \"rules\"\n );\n\n const payload: Payload = {\n configs,\n rules,\n diagnostics,\n ...(files !== undefined && { files }),\n extendsInfo,\n meta: {\n engine: this.engine,\n lastUpdate: Date.now(),\n basePath,\n configPath: configPathRelative,\n targetFilePath: targetFilepathRelative,\n ...(stylelintIgnore ? { stylelintIgnore } : {}),\n },\n };\n\n return {\n configs,\n payload,\n dependencies: [...dependencies],\n };\n }\n}\n\nexport function createStylelintInspectorAdapter(): InspectorAdapter {\n return new StylelintInspectorAdapter();\n}\n","import type {\n InspectorReadResult,\n ReadConfigOptions,\n ResolveConfigPathOptions,\n ResolvedConfigPath,\n} from \"./inspectors/contracts\";\nimport { createStylelintInspectorAdapter } from \"./inspectors/stylelint\";\n\nconst adapter = createStylelintInspectorAdapter();\n\nexport type { ReadConfigOptions, ResolveConfigPathOptions };\n\n/**\n * Alias for inspector config read results.\n */\nexport type InspectorConfig = InspectorReadResult;\n\n/**\n * Search and resolve the Stylelint config location metadata.\n */\nexport function resolveConfigPath(\n options: ResolveConfigPathOptions\n): Promise<ResolvedConfigPath> {\n return adapter.resolveConfigPath(options);\n}\n\n/**\n * Read and normalize the Stylelint config into inspector payload.\n */\nexport function readConfig(\n options: ReadConfigOptions\n): Promise<InspectorReadResult> {\n return adapter.readConfig(options);\n}\n","import { existsSync } from \"node:fs\";\nimport { fileURLToPath } from \"node:url\";\nimport { dirname, join } from \"pathe\";\n\nconst moduleDir = dirname(fileURLToPath(import.meta.url));\n\nconst distDirCandidates = [\n join(moduleDir, \"../dist/public\"),\n join(moduleDir, \"./public\"),\n] as const;\n\nexport const dataDir: string = fileURLToPath(\n new URL(\"../.stylelint-config-inspector\", import.meta.url)\n);\nexport const distDir: string =\n distDirCandidates.find((path) => existsSync(path)) ?? distDirCandidates[0];\n","const mimes = {\n \"3g2\": \"video/3gpp2\",\n \"3gp\": \"video/3gpp\",\n \"3gpp\": \"video/3gpp\",\n \"3mf\": \"model/3mf\",\n \"aac\": \"audio/aac\",\n \"ac\": \"application/pkix-attr-cert\",\n \"adp\": \"audio/adpcm\",\n \"adts\": \"audio/aac\",\n \"ai\": \"application/postscript\",\n \"aml\": \"application/automationml-aml+xml\",\n \"amlx\": \"application/automationml-amlx+zip\",\n \"amr\": \"audio/amr\",\n \"apng\": \"image/apng\",\n \"appcache\": \"text/cache-manifest\",\n \"appinstaller\": \"application/appinstaller\",\n \"appx\": \"application/appx\",\n \"appxbundle\": \"application/appxbundle\",\n \"asc\": \"application/pgp-keys\",\n \"atom\": \"application/atom+xml\",\n \"atomcat\": \"application/atomcat+xml\",\n \"atomdeleted\": \"application/atomdeleted+xml\",\n \"atomsvc\": \"application/atomsvc+xml\",\n \"au\": \"audio/basic\",\n \"avci\": \"image/avci\",\n \"avcs\": \"image/avcs\",\n \"avif\": \"image/avif\",\n \"aw\": \"application/applixware\",\n \"bdoc\": \"application/bdoc\",\n \"bin\": \"application/octet-stream\",\n \"bmp\": \"image/bmp\",\n \"bpk\": \"application/octet-stream\",\n \"btf\": \"image/prs.btif\",\n \"btif\": \"image/prs.btif\",\n \"buffer\": \"application/octet-stream\",\n \"ccxml\": \"application/ccxml+xml\",\n \"cdfx\": \"application/cdfx+xml\",\n \"cdmia\": \"application/cdmi-capability\",\n \"cdmic\": \"application/cdmi-container\",\n \"cdmid\": \"application/cdmi-domain\",\n \"cdmio\": \"application/cdmi-object\",\n \"cdmiq\": \"application/cdmi-queue\",\n \"cer\": \"application/pkix-cert\",\n \"cgm\": \"image/cgm\",\n \"cjs\": \"application/node\",\n \"class\": \"application/java-vm\",\n \"coffee\": \"text/coffeescript\",\n \"conf\": \"text/plain\",\n \"cpl\": \"application/cpl+xml\",\n \"cpt\": \"application/mac-compactpro\",\n \"crl\": \"application/pkix-crl\",\n \"css\": \"text/css\",\n \"csv\": \"text/csv\",\n \"cu\": \"application/cu-seeme\",\n \"cwl\": \"application/cwl\",\n \"cww\": \"application/prs.cww\",\n \"davmount\": \"application/davmount+xml\",\n \"dbk\": \"application/docbook+xml\",\n \"deb\": \"application/octet-stream\",\n \"def\": \"text/plain\",\n \"deploy\": \"application/octet-stream\",\n \"dib\": \"image/bmp\",\n \"disposition-notification\": \"message/disposition-notification\",\n \"dist\": \"application/octet-stream\",\n \"distz\": \"application/octet-stream\",\n \"dll\": \"application/octet-stream\",\n \"dmg\": \"application/octet-stream\",\n \"dms\": \"application/octet-stream\",\n \"doc\": \"application/msword\",\n \"dot\": \"application/msword\",\n \"dpx\": \"image/dpx\",\n \"drle\": \"image/dicom-rle\",\n \"dsc\": \"text/prs.lines.tag\",\n \"dssc\": \"application/dssc+der\",\n \"dtd\": \"application/xml-dtd\",\n \"dump\": \"application/octet-stream\",\n \"dwd\": \"application/atsc-dwd+xml\",\n \"ear\": \"application/java-archive\",\n \"ecma\": \"application/ecmascript\",\n \"elc\": \"application/octet-stream\",\n \"emf\": \"image/emf\",\n \"eml\": \"message/rfc822\",\n \"emma\": \"application/emma+xml\",\n \"emotionml\": \"application/emotionml+xml\",\n \"eps\": \"application/postscript\",\n \"epub\": \"application/epub+zip\",\n \"exe\": \"application/octet-stream\",\n \"exi\": \"application/exi\",\n \"exp\": \"application/express\",\n \"exr\": \"image/aces\",\n \"ez\": \"application/andrew-inset\",\n \"fdf\": \"application/fdf\",\n \"fdt\": \"application/fdt+xml\",\n \"fits\": \"image/fits\",\n \"g3\": \"image/g3fax\",\n \"gbr\": \"application/rpki-ghostbusters\",\n \"geojson\": \"application/geo+json\",\n \"gif\": \"image/gif\",\n \"glb\": \"model/gltf-binary\",\n \"gltf\": \"model/gltf+json\",\n \"gml\": \"application/gml+xml\",\n \"gpx\": \"application/gpx+xml\",\n \"gram\": \"application/srgs\",\n \"grxml\": \"application/srgs+xml\",\n \"gxf\": \"application/gxf\",\n \"gz\": \"application/gzip\",\n \"h261\": \"video/h261\",\n \"h263\": \"video/h263\",\n \"h264\": \"video/h264\",\n \"heic\": \"image/heic\",\n \"heics\": \"image/heic-sequence\",\n \"heif\": \"image/heif\",\n \"heifs\": \"image/heif-sequence\",\n \"hej2\": \"image/hej2k\",\n \"held\": \"application/atsc-held+xml\",\n \"hjson\": \"application/hjson\",\n \"hlp\": \"application/winhlp\",\n \"hqx\": \"application/mac-binhex40\",\n \"hsj2\": \"image/hsj2\",\n \"htm\": \"text/html\",\n \"html\": \"text/html\",\n \"ics\": \"text/calendar\",\n \"ief\": \"image/ief\",\n \"ifb\": \"text/calendar\",\n \"iges\": \"model/iges\",\n \"igs\": \"model/iges\",\n \"img\": \"application/octet-stream\",\n \"in\": \"text/plain\",\n \"ini\": \"text/plain\",\n \"ink\": \"application/inkml+xml\",\n \"inkml\": \"application/inkml+xml\",\n \"ipfix\": \"application/ipfix\",\n \"iso\": \"application/octet-stream\",\n \"its\": \"application/its+xml\",\n \"jade\": \"text/jade\",\n \"jar\": \"application/java-archive\",\n \"jhc\": \"image/jphc\",\n \"jls\": \"image/jls\",\n \"jp2\": \"image/jp2\",\n \"jpe\": \"image/jpeg\",\n \"jpeg\": \"image/jpeg\",\n \"jpf\": \"image/jpx\",\n \"jpg\": \"image/jpeg\",\n \"jpg2\": \"image/jp2\",\n \"jpgm\": \"image/jpm\",\n \"jpgv\": \"video/jpeg\",\n \"jph\": \"image/jph\",\n \"jpm\": \"image/jpm\",\n \"jpx\": \"image/jpx\",\n \"js\": \"text/javascript\",\n \"json\": \"application/json\",\n \"json5\": \"application/json5\",\n \"jsonld\": \"application/ld+json\",\n \"jsonml\": \"application/jsonml+json\",\n \"jsx\": \"text/jsx\",\n \"jt\": \"model/jt\",\n \"jxl\": \"image/jxl\",\n \"jxr\": \"image/jxr\",\n \"jxra\": \"image/jxra\",\n \"jxrs\": \"image/jxrs\",\n \"jxs\": \"image/jxs\",\n \"jxsc\": \"image/jxsc\",\n \"jxsi\": \"image/jxsi\",\n \"jxss\": \"image/jxss\",\n \"kar\": \"audio/midi\",\n \"ktx\": \"image/ktx\",\n \"ktx2\": \"image/ktx2\",\n \"less\": \"text/less\",\n \"lgr\": \"application/lgr+xml\",\n \"list\": \"text/plain\",\n \"litcoffee\": \"text/coffeescript\",\n \"log\": \"text/plain\",\n \"lostxml\": \"application/lost+xml\",\n \"lrf\": \"application/octet-stream\",\n \"m1v\": \"video/mpeg\",\n \"m21\": \"application/mp21\",\n \"m2a\": \"audio/mpeg\",\n \"m2t\": \"video/mp2t\",\n \"m2ts\": \"video/mp2t\",\n \"m2v\": \"video/mpeg\",\n \"m3a\": \"audio/mpeg\",\n \"m4a\": \"audio/mp4\",\n \"m4p\": \"application/mp4\",\n \"m4s\": \"video/iso.segment\",\n \"ma\": \"application/mathematica\",\n \"mads\": \"application/mads+xml\",\n \"maei\": \"application/mmt-aei+xml\",\n \"man\": \"text/troff\",\n \"manifest\": \"text/cache-manifest\",\n \"map\": \"application/json\",\n \"mar\": \"application/octet-stream\",\n \"markdown\": \"text/markdown\",\n \"mathml\": \"application/mathml+xml\",\n \"mb\": \"application/mathematica\",\n \"mbox\": \"application/mbox\",\n \"md\": \"text/markdown\",\n \"mdx\": \"text/mdx\",\n \"me\": \"text/troff\",\n \"mesh\": \"model/mesh\",\n \"meta4\": \"application/metalink4+xml\",\n \"metalink\": \"application/metalink+xml\",\n \"mets\": \"application/mets+xml\",\n \"mft\": \"application/rpki-manifest\",\n \"mid\": \"audio/midi\",\n \"midi\": \"audio/midi\",\n \"mime\": \"message/rfc822\",\n \"mj2\": \"video/mj2\",\n \"mjp2\": \"video/mj2\",\n \"mjs\": \"text/javascript\",\n \"mml\": \"text/mathml\",\n \"mods\": \"application/mods+xml\",\n \"mov\": \"video/quicktime\",\n \"mp2\": \"audio/mpeg\",\n \"mp21\": \"application/mp21\",\n \"mp2a\": \"audio/mpeg\",\n \"mp3\": \"audio/mpeg\",\n \"mp4\": \"video/mp4\",\n \"mp4a\": \"audio/mp4\",\n \"mp4s\": \"application/mp4\",\n \"mp4v\": \"video/mp4\",\n \"mpd\": \"application/dash+xml\",\n \"mpe\": \"video/mpeg\",\n \"mpeg\": \"video/mpeg\",\n \"mpf\": \"application/media-policy-dataset+xml\",\n \"mpg\": \"video/mpeg\",\n \"mpg4\": \"video/mp4\",\n \"mpga\": \"audio/mpeg\",\n \"mpp\": \"application/dash-patch+xml\",\n \"mrc\": \"application/marc\",\n \"mrcx\": \"application/marcxml+xml\",\n \"ms\": \"text/troff\",\n \"mscml\": \"application/mediaservercontrol+xml\",\n \"msh\": \"model/mesh\",\n \"msi\": \"application/octet-stream\",\n \"msix\": \"application/msix\",\n \"msixbundle\": \"application/msixbundle\",\n \"msm\": \"application/octet-stream\",\n \"msp\": \"application/octet-stream\",\n \"mtl\": \"model/mtl\",\n \"mts\": \"video/mp2t\",\n \"musd\": \"application/mmt-usd+xml\",\n \"mxf\": \"application/mxf\",\n \"mxmf\": \"audio/mobile-xmf\",\n \"mxml\": \"application/xv+xml\",\n \"n3\": \"text/n3\",\n \"nb\": \"application/mathematica\",\n \"nq\": \"application/n-quads\",\n \"nt\": \"application/n-triples\",\n \"obj\": \"model/obj\",\n \"oda\": \"application/oda\",\n \"oga\": \"audio/ogg\",\n \"ogg\": \"audio/ogg\",\n \"ogv\": \"video/ogg\",\n \"ogx\": \"application/ogg\",\n \"omdoc\": \"application/omdoc+xml\",\n \"onepkg\": \"application/onenote\",\n \"onetmp\": \"application/onenote\",\n \"onetoc\": \"application/onenote\",\n \"onetoc2\": \"application/onenote\",\n \"opf\": \"application/oebps-package+xml\",\n \"opus\": \"audio/ogg\",\n \"otf\": \"font/otf\",\n \"owl\": \"application/rdf+xml\",\n \"oxps\": \"application/oxps\",\n \"p10\": \"application/pkcs10\",\n \"p7c\": \"application/pkcs7-mime\",\n \"p7m\": \"application/pkcs7-mime\",\n \"p7s\": \"application/pkcs7-signature\",\n \"p8\": \"application/pkcs8\",\n \"pdf\": \"application/pdf\",\n \"pfr\": \"application/font-tdpfr\",\n \"pgp\": \"application/pgp-encrypted\",\n \"pkg\": \"application/octet-stream\",\n \"pki\": \"application/pkixcmp\",\n \"pkipath\": \"application/pkix-pkipath\",\n \"pls\": \"application/pls+xml\",\n \"png\": \"image/png\",\n \"prc\": \"model/prc\",\n \"prf\": \"application/pics-rules\",\n \"provx\": \"application/provenance+xml\",\n \"ps\": \"application/postscript\",\n \"pskcxml\": \"application/pskc+xml\",\n \"pti\": \"image/prs.pti\",\n \"qt\": \"video/quicktime\",\n \"raml\": \"application/raml+yaml\",\n \"rapd\": \"application/route-apd+xml\",\n \"rdf\": \"application/rdf+xml\",\n \"relo\": \"application/p2p-overlay+xml\",\n \"rif\": \"application/reginfo+xml\",\n \"rl\": \"application/resource-lists+xml\",\n \"rld\": \"application/resource-lists-diff+xml\",\n \"rmi\": \"audio/midi\",\n \"rnc\": \"application/relax-ng-compact-syntax\",\n \"rng\": \"application/xml\",\n \"roa\": \"application/rpki-roa\",\n \"roff\": \"text/troff\",\n \"rq\": \"application/sparql-query\",\n \"rs\": \"application/rls-services+xml\",\n \"rsat\": \"application/atsc-rsat+xml\",\n \"rsd\": \"application/rsd+xml\",\n \"rsheet\": \"application/urc-ressheet+xml\",\n \"rss\": \"application/rss+xml\",\n \"rtf\": \"text/rtf\",\n \"rtx\": \"text/richtext\",\n \"rusd\": \"application/route-usd+xml\",\n \"s3m\": \"audio/s3m\",\n \"sbml\": \"application/sbml+xml\",\n \"scq\": \"application/scvp-cv-request\",\n \"scs\": \"application/scvp-cv-response\",\n \"sdp\": \"application/sdp\",\n \"senmlx\": \"application/senml+xml\",\n \"sensmlx\": \"application/sensml+xml\",\n \"ser\": \"application/java-serialized-object\",\n \"setpay\": \"application/set-payment-initiation\",\n \"setreg\": \"application/set-registration-initiation\",\n \"sgi\": \"image/sgi\",\n \"sgm\": \"text/sgml\",\n \"sgml\": \"text/sgml\",\n \"shex\": \"text/shex\",\n \"shf\": \"application/shf+xml\",\n \"shtml\": \"text/html\",\n \"sieve\": \"application/sieve\",\n \"sig\": \"application/pgp-signature\",\n \"sil\": \"audio/silk\",\n \"silo\": \"model/mesh\",\n \"siv\": \"application/sieve\",\n \"slim\": \"text/slim\",\n \"slm\": \"text/slim\",\n \"sls\": \"application/route-s-tsid+xml\",\n \"smi\": \"application/smil+xml\",\n \"smil\": \"application/smil+xml\",\n \"snd\": \"audio/basic\",\n \"so\": \"application/octet-stream\",\n \"spdx\": \"text/spdx\",\n \"spp\": \"application/scvp-vp-response\",\n \"spq\": \"application/scvp-vp-request\",\n \"spx\": \"audio/ogg\",\n \"sql\": \"application/sql\",\n \"sru\": \"application/sru+xml\",\n \"srx\": \"application/sparql-results+xml\",\n \"ssdl\": \"application/ssdl+xml\",\n \"ssml\": \"application/ssml+xml\",\n \"stk\": \"application/hyperstudio\",\n \"stl\": \"model/stl\",\n \"stpx\": \"model/step+xml\",\n \"stpxz\": \"model/step-xml+zip\",\n \"stpz\": \"model/step+zip\",\n \"styl\": \"text/stylus\",\n \"stylus\": \"text/stylus\",\n \"svg\": \"image/svg+xml\",\n \"svgz\": \"image/svg+xml\",\n \"swidtag\": \"application/swid+xml\",\n \"t\": \"text/troff\",\n \"t38\": \"image/t38\",\n \"td\": \"application/urc-targetdesc+xml\",\n \"tei\": \"application/tei+xml\",\n \"teicorpus\": \"application/tei+xml\",\n \"text\": \"text/plain\",\n \"tfi\": \"application/thraud+xml\",\n \"tfx\": \"image/tiff-fx\",\n \"tif\": \"image/tiff\",\n \"tiff\": \"image/tiff\",\n \"toml\": \"application/toml\",\n \"tr\": \"text/troff\",\n \"trig\": \"application/trig\",\n \"ts\": \"video/mp2t\",\n \"tsd\": \"application/timestamped-data\",\n \"tsv\": \"text/tab-separated-values\",\n \"ttc\": \"font/collection\",\n \"ttf\": \"font/ttf\",\n \"ttl\": \"text/turtle\",\n \"ttml\": \"application/ttml+xml\",\n \"txt\": \"text/plain\",\n \"u3d\": \"model/u3d\",\n \"u8dsn\": \"message/global-delivery-status\",\n \"u8hdr\": \"message/global-headers\",\n \"u8mdn\": \"message/global-disposition-notification\",\n \"u8msg\": \"message/global\",\n \"ubj\": \"application/ubjson\",\n \"uri\": \"text/uri-list\",\n \"uris\": \"text/uri-list\",\n \"urls\": \"text/uri-list\",\n \"vcard\": \"text/vcard\",\n \"vrml\": \"model/vrml\",\n \"vtt\": \"text/vtt\",\n \"vxml\": \"application/voicexml+xml\",\n \"war\": \"application/java-archive\",\n \"wasm\": \"application/wasm\",\n \"wav\": \"audio/wav\",\n \"weba\": \"audio/webm\",\n \"webm\": \"video/webm\",\n \"webmanifest\": \"application/manifest+json\",\n \"webp\": \"image/webp\",\n \"wgsl\": \"text/wgsl\",\n \"wgt\": \"application/widget\",\n \"wif\": \"application/watcherinfo+xml\",\n \"wmf\": \"image/wmf\",\n \"woff\": \"font/woff\",\n \"woff2\": \"font/woff2\",\n \"wrl\": \"model/vrml\",\n \"wsdl\": \"application/wsdl+xml\",\n \"wspolicy\": \"application/wspolicy+xml\",\n \"x3d\": \"model/x3d+xml\",\n \"x3db\": \"model/x3d+fastinfoset\",\n \"x3dbz\": \"model/x3d+binary\",\n \"x3dv\": \"model/x3d-vrml\",\n \"x3dvz\": \"model/x3d+vrml\",\n \"x3dz\": \"model/x3d+xml\",\n \"xaml\": \"application/xaml+xml\",\n \"xav\": \"application/xcap-att+xml\",\n \"xca\": \"application/xcap-caps+xml\",\n \"xcs\": \"application/calendar+xml\",\n \"xdf\": \"application/xcap-diff+xml\",\n \"xdssc\": \"application/dssc+xml\",\n \"xel\": \"application/xcap-el+xml\",\n \"xenc\": \"application/xenc+xml\",\n \"xer\": \"application/patch-ops-error+xml\",\n \"xfdf\": \"application/xfdf\",\n \"xht\": \"application/xhtml+xml\",\n \"xhtml\": \"application/xhtml+xml\",\n \"xhvml\": \"application/xv+xml\",\n \"xlf\": \"application/xliff+xml\",\n \"xm\": \"audio/xm\",\n \"xml\": \"text/xml\",\n \"xns\": \"application/xcap-ns+xml\",\n \"xop\": \"application/xop+xml\",\n \"xpl\": \"application/xproc+xml\",\n \"xsd\": \"application/xml\",\n \"xsf\": \"application/prs.xsf+xml\",\n \"xsl\": \"application/xml\",\n \"xslt\": \"application/xml\",\n \"xspf\": \"application/xspf+xml\",\n \"xvm\": \"application/xv+xml\",\n \"xvml\": \"application/xv+xml\",\n \"yaml\": \"text/yaml\",\n \"yang\": \"application/yang\",\n \"yin\": \"application/yin+xml\",\n \"yml\": \"text/yaml\",\n \"zip\": \"application/zip\"\n};\n\nfunction lookup(extn) {\n\tlet tmp = ('' + extn).trim().toLowerCase();\n\tlet idx = tmp.lastIndexOf('.');\n\treturn mimes[!~idx ? tmp : tmp.substring(++idx)];\n}\n\nexport { mimes, lookup };\n","import type { FSWatcher } from \"chokidar\";\nimport type { WebSocket, WebSocketServer as WebSocketServerType } from \"ws\";\nimport type { Payload } from \"~~/shared/types\";\nimport type { ReadConfigOptions } from \"./configs\";\nimport process from \"node:process\";\nimport chokidar from \"chokidar\";\nimport { getPort } from \"get-port-please\";\nimport { normalize, relative } from \"pathe\";\nimport { WebSocketServer } from \"ws\";\nimport { readConfig, resolveConfigPath } from \"./configs\";\nimport { MARK_CHECK } from \"./constants\";\nimport { ConfigInspectorError } from \"./errors\";\n\nconst readErrorWarning = `Failed to load Stylelint configuration.\nPlease ensure a valid Stylelint config can be resolved:\nhttps://stylelint.io/user-guide/configure`;\n\nexport interface CreateWsServerOptions extends ReadConfigOptions {}\n\nexport interface WsServerHandle {\n port: number;\n wss: WebSocketServerType;\n watcher: FSWatcher;\n getData: () => Promise<Payload | undefined>;\n}\n\nexport async function createWsServer(\n options: CreateWsServerOptions\n): Promise<WsServerHandle> {\n let payload: Payload | undefined;\n const port = await getPort({ port: 7811, random: true });\n const wss = new WebSocketServer({\n port,\n });\n const wsClients = new Set<WebSocket>();\n\n wss.on(\"connection\", (ws) => {\n wsClients.add(ws);\n console.log(MARK_CHECK, \"Websocket client connected\");\n ws.on(\"close\", () => wsClients.delete(ws));\n });\n\n let resolvedConfigPath: Awaited<ReturnType<typeof resolveConfigPath>>;\n try {\n resolvedConfigPath = await resolveConfigPath(options);\n } catch (e) {\n if (e instanceof ConfigInspectorError) {\n e.prettyPrint();\n process.exit(1);\n } else {\n throw e;\n }\n }\n\n const { basePath } = resolvedConfigPath;\n\n function toRelativePath(path: string): string {\n const result = relative(options.cwd, path).replaceAll(\"\\\\\", \"/\");\n return result.length ? result : normalize(path).replaceAll(\"\\\\\", \"/\");\n }\n\n function createErrorPayload(error: unknown): Payload {\n const diagnostic =\n error instanceof Error ? error.message : String(error);\n\n return {\n configs: [],\n rules: {},\n diagnostics: [readErrorWarning, diagnostic],\n meta: {\n wsPort: port,\n engine: \"stylelint\",\n ...(options.targetFilePath !== undefined && {\n targetFilePath: options.targetFilePath,\n }),\n lastUpdate: Date.now(),\n basePath,\n configPath: resolvedConfigPath.configPath\n ? toRelativePath(resolvedConfigPath.configPath)\n : \"\",\n },\n };\n }\n\n const watcher = chokidar.watch([], {\n ignoreInitial: true,\n cwd: basePath,\n });\n\n watcher.on(\"change\", (path) => {\n payload = undefined;\n console.log();\n console.log(MARK_CHECK, \"Config change detected\", path);\n wsClients.forEach((ws) => {\n ws.send(\n JSON.stringify({\n type: \"config-change\",\n path,\n })\n );\n });\n });\n\n async function getData() {\n try {\n if (!payload) {\n return await readConfig(options).then((res) => {\n const _payload = (payload = res.payload);\n _payload.meta.wsPort = port;\n watcher.add(res.dependencies);\n return payload;\n });\n }\n return payload;\n } catch (e) {\n console.error(readErrorWarning);\n if (e instanceof ConfigInspectorError) {\n e.prettyPrint();\n } else {\n console.error(e);\n }\n return createErrorPayload(e);\n }\n }\n\n return {\n port,\n wss,\n watcher,\n getData,\n };\n}\n","import type { Server } from \"node:http\";\nimport type { CreateWsServerOptions } from \"./ws\";\nimport { readFile, stat } from \"node:fs/promises\";\nimport { createServer } from \"node:http\";\nimport { createApp, eventHandler, serveStatic, setResponseHeader } from \"h3\";\nimport { toNodeHandler } from \"h3/node\";\nimport { lookup } from \"mrmime\";\nimport { extname, join } from \"pathe\";\nimport { distDir } from \"./dirs\";\nimport { createWsServer } from \"./ws\";\n\nconst LEADING_SLASHES_RE = /^\\/+/;\n\nexport async function createHostServer(\n options: CreateWsServerOptions\n): Promise<Server> {\n const app = createApp();\n\n const ws = await createWsServer(options);\n\n const fileMap = new Map<string, Promise<Uint8Array | undefined>>();\n const readCachedFile = (id: string) => {\n if (!fileMap.has(id)) {\n fileMap.set(\n id,\n readFile(id).catch(() => undefined)\n );\n }\n return fileMap.get(id);\n };\n\n const resolveDistFilePath = (\n id: string\n ): { relative: string; absolute: string } | undefined => {\n const cleanId = id\n .split(\"?\")[0]\n ?.split(\"#\")[0]\n ?.replace(LEADING_SLASHES_RE, \"\");\n\n if (!cleanId) return;\n\n return {\n relative: cleanId,\n absolute: join(distDir, cleanId),\n };\n };\n\n const shouldServeIndexFallback = (path: string): boolean => {\n if (path === \"/\") return true;\n\n if (path.startsWith(\"/_nuxt/\") || path.startsWith(\"/api/\"))\n return false;\n\n return extname(path) === \"\";\n };\n\n app.use(\n \"/api/payload.json\",\n eventHandler(() => ws.getData())\n );\n\n app.use(\n eventHandler(async (event) => {\n const indexHtml = await readCachedFile(join(distDir, \"index.html\"));\n\n if (event.path === \"/\" && indexHtml) {\n setResponseHeader(\n event,\n \"Content-Type\",\n \"text/html; charset=UTF-8\"\n );\n return indexHtml;\n }\n\n const result = await serveStatic(event, {\n fallthrough: true,\n getContents: (id) => {\n if (!id) return undefined;\n\n const resolved = resolveDistFilePath(id);\n if (!resolved) return undefined;\n\n return readCachedFile(resolved.absolute);\n },\n getMeta: async (id) => {\n if (!id) return;\n\n const resolved = resolveDistFilePath(id);\n if (!resolved) return;\n\n const stats = await stat(resolved.absolute).catch(() => {});\n if (!stats?.isFile()) return;\n\n const mimeType = lookup(resolved.relative);\n return {\n ...(mimeType !== undefined && { type: mimeType }),\n size: stats.size,\n mtime: stats.mtimeMs,\n };\n },\n });\n\n if (!result && shouldServeIndexFallback(event.path)) {\n if (indexHtml) {\n setResponseHeader(\n event,\n \"Content-Type\",\n \"text/html; charset=UTF-8\"\n );\n }\n return indexHtml;\n }\n\n return result;\n })\n );\n\n return createServer(toNodeHandler(app));\n}\n","import { existsSync } from \"node:fs\";\nimport fs from \"node:fs/promises\";\nimport process from \"node:process\";\nimport c from \"ansis\";\n\nimport cac from \"cac\";\nimport { getPort } from \"get-port-please\";\nimport open from \"open\";\nimport { relative, resolve } from \"pathe\";\nimport { glob } from \"tinyglobby\";\nimport { rewriteStaticHtmlWithBase } from \"./build-static-html\";\nimport { normalizeCliInspectorOptions } from \"./cli-options\";\nimport { readConfig } from \"./configs\";\nimport { MARK_CHECK, MARK_INFO } from \"./constants\";\nimport { distDir } from \"./dirs\";\nimport { ConfigInspectorError } from \"./errors\";\nimport { createHostServer } from \"./server\";\n\nconst RE_CONSECUTIVE_SLASHES = /\\/+/g;\n\nconst cli = cac(\"stylelint-config-inspector\");\n\ncli.command(\n \"build\",\n \"Build inspector with current config file for static hosting\"\n)\n .option(\"--config <configFile>\", \"Config file path\")\n .option(\"--files\", \"Include matched file paths in payload\", {\n default: true,\n })\n .option(\"--file <filePath>\", \"Alias of --target\")\n .option(\n \"--target <filePath>\",\n \"Target file path used to resolve effective config\"\n )\n .option(\n \"--basePath <basePath>\",\n \"Base directory for globs to resolve. Default to directory of config file if not provided\"\n )\n // Build specific options\n .option(\"--base <baseURL>\", \"Base URL for deployment\", { default: \"/\" })\n .option(\"--outDir <dir>\", \"Output directory\", {\n default: \".stylelint-config-inspector\",\n })\n // Action\n .action(async (rawOptions) => {\n const options = normalizeCliInspectorOptions(rawOptions);\n\n console.log(MARK_INFO, \"Building static Stylelint config inspector...\");\n\n const cwd = process.cwd();\n const outDir = resolve(cwd, options.outDir);\n\n let configs;\n try {\n configs = await readConfig({\n cwd,\n userConfigPath: options.config,\n userBasePath: options.basePath,\n globMatchedFiles: options.files,\n targetFilePath: options.target,\n });\n } catch (error) {\n if (error instanceof ConfigInspectorError) {\n error.prettyPrint();\n process.exit(1);\n }\n throw error;\n }\n\n let baseURL = options.base;\n if (!baseURL.endsWith(\"/\")) baseURL += \"/\";\n if (!baseURL.startsWith(\"/\")) baseURL = `/${baseURL}`;\n baseURL = baseURL.replaceAll(RE_CONSECUTIVE_SLASHES, \"/\");\n\n if (existsSync(outDir)) await fs.rm(outDir, { recursive: true });\n await fs.mkdir(outDir, { recursive: true });\n await fs.cp(distDir, outDir, { recursive: true });\n const htmlFiles = await glob(\"**/*.html\", {\n cwd: distDir,\n onlyFiles: true,\n expandDirectories: false,\n });\n // Rewrite HTML files with base URL\n if (baseURL !== \"/\") {\n for (const file of htmlFiles) {\n if (!file) continue;\n const content = await fs.readFile(\n resolve(distDir, file),\n \"utf-8\"\n );\n const newContent = rewriteStaticHtmlWithBase(content, baseURL);\n await fs.writeFile(resolve(outDir, file), newContent, \"utf-8\");\n }\n }\n await fs.mkdir(resolve(outDir, \"api\"), { recursive: true });\n\n configs.payload.meta.configPath = \"\";\n configs.payload.meta.basePath = \"\";\n await fs.writeFile(\n resolve(outDir, \"api/payload.json\"),\n JSON.stringify(configs.payload, null, 2),\n \"utf-8\"\n );\n\n console.log(MARK_CHECK, `Built to ${relative(cwd, outDir)}`);\n console.log(\n MARK_INFO,\n `You can use static server like \\`npx serve ${relative(cwd, outDir)}\\` to serve the inspector`\n );\n });\n\ncli.command(\"\", \"Start dev inspector\")\n .option(\"--config <configFile>\", \"Config file path\")\n .option(\"--files\", \"Include matched file paths in payload\", {\n default: true,\n })\n .option(\"--file <filePath>\", \"Alias of --target\")\n .option(\n \"--target <filePath>\",\n \"Target file path used to resolve effective config\"\n )\n .option(\n \"--basePath <basePath>\",\n \"Base directory for globs to resolve. Default to directory of config file if not provided\"\n )\n // Dev specific options\n .option(\"--host <host>\", \"Host\", {\n default: process.env[\"HOST\"] || \"127.0.0.1\",\n })\n .option(\"--port <port>\", \"Port\", { default: process.env[\"PORT\"] || 8888 })\n .option(\"--open\", \"Open browser\", { default: true })\n // Action\n .action(async (rawOptions) => {\n const options = normalizeCliInspectorOptions(rawOptions);\n\n const host = options.host;\n const port = await getPort({\n port: options.port,\n portRange: [8888, 10000],\n host,\n });\n\n console.log(\n MARK_INFO,\n `Starting Stylelint config inspector at`,\n c.green`http://${host === \"127.0.0.1\" ? \"localhost\" : host}:${port}`,\n \"\\n\"\n );\n\n const cwd = process.cwd();\n const server = await createHostServer({\n cwd,\n userConfigPath: options.config,\n userBasePath: options.basePath,\n globMatchedFiles: options.files,\n targetFilePath: options.target,\n });\n\n server.listen(port, host, async () => {\n if (options.open) {\n await open(\n `http://${host === \"127.0.0.1\" ? \"localhost\" : host}:${port}`\n );\n }\n });\n });\n\ncli.help();\ncli.parse();\n"],"x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40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AO,MAAM,QAAQ;EACvB,MAAM,QAAQ;EACd,WAAW,CAAC,MAAM,GAAK;EACvB;CACJ,CAAC;CAED,QAAQ,IACJ,WACA,0CACA,MAAA,QAAE,KAAK,UAAU,SAAS,cAAc,cAAc,KAAK,GAAG,QAC9D,IACJ;CAWA,CAAA,MARqB,iBAAiB;EAClC,KAFQA,aAAAA,QAAQ,IAEd;EACF,gBAAgB,QAAQ;EACxB,cAAc,QAAQ;EACtB,kBAAkB,QAAQ;EAC1B,gBAAgB,QAAQ;CAC5B,CAAC,GAEM,OAAO,MAAM,MAAM,YAAY;EAClC,IAAI,QAAQ,MACR,MAAM,KACF,UAAU,SAAS,cAAc,cAAc,KAAK,GAAG,MAC3D;CAER,CAAC;AACL,CAAC;AAEL,IAAI,KAAK;AACT,IAAI,MAAM"}
|
|
1
|
+
{"version":3,"file":"cli.cjs","names":["fs","process","os","fs","execFile","childProcess","powerShellPath","process","Buffer","execFile","childProcess","fs","fsConstants","isWsl","windowsPowerShellPath","execFileAsync","execFile","process","execFileAsync","execFile","process","execFileAsync","execFile","defaultBrowser","execFile","process","windows","process","__dirname","path","process","isWsl","fs","fsConstants","childProcess","normalize","isAbsolute","normalizeString","join","resolve","extname","relative","dirname","basename","c","process","#head","#tail","#size","toPath","process","fsPromises","path","execFileCallback","path","assertPath","stripSuffix","lastPathSegment","assertArgs$1","assertArg$3","fromFileUrl","stripTrailingSeparators","CHAR_DOT","CHAR_FORWARD_SLASH","isPosixPathSeparator","basename","DELIMITER","SEPARATOR","SEPARATOR_PATTERN","assertArg$2","dirname","extname","_format","assertArg$1","format","isAbsolute","assertArg","normalizeString","normalize","join","parse","resolve","assertArgs","relative","WHITESPACE_ENCODINGS","encodeWhitespace","toFileUrl","toNamespacedPath","common$1","common","REG_EXP_ESCAPE_CHARS","RANGE_ESCAPE_CHARS","_globToRegExp","constants","globToRegExp","isGlob","normalizeGlob","joinGlobs","isAbsolute","normalize","regExpEscape","star","#parent","#root","#parts","#hasMagic","#options","#negs","#filledNegs","#parentIndex","#toString","#parseAST","#canAdoptType","#emptyExt","#canAdopt","#adopt","#canUsurpType","#flatten","#fillNegs","#parseGlob","#uflag","#partsToRegExp","#canAdoptWithSpace","#adoptWithSpace","#canUsurp","#usurp","minimatch","#matchGlobstar","#matchOne","#matchGlobStarBodySections","tty","#definitions","#requiredKeys","posixPath","windowsPath","#path","#namespacedBasePath","c","require","normalize","basename","resolve","process","dirname","relative","c","dirname","join","WebSocketServer","ws","relative","normalize","join","extname","process","resolve","fs","relative"],"sources":["../node_modules/get-port-please/dist/index.mjs","../node_modules/is-docker/index.js","../node_modules/is-inside-container/index.js","../node_modules/is-wsl/index.js","../node_modules/powershell-utils/index.js","../node_modules/wsl-utils/utilities.js","../node_modules/wsl-utils/index.js","../node_modules/define-lazy-prop/index.js","../node_modules/default-browser-id/index.js","../node_modules/run-applescript/index.js","../node_modules/bundle-name/index.js","../node_modules/default-browser/windows.js","../node_modules/default-browser/index.js","../node_modules/is-in-ssh/index.js","../node_modules/open/index.js","../node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs","../src/build-static-html.ts","../src/constants.ts","../src/cli-options.ts","../node_modules/yocto-queue/index.js","../node_modules/p-limit/index.js","../node_modules/p-locate/index.js","../node_modules/locate-path/index.js","../node_modules/unicorn-magic/node.js","../node_modules/find-up/index.js","../node_modules/@eslint/config-array/dist/esm/std__path/posix.js","../node_modules/@eslint/config-array/dist/esm/std__path/windows.js","../node_modules/balanced-match/dist/esm/index.js","../node_modules/brace-expansion/dist/esm/index.js","../node_modules/minimatch/dist/esm/assert-valid-pattern.js","../node_modules/minimatch/dist/esm/brace-expressions.js","../node_modules/minimatch/dist/esm/unescape.js","../node_modules/minimatch/dist/esm/ast.js","../node_modules/minimatch/dist/esm/escape.js","../node_modules/minimatch/dist/esm/index.js","../node_modules/ms/index.js","../node_modules/debug/src/common.js","../node_modules/debug/src/browser.js","../node_modules/has-flag/index.js","../node_modules/supports-color/index.js","../node_modules/debug/src/node.js","../node_modules/debug/src/index.js","../node_modules/@eslint/object-schema/dist/esm/index.js","../node_modules/@eslint/config-array/dist/esm/index.js","../shared/configs.ts","../src/errors.ts","../src/inspectors/stylelint.ts","../src/configs.ts","../src/dirs.ts","../node_modules/mrmime/index.mjs","../src/ws.ts","../src/server.ts","../src/cli.ts"],"sourcesContent":["import { createServer, Server } from 'node:net';\nimport { networkInterfaces, tmpdir } from 'node:os';\nimport { join } from 'node:path';\nimport { rm } from 'node:fs/promises';\n\nconst unsafePorts = /* @__PURE__ */ new Set([\n 1,\n // tcpmux\n 7,\n // echo\n 9,\n // discard\n 11,\n // systat\n 13,\n // daytime\n 15,\n // netstat\n 17,\n // qotd\n 19,\n // chargen\n 20,\n // ftp data\n 21,\n // ftp access\n 22,\n // ssh\n 23,\n // telnet\n 25,\n // smtp\n 37,\n // time\n 42,\n // name\n 43,\n // nicname\n 53,\n // domain\n 69,\n // tftp\n 77,\n // priv-rjs\n 79,\n // finger\n 87,\n // ttylink\n 95,\n // supdup\n 101,\n // hostriame\n 102,\n // iso-tsap\n 103,\n // gppitnp\n 104,\n // acr-nema\n 109,\n // pop2\n 110,\n // pop3\n 111,\n // sunrpc\n 113,\n // auth\n 115,\n // sftp\n 117,\n // uucp-path\n 119,\n // nntp\n 123,\n // NTP\n 135,\n // loc-srv /epmap\n 137,\n // netbios\n 139,\n // netbios\n 143,\n // imap2\n 161,\n // snmp\n 179,\n // BGP\n 389,\n // ldap\n 427,\n // SLP (Also used by Apple Filing Protocol)\n 465,\n // smtp+ssl\n 512,\n // print / exec\n 513,\n // login\n 514,\n // shell\n 515,\n // printer\n 526,\n // tempo\n 530,\n // courier\n 531,\n // chat\n 532,\n // netnews\n 540,\n // uucp\n 548,\n // AFP (Apple Filing Protocol)\n 554,\n // rtsp\n 556,\n // remotefs\n 563,\n // nntp+ssl\n 587,\n // smtp (rfc6409)\n 601,\n // syslog-conn (rfc3195)\n 636,\n // ldap+ssl\n 989,\n // ftps-data\n 990,\n // ftps\n 993,\n // ldap+ssl\n 995,\n // pop3+ssl\n 1719,\n // h323gatestat\n 1720,\n // h323hostcall\n 1723,\n // pptp\n 2049,\n // nfs\n 3659,\n // apple-sasl / PasswordServer\n 4045,\n // lockd\n 5060,\n // sip\n 5061,\n // sips\n 6e3,\n // X11\n 6566,\n // sane-port\n 6665,\n // Alternate IRC [Apple addition]\n 6666,\n // Alternate IRC [Apple addition]\n 6667,\n // Standard IRC [Apple addition]\n 6668,\n // Alternate IRC [Apple addition]\n 6669,\n // Alternate IRC [Apple addition]\n 6697,\n // IRC + TLS\n 10080\n // Amanda\n]);\nfunction isUnsafePort(port) {\n return unsafePorts.has(port);\n}\nfunction isSafePort(port) {\n return !isUnsafePort(port);\n}\n\nclass GetPortError extends Error {\n constructor(message, opts) {\n super(message, opts);\n this.message = message;\n }\n name = \"GetPortError\";\n}\nfunction _log(verbose, message) {\n if (verbose) {\n console.log(`[get-port] ${message}`);\n }\n}\nfunction _generateRange(from, to) {\n if (to < from) {\n return [];\n }\n const r = [];\n for (let index = from; index <= to; index++) {\n r.push(index);\n }\n return r;\n}\nfunction _tryPort(port, host) {\n return new Promise((resolve) => {\n const server = createServer();\n server.unref();\n server.on(\"error\", () => {\n resolve(false);\n });\n server.listen({ port, host }, () => {\n const { port: port2 } = server.address();\n server.close(() => {\n resolve(isSafePort(port2) && port2);\n });\n });\n });\n}\nfunction _getLocalHosts(additional) {\n const hosts = new Set(additional);\n for (const _interface of Object.values(networkInterfaces())) {\n for (const config of _interface || []) {\n if (config.address && !config.internal && !config.address.startsWith(\"fe80::\") && // Link-Local\n !config.address.startsWith(\"169.254\")) {\n hosts.add(config.address);\n }\n }\n }\n return [...hosts];\n}\nasync function _findPort(ports, host) {\n for (const port of ports) {\n const r = await _tryPort(port, host);\n if (r) {\n return r;\n }\n }\n}\nfunction _fmtOnHost(hostname) {\n return hostname ? `on host ${JSON.stringify(hostname)}` : \"on any host\";\n}\nconst HOSTNAME_RE = /^(?!-)[\\d.:A-Za-z-]{1,63}(?<!-)$/;\nfunction _validateHostname(hostname, _public, verbose) {\n if (hostname && !HOSTNAME_RE.test(hostname)) {\n const fallbackHost = _public ? \"0.0.0.0\" : \"127.0.0.1\";\n _log(\n verbose,\n `Invalid hostname: ${JSON.stringify(hostname)}. Using ${JSON.stringify(\n fallbackHost\n )} as fallback.`\n );\n return fallbackHost;\n }\n return hostname;\n}\n\nasync function getPort(_userOptions = {}) {\n if (typeof _userOptions === \"number\" || typeof _userOptions === \"string\") {\n _userOptions = { port: Number.parseInt(_userOptions + \"\") || 0 };\n }\n const _port = Number(_userOptions.port ?? process.env.PORT);\n const _userSpecifiedAnyPort = Boolean(\n _userOptions.port || _userOptions.ports?.length || _userOptions.portRange?.length\n );\n const options = {\n random: _port === 0,\n ports: [],\n portRange: [],\n alternativePortRange: _userSpecifiedAnyPort ? [] : [3e3, 3100],\n verbose: false,\n ..._userOptions,\n port: _port,\n host: _validateHostname(\n _userOptions.host ?? process.env.HOST,\n _userOptions.public,\n _userOptions.verbose\n )\n };\n if (options.random && !_userSpecifiedAnyPort) {\n return getRandomPort(options.host);\n }\n const portsToCheck = [\n options.port,\n ...options.ports,\n ..._generateRange(...options.portRange)\n ].filter((port) => {\n if (!port) {\n return false;\n }\n if (!isSafePort(port)) {\n _log(options.verbose, `Ignoring unsafe port: ${port}`);\n return false;\n }\n return true;\n });\n if (portsToCheck.length === 0) {\n portsToCheck.push(3e3);\n }\n let availablePort = await _findPort(portsToCheck, options.host);\n if (!availablePort && options.alternativePortRange.length > 0) {\n availablePort = await _findPort(\n _generateRange(...options.alternativePortRange),\n options.host\n );\n if (portsToCheck.length > 0) {\n let message = `Unable to find an available port (tried ${portsToCheck.join(\n \"-\"\n )} ${_fmtOnHost(options.host)}).`;\n if (availablePort) {\n message += ` Using alternative port ${availablePort}.`;\n }\n _log(options.verbose, message);\n }\n }\n if (!availablePort && _userOptions.random !== false) {\n availablePort = await getRandomPort(options.host);\n if (availablePort) {\n _log(options.verbose, `Using random port ${availablePort}`);\n }\n }\n if (!availablePort) {\n const triedRanges = [\n options.port,\n options.portRange.join(\"-\"),\n options.alternativePortRange.join(\"-\")\n ].filter(Boolean).join(\", \");\n throw new GetPortError(\n `Unable to find an available port ${_fmtOnHost(\n options.host\n )} (tried ${triedRanges})`\n );\n }\n return availablePort;\n}\nasync function getRandomPort(host) {\n const port = await checkPort(0, host);\n if (port === false) {\n throw new GetPortError(`Unable to find a random port ${_fmtOnHost(host)}`);\n }\n return port;\n}\nasync function waitForPort(port, options = {}) {\n const delay = options.delay || 500;\n const retries = options.retries || 4;\n for (let index = retries; index > 0; index--) {\n if (await _tryPort(port, options.host) === false) {\n return;\n }\n await new Promise((resolve) => setTimeout(resolve, delay));\n }\n throw new GetPortError(\n `Timeout waiting for port ${port} after ${retries} retries with ${delay}ms interval.`\n );\n}\nasync function checkPort(port, host = process.env.HOST, verbose) {\n if (!host) {\n host = _getLocalHosts([void 0, \"0.0.0.0\"]);\n }\n if (!Array.isArray(host)) {\n return _tryPort(port, host);\n }\n for (const _host of host) {\n const _port = await _tryPort(port, _host);\n if (_port === false) {\n if (port < 1024 && verbose) {\n _log(\n verbose,\n `Unable to listen to the privileged port ${port} ${_fmtOnHost(\n _host\n )}`\n );\n }\n return false;\n }\n if (port === 0 && _port !== 0) {\n port = _port;\n }\n }\n return port;\n}\n\nlet _nodeMajorVersion;\nlet _isSocketSupported;\nfunction getSocketAddress(opts) {\n const parts = [\n opts.name,\n opts.pid ? process.pid : void 0,\n opts.random ? Math.round(Math.random() * 1e4) : void 0\n ].filter(Boolean);\n const socketName = `${parts.join(\"-\")}.sock`;\n if (process.platform === \"win32\") {\n return join(String.raw`\\\\.\\pipe`, socketName);\n }\n if (process.platform === \"linux\") {\n if (_nodeMajorVersion === void 0) {\n _nodeMajorVersion = +process.versions.node.split(\".\")[0];\n }\n if (_nodeMajorVersion >= 20) {\n return `\\0${socketName}`;\n }\n }\n return join(tmpdir(), socketName);\n}\nasync function isSocketSupported() {\n if (_isSocketSupported !== void 0) {\n return _isSocketSupported;\n }\n if (globalThis.process?.versions?.webcontainer) {\n return false;\n }\n const socketAddress = getSocketAddress({ name: \"get-port\", random: true });\n const server = new Server();\n try {\n await new Promise((resolve, reject) => {\n server.on(\"error\", reject);\n server.listen(socketAddress, resolve);\n });\n _isSocketSupported = true;\n return true;\n } catch {\n _isSocketSupported = false;\n return false;\n } finally {\n if (server.listening) {\n server.close();\n await cleanSocket(socketAddress);\n }\n }\n}\nasync function cleanSocket(path) {\n if (!path || path[0] === \"\\0\" || path.startsWith(String.raw`\\\\.\\pipe`)) {\n return;\n }\n return rm(path, { force: true, recursive: true }).catch(console.error);\n}\n\nexport { checkPort, cleanSocket, getPort, getRandomPort, getSocketAddress, isSafePort, isSocketSupported, isUnsafePort, waitForPort };\n","import fs from 'node:fs';\n\nlet isDockerCached;\n\nfunction hasDockerEnv() {\n\ttry {\n\t\tfs.statSync('/.dockerenv');\n\t\treturn true;\n\t} catch {\n\t\treturn false;\n\t}\n}\n\nfunction hasDockerCGroup() {\n\ttry {\n\t\treturn fs.readFileSync('/proc/self/cgroup', 'utf8').includes('docker');\n\t} catch {\n\t\treturn false;\n\t}\n}\n\nexport default function isDocker() {\n\t// TODO: Use `??=` when targeting Node.js 16.\n\tif (isDockerCached === undefined) {\n\t\tisDockerCached = hasDockerEnv() || hasDockerCGroup();\n\t}\n\n\treturn isDockerCached;\n}\n","import fs from 'node:fs';\nimport isDocker from 'is-docker';\n\nlet cachedResult;\n\n// Podman detection\nconst hasContainerEnv = () => {\n\ttry {\n\t\tfs.statSync('/run/.containerenv');\n\t\treturn true;\n\t} catch {\n\t\treturn false;\n\t}\n};\n\nexport default function isInsideContainer() {\n\t// TODO: Use `??=` when targeting Node.js 16.\n\tif (cachedResult === undefined) {\n\t\tcachedResult = hasContainerEnv() || isDocker();\n\t}\n\n\treturn cachedResult;\n}\n","import process from 'node:process';\nimport os from 'node:os';\nimport fs from 'node:fs';\nimport isInsideContainer from 'is-inside-container';\n\nconst isWsl = () => {\n\tif (process.platform !== 'linux') {\n\t\treturn false;\n\t}\n\n\tif (os.release().toLowerCase().includes('microsoft')) {\n\t\tif (isInsideContainer()) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}\n\n\ttry {\n\t\tif (fs.readFileSync('/proc/version', 'utf8').toLowerCase().includes('microsoft')) {\n\t\t\treturn !isInsideContainer();\n\t\t}\n\t} catch {}\n\n\t// Fallback for custom kernels: check WSL-specific paths.\n\tif (\n\t\tfs.existsSync('/proc/sys/fs/binfmt_misc/WSLInterop')\n\t\t|| fs.existsSync('/run/WSL')\n\t) {\n\t\treturn !isInsideContainer();\n\t}\n\n\treturn false;\n};\n\nexport default process.env.__IS_WSL_TEST__ ? isWsl : isWsl();\n","import process from 'node:process';\nimport {Buffer} from 'node:buffer';\nimport {promisify} from 'node:util';\nimport childProcess from 'node:child_process';\nimport fs, {constants as fsConstants} from 'node:fs/promises';\n\nconst execFile = promisify(childProcess.execFile);\n\nexport const powerShellPath = () => `${process.env.SYSTEMROOT || process.env.windir || String.raw`C:\\Windows`}\\\\System32\\\\WindowsPowerShell\\\\v1.0\\\\powershell.exe`;\n\n// Cache for PowerShell accessibility check\nlet canAccessCache;\n\nexport const canAccessPowerShell = async () => {\n\tcanAccessCache ??= (async () => {\n\t\ttry {\n\t\t\tawait fs.access(powerShellPath(), fsConstants.X_OK);\n\t\t\treturn true;\n\t\t} catch {\n\t\t\treturn false;\n\t\t}\n\t})();\n\n\treturn canAccessCache;\n};\n\nexport const executePowerShell = async (command, options = {}) => {\n\tconst {\n\t\tpowerShellPath: psPath,\n\t\t...execFileOptions\n\t} = options;\n\n\tconst encodedCommand = executePowerShell.encodeCommand(command);\n\n\treturn execFile(\n\t\tpsPath ?? powerShellPath(),\n\t\t[\n\t\t\t...executePowerShell.argumentsPrefix,\n\t\t\tencodedCommand,\n\t\t],\n\t\t{\n\t\t\tencoding: 'utf8',\n\t\t\t...execFileOptions,\n\t\t},\n\t);\n};\n\nexecutePowerShell.argumentsPrefix = [\n\t'-NoProfile',\n\t'-NonInteractive',\n\t'-ExecutionPolicy',\n\t'Bypass',\n\t'-EncodedCommand',\n];\n\nexecutePowerShell.encodeCommand = command => Buffer.from(command, 'utf16le').toString('base64');\n\nexecutePowerShell.escapeArgument = value => `'${String(value).replaceAll('\\'', '\\'\\'')}'`;\n","export function parseMountPointFromConfig(content) {\n\tfor (const line of content.split('\\n')) {\n\t\t// Skip comment lines\n\t\tif (/^\\s*#/.test(line)) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t// Match root at start of line (after optional whitespace)\n\t\tconst match = /^\\s*root\\s*=\\s*(?<mountPoint>\"[^\"]*\"|'[^']*'|[^#]*)/.exec(line);\n\t\tif (!match) {\n\t\t\tcontinue;\n\t\t}\n\n\t\treturn match.groups.mountPoint\n\t\t\t.trim()\n\t\t\t// Strip surrounding quotes\n\t\t\t.replaceAll(/^[\"']|[\"']$/g, '');\n\t}\n}\n","import {promisify} from 'node:util';\nimport childProcess from 'node:child_process';\nimport fs, {constants as fsConstants} from 'node:fs/promises';\nimport isWsl from 'is-wsl';\nimport {powerShellPath as windowsPowerShellPath, executePowerShell} from 'powershell-utils';\nimport {parseMountPointFromConfig} from './utilities.js';\n\nconst execFile = promisify(childProcess.execFile);\n\nexport const wslDrivesMountPoint = (() => {\n\t// Default value for \"root\" param\n\t// according to https://docs.microsoft.com/en-us/windows/wsl/wsl-config\n\tconst defaultMountPoint = '/mnt/';\n\n\tlet mountPoint;\n\n\treturn async function () {\n\t\tif (mountPoint) {\n\t\t\t// Return memoized mount point value\n\t\t\treturn mountPoint;\n\t\t}\n\n\t\tconst configFilePath = '/etc/wsl.conf';\n\n\t\tlet isConfigFileExists = false;\n\t\ttry {\n\t\t\tawait fs.access(configFilePath, fsConstants.F_OK);\n\t\t\tisConfigFileExists = true;\n\t\t} catch {}\n\n\t\tif (!isConfigFileExists) {\n\t\t\treturn defaultMountPoint;\n\t\t}\n\n\t\tconst configContent = await fs.readFile(configFilePath, {encoding: 'utf8'});\n\t\tconst parsedMountPoint = parseMountPointFromConfig(configContent);\n\n\t\tif (parsedMountPoint === undefined) {\n\t\t\treturn defaultMountPoint;\n\t\t}\n\n\t\tmountPoint = parsedMountPoint;\n\t\tmountPoint = mountPoint.endsWith('/') ? mountPoint : `${mountPoint}/`;\n\n\t\treturn mountPoint;\n\t};\n})();\n\nexport const powerShellPathFromWsl = async () => {\n\tconst mountPoint = await wslDrivesMountPoint();\n\treturn `${mountPoint}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`;\n};\n\nexport const powerShellPath = isWsl ? powerShellPathFromWsl : windowsPowerShellPath;\n\n// Cache for PowerShell accessibility check\nlet canAccessPowerShellPromise;\n\nexport const canAccessPowerShell = async () => {\n\tcanAccessPowerShellPromise ??= (async () => {\n\t\ttry {\n\t\t\tconst psPath = await powerShellPath();\n\t\t\tawait fs.access(psPath, fsConstants.X_OK);\n\t\t\treturn true;\n\t\t} catch {\n\t\t\t// PowerShell is not accessible (either doesn't exist, no execute permission, or other error)\n\t\t\treturn false;\n\t\t}\n\t})();\n\n\treturn canAccessPowerShellPromise;\n};\n\nexport const wslDefaultBrowser = async () => {\n\tconst psPath = await powerShellPath();\n\tconst command = String.raw`(Get-ItemProperty -Path \"HKCU:\\Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations\\http\\UserChoice\").ProgId`;\n\n\tconst {stdout} = await executePowerShell(command, {powerShellPath: psPath});\n\n\treturn stdout.trim();\n};\n\nexport const convertWslPathToWindows = async path => {\n\t// Don't convert URLs\n\tif (/^[a-z]+:\\/\\//i.test(path)) {\n\t\treturn path;\n\t}\n\n\ttry {\n\t\tconst {stdout} = await execFile('wslpath', ['-aw', path], {encoding: 'utf8'});\n\t\treturn stdout.trim();\n\t} catch {\n\t\t// If wslpath fails, return the original path\n\t\treturn path;\n\t}\n};\n\nexport {default as isWsl} from 'is-wsl';\n","export default function defineLazyProperty(object, propertyName, valueGetter) {\n\tconst define = value => Object.defineProperty(object, propertyName, {value, enumerable: true, writable: true});\n\n\tObject.defineProperty(object, propertyName, {\n\t\tconfigurable: true,\n\t\tenumerable: true,\n\t\tget() {\n\t\t\tconst result = valueGetter();\n\t\t\tdefine(result);\n\t\t\treturn result;\n\t\t},\n\t\tset(value) {\n\t\t\tdefine(value);\n\t\t}\n\t});\n\n\treturn object;\n}\n","import {promisify} from 'node:util';\nimport process from 'node:process';\nimport {execFile} from 'node:child_process';\n\nconst execFileAsync = promisify(execFile);\n\nexport default async function defaultBrowserId() {\n\tif (process.platform !== 'darwin') {\n\t\tthrow new Error('macOS only');\n\t}\n\n\tconst {stdout} = await execFileAsync('defaults', ['read', 'com.apple.LaunchServices/com.apple.launchservices.secure', 'LSHandlers']);\n\n\t// `(?!-)` is to prevent matching `LSHandlerRoleAll = \"-\";`.\n\tconst match = /LSHandlerRoleAll = \"(?!-)(?<id>[^\"]+?)\";\\s+?LSHandlerURLScheme = (?:http|https);/.exec(stdout);\n\n\tconst browserId = match?.groups.id ?? 'com.apple.Safari';\n\n\t// Correct the case for Safari's bundle identifier\n\tif (browserId === 'com.apple.safari') {\n\t\treturn 'com.apple.Safari';\n\t}\n\n\treturn browserId;\n}\n","import process from 'node:process';\nimport {promisify} from 'node:util';\nimport {execFile, execFileSync} from 'node:child_process';\n\nconst execFileAsync = promisify(execFile);\n\nexport async function runAppleScript(script, {humanReadableOutput = true, signal} = {}) {\n\tif (process.platform !== 'darwin') {\n\t\tthrow new Error('macOS only');\n\t}\n\n\tconst outputArguments = humanReadableOutput ? [] : ['-ss'];\n\n\tconst execOptions = {};\n\tif (signal) {\n\t\texecOptions.signal = signal;\n\t}\n\n\tconst {stdout} = await execFileAsync('osascript', ['-e', script, outputArguments], execOptions);\n\treturn stdout.trim();\n}\n\nexport function runAppleScriptSync(script, {humanReadableOutput = true} = {}) {\n\tif (process.platform !== 'darwin') {\n\t\tthrow new Error('macOS only');\n\t}\n\n\tconst outputArguments = humanReadableOutput ? [] : ['-ss'];\n\n\tconst stdout = execFileSync('osascript', ['-e', script, ...outputArguments], {\n\t\tencoding: 'utf8',\n\t\tstdio: ['ignore', 'pipe', 'ignore'],\n\t\ttimeout: 500,\n\t});\n\n\treturn stdout.trim();\n}\n","import {runAppleScript} from 'run-applescript';\n\nexport default async function bundleName(bundleId) {\n\treturn runAppleScript(`tell application \"Finder\" to set app_path to application file id \"${bundleId}\" as string\\ntell application \"System Events\" to get value of property list item \"CFBundleName\" of property list file (app_path & \":Contents:Info.plist\")`);\n}\n","import {promisify} from 'node:util';\nimport {execFile} from 'node:child_process';\n\nconst execFileAsync = promisify(execFile);\n\n// TODO: Fix the casing of bundle identifiers in the next major version.\n\n// Windows doesn't have browser IDs in the same way macOS/Linux does so we give fake\n// ones that look real and match the macOS/Linux versions for cross-platform apps.\nconst windowsBrowserProgIds = {\n\tMSEdgeHTM: {name: 'Edge', id: 'com.microsoft.edge'}, // The missing `L` is correct.\n\tMSEdgeBHTML: {name: 'Edge Beta', id: 'com.microsoft.edge.beta'},\n\tMSEdgeDHTML: {name: 'Edge Dev', id: 'com.microsoft.edge.dev'},\n\tAppXq0fevzme2pys62n3e0fbqa7peapykr8v: {name: 'Edge', id: 'com.microsoft.edge.old'},\n\tChromeHTML: {name: 'Chrome', id: 'com.google.chrome'},\n\tChromeBHTML: {name: 'Chrome Beta', id: 'com.google.chrome.beta'},\n\tChromeDHTML: {name: 'Chrome Dev', id: 'com.google.chrome.dev'},\n\tChromiumHTM: {name: 'Chromium', id: 'org.chromium.Chromium'},\n\tBraveHTML: {name: 'Brave', id: 'com.brave.Browser'},\n\tBraveBHTML: {name: 'Brave Beta', id: 'com.brave.Browser.beta'},\n\tBraveDHTML: {name: 'Brave Dev', id: 'com.brave.Browser.dev'},\n\tBraveSSHTM: {name: 'Brave Nightly', id: 'com.brave.Browser.nightly'},\n\tFirefoxURL: {name: 'Firefox', id: 'org.mozilla.firefox'},\n\tOperaStable: {name: 'Opera', id: 'com.operasoftware.Opera'},\n\tVivaldiHTM: {name: 'Vivaldi', id: 'com.vivaldi.Vivaldi'},\n\t'IE.HTTP': {name: 'Internet Explorer', id: 'com.microsoft.ie'},\n};\n\nexport const _windowsBrowserProgIdMap = new Map(Object.entries(windowsBrowserProgIds));\n\nexport class UnknownBrowserError extends Error {}\n\nexport default async function defaultBrowser(_execFileAsync = execFileAsync) {\n\tconst {stdout} = await _execFileAsync('reg', [\n\t\t'QUERY',\n\t\t' HKEY_CURRENT_USER\\\\Software\\\\Microsoft\\\\Windows\\\\Shell\\\\Associations\\\\UrlAssociations\\\\http\\\\UserChoice',\n\t\t'/v',\n\t\t'ProgId',\n\t]);\n\n\tconst match = /ProgId\\s*REG_SZ\\s*(?<id>\\S+)/.exec(stdout);\n\tif (!match) {\n\t\tthrow new UnknownBrowserError(`Cannot find Windows browser in stdout: ${JSON.stringify(stdout)}`);\n\t}\n\n\tconst {id} = match.groups;\n\n\t// Windows can append a hash suffix to ProgIds using a dot or hyphen\n\t// (e.g., `ChromeHTML.ABC123`, `FirefoxURL-6F193CCC56814779`).\n\t// Try exact match first, then try without the suffix.\n\tconst dotIndex = id.lastIndexOf('.');\n\tconst hyphenIndex = id.lastIndexOf('-');\n\tconst baseIdByDot = dotIndex === -1 ? undefined : id.slice(0, dotIndex);\n\tconst baseIdByHyphen = hyphenIndex === -1 ? undefined : id.slice(0, hyphenIndex);\n\n\treturn windowsBrowserProgIds[id] ?? windowsBrowserProgIds[baseIdByDot] ?? windowsBrowserProgIds[baseIdByHyphen] ?? {name: id, id};\n}\n","import {promisify} from 'node:util';\nimport process from 'node:process';\nimport {execFile} from 'node:child_process';\nimport defaultBrowserId from 'default-browser-id';\nimport bundleName from 'bundle-name';\nimport windows from './windows.js';\n\nexport {_windowsBrowserProgIdMap} from './windows.js';\n\nconst execFileAsync = promisify(execFile);\n\n// Inlined: https://github.com/sindresorhus/titleize/blob/main/index.js\nconst titleize = string => string.toLowerCase().replaceAll(/(?:^|\\s|-)\\S/g, x => x.toUpperCase());\n\nexport default async function defaultBrowser() {\n\tif (process.platform === 'darwin') {\n\t\tconst id = await defaultBrowserId();\n\t\tconst name = await bundleName(id);\n\t\treturn {name, id};\n\t}\n\n\tif (process.platform === 'linux') {\n\t\tconst {stdout} = await execFileAsync('xdg-mime', ['query', 'default', 'x-scheme-handler/http']);\n\t\tconst id = stdout.trim();\n\t\tconst name = titleize(id.replace(/.desktop$/, '').replace('-', ' '));\n\t\treturn {name, id};\n\t}\n\n\tif (process.platform === 'win32') {\n\t\treturn windows();\n\t}\n\n\tthrow new Error('Only macOS, Linux, and Windows are supported');\n}\n","import process from 'node:process';\n\nconst isInSsh = Boolean(process.env.SSH_CONNECTION\n\t|| process.env.SSH_CLIENT\n\t|| process.env.SSH_TTY);\n\nexport default isInSsh;\n","import process from 'node:process';\nimport path from 'node:path';\nimport {fileURLToPath} from 'node:url';\nimport childProcess from 'node:child_process';\nimport fs, {constants as fsConstants} from 'node:fs/promises';\nimport {\n\tisWsl,\n\tpowerShellPath,\n\tconvertWslPathToWindows,\n\tcanAccessPowerShell,\n\twslDefaultBrowser,\n} from 'wsl-utils';\nimport {executePowerShell} from 'powershell-utils';\nimport defineLazyProperty from 'define-lazy-prop';\nimport defaultBrowser, {_windowsBrowserProgIdMap} from 'default-browser';\nimport isInsideContainer from 'is-inside-container';\nimport isInSsh from 'is-in-ssh';\n\nconst fallbackAttemptSymbol = Symbol('fallbackAttempt');\n\n// Path to included `xdg-open`.\nconst __dirname = import.meta.url ? path.dirname(fileURLToPath(import.meta.url)) : '';\nconst localXdgOpenPath = path.join(__dirname, 'xdg-open');\n\nconst {platform, arch} = process;\n\nconst tryEachApp = async (apps, opener) => {\n\tif (apps.length === 0) {\n\t\t// No app was provided\n\t\treturn;\n\t}\n\n\tconst errors = [];\n\n\tfor (const app of apps) {\n\t\ttry {\n\t\t\treturn await opener(app); // eslint-disable-line no-await-in-loop\n\t\t} catch (error) {\n\t\t\terrors.push(error);\n\t\t}\n\t}\n\n\tthrow new AggregateError(errors, 'Failed to open in all supported apps');\n};\n\n// eslint-disable-next-line complexity\nconst baseOpen = async options => {\n\toptions = {\n\t\twait: false,\n\t\tbackground: false,\n\t\tnewInstance: false,\n\t\tallowNonzeroExitCode: false,\n\t\t...options,\n\t};\n\n\tconst isFallbackAttempt = options[fallbackAttemptSymbol] === true;\n\tdelete options[fallbackAttemptSymbol];\n\n\tif (Array.isArray(options.app)) {\n\t\treturn tryEachApp(options.app, singleApp => baseOpen({\n\t\t\t...options,\n\t\t\tapp: singleApp,\n\t\t\t[fallbackAttemptSymbol]: true,\n\t\t}));\n\t}\n\n\tlet {name: app, arguments: appArguments = []} = options.app ?? {};\n\tappArguments = [...appArguments];\n\n\tif (Array.isArray(app)) {\n\t\treturn tryEachApp(app, appName => baseOpen({\n\t\t\t...options,\n\t\t\tapp: {\n\t\t\t\tname: appName,\n\t\t\t\targuments: appArguments,\n\t\t\t},\n\t\t\t[fallbackAttemptSymbol]: true,\n\t\t}));\n\t}\n\n\tif (app === 'browser' || app === 'browserPrivate') {\n\t\t// IDs from default-browser for macOS and windows are the same.\n\t\t// IDs are lowercased to increase chances of a match.\n\t\tconst ids = {\n\t\t\t'com.google.chrome': 'chrome',\n\t\t\t'google-chrome.desktop': 'chrome',\n\t\t\t'com.brave.browser': 'brave',\n\t\t\t'org.mozilla.firefox': 'firefox',\n\t\t\t'firefox.desktop': 'firefox',\n\t\t\t'com.microsoft.msedge': 'edge',\n\t\t\t'com.microsoft.edge': 'edge',\n\t\t\t'com.microsoft.edgemac': 'edge',\n\t\t\t'microsoft-edge.desktop': 'edge',\n\t\t\t'com.apple.safari': 'safari',\n\t\t};\n\n\t\t// Incognito flags for each browser in `apps`.\n\t\tconst flags = {\n\t\t\tchrome: '--incognito',\n\t\t\tbrave: '--incognito',\n\t\t\tfirefox: '--private-window',\n\t\t\tedge: '--inPrivate',\n\t\t\t// Safari doesn't support private mode via command line\n\t\t};\n\n\t\tlet browser;\n\t\tif (isWsl) {\n\t\t\tconst progId = await wslDefaultBrowser();\n\t\t\tconst browserInfo = _windowsBrowserProgIdMap.get(progId);\n\t\t\tbrowser = browserInfo ?? {};\n\t\t} else {\n\t\t\tbrowser = await defaultBrowser();\n\t\t}\n\n\t\tif (browser.id in ids) {\n\t\t\tconst browserName = ids[browser.id.toLowerCase()];\n\n\t\t\tif (app === 'browserPrivate') {\n\t\t\t\t// Safari doesn't support private mode via command line\n\t\t\t\tif (browserName === 'safari') {\n\t\t\t\t\tthrow new Error('Safari doesn\\'t support opening in private mode via command line');\n\t\t\t\t}\n\n\t\t\t\tappArguments.push(flags[browserName]);\n\t\t\t}\n\n\t\t\treturn baseOpen({\n\t\t\t\t...options,\n\t\t\t\tapp: {\n\t\t\t\t\tname: apps[browserName],\n\t\t\t\t\targuments: appArguments,\n\t\t\t\t},\n\t\t\t});\n\t\t}\n\n\t\tthrow new Error(`${browser.name} is not supported as a default browser`);\n\t}\n\n\tlet command;\n\tconst cliArguments = [];\n\tconst childProcessOptions = {};\n\n\t// Determine if we should use Windows/PowerShell behavior in WSL.\n\t// We only use Windows integration if PowerShell is actually accessible.\n\t// This allows the package to work in sandboxed WSL environments where Windows access is restricted.\n\tlet shouldUseWindowsInWsl = false;\n\tif (isWsl && !isInsideContainer() && !isInSsh && !app) {\n\t\tshouldUseWindowsInWsl = await canAccessPowerShell();\n\t}\n\n\tif (platform === 'darwin') {\n\t\tcommand = 'open';\n\n\t\tif (options.wait) {\n\t\t\tcliArguments.push('--wait-apps');\n\t\t}\n\n\t\tif (options.background) {\n\t\t\tcliArguments.push('--background');\n\t\t}\n\n\t\tif (options.newInstance) {\n\t\t\tcliArguments.push('--new');\n\t\t}\n\n\t\tif (app) {\n\t\t\tcliArguments.push('-a', app);\n\t\t}\n\t} else if (platform === 'win32' || shouldUseWindowsInWsl) {\n\t\tcommand = await powerShellPath();\n\n\t\tcliArguments.push(...executePowerShell.argumentsPrefix);\n\n\t\tif (!isWsl) {\n\t\t\tchildProcessOptions.windowsVerbatimArguments = true;\n\t\t}\n\n\t\t// Convert WSL Linux paths to Windows paths\n\t\tif (isWsl && options.target) {\n\t\t\toptions.target = await convertWslPathToWindows(options.target);\n\t\t}\n\n\t\t// Suppress PowerShell progress messages that are written to stderr\n\t\tconst encodedArguments = ['$ProgressPreference = \\'SilentlyContinue\\';', 'Start'];\n\n\t\tif (options.wait) {\n\t\t\tencodedArguments.push('-Wait');\n\t\t}\n\n\t\tif (app) {\n\t\t\tencodedArguments.push(executePowerShell.escapeArgument(app));\n\t\t\tif (options.target) {\n\t\t\t\tappArguments.push(options.target);\n\t\t\t}\n\t\t} else if (options.target) {\n\t\t\tencodedArguments.push(executePowerShell.escapeArgument(options.target));\n\t\t}\n\n\t\tif (appArguments.length > 0) {\n\t\t\tappArguments = appArguments.map(argument => executePowerShell.escapeArgument(argument));\n\t\t\tencodedArguments.push('-ArgumentList', appArguments.join(','));\n\t\t}\n\n\t\t// Using Base64-encoded command, accepted by PowerShell, to allow special characters.\n\t\toptions.target = executePowerShell.encodeCommand(encodedArguments.join(' '));\n\n\t\tif (!options.wait) {\n\t\t\t// PowerShell will keep the parent process alive unless stdio is ignored.\n\t\t\tchildProcessOptions.stdio = 'ignore';\n\t\t}\n\t} else {\n\t\tif (app) {\n\t\t\tcommand = app;\n\t\t} else {\n\t\t\t// When bundled by Webpack, there's no actual package file path and no local `xdg-open`.\n\t\t\tconst isBundled = !__dirname || __dirname === '/';\n\n\t\t\t// Check if local `xdg-open` exists and is executable.\n\t\t\tlet exeLocalXdgOpen = false;\n\t\t\ttry {\n\t\t\t\tawait fs.access(localXdgOpenPath, fsConstants.X_OK);\n\t\t\t\texeLocalXdgOpen = true;\n\t\t\t} catch {}\n\n\t\t\tconst useSystemXdgOpen = process.versions.electron\n\t\t\t\t?? (platform === 'android' || isBundled || !exeLocalXdgOpen);\n\t\t\tcommand = useSystemXdgOpen ? 'xdg-open' : localXdgOpenPath;\n\t\t}\n\n\t\tif (appArguments.length > 0) {\n\t\t\tcliArguments.push(...appArguments);\n\t\t}\n\n\t\tif (!options.wait) {\n\t\t\t// `xdg-open` will block the process unless stdio is ignored\n\t\t\t// and it's detached from the parent even if it's unref'd.\n\t\t\tchildProcessOptions.stdio = 'ignore';\n\t\t\tchildProcessOptions.detached = true;\n\t\t}\n\t}\n\n\tif (platform === 'darwin' && appArguments.length > 0) {\n\t\tcliArguments.push('--args', ...appArguments);\n\t}\n\n\t// IMPORTANT: On macOS, the target MUST come AFTER '--args'.\n\t// When using --args, ALL following arguments are passed to the app.\n\t// Example: open -a \"chrome\" --args --incognito https://site.com\n\t// This passes BOTH --incognito AND https://site.com to Chrome.\n\t// Without this order, Chrome won't open in incognito. See #332.\n\tif (options.target) {\n\t\tcliArguments.push(options.target);\n\t}\n\n\tconst subprocess = childProcess.spawn(command, cliArguments, childProcessOptions);\n\n\tif (options.wait) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tsubprocess.once('error', reject);\n\n\t\t\tsubprocess.once('close', exitCode => {\n\t\t\t\tif (!options.allowNonzeroExitCode && exitCode !== 0) {\n\t\t\t\t\treject(new Error(`Exited with code ${exitCode}`));\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tresolve(subprocess);\n\t\t\t});\n\t\t});\n\t}\n\n\t// When we're in a fallback attempt, we need to detect launch failures before trying the next app.\n\t// Wait for the close event to check the exit code before unreffing.\n\t// The launcher (open/xdg-open/PowerShell) exits quickly (~10-30ms) even on success.\n\tif (isFallbackAttempt) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tsubprocess.once('error', reject);\n\n\t\t\tsubprocess.once('spawn', () => {\n\t\t\t\t// Keep error handler active for post-spawn errors\n\t\t\t\tsubprocess.once('close', exitCode => {\n\t\t\t\t\tsubprocess.off('error', reject);\n\n\t\t\t\t\tif (exitCode !== 0) {\n\t\t\t\t\t\treject(new Error(`Exited with code ${exitCode}`));\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tsubprocess.unref();\n\t\t\t\t\tresolve(subprocess);\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t}\n\n\tsubprocess.unref();\n\n\t// Handle spawn errors before the caller can attach listeners.\n\t// This prevents unhandled error events from crashing the process.\n\treturn new Promise((resolve, reject) => {\n\t\tsubprocess.once('error', reject);\n\n\t\t// Wait for the subprocess to spawn before resolving.\n\t\t// This ensures the process is established before the caller continues,\n\t\t// preventing issues when process.exit() is called immediately after.\n\t\tsubprocess.once('spawn', () => {\n\t\t\tsubprocess.off('error', reject);\n\t\t\tresolve(subprocess);\n\t\t});\n\t});\n};\n\nconst open = (target, options) => {\n\tif (typeof target !== 'string') {\n\t\tthrow new TypeError('Expected a `target`');\n\t}\n\n\treturn baseOpen({\n\t\t...options,\n\t\ttarget,\n\t});\n};\n\nexport const openApp = (name, options) => {\n\tif (typeof name !== 'string' && !Array.isArray(name)) {\n\t\tthrow new TypeError('Expected a valid `name`');\n\t}\n\n\tconst {arguments: appArguments = []} = options ?? {};\n\tif (appArguments !== undefined && appArguments !== null && !Array.isArray(appArguments)) {\n\t\tthrow new TypeError('Expected `appArguments` as Array type');\n\t}\n\n\treturn baseOpen({\n\t\t...options,\n\t\tapp: {\n\t\t\tname,\n\t\t\targuments: appArguments,\n\t\t},\n\t});\n};\n\nfunction detectArchBinary(binary) {\n\tif (typeof binary === 'string' || Array.isArray(binary)) {\n\t\treturn binary;\n\t}\n\n\tconst {[arch]: archBinary} = binary;\n\n\tif (!archBinary) {\n\t\tthrow new Error(`${arch} is not supported`);\n\t}\n\n\treturn archBinary;\n}\n\nfunction detectPlatformBinary({[platform]: platformBinary}, {wsl} = {}) {\n\tif (wsl && isWsl) {\n\t\treturn detectArchBinary(wsl);\n\t}\n\n\tif (!platformBinary) {\n\t\tthrow new Error(`${platform} is not supported`);\n\t}\n\n\treturn detectArchBinary(platformBinary);\n}\n\nexport const apps = {\n\tbrowser: 'browser',\n\tbrowserPrivate: 'browserPrivate',\n};\n\ndefineLazyProperty(apps, 'chrome', () => detectPlatformBinary({\n\tdarwin: 'google chrome',\n\twin32: 'chrome',\n\t// `chromium-browser` is the older deb package name used by Ubuntu/Debian before snap.\n\tlinux: ['google-chrome', 'google-chrome-stable', 'chromium', 'chromium-browser'],\n}, {\n\twsl: {\n\t\tia32: '/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe',\n\t\tx64: ['/mnt/c/Program Files/Google/Chrome/Application/chrome.exe', '/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe'],\n\t},\n}));\n\ndefineLazyProperty(apps, 'brave', () => detectPlatformBinary({\n\tdarwin: 'brave browser',\n\twin32: 'brave',\n\tlinux: ['brave-browser', 'brave'],\n}, {\n\twsl: {\n\t\tia32: '/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe',\n\t\tx64: ['/mnt/c/Program Files/BraveSoftware/Brave-Browser/Application/brave.exe', '/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe'],\n\t},\n}));\n\ndefineLazyProperty(apps, 'firefox', () => detectPlatformBinary({\n\tdarwin: 'firefox',\n\twin32: String.raw`C:\\Program Files\\Mozilla Firefox\\firefox.exe`,\n\tlinux: 'firefox',\n}, {\n\twsl: '/mnt/c/Program Files/Mozilla Firefox/firefox.exe',\n}));\n\ndefineLazyProperty(apps, 'edge', () => detectPlatformBinary({\n\tdarwin: 'microsoft edge',\n\twin32: 'msedge',\n\tlinux: ['microsoft-edge', 'microsoft-edge-dev'],\n}, {\n\twsl: '/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe',\n}));\n\ndefineLazyProperty(apps, 'safari', () => detectPlatformBinary({\n\tdarwin: 'Safari',\n}));\n\nexport default open;\n","let _lazyMatch = () => { var __lib__=(()=>{var m=Object.defineProperty,V=Object.getOwnPropertyDescriptor,G=Object.getOwnPropertyNames,T=Object.prototype.hasOwnProperty,q=(r,e)=>{for(var n in e)m(r,n,{get:e[n],enumerable:true});},H=(r,e,n,a)=>{if(e&&typeof e==\"object\"||typeof e==\"function\")for(let t of G(e))!T.call(r,t)&&t!==n&&m(r,t,{get:()=>e[t],enumerable:!(a=V(e,t))||a.enumerable});return r},J=r=>H(m({},\"__esModule\",{value:true}),r),w={};q(w,{default:()=>re});var A=r=>Array.isArray(r),d=r=>typeof r==\"function\",Q=r=>r.length===0,W=r=>typeof r==\"number\",K=r=>typeof r==\"object\"&&r!==null,X=r=>r instanceof RegExp,b=r=>typeof r==\"string\",h=r=>r===void 0,Y=r=>{const e=new Map;return n=>{const a=e.get(n);if(a)return a;const t=r(n);return e.set(n,t),t}},rr=(r,e,n={})=>{const a={cache:{},input:r,index:0,indexMax:0,options:n,output:[]};if(v(e)(a)&&a.index===r.length)return a.output;throw new Error(`Failed to parse at index ${a.indexMax}`)},i=(r,e)=>A(r)?er(r,e):b(r)?ar(r,e):nr(r,e),er=(r,e)=>{const n={};for(const a of r){if(a.length!==1)throw new Error(`Invalid character: \"${a}\"`);const t=a.charCodeAt(0);n[t]=true;}return a=>{const t=a.index,o=a.input;for(;a.index<o.length&&o.charCodeAt(a.index)in n;)a.index+=1;const u=a.index;if(u>t){if(!h(e)&&!a.options.silent){const s=a.input.slice(t,u),c=d(e)?e(s,o,String(t)):e;h(c)||a.output.push(c);}a.indexMax=Math.max(a.indexMax,a.index);}return true}},nr=(r,e)=>{const n=r.source,a=r.flags.replace(/y|$/,\"y\"),t=new RegExp(n,a);return g(o=>{t.lastIndex=o.index;const u=t.exec(o.input);if(u){if(!h(e)&&!o.options.silent){const s=d(e)?e(...u,o.input,String(o.index)):e;h(s)||o.output.push(s);}return o.index+=u[0].length,o.indexMax=Math.max(o.indexMax,o.index),true}else return false})},ar=(r,e)=>n=>{if(n.input.startsWith(r,n.index)){if(!h(e)&&!n.options.silent){const t=d(e)?e(r,n.input,String(n.index)):e;h(t)||n.output.push(t);}return n.index+=r.length,n.indexMax=Math.max(n.indexMax,n.index),true}else return false},C=(r,e,n,a)=>{const t=v(r);return g(_(M(o=>{let u=0;for(;u<n;){const s=o.index;if(!t(o)||(u+=1,o.index===s))break}return u>=e})))},tr=(r,e)=>C(r,0,1),f=(r,e)=>C(r,0,1/0),x=(r,e)=>{const n=r.map(v);return g(_(M(a=>{for(let t=0,o=n.length;t<o;t++)if(!n[t](a))return false;return true})))},l=(r,e)=>{const n=r.map(v);return g(_(a=>{for(let t=0,o=n.length;t<o;t++)if(n[t](a))return true;return false}))},M=(r,e=false)=>{const n=v(r);return a=>{const t=a.index,o=a.output.length,u=n(a);return (!u||e)&&(a.index=t,a.output.length!==o&&(a.output.length=o)),u}},_=(r,e)=>{const n=v(r);return n},g=(()=>{let r=0;return e=>{const n=v(e),a=r+=1;return t=>{var o;if(t.options.memoization===false)return n(t);const u=t.index,s=(o=t.cache)[a]||(o[a]=new Map),c=s.get(u);if(c===false)return false;if(W(c))return t.index=c,true;if(c)return t.index=c.index,c.output?.length&&t.output.push(...c.output),true;{const Z=t.output.length;if(n(t)){const D=t.index,U=t.output.length;if(U>Z){const ee=t.output.slice(Z,U);s.set(u,{index:D,output:ee});}else s.set(u,D);return true}else return s.set(u,false),false}}}})(),E=r=>{let e;return n=>(e||(e=v(r())),e(n))},v=Y(r=>{if(d(r))return Q(r)?E(r):r;if(b(r)||X(r))return i(r);if(A(r))return x(r);if(K(r))return l(Object.values(r));throw new Error(\"Invalid rule\")}),P=\"abcdefghijklmnopqrstuvwxyz\",ir=r=>{let e=\"\";for(;r>0;){const n=(r-1)%26;e=P[n]+e,r=Math.floor((r-1)/26);}return e},O=r=>{let e=0;for(let n=0,a=r.length;n<a;n++)e=e*26+P.indexOf(r[n])+1;return e},S=(r,e)=>{if(e<r)return S(e,r);const n=[];for(;r<=e;)n.push(r++);return n},or=(r,e,n)=>S(r,e).map(a=>String(a).padStart(n,\"0\")),R=(r,e)=>S(O(r),O(e)).map(ir),p=r=>r,z=r=>ur(e=>rr(e,r,{memoization:false}).join(\"\")),ur=r=>{const e={};return n=>e[n]??(e[n]=r(n))},sr=i(/^\\*\\*\\/\\*$/,\".*\"),cr=i(/^\\*\\*\\/(\\*)?([ a-zA-Z0-9._-]+)$/,(r,e,n)=>`.*${e?\"\":\"(?:^|/)\"}${n.replaceAll(\".\",\"\\\\.\")}`),lr=i(/^\\*\\*\\/(\\*)?([ a-zA-Z0-9._-]*)\\{([ a-zA-Z0-9._-]+(?:,[ a-zA-Z0-9._-]+)*)\\}$/,(r,e,n,a)=>`.*${e?\"\":\"(?:^|/)\"}${n.replaceAll(\".\",\"\\\\.\")}(?:${a.replaceAll(\",\",\"|\").replaceAll(\".\",\"\\\\.\")})`),y=i(/\\\\./,p),pr=i(/[$.*+?^(){}[\\]\\|]/,r=>`\\\\${r}`),vr=i(/./,p),hr=i(/^(?:!!)*!(.*)$/,(r,e)=>`(?!^${L(e)}$).*?`),dr=i(/^(!!)+/,\"\"),fr=l([hr,dr]),xr=i(/\\/(\\*\\*\\/)+/,\"(?:/.+/|/)\"),gr=i(/^(\\*\\*\\/)+/,\"(?:^|.*/)\"),mr=i(/\\/(\\*\\*)$/,\"(?:/.*|$)\"),_r=i(/\\*\\*/,\".*\"),j=l([xr,gr,mr,_r]),Sr=i(/\\*\\/(?!\\*\\*\\/)/,\"[^/]*/\"),yr=i(/\\*/,\"[^/]*\"),N=l([Sr,yr]),k=i(\"?\",\"[^/]\"),$r=i(\"[\",p),wr=i(\"]\",p),Ar=i(/[!^]/,\"^/\"),br=i(/[a-z]-[a-z]|[0-9]-[0-9]/i,p),Cr=i(/[$.*+?^(){}[\\|]/,r=>`\\\\${r}`),Mr=i(/[^\\]]/,p),Er=l([y,Cr,br,Mr]),B=x([$r,tr(Ar),f(Er),wr]),Pr=i(\"{\",\"(?:\"),Or=i(\"}\",\")\"),Rr=i(/(\\d+)\\.\\.(\\d+)/,(r,e,n)=>or(+e,+n,Math.min(e.length,n.length)).join(\"|\")),zr=i(/([a-z]+)\\.\\.([a-z]+)/,(r,e,n)=>R(e,n).join(\"|\")),jr=i(/([A-Z]+)\\.\\.([A-Z]+)/,(r,e,n)=>R(e.toLowerCase(),n.toLowerCase()).join(\"|\").toUpperCase()),Nr=l([Rr,zr,jr]),I=x([Pr,Nr,Or]),kr=i(\"{\",\"(?:\"),Br=i(\"}\",\")\"),Ir=i(\",\",\"|\"),Fr=i(/[$.*+?^(){[\\]\\|]/,r=>`\\\\${r}`),Lr=i(/[^}]/,p),Zr=E(()=>F),Dr=l([j,N,k,B,I,Zr,y,Fr,Ir,Lr]),F=x([kr,f(Dr),Br]),Ur=f(l([sr,cr,lr,fr,j,N,k,B,I,F,y,pr,vr])),Vr=Ur,Gr=z(Vr),L=Gr,Tr=i(/\\\\./,p),qr=i(/./,p),Hr=i(/\\*\\*\\*+/,\"*\"),Jr=i(/([^/{[(!])\\*\\*/,(r,e)=>`${e}*`),Qr=i(/(^|.)\\*\\*(?=[^*/)\\]}])/,(r,e)=>`${e}*`),Wr=f(l([Tr,Hr,Jr,Qr,qr])),Kr=Wr,Xr=z(Kr),Yr=Xr,$=(r,e)=>{const n=Array.isArray(r)?r:[r];if(!n.length)return false;const a=n.map($.compile),t=n.every(s=>/(\\/(?:\\*\\*)?|\\[\\/\\])$/.test(s)),o=e.replace(/[\\\\\\/]+/g,\"/\").replace(/\\/$/,t?\"/\":\"\");return a.some(s=>s.test(o))};$.compile=r=>new RegExp(`^${L(Yr(r))}$`,\"s\");var re=$;return J(w)})();\n return __lib__.default || __lib__; };\nlet _match;\nconst zeptomatch = (path, pattern) => {\n if (!_match) {\n _match = _lazyMatch();\n _lazyMatch = null;\n }\n return _match(path, pattern);\n};\n\nconst _DRIVE_LETTER_START_RE = /^[A-Za-z]:\\//;\nfunction normalizeWindowsPath(input = \"\") {\n if (!input) {\n return input;\n }\n return input.replace(/\\\\/g, \"/\").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());\n}\n\nconst _UNC_REGEX = /^[/\\\\]{2}/;\nconst _IS_ABSOLUTE_RE = /^[/\\\\](?![/\\\\])|^[/\\\\]{2}(?!\\.)|^[A-Za-z]:[/\\\\]/;\nconst _DRIVE_LETTER_RE = /^[A-Za-z]:$/;\nconst _ROOT_FOLDER_RE = /^\\/([A-Za-z]:)?$/;\nconst _EXTNAME_RE = /.(\\.[^./]+|\\.)$/;\nconst _PATH_ROOT_RE = /^[/\\\\]|^[a-zA-Z]:[/\\\\]/;\nconst sep = \"/\";\nconst normalize = function(path) {\n if (path.length === 0) {\n return \".\";\n }\n path = normalizeWindowsPath(path);\n const isUNCPath = path.match(_UNC_REGEX);\n const isPathAbsolute = isAbsolute(path);\n const trailingSeparator = path[path.length - 1] === \"/\";\n path = normalizeString(path, !isPathAbsolute);\n if (path.length === 0) {\n if (isPathAbsolute) {\n return \"/\";\n }\n return trailingSeparator ? \"./\" : \".\";\n }\n if (trailingSeparator) {\n path += \"/\";\n }\n if (_DRIVE_LETTER_RE.test(path)) {\n path += \"/\";\n }\n if (isUNCPath) {\n if (!isPathAbsolute) {\n return `//./${path}`;\n }\n return `//${path}`;\n }\n return isPathAbsolute && !isAbsolute(path) ? `/${path}` : path;\n};\nconst join = function(...segments) {\n let path = \"\";\n for (const seg of segments) {\n if (!seg) {\n continue;\n }\n if (path.length > 0) {\n const pathTrailing = path[path.length - 1] === \"/\";\n const segLeading = seg[0] === \"/\";\n const both = pathTrailing && segLeading;\n if (both) {\n path += seg.slice(1);\n } else {\n path += pathTrailing || segLeading ? seg : `/${seg}`;\n }\n } else {\n path += seg;\n }\n }\n return normalize(path);\n};\nfunction cwd() {\n if (typeof process !== \"undefined\" && typeof process.cwd === \"function\") {\n return process.cwd().replace(/\\\\/g, \"/\");\n }\n return \"/\";\n}\nconst resolve = function(...arguments_) {\n arguments_ = arguments_.map((argument) => normalizeWindowsPath(argument));\n let resolvedPath = \"\";\n let resolvedAbsolute = false;\n for (let index = arguments_.length - 1; index >= -1 && !resolvedAbsolute; index--) {\n const path = index >= 0 ? arguments_[index] : cwd();\n if (!path || path.length === 0) {\n continue;\n }\n resolvedPath = `${path}/${resolvedPath}`;\n resolvedAbsolute = isAbsolute(path);\n }\n resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute);\n if (resolvedAbsolute && !isAbsolute(resolvedPath)) {\n return `/${resolvedPath}`;\n }\n return resolvedPath.length > 0 ? resolvedPath : \".\";\n};\nfunction normalizeString(path, allowAboveRoot) {\n let res = \"\";\n let lastSegmentLength = 0;\n let lastSlash = -1;\n let dots = 0;\n let char = null;\n for (let index = 0; index <= path.length; ++index) {\n if (index < path.length) {\n char = path[index];\n } else if (char === \"/\") {\n break;\n } else {\n char = \"/\";\n }\n if (char === \"/\") {\n if (lastSlash === index - 1 || dots === 1) ; else if (dots === 2) {\n if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== \".\" || res[res.length - 2] !== \".\") {\n if (res.length > 2) {\n const lastSlashIndex = res.lastIndexOf(\"/\");\n if (lastSlashIndex === -1) {\n res = \"\";\n lastSegmentLength = 0;\n } else {\n res = res.slice(0, lastSlashIndex);\n lastSegmentLength = res.length - 1 - res.lastIndexOf(\"/\");\n }\n lastSlash = index;\n dots = 0;\n continue;\n } else if (res.length > 0) {\n res = \"\";\n lastSegmentLength = 0;\n lastSlash = index;\n dots = 0;\n continue;\n }\n }\n if (allowAboveRoot) {\n res += res.length > 0 ? \"/..\" : \"..\";\n lastSegmentLength = 2;\n }\n } else {\n if (res.length > 0) {\n res += `/${path.slice(lastSlash + 1, index)}`;\n } else {\n res = path.slice(lastSlash + 1, index);\n }\n lastSegmentLength = index - lastSlash - 1;\n }\n lastSlash = index;\n dots = 0;\n } else if (char === \".\" && dots !== -1) {\n ++dots;\n } else {\n dots = -1;\n }\n }\n return res;\n}\nconst isAbsolute = function(p) {\n return _IS_ABSOLUTE_RE.test(p);\n};\nconst toNamespacedPath = function(p) {\n return normalizeWindowsPath(p);\n};\nconst extname = function(p) {\n if (p === \"..\") return \"\";\n const match = _EXTNAME_RE.exec(normalizeWindowsPath(p));\n return match && match[1] || \"\";\n};\nconst relative = function(from, to) {\n const _from = resolve(from).replace(_ROOT_FOLDER_RE, \"$1\").split(\"/\");\n const _to = resolve(to).replace(_ROOT_FOLDER_RE, \"$1\").split(\"/\");\n if (_to[0][1] === \":\" && _from[0][1] === \":\" && _from[0] !== _to[0]) {\n return _to.join(\"/\");\n }\n const _fromCopy = [..._from];\n for (const segment of _fromCopy) {\n if (_to[0] !== segment) {\n break;\n }\n _from.shift();\n _to.shift();\n }\n return [..._from.map(() => \"..\"), ..._to].join(\"/\");\n};\nconst dirname = function(p) {\n const segments = normalizeWindowsPath(p).replace(/\\/$/, \"\").split(\"/\").slice(0, -1);\n if (segments.length === 1 && _DRIVE_LETTER_RE.test(segments[0])) {\n segments[0] += \"/\";\n }\n return segments.join(\"/\") || (isAbsolute(p) ? \"/\" : \".\");\n};\nconst format = function(p) {\n const ext = p.ext ? p.ext.startsWith(\".\") ? p.ext : `.${p.ext}` : \"\";\n const segments = [p.root, p.dir, p.base ?? (p.name ?? \"\") + ext].filter(\n Boolean\n );\n return normalizeWindowsPath(\n p.root ? resolve(...segments) : segments.join(\"/\")\n );\n};\nconst basename = function(p, extension) {\n const segments = normalizeWindowsPath(p).split(\"/\");\n let lastSegment = \"\";\n for (let i = segments.length - 1; i >= 0; i--) {\n const val = segments[i];\n if (val) {\n lastSegment = val;\n break;\n }\n }\n return extension && lastSegment.endsWith(extension) ? lastSegment.slice(0, -extension.length) : lastSegment;\n};\nconst parse = function(p) {\n const root = _PATH_ROOT_RE.exec(p)?.[0]?.replace(/\\\\/g, \"/\") || \"\";\n const base = basename(p);\n const extension = extname(base);\n return {\n root,\n dir: dirname(p),\n base,\n ext: extension,\n name: base.slice(0, base.length - extension.length)\n };\n};\nconst matchesGlob = (path, pattern) => {\n return zeptomatch(pattern, normalize(path));\n};\n\nconst _path = {\n __proto__: null,\n basename: basename,\n dirname: dirname,\n extname: extname,\n format: format,\n isAbsolute: isAbsolute,\n join: join,\n matchesGlob: matchesGlob,\n normalize: normalize,\n normalizeString: normalizeString,\n parse: parse,\n relative: relative,\n resolve: resolve,\n sep: sep,\n toNamespacedPath: toNamespacedPath\n};\n\nexport { _path as _, normalizeString as a, relative as b, basename as c, dirname as d, extname as e, format as f, normalizeWindowsPath as g, isAbsolute as i, join as j, matchesGlob as m, normalize as n, parse as p, resolve as r, sep as s, toNamespacedPath as t };\n","const RE_ABSOLUTE_ASSET_ATTR = /\\s(href|src)=\"\\//g;\nconst RE_IMPORTMAP_ENTRY = /(\"#entry\"\\s*:\\s*\")\\/_nuxt\\//g;\n\nexport function rewriteStaticHtmlWithBase(\n content: string,\n baseURL: string\n): string {\n if (baseURL === \"/\") return content;\n\n return content\n .replaceAll(RE_ABSOLUTE_ASSET_ATTR, ` $1=\"${baseURL}`)\n .replaceAll('baseURL:\"/\"', `baseURL:\"${baseURL}\"`)\n .replaceAll(RE_IMPORTMAP_ENTRY, `$1${baseURL}_nuxt/`);\n}\n","import c from \"ansis\";\n\nexport const stylelintConfigFilenames: readonly string[] = [\n \"stylelint.config.js\",\n \"stylelint.config.mjs\",\n \"stylelint.config.cjs\",\n \"stylelint.config.ts\",\n \"stylelint.config.mts\",\n \"stylelint.config.cts\",\n];\n\nexport const stylelintLegacyConfigFilenames: readonly string[] = [\n \".stylelintrc\",\n \".stylelintrc.js\",\n \".stylelintrc.mjs\",\n \".stylelintrc.cjs\",\n \".stylelintrc.yaml\",\n \".stylelintrc.yml\",\n \".stylelintrc.json\",\n];\n\nexport const configFilenames: readonly string[] = stylelintConfigFilenames;\nexport const legacyConfigFilenames: readonly string[] =\n stylelintLegacyConfigFilenames;\nexport const DEFAULT_TARGET_FILE = \"stylelint-inspector-target.css\";\n\nexport const MARK_CHECK: string = c.green(\"✔\");\nexport const MARK_INFO: string = c.blue(\"ℹ\");\nexport const MARK_ERROR: string = c.red(\"✖\");\n","import process from \"node:process\";\nimport { DEFAULT_TARGET_FILE } from \"./constants\";\n\nexport interface CliInspectorOptions {\n basePath?: string;\n config?: string;\n file?: string;\n target?: string;\n}\n\nfunction getEnvValue(primary: string, legacy: string): string | undefined {\n return process.env[primary] || process.env[legacy];\n}\n\n/**\n * Normalizes CLI options so explicit flags win over env vars, `--file` works as\n * a true alias for `--target`, and the inspector keeps a stable default target\n * when neither is supplied.\n */\nexport function normalizeCliInspectorOptions<T extends CliInspectorOptions>(\n options: T\n): T & Required<Pick<CliInspectorOptions, \"target\">> {\n return {\n ...options,\n config:\n options.config ?? getEnvValue(\"STYLELINT_CONFIG\", \"ESLINT_CONFIG\"),\n basePath:\n options.basePath ??\n getEnvValue(\"STYLELINT_BASE_PATH\", \"ESLINT_BASE_PATH\"),\n target:\n options.target ??\n options.file ??\n getEnvValue(\"STYLELINT_TARGET\", \"ESLINT_TARGET\") ??\n DEFAULT_TARGET_FILE,\n };\n}\n","/*\nHow it works:\n`this.#head` is an instance of `Node` which keeps track of its current value and nests another instance of `Node` that keeps the value that comes after it. When a value is provided to `.enqueue()`, the code needs to iterate through `this.#head`, going deeper and deeper to find the last value. However, iterating through every single item is slow. This problem is solved by saving a reference to the last value as `this.#tail` so that it can reference it to add a new value.\n*/\n\nclass Node {\n\tvalue;\n\tnext;\n\n\tconstructor(value) {\n\t\tthis.value = value;\n\t}\n}\n\nexport default class Queue {\n\t#head;\n\t#tail;\n\t#size;\n\n\tconstructor() {\n\t\tthis.clear();\n\t}\n\n\tenqueue(value) {\n\t\tconst node = new Node(value);\n\n\t\tif (this.#head) {\n\t\t\tthis.#tail.next = node;\n\t\t\tthis.#tail = node;\n\t\t} else {\n\t\t\tthis.#head = node;\n\t\t\tthis.#tail = node;\n\t\t}\n\n\t\tthis.#size++;\n\t}\n\n\tdequeue() {\n\t\tconst current = this.#head;\n\t\tif (!current) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.#head = this.#head.next;\n\t\tthis.#size--;\n\n\t\t// Clean up tail reference when queue becomes empty\n\t\tif (!this.#head) {\n\t\t\tthis.#tail = undefined;\n\t\t}\n\n\t\treturn current.value;\n\t}\n\n\tpeek() {\n\t\tif (!this.#head) {\n\t\t\treturn;\n\t\t}\n\n\t\treturn this.#head.value;\n\n\t\t// TODO: Node.js 18.\n\t\t// return this.#head?.value;\n\t}\n\n\tclear() {\n\t\tthis.#head = undefined;\n\t\tthis.#tail = undefined;\n\t\tthis.#size = 0;\n\t}\n\n\tget size() {\n\t\treturn this.#size;\n\t}\n\n\t* [Symbol.iterator]() {\n\t\tlet current = this.#head;\n\n\t\twhile (current) {\n\t\t\tyield current.value;\n\t\t\tcurrent = current.next;\n\t\t}\n\t}\n\n\t* drain() {\n\t\twhile (this.#head) {\n\t\t\tyield this.dequeue();\n\t\t}\n\t}\n}\n","import Queue from 'yocto-queue';\n\nexport default function pLimit(concurrency) {\n\tif (!((Number.isInteger(concurrency) || concurrency === Number.POSITIVE_INFINITY) && concurrency > 0)) {\n\t\tthrow new TypeError('Expected `concurrency` to be a number from 1 and up');\n\t}\n\n\tconst queue = new Queue();\n\tlet activeCount = 0;\n\n\tconst next = () => {\n\t\tactiveCount--;\n\n\t\tif (queue.size > 0) {\n\t\t\tqueue.dequeue()();\n\t\t}\n\t};\n\n\tconst run = async (fn, resolve, args) => {\n\t\tactiveCount++;\n\n\t\tconst result = (async () => fn(...args))();\n\n\t\tresolve(result);\n\n\t\ttry {\n\t\t\tawait result;\n\t\t} catch {}\n\n\t\tnext();\n\t};\n\n\tconst enqueue = (fn, resolve, args) => {\n\t\tqueue.enqueue(run.bind(undefined, fn, resolve, args));\n\n\t\t(async () => {\n\t\t\t// This function needs to wait until the next microtask before comparing\n\t\t\t// `activeCount` to `concurrency`, because `activeCount` is updated asynchronously\n\t\t\t// when the run function is dequeued and called. The comparison in the if-statement\n\t\t\t// needs to happen asynchronously as well to get an up-to-date value for `activeCount`.\n\t\t\tawait Promise.resolve();\n\n\t\t\tif (activeCount < concurrency && queue.size > 0) {\n\t\t\t\tqueue.dequeue()();\n\t\t\t}\n\t\t})();\n\t};\n\n\tconst generator = (fn, ...args) => new Promise(resolve => {\n\t\tenqueue(fn, resolve, args);\n\t});\n\n\tObject.defineProperties(generator, {\n\t\tactiveCount: {\n\t\t\tget: () => activeCount,\n\t\t},\n\t\tpendingCount: {\n\t\t\tget: () => queue.size,\n\t\t},\n\t\tclearQueue: {\n\t\t\tvalue: () => {\n\t\t\t\tqueue.clear();\n\t\t\t},\n\t\t},\n\t});\n\n\treturn generator;\n}\n","import pLimit from 'p-limit';\n\nclass EndError extends Error {\n\tconstructor(value) {\n\t\tsuper();\n\t\tthis.value = value;\n\t}\n}\n\n// The input can also be a promise, so we await it.\nconst testElement = async (element, tester) => tester(await element);\n\n// The input can also be a promise, so we `Promise.all()` them both.\nconst finder = async element => {\n\tconst values = await Promise.all(element);\n\tif (values[1] === true) {\n\t\tthrow new EndError(values[0]);\n\t}\n\n\treturn false;\n};\n\nexport default async function pLocate(\n\titerable,\n\ttester,\n\t{\n\t\tconcurrency = Number.POSITIVE_INFINITY,\n\t\tpreserveOrder = true,\n\t} = {},\n) {\n\tconst limit = pLimit(concurrency);\n\n\t// Start all the promises concurrently with optional limit.\n\tconst items = [...iterable].map(element => [element, limit(testElement, element, tester)]);\n\n\t// Check the promises either serially or concurrently.\n\tconst checkLimit = pLimit(preserveOrder ? 1 : Number.POSITIVE_INFINITY);\n\n\ttry {\n\t\tawait Promise.all(items.map(element => checkLimit(finder, element)));\n\t} catch (error) {\n\t\tif (error instanceof EndError) {\n\t\t\treturn error.value;\n\t\t}\n\n\t\tthrow error;\n\t}\n}\n","import process from 'node:process';\nimport path from 'node:path';\nimport fs, {promises as fsPromises} from 'node:fs';\nimport {fileURLToPath} from 'node:url';\nimport pLocate from 'p-locate';\n\nconst typeMappings = {\n\tdirectory: 'isDirectory',\n\tfile: 'isFile',\n};\n\nfunction checkType(type) {\n\tif (type === 'both' || Object.hasOwn(typeMappings, type)) {\n\t\treturn;\n\t}\n\n\tthrow new Error(`Invalid type specified: ${type}`);\n}\n\nconst matchType = (type, stat) => type === 'both' ? (stat.isFile() || stat.isDirectory()) : stat[typeMappings[type]]();\n\nconst toPath = urlOrPath => urlOrPath instanceof URL ? fileURLToPath(urlOrPath) : urlOrPath;\n\nexport async function locatePath(\n\tpaths,\n\t{\n\t\tcwd = process.cwd(),\n\t\ttype = 'file',\n\t\tallowSymlinks = true,\n\t\tconcurrency,\n\t\tpreserveOrder,\n\t} = {},\n) {\n\tcheckType(type);\n\tcwd = toPath(cwd);\n\n\tconst statFunction = allowSymlinks ? fsPromises.stat : fsPromises.lstat;\n\n\treturn pLocate(paths, async path_ => {\n\t\ttry {\n\t\t\tconst stat = await statFunction(path.resolve(cwd, path_));\n\t\t\treturn matchType(type, stat);\n\t\t} catch {\n\t\t\treturn false;\n\t\t}\n\t}, {concurrency, preserveOrder});\n}\n\nexport function locatePathSync(\n\tpaths,\n\t{\n\t\tcwd = process.cwd(),\n\t\ttype = 'file',\n\t\tallowSymlinks = true,\n\t} = {},\n) {\n\tcheckType(type);\n\tcwd = toPath(cwd);\n\n\tconst statFunction = allowSymlinks ? fs.statSync : fs.lstatSync;\n\n\tfor (const path_ of paths) {\n\t\ttry {\n\t\t\tconst stat = statFunction(path.resolve(cwd, path_), {\n\t\t\t\tthrowIfNoEntry: false,\n\t\t\t});\n\n\t\t\tif (!stat) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (matchType(type, stat)) {\n\t\t\t\treturn path_;\n\t\t\t}\n\t\t} catch {}\n\t}\n}\n","import {promisify} from 'node:util';\nimport {execFile as execFileCallback, execFileSync as execFileSyncOriginal} from 'node:child_process';\nimport path from 'node:path';\nimport {fileURLToPath} from 'node:url';\n\nconst execFileOriginal = promisify(execFileCallback);\n\nexport function toPath(urlOrPath) {\n\treturn urlOrPath instanceof URL ? fileURLToPath(urlOrPath) : urlOrPath;\n}\n\nexport function rootDirectory(pathInput) {\n\treturn path.parse(toPath(pathInput)).root;\n}\n\nexport function traversePathUp(startPath) {\n\treturn {\n\t\t* [Symbol.iterator]() {\n\t\t\tlet currentPath = path.resolve(toPath(startPath));\n\t\t\tlet previousPath;\n\n\t\t\twhile (previousPath !== currentPath) {\n\t\t\t\tyield currentPath;\n\t\t\t\tpreviousPath = currentPath;\n\t\t\t\tcurrentPath = path.resolve(currentPath, '..');\n\t\t\t}\n\t\t},\n\t};\n}\n\nconst TEN_MEGABYTES_IN_BYTES = 10 * 1024 * 1024;\n\nexport async function execFile(file, arguments_, options = {}) {\n\treturn execFileOriginal(file, arguments_, {\n\t\tmaxBuffer: TEN_MEGABYTES_IN_BYTES,\n\t\t...options,\n\t});\n}\n\nexport function execFileSync(file, arguments_ = [], options = {}) {\n\treturn execFileSyncOriginal(file, arguments_, {\n\t\tmaxBuffer: TEN_MEGABYTES_IN_BYTES,\n\t\tencoding: 'utf8',\n\t\tstdio: 'pipe',\n\t\t...options,\n\t});\n}\n\nexport * from './default.js';\n","import path from 'node:path';\nimport fs from 'node:fs';\nimport {locatePath, locatePathSync} from 'locate-path';\nimport {toPath} from 'unicorn-magic';\n\nexport const findUpStop = Symbol('findUpStop');\n\nexport async function findUpMultiple(name, options = {}) {\n\tlet directory = path.resolve(toPath(options.cwd) ?? '');\n\tconst {root} = path.parse(directory);\n\tconst stopAt = path.resolve(directory, toPath(options.stopAt) ?? root);\n\tconst limit = options.limit ?? Number.POSITIVE_INFINITY;\n\tconst paths = [name].flat();\n\n\tconst runMatcher = async locateOptions => {\n\t\tif (typeof name !== 'function') {\n\t\t\treturn locatePath(paths, locateOptions);\n\t\t}\n\n\t\tconst foundPath = await name(locateOptions.cwd);\n\t\tif (typeof foundPath === 'string') {\n\t\t\treturn locatePath([foundPath], locateOptions);\n\t\t}\n\n\t\treturn foundPath;\n\t};\n\n\tconst matches = [];\n\twhile (true) {\n\t\t// eslint-disable-next-line no-await-in-loop\n\t\tconst foundPath = await runMatcher({...options, cwd: directory});\n\n\t\tif (foundPath === findUpStop) {\n\t\t\tbreak;\n\t\t}\n\n\t\tif (foundPath) {\n\t\t\tmatches.push(path.resolve(directory, foundPath));\n\t\t}\n\n\t\tif (directory === stopAt || matches.length >= limit) {\n\t\t\tbreak;\n\t\t}\n\n\t\tdirectory = path.dirname(directory);\n\t}\n\n\treturn matches;\n}\n\nexport function findUpMultipleSync(name, options = {}) {\n\tlet directory = path.resolve(toPath(options.cwd) ?? '');\n\tconst {root} = path.parse(directory);\n\tconst stopAt = path.resolve(directory, toPath(options.stopAt) ?? root);\n\tconst limit = options.limit ?? Number.POSITIVE_INFINITY;\n\tconst paths = [name].flat();\n\n\tconst runMatcher = locateOptions => {\n\t\tif (typeof name !== 'function') {\n\t\t\treturn locatePathSync(paths, locateOptions);\n\t\t}\n\n\t\tconst foundPath = name(locateOptions.cwd);\n\t\tif (typeof foundPath === 'string') {\n\t\t\treturn locatePathSync([foundPath], locateOptions);\n\t\t}\n\n\t\treturn foundPath;\n\t};\n\n\tconst matches = [];\n\twhile (true) {\n\t\tconst foundPath = runMatcher({...options, cwd: directory});\n\n\t\tif (foundPath === findUpStop) {\n\t\t\tbreak;\n\t\t}\n\n\t\tif (foundPath) {\n\t\t\tmatches.push(path.resolve(directory, foundPath));\n\t\t}\n\n\t\tif (directory === stopAt || matches.length >= limit) {\n\t\t\tbreak;\n\t\t}\n\n\t\tdirectory = path.dirname(directory);\n\t}\n\n\treturn matches;\n}\n\nexport async function findUp(name, options = {}) {\n\tconst matches = await findUpMultiple(name, {...options, limit: 1});\n\treturn matches[0];\n}\n\nexport function findUpSync(name, options = {}) {\n\tconst matches = findUpMultipleSync(name, {...options, limit: 1});\n\treturn matches[0];\n}\n\nasync function findDownDepthFirst(directory, paths, maxDepth, locateOptions, currentDepth = 0) {\n\tconst found = await locatePath(paths, {cwd: directory, ...locateOptions});\n\tif (found) {\n\t\treturn path.resolve(directory, found);\n\t}\n\n\tif (currentDepth >= maxDepth) {\n\t\treturn undefined;\n\t}\n\n\ttry {\n\t\tconst entries = await fs.promises.readdir(directory, {withFileTypes: true});\n\t\tfor (const entry of entries) {\n\t\t\tif (entry.isDirectory()) {\n\t\t\t\t// eslint-disable-next-line no-await-in-loop\n\t\t\t\tconst result = await findDownDepthFirst(\n\t\t\t\t\tpath.join(directory, entry.name),\n\t\t\t\t\tpaths,\n\t\t\t\t\tmaxDepth,\n\t\t\t\t\tlocateOptions,\n\t\t\t\t\tcurrentDepth + 1,\n\t\t\t\t);\n\t\t\t\tif (result) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} catch {}\n\n\treturn undefined;\n}\n\nfunction findDownDepthFirstSync(directory, paths, maxDepth, locateOptions, currentDepth = 0) {\n\tconst found = locatePathSync(paths, {cwd: directory, ...locateOptions});\n\tif (found) {\n\t\treturn path.resolve(directory, found);\n\t}\n\n\tif (currentDepth >= maxDepth) {\n\t\treturn undefined;\n\t}\n\n\ttry {\n\t\tconst entries = fs.readdirSync(directory, {withFileTypes: true});\n\t\tfor (const entry of entries) {\n\t\t\tif (entry.isDirectory()) {\n\t\t\t\tconst result = findDownDepthFirstSync(\n\t\t\t\t\tpath.join(directory, entry.name),\n\t\t\t\t\tpaths,\n\t\t\t\t\tmaxDepth,\n\t\t\t\t\tlocateOptions,\n\t\t\t\t\tcurrentDepth + 1,\n\t\t\t\t);\n\t\t\t\tif (result) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} catch {}\n\n\treturn undefined;\n}\n\nfunction prepareFindDownOptions(name, options) {\n\tconst startDirectory = path.resolve(toPath(options.cwd) ?? '');\n\tconst maxDepth = Math.max(0, options.depth ?? 1);\n\tconst paths = [name].flat();\n\tconst {type = 'file', allowSymlinks = true, strategy = 'breadth'} = options;\n\tconst locateOptions = {type, allowSymlinks};\n\treturn {\n\t\tstartDirectory,\n\t\tmaxDepth,\n\t\tpaths,\n\t\tlocateOptions,\n\t\tstrategy,\n\t};\n}\n\nasync function findDownBreadthFirst(startDirectory, paths, maxDepth, locateOptions) {\n\tconst queue = [{directory: startDirectory, depth: 0}];\n\n\twhile (queue.length > 0) {\n\t\tconst {directory, depth} = queue.shift();\n\n\t\t// eslint-disable-next-line no-await-in-loop\n\t\tconst found = await locatePath(paths, {cwd: directory, ...locateOptions});\n\t\tif (found) {\n\t\t\treturn path.resolve(directory, found);\n\t\t}\n\n\t\tif (depth >= maxDepth) {\n\t\t\tcontinue;\n\t\t}\n\n\t\ttry {\n\t\t\t// eslint-disable-next-line no-await-in-loop\n\t\t\tconst entries = await fs.promises.readdir(directory, {withFileTypes: true});\n\t\t\tfor (const entry of entries) {\n\t\t\t\tif (entry.isDirectory()) {\n\t\t\t\t\tqueue.push({directory: path.join(directory, entry.name), depth: depth + 1});\n\t\t\t\t}\n\t\t\t}\n\t\t} catch {}\n\t}\n\n\treturn undefined;\n}\n\nfunction findDownBreadthFirstSync(startDirectory, paths, maxDepth, locateOptions) {\n\tconst queue = [{directory: startDirectory, depth: 0}];\n\n\twhile (queue.length > 0) {\n\t\tconst {directory, depth} = queue.shift();\n\n\t\tconst found = locatePathSync(paths, {cwd: directory, ...locateOptions});\n\t\tif (found) {\n\t\t\treturn path.resolve(directory, found);\n\t\t}\n\n\t\tif (depth >= maxDepth) {\n\t\t\tcontinue;\n\t\t}\n\n\t\ttry {\n\t\t\tconst entries = fs.readdirSync(directory, {withFileTypes: true});\n\t\t\tfor (const entry of entries) {\n\t\t\t\tif (entry.isDirectory()) {\n\t\t\t\t\tqueue.push({directory: path.join(directory, entry.name), depth: depth + 1});\n\t\t\t\t}\n\t\t\t}\n\t\t} catch {}\n\t}\n\n\treturn undefined;\n}\n\nexport async function findDown(name, options = {}) {\n\tconst {startDirectory, maxDepth, paths, locateOptions, strategy} = prepareFindDownOptions(name, options);\n\n\treturn strategy === 'depth'\n\t\t? findDownDepthFirst(startDirectory, paths, maxDepth, locateOptions)\n\t\t: findDownBreadthFirst(startDirectory, paths, maxDepth, locateOptions);\n}\n\nexport function findDownSync(name, options = {}) {\n\tconst {startDirectory, maxDepth, paths, locateOptions, strategy} = prepareFindDownOptions(name, options);\n\n\treturn strategy === 'depth'\n\t\t? findDownDepthFirstSync(startDirectory, paths, maxDepth, locateOptions)\n\t\t: findDownBreadthFirstSync(startDirectory, paths, maxDepth, locateOptions);\n}\n\n","// @ts-nocheck\n// Copyright 2018-2025 the Deno authors. MIT license.\n// Copyright the Browserify authors. MIT License.\nfunction assertPath(path) {\n if (typeof path !== \"string\") {\n throw new TypeError(`Path must be a string, received \"${JSON.stringify(path)}\"`);\n }\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\nfunction stripSuffix(name, suffix) {\n if (suffix.length >= name.length) {\n return name;\n }\n const lenDiff = name.length - suffix.length;\n for(let i = suffix.length - 1; i >= 0; --i){\n if (name.charCodeAt(lenDiff + i) !== suffix.charCodeAt(i)) {\n return name;\n }\n }\n return name.slice(0, -suffix.length);\n}\nfunction lastPathSegment(path, isSep, start = 0) {\n let matchedNonSeparator = false;\n let end = path.length;\n for(let i = path.length - 1; i >= start; --i){\n if (isSep(path.charCodeAt(i))) {\n if (matchedNonSeparator) {\n start = i + 1;\n break;\n }\n } else if (!matchedNonSeparator) {\n matchedNonSeparator = true;\n end = i + 1;\n }\n }\n return path.slice(start, end);\n}\nfunction assertArgs$1(path, suffix) {\n assertPath(path);\n if (path.length === 0) return path;\n if (typeof suffix !== \"string\") {\n throw new TypeError(`Suffix must be a string, received \"${JSON.stringify(suffix)}\"`);\n }\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\nfunction assertArg$3(url) {\n url = url instanceof URL ? url : new URL(url);\n if (url.protocol !== \"file:\") {\n throw new TypeError(`URL must be a file URL: received \"${url.protocol}\"`);\n }\n return url;\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\n/**\n * Converts a file URL to a path string.\n *\n * @example Usage\n * ```ts\n * import { fromFileUrl } from \"@std/path/posix/from-file-url\";\n * import { assertEquals } from \"@std/assert\";\n *\n * assertEquals(fromFileUrl(new URL(\"file:///home/foo\")), \"/home/foo\");\n * ```\n *\n * @param url The file URL to convert.\n * @returns The path string.\n */ function fromFileUrl(url) {\n url = assertArg$3(url);\n return decodeURIComponent(url.pathname.replace(/%(?![0-9A-Fa-f]{2})/g, \"%25\"));\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// Copyright the Browserify authors. MIT License.\n// Ported from https://github.com/browserify/path-browserify/\n// This module is browser compatible.\nfunction stripTrailingSeparators(segment, isSep) {\n if (segment.length <= 1) {\n return segment;\n }\n let end = segment.length;\n for(let i = segment.length - 1; i > 0; i--){\n if (isSep(segment.charCodeAt(i))) {\n end = i;\n } else {\n break;\n }\n }\n return segment.slice(0, end);\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// Copyright the Browserify authors. MIT License.\n// Ported from https://github.com/browserify/path-browserify/\n// This module is browser compatible.\n// Alphabet chars.\n// Non-alphabetic chars.\nconst CHAR_DOT = 46; /* . */ \nconst CHAR_FORWARD_SLASH = 47; /* / */\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// Copyright the Browserify authors. MIT License.\n// Ported from https://github.com/browserify/path-browserify/\n// This module is browser compatible.\nfunction isPosixPathSeparator(code) {\n return code === CHAR_FORWARD_SLASH;\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\n/**\n * Return the last portion of a `path`.\n * Trailing directory separators are ignored, and optional suffix is removed.\n *\n * @example Usage\n * ```ts\n * import { basename } from \"@std/path/posix/basename\";\n * import { assertEquals } from \"@std/assert\";\n *\n * assertEquals(basename(\"/home/user/Documents/\"), \"Documents\");\n * assertEquals(basename(\"/home/user/Documents/image.png\"), \"image.png\");\n * assertEquals(basename(\"/home/user/Documents/image.png\", \".png\"), \"image\");\n * assertEquals(basename(new URL(\"file:///home/user/Documents/image.png\")), \"image.png\");\n * assertEquals(basename(new URL(\"file:///home/user/Documents/image.png\"), \".png\"), \"image\");\n * ```\n *\n * @example Working with URLs\n *\n * Note: This function doesn't automatically strip hash and query parts from\n * URLs. If your URL contains a hash or query, remove them before passing the\n * URL to the function. This can be done by passing the URL to `new URL(url)`,\n * and setting the `hash` and `search` properties to empty strings.\n *\n * ```ts\n * import { basename } from \"@std/path/posix/basename\";\n * import { assertEquals } from \"@std/assert\";\n *\n * assertEquals(basename(\"https://deno.land/std/path/mod.ts\"), \"mod.ts\");\n * assertEquals(basename(\"https://deno.land/std/path/mod.ts\", \".ts\"), \"mod\");\n * assertEquals(basename(\"https://deno.land/std/path/mod.ts?a=b\"), \"mod.ts?a=b\");\n * assertEquals(basename(\"https://deno.land/std/path/mod.ts#header\"), \"mod.ts#header\");\n * ```\n *\n * @param path The path to extract the name from.\n * @param suffix The suffix to remove from extracted name.\n * @returns The extracted name.\n */ function basename(path, suffix = \"\") {\n if (path instanceof URL) {\n path = fromFileUrl(path);\n }\n assertArgs$1(path, suffix);\n const lastSegment = lastPathSegment(path, isPosixPathSeparator);\n const strippedSegment = stripTrailingSeparators(lastSegment, isPosixPathSeparator);\n return suffix ? stripSuffix(strippedSegment, suffix) : strippedSegment;\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\n/**\n * The character used to separate entries in the PATH environment variable.\n */ const DELIMITER = \":\";\n/**\n * The character used to separate components of a file path.\n */ const SEPARATOR = \"/\";\n/**\n * A regular expression that matches one or more path separators.\n */ const SEPARATOR_PATTERN = /\\/+/;\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\nfunction assertArg$2(path) {\n assertPath(path);\n if (path.length === 0) return \".\";\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\n/**\n * Return the directory path of a `path`.\n *\n * @example Usage\n * ```ts\n * import { dirname } from \"@std/path/posix/dirname\";\n * import { assertEquals } from \"@std/assert\";\n *\n * assertEquals(dirname(\"/home/user/Documents/\"), \"/home/user\");\n * assertEquals(dirname(\"/home/user/Documents/image.png\"), \"/home/user/Documents\");\n * assertEquals(dirname(\"https://deno.land/std/path/mod.ts\"), \"https://deno.land/std/path\");\n * assertEquals(dirname(new URL(\"file:///home/user/Documents/image.png\")), \"/home/user/Documents\");\n * ```\n *\n * @example Working with URLs\n *\n * ```ts\n * import { dirname } from \"@std/path/posix/dirname\";\n * import { assertEquals } from \"@std/assert\";\n *\n * assertEquals(dirname(\"https://deno.land/std/path/mod.ts\"), \"https://deno.land/std/path\");\n * assertEquals(dirname(\"https://deno.land/std/path/mod.ts?a=b\"), \"https://deno.land/std/path\");\n * assertEquals(dirname(\"https://deno.land/std/path/mod.ts#header\"), \"https://deno.land/std/path\");\n * ```\n *\n * @param path The path to get the directory from.\n * @returns The directory path.\n */ function dirname(path) {\n if (path instanceof URL) {\n path = fromFileUrl(path);\n }\n assertArg$2(path);\n let end = -1;\n let matchedNonSeparator = false;\n for(let i = path.length - 1; i >= 1; --i){\n if (isPosixPathSeparator(path.charCodeAt(i))) {\n if (matchedNonSeparator) {\n end = i;\n break;\n }\n } else {\n matchedNonSeparator = true;\n }\n }\n // No matches. Fallback based on provided path:\n //\n // - leading slashes paths\n // \"/foo\" => \"/\"\n // \"///foo\" => \"/\"\n // - no slash path\n // \"foo\" => \".\"\n if (end === -1) {\n return isPosixPathSeparator(path.charCodeAt(0)) ? \"/\" : \".\";\n }\n return stripTrailingSeparators(path.slice(0, end), isPosixPathSeparator);\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\n/**\n * Return the extension of the `path` with leading period.\n *\n * @example Usage\n * ```ts\n * import { extname } from \"@std/path/posix/extname\";\n * import { assertEquals } from \"@std/assert\";\n *\n * assertEquals(extname(\"/home/user/Documents/file.ts\"), \".ts\");\n * assertEquals(extname(\"/home/user/Documents/\"), \"\");\n * assertEquals(extname(\"/home/user/Documents/image.png\"), \".png\");\n * assertEquals(extname(new URL(\"file:///home/user/Documents/file.ts\")), \".ts\");\n * assertEquals(extname(new URL(\"file:///home/user/Documents/file.ts?a=b\")), \".ts\");\n * assertEquals(extname(new URL(\"file:///home/user/Documents/file.ts#header\")), \".ts\");\n * ```\n *\n * @example Working with URLs\n *\n * Note: This function doesn't automatically strip hash and query parts from\n * URLs. If your URL contains a hash or query, remove them before passing the\n * URL to the function. This can be done by passing the URL to `new URL(url)`,\n * and setting the `hash` and `search` properties to empty strings.\n *\n * ```ts\n * import { extname } from \"@std/path/posix/extname\";\n * import { assertEquals } from \"@std/assert\";\n *\n * assertEquals(extname(\"https://deno.land/std/path/mod.ts\"), \".ts\");\n * assertEquals(extname(\"https://deno.land/std/path/mod.ts?a=b\"), \".ts?a=b\");\n * assertEquals(extname(\"https://deno.land/std/path/mod.ts#header\"), \".ts#header\");\n * ```\n *\n * @param path The path to get the extension from.\n * @returns The extension (ex. for `file.ts` returns `.ts`).\n */ function extname(path) {\n if (path instanceof URL) {\n path = fromFileUrl(path);\n }\n assertPath(path);\n let startDot = -1;\n let startPart = 0;\n let end = -1;\n let matchedSlash = true;\n // Track the state of characters (if any) we see before our first dot and\n // after any path separator we find\n let preDotState = 0;\n for(let i = path.length - 1; i >= 0; --i){\n const code = path.charCodeAt(i);\n if (isPosixPathSeparator(code)) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n startPart = i + 1;\n break;\n }\n continue;\n }\n if (end === -1) {\n // We saw the first non-path separator, mark this as the end of our\n // extension\n matchedSlash = false;\n end = i + 1;\n }\n if (code === CHAR_DOT) {\n // If this is our first dot, mark it as the start of our extension\n if (startDot === -1) startDot = i;\n else if (preDotState !== 1) preDotState = 1;\n } else if (startDot !== -1) {\n // We saw a non-dot and non-path separator before our dot, so we should\n // have a good chance at having a non-empty extension\n preDotState = -1;\n }\n }\n if (startDot === -1 || end === -1 || // We saw a non-dot character immediately before the dot\n preDotState === 0 || // The (right-most) trimmed path component is exactly '..'\n preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {\n return \"\";\n }\n return path.slice(startDot, end);\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\nfunction _format(sep, pathObject) {\n const dir = pathObject.dir || pathObject.root;\n const base = pathObject.base || (pathObject.name ?? \"\") + (pathObject.ext ?? \"\");\n if (!dir) return base;\n if (base === sep) return dir;\n if (dir === pathObject.root) return dir + base;\n return dir + sep + base;\n}\nfunction assertArg$1(pathObject) {\n if (pathObject === null || typeof pathObject !== \"object\") {\n throw new TypeError(`The \"pathObject\" argument must be of type Object, received type \"${typeof pathObject}\"`);\n }\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\n/**\n * Generate a path from `ParsedPath` object.\n *\n * @example Usage\n * ```ts\n * import { format } from \"@std/path/posix/format\";\n * import { assertEquals } from \"@std/assert\";\n *\n * const path = format({\n * root: \"/\",\n * dir: \"/path/dir\",\n * base: \"file.txt\",\n * ext: \".txt\",\n * name: \"file\"\n * });\n * assertEquals(path, \"/path/dir/file.txt\");\n * ```\n *\n * @param pathObject The path object to format.\n * @returns The formatted path.\n */ function format(pathObject) {\n assertArg$1(pathObject);\n return _format(\"/\", pathObject);\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\n/**\n * Verifies whether provided path is absolute.\n *\n * @example Usage\n * ```ts\n * import { isAbsolute } from \"@std/path/posix/is-absolute\";\n * import { assert, assertFalse } from \"@std/assert\";\n *\n * assert(isAbsolute(\"/home/user/Documents/\"));\n * assertFalse(isAbsolute(\"home/user/Documents/\"));\n * ```\n *\n * @param path The path to verify.\n * @returns Whether the path is absolute.\n */ function isAbsolute(path) {\n assertPath(path);\n return path.length > 0 && isPosixPathSeparator(path.charCodeAt(0));\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\nfunction assertArg(path) {\n assertPath(path);\n if (path.length === 0) return \".\";\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// Copyright the Browserify authors. MIT License.\n// Ported from https://github.com/browserify/path-browserify/\n// This module is browser compatible.\n// Resolves . and .. elements in a path with directory names\nfunction normalizeString(path, allowAboveRoot, separator, isPathSeparator) {\n let res = \"\";\n let lastSegmentLength = 0;\n let lastSlash = -1;\n let dots = 0;\n let code;\n for(let i = 0; i <= path.length; ++i){\n if (i < path.length) code = path.charCodeAt(i);\n else if (isPathSeparator(code)) break;\n else code = CHAR_FORWARD_SLASH;\n if (isPathSeparator(code)) {\n if (lastSlash === i - 1 || dots === 1) ; else if (lastSlash !== i - 1 && dots === 2) {\n if (res.length < 2 || lastSegmentLength !== 2 || res.charCodeAt(res.length - 1) !== CHAR_DOT || res.charCodeAt(res.length - 2) !== CHAR_DOT) {\n if (res.length > 2) {\n const lastSlashIndex = res.lastIndexOf(separator);\n if (lastSlashIndex === -1) {\n res = \"\";\n lastSegmentLength = 0;\n } else {\n res = res.slice(0, lastSlashIndex);\n lastSegmentLength = res.length - 1 - res.lastIndexOf(separator);\n }\n lastSlash = i;\n dots = 0;\n continue;\n } else if (res.length === 2 || res.length === 1) {\n res = \"\";\n lastSegmentLength = 0;\n lastSlash = i;\n dots = 0;\n continue;\n }\n }\n if (allowAboveRoot) {\n if (res.length > 0) res += `${separator}..`;\n else res = \"..\";\n lastSegmentLength = 2;\n }\n } else {\n if (res.length > 0) res += separator + path.slice(lastSlash + 1, i);\n else res = path.slice(lastSlash + 1, i);\n lastSegmentLength = i - lastSlash - 1;\n }\n lastSlash = i;\n dots = 0;\n } else if (code === CHAR_DOT && dots !== -1) {\n ++dots;\n } else {\n dots = -1;\n }\n }\n return res;\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\n/**\n * Normalize the `path`, resolving `'..'` and `'.'` segments.\n * Note that resolving these segments does not necessarily mean that all will be eliminated.\n * A `'..'` at the top-level will be preserved, and an empty path is canonically `'.'`.\n *\n * @example Usage\n * ```ts\n * import { normalize } from \"@std/path/posix/normalize\";\n * import { assertEquals } from \"@std/assert\";\n *\n * assertEquals(normalize(\"/foo/bar//baz/asdf/quux/..\"), \"/foo/bar/baz/asdf\");\n * assertEquals(normalize(new URL(\"file:///foo/bar//baz/asdf/quux/..\")), \"/foo/bar/baz/asdf/\");\n * ```\n *\n * @example Working with URLs\n *\n * Note: This function will remove the double slashes from a URL's scheme.\n * Hence, do not pass a full URL to this function. Instead, pass the pathname of\n * the URL.\n *\n * ```ts\n * import { normalize } from \"@std/path/posix/normalize\";\n * import { assertEquals } from \"@std/assert\";\n *\n * const url = new URL(\"https://deno.land\");\n * url.pathname = normalize(\"//std//assert//.//mod.ts\");\n * assertEquals(url.href, \"https://deno.land/std/assert/mod.ts\");\n *\n * url.pathname = normalize(\"std/assert/../async/retry.ts\");\n * assertEquals(url.href, \"https://deno.land/std/async/retry.ts\");\n * ```\n *\n * @param path The path to normalize.\n * @returns The normalized path.\n */ function normalize(path) {\n if (path instanceof URL) {\n path = fromFileUrl(path);\n }\n assertArg(path);\n const isAbsolute = isPosixPathSeparator(path.charCodeAt(0));\n const trailingSeparator = isPosixPathSeparator(path.charCodeAt(path.length - 1));\n // Normalize the path\n path = normalizeString(path, !isAbsolute, \"/\", isPosixPathSeparator);\n if (path.length === 0 && !isAbsolute) path = \".\";\n if (path.length > 0 && trailingSeparator) path += \"/\";\n if (isAbsolute) return `/${path}`;\n return path;\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\n/**\n * Join all given a sequence of `paths`,then normalizes the resulting path.\n *\n * @example Usage\n * ```ts\n * import { join } from \"@std/path/posix/join\";\n * import { assertEquals } from \"@std/assert\";\n *\n * assertEquals(join(\"/foo\", \"bar\", \"baz/asdf\", \"quux\", \"..\"), \"/foo/bar/baz/asdf\");\n * assertEquals(join(new URL(\"file:///foo\"), \"bar\", \"baz/asdf\", \"quux\", \"..\"), \"/foo/bar/baz/asdf\");\n * ```\n *\n * @example Working with URLs\n * ```ts\n * import { join } from \"@std/path/posix/join\";\n * import { assertEquals } from \"@std/assert\";\n *\n * const url = new URL(\"https://deno.land\");\n * url.pathname = join(\"std\", \"path\", \"mod.ts\");\n * assertEquals(url.href, \"https://deno.land/std/path/mod.ts\");\n *\n * url.pathname = join(\"//std\", \"path/\", \"/mod.ts\");\n * assertEquals(url.href, \"https://deno.land/std/path/mod.ts\");\n * ```\n *\n * @param path The path to join. This can be string or file URL.\n * @param paths The paths to join.\n * @returns The joined path.\n */ function join(path, ...paths) {\n if (path === undefined) return \".\";\n if (path instanceof URL) {\n path = fromFileUrl(path);\n }\n paths = path ? [\n path,\n ...paths\n ] : paths;\n paths.forEach((path)=>assertPath(path));\n const joined = paths.filter((path)=>path.length > 0).join(\"/\");\n return joined === \"\" ? \".\" : normalize(joined);\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\n/**\n * Return a `ParsedPath` object of the `path`.\n *\n * @example Usage\n * ```ts\n * import { parse } from \"@std/path/posix/parse\";\n * import { assertEquals } from \"@std/assert\";\n *\n * const path = parse(\"/home/user/file.txt\");\n * assertEquals(path, {\n * root: \"/\",\n * dir: \"/home/user\",\n * base: \"file.txt\",\n * ext: \".txt\",\n * name: \"file\"\n * });\n * ```\n *\n * @param path The path to parse.\n * @returns The parsed path object.\n */ function parse(path) {\n assertPath(path);\n const ret = {\n root: \"\",\n dir: \"\",\n base: \"\",\n ext: \"\",\n name: \"\"\n };\n if (path.length === 0) return ret;\n const isAbsolute = isPosixPathSeparator(path.charCodeAt(0));\n let start;\n if (isAbsolute) {\n ret.root = \"/\";\n start = 1;\n } else {\n start = 0;\n }\n let startDot = -1;\n let startPart = 0;\n let end = -1;\n let matchedSlash = true;\n let i = path.length - 1;\n // Track the state of characters (if any) we see before our first dot and\n // after any path separator we find\n let preDotState = 0;\n // Get non-dir info\n for(; i >= start; --i){\n const code = path.charCodeAt(i);\n if (isPosixPathSeparator(code)) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n startPart = i + 1;\n break;\n }\n continue;\n }\n if (end === -1) {\n // We saw the first non-path separator, mark this as the end of our\n // extension\n matchedSlash = false;\n end = i + 1;\n }\n if (code === CHAR_DOT) {\n // If this is our first dot, mark it as the start of our extension\n if (startDot === -1) startDot = i;\n else if (preDotState !== 1) preDotState = 1;\n } else if (startDot !== -1) {\n // We saw a non-dot and non-path separator before our dot, so we should\n // have a good chance at having a non-empty extension\n preDotState = -1;\n }\n }\n if (startDot === -1 || end === -1 || // We saw a non-dot character immediately before the dot\n preDotState === 0 || // The (right-most) trimmed path component is exactly '..'\n preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {\n if (end !== -1) {\n if (startPart === 0 && isAbsolute) {\n ret.base = ret.name = path.slice(1, end);\n } else {\n ret.base = ret.name = path.slice(startPart, end);\n }\n }\n // Fallback to '/' in case there is no basename\n ret.base = ret.base || \"/\";\n } else {\n if (startPart === 0 && isAbsolute) {\n ret.name = path.slice(1, startDot);\n ret.base = path.slice(1, end);\n } else {\n ret.name = path.slice(startPart, startDot);\n ret.base = path.slice(startPart, end);\n }\n ret.ext = path.slice(startDot, end);\n }\n if (startPart > 0) {\n ret.dir = stripTrailingSeparators(path.slice(0, startPart - 1), isPosixPathSeparator);\n } else if (isAbsolute) ret.dir = \"/\";\n return ret;\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\n/**\n * Resolves path segments into a `path`.\n *\n * @example Usage\n * ```ts\n * import { resolve } from \"@std/path/posix/resolve\";\n * import { assertEquals } from \"@std/assert\";\n *\n * const path = resolve(\"/foo\", \"bar\", \"baz/asdf\", \"quux\", \"..\");\n * assertEquals(path, \"/foo/bar/baz/asdf\");\n * ```\n *\n * @param pathSegments The path segments to resolve.\n * @returns The resolved path.\n */ function resolve(...pathSegments) {\n let resolvedPath = \"\";\n let resolvedAbsolute = false;\n for(let i = pathSegments.length - 1; i >= -1 && !resolvedAbsolute; i--){\n let path;\n if (i >= 0) path = pathSegments[i];\n else {\n // deno-lint-ignore no-explicit-any\n const { Deno } = globalThis;\n if (typeof Deno?.cwd !== \"function\") {\n throw new TypeError(\"Resolved a relative path without a current working directory (CWD)\");\n }\n path = Deno.cwd();\n }\n assertPath(path);\n // Skip empty entries\n if (path.length === 0) {\n continue;\n }\n resolvedPath = `${path}/${resolvedPath}`;\n resolvedAbsolute = isPosixPathSeparator(path.charCodeAt(0));\n }\n // At this point the path should be resolved to a full absolute path, but\n // handle relative paths to be safe (might happen when Deno.cwd() fails)\n // Normalize the path\n resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute, \"/\", isPosixPathSeparator);\n if (resolvedAbsolute) {\n if (resolvedPath.length > 0) return `/${resolvedPath}`;\n else return \"/\";\n } else if (resolvedPath.length > 0) return resolvedPath;\n else return \".\";\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\nfunction assertArgs(from, to) {\n assertPath(from);\n assertPath(to);\n if (from === to) return \"\";\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\n/**\n * Return the relative path from `from` to `to` based on current working directory.\n *\n * If `from` and `to` are the same, return an empty string.\n *\n * @example Usage\n * ```ts\n * import { relative } from \"@std/path/posix/relative\";\n * import { assertEquals } from \"@std/assert\";\n *\n * const path = relative(\"/data/orandea/test/aaa\", \"/data/orandea/impl/bbb\");\n * assertEquals(path, \"../../impl/bbb\");\n * ```\n *\n * @param from The path to start from.\n * @param to The path to reach.\n * @returns The relative path.\n */ function relative(from, to) {\n assertArgs(from, to);\n from = resolve(from);\n to = resolve(to);\n if (from === to) return \"\";\n // Trim any leading backslashes\n let fromStart = 1;\n const fromEnd = from.length;\n for(; fromStart < fromEnd; ++fromStart){\n if (!isPosixPathSeparator(from.charCodeAt(fromStart))) break;\n }\n const fromLen = fromEnd - fromStart;\n // Trim any leading backslashes\n let toStart = 1;\n const toEnd = to.length;\n for(; toStart < toEnd; ++toStart){\n if (!isPosixPathSeparator(to.charCodeAt(toStart))) break;\n }\n const toLen = toEnd - toStart;\n // Compare paths to find the longest common path from root\n const length = fromLen < toLen ? fromLen : toLen;\n let lastCommonSep = -1;\n let i = 0;\n for(; i <= length; ++i){\n if (i === length) {\n if (toLen > length) {\n if (isPosixPathSeparator(to.charCodeAt(toStart + i))) {\n // We get here if `from` is the exact base path for `to`.\n // For example: from='/foo/bar'; to='/foo/bar/baz'\n return to.slice(toStart + i + 1);\n } else if (i === 0) {\n // We get here if `from` is the root\n // For example: from='/'; to='/foo'\n return to.slice(toStart + i);\n }\n } else if (fromLen > length) {\n if (isPosixPathSeparator(from.charCodeAt(fromStart + i))) {\n // We get here if `to` is the exact base path for `from`.\n // For example: from='/foo/bar/baz'; to='/foo/bar'\n lastCommonSep = i;\n } else if (i === 0) {\n // We get here if `to` is the root.\n // For example: from='/foo'; to='/'\n lastCommonSep = 0;\n }\n }\n break;\n }\n const fromCode = from.charCodeAt(fromStart + i);\n const toCode = to.charCodeAt(toStart + i);\n if (fromCode !== toCode) break;\n else if (isPosixPathSeparator(fromCode)) lastCommonSep = i;\n }\n let out = \"\";\n // Generate the relative path based on the path difference between `to`\n // and `from`\n for(i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i){\n if (i === fromEnd || isPosixPathSeparator(from.charCodeAt(i))) {\n if (out.length === 0) out += \"..\";\n else out += \"/..\";\n }\n }\n // Lastly, append the rest of the destination (`to`) path that comes after\n // the common path parts\n if (out.length > 0) return out + to.slice(toStart + lastCommonSep);\n else {\n toStart += lastCommonSep;\n if (isPosixPathSeparator(to.charCodeAt(toStart))) ++toStart;\n return to.slice(toStart);\n }\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\nconst WHITESPACE_ENCODINGS = {\n \"\\u0009\": \"%09\",\n \"\\u000A\": \"%0A\",\n \"\\u000B\": \"%0B\",\n \"\\u000C\": \"%0C\",\n \"\\u000D\": \"%0D\",\n \"\\u0020\": \"%20\"\n};\nfunction encodeWhitespace(string) {\n return string.replaceAll(/[\\s]/g, (c)=>{\n return WHITESPACE_ENCODINGS[c] ?? c;\n });\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\n/**\n * Converts a path string to a file URL.\n *\n * @example Usage\n * ```ts\n * import { toFileUrl } from \"@std/path/posix/to-file-url\";\n * import { assertEquals } from \"@std/assert\";\n *\n * assertEquals(toFileUrl(\"/home/foo\"), new URL(\"file:///home/foo\"));\n * assertEquals(toFileUrl(\"/home/foo bar\"), new URL(\"file:///home/foo%20bar\"));\n * ```\n *\n * @param path The path to convert.\n * @returns The file URL.\n */ function toFileUrl(path) {\n if (!isAbsolute(path)) {\n throw new TypeError(`Path must be absolute: received \"${path}\"`);\n }\n const url = new URL(\"file:///\");\n url.pathname = encodeWhitespace(path.replace(/%/g, \"%25\").replace(/\\\\/g, \"%5C\"));\n return url;\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\n/**\n * Converts a path to a namespaced path. This function returns the path as is on posix.\n *\n * @example Usage\n * ```ts\n * import { toNamespacedPath } from \"@std/path/posix/to-namespaced-path\";\n * import { assertEquals } from \"@std/assert\";\n *\n * assertEquals(toNamespacedPath(\"/home/foo\"), \"/home/foo\");\n * ```\n *\n * @param path The path.\n * @returns The namespaced path.\n */ function toNamespacedPath(path) {\n // Non-op on posix systems\n return path;\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\nfunction common$1(paths, sep) {\n const [first = \"\", ...remaining] = paths;\n const parts = first.split(sep);\n let endOfPrefix = parts.length;\n let append = \"\";\n for (const path of remaining){\n const compare = path.split(sep);\n if (compare.length <= endOfPrefix) {\n endOfPrefix = compare.length;\n append = \"\";\n }\n for(let i = 0; i < endOfPrefix; i++){\n if (compare[i] !== parts[i]) {\n endOfPrefix = i;\n append = i === 0 ? \"\" : sep;\n break;\n }\n }\n }\n return parts.slice(0, endOfPrefix).join(sep) + append;\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\n/** Determines the common path from a set of paths for POSIX systems.\n *\n * @example Usage\n * ```ts\n * import { common } from \"@std/path/posix/common\";\n * import { assertEquals } from \"@std/assert\";\n *\n * const path = common([\n * \"./deno/std/path/mod.ts\",\n * \"./deno/std/fs/mod.ts\",\n * ]);\n * assertEquals(path, \"./deno/std/\");\n * ```\n *\n * @param paths The paths to compare.\n * @returns The common path.\n */ function common(paths) {\n return common$1(paths, SEPARATOR);\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\n/**\n * Options for {@linkcode globToRegExp}, {@linkcode joinGlobs},\n * {@linkcode normalizeGlob} and {@linkcode expandGlob}.\n */ const REG_EXP_ESCAPE_CHARS = [\n \"!\",\n \"$\",\n \"(\",\n \")\",\n \"*\",\n \"+\",\n \".\",\n \"=\",\n \"?\",\n \"[\",\n \"\\\\\",\n \"^\",\n \"{\",\n \"|\"\n];\nconst RANGE_ESCAPE_CHARS = [\n \"-\",\n \"\\\\\",\n \"]\"\n];\nfunction _globToRegExp(c, glob, { extended = true, globstar: globstarOption = true, // os = osType,\ncaseInsensitive = false } = {}) {\n if (glob === \"\") {\n return /(?!)/;\n }\n // Remove trailing separators.\n let newLength = glob.length;\n for(; newLength > 1 && c.seps.includes(glob[newLength - 1]); newLength--);\n glob = glob.slice(0, newLength);\n let regExpString = \"\";\n // Terminates correctly. Trust that `j` is incremented every iteration.\n for(let j = 0; j < glob.length;){\n let segment = \"\";\n const groupStack = [];\n let inRange = false;\n let inEscape = false;\n let endsWithSep = false;\n let i = j;\n // Terminates with `i` at the non-inclusive end of the current segment.\n for(; i < glob.length && !(c.seps.includes(glob[i]) && groupStack.length === 0); i++){\n if (inEscape) {\n inEscape = false;\n const escapeChars = inRange ? RANGE_ESCAPE_CHARS : REG_EXP_ESCAPE_CHARS;\n segment += escapeChars.includes(glob[i]) ? `\\\\${glob[i]}` : glob[i];\n continue;\n }\n if (glob[i] === c.escapePrefix) {\n inEscape = true;\n continue;\n }\n if (glob[i] === \"[\") {\n if (!inRange) {\n inRange = true;\n segment += \"[\";\n if (glob[i + 1] === \"!\") {\n i++;\n segment += \"^\";\n } else if (glob[i + 1] === \"^\") {\n i++;\n segment += \"\\\\^\";\n }\n continue;\n } else if (glob[i + 1] === \":\") {\n let k = i + 1;\n let value = \"\";\n while(glob[k + 1] !== undefined && glob[k + 1] !== \":\"){\n value += glob[k + 1];\n k++;\n }\n if (glob[k + 1] === \":\" && glob[k + 2] === \"]\") {\n i = k + 2;\n if (value === \"alnum\") segment += \"\\\\dA-Za-z\";\n else if (value === \"alpha\") segment += \"A-Za-z\";\n else if (value === \"ascii\") segment += \"\\x00-\\x7F\";\n else if (value === \"blank\") segment += \"\\t \";\n else if (value === \"cntrl\") segment += \"\\x00-\\x1F\\x7F\";\n else if (value === \"digit\") segment += \"\\\\d\";\n else if (value === \"graph\") segment += \"\\x21-\\x7E\";\n else if (value === \"lower\") segment += \"a-z\";\n else if (value === \"print\") segment += \"\\x20-\\x7E\";\n else if (value === \"punct\") {\n segment += \"!\\\"#$%&'()*+,\\\\-./:;<=>?@[\\\\\\\\\\\\]^_‘{|}~\";\n } else if (value === \"space\") segment += \"\\\\s\\v\";\n else if (value === \"upper\") segment += \"A-Z\";\n else if (value === \"word\") segment += \"\\\\w\";\n else if (value === \"xdigit\") segment += \"\\\\dA-Fa-f\";\n continue;\n }\n }\n }\n if (glob[i] === \"]\" && inRange) {\n inRange = false;\n segment += \"]\";\n continue;\n }\n if (inRange) {\n segment += glob[i];\n continue;\n }\n if (glob[i] === \")\" && groupStack.length > 0 && groupStack[groupStack.length - 1] !== \"BRACE\") {\n segment += \")\";\n const type = groupStack.pop();\n if (type === \"!\") {\n segment += c.wildcard;\n } else if (type !== \"@\") {\n segment += type;\n }\n continue;\n }\n if (glob[i] === \"|\" && groupStack.length > 0 && groupStack[groupStack.length - 1] !== \"BRACE\") {\n segment += \"|\";\n continue;\n }\n if (glob[i] === \"+\" && extended && glob[i + 1] === \"(\") {\n i++;\n groupStack.push(\"+\");\n segment += \"(?:\";\n continue;\n }\n if (glob[i] === \"@\" && extended && glob[i + 1] === \"(\") {\n i++;\n groupStack.push(\"@\");\n segment += \"(?:\";\n continue;\n }\n if (glob[i] === \"?\") {\n if (extended && glob[i + 1] === \"(\") {\n i++;\n groupStack.push(\"?\");\n segment += \"(?:\";\n } else {\n segment += \".\";\n }\n continue;\n }\n if (glob[i] === \"!\" && extended && glob[i + 1] === \"(\") {\n i++;\n groupStack.push(\"!\");\n segment += \"(?!\";\n continue;\n }\n if (glob[i] === \"{\") {\n groupStack.push(\"BRACE\");\n segment += \"(?:\";\n continue;\n }\n if (glob[i] === \"}\" && groupStack[groupStack.length - 1] === \"BRACE\") {\n groupStack.pop();\n segment += \")\";\n continue;\n }\n if (glob[i] === \",\" && groupStack[groupStack.length - 1] === \"BRACE\") {\n segment += \"|\";\n continue;\n }\n if (glob[i] === \"*\") {\n if (extended && glob[i + 1] === \"(\") {\n i++;\n groupStack.push(\"*\");\n segment += \"(?:\";\n } else {\n const prevChar = glob[i - 1];\n let numStars = 1;\n while(glob[i + 1] === \"*\"){\n i++;\n numStars++;\n }\n const nextChar = glob[i + 1];\n if (globstarOption && numStars === 2 && [\n ...c.seps,\n undefined\n ].includes(prevChar) && [\n ...c.seps,\n undefined\n ].includes(nextChar)) {\n segment += c.globstar;\n endsWithSep = true;\n } else {\n segment += c.wildcard;\n }\n }\n continue;\n }\n segment += REG_EXP_ESCAPE_CHARS.includes(glob[i]) ? `\\\\${glob[i]}` : glob[i];\n }\n // Check for unclosed groups or a dangling backslash.\n if (groupStack.length > 0 || inRange || inEscape) {\n // Parse failure. Take all characters from this segment literally.\n segment = \"\";\n for (const c of glob.slice(j, i)){\n segment += REG_EXP_ESCAPE_CHARS.includes(c) ? `\\\\${c}` : c;\n endsWithSep = false;\n }\n }\n regExpString += segment;\n if (!endsWithSep) {\n regExpString += i < glob.length ? c.sep : c.sepMaybe;\n endsWithSep = true;\n }\n // Terminates with `i` at the start of the next segment.\n while(c.seps.includes(glob[i]))i++;\n j = i;\n }\n regExpString = `^${regExpString}$`;\n return new RegExp(regExpString, caseInsensitive ? \"i\" : \"\");\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\nconst constants = {\n sep: \"/+\",\n sepMaybe: \"/*\",\n seps: [\n \"/\"\n ],\n globstar: \"(?:[^/]*(?:/|$)+)*\",\n wildcard: \"[^/]*\",\n escapePrefix: \"\\\\\"\n};\n/** Convert a glob string to a regular expression.\n *\n * Tries to match bash glob expansion as closely as possible.\n *\n * Basic glob syntax:\n * - `*` - Matches everything without leaving the path segment.\n * - `?` - Matches any single character.\n * - `{foo,bar}` - Matches `foo` or `bar`.\n * - `[abcd]` - Matches `a`, `b`, `c` or `d`.\n * - `[a-d]` - Matches `a`, `b`, `c` or `d`.\n * - `[!abcd]` - Matches any single character besides `a`, `b`, `c` or `d`.\n * - `[[:<class>:]]` - Matches any character belonging to `<class>`.\n * - `[[:alnum:]]` - Matches any digit or letter.\n * - `[[:digit:]abc]` - Matches any digit, `a`, `b` or `c`.\n * - See https://facelessuser.github.io/wcmatch/glob/#posix-character-classes\n * for a complete list of supported character classes.\n * - `\\` - Escapes the next character for an `os` other than `\"windows\"`.\n * - \\` - Escapes the next character for `os` set to `\"windows\"`.\n * - `/` - Path separator.\n * - `\\` - Additional path separator only for `os` set to `\"windows\"`.\n *\n * Extended syntax:\n * - Requires `{ extended: true }`.\n * - `?(foo|bar)` - Matches 0 or 1 instance of `{foo,bar}`.\n * - `@(foo|bar)` - Matches 1 instance of `{foo,bar}`. They behave the same.\n * - `*(foo|bar)` - Matches _n_ instances of `{foo,bar}`.\n * - `+(foo|bar)` - Matches _n > 0_ instances of `{foo,bar}`.\n * - `!(foo|bar)` - Matches anything other than `{foo,bar}`.\n * - See https://www.linuxjournal.com/content/bash-extended-globbing.\n *\n * Globstar syntax:\n * - Requires `{ globstar: true }`.\n * - `**` - Matches any number of any path segments.\n * - Must comprise its entire path segment in the provided glob.\n * - See https://www.linuxjournal.com/content/globstar-new-bash-globbing-option.\n *\n * Note the following properties:\n * - The generated `RegExp` is anchored at both start and end.\n * - Repeating and trailing separators are tolerated. Trailing separators in the\n * provided glob have no meaning and are discarded.\n * - Absolute globs will only match absolute paths, etc.\n * - Empty globs will match nothing.\n * - Any special glob syntax must be contained to one path segment. For example,\n * `?(foo|bar/baz)` is invalid. The separator will take precedence and the\n * first segment ends with an unclosed group.\n * - If a path segment ends with unclosed groups or a dangling escape prefix, a\n * parse error has occurred. Every character for that segment is taken\n * literally in this event.\n *\n * Limitations:\n * - A negative group like `!(foo|bar)` will wrongly be converted to a negative\n * look-ahead followed by a wildcard. This means that `!(foo).js` will wrongly\n * fail to match `foobar.js`, even though `foobar` is not `foo`. Effectively,\n * `!(foo|bar)` is treated like `!(@(foo|bar)*)`. This will work correctly if\n * the group occurs not nested at the end of the segment.\n *\n * @example Usage\n * ```ts\n * import { globToRegExp } from \"@std/path/posix/glob-to-regexp\";\n * import { assertEquals } from \"@std/assert\";\n *\n * assertEquals(globToRegExp(\"*.js\"), /^[^/]*\\.js\\/*$/);\n * ```\n *\n * @param glob Glob string to convert.\n * @param options Conversion options.\n * @returns The regular expression equivalent to the glob.\n */ function globToRegExp(glob, options = {}) {\n return _globToRegExp(constants, glob, options);\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\n/**\n * Test whether the given string is a glob.\n *\n * @example Usage\n * ```ts\n * import { isGlob } from \"@std/path/is-glob\";\n * import { assert } from \"@std/assert\";\n *\n * assert(!isGlob(\"foo/bar/../baz\"));\n * assert(isGlob(\"foo/*ar/../baz\"));\n * ```\n *\n * @param str String to test.\n * @returns `true` if the given string is a glob, otherwise `false`\n */ function isGlob(str) {\n const chars = {\n \"{\": \"}\",\n \"(\": \")\",\n \"[\": \"]\"\n };\n const regex = /\\\\(.)|(^!|\\*|\\?|[\\].+)]\\?|\\[[^[\\\\\\]]+\\]|\\{[^{\\\\}]+\\}|\\(\\?[:!=][^\\\\)]+\\)|\\([^(|]+\\|[^\\\\)]+\\)|@\\([^)]+\\))/;\n if (str === \"\") {\n return false;\n }\n let match;\n while(match = regex.exec(str)){\n if (match[2]) return true;\n let idx = match.index + match[0].length;\n // if an open bracket/brace/paren is escaped,\n // set the index to the next closing character\n const open = match[1];\n const close = open ? chars[open] : null;\n if (open && close) {\n const n = str.indexOf(close, idx);\n if (n !== -1) {\n idx = n + 1;\n }\n }\n str = str.slice(idx);\n }\n return false;\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\n/**\n * Like normalize(), but doesn't collapse \"**\\/..\" when `globstar` is true.\n *\n * @example Usage\n * ```ts\n * import { normalizeGlob } from \"@std/path/posix/normalize-glob\";\n * import { assertEquals } from \"@std/assert\";\n *\n * const path = normalizeGlob(\"foo/bar/../*\", { globstar: true });\n * assertEquals(path, \"foo/*\");\n * ```\n *\n * @param glob The glob to normalize.\n * @param options The options to use.\n * @returns The normalized path.\n */ function normalizeGlob(glob, options = {}) {\n const { globstar = false } = options;\n if (glob.match(/\\0/g)) {\n throw new Error(`Glob contains invalid characters: \"${glob}\"`);\n }\n if (!globstar) {\n return normalize(glob);\n }\n const s = SEPARATOR_PATTERN.source;\n const badParentPattern = new RegExp(`(?<=(${s}|^)\\\\*\\\\*${s})\\\\.\\\\.(?=${s}|$)`, \"g\");\n return normalize(glob.replace(badParentPattern, \"\\0\")).replace(/\\0/g, \"..\");\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\n/**\n * Like join(), but doesn't collapse \"**\\/..\" when `globstar` is true.\n *\n * @example Usage\n * ```ts\n * import { joinGlobs } from \"@std/path/posix/join-globs\";\n * import { assertEquals } from \"@std/assert\";\n *\n * const path = joinGlobs([\"foo\", \"bar\", \"**\"], { globstar: true });\n * assertEquals(path, \"foo/bar/**\");\n * ```\n *\n * @param globs The globs to join.\n * @param options The options to use.\n * @returns The joined path.\n */ function joinGlobs(globs, options = {}) {\n const { globstar = false } = options;\n if (!globstar || globs.length === 0) {\n return join(...globs);\n }\n let joined;\n for (const glob of globs){\n const path = glob;\n if (path.length > 0) {\n if (!joined) joined = path;\n else joined += `${SEPARATOR}${path}`;\n }\n }\n if (!joined) return \".\";\n return normalizeGlob(joined, {\n globstar\n });\n}\n\nexport { DELIMITER, SEPARATOR, SEPARATOR_PATTERN, basename, common, dirname, extname, format, fromFileUrl, globToRegExp, isAbsolute, isGlob, join, joinGlobs, normalize, normalizeGlob, parse, relative, resolve, toFileUrl, toNamespacedPath };\n","// @ts-nocheck\n// Copyright 2018-2025 the Deno authors. MIT license.\n// Copyright the Browserify authors. MIT License.\nfunction assertPath(path) {\n if (typeof path !== \"string\") {\n throw new TypeError(`Path must be a string, received \"${JSON.stringify(path)}\"`);\n }\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\nfunction stripSuffix(name, suffix) {\n if (suffix.length >= name.length) {\n return name;\n }\n const lenDiff = name.length - suffix.length;\n for(let i = suffix.length - 1; i >= 0; --i){\n if (name.charCodeAt(lenDiff + i) !== suffix.charCodeAt(i)) {\n return name;\n }\n }\n return name.slice(0, -suffix.length);\n}\nfunction lastPathSegment(path, isSep, start = 0) {\n let matchedNonSeparator = false;\n let end = path.length;\n for(let i = path.length - 1; i >= start; --i){\n if (isSep(path.charCodeAt(i))) {\n if (matchedNonSeparator) {\n start = i + 1;\n break;\n }\n } else if (!matchedNonSeparator) {\n matchedNonSeparator = true;\n end = i + 1;\n }\n }\n return path.slice(start, end);\n}\nfunction assertArgs$1(path, suffix) {\n assertPath(path);\n if (path.length === 0) return path;\n if (typeof suffix !== \"string\") {\n throw new TypeError(`Suffix must be a string, received \"${JSON.stringify(suffix)}\"`);\n }\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// Copyright the Browserify authors. MIT License.\n// Ported from https://github.com/browserify/path-browserify/\n// This module is browser compatible.\n// Alphabet chars.\nconst CHAR_UPPERCASE_A = 65; /* A */ \nconst CHAR_LOWERCASE_A = 97; /* a */ \nconst CHAR_UPPERCASE_Z = 90; /* Z */ \nconst CHAR_LOWERCASE_Z = 122; /* z */ \n// Non-alphabetic chars.\nconst CHAR_DOT = 46; /* . */ \nconst CHAR_FORWARD_SLASH = 47; /* / */ \nconst CHAR_BACKWARD_SLASH = 92; /* \\ */ \nconst CHAR_COLON = 58; /* : */ \nconst CHAR_QUESTION_MARK = 63; /* ? */\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// Copyright the Browserify authors. MIT License.\n// Ported from https://github.com/browserify/path-browserify/\n// This module is browser compatible.\nfunction stripTrailingSeparators(segment, isSep) {\n if (segment.length <= 1) {\n return segment;\n }\n let end = segment.length;\n for(let i = segment.length - 1; i > 0; i--){\n if (isSep(segment.charCodeAt(i))) {\n end = i;\n } else {\n break;\n }\n }\n return segment.slice(0, end);\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// Copyright the Browserify authors. MIT License.\n// Ported from https://github.com/browserify/path-browserify/\n// This module is browser compatible.\nfunction isPosixPathSeparator(code) {\n return code === CHAR_FORWARD_SLASH;\n}\nfunction isPathSeparator(code) {\n return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;\n}\nfunction isWindowsDeviceRoot(code) {\n return code >= CHAR_LOWERCASE_A && code <= CHAR_LOWERCASE_Z || code >= CHAR_UPPERCASE_A && code <= CHAR_UPPERCASE_Z;\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\nfunction assertArg$3(url) {\n url = url instanceof URL ? url : new URL(url);\n if (url.protocol !== \"file:\") {\n throw new TypeError(`URL must be a file URL: received \"${url.protocol}\"`);\n }\n return url;\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\n/**\n * Converts a file URL to a path string.\n *\n * @example Usage\n * ```ts\n * import { fromFileUrl } from \"@std/path/windows/from-file-url\";\n * import { assertEquals } from \"@std/assert\";\n *\n * assertEquals(fromFileUrl(\"file:///home/foo\"), \"\\\\home\\\\foo\");\n * assertEquals(fromFileUrl(\"file:///C:/Users/foo\"), \"C:\\\\Users\\\\foo\");\n * assertEquals(fromFileUrl(\"file://localhost/home/foo\"), \"\\\\home\\\\foo\");\n * ```\n *\n * @param url The file URL to convert.\n * @returns The path string.\n */ function fromFileUrl(url) {\n url = assertArg$3(url);\n let path = decodeURIComponent(url.pathname.replace(/\\//g, \"\\\\\").replace(/%(?![0-9A-Fa-f]{2})/g, \"%25\")).replace(/^\\\\*([A-Za-z]:)(\\\\|$)/, \"$1\\\\\");\n if (url.hostname !== \"\") {\n // Note: The `URL` implementation guarantees that the drive letter and\n // hostname are mutually exclusive. Otherwise it would not have been valid\n // to append the hostname and path like this.\n path = `\\\\\\\\${url.hostname}${path}`;\n }\n return path;\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\n/**\n * Return the last portion of a `path`.\n * Trailing directory separators are ignored, and optional suffix is removed.\n *\n * @example Usage\n * ```ts\n * import { basename } from \"@std/path/windows/basename\";\n * import { assertEquals } from \"@std/assert\";\n *\n * assertEquals(basename(\"C:\\\\user\\\\Documents\\\\\"), \"Documents\");\n * assertEquals(basename(\"C:\\\\user\\\\Documents\\\\image.png\"), \"image.png\");\n * assertEquals(basename(\"C:\\\\user\\\\Documents\\\\image.png\", \".png\"), \"image\");\n * assertEquals(basename(new URL(\"file:///C:/user/Documents/image.png\")), \"image.png\");\n * assertEquals(basename(new URL(\"file:///C:/user/Documents/image.png\"), \".png\"), \"image\");\n * ```\n *\n * @param path The path to extract the name from.\n * @param suffix The suffix to remove from extracted name.\n * @returns The extracted name.\n */ function basename(path, suffix = \"\") {\n if (path instanceof URL) {\n path = fromFileUrl(path);\n }\n assertArgs$1(path, suffix);\n // Check for a drive letter prefix so as not to mistake the following\n // path separator as an extra separator at the end of the path that can be\n // disregarded\n let start = 0;\n if (path.length >= 2) {\n const drive = path.charCodeAt(0);\n if (isWindowsDeviceRoot(drive)) {\n if (path.charCodeAt(1) === CHAR_COLON) start = 2;\n }\n }\n const lastSegment = lastPathSegment(path, isPathSeparator, start);\n const strippedSegment = stripTrailingSeparators(lastSegment, isPathSeparator);\n return suffix ? stripSuffix(strippedSegment, suffix) : strippedSegment;\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\n/**\n * The character used to separate entries in the PATH environment variable.\n */ const DELIMITER = \";\";\n/**\n * The character used to separate components of a file path.\n */ const SEPARATOR = \"\\\\\";\n/**\n * A regular expression that matches one or more path separators.\n */ const SEPARATOR_PATTERN = /[\\\\/]+/;\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\nfunction assertArg$2(path) {\n assertPath(path);\n if (path.length === 0) return \".\";\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\n/**\n * Return the directory path of a `path`.\n *\n * @example Usage\n * ```ts\n * import { dirname } from \"@std/path/windows/dirname\";\n * import { assertEquals } from \"@std/assert\";\n *\n * assertEquals(dirname(\"C:\\\\foo\\\\bar\\\\baz.ext\"), \"C:\\\\foo\\\\bar\");\n * assertEquals(dirname(new URL(\"file:///C:/foo/bar/baz.ext\")), \"C:\\\\foo\\\\bar\");\n * ```\n *\n * @param path The path to get the directory from.\n * @returns The directory path.\n */ function dirname(path) {\n if (path instanceof URL) {\n path = fromFileUrl(path);\n }\n assertArg$2(path);\n const len = path.length;\n let rootEnd = -1;\n let end = -1;\n let matchedSlash = true;\n let offset = 0;\n const code = path.charCodeAt(0);\n // Try to match a root\n if (len > 1) {\n if (isPathSeparator(code)) {\n // Possible UNC root\n rootEnd = offset = 1;\n if (isPathSeparator(path.charCodeAt(1))) {\n // Matched double path separator at beginning\n let j = 2;\n let last = j;\n // Match 1 or more non-path separators\n for(; j < len; ++j){\n if (isPathSeparator(path.charCodeAt(j))) break;\n }\n if (j < len && j !== last) {\n // Matched!\n last = j;\n // Match 1 or more path separators\n for(; j < len; ++j){\n if (!isPathSeparator(path.charCodeAt(j))) break;\n }\n if (j < len && j !== last) {\n // Matched!\n last = j;\n // Match 1 or more non-path separators\n for(; j < len; ++j){\n if (isPathSeparator(path.charCodeAt(j))) break;\n }\n if (j === len) {\n // We matched a UNC root only\n return path;\n }\n if (j !== last) {\n // We matched a UNC root with leftovers\n // Offset by 1 to include the separator after the UNC root to\n // treat it as a \"normal root\" on top of a (UNC) root\n rootEnd = offset = j + 1;\n }\n }\n }\n }\n } else if (isWindowsDeviceRoot(code)) {\n // Possible device root\n if (path.charCodeAt(1) === CHAR_COLON) {\n rootEnd = offset = 2;\n if (len > 2) {\n if (isPathSeparator(path.charCodeAt(2))) rootEnd = offset = 3;\n }\n }\n }\n } else if (isPathSeparator(code)) {\n // `path` contains just a path separator, exit early to avoid\n // unnecessary work\n return path;\n }\n for(let i = len - 1; i >= offset; --i){\n if (isPathSeparator(path.charCodeAt(i))) {\n if (!matchedSlash) {\n end = i;\n break;\n }\n } else {\n // We saw the first non-path separator\n matchedSlash = false;\n }\n }\n if (end === -1) {\n if (rootEnd === -1) return \".\";\n else end = rootEnd;\n }\n return stripTrailingSeparators(path.slice(0, end), isPosixPathSeparator);\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\n/**\n * Return the extension of the `path` with leading period.\n *\n * @example Usage\n * ```ts\n * import { extname } from \"@std/path/windows/extname\";\n * import { assertEquals } from \"@std/assert\";\n *\n * assertEquals(extname(\"file.ts\"), \".ts\");\n * assertEquals(extname(new URL(\"file:///C:/foo/bar/baz.ext\")), \".ext\");\n * ```\n *\n * @param path The path to get the extension from.\n * @returns The extension of the `path`.\n */ function extname(path) {\n if (path instanceof URL) {\n path = fromFileUrl(path);\n }\n assertPath(path);\n let start = 0;\n let startDot = -1;\n let startPart = 0;\n let end = -1;\n let matchedSlash = true;\n // Track the state of characters (if any) we see before our first dot and\n // after any path separator we find\n let preDotState = 0;\n // Check for a drive letter prefix so as not to mistake the following\n // path separator as an extra separator at the end of the path that can be\n // disregarded\n if (path.length >= 2 && path.charCodeAt(1) === CHAR_COLON && isWindowsDeviceRoot(path.charCodeAt(0))) {\n start = startPart = 2;\n }\n for(let i = path.length - 1; i >= start; --i){\n const code = path.charCodeAt(i);\n if (isPathSeparator(code)) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n startPart = i + 1;\n break;\n }\n continue;\n }\n if (end === -1) {\n // We saw the first non-path separator, mark this as the end of our\n // extension\n matchedSlash = false;\n end = i + 1;\n }\n if (code === CHAR_DOT) {\n // If this is our first dot, mark it as the start of our extension\n if (startDot === -1) startDot = i;\n else if (preDotState !== 1) preDotState = 1;\n } else if (startDot !== -1) {\n // We saw a non-dot and non-path separator before our dot, so we should\n // have a good chance at having a non-empty extension\n preDotState = -1;\n }\n }\n if (startDot === -1 || end === -1 || // We saw a non-dot character immediately before the dot\n preDotState === 0 || // The (right-most) trimmed path component is exactly '..'\n preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {\n return \"\";\n }\n return path.slice(startDot, end);\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\nfunction _format(sep, pathObject) {\n const dir = pathObject.dir || pathObject.root;\n const base = pathObject.base || (pathObject.name ?? \"\") + (pathObject.ext ?? \"\");\n if (!dir) return base;\n if (base === sep) return dir;\n if (dir === pathObject.root) return dir + base;\n return dir + sep + base;\n}\nfunction assertArg$1(pathObject) {\n if (pathObject === null || typeof pathObject !== \"object\") {\n throw new TypeError(`The \"pathObject\" argument must be of type Object, received type \"${typeof pathObject}\"`);\n }\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\n/**\n * Generate a path from `ParsedPath` object.\n *\n * @example Usage\n * ```ts\n * import { format } from \"@std/path/windows/format\";\n * import { assertEquals } from \"@std/assert\";\n *\n * const path = format({\n * root: \"C:\\\\\",\n * dir: \"C:\\\\path\\\\dir\",\n * base: \"file.txt\",\n * ext: \".txt\",\n * name: \"file\"\n * });\n * assertEquals(path, \"C:\\\\path\\\\dir\\\\file.txt\");\n * ```\n *\n * @param pathObject The path object to format.\n * @returns The formatted path.\n */ function format(pathObject) {\n assertArg$1(pathObject);\n return _format(\"\\\\\", pathObject);\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\n/**\n * Verifies whether provided path is absolute.\n *\n * @example Usage\n * ```ts\n * import { isAbsolute } from \"@std/path/windows/is-absolute\";\n * import { assert, assertFalse } from \"@std/assert\";\n *\n * assert(isAbsolute(\"C:\\\\foo\\\\bar\"));\n * assertFalse(isAbsolute(\"..\\\\baz\"));\n * ```\n *\n * @param path The path to verify.\n * @returns `true` if the path is absolute, `false` otherwise.\n */ function isAbsolute(path) {\n assertPath(path);\n const len = path.length;\n if (len === 0) return false;\n const code = path.charCodeAt(0);\n if (isPathSeparator(code)) {\n return true;\n } else if (isWindowsDeviceRoot(code)) {\n // Possible device root\n if (len > 2 && path.charCodeAt(1) === CHAR_COLON) {\n if (isPathSeparator(path.charCodeAt(2))) return true;\n }\n }\n return false;\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\nfunction assertArg(path) {\n assertPath(path);\n if (path.length === 0) return \".\";\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// Copyright the Browserify authors. MIT License.\n// Ported from https://github.com/browserify/path-browserify/\n// This module is browser compatible.\n// Resolves . and .. elements in a path with directory names\nfunction normalizeString(path, allowAboveRoot, separator, isPathSeparator) {\n let res = \"\";\n let lastSegmentLength = 0;\n let lastSlash = -1;\n let dots = 0;\n let code;\n for(let i = 0; i <= path.length; ++i){\n if (i < path.length) code = path.charCodeAt(i);\n else if (isPathSeparator(code)) break;\n else code = CHAR_FORWARD_SLASH;\n if (isPathSeparator(code)) {\n if (lastSlash === i - 1 || dots === 1) ; else if (lastSlash !== i - 1 && dots === 2) {\n if (res.length < 2 || lastSegmentLength !== 2 || res.charCodeAt(res.length - 1) !== CHAR_DOT || res.charCodeAt(res.length - 2) !== CHAR_DOT) {\n if (res.length > 2) {\n const lastSlashIndex = res.lastIndexOf(separator);\n if (lastSlashIndex === -1) {\n res = \"\";\n lastSegmentLength = 0;\n } else {\n res = res.slice(0, lastSlashIndex);\n lastSegmentLength = res.length - 1 - res.lastIndexOf(separator);\n }\n lastSlash = i;\n dots = 0;\n continue;\n } else if (res.length === 2 || res.length === 1) {\n res = \"\";\n lastSegmentLength = 0;\n lastSlash = i;\n dots = 0;\n continue;\n }\n }\n if (allowAboveRoot) {\n if (res.length > 0) res += `${separator}..`;\n else res = \"..\";\n lastSegmentLength = 2;\n }\n } else {\n if (res.length > 0) res += separator + path.slice(lastSlash + 1, i);\n else res = path.slice(lastSlash + 1, i);\n lastSegmentLength = i - lastSlash - 1;\n }\n lastSlash = i;\n dots = 0;\n } else if (code === CHAR_DOT && dots !== -1) {\n ++dots;\n } else {\n dots = -1;\n }\n }\n return res;\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\n/**\n * Normalize the `path`, resolving `'..'` and `'.'` segments.\n * Note that resolving these segments does not necessarily mean that all will be eliminated.\n * A `'..'` at the top-level will be preserved, and an empty path is canonically `'.'`.\n *\n * @example Usage\n * ```ts\n * import { normalize } from \"@std/path/windows/normalize\";\n * import { assertEquals } from \"@std/assert\";\n *\n * assertEquals(normalize(\"C:\\\\foo\\\\..\\\\bar\"), \"C:\\\\bar\");\n * assertEquals(normalize(new URL(\"file:///C:/foo/../bar\")), \"C:\\\\bar\");\n * ```\n *\n * @param path The path to normalize\n * @returns The normalized path\n */ function normalize(path) {\n if (path instanceof URL) {\n path = fromFileUrl(path);\n }\n assertArg(path);\n const len = path.length;\n let rootEnd = 0;\n let device;\n let isAbsolute = false;\n const code = path.charCodeAt(0);\n // Try to match a root\n if (len > 1) {\n if (isPathSeparator(code)) {\n // Possible UNC root\n // If we started with a separator, we know we at least have an absolute\n // path of some kind (UNC or otherwise)\n isAbsolute = true;\n if (isPathSeparator(path.charCodeAt(1))) {\n // Matched double path separator at beginning\n let j = 2;\n let last = j;\n // Match 1 or more non-path separators\n for(; j < len; ++j){\n if (isPathSeparator(path.charCodeAt(j))) break;\n }\n if (j < len && j !== last) {\n const firstPart = path.slice(last, j);\n // Matched!\n last = j;\n // Match 1 or more path separators\n for(; j < len; ++j){\n if (!isPathSeparator(path.charCodeAt(j))) break;\n }\n if (j < len && j !== last) {\n // Matched!\n last = j;\n // Match 1 or more non-path separators\n for(; j < len; ++j){\n if (isPathSeparator(path.charCodeAt(j))) break;\n }\n if (j === len) {\n // We matched a UNC root only\n // Return the normalized version of the UNC root since there\n // is nothing left to process\n return `\\\\\\\\${firstPart}\\\\${path.slice(last)}\\\\`;\n } else if (j !== last) {\n // We matched a UNC root with leftovers\n device = `\\\\\\\\${firstPart}\\\\${path.slice(last, j)}`;\n rootEnd = j;\n }\n }\n }\n } else {\n rootEnd = 1;\n }\n } else if (isWindowsDeviceRoot(code)) {\n // Possible device root\n if (path.charCodeAt(1) === CHAR_COLON) {\n device = path.slice(0, 2);\n rootEnd = 2;\n if (len > 2) {\n if (isPathSeparator(path.charCodeAt(2))) {\n // Treat separator following drive name as an absolute path\n // indicator\n isAbsolute = true;\n rootEnd = 3;\n }\n }\n }\n }\n } else if (isPathSeparator(code)) {\n // `path` contains just a path separator, exit early to avoid unnecessary\n // work\n return \"\\\\\";\n }\n let tail;\n if (rootEnd < len) {\n tail = normalizeString(path.slice(rootEnd), !isAbsolute, \"\\\\\", isPathSeparator);\n } else {\n tail = \"\";\n }\n if (tail.length === 0 && !isAbsolute) tail = \".\";\n if (tail.length > 0 && isPathSeparator(path.charCodeAt(len - 1))) {\n tail += \"\\\\\";\n }\n if (device === undefined) {\n if (isAbsolute) {\n if (tail.length > 0) return `\\\\${tail}`;\n else return \"\\\\\";\n }\n return tail;\n } else if (isAbsolute) {\n if (tail.length > 0) return `${device}\\\\${tail}`;\n else return `${device}\\\\`;\n }\n return device + tail;\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\n/**\n * Join all given a sequence of `paths`,then normalizes the resulting path.\n *\n * @example Usage\n * ```ts\n * import { join } from \"@std/path/windows/join\";\n * import { assertEquals } from \"@std/assert\";\n *\n * assertEquals(join(\"C:\\\\foo\", \"bar\", \"baz\\\\..\"), \"C:\\\\foo\\\\bar\");\n * assertEquals(join(new URL(\"file:///C:/foo\"), \"bar\", \"baz\\\\..\"), \"C:\\\\foo\\\\bar\");\n * ```\n *\n * @param path The path to join. This can be string or file URL.\n * @param paths The paths to join.\n * @returns The joined path.\n */ function join(path, ...paths) {\n if (path instanceof URL) {\n path = fromFileUrl(path);\n }\n paths = path ? [\n path,\n ...paths\n ] : paths;\n paths.forEach((path)=>assertPath(path));\n paths = paths.filter((path)=>path.length > 0);\n if (paths.length === 0) return \".\";\n // Make sure that the joined path doesn't start with two slashes, because\n // normalize() will mistake it for an UNC path then.\n //\n // This step is skipped when it is very clear that the user actually\n // intended to point at an UNC path. This is assumed when the first\n // non-empty string arguments starts with exactly two slashes followed by\n // at least one more non-slash character.\n //\n // Note that for normalize() to treat a path as an UNC path it needs to\n // have at least 2 components, so we don't filter for that here.\n // This means that the user can use join to construct UNC paths from\n // a server name and a share name; for example:\n // path.join('//server', 'share') -> '\\\\\\\\server\\\\share\\\\'\n let needsReplace = true;\n let slashCount = 0;\n const firstPart = paths[0];\n if (isPathSeparator(firstPart.charCodeAt(0))) {\n ++slashCount;\n const firstLen = firstPart.length;\n if (firstLen > 1) {\n if (isPathSeparator(firstPart.charCodeAt(1))) {\n ++slashCount;\n if (firstLen > 2) {\n if (isPathSeparator(firstPart.charCodeAt(2))) ++slashCount;\n else {\n // We matched a UNC path in the first part\n needsReplace = false;\n }\n }\n }\n }\n }\n let joined = paths.join(\"\\\\\");\n if (needsReplace) {\n // Find any more consecutive slashes we need to replace\n for(; slashCount < joined.length; ++slashCount){\n if (!isPathSeparator(joined.charCodeAt(slashCount))) break;\n }\n // Replace the slashes if needed\n if (slashCount >= 2) joined = `\\\\${joined.slice(slashCount)}`;\n }\n return normalize(joined);\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\n/**\n * Return a `ParsedPath` object of the `path`.\n *\n * @example Usage\n * ```ts\n * import { parse } from \"@std/path/windows/parse\";\n * import { assertEquals } from \"@std/assert\";\n *\n * const parsed = parse(\"C:\\\\foo\\\\bar\\\\baz.ext\");\n * assertEquals(parsed, {\n * root: \"C:\\\\\",\n * dir: \"C:\\\\foo\\\\bar\",\n * base: \"baz.ext\",\n * ext: \".ext\",\n * name: \"baz\",\n * });\n * ```\n *\n * @param path The path to parse.\n * @returns The `ParsedPath` object.\n */ function parse(path) {\n assertPath(path);\n const ret = {\n root: \"\",\n dir: \"\",\n base: \"\",\n ext: \"\",\n name: \"\"\n };\n const len = path.length;\n if (len === 0) return ret;\n let rootEnd = 0;\n let code = path.charCodeAt(0);\n // Try to match a root\n if (len > 1) {\n if (isPathSeparator(code)) {\n // Possible UNC root\n rootEnd = 1;\n if (isPathSeparator(path.charCodeAt(1))) {\n // Matched double path separator at beginning\n let j = 2;\n let last = j;\n // Match 1 or more non-path separators\n for(; j < len; ++j){\n if (isPathSeparator(path.charCodeAt(j))) break;\n }\n if (j < len && j !== last) {\n // Matched!\n last = j;\n // Match 1 or more path separators\n for(; j < len; ++j){\n if (!isPathSeparator(path.charCodeAt(j))) break;\n }\n if (j < len && j !== last) {\n // Matched!\n last = j;\n // Match 1 or more non-path separators\n for(; j < len; ++j){\n if (isPathSeparator(path.charCodeAt(j))) break;\n }\n if (j === len) {\n // We matched a UNC root only\n rootEnd = j;\n } else if (j !== last) {\n // We matched a UNC root with leftovers\n rootEnd = j + 1;\n }\n }\n }\n }\n } else if (isWindowsDeviceRoot(code)) {\n // Possible device root\n if (path.charCodeAt(1) === CHAR_COLON) {\n rootEnd = 2;\n if (len > 2) {\n if (isPathSeparator(path.charCodeAt(2))) {\n if (len === 3) {\n // `path` contains just a drive root, exit early to avoid\n // unnecessary work\n ret.root = ret.dir = path;\n ret.base = \"\\\\\";\n return ret;\n }\n rootEnd = 3;\n }\n } else {\n // `path` contains just a relative drive root, exit early to avoid\n // unnecessary work\n ret.root = ret.dir = path;\n return ret;\n }\n }\n }\n } else if (isPathSeparator(code)) {\n // `path` contains just a path separator, exit early to avoid\n // unnecessary work\n ret.root = ret.dir = path;\n ret.base = \"\\\\\";\n return ret;\n }\n if (rootEnd > 0) ret.root = path.slice(0, rootEnd);\n let startDot = -1;\n let startPart = rootEnd;\n let end = -1;\n let matchedSlash = true;\n let i = path.length - 1;\n // Track the state of characters (if any) we see before our first dot and\n // after any path separator we find\n let preDotState = 0;\n // Get non-dir info\n for(; i >= rootEnd; --i){\n code = path.charCodeAt(i);\n if (isPathSeparator(code)) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n startPart = i + 1;\n break;\n }\n continue;\n }\n if (end === -1) {\n // We saw the first non-path separator, mark this as the end of our\n // extension\n matchedSlash = false;\n end = i + 1;\n }\n if (code === CHAR_DOT) {\n // If this is our first dot, mark it as the start of our extension\n if (startDot === -1) startDot = i;\n else if (preDotState !== 1) preDotState = 1;\n } else if (startDot !== -1) {\n // We saw a non-dot and non-path separator before our dot, so we should\n // have a good chance at having a non-empty extension\n preDotState = -1;\n }\n }\n if (startDot === -1 || end === -1 || // We saw a non-dot character immediately before the dot\n preDotState === 0 || // The (right-most) trimmed path component is exactly '..'\n preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {\n if (end !== -1) {\n ret.base = ret.name = path.slice(startPart, end);\n }\n } else {\n ret.name = path.slice(startPart, startDot);\n ret.base = path.slice(startPart, end);\n ret.ext = path.slice(startDot, end);\n }\n // Fallback to '\\' in case there is no basename\n ret.base = ret.base || \"\\\\\";\n // If the directory is the root, use the entire root as the `dir` including\n // the trailing slash if any (`C:\\abc` -> `C:\\`). Otherwise, strip out the\n // trailing slash (`C:\\abc\\def` -> `C:\\abc`).\n if (startPart > 0 && startPart !== rootEnd) {\n ret.dir = path.slice(0, startPart - 1);\n } else ret.dir = ret.root;\n return ret;\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\n/**\n * Resolves path segments into a `path`.\n *\n * @example Usage\n * ```ts\n * import { resolve } from \"@std/path/windows/resolve\";\n * import { assertEquals } from \"@std/assert\";\n *\n * const resolved = resolve(\"C:\\\\foo\\\\bar\", \"..\\\\baz\");\n * assertEquals(resolved, \"C:\\\\foo\\\\baz\");\n * ```\n *\n * @param pathSegments The path segments to process to path\n * @returns The resolved path\n */ function resolve(...pathSegments) {\n let resolvedDevice = \"\";\n let resolvedTail = \"\";\n let resolvedAbsolute = false;\n for(let i = pathSegments.length - 1; i >= -1; i--){\n let path;\n // deno-lint-ignore no-explicit-any\n const { Deno } = globalThis;\n if (i >= 0) {\n path = pathSegments[i];\n } else if (!resolvedDevice) {\n if (typeof Deno?.cwd !== \"function\") {\n throw new TypeError(\"Resolved a drive-letter-less path without a current working directory (CWD)\");\n }\n path = Deno.cwd();\n } else {\n if (typeof Deno?.env?.get !== \"function\" || typeof Deno?.cwd !== \"function\") {\n throw new TypeError(\"Resolved a relative path without a current working directory (CWD)\");\n }\n path = Deno.cwd();\n // Verify that a cwd was found and that it actually points\n // to our drive. If not, default to the drive's root.\n if (path === undefined || path.slice(0, 3).toLowerCase() !== `${resolvedDevice.toLowerCase()}\\\\`) {\n path = `${resolvedDevice}\\\\`;\n }\n }\n assertPath(path);\n const len = path.length;\n // Skip empty entries\n if (len === 0) continue;\n let rootEnd = 0;\n let device = \"\";\n let isAbsolute = false;\n const code = path.charCodeAt(0);\n // Try to match a root\n if (len > 1) {\n if (isPathSeparator(code)) {\n // Possible UNC root\n // If we started with a separator, we know we at least have an\n // absolute path of some kind (UNC or otherwise)\n isAbsolute = true;\n if (isPathSeparator(path.charCodeAt(1))) {\n // Matched double path separator at beginning\n let j = 2;\n let last = j;\n // Match 1 or more non-path separators\n for(; j < len; ++j){\n if (isPathSeparator(path.charCodeAt(j))) break;\n }\n if (j < len && j !== last) {\n const firstPart = path.slice(last, j);\n // Matched!\n last = j;\n // Match 1 or more path separators\n for(; j < len; ++j){\n if (!isPathSeparator(path.charCodeAt(j))) break;\n }\n if (j < len && j !== last) {\n // Matched!\n last = j;\n // Match 1 or more non-path separators\n for(; j < len; ++j){\n if (isPathSeparator(path.charCodeAt(j))) break;\n }\n if (j === len) {\n // We matched a UNC root only\n device = `\\\\\\\\${firstPart}\\\\${path.slice(last)}`;\n rootEnd = j;\n } else if (j !== last) {\n // We matched a UNC root with leftovers\n device = `\\\\\\\\${firstPart}\\\\${path.slice(last, j)}`;\n rootEnd = j;\n }\n }\n }\n } else {\n rootEnd = 1;\n }\n } else if (isWindowsDeviceRoot(code)) {\n // Possible device root\n if (path.charCodeAt(1) === CHAR_COLON) {\n device = path.slice(0, 2);\n rootEnd = 2;\n if (len > 2) {\n if (isPathSeparator(path.charCodeAt(2))) {\n // Treat separator following drive name as an absolute path\n // indicator\n isAbsolute = true;\n rootEnd = 3;\n }\n }\n }\n }\n } else if (isPathSeparator(code)) {\n // `path` contains just a path separator\n rootEnd = 1;\n isAbsolute = true;\n }\n if (device.length > 0 && resolvedDevice.length > 0 && device.toLowerCase() !== resolvedDevice.toLowerCase()) {\n continue;\n }\n if (resolvedDevice.length === 0 && device.length > 0) {\n resolvedDevice = device;\n }\n if (!resolvedAbsolute) {\n resolvedTail = `${path.slice(rootEnd)}\\\\${resolvedTail}`;\n resolvedAbsolute = isAbsolute;\n }\n if (resolvedAbsolute && resolvedDevice.length > 0) break;\n }\n // At this point the path should be resolved to a full absolute path,\n // but handle relative paths to be safe (might happen when Deno.cwd()\n // fails)\n // Normalize the tail path\n resolvedTail = normalizeString(resolvedTail, !resolvedAbsolute, \"\\\\\", isPathSeparator);\n return resolvedDevice + (resolvedAbsolute ? \"\\\\\" : \"\") + resolvedTail || \".\";\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\nfunction assertArgs(from, to) {\n assertPath(from);\n assertPath(to);\n if (from === to) return \"\";\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\n/**\n * Return the relative path from `from` to `to` based on current working directory.\n *\n * An example in windows, for instance:\n * from = 'C:\\\\orandea\\\\test\\\\aaa'\n * to = 'C:\\\\orandea\\\\impl\\\\bbb'\n * The output of the function should be: '..\\\\..\\\\impl\\\\bbb'\n *\n * @example Usage\n * ```ts\n * import { relative } from \"@std/path/windows/relative\";\n * import { assertEquals } from \"@std/assert\";\n *\n * const relativePath = relative(\"C:\\\\foobar\\\\test\\\\aaa\", \"C:\\\\foobar\\\\impl\\\\bbb\");\n * assertEquals(relativePath, \"..\\\\..\\\\impl\\\\bbb\");\n * ```\n *\n * @param from The path from which to calculate the relative path\n * @param to The path to which to calculate the relative path\n * @returns The relative path from `from` to `to`\n */ function relative(from, to) {\n assertArgs(from, to);\n const fromOrig = resolve(from);\n const toOrig = resolve(to);\n if (fromOrig === toOrig) return \"\";\n from = fromOrig.toLowerCase();\n to = toOrig.toLowerCase();\n if (from === to) return \"\";\n // Trim any leading backslashes\n let fromStart = 0;\n let fromEnd = from.length;\n for(; fromStart < fromEnd; ++fromStart){\n if (from.charCodeAt(fromStart) !== CHAR_BACKWARD_SLASH) break;\n }\n // Trim trailing backslashes (applicable to UNC paths only)\n for(; fromEnd - 1 > fromStart; --fromEnd){\n if (from.charCodeAt(fromEnd - 1) !== CHAR_BACKWARD_SLASH) break;\n }\n const fromLen = fromEnd - fromStart;\n // Trim any leading backslashes\n let toStart = 0;\n let toEnd = to.length;\n for(; toStart < toEnd; ++toStart){\n if (to.charCodeAt(toStart) !== CHAR_BACKWARD_SLASH) break;\n }\n // Trim trailing backslashes (applicable to UNC paths only)\n for(; toEnd - 1 > toStart; --toEnd){\n if (to.charCodeAt(toEnd - 1) !== CHAR_BACKWARD_SLASH) break;\n }\n const toLen = toEnd - toStart;\n // Compare paths to find the longest common path from root\n const length = fromLen < toLen ? fromLen : toLen;\n let lastCommonSep = -1;\n let i = 0;\n for(; i <= length; ++i){\n if (i === length) {\n if (toLen > length) {\n if (to.charCodeAt(toStart + i) === CHAR_BACKWARD_SLASH) {\n // We get here if `from` is the exact base path for `to`.\n // For example: from='C:\\\\foo\\\\bar'; to='C:\\\\foo\\\\bar\\\\baz'\n return toOrig.slice(toStart + i + 1);\n } else if (i === 2) {\n // We get here if `from` is the device root.\n // For example: from='C:\\\\'; to='C:\\\\foo'\n return toOrig.slice(toStart + i);\n }\n }\n if (fromLen > length) {\n if (from.charCodeAt(fromStart + i) === CHAR_BACKWARD_SLASH) {\n // We get here if `to` is the exact base path for `from`.\n // For example: from='C:\\\\foo\\\\bar'; to='C:\\\\foo'\n lastCommonSep = i;\n } else if (i === 2) {\n // We get here if `to` is the device root.\n // For example: from='C:\\\\foo\\\\bar'; to='C:\\\\'\n lastCommonSep = 3;\n }\n }\n break;\n }\n const fromCode = from.charCodeAt(fromStart + i);\n const toCode = to.charCodeAt(toStart + i);\n if (fromCode !== toCode) break;\n else if (fromCode === CHAR_BACKWARD_SLASH) lastCommonSep = i;\n }\n // We found a mismatch before the first common path separator was seen, so\n // return the original `to`.\n if (i !== length && lastCommonSep === -1) {\n return toOrig;\n }\n let out = \"\";\n if (lastCommonSep === -1) lastCommonSep = 0;\n // Generate the relative path based on the path difference between `to` and\n // `from`\n for(i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i){\n if (i === fromEnd || from.charCodeAt(i) === CHAR_BACKWARD_SLASH) {\n if (out.length === 0) out += \"..\";\n else out += \"\\\\..\";\n }\n }\n // Lastly, append the rest of the destination (`to`) path that comes after\n // the common path parts\n if (out.length > 0) {\n return out + toOrig.slice(toStart + lastCommonSep, toEnd);\n } else {\n toStart += lastCommonSep;\n if (toOrig.charCodeAt(toStart) === CHAR_BACKWARD_SLASH) ++toStart;\n return toOrig.slice(toStart, toEnd);\n }\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\nconst WHITESPACE_ENCODINGS = {\n \"\\u0009\": \"%09\",\n \"\\u000A\": \"%0A\",\n \"\\u000B\": \"%0B\",\n \"\\u000C\": \"%0C\",\n \"\\u000D\": \"%0D\",\n \"\\u0020\": \"%20\"\n};\nfunction encodeWhitespace(string) {\n return string.replaceAll(/[\\s]/g, (c)=>{\n return WHITESPACE_ENCODINGS[c] ?? c;\n });\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\n/**\n * Converts a path string to a file URL.\n *\n * @example Usage\n * ```ts\n * import { toFileUrl } from \"@std/path/windows/to-file-url\";\n * import { assertEquals } from \"@std/assert\";\n *\n * assertEquals(toFileUrl(\"\\\\home\\\\foo\"), new URL(\"file:///home/foo\"));\n * assertEquals(toFileUrl(\"C:\\\\Users\\\\foo\"), new URL(\"file:///C:/Users/foo\"));\n * assertEquals(toFileUrl(\"\\\\\\\\127.0.0.1\\\\home\\\\foo\"), new URL(\"file://127.0.0.1/home/foo\"));\n * ```\n * @param path The path to convert.\n * @returns The file URL.\n */ function toFileUrl(path) {\n if (!isAbsolute(path)) {\n throw new TypeError(`Path must be absolute: received \"${path}\"`);\n }\n const [, hostname, pathname] = path.match(/^(?:[/\\\\]{2}([^/\\\\]+)(?=[/\\\\](?:[^/\\\\]|$)))?(.*)/);\n const url = new URL(\"file:///\");\n url.pathname = encodeWhitespace(pathname.replace(/%/g, \"%25\"));\n if (hostname !== undefined && hostname !== \"localhost\") {\n url.hostname = hostname;\n if (!url.hostname) {\n throw new TypeError(`Invalid hostname: \"${url.hostname}\"`);\n }\n }\n return url;\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\n/**\n * Resolves path to a namespace path\n *\n * @example Usage\n * ```ts\n * import { toNamespacedPath } from \"@std/path/windows/to-namespaced-path\";\n * import { assertEquals } from \"@std/assert\";\n *\n * const namespaced = toNamespacedPath(\"C:\\\\foo\\\\bar\");\n * assertEquals(namespaced, \"\\\\\\\\?\\\\C:\\\\foo\\\\bar\");\n * ```\n *\n * @param path The path to resolve to namespaced path\n * @returns The resolved namespaced path\n */ function toNamespacedPath(path) {\n // Note: this will *probably* throw somewhere.\n if (typeof path !== \"string\") return path;\n if (path.length === 0) return \"\";\n const resolvedPath = resolve(path);\n if (resolvedPath.length >= 3) {\n if (resolvedPath.charCodeAt(0) === CHAR_BACKWARD_SLASH) {\n // Possible UNC root\n if (resolvedPath.charCodeAt(1) === CHAR_BACKWARD_SLASH) {\n const code = resolvedPath.charCodeAt(2);\n if (code !== CHAR_QUESTION_MARK && code !== CHAR_DOT) {\n // Matched non-long UNC root, convert the path to a long UNC path\n return `\\\\\\\\?\\\\UNC\\\\${resolvedPath.slice(2)}`;\n }\n }\n } else if (isWindowsDeviceRoot(resolvedPath.charCodeAt(0))) {\n // Possible device root\n if (resolvedPath.charCodeAt(1) === CHAR_COLON && resolvedPath.charCodeAt(2) === CHAR_BACKWARD_SLASH) {\n // Matched device root, convert the path to a long UNC path\n return `\\\\\\\\?\\\\${resolvedPath}`;\n }\n }\n }\n return path;\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\nfunction common$1(paths, sep) {\n const [first = \"\", ...remaining] = paths;\n const parts = first.split(sep);\n let endOfPrefix = parts.length;\n let append = \"\";\n for (const path of remaining){\n const compare = path.split(sep);\n if (compare.length <= endOfPrefix) {\n endOfPrefix = compare.length;\n append = \"\";\n }\n for(let i = 0; i < endOfPrefix; i++){\n if (compare[i] !== parts[i]) {\n endOfPrefix = i;\n append = i === 0 ? \"\" : sep;\n break;\n }\n }\n }\n return parts.slice(0, endOfPrefix).join(sep) + append;\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\n/**\n * Determines the common path from a set of paths for Windows systems.\n *\n * @example Usage\n * ```ts\n * import { common } from \"@std/path/windows/common\";\n * import { assertEquals } from \"@std/assert\";\n *\n * const path = common([\n * \"C:\\\\foo\\\\bar\",\n * \"C:\\\\foo\\\\baz\",\n * ]);\n * assertEquals(path, \"C:\\\\foo\\\\\");\n * ```\n *\n * @param paths The paths to compare.\n * @returns The common path.\n */ function common(paths) {\n return common$1(paths, SEPARATOR);\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\n/**\n * Options for {@linkcode globToRegExp}, {@linkcode joinGlobs},\n * {@linkcode normalizeGlob} and {@linkcode expandGlob}.\n */ const REG_EXP_ESCAPE_CHARS = [\n \"!\",\n \"$\",\n \"(\",\n \")\",\n \"*\",\n \"+\",\n \".\",\n \"=\",\n \"?\",\n \"[\",\n \"\\\\\",\n \"^\",\n \"{\",\n \"|\"\n];\nconst RANGE_ESCAPE_CHARS = [\n \"-\",\n \"\\\\\",\n \"]\"\n];\nfunction _globToRegExp(c, glob, { extended = true, globstar: globstarOption = true, // os = osType,\ncaseInsensitive = false } = {}) {\n if (glob === \"\") {\n return /(?!)/;\n }\n // Remove trailing separators.\n let newLength = glob.length;\n for(; newLength > 1 && c.seps.includes(glob[newLength - 1]); newLength--);\n glob = glob.slice(0, newLength);\n let regExpString = \"\";\n // Terminates correctly. Trust that `j` is incremented every iteration.\n for(let j = 0; j < glob.length;){\n let segment = \"\";\n const groupStack = [];\n let inRange = false;\n let inEscape = false;\n let endsWithSep = false;\n let i = j;\n // Terminates with `i` at the non-inclusive end of the current segment.\n for(; i < glob.length && !(c.seps.includes(glob[i]) && groupStack.length === 0); i++){\n if (inEscape) {\n inEscape = false;\n const escapeChars = inRange ? RANGE_ESCAPE_CHARS : REG_EXP_ESCAPE_CHARS;\n segment += escapeChars.includes(glob[i]) ? `\\\\${glob[i]}` : glob[i];\n continue;\n }\n if (glob[i] === c.escapePrefix) {\n inEscape = true;\n continue;\n }\n if (glob[i] === \"[\") {\n if (!inRange) {\n inRange = true;\n segment += \"[\";\n if (glob[i + 1] === \"!\") {\n i++;\n segment += \"^\";\n } else if (glob[i + 1] === \"^\") {\n i++;\n segment += \"\\\\^\";\n }\n continue;\n } else if (glob[i + 1] === \":\") {\n let k = i + 1;\n let value = \"\";\n while(glob[k + 1] !== undefined && glob[k + 1] !== \":\"){\n value += glob[k + 1];\n k++;\n }\n if (glob[k + 1] === \":\" && glob[k + 2] === \"]\") {\n i = k + 2;\n if (value === \"alnum\") segment += \"\\\\dA-Za-z\";\n else if (value === \"alpha\") segment += \"A-Za-z\";\n else if (value === \"ascii\") segment += \"\\x00-\\x7F\";\n else if (value === \"blank\") segment += \"\\t \";\n else if (value === \"cntrl\") segment += \"\\x00-\\x1F\\x7F\";\n else if (value === \"digit\") segment += \"\\\\d\";\n else if (value === \"graph\") segment += \"\\x21-\\x7E\";\n else if (value === \"lower\") segment += \"a-z\";\n else if (value === \"print\") segment += \"\\x20-\\x7E\";\n else if (value === \"punct\") {\n segment += \"!\\\"#$%&'()*+,\\\\-./:;<=>?@[\\\\\\\\\\\\]^_‘{|}~\";\n } else if (value === \"space\") segment += \"\\\\s\\v\";\n else if (value === \"upper\") segment += \"A-Z\";\n else if (value === \"word\") segment += \"\\\\w\";\n else if (value === \"xdigit\") segment += \"\\\\dA-Fa-f\";\n continue;\n }\n }\n }\n if (glob[i] === \"]\" && inRange) {\n inRange = false;\n segment += \"]\";\n continue;\n }\n if (inRange) {\n segment += glob[i];\n continue;\n }\n if (glob[i] === \")\" && groupStack.length > 0 && groupStack[groupStack.length - 1] !== \"BRACE\") {\n segment += \")\";\n const type = groupStack.pop();\n if (type === \"!\") {\n segment += c.wildcard;\n } else if (type !== \"@\") {\n segment += type;\n }\n continue;\n }\n if (glob[i] === \"|\" && groupStack.length > 0 && groupStack[groupStack.length - 1] !== \"BRACE\") {\n segment += \"|\";\n continue;\n }\n if (glob[i] === \"+\" && extended && glob[i + 1] === \"(\") {\n i++;\n groupStack.push(\"+\");\n segment += \"(?:\";\n continue;\n }\n if (glob[i] === \"@\" && extended && glob[i + 1] === \"(\") {\n i++;\n groupStack.push(\"@\");\n segment += \"(?:\";\n continue;\n }\n if (glob[i] === \"?\") {\n if (extended && glob[i + 1] === \"(\") {\n i++;\n groupStack.push(\"?\");\n segment += \"(?:\";\n } else {\n segment += \".\";\n }\n continue;\n }\n if (glob[i] === \"!\" && extended && glob[i + 1] === \"(\") {\n i++;\n groupStack.push(\"!\");\n segment += \"(?!\";\n continue;\n }\n if (glob[i] === \"{\") {\n groupStack.push(\"BRACE\");\n segment += \"(?:\";\n continue;\n }\n if (glob[i] === \"}\" && groupStack[groupStack.length - 1] === \"BRACE\") {\n groupStack.pop();\n segment += \")\";\n continue;\n }\n if (glob[i] === \",\" && groupStack[groupStack.length - 1] === \"BRACE\") {\n segment += \"|\";\n continue;\n }\n if (glob[i] === \"*\") {\n if (extended && glob[i + 1] === \"(\") {\n i++;\n groupStack.push(\"*\");\n segment += \"(?:\";\n } else {\n const prevChar = glob[i - 1];\n let numStars = 1;\n while(glob[i + 1] === \"*\"){\n i++;\n numStars++;\n }\n const nextChar = glob[i + 1];\n if (globstarOption && numStars === 2 && [\n ...c.seps,\n undefined\n ].includes(prevChar) && [\n ...c.seps,\n undefined\n ].includes(nextChar)) {\n segment += c.globstar;\n endsWithSep = true;\n } else {\n segment += c.wildcard;\n }\n }\n continue;\n }\n segment += REG_EXP_ESCAPE_CHARS.includes(glob[i]) ? `\\\\${glob[i]}` : glob[i];\n }\n // Check for unclosed groups or a dangling backslash.\n if (groupStack.length > 0 || inRange || inEscape) {\n // Parse failure. Take all characters from this segment literally.\n segment = \"\";\n for (const c of glob.slice(j, i)){\n segment += REG_EXP_ESCAPE_CHARS.includes(c) ? `\\\\${c}` : c;\n endsWithSep = false;\n }\n }\n regExpString += segment;\n if (!endsWithSep) {\n regExpString += i < glob.length ? c.sep : c.sepMaybe;\n endsWithSep = true;\n }\n // Terminates with `i` at the start of the next segment.\n while(c.seps.includes(glob[i]))i++;\n j = i;\n }\n regExpString = `^${regExpString}$`;\n return new RegExp(regExpString, caseInsensitive ? \"i\" : \"\");\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\nconst constants = {\n sep: \"(?:\\\\\\\\|/)+\",\n sepMaybe: \"(?:\\\\\\\\|/)*\",\n seps: [\n \"\\\\\",\n \"/\"\n ],\n globstar: \"(?:[^\\\\\\\\/]*(?:\\\\\\\\|/|$)+)*\",\n wildcard: \"[^\\\\\\\\/]*\",\n escapePrefix: \"`\"\n};\n/** Convert a glob string to a regular expression.\n *\n * Tries to match bash glob expansion as closely as possible.\n *\n * Basic glob syntax:\n * - `*` - Matches everything without leaving the path segment.\n * - `?` - Matches any single character.\n * - `{foo,bar}` - Matches `foo` or `bar`.\n * - `[abcd]` - Matches `a`, `b`, `c` or `d`.\n * - `[a-d]` - Matches `a`, `b`, `c` or `d`.\n * - `[!abcd]` - Matches any single character besides `a`, `b`, `c` or `d`.\n * - `[[:<class>:]]` - Matches any character belonging to `<class>`.\n * - `[[:alnum:]]` - Matches any digit or letter.\n * - `[[:digit:]abc]` - Matches any digit, `a`, `b` or `c`.\n * - See https://facelessuser.github.io/wcmatch/glob/#posix-character-classes\n * for a complete list of supported character classes.\n * - `\\` - Escapes the next character for an `os` other than `\"windows\"`.\n * - \\` - Escapes the next character for `os` set to `\"windows\"`.\n * - `/` - Path separator.\n * - `\\` - Additional path separator only for `os` set to `\"windows\"`.\n *\n * Extended syntax:\n * - Requires `{ extended: true }`.\n * - `?(foo|bar)` - Matches 0 or 1 instance of `{foo,bar}`.\n * - `@(foo|bar)` - Matches 1 instance of `{foo,bar}`. They behave the same.\n * - `*(foo|bar)` - Matches _n_ instances of `{foo,bar}`.\n * - `+(foo|bar)` - Matches _n > 0_ instances of `{foo,bar}`.\n * - `!(foo|bar)` - Matches anything other than `{foo,bar}`.\n * - See https://www.linuxjournal.com/content/bash-extended-globbing.\n *\n * Globstar syntax:\n * - Requires `{ globstar: true }`.\n * - `**` - Matches any number of any path segments.\n * - Must comprise its entire path segment in the provided glob.\n * - See https://www.linuxjournal.com/content/globstar-new-bash-globbing-option.\n *\n * Note the following properties:\n * - The generated `RegExp` is anchored at both start and end.\n * - Repeating and trailing separators are tolerated. Trailing separators in the\n * provided glob have no meaning and are discarded.\n * - Absolute globs will only match absolute paths, etc.\n * - Empty globs will match nothing.\n * - Any special glob syntax must be contained to one path segment. For example,\n * `?(foo|bar/baz)` is invalid. The separator will take precedence and the\n * first segment ends with an unclosed group.\n * - If a path segment ends with unclosed groups or a dangling escape prefix, a\n * parse error has occurred. Every character for that segment is taken\n * literally in this event.\n *\n * Limitations:\n * - A negative group like `!(foo|bar)` will wrongly be converted to a negative\n * look-ahead followed by a wildcard. This means that `!(foo).js` will wrongly\n * fail to match `foobar.js`, even though `foobar` is not `foo`. Effectively,\n * `!(foo|bar)` is treated like `!(@(foo|bar)*)`. This will work correctly if\n * the group occurs not nested at the end of the segment.\n *\n * @example Usage\n * ```ts\n * import { globToRegExp } from \"@std/path/windows/glob-to-regexp\";\n * import { assertEquals } from \"@std/assert\";\n *\n * assertEquals(globToRegExp(\"*.js\"), /^[^\\\\/]*\\.js(?:\\\\|\\/)*$/);\n * ```\n *\n * @param glob Glob string to convert.\n * @param options Conversion options.\n * @returns The regular expression equivalent to the glob.\n */ function globToRegExp(glob, options = {}) {\n return _globToRegExp(constants, glob, options);\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\n/**\n * Test whether the given string is a glob.\n *\n * @example Usage\n * ```ts\n * import { isGlob } from \"@std/path/is-glob\";\n * import { assert } from \"@std/assert\";\n *\n * assert(!isGlob(\"foo/bar/../baz\"));\n * assert(isGlob(\"foo/*ar/../baz\"));\n * ```\n *\n * @param str String to test.\n * @returns `true` if the given string is a glob, otherwise `false`\n */ function isGlob(str) {\n const chars = {\n \"{\": \"}\",\n \"(\": \")\",\n \"[\": \"]\"\n };\n const regex = /\\\\(.)|(^!|\\*|\\?|[\\].+)]\\?|\\[[^[\\\\\\]]+\\]|\\{[^{\\\\}]+\\}|\\(\\?[:!=][^\\\\)]+\\)|\\([^(|]+\\|[^\\\\)]+\\)|@\\([^)]+\\))/;\n if (str === \"\") {\n return false;\n }\n let match;\n while(match = regex.exec(str)){\n if (match[2]) return true;\n let idx = match.index + match[0].length;\n // if an open bracket/brace/paren is escaped,\n // set the index to the next closing character\n const open = match[1];\n const close = open ? chars[open] : null;\n if (open && close) {\n const n = str.indexOf(close, idx);\n if (n !== -1) {\n idx = n + 1;\n }\n }\n str = str.slice(idx);\n }\n return false;\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\n/**\n * Like normalize(), but doesn't collapse \"**\\/..\" when `globstar` is true.\n *\n * @example Usage\n * ```ts\n * import { normalizeGlob } from \"@std/path/windows/normalize-glob\";\n * import { assertEquals } from \"@std/assert\";\n *\n * const normalized = normalizeGlob(\"**\\\\foo\\\\..\\\\bar\", { globstar: true });\n * assertEquals(normalized, \"**\\\\bar\");\n * ```\n *\n * @param glob The glob pattern to normalize.\n * @param options The options for glob pattern.\n * @returns The normalized glob pattern.\n */ function normalizeGlob(glob, options = {}) {\n const { globstar = false } = options;\n if (glob.match(/\\0/g)) {\n throw new Error(`Glob contains invalid characters: \"${glob}\"`);\n }\n if (!globstar) {\n return normalize(glob);\n }\n const s = SEPARATOR_PATTERN.source;\n const badParentPattern = new RegExp(`(?<=(${s}|^)\\\\*\\\\*${s})\\\\.\\\\.(?=${s}|$)`, \"g\");\n return normalize(glob.replace(badParentPattern, \"\\0\")).replace(/\\0/g, \"..\");\n}\n\n// Copyright 2018-2025 the Deno authors. MIT license.\n// This module is browser compatible.\n/**\n * Like join(), but doesn't collapse \"**\\/..\" when `globstar` is true.\n *\n * @example Usage\n *\n * ```ts\n * import { joinGlobs } from \"@std/path/windows/join-globs\";\n * import { assertEquals } from \"@std/assert\";\n *\n * const joined = joinGlobs([\"foo\", \"**\", \"bar\"], { globstar: true });\n * assertEquals(joined, \"foo\\\\**\\\\bar\");\n * ```\n *\n * @param globs The globs to join.\n * @param options The options for glob pattern.\n * @returns The joined glob pattern.\n */ function joinGlobs(globs, options = {}) {\n const { globstar = false } = options;\n if (!globstar || globs.length === 0) {\n return join(...globs);\n }\n let joined;\n for (const glob of globs){\n const path = glob;\n if (path.length > 0) {\n if (!joined) joined = path;\n else joined += `${SEPARATOR}${path}`;\n }\n }\n if (!joined) return \".\";\n return normalizeGlob(joined, {\n globstar\n });\n}\n\nexport { DELIMITER, SEPARATOR, SEPARATOR_PATTERN, basename, common, dirname, extname, format, fromFileUrl, globToRegExp, isAbsolute, isGlob, join, joinGlobs, normalize, normalizeGlob, parse, relative, resolve, toFileUrl, toNamespacedPath };\n","export const balanced = (a, b, str) => {\n const ma = a instanceof RegExp ? maybeMatch(a, str) : a;\n const mb = b instanceof RegExp ? maybeMatch(b, str) : b;\n const r = ma !== null && mb != null && range(ma, mb, str);\n return (r && {\n start: r[0],\n end: r[1],\n pre: str.slice(0, r[0]),\n body: str.slice(r[0] + ma.length, r[1]),\n post: str.slice(r[1] + mb.length),\n });\n};\nconst maybeMatch = (reg, str) => {\n const m = str.match(reg);\n return m ? m[0] : null;\n};\nexport const range = (a, b, str) => {\n let begs, beg, left, right = undefined, result;\n let ai = str.indexOf(a);\n let bi = str.indexOf(b, ai + 1);\n let i = ai;\n if (ai >= 0 && bi > 0) {\n if (a === b) {\n return [ai, bi];\n }\n begs = [];\n left = str.length;\n while (i >= 0 && !result) {\n if (i === ai) {\n begs.push(i);\n ai = str.indexOf(a, i + 1);\n }\n else if (begs.length === 1) {\n const r = begs.pop();\n if (r !== undefined)\n result = [r, bi];\n }\n else {\n beg = begs.pop();\n if (beg !== undefined && beg < left) {\n left = beg;\n right = bi;\n }\n bi = str.indexOf(b, i + 1);\n }\n i = ai < bi && ai >= 0 ? ai : bi;\n }\n if (begs.length && right !== undefined) {\n result = [left, right];\n }\n }\n return result;\n};\n//# sourceMappingURL=index.js.map","import { balanced } from 'balanced-match';\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;\nexport const EXPANSION_MAX = 100_000;\nfunction numeric(str) {\n return !isNaN(str) ? parseInt(str, 10) : str.charCodeAt(0);\n}\nfunction escapeBraces(str) {\n return str\n .replace(slashPattern, escSlash)\n .replace(openPattern, escOpen)\n .replace(closePattern, escClose)\n .replace(commaPattern, escComma)\n .replace(periodPattern, escPeriod);\n}\nfunction unescapeBraces(str) {\n return str\n .replace(escSlashPattern, '\\\\')\n .replace(escOpenPattern, '{')\n .replace(escClosePattern, '}')\n .replace(escCommaPattern, ',')\n .replace(escPeriodPattern, '.');\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) {\n if (!str) {\n return [''];\n }\n const parts = [];\n const m = balanced('{', '}', str);\n if (!m) {\n return str.split(',');\n }\n const { pre, body, post } = m;\n const p = pre.split(',');\n p[p.length - 1] += '{' + body + '}';\n const postParts = parseCommaParts(post);\n if (post.length) {\n ;\n p[p.length - 1] += postParts.shift();\n p.push.apply(p, postParts);\n }\n parts.push.apply(parts, p);\n return parts;\n}\nexport function expand(str, options = {}) {\n if (!str) {\n return [];\n }\n const { max = EXPANSION_MAX } = options;\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 return expand_(escapeBraces(str), max, true).map(unescapeBraces);\n}\nfunction embrace(str) {\n return '{' + str + '}';\n}\nfunction isPadded(el) {\n return /^-?0\\d/.test(el);\n}\nfunction lte(i, y) {\n return i <= y;\n}\nfunction gte(i, y) {\n return i >= y;\n}\nfunction expand_(str, max, isTop) {\n /** @type {string[]} */\n const expansions = [];\n const m = balanced('{', '}', str);\n if (!m)\n return [str];\n // no need to expand pre, since it is guaranteed to be free of brace-sets\n const pre = m.pre;\n const post = m.post.length ? expand_(m.post, max, false) : [''];\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 }\n else {\n const isNumericSequence = /^-?\\d+\\.\\.-?\\d+(?:\\.\\.-?\\d+)?$/.test(m.body);\n const isAlphaSequence = /^[a-zA-Z]\\.\\.[a-zA-Z](?:\\.\\.-?\\d+)?$/.test(m.body);\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 let n;\n if (isSequence) {\n n = m.body.split(/\\.\\./);\n }\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 // at this point, n is the parts, and we know it's not a comma set\n // with a single entry.\n let 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.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 = [];\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 }\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 }\n else {\n c = z + c;\n }\n }\n }\n }\n N.push(c);\n }\n }\n else {\n N = [];\n for (let j = 0; j < n.length; j++) {\n N.push.apply(N, expand_(n[j], max, false));\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 return expansions;\n}\n//# sourceMappingURL=index.js.map","const MAX_PATTERN_LENGTH = 1024 * 64;\nexport const assertValidPattern = (pattern) => {\n if (typeof pattern !== 'string') {\n throw new TypeError('invalid pattern');\n }\n if (pattern.length > MAX_PATTERN_LENGTH) {\n throw new TypeError('pattern is too long');\n }\n};\n//# sourceMappingURL=assert-valid-pattern.js.map","// translate the various posix character classes into unicode properties\n// this works across all unicode locales\n// { <posix class>: [<translation>, /u flag required, negated]\nconst posixClasses = {\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// only need to escape a few things inside of brace expressions\n// escapes: [ \\ ] -\nconst braceEscape = (s) => s.replace(/[[\\]\\\\-]/g, '\\\\$&');\n// escape all regexp magic characters\nconst regexpEscape = (s) => s.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&');\n// everything has already been escaped, we just have to join\nconst rangesToString = (ranges) => ranges.join('');\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 = (glob, position) => {\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 = [];\n const negs = [];\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 if (c === ']' && sawStart && !escaping) {\n endPos = i + 1;\n break;\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)\n negs.push(unip);\n else\n ranges.push(unip);\n uflag = uflag || u;\n continue WHILE;\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 }\n else if (c === rangeStart) {\n ranges.push(braceEscape(c));\n }\n rangeStart = '';\n i++;\n continue;\n }\n // now might be the start of a range.\n // can be either c-d or c-] or c<more...>] 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 // not the start of a range, just a single character\n ranges.push(braceEscape(c));\n i++;\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 // 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 // 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 (negs.length === 0 &&\n ranges.length === 1 &&\n /^\\\\?.$/.test(ranges[0]) &&\n !negate) {\n const r = ranges[0].length === 2 ? ranges[0].slice(-1) : ranges[0];\n return [regexpEscape(r), false, endPos - pos, false];\n }\n const sranges = '[' + (negate ? '^' : '') + rangesToString(ranges) + ']';\n const snegs = '[' + (negate ? '' : '^') + rangesToString(negs) + ']';\n const comb = ranges.length && negs.length ? '(' + sranges + '|' + snegs + ')'\n : ranges.length ? sranges\n : snegs;\n return [comb, uflag, endPos - pos, true];\n};\n//# sourceMappingURL=brace-expressions.js.map","/**\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 */\nexport const unescape = (s, { windowsPathsNoEscape = false, magicalBraces = true, } = {}) => {\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//# sourceMappingURL=unescape.js.map","// parse a single path portion\nvar _a;\nimport { parseClass } from './brace-expressions.js';\nimport { unescape } from './unescape.js';\nconst types = new Set(['!', '?', '+', '*', '@']);\nconst isExtglobType = (c) => types.has(c);\nconst isExtglobAST = (c) => isExtglobType(c.type);\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// 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// union of the previous two maps\nconst adoptionAnyMap = new Map([\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 ['!', 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// 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// 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) => s.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&');\n// any single thing other than /\nconst qmark = '[^/]';\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// remove the \\ chars that we added if we end up doing a nonmagic compare\n// const deslash = (s: string) => s.replace(/\\\\(.)/g, '$1')\nlet ID = 0;\nexport class AST {\n type;\n #root;\n #hasMagic;\n #uflag = false;\n #parts = [];\n #parent;\n #parentIndex;\n #negs;\n #filledNegs = false;\n #options;\n #toString;\n // set to true if it's an extglob with no children\n // (which really means one child of '')\n #emptyExt = false;\n id = ++ID;\n get depth() {\n return (this.#parent?.depth ?? -1) + 1;\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 constructor(type, parent, options = {}) {\n this.type = type;\n // extglobs are inherently magical\n if (type)\n 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)\n this.#negs.push(this);\n this.#parentIndex = this.#parent ? this.#parent.#parts.length : 0;\n }\n get hasMagic() {\n /* c8 ignore start */\n if (this.#hasMagic !== undefined)\n return this.#hasMagic;\n /* c8 ignore stop */\n for (const p of this.#parts) {\n if (typeof p === 'string')\n continue;\n if (p.type || p.hasMagic)\n 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 // reconstructs the pattern\n toString() {\n return (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 #fillNegs() {\n /* c8 ignore start */\n if (this !== this.#root)\n throw new Error('should only call on root');\n if (this.#filledNegs)\n return this;\n /* c8 ignore stop */\n // call toString() once to fill this out\n this.toString();\n this.#filledNegs = true;\n let n;\n while ((n = this.#negs.pop())) {\n if (n.type !== '!')\n continue;\n // walk up the tree, appending everthing that comes AFTER parentIndex\n let p = n;\n let pp = p.#parent;\n while (pp) {\n for (let i = p.#parentIndex + 1; !pp.type && i < pp.#parts.length; i++) {\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 push(...parts) {\n for (const p of parts) {\n if (p === '')\n continue;\n /* c8 ignore start */\n if (typeof p !== 'string' &&\n !(p instanceof _a && p.#parent === this)) {\n throw new Error('invalid part: ' + p);\n }\n /* c8 ignore stop */\n this.#parts.push(p);\n }\n }\n toJSON() {\n const ret = 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.toJSON())];\n if (this.isStart() && !this.type)\n ret.unshift([]);\n if (this.isEnd() &&\n (this === this.#root ||\n (this.#root.#filledNegs && this.#parent?.type === '!'))) {\n ret.push({});\n }\n return ret;\n }\n isStart() {\n if (this.#root === this)\n return true;\n // if (this.type) return !!this.#parent?.isStart()\n if (!this.#parent?.isStart())\n return false;\n if (this.#parentIndex === 0)\n 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 _a && pp.type === '!')) {\n return false;\n }\n }\n return true;\n }\n isEnd() {\n if (this.#root === this)\n return true;\n if (this.#parent?.type === '!')\n return true;\n if (!this.#parent?.isEnd())\n return false;\n if (!this.type)\n 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 copyIn(part) {\n if (typeof part === 'string')\n this.push(part);\n else\n this.push(part.clone(this));\n }\n clone(parent) {\n const c = new _a(this.type, parent);\n for (const p of this.#parts) {\n c.copyIn(p);\n }\n return c;\n }\n static #parseAST(str, ast, pos, opt, extDepth) {\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 if (inBrace) {\n if (i === braceStart + 1) {\n if (c === '^' || c === '!') {\n braceNeg = true;\n }\n }\n else if (c === ']' && !(i === braceStart + 2 && braceNeg)) {\n inBrace = false;\n }\n acc += c;\n continue;\n }\n else if (c === '[') {\n inBrace = true;\n braceStart = i;\n braceNeg = false;\n acc += c;\n continue;\n }\n // we don't have to check for adoption here, because that's\n // done at the other recursion point.\n const doRecurse = !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 _a(c, ast);\n i = _a.#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 // some kind of extglob, pos is at the (\n // find the next | or )\n let i = pos + 1;\n let part = new _a(null, ast);\n const parts = [];\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 if (inBrace) {\n if (i === braceStart + 1) {\n if (c === '^' || c === '!') {\n braceNeg = true;\n }\n }\n else if (c === ']' && !(i === braceStart + 2 && braceNeg)) {\n inBrace = false;\n }\n acc += c;\n continue;\n }\n else if (c === '[') {\n inBrace = true;\n braceStart = i;\n braceNeg = false;\n acc += c;\n continue;\n }\n const doRecurse = !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 _a(c, part);\n part.push(ext);\n i = _a.#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 _a(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 // 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 #canAdoptWithSpace(child) {\n return this.#canAdopt(child, adoptionWithSpaceMap);\n }\n #canAdopt(child, map = adoptionMap) {\n if (!child ||\n typeof child !== 'object' ||\n child.type !== null ||\n child.#parts.length !== 1 ||\n this.type === null) {\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.#canAdoptType(gc.type, map);\n }\n #canAdoptType(c, map = adoptionAnyMap) {\n return !!map.get(this.type)?.includes(c);\n }\n #adoptWithSpace(child, index) {\n const gc = child.#parts[0];\n const blank = new _a(null, gc, this.options);\n blank.#parts.push('');\n gc.push(blank);\n this.#adopt(child, index);\n }\n #adopt(child, index) {\n const gc = child.#parts[0];\n this.#parts.splice(index, 1, ...gc.#parts);\n for (const p of gc.#parts) {\n if (typeof p === 'object')\n p.#parent = this;\n }\n this.#toString = undefined;\n }\n #canUsurpType(c) {\n const m = usurpMap.get(this.type);\n return !!m?.has(c);\n }\n #canUsurp(child) {\n if (!child ||\n typeof child !== 'object' ||\n child.type !== null ||\n child.#parts.length !== 1 ||\n this.type === null ||\n this.#parts.length !== 1) {\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.#canUsurpType(gc.type);\n }\n #usurp(child) {\n const m = usurpMap.get(this.type);\n const gc = child.#parts[0];\n const nt = m?.get(gc.type);\n /* c8 ignore start - impossible */\n if (!nt)\n 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 static fromGlob(pattern, options = {}) {\n const ast = new _a(null, undefined, options);\n _a.#parseAST(pattern, ast, 0, options, 0);\n return ast;\n }\n // returns the regular expression if there's magic, or the unescaped\n // string if not.\n toMMPattern() {\n // should only be called on root\n /* c8 ignore start */\n if (this !== this.#root)\n 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 = 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 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 get options() {\n return this.#options;\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(allowDot) {\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 = 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] = typeof p === 'string' ?\n _a.#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 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 // '.' and '..' cannot match unless the pattern is that exactly,\n // even if it starts with . or dot:true is set.\n const dotTravAllowed = 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 start =\n needNoTrav ? startNoTraversal\n : needNoDot ? startNoDot\n : '';\n }\n }\n }\n // append the \"end of path portion\" pattern to negation tails\n let end = '';\n if (this.isEnd() &&\n this.#root.#filledNegs &&\n this.#parent?.type === '!') {\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 // 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 const repeated = this.type === '*' || this.type === '+';\n // some kind of extglob\n const start = this.type === '!' ? '(?:(?!(?:' : '(?:';\n let body = this.#partsToRegExp(dot);\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;\n me.#parts = [s];\n me.type = null;\n me.#hasMagic = undefined;\n return [s, unescape(this.toString()), false, false];\n }\n let bodyDotAllowed = !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 // 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 }\n else {\n const close = 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 #flatten() {\n if (!isExtglobAST(this)) {\n for (const p of this.#parts) {\n if (typeof p === 'object') {\n p.#flatten();\n }\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 }\n else if (this.#canAdoptWithSpace(c)) {\n done = false;\n this.#adoptWithSpace(c, i);\n }\n else if (this.#canUsurp(c)) {\n done = false;\n this.#usurp(c);\n }\n }\n }\n } while (!done && ++iterations < 10);\n }\n this.#toString = undefined;\n }\n #partsToRegExp(dot) {\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 static #parseGlob(glob, hasMagic, noEmpty = false) {\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)\n continue;\n inStar = true;\n re += noEmpty && /^[*]+$/.test(glob) ? starNoEmpty : star;\n hasMagic = true;\n continue;\n }\n else {\n inStar = false;\n }\n if (c === '\\\\') {\n if (i === glob.length - 1) {\n re += '\\\\\\\\';\n }\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_a = AST;\n//# sourceMappingURL=ast.js.map","/**\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 = (s, { windowsPathsNoEscape = false, magicalBraces = false, } = {}) => {\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//# sourceMappingURL=escape.js.map","import { expand } from 'brace-expansion';\nimport { assertValidPattern } from './assert-valid-pattern.js';\nimport { AST } from './ast.js';\nimport { escape } from './escape.js';\nimport { unescape } from './unescape.js';\nexport const minimatch = (p, pattern, options = {}) => {\n assertValidPattern(pattern);\n // shortcut: comments match nothing.\n if (!options.nocomment && pattern.charAt(0) === '#') {\n return false;\n }\n return new Minimatch(pattern, options).match(p);\n};\n// Optimized checking for the most common glob patterns.\nconst starDotExtRE = /^\\*+([^+@!?*[(]*)$/;\nconst starDotExtTest = (ext) => (f) => !f.startsWith('.') && f.endsWith(ext);\nconst starDotExtTestDot = (ext) => (f) => f.endsWith(ext);\nconst starDotExtTestNocase = (ext) => {\n ext = ext.toLowerCase();\n return (f) => !f.startsWith('.') && f.toLowerCase().endsWith(ext);\n};\nconst starDotExtTestNocaseDot = (ext) => {\n ext = ext.toLowerCase();\n return (f) => f.toLowerCase().endsWith(ext);\n};\nconst starDotStarRE = /^\\*+\\.\\*+$/;\nconst starDotStarTest = (f) => !f.startsWith('.') && f.includes('.');\nconst starDotStarTestDot = (f) => f !== '.' && f !== '..' && f.includes('.');\nconst dotStarRE = /^\\.\\*+$/;\nconst dotStarTest = (f) => f !== '.' && f !== '..' && f.startsWith('.');\nconst starRE = /^\\*+$/;\nconst starTest = (f) => f.length !== 0 && !f.startsWith('.');\nconst starTestDot = (f) => f.length !== 0 && f !== '.' && f !== '..';\nconst qmarksRE = /^\\?+([^+@!?*[(]*)?$/;\nconst qmarksTestNocase = ([$0, ext = '']) => {\n const noext = qmarksTestNoExt([$0]);\n if (!ext)\n return noext;\n ext = ext.toLowerCase();\n return (f) => noext(f) && f.toLowerCase().endsWith(ext);\n};\nconst qmarksTestNocaseDot = ([$0, ext = '']) => {\n const noext = qmarksTestNoExtDot([$0]);\n if (!ext)\n return noext;\n ext = ext.toLowerCase();\n return (f) => noext(f) && f.toLowerCase().endsWith(ext);\n};\nconst qmarksTestDot = ([$0, ext = '']) => {\n const noext = qmarksTestNoExtDot([$0]);\n return !ext ? noext : (f) => noext(f) && f.endsWith(ext);\n};\nconst qmarksTest = ([$0, ext = '']) => {\n const noext = qmarksTestNoExt([$0]);\n return !ext ? noext : (f) => noext(f) && f.endsWith(ext);\n};\nconst qmarksTestNoExt = ([$0]) => {\n const len = $0.length;\n return (f) => f.length === len && !f.startsWith('.');\n};\nconst qmarksTestNoExtDot = ([$0]) => {\n const len = $0.length;\n return (f) => f.length === len && f !== '.' && f !== '..';\n};\n/* c8 ignore start */\nconst defaultPlatform = (typeof process === 'object' && process ?\n (typeof process.env === 'object' &&\n process.env &&\n process.env.__MINIMATCH_TESTING_PLATFORM__) ||\n process.platform\n : 'posix');\nconst path = {\n win32: { sep: '\\\\' },\n posix: { sep: '/' },\n};\n/* c8 ignore stop */\nexport const sep = defaultPlatform === 'win32' ? path.win32.sep : path.posix.sep;\nminimatch.sep = sep;\nexport const GLOBSTAR = Symbol('globstar **');\nminimatch.GLOBSTAR = GLOBSTAR;\n// any single thing other than /\n// don't need to escape / when using new RegExp()\nconst qmark = '[^/]';\n// * => any number of characters\nconst star = qmark + '*?';\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// not a ^ or / followed by a dot,\n// followed by anything, any number of times.\nconst twoStarNoDot = '(?:(?!(?:\\\\/|^)\\\\.).)*?';\nexport const filter = (pattern, options = {}) => (p) => minimatch(p, pattern, options);\nminimatch.filter = filter;\nconst ext = (a, b = {}) => Object.assign({}, a, b);\nexport const defaults = (def) => {\n if (!def || typeof def !== 'object' || !Object.keys(def).length) {\n return minimatch;\n }\n const orig = minimatch;\n const m = (p, pattern, options = {}) => orig(p, pattern, ext(def, options));\n return Object.assign(m, {\n Minimatch: class Minimatch extends orig.Minimatch {\n constructor(pattern, options = {}) {\n super(pattern, ext(def, options));\n }\n static defaults(options) {\n return orig.defaults(ext(def, options)).Minimatch;\n }\n },\n AST: class AST extends orig.AST {\n /* c8 ignore start */\n constructor(type, parent, options = {}) {\n super(type, parent, ext(def, options));\n }\n /* c8 ignore stop */\n static fromGlob(pattern, options = {}) {\n return orig.AST.fromGlob(pattern, ext(def, options));\n }\n },\n unescape: (s, options = {}) => orig.unescape(s, ext(def, options)),\n escape: (s, options = {}) => orig.escape(s, ext(def, options)),\n filter: (pattern, options = {}) => orig.filter(pattern, ext(def, options)),\n defaults: (options) => orig.defaults(ext(def, options)),\n makeRe: (pattern, options = {}) => orig.makeRe(pattern, ext(def, options)),\n braceExpand: (pattern, options = {}) => orig.braceExpand(pattern, ext(def, options)),\n match: (list, pattern, options = {}) => orig.match(list, pattern, ext(def, options)),\n sep: orig.sep,\n GLOBSTAR: GLOBSTAR,\n });\n};\nminimatch.defaults = defaults;\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 = (pattern, options = {}) => {\n assertValidPattern(pattern);\n // Thanks to Yeting Li <https://github.com/yetingli> 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 return expand(pattern, { max: options.braceExpandMax });\n};\nminimatch.braceExpand = braceExpand;\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.\nexport const makeRe = (pattern, options = {}) => new Minimatch(pattern, options).makeRe();\nminimatch.makeRe = makeRe;\nexport const match = (list, pattern, options = {}) => {\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// replace stuff like \\* with *\nconst globMagic = /[?*]|[+@!]\\(.*?\\)|\\[|\\]/;\nconst regExpEscape = (s) => s.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&');\nexport class Minimatch {\n options;\n set;\n pattern;\n windowsPathsNoEscape;\n nonegate;\n negate;\n comment;\n empty;\n preserveMultipleSlashes;\n partial;\n globSet;\n globParts;\n nocase;\n isWindows;\n platform;\n windowsNoMagicRoot;\n maxGlobstarRecursion;\n regexp;\n constructor(pattern, options = {}) {\n assertValidPattern(pattern);\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');\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 this.globSet = [];\n this.globParts = [];\n this.set = [];\n // make the set of regexps etc.\n this.make();\n }\n hasMagic() {\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')\n return true;\n }\n }\n return false;\n }\n debug(..._) { }\n make() {\n const pattern = this.pattern;\n const options = this.options;\n // empty patterns and comments match nothing.\n if (!options.nocomment && pattern.charAt(0) === '#') {\n this.comment = true;\n return;\n }\n if (!pattern) {\n this.empty = true;\n return;\n }\n // step 1: figure out negation, etc.\n this.parseNegate();\n // step 2: expand braces\n this.globSet = [...new Set(this.braceExpand())];\n if (options.debug) {\n //oxlint-disable-next-line no-console\n this.debug = (...args) => console.error(...args);\n }\n this.debug(this.pattern, this.globSet);\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 // 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 = 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 }\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 this.debug(this.pattern, set);\n // filter out everything that didn't compile properly.\n this.set = set.filter(s => s.indexOf(false) === -1);\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 (p[0] === '' &&\n p[1] === '' &&\n this.globParts[i][2] === '?' &&\n typeof p[3] === 'string' &&\n /^[a-z]:$/i.test(p[3])) {\n p[2] = '?';\n }\n }\n }\n this.debug(this.pattern, this.set);\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) {\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 const { optimizationLevel = 1 } = this.options;\n if (optimizationLevel >= 2) {\n // aggressive optimization for the purpose of fs walking\n globParts = this.firstPhasePreProcess(globParts);\n globParts = this.secondPhasePreProcess(globParts);\n }\n else if (optimizationLevel >= 1) {\n // just basic optimizations to remove some .. parts\n globParts = this.levelOneOptimize(globParts);\n }\n else {\n // just collapse multiple ** portions into one\n globParts = this.adjascentGlobstarOptimize(globParts);\n }\n return globParts;\n }\n // just get rid of adjascent ** portions\n adjascentGlobstarOptimize(globParts) {\n return globParts.map(parts => {\n let gs = -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 // get rid of adjascent ** and resolve .. portions\n levelOneOptimize(globParts) {\n return globParts.map(parts => {\n parts = parts.reduce((set, 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 levelTwoFileOptimize(parts) {\n if (!Array.isArray(parts)) {\n parts = this.slashSplit(parts);\n }\n let didSomething = false;\n do {\n didSomething = false;\n // <pre>/<e>/<rest> -> <pre>/<rest>\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] === '')\n continue;\n if (p === '.' || p === '') {\n didSomething = true;\n parts.splice(i, 1);\n i--;\n }\n }\n if (parts[0] === '.' &&\n parts.length === 2 &&\n (parts[1] === '.' || parts[1] === '')) {\n didSomething = true;\n parts.pop();\n }\n }\n // <pre>/<p>/../<rest> -> <pre>/<rest>\n let dd = 0;\n while (-1 !== (dd = parts.indexOf('..', dd + 1))) {\n const p = parts[dd - 1];\n if (p &&\n p !== '.' &&\n p !== '..' &&\n p !== '**' &&\n !(this.isWindows && /^[a-z]:$/i.test(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 // First phase: single-pattern processing\n // <pre> is 1 or more portions\n // <rest> is 1 or more portions\n // <p> is any portion other than ., .., '', or **\n // <e> 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 // <pre>/**/../<p>/<p>/<rest> -> {<pre>/../<p>/<p>/<rest>,<pre>/**/<p>/<p>/<rest>}\n // <pre>/<e>/<rest> -> <pre>/<rest>\n // <pre>/<p>/../<rest> -> <pre>/<rest>\n // **/**/<rest> -> **/<rest>\n //\n // **/*/<rest> -> */**/<rest> <== not valid because ** doesn't follow\n // this WOULD be allowed if ** did follow symlinks, or * didn't\n firstPhasePreProcess(globParts) {\n let didSomething = false;\n do {\n didSomething = false;\n // <pre>/**/../<p>/<p>/<rest> -> {<pre>/../<p>/<p>/<rest>,<pre>/**/<p>/<p>/<rest>}\n for (let parts of globParts) {\n let gs = -1;\n while (-1 !== (gs = parts.indexOf('**', gs + 1))) {\n let gss = gs;\n while (parts[gss + 1] === '**') {\n // <pre>/**/**/<rest> -> <pre>/**/<rest>\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 let next = parts[gs + 1];\n const p = parts[gs + 2];\n const p2 = parts[gs + 3];\n if (next !== '..')\n continue;\n if (!p ||\n p === '.' ||\n p === '..' ||\n !p2 ||\n p2 === '.' ||\n p2 === '..') {\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 // <pre>/<e>/<rest> -> <pre>/<rest>\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] === '')\n continue;\n if (p === '.' || p === '') {\n didSomething = true;\n parts.splice(i, 1);\n i--;\n }\n }\n if (parts[0] === '.' &&\n parts.length === 2 &&\n (parts[1] === '.' || parts[1] === '')) {\n didSomething = true;\n parts.pop();\n }\n }\n // <pre>/<p>/../<rest> -> <pre>/<rest>\n let dd = 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)\n parts.push('');\n dd -= 2;\n }\n }\n }\n } while (didSomething);\n return globParts;\n }\n // second phase: multi-pattern dedupes\n // {<pre>/*/<rest>,<pre>/<p>/<rest>} -> <pre>/*/<rest>\n // {<pre>/<rest>,<pre>/<rest>} -> <pre>/<rest>\n // {<pre>/**/<rest>,<pre>/<rest>} -> <pre>/**/<rest>\n //\n // {<pre>/**/<rest>,<pre>/**/<p>/<rest>} -> <pre>/**/<rest>\n // ^-- not valid because ** doens't follow symlinks\n secondPhasePreProcess(globParts) {\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(globParts[i], globParts[j], !this.preserveMultipleSlashes);\n if (matched) {\n globParts[i] = [];\n globParts[j] = matched;\n break;\n }\n }\n }\n return globParts.filter(gs => gs.length);\n }\n partsMatch(a, b, emptyGSMatch = false) {\n let ai = 0;\n let bi = 0;\n let result = [];\n let which = '';\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 }\n else if (emptyGSMatch && a[ai] === '**' && b[bi] === a[ai + 1]) {\n result.push(a[ai]);\n ai++;\n }\n else if (emptyGSMatch && b[bi] === '**' && a[ai] === b[bi + 1]) {\n result.push(b[bi]);\n bi++;\n }\n else if (a[ai] === '*' &&\n b[bi] &&\n (this.options.dot || !b[bi].startsWith('.')) &&\n b[bi] !== '**') {\n if (which === 'b')\n return false;\n which = 'a';\n result.push(a[ai]);\n ai++;\n bi++;\n }\n else if (b[bi] === '*' &&\n a[ai] &&\n (this.options.dot || !a[ai].startsWith('.')) &&\n a[ai] !== '**') {\n if (which === 'a')\n return false;\n which = 'b';\n result.push(b[bi]);\n ai++;\n bi++;\n }\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 parseNegate() {\n if (this.nonegate)\n return;\n const pattern = this.pattern;\n let negate = false;\n let negateOffset = 0;\n for (let i = 0; i < pattern.length && pattern.charAt(i) === '!'; i++) {\n negate = !negate;\n negateOffset++;\n }\n if (negateOffset)\n this.pattern = pattern.slice(negateOffset);\n this.negate = negate;\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, pattern, partial = false) {\n let fileStartIndex = 0;\n let patternStartIndex = 0;\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 = !fileDrive &&\n file[0] === '' &&\n file[1] === '' &&\n file[2] === '?' &&\n /^[a-z]:$/i.test(file[3]);\n const patternDrive = typeof pattern[0] === 'string' && /^[a-z]:$/i.test(pattern[0]);\n const patternUNC = !patternDrive &&\n pattern[0] === '' &&\n pattern[1] === '' &&\n pattern[2] === '?' &&\n typeof pattern[3] === 'string' &&\n /^[a-z]:$/i.test(pattern[3]);\n const fdi = fileUNC ? 3\n : fileDrive ? 0\n : undefined;\n const pdi = patternUNC ? 3\n : patternDrive ? 0\n : undefined;\n if (typeof fdi === 'number' && typeof pdi === 'number') {\n const [fd, pd] = [\n file[fdi],\n pattern[pdi],\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 // 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 if (pattern.includes(GLOBSTAR)) {\n return this.#matchGlobstar(file, pattern, partial, fileStartIndex, patternStartIndex);\n }\n return this.#matchOne(file, pattern, partial, fileStartIndex, patternStartIndex);\n }\n #matchGlobstar(file, pattern, partial, fileIndex, patternIndex) {\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 // 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] = 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 // 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 // if the last portion is not empty, it MUST match the end\n // check the tail\n let fileTailMatch = 0;\n if (tail.length) {\n // if head + tail > file, then we cannot possibly match\n if (tail.length + fileIndex > file.length)\n return false;\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 }\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 (file[file.length - 1] !== '' ||\n fileIndex + tail.length === file.length) {\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 // now we know the tail matches!\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 (f === '.' ||\n f === '..' ||\n (!this.options.dot && f.startsWith('.'))) {\n return false;\n }\n }\n // in partial mode, we just need to get past all file parts\n return partial || sawSome;\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 = [[[], 0]];\n let currentBody = bodySegments[0];\n let nonGsParts = 0;\n const nonGsPartsSums = [0];\n for (const b of body) {\n if (b === GLOBSTAR) {\n nonGsPartsSums.push(nonGsParts);\n currentBody = [[], 0];\n bodySegments.push(currentBody);\n }\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--] + b[0].length);\n }\n return !!this.#matchGlobStarBodySections(file, bodySegments, fileIndex, 0, partial, 0, !!fileTailMatch);\n }\n // return false for \"nope, not matching\"\n // return null for \"not matching, cannot keep trying\"\n #matchGlobStarBodySections(file, \n // pattern section, last possible position for it\n bodySegments, fileIndex, bodyIndex, partial, globStarDepth, sawTail) {\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 (f === '.' ||\n f === '..' ||\n (!this.options.dot && f.startsWith('.'))) {\n return false;\n }\n }\n return sawTail;\n }\n // have a non-globstar body section to test\n const [body, after] = bs;\n while (fileIndex <= after) {\n const m = this.#matchOne(file.slice(0, fileIndex + body.length), body, partial, fileIndex, 0);\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(file, bodySegments, fileIndex + body.length, bodyIndex + 1, partial, globStarDepth + 1, sawTail);\n if (sub !== false) {\n return sub;\n }\n }\n const f = file[fileIndex];\n if (f === '.' ||\n f === '..' ||\n (!this.options.dot && f.startsWith('.'))) {\n return false;\n }\n fileIndex++;\n }\n // walked off. no point continuing\n return partial || null;\n }\n #matchOne(file, pattern, partial, fileIndex, patternIndex) {\n let fi;\n let pi;\n let pl;\n let fl;\n for (fi = fileIndex,\n pi = patternIndex,\n fl = file.length,\n pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {\n this.debug('matchOne loop');\n let p = pattern[pi];\n let f = file[fi];\n this.debug(pattern, p, f);\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 // something other than **\n // non-magic patterns just have to match exactly\n // patterns with magic have been turned into regexps.\n let hit;\n if (typeof p === 'string') {\n hit = f === p;\n this.debug('string match', p, f, hit);\n }\n else {\n hit = p.test(f);\n this.debug('pattern match', p, f, hit);\n }\n if (!hit)\n return false;\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 // 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 }\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 }\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 /* c8 ignore start */\n }\n else {\n // should be unreachable.\n throw new Error('wtf?');\n }\n /* c8 ignore stop */\n }\n braceExpand() {\n return braceExpand(this.pattern, this.options);\n }\n parse(pattern) {\n assertValidPattern(pattern);\n const options = this.options;\n // shortcuts\n if (pattern === '**')\n return GLOBSTAR;\n if (pattern === '')\n return '';\n // far and away, the most common glob pattern parts are\n // *, *.*, and *.<ext> Add a fast check method for those.\n let m;\n let fastTest = null;\n if ((m = pattern.match(starRE))) {\n fastTest = options.dot ? starTestDot : starTest;\n }\n else if ((m = pattern.match(starDotExtRE))) {\n fastTest = (options.nocase ?\n options.dot ?\n starDotExtTestNocaseDot\n : starDotExtTestNocase\n : options.dot ? starDotExtTestDot\n : starDotExtTest)(m[1]);\n }\n else if ((m = pattern.match(qmarksRE))) {\n fastTest = (options.nocase ?\n options.dot ?\n qmarksTestNocaseDot\n : qmarksTestNocase\n : options.dot ? qmarksTestDot\n : qmarksTest)(m);\n }\n else if ((m = pattern.match(starDotStarRE))) {\n fastTest = options.dot ? starDotStarTestDot : starDotStarTest;\n }\n else if ((m = pattern.match(dotStarRE))) {\n fastTest = dotStarTest;\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 makeRe() {\n if (this.regexp || this.regexp === false)\n return this.regexp;\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 if (!set.length) {\n this.regexp = false;\n return this.regexp;\n }\n const options = this.options;\n const twoStar = options.noglobstar ? star\n : options.dot ? twoStarDot\n : twoStarNoDot;\n const flags = new Set(options.nocase ? ['i'] : []);\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 = pattern.map(p => {\n if (p instanceof RegExp) {\n for (const f of p.flags.split(''))\n flags.add(f);\n }\n return (typeof p === 'string' ? regExpEscape(p)\n : p === GLOBSTAR ? GLOBSTAR\n : p._src);\n });\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 }\n else {\n pp[i] = twoStar;\n }\n }\n else if (next === undefined) {\n pp[i - 1] = prev + '(?:\\\\/|\\\\/' + twoStar + ')?';\n }\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 // 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 = [];\n for (let i = 1; i <= filtered.length; i++) {\n prefixes.push(filtered.slice(0, i).join('/'));\n }\n return '(?:' + prefixes.join('|') + ')';\n }\n return filtered.join('/');\n })\n .join('|');\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 // 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 // can match anything, as long as it's not this.\n if (this.negate)\n re = '^(?!' + re + ').+$';\n try {\n this.regexp = new RegExp(re, [...flags].join(''));\n /* c8 ignore start */\n }\n catch {\n // should be impossible\n this.regexp = false;\n }\n /* c8 ignore stop */\n return this.regexp;\n }\n slashSplit(p) {\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 }\n else if (this.isWindows && /^\\/\\/[^/]+/.test(p)) {\n // add an extra '' for the one we lose\n return ['', ...p.split(/\\/+/)];\n }\n else {\n return p.split(/\\/+/);\n }\n }\n match(f, 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 if (f === '/' && partial) {\n return true;\n }\n const options = this.options;\n // windows: need to use /, not \\\n if (this.isWindows) {\n f = f.split('\\\\').join('/');\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 // 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 const set = this.set;\n this.debug(this.pattern, 'set', set);\n // Find the basename of the path by looking for the last non-empty segment\n let filename = 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 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 // 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 static defaults(def) {\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//# sourceMappingURL=index.js.map","/**\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\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","'use strict';\n\nmodule.exports = (flag, argv = process.argv) => {\n\tconst prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');\n\tconst position = argv.indexOf(prefix + flag);\n\tconst terminatorPosition = argv.indexOf('--');\n\treturn position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);\n};\n","'use strict';\nconst os = require('os');\nconst tty = require('tty');\nconst hasFlag = require('has-flag');\n\nconst {env} = process;\n\nlet forceColor;\nif (hasFlag('no-color') ||\n\thasFlag('no-colors') ||\n\thasFlag('color=false') ||\n\thasFlag('color=never')) {\n\tforceColor = 0;\n} else if (hasFlag('color') ||\n\thasFlag('colors') ||\n\thasFlag('color=true') ||\n\thasFlag('color=always')) {\n\tforceColor = 1;\n}\n\nif ('FORCE_COLOR' in env) {\n\tif (env.FORCE_COLOR === 'true') {\n\t\tforceColor = 1;\n\t} else if (env.FORCE_COLOR === 'false') {\n\t\tforceColor = 0;\n\t} else {\n\t\tforceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);\n\t}\n}\n\nfunction translateLevel(level) {\n\tif (level === 0) {\n\t\treturn false;\n\t}\n\n\treturn {\n\t\tlevel,\n\t\thasBasic: true,\n\t\thas256: level >= 2,\n\t\thas16m: level >= 3\n\t};\n}\n\nfunction supportsColor(haveStream, streamIsTTY) {\n\tif (forceColor === 0) {\n\t\treturn 0;\n\t}\n\n\tif (hasFlag('color=16m') ||\n\t\thasFlag('color=full') ||\n\t\thasFlag('color=truecolor')) {\n\t\treturn 3;\n\t}\n\n\tif (hasFlag('color=256')) {\n\t\treturn 2;\n\t}\n\n\tif (haveStream && !streamIsTTY && forceColor === undefined) {\n\t\treturn 0;\n\t}\n\n\tconst min = forceColor || 0;\n\n\tif (env.TERM === 'dumb') {\n\t\treturn min;\n\t}\n\n\tif (process.platform === 'win32') {\n\t\t// Windows 10 build 10586 is the first Windows release that supports 256 colors.\n\t\t// Windows 10 build 14931 is the first release that supports 16m/TrueColor.\n\t\tconst osRelease = os.release().split('.');\n\t\tif (\n\t\t\tNumber(osRelease[0]) >= 10 &&\n\t\t\tNumber(osRelease[2]) >= 10586\n\t\t) {\n\t\t\treturn Number(osRelease[2]) >= 14931 ? 3 : 2;\n\t\t}\n\n\t\treturn 1;\n\t}\n\n\tif ('CI' in env) {\n\t\tif (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI', 'GITHUB_ACTIONS', 'BUILDKITE'].some(sign => sign in env) || env.CI_NAME === 'codeship') {\n\t\t\treturn 1;\n\t\t}\n\n\t\treturn min;\n\t}\n\n\tif ('TEAMCITY_VERSION' in env) {\n\t\treturn /^(9\\.(0*[1-9]\\d*)\\.|\\d{2,}\\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;\n\t}\n\n\tif (env.COLORTERM === 'truecolor') {\n\t\treturn 3;\n\t}\n\n\tif ('TERM_PROGRAM' in env) {\n\t\tconst version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);\n\n\t\tswitch (env.TERM_PROGRAM) {\n\t\t\tcase 'iTerm.app':\n\t\t\t\treturn version >= 3 ? 3 : 2;\n\t\t\tcase 'Apple_Terminal':\n\t\t\t\treturn 2;\n\t\t\t// No default\n\t\t}\n\t}\n\n\tif (/-256(color)?$/i.test(env.TERM)) {\n\t\treturn 2;\n\t}\n\n\tif (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {\n\t\treturn 1;\n\t}\n\n\tif ('COLORTERM' in env) {\n\t\treturn 1;\n\t}\n\n\treturn min;\n}\n\nfunction getSupportLevel(stream) {\n\tconst level = supportsColor(stream, stream && stream.isTTY);\n\treturn translateLevel(level);\n}\n\nmodule.exports = {\n\tsupportsColor: getSupportLevel,\n\tstdout: translateLevel(supportsColor(true, tty.isatty(1))),\n\tstderr: translateLevel(supportsColor(true, tty.isatty(2)))\n};\n","/**\n * Module dependencies.\n */\n\nconst tty = require('tty');\nconst util = require('util');\n\n/**\n * This is the Node.js implementation of `debug()`.\n */\n\nexports.init = init;\nexports.log = log;\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.destroy = util.deprecate(\n\t() => {},\n\t'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'\n);\n\n/**\n * Colors.\n */\n\nexports.colors = [6, 2, 3, 4, 5, 1];\n\ntry {\n\t// Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)\n\t// eslint-disable-next-line import/no-extraneous-dependencies\n\tconst supportsColor = require('supports-color');\n\n\tif (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {\n\t\texports.colors = [\n\t\t\t20,\n\t\t\t21,\n\t\t\t26,\n\t\t\t27,\n\t\t\t32,\n\t\t\t33,\n\t\t\t38,\n\t\t\t39,\n\t\t\t40,\n\t\t\t41,\n\t\t\t42,\n\t\t\t43,\n\t\t\t44,\n\t\t\t45,\n\t\t\t56,\n\t\t\t57,\n\t\t\t62,\n\t\t\t63,\n\t\t\t68,\n\t\t\t69,\n\t\t\t74,\n\t\t\t75,\n\t\t\t76,\n\t\t\t77,\n\t\t\t78,\n\t\t\t79,\n\t\t\t80,\n\t\t\t81,\n\t\t\t92,\n\t\t\t93,\n\t\t\t98,\n\t\t\t99,\n\t\t\t112,\n\t\t\t113,\n\t\t\t128,\n\t\t\t129,\n\t\t\t134,\n\t\t\t135,\n\t\t\t148,\n\t\t\t149,\n\t\t\t160,\n\t\t\t161,\n\t\t\t162,\n\t\t\t163,\n\t\t\t164,\n\t\t\t165,\n\t\t\t166,\n\t\t\t167,\n\t\t\t168,\n\t\t\t169,\n\t\t\t170,\n\t\t\t171,\n\t\t\t172,\n\t\t\t173,\n\t\t\t178,\n\t\t\t179,\n\t\t\t184,\n\t\t\t185,\n\t\t\t196,\n\t\t\t197,\n\t\t\t198,\n\t\t\t199,\n\t\t\t200,\n\t\t\t201,\n\t\t\t202,\n\t\t\t203,\n\t\t\t204,\n\t\t\t205,\n\t\t\t206,\n\t\t\t207,\n\t\t\t208,\n\t\t\t209,\n\t\t\t214,\n\t\t\t215,\n\t\t\t220,\n\t\t\t221\n\t\t];\n\t}\n} catch (error) {\n\t// Swallow - we only care if `supports-color` is available; it doesn't have to be.\n}\n\n/**\n * Build up the default `inspectOpts` object from the environment variables.\n *\n * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js\n */\n\nexports.inspectOpts = Object.keys(process.env).filter(key => {\n\treturn /^debug_/i.test(key);\n}).reduce((obj, key) => {\n\t// Camel-case\n\tconst prop = key\n\t\t.substring(6)\n\t\t.toLowerCase()\n\t\t.replace(/_([a-z])/g, (_, k) => {\n\t\t\treturn k.toUpperCase();\n\t\t});\n\n\t// Coerce string value into JS value\n\tlet val = process.env[key];\n\tif (/^(yes|on|true|enabled)$/i.test(val)) {\n\t\tval = true;\n\t} else if (/^(no|off|false|disabled)$/i.test(val)) {\n\t\tval = false;\n\t} else if (val === 'null') {\n\t\tval = null;\n\t} else {\n\t\tval = Number(val);\n\t}\n\n\tobj[prop] = val;\n\treturn obj;\n}, {});\n\n/**\n * Is stdout a TTY? Colored output is enabled when `true`.\n */\n\nfunction useColors() {\n\treturn 'colors' in exports.inspectOpts ?\n\t\tBoolean(exports.inspectOpts.colors) :\n\t\ttty.isatty(process.stderr.fd);\n}\n\n/**\n * Adds ANSI color escape codes if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n\tconst {namespace: name, useColors} = this;\n\n\tif (useColors) {\n\t\tconst c = this.color;\n\t\tconst colorCode = '\\u001B[3' + (c < 8 ? c : '8;5;' + c);\n\t\tconst prefix = ` ${colorCode};1m${name} \\u001B[0m`;\n\n\t\targs[0] = prefix + args[0].split('\\n').join('\\n' + prefix);\n\t\targs.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\\u001B[0m');\n\t} else {\n\t\targs[0] = getDate() + name + ' ' + args[0];\n\t}\n}\n\nfunction getDate() {\n\tif (exports.inspectOpts.hideDate) {\n\t\treturn '';\n\t}\n\treturn new Date().toISOString() + ' ';\n}\n\n/**\n * Invokes `util.formatWithOptions()` with the specified arguments and writes to stderr.\n */\n\nfunction log(...args) {\n\treturn process.stderr.write(util.formatWithOptions(exports.inspectOpts, ...args) + '\\n');\n}\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\nfunction save(namespaces) {\n\tif (namespaces) {\n\t\tprocess.env.DEBUG = namespaces;\n\t} else {\n\t\t// If you set a process.env field to null or undefined, it gets cast to the\n\t\t// string 'null' or 'undefined'. Just delete instead.\n\t\tdelete process.env.DEBUG;\n\t}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\n\nfunction load() {\n\treturn process.env.DEBUG;\n}\n\n/**\n * Init logic for `debug` instances.\n *\n * Create a new `inspectOpts` object in case `useColors` is set\n * differently for a particular `debug` instance.\n */\n\nfunction init(debug) {\n\tdebug.inspectOpts = {};\n\n\tconst keys = Object.keys(exports.inspectOpts);\n\tfor (let i = 0; i < keys.length; i++) {\n\t\tdebug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];\n\t}\n}\n\nmodule.exports = require('./common')(exports);\n\nconst {formatters} = module.exports;\n\n/**\n * Map %o to `util.inspect()`, all on a single line.\n */\n\nformatters.o = function (v) {\n\tthis.inspectOpts.colors = this.useColors;\n\treturn util.inspect(v, this.inspectOpts)\n\t\t.split('\\n')\n\t\t.map(str => str.trim())\n\t\t.join(' ');\n};\n\n/**\n * Map %O to `util.inspect()`, allowing multiple lines if needed.\n */\n\nformatters.O = function (v) {\n\tthis.inspectOpts.colors = this.useColors;\n\treturn util.inspect(v, this.inspectOpts);\n};\n","/**\n * Detect Electron renderer / nwjs process, which is node, but we should\n * treat as a browser.\n */\n\nif (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) {\n\tmodule.exports = require('./browser.js');\n} else {\n\tmodule.exports = require('./node.js');\n}\n","// @ts-self-types=\"./index.d.ts\"\n/**\n * @fileoverview Merge Strategy\n */\n\n//-----------------------------------------------------------------------------\n// Class\n//-----------------------------------------------------------------------------\n\n/**\n * Container class for several different merge strategies.\n */\nclass MergeStrategy {\n\t/**\n\t * Merges two keys by overwriting the first with the second.\n\t * @template TValue1 The type of the value from the first object key.\n\t * @template TValue2 The type of the value from the second object key.\n\t * @param {TValue1} value1 The value from the first object key.\n\t * @param {TValue2} value2 The value from the second object key.\n\t * @returns {TValue2} The second value.\n\t */\n\tstatic overwrite(value1, value2) {\n\t\treturn value2;\n\t}\n\n\t/**\n\t * Merges two keys by replacing the first with the second only if the\n\t * second is defined.\n\t * @template TValue1 The type of the value from the first object key.\n\t * @template TValue2 The type of the value from the second object key.\n\t * @param {TValue1} value1 The value from the first object key.\n\t * @param {TValue2} value2 The value from the second object key.\n\t * @returns {TValue1 | TValue2} The second value if it is defined.\n\t */\n\tstatic replace(value1, value2) {\n\t\tif (typeof value2 !== \"undefined\") {\n\t\t\treturn value2;\n\t\t}\n\n\t\treturn value1;\n\t}\n\n\t/**\n\t * Merges two properties by assigning properties from the second to the first.\n\t * @template {Record<string | number | symbol, unknown> | undefined} TValue1 The type of the value from the first object key.\n\t * @template {Record<string | number | symbol, unknown>} TValue2 The type of the value from the second object key.\n\t * @param {TValue1} value1 The value from the first object key.\n\t * @param {TValue2} value2 The value from the second object key.\n\t * @returns {Omit<TValue1, keyof TValue2> & TValue2} A new object containing properties from both value1 and\n\t * value2.\n\t */\n\tstatic assign(value1, value2) {\n\t\treturn Object.assign({}, value1, value2);\n\t}\n}\n\n/**\n * @fileoverview Validation Strategy\n */\n\n//-----------------------------------------------------------------------------\n// Class\n//-----------------------------------------------------------------------------\n\n/**\n * Container class for several different validation strategies.\n */\nclass ValidationStrategy {\n\t/**\n\t * Validates that a value is an array.\n\t * @param {unknown} value The value to validate.\n\t * @returns {void}\n\t * @throws {TypeError} If the value is invalid.\n\t */\n\tstatic array(value) {\n\t\tif (!Array.isArray(value)) {\n\t\t\tthrow new TypeError(\"Expected an array.\");\n\t\t}\n\t}\n\n\t/**\n\t * Validates that a value is a boolean.\n\t * @param {unknown} value The value to validate.\n\t * @returns {void}\n\t * @throws {TypeError} If the value is invalid.\n\t */\n\tstatic boolean(value) {\n\t\tif (typeof value !== \"boolean\") {\n\t\t\tthrow new TypeError(\"Expected a boolean.\");\n\t\t}\n\t}\n\n\t/**\n\t * Validates that a value is a number.\n\t * @param {unknown} value The value to validate.\n\t * @returns {void}\n\t * @throws {TypeError} If the value is invalid.\n\t */\n\tstatic number(value) {\n\t\tif (typeof value !== \"number\") {\n\t\t\tthrow new TypeError(\"Expected a number.\");\n\t\t}\n\t}\n\n\t/**\n\t * Validates that a value is an object.\n\t * @param {unknown} value The value to validate.\n\t * @returns {void}\n\t * @throws {TypeError} If the value is invalid.\n\t */\n\tstatic object(value) {\n\t\tif (!value || typeof value !== \"object\") {\n\t\t\tthrow new TypeError(\"Expected an object.\");\n\t\t}\n\t}\n\n\t/**\n\t * Validates that a value is an object or null.\n\t * @param {unknown} value The value to validate.\n\t * @returns {void}\n\t * @throws {TypeError} If the value is invalid.\n\t */\n\tstatic \"object?\"(value) {\n\t\tif (typeof value !== \"object\") {\n\t\t\tthrow new TypeError(\"Expected an object or null.\");\n\t\t}\n\t}\n\n\t/**\n\t * Validates that a value is a string.\n\t * @param {unknown} value The value to validate.\n\t * @returns {void}\n\t * @throws {TypeError} If the value is invalid.\n\t */\n\tstatic string(value) {\n\t\tif (typeof value !== \"string\") {\n\t\t\tthrow new TypeError(\"Expected a string.\");\n\t\t}\n\t}\n\n\t/**\n\t * Validates that a value is a non-empty string.\n\t * @param {unknown} value The value to validate.\n\t * @returns {void}\n\t * @throws {TypeError} If the value is invalid.\n\t */\n\tstatic \"string!\"(value) {\n\t\tif (typeof value !== \"string\" || value.length === 0) {\n\t\t\tthrow new TypeError(\"Expected a non-empty string.\");\n\t\t}\n\t}\n}\n\n/**\n * @fileoverview Object Schema\n */\n\n\n//-----------------------------------------------------------------------------\n// Types\n//-----------------------------------------------------------------------------\n\n/** @import * as $typests from \"./types.ts\"; */\n/** @typedef {$typests.BuiltInMergeStrategy} BuiltInMergeStrategy */\n/** @typedef {$typests.BuiltInValidationStrategy} BuiltInValidationStrategy */\n/** @typedef {$typests.CustomMergeStrategy} CustomMergeStrategy */\n/** @typedef {$typests.CustomValidationStrategy} CustomValidationStrategy */\n/** @typedef {$typests.ObjectDefinition} ObjectDefinition */\n/** @typedef {$typests.PropertyDefinition} PropertyDefinition */\n/** @typedef {$typests.PropertyDefinitionWithSchema} PropertyDefinitionWithSchema */\n/** @typedef {$typests.PropertyDefinitionWithStrategies} PropertyDefinitionWithStrategies */\n\n//-----------------------------------------------------------------------------\n// Private\n//-----------------------------------------------------------------------------\n\n/**\n * Validates a schema strategy.\n * @param {string} name The name of the key this strategy is for.\n * @param {PropertyDefinition} definition The strategy for the object key.\n * @returns {void}\n * @throws {TypeError} When the strategy is missing a name.\n * @throws {TypeError} When the strategy is missing a merge() method.\n * @throws {TypeError} When the strategy is missing a validate() method.\n */\nfunction validateDefinition(name, definition) {\n\tlet hasSchema = false;\n\tif (definition.schema) {\n\t\tif (typeof definition.schema === \"object\") {\n\t\t\thasSchema = true;\n\t\t} else {\n\t\t\tthrow new TypeError(\"Schema must be an object.\");\n\t\t}\n\t}\n\n\tif (typeof definition.merge === \"string\") {\n\t\tif (!(definition.merge in MergeStrategy)) {\n\t\t\tthrow new TypeError(\n\t\t\t\t`Definition for key \"${name}\" missing valid merge strategy.`,\n\t\t\t);\n\t\t}\n\t} else if (!hasSchema && typeof definition.merge !== \"function\") {\n\t\tthrow new TypeError(\n\t\t\t`Definition for key \"${name}\" must have a merge property.`,\n\t\t);\n\t}\n\n\tif (typeof definition.validate === \"string\") {\n\t\tif (!(definition.validate in ValidationStrategy)) {\n\t\t\tthrow new TypeError(\n\t\t\t\t`Definition for key \"${name}\" missing valid validation strategy.`,\n\t\t\t);\n\t\t}\n\t} else if (!hasSchema && typeof definition.validate !== \"function\") {\n\t\tthrow new TypeError(\n\t\t\t`Definition for key \"${name}\" must have a validate() method.`,\n\t\t);\n\t}\n}\n\n//-----------------------------------------------------------------------------\n// Errors\n//-----------------------------------------------------------------------------\n\n/**\n * Error when an unexpected key is found.\n */\nclass UnexpectedKeyError extends Error {\n\t/**\n\t * Creates a new instance.\n\t * @param {string} key The key that was unexpected.\n\t */\n\tconstructor(key) {\n\t\tsuper(`Unexpected key \"${key}\" found.`);\n\t}\n}\n\n/**\n * Error when a required key is missing.\n */\nclass MissingKeyError extends Error {\n\t/**\n\t * Creates a new instance.\n\t * @param {string} key The key that was missing.\n\t */\n\tconstructor(key) {\n\t\tsuper(`Missing required key \"${key}\".`);\n\t}\n}\n\n/**\n * Error when a key requires other keys that are missing.\n */\nclass MissingDependentKeysError extends Error {\n\t/**\n\t * Creates a new instance.\n\t * @param {string} key The key that was unexpected.\n\t * @param {Array<string>} requiredKeys The keys that are required.\n\t */\n\tconstructor(key, requiredKeys) {\n\t\tsuper(`Key \"${key}\" requires keys \"${requiredKeys.join('\", \"')}\".`);\n\t}\n}\n\n/**\n * Wrapper error for errors occuring during a merge or validate operation.\n */\nclass WrapperError extends Error {\n\t/**\n\t * Creates a new instance.\n\t * @param {string} key The object key causing the error.\n\t * @param {Error} source The source error.\n\t */\n\tconstructor(key, source) {\n\t\tsuper(`Key \"${key}\": ${source.message}`, { cause: source });\n\n\t\t// copy over custom properties that aren't represented\n\t\tfor (const sourceKey of Object.keys(source)) {\n\t\t\tif (!(sourceKey in this)) {\n\t\t\t\tthis[sourceKey] = source[sourceKey];\n\t\t\t}\n\t\t}\n\t}\n}\n\n//-----------------------------------------------------------------------------\n// Main\n//-----------------------------------------------------------------------------\n\n/**\n * Represents an object validation/merging schema.\n */\nclass ObjectSchema {\n\t/**\n\t * Track all definitions in the schema by key.\n\t * @type {Map<string, PropertyDefinition>}\n\t */\n\t#definitions = new Map();\n\n\t/**\n\t * Separately track any keys that are required for faster validation.\n\t * @type {Map<string, PropertyDefinition>}\n\t */\n\t#requiredKeys = new Map();\n\n\t/**\n\t * Creates a new instance.\n\t * @param {ObjectDefinition} definitions The schema definitions.\n\t * @throws {Error} When the definitions are missing or invalid.\n\t */\n\tconstructor(definitions) {\n\t\tif (!definitions) {\n\t\t\tthrow new Error(\"Schema definitions missing.\");\n\t\t}\n\n\t\t// add in all strategies\n\t\tfor (const key of Object.keys(definitions)) {\n\t\t\tconst definition = definitions[key];\n\n\t\t\tvalidateDefinition(key, definition);\n\n\t\t\tlet normalizedDefinition = definition;\n\n\t\t\t// normalize merge and validate methods if subschema is present\n\t\t\tif (typeof normalizedDefinition.schema === \"object\") {\n\t\t\t\tconst schema = new ObjectSchema(normalizedDefinition.schema);\n\t\t\t\tnormalizedDefinition = {\n\t\t\t\t\t...normalizedDefinition,\n\t\t\t\t\tmerge(first = {}, second = {}) {\n\t\t\t\t\t\treturn schema.merge(first, second);\n\t\t\t\t\t},\n\t\t\t\t\tvalidate(value) {\n\t\t\t\t\t\tValidationStrategy.object(value);\n\t\t\t\t\t\tschema.validate(value);\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t}\n\n\t\t\t// normalize the merge method in case there's a string\n\t\t\tif (typeof normalizedDefinition.merge === \"string\") {\n\t\t\t\tnormalizedDefinition = {\n\t\t\t\t\t...normalizedDefinition,\n\t\t\t\t\tmerge: MergeStrategy[normalizedDefinition.merge],\n\t\t\t\t};\n\t\t\t}\n\n\t\t\t// normalize the validate method in case there's a string\n\t\t\tif (typeof normalizedDefinition.validate === \"string\") {\n\t\t\t\tnormalizedDefinition = {\n\t\t\t\t\t...normalizedDefinition,\n\t\t\t\t\tvalidate: ValidationStrategy[normalizedDefinition.validate],\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tthis.#definitions.set(key, normalizedDefinition);\n\n\t\t\tif (normalizedDefinition.required) {\n\t\t\t\tthis.#requiredKeys.set(key, normalizedDefinition);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Determines if a strategy has been registered for the given object key.\n\t * @param {string} key The object key to find a strategy for.\n\t * @returns {boolean} True if the key has a strategy registered, false if not.\n\t */\n\thasKey(key) {\n\t\treturn this.#definitions.has(key);\n\t}\n\n\t/**\n\t * Merges objects together to create a new object comprised of the keys\n\t * of the all objects. Keys are merged based on the each key's merge\n\t * strategy.\n\t * @param {...Object} objects The objects to merge.\n\t * @returns {Object} A new object with a mix of all objects' keys.\n\t * @throws {TypeError} If any object is invalid.\n\t */\n\tmerge(...objects) {\n\t\t// double check arguments\n\t\tif (objects.length < 2) {\n\t\t\tthrow new TypeError(\"merge() requires at least two arguments.\");\n\t\t}\n\n\t\tif (\n\t\t\tobjects.some(\n\t\t\t\tobject => object === null || typeof object !== \"object\",\n\t\t\t)\n\t\t) {\n\t\t\tthrow new TypeError(\"All arguments must be objects.\");\n\t\t}\n\n\t\treturn objects.reduce((result, object) => {\n\t\t\tthis.validate(object);\n\n\t\t\tfor (const [key, strategy] of this.#definitions) {\n\t\t\t\ttry {\n\t\t\t\t\tif (key in result || key in object) {\n\t\t\t\t\t\tconst merge = /** @type {Function} */ (strategy.merge);\n\t\t\t\t\t\tconst value = merge.call(\n\t\t\t\t\t\t\tthis,\n\t\t\t\t\t\t\tresult[key],\n\t\t\t\t\t\t\tobject[key],\n\t\t\t\t\t\t);\n\t\t\t\t\t\tif (value !== undefined) {\n\t\t\t\t\t\t\tresult[key] = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} catch (ex) {\n\t\t\t\t\tthrow new WrapperError(key, ex);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn result;\n\t\t}, {});\n\t}\n\n\t/**\n\t * Validates an object's keys based on the validate strategy for each key.\n\t * @param {Object} object The object to validate.\n\t * @returns {void}\n\t * @throws {Error} When the object is invalid.\n\t */\n\tvalidate(object) {\n\t\t// check existing keys first\n\t\tfor (const key of Object.keys(object)) {\n\t\t\t// check to see if the key is defined\n\t\t\tif (!this.hasKey(key)) {\n\t\t\t\tthrow new UnexpectedKeyError(key);\n\t\t\t}\n\n\t\t\t// validate existing keys\n\t\t\tconst definition = /** @type {PropertyDefinition} */ (\n\t\t\t\tthis.#definitions.get(key)\n\t\t\t); // `definition` is guaranteed to exist since we check with `hasKey()` above.\n\n\t\t\t// first check to see if any other keys are required\n\t\t\tif (Array.isArray(definition.requires)) {\n\t\t\t\tif (\n\t\t\t\t\t!definition.requires.every(otherKey => otherKey in object)\n\t\t\t\t) {\n\t\t\t\t\tthrow new MissingDependentKeysError(\n\t\t\t\t\t\tkey,\n\t\t\t\t\t\tdefinition.requires,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// now apply remaining validation strategy\n\t\t\ttry {\n\t\t\t\tconst validate = /** @type {Function} */ (definition.validate);\n\t\t\t\tvalidate.call(definition, object[key]);\n\t\t\t} catch (ex) {\n\t\t\t\tthrow new WrapperError(key, ex);\n\t\t\t}\n\t\t}\n\n\t\t// ensure required keys aren't missing\n\t\tfor (const [key] of this.#requiredKeys) {\n\t\t\tif (!(key in object)) {\n\t\t\t\tthrow new MissingKeyError(key);\n\t\t\t}\n\t\t}\n\t}\n}\n\nexport { MergeStrategy, ObjectSchema, ValidationStrategy };\n","// @ts-self-types=\"./index.d.ts\"\nimport * as posixPath from './std__path/posix.js';\nimport * as windowsPath from './std__path/windows.js';\nimport { Minimatch } from 'minimatch';\nimport createDebug from 'debug';\nimport { ObjectSchema } from '@eslint/object-schema';\nexport { ObjectSchema } from '@eslint/object-schema';\n\n/**\n * @fileoverview ConfigSchema\n * @author Nicholas C. Zakas\n */\n\n//------------------------------------------------------------------------------\n// Types\n//------------------------------------------------------------------------------\n\n/** @import * as $eslintobjectschema from \"@eslint/object-schema\"; */\n/** @typedef {$eslintobjectschema.PropertyDefinition} PropertyDefinition */\n/** @typedef {$eslintobjectschema.ObjectDefinition} ObjectDefinition */\n\n//------------------------------------------------------------------------------\n// Helpers\n//------------------------------------------------------------------------------\n\n/**\n * A strategy that does nothing.\n * @type {PropertyDefinition}\n */\nconst NOOP_STRATEGY = {\n\trequired: false,\n\tmerge() {\n\t\treturn undefined;\n\t},\n\tvalidate() {},\n};\n\n//------------------------------------------------------------------------------\n// Exports\n//------------------------------------------------------------------------------\n\n/**\n * The base schema that every ConfigArray uses.\n * @type {ObjectDefinition}\n */\nconst baseSchema = Object.freeze({\n\tname: {\n\t\trequired: false,\n\t\tmerge() {\n\t\t\treturn undefined;\n\t\t},\n\t\tvalidate(value) {\n\t\t\tif (typeof value !== \"string\") {\n\t\t\t\tthrow new TypeError(\"Property must be a string.\");\n\t\t\t}\n\t\t},\n\t},\n\tbasePath: NOOP_STRATEGY,\n\tfiles: NOOP_STRATEGY,\n\tignores: NOOP_STRATEGY,\n});\n\n/**\n * @fileoverview ConfigSchema\n * @author Nicholas C. Zakas\n */\n\n//------------------------------------------------------------------------------\n// Types\n//------------------------------------------------------------------------------\n\n\n//------------------------------------------------------------------------------\n// Helpers\n//------------------------------------------------------------------------------\n\n/**\n * Asserts that a given value is an array.\n * @param {*} value The value to check.\n * @returns {void}\n * @throws {TypeError} When the value is not an array.\n */\nfunction assertIsArray(value) {\n\tif (!Array.isArray(value)) {\n\t\tthrow new TypeError(\"Expected value to be an array.\");\n\t}\n}\n\n/**\n * Asserts that a given value is an array containing only strings and functions.\n * @param {*} value The value to check.\n * @returns {void}\n * @throws {TypeError} When the value is not an array of strings and functions.\n */\nfunction assertIsArrayOfStringsAndFunctions(value) {\n\tassertIsArray(value);\n\n\tif (\n\t\tvalue.some(\n\t\t\titem => typeof item !== \"string\" && typeof item !== \"function\",\n\t\t)\n\t) {\n\t\tthrow new TypeError(\n\t\t\t\"Expected array to only contain strings and functions.\",\n\t\t);\n\t}\n}\n\n/**\n * Asserts that a given value is a non-empty array.\n * @param {*} value The value to check.\n * @returns {void}\n * @throws {TypeError} When the value is not an array or an empty array.\n */\nfunction assertIsNonEmptyArray(value) {\n\tif (!Array.isArray(value) || value.length === 0) {\n\t\tthrow new TypeError(\"Expected value to be a non-empty array.\");\n\t}\n}\n\n//------------------------------------------------------------------------------\n// Exports\n//------------------------------------------------------------------------------\n\n/**\n * The schema for `files` and `ignores` that every ConfigArray uses.\n * @type {ObjectDefinition}\n */\nconst filesAndIgnoresSchema = Object.freeze({\n\tbasePath: {\n\t\trequired: false,\n\t\tmerge() {\n\t\t\treturn undefined;\n\t\t},\n\t\tvalidate(value) {\n\t\t\tif (typeof value !== \"string\") {\n\t\t\t\tthrow new TypeError(\"Expected value to be a string.\");\n\t\t\t}\n\t\t},\n\t},\n\tfiles: {\n\t\trequired: false,\n\t\tmerge() {\n\t\t\treturn undefined;\n\t\t},\n\t\tvalidate(value) {\n\t\t\t// first check if it's an array\n\t\t\tassertIsNonEmptyArray(value);\n\n\t\t\t// then check each member\n\t\t\tvalue.forEach(item => {\n\t\t\t\tif (Array.isArray(item)) {\n\t\t\t\t\tassertIsArrayOfStringsAndFunctions(item);\n\t\t\t\t} else if (\n\t\t\t\t\ttypeof item !== \"string\" &&\n\t\t\t\t\ttypeof item !== \"function\"\n\t\t\t\t) {\n\t\t\t\t\tthrow new TypeError(\n\t\t\t\t\t\t\"Items must be a string, a function, or an array of strings and functions.\",\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t},\n\tignores: {\n\t\trequired: false,\n\t\tmerge() {\n\t\t\treturn undefined;\n\t\t},\n\t\tvalidate: assertIsArrayOfStringsAndFunctions,\n\t},\n});\n\n/**\n * @fileoverview ConfigArray\n * @author Nicholas C. Zakas\n */\n\n\n//------------------------------------------------------------------------------\n// Types\n//------------------------------------------------------------------------------\n\n/** @import * as $typests from \"./types.ts\"; */\n/** @typedef {$typests.ConfigObject} ConfigObject */\n/** @typedef {$typests.FileMatcher} FileMatcher */\n/** @typedef {$typests.FilesMatcher} FilesMatcher */\n/** @typedef {$typests.ExtraConfigType} ExtraConfigType */\n/** @import * as $minimatch from \"minimatch\"; */\n/** @typedef {$minimatch.MinimatchOptions} MinimatchOptions */\n/** @import * as PathImpl from \"@jsr/std__path\" */\n\n/*\n * This is a bit of a hack to make TypeScript happy with the Rollup-created\n * CommonJS file. Rollup doesn't do object destructuring for imported files\n * and instead imports the default via `require()`. This messes up type checking\n * for `ObjectSchema`. To work around that, we just import the type manually\n * and give it a different name to use in the JSDoc comments.\n */\n/** @typedef {ObjectSchema} ObjectSchemaInstance */\n\n//------------------------------------------------------------------------------\n// Helpers\n//------------------------------------------------------------------------------\n\nconst debug = createDebug(\"@eslint/config-array\");\n\n/**\n * A cache for minimatch instances.\n * @type {Map<string, Minimatch>}\n */\nconst minimatchCache = new Map();\n\n/**\n * A cache for negated minimatch instances.\n * @type {Map<string, Minimatch>}\n */\nconst negatedMinimatchCache = new Map();\n\n/**\n * Options to use with minimatch.\n * @type {MinimatchOptions}\n */\nconst MINIMATCH_OPTIONS = {\n\t// matchBase: true,\n\tdot: true,\n};\n\n/**\n * The types of config objects that are supported.\n * @type {Set<ExtraConfigType>}\n */\nconst CONFIG_TYPES = new Set([\"array\", \"function\"]);\n\n/**\n * Fields that are considered metadata and not part of the config object.\n * @type {Set<string>}\n */\nconst META_FIELDS = new Set([\"name\", \"basePath\"]);\n\n/**\n * A schema containing just files and ignores for early validation.\n * @type {ObjectSchemaInstance}\n */\nconst FILES_AND_IGNORES_SCHEMA = new ObjectSchema(filesAndIgnoresSchema);\n\n// Precomputed constant objects returned by `ConfigArray.getConfigWithStatus`.\n\nconst CONFIG_WITH_STATUS_EXTERNAL = Object.freeze({ status: \"external\" });\nconst CONFIG_WITH_STATUS_IGNORED = Object.freeze({ status: \"ignored\" });\nconst CONFIG_WITH_STATUS_UNCONFIGURED = Object.freeze({\n\tstatus: \"unconfigured\",\n});\n\n// Match two leading dots followed by a slash or the end of input.\nconst EXTERNAL_PATH_REGEX = /^\\.\\.(?:\\/|$)/u;\n\n/**\n * Wrapper error for config validation errors that adds a name to the front of the\n * error message.\n */\nclass ConfigError extends Error {\n\t/**\n\t * Creates a new instance.\n\t * @param {string} name The config object name causing the error.\n\t * @param {number} index The index of the config object in the array.\n\t * @param {Object} options The options for the error.\n\t * @param {Error} [options.cause] The error that caused this error.\n\t * @param {string} [options.message] The message to use for the error.\n\t */\n\tconstructor(name, index, { cause, message }) {\n\t\tconst finalMessage = message || cause.message;\n\n\t\tsuper(`Config ${name}: ${finalMessage}`, { cause });\n\n\t\t// copy over custom properties that aren't represented\n\t\tif (cause) {\n\t\t\tfor (const key of Object.keys(cause)) {\n\t\t\t\tif (!(key in this)) {\n\t\t\t\t\tthis[key] = cause[key];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * The name of the error.\n\t\t * @type {string}\n\t\t * @readonly\n\t\t */\n\t\tthis.name = \"ConfigError\";\n\n\t\t/**\n\t\t * The index of the config object in the array.\n\t\t * @type {number}\n\t\t * @readonly\n\t\t */\n\t\tthis.index = index;\n\t}\n}\n\n/**\n * Gets the name of a config object.\n * @param {ConfigObject} config The config object to get the name of.\n * @returns {string} The name of the config object.\n */\nfunction getConfigName(config) {\n\tif (config && typeof config.name === \"string\" && config.name) {\n\t\treturn `\"${config.name}\"`;\n\t}\n\n\treturn \"(unnamed)\";\n}\n\n/**\n * Rethrows a config error with additional information about the config object.\n * @param {ConfigObject} config The config object to get the name of.\n * @param {number} index The index of the config object in the array.\n * @param {Error} error The error to rethrow.\n * @throws {ConfigError} When the error is rethrown for a config.\n */\nfunction rethrowConfigError(config, index, error) {\n\tconst configName = getConfigName(config);\n\tthrow new ConfigError(configName, index, { cause: error });\n}\n\n/**\n * Shorthand for checking if a value is a string.\n * @param {any} value The value to check.\n * @returns {value is string} True if a string, false if not.\n */\nfunction isString(value) {\n\treturn typeof value === \"string\";\n}\n\n/**\n * Creates a function that asserts that the config is valid\n * during normalization. This checks that the config is not nullish\n * and that files and ignores keys of a config object are valid as per base schema.\n * @param {Object} config The config object to check.\n * @param {number} index The index of the config object in the array.\n * @returns {void}\n * @throws {ConfigError} If the files and ignores keys of a config object are not valid.\n */\nfunction assertValidBaseConfig(config, index) {\n\tif (config === null) {\n\t\tthrow new ConfigError(getConfigName(config), index, {\n\t\t\tmessage: \"Unexpected null config.\",\n\t\t});\n\t}\n\n\tif (config === undefined) {\n\t\tthrow new ConfigError(getConfigName(config), index, {\n\t\t\tmessage: \"Unexpected undefined config.\",\n\t\t});\n\t}\n\n\tif (typeof config !== \"object\") {\n\t\tthrow new ConfigError(getConfigName(config), index, {\n\t\t\tmessage: \"Unexpected non-object config.\",\n\t\t});\n\t}\n\n\tconst validateConfig = {};\n\n\tif (\"basePath\" in config) {\n\t\tvalidateConfig.basePath = config.basePath;\n\t}\n\n\tif (\"files\" in config) {\n\t\tvalidateConfig.files = config.files;\n\t}\n\n\tif (\"ignores\" in config) {\n\t\tvalidateConfig.ignores = config.ignores;\n\t}\n\n\ttry {\n\t\tFILES_AND_IGNORES_SCHEMA.validate(validateConfig);\n\t} catch (validationError) {\n\t\trethrowConfigError(config, index, validationError);\n\t}\n}\n\n/**\n * Wrapper around minimatch that caches minimatch patterns for\n * faster matching speed over multiple file path evaluations.\n * @param {string} filepath The file path to match.\n * @param {string} pattern The glob pattern to match against.\n * @param {MinimatchOptions} options The minimatch options to use.\n * @returns {boolean} True if the file path matches, false if not.\n */\nfunction doMatch(filepath, pattern, options = {}) {\n\tlet cache = minimatchCache;\n\n\tif (options.flipNegate) {\n\t\tcache = negatedMinimatchCache;\n\t}\n\n\tlet matcher = cache.get(pattern);\n\n\tif (!matcher) {\n\t\tmatcher = new Minimatch(\n\t\t\tpattern,\n\t\t\tObject.assign({}, MINIMATCH_OPTIONS, options),\n\t\t);\n\t\tcache.set(pattern, matcher);\n\t}\n\n\treturn matcher.match(filepath);\n}\n\n/**\n * Normalizes a pattern by removing the leading \"./\" if present.\n * @param {FileMatcher} pattern The pattern to normalize.\n * @returns {FileMatcher} The normalized pattern.\n */\nfunction normalizePattern(pattern) {\n\tif (isString(pattern)) {\n\t\tif (pattern.startsWith(\"./\")) {\n\t\t\treturn pattern.slice(2);\n\t\t}\n\n\t\tif (pattern.startsWith(\"!./\")) {\n\t\t\treturn `!${pattern.slice(3)}`;\n\t\t}\n\t}\n\n\treturn pattern;\n}\n\n/**\n * Checks if a given pattern requires normalization.\n * @param {any} pattern The pattern to check.\n * @returns {boolean} True if the pattern needs normalization, false otherwise.\n *\n */\nfunction needsPatternNormalization(pattern) {\n\treturn (\n\t\tisString(pattern) &&\n\t\t(pattern.startsWith(\"./\") || pattern.startsWith(\"!./\"))\n\t);\n}\n\n/**\n * Normalizes `files` and `ignores` patterns in a config by removing \"./\" prefixes.\n * @param {Object} config The config object to normalize patterns in.\n * @param {string} namespacedBasePath The namespaced base path of the directory to which config base path is relative.\n * @param {PathImpl} path Path-handling implementation.\n * @returns {Object} The normalized config object.\n */\nfunction normalizeConfigPatterns(config, namespacedBasePath, path) {\n\tif (!config) {\n\t\treturn config;\n\t}\n\n\tconst hasBasePath = typeof config.basePath === \"string\";\n\n\tlet needsNormalization = false;\n\n\tif (hasBasePath) {\n\t\tneedsNormalization = true;\n\t}\n\n\tif (!needsNormalization && Array.isArray(config.files)) {\n\t\tneedsNormalization = config.files.some(pattern => {\n\t\t\tif (Array.isArray(pattern)) {\n\t\t\t\treturn pattern.some(needsPatternNormalization);\n\t\t\t}\n\t\t\treturn needsPatternNormalization(pattern);\n\t\t});\n\t}\n\n\tif (!needsNormalization && Array.isArray(config.ignores)) {\n\t\tneedsNormalization = config.ignores.some(needsPatternNormalization);\n\t}\n\n\tif (!needsNormalization) {\n\t\treturn config;\n\t}\n\n\tconst newConfig = { ...config };\n\n\tif (hasBasePath) {\n\t\tif (path.isAbsolute(config.basePath)) {\n\t\t\tnewConfig.basePath = path.toNamespacedPath(config.basePath);\n\t\t} else {\n\t\t\tnewConfig.basePath = path.resolve(\n\t\t\t\tnamespacedBasePath,\n\t\t\t\tconfig.basePath,\n\t\t\t);\n\t\t}\n\t}\n\n\tif (Array.isArray(newConfig.files)) {\n\t\tnewConfig.files = newConfig.files.map(pattern => {\n\t\t\tif (Array.isArray(pattern)) {\n\t\t\t\treturn pattern.map(normalizePattern);\n\t\t\t}\n\t\t\treturn normalizePattern(pattern);\n\t\t});\n\t}\n\n\tif (Array.isArray(newConfig.ignores)) {\n\t\tnewConfig.ignores = newConfig.ignores.map(normalizePattern);\n\t}\n\n\treturn newConfig;\n}\n\n/**\n * Normalizes a `ConfigArray` by flattening it and executing any functions\n * that are found inside.\n * @param {Array} items The items in a `ConfigArray`.\n * @param {Object} context The context object to pass into any function\n * found.\n * @param {ReadonlyArray<ExtraConfigType>} extraConfigTypes The config types to check.\n * @param {string} namespacedBasePath The namespaced base path of the directory to which config base paths are relative.\n * @param {PathImpl} path Path-handling implementation.\n * @returns {Promise<Array>} A flattened array containing only config objects.\n * @throws {TypeError} When a config function returns a function.\n */\nasync function normalize(\n\titems,\n\tcontext,\n\textraConfigTypes,\n\tnamespacedBasePath,\n\tpath,\n) {\n\tconst allowFunctions = extraConfigTypes.includes(\"function\");\n\tconst allowArrays = extraConfigTypes.includes(\"array\");\n\n\tasync function* flatTraverse(array) {\n\t\tfor (let item of array) {\n\t\t\tif (typeof item === \"function\") {\n\t\t\t\tif (!allowFunctions) {\n\t\t\t\t\tthrow new TypeError(\"Unexpected function.\");\n\t\t\t\t}\n\n\t\t\t\titem = item(context);\n\t\t\t\tif (item.then) {\n\t\t\t\t\titem = await item;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (Array.isArray(item)) {\n\t\t\t\tif (!allowArrays) {\n\t\t\t\t\tthrow new TypeError(\"Unexpected array.\");\n\t\t\t\t}\n\t\t\t\tyield* flatTraverse(item);\n\t\t\t} else if (typeof item === \"function\") {\n\t\t\t\tthrow new TypeError(\n\t\t\t\t\t\"A config function can only return an object or array.\",\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tyield item;\n\t\t\t}\n\t\t}\n\t}\n\n\t/*\n\t * Async iterables cannot be used with the spread operator, so we need to manually\n\t * create the array to return.\n\t */\n\tconst asyncIterable = flatTraverse(items);\n\tconst configs = [];\n\n\tfor await (const config of asyncIterable) {\n\t\tconfigs.push(normalizeConfigPatterns(config, namespacedBasePath, path));\n\t}\n\n\treturn configs;\n}\n\n/**\n * Normalizes a `ConfigArray` by flattening it and executing any functions\n * that are found inside.\n * @param {Array} items The items in a `ConfigArray`.\n * @param {Object} context The context object to pass into any function\n * found.\n * @param {ReadonlyArray<ExtraConfigType>} extraConfigTypes The config types to check.\n * @param {string} namespacedBasePath The namespaced base path of the directory to which config base paths are relative.\n * @param {PathImpl} path Path-handling implementation\n * @returns {Array} A flattened array containing only config objects.\n * @throws {TypeError} When a config function returns a function.\n */\nfunction normalizeSync(\n\titems,\n\tcontext,\n\textraConfigTypes,\n\tnamespacedBasePath,\n\tpath,\n) {\n\tconst allowFunctions = extraConfigTypes.includes(\"function\");\n\tconst allowArrays = extraConfigTypes.includes(\"array\");\n\n\tfunction* flatTraverse(array) {\n\t\tfor (let item of array) {\n\t\t\tif (typeof item === \"function\") {\n\t\t\t\tif (!allowFunctions) {\n\t\t\t\t\tthrow new TypeError(\"Unexpected function.\");\n\t\t\t\t}\n\n\t\t\t\titem = item(context);\n\t\t\t\tif (item.then) {\n\t\t\t\t\tthrow new TypeError(\n\t\t\t\t\t\t\"Async config functions are not supported.\",\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (Array.isArray(item)) {\n\t\t\t\tif (!allowArrays) {\n\t\t\t\t\tthrow new TypeError(\"Unexpected array.\");\n\t\t\t\t}\n\n\t\t\t\tyield* flatTraverse(item);\n\t\t\t} else if (typeof item === \"function\") {\n\t\t\t\tthrow new TypeError(\n\t\t\t\t\t\"A config function can only return an object or array.\",\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tyield item;\n\t\t\t}\n\t\t}\n\t}\n\n\tconst configs = [];\n\n\tfor (const config of flatTraverse(items)) {\n\t\tconfigs.push(normalizeConfigPatterns(config, namespacedBasePath, path));\n\t}\n\n\treturn configs;\n}\n\n/**\n * Converts a given path to a relative path with all separator characters replaced by forward slashes (`\"/\"`).\n * @param {string} fileOrDirPath The unprocessed path to convert.\n * @param {string} namespacedBasePath The namespaced base path of the directory to which the calculated path shall be relative.\n * @param {PathImpl} path Path-handling implementations.\n * @returns {string} A relative path with all separator characters replaced by forward slashes.\n */\nfunction toRelativePath(fileOrDirPath, namespacedBasePath, path) {\n\tconst fullPath = path.resolve(namespacedBasePath, fileOrDirPath);\n\tconst namespacedFullPath = path.toNamespacedPath(fullPath);\n\tconst relativePath = path.relative(namespacedBasePath, namespacedFullPath);\n\treturn relativePath.replaceAll(path.SEPARATOR, \"/\");\n}\n\n/**\n * Determines if a given file path should be ignored based on the given\n * matcher.\n * @param {Array<{ basePath?: string, ignores: FileMatcher[] }>} configs Configuration objects containing `ignores`.\n * @param {string} filePath The unprocessed file path to check.\n * @param {string} relativeFilePath The path of the file to check relative to the base path,\n * \t\tusing forward slash (`\"/\"`) as a separator.\n * @param {Object} [basePathData] Additional data needed to recalculate paths for configuration objects\n * \tthat have `basePath` property.\n * @param {string} [basePathData.basePath] Namespaced path to which `relativeFilePath` is relative.\n * @param {PathImpl} [basePathData.path] Path-handling implementation.\n * @returns {boolean} True if the path should be ignored and false if not.\n */\nfunction shouldIgnorePath(\n\tconfigs,\n\tfilePath,\n\trelativeFilePath,\n\t{ basePath, path } = {},\n) {\n\tlet shouldIgnore = false;\n\n\tfor (const config of configs) {\n\t\tlet relativeFilePathToCheck = relativeFilePath;\n\t\tif (config.basePath) {\n\t\t\trelativeFilePathToCheck = toRelativePath(\n\t\t\t\tpath.resolve(basePath, relativeFilePath),\n\t\t\t\tconfig.basePath,\n\t\t\t\tpath,\n\t\t\t);\n\n\t\t\tif (\n\t\t\t\trelativeFilePathToCheck === \"\" ||\n\t\t\t\tEXTERNAL_PATH_REGEX.test(relativeFilePathToCheck)\n\t\t\t) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (relativeFilePath.endsWith(\"/\")) {\n\t\t\t\trelativeFilePathToCheck += \"/\";\n\t\t\t}\n\t\t}\n\t\tshouldIgnore = config.ignores.reduce((ignored, matcher) => {\n\t\t\tif (!ignored) {\n\t\t\t\tif (typeof matcher === \"function\") {\n\t\t\t\t\treturn matcher(filePath);\n\t\t\t\t}\n\n\t\t\t\t// don't check negated patterns because we're not ignored yet\n\t\t\t\tif (!matcher.startsWith(\"!\")) {\n\t\t\t\t\treturn doMatch(relativeFilePathToCheck, matcher);\n\t\t\t\t}\n\n\t\t\t\t// otherwise we're still not ignored\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// only need to check negated patterns because we're ignored\n\t\t\tif (typeof matcher === \"string\" && matcher.startsWith(\"!\")) {\n\t\t\t\treturn !doMatch(relativeFilePathToCheck, matcher, {\n\t\t\t\t\tflipNegate: true,\n\t\t\t\t});\n\t\t\t}\n\n\t\t\treturn ignored;\n\t\t}, shouldIgnore);\n\t}\n\n\treturn shouldIgnore;\n}\n\n/**\n * Determines if a given file path is matched by a config. If the config\n * has no `files` field, then it matches; otherwise, if a `files` field\n * is present then we match the globs in `files` and exclude any globs in\n * `ignores`.\n * @param {string} filePath The unprocessed file path to check.\n * @param {string} relativeFilePath The path of the file to check relative to the base path,\n * \t\tusing forward slash (`\"/\"`) as a separator.\n * @param {ConfigObject & { files: FilesMatcher[] }} config The config object to check.\n * @returns {boolean} True if the file path is matched by the config,\n * false if not.\n */\nfunction pathMatches(filePath, relativeFilePath, config) {\n\t// match both strings and functions\n\tfunction match(pattern) {\n\t\tif (isString(pattern)) {\n\t\t\treturn doMatch(relativeFilePath, pattern);\n\t\t}\n\n\t\tif (typeof pattern === \"function\") {\n\t\t\treturn pattern(filePath);\n\t\t}\n\n\t\tthrow new TypeError(`Unexpected matcher type ${pattern}.`);\n\t}\n\n\t// check for all matches to config.files\n\tlet filePathMatchesPattern = config.files.some(pattern => {\n\t\tif (Array.isArray(pattern)) {\n\t\t\treturn pattern.every(match);\n\t\t}\n\n\t\treturn match(pattern);\n\t});\n\n\t/*\n\t * If the file path matches the config.files patterns, then check to see\n\t * if there are any files to ignore.\n\t */\n\tif (filePathMatchesPattern && config.ignores) {\n\t\t/*\n\t\t * Pass config object without `basePath`, because `relativeFilePath` is already\n\t\t * calculated as relative to it.\n\t\t */\n\t\tfilePathMatchesPattern = !shouldIgnorePath(\n\t\t\t[{ ignores: config.ignores }],\n\t\t\tfilePath,\n\t\t\trelativeFilePath,\n\t\t);\n\t}\n\n\treturn filePathMatchesPattern;\n}\n\n/**\n * Ensures that a ConfigArray has been normalized.\n * @param {ConfigArray} configArray The ConfigArray to check.\n * @returns {void}\n * @throws {Error} When the `ConfigArray` is not normalized.\n */\nfunction assertNormalized(configArray) {\n\t// TODO: Throw more verbose error\n\tif (!configArray.isNormalized()) {\n\t\tthrow new Error(\n\t\t\t\"ConfigArray must be normalized to perform this operation.\",\n\t\t);\n\t}\n}\n\n/**\n * Ensures that config types are valid.\n * @param {ReadonlyArray<ExtraConfigType>} extraConfigTypes The config types to check.\n * @returns {void}\n * @throws {TypeError} When the config types array is invalid.\n */\nfunction assertExtraConfigTypes(extraConfigTypes) {\n\tif (!Array.isArray(extraConfigTypes)) {\n\t\tthrow new TypeError(\"extraConfigTypes must be an array.\");\n\t}\n\n\tif (extraConfigTypes.length > 2) {\n\t\tthrow new TypeError(\"extraConfigTypes must contain at most two items.\");\n\t}\n\n\tfor (const configType of extraConfigTypes) {\n\t\tif (!CONFIG_TYPES.has(configType)) {\n\t\t\tthrow new TypeError(\n\t\t\t\t`Unexpected config type \"${configType}\" in extraConfigTypes. Expected one of: \"array\", \"function\".`,\n\t\t\t);\n\t\t}\n\t}\n}\n\n/**\n * Returns path-handling implementations for Unix or Windows, depending on a given absolute path.\n * @param {string} fileOrDirPath The absolute path to check.\n * @returns {PathImpl} Path-handling implementations for the specified path.\n * @throws {Error} An error is thrown if the specified argument is not an absolute path.\n */\nfunction getPathImpl(fileOrDirPath) {\n\t// Posix absolute paths always start with a slash.\n\tif (fileOrDirPath.startsWith(\"/\")) {\n\t\treturn posixPath;\n\t}\n\n\t// Windows absolute paths start with a letter followed by a colon and at least one backslash,\n\t// or with two backslashes in the case of UNC paths.\n\t// Forward slashed are automatically normalized to backslashes.\n\tif (/^(?:[A-Za-z]:[/\\\\]|[/\\\\]{2})/u.test(fileOrDirPath)) {\n\t\treturn windowsPath;\n\t}\n\n\tthrow new Error(\n\t\t`Expected an absolute path but received \"${fileOrDirPath}\"`,\n\t);\n}\n\n//------------------------------------------------------------------------------\n// Public Interface\n//------------------------------------------------------------------------------\n\nconst ConfigArraySymbol = {\n\tisNormalized: Symbol(\"isNormalized\"),\n\tconfigCache: Symbol(\"configCache\"),\n\tschema: Symbol(\"schema\"),\n\tfinalizeConfig: Symbol(\"finalizeConfig\"),\n\tpreprocessConfig: Symbol(\"preprocessConfig\"),\n};\n\n// used to store calculate data for faster lookup\nconst dataCache = new WeakMap();\n\n/**\n * Represents an array of config objects and provides method for working with\n * those config objects.\n */\nclass ConfigArray extends Array {\n\t/**\n\t * The namespaced path of the config file directory.\n\t * @type {string}\n\t */\n\t#namespacedBasePath;\n\n\t/**\n\t * Path-handling implementations.\n\t * @type {PathImpl}\n\t */\n\t#path;\n\n\t/**\n\t * Creates a new instance of ConfigArray.\n\t * @param {Iterable|Function|Object} configs An iterable yielding config\n\t * objects, or a config function, or a config object.\n\t * @param {Object} options The options for the ConfigArray.\n\t * @param {string} [options.basePath=\"/\"] The absolute path of the config file directory.\n\t * \t\tDefaults to `\"/\"`.\n\t * @param {boolean} [options.normalized=false] Flag indicating if the\n\t * configs have already been normalized.\n\t * @param {ObjectDefinition} [options.schema] The additional schema\n\t * definitions to use for the ConfigArray schema.\n\t * @param {ReadonlyArray<ExtraConfigType>} [options.extraConfigTypes] List of config types supported.\n\t * @throws {TypeError} When the `basePath` is not a non-empty string,\n\t */\n\tconstructor(\n\t\tconfigs,\n\t\t{\n\t\t\tbasePath = \"/\",\n\t\t\tnormalized = false,\n\t\t\tschema: customSchema,\n\t\t\textraConfigTypes = [],\n\t\t} = {},\n\t) {\n\t\tsuper();\n\n\t\t/**\n\t\t * Tracks if the array has been normalized.\n\t\t * @property isNormalized\n\t\t * @type {boolean}\n\t\t * @private\n\t\t */\n\t\tthis[ConfigArraySymbol.isNormalized] = normalized;\n\n\t\t/**\n\t\t * The schema used for validating and merging configs.\n\t\t * @property schema\n\t\t * @type {ObjectSchemaInstance}\n\t\t * @private\n\t\t */\n\t\tthis[ConfigArraySymbol.schema] = new ObjectSchema(\n\t\t\tObject.assign({}, customSchema, baseSchema),\n\t\t);\n\n\t\tif (!isString(basePath) || !basePath) {\n\t\t\tthrow new TypeError(\"basePath must be a non-empty string\");\n\t\t}\n\n\t\t/**\n\t\t * The path of the config file that this array was loaded from.\n\t\t * This is used to calculate filename matches.\n\t\t * @property basePath\n\t\t * @type {string}\n\t\t */\n\t\tthis.basePath = basePath;\n\n\t\tassertExtraConfigTypes(extraConfigTypes);\n\n\t\t/**\n\t\t * The supported config types.\n\t\t * @type {ReadonlyArray<ExtraConfigType>}\n\t\t */\n\t\tthis.extraConfigTypes = [...extraConfigTypes];\n\t\tObject.freeze(this.extraConfigTypes);\n\n\t\t/**\n\t\t * A cache to store calculated configs for faster repeat lookup.\n\t\t * @property configCache\n\t\t * @type {Map<string, Object>}\n\t\t * @private\n\t\t */\n\t\tthis[ConfigArraySymbol.configCache] = new Map();\n\n\t\t// init cache\n\t\tdataCache.set(this, {\n\t\t\texplicitMatches: new Map(),\n\t\t\tdirectoryMatches: new Map(),\n\t\t\tfiles: undefined,\n\t\t\tignores: undefined,\n\t\t});\n\n\t\t// load the configs into this array\n\t\tif (Array.isArray(configs)) {\n\t\t\tthis.push(...configs);\n\t\t} else {\n\t\t\tthis.push(configs);\n\t\t}\n\n\t\t// select path-handling implementations depending on the base path\n\t\tthis.#path = getPathImpl(basePath);\n\n\t\t// On Windows, `path.relative()` returns an absolute path when given two paths on different drives.\n\t\t// The namespaced base path is useful to make sure that calculated relative paths are always relative.\n\t\t// On Unix, it is identical to the base path.\n\t\tthis.#namespacedBasePath = this.#path.toNamespacedPath(basePath);\n\t}\n\n\t/**\n\t * Prevent normal array methods from creating a new `ConfigArray` instance.\n\t * This is to ensure that methods such as `slice()` won't try to create a\n\t * new instance of `ConfigArray` behind the scenes as doing so may throw\n\t * an error due to the different constructor signature.\n\t * @type {ArrayConstructor} The `Array` constructor.\n\t */\n\tstatic get [Symbol.species]() {\n\t\treturn Array;\n\t}\n\n\t/**\n\t * Returns the `files` globs from every config object in the array.\n\t * This can be used to determine which files will be matched by a\n\t * config array or to use as a glob pattern when no patterns are provided\n\t * for a command line interface.\n\t * @returns {Array<FilesMatcher>} An array of matchers.\n\t */\n\tget files() {\n\t\tassertNormalized(this);\n\n\t\t// if this data has been cached, retrieve it\n\t\tconst cache = dataCache.get(this);\n\n\t\tif (cache.files) {\n\t\t\treturn cache.files;\n\t\t}\n\n\t\t// otherwise calculate it\n\n\t\tconst result = [];\n\n\t\tfor (const config of this) {\n\t\t\tif (config.files) {\n\t\t\t\tconfig.files.forEach(filePattern => {\n\t\t\t\t\tresult.push(filePattern);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\t// store result\n\t\tcache.files = result;\n\t\tdataCache.set(this, cache);\n\n\t\treturn result;\n\t}\n\n\t/**\n\t * Returns ignore matchers that should always be ignored regardless of\n\t * the matching `files` fields in any configs. This is necessary to mimic\n\t * the behavior of things like .gitignore and .eslintignore, allowing a\n\t * globbing operation to be faster.\n\t * @returns {Array<{ basePath?: string, name?: string, ignores: FileMatcher[] }>} An array of config objects representing global ignores.\n\t */\n\tget ignores() {\n\t\tassertNormalized(this);\n\n\t\t// if this data has been cached, retrieve it\n\t\tconst cache = dataCache.get(this);\n\n\t\tif (cache.ignores) {\n\t\t\treturn cache.ignores;\n\t\t}\n\n\t\t// otherwise calculate it\n\n\t\tconst result = [];\n\n\t\tfor (const config of this) {\n\t\t\t/*\n\t\t\t * We only count ignores if there are no other keys in the object.\n\t\t\t * In this case, it acts like a globally ignored pattern. If there\n\t\t\t * are additional keys, then ignores act like exclusions.\n\t\t\t */\n\t\t\tif (\n\t\t\t\tconfig.ignores &&\n\t\t\t\tObject.keys(config).filter(key => !META_FIELDS.has(key))\n\t\t\t\t\t.length === 1\n\t\t\t) {\n\t\t\t\tresult.push(config);\n\t\t\t}\n\t\t}\n\n\t\t// store result\n\t\tcache.ignores = result;\n\t\tdataCache.set(this, cache);\n\n\t\treturn result;\n\t}\n\n\t/**\n\t * Indicates if the config array has been normalized.\n\t * @returns {boolean} True if the config array is normalized, false if not.\n\t */\n\tisNormalized() {\n\t\treturn this[ConfigArraySymbol.isNormalized];\n\t}\n\n\t/**\n\t * Normalizes a config array by flattening embedded arrays and executing\n\t * config functions.\n\t * @param {Object} [context] The context object for config functions.\n\t * @returns {Promise<ConfigArray>} The current ConfigArray instance.\n\t */\n\tasync normalize(context = {}) {\n\t\tif (!this.isNormalized()) {\n\t\t\tconst normalizedConfigs = await normalize(\n\t\t\t\tthis,\n\t\t\t\tcontext,\n\t\t\t\tthis.extraConfigTypes,\n\t\t\t\tthis.#namespacedBasePath,\n\t\t\t\tthis.#path,\n\t\t\t);\n\t\t\tthis.length = 0;\n\t\t\tthis.push(\n\t\t\t\t...normalizedConfigs.map(\n\t\t\t\t\tthis[ConfigArraySymbol.preprocessConfig].bind(this),\n\t\t\t\t),\n\t\t\t);\n\t\t\tthis.forEach(assertValidBaseConfig);\n\t\t\tthis[ConfigArraySymbol.isNormalized] = true;\n\n\t\t\t// prevent further changes\n\t\t\tObject.freeze(this);\n\t\t}\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Normalizes a config array by flattening embedded arrays and executing\n\t * config functions.\n\t * @param {Object} [context] The context object for config functions.\n\t * @returns {ConfigArray} The current ConfigArray instance.\n\t */\n\tnormalizeSync(context = {}) {\n\t\tif (!this.isNormalized()) {\n\t\t\tconst normalizedConfigs = normalizeSync(\n\t\t\t\tthis,\n\t\t\t\tcontext,\n\t\t\t\tthis.extraConfigTypes,\n\t\t\t\tthis.#namespacedBasePath,\n\t\t\t\tthis.#path,\n\t\t\t);\n\t\t\tthis.length = 0;\n\t\t\tthis.push(\n\t\t\t\t...normalizedConfigs.map(\n\t\t\t\t\tthis[ConfigArraySymbol.preprocessConfig].bind(this),\n\t\t\t\t),\n\t\t\t);\n\t\t\tthis.forEach(assertValidBaseConfig);\n\t\t\tthis[ConfigArraySymbol.isNormalized] = true;\n\n\t\t\t// prevent further changes\n\t\t\tObject.freeze(this);\n\t\t}\n\n\t\treturn this;\n\t}\n\n\t/* eslint-disable class-methods-use-this -- Desired as instance methods */\n\n\t/**\n\t * Finalizes the state of a config before being cached and returned by\n\t * `getConfig()`. Does nothing by default but is provided to be\n\t * overridden by subclasses as necessary.\n\t * @param {Object} config The config to finalize.\n\t * @returns {Object} The finalized config.\n\t */\n\t// Cast key to `never` to prevent TypeScript from adding the signature `[x: symbol]: (config: any) => any` to the type of the class.\n\t[/** @type {never} */ (ConfigArraySymbol.finalizeConfig)](config) {\n\t\treturn config;\n\t}\n\n\t/**\n\t * Preprocesses a config during the normalization process. This is the\n\t * method to override if you want to convert an array item before it is\n\t * validated for the first time. For example, if you want to replace a\n\t * string with an object, this is the method to override.\n\t * @param {Object} config The config to preprocess.\n\t * @returns {Object} The config to use in place of the argument.\n\t */\n\t// Cast key to `never` to prevent TypeScript from adding the signature `[x: symbol]: (config: any) => any` to the type of the class.\n\t[/** @type {never} */ (ConfigArraySymbol.preprocessConfig)](config) {\n\t\treturn config;\n\t}\n\n\t/* eslint-enable class-methods-use-this -- Desired as instance methods */\n\n\t/**\n\t * Returns the config object for a given file path and a status that can be used to determine why a file has no config.\n\t * @param {string} filePath The path of a file to get a config for.\n\t * @returns {{ config?: Object, status: \"ignored\"|\"external\"|\"unconfigured\"|\"matched\" }}\n\t * An object with an optional property `config` and property `status`.\n\t * `config` is the config object for the specified file as returned by {@linkcode ConfigArray.getConfig},\n\t * `status` a is one of the constants returned by {@linkcode ConfigArray.getConfigStatus}.\n\t */\n\tgetConfigWithStatus(filePath) {\n\t\tassertNormalized(this);\n\n\t\tconst cache = this[ConfigArraySymbol.configCache];\n\n\t\t// first check the cache for a filename match to avoid duplicate work\n\t\tif (cache.has(filePath)) {\n\t\t\treturn cache.get(filePath);\n\t\t}\n\n\t\t// check to see if the file is outside the base path\n\n\t\tconst relativeToBaseFilePath = toRelativePath(\n\t\t\tfilePath,\n\t\t\tthis.#namespacedBasePath,\n\t\t\tthis.#path,\n\t\t);\n\n\t\tif (EXTERNAL_PATH_REGEX.test(relativeToBaseFilePath)) {\n\t\t\tdebug(`No config for file ${filePath} outside of base path`);\n\n\t\t\t// cache and return result\n\t\t\tcache.set(filePath, CONFIG_WITH_STATUS_EXTERNAL);\n\t\t\treturn CONFIG_WITH_STATUS_EXTERNAL;\n\t\t}\n\n\t\t// next check to see if the file should be ignored\n\n\t\t// check if this should be ignored due to its directory\n\t\tif (this.isDirectoryIgnored(this.#path.dirname(filePath))) {\n\t\t\tdebug(`Ignoring ${filePath} based on directory pattern`);\n\n\t\t\t// cache and return result\n\t\t\tcache.set(filePath, CONFIG_WITH_STATUS_IGNORED);\n\t\t\treturn CONFIG_WITH_STATUS_IGNORED;\n\t\t}\n\n\t\tif (\n\t\t\tshouldIgnorePath(this.ignores, filePath, relativeToBaseFilePath, {\n\t\t\t\tbasePath: this.#namespacedBasePath,\n\t\t\t\tpath: this.#path,\n\t\t\t})\n\t\t) {\n\t\t\tdebug(`Ignoring ${filePath} based on file pattern`);\n\n\t\t\t// cache and return result\n\t\t\tcache.set(filePath, CONFIG_WITH_STATUS_IGNORED);\n\t\t\treturn CONFIG_WITH_STATUS_IGNORED;\n\t\t}\n\n\t\t// filePath isn't automatically ignored, so try to construct config\n\n\t\tconst matchingConfigIndices = [];\n\t\tlet matchFound = false;\n\t\tconst universalPattern = /^\\*$|^!|\\/\\*{1,2}$/u;\n\n\t\tthis.forEach((config, index) => {\n\t\t\tconst relativeFilePath = config.basePath\n\t\t\t\t? toRelativePath(\n\t\t\t\t\t\tthis.#path.resolve(this.#namespacedBasePath, filePath),\n\t\t\t\t\t\tconfig.basePath,\n\t\t\t\t\t\tthis.#path,\n\t\t\t\t\t)\n\t\t\t\t: relativeToBaseFilePath;\n\n\t\t\tif (config.basePath && EXTERNAL_PATH_REGEX.test(relativeFilePath)) {\n\t\t\t\tdebug(\n\t\t\t\t\t`Skipped config found for ${filePath} (based on config's base path: ${config.basePath}`,\n\t\t\t\t);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (!config.files) {\n\t\t\t\tif (!config.ignores) {\n\t\t\t\t\tdebug(`Universal config found for ${filePath}`);\n\t\t\t\t\tmatchingConfigIndices.push(index);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\tObject.keys(config).filter(key => !META_FIELDS.has(key))\n\t\t\t\t\t\t.length === 1\n\t\t\t\t) {\n\t\t\t\t\tdebug(\n\t\t\t\t\t\t`Skipped config found for ${filePath} (global ignores)`,\n\t\t\t\t\t);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t/*\n\t\t\t\t * Pass config object without `basePath`, because `relativeFilePath` is already\n\t\t\t\t * calculated as relative to it.\n\t\t\t\t */\n\t\t\t\tif (\n\t\t\t\t\tshouldIgnorePath(\n\t\t\t\t\t\t[{ ignores: config.ignores }],\n\t\t\t\t\t\tfilePath,\n\t\t\t\t\t\trelativeFilePath,\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\tdebug(\n\t\t\t\t\t\t`Skipped config found for ${filePath} (based on ignores: ${config.ignores})`,\n\t\t\t\t\t);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tdebug(\n\t\t\t\t\t`Matching config found for ${filePath} (based on ignores: ${config.ignores})`,\n\t\t\t\t);\n\t\t\t\tmatchingConfigIndices.push(index);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t/*\n\t\t\t * If a config has a files pattern * or patterns ending in /** or /*,\n\t\t\t * and the filePath only matches those patterns, then the config is only\n\t\t\t * applied if there is another config where the filePath matches\n\t\t\t * a file with a specific extensions such as *.js.\n\t\t\t */\n\n\t\t\tconst nonUniversalFiles = [];\n\t\t\tconst universalFiles = config.files.filter(element => {\n\t\t\t\tif (Array.isArray(element)) {\n\t\t\t\t\t/*\n\t\t\t\t\t * filePath matches an element that is an array only if it matches\n\t\t\t\t\t * all patterns in it (AND operation). Therefore, if there is at least\n\t\t\t\t\t * one non-universal pattern in the array, and filePath matches the array,\n\t\t\t\t\t * then we know for sure that filePath matches at least one non-universal\n\t\t\t\t\t * pattern, so we can consider the entire array to be non-universal.\n\t\t\t\t\t * In other words, all patterns in the array need to be universal\n\t\t\t\t\t * for it to be considered universal.\n\t\t\t\t\t */\n\t\t\t\t\tif (\n\t\t\t\t\t\telement.every(pattern => universalPattern.test(pattern))\n\t\t\t\t\t) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\n\t\t\t\t\tnonUniversalFiles.push(element);\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\t// element is a string\n\n\t\t\t\tif (universalPattern.test(element)) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\tnonUniversalFiles.push(element);\n\t\t\t\treturn false;\n\t\t\t});\n\n\t\t\t// universal patterns were found so we need to check the config twice\n\t\t\tif (universalFiles.length) {\n\t\t\t\tdebug(\"Universal files patterns found. Checking carefully.\");\n\n\t\t\t\t// check that the config matches without the non-universal files first\n\t\t\t\tif (\n\t\t\t\t\tnonUniversalFiles.length &&\n\t\t\t\t\tpathMatches(filePath, relativeFilePath, {\n\t\t\t\t\t\tfiles: nonUniversalFiles,\n\t\t\t\t\t\tignores: config.ignores,\n\t\t\t\t\t})\n\t\t\t\t) {\n\t\t\t\t\tdebug(`Matching config found for ${filePath}`);\n\t\t\t\t\tmatchingConfigIndices.push(index);\n\t\t\t\t\tmatchFound = true;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// if there wasn't a match then check if it matches with universal files\n\t\t\t\tif (\n\t\t\t\t\tuniversalFiles.length &&\n\t\t\t\t\tpathMatches(filePath, relativeFilePath, {\n\t\t\t\t\t\tfiles: universalFiles,\n\t\t\t\t\t\tignores: config.ignores,\n\t\t\t\t\t})\n\t\t\t\t) {\n\t\t\t\t\tdebug(`Matching config found for ${filePath}`);\n\t\t\t\t\tmatchingConfigIndices.push(index);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// if we make here, then there was no match\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// the normal case\n\t\t\tif (pathMatches(filePath, relativeFilePath, config)) {\n\t\t\t\tdebug(`Matching config found for ${filePath}`);\n\t\t\t\tmatchingConfigIndices.push(index);\n\t\t\t\tmatchFound = true;\n\t\t\t}\n\t\t});\n\n\t\t// if matching both files and ignores, there will be no config to create\n\t\tif (!matchFound) {\n\t\t\tdebug(`No matching configs found for ${filePath}`);\n\n\t\t\t// cache and return result\n\t\t\tcache.set(filePath, CONFIG_WITH_STATUS_UNCONFIGURED);\n\t\t\treturn CONFIG_WITH_STATUS_UNCONFIGURED;\n\t\t}\n\n\t\t// check to see if there is a config cached by indices\n\t\tconst indicesKey = matchingConfigIndices.toString();\n\t\tlet configWithStatus = cache.get(indicesKey);\n\n\t\tif (configWithStatus) {\n\t\t\t// also store for filename for faster lookup next time\n\t\t\tcache.set(filePath, configWithStatus);\n\n\t\t\treturn configWithStatus;\n\t\t}\n\n\t\t// otherwise construct the config\n\n\t\t// eslint-disable-next-line array-callback-return, consistent-return -- rethrowConfigError always throws an error\n\t\tlet finalConfig = matchingConfigIndices.reduce((result, index) => {\n\t\t\ttry {\n\t\t\t\treturn this[ConfigArraySymbol.schema].merge(\n\t\t\t\t\tresult,\n\t\t\t\t\tthis[index],\n\t\t\t\t);\n\t\t\t} catch (validationError) {\n\t\t\t\trethrowConfigError(this[index], index, validationError);\n\t\t\t}\n\t\t}, {});\n\n\t\tfinalConfig = this[ConfigArraySymbol.finalizeConfig](finalConfig);\n\n\t\tconfigWithStatus = Object.freeze({\n\t\t\tconfig: finalConfig,\n\t\t\tstatus: \"matched\",\n\t\t});\n\t\tcache.set(filePath, configWithStatus);\n\t\tcache.set(indicesKey, configWithStatus);\n\n\t\treturn configWithStatus;\n\t}\n\n\t/**\n\t * Returns the config object for a given file path.\n\t * @param {string} filePath The path of a file to get a config for.\n\t * @returns {Object|undefined} The config object for this file or `undefined`.\n\t */\n\tgetConfig(filePath) {\n\t\treturn this.getConfigWithStatus(filePath).config;\n\t}\n\n\t/**\n\t * Determines whether a file has a config or why it doesn't.\n\t * @param {string} filePath The path of the file to check.\n\t * @returns {\"ignored\"|\"external\"|\"unconfigured\"|\"matched\"} One of the following values:\n\t * * `\"ignored\"`: the file is ignored\n\t * * `\"external\"`: the file is outside the base path\n\t * * `\"unconfigured\"`: the file is not matched by any config\n\t * * `\"matched\"`: the file has a matching config\n\t */\n\tgetConfigStatus(filePath) {\n\t\treturn this.getConfigWithStatus(filePath).status;\n\t}\n\n\t/**\n\t * Determines if the given filepath is ignored based on the configs.\n\t * @param {string} filePath The path of a file to check.\n\t * @returns {boolean} True if the path is ignored, false if not.\n\t * @deprecated Use `isFileIgnored` instead.\n\t */\n\tisIgnored(filePath) {\n\t\treturn this.isFileIgnored(filePath);\n\t}\n\n\t/**\n\t * Determines if the given filepath is ignored based on the configs.\n\t * @param {string} filePath The path of a file to check.\n\t * @returns {boolean} True if the path is ignored, false if not.\n\t */\n\tisFileIgnored(filePath) {\n\t\treturn this.getConfigStatus(filePath) === \"ignored\";\n\t}\n\n\t/**\n\t * Determines if the given directory is ignored based on the configs.\n\t * This checks only default `ignores` that don't have `files` in the\n\t * same config. A pattern such as `/foo` be considered to ignore the directory\n\t * while a pattern such as `/foo/**` is not considered to ignore the\n\t * directory because it is matching files.\n\t * @param {string} directoryPath The path of a directory to check.\n\t * @returns {boolean} True if the directory is ignored, false if not. Will\n\t * \t\treturn true for any directory that is not inside of `basePath`.\n\t * @throws {Error} When the `ConfigArray` is not normalized.\n\t */\n\tisDirectoryIgnored(directoryPath) {\n\t\tassertNormalized(this);\n\n\t\tconst relativeDirectoryPath = toRelativePath(\n\t\t\tdirectoryPath,\n\t\t\tthis.#namespacedBasePath,\n\t\t\tthis.#path,\n\t\t);\n\n\t\t// basePath directory can never be ignored\n\t\tif (relativeDirectoryPath === \"\") {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (EXTERNAL_PATH_REGEX.test(relativeDirectoryPath)) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// first check the cache\n\t\tconst cache = dataCache.get(this).directoryMatches;\n\n\t\tif (cache.has(relativeDirectoryPath)) {\n\t\t\treturn cache.get(relativeDirectoryPath);\n\t\t}\n\n\t\tconst directoryParts = relativeDirectoryPath.split(\"/\");\n\t\tlet relativeDirectoryToCheck = \"\";\n\t\tlet result;\n\n\t\t/*\n\t\t * In order to get the correct gitignore-style ignores, where an\n\t\t * ignored parent directory cannot have any descendants unignored,\n\t\t * we need to check every directory starting at the parent all\n\t\t * the way down to the actual requested directory.\n\t\t *\n\t\t * We aggressively cache all of this info to make sure we don't\n\t\t * have to recalculate everything for every call.\n\t\t */\n\t\tdo {\n\t\t\trelativeDirectoryToCheck += `${directoryParts.shift()}/`;\n\n\t\t\tresult = shouldIgnorePath(\n\t\t\t\tthis.ignores,\n\t\t\t\tthis.#path.join(this.basePath, relativeDirectoryToCheck),\n\t\t\t\trelativeDirectoryToCheck,\n\t\t\t\t{\n\t\t\t\t\tbasePath: this.#namespacedBasePath,\n\t\t\t\t\tpath: this.#path,\n\t\t\t\t},\n\t\t\t);\n\n\t\t\tcache.set(relativeDirectoryToCheck, result);\n\t\t} while (!result && directoryParts.length);\n\n\t\t// also cache the result for the requested path\n\t\tcache.set(relativeDirectoryPath, result);\n\n\t\treturn result;\n\t}\n}\n\nexport { ConfigArray, ConfigArraySymbol };\n","import type { MinimatchOptions } from \"minimatch\";\nimport type { FlatConfigItem, MatchedFile } from \"./types\";\nimport { ConfigArray } from \"@eslint/config-array\";\nimport { Minimatch } from \"minimatch\";\n\nexport const DEFAULT_WORKSPACE_SCAN_GLOBS: readonly string[] = [\n \"**/*.{css,scss,sass,less,pcss,sss,styl,stylus,vue,svelte,astro,html}\",\n];\n\nconst minimatchOpts: MinimatchOptions = { dot: true };\nconst _matchInstances = new Map<string, Minimatch>();\n\nfunction minimatch(file: string, pattern: string) {\n const normalizedPattern = pattern.startsWith(\"!\")\n ? pattern.slice(1)\n : pattern;\n\n let m = _matchInstances.get(normalizedPattern);\n if (!m) {\n m = new Minimatch(normalizedPattern, minimatchOpts);\n _matchInstances.set(normalizedPattern, m);\n }\n return m.match(file);\n}\n\nexport function getMatchedGlobs(file: string, globs: string[]): string[] {\n return globs.filter((glob) => minimatch(file, glob));\n}\n\nfunction getParentDirectories(filepath: string): string[] {\n const parts = filepath.split(\"/\").filter(Boolean);\n if (parts.length <= 1) return [];\n\n const directories: string[] = [];\n for (let i = 1; i < parts.length; i += 1)\n directories.push(`${parts.slice(0, i).join(\"/\")}/`);\n\n return directories;\n}\n\nfunction isIgnoredByGlobalIgnoreGlobs(\n filepath: string,\n globs: string[]\n): boolean {\n const parentDirectories = getParentDirectories(filepath);\n let isFileIgnored = false;\n const ignoredDirectories = new Map<string, boolean>(\n parentDirectories.map((directory) => [directory, false])\n );\n\n for (const glob of globs) {\n const isUnignore = glob.startsWith(\"!\");\n const nextIgnored = !isUnignore;\n\n if (minimatch(filepath, glob)) isFileIgnored = nextIgnored;\n\n parentDirectories.forEach((directory) => {\n if (minimatch(directory, glob))\n ignoredDirectories.set(directory, nextIgnored);\n });\n }\n\n return isFileIgnored || [...ignoredDirectories.values()].some(Boolean);\n}\n\nfunction isIgnoredByConfigGlobs(filepath: string, globs: string[]): boolean {\n const matchedGlobs = getMatchedGlobs(filepath, globs);\n return matchedGlobs.length > 0 && !matchedGlobs.at(-1)?.startsWith(\"!\");\n}\n\nconst META_KEYS = new Set([\"name\", \"index\"]);\n\n/**\n * Config with only `ignores` property\n */\nexport function isIgnoreOnlyConfig(config: FlatConfigItem): boolean {\n const keys = Object.keys(config).filter((i) => !META_KEYS.has(i));\n return keys.length === 1 && keys[0] === \"ignores\";\n}\n\n/**\n * Config without `files` and `ignores` properties or with only `ignores`\n * property\n */\nexport function isGeneralConfig(config: FlatConfigItem): boolean {\n return (!config.files && !config.ignores) || isIgnoreOnlyConfig(config);\n}\n\nexport function matchFile(\n filepath: string,\n configs: FlatConfigItem[],\n _basePath: string\n): MatchedFile {\n const result: MatchedFile = {\n filepath,\n globs: [],\n configs: [],\n };\n\n const globalIgnoreGlobs = configs\n .filter((config) => isIgnoreOnlyConfig(config))\n .flatMap((config) => config.ignores ?? []);\n const isGloballyIgnored = isIgnoredByGlobalIgnoreGlobs(\n filepath,\n globalIgnoreGlobs\n );\n\n configs.forEach((config) => {\n if (isIgnoreOnlyConfig(config)) {\n result.globs.push(\n ...getMatchedGlobs(filepath, config.ignores ?? [])\n );\n return;\n }\n\n const positive = getMatchedGlobs(filepath, config.files || []);\n const negative = getMatchedGlobs(filepath, config.ignores || []);\n const isIgnoredByConfig = isIgnoredByConfigGlobs(\n filepath,\n config.ignores ?? []\n );\n\n const hasNoFilesConstraint = !config.files?.length;\n const matchesByFiles = hasNoFilesConstraint || positive.length > 0;\n\n const isMatched =\n !isGloballyIgnored && matchesByFiles && !isIgnoredByConfig;\n\n if (isMatched) {\n result.configs.push(config.index);\n\n // Push positive globs only when config is matched and has explicit files globs.\n result.globs.push(...positive);\n }\n\n result.globs.push(...negative);\n });\n\n result.globs = [...new Set(result.globs)];\n\n return result;\n}\n\nconst NOOP_SCHEMA = {\n merge: \"replace\",\n validate() {},\n};\n\nconst FLAT_CONFIG_NOOP_SCHEMA = {\n settings: NOOP_SCHEMA,\n linterOptions: NOOP_SCHEMA,\n language: NOOP_SCHEMA,\n languageOptions: NOOP_SCHEMA,\n processor: NOOP_SCHEMA,\n plugins: NOOP_SCHEMA,\n extends: NOOP_SCHEMA,\n customSyntax: NOOP_SCHEMA,\n overrides: NOOP_SCHEMA,\n ignoreFiles: NOOP_SCHEMA,\n defaultSeverity: NOOP_SCHEMA,\n processors: NOOP_SCHEMA,\n reportDescriptionlessDisables: NOOP_SCHEMA,\n reportInvalidScopeDisables: NOOP_SCHEMA,\n reportNeedlessDisables: NOOP_SCHEMA,\n reportUnscopedDisables: NOOP_SCHEMA,\n configurationComment: NOOP_SCHEMA,\n ignoreDisables: NOOP_SCHEMA,\n allowEmptyInput: NOOP_SCHEMA,\n cache: NOOP_SCHEMA,\n fix: NOOP_SCHEMA,\n formatter: NOOP_SCHEMA,\n index: {\n ...NOOP_SCHEMA,\n // accumulate the matched config index to an array\n merge(v1: number | number[], v2: number | number[]) {\n return [...[v1].flat(), ...[v2].flat()];\n },\n },\n rules: NOOP_SCHEMA,\n};\n\nexport function buildConfigArray(\n configs: Array<Record<string, unknown>>,\n basePath: string\n): ConfigArray {\n return new ConfigArray(configs, {\n basePath,\n schema: FLAT_CONFIG_NOOP_SCHEMA as unknown as never,\n }).normalizeSync();\n}\n","import c from \"ansis\";\nimport { MARK_ERROR } from \"./constants\";\n\nexport class ConfigInspectorError extends Error {\n prettyPrint(): void {\n console.error(MARK_ERROR, this.message);\n }\n}\n\nexport class ConfigPathError extends ConfigInspectorError {\n override name = \"ConfigPathError\" as const;\n\n constructor(\n public basePath: string,\n public configFilenames: readonly string[]\n ) {\n super(\"Cannot find Stylelint config file\");\n }\n\n override prettyPrint(): void {\n console.error(\n MARK_ERROR,\n this.message,\n c.dim(`\n\nLooked in ${c.underline(this.basePath)} and parent folders for:\n\n * ${this.configFilenames.join(\"\\n * \")}`)\n );\n }\n}\n\nexport class ConfigPathLegacyError extends ConfigInspectorError {\n override name = \"ConfigPathLegacyError\" as const;\n\n constructor(\n public basePath: string,\n public configFilename: string\n ) {\n super(\"Found legacy Stylelint config file\");\n }\n\n override prettyPrint(): void {\n console.error(\n MARK_ERROR,\n this.message,\n c.dim(`\n\nEncountered legacy Stylelint config ${c.underline(this.configFilename)} in ${c.underline(this.basePath)}\n\nPrefer modern Stylelint config filenames:\nhttps://stylelint.io/user-guide/configure`)\n );\n }\n}\n","import type { Config as StylelintConfig } from \"stylelint\";\nimport type {\n ExtendsInfo,\n FlatConfigItem,\n MatchedFile,\n Payload,\n RuleDescriptionSource,\n RuleDocsUrlSource,\n RuleInfo,\n RulesRecord,\n StylelintIgnoreInfo,\n} from \"../../shared/types\";\nimport type {\n InspectorAdapter,\n InspectorReadResult,\n ReadConfigOptions,\n ResolveConfigPathOptions,\n ResolvedConfigPath,\n} from \"./contracts\";\nimport { readFile, stat } from \"node:fs/promises\";\nimport { createRequire } from \"node:module\";\nimport { isAbsolute } from \"node:path\";\nimport process from \"node:process\";\nimport { pathToFileURL } from \"node:url\";\nimport c from \"ansis\";\nimport { bundleRequire } from \"bundle-require\";\nimport { findUp } from \"find-up\";\nimport { basename, dirname, normalize, relative, resolve } from \"pathe\";\nimport stylelint from \"stylelint\";\nimport { glob } from \"tinyglobby\";\nimport {\n DEFAULT_WORKSPACE_SCAN_GLOBS,\n isGeneralConfig,\n isIgnoreOnlyConfig,\n matchFile,\n} from \"../../shared/configs\";\nimport {\n DEFAULT_TARGET_FILE,\n MARK_CHECK,\n MARK_INFO,\n stylelintConfigFilenames,\n stylelintLegacyConfigFilenames,\n} from \"../constants\";\nimport { ConfigPathError } from \"../errors\";\n\nconst DEFAULT_WORKSPACE_SCAN_IGNORES = [\n \"**/node_modules/**\",\n \"**/.git/**\",\n \"**/.nuxt/**\",\n \"**/.output/**\",\n \"**/dist/**\",\n \"**/coverage/**\",\n];\nconst MAX_WORKSPACE_MATCHED_FILES = 5000;\nconst FILE_EXTENSION_RE = /\\.[^.]+$/;\nconst REGEXP_SPECIAL_CHARS_RE = /[.*+?^${}()|[\\]\\\\]/g;\nconst AT_PREFIX_RE = /^@/;\nconst STYLELINT_PLUGIN_PREFIX_RE = /^stylelint-plugin-/;\nconst STYLELINT_PACKAGE_PREFIX_RE = /^stylelint-/;\nconst STYLELINT_CONFIG_PACKAGE_IMPORT_RE =\n /^(?:stylelint-config(?:-|$)|@[^/]+\\/stylelint-config(?:-|$))/;\nconst SCOPED_STYLELINT_PLUGIN_PACKAGE_RE =\n /^(@[^/]+)\\/stylelint-plugin(?:-(.+))?$/;\nconst SCOPED_STYLELINT_PACKAGE_RE = /^(@[^/]+)\\/stylelint-(.+)$/;\nconst GENERIC_PLUGIN_PREFIXES = new Set([\n \"plugin\",\n \"rule\",\n \"rules\",\n]);\nconst UNSAFE_MESSAGE_DESCRIPTION_RE =\n /^Expected\\s+\"undefined\"\\s+to\\s+be\\s+one\\s+of\\s+\"undefined\"/i;\nconst MESSAGE_PLACEHOLDER_RE = /%[a-z]/i;\nconst MESSAGE_UNDEFINED_RE = /\\bundefined\\b/i;\nconst TRAILING_RULE_REFERENCE_RE = /\\s*\\(([^()]+)\\)\\s*$/;\nconst DESCRIPTION_TEMPLATE_TOKEN_RE = /<([a-z][\\w-]*)>/gi;\nconst QUOTED_GENERATED_PLACEHOLDER_RE = /([\"'])(‹[^›]+›)\\1/g;\nconst MULTIPLE_WHITESPACE_RE = /\\s+/g;\nconst LINE_SPLIT_RE = /\\r?\\n/u;\nconst GIT_SUFFIX_RE = /\\.git$/i;\nconst GIT_PROTOCOL_PREFIX_RE = /^git\\+/i;\nconst MESSAGE_CALL_ARGS: readonly unknown[][] = [\n [],\n [\"<value>\"],\n [\"<value>\", \"<value>\"],\n [\n \"<value>\",\n \"<value>\",\n \"<value>\",\n ],\n];\nconst PRIORITIZED_MESSAGE_KEYS = new Set([\n \"rejected\",\n \"unexpected\",\n \"expected\",\n \"message\",\n \"default\",\n]);\nconst GENERATED_VALUE_PLACEHOLDERS = [\n \"‹foo›\",\n \"‹bar›\",\n \"‹baz›\",\n \"‹qux›\",\n] as const;\n\nconst require = createRequire(import.meta.url);\n\ninterface StylelintConfigLike extends Record<string, unknown> {\n files?: unknown;\n ignoreFiles?: unknown;\n rules?: unknown;\n plugins?: unknown;\n extends?: unknown;\n customSyntax?: unknown;\n name?: unknown;\n overrides?: unknown;\n}\n\ninterface ResolveConfigOptionsSubset {\n cwd?: string;\n config?: StylelintConfig;\n configBasedir?: string;\n customSyntax?: string;\n}\n\ninterface RuleMetaLike extends Record<string, unknown> {\n url?: unknown;\n fixable?: unknown;\n deprecated?: unknown;\n description?: unknown;\n recommended?: unknown;\n}\n\ninterface RuleFunctionLike {\n (...args: unknown[]): unknown;\n ruleName?: unknown;\n meta?: unknown;\n messages?: unknown;\n primaryOptionArray?: unknown;\n}\n\ninterface RuleDefinitionLike {\n ruleName: string;\n meta?: RuleMetaLike;\n messages?: Record<string, unknown>;\n primaryOptionArray?: unknown[];\n}\n\ninterface PluginRuleDefinitionSource {\n definition: RuleDefinitionLike;\n sourcePlugin: string;\n sourcePackageName?: string;\n sourceDocsUrl?: string;\n sourceDocsUrlSource?: RuleDocsUrlSource;\n}\n\ninterface RuleDescriptionResult {\n text: string;\n missingDescription: boolean;\n source: RuleDescriptionSource;\n}\n\ninterface PluginPackageDocsMetadata {\n packageName?: string;\n docsUrl?: string;\n docsUrlSource?: RuleDocsUrlSource;\n}\n\ninterface ResolvedExtendsSpecifier {\n specifier: string;\n packageName?: string;\n packageRoot?: string;\n resolvedPath?: string;\n source: ExtendsInfo[\"source\"];\n}\n\ninterface LoadedExtendsConfig {\n config?: StylelintConfigLike;\n dependencies: string[];\n entryPath?: string;\n}\n\nlet _recommendedCoreRulesPromise: Promise<Set<string>> | undefined;\n\nconst OMITTED_EXTRA_CONFIG_KEYS = new Set([\n \"pluginFunctions\",\n \"processors\",\n \"result\",\n \"formatter\",\n]);\n\nfunction isNoConfigError(error: unknown): boolean {\n return (\n error instanceof Error &&\n error.message.includes(\"No configuration provided for\")\n );\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === \"object\" && value !== null;\n}\n\nfunction isScalarValue(\n value: unknown\n): value is string | number | boolean | null {\n return (\n value === null ||\n typeof value === \"string\" ||\n typeof value === \"number\" ||\n typeof value === \"boolean\"\n );\n}\n\nfunction isPlainSerializableObject(\n value: unknown\n): value is Record<string, string | number | boolean | null> {\n if (!isRecord(value)) return false;\n\n return Object.values(value).every(isScalarValue);\n}\n\nfunction isSerializableExtraValue(value: unknown): boolean {\n if (isScalarValue(value)) return true;\n\n if (Array.isArray(value)) return value.every(isScalarValue);\n\n if (isPlainSerializableObject(value)) return true;\n\n return false;\n}\n\nfunction sanitizeExtraConfigFields(\n value: Record<string, unknown>\n): Record<string, unknown> {\n return Object.fromEntries(\n Object.entries(value)\n .filter(([key]) => !OMITTED_EXTRA_CONFIG_KEYS.has(key))\n .filter(([, fieldValue]) => isSerializableExtraValue(fieldValue))\n );\n}\n\nfunction getPackageNameFromPath(pathLike: string): string | undefined {\n const normalized = normalize(pathLike).replaceAll(\"\\\\\", \"/\");\n const nodeModulesToken = \"/node_modules/\";\n const nodeModulesIndex = normalized.lastIndexOf(nodeModulesToken);\n\n if (nodeModulesIndex === -1) return undefined;\n\n const packagePath = normalized.slice(\n nodeModulesIndex + nodeModulesToken.length\n );\n const parts = packagePath.split(\"/\").filter(Boolean);\n if (!parts.length) return undefined;\n\n if (parts[0]?.startsWith(\"@\")) {\n const scope = parts[0];\n const name = parts[1];\n if (scope && name) return `${scope}/${name}`;\n }\n\n return parts[0];\n}\n\nfunction sanitizePluginName(name: string): string {\n if (!name.includes(\"/\") && !name.includes(\"\\\\\")) return name;\n\n const packageName = getPackageNameFromPath(name);\n if (packageName) return packageName;\n\n const normalized = normalize(name).replaceAll(\"\\\\\", \"/\");\n const stem = basename(normalized).replace(FILE_EXTENSION_RE, \"\");\n return stem || name;\n}\n\nfunction normalizePluginPackageName(name: string): string {\n const trimmed = name.trim();\n if (!trimmed) return trimmed;\n\n if (trimmed === \"stylelint\") return trimmed;\n\n const scopedPluginMatch = SCOPED_STYLELINT_PLUGIN_PACKAGE_RE.exec(trimmed);\n if (scopedPluginMatch) {\n const scope = scopedPluginMatch[1];\n const suffix = scopedPluginMatch[2];\n if (!scope) return trimmed;\n return suffix ? `${scope}/${suffix}` : scope;\n }\n\n const scopedStylelintMatch = SCOPED_STYLELINT_PACKAGE_RE.exec(trimmed);\n if (scopedStylelintMatch) {\n const scope = scopedStylelintMatch[1];\n const suffix = scopedStylelintMatch[2];\n if (!scope) return trimmed;\n return suffix ? `${scope}/${suffix}` : scope;\n }\n\n if (STYLELINT_PLUGIN_PREFIX_RE.test(trimmed))\n return trimmed.replace(STYLELINT_PLUGIN_PREFIX_RE, \"\");\n\n if (STYLELINT_PACKAGE_PREFIX_RE.test(trimmed))\n return trimmed.replace(STYLELINT_PACKAGE_PREFIX_RE, \"\");\n\n return trimmed;\n}\n\nfunction isBareModuleSpecifier(specifier: string): boolean {\n return (\n !isAbsolute(specifier) &&\n !specifier.startsWith(\".\") &&\n !specifier.startsWith(\"file:\")\n );\n}\n\nfunction toPackageNameFromSpecifier(specifier: string): string | undefined {\n if (!isBareModuleSpecifier(specifier)) return undefined;\n\n const trimmed = specifier.trim();\n if (!trimmed) return undefined;\n\n const parts = trimmed.split(\"/\").filter(Boolean);\n if (!parts.length) return undefined;\n\n if (parts[0]?.startsWith(\"@\")) {\n const scope = parts[0];\n const name = parts[1];\n return scope && name ? `${scope}/${name}` : undefined;\n }\n\n return parts[0];\n}\n\nfunction getPackageRootFromResolvedPath(\n resolvedPath: string\n): string | undefined {\n const normalized = normalize(resolvedPath).replaceAll(\"\\\\\", \"/\");\n const nodeModulesToken = \"/node_modules/\";\n const nodeModulesIndex = normalized.lastIndexOf(nodeModulesToken);\n if (nodeModulesIndex === -1) return undefined;\n\n const modulesRoot = normalized.slice(\n 0,\n nodeModulesIndex + nodeModulesToken.length\n );\n const packagePath = normalized.slice(\n nodeModulesIndex + nodeModulesToken.length\n );\n const parts = packagePath.split(\"/\").filter(Boolean);\n if (!parts.length) return undefined;\n\n if (parts[0]?.startsWith(\"@\")) {\n const scope = parts[0];\n const name = parts[1];\n if (!scope || !name) return undefined;\n return resolve(modulesRoot, scope, name);\n }\n\n const packageName = parts[0];\n return packageName ? resolve(modulesRoot, packageName) : undefined;\n}\n\nfunction normalizeAbsoluteUrl(value: string | undefined): string | undefined {\n if (!value) return undefined;\n\n const trimmed = value.trim();\n if (!trimmed) return undefined;\n\n if (trimmed.startsWith(\"http://\") || trimmed.startsWith(\"https://\"))\n return trimmed;\n\n if (trimmed.startsWith(\"//\")) return `https:${trimmed}`;\n\n return undefined;\n}\n\nfunction normalizeRepositoryUrl(repository: unknown): string | undefined {\n const raw = (() => {\n if (typeof repository === \"string\") return repository;\n\n if (isRecord(repository) && typeof repository[\"url\"] === \"string\")\n return repository[\"url\"];\n\n return undefined;\n })();\n\n if (!raw) return undefined;\n\n const trimmed = raw.trim();\n if (!trimmed) return undefined;\n\n if (trimmed.startsWith(\"github:\"))\n return `https://github.com/${trimmed.slice(\"github:\".length)}`;\n\n if (trimmed.startsWith(\"git@github.com:\"))\n return `https://github.com/${trimmed.slice(\"git@github.com:\".length).replace(GIT_SUFFIX_RE, \"\")}`;\n\n const withoutGitPrefix = trimmed.replace(GIT_PROTOCOL_PREFIX_RE, \"\");\n const normalized =\n withoutGitPrefix.startsWith(\"http://\") ||\n withoutGitPrefix.startsWith(\"https://\")\n ? withoutGitPrefix\n : undefined;\n\n if (!normalized) return undefined;\n\n return normalized.replace(GIT_SUFFIX_RE, \"\");\n}\n\nasync function readPluginPackageDocsMetadata(\n pluginEntry: string\n): Promise<PluginPackageDocsMetadata | undefined> {\n const resolvedPluginEntry = (() => {\n if (isAbsolute(pluginEntry)) return pluginEntry;\n\n if (!isBareModuleSpecifier(pluginEntry)) return undefined;\n\n try {\n return require.resolve(pluginEntry, { paths: [process.cwd()] });\n } catch {\n return undefined;\n }\n })();\n\n const packageName = (() => {\n const fromSpecifier = toPackageNameFromSpecifier(pluginEntry);\n if (fromSpecifier) return fromSpecifier;\n\n if (!resolvedPluginEntry) return undefined;\n\n return getPackageNameFromPath(resolvedPluginEntry);\n })();\n\n if (!packageName) return undefined;\n\n const packageRoot = resolvedPluginEntry\n ? getPackageRootFromResolvedPath(resolvedPluginEntry)\n : undefined;\n\n const packageJsonPath = packageRoot\n ? resolve(packageRoot, \"package.json\")\n : undefined;\n\n const packageJsonContent = packageJsonPath\n ? await readFile(packageJsonPath, \"utf-8\").catch(() => undefined)\n : undefined;\n\n if (!packageJsonContent) {\n return {\n packageName,\n docsUrl: `https://www.npmjs.com/package/${packageName}`,\n docsUrlSource: \"inferred\",\n };\n }\n\n let packageJson: unknown;\n try {\n packageJson = JSON.parse(packageJsonContent);\n } catch {\n packageJson = undefined;\n }\n\n const homepageUrl = normalizeAbsoluteUrl(\n isRecord(packageJson) && typeof packageJson[\"homepage\"] === \"string\"\n ? packageJson[\"homepage\"]\n : undefined\n );\n const repositoryUrl = normalizeRepositoryUrl(\n isRecord(packageJson) ? packageJson[\"repository\"] : undefined\n );\n const docsUrl =\n homepageUrl ??\n repositoryUrl ??\n `https://www.npmjs.com/package/${packageName}`;\n\n return {\n packageName,\n docsUrl,\n docsUrlSource: \"inferred\",\n };\n}\n\nasync function readJsonFile(path: string): Promise<unknown> {\n const content = await readFile(path, \"utf-8\").catch(() => undefined);\n if (!content) return undefined;\n\n try {\n return JSON.parse(content) as unknown;\n } catch {\n return undefined;\n }\n}\n\nasync function readPackageManifest(\n packageRoot: string\n): Promise<Record<string, unknown> | undefined> {\n const packageJson = await readJsonFile(\n resolve(packageRoot, \"package.json\")\n );\n return isRecord(packageJson) ? packageJson : undefined;\n}\n\nasync function resolvePackageRoot(\n packageName: string,\n searchPaths: readonly string[]\n): Promise<string | undefined> {\n for (const searchPath of searchPaths) {\n const candidate = resolve(searchPath, \"node_modules\", packageName);\n if (await exists(candidate)) return candidate;\n }\n\n return undefined;\n}\n\nasync function resolveExtendsSpecifier(\n specifier: string,\n configBasePath: string,\n workspaceBasePath: string\n): Promise<ResolvedExtendsSpecifier> {\n const packageName = toPackageNameFromSpecifier(specifier);\n const searchPaths = [\n ...new Set([\n configBasePath,\n workspaceBasePath,\n process.cwd(),\n ]),\n ];\n\n let resolvedPath: string | undefined;\n\n if (isAbsolute(specifier)) {\n resolvedPath = specifier;\n } else {\n try {\n resolvedPath = require.resolve(specifier, { paths: searchPaths });\n } catch {\n resolvedPath = undefined;\n }\n }\n\n const packageRoot = resolvedPath\n ? getPackageRootFromResolvedPath(resolvedPath)\n : packageName\n ? await resolvePackageRoot(packageName, searchPaths)\n : undefined;\n\n let source: \"package\" | \"local\" | \"unknown\" = \"unknown\";\n if (packageName) {\n source = \"package\";\n } else if (specifier.startsWith(\".\") || isAbsolute(specifier)) {\n source = \"local\";\n }\n\n return {\n specifier,\n ...(packageName !== undefined && { packageName }),\n ...(packageRoot !== undefined && { packageRoot }),\n ...(resolvedPath !== undefined && { resolvedPath }),\n source,\n };\n}\n\nasync function resolvePackageEntryPath(\n packageRoot: string\n): Promise<string | undefined> {\n const packageJson = await readPackageManifest(packageRoot);\n const entryCandidates = [\n typeof packageJson?.[\"main\"] === \"string\"\n ? packageJson[\"main\"]\n : undefined,\n \"index.js\",\n \"index.cjs\",\n \"index.mjs\",\n ].filter(\n (candidate): candidate is string =>\n typeof candidate === \"string\" && candidate.length > 0\n );\n\n for (const candidate of entryCandidates) {\n const entryPath = resolve(packageRoot, candidate);\n if (await exists(entryPath)) return entryPath;\n }\n\n return undefined;\n}\n\nasync function resolveExtendsEntryPath(\n resolvedSpecifier: ResolvedExtendsSpecifier\n): Promise<string | undefined> {\n return (\n resolvedSpecifier.resolvedPath ??\n (resolvedSpecifier.packageRoot\n ? await resolvePackageEntryPath(resolvedSpecifier.packageRoot)\n : undefined)\n );\n}\n\nasync function loadExtendsConfigWithDependencies(\n resolvedSpecifier: ResolvedExtendsSpecifier,\n configBasePath: string\n): Promise<LoadedExtendsConfig> {\n const entryPath = await resolveExtendsEntryPath(resolvedSpecifier);\n\n if (!entryPath) return { dependencies: [] };\n\n try {\n const loaded = await loadConfigFromPath(entryPath, configBasePath);\n return {\n config: loaded.config as StylelintConfigLike,\n dependencies: loaded.dependencies,\n entryPath,\n };\n } catch {\n return {\n dependencies: [entryPath],\n entryPath,\n };\n }\n}\n\nasync function loadExtendsConfig(\n resolvedSpecifier: ResolvedExtendsSpecifier,\n configBasePath: string\n): Promise<StylelintConfigLike | undefined> {\n return (\n await loadExtendsConfigWithDependencies(\n resolvedSpecifier,\n configBasePath\n )\n ).config;\n}\n\nfunction addDependency(\n dependencies: Set<string>,\n dependency: string,\n basePath: string\n): void {\n dependencies.add(\n normalize(\n isAbsolute(dependency) ? dependency : resolve(basePath, dependency)\n )\n );\n}\n\nasync function collectExtendsDependencies(\n configs: FlatConfigItem[],\n workspaceBasePath: string,\n configBasePath: string\n): Promise<string[]> {\n const dependencies = new Set<string>();\n const visited = new Set<string>();\n\n async function visit(specifier: string, basePath: string): Promise<void> {\n const resolvedSpecifier = await resolveExtendsSpecifier(\n specifier,\n basePath,\n workspaceBasePath\n );\n const cacheKey =\n resolvedSpecifier.resolvedPath ??\n resolvedSpecifier.packageRoot ??\n `${basePath}:${specifier}`;\n\n if (visited.has(cacheKey)) return;\n visited.add(cacheKey);\n\n const loaded = await loadExtendsConfigWithDependencies(\n resolvedSpecifier,\n basePath\n );\n loaded.dependencies.forEach((dependency) =>\n addDependency(dependencies, dependency, basePath)\n );\n\n const directExtends = toStringArray(loaded.config?.extends);\n if (!directExtends || !loaded.entryPath) return;\n\n const nestedBasePath = dirname(loaded.entryPath);\n for (const nestedSpecifier of directExtends)\n await visit(nestedSpecifier, nestedBasePath);\n }\n\n for (const config of configs) {\n for (const specifier of config.extends ?? [])\n await visit(specifier, configBasePath);\n }\n\n return [...dependencies].toSorted((left, right) =>\n left.localeCompare(right)\n );\n}\n\nasync function readExtendsPackageMetadata(\n resolvedSpecifier: ResolvedExtendsSpecifier\n): Promise<{\n description?: string;\n docsUrl?: string;\n docsUrlSource?: RuleDocsUrlSource;\n}> {\n const packageRoot = resolvedSpecifier.packageRoot;\n const packageName = resolvedSpecifier.packageName;\n\n if (!packageRoot && !packageName) return {};\n\n const packageJson = packageRoot\n ? await readPackageManifest(packageRoot)\n : undefined;\n\n const description =\n typeof packageJson?.[\"description\"] === \"string\"\n ? packageJson[\"description\"].trim() || undefined\n : undefined;\n const homepageUrl = normalizeAbsoluteUrl(\n typeof packageJson?.[\"homepage\"] === \"string\"\n ? packageJson[\"homepage\"]\n : undefined\n );\n const repositoryUrl = normalizeRepositoryUrl(packageJson?.[\"repository\"]);\n const docsUrl =\n homepageUrl ??\n repositoryUrl ??\n (packageName\n ? `https://www.npmjs.com/package/${packageName}`\n : undefined);\n\n return {\n ...(description !== undefined && { description }),\n ...(docsUrl !== undefined && { docsUrl }),\n ...(docsUrl ? { docsUrlSource: \"inferred\" as const } : {}),\n };\n}\n\nasync function buildExtendsInfo(\n configs: FlatConfigItem[],\n workspaceBasePath: string,\n configBasePath: string\n): Promise<ExtendsInfo[]> {\n const usedBy = new Map<string, Set<number>>();\n\n for (const config of configs) {\n for (const specifier of config.extends ?? []) {\n if (!usedBy.has(specifier))\n usedBy.set(specifier, new Set<number>());\n usedBy.get(specifier)?.add(config.index);\n }\n }\n\n const entries = await Promise.all(\n Array.from(usedBy.entries(), async ([specifier, indexes]) => {\n const resolvedSpecifier = await resolveExtendsSpecifier(\n specifier,\n configBasePath,\n workspaceBasePath\n );\n const [packageMetadata, loadedConfig] = await Promise.all([\n readExtendsPackageMetadata(resolvedSpecifier),\n loadExtendsConfig(resolvedSpecifier, configBasePath),\n ]);\n\n const normalizedPlugins = toPluginRecord(loadedConfig?.plugins);\n const directExtends = toStringArray(loadedConfig?.extends);\n const customSyntax =\n typeof loadedConfig?.customSyntax === \"string\"\n ? loadedConfig.customSyntax\n : undefined;\n const rules = toRulesRecord(loadedConfig?.rules);\n const ruleNames = rules\n ? Object.keys(rules).toSorted((left, right) =>\n left.localeCompare(right)\n )\n : undefined;\n\n return {\n specifier,\n ...(resolvedSpecifier.packageName !== undefined && {\n packageName: resolvedSpecifier.packageName,\n }),\n ...(packageMetadata.description !== undefined && {\n description: packageMetadata.description,\n }),\n ...(packageMetadata.docsUrl !== undefined && {\n docsUrl: packageMetadata.docsUrl,\n }),\n ...(packageMetadata.docsUrlSource !== undefined && {\n docsUrlSource: packageMetadata.docsUrlSource,\n }),\n source: resolvedSpecifier.source,\n ...(directExtends ? { directExtends } : {}),\n ...(normalizedPlugins\n ? { plugins: Object.keys(normalizedPlugins) }\n : {}),\n ...(customSyntax ? { customSyntax } : {}),\n ...(rules ? { ruleCount: Object.keys(rules).length } : {}),\n ...(ruleNames ? { rules: ruleNames } : {}),\n usedByConfigIndexes: [...indexes].toSorted(\n (left, right) => left - right\n ),\n } satisfies ExtendsInfo;\n })\n );\n\n return entries.toSorted((left, right) =>\n left.specifier.localeCompare(right.specifier)\n );\n}\n\nasync function readStylelintIgnoreInfo(\n basePath: string\n): Promise<StylelintIgnoreInfo | undefined> {\n const ignorePath = await findUp(\".stylelintignore\", { cwd: basePath });\n if (!ignorePath) return undefined;\n\n const content = await readFile(ignorePath, \"utf-8\").catch(() => undefined);\n if (!content) return undefined;\n\n const patterns = content\n .split(LINE_SPLIT_RE)\n .map((line) => line.trim())\n .filter((line) => line.length > 0 && !line.startsWith(\"#\"));\n\n return {\n path: getRelativeFilepath(basePath, ignorePath),\n patterns,\n };\n}\n\nfunction toStringArray(value: unknown): string[] | undefined {\n if (typeof value === \"string\") return [value];\n\n if (!Array.isArray(value)) return undefined;\n\n const items = value.filter(\n (item): item is string => typeof item === \"string\"\n );\n return items.length ? items : undefined;\n}\n\nfunction toRulesRecord(value: unknown): RulesRecord | undefined {\n if (!isRecord(value)) return undefined;\n return value;\n}\n\nfunction getPluginName(entry: unknown, index: number): string {\n if (typeof entry === \"string\") return sanitizePluginName(entry);\n\n if (typeof entry === \"function\" && entry.name) return entry.name;\n\n if (isRecord(entry) && typeof entry[\"ruleName\"] === \"string\")\n return entry[\"ruleName\"].split(\"/\")[0] ?? entry[\"ruleName\"];\n\n return `plugin-${index + 1}`;\n}\n\nfunction toPluginRecord(value: unknown): Record<string, unknown> | undefined {\n if (!Array.isArray(value)) return undefined;\n\n const entries = value\n .map((entry, index) => getPluginName(entry, index))\n .filter(Boolean);\n\n if (!entries.length) return undefined;\n\n return Object.fromEntries(entries.map((name) => [name, {}]));\n}\n\nfunction getRulePlugin(ruleName: string): string {\n return ruleName.includes(\"/\")\n ? (ruleName.split(\"/\")[0] ?? \"stylelint\")\n : \"stylelint\";\n}\n\nfunction getDisplayPluginName(ruleName: string, sourcePlugin?: string): string {\n const rulePlugin = getRulePlugin(ruleName);\n if (!sourcePlugin) return rulePlugin;\n\n return GENERIC_PLUGIN_PREFIXES.has(rulePlugin) ? sourcePlugin : rulePlugin;\n}\n\nfunction toUnknownArray(value: unknown): unknown[] | undefined {\n return Array.isArray(value) ? value : undefined;\n}\n\nfunction toUnknownRecord(value: unknown): Record<string, unknown> | undefined {\n return isRecord(value) ? value : undefined;\n}\n\nfunction toRuleMeta(value: unknown): RuleMetaLike | undefined {\n return isRecord(value) ? value : undefined;\n}\n\nfunction toRuleFunction(value: unknown): RuleFunctionLike | undefined {\n return typeof value === \"function\"\n ? (value as RuleFunctionLike)\n : undefined;\n}\n\nfunction getRuleNameFromUnknown(value: unknown): string | undefined {\n if (isRecord(value) && typeof value[\"ruleName\"] === \"string\")\n return value[\"ruleName\"];\n\n const functionValue = toRuleFunction(value);\n if (typeof functionValue?.ruleName === \"string\")\n return functionValue.ruleName;\n\n return undefined;\n}\n\nfunction toRuleDefinition(\n value: unknown,\n fallbackRuleName?: string\n): RuleDefinitionLike | undefined {\n const functionValue = toRuleFunction(value);\n if (functionValue) {\n const ruleName =\n typeof functionValue.ruleName === \"string\"\n ? functionValue.ruleName\n : fallbackRuleName;\n\n if (!ruleName) return undefined;\n\n const meta = toRuleMeta(functionValue.meta);\n const messages = toUnknownRecord(functionValue.messages);\n const primaryOptionArray = toUnknownArray(\n functionValue.primaryOptionArray\n );\n return {\n ruleName,\n ...(meta !== undefined && { meta }),\n ...(messages !== undefined && { messages }),\n ...(primaryOptionArray !== undefined && { primaryOptionArray }),\n };\n }\n\n if (!isRecord(value)) return undefined;\n\n const nestedRule = toRuleFunction(value[\"rule\"]);\n let ruleName = fallbackRuleName;\n if (typeof value[\"ruleName\"] === \"string\") {\n ruleName = value[\"ruleName\"];\n } else if (typeof nestedRule?.ruleName === \"string\") {\n ruleName = nestedRule.ruleName;\n }\n\n if (!ruleName) return undefined;\n\n const meta = toRuleMeta(value[\"meta\"]) ?? toRuleMeta(nestedRule?.meta);\n const messages =\n toUnknownRecord(value[\"messages\"]) ??\n toUnknownRecord(nestedRule?.messages);\n const primaryOptionArray =\n toUnknownArray(value[\"primaryOptionArray\"]) ??\n toUnknownArray(nestedRule?.primaryOptionArray);\n return {\n ruleName,\n ...(meta !== undefined && { meta }),\n ...(messages !== undefined && { messages }),\n ...(primaryOptionArray !== undefined && { primaryOptionArray }),\n };\n}\n\nfunction resolveMessageText(message: unknown): string | undefined {\n if (typeof message === \"string\") return message;\n\n if (typeof message === \"function\") {\n const resolvedCandidates: string[] = [];\n\n for (const args of MESSAGE_CALL_ARGS) {\n try {\n const resolved = message(...args);\n if (typeof resolved === \"string\" && resolved.trim().length > 0)\n resolvedCandidates.push(resolved.trim());\n } catch {\n // Ignore plugin message invocation failures and continue trying alternatives.\n }\n }\n\n if (resolvedCandidates.length > 0) {\n return resolvedCandidates.toSorted((a, b) => {\n const scoreA = getMessageDescriptionScore(\"message\", a);\n const scoreB = getMessageDescriptionScore(\"message\", b);\n if (scoreA !== scoreB) return scoreA - scoreB;\n\n if (a.length !== b.length) return a.length - b.length;\n\n return a.localeCompare(b);\n })[0];\n }\n }\n\n return undefined;\n}\n\nfunction normalizeRuleMessages(\n messages: Record<string, unknown> | undefined\n): Record<string, string> | undefined {\n if (!messages) return undefined;\n\n const entries = Object.entries(messages)\n .map(([key, value]) => {\n const text = resolveMessageText(value);\n return text ? ([key, text] as const) : undefined;\n })\n .filter(\n (entry): entry is readonly [string, string] => entry !== undefined\n );\n\n return entries.length ? Object.fromEntries(entries) : undefined;\n}\n\nfunction humanizeRuleName(ruleName: string): string {\n const shortName = ruleName.includes(\"/\")\n ? (ruleName.split(\"/\").at(-1) ?? ruleName)\n : ruleName;\n\n return shortName.replaceAll(\"-\", \" \");\n}\n\nfunction toDescriptionPrefixCandidates(\n ruleName: string,\n plugin: string\n): string[] {\n const unscopedPlugin = plugin.replace(AT_PREFIX_RE, \"\");\n const shortRuleName = ruleName.split(\"/\").at(-1) ?? ruleName;\n const candidates = [\n plugin,\n unscopedPlugin,\n ruleName,\n shortRuleName,\n ].filter(Boolean);\n\n const deduplicatedCandidates = [...new Set(candidates)];\n return deduplicatedCandidates;\n}\n\nfunction isUnsafeGeneratedDescription(description: string): boolean {\n return UNSAFE_MESSAGE_DESCRIPTION_RE.test(description);\n}\n\nfunction escapeRegExp(value: string): string {\n return value.replaceAll(REGEXP_SPECIAL_CHARS_RE, String.raw`\\$&`);\n}\n\nfunction sanitizeDescription(ruleName: string, description: string): string {\n const plugin = getRulePlugin(ruleName);\n const sanitized = description.trim();\n if (!sanitized.length) return humanizeRuleName(ruleName);\n\n if (isUnsafeGeneratedDescription(sanitized))\n return humanizeRuleName(ruleName);\n\n const prefixCandidates = toDescriptionPrefixCandidates(ruleName, plugin);\n const withoutPrefix = prefixCandidates.reduce((acc, candidate) => {\n if (!acc.length) return acc;\n\n return acc\n .replace(\n new RegExp(\n String.raw`^${escapeRegExp(candidate)}[\\s:/-]+`,\n \"i\"\n ),\n \"\"\n )\n .trim();\n }, sanitized);\n\n if (!withoutPrefix.length) return humanizeRuleName(ruleName);\n\n let valuePlaceholderIndex = 0;\n const normalizedDescription = withoutPrefix\n .replace(DESCRIPTION_TEMPLATE_TOKEN_RE, (_match, token: string) => {\n const lowerToken = token.toLowerCase();\n if (lowerToken === \"value\") {\n const placeholder =\n GENERATED_VALUE_PLACEHOLDERS[valuePlaceholderIndex] ??\n `‹value ${valuePlaceholderIndex + 1}›`;\n valuePlaceholderIndex += 1;\n return placeholder;\n }\n return token.replaceAll(\"-\", \" \");\n })\n .replaceAll(QUOTED_GENERATED_PLACEHOLDER_RE, \"$2\")\n .replaceAll(MULTIPLE_WHITESPACE_RE, \" \")\n .trim();\n\n if (!normalizedDescription.length) return humanizeRuleName(ruleName);\n\n const lower = normalizedDescription.toLowerCase();\n if (\n lower === ruleName.toLowerCase() ||\n lower === humanizeRuleName(ruleName).toLowerCase()\n ) {\n return humanizeRuleName(ruleName);\n }\n\n const shortRuleName = ruleName.split(\"/\").at(-1) ?? ruleName;\n const trailingRuleReference = TRAILING_RULE_REFERENCE_RE.exec(\n normalizedDescription\n );\n if (trailingRuleReference?.[1]) {\n const referencedRule = trailingRuleReference[1].trim().toLowerCase();\n if (\n referencedRule === ruleName.toLowerCase() ||\n referencedRule === shortRuleName.toLowerCase()\n ) {\n return normalizedDescription\n .slice(0, trailingRuleReference.index)\n .trim();\n }\n }\n\n return normalizedDescription;\n}\n\nfunction getMessageDescriptionScore(key: string, description: string): number {\n let score = PRIORITIZED_MESSAGE_KEYS.has(key) ? 0 : 10;\n\n if (MESSAGE_PLACEHOLDER_RE.test(description)) score += 20;\n\n if (MESSAGE_UNDEFINED_RE.test(description)) score += 40;\n\n if (isUnsafeGeneratedDescription(description)) score += 100;\n\n if (description.length < 8) score += 5;\n\n return score;\n}\n\nfunction getDescriptionFromMessages(\n ruleName: string,\n messages: Record<string, string> | undefined\n): string | undefined {\n if (!messages) return undefined;\n\n const fallbackDescription = humanizeRuleName(ruleName);\n const candidates = Object.entries(messages)\n .map(([key, value]) => ({ key, value: value.trim() }))\n .filter((candidate) => candidate.value.length > 0)\n .toSorted((a, b) => {\n const scoreDiff =\n getMessageDescriptionScore(a.key, a.value) -\n getMessageDescriptionScore(b.key, b.value);\n if (scoreDiff !== 0) return scoreDiff;\n\n if (a.value.length !== b.value.length)\n return a.value.length - b.value.length;\n\n return a.key.localeCompare(b.key);\n });\n\n for (const candidate of candidates) {\n const description = sanitizeDescription(ruleName, candidate.value);\n if (description !== fallbackDescription) return description;\n }\n\n return undefined;\n}\n\nfunction getRuleDescription(\n ruleName: string,\n meta: RuleMetaLike | undefined,\n messages: Record<string, string> | undefined\n): RuleDescriptionResult {\n const fallbackDescription = humanizeRuleName(ruleName);\n\n if (\n typeof meta?.description === \"string\" &&\n meta.description.trim().length > 0\n ) {\n const description = sanitizeDescription(ruleName, meta.description);\n return {\n text: description,\n missingDescription: false,\n source: \"meta\",\n };\n }\n\n const messageDescription = getDescriptionFromMessages(ruleName, messages);\n if (messageDescription) {\n return {\n text: messageDescription,\n missingDescription: false,\n source: \"message\",\n };\n }\n\n return {\n text: fallbackDescription,\n missingDescription: true,\n source: \"generated\",\n };\n}\n\nfunction normalizeRuleDeprecated(\n deprecated: unknown\n): RuleInfo[\"deprecated\"] | undefined {\n if (typeof deprecated === \"boolean\") return deprecated;\n\n if (isRecord(deprecated)) {\n return deprecated;\n }\n\n return undefined;\n}\n\nfunction normalizeRuleFixable(\n fixable: unknown\n): RuleInfo[\"fixable\"] | undefined {\n if (typeof fixable === \"boolean\" || typeof fixable === \"string\")\n return fixable;\n return undefined;\n}\n\nfunction buildRuleInfo(\n name: string,\n definition: RuleDefinitionLike | undefined,\n recommendedRuleNames: Set<string>,\n configuredRuleNames: Set<string>,\n sourcePlugin?: string,\n sourcePackageName?: string,\n sourceDocsUrl?: string,\n sourceDocsUrlSource?: RuleDocsUrlSource\n): RuleInfo {\n const plugin = getDisplayPluginName(name, sourcePlugin);\n const meta = definition?.meta;\n const messages = normalizeRuleMessages(definition?.messages);\n const metaDocsUrl =\n typeof meta?.url === \"string\" && meta.url.length ? meta.url : undefined;\n const docsUrl = metaDocsUrl ?? sourceDocsUrl;\n const docsUrlSource: RuleDocsUrlSource | undefined = metaDocsUrl\n ? \"meta\"\n : sourceDocsUrlSource;\n const description = getRuleDescription(name, meta, messages);\n const isRecommended =\n recommendedRuleNames.has(name) || meta?.recommended === true;\n\n const info: RuleInfo = {\n name,\n plugin,\n ...(sourcePackageName ? { pluginPackageName: sourcePackageName } : {}),\n docs: {\n description: description.text,\n descriptionSource: description.source,\n ...(description.missingDescription\n ? { descriptionMissing: true }\n : {}),\n ...(isRecommended ? { recommended: true } : {}),\n ...(docsUrl ? { url: docsUrl } : {}),\n ...(docsUrl && docsUrlSource ? { urlSource: docsUrlSource } : {}),\n },\n };\n\n if (messages) info.messages = messages;\n\n const defaultOptions = definition?.primaryOptionArray;\n if (defaultOptions) info.defaultOptions = defaultOptions;\n\n const fixable = normalizeRuleFixable(meta?.fixable);\n if (fixable !== undefined) info.fixable = fixable;\n\n const deprecated = normalizeRuleDeprecated(meta?.deprecated);\n if (deprecated !== undefined) info.deprecated = deprecated;\n\n if (!definition && configuredRuleNames.has(name)) info.invalid = true;\n\n return info;\n}\n\nfunction resolveCoreRuleNames(): string[] {\n const rules = stylelint.rules as Record<string, unknown>;\n return Object.keys(rules);\n}\n\nasync function resolveRecommendedCoreRuleNames(): Promise<Set<string>> {\n if (_recommendedCoreRulesPromise) return await _recommendedCoreRulesPromise;\n\n _recommendedCoreRulesPromise = (async () => {\n try {\n const moduleValue = await import(\"stylelint-config-recommended\");\n const configValue = (moduleValue.default ?? moduleValue) as unknown;\n if (!isRecord(configValue) || !isRecord(configValue[\"rules\"]))\n return new Set<string>();\n\n return new Set(Object.keys(configValue[\"rules\"]));\n } catch {\n return new Set<string>();\n }\n })();\n\n return await _recommendedCoreRulesPromise;\n}\n\nasync function resolveCoreRuleDefinition(\n ruleName: string\n): Promise<RuleDefinitionLike | undefined> {\n const rules = stylelint.rules as Record<string, unknown>;\n const ruleEntry = rules[ruleName];\n if (!ruleEntry) return undefined;\n\n const resolvedRule = await Promise.resolve(ruleEntry).catch(\n () => undefined\n );\n return toRuleDefinition(resolvedRule, ruleName);\n}\n\nasync function importPluginModule(pluginPath: string): Promise<unknown> {\n const specifier = isAbsolute(pluginPath)\n ? pathToFileURL(pluginPath).href\n : pluginPath;\n\n const moduleValue = await import(specifier);\n return moduleValue.default ?? moduleValue;\n}\n\nfunction collectPluginRuleDefinitions(value: unknown): RuleDefinitionLike[] {\n const queue: unknown[] = [];\n const seen = new Set<unknown>();\n\n function enqueue(candidate: unknown) {\n if (candidate === undefined || candidate === null) return;\n if (seen.has(candidate)) return;\n seen.add(candidate);\n queue.push(candidate);\n }\n\n enqueue(value);\n\n const definitions = new Map<string, RuleDefinitionLike>();\n\n while (queue.length > 0) {\n const current = queue.shift();\n if (current === undefined) continue;\n\n if (Array.isArray(current)) {\n current.forEach(enqueue);\n continue;\n }\n\n const definition = toRuleDefinition(current);\n if (definition) definitions.set(definition.ruleName, definition);\n\n if (!isRecord(current)) continue;\n\n if (isRecord(current[\"rules\"]))\n Object.values(current[\"rules\"]).forEach(enqueue);\n\n Object.values(current).forEach((entry) => {\n if (getRuleNameFromUnknown(entry)) enqueue(entry);\n });\n }\n\n return [...definitions.values()];\n}\n\nasync function resolvePluginRuleDefinitions(\n plugins: unknown\n): Promise<Map<string, PluginRuleDefinitionSource>> {\n const definitions = new Map<string, PluginRuleDefinitionSource>();\n\n if (!Array.isArray(plugins)) return definitions;\n\n const loaded = await Promise.all(\n plugins.map(async (pluginEntry, index) => {\n const sourcePlugin = normalizePluginPackageName(\n getPluginName(pluginEntry, index)\n );\n try {\n if (typeof pluginEntry === \"string\") {\n const packageDocsMetadata =\n await readPluginPackageDocsMetadata(pluginEntry);\n return {\n sourcePlugin,\n module: await importPluginModule(pluginEntry),\n packageDocsMetadata,\n };\n }\n\n return {\n sourcePlugin,\n module: pluginEntry,\n packageDocsMetadata: undefined,\n };\n } catch {\n return undefined;\n }\n })\n );\n\n loaded.forEach((pluginLoaded) => {\n if (!pluginLoaded) return;\n\n const { sourcePlugin, module, packageDocsMetadata } = pluginLoaded;\n\n collectPluginRuleDefinitions(module).forEach((definition) => {\n definitions.set(definition.ruleName, {\n definition,\n sourcePlugin,\n ...(packageDocsMetadata?.packageName !== undefined && {\n sourcePackageName: packageDocsMetadata.packageName,\n }),\n ...(packageDocsMetadata?.docsUrl !== undefined && {\n sourceDocsUrl: packageDocsMetadata.docsUrl,\n }),\n ...(packageDocsMetadata?.docsUrlSource !== undefined && {\n sourceDocsUrlSource: packageDocsMetadata.docsUrlSource,\n }),\n });\n });\n });\n\n return definitions;\n}\n\nfunction normalizeConfigItem(\n rawConfig: StylelintConfigLike,\n index: number,\n fallbackName: string\n): FlatConfigItem {\n const {\n files,\n ignoreFiles,\n rules,\n plugins,\n extends: extendsValue,\n customSyntax,\n overrides: _overrides,\n name,\n ...rest\n } = rawConfig;\n\n const sanitizedExtraFields = sanitizeExtraConfigFields(rest);\n\n const config: FlatConfigItem = {\n index,\n name: typeof name === \"string\" && name.length ? name : fallbackName,\n ...sanitizedExtraFields,\n };\n\n const fileGlobs = toStringArray(files);\n if (fileGlobs) config.files = fileGlobs;\n\n const ignoreGlobs = toStringArray(ignoreFiles);\n if (ignoreGlobs) config.ignores = ignoreGlobs;\n\n const normalizedRules = toRulesRecord(rules);\n if (normalizedRules) config.rules = normalizedRules;\n\n const normalizedPlugins = toPluginRecord(plugins);\n if (normalizedPlugins) config.plugins = normalizedPlugins;\n\n const normalizedExtends = toStringArray(extendsValue);\n if (normalizedExtends) config.extends = normalizedExtends;\n\n if (typeof customSyntax === \"string\") config.customSyntax = customSyntax;\n\n return config;\n}\n\nfunction mergeConfigForDisplay(\n resolvedConfig: StylelintConfigLike,\n sourceConfig?: StylelintConfigLike\n): StylelintConfigLike {\n if (!sourceConfig) return resolvedConfig;\n\n return {\n ...resolvedConfig,\n ...sourceConfig,\n rules: resolvedConfig.rules ?? sourceConfig.rules,\n files: sourceConfig.files ?? resolvedConfig.files,\n ignoreFiles: sourceConfig.ignoreFiles ?? resolvedConfig.ignoreFiles,\n plugins: sourceConfig.plugins ?? resolvedConfig.plugins,\n extends: sourceConfig.extends ?? resolvedConfig.extends,\n customSyntax: sourceConfig.customSyntax ?? resolvedConfig.customSyntax,\n name: sourceConfig.name ?? resolvedConfig.name,\n };\n}\n\nfunction extractConfigs(\n resolvedConfig: StylelintConfigLike,\n sourceConfig?: StylelintConfigLike\n): FlatConfigItem[] {\n const { overrides: _resolvedOverrides, ...rootConfig } = resolvedConfig;\n const { overrides: _sourceOverrides, ...sourceRootConfig } =\n sourceConfig ?? {};\n\n const configs: FlatConfigItem[] = [\n normalizeConfigItem(\n mergeConfigForDisplay(\n rootConfig,\n sourceConfig ? sourceRootConfig : undefined\n ),\n 0,\n \"stylelint/root\"\n ),\n ];\n\n const resolvedOverrides = Array.isArray(_resolvedOverrides)\n ? _resolvedOverrides\n : [];\n const overrideSource = Array.isArray(sourceConfig?.overrides)\n ? sourceConfig.overrides\n : resolvedOverrides;\n\n if (Array.isArray(overrideSource)) {\n overrideSource.forEach((override, index) => {\n const sourceOverride = isRecord(override)\n ? (override as StylelintConfigLike)\n : undefined;\n const resolvedOverride = isRecord(resolvedOverrides[index])\n ? (resolvedOverrides[index] as StylelintConfigLike)\n : undefined;\n\n if (!sourceOverride && !resolvedOverride) return;\n\n const fallbackName = `stylelint/override-${index + 1}`;\n\n configs.push(\n normalizeConfigItem(\n mergeConfigForDisplay(\n resolvedOverride ?? sourceOverride ?? {},\n sourceOverride\n ),\n index + 1,\n fallbackName\n )\n );\n });\n }\n\n return configs;\n}\n\nasync function buildRuleCatalog(\n configs: FlatConfigItem[],\n resolvedConfig: StylelintConfigLike\n): Promise<Record<string, RuleInfo>> {\n const configuredRuleNames = new Set(\n configs.flatMap((config) => Object.keys(config.rules ?? {}))\n );\n const pluginRuleDefinitions = await resolvePluginRuleDefinitions(\n resolvedConfig.plugins\n );\n const coreRuleNames = resolveCoreRuleNames();\n const recommendedCoreRuleNames = await resolveRecommendedCoreRuleNames();\n const recommendedPluginRuleNames = Array.from(\n pluginRuleDefinitions.values(),\n (entry) => entry.definition\n )\n .filter((definition) => definition.meta?.recommended === true)\n .map((definition) => definition.ruleName);\n const recommendedRuleNames = new Set<string>([\n ...recommendedCoreRuleNames,\n ...recommendedPluginRuleNames,\n ]);\n\n const ruleNames = [\n ...new Set([\n ...configuredRuleNames,\n ...coreRuleNames,\n ...pluginRuleDefinitions.keys(),\n ]),\n ];\n const coreRuleDefinitions = new Map<string, RuleDefinitionLike>();\n\n await Promise.all(\n ruleNames\n .filter((ruleName) => getRulePlugin(ruleName) === \"stylelint\")\n .map(async (ruleName) => {\n const definition = await resolveCoreRuleDefinition(ruleName);\n if (definition) coreRuleDefinitions.set(ruleName, definition);\n })\n );\n\n const ruleInfoEntries = ruleNames.map((ruleName) => {\n const pluginDefinition = pluginRuleDefinitions.get(ruleName);\n const definition =\n getRulePlugin(ruleName) === \"stylelint\"\n ? coreRuleDefinitions.get(ruleName)\n : pluginDefinition?.definition;\n\n return [\n ruleName,\n buildRuleInfo(\n ruleName,\n definition,\n recommendedRuleNames,\n configuredRuleNames,\n pluginDefinition?.sourcePlugin,\n pluginDefinition?.sourcePackageName,\n pluginDefinition?.sourceDocsUrl,\n pluginDefinition?.sourceDocsUrlSource\n ),\n ] as const;\n });\n\n return Object.fromEntries(ruleInfoEntries);\n}\n\nfunction normalizeWorkspaceFilepath(path: string): string {\n return normalize(path).replaceAll(\"\\\\\", \"/\");\n}\n\nfunction toWorkspaceScanGlobs(configs: FlatConfigItem[]): string[] {\n const fileGlobs = configs.flatMap((config) => config.files ?? []);\n const positiveGlobs = fileGlobs.filter(\n (glob) => typeof glob === \"string\" && !glob.startsWith(\"!\")\n );\n return [...new Set(positiveGlobs)];\n}\n\nasync function resolveMatchedFiles(\n configs: FlatConfigItem[],\n basePath: string\n): Promise<{ files: MatchedFile[]; diagnostics: string[] }> {\n const diagnostics: string[] = [];\n const configuredGlobs = toWorkspaceScanGlobs(configs);\n const hasGeneralConfig = configs.some(\n (config) => isGeneralConfig(config) && !isIgnoreOnlyConfig(config)\n );\n const scanGlobs = configuredGlobs.length\n ? [\n ...new Set(\n hasGeneralConfig\n ? [...configuredGlobs, ...DEFAULT_WORKSPACE_SCAN_GLOBS]\n : configuredGlobs\n ),\n ]\n : DEFAULT_WORKSPACE_SCAN_GLOBS;\n\n if (!configuredGlobs.length) {\n diagnostics.push(\n \"No explicit `files` globs found in resolved config items; scanned common style-related extensions for workspace matching.\"\n );\n } else if (hasGeneralConfig) {\n diagnostics.push(\n \"General config items were detected; included common style-related extensions in workspace scan alongside configured `files` globs.\"\n );\n }\n\n const discoveredFiles = await glob(scanGlobs, {\n cwd: basePath,\n onlyFiles: true,\n dot: true,\n ignore: DEFAULT_WORKSPACE_SCAN_IGNORES,\n });\n\n if (discoveredFiles.length > MAX_WORKSPACE_MATCHED_FILES) {\n diagnostics.push(\n `Workspace matching was truncated to the first ${MAX_WORKSPACE_MATCHED_FILES} files (found ${discoveredFiles.length}).`\n );\n }\n\n const generalConfigIndexes = configs\n .filter(\n (config) => isGeneralConfig(config) && !isIgnoreOnlyConfig(config)\n )\n .map((config) => config.index);\n\n const files = discoveredFiles\n .slice(0, MAX_WORKSPACE_MATCHED_FILES)\n .map(normalizeWorkspaceFilepath)\n .map((filepath) => {\n const matched = matchFile(filepath, configs, basePath);\n if (\n matched.configs.length === 0 &&\n matched.globs.length === 0 &&\n generalConfigIndexes.length\n ) {\n matched.configs.push(...generalConfigIndexes);\n }\n return matched;\n })\n .filter((result) => result.configs.length > 0)\n .toSorted((a, b) => a.filepath.localeCompare(b.filepath));\n\n return {\n files,\n diagnostics,\n };\n}\n\nfunction getRelativeFilepath(basePath: string, filePath: string): string {\n const result = relative(basePath, filePath).replaceAll(\"\\\\\", \"/\");\n return result.length ? result : filePath;\n}\n\nasync function exists(path: string): Promise<boolean> {\n return await stat(path)\n .then(() => true)\n .catch(() => false);\n}\n\nasync function loadConfigFromPath(\n configPath: string,\n basePath: string\n): Promise<{ config: StylelintConfig; dependencies: string[] }> {\n if (basename(configPath) === \"package.json\") {\n const pkg = await readFile(configPath, \"utf-8\");\n const parsed = JSON.parse(pkg) as unknown;\n\n if (!isRecord(parsed) || !isRecord(parsed[\"stylelint\"])) {\n throw new Error(`No \"stylelint\" field found in ${configPath}`);\n }\n\n return {\n config: parsed[\"stylelint\"] as StylelintConfig,\n dependencies: [configPath],\n };\n }\n\n const { mod, dependencies } = await bundleRequire({\n filepath: configPath,\n cwd: basePath,\n notExternal: [STYLELINT_CONFIG_PACKAGE_IMPORT_RE],\n tsconfig: false,\n });\n\n const configValue = (mod.default ?? mod) as unknown;\n if (!isRecord(configValue)) {\n throw new Error(`Expected Stylelint config object from ${configPath}`);\n }\n\n return {\n config: configValue as StylelintConfig,\n dependencies,\n };\n}\n\nasync function findDiscoveredConfigPath(\n cwd: string\n): Promise<string | undefined> {\n const configFilePath = await findUp(stylelintConfigFilenames, { cwd });\n if (configFilePath) return normalize(configFilePath);\n\n const legacyFilePath = await findUp(stylelintLegacyConfigFilenames, {\n cwd,\n });\n if (legacyFilePath) return normalize(legacyFilePath);\n\n const packageJsonPath = await findUp(\"package.json\", { cwd });\n if (!packageJsonPath) return undefined;\n\n const packageJsonContent = await readFile(packageJsonPath, \"utf-8\").catch(\n () => undefined\n );\n if (!packageJsonContent) return undefined;\n\n let packageJson: unknown;\n try {\n packageJson = JSON.parse(packageJsonContent) as unknown;\n } catch {\n return undefined;\n }\n\n if (isRecord(packageJson) && isRecord(packageJson[\"stylelint\"]))\n return normalize(packageJsonPath);\n\n return undefined;\n}\n\nclass StylelintInspectorAdapter implements InspectorAdapter {\n readonly engine = \"stylelint\" as const;\n\n async resolveConfigPath(\n options: ResolveConfigPathOptions\n ): Promise<ResolvedConfigPath> {\n const { cwd, userConfigPath, userBasePath } = options;\n\n const resolvedUserBasePath = userBasePath\n ? normalize(resolve(cwd, userBasePath))\n : undefined;\n const lookupBasePath = resolvedUserBasePath ?? cwd;\n\n let configPath: string | undefined;\n if (userConfigPath) {\n const candidate = normalize(resolve(cwd, userConfigPath));\n\n if (!(await exists(candidate))) {\n throw new ConfigPathError(\n `${relative(cwd, dirname(candidate))}/`,\n stylelintConfigFilenames\n );\n }\n\n configPath = candidate;\n } else {\n configPath = await findDiscoveredConfigPath(lookupBasePath);\n }\n\n const basePath = normalize(\n resolvedUserBasePath ??\n (userConfigPath\n ? cwd\n : configPath\n ? dirname(configPath)\n : lookupBasePath)\n );\n\n return {\n basePath,\n ...(configPath !== undefined && { configPath }),\n };\n }\n\n async readConfig(options: ReadConfigOptions): Promise<InspectorReadResult> {\n const {\n chdir = true,\n globMatchedFiles: shouldGlobMatchedFiles = true,\n } = options;\n\n const { basePath, configPath } = await this.resolveConfigPath(options);\n const configPathRelative = configPath\n ? getRelativeFilepath(options.cwd, configPath)\n : \"\";\n\n if (chdir && basePath !== process.cwd()) process.chdir(basePath);\n\n const targetFilePath = normalize(\n resolve(basePath, options.targetFilePath ?? DEFAULT_TARGET_FILE)\n );\n const targetFilepathRelative = getRelativeFilepath(\n basePath,\n targetFilePath\n );\n\n console.log(\n MARK_INFO,\n `Resolving Stylelint config for`,\n c.blue(targetFilepathRelative)\n );\n\n const dependencies = new Set<string>();\n const diagnostics: string[] = [];\n let config: StylelintConfig | undefined;\n\n if (configPath) {\n try {\n const loaded = await loadConfigFromPath(configPath, basePath);\n config = loaded.config;\n loaded.dependencies.forEach((dependency) =>\n addDependency(dependencies, dependency, basePath)\n );\n } catch (error) {\n if (options.userConfigPath) throw error;\n\n addDependency(dependencies, configPath, basePath);\n diagnostics.push(\n \"Could not parse discovered config directly; using resolved output only for config item extraction.\"\n );\n }\n }\n\n const resolveOptions: ResolveConfigOptionsSubset = {\n cwd: basePath,\n };\n\n if (config) {\n resolveOptions.config = config;\n resolveOptions.configBasedir = configPath\n ? dirname(configPath)\n : basePath;\n }\n if (options.customSyntax)\n resolveOptions.customSyntax = options.customSyntax;\n\n let resolved: StylelintConfig | undefined;\n try {\n resolved = await stylelint.resolveConfig(\n targetFilePath,\n resolveOptions\n );\n } catch (error) {\n if (!isNoConfigError(error)) throw error;\n }\n\n if (options.userBasePath) {\n diagnostics.push(\n `Base path overridden to ${getRelativeFilepath(options.cwd, basePath)}.`\n );\n }\n\n if (!resolved) {\n const payload: Payload = {\n configs: [],\n rules: {},\n diagnostics,\n meta: {\n engine: this.engine,\n lastUpdate: Date.now(),\n basePath,\n configPath: configPathRelative,\n targetFilePath: targetFilepathRelative,\n configNotFound: true,\n },\n };\n\n return {\n configs: [],\n payload,\n dependencies: [...dependencies],\n };\n }\n\n const configs = extractConfigs(\n resolved as StylelintConfigLike,\n config as StylelintConfigLike | undefined\n );\n const configBasePath = configPath ? dirname(configPath) : basePath;\n const extendsDependencies = await collectExtendsDependencies(\n configs,\n basePath,\n configBasePath\n );\n extendsDependencies.forEach((dependency) =>\n addDependency(dependencies, dependency, basePath)\n );\n const [\n rules,\n stylelintIgnore,\n extendsInfo,\n ] = await Promise.all([\n buildRuleCatalog(configs, resolved as StylelintConfigLike),\n readStylelintIgnoreInfo(basePath),\n buildExtendsInfo(configs, basePath, configBasePath),\n ]);\n\n let files: MatchedFile[] | undefined;\n if (shouldGlobMatchedFiles) {\n const resolvedFiles = await resolveMatchedFiles(configs, basePath);\n files = resolvedFiles.files;\n diagnostics.push(...resolvedFiles.diagnostics);\n }\n\n console.log(\n MARK_CHECK,\n \"Loaded with\",\n configs.length,\n \"config items and\",\n Object.keys(rules).length,\n \"rules\"\n );\n\n const payload: Payload = {\n configs,\n rules,\n diagnostics,\n ...(files !== undefined && { files }),\n extendsInfo,\n meta: {\n engine: this.engine,\n lastUpdate: Date.now(),\n basePath,\n configPath: configPathRelative,\n targetFilePath: targetFilepathRelative,\n ...(stylelintIgnore ? { stylelintIgnore } : {}),\n },\n };\n\n return {\n configs,\n payload,\n dependencies: [...dependencies],\n };\n }\n}\n\nexport function createStylelintInspectorAdapter(): InspectorAdapter {\n return new StylelintInspectorAdapter();\n}\n","import type {\n InspectorReadResult,\n ReadConfigOptions,\n ResolveConfigPathOptions,\n ResolvedConfigPath,\n} from \"./inspectors/contracts\";\nimport { createStylelintInspectorAdapter } from \"./inspectors/stylelint\";\n\nconst adapter = createStylelintInspectorAdapter();\n\nexport type { ReadConfigOptions, ResolveConfigPathOptions };\n\n/**\n * Alias for inspector config read results.\n */\nexport type InspectorConfig = InspectorReadResult;\n\n/**\n * Search and resolve the Stylelint config location metadata.\n */\nexport function resolveConfigPath(\n options: ResolveConfigPathOptions\n): Promise<ResolvedConfigPath> {\n return adapter.resolveConfigPath(options);\n}\n\n/**\n * Read and normalize the Stylelint config into inspector payload.\n */\nexport function readConfig(\n options: ReadConfigOptions\n): Promise<InspectorReadResult> {\n return adapter.readConfig(options);\n}\n","import { existsSync } from \"node:fs\";\nimport { fileURLToPath } from \"node:url\";\nimport { dirname, join } from \"pathe\";\n\nconst moduleDir = dirname(fileURLToPath(import.meta.url));\n\nconst distDirCandidates = [\n join(moduleDir, \"../dist/public\"),\n join(moduleDir, \"./public\"),\n] as const;\n\nexport const dataDir: string = fileURLToPath(\n new URL(\"../.stylelint-config-inspector\", import.meta.url)\n);\nexport const distDir: string =\n distDirCandidates.find((path) => existsSync(path)) ?? distDirCandidates[0];\n","const mimes = {\n \"3g2\": \"video/3gpp2\",\n \"3gp\": \"video/3gpp\",\n \"3gpp\": \"video/3gpp\",\n \"3mf\": \"model/3mf\",\n \"aac\": \"audio/aac\",\n \"ac\": \"application/pkix-attr-cert\",\n \"adp\": \"audio/adpcm\",\n \"adts\": \"audio/aac\",\n \"ai\": \"application/postscript\",\n \"aml\": \"application/automationml-aml+xml\",\n \"amlx\": \"application/automationml-amlx+zip\",\n \"amr\": \"audio/amr\",\n \"apng\": \"image/apng\",\n \"appcache\": \"text/cache-manifest\",\n \"appinstaller\": \"application/appinstaller\",\n \"appx\": \"application/appx\",\n \"appxbundle\": \"application/appxbundle\",\n \"asc\": \"application/pgp-keys\",\n \"atom\": \"application/atom+xml\",\n \"atomcat\": \"application/atomcat+xml\",\n \"atomdeleted\": \"application/atomdeleted+xml\",\n \"atomsvc\": \"application/atomsvc+xml\",\n \"au\": \"audio/basic\",\n \"avci\": \"image/avci\",\n \"avcs\": \"image/avcs\",\n \"avif\": \"image/avif\",\n \"aw\": \"application/applixware\",\n \"bdoc\": \"application/bdoc\",\n \"bin\": \"application/octet-stream\",\n \"bmp\": \"image/bmp\",\n \"bpk\": \"application/octet-stream\",\n \"btf\": \"image/prs.btif\",\n \"btif\": \"image/prs.btif\",\n \"buffer\": \"application/octet-stream\",\n \"ccxml\": \"application/ccxml+xml\",\n \"cdfx\": \"application/cdfx+xml\",\n \"cdmia\": \"application/cdmi-capability\",\n \"cdmic\": \"application/cdmi-container\",\n \"cdmid\": \"application/cdmi-domain\",\n \"cdmio\": \"application/cdmi-object\",\n \"cdmiq\": \"application/cdmi-queue\",\n \"cer\": \"application/pkix-cert\",\n \"cgm\": \"image/cgm\",\n \"cjs\": \"application/node\",\n \"class\": \"application/java-vm\",\n \"coffee\": \"text/coffeescript\",\n \"conf\": \"text/plain\",\n \"cpl\": \"application/cpl+xml\",\n \"cpt\": \"application/mac-compactpro\",\n \"crl\": \"application/pkix-crl\",\n \"css\": \"text/css\",\n \"csv\": \"text/csv\",\n \"cu\": \"application/cu-seeme\",\n \"cwl\": \"application/cwl\",\n \"cww\": \"application/prs.cww\",\n \"davmount\": \"application/davmount+xml\",\n \"dbk\": \"application/docbook+xml\",\n \"deb\": \"application/octet-stream\",\n \"def\": \"text/plain\",\n \"deploy\": \"application/octet-stream\",\n \"dib\": \"image/bmp\",\n \"disposition-notification\": \"message/disposition-notification\",\n \"dist\": \"application/octet-stream\",\n \"distz\": \"application/octet-stream\",\n \"dll\": \"application/octet-stream\",\n \"dmg\": \"application/octet-stream\",\n \"dms\": \"application/octet-stream\",\n \"doc\": \"application/msword\",\n \"dot\": \"application/msword\",\n \"dpx\": \"image/dpx\",\n \"drle\": \"image/dicom-rle\",\n \"dsc\": \"text/prs.lines.tag\",\n \"dssc\": \"application/dssc+der\",\n \"dtd\": \"application/xml-dtd\",\n \"dump\": \"application/octet-stream\",\n \"dwd\": \"application/atsc-dwd+xml\",\n \"ear\": \"application/java-archive\",\n \"ecma\": \"application/ecmascript\",\n \"elc\": \"application/octet-stream\",\n \"emf\": \"image/emf\",\n \"eml\": \"message/rfc822\",\n \"emma\": \"application/emma+xml\",\n \"emotionml\": \"application/emotionml+xml\",\n \"eps\": \"application/postscript\",\n \"epub\": \"application/epub+zip\",\n \"exe\": \"application/octet-stream\",\n \"exi\": \"application/exi\",\n \"exp\": \"application/express\",\n \"exr\": \"image/aces\",\n \"ez\": \"application/andrew-inset\",\n \"fdf\": \"application/fdf\",\n \"fdt\": \"application/fdt+xml\",\n \"fits\": \"image/fits\",\n \"g3\": \"image/g3fax\",\n \"gbr\": \"application/rpki-ghostbusters\",\n \"geojson\": \"application/geo+json\",\n \"gif\": \"image/gif\",\n \"glb\": \"model/gltf-binary\",\n \"gltf\": \"model/gltf+json\",\n \"gml\": \"application/gml+xml\",\n \"gpx\": \"application/gpx+xml\",\n \"gram\": \"application/srgs\",\n \"grxml\": \"application/srgs+xml\",\n \"gxf\": \"application/gxf\",\n \"gz\": \"application/gzip\",\n \"h261\": \"video/h261\",\n \"h263\": \"video/h263\",\n \"h264\": \"video/h264\",\n \"heic\": \"image/heic\",\n \"heics\": \"image/heic-sequence\",\n \"heif\": \"image/heif\",\n \"heifs\": \"image/heif-sequence\",\n \"hej2\": \"image/hej2k\",\n \"held\": \"application/atsc-held+xml\",\n \"hjson\": \"application/hjson\",\n \"hlp\": \"application/winhlp\",\n \"hqx\": \"application/mac-binhex40\",\n \"hsj2\": \"image/hsj2\",\n \"htm\": \"text/html\",\n \"html\": \"text/html\",\n \"ics\": \"text/calendar\",\n \"ief\": \"image/ief\",\n \"ifb\": \"text/calendar\",\n \"iges\": \"model/iges\",\n \"igs\": \"model/iges\",\n \"img\": \"application/octet-stream\",\n \"in\": \"text/plain\",\n \"ini\": \"text/plain\",\n \"ink\": \"application/inkml+xml\",\n \"inkml\": \"application/inkml+xml\",\n \"ipfix\": \"application/ipfix\",\n \"iso\": \"application/octet-stream\",\n \"its\": \"application/its+xml\",\n \"jade\": \"text/jade\",\n \"jar\": \"application/java-archive\",\n \"jhc\": \"image/jphc\",\n \"jls\": \"image/jls\",\n \"jp2\": \"image/jp2\",\n \"jpe\": \"image/jpeg\",\n \"jpeg\": \"image/jpeg\",\n \"jpf\": \"image/jpx\",\n \"jpg\": \"image/jpeg\",\n \"jpg2\": \"image/jp2\",\n \"jpgm\": \"image/jpm\",\n \"jpgv\": \"video/jpeg\",\n \"jph\": \"image/jph\",\n \"jpm\": \"image/jpm\",\n \"jpx\": \"image/jpx\",\n \"js\": \"text/javascript\",\n \"json\": \"application/json\",\n \"json5\": \"application/json5\",\n \"jsonld\": \"application/ld+json\",\n \"jsonml\": \"application/jsonml+json\",\n \"jsx\": \"text/jsx\",\n \"jt\": \"model/jt\",\n \"jxl\": \"image/jxl\",\n \"jxr\": \"image/jxr\",\n \"jxra\": \"image/jxra\",\n \"jxrs\": \"image/jxrs\",\n \"jxs\": \"image/jxs\",\n \"jxsc\": \"image/jxsc\",\n \"jxsi\": \"image/jxsi\",\n \"jxss\": \"image/jxss\",\n \"kar\": \"audio/midi\",\n \"ktx\": \"image/ktx\",\n \"ktx2\": \"image/ktx2\",\n \"less\": \"text/less\",\n \"lgr\": \"application/lgr+xml\",\n \"list\": \"text/plain\",\n \"litcoffee\": \"text/coffeescript\",\n \"log\": \"text/plain\",\n \"lostxml\": \"application/lost+xml\",\n \"lrf\": \"application/octet-stream\",\n \"m1v\": \"video/mpeg\",\n \"m21\": \"application/mp21\",\n \"m2a\": \"audio/mpeg\",\n \"m2t\": \"video/mp2t\",\n \"m2ts\": \"video/mp2t\",\n \"m2v\": \"video/mpeg\",\n \"m3a\": \"audio/mpeg\",\n \"m4a\": \"audio/mp4\",\n \"m4p\": \"application/mp4\",\n \"m4s\": \"video/iso.segment\",\n \"ma\": \"application/mathematica\",\n \"mads\": \"application/mads+xml\",\n \"maei\": \"application/mmt-aei+xml\",\n \"man\": \"text/troff\",\n \"manifest\": \"text/cache-manifest\",\n \"map\": \"application/json\",\n \"mar\": \"application/octet-stream\",\n \"markdown\": \"text/markdown\",\n \"mathml\": \"application/mathml+xml\",\n \"mb\": \"application/mathematica\",\n \"mbox\": \"application/mbox\",\n \"md\": \"text/markdown\",\n \"mdx\": \"text/mdx\",\n \"me\": \"text/troff\",\n \"mesh\": \"model/mesh\",\n \"meta4\": \"application/metalink4+xml\",\n \"metalink\": \"application/metalink+xml\",\n \"mets\": \"application/mets+xml\",\n \"mft\": \"application/rpki-manifest\",\n \"mid\": \"audio/midi\",\n \"midi\": \"audio/midi\",\n \"mime\": \"message/rfc822\",\n \"mj2\": \"video/mj2\",\n \"mjp2\": \"video/mj2\",\n \"mjs\": \"text/javascript\",\n \"mml\": \"text/mathml\",\n \"mods\": \"application/mods+xml\",\n \"mov\": \"video/quicktime\",\n \"mp2\": \"audio/mpeg\",\n \"mp21\": \"application/mp21\",\n \"mp2a\": \"audio/mpeg\",\n \"mp3\": \"audio/mpeg\",\n \"mp4\": \"video/mp4\",\n \"mp4a\": \"audio/mp4\",\n \"mp4s\": \"application/mp4\",\n \"mp4v\": \"video/mp4\",\n \"mpd\": \"application/dash+xml\",\n \"mpe\": \"video/mpeg\",\n \"mpeg\": \"video/mpeg\",\n \"mpf\": \"application/media-policy-dataset+xml\",\n \"mpg\": \"video/mpeg\",\n \"mpg4\": \"video/mp4\",\n \"mpga\": \"audio/mpeg\",\n \"mpp\": \"application/dash-patch+xml\",\n \"mrc\": \"application/marc\",\n \"mrcx\": \"application/marcxml+xml\",\n \"ms\": \"text/troff\",\n \"mscml\": \"application/mediaservercontrol+xml\",\n \"msh\": \"model/mesh\",\n \"msi\": \"application/octet-stream\",\n \"msix\": \"application/msix\",\n \"msixbundle\": \"application/msixbundle\",\n \"msm\": \"application/octet-stream\",\n \"msp\": \"application/octet-stream\",\n \"mtl\": \"model/mtl\",\n \"mts\": \"video/mp2t\",\n \"musd\": \"application/mmt-usd+xml\",\n \"mxf\": \"application/mxf\",\n \"mxmf\": \"audio/mobile-xmf\",\n \"mxml\": \"application/xv+xml\",\n \"n3\": \"text/n3\",\n \"nb\": \"application/mathematica\",\n \"nq\": \"application/n-quads\",\n \"nt\": \"application/n-triples\",\n \"obj\": \"model/obj\",\n \"oda\": \"application/oda\",\n \"oga\": \"audio/ogg\",\n \"ogg\": \"audio/ogg\",\n \"ogv\": \"video/ogg\",\n \"ogx\": \"application/ogg\",\n \"omdoc\": \"application/omdoc+xml\",\n \"onepkg\": \"application/onenote\",\n \"onetmp\": \"application/onenote\",\n \"onetoc\": \"application/onenote\",\n \"onetoc2\": \"application/onenote\",\n \"opf\": \"application/oebps-package+xml\",\n \"opus\": \"audio/ogg\",\n \"otf\": \"font/otf\",\n \"owl\": \"application/rdf+xml\",\n \"oxps\": \"application/oxps\",\n \"p10\": \"application/pkcs10\",\n \"p7c\": \"application/pkcs7-mime\",\n \"p7m\": \"application/pkcs7-mime\",\n \"p7s\": \"application/pkcs7-signature\",\n \"p8\": \"application/pkcs8\",\n \"pdf\": \"application/pdf\",\n \"pfr\": \"application/font-tdpfr\",\n \"pgp\": \"application/pgp-encrypted\",\n \"pkg\": \"application/octet-stream\",\n \"pki\": \"application/pkixcmp\",\n \"pkipath\": \"application/pkix-pkipath\",\n \"pls\": \"application/pls+xml\",\n \"png\": \"image/png\",\n \"prc\": \"model/prc\",\n \"prf\": \"application/pics-rules\",\n \"provx\": \"application/provenance+xml\",\n \"ps\": \"application/postscript\",\n \"pskcxml\": \"application/pskc+xml\",\n \"pti\": \"image/prs.pti\",\n \"qt\": \"video/quicktime\",\n \"raml\": \"application/raml+yaml\",\n \"rapd\": \"application/route-apd+xml\",\n \"rdf\": \"application/rdf+xml\",\n \"relo\": \"application/p2p-overlay+xml\",\n \"rif\": \"application/reginfo+xml\",\n \"rl\": \"application/resource-lists+xml\",\n \"rld\": \"application/resource-lists-diff+xml\",\n \"rmi\": \"audio/midi\",\n \"rnc\": \"application/relax-ng-compact-syntax\",\n \"rng\": \"application/xml\",\n \"roa\": \"application/rpki-roa\",\n \"roff\": \"text/troff\",\n \"rq\": \"application/sparql-query\",\n \"rs\": \"application/rls-services+xml\",\n \"rsat\": \"application/atsc-rsat+xml\",\n \"rsd\": \"application/rsd+xml\",\n \"rsheet\": \"application/urc-ressheet+xml\",\n \"rss\": \"application/rss+xml\",\n \"rtf\": \"text/rtf\",\n \"rtx\": \"text/richtext\",\n \"rusd\": \"application/route-usd+xml\",\n \"s3m\": \"audio/s3m\",\n \"sbml\": \"application/sbml+xml\",\n \"scq\": \"application/scvp-cv-request\",\n \"scs\": \"application/scvp-cv-response\",\n \"sdp\": \"application/sdp\",\n \"senmlx\": \"application/senml+xml\",\n \"sensmlx\": \"application/sensml+xml\",\n \"ser\": \"application/java-serialized-object\",\n \"setpay\": \"application/set-payment-initiation\",\n \"setreg\": \"application/set-registration-initiation\",\n \"sgi\": \"image/sgi\",\n \"sgm\": \"text/sgml\",\n \"sgml\": \"text/sgml\",\n \"shex\": \"text/shex\",\n \"shf\": \"application/shf+xml\",\n \"shtml\": \"text/html\",\n \"sieve\": \"application/sieve\",\n \"sig\": \"application/pgp-signature\",\n \"sil\": \"audio/silk\",\n \"silo\": \"model/mesh\",\n \"siv\": \"application/sieve\",\n \"slim\": \"text/slim\",\n \"slm\": \"text/slim\",\n \"sls\": \"application/route-s-tsid+xml\",\n \"smi\": \"application/smil+xml\",\n \"smil\": \"application/smil+xml\",\n \"snd\": \"audio/basic\",\n \"so\": \"application/octet-stream\",\n \"spdx\": \"text/spdx\",\n \"spp\": \"application/scvp-vp-response\",\n \"spq\": \"application/scvp-vp-request\",\n \"spx\": \"audio/ogg\",\n \"sql\": \"application/sql\",\n \"sru\": \"application/sru+xml\",\n \"srx\": \"application/sparql-results+xml\",\n \"ssdl\": \"application/ssdl+xml\",\n \"ssml\": \"application/ssml+xml\",\n \"stk\": \"application/hyperstudio\",\n \"stl\": \"model/stl\",\n \"stpx\": \"model/step+xml\",\n \"stpxz\": \"model/step-xml+zip\",\n \"stpz\": \"model/step+zip\",\n \"styl\": \"text/stylus\",\n \"stylus\": \"text/stylus\",\n \"svg\": \"image/svg+xml\",\n \"svgz\": \"image/svg+xml\",\n \"swidtag\": \"application/swid+xml\",\n \"t\": \"text/troff\",\n \"t38\": \"image/t38\",\n \"td\": \"application/urc-targetdesc+xml\",\n \"tei\": \"application/tei+xml\",\n \"teicorpus\": \"application/tei+xml\",\n \"text\": \"text/plain\",\n \"tfi\": \"application/thraud+xml\",\n \"tfx\": \"image/tiff-fx\",\n \"tif\": \"image/tiff\",\n \"tiff\": \"image/tiff\",\n \"toml\": \"application/toml\",\n \"tr\": \"text/troff\",\n \"trig\": \"application/trig\",\n \"ts\": \"video/mp2t\",\n \"tsd\": \"application/timestamped-data\",\n \"tsv\": \"text/tab-separated-values\",\n \"ttc\": \"font/collection\",\n \"ttf\": \"font/ttf\",\n \"ttl\": \"text/turtle\",\n \"ttml\": \"application/ttml+xml\",\n \"txt\": \"text/plain\",\n \"u3d\": \"model/u3d\",\n \"u8dsn\": \"message/global-delivery-status\",\n \"u8hdr\": \"message/global-headers\",\n \"u8mdn\": \"message/global-disposition-notification\",\n \"u8msg\": \"message/global\",\n \"ubj\": \"application/ubjson\",\n \"uri\": \"text/uri-list\",\n \"uris\": \"text/uri-list\",\n \"urls\": \"text/uri-list\",\n \"vcard\": \"text/vcard\",\n \"vrml\": \"model/vrml\",\n \"vtt\": \"text/vtt\",\n \"vxml\": \"application/voicexml+xml\",\n \"war\": \"application/java-archive\",\n \"wasm\": \"application/wasm\",\n \"wav\": \"audio/wav\",\n \"weba\": \"audio/webm\",\n \"webm\": \"video/webm\",\n \"webmanifest\": \"application/manifest+json\",\n \"webp\": \"image/webp\",\n \"wgsl\": \"text/wgsl\",\n \"wgt\": \"application/widget\",\n \"wif\": \"application/watcherinfo+xml\",\n \"wmf\": \"image/wmf\",\n \"woff\": \"font/woff\",\n \"woff2\": \"font/woff2\",\n \"wrl\": \"model/vrml\",\n \"wsdl\": \"application/wsdl+xml\",\n \"wspolicy\": \"application/wspolicy+xml\",\n \"x3d\": \"model/x3d+xml\",\n \"x3db\": \"model/x3d+fastinfoset\",\n \"x3dbz\": \"model/x3d+binary\",\n \"x3dv\": \"model/x3d-vrml\",\n \"x3dvz\": \"model/x3d+vrml\",\n \"x3dz\": \"model/x3d+xml\",\n \"xaml\": \"application/xaml+xml\",\n \"xav\": \"application/xcap-att+xml\",\n \"xca\": \"application/xcap-caps+xml\",\n \"xcs\": \"application/calendar+xml\",\n \"xdf\": \"application/xcap-diff+xml\",\n \"xdssc\": \"application/dssc+xml\",\n \"xel\": \"application/xcap-el+xml\",\n \"xenc\": \"application/xenc+xml\",\n \"xer\": \"application/patch-ops-error+xml\",\n \"xfdf\": \"application/xfdf\",\n \"xht\": \"application/xhtml+xml\",\n \"xhtml\": \"application/xhtml+xml\",\n \"xhvml\": \"application/xv+xml\",\n \"xlf\": \"application/xliff+xml\",\n \"xm\": \"audio/xm\",\n \"xml\": \"text/xml\",\n \"xns\": \"application/xcap-ns+xml\",\n \"xop\": \"application/xop+xml\",\n \"xpl\": \"application/xproc+xml\",\n \"xsd\": \"application/xml\",\n \"xsf\": \"application/prs.xsf+xml\",\n \"xsl\": \"application/xml\",\n \"xslt\": \"application/xml\",\n \"xspf\": \"application/xspf+xml\",\n \"xvm\": \"application/xv+xml\",\n \"xvml\": \"application/xv+xml\",\n \"yaml\": \"text/yaml\",\n \"yang\": \"application/yang\",\n \"yin\": \"application/yin+xml\",\n \"yml\": \"text/yaml\",\n \"zip\": \"application/zip\"\n};\n\nfunction lookup(extn) {\n\tlet tmp = ('' + extn).trim().toLowerCase();\n\tlet idx = tmp.lastIndexOf('.');\n\treturn mimes[!~idx ? tmp : tmp.substring(++idx)];\n}\n\nexport { mimes, lookup };\n","import type { FSWatcher } from \"chokidar\";\nimport type { WebSocket, WebSocketServer as WebSocketServerType } from \"ws\";\nimport type { Payload } from \"~~/shared/types\";\nimport type { ReadConfigOptions } from \"./configs\";\nimport process from \"node:process\";\nimport chokidar from \"chokidar\";\nimport { getPort } from \"get-port-please\";\nimport { normalize, relative } from \"pathe\";\nimport { WebSocketServer } from \"ws\";\nimport { readConfig, resolveConfigPath } from \"./configs\";\nimport { MARK_CHECK } from \"./constants\";\nimport { ConfigInspectorError } from \"./errors\";\n\nconst readErrorWarning = `Failed to load Stylelint configuration.\nPlease ensure a valid Stylelint config can be resolved:\nhttps://stylelint.io/user-guide/configure`;\n\nexport interface CreateWsServerOptions extends ReadConfigOptions {}\n\nexport interface WsServerHandle {\n port: number;\n wss: WebSocketServerType;\n watcher: FSWatcher;\n getData: () => Promise<Payload | undefined>;\n}\n\nexport async function createWsServer(\n options: CreateWsServerOptions\n): Promise<WsServerHandle> {\n let payload: Payload | undefined;\n const port = await getPort({ port: 7811, random: true });\n const wss = new WebSocketServer({\n port,\n });\n const wsClients = new Set<WebSocket>();\n\n wss.on(\"connection\", (ws) => {\n wsClients.add(ws);\n console.log(MARK_CHECK, \"Websocket client connected\");\n ws.on(\"close\", () => wsClients.delete(ws));\n });\n\n let resolvedConfigPath: Awaited<ReturnType<typeof resolveConfigPath>>;\n try {\n resolvedConfigPath = await resolveConfigPath(options);\n } catch (e) {\n if (e instanceof ConfigInspectorError) {\n e.prettyPrint();\n process.exit(1);\n } else {\n throw e;\n }\n }\n\n const { basePath } = resolvedConfigPath;\n\n function toRelativePath(path: string): string {\n const result = relative(options.cwd, path).replaceAll(\"\\\\\", \"/\");\n return result.length ? result : normalize(path).replaceAll(\"\\\\\", \"/\");\n }\n\n function createErrorPayload(error: unknown): Payload {\n const diagnostic =\n error instanceof Error ? error.message : String(error);\n\n return {\n configs: [],\n rules: {},\n diagnostics: [readErrorWarning, diagnostic],\n meta: {\n wsPort: port,\n engine: \"stylelint\",\n ...(options.targetFilePath !== undefined && {\n targetFilePath: options.targetFilePath,\n }),\n lastUpdate: Date.now(),\n basePath,\n configPath: resolvedConfigPath.configPath\n ? toRelativePath(resolvedConfigPath.configPath)\n : \"\",\n },\n };\n }\n\n const watcher = chokidar.watch([], {\n ignoreInitial: true,\n cwd: basePath,\n });\n if (resolvedConfigPath.configPath)\n watcher.add(resolvedConfigPath.configPath);\n\n watcher.on(\"change\", (path) => {\n payload = undefined;\n console.log();\n console.log(MARK_CHECK, \"Config change detected\", path);\n wsClients.forEach((ws) => {\n ws.send(\n JSON.stringify({\n type: \"config-change\",\n path,\n })\n );\n });\n });\n\n async function getData() {\n try {\n if (!payload) {\n return await readConfig(options).then((res) => {\n const _payload = (payload = res.payload);\n _payload.meta.wsPort = port;\n watcher.add(res.dependencies);\n return payload;\n });\n }\n return payload;\n } catch (e) {\n console.error(readErrorWarning);\n if (e instanceof ConfigInspectorError) {\n e.prettyPrint();\n } else {\n console.error(e);\n }\n return createErrorPayload(e);\n }\n }\n\n return {\n port,\n wss,\n watcher,\n getData,\n };\n}\n","import type { Server } from \"node:http\";\nimport type { CreateWsServerOptions } from \"./ws\";\nimport { readFile, stat } from \"node:fs/promises\";\nimport { createServer } from \"node:http\";\nimport { createApp, eventHandler, serveStatic, setResponseHeader } from \"h3\";\nimport { toNodeHandler } from \"h3/node\";\nimport { lookup } from \"mrmime\";\nimport { extname, join } from \"pathe\";\nimport { distDir } from \"./dirs\";\nimport { createWsServer } from \"./ws\";\n\nconst LEADING_SLASHES_RE = /^\\/+/;\n\nexport async function createHostServer(\n options: CreateWsServerOptions\n): Promise<Server> {\n const app = createApp();\n\n const ws = await createWsServer(options);\n\n const fileMap = new Map<string, Promise<Uint8Array | undefined>>();\n const readCachedFile = (id: string) => {\n if (!fileMap.has(id)) {\n fileMap.set(\n id,\n readFile(id).catch(() => undefined)\n );\n }\n return fileMap.get(id);\n };\n\n const resolveDistFilePath = (\n id: string\n ): { relative: string; absolute: string } | undefined => {\n const cleanId = id\n .split(\"?\")[0]\n ?.split(\"#\")[0]\n ?.replace(LEADING_SLASHES_RE, \"\");\n\n if (!cleanId) return;\n\n return {\n relative: cleanId,\n absolute: join(distDir, cleanId),\n };\n };\n\n const shouldServeIndexFallback = (path: string): boolean => {\n if (path === \"/\") return true;\n\n if (path.startsWith(\"/_nuxt/\") || path.startsWith(\"/api/\"))\n return false;\n\n return extname(path) === \"\";\n };\n\n app.use(\n \"/api/payload.json\",\n eventHandler(() => ws.getData())\n );\n\n app.use(\n eventHandler(async (event) => {\n const indexHtml = await readCachedFile(join(distDir, \"index.html\"));\n\n if (event.path === \"/\" && indexHtml) {\n setResponseHeader(\n event,\n \"Content-Type\",\n \"text/html; charset=UTF-8\"\n );\n return indexHtml;\n }\n\n const result = await serveStatic(event, {\n fallthrough: true,\n getContents: (id) => {\n if (!id) return undefined;\n\n const resolved = resolveDistFilePath(id);\n if (!resolved) return undefined;\n\n return readCachedFile(resolved.absolute);\n },\n getMeta: async (id) => {\n if (!id) return;\n\n const resolved = resolveDistFilePath(id);\n if (!resolved) return;\n\n const stats = await stat(resolved.absolute).catch(() => {});\n if (!stats?.isFile()) return;\n\n const mimeType = lookup(resolved.relative);\n return {\n ...(mimeType !== undefined && { type: mimeType }),\n size: stats.size,\n mtime: stats.mtimeMs,\n };\n },\n });\n\n if (!result && shouldServeIndexFallback(event.path)) {\n if (indexHtml) {\n setResponseHeader(\n event,\n \"Content-Type\",\n \"text/html; charset=UTF-8\"\n );\n }\n return indexHtml;\n }\n\n return result;\n })\n );\n\n return createServer(toNodeHandler(app));\n}\n","import { existsSync } from \"node:fs\";\nimport fs from \"node:fs/promises\";\nimport process from \"node:process\";\nimport c from \"ansis\";\n\nimport cac from \"cac\";\nimport { getPort } from \"get-port-please\";\nimport open from \"open\";\nimport { relative, resolve } from \"pathe\";\nimport { glob } from \"tinyglobby\";\nimport { rewriteStaticHtmlWithBase } from \"./build-static-html\";\nimport { normalizeCliInspectorOptions } from \"./cli-options\";\nimport { readConfig } from \"./configs\";\nimport { MARK_CHECK, MARK_INFO } from \"./constants\";\nimport { distDir } from \"./dirs\";\nimport { ConfigInspectorError } from \"./errors\";\nimport { createHostServer } from \"./server\";\n\nconst RE_CONSECUTIVE_SLASHES = /\\/+/g;\n\nconst cli = cac(\"stylelint-config-inspector\");\n\ncli.command(\n \"build\",\n \"Build inspector with current config file for static hosting\"\n)\n .option(\"--config <configFile>\", \"Config file path\")\n .option(\"--files\", \"Include matched file paths in payload\", {\n default: true,\n })\n .option(\"--file <filePath>\", \"Alias of --target\")\n .option(\n \"--target <filePath>\",\n \"Target file path used to resolve effective config\"\n )\n .option(\n \"--basePath <basePath>\",\n \"Base directory for globs to resolve. Default to directory of config file if not provided\"\n )\n // Build specific options\n .option(\"--base <baseURL>\", \"Base URL for deployment\", { default: \"/\" })\n .option(\"--outDir <dir>\", \"Output directory\", {\n default: \".stylelint-config-inspector\",\n })\n // Action\n .action(async (rawOptions) => {\n const options = normalizeCliInspectorOptions(rawOptions);\n\n console.log(MARK_INFO, \"Building static Stylelint config inspector...\");\n\n const cwd = process.cwd();\n const outDir = resolve(cwd, options.outDir);\n\n let configs;\n try {\n configs = await readConfig({\n cwd,\n userConfigPath: options.config,\n userBasePath: options.basePath,\n globMatchedFiles: options.files,\n targetFilePath: options.target,\n });\n } catch (error) {\n if (error instanceof ConfigInspectorError) {\n error.prettyPrint();\n process.exit(1);\n }\n throw error;\n }\n\n let baseURL = options.base;\n if (!baseURL.endsWith(\"/\")) baseURL += \"/\";\n if (!baseURL.startsWith(\"/\")) baseURL = `/${baseURL}`;\n baseURL = baseURL.replaceAll(RE_CONSECUTIVE_SLASHES, \"/\");\n\n if (existsSync(outDir)) await fs.rm(outDir, { recursive: true });\n await fs.mkdir(outDir, { recursive: true });\n await fs.cp(distDir, outDir, { recursive: true });\n const htmlFiles = await glob(\"**/*.html\", {\n cwd: distDir,\n onlyFiles: true,\n expandDirectories: false,\n });\n // Rewrite HTML files with base URL\n if (baseURL !== \"/\") {\n for (const file of htmlFiles) {\n if (!file) continue;\n const content = await fs.readFile(\n resolve(distDir, file),\n \"utf-8\"\n );\n const newContent = rewriteStaticHtmlWithBase(content, baseURL);\n await fs.writeFile(resolve(outDir, file), newContent, \"utf-8\");\n }\n }\n await fs.mkdir(resolve(outDir, \"api\"), { recursive: true });\n\n configs.payload.meta.configPath = \"\";\n configs.payload.meta.basePath = \"\";\n await fs.writeFile(\n resolve(outDir, \"api/payload.json\"),\n JSON.stringify(configs.payload, null, 2),\n \"utf-8\"\n );\n\n console.log(MARK_CHECK, `Built to ${relative(cwd, outDir)}`);\n console.log(\n MARK_INFO,\n `You can use static server like \\`npx serve ${relative(cwd, outDir)}\\` to serve the inspector`\n );\n });\n\ncli.command(\"\", \"Start dev inspector\")\n .option(\"--config <configFile>\", \"Config file path\")\n .option(\"--files\", \"Include matched file paths in payload\", {\n default: true,\n })\n .option(\"--file <filePath>\", \"Alias of --target\")\n .option(\n \"--target <filePath>\",\n \"Target file path used to resolve effective config\"\n )\n .option(\n \"--basePath <basePath>\",\n \"Base directory for globs to resolve. Default to directory of config file if not provided\"\n )\n // Dev specific options\n .option(\"--host <host>\", \"Host\", {\n default: process.env[\"HOST\"] || \"127.0.0.1\",\n })\n .option(\"--port <port>\", \"Port\", { default: process.env[\"PORT\"] || 8888 })\n .option(\"--open\", \"Open browser\", { default: true })\n // Action\n .action(async (rawOptions) => {\n const options = normalizeCliInspectorOptions(rawOptions);\n\n const host = options.host;\n const port = await getPort({\n port: options.port,\n portRange: [8888, 10000],\n host,\n });\n\n console.log(\n MARK_INFO,\n `Starting Stylelint config inspector at`,\n c.green`http://${host === \"127.0.0.1\" ? \"localhost\" : host}:${port}`,\n \"\\n\"\n );\n\n const cwd = process.cwd();\n const server = await createHostServer({\n cwd,\n userConfigPath: options.config,\n userBasePath: options.basePath,\n globMatchedFiles: options.files,\n targetFilePath: options.target,\n });\n\n server.listen(port, host, async () => {\n if (options.open) {\n await open(\n `http://${host === \"127.0.0.1\" ? \"localhost\" : host}:${port}`\n );\n }\n });\n });\n\ncli.help();\ncli.parse();\n"],"x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,49],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,MAAM,8BAA8B,IAAI,IAAI;CAC1C;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;AAEF,CAAC;AACD,SAAS,aAAa,MAAM;CAC1B,OAAO,YAAY,IAAI,IAAI;AAC7B;AACA,SAAS,WAAW,MAAM;CACxB,OAAO,CAAC,aAAa,IAAI;AAC3B;AAEA,IAAM,eAAN,cAA2B,MAAM;CAC/B,YAAY,SAAS,MAAM;EACzB,MAAM,SAAS,IAAI;EACnB,KAAK,UAAU;CACjB;CACA,OAAO;AACT;AACA,SAAS,KAAK,SAAS,SAAS;CAC9B,IAAI,SACF,QAAQ,IAAI,cAAc,SAAS;AAEvC;AACA,SAAS,eAAe,MAAM,IAAI;CAChC,IAAI,KAAK,MAC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