diff --git a/debuggers/vscode-js-debug/js-debug/.vscodeignore b/debuggers/vscode-js-debug/js-debug/.vscodeignore new file mode 100644 index 00000000..7b6eed0f --- /dev/null +++ b/debuggers/vscode-js-debug/js-debug/.vscodeignore @@ -0,0 +1,4 @@ +# note: this is moved into `dist` during compilation, and does not actually apply here +**/*.map +src/build/** +src/testRunner.js diff --git a/debuggers/vscode-js-debug/js-debug/LICENSE b/debuggers/vscode-js-debug/js-debug/LICENSE new file mode 100644 index 00000000..4b1ad51b --- /dev/null +++ b/debuggers/vscode-js-debug/js-debug/LICENSE @@ -0,0 +1,21 @@ + MIT License + + Copyright (c) Microsoft Corporation. All rights reserved. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE diff --git a/debuggers/vscode-js-debug/js-debug/README.md b/debuggers/vscode-js-debug/js-debug/README.md new file mode 100644 index 00000000..bc4adf5b --- /dev/null +++ b/debuggers/vscode-js-debug/js-debug/README.md @@ -0,0 +1,134 @@ +

+ vscode-js-debug +

+ +This is a [DAP](https://microsoft.github.io/debug-adapter-protocol/)-based JavaScript debugger. It debugs Node.js, Chrome, Edge, WebView2, VS Code extensions, Blazor, React Native, and more. It is the default JavaScript debugger in Visual Studio Code and Visual Studio, and the standalone debug server can also be used in other tools such as [nvim](https://github.com/mxsdev/nvim-dap-vscode-js). + +## Usage + +If you're using Visual Studio or Visual Studio Code, `js-debug` is already installed. Otherwise, please consult your editor's documentation for possible installation instructions. Builds of the VS Code extension and standalone DAP server are available on the [releases](https://github.com/microsoft/vscode-js-debug/releases) page. + +See [OPTIONS.md](./OPTIONS.md) for a list of options you can use in your launch configurations. + +- For usage in VS Code, please check out our guides for [Node.js debugging](https://code.visualstudio.com/docs/nodejs/nodejs-debugging), [Browser debugging](https://code.visualstudio.com/docs/nodejs/browser-debugging). +- For debugging React Native, install and read through the [React Native](https://marketplace.visualstudio.com/items?itemName=msjsdiag.vscode-react-native) extension which builds upon `js-debug`. +- For debugging Blazor, check out [its documentation here](https://learn.microsoft.com/en-us/aspnet/core/blazor/debug?view=aspnetcore-8.0&tabs=visual-studio-code). +- For debugging WebView2 apps, check out [documentation here](https://learn.microsoft.com/en-us/microsoft-edge/webview2/how-to/debug-visual-studio-code). + +### Nightly Extension + +The shipped version of VS Code includes the js-debug version at the time of its release, however you may want to install our nightly build to get the latest fixes and features. The nightly build runs at 5PM PST on each day that there are changes ([see pipeline](https://dev.azure.com/vscode/VS%20Code%20debug%20adapters/_build?definitionId=28)). To get the build: + +1. Open the extensions view (ctrl+shift+x) and search for `@builtin @id:ms-vscode.js-debug` +2. Right click on the `JavaScript Debugger` extension and `Disable` it. +3. Search for `@id:ms-vscode.js-debug-nightly` in the extensions view. +4. Install that extension. + +## Notable Features + +In `js-debug` we aim to provide rich debugging for modern applications, with no or minimal configuration required. Here are a few distinguishing features of `js-debug` beyond basic debugging capabilities. Please refer to the VS Code documentation for a complete overview of capabilities. + +### Debug child processes, web workers, service workers, and worker threads + +In Node.js, child processes and worker threads will automatically be debugged. In browsers, service workers, webworkers, and iframes will be debugged as well. While debugging workers, you can also step through `postMessage()` calls. + +
+ Preview + +
+ +### Debug WebAssembly with DWARF symbols + +The debugger automatically reads DWARF symbols from WebAssembly binaries, and debugs them. The usual debugging features are available, including limited evaluation support via `lldb-eval`. + +
+ Preview + +
+ +### Debug Node.js processes in the terminal + +You can debug any Node.js process you run in the terminal with Auto Attach. If auto attach isn't on, you can run the command `Debug: Toggle Auto Attach` to turn it on. Next time you run a command like `npm start`, we'll debug it. + +
+ Preview + +
+ +Once enabled, you can toggle Auto Attach by clicking the `Auto Attach: On/Off` button in the status bar on the bottom of your screen. You can also create a one-off terminal for debugging via the `Debug: Create JavaScript Debug Terminal` command. + +### Profiling Support + +You can capture and view performance profiles natively in VS Code, by clicking on the ⚪ button in the Call Stack view, or through the `Debug: Take Performance Profile` command. The profile information collected through VS Code is sourcemap-aware. + +We support taking and visualizating CPU profiles, heap profiles, and heap snapshots. + +
+ Preview + +
+ +### Instrumentation breakpoints + +When debugging web apps, you can configure instrumentation breakpoints from VS Code in the "Event Listener Breakpoints" view. + +
+ Preview + + +
+ +### Return value interception + +On a function's return statement, you can use, inspect, and modify the `$returnValue`. + +
+ Preview + +
+ +Note that you can use and modify properties on the `$returnValue`, but not assign it to--it is effectively a `const` variable. + +### Pretty-print minified sources + +The debugger can pretty print files, especially useful when dealing with minified sources. You can trigger pretty printing by clicking on the braces `{}` icon in editor actions, or via the `Debug: Pretty print for debugging` command. + +
+ Preview + +
+ +### Experimental Network View + +The debugger allows viewing network traffic of browser targets and Node.js >22.6.0. This requires enabling the `debug.javascript.enableNetworkView` setting. + +
+ Preview + +
+ +### Advanced Rename Support + +When using a tool that emits renames in its sourcemap, the debugger maps renamed variables in all displayed views, and also rewrites evaluation requests to use the renamed identifiers, allowing near-source-level debugging of minified code. + +### Conditional Exception Breakpoints + +As in most debuggers, you can pause on caught exceptions, but you can also filter the exceptions you want to pause on by checking against the `error` object. In VS Code, you can do this by clicking the pencil icon in the Breakpoints view. + +
+ Preview + +
+ +### Excluded Callers + +If you have a breakpoint you want to pause on, but not when called from certain frames, you can right click on call frames in the stack trace view to "exclude caller" which prevents pausing on that breakpoint when the requested caller is in the stack trace. + +
+ Preview + +
+ +### Step-in Targets + +When paused on a location with multiple calls or expressions, the debugger supports the **Debug: Step Into Target** action that allows you to request a specific expression you wish to step into. diff --git a/debuggers/vscode-js-debug/js-debug/package.nls.json b/debuggers/vscode-js-debug/js-debug/package.nls.json new file mode 100644 index 00000000..ac6630cb --- /dev/null +++ b/debuggers/vscode-js-debug/js-debug/package.nls.json @@ -0,0 +1,234 @@ +{ + "add.eventListener.breakpoint": "Toggle Event Listener Breakpoints", + "add.xhr.breakpoint": "Add XHR/fetch Breakpoint", + "breakpoint.xhr.contains": "Break when URL contains:", + "breakpoint.xhr.any": "Any XHR/fetch", + "edit.xhr.breakpoint": "Edit XHR/fetch Breakpoint", + "attach.node.process": "Attach to Node Process", + "base.cascadeTerminateToConfigurations.label": "A list of debug sessions which, when this debug session is terminated, will also be stopped.", + "base.enableDWARF.label": "Toggles whether the debugger will try to read DWARF debug symbols from WebAssembly, which can be resource intensive. Requires the `ms-vscode.wasm-dwarf-debugging` extension to function.", + "browser.address.description": "IP address or hostname the debugged browser is listening on.", + "browser.attach.port.description": "Port to use to remote debugging the browser, given as `--remote-debugging-port` when launching the browser.", + "browser.baseUrl.description": "Base URL to resolve paths baseUrl. baseURL is trimmed when mapping URLs to the files on disk. Defaults to the launch URL domain.", + "browser.browserAttachLocation.description": "Forces the browser to attach in one location. In a remote workspace (through ssh or WSL, for example) this can be used to attach to a browser on the remote machine rather than locally.", + "browser.browserLaunchLocation.description": "Forces the browser to be launched in one location. In a remote workspace (through ssh or WSL, for example) this can be used to open the browser on the remote machine rather than locally.", + "browser.cleanUp.description": "What clean-up to do after the debugging session finishes. Close only the tab being debug, vs. close the whole browser.", + "browser.cwd.description": "Optional working directory for the runtime executable.", + "browser.disableNetworkCache.description": "Controls whether to skip the network cache for each request", + "browser.env.description": "Optional dictionary of environment key/value pairs for the browser.", + "browser.file.description": "A local html file to open in the browser", + "browser.includeDefaultArgs.description": "Whether default browser launch arguments (to disable features that may make debugging harder) will be included in the launch.", + "browser.includeLaunchArgs.description": "Advanced: whether any default launch/debugging arguments are set on the browser. The debugger will assume the browser will use pipe debugging such as that which is provided with `--remote-debugging-pipe`.", + "browser.inspectUri.description": "Format to use to rewrite the inspectUri: It's a template string that interpolates keys in `{curlyBraces}`. Available keys are:\n - `url.*` is the parsed address of the running application. For instance, `{url.port}`, `{url.hostname}`\n - `port` is the debug port that Chrome is listening on.\n - `browserInspectUri` is the inspector URI on the launched browser\n - `browserInspectUriPath` is the path part of the inspector URI on the launched browser (e.g.: \"/devtools/browser/e9ec0098-306e-472a-8133-5e42488929c2\").\n - `wsProtocol` is the hinted websocket protocol. This is set to `wss` if the original URL is `https`, or `ws` otherwise.\n", + "browser.launch.port.description": "Port for the browser to listen on. Defaults to \"0\", which will cause the browser to be debugged via pipes, which is generally more secure and should be chosen unless you need to attach to the browser from another tool.", + "browser.pathMapping.description": "A mapping of URLs/paths to local folders, to resolve scripts in the Browser to scripts on disk", + "browser.perScriptSourcemaps.description": "Whether scripts are loaded individually with unique sourcemaps containing the basename of the source file. This can be set to optimize sourcemap handling when dealing with lots of small scripts. If set to \"auto\", we'll detect known cases where this is appropriate.", + "browser.profileStartup.description": "If true, will start profiling soon as the process launches", + "browser.restart": "Whether to reconnect if the browser connection is closed", + "browser.revealPage": "Focus Tab", + "browser.runtimeArgs.description": "Optional arguments passed to the runtime executable.", + "browser.runtimeExecutable.description": "Either 'canary', 'stable', 'custom' or path to the browser executable. Custom means a custom wrapper, custom build or CHROME_PATH environment variable.", + "browser.runtimeExecutable.edge.description": "Either 'canary', 'stable', 'dev', 'custom' or path to the browser executable. Custom means a custom wrapper, custom build or EDGE_PATH environment variable.", + "browser.server.description": "Configures a web server to start up. Takes the same configuration as the 'node' launch task.", + "browser.skipFiles.description": "An array of file or folder names, or path globs, to skip when debugging. Star patterns and negations are allowed, for example, `[\"**/node_modules/**\", \"!**/node_modules/my-module/**\"]`", + "browser.smartStep.description": "Automatically step through unmapped lines in sourcemapped files. For example, code that TypeScript produces automatically when downcompiling async/await or other features.", + "browser.sourceMapPathOverrides.description": "A set of mappings for rewriting the locations of source files from what the sourcemap says, to their locations on disk. See README for details.", + "browser.sourceMapRenames.description": "Whether to use the \"names\" mapping in sourcemaps. This requires requesting source content, which can be slow with certain debuggers.", + "browser.sourceMaps.description": "Use JavaScript source maps (if they exist).", + "browser.targetSelection": "Whether to attach to all targets that match the URL filter (\"automatic\") or ask to pick one (\"pick\").", + "browser.timeout.description": "Retry for this number of milliseconds to connect to the browser. Default is 10000 ms.", + "browser.url.description": "Will search for a tab with this exact url and attach to it, if found", + "browser.urlFilter.description": "Will search for a page with this url and attach to it, if found. Can have * wildcards.", + "browser.userDataDir.description": "By default, the browser is launched with a separate user profile in a temp folder. Use this option to override it. Set to false to launch with your default user profile. A new browser can't be launched if an instance is already running from `userDataDir`.", + "browser.vueComponentPaths": "A list of file glob patterns to find `*.vue` components. By default, searches the entire workspace. This needs to be specified due to extra lookups that Vue's sourcemaps require in Vue CLI 4. You can disable this special handling by setting this to an empty array.", + "browser.webRoot.description": "This specifies the workspace absolute path to the webserver root. Used to resolve paths like `/app.js` to files on disk. Shorthand for a pathMapping for \"/\"", + "chrome.attach.description": "Attach to an instance of Chrome already in debug mode", + "chrome.attach.label": "Chrome: Attach", + "chrome.label": "Web App (Chrome)", + "chrome.launch.description": "Launch Chrome to debug a URL", + "chrome.launch.label": "Chrome: Launch", + "commands.callersAdd.label": "Exclude Caller", + "commands.callersAdd.paletteLabel": "Exclude caller from pausing in the current location", + "commands.callersGoToCaller.label": "Go to caller location", + "commands.callersGoToTarget.label": "Go to target location", + "commands.callersRemove.label": "Remove excluded caller", + "commands.callersRemoveAll.label": "Remove all excluded callers", + "commands.disableSourceMapStepping.label": "Disable Source Mapped Stepping", + "commands.enableSourceMapStepping.label": "Enable Source Mapped Stepping", + "configuration.autoAttachMode.always": "Auto attach to every Node.js process launched in the terminal.", + "configuration.autoAttachMode.disabled": "Auto attach is disabled and not shown in status bar.", + "configuration.autoAttachMode.explicit": "Only auto attach when the `--inspect` is given.", + "configuration.autoAttachMode.smart": "Auto attach when running scripts that aren't in a node_modules folder.", + "configuration.autoAttachMode": "Configures which processes to automatically attach and debug when `#debug.node.autoAttach#` is on. A Node process launched with the `--inspect` flag will always be attached to, regardless of this setting.", + "configuration.autoAttachSmartPatterns": "Configures glob patterns for determining when to attach in \"smart\" `#debug.javascript.autoAttachFilter#` mode. `$KNOWN_TOOLS$` is replaced with a list of names of common test and code runners. [Read more on the VS Code docs](https://code.visualstudio.com/docs/nodejs/nodejs-debugging#_auto-attach-smart-patterns).", + "configuration.automaticallyTunnelRemoteServer": "When debugging a remote web app, configures whether to automatically tunnel the remote server to your local machine.", + "configuration.breakOnConditionalError": "Whether to stop when conditional breakpoints throw an error.", + "configuration.debugByLinkOptions": "Options used when debugging open links clicked from inside the JavaScript Debug Terminal. Can be set to \"off\" to disable this behavior, or \"always\" to enable debugging in all terminals.", + "configuration.defaultRuntimeExecutables": "The default `runtimeExecutable` used for launch configurations, if unspecified. This can be used to config custom paths to Node.js or browser installations.", + "configuration.npmScriptLensLocation": "Where a \"Run\" and \"Debug\" code lens should be shown in your npm scripts. It may be on \"all\", scripts, on \"top\" of the script section, or \"never\".", + "configuration.pickAndAttachOptions": "Default options used when debugging a process through the `Debug: Attach to Node.js Process` command", + "configuration.resourceRequestOptions": "Request options to use when loading resources, such as source maps, in the debugger. You may need to configure this if your sourcemaps require authentication or use a self-signed certificate, for instance. Options are used to create a request using the [`got`](https://github.com/sindresorhus/got) library.\n\nA common case to disable certificate verification can be done by passing `{ \"https\": { \"rejectUnauthorized\": false } }`.", + "configuration.terminalOptions": "Default launch options for the JavaScript debug terminal and npm scripts.", + "configuration.unmapMissingSources": "Configures whether sourcemapped file where the original file can't be read will automatically be unmapped. If this is false (default), a prompt is shown.", + "configuration.enableNetworkView": "Enables the experimental network view for targets that support it.", + "createDiagnostics.label": "Diagnose Breakpoint Problems", + "customDescriptionGenerator.description": "Customize the textual description the debugger shows for objects (local variables, etc...). Samples:\n 1. this.toString() // will call toString to print all objects\n 2. this.customDescription ? this.customDescription() : defaultValue // Use customDescription method if available, if not return defaultValue\n 3. function (def) { return this.customDescription ? this.customDescription() : def } // Use customDescription method if available, if not return defaultValue\n ", + "customPropertiesGenerator.description": "Customize the properties shown for an object in the debugger (local variables, etc...). Samples:\n 1. { ...this, extraProperty: '12345' } // Add an extraProperty 12345 to all objects\n 2. this.customProperties ? this.customProperties() : this // Use customProperties method if available, if not use the properties in this (the default properties)\n 3. function () { return this.customProperties ? this.customProperties() : this } // Use customDescription method if available, if not return the default properties\n\n Deprecated: This is a temporary implementation of this feature until we have time to implement it in the way described here: https://github.com/microsoft/vscode/issues/102181", + "debug.npm.edit": "Edit package.json", + "debug.npm.noScripts": "No npm scripts found in your package.json", + "debug.npm.noWorkspaceFolder": "You need to open a workspace folder to debug npm scripts.", + "debug.npm.parseError": "Could not read {0}: {1}", + "debug.npm.script": "Debug npm Script", + "debug.terminal.attach": "Attach to Node.js Terminal Process", + "debug.terminal.label": "JavaScript Debug Terminal", + "debug.terminal.program.description": "Command to run in the launched terminal. If not provided, the terminal will open without launching a program.", + "debug.terminal.snippet.label": "Run \"npm start\" in a debug terminal", + "debug.terminal.toggleAuto": "Toggle Terminal Node.js Auto Attach", + "debug.terminal.welcome": { + "message": "[JavaScript Debug Terminal](command:extension.js-debug.createDebuggerTerminal)\n\nYou can use the JavaScript Debug Terminal to debug Node.js processes run on the command line.", + "comment": ["{Locked='](command:extension.js-debug.createDebuggerTerminal)'}"] + }, + "debug.terminal.welcomeWithLink": { + "message": "[JavaScript Debug Terminal](command:extension.js-debug.createDebuggerTerminal)\n\nYou can use the JavaScript Debug Terminal to debug Node.js processes run on the command line.\n\n[Debug URL](command:extension.js-debug.debugLink)", + "comment": [ + "{Locked='](command:extension.js-debug.createDebuggerTerminal)'}", + "{Locked='](command:extension.js-debug.debugLink)'}" + ] + }, + "debug.unverifiedBreakpoints": { + "message": "Some of your breakpoints could not be set. If you're having an issue, you can [troubleshoot your launch configuration](command:extension.js-debug.createDiagnostics).", + "comment": ["{Locked='](command:extension.js-debug.createDiagnostics)'}"] + }, + "debugLink.label": "Open Link", + "edge.address.description": "When debugging webviews, the IP address or hostname the webview is listening on. Will be automatically discovered if not set.", + "edge.attach.description": "Attach to an instance of Edge already in debug mode", + "edge.attach.label": "Edge: Attach", + "edge.label": "Web App (Edge)", + "edge.launch.description": "Launch Edge to debug a URL", + "edge.launch.label": "Edge: Launch", + "edge.port.description": "When debugging webviews, the port the webview debugger is listening on. Will be automatically discovered if not set.", + "edge.useWebView.attach.description": "An object containing the `pipeName` of a debug pipe for a UWP hosted Webview2. This is the \"MyTestSharedMemory\" when creating the pipe \"\\\\.\\pipe\\LOCAL\\MyTestSharedMemory\"", + "edge.useWebView.launch.description": "When 'true', the debugger will treat the runtime executable as a host application that contains a WebView allowing you to debug the WebView script content.", + "enableContentValidation.description": "Toggles whether we verify the contents of files on disk match the ones loaded in the runtime. This is useful in a variety of scenarios and required in some, but can cause issues if you have server-side transformation of scripts, for example.", + "errors.timeout": "{0}: timeout after {1}ms", + "extension.description": "An extension for debugging Node.js programs and Chrome.", + "extensionHost.label": "VS Code Extension Development", + "extensionHost.launch.config.name": "Launch Extension", + "extensionHost.launch.debugWebviews": "Configures whether we should try to attach to webviews in the launched VS Code instance. This will only work in desktop VS Code.", + "extensionHost.launch.debugWebWorkerHost": "Configures whether we should try to attach to the web worker extension host.", + "extensionHost.launch.env.description": "Environment variables passed to the extension host.", + "extensionHost.launch.rendererDebugOptions": "Chrome launch options used when attaching to the renderer process, with `debugWebviews` or `debugWebWorkerHost`.", + "extensionHost.launch.testConfiguration": "Path to a test configuration file for the [test CLI](https://code.visualstudio.com/api/working-with-extensions/testing-extension#quick-setup-the-test-cli).", + "extensionHost.launch.testConfigurationLabel": "A single configuration to run from the file. If not specified, you may be asked to pick.", + "extensionHost.launch.runtimeExecutable.description": "Absolute path to VS Code.", + "extensionHost.launch.stopOnEntry.description": "Automatically stop the extension host after launch.", + "extensionHost.snippet.launch.description": "Launch a VS Code extension in debug mode", + "extensionHost.snippet.launch.label": "VS Code Extension Development", + "getDiagnosticLogs.label": "Save Diagnostic JS Debug Logs", + "longPredictionWarning.disable": "Don't show again", + "longPredictionWarning.message": "It's taking a while to configure your breakpoints. You can speed this up by updating the 'outFiles' in your launch.json.", + "longPredictionWarning.noFolder": "No workspace folder open.", + "longPredictionWarning.open": "Open launch.json", + "node.address.description": "TCP/IP address of process to be debugged. Default is 'localhost'.", + "node.attach.attachExistingChildren.description": "Whether to attempt to attach to already-spawned child processes.", + "node.attach.attachSpawnedProcesses.description": "Whether to set environment variables in the attached process to track spawned children.", + "node.attach.config.name": "Attach", + "node.attach.continueOnAttach": "If true, we'll automatically resume programs launched and waiting on `--inspect-brk`", + "node.attach.processId.description": "ID of process to attach to.", + "node.attach.restart.description": "Try to reconnect to the program if we lose connection. If set to `true`, we'll try once a second, forever. You can customize the interval and maximum number of attempts by specifying the `delay` and `maxAttempts` in an object instead.", + "node.attachSimplePort.description": "If set, attaches to the process via the given port. This is generally no longer necessary for Node.js programs and loses the ability to debug child processes, but can be useful in more esoteric scenarios such as with Deno and Docker launches. If set to 0, a random port will be chosen and --inspect-brk added to the launch arguments automatically.", + "node.console.title": "Node Debug Console", + "node.disableOptimisticBPs.description": "Don't set breakpoints in any file until a sourcemap has been loaded for that file.", + "node.enableTurboSourcemaps.description": "Configures whether to use a new, faster mechanism for sourcemap discovery", + "node.killBehavior.description": "Configures how debug processes are killed when stopping the session. Can be:\n\n- forceful (default): forcefully tears down the process tree. Sends SIGKILL on posix, or `taskkill.exe /F` on Windows.\n- polite: gracefully tears down the process tree. It's possible that misbehaving processes continue to run after shutdown in this way. Sends SIGTERM on posix, or `taskkill.exe` with no `/F` (force) flag on Windows.\n- none: no termination will happen.", + "node.label": "Node.js", + "node.launch.args.description": "Command line arguments passed to the program.\n\nCan be an array of strings or a single string. When the program is launched in a terminal, setting this property to a single string will result in the arguments not being escaped for the shell.", + "node.launch.autoAttachChildProcesses.description": "Attach debugger to new child processes automatically.", + "node.launch.config.name": "Launch", + "node.launch.console.description": "Where to launch the debug target.", + "node.launch.console.externalTerminal.description": "External terminal that can be configured via user settings", + "node.launch.console.integratedTerminal.description": "VS Code's integrated terminal", + "node.launch.console.internalConsole.description": "VS Code Debug Console (which doesn't support to read input from a program)", + "node.launch.cwd.description": "Absolute path to the working directory of the program being debugged. If you've set localRoot then cwd will match that value otherwise it falls back to your workspaceFolder", + "node.launch.env.description": "Environment variables passed to the program. The value `null` removes the variable from the environment.", + "node.launch.envFile.description": "Absolute path to a file containing environment variable definitions.", + "node.launch.logging.cdp": "Path to the log file for Chrome DevTools Protocol messages", + "node.launch.logging.dap": "Path to the log file for Debug Adapter Protocol messages", + "node.launch.logging": "Logging configuration", + "node.launch.outputCapture.description": "From where to capture output messages: the default debug API if set to `console`, or stdout/stderr streams if set to `std`.", + "node.launch.program.description": "Absolute path to the program. Generated value is guessed by looking at package.json and opened files. Edit this attribute.", + "node.launch.restart.description": "Try to restart the program if it exits with a non-zero exit code.", + "node.launch.runtimeArgs.description": "Optional arguments passed to the runtime executable.", + "node.launch.runtimeExecutable.description": "Runtime to use. Either an absolute path or the name of a runtime available on the PATH. If omitted `node` is assumed.", + "node.launch.runtimeSourcemapPausePatterns": "A list of patterns at which to manually insert entrypoint breakpoints. This can be useful to give the debugger an opportunity to set breakpoints when using sourcemaps that don't exist or can't be detected before launch, such as [with the Serverless framework](https://github.com/microsoft/vscode-js-debug/issues/492).", + "node.launch.runtimeVersion.description": "Version of `node` runtime to use. Requires `nvm`.", + "node.launch.useWSL.deprecation": "'useWSL' is deprecated and support for it will be dropped. Use the 'Remote - WSL' extension instead.", + "node.launch.useWSL.description": "Use Windows Subsystem for Linux.", + "node.localRoot.description": "Path to the local directory containing the program.", + "node.pauseForSourceMap.description": "Whether to wait for source maps to load for each incoming script. This has a performance overhead, and might be safely disabled when running off of disk, so long as `rootPath` is not disabled.", + "node.port.description": "Debug port to attach to. Default is 9229.", + "node.processattach.config.name": "Attach to Process", + "node.profileStartup.description": "If true, will start profiling as soon as the process launches", + "node.remoteRoot.description": "Absolute path to the remote directory containing the program.", + "node.resolveSourceMapLocations.description": "A list of minimatch patterns for locations (folders and URLs) in which source maps can be used to resolve local files. This can be used to avoid incorrectly breaking in external source mapped code. Patterns can be prefixed with \"!\" to exclude them. May be set to an empty array or null to avoid restriction.", + "node.showAsyncStacks.description": "Show the async calls that led to the current call stack.", + "node.snippet.attach.description": "Attach to a running node program", + "node.snippet.attach.label": "Node.js: Attach", + "node.snippet.attachProcess.description": "Open process picker to select node process to attach to", + "node.snippet.attachProcess.label": "Node.js: Attach to Process", + "node.snippet.electron.description": "Debug the Electron main process", + "node.snippet.electron.label": "Node.js: Electron Main", + "node.snippet.gulp.description": "Debug gulp task (make sure to have a local gulp installed in your project)", + "node.snippet.gulp.label": "Node.js: Gulp task", + "node.snippet.launch.description": "Launch a node program in debug mode", + "node.snippet.launch.label": "Node.js: Launch Program", + "node.snippet.mocha.description": "Debug mocha tests", + "node.snippet.mocha.label": "Node.js: Mocha Tests", + "node.snippet.nodemon.description": "Use nodemon to relaunch a debug session on source changes", + "node.snippet.nodemon.label": "Node.js: Nodemon Setup", + "node.snippet.npm.description": "Launch a node program through an npm `debug` script", + "node.snippet.npm.label": "Node.js: Launch via npm", + "node.snippet.remoteattach.description": "Attach to the debug port of a remote node program", + "node.snippet.remoteattach.label": "Node.js: Attach to Remote Program", + "node.snippet.yo.description": "Debug yeoman generator (install by running `npm link` in project folder)", + "node.snippet.yo.label": "Node.js: Yeoman generator", + "node.sourceMapPathOverrides.description": "A set of mappings for rewriting the locations of source files from what the sourcemap says, to their locations on disk.", + "node.sourceMaps.description": "Use JavaScript source maps (if they exist).", + "node.stopOnEntry.description": "Automatically stop program after launch.", + "node.timeout.description": "Retry for this number of milliseconds to connect to Node.js. Default is 10000 ms.", + "node.versionHint.description": "Allows you to explicitly specify the Node version that's running, which can be used to disable or enable certain behaviors in cases where the automatic version detection does not work.", + "node.websocket.address.description": "Exact websocket address to attach to. If unspecified, it will be discovered from the address and port.", + "node.remote.host.header.description": "Explicit Host header to use when connecting to the websocket of inspector. If unspecified, the host header will be set to 'localhost'. This is useful when the inspector is running behind a proxy that only accept particular Host header.", + "node.experimentalNetworking.description": "Enable experimental inspection in Node.js. When set to `auto` this is enabled for versions of Node.js that support it. It can be set to `on` or `off` to enable or disable it explicitly.", + "openEdgeDevTools.label": "Open Browser Devtools", + "outFiles.description": "If source maps are enabled, these glob patterns specify the generated JavaScript files. If a pattern starts with `!` the files are excluded. If not specified, the generated code is expected in the same directory as its source.", + "pretty.print.script": "Pretty print for debugging", + "profile.start": "Take Performance Profile", + "profile.stop": "Stop Performance Profile", + "remove.eventListener.breakpoint.all": "Remove All Event Listener Breakpoints", + "remove.xhr.breakpoint.all": "Remove All XHR/fetch Breakpoints", + "remove.xhr.breakpoint": "Remove XHR/fetch Breakpoint", + "requestCDPProxy.label": "Request CDP Proxy for Debug Session", + "skipFiles.description": "An array of glob patterns for files to skip when debugging. The pattern `/**` matches all internal Node.js modules.", + "smartStep.description": "Automatically step through generated code that cannot be mapped back to the original source.", + "start.with.stop.on.entry": "Start Debugging and Stop on Entry", + "startWithStopOnEntry.label": "Start Debugging and Stop on Entry", + "timeouts.generalDescription.markdown": "Timeouts for several debugger operations.", + "timeouts.generalDescription": "Timeouts for several debugger operations.", + "timeouts.hoverEvaluation.description": "Time until value evaluation for hovered symbols is aborted. If set to 0, hover evaluation does never time out.", + "timeouts.sourceMaps.description": "Timeouts related to source maps operations.", + "timeouts.sourceMaps.sourceMapCumulativePause.description": "Extra time in milliseconds allowed per session to be spent waiting for source-maps to be processed, after the minimum time (sourceMapMinPause) has been exhausted", + "timeouts.sourceMaps.sourceMapMinPause.description": "Minimum time in milliseconds spent waiting for each source-map to be processed when a script is being parsed", + "toggle.skipping.this.file": "Toggle Skipping this File", + "trace.boolean.description": "Trace may be set to 'true' to write diagnostic logs to the disk.", + "trace.description": "Configures what diagnostic output is produced.", + "trace.logFile.description": "Configures where on disk logs are written.", + "trace.stdio.description": "Whether to return trace data from the launched application or browser.", + "workspaceTrust.description": "Trust is required to debug code in this workspace.", + "commands.networkViewRequest.label": "View Request as cURL", + "commands.networkOpenBody.label": "Open Response Body", + "commands.networkOpenBodyInHexEditor.label": "Open Response Body in Hex Editor", + "commands.networkReplayXHR.label": "Replay Request", + "commands.networkCopyURI.label": "Copy Request URL", + "commands.networkClear.label": "Clear Network Log" +} diff --git a/debuggers/vscode-js-debug/js-debug/resources/dark/configure.svg b/debuggers/vscode-js-debug/js-debug/resources/dark/configure.svg new file mode 100644 index 00000000..f191b0ff --- /dev/null +++ b/debuggers/vscode-js-debug/js-debug/resources/dark/configure.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/debuggers/vscode-js-debug/js-debug/resources/dark/connect.svg b/debuggers/vscode-js-debug/js-debug/resources/dark/connect.svg new file mode 100644 index 00000000..8c7f5c49 --- /dev/null +++ b/debuggers/vscode-js-debug/js-debug/resources/dark/connect.svg @@ -0,0 +1,3 @@ + + + diff --git a/debuggers/vscode-js-debug/js-debug/resources/dark/disconnect.svg b/debuggers/vscode-js-debug/js-debug/resources/dark/disconnect.svg new file mode 100644 index 00000000..71aae0dd --- /dev/null +++ b/debuggers/vscode-js-debug/js-debug/resources/dark/disconnect.svg @@ -0,0 +1,3 @@ + + + diff --git a/debuggers/vscode-js-debug/js-debug/resources/dark/node.svg b/debuggers/vscode-js-debug/js-debug/resources/dark/node.svg new file mode 100644 index 00000000..1f5011a6 --- /dev/null +++ b/debuggers/vscode-js-debug/js-debug/resources/dark/node.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/debuggers/vscode-js-debug/js-debug/resources/dark/open-file.svg b/debuggers/vscode-js-debug/js-debug/resources/dark/open-file.svg new file mode 100644 index 00000000..ed302ae1 --- /dev/null +++ b/debuggers/vscode-js-debug/js-debug/resources/dark/open-file.svg @@ -0,0 +1,3 @@ + + + diff --git a/debuggers/vscode-js-debug/js-debug/resources/dark/page.svg b/debuggers/vscode-js-debug/js-debug/resources/dark/page.svg new file mode 100644 index 00000000..4a16ab1d --- /dev/null +++ b/debuggers/vscode-js-debug/js-debug/resources/dark/page.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/debuggers/vscode-js-debug/js-debug/resources/dark/pause.svg b/debuggers/vscode-js-debug/js-debug/resources/dark/pause.svg new file mode 100644 index 00000000..718f66a4 --- /dev/null +++ b/debuggers/vscode-js-debug/js-debug/resources/dark/pause.svg @@ -0,0 +1,3 @@ + + + diff --git a/debuggers/vscode-js-debug/js-debug/resources/dark/restart.svg b/debuggers/vscode-js-debug/js-debug/resources/dark/restart.svg new file mode 100644 index 00000000..fc48916d --- /dev/null +++ b/debuggers/vscode-js-debug/js-debug/resources/dark/restart.svg @@ -0,0 +1,3 @@ + + + diff --git a/debuggers/vscode-js-debug/js-debug/resources/dark/resume.svg b/debuggers/vscode-js-debug/js-debug/resources/dark/resume.svg new file mode 100644 index 00000000..66f7f4f1 --- /dev/null +++ b/debuggers/vscode-js-debug/js-debug/resources/dark/resume.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/debuggers/vscode-js-debug/js-debug/resources/dark/service-worker.svg b/debuggers/vscode-js-debug/js-debug/resources/dark/service-worker.svg new file mode 100644 index 00000000..ee43cb5c --- /dev/null +++ b/debuggers/vscode-js-debug/js-debug/resources/dark/service-worker.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/debuggers/vscode-js-debug/js-debug/resources/dark/stop-profiling.svg b/debuggers/vscode-js-debug/js-debug/resources/dark/stop-profiling.svg new file mode 100644 index 00000000..d2b90ada --- /dev/null +++ b/debuggers/vscode-js-debug/js-debug/resources/dark/stop-profiling.svg @@ -0,0 +1,4 @@ + + + + diff --git a/debuggers/vscode-js-debug/js-debug/resources/dark/stop.svg b/debuggers/vscode-js-debug/js-debug/resources/dark/stop.svg new file mode 100644 index 00000000..288d46cc --- /dev/null +++ b/debuggers/vscode-js-debug/js-debug/resources/dark/stop.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/debuggers/vscode-js-debug/js-debug/resources/dark/worker.svg b/debuggers/vscode-js-debug/js-debug/resources/dark/worker.svg new file mode 100644 index 00000000..f929ce19 --- /dev/null +++ b/debuggers/vscode-js-debug/js-debug/resources/dark/worker.svg @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file diff --git a/debuggers/vscode-js-debug/js-debug/resources/light/configure.svg b/debuggers/vscode-js-debug/js-debug/resources/light/configure.svg new file mode 100644 index 00000000..2e7159f2 --- /dev/null +++ b/debuggers/vscode-js-debug/js-debug/resources/light/configure.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/debuggers/vscode-js-debug/js-debug/resources/light/connect.svg b/debuggers/vscode-js-debug/js-debug/resources/light/connect.svg new file mode 100644 index 00000000..8a01b07b --- /dev/null +++ b/debuggers/vscode-js-debug/js-debug/resources/light/connect.svg @@ -0,0 +1,4 @@ + + + + diff --git a/debuggers/vscode-js-debug/js-debug/resources/light/disconnect.svg b/debuggers/vscode-js-debug/js-debug/resources/light/disconnect.svg new file mode 100644 index 00000000..06fc4c31 --- /dev/null +++ b/debuggers/vscode-js-debug/js-debug/resources/light/disconnect.svg @@ -0,0 +1,3 @@ + + + diff --git a/debuggers/vscode-js-debug/js-debug/resources/light/node.svg b/debuggers/vscode-js-debug/js-debug/resources/light/node.svg new file mode 100644 index 00000000..1f5011a6 --- /dev/null +++ b/debuggers/vscode-js-debug/js-debug/resources/light/node.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/debuggers/vscode-js-debug/js-debug/resources/light/open-file.svg b/debuggers/vscode-js-debug/js-debug/resources/light/open-file.svg new file mode 100644 index 00000000..392a840c --- /dev/null +++ b/debuggers/vscode-js-debug/js-debug/resources/light/open-file.svg @@ -0,0 +1,3 @@ + + + diff --git a/debuggers/vscode-js-debug/js-debug/resources/light/page.svg b/debuggers/vscode-js-debug/js-debug/resources/light/page.svg new file mode 100644 index 00000000..d7e8343f --- /dev/null +++ b/debuggers/vscode-js-debug/js-debug/resources/light/page.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/debuggers/vscode-js-debug/js-debug/resources/light/pause.svg b/debuggers/vscode-js-debug/js-debug/resources/light/pause.svg new file mode 100644 index 00000000..8fbe2d04 --- /dev/null +++ b/debuggers/vscode-js-debug/js-debug/resources/light/pause.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/debuggers/vscode-js-debug/js-debug/resources/light/restart.svg b/debuggers/vscode-js-debug/js-debug/resources/light/restart.svg new file mode 100644 index 00000000..4964d5bf --- /dev/null +++ b/debuggers/vscode-js-debug/js-debug/resources/light/restart.svg @@ -0,0 +1,3 @@ + + + diff --git a/debuggers/vscode-js-debug/js-debug/resources/light/resume.svg b/debuggers/vscode-js-debug/js-debug/resources/light/resume.svg new file mode 100644 index 00000000..a5f970e7 --- /dev/null +++ b/debuggers/vscode-js-debug/js-debug/resources/light/resume.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/debuggers/vscode-js-debug/js-debug/resources/light/service-worker.svg b/debuggers/vscode-js-debug/js-debug/resources/light/service-worker.svg new file mode 100644 index 00000000..20a861e2 --- /dev/null +++ b/debuggers/vscode-js-debug/js-debug/resources/light/service-worker.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/debuggers/vscode-js-debug/js-debug/resources/light/stop.svg b/debuggers/vscode-js-debug/js-debug/resources/light/stop.svg new file mode 100644 index 00000000..e1d92f08 --- /dev/null +++ b/debuggers/vscode-js-debug/js-debug/resources/light/stop.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/debuggers/vscode-js-debug/js-debug/resources/light/worker.svg b/debuggers/vscode-js-debug/js-debug/resources/light/worker.svg new file mode 100644 index 00000000..0c484337 --- /dev/null +++ b/debuggers/vscode-js-debug/js-debug/resources/light/worker.svg @@ -0,0 +1,7 @@ + + + + + diff --git a/debuggers/vscode-js-debug/js-debug/resources/logo.png b/debuggers/vscode-js-debug/js-debug/resources/logo.png new file mode 100644 index 00000000..f32611be Binary files /dev/null and b/debuggers/vscode-js-debug/js-debug/resources/logo.png differ diff --git a/debuggers/vscode-js-debug/js-debug/resources/logo.svg b/debuggers/vscode-js-debug/js-debug/resources/logo.svg new file mode 100644 index 00000000..618090d8 --- /dev/null +++ b/debuggers/vscode-js-debug/js-debug/resources/logo.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/debuggers/vscode-js-debug/js-debug/resources/readme/auto-attach.png b/debuggers/vscode-js-debug/js-debug/resources/readme/auto-attach.png new file mode 100644 index 00000000..05726e15 Binary files /dev/null and b/debuggers/vscode-js-debug/js-debug/resources/readme/auto-attach.png differ diff --git a/debuggers/vscode-js-debug/js-debug/resources/readme/conditional-exception-breakpoints.png b/debuggers/vscode-js-debug/js-debug/resources/readme/conditional-exception-breakpoints.png new file mode 100644 index 00000000..150b14de Binary files /dev/null and b/debuggers/vscode-js-debug/js-debug/resources/readme/conditional-exception-breakpoints.png differ diff --git a/debuggers/vscode-js-debug/js-debug/resources/readme/exclude-caller.png b/debuggers/vscode-js-debug/js-debug/resources/readme/exclude-caller.png new file mode 100644 index 00000000..c477b782 Binary files /dev/null and b/debuggers/vscode-js-debug/js-debug/resources/readme/exclude-caller.png differ diff --git a/debuggers/vscode-js-debug/js-debug/resources/readme/flame-chart.png b/debuggers/vscode-js-debug/js-debug/resources/readme/flame-chart.png new file mode 100644 index 00000000..8efa3455 Binary files /dev/null and b/debuggers/vscode-js-debug/js-debug/resources/readme/flame-chart.png differ diff --git a/debuggers/vscode-js-debug/js-debug/resources/readme/instrumentation-breakpoints.png b/debuggers/vscode-js-debug/js-debug/resources/readme/instrumentation-breakpoints.png new file mode 100644 index 00000000..af1d8bb0 Binary files /dev/null and b/debuggers/vscode-js-debug/js-debug/resources/readme/instrumentation-breakpoints.png differ diff --git a/debuggers/vscode-js-debug/js-debug/resources/readme/instrumentation-breakpoints2.png b/debuggers/vscode-js-debug/js-debug/resources/readme/instrumentation-breakpoints2.png new file mode 100644 index 00000000..48545577 Binary files /dev/null and b/debuggers/vscode-js-debug/js-debug/resources/readme/instrumentation-breakpoints2.png differ diff --git a/debuggers/vscode-js-debug/js-debug/resources/readme/logo-with-text.png b/debuggers/vscode-js-debug/js-debug/resources/readme/logo-with-text.png new file mode 100644 index 00000000..0bbc7b87 Binary files /dev/null and b/debuggers/vscode-js-debug/js-debug/resources/readme/logo-with-text.png differ diff --git a/debuggers/vscode-js-debug/js-debug/resources/readme/network-view.png b/debuggers/vscode-js-debug/js-debug/resources/readme/network-view.png new file mode 100644 index 00000000..0e3e5c0a Binary files /dev/null and b/debuggers/vscode-js-debug/js-debug/resources/readme/network-view.png differ diff --git a/debuggers/vscode-js-debug/js-debug/resources/readme/pretty-print.png b/debuggers/vscode-js-debug/js-debug/resources/readme/pretty-print.png new file mode 100644 index 00000000..dbfeec5a Binary files /dev/null and b/debuggers/vscode-js-debug/js-debug/resources/readme/pretty-print.png differ diff --git a/debuggers/vscode-js-debug/js-debug/resources/readme/returnvalue.png b/debuggers/vscode-js-debug/js-debug/resources/readme/returnvalue.png new file mode 100644 index 00000000..48a4cf6a Binary files /dev/null and b/debuggers/vscode-js-debug/js-debug/resources/readme/returnvalue.png differ diff --git a/debuggers/vscode-js-debug/js-debug/resources/readme/top-level-await.png b/debuggers/vscode-js-debug/js-debug/resources/readme/top-level-await.png new file mode 100644 index 00000000..32b7ba83 Binary files /dev/null and b/debuggers/vscode-js-debug/js-debug/resources/readme/top-level-await.png differ diff --git a/debuggers/vscode-js-debug/js-debug/resources/readme/wasm-dwarf.png b/debuggers/vscode-js-debug/js-debug/resources/readme/wasm-dwarf.png new file mode 100644 index 00000000..4b084d92 Binary files /dev/null and b/debuggers/vscode-js-debug/js-debug/resources/readme/wasm-dwarf.png differ diff --git a/debuggers/vscode-js-debug/js-debug/resources/readme/web-worker.png b/debuggers/vscode-js-debug/js-debug/resources/readme/web-worker.png new file mode 100644 index 00000000..3e6808a2 Binary files /dev/null and b/debuggers/vscode-js-debug/js-debug/resources/readme/web-worker.png differ diff --git a/debuggers/vscode-js-debug/js-debug/resources/readme/webview2.png b/debuggers/vscode-js-debug/js-debug/resources/readme/webview2.png new file mode 100644 index 00000000..6e12f0b9 Binary files /dev/null and b/debuggers/vscode-js-debug/js-debug/resources/readme/webview2.png differ diff --git a/debuggers/vscode-js-debug/js-debug/src/bootloader.js b/debuggers/vscode-js-debug/js-debug/src/bootloader.js new file mode 100644 index 00000000..e072a727 --- /dev/null +++ b/debuggers/vscode-js-debug/js-debug/src/bootloader.js @@ -0,0 +1,36 @@ +"use strict";(()=>{var Hs=Object.create;var ur=Object.defineProperty;var Ms=Object.getOwnPropertyDescriptor;var $s=Object.getOwnPropertyNames;var Fs=Object.getPrototypeOf,Us=Object.prototype.hasOwnProperty;var E=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var w=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var js=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of $s(t))!Us.call(e,s)&&s!==r&&ur(e,s,{get:()=>t[s],enumerable:!(n=Ms(t,s))||n.enumerable});return e};var se=(e,t,r)=>(r=e!=null?Hs(Fs(e)):{},js(t||!e||!e.__esModule?ur(r,"default",{value:e,enumerable:!0}):r,e));var Ye=w(Z=>{"use strict";Z.isInteger=e=>typeof e=="number"?Number.isInteger(e):typeof e=="string"&&e.trim()!==""?Number.isInteger(Number(e)):!1;Z.find=(e,t)=>e.nodes.find(r=>r.type===t);Z.exceedsLimit=(e,t,r=1,n)=>n===!1||!Z.isInteger(e)||!Z.isInteger(t)?!1:(Number(t)-Number(e))/Number(r)>=n;Z.escapeNode=(e,t=0,r)=>{let n=e.nodes[t];n&&(r&&n.type===r||n.type==="open"||n.type==="close")&&n.escaped!==!0&&(n.value="\\"+n.value,n.escaped=!0)};Z.encloseBrace=e=>e.type!=="brace"||e.commas>>0+e.ranges>>0?!1:(e.invalid=!0,!0);Z.isInvalidBrace=e=>e.type!=="brace"?!1:e.invalid===!0||e.dollar?!0:!(e.commas>>0+e.ranges>>0)||e.open!==!0||e.close!==!0?(e.invalid=!0,!0):!1;Z.isOpenOrClose=e=>e.type==="open"||e.type==="close"?!0:e.open===!0||e.close===!0;Z.reduce=e=>e.reduce((t,r)=>(r.type==="text"&&t.push(r.value),r.type==="range"&&(r.type="text"),t),[]);Z.flatten=(...e)=>{let t=[],r=n=>{for(let s=0;s{"use strict";var cr=Ye();fr.exports=(e,t={})=>{let r=(n,s={})=>{let o=t.escapeInvalid&&cr.isInvalidBrace(s),i=n.invalid===!0&&t.escapeInvalid===!0,a="";if(n.value)return(o||i)&&cr.isOpenOrClose(n)?"\\"+n.value:n.value;if(n.value)return n.value;if(n.nodes)for(let l of n.nodes)a+=r(l);return a};return r(e)}});var dr=w((Ka,pr)=>{"use strict";pr.exports=function(e){return typeof e=="number"?e-e===0:typeof e=="string"&&e.trim()!==""?Number.isFinite?Number.isFinite(+e):isFinite(+e):!1}});var vr=w((Xa,Sr)=>{"use strict";var hr=dr(),ye=(e,t,r)=>{if(hr(e)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(t===void 0||e===t)return String(e);if(hr(t)===!1)throw new TypeError("toRegexRange: expected the second argument to be a number.");let n={relaxZeros:!0,...r};typeof n.strictZeros=="boolean"&&(n.relaxZeros=n.strictZeros===!1);let s=String(n.relaxZeros),o=String(n.shorthand),i=String(n.capture),a=String(n.wrap),l=e+":"+t+"="+s+o+i+a;if(ye.cache.hasOwnProperty(l))return ye.cache[l].result;let u=Math.min(e,t),c=Math.max(e,t);if(Math.abs(u-c)===1){let m=e+"|"+t;return n.capture?`(${m})`:n.wrap===!1?m:`(?:${m})`}let g=br(e)||br(t),p={min:e,max:t,a:u,b:c},b=[],_=[];if(g&&(p.isPadded=g,p.maxLen=String(p.max).length),u<0){let m=c<0?Math.abs(c):1;_=gr(m,Math.abs(u),p,n),u=p.a=0}return c>=0&&(b=gr(u,c,p,n)),p.negatives=_,p.positives=b,p.result=qs(_,b,n),n.capture===!0?p.result=`(${p.result})`:n.wrap!==!1&&b.length+_.length>1&&(p.result=`(?:${p.result})`),ye.cache[l]=p,p.result};function qs(e,t,r){let n=Tt(e,t,"-",!1,r)||[],s=Tt(t,e,"",!1,r)||[],o=Tt(e,t,"-?",!0,r)||[];return n.concat(o).concat(s).join("|")}function Ws(e,t){let r=1,n=1,s=_r(e,r),o=new Set([t]);for(;e<=s&&s<=t;)o.add(s),r+=1,s=_r(e,r);for(s=yr(t+1,n)-1;e1&&a.count.pop(),a.count.push(c.count[0]),a.string=a.pattern+xr(a.count),i=u+1;continue}r.isPadded&&(g=zs(u,r,n)),c.string=g+c.pattern+xr(c.count),o.push(c),i=u+1,a=c}return o}function Tt(e,t,r,n,s){let o=[];for(let i of e){let{string:a}=i;!n&&!mr(t,"string",a)&&o.push(r+a),n&&mr(t,"string",a)&&o.push(r+a)}return o}function Vs(e,t){let r=[];for(let n=0;nt?1:t>e?-1:0}function mr(e,t,r){return e.some(n=>n[t]===r)}function _r(e,t){return Number(String(e).slice(0,-t)+"9".repeat(t))}function yr(e,t){return e-e%Math.pow(10,t)}function xr(e){let[t=0,r=""]=e;return r||t>1?`{${t+(r?","+r:"")}}`:""}function Xs(e,t,r){return`[${e}${t-e===1?"":"-"}${t}]`}function br(e){return/^-?(0+)\d/.test(e)}function zs(e,t,r){if(!t.isPadded)return e;let n=Math.abs(t.maxLen-String(e).length),s=r.relaxZeros!==!1;switch(n){case 0:return"";case 1:return s?"0?":"0";case 2:return s?"0{0,2}":"00";default:return s?`0{0,${n}}`:`0{${n}}`}}ye.cache={};ye.clearCache=()=>ye.cache={};Sr.exports=ye});var At=w((za,kr)=>{"use strict";var Qs=E("util"),Tr=vr(),Er=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),Ys=e=>t=>e===!0?Number(t):String(t),Ct=e=>typeof e=="number"||typeof e=="string"&&e!=="",Ne=e=>Number.isInteger(+e),Rt=e=>{let t=`${e}`,r=-1;if(t[0]==="-"&&(t=t.slice(1)),t==="0")return!1;for(;t[++r]==="0";);return r>0},Zs=(e,t,r)=>typeof e=="string"||typeof t=="string"?!0:r.stringify===!0,Js=(e,t,r)=>{if(t>0){let n=e[0]==="-"?"-":"";n&&(e=e.slice(1)),e=n+e.padStart(n?t-1:t,"0")}return r===!1?String(e):e},et=(e,t)=>{let r=e[0]==="-"?"-":"";for(r&&(e=e.slice(1),t--);e.length{e.negatives.sort((a,l)=>al?1:0),e.positives.sort((a,l)=>al?1:0);let n=t.capture?"":"?:",s="",o="",i;return e.positives.length&&(s=e.positives.map(a=>et(String(a),r)).join("|")),e.negatives.length&&(o=`-(${n}${e.negatives.map(a=>et(String(a),r)).join("|")})`),s&&o?i=`${s}|${o}`:i=s||o,t.wrap?`(${n}${i})`:i},Cr=(e,t,r,n)=>{if(r)return Tr(e,t,{wrap:!1,...n});let s=String.fromCharCode(e);if(e===t)return s;let o=String.fromCharCode(t);return`[${s}-${o}]`},Rr=(e,t,r)=>{if(Array.isArray(e)){let n=r.wrap===!0,s=r.capture?"":"?:";return n?`(${s}${e.join("|")})`:e.join("|")}return Tr(e,t,r)},Ar=(...e)=>new RangeError("Invalid range arguments: "+Qs.inspect(...e)),wr=(e,t,r)=>{if(r.strictRanges===!0)throw Ar([e,t]);return[]},to=(e,t)=>{if(t.strictRanges===!0)throw new TypeError(`Expected step "${e}" to be a number`);return[]},ro=(e,t,r=1,n={})=>{let s=Number(e),o=Number(t);if(!Number.isInteger(s)||!Number.isInteger(o)){if(n.strictRanges===!0)throw Ar([e,t]);return[]}s===0&&(s=0),o===0&&(o=0);let i=s>o,a=String(e),l=String(t),u=String(r);r=Math.max(Math.abs(r),1);let c=Rt(a)||Rt(l)||Rt(u),g=c?Math.max(a.length,l.length,u.length):0,p=c===!1&&Zs(e,t,n)===!1,b=n.transform||Ys(p);if(n.toRegex&&r===1)return Cr(et(e,g),et(t,g),!0,n);let _={negatives:[],positives:[]},m=$=>_[$<0?"negatives":"positives"].push(Math.abs($)),v=[],k=0;for(;i?s>=o:s<=o;)n.toRegex===!0&&r>1?m(s):v.push(Js(b(s,k),g,p)),s=i?s-r:s+r,k++;return n.toRegex===!0?r>1?eo(_,n,g):Rr(v,null,{wrap:!1,...n}):v},no=(e,t,r=1,n={})=>{if(!Ne(e)&&e.length>1||!Ne(t)&&t.length>1)return wr(e,t,n);let s=n.transform||(p=>String.fromCharCode(p)),o=`${e}`.charCodeAt(0),i=`${t}`.charCodeAt(0),a=o>i,l=Math.min(o,i),u=Math.max(o,i);if(n.toRegex&&r===1)return Cr(l,u,!1,n);let c=[],g=0;for(;a?o>=i:o<=i;)c.push(s(o,g)),o=a?o-r:o+r,g++;return n.toRegex===!0?Rr(c,null,{wrap:!1,options:n}):c},Je=(e,t,r,n={})=>{if(t==null&&Ct(e))return[e];if(!Ct(e)||!Ct(t))return wr(e,t,n);if(typeof r=="function")return Je(e,t,1,{transform:r});if(Er(r))return Je(e,t,0,r);let s={...n};return s.capture===!0&&(s.wrap=!0),r=r||s.step||1,Ne(r)?Ne(e)&&Ne(t)?ro(e,t,r,s):no(e,t,Math.max(Math.abs(r),1),s):r!=null&&!Er(r)?to(r,s):Je(e,t,1,r)};kr.exports=Je});var Nr=w((Qa,Ir)=>{"use strict";var so=At(),Or=Ye(),oo=(e,t={})=>{let r=(n,s={})=>{let o=Or.isInvalidBrace(s),i=n.invalid===!0&&t.escapeInvalid===!0,a=o===!0||i===!0,l=t.escapeInvalid===!0?"\\":"",u="";if(n.isOpen===!0)return l+n.value;if(n.isClose===!0)return console.log("node.isClose",l,n.value),l+n.value;if(n.type==="open")return a?l+n.value:"(";if(n.type==="close")return a?l+n.value:")";if(n.type==="comma")return n.prev.type==="comma"?"":a?n.value:"|";if(n.value)return n.value;if(n.nodes&&n.ranges>0){let c=Or.reduce(n.nodes),g=so(...c,{...t,wrap:!1,toRegex:!0,strictZeros:!0});if(g.length!==0)return c.length>1&&g.length>1?`(${g})`:g}if(n.nodes)for(let c of n.nodes)u+=r(c,n);return u};return r(e)};Ir.exports=oo});var Dr=w((Ya,Lr)=>{"use strict";var io=At(),Pr=Ze(),Ce=Ye(),xe=(e="",t="",r=!1)=>{let n=[];if(e=[].concat(e),t=[].concat(t),!t.length)return e;if(!e.length)return r?Ce.flatten(t).map(s=>`{${s}}`):t;for(let s of e)if(Array.isArray(s))for(let o of s)n.push(xe(o,t,r));else for(let o of t)r===!0&&typeof o=="string"&&(o=`{${o}}`),n.push(Array.isArray(o)?xe(s,o,r):s+o);return Ce.flatten(n)},ao=(e,t={})=>{let r=t.rangeLimit===void 0?1e3:t.rangeLimit,n=(s,o={})=>{s.queue=[];let i=o,a=o.queue;for(;i.type!=="brace"&&i.type!=="root"&&i.parent;)i=i.parent,a=i.queue;if(s.invalid||s.dollar){a.push(xe(a.pop(),Pr(s,t)));return}if(s.type==="brace"&&s.invalid!==!0&&s.nodes.length===2){a.push(xe(a.pop(),["{}"]));return}if(s.nodes&&s.ranges>0){let g=Ce.reduce(s.nodes);if(Ce.exceedsLimit(...g,t.step,r))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let p=io(...g,t);p.length===0&&(p=Pr(s,t)),a.push(xe(a.pop(),p)),s.nodes=[];return}let l=Ce.encloseBrace(s),u=s.queue,c=s;for(;c.type!=="brace"&&c.type!=="root"&&c.parent;)c=c.parent,u=c.queue;for(let g=0;g{"use strict";Br.exports={MAX_LENGTH:1e4,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:` +`,CHAR_NO_BREAK_SPACE:"\xA0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"}});var jr=w((Ja,Ur)=>{"use strict";var lo=Ze(),{MAX_LENGTH:Mr,CHAR_BACKSLASH:wt,CHAR_BACKTICK:uo,CHAR_COMMA:co,CHAR_DOT:fo,CHAR_LEFT_PARENTHESES:po,CHAR_RIGHT_PARENTHESES:ho,CHAR_LEFT_CURLY_BRACE:go,CHAR_RIGHT_CURLY_BRACE:mo,CHAR_LEFT_SQUARE_BRACKET:$r,CHAR_RIGHT_SQUARE_BRACKET:Fr,CHAR_DOUBLE_QUOTE:_o,CHAR_SINGLE_QUOTE:yo,CHAR_NO_BREAK_SPACE:xo,CHAR_ZERO_WIDTH_NOBREAK_SPACE:bo}=Hr(),So=(e,t={})=>{if(typeof e!="string")throw new TypeError("Expected a string");let r=t||{},n=typeof r.maxLength=="number"?Math.min(Mr,r.maxLength):Mr;if(e.length>n)throw new SyntaxError(`Input length (${e.length}), exceeds max characters (${n})`);let s={type:"root",input:e,nodes:[]},o=[s],i=s,a=s,l=0,u=e.length,c=0,g=0,p,b=()=>e[c++],_=m=>{if(m.type==="text"&&a.type==="dot"&&(a.type="text"),a&&a.type==="text"&&m.type==="text"){a.value+=m.value;return}return i.nodes.push(m),m.parent=i,m.prev=a,a=m,m};for(_({type:"bos"});c0){if(i.ranges>0){i.ranges=0;let m=i.nodes.shift();i.nodes=[m,{type:"text",value:lo(i)}]}_({type:"comma",value:p}),i.commas++;continue}if(p===fo&&g>0&&i.commas===0){let m=i.nodes;if(g===0||m.length===0){_({type:"text",value:p});continue}if(a.type==="dot"){if(i.range=[],a.value+=p,a.type="range",i.nodes.length!==3&&i.nodes.length!==5){i.invalid=!0,i.ranges=0,a.type="text";continue}i.ranges++,i.args=[];continue}if(a.type==="range"){m.pop();let v=m[m.length-1];v.value+=a.value+p,a=v,i.ranges--;continue}_({type:"dot",value:p});continue}_({type:"text",value:p})}do if(i=o.pop(),i.type!=="root"){i.nodes.forEach(k=>{k.nodes||(k.type==="open"&&(k.isOpen=!0),k.type==="close"&&(k.isClose=!0),k.nodes||(k.type="text"),k.invalid=!0)});let m=o[o.length-1],v=m.nodes.indexOf(i);m.nodes.splice(v,1,...i.nodes)}while(o.length>0);return _({type:"eos"}),s};Ur.exports=So});var Gr=w((el,Wr)=>{"use strict";var qr=Ze(),vo=Nr(),Eo=Dr(),To=jr(),z=(e,t={})=>{let r=[];if(Array.isArray(e))for(let n of e){let s=z.create(n,t);Array.isArray(s)?r.push(...s):r.push(s)}else r=[].concat(z.create(e,t));return t&&t.expand===!0&&t.nodupes===!0&&(r=[...new Set(r)]),r};z.parse=(e,t={})=>To(e,t);z.stringify=(e,t={})=>qr(typeof e=="string"?z.parse(e,t):e,t);z.compile=(e,t={})=>(typeof e=="string"&&(e=z.parse(e,t)),vo(e,t));z.expand=(e,t={})=>{typeof e=="string"&&(e=z.parse(e,t));let r=Eo(e,t);return t.noempty===!0&&(r=r.filter(Boolean)),t.nodupes===!0&&(r=[...new Set(r)]),r};z.create=(e,t={})=>e===""||e.length<3?[e]:t.expand!==!0?z.compile(e,t):z.expand(e,t);Wr.exports=z});var Pe=w((tl,Qr)=>{"use strict";var Co=E("path"),oe="\\\\/",Vr=`[^${oe}]`,ue="\\.",Ro="\\+",Ao="\\?",tt="\\/",wo="(?=.)",Kr="[^/]",kt=`(?:${tt}|$)`,Xr=`(?:^|${tt})`,Ot=`${ue}{1,2}${kt}`,ko=`(?!${ue})`,Oo=`(?!${Xr}${Ot})`,Io=`(?!${ue}{0,1}${kt})`,No=`(?!${Ot})`,Po=`[^.${tt}]`,Lo=`${Kr}*?`,zr={DOT_LITERAL:ue,PLUS_LITERAL:Ro,QMARK_LITERAL:Ao,SLASH_LITERAL:tt,ONE_CHAR:wo,QMARK:Kr,END_ANCHOR:kt,DOTS_SLASH:Ot,NO_DOT:ko,NO_DOTS:Oo,NO_DOT_SLASH:Io,NO_DOTS_SLASH:No,QMARK_NO_DOT:Po,STAR:Lo,START_ANCHOR:Xr},Do={...zr,SLASH_LITERAL:`[${oe}]`,QMARK:Vr,STAR:`${Vr}*?`,DOTS_SLASH:`${ue}{1,2}(?:[${oe}]|$)`,NO_DOT:`(?!${ue})`,NO_DOTS:`(?!(?:^|[${oe}])${ue}{1,2}(?:[${oe}]|$))`,NO_DOT_SLASH:`(?!${ue}{0,1}(?:[${oe}]|$))`,NO_DOTS_SLASH:`(?!${ue}{1,2}(?:[${oe}]|$))`,QMARK_NO_DOT:`[^.${oe}]`,START_ANCHOR:`(?:^|[${oe}])`,END_ANCHOR:`(?:[${oe}]|$)`},Bo={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};Qr.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:Bo,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:Co.sep,extglobChars(e){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(e){return e===!0?Do:zr}}});var Le=w(K=>{"use strict";var Ho=E("path"),Mo=process.platform==="win32",{REGEX_BACKSLASH:$o,REGEX_REMOVE_BACKSLASH:Fo,REGEX_SPECIAL_CHARS:Uo,REGEX_SPECIAL_CHARS_GLOBAL:jo}=Pe();K.isObject=e=>e!==null&&typeof e=="object"&&!Array.isArray(e);K.hasRegexChars=e=>Uo.test(e);K.isRegexChar=e=>e.length===1&&K.hasRegexChars(e);K.escapeRegex=e=>e.replace(jo,"\\$1");K.toPosixSlashes=e=>e.replace($o,"/");K.removeBackslashes=e=>e.replace(Fo,t=>t==="\\"?"":t);K.supportsLookbehinds=()=>{let e=process.version.slice(1).split(".").map(Number);return e.length===3&&e[0]>=9||e[0]===8&&e[1]>=10};K.isWindows=e=>e&&typeof e.windows=="boolean"?e.windows:Mo===!0||Ho.sep==="\\";K.escapeLast=(e,t,r)=>{let n=e.lastIndexOf(t,r);return n===-1?e:e[n-1]==="\\"?K.escapeLast(e,t,n-1):`${e.slice(0,n)}\\${e.slice(n)}`};K.removePrefix=(e,t={})=>{let r=e;return r.startsWith("./")&&(r=r.slice(2),t.prefix="./"),r};K.wrapOutput=(e,t={},r={})=>{let n=r.contains?"":"^",s=r.contains?"":"$",o=`${n}(?:${e})${s}`;return t.negated===!0&&(o=`(?:^(?!${o}).*$)`),o}});var sn=w((nl,nn)=>{"use strict";var Yr=Le(),{CHAR_ASTERISK:It,CHAR_AT:qo,CHAR_BACKWARD_SLASH:De,CHAR_COMMA:Wo,CHAR_DOT:Nt,CHAR_EXCLAMATION_MARK:Pt,CHAR_FORWARD_SLASH:rn,CHAR_LEFT_CURLY_BRACE:Lt,CHAR_LEFT_PARENTHESES:Dt,CHAR_LEFT_SQUARE_BRACKET:Go,CHAR_PLUS:Vo,CHAR_QUESTION_MARK:Zr,CHAR_RIGHT_CURLY_BRACE:Ko,CHAR_RIGHT_PARENTHESES:Jr,CHAR_RIGHT_SQUARE_BRACKET:Xo}=Pe(),en=e=>e===rn||e===De,tn=e=>{e.isPrefix!==!0&&(e.depth=e.isGlobstar?1/0:1)},zo=(e,t)=>{let r=t||{},n=e.length-1,s=r.parts===!0||r.scanToEnd===!0,o=[],i=[],a=[],l=e,u=-1,c=0,g=0,p=!1,b=!1,_=!1,m=!1,v=!1,k=!1,$=!1,O=!1,q=!1,B=!1,ee=0,F,S,R={value:"",depth:0,isGlob:!1},U=()=>u>=n,h=()=>l.charCodeAt(u+1),L=()=>(F=S,l.charCodeAt(++u));for(;u0&&(de=l.slice(0,c),l=l.slice(c),g-=c),I&&_===!0&&g>0?(I=l.slice(0,g),f=l.slice(g)):_===!0?(I="",f=l):I=l,I&&I!==""&&I!=="/"&&I!==l&&en(I.charCodeAt(I.length-1))&&(I=I.slice(0,-1)),r.unescape===!0&&(f&&(f=Yr.removeBackslashes(f)),I&&$===!0&&(I=Yr.removeBackslashes(I)));let d={prefix:de,input:e,start:c,base:I,glob:f,isBrace:p,isBracket:b,isGlob:_,isExtglob:m,isGlobstar:v,negated:O,negatedExtglob:q};if(r.tokens===!0&&(d.maxDepth=0,en(S)||i.push(R),d.tokens=i),r.parts===!0||r.tokens===!0){let G;for(let A=0;A{"use strict";var rt=Pe(),Q=Le(),{MAX_LENGTH:nt,POSIX_REGEX_SOURCE:Qo,REGEX_NON_SPECIAL_CHARS:Yo,REGEX_SPECIAL_CHARS_BACKREF:Zo,REPLACEMENTS:on}=rt,Jo=(e,t)=>{if(typeof t.expandRange=="function")return t.expandRange(...e,t);e.sort();let r=`[${e.join("-")}]`;try{new RegExp(r)}catch{return e.map(s=>Q.escapeRegex(s)).join("..")}return r},Re=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,Bt=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");e=on[e]||e;let r={...t},n=typeof r.maxLength=="number"?Math.min(nt,r.maxLength):nt,s=e.length;if(s>n)throw new SyntaxError(`Input length: ${s}, exceeds maximum allowed length: ${n}`);let o={type:"bos",value:"",output:r.prepend||""},i=[o],a=r.capture?"":"?:",l=Q.isWindows(t),u=rt.globChars(l),c=rt.extglobChars(u),{DOT_LITERAL:g,PLUS_LITERAL:p,SLASH_LITERAL:b,ONE_CHAR:_,DOTS_SLASH:m,NO_DOT:v,NO_DOT_SLASH:k,NO_DOTS_SLASH:$,QMARK:O,QMARK_NO_DOT:q,STAR:B,START_ANCHOR:ee}=u,F=x=>`(${a}(?:(?!${ee}${x.dot?m:g}).)*?)`,S=r.dot?"":v,R=r.dot?O:q,U=r.bash===!0?F(r):B;r.capture&&(U=`(${U})`),typeof r.noext=="boolean"&&(r.noextglob=r.noext);let h={input:e,index:-1,start:0,dot:r.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:i};e=Q.removePrefix(e,h),s=e.length;let L=[],I=[],de=[],f=o,d,G=()=>h.index===s-1,A=h.peek=(x=1)=>e[h.index+x],re=h.advance=()=>e[++h.index]||"",ne=()=>e.slice(h.index+1),X=(x="",N=0)=>{h.consumed+=x,h.index+=N},Ke=x=>{h.output+=x.output!=null?x.output:x.value,X(x.value)},Ds=()=>{let x=1;for(;A()==="!"&&(A(2)!=="("||A(3)==="?");)re(),h.start++,x++;return x%2===0?!1:(h.negated=!0,h.start++,!0)},Xe=x=>{h[x]++,de.push(x)},_e=x=>{h[x]--,de.pop()},C=x=>{if(f.type==="globstar"){let N=h.braces>0&&(x.type==="comma"||x.type==="brace"),y=x.extglob===!0||L.length&&(x.type==="pipe"||x.type==="paren");x.type!=="slash"&&x.type!=="paren"&&!N&&!y&&(h.output=h.output.slice(0,-f.output.length),f.type="star",f.value="*",f.output=U,h.output+=f.output)}if(L.length&&x.type!=="paren"&&(L[L.length-1].inner+=x.value),(x.value||x.output)&&Ke(x),f&&f.type==="text"&&x.type==="text"){f.output=(f.output||f.value)+x.value,f.value+=x.value;return}x.prev=f,i.push(x),f=x},ze=(x,N)=>{let y={...c[N],conditions:1,inner:""};y.prev=f,y.parens=h.parens,y.output=h.output;let T=(r.capture?"(":"")+y.open;Xe("parens"),C({type:x,value:N,output:h.output?"":_}),C({type:"paren",extglob:!0,value:re(),output:T}),L.push(y)},Bs=x=>{let N=x.close+(r.capture?")":""),y;if(x.type==="negate"){let T=U;if(x.inner&&x.inner.length>1&&x.inner.includes("/")&&(T=F(r)),(T!==U||G()||/^\)+$/.test(ne()))&&(N=x.close=`)$))${T}`),x.inner.includes("*")&&(y=ne())&&/^\.[^\\/.]+$/.test(y)){let D=Bt(y,{...t,fastpaths:!1}).output;N=x.close=`)${D})${T})`}x.prev.type==="bos"&&(h.negatedExtglob=!0)}C({type:"paren",extglob:!0,value:d,output:N}),_e("parens")};if(r.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(e)){let x=!1,N=e.replace(Zo,(y,T,D,V,j,Et)=>V==="\\"?(x=!0,y):V==="?"?T?T+V+(j?O.repeat(j.length):""):Et===0?R+(j?O.repeat(j.length):""):O.repeat(D.length):V==="."?g.repeat(D.length):V==="*"?T?T+V+(j?U:""):U:T?y:`\\${y}`);return x===!0&&(r.unescape===!0?N=N.replace(/\\/g,""):N=N.replace(/\\+/g,y=>y.length%2===0?"\\\\":y?"\\":"")),N===e&&r.contains===!0?(h.output=e,h):(h.output=Q.wrapOutput(N,h,t),h)}for(;!G();){if(d=re(),d==="\0")continue;if(d==="\\"){let y=A();if(y==="/"&&r.bash!==!0||y==="."||y===";")continue;if(!y){d+="\\",C({type:"text",value:d});continue}let T=/^\\+/.exec(ne()),D=0;if(T&&T[0].length>2&&(D=T[0].length,h.index+=D,D%2!==0&&(d+="\\")),r.unescape===!0?d=re():d+=re(),h.brackets===0){C({type:"text",value:d});continue}}if(h.brackets>0&&(d!=="]"||f.value==="["||f.value==="[^")){if(r.posix!==!1&&d===":"){let y=f.value.slice(1);if(y.includes("[")&&(f.posix=!0,y.includes(":"))){let T=f.value.lastIndexOf("["),D=f.value.slice(0,T),V=f.value.slice(T+2),j=Qo[V];if(j){f.value=D+j,h.backtrack=!0,re(),!o.output&&i.indexOf(f)===1&&(o.output=_);continue}}}(d==="["&&A()!==":"||d==="-"&&A()==="]")&&(d=`\\${d}`),d==="]"&&(f.value==="["||f.value==="[^")&&(d=`\\${d}`),r.posix===!0&&d==="!"&&f.value==="["&&(d="^"),f.value+=d,Ke({value:d});continue}if(h.quotes===1&&d!=='"'){d=Q.escapeRegex(d),f.value+=d,Ke({value:d});continue}if(d==='"'){h.quotes=h.quotes===1?0:1,r.keepQuotes===!0&&C({type:"text",value:d});continue}if(d==="("){Xe("parens"),C({type:"paren",value:d});continue}if(d===")"){if(h.parens===0&&r.strictBrackets===!0)throw new SyntaxError(Re("opening","("));let y=L[L.length-1];if(y&&h.parens===y.parens+1){Bs(L.pop());continue}C({type:"paren",value:d,output:h.parens?")":"\\)"}),_e("parens");continue}if(d==="["){if(r.nobracket===!0||!ne().includes("]")){if(r.nobracket!==!0&&r.strictBrackets===!0)throw new SyntaxError(Re("closing","]"));d=`\\${d}`}else Xe("brackets");C({type:"bracket",value:d});continue}if(d==="]"){if(r.nobracket===!0||f&&f.type==="bracket"&&f.value.length===1){C({type:"text",value:d,output:`\\${d}`});continue}if(h.brackets===0){if(r.strictBrackets===!0)throw new SyntaxError(Re("opening","["));C({type:"text",value:d,output:`\\${d}`});continue}_e("brackets");let y=f.value.slice(1);if(f.posix!==!0&&y[0]==="^"&&!y.includes("/")&&(d=`/${d}`),f.value+=d,Ke({value:d}),r.literalBrackets===!1||Q.hasRegexChars(y))continue;let T=Q.escapeRegex(f.value);if(h.output=h.output.slice(0,-f.value.length),r.literalBrackets===!0){h.output+=T,f.value=T;continue}f.value=`(${a}${T}|${f.value})`,h.output+=f.value;continue}if(d==="{"&&r.nobrace!==!0){Xe("braces");let y={type:"brace",value:d,output:"(",outputIndex:h.output.length,tokensIndex:h.tokens.length};I.push(y),C(y);continue}if(d==="}"){let y=I[I.length-1];if(r.nobrace===!0||!y){C({type:"text",value:d,output:d});continue}let T=")";if(y.dots===!0){let D=i.slice(),V=[];for(let j=D.length-1;j>=0&&(i.pop(),D[j].type!=="brace");j--)D[j].type!=="dots"&&V.unshift(D[j].value);T=Jo(V,r),h.backtrack=!0}if(y.comma!==!0&&y.dots!==!0){let D=h.output.slice(0,y.outputIndex),V=h.tokens.slice(y.tokensIndex);y.value=y.output="\\{",d=T="\\}",h.output=D;for(let j of V)h.output+=j.output||j.value}C({type:"brace",value:d,output:T}),_e("braces"),I.pop();continue}if(d==="|"){L.length>0&&L[L.length-1].conditions++,C({type:"text",value:d});continue}if(d===","){let y=d,T=I[I.length-1];T&&de[de.length-1]==="braces"&&(T.comma=!0,y="|"),C({type:"comma",value:d,output:y});continue}if(d==="/"){if(f.type==="dot"&&h.index===h.start+1){h.start=h.index+1,h.consumed="",h.output="",i.pop(),f=o;continue}C({type:"slash",value:d,output:b});continue}if(d==="."){if(h.braces>0&&f.type==="dot"){f.value==="."&&(f.output=g);let y=I[I.length-1];f.type="dots",f.output+=d,f.value+=d,y.dots=!0;continue}if(h.braces+h.parens===0&&f.type!=="bos"&&f.type!=="slash"){C({type:"text",value:d,output:g});continue}C({type:"dot",value:d,output:g});continue}if(d==="?"){if(!(f&&f.value==="(")&&r.noextglob!==!0&&A()==="("&&A(2)!=="?"){ze("qmark",d);continue}if(f&&f.type==="paren"){let T=A(),D=d;if(T==="<"&&!Q.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(f.value==="("&&!/[!=<:]/.test(T)||T==="<"&&!/<([!=]|\w+>)/.test(ne()))&&(D=`\\${d}`),C({type:"text",value:d,output:D});continue}if(r.dot!==!0&&(f.type==="slash"||f.type==="bos")){C({type:"qmark",value:d,output:q});continue}C({type:"qmark",value:d,output:O});continue}if(d==="!"){if(r.noextglob!==!0&&A()==="("&&(A(2)!=="?"||!/[!=<:]/.test(A(3)))){ze("negate",d);continue}if(r.nonegate!==!0&&h.index===0){Ds();continue}}if(d==="+"){if(r.noextglob!==!0&&A()==="("&&A(2)!=="?"){ze("plus",d);continue}if(f&&f.value==="("||r.regex===!1){C({type:"plus",value:d,output:p});continue}if(f&&(f.type==="bracket"||f.type==="paren"||f.type==="brace")||h.parens>0){C({type:"plus",value:d});continue}C({type:"plus",value:p});continue}if(d==="@"){if(r.noextglob!==!0&&A()==="("&&A(2)!=="?"){C({type:"at",extglob:!0,value:d,output:""});continue}C({type:"text",value:d});continue}if(d!=="*"){(d==="$"||d==="^")&&(d=`\\${d}`);let y=Yo.exec(ne());y&&(d+=y[0],h.index+=y[0].length),C({type:"text",value:d});continue}if(f&&(f.type==="globstar"||f.star===!0)){f.type="star",f.star=!0,f.value+=d,f.output=U,h.backtrack=!0,h.globstar=!0,X(d);continue}let x=ne();if(r.noextglob!==!0&&/^\([^?]/.test(x)){ze("star",d);continue}if(f.type==="star"){if(r.noglobstar===!0){X(d);continue}let y=f.prev,T=y.prev,D=y.type==="slash"||y.type==="bos",V=T&&(T.type==="star"||T.type==="globstar");if(r.bash===!0&&(!D||x[0]&&x[0]!=="/")){C({type:"star",value:d,output:""});continue}let j=h.braces>0&&(y.type==="comma"||y.type==="brace"),Et=L.length&&(y.type==="pipe"||y.type==="paren");if(!D&&y.type!=="paren"&&!j&&!Et){C({type:"star",value:d,output:""});continue}for(;x.slice(0,3)==="/**";){let Qe=e[h.index+4];if(Qe&&Qe!=="/")break;x=x.slice(3),X("/**",3)}if(y.type==="bos"&&G()){f.type="globstar",f.value+=d,f.output=F(r),h.output=f.output,h.globstar=!0,X(d);continue}if(y.type==="slash"&&y.prev.type!=="bos"&&!V&&G()){h.output=h.output.slice(0,-(y.output+f.output).length),y.output=`(?:${y.output}`,f.type="globstar",f.output=F(r)+(r.strictSlashes?")":"|$)"),f.value+=d,h.globstar=!0,h.output+=y.output+f.output,X(d);continue}if(y.type==="slash"&&y.prev.type!=="bos"&&x[0]==="/"){let Qe=x[1]!==void 0?"|$":"";h.output=h.output.slice(0,-(y.output+f.output).length),y.output=`(?:${y.output}`,f.type="globstar",f.output=`${F(r)}${b}|${b}${Qe})`,f.value+=d,h.output+=y.output+f.output,h.globstar=!0,X(d+re()),C({type:"slash",value:"/",output:""});continue}if(y.type==="bos"&&x[0]==="/"){f.type="globstar",f.value+=d,f.output=`(?:^|${b}|${F(r)}${b})`,h.output=f.output,h.globstar=!0,X(d+re()),C({type:"slash",value:"/",output:""});continue}h.output=h.output.slice(0,-f.output.length),f.type="globstar",f.output=F(r),f.value+=d,h.output+=f.output,h.globstar=!0,X(d);continue}let N={type:"star",value:d,output:U};if(r.bash===!0){N.output=".*?",(f.type==="bos"||f.type==="slash")&&(N.output=S+N.output),C(N);continue}if(f&&(f.type==="bracket"||f.type==="paren")&&r.regex===!0){N.output=d,C(N);continue}(h.index===h.start||f.type==="slash"||f.type==="dot")&&(f.type==="dot"?(h.output+=k,f.output+=k):r.dot===!0?(h.output+=$,f.output+=$):(h.output+=S,f.output+=S),A()!=="*"&&(h.output+=_,f.output+=_)),C(N)}for(;h.brackets>0;){if(r.strictBrackets===!0)throw new SyntaxError(Re("closing","]"));h.output=Q.escapeLast(h.output,"["),_e("brackets")}for(;h.parens>0;){if(r.strictBrackets===!0)throw new SyntaxError(Re("closing",")"));h.output=Q.escapeLast(h.output,"("),_e("parens")}for(;h.braces>0;){if(r.strictBrackets===!0)throw new SyntaxError(Re("closing","}"));h.output=Q.escapeLast(h.output,"{"),_e("braces")}if(r.strictSlashes!==!0&&(f.type==="star"||f.type==="bracket")&&C({type:"maybe_slash",value:"",output:`${b}?`}),h.backtrack===!0){h.output="";for(let x of h.tokens)h.output+=x.output!=null?x.output:x.value,x.suffix&&(h.output+=x.suffix)}return h};Bt.fastpaths=(e,t)=>{let r={...t},n=typeof r.maxLength=="number"?Math.min(nt,r.maxLength):nt,s=e.length;if(s>n)throw new SyntaxError(`Input length: ${s}, exceeds maximum allowed length: ${n}`);e=on[e]||e;let o=Q.isWindows(t),{DOT_LITERAL:i,SLASH_LITERAL:a,ONE_CHAR:l,DOTS_SLASH:u,NO_DOT:c,NO_DOTS:g,NO_DOTS_SLASH:p,STAR:b,START_ANCHOR:_}=rt.globChars(o),m=r.dot?g:c,v=r.dot?p:c,k=r.capture?"":"?:",$={negated:!1,prefix:""},O=r.bash===!0?".*?":b;r.capture&&(O=`(${O})`);let q=S=>S.noglobstar===!0?O:`(${k}(?:(?!${_}${S.dot?u:i}).)*?)`,B=S=>{switch(S){case"*":return`${m}${l}${O}`;case".*":return`${i}${l}${O}`;case"*.*":return`${m}${O}${i}${l}${O}`;case"*/*":return`${m}${O}${a}${l}${v}${O}`;case"**":return m+q(r);case"**/*":return`(?:${m}${q(r)}${a})?${v}${l}${O}`;case"**/*.*":return`(?:${m}${q(r)}${a})?${v}${O}${i}${l}${O}`;case"**/.*":return`(?:${m}${q(r)}${a})?${i}${l}${O}`;default:{let R=/^(.*?)\.(\w+)$/.exec(S);if(!R)return;let U=B(R[1]);return U?U+i+R[2]:void 0}}},ee=Q.removePrefix(e,$),F=B(ee);return F&&r.strictSlashes!==!0&&(F+=`${a}?`),F};an.exports=Bt});var cn=w((ol,un)=>{"use strict";var ei=E("path"),ti=sn(),Ht=ln(),Mt=Le(),ri=Pe(),ni=e=>e&&typeof e=="object"&&!Array.isArray(e),H=(e,t,r=!1)=>{if(Array.isArray(e)){let c=e.map(p=>H(p,t,r));return p=>{for(let b of c){let _=b(p);if(_)return _}return!1}}let n=ni(e)&&e.tokens&&e.input;if(e===""||typeof e!="string"&&!n)throw new TypeError("Expected pattern to be a non-empty string");let s=t||{},o=Mt.isWindows(t),i=n?H.compileRe(e,t):H.makeRe(e,t,!1,!0),a=i.state;delete i.state;let l=()=>!1;if(s.ignore){let c={...t,ignore:null,onMatch:null,onResult:null};l=H(s.ignore,c,r)}let u=(c,g=!1)=>{let{isMatch:p,match:b,output:_}=H.test(c,i,t,{glob:e,posix:o}),m={glob:e,state:a,regex:i,posix:o,input:c,output:_,match:b,isMatch:p};return typeof s.onResult=="function"&&s.onResult(m),p===!1?(m.isMatch=!1,g?m:!1):l(c)?(typeof s.onIgnore=="function"&&s.onIgnore(m),m.isMatch=!1,g?m:!1):(typeof s.onMatch=="function"&&s.onMatch(m),g?m:!0)};return r&&(u.state=a),u};H.test=(e,t,r,{glob:n,posix:s}={})=>{if(typeof e!="string")throw new TypeError("Expected input to be a string");if(e==="")return{isMatch:!1,output:""};let o=r||{},i=o.format||(s?Mt.toPosixSlashes:null),a=e===n,l=a&&i?i(e):e;return a===!1&&(l=i?i(e):e,a=l===n),(a===!1||o.capture===!0)&&(o.matchBase===!0||o.basename===!0?a=H.matchBase(e,t,r,s):a=t.exec(l)),{isMatch:!!a,match:a,output:l}};H.matchBase=(e,t,r,n=Mt.isWindows(r))=>(t instanceof RegExp?t:H.makeRe(t,r)).test(ei.basename(e));H.isMatch=(e,t,r)=>H(t,r)(e);H.parse=(e,t)=>Array.isArray(e)?e.map(r=>H.parse(r,t)):Ht(e,{...t,fastpaths:!1});H.scan=(e,t)=>ti(e,t);H.compileRe=(e,t,r=!1,n=!1)=>{if(r===!0)return e.output;let s=t||{},o=s.contains?"":"^",i=s.contains?"":"$",a=`${o}(?:${e.output})${i}`;e&&e.negated===!0&&(a=`^(?!${a}).*$`);let l=H.toRegex(a,t);return n===!0&&(l.state=e),l};H.makeRe=(e,t={},r=!1,n=!1)=>{if(!e||typeof e!="string")throw new TypeError("Expected a non-empty string");let s={negated:!1,fastpaths:!0};return t.fastpaths!==!1&&(e[0]==="."||e[0]==="*")&&(s.output=Ht.fastpaths(e,t)),s.output||(s=Ht(e,t)),H.compileRe(s,t,r,n)};H.toRegex=(e,t)=>{try{let r=t||{};return new RegExp(e,r.flags||(r.nocase?"i":""))}catch(r){if(t&&t.debug===!0)throw r;return/$^/}};H.constants=ri;un.exports=H});var pn=w((il,fn)=>{"use strict";fn.exports=cn()});var yn=w((al,_n)=>{"use strict";var hn=E("util"),gn=Gr(),ie=pn(),$t=Le(),dn=e=>e===""||e==="./",mn=e=>{let t=e.indexOf("{");return t>-1&&e.indexOf("}",t)>-1},P=(e,t,r)=>{t=[].concat(t),e=[].concat(e);let n=new Set,s=new Set,o=new Set,i=0,a=c=>{o.add(c.output),r&&r.onResult&&r.onResult(c)};for(let c=0;c!n.has(c));if(r&&u.length===0){if(r.failglob===!0)throw new Error(`No matches found for "${t.join(", ")}"`);if(r.nonull===!0||r.nullglob===!0)return r.unescape?t.map(c=>c.replace(/\\/g,"")):t}return u};P.match=P;P.matcher=(e,t)=>ie(e,t);P.isMatch=(e,t,r)=>ie(t,r)(e);P.any=P.isMatch;P.not=(e,t,r={})=>{t=[].concat(t).map(String);let n=new Set,s=[],o=a=>{r.onResult&&r.onResult(a),s.push(a.output)},i=new Set(P(e,t,{...r,onResult:o}));for(let a of s)i.has(a)||n.add(a);return[...n]};P.contains=(e,t,r)=>{if(typeof e!="string")throw new TypeError(`Expected a string: "${hn.inspect(e)}"`);if(Array.isArray(t))return t.some(n=>P.contains(e,n,r));if(typeof t=="string"){if(dn(e)||dn(t))return!1;if(e.includes(t)||e.startsWith("./")&&e.slice(2).includes(t))return!0}return P.isMatch(e,t,{...r,contains:!0})};P.matchKeys=(e,t,r)=>{if(!$t.isObject(e))throw new TypeError("Expected the first argument to be an object");let n=P(Object.keys(e),t,r),s={};for(let o of n)s[o]=e[o];return s};P.some=(e,t,r)=>{let n=[].concat(e);for(let s of[].concat(t)){let o=ie(String(s),r);if(n.some(i=>o(i)))return!0}return!1};P.every=(e,t,r)=>{let n=[].concat(e);for(let s of[].concat(t)){let o=ie(String(s),r);if(!n.every(i=>o(i)))return!1}return!0};P.all=(e,t,r)=>{if(typeof e!="string")throw new TypeError(`Expected a string: "${hn.inspect(e)}"`);return[].concat(t).every(n=>ie(n,r)(e))};P.capture=(e,t,r)=>{let n=$t.isWindows(r),o=ie.makeRe(String(e),{...r,capture:!0}).exec(n?$t.toPosixSlashes(t):t);if(o)return o.slice(1).map(i=>i===void 0?"":i)};P.makeRe=(...e)=>ie.makeRe(...e);P.scan=(...e)=>ie.scan(...e);P.parse=(e,t)=>{let r=[];for(let n of[].concat(e||[]))for(let s of gn(String(n),t))r.push(ie.parse(s,t));return r};P.braces=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");return t&&t.nobrace===!0||!mn(e)?[e]:gn(e,t)};P.braceExpand=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");return P.braces(e,{...t,expand:!0})};P.hasBraces=mn;_n.exports=P});var vn=w((fl,Sn)=>{"use strict";var{Duplex:ii}=E("stream");function xn(e){e.emit("close")}function ai(){!this.destroyed&&this._writableState.finished&&this.destroy()}function bn(e){this.removeListener("error",bn),this.destroy(),this.listenerCount("error")===0&&this.emit("error",e)}function li(e,t){let r=!0,n=new ii({...t,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return e.on("message",function(o,i){let a=!i&&n._readableState.objectMode?o.toString():o;n.push(a)||e.pause()}),e.once("error",function(o){n.destroyed||(r=!1,n.destroy(o))}),e.once("close",function(){n.destroyed||n.push(null)}),n._destroy=function(s,o){if(e.readyState===e.CLOSED){o(s),process.nextTick(xn,n);return}let i=!1;e.once("error",function(l){i=!0,o(l)}),e.once("close",function(){i||o(s),process.nextTick(xn,n)}),r&&e.terminate()},n._final=function(s){if(e.readyState===e.CONNECTING){e.once("open",function(){n._final(s)});return}e._socket!==null&&(e._socket._writableState.finished?(s(),n._readableState.endEmitted&&n.destroy()):(e._socket.once("finish",function(){s()}),e.close()))},n._read=function(){e.isPaused&&e.resume()},n._write=function(s,o,i){if(e.readyState===e.CONNECTING){e.once("open",function(){n._write(s,o,i)});return}e.send(s,i)},n.on("end",ai),n.on("error",bn),n}Sn.exports=li});var he=w((pl,En)=>{"use strict";En.exports={BINARY_TYPES:["nodebuffer","arraybuffer","fragments"],EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}}});var Be=w((dl,st)=>{"use strict";var{EMPTY_BUFFER:ui}=he(),Ft=Buffer[Symbol.species];function ci(e,t){if(e.length===0)return ui;if(e.length===1)return e[0];let r=Buffer.allocUnsafe(t),n=0;for(let s=0;s{"use strict";var Rn=Symbol("kDone"),jt=Symbol("kRun"),qt=class{constructor(t){this[Rn]=()=>{this.pending--,this[jt]()},this.concurrency=t||1/0,this.jobs=[],this.pending=0}add(t){this.jobs.push(t),this[jt]()}[jt](){if(this.pending!==this.concurrency&&this.jobs.length){let t=this.jobs.shift();this.pending++,t(this[Rn])}}};An.exports=qt});var $e=w((gl,Nn)=>{"use strict";var He=E("zlib"),kn=Be(),pi=wn(),{kStatusCode:On}=he(),di=Buffer[Symbol.species],hi=Buffer.from([0,0,255,255]),at=Symbol("permessage-deflate"),ce=Symbol("total-length"),Me=Symbol("callback"),ge=Symbol("buffers"),it=Symbol("error"),ot,Wt=class{constructor(t,r,n){if(this._maxPayload=n|0,this._options=t||{},this._threshold=this._options.threshold!==void 0?this._options.threshold:1024,this._isServer=!!r,this._deflate=null,this._inflate=null,this.params=null,!ot){let s=this._options.concurrencyLimit!==void 0?this._options.concurrencyLimit:10;ot=new pi(s)}}static get extensionName(){return"permessage-deflate"}offer(){let t={};return this._options.serverNoContextTakeover&&(t.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(t.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(t.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?t.client_max_window_bits=this._options.clientMaxWindowBits:this._options.clientMaxWindowBits==null&&(t.client_max_window_bits=!0),t}accept(t){return t=this.normalizeParams(t),this.params=this._isServer?this.acceptAsServer(t):this.acceptAsClient(t),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){let t=this._deflate[Me];this._deflate.close(),this._deflate=null,t&&t(new Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(t){let r=this._options,n=t.find(s=>!(r.serverNoContextTakeover===!1&&s.server_no_context_takeover||s.server_max_window_bits&&(r.serverMaxWindowBits===!1||typeof r.serverMaxWindowBits=="number"&&r.serverMaxWindowBits>s.server_max_window_bits)||typeof r.clientMaxWindowBits=="number"&&!s.client_max_window_bits));if(!n)throw new Error("None of the extension offers can be accepted");return r.serverNoContextTakeover&&(n.server_no_context_takeover=!0),r.clientNoContextTakeover&&(n.client_no_context_takeover=!0),typeof r.serverMaxWindowBits=="number"&&(n.server_max_window_bits=r.serverMaxWindowBits),typeof r.clientMaxWindowBits=="number"?n.client_max_window_bits=r.clientMaxWindowBits:(n.client_max_window_bits===!0||r.clientMaxWindowBits===!1)&&delete n.client_max_window_bits,n}acceptAsClient(t){let r=t[0];if(this._options.clientNoContextTakeover===!1&&r.client_no_context_takeover)throw new Error('Unexpected parameter "client_no_context_takeover"');if(!r.client_max_window_bits)typeof this._options.clientMaxWindowBits=="number"&&(r.client_max_window_bits=this._options.clientMaxWindowBits);else if(this._options.clientMaxWindowBits===!1||typeof this._options.clientMaxWindowBits=="number"&&r.client_max_window_bits>this._options.clientMaxWindowBits)throw new Error('Unexpected or invalid parameter "client_max_window_bits"');return r}normalizeParams(t){return t.forEach(r=>{Object.keys(r).forEach(n=>{let s=r[n];if(s.length>1)throw new Error(`Parameter "${n}" must have only a single value`);if(s=s[0],n==="client_max_window_bits"){if(s!==!0){let o=+s;if(!Number.isInteger(o)||o<8||o>15)throw new TypeError(`Invalid value for parameter "${n}": ${s}`);s=o}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${n}": ${s}`)}else if(n==="server_max_window_bits"){let o=+s;if(!Number.isInteger(o)||o<8||o>15)throw new TypeError(`Invalid value for parameter "${n}": ${s}`);s=o}else if(n==="client_no_context_takeover"||n==="server_no_context_takeover"){if(s!==!0)throw new TypeError(`Invalid value for parameter "${n}": ${s}`)}else throw new Error(`Unknown parameter "${n}"`);r[n]=s})}),t}decompress(t,r,n){ot.add(s=>{this._decompress(t,r,(o,i)=>{s(),n(o,i)})})}compress(t,r,n){ot.add(s=>{this._compress(t,r,(o,i)=>{s(),n(o,i)})})}_decompress(t,r,n){let s=this._isServer?"client":"server";if(!this._inflate){let o=`${s}_max_window_bits`,i=typeof this.params[o]!="number"?He.Z_DEFAULT_WINDOWBITS:this.params[o];this._inflate=He.createInflateRaw({...this._options.zlibInflateOptions,windowBits:i}),this._inflate[at]=this,this._inflate[ce]=0,this._inflate[ge]=[],this._inflate.on("error",mi),this._inflate.on("data",In)}this._inflate[Me]=n,this._inflate.write(t),r&&this._inflate.write(hi),this._inflate.flush(()=>{let o=this._inflate[it];if(o){this._inflate.close(),this._inflate=null,n(o);return}let i=kn.concat(this._inflate[ge],this._inflate[ce]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[ce]=0,this._inflate[ge]=[],r&&this.params[`${s}_no_context_takeover`]&&this._inflate.reset()),n(null,i)})}_compress(t,r,n){let s=this._isServer?"server":"client";if(!this._deflate){let o=`${s}_max_window_bits`,i=typeof this.params[o]!="number"?He.Z_DEFAULT_WINDOWBITS:this.params[o];this._deflate=He.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:i}),this._deflate[ce]=0,this._deflate[ge]=[],this._deflate.on("data",gi)}this._deflate[Me]=n,this._deflate.write(t),this._deflate.flush(He.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let o=kn.concat(this._deflate[ge],this._deflate[ce]);r&&(o=new di(o.buffer,o.byteOffset,o.length-4)),this._deflate[Me]=null,this._deflate[ce]=0,this._deflate[ge]=[],r&&this.params[`${s}_no_context_takeover`]&&this._deflate.reset(),n(null,o)})}};Nn.exports=Wt;function gi(e){this[ge].push(e),this[ce]+=e.length}function In(e){if(this[ce]+=e.length,this[at]._maxPayload<1||this[ce]<=this[at]._maxPayload){this[ge].push(e);return}this[it]=new RangeError("Max payload size exceeded"),this[it].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[it][On]=1009,this.removeListener("data",In),this.reset()}function mi(e){this[at]._inflate=null,e[On]=1007,this[Me](e)}});var Fe=w((ml,lt)=>{"use strict";var{isUtf8:Pn}=E("buffer"),_i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0];function yi(e){return e>=1e3&&e<=1014&&e!==1004&&e!==1005&&e!==1006||e>=3e3&&e<=4999}function Gt(e){let t=e.length,r=0;for(;r=t||(e[r+1]&192)!==128||(e[r+2]&192)!==128||e[r]===224&&(e[r+1]&224)===128||e[r]===237&&(e[r+1]&224)===160)return!1;r+=3}else if((e[r]&248)===240){if(r+3>=t||(e[r+1]&192)!==128||(e[r+2]&192)!==128||(e[r+3]&192)!==128||e[r]===240&&(e[r+1]&240)===128||e[r]===244&&e[r+1]>143||e[r]>244)return!1;r+=4}else return!1;return!0}lt.exports={isValidStatusCode:yi,isValidUTF8:Gt,tokenChars:_i};if(Pn)lt.exports.isValidUTF8=function(e){return e.length<24?Gt(e):Pn(e)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let e=E("utf-8-validate");lt.exports.isValidUTF8=function(t){return t.length<32?Gt(t):e(t)}}catch{}});var Qt=w((_l,Fn)=>{"use strict";var{Writable:xi}=E("stream"),Ln=$e(),{BINARY_TYPES:bi,EMPTY_BUFFER:Dn,kStatusCode:Si,kWebSocket:vi}=he(),{concat:Vt,toArrayBuffer:Ei,unmask:Ti}=Be(),{isValidStatusCode:Ci,isValidUTF8:Bn}=Fe(),ut=Buffer[Symbol.species],J=0,Hn=1,Mn=2,$n=3,Kt=4,Xt=5,ct=6,zt=class extends xi{constructor(t={}){super(),this._allowSynchronousEvents=t.allowSynchronousEvents!==void 0?t.allowSynchronousEvents:!0,this._binaryType=t.binaryType||bi[0],this._extensions=t.extensions||{},this._isServer=!!t.isServer,this._maxPayload=t.maxPayload|0,this._skipUTF8Validation=!!t.skipUTF8Validation,this[vi]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._fragments=[],this._errored=!1,this._loop=!1,this._state=J}_write(t,r,n){if(this._opcode===8&&this._state==J)return n();this._bufferedBytes+=t.length,this._buffers.push(t),this.startLoop(n)}consume(t){if(this._bufferedBytes-=t,t===this._buffers[0].length)return this._buffers.shift();if(t=n.length?r.set(this._buffers.shift(),s):(r.set(new Uint8Array(n.buffer,n.byteOffset,t),s),this._buffers[0]=new ut(n.buffer,n.byteOffset+t,n.length-t)),t-=n.length}while(t>0);return r}startLoop(t){this._loop=!0;do switch(this._state){case J:this.getInfo(t);break;case Hn:this.getPayloadLength16(t);break;case Mn:this.getPayloadLength64(t);break;case $n:this.getMask();break;case Kt:this.getData(t);break;case Xt:case ct:this._loop=!1;return}while(this._loop);this._errored||t()}getInfo(t){if(this._bufferedBytes<2){this._loop=!1;return}let r=this.consume(2);if(r[0]&48){let s=this.createError(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3");t(s);return}let n=(r[0]&64)===64;if(n&&!this._extensions[Ln.extensionName]){let s=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");t(s);return}if(this._fin=(r[0]&128)===128,this._opcode=r[0]&15,this._payloadLength=r[1]&127,this._opcode===0){if(n){let s=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");t(s);return}if(!this._fragmented){let s=this.createError(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE");t(s);return}this._opcode=this._fragmented}else if(this._opcode===1||this._opcode===2){if(this._fragmented){let s=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");t(s);return}this._compressed=n}else if(this._opcode>7&&this._opcode<11){if(!this._fin){let s=this.createError(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN");t(s);return}if(n){let s=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");t(s);return}if(this._payloadLength>125||this._opcode===8&&this._payloadLength===1){let s=this.createError(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH");t(s);return}}else{let s=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");t(s);return}if(!this._fin&&!this._fragmented&&(this._fragmented=this._opcode),this._masked=(r[1]&128)===128,this._isServer){if(!this._masked){let s=this.createError(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK");t(s);return}}else if(this._masked){let s=this.createError(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK");t(s);return}this._payloadLength===126?this._state=Hn:this._payloadLength===127?this._state=Mn:this.haveLength(t)}getPayloadLength16(t){if(this._bufferedBytes<2){this._loop=!1;return}this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength(t)}getPayloadLength64(t){if(this._bufferedBytes<8){this._loop=!1;return}let r=this.consume(8),n=r.readUInt32BE(0);if(n>Math.pow(2,21)-1){let s=this.createError(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH");t(s);return}this._payloadLength=n*Math.pow(2,32)+r.readUInt32BE(4),this.haveLength(t)}haveLength(t){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0)){let r=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");t(r);return}this._masked?this._state=$n:this._state=Kt}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=Kt}getData(t){let r=Dn;if(this._payloadLength){if(this._bufferedBytes7){this.controlMessage(r,t);return}if(this._compressed){this._state=Xt,this.decompress(r,t);return}r.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(r)),this.dataMessage(t)}decompress(t,r){this._extensions[Ln.extensionName].decompress(t,this._fin,(s,o)=>{if(s)return r(s);if(o.length){if(this._messageLength+=o.length,this._messageLength>this._maxPayload&&this._maxPayload>0){let i=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");r(i);return}this._fragments.push(o)}this.dataMessage(r),this._state===J&&this.startLoop(r)})}dataMessage(t){if(!this._fin){this._state=J;return}let r=this._messageLength,n=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],this._opcode===2){let s;this._binaryType==="nodebuffer"?s=Vt(n,r):this._binaryType==="arraybuffer"?s=Ei(Vt(n,r)):s=n,this._allowSynchronousEvents?(this.emit("message",s,!0),this._state=J):(this._state=ct,setImmediate(()=>{this.emit("message",s,!0),this._state=J,this.startLoop(t)}))}else{let s=Vt(n,r);if(!this._skipUTF8Validation&&!Bn(s)){let o=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");t(o);return}this._state===Xt||this._allowSynchronousEvents?(this.emit("message",s,!1),this._state=J):(this._state=ct,setImmediate(()=>{this.emit("message",s,!1),this._state=J,this.startLoop(t)}))}}controlMessage(t,r){if(this._opcode===8){if(t.length===0)this._loop=!1,this.emit("conclude",1005,Dn),this.end();else{let n=t.readUInt16BE(0);if(!Ci(n)){let o=this.createError(RangeError,`invalid status code ${n}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");r(o);return}let s=new ut(t.buffer,t.byteOffset+2,t.length-2);if(!this._skipUTF8Validation&&!Bn(s)){let o=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");r(o);return}this._loop=!1,this.emit("conclude",n,s),this.end()}this._state=J;return}this._allowSynchronousEvents?(this.emit(this._opcode===9?"ping":"pong",t),this._state=J):(this._state=ct,setImmediate(()=>{this.emit(this._opcode===9?"ping":"pong",t),this._state=J,this.startLoop(r)}))}createError(t,r,n,s,o){this._loop=!1,this._errored=!0;let i=new t(n?`Invalid WebSocket frame: ${r}`:r);return Error.captureStackTrace(i,this.createError),i.code=o,i[Si]=s,i}};Fn.exports=zt});var Zt=w((xl,qn)=>{"use strict";var{Duplex:yl}=E("stream"),{randomFillSync:Ri}=E("crypto"),Un=$e(),{EMPTY_BUFFER:Ai}=he(),{isValidStatusCode:wi}=Fe(),{mask:jn,toBuffer:Ae}=Be(),te=Symbol("kByteLength"),ki=Buffer.alloc(4),ft=8*1024,be,we=ft,Yt=class e{constructor(t,r,n){this._extensions=r||{},n&&(this._generateMask=n,this._maskBuffer=Buffer.alloc(4)),this._socket=t,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._deflating=!1,this._queue=[]}static frame(t,r){let n,s=!1,o=2,i=!1;r.mask&&(n=r.maskBuffer||ki,r.generateMask?r.generateMask(n):(we===ft&&(be===void 0&&(be=Buffer.alloc(ft)),Ri(be,0,ft),we=0),n[0]=be[we++],n[1]=be[we++],n[2]=be[we++],n[3]=be[we++]),i=(n[0]|n[1]|n[2]|n[3])===0,o=6);let a;typeof t=="string"?(!r.mask||i)&&r[te]!==void 0?a=r[te]:(t=Buffer.from(t),a=t.length):(a=t.length,s=r.mask&&r.readOnly&&!i);let l=a;a>=65536?(o+=8,l=127):a>125&&(o+=2,l=126);let u=Buffer.allocUnsafe(s?a+o:o);return u[0]=r.fin?r.opcode|128:r.opcode,r.rsv1&&(u[0]|=64),u[1]=l,l===126?u.writeUInt16BE(a,2):l===127&&(u[2]=u[3]=0,u.writeUIntBE(a,4,6)),r.mask?(u[1]|=128,u[o-4]=n[0],u[o-3]=n[1],u[o-2]=n[2],u[o-1]=n[3],i?[u,t]:s?(jn(t,n,u,o,a),[u]):(jn(t,n,t,0,a),[u,t])):[u,t]}close(t,r,n,s){let o;if(t===void 0)o=Ai;else{if(typeof t!="number"||!wi(t))throw new TypeError("First argument must be a valid error code number");if(r===void 0||!r.length)o=Buffer.allocUnsafe(2),o.writeUInt16BE(t,0);else{let a=Buffer.byteLength(r);if(a>123)throw new RangeError("The message must not be greater than 123 bytes");o=Buffer.allocUnsafe(2+a),o.writeUInt16BE(t,0),typeof r=="string"?o.write(r,2):o.set(r,2)}}let i={[te]:o.length,fin:!0,generateMask:this._generateMask,mask:n,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};this._deflating?this.enqueue([this.dispatch,o,!1,i,s]):this.sendFrame(e.frame(o,i),s)}ping(t,r,n){let s,o;if(typeof t=="string"?(s=Buffer.byteLength(t),o=!1):(t=Ae(t),s=t.length,o=Ae.readOnly),s>125)throw new RangeError("The data size must not be greater than 125 bytes");let i={[te]:s,fin:!0,generateMask:this._generateMask,mask:r,maskBuffer:this._maskBuffer,opcode:9,readOnly:o,rsv1:!1};this._deflating?this.enqueue([this.dispatch,t,!1,i,n]):this.sendFrame(e.frame(t,i),n)}pong(t,r,n){let s,o;if(typeof t=="string"?(s=Buffer.byteLength(t),o=!1):(t=Ae(t),s=t.length,o=Ae.readOnly),s>125)throw new RangeError("The data size must not be greater than 125 bytes");let i={[te]:s,fin:!0,generateMask:this._generateMask,mask:r,maskBuffer:this._maskBuffer,opcode:10,readOnly:o,rsv1:!1};this._deflating?this.enqueue([this.dispatch,t,!1,i,n]):this.sendFrame(e.frame(t,i),n)}send(t,r,n){let s=this._extensions[Un.extensionName],o=r.binary?2:1,i=r.compress,a,l;if(typeof t=="string"?(a=Buffer.byteLength(t),l=!1):(t=Ae(t),a=t.length,l=Ae.readOnly),this._firstFragment?(this._firstFragment=!1,i&&s&&s.params[s._isServer?"server_no_context_takeover":"client_no_context_takeover"]&&(i=a>=s._threshold),this._compress=i):(i=!1,o=0),r.fin&&(this._firstFragment=!0),s){let u={[te]:a,fin:r.fin,generateMask:this._generateMask,mask:r.mask,maskBuffer:this._maskBuffer,opcode:o,readOnly:l,rsv1:i};this._deflating?this.enqueue([this.dispatch,t,this._compress,u,n]):this.dispatch(t,this._compress,u,n)}else this.sendFrame(e.frame(t,{[te]:a,fin:r.fin,generateMask:this._generateMask,mask:r.mask,maskBuffer:this._maskBuffer,opcode:o,readOnly:l,rsv1:!1}),n)}dispatch(t,r,n,s){if(!r){this.sendFrame(e.frame(t,n),s);return}let o=this._extensions[Un.extensionName];this._bufferedBytes+=n[te],this._deflating=!0,o.compress(t,n.fin,(i,a)=>{if(this._socket.destroyed){let l=new Error("The socket was closed while data was being compressed");typeof s=="function"&&s(l);for(let u=0;u{"use strict";var{kForOnEventAttribute:Ue,kListener:Jt}=he(),Wn=Symbol("kCode"),Gn=Symbol("kData"),Vn=Symbol("kError"),Kn=Symbol("kMessage"),Xn=Symbol("kReason"),ke=Symbol("kTarget"),zn=Symbol("kType"),Qn=Symbol("kWasClean"),fe=class{constructor(t){this[ke]=null,this[zn]=t}get target(){return this[ke]}get type(){return this[zn]}};Object.defineProperty(fe.prototype,"target",{enumerable:!0});Object.defineProperty(fe.prototype,"type",{enumerable:!0});var Se=class extends fe{constructor(t,r={}){super(t),this[Wn]=r.code===void 0?0:r.code,this[Xn]=r.reason===void 0?"":r.reason,this[Qn]=r.wasClean===void 0?!1:r.wasClean}get code(){return this[Wn]}get reason(){return this[Xn]}get wasClean(){return this[Qn]}};Object.defineProperty(Se.prototype,"code",{enumerable:!0});Object.defineProperty(Se.prototype,"reason",{enumerable:!0});Object.defineProperty(Se.prototype,"wasClean",{enumerable:!0});var Oe=class extends fe{constructor(t,r={}){super(t),this[Vn]=r.error===void 0?null:r.error,this[Kn]=r.message===void 0?"":r.message}get error(){return this[Vn]}get message(){return this[Kn]}};Object.defineProperty(Oe.prototype,"error",{enumerable:!0});Object.defineProperty(Oe.prototype,"message",{enumerable:!0});var je=class extends fe{constructor(t,r={}){super(t),this[Gn]=r.data===void 0?null:r.data}get data(){return this[Gn]}};Object.defineProperty(je.prototype,"data",{enumerable:!0});var Oi={addEventListener(e,t,r={}){for(let s of this.listeners(e))if(!r[Ue]&&s[Jt]===t&&!s[Ue])return;let n;if(e==="message")n=function(o,i){let a=new je("message",{data:i?o:o.toString()});a[ke]=this,pt(t,this,a)};else if(e==="close")n=function(o,i){let a=new Se("close",{code:o,reason:i.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});a[ke]=this,pt(t,this,a)};else if(e==="error")n=function(o){let i=new Oe("error",{error:o,message:o.message});i[ke]=this,pt(t,this,i)};else if(e==="open")n=function(){let o=new fe("open");o[ke]=this,pt(t,this,o)};else return;n[Ue]=!!r[Ue],n[Jt]=t,r.once?this.once(e,n):this.on(e,n)},removeEventListener(e,t){for(let r of this.listeners(e))if(r[Jt]===t&&!r[Ue]){this.removeListener(e,r);break}}};Yn.exports={CloseEvent:Se,ErrorEvent:Oe,Event:fe,EventTarget:Oi,MessageEvent:je};function pt(e,t,r){typeof e=="object"&&e.handleEvent?e.handleEvent.call(e,r):e.call(t,r)}});var er=w((Sl,Jn)=>{"use strict";var{tokenChars:qe}=Fe();function ae(e,t,r){e[t]===void 0?e[t]=[r]:e[t].push(r)}function Ii(e){let t=Object.create(null),r=Object.create(null),n=!1,s=!1,o=!1,i,a,l=-1,u=-1,c=-1,g=0;for(;g{let r=e[t];return Array.isArray(r)||(r=[r]),r.map(n=>[t].concat(Object.keys(n).map(s=>{let o=n[s];return Array.isArray(o)||(o=[o]),o.map(i=>i===!0?s:`${s}=${i}`).join("; ")})).join("; ")).join(", ")}).join(", ")}Jn.exports={format:Ni,parse:Ii}});var or=w((Tl,cs)=>{"use strict";var Pi=E("events"),Li=E("https"),Di=E("http"),rs=E("net"),Bi=E("tls"),{randomBytes:Hi,createHash:Mi}=E("crypto"),{Duplex:vl,Readable:El}=E("stream"),{URL:tr}=E("url"),me=$e(),$i=Qt(),Fi=Zt(),{BINARY_TYPES:es,EMPTY_BUFFER:dt,GUID:Ui,kForOnEventAttribute:rr,kListener:ji,kStatusCode:qi,kWebSocket:W,NOOP:ns}=he(),{EventTarget:{addEventListener:Wi,removeEventListener:Gi}}=Zn(),{format:Vi,parse:Ki}=er(),{toBuffer:Xi}=Be(),zi=30*1e3,ss=Symbol("kAborted"),nr=[8,13],pe=["CONNECTING","OPEN","CLOSING","CLOSED"],Qi=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/,M=class e extends Pi{constructor(t,r,n){super(),this._binaryType=es[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=dt,this._closeTimer=null,this._extensions={},this._paused=!1,this._protocol="",this._readyState=e.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,t!==null?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,r===void 0?r=[]:Array.isArray(r)||(typeof r=="object"&&r!==null?(n=r,r=[]):r=[r]),os(this,t,r,n)):(this._autoPong=n.autoPong,this._isServer=!0)}get binaryType(){return this._binaryType}set binaryType(t){es.includes(t)&&(this._binaryType=t,this._receiver&&(this._receiver._binaryType=t))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get isPaused(){return this._paused}get onclose(){return null}get onerror(){return null}get onopen(){return null}get onmessage(){return null}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(t,r,n){let s=new $i({allowSynchronousEvents:n.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxPayload:n.maxPayload,skipUTF8Validation:n.skipUTF8Validation});this._sender=new Fi(t,this._extensions,n.generateMask),this._receiver=s,this._socket=t,s[W]=this,t[W]=this,s.on("conclude",Ji),s.on("drain",ea),s.on("error",ta),s.on("message",ra),s.on("ping",na),s.on("pong",sa),t.setTimeout&&t.setTimeout(0),t.setNoDelay&&t.setNoDelay(),r.length>0&&t.unshift(r),t.on("close",as),t.on("data",gt),t.on("end",ls),t.on("error",us),this._readyState=e.OPEN,this.emit("open")}emitClose(){if(!this._socket){this._readyState=e.CLOSED,this.emit("close",this._closeCode,this._closeMessage);return}this._extensions[me.extensionName]&&this._extensions[me.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=e.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(t,r){if(this.readyState!==e.CLOSED){if(this.readyState===e.CONNECTING){Y(this,this._req,"WebSocket was closed before the connection was established");return}if(this.readyState===e.CLOSING){this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();return}this._readyState=e.CLOSING,this._sender.close(t,r,!this._isServer,n=>{n||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())}),this._closeTimer=setTimeout(this._socket.destroy.bind(this._socket),zi)}}pause(){this.readyState===e.CONNECTING||this.readyState===e.CLOSED||(this._paused=!0,this._socket.pause())}ping(t,r,n){if(this.readyState===e.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof t=="function"?(n=t,t=r=void 0):typeof r=="function"&&(n=r,r=void 0),typeof t=="number"&&(t=t.toString()),this.readyState!==e.OPEN){sr(this,t,n);return}r===void 0&&(r=!this._isServer),this._sender.ping(t||dt,r,n)}pong(t,r,n){if(this.readyState===e.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof t=="function"?(n=t,t=r=void 0):typeof r=="function"&&(n=r,r=void 0),typeof t=="number"&&(t=t.toString()),this.readyState!==e.OPEN){sr(this,t,n);return}r===void 0&&(r=!this._isServer),this._sender.pong(t||dt,r,n)}resume(){this.readyState===e.CONNECTING||this.readyState===e.CLOSED||(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(t,r,n){if(this.readyState===e.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof r=="function"&&(n=r,r={}),typeof t=="number"&&(t=t.toString()),this.readyState!==e.OPEN){sr(this,t,n);return}let s={binary:typeof t!="string",mask:!this._isServer,compress:!0,fin:!0,...r};this._extensions[me.extensionName]||(s.compress=!1),this._sender.send(t||dt,s,n)}terminate(){if(this.readyState!==e.CLOSED){if(this.readyState===e.CONNECTING){Y(this,this._req,"WebSocket was closed before the connection was established");return}this._socket&&(this._readyState=e.CLOSING,this._socket.destroy())}}};Object.defineProperty(M,"CONNECTING",{enumerable:!0,value:pe.indexOf("CONNECTING")});Object.defineProperty(M.prototype,"CONNECTING",{enumerable:!0,value:pe.indexOf("CONNECTING")});Object.defineProperty(M,"OPEN",{enumerable:!0,value:pe.indexOf("OPEN")});Object.defineProperty(M.prototype,"OPEN",{enumerable:!0,value:pe.indexOf("OPEN")});Object.defineProperty(M,"CLOSING",{enumerable:!0,value:pe.indexOf("CLOSING")});Object.defineProperty(M.prototype,"CLOSING",{enumerable:!0,value:pe.indexOf("CLOSING")});Object.defineProperty(M,"CLOSED",{enumerable:!0,value:pe.indexOf("CLOSED")});Object.defineProperty(M.prototype,"CLOSED",{enumerable:!0,value:pe.indexOf("CLOSED")});["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach(e=>{Object.defineProperty(M.prototype,e,{enumerable:!0})});["open","error","close","message"].forEach(e=>{Object.defineProperty(M.prototype,`on${e}`,{enumerable:!0,get(){for(let t of this.listeners(e))if(t[rr])return t[ji];return null},set(t){for(let r of this.listeners(e))if(r[rr]){this.removeListener(e,r);break}typeof t=="function"&&this.addEventListener(e,t,{[rr]:!0})}})});M.prototype.addEventListener=Wi;M.prototype.removeEventListener=Gi;cs.exports=M;function os(e,t,r,n){let s={allowSynchronousEvents:!0,autoPong:!0,protocolVersion:nr[1],maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...n,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if(e._autoPong=s.autoPong,!nr.includes(s.protocolVersion))throw new RangeError(`Unsupported protocol version: ${s.protocolVersion} (supported versions: ${nr.join(", ")})`);let o;if(t instanceof tr)o=t;else try{o=new tr(t)}catch{throw new SyntaxError(`Invalid URL: ${t}`)}o.protocol==="http:"?o.protocol="ws:":o.protocol==="https:"&&(o.protocol="wss:"),e._url=o.href;let i=o.protocol==="wss:",a=o.protocol==="ws+unix:",l;if(o.protocol!=="ws:"&&!i&&!a?l=`The URL's protocol must be one of "ws:", "wss:", "http:", "https", or "ws+unix:"`:a&&!o.pathname?l="The URL's pathname is empty":o.hash&&(l="The URL contains a fragment identifier"),l){let m=new SyntaxError(l);if(e._redirects===0)throw m;ht(e,m);return}let u=i?443:80,c=Hi(16).toString("base64"),g=i?Li.request:Di.request,p=new Set,b;if(s.createConnection=s.createConnection||(i?Zi:Yi),s.defaultPort=s.defaultPort||u,s.port=o.port||u,s.host=o.hostname.startsWith("[")?o.hostname.slice(1,-1):o.hostname,s.headers={...s.headers,"Sec-WebSocket-Version":s.protocolVersion,"Sec-WebSocket-Key":c,Connection:"Upgrade",Upgrade:"websocket"},s.path=o.pathname+o.search,s.timeout=s.handshakeTimeout,s.perMessageDeflate&&(b=new me(s.perMessageDeflate!==!0?s.perMessageDeflate:{},!1,s.maxPayload),s.headers["Sec-WebSocket-Extensions"]=Vi({[me.extensionName]:b.offer()})),r.length){for(let m of r){if(typeof m!="string"||!Qi.test(m)||p.has(m))throw new SyntaxError("An invalid or duplicated subprotocol was specified");p.add(m)}s.headers["Sec-WebSocket-Protocol"]=r.join(",")}if(s.origin&&(s.protocolVersion<13?s.headers["Sec-WebSocket-Origin"]=s.origin:s.headers.Origin=s.origin),(o.username||o.password)&&(s.auth=`${o.username}:${o.password}`),a){let m=s.path.split(":");s.socketPath=m[0],s.path=m[1]}let _;if(s.followRedirects){if(e._redirects===0){e._originalIpc=a,e._originalSecure=i,e._originalHostOrSocketPath=a?s.socketPath:o.host;let m=n&&n.headers;if(n={...n,headers:{}},m)for(let[v,k]of Object.entries(m))n.headers[v.toLowerCase()]=k}else if(e.listenerCount("redirect")===0){let m=a?e._originalIpc?s.socketPath===e._originalHostOrSocketPath:!1:e._originalIpc?!1:o.host===e._originalHostOrSocketPath;(!m||e._originalSecure&&!i)&&(delete s.headers.authorization,delete s.headers.cookie,m||delete s.headers.host,s.auth=void 0)}s.auth&&!n.headers.authorization&&(n.headers.authorization="Basic "+Buffer.from(s.auth).toString("base64")),_=e._req=g(s),e._redirects&&e.emit("redirect",e.url,_)}else _=e._req=g(s);s.timeout&&_.on("timeout",()=>{Y(e,_,"Opening handshake has timed out")}),_.on("error",m=>{_===null||_[ss]||(_=e._req=null,ht(e,m))}),_.on("response",m=>{let v=m.headers.location,k=m.statusCode;if(v&&s.followRedirects&&k>=300&&k<400){if(++e._redirects>s.maxRedirects){Y(e,_,"Maximum redirects exceeded");return}_.abort();let $;try{$=new tr(v,t)}catch{let q=new SyntaxError(`Invalid URL: ${v}`);ht(e,q);return}os(e,$,r,n)}else e.emit("unexpected-response",_,m)||Y(e,_,`Unexpected server response: ${m.statusCode}`)}),_.on("upgrade",(m,v,k)=>{if(e.emit("upgrade",m),e.readyState!==M.CONNECTING)return;_=e._req=null;let $=m.headers.upgrade;if($===void 0||$.toLowerCase()!=="websocket"){Y(e,v,"Invalid Upgrade header");return}let O=Mi("sha1").update(c+Ui).digest("base64");if(m.headers["sec-websocket-accept"]!==O){Y(e,v,"Invalid Sec-WebSocket-Accept header");return}let q=m.headers["sec-websocket-protocol"],B;if(q!==void 0?p.size?p.has(q)||(B="Server sent an invalid subprotocol"):B="Server sent a subprotocol but none was requested":p.size&&(B="Server sent no subprotocol"),B){Y(e,v,B);return}q&&(e._protocol=q);let ee=m.headers["sec-websocket-extensions"];if(ee!==void 0){if(!b){Y(e,v,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");return}let F;try{F=Ki(ee)}catch{Y(e,v,"Invalid Sec-WebSocket-Extensions header");return}let S=Object.keys(F);if(S.length!==1||S[0]!==me.extensionName){Y(e,v,"Server indicated an extension that was not requested");return}try{b.accept(F[me.extensionName])}catch{Y(e,v,"Invalid Sec-WebSocket-Extensions header");return}e._extensions[me.extensionName]=b}e.setSocket(v,k,{allowSynchronousEvents:s.allowSynchronousEvents,generateMask:s.generateMask,maxPayload:s.maxPayload,skipUTF8Validation:s.skipUTF8Validation})}),s.finishRequest?s.finishRequest(_,e):_.end()}function ht(e,t){e._readyState=M.CLOSING,e.emit("error",t),e.emitClose()}function Yi(e){return e.path=e.socketPath,rs.connect(e)}function Zi(e){return e.path=void 0,!e.servername&&e.servername!==""&&(e.servername=rs.isIP(e.host)?"":e.host),Bi.connect(e)}function Y(e,t,r){e._readyState=M.CLOSING;let n=new Error(r);Error.captureStackTrace(n,Y),t.setHeader?(t[ss]=!0,t.abort(),t.socket&&!t.socket.destroyed&&t.socket.destroy(),process.nextTick(ht,e,n)):(t.destroy(n),t.once("error",e.emit.bind(e,"error")),t.once("close",e.emitClose.bind(e)))}function sr(e,t,r){if(t){let n=Xi(t).length;e._socket?e._sender._bufferedBytes+=n:e._bufferedAmount+=n}if(r){let n=new Error(`WebSocket is not open: readyState ${e.readyState} (${pe[e.readyState]})`);process.nextTick(r,n)}}function Ji(e,t){let r=this[W];r._closeFrameReceived=!0,r._closeMessage=t,r._closeCode=e,r._socket[W]!==void 0&&(r._socket.removeListener("data",gt),process.nextTick(is,r._socket),e===1005?r.close():r.close(e,t))}function ea(){let e=this[W];e.isPaused||e._socket.resume()}function ta(e){let t=this[W];t._socket[W]!==void 0&&(t._socket.removeListener("data",gt),process.nextTick(is,t._socket),t.close(e[qi])),t.emit("error",e)}function ts(){this[W].emitClose()}function ra(e,t){this[W].emit("message",e,t)}function na(e){let t=this[W];t._autoPong&&t.pong(e,!this._isServer,ns),t.emit("ping",e)}function sa(e){this[W].emit("pong",e)}function is(e){e.resume()}function as(){let e=this[W];this.removeListener("close",as),this.removeListener("data",gt),this.removeListener("end",ls),e._readyState=M.CLOSING;let t;!this._readableState.endEmitted&&!e._closeFrameReceived&&!e._receiver._writableState.errorEmitted&&(t=e._socket.read())!==null&&e._receiver.write(t),e._receiver.end(),this[W]=void 0,clearTimeout(e._closeTimer),e._receiver._writableState.finished||e._receiver._writableState.errorEmitted?e.emitClose():(e._receiver.on("error",ts),e._receiver.on("finish",ts))}function gt(e){this[W]._receiver.write(e)||this.pause()}function ls(){let e=this[W];e._readyState=M.CLOSING,e._receiver.end(),this.end()}function us(){let e=this[W];this.removeListener("error",us),this.on("error",ns),e&&(e._readyState=M.CLOSING,this.destroy())}});var ps=w((Cl,fs)=>{"use strict";var{tokenChars:oa}=Fe();function ia(e){let t=new Set,r=-1,n=-1,s=0;for(s;s{"use strict";var aa=E("events"),mt=E("http"),{Duplex:Rl}=E("stream"),{createHash:la}=E("crypto"),ds=er(),ve=$e(),ua=ps(),ca=or(),{GUID:fa,kWebSocket:pa}=he(),da=/^[+/0-9A-Za-z]{22}==$/,hs=0,gs=1,_s=2,ir=class extends aa{constructor(t,r){if(super(),t={allowSynchronousEvents:!0,autoPong:!0,maxPayload:100*1024*1024,skipUTF8Validation:!1,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null,WebSocket:ca,...t},t.port==null&&!t.server&&!t.noServer||t.port!=null&&(t.server||t.noServer)||t.server&&t.noServer)throw new TypeError('One and only one of the "port", "server", or "noServer" options must be specified');if(t.port!=null?(this._server=mt.createServer((n,s)=>{let o=mt.STATUS_CODES[426];s.writeHead(426,{"Content-Length":o.length,"Content-Type":"text/plain"}),s.end(o)}),this._server.listen(t.port,t.host,t.backlog,r)):t.server&&(this._server=t.server),this._server){let n=this.emit.bind(this,"connection");this._removeListeners=ha(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(s,o,i)=>{this.handleUpgrade(s,o,i,n)}})}t.perMessageDeflate===!0&&(t.perMessageDeflate={}),t.clientTracking&&(this.clients=new Set,this._shouldEmitClose=!1),this.options=t,this._state=hs}address(){if(this.options.noServer)throw new Error('The server is operating in "noServer" mode');return this._server?this._server.address():null}close(t){if(this._state===_s){t&&this.once("close",()=>{t(new Error("The server is not running"))}),process.nextTick(We,this);return}if(t&&this.once("close",t),this._state!==gs)if(this._state=gs,this.options.noServer||this.options.server)this._server&&(this._removeListeners(),this._removeListeners=this._server=null),this.clients?this.clients.size?this._shouldEmitClose=!0:process.nextTick(We,this):process.nextTick(We,this);else{let r=this._server;this._removeListeners(),this._removeListeners=this._server=null,r.close(()=>{We(this)})}}shouldHandle(t){if(this.options.path){let r=t.url.indexOf("?");if((r!==-1?t.url.slice(0,r):t.url)!==this.options.path)return!1}return!0}handleUpgrade(t,r,n,s){r.on("error",ms);let o=t.headers["sec-websocket-key"],i=t.headers.upgrade,a=+t.headers["sec-websocket-version"];if(t.method!=="GET"){Ee(this,t,r,405,"Invalid HTTP method");return}if(i===void 0||i.toLowerCase()!=="websocket"){Ee(this,t,r,400,"Invalid Upgrade header");return}if(o===void 0||!da.test(o)){Ee(this,t,r,400,"Missing or invalid Sec-WebSocket-Key header");return}if(a!==8&&a!==13){Ee(this,t,r,400,"Missing or invalid Sec-WebSocket-Version header");return}if(!this.shouldHandle(t)){Ge(r,400);return}let l=t.headers["sec-websocket-protocol"],u=new Set;if(l!==void 0)try{u=ua.parse(l)}catch{Ee(this,t,r,400,"Invalid Sec-WebSocket-Protocol header");return}let c=t.headers["sec-websocket-extensions"],g={};if(this.options.perMessageDeflate&&c!==void 0){let p=new ve(this.options.perMessageDeflate,!0,this.options.maxPayload);try{let b=ds.parse(c);b[ve.extensionName]&&(p.accept(b[ve.extensionName]),g[ve.extensionName]=p)}catch{Ee(this,t,r,400,"Invalid or unacceptable Sec-WebSocket-Extensions header");return}}if(this.options.verifyClient){let p={origin:t.headers[`${a===8?"sec-websocket-origin":"origin"}`],secure:!!(t.socket.authorized||t.socket.encrypted),req:t};if(this.options.verifyClient.length===2){this.options.verifyClient(p,(b,_,m,v)=>{if(!b)return Ge(r,_||401,m,v);this.completeUpgrade(g,o,u,t,r,n,s)});return}if(!this.options.verifyClient(p))return Ge(r,401)}this.completeUpgrade(g,o,u,t,r,n,s)}completeUpgrade(t,r,n,s,o,i,a){if(!o.readable||!o.writable)return o.destroy();if(o[pa])throw new Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>hs)return Ge(o,503);let u=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${la("sha1").update(r+fa).digest("base64")}`],c=new this.options.WebSocket(null,void 0,this.options);if(n.size){let g=this.options.handleProtocols?this.options.handleProtocols(n,s):n.values().next().value;g&&(u.push(`Sec-WebSocket-Protocol: ${g}`),c._protocol=g)}if(t[ve.extensionName]){let g=t[ve.extensionName].params,p=ds.format({[ve.extensionName]:[g]});u.push(`Sec-WebSocket-Extensions: ${p}`),c._extensions=t}this.emit("headers",u,s),o.write(u.concat(`\r +`).join(`\r +`)),o.removeListener("error",ms),c.setSocket(o,i,{allowSynchronousEvents:this.options.allowSynchronousEvents,maxPayload:this.options.maxPayload,skipUTF8Validation:this.options.skipUTF8Validation}),this.clients&&(this.clients.add(c),c.on("close",()=>{this.clients.delete(c),this._shouldEmitClose&&!this.clients.size&&process.nextTick(We,this)})),a(c,s)}};ys.exports=ir;function ha(e,t){for(let r of Object.keys(t))e.on(r,t[r]);return function(){for(let n of Object.keys(t))e.removeListener(n,t[n])}}function We(e){e._state=_s,e.emit("close")}function ms(){this.destroy()}function Ge(e,t,r,n){r=r||mt.STATUS_CODES[t],n={Connection:"close","Content-Type":"text/html","Content-Length":Buffer.byteLength(r),...n},e.once("finish",e.destroy),e.end(`HTTP/1.1 ${t} ${mt.STATUS_CODES[t]}\r +`+Object.keys(n).map(s=>`${s}: ${n[s]}`).join(`\r +`)+`\r +\r +`+r)}function Ee(e,t,r,n,s){if(e.listenerCount("wsClientError")){let o=new Error(s);Error.captureStackTrace(o,Ee),e.emit("wsClientError",o,r,t)}else Ge(r,n,s)}});var bt=E("child_process"),St=se(E("fs")),Te=se(E("inspector")),Ps=se(yn()),vt=se(E("path"));var si={"pwa-extensionHost":null,"node-terminal":null,"pwa-node":null,"pwa-chrome":null,"pwa-msedge":null},oi={"extension.js-debug.addCustomBreakpoints":null,"extension.js-debug.addXHRBreakpoints":null,"extension.js-debug.editXHRBreakpoints":null,"extension.pwa-node-debug.attachNodeProcess":null,"extension.js-debug.clearAutoAttachVariables":null,"extension.js-debug.setAutoAttachVariables":null,"extension.js-debug.autoAttachToProcess":null,"extension.js-debug.createDebuggerTerminal":null,"extension.js-debug.createDiagnostics":null,"extension.js-debug.getDiagnosticLogs":null,"extension.js-debug.debugLink":null,"extension.js-debug.npmScript":null,"extension.js-debug.pickNodeProcess":null,"extension.js-debug.prettyPrint":null,"extension.js-debug.removeXHRBreakpoint":null,"extension.js-debug.removeAllCustomBreakpoints":null,"extension.js-debug.revealPage":null,"extension.js-debug.startProfile":null,"extension.js-debug.stopProfile":null,"extension.js-debug.toggleSkippingFile":null,"extension.node-debug.startWithStopOnEntry":null,"extension.js-debug.requestCDPProxy":null,"extension.js-debug.openEdgeDevTools":null,"extension.js-debug.callers.add":null,"extension.js-debug.callers.goToCaller":null,"extension.js-debug.callers.gotToTarget":null,"extension.js-debug.callers.remove":null,"extension.js-debug.callers.removeAll":null,"extension.js-debug.enableSourceMapStepping":null,"extension.js-debug.disableSourceMapStepping":null,"extension.js-debug.network.viewRequest":null,"extension.js-debug.network.copyUri":null,"extension.js-debug.network.openBody":null,"extension.js-debug.network.openBodyInHex":null,"extension.js-debug.network.replayXHR":null,"extension.js-debug.network.clear":null,"extension.js-debug.completion.nodeTool":null},ll=new Set(Object.keys(oi)),ul=new Set(Object.keys(si));var Ss=E("child_process");var ga=se(vn(),1),ma=se(Qt(),1),_a=se(Zt(),1),ya=se(or(),1),bs=se(xs(),1);var Il=Symbol("unset");var Nl=2**31-1;var Sa=Object.freeze(function(e,t){let r=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(r)}}}),va=Object.freeze({isCancellationRequested:!1,onCancellationRequested:()=>({dispose:()=>{}})}),Vl=Object.freeze({isCancellationRequested:!0,onCancellationRequested:Sa});var ar=(e,t)=>e+Math.floor(Math.random()*(t-e));function vs({min:e=53e3,max:t=54e3,attempts:r=1e3}={}){let n=Ea(),s=ar(e,t);for(let o=Math.min(r,t-e);o>=0;o--){if(n(s))return s;s=s===t-1?e:s+1}throw new Error("No open port found")}var Ea=()=>e=>(0,Ss.spawnSync)(process.execPath,["-e",'require("net").createServer().on("listening",()=>process.exit(0)).on("error",()=>process.exit(1)).listen(+process.env.PORT)'],{env:{...process.env,PORT:String(e),NODE_OPTIONS:void 0,ELECTRON_RUN_AS_NODE:"1"}}).status===0;var Ta=new Set(["mocha","jest","jest-cli","ava","tape","tap","ts-node","babel-node"]),Es="$KNOWN_TOOLS$",Ts=`{${[...Ta].join(",")}}`;var Ca={runtime:null,"runtime.sourcecreate":null,"runtime.assertion":null,"runtime.launch":null,"runtime.target":null,"runtime.welcome":null,"runtime.exception":null,"runtime.sourcemap":null,"runtime.breakpoints":null,"sourcemap.parsing":null,"perf.function":null,"cdp.send":null,"cdp.receive":null,"dap.send":null,"dap.receive":null,internal:null,proxyActivity:null},fu=Object.keys(Ca),pu=Symbol("ILogger");var Ra=":::",_t=class{constructor(t){this.processEnv=t}get nodeOptions(){return this.processEnv.NODE_OPTIONS}set nodeOptions(t){t===void 0?delete this.processEnv.NODE_OPTIONS:this.processEnv.NODE_OPTIONS=t}get inspectorOptions(){let t=this.processEnv.VSCODE_INSPECTOR_OPTIONS;if(!t)return;let r=t.split(Ra).find(n=>!!n);if(r)try{return JSON.parse(r)}catch{return}}set inspectorOptions(t){t===void 0?delete this.processEnv.VSCODE_INSPECTOR_OPTIONS:this.processEnv.VSCODE_INSPECTOR_OPTIONS=JSON.stringify(t)}unsetForTree(){delete this.processEnv.VSCODE_INSPECTOR_OPTIONS}updateInspectorOption(t,r){let n=this.inspectorOptions;n&&(this.inspectorOptions={...n,[t]:r})}};var xt=E("path");var Cs=E("crypto"),Ve=E("fs"),Rs=E("os"),As=se(E("path")),Ie=class Ie{constructor(){this.disposed=!1;this.path=As.join((0,Rs.tmpdir)(),`node-debug-callback-${(0,Cs.randomBytes)(8).toString("hex")}`);this.file=Ve.promises.open(this.path,"w")}static isValid(t){try{let r=(0,Ve.readFileSync)(t);return r.length?r.readDoubleBE()>Date.now()-Ie.recencyDeadline:!1}catch{return!1}}async startTouchLoop(){await this.touch(),this.disposed||(this.updateInterval=setInterval(()=>this.touch(),Ie.updateInterval))}async touch(t=()=>Date.now()){let r=await this.file,n=Buffer.alloc(8);n.writeDoubleBE(t()),await r.write(n,0,n.length,0)}async dispose(){if(!this.disposed){this.disposed=!0,this.updateInterval&&clearInterval(this.updateInterval);try{await(await this.file).close(),await Ve.promises.unlink(this.path)}catch{}}}};Ie.updateInterval=1e3,Ie.recencyDeadline=2e3;var yt=Ie;var le={enabled:!1,info:(...e)=>{le.enabled&&console.log(...e)}};var wa=e=>!e||!e.inspectorIpc?(le.info("runtime.launch","Disabling due to lack of IPC server"),!1):!0,ka=e=>{let t=e.requireLease;return t&&!yt.isValid(t)?(le.info("runtime.launch","Disabling due to invalid lease file"),!1):!0},Oa=()=>typeof window<"u"?(le.info("runtime.launch","Disabling in Electron (window is set)"),!1):!0,Ia=e=>{let t="";try{t=E.resolve(process.argv[1])}catch{t=process.argv[1]}let r;try{r=new RegExp(e.waitForDebugger||"").test(t)}catch{r=!0}return r||le.info("runtime.launch","Disabling due to not matching pattern",{pattern:e.waitForDebugger,scriptName:t}),r},Na=()=>{let e=process.argv;return!(e.length===4&&(0,xt.basename)(e[1])==="npm-cli.js"&&e[2]==="prefix"&&e[3]==="-g")},Pa=()=>{let e=process.argv;return!(e.length===2&&(0,xt.basename)(e[1])==="npm-prefix.js")},La=e=>!(e.deferredMode&&process.argv.length>=2&&(0,xt.basename)(process.argv[1])==="node-gyp.js"),Da=[La,wa,ka,Oa,Ia,Na,Pa],ws=e=>!!e&&!Da.some(t=>!t(e));var lr=E("path"),ks=(0,lr.join)(__dirname,"watchdog.js"),vu=(0,lr.join)(__dirname,"bootloader.js");var Os=E("crypto"),Is=()=>(0,Os.randomBytes)(12).toString("hex");var Ls={cwd:process.cwd(),processId:process.pid,nodeVersion:process.version,architecture:process.arch},Ns="$jsDebugIsRegistered";(()=>{try{if(Ns in global)return;let e=new _t(process.env),t=e.inspectorOptions;if(le.enabled=!!(t!=null&&t.verbose),le.info("runtime.launch","Bootloader imported",{env:t,args:process.argv}),Object.defineProperty(global,Ns,{value:!0,enumerable:!1}),!ws(t)){e.unsetForTree();return}try{if(!E("worker_threads").isMainThread)return}catch{}ja(e),/(\\|\/|^)node(64)?(.exe)?$/.test(process.execPath)&&(t.execPath=process.execPath);let r=Is(),n=Ba(t,r);t.onlyEntrypoint?e.unsetForTree():n&&e.updateInspectorOption("openerId",r)}catch(e){console.error(`Error in the js-debug bootloader, please report to https://aka.ms/js-dbg-issue: ${e.stack||e.message||e}`)}})();function Ba(e,t){let r=Ua(e.inspectorIpc)?e.deferredMode?1:0:2;if(le.info("runtime","Set debug mode",{mode:r}),r===2)return!1;let n=Te.url()!==void 0;if(!n){if(!Ma(e))return!1;Te.open(Ha(e),void 0,!1)}let s={ipcAddress:e.inspectorIpc||"",pid:String(process.pid),telemetry:Ls,scriptName:process.argv[1],inspectorURL:Te.url(),waitForDebugger:!0,ownId:t,openerId:e.openerId};if(r===0)qa(e.execPath||process.execPath,s);else{let{status:i,stderr:a}=(0,bt.spawnSync)(e.execPath||process.execPath,["-e",'const c=require("net").createConnection(process.env.NODE_INSPECTOR_IPC);setTimeout(()=>{console.error("timeout"),process.exit(1)},10000),c.on("error",e=>{console.error(e),process.exit(1)}),c.on("connect",()=>{c.write(process.env.NODE_INSPECTOR_INFO,"utf-8"),c.write(Buffer.from([0])),c.on("data",e=>{console.error("read byte",e[0]),process.exit(e[0])})});'],{env:{NODE_SKIP_PLATFORM_CHECK:process.env.NODE_SKIP_PLATFORM_CHECK,NODE_INSPECTOR_INFO:JSON.stringify(s),NODE_INSPECTOR_IPC:e.inspectorIpc,ELECTRON_RUN_AS_NODE:"1"}});if(i)return console.error(a.toString()),console.error("Error activating auto attach, please report to https://aka.ms/js-dbg-issue"),!1}let o=Te;return o.waitForDebugger?o.waitForDebugger():Te.open(n?void 0:0,void 0,!0),!0}function Ha(e){if(!e.mandatePortTracking)return 0;try{return vs({attempts:20})}catch{return 0}}function Ma(e){switch(e.autoAttachMode){case"always":return!0;case"smart":return $a(e);case"onlyWithFlag":default:return!1}}function $a(e){let t=process.argv[1];return t?Fa(t,e):!0}function Fa(e,t){return t.aaPatterns?(0,Ps.default)([e.replace(/\\/g,"/")],[...t.aaPatterns.map(n=>n.replace(Es,Ts))],{dot:!0,nocase:!0}).length>0:!1}function Ua(e){if(!e)return!1;try{return St.readdirSync(vt.dirname(e)).includes(vt.basename(e))}catch{return!1}}function ja(e){var r;let t=(r=e.inspectorOptions)==null?void 0:r.fileCallback;if(t){try{St.writeFileSync(t,JSON.stringify(Ls))}catch{}e.updateInspectorOption("fileCallback",void 0)}}function qa(e,t){let r=(0,bt.spawn)(e,[ks],{env:{NODE_INSPECTOR_INFO:JSON.stringify(t),NODE_SKIP_PLATFORM_CHECK:process.env.NODE_SKIP_PLATFORM_CHECK,ELECTRON_RUN_AS_NODE:"1"},stdio:"ignore",detached:!0});return r.unref(),r}})(); +/*! Bundled license information: + +is-number/index.js: + (*! + * is-number + * + * Copyright (c) 2014-present, Jon Schlinkert. + * Released under the MIT License. + *) + +to-regex-range/index.js: + (*! + * to-regex-range + * + * Copyright (c) 2015-present, Jon Schlinkert. + * Released under the MIT License. + *) + +fill-range/index.js: + (*! + * fill-range + * + * Copyright (c) 2014-present, Jon Schlinkert. + * Licensed under the MIT License. + *) +*/ + +//# sourceURL=bootloader.bundle.cdp \ No newline at end of file diff --git a/debuggers/vscode-js-debug/js-debug/src/chromehash_bg.wasm b/debuggers/vscode-js-debug/js-debug/src/chromehash_bg.wasm new file mode 100644 index 00000000..6c7351ac Binary files /dev/null and b/debuggers/vscode-js-debug/js-debug/src/chromehash_bg.wasm differ diff --git a/debuggers/vscode-js-debug/js-debug/src/dapDebugServer.js b/debuggers/vscode-js-debug/js-debug/src/dapDebugServer.js new file mode 100644 index 00000000..aaa35bb5 --- /dev/null +++ b/debuggers/vscode-js-debug/js-debug/src/dapDebugServer.js @@ -0,0 +1,183 @@ +"use strict";(()=>{var FO=Object.create;var mp=Object.defineProperty;var M_=Object.getOwnPropertyDescriptor;var UO=Object.getOwnPropertyNames;var WO=Object.getPrototypeOf,jO=Object.prototype.hasOwnProperty;var H=(r=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(r,{get:(e,t)=>(typeof require<"u"?require:e)[t]}):r)(function(r){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+r+'" is not supported')});var zs=(r,e)=>()=>(r&&(e=r(r=0)),e);var v=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),VO=(r,e)=>{for(var t in e)mp(r,t,{get:e[t],enumerable:!0})},qO=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of UO(e))!jO.call(r,i)&&i!==t&&mp(r,i,{get:()=>e[i],enumerable:!(n=M_(e,i))||n.enumerable});return r};var _=(r,e,t)=>(t=r!=null?FO(WO(r)):{},qO(e||!r||!r.__esModule?mp(t,"default",{value:r,enumerable:!0}):t,r));var E=(r,e,t,n)=>{for(var i=n>1?void 0:n?M_(e,t):e,o=r.length-1,s;o>=0;o--)(s=r[o])&&(i=(n?s(e,t,i):s(i))||i);return n&&i&&mp(e,t,i),i},g=(r,e)=>(t,n)=>e(t,n,r);var je=v((EJ,N_)=>{"use strict";var DH=Object.defineProperty,GO=Object.getOwnPropertyDescriptor,KO=Object.getOwnPropertyNames,XO=Object.prototype.hasOwnProperty,zO=(r,e)=>{for(var t in e)DH(r,t,{get:e[t],enumerable:!0})},JO=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of KO(e))!XO.call(r,i)&&i!==t&&DH(r,i,{get:()=>e[i],enumerable:!(n=GO(e,i))||n.enumerable});return r},YO=r=>JO(DH({},"__esModule",{value:!0}),r),k_={};zO(k_,{config:()=>rN,t:()=>O_});N_.exports=YO(k_);var QO=H("fs"),ZO=H("fs/promises");async function eN(r){if(r.protocol==="file:")return await(0,ZO.readFile)(r,"utf8");if(r.protocol==="http:"||r.protocol==="https:"){let e=await fetch(r.toString(),{headers:{"Accept-Encoding":"gzip, deflate",Accept:"application/json"},redirect:"follow"});if(!e.ok){let n=`Unexpected ${e.status} response while trying to read ${r}`;try{n+=`: ${await e.text()}`}catch{}throw new Error(n)}return await e.text()}throw new Error("Unsupported protocol")}function tN(r){return(0,QO.readFileSync)(r,"utf8")}var lu;function rN(r){if("contents"in r){typeof r.contents=="string"?lu=JSON.parse(r.contents):lu=r.contents;return}if("fsPath"in r){let e=tN(r.fsPath),t=JSON.parse(e);lu=R_(t)?t.contents.bundle:t;return}if(r.uri){let e=r.uri;return typeof r.uri=="string"&&(e=new URL(r.uri)),new Promise((t,n)=>{eN(e).then(i=>{try{let o=JSON.parse(i);lu=R_(o)?o.contents.bundle:o,t()}catch(o){n(o)}}).catch(i=>{n(i)})})}}function O_(...r){let e=r[0],t,n,i;if(typeof e=="string")t=e,n=e,r.splice(0,1),i=!r||typeof r[0]!="object"?r:r[0];else if(e instanceof Array){let s=r.slice(1);if(e.length!==s.length+1)throw new Error("expected a string as the first argument to l10n.t");let a=e[0];for(let c=1;c0&&(t+=`/${Array.isArray(e.comment)?e.comment.join(""):e.comment}`),i=e.args??{};let o=lu?.[t];return o?typeof o=="string"?Hp(o,i):o.comment?Hp(o.message,i):Hp(n,i):Hp(n,i)}var nN=/{([^}]+)}/g;function Hp(r,e){return Object.keys(e).length===0?r:r.replace(nN,(t,n)=>e[n]??t)}function R_(r){return typeof r?.contents?.bundle=="object"&&typeof r?.version=="string"}});var TH=v(()=>{var B_;(function(r){(function(e){var t=typeof globalThis=="object"?globalThis:typeof global=="object"?global:typeof self=="object"?self:typeof this=="object"?this:a(),n=i(r);typeof t.Reflect<"u"&&(n=i(t.Reflect,n)),e(n,t),typeof t.Reflect>"u"&&(t.Reflect=r);function i(c,u){return function(l,p){Object.defineProperty(c,l,{configurable:!0,writable:!0,value:p}),u&&u(l,p)}}function o(){try{return Function("return this;")()}catch{}}function s(){try{return(0,eval)("(function() { return this; })()")}catch{}}function a(){return o()||s()}})(function(e,t){var n=Object.prototype.hasOwnProperty,i=typeof Symbol=="function",o=i&&typeof Symbol.toPrimitive<"u"?Symbol.toPrimitive:"@@toPrimitive",s=i&&typeof Symbol.iterator<"u"?Symbol.iterator:"@@iterator",a=typeof Object.create=="function",c={__proto__:[]}instanceof Array,u=!a&&!c,l={create:a?function(){return CH(Object.create(null))}:c?function(){return CH({__proto__:null})}:function(){return CH({})},has:u?function(I,A){return n.call(I,A)}:function(I,A){return A in I},get:u?function(I,A){return n.call(I,A)?I[A]:void 0}:function(I,A){return I[A]}},p=Object.getPrototypeOf(Function),d=typeof Map=="function"&&typeof Map.prototype.entries=="function"?Map:RO(),f=typeof Set=="function"&&typeof Set.prototype.entries=="function"?Set:kO(),h=typeof WeakMap=="function"?WeakMap:OO(),m=i?Symbol.for("@reflect-metadata:registry"):void 0,y=DO(),w=TO(y);function D(I,A,L,M){if(ee(L)){if(!k(I))throw new TypeError;if(!Le(A))throw new TypeError;return Pe(I,A)}else{if(!k(I))throw new TypeError;if(!be(A))throw new TypeError;if(!be(M)&&!ee(M)&&!Ri(M))throw new TypeError;return Ri(M)&&(M=void 0),L=ae(L),_e(I,A,L,M)}}e("decorate",D);function j(I,A){function L(M,Q){if(!be(M))throw new TypeError;if(!ee(Q)&&!vt(Q))throw new TypeError;le(I,A,M,Q)}return L}e("metadata",j);function X(I,A,L,M){if(!be(L))throw new TypeError;return ee(M)||(M=ae(M)),le(I,A,L,M)}e("defineMetadata",X);function B(I,A,L){if(!be(A))throw new TypeError;return ee(L)||(L=ae(L)),Kr(I,A,L)}e("hasMetadata",B);function Z(I,A,L){if(!be(A))throw new TypeError;return ee(L)||(L=ae(L)),x(I,A,L)}e("hasOwnMetadata",Z);function O(I,A,L){if(!be(A))throw new TypeError;return ee(L)||(L=ae(L)),P(I,A,L)}e("getMetadata",O);function G(I,A,L){if(!be(A))throw new TypeError;return ee(L)||(L=ae(L)),pt(I,A,L)}e("getOwnMetadata",G);function re(I,A){if(!be(I))throw new TypeError;return ee(A)||(A=ae(A)),tr(I,A)}e("getMetadataKeys",re);function xe(I,A){if(!be(I))throw new TypeError;return ee(A)||(A=ae(A)),rr(I,A)}e("getOwnMetadataKeys",xe);function $(I,A,L){if(!be(A))throw new TypeError;if(ee(L)||(L=ae(L)),!be(A))throw new TypeError;ee(L)||(L=ae(L));var M=uu(A,L,!1);return ee(M)?!1:M.OrdinaryDeleteMetadata(I,A,L)}e("deleteMetadata",$);function Pe(I,A){for(var L=I.length-1;L>=0;--L){var M=I[L],Q=M(A);if(!ee(Q)&&!Ri(Q)){if(!Le(Q))throw new TypeError;A=Q}}return A}function _e(I,A,L,M){for(var Q=I.length-1;Q>=0;--Q){var Ge=I[Q],at=Ge(A,L,M);if(!ee(at)&&!Ri(at)){if(!be(at))throw new TypeError;M=at}}return M}function Kr(I,A,L){var M=x(I,A,L);if(M)return!0;var Q=$H(A);return Ri(Q)?!1:Kr(I,Q,L)}function x(I,A,L){var M=uu(A,L,!1);return ee(M)?!1:hp(M.OrdinaryHasOwnMetadata(I,A,L))}function P(I,A,L){var M=x(I,A,L);if(M)return pt(I,A,L);var Q=$H(A);if(!Ri(Q))return P(I,Q,L)}function pt(I,A,L){var M=uu(A,L,!1);if(!ee(M))return M.OrdinaryGetOwnMetadata(I,A,L)}function le(I,A,L,M){var Q=uu(L,M,!0);Q.OrdinaryDefineOwnMetadata(I,A,L,M)}function tr(I,A){var L=rr(I,A),M=$H(I);if(M===null)return L;var Q=tr(M,A);if(Q.length<=0)return L;if(L.length<=0)return Q;for(var Ge=new f,at=[],se=0,N=L;se=0&&N=this._keys.length?(this._index=-1,this._keys=A,this._values=A):this._index++,{value:z,done:!1}}return{value:void 0,done:!0}},se.prototype.throw=function(N){throw this._index>=0&&(this._index=-1,this._keys=A,this._values=A),N},se.prototype.return=function(N){return this._index>=0&&(this._index=-1,this._keys=A,this._values=A),{value:N,done:!0}},se}(),M=function(){function se(){this._keys=[],this._values=[],this._cacheKey=I,this._cacheIndex=-2}return Object.defineProperty(se.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),se.prototype.has=function(N){return this._find(N,!1)>=0},se.prototype.get=function(N){var z=this._find(N,!1);return z>=0?this._values[z]:void 0},se.prototype.set=function(N,z){var K=this._find(N,!0);return this._values[K]=z,this},se.prototype.delete=function(N){var z=this._find(N,!1);if(z>=0){for(var K=this._keys.length,Y=z+1;Y{"use strict";Object.defineProperty(pe,"__esModule",{value:!0});pe.NON_CUSTOM_TAG_KEYS=pe.PRE_DESTROY=pe.POST_CONSTRUCT=pe.DESIGN_PARAM_TYPES=pe.PARAM_TYPES=pe.TAGGED_PROP=pe.TAGGED=pe.MULTI_INJECT_TAG=pe.INJECT_TAG=pe.OPTIONAL_TAG=pe.UNMANAGED_TAG=pe.NAME_TAG=pe.NAMED_TAG=void 0;pe.NAMED_TAG="named";pe.NAME_TAG="name";pe.UNMANAGED_TAG="unmanaged";pe.OPTIONAL_TAG="optional";pe.INJECT_TAG="inject";pe.MULTI_INJECT_TAG="multi_inject";pe.TAGGED="inversify:tagged";pe.TAGGED_PROP="inversify:tagged_props";pe.PARAM_TYPES="inversify:paramtypes";pe.DESIGN_PARAM_TYPES="design:paramtypes";pe.POST_CONSTRUCT="post_construct";pe.PRE_DESTROY="pre_destroy";function cN(){return[pe.INJECT_TAG,pe.MULTI_INJECT_TAG,pe.NAME_TAG,pe.UNMANAGED_TAG,pe.NAMED_TAG,pe.OPTIONAL_TAG]}pe.NON_CUSTOM_TAG_KEYS=cN()});var Ir=v(ki=>{"use strict";Object.defineProperty(ki,"__esModule",{value:!0});ki.TargetTypeEnum=ki.BindingTypeEnum=ki.BindingScopeEnum=void 0;var uN={Request:"Request",Singleton:"Singleton",Transient:"Transient"};ki.BindingScopeEnum=uN;var lN={ConstantValue:"ConstantValue",Constructor:"Constructor",DynamicValue:"DynamicValue",Factory:"Factory",Function:"Function",Instance:"Instance",Invalid:"Invalid",Provider:"Provider"};ki.BindingTypeEnum=lN;var pN={ClassProperty:"ClassProperty",ConstructorArgument:"ConstructorArgument",Variable:"Variable"};ki.TargetTypeEnum=pN});var Oi=v(_p=>{"use strict";Object.defineProperty(_p,"__esModule",{value:!0});_p.id=void 0;var dN=0;function fN(){return dN++}_p.id=fN});var rA=v(Ap=>{"use strict";Object.defineProperty(Ap,"__esModule",{value:!0});Ap.Binding=void 0;var tA=Ir(),hN=Oi(),mN=function(){function r(e,t){this.id=(0,hN.id)(),this.activated=!1,this.serviceIdentifier=e,this.scope=t,this.type=tA.BindingTypeEnum.Invalid,this.constraint=function(n){return!0},this.implementationType=null,this.cache=null,this.factory=null,this.provider=null,this.onActivation=null,this.onDeactivation=null,this.dynamicValue=null}return r.prototype.clone=function(){var e=new r(this.serviceIdentifier,this.scope);return e.activated=e.scope===tA.BindingScopeEnum.Singleton?this.activated:!1,e.implementationType=this.implementationType,e.dynamicValue=this.dynamicValue,e.scope=this.scope,e.type=this.type,e.factory=this.factory,e.provider=this.provider,e.constraint=this.constraint,e.onActivation=this.onActivation,e.onDeactivation=this.onDeactivation,e.cache=this.cache,e},r}();Ap.Binding=mN});var Et=v(V=>{"use strict";Object.defineProperty(V,"__esModule",{value:!0});V.STACK_OVERFLOW=V.CIRCULAR_DEPENDENCY_IN_FACTORY=V.ON_DEACTIVATION_ERROR=V.PRE_DESTROY_ERROR=V.POST_CONSTRUCT_ERROR=V.ASYNC_UNBIND_REQUIRED=V.MULTIPLE_POST_CONSTRUCT_METHODS=V.MULTIPLE_PRE_DESTROY_METHODS=V.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK=V.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE=V.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE=V.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT=V.ARGUMENTS_LENGTH_MISMATCH=V.INVALID_DECORATOR_OPERATION=V.INVALID_TO_SELF_VALUE=V.LAZY_IN_SYNC=V.INVALID_FUNCTION_BINDING=V.INVALID_MIDDLEWARE_RETURN=V.NO_MORE_SNAPSHOTS_AVAILABLE=V.INVALID_BINDING_TYPE=V.NOT_IMPLEMENTED=V.CIRCULAR_DEPENDENCY=V.UNDEFINED_INJECT_ANNOTATION=V.MISSING_INJECT_ANNOTATION=V.MISSING_INJECTABLE_ANNOTATION=V.NOT_REGISTERED=V.CANNOT_UNBIND=V.AMBIGUOUS_MATCH=V.KEY_NOT_FOUND=V.NULL_ARGUMENT=V.DUPLICATED_METADATA=V.DUPLICATED_INJECTABLE_DECORATOR=void 0;V.DUPLICATED_INJECTABLE_DECORATOR="Cannot apply @injectable decorator multiple times.";V.DUPLICATED_METADATA="Metadata key was used more than once in a parameter:";V.NULL_ARGUMENT="NULL argument";V.KEY_NOT_FOUND="Key Not Found";V.AMBIGUOUS_MATCH="Ambiguous match found for serviceIdentifier:";V.CANNOT_UNBIND="Could not unbind serviceIdentifier:";V.NOT_REGISTERED="No matching bindings found for serviceIdentifier:";V.MISSING_INJECTABLE_ANNOTATION="Missing required @injectable annotation in:";V.MISSING_INJECT_ANNOTATION="Missing required @inject or @multiInject annotation in:";var HN=function(r){return"@inject called with undefined this could mean that the class "+r+" has a circular dependency problem. You can use a LazyServiceIdentifier to overcome this limitation."};V.UNDEFINED_INJECT_ANNOTATION=HN;V.CIRCULAR_DEPENDENCY="Circular dependency found:";V.NOT_IMPLEMENTED="Sorry, this feature is not fully implemented yet.";V.INVALID_BINDING_TYPE="Invalid binding type:";V.NO_MORE_SNAPSHOTS_AVAILABLE="No snapshot available to restore.";V.INVALID_MIDDLEWARE_RETURN="Invalid return type in middleware. Middleware must return!";V.INVALID_FUNCTION_BINDING="Value provided to function binding must be a function!";var gN=function(r){return"You are attempting to construct '"+r+`' in a synchronous way + but it has asynchronous dependencies.`};V.LAZY_IN_SYNC=gN;V.INVALID_TO_SELF_VALUE="The toSelf function can only be applied when a constructor is used as service identifier";V.INVALID_DECORATOR_OPERATION="The @inject @multiInject @tagged and @named decorators must be applied to the parameters of a class constructor or a class property.";var yN=function(){for(var r=[],e=0;e= than the number of constructor arguments of its base class.")};V.ARGUMENTS_LENGTH_MISMATCH=yN;V.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT="Invalid Container constructor argument. Container options must be an object.";V.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE='Invalid Container option. Default scope must be a string ("singleton" or "transient").';V.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE="Invalid Container option. Auto bind injectable must be a boolean";V.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK="Invalid Container option. Skip base check must be a boolean";V.MULTIPLE_PRE_DESTROY_METHODS="Cannot apply @preDestroy decorator multiple times in the same class";V.MULTIPLE_POST_CONSTRUCT_METHODS="Cannot apply @postConstruct decorator multiple times in the same class";V.ASYNC_UNBIND_REQUIRED="Attempting to unbind dependency with asynchronous destruction (@preDestroy or onDeactivation)";var bN=function(r,e){return"@postConstruct error in class "+r+": "+e};V.POST_CONSTRUCT_ERROR=bN;var vN=function(r,e){return"@preDestroy error in class "+r+": "+e};V.PRE_DESTROY_ERROR=vN;var IN=function(r,e){return"onDeactivation() error in class "+r+": "+e};V.ON_DEACTIVATION_ERROR=IN;var _N=function(r,e){return"It looks like there is a circular dependency in one of the '"+r+"' bindings. Please investigate bindings with "+("service identifier '"+e+"'.")};V.CIRCULAR_DEPENDENCY_IN_FACTORY=_N;V.STACK_OVERFLOW="Maximum call stack size exceeded"});var kH=v(hn=>{"use strict";var AN=hn&&hn.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),wN=hn&&hn.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),SN=hn&&hn.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&AN(e,r,t);return wN(e,r),e};Object.defineProperty(hn,"__esModule",{value:!0});hn.MetadataReader=void 0;var RH=SN(tt()),EN=function(){function r(){}return r.prototype.getConstructorMetadata=function(e){var t=Reflect.getMetadata(RH.PARAM_TYPES,e),n=Reflect.getMetadata(RH.TAGGED,e);return{compilerGeneratedMetadata:t,userGeneratedMetadata:n||{}}},r.prototype.getPropertiesMetadata=function(e){var t=Reflect.getMetadata(RH.TAGGED_PROP,e)||[];return t},r}();hn.MetadataReader=EN});var nA=v(wp=>{"use strict";Object.defineProperty(wp,"__esModule",{value:!0});wp.BindingCount=void 0;wp.BindingCount={MultipleBindingsAvailable:2,NoBindingsAvailable:0,OnlyOneBindingAvailable:1}});var OH=v(_r=>{"use strict";var xN=_r&&_r.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),PN=_r&&_r.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),LN=_r&&_r.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&xN(e,r,t);return PN(e,r),e};Object.defineProperty(_r,"__esModule",{value:!0});_r.tryAndThrowErrorIfStackOverflow=_r.isStackOverflowExeption=void 0;var $N=LN(Et());function iA(r){return r instanceof RangeError||r.message===$N.STACK_OVERFLOW}_r.isStackOverflowExeption=iA;var CN=function(r,e){try{return r()}catch(t){throw iA(t)&&(t=e()),t}};_r.tryAndThrowErrorIfStackOverflow=CN});var No=v(rt=>{"use strict";var DN=rt&&rt.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),TN=rt&&rt.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),MN=rt&&rt.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&DN(e,r,t);return TN(e,r),e};Object.defineProperty(rt,"__esModule",{value:!0});rt.getSymbolDescription=rt.circularDependencyToException=rt.listMetadataForTarget=rt.listRegisteredBindingsForServiceIdentifier=rt.getServiceIdentifierAsString=rt.getFunctionName=void 0;var RN=MN(Et());function oA(r){if(typeof r=="function"){var e=r;return e.name}else{if(typeof r=="symbol")return r.toString();var e=r;return e}}rt.getServiceIdentifierAsString=oA;function kN(r,e,t){var n="",i=t(r,e);return i.length!==0&&(n=` +Registered bindings:`,i.forEach(function(o){var s="Object";o.implementationType!==null&&(s=cA(o.implementationType)),n=n+` + `+s,o.constraint.metaData&&(n=n+" - "+o.constraint.metaData)})),n}rt.listRegisteredBindingsForServiceIdentifier=kN;function sA(r,e){return r.parentRequest===null?!1:r.parentRequest.serviceIdentifier===e?!0:sA(r.parentRequest,e)}function ON(r){function e(n,i){i===void 0&&(i=[]);var o=oA(n.serviceIdentifier);return i.push(o),n.parentRequest!==null?e(n.parentRequest,i):i}var t=e(r);return t.reverse().join(" --> ")}function aA(r){r.childRequests.forEach(function(e){if(sA(e,e.serviceIdentifier)){var t=ON(e);throw new Error(RN.CIRCULAR_DEPENDENCY+" "+t)}else aA(e)})}rt.circularDependencyToException=aA;function NN(r,e){if(e.isTagged()||e.isNamed()){var t="",n=e.getNamedTag(),i=e.getCustomTags();return n!==null&&(t+=n.toString()+` +`),i!==null&&i.forEach(function(o){t+=o.toString()+` +`})," "+r+` + `+r+" - "+t}else return" "+r}rt.listMetadataForTarget=NN;function cA(r){if(r.name)return r.name;var e=r.toString(),t=e.match(/^function\s*([^\s(]+)/);return t?t[1]:"Anonymous function: "+e}rt.getFunctionName=cA;function BN(r){return r.toString().slice(7,-1)}rt.getSymbolDescription=BN});var uA=v(Sp=>{"use strict";Object.defineProperty(Sp,"__esModule",{value:!0});Sp.Context=void 0;var FN=Oi(),UN=function(){function r(e){this.id=(0,FN.id)(),this.container=e}return r.prototype.addPlan=function(e){this.plan=e},r.prototype.setCurrentRequest=function(e){this.currentRequest=e},r}();Sp.Context=UN});var Jr=v(mn=>{"use strict";var WN=mn&&mn.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),jN=mn&&mn.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),VN=mn&&mn.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&WN(e,r,t);return jN(e,r),e};Object.defineProperty(mn,"__esModule",{value:!0});mn.Metadata=void 0;var qN=VN(tt()),GN=function(){function r(e,t){this.key=e,this.value=t}return r.prototype.toString=function(){return this.key===qN.NAMED_TAG?"named: "+String(this.value).toString()+" ":"tagged: { key:"+this.key.toString()+", value: "+String(this.value)+" }"},r}();mn.Metadata=GN});var lA=v(Ep=>{"use strict";Object.defineProperty(Ep,"__esModule",{value:!0});Ep.Plan=void 0;var KN=function(){function r(e,t){this.parentContext=e,this.rootRequest=t}return r}();Ep.Plan=KN});var Pp=v(xp=>{"use strict";Object.defineProperty(xp,"__esModule",{value:!0});xp.LazyServiceIdentifier=void 0;var XN=function(){function r(e){this._cb=e}return r.prototype.unwrap=function(){return this._cb()},r}();xp.LazyServiceIdentifier=XN});var pA=v(Lp=>{"use strict";Object.defineProperty(Lp,"__esModule",{value:!0});Lp.QueryableString=void 0;var zN=function(){function r(e){this.str=e}return r.prototype.startsWith=function(e){return this.str.indexOf(e)===0},r.prototype.endsWith=function(e){var t="",n=e.split("").reverse().join("");return t=this.str.split("").reverse().join(""),this.startsWith.call({str:t},n)},r.prototype.contains=function(e){return this.str.indexOf(e)!==-1},r.prototype.equals=function(e){return this.str===e},r.prototype.value=function(){return this.str},r}();Lp.QueryableString=zN});var NH=v(Hn=>{"use strict";var JN=Hn&&Hn.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),YN=Hn&&Hn.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),QN=Hn&&Hn.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&JN(e,r,t);return YN(e,r),e};Object.defineProperty(Hn,"__esModule",{value:!0});Hn.Target=void 0;var ui=QN(tt()),ZN=Oi(),eB=No(),dA=Jr(),tB=pA(),rB=function(){function r(e,t,n,i){this.id=(0,ZN.id)(),this.type=e,this.serviceIdentifier=n;var o=typeof t=="symbol"?(0,eB.getSymbolDescription)(t):t;this.name=new tB.QueryableString(o||""),this.identifier=t,this.metadata=new Array;var s=null;typeof i=="string"?s=new dA.Metadata(ui.NAMED_TAG,i):i instanceof dA.Metadata&&(s=i),s!==null&&this.metadata.push(s)}return r.prototype.hasTag=function(e){for(var t=0,n=this.metadata;t{"use strict";var nB=xt&&xt.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),iB=xt&&xt.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),fA=xt&&xt.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&nB(e,r,t);return iB(e,r),e},$p=xt&&xt.__spreadArray||function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,o;n0,l=c.length>t.length,p=u||l?c.length:t.length,d=cB(n,e,o,a,p),f=gA(r,t,e),h=$p($p([],d,!0),f,!0);return h}function aB(r,e,t,n,i){var o=i[r.toString()]||[],s=bA(o),a=s.unmanaged!==!0,c=n[r],u=s.inject||s.multiInject;if(c=u||c,c instanceof oB.LazyServiceIdentifier&&(c=c.unwrap()),a){var l=c===Object,p=c===Function,d=c===void 0,f=l||p||d;if(!e&&f){var h=BH.MISSING_INJECT_ANNOTATION+" argument "+r+" in class "+t+".";throw new Error(h)}var m=new mA.Target(hA.TargetTypeEnum.ConstructorArgument,s.targetName,c);return m.metadata=o,m}return null}function cB(r,e,t,n,i){for(var o=[],s=0;s0?a:yA(r,t)}else return 0}xt.getBaseClassDependencyCount=yA;function bA(r){var e={};return r.forEach(function(t){e[t.key.toString()]=t.value}),{inject:e[du.INJECT_TAG],multiInject:e[du.MULTI_INJECT_TAG],targetName:e[du.NAME_TAG],unmanaged:e[du.UNMANAGED_TAG]}}});var IA=v(Cp=>{"use strict";Object.defineProperty(Cp,"__esModule",{value:!0});Cp.Request=void 0;var lB=Oi(),pB=function(){function r(e,t,n,i,o){this.id=(0,lB.id)(),this.serviceIdentifier=e,this.parentContext=t,this.parentRequest=n,this.target=o,this.childRequests=[],this.bindings=Array.isArray(i)?i:[i],this.requestScope=n===null?new Map:null}return r.prototype.addChildRequest=function(e,t,n){var i=new r(e,this.parentContext,this,t,n);return this.childRequests.push(i),i},r}();Cp.Request=pB});var qH=v(Kt=>{"use strict";var dB=Kt&&Kt.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),fB=Kt&&Kt.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),wA=Kt&&Kt.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&dB(e,r,t);return fB(e,r),e};Object.defineProperty(Kt,"__esModule",{value:!0});Kt.getBindingDictionary=Kt.createMockRequest=Kt.plan=void 0;var Dp=nA(),WH=wA(Et()),SA=Ir(),_A=wA(tt()),hB=OH(),Zs=No(),EA=uA(),jH=Jr(),mB=lA(),UH=vA(),VH=IA(),xA=NH();function PA(r){return r._bindingDictionary}Kt.getBindingDictionary=PA;function HB(r,e,t,n,i,o){var s=r?_A.MULTI_INJECT_TAG:_A.INJECT_TAG,a=new jH.Metadata(s,t),c=new xA.Target(e,n,t,a);if(i!==void 0){var u=new jH.Metadata(i,o);c.metadata.push(u)}return c}function AA(r,e,t,n,i){var o=fu(t.container,i.serviceIdentifier),s=[];return o.length===Dp.BindingCount.NoBindingsAvailable&&t.container.options.autoBindInjectable&&typeof i.serviceIdentifier=="function"&&r.getConstructorMetadata(i.serviceIdentifier).compilerGeneratedMetadata&&(t.container.bind(i.serviceIdentifier).toSelf(),o=fu(t.container,i.serviceIdentifier)),e?s=o:s=o.filter(function(a){var c=new VH.Request(a.serviceIdentifier,t,n,a,i);return a.constraint(c)}),gB(i.serviceIdentifier,s,i,t.container),s}function gB(r,e,t,n){switch(e.length){case Dp.BindingCount.NoBindingsAvailable:if(t.isOptional())return e;var i=(0,Zs.getServiceIdentifierAsString)(r),o=WH.NOT_REGISTERED;throw o+=(0,Zs.listMetadataForTarget)(i,t),o+=(0,Zs.listRegisteredBindingsForServiceIdentifier)(n,i,fu),new Error(o);case Dp.BindingCount.OnlyOneBindingAvailable:return e;case Dp.BindingCount.MultipleBindingsAvailable:default:if(t.isArray())return e;var i=(0,Zs.getServiceIdentifierAsString)(r),o=WH.AMBIGUOUS_MATCH+" "+i;throw o+=(0,Zs.listRegisteredBindingsForServiceIdentifier)(n,i,fu),new Error(o)}}function LA(r,e,t,n,i,o){var s,a;if(i===null){s=AA(r,e,n,null,o),a=new VH.Request(t,n,null,s,o);var c=new mB.Plan(n,a);n.addPlan(c)}else s=AA(r,e,n,i,o),a=i.addChildRequest(o.serviceIdentifier,s,o);s.forEach(function(u){var l=null;if(o.isArray())l=a.addChildRequest(u.serviceIdentifier,u,o);else{if(u.cache)return;l=a}if(u.type===SA.BindingTypeEnum.Instance&&u.implementationType!==null){var p=(0,UH.getDependencies)(r,u.implementationType);if(!n.container.options.skipBaseClassChecks){var d=(0,UH.getBaseClassDependencyCount)(r,u.implementationType);if(p.length{"use strict";Object.defineProperty(ea,"__esModule",{value:!0});ea.isPromiseOrContainsPromise=ea.isPromise=void 0;function GH(r){var e=typeof r=="object"&&r!==null||typeof r=="function";return e&&typeof r.then=="function"}ea.isPromise=GH;function vB(r){return GH(r)?!0:Array.isArray(r)&&r.some(GH)}ea.isPromiseOrContainsPromise=vB});var $A=v(gn=>{"use strict";var IB=gn&&gn.__awaiter||function(r,e,t,n){function i(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(l){try{u(n.next(l))}catch(p){s(p)}}function c(l){try{u(n.throw(l))}catch(p){s(p)}}function u(l){l.done?o(l.value):i(l.value).then(a,c)}u((n=n.apply(r,e||[])).next())})},_B=gn&&gn.__generator||function(r,e){var t={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(u){return function(l){return c([u,l])}}function c(u){if(n)throw new TypeError("Generator is already executing.");for(;t;)try{if(n=1,i&&(o=u[0]&2?i.return:u[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;switch(i=0,o&&(u=[u[0]&2,o.value]),u[0]){case 0:case 1:o=u;break;case 4:return t.label++,{value:u[1],done:!1};case 5:t.label++,i=u[1],u=[0];continue;case 7:u=t.ops.pop(),t.trys.pop();continue;default:if(o=t.trys,!(o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){t=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]{"use strict";Object.defineProperty(mu,"__esModule",{value:!0});mu.FactoryType=void 0;var LB;(function(r){r.DynamicValue="toDynamicValue",r.Factory="toFactory",r.Provider="toProvider"})(LB=mu.FactoryType||(mu.FactoryType={}))});var XH=v(Xt=>{"use strict";var $B=Xt&&Xt.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),CB=Xt&&Xt.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),DB=Xt&&Xt.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&$B(e,r,t);return CB(e,r),e};Object.defineProperty(Xt,"__esModule",{value:!0});Xt.getFactoryDetails=Xt.ensureFullyBound=Xt.multiBindToService=void 0;var TB=No(),MB=DB(Et()),yn=Ir(),KH=CA(),RB=function(r){return function(e){return function(){for(var t=[],n=0;n{"use strict";var ta=dt&&dt.__assign||function(){return ta=Object.assign||function(r){for(var e,t=1,n=arguments.length;t0&&o[o.length-1])&&(u[0]===6||u[0]===2)){t=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]0){var i=WB(e,t),o=ta(ta({},i),{constr:r});i.isAsync?n=VB(o):n=kA(o)}else n=new r;return n}function kA(r){var e,t=new((e=r.constr).bind.apply(e,UB([void 0],r.constructorInjections,!1)));return r.propertyRequests.forEach(function(n,i){var o=n.target.identifier,s=r.propertyInjections[i];(!n.target.isOptional()||s!==void 0)&&(t[o]=s)}),t}function VB(r){return MA(this,void 0,void 0,function(){var e,t;return RA(this,function(n){switch(n.label){case 0:return[4,DA(r.constructorInjections)];case 1:return e=n.sent(),[4,DA(r.propertyInjections)];case 2:return t=n.sent(),[2,kA(ta(ta({},r),{constructorInjections:e,propertyInjections:t}))]}})})}function DA(r){return MA(this,void 0,void 0,function(){var e,t,n,i;return RA(this,function(o){for(e=[],t=0,n=r;t{"use strict";var zB=zt&&zt.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),JB=zt&&zt.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),YB=zt&&zt.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&zB(e,r,t);return JB(e,r),e},QB=zt&&zt.__awaiter||function(r,e,t,n){function i(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(l){try{u(n.next(l))}catch(p){s(p)}}function c(l){try{u(n.throw(l))}catch(p){s(p)}}function u(l){l.done?o(l.value):i(l.value).then(a,c)}u((n=n.apply(r,e||[])).next())})},ZB=zt&&zt.__generator||function(r,e){var t={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(u){return function(l){return c([u,l])}}function c(u){if(n)throw new TypeError("Generator is already executing.");for(;t;)try{if(n=1,i&&(o=u[0]&2?i.return:u[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;switch(i=0,o&&(u=[u[0]&2,o.value]),u[0]){case 0:case 1:o=u;break;case 4:return t.label++,{value:u[1],done:!1};case 5:t.label++,i=u[1],u=[0];continue;case 7:u=t.ops.pop(),t.trys.pop();continue;default:if(o=t.trys,!(o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){t=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]{"use strict";var fF=Pt&&Pt.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),hF=Pt&&Pt.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),mF=Pt&&Pt.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&fF(e,r,t);return hF(e,r),e};Object.defineProperty(Pt,"__esModule",{value:!0});Pt.typeConstraint=Pt.namedConstraint=Pt.taggedConstraint=Pt.traverseAncerstors=void 0;var HF=mF(tt()),gF=Jr(),jA=function(r,e){var t=r.parentRequest;return t!==null?e(t)?!0:jA(t,e):!1};Pt.traverseAncerstors=jA;var VA=function(r){return function(e){var t=function(n){return n!==null&&n.target!==null&&n.target.matchesTag(r)(e)};return t.metaData=new gF.Metadata(r,e),t}};Pt.taggedConstraint=VA;var yF=VA(HF.NAMED_TAG);Pt.namedConstraint=yF;var bF=function(r){return function(e){var t=null;if(e!==null)if(t=e.bindings[0],typeof r=="string"){var n=t.serviceIdentifier;return n===r}else{var i=e.bindings[0].implementationType;return r===i}return!1}};Pt.typeConstraint=bF});var kp=v(Rp=>{"use strict";Object.defineProperty(Rp,"__esModule",{value:!0});Rp.BindingWhenSyntax=void 0;var Nt=Op(),ct=tg(),vF=function(){function r(e){this._binding=e}return r.prototype.when=function(e){return this._binding.constraint=e,new Nt.BindingOnSyntax(this._binding)},r.prototype.whenTargetNamed=function(e){return this._binding.constraint=(0,ct.namedConstraint)(e),new Nt.BindingOnSyntax(this._binding)},r.prototype.whenTargetIsDefault=function(){return this._binding.constraint=function(e){if(e===null)return!1;var t=e.target!==null&&!e.target.isNamed()&&!e.target.isTagged();return t},new Nt.BindingOnSyntax(this._binding)},r.prototype.whenTargetTagged=function(e,t){return this._binding.constraint=(0,ct.taggedConstraint)(e)(t),new Nt.BindingOnSyntax(this._binding)},r.prototype.whenInjectedInto=function(e){return this._binding.constraint=function(t){return t!==null&&(0,ct.typeConstraint)(e)(t.parentRequest)},new Nt.BindingOnSyntax(this._binding)},r.prototype.whenParentNamed=function(e){return this._binding.constraint=function(t){return t!==null&&(0,ct.namedConstraint)(e)(t.parentRequest)},new Nt.BindingOnSyntax(this._binding)},r.prototype.whenParentTagged=function(e,t){return this._binding.constraint=function(n){return n!==null&&(0,ct.taggedConstraint)(e)(t)(n.parentRequest)},new Nt.BindingOnSyntax(this._binding)},r.prototype.whenAnyAncestorIs=function(e){return this._binding.constraint=function(t){return t!==null&&(0,ct.traverseAncerstors)(t,(0,ct.typeConstraint)(e))},new Nt.BindingOnSyntax(this._binding)},r.prototype.whenNoAncestorIs=function(e){return this._binding.constraint=function(t){return t!==null&&!(0,ct.traverseAncerstors)(t,(0,ct.typeConstraint)(e))},new Nt.BindingOnSyntax(this._binding)},r.prototype.whenAnyAncestorNamed=function(e){return this._binding.constraint=function(t){return t!==null&&(0,ct.traverseAncerstors)(t,(0,ct.namedConstraint)(e))},new Nt.BindingOnSyntax(this._binding)},r.prototype.whenNoAncestorNamed=function(e){return this._binding.constraint=function(t){return t!==null&&!(0,ct.traverseAncerstors)(t,(0,ct.namedConstraint)(e))},new Nt.BindingOnSyntax(this._binding)},r.prototype.whenAnyAncestorTagged=function(e,t){return this._binding.constraint=function(n){return n!==null&&(0,ct.traverseAncerstors)(n,(0,ct.taggedConstraint)(e)(t))},new Nt.BindingOnSyntax(this._binding)},r.prototype.whenNoAncestorTagged=function(e,t){return this._binding.constraint=function(n){return n!==null&&!(0,ct.traverseAncerstors)(n,(0,ct.taggedConstraint)(e)(t))},new Nt.BindingOnSyntax(this._binding)},r.prototype.whenAnyAncestorMatches=function(e){return this._binding.constraint=function(t){return t!==null&&(0,ct.traverseAncerstors)(t,e)},new Nt.BindingOnSyntax(this._binding)},r.prototype.whenNoAncestorMatches=function(e){return this._binding.constraint=function(t){return t!==null&&!(0,ct.traverseAncerstors)(t,e)},new Nt.BindingOnSyntax(this._binding)},r}();Rp.BindingWhenSyntax=vF});var Op=v(Np=>{"use strict";Object.defineProperty(Np,"__esModule",{value:!0});Np.BindingOnSyntax=void 0;var qA=kp(),IF=function(){function r(e){this._binding=e}return r.prototype.onActivation=function(e){return this._binding.onActivation=e,new qA.BindingWhenSyntax(this._binding)},r.prototype.onDeactivation=function(e){return this._binding.onDeactivation=e,new qA.BindingWhenSyntax(this._binding)},r}();Np.BindingOnSyntax=IF});var rg=v(Bp=>{"use strict";Object.defineProperty(Bp,"__esModule",{value:!0});Bp.BindingWhenOnSyntax=void 0;var _F=Op(),AF=kp(),wF=function(){function r(e){this._binding=e,this._bindingWhenSyntax=new AF.BindingWhenSyntax(this._binding),this._bindingOnSyntax=new _F.BindingOnSyntax(this._binding)}return r.prototype.when=function(e){return this._bindingWhenSyntax.when(e)},r.prototype.whenTargetNamed=function(e){return this._bindingWhenSyntax.whenTargetNamed(e)},r.prototype.whenTargetIsDefault=function(){return this._bindingWhenSyntax.whenTargetIsDefault()},r.prototype.whenTargetTagged=function(e,t){return this._bindingWhenSyntax.whenTargetTagged(e,t)},r.prototype.whenInjectedInto=function(e){return this._bindingWhenSyntax.whenInjectedInto(e)},r.prototype.whenParentNamed=function(e){return this._bindingWhenSyntax.whenParentNamed(e)},r.prototype.whenParentTagged=function(e,t){return this._bindingWhenSyntax.whenParentTagged(e,t)},r.prototype.whenAnyAncestorIs=function(e){return this._bindingWhenSyntax.whenAnyAncestorIs(e)},r.prototype.whenNoAncestorIs=function(e){return this._bindingWhenSyntax.whenNoAncestorIs(e)},r.prototype.whenAnyAncestorNamed=function(e){return this._bindingWhenSyntax.whenAnyAncestorNamed(e)},r.prototype.whenAnyAncestorTagged=function(e,t){return this._bindingWhenSyntax.whenAnyAncestorTagged(e,t)},r.prototype.whenNoAncestorNamed=function(e){return this._bindingWhenSyntax.whenNoAncestorNamed(e)},r.prototype.whenNoAncestorTagged=function(e,t){return this._bindingWhenSyntax.whenNoAncestorTagged(e,t)},r.prototype.whenAnyAncestorMatches=function(e){return this._bindingWhenSyntax.whenAnyAncestorMatches(e)},r.prototype.whenNoAncestorMatches=function(e){return this._bindingWhenSyntax.whenNoAncestorMatches(e)},r.prototype.onActivation=function(e){return this._bindingOnSyntax.onActivation(e)},r.prototype.onDeactivation=function(e){return this._bindingOnSyntax.onDeactivation(e)},r}();Bp.BindingWhenOnSyntax=wF});var GA=v(Fp=>{"use strict";Object.defineProperty(Fp,"__esModule",{value:!0});Fp.BindingInSyntax=void 0;var ng=Ir(),ig=rg(),SF=function(){function r(e){this._binding=e}return r.prototype.inRequestScope=function(){return this._binding.scope=ng.BindingScopeEnum.Request,new ig.BindingWhenOnSyntax(this._binding)},r.prototype.inSingletonScope=function(){return this._binding.scope=ng.BindingScopeEnum.Singleton,new ig.BindingWhenOnSyntax(this._binding)},r.prototype.inTransientScope=function(){return this._binding.scope=ng.BindingScopeEnum.Transient,new ig.BindingWhenOnSyntax(this._binding)},r}();Fp.BindingInSyntax=SF});var KA=v(Up=>{"use strict";Object.defineProperty(Up,"__esModule",{value:!0});Up.BindingInWhenOnSyntax=void 0;var EF=GA(),xF=Op(),PF=kp(),LF=function(){function r(e){this._binding=e,this._bindingWhenSyntax=new PF.BindingWhenSyntax(this._binding),this._bindingOnSyntax=new xF.BindingOnSyntax(this._binding),this._bindingInSyntax=new EF.BindingInSyntax(e)}return r.prototype.inRequestScope=function(){return this._bindingInSyntax.inRequestScope()},r.prototype.inSingletonScope=function(){return this._bindingInSyntax.inSingletonScope()},r.prototype.inTransientScope=function(){return this._bindingInSyntax.inTransientScope()},r.prototype.when=function(e){return this._bindingWhenSyntax.when(e)},r.prototype.whenTargetNamed=function(e){return this._bindingWhenSyntax.whenTargetNamed(e)},r.prototype.whenTargetIsDefault=function(){return this._bindingWhenSyntax.whenTargetIsDefault()},r.prototype.whenTargetTagged=function(e,t){return this._bindingWhenSyntax.whenTargetTagged(e,t)},r.prototype.whenInjectedInto=function(e){return this._bindingWhenSyntax.whenInjectedInto(e)},r.prototype.whenParentNamed=function(e){return this._bindingWhenSyntax.whenParentNamed(e)},r.prototype.whenParentTagged=function(e,t){return this._bindingWhenSyntax.whenParentTagged(e,t)},r.prototype.whenAnyAncestorIs=function(e){return this._bindingWhenSyntax.whenAnyAncestorIs(e)},r.prototype.whenNoAncestorIs=function(e){return this._bindingWhenSyntax.whenNoAncestorIs(e)},r.prototype.whenAnyAncestorNamed=function(e){return this._bindingWhenSyntax.whenAnyAncestorNamed(e)},r.prototype.whenAnyAncestorTagged=function(e,t){return this._bindingWhenSyntax.whenAnyAncestorTagged(e,t)},r.prototype.whenNoAncestorNamed=function(e){return this._bindingWhenSyntax.whenNoAncestorNamed(e)},r.prototype.whenNoAncestorTagged=function(e,t){return this._bindingWhenSyntax.whenNoAncestorTagged(e,t)},r.prototype.whenAnyAncestorMatches=function(e){return this._bindingWhenSyntax.whenAnyAncestorMatches(e)},r.prototype.whenNoAncestorMatches=function(e){return this._bindingWhenSyntax.whenNoAncestorMatches(e)},r.prototype.onActivation=function(e){return this._bindingOnSyntax.onActivation(e)},r.prototype.onDeactivation=function(e){return this._bindingOnSyntax.onDeactivation(e)},r}();Up.BindingInWhenOnSyntax=LF});var JA=v(bn=>{"use strict";var $F=bn&&bn.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),CF=bn&&bn.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),DF=bn&&bn.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&$F(e,r,t);return CF(e,r),e};Object.defineProperty(bn,"__esModule",{value:!0});bn.BindingToSyntax=void 0;var XA=DF(Et()),Bt=Ir(),zA=KA(),ra=rg(),TF=function(){function r(e){this._binding=e}return r.prototype.to=function(e){return this._binding.type=Bt.BindingTypeEnum.Instance,this._binding.implementationType=e,new zA.BindingInWhenOnSyntax(this._binding)},r.prototype.toSelf=function(){if(typeof this._binding.serviceIdentifier!="function")throw new Error(""+XA.INVALID_TO_SELF_VALUE);var e=this._binding.serviceIdentifier;return this.to(e)},r.prototype.toConstantValue=function(e){return this._binding.type=Bt.BindingTypeEnum.ConstantValue,this._binding.cache=e,this._binding.dynamicValue=null,this._binding.implementationType=null,this._binding.scope=Bt.BindingScopeEnum.Singleton,new ra.BindingWhenOnSyntax(this._binding)},r.prototype.toDynamicValue=function(e){return this._binding.type=Bt.BindingTypeEnum.DynamicValue,this._binding.cache=null,this._binding.dynamicValue=e,this._binding.implementationType=null,new zA.BindingInWhenOnSyntax(this._binding)},r.prototype.toConstructor=function(e){return this._binding.type=Bt.BindingTypeEnum.Constructor,this._binding.implementationType=e,this._binding.scope=Bt.BindingScopeEnum.Singleton,new ra.BindingWhenOnSyntax(this._binding)},r.prototype.toFactory=function(e){return this._binding.type=Bt.BindingTypeEnum.Factory,this._binding.factory=e,this._binding.scope=Bt.BindingScopeEnum.Singleton,new ra.BindingWhenOnSyntax(this._binding)},r.prototype.toFunction=function(e){if(typeof e!="function")throw new Error(XA.INVALID_FUNCTION_BINDING);var t=this.toConstantValue(e);return this._binding.type=Bt.BindingTypeEnum.Function,this._binding.scope=Bt.BindingScopeEnum.Singleton,t},r.prototype.toAutoFactory=function(e){return this._binding.type=Bt.BindingTypeEnum.Factory,this._binding.factory=function(t){var n=function(){return t.container.get(e)};return n},this._binding.scope=Bt.BindingScopeEnum.Singleton,new ra.BindingWhenOnSyntax(this._binding)},r.prototype.toAutoNamedFactory=function(e){return this._binding.type=Bt.BindingTypeEnum.Factory,this._binding.factory=function(t){return function(n){return t.container.getNamed(e,n)}},new ra.BindingWhenOnSyntax(this._binding)},r.prototype.toProvider=function(e){return this._binding.type=Bt.BindingTypeEnum.Provider,this._binding.provider=e,this._binding.scope=Bt.BindingScopeEnum.Singleton,new ra.BindingWhenOnSyntax(this._binding)},r.prototype.toService=function(e){this.toDynamicValue(function(t){return t.container.get(e)})},r}();bn.BindingToSyntax=TF});var YA=v(Wp=>{"use strict";Object.defineProperty(Wp,"__esModule",{value:!0});Wp.ContainerSnapshot=void 0;var MF=function(){function r(){}return r.of=function(e,t,n,i,o){var s=new r;return s.bindings=e,s.middleware=t,s.deactivations=i,s.activations=n,s.moduleActivationStore=o,s},r}();Wp.ContainerSnapshot=MF});var QA=v(jp=>{"use strict";Object.defineProperty(jp,"__esModule",{value:!0});jp.isClonable=void 0;function RF(r){return typeof r=="object"&&r!==null&&"clone"in r&&typeof r.clone=="function"}jp.isClonable=RF});var og=v(vn=>{"use strict";var kF=vn&&vn.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),OF=vn&&vn.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),NF=vn&&vn.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&kF(e,r,t);return OF(e,r),e};Object.defineProperty(vn,"__esModule",{value:!0});vn.Lookup=void 0;var Bo=NF(Et()),BF=QA(),FF=function(){function r(){this._map=new Map}return r.prototype.getMap=function(){return this._map},r.prototype.add=function(e,t){if(e==null)throw new Error(Bo.NULL_ARGUMENT);if(t==null)throw new Error(Bo.NULL_ARGUMENT);var n=this._map.get(e);n!==void 0?n.push(t):this._map.set(e,[t])},r.prototype.get=function(e){if(e==null)throw new Error(Bo.NULL_ARGUMENT);var t=this._map.get(e);if(t!==void 0)return t;throw new Error(Bo.KEY_NOT_FOUND)},r.prototype.remove=function(e){if(e==null)throw new Error(Bo.NULL_ARGUMENT);if(!this._map.delete(e))throw new Error(Bo.KEY_NOT_FOUND)},r.prototype.removeIntersection=function(e){var t=this;this.traverse(function(n,i){var o=e.hasKey(n)?e.get(n):void 0;if(o!==void 0){var s=i.filter(function(a){return!o.some(function(c){return a===c})});t._setValue(n,s)}})},r.prototype.removeByCondition=function(e){var t=this,n=[];return this._map.forEach(function(i,o){for(var s=[],a=0,c=i;a0?this._map.set(e,t):this._map.delete(e)},r}();vn.Lookup=FF});var ew=v(Vp=>{"use strict";Object.defineProperty(Vp,"__esModule",{value:!0});Vp.ModuleActivationStore=void 0;var ZA=og(),UF=function(){function r(){this._map=new Map}return r.prototype.remove=function(e){if(this._map.has(e)){var t=this._map.get(e);return this._map.delete(e),t}return this._getEmptyHandlersStore()},r.prototype.addDeactivation=function(e,t,n){this._getModuleActivationHandlers(e).onDeactivations.add(t,n)},r.prototype.addActivation=function(e,t,n){this._getModuleActivationHandlers(e).onActivations.add(t,n)},r.prototype.clone=function(){var e=new r;return this._map.forEach(function(t,n){e._map.set(n,{onActivations:t.onActivations.clone(),onDeactivations:t.onDeactivations.clone()})}),e},r.prototype._getModuleActivationHandlers=function(e){var t=this._map.get(e);return t===void 0&&(t=this._getEmptyHandlersStore(),this._map.set(e,t)),t},r.prototype._getEmptyHandlersStore=function(){var e={onActivations:new ZA.Lookup,onDeactivations:new ZA.Lookup};return e},r}();Vp.ModuleActivationStore=UF});var rw=v(ft=>{"use strict";var Gp=ft&&ft.__assign||function(){return Gp=Object.assign||function(r){for(var e,t=1,n=arguments.length;t0&&o[o.length-1])&&(u[0]===6||u[0]===2)){t=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]{"use strict";Object.defineProperty(ia,"__esModule",{value:!0});ia.AsyncContainerModule=ia.ContainerModule=void 0;var nw=Oi(),e3=function(){function r(e){this.id=(0,nw.id)(),this.registry=e}return r}();ia.ContainerModule=e3;var t3=function(){function r(e){this.id=(0,nw.id)(),this.registry=e}return r}();ia.AsyncContainerModule=t3});var ow=v(Kp=>{"use strict";Object.defineProperty(Kp,"__esModule",{value:!0});Kp.getFirstArrayDuplicate=void 0;function r3(r){for(var e=new Set,t=0,n=r;t{"use strict";var n3=Lt&&Lt.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),i3=Lt&&Lt.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),aw=Lt&&Lt.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&n3(e,r,t);return i3(e,r),e};Object.defineProperty(Lt,"__esModule",{value:!0});Lt.createTaggedDecorator=Lt.tagProperty=Lt.tagParameter=Lt.decorate=void 0;var Xp=aw(Et()),cw=aw(tt()),o3=ow();function s3(r){return r.prototype!==void 0}function a3(r){if(r!==void 0)throw new Error(Xp.INVALID_DECORATOR_OPERATION)}function uw(r,e,t,n){a3(e),pw(cw.TAGGED,r,t.toString(),n)}Lt.tagParameter=uw;function lw(r,e,t){if(s3(r))throw new Error(Xp.INVALID_DECORATOR_OPERATION);pw(cw.TAGGED_PROP,r.constructor,e,t)}Lt.tagProperty=lw;function c3(r){var e=[];if(Array.isArray(r)){e=r;var t=(0,o3.getFirstArrayDuplicate)(e.map(function(n){return n.key}));if(t!==void 0)throw new Error(Xp.DUPLICATED_METADATA+" "+t.toString())}else e=[r];return e}function pw(r,e,t,n){var i=c3(n),o={};Reflect.hasOwnMetadata(r,e)&&(o=Reflect.getMetadata(r,e));var s=o[t];if(s===void 0)s=[];else for(var a=function(p){if(i.some(function(d){return d.key===p.key}))throw new Error(Xp.DUPLICATED_METADATA+" "+p.key.toString())},c=0,u=s;c{"use strict";var d3=In&&In.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),f3=In&&In.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),dw=In&&In.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&d3(e,r,t);return f3(e,r),e};Object.defineProperty(In,"__esModule",{value:!0});In.injectable=void 0;var h3=dw(Et()),sg=dw(tt());function m3(){return function(r){if(Reflect.hasOwnMetadata(sg.PARAM_TYPES,r))throw new Error(h3.DUPLICATED_INJECTABLE_DECORATOR);var e=Reflect.getMetadata(sg.DESIGN_PARAM_TYPES,r)||[];return Reflect.defineMetadata(sg.PARAM_TYPES,e,r),r}}In.injectable=m3});var hw=v(zp=>{"use strict";Object.defineProperty(zp,"__esModule",{value:!0});zp.tagged=void 0;var H3=Jr(),g3=li();function y3(r,e){return(0,g3.createTaggedDecorator)(new H3.Metadata(r,e))}zp.tagged=y3});var mw=v(_n=>{"use strict";var b3=_n&&_n.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),v3=_n&&_n.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),I3=_n&&_n.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&b3(e,r,t);return v3(e,r),e};Object.defineProperty(_n,"__esModule",{value:!0});_n.named=void 0;var _3=I3(tt()),A3=Jr(),w3=li();function S3(r){return(0,w3.createTaggedDecorator)(new A3.Metadata(_3.NAMED_TAG,r))}_n.named=S3});var ag=v(Jp=>{"use strict";Object.defineProperty(Jp,"__esModule",{value:!0});Jp.injectBase=void 0;var E3=Et(),x3=Jr(),P3=li();function L3(r){return function(e){return function(t,n,i){if(e===void 0){var o=typeof t=="function"?t.name:t.constructor.name;throw new Error((0,E3.UNDEFINED_INJECT_ANNOTATION)(o))}return(0,P3.createTaggedDecorator)(new x3.Metadata(r,e))(t,n,i)}}}Jp.injectBase=L3});var Hw=v(An=>{"use strict";var $3=An&&An.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),C3=An&&An.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),D3=An&&An.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&$3(e,r,t);return C3(e,r),e};Object.defineProperty(An,"__esModule",{value:!0});An.inject=void 0;var T3=D3(tt()),M3=ag(),R3=(0,M3.injectBase)(T3.INJECT_TAG);An.inject=R3});var gw=v(wn=>{"use strict";var k3=wn&&wn.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),O3=wn&&wn.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),N3=wn&&wn.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&k3(e,r,t);return O3(e,r),e};Object.defineProperty(wn,"__esModule",{value:!0});wn.optional=void 0;var B3=N3(tt()),F3=Jr(),U3=li();function W3(){return(0,U3.createTaggedDecorator)(new F3.Metadata(B3.OPTIONAL_TAG,!0))}wn.optional=W3});var yw=v(Sn=>{"use strict";var j3=Sn&&Sn.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),V3=Sn&&Sn.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),q3=Sn&&Sn.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&j3(e,r,t);return V3(e,r),e};Object.defineProperty(Sn,"__esModule",{value:!0});Sn.unmanaged=void 0;var G3=q3(tt()),K3=Jr(),X3=li();function z3(){return function(r,e,t){var n=new K3.Metadata(G3.UNMANAGED_TAG,!0);(0,X3.tagParameter)(r,e,t,n)}}Sn.unmanaged=z3});var bw=v(En=>{"use strict";var J3=En&&En.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),Y3=En&&En.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),Q3=En&&En.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&J3(e,r,t);return Y3(e,r),e};Object.defineProperty(En,"__esModule",{value:!0});En.multiInject=void 0;var Z3=Q3(tt()),eU=ag(),tU=(0,eU.injectBase)(Z3.MULTI_INJECT_TAG);En.multiInject=tU});var vw=v(xn=>{"use strict";var rU=xn&&xn.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),nU=xn&&xn.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),iU=xn&&xn.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&rU(e,r,t);return nU(e,r),e};Object.defineProperty(xn,"__esModule",{value:!0});xn.targetName=void 0;var oU=iU(tt()),sU=Jr(),aU=li();function cU(r){return function(e,t,n){var i=new sU.Metadata(oU.NAME_TAG,r);(0,aU.tagParameter)(e,t,n,i)}}xn.targetName=cU});var cg=v(Yp=>{"use strict";Object.defineProperty(Yp,"__esModule",{value:!0});Yp.propertyEventDecorator=void 0;var uU=Jr();function lU(r,e){return function(){return function(t,n){var i=new uU.Metadata(r,n);if(Reflect.hasOwnMetadata(r,t.constructor))throw new Error(e);Reflect.defineMetadata(r,i,t.constructor)}}}Yp.propertyEventDecorator=lU});var _w=v(Pn=>{"use strict";var pU=Pn&&Pn.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),dU=Pn&&Pn.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),Iw=Pn&&Pn.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&pU(e,r,t);return dU(e,r),e};Object.defineProperty(Pn,"__esModule",{value:!0});Pn.postConstruct=void 0;var fU=Iw(Et()),hU=Iw(tt()),mU=cg(),HU=(0,mU.propertyEventDecorator)(hU.POST_CONSTRUCT,fU.MULTIPLE_POST_CONSTRUCT_METHODS);Pn.postConstruct=HU});var ww=v(Ln=>{"use strict";var gU=Ln&&Ln.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),yU=Ln&&Ln.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),Aw=Ln&&Ln.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&gU(e,r,t);return yU(e,r),e};Object.defineProperty(Ln,"__esModule",{value:!0});Ln.preDestroy=void 0;var bU=Aw(Et()),vU=Aw(tt()),IU=cg(),_U=(0,IU.propertyEventDecorator)(vU.PRE_DESTROY,bU.MULTIPLE_PRE_DESTROY_METHODS);Ln.preDestroy=_U});var Sw=v(Qp=>{"use strict";Object.defineProperty(Qp,"__esModule",{value:!0});Qp.interfaces=void 0;var ug;ug||(ug={});Qp.interfaces=ug});var q=v(W=>{"use strict";var AU=W&&W.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),wU=W&&W.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),SU=W&&W.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&AU(e,r,t);return wU(e,r),e};Object.defineProperty(W,"__esModule",{value:!0});W.multiBindToService=W.getServiceIdentifierAsString=W.typeConstraint=W.namedConstraint=W.taggedConstraint=W.traverseAncerstors=W.decorate=W.interfaces=W.id=W.MetadataReader=W.preDestroy=W.postConstruct=W.targetName=W.multiInject=W.unmanaged=W.optional=W.LazyServiceIdentifer=W.LazyServiceIdentifier=W.inject=W.named=W.tagged=W.injectable=W.createTaggedDecorator=W.ContainerModule=W.AsyncContainerModule=W.TargetTypeEnum=W.BindingTypeEnum=W.BindingScopeEnum=W.Container=W.METADATA_KEY=void 0;var EU=SU(tt());W.METADATA_KEY=EU;var xU=rw();Object.defineProperty(W,"Container",{enumerable:!0,get:function(){return xU.Container}});var lg=Ir();Object.defineProperty(W,"BindingScopeEnum",{enumerable:!0,get:function(){return lg.BindingScopeEnum}});Object.defineProperty(W,"BindingTypeEnum",{enumerable:!0,get:function(){return lg.BindingTypeEnum}});Object.defineProperty(W,"TargetTypeEnum",{enumerable:!0,get:function(){return lg.TargetTypeEnum}});var Ew=iw();Object.defineProperty(W,"AsyncContainerModule",{enumerable:!0,get:function(){return Ew.AsyncContainerModule}});Object.defineProperty(W,"ContainerModule",{enumerable:!0,get:function(){return Ew.ContainerModule}});var PU=li();Object.defineProperty(W,"createTaggedDecorator",{enumerable:!0,get:function(){return PU.createTaggedDecorator}});var LU=fw();Object.defineProperty(W,"injectable",{enumerable:!0,get:function(){return LU.injectable}});var $U=hw();Object.defineProperty(W,"tagged",{enumerable:!0,get:function(){return $U.tagged}});var CU=mw();Object.defineProperty(W,"named",{enumerable:!0,get:function(){return CU.named}});var DU=Hw();Object.defineProperty(W,"inject",{enumerable:!0,get:function(){return DU.inject}});var TU=Pp();Object.defineProperty(W,"LazyServiceIdentifier",{enumerable:!0,get:function(){return TU.LazyServiceIdentifier}});var MU=Pp();Object.defineProperty(W,"LazyServiceIdentifer",{enumerable:!0,get:function(){return MU.LazyServiceIdentifier}});var RU=gw();Object.defineProperty(W,"optional",{enumerable:!0,get:function(){return RU.optional}});var kU=yw();Object.defineProperty(W,"unmanaged",{enumerable:!0,get:function(){return kU.unmanaged}});var OU=bw();Object.defineProperty(W,"multiInject",{enumerable:!0,get:function(){return OU.multiInject}});var NU=vw();Object.defineProperty(W,"targetName",{enumerable:!0,get:function(){return NU.targetName}});var BU=_w();Object.defineProperty(W,"postConstruct",{enumerable:!0,get:function(){return BU.postConstruct}});var FU=ww();Object.defineProperty(W,"preDestroy",{enumerable:!0,get:function(){return FU.preDestroy}});var UU=kH();Object.defineProperty(W,"MetadataReader",{enumerable:!0,get:function(){return UU.MetadataReader}});var WU=Oi();Object.defineProperty(W,"id",{enumerable:!0,get:function(){return WU.id}});var jU=Sw();Object.defineProperty(W,"interfaces",{enumerable:!0,get:function(){return jU.interfaces}});var VU=li();Object.defineProperty(W,"decorate",{enumerable:!0,get:function(){return VU.decorate}});var Zp=tg();Object.defineProperty(W,"traverseAncerstors",{enumerable:!0,get:function(){return Zp.traverseAncerstors}});Object.defineProperty(W,"taggedConstraint",{enumerable:!0,get:function(){return Zp.taggedConstraint}});Object.defineProperty(W,"namedConstraint",{enumerable:!0,get:function(){return Zp.namedConstraint}});Object.defineProperty(W,"typeConstraint",{enumerable:!0,get:function(){return Zp.typeConstraint}});var qU=No();Object.defineProperty(W,"getServiceIdentifierAsString",{enumerable:!0,get:function(){return qU.getServiceIdentifierAsString}});var GU=XH();Object.defineProperty(W,"multiBindToService",{enumerable:!0,get:function(){return GU.multiBindToService}})});var Tw=v((BY,Dw)=>{Dw.exports=Cw;Cw.sync=XU;var Lw=H("fs");function KU(r,e){var t=e.pathExt!==void 0?e.pathExt:process.env.PATHEXT;if(!t||(t=t.split(";"),t.indexOf("")!==-1))return!0;for(var n=0;n{Ow.exports=Rw;Rw.sync=zU;var Mw=H("fs");function Rw(r,e,t){Mw.stat(r,function(n,i){t(n,n?!1:kw(i,e))})}function zU(r,e){return kw(Mw.statSync(r),e)}function kw(r,e){return r.isFile()&&JU(r,e)}function JU(r,e){var t=r.mode,n=r.uid,i=r.gid,o=e.uid!==void 0?e.uid:process.getuid&&process.getuid(),s=e.gid!==void 0?e.gid:process.getgid&&process.getgid(),a=parseInt("100",8),c=parseInt("010",8),u=parseInt("001",8),l=a|c,p=t&u||t&c&&i===s||t&a&&n===o||t&l&&o===0;return p}});var Fw=v((WY,Bw)=>{var UY=H("fs"),td;process.platform==="win32"||global.TESTING_WINDOWS?td=Tw():td=Nw();Bw.exports=dg;dg.sync=YU;function dg(r,e,t){if(typeof e=="function"&&(t=e,e={}),!t){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(n,i){dg(r,e||{},function(o,s){o?i(o):n(s)})})}td(r,e||{},function(n,i){n&&(n.code==="EACCES"||e&&e.ignoreErrors)&&(n=null,i=!1),t(n,i)})}function YU(r,e){try{return td.sync(r,e||{})}catch(t){if(e&&e.ignoreErrors||t.code==="EACCES")return!1;throw t}}});var Kw=v((jY,Gw)=>{var sa=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",Uw=H("path"),QU=sa?";":":",Ww=Fw(),jw=r=>Object.assign(new Error(`not found: ${r}`),{code:"ENOENT"}),Vw=(r,e)=>{let t=e.colon||QU,n=r.match(/\//)||sa&&r.match(/\\/)?[""]:[...sa?[process.cwd()]:[],...(e.path||process.env.PATH||"").split(t)],i=sa?e.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",o=sa?i.split(t):[""];return sa&&r.indexOf(".")!==-1&&o[0]!==""&&o.unshift(""),{pathEnv:n,pathExt:o,pathExtExe:i}},qw=(r,e,t)=>{typeof e=="function"&&(t=e,e={}),e||(e={});let{pathEnv:n,pathExt:i,pathExtExe:o}=Vw(r,e),s=[],a=u=>new Promise((l,p)=>{if(u===n.length)return e.all&&s.length?l(s):p(jw(r));let d=n[u],f=/^".*"$/.test(d)?d.slice(1,-1):d,h=Uw.join(f,r),m=!f&&/^\.[\\\/]/.test(r)?r.slice(0,2)+h:h;l(c(m,u,0))}),c=(u,l,p)=>new Promise((d,f)=>{if(p===i.length)return d(a(l+1));let h=i[p];Ww(u+h,{pathExt:o},(m,y)=>{if(!m&&y)if(e.all)s.push(u+h);else return d(u+h);return d(c(u,l,p+1))})});return t?a(0).then(u=>t(null,u),t):a(0)},ZU=(r,e)=>{e=e||{};let{pathEnv:t,pathExt:n,pathExtExe:i}=Vw(r,e),o=[];for(let s=0;s{"use strict";var Xw=(r={})=>{let e=r.env||process.env;return(r.platform||process.platform)!=="win32"?"PATH":Object.keys(e).reverse().find(n=>n.toUpperCase()==="PATH")||"Path"};fg.exports=Xw;fg.exports.default=Xw});var Qw=v((qY,Yw)=>{"use strict";var zw=H("path"),eW=Kw(),tW=hg();function Jw(r,e){let t=r.options.env||process.env,n=process.cwd(),i=r.options.cwd!=null,o=i&&process.chdir!==void 0&&!process.chdir.disabled;if(o)try{process.chdir(r.options.cwd)}catch{}let s;try{s=eW.sync(r.command,{path:t[tW({env:t})],pathExt:e?zw.delimiter:void 0})}catch{}finally{o&&process.chdir(n)}return s&&(s=zw.resolve(i?r.options.cwd:"",s)),s}function rW(r){return Jw(r)||Jw(r,!0)}Yw.exports=rW});var Zw=v((GY,Hg)=>{"use strict";var mg=/([()\][%!^"`<>&|;, *?])/g;function nW(r){return r=r.replace(mg,"^$1"),r}function iW(r,e){return r=`${r}`,r=r.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"'),r=r.replace(/(?=(\\+?)?)\1$/,"$1$1"),r=`"${r}"`,r=r.replace(mg,"^$1"),e&&(r=r.replace(mg,"^$1")),r}Hg.exports.command=nW;Hg.exports.argument=iW});var tS=v((KY,eS)=>{"use strict";eS.exports=/^#!(.*)/});var nS=v((XY,rS)=>{"use strict";var oW=tS();rS.exports=(r="")=>{let e=r.match(oW);if(!e)return null;let[t,n]=e[0].replace(/#! ?/,"").split(" "),i=t.split("/").pop();return i==="env"?n:n?`${i} ${n}`:i}});var oS=v((zY,iS)=>{"use strict";var gg=H("fs"),sW=nS();function aW(r){let t=Buffer.alloc(150),n;try{n=gg.openSync(r,"r"),gg.readSync(n,t,0,150,0),gg.closeSync(n)}catch{}return sW(t.toString())}iS.exports=aW});var uS=v((JY,cS)=>{"use strict";var cW=H("path"),sS=Qw(),aS=Zw(),uW=oS(),lW=process.platform==="win32",pW=/\.(?:com|exe)$/i,dW=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function fW(r){r.file=sS(r);let e=r.file&&uW(r.file);return e?(r.args.unshift(r.file),r.command=e,sS(r)):r.file}function hW(r){if(!lW)return r;let e=fW(r),t=!pW.test(e);if(r.options.forceShell||t){let n=dW.test(e);r.command=cW.normalize(r.command),r.command=aS.command(r.command),r.args=r.args.map(o=>aS.argument(o,n));let i=[r.command].concat(r.args).join(" ");r.args=["/d","/s","/c",`"${i}"`],r.command=process.env.comspec||"cmd.exe",r.options.windowsVerbatimArguments=!0}return r}function mW(r,e,t){e&&!Array.isArray(e)&&(t=e,e=null),e=e?e.slice(0):[],t=Object.assign({},t);let n={command:r,args:e,options:t,file:void 0,original:{command:r,args:e}};return t.shell?n:hW(n)}cS.exports=mW});var dS=v((YY,pS)=>{"use strict";var yg=process.platform==="win32";function bg(r,e){return Object.assign(new Error(`${e} ${r.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${e} ${r.command}`,path:r.command,spawnargs:r.args})}function HW(r,e){if(!yg)return;let t=r.emit;r.emit=function(n,i){if(n==="exit"){let o=lS(i,e);if(o)return t.call(r,"error",o)}return t.apply(r,arguments)}}function lS(r,e){return yg&&r===1&&!e.file?bg(e.original,"spawn"):null}function gW(r,e){return yg&&r===1&&!e.file?bg(e.original,"spawnSync"):null}pS.exports={hookChildProcess:HW,verifyENOENT:lS,verifyENOENTSync:gW,notFoundError:bg}});var mS=v((QY,aa)=>{"use strict";var fS=H("child_process"),vg=uS(),Ig=dS();function hS(r,e,t){let n=vg(r,e,t),i=fS.spawn(n.command,n.args,n.options);return Ig.hookChildProcess(i,n),i}function yW(r,e,t){let n=vg(r,e,t),i=fS.spawnSync(n.command,n.args,n.options);return i.error=i.error||Ig.verifyENOENTSync(i.status,n),i}aa.exports=hS;aa.exports.spawn=hS;aa.exports.sync=yW;aa.exports._parse=vg;aa.exports._enoent=Ig});var gS=v((ZY,HS)=>{"use strict";HS.exports=r=>{let e=typeof r=="string"?` +`:10,t=typeof r=="string"?"\r":13;return r[r.length-1]===e&&(r=r.slice(0,r.length-1)),r[r.length-1]===t&&(r=r.slice(0,r.length-1)),r}});var vS=v((eQ,yu)=>{"use strict";var gu=H("path"),yS=hg(),bS=r=>{r={cwd:process.cwd(),path:process.env[yS()],execPath:process.execPath,...r};let e,t=gu.resolve(r.cwd),n=[];for(;e!==t;)n.push(gu.join(t,"node_modules/.bin")),e=t,t=gu.resolve(t,"..");let i=gu.resolve(r.cwd,r.execPath,"..");return n.push(i),n.concat(r.path).join(gu.delimiter)};yu.exports=bS;yu.exports.default=bS;yu.exports.env=r=>{r={env:process.env,...r};let e={...r.env},t=yS({env:e});return r.path=e[t],e[t]=yu.exports(r),e}});var _S=v((tQ,_g)=>{"use strict";var IS=(r,e)=>{for(let t of Reflect.ownKeys(e))Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(e,t));return r};_g.exports=IS;_g.exports.default=IS});var wS=v((rQ,nd)=>{"use strict";var bW=_S(),rd=new WeakMap,AS=(r,e={})=>{if(typeof r!="function")throw new TypeError("Expected a function");let t,n=0,i=r.displayName||r.name||"",o=function(...s){if(rd.set(o,++n),n===1)t=r.apply(this,s),r=null;else if(e.throw===!0)throw new Error(`Function \`${i}\` can only be called once`);return t};return bW(o,r),rd.set(o,n),o};nd.exports=AS;nd.exports.default=AS;nd.exports.callCount=r=>{if(!rd.has(r))throw new Error(`The given function \`${r.name}\` is not wrapped by the \`onetime\` package`);return rd.get(r)}});var SS=v(id=>{"use strict";Object.defineProperty(id,"__esModule",{value:!0});id.SIGNALS=void 0;var vW=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}];id.SIGNALS=vW});var Ag=v(ca=>{"use strict";Object.defineProperty(ca,"__esModule",{value:!0});ca.SIGRTMAX=ca.getRealtimeSignals=void 0;var IW=function(){let r=xS-ES+1;return Array.from({length:r},_W)};ca.getRealtimeSignals=IW;var _W=function(r,e){return{name:`SIGRT${e+1}`,number:ES+e,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}},ES=34,xS=64;ca.SIGRTMAX=xS});var PS=v(od=>{"use strict";Object.defineProperty(od,"__esModule",{value:!0});od.getSignals=void 0;var AW=H("os"),wW=SS(),SW=Ag(),EW=function(){let r=(0,SW.getRealtimeSignals)();return[...wW.SIGNALS,...r].map(xW)};od.getSignals=EW;var xW=function({name:r,number:e,description:t,action:n,forced:i=!1,standard:o}){let{signals:{[r]:s}}=AW.constants,a=s!==void 0;return{name:r,number:a?s:e,description:t,supported:a,action:n,forced:i,standard:o}}});var $S=v(ua=>{"use strict";Object.defineProperty(ua,"__esModule",{value:!0});ua.signalsByNumber=ua.signalsByName=void 0;var PW=H("os"),LS=PS(),LW=Ag(),$W=function(){return(0,LS.getSignals)().reduce(CW,{})},CW=function(r,{name:e,number:t,description:n,supported:i,action:o,forced:s,standard:a}){return{...r,[e]:{name:e,number:t,description:n,supported:i,action:o,forced:s,standard:a}}},DW=$W();ua.signalsByName=DW;var TW=function(){let r=(0,LS.getSignals)(),e=LW.SIGRTMAX+1,t=Array.from({length:e},(n,i)=>MW(i,r));return Object.assign({},...t)},MW=function(r,e){let t=RW(r,e);if(t===void 0)return{};let{name:n,description:i,supported:o,action:s,forced:a,standard:c}=t;return{[r]:{name:n,number:r,description:i,supported:o,action:s,forced:a,standard:c}}},RW=function(r,e){let t=e.find(({name:n})=>PW.constants.signals[n]===r);return t!==void 0?t:e.find(n=>n.number===r)},kW=TW();ua.signalsByNumber=kW});var DS=v((aQ,CS)=>{"use strict";var{signalsByName:OW}=$S(),NW=({timedOut:r,timeout:e,errorCode:t,signal:n,signalDescription:i,exitCode:o,isCanceled:s})=>r?`timed out after ${e} milliseconds`:s?"was canceled":t!==void 0?`failed with ${t}`:n!==void 0?`was killed with ${n} (${i})`:o!==void 0?`failed with exit code ${o}`:"failed",BW=({stdout:r,stderr:e,all:t,error:n,signal:i,exitCode:o,command:s,escapedCommand:a,timedOut:c,isCanceled:u,killed:l,parsed:{options:{timeout:p}}})=>{o=o===null?void 0:o,i=i===null?void 0:i;let d=i===void 0?void 0:OW[i].description,f=n&&n.code,m=`Command ${NW({timedOut:c,timeout:p,errorCode:f,signal:i,signalDescription:d,exitCode:o,isCanceled:u})}: ${s}`,y=Object.prototype.toString.call(n)==="[object Error]",w=y?`${m} +${n.message}`:m,D=[w,e,r].filter(Boolean).join(` +`);return y?(n.originalMessage=n.message,n.message=D):n=new Error(D),n.shortMessage=w,n.command=s,n.escapedCommand=a,n.exitCode=o,n.signal=i,n.signalDescription=d,n.stdout=r,n.stderr=e,t!==void 0&&(n.all=t),"bufferedData"in n&&delete n.bufferedData,n.failed=!0,n.timedOut=!!c,n.isCanceled=u,n.killed=l&&!c,n};CS.exports=BW});var MS=v((cQ,wg)=>{"use strict";var sd=["stdin","stdout","stderr"],FW=r=>sd.some(e=>r[e]!==void 0),TS=r=>{if(!r)return;let{stdio:e}=r;if(e===void 0)return sd.map(n=>r[n]);if(FW(r))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${sd.map(n=>`\`${n}\``).join(", ")}`);if(typeof e=="string")return e;if(!Array.isArray(e))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof e}\``);let t=Math.max(e.length,sd.length);return Array.from({length:t},(n,i)=>e[i])};wg.exports=TS;wg.exports.node=r=>{let e=TS(r);return e==="ipc"?"ipc":e===void 0||typeof e=="string"?[e,e,e,"ipc"]:e.includes("ipc")?e:[...e,"ipc"]}});var RS=v((uQ,ad)=>{ad.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];process.platform!=="win32"&&ad.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&ad.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var NS=v((lQ,Iu)=>{var UW=H("assert"),bu=RS(),WW=/^win/i.test(process.platform),cd=H("events");typeof cd!="function"&&(cd=cd.EventEmitter);var _t;process.__signal_exit_emitter__?_t=process.__signal_exit_emitter__:(_t=process.__signal_exit_emitter__=new cd,_t.count=0,_t.emitted={});_t.infinite||(_t.setMaxListeners(1/0),_t.infinite=!0);Iu.exports=function(r,e){UW.equal(typeof r,"function","a callback must be provided for exit handler"),vu===!1&&kS();var t="exit";e&&e.alwaysLast&&(t="afterexit");var n=function(){_t.removeListener(t,r),_t.listeners("exit").length===0&&_t.listeners("afterexit").length===0&&Eg()};return _t.on(t,r),n};Iu.exports.unload=Eg;function Eg(){vu&&(vu=!1,bu.forEach(function(r){try{process.removeListener(r,xg[r])}catch{}}),process.emit=Sg,process.reallyExit=OS,_t.count-=1)}function la(r,e,t){_t.emitted[r]||(_t.emitted[r]=!0,_t.emit(r,e,t))}var xg={};bu.forEach(function(r){xg[r]=function(){var t=process.listeners(r);t.length===_t.count&&(Eg(),la("exit",null,r),la("afterexit",null,r),WW&&r==="SIGHUP"&&(r="SIGINT"),process.kill(process.pid,r))}});Iu.exports.signals=function(){return bu};Iu.exports.load=kS;var vu=!1;function kS(){vu||(vu=!0,_t.count+=1,bu=bu.filter(function(r){try{return process.on(r,xg[r]),!0}catch{return!1}}),process.emit=VW,process.reallyExit=jW)}var OS=process.reallyExit;function jW(r){process.exitCode=r||0,la("exit",process.exitCode,null),la("afterexit",process.exitCode,null),OS.call(process,process.exitCode)}var Sg=process.emit;function VW(r,e){if(r==="exit"){e!==void 0&&(process.exitCode=e);var t=Sg.apply(this,arguments);return la("exit",process.exitCode,null),la("afterexit",process.exitCode,null),t}else return Sg.apply(this,arguments)}});var FS=v((pQ,BS)=>{"use strict";var qW=H("os"),GW=NS(),KW=1e3*5,XW=(r,e="SIGTERM",t={})=>{let n=r(e);return zW(r,e,t,n),n},zW=(r,e,t,n)=>{if(!JW(e,t,n))return;let i=QW(t),o=setTimeout(()=>{r("SIGKILL")},i);o.unref&&o.unref()},JW=(r,{forceKillAfterTimeout:e},t)=>YW(r)&&e!==!1&&t,YW=r=>r===qW.constants.signals.SIGTERM||typeof r=="string"&&r.toUpperCase()==="SIGTERM",QW=({forceKillAfterTimeout:r=!0})=>{if(r===!0)return KW;if(!Number.isFinite(r)||r<0)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${r}\` (${typeof r})`);return r},ZW=(r,e)=>{r.kill()&&(e.isCanceled=!0)},e2=(r,e,t)=>{r.kill(e),t(Object.assign(new Error("Timed out"),{timedOut:!0,signal:e}))},t2=(r,{timeout:e,killSignal:t="SIGTERM"},n)=>{if(e===0||e===void 0)return n;let i,o=new Promise((a,c)=>{i=setTimeout(()=>{e2(r,t,c)},e)}),s=n.finally(()=>{clearTimeout(i)});return Promise.race([o,s])},r2=({timeout:r})=>{if(r!==void 0&&(!Number.isFinite(r)||r<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${r}\` (${typeof r})`)},n2=async(r,{cleanup:e,detached:t},n)=>{if(!e||t)return n;let i=GW(()=>{r.kill()});return n.finally(()=>{i()})};BS.exports={spawnedKill:XW,spawnedCancel:ZW,setupTimeout:t2,validateTimeout:r2,setExitHandler:n2}});var WS=v((dQ,US)=>{"use strict";var $n=r=>r!==null&&typeof r=="object"&&typeof r.pipe=="function";$n.writable=r=>$n(r)&&r.writable!==!1&&typeof r._write=="function"&&typeof r._writableState=="object";$n.readable=r=>$n(r)&&r.readable!==!1&&typeof r._read=="function"&&typeof r._readableState=="object";$n.duplex=r=>$n.writable(r)&&$n.readable(r);$n.transform=r=>$n.duplex(r)&&typeof r._transform=="function"&&typeof r._transformState=="object";US.exports=$n});var VS=v((fQ,jS)=>{"use strict";var{PassThrough:i2}=H("stream");jS.exports=r=>{r={...r};let{array:e}=r,{encoding:t}=r,n=t==="buffer",i=!1;e?i=!(t||n):t=t||"utf8",n&&(t=null);let o=new i2({objectMode:i});t&&o.setEncoding(t);let s=0,a=[];return o.on("data",c=>{a.push(c),i?s=a.length:s+=c.length}),o.getBufferedValue=()=>e?a:n?Buffer.concat(a,s):a.join(""),o.getBufferedLength=()=>s,o}});var qS=v((hQ,_u)=>{"use strict";var{constants:o2}=H("buffer"),s2=H("stream"),{promisify:a2}=H("util"),c2=VS(),u2=a2(s2.pipeline),ud=class extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}};async function Pg(r,e){if(!r)throw new Error("Expected a stream");e={maxBuffer:1/0,...e};let{maxBuffer:t}=e,n=c2(e);return await new Promise((i,o)=>{let s=a=>{a&&n.getBufferedLength()<=o2.MAX_LENGTH&&(a.bufferedData=n.getBufferedValue()),o(a)};(async()=>{try{await u2(r,n),i()}catch(a){s(a)}})(),n.on("data",()=>{n.getBufferedLength()>t&&s(new ud)})}),n.getBufferedValue()}_u.exports=Pg;_u.exports.buffer=(r,e)=>Pg(r,{...e,encoding:"buffer"});_u.exports.array=(r,e)=>Pg(r,{...e,array:!0});_u.exports.MaxBufferError=ud});var KS=v((mQ,GS)=>{"use strict";var{PassThrough:l2}=H("stream");GS.exports=function(){var r=[],e=new l2({objectMode:!0});return e.setMaxListeners(0),e.add=t,e.isEmpty=n,e.on("unpipe",i),Array.prototype.slice.call(arguments).forEach(t),e;function t(o){return Array.isArray(o)?(o.forEach(t),this):(r.push(o),o.once("end",i.bind(null,o)),o.once("error",e.emit.bind(e,"error")),o.pipe(e,{end:!1}),this)}function n(){return r.length==0}function i(o){r=r.filter(function(s){return s!==o}),!r.length&&e.readable&&e.end()}}});var YS=v((HQ,JS)=>{"use strict";var zS=WS(),XS=qS(),p2=KS(),d2=(r,e)=>{e===void 0||r.stdin===void 0||(zS(e)?e.pipe(r.stdin):r.stdin.end(e))},f2=(r,{all:e})=>{if(!e||!r.stdout&&!r.stderr)return;let t=p2();return r.stdout&&t.add(r.stdout),r.stderr&&t.add(r.stderr),t},Lg=async(r,e)=>{if(r){r.destroy();try{return await e}catch(t){return t.bufferedData}}},$g=(r,{encoding:e,buffer:t,maxBuffer:n})=>{if(!(!r||!t))return e?XS(r,{encoding:e,maxBuffer:n}):XS.buffer(r,{maxBuffer:n})},h2=async({stdout:r,stderr:e,all:t},{encoding:n,buffer:i,maxBuffer:o},s)=>{let a=$g(r,{encoding:n,buffer:i,maxBuffer:o}),c=$g(e,{encoding:n,buffer:i,maxBuffer:o}),u=$g(t,{encoding:n,buffer:i,maxBuffer:o*2});try{return await Promise.all([s,a,c,u])}catch(l){return Promise.all([{error:l,signal:l.signal,timedOut:l.timedOut},Lg(r,a),Lg(e,c),Lg(t,u)])}},m2=({input:r})=>{if(zS(r))throw new TypeError("The `input` option cannot be a stream in sync mode")};JS.exports={handleInput:d2,makeAllStream:f2,getSpawnedResult:h2,validateInputSync:m2}});var ZS=v((gQ,QS)=>{"use strict";var H2=(async()=>{})().constructor.prototype,g2=["then","catch","finally"].map(r=>[r,Reflect.getOwnPropertyDescriptor(H2,r)]),y2=(r,e)=>{for(let[t,n]of g2){let i=typeof e=="function"?(...o)=>Reflect.apply(n.value,e(),o):n.value.bind(e);Reflect.defineProperty(r,t,{...n,value:i})}return r},b2=r=>new Promise((e,t)=>{r.on("exit",(n,i)=>{e({exitCode:n,signal:i})}),r.on("error",n=>{t(n)}),r.stdin&&r.stdin.on("error",n=>{t(n)})});QS.exports={mergePromise:y2,getSpawnedPromise:b2}});var rE=v((yQ,tE)=>{"use strict";var eE=(r,e=[])=>Array.isArray(e)?[r,...e]:[r],v2=/^[\w.-]+$/,I2=/"/g,_2=r=>typeof r!="string"||v2.test(r)?r:`"${r.replace(I2,'\\"')}"`,A2=(r,e)=>eE(r,e).join(" "),w2=(r,e)=>eE(r,e).map(t=>_2(t)).join(" "),S2=/ +/g,E2=r=>{let e=[];for(let t of r.trim().split(S2)){let n=e[e.length-1];n&&n.endsWith("\\")?e[e.length-1]=`${n.slice(0,-1)} ${t}`:e.push(t)}return e};tE.exports={joinCommand:A2,getEscapedCommand:w2,parseCommand:E2}});var Dg=v((bQ,pa)=>{"use strict";var x2=H("path"),Cg=H("child_process"),P2=mS(),L2=gS(),$2=vS(),C2=wS(),ld=DS(),iE=MS(),{spawnedKill:D2,spawnedCancel:T2,setupTimeout:M2,validateTimeout:R2,setExitHandler:k2}=FS(),{handleInput:O2,getSpawnedResult:N2,makeAllStream:B2,validateInputSync:F2}=YS(),{mergePromise:nE,getSpawnedPromise:U2}=ZS(),{joinCommand:oE,parseCommand:sE,getEscapedCommand:aE}=rE(),W2=1e3*1e3*100,j2=({env:r,extendEnv:e,preferLocal:t,localDir:n,execPath:i})=>{let o=e?{...process.env,...r}:r;return t?$2.env({env:o,cwd:n,execPath:i}):o},cE=(r,e,t={})=>{let n=P2._parse(r,e,t);return r=n.command,e=n.args,t=n.options,t={maxBuffer:W2,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:t.cwd||process.cwd(),execPath:process.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,...t},t.env=j2(t),t.stdio=iE(t),process.platform==="win32"&&x2.basename(r,".exe")==="cmd"&&e.unshift("/q"),{file:r,args:e,options:t,parsed:n}},Au=(r,e,t)=>typeof e!="string"&&!Buffer.isBuffer(e)?t===void 0?void 0:"":r.stripFinalNewline?L2(e):e,pd=(r,e,t)=>{let n=cE(r,e,t),i=oE(r,e),o=aE(r,e);R2(n.options);let s;try{s=Cg.spawn(n.file,n.args,n.options)}catch(f){let h=new Cg.ChildProcess,m=Promise.reject(ld({error:f,stdout:"",stderr:"",all:"",command:i,escapedCommand:o,parsed:n,timedOut:!1,isCanceled:!1,killed:!1}));return nE(h,m)}let a=U2(s),c=M2(s,n.options,a),u=k2(s,n.options,c),l={isCanceled:!1};s.kill=D2.bind(null,s.kill.bind(s)),s.cancel=T2.bind(null,s,l);let d=C2(async()=>{let[{error:f,exitCode:h,signal:m,timedOut:y},w,D,j]=await N2(s,n.options,u),X=Au(n.options,w),B=Au(n.options,D),Z=Au(n.options,j);if(f||h!==0||m!==null){let O=ld({error:f,exitCode:h,signal:m,stdout:X,stderr:B,all:Z,command:i,escapedCommand:o,parsed:n,timedOut:y,isCanceled:l.isCanceled,killed:s.killed});if(!n.options.reject)return O;throw O}return{command:i,escapedCommand:o,exitCode:0,stdout:X,stderr:B,all:Z,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return O2(s,n.options.input),s.all=B2(s,n.options),nE(s,d)};pa.exports=pd;pa.exports.sync=(r,e,t)=>{let n=cE(r,e,t),i=oE(r,e),o=aE(r,e);F2(n.options);let s;try{s=Cg.spawnSync(n.file,n.args,n.options)}catch(u){throw ld({error:u,stdout:"",stderr:"",all:"",command:i,escapedCommand:o,parsed:n,timedOut:!1,isCanceled:!1,killed:!1})}let a=Au(n.options,s.stdout,s.error),c=Au(n.options,s.stderr,s.error);if(s.error||s.status!==0||s.signal!==null){let u=ld({stdout:a,stderr:c,error:s.error,signal:s.signal,exitCode:s.status,command:i,escapedCommand:o,parsed:n,timedOut:s.error&&s.error.code==="ETIMEDOUT",isCanceled:!1,killed:s.signal!==null});if(!n.options.reject)return u;throw u}return{command:i,escapedCommand:o,exitCode:0,stdout:a,stderr:c,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}};pa.exports.command=(r,e)=>{let[t,...n]=sE(r);return pd(t,n,e)};pa.exports.commandSync=(r,e)=>{let[t,...n]=sE(r);return pd.sync(t,n,e)};pa.exports.node=(r,e,t={})=>{e&&!Array.isArray(e)&&typeof e=="object"&&(t=e,e=[]);let n=iE.node(t),i=process.execArgv.filter(a=>!a.startsWith("--inspect")),{nodePath:o=process.execPath,nodeOptions:s=i}=t;return pd(o,[...s,r,...Array.isArray(e)?e:[]],{...t,stdin:void 0,stdout:void 0,stderr:void 0,stdio:n,shell:!1})}});var vE=v((_Q,Eu)=>{var yE={};yE.__wbindgen_placeholder__=Eu.exports;var Zr,{TextDecoder:z2}=H("util"),bE=new z2("utf-8",{ignoreBOM:!0,fatal:!0});bE.decode();var hd=null;function Bg(){return(hd===null||hd.buffer!==Zr.memory.buffer)&&(hd=new Uint8Array(Zr.memory.buffer)),hd}function J2(r,e){return bE.decode(Bg().subarray(r,r+e))}var Og=0;function gE(r,e){let t=e(r.length*1);return Bg().set(r,t/1),Og=r.length,t}var Ng=class r{static __wrap(e){let t=Object.create(r.prototype);return t.ptr=e,t}__destroy_into_raw(){let e=this.ptr;return this.ptr=0,e}free(){let e=this.__destroy_into_raw();Zr.__wbg_hasher_free(e)}constructor(){var e=Zr.hasher_new();return r.__wrap(e)}update(e){var t=gE(e,Zr.__wbindgen_malloc),n=Og;Zr.hasher_update(this.ptr,t,n)}digest(e){try{var t=gE(e,Zr.__wbindgen_malloc),n=Og;Zr.hasher_digest(this.ptr,t,n)}finally{e.set(Bg().subarray(t/1,t/1+n)),Zr.__wbindgen_free(t,n*1)}}};Eu.exports.Hasher=Ng;Eu.exports.__wbindgen_throw=function(r,e){throw new Error(J2(r,e))};var Y2=H("path").join(__dirname,"chromehash_bg.wasm"),Q2=H("fs").readFileSync(Y2),Z2=new WebAssembly.Module(Q2),ej=new WebAssembly.Instance(Z2,yE);Zr=ej.exports;Eu.exports.__wasm=Zr});var EE=v(Cn=>{"use strict";Object.defineProperty(Cn,"__esModule",{value:!0});Cn.shaHashFile=Cn.hashFile=Cn.shaHash=Cn.hash=void 0;var AE=vE(),wE=H("fs"),IE=H("string_decoder"),SE=H("crypto"),Hd=Buffer.alloc(4*5),tj=r=>{let e=new AE.Hasher;return e.update(oj(r)),e.digest(Hd),e.free(),Hd.toString("hex")};Cn.hash=tj;var rj=r=>{let e=(0,SE.createHash)("sha256");return e.update(sj(r)),e.digest("hex")};Cn.shaHash=rj;var nj=async(r,e=4096)=>{e%2===1&&e++;let t=Buffer.alloc(e),n=new AE.Hasher,i;try{i=await wE.promises.open(r,"r");let o=await i.read(t,0,t.length,null),s=t.slice(0,o.bytesRead);if(yd(s))for(n.update(s.slice(2));o.bytesRead===t.length;)o=await i.read(t,0,t.length,null),n.update(t.slice(0,o.bytesRead));else if(bd(s))for(n.update(s.slice(2).swap16());o.bytesRead===t.length;)o=await i.read(t,0,t.length,null),n.update(t.slice(0,o.bytesRead).swap16());else if(gd(s)){let a=new IE.StringDecoder("utf8");for(n.update(Buffer.from(a.write(s.slice(3)),"utf16le"));o.bytesRead===t.length;)o=await i.read(t,0,t.length,null),n.update(Buffer.from(a.write(t.slice(0,o.bytesRead)),"utf16le"))}else{let a=new IE.StringDecoder("utf8");for(n.update(Buffer.from(a.write(s),"utf16le"));o.bytesRead===t.length;)o=await i.read(t,0,t.length,null),n.update(Buffer.from(a.write(t.slice(0,o.bytesRead)),"utf16le"))}return n.digest(Hd),Hd.toString("hex")}finally{n.free(),i!==void 0&&await i.close()}};Cn.hashFile=nj;var md={stream:!0},ij=async(r,e=4096)=>{e%2===1&&e++;let t=Buffer.alloc(e),n=(0,SE.createHash)("sha256"),i;try{i=await wE.promises.open(r,"r");let o=await i.read(t,0,t.length,null),s=t.slice(0,o.bytesRead);if(yd(s)){let a=new TextDecoder("utf-16le");for(n.update(a.decode(s.slice(2),md));o.bytesRead>0;)o=await i.read(t,0,t.length,null),n.update(a.decode(t.slice(0,o.bytesRead),md))}else if(bd(s)){let a=new TextDecoder("utf-16be");for(n.update(a.decode(s.slice(2),md));o.bytesRead>0;)o=await i.read(t,0,t.length,null),n.update(a.decode(t.slice(0,o.bytesRead),md))}else if(gd(s))for(n.update(s.slice(3));o.bytesRead>0;)o=await i.read(t,0,t.length,null),n.update(t.slice(0,o.bytesRead));else for(n.update(s);o.bytesRead>0;)o=await i.read(t,0,t.length,null),n.update(t.slice(0,o.bytesRead));return n.digest("hex")}finally{await i?.close()}};Cn.shaHashFile=ij;var gd=r=>r.length>=3&&r[0]===239&&r[1]===187&&r[2]===191,yd=r=>r.length>=2&&r[0]===255&&r[1]===254,bd=r=>r.length>=2&&r[0]===254&&r[1]===255,oj=r=>gd(r)?_E(r.slice(3)):yd(r)?r.slice(2):bd(r)?r.slice(2).swap16():_E(r),sj=r=>gd(r)?r.slice(3):yd(r)?new TextEncoder().encode(new TextDecoder("utf-16le").decode(r.slice(2))):bd(r)?new TextEncoder().encode(new TextDecoder("utf-16be").decode(r.slice(2))):r,_E=r=>Buffer.from(r.toString("utf8"),"utf16le")});var mf=v($r=>{"use strict";$r.isInteger=r=>typeof r=="number"?Number.isInteger(r):typeof r=="string"&&r.trim()!==""?Number.isInteger(Number(r)):!1;$r.find=(r,e)=>r.nodes.find(t=>t.type===e);$r.exceedsLimit=(r,e,t=1,n)=>n===!1||!$r.isInteger(r)||!$r.isInteger(e)?!1:(Number(e)-Number(r))/Number(t)>=n;$r.escapeNode=(r,e=0,t)=>{let n=r.nodes[e];n&&(t&&n.type===t||n.type==="open"||n.type==="close")&&n.escaped!==!0&&(n.value="\\"+n.value,n.escaped=!0)};$r.encloseBrace=r=>r.type!=="brace"||r.commas>>0+r.ranges>>0?!1:(r.invalid=!0,!0);$r.isInvalidBrace=r=>r.type!=="brace"?!1:r.invalid===!0||r.dollar?!0:!(r.commas>>0+r.ranges>>0)||r.open!==!0||r.close!==!0?(r.invalid=!0,!0):!1;$r.isOpenOrClose=r=>r.type==="open"||r.type==="close"?!0:r.open===!0||r.close===!0;$r.reduce=r=>r.reduce((e,t)=>(t.type==="text"&&e.push(t.value),t.type==="range"&&(t.type="text"),e),[]);$r.flatten=(...r)=>{let e=[],t=n=>{for(let i=0;i{"use strict";var Ox=mf();Nx.exports=(r,e={})=>{let t=(n,i={})=>{let o=e.escapeInvalid&&Ox.isInvalidBrace(i),s=n.invalid===!0&&e.escapeInvalid===!0,a="";if(n.value)return(o||s)&&Ox.isOpenOrClose(n)?"\\"+n.value:n.value;if(n.value)return n.value;if(n.nodes)for(let c of n.nodes)a+=t(c);return a};return t(r)}});var Fx=v((Vte,Bx)=>{"use strict";Bx.exports=function(r){return typeof r=="number"?r-r===0:typeof r=="string"&&r.trim()!==""?Number.isFinite?Number.isFinite(+r):isFinite(+r):!1}});var zx=v((qte,Xx)=>{"use strict";var Ux=Fx(),ss=(r,e,t)=>{if(Ux(r)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(e===void 0||r===e)return String(r);if(Ux(e)===!1)throw new TypeError("toRegexRange: expected the second argument to be a number.");let n={relaxZeros:!0,...t};typeof n.strictZeros=="boolean"&&(n.relaxZeros=n.strictZeros===!1);let i=String(n.relaxZeros),o=String(n.shorthand),s=String(n.capture),a=String(n.wrap),c=r+":"+e+"="+i+o+s+a;if(ss.cache.hasOwnProperty(c))return ss.cache[c].result;let u=Math.min(r,e),l=Math.max(r,e);if(Math.abs(u-l)===1){let m=r+"|"+e;return n.capture?`(${m})`:n.wrap===!1?m:`(?:${m})`}let p=Kx(r)||Kx(e),d={min:r,max:e,a:u,b:l},f=[],h=[];if(p&&(d.isPadded=p,d.maxLen=String(d.max).length),u<0){let m=l<0?Math.abs(l):1;h=Wx(m,Math.abs(u),d,n),u=d.a=0}return l>=0&&(f=Wx(u,l,d,n)),d.negatives=h,d.positives=f,d.result=rq(h,f,n),n.capture===!0?d.result=`(${d.result})`:n.wrap!==!1&&f.length+h.length>1&&(d.result=`(?:${d.result})`),ss.cache[c]=d,d.result};function rq(r,e,t){let n=$y(r,e,"-",!1,t)||[],i=$y(e,r,"",!1,t)||[],o=$y(r,e,"-?",!0,t)||[];return n.concat(o).concat(i).join("|")}function nq(r,e){let t=1,n=1,i=Vx(r,t),o=new Set([e]);for(;r<=i&&i<=e;)o.add(i),t+=1,i=Vx(r,t);for(i=qx(e+1,n)-1;r1&&a.count.pop(),a.count.push(l.count[0]),a.string=a.pattern+Gx(a.count),s=u+1;continue}t.isPadded&&(p=cq(u,t,n)),l.string=p+l.pattern+Gx(l.count),o.push(l),s=u+1,a=l}return o}function $y(r,e,t,n,i){let o=[];for(let s of r){let{string:a}=s;!n&&!jx(e,"string",a)&&o.push(t+a),n&&jx(e,"string",a)&&o.push(t+a)}return o}function oq(r,e){let t=[];for(let n=0;ne?1:e>r?-1:0}function jx(r,e,t){return r.some(n=>n[e]===t)}function Vx(r,e){return Number(String(r).slice(0,-e)+"9".repeat(e))}function qx(r,e){return r-r%Math.pow(10,e)}function Gx(r){let[e=0,t=""]=r;return t||e>1?`{${e+(t?","+t:"")}}`:""}function aq(r,e,t){return`[${r}${e-r===1?"":"-"}${e}]`}function Kx(r){return/^-?(0+)\d/.test(r)}function cq(r,e,t){if(!e.isPadded)return r;let n=Math.abs(e.maxLen-String(r).length),i=t.relaxZeros!==!1;switch(n){case 0:return"";case 1:return i?"0?":"0";case 2:return i?"0{0,2}":"00";default:return i?`0{0,${n}}`:`0{${n}}`}}ss.cache={};ss.clearCache=()=>ss.cache={};Xx.exports=ss});var Ty=v((Gte,rP)=>{"use strict";var uq=H("util"),Yx=zx(),Jx=r=>r!==null&&typeof r=="object"&&!Array.isArray(r),lq=r=>e=>r===!0?Number(e):String(e),Cy=r=>typeof r=="number"||typeof r=="string"&&r!=="",Yu=r=>Number.isInteger(+r),Dy=r=>{let e=`${r}`,t=-1;if(e[0]==="-"&&(e=e.slice(1)),e==="0")return!1;for(;e[++t]==="0";);return t>0},pq=(r,e,t)=>typeof r=="string"||typeof e=="string"?!0:t.stringify===!0,dq=(r,e,t)=>{if(e>0){let n=r[0]==="-"?"-":"";n&&(r=r.slice(1)),r=n+r.padStart(n?e-1:e,"0")}return t===!1?String(r):r},yf=(r,e)=>{let t=r[0]==="-"?"-":"";for(t&&(r=r.slice(1),e--);r.length{r.negatives.sort((a,c)=>ac?1:0),r.positives.sort((a,c)=>ac?1:0);let n=e.capture?"":"?:",i="",o="",s;return r.positives.length&&(i=r.positives.map(a=>yf(String(a),t)).join("|")),r.negatives.length&&(o=`-(${n}${r.negatives.map(a=>yf(String(a),t)).join("|")})`),i&&o?s=`${i}|${o}`:s=i||o,e.wrap?`(${n}${s})`:s},Qx=(r,e,t,n)=>{if(t)return Yx(r,e,{wrap:!1,...n});let i=String.fromCharCode(r);if(r===e)return i;let o=String.fromCharCode(e);return`[${i}-${o}]`},Zx=(r,e,t)=>{if(Array.isArray(r)){let n=t.wrap===!0,i=t.capture?"":"?:";return n?`(${i}${r.join("|")})`:r.join("|")}return Yx(r,e,t)},eP=(...r)=>new RangeError("Invalid range arguments: "+uq.inspect(...r)),tP=(r,e,t)=>{if(t.strictRanges===!0)throw eP([r,e]);return[]},hq=(r,e)=>{if(e.strictRanges===!0)throw new TypeError(`Expected step "${r}" to be a number`);return[]},mq=(r,e,t=1,n={})=>{let i=Number(r),o=Number(e);if(!Number.isInteger(i)||!Number.isInteger(o)){if(n.strictRanges===!0)throw eP([r,e]);return[]}i===0&&(i=0),o===0&&(o=0);let s=i>o,a=String(r),c=String(e),u=String(t);t=Math.max(Math.abs(t),1);let l=Dy(a)||Dy(c)||Dy(u),p=l?Math.max(a.length,c.length,u.length):0,d=l===!1&&pq(r,e,n)===!1,f=n.transform||lq(d);if(n.toRegex&&t===1)return Qx(yf(r,p),yf(e,p),!0,n);let h={negatives:[],positives:[]},m=D=>h[D<0?"negatives":"positives"].push(Math.abs(D)),y=[],w=0;for(;s?i>=o:i<=o;)n.toRegex===!0&&t>1?m(i):y.push(dq(f(i,w),p,d)),i=s?i-t:i+t,w++;return n.toRegex===!0?t>1?fq(h,n,p):Zx(y,null,{wrap:!1,...n}):y},Hq=(r,e,t=1,n={})=>{if(!Yu(r)&&r.length>1||!Yu(e)&&e.length>1)return tP(r,e,n);let i=n.transform||(d=>String.fromCharCode(d)),o=`${r}`.charCodeAt(0),s=`${e}`.charCodeAt(0),a=o>s,c=Math.min(o,s),u=Math.max(o,s);if(n.toRegex&&t===1)return Qx(c,u,!1,n);let l=[],p=0;for(;a?o>=s:o<=s;)l.push(i(o,p)),o=a?o-t:o+t,p++;return n.toRegex===!0?Zx(l,null,{wrap:!1,options:n}):l},gf=(r,e,t,n={})=>{if(e==null&&Cy(r))return[r];if(!Cy(r)||!Cy(e))return tP(r,e,n);if(typeof t=="function")return gf(r,e,1,{transform:t});if(Jx(t))return gf(r,e,0,t);let i={...n};return i.capture===!0&&(i.wrap=!0),t=t||i.step||1,Yu(t)?Yu(r)&&Yu(e)?mq(r,e,t,i):Hq(r,e,Math.max(Math.abs(t),1),i):t!=null&&!Jx(t)?hq(t,i):gf(r,e,1,t)};rP.exports=gf});var oP=v((Kte,iP)=>{"use strict";var gq=Ty(),nP=mf(),yq=(r,e={})=>{let t=(n,i={})=>{let o=nP.isInvalidBrace(i),s=n.invalid===!0&&e.escapeInvalid===!0,a=o===!0||s===!0,c=e.escapeInvalid===!0?"\\":"",u="";if(n.isOpen===!0)return c+n.value;if(n.isClose===!0)return console.log("node.isClose",c,n.value),c+n.value;if(n.type==="open")return a?c+n.value:"(";if(n.type==="close")return a?c+n.value:")";if(n.type==="comma")return n.prev.type==="comma"?"":a?n.value:"|";if(n.value)return n.value;if(n.nodes&&n.ranges>0){let l=nP.reduce(n.nodes),p=gq(...l,{...e,wrap:!1,toRegex:!0,strictZeros:!0});if(p.length!==0)return l.length>1&&p.length>1?`(${p})`:p}if(n.nodes)for(let l of n.nodes)u+=t(l,n);return u};return t(r)};iP.exports=yq});var cP=v((Xte,aP)=>{"use strict";var bq=Ty(),sP=Hf(),Ua=mf(),as=(r="",e="",t=!1)=>{let n=[];if(r=[].concat(r),e=[].concat(e),!e.length)return r;if(!r.length)return t?Ua.flatten(e).map(i=>`{${i}}`):e;for(let i of r)if(Array.isArray(i))for(let o of i)n.push(as(o,e,t));else for(let o of e)t===!0&&typeof o=="string"&&(o=`{${o}}`),n.push(Array.isArray(o)?as(i,o,t):i+o);return Ua.flatten(n)},vq=(r,e={})=>{let t=e.rangeLimit===void 0?1e3:e.rangeLimit,n=(i,o={})=>{i.queue=[];let s=o,a=o.queue;for(;s.type!=="brace"&&s.type!=="root"&&s.parent;)s=s.parent,a=s.queue;if(i.invalid||i.dollar){a.push(as(a.pop(),sP(i,e)));return}if(i.type==="brace"&&i.invalid!==!0&&i.nodes.length===2){a.push(as(a.pop(),["{}"]));return}if(i.nodes&&i.ranges>0){let p=Ua.reduce(i.nodes);if(Ua.exceedsLimit(...p,e.step,t))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let d=bq(...p,e);d.length===0&&(d=sP(i,e)),a.push(as(a.pop(),d)),i.nodes=[];return}let c=Ua.encloseBrace(i),u=i.queue,l=i;for(;l.type!=="brace"&&l.type!=="root"&&l.parent;)l=l.parent,u=l.queue;for(let p=0;p{"use strict";uP.exports={MAX_LENGTH:1e4,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:` +`,CHAR_NO_BREAK_SPACE:"\xA0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"}});var mP=v((Jte,hP)=>{"use strict";var Iq=Hf(),{MAX_LENGTH:pP,CHAR_BACKSLASH:My,CHAR_BACKTICK:_q,CHAR_COMMA:Aq,CHAR_DOT:wq,CHAR_LEFT_PARENTHESES:Sq,CHAR_RIGHT_PARENTHESES:Eq,CHAR_LEFT_CURLY_BRACE:xq,CHAR_RIGHT_CURLY_BRACE:Pq,CHAR_LEFT_SQUARE_BRACKET:dP,CHAR_RIGHT_SQUARE_BRACKET:fP,CHAR_DOUBLE_QUOTE:Lq,CHAR_SINGLE_QUOTE:$q,CHAR_NO_BREAK_SPACE:Cq,CHAR_ZERO_WIDTH_NOBREAK_SPACE:Dq}=lP(),Tq=(r,e={})=>{if(typeof r!="string")throw new TypeError("Expected a string");let t=e||{},n=typeof t.maxLength=="number"?Math.min(pP,t.maxLength):pP;if(r.length>n)throw new SyntaxError(`Input length (${r.length}), exceeds max characters (${n})`);let i={type:"root",input:r,nodes:[]},o=[i],s=i,a=i,c=0,u=r.length,l=0,p=0,d,f=()=>r[l++],h=m=>{if(m.type==="text"&&a.type==="dot"&&(a.type="text"),a&&a.type==="text"&&m.type==="text"){a.value+=m.value;return}return s.nodes.push(m),m.parent=s,m.prev=a,a=m,m};for(h({type:"bos"});l0){if(s.ranges>0){s.ranges=0;let m=s.nodes.shift();s.nodes=[m,{type:"text",value:Iq(s)}]}h({type:"comma",value:d}),s.commas++;continue}if(d===wq&&p>0&&s.commas===0){let m=s.nodes;if(p===0||m.length===0){h({type:"text",value:d});continue}if(a.type==="dot"){if(s.range=[],a.value+=d,a.type="range",s.nodes.length!==3&&s.nodes.length!==5){s.invalid=!0,s.ranges=0,a.type="text";continue}s.ranges++,s.args=[];continue}if(a.type==="range"){m.pop();let y=m[m.length-1];y.value+=a.value+d,a=y,s.ranges--;continue}h({type:"dot",value:d});continue}h({type:"text",value:d})}do if(s=o.pop(),s.type!=="root"){s.nodes.forEach(w=>{w.nodes||(w.type==="open"&&(w.isOpen=!0),w.type==="close"&&(w.isClose=!0),w.nodes||(w.type="text"),w.invalid=!0)});let m=o[o.length-1],y=m.nodes.indexOf(s);m.nodes.splice(y,1,...s.nodes)}while(o.length>0);return h({type:"eos"}),i};hP.exports=Tq});var yP=v((Yte,gP)=>{"use strict";var HP=Hf(),Mq=oP(),Rq=cP(),kq=mP(),ar=(r,e={})=>{let t=[];if(Array.isArray(r))for(let n of r){let i=ar.create(n,e);Array.isArray(i)?t.push(...i):t.push(i)}else t=[].concat(ar.create(r,e));return e&&e.expand===!0&&e.nodupes===!0&&(t=[...new Set(t)]),t};ar.parse=(r,e={})=>kq(r,e);ar.stringify=(r,e={})=>HP(typeof r=="string"?ar.parse(r,e):r,e);ar.compile=(r,e={})=>(typeof r=="string"&&(r=ar.parse(r,e)),Mq(r,e));ar.expand=(r,e={})=>{typeof r=="string"&&(r=ar.parse(r,e));let t=Rq(r,e);return e.noempty===!0&&(t=t.filter(Boolean)),e.nodupes===!0&&(t=[...new Set(t)]),t};ar.create=(r,e={})=>r===""||r.length<3?[r]:e.expand!==!0?ar.compile(r,e):ar.expand(r,e);gP.exports=ar});var Qu=v((Qte,AP)=>{"use strict";var Oq=H("path"),Vn="\\\\/",bP=`[^${Vn}]`,bi="\\.",Nq="\\+",Bq="\\?",bf="\\/",Fq="(?=.)",vP="[^/]",Ry=`(?:${bf}|$)`,IP=`(?:^|${bf})`,ky=`${bi}{1,2}${Ry}`,Uq=`(?!${bi})`,Wq=`(?!${IP}${ky})`,jq=`(?!${bi}{0,1}${Ry})`,Vq=`(?!${ky})`,qq=`[^.${bf}]`,Gq=`${vP}*?`,_P={DOT_LITERAL:bi,PLUS_LITERAL:Nq,QMARK_LITERAL:Bq,SLASH_LITERAL:bf,ONE_CHAR:Fq,QMARK:vP,END_ANCHOR:Ry,DOTS_SLASH:ky,NO_DOT:Uq,NO_DOTS:Wq,NO_DOT_SLASH:jq,NO_DOTS_SLASH:Vq,QMARK_NO_DOT:qq,STAR:Gq,START_ANCHOR:IP},Kq={..._P,SLASH_LITERAL:`[${Vn}]`,QMARK:bP,STAR:`${bP}*?`,DOTS_SLASH:`${bi}{1,2}(?:[${Vn}]|$)`,NO_DOT:`(?!${bi})`,NO_DOTS:`(?!(?:^|[${Vn}])${bi}{1,2}(?:[${Vn}]|$))`,NO_DOT_SLASH:`(?!${bi}{0,1}(?:[${Vn}]|$))`,NO_DOTS_SLASH:`(?!${bi}{1,2}(?:[${Vn}]|$))`,QMARK_NO_DOT:`[^.${Vn}]`,START_ANCHOR:`(?:^|[${Vn}])`,END_ANCHOR:`(?:[${Vn}]|$)`},Xq={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};AP.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:Xq,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:Oq.sep,extglobChars(r){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${r.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(r){return r===!0?Kq:_P}}});var Zu=v(Qt=>{"use strict";var zq=H("path"),Jq=process.platform==="win32",{REGEX_BACKSLASH:Yq,REGEX_REMOVE_BACKSLASH:Qq,REGEX_SPECIAL_CHARS:Zq,REGEX_SPECIAL_CHARS_GLOBAL:e8}=Qu();Qt.isObject=r=>r!==null&&typeof r=="object"&&!Array.isArray(r);Qt.hasRegexChars=r=>Zq.test(r);Qt.isRegexChar=r=>r.length===1&&Qt.hasRegexChars(r);Qt.escapeRegex=r=>r.replace(e8,"\\$1");Qt.toPosixSlashes=r=>r.replace(Yq,"/");Qt.removeBackslashes=r=>r.replace(Qq,e=>e==="\\"?"":e);Qt.supportsLookbehinds=()=>{let r=process.version.slice(1).split(".").map(Number);return r.length===3&&r[0]>=9||r[0]===8&&r[1]>=10};Qt.isWindows=r=>r&&typeof r.windows=="boolean"?r.windows:Jq===!0||zq.sep==="\\";Qt.escapeLast=(r,e,t)=>{let n=r.lastIndexOf(e,t);return n===-1?r:r[n-1]==="\\"?Qt.escapeLast(r,e,n-1):`${r.slice(0,n)}\\${r.slice(n)}`};Qt.removePrefix=(r,e={})=>{let t=r;return t.startsWith("./")&&(t=t.slice(2),e.prefix="./"),t};Qt.wrapOutput=(r,e={},t={})=>{let n=t.contains?"":"^",i=t.contains?"":"$",o=`${n}(?:${r})${i}`;return e.negated===!0&&(o=`(?:^(?!${o}).*$)`),o}});var CP=v((ere,$P)=>{"use strict";var wP=Zu(),{CHAR_ASTERISK:Oy,CHAR_AT:t8,CHAR_BACKWARD_SLASH:el,CHAR_COMMA:r8,CHAR_DOT:Ny,CHAR_EXCLAMATION_MARK:By,CHAR_FORWARD_SLASH:LP,CHAR_LEFT_CURLY_BRACE:Fy,CHAR_LEFT_PARENTHESES:Uy,CHAR_LEFT_SQUARE_BRACKET:n8,CHAR_PLUS:i8,CHAR_QUESTION_MARK:SP,CHAR_RIGHT_CURLY_BRACE:o8,CHAR_RIGHT_PARENTHESES:EP,CHAR_RIGHT_SQUARE_BRACKET:s8}=Qu(),xP=r=>r===LP||r===el,PP=r=>{r.isPrefix!==!0&&(r.depth=r.isGlobstar?1/0:1)},a8=(r,e)=>{let t=e||{},n=r.length-1,i=t.parts===!0||t.scanToEnd===!0,o=[],s=[],a=[],c=r,u=-1,l=0,p=0,d=!1,f=!1,h=!1,m=!1,y=!1,w=!1,D=!1,j=!1,X=!1,B=!1,Z=0,O,G,re={value:"",depth:0,isGlob:!1},xe=()=>u>=n,$=()=>c.charCodeAt(u+1),Pe=()=>(O=G,c.charCodeAt(++u));for(;u0&&(Kr=c.slice(0,l),c=c.slice(l),p-=l),_e&&h===!0&&p>0?(_e=c.slice(0,p),x=c.slice(p)):h===!0?(_e="",x=c):_e=c,_e&&_e!==""&&_e!=="/"&&_e!==c&&xP(_e.charCodeAt(_e.length-1))&&(_e=_e.slice(0,-1)),t.unescape===!0&&(x&&(x=wP.removeBackslashes(x)),_e&&D===!0&&(_e=wP.removeBackslashes(_e)));let P={prefix:Kr,input:r,start:l,base:_e,glob:x,isBrace:d,isBracket:f,isGlob:h,isExtglob:m,isGlobstar:y,negated:j,negatedExtglob:X};if(t.tokens===!0&&(P.maxDepth=0,xP(G)||s.push(re),P.tokens=s),t.parts===!0||t.tokens===!0){let pt;for(let le=0;le{"use strict";var vf=Qu(),cr=Zu(),{MAX_LENGTH:If,POSIX_REGEX_SOURCE:c8,REGEX_NON_SPECIAL_CHARS:u8,REGEX_SPECIAL_CHARS_BACKREF:l8,REPLACEMENTS:DP}=vf,p8=(r,e)=>{if(typeof e.expandRange=="function")return e.expandRange(...r,e);r.sort();let t=`[${r.join("-")}]`;try{new RegExp(t)}catch{return r.map(i=>cr.escapeRegex(i)).join("..")}return t},Wa=(r,e)=>`Missing ${r}: "${e}" - use "\\\\${e}" to match literal characters`,Wy=(r,e)=>{if(typeof r!="string")throw new TypeError("Expected a string");r=DP[r]||r;let t={...e},n=typeof t.maxLength=="number"?Math.min(If,t.maxLength):If,i=r.length;if(i>n)throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${n}`);let o={type:"bos",value:"",output:t.prepend||""},s=[o],a=t.capture?"":"?:",c=cr.isWindows(e),u=vf.globChars(c),l=vf.extglobChars(u),{DOT_LITERAL:p,PLUS_LITERAL:d,SLASH_LITERAL:f,ONE_CHAR:h,DOTS_SLASH:m,NO_DOT:y,NO_DOT_SLASH:w,NO_DOTS_SLASH:D,QMARK:j,QMARK_NO_DOT:X,STAR:B,START_ANCHOR:Z}=u,O=F=>`(${a}(?:(?!${Z}${F.dot?m:p}).)*?)`,G=t.dot?"":y,re=t.dot?j:X,xe=t.bash===!0?O(t):B;t.capture&&(xe=`(${xe})`),typeof t.noext=="boolean"&&(t.noextglob=t.noext);let $={input:r,index:-1,start:0,dot:t.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:s};r=cr.removePrefix(r,$),i=r.length;let Pe=[],_e=[],Kr=[],x=o,P,pt=()=>$.index===i-1,le=$.peek=(F=1)=>r[$.index+F],tr=$.advance=()=>r[++$.index]||"",rr=()=>r.slice($.index+1),St=(F="",ae=0)=>{$.consumed+=F,$.index+=ae},ee=F=>{$.output+=F.output!=null?F.output:F.value,St(F.value)},Ri=()=>{let F=1;for(;le()==="!"&&(le(2)!=="("||le(3)==="?");)tr(),$.start++,F++;return F%2===0?!1:($.negated=!0,$.start++,!0)},Gs=F=>{$[F]++,Kr.push(F)},be=F=>{$[F]--,Kr.pop()},oe=F=>{if(x.type==="globstar"){let ae=$.braces>0&&(F.type==="comma"||F.type==="brace"),k=F.extglob===!0||Pe.length&&(F.type==="pipe"||F.type==="paren");F.type!=="slash"&&F.type!=="paren"&&!ae&&!k&&($.output=$.output.slice(0,-x.output.length),x.type="star",x.value="*",x.output=xe,$.output+=x.output)}if(Pe.length&&F.type!=="paren"&&(Pe[Pe.length-1].inner+=F.value),(F.value||F.output)&&ee(F),x&&x.type==="text"&&F.type==="text"){x.output=(x.output||x.value)+F.value,x.value+=F.value;return}F.prev=x,s.push(F),x=F},Ks=(F,ae)=>{let k={...l[ae],conditions:1,inner:""};k.prev=x,k.parens=$.parens,k.output=$.output;let te=(t.capture?"(":"")+k.open;Gs("parens"),oe({type:F,value:ae,output:$.output?"":h}),oe({type:"paren",extglob:!0,value:tr(),output:te}),Pe.push(k)},hp=F=>{let ae=F.close+(t.capture?")":""),k;if(F.type==="negate"){let te=xe;if(F.inner&&F.inner.length>1&&F.inner.includes("/")&&(te=O(t)),(te!==xe||pt()||/^\)+$/.test(rr()))&&(ae=F.close=`)$))${te}`),F.inner.includes("*")&&(k=rr())&&/^\.[^\\/.]+$/.test(k)){let Le=Wy(k,{...e,fastpaths:!1}).output;ae=F.close=`)${Le})${te})`}F.prev.type==="bos"&&($.negatedExtglob=!0)}oe({type:"paren",extglob:!0,value:P,output:ae}),be("parens")};if(t.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(r)){let F=!1,ae=r.replace(l8,(k,te,Le,vt,Ue,Xs)=>vt==="\\"?(F=!0,k):vt==="?"?te?te+vt+(Ue?j.repeat(Ue.length):""):Xs===0?re+(Ue?j.repeat(Ue.length):""):j.repeat(Le.length):vt==="."?p.repeat(Le.length):vt==="*"?te?te+vt+(Ue?xe:""):xe:te?k:`\\${k}`);return F===!0&&(t.unescape===!0?ae=ae.replace(/\\/g,""):ae=ae.replace(/\\+/g,k=>k.length%2===0?"\\\\":k?"\\":"")),ae===r&&t.contains===!0?($.output=r,$):($.output=cr.wrapOutput(ae,$,e),$)}for(;!pt();){if(P=tr(),P==="\0")continue;if(P==="\\"){let k=le();if(k==="/"&&t.bash!==!0||k==="."||k===";")continue;if(!k){P+="\\",oe({type:"text",value:P});continue}let te=/^\\+/.exec(rr()),Le=0;if(te&&te[0].length>2&&(Le=te[0].length,$.index+=Le,Le%2!==0&&(P+="\\")),t.unescape===!0?P=tr():P+=tr(),$.brackets===0){oe({type:"text",value:P});continue}}if($.brackets>0&&(P!=="]"||x.value==="["||x.value==="[^")){if(t.posix!==!1&&P===":"){let k=x.value.slice(1);if(k.includes("[")&&(x.posix=!0,k.includes(":"))){let te=x.value.lastIndexOf("["),Le=x.value.slice(0,te),vt=x.value.slice(te+2),Ue=c8[vt];if(Ue){x.value=Le+Ue,$.backtrack=!0,tr(),!o.output&&s.indexOf(x)===1&&(o.output=h);continue}}}(P==="["&&le()!==":"||P==="-"&&le()==="]")&&(P=`\\${P}`),P==="]"&&(x.value==="["||x.value==="[^")&&(P=`\\${P}`),t.posix===!0&&P==="!"&&x.value==="["&&(P="^"),x.value+=P,ee({value:P});continue}if($.quotes===1&&P!=='"'){P=cr.escapeRegex(P),x.value+=P,ee({value:P});continue}if(P==='"'){$.quotes=$.quotes===1?0:1,t.keepQuotes===!0&&oe({type:"text",value:P});continue}if(P==="("){Gs("parens"),oe({type:"paren",value:P});continue}if(P===")"){if($.parens===0&&t.strictBrackets===!0)throw new SyntaxError(Wa("opening","("));let k=Pe[Pe.length-1];if(k&&$.parens===k.parens+1){hp(Pe.pop());continue}oe({type:"paren",value:P,output:$.parens?")":"\\)"}),be("parens");continue}if(P==="["){if(t.nobracket===!0||!rr().includes("]")){if(t.nobracket!==!0&&t.strictBrackets===!0)throw new SyntaxError(Wa("closing","]"));P=`\\${P}`}else Gs("brackets");oe({type:"bracket",value:P});continue}if(P==="]"){if(t.nobracket===!0||x&&x.type==="bracket"&&x.value.length===1){oe({type:"text",value:P,output:`\\${P}`});continue}if($.brackets===0){if(t.strictBrackets===!0)throw new SyntaxError(Wa("opening","["));oe({type:"text",value:P,output:`\\${P}`});continue}be("brackets");let k=x.value.slice(1);if(x.posix!==!0&&k[0]==="^"&&!k.includes("/")&&(P=`/${P}`),x.value+=P,ee({value:P}),t.literalBrackets===!1||cr.hasRegexChars(k))continue;let te=cr.escapeRegex(x.value);if($.output=$.output.slice(0,-x.value.length),t.literalBrackets===!0){$.output+=te,x.value=te;continue}x.value=`(${a}${te}|${x.value})`,$.output+=x.value;continue}if(P==="{"&&t.nobrace!==!0){Gs("braces");let k={type:"brace",value:P,output:"(",outputIndex:$.output.length,tokensIndex:$.tokens.length};_e.push(k),oe(k);continue}if(P==="}"){let k=_e[_e.length-1];if(t.nobrace===!0||!k){oe({type:"text",value:P,output:P});continue}let te=")";if(k.dots===!0){let Le=s.slice(),vt=[];for(let Ue=Le.length-1;Ue>=0&&(s.pop(),Le[Ue].type!=="brace");Ue--)Le[Ue].type!=="dots"&&vt.unshift(Le[Ue].value);te=p8(vt,t),$.backtrack=!0}if(k.comma!==!0&&k.dots!==!0){let Le=$.output.slice(0,k.outputIndex),vt=$.tokens.slice(k.tokensIndex);k.value=k.output="\\{",P=te="\\}",$.output=Le;for(let Ue of vt)$.output+=Ue.output||Ue.value}oe({type:"brace",value:P,output:te}),be("braces"),_e.pop();continue}if(P==="|"){Pe.length>0&&Pe[Pe.length-1].conditions++,oe({type:"text",value:P});continue}if(P===","){let k=P,te=_e[_e.length-1];te&&Kr[Kr.length-1]==="braces"&&(te.comma=!0,k="|"),oe({type:"comma",value:P,output:k});continue}if(P==="/"){if(x.type==="dot"&&$.index===$.start+1){$.start=$.index+1,$.consumed="",$.output="",s.pop(),x=o;continue}oe({type:"slash",value:P,output:f});continue}if(P==="."){if($.braces>0&&x.type==="dot"){x.value==="."&&(x.output=p);let k=_e[_e.length-1];x.type="dots",x.output+=P,x.value+=P,k.dots=!0;continue}if($.braces+$.parens===0&&x.type!=="bos"&&x.type!=="slash"){oe({type:"text",value:P,output:p});continue}oe({type:"dot",value:P,output:p});continue}if(P==="?"){if(!(x&&x.value==="(")&&t.noextglob!==!0&&le()==="("&&le(2)!=="?"){Ks("qmark",P);continue}if(x&&x.type==="paren"){let te=le(),Le=P;if(te==="<"&&!cr.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(x.value==="("&&!/[!=<:]/.test(te)||te==="<"&&!/<([!=]|\w+>)/.test(rr()))&&(Le=`\\${P}`),oe({type:"text",value:P,output:Le});continue}if(t.dot!==!0&&(x.type==="slash"||x.type==="bos")){oe({type:"qmark",value:P,output:X});continue}oe({type:"qmark",value:P,output:j});continue}if(P==="!"){if(t.noextglob!==!0&&le()==="("&&(le(2)!=="?"||!/[!=<:]/.test(le(3)))){Ks("negate",P);continue}if(t.nonegate!==!0&&$.index===0){Ri();continue}}if(P==="+"){if(t.noextglob!==!0&&le()==="("&&le(2)!=="?"){Ks("plus",P);continue}if(x&&x.value==="("||t.regex===!1){oe({type:"plus",value:P,output:d});continue}if(x&&(x.type==="bracket"||x.type==="paren"||x.type==="brace")||$.parens>0){oe({type:"plus",value:P});continue}oe({type:"plus",value:d});continue}if(P==="@"){if(t.noextglob!==!0&&le()==="("&&le(2)!=="?"){oe({type:"at",extglob:!0,value:P,output:""});continue}oe({type:"text",value:P});continue}if(P!=="*"){(P==="$"||P==="^")&&(P=`\\${P}`);let k=u8.exec(rr());k&&(P+=k[0],$.index+=k[0].length),oe({type:"text",value:P});continue}if(x&&(x.type==="globstar"||x.star===!0)){x.type="star",x.star=!0,x.value+=P,x.output=xe,$.backtrack=!0,$.globstar=!0,St(P);continue}let F=rr();if(t.noextglob!==!0&&/^\([^?]/.test(F)){Ks("star",P);continue}if(x.type==="star"){if(t.noglobstar===!0){St(P);continue}let k=x.prev,te=k.prev,Le=k.type==="slash"||k.type==="bos",vt=te&&(te.type==="star"||te.type==="globstar");if(t.bash===!0&&(!Le||F[0]&&F[0]!=="/")){oe({type:"star",value:P,output:""});continue}let Ue=$.braces>0&&(k.type==="comma"||k.type==="brace"),Xs=Pe.length&&(k.type==="pipe"||k.type==="paren");if(!Le&&k.type!=="paren"&&!Ue&&!Xs){oe({type:"star",value:P,output:""});continue}for(;F.slice(0,3)==="/**";){let Mo=r[$.index+4];if(Mo&&Mo!=="/")break;F=F.slice(3),St("/**",3)}if(k.type==="bos"&&pt()){x.type="globstar",x.value+=P,x.output=O(t),$.output=x.output,$.globstar=!0,St(P);continue}if(k.type==="slash"&&k.prev.type!=="bos"&&!vt&&pt()){$.output=$.output.slice(0,-(k.output+x.output).length),k.output=`(?:${k.output}`,x.type="globstar",x.output=O(t)+(t.strictSlashes?")":"|$)"),x.value+=P,$.globstar=!0,$.output+=k.output+x.output,St(P);continue}if(k.type==="slash"&&k.prev.type!=="bos"&&F[0]==="/"){let Mo=F[1]!==void 0?"|$":"";$.output=$.output.slice(0,-(k.output+x.output).length),k.output=`(?:${k.output}`,x.type="globstar",x.output=`${O(t)}${f}|${f}${Mo})`,x.value+=P,$.output+=k.output+x.output,$.globstar=!0,St(P+tr()),oe({type:"slash",value:"/",output:""});continue}if(k.type==="bos"&&F[0]==="/"){x.type="globstar",x.value+=P,x.output=`(?:^|${f}|${O(t)}${f})`,$.output=x.output,$.globstar=!0,St(P+tr()),oe({type:"slash",value:"/",output:""});continue}$.output=$.output.slice(0,-x.output.length),x.type="globstar",x.output=O(t),x.value+=P,$.output+=x.output,$.globstar=!0,St(P);continue}let ae={type:"star",value:P,output:xe};if(t.bash===!0){ae.output=".*?",(x.type==="bos"||x.type==="slash")&&(ae.output=G+ae.output),oe(ae);continue}if(x&&(x.type==="bracket"||x.type==="paren")&&t.regex===!0){ae.output=P,oe(ae);continue}($.index===$.start||x.type==="slash"||x.type==="dot")&&(x.type==="dot"?($.output+=w,x.output+=w):t.dot===!0?($.output+=D,x.output+=D):($.output+=G,x.output+=G),le()!=="*"&&($.output+=h,x.output+=h)),oe(ae)}for(;$.brackets>0;){if(t.strictBrackets===!0)throw new SyntaxError(Wa("closing","]"));$.output=cr.escapeLast($.output,"["),be("brackets")}for(;$.parens>0;){if(t.strictBrackets===!0)throw new SyntaxError(Wa("closing",")"));$.output=cr.escapeLast($.output,"("),be("parens")}for(;$.braces>0;){if(t.strictBrackets===!0)throw new SyntaxError(Wa("closing","}"));$.output=cr.escapeLast($.output,"{"),be("braces")}if(t.strictSlashes!==!0&&(x.type==="star"||x.type==="bracket")&&oe({type:"maybe_slash",value:"",output:`${f}?`}),$.backtrack===!0){$.output="";for(let F of $.tokens)$.output+=F.output!=null?F.output:F.value,F.suffix&&($.output+=F.suffix)}return $};Wy.fastpaths=(r,e)=>{let t={...e},n=typeof t.maxLength=="number"?Math.min(If,t.maxLength):If,i=r.length;if(i>n)throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${n}`);r=DP[r]||r;let o=cr.isWindows(e),{DOT_LITERAL:s,SLASH_LITERAL:a,ONE_CHAR:c,DOTS_SLASH:u,NO_DOT:l,NO_DOTS:p,NO_DOTS_SLASH:d,STAR:f,START_ANCHOR:h}=vf.globChars(o),m=t.dot?p:l,y=t.dot?d:l,w=t.capture?"":"?:",D={negated:!1,prefix:""},j=t.bash===!0?".*?":f;t.capture&&(j=`(${j})`);let X=G=>G.noglobstar===!0?j:`(${w}(?:(?!${h}${G.dot?u:s}).)*?)`,B=G=>{switch(G){case"*":return`${m}${c}${j}`;case".*":return`${s}${c}${j}`;case"*.*":return`${m}${j}${s}${c}${j}`;case"*/*":return`${m}${j}${a}${c}${y}${j}`;case"**":return m+X(t);case"**/*":return`(?:${m}${X(t)}${a})?${y}${c}${j}`;case"**/*.*":return`(?:${m}${X(t)}${a})?${y}${j}${s}${c}${j}`;case"**/.*":return`(?:${m}${X(t)}${a})?${s}${c}${j}`;default:{let re=/^(.*?)\.(\w+)$/.exec(G);if(!re)return;let xe=B(re[1]);return xe?xe+s+re[2]:void 0}}},Z=cr.removePrefix(r,D),O=B(Z);return O&&t.strictSlashes!==!0&&(O+=`${a}?`),O};TP.exports=Wy});var kP=v((rre,RP)=>{"use strict";var d8=H("path"),f8=CP(),jy=MP(),Vy=Zu(),h8=Qu(),m8=r=>r&&typeof r=="object"&&!Array.isArray(r),Qe=(r,e,t=!1)=>{if(Array.isArray(r)){let l=r.map(d=>Qe(d,e,t));return d=>{for(let f of l){let h=f(d);if(h)return h}return!1}}let n=m8(r)&&r.tokens&&r.input;if(r===""||typeof r!="string"&&!n)throw new TypeError("Expected pattern to be a non-empty string");let i=e||{},o=Vy.isWindows(e),s=n?Qe.compileRe(r,e):Qe.makeRe(r,e,!1,!0),a=s.state;delete s.state;let c=()=>!1;if(i.ignore){let l={...e,ignore:null,onMatch:null,onResult:null};c=Qe(i.ignore,l,t)}let u=(l,p=!1)=>{let{isMatch:d,match:f,output:h}=Qe.test(l,s,e,{glob:r,posix:o}),m={glob:r,state:a,regex:s,posix:o,input:l,output:h,match:f,isMatch:d};return typeof i.onResult=="function"&&i.onResult(m),d===!1?(m.isMatch=!1,p?m:!1):c(l)?(typeof i.onIgnore=="function"&&i.onIgnore(m),m.isMatch=!1,p?m:!1):(typeof i.onMatch=="function"&&i.onMatch(m),p?m:!0)};return t&&(u.state=a),u};Qe.test=(r,e,t,{glob:n,posix:i}={})=>{if(typeof r!="string")throw new TypeError("Expected input to be a string");if(r==="")return{isMatch:!1,output:""};let o=t||{},s=o.format||(i?Vy.toPosixSlashes:null),a=r===n,c=a&&s?s(r):r;return a===!1&&(c=s?s(r):r,a=c===n),(a===!1||o.capture===!0)&&(o.matchBase===!0||o.basename===!0?a=Qe.matchBase(r,e,t,i):a=e.exec(c)),{isMatch:!!a,match:a,output:c}};Qe.matchBase=(r,e,t,n=Vy.isWindows(t))=>(e instanceof RegExp?e:Qe.makeRe(e,t)).test(d8.basename(r));Qe.isMatch=(r,e,t)=>Qe(e,t)(r);Qe.parse=(r,e)=>Array.isArray(r)?r.map(t=>Qe.parse(t,e)):jy(r,{...e,fastpaths:!1});Qe.scan=(r,e)=>f8(r,e);Qe.compileRe=(r,e,t=!1,n=!1)=>{if(t===!0)return r.output;let i=e||{},o=i.contains?"":"^",s=i.contains?"":"$",a=`${o}(?:${r.output})${s}`;r&&r.negated===!0&&(a=`^(?!${a}).*$`);let c=Qe.toRegex(a,e);return n===!0&&(c.state=r),c};Qe.makeRe=(r,e={},t=!1,n=!1)=>{if(!r||typeof r!="string")throw new TypeError("Expected a non-empty string");let i={negated:!1,fastpaths:!0};return e.fastpaths!==!1&&(r[0]==="."||r[0]==="*")&&(i.output=jy.fastpaths(r,e)),i.output||(i=jy(r,e)),Qe.compileRe(i,e,t,n)};Qe.toRegex=(r,e)=>{try{let t=e||{};return new RegExp(r,t.flags||(t.nocase?"i":""))}catch(t){if(e&&e.debug===!0)throw t;return/$^/}};Qe.constants=h8;RP.exports=Qe});var qy=v((nre,OP)=>{"use strict";OP.exports=kP()});var tl=v((ire,WP)=>{"use strict";var BP=H("util"),FP=yP(),qn=qy(),Gy=Zu(),NP=r=>r===""||r==="./",UP=r=>{let e=r.indexOf("{");return e>-1&&r.indexOf("}",e)>-1},Te=(r,e,t)=>{e=[].concat(e),r=[].concat(r);let n=new Set,i=new Set,o=new Set,s=0,a=l=>{o.add(l.output),t&&t.onResult&&t.onResult(l)};for(let l=0;l!n.has(l));if(t&&u.length===0){if(t.failglob===!0)throw new Error(`No matches found for "${e.join(", ")}"`);if(t.nonull===!0||t.nullglob===!0)return t.unescape?e.map(l=>l.replace(/\\/g,"")):e}return u};Te.match=Te;Te.matcher=(r,e)=>qn(r,e);Te.isMatch=(r,e,t)=>qn(e,t)(r);Te.any=Te.isMatch;Te.not=(r,e,t={})=>{e=[].concat(e).map(String);let n=new Set,i=[],o=a=>{t.onResult&&t.onResult(a),i.push(a.output)},s=new Set(Te(r,e,{...t,onResult:o}));for(let a of i)s.has(a)||n.add(a);return[...n]};Te.contains=(r,e,t)=>{if(typeof r!="string")throw new TypeError(`Expected a string: "${BP.inspect(r)}"`);if(Array.isArray(e))return e.some(n=>Te.contains(r,n,t));if(typeof e=="string"){if(NP(r)||NP(e))return!1;if(r.includes(e)||r.startsWith("./")&&r.slice(2).includes(e))return!0}return Te.isMatch(r,e,{...t,contains:!0})};Te.matchKeys=(r,e,t)=>{if(!Gy.isObject(r))throw new TypeError("Expected the first argument to be an object");let n=Te(Object.keys(r),e,t),i={};for(let o of n)i[o]=r[o];return i};Te.some=(r,e,t)=>{let n=[].concat(r);for(let i of[].concat(e)){let o=qn(String(i),t);if(n.some(s=>o(s)))return!0}return!1};Te.every=(r,e,t)=>{let n=[].concat(r);for(let i of[].concat(e)){let o=qn(String(i),t);if(!n.every(s=>o(s)))return!1}return!0};Te.all=(r,e,t)=>{if(typeof r!="string")throw new TypeError(`Expected a string: "${BP.inspect(r)}"`);return[].concat(e).every(n=>qn(n,t)(r))};Te.capture=(r,e,t)=>{let n=Gy.isWindows(t),o=qn.makeRe(String(r),{...t,capture:!0}).exec(n?Gy.toPosixSlashes(e):e);if(o)return o.slice(1).map(s=>s===void 0?"":s)};Te.makeRe=(...r)=>qn.makeRe(...r);Te.scan=(...r)=>qn.scan(...r);Te.parse=(r,e)=>{let t=[];for(let n of[].concat(r||[]))for(let i of FP(String(n),e))t.push(qn.parse(i,e));return t};Te.braces=(r,e)=>{if(typeof r!="string")throw new TypeError("Expected a string");return e&&e.nobrace===!0||!UP(r)?[r]:FP(r,e)};Te.braceExpand=(r,e)=>{if(typeof r!="string")throw new TypeError("Expected a string");return Te.braces(r,{...e,expand:!0})};Te.hasBraces=UP;WP.exports=Te});var pL=v((tie,lL)=>{"use strict";var{Duplex:E8}=H("stream");function cL(r){r.emit("close")}function x8(){!this.destroyed&&this._writableState.finished&&this.destroy()}function uL(r){this.removeListener("error",uL),this.destroy(),this.listenerCount("error")===0&&this.emit("error",r)}function P8(r,e){let t=!0,n=new E8({...e,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return r.on("message",function(o,s){let a=!s&&n._readableState.objectMode?o.toString():o;n.push(a)||r.pause()}),r.once("error",function(o){n.destroyed||(t=!1,n.destroy(o))}),r.once("close",function(){n.destroyed||n.push(null)}),n._destroy=function(i,o){if(r.readyState===r.CLOSED){o(i),process.nextTick(cL,n);return}let s=!1;r.once("error",function(c){s=!0,o(c)}),r.once("close",function(){s||o(i),process.nextTick(cL,n)}),t&&r.terminate()},n._final=function(i){if(r.readyState===r.CONNECTING){r.once("open",function(){n._final(i)});return}r._socket!==null&&(r._socket._writableState.finished?(i(),n._readableState.endEmitted&&n.destroy()):(r._socket.once("finish",function(){i()}),r.close()))},n._read=function(){r.isPaused&&r.resume()},n._write=function(i,o,s){if(r.readyState===r.CONNECTING){r.once("open",function(){n._write(i,o,s)});return}r.send(i,s)},n.on("end",x8),n.on("error",uL),n}lL.exports=P8});var Zi=v((rie,dL)=>{"use strict";dL.exports={BINARY_TYPES:["nodebuffer","arraybuffer","fragments"],EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}}});var sl=v((nie,Lf)=>{"use strict";var{EMPTY_BUFFER:L8}=Zi(),Zy=Buffer[Symbol.species];function $8(r,e){if(r.length===0)return L8;if(r.length===1)return r[0];let t=Buffer.allocUnsafe(e),n=0;for(let i=0;i{"use strict";var mL=Symbol("kDone"),tb=Symbol("kRun"),rb=class{constructor(e){this[mL]=()=>{this.pending--,this[tb]()},this.concurrency=e||1/0,this.jobs=[],this.pending=0}add(e){this.jobs.push(e),this[tb]()}[tb](){if(this.pending!==this.concurrency&&this.jobs.length){let e=this.jobs.shift();this.pending++,e(this[mL])}}};HL.exports=rb});var ul=v((oie,IL)=>{"use strict";var al=H("zlib"),yL=sl(),D8=gL(),{kStatusCode:bL}=Zi(),T8=Buffer[Symbol.species],M8=Buffer.from([0,0,255,255]),Df=Symbol("permessage-deflate"),vi=Symbol("total-length"),cl=Symbol("callback"),eo=Symbol("buffers"),Cf=Symbol("error"),$f,nb=class{constructor(e,t,n){if(this._maxPayload=n|0,this._options=e||{},this._threshold=this._options.threshold!==void 0?this._options.threshold:1024,this._isServer=!!t,this._deflate=null,this._inflate=null,this.params=null,!$f){let i=this._options.concurrencyLimit!==void 0?this._options.concurrencyLimit:10;$f=new D8(i)}}static get extensionName(){return"permessage-deflate"}offer(){let e={};return this._options.serverNoContextTakeover&&(e.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(e.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(e.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?e.client_max_window_bits=this._options.clientMaxWindowBits:this._options.clientMaxWindowBits==null&&(e.client_max_window_bits=!0),e}accept(e){return e=this.normalizeParams(e),this.params=this._isServer?this.acceptAsServer(e):this.acceptAsClient(e),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){let e=this._deflate[cl];this._deflate.close(),this._deflate=null,e&&e(new Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(e){let t=this._options,n=e.find(i=>!(t.serverNoContextTakeover===!1&&i.server_no_context_takeover||i.server_max_window_bits&&(t.serverMaxWindowBits===!1||typeof t.serverMaxWindowBits=="number"&&t.serverMaxWindowBits>i.server_max_window_bits)||typeof t.clientMaxWindowBits=="number"&&!i.client_max_window_bits));if(!n)throw new Error("None of the extension offers can be accepted");return t.serverNoContextTakeover&&(n.server_no_context_takeover=!0),t.clientNoContextTakeover&&(n.client_no_context_takeover=!0),typeof t.serverMaxWindowBits=="number"&&(n.server_max_window_bits=t.serverMaxWindowBits),typeof t.clientMaxWindowBits=="number"?n.client_max_window_bits=t.clientMaxWindowBits:(n.client_max_window_bits===!0||t.clientMaxWindowBits===!1)&&delete n.client_max_window_bits,n}acceptAsClient(e){let t=e[0];if(this._options.clientNoContextTakeover===!1&&t.client_no_context_takeover)throw new Error('Unexpected parameter "client_no_context_takeover"');if(!t.client_max_window_bits)typeof this._options.clientMaxWindowBits=="number"&&(t.client_max_window_bits=this._options.clientMaxWindowBits);else if(this._options.clientMaxWindowBits===!1||typeof this._options.clientMaxWindowBits=="number"&&t.client_max_window_bits>this._options.clientMaxWindowBits)throw new Error('Unexpected or invalid parameter "client_max_window_bits"');return t}normalizeParams(e){return e.forEach(t=>{Object.keys(t).forEach(n=>{let i=t[n];if(i.length>1)throw new Error(`Parameter "${n}" must have only a single value`);if(i=i[0],n==="client_max_window_bits"){if(i!==!0){let o=+i;if(!Number.isInteger(o)||o<8||o>15)throw new TypeError(`Invalid value for parameter "${n}": ${i}`);i=o}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${n}": ${i}`)}else if(n==="server_max_window_bits"){let o=+i;if(!Number.isInteger(o)||o<8||o>15)throw new TypeError(`Invalid value for parameter "${n}": ${i}`);i=o}else if(n==="client_no_context_takeover"||n==="server_no_context_takeover"){if(i!==!0)throw new TypeError(`Invalid value for parameter "${n}": ${i}`)}else throw new Error(`Unknown parameter "${n}"`);t[n]=i})}),e}decompress(e,t,n){$f.add(i=>{this._decompress(e,t,(o,s)=>{i(),n(o,s)})})}compress(e,t,n){$f.add(i=>{this._compress(e,t,(o,s)=>{i(),n(o,s)})})}_decompress(e,t,n){let i=this._isServer?"client":"server";if(!this._inflate){let o=`${i}_max_window_bits`,s=typeof this.params[o]!="number"?al.Z_DEFAULT_WINDOWBITS:this.params[o];this._inflate=al.createInflateRaw({...this._options.zlibInflateOptions,windowBits:s}),this._inflate[Df]=this,this._inflate[vi]=0,this._inflate[eo]=[],this._inflate.on("error",k8),this._inflate.on("data",vL)}this._inflate[cl]=n,this._inflate.write(e),t&&this._inflate.write(M8),this._inflate.flush(()=>{let o=this._inflate[Cf];if(o){this._inflate.close(),this._inflate=null,n(o);return}let s=yL.concat(this._inflate[eo],this._inflate[vi]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[vi]=0,this._inflate[eo]=[],t&&this.params[`${i}_no_context_takeover`]&&this._inflate.reset()),n(null,s)})}_compress(e,t,n){let i=this._isServer?"server":"client";if(!this._deflate){let o=`${i}_max_window_bits`,s=typeof this.params[o]!="number"?al.Z_DEFAULT_WINDOWBITS:this.params[o];this._deflate=al.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:s}),this._deflate[vi]=0,this._deflate[eo]=[],this._deflate.on("data",R8)}this._deflate[cl]=n,this._deflate.write(e),this._deflate.flush(al.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let o=yL.concat(this._deflate[eo],this._deflate[vi]);t&&(o=new T8(o.buffer,o.byteOffset,o.length-4)),this._deflate[cl]=null,this._deflate[vi]=0,this._deflate[eo]=[],t&&this.params[`${i}_no_context_takeover`]&&this._deflate.reset(),n(null,o)})}};IL.exports=nb;function R8(r){this[eo].push(r),this[vi]+=r.length}function vL(r){if(this[vi]+=r.length,this[Df]._maxPayload<1||this[vi]<=this[Df]._maxPayload){this[eo].push(r);return}this[Cf]=new RangeError("Max payload size exceeded"),this[Cf].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[Cf][bL]=1009,this.removeListener("data",vL),this.reset()}function k8(r){this[Df]._inflate=null,r[bL]=1007,this[cl](r)}});var ll=v((sie,Tf)=>{"use strict";var{isUtf8:_L}=H("buffer"),O8=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0];function N8(r){return r>=1e3&&r<=1014&&r!==1004&&r!==1005&&r!==1006||r>=3e3&&r<=4999}function ib(r){let e=r.length,t=0;for(;t=e||(r[t+1]&192)!==128||(r[t+2]&192)!==128||r[t]===224&&(r[t+1]&224)===128||r[t]===237&&(r[t+1]&224)===160)return!1;t+=3}else if((r[t]&248)===240){if(t+3>=e||(r[t+1]&192)!==128||(r[t+2]&192)!==128||(r[t+3]&192)!==128||r[t]===240&&(r[t+1]&240)===128||r[t]===244&&r[t+1]>143||r[t]>244)return!1;t+=4}else return!1;return!0}Tf.exports={isValidStatusCode:N8,isValidUTF8:ib,tokenChars:O8};if(_L)Tf.exports.isValidUTF8=function(r){return r.length<24?ib(r):_L(r)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let r=H("utf-8-validate");Tf.exports.isValidUTF8=function(e){return e.length<32?ib(e):r(e)}}catch{}});var ub=v((aie,LL)=>{"use strict";var{Writable:B8}=H("stream"),AL=ul(),{BINARY_TYPES:F8,EMPTY_BUFFER:wL,kStatusCode:U8,kWebSocket:W8}=Zi(),{concat:ob,toArrayBuffer:j8,unmask:V8}=sl(),{isValidStatusCode:q8,isValidUTF8:SL}=ll(),Mf=Buffer[Symbol.species],Tr=0,EL=1,xL=2,PL=3,sb=4,ab=5,Rf=6,cb=class extends B8{constructor(e={}){super(),this._allowSynchronousEvents=e.allowSynchronousEvents!==void 0?e.allowSynchronousEvents:!0,this._binaryType=e.binaryType||F8[0],this._extensions=e.extensions||{},this._isServer=!!e.isServer,this._maxPayload=e.maxPayload|0,this._skipUTF8Validation=!!e.skipUTF8Validation,this[W8]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._fragments=[],this._errored=!1,this._loop=!1,this._state=Tr}_write(e,t,n){if(this._opcode===8&&this._state==Tr)return n();this._bufferedBytes+=e.length,this._buffers.push(e),this.startLoop(n)}consume(e){if(this._bufferedBytes-=e,e===this._buffers[0].length)return this._buffers.shift();if(e=n.length?t.set(this._buffers.shift(),i):(t.set(new Uint8Array(n.buffer,n.byteOffset,e),i),this._buffers[0]=new Mf(n.buffer,n.byteOffset+e,n.length-e)),e-=n.length}while(e>0);return t}startLoop(e){this._loop=!0;do switch(this._state){case Tr:this.getInfo(e);break;case EL:this.getPayloadLength16(e);break;case xL:this.getPayloadLength64(e);break;case PL:this.getMask();break;case sb:this.getData(e);break;case ab:case Rf:this._loop=!1;return}while(this._loop);this._errored||e()}getInfo(e){if(this._bufferedBytes<2){this._loop=!1;return}let t=this.consume(2);if(t[0]&48){let i=this.createError(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3");e(i);return}let n=(t[0]&64)===64;if(n&&!this._extensions[AL.extensionName]){let i=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(i);return}if(this._fin=(t[0]&128)===128,this._opcode=t[0]&15,this._payloadLength=t[1]&127,this._opcode===0){if(n){let i=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(i);return}if(!this._fragmented){let i=this.createError(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE");e(i);return}this._opcode=this._fragmented}else if(this._opcode===1||this._opcode===2){if(this._fragmented){let i=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");e(i);return}this._compressed=n}else if(this._opcode>7&&this._opcode<11){if(!this._fin){let i=this.createError(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN");e(i);return}if(n){let i=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(i);return}if(this._payloadLength>125||this._opcode===8&&this._payloadLength===1){let i=this.createError(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH");e(i);return}}else{let i=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");e(i);return}if(!this._fin&&!this._fragmented&&(this._fragmented=this._opcode),this._masked=(t[1]&128)===128,this._isServer){if(!this._masked){let i=this.createError(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK");e(i);return}}else if(this._masked){let i=this.createError(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK");e(i);return}this._payloadLength===126?this._state=EL:this._payloadLength===127?this._state=xL:this.haveLength(e)}getPayloadLength16(e){if(this._bufferedBytes<2){this._loop=!1;return}this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength(e)}getPayloadLength64(e){if(this._bufferedBytes<8){this._loop=!1;return}let t=this.consume(8),n=t.readUInt32BE(0);if(n>Math.pow(2,21)-1){let i=this.createError(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH");e(i);return}this._payloadLength=n*Math.pow(2,32)+t.readUInt32BE(4),this.haveLength(e)}haveLength(e){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0)){let t=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");e(t);return}this._masked?this._state=PL:this._state=sb}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=sb}getData(e){let t=wL;if(this._payloadLength){if(this._bufferedBytes7){this.controlMessage(t,e);return}if(this._compressed){this._state=ab,this.decompress(t,e);return}t.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(t)),this.dataMessage(e)}decompress(e,t){this._extensions[AL.extensionName].decompress(e,this._fin,(i,o)=>{if(i)return t(i);if(o.length){if(this._messageLength+=o.length,this._messageLength>this._maxPayload&&this._maxPayload>0){let s=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");t(s);return}this._fragments.push(o)}this.dataMessage(t),this._state===Tr&&this.startLoop(t)})}dataMessage(e){if(!this._fin){this._state=Tr;return}let t=this._messageLength,n=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],this._opcode===2){let i;this._binaryType==="nodebuffer"?i=ob(n,t):this._binaryType==="arraybuffer"?i=j8(ob(n,t)):i=n,this._allowSynchronousEvents?(this.emit("message",i,!0),this._state=Tr):(this._state=Rf,setImmediate(()=>{this.emit("message",i,!0),this._state=Tr,this.startLoop(e)}))}else{let i=ob(n,t);if(!this._skipUTF8Validation&&!SL(i)){let o=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");e(o);return}this._state===ab||this._allowSynchronousEvents?(this.emit("message",i,!1),this._state=Tr):(this._state=Rf,setImmediate(()=>{this.emit("message",i,!1),this._state=Tr,this.startLoop(e)}))}}controlMessage(e,t){if(this._opcode===8){if(e.length===0)this._loop=!1,this.emit("conclude",1005,wL),this.end();else{let n=e.readUInt16BE(0);if(!q8(n)){let o=this.createError(RangeError,`invalid status code ${n}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");t(o);return}let i=new Mf(e.buffer,e.byteOffset+2,e.length-2);if(!this._skipUTF8Validation&&!SL(i)){let o=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");t(o);return}this._loop=!1,this.emit("conclude",n,i),this.end()}this._state=Tr;return}this._allowSynchronousEvents?(this.emit(this._opcode===9?"ping":"pong",e),this._state=Tr):(this._state=Rf,setImmediate(()=>{this.emit(this._opcode===9?"ping":"pong",e),this._state=Tr,this.startLoop(t)}))}createError(e,t,n,i,o){this._loop=!1,this._errored=!0;let s=new e(n?`Invalid WebSocket frame: ${t}`:t);return Error.captureStackTrace(s,this.createError),s.code=o,s[U8]=i,s}};LL.exports=cb});var pb=v((uie,DL)=>{"use strict";var{Duplex:cie}=H("stream"),{randomFillSync:G8}=H("crypto"),$L=ul(),{EMPTY_BUFFER:K8}=Zi(),{isValidStatusCode:X8}=ll(),{mask:CL,toBuffer:za}=sl(),sn=Symbol("kByteLength"),z8=Buffer.alloc(4),kf=8*1024,cs,Ja=kf,lb=class r{constructor(e,t,n){this._extensions=t||{},n&&(this._generateMask=n,this._maskBuffer=Buffer.alloc(4)),this._socket=e,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._deflating=!1,this._queue=[]}static frame(e,t){let n,i=!1,o=2,s=!1;t.mask&&(n=t.maskBuffer||z8,t.generateMask?t.generateMask(n):(Ja===kf&&(cs===void 0&&(cs=Buffer.alloc(kf)),G8(cs,0,kf),Ja=0),n[0]=cs[Ja++],n[1]=cs[Ja++],n[2]=cs[Ja++],n[3]=cs[Ja++]),s=(n[0]|n[1]|n[2]|n[3])===0,o=6);let a;typeof e=="string"?(!t.mask||s)&&t[sn]!==void 0?a=t[sn]:(e=Buffer.from(e),a=e.length):(a=e.length,i=t.mask&&t.readOnly&&!s);let c=a;a>=65536?(o+=8,c=127):a>125&&(o+=2,c=126);let u=Buffer.allocUnsafe(i?a+o:o);return u[0]=t.fin?t.opcode|128:t.opcode,t.rsv1&&(u[0]|=64),u[1]=c,c===126?u.writeUInt16BE(a,2):c===127&&(u[2]=u[3]=0,u.writeUIntBE(a,4,6)),t.mask?(u[1]|=128,u[o-4]=n[0],u[o-3]=n[1],u[o-2]=n[2],u[o-1]=n[3],s?[u,e]:i?(CL(e,n,u,o,a),[u]):(CL(e,n,e,0,a),[u,e])):[u,e]}close(e,t,n,i){let o;if(e===void 0)o=K8;else{if(typeof e!="number"||!X8(e))throw new TypeError("First argument must be a valid error code number");if(t===void 0||!t.length)o=Buffer.allocUnsafe(2),o.writeUInt16BE(e,0);else{let a=Buffer.byteLength(t);if(a>123)throw new RangeError("The message must not be greater than 123 bytes");o=Buffer.allocUnsafe(2+a),o.writeUInt16BE(e,0),typeof t=="string"?o.write(t,2):o.set(t,2)}}let s={[sn]:o.length,fin:!0,generateMask:this._generateMask,mask:n,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};this._deflating?this.enqueue([this.dispatch,o,!1,s,i]):this.sendFrame(r.frame(o,s),i)}ping(e,t,n){let i,o;if(typeof e=="string"?(i=Buffer.byteLength(e),o=!1):(e=za(e),i=e.length,o=za.readOnly),i>125)throw new RangeError("The data size must not be greater than 125 bytes");let s={[sn]:i,fin:!0,generateMask:this._generateMask,mask:t,maskBuffer:this._maskBuffer,opcode:9,readOnly:o,rsv1:!1};this._deflating?this.enqueue([this.dispatch,e,!1,s,n]):this.sendFrame(r.frame(e,s),n)}pong(e,t,n){let i,o;if(typeof e=="string"?(i=Buffer.byteLength(e),o=!1):(e=za(e),i=e.length,o=za.readOnly),i>125)throw new RangeError("The data size must not be greater than 125 bytes");let s={[sn]:i,fin:!0,generateMask:this._generateMask,mask:t,maskBuffer:this._maskBuffer,opcode:10,readOnly:o,rsv1:!1};this._deflating?this.enqueue([this.dispatch,e,!1,s,n]):this.sendFrame(r.frame(e,s),n)}send(e,t,n){let i=this._extensions[$L.extensionName],o=t.binary?2:1,s=t.compress,a,c;if(typeof e=="string"?(a=Buffer.byteLength(e),c=!1):(e=za(e),a=e.length,c=za.readOnly),this._firstFragment?(this._firstFragment=!1,s&&i&&i.params[i._isServer?"server_no_context_takeover":"client_no_context_takeover"]&&(s=a>=i._threshold),this._compress=s):(s=!1,o=0),t.fin&&(this._firstFragment=!0),i){let u={[sn]:a,fin:t.fin,generateMask:this._generateMask,mask:t.mask,maskBuffer:this._maskBuffer,opcode:o,readOnly:c,rsv1:s};this._deflating?this.enqueue([this.dispatch,e,this._compress,u,n]):this.dispatch(e,this._compress,u,n)}else this.sendFrame(r.frame(e,{[sn]:a,fin:t.fin,generateMask:this._generateMask,mask:t.mask,maskBuffer:this._maskBuffer,opcode:o,readOnly:c,rsv1:!1}),n)}dispatch(e,t,n,i){if(!t){this.sendFrame(r.frame(e,n),i);return}let o=this._extensions[$L.extensionName];this._bufferedBytes+=n[sn],this._deflating=!0,o.compress(e,n.fin,(s,a)=>{if(this._socket.destroyed){let c=new Error("The socket was closed while data was being compressed");typeof i=="function"&&i(c);for(let u=0;u{"use strict";var{kForOnEventAttribute:pl,kListener:db}=Zi(),TL=Symbol("kCode"),ML=Symbol("kData"),RL=Symbol("kError"),kL=Symbol("kMessage"),OL=Symbol("kReason"),Ya=Symbol("kTarget"),NL=Symbol("kType"),BL=Symbol("kWasClean"),Ii=class{constructor(e){this[Ya]=null,this[NL]=e}get target(){return this[Ya]}get type(){return this[NL]}};Object.defineProperty(Ii.prototype,"target",{enumerable:!0});Object.defineProperty(Ii.prototype,"type",{enumerable:!0});var us=class extends Ii{constructor(e,t={}){super(e),this[TL]=t.code===void 0?0:t.code,this[OL]=t.reason===void 0?"":t.reason,this[BL]=t.wasClean===void 0?!1:t.wasClean}get code(){return this[TL]}get reason(){return this[OL]}get wasClean(){return this[BL]}};Object.defineProperty(us.prototype,"code",{enumerable:!0});Object.defineProperty(us.prototype,"reason",{enumerable:!0});Object.defineProperty(us.prototype,"wasClean",{enumerable:!0});var Qa=class extends Ii{constructor(e,t={}){super(e),this[RL]=t.error===void 0?null:t.error,this[kL]=t.message===void 0?"":t.message}get error(){return this[RL]}get message(){return this[kL]}};Object.defineProperty(Qa.prototype,"error",{enumerable:!0});Object.defineProperty(Qa.prototype,"message",{enumerable:!0});var dl=class extends Ii{constructor(e,t={}){super(e),this[ML]=t.data===void 0?null:t.data}get data(){return this[ML]}};Object.defineProperty(dl.prototype,"data",{enumerable:!0});var J8={addEventListener(r,e,t={}){for(let i of this.listeners(r))if(!t[pl]&&i[db]===e&&!i[pl])return;let n;if(r==="message")n=function(o,s){let a=new dl("message",{data:s?o:o.toString()});a[Ya]=this,Of(e,this,a)};else if(r==="close")n=function(o,s){let a=new us("close",{code:o,reason:s.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});a[Ya]=this,Of(e,this,a)};else if(r==="error")n=function(o){let s=new Qa("error",{error:o,message:o.message});s[Ya]=this,Of(e,this,s)};else if(r==="open")n=function(){let o=new Ii("open");o[Ya]=this,Of(e,this,o)};else return;n[pl]=!!t[pl],n[db]=e,t.once?this.once(r,n):this.on(r,n)},removeEventListener(r,e){for(let t of this.listeners(r))if(t[db]===e&&!t[pl]){this.removeListener(r,t);break}}};FL.exports={CloseEvent:us,ErrorEvent:Qa,Event:Ii,EventTarget:J8,MessageEvent:dl};function Of(r,e,t){typeof r=="object"&&r.handleEvent?r.handleEvent.call(r,t):r.call(e,t)}});var fb=v((pie,WL)=>{"use strict";var{tokenChars:fl}=ll();function Yn(r,e,t){r[e]===void 0?r[e]=[t]:r[e].push(t)}function Y8(r){let e=Object.create(null),t=Object.create(null),n=!1,i=!1,o=!1,s,a,c=-1,u=-1,l=-1,p=0;for(;p{let t=r[e];return Array.isArray(t)||(t=[t]),t.map(n=>[e].concat(Object.keys(n).map(i=>{let o=n[i];return Array.isArray(o)||(o=[o]),o.map(s=>s===!0?i:`${i}=${s}`).join("; ")})).join("; ")).join(", ")}).join(", ")}WL.exports={format:Q8,parse:Y8}});var yb=v((hie,ZL)=>{"use strict";var Z8=H("events"),eG=H("https"),tG=H("http"),qL=H("net"),rG=H("tls"),{randomBytes:nG,createHash:iG}=H("crypto"),{Duplex:die,Readable:fie}=H("stream"),{URL:hb}=H("url"),to=ul(),oG=ub(),sG=pb(),{BINARY_TYPES:jL,EMPTY_BUFFER:Nf,GUID:aG,kForOnEventAttribute:mb,kListener:cG,kStatusCode:uG,kWebSocket:Tt,NOOP:GL}=Zi(),{EventTarget:{addEventListener:lG,removeEventListener:pG}}=UL(),{format:dG,parse:fG}=fb(),{toBuffer:hG}=sl(),mG=30*1e3,KL=Symbol("kAborted"),Hb=[8,13],_i=["CONNECTING","OPEN","CLOSING","CLOSED"],HG=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/,Ze=class r extends Z8{constructor(e,t,n){super(),this._binaryType=jL[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=Nf,this._closeTimer=null,this._extensions={},this._paused=!1,this._protocol="",this._readyState=r.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,e!==null?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,t===void 0?t=[]:Array.isArray(t)||(typeof t=="object"&&t!==null?(n=t,t=[]):t=[t]),XL(this,e,t,n)):(this._autoPong=n.autoPong,this._isServer=!0)}get binaryType(){return this._binaryType}set binaryType(e){jL.includes(e)&&(this._binaryType=e,this._receiver&&(this._receiver._binaryType=e))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get isPaused(){return this._paused}get onclose(){return null}get onerror(){return null}get onopen(){return null}get onmessage(){return null}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(e,t,n){let i=new oG({allowSynchronousEvents:n.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxPayload:n.maxPayload,skipUTF8Validation:n.skipUTF8Validation});this._sender=new sG(e,this._extensions,n.generateMask),this._receiver=i,this._socket=e,i[Tt]=this,e[Tt]=this,i.on("conclude",bG),i.on("drain",vG),i.on("error",IG),i.on("message",_G),i.on("ping",AG),i.on("pong",wG),e.setTimeout&&e.setTimeout(0),e.setNoDelay&&e.setNoDelay(),t.length>0&&e.unshift(t),e.on("close",JL),e.on("data",Ff),e.on("end",YL),e.on("error",QL),this._readyState=r.OPEN,this.emit("open")}emitClose(){if(!this._socket){this._readyState=r.CLOSED,this.emit("close",this._closeCode,this._closeMessage);return}this._extensions[to.extensionName]&&this._extensions[to.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=r.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(e,t){if(this.readyState!==r.CLOSED){if(this.readyState===r.CONNECTING){ur(this,this._req,"WebSocket was closed before the connection was established");return}if(this.readyState===r.CLOSING){this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();return}this._readyState=r.CLOSING,this._sender.close(e,t,!this._isServer,n=>{n||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())}),this._closeTimer=setTimeout(this._socket.destroy.bind(this._socket),mG)}}pause(){this.readyState===r.CONNECTING||this.readyState===r.CLOSED||(this._paused=!0,this._socket.pause())}ping(e,t,n){if(this.readyState===r.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof e=="function"?(n=e,e=t=void 0):typeof t=="function"&&(n=t,t=void 0),typeof e=="number"&&(e=e.toString()),this.readyState!==r.OPEN){gb(this,e,n);return}t===void 0&&(t=!this._isServer),this._sender.ping(e||Nf,t,n)}pong(e,t,n){if(this.readyState===r.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof e=="function"?(n=e,e=t=void 0):typeof t=="function"&&(n=t,t=void 0),typeof e=="number"&&(e=e.toString()),this.readyState!==r.OPEN){gb(this,e,n);return}t===void 0&&(t=!this._isServer),this._sender.pong(e||Nf,t,n)}resume(){this.readyState===r.CONNECTING||this.readyState===r.CLOSED||(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(e,t,n){if(this.readyState===r.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof t=="function"&&(n=t,t={}),typeof e=="number"&&(e=e.toString()),this.readyState!==r.OPEN){gb(this,e,n);return}let i={binary:typeof e!="string",mask:!this._isServer,compress:!0,fin:!0,...t};this._extensions[to.extensionName]||(i.compress=!1),this._sender.send(e||Nf,i,n)}terminate(){if(this.readyState!==r.CLOSED){if(this.readyState===r.CONNECTING){ur(this,this._req,"WebSocket was closed before the connection was established");return}this._socket&&(this._readyState=r.CLOSING,this._socket.destroy())}}};Object.defineProperty(Ze,"CONNECTING",{enumerable:!0,value:_i.indexOf("CONNECTING")});Object.defineProperty(Ze.prototype,"CONNECTING",{enumerable:!0,value:_i.indexOf("CONNECTING")});Object.defineProperty(Ze,"OPEN",{enumerable:!0,value:_i.indexOf("OPEN")});Object.defineProperty(Ze.prototype,"OPEN",{enumerable:!0,value:_i.indexOf("OPEN")});Object.defineProperty(Ze,"CLOSING",{enumerable:!0,value:_i.indexOf("CLOSING")});Object.defineProperty(Ze.prototype,"CLOSING",{enumerable:!0,value:_i.indexOf("CLOSING")});Object.defineProperty(Ze,"CLOSED",{enumerable:!0,value:_i.indexOf("CLOSED")});Object.defineProperty(Ze.prototype,"CLOSED",{enumerable:!0,value:_i.indexOf("CLOSED")});["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach(r=>{Object.defineProperty(Ze.prototype,r,{enumerable:!0})});["open","error","close","message"].forEach(r=>{Object.defineProperty(Ze.prototype,`on${r}`,{enumerable:!0,get(){for(let e of this.listeners(r))if(e[mb])return e[cG];return null},set(e){for(let t of this.listeners(r))if(t[mb]){this.removeListener(r,t);break}typeof e=="function"&&this.addEventListener(r,e,{[mb]:!0})}})});Ze.prototype.addEventListener=lG;Ze.prototype.removeEventListener=pG;ZL.exports=Ze;function XL(r,e,t,n){let i={allowSynchronousEvents:!0,autoPong:!0,protocolVersion:Hb[1],maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...n,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if(r._autoPong=i.autoPong,!Hb.includes(i.protocolVersion))throw new RangeError(`Unsupported protocol version: ${i.protocolVersion} (supported versions: ${Hb.join(", ")})`);let o;if(e instanceof hb)o=e;else try{o=new hb(e)}catch{throw new SyntaxError(`Invalid URL: ${e}`)}o.protocol==="http:"?o.protocol="ws:":o.protocol==="https:"&&(o.protocol="wss:"),r._url=o.href;let s=o.protocol==="wss:",a=o.protocol==="ws+unix:",c;if(o.protocol!=="ws:"&&!s&&!a?c=`The URL's protocol must be one of "ws:", "wss:", "http:", "https", or "ws+unix:"`:a&&!o.pathname?c="The URL's pathname is empty":o.hash&&(c="The URL contains a fragment identifier"),c){let m=new SyntaxError(c);if(r._redirects===0)throw m;Bf(r,m);return}let u=s?443:80,l=nG(16).toString("base64"),p=s?eG.request:tG.request,d=new Set,f;if(i.createConnection=i.createConnection||(s?yG:gG),i.defaultPort=i.defaultPort||u,i.port=o.port||u,i.host=o.hostname.startsWith("[")?o.hostname.slice(1,-1):o.hostname,i.headers={...i.headers,"Sec-WebSocket-Version":i.protocolVersion,"Sec-WebSocket-Key":l,Connection:"Upgrade",Upgrade:"websocket"},i.path=o.pathname+o.search,i.timeout=i.handshakeTimeout,i.perMessageDeflate&&(f=new to(i.perMessageDeflate!==!0?i.perMessageDeflate:{},!1,i.maxPayload),i.headers["Sec-WebSocket-Extensions"]=dG({[to.extensionName]:f.offer()})),t.length){for(let m of t){if(typeof m!="string"||!HG.test(m)||d.has(m))throw new SyntaxError("An invalid or duplicated subprotocol was specified");d.add(m)}i.headers["Sec-WebSocket-Protocol"]=t.join(",")}if(i.origin&&(i.protocolVersion<13?i.headers["Sec-WebSocket-Origin"]=i.origin:i.headers.Origin=i.origin),(o.username||o.password)&&(i.auth=`${o.username}:${o.password}`),a){let m=i.path.split(":");i.socketPath=m[0],i.path=m[1]}let h;if(i.followRedirects){if(r._redirects===0){r._originalIpc=a,r._originalSecure=s,r._originalHostOrSocketPath=a?i.socketPath:o.host;let m=n&&n.headers;if(n={...n,headers:{}},m)for(let[y,w]of Object.entries(m))n.headers[y.toLowerCase()]=w}else if(r.listenerCount("redirect")===0){let m=a?r._originalIpc?i.socketPath===r._originalHostOrSocketPath:!1:r._originalIpc?!1:o.host===r._originalHostOrSocketPath;(!m||r._originalSecure&&!s)&&(delete i.headers.authorization,delete i.headers.cookie,m||delete i.headers.host,i.auth=void 0)}i.auth&&!n.headers.authorization&&(n.headers.authorization="Basic "+Buffer.from(i.auth).toString("base64")),h=r._req=p(i),r._redirects&&r.emit("redirect",r.url,h)}else h=r._req=p(i);i.timeout&&h.on("timeout",()=>{ur(r,h,"Opening handshake has timed out")}),h.on("error",m=>{h===null||h[KL]||(h=r._req=null,Bf(r,m))}),h.on("response",m=>{let y=m.headers.location,w=m.statusCode;if(y&&i.followRedirects&&w>=300&&w<400){if(++r._redirects>i.maxRedirects){ur(r,h,"Maximum redirects exceeded");return}h.abort();let D;try{D=new hb(y,e)}catch{let X=new SyntaxError(`Invalid URL: ${y}`);Bf(r,X);return}XL(r,D,t,n)}else r.emit("unexpected-response",h,m)||ur(r,h,`Unexpected server response: ${m.statusCode}`)}),h.on("upgrade",(m,y,w)=>{if(r.emit("upgrade",m),r.readyState!==Ze.CONNECTING)return;h=r._req=null;let D=m.headers.upgrade;if(D===void 0||D.toLowerCase()!=="websocket"){ur(r,y,"Invalid Upgrade header");return}let j=iG("sha1").update(l+aG).digest("base64");if(m.headers["sec-websocket-accept"]!==j){ur(r,y,"Invalid Sec-WebSocket-Accept header");return}let X=m.headers["sec-websocket-protocol"],B;if(X!==void 0?d.size?d.has(X)||(B="Server sent an invalid subprotocol"):B="Server sent a subprotocol but none was requested":d.size&&(B="Server sent no subprotocol"),B){ur(r,y,B);return}X&&(r._protocol=X);let Z=m.headers["sec-websocket-extensions"];if(Z!==void 0){if(!f){ur(r,y,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");return}let O;try{O=fG(Z)}catch{ur(r,y,"Invalid Sec-WebSocket-Extensions header");return}let G=Object.keys(O);if(G.length!==1||G[0]!==to.extensionName){ur(r,y,"Server indicated an extension that was not requested");return}try{f.accept(O[to.extensionName])}catch{ur(r,y,"Invalid Sec-WebSocket-Extensions header");return}r._extensions[to.extensionName]=f}r.setSocket(y,w,{allowSynchronousEvents:i.allowSynchronousEvents,generateMask:i.generateMask,maxPayload:i.maxPayload,skipUTF8Validation:i.skipUTF8Validation})}),i.finishRequest?i.finishRequest(h,r):h.end()}function Bf(r,e){r._readyState=Ze.CLOSING,r.emit("error",e),r.emitClose()}function gG(r){return r.path=r.socketPath,qL.connect(r)}function yG(r){return r.path=void 0,!r.servername&&r.servername!==""&&(r.servername=qL.isIP(r.host)?"":r.host),rG.connect(r)}function ur(r,e,t){r._readyState=Ze.CLOSING;let n=new Error(t);Error.captureStackTrace(n,ur),e.setHeader?(e[KL]=!0,e.abort(),e.socket&&!e.socket.destroyed&&e.socket.destroy(),process.nextTick(Bf,r,n)):(e.destroy(n),e.once("error",r.emit.bind(r,"error")),e.once("close",r.emitClose.bind(r)))}function gb(r,e,t){if(e){let n=hG(e).length;r._socket?r._sender._bufferedBytes+=n:r._bufferedAmount+=n}if(t){let n=new Error(`WebSocket is not open: readyState ${r.readyState} (${_i[r.readyState]})`);process.nextTick(t,n)}}function bG(r,e){let t=this[Tt];t._closeFrameReceived=!0,t._closeMessage=e,t._closeCode=r,t._socket[Tt]!==void 0&&(t._socket.removeListener("data",Ff),process.nextTick(zL,t._socket),r===1005?t.close():t.close(r,e))}function vG(){let r=this[Tt];r.isPaused||r._socket.resume()}function IG(r){let e=this[Tt];e._socket[Tt]!==void 0&&(e._socket.removeListener("data",Ff),process.nextTick(zL,e._socket),e.close(r[uG])),e.emit("error",r)}function VL(){this[Tt].emitClose()}function _G(r,e){this[Tt].emit("message",r,e)}function AG(r){let e=this[Tt];e._autoPong&&e.pong(r,!this._isServer,GL),e.emit("ping",r)}function wG(r){this[Tt].emit("pong",r)}function zL(r){r.resume()}function JL(){let r=this[Tt];this.removeListener("close",JL),this.removeListener("data",Ff),this.removeListener("end",YL),r._readyState=Ze.CLOSING;let e;!this._readableState.endEmitted&&!r._closeFrameReceived&&!r._receiver._writableState.errorEmitted&&(e=r._socket.read())!==null&&r._receiver.write(e),r._receiver.end(),this[Tt]=void 0,clearTimeout(r._closeTimer),r._receiver._writableState.finished||r._receiver._writableState.errorEmitted?r.emitClose():(r._receiver.on("error",VL),r._receiver.on("finish",VL))}function Ff(r){this[Tt]._receiver.write(r)||this.pause()}function YL(){let r=this[Tt];r._readyState=Ze.CLOSING,r._receiver.end(),this.end()}function QL(){let r=this[Tt];this.removeListener("error",QL),this.on("error",GL),r&&(r._readyState=Ze.CLOSING,this.destroy())}});var t$=v((mie,e$)=>{"use strict";var{tokenChars:SG}=ll();function EG(r){let e=new Set,t=-1,n=-1,i=0;for(i;i{"use strict";var xG=H("events"),Uf=H("http"),{Duplex:Hie}=H("stream"),{createHash:PG}=H("crypto"),r$=fb(),ls=ul(),LG=t$(),$G=yb(),{GUID:CG,kWebSocket:DG}=Zi(),TG=/^[+/0-9A-Za-z]{22}==$/,n$=0,i$=1,s$=2,bb=class extends xG{constructor(e,t){if(super(),e={allowSynchronousEvents:!0,autoPong:!0,maxPayload:100*1024*1024,skipUTF8Validation:!1,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null,WebSocket:$G,...e},e.port==null&&!e.server&&!e.noServer||e.port!=null&&(e.server||e.noServer)||e.server&&e.noServer)throw new TypeError('One and only one of the "port", "server", or "noServer" options must be specified');if(e.port!=null?(this._server=Uf.createServer((n,i)=>{let o=Uf.STATUS_CODES[426];i.writeHead(426,{"Content-Length":o.length,"Content-Type":"text/plain"}),i.end(o)}),this._server.listen(e.port,e.host,e.backlog,t)):e.server&&(this._server=e.server),this._server){let n=this.emit.bind(this,"connection");this._removeListeners=MG(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(i,o,s)=>{this.handleUpgrade(i,o,s,n)}})}e.perMessageDeflate===!0&&(e.perMessageDeflate={}),e.clientTracking&&(this.clients=new Set,this._shouldEmitClose=!1),this.options=e,this._state=n$}address(){if(this.options.noServer)throw new Error('The server is operating in "noServer" mode');return this._server?this._server.address():null}close(e){if(this._state===s$){e&&this.once("close",()=>{e(new Error("The server is not running"))}),process.nextTick(hl,this);return}if(e&&this.once("close",e),this._state!==i$)if(this._state=i$,this.options.noServer||this.options.server)this._server&&(this._removeListeners(),this._removeListeners=this._server=null),this.clients?this.clients.size?this._shouldEmitClose=!0:process.nextTick(hl,this):process.nextTick(hl,this);else{let t=this._server;this._removeListeners(),this._removeListeners=this._server=null,t.close(()=>{hl(this)})}}shouldHandle(e){if(this.options.path){let t=e.url.indexOf("?");if((t!==-1?e.url.slice(0,t):e.url)!==this.options.path)return!1}return!0}handleUpgrade(e,t,n,i){t.on("error",o$);let o=e.headers["sec-websocket-key"],s=e.headers.upgrade,a=+e.headers["sec-websocket-version"];if(e.method!=="GET"){ps(this,e,t,405,"Invalid HTTP method");return}if(s===void 0||s.toLowerCase()!=="websocket"){ps(this,e,t,400,"Invalid Upgrade header");return}if(o===void 0||!TG.test(o)){ps(this,e,t,400,"Missing or invalid Sec-WebSocket-Key header");return}if(a!==8&&a!==13){ps(this,e,t,400,"Missing or invalid Sec-WebSocket-Version header");return}if(!this.shouldHandle(e)){ml(t,400);return}let c=e.headers["sec-websocket-protocol"],u=new Set;if(c!==void 0)try{u=LG.parse(c)}catch{ps(this,e,t,400,"Invalid Sec-WebSocket-Protocol header");return}let l=e.headers["sec-websocket-extensions"],p={};if(this.options.perMessageDeflate&&l!==void 0){let d=new ls(this.options.perMessageDeflate,!0,this.options.maxPayload);try{let f=r$.parse(l);f[ls.extensionName]&&(d.accept(f[ls.extensionName]),p[ls.extensionName]=d)}catch{ps(this,e,t,400,"Invalid or unacceptable Sec-WebSocket-Extensions header");return}}if(this.options.verifyClient){let d={origin:e.headers[`${a===8?"sec-websocket-origin":"origin"}`],secure:!!(e.socket.authorized||e.socket.encrypted),req:e};if(this.options.verifyClient.length===2){this.options.verifyClient(d,(f,h,m,y)=>{if(!f)return ml(t,h||401,m,y);this.completeUpgrade(p,o,u,e,t,n,i)});return}if(!this.options.verifyClient(d))return ml(t,401)}this.completeUpgrade(p,o,u,e,t,n,i)}completeUpgrade(e,t,n,i,o,s,a){if(!o.readable||!o.writable)return o.destroy();if(o[DG])throw new Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>n$)return ml(o,503);let u=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${PG("sha1").update(t+CG).digest("base64")}`],l=new this.options.WebSocket(null,void 0,this.options);if(n.size){let p=this.options.handleProtocols?this.options.handleProtocols(n,i):n.values().next().value;p&&(u.push(`Sec-WebSocket-Protocol: ${p}`),l._protocol=p)}if(e[ls.extensionName]){let p=e[ls.extensionName].params,d=r$.format({[ls.extensionName]:[p]});u.push(`Sec-WebSocket-Extensions: ${d}`),l._extensions=e}this.emit("headers",u,i),o.write(u.concat(`\r +`).join(`\r +`)),o.removeListener("error",o$),l.setSocket(o,s,{allowSynchronousEvents:this.options.allowSynchronousEvents,maxPayload:this.options.maxPayload,skipUTF8Validation:this.options.skipUTF8Validation}),this.clients&&(this.clients.add(l),l.on("close",()=>{this.clients.delete(l),this._shouldEmitClose&&!this.clients.size&&process.nextTick(hl,this)})),a(l,i)}};a$.exports=bb;function MG(r,e){for(let t of Object.keys(e))r.on(t,e[t]);return function(){for(let n of Object.keys(e))r.removeListener(n,e[n])}}function hl(r){r._state=s$,r.emit("close")}function o$(){this.destroy()}function ml(r,e,t,n){t=t||Uf.STATUS_CODES[e],n={Connection:"close","Content-Type":"text/html","Content-Length":Buffer.byteLength(t),...n},r.once("finish",r.destroy),r.end(`HTTP/1.1 ${e} ${Uf.STATUS_CODES[e]}\r +`+Object.keys(n).map(i=>`${i}: ${n[i]}`).join(`\r +`)+`\r +\r +`+t)}function ps(r,e,t,n,i){if(r.listenerCount("wsClientError")){let o=new Error(i);Error.captureStackTrace(o,ps),r.emit("wsClientError",o,t,e)}else ml(t,n,i)}});var w$=v((roe,A$)=>{"use strict";A$.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var E$=v((noe,S$)=>{S$.exports=function(e){return!e||typeof e=="string"?!1:e instanceof Array||Array.isArray(e)||e.length>=0&&(e.splice instanceof Function||Object.getOwnPropertyDescriptor(e,e.length-1)&&e.constructor.name!=="String")}});var L$=v((ioe,P$)=>{"use strict";var jG=E$(),VG=Array.prototype.concat,qG=Array.prototype.slice,x$=P$.exports=function(e){for(var t=[],n=0,i=e.length;n{var yl=w$(),bl=L$(),$$=Object.hasOwnProperty,C$={};for(Kf in yl)$$.call(yl,Kf)&&(C$[yl[Kf]]=Kf);var Kf,lr=D$.exports={to:{},get:{}};lr.get=function(r){var e=r.substring(0,3).toLowerCase(),t,n;switch(e){case"hsl":t=lr.get.hsl(r),n="hsl";break;case"hwb":t=lr.get.hwb(r),n="hwb";break;default:t=lr.get.rgb(r),n="rgb";break}return t?{model:n,value:t}:null};lr.get.rgb=function(r){if(!r)return null;var e=/^#([a-f0-9]{3,4})$/i,t=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,n=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,i=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,o=/^(\w+)$/,s=[0,0,0,1],a,c,u;if(a=r.match(t)){for(u=a[2],a=a[1],c=0;c<3;c++){var l=c*2;s[c]=parseInt(a.slice(l,l+2),16)}u&&(s[3]=parseInt(u,16)/255)}else if(a=r.match(e)){for(a=a[1],u=a[3],c=0;c<3;c++)s[c]=parseInt(a[c]+a[c],16);u&&(s[3]=parseInt(u+u,16)/255)}else if(a=r.match(n)){for(c=0;c<3;c++)s[c]=parseInt(a[c+1],0);a[4]&&(a[5]?s[3]=parseFloat(a[4])*.01:s[3]=parseFloat(a[4]))}else if(a=r.match(i)){for(c=0;c<3;c++)s[c]=Math.round(parseFloat(a[c+1])*2.55);a[4]&&(a[5]?s[3]=parseFloat(a[4])*.01:s[3]=parseFloat(a[4]))}else return(a=r.match(o))?a[1]==="transparent"?[0,0,0,0]:$$.call(yl,a[1])?(s=yl[a[1]],s[3]=1,s):null:null;for(c=0;c<3;c++)s[c]=io(s[c],0,255);return s[3]=io(s[3],0,1),s};lr.get.hsl=function(r){if(!r)return null;var e=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,t=r.match(e);if(t){var n=parseFloat(t[4]),i=(parseFloat(t[1])%360+360)%360,o=io(parseFloat(t[2]),0,100),s=io(parseFloat(t[3]),0,100),a=io(isNaN(n)?1:n,0,1);return[i,o,s,a]}return null};lr.get.hwb=function(r){if(!r)return null;var e=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,t=r.match(e);if(t){var n=parseFloat(t[4]),i=(parseFloat(t[1])%360+360)%360,o=io(parseFloat(t[2]),0,100),s=io(parseFloat(t[3]),0,100),a=io(isNaN(n)?1:n,0,1);return[i,o,s,a]}return null};lr.to.hex=function(){var r=bl(arguments);return"#"+Xf(r[0])+Xf(r[1])+Xf(r[2])+(r[3]<1?Xf(Math.round(r[3]*255)):"")};lr.to.rgb=function(){var r=bl(arguments);return r.length<4||r[3]===1?"rgb("+Math.round(r[0])+", "+Math.round(r[1])+", "+Math.round(r[2])+")":"rgba("+Math.round(r[0])+", "+Math.round(r[1])+", "+Math.round(r[2])+", "+r[3]+")"};lr.to.rgb.percent=function(){var r=bl(arguments),e=Math.round(r[0]/255*100),t=Math.round(r[1]/255*100),n=Math.round(r[2]/255*100);return r.length<4||r[3]===1?"rgb("+e+"%, "+t+"%, "+n+"%)":"rgba("+e+"%, "+t+"%, "+n+"%, "+r[3]+")"};lr.to.hsl=function(){var r=bl(arguments);return r.length<4||r[3]===1?"hsl("+r[0]+", "+r[1]+"%, "+r[2]+"%)":"hsla("+r[0]+", "+r[1]+"%, "+r[2]+"%, "+r[3]+")"};lr.to.hwb=function(){var r=bl(arguments),e="";return r.length>=4&&r[3]!==1&&(e=", "+r[3]),"hwb("+r[0]+", "+r[1]+"%, "+r[2]+"%"+e+")"};lr.to.keyword=function(r){return C$[r.slice(0,3)]};function io(r,e,t){return Math.min(Math.max(e,r),t)}function Xf(r){var e=Math.round(r).toString(16).toUpperCase();return e.length<2?"0"+e:e}});var R$=v((soe,M$)=>{"use strict";M$.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var Sb=v((aoe,O$)=>{var vl=R$(),k$={};for(let r of Object.keys(vl))k$[vl[r]]=r;var J={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};O$.exports=J;for(let r of Object.keys(J)){if(!("channels"in J[r]))throw new Error("missing channels property: "+r);if(!("labels"in J[r]))throw new Error("missing channel labels property: "+r);if(J[r].labels.length!==J[r].channels)throw new Error("channel and label counts mismatch: "+r);let{channels:e,labels:t}=J[r];delete J[r].channels,delete J[r].labels,Object.defineProperty(J[r],"channels",{value:e}),Object.defineProperty(J[r],"labels",{value:t})}J.rgb.hsl=function(r){let e=r[0]/255,t=r[1]/255,n=r[2]/255,i=Math.min(e,t,n),o=Math.max(e,t,n),s=o-i,a,c;o===i?a=0:e===o?a=(t-n)/s:t===o?a=2+(n-e)/s:n===o&&(a=4+(e-t)/s),a=Math.min(a*60,360),a<0&&(a+=360);let u=(i+o)/2;return o===i?c=0:u<=.5?c=s/(o+i):c=s/(2-o-i),[a,c*100,u*100]};J.rgb.hsv=function(r){let e,t,n,i,o,s=r[0]/255,a=r[1]/255,c=r[2]/255,u=Math.max(s,a,c),l=u-Math.min(s,a,c),p=function(d){return(u-d)/6/l+1/2};return l===0?(i=0,o=0):(o=l/u,e=p(s),t=p(a),n=p(c),s===u?i=n-t:a===u?i=1/3+e-n:c===u&&(i=2/3+t-e),i<0?i+=1:i>1&&(i-=1)),[i*360,o*100,u*100]};J.rgb.hwb=function(r){let e=r[0],t=r[1],n=r[2],i=J.rgb.hsl(r)[0],o=1/255*Math.min(e,Math.min(t,n));return n=1-1/255*Math.max(e,Math.max(t,n)),[i,o*100,n*100]};J.rgb.cmyk=function(r){let e=r[0]/255,t=r[1]/255,n=r[2]/255,i=Math.min(1-e,1-t,1-n),o=(1-e-i)/(1-i)||0,s=(1-t-i)/(1-i)||0,a=(1-n-i)/(1-i)||0;return[o*100,s*100,a*100,i*100]};function GG(r,e){return(r[0]-e[0])**2+(r[1]-e[1])**2+(r[2]-e[2])**2}J.rgb.keyword=function(r){let e=k$[r];if(e)return e;let t=1/0,n;for(let i of Object.keys(vl)){let o=vl[i],s=GG(r,o);s.04045?((e+.055)/1.055)**2.4:e/12.92,t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92;let i=e*.4124+t*.3576+n*.1805,o=e*.2126+t*.7152+n*.0722,s=e*.0193+t*.1192+n*.9505;return[i*100,o*100,s*100]};J.rgb.lab=function(r){let e=J.rgb.xyz(r),t=e[0],n=e[1],i=e[2];t/=95.047,n/=100,i/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,i=i>.008856?i**(1/3):7.787*i+16/116;let o=116*n-16,s=500*(t-n),a=200*(n-i);return[o,s,a]};J.hsl.rgb=function(r){let e=r[0]/360,t=r[1]/100,n=r[2]/100,i,o,s;if(t===0)return s=n*255,[s,s,s];n<.5?i=n*(1+t):i=n+t-n*t;let a=2*n-i,c=[0,0,0];for(let u=0;u<3;u++)o=e+1/3*-(u-1),o<0&&o++,o>1&&o--,6*o<1?s=a+(i-a)*6*o:2*o<1?s=i:3*o<2?s=a+(i-a)*(2/3-o)*6:s=a,c[u]=s*255;return c};J.hsl.hsv=function(r){let e=r[0],t=r[1]/100,n=r[2]/100,i=t,o=Math.max(n,.01);n*=2,t*=n<=1?n:2-n,i*=o<=1?o:2-o;let s=(n+t)/2,a=n===0?2*i/(o+i):2*t/(n+t);return[e,a*100,s*100]};J.hsv.rgb=function(r){let e=r[0]/60,t=r[1]/100,n=r[2]/100,i=Math.floor(e)%6,o=e-Math.floor(e),s=255*n*(1-t),a=255*n*(1-t*o),c=255*n*(1-t*(1-o));switch(n*=255,i){case 0:return[n,c,s];case 1:return[a,n,s];case 2:return[s,n,c];case 3:return[s,a,n];case 4:return[c,s,n];case 5:return[n,s,a]}};J.hsv.hsl=function(r){let e=r[0],t=r[1]/100,n=r[2]/100,i=Math.max(n,.01),o,s;s=(2-t)*n;let a=(2-t)*i;return o=t*i,o/=a<=1?a:2-a,o=o||0,s/=2,[e,o*100,s*100]};J.hwb.rgb=function(r){let e=r[0]/360,t=r[1]/100,n=r[2]/100,i=t+n,o;i>1&&(t/=i,n/=i);let s=Math.floor(6*e),a=1-n;o=6*e-s,s&1&&(o=1-o);let c=t+o*(a-t),u,l,p;switch(s){default:case 6:case 0:u=a,l=c,p=t;break;case 1:u=c,l=a,p=t;break;case 2:u=t,l=a,p=c;break;case 3:u=t,l=c,p=a;break;case 4:u=c,l=t,p=a;break;case 5:u=a,l=t,p=c;break}return[u*255,l*255,p*255]};J.cmyk.rgb=function(r){let e=r[0]/100,t=r[1]/100,n=r[2]/100,i=r[3]/100,o=1-Math.min(1,e*(1-i)+i),s=1-Math.min(1,t*(1-i)+i),a=1-Math.min(1,n*(1-i)+i);return[o*255,s*255,a*255]};J.xyz.rgb=function(r){let e=r[0]/100,t=r[1]/100,n=r[2]/100,i,o,s;return i=e*3.2406+t*-1.5372+n*-.4986,o=e*-.9689+t*1.8758+n*.0415,s=e*.0557+t*-.204+n*1.057,i=i>.0031308?1.055*i**(1/2.4)-.055:i*12.92,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92,i=Math.min(Math.max(0,i),1),o=Math.min(Math.max(0,o),1),s=Math.min(Math.max(0,s),1),[i*255,o*255,s*255]};J.xyz.lab=function(r){let e=r[0],t=r[1],n=r[2];e/=95.047,t/=100,n/=108.883,e=e>.008856?e**(1/3):7.787*e+16/116,t=t>.008856?t**(1/3):7.787*t+16/116,n=n>.008856?n**(1/3):7.787*n+16/116;let i=116*t-16,o=500*(e-t),s=200*(t-n);return[i,o,s]};J.lab.xyz=function(r){let e=r[0],t=r[1],n=r[2],i,o,s;o=(e+16)/116,i=t/500+o,s=o-n/200;let a=o**3,c=i**3,u=s**3;return o=a>.008856?a:(o-16/116)/7.787,i=c>.008856?c:(i-16/116)/7.787,s=u>.008856?u:(s-16/116)/7.787,i*=95.047,o*=100,s*=108.883,[i,o,s]};J.lab.lch=function(r){let e=r[0],t=r[1],n=r[2],i;i=Math.atan2(n,t)*360/2/Math.PI,i<0&&(i+=360);let s=Math.sqrt(t*t+n*n);return[e,s,i]};J.lch.lab=function(r){let e=r[0],t=r[1],i=r[2]/360*2*Math.PI,o=t*Math.cos(i),s=t*Math.sin(i);return[e,o,s]};J.rgb.ansi16=function(r,e=null){let[t,n,i]=r,o=e===null?J.rgb.hsv(r)[2]:e;if(o=Math.round(o/50),o===0)return 30;let s=30+(Math.round(i/255)<<2|Math.round(n/255)<<1|Math.round(t/255));return o===2&&(s+=60),s};J.hsv.ansi16=function(r){return J.rgb.ansi16(J.hsv.rgb(r),r[2])};J.rgb.ansi256=function(r){let e=r[0],t=r[1],n=r[2];return e===t&&t===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(t/255*5)+Math.round(n/255*5)};J.ansi16.rgb=function(r){let e=r%10;if(e===0||e===7)return r>50&&(e+=3.5),e=e/10.5*255,[e,e,e];let t=(~~(r>50)+1)*.5,n=(e&1)*t*255,i=(e>>1&1)*t*255,o=(e>>2&1)*t*255;return[n,i,o]};J.ansi256.rgb=function(r){if(r>=232){let o=(r-232)*10+8;return[o,o,o]}r-=16;let e,t=Math.floor(r/36)/5*255,n=Math.floor((e=r%36)/6)/5*255,i=e%6/5*255;return[t,n,i]};J.rgb.hex=function(r){let t=(((Math.round(r[0])&255)<<16)+((Math.round(r[1])&255)<<8)+(Math.round(r[2])&255)).toString(16).toUpperCase();return"000000".substring(t.length)+t};J.hex.rgb=function(r){let e=r.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];let t=e[0];e[0].length===3&&(t=t.split("").map(a=>a+a).join(""));let n=parseInt(t,16),i=n>>16&255,o=n>>8&255,s=n&255;return[i,o,s]};J.rgb.hcg=function(r){let e=r[0]/255,t=r[1]/255,n=r[2]/255,i=Math.max(Math.max(e,t),n),o=Math.min(Math.min(e,t),n),s=i-o,a,c;return s<1?a=o/(1-s):a=0,s<=0?c=0:i===e?c=(t-n)/s%6:i===t?c=2+(n-e)/s:c=4+(e-t)/s,c/=6,c%=1,[c*360,s*100,a*100]};J.hsl.hcg=function(r){let e=r[1]/100,t=r[2]/100,n=t<.5?2*e*t:2*e*(1-t),i=0;return n<1&&(i=(t-.5*n)/(1-n)),[r[0],n*100,i*100]};J.hsv.hcg=function(r){let e=r[1]/100,t=r[2]/100,n=e*t,i=0;return n<1&&(i=(t-n)/(1-n)),[r[0],n*100,i*100]};J.hcg.rgb=function(r){let e=r[0]/360,t=r[1]/100,n=r[2]/100;if(t===0)return[n*255,n*255,n*255];let i=[0,0,0],o=e%1*6,s=o%1,a=1-s,c=0;switch(Math.floor(o)){case 0:i[0]=1,i[1]=s,i[2]=0;break;case 1:i[0]=a,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=s;break;case 3:i[0]=0,i[1]=a,i[2]=1;break;case 4:i[0]=s,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=a}return c=(1-t)*n,[(t*i[0]+c)*255,(t*i[1]+c)*255,(t*i[2]+c)*255]};J.hcg.hsv=function(r){let e=r[1]/100,t=r[2]/100,n=e+t*(1-e),i=0;return n>0&&(i=e/n),[r[0],i*100,n*100]};J.hcg.hsl=function(r){let e=r[1]/100,n=r[2]/100*(1-e)+.5*e,i=0;return n>0&&n<.5?i=e/(2*n):n>=.5&&n<1&&(i=e/(2*(1-n))),[r[0],i*100,n*100]};J.hcg.hwb=function(r){let e=r[1]/100,t=r[2]/100,n=e+t*(1-e);return[r[0],(n-e)*100,(1-n)*100]};J.hwb.hcg=function(r){let e=r[1]/100,n=1-r[2]/100,i=n-e,o=0;return i<1&&(o=(n-i)/(1-i)),[r[0],i*100,o*100]};J.apple.rgb=function(r){return[r[0]/65535*255,r[1]/65535*255,r[2]/65535*255]};J.rgb.apple=function(r){return[r[0]/255*65535,r[1]/255*65535,r[2]/255*65535]};J.gray.rgb=function(r){return[r[0]/100*255,r[0]/100*255,r[0]/100*255]};J.gray.hsl=function(r){return[0,0,r[0]]};J.gray.hsv=J.gray.hsl;J.gray.hwb=function(r){return[0,100,r[0]]};J.gray.cmyk=function(r){return[0,0,0,r[0]]};J.gray.lab=function(r){return[r[0],0,0]};J.gray.hex=function(r){let e=Math.round(r[0]/100*255)&255,n=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".substring(n.length)+n};J.rgb.gray=function(r){return[(r[0]+r[1]+r[2])/3/255*100]}});var B$=v((coe,N$)=>{var zf=Sb();function KG(){let r={},e=Object.keys(zf);for(let t=e.length,n=0;n{var Eb=Sb(),YG=B$(),nc={},QG=Object.keys(Eb);function ZG(r){let e=function(...t){let n=t[0];return n==null?n:(n.length>1&&(t=n),r(t))};return"conversion"in r&&(e.conversion=r.conversion),e}function e4(r){let e=function(...t){let n=t[0];if(n==null)return n;n.length>1&&(t=n);let i=r(t);if(typeof i=="object")for(let o=i.length,s=0;s{nc[r]={},Object.defineProperty(nc[r],"channels",{value:Eb[r].channels}),Object.defineProperty(nc[r],"labels",{value:Eb[r].labels});let e=YG(r);Object.keys(e).forEach(n=>{let i=e[n];nc[r][n]=e4(i),nc[r][n].raw=ZG(i)})});F$.exports=nc});var V$=v((loe,j$)=>{var ic=T$(),pr=U$(),W$=["keyword","gray","hex"],xb={};for(let r of Object.keys(pr))xb[[...pr[r].labels].sort().join("")]=r;var Jf={};function Ht(r,e){if(!(this instanceof Ht))return new Ht(r,e);if(e&&e in W$&&(e=null),e&&!(e in pr))throw new Error("Unknown model: "+e);let t,n;if(r==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(r instanceof Ht)this.model=r.model,this.color=[...r.color],this.valpha=r.valpha;else if(typeof r=="string"){let i=ic.get(r);if(i===null)throw new Error("Unable to parse color from string: "+r);this.model=i.model,n=pr[this.model].channels,this.color=i.value.slice(0,n),this.valpha=typeof i.value[n]=="number"?i.value[n]:1}else if(r.length>0){this.model=e||"rgb",n=pr[this.model].channels;let i=Array.prototype.slice.call(r,0,n);this.color=Pb(i,n),this.valpha=typeof r[n]=="number"?r[n]:1}else if(typeof r=="number")this.model="rgb",this.color=[r>>16&255,r>>8&255,r&255],this.valpha=1;else{this.valpha=1;let i=Object.keys(r);"alpha"in r&&(i.splice(i.indexOf("alpha"),1),this.valpha=typeof r.alpha=="number"?r.alpha:0);let o=i.sort().join("");if(!(o in xb))throw new Error("Unable to parse color from object: "+JSON.stringify(r));this.model=xb[o];let{labels:s}=pr[this.model],a=[];for(t=0;t(r%360+360)%360),saturationl:qe("hsl",1,lt(100)),lightness:qe("hsl",2,lt(100)),saturationv:qe("hsv",1,lt(100)),value:qe("hsv",2,lt(100)),chroma:qe("hcg",1,lt(100)),gray:qe("hcg",2,lt(100)),white:qe("hwb",1,lt(100)),wblack:qe("hwb",2,lt(100)),cyan:qe("cmyk",0,lt(100)),magenta:qe("cmyk",1,lt(100)),yellow:qe("cmyk",2,lt(100)),black:qe("cmyk",3,lt(100)),x:qe("xyz",0,lt(95.047)),y:qe("xyz",1,lt(100)),z:qe("xyz",2,lt(108.833)),l:qe("lab",0,lt(100)),a:qe("lab",1),b:qe("lab",2),keyword(r){return r!==void 0?new Ht(r):pr[this.model].keyword(this.color)},hex(r){return r!==void 0?new Ht(r):ic.to.hex(this.rgb().round().color)},hexa(r){if(r!==void 0)return new Ht(r);let e=this.rgb().round().color,t=Math.round(this.valpha*255).toString(16).toUpperCase();return t.length===1&&(t="0"+t),ic.to.hex(e)+t},rgbNumber(){let r=this.rgb().color;return(r[0]&255)<<16|(r[1]&255)<<8|r[2]&255},luminosity(){let r=this.rgb().color,e=[];for(let[t,n]of r.entries()){let i=n/255;e[t]=i<=.04045?i/12.92:((i+.055)/1.055)**2.4}return .2126*e[0]+.7152*e[1]+.0722*e[2]},contrast(r){let e=this.luminosity(),t=r.luminosity();return e>t?(e+.05)/(t+.05):(t+.05)/(e+.05)},level(r){let e=this.contrast(r);return e>=7?"AAA":e>=4.5?"AA":""},isDark(){let r=this.rgb().color;return(r[0]*2126+r[1]*7152+r[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){let r=this.rgb();for(let e=0;e<3;e++)r.color[e]=255-r.color[e];return r},lighten(r){let e=this.hsl();return e.color[2]+=e.color[2]*r,e},darken(r){let e=this.hsl();return e.color[2]-=e.color[2]*r,e},saturate(r){let e=this.hsl();return e.color[1]+=e.color[1]*r,e},desaturate(r){let e=this.hsl();return e.color[1]-=e.color[1]*r,e},whiten(r){let e=this.hwb();return e.color[1]+=e.color[1]*r,e},blacken(r){let e=this.hwb();return e.color[2]+=e.color[2]*r,e},grayscale(){let r=this.rgb().color,e=r[0]*.3+r[1]*.59+r[2]*.11;return Ht.rgb(e,e,e)},fade(r){return this.alpha(this.valpha-this.valpha*r)},opaquer(r){return this.alpha(this.valpha+this.valpha*r)},rotate(r){let e=this.hsl(),t=e.color[0];return t=(t+r)%360,t=t<0?360+t:t,e.color[0]=t,e},mix(r,e){if(!r||!r.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof r);let t=r.rgb(),n=this.rgb(),i=e===void 0?.5:e,o=2*i-1,s=t.alpha()-n.alpha(),a=((o*s===-1?o:(o+s)/(1+o*s))+1)/2,c=1-a;return Ht.rgb(a*t.red()+c*n.red(),a*t.green()+c*n.green(),a*t.blue()+c*n.blue(),t.alpha()*i+n.alpha()*(1-i))}};for(let r of Object.keys(pr)){if(W$.includes(r))continue;let{channels:e}=pr[r];Ht.prototype[r]=function(...t){return this.model===r?new Ht(this):t.length>0?new Ht(t,r):new Ht([...n4(pr[this.model][r].raw(this.color)),this.valpha],r)},Ht[r]=function(...t){let n=t[0];return typeof n=="number"&&(n=Pb(t,e)),new Ht(n,r)}}function t4(r,e){return Number(r.toFixed(e))}function r4(r){return function(e){return t4(e,r)}}function qe(r,e,t){r=Array.isArray(r)?r:[r];for(let n of r)(Jf[n]||(Jf[n]=[]))[e]=t;return r=r[0],function(n){let i;return n!==void 0?(t&&(n=t(n)),i=this[r](),i.color[e]=n,i):(i=this[r]().color[e],t&&(i=t(i)),i)}}function lt(r){return function(e){return Math.max(0,Math.min(r,e))}}function n4(r){return Array.isArray(r)?r:[r]}function Pb(r,e){for(let t=0;t{"use strict";Object.defineProperty(Rt,"__esModule",{value:!0});Rt.findWindowsCandidates=Rt.sort=Rt.preferredEdgePath=Rt.preferredFirefoxPath=Rt.preferredChromePath=Rt.escapeRegexSpecialChars=Rt.canAccess=void 0;var O4=H("path");async function Ll({access:r},e){if(!e)return!1;try{return await r(e),!0}catch{return!1}}Rt.canAccess=Ll;var N4="/\\.?*()^${}|[]+";function B4(r,e){let t=N4.split("").filter(i=>!e||e.indexOf(i)<0).join("").replace(/[\\\]]/g,"\\$&"),n=new RegExp(`[${t}]`,"g");return r.replace(n,"\\$&")}Rt.escapeRegexSpecialChars=B4;async function F4(r,e){if(await Ll(r,e.CHROME_PATH))return e.CHROME_PATH}Rt.preferredChromePath=F4;async function U4(r,e){if(await Ll(r,e.FIREFOX_PATH))return e.FIREFOX_PATH}Rt.preferredFirefoxPath=U4;async function W4(r,e){if(await Ll(r,e.EDGE_PATH))return e.EDGE_PATH}Rt.preferredEdgePath=W4;function j4(r,e){return[...r].filter(n=>!!n).map(n=>{let i=e.find(o=>o.regex.test(n));return i?{path:n,weight:i.weight,quality:i.quality}:{path:n,weight:10,quality:"dev"}}).sort((n,i)=>i.weight-n.weight).map(n=>({path:n.path,quality:n.quality}))}Rt.sort=j4;async function V4(r,e,t){let n=[r.LOCALAPPDATA,r.PROGRAMFILES,r["PROGRAMFILES(X86)"]].filter(o=>!!o),i=[];for(let o of n)for(let s of t){let a=O4.win32.join(o,s.name);i.push(Ll(e,a).then(c=>c?{path:a,quality:s.type}:void 0))}return(await Promise.all(i)).filter(o=>!!o)}Rt.findWindowsCandidates=V4});var Lh=v(Ph=>{"use strict";Object.defineProperty(Ph,"__esModule",{value:!0});Ph.DarwinFinderBase=void 0;var q4=H("path"),G4=H("fs"),pv=Si(),VC=/( \(0x[a-f0-9]+\))/,dv=class{constructor(e=process.env,t=G4.promises,n=n){this.env=e,this.fs=t,this.execa=n,this.lsRegisterCommand="/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -dump",this.wellKnownPaths=[]}async findWhere(e){for(let t of this.wellKnownPaths)if(e(t)&&await(0,pv.canAccess)(this.fs,t.path))return t;return(await this.findAll()).find(e)}findAll(){var e;return(e=this.foundAll)!==null&&e!==void 0||(this.foundAll=this.findAllInner()),this.foundAll}async findLaunchRegisteredApps(e,t,n){let{stdout:i}=await this.execa.command(`${this.lsRegisterCommand} | awk 'tolower($0) ~ /${e.toLowerCase()}${VC.source}?$/ { $1=""; print $0 }'`,{shell:!0,stdio:"pipe"}),o=[...t,...i.split(` +`).map(c=>c.trim().replace(VC,""))].filter(c=>!!c),s=this.getPreferredPath();s&&o.push(s);let a=new Set;for(let c of o)for(let u of n){let l=q4.posix.join(c.trim(),u);try{await this.fs.access(l),a.add(l)}catch{}}return a}createPriorities(e){let t=this.env.HOME&&(0,pv.escapeRegexSpecialChars)(this.env.HOME),n=this.getPreferredPath(),i=e.reduce((o,s)=>[...o,{regex:new RegExp(`^/Applications/.*${s.name}`),weight:s.weight+100,quality:s.quality},{regex:new RegExp(`^${t}/Applications/.*${s.name}`),weight:s.weight,quality:s.quality},{regex:new RegExp(`^/Volumes/.*${s.name}`),weight:s.weight-100,quality:s.quality}],[]);return n&&i.unshift({regex:new RegExp((0,pv.escapeRegexSpecialChars)(n)),weight:151,quality:"custom"}),i}};Ph.DarwinFinderBase=dv});var qC=v($h=>{"use strict";Object.defineProperty($h,"__esModule",{value:!0});$h.DarwinChromeBrowserFinder=void 0;var K4=Si(),X4=Lh(),fv=class extends X4.DarwinFinderBase{constructor(){super(...arguments),this.wellKnownPaths=[{path:"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome",quality:"stable"},{path:"/Applications/Google Chrome Canary.app/Contents/MacOS/Google Chrome Canary",quality:"canary"},{path:"/Applications/Google Chrome Beta.app/Contents/MacOS/Google Chrome Beta",quality:"beta"},{path:"/Applications/Google Chrome Dev.app/Contents/MacOS/Google Chrome Dev",quality:"dev"}]}async findAllInner(){let e=["/Contents/MacOS/Google Chrome Canary","/Contents/MacOS/Google Chrome Beta","/Contents/MacOS/Google Chrome Dev","/Contents/MacOS/Google Chrome"],t=["/Applications/Google Chrome.app","/Applications/Google Chrome Canary.app"],n=await this.findLaunchRegisteredApps("google chrome[A-Za-z() ]*.app",t,e);return(0,K4.sort)(n,this.createPriorities([{name:"Chrome.app",weight:0,quality:"stable"},{name:"Chrome Canary.app",weight:1,quality:"canary"},{name:"Chrome Beta.app",weight:2,quality:"beta"},{name:"Chrome Dev.app",weight:3,quality:"dev"}]))}getPreferredPath(){return this.env.CHROME_PATH}};$h.DarwinChromeBrowserFinder=fv});var GC=v(Ch=>{"use strict";Object.defineProperty(Ch,"__esModule",{value:!0});Ch.DarwinEdgeBrowserFinder=void 0;var z4=Si(),J4=Lh(),hv=class extends J4.DarwinFinderBase{constructor(){super(...arguments),this.wellKnownPaths=[{path:"/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge",quality:"stable"},{path:"/Applications/Microsoft Edge Canary.app/Contents/MacOS/Microsoft Edge Canary",quality:"canary"},{path:"/Applications/Microsoft Edge Beta.app/Contents/MacOS/Microsoft Edge Beta",quality:"beta"},{path:"/Applications/Microsoft Edge Dev.app/Contents/MacOS/Microsoft Edge Dev",quality:"dev"}]}async findAllInner(){let e=["/Contents/MacOS/Microsoft Edge Canary","/Contents/MacOS/Microsoft Edge Beta","/Contents/MacOS/Microsoft Edge Dev","/Contents/MacOS/Microsoft Edge"],t=["/Applications/Microsoft Edge.app"],n=await this.findLaunchRegisteredApps("Microsoft Edge[A-Za-z ]*.app",t,e);return(0,z4.sort)(n,this.createPriorities([{name:"Microsoft Edge.app",weight:0,quality:"stable"},{name:"Microsoft Edge Canary.app",weight:1,quality:"canary"},{name:"Microsoft Edge Beta.app",weight:2,quality:"beta"},{name:"Microsoft Edge Dev.app",weight:3,quality:"dev"}]))}getPreferredPath(){return this.env.EDGE_PATH}};Ch.DarwinEdgeBrowserFinder=hv});var KC=v(Dh=>{"use strict";Object.defineProperty(Dh,"__esModule",{value:!0});Dh.DarwinFirefoxBrowserFinder=void 0;var Y4=Si(),Q4=Lh(),mv=class extends Q4.DarwinFinderBase{constructor(){super(...arguments),this.wellKnownPaths=[{path:"/Applications/Firefox.app/Contents/MacOS/firefox",quality:"stable"},{path:"/Applications/Firefox Developer Edition.app/Contents/MacOS/firefox",quality:"dev"},{path:"/Applications/Firefox Nightly.app/Contents/MacOS/firefox",quality:"canary"}]}async findAllInner(){let e=["/Contents/MacOS/firefox"],t=["/Applications/Firefox.app"],n=await this.findLaunchRegisteredApps("Firefox[A-Za-z ]*.app",t,e);return(0,Y4.sort)(n,this.createPriorities([{name:"Firefox.app",weight:0,quality:"stable"},{name:"Firefox Nightly.app",weight:1,quality:"canary"},{name:"Firefox Developer Edition.app",weight:2,quality:"dev"}]))}getPreferredPath(){return this.env.FIREFOX_PATH}};Dh.DarwinFirefoxBrowserFinder=mv});var Mh=v(Th=>{"use strict";Object.defineProperty(Th,"__esModule",{value:!0});Th.LinuxChromeBrowserFinder=void 0;var Z4=H("path"),hc=Si(),Hv=H("child_process"),e5=H("os"),t5=H("fs"),XC=/\r?\n/,gv=class{constructor(e=process.env,t=t5.promises){this.env=e,this.fs=t,this.pathEnvironmentVar="CHROME_PATH",this.priorities=[{regex:/chrome-wrapper$/,weight:54,quality:"custom"},{regex:/google-chrome-dev$/,weight:53,quality:"dev"},{regex:/google-chrome-canary$/,weight:52,quality:"canary"},{regex:/google-chrome-unstable$/,weight:51,quality:"canary"},{regex:/google-chrome-canary$/,weight:51,quality:"canary"},{regex:/google-chrome-stable$/,weight:50,quality:"stable"},{regex:/(google-)?chrome$/,weight:49,quality:"stable"},{regex:/chromium-browser$/,weight:48,quality:"custom"},{regex:/chromium$/,weight:47,quality:"custom"}],this.executablesOnPath=["google-chrome-unstable","google-chrome-dev","google-chrome-beta","google-chrome-canary","google-chrome-stable","google-chrome","chromium-browser","chromium"]}async findWhere(e){return(await this.findAll()).find(e)}async findAll(){let e=new Set,t=this.env[this.pathEnvironmentVar];t&&await(0,hc.canAccess)(this.fs,t)&&e.add(t),[Z4.posix.join((0,e5.homedir)(),".local/share/applications/"),"/usr/share/applications/","/usr/bin","/opt/google"].forEach(s=>{for(let a in this.findChromeExecutables(s))e.add(a)}),await Promise.all(this.executablesOnPath.map(async s=>{try{let a=(0,Hv.execFileSync)("which",[s],{stdio:"pipe"}).toString().split(XC)[0];await(0,hc.canAccess)(this.fs,a)&&e.add(a)}catch{}}));let o=t?[{regex:new RegExp((0,hc.escapeRegexSpecialChars)(t)),weight:101,quality:"custom"}].concat(this.priorities):this.priorities;return(0,hc.sort)(e,o)}async findChromeExecutables(e){let t=/(^[^ ]+).*/,n=`^Exec=/.*/(${this.executablesOnPath.join("|")})-.*`,i=[];if(await(0,hc.canAccess)(this.fs,e)){let o;try{o=(0,Hv.execSync)(`grep -ERI "${n}" ${e} | awk -F '=' '{print $2}'`)}catch{o=(0,Hv.execSync)(`grep -Er "${n}" ${e} | awk -F '=' '{print $2}'`)}let s=o.toString().split(XC).map(a=>a.replace(t,"$1"));await Promise.all(s.map(async a=>{await(0,hc.canAccess)(this.fs,a)&&i.push(a)}))}return i}};Th.LinuxChromeBrowserFinder=gv});var zC=v(Rh=>{"use strict";Object.defineProperty(Rh,"__esModule",{value:!0});Rh.LinuxEdgeBrowserFinder=void 0;var r5=Mh(),yv=class extends r5.LinuxChromeBrowserFinder{constructor(){super(...arguments),this.pathEnvironmentVar="EDGE_PATH",this.executablesOnPath=["microsoft-edge-dev","microsoft-edge-beta","microsoft-edge-stable","microsoft-edge"],this.priorities=[{regex:/microsoft-edge\-wrapper$/,weight:52,quality:"custom"},{regex:/microsoft-edge\-dev$/,weight:51,quality:"dev"},{regex:/microsoft-edge\-beta$/,weight:51,quality:"beta"},{regex:/microsoft-edge\-stable$/,weight:50,quality:"stable"},{regex:/microsoft-edge$/,weight:49,quality:"stable"}]}};Rh.LinuxEdgeBrowserFinder=yv});var JC=v(kh=>{"use strict";Object.defineProperty(kh,"__esModule",{value:!0});kh.LinuxFirefoxBrowserFinder=void 0;var n5=Mh(),bv=class extends n5.LinuxChromeBrowserFinder{constructor(){super(...arguments),this.pathEnvironmentVar="FIREFOX_PATH",this.executablesOnPath=["firefox-aurora","firefox-dev","firefox-developer","firefox-trunk","firefox-nightly","firefox"],this.priorities=[{regex:/firefox\-aurora$/,weight:51,quality:"dev"},{regex:/firefox\-dev$/,weight:51,quality:"dev"},{regex:/firefox\-developer$/,weight:51,quality:"dev"},{regex:/firefox\-trunk'$/,weight:50,quality:"canary"},{regex:/firefox\-nightly'$/,weight:50,quality:"canary"},{regex:/firefox$/,weight:49,quality:"stable"}]}};kh.LinuxFirefoxBrowserFinder=bv});var QC=v(Oh=>{"use strict";Object.defineProperty(Oh,"__esModule",{value:!0});Oh.WindowsChromeBrowserFinder=void 0;var i5=H("path"),YC=Si(),o5=H("fs"),vv=class{constructor(e=process.env,t=o5.promises){this.env=e,this.fs=t}async findWhere(e){return(await this.findAll()).find(e)}async findAll(){let e=i5.win32.sep,t=[{name:`${e}Google${e}Chrome Dev${e}Application${e}chrome.exe`,type:"dev"},{name:`${e}Google${e}Chrome SxS${e}Application${e}chrome.exe`,type:"canary"},{name:`${e}Google${e}Chrome Beta${e}Application${e}chrome.exe`,type:"beta"},{name:`${e}Google${e}Chrome${e}Application${e}chrome.exe`,type:"stable"}],n=await(0,YC.findWindowsCandidates)(this.env,this.fs,t),i=await(0,YC.preferredChromePath)(this.fs,this.env);return i&&n.unshift({path:i,quality:"custom"}),n}};Oh.WindowsChromeBrowserFinder=vv});var eD=v(Nh=>{"use strict";Object.defineProperty(Nh,"__esModule",{value:!0});Nh.WindowsEdgeBrowserFinder=void 0;var kt=H("path"),s5=H("fs"),ZC=Si(),Iv=class{constructor(e=process.env,t=s5.promises){this.env=e,this.fs=t}async findWhere(e){return(await this.findAll()).find(e)}async findAll(){let e=[{name:`${kt.sep}Microsoft${kt.sep}Edge SxS${kt.sep}Application${kt.sep}msedge.exe`,type:"canary"},{name:`${kt.sep}Microsoft${kt.sep}Edge Dev${kt.sep}Application${kt.sep}msedge.exe`,type:"dev"},{name:`${kt.sep}Microsoft${kt.sep}Edge Beta${kt.sep}Application${kt.sep}msedge.exe`,type:"beta"},{name:`${kt.sep}Microsoft${kt.sep}Edge${kt.sep}Application${kt.sep}msedge.exe`,type:"stable"}],t=await(0,ZC.findWindowsCandidates)(this.env,this.fs,e),n=await(0,ZC.preferredEdgePath)(this.fs,this.env);return n&&t.unshift({path:n,quality:"custom"}),t}};Nh.WindowsEdgeBrowserFinder=Iv});var rD=v(Bh=>{"use strict";Object.defineProperty(Bh,"__esModule",{value:!0});Bh.WindowsFirefoxBrowserFinder=void 0;var a5=H("path"),tD=Si(),c5=H("fs"),_v=class{constructor(e=process.env,t=c5.promises){this.env=e,this.fs=t}async findWhere(e){return(await this.findAll()).find(e)}async findAll(){let e=a5.win32.sep,t=[{name:`${e}Firefox Developer Edition${e}firefox.exe`,type:"dev"},{name:`${e}Firefox Nightly${e}firefox.exe`,type:"canary"},{name:`${e}Mozilla Firefox${e}firefox.exe`,type:"stable"}],n=await(0,tD.findWindowsCandidates)(this.env,this.fs,t),i=await(0,tD.preferredFirefoxPath)(this.fs,this.env);return i&&n.unshift({path:i,quality:"custom"}),n}};Bh.WindowsFirefoxBrowserFinder=_v});var Av=v(mr=>{"use strict";Object.defineProperty(mr,"__esModule",{value:!0});mr.FirefoxBrowserFinder=mr.EdgeBrowserFinder=mr.ChromeBrowserFinder=mr.isQuality=mr.allQualities=void 0;var u5=qC(),l5=GC(),p5=KC(),d5=Mh(),f5=zC(),h5=JC(),m5=QC(),H5=eD(),g5=rD(),y5={canary:null,stable:null,beta:null,dev:null,custom:null};mr.allQualities=new Set(Object.keys(y5));var b5=r=>mr.allQualities.has(r);mr.isQuality=b5;mr.ChromeBrowserFinder=process.platform==="win32"?m5.WindowsChromeBrowserFinder:process.platform==="darwin"?u5.DarwinChromeBrowserFinder:d5.LinuxChromeBrowserFinder;mr.EdgeBrowserFinder=process.platform==="win32"?H5.WindowsEdgeBrowserFinder:process.platform==="darwin"?l5.DarwinEdgeBrowserFinder:f5.LinuxEdgeBrowserFinder;mr.FirefoxBrowserFinder=process.platform==="win32"?g5.WindowsFirefoxBrowserFinder:process.platform==="darwin"?p5.DarwinFirefoxBrowserFinder:h5.LinuxFirefoxBrowserFinder});var cD=v(jh=>{"use strict";Object.defineProperty(jh,"__esModule",{value:!0});jh.dataUriToBuffer=void 0;function I5(r){let e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=[];for(let o=0;o>4,p=(a&15)<<4|c>>2,d=(c&3)<<6|u;t.push(l),r.charAt(o+2)!=="="&&t.push(p),r.charAt(o+3)!=="="&&t.push(d)}let n=new ArrayBuffer(t.length);return new Uint8Array(n).set(t),n}function _5(r){let e=new ArrayBuffer(r.length),t=new Uint8Array(e);for(let n=0;n{"use strict";Object.defineProperty(Ei,"__esModule",{value:!0});var uD=["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"];function w5(r){return uD.includes(r)}var S5=["Function","Generator","AsyncGenerator","GeneratorFunction","AsyncGeneratorFunction","AsyncFunction","Observable","Array","Buffer","Blob","Object","RegExp","Date","Error","Map","Set","WeakMap","WeakSet","ArrayBuffer","SharedArrayBuffer","DataView","Promise","URL","FormData","URLSearchParams","HTMLElement",...uD];function E5(r){return S5.includes(r)}var x5=["null","undefined","string","number","bigint","boolean","symbol"];function P5(r){return x5.includes(r)}function gc(r){return e=>typeof e===r}var{toString:lD}=Object.prototype,Dl=r=>{let e=lD.call(r).slice(8,-1);if(/HTML\w+Element/.test(e)&&b.domElement(r))return"HTMLElement";if(E5(e))return e},Ee=r=>e=>Dl(e)===r;function b(r){if(r===null)return"null";switch(typeof r){case"undefined":return"undefined";case"string":return"string";case"number":return"number";case"boolean":return"boolean";case"function":return"Function";case"bigint":return"bigint";case"symbol":return"symbol";default:}if(b.observable(r))return"Observable";if(b.array(r))return"Array";if(b.buffer(r))return"Buffer";let e=Dl(r);if(e)return e;if(r instanceof String||r instanceof Boolean||r instanceof Number)throw new TypeError("Please don't use object wrappers for primitive types");return"Object"}b.undefined=gc("undefined");b.string=gc("string");var L5=gc("number");b.number=r=>L5(r)&&!b.nan(r);b.bigint=gc("bigint");b.function_=gc("function");b.null_=r=>r===null;b.class_=r=>b.function_(r)&&r.toString().startsWith("class ");b.boolean=r=>r===!0||r===!1;b.symbol=gc("symbol");b.numericString=r=>b.string(r)&&!b.emptyStringOrWhitespace(r)&&!Number.isNaN(Number(r));b.array=(r,e)=>Array.isArray(r)?b.function_(e)?r.every(e):!0:!1;b.buffer=r=>{var e,t,n,i;return(i=(n=(t=(e=r)===null||e===void 0?void 0:e.constructor)===null||t===void 0?void 0:t.isBuffer)===null||n===void 0?void 0:n.call(t,r))!==null&&i!==void 0?i:!1};b.blob=r=>Ee("Blob")(r);b.nullOrUndefined=r=>b.null_(r)||b.undefined(r);b.object=r=>!b.null_(r)&&(typeof r=="object"||b.function_(r));b.iterable=r=>{var e;return b.function_((e=r)===null||e===void 0?void 0:e[Symbol.iterator])};b.asyncIterable=r=>{var e;return b.function_((e=r)===null||e===void 0?void 0:e[Symbol.asyncIterator])};b.generator=r=>{var e,t;return b.iterable(r)&&b.function_((e=r)===null||e===void 0?void 0:e.next)&&b.function_((t=r)===null||t===void 0?void 0:t.throw)};b.asyncGenerator=r=>b.asyncIterable(r)&&b.function_(r.next)&&b.function_(r.throw);b.nativePromise=r=>Ee("Promise")(r);var $5=r=>{var e,t;return b.function_((e=r)===null||e===void 0?void 0:e.then)&&b.function_((t=r)===null||t===void 0?void 0:t.catch)};b.promise=r=>b.nativePromise(r)||$5(r);b.generatorFunction=Ee("GeneratorFunction");b.asyncGeneratorFunction=r=>Dl(r)==="AsyncGeneratorFunction";b.asyncFunction=r=>Dl(r)==="AsyncFunction";b.boundFunction=r=>b.function_(r)&&!r.hasOwnProperty("prototype");b.regExp=Ee("RegExp");b.date=Ee("Date");b.error=Ee("Error");b.map=r=>Ee("Map")(r);b.set=r=>Ee("Set")(r);b.weakMap=r=>Ee("WeakMap")(r);b.weakSet=r=>Ee("WeakSet")(r);b.int8Array=Ee("Int8Array");b.uint8Array=Ee("Uint8Array");b.uint8ClampedArray=Ee("Uint8ClampedArray");b.int16Array=Ee("Int16Array");b.uint16Array=Ee("Uint16Array");b.int32Array=Ee("Int32Array");b.uint32Array=Ee("Uint32Array");b.float32Array=Ee("Float32Array");b.float64Array=Ee("Float64Array");b.bigInt64Array=Ee("BigInt64Array");b.bigUint64Array=Ee("BigUint64Array");b.arrayBuffer=Ee("ArrayBuffer");b.sharedArrayBuffer=Ee("SharedArrayBuffer");b.dataView=Ee("DataView");b.enumCase=(r,e)=>Object.values(e).includes(r);b.directInstanceOf=(r,e)=>Object.getPrototypeOf(r)===e.prototype;b.urlInstance=r=>Ee("URL")(r);b.urlString=r=>{if(!b.string(r))return!1;try{return new URL(r),!0}catch{return!1}};b.truthy=r=>!!r;b.falsy=r=>!r;b.nan=r=>Number.isNaN(r);b.primitive=r=>b.null_(r)||P5(typeof r);b.integer=r=>Number.isInteger(r);b.safeInteger=r=>Number.isSafeInteger(r);b.plainObject=r=>{if(lD.call(r)!=="[object Object]")return!1;let e=Object.getPrototypeOf(r);return e===null||e===Object.getPrototypeOf({})};b.typedArray=r=>w5(Dl(r));var C5=r=>b.safeInteger(r)&&r>=0;b.arrayLike=r=>!b.nullOrUndefined(r)&&!b.function_(r)&&C5(r.length);b.inRange=(r,e)=>{if(b.number(e))return r>=Math.min(0,e)&&r<=Math.max(e,0);if(b.array(e)&&e.length===2)return r>=Math.min(...e)&&r<=Math.max(...e);throw new TypeError(`Invalid range: ${JSON.stringify(e)}`)};var D5=1,T5=["innerHTML","ownerDocument","style","attributes","nodeValue"];b.domElement=r=>b.object(r)&&r.nodeType===D5&&b.string(r.nodeName)&&!b.plainObject(r)&&T5.every(e=>e in r);b.observable=r=>{var e,t,n,i;return r?r===((t=(e=r)[Symbol.observable])===null||t===void 0?void 0:t.call(e))||r===((i=(n=r)["@@observable"])===null||i===void 0?void 0:i.call(n)):!1};b.nodeStream=r=>b.object(r)&&b.function_(r.pipe)&&!b.observable(r);b.infinite=r=>r===1/0||r===-1/0;var pD=r=>e=>b.integer(e)&&Math.abs(e%2)===r;b.evenInteger=pD(0);b.oddInteger=pD(1);b.emptyArray=r=>b.array(r)&&r.length===0;b.nonEmptyArray=r=>b.array(r)&&r.length>0;b.emptyString=r=>b.string(r)&&r.length===0;var M5=r=>b.string(r)&&!/\S/.test(r);b.emptyStringOrWhitespace=r=>b.emptyString(r)||M5(r);b.nonEmptyString=r=>b.string(r)&&r.length>0;b.nonEmptyStringAndNotWhitespace=r=>b.string(r)&&!b.emptyStringOrWhitespace(r);b.emptyObject=r=>b.object(r)&&!b.map(r)&&!b.set(r)&&Object.keys(r).length===0;b.nonEmptyObject=r=>b.object(r)&&!b.map(r)&&!b.set(r)&&Object.keys(r).length>0;b.emptySet=r=>b.set(r)&&r.size===0;b.nonEmptySet=r=>b.set(r)&&r.size>0;b.emptyMap=r=>b.map(r)&&r.size===0;b.nonEmptyMap=r=>b.map(r)&&r.size>0;b.propertyKey=r=>b.any([b.string,b.number,b.symbol],r);b.formData=r=>Ee("FormData")(r);b.urlSearchParams=r=>Ee("URLSearchParams")(r);var dD=(r,e,t)=>{if(!b.function_(e))throw new TypeError(`Invalid predicate: ${JSON.stringify(e)}`);if(t.length===0)throw new TypeError("Invalid number of values");return r.call(t,e)};b.any=(r,...e)=>(b.array(r)?r:[r]).some(n=>dD(Array.prototype.some,n,e));b.all=(r,...e)=>dD(Array.prototype.every,r,e);var R=(r,e,t,n={})=>{if(!r){let{multipleValues:i}=n,o=i?`received values of types ${[...new Set(t.map(s=>`\`${b(s)}\``))].join(", ")}`:`received value of type \`${b(t)}\``;throw new TypeError(`Expected value which is \`${e}\`, ${o}.`)}};Ei.assert={undefined:r=>R(b.undefined(r),"undefined",r),string:r=>R(b.string(r),"string",r),number:r=>R(b.number(r),"number",r),bigint:r=>R(b.bigint(r),"bigint",r),function_:r=>R(b.function_(r),"Function",r),null_:r=>R(b.null_(r),"null",r),class_:r=>R(b.class_(r),"Class",r),boolean:r=>R(b.boolean(r),"boolean",r),symbol:r=>R(b.symbol(r),"symbol",r),numericString:r=>R(b.numericString(r),"string with a number",r),array:(r,e)=>{R(b.array(r),"Array",r),e&&r.forEach(e)},buffer:r=>R(b.buffer(r),"Buffer",r),blob:r=>R(b.blob(r),"Blob",r),nullOrUndefined:r=>R(b.nullOrUndefined(r),"null or undefined",r),object:r=>R(b.object(r),"Object",r),iterable:r=>R(b.iterable(r),"Iterable",r),asyncIterable:r=>R(b.asyncIterable(r),"AsyncIterable",r),generator:r=>R(b.generator(r),"Generator",r),asyncGenerator:r=>R(b.asyncGenerator(r),"AsyncGenerator",r),nativePromise:r=>R(b.nativePromise(r),"native Promise",r),promise:r=>R(b.promise(r),"Promise",r),generatorFunction:r=>R(b.generatorFunction(r),"GeneratorFunction",r),asyncGeneratorFunction:r=>R(b.asyncGeneratorFunction(r),"AsyncGeneratorFunction",r),asyncFunction:r=>R(b.asyncFunction(r),"AsyncFunction",r),boundFunction:r=>R(b.boundFunction(r),"Function",r),regExp:r=>R(b.regExp(r),"RegExp",r),date:r=>R(b.date(r),"Date",r),error:r=>R(b.error(r),"Error",r),map:r=>R(b.map(r),"Map",r),set:r=>R(b.set(r),"Set",r),weakMap:r=>R(b.weakMap(r),"WeakMap",r),weakSet:r=>R(b.weakSet(r),"WeakSet",r),int8Array:r=>R(b.int8Array(r),"Int8Array",r),uint8Array:r=>R(b.uint8Array(r),"Uint8Array",r),uint8ClampedArray:r=>R(b.uint8ClampedArray(r),"Uint8ClampedArray",r),int16Array:r=>R(b.int16Array(r),"Int16Array",r),uint16Array:r=>R(b.uint16Array(r),"Uint16Array",r),int32Array:r=>R(b.int32Array(r),"Int32Array",r),uint32Array:r=>R(b.uint32Array(r),"Uint32Array",r),float32Array:r=>R(b.float32Array(r),"Float32Array",r),float64Array:r=>R(b.float64Array(r),"Float64Array",r),bigInt64Array:r=>R(b.bigInt64Array(r),"BigInt64Array",r),bigUint64Array:r=>R(b.bigUint64Array(r),"BigUint64Array",r),arrayBuffer:r=>R(b.arrayBuffer(r),"ArrayBuffer",r),sharedArrayBuffer:r=>R(b.sharedArrayBuffer(r),"SharedArrayBuffer",r),dataView:r=>R(b.dataView(r),"DataView",r),enumCase:(r,e)=>R(b.enumCase(r,e),"EnumCase",r),urlInstance:r=>R(b.urlInstance(r),"URL",r),urlString:r=>R(b.urlString(r),"string with a URL",r),truthy:r=>R(b.truthy(r),"truthy",r),falsy:r=>R(b.falsy(r),"falsy",r),nan:r=>R(b.nan(r),"NaN",r),primitive:r=>R(b.primitive(r),"primitive",r),integer:r=>R(b.integer(r),"integer",r),safeInteger:r=>R(b.safeInteger(r),"integer",r),plainObject:r=>R(b.plainObject(r),"plain object",r),typedArray:r=>R(b.typedArray(r),"TypedArray",r),arrayLike:r=>R(b.arrayLike(r),"array-like",r),domElement:r=>R(b.domElement(r),"HTMLElement",r),observable:r=>R(b.observable(r),"Observable",r),nodeStream:r=>R(b.nodeStream(r),"Node.js Stream",r),infinite:r=>R(b.infinite(r),"infinite number",r),emptyArray:r=>R(b.emptyArray(r),"empty array",r),nonEmptyArray:r=>R(b.nonEmptyArray(r),"non-empty array",r),emptyString:r=>R(b.emptyString(r),"empty string",r),emptyStringOrWhitespace:r=>R(b.emptyStringOrWhitespace(r),"empty string or whitespace",r),nonEmptyString:r=>R(b.nonEmptyString(r),"non-empty string",r),nonEmptyStringAndNotWhitespace:r=>R(b.nonEmptyStringAndNotWhitespace(r),"non-empty string and not whitespace",r),emptyObject:r=>R(b.emptyObject(r),"empty object",r),nonEmptyObject:r=>R(b.nonEmptyObject(r),"non-empty object",r),emptySet:r=>R(b.emptySet(r),"empty set",r),nonEmptySet:r=>R(b.nonEmptySet(r),"non-empty set",r),emptyMap:r=>R(b.emptyMap(r),"empty map",r),nonEmptyMap:r=>R(b.nonEmptyMap(r),"non-empty map",r),propertyKey:r=>R(b.propertyKey(r),"PropertyKey",r),formData:r=>R(b.formData(r),"FormData",r),urlSearchParams:r=>R(b.urlSearchParams(r),"URLSearchParams",r),evenInteger:r=>R(b.evenInteger(r),"even integer",r),oddInteger:r=>R(b.oddInteger(r),"odd integer",r),directInstanceOf:(r,e)=>R(b.directInstanceOf(r,e),"T",r),inRange:(r,e)=>R(b.inRange(r,e),"in range",r),any:(r,...e)=>R(b.any(r,...e),"predicate returns truthy for any value",e,{multipleValues:!0}),all:(r,...e)=>R(b.all(r,...e),"predicate returns truthy for all values",e,{multipleValues:!0})};Object.defineProperties(b,{class:{value:b.class_},function:{value:b.function_},null:{value:b.null_}});Object.defineProperties(Ei.assert,{class:{value:Ei.assert.class_},function:{value:Ei.assert.function_},null:{value:Ei.assert.null_}});Ei.default=b;Vh.exports=b;Vh.exports.default=b;Vh.exports.assert=Ei.assert});var fD=v((Fle,Sv)=>{"use strict";var qh=class extends Error{constructor(e){super(e||"Promise was canceled"),this.name="CancelError"}get isCanceled(){return!0}},Gh=class r{static fn(e){return(...t)=>new r((n,i,o)=>{t.push(o),e(...t).then(n,i)})}constructor(e){this._cancelHandlers=[],this._isPending=!0,this._isCanceled=!1,this._rejectOnCancel=!0,this._promise=new Promise((t,n)=>{this._reject=n;let i=a=>{(!this._isCanceled||!s.shouldReject)&&(this._isPending=!1,t(a))},o=a=>{this._isPending=!1,n(a)},s=a=>{if(!this._isPending)throw new Error("The `onCancel` handler was attached after the promise settled.");this._cancelHandlers.push(a)};return Object.defineProperties(s,{shouldReject:{get:()=>this._rejectOnCancel,set:a=>{this._rejectOnCancel=a}}}),e(i,o,s)})}then(e,t){return this._promise.then(e,t)}catch(e){return this._promise.catch(e)}finally(e){return this._promise.finally(e)}cancel(e){if(!(!this._isPending||this._isCanceled)){if(this._isCanceled=!0,this._cancelHandlers.length>0)try{for(let t of this._cancelHandlers)t()}catch(t){this._reject(t);return}this._rejectOnCancel&&this._reject(new qh(e))}}get isCanceled(){return this._isCanceled}};Object.setPrototypeOf(Gh.prototype,Promise.prototype);Sv.exports=Gh;Sv.exports.CancelError=qh});var hD=v((xv,Pv)=>{"use strict";Object.defineProperty(xv,"__esModule",{value:!0});function R5(r){return r.encrypted}var Ev=(r,e)=>{let t;typeof e=="function"?t={connect:e}:t=e;let n=typeof t.connect=="function",i=typeof t.secureConnect=="function",o=typeof t.close=="function",s=()=>{n&&t.connect(),R5(r)&&i&&(r.authorized?t.secureConnect():r.authorizationError||r.once("secureConnect",t.secureConnect)),o&&r.once("close",t.close)};r.writable&&!r.connecting?s():r.connecting?r.once("connect",s):r.destroyed&&o&&t.close(r._hadError)};xv.default=Ev;Pv.exports=Ev;Pv.exports.default=Ev});var mD=v(($v,Cv)=>{"use strict";Object.defineProperty($v,"__esModule",{value:!0});var k5=hD(),O5=H("util"),N5=Number(process.versions.node.split(".")[0]),Lv=r=>{if(r.timings)return r.timings;let e={start:Date.now(),socket:void 0,lookup:void 0,connect:void 0,secureConnect:void 0,upload:void 0,response:void 0,end:void 0,error:void 0,abort:void 0,phases:{wait:void 0,dns:void 0,tcp:void 0,tls:void 0,request:void 0,firstByte:void 0,download:void 0,total:void 0}};r.timings=e;let t=a=>{let c=a.emit.bind(a);a.emit=(u,...l)=>(u==="error"&&(e.error=Date.now(),e.phases.total=e.error-e.start,a.emit=c),c(u,...l))};t(r);let n=()=>{e.abort=Date.now(),(!e.response||N5>=13)&&(e.phases.total=Date.now()-e.start)};r.prependOnceListener("abort",n);let i=a=>{if(e.socket=Date.now(),e.phases.wait=e.socket-e.start,O5.types.isProxy(a))return;let c=()=>{e.lookup=Date.now(),e.phases.dns=e.lookup-e.socket};a.prependOnceListener("lookup",c),k5.default(a,{connect:()=>{e.connect=Date.now(),e.lookup===void 0&&(a.removeListener("lookup",c),e.lookup=e.connect,e.phases.dns=e.lookup-e.socket),e.phases.tcp=e.connect-e.lookup},secureConnect:()=>{e.secureConnect=Date.now(),e.phases.tls=e.secureConnect-e.connect}})};r.socket?i(r.socket):r.prependOnceListener("socket",i);let o=()=>{var a;e.upload=Date.now(),e.phases.request=e.upload-((a=e.secureConnect)!==null&&a!==void 0?a:e.connect)};return(typeof r.writableFinished=="boolean"?r.writableFinished:r.finished&&r.outputSize===0&&(!r.socket||r.socket.writableLength===0))?o():r.prependOnceListener("finish",o),r.prependOnceListener("response",a=>{e.response=Date.now(),e.phases.firstByte=e.response-e.upload,a.timings=e,t(a),a.prependOnceListener("end",()=>{e.end=Date.now(),e.phases.download=e.end-e.response,e.phases.total=e.end-e.start}),a.prependOnceListener("aborted",n)}),e};$v.default=Lv;Cv.exports=Lv;Cv.exports.default=Lv});var _D=v((Ule,Mv)=>{"use strict";var{V4MAPPED:B5,ADDRCONFIG:F5,ALL:ID,promises:{Resolver:HD},lookup:U5}=H("dns"),{promisify:Dv}=H("util"),W5=H("os"),yc=Symbol("cacheableLookupCreateConnection"),Tv=Symbol("cacheableLookupInstance"),gD=Symbol("expires"),j5=typeof ID=="number",yD=r=>{if(!(r&&typeof r.createConnection=="function"))throw new Error("Expected an Agent instance as the first argument")},V5=r=>{for(let e of r)e.family!==6&&(e.address=`::ffff:${e.address}`,e.family=6)},bD=()=>{let r=!1,e=!1;for(let t of Object.values(W5.networkInterfaces()))for(let n of t)if(!n.internal&&(n.family==="IPv6"?e=!0:r=!0,r&&e))return{has4:r,has6:e};return{has4:r,has6:e}},q5=r=>Symbol.iterator in r,vD={ttl:!0},G5={all:!0},Kh=class{constructor({cache:e=new Map,maxTtl:t=1/0,fallbackDuration:n=3600,errorTtl:i=.15,resolver:o=new HD,lookup:s=U5}={}){if(this.maxTtl=t,this.errorTtl=i,this._cache=e,this._resolver=o,this._dnsLookup=Dv(s),this._resolver instanceof HD?(this._resolve4=this._resolver.resolve4.bind(this._resolver),this._resolve6=this._resolver.resolve6.bind(this._resolver)):(this._resolve4=Dv(this._resolver.resolve4.bind(this._resolver)),this._resolve6=Dv(this._resolver.resolve6.bind(this._resolver))),this._iface=bD(),this._pending={},this._nextRemovalTime=!1,this._hostnamesToFallback=new Set,n<1)this._fallback=!1;else{this._fallback=!0;let a=setInterval(()=>{this._hostnamesToFallback.clear()},n*1e3);a.unref&&a.unref()}this.lookup=this.lookup.bind(this),this.lookupAsync=this.lookupAsync.bind(this)}set servers(e){this.clear(),this._resolver.setServers(e)}get servers(){return this._resolver.getServers()}lookup(e,t,n){if(typeof t=="function"?(n=t,t={}):typeof t=="number"&&(t={family:t}),!n)throw new Error("Callback must be a function.");this.lookupAsync(e,t).then(i=>{t.all?n(null,i):n(null,i.address,i.family,i.expires,i.ttl)},n)}async lookupAsync(e,t={}){typeof t=="number"&&(t={family:t});let n=await this.query(e);if(t.family===6){let i=n.filter(o=>o.family===6);t.hints&B5&&(j5&&t.hints&ID||i.length===0)?V5(n):n=i}else t.family===4&&(n=n.filter(i=>i.family===4));if(t.hints&F5){let{_iface:i}=this;n=n.filter(o=>o.family===6?i.has6:i.has4)}if(n.length===0){let i=new Error(`cacheableLookup ENOTFOUND ${e}`);throw i.code="ENOTFOUND",i.hostname=e,i}return t.all?n:n[0]}async query(e){let t=await this._cache.get(e);if(!t){let n=this._pending[e];if(n)t=await n;else{let i=this.queryAndCache(e);this._pending[e]=i;try{t=await i}finally{delete this._pending[e]}}}return t=t.map(n=>({...n})),t}async _resolve(e){let t=async u=>{try{return await u}catch(l){if(l.code==="ENODATA"||l.code==="ENOTFOUND")return[];throw l}},[n,i]=await Promise.all([this._resolve4(e,vD),this._resolve6(e,vD)].map(u=>t(u))),o=0,s=0,a=0,c=Date.now();for(let u of n)u.family=4,u.expires=c+u.ttl*1e3,o=Math.max(o,u.ttl);for(let u of i)u.family=6,u.expires=c+u.ttl*1e3,s=Math.max(s,u.ttl);return n.length>0?i.length>0?a=Math.min(o,s):a=o:a=s,{entries:[...n,...i],cacheTtl:a}}async _lookup(e){try{return{entries:await this._dnsLookup(e,{all:!0}),cacheTtl:0}}catch{return{entries:[],cacheTtl:0}}}async _set(e,t,n){if(this.maxTtl>0&&n>0){n=Math.min(n,this.maxTtl)*1e3,t[gD]=Date.now()+n;try{await this._cache.set(e,t,n)}catch(i){this.lookupAsync=async()=>{let o=new Error("Cache Error. Please recreate the CacheableLookup instance.");throw o.cause=i,o}}q5(this._cache)&&this._tick(n)}}async queryAndCache(e){if(this._hostnamesToFallback.has(e))return this._dnsLookup(e,G5);let t=await this._resolve(e);t.entries.length===0&&this._fallback&&(t=await this._lookup(e),t.entries.length!==0&&this._hostnamesToFallback.add(e));let n=t.entries.length===0?this.errorTtl:t.cacheTtl;return await this._set(e,t.entries,n),t.entries}_tick(e){let t=this._nextRemovalTime;(!t||e{this._nextRemovalTime=!1;let n=1/0,i=Date.now();for(let[o,s]of this._cache){let a=s[gD];i>=a?this._cache.delete(o):a("lookup"in t||(t.lookup=this.lookup),e[yc](t,n))}uninstall(e){if(yD(e),e[yc]){if(e[Tv]!==this)throw new Error("The agent is not owned by this CacheableLookup instance");e.createConnection=e[yc],delete e[yc],delete e[Tv]}}updateInterfaceInfo(){let{_iface:e}=this;this._iface=bD(),(e.has4&&!this._iface.has4||e.has6&&!this._iface.has6)&&this._cache.clear()}clear(e){if(e){this._cache.delete(e);return}this._cache.clear()}};Mv.exports=Kh;Mv.exports.default=Kh});var SD=v((Wle,wD)=>{"use strict";var K5="text/plain",X5="us-ascii",AD=(r,e)=>e.some(t=>t instanceof RegExp?t.test(r):t===r),z5=(r,{stripHash:e})=>{let t=/^data:(?[^,]*?),(?[^#]*?)(?:#(?.*))?$/.exec(r);if(!t)throw new Error(`Invalid URL: ${r}`);let{type:n,data:i,hash:o}=t.groups,s=n.split(";");o=e?"":o;let a=!1;s[s.length-1]==="base64"&&(s.pop(),a=!0);let c=(s.shift()||"").toLowerCase(),l=[...s.map(p=>{let[d,f=""]=p.split("=").map(h=>h.trim());return d==="charset"&&(f=f.toLowerCase(),f===X5)?"":`${d}${f?`=${f}`:""}`}).filter(Boolean)];return a&&l.push("base64"),(l.length!==0||c&&c!==K5)&&l.unshift(c),`data:${l.join(";")},${a?i.trim():i}${o?`#${o}`:""}`},J5=(r,e)=>{if(e={defaultProtocol:"http:",normalizeProtocol:!0,forceHttp:!1,forceHttps:!1,stripAuthentication:!0,stripHash:!1,stripTextFragment:!0,stripWWW:!0,removeQueryParameters:[/^utm_\w+/i],removeTrailingSlash:!0,removeSingleSlash:!0,removeDirectoryIndex:!1,sortQueryParameters:!0,...e},r=r.trim(),/^data:/i.test(r))return z5(r,e);if(/^view-source:/i.test(r))throw new Error("`view-source:` is not supported as it is a non-standard protocol");let t=r.startsWith("//");!t&&/^\.*\//.test(r)||(r=r.replace(/^(?!(?:\w+:)?\/\/)|^\/\//,e.defaultProtocol));let i=new URL(r);if(e.forceHttp&&e.forceHttps)throw new Error("The `forceHttp` and `forceHttps` options cannot be used together");if(e.forceHttp&&i.protocol==="https:"&&(i.protocol="http:"),e.forceHttps&&i.protocol==="http:"&&(i.protocol="https:"),e.stripAuthentication&&(i.username="",i.password=""),e.stripHash?i.hash="":e.stripTextFragment&&(i.hash=i.hash.replace(/#?:~:text.*?$/i,"")),i.pathname&&(i.pathname=i.pathname.replace(/(?0){let s=i.pathname.split("/"),a=s[s.length-1];AD(a,e.removeDirectoryIndex)&&(s=s.slice(0,s.length-1),i.pathname=s.slice(1).join("/")+"/")}if(i.hostname&&(i.hostname=i.hostname.replace(/\.$/,""),e.stripWWW&&/^www\.(?!www\.)(?:[a-z\-\d]{1,63})\.(?:[a-z.\-\d]{2,63})$/.test(i.hostname)&&(i.hostname=i.hostname.replace(/^www\./,""))),Array.isArray(e.removeQueryParameters))for(let s of[...i.searchParams.keys()])AD(s,e.removeQueryParameters)&&i.searchParams.delete(s);e.removeQueryParameters===!0&&(i.search=""),e.sortQueryParameters&&i.searchParams.sort(),e.removeTrailingSlash&&(i.pathname=i.pathname.replace(/\/$/,""));let o=r;return r=i.toString(),!e.removeSingleSlash&&i.pathname==="/"&&!o.endsWith("/")&&i.hash===""&&(r=r.replace(/\/$/,"")),(e.removeTrailingSlash||i.pathname==="/")&&i.hash===""&&e.removeSingleSlash&&(r=r.replace(/\/$/,"")),t&&!e.normalizeProtocol&&(r=r.replace(/^http:\/\//,"//")),e.stripProtocol&&(r=r.replace(/^(?:https?:)?\/\//,"")),r};wD.exports=J5});var PD=v((jle,xD)=>{xD.exports=ED;function ED(r,e){if(r&&e)return ED(r)(e);if(typeof r!="function")throw new TypeError("need wrapper function");return Object.keys(r).forEach(function(n){t[n]=r[n]}),t;function t(){for(var n=new Array(arguments.length),i=0;i{var LD=PD();Rv.exports=LD(Xh);Rv.exports.strict=LD($D);Xh.proto=Xh(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return Xh(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return $D(this)},configurable:!0})});function Xh(r){var e=function(){return e.called?e.value:(e.called=!0,e.value=r.apply(this,arguments))};return e.called=!1,e}function $D(r){var e=function(){if(e.called)throw new Error(e.onceError);return e.called=!0,e.value=r.apply(this,arguments)},t=r.name||"Function wrapped with `once`";return e.onceError=t+" shouldn't be called more than once",e.called=!1,e}});var TD=v((qle,DD)=>{var Y5=kv(),Q5=function(){},Z5=function(r){return r.setHeader&&typeof r.abort=="function"},eK=function(r){return r.stdio&&Array.isArray(r.stdio)&&r.stdio.length===3},CD=function(r,e,t){if(typeof e=="function")return CD(r,null,e);e||(e={}),t=Y5(t||Q5);var n=r._writableState,i=r._readableState,o=e.readable||e.readable!==!1&&r.readable,s=e.writable||e.writable!==!1&&r.writable,a=!1,c=function(){r.writable||u()},u=function(){s=!1,o||t.call(r)},l=function(){o=!1,s||t.call(r)},p=function(y){t.call(r,y?new Error("exited with error code: "+y):null)},d=function(y){t.call(r,y)},f=function(){process.nextTick(h)},h=function(){if(!a){if(o&&!(i&&i.ended&&!i.destroyed))return t.call(r,new Error("premature close"));if(s&&!(n&&n.ended&&!n.destroyed))return t.call(r,new Error("premature close"))}},m=function(){r.req.on("finish",u)};return Z5(r)?(r.on("complete",u),r.on("abort",f),r.req?m():r.on("request",m)):s&&!n&&(r.on("end",c),r.on("close",c)),eK(r)&&r.on("exit",p),r.on("end",l),r.on("finish",u),e.error!==!1&&r.on("error",d),r.on("close",f),function(){a=!0,r.removeListener("complete",u),r.removeListener("abort",f),r.removeListener("request",m),r.req&&r.req.removeListener("finish",u),r.removeListener("end",c),r.removeListener("close",c),r.removeListener("finish",u),r.removeListener("exit",p),r.removeListener("end",l),r.removeListener("error",d),r.removeListener("close",f)}};DD.exports=CD});var kD=v((Gle,RD)=>{var tK=kv(),rK=TD(),Ov=H("fs"),Tl=function(){},nK=/^v?\.0/.test(process.version),zh=function(r){return typeof r=="function"},iK=function(r){return!nK||!Ov?!1:(r instanceof(Ov.ReadStream||Tl)||r instanceof(Ov.WriteStream||Tl))&&zh(r.close)},oK=function(r){return r.setHeader&&zh(r.abort)},sK=function(r,e,t,n){n=tK(n);var i=!1;r.on("close",function(){i=!0}),rK(r,{readable:e,writable:t},function(s){if(s)return n(s);i=!0,n()});var o=!1;return function(s){if(!i&&!o){if(o=!0,iK(r))return r.close(Tl);if(oK(r))return r.abort();if(zh(r.destroy))return r.destroy();n(s||new Error("stream was destroyed"))}}},MD=function(r){r()},aK=function(r,e){return r.pipe(e)},cK=function(){var r=Array.prototype.slice.call(arguments),e=zh(r[r.length-1]||Tl)&&r.pop()||Tl;if(Array.isArray(r[0])&&(r=r[0]),r.length<2)throw new Error("pump requires two streams per minimum");var t,n=r.map(function(i,o){var s=o0;return sK(i,s,a,function(c){t||(t=c),c&&n.forEach(MD),!s&&(n.forEach(MD),e(t))})});return r.reduce(aK)};RD.exports=cK});var ND=v((Kle,OD)=>{"use strict";var{PassThrough:uK}=H("stream");OD.exports=r=>{r={...r};let{array:e}=r,{encoding:t}=r,n=t==="buffer",i=!1;e?i=!(t||n):t=t||"utf8",n&&(t=null);let o=new uK({objectMode:i});t&&o.setEncoding(t);let s=0,a=[];return o.on("data",c=>{a.push(c),i?s=a.length:s+=c.length}),o.getBufferedValue=()=>e?a:n?Buffer.concat(a,s):a.join(""),o.getBufferedLength=()=>s,o}});var BD=v((Xle,bc)=>{"use strict";var{constants:lK}=H("buffer"),pK=kD(),dK=ND(),Jh=class extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}};async function Yh(r,e){if(!r)return Promise.reject(new Error("Expected a stream"));e={maxBuffer:1/0,...e};let{maxBuffer:t}=e,n;return await new Promise((i,o)=>{let s=a=>{a&&n.getBufferedLength()<=lK.MAX_LENGTH&&(a.bufferedData=n.getBufferedValue()),o(a)};n=pK(r,dK(e),a=>{if(a){s(a);return}i()}),n.on("data",()=>{n.getBufferedLength()>t&&s(new Jh)})}),n.getBufferedValue()}bc.exports=Yh;bc.exports.default=Yh;bc.exports.buffer=(r,e)=>Yh(r,{...e,encoding:"buffer"});bc.exports.array=(r,e)=>Yh(r,{...e,array:!0});bc.exports.MaxBufferError=Jh});var UD=v((Jle,FD)=>{"use strict";var fK=new Set([200,203,204,206,300,301,308,404,405,410,414,501]),hK=new Set([200,203,204,300,301,302,303,307,308,404,405,410,414,501]),mK=new Set([500,502,503,504]),HK={date:!0,connection:!0,"keep-alive":!0,"proxy-authenticate":!0,"proxy-authorization":!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0},gK={"content-length":!0,"content-encoding":!0,"transfer-encoding":!0,"content-range":!0};function As(r){let e=parseInt(r,10);return isFinite(e)?e:0}function yK(r){return r?mK.has(r.status):!0}function Nv(r){let e={};if(!r)return e;let t=r.trim().split(/,/);for(let n of t){let[i,o]=n.split(/=/,2);e[i.trim()]=o===void 0?!0:o.trim().replace(/^"|"$/g,"")}return e}function bK(r){let e=[];for(let t in r){let n=r[t];e.push(n===!0?t:t+"="+n)}if(e.length)return e.join(", ")}FD.exports=class{constructor(e,t,{shared:n,cacheHeuristic:i,immutableMinTimeToLive:o,ignoreCargoCult:s,_fromObject:a}={}){if(a){this._fromObject(a);return}if(!t||!t.headers)throw Error("Response headers missing");this._assertRequestHasHeaders(e),this._responseTime=this.now(),this._isShared=n!==!1,this._cacheHeuristic=i!==void 0?i:.1,this._immutableMinTtl=o!==void 0?o:24*3600*1e3,this._status="status"in t?t.status:200,this._resHeaders=t.headers,this._rescc=Nv(t.headers["cache-control"]),this._method="method"in e?e.method:"GET",this._url=e.url,this._host=e.headers.host,this._noAuthorization=!e.headers.authorization,this._reqHeaders=t.headers.vary?e.headers:null,this._reqcc=Nv(e.headers["cache-control"]),s&&"pre-check"in this._rescc&&"post-check"in this._rescc&&(delete this._rescc["pre-check"],delete this._rescc["post-check"],delete this._rescc["no-cache"],delete this._rescc["no-store"],delete this._rescc["must-revalidate"],this._resHeaders=Object.assign({},this._resHeaders,{"cache-control":bK(this._rescc)}),delete this._resHeaders.expires,delete this._resHeaders.pragma),t.headers["cache-control"]==null&&/no-cache/.test(t.headers.pragma)&&(this._rescc["no-cache"]=!0)}now(){return Date.now()}storable(){return!!(!this._reqcc["no-store"]&&(this._method==="GET"||this._method==="HEAD"||this._method==="POST"&&this._hasExplicitExpiration())&&hK.has(this._status)&&!this._rescc["no-store"]&&(!this._isShared||!this._rescc.private)&&(!this._isShared||this._noAuthorization||this._allowsStoringAuthenticated())&&(this._resHeaders.expires||this._rescc["max-age"]||this._isShared&&this._rescc["s-maxage"]||this._rescc.public||fK.has(this._status)))}_hasExplicitExpiration(){return this._isShared&&this._rescc["s-maxage"]||this._rescc["max-age"]||this._resHeaders.expires}_assertRequestHasHeaders(e){if(!e||!e.headers)throw Error("Request headers missing")}satisfiesWithoutRevalidation(e){this._assertRequestHasHeaders(e);let t=Nv(e.headers["cache-control"]);return t["no-cache"]||/no-cache/.test(e.headers.pragma)||t["max-age"]&&this.age()>t["max-age"]||t["min-fresh"]&&this.timeToLive()<1e3*t["min-fresh"]||this.stale()&&!(t["max-stale"]&&!this._rescc["must-revalidate"]&&(t["max-stale"]===!0||t["max-stale"]>this.age()-this.maxAge()))?!1:this._requestMatches(e,!1)}_requestMatches(e,t){return(!this._url||this._url===e.url)&&this._host===e.headers.host&&(!e.method||this._method===e.method||t&&e.method==="HEAD")&&this._varyMatches(e)}_allowsStoringAuthenticated(){return this._rescc["must-revalidate"]||this._rescc.public||this._rescc["s-maxage"]}_varyMatches(e){if(!this._resHeaders.vary)return!0;if(this._resHeaders.vary==="*")return!1;let t=this._resHeaders.vary.trim().toLowerCase().split(/\s*,\s*/);for(let n of t)if(e.headers[n]!==this._reqHeaders[n])return!1;return!0}_copyWithoutHopByHopHeaders(e){let t={};for(let n in e)HK[n]||(t[n]=e[n]);if(e.connection){let n=e.connection.trim().split(/\s*,\s*/);for(let i of n)delete t[i]}if(t.warning){let n=t.warning.split(/,/).filter(i=>!/^\s*1[0-9][0-9]/.test(i));n.length?t.warning=n.join(",").trim():delete t.warning}return t}responseHeaders(){let e=this._copyWithoutHopByHopHeaders(this._resHeaders),t=this.age();return t>3600*24&&!this._hasExplicitExpiration()&&this.maxAge()>3600*24&&(e.warning=(e.warning?`${e.warning}, `:"")+'113 - "rfc7234 5.5.4"'),e.age=`${Math.round(t)}`,e.date=new Date(this.now()).toUTCString(),e}date(){let e=Date.parse(this._resHeaders.date);return isFinite(e)?e:this._responseTime}age(){let e=this._ageValue(),t=(this.now()-this._responseTime)/1e3;return e+t}_ageValue(){return As(this._resHeaders.age)}maxAge(){if(!this.storable()||this._rescc["no-cache"]||this._isShared&&this._resHeaders["set-cookie"]&&!this._rescc.public&&!this._rescc.immutable||this._resHeaders.vary==="*")return 0;if(this._isShared){if(this._rescc["proxy-revalidate"])return 0;if(this._rescc["s-maxage"])return As(this._rescc["s-maxage"])}if(this._rescc["max-age"])return As(this._rescc["max-age"]);let e=this._rescc.immutable?this._immutableMinTtl:0,t=this.date();if(this._resHeaders.expires){let n=Date.parse(this._resHeaders.expires);return Number.isNaN(n)||nn)return Math.max(e,(t-n)/1e3*this._cacheHeuristic)}return e}timeToLive(){let e=this.maxAge()-this.age(),t=e+As(this._rescc["stale-if-error"]),n=e+As(this._rescc["stale-while-revalidate"]);return Math.max(0,e,t,n)*1e3}stale(){return this.maxAge()<=this.age()}_useStaleIfError(){return this.maxAge()+As(this._rescc["stale-if-error"])>this.age()}useStaleWhileRevalidate(){return this.maxAge()+As(this._rescc["stale-while-revalidate"])>this.age()}static fromObject(e){return new this(void 0,void 0,{_fromObject:e})}_fromObject(e){if(this._responseTime)throw Error("Reinitialized");if(!e||e.v!==1)throw Error("Invalid serialization");this._responseTime=e.t,this._isShared=e.sh,this._cacheHeuristic=e.ch,this._immutableMinTtl=e.imm!==void 0?e.imm:24*3600*1e3,this._status=e.st,this._resHeaders=e.resh,this._rescc=e.rescc,this._method=e.m,this._url=e.u,this._host=e.h,this._noAuthorization=e.a,this._reqHeaders=e.reqh,this._reqcc=e.reqcc}toObject(){return{v:1,t:this._responseTime,sh:this._isShared,ch:this._cacheHeuristic,imm:this._immutableMinTtl,st:this._status,resh:this._resHeaders,rescc:this._rescc,m:this._method,u:this._url,h:this._host,a:this._noAuthorization,reqh:this._reqHeaders,reqcc:this._reqcc}}revalidationHeaders(e){this._assertRequestHasHeaders(e);let t=this._copyWithoutHopByHopHeaders(e.headers);if(delete t["if-range"],!this._requestMatches(e,!0)||!this.storable())return delete t["if-none-match"],delete t["if-modified-since"],t;if(this._resHeaders.etag&&(t["if-none-match"]=t["if-none-match"]?`${t["if-none-match"]}, ${this._resHeaders.etag}`:this._resHeaders.etag),t["accept-ranges"]||t["if-match"]||t["if-unmodified-since"]||this._method&&this._method!="GET"){if(delete t["if-modified-since"],t["if-none-match"]){let i=t["if-none-match"].split(/,/).filter(o=>!/^\s*W\//.test(o));i.length?t["if-none-match"]=i.join(",").trim():delete t["if-none-match"]}}else this._resHeaders["last-modified"]&&!t["if-modified-since"]&&(t["if-modified-since"]=this._resHeaders["last-modified"]);return t}revalidatedPolicy(e,t){if(this._assertRequestHasHeaders(e),this._useStaleIfError()&&yK(t))return{modified:!1,matches:!1,policy:this};if(!t||!t.headers)throw Error("Response headers missing");let n=!1;if(t.status!==void 0&&t.status!=304?n=!1:t.headers.etag&&!/^\s*W\//.test(t.headers.etag)?n=this._resHeaders.etag&&this._resHeaders.etag.replace(/^\s*W\//,"")===t.headers.etag:this._resHeaders.etag&&t.headers.etag?n=this._resHeaders.etag.replace(/^\s*W\//,"")===t.headers.etag.replace(/^\s*W\//,""):this._resHeaders["last-modified"]?n=this._resHeaders["last-modified"]===t.headers["last-modified"]:!this._resHeaders.etag&&!this._resHeaders["last-modified"]&&!t.headers.etag&&!t.headers["last-modified"]&&(n=!0),!n)return{policy:new this.constructor(e,t),modified:t.status!=304,matches:!1};let i={};for(let s in this._resHeaders)i[s]=s in t.headers&&!gK[s]?t.headers[s]:this._resHeaders[s];let o=Object.assign({},t,{status:this._status,method:this._method,headers:i});return{policy:new this.constructor(e,o,{shared:this._isShared,cacheHeuristic:this._cacheHeuristic,immutableMinTimeToLive:this._immutableMinTtl}),modified:!1,matches:!0}}}});var Qh=v((Yle,WD)=>{"use strict";WD.exports=r=>{let e={};for(let[t,n]of Object.entries(r))e[t.toLowerCase()]=n;return e}});var VD=v((Qle,jD)=>{"use strict";var vK=H("stream").Readable,IK=Qh(),Bv=class extends vK{constructor(e,t,n,i){if(typeof e!="number")throw new TypeError("Argument `statusCode` should be a number");if(typeof t!="object")throw new TypeError("Argument `headers` should be an object");if(!(n instanceof Buffer))throw new TypeError("Argument `body` should be a buffer");if(typeof i!="string")throw new TypeError("Argument `url` should be a string");super(),this.statusCode=e,this.headers=IK(t),this.body=n,this.url=i}_read(){this.push(this.body),this.push(null)}};jD.exports=Bv});var GD=v((Zle,qD)=>{"use strict";var _K=["destroy","setTimeout","socket","headers","trailers","rawHeaders","statusCode","httpVersion","httpVersionMinor","httpVersionMajor","rawTrailers","statusMessage"];qD.exports=(r,e)=>{let t=new Set(Object.keys(r).concat(_K));for(let n of t)n in e||(e[n]=typeof r[n]=="function"?r[n].bind(r):r[n])}});var XD=v((epe,KD)=>{"use strict";var AK=H("stream").PassThrough,wK=GD(),SK=r=>{if(!(r&&r.pipe))throw new TypeError("Parameter `response` must be a response stream.");let e=new AK;return wK(r,e),r.pipe(e)};KD.exports=SK});var zD=v(Fv=>{Fv.stringify=function r(e){if(typeof e>"u")return e;if(e&&Buffer.isBuffer(e))return JSON.stringify(":base64:"+e.toString("base64"));if(e&&e.toJSON&&(e=e.toJSON()),e&&typeof e=="object"){var t="",n=Array.isArray(e);t=n?"[":"{";var i=!0;for(var o in e){var s=typeof e[o]=="function"||!n&&typeof e[o]>"u";Object.hasOwnProperty.call(e,o)&&!s&&(i||(t+=","),i=!1,n?e[o]==null?t+="null":t+=r(e[o]):e[o]!==void 0&&(t+=r(o)+":"+r(e[o])))}return t+=n?"]":"}",t}else return typeof e=="string"?JSON.stringify(/^:/.test(e)?":"+e:e):typeof e>"u"?"null":JSON.stringify(e)};Fv.parse=function(r){return JSON.parse(r,function(e,t){return typeof t=="string"?/^:base64:/.test(t)?Buffer.from(t.substring(8),"base64"):/^:/.test(t)?t.substring(1):t:t})}});var ZD=v((rpe,QD)=>{"use strict";var EK=H("events"),JD=zD(),xK=r=>{let e={redis:"@keyv/redis",rediss:"@keyv/redis",mongodb:"@keyv/mongo",mongo:"@keyv/mongo",sqlite:"@keyv/sqlite",postgresql:"@keyv/postgres",postgres:"@keyv/postgres",mysql:"@keyv/mysql",etcd:"@keyv/etcd",offline:"@keyv/offline",tiered:"@keyv/tiered"};if(r.adapter||r.uri){let t=r.adapter||/^[^:+]*/.exec(r.uri)[0];return new(H(e[t]))(r)}return new Map},YD=["sqlite","postgres","mysql","mongo","redis","tiered"],Uv=class extends EK{constructor(e,{emitErrors:t=!0,...n}={}){if(super(),this.opts={namespace:"keyv",serialize:JD.stringify,deserialize:JD.parse,...typeof e=="string"?{uri:e}:e,...n},!this.opts.store){let o={...this.opts};this.opts.store=xK(o)}if(this.opts.compression){let o=this.opts.compression;this.opts.serialize=o.serialize.bind(o),this.opts.deserialize=o.deserialize.bind(o)}typeof this.opts.store.on=="function"&&t&&this.opts.store.on("error",o=>this.emit("error",o)),this.opts.store.namespace=this.opts.namespace;let i=o=>async function*(){for await(let[s,a]of typeof o=="function"?o(this.opts.store.namespace):o){let c=await this.opts.deserialize(a);if(!(this.opts.store.namespace&&!s.includes(this.opts.store.namespace))){if(typeof c.expires=="number"&&Date.now()>c.expires){this.delete(s);continue}yield[this._getKeyUnprefix(s),c.value]}}};typeof this.opts.store[Symbol.iterator]=="function"&&this.opts.store instanceof Map?this.iterator=i(this.opts.store):typeof this.opts.store.iterator=="function"&&this.opts.store.opts&&this._checkIterableAdaptar()&&(this.iterator=i(this.opts.store.iterator.bind(this.opts.store)))}_checkIterableAdaptar(){return YD.includes(this.opts.store.opts.dialect)||YD.findIndex(e=>this.opts.store.opts.url.includes(e))>=0}_getKeyPrefix(e){return`${this.opts.namespace}:${e}`}_getKeyPrefixArray(e){return e.map(t=>`${this.opts.namespace}:${t}`)}_getKeyUnprefix(e){return e.split(":").splice(1).join(":")}get(e,t){let{store:n}=this.opts,i=Array.isArray(e),o=i?this._getKeyPrefixArray(e):this._getKeyPrefix(e);if(i&&n.getMany===void 0){let s=[];for(let a of o)s.push(Promise.resolve().then(()=>n.get(a)).then(c=>typeof c=="string"?this.opts.deserialize(c):this.opts.compression?this.opts.deserialize(c):c).then(c=>{if(c!=null)return typeof c.expires=="number"&&Date.now()>c.expires?this.delete(a).then(()=>{}):t&&t.raw?c:c.value}));return Promise.allSettled(s).then(a=>{let c=[];for(let u of a)c.push(u.value);return c})}return Promise.resolve().then(()=>i?n.getMany(o):n.get(o)).then(s=>typeof s=="string"?this.opts.deserialize(s):this.opts.compression?this.opts.deserialize(s):s).then(s=>{if(s!=null)return i?s.map((a,c)=>{if(typeof a=="string"&&(a=this.opts.deserialize(a)),a!=null){if(typeof a.expires=="number"&&Date.now()>a.expires){this.delete(e[c]).then(()=>{});return}return t&&t.raw?a:a.value}}):typeof s.expires=="number"&&Date.now()>s.expires?this.delete(e).then(()=>{}):t&&t.raw?s:s.value})}set(e,t,n){let i=this._getKeyPrefix(e);typeof n>"u"&&(n=this.opts.ttl),n===0&&(n=void 0);let{store:o}=this.opts;return Promise.resolve().then(()=>{let s=typeof n=="number"?Date.now()+n:null;return typeof t=="symbol"&&this.emit("error","symbol cannot be serialized"),t={value:t,expires:s},this.opts.serialize(t)}).then(s=>o.set(i,s,n)).then(()=>!0)}delete(e){let{store:t}=this.opts;if(Array.isArray(e)){let i=this._getKeyPrefixArray(e);if(t.deleteMany===void 0){let o=[];for(let s of i)o.push(t.delete(s));return Promise.allSettled(o).then(s=>s.every(a=>a.value===!0))}return Promise.resolve().then(()=>t.deleteMany(i))}let n=this._getKeyPrefix(e);return Promise.resolve().then(()=>t.delete(n))}clear(){let{store:e}=this.opts;return Promise.resolve().then(()=>e.clear())}has(e){let t=this._getKeyPrefix(e),{store:n}=this.opts;return Promise.resolve().then(async()=>typeof n.has=="function"?n.has(t):await n.get(t)!==void 0)}disconnect(){let{store:e}=this.opts;if(typeof e.disconnect=="function")return e.disconnect()}};QD.exports=Uv});var rT=v((ipe,tT)=>{"use strict";var PK=H("events"),Zh=H("url"),LK=SD(),$K=BD(),Wv=UD(),eT=VD(),CK=Qh(),DK=XD(),TK=ZD(),Ml=class r{constructor(e,t){if(typeof e!="function")throw new TypeError("Parameter `request` must be a function");return this.cache=new TK({uri:typeof t=="string"&&t,store:typeof t!="string"&&t,namespace:"cacheable-request"}),this.createCacheableRequest(e)}createCacheableRequest(e){return(t,n)=>{let i;if(typeof t=="string")i=jv(Zh.parse(t)),t={};else if(t instanceof Zh.URL)i=jv(Zh.parse(t.toString())),t={};else{let[p,...d]=(t.path||"").split("?"),f=d.length>0?`?${d.join("?")}`:"";i=jv({...t,pathname:p,search:f})}t={headers:{},method:"GET",cache:!0,strictTtl:!1,automaticFailover:!1,...t,...MK(i)},t.headers=CK(t.headers);let o=new PK,s=LK(Zh.format(i),{stripWWW:!1,removeTrailingSlash:!1,stripAuthentication:!1}),a=`${t.method}:${s}`,c=!1,u=!1,l=p=>{u=!0;let d=!1,f,h=new Promise(y=>{f=()=>{d||(d=!0,y())}}),m=y=>{if(c&&!p.forceRefresh){y.status=y.statusCode;let D=Wv.fromObject(c.cachePolicy).revalidatedPolicy(p,y);if(!D.modified){let j=D.policy.responseHeaders();y=new eT(c.statusCode,j,c.body,c.url),y.cachePolicy=D.policy,y.fromCache=!0}}y.fromCache||(y.cachePolicy=new Wv(p,y,p),y.fromCache=!1);let w;p.cache&&y.cachePolicy.storable()?(w=DK(y),(async()=>{try{let D=$K.buffer(y);if(await Promise.race([h,new Promise(Z=>y.once("end",Z))]),d)return;let j=await D,X={cachePolicy:y.cachePolicy.toObject(),url:y.url,statusCode:y.fromCache?c.statusCode:y.statusCode,body:j},B=p.strictTtl?y.cachePolicy.timeToLive():void 0;p.maxTtl&&(B=B?Math.min(B,p.maxTtl):p.maxTtl),await this.cache.set(a,X,B)}catch(D){o.emit("error",new r.CacheError(D))}})()):p.cache&&c&&(async()=>{try{await this.cache.delete(a)}catch(D){o.emit("error",new r.CacheError(D))}})(),o.emit("response",w||y),typeof n=="function"&&n(w||y)};try{let y=e(p,m);y.once("error",f),y.once("abort",f),o.emit("request",y)}catch(y){o.emit("error",new r.RequestError(y))}};return(async()=>{let p=async f=>{await Promise.resolve();let h=f.cache?await this.cache.get(a):void 0;if(typeof h>"u")return l(f);let m=Wv.fromObject(h.cachePolicy);if(m.satisfiesWithoutRevalidation(f)&&!f.forceRefresh){let y=m.responseHeaders(),w=new eT(h.statusCode,y,h.body,h.url);w.cachePolicy=m,w.fromCache=!0,o.emit("response",w),typeof n=="function"&&n(w)}else c=h,f.headers=m.revalidationHeaders(f),l(f)},d=f=>o.emit("error",new r.CacheError(f));this.cache.once("error",d),o.on("response",()=>this.cache.removeListener("error",d));try{await p(t)}catch(f){t.automaticFailover&&!u&&l(t),o.emit("error",new r.CacheError(f))}})(),o}}};function MK(r){let e={...r};return e.path=`${r.pathname||"/"}${r.search||""}`,delete e.pathname,delete e.search,e}function jv(r){return{protocol:r.protocol,auth:r.auth,hostname:r.hostname||r.host||"localhost",port:r.port,pathname:r.pathname,search:r.search}}Ml.RequestError=class extends Error{constructor(r){super(r.message),this.name="RequestError",Object.assign(this,r)}};Ml.CacheError=class extends Error{constructor(r){super(r.message),this.name="CacheError",Object.assign(this,r)}};tT.exports=Ml});var iT=v((ape,nT)=>{"use strict";var RK=["aborted","complete","headers","httpVersion","httpVersionMinor","httpVersionMajor","method","rawHeaders","rawTrailers","setTimeout","socket","statusCode","statusMessage","trailers","url"];nT.exports=(r,e)=>{if(e._readableState.autoDestroy)throw new Error("The second stream must have the `autoDestroy` option set to `false`");let t=new Set(Object.keys(r).concat(RK)),n={};for(let i of t)i in e||(n[i]={get(){let o=r[i];return typeof o=="function"?o.bind(r):o},set(o){r[i]=o},enumerable:!0,configurable:!1});return Object.defineProperties(e,n),r.once("aborted",()=>{e.destroy(),e.emit("aborted")}),r.once("close",()=>{r.complete&&e.readable?e.once("end",()=>{e.emit("close")}):e.emit("close")}),e}});var sT=v((cpe,oT)=>{"use strict";var{Transform:kK,PassThrough:OK}=H("stream"),Vv=H("zlib"),NK=iT();oT.exports=r=>{let e=(r.headers["content-encoding"]||"").toLowerCase();if(!["gzip","deflate","br"].includes(e))return r;let t=e==="br";if(t&&typeof Vv.createBrotliDecompress!="function")return r.destroy(new Error("Brotli is not supported on Node.js < 12")),r;let n=!0,i=new kK({transform(a,c,u){n=!1,u(null,a)},flush(a){a()}}),o=new OK({autoDestroy:!1,destroy(a,c){r.destroy(),c(a)}}),s=t?Vv.createBrotliDecompress():Vv.createUnzip();return s.once("error",a=>{if(n&&!r.readable){o.end();return}o.destroy(a)}),NK(r,o),r.pipe(i).pipe(s).pipe(o),o}});var Gv=v((upe,aT)=>{"use strict";var qv=class{constructor(e={}){if(!(e.maxSize&&e.maxSize>0))throw new TypeError("`maxSize` must be a number greater than 0");this.maxSize=e.maxSize,this.onEviction=e.onEviction,this.cache=new Map,this.oldCache=new Map,this._size=0}_set(e,t){if(this.cache.set(e,t),this._size++,this._size>=this.maxSize){if(this._size=0,typeof this.onEviction=="function")for(let[n,i]of this.oldCache.entries())this.onEviction(n,i);this.oldCache=this.cache,this.cache=new Map}}get(e){if(this.cache.has(e))return this.cache.get(e);if(this.oldCache.has(e)){let t=this.oldCache.get(e);return this.oldCache.delete(e),this._set(e,t),t}}set(e,t){return this.cache.has(e)?this.cache.set(e,t):this._set(e,t),this}has(e){return this.cache.has(e)||this.oldCache.has(e)}peek(e){if(this.cache.has(e))return this.cache.get(e);if(this.oldCache.has(e))return this.oldCache.get(e)}delete(e){let t=this.cache.delete(e);return t&&this._size--,this.oldCache.delete(e)||t}clear(){this.cache.clear(),this.oldCache.clear(),this._size=0}*keys(){for(let[e]of this)yield e}*values(){for(let[,e]of this)yield e}*[Symbol.iterator](){for(let e of this.cache)yield e;for(let e of this.oldCache){let[t]=e;this.cache.has(t)||(yield e)}}get size(){let e=0;for(let t of this.oldCache.keys())this.cache.has(t)||e++;return Math.min(this._size+e,this.maxSize)}};aT.exports=qv});var Xv=v((lpe,pT)=>{"use strict";var BK=H("events"),FK=H("tls"),UK=H("http2"),WK=Gv(),Gt=Symbol("currentStreamsCount"),cT=Symbol("request"),Nr=Symbol("cachedOriginSet"),vc=Symbol("gracefullyClosing"),jK=["maxDeflateDynamicTableSize","maxSessionMemory","maxHeaderListPairs","maxOutstandingPings","maxReservedRemoteStreams","maxSendHeaderBlockLength","paddingStrategy","localAddress","path","rejectUnauthorized","minDHSize","ca","cert","clientCertEngine","ciphers","key","pfx","servername","minVersion","maxVersion","secureProtocol","crl","honorCipherOrder","ecdhCurve","dhparam","secureOptions","sessionIdContext"],VK=(r,e,t)=>{let n=0,i=r.length;for(;n>>1;t(r[o],e)?n=o+1:i=o}return n},qK=(r,e)=>r.remoteSettings.maxConcurrentStreams>e.remoteSettings.maxConcurrentStreams,Kv=(r,e)=>{for(let t of r)t[Nr].lengthe[Nr].includes(n))&&t[Gt]+e[Gt]<=e.remoteSettings.maxConcurrentStreams&&lT(t)},GK=(r,e)=>{for(let t of r)e[Nr].lengtht[Nr].includes(n))&&e[Gt]+t[Gt]<=t.remoteSettings.maxConcurrentStreams&&lT(e)},uT=({agent:r,isFree:e})=>{let t={};for(let n in r.sessions){let o=r.sessions[n].filter(s=>{let a=s[ws.kCurrentStreamsCount]{r[vc]=!0,r[Gt]===0&&r.close()},ws=class r extends BK{constructor({timeout:e=6e4,maxSessions:t=1/0,maxFreeSessions:n=10,maxCachedTlsSessions:i=100}={}){super(),this.sessions={},this.queue={},this.timeout=e,this.maxSessions=t,this.maxFreeSessions=n,this._freeSessionsCount=0,this._sessionsCount=0,this.settings={enablePush:!1},this.tlsSessionCache=new WK({maxSize:i})}static normalizeOrigin(e,t){return typeof e=="string"&&(e=new URL(e)),t&&e.hostname!==t&&(e.hostname=t),e.origin}normalizeOptions(e){let t="";if(e)for(let n of jK)e[n]&&(t+=`:${e[n]}`);return t}_tryToCreateNewSession(e,t){if(!(e in this.queue)||!(t in this.queue[e]))return;let n=this.queue[e][t];this._sessionsCount{Array.isArray(n)?(n=[...n],i()):n=[{resolve:i,reject:o}];let s=this.normalizeOptions(t),a=r.normalizeOrigin(e,t&&t.servername);if(a===void 0){for(let{reject:l}of n)l(new TypeError("The `origin` argument needs to be a string or an URL object"));return}if(s in this.sessions){let l=this.sessions[s],p=-1,d=-1,f;for(let h of l){let m=h.remoteSettings.maxConcurrentStreams;if(m=m||h[vc]||h.destroyed)continue;f||(p=m),y>d&&(f=h,d=y)}}if(f){if(n.length!==1){for(let{reject:h}of n){let m=new Error(`Expected the length of listeners to be 1, got ${n.length}. +Please report this to https://github.com/szmarczak/http2-wrapper/`);h(m)}return}n[0].resolve(f);return}}if(s in this.queue){if(a in this.queue[s]){this.queue[s][a].listeners.push(...n),this._tryToCreateNewSession(s,a);return}}else this.queue[s]={};let c=()=>{s in this.queue&&this.queue[s][a]===u&&(delete this.queue[s][a],Object.keys(this.queue[s]).length===0&&delete this.queue[s])},u=()=>{let l=`${a}:${s}`,p=!1;try{let d=UK.connect(e,{createConnection:this.createConnection,settings:this.settings,session:this.tlsSessionCache.get(l),...t});d[Gt]=0,d[vc]=!1;let f=()=>d[Gt]{this.tlsSessionCache.set(l,y)}),d.once("error",y=>{for(let{reject:w}of n)w(y);this.tlsSessionCache.delete(l)}),d.setTimeout(this.timeout,()=>{d.destroy()}),d.once("close",()=>{if(p){h&&this._freeSessionsCount--,this._sessionsCount--;let y=this.sessions[s];y.splice(y.indexOf(d),1),y.length===0&&delete this.sessions[s]}else{let y=new Error("Session closed without receiving a SETTINGS frame");y.code="HTTP2WRAPPER_NOSETTINGS";for(let{reject:w}of n)w(y);c()}this._tryToCreateNewSession(s,a)});let m=()=>{if(!(!(s in this.queue)||!f())){for(let y of d[Nr])if(y in this.queue[s]){let{listeners:w}=this.queue[s][y];for(;w.length!==0&&f();)w.shift().resolve(d);let D=this.queue[s];if(D[y].listeners.length===0&&(delete D[y],Object.keys(D).length===0)){delete this.queue[s];break}if(!f())break}}};d.on("origin",()=>{d[Nr]=d.originSet,f()&&(m(),Kv(this.sessions[s],d))}),d.once("remoteSettings",()=>{if(d.ref(),d.unref(),this._sessionsCount++,u.destroyed){let y=new Error("Agent has been destroyed");for(let w of n)w.reject(y);d.destroy();return}d[Nr]=d.originSet;{let y=this.sessions;if(s in y){let w=y[s];w.splice(VK(w,d,qK),0,d)}else y[s]=[d]}this._freeSessionsCount+=1,p=!0,this.emit("session",d),m(),c(),d[Gt]===0&&this._freeSessionsCount>this.maxFreeSessions&&d.close(),n.length!==0&&(this.getSession(a,t,n),n.length=0),d.on("remoteSettings",()=>{m(),Kv(this.sessions[s],d)})}),d[cT]=d.request,d.request=(y,w)=>{if(d[vc])throw new Error("The session is gracefully closing. No new streams are allowed.");let D=d[cT](y,w);return d.ref(),++d[Gt],d[Gt]===d.remoteSettings.maxConcurrentStreams&&this._freeSessionsCount--,D.once("close",()=>{if(h=f(),--d[Gt],!d.destroyed&&!d.closed&&(GK(this.sessions[s],d),f()&&!d.closed)){h||(this._freeSessionsCount++,h=!0);let j=d[Gt]===0;j&&d.unref(),j&&(this._freeSessionsCount>this.maxFreeSessions||d[vc])?d.close():(Kv(this.sessions[s],d),m())}}),D}}catch(d){for(let f of n)f.reject(d);c()}};u.listeners=n,u.completed=!1,u.destroyed=!1,this.queue[s][a]=u,this._tryToCreateNewSession(s,a)})}request(e,t,n,i){return new Promise((o,s)=>{this.getSession(e,t,[{reject:s,resolve:a=>{try{o(a.request(n,i))}catch(c){s(c)}}}])})}createConnection(e,t){return r.connect(e,t)}static connect(e,t){t.ALPNProtocols=["h2"];let n=e.port||443,i=e.hostname||e.host;return typeof t.servername>"u"&&(t.servername=i),FK.connect(n,i,t)}closeFreeSessions(){for(let e of Object.values(this.sessions))for(let t of e)t[Gt]===0&&t.close()}destroy(e){for(let t of Object.values(this.sessions))for(let n of t)n.destroy(e);for(let t of Object.values(this.queue))for(let n of Object.values(t))n.destroyed=!0;this.queue={}}get freeSessions(){return uT({agent:this,isFree:!0})}get busySessions(){return uT({agent:this,isFree:!1})}};ws.kCurrentStreamsCount=Gt;ws.kGracefullyClosing=vc;pT.exports={Agent:ws,globalAgent:new ws}});var Jv=v((ppe,dT)=>{"use strict";var{Readable:KK}=H("stream"),zv=class extends KK{constructor(e,t){super({highWaterMark:t,autoDestroy:!1}),this.statusCode=null,this.statusMessage="",this.httpVersion="2.0",this.httpVersionMajor=2,this.httpVersionMinor=0,this.headers={},this.trailers={},this.req=null,this.aborted=!1,this.complete=!1,this.upgrade=null,this.rawHeaders=[],this.rawTrailers=[],this.socket=e,this.connection=e,this._dumped=!1}_destroy(e){this.req._request.destroy(e)}setTimeout(e,t){return this.req.setTimeout(e,t),this}_dump(){this._dumped||(this._dumped=!0,this.removeAllListeners("data"),this.resume())}_read(){this.req&&this.req._request.resume()}};dT.exports=zv});var Yv=v((dpe,fT)=>{"use strict";fT.exports=r=>{let e={protocol:r.protocol,hostname:typeof r.hostname=="string"&&r.hostname.startsWith("[")?r.hostname.slice(1,-1):r.hostname,host:r.host,hash:r.hash,search:r.search,pathname:r.pathname,href:r.href,path:`${r.pathname||""}${r.search||""}`};return typeof r.port=="string"&&r.port.length!==0&&(e.port=Number(r.port)),(r.username||r.password)&&(e.auth=`${r.username||""}:${r.password||""}`),e}});var mT=v((fpe,hT)=>{"use strict";hT.exports=(r,e,t)=>{for(let n of t)r.on(n,(...i)=>e.emit(n,...i))}});var gT=v((hpe,HT)=>{"use strict";HT.exports=r=>{switch(r){case":method":case":scheme":case":authority":case":path":return!0;default:return!1}}});var bT=v((Hpe,yT)=>{"use strict";var Ic=(r,e,t)=>{yT.exports[e]=class extends r{constructor(...i){super(typeof t=="string"?t:t(i)),this.name=`${super.name} [${e}]`,this.code=e}}};Ic(TypeError,"ERR_INVALID_ARG_TYPE",r=>{let e=r[0].includes(".")?"property":"argument",t=r[1],n=Array.isArray(t);return n&&(t=`${t.slice(0,-1).join(", ")} or ${t.slice(-1)}`),`The "${r[0]}" ${e} must be ${n?"one of":"of"} type ${t}. Received ${typeof r[2]}`});Ic(TypeError,"ERR_INVALID_PROTOCOL",r=>`Protocol "${r[0]}" not supported. Expected "${r[1]}"`);Ic(Error,"ERR_HTTP_HEADERS_SENT",r=>`Cannot ${r[0]} headers after they are sent to the client`);Ic(TypeError,"ERR_INVALID_HTTP_TOKEN",r=>`${r[0]} must be a valid HTTP token [${r[1]}]`);Ic(TypeError,"ERR_HTTP_INVALID_HEADER_VALUE",r=>`Invalid value "${r[0]} for header "${r[1]}"`);Ic(TypeError,"ERR_INVALID_CHAR",r=>`Invalid character in ${r[0]} [${r[1]}]`)});var rI=v((gpe,ET)=>{"use strict";var XK=H("http2"),{Writable:zK}=H("stream"),{Agent:vT,globalAgent:JK}=Xv(),YK=Jv(),QK=Yv(),ZK=mT(),e9=gT(),{ERR_INVALID_ARG_TYPE:Qv,ERR_INVALID_PROTOCOL:t9,ERR_HTTP_HEADERS_SENT:IT,ERR_INVALID_HTTP_TOKEN:r9,ERR_HTTP_INVALID_HEADER_VALUE:n9,ERR_INVALID_CHAR:i9}=bT(),{HTTP2_HEADER_STATUS:_T,HTTP2_HEADER_METHOD:AT,HTTP2_HEADER_PATH:wT,HTTP2_METHOD_CONNECT:o9}=XK.constants,Ot=Symbol("headers"),Zv=Symbol("origin"),eI=Symbol("session"),ST=Symbol("options"),em=Symbol("flushedHeaders"),Rl=Symbol("jobs"),s9=/^[\^`\-\w!#$%&*+.|~]+$/,a9=/[^\t\u0020-\u007E\u0080-\u00FF]/,tI=class extends zK{constructor(e,t,n){super({autoDestroy:!1});let i=typeof e=="string"||e instanceof URL;if(i&&(e=QK(e instanceof URL?e:new URL(e))),typeof t=="function"||t===void 0?(n=t,t=i?e:{...e}):t={...e,...t},t.h2session)this[eI]=t.h2session;else if(t.agent===!1)this.agent=new vT({maxFreeSessions:0});else if(typeof t.agent>"u"||t.agent===null)typeof t.createConnection=="function"?(this.agent=new vT({maxFreeSessions:0}),this.agent.createConnection=t.createConnection):this.agent=JK;else if(typeof t.agent.request=="function")this.agent=t.agent;else throw new Qv("options.agent",["Agent-like Object","undefined","false"],t.agent);if(t.protocol&&t.protocol!=="https:")throw new t9(t.protocol,"https:");let o=t.port||t.defaultPort||this.agent&&this.agent.defaultPort||443,s=t.hostname||t.host||"localhost";delete t.hostname,delete t.host,delete t.port;let{timeout:a}=t;if(t.timeout=void 0,this[Ot]=Object.create(null),this[Rl]=[],this.socket=null,this.connection=null,this.method=t.method||"GET",this.path=t.path,this.res=null,this.aborted=!1,this.reusedSocket=!1,t.headers)for(let[c,u]of Object.entries(t.headers))this.setHeader(c,u);t.auth&&!("authorization"in this[Ot])&&(this[Ot].authorization="Basic "+Buffer.from(t.auth).toString("base64")),t.session=t.tlsSession,t.path=t.socketPath,this[ST]=t,o===443?(this[Zv]=`https://${s}`,":authority"in this[Ot]||(this[Ot][":authority"]=s)):(this[Zv]=`https://${s}:${o}`,":authority"in this[Ot]||(this[Ot][":authority"]=`${s}:${o}`)),a&&this.setTimeout(a),n&&this.once("response",n),this[em]=!1}get method(){return this[Ot][AT]}set method(e){e&&(this[Ot][AT]=e.toUpperCase())}get path(){return this[Ot][wT]}set path(e){e&&(this[Ot][wT]=e)}get _mustNotHaveABody(){return this.method==="GET"||this.method==="HEAD"||this.method==="DELETE"}_write(e,t,n){if(this._mustNotHaveABody){n(new Error("The GET, HEAD and DELETE methods must NOT have a body"));return}this.flushHeaders();let i=()=>this._request.write(e,t,n);this._request?i():this[Rl].push(i)}_final(e){if(this.destroyed)return;this.flushHeaders();let t=()=>{if(this._mustNotHaveABody){e();return}this._request.end(e)};this._request?t():this[Rl].push(t)}abort(){this.res&&this.res.complete||(this.aborted||process.nextTick(()=>this.emit("abort")),this.aborted=!0,this.destroy())}_destroy(e,t){this.res&&this.res._dump(),this._request&&this._request.destroy(),t(e)}async flushHeaders(){if(this[em]||this.destroyed)return;this[em]=!0;let e=this.method===o9,t=n=>{if(this._request=n,this.destroyed){n.destroy();return}e||ZK(n,this,["timeout","continue","close","error"]);let i=s=>(...a)=>{!this.writable&&!this.destroyed?s(...a):this.once("finish",()=>{s(...a)})};n.once("response",i((s,a,c)=>{let u=new YK(this.socket,n.readableHighWaterMark);this.res=u,u.req=this,u.statusCode=s[_T],u.headers=s,u.rawHeaders=c,u.once("end",()=>{this.aborted?(u.aborted=!0,u.emit("aborted")):(u.complete=!0,u.socket=null,u.connection=null)}),e?(u.upgrade=!0,this.emit("connect",u,n,Buffer.alloc(0))?this.emit("close"):n.destroy()):(n.on("data",l=>{!u._dumped&&!u.push(l)&&n.pause()}),n.once("end",()=>{u.push(null)}),this.emit("response",u)||u._dump())})),n.once("headers",i(s=>this.emit("information",{statusCode:s[_T]}))),n.once("trailers",i((s,a,c)=>{let{res:u}=this;u.trailers=s,u.rawTrailers=c}));let{socket:o}=n.session;this.socket=o,this.connection=o;for(let s of this[Rl])s();this.emit("socket",this.socket)};if(this[eI])try{t(this[eI].request(this[Ot]))}catch(n){this.emit("error",n)}else{this.reusedSocket=!0;try{t(await this.agent.request(this[Zv],this[ST],this[Ot]))}catch(n){this.emit("error",n)}}}getHeader(e){if(typeof e!="string")throw new Qv("name","string",e);return this[Ot][e.toLowerCase()]}get headersSent(){return this[em]}removeHeader(e){if(typeof e!="string")throw new Qv("name","string",e);if(this.headersSent)throw new IT("remove");delete this[Ot][e.toLowerCase()]}setHeader(e,t){if(this.headersSent)throw new IT("set");if(typeof e!="string"||!s9.test(e)&&!e9(e))throw new r9("Header name",e);if(typeof t>"u")throw new n9(t,e);if(a9.test(t))throw new i9("header content",e);this[Ot][e.toLowerCase()]=t}setNoDelay(){}setSocketKeepAlive(){}setTimeout(e,t){let n=()=>this._request.setTimeout(e,t);return this._request?n():this[Rl].push(n),this}get maxHeadersCount(){if(!this.destroyed&&this._request)return this._request.session.localSettings.maxHeaderListSize}set maxHeadersCount(e){}};ET.exports=tI});var PT=v((ype,xT)=>{"use strict";var c9=H("tls");xT.exports=(r={},e=c9.connect)=>new Promise((t,n)=>{let i=!1,o,s=async()=>{await c,o.off("timeout",a),o.off("error",n),r.resolveSocket?(t({alpnProtocol:o.alpnProtocol,socket:o,timeout:i}),i&&(await Promise.resolve(),o.emit("timeout"))):(o.destroy(),t({alpnProtocol:o.alpnProtocol,timeout:i}))},a=async()=>{i=!0,s()},c=(async()=>{try{o=await e(r,s),o.on("error",n),o.once("timeout",a)}catch(u){n(u)}})()})});var $T=v((bpe,LT)=>{"use strict";var u9=H("net");LT.exports=r=>{let e=r.host,t=r.headers&&r.headers.host;return t&&(t.startsWith("[")?t.indexOf("]")===-1?e=t:e=t.slice(1,-1):e=t.split(":",1)[0]),u9.isIP(e)?"":e}});var TT=v((vpe,iI)=>{"use strict";var CT=H("http"),nI=H("https"),l9=PT(),p9=Gv(),d9=rI(),f9=$T(),h9=Yv(),tm=new p9({maxSize:100}),kl=new Map,DT=(r,e,t)=>{e._httpMessage={shouldKeepAlive:!0};let n=()=>{r.emit("free",e,t)};e.on("free",n);let i=()=>{r.removeSocket(e,t)};e.on("close",i);let o=()=>{r.removeSocket(e,t),e.off("close",i),e.off("free",n),e.off("agentRemove",o)};e.on("agentRemove",o),r.emit("free",e,t)},m9=async r=>{let e=`${r.host}:${r.port}:${r.ALPNProtocols.sort()}`;if(!tm.has(e)){if(kl.has(e))return(await kl.get(e)).alpnProtocol;let{path:t,agent:n}=r;r.path=r.socketPath;let i=l9(r);kl.set(e,i);try{let{socket:o,alpnProtocol:s}=await i;if(tm.set(e,s),r.path=t,s==="h2")o.destroy();else{let{globalAgent:a}=nI,c=nI.Agent.prototype.createConnection;n?n.createConnection===c?DT(n,o,r):o.destroy():a.createConnection===c?DT(a,o,r):o.destroy()}return kl.delete(e),s}catch(o){throw kl.delete(e),o}}return tm.get(e)};iI.exports=async(r,e,t)=>{if((typeof r=="string"||r instanceof URL)&&(r=h9(new URL(r))),typeof e=="function"&&(t=e,e=void 0),e={ALPNProtocols:["h2","http/1.1"],...r,...e,resolveSocket:!0},!Array.isArray(e.ALPNProtocols)||e.ALPNProtocols.length===0)throw new Error("The `ALPNProtocols` option must be an Array with at least one entry");e.protocol=e.protocol||"https:";let n=e.protocol==="https:";e.host=e.hostname||e.host||"localhost",e.session=e.tlsSession,e.servername=e.servername||f9(e),e.port=e.port||(n?443:80),e._defaultAgent=n?nI.globalAgent:CT.globalAgent;let i=e.agent;if(i){if(i.addRequest)throw new Error("The `options.agent` object can contain only `http`, `https` or `http2` properties");e.agent=i[n?"https":"http"]}return n&&await m9(e)==="h2"?(i&&(e.agent=i.http2),new d9(e,t)):CT.request(e,t)};iI.exports.protocolCache=tm});var RT=v((Ipe,MT)=>{"use strict";var H9=H("http2"),g9=Xv(),oI=rI(),y9=Jv(),b9=TT(),v9=(r,e,t)=>new oI(r,e,t),I9=(r,e,t)=>{let n=new oI(r,e,t);return n.end(),n};MT.exports={...H9,ClientRequest:oI,IncomingMessage:y9,...g9,request:v9,get:I9,auto:b9}});var aI=v(sI=>{"use strict";Object.defineProperty(sI,"__esModule",{value:!0});var kT=xi();sI.default=r=>kT.default.nodeStream(r)&&kT.default.function_(r.getBoundary)});var FT=v(cI=>{"use strict";Object.defineProperty(cI,"__esModule",{value:!0});var NT=H("fs"),BT=H("util"),OT=xi(),_9=aI(),A9=BT.promisify(NT.stat);cI.default=async(r,e)=>{if(e&&"content-length"in e)return Number(e["content-length"]);if(!r)return 0;if(OT.default.string(r))return Buffer.byteLength(r);if(OT.default.buffer(r))return r.length;if(_9.default(r))return BT.promisify(r.getLength.bind(r))();if(r instanceof NT.ReadStream){let{size:t}=await A9(r.path);return t===0?void 0:t}}});var lI=v(uI=>{"use strict";Object.defineProperty(uI,"__esModule",{value:!0});function w9(r,e,t){let n={};for(let i of t)n[i]=(...o)=>{e.emit(i,...o)},r.on(i,n[i]);return()=>{for(let i of t)r.off(i,n[i])}}uI.default=w9});var UT=v(pI=>{"use strict";Object.defineProperty(pI,"__esModule",{value:!0});pI.default=()=>{let r=[];return{once(e,t,n){e.once(t,n),r.push({origin:e,event:t,fn:n})},unhandleAll(){for(let e of r){let{origin:t,event:n,fn:i}=e;t.removeListener(n,i)}r.length=0}}}});var jT=v(Ol=>{"use strict";Object.defineProperty(Ol,"__esModule",{value:!0});Ol.TimeoutError=void 0;var S9=H("net"),E9=UT(),WT=Symbol("reentry"),x9=()=>{},rm=class extends Error{constructor(e,t){super(`Timeout awaiting '${t}' for ${e}ms`),this.event=t,this.name="TimeoutError",this.code="ETIMEDOUT"}};Ol.TimeoutError=rm;Ol.default=(r,e,t)=>{if(WT in r)return x9;r[WT]=!0;let n=[],{once:i,unhandleAll:o}=E9.default(),s=(p,d,f)=>{var h;let m=setTimeout(d,p,p,f);(h=m.unref)===null||h===void 0||h.call(m);let y=()=>{clearTimeout(m)};return n.push(y),y},{host:a,hostname:c}=t,u=(p,d)=>{r.destroy(new rm(p,d))},l=()=>{for(let p of n)p();o()};if(r.once("error",p=>{if(l(),r.listenerCount("error")===0)throw p}),r.once("close",l),i(r,"response",p=>{i(p,"end",l)}),typeof e.request<"u"&&s(e.request,u,"request"),typeof e.socket<"u"){let p=()=>{u(e.socket,"socket")};r.setTimeout(e.socket,p),n.push(()=>{r.removeListener("timeout",p)})}return i(r,"socket",p=>{var d;let{socketPath:f}=r;if(p.connecting){let h=!!(f??S9.isIP((d=c??a)!==null&&d!==void 0?d:"")!==0);if(typeof e.lookup<"u"&&!h&&typeof p.address().address>"u"){let m=s(e.lookup,u,"lookup");i(p,"lookup",m)}if(typeof e.connect<"u"){let m=()=>s(e.connect,u,"connect");h?i(p,"connect",m()):i(p,"lookup",y=>{y===null&&i(p,"connect",m())})}typeof e.secureConnect<"u"&&t.protocol==="https:"&&i(p,"connect",()=>{let m=s(e.secureConnect,u,"secureConnect");i(p,"secureConnect",m)})}if(typeof e.send<"u"){let h=()=>s(e.send,u,"send");p.connecting?i(p,"connect",()=>{i(r,"upload-complete",h())}):i(r,"upload-complete",h())}}),typeof e.response<"u"&&i(r,"upload-complete",()=>{let p=s(e.response,u,"response");i(r,"response",p)}),l}});var qT=v(dI=>{"use strict";Object.defineProperty(dI,"__esModule",{value:!0});var VT=xi();dI.default=r=>{r=r;let e={protocol:r.protocol,hostname:VT.default.string(r.hostname)&&r.hostname.startsWith("[")?r.hostname.slice(1,-1):r.hostname,host:r.host,hash:r.hash,search:r.search,pathname:r.pathname,href:r.href,path:`${r.pathname||""}${r.search||""}`};return VT.default.string(r.port)&&r.port.length>0&&(e.port=Number(r.port)),(r.username||r.password)&&(e.auth=`${r.username||""}:${r.password||""}`),e}});var GT=v(fI=>{"use strict";Object.defineProperty(fI,"__esModule",{value:!0});var P9=H("url"),L9=["protocol","host","hostname","port","pathname","search"];fI.default=(r,e)=>{var t,n;if(e.path){if(e.pathname)throw new TypeError("Parameters `path` and `pathname` are mutually exclusive.");if(e.search)throw new TypeError("Parameters `path` and `search` are mutually exclusive.");if(e.searchParams)throw new TypeError("Parameters `path` and `searchParams` are mutually exclusive.")}if(e.search&&e.searchParams)throw new TypeError("Parameters `search` and `searchParams` are mutually exclusive.");if(!r){if(!e.protocol)throw new TypeError("No URL protocol specified");r=`${e.protocol}//${(n=(t=e.hostname)!==null&&t!==void 0?t:e.host)!==null&&n!==void 0?n:""}`}let i=new P9.URL(r);if(e.path){let o=e.path.indexOf("?");o===-1?e.pathname=e.path:(e.pathname=e.path.slice(0,o),e.search=e.path.slice(o+1)),delete e.path}for(let o of L9)e[o]&&(i[o]=e[o].toString());return i}});var KT=v(mI=>{"use strict";Object.defineProperty(mI,"__esModule",{value:!0});var hI=class{constructor(){this.weakMap=new WeakMap,this.map=new Map}set(e,t){typeof e=="object"?this.weakMap.set(e,t):this.map.set(e,t)}get(e){return typeof e=="object"?this.weakMap.get(e):this.map.get(e)}has(e){return typeof e=="object"?this.weakMap.has(e):this.map.has(e)}};mI.default=hI});var gI=v(HI=>{"use strict";Object.defineProperty(HI,"__esModule",{value:!0});var $9=async r=>{let e=[],t=0;for await(let n of r)e.push(n),t+=Buffer.byteLength(n);return Buffer.isBuffer(e[0])?Buffer.concat(e,t):Buffer.from(e.join(""))};HI.default=$9});var zT=v(Ss=>{"use strict";Object.defineProperty(Ss,"__esModule",{value:!0});Ss.dnsLookupIpVersionToFamily=Ss.isDnsLookupIpVersion=void 0;var XT={auto:0,ipv4:4,ipv6:6};Ss.isDnsLookupIpVersion=r=>r in XT;Ss.dnsLookupIpVersionToFamily=r=>{if(Ss.isDnsLookupIpVersion(r))return XT[r];throw new Error("Invalid DNS lookup IP version")}});var yI=v(nm=>{"use strict";Object.defineProperty(nm,"__esModule",{value:!0});nm.isResponseOk=void 0;nm.isResponseOk=r=>{let{statusCode:e}=r,t=r.request.options.followRedirect?299:399;return e>=200&&e<=t||e===304}});var YT=v(bI=>{"use strict";Object.defineProperty(bI,"__esModule",{value:!0});var JT=new Set;bI.default=r=>{JT.has(r)||(JT.add(r),process.emitWarning(`Got: ${r}`,{type:"DeprecationWarning"}))}});var QT=v(vI=>{"use strict";Object.defineProperty(vI,"__esModule",{value:!0});var Re=xi(),C9=(r,e)=>{if(Re.default.null_(r.encoding))throw new TypeError("To get a Buffer, set `options.responseType` to `buffer` instead");Re.assert.any([Re.default.string,Re.default.undefined],r.encoding),Re.assert.any([Re.default.boolean,Re.default.undefined],r.resolveBodyOnly),Re.assert.any([Re.default.boolean,Re.default.undefined],r.methodRewriting),Re.assert.any([Re.default.boolean,Re.default.undefined],r.isStream),Re.assert.any([Re.default.string,Re.default.undefined],r.responseType),r.responseType===void 0&&(r.responseType="text");let{retry:t}=r;if(e?r.retry={...e.retry}:r.retry={calculateDelay:n=>n.computedValue,limit:0,methods:[],statusCodes:[],errorCodes:[],maxRetryAfter:void 0},Re.default.object(t)?(r.retry={...r.retry,...t},r.retry.methods=[...new Set(r.retry.methods.map(n=>n.toUpperCase()))],r.retry.statusCodes=[...new Set(r.retry.statusCodes)],r.retry.errorCodes=[...new Set(r.retry.errorCodes)]):Re.default.number(t)&&(r.retry.limit=t),Re.default.undefined(r.retry.maxRetryAfter)&&(r.retry.maxRetryAfter=Math.min(...[r.timeout.request,r.timeout.connect].filter(Re.default.number))),Re.default.object(r.pagination)){e&&(r.pagination={...e.pagination,...r.pagination});let{pagination:n}=r;if(!Re.default.function_(n.transform))throw new Error("`options.pagination.transform` must be implemented");if(!Re.default.function_(n.shouldContinue))throw new Error("`options.pagination.shouldContinue` must be implemented");if(!Re.default.function_(n.filter))throw new TypeError("`options.pagination.filter` must be implemented");if(!Re.default.function_(n.paginate))throw new Error("`options.pagination.paginate` must be implemented")}return r.responseType==="json"&&r.headers.accept===void 0&&(r.headers.accept="application/json"),r};vI.default=C9});var ZT=v(Nl=>{"use strict";Object.defineProperty(Nl,"__esModule",{value:!0});Nl.retryAfterStatusCodes=void 0;Nl.retryAfterStatusCodes=new Set([413,429,503]);var D9=({attemptCount:r,retryOptions:e,error:t,retryAfter:n})=>{if(r>e.limit)return 0;let i=e.methods.includes(t.options.method),o=e.errorCodes.includes(t.code),s=t.response&&e.statusCodes.includes(t.response.statusCode);if(!i||!o&&!s)return 0;if(t.response){if(n)return e.maxRetryAfter===void 0||n>e.maxRetryAfter?0:n;if(t.response.statusCode===413)return 0}let a=Math.random()*100;return 2**(r-1)*1e3+a};Nl.default=D9});var Ul=v(me=>{"use strict";Object.defineProperty(me,"__esModule",{value:!0});me.UnsupportedProtocolError=me.ReadError=me.TimeoutError=me.UploadError=me.CacheError=me.HTTPError=me.MaxRedirectsError=me.RequestError=me.setNonEnumerableProperties=me.knownHookEvents=me.withoutBody=me.kIsNormalizedAlready=void 0;var eM=H("util"),tM=H("stream"),T9=H("fs"),fo=H("url"),rM=H("http"),II=H("http"),M9=H("https"),R9=mD(),k9=_D(),nM=rT(),O9=sT(),N9=RT(),B9=Qh(),S=xi(),F9=FT(),iM=aI(),U9=lI(),oM=jT(),W9=qT(),sM=GT(),j9=KT(),V9=gI(),aM=zT(),q9=yI(),ho=YT(),G9=QT(),K9=ZT(),_I,wt=Symbol("request"),sm=Symbol("response"),_c=Symbol("responseSize"),Ac=Symbol("downloadedSize"),wc=Symbol("bodySize"),Sc=Symbol("uploadedSize"),im=Symbol("serverResponsesPiped"),cM=Symbol("unproxyEvents"),uM=Symbol("isFromCache"),AI=Symbol("cancelTimeouts"),lM=Symbol("startedReading"),Ec=Symbol("stopReading"),om=Symbol("triggerRead"),mo=Symbol("body"),Bl=Symbol("jobs"),pM=Symbol("originalResponse"),dM=Symbol("retryTimeout");me.kIsNormalizedAlready=Symbol("isNormalizedAlready");var X9=S.default.string(process.versions.brotli);me.withoutBody=new Set(["GET","HEAD"]);me.knownHookEvents=["init","beforeRequest","beforeRedirect","beforeError","beforeRetry","afterResponse"];function z9(r){for(let e in r){let t=r[e];if(!S.default.string(t)&&!S.default.number(t)&&!S.default.boolean(t)&&!S.default.null_(t)&&!S.default.undefined(t))throw new TypeError(`The \`searchParams\` value '${String(t)}' must be a string, number, boolean or null`)}}function J9(r){return S.default.object(r)&&!("statusCode"in r)}var wI=new j9.default,Y9=async r=>new Promise((e,t)=>{let n=i=>{t(i)};r.pending||e(),r.once("error",n),r.once("ready",()=>{r.off("error",n),e()})}),Q9=new Set([300,301,302,303,304,307,308]),Z9=["context","body","json","form"];me.setNonEnumerableProperties=(r,e)=>{let t={};for(let n of r)if(n)for(let i of Z9)i in n&&(t[i]={writable:!0,configurable:!0,enumerable:!1,value:n[i]});Object.defineProperties(e,t)};var et=class extends Error{constructor(e,t,n){var i,o;if(super(e),Error.captureStackTrace(this,this.constructor),this.name="RequestError",this.code=(i=t.code)!==null&&i!==void 0?i:"ERR_GOT_REQUEST_ERROR",n instanceof fm?(Object.defineProperty(this,"request",{enumerable:!1,value:n}),Object.defineProperty(this,"response",{enumerable:!1,value:n[sm]}),Object.defineProperty(this,"options",{enumerable:!1,value:n.options})):Object.defineProperty(this,"options",{enumerable:!1,value:n}),this.timings=(o=this.request)===null||o===void 0?void 0:o.timings,S.default.string(t.stack)&&S.default.string(this.stack)){let s=this.stack.indexOf(this.message)+this.message.length,a=this.stack.slice(s).split(` +`).reverse(),c=t.stack.slice(t.stack.indexOf(t.message)+t.message.length).split(` +`).reverse();for(;c.length!==0&&c[0]===a[0];)a.shift();this.stack=`${this.stack.slice(0,s)}${a.reverse().join(` +`)}${c.reverse().join(` +`)}`}}};me.RequestError=et;var am=class extends et{constructor(e){super(`Redirected ${e.options.maxRedirects} times. Aborting.`,{},e),this.name="MaxRedirectsError",this.code="ERR_TOO_MANY_REDIRECTS"}};me.MaxRedirectsError=am;var cm=class extends et{constructor(e){super(`Response code ${e.statusCode} (${e.statusMessage})`,{},e.request),this.name="HTTPError",this.code="ERR_NON_2XX_3XX_RESPONSE"}};me.HTTPError=cm;var um=class extends et{constructor(e,t){super(e.message,e,t),this.name="CacheError",this.code=this.code==="ERR_GOT_REQUEST_ERROR"?"ERR_CACHE_ACCESS":this.code}};me.CacheError=um;var lm=class extends et{constructor(e,t){super(e.message,e,t),this.name="UploadError",this.code=this.code==="ERR_GOT_REQUEST_ERROR"?"ERR_UPLOAD":this.code}};me.UploadError=lm;var pm=class extends et{constructor(e,t,n){super(e.message,e,n),this.name="TimeoutError",this.event=e.event,this.timings=t}};me.TimeoutError=pm;var Fl=class extends et{constructor(e,t){super(e.message,e,t),this.name="ReadError",this.code=this.code==="ERR_GOT_REQUEST_ERROR"?"ERR_READING_RESPONSE_STREAM":this.code}};me.ReadError=Fl;var dm=class extends et{constructor(e){super(`Unsupported protocol "${e.url.protocol}"`,{},e),this.name="UnsupportedProtocolError",this.code="ERR_UNSUPPORTED_PROTOCOL"}};me.UnsupportedProtocolError=dm;var eX=["socket","connect","continue","information","upgrade","timeout"],fm=class extends tM.Duplex{constructor(e,t={},n){super({autoDestroy:!1,highWaterMark:0}),this[Ac]=0,this[Sc]=0,this.requestInitialized=!1,this[im]=new Set,this.redirects=[],this[Ec]=!1,this[om]=!1,this[Bl]=[],this.retryCount=0,this._progressCallbacks=[];let i=()=>this._unlockWrite(),o=()=>this._lockWrite();this.on("pipe",u=>{u.prependListener("data",i),u.on("data",o),u.prependListener("end",i),u.on("end",o)}),this.on("unpipe",u=>{u.off("data",i),u.off("data",o),u.off("end",i),u.off("end",o)}),this.on("pipe",u=>{u instanceof II.IncomingMessage&&(this.options.headers={...u.headers,...this.options.headers})});let{json:s,body:a,form:c}=t;if((s||a||c)&&this._lockWrite(),me.kIsNormalizedAlready in t)this.options=t;else try{this.options=this.constructor.normalizeArguments(e,t,n)}catch(u){S.default.nodeStream(t.body)&&t.body.destroy(),this.destroy(u);return}(async()=>{var u;try{this.options.body instanceof T9.ReadStream&&await Y9(this.options.body);let{url:l}=this.options;if(!l)throw new TypeError("Missing `url` property");if(this.requestUrl=l.toString(),decodeURI(this.requestUrl),await this._finalizeBody(),await this._makeRequest(),this.destroyed){(u=this[wt])===null||u===void 0||u.destroy();return}for(let p of this[Bl])p();this[Bl].length=0,this.requestInitialized=!0}catch(l){if(l instanceof et){this._beforeError(l);return}this.destroyed||this.destroy(l)}})()}static normalizeArguments(e,t,n){var i,o,s,a,c;let u=t;if(S.default.object(e)&&!S.default.urlInstance(e))t={...n,...e,...t};else{if(e&&t&&t.url!==void 0)throw new TypeError("The `url` option is mutually exclusive with the `input` argument");t={...n,...t},e!==void 0&&(t.url=e),S.default.urlInstance(t.url)&&(t.url=new fo.URL(t.url.toString()))}if(t.cache===!1&&(t.cache=void 0),t.dnsCache===!1&&(t.dnsCache=void 0),S.assert.any([S.default.string,S.default.undefined],t.method),S.assert.any([S.default.object,S.default.undefined],t.headers),S.assert.any([S.default.string,S.default.urlInstance,S.default.undefined],t.prefixUrl),S.assert.any([S.default.object,S.default.undefined],t.cookieJar),S.assert.any([S.default.object,S.default.string,S.default.undefined],t.searchParams),S.assert.any([S.default.object,S.default.string,S.default.undefined],t.cache),S.assert.any([S.default.object,S.default.number,S.default.undefined],t.timeout),S.assert.any([S.default.object,S.default.undefined],t.context),S.assert.any([S.default.object,S.default.undefined],t.hooks),S.assert.any([S.default.boolean,S.default.undefined],t.decompress),S.assert.any([S.default.boolean,S.default.undefined],t.ignoreInvalidCookies),S.assert.any([S.default.boolean,S.default.undefined],t.followRedirect),S.assert.any([S.default.number,S.default.undefined],t.maxRedirects),S.assert.any([S.default.boolean,S.default.undefined],t.throwHttpErrors),S.assert.any([S.default.boolean,S.default.undefined],t.http2),S.assert.any([S.default.boolean,S.default.undefined],t.allowGetBody),S.assert.any([S.default.string,S.default.undefined],t.localAddress),S.assert.any([aM.isDnsLookupIpVersion,S.default.undefined],t.dnsLookupIpVersion),S.assert.any([S.default.object,S.default.undefined],t.https),S.assert.any([S.default.boolean,S.default.undefined],t.rejectUnauthorized),t.https&&(S.assert.any([S.default.boolean,S.default.undefined],t.https.rejectUnauthorized),S.assert.any([S.default.function_,S.default.undefined],t.https.checkServerIdentity),S.assert.any([S.default.string,S.default.object,S.default.array,S.default.undefined],t.https.certificateAuthority),S.assert.any([S.default.string,S.default.object,S.default.array,S.default.undefined],t.https.key),S.assert.any([S.default.string,S.default.object,S.default.array,S.default.undefined],t.https.certificate),S.assert.any([S.default.string,S.default.undefined],t.https.passphrase),S.assert.any([S.default.string,S.default.buffer,S.default.array,S.default.undefined],t.https.pfx)),S.assert.any([S.default.object,S.default.undefined],t.cacheOptions),S.default.string(t.method)?t.method=t.method.toUpperCase():t.method="GET",t.headers===n?.headers?t.headers={...t.headers}:t.headers=B9({...n?.headers,...t.headers}),"slashes"in t)throw new TypeError("The legacy `url.Url` has been deprecated. Use `URL` instead.");if("auth"in t)throw new TypeError("Parameter `auth` is deprecated. Use `username` / `password` instead.");if("searchParams"in t&&t.searchParams&&t.searchParams!==n?.searchParams){let f;if(S.default.string(t.searchParams)||t.searchParams instanceof fo.URLSearchParams)f=new fo.URLSearchParams(t.searchParams);else{z9(t.searchParams),f=new fo.URLSearchParams;for(let h in t.searchParams){let m=t.searchParams[h];m===null?f.append(h,""):m!==void 0&&f.append(h,m)}}(i=n?.searchParams)===null||i===void 0||i.forEach((h,m)=>{f.has(m)||f.append(m,h)}),t.searchParams=f}if(t.username=(o=t.username)!==null&&o!==void 0?o:"",t.password=(s=t.password)!==null&&s!==void 0?s:"",S.default.undefined(t.prefixUrl)?t.prefixUrl=(a=n?.prefixUrl)!==null&&a!==void 0?a:"":(t.prefixUrl=t.prefixUrl.toString(),t.prefixUrl!==""&&!t.prefixUrl.endsWith("/")&&(t.prefixUrl+="/")),S.default.string(t.url)){if(t.url.startsWith("/"))throw new Error("`input` must not start with a slash when using `prefixUrl`");t.url=sM.default(t.prefixUrl+t.url,t)}else(S.default.undefined(t.url)&&t.prefixUrl!==""||t.protocol)&&(t.url=sM.default(t.prefixUrl,t));if(t.url){"port"in t&&delete t.port;let{prefixUrl:f}=t;Object.defineProperty(t,"prefixUrl",{set:m=>{let y=t.url;if(!y.href.startsWith(m))throw new Error(`Cannot change \`prefixUrl\` from ${f} to ${m}: ${y.href}`);t.url=new fo.URL(m+y.href.slice(f.length)),f=m},get:()=>f});let{protocol:h}=t.url;if(h==="unix:"&&(h="http:",t.url=new fo.URL(`http://unix${t.url.pathname}${t.url.search}`)),t.searchParams&&(t.url.search=t.searchParams.toString()),h!=="http:"&&h!=="https:")throw new dm(t);t.username===""?t.username=t.url.username:t.url.username=t.username,t.password===""?t.password=t.url.password:t.url.password=t.password}let{cookieJar:l}=t;if(l){let{setCookie:f,getCookieString:h}=l;S.assert.function_(f),S.assert.function_(h),f.length===4&&h.length===0&&(f=eM.promisify(f.bind(t.cookieJar)),h=eM.promisify(h.bind(t.cookieJar)),t.cookieJar={setCookie:f,getCookieString:h})}let{cache:p}=t;if(p&&(wI.has(p)||wI.set(p,new nM((f,h)=>{let m=f[wt](f,h);return S.default.promise(m)&&(m.once=(y,w)=>{if(y==="error")m.catch(w);else if(y==="abort")(async()=>{try{(await m).once("abort",w)}catch{}})();else throw new Error(`Unknown HTTP2 promise event: ${y}`);return m}),m},p))),t.cacheOptions={...t.cacheOptions},t.dnsCache===!0)_I||(_I=new k9.default),t.dnsCache=_I;else if(!S.default.undefined(t.dnsCache)&&!t.dnsCache.lookup)throw new TypeError(`Parameter \`dnsCache\` must be a CacheableLookup instance or a boolean, got ${S.default(t.dnsCache)}`);S.default.number(t.timeout)?t.timeout={request:t.timeout}:n&&t.timeout!==n.timeout?t.timeout={...n.timeout,...t.timeout}:t.timeout={...t.timeout},t.context||(t.context={});let d=t.hooks===n?.hooks;t.hooks={...t.hooks};for(let f of me.knownHookEvents)if(f in t.hooks)if(S.default.array(t.hooks[f]))t.hooks[f]=[...t.hooks[f]];else throw new TypeError(`Parameter \`${f}\` must be an Array, got ${S.default(t.hooks[f])}`);else t.hooks[f]=[];if(n&&!d)for(let f of me.knownHookEvents)n.hooks[f].length>0&&(t.hooks[f]=[...n.hooks[f],...t.hooks[f]]);if("family"in t&&ho.default('"options.family" was never documented, please use "options.dnsLookupIpVersion"'),n?.https&&(t.https={...n.https,...t.https}),"rejectUnauthorized"in t&&ho.default('"options.rejectUnauthorized" is now deprecated, please use "options.https.rejectUnauthorized"'),"checkServerIdentity"in t&&ho.default('"options.checkServerIdentity" was never documented, please use "options.https.checkServerIdentity"'),"ca"in t&&ho.default('"options.ca" was never documented, please use "options.https.certificateAuthority"'),"key"in t&&ho.default('"options.key" was never documented, please use "options.https.key"'),"cert"in t&&ho.default('"options.cert" was never documented, please use "options.https.certificate"'),"passphrase"in t&&ho.default('"options.passphrase" was never documented, please use "options.https.passphrase"'),"pfx"in t&&ho.default('"options.pfx" was never documented, please use "options.https.pfx"'),"followRedirects"in t)throw new TypeError("The `followRedirects` option does not exist. Use `followRedirect` instead.");if(t.agent){for(let f in t.agent)if(f!=="http"&&f!=="https"&&f!=="http2")throw new TypeError(`Expected the \`options.agent\` properties to be \`http\`, \`https\` or \`http2\`, got \`${f}\``)}return t.maxRedirects=(c=t.maxRedirects)!==null&&c!==void 0?c:0,me.setNonEnumerableProperties([n,u],t),G9.default(t,n)}_lockWrite(){let e=()=>{throw new TypeError("The payload has been already provided")};this.write=e,this.end=e}_unlockWrite(){this.write=super.write,this.end=super.end}async _finalizeBody(){let{options:e}=this,{headers:t}=e,n=!S.default.undefined(e.form),i=!S.default.undefined(e.json),o=!S.default.undefined(e.body),s=n||i||o,a=me.withoutBody.has(e.method)&&!(e.method==="GET"&&e.allowGetBody);if(this._cannotHaveBody=a,s){if(a)throw new TypeError(`The \`${e.method}\` method cannot be used with a body`);if([o,n,i].filter(c=>c).length>1)throw new TypeError("The `body`, `json` and `form` options are mutually exclusive");if(o&&!(e.body instanceof tM.Readable)&&!S.default.string(e.body)&&!S.default.buffer(e.body)&&!iM.default(e.body))throw new TypeError("The `body` option must be a stream.Readable, string or Buffer");if(n&&!S.default.object(e.form))throw new TypeError("The `form` option must be an Object");{let c=!S.default.string(t["content-type"]);o?(iM.default(e.body)&&c&&(t["content-type"]=`multipart/form-data; boundary=${e.body.getBoundary()}`),this[mo]=e.body):n?(c&&(t["content-type"]="application/x-www-form-urlencoded"),this[mo]=new fo.URLSearchParams(e.form).toString()):(c&&(t["content-type"]="application/json"),this[mo]=e.stringifyJson(e.json));let u=await F9.default(this[mo],e.headers);S.default.undefined(t["content-length"])&&S.default.undefined(t["transfer-encoding"])&&!a&&!S.default.undefined(u)&&(t["content-length"]=String(u))}}else a?this._lockWrite():this._unlockWrite();this[wc]=Number(t["content-length"])||void 0}async _onResponseBase(e){let{options:t}=this,{url:n}=t;this[pM]=e,t.decompress&&(e=O9(e));let i=e.statusCode,o=e;o.statusMessage=o.statusMessage?o.statusMessage:rM.STATUS_CODES[i],o.url=t.url.toString(),o.requestUrl=this.requestUrl,o.redirectUrls=this.redirects,o.request=this,o.isFromCache=e.fromCache||!1,o.ip=this.ip,o.retryCount=this.retryCount,this[uM]=o.isFromCache,this[_c]=Number(e.headers["content-length"])||void 0,this[sm]=e,e.once("end",()=>{this[_c]=this[Ac],this.emit("downloadProgress",this.downloadProgress)}),e.once("error",a=>{e.destroy(),this._beforeError(new Fl(a,this))}),e.once("aborted",()=>{this._beforeError(new Fl({name:"Error",message:"The server aborted pending request",code:"ECONNRESET"},this))}),this.emit("downloadProgress",this.downloadProgress);let s=e.headers["set-cookie"];if(S.default.object(t.cookieJar)&&s){let a=s.map(async c=>t.cookieJar.setCookie(c,n.toString()));t.ignoreInvalidCookies&&(a=a.map(async c=>c.catch(()=>{})));try{await Promise.all(a)}catch(c){this._beforeError(c);return}}if(t.followRedirect&&e.headers.location&&Q9.has(i)){if(e.resume(),this[wt]&&(this[AI](),delete this[wt],this[cM]()),(i===303&&t.method!=="GET"&&t.method!=="HEAD"||!t.methodRewriting)&&(t.method="GET","body"in t&&delete t.body,"json"in t&&delete t.json,"form"in t&&delete t.form,this[mo]=void 0,delete t.headers["content-length"]),this.redirects.length>=t.maxRedirects){this._beforeError(new am(this));return}try{let p=function(d){return d.protocol==="unix:"||d.hostname==="unix"},c=Buffer.from(e.headers.location,"binary").toString(),u=new fo.URL(c,n),l=u.toString();if(decodeURI(l),!p(n)&&p(u)){this._beforeError(new et("Cannot redirect to UNIX socket",{},this));return}u.hostname!==n.hostname||u.port!==n.port?("host"in t.headers&&delete t.headers.host,"cookie"in t.headers&&delete t.headers.cookie,"authorization"in t.headers&&delete t.headers.authorization,(t.username||t.password)&&(t.username="",t.password="")):(u.username=t.username,u.password=t.password),this.redirects.push(l),t.url=u;for(let d of t.hooks.beforeRedirect)await d(t,o);this.emit("redirect",o,t),await this._makeRequest()}catch(c){this._beforeError(c);return}return}if(t.isStream&&t.throwHttpErrors&&!q9.isResponseOk(o)){this._beforeError(new cm(o));return}e.on("readable",()=>{this[om]&&this._read()}),this.on("resume",()=>{e.resume()}),this.on("pause",()=>{e.pause()}),e.once("end",()=>{this.push(null)}),this.emit("response",e);for(let a of this[im])if(!a.headersSent){for(let c in e.headers){let u=t.decompress?c!=="content-encoding":!0,l=e.headers[c];u&&a.setHeader(c,l)}a.statusCode=i}}async _onResponse(e){try{await this._onResponseBase(e)}catch(t){this._beforeError(t)}}_onRequest(e){let{options:t}=this,{timeout:n,url:i}=t;R9.default(e),this[AI]=oM.default(e,n,i);let o=t.cache?"cacheableResponse":"response";e.once(o,c=>{this._onResponse(c)}),e.once("error",c=>{var u;e.destroy(),(u=e.res)===null||u===void 0||u.removeAllListeners("end"),c=c instanceof oM.TimeoutError?new pm(c,this.timings,this):new et(c.message,c,this),this._beforeError(c)}),this[cM]=U9.default(e,this,eX),this[wt]=e,this.emit("uploadProgress",this.uploadProgress);let s=this[mo],a=this.redirects.length===0?this:e;S.default.nodeStream(s)?(s.pipe(a),s.once("error",c=>{this._beforeError(new lm(c,this))})):(this._unlockWrite(),S.default.undefined(s)?(this._cannotHaveBody||this._noPipe)&&(a.end(),this._lockWrite()):(this._writeRequest(s,void 0,()=>{}),a.end(),this._lockWrite())),this.emit("request",e)}async _createCacheableRequest(e,t){return new Promise((n,i)=>{Object.assign(t,W9.default(e)),delete t.url;let o,s=wI.get(t.cache)(t,async a=>{a._readableState.autoDestroy=!1,o&&(await o).emit("cacheableResponse",a),n(a)});t.url=e,s.once("error",i),s.once("request",async a=>{o=a,n(o)})})}async _makeRequest(){var e,t,n,i,o;let{options:s}=this,{headers:a}=s;for(let w in a)if(S.default.undefined(a[w]))delete a[w];else if(S.default.null_(a[w]))throw new TypeError(`Use \`undefined\` instead of \`null\` to delete the \`${w}\` header`);if(s.decompress&&S.default.undefined(a["accept-encoding"])&&(a["accept-encoding"]=X9?"gzip, deflate, br":"gzip, deflate"),s.cookieJar){let w=await s.cookieJar.getCookieString(s.url.toString());S.default.nonEmptyString(w)&&(s.headers.cookie=w)}for(let w of s.hooks.beforeRequest){let D=await w(s);if(!S.default.undefined(D)){s.request=()=>D;break}}s.body&&this[mo]!==s.body&&(this[mo]=s.body);let{agent:c,request:u,timeout:l,url:p}=s;if(s.dnsCache&&!("lookup"in s)&&(s.lookup=s.dnsCache.lookup),p.hostname==="unix"){let w=/(?.+?):(?.+)/.exec(`${p.pathname}${p.search}`);if(w?.groups){let{socketPath:D,path:j}=w.groups;Object.assign(s,{socketPath:D,path:j,host:""})}}let d=p.protocol==="https:",f;s.http2?f=N9.auto:f=d?M9.request:rM.request;let h=(e=s.request)!==null&&e!==void 0?e:f,m=s.cache?this._createCacheableRequest:h;c&&!s.http2&&(s.agent=c[d?"https":"http"]),s[wt]=h,delete s.request,delete s.timeout;let y=s;if(y.shared=(t=s.cacheOptions)===null||t===void 0?void 0:t.shared,y.cacheHeuristic=(n=s.cacheOptions)===null||n===void 0?void 0:n.cacheHeuristic,y.immutableMinTimeToLive=(i=s.cacheOptions)===null||i===void 0?void 0:i.immutableMinTimeToLive,y.ignoreCargoCult=(o=s.cacheOptions)===null||o===void 0?void 0:o.ignoreCargoCult,s.dnsLookupIpVersion!==void 0)try{y.family=aM.dnsLookupIpVersionToFamily(s.dnsLookupIpVersion)}catch{throw new Error("Invalid `dnsLookupIpVersion` option value")}s.https&&("rejectUnauthorized"in s.https&&(y.rejectUnauthorized=s.https.rejectUnauthorized),s.https.checkServerIdentity&&(y.checkServerIdentity=s.https.checkServerIdentity),s.https.certificateAuthority&&(y.ca=s.https.certificateAuthority),s.https.certificate&&(y.cert=s.https.certificate),s.https.key&&(y.key=s.https.key),s.https.passphrase&&(y.passphrase=s.https.passphrase),s.https.pfx&&(y.pfx=s.https.pfx));try{let w=await m(p,y);S.default.undefined(w)&&(w=f(p,y)),s.request=u,s.timeout=l,s.agent=c,s.https&&("rejectUnauthorized"in s.https&&delete y.rejectUnauthorized,s.https.checkServerIdentity&&delete y.checkServerIdentity,s.https.certificateAuthority&&delete y.ca,s.https.certificate&&delete y.cert,s.https.key&&delete y.key,s.https.passphrase&&delete y.passphrase,s.https.pfx&&delete y.pfx),J9(w)?this._onRequest(w):this.writable?(this.once("finish",()=>{this._onResponse(w)}),this._unlockWrite(),this.end(),this._lockWrite()):this._onResponse(w)}catch(w){throw w instanceof nM.CacheError?new um(w,this):new et(w.message,w,this)}}async _error(e){try{for(let t of this.options.hooks.beforeError)e=await t(e)}catch(t){e=new et(t.message,t,this)}this.destroy(e)}_beforeError(e){if(this[Ec])return;let{options:t}=this,n=this.retryCount+1;this[Ec]=!0,e instanceof et||(e=new et(e.message,e,this));let i=e,{response:o}=i;(async()=>{if(o&&!o.body){o.setEncoding(this._readableState.encoding);try{o.rawBody=await V9.default(o),o.body=o.rawBody.toString()}catch{}}if(this.listenerCount("retry")!==0){let s;try{let a;o&&"retry-after"in o.headers&&(a=Number(o.headers["retry-after"]),Number.isNaN(a)?(a=Date.parse(o.headers["retry-after"])-Date.now(),a<=0&&(a=1)):a*=1e3),s=await t.retry.calculateDelay({attemptCount:n,retryOptions:t.retry,error:i,retryAfter:a,computedValue:K9.default({attemptCount:n,retryOptions:t.retry,error:i,retryAfter:a,computedValue:0})})}catch(a){this._error(new et(a.message,a,this));return}if(s){let a=async()=>{try{for(let c of this.options.hooks.beforeRetry)await c(this.options,i,n)}catch(c){this._error(new et(c.message,e,this));return}this.destroyed||(this.destroy(),this.emit("retry",n,e))};this[dM]=setTimeout(a,s);return}}this._error(i)})()}_read(){this[om]=!0;let e=this[sm];if(e&&!this[Ec]){e.readableLength&&(this[om]=!1);let t;for(;(t=e.read())!==null;){this[Ac]+=t.length,this[lM]=!0;let n=this.downloadProgress;n.percent<1&&this.emit("downloadProgress",n),this.push(t)}}}_write(e,t,n){let i=()=>{this._writeRequest(e,t,n)};this.requestInitialized?i():this[Bl].push(i)}_writeRequest(e,t,n){this[wt].destroyed||(this._progressCallbacks.push(()=>{this[Sc]+=Buffer.byteLength(e,t);let i=this.uploadProgress;i.percent<1&&this.emit("uploadProgress",i)}),this[wt].write(e,t,i=>{!i&&this._progressCallbacks.length>0&&this._progressCallbacks.shift()(),n(i)}))}_final(e){let t=()=>{for(;this._progressCallbacks.length!==0;)this._progressCallbacks.shift()();if(!(wt in this)){e();return}if(this[wt].destroyed){e();return}this[wt].end(n=>{n||(this[wc]=this[Sc],this.emit("uploadProgress",this.uploadProgress),this[wt].emit("upload-complete")),e(n)})};this.requestInitialized?t():this[Bl].push(t)}_destroy(e,t){var n;this[Ec]=!0,clearTimeout(this[dM]),wt in this&&(this[AI](),!((n=this[sm])===null||n===void 0)&&n.complete||this[wt].destroy()),e!==null&&!S.default.undefined(e)&&!(e instanceof et)&&(e=new et(e.message,e,this)),t(e)}get _isAboutToError(){return this[Ec]}get ip(){var e;return(e=this.socket)===null||e===void 0?void 0:e.remoteAddress}get aborted(){var e,t,n;return((t=(e=this[wt])===null||e===void 0?void 0:e.destroyed)!==null&&t!==void 0?t:this.destroyed)&&!(!((n=this[pM])===null||n===void 0)&&n.complete)}get socket(){var e,t;return(t=(e=this[wt])===null||e===void 0?void 0:e.socket)!==null&&t!==void 0?t:void 0}get downloadProgress(){let e;return this[_c]?e=this[Ac]/this[_c]:this[_c]===this[Ac]?e=1:e=0,{percent:e,transferred:this[Ac],total:this[_c]}}get uploadProgress(){let e;return this[wc]?e=this[Sc]/this[wc]:this[wc]===this[Sc]?e=1:e=0,{percent:e,transferred:this[Sc],total:this[wc]}}get timings(){var e;return(e=this[wt])===null||e===void 0?void 0:e.timings}get isFromCache(){return this[uM]}pipe(e,t){if(this[lM])throw new Error("Failed to pipe. The response has been emitted already.");return e instanceof II.ServerResponse&&this[im].add(e),super.pipe(e,t)}unpipe(e){return e instanceof II.ServerResponse&&this[im].delete(e),super.unpipe(e),this}};me.default=fm});var Wl=v(an=>{"use strict";var tX=an&&an.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),rX=an&&an.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&tX(e,r,t)};Object.defineProperty(an,"__esModule",{value:!0});an.CancelError=an.ParseError=void 0;var fM=Ul(),SI=class extends fM.RequestError{constructor(e,t){let{options:n}=t.request;super(`${e.message} in "${n.url.toString()}"`,e,t.request),this.name="ParseError",this.code=this.code==="ERR_GOT_REQUEST_ERROR"?"ERR_BODY_PARSE_FAILURE":this.code}};an.ParseError=SI;var EI=class extends fM.RequestError{constructor(e){super("Promise was canceled",{},e),this.name="CancelError",this.code="ERR_CANCELED"}get isCanceled(){return!0}};an.CancelError=EI;rX(Ul(),an)});var mM=v(xI=>{"use strict";Object.defineProperty(xI,"__esModule",{value:!0});var hM=Wl(),nX=(r,e,t,n)=>{let{rawBody:i}=r;try{if(e==="text")return i.toString(n);if(e==="json")return i.length===0?"":t(i.toString());if(e==="buffer")return i;throw new hM.ParseError({message:`Unknown body type '${e}'`,name:"Error"},r)}catch(o){throw new hM.ParseError(o,r)}};xI.default=nX});var PI=v(Ho=>{"use strict";var iX=Ho&&Ho.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),oX=Ho&&Ho.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&iX(e,r,t)};Object.defineProperty(Ho,"__esModule",{value:!0});var sX=H("events"),aX=xi(),cX=fD(),hm=Wl(),HM=mM(),gM=Ul(),uX=lI(),lX=gI(),yM=yI(),pX=["request","response","redirect","uploadProgress","downloadProgress"];function bM(r){let e,t,n=new sX.EventEmitter,i=new cX((s,a,c)=>{let u=l=>{let p=new gM.default(void 0,r);p.retryCount=l,p._noPipe=!0,c(()=>p.destroy()),c.shouldReject=!1,c(()=>a(new hm.CancelError(p))),e=p,p.once("response",async h=>{var m;if(h.retryCount=l,h.request.aborted)return;let y;try{y=await lX.default(p),h.rawBody=y}catch{return}if(p._isAboutToError)return;let w=((m=h.headers["content-encoding"])!==null&&m!==void 0?m:"").toLowerCase(),D=["gzip","deflate","br"].includes(w),{options:j}=p;if(D&&!j.decompress)h.body=y;else try{h.body=HM.default(h,j.responseType,j.parseJson,j.encoding)}catch(X){if(h.body=y.toString(),yM.isResponseOk(h)){p._beforeError(X);return}}try{for(let[X,B]of j.hooks.afterResponse.entries())h=await B(h,async Z=>{let O=gM.default.normalizeArguments(void 0,{...Z,retry:{calculateDelay:()=>0},throwHttpErrors:!1,resolveBodyOnly:!1},j);O.hooks.afterResponse=O.hooks.afterResponse.slice(0,X);for(let re of O.hooks.beforeRetry)await re(O);let G=bM(O);return c(()=>{G.catch(()=>{}),G.cancel()}),G})}catch(X){p._beforeError(new hm.RequestError(X.message,X,p));return}if(t=h,!yM.isResponseOk(h)){p._beforeError(new hm.HTTPError(h));return}p.destroy(),s(p.options.resolveBodyOnly?h.body:h)});let d=h=>{if(i.isCanceled)return;let{options:m}=p;if(h instanceof hm.HTTPError&&!m.throwHttpErrors){let{response:y}=h;s(p.options.resolveBodyOnly?y.body:y);return}a(h)};p.once("error",d);let f=p.options.body;p.once("retry",(h,m)=>{var y,w;if(f===((y=m.request)===null||y===void 0?void 0:y.options.body)&&aX.default.nodeStream((w=m.request)===null||w===void 0?void 0:w.options.body)){d(m);return}u(h)}),uX.default(p,n,pX)};u(0)});i.on=(s,a)=>(n.on(s,a),i);let o=s=>{let a=(async()=>{await i;let{options:c}=t.request;return HM.default(t,s,c.parseJson,c.encoding)})();return Object.defineProperties(a,Object.getOwnPropertyDescriptors(i)),a};return i.json=()=>{let{headers:s}=e.options;return!e.writableFinished&&s.accept===void 0&&(s.accept="application/json"),o("json")},i.buffer=()=>o("buffer"),i.text=()=>o("text"),i}Ho.default=bM;oX(Wl(),Ho)});var vM=v(LI=>{"use strict";Object.defineProperty(LI,"__esModule",{value:!0});var dX=Wl();function fX(r,...e){let t=(async()=>{if(r instanceof dX.RequestError)try{for(let i of e)if(i)for(let o of i)r=await o(r)}catch(i){r=i}throw r})(),n=()=>t;return t.json=n,t.text=n,t.buffer=n,t.on=n,t}LI.default=fX});var AM=v($I=>{"use strict";Object.defineProperty($I,"__esModule",{value:!0});var IM=xi();function _M(r){for(let e of Object.values(r))(IM.default.plainObject(e)||IM.default.array(e))&&_M(e);return Object.freeze(r)}$I.default=_M});var SM=v(wM=>{"use strict";Object.defineProperty(wM,"__esModule",{value:!0})});var CI=v(Fr=>{"use strict";var hX=Fr&&Fr.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),mX=Fr&&Fr.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&hX(e,r,t)};Object.defineProperty(Fr,"__esModule",{value:!0});Fr.defaultHandler=void 0;var EM=xi(),Br=PI(),HX=vM(),Hm=Ul(),gX=AM(),yX={RequestError:Br.RequestError,CacheError:Br.CacheError,ReadError:Br.ReadError,HTTPError:Br.HTTPError,MaxRedirectsError:Br.MaxRedirectsError,TimeoutError:Br.TimeoutError,ParseError:Br.ParseError,CancelError:Br.CancelError,UnsupportedProtocolError:Br.UnsupportedProtocolError,UploadError:Br.UploadError},bX=async r=>new Promise(e=>{setTimeout(e,r)}),{normalizeArguments:mm}=Hm.default,xM=(...r)=>{let e;for(let t of r)e=mm(void 0,t,e);return e},vX=r=>r.isStream?new Hm.default(void 0,r):Br.default(r),IX=r=>"defaults"in r&&"options"in r.defaults,_X=["get","post","put","patch","head","delete"];Fr.defaultHandler=(r,e)=>e(r);var PM=(r,e)=>{if(r)for(let t of r)t(e)},LM=r=>{r._rawHandlers=r.handlers,r.handlers=r.handlers.map(n=>(i,o)=>{let s,a=n(i,c=>(s=o(c),s));if(a!==s&&!i.isStream&&s){let c=a,{then:u,catch:l,finally:p}=c;Object.setPrototypeOf(c,Object.getPrototypeOf(s)),Object.defineProperties(c,Object.getOwnPropertyDescriptors(s)),c.then=u,c.catch=l,c.finally=p}return a});let e=(n,i={},o)=>{var s,a;let c=0,u=l=>r.handlers[c++](l,c===r.handlers.length?vX:u);if(EM.default.plainObject(n)){let l={...n,...i};Hm.setNonEnumerableProperties([n,i],l),i=l,n=void 0}try{let l;try{PM(r.options.hooks.init,i),PM((s=i.hooks)===null||s===void 0?void 0:s.init,i)}catch(d){l=d}let p=mm(n,i,o??r.options);if(p[Hm.kIsNormalizedAlready]=!0,l)throw new Br.RequestError(l.message,l,p);return u(p)}catch(l){if(i.isStream)throw l;return HX.default(l,r.options.hooks.beforeError,(a=i.hooks)===null||a===void 0?void 0:a.beforeError)}};e.extend=(...n)=>{let i=[r.options],o=[...r._rawHandlers],s;for(let a of n)IX(a)?(i.push(a.defaults.options),o.push(...a.defaults._rawHandlers),s=a.defaults.mutableDefaults):(i.push(a),"handlers"in a&&o.push(...a.handlers),s=a.mutableDefaults);return o=o.filter(a=>a!==Fr.defaultHandler),o.length===0&&o.push(Fr.defaultHandler),LM({options:xM(...i),handlers:o,mutableDefaults:!!s})};let t=async function*(n,i){let o=mm(n,i,r.options);o.resolveBodyOnly=!1;let s=o.pagination;if(!EM.default.object(s))throw new TypeError("`options.pagination` must be implemented");let a=[],{countLimit:c}=s,u=0;for(;u{let o=[];for await(let s of t(n,i))o.push(s);return o},e.paginate.each=t,e.stream=(n,i)=>e(n,{...i,isStream:!0});for(let n of _X)e[n]=(i,o)=>e(i,{...o,method:n}),e.stream[n]=(i,o)=>e(i,{...o,method:n,isStream:!0});return Object.assign(e,yX),Object.defineProperty(e,"defaults",{value:r.mutableDefaults?r:gX.default(r),writable:r.mutableDefaults,configurable:r.mutableDefaults,enumerable:!0}),e.mergeOptions=xM,e};Fr.default=LM;mX(SM(),Fr)});var DM=v((Pi,gm)=>{"use strict";var AX=Pi&&Pi.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),$M=Pi&&Pi.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&AX(e,r,t)};Object.defineProperty(Pi,"__esModule",{value:!0});var wX=H("url"),CM=CI(),SX={options:{method:"GET",retry:{limit:2,methods:["GET","PUT","HEAD","DELETE","OPTIONS","TRACE"],statusCodes:[408,413,429,500,502,503,504,521,522,524],errorCodes:["ETIMEDOUT","ECONNRESET","EADDRINUSE","ECONNREFUSED","EPIPE","ENOTFOUND","ENETUNREACH","EAI_AGAIN"],maxRetryAfter:void 0,calculateDelay:({computedValue:r})=>r},timeout:{},headers:{"user-agent":"got (https://github.com/sindresorhus/got)"},hooks:{init:[],beforeRequest:[],beforeRedirect:[],beforeRetry:[],beforeError:[],afterResponse:[]},cache:void 0,dnsCache:void 0,decompress:!0,throwHttpErrors:!0,followRedirect:!0,isStream:!1,responseType:"text",resolveBodyOnly:!1,maxRedirects:10,prefixUrl:"",methodRewriting:!0,ignoreInvalidCookies:!1,context:{},http2:!1,allowGetBody:!1,https:void 0,pagination:{transform:r=>r.request.options.responseType==="json"?r.body:JSON.parse(r.body),paginate:r=>{if(!Reflect.has(r.headers,"link"))return!1;let e=r.headers.link.split(","),t;for(let n of e){let i=n.split(";");if(i[1].includes("next")){t=i[0].trimStart().trim(),t=t.slice(1,-1);break}}return t?{url:new wX.URL(t)}:!1},filter:()=>!0,shouldContinue:()=>!0,countLimit:1/0,backoff:0,requestLimit:1e4,stackAllItems:!0},parseJson:r=>JSON.parse(r),stringifyJson:r=>JSON.stringify(r),cacheOptions:{}},handlers:[CM.defaultHandler],mutableDefaults:!1},DI=CM.default(SX);Pi.default=DI;gm.exports=DI;gm.exports.default=DI;gm.exports.__esModule=!0;$M(CI(),Pi);$M(PI(),Pi)});async function TI(){if(WM.default.platform!=="darwin")throw new Error("macOS only");let{stdout:r}=await LX("defaults",["read","com.apple.LaunchServices/com.apple.launchservices.secure","LSHandlers"]);return/LSHandlerRoleAll = "(?!-)(?[^"]+?)";\s+?LSHandlerURLScheme = (?:http|https);/.exec(r)?.groups.id??"com.apple.Safari"}var UM,WM,jM,LX,VM=zs(()=>{UM=H("node:util"),WM=_(H("node:process"),1),jM=H("node:child_process"),LX=(0,UM.promisify)(jM.execFile)});async function KM(r,{humanReadableOutput:e=!0}={}){if(qM.default.platform!=="darwin")throw new Error("macOS only");let t=e?[]:["-ss"],{stdout:n}=await $X("osascript",["-e",r,t]);return n.trim()}var qM,GM,MI,$X,XM=zs(()=>{qM=_(H("node:process"),1),GM=H("node:util"),MI=H("node:child_process"),$X=(0,GM.promisify)(MI.execFile)});async function RI(r){return KM(`tell application "Finder" to set app_path to application file id "${r}" as string +tell application "System Events" to get value of property list item "CFBundleName" of property list file (app_path & ":Contents:Info.plist")`)}var zM=zs(()=>{XM()});async function kI(r=CX){let{stdout:e}=await r("reg",["QUERY"," HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations\\http\\UserChoice","/v","ProgId"]),t=/ProgId\s*REG_SZ\s*(?\S+)/.exec(e);if(!t)throw new vm(`Cannot find Windows browser in stdout: ${JSON.stringify(e)}`);let{id:n}=t.groups,i=DX[n];if(!i)throw new vm(`Unknown browser ID: ${n}`);return i}var JM,YM,CX,DX,vm,QM=zs(()=>{JM=H("node:util"),YM=H("node:child_process"),CX=(0,JM.promisify)(YM.execFile),DX={AppXq0fevzme2pys62n3e0fbqa7peapykr8v:{name:"Edge",id:"com.microsoft.edge.old"},MSEdgeDHTML:{name:"Edge",id:"com.microsoft.edge"},MSEdgeHTM:{name:"Edge",id:"com.microsoft.edge"},"IE.HTTP":{name:"Internet Explorer",id:"com.microsoft.ie"},FirefoxURL:{name:"Firefox",id:"org.mozilla.firefox"},ChromeHTML:{name:"Chrome",id:"com.google.chrome"},BraveHTML:{name:"Brave",id:"com.brave.Browser"},BraveBHTML:{name:"Brave Beta",id:"com.brave.Browser.beta"},BraveSSHTM:{name:"Brave Nightly",id:"com.brave.Browser.nightly"}},vm=class extends Error{}});var rR={};VO(rR,{default:()=>tR});async function tR(){if(Im.default.platform==="darwin"){let r=await TI();return{name:await RI(r),id:r}}if(Im.default.platform==="linux"){let{stdout:r}=await TX("xdg-mime",["query","default","x-scheme-handler/http"]),e=r.trim();return{name:MX(e.replace(/.desktop$/,"").replace("-"," ")),id:e}}if(Im.default.platform==="win32")return kI();throw new Error("Only macOS, Linux, and Windows are supported")}var ZM,Im,eR,TX,MX,nR=zs(()=>{ZM=H("node:util"),Im=_(H("node:process"),1),eR=H("node:child_process");VM();zM();QM();TX=(0,ZM.promisify)(eR.execFile),MX=r=>r.toLowerCase().replaceAll(/(?:^|\s|-)\S/g,e=>e.toUpperCase())});var cR=v((gfe,aR)=>{"use strict";function kX(r){var e=new r,t=e;function n(){var o=e;return o.next?e=o.next:(e=new r,t=e),o.next=null,o}function i(o){t.next=o,t=o}return{get:n,release:i}}aR.exports=kX});var lR=v((yfe,NI)=>{"use strict";var OX=cR();function uR(r,e,t){if(typeof r=="function"&&(t=e,e=r,r=null),t<1)throw new Error("fastqueue concurrency must be greater than 1");var n=OX(NX),i=null,o=null,s=0,a=null,c={push:m,drain:jr,saturated:jr,pause:l,paused:!1,concurrency:t,running:u,resume:f,idle:h,length:p,getQueue:d,unshift:y,empty:jr,kill:D,killAndDrain:j,error:X};return c;function u(){return s}function l(){c.paused=!0}function p(){for(var B=i,Z=0;B;)B=B.next,Z++;return Z}function d(){for(var B=i,Z=[];B;)Z.push(B.value),B=B.next;return Z}function f(){if(c.paused){c.paused=!1;for(var B=0;B{pR.exports=function(r,e){if(typeof r!="string")throw new TypeError("expected path to be a string");if(r==="\\"||r==="/")return"/";var t=r.length;if(t<=1)return r;var n="";if(t>4&&r[3]==="\\"){var i=r[2];(i==="?"||i===".")&&r.slice(0,2)==="\\\\"&&(r=r.slice(2),n="//")}var o=r.split(/[/\\]+/);return e!==!1&&o[o.length-1]===""&&o.pop(),n+o.join("/")}});var gR=v((mR,HR)=>{"use strict";Object.defineProperty(mR,"__esModule",{value:!0});var hR=qy(),FX=BI(),dR="!",UX={returnIndex:!1},WX=r=>Array.isArray(r)?r:[r],jX=(r,e)=>{if(typeof r=="function")return r;if(typeof r=="string"){let t=hR(r,e);return n=>r===n||t(n)}return r instanceof RegExp?t=>r.test(t):t=>!1},fR=(r,e,t,n)=>{let i=Array.isArray(t),o=i?t[0]:t;if(!i&&typeof o!="string")throw new TypeError("anymatch: second argument must be a string: got "+Object.prototype.toString.call(o));let s=FX(o,!1);for(let c=0;c{if(r==null)throw new TypeError("anymatch: specify first argument");let n=typeof t=="boolean"?{returnIndex:t}:t,i=n.returnIndex||!1,o=WX(r),s=o.filter(c=>typeof c=="string"&&c.charAt(0)===dR).map(c=>c.slice(1)).map(c=>hR(c,n)),a=o.filter(c=>typeof c!="string"||typeof c=="string"&&c.charAt(0)!==dR).map(c=>jX(c,n));return e==null?(c,u=!1)=>fR(a,s,c,typeof u=="boolean"?u:!1):fR(a,s,e,i)};FI.default=FI;HR.exports=FI});var bR=v((vfe,yR)=>{yR.exports=typeof queueMicrotask=="function"?queueMicrotask:r=>Promise.resolve().then(r)});var IR=v((Ife,vR)=>{vR.exports=typeof process<"u"&&typeof process.nextTick=="function"?process.nextTick.bind(process):bR()});var AR=v((Afe,_R)=>{_R.exports=class{constructor(e){if(!(e>0)||e-1&e)throw new Error("Max size for a FixedFIFO should be a power of two");this.buffer=new Array(e),this.mask=e-1,this.top=0,this.btm=0,this.next=null}clear(){this.top=this.btm=0,this.next=null,this.buffer.fill(void 0)}push(e){return this.buffer[this.top]!==void 0?!1:(this.buffer[this.top]=e,this.top=this.top+1&this.mask,!0)}shift(){let e=this.buffer[this.btm];if(e!==void 0)return this.buffer[this.btm]=void 0,this.btm=this.btm+1&this.mask,e}peek(){return this.buffer[this.btm]}isEmpty(){return this.buffer[this.btm]===void 0}}});var ER=v((Sfe,SR)=>{var wR=AR();SR.exports=class{constructor(e){this.hwm=e||16,this.head=new wR(this.hwm),this.tail=this.head,this.length=0}clear(){this.head=this.tail,this.head.clear(),this.length=0}push(e){if(this.length++,!this.head.push(e)){let t=this.head;this.head=t.next=new wR(2*this.head.buffer.length),this.head.push(e)}}shift(){this.length!==0&&this.length--;let e=this.tail.shift();if(e===void 0&&this.tail.next){let t=this.tail.next;return this.tail.next=null,this.tail=t,this.tail.shift()}return e}peek(){let e=this.tail.peek();return e===void 0&&this.tail.next?this.tail.next.peek():e}isEmpty(){return this.length===0}}});var zR=v((Efe,XR)=>{var{EventEmitter:VX}=H("events"),Lm=new Error("Stream was destroyed"),UI=new Error("Premature close"),CR=IR(),DR=ER(),ot=(1<<27)-1,Ds=1,XI=2,Ls=4,Vl=8,TR=ot^Ds,qX=ot^XI,Yl=16,ql=32,Mc=64,bo=128,Gl=256,zI=512,$s=1024,WI=2048,JI=4096,YI=8192,cn=16384,$c=32768,$m=65536,MR=Gl|zI,GX=Yl|$m,KX=Mc|Yl,XX=JI|bo,zX=ot^Yl,JX=ot^Mc,YX=ot^(Mc|$m),QX=ot^$m,ZX=ot^Gl,ez=ot^(bo|YI),tz=ot^$s,xR=ot^MR,RR=ot^$c,rz=ot^ql,vo=1<<17,Dc=2<<17,Ql=4<<17,Cs=8<<17,Zl=16<<17,Ts=32<<17,jI=64<<17,Cc=128<<17,QI=256<<17,Tc=512<<17,kR=ot^(vo|QI),OR=ot^Ql,nz=ot^Tc,iz=ot^Zl,oz=ot^Cs,NR=ot^Cc,sz=ot^Dc,Kl=Yl|vo,BR=ot^Kl,ZI=cn|Ts,Li=Ls|Vl|XI,Hr=Li|Ds,FR=Li|ZI,az=OR&JX,e_=Cc|$c,cz=e_&BR,UR=Hr|cz,uz=Hr|$s|cn,PR=Hr|cn|bo,lz=Hr|$s|bo,pz=Hr|JI|bo|YI,dz=Hr|Yl|$s|cn|$m,fz=Li|$s|cn,hz=ql|Hr|$c|Mc,mz=Hr|Tc|Ts,Hz=Cs|Zl,WR=Cs|vo,gz=Cs|Zl|Hr|vo,LR=Hr|vo|Cs,yz=Ql|vo,bz=vo|QI,vz=Hr|Tc|WR|Ts,Iz=Zl|Li|Tc|Ts,_z=Dc|Hr|Cc|Ql,wm=Symbol.asyncIterator||Symbol("asyncIterator"),Sm=class{constructor(e,{highWaterMark:t=16384,map:n=null,mapWritable:i,byteLength:o,byteLengthWritable:s}={}){this.stream=e,this.queue=new DR,this.highWaterMark=t,this.buffered=0,this.error=null,this.pipeline=null,this.drains=null,this.byteLength=s||o||KR,this.map=i||n,this.afterWrite=Sz.bind(this),this.afterUpdateNextTick=Pz.bind(this)}get ended(){return(this.stream._duplexState&Ts)!==0}push(e){return this.map!==null&&(e=this.map(e)),this.buffered+=this.byteLength(e),this.queue.push(e),this.buffered0;)t.push(this.shift());for(let n=0;n0;)n.drains.shift().resolve(!1);n.pipeline!==null&&n.pipeline.done(e,r)}}function Sz(r){let e=this.stream;r&&e.destroy(r),e._duplexState&=kR,this.drains!==null&&Lz(this.drains),(e._duplexState&gz)===Zl&&(e._duplexState&=iz,(e._duplexState&jI)===jI&&e.emit("drain")),this.updateCallback()}function Ez(r){r&&this.stream.destroy(r),this.stream._duplexState&=zX,this.updateCallback()}function xz(){this.stream._duplexState&ql||(this.stream._duplexState&=RR,this.update())}function Pz(){this.stream._duplexState&Dc||(this.stream._duplexState&=NR,this.update())}function Lz(r){for(let e=0;e=e._readableState.highWaterMark}static isPaused(e){return(e._duplexState&Gl)===0}[wm](){let e=this,t=null,n=null,i=null;return this.on("error",u=>{t=u}),this.on("readable",o),this.on("close",s),{[wm](){return this},next(){return new Promise(function(u,l){n=u,i=l;let p=e.read();p!==null?a(p):e._duplexState&Vl&&a(null)})},return(){return c(null)},throw(u){return c(u)}};function o(){n!==null&&a(e.read())}function s(){n!==null&&a(null)}function a(u){i!==null&&(t?i(t):u===null&&!(e._duplexState&cn)?i(Lm):n({value:u,done:u===null}),i=n=null)}function c(u){return e.destroy(u),new Promise((l,p)=>{if(e._duplexState&Vl)return l({value:void 0,done:!0});e.once("close",function(){u?p(u):l({value:void 0,done:!0})})})}}},xm=class extends Xl{constructor(e){super(e),this._duplexState|=Ds|cn,this._writableState=new Sm(this,e),e&&(e.writev&&(this._writev=e.writev),e.write&&(this._write=e.write),e.final&&(this._final=e.final),e.eagerOpen&&this._writableState.updateNextTick())}_writev(e,t){t(null)}_write(e,t){this._writableState.autoBatch(e,t)}_final(e){e(null)}static isBackpressured(e){return(e._duplexState&Iz)!==0}static drained(e){if(e.destroyed)return Promise.resolve(!1);let t=e._writableState,i=(Nz(e)?Math.min(1,t.queue.length):t.queue.length)+(e._duplexState&QI?1:0);return i===0?Promise.resolve(!0):(t.drains===null&&(t.drains=[]),new Promise(o=>{t.drains.push({writes:i,resolve:o})}))}write(e){return this._writableState.updateNextTick(),this._writableState.push(e)}end(e){return this._writableState.updateNextTick(),this._writableState.end(e),this}},zl=class extends Em{constructor(e){super(e),this._duplexState=Ds,this._writableState=new Sm(this,e),e&&(e.writev&&(this._writev=e.writev),e.write&&(this._write=e.write),e.final&&(this._final=e.final))}_writev(e,t){t(null)}_write(e,t){this._writableState.autoBatch(e,t)}_final(e){e(null)}write(e){return this._writableState.updateNextTick(),this._writableState.push(e)}end(e){return this._writableState.updateNextTick(),this._writableState.end(e),this}},Pm=class extends zl{constructor(e){super(e),this._transformState=new qI(this),e&&(e.transform&&(this._transform=e.transform),e.flush&&(this._flush=e.flush))}_write(e,t){this._readableState.buffered>=this._readableState.highWaterMark?this._transformState.data=e:this._transform(e,this._transformState.afterTransform)}_read(e){if(this._transformState.data!==null){let t=this._transformState.data;this._transformState.data=null,e(null),this._transform(t,this._transformState.afterTransform)}else e(null)}destroy(e){super.destroy(e),this._transformState.data!==null&&(this._transformState.data=null,this._transformState.afterTransform())}_transform(e,t){t(null,e)}_flush(e){e(null)}_final(e){this._transformState.afterFinal=e,this._flush(Dz.bind(this))}},KI=class extends Pm{};function Dz(r,e){let t=this._transformState.afterFinal;if(r)return t(r);e!=null&&this.push(e),this.push(null),t(null)}function Tz(...r){return new Promise((e,t)=>qR(...r,n=>{if(n)return t(n);e()}))}function qR(r,...e){let t=Array.isArray(r)?[...r,...e]:[r,...e],n=t.length&&typeof t[t.length-1]=="function"?t.pop():null;if(t.length<2)throw new Error("Pipeline requires at least 2 streams");let i=t[0],o=null,s=null;for(let u=1;u1,c),i.pipe(o)),i=o;if(n){let u=!1,l=Jl(o)||!!(o._writableState&&o._writableState.autoDestroy);o.on("error",p=>{s===null&&(s=p)}),o.on("finish",()=>{u=!0,l||n(s)}),l&&o.on("close",()=>n(s||(u?null:UI)))}return o;function a(u,l,p,d){u.on("error",d),u.on("close",f);function f(){if(l&&u._readableState&&!u._readableState.ended||p&&u._writableState&&!u._writableState.ended)return d(UI)}}function c(u){if(!(!u||s)){s=u;for(let l of t)l.destroy(u)}}}function GR(r){return!!r._readableState||!!r._writableState}function Jl(r){return typeof r._duplexState=="number"&&GR(r)}function Mz(r){let e=r._readableState&&r._readableState.error||r._writableState&&r._writableState.error;return e===Lm?null:e}function Rz(r){return Jl(r)&&r.readable}function kz(r){return typeof r=="object"&&r!==null&&typeof r.byteLength=="number"}function KR(r){return kz(r)?r.byteLength:1024}function $R(){}function Oz(){this.destroy(new Error("Stream aborted."))}function Nz(r){return r._writev!==xm.prototype._writev&&r._writev!==zl.prototype._writev}XR.exports={pipeline:qR,pipelinePromise:Tz,isStream:GR,isStreamx:Jl,getStreamError:Mz,Stream:Xl,Writable:xm,Readable:Em,Duplex:zl,Transform:Pm,PassThrough:KI}});var YR=v((xfe,JR)=>{JR.exports=function(e){if(typeof e!="string"||e==="")return!1;for(var t;t=/(\\).|([@?!+*]\(.*\))/g.exec(e);){if(t[2])return!0;e=e.slice(t.index+t[0].length)}return!1}});var t_=v((Pfe,ZR)=>{var Bz=YR(),QR={"{":"}","(":")","[":"]"},Fz=function(r){if(r[0]==="!")return!0;for(var e=0,t=-2,n=-2,i=-2,o=-2,s=-2;ee&&(s===-1||s>n||(s=r.indexOf("\\",e),s===-1||s>n)))||i!==-1&&r[e]==="{"&&r[e+1]!=="}"&&(i=r.indexOf("}",e),i>e&&(s=r.indexOf("\\",e),s===-1||s>i))||o!==-1&&r[e]==="("&&r[e+1]==="?"&&/[:!=]/.test(r[e+2])&&r[e+3]!==")"&&(o=r.indexOf(")",e),o>e&&(s=r.indexOf("\\",e),s===-1||s>o))||t!==-1&&r[e]==="("&&r[e+1]!=="|"&&(tt&&(s=r.indexOf("\\",t),s===-1||s>o))))return!0;if(r[e]==="\\"){var a=r[e+1];e+=2;var c=QR[a];if(c){var u=r.indexOf(c,e);u!==-1&&(e=u+1)}if(r[e]==="!")return!0}else e++}return!1},Uz=function(r){if(r[0]==="!")return!0;for(var e=0;e{"use strict";var Wz=t_(),jz=H("path").posix.dirname,Vz=H("os").platform()==="win32",Cm="/",qz=/\\/g,Gz=/\\([!*?|[\](){}])/g;ek.exports=function(e,t){var n=Object.assign({flipBackslashes:!0},t);n.flipBackslashes&&Vz&&e.indexOf(Cm)<0&&(e=e.replace(qz,Cm)),Kz(e)&&(e+=Cm),e+="a";do e=jz(e);while(Xz(e));return e.replace(Gz,"$1")};function Kz(r){var e=r.slice(-1),t;switch(e){case"}":t="{";break;case"]":t="[";break;default:return!1}var n=r.indexOf(t);return n<0?!1:r.slice(n+1,-1).includes(Cm)}function Xz(r){return/\([^()]+$/.test(r)||r[0]==="{"||r[0]==="["||/[^\\][{[]/.test(r)?!0:Wz(r)}});var Dm=v(($fe,rk)=>{"use strict";rk.exports=function(r){if(typeof r!="string")throw new TypeError("expected a string");var e={negated:!1,pattern:r,original:r};return r.charAt(0)==="!"&&r.charAt(1)!=="("&&(e.negated=!0,e.pattern=r.slice(1)),e}});var ak=v((Cfe,sk)=>{"use strict";var Tm=H("path"),zz=Dm();sk.exports=function(r,e){var t=e||{},n=ik(t.cwd?t.cwd:process.cwd());n=Tm.resolve(n),n=r_(n),n=nk(n);var i=t.root;i&&(i=ik(i),i=r_(i),(process.platform==="win32"||!Tm.isAbsolute(i))&&(i=r_(Tm.resolve(i))),i=nk(i));var o=r.slice(-1),s=zz(r);return r=s.pattern,r.slice(0,2)==="./"&&(r=r.slice(2)),r.length===1&&r==="."&&(r=""),i&&r.charAt(0)==="/"?r=ok(i,r):(!Tm.isAbsolute(r)||r.slice(0,1)==="\\")&&(r=ok(n,r)),o==="/"&&r.slice(-1)!=="/"&&(r+="/"),s.negated?"!"+r:r};function nk(r){return r.replace(/([({[\]})*?!])/g,"\\$1")}function ik(r){return r.replace(/\\([({[\]})*?!])/g,"$1")}function r_(r){return r.replace(/\\/g,"/")}function ok(r,e){if(r.charAt(r.length-1)==="/"&&(r=r.slice(0,-1)),e.charAt(0)==="/"&&(e=e.slice(1)),!e)return r;for(;e.slice(0,3)==="../";)r=r.slice(0,r.lastIndexOf("/")),e=e.slice(3);return r+"/"+e}});var lk=v((Dfe,uk)=>{"use strict";var Jz=H("fs"),n_=H("path"),Yz=H("events"),Qz=lR(),Zz=gR(),e6=zR().Readable,t6=t_(),r6=tk(),ck=BI(),n6=Dm(),i6=ak(),o6="File not found with singular glob: ",s6=" (if this was purposeful, use `allowEmpty` option)";function a6(r){return t6(r)}function c6(){var r={withFileTypes:!0},e=new Yz,t=Qz(i,1);t.drain=function(){e.emit("end")},t.error(n);function n(o){o&&e.emit("error",o)}e.pause=function(){t.pause()},e.resume=function(){t.resume()},e.end=function(){t.kill()},e.walk=function(o){t.push(o)};function i(o,s){Jz.readdir(o,r,a);function a(u,l){if(u)return s(u);l.forEach(c),s()}function c(u){var l=n_.join(o,u.name);e.emit("path",l,u),u.isDirectory()&&t.push(l)}}return e}function u6(r){var e=!1;r.forEach(t);function t(n,i){if(typeof n!="string")throw new Error("Invalid glob at index "+i);var o=n6(n);o.negated===!1&&(e=!0)}if(e===!1)throw new Error("Missing positive glob")}function l6(r){if(typeof r.cwd!="string")throw new Error("The `cwd` option must be a string");if(typeof r.dot!="boolean")throw new Error("The `dot` option must be a boolean");if(typeof r.cwdbase!="boolean")throw new Error("The `cwdbase` option must be a boolean");if(typeof r.uniqueBy!="string"&&typeof r.uniqueBy!="function")throw new Error("The `uniqueBy` option must be a string or function");if(typeof r.allowEmpty!="boolean")throw new Error("The `allowEmpty` option must be a boolean");if(r.base&&typeof r.base!="string")throw new Error("The `base` option must be a string if specified");if(!Array.isArray(r.ignore))throw new Error("The `ignore` option must be a string or array")}function p6(r){var e=new Set;if(typeof r=="string")return n;return i;function t(o){return e.has(o)?!1:(e.add(o),!0)}function n(o){return t(o[r])}function i(o){return t(r(o))}}function d6(r,e){Array.isArray(r)||(r=[r]),u6(r);var t=Object.assign({},{cwd:process.cwd(),dot:!1,cwdbase:!1,uniqueBy:"path",allowEmpty:!1,ignore:[]},e);t.ignore=typeof t.ignore=="string"?[t.ignore]:t.ignore,l6(t),t.cwd=ck(n_.resolve(t.cwd),!0);var n=t.base;t.cwdbase&&(n=t.cwd);var i=c6(),o=new e6({highWaterMark:t.highWaterMark,read:l,predestroy:p}),s=r.map(d);t.ignore=t.ignore.map(d);var a=s.map(a6),c=Zz(s,null,t),u=p6(t.uniqueBy);i.on("path",f),i.once("end",h),i.once("error",m),i.walk(t.cwd);function l(y){i.resume(),y()}function p(){i.end()}function d(y){return i6(y,t)}function f(y,w){var D=c(y,!0);if(D===-1&&w.isDirectory()&&(D=c(y+n_.sep,!0)),D!==-1){a[D]=!0;var j=n||r6(s[D]),X={cwd:t.cwd,base:j,path:ck(y,!0)},B=u(X);if(B){var Z=o.push(X);Z||i.pause()}}}function h(){var y=!1;a.forEach(function(w,D){if(t.allowEmpty!==!0&&!w){y=!0;var j=new Error(o6+s[D]+s6);return o.destroy(j)}}),y===!1&&o.push(null)}function m(y){o.destroy(y)}return o}uk.exports=d6});var dk=v((Mfe,pk)=>{"use strict";pk.exports=function(){return/^[\\\/]{2,}[^\\\/]+[\\\/]+[^\\\/]+/}});var hk=v((Rfe,fk)=>{"use strict";var f6=dk()();fk.exports=function(r){if(typeof r!="string")throw new TypeError("expected a string");return f6.test(r)}});var Hk=v((kfe,mk)=>{"use strict";var h6=hk();mk.exports=function(e){if(typeof e!="string")throw new TypeError("expected filepath to be a string");return!h6(e)&&!/^([a-z]:)?[\\\/]/i.test(e)}});var gk=v((i_,o_)=>{(function(r){i_&&typeof i_=="object"&&typeof o_<"u"?o_.exports=r():typeof define=="function"&&define.amd?define([],r):typeof window<"u"?window.isWindows=r():typeof global<"u"?global.isWindows=r():typeof self<"u"?self.isWindows=r():this.isWindows=r()})(function(){"use strict";return function(){return process&&(process.platform==="win32"||/^(msys|cygwin)$/.test(process.env.OSTYPE))}})});var bk=v((Ofe,yk)=>{"use strict";var m6=Hk(),H6=gk();yk.exports=ep;function ep(r){if(typeof r!="string")throw new TypeError("isAbsolute expects a string.");return H6()?ep.win32(r):ep.posix(r)}ep.posix=function(e){return e.charAt(0)==="/"};ep.win32=function(e){return/[a-z]/i.test(e.charAt(0))&&e.charAt(1)===":"&&e.charAt(2)==="\\"||e.slice(0,2)==="\\\\"?!0:!m6(e)}});var Ek=v((Nfe,Sk)=>{"use strict";var vk=H("path"),g6=Dm(),Ik=bk();Sk.exports=function(r,e){var t=e||{},n=Ak(t.cwd?t.cwd:process.cwd());n=vk.resolve(n),n=s_(n),n=_k(n);var i=t.root;i&&(i=Ak(i),i=s_(i),(process.platform==="win32"||!Ik(i))&&(i=s_(vk.resolve(i))),i=_k(i)),r.slice(0,2)==="./"&&(r=r.slice(2)),r.length===1&&r==="."&&(r="");var o=r.slice(-1),s=g6(r);return r=s.pattern,i&&r.charAt(0)==="/"?r=wk(i,r):(!Ik(r)||r.slice(0,1)==="\\")&&(r=wk(n,r)),o==="/"&&r.slice(-1)!=="/"&&(r+="/"),s.negated?"!"+r:r};function _k(r){return r.replace(/([({[\]})*?!])/g,"\\$1")}function Ak(r){return r.replace(/\\([({[\]})*?!])/g,"$1")}function s_(r){return r.replace(/\\/g,"/")}function wk(r,e){return r.charAt(r.length-1)==="/"&&(r=r.slice(0,-1)),e.charAt(0)==="/"&&(e=e.slice(1)),e?r+"/"+e:r}});var i1,n1=zs(()=>{i1="./w32appcontainertokens-LVKSWXR7.node"});var s1=v((lge,o1)=>{n1();try{o1.exports=H(i1)}catch{}});var c1=v(Xm=>{"use strict";Object.defineProperty(Xm,"__esModule",{value:!0});Xm.getAppContainerProcessTokens=void 0;var P6=H("path"),a1,L6=()=>{if(process.platform==="win32")return a1??=s1(),a1},$6=r=>L6()?.getAppContainerProcessTokens().map(e=>(0,P6.join)(e,r));Xm.getAppContainerProcessTokens=$6});var S1=v((lbe,N6)=>{N6.exports={name:"dotenv",version:"16.4.1",description:"Loads environment variables from .env file",main:"lib/main.js",types:"lib/main.d.ts",exports:{".":{types:"./lib/main.d.ts",require:"./lib/main.js",default:"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},scripts:{"dts-check":"tsc --project tests/types/tsconfig.json",lint:"standard","lint-readme":"standard-markdown",pretest:"npm run lint && npm run dts-check",test:"tap tests/*.js --100 -Rspec",prerelease:"npm test",release:"standard-version"},repository:{type:"git",url:"git://github.com/motdotla/dotenv.git"},funding:"https://github.com/motdotla/dotenv?sponsor=1",keywords:["dotenv","env",".env","environment","variables","config","settings"],readmeFilename:"README.md",license:"BSD-2-Clause",devDependencies:{"@definitelytyped/dtslint":"^0.0.133","@types/node":"^18.11.3",decache:"^4.6.1",sinon:"^14.0.1",standard:"^17.0.0","standard-markdown":"^7.1.0","standard-version":"^9.5.0",tap:"^16.3.0",tar:"^6.1.11",typescript:"^4.8.4"},engines:{node:">=12"},browser:{fs:!1}}});var P1=v((pbe,Mi)=>{var oH=H("fs"),v_=H("path"),B6=H("os"),F6=H("crypto"),U6=S1(),I_=U6.version,W6=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function j6(r){let e={},t=r.toString();t=t.replace(/\r\n?/mg,` +`);let n;for(;(n=W6.exec(t))!=null;){let i=n[1],o=n[2]||"";o=o.trim();let s=o[0];o=o.replace(/^(['"`])([\s\S]*)\1$/mg,"$2"),s==='"'&&(o=o.replace(/\\n/g,` +`),o=o.replace(/\\r/g,"\r")),e[i]=o}return e}function V6(r){let e=x1(r),t=bt.configDotenv({path:e});if(!t.parsed){let s=new Error(`MISSING_DATA: Cannot parse ${e} for an unknown reason`);throw s.code="MISSING_DATA",s}let n=E1(r).split(","),i=n.length,o;for(let s=0;s=i)throw a}return bt.parse(o)}function q6(r){console.log(`[dotenv@${I_}][INFO] ${r}`)}function G6(r){console.log(`[dotenv@${I_}][WARN] ${r}`)}function sH(r){console.log(`[dotenv@${I_}][DEBUG] ${r}`)}function E1(r){return r&&r.DOTENV_KEY&&r.DOTENV_KEY.length>0?r.DOTENV_KEY:process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0?process.env.DOTENV_KEY:""}function K6(r,e){let t;try{t=new URL(e)}catch(a){if(a.code==="ERR_INVALID_URL"){let c=new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenv.org/vault/.env.vault?environment=development");throw c.code="INVALID_DOTENV_KEY",c}throw a}let n=t.password;if(!n){let a=new Error("INVALID_DOTENV_KEY: Missing key part");throw a.code="INVALID_DOTENV_KEY",a}let i=t.searchParams.get("environment");if(!i){let a=new Error("INVALID_DOTENV_KEY: Missing environment part");throw a.code="INVALID_DOTENV_KEY",a}let o=`DOTENV_VAULT_${i.toUpperCase()}`,s=r.parsed[o];if(!s){let a=new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${o} in your .env.vault file.`);throw a.code="NOT_FOUND_DOTENV_ENVIRONMENT",a}return{ciphertext:s,key:n}}function x1(r){let e=null;if(r&&r.path&&r.path.length>0)if(Array.isArray(r.path))for(let t of r.path)oH.existsSync(t)&&(e=t.endsWith(".vault")?t:`${t}.vault`);else e=r.path.endsWith(".vault")?r.path:`${r.path}.vault`;else e=v_.resolve(process.cwd(),".env.vault");return oH.existsSync(e)?e:null}function X6(r){return r[0]==="~"?v_.join(B6.homedir(),r.slice(1)):r}function z6(r){q6("Loading env from encrypted .env.vault");let e=bt._parseVault(r),t=process.env;return r&&r.processEnv!=null&&(t=r.processEnv),bt.populate(t,e,r),{parsed:e}}function J6(r){let e=v_.resolve(process.cwd(),".env"),t="utf8",n=!!(r&&r.debug);if(r){if(r.path!=null){let i=r.path;if(Array.isArray(i)){for(let o of r.path)if(oH.existsSync(o)){i=o;break}}e=X6(i)}r.encoding!=null?t=r.encoding:n&&sH("No encoding is specified. UTF-8 is used by default")}try{let i=bt.parse(oH.readFileSync(e,{encoding:t})),o=process.env;return r&&r.processEnv!=null&&(o=r.processEnv),bt.populate(o,i,r),{parsed:i}}catch(i){return n&&sH(`Failed to load ${e} ${i.message}`),{error:i}}}function Y6(r){if(E1(r).length===0)return bt.configDotenv(r);let e=x1(r);return e?bt._configVault(r):(G6(`You set DOTENV_KEY but you are missing a .env.vault file at ${e}. Did you forget to build it?`),bt.configDotenv(r))}function Q6(r,e){let t=Buffer.from(e.slice(-64),"hex"),n=Buffer.from(r,"base64"),i=n.subarray(0,12),o=n.subarray(-16);n=n.subarray(12,-16);try{let s=F6.createDecipheriv("aes-256-gcm",t,i);return s.setAuthTag(o),`${s.update(n)}${s.final()}`}catch(s){let a=s instanceof RangeError,c=s.message==="Invalid key length",u=s.message==="Unsupported state or unable to authenticate data";if(a||c){let l=new Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");throw l.code="INVALID_DOTENV_KEY",l}else if(u){let l=new Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");throw l.code="DECRYPTION_FAILED",l}else throw s}}function Z6(r,e,t={}){let n=!!(t&&t.debug),i=!!(t&&t.override);if(typeof e!="object"){let o=new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");throw o.code="OBJECT_REQUIRED",o}for(let o of Object.keys(e))Object.prototype.hasOwnProperty.call(r,o)?(i===!0&&(r[o]=e[o]),n&&sH(i===!0?`"${o}" is already defined and WAS overwritten`:`"${o}" is already defined and was NOT overwritten`)):r[o]=e[o]}var bt={configDotenv:J6,_configVault:z6,_parseVault:V6,config:Y6,decrypt:Q6,parse:j6,populate:Z6};Mi.exports.configDotenv=bt.configDotenv;Mi.exports._configVault=bt._configVault;Mi.exports._parseVault=bt._parseVault;Mi.exports.config=bt.config;Mi.exports.decrypt=bt.decrypt;Mi.exports.parse=bt.parse;Mi.exports.populate=bt.populate;Mi.exports=bt});var PH=_(je()),PO=_(H("fs")),LO=_(H("net")),$O=_(H("os")),LH=_(H("path")),lSe=_(TH());var Or=_(je());var It=r=>!!r,Js=r=>yp(r,e=>e!==null),F_=r=>yp(r,e=>e!==void 0),Ro=r=>e=>e instanceof r,gp=(r,e)=>{debugger;throw new Error(e.replace("{value}",JSON.stringify(r)))};function yp(r,e){let t={};for(let n of Object.keys(r)){let i=r[n];e(i,n)&&(t[n]=i)}return t}function ci(r,e){let t={};for(let n of Object.keys(r)){let i=r[n];t[n]=e(i,n)}return t}function U_(r,e){let t={};for(let n of Object.keys(r))e(n,r[n])&&(t[n]=r[n]);return t}function W_(...r){if(r.length===0)return{};let e={},t=Object.create(null);for(let n of r)if(n)for(let i of Object.keys(n)){let o=i.toLowerCase();t[o]?e[t[o]]=n[i]:(t[o]=i,e[i]=n[i])}return e}function j_(r,e){if(r.hasOwnProperty(e))return r[e];let t=e.toLowerCase();for(let n of Object.keys(r))if(n.toLowerCase()===t)return r[n]}var MH=Symbol("unset");function ne(r){let e=MH,t=(...n)=>(e===MH&&(t.value=e=r(...n)),e);return t.forget=()=>{e=MH,t.value=void 0},t.value=void 0,t}function ko(r){let e=new Map,t=n=>{if(e.has(n))return e.get(n);let i=r(n);return e.set(n,i),i};return t.clear=()=>e.clear(),t}function V_(r){let e,t=n=>(e?.arg===n||(e={arg:n,val:r(n)}),e.val);return t.clear=()=>e=void 0,t}function q_(r,e){let t,n=()=>{t!==void 0&&clearTimeout(t),t=setTimeout(()=>{t=void 0,e()},r)};return n.clear=()=>{t&&(clearTimeout(t),t=void 0)},n}function G_(r,e){let t,n=()=>{t===void 0&&(t=setTimeout(()=>{t=void 0,e()},r))};return n.queued=()=>!!t,n.clear=()=>{t&&(clearTimeout(t),t=void 0)},n}async function K_(r,e){let t=[],n=[];for(let i of r)await e(i)?t.push(i):n.push(i);return[t,n]}function Oo(r){let e=[];for(let t of r)e=e.concat(t);return e}var iN=2**31-1,bp=()=>{let r=0;return()=>r++&iN};var Ys={dispose:()=>{}},Ae=class{constructor(e){this.disposed=!1;this.items=[];e&&(this.items=e.slice())}get isDisposed(){return this.disposed}callback(...e){for(let t of e)this.push({dispose:t})}push(...e){return this.disposed?(e.forEach(t=>t.dispose()),e[0]):(this.items.push(...e),e[0])}disposeObject(e){this.items=this.items.filter(t=>t!==e),e.dispose()}clear(){let e=Promise.all(this.items.map(t=>t.dispose()));return this.items=[],e}dispose(){let e=Promise.all(this.items.map(t=>t.dispose()));return this.items=[],this.disposed=!0,e}};var z_=H("crypto"),J_=H("os"),Y_=_(H("path"));var pu=H("fs"),X_=H("path"),Ip=H("zlib"),oN=(r,e)=>e instanceof Error?{message:e.message,stack:e.stack}:typeof e=="bigint"?e.toString():e,vp=class{constructor(e,t){this.file=e;this.dap=t;try{(0,pu.mkdirSync)((0,X_.dirname)(e),{recursive:!0})}catch{}e.endsWith(".gz")?(this.stream=(0,Ip.createGzip)(),this.stream.pipe((0,pu.createWriteStream)(e))):this.stream=(0,pu.createWriteStream)(e)}async setup(){this.dap?.output({category:"console",output:`Verbose logs are written to: +${this.file} +`})}dispose(){this.stream&&(this.stream.end(),this.stream=void 0)}write(e){this.stream&&(this.stream.write(JSON.stringify(e,oN)+` +`),"flush"in this.stream&&typeof this.stream.flush=="function"&&this.stream.flush(Ip.constants.Z_SYNC_FLUSH))}};var sN={runtime:null,"runtime.sourcecreate":null,"runtime.assertion":null,"runtime.launch":null,"runtime.target":null,"runtime.welcome":null,"runtime.exception":null,"runtime.sourcemap":null,"runtime.breakpoints":null,"sourcemap.parsing":null,"perf.function":null,"cdp.send":null,"cdp.receive":null,"dap.send":null,"dap.receive":null,internal:null,proxyActivity:null},MJ=Object.keys(sN),U=Symbol("ILogger");function aN(r,e=(0,J_.tmpdir)()){if(r===!1)return{stdio:!1,logFile:null};let t={stdio:!0,logFile:Y_.join(e,`vscode-debugadapter-${(0,z_.randomBytes)(4).toString("hex")}.json.gz`)};return r===!0?t:{...t,...r}}function Q_(r,e){let t=aN(e),n={sinks:[]};return t.logFile&&n.sinks.push(new vp(t.logFile,r)),n}var Ve=class{constructor(e,t){this.lineNumber=e;this.columnNumber=t}get base0(){return this}get base1(){return new ke(this.lineNumber+1,this.columnNumber+1)}get base01(){return new zr(this.lineNumber,this.columnNumber+1)}compare(e){let t=e.base0;return this.lineNumber-t.lineNumber||this.columnNumber-t.columnNumber}},ke=class{constructor(e,t){this.lineNumber=e;this.columnNumber=t}get base0(){return new Ve(this.lineNumber-1,this.columnNumber-1)}get base1(){return this}get base01(){return new zr(this.lineNumber-1,this.columnNumber)}compare(e){let t=e.base1;return this.lineNumber-t.lineNumber||this.columnNumber-t.columnNumber||0}},zr=class{constructor(e,t){this.lineNumber=e;this.columnNumber=t}get base0(){return new Ve(this.lineNumber-1,this.columnNumber)}get base1(){return new ke(this.lineNumber,this.columnNumber+1)}get base01(){return this}compare(e){let t=e.base01;return this.lineNumber-t.lineNumber||this.columnNumber-t.columnNumber}},nr=class r{constructor(e,t){this.begin=e;this.end=t}static{this.ZERO=new r(new Ve(0,0),new Ve(0,0))}static{this.INFINITE=new r(new Ve(0,0),new Ve(1/0,1/0))}static simplify(e){if(e.length===0)return[];let t=e.slice().sort((o,s)=>o.begin.compare(s.begin)),n=[],i=t[0];for(let o=1;o=0?i=new r(i.begin,s.end):(n.push(i),i=s)}return n.push(i),n}contains(e){return e.compare(this.begin)>=0&&e.compare(this.end)<=0}toString(){let e=this.begin.base0,t=this.end.base0;return`Range[${e.lineNumber}:${e.columnNumber} -> ${t.lineNumber}:${t.columnNumber}]`}};var ue=r=>isFinite(r)?new Promise(e=>setTimeout(e,r)):new Promise(()=>{}),Z_=(r,e)=>{let t=setTimeout(r,e);return{dispose:()=>clearTimeout(t)}};function Qs(r){return new Promise((e,t)=>{let n=r.length;for(let i of r)i.then(o=>{o?(e(o),n=-1):--n===0&&e(void 0)}).catch(t)})}async function eA(r,e){for(let t=0;t{r=a=>{t=!0,n=a,o(a)},e=a=>{t=!0,s(a)}});return{resolve:r,reject:e,promise:i,get settledValue(){return n},hasSettled:()=>t}}var Pa=_(q());var G0=_(je()),K0=H("path"),X0=H("url");var DE=H("fs");var pi=_(H("fs")),xw=_(H("util"));async function oa({access:r},e){if(!e)return!1;try{return await r(e),!0}catch{return!1}}async function Ni({stat:r},e){if(e)try{return await r(e)}catch{return}}function Pw(r){return new Promise(e=>{pi.readFile(r,"utf8",async(t,n)=>{e(t?"":n)})})}var OY=xw.promisify(pi.writeFile);var Jt=Symbol("FsUtils"),Qr=class{constructor(e){this.fs=e}realPath(e){return this.fs.realpath(e)}async exists(e){try{return await this.fs.access(e,pi.constants.F_OK),!0}catch{return!1}}readFile(e){return this.fs.readFile(e)}},pg=class{constructor(e){this.dap=e}async realPath(){throw new Error("not implemented")}async exists(e){try{let{doesExists:t}=await this.dap.remoteFileExistsRequest({localFilePath:e});return t}catch{return!1}}readFile(){throw new Error("not implemented")}},ed=class{constructor(e,t,n){this.remoteFilePrefix=e;this.localFsUtils=t;this.remoteFsUtils=n}static create(e,t,n){let i=new Qr(t);return e!==void 0?new this(e.toLowerCase(),i,new pg(n)):i}async exists(e){return this.selectFs(e).exists(e)}async readFile(e){return this.selectFs(e).readFile(e)}async realPath(e){return this.selectFs(e).realPath(e)}selectFs(e){return e.toLowerCase().startsWith(this.remoteFilePrefix)?this.remoteFsUtils:this.localFsUtils}};var uE=H("crypto"),lE=_(Dg()),pE=H("os"),fe=_(H("path"));var V2=process.platform==="win32"?"\\\\.\\pipe\\":(0,pE.tmpdir)(),q2=0,dE=()=>fe.join(V2,`node-cdp.${process.pid}-${(0,uE.randomBytes)(4).toString("hex")}-${q2++}.sock`);function G2(r){return process.platform!=="win32"?[""]:r.lookup("PATHEXT")?.split(";")||[".exe"]}async function dd(r,e,t){let n;if(process.platform==="win32"){let i=t.WINDIR||"C:\\Windows";n=fe.join(i,"System32","where.exe")}else n="/usr/bin/which";try{if(await Ni(r,n)){let o=(await(0,lE.default)(n,[e],{env:Js(t)})).stdout.split(/\r?\n/);if(process.platform==="win32"){let s=String(t.PATHEXT||".exe").toUpperCase().split(";");for(let a of o){let c=fe.extname(a).toUpperCase();if(c&&s.includes(c))return a}}else if(o.length>0)return o[0];return}return e}catch{}}async function Tg(r,e,t){if(e){if(process.platform==="win32"&&!fe.extname(e))for(let n of G2(t)){let i=e+n;if(await Ni(r,i))return i}if(await Ni(r,e))return e}}var fE=r=>r.includes(`.asar${fe.sep}`);function Bi(...r){return fe.posix.isAbsolute(r[0])?Oe(fe.posix.join(...r)):fe.win32.isAbsolute(r[0])?fe.win32.join(...r):fe.join(...r)}function ir(...r){return fe.posix.isAbsolute(r[0])?fe.posix.resolve(...r):fe.win32.isAbsolute(r[0])?fe.win32.resolve(...r):fe.resolve(...r)}function Su(r,e){return fe.posix.isAbsolute(r)?fe.posix.relative(r,e):fe.win32.isAbsolute(r)?fe.win32.relative(r,e):fe.relative(r,e)}var K2=/\/|\\/,wu="file:///",hE=r=>r.startsWith(wu)&&r[wu.length+1]===":",Mg=r=>r.split(K2);function Rg(r,e=!1){if(!r)return r;if(hE(r)){let t=wu.length;r=wu+r[t].toLowerCase()+r.substr(t+1)}else fd(r)&&(r=(e?r[0].toUpperCase():r[0].toLowerCase())+r.substr(1));return r}function Xe(r,e=!1){if(!r)return r;if(r=Rg(r,e),hE(r)){let t=wu.length;r=r.substr(0,t+1)+r.substr(t+1).replace(/\//g,"\\")}else fd(r)&&(r=r.replace(/\//g,"\\"));return r}function Oe(r){return r.replace(/\\\//g,"/").replace(/\\/g,"/")}var mE=(r,e)=>{let t=fe.relative(r,e);return t.length&&!fe.isAbsolute(t)&&!t.startsWith("..")},HE=(r,e)=>{let t=fe.relative(r,e);return!fe.isAbsolute(t)&&!t.startsWith("..")},kg=r=>r.startsWith("\\\\"),fd=r=>/^[A-Za-z]:/.test(r)||kg(r);var LE=H("path"),$E=H("worker_threads");var Wo=_(EE()),Fg=H("fs"),Ug=H("worker_threads");var aj=Buffer.from("(function (exports, require, module, __filename, __dirname) { "),cj=Buffer.from(` +});`),uj=Buffer.from("(function (exports, require, module, __filename, __dirname, process, global, Buffer) { return function (exports, require, module, __filename, __dirname) { "),lj=Buffer.from(` +}.call(this, exports, require, module, __filename, __dirname); });`),pj=Buffer.from("#!"),dj=Buffer.from("\r")[0],fj=Buffer.from(` +`)[0],hj=(r,e)=>r.slice(0,e.length).equals(e),xE=(r,e,t)=>{let n=e.length===64?Wo.shaHash:Wo.hash;if(n(r)===e)return!0;if(t){if(hj(r,pj)){let i=r.indexOf(fj);return r[i-1]===dj&&i--,n(r.slice(i))===e}if(n(Buffer.concat([aj,r,cj]))===e)return!0}return n(Buffer.concat([uj,r,lj]))===e},PE=r=>r instanceof Buffer?r:Buffer.from(r,"utf-8");async function mj(r){switch(r.type){case 0:try{let e=await Fg.promises.readFile(r.file);return{id:r.id,hash:r.mode===0?(0,Wo.hash)(e):(0,Wo.shaHash)(e)}}catch{return{id:r.id}}case 1:try{return{id:r.id,hash:(0,Wo.hash)(PE(r.data))}}catch{return{id:r.id}}case 2:try{let e=await Fg.promises.readFile(r.file);return{id:r.id,matches:xE(e,r.expected,r.checkNode)}}catch{return{id:r.id,matches:!1}}case 3:try{return{id:r.id,matches:xE(PE(r.data),r.expected,r.checkNode)}}catch{return{id:r.id,matches:!1}}}}function Hj(r){r.on("message",e=>{mj(e).then(t=>r.postMessage(t))})}Ug.parentPort&&Hj(Ug.parentPort);var vd=class{constructor(e=3,t=(0,LE.join)(__dirname,"hash.js")){this.maxFailures=e;this.hasherScriptPath=t;this.idCounter=0;this.failureCount=0;this.deferredMap=new Map;this.deferCleanup=q_(3e4,()=>this.cleanup())}async hashBytes(e,t){return(await this.send({type:1,data:t,mode:e,id:this.idCounter++})).hash}async hashFile(e,t){return(await this.send({type:0,file:t,mode:e,id:this.idCounter++})).hash}async verifyBytes(e,t,n){return(await this.send({type:3,data:e,id:this.idCounter++,expected:t,checkNode:n})).matches}async verifyFile(e,t,n){return(await this.send({type:2,file:e,id:this.idCounter++,expected:t,checkNode:n})).matches}dispose(){this.cleanup(),this.deferCleanup.clear()}send(e){let t=this.getProcess();if(!t)throw new Error("hash.js process unexpectedly exited");this.deferCleanup();let n=ge();return this.deferredMap.set(e.id,{deferred:n,request:e}),t.postMessage(e),n.promise}cleanup(){this.instance&&(this.instance.removeAllListeners("exit"),this.instance.terminate(),this.instance=void 0,this.failureCount=0)}getProcess(){if(this.instance)return this.instance;if(this.failureCount>this.maxFailures)return;let e=this.instance=new $E.Worker(this.hasherScriptPath);return e.setMaxListeners(1/0),e.on("message",t=>{let n=t,i=this.deferredMap.get(n.id);i&&(i.deferred.resolve(n),this.deferredMap.delete(n.id))}),e.on("exit",()=>{this.instance=void 0,this.failureCount++;let t=this.getProcess();if(t){this.deferCleanup();for(let{request:n}of this.deferredMap.values())t.postMessage(n)}else{for(let{deferred:n}of this.deferredMap.values())n.reject(new Error("hash.js process unexpectedly exited"));this.deferredMap.clear(),this.deferCleanup.clear()}}),e}};var CE=new vd;async function TE(r,e,t){return!r||fE(r)?void 0:e?(typeof t=="string"?await CE.verifyBytes(t,e,!0):await CE.verifyFile(r,e,!0))?r:void 0:await new Qr(DE.promises).exists(r)?r:void 0}var en="node:",di="";var ME,da,gj,xu=class{constructor(){this._indexes={__proto__:null},this.array=[]}};ME=(r,e)=>r._indexes[e],da=(r,e)=>{let t=ME(r,e);if(t!==void 0)return t;let{array:n,_indexes:i}=r;return i[e]=n.push(e)-1},gj=r=>{let{array:e,_indexes:t}=r;if(e.length===0)return;let n=e.pop();t[n]=void 0};var RE="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",OE=new Uint8Array(64),NE=new Uint8Array(128);for(let r=0;r>>=1,a&&(i=-2147483648|-i),t[n]+=i,e}function kE(r,e,t){return e>=t?!1:r.charCodeAt(e)!==44}function bj(r){r.sort(vj)}function vj(r,e){return r[0]-e[0]}function Id(r){let e=new Int32Array(5),t=1024*16,n=t-36,i=new Uint8Array(t),o=i.subarray(0,n),s=0,a="";for(let c=0;c0&&(s===t&&(a+=Wg.decode(i),s=0),i[s++]=59),u.length!==0){e[0]=0;for(let l=0;ln&&(a+=Wg.decode(o),i.copyWithin(0,n,s),s-=n),l>0&&(i[s++]=44),s=Lu(i,s,e,p,0),p.length!==1&&(s=Lu(i,s,e,p,1),s=Lu(i,s,e,p,2),s=Lu(i,s,e,p,3),p.length!==4&&(s=Lu(i,s,e,p,4)))}}}return a+Wg.decode(i.subarray(0,s))}function Lu(r,e,t,n,i){let o=n[i],s=o-t[i];t[i]=o,s=s<0?-s<<1|1:s<<1;do{let a=s&31;s>>>=5,s>0&&(a|=32),r[e++]=OE[a]}while(s>0);return e}var Ij=/^[\w+.-]+:\/\//,_j=/^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/,Aj=/^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i,ze;(function(r){r[r.Empty=1]="Empty",r[r.Hash=2]="Hash",r[r.Query=3]="Query",r[r.RelativePath=4]="RelativePath",r[r.AbsolutePath=5]="AbsolutePath",r[r.SchemeRelative=6]="SchemeRelative",r[r.Absolute=7]="Absolute"})(ze||(ze={}));function wj(r){return Ij.test(r)}function Sj(r){return r.startsWith("//")}function WE(r){return r.startsWith("/")}function Ej(r){return r.startsWith("file:")}function FE(r){return/^[.?#]/.test(r)}function _d(r){let e=_j.exec(r);return jE(e[1],e[2]||"",e[3],e[4]||"",e[5]||"/",e[6]||"",e[7]||"")}function xj(r){let e=Aj.exec(r),t=e[2];return jE("file:","",e[1]||"","",WE(t)?t:"/"+t,e[3]||"",e[4]||"")}function jE(r,e,t,n,i,o,s){return{scheme:r,user:e,host:t,port:n,path:i,query:o,hash:s,type:ze.Absolute}}function UE(r){if(Sj(r)){let t=_d("http:"+r);return t.scheme="",t.type=ze.SchemeRelative,t}if(WE(r)){let t=_d("http://foo.com"+r);return t.scheme="",t.host="",t.type=ze.AbsolutePath,t}if(Ej(r))return xj(r);if(wj(r))return _d(r);let e=_d("http://foo.com/"+r);return e.scheme="",e.host="",e.type=r?r.startsWith("?")?ze.Query:r.startsWith("#")?ze.Hash:ze.RelativePath:ze.Empty,e}function Pj(r){if(r.endsWith("/.."))return r;let e=r.lastIndexOf("/");return r.slice(0,e+1)}function Lj(r,e){VE(e,e.type),r.path==="/"?r.path=e.path:r.path=Pj(e.path)+r.path}function VE(r,e){let t=e<=ze.RelativePath,n=r.path.split("/"),i=1,o=0,s=!1;for(let c=1;cn&&(n=s)}VE(t,n);let i=t.query+t.hash;switch(n){case ze.Hash:case ze.Query:return i;case ze.RelativePath:{let o=t.path.slice(1);return o?FE(e||r)&&!FE(o)?"./"+o+i:o+i:i||"."}case ze.AbsolutePath:return t.path+i;default:return t.scheme+"//"+t.user+t.host+t.port+t.path+i}}function GE(r,e){return e&&!e.endsWith("/")&&(e+="/"),qE(r,e)}function $j(r){if(!r)return"";let e=r.lastIndexOf("/");return r.slice(0,e+1)}var rn=0,qg=1,Gg=2,Kg=3,YE=4,QE=1,ZE=2;function Cj(r,e){let t=KE(r,0);if(t===r.length)return r;e||(r=r.slice());for(let n=t;n>1),o=r[i][rn]-e;if(o===0)return jo=!0,i;o<0?t=i+1:n=i-1}return jo=!1,t-1}function Xg(r,e,t){for(let n=t+1;n=0&&r[n][rn]===e;t=n--);return t}function t0(){return{lastKey:-1,lastNeedle:-1,lastIndex:-1}}function r0(r,e,t,n){let{lastKey:i,lastNeedle:o,lastIndex:s}=t,a=0,c=r.length-1;if(n===i){if(e===o)return jo=s!==-1&&r[s][rn]===e,s;e>=o?a=s===-1?0:s:c=s}return t.lastKey=n,t.lastNeedle=e,t.lastIndex=Rj(r,e,a,c)}function kj(r,e){let t=e.map(Nj);for(let n=0;ne;n--)r[n]=r[n-1];r[e]=t}function Nj(){return{__proto__:null}}var Sd=function(r,e){let t=typeof r=="string"?JSON.parse(r):r;if(!("sections"in t))return new Vo(t,e);let n=[],i=[],o=[],s=[];n0(t,e,n,i,o,s,0,0,1/0,1/0);let a={version:3,file:t.file,names:s,sources:i,sourcesContent:o,mappings:n};return i0(a)};function n0(r,e,t,n,i,o,s,a,c,u){let{sections:l}=r;for(let p=0;pc)return;let D=Fj(t,w),j=y===0?a:0,X=f[y];for(let B=0;B=u)return;if(Z.length===1){D.push([O]);continue}let G=p+Z[qg],re=Z[Gg],xe=Z[Kg];D.push(Z.length===4?[O,G,re,xe]:[O,G,re,xe,d+Z[YE]])}}}function jg(r,e){for(let t=0;tGE(f||"",p));let{mappings:d}=i;typeof d=="string"?(this._encoded=d,this._decoded=void 0):(this._encoded=void 0,this._decoded=Cj(d,n)),this._decodedMemo=t0(),this._bySources=void 0,this._bySourceMemos=void 0}};(()=>{JE=e=>{var t;return(t=e._encoded)!==null&&t!==void 0?t:e._encoded=Id(e._decoded)},tn=e=>e._decoded||(e._decoded=BE(e._encoded)),Uj=(e,t,n)=>{let i=tn(e);if(t>=i.length)return null;let o=i[t],s=wd(o,e._decodedMemo,t,n,Dn);return s===-1?null:o[s]},zg=(e,{line:t,column:n,bias:i})=>{if(t--,t<0)throw new Error(XE);if(n<0)throw new Error(zE);let o=tn(e);if(t>=o.length)return Ad(null,null,null,null);let s=o[t],a=wd(s,e._decodedMemo,t,n,i||Dn);if(a===-1)return Ad(null,null,null,null);let c=s[a];if(c.length===1)return Ad(null,null,null,null);let{names:u,resolvedSources:l}=e;return Ad(l[c[qg]],c[Gg]+1,c[Kg],c.length===5?u[c[YE]]:null)},Yg=(e,{source:t,line:n,column:i,bias:o})=>r(e,t,n,i,o||fa,!0),Jg=(e,{source:t,line:n,column:i,bias:o})=>r(e,t,n,i,o||Dn,!1),Qg=(e,t)=>{let n=tn(e),{names:i,resolvedSources:o}=e;for(let s=0;s{let{sources:n,resolvedSources:i,sourcesContent:o}=e;if(o==null)return null;let s=n.indexOf(t);return s===-1&&(s=i.indexOf(t)),s===-1?null:o[s]},i0=(e,t)=>{let n=new Vo(Vg(e,[]),t);return n._decoded=e.mappings,n},jj=e=>Vg(e,tn(e)),Vj=e=>Vg(e,JE(e));function r(e,t,n,i,o,s){if(n--,n<0)throw new Error(XE);if(i<0)throw new Error(zE);let{sources:a,resolvedSources:c}=e,u=a.indexOf(t);if(u===-1&&(u=c.indexOf(t)),u===-1)return s?[]:$u(null,null);let p=(e._bySources||(e._bySources=kj(tn(e),e._bySourceMemos=a.map(t0))))[u][n];if(p==null)return s?[]:$u(null,null);let d=e._bySourceMemos[u];if(s)return qj(p,d,n,i,o);let f=wd(p,d,n,i,o);if(f===-1)return $u(null,null);let h=p[f];return $u(h[QE]+1,h[ZE])}})();function Vg(r,e){return{version:r.version,file:r.file,names:r.names,sourceRoot:r.sourceRoot,sources:r.sources,sourcesContent:r.sourcesContent,mappings:e}}function Ad(r,e,t,n){return{source:r,line:e,column:t,name:n}}function $u(r,e){return{line:r,column:e}}function wd(r,e,t,n,i){let o=r0(r,n,e,t);return jo?o=(i===fa?Xg:e0)(r,n,o):i===fa&&o++,o===-1||o===r.length?-1:o}function qj(r,e,t,n,i){let o=wd(r,e,t,n,Dn);if(!jo&&i===fa&&o++,o===-1||o===r.length)return[];let s=jo?n:r[o][rn];jo||(o=e0(r,s,o));let a=Xg(r,s,o),c=[];for(;o<=a;o++){let u=r[o];c.push($u(u[QE]+1,u[ZE]))}return c}var c0=0,u0=1,l0=2,p0=3,d0=4,f0=-1,Zg,Gj,Kj,Xj,ey,Ed,zj,Jj,Yj,Cu,Du=class{constructor({file:e,sourceRoot:t}={}){this._names=new xu,this._sources=new xu,this._sourcesContent=[],this._mappings=[],this.file=e,this.sourceRoot=t}};Zg=(r,e,t,n,i,o,s,a)=>Cu(!1,r,e,t,n,i,o,s,a),Kj=(r,e,t,n,i,o,s,a)=>Cu(!0,r,e,t,n,i,o,s,a),Gj=(r,e)=>a0(!1,r,e),Xj=(r,e)=>a0(!0,r,e),ey=(r,e,t)=>{let{_sources:n,_sourcesContent:i}=r;i[da(n,e)]=t},Ed=r=>{let{file:e,sourceRoot:t,_mappings:n,_sources:i,_sourcesContent:o,_names:s}=r;return eV(n),{version:3,file:e||void 0,names:s.array,sourceRoot:t||void 0,sources:i.array,sourcesContent:o,mappings:n}},zj=r=>{let e=Ed(r);return Object.assign(Object.assign({},e),{mappings:Id(e.mappings)})},Yj=r=>{let e=[],{_mappings:t,_sources:n,_names:i}=r;for(let o=0;o{let e=new Vo(r),t=new Du({file:e.file,sourceRoot:e.sourceRoot});return s0(t._names,e.names),s0(t._sources,e.sources),t._sourcesContent=e.sourcesContent||e.sources.map(()=>null),t._mappings=tn(e),t},Cu=(r,e,t,n,i,o,s,a,c)=>{let{_mappings:u,_sources:l,_sourcesContent:p,_names:d}=e,f=Qj(u,t),h=Zj(f,n);if(!i)return r&&tV(f,h)?void 0:o0(f,h,[n]);let m=da(l,i),y=a?da(d,a):f0;if(m===p.length&&(p[m]=c??null),!(r&&rV(f,h,m,o,s,y)))return o0(f,h,a?[n,m,o,s,y]:[n,m,o,s])};function Qj(r,e){for(let t=r.length;t<=e;t++)r[t]=[];return r[e]}function Zj(r,e){let t=r.length;for(let n=t-1;n>=0;t=n--){let i=r[n];if(e>=i[c0])break}return t}function o0(r,e,t){for(let n=r.length;n>e;n--)r[n]=r[n-1];r[e]=t}function eV(r){let{length:e}=r,t=e;for(let n=t-1;n>=0&&!(r[n].length>0);t=n,n--);t":9,"<=":9,">=":9,in:9,instanceof:9,"<<":10,">>":10,">>>":10,"+":11,"-":11,"*":12,"%":12,"/":12,"**":13},nn=17,oV={ArrayExpression:20,TaggedTemplateExpression:20,ThisExpression:20,Identifier:20,PrivateIdentifier:20,Literal:18,TemplateLiteral:20,Super:20,SequenceExpression:20,MemberExpression:19,ChainExpression:19,CallExpression:19,NewExpression:19,ArrowFunctionExpression:nn,ClassExpression:nn,FunctionExpression:nn,ObjectExpression:nn,UpdateExpression:16,UnaryExpression:15,AwaitExpression:15,BinaryExpression:14,LogicalExpression:13,ConditionalExpression:4,AssignmentExpression:3,YieldExpression:2,RestElement:1};function ha(r,e){let{generator:t}=r;if(r.write("("),e!=null&&e.length>0){t[e[0].type](e[0],r);let{length:n}=e;for(let i=1;i0){r.write(n);for(let s=1;s0){t.VariableDeclarator(n[0],r);for(let o=1;o0){e.write(n),i&&r.comments!=null&&Ft(e,r.comments,o,n);let{length:a}=s;for(let c=0;c0){for(;i0&&e.write(", ");let o=t[i],s=o.type[6];if(s==="D")e.write(o.local.name,o),i++;else if(s==="N")e.write("* as "+o.local.name,o),i++;else break}if(i0)for(let i=0;;){let o=t[i],{name:s}=o.local;if(e.write(s,o),s!==o.exported.name&&e.write(" as "+o.exported.name),++i "),r.body.type[0]==="O"?(e.write("("),this.ObjectExpression(r.body,e),e.write(")")):this[r.body.type](r.body,e)},ThisExpression(r,e){e.write("this",r)},Super(r,e){e.write("super",r)},RestElement:H0=function(r,e){e.write("..."),this[r.argument.type](r.argument,e)},SpreadElement:H0,YieldExpression(r,e){e.write(r.delegate?"yield*":"yield"),r.argument&&(e.write(" "),this[r.argument.type](r.argument,e))},AwaitExpression(r,e){e.write("await ",r),Pd(e,r.argument,r)},TemplateLiteral(r,e){let{quasis:t,expressions:n}=r;e.write("`");let{length:i}=n;for(let s=0;s0){let{elements:t}=r,{length:n}=t;for(let i=0;;){let o=t[i];if(o!=null&&this[o.type](o,e),++i0){e.write(n),i&&r.comments!=null&&Ft(e,r.comments,o,n);let s=","+n,{properties:a}=r,{length:c}=a;for(let u=0;;){let l=a[u];if(i&&l.comments!=null&&Ft(e,l.comments,o,n),e.write(o),this[l.type](l,e),++u0){let{properties:t}=r,{length:n}=t;for(let i=0;this[t[i].type](t[i],e),++i1||i[0]==="U"&&(i[1]==="n"||i[1]==="p")&&n.prefix&&n.operator[0]===t&&(t==="+"||t==="-"))&&e.write(" "),o?(e.write(t.length>1?" (":"("),this[i](n,e),e.write(")")):this[i](n,e)}else this[r.argument.type](r.argument,e),e.write(r.operator)},UpdateExpression(r,e){r.prefix?(e.write(r.operator),this[r.argument.type](r.argument,e)):(this[r.argument.type](r.argument,e),e.write(r.operator))},AssignmentExpression(r,e){this[r.left.type](r.left,e),e.write(" "+r.operator+" "),this[r.right.type](r.right,e)},AssignmentPattern(r,e){this[r.left.type](r.left,e),e.write(" = "),this[r.right.type](r.right,e)},BinaryExpression:g0=function(r,e){let t=r.operator==="in";t&&e.write("("),Pd(e,r.left,r,!1),e.write(" "+r.operator+" "),Pd(e,r.right,r,!0),t&&e.write(")")},LogicalExpression:g0,ConditionalExpression(r,e){let{test:t}=r,n=e.expressionsPrecedence[t.type];n===nn||n<=e.expressionsPrecedence.ConditionalExpression?(e.write("("),this[t.type](t,e),e.write(")")):this[t.type](t,e),e.write(" ? "),this[r.consequent.type](r.consequent,e),e.write(" : "),this[r.alternate.type](r.alternate,e)},NewExpression(r,e){e.write("new ");let t=e.expressionsPrecedence[r.callee.type];t===nn||t0&&(this.lineEndSize>0&&(i.length===1?e[n-1]===i:e.endsWith(i))?(this.line+=this.lineEndSize,this.column=0):this.column+=n)}toString(){return this.output}};function fi(r,e){let t=new ry(e);return t.generator[r.type](r,t),t.output}var I0=H("./vendor/acorn.js"),Cd=H("./vendor/acorn-loose.js");var Ld={ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],AwaitExpression:["argument"],BinaryExpression:["left","right"],BlockStatement:["body"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ChainExpression:["expression"],ClassBody:["body"],ClassDeclaration:["id","superClass","body"],ClassExpression:["id","superClass","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExperimentalRestProperty:["argument"],ExperimentalSpreadProperty:["argument"],ExportAllDeclaration:["exported","source"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source"],ExportSpecifier:["exported","local"],ExpressionStatement:["expression"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportDeclaration:["specifiers","source"],ImportDefaultSpecifier:["local"],ImportExpression:["source"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXClosingFragment:[],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXFragment:["openingFragment","children","closingFragment"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","attributes"],JSXOpeningFragment:[],JSXSpreadAttribute:["argument"],JSXSpreadChild:["expression"],JSXText:[],LabeledStatement:["label","body"],Literal:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["key","value"],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],PrivateIdentifier:[],Program:["body"],Property:["key","value"],PropertyDefinition:["key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],StaticBlock:["body"],Super:[],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"]},lV=Object.keys(Ld);for(let r of lV)Object.freeze(Ld[r]);Object.freeze(Ld);var ny=Ld;var iy={ecmaVersion:"latest",locations:!0,allowAwaitOutsideFunction:!0,allowImportExportEverywhere:!0,allowReserved:!0,allowReturnOutsideFunction:!0},Fi=r=>r.start,oy=r=>r.end,_0=(r,e)=>r.slice(Fi(e),oy(e)),Tn=(r,e=!1)=>(e?I0.parse:Cd.parse)(r,iy),Tu=r=>{let e=Tn(r);for(let t of e.body)t.type==="FunctionDeclaration"&&t.id&&(0,Cd.isDummy)(t.id)&&(t.id=null);return e.body};function A0(r,e,t){return e.length>1||e[0].type!=="FunctionDeclaration"?E0(r,e,!0,t):w0(r,[{type:"ReturnStatement",argument:{type:"CallExpression",optional:!1,arguments:[{type:"ThisExpression"},...r.map(n=>({type:"Identifier",name:n}))],callee:{type:"MemberExpression",property:{type:"Identifier",name:"call"},computed:!1,optional:!1,object:{type:"FunctionExpression",params:e[0].params,body:e[0].body}}}}],!0,t)}var w0=(r,e,t,n)=>{let i={type:"Identifier",name:"e"},s=n?[{type:"TryStatement",block:{type:"BlockStatement",body:e},handler:{type:"CatchClause",param:i,body:{type:"BlockStatement",body:[{type:"ReturnStatement",argument:{type:"LogicalExpression",left:{type:"LogicalExpression",left:{type:"MemberExpression",object:i,property:{type:"Identifier",name:"stack"},computed:!1,optional:!1},operator:"||",right:{type:"MemberExpression",object:i,property:{type:"Identifier",name:"message"},computed:!1,optional:!1}},operator:"||",right:{type:"CallExpression",callee:{type:"Identifier",name:"String"},arguments:[i],optional:!1}}}]}}}]:e;return t?{type:"FunctionExpression",id:{type:"Identifier",name:"_generatedCode"},params:r.map(a=>({type:"Identifier",name:a})),body:{type:"BlockStatement",body:s}}:{type:"ArrowFunctionExpression",params:r.map(a=>({type:"Identifier",name:a})),expression:!1,body:{type:"BlockStatement",body:s}}},dV=(r,e)=>({type:"CallExpression",arguments:r.map(t=>({type:"Identifier",name:t})),callee:e,optional:!1}),S0=(r,e,t)=>dV(r,E0(r,e,t,!0));function E0(r,e,t,n){let i=e[e.length-1];if(i.type!=="ReturnStatement"){let o=fV(i);o&&(e=[...e.slice(0,-1),{type:"ReturnStatement",argument:o}])}return w0(r,e,t,n)}function fV(r){switch(r.type){case"ExpressionStatement":return r.expression;case"BlockStatement":return{type:"CallExpression",arguments:[],callee:{type:"ArrowFunctionExpression",params:[],expression:!1,body:r},optional:!1};case"ReturnStatement":return r.argument||void 0;default:return}}var Ui=(r,e)=>{$d(r,e)},Dd=(r,e)=>{let t=$d(r,e);return t&&typeof t=="object"?t.replace:r},$d=(r,e,t)=>{if(!r)return;let n=e.enter(r,t);if(n===0)return 0;if(n&&typeof n=="object")return n;if(n===1)return;let i=ny[r.type];if(i)for(let o of i){let s=r[o];if(s instanceof Array)for(let[a,c]of s.entries()){let u=$d(c,e,r);if(u===0)return 0;u&&typeof u=="object"&&(s[a]=u.replace)}else if(s){let a=$d(s,e,r);if(a===0)return 0;a&&typeof a=="object"&&(r[o]=a.replace)}}e.leave?.(r)};var N0=H("dns"),sr=_(H("path")),kn=H("url");var $0=H("url");var C=class{constructor(){this._listeners=new Set;this.event=(e,t,n)=>{let i={listener:e,thisArg:t};this._listeners.add(i);let o={dispose:()=>{o.dispose=()=>{},this._listeners.delete(i)}};return n&&n.push(o),o}}get size(){return this._listeners.size}fire(e){let t=!this._deliveryQueue;this._deliveryQueue||(this._deliveryQueue=[]);for(let n of this._listeners)this._deliveryQueue.push({data:n,event:e});if(t){for(let n=0;n{i.dispose(),n?.size===0&&this.map.delete(e)})}}emit(e,t){this.listeners.get(e)?.fire(t)}};var x0=H("./vendor/acorn.js"),P0=H("crypto");var Ne=(r=sy())=>` +//# sourceURL=${r} +`,sy=()=>`eval-${(0,P0.randomBytes)(4).toString("hex")}.cdp`;function hi(r,e){return hV(""+r,e)}function hV(r,e){let t=(0,x0.parseExpressionAt)(r,0,{ecmaVersion:"latest",locations:!0});if(t.type!=="FunctionExpression")throw new Error(`Could not find function declaration for: + +${r}`);let n=t.params.map(a=>{if(a.type!=="Identifier")throw new Error("Parameter must be identifier");return a.name}),{start:i,end:o}=t.body,s=a=>` + ${a.map((c,u)=>`let ${n[u]} = ${c}`).join("; ")}; + ${r.slice(i+1,o-1)} + `;return{expr:(...a)=>`(()=>{${s(a)}})(); +${Ne(e)}`,decl:(...a)=>`function(...runtimeArgs){${s(a)}; +${Ne(e)}}`}}var qo=class extends Error{constructor(t){super(t.text);this.details=t}},Ru=class{constructor(e){this.objectId=e}};function nt(r,e){let t=""+r,n=t.lastIndexOf("}");t=t.slice(0,n)+Ne(e)+t.slice(n);let i=async({cdp:o,args:s,...a})=>{let c=await o.Runtime.callFunctionOn({functionDeclaration:t,arguments:s.map(u=>u instanceof Ru?{objectId:u.objectId}:{value:u}),...a});if(!c)throw new qo({exceptionId:0,text:"No response from CDP",lineNumber:0,columnNumber:0});if(c.exceptionDetails)throw new qo(c.exceptionDetails);return c.result};return i.source=t,i}var L0=()=>"globalThis.__jsDebugIsReady = true; "+Ne();var ku=new Set(["page","iframe","worker","service_worker"]),Md=new Set(["page","iframe"]),ay=new Set(["page","iframe"]),mV=ay,Rd=class r{constructor(e,t,n,i,o,s,a,c,u){this._manager=e;this._targetInfo=t;this.launchConfig=s;this.sessionId=a;this.logger=c;this._attached=!1;this._onNameChangedEmitter=new C;this.onNameChanged=this._onNameChangedEmitter.event;this.entryBreakpoint=void 0;this._children=new Map;this.sourcePathResolver=this._manager._sourcePathResolver;this._cdp=n,n.pause(),this.parentTarget=i,this._waitingForDebugger=o,this._updateFromInfo(t),this._ondispose=u}get targetInfo(){return this._targetInfo}get targetId(){return this._targetInfo.targetId}get independentLifeycle(){return ay.has(this.type())}get supplementalConfig(){let e=this.type();return{__browserTargetType:e,__usePerformanceFromParent:e!=="page"}}targetOrigin(){return this._manager._targetOrigin}id(){return this.sessionId}cdp(){return this._cdp}name(){return this._computeName()}fileName(){return this._targetInfo.url}type(){return this._targetInfo.type}afterBind(){return this._cdp.resume(),Promise.resolve()}initialize(){return Promise.resolve()}async runIfWaitingForDebugger(){await Promise.all([this._cdp.Runtime.runIfWaitingForDebugger({}),this._cdp.Runtime.evaluate({expression:L0()})])}parent(){return this.parentTarget&&!ku.has(this.parentTarget.type())?this.parentTarget.parentTarget:this.parentTarget}children(){let e=[];for(let t of this._children.values())ku.has(t.type())?e.push(t):e.push(...t.children());return e}canStop(){return mV.has(this.type())}stop(){if(this._manager.targetList().includes(this))if(this.type()==="service_worker"){if(this._manager.serviceWorkerModel.stopWorker(this.id()),!this.parentTarget)return;this._manager.serviceWorkerModel.stopWorker(this.parentTarget.id())}else this._cdp.Target.closeTarget({targetId:this._targetInfo.targetId})}canRestart(){return ay.has(this.type())}restart(){this._cdp.Page.reload({})}waitingForDebugger(){return this._waitingForDebugger}canAttach(){return!this._attached}async attach(){return this._waitingForDebugger=!1,this._attached=!0,Promise.resolve(this._cdp)}canDetach(){return this._attached}async detach(){this._attached=!1,this._manager._detachedFromTarget(this.sessionId)}executionContextName(e){let t=e.auxData,n=e.name;if(!t)return n;let i=t.frameId,o=i?this._manager.frameModel.frameForId(i):void 0;return o&&t.isDefault&&!o.parentFrame()?"top":o&&t.isDefault?o.displayName():o?`${n}`:n}supportsCustomBreakpoints(){return Md.has(this.type())}supportsXHRBreakpoints(){return Md.has(this.type())}scriptUrlToUrl(e){return Wi(this._targetInfo.url,e)||e}_updateFromInfo(e){this._targetInfo={...e,type:this._targetInfo.type},this._onNameChangedEmitter.fire()}setComputeNameFn(e){this._customNameComputeFn=e,this._onNameChangedEmitter.fire()}_computeName(){let e=this._customNameComputeFn?.(this);if(e)return e;if(this.type()==="service_worker"){let i=this._manager.serviceWorkerModel.version(this.id());if(i)return i.label()+" [Service Worker]"}let t=this._targetInfo.title;if(!(t&&this._manager.targetList().some(i=>i instanceof r&&i!==this&&i._targetInfo.title===this._targetInfo.title)))return t;try{let i=new $0.URL(this._targetInfo.url);i.protocol==="data:"?t=" ":i?t+=` (${this._targetInfo.url.replace(/^[a-z]+:\/\/|\/$/gi,"")})`:t+=` (${this._targetInfo.url})`}catch{t+=` (${this._targetInfo.url})`}return t}async _detached(){await this._manager.serviceWorkerModel.detached(this._cdp),this._ondispose(this)}};function Ou(r){return r instanceof Array?r:[r]}function C0(r,e,t){let n=0,i=r.length-1;for(;n<=i;){let o=(n+i)/2|0,s=t(r[o],e);if(s<0)n=o+1;else if(s>0)i=o-1;else return o}return n}function D0(r,e){let t=new Map;for(let n of r){let i=e(n),o=t.get(i);o?o.push(n):t.set(i,[n])}return t}function ma(r){return r.next().value}var kd=class{constructor(e,t){this.key=e;this.value=t}toString(){return`${this.key}: ${this.value}`}},Mn=class{constructor(e,t){this.projection=e;this.initialContents=t;let n=Array.from(t||[]).map(i=>[this.projection(i[0]),new kd(i[0],i[1])]);this.projectionToKeyAndValue=new Map(n)}clear(){this.projectionToKeyAndValue.clear()}delete(e){let t=this.projection(e);return this.projectionToKeyAndValue.delete(t)}forEach(e,t){this.projectionToKeyAndValue.forEach(n=>{e.call(t,n.value,n.key,this)},t)}get(e){let t=this.projection(e),n=this.projectionToKeyAndValue.get(t);return n?n.value:void 0}has(e){return this.projectionToKeyAndValue.has(this.projection(e))}set(e,t){return this.projectionToKeyAndValue.set(this.projection(e),new kd(e,t)),this}get size(){return this.projectionToKeyAndValue.size}*entries(){for(let e of this.projectionToKeyAndValue.values())yield[e.key,e.value]}*keys(){for(let e of this.projectionToKeyAndValue.values())yield e.key}*values(){for(let e of this.projectionToKeyAndValue.values())yield e.value}[Symbol.iterator](){return this.entries()}get[Symbol.toStringTag](){return JSON.stringify(Array.from(this.entries()))}toString(){return`MapUsingProjection<${JSON.stringify([...this.entries()])}>`}};function Rn(r,e){return r.length<=e?r:r.substr(0,e-1)+"\u2026"}function Ha(r,e){if(r.length<=e)return r;let t=e>>1,n=e-t-1,i=r.codePointAt(r.length-n-1);i&&i>=65536&&(--n,++t);let o=r.codePointAt(t-1);return t>0&&o&&o>=65536&&--t,r.substr(0,t)+"\u2026"+r.substr(r.length-n,n)}var T0="/\\.?*()^${}|[]+",M0=r=>T0.includes(r);function Ut(r,e){let t=T0.split("").filter(i=>!e||e.indexOf(i)<0).join("").replace(/[\\\]]/g,"\\$&"),n=new RegExp(`[${t}]`,"g");return r.replace(n,"\\$&")}var ji=class{constructor(e){this.source=e;this.lines=[];this.lines.push(0);for(let t=e.indexOf(` +`);t!==-1;t=e.indexOf(` +`,t+1))this.lines.push(t+1)}getLineOffset(e){return e>=this.lines.length?this.source.length:this.lines[e]}convert(e){let t=e.base0;if(t.lineNumber>this.lines.length)return this.source.length;let n=this.lines[t.lineNumber],i=this.lines[t.lineNumber+1]??this.source.length+1;return n+Math.min(i-n-1,t.columnNumber)}};var Nd=process.platform!=="win32";function uy(){return Nd}function Bd(r){return Nd?r:r.toLowerCase()}function Fd(r,e){return Nd?r===e:r.toLowerCase()===e.toLowerCase()}function Go(){return uy()?new Map:new Mn(Bd)}var R0=process.platform==="win32"?process.env.PATHEXT?.toLowerCase().split(";"):void 0,B0=r=>{let e=Bd(sr.basename(r));if(R0){for(let t of R0)if(e.endsWith(t))return e.slice(0,-t.length)}return e},ly=async(r,e)=>{for(;;){let t=await e(r);if(t!==void 0)return t;let n=sr.dirname(r);if(n===r)return;r=n}},Ud=(r,e,t)=>ly(e,async n=>await r.exists(sr.join(n,t))?n:void 0),gV=new Set(["localhost","127.0.0.1","::1"]);var k0=r=>gV.has(r.toLowerCase()),yV=r=>{try{return new kn.URL(r).hostname.replace(/^\[|\]$/g,"")}catch{return r}};var ga=ko(async r=>{let e=yV(r);if(k0(e))return!0;try{let t=await N0.promises.lookup(e);return k0(t.address)}catch{return!1}});function Wi(r,e){try{return new kn.URL(e,r).href}catch{}}function py(r){try{return new kn.URL(r).pathname}catch{return}}function Wd(r,e){try{return new kn.URL(e),e}catch{}let t;try{t=new kn.URL(r||"")}catch{return e}let n=t.protocol+"//";return t.username&&(n+=t.username+":"+t.password+"@"),n+=t.host,n+=sr.dirname(t.pathname),n[n.length-1]!=="/"&&(n+="/"),n+=e,n}function jd(r){try{return new kn.URL(r),!0}catch{return!1}}function F0(r){return r.replace(/\/$/,"").replace(/\\$/,"")}var bV=/^https:\/\/([a-z0-9\-]+)\+\.vscode-resource\.vscode-(?:webview|cdn)\.net\/(.+)/i,O0="vscode-file://vscode-app/";function We(r){let e=bV.exec(r);if(e)r=`${e[1]}:///${e[2]}`;else if(r.startsWith("vscode-webview-resource://"))r=new kn.URL(r).pathname.replace(/%2F/gi,"/").replace(/^\/([a-z0-9\-]+)(\/{1,2})/i,(n,i,o)=>o.length===1?`${i}:///`:`${i}://`);else if(r.startsWith(O0))r=r.slice(O0.length);else if(!Er(r))return;return r=r.replace("file:///",""),r=decodeURIComponent(r),r.startsWith("/")&&process.platform==="win32"&&r[1]!=="/"&&(r="/"+r),r[0]!=="/"&&!r.match(/^[A-Za-z]:/)&&(r="/"+r),Xe(r)}function U0(r){return Er(r)&&(r=r.replace("file:///","\\\\"),r=r.replace(/\//g,"\\"),r=decodeURIComponent(r)),r}function He(r){return dy==="win32"?"file:///"+Vi(r):"file://"+Vi(r)}function ya(r){return r.startsWith("/")?"file://"+Vi(r):"file:///"+Vi(r)}function $t(r){return sr.posix.isAbsolute(r)||sr.win32.isAbsolute(r)}function At(r){return!!r&&r.startsWith("data:")}var cy=(r,e,t)=>{if(!t||r===":"){e.add(r);return}if(r==="/"){e.add(`\\${r}`);return}M0(r)?e.add(`\\${r}`):e.add(r);let n=encodeURIComponent(r);r!=="\\"&&n!==r&&e.add(n)},vV=r=>{switch(r.size){case 0:return"";case 1:return ma(r.values());default:let e=[...r];return e.some(t=>t.length>1)?`(?:${e.join("|")})`:`[${e.join("")}]`}},Nu=new Set;function Bu(r,e,t,n,i=Nd){let o="";for(let s of r.slice(e,t))i?cy(s,Nu,n):(cy(s.toLowerCase(),Nu,n),cy(s.toUpperCase(),Nu,n)),o+=vV(Nu),Nu.clear();return o}function Sr(r,[e,t]=[0,r.length]){if(t<=e)return r;let n=[],i=Bu(r,0,e,!1),o=Bu(r,t,r.length,!1),s=r.slice(e,t);for(let a of[decodeURIComponent(s),We(s)]){if(!a)continue;let c=Bu(a,0,a.length,!0);n.push(IV(`${i}${c}${o}`).concat("($|\\?)"))}return n.join("|")}var IV=r=>r.replace(/^(file:\\\/\\\/\\\/)?([a-z]):/i,(e,t="",n)=>`${t}[${n.toUpperCase()}${n.toLowerCase()}]:`);function Er(r){return r.startsWith("file:///")}var dy=process.platform;function Vi(r){return r=on(r),dy==="win32"?(kg(r)&&(r=r.slice(1)),r.split(/[\\//]/g).map((e,t)=>t>0?encodeURIComponent(e):e).join("/")):r.split("/").map(encodeURIComponent).join("/")}function on(r){return r&&dy==="win32"&&r[1]===":"?r[0].toUpperCase()+r.substring(1):r}var qi=(r,e=[])=>{let t=r.urlFilter||"file"in r&&r.file||r.url,n=t?AV(t,...e):void 0;return i=>!i.url.startsWith("devtools://")&&n?.(i.url)!==!1},ba=r=>e=>e.type==="page"&&!e.url.startsWith("edge://force-signin")&&r(e);function _V(r){return!!r&&!sr.isAbsolute(r)&&!!(0,kn.parse)(r).protocol}var AV=(...r)=>{let e=i=>{i=i.toLowerCase();let o=We(i);o?i=o:_V(i)&&i.includes("://")&&(i=i.substr(i.indexOf("://")+3)),i.endsWith("/")&&(i=i.substr(0,i.length-1));let s=i.indexOf("#");return s!==-1&&(i=i.slice(0,i[s-1]==="/"?s-1:s)),i},t=r.map(i=>Ut(e(i),"/*").replace(/(\/\*$)|\*/g,".*")),n=new RegExp("^("+t.join("|")+")$","g");return i=>(n.lastIndex=0,n.test(e(i)))};var va=class r{constructor(e,t,n,i,o){this.original=e;this.metadata=t;this.actualRoot=n;this.actualSources=i;this.hasNames=o;this.sourceActualToOriginal=new Map;this.sourceOriginalToActual=new Map;this.id=r.idCounter++;if(i.length!==e.sources.length)throw new Error("Expected actualSources.length === original.source.length");for(let s=0;swV(i,o)*n)}return Jg(this.original,{...e,source:t})}allGeneratedPositionsFor(e){return Yg(this.original,{...e,source:this.sourceActualToOriginal.get(e.source)??e.source})}sourceContentFor(e){e=this.sourceActualToOriginal.get(e)??e;let t=this.original.sources.indexOf(e);return t===-1?null:this.original.sourcesContent?.[t]??null}eachMapping(e){Qg(this.original,e)}decodedMappings(){return tn(this.original)}names(){return this.original.names}getBestGeneratedForOriginal(e,t){let n;return this.eachMapping(i=>{i.source===e&&(!n||t(i,n)>0)&&(n=i)}),n?{column:n.generatedColumn,line:n.generatedLine}:{column:null,line:null}}},wV=({originalLine:r,originalColumn:e},{originalLine:t,originalColumn:n})=>(r||0)-(t||0)||(e||0)-(n||0);async function j0(r,e,t,n){let i=Vd.Parser.parse(e,{locations:!0,ecmaVersion:"latest"}),o=new Du({file:r}),s=fi(i,{sourceMap:{addMapping:a=>Zg(o,a.original.line-1,a.original.column,r,a.generated.line-1,a.generated.column)}});return ey(o,r,s),new va(new Sd(Ed(o)),{sourceMapUrl:n,compiledPath:t},"",[r],!1)}function V0(r){let e;try{e=Tn(r)}catch{return}let t=(c,u)=>({type:"ExpressionStatement",expression:{type:"AssignmentExpression",operator:"=",left:c,right:u}}),n=!1,i=!1,o=Dd(e,{enter(c,u){switch(c.type){case"ClassDeclaration":return{replace:t(c.id||{type:"Identifier",name:"_default"},{...c,type:"ClassExpression"})};case"FunctionDeclaration":return{replace:t(c.id||{type:"Identifier",name:"_default"},{...c,type:"FunctionExpression"})};case"FunctionExpression":case"ArrowFunctionExpression":case"MethodDefinition":return 1;case"AwaitExpression":n=!0;return;case"ForOfStatement":c.await&&(n=!0);return;case"ReturnStatement":i=!0;return;case"VariableDeclaration":if(!u||!("body"in u)||!(u.body instanceof Array))return;let l=u.body,p=c.declarations.map(d=>({type:"ExpressionStatement",expression:{type:"UnaryExpression",operator:"void",prefix:!0,argument:{type:"AssignmentExpression",operator:"=",left:d.id,right:d.init||{type:"Identifier",name:"undefined"}}}}));l.splice(l.indexOf(c),1,...p)}}});if(!n||i)return;let s=e.body[e.body.length-1];s.type==="ExpressionStatement"&&(e.body[e.body.length-1]={type:"ReturnStatement",argument:s.expression});let a={type:"ExpressionStatement",expression:{type:"CallExpression",callee:{type:"ArrowFunctionExpression",params:[],generator:!1,expression:!1,async:!0,body:{type:"BlockStatement",body:o.body}},arguments:[],optional:!1}};return fi(a)}function Fu(r){try{let e=(0,Vd.parseExpressionAt)(r,0,iy);return e.end{if(a.line===null||a.column===null)return 1e11;let c=t.originalPositionFor(a);return c.line!==null?Math.abs(e.lineNumber-c.line):1e11},o=i(n),s=t.allGeneratedPositionsFor({source:r,line:e.lineNumber,column:e.columnNumber-1}).filter(a=>a.line!==null&&a.column!==null).sort((a,c)=>a.line!==c.line?a.line-c.line:a.column-c.column).map(a=>[a,i(a)]);return s.push([n,o]),s.sort(([a,c],[u,l])=>c-l||a.line-u.line||a.column-u.column),s[0][0]}var fy=(r,e)=>!!e&&((e.type==="FunctionExpression"||e.type==="FunctionDeclaration"||e.type==="ArrowFunctionExpression")&&e.params.includes(r)||(e.type==="ForInStatement"||e.type==="ForOfStatement")&&e.left===r||e.type==="VariableDeclarator"&&e.id===r||e.type==="AssignmentPattern"&&e.left===r||e.type==="CatchClause"&&e.param===r||"kind"in e&&e.kind==="init"&&e.value===r||e.type==="RestElement"&&e.argument===r||e.type==="AssignmentPattern"&&e.left===r);function Gi(r){try{new Function(r)}catch(e){return e}}function EV(r,e){let t=Tn(r),n,i;return Ui(t,{enter:o=>{let s=o;e>=s.start&&e/VM"+this.sourceReference;if(this.url.endsWith(".repl"))return"repl";if(this.url.startsWith(en))return di+"/"+this.url.slice(en.length);if(this.absolutePath.startsWith(di))return this.absolutePath;if($t(this.url))return this.url;let e=We(this.url);if(e)return e;let t=this.url;try{let n=[],i=new X0.URL(this.url);if(i.protocol==="data:")return"/VM"+this.sourceReference;i.hostname&&n.push(i.hostname),i.port&&n.push("\uA789"+i.port),i.pathname&&n.push(/^\/[a-z]:/.test(i.pathname)?i.pathname.slice(1):i.pathname);let o=i.searchParams?.toString();o&&n.push("?"+o),t=n.join("")}catch{}return t.endsWith("/")&&(t+="(index)"),this.inlineScriptOffset&&(t+=`\uA789${this.inlineScriptOffset.lineOffset+1}:${this.inlineScriptOffset.columnOffset+1}`),t}blackboxed(){return this._container.isSourceSkipped(this.url)}};var Uu;(n=>{async function r(i){return i.value.promise}n.waitForValue=r;function e(i,o){return i.type===0&&i.value.settledValue?Promise.resolve(i.value.settledValue):Promise.race([r(i),ue(o)])}n.waitForValueWithTimeout=e;async function t(i){return await r(i),i.sourceByUrl}n.waitForSources=t})(Uu||={});var Je=class extends Ko{constructor(){super(...arguments);this.compiledToSourceUrl=new Map}},Kd=class extends Ko{constructor(t,n,i){super(t,n.url,i,()=>Promise.resolve("Binary content not shown, see the decompiled WAT file"),void 0,void 0,void 0,void 0);this.event=n;this.sourceMap={type:1,value:ge(),sourceByUrl:new Map}}checkContentHash(){return Promise.resolve(void 0)}offsetScriptToSource(t){return t}offsetSourceToScript(t){return t}},Wt=r=>!!r&&r instanceof Ko&&!!r.sourceMap,Xo=r=>Wt(r)&&r.sourceMap.type===0,zo=r=>Wt(r)&&r.sourceMap.type===1,hy=r=>!!r&&typeof r.getDisassembly=="function";function z0(r,e){if(!e)return r;let{lineNumber:t,columnNumber:n}=r;return e&&(t+=e.lineOffset,t<=1&&(n+=e.columnOffset)),{...r,lineNumber:t,columnNumber:n}}function J0(r,e){if(!e)return r;let{lineNumber:t,columnNumber:n}=r;return e&&(t=Math.max(1,t-e.lineOffset),t<=1&&(n=Math.max(1,n-e.columnOffset))),{...r,lineNumber:t,columnNumber:n}}var Y0=r=>({lineNumber:r.lineNumber+1,columnNumber:r.columnNumber+1}),mi=r=>({lineNumber:r.lineNumber-1,columnNumber:r.columnNumber-1});var Q0=H("os");var xV={"pwa-extensionHost":null,"node-terminal":null,"pwa-node":null,"pwa-chrome":null,"pwa-msedge":null},PV={"extension.js-debug.addCustomBreakpoints":null,"extension.js-debug.addXHRBreakpoints":null,"extension.js-debug.editXHRBreakpoints":null,"extension.pwa-node-debug.attachNodeProcess":null,"extension.js-debug.clearAutoAttachVariables":null,"extension.js-debug.setAutoAttachVariables":null,"extension.js-debug.autoAttachToProcess":null,"extension.js-debug.createDebuggerTerminal":null,"extension.js-debug.createDiagnostics":null,"extension.js-debug.getDiagnosticLogs":null,"extension.js-debug.debugLink":null,"extension.js-debug.npmScript":null,"extension.js-debug.pickNodeProcess":null,"extension.js-debug.prettyPrint":null,"extension.js-debug.removeXHRBreakpoint":null,"extension.js-debug.removeAllCustomBreakpoints":null,"extension.js-debug.revealPage":null,"extension.js-debug.startProfile":null,"extension.js-debug.stopProfile":null,"extension.js-debug.toggleSkippingFile":null,"extension.node-debug.startWithStopOnEntry":null,"extension.js-debug.requestCDPProxy":null,"extension.js-debug.openEdgeDevTools":null,"extension.js-debug.callers.add":null,"extension.js-debug.callers.goToCaller":null,"extension.js-debug.callers.gotToTarget":null,"extension.js-debug.callers.remove":null,"extension.js-debug.callers.removeAll":null,"extension.js-debug.enableSourceMapStepping":null,"extension.js-debug.disableSourceMapStepping":null,"extension.js-debug.network.viewRequest":null,"extension.js-debug.network.copyUri":null,"extension.js-debug.network.openBody":null,"extension.js-debug.network.openBodyInHex":null,"extension.js-debug.network.replayXHR":null,"extension.js-debug.network.clear":null,"extension.js-debug.completion.nodeTool":null},j7=new Set(Object.keys(PV)),V7=new Set(Object.keys(xV));var de=Symbol("AnyLaunchConfiguration"),Z0={type:"",name:"",request:"",trace:!1,outputCapture:"console",timeout:1e4,timeouts:{},showAsyncStacks:!0,skipFiles:[],smartStep:!0,sourceMaps:!0,sourceMapRenames:!0,pauseForSourceMap:!0,resolveSourceMapLocations:null,rootPath:"${workspaceFolder}",outFiles:["${workspaceFolder}/**/*.(m|c|)js","!**/node_modules/**"],sourceMapPathOverrides:Hy("${workspaceFolder}"),enableContentValidation:!0,cascadeTerminateToConfigurations:[],enableDWARF:!0,__workspaceFolder:"",__remoteFilePrefix:void 0,__breakOnConditionalError:!1,customDescriptionGenerator:void 0,customPropertiesGenerator:void 0},ju={...Z0,cwd:"${workspaceFolder}",env:{},envFile:null,pauseForSourceMap:!1,sourceMaps:!0,localRoot:null,remoteRoot:null,resolveSourceMapLocations:["**","!**/node_modules/**"],autoAttachChildProcesses:!0,runtimeSourcemapPausePatterns:[],skipFiles:[`${di}/**`]},ex={...ju,showAsyncStacks:{onceBreakpointResolved:16},type:"node-terminal",request:"launch",name:"JavaScript Debug Terminal"},LV={...ju,type:"node-terminal",request:"attach",name:ex.name,showAsyncStacks:{onceBreakpointResolved:16},delegateId:-1},$V={...ju,type:"pwa-extensionHost",name:"Debug Extension",request:"launch",args:["--extensionDevelopmentPath=${workspaceFolder}"],outFiles:["${workspaceFolder}/out/**/*.js"],resolveSourceMapLocations:["${workspaceFolder}/**","!**/node_modules/**"],rendererDebugOptions:{},runtimeExecutable:"${execPath}",autoAttachChildProcesses:!1,debugWebviews:!1,debugWebWorkerHost:!1,__sessionId:""},CV={...ju,type:"pwa-node",request:"launch",program:"",cwd:"${workspaceFolder}",stopOnEntry:!1,console:"internalConsole",restart:!1,args:[],runtimeExecutable:"node",runtimeVersion:"default",runtimeArgs:[],profileStartup:!1,attachSimplePort:null,experimentalNetworking:"auto",killBehavior:"forceful"},my={...Z0,type:"pwa-chrome",request:"attach",address:"localhost",port:0,disableNetworkCache:!0,pathMapping:{},url:null,restart:!1,urlFilter:"",sourceMapPathOverrides:Hy("${webRoot}"),webRoot:"${workspaceFolder}",server:null,browserAttachLocation:"workspace",targetSelection:"automatic",vueComponentPaths:["${workspaceFolder}/**/*.vue","!**/node_modules/**"],perScriptSourcemaps:"auto"},DV={...my,type:"pwa-msedge",useWebView:!1},tx={...my,type:"pwa-chrome",request:"launch",cwd:null,file:null,env:{},urlFilter:"*",includeDefaultArgs:!0,includeLaunchArgs:!0,runtimeArgs:null,runtimeExecutable:"*",userDataDir:!0,browserLaunchLocation:"workspace",profileStartup:!1,cleanUp:"wholeBrowser"},TV={...tx,type:"pwa-msedge",useWebView:!1},MV={...ju,type:"pwa-node",attachExistingChildren:!0,address:"localhost",port:9229,restart:!1,request:"attach",continueOnAttach:!1};function Hy(r){return{"webpack:///./~/*":`${r}/node_modules/*`,"webpack:////*":"/*","webpack://@?:*/?:*/*":`${r}/*`,"webpack://?:*/*":`${r}/*`,"webpack:///([a-z]):/(.+)":"$1:/$2","meteor://\u{1F4BB}app/*":`${r}/*`,"turbopack://[project]/*":"${workspaceFolder}/*"}}var rx=r=>{!r.sourceMapPathOverrides&&r.cwd&&(r.sourceMapPathOverrides=Hy(r.cwd)),r.resolveSourceMapLocations===void 0&&(r.resolveSourceMapLocations=r.outFiles)};function RV({...r}){return rx(r),r.request==="attach"?{...MV,...r}:{...CV,...r}}function kV(r,e){return r.request==="attach"?{...my,browserAttachLocation:e,...r}:{...tx,browserLaunchLocation:e,...r}}function OV(r,e){return r.request==="attach"?{...DV,browserAttachLocation:e,...r}:{...TV,browserLaunchLocation:e,...r}}function NV(r){let e={...$V,...r};return e.skipFiles=[...e.skipFiles,"**/node_modules.asar/**","**/bootstrap-fork.js"],e}function BV(r){return rx(r),r.request==="launch"?{...ex,...r}:{...LV,...r}}function _a(r,e){let t,n=e==="remote"?"ui":"workspace";switch(r.type){case"pwa-node":t=RV(r);break;case"pwa-msedge":t=OV(r,n);break;case"pwa-chrome":t=kV(r,n);break;case"pwa-extensionHost":t=NV(r);break;case"node-terminal":t=BV(r);break;default:throw gp(r,"Unknown config: {value}")}return UV(t)}function FV(r){let e="${workspaceFolder}",t={...r,rootPath:void 0,outFiles:r.outFiles.filter(n=>!n.includes(e)),sourceMapPathOverrides:yp(r.sourceMapPathOverrides,n=>!n.includes("${workspaceFolder}"))};return"vueComponentPaths"in t&&(t.vueComponentPaths=t.vueComponentPaths.filter(n=>!n.includes(e))),"resolveSourceMapLocations"in t&&(t.resolveSourceMapLocations=t.resolveSourceMapLocations?.filter(n=>!n.includes(e))??null),"cwd"in t&&t.cwd?.includes(e)&&(t.cwd=t.request==="launch"&&t.type==="pwa-node"?(0,Q0.homedir)():void 0),"webRoot"in t&&t.webRoot?.includes(e)&&(t.webRoot="/"),t}function UV(r){return r.__workspaceFolder||(r=FV(r)),r=Wu(r,"workspaceFolder",r.__workspaceFolder),r=Wu(r,"webRoot","webRoot"in r?r.webRoot:r.__workspaceFolder),r}function Wu(r,e,t){let n;if(typeof r=="string")n=r.replace(new RegExp(`\\$\\{${e}\\}`,"g"),()=>{if(!t)throw new Error(`Unable to resolve \${${e}} in configuration (${JSON.stringify(e)})`);return t});else if(r instanceof Array)n=r.map(i=>Wu(i,e,t));else if(typeof r=="object"&&r){let i={};for(let[o,s]of Object.entries(r))i[Wu(o,e,t)]=Wu(s,e,t);n=i}else n=r;return n}var Xd="js-debug",Vu="1.96.0",WV="ms-vscode",nx=Xd.includes("nightly"),z7=`${WV}.${Xd}`;var ix=H("worker_threads");var Aa=H("worker_threads");function gy(r){let e=Tn(r),t=[],n=(s,{loc:a}=s,{loc:c}=s)=>{if(!a||!c)throw new Error("should include locations");t.push({start:a.start,end:c.end,depth:o.length}),o.push(s)},i=new Set,o=[];return Ui(e,{enter:s=>{switch(s.type){case"FunctionDeclaration":case"ArrowFunctionExpression":n(s,s.params[0]||s.body,s.body),i.add(s.body);break;case"Program":n(s);break;case"ForStatement":case"ForOfStatement":case"ForInStatement":n(s),i.add(s.body);break;case"BlockStatement":i.has(s)||n(s);break}},leave:s=>{s===o[o.length-1]&&o.pop()}}),t}Aa.isMainThread||Aa.parentPort?.postMessage(gy(Aa.workerData));var wa=class r{constructor(e){this.range=e}static hydrate(e,t){let n=new r(new nr(new zr(e[0].start.line,e[0].start.column),new zr(e[0].end.line,e[0].end.column))),i=[n],o=1;for(let s=1;s=0;s--)i[s].data=t(i[s]);return n}search(e){if(this.range.contains(e)){if(!this.children)return this;for(let t of this.children){let n=t.search(e);if(n)return n}return this}}findDeepest(e,t){if(this.range.contains(e)){if(this.children)for(let n of this.children){let i=n.findDeepest(e,t);if(i!==void 0)return i}return t(this)}}filterHoist(e){if(this.children)for(let t=0;tt.forEach(e))}forEachDepthFirst(e){this.children?.forEach(t=>t.forEach(e)),e(this)}toJSON(){return{range:this.range,children:this.children}}},jV=1024*512;function ox(r,e){return r.length{let i=new ix.Worker(`${__dirname}/renameWorker.js`,{workerData:r});i.on("message",o=>t(wa.hydrate(o,e))),i.on("error",n),i.on("exit",()=>n("rename worker exited"))})}var sx=/[$a-z_][$0-9A-Z_$]*/iy,ax=async(r,e)=>{let t=new ji(r),n=new Set,i=e.decodedMappings(),o=e.names(),s=(u,l,p)=>{let d=u*2147483647|l;if(n.has(d))return;n.add(d);let f=new Ve(u,l),h=t.convert(f);sx.lastIndex=h;let m=sx.exec(r);if(!m)return;let y=m[0];if(y!==p)return y},c=await ox(r,u=>{let l=u.range.begin.base0,p=u.range.end.base0,d;for(let f=l.lineNumber;f<=p.lineNumber;f++){let h=i[f];if(h)for(let m=0;mD||w===u.range.end.base0.lineNumber&&u.range.end.base0.columnNumberB.compiled==X)||d.push({compiled:X,original:j}))}}return d});return c.filterHoist(u=>!!u.data),c};var On=_(q());var zd=class extends Error{constructor(t,n,i){super(`Unexpected ${t} response from ${n}: ${i??""}`);this.statusCode=t;this.url=n;this.body=i}},Jo=Symbol("IResourceProvider");var we=_(je());var T=class extends Error{get cause(){return this._cause}constructor(e){super("__errorMarker"in e?e.error.format:e.format),this._cause="__errorMarker"in e?e.error:e}};function cx(r,e){r.output({category:"console",output:e+` +`})}function ve(r,e=9222){return{__errorMarker:!0,error:{id:e,format:r,showUser:!1}}}function ye(r,e=9223){return{__errorMarker:!0,error:{id:e,format:r,showUser:!0}}}var yy=()=>ye(we.t("Attribute 'runtimeVersion' requires Node.js version manager 'nvs', 'nvm' or 'fnm' to be installed."),9224),ux=()=>ye(we.t("Attribute 'runtimeVersion' with a flavor/architecture requires 'nvs' to be installed."),9225),lx=()=>ye(we.t("Attribute 'runtimeVersion' requires Node.js version manager 'nvm-windows' or 'nvs'."),9226),by=(r,e)=>ye(we.t("Node.js version '{0}' not installed using version manager {1}.",r,e),9226),px=r=>ye(we.t("Cannot launch debug target in terminal ({0}).",r),9227),dx=r=>ye(we.t("Can't load environment variables from file ({0}).",r),9228),fx=r=>ye(we.t("The configured `cwd` {0} does not exist.",r),9245),vy=(r,e)=>ye(we.t(`Can't find Node.js binary "{0}": {1}. Make sure Node.js is installed and in your PATH, or set the "runtimeExecutable" in your launch.json`,r,e),9229),hx=(r,e)=>ye(we.t('The Node version in "{0}" is outdated (version {1}), we require at least Node 8.x.',e,r),9230),Iy=r=>ye(we.t('Invalid hit condition "{0}". Expected an expression like "> 42" or "== 2".',r),9231),Sa=()=>ye(we.t("An error occurred taking a profile from the target."),9235),mx=()=>ye(we.t("Please stop the running profile before starting a new one."),9236),Hx=r=>ve(r,9238),Jd=(r,e,t)=>ye(e==="*"&&!t.length?we.t('Unable to find an installation of the browser on your system. Try installing it, or providing an absolute path to the browser in the "runtimeExecutable" in your launch.json.'):we.t('Unable to find {0} version {1}. Available auto-discovered versions are: {2}. You can set the "runtimeExecutable" in your launch.json to one of these, or provide an absolute path to the browser executable.',r,e,JSON.stringify([...new Set(t)])),9233),_y=r=>ye(we.t('Unable to launch browser: "{0}"',r.message),9240),qu=r=>ye(r??we.t("Unable to attach to browser"),9242),Yd=()=>ye(we.t('Target page not found. You may need to update your "urlFilter" to match the page you want to debug.'),9241);var gx=()=>ve(we.t("Variables not available in async stacks"),9234),Ki=(r,e)=>ye(we.t("Syntax error setting breakpoint with condition {0} on line {1}: {2}",JSON.stringify(r.condition),r.line,e),9237),Ay=()=>ve(we.t("Thread not found"),9244),Qd=(r,e)=>ye(we.t("Could not read source map for {0}: {1}",r,e)),yx=()=>ye(we.t("UWP webview debugging is not available on your platform.")),bx=()=>ye(we.t("Networking not available.")),vx=()=>ye(we.t("Could not connect to any UWP Webview pipe. Make sure your webview is hosted in debug mode, and that the `pipeName` in your `launch.json` is correct.")),Gu=()=>ye(we.t("Could not find a location for the variable")),Ix=r=>typeof r=="object"&&!!r&&"__errorMarker"in r,_x=(r,e)=>r instanceof T&&r.cause.id===e,Ax=r=>ye(we.t("The browser process exited with code {0} before connecting to the debug server. Make sure the `runtimeExecutable` is configured correctly and that it can run without errors.",r));var wx=new WeakSet;var VV="Request",qV=r=>r.endsWith("Request"),Yt=Symbol("IDapApi"),Ea=Symbol("IRootDapApi"),Ku=class{constructor(e,t){this.transport=e;this.logger=t;this._pendingRequests=new Map;this._requestHandlers=new Map;this._eventListeners=new Map;this.disposables=[];this._initialized=ge();this.closed=!1;this._sequence=1,this.disposables.push(this.transport.messageReceived(n=>this._onMessage(n.message,n.receivedTime))),this._dap=this._createApi()}get initializedBlocker(){return this._initialized.promise}attachTelemetry(e){this.telemetryReporter=e,e.attachDap(this._dap)}dap(){return this._dap}_createApi(){return new Proxy({},{get:(e,t)=>{if(t!=="then")return t==="on"?(n,i)=>(this._requestHandlers.set(n,i),()=>this._requestHandlers.delete(n)):t==="off"?n=>this._requestHandlers.delete(n):n=>{if(qV(t))return this.enqueueRequest(t.slice(0,-VV.length),n);this._send({seq:0,type:"event",event:t,body:n})}}})}createTestApi(){let e=(i,o)=>{let s=this._eventListeners.get(i);s||(s=new Set,this._eventListeners.set(i,s)),s.add(o)},t=(i,o)=>{let s=this._eventListeners.get(i);s&&s.delete(o)},n=(i,o)=>new Promise(s=>{let a=c=>{o&&!o(c)||(t(i,a),s(c))};e(i,a)});return new Proxy({},{get:(i,o)=>o==="on"?e:o==="off"?t:o==="once"?n:s=>this.enqueueRequest(o,s)})}enqueueRequest(e,t){return new Promise(n=>{let i={seq:0,type:"request",command:e,arguments:t||{}};this._send(i),this._pendingRequests.set(i.seq,n)})}stop(){this.closed=!0,this.transport.close()}_send(e,t){if(this.closed)this.logger.warn("dap.send","Not sending message because the connection has ended",e),t?.();else{e.seq=this._sequence++;let n=e.type!=="event"||!wx.has(e.body);this.transport.send(e,n,t)}}async _onMessage(e,t){if(e.type==="request"){let n={seq:0,type:"response",request_seq:e.seq,command:e.command,success:!0};try{let i=this._requestHandlers.get(e.command);if(!i)console.error(`Unknown request: ${e.command}`);else{let o=await i(e.arguments);if(Ix(o))this._send({...n,success:!1,message:o.error.format,body:{error:o.error}});else{let s={...n,body:o};n.command==="initialize"?(this._send(s),this._initialized.resolve(this)):n.command==="disconnect"?this._send({...n,body:o},()=>{this.stop()}):this._send(s)}}this.telemetryReporter?.reportOperation("dapOperation",e.command,t.elapsed().ms)}catch(i){i instanceof T?this._send({...n,success:!1,body:{error:i.cause}}):(console.error(i),this._send({...n,success:!1,body:{error:{id:9221,format:`Error processing ${e.command}: ${i.stack||i.message}`,showUser:!1,sendTelemetry:!1}}})),this.telemetryReporter?.reportOperation("dapOperation",e.command,t.elapsed().ms,i)}}if(e.type==="event"){let n=this._eventListeners.get(e.event)||new Set;for(let i of n)i(e.body)}if(e.type==="response"){let n=this._pendingRequests.get(e.request_seq);if(!this.logger.assert(n,`Expected callback for request sequence ID ${e.request_seq}`))return;if(this._pendingRequests.delete(e.request_seq),e.success)n(e.body);else{let i=e.body?.error?.format;n(i||e.message||"Unknown error")}}}};var Se=Symbol("ISourcePathResolver");var Nn=Symbol("ISourceMapFactory"),wy=Symbol("IRootSourceMapFactory"),Yo=class{constructor(e,t){this.root=e;this.resourceProvider=t}load(e){return this.root.load(this.resourceProvider,e)}guardSourceMapFn(e,t,n){return this.root.guardSourceMapFn(e,t,n)}};Yo=E([(0,On.injectable)(),g(0,(0,On.inject)(wy)),g(1,(0,On.inject)(Jo))],Yo);var Xu=class{constructor(e,t,n){this.pathResolve=e;this.dap=t;this.logger=n;this.hasWarnedAboutMaps=new WeakSet}async load(e,t){let n=await this.parseSourceMap(e,t.sourceMapUrl),i;"sourceRoot"in n&&(i=n.sourceRoot,n.sourceRoot=void 0);let o=!1,s=[];if("sections"in n){s=[];let a=0;for(let c of n.sections){let u=c.map;s.push(...u.sources),u.sources=u.sources.map(()=>`source${a++}.js`),o||=!!u.names?.length}}else"sources"in n&&Array.isArray(n.sources)&&(s=n.sources,n.sources=n.sources.map((a,c)=>`source${c}.js`),o=!!n.names?.length);return new va(new Sd(n),t,i??"",s,o)}async parseSourceMap(e,t){let n;try{n=await this.parseSourceMapDirect(e,t)}catch(i){if(n=await this.parsePathMappedSourceMap(e,t),!n)throw i}if("sections"in n){let i=await Promise.all(n.sections.map((o,s)=>"url"in o?this.parseSourceMap(e,o.url).then(a=>({offset:o.offset,map:a})).catch(a=>{this.logger.warn("sourcemap.parsing",`Error parsing nested map ${s}: ${a}`)}):o));n.sections=i.filter(It)}return n}async parsePathMappedSourceMap(e,t){if(At(t))return;let n=await this.pathResolve.urlToAbsolutePath({url:t});if(n)try{return this.parseSourceMapDirect(e,n)}catch(i){this.logger.info("sourcemap.parsing","Parsing path mapped source map failed.",i)}}guardSourceMapFn(e,t,n){try{return t()}catch(i){if(!/error parsing/i.test(String(i.message)))throw i;if(!this.hasWarnedAboutMaps.has(e)){let o=Qd(e.metadata.compiledPath,i.message).error;this.dap.output({output:o.format+` +`,category:"stderr"}),this.hasWarnedAboutMaps.add(e)}return n()}}dispose(){}async parseSourceMapDirect(e,t){let n=We(t);n&&(n=this.pathResolve.rebaseRemoteToLocal(n));let i=await e.fetch(n||t);if(!i.ok)throw i.error;let o=i.body;return o.slice(0,3)===")]}"&&(o=o.substring(o.indexOf(` +`))),JSON.parse(o)}};Xu=E([(0,On.injectable)(),g(0,(0,On.inject)(Se)),g(1,(0,On.inject)(Ea)),g(2,(0,On.inject)(U))],Xu);var Xi=class extends Xu{constructor(){super(...arguments);this.knownMaps=new Mn(t=>t.toLowerCase())}load(t,n){let i=this.knownMaps.get(n.sourceMapUrl);if(!i)return this.loadNewSourceMap(t,n);let o=n.cacheKey,s=i.metadata.cacheKey;return i.reloadIfNoMtime?o&&s&&o===s?(i.reloadIfNoMtime=!1,i.prom):this.loadNewSourceMap(t,n):s&&o&&o!==s?this.loadNewSourceMap(t,n):i.prom}loadNewSourceMap(t,n){let i=super.load(t,n);return this.knownMaps.set(n.sourceMapUrl,{metadata:n,reloadIfNoMtime:!1,prom:i}),i}dispose(){this.knownMaps.clear()}invalidateCache(){for(let t of this.knownMaps.values())t.reloadIfNoMtime=!0}};Xi=E([(0,On.injectable)()],Xi);var zi=Symbol("IRenameProvider"),xa=class{constructor(e,t,n){this.logger=e;this.sourceMapFactory=t;this.launchConfig=n;this.renames=new Map}provideOnStackframe(e){if(!this.launchConfig.sourceMapRenames)return xr.None;let t=e.uiLocation();return t===void 0?xr.None:"then"in t?t.then(n=>this.provideForSource(n?.source)):this.provideForSource(t?.source)}provideForSource(e){if(!this.launchConfig.sourceMapRenames||!(e instanceof Je))return xr.None;let t=ma(e.compiledToSourceUrl.keys());if(!t)throw new Error("unreachable");if(!Xo(t))return xr.None;let n=this.renames.get(t.url);if(n)return n;let i=this.sourceMapFactory.load(t.sourceMap.metadata).then(async o=>{if(!o?.hasNames)return xr.None;let s=await t.content();return s?await this.createFromSourceMap(o,s):xr.None}).catch(()=>xr.None);return this.renames.set(t.url,i),i}async createFromSourceMap(e,t){let n=Date.now(),i;try{i=await ax(t,e)}catch(s){return this.logger.info("runtime",`Error parsing content for source tree: ${s}}`,{url:e.metadata.compiledPath}),xr.None}let o=Date.now();return this.logger.info("runtime",`renames calculated in ${o-n}ms`,{url:e.metadata.compiledPath}),new xr(i)}};xa=E([(0,Pa.injectable)(),g(0,(0,Pa.inject)(U)),g(1,(0,Pa.inject)(Nn)),g(2,(0,Pa.inject)(de))],xa);var xr=class r{constructor(e){this.renames=e}static{this.None=new r(new wa(nr.ZERO))}getOriginalName(e,t){return this.getClosestRename(t,n=>n.compiled===e)?.original}getCompiledName(e,t){return this.getClosestRename(t,n=>n.original===e)?.compiled}getClosestRename(e,t){return this.renames.findDeepest(e,n=>n.data?.find(t))}};var La=Symbol("IContainer"),Bn=Symbol("StoragePath"),Ct=Symbol("IInitializeParams"),Fn=Symbol("VSCodeApi"),Qo=Symbol("IsVSCode"),Sx=Symbol("ExtensionContext"),Ey=Symbol("ProcessEnv"),xy=Symbol("execa"),$e=Symbol("FS"),Hi="ExtensionLocation",Zo=Symbol("IBrowserFinder"),KZ=Symbol("DwarfDebugging"),Ex=Symbol("SessionSubStates"),Sy=new WeakMap,Ye=(r,e)=>{if(!(typeof e=="object"&&e&&"dispose"in e))return e;let t=e,n=Sy.get(r.container);return n?n.push(t):Sy.set(r.container,[t]),e},ef=r=>{Sy.get(r)?.forEach(e=>e.dispose())},XZ=Symbol("IExtensionContribution"),zZ=Symbol("IDebugTerminalOptionsProviders");var Dt=Symbol("ITelemetryReporter");var xx=_(q());var Ji=Symbol("IShutdownParticipants"),$a=class{constructor(){this.participants=[]}register(e,t){if(this.shutdownStage!==void 0&&this.shutdownStage>=e)return t(!0),Ys;for(;this.participants.length<=e;)this.participants.push(new Set);return this.participants[e].add(t),{dispose:()=>this.participants[e].delete(t)}}async shutdownContext(){(this.shutdownStage===void 0||this.shutdownStage<0)&&await Promise.all([...this.participants[0]].map(e=>e(!1)))}async shutdownAll(){for(this.shutdownStage=0;this.shutdownStagee(!0)))}};$a=E([(0,xx.injectable)()],$a);var Xn=_(q());var tf=class{constructor(e=!1,t=!1){this.verified=e;this.hit=t}},rf=class{constructor(){this._statisticsById=new Map}registerBreakpoints(e){e.forEach(t=>{t.id!==void 0&&!this._statisticsById.has(t.id)&&this._statisticsById.set(t.id,new tf(t.verified,!1))})}registerResolvedBreakpoint(e){this.getStatistics(e).verified=!0}registerBreakpointHit(e){this.getStatistics(e).hit=!0}getStatistics(e){let t=this._statisticsById.get(e);if(t!==void 0)return t;{let n=new tf;return this._statisticsById.set(e,n),n}}statistics(){let e=0,t=0,n=0;for(let i of this._statisticsById.values())e++,i.hit&&n++,i.verified&&t++;return{set:e,verified:t,hit:n}}};var nf=async(r,e,t,n={})=>{let i=Date.now();try{return await t()}finally{r.verbose("perf.function","",{method:e,duration:Date.now()-i,...n})}};var Ju=H("fs"),ht=_(q()),of=_(H("path"));var es=_(q()),zu=_(H("path"));var Ca=class{get empty(){return this.patterns.length===0}constructor({rootPath:e,patterns:t}){!e||!t?(this.rootPath="",this.patterns=[]):(this.rootPath=e,this.patterns=t.map(n=>{let i=n.startsWith("!");return{negated:i,pattern:n.slice(i?1:0)}}))}*explode(){for(let e=0;ec.includes("*"));if(o===-1){yield{cwd:i.slice(0,-1).join("/"),pattern:i[i.length-1],negations:[]};continue}let s=i.slice(0,o).join("/"),a=[];for(let c=e+1;c{let n,o=`${(0,Px.basename)(r)}.map`;if(e.siblings.includes(o)&&(n=o),n||(typeof t>"u"&&(t=await Pw(r)),n=Ia(t)),!(!n||(At(n)||(n=Wi(He(r),n)),!n))&&!(!n.startsWith("data:")&&!n.startsWith("file://")))return{compiledPath:r,sourceMapUrl:n,cacheKey:e.mtime}};var Py=Symbol("InlineSourceMapUrl"),$x=10*1e3,ts=class{constructor(e){e.__workspaceCachePath&&(this.path=of.join(e.__workspaceCachePath,"bp-predict.json"))}async load(){if(this.value||!this.path)return this.value;try{this.value=JSON.parse(await Ju.promises.readFile(this.path,"utf-8"))}catch{}return this.value}async store(e){this.value=e,this.path&&(await Ju.promises.mkdir(of.dirname(this.path),{recursive:!0}),await Ju.promises.writeFile(this.path,JSON.stringify(e)))}};ts=E([(0,ht.injectable)(),g(0,(0,ht.inject)(de))],ts);var Wn=class{constructor(e,t,n,i,o,s){this.outFiles=e;this.repo=t;this.logger=n;this.sourceMapFactory=i;this.sourcePathResolver=o;this.state=s}async createMapping(e){if(this.outFiles.empty)return new Map;let t=Go(),n=await this.state.load();try{let{state:i}=await this.repo.streamChildrenWithSourcemaps({files:this.outFiles,processMap:async o=>{let s=[],a=await this.sourceMapFactory.load(o);for(let c of a.sources){if(c===null)continue;let u=this.sourcePathResolver?await this.sourcePathResolver.urlToAbsolutePath({url:c,map:a}):We(c);u&&s.push({...o,sourceMapUrl:At(o.sourceMapUrl)?{[Py]:o.sourceMapUrl}:o.sourceMapUrl,resolvedPath:u,sourceUrl:c})}return{discovered:s,compiledPath:Xe(o.compiledPath)}},onProcessedMap:({discovered:o})=>{for(let s of o){let a=t.get(s.resolvedPath);a||(a=new Set,t.set(s.resolvedPath,a)),a.add(s)}},lastState:n,...e});i&&this.state.store(i).catch(o=>this.logger.warn("runtime.exception","Error saving sourcemap cache",{error:o}))}catch(i){this.logger.warn("runtime.exception","Error reading sourcemaps from disk",{error:i})}return t}};Wn=E([(0,ht.injectable)(),g(0,(0,ht.inject)(Un)),g(1,(0,ht.inject)(Da)),g(2,(0,ht.inject)(U)),g(3,(0,ht.inject)(Nn)),g(4,(0,ht.inject)(Se)),g(5,(0,ht.inject)(ts))],Wn);var Ta=class extends Wn{async getMetadataForPaths(e){this.sourcePathToCompiled||(this.sourcePathToCompiled=this.createInitialMapping());let t=await this.sourcePathToCompiled;return e.map(n=>t.get(n))}async createInitialMapping(){return nf(this.logger,"BreakpointsPredictor.createInitialMapping",()=>this.createMapping())}};Ta=E([(0,ht.injectable)()],Ta);var Ma=class extends Wn{constructor(){super(...arguments);this.sourcePathToCompiled=new Map}async getMetadataForPaths(t){let n=t.map(s=>this.sourcePathToCompiled.get(s)),i=t.map((s,a)=>a).filter(s=>!n[s]);if(i.length){let s=new Set(i.map(c=>Xe(t[c]))),a=this.createMapping({filter:(c,u)=>!u||u.discovered.some(l=>s.has(l.resolvedPath))});for(let c of i)this.sourcePathToCompiled.set(t[c],a),n[c]=a}return await Promise.all(n.map(async(s,a)=>(await s).get(t[a])))}};Ma=E([(0,ht.injectable)()],Ma);var ns=Symbol("IBreakpointsPredictor"),rs=class{constructor(e,t,n,i){this.bpSearch=e;this.outFiles=t;this.logger=n;this.sourceMapFactory=i;this.predictedLocations=new Map;this.longParseEmitter=new C;this.targetedMode=!1;this.onLongParse=this.longParseEmitter.event}async predictBreakpoints(e){if(!e.source.path||!e.breakpoints?.length)return;let t=await this.getMetadataForPaths([e.source.path]).then(i=>i[0]);if(!t)return;let n=async(i,o,s)=>{let a=typeof s.sourceMapUrl=="string"?s.sourceMapUrl:s.sourceMapUrl.hasOwnProperty(Py)?s.sourceMapUrl[Py]:await Ju.promises.readFile(s.compiledPath,"utf8").then(Ia);if(!a)return[];let c=await this.sourceMapFactory.load({...s,sourceMapUrl:a}),u=this.sourceMapFactory.guardSourceMapFn(c,()=>qd(s.sourceUrl,{lineNumber:i,columnNumber:o||1},c),()=>null);if(!u||u.line===null)return[];let l=await this.getMetadataForPaths([s.compiledPath]).then(p=>p[0]);return l?(await Promise.all([...l].map(d=>n(u.line,u.column,d)))).flat():[{absolutePath:s.compiledPath,lineNumber:u.line||1,columnNumber:u.column?u.column+1:1}]};for(let i of e.breakpoints??[]){let o=`${e.source.path}:${i.line}:${i.column||1}`;if(this.predictedLocations.has(o))return;let s=[];this.predictedLocations.set(o,s);for(let a of t)s.push(...await n(i.line,i.column||0,a))}}async getPredictionForSource(e){return this.getMetadataForPaths([e]).then(t=>t[0])}async getMetadataForPaths(e){let t=setTimeout(()=>{this.longParseEmitter.fire(),this.logger.warn("runtime.sourcemap","Long breakpoint predictor runtime",{longPredictionWarning:$x,patterns:[...this.outFiles.explode()].join(", ")})},$x),n=await this.bpSearch.getMetadataForPaths(e);return clearTimeout(t),n}predictedResolvedLocations(e){let t=`${e.absolutePath}:${e.lineNumber}:${e.columnNumber||1}`;return this.predictedLocations.get(t)??[]}};rs=E([(0,ht.injectable)(),g(0,(0,ht.inject)(Wn)),g(1,(0,ht.inject)(Un)),g(2,(0,ht.inject)(U)),g(3,(0,ht.inject)(Nn))],rs);var Ba=_(q());var Dx=H("crypto"),ka=_(q());var GV=0,Be=Symbol("ICdpApi"),is=class extends Error{constructor(t){super("<>");this.method=t}setCause(t,n){return this.cause={code:t,message:n},this.message=`CDP error ${t} calling method ${this.method}: ${n}`,this.stack=this.stack?.replace("<>",this.message),this}},it=class{constructor(e,t,n){this.logger=t;this.telemetryReporter=n;this._connectionId=GV++;this._lastId=1e3;this._disposedSessions=new Map;this._onDisconnectedEmitter=new C;this.waitWrapper=XV();this.onDisconnected=this._onDisconnectedEmitter.event;this._transport=e,this._transport.onMessage(([i,o])=>this._onMessage(i,o)),this._transport.onEnd(()=>this._onTransportClose()),this._sessions=new Map,this._closed=!1,this._rootSession=new sf(this,"",this.logger),this._sessions.set("",this._rootSession)}rootSession(){return this._rootSession.cdp()}_send(e,t={},n){let i=++this._lastId,o={id:i,method:e,params:t};n&&(o.sessionId=n);let s=JSON.stringify(o);return this.logger.verbose("cdp.send",void 0,{connectionId:this._connectionId,message:o}),this._transport.send(s),i}_onMessage(e,t){let n=JSON.parse(e),i=n;n.result&&n.result.scriptSource?i={...n,result:{...n.result,scriptSource:" + + + `),e}dumpBreakpoints(){let e=[];for(let t of[this.breakpoints.appliedByPath,this.breakpoints.appliedByRef])for(let n of t.values())for(let i of n){let o=i.diagnosticDump();e.push({source:o.source,params:o.params,cdp:o.cdp.map(s=>s.state===1?{...s,uiLocations:s.uiLocations.map(a=>this.dumpUiLocation(a))}:{...s,done:void 0})})}return e}dumpSources(){let e=[],t=0;for(let n of this.sources.sources)e.push((async()=>({uniqueId:t++,url:n.url,sourceReference:n.sourceReference,absolutePath:n.absolutePath,actualAbsolutePath:await n.existingAbsolutePath(),scriptIds:n.scripts.map(i=>i.scriptId),prettyName:await n.prettyName(),compiledSourceRefToUrl:n instanceof Je?[...n.compiledToSourceUrl.entries()].map(([i,o])=>[i.sourceReference,o]):void 0,sourceMap:Xo(n)?{url:n.sourceMap.metadata.sourceMapUrl,metadata:n.sourceMap.metadata,sources:ci(Object.fromEntries(n.sourceMap.sourceByUrl),i=>i.sourceReference)}:void 0}))());return Promise.all(e)}dumpUiLocation(e){return{lineNumber:e.lineNumber,columnNumber:e.columnNumber,sourceReference:e.source.sourceReference}}};uo=E([(0,ys.injectable)(),g(0,(0,ys.inject)($e)),g(1,(0,ys.inject)(mt)),g(2,(0,ys.inject)(Dr)),g(3,(0,ys.inject)(Zn))],uo);var lo=_(q());var pc=Symbol("IExceptionPauseService");var lc=class{constructor(e,t,n,i,o){this.evaluator=e;this.scriptSkipper=t;this.dap=n;this.sourceContainer=o;this.state={cdp:"none"};this.blocker=ge();this.noDebug=!!i.noDebug,this.breakOnError=i.__breakOnConditionalError,this.blocker.resolve()}get launchBlocker(){return this.blocker.promise}async setBreakpoints(e){if(!this.noDebug){try{this.state=this.parseBreakpointRequest(e)}catch(t){if(!(t instanceof T))throw t;this.dap.output({category:"stderr",output:t.message});return}this.cdp?await this.sendToCdp(this.cdp):this.state.cdp!=="none"&&this.blocker.hasSettled()&&(this.blocker=ge())}}async shouldPauseAt(e){if(e.reason!=="exception"&&e.reason!=="promiseRejection"||this.state.cdp==="none"||e.callFrames.some(n=>this.sourceContainer.getSourceScriptById(n.location.scriptId)?.url.endsWith(".cdp"))||this.shouldScriptSkip(e))return!1;let t=this.state.condition;if(e.data?.uncaught){if(t.uncaught&&!await this.evalCondition(e,t.uncaught))return!1}else if(t.caught&&!await this.evalCondition(e,t.caught))return!1;return!0}async apply(e){this.cdp=e,this.state.cdp!=="none"&&await this.sendToCdp(e)}async sendToCdp(e){await e.Debugger.setPauseOnExceptions({state:this.state.cdp}),this.blocker.resolve()}async evalCondition(e,t){return!!(await t({callFrameId:e.callFrames[0].callFrameId},i=>i==="error"?e.data:void 0))?.result.value}shouldScriptSkip(e){if(e.data?.uncaught||!e.callFrames.length)return!1;let t=this.sourceContainer.getScriptById(e.callFrames[0].location.scriptId);return!!t&&this.scriptSkipper.isScriptSkipped(t.url)}parseBreakpointRequest(e){let t=(e.filterOptions??[]).concat(e.filters.map(a=>({filterId:a}))),n="none",i=[],o=[];for(let{filterId:a,condition:c}of t)a==="all"?(n="all",c&&i.push(a)):a==="uncaught"&&(n==="none"&&(n="uncaught"),c&&o.push(a));let s=a=>{if(a.length===0)return;let c="!!("+t.map(p=>p.condition).filter(It).join(") || !!(")+")",u=Gi(c);if(u)throw new T(Ki({line:0,condition:c},u.message));let l=Ly(c,this.breakOnError);return this.evaluator.prepare(l,{hoist:["error"]}).invoke};return n==="none"?{cdp:n}:{cdp:n,condition:{caught:s(i),uncaught:s(o)}}}};lc=E([(0,lo.injectable)(),g(0,(0,lo.inject)(Pr)),g(1,(0,lo.inject)(Qi)),g(2,(0,lo.inject)(Yt)),g(3,(0,lo.inject)(de)),g(4,(0,lo.inject)(mt))],lc);var vh=_(q());var yh=class{constructor(){this.didEnable=new WeakSet}async retrieve(e){this.didEnable.has(e)||(this.didEnable.add(e),await e.Performance.enable({}));let t=await e.Performance.getMetrics({});if(!t)return{error:"Error in CDP"};let n={};for(let i of t.metrics)n[i.name]=i.value;return{metrics:n}}};var bh=class{async retrieve(e){let t=await e.Runtime.evaluate({expression:`({ + memory: process.memoryUsage(), + cpu: process.cpuUsage(), + timestamp: Date.now(), + resourceUsage: process.resourceUsage && process.resourceUsage(), + })${Ne()}`,returnByValue:!0});return t?t.exceptionDetails?{error:t.exceptionDetails.text}:{metrics:t.result.value}:{error:"No response from CDP"}}};var Ih=Symbol("IPerformanceProvider"),bs=class{constructor(e){this.target=e}create(){return this.target.type()==="node"?new bh:new yh}};bs=E([(0,vh.injectable)(),g(0,(0,vh.inject)(Zn))],bs);var lv=_(je()),RC=H("crypto"),po=_(q()),kC=H("os"),OC=H("path");var wh=_(q());var ov=_(je()),vs=_(q()),_h=H("path");var dc=class{constructor(e){this.sources=e;this.locationIdCounter=0;this.locationsByRef=new Map}getLocationIdFor(e){let t=[e.functionName,e.url,e.scriptId,e.lineNumber,e.columnNumber].join(":"),n=this.locationsByRef.get(t);if(n)return n.id;let i=this.locationIdCounter++;return this.locationsByRef.set(t,{id:i,callFrame:e,locations:(async()=>{let o=await this.sources.getScriptById(e.scriptId)?.source;if(!o)return[];let s=await this.sources.currentSiblingUiLocations({lineNumber:e.lineNumber+1,columnNumber:e.columnNumber+1,source:o});return Promise.all(s.map(async a=>({...a,source:await a.source.toDap()})))})()}),i}getLocations(){return Promise.all([...this.locationsByRef.values()].sort((e,t)=>e.id-t.id).map(async e=>({callFrame:e.callFrame,locations:await e.locations})))}};var gt=class{constructor(e,t,n,i){this.cdp=e;this.fs=t;this.sources=n;this.launchConfig=i}static canApplyTo(){return!0}async start(e,t){if(!await this.cdp.Profiler.start({}))throw new T(Sa());return new sv(this.cdp,this.fs,this.sources,this.launchConfig.__workspaceFolder,t)}async save(e,t){let n=await DC(e,this.sources,this.launchConfig.__workspaceFolder);(0,_h.isAbsolute)(t)||(t=(0,_h.join)(this.launchConfig.__workspaceFolder,t)),await this.fs.writeFile(t,JSON.stringify(n))}};gt.type="cpu",gt.extension=".cpuprofile",gt.label=ov.t("CPU Profile"),gt.description=ov.t("Generates a .cpuprofile file you can open in VS Code or the Edge/Chrome devtools"),gt.editable=!0,gt=E([(0,vs.injectable)(),g(0,(0,vs.inject)(Be)),g(1,(0,vs.inject)($e)),g(2,(0,vs.inject)(mt)),g(3,(0,vs.inject)(de))],gt);var sv=class{constructor(e,t,n,i,o){this.cdp=e;this.fs=t;this.sources=n;this.workspaceFolder=i;this.file=o;this.stopEmitter=new C;this.disposed=!1;this.onUpdate=new C().event;this.onStop=this.stopEmitter.event}async dispose(){this.disposed||(this.disposed=!0,this.stopEmitter.fire())}async stop(){let e=await this.cdp.Profiler.stop({});if(!e)throw new T(Sa());await this.dispose();let t=await DC(e.profile,this.sources,this.workspaceFolder);await this.fs.writeFile(this.file,JSON.stringify(t))}};async function DC(r,e,t){let n=new dc(e),i=r.nodes.map(o=>({...o,locationId:n.getLocationIdFor(o.callFrame),positionTicks:o.positionTicks?.map(s=>({...s,startLocationId:n.getLocationIdFor({...o.callFrame,lineNumber:s.line-1,columnNumber:0}),endLocationId:n.getLocationIdFor({...o.callFrame,lineNumber:s.line,columnNumber:0})}))}));return{...r,nodes:i,$vscode:{rootPath:t,locations:await n.getLocations()}}}var av=_(je()),Is=_(q());var fr=class{constructor(e,t,n,i){this.cdp=e;this.fs=t;this.sources=n;this.launchConfig=i}static canApplyTo(){return!0}async start(e,t){if(await this.cdp.HeapProfiler.enable({}),!await this.cdp.HeapProfiler.startSampling({}))throw new T(Sa());return new cv(this.cdp,this.fs,this.sources,this.launchConfig.__workspaceFolder,t)}};fr.type="heap",fr.extension=".heapprofile",fr.label=av.t("Heap Profile"),fr.description=av.t("Generates a .heapprofile file you can open in VS Code or the Edge/Chrome devtools"),fr.editable=!0,fr=E([(0,Is.injectable)(),g(0,(0,Is.inject)(Be)),g(1,(0,Is.inject)($e)),g(2,(0,Is.inject)(mt)),g(3,(0,Is.inject)(de))],fr);var cv=class{constructor(e,t,n,i,o){this.cdp=e;this.fs=t;this.sources=n;this.workspaceFolder=i;this.file=o;this.stopEmitter=new C;this.disposed=!1;this.onUpdate=new C().event;this.onStop=this.stopEmitter.event}async dispose(){this.disposed||(this.disposed=!0,await this.cdp.HeapProfiler.disable({}),this.stopEmitter.fire())}async stop(){let e=await this.cdp.HeapProfiler.stopSampling({});if(!e)throw new T(Sa());await this.dispose();let t=await this.annotateSources(e.profile);await this.fs.writeFile(this.file,JSON.stringify(t))}async annotateSources(e){let t=new dc(this.sources),n=(o,s)=>{s.locationId=t.getLocationIdFor(o.callFrame);for(let a of o.children){let c={...a,children:[]};s.children.push(c),n(a,c)}},i={...e.head,children:[]};return n(e.head,i),{...e,head:i,$vscode:{rootPath:this.workspaceFolder,locations:await t.getLocations()}}}};var uv=_(je()),TC=H("fs"),Ah=_(q());var hr=class{constructor(e){this.cdp=e;this.cdp.HeapProfiler.on("addHeapSnapshotChunk",({chunk:t})=>this.currentWriter?.stream.write(t))}static canApplyTo(){return!0}async start(e,t){return{onStop:new C().event,onUpdate:new C().event,dispose:()=>{},stop:async()=>{await this.cdp.HeapProfiler.enable({}),await this.dumpToFile(t),await this.cdp.HeapProfiler.disable({})}}}async dumpToFile(e){let{stream:t,promise:n}=this.currentWriter={stream:(0,TC.createWriteStream)(e),promise:this.cdp.HeapProfiler.takeHeapSnapshot({})};await n,t.end(),this.currentWriter=void 0}};hr.type="memory",hr.extension=".heapsnapshot",hr.label=uv.t("Heap Snapshot"),hr.description=uv.t("Generates a .heapsnapshot file you can open in VS Code or the Edge/Chrome devtools"),hr.instant=!0,hr=E([(0,Ah.injectable)(),g(0,(0,Ah.inject)(Be))],hr);var Sh=Symbol("IProfilerFactory"),MC=()=>{let r=new Date;return["vscode-profile",r.getFullYear(),r.getMonth()+1,r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds()].map(e=>String(e).padStart(2,"0")).join("-")},wi=class{constructor(e){this.container=e}get(e){let t=wi.ctors.find(n=>n.type===e);if(!t)throw new Error(`Invalid profilter type ${e}`);return this.container.get(t)}};wi.ctors=[gt,fr,hr],wi=E([(0,wh.injectable)(),g(0,(0,wh.inject)(La))],wi);var Eh=Symbol("IProfileController"),fc=class{constructor(e,t,n,i,o){this.cdp=e;this.factory=t;this.basicCpuProfiler=n;this.breakpoints=i;this.shutdown=o;this.seenConsoleProfileNames=Object.create(null)}connect(e,t){e.on("startProfile",async n=>(await this.start(e,t,n),{})),e.on("stopProfile",()=>this.stopProfiling(e)),this.cdp.Profiler.on("consoleProfileStarted",()=>{e.output({output:lv.t("Console profile started")+` +`,category:"console"})}),this.cdp.Profiler.on("consoleProfileFinished",async n=>{let i=this.saveConsoleProfile(e,n),o=this.shutdown.register(0,()=>i);await i,o.dispose()}),t.onPaused(()=>this.stopProfiling(e))}async start(e,t,n){if(this.profile)throw new T(mx());this.profile=this.startProfileInner(e,t,n).catch(i=>{throw this.profile=void 0,i}),await this.profile}async saveConsoleProfile(e,t){let n;if(t.title){n=t.title.replace(/[\/\\]/g,"-");let i=this.seenConsoleProfileNames[t.title]||0;this.seenConsoleProfileNames[t.title]=i+1,i>0&&(n+=`-${i}`)}else n=MC();n+=gt.extension,await this.basicCpuProfiler.save(t.profile,n),e.output({output:lv.t('CPU profile saved as "{0}" in your workspace folder',n)+` +`,category:"console"})}async startProfileInner(e,t,n){let i=!1,o;if(n.stopAtBreakpoint?.length){let l=new Set(n.stopAtBreakpoint);i=!0,o=p=>!(p instanceof Lr)||l.has(p.dapId)}else o=()=>!1;await this.breakpoints.applyEnabledFilter(o);let s=(0,OC.join)((0,kC.tmpdir)(),`vscode-js-profile-${(0,RC.randomBytes)(4).toString("hex")}`),a=await this.factory.get(n.type).start(n,s),c={file:s,profile:a,enableFilter:o,keptDebuggerOn:i};a.onUpdate(l=>e.profilerStateUpdate({label:l,running:!0})),a.onStop(()=>this.disposeProfile(c));let u=!!t.pausedDetails();return i?await t.resume():u&&(await this.cdp.Debugger.disable({}),u&&t.onResumed()),e.profileStarted({file:c.file,type:n.type}),c}async stopProfiling(e){let t=await this.profile?.catch(()=>{});return!t||!this.profile?{}:(this.profile=void 0,await t?.profile.stop(),e.profilerStateUpdate({label:"",running:!1}),{})}async disposeProfile({profile:e,enableFilter:t,keptDebuggerOn:n}){n||await this.cdp.Debugger.enable({}),await this.breakpoints.applyEnabledFilter(void 0,t),e.dispose()}};fc=E([(0,po.injectable)(),g(0,(0,po.inject)(Be)),g(1,(0,po.inject)(Sh)),g(2,(0,po.inject)(gt)),g(3,(0,po.inject)(Dr)),g(4,(0,po.inject)(Ji))],fc);var _s=class r{constructor(e,t,n,i){this.asyncStackPolicy=t;this.launchConfig=n;this._services=i;this._disposables=new Ae;this._customBreakpoints=[];this._xhrBreakpoints=[];this._threadDeferred=ge();this.breakpointIdCounter=bp();this._cdpProxyProvider=this._services.get(qf);this._configurationDoneDeferred=ge(),this.sourceContainer=i.get(mt),this.breakpointManager=i.get(Dr);let o=i.get(Ih),s=i.get(Dt);s.onFlush(()=>{s.report("breakpointStats",this.breakpointManager.statisticsForTelemetry()),s.report("statistics",this.sourceContainer.statistics())}),this.dap=e,this.dap.on("initialize",a=>this.onInitialize(a)),this.dap.on("setBreakpoints",a=>this._onSetBreakpoints(a)),this.dap.on("setExceptionBreakpoints",a=>this.setExceptionBreakpoints(a)),this.dap.on("configurationDone",()=>this.configurationDone()),this.dap.on("loadedSources",()=>this._onLoadedSources()),this.dap.on("disableSourcemap",a=>this._onDisableSourcemap(a)),this.dap.on("source",a=>this._onSource(a)),this.dap.on("threads",()=>this._onThreads()),this.dap.on("stackTrace",a=>this._withThread(c=>c.stackTrace(a))),this.dap.on("variables",a=>this._onVariables(a)),this.dap.on("readMemory",a=>this._onReadMemory(a)),this.dap.on("writeMemory",a=>this._onWriteMemory(a)),this.dap.on("setVariable",a=>this._onSetVariable(a)),this.dap.on("setExpression",a=>this._onSetExpression(a)),this.dap.on("continue",()=>this._withThread(a=>a.resume())),this.dap.on("pause",()=>this._withThread(a=>a.pause())),this.dap.on("next",()=>this._withThread(a=>a.stepOver())),this.dap.on("stepIn",a=>this._withThread(c=>c.stepInto(a.targetId))),this.dap.on("stepOut",()=>this._withThread(a=>a.stepOut())),this.dap.on("restartFrame",a=>this._withThread(c=>c.restartFrame(a))),this.dap.on("scopes",a=>this._withThread(c=>c.scopes(a))),this.dap.on("evaluate",a=>this.onEvaluate(a)),this.dap.on("completions",a=>this._withThread(c=>c.completions(a))),this.dap.on("exceptionInfo",()=>this._withThread(a=>a.exceptionInfo())),this.dap.on("setCustomBreakpoints",a=>this.setCustomBreakpoints(a)),this.dap.on("toggleSkipFileStatus",a=>this._toggleSkipFileStatus(a)),this.dap.on("toggleSkipFileStatus",a=>this._toggleSkipFileStatus(a)),this.dap.on("prettyPrintSource",a=>this._prettyPrintSource(a)),this.dap.on("locations",a=>this._onLocations(a)),this.dap.on("revealPage",()=>this._withThread(a=>a.revealPage())),this.dap.on("getPerformance",()=>this._withThread(a=>o.retrieve(a.cdp()))),this.dap.on("breakpointLocations",a=>this._breakpointLocations(a)),this.dap.on("createDiagnostics",a=>this._dumpDiagnostics(a)),this.dap.on("requestCDPProxy",()=>this._requestCDPProxy()),this.dap.on("setExcludedCallers",a=>this._onSetExcludedCallers(a)),this.dap.on("saveDiagnosticLogs",({toFile:a})=>this._saveDiagnosticLogs(a)),this.dap.on("setSourceMapStepping",a=>this._setSourceMapStepping(a)),this.dap.on("stepInTargets",a=>this._stepInTargets(a)),this.dap.on("setDebuggerProperty",a=>this._setDebuggerProperty(a)),this.dap.on("setSymbolOptions",a=>this._setSymbolOptions(a)),this.dap.on("networkCall",a=>this._doNetworkCall(a)),this.dap.on("enableNetworking",a=>this._withThread(c=>c.enableNetworking(a))),this.dap.on("getPreferredUILocation",a=>this._getPreferredUILocation(a))}async _getPreferredUILocation(e){let t=this.sourceContainer.source(e.source);if(!t)return e;let n=await this.sourceContainer.preferredUiLocation({columnNumber:e.column+1,lineNumber:e.line+1,source:t});return{column:n.columnNumber-1,line:n.lineNumber-1,source:await n.source.toDap()}}async _doNetworkCall({method:e,params:t}){return this._thread?this._thread.cdp().Network[e](t):Promise.resolve({})}_setDebuggerProperty(e){return this._thread?.cdp().DotnetDebugger.setDebuggerProperty(e),Promise.resolve({})}_setSymbolOptions(e){return this._thread?.cdp().DotnetDebugger.setSymbolOptions(e),Promise.resolve({})}_breakpointLocations(e){return this._withThread(async t=>{let n=this.sourceContainer.source(e.source);return n?{breakpoints:(await this.breakpointManager.getBreakpointLocations(t,n,new ke(e.line,e.column||1),new ke(e.endLine||e.line+1,e.endColumn||e.column||1))).map(o=>o.uiLocations.find(s=>s.source===n)).filter(It).map(o=>({line:o.lineNumber,column:o.columnNumber}))}:{breakpoints:[]}})}_stepInTargets(e){return this._withThread(async t=>({targets:await t.getStepInTargets(e.frameId)}))}_setSourceMapStepping({enabled:e}){return this.sourceContainer.doSourceMappedStepping=e,Promise.resolve({})}async _saveDiagnosticLogs(e){let t=this._services.get(U).getRecentLogs();return await this._services.get($e).writeFile(e,t.map(n=>JSON.stringify(n)).join(` +`)),{}}async launchBlocker(){await this._configurationDoneDeferred.promise,await this._thread?.debuggerReady.promise,await this._services.get(pc).launchBlocker,await this.breakpointManager.launchBlocker()}async _onSetExcludedCallers({callers:e}){return(await this._threadDeferred.promise).setExcludedCallers(e),{}}async onInitialize(e){console.assert(e.linesStartAt1),console.assert(e.columnsStartAt1),this._services.get(Hl).value=e;let t=r.capabilities(!0);return setTimeout(()=>this.dap.initialized({}),0),setTimeout(()=>this._thread?.dapInitialized(),0),t}static capabilities(e=!1){return{supportsConfigurationDoneRequest:!0,supportsFunctionBreakpoints:!1,supportsConditionalBreakpoints:!0,supportsHitConditionalBreakpoints:!0,supportsEvaluateForHovers:!0,supportsReadMemoryRequest:!0,supportsWriteMemoryRequest:!0,exceptionBreakpointFilters:[{filter:"all",label:Or.t("Caught Exceptions"),default:!1,supportsCondition:!0,description:Or.t("Breaks on all throw errors, even if they're caught later."),conditionDescription:'error.name == "MyError"'},{filter:"uncaught",label:Or.t("Uncaught Exceptions"),default:!1,supportsCondition:!0,description:Or.t("Breaks only on errors or promise rejections that are not handled."),conditionDescription:'error.name == "MyError"'}],supportsStepBack:!1,supportsSetVariable:!0,supportsRestartFrame:!0,supportsGotoTargetsRequest:!1,supportsStepInTargetsRequest:!0,supportsCompletionsRequest:!0,supportsModulesRequest:!1,additionalModuleColumns:[],supportedChecksumAlgorithms:[],supportsRestartRequest:!0,supportsExceptionOptions:!1,supportsValueFormattingOptions:!0,supportsExceptionInfoRequest:!0,supportTerminateDebuggee:!0,supportsDelayedStackTraceLoading:!0,supportsLoadedSourcesRequest:!0,supportsLogPoints:!0,supportsTerminateThreadsRequest:!1,supportsSetExpression:!0,supportsTerminateRequest:!1,completionTriggerCharacters:[".","[",'"',"'"],supportsBreakpointLocationsRequest:!0,supportsClipboardContext:!0,supportsExceptionFilterOptions:!0,supportsEvaluationOptions:!!e,supportsDebuggerProperties:!!e,supportsSetSymbolOptions:!!e,supportsANSIStyling:!0}}async _onSetBreakpoints(e){return this.breakpointManager.setBreakpoints(e,e.breakpoints?.map(()=>this.breakpointIdCounter())??[])}async setExceptionBreakpoints(e){return await this._services.get(pc).setBreakpoints(e),{}}async configurationDone(){return this._configurationDoneDeferred.resolve(),{}}async _onLoadedSources(){return{sources:await this.sourceContainer.loadedSources()}}async _onDisableSourcemap(e){let t=this.sourceContainer.source(e.source);if(!t)return ve(Or.t("Source not found"));if(!(t instanceof Je))return ve(Or.t("Source not a source map"));for(let n of t.compiledToSourceUrl.keys())this.sourceContainer.disableSourceMapForSource(n,!0);return await this._thread?.refreshStackTrace(),{}}async _onSource(e){e.source||(e.source={sourceReference:e.sourceReference}),e.source.path=on(e.source.path);let t=this.sourceContainer.source(e.source);if(!t)return ve(Or.t("Source not found"));let n=await t.content();return n===void 0?(t instanceof Je&&this.dap.suggestDisableSourcemap({source:e.source}),ve(Or.t("Unable to retrieve source content"))):{content:n,mimeType:t.getSuggestedMimeType}}async _onThreads(){let e=[];return this._thread&&e.push({id:this._thread.id,name:this._thread.name()}),{threads:e}}findVariableStore(e){if(!this._thread)return;let t=this._thread.pausedVariables();if(t&&e(t))return t;if(e(this._thread.replVariables))return this._thread.replVariables}async _onLocations(e){let t=this.findVariableStore(o=>o.hasVariable(e.locationReference));if(!t||!this._thread)throw Gu();let n=await t.getLocations(e.locationReference),i=await this._thread.rawLocationToUiLocationWithWaiting(this._thread.rawLocation(n));if(!i)throw Gu();return{source:await i.source.toDap(),line:i.lineNumber,column:i.columnNumber}}async _onVariables(e){return{variables:await this.findVariableStore(n=>n.hasVariable(e.variablesReference))?.getVariables(e)??[]}}async _onReadMemory(e){let t=e.memoryReference,n=await this.findVariableStore(i=>i.hasMemory(t))?.readMemory(t,e.offset??0,e.count);return n?{address:"0",data:n.toString("base64"),unreadableBytes:e.count-n.length}:{address:"0",unreadableBytes:e.count}}async _onWriteMemory(e){let t=e.memoryReference;return{bytesWritten:await this.findVariableStore(i=>i.hasMemory(t))?.writeMemory(t,e.offset??0,Buffer.from(e.data,"base64"))}}async _onSetExpression(e){if(!this._thread)throw new T(Ay());let t=await this._thread.evaluate({expression:`${e.expression} = ${Fu(e.value)}`,context:"repl",frameId:e.frameId});return{value:t.result,variablesReference:t.variablesReference,indexedVariables:t.indexedVariables,namedVariables:t.namedVariables,presentationHint:t.presentationHint,type:t.type,memoryReference:t.memoryReference,valueLocationReference:t.valueLocationReference}}async _onSetVariable(e){let t=this.findVariableStore(n=>n.hasVariable(e.variablesReference));return t?(e.value=Fu(e.value.trim()),t.setVariable(e)):ve(Or.t("Variable not found"))}_withThread(e){if(!this._thread)throw new T(Ay());return e(this._thread)}async _refreshStackTrace(){if(!this._thread)return;this._thread.pausedDetails()&&await this._thread.refreshStackTrace()}createThread(e,t){this._thread=new uc(this.sourceContainer,e,this.dap,t,this._services.get(zi),this._services.get(U),this._services.get(Pr),this._services.get(Gf),this.launchConfig,this.breakpointManager,this._services.get(gh),this._services.get(pc),this._services.get(oo),this._services.get(Ji),this._services.get(Hl));let n=this._services.get(Eh);return n.connect(this.dap,this._thread),"profileStartup"in this.launchConfig&&this.launchConfig.profileStartup&&n.start(this.dap,this._thread,{type:gt.type}),this._thread.updateCustomBreakpoints(this._xhrBreakpoints,this._customBreakpoints),this.asyncStackPolicy.connect(e).then(i=>this._disposables.push(i)).catch(i=>this._services.get(U).error("internal","Error enabling async stacks",i)),this.breakpointManager.setThread(this._thread),this._services.get(Fe).attach(e),this._threadDeferred.resolve(this._thread),this._thread}async setCustomBreakpoints({ids:e,xhr:t}){return await this._thread?.updateCustomBreakpoints(t,e),this._customBreakpoints=e,this._xhrBreakpoints=t,{}}async _toggleSkipFileStatus(e){return await this._services.get(Qi).toggleSkippingFile(e),await this._refreshStackTrace(),{}}async _prettyPrintSource(e){if(!e.source||!this._thread)return{canPrettyPrint:!1};e.source.path=on(e.source.path);let t=this.sourceContainer.source(e.source);if(!t)return ve(Or.t("Source not found"));let n=await t.prettyPrint();if(!n)return ve(Or.t("Unable to pretty print"));let{map:i,source:o}=n;return await this.breakpointManager.moveBreakpoints(this._thread,t,i,o),this.sourceContainer.clearDisabledSourceMaps(t),await this._refreshStackTrace(),{}}onEvaluate(e){return e.expression===".scripts"?this._dumpDiagnostics({fromSuggestion:!1}).then(this.dap.openDiagnosticTool).then(()=>({result:"Opening diagnostic tool...",variablesReference:0})):this._withThread(t=>t.evaluate(e))}async _dumpDiagnostics(e){let t={file:await this._services.get(uo).generateHtml()};return e.fromSuggestion&&this._services.get(Dt).report("diagnosticPrompt",{event:"opened"}),t}async _requestCDPProxy(){return await this._cdpProxyProvider.proxy()}dispose(){this._disposables.dispose(),ef(this._services)}};var wO=_(je()),EH=_(H("os"));var R4={connect:async()=>Ys},BC=r=>({async connect(e){return await e.Debugger.setAsyncCallStackDepth({maxDepth:r}),Ys}}),k4=r=>{let e=new C,t=!1,n=()=>{t||(t=!0,e.fire())};return{async connect(i){if(t)return await i.Debugger.setAsyncCallStackDepth({maxDepth:r}),Ys;let o=new Ae;return o.push(e.event(()=>{o.dispose(),i.Debugger.setAsyncCallStackDepth({maxDepth:r})}),i.Debugger.on("breakpointResolved",n),i.Debugger.on("paused",s=>{s.reason!=="instrumentation"&&n()})),o}}},NC=BC(32),FC=r=>r===!1?R4:r===!0?NC:"onAttach"in r?BC(r.onAttach):"onceBreakpointResolved"in r?k4(r.onceBreakpointResolved):NC;var UC=H("fs"),WC=H("inspector"),xh=class{constructor(e){this.file=e;this.session=new WC.Session;this.session.connect()}async start(){try{await this.post("Profiler.enable")}catch{}await this.post("Profiler.start")}async stop(){let{profile:e}=await this.post("Profiler.stop");await UC.promises.writeFile(this.file,JSON.stringify(e))}dispose(){this.session.disconnect()}post(e,t){return new Promise((n,i)=>this.session.post(e,t,(o,s)=>{o?i(o):n(s)}))}};var Pl=Symbol("MutableLaunchConfig"),jC=r=>{let e=new C;return new Proxy({},{ownKeys(){return Object.keys(r)},get(t,n){switch(n){case"update":return i=>{r=i,e.fire()};case"onChange":return e.event;default:return r[n]}}})};var _H=_(Av()),mO=_(Dg()),IH=H("fs"),AH=_(q()),aAe=_(TH());var Cl=_(q());var $l=class{toDap(){return{category:"console",output:"\x1B[2J"}}},Fh=class{toDap(){return{category:"stdout",output:"",group:"end"}}};var Uh=class{constructor(e){this.sink=e;this.q=[];this.disposed=!1;this.onDrainedEmitter=new C;this.onDrained=this.onDrainedEmitter.event}get length(){return this.q.length}enqueue(e){this.disposed||(this.q.push(new wv(e)),this.q.length===1&&this.process())}dispose(){this.disposed=!0,this.q=[]}async process(){let e=this.q.findIndex(t=>t.value===iD);e===0?await this.q[0].wait:e===-1?(this.sink(nD(this.q)),this.q=[]):(this.sink(nD(this.q.slice(0,e))),this.q=this.q.slice(e)),this.q.length?this.process():this.onDrainedEmitter.fire()}},nD=r=>r.map(e=>e.value).filter(e=>e!==oD),iD=Symbol("unsettled"),oD=Symbol("unsettled"),wv=class{constructor(e){this.value=iD;e instanceof Promise?this.wait=e.then(t=>{this.value=t},()=>{this.value=oD}):(this.value=e,this.wait=Promise.resolve())}};var v5=new Set(["group","assert","count"]),mc=class{constructor(e,t){this.dap=e;this.isDirty=!1;this.queue=new Uh(e=>{for(let t of e)this.dap.output(t)});this.onDrained=this.queue.onDrained;t.register(0,async n=>{this.length&&await new Promise(i=>this.onDrained(i)),n&&this.dispose()})}get length(){return this.queue.length}dispose(){this.queue.dispose()}dispatch(e,t){let n=this.parse(t);n&&this.enqueue(e,n)}enqueue(e,t){if(!(t instanceof $l))this.isDirty=!0;else if(this.isDirty)this.isDirty=!1;else return;this.queue.enqueue(t.toDap(e))}parse(e){if(e.type==="log"){let t=e.stackTrace?.callFrames[0];if(t&&t.url==="internal/console/constructor.js"&&v5.has(t.functionName))return}switch(e.type){case"clear":return new $l;case"endGroup":return new Fh;case"assert":return new lh(e);case"table":return new mh(e);case"startGroup":case"startGroupCollapsed":return new hh(e);case"debug":case"log":case"info":return new co(e);case"trace":return new ph(e);case"error":return new fh(e);case"warning":return new dh(e);case"dir":case"dirxml":return new co(e);case"count":return new co(e);case"profile":case"profileEnd":return new co(e);case"timeEnd":return new co(e);default:try{gp(e.type,"unknown console message type")}catch{}}}};mc=E([(0,Cl.injectable)(),g(0,(0,Cl.inject)(Yt)),g(1,(0,Cl.inject)(Ji))],mc);var aD=_(je()),Wh=_(q());var sD="@vscode/dwarf-debugging",Hc=class{constructor(e){this.dap=e;this.didPrompt=!1}async load(){try{return await import(sD)}catch{return}}prompt(){this.didPrompt||(this.didPrompt=!0,this.dap.output({output:aD.t("You may install the `{}` module via npm for enhanced WebAssembly debugging",sD),category:"console"}))}};Hc=E([(0,Wh.injectable)(),g(0,(0,Wh.inject)(Yt))],Hc);var Ur=_(q());var TM=_(cD()),MM=H("dns"),bm=_(DM()),Es=_(q());var ym=Symbol("IRequestOptionsProvider");var go=class{constructor(e,t){this.fs=e;this.options=t;this.autoLocalhostPortFallbacks={}}async fetch(e,t=Vt,n){try{let o=(0,TM.dataUriToBuffer)(e);return{ok:!0,url:e,body:new TextDecoder().decode(o.buffer),statusCode:200}}catch{}let i=$t(e)?e:We(e);if(i)try{return{ok:!0,url:e,body:await this.fs.readFile(i,"utf-8"),statusCode:200}}catch(o){return{ok:!1,url:e,error:o,statusCode:200}}return this.fetchHttp(e,t,n)}async fetchJson(e,t,n){let i=await this.fetch(e,t,{Accept:"application/json",...n});if(!i.ok)return i;try{return{...i,body:JSON.parse(i.body)}}catch(o){return{...i,ok:!1,url:e,error:o}}}async fetchHttp(e,t,n){let i=new URL(e),o=i.protocol!=="http:",s=Number(i.port)??(o?443:80),a={headers:n,followRedirect:!0};o&&await ga(e)&&(a.rejectUnauthorized=!1),this.options?.provideOptions(a,e);let c=i.hostname==="localhost";if(c&&this.autoLocalhostPortFallbacks[s]){let p=await this.requestHttp(i.toString(),a,t);return p.statusCode!==503?p:(delete this.autoLocalhostPortFallbacks[s],this.requestHttp(e,a,t))}let l=await this.requestHttp(e,a,t);if(l.statusCode===503&&c){let p;try{p=await MM.promises.lookup(i.hostname)}catch{return l}i.hostname=p.family===6?"127.0.0.1":"[::1]",l=await this.requestHttp(i.toString(),a,t),l.statusCode!==503&&(this.autoLocalhostPortFallbacks[s]=i.hostname)}return l}async requestHttp(e,t,n){this.options?.provideOptions(t,e);let i=new Ae;try{let o=(0,bm.default)(e,t);i.push(n.onCancellationRequested(()=>o.cancel()));let s=await o;return{ok:!0,url:e,body:s.body,statusCode:s.statusCode}}catch(o){if(!(o instanceof bm.RequestError))throw o;let s=o.response?String(o.response?.body):o.message,a=o.response?.statusCode??503;return{ok:!1,body:s,statusCode:a,url:e,error:new zd(a,e,s)}}finally{i.dispose()}}};go=E([(0,Es.injectable)(),g(0,(0,Es.inject)($e)),g(1,(0,Es.optional)()),g(1,(0,Es.inject)(ym))],go);var xs=class extends go{constructor(t,n,i,o,s){super(t,s);this.logger=n;this.target=i;this.cdp=o;this.disposables=new Ae}dispose(){this.disposables.dispose()}async fetchHttp(t,n,i={}){let o=await super.fetchHttp(t,n,i);return o.ok?o:(this.logger.info("runtime","Network load failed, falling back to CDP",{url:t,res:o}),this.fetchOverBrowserNetwork(t,o))}async fetchOverBrowserNetwork(t,n){if(!this.cdp)return n;let i=await this.cdp.Network.loadNetworkResource({frameId:this.target?.targetInfo.targetId,url:t,options:{includeCredentials:!0,disableCache:!0}});if(!i||!i.resource.success||!i.resource.httpStatusCode||i.resource.httpStatusCode>=400||!i.resource.stream)return n;let o=Number(i.resource.headers?.["Content-Length"]);isNaN(o)&&(o=1/0);let s=[],a=0;for(;;){let c=await this.cdp.IO.read({handle:i.resource.stream,offset:a});if(!c)return this.logger.info("runtime","Stream error encountered in middle, falling back",{url:t}),n;let u=c.base64Encoded?Buffer.from(c.data,"base64").toString():c.data;if(a+=Buffer.byteLength(u,"utf-8"),s.push(u),a>=o){this.cdp.IO.close({handle:i.resource.stream});break}if(c.eof)break}return{ok:!0,body:s.join(""),statusCode:i.resource.httpStatusCode,url:t}}};xs=E([(0,Ur.injectable)(),g(0,(0,Ur.inject)($e)),g(1,(0,Ur.inject)(U)),g(2,(0,Ur.optional)()),g(2,(0,Ur.inject)(Zn)),g(3,(0,Ur.optional)()),g(3,(0,Ur.inject)(Be)),g(4,(0,Ur.optional)()),g(4,(0,Ur.inject)(ym))],xs);var yo=_(q()),OM=_(tl());function kM(r,e=Ut){let t=[];for(let n=0;nnew RegExp(n,"i"))}function RM(r,e=Ut){let t=r.split("/"),n=[];for(let i=0;ie(a)).join("[^\\/]*"))}else n.push(e(o));n.push(i[\/\\](.*)$/,t=r.map(n=>{n=n.trim();let i=e.exec(n);return i?i[1]:null}).filter(It);return t.length>0?t:void 0}function xX(r,e){return e.filter(n=>!n.includes(di)).map(n=>$t(n)?ya(r.rebaseLocalToRemote(n)):Oe(n)).map(Bd)}var ei=class{constructor({skipFiles:e},t,n,i,o){this.logger=n;this.cdp=i;this._regexForAuthored=V_(e=>kM(e,t=>Bu(t,0,t.length,!0,!0)));this._scriptsWithSkipping=new Set;this._targetId=o.id(),this._rootTargetId=NM(o).id(),this._isUrlFromSourceMapSkipped=new Mn(s=>this._normalizeUrl(s)),this._authoredGlobs=xX(t,e),this._nodeInternalsGlobs=EX(e),this._initNodeInternals(o),this._updateSkippedDebounce=G_(500,()=>this._updateGeneratedSkippedSources()),e.length&&this._updateGeneratedSkippedSources(),ei.sharedSkipsEmitter.event(s=>{s.rootTargetId===this._rootTargetId&&s.targetId!==this._targetId&&this._toggleSkippingFile(s.params)})}setSourceContainer(e){this._sourceContainer=e}_testSkipNodeInternal(e){return this._nodeInternalsGlobs?(e.startsWith(en)&&(e=e.slice(en.length)),(0,OM.default)([e],this._nodeInternalsGlobs).length>0):!1}_testSkipAuthored(e){return this._regexForAuthored(this._authoredGlobs).some(t=>t.test(e))}_isNodeInternal(e,t){return e.startsWith(en)?!0:t?.has(e)||/^internal\/.+\.js$/.test(e)}async _updateGeneratedSkippedSources(){let e=this._regexForAuthored(this._authoredGlobs).map(n=>n.source),t=this._allNodeInternals?.settledValue;if(t){e.push(`^(${en})?internal\\/`);for(let n of t)this._testSkipNodeInternal(n)&&e.push(`^(${en})?${Ut(n)}$`)}await this.cdp.Debugger.setBlackboxPatterns({patterns:e})}_normalizeUrl(e){return Oe(e.toLowerCase())}isScriptSkipped(e){return this._isNodeInternal(e,this._allNodeInternals?.settledValue)?this._testSkipNodeInternal(e):(e=this._normalizeUrl(e),this._isUrlFromSourceMapSkipped.get(e)===!0?!0:this._testSkipAuthored(e))}async _updateSourceWithSkippedSourceMappedSources(e,t){let n=this.isScriptSkipped(e.url),i=[],o=n;for(let a of e.sourceMap.sourceByUrl.values()){let c=this.isScriptSkipped(a.url);if(typeof c>"u"&&(c=n),c!==o){let[[u],[l]]=await Promise.all([this._sourceContainer.currentSiblingUiLocations({source:a,lineNumber:1,columnNumber:1},e),this._sourceContainer.currentSiblingUiLocations({source:a,lineNumber:1/0,columnNumber:1},e)]);u&&l?(i.push({lineNumber:u.lineNumber-1,columnNumber:u.columnNumber-1},{lineNumber:l.lineNumber-1,columnNumber:l.columnNumber-1}),o=!o):this.logger.error("internal","Could not map script beginning for "+a.sourceReference)}}let s=t;i.length||(s=s.filter(a=>this._scriptsWithSkipping.has(a.scriptId)),s.forEach(a=>this._scriptsWithSkipping.delete(a.scriptId))),s.map(({scriptId:a})=>this.cdp.Debugger.setBlackboxedRanges({scriptId:a,positions:i}))}initializeSkippingValueForSource(e){this._initializeSkippingValueForSource(e)}_initializeSkippingValueForSource(e,t=e.scripts){let n=e.url,i=this.isScriptSkipped(n);if(!i&&e.absolutePath&&this._testSkipAuthored(He(e.absolutePath))&&(this.setIsUrlBlackboxSkipped(n,!0),i=!0,this._updateSkippedDebounce()),Wt(e)){if(i)for(let o of e.sourceMap.sourceByUrl.values())this._isUrlFromSourceMapSkipped.set(o.url,!0);for(let o of e.sourceMap.sourceByUrl.values())this._initializeSkippingValueForSource(o,t);this._updateSourceWithSkippedSourceMappedSources(e,t)}}async _initNodeInternals(e){if(e.type()!=="node"||!this._nodeInternalsGlobs||this._allNodeInternals)return;let t=this._allNodeInternals=ge(),n=await this.cdp.Runtime.evaluate({expression:"require('module').builtinModules"+Ne(),returnByValue:!0,includeCommandLineAPI:!0});n&&!n.exceptionDetails?t.resolve(new Set(n.result.value.map(i=>i+".js"))):t.resolve(new Set),await this._updateGeneratedSkippedSources()}async _toggleSkippingFile(e){let t;e.resource&&$t(e.resource)&&(t=e.resource);let n={path:t,sourceReference:e.sourceReference},i=this._sourceContainer.source(n);if(!i)return{};let o=!this.isScriptSkipped(i.url);if(i instanceof Je){this._isUrlFromSourceMapSkipped.set(i.url,o);let s=Array.from(i.compiledToSourceUrl.keys());await Promise.all(s.map(a=>this._updateSourceWithSkippedSourceMappedSources(a,a.scripts)))}else{if(Wt(i))for(let s of i.sourceMap.sourceByUrl.values())this._isUrlFromSourceMapSkipped.set(s.url,o);this.setIsUrlBlackboxSkipped(i.url,o),await this._updateGeneratedSkippedSources()}return{}}setIsUrlBlackboxSkipped(e,t){let n=e,i=`!${n}`,o=this._authoredGlobs.filter(s=>s!==n&&s!==i);this._regexForAuthored(o).some(s=>s.test(e))!==t&&(o.push(t?n:i),this._regexForAuthored.clear()),this._authoredGlobs=o}async toggleSkippingFile(e){let t=await this._toggleSkippingFile(e);return ei.sharedSkipsEmitter.fire({params:e,rootTargetId:this._rootTargetId,targetId:this._targetId}),t}};ei.sharedSkipsEmitter=new C,ei=E([(0,yo.injectable)(),g(0,(0,yo.inject)(de)),g(1,(0,yo.inject)(Se)),g(2,(0,yo.inject)(U)),g(3,(0,yo.inject)(Be)),g(4,(0,yo.inject)(Zn))],ei);function NM(r){let e=r.parent();return e?NM(e):r}var jl=_(q()),FM=H("path");var BM=/^webpack:\/{3}([^/]+?\.vue)(\?[0-9a-z]*)?$/i,PX=/^webpack:\/{3}\.\/.+\.vue\?[0-9a-z]+$/i,Pc=Symbol("IVueFileMapper");var xc=class{constructor(e,t){this.files=e;this.search=t;this.getMapping=ne(async()=>{let e=new Map;return await this.search.streamAllChildren(this.files,t=>e.set((0,FM.basename)(t),t)),e})}async lookup(e){let t=BM.exec(e);return t?(await this.getMapping()).get(t[1]):void 0}getVueHandling(e){return this.files.empty?0:BM.test(e)?1:PX.test(e)?2:0}};xc=E([(0,jl.injectable)(),g(0,(0,jl.inject)(gi)),g(1,(0,jl.inject)(Da))],xc);var ti=class{constructor(){this.changeEmitter=new C;this.addEmitter=new C;this.removeEmitter=new C;this.targetMap=new Map;this.onChanged=this.changeEmitter.event;this.onAdd=this.addEmitter.event;this.onRemove=this.removeEmitter.event}get size(){return this.targetMap.size}add(e,t){this.targetMap.set(e,t),this.addEmitter.fire([e,t]),this.changeEmitter.fire()}get(e){return this.targetMap.get(e)}remove(e){let t=this.targetMap.get(e);return t===void 0?!1:(this.targetMap.delete(e),this.removeEmitter.fire([e,t]),this.changeEmitter.fire(),!0)}value(){return this.targetMap.values()}};var Ps=_(q());var iR=Symbol("IDefaultBrowserProvider"),Lc=class{constructor(e,t){this.location=e;this.vscode=t;this.lookup=ne(async()=>{let e;return this.location==="remote"&&this.vscode?e=await this.vscode.commands.executeCommand("js-debug-companion.defaultBrowser"):e=(await Promise.resolve().then(()=>(nR(),rR)).then(n=>n.default())).name,["chrome","edge"].find(n=>e.toLowerCase().includes(n))??"other"})}};Lc=E([(0,Ps.injectable)(),g(0,(0,Ps.inject)(Hi)),g(1,(0,Ps.optional)()),g(1,(0,Ps.inject)(Fn))],Lc);var sR=_(q()),Am=_(H("os"));var _m=class{async setup(){}dispose(){}write(e){if(e.level>2)throw new Error(e.message);console.log(JSON.stringify(e))}};var OI=class{constructor(e=512){this.size=e;this.items=[];this.i=0}write(e){this.items[this.i]=e,this.i=(this.i+1)%this.size}read(){return this.items.slice(this.i).concat(this.items.slice(0,this.i))}},Wr=class{constructor(){this.logTarget={queue:[]};this.logBuffer=new OI}static async test(){let e=new Wr;return e.setup({sinks:[new _m],showWelcome:!1}),e}info(e,t,n){this.log({tag:e,timestamp:Date.now(),message:t,metadata:n,level:1})}verbose(e,t,n){this.log({tag:e,timestamp:Date.now(),message:t,metadata:n,level:0})}warn(e,t,n){this.log({tag:e,timestamp:Date.now(),message:t,metadata:n,level:2})}error(e,t,n){this.log({tag:e,timestamp:Date.now(),message:t,metadata:n,level:3})}fatal(e,t,n){this.log({tag:e,timestamp:Date.now(),message:t,metadata:n,level:4})}assert(e,t){if(e===!1||e===void 0||e===null){if(this.error("runtime.assertion",t,{error:new Error("Assertion failed")}),process.env.JS_DEBUG_THROW_ASSERTIONS)throw new Error(t);debugger;return!1}return!0}log(e){if(this.logBuffer.write(e),"queue"in this.logTarget){this.logTarget.queue.push(e);return}for(let t of this.logTarget.sinks)t.write(e)}getRecentLogs(){return this.logBuffer.read()}dispose(){if("sinks"in this.logTarget){for(let e of this.logTarget.sinks)e.dispose();this.logTarget={queue:[]}}}forTarget(){return this}async setup(e){if(await Promise.all(e.sinks.map(n=>n.setup())),e.showWelcome!==!1){let n=RX();for(let i of e.sinks)i.write(n)}let t=this.logTarget;this.logTarget={sinks:e.sinks.slice()},"sinks"in t?t.sinks.forEach(n=>n.dispose()):t.queue.forEach(n=>this.log(n))}};Wr.null=(()=>{let e=new Wr;return e.setup({sinks:[]}),e})(),Wr=E([(0,sR.injectable)()],Wr);var RX=()=>({timestamp:Date.now(),tag:"runtime.welcome",level:1,message:`${Xd} v${Vu} started`,metadata:{os:`${Am.platform()} ${Am.arch()}`,nodeVersion:process.version,adapterVersion:Vu}});var Pk=_(lk()),Rm=_(q());var Ms=Symbol("touched"),Io;(c=>{function r(){return{children:{},[Ms]:1}}c.root=r;function e(u,l){return u[Ms]=1,a(u,s(l),0)}c.getPath=e;function t(u){u[Ms]=1}c.touch=t;function n(u){u[Ms]=2}c.touchAll=n;function i(u,l){let p=u.children[l]??={children:{}};return p[Ms]=1,p}c.getOrMakeChild=i;function o(u){if(u[Ms]){for(let[l,p]of Object.entries(u.children))switch(p[Ms]){case 1:o(p);break;case 2:break;default:delete u.children[l]}return u}}c.prune=o;function s(u){let l=u.split(/\/|\\/);return l[0]===""&&l.unshift(),l}function a(u,l,p){let d=i(u,l[p]);return p===l.length-1?d:a(d,l,p+1)}})(Io||={});var a_=H("fs"),c_=_(tl()),Rs=H("path"),xk=_(Ek());var y6=/\//g,Mm=class{constructor(e){this.stat=ko(e=>a_.promises.lstat(e));this.readdir=ko(e=>a_.promises.readdir(e,{withFileTypes:!0}));this.alreadyProcessedFiles=new Set;this.fileEmitter=new C;this.onFile=this.fileEmitter.event;this.errorEmitter=new C;this.onError=this.errorEmitter.event;this.processor=e.fileProcessor,this.filter=e.filter,this.ignore=e.ignore.map(i=>c_.default.matcher((0,xk.default)(Oe(i),{cwd:e.cwd})));let t=(0,Rs.isAbsolute)(e.pattern)?(0,Rs.relative)(e.cwd,e.pattern):e.pattern,n=c_.default.parse(Oe(t),{ignore:e.ignore,cwd:e.cwd,expand:!0});this.done=Promise.all(n.map(i=>{let o=[];for(let u=1;ud.output||d.value).join("")+"$")),u=l+1}let s=o[0]==="**"?[0,1]:[0],a=Io.getPath(e.cache,e.cwd),c={elements:o,seen:new Set};return Promise.all(s.map(u=>this.readSomething(c,u,e.cwd,[],a)))})).then(()=>{})}async readSomething(e,t,n,i,o){if(this.alreadyProcessedFiles.has(o))return;let s=`${t}:${n}`;if(e.seen.has(s))return;e.seen.add(s);let a;try{a=await this.stat(n)}catch(u){this.errorEmitter.fire({path:n,error:u});return}if(this.alreadyProcessedFiles.has(o))return;let c=o.data;if(c&&a.mtimeMs===c.mtime){if(c.type===0){let u=[],p=Object.entries(o.children).filter(([,d])=>d.data?.type!==0).map(([d])=>d);for(let[d,f]of Object.entries(o.children))u.push(f.data!==void 0?this.handleDirectoryEntry(e,t,n,{name:d,type:f.data.type},p,o):this.stat(n).then(h=>this.handleDirectoryEntry(e,t,n,{name:d,type:h.isFile()?1:0},p,o),()=>{}));await Promise.all(u)}else c.type===1&&(this.alreadyProcessedFiles.add(o),this.fileEmitter.fire(c.extracted));return}a.isDirectory()?await this.handleDir(e,t,a.mtimeMs,n,o):(this.alreadyProcessedFiles.add(o),await this.handleFile(a.mtimeMs,n,i,o))}applyFilterToFile(e,t,n){let i=n.children[e];if(this.alreadyProcessedFiles.has(i))return!1;if(!this.filter)return!0;let o=i.data?.type===1?i.data.extracted:void 0;return Io.touch(i),this.filter(t,o)}handleDirectoryEntry(e,t,n,i,o,s){let a=n+"/"+i.name,c=this.getDirectoryReadDescends(e,t,n,i);if(c===void 0)return;let u=Io.getOrMakeChild(s,i.name);if(!(i.type===1&&!this.applyFilterToFile(i.name,a,s)))return typeof c=="number"?this.readSomething(e,t+c,a,o,u):Promise.all(c.map(l=>this.readSomething(e,t+l,a,o,u)))}getDirectoryReadDescends(e,t,n,i){let o=n+"/"+i.name;if(this.ignore.some(c=>c(o)))return;let s=t===e.elements.length-1,a=e.elements[t];if(a==="**")return i.type===1?s?0:this.getDirectoryReadDescends(e,t+1,n,i):s?0:[0,1];if((a instanceof RegExp&&a.test(i.name)||a===i.name)&&(i.type===0?!s:s))return 1}async handleFile(e,t,n,i){let o=Rs.sep==="/"?t:t.replace(y6,Rs.sep),s;try{s=await this.processor(o,{siblings:n,mtime:e})}catch(a){this.errorEmitter.fire({path:o,error:a});return}i.data={type:1,mtime:e,extracted:s},this.fileEmitter.fire(s)}async handleDir(e,t,n,i,o){let s;try{s=await this.readdir(i)}catch(u){this.errorEmitter.fire({path:i,error:u});return}let a=[],c=s.filter(u=>u.isFile()).map(u=>u.name);for(let u of s){if(u.name.startsWith("."))continue;let l;if(u.isDirectory())l=0;else if(u.isFile())l=1;else continue;a.push(this.handleDirectoryEntry(e,t,i,{name:u.name,type:l},c,o))}await Promise.all(a),o.data={type:0,mtime:n}}};var Rc=class{constructor(e){this.logger=e}async streamAllChildren(e,t){let n=[];return await this.globForFiles(e,o=>n.push(t(Xe(o.path)))),(await Promise.all(n)).filter(o=>o!==void 0)}async streamChildrenWithSourcemaps(e){let t=[],n=e.lastState||{},i={};return await Promise.all([...e.files.explode()].map(async s=>{let a=JSON.stringify(s),c=n[a]||Io.root();await this._streamChildrenWithSourcemaps(c,e,t,s);let u=Io.prune(c);u&&(i[a]=u)})),this.logger.info("sourcemap.parsing",`turboGlobStream search found ${t.length} files`),{values:(await Promise.all(t)).filter(It),state:i}}async _streamChildrenWithSourcemaps(e,t,n,i){let o=new Mm({pattern:i.pattern,ignore:i.negations,cwd:i.cwd,cache:e,filter:t.filter,fileProcessor:(s,a)=>Lx(s,a).then(c=>c&&t.processMap(c))});o.onError(({path:s,error:a})=>{this.logger.warn("sourcemap.parsing","Error parsing source map",{error:a,path:s})}),o.onFile(s=>s&&n.push(t.onProcessedMap(s))),await o.done}async globForFiles(e,t){await Promise.all([...e.explode()].map(n=>new Promise((i,o)=>(0,Pk.default)([n.pattern,"!**/*.asar/**"],{ignore:n.negations,cwd:n.cwd}).on("data",t).on("end",i).on("error",o))))}};Rc=E([(0,Rm.injectable)(),g(0,(0,Rm.inject)(U))],Rc);var Gm=_(je()),So=_(q());var Lk=_(H("path")),$k=H("url");var km=class{constructor(){this._onFrameAddedEmitter=new C;this._onFrameRemovedEmitter=new C;this._onFrameNavigatedEmitter=new C;this.onFrameAdded=this._onFrameAddedEmitter.event;this.onFrameRemoved=this._onFrameRemovedEmitter.event;this.onFrameNavigated=this._onFrameNavigatedEmitter.event;this._frames=new Map}attached(e,t){e.Page.enable({}),e.Page.getResourceTree({}).then(n=>{this._processCachedResources(e,n?n.frameTree:void 0,t)})}mainFrame(){return this._mainFrame}_processCachedResources(e,t,n){t&&this._addFramesRecursively(e,t,t.frame.parentId,n),e.Page.on("frameAttached",i=>{this._frameAttached(e,n,i.frameId,i.parentFrameId)}),e.Page.on("frameNavigated",i=>{this._frameNavigated(e,n,i.frame)}),e.Page.on("frameDetached",i=>{this._frameDetached(e,n,i.frameId)})}_addFrame(e,t,n){let i=new l_(this,e,t,n);return this._frames.set(i.id,i),i.isMainFrame()&&(this._mainFrame=i),this._onFrameAddedEmitter.fire(i),i}_frameAttached(e,t,n,i){let o=this._frames.get(n);return o||(o=this._addFrame(e,n,i)),o._ref(t),o}_frameNavigated(e,t,n){let i=this._frames.get(n.id);i||(i=this._frameAttached(e,t,n.id,n.parentId)),i._navigate(n,t),this._onFrameNavigatedEmitter.fire(i)}_frameDetached(e,t,n){let i=this._frames.get(n);i&&i._unref(t)}frameForId(e){return this._frames.get(e)}frames(){return Array.from(this._frames.values())}_addFramesRecursively(e,t,n,i){let o=t.frame,s=this._frames.get(o.id);s?(s._navigate(o,i),this._onFrameNavigatedEmitter.fire(s)):(s=this._addFrame(e,o.id,n),s._navigate(o,i));for(let a=0;t.childFrames&&ae._parentFrameId===this.id)}_unrefChildFrames(e){for(let t of this.childFrames())t._unref(e)}_unref(e){this._targets.delete(e),!this._targets.size&&(this._unrefChildFrames(e),this.model._frames.delete(this.id),this.model._onFrameRemovedEmitter.fire(this))}displayName(){return this._name?this._name:b6(this._url)||`